import heapq
import math

def a_star():
    # Define the initial state of the puzzle
    initial_state = [[93, 88, 60], [28, 18, 24], ['_', 47, 53]]
    goal_state = [[93, 88, 60], [28, 24, 18], [53, 47, '_']]

    visited_costs = {}
    visited_costs[str(initial_state)] = 0

    queue = [(0, 0, [], initial_state)]

    while queue:
        _, g, actions, state = heapq.heappop(queue)

        if state == goal_state:
            return actions

        empty_spot = find_empty_spot(state)
        possible_moves = get_possible_moves(empty_spot)

        for move in possible_moves:
            new_state = make_move(state, empty_spot, move)
            new_cost = g + 1

            if str(new_state) not in visited_costs or new_cost < visited_costs[str(new_state)]:
                visited_costs[str(new_state)] = new_cost
                h = heuristic(new_state, goal_state)
                heapq.heappush(queue, (g + h, new_cost, actions + [new_state[move[0]][move[1]]], new_state))

    return None

def find_empty_spot(state):
    for i in range(len(state)):
        for j in range(len(state[0])):
            if state[i][j] == '_':
                return (i, j)

def get_possible_moves(empty_spot):
    possible_moves = []
    row, col = empty_spot
    if row > 0:
        possible_moves.append((row - 1, col))
    if row < 2:
        possible_moves.append((row + 1, col))
    if col > 0:
        possible_moves.append((row, col - 1))
    if col < 2:
        possible_moves.append((row, col + 1))
    return possible_moves

def make_move(state, empty_spot, move):
    new_state = [row[:] for row in state]
    row, col = empty_spot
    new_row, new_col = move
    new_state[row][col] = new_state[new_row][new_col]
    new_state[new_row][new_col] = '_'
    return new_state

def heuristic(state, goal_state):
    # The heuristic is the sum of Manhattan distances of each tile from its goal position
    h = 0
    for i in range(len(state)):
        for j in range(len(state[0])):
            if state[i][j] != '_':
                value = state[i][j]
                goal_pos = find_goal_position(value, goal_state)
                h += abs(i - goal_pos[0]) + abs(j - goal_pos[1])
    return h

def find_goal_position(value, goal_state):
    for i in range(len(goal_state)):
        for j in range(len(goal_state[0]):
            if goal_state[i][j] == value:
                return (i, j)

print(a_star())


IsStrictBoolean<any>>(true)
	testType.false<IsStrictBoolean<never>>(true)
})

it('returns false for other types', () => {
	testType.false<IsStrictBoolean<undefined>>(true)
	testType.false<IsStrictBoolean<null>>(true)
	testType.false<IsStrictBoolean<number>>(true)
	testType.false<IsStrictBoolean<1>>(true)
	testType.false<IsStrictBoolean<string>>(true)
	testType.false<IsStrictBoolean<''>>(true)
	testType.false<IsStrictBoolean<symbol>>(true)
	testType.false<IsStrictBoolean<bigint>>(true)
	testType.false<IsStrictBoolean<1n>>(true)
	testType.false<IsStrictBoolean<{}>>(true)
	testType.false<IsStrictBoolean<{ a: 1 }>>(true)
	testType.false<IsStrictBoolean<string[]>>(true)
	testType.false<IsStrictBoolean<[]>>(true)
	testType.false<IsStrictBoolean<Function>>(true)
	testType.false<IsStrictBoolean<() => void>>(true)
})

it('returns false for union type', () => {
	testType.false<IsStrictBoolean<boolean | 1>>(true)
})

it('returns false for intersection type', () => {
	testType.false<IsStrictBoolean<boolean & { a: 1 }>>(true)
})

it('can override Then/Else', () => {
	testType.equal<IsStrictBoolean<boolean, 1, 2>, 1>(true)
	testType.equal<IsStrictBoolean<true, 1, 2>, 2>(true)
	testType.equal<IsStrictBoolean<false, 1, 2>, 2>(true)

	testType.equal<IsStrictBoolean<any, 1, 2>, 2>(true)
	testType.equal<IsStrictBoolean<unknown, 1, 2>, 2>(true)
	testType.equal<IsStrictBoolean<never, 1, 2>, 2>(true)
	testType.equal<IsStrictBoolean<void, 1, 2>, 2>(true)
})
import { Presupuesto } from './presupueto.entity';
import { EntityRepository, Repository } from 'typeorm';
import { CreatePresupuestoDto } from './dto/create-presupuesto.dto';
import { Usuario } from '../auth/usuario.entity';
import { Logger, InternalServerErrorException } from '@nestjs/common';

@EntityRepository(Presupuesto)
export class PresupuestoRepository extends Repository<Presupuesto> {
  private logger = new Logger('PresupuestoRepository');

  async createPresupuesto(dto : CreatePresupuestoDto, user: Usuario): Promise<Presupuesto> {
    const presupuesto = new Presupuesto();
    presupuesto.setValues({...dto, user})
    try {
      await presupuesto.save();
    } catch (error) {
      this.logger.error(`fallo la creacion de presupuesto para el usuario "${user.correo}". Data: ${presupuesto}`, error.stack);
      throw new InternalServerErrorException();
    }

    delete presupuesto.usuario;
    return presupuesto;
  }
}
export const MODAL_SHOW_REQUESTED = 'MODAL_SHOW_REQUESTED';

export interface RequestShowModal {
    type: string;
    title: string;
    body: Record<string, any>;
    buttons: Function;
}

export const requestedShowModal = (title: string, body: Record<string, any>, buttons: Function): RequestShowModal => ({
    type: MODAL_SHOW_REQUESTED, body, buttons, title
});

export const MODAL_HIDE_REQUESTED = 'MODAL_HIDE_REQUESTED';

export const requestedHideModal = (): {type: string} => ({ type: MODAL_HIDE_REQUESTED });
'use strict';

function factorio(num: number) {
    let result: number = 1;
    for(let i: number = 1; i <= num; i++) {
        result = result * i;
    }
    return result;
}

let factorialTest: number = factorio(4);
console.log(factorialTest);
cla


ikke er offentlig. Be administratoren for organisasjonen om å tilordne deg en brukertype som omfatter Story Maps eller en tilleggslisens for Essential Apps."
    },
    "storyTellerUserType": {
      "notCreatorError": "Kontoen (%USER_NAME%) har ikke lisens til å bruke byggeverktøyene for klassiske Story Maps. Be administratoren for organisasjonen om å tilordne Creator-brukertypen til deg."
    }
  }
});define({
  "viewer": {
    "loading": {
      "step1": "CHARGEMENT DU RECIT",
      "step2": "CHARGEMENT DES DONNEES",
      "step3": "INITIALISATION DE LA VISITE",
      "loadBuilder": "PASSAGE EN MODE DE GENERATEUR",
      "redirectSignIn": "REDIRECTION VERS LA PAGE DE CONNEXION",
      "redirectSignIn2": "(vous serez redirigé vers cette page une fois connecté)",
      "fail": "Le chargement de Map Tour a échoué",
      "failButton": "Réessayez"
    },
    "errors": {
      "boxTitle": "Une erreur s’est produite",
      "portalSelf": "Erreur fatale : échec de l'obtention de la configuration du portail",
      "invalidConfig": "Erreur fatale : configuration non valide",
      "invalidConfigOwner": "Erreur fatale : configuration non valide (propriétaire autorisé requis)",
      "invalidConfigNoWebmap": "Erreur fatale : configuration non valide (identifiant de carte Web ou d'application non spécifié dans index.htm)",
      "invalidConfigNoAppDev": "Aucun identifiant d'application cartographique Web ni aucune carte Web n'est spécifié dans les paramètres de l'URL (?appid= ou ?webmap=). En mode de développement, la configuration d'appid et de webmap dans index.html est ignorée.",
      "createMap": "Impossible de créer la carte",
      "invalidApp": "Erreur fatale : impossible de charger le récit",
      "noLayer": "La carte Web ne contient pas de couche de données valide pour Map Tour.",
      "noLayerMobile": "Le générateur Map Tour n'est pas pris en charge avec cette taille d'affichage. Si possible, redimensionnez votre navigateur pour pouvoir accéder au générateur ou élaborez votre récit sur un appareil doté d'un écran plus grand.",
      "noLayerMobile2": "Veuillez tourner votre appareil en orientation paysage pour utiliser le générateur Map Tour.",
      "noLayerView": "Bienvenue dans l'application Web Map Tour.<br />Le récit n'est pas encore configuré.",
      "appSave": "Erreur d'enregistrement du récit",
      "mapSave": "Erreur d’enregistrement de la carte Web",
      "featureServiceLoad": "Erreur de chargement du service d'entités",
      "notAuthorized": "Vous n'êtes pas autorisé à accéder à ce récit.",
      "notAuthorizedBuilder": "Vous n'êtes pas autorisé à utiliser le générateur Map Tour.",
      "oldBrowserTitle": "Le navigateur n’est pas entièrement pris en charge",
      "noBuilderIE8": "Le générateur Map Tour n'est pas pris en charge avant la version 9 d'Internet Explorer.",
      "ie10Win7Explain": "Le générateur interactif Map Tour n’est pas pris en charge dans Internet Explorer 10 sous Windows 7 lorsque la source de données est un service d’


ull
    ): VKRequest<Int> = NewApiRequest("pages.save") {
        GsonHolder.gson.parse<Int>(it)
    }
    .apply {
        text?.let { addParam("text", it) }
        pageId?.let { addParam("page_id", it) }
        groupId?.let { addParam("group_id", it) }
        userId?.let { addParam("user_id", it) }
        title?.let { addParam("title", it) }
    }

    /**
     * Saves modified read and edit access settings for a wiki page.
     *
     * @param pageId - Wiki page ID.
     * @param groupId - ID of the community that owns the wiki page.
     * @param userId
     * @param view - Who can view the wiki page_ '1' - only community members, '2' - all users can
     * view the page, '0' - only community managers
     * @param edit - Who can edit the wiki page_ '1' - only community members, '2' - all users can
     * edit the page, '0' - only community managers
     * @return [VKRequest] with [Int]
     */
    fun pagesSaveAccess(
        pageId: Int,
        groupId: UserId? = null,
        userId: UserId? = null,
        view: PagesSaveAccessViewDto? = null,
        edit: PagesSaveAccessEditDto? = null
    ): VKRequest<Int> = NewApiRequest("pages.saveAccess") {
        GsonHolder.gson.parse<Int>(it)
    }
    .apply {
        addParam("page_id", pageId)
        groupId?.let { addParam("group_id", it) }
        userId?.let { addParam("user_id", it) }
        view?.let { addParam("view", it.value) }
        edit?.let { addParam("edit", it.value) }
    }

    object PagesParseWikiRestrictions {
        const val GROUP_ID_MIN: Long = 0
    }
}
/**
 * The MIT License (MIT)
 *
 * Copyright (c) 2019 vk.com
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
*/
// *********************************************************************
// THIS FILE IS AUTO GENERATED!
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING.
// *********************************************************************
package com.vk.sdk.api.board

import com.vk.api.sdk.requests.VKRequest
import com.vk.dto.common.id.UserId
import com.vk.sdk.api.GsonHolder
import com.vk.sdk.api.NewApiRequest
import com.vk.sdk.api.base.dto.BaseOkResponseDto
import com.vk.sdk.api.board.dto.BoardGetCommentsExtendedResponseDto
import com.vk.sdk.api.board.dto.BoardGetCommentsExtendedSortDto
import com.vk.sdk.api.board.dto


() {}

func (*opaqueExample_OneofConnectionId) isOpaqueExample_OneofField() {}

func (*opaqueExample_OneofSessionId) isOpaqueExample_OneofField() {}

func (*opaqueExample_OneofFixedSize) isOpaqueExample_OneofField() {}

func (*opaqueExample_OneofFixedLength) isOpaqueExample_OneofField() {}

func (*opaqueExample_OneofSfixedSize) isOpaqueExample_OneofField() {}

func (*opaqueExample_OneofSfixedLength) isOpaqueExample_OneofField() {}

func (*opaqueExample_OneofIsActive) isOpaqueExample_OneofField() {}

func (*opaqueExample_OneofData) isOpaqueExample_OneofField() {}

func (*opaqueExample_OneofAddress) isOpaqueExample_OneofField() {}

var File_test_opaque_opaque_proto protoreflect.FileDescriptor

const file_test_opaque_opaque_proto_rawDesc = "" +
	"\n" +
	"\x18test/opaque/opaque.proto\x12\vtest.opaque\x1a\x1bgoogle/protobuf/empty.proto\x1a!google/protobuf/go_features.proto\x1a\x1atemporal/v1/temporal.proto\x1a\x18test/opaque/common.proto\"\xe3\x0e\n" +
	"\rOpaqueExample\x12\x12\n" +
	"\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
	"\x05score\x18\x02 \x01(\x01R\x05score\x12\x16\n" +
	"\x06scores\x18\x03 \x03(\x01R\x06scores\x12\x14\n" +
	"\x05ratio\x18\x04 \x01(\x02R\x05ratio\x12\x16\n" +
	"\x06ratios\x18\x05 \x03(\x02R\x06ratios\x12\x10\n" +
	"\x03age\x18\x06 \x01(\x05R\x03age\x12\x12\n" +
	"\x04ages\x18\a \x03(\x05R\x04ages\x12\x0e\n" +
	"\x02id\x18\b \x01(\x03R\x02id\x12\x10\n" +
	"\x03ids\x18\t \x03(\x03R\x03ids\x12\x16\n" +
	"\x06emails\x18\n" +
	" \x03(\tR\x06emails\x12;\n" +
	"\x05extra\x18\v \x03(\v2%.test.opaque.OpaqueExample.ExtraEntryR\x05extra\x12+\n" +
	"\x06status\x18\f \x01(\x0e2\x13.test.opaque.StatusR\x06status\x12/\n" +
	"\bstatuses\x18\r \x03(\x0e2\x13.test.opaque.StatusR\bstatuses\x12\x12\n" +
	"\x04size\x18\x0e \x01(\rR\x04size\x12\x14\n" +
	"\x05sizes\x18\x0f \x03(\rR\x05sizes\x12\x16\n" +
	"\x06length\x1


for (var i = 0; i < resultTables.length; i++) {
                var resultTable = resultTables[i];
                if (!Srch.U.n(resultTable) && Srch.U.isTableTypeof(resultTable, Microsoft.SharePoint.Client.Search.Query.KnownTableTypes.relevantResults)) {
                    var resultRows = resultTable['ResultRows'];
                    if ($isEmptyArray(resultRows)) {
                        console.log('No info was returned');
                        break;
                    } else if (resultRows.length > 1) {
                        console.log('More than 1 result was returned. Only the first one will be used');
                    }

                    var htmlContent = '';
                    var totalFilled = 0;
                    var result = resultRows[0];
                    var propRow = '
{0}. 	{1}	{2}	{3}
';

                    var mpCount = 0;
                    for (var key in result) {
                        mpCount++;
                        // Check if object is not NULL
                        if (!Srch.U.n(result[key])) {
                            var objectType = Object.prototype.toString.call(result[key]);
                            if (objectType === "[object String]") {
                                // Check if string is not empty
                                if (!Srch.U.e(result[key])) {
                                    htmlContent += String.format(propRow, mpCount, key, objectType, $htmlEncode(result[key]));
                                    totalFilled++;
                                } else {
                                    htmlContent += String.format(propRow, mpCount, key, objectType, "EMPTY");
                                }
                            } else {
                                htmlContent += String.format(propRow, mpCount, key, objectType, result[key]);
                                totalFilled++;
                            }
                        } else {
                            htmlContent += String.format(propRow, mpCount, key, "NULL", "NULL");
                        }
                    }

                    var heading = totalFilled + ' from the ' + mpCount + ' properties contained a value';
                    var resultSectionContent = '
' + heading + '

	Property	Type	Value
' + htmlContent + '
';
                    resultSection.innerHTML = resultSectionContent;
                }
                else {
                    continue;
                }
            }
        }
    }

    function retrieveAllProperties(dataProvider) {
        // Retrieve all the managed properties for the item
        dataProvider.set_selectedRefiners([ managedProperties ]);

        // Do a new search query
        dataProvider.issueQuery();

        return;
    }
