@tempots/dom 37.0.4 → 37.1.0
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.
- package/dom/inertia.d.ts +39 -0
- package/dom/is-input-focused.d.ts +11 -0
- package/dom/pinch-zoom.d.ts +39 -0
- package/dom/raf-loop.d.ts +30 -0
- package/dom/reduced-motion.d.ts +30 -0
- package/dom/tween.d.ts +44 -0
- package/index.cjs +1 -1
- package/index.d.ts +11 -2
- package/index.js +934 -722
- package/package.json +2 -2
- package/renderable/attribute.d.ts +7 -7
- package/renderable/inertia.d.ts +13 -0
- package/renderable/pinch-zoom.d.ts +13 -0
- package/renderable/transition-keyed-foreach.d.ts +37 -0
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DisposalScope as
|
|
2
|
-
import { Computed as
|
|
3
|
-
import { ProviderNotFoundError as
|
|
4
|
-
import { ProviderNotFoundError as
|
|
5
|
-
const
|
|
1
|
+
import { DisposalScope as Ce, withScope as Me, Value as $, makeProviderMark as re, prop as B, createRenderable as Oe, easeOutQuad as Pe, guessInterpolate as Le, Signal as j, createSelector as Ie } from "@tempots/core";
|
|
2
|
+
import { Computed as Gn, DisposalScope as Qn, ElementPosition as Jn, KeyedPosition as Zn, MemoryStore as zn, Prop as es, Signal as ts, Value as ns, animateSignal as ss, animateSignals as rs, bind as is, chainEasing as os, coalesce as ls, computed as cs, computedOf as as, computedOfAsync as us, computedOfAsyncGenerator as ds, computedRecord as hs, createRenderable as fs, createSelector as ps, delaySignal as ms, easeInBack as gs, easeInBounce as ys, easeInCubic as Ts, easeInElastic as bs, easeInExpo as Ss, easeInOutBack as vs, easeInOutBounce as xs, easeInOutCubic as ws, easeInOutElastic as Es, easeInOutExpo as ks, easeInOutQuad as As, easeInOutQuart as Cs, easeInOutSine as Ms, easeInQuad as Os, easeInQuart as Ps, easeInSine as Ls, easeOutBack as Is, easeOutBounce as Hs, easeOutCubic as Ds, easeOutElastic as Ns, easeOutExpo as Rs, easeOutQuad as _s, easeOutQuart as $s, easeOutSine as Bs, effect as Vs, effectOf as js, endInterpolate as Ys, getCurrentScope as Xs, getParentScope as Fs, getScopeStack as Ws, guessInterpolate as Ks, interpolateDate as qs, interpolateNumber as Us, interpolateString as Gs, joinSignals as Qs, linear as Js, localStorageProp as Zs, makeProviderMark as zs, merge as er, mirrorEasing as tr, popScope as nr, previousSignal as sr, prop as rr, pushScope as ir, reverseEasing as or, scoped as lr, sessionStorageProp as cr, signal as ar, slidingWindowSignal as ur, storedProp as dr, strictEquals as hr, syncProp as fr, untracked as pr, withScope as mr } from "@tempots/core";
|
|
3
|
+
import { ProviderNotFoundError as ie, createRenderKit as He } from "@tempots/render";
|
|
4
|
+
import { ProviderNotFoundError as yr, createRenderKit as Tr } from "@tempots/render";
|
|
5
|
+
const oe = /* @__PURE__ */ new Set([
|
|
6
6
|
"checked",
|
|
7
7
|
"disabled",
|
|
8
8
|
"hidden",
|
|
@@ -10,14 +10,14 @@ const Y = /* @__PURE__ */ new Set([
|
|
|
10
10
|
"readonly",
|
|
11
11
|
"required",
|
|
12
12
|
"autofocus"
|
|
13
|
-
]),
|
|
13
|
+
]), le = /* @__PURE__ */ new Set(["selected"]), ce = /* @__PURE__ */ new Set([
|
|
14
14
|
"rowSpan",
|
|
15
15
|
"colSpan",
|
|
16
16
|
"tabIndex",
|
|
17
17
|
"valueAsNumber"
|
|
18
|
-
]),
|
|
18
|
+
]), ae = /* @__PURE__ */ new Set(["valueAsDate"]), ue = {
|
|
19
19
|
readonly: "readOnly"
|
|
20
|
-
},
|
|
20
|
+
}, de = /* @__PURE__ */ new Set([
|
|
21
21
|
"value",
|
|
22
22
|
"textContent",
|
|
23
23
|
"innerText",
|
|
@@ -26,33 +26,33 @@ const Y = /* @__PURE__ */ new Set([
|
|
|
26
26
|
"outerHTML",
|
|
27
27
|
"className",
|
|
28
28
|
"classList"
|
|
29
|
-
]),
|
|
30
|
-
if (
|
|
29
|
+
]), De = (n, e) => {
|
|
30
|
+
if (le.has(n))
|
|
31
31
|
return (t) => {
|
|
32
|
-
t == null || t !== !0 ? e.removeAttribute(
|
|
32
|
+
t == null || t !== !0 ? e.removeAttribute(n) : e.setAttribute(n, "");
|
|
33
33
|
};
|
|
34
|
-
if (
|
|
35
|
-
const t =
|
|
36
|
-
return (
|
|
37
|
-
|
|
34
|
+
if (oe.has(n)) {
|
|
35
|
+
const t = ue[n] || n;
|
|
36
|
+
return (s) => {
|
|
37
|
+
s == null ? e[t] = null : e[t] = !!s;
|
|
38
38
|
};
|
|
39
|
-
} else return
|
|
40
|
-
t == null ? e[
|
|
41
|
-
} :
|
|
42
|
-
t == null ? e[
|
|
43
|
-
} :
|
|
44
|
-
t == null ? e[
|
|
39
|
+
} else return ce.has(n) ? (t) => {
|
|
40
|
+
t == null ? e[n] = null : e[n] = Number(t);
|
|
41
|
+
} : ae.has(n) ? (t) => {
|
|
42
|
+
t == null ? e[n] = null : e[n] = t;
|
|
43
|
+
} : de.has(n) ? (t) => {
|
|
44
|
+
t == null ? e[n] = null : e[n] = String(t);
|
|
45
45
|
} : (t) => {
|
|
46
|
-
t == null ? e.removeAttribute(
|
|
46
|
+
t == null ? e.removeAttribute(n) : e.setAttribute(n, t);
|
|
47
47
|
};
|
|
48
|
-
},
|
|
48
|
+
}, Ne = (n, e) => le.has(n) ? () => e.hasAttribute(n) : oe.has(n) ? () => (
|
|
49
49
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
|
-
!!e[
|
|
51
|
-
) :
|
|
52
|
-
const e =
|
|
53
|
-
e && e.onblur && (e.onblur = null), !(!
|
|
54
|
-
},
|
|
55
|
-
class
|
|
50
|
+
!!e[ue[n] || n]
|
|
51
|
+
) : ce.has(n) ? () => Number(e[n]) : ae.has(n) ? () => e[n] : de.has(n) ? () => String(e[n]) : () => e.getAttribute(n), V = (n) => {
|
|
52
|
+
const e = n;
|
|
53
|
+
e && e.onblur && (e.onblur = null), !(!n || n.ownerDocument === void 0) && n.parentNode && n.parentNode.removeChild(n);
|
|
54
|
+
}, Re = (n) => he(n) || fe(n) ? n : n.parentElement, he = (n) => n.nodeType === 1, fe = (n) => n.nodeType === 11;
|
|
55
|
+
class S {
|
|
56
56
|
/**
|
|
57
57
|
* Constructs a new `DOMContext` instance.
|
|
58
58
|
*
|
|
@@ -62,8 +62,8 @@ class T {
|
|
|
62
62
|
* @param providers - The `Providers` instance associated with this context.
|
|
63
63
|
* @param isFirstLevel - A boolean value indicating whether this context is at the first level, meaning the outermost node in the generated DOM.
|
|
64
64
|
*/
|
|
65
|
-
constructor(e, t,
|
|
66
|
-
this.document = e, this.element = t, this.reference =
|
|
65
|
+
constructor(e, t, s, r) {
|
|
66
|
+
this.document = e, this.element = t, this.reference = s, this.providers = r;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
69
|
* Creates a new `DOMContext` instance for the given `Element` and optional reference `Node`.
|
|
@@ -73,8 +73,8 @@ class T {
|
|
|
73
73
|
* @param providers - The providers to associate with the `DOMContext`.
|
|
74
74
|
* @returns A new `DOMContext` instance.
|
|
75
75
|
*/
|
|
76
|
-
static of(e, t,
|
|
77
|
-
return new
|
|
76
|
+
static of(e, t, s) {
|
|
77
|
+
return new S(e.ownerDocument, e, t, s);
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
80
|
* Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace.
|
|
@@ -109,8 +109,8 @@ class T {
|
|
|
109
109
|
* @returns A new DOMContext focused on the newly created child element
|
|
110
110
|
*/
|
|
111
111
|
makeChildElement(e, t) {
|
|
112
|
-
const
|
|
113
|
-
return this.appendOrInsert(
|
|
112
|
+
const s = this.createElement(e, t);
|
|
113
|
+
return this.appendOrInsert(s), this.withElement(s);
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
116
|
* Creates a new text node with the specified text content.
|
|
@@ -173,7 +173,7 @@ class T {
|
|
|
173
173
|
* @returns A new `DOMContext` instance with the provided `element`.
|
|
174
174
|
*/
|
|
175
175
|
withElement(e) {
|
|
176
|
-
return new
|
|
176
|
+
return new S(
|
|
177
177
|
e.ownerDocument ?? this.document,
|
|
178
178
|
e,
|
|
179
179
|
void 0,
|
|
@@ -237,7 +237,7 @@ class T {
|
|
|
237
237
|
* @returns A new `DOMContext` instance with the specified reference.
|
|
238
238
|
*/
|
|
239
239
|
withReference(e) {
|
|
240
|
-
return new
|
|
240
|
+
return new S(
|
|
241
241
|
this.document,
|
|
242
242
|
this.element,
|
|
243
243
|
e,
|
|
@@ -251,10 +251,10 @@ class T {
|
|
|
251
251
|
* @param value - The provider to set for the given mark.
|
|
252
252
|
* @returns A new `DOMContext` instance with the specified provider.
|
|
253
253
|
*/
|
|
254
|
-
setProvider(e, t,
|
|
255
|
-
return new
|
|
254
|
+
setProvider(e, t, s) {
|
|
255
|
+
return new S(this.document, this.element, this.reference, {
|
|
256
256
|
...this.providers,
|
|
257
|
-
[e]: [t,
|
|
257
|
+
[e]: [t, s]
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
@@ -266,12 +266,12 @@ class T {
|
|
|
266
266
|
*/
|
|
267
267
|
getProvider(e) {
|
|
268
268
|
if (this.providers[e] === void 0)
|
|
269
|
-
throw new
|
|
270
|
-
const [t,
|
|
271
|
-
return { value: t, onUse:
|
|
269
|
+
throw new ie(e);
|
|
270
|
+
const [t, s] = this.providers[e];
|
|
271
|
+
return { value: t, onUse: s };
|
|
272
272
|
}
|
|
273
273
|
clear(e) {
|
|
274
|
-
e && (this.reference !== void 0 ?
|
|
274
|
+
e && (this.reference !== void 0 ? V(this.reference) : V(this.element));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* Adds classes to the element.
|
|
@@ -301,10 +301,10 @@ class T {
|
|
|
301
301
|
* @param options - The options for the event listener.
|
|
302
302
|
* @returns A function to remove the event listener.
|
|
303
303
|
*/
|
|
304
|
-
on(e, t,
|
|
305
|
-
const
|
|
306
|
-
return this.element.addEventListener(e,
|
|
307
|
-
o && this.element.removeEventListener(e,
|
|
304
|
+
on(e, t, s) {
|
|
305
|
+
const r = (o) => t(o, this);
|
|
306
|
+
return this.element.addEventListener(e, r, s), (o) => {
|
|
307
|
+
o && this.element.removeEventListener(e, r, s);
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
310
|
/**
|
|
@@ -354,36 +354,36 @@ class T {
|
|
|
354
354
|
}
|
|
355
355
|
makeAccessors(e) {
|
|
356
356
|
return {
|
|
357
|
-
get:
|
|
358
|
-
set:
|
|
357
|
+
get: Ne(e, this.element),
|
|
358
|
+
set: De(e, this.element)
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
361
|
getWindow() {
|
|
362
362
|
return this.document.defaultView;
|
|
363
363
|
}
|
|
364
|
-
moveRangeBefore(e, t,
|
|
365
|
-
const
|
|
366
|
-
let c =
|
|
364
|
+
moveRangeBefore(e, t, s) {
|
|
365
|
+
const r = e.reference, o = t.reference, i = s.reference, l = this.element;
|
|
366
|
+
let c = r;
|
|
367
367
|
for (; c !== null; ) {
|
|
368
|
-
const
|
|
368
|
+
const h = c.nextSibling;
|
|
369
369
|
if (l.insertBefore(c, i), c === o) break;
|
|
370
|
-
c =
|
|
370
|
+
c = h;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
removeRange(e, t) {
|
|
374
|
-
const
|
|
375
|
-
let i =
|
|
374
|
+
const s = e.reference, r = t.reference, o = this.element;
|
|
375
|
+
let i = s;
|
|
376
376
|
for (; i !== null; ) {
|
|
377
377
|
const l = i.nextSibling;
|
|
378
|
-
if (o.removeChild(i), i ===
|
|
378
|
+
if (o.removeChild(i), i === r) break;
|
|
379
379
|
i = l;
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
removeAllBefore(e) {
|
|
383
|
-
const t = e.reference,
|
|
384
|
-
if (!
|
|
385
|
-
const
|
|
386
|
-
|
|
383
|
+
const t = e.reference, s = this.element;
|
|
384
|
+
if (!s.firstChild || s.firstChild === t) return;
|
|
385
|
+
const r = this.document.createRange();
|
|
386
|
+
r.setStartBefore(s.firstChild), r.setEndBefore(t), r.deleteContents();
|
|
387
387
|
}
|
|
388
388
|
_detachedParent = null;
|
|
389
389
|
_detachedNext = null;
|
|
@@ -395,52 +395,52 @@ class T {
|
|
|
395
395
|
this._detachedParent && (this._detachedParent.insertBefore(this.element, this._detachedNext), this._detachedParent = null, this._detachedNext = null);
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
const
|
|
399
|
-
const t = new
|
|
400
|
-
return (
|
|
401
|
-
t.dispose(),
|
|
398
|
+
const I = (n, e) => {
|
|
399
|
+
const t = new Ce(), s = Me(t, () => n.render(e));
|
|
400
|
+
return (r = !0) => {
|
|
401
|
+
t.dispose(), s(r);
|
|
402
402
|
};
|
|
403
|
-
},
|
|
403
|
+
}, Rt = (n, e, { doc: t, clear: s, disposeWithParent: r = !0, providers: o = {} } = {}) => {
|
|
404
404
|
const i = typeof e == "string" ? (t ?? document).querySelector(e) : e;
|
|
405
405
|
if (i === null)
|
|
406
|
-
throw new
|
|
406
|
+
throw new _e(
|
|
407
407
|
`Cannot find element by selector for render: ${e}`
|
|
408
408
|
);
|
|
409
|
-
|
|
410
|
-
const l =
|
|
411
|
-
let
|
|
412
|
-
return
|
|
413
|
-
|
|
414
|
-
|
|
409
|
+
s !== !1 && (t ?? i.ownerDocument) != null && (i.nodeType === 1 || i.nodeType === 11) && (i.innerHTML = "");
|
|
410
|
+
const l = Re(i), c = he(i) || fe(i) ? void 0 : i, h = S.of(l, c, o), f = I(n, h);
|
|
411
|
+
let d;
|
|
412
|
+
return r && i.parentElement != null && (d = new MutationObserver((a) => {
|
|
413
|
+
a[0]?.removedNodes.forEach((u) => {
|
|
414
|
+
u === i && (d?.disconnect(), f(i.nodeType !== 1));
|
|
415
415
|
});
|
|
416
|
-
}),
|
|
416
|
+
}), d.observe(i.parentElement, {
|
|
417
417
|
childList: !0,
|
|
418
418
|
subtree: !1,
|
|
419
419
|
attributes: !1
|
|
420
420
|
})), () => {
|
|
421
|
-
|
|
421
|
+
d?.disconnect(), f(!0);
|
|
422
422
|
};
|
|
423
|
-
},
|
|
423
|
+
}, _t = (n, {
|
|
424
424
|
startUrl: e = "https://example.com",
|
|
425
425
|
selector: t,
|
|
426
|
-
providers:
|
|
426
|
+
providers: s = {}
|
|
427
427
|
} = {
|
|
428
428
|
selector: "body"
|
|
429
429
|
}) => {
|
|
430
|
-
const
|
|
430
|
+
const r = $.toSignal(e).deriveProp(), o = new ye(t, void 0), i = new k(o, void 0, { currentURL: r }, s);
|
|
431
431
|
return {
|
|
432
|
-
clear:
|
|
432
|
+
clear: I(n(), i),
|
|
433
433
|
root: o,
|
|
434
|
-
currentURL:
|
|
434
|
+
currentURL: r
|
|
435
435
|
};
|
|
436
436
|
};
|
|
437
|
-
class
|
|
437
|
+
class _e extends Error {
|
|
438
438
|
constructor(e) {
|
|
439
439
|
super(e);
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
const
|
|
443
|
-
class
|
|
442
|
+
const W = "data-tts-node", C = "data-tts-class", M = "data-tts-style", O = "data-tts-html", P = "data-tts-text", L = "data-tts-attrs";
|
|
443
|
+
class $t {
|
|
444
444
|
/**
|
|
445
445
|
* Selects elements from the headless environment.
|
|
446
446
|
* @param selector - The selector to select elements from. The supported selectors are CSS selectors whose complexity depends on the adapter implementation.
|
|
@@ -517,18 +517,18 @@ class bt {
|
|
|
517
517
|
constructor({
|
|
518
518
|
select: e,
|
|
519
519
|
getAttribute: t,
|
|
520
|
-
setAttribute:
|
|
521
|
-
getClass:
|
|
520
|
+
setAttribute: s,
|
|
521
|
+
getClass: r,
|
|
522
522
|
setClass: o,
|
|
523
523
|
getStyles: i,
|
|
524
524
|
setStyles: l,
|
|
525
525
|
appendHTML: c,
|
|
526
|
-
getInnerHTML:
|
|
527
|
-
setInnerHTML:
|
|
528
|
-
getInnerText:
|
|
529
|
-
setInnerText:
|
|
526
|
+
getInnerHTML: h,
|
|
527
|
+
setInnerHTML: f,
|
|
528
|
+
getInnerText: d,
|
|
529
|
+
setInnerText: a
|
|
530
530
|
}) {
|
|
531
|
-
this.select = e, this.getAttribute = t, this.setAttribute =
|
|
531
|
+
this.select = e, this.getAttribute = t, this.setAttribute = s, this.getClass = r, this.setClass = o, this.getStyles = i, this.setStyles = l, this.appendHTML = c, this.getInnerHTML = h, this.setInnerHTML = f, this.getInnerText = d, this.setInnerText = a;
|
|
532
532
|
}
|
|
533
533
|
/**
|
|
534
534
|
* Sets the content of the root element from a HeadlessPortal. Generally this will be the same instance that is
|
|
@@ -539,112 +539,112 @@ class bt {
|
|
|
539
539
|
* when you render on the server and then hydrate on the client.
|
|
540
540
|
*/
|
|
541
541
|
setFromRoot = (e, t) => {
|
|
542
|
-
e.getPortals().forEach((
|
|
543
|
-
const o = typeof
|
|
542
|
+
e.getPortals().forEach((r) => {
|
|
543
|
+
const o = typeof r.selector == "string" ? this.select(r.selector) : [r.selector];
|
|
544
544
|
for (const i of o) {
|
|
545
545
|
if (i == null)
|
|
546
546
|
throw new Error(
|
|
547
|
-
`Cannot find element by selector for render: ${
|
|
547
|
+
`Cannot find element by selector for render: ${r.selector}`
|
|
548
548
|
);
|
|
549
|
-
if (
|
|
549
|
+
if (r.hasChildren() && this.appendHTML(i, r.contentToHTML(t)), r.hasInnerHTML()) {
|
|
550
550
|
if (t) {
|
|
551
551
|
const l = this.getInnerHTML(i);
|
|
552
|
-
l != null && this.setAttribute(i,
|
|
552
|
+
l != null && this.setAttribute(i, O, l);
|
|
553
553
|
}
|
|
554
|
-
this.setInnerHTML(i,
|
|
554
|
+
this.setInnerHTML(i, r.getInnerHTML());
|
|
555
555
|
}
|
|
556
|
-
if (
|
|
556
|
+
if (r.hasInnerText()) {
|
|
557
557
|
if (t) {
|
|
558
558
|
const l = this.getInnerText(i);
|
|
559
|
-
l != null && this.setAttribute(i,
|
|
559
|
+
l != null && this.setAttribute(i, P, l);
|
|
560
560
|
}
|
|
561
|
-
this.setInnerText(i,
|
|
561
|
+
this.setInnerText(i, r.getInnerText());
|
|
562
562
|
}
|
|
563
|
-
if (
|
|
563
|
+
if (r.hasClasses()) {
|
|
564
564
|
if (t) {
|
|
565
565
|
const l = this.getClass(i);
|
|
566
|
-
l != null && this.setAttribute(i,
|
|
566
|
+
l != null && this.setAttribute(i, C, l);
|
|
567
567
|
}
|
|
568
|
-
this.setClass(i,
|
|
568
|
+
this.setClass(i, r.getClasses().join(" "));
|
|
569
569
|
}
|
|
570
|
-
if (
|
|
570
|
+
if (r.hasStyles()) {
|
|
571
571
|
if (t) {
|
|
572
572
|
const l = this.getStyles(i);
|
|
573
573
|
Object.keys(l).length > 0 && this.setAttribute(
|
|
574
574
|
i,
|
|
575
|
-
|
|
575
|
+
M,
|
|
576
576
|
JSON.stringify(l)
|
|
577
577
|
);
|
|
578
578
|
}
|
|
579
|
-
this.setStyles(i,
|
|
579
|
+
this.setStyles(i, r.getStyles());
|
|
580
580
|
}
|
|
581
|
-
if (
|
|
582
|
-
const l =
|
|
581
|
+
if (r.hasAttributes()) {
|
|
582
|
+
const l = r.getAttributes();
|
|
583
583
|
if (t) {
|
|
584
584
|
const c = [];
|
|
585
|
-
l.forEach(([
|
|
586
|
-
const
|
|
587
|
-
|
|
585
|
+
l.forEach(([h]) => {
|
|
586
|
+
const f = this.getAttribute(i, h);
|
|
587
|
+
f != null && c.push([h, f]);
|
|
588
588
|
}), c.length > 0 && this.setAttribute(
|
|
589
589
|
i,
|
|
590
590
|
L,
|
|
591
591
|
JSON.stringify(Object.fromEntries(c))
|
|
592
592
|
);
|
|
593
593
|
}
|
|
594
|
-
l.forEach(([c,
|
|
595
|
-
this.setAttribute(i, c,
|
|
594
|
+
l.forEach(([c, h]) => {
|
|
595
|
+
this.setAttribute(i, c, h);
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
});
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
|
-
const
|
|
603
|
-
const e =
|
|
604
|
-
|
|
605
|
-
},
|
|
606
|
-
const e =
|
|
607
|
-
|
|
608
|
-
},
|
|
609
|
-
const e =
|
|
610
|
-
|
|
611
|
-
},
|
|
612
|
-
const e =
|
|
613
|
-
if (
|
|
614
|
-
const t =
|
|
615
|
-
|
|
616
|
-
}
|
|
617
|
-
},
|
|
618
|
-
const e =
|
|
619
|
-
if (
|
|
620
|
-
const t =
|
|
621
|
-
Object.entries(t).forEach(([
|
|
622
|
-
|
|
602
|
+
const pe = (n) => JSON.parse(n.replace(/"/g, '"')), $e = (n) => {
|
|
603
|
+
const e = n.getAttribute(C);
|
|
604
|
+
n.removeAttribute(C), e != null && n.setAttribute("class", e);
|
|
605
|
+
}, Be = (n) => {
|
|
606
|
+
const e = n.getAttribute(O);
|
|
607
|
+
n.removeAttribute(O), e != null && (n.innerHTML = e);
|
|
608
|
+
}, Ve = (n) => {
|
|
609
|
+
const e = n.getAttribute(P);
|
|
610
|
+
n.removeAttribute(P), e != null && (n.innerText = e);
|
|
611
|
+
}, je = (n) => {
|
|
612
|
+
const e = n.getAttribute(M);
|
|
613
|
+
if (n.removeAttribute(M), e != null) {
|
|
614
|
+
const t = pe(e), s = Object.entries(t);
|
|
615
|
+
s.length > 0 && (n.style.cssText = s.map(([r, o]) => `${r}: ${o}`).join("; "));
|
|
616
|
+
}
|
|
617
|
+
}, Ye = (n) => {
|
|
618
|
+
const e = n.getAttribute(L);
|
|
619
|
+
if (n.removeAttribute(L), e != null) {
|
|
620
|
+
const t = pe(e);
|
|
621
|
+
Object.entries(t).forEach(([s, r]) => {
|
|
622
|
+
r == null ? n.removeAttribute(s) : n.setAttribute(s, r);
|
|
623
623
|
});
|
|
624
624
|
}
|
|
625
|
-
},
|
|
625
|
+
}, Bt = () => {
|
|
626
626
|
const e = [
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
M,
|
|
627
|
+
W,
|
|
628
|
+
C,
|
|
630
629
|
O,
|
|
631
630
|
P,
|
|
631
|
+
M,
|
|
632
632
|
L
|
|
633
|
-
].map((
|
|
634
|
-
document.querySelectorAll(e).forEach((
|
|
635
|
-
const
|
|
636
|
-
if (
|
|
637
|
-
|
|
633
|
+
].map((s) => `[${s}]`).join(",");
|
|
634
|
+
document.querySelectorAll(e).forEach((s) => {
|
|
635
|
+
const r = s;
|
|
636
|
+
if (r.hasAttribute(W)) {
|
|
637
|
+
V(r);
|
|
638
638
|
return;
|
|
639
639
|
}
|
|
640
|
-
|
|
640
|
+
r.hasAttribute(C) && $e(r), r.hasAttribute(P) && Ve(r), r.hasAttribute(O) && Be(r), r.hasAttribute(M) && je(r), r.hasAttribute(L) && Ye(r);
|
|
641
641
|
});
|
|
642
|
-
},
|
|
643
|
-
class
|
|
642
|
+
}, Xe = "data-tempo-id", w = /* @__PURE__ */ Symbol("class"), E = /* @__PURE__ */ Symbol("style"), R = /* @__PURE__ */ Symbol("handler"), me = () => Math.random().toString(36).substring(2, 15), Fe = (n) => n.replace(/<[^>]*>?/g, "");
|
|
643
|
+
class ge {
|
|
644
644
|
constructor(e) {
|
|
645
645
|
this.parent = e;
|
|
646
646
|
}
|
|
647
|
-
id =
|
|
647
|
+
id = me();
|
|
648
648
|
properties = {};
|
|
649
649
|
children = [];
|
|
650
650
|
isElement() {
|
|
@@ -654,7 +654,7 @@ class ie {
|
|
|
654
654
|
return !1;
|
|
655
655
|
}
|
|
656
656
|
getText() {
|
|
657
|
-
return this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ?
|
|
657
|
+
return this.properties.innerText != null ? this.properties.innerText : this.properties.innerHTML != null ? Fe(this.properties.innerHTML) : this.children.map((e) => e.getText()).join("");
|
|
658
658
|
}
|
|
659
659
|
removeChild(e) {
|
|
660
660
|
const t = this.children.indexOf(e);
|
|
@@ -689,16 +689,16 @@ class ie {
|
|
|
689
689
|
return this.children.length > 0;
|
|
690
690
|
}
|
|
691
691
|
hasClasses() {
|
|
692
|
-
return this.properties[
|
|
692
|
+
return this.properties[w] != null;
|
|
693
693
|
}
|
|
694
694
|
hasStyles() {
|
|
695
|
-
return this.properties[
|
|
695
|
+
return this.properties[E] != null;
|
|
696
696
|
}
|
|
697
697
|
hasAttributes() {
|
|
698
698
|
return Object.keys(this.properties).length > 0;
|
|
699
699
|
}
|
|
700
700
|
hasHandlers() {
|
|
701
|
-
return this.properties[
|
|
701
|
+
return this.properties[R] != null;
|
|
702
702
|
}
|
|
703
703
|
hasRenderableProperties() {
|
|
704
704
|
return this.hasClasses() || this.hasAttributes() || this.hasStyles();
|
|
@@ -707,46 +707,46 @@ class ie {
|
|
|
707
707
|
if (this.properties.id === e)
|
|
708
708
|
return this;
|
|
709
709
|
for (const t of this.elements()) {
|
|
710
|
-
const
|
|
711
|
-
if (
|
|
712
|
-
return
|
|
710
|
+
const s = t.getById(e);
|
|
711
|
+
if (s != null)
|
|
712
|
+
return s;
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
trigger(e, t) {
|
|
716
|
-
((this.properties[
|
|
716
|
+
((this.properties[R] ?? {})[e] ?? []).forEach((r) => r(t));
|
|
717
717
|
}
|
|
718
718
|
click() {
|
|
719
719
|
this.trigger("click", {});
|
|
720
720
|
}
|
|
721
|
-
on(e, t,
|
|
722
|
-
const o = this.properties[
|
|
723
|
-
l(), t(c,
|
|
724
|
-
} : (c) => t(c,
|
|
721
|
+
on(e, t, s, r) {
|
|
722
|
+
const o = this.properties[R] ??= {}, i = r?.once ? (c) => {
|
|
723
|
+
l(), t(c, s);
|
|
724
|
+
} : (c) => t(c, s);
|
|
725
725
|
o[e] = [...o[e] ?? [], i];
|
|
726
726
|
const l = () => {
|
|
727
|
-
const c = o[e] ?? [],
|
|
728
|
-
|
|
727
|
+
const c = o[e] ?? [], h = c.indexOf(i);
|
|
728
|
+
h !== -1 && (c.splice(h, 1), c.length === 0 ? (delete o[e], Object.keys(o).length === 0 && delete this.properties[R]) : o[e] = c, r?.signal != null && r.signal.removeEventListener("abort", l));
|
|
729
729
|
};
|
|
730
|
-
return
|
|
730
|
+
return r?.signal != null && r.signal.addEventListener("abort", l), l;
|
|
731
731
|
}
|
|
732
732
|
addClasses(e) {
|
|
733
733
|
if (e.length === 0)
|
|
734
734
|
return;
|
|
735
|
-
const t = this.properties[
|
|
736
|
-
for (const
|
|
737
|
-
|
|
735
|
+
const t = this.properties[w] ??= [], s = new Set(t);
|
|
736
|
+
for (const r of e)
|
|
737
|
+
s.has(r) || (t.push(r), s.add(r));
|
|
738
738
|
}
|
|
739
739
|
removeClasses(e) {
|
|
740
740
|
if (e.length === 0)
|
|
741
741
|
return;
|
|
742
|
-
const t = this.properties[
|
|
743
|
-
let
|
|
742
|
+
const t = this.properties[w] ??= [], s = new Set(e);
|
|
743
|
+
let r = 0;
|
|
744
744
|
for (let o = 0; o < t.length; o++)
|
|
745
|
-
|
|
746
|
-
t.length =
|
|
745
|
+
s.has(t[o]) || (t[r] = t[o], r++);
|
|
746
|
+
t.length = r, t.length === 0 && delete this.properties[w];
|
|
747
747
|
}
|
|
748
748
|
getClasses() {
|
|
749
|
-
return this.properties[
|
|
749
|
+
return this.properties[w] ?? [];
|
|
750
750
|
}
|
|
751
751
|
getAttributes() {
|
|
752
752
|
return Object.entries(this.properties).filter(
|
|
@@ -755,31 +755,31 @@ class ie {
|
|
|
755
755
|
}
|
|
756
756
|
getVisibleAttributes() {
|
|
757
757
|
return Reflect.ownKeys(this.properties).flatMap(
|
|
758
|
-
(e) => e ===
|
|
758
|
+
(e) => e === w ? [["class", this.getClasses()]] : e === E ? [["style", this.getStyles()]] : typeof e == "string" ? [[e, String(this.properties[e])]] : []
|
|
759
759
|
);
|
|
760
760
|
}
|
|
761
761
|
setStyle(e, t) {
|
|
762
|
-
const
|
|
763
|
-
|
|
762
|
+
const s = this.properties[E] ??= {};
|
|
763
|
+
s[e] = t, t === "" && (delete s[e], Object.keys(s).length === 0 && delete this.properties[E]);
|
|
764
764
|
}
|
|
765
765
|
getStyle(e) {
|
|
766
|
-
return this.properties[
|
|
766
|
+
return this.properties[E]?.[e] ?? "";
|
|
767
767
|
}
|
|
768
768
|
getStyles() {
|
|
769
|
-
return this.properties[
|
|
769
|
+
return this.properties[E] ?? {};
|
|
770
770
|
}
|
|
771
771
|
makeAccessors(e) {
|
|
772
772
|
const t = this.properties;
|
|
773
773
|
return {
|
|
774
774
|
get: () => t[e],
|
|
775
|
-
set: (
|
|
775
|
+
set: (s) => t[e] = s
|
|
776
776
|
};
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
|
-
const
|
|
780
|
-
class
|
|
781
|
-
constructor(e, t,
|
|
782
|
-
super(
|
|
779
|
+
const We = (n) => n.replace(/"/g, """), Ke = (n) => n.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
780
|
+
class qe extends ge {
|
|
781
|
+
constructor(e, t, s) {
|
|
782
|
+
super(s), this.tagName = e, this.namespace = t;
|
|
783
783
|
}
|
|
784
784
|
isPortal() {
|
|
785
785
|
return !1;
|
|
@@ -790,12 +790,12 @@ class Ne extends ie {
|
|
|
790
790
|
*/
|
|
791
791
|
buildAttributesString(e) {
|
|
792
792
|
let t = null;
|
|
793
|
-
const
|
|
794
|
-
return { attrs: `${
|
|
793
|
+
const s = this.namespace ? ` xmlns="${this.namespace}"` : "", r = this.getVisibleAttributes().map(([i, l]) => i === "class" ? ` class="${l.join(" ")}"` : i === "style" ? typeof l == "string" ? ` style="${l}"` : ` style="${Object.entries(l).map(([c, h]) => `${c}: ${h};`).join(" ")}"` : Ge.has(i) ? ` ${i}` : i === "innerHTML" ? (t = l, "") : i === "innerText" ? (t = Ke(l), "") : ` ${i}="${We(l)}"`).join(""), o = e ? ` ${W} ${Xe}="${this.id}"` : "";
|
|
794
|
+
return { attrs: `${s}${r}${o}`, innerHTML: t };
|
|
795
795
|
}
|
|
796
796
|
toHTML(e = !1) {
|
|
797
|
-
const t = this.children.map((o) => o.toHTML()).join(""), { attrs:
|
|
798
|
-
return
|
|
797
|
+
const t = this.children.map((o) => o.toHTML()).join(""), { attrs: s, innerHTML: r } = this.buildAttributesString(e);
|
|
798
|
+
return Z.has(this.tagName) && t === "" ? `<${this.tagName}${s} />` : `<${this.tagName}${s}>${r ?? t}</${this.tagName}>`;
|
|
799
799
|
}
|
|
800
800
|
/**
|
|
801
801
|
* Generates HTML output as an async stream of string chunks.
|
|
@@ -805,20 +805,20 @@ class Ne extends ie {
|
|
|
805
805
|
* @yields String chunks of HTML content.
|
|
806
806
|
*/
|
|
807
807
|
async *toHTMLStream(e) {
|
|
808
|
-
const t = e?.generatePlaceholders ?? !1, { attrs:
|
|
809
|
-
if (
|
|
810
|
-
yield `<${this.tagName}${
|
|
808
|
+
const t = e?.generatePlaceholders ?? !1, { attrs: s, innerHTML: r } = this.buildAttributesString(t);
|
|
809
|
+
if (Z.has(this.tagName) && this.children.length === 0) {
|
|
810
|
+
yield `<${this.tagName}${s} />`;
|
|
811
811
|
return;
|
|
812
812
|
}
|
|
813
|
-
if (yield `<${this.tagName}${
|
|
814
|
-
yield
|
|
813
|
+
if (yield `<${this.tagName}${s}>`, r !== null)
|
|
814
|
+
yield r;
|
|
815
815
|
else
|
|
816
816
|
for (const o of this.children)
|
|
817
817
|
yield* o.toHTMLStream(e);
|
|
818
818
|
yield `</${this.tagName}>`;
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
|
-
class
|
|
821
|
+
class ye extends ge {
|
|
822
822
|
constructor(e, t) {
|
|
823
823
|
super(t), this.selector = e;
|
|
824
824
|
}
|
|
@@ -850,11 +850,11 @@ class oe extends ie {
|
|
|
850
850
|
yield* t.toHTMLStream(e);
|
|
851
851
|
}
|
|
852
852
|
}
|
|
853
|
-
class
|
|
853
|
+
class Ue {
|
|
854
854
|
constructor(e) {
|
|
855
855
|
this.text = e;
|
|
856
856
|
}
|
|
857
|
-
id =
|
|
857
|
+
id = me();
|
|
858
858
|
isElement() {
|
|
859
859
|
return !1;
|
|
860
860
|
}
|
|
@@ -877,9 +877,9 @@ class De {
|
|
|
877
877
|
yield this.text;
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
|
-
class
|
|
881
|
-
constructor(e, t,
|
|
882
|
-
this.element = e, this.reference = t, this.container =
|
|
880
|
+
class k {
|
|
881
|
+
constructor(e, t, s, r) {
|
|
882
|
+
this.element = e, this.reference = t, this.container = s, this.providers = r;
|
|
883
883
|
}
|
|
884
884
|
appendOrInsert(e) {
|
|
885
885
|
if (this.reference != null) {
|
|
@@ -889,17 +889,17 @@ class C {
|
|
|
889
889
|
this.element.children.push(e);
|
|
890
890
|
}
|
|
891
891
|
makeChildElement(e, t) {
|
|
892
|
-
const
|
|
893
|
-
return this.appendOrInsert(
|
|
894
|
-
|
|
892
|
+
const s = new qe(e, t, this.element);
|
|
893
|
+
return this.appendOrInsert(s), new k(
|
|
894
|
+
s,
|
|
895
895
|
void 0,
|
|
896
896
|
this.container,
|
|
897
897
|
this.providers
|
|
898
898
|
);
|
|
899
899
|
}
|
|
900
900
|
makeChildText(e) {
|
|
901
|
-
const t = new
|
|
902
|
-
return this.appendOrInsert(t), new
|
|
901
|
+
const t = new Ue(String(e));
|
|
902
|
+
return this.appendOrInsert(t), new k(
|
|
903
903
|
this.element,
|
|
904
904
|
t,
|
|
905
905
|
this.container,
|
|
@@ -919,8 +919,8 @@ class C {
|
|
|
919
919
|
return this.makeChildText("");
|
|
920
920
|
}
|
|
921
921
|
makePortal(e) {
|
|
922
|
-
const t = new
|
|
923
|
-
return this.appendOrInsert(t), new
|
|
922
|
+
const t = new ye(e, this.element);
|
|
923
|
+
return this.appendOrInsert(t), new k(
|
|
924
924
|
t,
|
|
925
925
|
void 0,
|
|
926
926
|
this.container,
|
|
@@ -934,17 +934,17 @@ class C {
|
|
|
934
934
|
* @param value - The provider to set for the given mark.
|
|
935
935
|
* @returns A new `DOMContext` instance with the specified provider.
|
|
936
936
|
*/
|
|
937
|
-
setProvider(e, t,
|
|
938
|
-
return new
|
|
937
|
+
setProvider(e, t, s) {
|
|
938
|
+
return new k(this.element, this.reference, this.container, {
|
|
939
939
|
...this.providers,
|
|
940
|
-
[e]: [t,
|
|
940
|
+
[e]: [t, s]
|
|
941
941
|
});
|
|
942
942
|
}
|
|
943
943
|
getProvider(e) {
|
|
944
944
|
if (this.providers[e] === void 0)
|
|
945
|
-
throw new
|
|
946
|
-
const [t,
|
|
947
|
-
return { value: t, onUse:
|
|
945
|
+
throw new ie(e);
|
|
946
|
+
const [t, s] = this.providers[e];
|
|
947
|
+
return { value: t, onUse: s };
|
|
948
948
|
}
|
|
949
949
|
clear(e) {
|
|
950
950
|
e && (this.reference !== void 0 ? this.element.removeChild(this.reference) : this.element.remove());
|
|
@@ -982,173 +982,291 @@ class C {
|
|
|
982
982
|
makeAccessors(e) {
|
|
983
983
|
return this.element.makeAccessors(e);
|
|
984
984
|
}
|
|
985
|
-
moveRangeBefore(e, t,
|
|
986
|
-
const
|
|
987
|
-
l.splice(
|
|
985
|
+
moveRangeBefore(e, t, s) {
|
|
986
|
+
const r = e.reference, o = t.reference, i = s.reference, l = this.element.children, c = l.indexOf(r), f = l.indexOf(o) - c + 1, d = l.splice(c, f), a = l.indexOf(i);
|
|
987
|
+
l.splice(a, 0, ...d);
|
|
988
988
|
}
|
|
989
989
|
removeRange(e, t) {
|
|
990
|
-
const
|
|
990
|
+
const s = e.reference, r = t.reference, o = this.element.children, i = o.indexOf(s), c = o.indexOf(r) - i + 1;
|
|
991
991
|
o.splice(i, c);
|
|
992
992
|
}
|
|
993
993
|
removeAllBefore(e) {
|
|
994
|
-
const t = e.reference,
|
|
995
|
-
|
|
994
|
+
const t = e.reference, s = this.element.children, r = s.indexOf(t);
|
|
995
|
+
r > 0 && s.splice(0, r);
|
|
996
996
|
}
|
|
997
997
|
detach() {
|
|
998
998
|
}
|
|
999
999
|
reattach() {
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
|
-
const
|
|
1002
|
+
const Ge = /* @__PURE__ */ new Set([
|
|
1003
1003
|
"checked",
|
|
1004
1004
|
"disabled",
|
|
1005
1005
|
"multiple",
|
|
1006
1006
|
"readonly",
|
|
1007
1007
|
"required",
|
|
1008
1008
|
"selected"
|
|
1009
|
-
]),
|
|
1009
|
+
]), Z = /* @__PURE__ */ new Set(["img", "br", "hr", "input", "link", "meta"]), Qe = () => (
|
|
1010
1010
|
/* c8 ignore next */
|
|
1011
1011
|
typeof window < "u" ? window : void 0
|
|
1012
|
-
)
|
|
1013
|
-
function
|
|
1014
|
-
const
|
|
1015
|
-
|
|
1012
|
+
);
|
|
1013
|
+
function Je() {
|
|
1014
|
+
const n = Qe(), e = n?.matchMedia("(prefers-reduced-motion: reduce)"), t = B(e?.matches ?? !1);
|
|
1015
|
+
if (e != null) {
|
|
1016
|
+
const s = (r) => t.set(r.matches);
|
|
1017
|
+
e.addEventListener("change", s), t.onDispose(() => e.removeEventListener("change", s));
|
|
1018
|
+
}
|
|
1019
|
+
return t;
|
|
1020
|
+
}
|
|
1021
|
+
const Vt = {
|
|
1022
|
+
mark: re("ReducedMotion"),
|
|
1023
|
+
create: () => {
|
|
1024
|
+
const n = Je();
|
|
1025
|
+
return {
|
|
1026
|
+
value: n,
|
|
1027
|
+
dispose: () => n.dispose()
|
|
1028
|
+
};
|
|
1029
|
+
}
|
|
1030
|
+
}, Te = /* @__PURE__ */ Symbol("DOM_RENDERABLE"), y = (n) => Oe(Te, n);
|
|
1031
|
+
function q(n) {
|
|
1032
|
+
let e = null, t = null, s = !1;
|
|
1033
|
+
const r = (o) => {
|
|
1034
|
+
if (s) return;
|
|
1035
|
+
const i = e === null ? 0 : o - e;
|
|
1036
|
+
e = o, n(i), t = requestAnimationFrame(r);
|
|
1037
|
+
};
|
|
1038
|
+
return t = requestAnimationFrame(r), {
|
|
1039
|
+
dispose: () => {
|
|
1040
|
+
s = !0, t !== null && cancelAnimationFrame(t);
|
|
1041
|
+
}
|
|
1042
|
+
};
|
|
1043
|
+
}
|
|
1044
|
+
const jt = (n) => y((e) => {
|
|
1045
|
+
const t = q(n);
|
|
1046
|
+
return (s) => {
|
|
1047
|
+
t.dispose(), e.clear(s);
|
|
1048
|
+
};
|
|
1049
|
+
});
|
|
1050
|
+
function Yt(n) {
|
|
1051
|
+
const e = n ?? (typeof document < "u" ? document : void 0);
|
|
1052
|
+
if (e == null) return !1;
|
|
1053
|
+
const t = e.activeElement;
|
|
1054
|
+
if (t == null) return !1;
|
|
1055
|
+
const s = t.tagName;
|
|
1056
|
+
return s === "INPUT" || s === "TEXTAREA" || s === "SELECT" || t.isContentEditable === !0;
|
|
1057
|
+
}
|
|
1058
|
+
function Xt(n, e) {
|
|
1059
|
+
const t = e?.duration ?? 300, s = e?.easing ?? Pe, r = e?.reducedMotion;
|
|
1060
|
+
let o = e?.interpolate;
|
|
1061
|
+
const i = B(n);
|
|
1062
|
+
let l = null, c = n, h = n, f = 0;
|
|
1063
|
+
const d = () => {
|
|
1064
|
+
l !== null && (l.dispose(), l = null);
|
|
1065
|
+
};
|
|
1066
|
+
return { value: i, tweenTo: (p) => {
|
|
1067
|
+
if (d(), t <= 0 || r != null && r.get() === !0) {
|
|
1068
|
+
i.set(p);
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
c = i.get(), h = p, f = 0, o == null && (o = Le(c)), l = q((m) => {
|
|
1072
|
+
f += m;
|
|
1073
|
+
const g = Math.min(f / t, 1), b = s(g);
|
|
1074
|
+
i.set(o(c, h, b)), g >= 1 && d();
|
|
1075
|
+
});
|
|
1076
|
+
}, cancel: d, dispose: () => {
|
|
1077
|
+
d(), i.dispose();
|
|
1078
|
+
} };
|
|
1079
|
+
}
|
|
1080
|
+
function z(n, e) {
|
|
1081
|
+
const t = n.clientX - e.clientX, s = n.clientY - e.clientY;
|
|
1082
|
+
return Math.hypot(t, s);
|
|
1016
1083
|
}
|
|
1017
|
-
function
|
|
1018
|
-
|
|
1084
|
+
function ee(n, e) {
|
|
1085
|
+
return {
|
|
1086
|
+
x: (n.clientX + e.clientX) / 2,
|
|
1087
|
+
y: (n.clientY + e.clientY) / 2
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
function Ze(n, e, t) {
|
|
1091
|
+
const s = t?.minScale ?? 0.1, r = t?.maxScale ?? 5;
|
|
1092
|
+
let o = 0, i = { x: 0, y: 0 }, l = { scale: 1, panX: 0, panY: 0 };
|
|
1093
|
+
const c = (a) => Math.min(r, Math.max(s, a));
|
|
1094
|
+
return { onTouchStart: (a) => {
|
|
1095
|
+
if (a.touches.length !== 2) return;
|
|
1096
|
+
a.preventDefault();
|
|
1097
|
+
const u = a.touches[0], p = a.touches[1];
|
|
1098
|
+
o = z(u, p), i = ee(u, p), l = n.get();
|
|
1099
|
+
}, onTouchMove: (a) => {
|
|
1100
|
+
if (a.touches.length !== 2) return;
|
|
1101
|
+
a.preventDefault();
|
|
1102
|
+
const u = a.touches[0], p = a.touches[1], m = z(u, p), g = ee(u, p), b = e(), F = m / o, U = c(l.scale * F), G = i.x - b.left, Q = i.y - b.top, we = g.x - i.x, Ee = g.y - i.y, J = U / l.scale, ke = G - (G - l.panX) * J + we, Ae = Q - (Q - l.panY) * J + Ee;
|
|
1103
|
+
n.set({ scale: U, panX: ke, panY: Ae });
|
|
1104
|
+
}, onTouchEnd: (a) => {
|
|
1105
|
+
} };
|
|
1106
|
+
}
|
|
1107
|
+
function ze(n, e) {
|
|
1108
|
+
const t = e?.friction ?? 0.95, s = e?.minVelocity ?? 0.5;
|
|
1109
|
+
let r = 0, o = 0, i = null, l = 0, c = 0;
|
|
1110
|
+
return { track: (d, a) => {
|
|
1111
|
+
const u = performance.now();
|
|
1112
|
+
if (i !== null) {
|
|
1113
|
+
const p = (u - i) / 1e3;
|
|
1114
|
+
p > 0 && (l = (d - r) / p, c = (a - o) / p);
|
|
1115
|
+
}
|
|
1116
|
+
r = d, o = a, i = u;
|
|
1117
|
+
}, release: () => {
|
|
1118
|
+
let d = l, a = c;
|
|
1119
|
+
i = null, l = 0, c = 0;
|
|
1120
|
+
const u = q((p) => {
|
|
1121
|
+
const m = p / 1e3;
|
|
1122
|
+
if (d *= t, a *= t, Math.hypot(d, a) < s) {
|
|
1123
|
+
u.dispose();
|
|
1124
|
+
return;
|
|
1125
|
+
}
|
|
1126
|
+
n(d * m, a * m);
|
|
1127
|
+
});
|
|
1128
|
+
return u;
|
|
1129
|
+
} };
|
|
1130
|
+
}
|
|
1131
|
+
function et(n, e) {
|
|
1132
|
+
const t = [], s = e.createDocumentFragment();
|
|
1133
|
+
return K(n, s, [], { count: 0 }, t, e) ? { fragment: s, slots: t, topNodeCount: s.childNodes.length } : null;
|
|
1134
|
+
}
|
|
1135
|
+
function K(n, e, t, s, r, o) {
|
|
1136
|
+
switch (n.kind) {
|
|
1019
1137
|
case "element": {
|
|
1020
|
-
const { tag: i, ns: l, children: c } =
|
|
1021
|
-
let
|
|
1022
|
-
for (let
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1138
|
+
const { tag: i, ns: l, children: c } = n, h = l != null ? o.createElementNS(l, i) : o.createElement(i), f = [...t, s.count++];
|
|
1139
|
+
let d = "";
|
|
1140
|
+
for (let u = 0; u < c.length; u++) {
|
|
1141
|
+
const p = c[u];
|
|
1142
|
+
p.kind === "static-attr" && (p.name === "class" ? d += (d ? " " : "") + p.value : h.setAttribute(p.name, p.value));
|
|
1025
1143
|
}
|
|
1026
|
-
|
|
1027
|
-
for (let
|
|
1028
|
-
c[
|
|
1029
|
-
const
|
|
1030
|
-
for (let
|
|
1031
|
-
const
|
|
1032
|
-
if (!(
|
|
1144
|
+
d && h.setAttribute("class", d), e.appendChild(h);
|
|
1145
|
+
for (let u = 0; u < c.length; u++)
|
|
1146
|
+
c[u].kind === "dynamic-attr" && r.push({ path: f, kind: "dynamic-attr" });
|
|
1147
|
+
const a = { count: 0 };
|
|
1148
|
+
for (let u = 0; u < c.length; u++) {
|
|
1149
|
+
const p = c[u];
|
|
1150
|
+
if (!(p.kind === "static-attr" || p.kind === "dynamic-attr") && !K(p, h, f, a, r, o))
|
|
1033
1151
|
return !1;
|
|
1034
1152
|
}
|
|
1035
1153
|
return !0;
|
|
1036
1154
|
}
|
|
1037
1155
|
case "static-text":
|
|
1038
|
-
return e.appendChild(o.createTextNode(
|
|
1156
|
+
return e.appendChild(o.createTextNode(n.text)), s.count++, !0;
|
|
1039
1157
|
case "dynamic-text":
|
|
1040
|
-
return e.appendChild(o.createTextNode("")),
|
|
1041
|
-
path: [...t,
|
|
1158
|
+
return e.appendChild(o.createTextNode("")), r.push({
|
|
1159
|
+
path: [...t, s.count++],
|
|
1042
1160
|
kind: "dynamic-text"
|
|
1043
1161
|
}), !0;
|
|
1044
1162
|
case "fragment": {
|
|
1045
|
-
const { children: i } =
|
|
1163
|
+
const { children: i } = n;
|
|
1046
1164
|
for (let l = 0; l < i.length; l++)
|
|
1047
|
-
if (!
|
|
1165
|
+
if (!K(i[l], e, t, s, r, o))
|
|
1048
1166
|
return !1;
|
|
1049
1167
|
return !0;
|
|
1050
1168
|
}
|
|
1051
1169
|
case "empty":
|
|
1052
1170
|
return !0;
|
|
1053
1171
|
default:
|
|
1054
|
-
return
|
|
1055
|
-
path: [...t,
|
|
1172
|
+
return n.kind === void 0 ? (e.appendChild(o.createComment("")), r.push({
|
|
1173
|
+
path: [...t, s.count++],
|
|
1056
1174
|
kind: "slot"
|
|
1057
1175
|
}), !0) : !1;
|
|
1058
1176
|
}
|
|
1059
1177
|
}
|
|
1060
|
-
function
|
|
1061
|
-
let t =
|
|
1062
|
-
for (let
|
|
1063
|
-
t = t.childNodes[e[
|
|
1178
|
+
function tt(n, e) {
|
|
1179
|
+
let t = n;
|
|
1180
|
+
for (let s = 0; s < e.length; s++)
|
|
1181
|
+
t = t.childNodes[e[s]];
|
|
1064
1182
|
return t;
|
|
1065
1183
|
}
|
|
1066
|
-
function
|
|
1067
|
-
const
|
|
1068
|
-
let l =
|
|
1069
|
-
for (let
|
|
1070
|
-
i[
|
|
1071
|
-
const c =
|
|
1072
|
-
for (let
|
|
1073
|
-
a
|
|
1074
|
-
|
|
1075
|
-
const
|
|
1076
|
-
for (let
|
|
1077
|
-
const
|
|
1078
|
-
if (
|
|
1079
|
-
const
|
|
1080
|
-
g.textContent =
|
|
1081
|
-
g.textContent =
|
|
1184
|
+
function nt(n, e, t) {
|
|
1185
|
+
const s = e, r = n.fragment.cloneNode(!0), o = n.topNodeCount, i = new Array(o);
|
|
1186
|
+
let l = r.firstChild;
|
|
1187
|
+
for (let a = 0; a < o; a++)
|
|
1188
|
+
i[a] = l, l = l.nextSibling;
|
|
1189
|
+
const c = n.slots.length, h = new Array(c);
|
|
1190
|
+
for (let a = 0; a < c; a++)
|
|
1191
|
+
h[a] = tt(r, n.slots[a].path);
|
|
1192
|
+
s.appendOrInsert(r);
|
|
1193
|
+
const f = new Array(c);
|
|
1194
|
+
for (let a = 0; a < c; a++) {
|
|
1195
|
+
const u = n.slots[a], p = h[a];
|
|
1196
|
+
if (u.kind === "dynamic-text") {
|
|
1197
|
+
const m = t[a], g = p;
|
|
1198
|
+
g.textContent = m.transform(m.source.value), f[a] = m.source.onChange((b) => {
|
|
1199
|
+
g.textContent = m.transform(b);
|
|
1082
1200
|
});
|
|
1083
|
-
} else if (
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1086
|
-
|
|
1201
|
+
} else if (u.kind === "dynamic-attr") {
|
|
1202
|
+
const m = t[a], g = new S(
|
|
1203
|
+
s.document,
|
|
1204
|
+
p,
|
|
1087
1205
|
void 0,
|
|
1088
|
-
|
|
1206
|
+
s.providers
|
|
1089
1207
|
);
|
|
1090
|
-
|
|
1208
|
+
f[a] = m.render(g);
|
|
1091
1209
|
} else {
|
|
1092
|
-
const
|
|
1093
|
-
|
|
1210
|
+
const m = t[a], g = p, b = new S(
|
|
1211
|
+
s.document,
|
|
1094
1212
|
g.parentNode,
|
|
1095
1213
|
g,
|
|
1096
|
-
|
|
1214
|
+
s.providers
|
|
1097
1215
|
);
|
|
1098
|
-
|
|
1216
|
+
f[a] = m.render(b), g.remove();
|
|
1099
1217
|
}
|
|
1100
1218
|
}
|
|
1101
|
-
const
|
|
1102
|
-
|
|
1103
|
-
|
|
1219
|
+
const d = new S(
|
|
1220
|
+
s.document,
|
|
1221
|
+
s.element,
|
|
1104
1222
|
i[0],
|
|
1105
|
-
|
|
1223
|
+
s.providers
|
|
1106
1224
|
);
|
|
1107
1225
|
return {
|
|
1108
|
-
clear: (
|
|
1109
|
-
for (let
|
|
1110
|
-
|
|
1111
|
-
if (
|
|
1112
|
-
for (let
|
|
1113
|
-
const
|
|
1114
|
-
|
|
1226
|
+
clear: (a) => {
|
|
1227
|
+
for (let u = 0; u < c; u++)
|
|
1228
|
+
f[u](a);
|
|
1229
|
+
if (a)
|
|
1230
|
+
for (let u = 0; u < o; u++) {
|
|
1231
|
+
const p = i[u];
|
|
1232
|
+
p.parentNode && p.parentNode.removeChild(p);
|
|
1115
1233
|
}
|
|
1116
1234
|
},
|
|
1117
|
-
startCtx:
|
|
1235
|
+
startCtx: d
|
|
1118
1236
|
};
|
|
1119
1237
|
}
|
|
1120
|
-
function
|
|
1238
|
+
function st(n) {
|
|
1121
1239
|
const e = [];
|
|
1122
|
-
function t(
|
|
1123
|
-
switch (
|
|
1240
|
+
function t(s) {
|
|
1241
|
+
switch (s.kind) {
|
|
1124
1242
|
case "element": {
|
|
1125
|
-
const { tag:
|
|
1126
|
-
e.push(`E:${
|
|
1243
|
+
const { tag: r, children: o } = s;
|
|
1244
|
+
e.push(`E:${r}`);
|
|
1127
1245
|
for (const i of o) if (!t(i)) return !1;
|
|
1128
1246
|
e.push("/E");
|
|
1129
1247
|
break;
|
|
1130
1248
|
}
|
|
1131
1249
|
case "static-attr":
|
|
1132
|
-
e.push(`SA:${
|
|
1250
|
+
e.push(`SA:${s.name}=${s.value}`);
|
|
1133
1251
|
break;
|
|
1134
1252
|
case "dynamic-attr":
|
|
1135
1253
|
e.push("DA");
|
|
1136
1254
|
break;
|
|
1137
1255
|
case "static-text":
|
|
1138
|
-
e.push(`ST:${
|
|
1256
|
+
e.push(`ST:${s.text}`);
|
|
1139
1257
|
break;
|
|
1140
1258
|
case "dynamic-text":
|
|
1141
1259
|
e.push("DT");
|
|
1142
1260
|
break;
|
|
1143
1261
|
case "fragment": {
|
|
1144
|
-
const { children:
|
|
1145
|
-
for (const o of
|
|
1262
|
+
const { children: r } = s;
|
|
1263
|
+
for (const o of r) if (!t(o)) return !1;
|
|
1146
1264
|
break;
|
|
1147
1265
|
}
|
|
1148
1266
|
case "empty":
|
|
1149
1267
|
break;
|
|
1150
1268
|
default:
|
|
1151
|
-
if (
|
|
1269
|
+
if (s.kind === void 0) {
|
|
1152
1270
|
e.push("S");
|
|
1153
1271
|
break;
|
|
1154
1272
|
}
|
|
@@ -1156,15 +1274,15 @@ function Be(r) {
|
|
|
1156
1274
|
}
|
|
1157
1275
|
return !0;
|
|
1158
1276
|
}
|
|
1159
|
-
return t(
|
|
1277
|
+
return t(n) ? e.join("|") : null;
|
|
1160
1278
|
}
|
|
1161
|
-
function
|
|
1279
|
+
function rt(n) {
|
|
1162
1280
|
const e = [];
|
|
1163
|
-
function t(
|
|
1164
|
-
switch (
|
|
1281
|
+
function t(s) {
|
|
1282
|
+
switch (s.kind) {
|
|
1165
1283
|
case "element": {
|
|
1166
|
-
const { children:
|
|
1167
|
-
for (const o of
|
|
1284
|
+
const { children: r } = s;
|
|
1285
|
+
for (const o of r)
|
|
1168
1286
|
if (o.kind !== "static-attr") {
|
|
1169
1287
|
if (o.kind === "dynamic-attr") {
|
|
1170
1288
|
e.push(o);
|
|
@@ -1175,120 +1293,120 @@ function je(r) {
|
|
|
1175
1293
|
break;
|
|
1176
1294
|
}
|
|
1177
1295
|
case "fragment": {
|
|
1178
|
-
const { children:
|
|
1179
|
-
for (const o of
|
|
1296
|
+
const { children: r } = s;
|
|
1297
|
+
for (const o of r) t(o);
|
|
1180
1298
|
break;
|
|
1181
1299
|
}
|
|
1182
1300
|
case "static-text":
|
|
1183
1301
|
case "empty":
|
|
1184
1302
|
break;
|
|
1185
1303
|
case "dynamic-text":
|
|
1186
|
-
e.push(
|
|
1304
|
+
e.push(s);
|
|
1187
1305
|
break;
|
|
1188
1306
|
default:
|
|
1189
|
-
|
|
1307
|
+
s.kind === void 0 && e.push(s);
|
|
1190
1308
|
break;
|
|
1191
1309
|
}
|
|
1192
1310
|
}
|
|
1193
|
-
return t(
|
|
1311
|
+
return t(n), e;
|
|
1194
1312
|
}
|
|
1195
|
-
const
|
|
1196
|
-
build(
|
|
1313
|
+
const it = {
|
|
1314
|
+
build(n, e) {
|
|
1197
1315
|
if (!e.isBrowser()) return null;
|
|
1198
|
-
const t =
|
|
1316
|
+
const t = n;
|
|
1199
1317
|
if (t.kind === void 0) return null;
|
|
1200
|
-
const
|
|
1201
|
-
return
|
|
1318
|
+
const s = e.document;
|
|
1319
|
+
return et(t, s);
|
|
1202
1320
|
},
|
|
1203
|
-
cloneAndHydrate(
|
|
1204
|
-
return
|
|
1321
|
+
cloneAndHydrate(n, e, t) {
|
|
1322
|
+
return nt(n, e, t);
|
|
1205
1323
|
},
|
|
1206
|
-
fingerprint(
|
|
1207
|
-
return
|
|
1324
|
+
fingerprint(n) {
|
|
1325
|
+
return st(n);
|
|
1208
1326
|
},
|
|
1209
|
-
extractSlots(
|
|
1210
|
-
return
|
|
1327
|
+
extractSlots(n) {
|
|
1328
|
+
return rt(n);
|
|
1211
1329
|
}
|
|
1212
|
-
},
|
|
1213
|
-
type:
|
|
1214
|
-
create:
|
|
1215
|
-
templateEngine:
|
|
1330
|
+
}, ot = He({
|
|
1331
|
+
type: Te,
|
|
1332
|
+
create: y,
|
|
1333
|
+
templateEngine: it
|
|
1216
1334
|
}), {
|
|
1217
|
-
Empty:
|
|
1218
|
-
Fragment:
|
|
1219
|
-
When:
|
|
1220
|
-
Unless:
|
|
1221
|
-
ForEach:
|
|
1222
|
-
KeyedForEach:
|
|
1223
|
-
Repeat:
|
|
1224
|
-
OneOf:
|
|
1225
|
-
OneOfField:
|
|
1226
|
-
OneOfKind:
|
|
1227
|
-
OneOfType:
|
|
1228
|
-
OneOfValue:
|
|
1229
|
-
OneOfTuple:
|
|
1230
|
-
MapSignal:
|
|
1231
|
-
MapText:
|
|
1232
|
-
Ensure:
|
|
1233
|
-
EnsureAll:
|
|
1234
|
-
NotEmpty:
|
|
1235
|
-
Task:
|
|
1236
|
-
Async:
|
|
1237
|
-
OnDispose:
|
|
1238
|
-
Conjunction:
|
|
1239
|
-
WithScope:
|
|
1240
|
-
WithProvider:
|
|
1241
|
-
Provide:
|
|
1242
|
-
Use:
|
|
1243
|
-
UseMany:
|
|
1244
|
-
handleValueOrSignal:
|
|
1245
|
-
createReactiveRenderable:
|
|
1246
|
-
renderableOfTNode:
|
|
1247
|
-
} =
|
|
1248
|
-
function
|
|
1249
|
-
let e =
|
|
1250
|
-
return e === void 0 && (e =
|
|
1335
|
+
Empty: lt,
|
|
1336
|
+
Fragment: v,
|
|
1337
|
+
When: Ft,
|
|
1338
|
+
Unless: Wt,
|
|
1339
|
+
ForEach: Kt,
|
|
1340
|
+
KeyedForEach: ct,
|
|
1341
|
+
Repeat: qt,
|
|
1342
|
+
OneOf: Ut,
|
|
1343
|
+
OneOfField: Gt,
|
|
1344
|
+
OneOfKind: Qt,
|
|
1345
|
+
OneOfType: Jt,
|
|
1346
|
+
OneOfValue: Zt,
|
|
1347
|
+
OneOfTuple: zt,
|
|
1348
|
+
MapSignal: en,
|
|
1349
|
+
MapText: tn,
|
|
1350
|
+
Ensure: nn,
|
|
1351
|
+
EnsureAll: sn,
|
|
1352
|
+
NotEmpty: rn,
|
|
1353
|
+
Task: on,
|
|
1354
|
+
Async: ln,
|
|
1355
|
+
OnDispose: Y,
|
|
1356
|
+
Conjunction: cn,
|
|
1357
|
+
WithScope: at,
|
|
1358
|
+
WithProvider: an,
|
|
1359
|
+
Provide: un,
|
|
1360
|
+
Use: dn,
|
|
1361
|
+
UseMany: hn,
|
|
1362
|
+
handleValueOrSignal: fn,
|
|
1363
|
+
createReactiveRenderable: pn,
|
|
1364
|
+
renderableOfTNode: A
|
|
1365
|
+
} = ot, te = /* @__PURE__ */ new Map();
|
|
1366
|
+
function ut(n) {
|
|
1367
|
+
let e = te.get(n);
|
|
1368
|
+
return e === void 0 && (e = n.split(" ").filter((t) => t.length > 0), te.set(n, e)), e;
|
|
1251
1369
|
}
|
|
1252
|
-
const
|
|
1253
|
-
const e =
|
|
1254
|
-
|
|
1370
|
+
const dt = (n) => {
|
|
1371
|
+
const e = y((t) => (t.addClasses(n), (s) => {
|
|
1372
|
+
s && t.removeClasses(n);
|
|
1255
1373
|
}));
|
|
1256
|
-
return e.kind = "static-attr", e.name = "class", e.value =
|
|
1257
|
-
},
|
|
1258
|
-
const e =
|
|
1259
|
-
let
|
|
1260
|
-
const
|
|
1374
|
+
return e.kind = "static-attr", e.name = "class", e.value = n.join(" "), e;
|
|
1375
|
+
}, ht = (n) => {
|
|
1376
|
+
const e = y((t) => {
|
|
1377
|
+
let s = [];
|
|
1378
|
+
const r = n.on(
|
|
1261
1379
|
(o) => {
|
|
1262
1380
|
const i = (o ?? "").split(" ").filter((l) => l.length > 0);
|
|
1263
|
-
|
|
1381
|
+
s.length > 0 && t.removeClasses(s), i.length > 0 && t.addClasses(i), s = i;
|
|
1264
1382
|
},
|
|
1265
1383
|
{ noAutoDispose: !0 }
|
|
1266
1384
|
);
|
|
1267
1385
|
return (o) => {
|
|
1268
|
-
|
|
1386
|
+
r(), o && t.removeClasses(s), s = [];
|
|
1269
1387
|
};
|
|
1270
1388
|
});
|
|
1271
1389
|
return e.kind = "dynamic-attr", e;
|
|
1272
|
-
},
|
|
1273
|
-
const t =
|
|
1274
|
-
const { get:
|
|
1390
|
+
}, ft = (n, e) => {
|
|
1391
|
+
const t = y((s) => {
|
|
1392
|
+
const { get: r, set: o } = s.makeAccessors(n), i = r();
|
|
1275
1393
|
return o(e), (l) => {
|
|
1276
1394
|
l && o(i);
|
|
1277
1395
|
};
|
|
1278
1396
|
});
|
|
1279
|
-
return t.kind = "static-attr", t.name =
|
|
1280
|
-
},
|
|
1281
|
-
const t =
|
|
1282
|
-
const { get:
|
|
1397
|
+
return t.kind = "static-attr", t.name = n, t.value = String(e), t;
|
|
1398
|
+
}, pt = (n, e) => {
|
|
1399
|
+
const t = y((s) => {
|
|
1400
|
+
const { get: r, set: o } = s.makeAccessors(n), i = r(), l = e.on(o, { noAutoDispose: !0 });
|
|
1283
1401
|
return (c) => {
|
|
1284
1402
|
l(), c && o(i);
|
|
1285
1403
|
};
|
|
1286
1404
|
});
|
|
1287
1405
|
return t.kind = "dynamic-attr", t;
|
|
1288
|
-
},
|
|
1406
|
+
}, H = (n, e) => j.is(e) ? pt(n, e) : ft(n, e), mt = (n, e) => n === "class" ? j.is(e) ? ht(e) : dt(
|
|
1289
1407
|
/* c8 ignore next */
|
|
1290
1408
|
(e ?? "").split(" ").filter((t) => t.length > 0)
|
|
1291
|
-
) :
|
|
1409
|
+
) : H(n, e), T = new Proxy(
|
|
1292
1410
|
{},
|
|
1293
1411
|
{
|
|
1294
1412
|
/**
|
|
@@ -1302,22 +1420,9 @@ const qe = (r) => {
|
|
|
1302
1420
|
* @returns The renderable component for the specified attribute.
|
|
1303
1421
|
*
|
|
1304
1422
|
*/
|
|
1305
|
-
get: (
|
|
1306
|
-
}
|
|
1307
|
-
), Xe = (r, e) => N(`data-${r}`, e), Ut = new Proxy(
|
|
1308
|
-
{},
|
|
1309
|
-
{
|
|
1310
|
-
/**
|
|
1311
|
-
* Creates a renderable component for the specified `data-?` attribute.
|
|
1312
|
-
*
|
|
1313
|
-
* @param _ - The target object.
|
|
1314
|
-
* @param name - The name of the data attribute.
|
|
1315
|
-
* @returns The renderable component for the specified attribute.
|
|
1316
|
-
*
|
|
1317
|
-
*/
|
|
1318
|
-
get: (r, e) => (t) => Xe(e, t)
|
|
1423
|
+
get: (n, e) => (t) => mt(e, t)
|
|
1319
1424
|
}
|
|
1320
|
-
),
|
|
1425
|
+
), gt = (n, e) => H(`data-${n}`, e), mn = (n, e) => gt(n, e), yt = (n, e) => H(`aria-${n}`, e), gn = new Proxy(
|
|
1321
1426
|
{},
|
|
1322
1427
|
{
|
|
1323
1428
|
/**
|
|
@@ -1328,9 +1433,9 @@ const qe = (r) => {
|
|
|
1328
1433
|
* @returns The renderable component for the specified attribute.
|
|
1329
1434
|
*
|
|
1330
1435
|
*/
|
|
1331
|
-
get: (
|
|
1436
|
+
get: (n, e) => (t) => yt(e, t)
|
|
1332
1437
|
}
|
|
1333
|
-
),
|
|
1438
|
+
), Tt = (n, e) => H(n, e), yn = new Proxy(
|
|
1334
1439
|
{},
|
|
1335
1440
|
{
|
|
1336
1441
|
/**
|
|
@@ -1341,9 +1446,9 @@ const qe = (r) => {
|
|
|
1341
1446
|
* @returns The renderable component for the specified attribute.
|
|
1342
1447
|
*
|
|
1343
1448
|
*/
|
|
1344
|
-
get: (
|
|
1449
|
+
get: (n, e) => (t) => Tt(e, t)
|
|
1345
1450
|
}
|
|
1346
|
-
),
|
|
1451
|
+
), bt = (n, e) => H(n, e), Tn = new Proxy(
|
|
1347
1452
|
{},
|
|
1348
1453
|
{
|
|
1349
1454
|
/**
|
|
@@ -1353,40 +1458,40 @@ const qe = (r) => {
|
|
|
1353
1458
|
* @returns The renderable component for the specified attribute.
|
|
1354
1459
|
*
|
|
1355
1460
|
*/
|
|
1356
|
-
get: (
|
|
1461
|
+
get: (n, e) => (t) => bt(e, t)
|
|
1357
1462
|
}
|
|
1358
|
-
),
|
|
1359
|
-
function
|
|
1360
|
-
let t =
|
|
1361
|
-
return t || (t =
|
|
1362
|
-
|
|
1463
|
+
), ne = /* @__PURE__ */ new WeakMap();
|
|
1464
|
+
function St(n, e) {
|
|
1465
|
+
let t = ne.get(n);
|
|
1466
|
+
return t || (t = Ie(n, e), ne.set(
|
|
1467
|
+
n,
|
|
1363
1468
|
t
|
|
1364
1469
|
)), t;
|
|
1365
1470
|
}
|
|
1366
|
-
const
|
|
1367
|
-
const
|
|
1368
|
-
const
|
|
1369
|
-
(
|
|
1370
|
-
|
|
1471
|
+
const bn = (n, e, t = "danger", s) => {
|
|
1472
|
+
const r = ut(t), o = y((i) => {
|
|
1473
|
+
const h = St(n, s)(e).on(
|
|
1474
|
+
(f) => {
|
|
1475
|
+
f ? i.addClasses(r) : i.removeClasses(r);
|
|
1371
1476
|
},
|
|
1372
1477
|
{ noAutoDispose: !0 }
|
|
1373
1478
|
);
|
|
1374
|
-
return (
|
|
1375
|
-
|
|
1479
|
+
return (f) => {
|
|
1480
|
+
h(), f && i.removeClasses(r);
|
|
1376
1481
|
};
|
|
1377
1482
|
});
|
|
1378
1483
|
return o.kind = "dynamic-attr", o;
|
|
1379
|
-
},
|
|
1380
|
-
const
|
|
1381
|
-
(
|
|
1484
|
+
}, be = (n, e, t) => {
|
|
1485
|
+
const s = y(
|
|
1486
|
+
(r) => r.on(n, e, t)
|
|
1382
1487
|
);
|
|
1383
|
-
return
|
|
1384
|
-
},
|
|
1488
|
+
return s.kind = "dynamic-attr", s;
|
|
1489
|
+
}, vt = (n) => be("click", (e, t) => {
|
|
1385
1490
|
e.preventDefault();
|
|
1386
|
-
const
|
|
1491
|
+
const s = e.target;
|
|
1387
1492
|
setTimeout(() => {
|
|
1388
|
-
const
|
|
1389
|
-
|
|
1493
|
+
const r = s.ownerDocument != null ? s?.checked : void 0;
|
|
1494
|
+
r != null && n(!r, t);
|
|
1390
1495
|
}, 0);
|
|
1391
1496
|
}), D = new Proxy(
|
|
1392
1497
|
{},
|
|
@@ -1396,116 +1501,116 @@ const zt = (r, e, t = "danger", n) => {
|
|
|
1396
1501
|
* @param fn - The function to call when the event is triggered.
|
|
1397
1502
|
* @returns A `Renderable` function that adds the event listener to the element.
|
|
1398
1503
|
*/
|
|
1399
|
-
get: (
|
|
1400
|
-
}
|
|
1401
|
-
),
|
|
1402
|
-
e?.preventDefault === !0 && t.preventDefault(), e?.stopPropagation === !0 && t.stopPropagation(), e?.stopImmediatePropagation === !0 && t.stopImmediatePropagation(),
|
|
1403
|
-
}, x = (
|
|
1404
|
-
const
|
|
1405
|
-
|
|
1406
|
-
}, e),
|
|
1407
|
-
(t,
|
|
1504
|
+
get: (n, e) => (t) => be(e, t)
|
|
1505
|
+
}
|
|
1506
|
+
), xt = (n, e) => (t) => {
|
|
1507
|
+
e?.preventDefault === !0 && t.preventDefault(), e?.stopPropagation === !0 && t.stopPropagation(), e?.stopImmediatePropagation === !0 && t.stopImmediatePropagation(), n(t);
|
|
1508
|
+
}, x = (n, e) => xt((t) => {
|
|
1509
|
+
const s = t.target;
|
|
1510
|
+
n(s, t);
|
|
1511
|
+
}, e), wt = (n, e) => x(
|
|
1512
|
+
(t, s) => n(t.value, s),
|
|
1408
1513
|
e
|
|
1409
|
-
),
|
|
1410
|
-
(t,
|
|
1514
|
+
), Et = (n, e) => x(
|
|
1515
|
+
(t, s) => n(t.valueAsNumber, s),
|
|
1411
1516
|
e
|
|
1412
|
-
),
|
|
1517
|
+
), kt = (n, e) => x((t, s) => {
|
|
1413
1518
|
if (t.value === "")
|
|
1414
1519
|
return;
|
|
1415
|
-
const
|
|
1416
|
-
Number(
|
|
1417
|
-
Number(
|
|
1418
|
-
Number(
|
|
1520
|
+
const r = t.value.split("-"), o = new Date(
|
|
1521
|
+
Number(r[0]),
|
|
1522
|
+
Number(r[1]) - 1,
|
|
1523
|
+
Number(r[2].substring(0, 2))
|
|
1419
1524
|
);
|
|
1420
|
-
|
|
1421
|
-
}, e),
|
|
1525
|
+
n(o, s);
|
|
1526
|
+
}, e), Sn = (n, e) => x((t, s) => {
|
|
1422
1527
|
if (t.value === "") {
|
|
1423
|
-
|
|
1528
|
+
n(null, s);
|
|
1424
1529
|
return;
|
|
1425
1530
|
}
|
|
1426
|
-
const
|
|
1427
|
-
Number(
|
|
1428
|
-
Number(
|
|
1429
|
-
Number(
|
|
1531
|
+
const r = t.value.split("-"), o = new Date(
|
|
1532
|
+
Number(r[0]),
|
|
1533
|
+
Number(r[1]) - 1,
|
|
1534
|
+
Number(r[2].substring(0, 2))
|
|
1430
1535
|
);
|
|
1431
|
-
|
|
1432
|
-
}, e),
|
|
1536
|
+
n(o, s);
|
|
1537
|
+
}, e), At = (n, e) => x((t, s) => {
|
|
1433
1538
|
if (t.value === "")
|
|
1434
1539
|
return;
|
|
1435
|
-
const
|
|
1540
|
+
const r = t.value.split("T"), o = r[0].split("-"), i = new Date(
|
|
1436
1541
|
Number(o[0]),
|
|
1437
1542
|
Number(o[1]) - 1,
|
|
1438
1543
|
Number(o[2])
|
|
1439
|
-
), l =
|
|
1440
|
-
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])),
|
|
1441
|
-
}, e),
|
|
1544
|
+
), l = r[1].split(":");
|
|
1545
|
+
i.setHours(Number(l[0])), i.setMinutes(Number(l[1])), i.setSeconds(Number(l[2])), n(i, s);
|
|
1546
|
+
}, e), vn = (n, e) => x((t, s) => {
|
|
1442
1547
|
if (t.value === "") {
|
|
1443
|
-
|
|
1548
|
+
n(null, s);
|
|
1444
1549
|
return;
|
|
1445
1550
|
}
|
|
1446
|
-
const
|
|
1447
|
-
if (
|
|
1448
|
-
|
|
1551
|
+
const r = t.value.split("T");
|
|
1552
|
+
if (r.length !== 2) {
|
|
1553
|
+
n(null, s);
|
|
1449
1554
|
return;
|
|
1450
1555
|
}
|
|
1451
|
-
const o =
|
|
1556
|
+
const o = r[0].split("-"), i = new Date(
|
|
1452
1557
|
Number(o[0]),
|
|
1453
1558
|
Number(o[1]) - 1,
|
|
1454
1559
|
Number(o[2])
|
|
1455
|
-
), l =
|
|
1456
|
-
i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)),
|
|
1457
|
-
}, e),
|
|
1458
|
-
|
|
1459
|
-
}, e),
|
|
1460
|
-
|
|
1461
|
-
D[e](
|
|
1462
|
-
),
|
|
1463
|
-
|
|
1464
|
-
D[e](
|
|
1465
|
-
),
|
|
1466
|
-
|
|
1467
|
-
D[e](
|
|
1468
|
-
),
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
),
|
|
1472
|
-
const
|
|
1560
|
+
), l = r[1].split(":");
|
|
1561
|
+
i.setHours(Number(l[0] ?? 0)), i.setMinutes(Number(l[1] ?? 0)), i.setSeconds(Number(l[2] ?? 0)), n(i, s);
|
|
1562
|
+
}, e), xn = (n, e) => x((t, s) => {
|
|
1563
|
+
n(t.checked, s);
|
|
1564
|
+
}, e), wn = (n, e = "input") => v(
|
|
1565
|
+
T.valueAsDate(n),
|
|
1566
|
+
D[e](kt((t) => n.set(t)))
|
|
1567
|
+
), En = (n, e = "input") => v(
|
|
1568
|
+
T.valueAsDate(n),
|
|
1569
|
+
D[e](At((t) => n.set(t)))
|
|
1570
|
+
), kn = (n, e = "input") => v(
|
|
1571
|
+
T.valueAsNumber(n),
|
|
1572
|
+
D[e](Et((t) => n.set(t)))
|
|
1573
|
+
), An = (n, e = "input") => v(T.value(n), D[e](wt((t) => n.set(t)))), Cn = (n) => v(
|
|
1574
|
+
T.checked(n),
|
|
1575
|
+
vt((e) => n.set(e))
|
|
1576
|
+
), Ct = (n, e, t, s) => {
|
|
1577
|
+
const r = y((o) => {
|
|
1473
1578
|
if (!o.isBrowser())
|
|
1474
1579
|
return () => {
|
|
1475
1580
|
};
|
|
1476
1581
|
const i = o.element, l = (c) => {
|
|
1477
|
-
const
|
|
1478
|
-
|
|
1582
|
+
const h = c.target?.closest(e);
|
|
1583
|
+
h != null && i.contains(h) && t(c, o);
|
|
1479
1584
|
};
|
|
1480
|
-
return i.addEventListener(
|
|
1481
|
-
c && i.removeEventListener(
|
|
1585
|
+
return i.addEventListener(n, l, s), (c) => {
|
|
1586
|
+
c && i.removeEventListener(n, l, s);
|
|
1482
1587
|
};
|
|
1483
1588
|
});
|
|
1484
|
-
return
|
|
1485
|
-
},
|
|
1589
|
+
return r.kind = "dynamic-attr", r;
|
|
1590
|
+
}, Mn = new Proxy(
|
|
1486
1591
|
{},
|
|
1487
1592
|
{
|
|
1488
|
-
get: (
|
|
1593
|
+
get: (n, e) => (t, s, r) => Ct(e, t, s, r)
|
|
1489
1594
|
}
|
|
1490
|
-
),
|
|
1491
|
-
t &&
|
|
1492
|
-
})),
|
|
1493
|
-
const t = e.map(
|
|
1494
|
-
const o =
|
|
1595
|
+
), On = (n) => y((e) => (e.appendOrInsert(n), (t) => {
|
|
1596
|
+
t && V(n);
|
|
1597
|
+
})), Se = (n, ...e) => {
|
|
1598
|
+
const t = e.map(A), s = y((r) => {
|
|
1599
|
+
const o = r.makeChildElement(n, void 0), i = t.map((l) => l.render(o));
|
|
1495
1600
|
return (l) => {
|
|
1496
1601
|
i.forEach((c) => c(!1)), o.clear(l);
|
|
1497
1602
|
};
|
|
1498
1603
|
});
|
|
1499
|
-
return
|
|
1500
|
-
},
|
|
1501
|
-
const
|
|
1502
|
-
const i = o.makeChildElement(
|
|
1604
|
+
return s.kind = "element", s.tag = n, s.children = t, s;
|
|
1605
|
+
}, X = (n, e, ...t) => {
|
|
1606
|
+
const s = t.map(A), r = y((o) => {
|
|
1607
|
+
const i = o.makeChildElement(n, e), l = s.map((c) => c.render(i));
|
|
1503
1608
|
return (c) => {
|
|
1504
|
-
l.forEach((
|
|
1609
|
+
l.forEach((h) => h(!1)), i.clear(c);
|
|
1505
1610
|
};
|
|
1506
1611
|
});
|
|
1507
|
-
return
|
|
1508
|
-
},
|
|
1612
|
+
return r.kind = "element", r.tag = n, r.ns = e, r.children = s, r;
|
|
1613
|
+
}, Mt = new Proxy(
|
|
1509
1614
|
{},
|
|
1510
1615
|
{
|
|
1511
1616
|
/**
|
|
@@ -1513,9 +1618,9 @@ const zt = (r, e, t = "danger", n) => {
|
|
|
1513
1618
|
* @param tagName - The HTML tag name.
|
|
1514
1619
|
* @returns A renderable function that creates and appends the HTML element to the DOM.
|
|
1515
1620
|
*/
|
|
1516
|
-
get: (
|
|
1621
|
+
get: (n, e) => (...t) => Se(e, ...t)
|
|
1517
1622
|
}
|
|
1518
|
-
),
|
|
1623
|
+
), Pn = new Proxy(
|
|
1519
1624
|
{},
|
|
1520
1625
|
{
|
|
1521
1626
|
/**
|
|
@@ -1523,9 +1628,9 @@ const zt = (r, e, t = "danger", n) => {
|
|
|
1523
1628
|
* @param type - The input type name.
|
|
1524
1629
|
* @returns A renderable function that creates and appends the HTMLInput element to the DOM.
|
|
1525
1630
|
*/
|
|
1526
|
-
get: (
|
|
1631
|
+
get: (n, e) => (...t) => Se("input", T.type(e), ...t)
|
|
1527
1632
|
}
|
|
1528
|
-
),
|
|
1633
|
+
), ve = "http://www.w3.org/2000/svg", Ln = (n, ...e) => X(n, ve, ...e), In = new Proxy(
|
|
1529
1634
|
{},
|
|
1530
1635
|
{
|
|
1531
1636
|
/**
|
|
@@ -1533,9 +1638,9 @@ const zt = (r, e, t = "danger", n) => {
|
|
|
1533
1638
|
* @param tagName - The SVG tag name.
|
|
1534
1639
|
* @returns A renderable function that creates and appends the SVG element to the DOM.
|
|
1535
1640
|
*/
|
|
1536
|
-
get: (
|
|
1641
|
+
get: (n, e) => (...t) => X(e, ve, ...t)
|
|
1537
1642
|
}
|
|
1538
|
-
),
|
|
1643
|
+
), xe = "http://www.w3.org/1998/Math/MathML", Hn = (n, ...e) => X(n, xe, ...e), Dn = new Proxy(
|
|
1539
1644
|
{},
|
|
1540
1645
|
{
|
|
1541
1646
|
/**
|
|
@@ -1543,123 +1648,123 @@ const zt = (r, e, t = "danger", n) => {
|
|
|
1543
1648
|
* @param tagName - The Math tag name.
|
|
1544
1649
|
* @returns A renderable function that creates and appends the Math element to the DOM.
|
|
1545
1650
|
*/
|
|
1546
|
-
get: (
|
|
1651
|
+
get: (n, e) => (...t) => X(e, xe, ...t)
|
|
1547
1652
|
}
|
|
1548
|
-
),
|
|
1653
|
+
), N = (n) => y((e) => {
|
|
1549
1654
|
if (e.isBrowser()) {
|
|
1550
|
-
const t =
|
|
1655
|
+
const t = n(e);
|
|
1551
1656
|
if (t != null)
|
|
1552
|
-
return
|
|
1657
|
+
return A(t).render(e);
|
|
1553
1658
|
}
|
|
1554
1659
|
return () => {
|
|
1555
1660
|
};
|
|
1556
1661
|
});
|
|
1557
|
-
function
|
|
1558
|
-
src:
|
|
1662
|
+
function Nn({
|
|
1663
|
+
src: n,
|
|
1559
1664
|
name: e,
|
|
1560
1665
|
width: t,
|
|
1561
|
-
height:
|
|
1562
|
-
sandbox:
|
|
1666
|
+
height: s,
|
|
1667
|
+
sandbox: r,
|
|
1563
1668
|
allow: o,
|
|
1564
1669
|
referrerpolicy: i,
|
|
1565
1670
|
loading: l,
|
|
1566
1671
|
iframeChild: c,
|
|
1567
|
-
onLoad:
|
|
1568
|
-
} = {}, ...
|
|
1569
|
-
return
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
t != null ?
|
|
1672
|
+
onLoad: h
|
|
1673
|
+
} = {}, ...f) {
|
|
1674
|
+
return Mt.iframe(
|
|
1675
|
+
T.src(n),
|
|
1676
|
+
T.name(e),
|
|
1677
|
+
T.width(
|
|
1678
|
+
t != null ? $.map(t, String) : void 0
|
|
1574
1679
|
),
|
|
1575
|
-
|
|
1576
|
-
|
|
1680
|
+
T.height(
|
|
1681
|
+
s != null ? $.map(s, String) : void 0
|
|
1577
1682
|
),
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1683
|
+
T.sandbox(r),
|
|
1684
|
+
T.allow(o),
|
|
1685
|
+
T.referrerpolicy(i),
|
|
1581
1686
|
c,
|
|
1582
|
-
|
|
1583
|
-
const
|
|
1584
|
-
let
|
|
1585
|
-
const
|
|
1586
|
-
if (
|
|
1587
|
-
|
|
1588
|
-
const g =
|
|
1589
|
-
if (g && (
|
|
1590
|
-
const
|
|
1591
|
-
if (
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1687
|
+
N((d) => {
|
|
1688
|
+
const a = d.element;
|
|
1689
|
+
let u, p = !1;
|
|
1690
|
+
const m = () => {
|
|
1691
|
+
if (p) return;
|
|
1692
|
+
p = !0;
|
|
1693
|
+
const g = a.contentDocument;
|
|
1694
|
+
if (g && (h && h(a), f.length > 0)) {
|
|
1695
|
+
const b = g.body;
|
|
1696
|
+
if (b) {
|
|
1697
|
+
const F = d.withElement(b);
|
|
1698
|
+
u = I(v(...f), F);
|
|
1594
1699
|
}
|
|
1595
1700
|
}
|
|
1596
1701
|
};
|
|
1597
|
-
return l != null &&
|
|
1598
|
-
|
|
1599
|
-
}), (
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1702
|
+
return l != null && $.on(l, (g) => {
|
|
1703
|
+
a.loading = g;
|
|
1704
|
+
}), (f.length > 0 || h) && (n || setTimeout(m, 0)), v(
|
|
1705
|
+
f.length > 0 || h ? D.load(m) : lt,
|
|
1706
|
+
Y(() => {
|
|
1707
|
+
u && u(!1);
|
|
1603
1708
|
})
|
|
1604
1709
|
);
|
|
1605
1710
|
})
|
|
1606
1711
|
);
|
|
1607
1712
|
}
|
|
1608
|
-
const
|
|
1609
|
-
const
|
|
1610
|
-
return () =>
|
|
1611
|
-
}),
|
|
1612
|
-
mark:
|
|
1713
|
+
const Rn = (n, e) => y((t) => {
|
|
1714
|
+
const s = t.makePortal(n), r = I(A(e), s);
|
|
1715
|
+
return () => r(!0);
|
|
1716
|
+
}), _ = /* @__PURE__ */ new Map(), Ot = (n) => ({
|
|
1717
|
+
mark: re(`Probe(${n.description})`),
|
|
1613
1718
|
create: ({ callback: e = () => {
|
|
1614
1719
|
}, timeout: t = 10 } = {}) => {
|
|
1615
|
-
const
|
|
1616
|
-
clearTimeout(
|
|
1720
|
+
const s = (l) => {
|
|
1721
|
+
clearTimeout(r), _.delete(n), e(l);
|
|
1617
1722
|
};
|
|
1618
|
-
if (
|
|
1619
|
-
throw new Error(`Probe already exists: ${
|
|
1620
|
-
const
|
|
1621
|
-
return
|
|
1723
|
+
if (_.has(n))
|
|
1724
|
+
throw new Error(`Probe already exists: ${n.description}`);
|
|
1725
|
+
const r = setTimeout(() => s("timeout"), t), o = { counter: 0, timeoutId: r };
|
|
1726
|
+
return _.set(n, o), {
|
|
1622
1727
|
value: () => {
|
|
1623
|
-
clearTimeout(
|
|
1624
|
-
const l =
|
|
1625
|
-
l != null && --l.counter === 0 &&
|
|
1728
|
+
clearTimeout(r);
|
|
1729
|
+
const l = _.get(n);
|
|
1730
|
+
l != null && --l.counter === 0 && s("resolved");
|
|
1626
1731
|
},
|
|
1627
|
-
dispose: () =>
|
|
1732
|
+
dispose: () => s("disposed"),
|
|
1628
1733
|
onUse: () => o.counter++
|
|
1629
1734
|
};
|
|
1630
1735
|
}
|
|
1631
|
-
}),
|
|
1632
|
-
function
|
|
1633
|
-
mode:
|
|
1736
|
+
}), _n = Ot(/* @__PURE__ */ Symbol("GlobalProbe"));
|
|
1737
|
+
function $n({
|
|
1738
|
+
mode: n,
|
|
1634
1739
|
delegatesFocus: e,
|
|
1635
1740
|
slotAssignment: t,
|
|
1636
|
-
clonable:
|
|
1637
|
-
serializable:
|
|
1741
|
+
clonable: s,
|
|
1742
|
+
serializable: r
|
|
1638
1743
|
}, ...o) {
|
|
1639
|
-
return
|
|
1640
|
-
const l = { mode:
|
|
1641
|
-
e !== void 0 && (l.delegatesFocus = e), t !== void 0 && (l.slotAssignment = t),
|
|
1642
|
-
const c = i.element.attachShadow(l),
|
|
1643
|
-
return
|
|
1744
|
+
return N((i) => {
|
|
1745
|
+
const l = { mode: n };
|
|
1746
|
+
e !== void 0 && (l.delegatesFocus = e), t !== void 0 && (l.slotAssignment = t), s !== void 0 && (l.clonable = s), r !== void 0 && (l.serializable = r);
|
|
1747
|
+
const c = i.element.attachShadow(l), h = i.withElement(c), f = I(v(...o), h);
|
|
1748
|
+
return Y(() => f(!0));
|
|
1644
1749
|
});
|
|
1645
1750
|
}
|
|
1646
|
-
const
|
|
1647
|
-
const t =
|
|
1648
|
-
const
|
|
1649
|
-
return
|
|
1650
|
-
o &&
|
|
1751
|
+
const Pt = (n, e) => {
|
|
1752
|
+
const t = y((s) => {
|
|
1753
|
+
const r = s.getStyle(n);
|
|
1754
|
+
return s.setStyle(n, e), (o) => {
|
|
1755
|
+
o && s.setStyle(n, r);
|
|
1651
1756
|
};
|
|
1652
1757
|
});
|
|
1653
1758
|
return t.kind = "dynamic-attr", t;
|
|
1654
|
-
},
|
|
1655
|
-
const t =
|
|
1656
|
-
const
|
|
1759
|
+
}, Lt = (n, e) => {
|
|
1760
|
+
const t = y((s) => {
|
|
1761
|
+
const r = s.getStyle(n), o = e.on((i) => s.setStyle(n, i));
|
|
1657
1762
|
return (i) => {
|
|
1658
|
-
o(), i &&
|
|
1763
|
+
o(), i && s.setStyle(n, r);
|
|
1659
1764
|
};
|
|
1660
1765
|
});
|
|
1661
1766
|
return t.kind = "dynamic-attr", t;
|
|
1662
|
-
},
|
|
1767
|
+
}, se = (n, e) => j.is(e) ? Lt(n, e) : Pt(n, e), Bn = new Proxy({}, {
|
|
1663
1768
|
/**
|
|
1664
1769
|
* Creates a renderable component for the specified `style` property.
|
|
1665
1770
|
*
|
|
@@ -1668,175 +1773,282 @@ const ut = (r, e) => {
|
|
|
1668
1773
|
* @returns The renderable component for the specified attribute.
|
|
1669
1774
|
*
|
|
1670
1775
|
*/
|
|
1671
|
-
get: (
|
|
1672
|
-
}),
|
|
1673
|
-
const t = e.makeChildText(
|
|
1674
|
-
return (
|
|
1675
|
-
}),
|
|
1676
|
-
const t = e.makeChildText(
|
|
1677
|
-
return (
|
|
1678
|
-
|
|
1776
|
+
get: (n, e) => e === "variable" ? (t, s) => se(t, s) : (t) => se(e, t)
|
|
1777
|
+
}), It = (n) => y((e) => {
|
|
1778
|
+
const t = e.makeChildText(n);
|
|
1779
|
+
return (s) => t.clear(s);
|
|
1780
|
+
}), Ht = (n) => y((e) => {
|
|
1781
|
+
const t = e.makeChildText(n.value), s = n.on((r) => t.setText(r));
|
|
1782
|
+
return (r) => {
|
|
1783
|
+
s(), t.clear(r);
|
|
1679
1784
|
};
|
|
1680
|
-
}),
|
|
1681
|
-
const t =
|
|
1785
|
+
}), Vn = (n) => j.is(n) ? Ht(n) : It(n), jn = (n) => y((e) => {
|
|
1786
|
+
const t = n(e);
|
|
1682
1787
|
return t == null ? () => {
|
|
1683
|
-
} :
|
|
1684
|
-
}),
|
|
1788
|
+
} : A(t).render(e);
|
|
1789
|
+
}), Yn = (n) => N((e) => n(e.element)), Xn = (n) => y((e) => {
|
|
1685
1790
|
if (e.isHeadlessDOM()) {
|
|
1686
|
-
const t =
|
|
1791
|
+
const t = n(e);
|
|
1687
1792
|
if (t)
|
|
1688
|
-
return
|
|
1793
|
+
return A(t).render(e);
|
|
1689
1794
|
}
|
|
1690
1795
|
return () => {
|
|
1691
1796
|
};
|
|
1797
|
+
}), Fn = (n, e) => N((t) => {
|
|
1798
|
+
const s = t.element, r = Ze(
|
|
1799
|
+
n,
|
|
1800
|
+
() => s.getBoundingClientRect(),
|
|
1801
|
+
e
|
|
1802
|
+
);
|
|
1803
|
+
return s.addEventListener("touchstart", r.onTouchStart, { passive: !1 }), s.addEventListener("touchmove", r.onTouchMove, { passive: !1 }), s.addEventListener("touchend", r.onTouchEnd), Y(() => {
|
|
1804
|
+
s.removeEventListener("touchstart", r.onTouchStart), s.removeEventListener("touchmove", r.onTouchMove), s.removeEventListener("touchend", r.onTouchEnd);
|
|
1805
|
+
});
|
|
1806
|
+
}), Wn = (n, e) => N((t) => {
|
|
1807
|
+
const s = t.element, r = ze(n, e);
|
|
1808
|
+
let o = null, i = 0, l = 0;
|
|
1809
|
+
const c = (d) => {
|
|
1810
|
+
o !== null && (o.dispose(), o = null), i = d.clientX, l = d.clientY, r.track(d.clientX, d.clientY), s.setPointerCapture(d.pointerId);
|
|
1811
|
+
}, h = (d) => {
|
|
1812
|
+
if (!s.hasPointerCapture(d.pointerId)) return;
|
|
1813
|
+
const a = d.clientX - i, u = d.clientY - l;
|
|
1814
|
+
i = d.clientX, l = d.clientY, r.track(d.clientX, d.clientY), n(a, u);
|
|
1815
|
+
}, f = (d) => {
|
|
1816
|
+
s.hasPointerCapture(d.pointerId) && (s.releasePointerCapture(d.pointerId), o = r.release());
|
|
1817
|
+
};
|
|
1818
|
+
return s.addEventListener("pointerdown", c), s.addEventListener("pointermove", h), s.addEventListener("pointerup", f), s.addEventListener("pointercancel", f), Y(() => {
|
|
1819
|
+
o !== null && o.dispose(), s.removeEventListener("pointerdown", c), s.removeEventListener("pointermove", h), s.removeEventListener("pointerup", f), s.removeEventListener("pointercancel", f);
|
|
1820
|
+
});
|
|
1692
1821
|
});
|
|
1822
|
+
function Kn(n, e, t, s) {
|
|
1823
|
+
return at((r) => {
|
|
1824
|
+
const o = B([]), i = /* @__PURE__ */ new Map();
|
|
1825
|
+
r.onDispose(() => {
|
|
1826
|
+
for (const c of i.values()) clearTimeout(c);
|
|
1827
|
+
i.clear();
|
|
1828
|
+
});
|
|
1829
|
+
const l = /* @__PURE__ */ new Set();
|
|
1830
|
+
return n.on(
|
|
1831
|
+
(c) => {
|
|
1832
|
+
const h = new Set(c.map(e)), f = o.get();
|
|
1833
|
+
for (const u of f)
|
|
1834
|
+
if (!h.has(u.key) && !l.has(u.key))
|
|
1835
|
+
if (l.add(u.key), u.isExiting.set(!0), s.exitDuration != null && s.exitDuration > 0) {
|
|
1836
|
+
const p = setTimeout(() => {
|
|
1837
|
+
i.delete(u.key), l.delete(u.key), o.set(o.get().filter((m) => m.key !== u.key));
|
|
1838
|
+
}, s.exitDuration);
|
|
1839
|
+
i.set(u.key, p);
|
|
1840
|
+
} else s.useAnimationEvents || l.delete(u.key);
|
|
1841
|
+
const d = c.map((u) => {
|
|
1842
|
+
const p = e(u), m = f.find(
|
|
1843
|
+
(g) => g.key === p && !l.has(p)
|
|
1844
|
+
);
|
|
1845
|
+
return m ?? {
|
|
1846
|
+
value: u,
|
|
1847
|
+
key: p,
|
|
1848
|
+
isExiting: B(!1)
|
|
1849
|
+
};
|
|
1850
|
+
}), a = f.filter(
|
|
1851
|
+
(u) => l.has(u.key) && !h.has(u.key)
|
|
1852
|
+
);
|
|
1853
|
+
o.set([...d, ...a]);
|
|
1854
|
+
},
|
|
1855
|
+
{ skipInitial: !1 }
|
|
1856
|
+
), ct(
|
|
1857
|
+
o,
|
|
1858
|
+
(c) => c.key,
|
|
1859
|
+
(c, h) => {
|
|
1860
|
+
const f = c.map((a) => a.value), d = c.get().isExiting;
|
|
1861
|
+
return t(f, h, d);
|
|
1862
|
+
}
|
|
1863
|
+
);
|
|
1864
|
+
});
|
|
1865
|
+
}
|
|
1693
1866
|
export {
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1867
|
+
yt as Aria,
|
|
1868
|
+
ln as Async,
|
|
1869
|
+
mt as Attr,
|
|
1870
|
+
Cn as BindChecked,
|
|
1871
|
+
wn as BindDate,
|
|
1872
|
+
En as BindDateTime,
|
|
1873
|
+
kn as BindNumber,
|
|
1874
|
+
An as BindText,
|
|
1875
|
+
S as BrowserContext,
|
|
1876
|
+
C as CLASS_PLACEHOLDER_ATTR,
|
|
1877
|
+
Gn as Computed,
|
|
1878
|
+
cn as Conjunction,
|
|
1879
|
+
On as DOMNode,
|
|
1880
|
+
gt as DataAttr,
|
|
1881
|
+
Qn as DisposalScope,
|
|
1882
|
+
Se as El,
|
|
1883
|
+
X as ElNS,
|
|
1884
|
+
Jn as ElementPosition,
|
|
1885
|
+
lt as Empty,
|
|
1886
|
+
nn as Ensure,
|
|
1887
|
+
sn as EnsureAll,
|
|
1888
|
+
Kt as ForEach,
|
|
1889
|
+
v as Fragment,
|
|
1890
|
+
_n as GlobalProbe,
|
|
1891
|
+
Xe as HYDRATION_ID_ATTR,
|
|
1892
|
+
$t as HeadlessAdapter,
|
|
1893
|
+
k as HeadlessContext,
|
|
1894
|
+
qe as HeadlessElement,
|
|
1895
|
+
ye as HeadlessPortal,
|
|
1896
|
+
Ue as HeadlessText,
|
|
1897
|
+
Nn as IFrame,
|
|
1898
|
+
Wn as Inertia,
|
|
1899
|
+
ct as KeyedForEach,
|
|
1900
|
+
Zn as KeyedPosition,
|
|
1901
|
+
en as MapSignal,
|
|
1902
|
+
tn as MapText,
|
|
1903
|
+
bt as MathAttr,
|
|
1904
|
+
Hn as MathEl,
|
|
1905
|
+
zn as MemoryStore,
|
|
1906
|
+
rn as NotEmpty,
|
|
1907
|
+
vt as OnChecked,
|
|
1908
|
+
Y as OnDispose,
|
|
1909
|
+
Ut as OneOf,
|
|
1910
|
+
Gt as OneOfField,
|
|
1911
|
+
Qt as OneOfKind,
|
|
1912
|
+
zt as OneOfTuple,
|
|
1913
|
+
Jt as OneOfType,
|
|
1914
|
+
Zt as OneOfValue,
|
|
1915
|
+
Fn as PinchZoom,
|
|
1916
|
+
Rn as Portal,
|
|
1917
|
+
es as Prop,
|
|
1918
|
+
un as Provide,
|
|
1919
|
+
yr as ProviderNotFoundError,
|
|
1920
|
+
jt as RafLoop,
|
|
1921
|
+
Vt as ReducedMotion,
|
|
1922
|
+
_e as RenderingError,
|
|
1923
|
+
qt as Repeat,
|
|
1924
|
+
Tt as SVGAttr,
|
|
1925
|
+
Ln as SVGEl,
|
|
1926
|
+
$n as ShadowRoot,
|
|
1927
|
+
ts as Signal,
|
|
1928
|
+
on as Task,
|
|
1929
|
+
Vn as TextNode,
|
|
1930
|
+
Kn as TransitionKeyedForEach,
|
|
1931
|
+
Wt as Unless,
|
|
1932
|
+
dn as Use,
|
|
1933
|
+
hn as UseMany,
|
|
1934
|
+
ns as Value,
|
|
1935
|
+
Ft as When,
|
|
1936
|
+
N as WithBrowserCtx,
|
|
1937
|
+
jn as WithCtx,
|
|
1938
|
+
Yn as WithElement,
|
|
1939
|
+
Xn as WithHeadlessCtx,
|
|
1940
|
+
an as WithProvider,
|
|
1941
|
+
at as WithScope,
|
|
1942
|
+
W as _NODE_PLACEHOLDER_ATTR,
|
|
1943
|
+
Re as _getSelfOrParentElement,
|
|
1944
|
+
he as _isElement,
|
|
1945
|
+
fe as _isFragment,
|
|
1946
|
+
Ne as _makeGetter,
|
|
1947
|
+
De as _makeSetter,
|
|
1948
|
+
V as _removeDOMNode,
|
|
1949
|
+
Ht as _signalText,
|
|
1950
|
+
It as _staticText,
|
|
1951
|
+
ss as animateSignal,
|
|
1952
|
+
rs as animateSignals,
|
|
1953
|
+
gn as aria,
|
|
1954
|
+
T as attr,
|
|
1955
|
+
is as bind,
|
|
1956
|
+
os as chainEasing,
|
|
1957
|
+
ls as coalesce,
|
|
1958
|
+
cs as computed,
|
|
1959
|
+
as as computedOf,
|
|
1960
|
+
us as computedOfAsync,
|
|
1961
|
+
ds as computedOfAsyncGenerator,
|
|
1962
|
+
hs as computedRecord,
|
|
1963
|
+
ze as createInertiaHandler,
|
|
1964
|
+
Ze as createPinchZoomHandler,
|
|
1965
|
+
q as createRafLoop,
|
|
1966
|
+
Je as createReducedMotionSignal,
|
|
1967
|
+
Tr as createRenderKit,
|
|
1968
|
+
fs as createRenderable,
|
|
1969
|
+
ps as createSelector,
|
|
1970
|
+
Xt as createTween,
|
|
1971
|
+
mn as dataAttr,
|
|
1972
|
+
ms as delaySignal,
|
|
1973
|
+
Mn as delegate,
|
|
1974
|
+
gs as easeInBack,
|
|
1975
|
+
ys as easeInBounce,
|
|
1976
|
+
Ts as easeInCubic,
|
|
1977
|
+
bs as easeInElastic,
|
|
1978
|
+
Ss as easeInExpo,
|
|
1979
|
+
vs as easeInOutBack,
|
|
1980
|
+
xs as easeInOutBounce,
|
|
1981
|
+
ws as easeInOutCubic,
|
|
1982
|
+
Es as easeInOutElastic,
|
|
1983
|
+
ks as easeInOutExpo,
|
|
1984
|
+
As as easeInOutQuad,
|
|
1985
|
+
Cs as easeInOutQuart,
|
|
1986
|
+
Ms as easeInOutSine,
|
|
1987
|
+
Os as easeInQuad,
|
|
1988
|
+
Ps as easeInQuart,
|
|
1989
|
+
Ls as easeInSine,
|
|
1990
|
+
Is as easeOutBack,
|
|
1991
|
+
Hs as easeOutBounce,
|
|
1992
|
+
Ds as easeOutCubic,
|
|
1993
|
+
Ns as easeOutElastic,
|
|
1994
|
+
Rs as easeOutExpo,
|
|
1995
|
+
_s as easeOutQuad,
|
|
1996
|
+
$s as easeOutQuart,
|
|
1997
|
+
Bs as easeOutSine,
|
|
1998
|
+
Vs as effect,
|
|
1999
|
+
js as effectOf,
|
|
2000
|
+
xt as emit,
|
|
2001
|
+
xn as emitChecked,
|
|
1794
2002
|
x as emitTarget,
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
2003
|
+
wt as emitValue,
|
|
2004
|
+
kt as emitValueAsDate,
|
|
2005
|
+
At as emitValueAsDateTime,
|
|
2006
|
+
Sn as emitValueAsNullableDate,
|
|
2007
|
+
vn as emitValueAsNullableDateTime,
|
|
2008
|
+
Et as emitValueAsNumber,
|
|
2009
|
+
Ys as endInterpolate,
|
|
2010
|
+
Xs as getCurrentScope,
|
|
2011
|
+
Fs as getParentScope,
|
|
2012
|
+
Ws as getScopeStack,
|
|
2013
|
+
Qe as getWindow,
|
|
2014
|
+
Ks as guessInterpolate,
|
|
2015
|
+
Mt as html,
|
|
2016
|
+
Pn as input,
|
|
2017
|
+
qs as interpolateDate,
|
|
2018
|
+
Us as interpolateNumber,
|
|
2019
|
+
Gs as interpolateString,
|
|
2020
|
+
Yt as isInputFocused,
|
|
2021
|
+
Qs as joinSignals,
|
|
2022
|
+
Js as linear,
|
|
2023
|
+
Zs as localStorageProp,
|
|
2024
|
+
Ot as makeProbe,
|
|
2025
|
+
zs as makeProviderMark,
|
|
2026
|
+
Dn as math,
|
|
2027
|
+
Tn as mathAttr,
|
|
2028
|
+
er as merge,
|
|
2029
|
+
tr as mirrorEasing,
|
|
1819
2030
|
D as on,
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
2031
|
+
nr as popScope,
|
|
2032
|
+
sr as previousSignal,
|
|
2033
|
+
rr as prop,
|
|
2034
|
+
ir as pushScope,
|
|
2035
|
+
Rt as render,
|
|
2036
|
+
I as renderWithContext,
|
|
2037
|
+
A as renderableOfTNode,
|
|
2038
|
+
Bt as restoreTempoPlaceholders,
|
|
2039
|
+
or as reverseEasing,
|
|
2040
|
+
_t as runHeadless,
|
|
2041
|
+
lr as scoped,
|
|
2042
|
+
bn as selectedClass,
|
|
2043
|
+
cr as sessionStorageProp,
|
|
2044
|
+
ar as signal,
|
|
2045
|
+
ur as slidingWindowSignal,
|
|
2046
|
+
dr as storedProp,
|
|
2047
|
+
hr as strictEquals,
|
|
2048
|
+
Bn as style,
|
|
2049
|
+
In as svg,
|
|
2050
|
+
yn as svgAttr,
|
|
2051
|
+
fr as syncProp,
|
|
2052
|
+
pr as untracked,
|
|
2053
|
+
mr as withScope
|
|
1842
2054
|
};
|