incajs 0.0.33 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,8 @@
1
1
  // Copyright (c) 2026 tom96da
2
2
  // SPDX-License-Identifier: MIT OR Apache-2.0
3
3
 
4
+ import type { IncaEvent, IncaEventTarget } from "incajs";
5
+
4
6
  // The host defines these globals before the app runs. This file carries their types.
5
7
  declare global {
6
8
  /** The document of the app. The build adds its import to every module that names it. */
@@ -9,14 +11,95 @@ declare global {
9
11
  /** The window of the app. The build adds its import to every module that names it. */
10
12
  const window: import("incajs").IncaWindow;
11
13
 
14
+ /** The constants of `Node`, a number for each node type and document position. */
15
+ interface NodeConstants {
16
+ readonly ELEMENT_NODE: 1;
17
+ readonly ATTRIBUTE_NODE: 2;
18
+ readonly TEXT_NODE: 3;
19
+ readonly CDATA_SECTION_NODE: 4;
20
+ readonly ENTITY_REFERENCE_NODE: 5;
21
+ readonly ENTITY_NODE: 6;
22
+ readonly PROCESSING_INSTRUCTION_NODE: 7;
23
+ readonly COMMENT_NODE: 8;
24
+ readonly DOCUMENT_NODE: 9;
25
+ readonly DOCUMENT_TYPE_NODE: 10;
26
+ readonly DOCUMENT_FRAGMENT_NODE: 11;
27
+ readonly NOTATION_NODE: 12;
28
+ readonly DOCUMENT_POSITION_DISCONNECTED: 1;
29
+ readonly DOCUMENT_POSITION_PRECEDING: 2;
30
+ readonly DOCUMENT_POSITION_FOLLOWING: 4;
31
+ readonly DOCUMENT_POSITION_CONTAINS: 8;
32
+ readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
33
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
34
+ }
35
+
36
+ /** The interface object of event targets, which a script cannot construct. */
37
+ var EventTarget: {
38
+ readonly prototype: object;
39
+ [Symbol.hasInstance](value: unknown): value is import("incajs").IncaEventTarget;
40
+ };
41
+
42
+ /** The interface object of nodes, which a script cannot construct. */
43
+ var Node: NodeConstants & {
44
+ readonly prototype: NodeConstants;
45
+ [Symbol.hasInstance](value: unknown): value is import("incajs").IncaNode;
46
+ };
47
+
48
+ /** The interface object of text and comments, which a script cannot construct. */
49
+ var CharacterData: {
50
+ readonly prototype: NodeConstants;
51
+ [Symbol.hasInstance](
52
+ value: unknown,
53
+ ): value is import("incajs").IncaText | import("incajs").IncaComment;
54
+ };
55
+
56
+ /** The interface object of text nodes, which a script cannot construct. */
57
+ var Text: {
58
+ readonly prototype: NodeConstants;
59
+ [Symbol.hasInstance](value: unknown): value is import("incajs").IncaText;
60
+ };
61
+
62
+ /** The interface object of comments, which a script cannot construct. */
63
+ var Comment: {
64
+ readonly prototype: NodeConstants;
65
+ [Symbol.hasInstance](value: unknown): value is import("incajs").IncaComment;
66
+ };
67
+
68
+ /** The interface object of elements, which a script cannot construct. */
69
+ var Element: {
70
+ readonly prototype: NodeConstants;
71
+ [Symbol.hasInstance](value: unknown): value is import("incajs").IncaElement;
72
+ };
73
+
74
+ /** The interface object of HTML elements, which a script cannot construct. */
75
+ var HTMLElement: {
76
+ readonly prototype: NodeConstants;
77
+ [Symbol.hasInstance](value: unknown): value is import("incajs").IncaHTMLElement;
78
+ };
79
+
80
+ /** The interface object of fragments, which a script cannot construct. */
81
+ var DocumentFragment: {
82
+ readonly prototype: NodeConstants;
83
+ [Symbol.hasInstance](value: unknown): value is import("incajs").IncaFragment;
84
+ };
85
+
12
86
  /** The interface object of `document`. */
13
- var Document: { readonly prototype: object };
87
+ var Document: {
88
+ readonly prototype: NodeConstants;
89
+ [Symbol.hasInstance](value: unknown): value is import("incajs").IncaDocument;
90
+ };
91
+
92
+ /** The interface object of the HTML document, which a script cannot construct. */
93
+ var HTMLDocument: {
94
+ readonly prototype: NodeConstants;
95
+ [Symbol.hasInstance](value: unknown): value is import("incajs").IncaDocument;
96
+ };
14
97
 
15
98
  /** The interface object of `element.dataset`, which scripts cannot construct. */
16
99
  var DOMStringMap: { readonly prototype: import("incajs").DOMStringMap };
17
100
 
18
101
  /** The interface object of shadow roots, which the host never creates. */
19
- var ShadowRoot: { readonly prototype: object };
102
+ var ShadowRoot: { readonly prototype: NodeConstants };
20
103
 
21
104
  /** The interface object of token lists. It cannot be called or constructed. */
22
105
  var DOMTokenList: { readonly prototype: import("incajs").DOMTokenList };
@@ -93,6 +176,22 @@ declare global {
93
176
  var Performance: { prototype: Performance; new (): Performance };
94
177
  var performance: Performance;
95
178
 
179
+ type AlgorithmIdentifier = string | { name: string };
180
+ type BufferSource = ArrayBufferView | ArrayBuffer;
181
+
182
+ interface SubtleCrypto {
183
+ digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
184
+ }
185
+ var SubtleCrypto: { prototype: SubtleCrypto; new (): SubtleCrypto };
186
+
187
+ interface Crypto {
188
+ readonly subtle: SubtleCrypto;
189
+ getRandomValues<T extends ArrayBufferView>(array: T): T;
190
+ randomUUID(): `${string}-${string}-${string}-${string}-${string}`;
191
+ }
192
+ var Crypto: { prototype: Crypto; new (): Crypto };
193
+ var crypto: Crypto;
194
+
96
195
  interface Console {
97
196
  assert(condition?: boolean, ...data: unknown[]): void;
98
197
  clear(): void;
@@ -198,6 +297,11 @@ declare global {
198
297
  new (init?: string | string[][] | Record<string, string> | URLSearchParams): URLSearchParams;
199
298
  prototype: URLSearchParams;
200
299
  };
300
+
301
+ interface StructuredSerializeOptions {
302
+ transfer?: ArrayBuffer[];
303
+ }
304
+ function structuredClone<T = any>(value: T, options?: StructuredSerializeOptions): T;
201
305
  }
202
306
 
203
307
  // The JavaScript engine provides these globals.
@@ -263,6 +367,35 @@ declare global {
263
367
  readonly INVALID_NODE_TYPE_ERR: 24;
264
368
  readonly DATA_CLONE_ERR: 25;
265
369
  };
370
+
371
+ /** The signal of an `AbortController`. A script cannot construct one. */
372
+ interface AbortSignal extends IncaEventTarget {
373
+ readonly aborted: boolean;
374
+ readonly reason: any;
375
+ throwIfAborted(): void;
376
+ onabort: ((this: AbortSignal, ev: IncaEvent) => any) | null;
377
+ }
378
+
379
+ /** The interface object of signals and their static methods. */
380
+ var AbortSignal: {
381
+ prototype: Pick<AbortSignal, "aborted" | "reason" | "throwIfAborted">;
382
+ new (): AbortSignal;
383
+ abort(reason?: any): AbortSignal;
384
+ any(signals: AbortSignal[]): AbortSignal;
385
+ timeout(milliseconds: number): AbortSignal;
386
+ };
387
+
388
+ /** A controller that aborts its signal. */
389
+ interface AbortController {
390
+ readonly signal: AbortSignal;
391
+ abort(reason?: any): void;
392
+ }
393
+
394
+ /** The interface object of controllers. */
395
+ var AbortController: {
396
+ prototype: AbortController;
397
+ new (): AbortController;
398
+ };
266
399
  }
267
400
 
268
401
  export {};
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { B as NamedNodeMap, C as TagName, D as DOMStringMap, F as IncaInputElement, G as ScrollIntoViewOptions, I as IncaNode, J as RectValues, K as ScrollOptions, L as IncaParent, N as IncaElement, O as DOMTokenList, P as IncaFragment, R as IncaTemplateElement, S as StyleProps, T as CSSStyleDeclaration, V as NodeListOf, _ as IncaWheelEvent, a as EventListenerOrObject, c as IncaEvent, d as IncaFocusEvent, f as IncaInputEvent, g as IncaUIEvent, h as IncaPointerEvent, ht as CallbackId, i as EventListenerObject, j as HTMLCollectionOf, l as IncaEventMap, m as IncaMouseEvent, mt as AttributeValue, n as EventLike, o as IncaCompositionEvent, p as IncaKeyboardEvent, q as RectLike, r as EventListener, s as IncaDocument, t as window, u as IncaEventTarget, v as IncaWindow, vt as NodeId, w as Attr, x as Px, y as ListenerOptions } from "./chunks/window-CE2esnja.js";
1
+ import { $ as RectLike, B as IncaComment, C as TagName, F as DOMTokenList, G as IncaNode, H as IncaFragment, J as IncaText, K as IncaParent, M as Attr, N as CSSStyleDeclaration, P as DOMStringMap, Q as ScrollOptions, R as HTMLCollectionOf, S as StyleProps, U as IncaHTMLElement, V as IncaElement, W as IncaInputElement, X as NodeListOf, Y as NamedNodeMap, Z as ScrollIntoViewOptions, _ as IncaWheelEvent, a as EventListenerOrObject, bt as AttributeValue, c as IncaEvent, d as IncaFocusEvent, et as RectValues, f as IncaInputEvent, g as IncaUIEvent, h as IncaPointerEvent, i as EventListenerObject, l as IncaEventMap, m as IncaMouseEvent, n as EventLike, o as IncaCompositionEvent, p as IncaKeyboardEvent, q as IncaTemplateElement, r as EventListener, s as IncaDocument, t as window, u as IncaEventTarget, v as IncaWindow, wt as NodeId, x as Px, xt as CallbackId, y as ListenerOptions } from "./chunks/window-DUfFz2C1.js";
2
2
  /**
3
3
  * The top node of the tree and the parent of the mount container. An event at an element passes
4
4
  * through it, and it is the next target after the mount container. A `wheel` listener is passive
5
5
  * unless its options say `passive: false`. It is an instance of the global `Document`.
6
6
  */
7
7
  export declare const document: IncaDocument;
8
- export { type Attr, type AttributeValue, type CSSStyleDeclaration, type CallbackId, type DOMStringMap, type DOMTokenList, type EventLike, type EventListener, type EventListenerObject, type EventListenerOrObject, type HTMLCollectionOf, type IncaCompositionEvent, type IncaDocument, type IncaElement, type IncaEvent, type IncaEventMap, type IncaEventTarget, type IncaFocusEvent, type IncaFragment, type IncaInputElement, type IncaInputEvent, type IncaKeyboardEvent, type IncaMouseEvent, type IncaNode, type IncaParent, type IncaPointerEvent, type IncaTemplateElement, type IncaUIEvent, type IncaWheelEvent, type IncaWindow, type ListenerOptions, type NamedNodeMap, type NodeId, type NodeListOf, type Px, type RectLike, type RectValues, type ScrollIntoViewOptions, type ScrollOptions, type StyleProps, type TagName, window };
8
+ export { type Attr, type AttributeValue, type CSSStyleDeclaration, type CallbackId, type DOMStringMap, type DOMTokenList, type EventLike, type EventListener, type EventListenerObject, type EventListenerOrObject, type HTMLCollectionOf, type IncaComment, type IncaCompositionEvent, type IncaDocument, type IncaElement, type IncaEvent, type IncaEventMap, type IncaEventTarget, type IncaFocusEvent, type IncaFragment, type IncaHTMLElement, type IncaInputElement, type IncaInputEvent, type IncaKeyboardEvent, type IncaMouseEvent, type IncaNode, type IncaParent, type IncaPointerEvent, type IncaTemplateElement, type IncaText, type IncaUIEvent, type IncaWheelEvent, type IncaWindow, type ListenerOptions, type NamedNodeMap, type NodeId, type NodeListOf, type Px, type RectLike, type RectValues, type ScrollIntoViewOptions, type ScrollOptions, type StyleProps, type TagName, window };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{s as e,t}from"./chunks/hooks-CxYWemIJ.js";const n=/* @__PURE__ */ e();export{n as document,t as window};
1
+ import{s as e,t}from"./chunks/hooks-DrVhbaR0.js";const n=/* @__PURE__ */ e();export{n as document,t as window};
@@ -1,3 +1,3 @@
1
- import { $ as focus, A as EventHandlers, B as NamedNodeMap, C as TagName, D as DOMStringMap, E as CharacterDataMembers, F as IncaInputElement, H as NodeMembers, I as IncaNode, L as IncaParent, M as HtmlMembers, N as IncaElement, O as DOMTokenList, P as IncaFragment, Q as dispatchEvent, R as IncaTemplateElement, S as StyleProps, T as CSSStyleDeclaration, U as TextContentMember, V as NodeListOf, W as TextMembers, X as blur, Y as isRemoved, Z as click, _ as IncaWheelEvent, a as EventListenerOrObject, at as getAttribute, b as Overflow, c as IncaEvent, ct as setAttribute, d as IncaFocusEvent, dt as holdNode, et as focusedNode, f as IncaInputEvent, ft as releaseNode, g as IncaUIEvent, h as IncaPointerEvent, ht as CallbackId, i as EventListenerObject, it as scrollOf, j as HTMLCollectionOf, k as EventHandler, l as IncaEventMap, lt as setStyle, m as IncaMouseEvent, mt as AttributeValue, n as EventLike, nt as scrollIntoViewNode, o as IncaCompositionEvent, ot as removeAttribute, p as IncaKeyboardEvent, pt as rootNodeId, r as EventListener, rt as scrollNode, s as IncaDocument, st as removeStyle, t as window, tt as layoutOf, u as IncaEventTarget, ut as createNode, v as IncaWindow, vt as NodeId, w as Attr, x as Px, y as ListenerOptions, yt as ScrollAlignment, z as IncaText } from "./chunks/window-CE2esnja.js";
2
- import { a as parentNode, c as createElementNode, d as rootElement, f as setElementText, g as createEventTarget, h as removeEventListener, i as nextSibling, l as createIncaElement, m as latestEventId, n as setText, o as remove, p as addEventListener, r as insert, s as createCommentNode, t as IncaCore, u as createTextNode } from "./chunks/rendererCore-B5s1VDRj.js";
3
- export { type Attr, type AttributeValue, type CSSStyleDeclaration, type CallbackId, type CharacterDataMembers, type DOMStringMap, type DOMTokenList, type EventHandler, type EventHandlers, type EventLike, type EventListener, type EventListenerObject, type EventListenerOrObject, type HTMLCollectionOf, type HtmlMembers, type IncaCompositionEvent, IncaCore, type IncaDocument, type IncaElement, type IncaEvent, type IncaEventMap, type IncaEventTarget, type IncaFocusEvent, type IncaFragment, type IncaInputElement, type IncaInputEvent, type IncaKeyboardEvent, type IncaMouseEvent, type IncaNode, type IncaParent, type IncaPointerEvent, type IncaTemplateElement, type IncaText, type IncaUIEvent, type IncaWheelEvent, type IncaWindow, type ListenerOptions, type NamedNodeMap, type NodeId, type NodeListOf, type NodeMembers, type Overflow, type Px, type ScrollAlignment, type StyleProps, type TagName, type TextContentMember, type TextMembers, addEventListener, blur, click, createCommentNode, createElementNode, createEventTarget, createIncaElement, createNode, createTextNode, dispatchEvent, focus, focusedNode, getAttribute, holdNode, insert, isRemoved, latestEventId, layoutOf, nextSibling, parentNode, releaseNode, remove, removeAttribute, removeEventListener, removeStyle, rootElement, rootNodeId, scrollIntoViewNode, scrollNode, scrollOf, setAttribute, setElementText, setStyle, setText, window };
1
+ import { A as TextContentMember, B as IncaComment, C as TagName, D as NonDocumentTypeChildNodeMembers, E as NodeMembers, F as DOMTokenList, G as IncaNode, H as IncaFragment, I as EventHandler, J as IncaText, K as IncaParent, L as EventHandlers, M as Attr, N as CSSStyleDeclaration, O as ParentNodeMembers, P as DOMStringMap, R as HTMLCollectionOf, S as StyleProps, T as ChildNodeMembers, Tt as ScrollAlignment, U as IncaHTMLElement, V as IncaElement, W as IncaInputElement, X as NodeListOf, Y as NamedNodeMap, _ as IncaWheelEvent, _t as holdNode, a as EventListenerOrObject, at as focus, b as Overflow, bt as AttributeValue, c as IncaEvent, ct as scrollIntoViewNode, d as IncaFocusEvent, dt as getAttribute, f as IncaInputEvent, ft as removeAttribute, g as IncaUIEvent, gt as createNode, h as IncaPointerEvent, ht as setStyle, i as EventListenerObject, it as dispatchEvent, j as TextMembers, k as ParentNodeMutationMembers, l as IncaEventMap, lt as scrollNode, m as IncaMouseEvent, mt as setAttribute, n as EventLike, nt as blur, o as IncaCompositionEvent, ot as focusedNode, p as IncaKeyboardEvent, pt as removeStyle, q as IncaTemplateElement, r as EventListener, rt as click, s as IncaDocument, st as layoutOf, t as window, tt as isRemoved, u as IncaEventTarget, ut as scrollOf, v as IncaWindow, vt as releaseNode, w as CharacterDataMembers, wt as NodeId, x as Px, xt as CallbackId, y as ListenerOptions, yt as rootNodeId, z as HtmlMembers } from "./chunks/window-DUfFz2C1.js";
2
+ import { a as parentNode, c as createElementNode, d as rootElement, f as setElementText, g as createEventTarget, h as removeEventListener, i as nextSibling, l as createIncaElement, m as latestEventId, n as setText, o as remove, p as addEventListener, r as insert, s as createCommentNode, t as IncaCore, u as createTextNode } from "./chunks/rendererCore-MkDukDmX.js";
3
+ export { type Attr, type AttributeValue, type CSSStyleDeclaration, type CallbackId, type CharacterDataMembers, type ChildNodeMembers, type DOMStringMap, type DOMTokenList, type EventHandler, type EventHandlers, type EventLike, type EventListener, type EventListenerObject, type EventListenerOrObject, type HTMLCollectionOf, type HtmlMembers, type IncaComment, type IncaCompositionEvent, IncaCore, type IncaDocument, type IncaElement, type IncaEvent, type IncaEventMap, type IncaEventTarget, type IncaFocusEvent, type IncaFragment, type IncaHTMLElement, type IncaInputElement, type IncaInputEvent, type IncaKeyboardEvent, type IncaMouseEvent, type IncaNode, type IncaParent, type IncaPointerEvent, type IncaTemplateElement, type IncaText, type IncaUIEvent, type IncaWheelEvent, type IncaWindow, type ListenerOptions, type NamedNodeMap, type NodeId, type NodeListOf, type NodeMembers, type NonDocumentTypeChildNodeMembers, type Overflow, type ParentNodeMembers, type ParentNodeMutationMembers, type Px, type ScrollAlignment, type StyleProps, type TagName, type TextContentMember, type TextMembers, addEventListener, blur, click, createCommentNode, createElementNode, createEventTarget, createIncaElement, createNode, createTextNode, dispatchEvent, focus, focusedNode, getAttribute, holdNode, insert, isRemoved, latestEventId, layoutOf, nextSibling, parentNode, releaseNode, remove, removeAttribute, removeEventListener, removeStyle, rootElement, rootNodeId, scrollIntoViewNode, scrollNode, scrollOf, setAttribute, setElementText, setStyle, setText, window };
@@ -1 +1 @@
1
- import{A as e,B as t,D as n,E as r,F as i,G as a,I as o,L as s,M as c,N as l,O as u,P as d,R as f,T as p,V as m,a as h,b as g,d as _,g as v,h as y,i as b,j as x,k as S,l as C,m as w,o as T,p as E,q as D,r as O,t as k,u as A,w as j}from"./chunks/hooks-CxYWemIJ.js";import{i as M,n as N,r as P,t as F}from"./chunks/treeOps-HfdCml0F.js";import"./chunks/rendererCore-Cnyh79II.js";export{w as addEventListener,p as blur,r as click,O as createCommentNode,b as createElementNode,E as createEventTarget,h as createIncaElement,t as createNode,T as createTextNode,n as dispatchEvent,u as focus,S as focusedNode,d as getAttribute,m as holdNode,F as insert,g as isRemoved,y as latestEventId,e as layoutOf,N as nextSibling,P as parentNode,a as releaseNode,j as releaseWhenCollected,M as remove,i as removeAttribute,v as removeEventListener,o as removeStyle,C as rootElement,D as rootNodeId,x as scrollIntoViewNode,c as scrollNode,l as scrollOf,s as setAttribute,A as setElementText,f as setStyle,_ as setText,k as window};
1
+ import{A as e,B as t,D as n,E as r,F as i,G as a,I as o,L as s,M as c,N as l,O as u,P as d,R as f,T as p,V as m,a as h,b as g,d as _,g as v,h as y,i as b,j as x,k as S,l as C,m as w,o as T,p as E,q as D,r as O,t as k,u as A,w as j}from"./chunks/hooks-DrVhbaR0.js";import{i as M,n as N,r as P,t as F}from"./chunks/treeOps-BFrsoJSW.js";import"./chunks/rendererCore-hjb_YEzl.js";export{w as addEventListener,p as blur,r as click,O as createCommentNode,b as createElementNode,E as createEventTarget,h as createIncaElement,t as createNode,T as createTextNode,n as dispatchEvent,u as focus,S as focusedNode,d as getAttribute,m as holdNode,F as insert,g as isRemoved,y as latestEventId,e as layoutOf,N as nextSibling,P as parentNode,a as releaseNode,j as releaseWhenCollected,M as remove,i as removeAttribute,v as removeEventListener,o as removeStyle,C as rootElement,D as rootNodeId,x as scrollIntoViewNode,c as scrollNode,l as scrollOf,s as setAttribute,A as setElementText,f as setStyle,_ as setText,k as window};
package/dist/style.js CHANGED
@@ -1 +1 @@
1
- import{C as e,L as t,P as n,W as r,a as i,i as a,l as o,n as s,o as c,q as l,v as u,z as d}from"./chunks/hooks-CxYWemIJ.js";import{i as f,t as p}from"./chunks/treeOps-HfdCml0F.js";const m=`data-inca-style`,h=/* @__PURE__ */ new Map;let g=!1;function _(e){let t=i(e,`element`,`style`);for(let t of d(e))u(s(t,String(n(t,`value`)??``)));return u(t),t}function v(){if(!g){for(let e of r(l(),`style[${m}]`))h.set(String(n(e,m)),_(e));g=!0}}function y(t,n){let r=d(t.__node_id);n&&p(c(n),t);for(let t of r){let n=e(t);n&&f(n)}}function b(e,n){v();let r=h.get(e);if(r!==void 0){y(r,n);return}let i=a(`style`);t(i.__node_id,m,e),y(i,n),p(i,o()),h.set(e,i)}function x(e){v();let t=h.get(e);t!==void 0&&(f(t),h.delete(e))}export{x as removeStyle,b as updateStyle};
1
+ import{C as e,L as t,P as n,W as r,a as i,i as a,l as o,n as s,o as c,q as l,v as u,z as d}from"./chunks/hooks-DrVhbaR0.js";import{i as f,t as p}from"./chunks/treeOps-BFrsoJSW.js";const m=`data-inca-style`,h=/* @__PURE__ */ new Map;let g=!1;function _(e){let t=i(e,`style`);for(let t of d(e))u(s(t,String(n(t,`value`)??``)));return u(t),t}function v(){if(!g){for(let e of r(l(),`style[${m}]`))h.set(String(n(e,m)),_(e));g=!0}}function y(t,n){let r=d(t.__node_id);n&&p(c(n),t);for(let t of r){let n=e(t);n&&f(n)}}function b(e,n){v();let r=h.get(e);if(r!==void 0){y(r,n);return}let i=a(`style`);t(i.__node_id,m,e),y(i,n),p(i,o()),h.set(e,i)}function x(e){v();let t=h.get(e);t!==void 0&&(f(t),h.delete(e))}export{x as removeStyle,b as updateStyle};
package/dist/vue.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { N as IncaElement } from "./chunks/window-CE2esnja.js";
2
- import "./chunks/rendererCore-B5s1VDRj.js";
1
+ import { V as IncaElement } from "./chunks/window-DUfFz2C1.js";
2
+ import "./chunks/rendererCore-MkDukDmX.js";
3
3
  import { App, Component, ComponentPublicInstance } from "@vue/runtime-core";
4
4
  /**
5
5
  * `@vue/runtime-core`'s `App`, with `mount` also callable with no argument
package/dist/vue.js CHANGED
@@ -1,2 +1,2 @@
1
- import{l as e}from"./chunks/hooks-CxYWemIJ.js";import{t}from"./chunks/rendererCore-Cnyh79II.js";import{ErrorCodes as n,callWithAsyncErrorHandling as r,createRenderer as i,warn as a}from"@vue/runtime-core";function o(e){return Object.defineProperty(e,"__v_skip",{value:!0}),e}function s(e){return{createElement:t=>o(e.createElementNode(t)),createText:t=>o(e.createTextNode(t)),createComment:t=>o(e.createCommentNode(t)),setText:(t,n)=>e.setText(t,n),setElementText:(t,n)=>e.setElementText(t,n),insert:(t,n,r)=>e.insert(t,n,r),setScopeId:(t,n)=>e.setAttribute(t.__node_id,n,``),remove:t=>e.remove(t),parentNode:e.parentNode,nextSibling:e.nextSibling}}function c(e,t){let n=t=>(e.holdNode(t.__node_id),e.releaseWhenCollected(t),t),{createElement:r,createText:i}=t;return{createElement:e=>n(r(e)),createText:e=>n(i(e))}}const l=e=>/^on[^a-z]/.test(e),u=e=>/^on[a-z]/.test(e),d=/(?:Once|Passive|Capture)$/,f=/^on:?(?:Once|Passive|Capture)$/,p=e=>e.replace(/\B([A-Z])/g,`-$1`).toLowerCase();function m(e){let t=e,n={event:``,once:!1,capture:!1,passive:!1},r;for(;(r=t.match(d))&&!f.test(t);)t=t.slice(0,-r[0].length),r[0]===`Once`?n.once=!0:r[0]===`Capture`?n.capture=!0:n.passive=!0;return n.event=t[2]===`:`?t.slice(3):p(t.slice(2)),n}const h=e=>typeof e==`string`||typeof e==`number`,g=/* @__PURE__ */ new WeakMap,_=/* @__PURE__ */ new WeakSet;function v(e,t,n){let r=g.get(t);if(r||g.set(t,r=/* @__PURE__ */ new Map),typeof n==`string`){e.setAttribute(t.__node_id,`style`,n),r.clear(),_.add(t);return}_.delete(t)&&e.setAttribute(t.__node_id,`style`,``);let i=typeof n==`object`&&n?n:{},a=!1;for(let n of r.keys())h(i[n])||(e.removeStyle(t.__node_id,n),r.delete(n),a=!0);for(let[n,o]of Object.entries(i))h(o)&&(a||r.get(n)!==o)&&(e.setStyle(t.__node_id,n,o),r.set(n,o))}function y(e,t){return e?typeof e==`function`?[e]:Array.isArray(e)?e.slice():(a(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
2
- Expected function or array of functions, received type ${typeof e}.`),[]):null}function b(e,t){let n=e[0];if(typeof n!=`object`||!n)return t(()=>!1);let r=n.stopImmediatePropagation;if(typeof r!=`function`)return t(()=>!1);let i=Object.hasOwn(n,`stopImmediatePropagation`),a=!1;try{n.stopImmediatePropagation=(...e)=>(a=!0,r.apply(n,e))}catch{return t(()=>!1)}try{t(()=>a)}finally{i?n.stopImmediatePropagation=r:delete n.stopImmediatePropagation}}const x=/* @__PURE__ */ new WeakMap,S=({event:e,capture:t,passive:n})=>`${e}:${t===!0}:${n===!0}`;function C(e,t,n,r){let i=Array.from(r.slots.values()).some(e=>!e.fired);i&&!r.registered&&!e.isRemoved(t)?(e.addEventListener(t.__node_id,r.event,r.dispatcher,r.options),r.registered=!0):!i&&r.registered&&(r.registered=!1,e.removeEventListener(t.__node_id,r.event,r.dispatcher,r.options)),r.slots.size===0&&x.get(t)?.delete(n)}function w(e,t,i,{event:a,capture:o,passive:s}){let c={event:a,options:{capture:o,passive:s},slots:/* @__PURE__ */ new Map,registered:!1,dispatcher:(...a)=>{let o=[],s=a[0]?.eventId;b(a,l=>{for(let u of Array.from(c.slots.keys())){if(l())break;let d=c.slots.get(u);if(d&&!d.fired&&!(typeof s==`number`&&d.attachedAt>=s)){d.once&&(d.fired=!0,C(e,t,i,c));for(let e of d.handlers){if(l())break;if(e)try{r(e,d.instance,n.NATIVE_EVENT_HANDLER,a)}catch(e){o.push(e)}}}}});for(let e of o.slice(1))Promise.reject(e);if(o.length>0)throw o[0]}};return c}function T(e,t,n,r){let i=S(n),a=x.get(t)?.get(i);a?.slots.delete(r)&&C(e,t,i,a)}function E(e,t,n,r,i){let a=m(n),o=y(r,n);if(!o){T(e,t,a,n);return}let s=S(a),c=x.get(t);c||x.set(t,c=/* @__PURE__ */ new Map);let l=c.get(s);l||c.set(s,l=w(e,t,s,a));let u=l.slots.get(n);if(u)u.handlers=o,u.instance=i;else{l.slots.set(n,{attachedAt:e.latestEventId(),handlers:o,instance:i,once:a.once,fired:!1});try{C(e,t,s,l)}catch(e){throw l.slots.delete(n),l.slots.size===0&&c.delete(s),e}}}const D=/* @__PURE__ */ new Set([`disabled`,`hidden`,`inert`,`allowfullscreen`,`formnovalidate`,`ismap`,`itemscope`,`nomodule`,`novalidate`,`readonly`]);function O(e){return(t,n,r,i,a,o)=>{n.startsWith(`onUpdate:`)||(n===`style`?v(e,t,i):l(n)?E(e,t,n,i,o??null):u(n)&&n in t?typeof i==`string`?(Reflect.set(t,n,null),e.setAttribute(t.__node_id,n,i)):Reflect.set(t,n,i):n===`value`&&`value`in t?Reflect.set(t,n,i??``):D.has(n)?n===`hidden`&&typeof i==`string`&&/^until-found$/i.test(i)?e.setAttribute(t.__node_id,n,i):i||i===``?e.setAttribute(t.__node_id,n,``):e.removeAttribute(t.__node_id,n):typeof i==`string`||typeof i==`number`||typeof i==`boolean`?e.setAttribute(t.__node_id,n,i):i==null?e.removeAttribute(t.__node_id,n):e.setAttribute(t.__node_id,n,String(i)))}}const k=/* @__PURE__ */ new Set;function A(n,r){let a={...s(t),patchProp:O(t)},l=i(a);Object.assign(a,c(t,a));let u=l.createApp(n,r),d=u.mount.bind(u),f=u.unmount.bind(u);return Object.assign(u,{mount:t=>{let n=d(t??o(e()));return k.add(u),n},unmount:()=>{f(),k.delete(u)}})}export{A as createIncaApp};
1
+ import{l as e}from"./chunks/hooks-DrVhbaR0.js";import{t}from"./chunks/rendererCore-hjb_YEzl.js";import{ErrorCodes as n,callWithAsyncErrorHandling as r,createRenderer as i,warn as a}from"@vue/runtime-core";function o(e){return{createElement:t=>e.createElementNode(t),createText:t=>e.createTextNode(t),createComment:t=>e.createCommentNode(t),setText:(t,n)=>e.setText(t,n),setElementText:(t,n)=>e.setElementText(t,n),insert:(t,n,r)=>e.insert(t,n,r),setScopeId:(t,n)=>e.setAttribute(t.__node_id,n,``),remove:t=>e.remove(t),parentNode:e.parentNode,nextSibling:e.nextSibling}}function s(e,t){let n=t=>(e.holdNode(t.__node_id),e.releaseWhenCollected(t),t),{createElement:r,createText:i}=t;return{createElement:e=>n(r(e)),createText:e=>n(i(e))}}const c=e=>/^on[^a-z]/.test(e),l=e=>/^on[a-z]/.test(e),u=/(?:Once|Passive|Capture)$/,d=/^on:?(?:Once|Passive|Capture)$/,f=e=>e.replace(/\B([A-Z])/g,`-$1`).toLowerCase();function p(e){let t=e,n={event:``,once:!1,capture:!1,passive:!1},r;for(;(r=t.match(u))&&!d.test(t);)t=t.slice(0,-r[0].length),r[0]===`Once`?n.once=!0:r[0]===`Capture`?n.capture=!0:n.passive=!0;return n.event=t[2]===`:`?t.slice(3):f(t.slice(2)),n}const m=e=>typeof e==`string`||typeof e==`number`,h=/* @__PURE__ */ new WeakMap,g=/* @__PURE__ */ new WeakSet;function _(e,t,n){let r=h.get(t);if(r||h.set(t,r=/* @__PURE__ */ new Map),typeof n==`string`){e.setAttribute(t.__node_id,`style`,n),r.clear(),g.add(t);return}g.delete(t)&&e.setAttribute(t.__node_id,`style`,``);let i=typeof n==`object`&&n?n:{},a=!1;for(let n of r.keys())m(i[n])||(e.removeStyle(t.__node_id,n),r.delete(n),a=!0);for(let[n,o]of Object.entries(i))m(o)&&(a||r.get(n)!==o)&&(e.setStyle(t.__node_id,n,o),r.set(n,o))}function v(e,t){return e?typeof e==`function`?[e]:Array.isArray(e)?e.slice():(a(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
2
+ Expected function or array of functions, received type ${typeof e}.`),[]):null}function y(e,t){let n=e[0];if(typeof n!=`object`||!n)return t(()=>!1);let r=n.stopImmediatePropagation;if(typeof r!=`function`)return t(()=>!1);let i=Object.hasOwn(n,`stopImmediatePropagation`),a=!1;try{n.stopImmediatePropagation=(...e)=>(a=!0,r.apply(n,e))}catch{return t(()=>!1)}try{t(()=>a)}finally{i?n.stopImmediatePropagation=r:delete n.stopImmediatePropagation}}const b=/* @__PURE__ */ new WeakMap,x=({event:e,capture:t,passive:n})=>`${e}:${t===!0}:${n===!0}`;function S(e,t,n,r){let i=Array.from(r.slots.values()).some(e=>!e.fired);i&&!r.registered&&!e.isRemoved(t)?(e.addEventListener(t.__node_id,r.event,r.dispatcher,r.options),r.registered=!0):!i&&r.registered&&(r.registered=!1,e.removeEventListener(t.__node_id,r.event,r.dispatcher,r.options)),r.slots.size===0&&b.get(t)?.delete(n)}function C(e,t,i,{event:a,capture:o,passive:s}){let c={event:a,options:{capture:o,passive:s},slots:/* @__PURE__ */ new Map,registered:!1,dispatcher:(...a)=>{let o=[],s=a[0]?.eventId;y(a,l=>{for(let u of Array.from(c.slots.keys())){if(l())break;let d=c.slots.get(u);if(d&&!d.fired&&!(typeof s==`number`&&d.attachedAt>=s)){d.once&&(d.fired=!0,S(e,t,i,c));for(let e of d.handlers){if(l())break;if(e)try{r(e,d.instance,n.NATIVE_EVENT_HANDLER,a)}catch(e){o.push(e)}}}}});for(let e of o.slice(1))Promise.reject(e);if(o.length>0)throw o[0]}};return c}function w(e,t,n,r){let i=x(n),a=b.get(t)?.get(i);a?.slots.delete(r)&&S(e,t,i,a)}function T(e,t,n,r,i){let a=p(n),o=v(r,n);if(!o){w(e,t,a,n);return}let s=x(a),c=b.get(t);c||b.set(t,c=/* @__PURE__ */ new Map);let l=c.get(s);l||c.set(s,l=C(e,t,s,a));let u=l.slots.get(n);if(u)u.handlers=o,u.instance=i;else{l.slots.set(n,{attachedAt:e.latestEventId(),handlers:o,instance:i,once:a.once,fired:!1});try{S(e,t,s,l)}catch(e){throw l.slots.delete(n),l.slots.size===0&&c.delete(s),e}}}const E=/* @__PURE__ */ new Set([`disabled`,`hidden`,`inert`,`allowfullscreen`,`formnovalidate`,`ismap`,`itemscope`,`nomodule`,`novalidate`,`readonly`]);function D(e){return(t,n,r,i,a,o)=>{n.startsWith(`onUpdate:`)||(n===`style`?_(e,t,i):c(n)?T(e,t,n,i,o??null):l(n)&&n in t?typeof i==`string`?(Reflect.set(t,n,null),e.setAttribute(t.__node_id,n,i)):Reflect.set(t,n,i):n===`value`&&`value`in t?Reflect.set(t,n,i??``):E.has(n)?n===`hidden`&&typeof i==`string`&&/^until-found$/i.test(i)?e.setAttribute(t.__node_id,n,i):i||i===``?e.setAttribute(t.__node_id,n,``):e.removeAttribute(t.__node_id,n):typeof i==`string`||typeof i==`number`||typeof i==`boolean`?e.setAttribute(t.__node_id,n,i):i==null?e.removeAttribute(t.__node_id,n):e.setAttribute(t.__node_id,n,String(i)))}}const O=/* @__PURE__ */ new Set;function k(n,r){let a={...o(t),patchProp:D(t)},c=i(a);Object.assign(a,s(t,a));let l=c.createApp(n,r),u=l.mount.bind(l),d=l.unmount.bind(l);return Object.assign(l,{mount:t=>{let n=u(t??e());return O.add(l),n},unmount:()=>{d(),O.delete(l)}})}export{k as createIncaApp};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incajs",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "description": "A GPU-native, Webview-free desktop app framework built on GPUI and QuickJS.",
5
5
  "keywords": [
6
6
  "cross-platform",
@@ -33,6 +33,7 @@
33
33
  ],
34
34
  "type": "module",
35
35
  "sideEffects": [
36
+ "src/abortSignal.mts",
36
37
  "src/callbacks.mts",
37
38
  "src/targets.mts",
38
39
  "dist/chunks/hooks-*.js"
@@ -1 +0,0 @@
1
- const e=`http://www.w3.org/1999/xhtml`;function t(){return globalThis.__inca_native__}function n(){return t().rootNodeId()}function r(){return t().documentNodeId()}function i(e){return t().createElement(e)}function a(e,n){return t().createElementNS(e,n)}function o(e){return e.length===5?[e[1],e[2],e[3],e[4]]:e[1]}function s(e){return e[2]===`http://www.w3.org/1999/xhtml`?e[1]:[e[1],e[2],null,e[1]]}function c(e){return t().createNode(e)}function l(e,n){return t().appendChild(e,n)}function u(e,n,r){return t().insertBefore(e,n,r)}function d(e,n){t().removeChild(e,n)}function ee(e,n,r){return t().replaceChild(e,n,r)}function f(e,n){return t().cloneNode(e,n)}function te(e){return t().innerHtml(e)}function ne(e){return t().outerHtml(e)}function re(e,n){return t().setInnerHtml(e,n)}function ie(e,n){return t().setOuterHtml(e,n)}function ae(e,n,r){return t().insertAdjacentHtml(e,n,r)}function oe(e){return t().rootOf(e)}function se(e,n){return t().compareNodePosition(e,n)}function ce(e,n){return t().isEqualNode(e,n)}function le(e){return t().removeNode(e)}function p(e){t().holdNode(e)}function ue(e){t().releaseNode(e)}function de(e){return t().templateContent(e)}function m(e,n,r){return t().linkedNode(e,n,r)}function h(e,n){return t().childNodeIds(e,n)}function fe(e){return t().isConnected(e)}function pe(e){return t().textContent(e)}function me(e){return t().wholeText(e)}function he(e,n,r){return t().substringData(e,n,r)}function ge(e,n,r,i){t().replaceData(e,n,r,i)}function _e(e,n){return t().splitText(e,n)}function ve(e,n){return t().matches(e,n)}function ye(e,n){return t().closest(e,n)}function be(e,n){return t().querySelector(e,n)}function xe(e,n){return t().querySelectorAll(e,n)}function g(e){t().checkSelector(e)}function _(e,n,r){t().setAttribute(e,n,r)}function Se(e,n){return t().attributeKey(e,n)}function v(e,n){return t().getAttribute(e,n)}function Ce(e){return t().classList(e)}function we(e){return t().attributeNames(e)}function Te(e,n){return t().datasetGet(e,n)}function Ee(e,n,r){t().datasetSet(e,n,r)}function De(e,n){return t().datasetDelete(e,n)}function Oe(e){return t().datasetKeys(e)}function ke(){return t().datasetTarget()}function Ae(e,n){t().removeAttribute(e,n)}function je(e,n,r){t().setStyle(e,n,r)}function Me(e,n){t().removeStyle(e,n)}function Ne(e){return t().styleOf(e)}function Pe(e){return t().inputValue(e)}function Fe(e,n){t().setInputValue(e,n)}function Ie(e){return t().layoutOf(e)}function y(e){return t().scrollOf(e)}function Le(e,n,r){t().scrollNode(e,n,r)}function Re(e,n,r){t().scrollIntoViewNode(e,n,r)}function ze(e,n,r,i,a){return t().addEventListener(e,n,r,i,a)}function Be(e,n,r){return t().removeEventListener(e,n,r)}function Ve(e,n){return t().dispatchEvent(e,n)}function He(e){t().click(e)}function Ue(e,n){t().focusNode(e,n)}function We(e){t().blurNode(e)}function Ge(e,n){t().setPointerCapture(e,n)}function Ke(e,n){t().releasePointerCapture(e,n)}function qe(e,n){return t().hasPointerCapture(e,n)}function Je(){return t().focusedNode()}function b(){let e=[],t=[];return{get:t=>e[t>>>10]?.[t&1023],set(n,r){let i=n>>>10;for(;e.length<=i;)e.push(void 0),t.push(0);let a=e[i];a===void 0&&(a=e[i]=Array.from({length:1024}));let o=n&1023;a[o]===void 0&&t[i]++,a[o]=r},delete(n){let r=n>>>10,i=e[r],a=n&1023;i?.[a]!==void 0&&(i[a]=void 0,--t[r]===0&&(e[r]=void 0))}}}const Ye=/* @__PURE__ */ new WeakSet;function x(e,t){return Ye.add(e),Object.defineProperty(e,"__node_id",{value:t})}function Xe(e){return typeof e==`object`&&!!e&&Ye.has(e)}const S=b(),C=b();let Ze;function w(e){S.delete(e.__node_id),C.set(e.__node_id,new WeakRef(e))}function Qe(e){Ze=e.__node_id,w(e)}function T(e){let t=e.__node_id;t!==Ze&&(S.set(t,e),C.delete(t))}function E(e){D(e),O(e)}const $e=/* @__PURE__ */ new WeakMap;function et(e,t){D(e);let n=[];for(let r of t){let t=k(r);t!==void 0&&t!==e&&(D(t),n.push(t))}$e.set(e,n),dt(e)||M(e)}function D(e){let t=e.__node_id;C.set(t,new WeakRef(e)),S.delete(t)}function O(e){dt(e)||(p(e.__node_id),M(e))}function k(e){return S.get(e)??C.get(e)?.deref()}function tt(e){let t=k(e);return t?.kind===`element`?t:void 0}const nt=/* @__PURE__ */ new WeakMap,rt=/* @__PURE__ */ new WeakMap;function it(e){return e.kind===`element`?nt.get(e):void 0}function at(e,t){nt.set(e,t),rt.set(t,e)}const ot=/* @__PURE__ */ new WeakSet;function A(e){return ot.has(e)||j(e)}function st(e){for(let t of e){let e=k(t);e&&ot.add(e)}}function j(e){return k(e.__node_id)!==e}function ct(e){for(let t of e)S.delete(t),C.delete(t)}const lt=new FinalizationRegistry(e=>ue(e)),ut=/* @__PURE__ */ new WeakSet;function dt(e){return ut.has(e)}function M(e){ut.add(e),lt.register(e,e.__node_id)}const N=/* @__PURE__ */ new Map,P=b();function ft(e,t,n){let r=N.get(e);r||N.set(e,r=/* @__PURE__ */ new Map),r.set(t,n),P.set(n,{group:e,listener:t})}function pt(e,t){return N.get(e)?.get(t)}function mt(e){let t=P.get(e);if(t===void 0)return;P.delete(e);let n=N.get(t.group);n?.delete(t.listener),n?.size===0&&N.delete(t.group)}function ht(e){for(let t of e)mt(t)}const gt=(e,t,n)=>`${e}:${t}:${n===!0}`;Object.defineProperty(globalThis,"__inca_released__",{value:(e,t)=>{ht(t),ct(e)},configurable:!0});let F=0;function _t(){return F}function vt(e){return(...t)=>{let n=t[0]?.eventId;return typeof n==`number`&&n>F&&(F=n),e(...t)}}function yt(e,t,n,r={}){if(n==null)return;let i=gt(e,t,r.capture);if(pt(i,n)!==void 0)return;let a=(...e)=>typeof n==`function`?n.apply(e[0]?.currentTarget,e):n.handleEvent.apply(n,e);ft(i,n,ze(e,t,vt(r.once?(...i)=>(bt(e,t,n,r),a(...i)):a),r.capture===!0,r.passive===!0))}function bt(e,t,n,r={}){if(n==null)return;let i=pt(gt(e,t,r.capture),n);i!==void 0&&(Be(e,t,i),mt(i))}function I(e,t=[]){let n=typeof e==`function`?e:()=>e;return{addEventListener(e,r,i){let a=typeof i==`boolean`?{capture:i}:i??{};yt(n(),e,r,{...a,passive:a.passive??t.includes(e)})},removeEventListener(e,t,r){let i=typeof r==`boolean`?r:r?.capture;bt(n(),e,t,{capture:i})},dispatchEvent:e=>Ve(n(),e)}}function L(e){if(typeof e==`symbol`)throw TypeError(`a symbol cannot become text`);return String(e)}function R(e,t,n){if(e.length<t)throw TypeError(`${n}() needs ${t} argument${t===1?``:`s`}`)}function xt(e){return e==null?``:L(e)}function z(e,t){if(!Xe(e))throw TypeError(`parameter ${t} is not a node. pass an element, a text node, a comment or a fragment`);return e}const St=/^(?:0|[1-9]\d*)$/,Ct=2**32-1;function B(e){return St.test(e)&&Number(e)<Ct}function wt(e,t){return t===``?null:e.find(e=>e.id===t)??e.find(e=>e.getAttribute(`name`)===t)??null}function Tt(e){let t=/* @__PURE__ */ new Set;for(let n of e)t.add(n.id),t.add(n.getAttribute(`name`)??``);return t.delete(``),[...t]}function Et(e){let{source:t,named:n}=e,r=e=>{if(e!==l)throw TypeError(`the receiver is not a collection. call it on one`)},i={writable:!0,enumerable:!0,configurable:!0},a=Object.create(Object.prototype,{length:{get(){return r(this),t().length},enumerable:!0,configurable:!0},item:{...i,value:Object.defineProperty(function(...e){if(r(this),e.length<1)throw TypeError(`item() needs 1 argument`);return t()[e[0]>>>0]??null},"length",{value:1})},...e.method&&{[e.method]:{...i,value(...t){if(r(this),t.length<1)throw TypeError(`${e.method}() needs 1 argument`);return e.find(`${t[0]}`)}}},...e.arrayMembers&&{forEach:{...i,value:Array.prototype.forEach},entries:{...i,value:Array.prototype.entries},keys:{...i,value:Array.prototype.keys},values:{...i,value:Array.prototype.values}},[Symbol.iterator]:{...i,enumerable:!1,value:Array.prototype.values},[Symbol.toStringTag]:{value:e.tag,configurable:!0}}),o=Object.create(a),s=e=>Object.hasOwn(o,e),c=e=>B(e)||!s(e)&&!(e in a)&&n(e)!==null,l=new Proxy(o,{get(e,r,i){return typeof r==`symbol`?Reflect.get(o,r,i):B(r)?t()[Number(r)]:r in o?Reflect.get(o,r,i):n(r)??void 0},has(e,r){return typeof r==`symbol`||r in o?r in o:B(r)?Number(r)<t().length:n(r)!==null},set(e,t,n,r){return r===l&&typeof t==`string`&&c(t)?!1:Reflect.set(o,t,n,r)},deleteProperty(e,n){if(typeof n==`string`){if(B(n))return Number(n)>=t().length;if(c(n))return!1}return Reflect.deleteProperty(o,n)},preventExtensions:()=>!1,defineProperty(e,t,n){return typeof t==`string`&&c(t)?!1:Reflect.defineProperty(o,t,n)},ownKeys(){let n=t(),r=Array.from(n,(e,t)=>String(t)),i=e.names(n).filter(e=>!B(e)&&!(e in a)&&!s(e)),c=Reflect.ownKeys(o);return[...r,...c,...i]},getOwnPropertyDescriptor(e,r){if(typeof r==`symbol`||s(r))return Reflect.getOwnPropertyDescriptor(o,r);if(B(r)){let e=t()[Number(r)];return e?{value:e,writable:!1,enumerable:!0,configurable:!0}:void 0}let i=r in a?void 0:n(r);return i?{value:i,writable:!1,enumerable:!1,configurable:!0}:void 0}});return l}function Dt(e){let t=t=>wt(e(),t);return Et({tag:`HTMLCollection`,method:`namedItem`,source:e,find:t,named:t,names:Tt})}function Ot(e,t){return Et({tag:`NamedNodeMap`,method:`getNamedItem`,source:e,find:t,named:t,names:e=>e.map(e=>e.name)})}function kt(e){return Et({tag:`NodeList`,arrayMembers:!0,source:e,find:()=>null,named:()=>null,names:()=>[]})}var At=class e{#e;#t;#n;#r;#i;constructor(e,t,n,r,i){this.#e=e,this.#i=t,this.#t=n,this.#r=r,this.#n=i}static detach(e){e.#r=null,e.#n(e)}#a(){if(this.#r===null)return!1;let t=j(this.#r)?null:v(this.#t,this.#e);return t===null?(e.detach(this),!1):(this.#i=L(t),!0)}get name(){return this.#e}get localName(){return this.#e}get value(){return this.#a(),this.#i}set value(e){let t=L(e);this.#a()&&_(this.#t,this.#e,t),this.#i=t}get namespaceURI(){return null}get prefix(){return null}get specified(){return!0}get ownerElement(){return this.#a(),this.#r}get[Symbol.toStringTag](){return`Attr`}};function jt(e,t){let n=t=>{let n=v(e,t);return n===null?null:L(n)},r=()=>j(t)?[]:we(e),i=/* @__PURE__ */ new Map,a=e=>{i.get(e.name)===e&&i.delete(e.name)},o=(n,r)=>{let o=i.get(n);return o||(o=new At(n,r,e,t,a),i.set(n,o)),o},s=r=>{if(j(t))return null;let a=Se(e,r),s=n(a);if(s!==null)return o(a,s);let c=i.get(a);return c&&At.detach(c),null},c=()=>{let e=r(),t=new Set(e);for(let[e,n]of i)t.has(e)||At.detach(n);return e.map(e=>i.get(e)??o(e,n(e)))},l;return{getAttribute:(...e)=>(R(e,1,`getAttribute`),j(t)?null:n(L(e[0]))),setAttribute:(...n)=>{R(n,2,`setAttribute`);let r=L(n[0]),i=L(n[1]);j(t)||_(e,r,i)},hasAttribute:(...e)=>(R(e,1,`hasAttribute`),!j(t)&&n(L(e[0]))!==null),removeAttribute:(...n)=>{R(n,1,`removeAttribute`);let r=L(n[0]);j(t)||Ae(e,r)},getAttributeNames:()=>r(),get attributes(){return l??=Ot(c,s),l}}}function Mt(e,t){let n;return{get className(){return j(t)?``:String(v(e,`class`)??``)},set className(n){let r=L(n);j(t)||_(e,`class`,r)},get classList(){return n??=Ce(e)},set classList(t){(n??=Ce(e)).value=t}}}function Nt(e){let t;return{get dataset(){return t??=new Proxy(ke(),{get(t,n,r){let i=typeof n==`string`?Te(e,n):void 0;return typeof i==`string`?i:Reflect.get(t,n,r)},set(t,n,r,i){return typeof n==`string`?(Ee(e,n,L(r)),!0):Reflect.set(t,n,r,i)},deleteProperty(t,n){return typeof n==`string`?De(e,n):Reflect.deleteProperty(t,n)},defineProperty(t,n,r){return typeof n==`string`?!(`value`in r)||r.configurable===!1?!1:(Ee(e,n,L(r.value)),!0):Reflect.defineProperty(t,n,r)},preventExtensions:()=>!1,has:(t,n)=>typeof n==`string`&&Oe(e).includes(n)||Reflect.has(t,n),ownKeys:t=>[...Oe(e),...Reflect.ownKeys(t)],getOwnPropertyDescriptor(t,n){let r=typeof n==`string`?Te(e,n):void 0;return typeof r==`string`?{value:r,writable:!0,enumerable:!0,configurable:!0}:Reflect.getOwnPropertyDescriptor(t,n)}}),t}}}function Pt(e,t){let n=e.__node_id,r=e=>t.node(e),i=t=>{if(j(e))return null;let i=m(n,t,!0);return i===null?null:r(i)??null},a=()=>j(e)?[]:h(n,!0).flatMap(e=>r(e)??[]),o;return{get children(){return o??=Dt(a)},get parentElement(){return i(`parent`)},get firstElementChild(){return i(`first`)},get lastElementChild(){return i(`last`)},get childElementCount(){return a().length},get previousElementSibling(){return i(`previous`)},get nextElementSibling(){return i(`next`)}}}const Ft=((...e)=>e)(`auxclick`,`beforeinput`,`blur`,`change`,`click`,`contextmenu`,`dblclick`,`focus`,`gotpointercapture`,`input`,`keydown`,`keypress`,`keyup`,`lostpointercapture`,`mousedown`,`mouseenter`,`mouseleave`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointerenter`,`pointerleave`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`scroll`,`wheel`);function It(e,t){for(let n of Ft){let r=null,i=function(e){typeof r==`function`&&Reflect.apply(r,this,[e])===!1&&e.preventDefault()};Object.defineProperty(e,`on${n}`,{get:()=>r,set(a){t()||(r=typeof a==`function`||typeof a==`object`&&a?a:null,r===null?e.removeEventListener(n,i):e.addEventListener(n,i))}})}return e}function V(e){return A(e)?null:Ie(e.__node_id)}function Lt(e,t){if(!V(e))return null;let n=m(e.__node_id,`parent`,!0),r=n===null?void 0:t.node(n);return r&&V(r)?r:null}function Rt(e,t){let n=V(e);if(!n)return{left:0,top:0};let r=Lt(e,t),i=r?V(r):null;return{left:Math.round(n[0]-(i?i[0]+i[4]:0)+n[5])||0,top:Math.round(n[1]-(i?i[1]+i[4]:0)+n[6])||0}}function zt(e){let[t,n,r,i]=e??[0,0,0,0,0],a={x:t,y:n,width:r,height:i,top:n,left:t,right:t+r,bottom:n+i};return{...a,toJSON:()=>({...a})}}function Bt(e,t){let n=t===`button`||t===`input`?0:-1;if(typeof e!=`string`&&typeof e!=`number`)return n;let r=/^[\t\n\f\r ]*([+-]?\d+)/.exec(String(e));if(!r)return n;let i=Number(r[1])||0;return i>=-2147483648&&i<=2147483647?i:n}function Vt(e,t){return{getBoundingClientRect:()=>zt(V(e)),get offsetWidth(){return Math.round(V(e)?.[2]??0)},get offsetHeight(){return Math.round(V(e)?.[3]??0)},get offsetLeft(){return Rt(e,t).left},get offsetTop(){return Rt(e,t).top},get offsetParent(){return Lt(e,t)},get clientWidth(){let t=V(e);return t?Math.max(0,Math.round(t[2]-2*t[4])):0},get clientHeight(){let t=V(e);return t?Math.max(0,Math.round(t[3]-2*t[4])):0},get clientLeft(){return Math.round(V(e)?.[4]??0)},get clientTop(){return Math.round(V(e)?.[4]??0)}}}function Ht(e){return e===null?``:L(e)}function Ut(e,t){for(let n of e[1]){let[e,r]=n;r!==`#fragment`&&T(r===`#text`?t.text(e,n[4]??``):r===`#comment`?t.element(e,`comment`):t.element(e,`element`,s(n)))}}function Wt(e,t){let n=e.__node_id;return{get innerHTML(){return j(e)?``:te(n)},set innerHTML(r){let i=Ht(r);if(j(e))return;let a=h((it(e)??e).__node_id),o=re(n,i);for(let e of a){let t=k(e);t&&E(t)}Ut(o,t)},get outerHTML(){return j(e)?``:ne(n)},set outerHTML(r){let i=Ht(r);if(j(e))return;let a=ie(n,i);a!==null&&(E(e),Ut(a,t))},insertAdjacentHTML:(...r)=>{R(r,2,`insertAdjacentHTML`);let i=L(r[0]),a=L(r[1]);j(e)||Ut(ae(n,i,a),t)}}}function Gt(e){let t,n=()=>t??=Ne(e);return{get style(){return n()},set style(e){n().cssText=e===null?``:L(e)}}}function Kt(e,t,n){if(e.length===5)return n.element(e[0],`element`,o(e));switch(e[1]){case`#text`:return n.text(e[0],e[2]??``);case`#comment`:return n.element(e[0],`comment`);case`#document`:return n.documentCopy(e[0]);default:return t===0?n.fragment(e[0]):void 0}}function qt(e,t,n){let r=f(e.__node_id,t),i=Kt(r[0],0,n);for(let[e,t]of r.entries()){if(e===0)continue;let r=Kt(t,e,n);r&&T(r)}return O(i),i}function H(){return new DOMException(`the node was freed. pass a child of the node you call it on`,`NotFoundError`)}function U(e,t){let n=e.__node_id,r=e=>{e.kind!==`fragment`&&T(e)};return{appendChild:(...e)=>{R(e,1,`appendChild`);let t=z(e[0],1);return l(n,t.__node_id),r(t),t},insertBefore:(...e)=>{R(e,2,`insertBefore`);let t=z(e[0],1),i=e[1]===null||e[1]===void 0?null:z(e[1],2);if(i&&j(i))throw H();return u(n,t.__node_id,i?.__node_id??null),r(t),t},removeChild:(...e)=>{R(e,1,`removeChild`);let t=z(e[0],1);if(j(t))throw H();return d(n,t.__node_id),E(t),t},replaceChild:(...e)=>{R(e,2,`replaceChild`);let t=z(e[0],1),i=z(e[1],2);if(j(i))throw H();return ee(n,t.__node_id,i.__node_id),r(t),i!==t&&E(i),i},cloneNode:n=>qt(e,!!n,t)}}function W(e,t){let n=e.__node_id,r=e=>e==null?null:z(e,1);return{contains:t=>{let i=r(t);return i===null?!1:i===e?!0:j(e)||j(i)?!1:!!(se(n,i.__node_id)&16)},getRootNode:()=>j(e)?e:t.node(oe(n))??e,compareDocumentPosition:(...t)=>{R(t,1,`compareDocumentPosition`);let r=z(t[0],1);return r===e?0:j(e)||j(r)?33|(r.__node_id<n?2:4):se(n,r.__node_id)},isSameNode:t=>r(t)===e,isEqualNode:t=>{let i=r(t);return i===null?!1:j(e)||j(i)?i===e:ce(n,i.__node_id)}}}const Jt={element:1,text:3,comment:8,document:9,fragment:11};function G(e){return j(e)?e.kind===`text`?e.text:``:String(v(e.__node_id,`value`)??``)}function Yt(e,t){e.kind!==`element`&&e.kind!==`fragment`&&e.kind!==`document`&&(j(e)||(_(e.__node_id,`value`,t),e.kind===`text`&&(e.text=t)))}function K(e,t){let n=e.__node_id,r=r=>{if(j(e))return null;let i=m(n,r);return i===null?null:t.node(i)??null},i,a=()=>j(e)?[]:h(n).flatMap(e=>t.node(e)??[]);return{get nodeType(){return Jt[e.kind]},get nodeName(){return e.kind===`element`?e.tagName:e.kind===`fragment`?`#document-fragment`:`#${e.kind}`},get nodeValue(){return e.kind===`element`||e.kind===`fragment`||e.kind===`document`?null:G(e)},set nodeValue(t){Yt(e,String(t??``))},get isConnected(){return!j(e)&&fe(n)},get ownerDocument(){return e.kind===`document`?null:t.document()},get parentNode(){return r(`parent`)},get firstChild(){return r(`first`)},get lastChild(){return r(`last`)},get previousSibling(){return r(`previous`)},get nextSibling(){return r(`next`)},get childNodes(){return i??=kt(a)},hasChildNodes:()=>a().length>0}}function q(e,t,n){if(A(e))return;let[r,i]=t,[a,o]=typeof r==`object`?[r?.left,r?.top]:[r,i],[s,c]=n?y(e.__node_id)??[0,0]:[0,0],l=(e,t)=>{if(e===void 0)return null;let r=Number(e);return(n?t:0)+(Number.isFinite(r)?r:0)};Le(e.__node_id,l(a,s),l(o,c))}function Xt(e){let t=[`start`,`center`,`end`,`nearest`];return typeof e==`object`&&e?{block:t.includes(e.block??``)?e.block:`start`,inline:t.includes(e.inline??``)?e.inline:`nearest`}:{block:e===!1?`end`:`start`,inline:`nearest`}}function Zt(e){let t=e.__node_id,n=()=>A(e)?null:y(t);return{get scrollLeft(){return n()?.[0]??0},set scrollLeft(t){q(e,[t],!1)},get scrollTop(){return n()?.[1]??0},set scrollTop(t){q(e,[void 0,t],!1)},get scrollWidth(){return e.clientWidth+Math.round(n()?.[2]??0)},get scrollHeight(){return e.clientHeight+Math.round(n()?.[3]??0)},scrollTo:(...t)=>q(e,t,!1),scrollBy:(...t)=>q(e,t,!0),scrollIntoView:n=>{if(A(e))return;let{block:r,inline:i}=Xt(n);Re(t,r,i)}}}function J(e,t){return R(e,1,t),L(e[0])}function Qt(e,t){return t.node(e)}function $t(e,t){let n=e.__node_id;return{querySelector:(...r)=>{let i=J(r,`querySelector`);if(j(e))return g(i),null;let a=be(n,i);return a===null?null:Qt(a,t)??null},querySelectorAll:(...r)=>{let i=J(r,`querySelectorAll`);if(j(e))return g(i),kt(()=>[]);let a=xe(n,i).flatMap(e=>Qt(e,t)??[]);return kt(()=>a)}}}function en(e,t){let n=e.__node_id;return{matches:(...t)=>{let r=J(t,`matches`);return j(e)?(g(r),!1):ve(n,r)},closest:(...r)=>{let i=J(r,`closest`);if(j(e))return g(i),null;let a=ye(n,i);return a===null?null:Qt(a,t)??null}}}function tn(e,t){at(e,t(de(e.__node_id))),p(e.__node_id),M(e)}function nn(e){let t=e.__node_id,n=(n,r,i)=>{j(e)||(ge(t,n,r,i),e.kind===`text`&&(e.text=G(e)))};return{get data(){return G(e)},set data(t){Yt(e,t===null?``:L(t))},get length(){return G(e).length},get textContent(){return G(e)},set textContent(t){Yt(e,xt(t))},substringData:(...n)=>{if(R(n,2,`substringData`),!j(e))return he(t,n[0],n[1]);let r=n[0]>>>0;return G(e).slice(r,r+(n[1]>>>0))},appendData:(...t)=>{R(t,1,`appendData`),n(G(e).length,0,L(t[0]))},insertData:(...e)=>{R(e,2,`insertData`),n(e[0],0,L(e[1]))},deleteData:(...e)=>{R(e,2,`deleteData`),n(e[0],e[1],``)},replaceData:(...e)=>{R(e,3,`replaceData`),n(e[0],e[1],L(e[2]))}}}function rn(e,t){let n=e.__node_id;return{get wholeText(){return j(e)?e.text:me(n)},splitText:(...r)=>{if(R(r,1,`splitText`),j(e))throw TypeError(`the text node was freed. create a new one`);let i=_e(n,r[0]),a=Y(i,String(v(i,`value`)??``),t);return e.text=G(e),m(i,`parent`)===null?O(a):T(a),a}}}function an(e,t){_(e.__node_id,`value`,t),e.text=t}function Y(e,t,n){let r=x({kind:`text`,text:t},e);for(let e of[K(r,n),U(r,n),W(r,n),nn(r),rn(r,n)])Object.defineProperties(r,Object.getOwnPropertyDescriptors(e));return w(r),r}const X={element:Z,text:(e,t)=>Y(e,t,X),fragment:pn,document:hn,documentCopy:e=>vn(e,!0),node:Q};function Z(t,n,r=`div`,i=[]){let[a,o,s,c]=typeof r==`string`?[r,e,null,r.replace(/[a-z]/g,e=>e.toUpperCase())]:r,l=o===e,u=I(()=>t,i),d={get id(){return j(f)?``:String(v(t,`id`)??``)},set id(e){j(f)||_(t,`id`,String(e))},kind:n,focus:e=>{A(f)||Ue(t,!!e?.preventScroll)},blur:()=>We(t),click:()=>{A(f)||He(t)},setPointerCapture:e=>Ge(t,e),releasePointerCapture:e=>Ke(t,e),hasPointerCapture:e=>qe(t,e),addEventListener:(...e)=>{A(f)||u.addEventListener(...e)},removeEventListener:(...e)=>{A(f)||u.removeEventListener(...e)},dispatchEvent:e=>j(f)||u.dispatchEvent(e),get tabIndex(){return Bt(j(f)?null:v(t,`tabindex`),l?a:``)},set tabIndex(e){j(f)||_(t,`tabindex`,e|0)}};for(let[e,t]of Object.entries({tagName:c,localName:a,namespaceURI:o,prefix:s}))Object.defineProperty(d,e,{value:t,enumerable:!0});let ee=l&&a===`template`;ee&&Object.defineProperty(d,"content",{get:()=>it(f),enumerable:!0,configurable:!0}),l&&a===`input`&&Object.defineProperty(d,"value",{get:()=>j(f)?``:Pe(t),set:e=>{j(f)||Fe(t,e===null?``:String(e))},enumerable:!0,configurable:!0});let f=It(x(d,t),()=>A(f));Object.defineProperties(f,Object.getOwnPropertyDescriptors(jt(t,f))),Object.defineProperties(f,Object.getOwnPropertyDescriptors(Pt(f,X))),Object.defineProperties(f,Object.getOwnPropertyDescriptors(K(f,X))),Object.defineProperties(f,Object.getOwnPropertyDescriptors(U(f,X))),Object.defineProperties(f,Object.getOwnPropertyDescriptors(W(f,X)));for(let e of[Vt(f,X),Zt(f),en(f,X),$t(f,X)])Object.defineProperties(f,Object.getOwnPropertyDescriptors(e));return Object.defineProperties(f,Object.getOwnPropertyDescriptors(n===`comment`?nn(f):on(f))),n!==`comment`&&(Object.defineProperties(f,Object.getOwnPropertyDescriptors(Mt(t,f))),Object.defineProperties(f,Object.getOwnPropertyDescriptors(Wt(f,X))),Object.defineProperties(f,Object.getOwnPropertyDescriptors(Gt(t))),Object.defineProperties(f,Object.getOwnPropertyDescriptors(Nt(t)))),w(f),ee&&tn(f,pn),f}function on(e){return{get textContent(){return j(e)?``:pe(e.__node_id)},set textContent(t){j(e)||dn(e,xt(t))}}}function sn(e){return Z(c(e),`element`,e)}function cn(e=``){let t=c(`#comment`);return je(t,`display`,`none`),_(t,`value`,e),Z(t,`comment`)}function ln(e){let t=c(`#text`);return _(t,`value`,e),Y(t,e,X)}function un(e,t){return Y(e,t,X)}function dn(e,t){for(let t of h(e.__node_id)){d(e.__node_id,t);let n=k(t);n&&E(n)}if(!t)return;let n=ln(t);l(e.__node_id,n.__node_id),T(n)}function fn(){let e=n(),t=tt(e);if(t)return t;let r=Z(e,`element`,`div`,[`wheel`]);return Qe(r),r}function pn(e){let t=x({kind:`fragment`},e),n={get textContent(){return j(t)?``:pe(e)},set textContent(e){j(t)||dn(t,xt(e))}};for(let e of[K(t,X),U(t,X),W(t,X),n])Object.defineProperties(t,Object.getOwnPropertyDescriptors(e));return w(t),t}let mn;function hn(){return mn??=vn(r(),!1)}let gn;function _n(){return gn??=Object.defineProperty(It(I(`$window`,[`wheel`]),()=>!1),Symbol.toStringTag,{value:`Window`})}function Q(e){return k(e)||(e===n()?fn():e===r()?hn():void 0)}function $(e){return O(e),e}function vn(e,t){let n=It(x({...I(e,[`wheel`]),kind:`document`,get textContent(){return null},set textContent(e){},get activeElement(){let n=t?null:Je();if(n!==null)return tt(n)??null;let r=m(e,`first`,!0),i=r===null?void 0:X.node(r);return i?.kind===`element`?i:null},createDocumentFragment:()=>$(pn(c(`#fragment`))),createElement:(...e)=>{R(e,1,`createElement`);let t=i(L(e[0]));return $(Z(t[0],`element`,o(t)))},createElementNS:(...e)=>{R(e,2,`createElementNS`);let t=a((e[0]===null||e[0]===void 0?null:L(e[0]))||null,L(e[1]));return $(Z(t[0],`element`,o(t)))},createTextNode:(...e)=>(R(e,1,`createTextNode`),$(ln(L(e[0])))),createComment:(...e)=>(R(e,1,`createComment`),$(cn(L(e[0]))))},e),()=>!1);for(let e of[K(n,X),U(n,X),W(n,X),$t(n,X)])Object.defineProperties(n,Object.getOwnPropertyDescriptors(e));return Object.setPrototypeOf(n,Document.prototype),w(n),n}const yn=/* @__PURE__ */ _n();Object.defineProperty(globalThis,"__inca_targets__",{value:e=>e.map(e=>{if(e===`$window`)return yn;let t=Q(e);return t?.kind===`element`||t?.kind===`document`?t:null}),configurable:!0});export{Ie as A,c as B,k as C,Ve as D,He as E,Ae as F,ue as G,u as H,Me as I,le as K,_ as L,Le as M,y as N,Ue as O,v as P,je as R,st as S,We as T,m as U,p as V,xe as W,ht as _,Z as a,A as b,Q as c,an as d,H as f,bt as g,_t as h,sn as i,Re as j,Je as k,fn as l,yt as m,un as n,ln as o,I as p,n as q,cn as r,hn as s,yn as t,dn as u,T as v,M as w,et as x,j as y,h as z};