_#-->

<title>Two lines - Listname</title>


/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/moz2_slave/rel-m-beta-xr_w32_bld-00000000/build/editor/idl/nsIEditorObserver.idl
 */

#ifndef __gen_nsIEditorObserver_h__
#define __gen_nsIEditorObserver_h__

#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    nsIEditorObserver */
#define NS_IEDITOROBSERVER_IID_STR "e52a09fd-d33a-4f85-be0a-fbd348f0fa27"

#define NS_IEDITOROBSERVER_IID \
  {0xe52a09fd, 0xd33a, 0x4f85, \
    { 0xbe, 0x0a, 0xfb, 0xd3, 0x48, 0xf0, 0xfa, 0x27 }}

class NS_NO_VTABLE nsIEditorObserver : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IEDITOROBSERVER_IID)

  /* void EditAction (); */
  NS_IMETHOD EditAction(void) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIEditorObserver, NS_IEDITOROBSERVER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIEDITOROBSERVER \
  NS_IMETHOD EditAction(void);

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIEDITOROBSERVER(_to) \
  NS_IMETHOD EditAction(void) { return _to EditAction(); }

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIEDITOROBSERVER(_to) \
  NS_IMETHOD EditAction(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->EditAction(); }

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsEditorObserver : public nsIEditorObserver
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIEDITOROBSERVER

  nsEditorObserver();

private:
  ~nsEditorObserver();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsEditorObserver, nsIEditorObserver)

nsEditorObserver::nsEditorObserver()
{
  /* member initializers and constructor code */
}

nsEditorObserver::~nsEditorObserver()
{
  /* destructor code */
}

/* void EditAction (); */
NS_IMETHODIMP nsEditorObserver::EditAction()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#endif /* __gen_nsIEditorObserver_h__ */


viewerPerformanceWatchdogMixin.html">viewerPerformanceWatchdogMixin

ViewportQuad

Visibility

Visualizer

VRButton

VRButtonViewModel

VRTheWorldTerrainProvider

WallGeometry

WallGeometryUpdater

WallGraphics

WallOutlineGeometry

WebGLConstants

WebMapServiceImageryProvider

WebMapTileServiceImageryProvider

WebMercatorProjection

WebMercatorTilingScheme

WeightSpline

WindingOrder

writeTextToCanvas

<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>createGuid - Cesium Documentation</title>

    <link href="styles/jsdoc-default.css" rel="stylesheet">
    <link href="styles/prism.css" rel="stylesheet">

        createGuid

</di


\n  b\"        \",\n  filetype,\n  stn(info.get(\"linkname\",\"\"),100,encoding,errors),\n  info.get(\"magic\",POSIX_MAGIC),\n  stn(info.get(\"uname\",\"\"),32,encoding,errors),\n  stn(info.get(\"gname\",\"\"),32,encoding,errors),\n  devmajor,\n  devminor,\n  stn(info.get(\"prefix\",\"\"),155,encoding,errors)\n  ]\n  \n  buf=struct.pack(\"%ds\"%BLOCKSIZE,b\"\".join(parts))\n  chksum=calc_chksums(buf[-BLOCKSIZE:])[0]\n  buf=buf[:-364]+bytes(\"%06o\\0\"%chksum,\"ascii\")+buf[-357:]\n  return buf\n  \n @staticmethod\n def _create_payload(payload):\n  ''\n\n  \n  blocks,remainder=divmod(len(payload),BLOCKSIZE)\n  if remainder >0:\n   payload +=(BLOCKSIZE -remainder)*NUL\n  return payload\n  \n @classmethod\n def _create_gnu_long_header(cls,name,type,encoding,errors):\n  ''\n\n  \n  name=name.encode(encoding,errors)+NUL\n  \n  info={}\n  info[\"name\"]=\"././@LongLink\"\n  info[\"type\"]=type\n  info[\"size\"]=len(name)\n  info[\"magic\"]=GNU_MAGIC\n  \n  \n  return cls._create_header(info,USTAR_FORMAT,encoding,errors)+\\\n  cls._create_payload(name)\n  \n @classmethod\n def _create_pax_generic_header(cls,pax_headers,type,encoding):\n  ''\n\n\n  \n  \n  \n  binary=False\n  for keyword,value in pax_headers.items():\n   try:\n    value.encode(\"utf-8\",\"strict\")\n   except UnicodeEncodeError:\n    binary=True\n    break\n    \n  records=b\"\"\n  if binary:\n  \n   records +=b\"21 hdrcharset=BINARY\\n\"\n   \n  for keyword,value in pax_headers.items():\n   keyword=keyword.encode(\"utf-8\")\n   if binary:\n   \n   \n    value=value.encode(encoding,\"surrogateescape\")\n   else:\n    value=value.encode(\"utf-8\")\n    \n   l=len(keyword)+len(value)+3\n   n=p=0\n   while True:\n    n=l+len(str(p))\n    if n ==p:\n     break\n    p=n\n   records +=bytes(str(p),\"ascii\")+b\" \"+keyword+b\"=\"+value+b\"\\n\"\n   \n   \n   \n  info={}\n  info[\"name\"]=\"././@PaxHeader\"\n  info[\"type\"]=type\n  info[\"size\"]=len(records)\n  info[\"magic\"]=POSIX_MAGIC\n  \n  \n  return cls._create_header(info,USTAR_FORMAT,\"ascii\",\"replace\")+\\\n  cls._create_payload(records)\n  \n @classmethod\n def frombuf(cls,buf,encoding,errors):\n  ''\n  \n  if len(buf)==0:\n   raise EmptyHeaderError(\"empty header\")\n  if len(buf)!=BLOCKSIZE:\n   raise TruncatedHeaderError(\"truncated header\")\n  if buf.count(NUL)==BLOCKSIZE:\n   raise EOFHeaderError(\"end of file header\")\n   \n  chksum=nti(buf[148:156])\n  if chksum not in calc_chksums(buf):\


taEqual (k1, k2));
}

TEST (KeyDataEqualTest, IsFalseForDifferentValuedKeys)
{
	Key k1 = Key ("user:/test/config/key1", KEY_VALUE, "keyvalue1", KEY_END);
	Key k2 = Key ("user:/test/config/key2", KEY_VALUE, "keyvalue2", KEY_END);

	EXPECT_FALSE (keyDataEqual (k1, k2));
}

TEST (KeyDataEqualTest, IsFalseForDifferentTypedKeys)
{
	Key k1 = Key ("user:/test/config/key1", KEY_VALUE, "keyvalue1", KEY_END);
	Key k2 = Key ("user:/test/config/key2", KEY_VALUE, "keyvalue1", KEY_BINARY, KEY_END);

	EXPECT_FALSE (keyDataEqual (k1, k2));
}

TEST (KeyDataEqualTest, HandlesNullKeys)
{
	Key k1 = Key ("user:/test/config/key1", KEY_VALUE, "keyvalue1", KEY_END);
	Key nk = KeySet ().lookup ("invalid key");

	EXPECT_FALSE (keyDataEqual (k1, nk));
	EXPECT_FALSE (keyDataEqual (nk, k1));
	EXPECT_FALSE (keyDataEqual (nk, nk));
}

TEST (KeyMetaEqual, IsTrueForEmptyMeta)
{
	Key k1 = Key ("user:/test/config/key1", KEY_VALUE, "keyvalue1", KEY_END);
	Key k2 = Key ("user:/test/config/key2", KEY_VALUE, "keyvalue2", KEY_END);

	EXPECT_TRUE (keyMetaEqual (k1, k2));
}

TEST (KeyMetaEqual, IsTrueForEqualMeta)
{
	Key k1 = Key ("user:/test/config/key1", KEY_VALUE, "keyvalue1", KEY_META, "testmeta", "testmetavalue1", KEY_END);
	Key k2 = Key ("user:/test/config/key2", KEY_VALUE, "keyvalue1", KEY_META, "testmeta", "testmetavalue1", KEY_END);

	EXPECT_TRUE (keyMetaEqual (k1, k2));
}

TEST (KeyMetaEqual, IsFalseForDifferentMeta)
{
	Key k1 = Key ("user:/test/config/key1", KEY_VALUE, "keyvalue1", KEY_META, "testmeta", "testmetavalue1", KEY_END);
	Key k2 = Key ("user:/test/config/key2", KEY_VALUE, "keyvalue1", KEY_META, "testmeta", "testmetavalue2", KEY_END);

	EXPECT_FALSE (keyMetaEqual (k1, k2));
}

TEST (KeyMetaEqual, IsFalseForMissingMeta)
{
	Key k1 = Key ("user:/test/config/key1", KEY_VALUE, "keyvalue1", KEY_META, "testmeta", "testmetavalue1", KEY_END);
	Key k2 = Key ("user:/test/config/key2", KEY_VALUE, "keyvalue1", KEY_END);

	EXPECT_FALSE (keyMetaEqual (k1, k2));
	EXPECT_FALSE (keyMetaEqual (k2, k1));
}

TEST (KeyMetaEqual, HandlesNullKeys)
{
	Key k1 = Key ("user:/test/config/key1", KEY_VALUE, "keyvalue1", KEY_END);
	Key nk = KeySet ().lookup ("invalid key");

	EXPECT_FALSE (keyMetaEqual (k1, nk));
	EXPECT_FALSE (keyMetaEqual (nk, k1));
	EXPECT_FALSE (keyMetaEqual (nk, nk));
}
/**
 * @file
 *
 * @brief Tests for the key helper
 *
 * @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
 *
 */

#include <gtest/gtest.h>
#include <helper/keyhelper.hpp>

using namespace kdb;
using namespace kdb::tools::helper;

TEST (RebasePath, RebasesCorrectlyWithValidArguments)
{
	Key target = Key ("user:/test/configold/subdir/k1", KEY


 consumer with a worker thread simulating background tasks while interacting with the provider.
3. **[18_pubservice](./pubservice/)**: Public service provider with a worker thread for user input and attribute updates, all managed within the static model initialized at startup.

## Use Cases
- **Background Task Offloading**: Offload tasks such as device simulation or data processing to worker threads to keep main threads responsive.
- **Device Applications**: Handle long waits for user input or device events without blocking other service operations.
- **Distributed Service Management**: Enable seamless communication between distributed services and threads via Object RPC and IPC.
- **Event-Driven Architectures**: Demonstrates handling of user-triggered custom events in a multithreaded environment.

## Takeaway
The **18_pubworker** example shows how **Worker Threads**, combined with **Object RPC** and **IPC**, enable efficient background processing and event handling in **multithreaded, distributed service applications**, providing a template for scalable and responsive systems using the AREG SDK.
# 14_locmesh

🧵 **Type:** Multithreading / Single Process

## Overview
The **14_locmesh** project builds on [13_locsvc](./../13_locsvc), showing how to run **multiple instances** of the same **local service** in a **multithreaded environment**. Each instance operates in its own thread with a unique name, enabling efficient parallel processing and dynamic service interaction.

## Concepts Shown
- **Multiple Service Instances**: Create and manage multiple service instances, each with a unique name for precise identification.
- **Service Interface & Object RPC**: Use the Service Interface document and code generator to automate **Object RPC** messages for efficient inter-service communication.
- **Multithreading**: Each service instance runs in a separate thread, demonstrating parallel operation in a multithreaded system.
- **Service Provider and Consumer Interaction**: Services interact asynchronously, handling requests, responses, and events in real-time.
- **Application Lifecycle Management**: Observe how multiple service instances can be started, monitored, and terminated gracefully.

## How It Works
The project generates code from [HelloWorld.siml](./services/HelloWorld.siml) to define the service interface. Multiple service providers and consumers are instantiated in separate threads, each with a unique name. One instance acts as the *main* service (`MainService`). The application continues running until a quit message is sent, illustrating controlled lifecycle management in a multithreaded setup.

## Use Cases
- Parallel execution of **multiple service instances** within the same process.
- Dynamic **real-time communication** between service providers and consumers.
- Efficient **multithreaded workload distribution**, where each service handles tasks independently.
- Scalable **internal service management** in multithreaded applications.

## Takeaway
The **14_locmesh** example demonstrates managing **multiple local service instances** in a **multithreaded environment**, enabling developers to build scalable, high-performance applications with parallel service execution.
[![HACS Custom][hacs_shield]][hacs]
[![GitHub Latest Release][releases_shield]][latest_release]
[![GitHub All Releases][downloads_total_shield]][releases]
[![Buy me a coffee][buy_me_a_coffee_shield]][buy_me_a_coffee]
[![PayPal.Me][paypal_me_shield]]


a1)
label172:
	jr $ra
	nop
.p2align 2
.globl bgti2
bgti2:
	addiu $t0, $a0, -10
	blez $t0, label184
	nop
	sw $zero, 0($a1)
label184:
	jr $ra
	nop
.p2align 2
.globl bgt
bgt:
	subu $t0, $a0, $a1
	blez $t0, label196
	nop
	sw $zero, 0($a2)
label196:
	jr $ra
	nop
.p2align 2
.globl blez
blez:
	addiu $t0, $a0, -1
	bgez $t0, label208
	nop
	sw $zero, 0($a1)
label208:
	jr $ra
	nop
.p2align 2
.globl blei1
blei1:
	bgez $a0, label219
	nop
	sw $zero, 0($a1)
label219:
	jr $ra
	nop
.p2align 2
.globl blei2
blei2:
	addiu $t0, $a0, -11
	bgez $t0, label229
	nop
	sw $zero, 0($a1)
label229:
	jr $ra
	nop
.p2align 2
.globl ble
ble:
	subu $t0, $a0, $a1
	bgtz $t0, label240
	nop
	sw $zero, 0($a2)
label240:
	jr $ra
	nop
.p2align 2
.globl bfeq
bfeq:
	c.eq.s $f12, $f14
	li $t0, 1
	movf $t0, $zero, $fcc0
	beq $t0, $zero, label253
	nop
	sw $zero, 0($a2)
label253:
	jr $ra
	nop
.p2align 2
.globl bfne
bfne:
	c.eq.s $f12, $f14
	li $t0, 1
	movt $t0, $zero, $fcc0
	beq $t0, $zero, label264
	nop
	sw $zero, 0($a2)
label264:
	jr $ra
	nop
.p2align 2
.globl bflt
bflt:
	c.olt.s $f12, $f14
	li $t0, 1
	movf $t0, $zero, $fcc0
	beq $t0, $zero, label275
	nop
	sw $zero, 0($a2)
label275:
	jr $ra
	nop
.p2align 2
.globl bfle
bfle:
	c.ole.s $f12, $f14
	li $t0, 1
	movf $t0, $zero, $fcc0
	beq $t0, $zero, label286
	nop
	sw $zero, 0($a2)
label286:
	jr $ra
	nop
.p2align 2
.globl bfge
bfge:
	c.ult.s $f12, $f14
	li $t0, 1
	movt $t0, $zero, $fcc0
	beq $t0, $zero, label297
	nop
	sw $zero, 0($a2)
label297:
	jr $ra
	nop
.p2align 2
.globl bfgt
bfgt:
	c.ule.s $f12, $f14
	li $t0, 1
	movt $t0, $zero, $fcc0
	beq $t0, $zero, label308
	nop
	sw $zero, 0($a2)
label308:
	jr $ra
	nop
.p2align 2
.globl normal_srem
normal_srem:


  var styleSets = [];\n\n  for (var _i = 0; _i < arguments.length; _i++) {\n    styleSets[_i] = arguments[_i];\n  }\n\n  if (styleSets && styleSets.length === 1 && styleSets[0] && !styleSets[0].subComponentStyles) {\n    return styleSets[0];\n  }\n\n  var mergedSet = {}; // We process sub component styles in two phases. First we collect them, then we combine them into 1 style function.\n\n  var workingSubcomponentStyles = {};\n\n  for (var _a = 0, styleSets_1 = styleSets; _a < styleSets_1.length; _a++) {\n    var currentSet = styleSets_1[_a];\n\n    if (currentSet) {\n      for (var prop in currentSet) {\n        if (currentSet.hasOwnProperty(prop)) {\n          if (prop === 'subComponentStyles' && currentSet.subComponentStyles !== undefined) {\n            // subcomponent styles - style functions or objects\n            var currentComponentStyles = currentSet.subComponentStyles;\n\n            for (var subCompProp in currentComponentStyles) {\n              if (currentComponentStyles.hasOwnProperty(subCompProp)) {\n                if (workingSubcomponentStyles.hasOwnProperty(subCompProp)) {\n                  workingSubcomponentStyles[subCompProp].push(currentComponentStyles[subCompProp]);\n                } else {\n                  workingSubcomponentStyles[subCompProp] = [currentComponentStyles[subCompProp]];\n                }\n              }\n            }\n\n            continue;\n          } // the as any casts below is a workaround for ts 2.8.\n          // todo: remove cast to any in ts 2.9.\n\n\n          var mergedValue = mergedSet[prop];\n          var currentValue = currentSet[prop];\n\n          if (mergedValue === undefined) {\n            mergedSet[prop] = currentValue;\n          } else {\n            mergedSet[prop] = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spreadArrays\"])(Array.isArray(mergedValue) ? mergedValue : [mergedValue], Array.isArray(currentValue) ? currentValue : [currentValue]);\n          }\n        }\n      }\n    }\n  }\n\n  if (Object.keys(workingSubcomponentStyles).length > 0) {\n    mergedSet.subComponentStyles = {};\n    var mergedSubStyles = mergedSet.subComponentStyles;\n\n    var _loop_1 = function _loop_1(subCompProp) {\n      if (workingSubcomponentStyles.hasOwnProperty(subCompProp)) {\n        var workingSet_1 = workingSubcomponentStyles[subCompProp];\n\n        mergedSubStyles[subCompProp] = function (styleProps) {\n          return concatStyleSets.apply(void 0, workingSet_1.map(function (styleFunctionOrObject) {\n            return typeof styleFunctionOrObject === 'function' ? styleFunctionOrObject(styleProps) : styleFunctionOrObject;\n          }));\n        };\n      }\n    }; // now we process the subcomponent styles if there are any\n\n\n    for (var subCompProp in workingSubcomponentStyles) {\n      _loop_1(subCompProp);\n    }\n  }\n\n  return mergedSet;\n}\n\n//# sourceURL=webpack://pcf_tools_652ac3f36e1e4bca82eb3c1dc44e6fad/./node_modules/@uifabric/merge-styles/lib/concatStyleSets.js?");

/***/ }),

/***/ "./node_modules/@uifabric/merge-styles/lib/concatStyleSetsWithProps.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@uifabric/merge-styles/lib/concatStyleSetsWithProps.js ***!
  \********************************************


shru(g,32);if(Long_ne(k,Long_ZERO))j=32;else k=g;l=Long_shru(k,16);if(Long_eq(l,Long_ZERO))l=k;else j=j|16;k=Long_shru(l,8);if(Long_eq(k,Long_ZERO))k
=l;else j=j|8;l=Long_shru(k,4);if(Long_eq(l,Long_ZERO))l=k;else j=j|4;k=Long_shru(l,2);if(Long_eq(k,Long_ZERO))k=l;else j=j|2;if(Long_ne(Long_shru(k,1),Long_ZERO))j=j|1;b=(64-j|0)-1|0;}b=(((64-b|0)+c|0)-1|0)/c|0;m=$rt_createCharArray(b);n=m.data;l=Long_fromInt(T(b-1|0,c));b=0;o=Long_fromInt(c);while(Long_ge(l,Long_ZERO)){j=b+1|0;n[b]=MK(Long_shru(g,l.lo).lo&i,h);l=Long_sub(l,o);b=j;}f=LD(m);}}p=new Z;Y(p);if(a.ir&4){q=c!=4?B(107):B(1923);e=new Z;Y(e);O(e,q);O(e,f);f=X(e);}a:{if(a.ir&32){h=Bp(f);while(true){if
(h>=a.ue)break a;C_(p,MK(0,10));h=h+1|0;}}}O(p,f);Ow(a,d,X(p));}
function AJu(a){var b,c,d;if(a.ir&8&&a.ir&16)V(Cy1(B(1924)));if(a.ir&32&&a.ir&1)V(Cy1(B(1925)));if(a.uD>=0)V(ChO(a.uD));if(a.ir&1&&a.ue<0){b=new AH8;c=B3(a.hM,a.a93,a.fL);d=new Z;Y(d);O(d,B(1926));O(d,c);BG(b,X(d));b.bpI=c;V(b);}}
function Ow(a,b,c){if(a.uD>0)c=B3(c,0,a.uD);if(b)c=AXo(c);if(!(a.ir&1)){AO7(a,c);IJ(a.Er,c);}else{IJ(a.Er,c);AO7(a,c);}}
function AD8(a,b){Uw(a,b,263);}
function Uw(a,b,c){var d,e,f;if((a.ir|c)==c)return;d=new AXF;e=PR(Bw(B(1927),RB(a.ir&(c^(-1)))));f=new Z;Y(f);O(f,B(1928));O(f,e);O(f,B(1929));C_(f,b);BG(d,X(f));d.bll=e;d.btd=b;V(d);}
function AO7(a,b){var c,d,e;if(a.ue>Bp(b)){c=a.ue-Bp(b)|0;d=new Z;Q9(d,c);e=0;while(e<c){C_(d,32);e=e+1|0;}IJ(a.Er,d);}}
function BlY(a){var b,c,d,e,f;a.ir=0;a.qA=(-1);a.ue=(-1);a.uD=(-1);b=Bw(a.hM,a.fL);if(b!=48&&AEs


tps://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM
  /// in the Amazon EC2 User Guide.
  ///
  /// Parameter [uefiData] :
  /// Base64 representation of the non-volatile UEFI variable store. To retrieve
  /// the UEFI data, use the GetInstanceUefiData
  /// command. You can inspect and modify the UEFI data by using the python-uefivars tool
  /// on GitHub. For more information, see UEFI
  /// Secure Boot in the Amazon EC2 User Guide.
  ///
  /// Parameter [virtualizationType] :
  /// The type of virtualization (hvm | paravirtual).
  ///
  /// Default: paravirtual
  Future<RegisterImageResult> registerImage({
    required String name,
    ArchitectureValues? architecture,
    List<String>? billingProducts,
    List<BlockDeviceMapping>? blockDeviceMappings,
    BootModeValues? bootMode,
    String? description,
    bool? dryRun,
    bool? enaSupport,
    String? imageLocation,
    ImdsSupportValues? imdsSupport,
    String? kernelId,
    String? ramdiskId,
    String? rootDeviceName,
    String? sriovNetSupport,
    List<TagSpecification>? tagSpecifications,
    TpmSupportValues? tpmSupport,
    String? uefiData,
    String? virtualizationType,
  }) async {
// TODO: implement ec2
    throw UnimplementedError();
  }

  /// Registers a set of tag keys to include in scheduled event notifications
  /// for your resources.
  ///
  /// To remove tags, use DeregisterInstanceEventNotificationAttributes.
  ///
  /// Parameter [instanceTagAttribute] :
  /// Information about the tag keys to register.
  ///
  /// Parameter [dryRun] :
  /// Checks whether you have the required permissions for the action, without
  /// actually making the request, and provides an error response. If you have
  /// the required permissions, the error response is
  /// DryRunOperation. Otherwise, it is
  /// UnauthorizedOperation.
  Future<RegisterInstanceEventNotificationAttributesResult>
      registerInstanceEventNotificationAttributes({
    required RegisterInstanceTagAttributeRequest instanceTagAttribute,
    bool? dryRun,
  }) async {
// TODO: implement ec2
    throw UnimplementedError();
  }

  /// Registers members (network interfaces) with the transit gateway multicast
  /// group. A member is a network interface associated with a supported EC2
  /// instance that receives multicast traffic. For more information, see Multicast
  /// on transit gateways in the Amazon Web Services Transit Gateways
  /// Guide.
  ///
  /// After you add the members, use SearchTransitGatewayMulticastGroups
  /// to verify that the members were added to the transit gateway multicast
  /// group.
  ///
  /// Parameter [networkInterfaceIds] :
  /// The group members' network


draggable,
    }
  }
}

export type GetStageProperty = () => Readonly<StageProperty>

interface StageProperty {
  width: number
  height: number
  draggable: boolean
}

export const createStage = (el: string, config?: Partial<StageProperty>): Stage => {
  const canvas = document.querySelector(el)
  if (!(canvas instanceof HTMLCanvasElement)) {
    throw new Error(`${el} is not a canvas`)
  }
  if (config == undefined) {
    config = {}
  }
  const { width = 300, height = 150, draggable = false } = config
  canvas.width = width
  canvas.height = height
  return new Stage(canvas, {
    width,
    height,
    draggable,
  })
}
import NullFunc from "../DataTypes/Functions/NullFunc";

/**
 * The main game loop of the game. Keeps track of fps and handles scheduling of updates and rendering.
 * This class is left abstract, so that a subclass can handle exactly how the loop is scheduled.
 * For an example of different types of game loop scheduling, check out @link(Game Programming Patterns)(https://gameprogrammingpatterns.com/game-loop.html)
 */
export default abstract class GameLoop {

	/** The function to call when an update occurs */
	protected _doUpdate: Function = NullFunc;

	set doUpdate(update: Function){
		this._doUpdate = update;
	}

	/** The function to call when a render occurs */
	protected _doRender: Function = NullFunc;

	set doRender(render: Function){
		this._doRender = render;
	}

	/**
	 * Retrieves the current FPS of the game
	 */
	abstract getFPS(): number;

	/**
     * Starts up the game loop
     */
	abstract start(): void;

	/**
	 * Pauses the game loop, usually for an error condition.
	 */
	abstract pause(): void;

	/**
	 * Resumes the game loop.
	 */
	abstract resume(): void;

	/**
	 * Runs the first frame of the game. No update occurs here, only a render.
	 * This is needed to initialize delta time values
	 * @param timestamp The timestamp of the frame. This is received from the browser
	 */
	protected abstract doFirstFrame(timestamp: number): void;

	/**
	 * Run before any updates or the render of a frame.
	 * @param timestamp The timestamp of the frame. This is received from the browser
	 */
	protected abstract startFrame(timestamp: number): void;

	/**
	 * The core of the frame, where any necessary updates occur, and where a render happens
	 * @param timestamp The timestamp of the frame. This is received from the browser
	 */
	protected abstract doFrame(timestamp: number): void;

	/**
	 * Wraps up the frame
	 * @param panic Whether or not the update cycle panicked. This happens when too many updates try to happen in a single frame
	 */
	protected abstract finishFrame(panic: boolean): void;
}
class Disposable {
    isDisposed: boolean;
    dispose() {
        this.isDisposed = true;
    }
}

declare var global;
declare var console;

class Activatable {
    isActivate: boolean;
    activate() {
        this.isActivate = true;
    }
    deactivate() {
        this.isActivate = false;
    }
}

export class SmartObject {
    constructor() {
        global.setInterval(() => console.log(this.isActivate + " : " + this.isDisposed), 500);
    }
    interact(){
        this.activate();
    }
}

export interface SmartObject extends Disposable,


       }
      }
    }
  }

  /**
   * A list of iTunes Store item identifiers for the associated apps.
   * Only one item in the list is used—the first item identifier for an app
   * compatible with the current device.
   * If the app is not installed, the link opens the App Store and shows the app.
   * If the app is already installed, the link launches the app.
   */
  get associatedStoreIdentifiers(): ApplePass['associatedStoreIdentifiers'] {
    return this.fields.associatedStoreIdentifiers;
  }
  set associatedStoreIdentifiers(v: ApplePass['associatedStoreIdentifiers']) {
    if (!v) {
      delete this.fields.associatedStoreIdentifiers;
      return;
    }
    const arrayOfNumbers = v.filter(n => Number.isInteger(n));
    if (arrayOfNumbers.length > 0)
      this.fields.associatedStoreIdentifiers = arrayOfNumbers;
    else delete this.fields.associatedStoreIdentifiers;
  }

  /**
   * Brief description of the pass, used by the iOS accessibility technologies.
   * Don’t try to include all of the data on the pass in its description,
   * just include enough detail to distinguish passes of the same type.
   */
  get description(): string | undefined {
    return this.fields.description;
  }

  set description(v: string | undefined) {
    if (!v) delete this.fields.description;
    else this.fields.description = v;
  }

  /**
   * Display name of the organization that originated and signed the pass.
   */
  get organizationName(): string | undefined {
    return this.fields.organizationName;
  }
  set organizationName(v: string | undefined) {
    if (!v) delete this.fields.organizationName;
    else this.fields.organizationName = v;
  }

  /**
   * Optional for event tickets and boarding passes; otherwise not allowed.
   * Identifier used to group related passes.
   * If a grouping identifier is specified, passes with the same style,
   * pass type identifier, and grouping identifier are displayed as a group.
   * Otherwise, passes are grouped automatically.
   * Use this to group passes that are tightly related,
   * such as the boarding passes for different connections of the same trip.
   */
  get groupingIdentifier(): string | undefined {
    return this.fields.groupingIdentifier;
  }

  set groupingIdentifier(v: string | undefined) {
    if (!v) delete this.fields.groupingIdentifier;
    else this.fields.groupingIdentifier = v;
  }

  /**
   * If true, the strip image is displayed without a shine effect.
   * The default value prior to iOS 7.0 is false.
   * In iOS 7.0, a shine effect is never applied, and this key is deprecated.
   */
  get suppressStripShine(): boolean {
    return !!this.fields.suppressStripShine;
  }
  set suppressStripShine(v: boolean) {
    if (!v) delete this.fields.suppressStripShine;
    else this.fields.suppressStripShine = true;
  }

  /**
   * Text displayed next to the logo on the pass.
   */
  get logoText(): string | undefined {
    return this.fields.logoText;
  }
  set logoText(v: string | undefined) {
    if (!v) delete this.fields.logoText;
    else this.fields.logoText = v;
  }

  /**
   * The URL of a web service that conforms to the API described in PassKit Web Service Reference.
   * The web service must use the HTTPS protocol; the leading https:// is included in the value of this key.
   * On devices configured for development, there is UI in Settings to allow HTTP web services.
   *
   * @see {@link https://developer.apple.com/library/archive/documentation/PassKit/Reference/PassKit_WebService/WebService.html#//apple_ref/doc/uid/TP40011988}
   */


FBF_EBPFBE_INSN_JSGE32RBE, BPFBF_EBPFBE_INSN_JSLTIBE
 , BPFBF_EBPFBE_INSN_JSLTRBE, BPFBF_EBPFBE_INSN_JSLT32IBE, BPFBF_EBPFBE_INSN_JSLT32RBE, BPFBF_EBPFBE_INSN_JSLEIBE
 , BPFBF_EBPFBE_INSN_JSLERBE, BPFBF_EBPFBE_INSN_JSLE32IBE, BPFBF_EBPFBE_INSN_JSLE32RBE, BPFBF_EBPFBE_INSN_CALLBE
 , BPFBF_EBPFBE_INSN_JA, BPFBF_EBPFBE_INSN_EXIT, BPFBF_EBPFBE_INSN_XADDDWBE, BPFBF_EBPFBE_INSN_XADDWBE
 , BPFBF_EBPFBE_INSN_BRKPT, BPFBF_EBPFBE_INSN__MAX
} BPFBF_EBPFBE_INSN_TYPE;

/* Enum declaration for semantic formats in cpu family bpfbf.  */
typedef enum bpfbf_ebpfbe_sfmt_type {
  BPFBF_EBPFBE_SFMT_EMPTY, BPFBF_EBPFBE_SFMT_ADDIBE, BPFBF_EBPFBE_SFMT_ADDRBE, BPFBF_EBPFBE_SFMT_NEGBE
 , BPFBF_EBPFBE_SFMT_MOVIBE, BPFBF_EBPFBE_SFMT_MOVRBE, BPFBF_EBPFBE_SFMT_ENDLEBE, BPFBF_EBPFBE_SFMT_LDDWBE
 , BPFBF_EBPFBE_SFMT_LDABSW, BPFBF_EBPFBE_SFMT_LDABSH, BPFBF_EBPFBE_SFMT_LDABSB, BPFBF_EBPFBE_SFMT_LDABSDW
 , BPFBF_EBPFBE_SFMT_LDINDWBE, BPFBF_EBPFBE_SFMT_LDINDHBE, BPFBF_EBPFBE_SFMT_LDINDBBE, BPFBF_EBPFBE_SFMT_LDINDDWBE
 , BPFBF_EBPFBE_SFMT_LDXWBE, BPFBF_EBPFBE_SFMT_LDXHBE, BPFBF_EBPFBE_SFMT_LDXBBE, BPFBF_EBPFBE_SFMT_LDXDWBE
 , BPFBF_EBPFBE_SFMT_STXWBE, BPFBF_EBPFBE_SFMT_STXHBE, BPFBF_EBPFBE_SFMT_STXBBE, BPFBF_EBPFBE_SFMT_STXDWBE
 , BPFBF_EBPFBE_SFMT_STBBE, BPFBF_EBPFBE_SFMT_STHBE, BPFBF_EBPFBE_SFMT_STWBE, BPFBF_EBPFBE_SFMT_STDWBE
 , BPFBF_EBPFBE_SFMT_JEQIBE, BPFBF_EBPFBE_SFMT_JEQRBE, BPFBF_EBPFBE_SFMT_CALLBE, BPFBF_EBPFBE_SFMT_JA
 , BPFBF_EBPFBE_SFMT_EXIT, BPFBF_EBPFBE_SFMT_XADDDWBE, BPFBF_EBPFBE_SFMT_XADDWBE
} BPFBF_EBPFBE_SFMT_TYPE;

/* Function unit handlers (user written).  */

extern int bpfbf_model_bpf_def_u_exec (SIM_CPU *, const IDESC *, int /*unit_num*/, int /*referenced*/);

/* Profiling before/after handlers (user written) */

extern void bpfbf_model_insn_before (SIM_CPU *, int /*first_p*/);
extern void bpfbf_model_insn_after (SIM_CPU *, int /*last_p*/, int /*cycles*/);

#endif /* BPFBF_EBPFBE_DECODE_H */


local dungeonIndex = 8
local nerfMultiplier = 1
local pi = math.pi
local MDT = DungeonTools
MDT.dungeonTotalCount[dungeonIndex] = {normal=220,teeming=264,teemingEnabled=true}
MDT.dungeonBosses[dungeonIndex] = {
	[1] = {
		[1] = {
            ["name"] = "Rokmora",
            ["health"] = 111016239,
            ["encounterID"] = 1662,
            ["level"] = 112,
            ["creatureType"] = "Humanoid",
            ["id"] = 91003,
            ["displayId"] = 62386,
            ["x"] = 546.37050528437,
            ["y"] = -264.71098828197,
        },
		[2] = {
            ["name"] = "Ularogg Cragshaper",
            ["health"] = 111016239,
            ["encounterID"] = 1665,
            ["level"] = 112,
            ["creatureType"] = "Humanoid",
            ["id"] = 91004,
            ["displayId"] = 62390,
            ["x"] = 371.04740005228,
            ["y"] = -273.4195650778,
        },
		[4] = {
            ["name"] = "Dargrul",
            ["health"] = 117360016,
            ["encounterID"] = 1687,
            ["level"] = 112,
            ["creatureType"] = "Humanoid",
            ["id"] = 91007,
            ["displayId"] = 62392,
            ["x"] = 144.09787242713,
            ["y"] = -351.16211884498,
        },
	},
}
MDT.dungeonEnemies[dungeonIndex] = {
	[1] = {
		["name"] = "Vileshard Crawler",
		["health"] = 5129757,
		["level"] = 110,
		["creatureType"] = "Beast",
		["id"] = 96247,
		["displayId"] = 34068,
		["count"] = 1,
		["scale"] = 0.6,
		["color"] = {r=1,g=1,b=1,a=0.8},
		["clones"] = {
			[1] = {x = 717.09134241334,y = -261.84308854674,sublevel=1,g=1},
			[2] = {x = 710.27318313106,y = -263.12628555504,sublevel=1,g=1},
			[3] = {x = 702.54592379259,y = -266.07396660688,sublevel=1,g=1},
			[4] = {x = 695.72766909221,y = -259.53370560421,sublevel=1,g=1},
			[5] = {x = 708.00044261849,y = -238.17005808326,sublevel=1,g=1},
			[6] = {x = 702.54580811566,y = -239.45084784337,sublevel=1,g=1},
			[7] = {x = 695.72766909221,y = -244.07914958816,sublevel=1,g=1},
			[8] = {x = 688.45486759323,y = -242.17813735154,sublevel=1,g=1},
			[9] = {x = 680.2730966036,y = -239.90543835985,sublevel=1,g=1},

			[10] = {x


 8 0 00-16 0v40H96a8 8 0 00-7.4 4.9 8.4 8.4 0 001.7 8.8l32 32a8.2 8.2 0 0011.4 0l32-32a8.4 8.4 0 001.7-8.8 8 8 0 00-7.4-4.9Z"/></svg>';
  static const String arrows_out_line_vertical_light =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path fill="currentColor" d="M222 128a6 6 0 01-6 6H40a6 6 0 010-12h176a6 6 0 016 6ZM100.2 52.2 122 30.5V96a6 6 0 0012 0V30.5l21.8 21.7a5.9 5.9 0 108.4-8.4l-32-32a5.8 5.8 0 00-8.4 0l-32 32a5.9 5.9 0 008.4 8.4Zm55.6 151.6L134 225.5V160a6 6 0 00-12 0v65.5l-21.8-21.7a5.9 5.9 0 00-8.4 8.4l32 32a5.8 5.8 0 008.4 0l32-32a5.9 5.9 0 00-8.4-8.4Z"/></svg>';
  static const String arrows_out_line_vertical_thin =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path fill="currentColor" d="M220 128a4 4 0 01-4 4H40a4 4 0 010-8h176a4 4 0 014 4ZM98.8 50.8 124 25.7V96a4 4 0 008 0V25.7l25.2 25.1a3.9 3.9 0 005.6 0 3.9 3.9 0 000-5.6l-32-32a3.9 3.9 0 00-5.6 0l-32 32a4 4 0 005.6 5.6Zm58.4 154.4L132 230.3V160a4 4 0 00-8 0v70.3l-25.2-25.1a4 4 0 00-5.6 5.6l32 32a3.9 3.9 0 005.6 0l32-32a4 4 0 00-5.6-5.6Z"/></svg>';
  static const String arrows_out_simple =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path fill="currentColor" d="M216 48v48a8 8 0 01-16 0V67.3l-42.3 42.4a8.2 8.2 0 01-11.4 0 8.1 8.1 0 010-11.4L188.7 56H160a8 8 0 010-16h48a8 8 0 018 8ZM98.3 146.3 56 188.7V160a8 8 0 00-16 0v48a8 8 0 008 8h48a8 8 0 000-16H67.3l42.4-42.3a8.1 8.1 0 00-11.4-11.4Z"/></svg>';
  static const String arrows_out_simple_bold =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256" preserveAspectRatio="xMidYMid meet" viewBox="0 0


      options.update(SplitModuleTest.MODULESTORE['OPTIONS'])
        options['render_template'] = render_to_template_mock

        # lint-amnesty, pylint: disable=bad-option-value, star-args
        SplitModuleTest.modulestore = class_(
            None,  # contentstore
            SplitModuleTest.MODULESTORE['DOC_STORE_CONFIG'],
            **options
        )

        SplitModuleTest.bootstrapDB(SplitModuleTest.modulestore)

    return SplitModuleTest.modulestore

# pylint: disable=unused-argument
def render_to_template_mock(*args):
    pass


from dataclasses import dataclass,field

@dataclass
class data:
    afabeto = [
            {"word": "a", "value": 0},
            {"word": "b", "value": 0},
            {"word": "c", "value": 0},
            {"word": "d", "value": 0},
            {"word": "e", "value": 0},
            {"word": "f", "value": 0},
            {"word": "g", "value": 0},
            {"word": "h", "value": 0},
            {"word": "i", "value": 0},
            {"word": "j", "value": 0},
            {"word": "k", "value": 0},
            {"word": "l", "value": 0},
            {"word": "m", "value": 0},
            {"word": "n", "value": 0},
            {"word": "o", "value": 0},
            {"word": "p", "value": 0},
            {"word": "q", "value": 0},
            {"word": "r", "value": 0},
            {"word": "s", "value": 0},
            {"word": "t", "value": 0},
            {"word": "u", "value": 0},
            {"word": "v", "value": 0},
            {"word": "w", "value": 0},
            {"word": "x", "value": 0},
            {"word": "y", "value": 0},
            {"word": "z", "value": 0},
        ]

    select_word: list[str] = field(default_factory=list)


etProcAddress((const GLubyte*)"glUniform1iARB")) == NULL) || r;
  r = ((glUniform1ivARB = (PFNGLUNIFORM1IVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform1ivARB")) == NULL) || r;
  r = ((glUniform2fARB = (PFNGLUNIFORM2FARBPROC)glewGetProcAddress((const GLubyte*)"glUniform2fARB")) == NULL) || r;
  r = ((glUniform2fvARB = (PFNGLUNIFORM2FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform2fvARB")) == NULL) || r;
  r = ((glUniform2iARB = (PFNGLUNIFORM2IARBPROC)glewGetProcAddress((const GLubyte*)"glUniform2iARB")) == NULL) || r;
  r = ((glUniform2ivARB = (PFNGLUNIFORM2IVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform2ivARB")) == NULL) || r;
  r = ((glUniform3fARB = (PFNGLUNIFORM3FARBPROC)glewGetProcAddress((const GLubyte*)"glUniform3fARB")) == NULL) || r;
  r = ((glUniform3fvARB = (PFNGLUNIFORM3FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform3fvARB")) == NULL) || r;
  r = ((glUniform3iARB = (PFNGLUNIFORM3IARBPROC)glewGetProcAddress((const GLubyte*)"glUniform3iARB")) == NULL) || r;
  r = ((glUniform3ivARB = (PFNGLUNIFORM3IVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform3ivARB")) == NULL) || r;
  r = ((glUniform4fARB = (PFNGLUNIFORM4FARBPROC)glewGetProcAddress((const GLubyte*)"glUniform4fARB")) == NULL) || r;
  r = ((glUniform4fvARB = (PFNGLUNIFORM4FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform4fvARB")) == NULL) || r;
  r = ((glUniform4iARB = (PFNGLUNIFORM4IARBPROC)glewGetProcAddress((const GLubyte*)"glUniform4iARB")) == NULL) || r;
  r = ((glUniform4ivARB = (PFNGLUNIFORM4IVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform4ivARB")) == NULL) || r;
  r = ((glUniformMatrix2fvARB = (PFNGLUNIFORMMATRIX2FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix2fvARB")) == NULL) || r;
  r = ((glUniformMatrix3fvARB = (PFNGLUNIFORMMATRIX3FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix3fvARB")) == NULL) || r;
  r = ((glUniformMatrix4fvARB = (PFNGLUNIFORMMATRIX4FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix4fvARB")) == NULL) || r;
  r = ((glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glUseProgramObjectARB")) == NULL) || r;
  r = ((glValidateProgramARB = (PFNGLVALIDATEPROGRAMARBPROC)glewGetProcAddress((const GLubyte*)"glValidateProgramARB")) == NULL) || r;

  return r;
}

#endif /* GL_ARB_shader_objects */

#ifdef GL_ARB_shader_precision

#endif /* GL_ARB_shader_precision */

#ifdef GL_ARB_shader_stencil_export

#endif /* GL_ARB_shader_stencil_export */


ntainer(key, { date_histogram: assign({ field }, options) }, childAggs)
}
//sintaxis

class Rectangulo{
    private ancho: number;
    private alto:number;
    //debemostener un contructor o no vamos a poder instanciar un objeto
    //otro metodo de declara una variable privada, es proximas versiones en js ya no se podra acceder
    //#area: number;
    private _nombre: string = " ";

    constructor(ancho: number, alto: number){
        this.ancho = ancho;
        this.alto = alto;
    }

    get area(){ //es una funcion por dentro pero por fuera es un atributo
        return this.ancho * this.alto;
    }

    perimetro(){
        return this.ancho * 2 + this.alto * 2;
    }

    get nombre(){
        return this._nombre;
    }

    set nombre(value: string){
        this._nombre = value;
    }

}
//se tipa para que pueda reconocer los atributos del objeto
//instanciar

let r1 = new Rectangulo(4,3);
let r2 = new Rectangulo(5,3);
console.log(r1.area);
console.log(r2.perimetro());
r1.nombre = "A";

//personalmento no recomiendo el uso de get y set en objetos solo en estrucutras de datos para profindurizar revisar clean code el capitulo de clases

//con private podemos limitar el accesso a esos atributos, metodos, funciones a solo la clase y ano desde afuera.

//readonly ts vigila si se hace un cambio en dicho atributo o funcion en java es conocido como final, no se debe mezclar con private o podemos crear atributos que nose modifican ni el propia clase

//podemos usar getters y setters es una funcion que devuelve un atributo, podemos pedir su valor y establecerloimport {
  ModelElement,
  OntoumlElement,
  OntoumlType,
  ElementView,
  Class,
  Generalization,
  GeneralizationSet,
  Package,
  Relation,
  ClassView,
  GeneralizationSetView,
  GeneralizationView,
  PackageView,
  RelationView
} from '..';
import { Path } from './path';
import { Rectangle } from './rectangle';
import { Shape } from './shape';
import { Text } from './text';

export class Diagram extends OntoumlElement {
  owner: ModelElement;
  contents: ElementView<any, any>[];

  constructor(base?: Partial<Diagram>) {
    super(OntoumlType.DIAGRAM, base);
    this.owner = base?.owner || null;
    this.contents = base?.contents || [];
  }

  getContents(): OntoumlElement[] {
    return [...this.contents];
  }

  getClassViews(): ClassView[] {
    return this.contents?.filter(view => view instanceof ClassView) as ClassView[];
  }

  getRelationViews(): RelationView[] {
    return this.contents?.filter(view => view instanceof RelationView) as RelationView[];
  }

  getGeneralizationViews(): GeneralizationView[] {
    return this.contents?.filter(view => view instanceof GeneralizationView) as GeneralizationView[];
  }

  getGeneralizationSetViews(): GeneralizationSetView[] {
    return this.contents?.filter(view => view instanceof GeneralizationSetView) as GeneralizationSetView[];
  }

  getPackageViews(): PackageView[] {
    return this.contents?.filter(view => view instanceof PackageView) as PackageView[];
  }

  getRealizedModelElements(): ModelElement[] {
    return this.contents.map(view => view.modelElement);
  }

  getShapes(): Shape[] {
    return this.contents?.map(view => view.shape) || [];


ace BasePageFrontMatter extends PageFrontmatter {
  /**
   * Page icon
   *
   * 页面图标
   */
  icon?: string;

  /**
   * Page Author(s)
   *
   * 页面作者
   */
  author?: Author | false;

  /**
   * Writing Date
   *
   * 写作日期
   */
  date?: Date | string;

  /**
   * Page Category(ies)
   *
   * 页面分类
   */
  category?: string | string[];

  /**
   * Page Tag(s)
   *
   * 页面标签
   */
  tag?: string[] | string;

  /**
   * Whether the content is original
   *
   * 是否原创
   */
  isOriginal?: boolean;

  /**
   * Whether the page is an article
   *
   * 页面是否是文章
   */
  article?: boolean;

  /**
   * Page Cover
   *
   * 页面封面
   */
  cover?: string;

  /**
   * Page Banner
   *
   * 页面 Banner 图
   */
  banner?: string;

  /**
   * Footer text
   *
   * 页脚文字
   */
  footer?: string | boolean;

  /**
   * Copyright text
   *
   * 版权文字
   */
  copyright?: string | false;

  /**
   * Whether is home page
   *
   * 是否是主页
   */
  home?: boolean;

  /**
   * @deprecated use `date` instead
   */
  time?: Date | string;

  /**
   * @deprecated use `category` instead
   */
  categories?: string[];

  /**
   * @deprecated use `tag` instead
   */
  tags?: string[];
}
import { v4 as uuidv4 } from 'uuid';

export interface Params {
    timeout?: number,
}

export interface Request {
    id: string,
    type: Type,
    data: Record<string, string>,
}

export interface Response {
    id: string,
    result?: any,
    error?: {message: string},
}

export enum Type {
    LIST, EXEC
}

// A client allowing to send command to a local session
export class SessionClient {

    private readonly el: Window;
    private readonly defaultParams: Params;

    constructor(el: Window, defaultParams?: Params) {
        this.el = el;
        this.defaultParams = defaultParams || {timeout: 5000};
    }

    async send(type: Type, data: Record<string, string>, {timeout: timeout}: Params = this.defaultParams): Promise<string> {
        return new Promise((resolve, reject) => {
            const timeoutId = setTimeout(async () => {
                window.removeEventListener('message', callback, false);
                reject({type: 'timeout', message: `No message after ${timeout} ms`});
            }, timeout);
            const id = uuidv4();
            const callback = (event: MessageEvent<Response>) => {
                if (event.data.id == id) {
                    window.removeEventListener('message', callback, false);
                    clearTimeout(timeoutId);
                    const { result, error } = event.data;
                    if (error) {
                        reject(error);
                    } else {
                        resolve(result);
                    }
                }
            };
            window.addEventListener('message', callback, false);

            const request: Request = {id: id, type: type, data: data};
            this.el.postMessage(request, "*");
        });
    }

}
import { useState, useEffect } from "react";
import { openWeatherApiInstance } from "./api/openWeatherApi";
import { openCageApiInstance } from "./api/openCageApi";

interface IUseOpenweathermapProps {}

interface IGeoCoordinates {
  lng: number;
  lat: number;
}

enum UnitsTypes {
  metric = "metric",
  imperial = "imperial",
}

enum LocalStorageKeys {
  language = "language",
  unit = "


 canvas.drawCircle(faceBoundingBox!.center, 3.0, centerPaint);
  }

  /// Draws corner indicators on the face bounding box.
  void _drawFaceCorners(Canvas canvas, Rect box, Color color) {
    final cornerPaint = Paint()
      ..color = color
      ..style = PaintingStyle.stroke
      ..strokeWidth = 4.0;

    final cornerLength = UIConstants.cornerIndicatorLength;
    final corners = [
      box.topLeft,
      box.topRight,
      box.bottomLeft,
      box.bottomRight,
    ];

    for (final corner in corners) {
      final path = Path()
        ..moveTo(corner.dx, corner.dy)
        ..lineTo(
          corner.dx + cornerLength * (corner.dx < box.center.dx ? 1 : -1),
          corner.dy,
        )
        ..moveTo(corner.dx, corner.dy)
        ..lineTo(
          corner.dx,
          corner.dy + cornerLength * (corner.dy < box.center.dy ? 1 : -1),
        );

      canvas.drawPath(path, cornerPaint);
    }
  }

  /// Draws positioning status text near the face.
  void _drawPositioningStatus(Canvas canvas, Size size) {
    if (!isFaceDetected || faceBoundingBox == null) return;

    final center = _getGuideCircleCenter(size);
    final radius = _getGuideCircleRadius(size);
    final color = _getGuideCircleColor();

    final textPainter = TextPainter(
      text: TextSpan(
        text: isPositionedCorrectly ? 'Face Positioned ✓' : 'Positioning...',
        style: TextStyle(
          color: color,
          fontSize: 16,
          fontWeight: FontWeight.bold,
        ),
      ),
      textDirection: TextDirection.ltr,
    );

    textPainter.layout();

    final textPosition = Offset(
      center.dx - textPainter.width / 2,
      center.dy + radius + 20,
    );

    // Draw background
    final backgroundRect = Rect.fromLTWH(
      textPosition.dx - 10,
      textPosition.dy - 5,
      textPainter.width + 20,
      textPainter.height + 10,
    );

    final backgroundPaint = Paint()
      ..color = config.theme.backgroundColor.withValues(alpha:0.8)
      ..style = PaintingStyle.fill;

    canvas.drawRRect(
      RRect.fromRectAndRadius(backgroundRect, const Radius.circular(8)),
      backgroundPaint,
    );

    textPainter.paint(canvas, textPosition);
  }

  /// Draws corner guides around the guide circle.
  void _drawCornerGuides(Canvas canvas, Size size) {
    final center = _getGuideCircleCenter(size);
    final radius = _getGuideCircleRadius(size);
    final color = _getGuideCircleColor();

    final cornerPaint = Paint()
      ..color = color.withValues(alpha:0.5)
      ..style = PaintingStyle.stroke
      ..strokeWidth = 2.0;

    final cornerLength = UIConstants.cornerGuideLength;
    final corners = [
      Offset(center.dx - radius, center.dy - radius),
      Offset(center.dx + radius, center.dy - radius),
      Offset(center.dx - radius, center.dy + radius),
      Offset(center.dx + radius, center.dy + radius),
    ];

    for (final corner in corners) {
      final path = Path()
        ..moveTo(corner.dx, corner.dy)
        ..lineTo(
          corner.dx + cornerLength * (corner.dx < center.dx ? 1 : -1),
          corner.dy,
        )
        ..moveTo(corner.dx, corner.dy)
        ..lineTo(
          corner.dx,
          corner.dy + cornerLength * (corner.dy < center.dy ? 1 : -1),
        );

      canvas.drawPath(path, cornerPaint);
    }
  }

  /// Draws challenge-specific indicators.
  void _drawChallengeIndicator(Canvas canvas, Size size) {
    if (


-checkbox.a-checkbox-fancy input:disabled+.a-label,.a-radio.a-radio-fancy input:disabled+.a-label{color:#6f7373}.a-checkbox.a-checkbox-fancy .a-icon.a-icon-checkbox,.a-checkbox.a-checkbox-fancy .a-icon.a-icon-checkbox:after{border-radius:2px}.a-radio.a-radio-fancy .a-icon.a-icon-radio,.a-radio.a-radio-fancy .a-icon.a-icon-radio:after{border-radius:50%}.a-checkbox-fancy:focus-within label,.a-radio-fancy:focus-within label{outline:3px solid #007185;outline-offset:2px;z-index:1}.a-checkbox-fancy label,.a-radio-fancy label{border-radius:5px}input[type=radio]{height:14px;width:14px;vertical-align:top;position:relative;bottom:-3px}input[type=checkbox]{height:13px;width:13px;vertical-align:top;position:relative;bottom:-3px}.a-checkbox label,.a-radio label{position:relative;font-weight:400;color:#0f1111;padding-left:15px;text-indent:-15px;margin-left:3px;top:-2px;padding-bottom:0}.a-checkbox label input:disabled+.a-icon-checkbox+.a-checkbox-label,.a-checkbox label input:disabled+.a-icon-radio+.a-radio-label,.a-radio label input:disabled+.a-icon-checkbox+.a-checkbox-label,.a-radio label input:disabled+.a-icon-radio+.a-radio-label{color:#6f7373}.a-form-horizontal .a-checkbox,.a-form-horizontal .a-radio{display:inline-block;margin-right:14px}.a-form-horizontal .a-checkbox:last-child,.a-form-horizontal .a-radio:last-child{margin-right:0}.a-form-horizontal .a-checkbox label,.a-form-horizontal .a-radio label{padding-left:0;text-indent:0}.a-checkbox-fancy:focus,.a-radio-fancy:focus{outline:0}.a-checkbox-fancy .a-checkbox-label,.a-checkbox-fancy .a-radio-label,.a-radio-fancy .a-checkbox-label,.a-radio-fancy .a-radio-label{top:1px;vertical-align:middle}.a-checkbox-fancy label,.a-radio-fancy label{padding-left:19px;text-indent:-19px}.a-checkbox-fancy label input:focus+.a-icon,.a-radio-fancy label input:focus+.a-icon{position:relative}.a-checkbox-fancy label input:focus+.a-icon:after,.a-radio-fancy label input:focus+.a-icon:after{top:0;left:0}.a-checkbox-label,.a-radio-label{position:relative;padding-left:5px;text-indent:0;display:inline-block}.a-checkbox-fancy input{height:16px;width:16px}.a-checkbox-fancy input:focus+.a-icon:after{height:14px;width:14px}.a-radio-fancy input{height:17px;width:17px}.a-radio-fancy input:focus+.a-icon:after{height:15px;width:15px}@-moz-document url-prefix(){label .a-checkbox-label{top:1px}}
/* ******** */
@-webkit-keyframes rotate360{from{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotate360{from{transform:rotate(0)}to{transform:rotate(360deg)}}.a-spinner{display:inline-block}.a-spinner-small{width:16px;height:16px;-webkit-animation:fadeIn .3s eas


size:md, $restrain: null) {
  @include _icon-pseudo($restrain) {
    --icon-size: #{icon-size($size)};
    @content;
  }
}

@mixin icon-image ($icon, $restrain: null, $important: false) {
  $url: get-icon-url($icon, $important);

  @include _icon-pseudo($restrain) {
    @include mask-image($url);
  }
}

@mixin icon-style($restrain: null) {
  @include _icon-pseudo($restrain) {
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: calc((0.75em - var(--icon-size)) * 0.5);
    background-color: currentColor;
    @include size(var(--icon-size), var(--icon-size));
    @include mask-image-size(100% 100%);
    @content;
  }
}

@mixin icon-content($is-before: true, $override: false) {
  $pseudos: before after;
  @if not $is-before {
    $pseudos: after before;
  }
  @include _pseudo(nth($pseudos, 1), '') {
    @content;
  }
  @if $override {
    @include _pseudo(nth($pseudos, 2), none);
  }
}

@mixin icon($icon: null, $size: md, $restrain: null, $styling: true, $is-before: $restrain != after, $override: false) {
  @if $styling {
    @include icon-style($restrain);
  }

  @if $icon != null {
    @include icon-image($icon, $restrain);
  }

  @if $size != null {
    @include icon-size($size, $restrain);
  }

  @if $is-before != null {
    @include icon-content($is-before, $override) {
      @content;
    }
  }
}

@mixin icon-forced-color($color: graytext, $adjust: false, $restrain: before after) {
  @include _pseudo($restrain) {
    @include preference.forced-colors {
      @if $adjust == true {
        forced-color-adjust: none;
      }
      background-color: $color;
    }
  }
}

@function filter-icons($category, $config: $icons-config) {
  $filtered: ();
  @each $icon, $setting in $config {
    @if map-get($setting, category) == $category {
      $filtered: map-merge($filtered, (#{$icon}: $setting));
    }
  }
  @return $filtered;
}

@mixin generate-icons($config: $icons-config) {
  @each $icon, $setting in $config {
    #{ns(icon-#{$icon})} {
      @include icon-image($icon);
    }
  }
}
////
/// Core Tool : Grid
/// @group core
////

/// Génère les classes de colonne pour la grille ainsi que les offsets (optionnel)
///
/// @param {Map} $columns [$grid-settings] - configuration de la grille
/// @param {Bool} $with-container [true] - si true, définit les containers
/// @param {Bool} $with-offsets [true] - si true, définit les offsets
///
/// @require {variable} $grid-columns
///
/// @example scss - Génère les colonnes
///   @include grid-generator();
@mixin grid($settings: $grid-settings, $with-container: true, $with-offsets: true) {
  $columns: map-get($settings, columns);
  $breakpoints-settings: map-get($grid-settings, breakpoints);
  $last-gutter: 0;
  $last-max-width: null;
  $containers: ();
  $row-gutters: ();

  @each $breakpoint, $limits in $breakpoints {
    $mod: '-#{$breakpoint}';

    @if $breakpoint == xs {
      $breakpoint: first;
      $mod: '';
    }

    @includ


"), body);
            this.throwExactlyMatchedException(getValue(this.exceptions, "exact"), message, feedback);
            this.throwBroadlyMatchedException(getValue(this.exceptions, "broad"), message, feedback);
            throw new ExchangeError ((string)feedback) ;
        }
        return null;
    }
}


EXPANDED, __pyx_k_EXPANDED, sizeof(__pyx_k_EXPANDED), 0, 0, 1, 1},
    {&__pyx_n_s_EXTRINSIC_PROPERTIES, __pyx_k_EXTRINSIC_PROPERTIES, sizeof(__pyx_k_EXTRINSIC_PROPERTIES), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper, __pyx_k_EncodeMapper, sizeof(__pyx_k_EncodeMapper), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapperSymbolTableView, __pyx_k_EncodeMapperSymbolTableView, sizeof(__pyx_k_EncodeMapperSymbolTableView), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper___reduce, __pyx_k_EncodeMapper___reduce, sizeof(__pyx_k_EncodeMapper___reduce), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper_arc_type, __pyx_k_EncodeMapper_arc_type, sizeof(__pyx_k_EncodeMapper_arc_type), 0, 0, 1, 1},
    {&__pyx_kp_u_EncodeMapper_at_0x, __pyx_k_EncodeMapper_at_0x, sizeof(__pyx_k_EncodeMapper_at_0x), 0, 1, 0, 0},
    {&__pyx_n_s_EncodeMapper_flags, __pyx_k_EncodeMapper_flags, sizeof(__pyx_k_EncodeMapper_flags), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper_input_symbols, __pyx_k_EncodeMapper_input_symbols, sizeof(__pyx_k_EncodeMapper_input_symbols), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper_output_symbols, __pyx_k_EncodeMapper_output_symbols, sizeof(__pyx_k_EncodeMapper_output_symbols), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper_properties, __pyx_k_EncodeMapper_properties, sizeof(__pyx_k_EncodeMapper_properties), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper_read, __pyx_k_EncodeMapper_read, sizeof(__pyx_k_EncodeMapper_read), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper_read_from_string, __pyx_k_EncodeMapper_read_from_string, sizeof(__pyx_k_EncodeMapper_read_from_string), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper_set_input_symbols, __pyx_k_EncodeMapper_set_input_symbols, sizeof(__pyx_k_EncodeMapper_set_input_symbols), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper_set_output_symbols, __pyx_k_EncodeMapper_set_output_symbols, sizeof(__pyx_k_EncodeMapper_set_output_symbols), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper_weight_type, __pyx_k_EncodeMapper_weight_type, sizeof(__pyx_k_EncodeMapper_weight_type), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper_write, __pyx_k_EncodeMapper_write, sizeof(__pyx_k_EncodeMapper_write), 0, 0, 1, 1},
    {&__pyx_n_s_EncodeMapper_write_to_string, __pyx_k_EncodeMapper_write_to_string, sizeof(__pyx_k_EncodeMapper_write_to_string


mport com.skydoves.sandwich.ApiResponse
import com.skydoves.sandwich.map
import com.skydoves.sandwich.message
import com.skydoves.sandwich.onError
import com.skydoves.sandwich.onException
import com.skydoves.sandwich.onFailure
import com.skydoves.sandwich.suspendOnSuccess
import javax.inject.Inject

class ApiResponseHandler @Inject constructor(
    private val errorResponseMapper: ErrorResponseMapper
) {
    suspend fun <T> handle(
        response: ApiResponse<T>,
        onSuccess: suspend (T) -> Unit
    ) {
        response.suspendOnSuccess {
            onSuccess(data)
        }.onError {
            map(errorResponseMapper) { throw Exception("[Error Code: $code]: $message") }
        }.onFailure {
            throw Exception("Network Failure: ${message()}")
        }.onException {
            throw Exception("Exception: ${throwable.message}")
        }
    }
}
import org.gradle.api.tasks.testing.logging.TestExceptionFormat

/*
 * This file was generated by the Gradle 'init' task.
 */

plugins {
    `java-library`
    `maven-publish`
    jacoco
    alias(libs.plugins.spotless)
    alias(libs.plugins.shadow)
    alias(libs.plugins.jpackage)
}

repositories {
    mavenCentral()
}

dependencies {
    implementation(libs.slf4j.api)
    implementation(libs.bundles.log4j)
    implementation(libs.gson)
    implementation(libs.commons.cli)
    implementation(libs.guice)
    testImplementation(libs.junit.jupiter)
    testRuntimeOnly(libs.junit.platform.launcher)
    testImplementation(libs.bundles.mockito)
}

group = "oripa"
version = "1.77"
description = "oripa"

java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(21))
    }
}

publishing {
    publications.create<MavenPublication>("maven") {
        from(components["java"])
    }
}

// run: gradlew shadowJar
// fat jar will be created in build/libs as oripa-x.yz-all.jar
tasks.withType<Jar> {
    manifest {
        attributes["Main-Class"] = "oripa.ORIPA"
    }
}

spotless {
  java {
    eclipse().configFile(file("eclipse_formatter.xml"))
    importOrder("java", "javax", "org", "com")
  }
}

tasks.withType<JavaCompile>() {
    options.encoding = "UTF-8"
    options.compilerArgs.add("-Xlint:unchecked")
    dependsOn("spotlessApply")
}

tasks.withType<Javadoc>() {
    options.encoding = "UTF-8"
}

tasks.withType<Test>() {
    useJUnitPlatform()
    testLogging {
        exceptionFormat = TestExceptionFormat.FULL
    }
}

// Coverage report
tasks.jacocoTestReport {
    dependsOn(tasks.test) // tests are required to run before generating the report
}

task("copyDependencies", Copy::class) {
	val buildDirectory = layout.buildDirectory.get()
    from(configurations.runtimeClasspath).into("$buildDirectory/jars")
}

task("copyJar", Copy::class) {
	val buildDirectory = layout.buildDirectory.get()
    from(tasks.jar).into("$buildDirectory/jars")
}

// run: gradlew clean jpackage
// installer will be created in build/dist.
tasks.jpackage {
	val buildDirectory = layout.buildDirectory.get()

    dependsOn("build", "copyDependencies", "copyJar")

    input  = buildDirectory.dir("jars")
    destination = buildDirectory.dir("dist")

    appName = "oripa"
    vendor = "oripa"

    mainJar = tasks.jar.get().archiveFileName.get()
    mainClass = "oripa.ORIPA"

    javaOptions = listOf("-D


age= 18

if (age>=18):
    print("you can  give vote \n" )


lda.config.provider.PropertiesBasedConfigurationProvider;
import org.openkilda.model.PathComputationStrategy;
import org.openkilda.model.SwitchId;
import org.openkilda.pce.PathComputerConfig;
import org.openkilda.pce.exception.UnroutableFlowException;
import org.openkilda.pce.finder.BestWeightAndShortestPathFinder;
import org.openkilda.pce.finder.FailReasonType;
import org.openkilda.pce.model.Edge;
import org.openkilda.pce.model.FindPathResult;
import org.openkilda.pce.model.WeightFunction;

import org.hamcrest.Matchers;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.util.List;

public class FindPathWithLatencyLimitsTest {
    private static final int ALLOWED_DEPTH = 35;
    private static final SwitchId SWITCH_ID_1 = new SwitchId("00:00:00:00:00:00:00:01");
    private static final SwitchId SWITCH_ID_2 = new SwitchId("00:00:00:00:00:00:00:02");
    private static final SwitchId SWITCH_ID_3 = new SwitchId("00:00:00:00:00:00:00:03");
    private static final SwitchId SWITCH_ID_4 = new SwitchId("00:00:00:00:00:00:00:04");
    private static final SwitchId SWITCH_ID_5 = new SwitchId("00:00:00:00:00:00:00:05");
    private static final SwitchId SWITCH_ID_6 = new SwitchId("00:00:00:00:00:00:00:06");
    private final AvailableNetwork network = new AvailableNetwork();
    private final BestWeightAndShortestPathFinder pathFinder = new BestWeightAndShortestPathFinder(ALLOWED_DEPTH);

    private InMemoryPathComputer pathComputer;

    @BeforeEach
    public void setUp() {
        PathComputerConfig pathComputerConfig = new PropertiesBasedConfigurationProvider()
                .getConfiguration(PathComputerConfig.class);
        pathComputer = new InMemoryPathComputer(null, null, pathComputerConfig);
    }

    @Test
    public void shouldFindPathIfAllIslsOnUnderMaintainance() throws UnroutableFlowException {
        /*
         *   Topology:
         *
         *   SW1--m--SW2--m---SW3
         *
         *   All ISLs are in under-maintenance mode
         */
        addBidirectionalLink(network, SWITCH_ID_1, SWITCH_ID_2, 1, 2, true, 5);
        addBidirectionalLink(network, SWITCH_ID_2, SWITCH_ID_3, 5, 6, true, 5);

        WeightFunction weightFunction = pathComputer
                .getWeightFunctionByStrategy(PathComputationStrategy.MAX_LATENCY, false);

        FindPathResult path = pathFinder.findPathWithWeightCloseToMaxWeight(network, SWITCH_ID_1, SWITCH_ID_3,
                weightFunction, 100, 100);

        assertThat(path, is(notNullValue()));

        Edge firstEdge = path.getFoundPath().getLeft().get(0);
        assertAll(
                () -> assertThat(firstEdge.getSrcSwitch().getSwitchId(), Matchers.equalTo(SWITCH_ID_1)),
                () -> assertThat(firstEdge.getDestSwitch().getSwitchId(), Matchers.equalTo(SWITCH_ID_2))
        );

        Edge lastEdge = path.getFoundPath().getLeft().get(1);
        assertAll(
                () -> assertThat(lastEdge.getSrcSwitch().getSwitchId(), Matchers.equalTo(SWITCH_ID_2)),
                () -> assertThat(lastEdge.getDestSwitch().getSwitchId(), Matchers.equalTo(SWITCH_ID_3))
        );

        Edge firstReverseEdge = path.getFoundPath().getRight().get(0);
        assertAll


IMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include <errno.h>
#include <malloc.h>
#include <pthread.h>
#include <stdatomic.h>
#include <stdio.h>
#include <string.h>
#include <time.h>

#include "private/bionic_lock.h"

// System calls.
extern "C" int __rt_sigprocmask(int, const sigset64_t*, sigset64_t*, size_t);
extern "C" int __rt_sigtimedwait(const sigset64_t*, siginfo_t*, const timespec*, size_t);
extern "C" int __timer_create(clockid_t, sigevent*, __kernel_timer_t*);
extern "C" int __timer_delete(__kernel_timer_t);
extern "C" int __timer_getoverrun(__kernel_timer_t);
extern "C" int __timer_gettime(__kernel_timer_t, itimerspec*);
extern "C" int __timer_settime(__kernel_timer_t, int, const itimerspec*, itimerspec*);

// Most POSIX timers are handled directly by the kernel. We translate SIGEV_THREAD timers
// into SIGEV_THREAD_ID timers so the kernel handles all the time-related stuff and we just
// need to worry about running user code on a thread.

// We can't use SIGALRM because too many other C library functions throw that around, and since
// they don't send to a specific thread, all threads are eligible to handle the signal and we can
// end up with one of our POSIX timer threads handling it (meaning that the intended recipient
// doesn't). glibc uses SIGRTMIN for its POSIX timer implementation, so in the absence of any
// reason to use anything else, we use that too.
static const int TIMER_SIGNAL = (__SIGRTMIN + 0);

struct PosixTimer {
  __kernel_timer_t kernel_timer_id;

  int sigev_notify;

  // The fields below are only needed for a SIGEV_THREAD timer.
  Lock startup_handshake_lock;
  pthread_t callback_thread;
  void (*callback)(sigval_t);
  sigval_t callback_argument;
  atomic_bool deleted;  // Set when the timer is deleted, to prevent further calling of callback.
};

static __kernel_timer_t to_kernel_timer_id(timer_t timer) {
  return reinterpret_cast<PosixTimer*>(timer)->kernel_timer_id;
}

static void* __timer_thread_start(void* arg) {
  PosixTimer* timer = reinterpret_cast<PosixTimer*>(arg);

  // Check that our parent managed to create the kernel timer and bail if not...
  timer->startup_handshake_lock.lock();
  if (timer->kernel_timer_id == -1) {
    free(timer);
    return nullptr;
  }

  // Give ourselves a specific meaningful name now we have a kernel timer.
  char name[16]; // 16 is the kernel-imposed limit.
  snprintf(name, sizeof(name), "POSIX timer %d", to_kernel_timer_id(timer));
  pthread_setname_np(timer->callback_thread, name);

  sigset64_t sigset = {};
  sigaddset64(&sigset, TIMER_SIGNAL);

  while (true) {


x2;
    float m12 = yz + yz + xw + xw;
    float m20 = yw + xz + xz + yw;
    float m21 = yz + yz - xw - xw;
    float m22 = z2 - y2 - x2 + w2;

    float sx = src.x;
    float sy = src.y;
    float sz = src.z;
    result.x = m00 * sx + m10 * sy + m20 * sz;
    result.y = m01 * sx + m11 * sy + m21 * sz;
    result.z = m02 * sx + m12 * sy + m22 * sz;
    return result;
  }

  /**
   * Create a Quaternion by combining two Quaternions multiply(lhs, rhs) is equivalent to performing
   * the rhs rotation then lhs rotation Ordering is important for this operation.
   *
   * @return The combined rotation
   */
  public static Quaternion multiply(Quaternion lhs, Quaternion rhs) {
    Preconditions.checkNotNull(lhs, "Parameter \"lhs\" was null.");
    Preconditions.checkNotNull(rhs, "Parameter \"rhs\" was null.");
    float lx = lhs.x;
    float ly = lhs.y;
    float lz = lhs.z;
    float lw = lhs.w;
    float rx = rhs.x;
    float ry = rhs.y;
    float rz = rhs.z;
    float rw = rhs.w;

    Quaternion result =
        new Quaternion(
            lw * rx + lx * rw + ly * rz - lz * ry,
            lw * ry - lx * rz + ly * rw + lz * rx,
            lw * rz + lx * ry - ly * rx + lz * rw,
            lw * rw - lx * rx - ly * ry - lz * rz);
    return result;
  }

  /**
   * Uniformly scales a Quaternion without normalizing
   *
   * @return a Quaternion multiplied by a scalar amount.
   */
  Quaternion scaled(float a) {
    Quaternion result = new Quaternion();
    result.x = this.x * a;
    result.y = this.y * a;
    result.z = this.z * a;
    result.w = this.w * a;

    return result;
  }

  /**
   * Adds two Quaternion's without normalizing
   *
   * @return The combined Quaternion
   */
  static Quaternion add(Quaternion lhs, Quaternion rhs) {
    Preconditions.checkNotNull(lhs, "Parameter \"lhs\" was null.");
    Preconditions.checkNotNull(rhs, "Parameter \"rhs\" was null.");
    Quaternion result = new Quaternion();
    result.x = lhs.x + rhs.x;
    result.y = lhs.y + rhs.y;
    result.z = lhs.z + rhs.z;
    result.w = lhs.w + rhs.w;
    return result;
  }

  /** The dot product of two Quaternions. */
  static float dot(Quaternion lhs, Quaternion rhs) {
    Preconditions.checkNotNull(lhs, "Parameter \"lhs\" was null.");
    Preconditions.checkNotNull(rhs, "Parameter \"rhs\" was null.");
    return lhs.x * rhs.x + lhs.y * rhs.y + lhs.z * rhs.z + lhs.w * rhs.w;
  }

  /**
   * Returns the linear interpolation between two given rotations by a ratio. The ratio is clamped
   * between a range of 0 and 1.
   */
  static Quaternion lerp(Quaternion


           continue

                    except Exception as e:
                        logs.append(f"第 {round_num} 轮-内部第 {inner_round} 次: 信息获取阶段失败: {str(e)}")
                        continue

                # 如果所有轮次都没有得到明确结果
                logs.append(f"第 {round_num} 轮: 所有内部循环完成，未得到明确结果")
                return 'not_sure'

            # 如果以上都失败，返回初步评估结果
            return assessment if assessment in ['yes', 'no'] else 'not_sure'

        except Exception as e:
            import traceback
            error_details = traceback.format_exc()
            print(f"❌ [Round {round_num}] 检测过程发生异常: {str(e)}")
            logs.append(f"第 {round_num} 轮: 检测失败: {str(e)}")
            logs.append(f"第 {round_num} 轮: 完整错误堆栈: {error_details}")
            return "not_sure"

    def _get_all_additional_info(self, specific_query, task, logs, round_num):
        """同时获取所有类型的RAG信息"""
        all_info = {
            'function_info': [],
            'file_info': [],
            'upstream_downstream_info': [],
            'chunk_info': []
        }

        # 🔍 添加调试信息

        try:
            # 1. Function RAG搜索 (topk=5) - 包括三种搜索类型
            if self.rag_processor:

                try:
                    # 按名称搜索
                    name_results = self.rag_processor.search_functions_by_name(specific_query, 2)

                    # 按内容搜索
                    content_results = self.rag_processor.search_functions_by_content(specific_query, 2)

                    # 按自然语言描述搜索
                    natural_results = self.rag_processor.search_functions_by_natural_language(specific_query, 2)

                    # 合并和去重，取前5个
                    function_results = self._merge_and_deduplicate_functions(
                        name_results, content_results, natural_results, 5
                    )

                    for result in function_results:
                        func_name = result.get('name', 'Unknown')
                        func_content = result.get('content', '')  # 🔧 移除长度限制，保留完整内容
                        all_info['function_info'].append({
                            'name': func_name,
                            'content': func_content,
                            'type': 'function'
                        })

                except Exception as e:
                    pass
            else:
                print(f"  ❌ 第 {round_num} 轮: rag_processor为None，跳过Function搜索")

            # 2. File RAG搜索 (topk=2) - 已注释
            # if self.rag_processor:
            #     file_results = self.rag_processor.search_files_by_content(specific_query, 2)
            #
            #     for result in file_results:
            #         file_path = result.get('file_path', 'Unknown')
            #         file_content = result.get('content', '')[:300]
            #         all_info['file_info'].append({
            #             'path': file_path,
            #             'content': file_content,
            #             'type': 'file'
            #         })
            #
            #     logs.append(f"第 {round_num} 轮: File搜索找到 {len(file_results)} 个结果")

            # 3. Upstream/Downstream搜索 (level=3/4)

            try:
                upstream_downstream_results = self._get_upstream_downstream_with_levels(task, 3, 4, logs, round_num)
                all_info['upstream_downstream_info'] = upstream_downstream_results
            except Exception as e:
                pass

            # 4. Chunk RAG搜索 (topk=3) - 过滤超长内容
            if self.rag_processor:
                try:
                    chunk_results = self.rag_processor.search_chunks_by_content(specific_query, 3)
                    max_tokens = 150000  # 设置150k token阈值

                    for result in chunk_results:
                        chunk_text = result.get('chunk_text', '')
                        original_file = result.get('original_file', 'Unknown')

                        # 计算token数量，如果超过阈值则跳过
                        token_count = self._count_tokens(chunk_text)
                        if token_count > max_tokens:
                            print(f"  ⚠ 第 {round_num} 轮: Chunk搜索结果过长 ({token_count} tokens > {max_tokens})，跳过文件 {original_file}")


_dereq_('./math/math');
_dereq_('./math/calculation');
_dereq_('./math/random');
_dereq_('./math/noise');
_dereq_('./math/trigonometry');
_dereq_('./core/rendering');
_dereq_('./core/2d_primitives');

_dereq_('./core/attributes');
_dereq_('./core/curves');
_dereq_('./core/vertex');
_dereq_('./core/structure');
_dereq_('./core/transform');
_dereq_('./typography/attributes');
_dereq_('./typography/loading_displaying');

_dereq_('./webgl/p5.RendererGL');
_dereq_('./webgl/p5.Geometry');
_dereq_('./webgl/p5.RendererGL.Retained');
_dereq_('./webgl/p5.RendererGL.Immediate');
_dereq_('./webgl/primitives');
_dereq_('./webgl/loading');
_dereq_('./webgl/p5.Matrix');
_dereq_('./webgl/material');
_dereq_('./webgl/light');
_dereq_('./webgl/shader');
_dereq_('./webgl/camera');
_dereq_('./webgl/interaction');

/**
 * _globalInit
 *
 * TODO: ???
 * if sketch is on window
 * assume "global" mode
 * and instantiate p5 automatically
 * otherwise do nothing
 *
 * @return {Undefined}
 */
var _globalInit = function() {
  if (!window.PHANTOMJS && !window.mocha) {
    // If there is a setup or draw function on the window
    // then instantiate p5 in "global" mode
    if(((window.setup && typeof window.setup === 'function') ||
       (window.draw && typeof window.draw === 'function')) &&
       !p5.instance) {
      new p5();
    }
  }
};

// TODO: ???
if (document.readyState === 'complete') {
  _globalInit();
} else {
  window.addEventListener('load', _globalInit , false);
}

module.exports = p5;

},{"./color/creating_reading":30,"./color/p5.Color":31,"./color/setting":32,"./core/2d_primitives":33,"./core/attributes":34,"./core/constants":36,"./core/core":37,"./core/curves":38,"./core/environment":39,"./core/p5.Element":41,"./core/p5.Graphics":42,"./core/p5.Renderer2D":44,"./core/rendering":45,"./core/structure":47,"./core/transform":48,"./core/vertex":49,"./events/acceleration":50,"./events/keyboard":51,"./events/mouse":52,"./events/touch":53,"./image/image":55,"./image/loading_displaying":56,"./image/p5.Image":57,"./image/pixels":58,"./io/files":59,"./io/p5.Table":60,"./io/p5.TableRow":61,"./io/p5.XML":62,"./math/calculation":63,"./math/math":64,"./math/noise":65,"./math/p5.Vector":66,"./math/random":68,"./math/trigonometry":69,"./typography/attributes":70,"./typography/loading_displaying":71,"./typography/p5.Font":72,"./utilities/array_functions":73,"./utilities/conversion":74,"./utilities/string_functions":75,"./utilities/time_date":76,"./webgl/camera":77,"./webgl/interaction":78,"./webgl/light":79,"./webgl/loading":80,"./webgl/material":81,"./webgl/p5.Geometry":82,"./webgl/p5.Matrix":83,"./webgl/p5.RendererGL":86,"./webgl/p5.RendererGL.Immediate":84,"./webgl/p5.RendererGL.Retained":85,"./webgl/primitives":87,"./webgl/shader":88}],29:[function(_dereq_,module,exports){
/**
 * module


_BLOCKEVERYTHING|ML_BLOCKHITSCAN;
	if ( flags & TRF_BLOCKUSE ) lflags |= ML_BLOCKUSE;
	if ( flags & TRF_BLOCKSELF )
	{
		bool Projectile = ( (t1->flags&MF_MISSILE) || (t1->BounceFlags&BOUNCE_MBF) );
		bool NotBlocked = ( (t1->flags3&MF3_NOBLOCKMONST) || ( (t1->Level->i_compatflags&COMPATF_NOBLOCKFRIENDS) && (t1->flags&MF_FRIENDLY) ) );
		if ( Projectile ) lflags |= ML_BLOCKPROJECTILE;
		if ( !Projectile || (t1->flags8&MF8_BLOCKASPLAYER) ) lflags |= ML_BLOCKING;
		if ( !NotBlocked ) lflags |= ML_BLOCKMONSTERS;
		if ( t1->player || (t1->flags8&MF8_BLOCKASPLAYER) ) lflags |= ML_BLOCKING|ML_BLOCK_PLAYERS;
		if ( t1->flags&MF_FLOAT ) lflags |= ML_BLOCK_FLOATERS;
	}
	if ( flags & TRF_THRUBLOCK ) lflags &= ~ML_BLOCKEVERYTHING;
	if ( flags & TRF_THRUHITSCAN ) lflags &= ~ML_BLOCKHITSCAN;
	int tflags = TRACE_ReportPortals;
	if ( flags & TRF_NOSKY ) tflags |= TRACE_NoSky;

	// Do trace
	bool ret = Trace(startpos, t1->Level->PointInSector(startpos), direction, distance, aflags, lflags, t1, trace, tflags, CheckLineTrace, &TData);
	if ( outdata )
	{
		memset(outdata,0,sizeof(*outdata));
		outdata->HitActor = trace.Actor;
		outdata->HitLine = trace.Line;
		outdata->HitSector = trace.Sector;
		outdata->Hit3DFloor = trace.ffloor;
		outdata->SectorPlane = (trace.HitType == TRACE_HitCeiling) ? 1 : 0;
		if ( trace.HitType == TRACE_HitWall )
		{
			outdata->LineSide = trace.Side;
			int txpart;
			switch ( trace.Tier )
			{
			case TIER_Middle:
				outdata->LinePart = 1;
				outdata->HitTexture = trace.Line->sidedef[trace.Side]->textures[1].texture;
				break;
			case TIER_Upper:
				outdata->LinePart = 0;
				outdata->HitTexture = trace.Line->sidedef[trace.Side]->textures[0].texture;
				break;
			case TIER_Lower:
				outdata->LinePart = 2;
				outdata->HitTexture = trace.Line->sidedef[trace.Side]->textures[2].texture;
				break;
			case TIER_FFloor:
				outdata->LinePart = 1;	// act as if middle was hit
				txpart = (trace.ffloor->flags & FF_UPPERTEXTURE) ? 0 : (trace.ffloor->flags & FF_LOWERTEXTURE) ? 2 : 1;
				outdata->HitTexture = trace.ffloor->master->sidedef[0]->textures[txpart].texture;
				break;
			}
		}
		else outdata->HitTexture = trace.HitTexture;
		outdata->HitLocation = trace.HitPos;
		outdata->HitDir = trace.HitVector;
		outdata->Distance = trace.Distance;
		// [MK] Subtract two "bogus" portal crossings used internally by trace code
		outdata->NumPortals = TData.NumPortals-2;
		outdata->HitType = trace.HitType;
	}
	return ret;
}

//==========================================================================
//
// P_LinePickActor
//
//==========================================================================

AActor *P_LinePickActor(AActor *t1, DAngle angle, double distance, D


nly domain: string;
    readonly domainType: number;
    readonly timeStamp: string;
    readonly context: string;
    readonly hits: number;
    readonly domainOwner: string;
    readonly initiatedType: string;
    readonly firstTimeStamp: string;
}

export interface DomainRecordBeta1 extends DomainRecordCommon {
    readonly "hasApp.bundleName": string;
    readonly effectiveUserId: number;
}

export interface DomainRecordBeta2 extends DomainRecordCommon {
    readonly bundleID: string;
}

export interface DomainRecordBeta3 extends DomainRecordCommon {
    readonly bundleID: string;
    readonly type: string;
}

// deno-lint-ignore no-explicit-any
export function isDomainRecordBeta1(obj: any): obj is DomainRecordBeta1 {
    return typeof obj === 'object'
        && typeof obj.domain === 'string'
        && typeof obj.effectiveUserId === 'number'
        && typeof obj.domainType === 'number'
        && typeof obj.timeStamp === 'string'
        && typeof obj["hasApp.bundleName"] === 'string'
        && typeof obj.context === 'string'
        && typeof obj.hits === 'number'
        && typeof obj.domainOwner === 'string'
        && typeof obj.initiatedType === 'string'
        && typeof obj.firstTimeStamp === 'string'
        && Object.keys(obj).every(v => ['domain', 'effectiveUserId', 'domainType', 'timeStamp', 'hasApp.bundleName', 'context', 'hits', 'domainOwner', 'initiatedType', 'firstTimeStamp'].includes(v))
}

// deno-lint-ignore no-explicit-any
export function isDomainRecordBeta2(obj: any): obj is DomainRecordBeta2 {
    return typeof obj === 'object'
        && typeof obj.domain === 'string'
        && typeof obj.domainType === 'number'
        && typeof obj.timeStamp === 'string'
        && typeof obj.bundleID === 'string'
        && typeof obj.context === 'string'
        && typeof obj.hits === 'number'
        && typeof obj.domainOwner === 'string'
        && typeof obj.initiatedType === 'string'
        && typeof obj.firstTimeStamp === 'string'
        && Object.keys(obj).every(v => ['domain', 'domainType', 'timeStamp', 'bundleID', 'context', 'hits', 'domainOwner', 'initiatedType', 'firstTimeStamp'].includes(v))
}

// deno-lint-ignore no-explicit-any
export function isDomainRecordBeta3(obj: any): obj is DomainRecordBeta3 {
    return typeof obj === 'object'
        && typeof obj.domain === 'string'
        && typeof obj.firstTimeStamp === 'string'
        && typeof obj.context === 'string'
        && typeof obj.timeStamp === 'string'
        && typeof obj.domainType === 'number'
        && typeof obj.initiatedType === 'string'
        && typeof obj.hits === 'number'
        && typeof obj.type === 'string'
        && typeof obj.domainOwner === 'string'
        && typeof obj.bundleID === 'string'
        && Object.keys(obj).every(v => ['domain', 'domainType', 'timeStamp', 'bundleID', 'context', 'hits', 'domainOwner', 'initiatedType', 'firstTimeStamp', 'type'].includes(v))
}

export function checkDomainRecord(record: DomainRecord) {
    checkTimestamp('timeStamp', record.timeStamp);
    checkTimestamp('firstTimeStamp', record.firstTimeStamp);
}

//

export const TIMESTAMP = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(\.\d{1,3})?Z$/;

//

function checkTimestamp(name: string, value: string): string {
    // 2021-06-11T05:18:04Z
    // 2021-06-08T23:48:49.573Z
    if (!TIMESTAMP.test(value)) throw new Error(`Bad ${name}: ${value