@jasonshimmy/custom-elements-runtime 3.0.0 → 3.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/README.md +118 -81
- package/dist/custom-elements-runtime.cjs.js +3 -3
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +77 -72
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.jit-css.cjs.js +1 -1
- package/dist/custom-elements-runtime.jit-css.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.jit-css.es.js +25 -26
- package/dist/custom-elements-runtime.jit-css.es.js.map +1 -1
- package/dist/custom-elements-runtime.router.cjs.js +8 -8
- package/dist/custom-elements-runtime.router.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.router.es.js +134 -134
- package/dist/custom-elements-runtime.router.es.js.map +1 -1
- package/dist/custom-elements-runtime.ssr-middleware.cjs.js +2 -0
- package/dist/custom-elements-runtime.ssr-middleware.cjs.js.map +1 -0
- package/dist/custom-elements-runtime.ssr-middleware.es.js +63 -0
- package/dist/custom-elements-runtime.ssr-middleware.es.js.map +1 -0
- package/dist/custom-elements-runtime.ssr.cjs.js +3 -1
- package/dist/custom-elements-runtime.ssr.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.ssr.es.js +137 -39
- package/dist/custom-elements-runtime.ssr.es.js.map +1 -1
- package/dist/custom-elements-runtime.vite-plugin.cjs.js +1 -1
- package/dist/custom-elements-runtime.vite-plugin.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.vite-plugin.es.js +81 -49
- package/dist/custom-elements-runtime.vite-plugin.es.js.map +1 -1
- package/dist/hooks-B50HhrHh.cjs +6 -0
- package/dist/hooks-B50HhrHh.cjs.map +1 -0
- package/dist/hooks-Cze3o-F7.js +1462 -0
- package/dist/hooks-Cze3o-F7.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/namespace-helpers-D4wC2-qA.js +61 -0
- package/dist/namespace-helpers-D4wC2-qA.js.map +1 -0
- package/dist/namespace-helpers-ckeEOxpR.cjs +2 -0
- package/dist/namespace-helpers-ckeEOxpR.cjs.map +1 -0
- package/dist/router/matcher.d.ts +14 -0
- package/dist/runtime/component/factory.d.ts +16 -2
- package/dist/runtime/hydration.d.ts +33 -0
- package/dist/runtime/ssr-context.d.ts +45 -0
- package/dist/runtime/types.d.ts +18 -0
- package/dist/runtime/vdom-ssr-dsd.d.ts +58 -0
- package/dist/ssr-middleware.d.ts +125 -0
- package/dist/ssr.d.ts +95 -33
- package/dist/template-compiler-Cshhqxyd.cjs +23 -0
- package/dist/template-compiler-Cshhqxyd.cjs.map +1 -0
- package/dist/{template-compiler-B5uN1EQw.js → template-compiler-DtpNsqE-.js} +1296 -1283
- package/dist/template-compiler-DtpNsqE-.js.map +1 -0
- package/dist/vite-plugin.d.ts +94 -4
- package/package.json +6 -1
- package/dist/helpers-CweFZFWU.js +0 -987
- package/dist/helpers-CweFZFWU.js.map +0 -1
- package/dist/helpers-DeWjSmOl.cjs +0 -5
- package/dist/helpers-DeWjSmOl.cjs.map +0 -1
- package/dist/hooks-BrrLKSub.cjs +0 -3
- package/dist/hooks-BrrLKSub.cjs.map +0 -1
- package/dist/hooks-DyShDHKo.js +0 -403
- package/dist/hooks-DyShDHKo.js.map +0 -1
- package/dist/namespace-helpers-CnpZ5__p.js +0 -45
- package/dist/namespace-helpers-CnpZ5__p.js.map +0 -1
- package/dist/namespace-helpers-CyIDtI97.cjs +0 -2
- package/dist/namespace-helpers-CyIDtI97.cjs.map +0 -1
- package/dist/template-compiler-B5uN1EQw.js.map +0 -1
- package/dist/template-compiler-Cx623BSB.cjs +0 -23
- package/dist/template-compiler-Cx623BSB.cjs.map +0 -1
|
@@ -1,121 +1,107 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { i as Tt, p as wt, g as Lt, a as $e, m as _e, b as nt, s as Nt } from "./css-utils-Cg4o1MqY.js";
|
|
1
|
+
import { C as z, D as X, l as O, E as Re, F as x, G as F, H as Ge, I as ft, c as Ue, J as Ce, K as Ye, L as Et, M as St, N as Xe, O as Qe, f as Ct, P as kt } from "./hooks-Cze3o-F7.js";
|
|
2
|
+
import { resetWhenCounter as et } from "./custom-elements-runtime.directives.es.js";
|
|
3
|
+
import { d as W, a as te } from "./logger-BvkEbVM4.js";
|
|
4
|
+
import { s as K, r as Z, T as _t, S as At, a as we, i as Tt } from "./namespace-helpers-D4wC2-qA.js";
|
|
5
|
+
import { i as wt, p as Lt, g as Nt, a as $e, m as ke, b as tt, s as Mt } from "./css-utils-Cg4o1MqY.js";
|
|
7
6
|
import { getTransitionStyleSheet as he } from "./custom-elements-runtime.transitions.es.js";
|
|
8
|
-
|
|
9
|
-
function Mt() {
|
|
10
|
-
if (!(typeof window > "u" && typeof document > "u" && typeof navigator > "u"))
|
|
11
|
-
try {
|
|
12
|
-
const n = globalThis;
|
|
13
|
-
if (!n[We]) {
|
|
14
|
-
const t = crypto.randomUUID();
|
|
15
|
-
n[We] = new Map([...me.entries()]), n[We].__realmId = t;
|
|
16
|
-
}
|
|
17
|
-
} catch (n) {
|
|
18
|
-
ee("Could not initialize global registry:", n);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function jt(e, n, t) {
|
|
7
|
+
function jt(e, s, t) {
|
|
22
8
|
if (t)
|
|
23
|
-
for (const [r,
|
|
24
|
-
let
|
|
25
|
-
if (Array.isArray(
|
|
26
|
-
callback:
|
|
27
|
-
options:
|
|
28
|
-
oldValue:
|
|
29
|
-
}),
|
|
9
|
+
for (const [r, n] of Object.entries(t)) {
|
|
10
|
+
let c, o = {};
|
|
11
|
+
if (Array.isArray(n) ? (c = n[0], o = n[1] || {}) : c = n, s.set(r, {
|
|
12
|
+
callback: c,
|
|
13
|
+
options: o,
|
|
14
|
+
oldValue: z(e, r)
|
|
15
|
+
}), o.immediate)
|
|
30
16
|
try {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
} catch (
|
|
34
|
-
W(`Error in immediate watcher for "${r}":`,
|
|
17
|
+
const i = z(e, r);
|
|
18
|
+
c(i, void 0, e);
|
|
19
|
+
} catch (i) {
|
|
20
|
+
W(`Error in immediate watcher for "${r}":`, i);
|
|
35
21
|
}
|
|
36
22
|
}
|
|
37
23
|
}
|
|
38
|
-
function $t(e,
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
if (typeof
|
|
42
|
-
if (Array.isArray(
|
|
43
|
-
return
|
|
44
|
-
const f =
|
|
45
|
-
return
|
|
46
|
-
},
|
|
47
|
-
if (
|
|
24
|
+
function $t(e, s, t, r) {
|
|
25
|
+
const n = (o, i) => {
|
|
26
|
+
if (o === i) return !0;
|
|
27
|
+
if (typeof o != typeof i || typeof o != "object" || o === null || i === null) return !1;
|
|
28
|
+
if (Array.isArray(o) && Array.isArray(i))
|
|
29
|
+
return o.length !== i.length ? !1 : o.every((d, C) => n(d, i[C]));
|
|
30
|
+
const f = o, b = i, y = Object.keys(f || {}), m = Object.keys(b || {});
|
|
31
|
+
return y.length !== m.length ? !1 : y.every((d) => n(f[d], b[d]));
|
|
32
|
+
}, c = s.get(t);
|
|
33
|
+
if (c && !n(r, c.oldValue))
|
|
48
34
|
try {
|
|
49
|
-
|
|
50
|
-
} catch (
|
|
51
|
-
W(`Error in watcher for "${t}":`,
|
|
35
|
+
c.callback(r, c.oldValue, e), c.oldValue = r;
|
|
36
|
+
} catch (o) {
|
|
37
|
+
W(`Error in watcher for "${t}":`, o);
|
|
52
38
|
}
|
|
53
|
-
for (const [
|
|
54
|
-
if (
|
|
39
|
+
for (const [o, i] of s.entries())
|
|
40
|
+
if (i.options.deep && t.startsWith(o + "."))
|
|
55
41
|
try {
|
|
56
|
-
const f =
|
|
57
|
-
|
|
42
|
+
const f = z(e, o);
|
|
43
|
+
n(f, i.oldValue) || (i.callback(f, i.oldValue, e), i.oldValue = f);
|
|
58
44
|
} catch (f) {
|
|
59
|
-
W(`Error in deep watcher for "${
|
|
45
|
+
W(`Error in deep watcher for "${o}":`, f);
|
|
60
46
|
}
|
|
61
47
|
}
|
|
62
|
-
function
|
|
63
|
-
return
|
|
48
|
+
function We(e, s) {
|
|
49
|
+
return s === Boolean ? e === "" || e === "true" : s === Number ? Number(e) : e;
|
|
64
50
|
}
|
|
65
|
-
function Pt(e,
|
|
66
|
-
if (
|
|
67
|
-
for (const r in
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
51
|
+
function Pt(e, s, t) {
|
|
52
|
+
if (s)
|
|
53
|
+
for (const r in s) {
|
|
54
|
+
const n = s[r], c = X(r), o = e.getAttribute(c);
|
|
55
|
+
if (n.type === Function && typeof e[r] == "function")
|
|
70
56
|
t[r] = e[r];
|
|
71
|
-
else if (
|
|
72
|
-
t[r] =
|
|
57
|
+
else if (o !== null)
|
|
58
|
+
t[r] = We(o, n.type);
|
|
73
59
|
else if (typeof e[r] < "u")
|
|
74
60
|
try {
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
61
|
+
const i = e[r];
|
|
62
|
+
if (n.type === String && i && typeof i == "object")
|
|
77
63
|
try {
|
|
78
|
-
t[r] =
|
|
64
|
+
t[r] = We(String(i), n.type);
|
|
79
65
|
} catch {
|
|
80
|
-
t[r] =
|
|
66
|
+
t[r] = i;
|
|
81
67
|
}
|
|
82
|
-
else
|
|
68
|
+
else n.type === Boolean && typeof i == "boolean" || n.type === Number && typeof i == "number" || n.type === Function && typeof i == "function" ? t[r] = i : t[r] = We(String(i), n.type);
|
|
83
69
|
} catch {
|
|
84
70
|
t[r] = e[r];
|
|
85
71
|
}
|
|
86
|
-
else "default" in
|
|
72
|
+
else "default" in n && n.default !== void 0 && (t[r] = n.default);
|
|
87
73
|
}
|
|
88
74
|
}
|
|
89
|
-
function Ot(e,
|
|
90
|
-
if (!
|
|
75
|
+
function Ot(e, s, t) {
|
|
76
|
+
if (!s.props) {
|
|
91
77
|
try {
|
|
92
|
-
const r = t?._hookCallbacks?.props || {},
|
|
78
|
+
const r = t?._hookCallbacks?.props || {}, n = Array.from(
|
|
93
79
|
/* @__PURE__ */ new Set([
|
|
94
80
|
...Object.keys(e || {}),
|
|
95
81
|
...Object.keys(r || {})
|
|
96
82
|
])
|
|
97
83
|
);
|
|
98
|
-
for (const
|
|
99
|
-
if (typeof
|
|
100
|
-
const
|
|
84
|
+
for (const c of n) {
|
|
85
|
+
if (typeof c != "string" || c.startsWith("_")) continue;
|
|
86
|
+
const o = Object.getOwnPropertyDescriptor(t, c);
|
|
101
87
|
if (!(!Object.prototype.hasOwnProperty.call(
|
|
102
88
|
r,
|
|
103
|
-
|
|
104
|
-
) &&
|
|
89
|
+
c
|
|
90
|
+
) && o && (o.get || o.set || !o.configurable)))
|
|
105
91
|
try {
|
|
106
|
-
Object.defineProperty(t,
|
|
92
|
+
Object.defineProperty(t, c, {
|
|
107
93
|
enumerable: !0,
|
|
108
94
|
configurable: !0,
|
|
109
95
|
get() {
|
|
110
96
|
try {
|
|
111
|
-
const f = X(
|
|
112
|
-
if (
|
|
113
|
-
return
|
|
114
|
-
const
|
|
115
|
-
let
|
|
116
|
-
return O(
|
|
97
|
+
const f = X(c), b = e.getAttribute(f);
|
|
98
|
+
if (b !== null)
|
|
99
|
+
return b;
|
|
100
|
+
const y = e[c];
|
|
101
|
+
let m;
|
|
102
|
+
return O(y) || y && typeof y == "object" && "value" in y && !(y instanceof Node) ? m = y.value : m = y, m;
|
|
117
103
|
} catch {
|
|
118
|
-
return e[
|
|
104
|
+
return e[c];
|
|
119
105
|
}
|
|
120
106
|
}
|
|
121
107
|
});
|
|
@@ -126,45 +112,45 @@ function Ot(e, n, t) {
|
|
|
126
112
|
}
|
|
127
113
|
return;
|
|
128
114
|
}
|
|
129
|
-
Pt(e,
|
|
115
|
+
Pt(e, s.props, t);
|
|
130
116
|
}
|
|
131
|
-
function
|
|
132
|
-
e.onConnected && !t && (e.onConnected(
|
|
117
|
+
function nt(e, s, t, r) {
|
|
118
|
+
e.onConnected && !t && (e.onConnected(s), r(!0));
|
|
133
119
|
}
|
|
134
|
-
function
|
|
135
|
-
e.onDisconnected && e.onDisconnected(
|
|
120
|
+
function xt(e, s, t, r, n, c, o, i) {
|
|
121
|
+
e.onDisconnected && e.onDisconnected(s), t.forEach((f) => f()), r(), n(), c(!1), o(null), i(!1);
|
|
136
122
|
}
|
|
137
|
-
function
|
|
138
|
-
e.onAttributeChanged && e.onAttributeChanged(
|
|
123
|
+
function Ht(e, s, t, r, n) {
|
|
124
|
+
e.onAttributeChanged && e.onAttributeChanged(s, t, r, n);
|
|
139
125
|
}
|
|
140
126
|
class Y {
|
|
141
127
|
static cleanupFunctions = /* @__PURE__ */ new WeakMap();
|
|
142
128
|
/**
|
|
143
129
|
* Add an event listener with automatic cleanup tracking
|
|
144
130
|
*/
|
|
145
|
-
static addListener(
|
|
146
|
-
|
|
147
|
-
const
|
|
131
|
+
static addListener(s, t, r, n) {
|
|
132
|
+
s.addEventListener(t, r, n);
|
|
133
|
+
const o = {
|
|
148
134
|
event: t,
|
|
149
135
|
handler: r,
|
|
150
136
|
wrapper: r,
|
|
151
|
-
options:
|
|
152
|
-
cleanup: () =>
|
|
137
|
+
options: n,
|
|
138
|
+
cleanup: () => s.removeEventListener(t, r, n),
|
|
153
139
|
addedAt: Date.now()
|
|
154
140
|
};
|
|
155
|
-
this.cleanupFunctions.has(
|
|
141
|
+
this.cleanupFunctions.has(s) || this.cleanupFunctions.set(s, []), this.cleanupFunctions.get(s).push(o);
|
|
156
142
|
}
|
|
157
143
|
/**
|
|
158
144
|
* Remove a specific event listener
|
|
159
145
|
*/
|
|
160
|
-
static removeListener(
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
164
|
-
for (let
|
|
165
|
-
const
|
|
166
|
-
if (
|
|
167
|
-
|
|
146
|
+
static removeListener(s, t, r, n) {
|
|
147
|
+
s.removeEventListener(t, r, n);
|
|
148
|
+
const c = this.cleanupFunctions.get(s);
|
|
149
|
+
if (c)
|
|
150
|
+
for (let o = 0; o < c.length; o++) {
|
|
151
|
+
const i = c[o];
|
|
152
|
+
if (i.event === t && i.handler === r) {
|
|
153
|
+
c.splice(o, 1), c.length === 0 && this.cleanupFunctions.delete(s);
|
|
168
154
|
return;
|
|
169
155
|
}
|
|
170
156
|
}
|
|
@@ -172,14 +158,14 @@ class Y {
|
|
|
172
158
|
/**
|
|
173
159
|
* Clean up all event listeners for an element
|
|
174
160
|
*/
|
|
175
|
-
static cleanup(
|
|
176
|
-
const t = this.cleanupFunctions.get(
|
|
161
|
+
static cleanup(s) {
|
|
162
|
+
const t = this.cleanupFunctions.get(s);
|
|
177
163
|
t && (t.forEach((r) => {
|
|
178
164
|
try {
|
|
179
165
|
r.cleanup();
|
|
180
166
|
} catch {
|
|
181
167
|
}
|
|
182
|
-
}), this.cleanupFunctions.delete(
|
|
168
|
+
}), this.cleanupFunctions.delete(s));
|
|
183
169
|
}
|
|
184
170
|
/**
|
|
185
171
|
* Clean up all tracked event listeners (useful for testing)
|
|
@@ -190,22 +176,22 @@ class Y {
|
|
|
190
176
|
/**
|
|
191
177
|
* Check if an element has any tracked event listeners
|
|
192
178
|
*/
|
|
193
|
-
static hasListeners(
|
|
194
|
-
const t = this.cleanupFunctions.get(
|
|
179
|
+
static hasListeners(s) {
|
|
180
|
+
const t = this.cleanupFunctions.get(s);
|
|
195
181
|
return !!(t && t.length > 0);
|
|
196
182
|
}
|
|
197
183
|
/**
|
|
198
184
|
* Get the number of tracked event listeners for an element
|
|
199
185
|
*/
|
|
200
|
-
static getListenerCount(
|
|
201
|
-
const t = this.cleanupFunctions.get(
|
|
186
|
+
static getListenerCount(s) {
|
|
187
|
+
const t = this.cleanupFunctions.get(s);
|
|
202
188
|
return t ? t.length : 0;
|
|
203
189
|
}
|
|
204
190
|
/**
|
|
205
191
|
* Return listener metadata stored for the element (test/debug only)
|
|
206
192
|
*/
|
|
207
|
-
static getListenerInfo(
|
|
208
|
-
const t = this.cleanupFunctions.get(
|
|
193
|
+
static getListenerInfo(s) {
|
|
194
|
+
const t = this.cleanupFunctions.get(s);
|
|
209
195
|
return t ? t.map((r) => ({
|
|
210
196
|
event: r.event,
|
|
211
197
|
handler: r.handler,
|
|
@@ -217,22 +203,22 @@ class Y {
|
|
|
217
203
|
class ut {
|
|
218
204
|
map = /* @__PURE__ */ new Map();
|
|
219
205
|
maxSize;
|
|
220
|
-
constructor(
|
|
221
|
-
this.maxSize = Math.max(1,
|
|
206
|
+
constructor(s) {
|
|
207
|
+
this.maxSize = Math.max(1, s);
|
|
222
208
|
}
|
|
223
|
-
get(
|
|
224
|
-
const t = this.map.get(
|
|
209
|
+
get(s) {
|
|
210
|
+
const t = this.map.get(s);
|
|
225
211
|
if (t !== void 0)
|
|
226
|
-
return this.map.delete(
|
|
212
|
+
return this.map.delete(s), this.map.set(s, t), t;
|
|
227
213
|
}
|
|
228
|
-
set(
|
|
229
|
-
if (this.map.has(
|
|
214
|
+
set(s, t) {
|
|
215
|
+
if (this.map.has(s) && this.map.delete(s), this.map.set(s, t), this.map.size > this.maxSize) {
|
|
230
216
|
const r = this.map.keys().next().value;
|
|
231
217
|
this.map.delete(r);
|
|
232
218
|
}
|
|
233
219
|
}
|
|
234
|
-
has(
|
|
235
|
-
return this.map.has(
|
|
220
|
+
has(s) {
|
|
221
|
+
return this.map.has(s);
|
|
236
222
|
}
|
|
237
223
|
clear() {
|
|
238
224
|
this.map.clear();
|
|
@@ -241,11 +227,11 @@ class ut {
|
|
|
241
227
|
return this.map.size;
|
|
242
228
|
}
|
|
243
229
|
}
|
|
244
|
-
const
|
|
230
|
+
const It = () => {
|
|
245
231
|
if (typeof navigator < "u" && "deviceMemory" in navigator) {
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
248
|
-
return Math.min(1e3, Math.max(200,
|
|
232
|
+
const s = navigator.deviceMemory;
|
|
233
|
+
if (s)
|
|
234
|
+
return Math.min(1e3, Math.max(200, s * 100));
|
|
249
235
|
}
|
|
250
236
|
return (() => {
|
|
251
237
|
try {
|
|
@@ -254,9 +240,9 @@ const Rt = () => {
|
|
|
254
240
|
return !1;
|
|
255
241
|
}
|
|
256
242
|
})() ? 100 : 500;
|
|
257
|
-
},
|
|
258
|
-
|
|
259
|
-
),
|
|
243
|
+
}, De = new ut(
|
|
244
|
+
It()
|
|
245
|
+
), Rt = /* @__PURE__ */ new Set([
|
|
260
246
|
"true",
|
|
261
247
|
"false",
|
|
262
248
|
"null",
|
|
@@ -299,7 +285,7 @@ const Rt = () => {
|
|
|
299
285
|
"NaN",
|
|
300
286
|
"Infinity"
|
|
301
287
|
]);
|
|
302
|
-
class
|
|
288
|
+
class Bt {
|
|
303
289
|
// Reuse the LRUCache class (Map-insertion-order O(1) eviction) rather than
|
|
304
290
|
// maintaining a parallel ad-hoc implementation with Map delete+re-insert.
|
|
305
291
|
static cache = new ut(1e3);
|
|
@@ -321,144 +307,144 @@ class Wt {
|
|
|
321
307
|
/fetch/i,
|
|
322
308
|
/XMLHttpRequest/i
|
|
323
309
|
];
|
|
324
|
-
static evaluate(
|
|
325
|
-
const r = this.cache.get(
|
|
310
|
+
static evaluate(s, t) {
|
|
311
|
+
const r = this.cache.get(s);
|
|
326
312
|
if (r) {
|
|
327
313
|
if (!r.isSecure) {
|
|
328
|
-
|
|
314
|
+
te("Blocked cached dangerous expression:", s);
|
|
329
315
|
return;
|
|
330
316
|
}
|
|
331
317
|
return r.evaluator(t);
|
|
332
318
|
}
|
|
333
|
-
const
|
|
334
|
-
if (this.cache.set(
|
|
335
|
-
|
|
319
|
+
const n = this.createEvaluator(s);
|
|
320
|
+
if (this.cache.set(s, n), !n.isSecure) {
|
|
321
|
+
te("Blocked dangerous expression:", s);
|
|
336
322
|
return;
|
|
337
323
|
}
|
|
338
|
-
return
|
|
324
|
+
return n.evaluator(t);
|
|
339
325
|
}
|
|
340
|
-
static createEvaluator(
|
|
341
|
-
if (this.hasDangerousPatterns(
|
|
326
|
+
static createEvaluator(s) {
|
|
327
|
+
if (this.hasDangerousPatterns(s))
|
|
342
328
|
return { evaluator: () => {
|
|
343
329
|
}, isSecure: !1 };
|
|
344
|
-
if (
|
|
330
|
+
if (s.length > 1e3)
|
|
345
331
|
return { evaluator: () => {
|
|
346
332
|
}, isSecure: !1 };
|
|
347
333
|
try {
|
|
348
|
-
return { evaluator: this.createSafeEvaluator(
|
|
334
|
+
return { evaluator: this.createSafeEvaluator(s), isSecure: !0 };
|
|
349
335
|
} catch (t) {
|
|
350
|
-
return
|
|
336
|
+
return te("Failed to create evaluator for expression:", s, t), { evaluator: () => {
|
|
351
337
|
}, isSecure: !1 };
|
|
352
338
|
}
|
|
353
339
|
}
|
|
354
|
-
static hasDangerousPatterns(
|
|
355
|
-
return this.dangerousPatterns.some((t) => t.test(
|
|
340
|
+
static hasDangerousPatterns(s) {
|
|
341
|
+
return this.dangerousPatterns.some((t) => t.test(s));
|
|
356
342
|
}
|
|
357
|
-
static createSafeEvaluator(
|
|
358
|
-
const t =
|
|
343
|
+
static createSafeEvaluator(s) {
|
|
344
|
+
const t = s.trim();
|
|
359
345
|
if (t.startsWith("{") && t.endsWith("}"))
|
|
360
|
-
return this.createObjectEvaluator(
|
|
361
|
-
if (/^ctx\.[a-zA-Z0-9_.]+$/.test(
|
|
362
|
-
const r =
|
|
363
|
-
return (
|
|
364
|
-
}
|
|
365
|
-
return
|
|
366
|
-
}
|
|
367
|
-
static createObjectEvaluator(
|
|
368
|
-
const t =
|
|
369
|
-
return (
|
|
370
|
-
const
|
|
371
|
-
for (const { key:
|
|
346
|
+
return this.createObjectEvaluator(s);
|
|
347
|
+
if (/^ctx\.[a-zA-Z0-9_.]+$/.test(s.trim())) {
|
|
348
|
+
const r = s.trim().slice(4);
|
|
349
|
+
return (n) => z(n, r);
|
|
350
|
+
}
|
|
351
|
+
return s.includes("ctx") || /[+\-*/%<>=&|?:[\]]/.test(s) ? this.createSimpleEvaluator(s) : (r) => z(r, s);
|
|
352
|
+
}
|
|
353
|
+
static createObjectEvaluator(s) {
|
|
354
|
+
const t = s.trim().slice(1, -1), r = this.parseObjectProperties(t);
|
|
355
|
+
return (n) => {
|
|
356
|
+
const c = {};
|
|
357
|
+
for (const { key: o, value: i } of r)
|
|
372
358
|
try {
|
|
373
|
-
if (
|
|
374
|
-
const f =
|
|
375
|
-
o
|
|
359
|
+
if (i.startsWith("ctx.")) {
|
|
360
|
+
const f = i.slice(4);
|
|
361
|
+
c[o] = z(n, f);
|
|
376
362
|
} else
|
|
377
|
-
o
|
|
363
|
+
c[o] = this.evaluateSimpleValue(i, n);
|
|
378
364
|
} catch {
|
|
379
|
-
o
|
|
365
|
+
c[o] = void 0;
|
|
380
366
|
}
|
|
381
|
-
return
|
|
367
|
+
return c;
|
|
382
368
|
};
|
|
383
369
|
}
|
|
384
|
-
static parseObjectProperties(
|
|
370
|
+
static parseObjectProperties(s) {
|
|
385
371
|
const t = [], r = [];
|
|
386
|
-
let
|
|
387
|
-
for (let
|
|
388
|
-
const f =
|
|
389
|
-
if (
|
|
372
|
+
let n = 0, c = null, o = 0;
|
|
373
|
+
for (let i = 0; i < s.length; i++) {
|
|
374
|
+
const f = s[i];
|
|
375
|
+
if (c) {
|
|
390
376
|
if (f === "\\") {
|
|
391
|
-
|
|
377
|
+
i++;
|
|
392
378
|
continue;
|
|
393
379
|
}
|
|
394
|
-
f ===
|
|
395
|
-
} else f === '"' || f === "'" ?
|
|
396
|
-
}
|
|
397
|
-
r.push(
|
|
398
|
-
for (const
|
|
399
|
-
let f = -1,
|
|
400
|
-
for (let j = 0; j <
|
|
401
|
-
const S =
|
|
402
|
-
if (
|
|
380
|
+
f === c && (c = null);
|
|
381
|
+
} else f === '"' || f === "'" ? c = f : f === "(" || f === "[" || f === "{" ? n++ : f === ")" || f === "]" || f === "}" ? n-- : f === "," && n === 0 && (r.push(s.slice(o, i)), o = i + 1);
|
|
382
|
+
}
|
|
383
|
+
r.push(s.slice(o));
|
|
384
|
+
for (const i of r) {
|
|
385
|
+
let f = -1, b = 0, y = null;
|
|
386
|
+
for (let j = 0; j < i.length; j++) {
|
|
387
|
+
const S = i[j];
|
|
388
|
+
if (y) {
|
|
403
389
|
if (S === "\\") {
|
|
404
390
|
j++;
|
|
405
391
|
continue;
|
|
406
392
|
}
|
|
407
|
-
S ===
|
|
393
|
+
S === y && (y = null);
|
|
408
394
|
} else if (S === '"' || S === "'")
|
|
409
|
-
|
|
395
|
+
y = S;
|
|
410
396
|
else if (S === "(" || S === "[" || S === "{")
|
|
411
|
-
|
|
397
|
+
b++;
|
|
412
398
|
else if (S === ")" || S === "]" || S === "}")
|
|
413
|
-
|
|
414
|
-
else if (S === ":" &&
|
|
399
|
+
b--;
|
|
400
|
+
else if (S === ":" && b === 0) {
|
|
415
401
|
f = j;
|
|
416
402
|
break;
|
|
417
403
|
}
|
|
418
404
|
}
|
|
419
405
|
if (f === -1) continue;
|
|
420
|
-
const
|
|
421
|
-
t.push({ key: C, value:
|
|
406
|
+
const m = i.slice(0, f).trim(), d = i.slice(f + 1).trim(), C = m.replace(/^['"]|['"]$/g, "");
|
|
407
|
+
t.push({ key: C, value: d });
|
|
422
408
|
}
|
|
423
409
|
return t;
|
|
424
410
|
}
|
|
425
|
-
static createSimpleEvaluator(
|
|
411
|
+
static createSimpleEvaluator(s) {
|
|
426
412
|
return (t) => {
|
|
427
413
|
try {
|
|
428
|
-
let r =
|
|
429
|
-
const
|
|
414
|
+
let r = s;
|
|
415
|
+
const n = [];
|
|
430
416
|
r = r.replace(
|
|
431
417
|
/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g,
|
|
432
|
-
(
|
|
418
|
+
(m) => `<<#${n.push(m) - 1}#>>`
|
|
433
419
|
);
|
|
434
|
-
const
|
|
435
|
-
for (const
|
|
436
|
-
const
|
|
420
|
+
const c = r.match(/ctx\.[\w.]+/g) || [];
|
|
421
|
+
for (const m of c) {
|
|
422
|
+
const d = m.slice(4), C = z(t, d);
|
|
437
423
|
if (C === void 0) return;
|
|
438
|
-
const j =
|
|
439
|
-
r = r.split(
|
|
424
|
+
const j = n.push(JSON.stringify(C)) - 1;
|
|
425
|
+
r = r.split(m).join(`<<#${j}#>>`);
|
|
440
426
|
}
|
|
441
|
-
const
|
|
442
|
-
for (const
|
|
443
|
-
if (
|
|
444
|
-
const
|
|
445
|
-
if (
|
|
446
|
-
const C =
|
|
447
|
-
r = r.split(
|
|
427
|
+
const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, i = r.match(o) || [];
|
|
428
|
+
for (const m of i) {
|
|
429
|
+
if (m.startsWith("ctx.")) continue;
|
|
430
|
+
const d = z(t, m);
|
|
431
|
+
if (d === void 0) return;
|
|
432
|
+
const C = n.push(JSON.stringify(d)) - 1;
|
|
433
|
+
r = r.split(m).join(`<<#${C}#>>`);
|
|
448
434
|
}
|
|
449
435
|
const f = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
|
|
450
|
-
let
|
|
451
|
-
const
|
|
452
|
-
for (; (
|
|
453
|
-
const
|
|
454
|
-
if (
|
|
455
|
-
|
|
456
|
-
const
|
|
457
|
-
if (
|
|
458
|
-
const C = JSON.stringify(
|
|
459
|
-
|
|
436
|
+
let b;
|
|
437
|
+
const y = /* @__PURE__ */ new Set();
|
|
438
|
+
for (; (b = f.exec(r)) !== null; ) {
|
|
439
|
+
const m = b[1];
|
|
440
|
+
if (Rt.has(m) || /^[0-9]+$/.test(m) || m === "ctx" || y.has(m)) continue;
|
|
441
|
+
y.add(m);
|
|
442
|
+
const d = z(t, m);
|
|
443
|
+
if (d === void 0) return;
|
|
444
|
+
const C = JSON.stringify(d), j = n.push(C) - 1;
|
|
445
|
+
m.includes(".") ? r = r.split(m).join(`<<#${j}#>>`) : r = r.replace(
|
|
460
446
|
new RegExp(
|
|
461
|
-
"\\b" +
|
|
447
|
+
"\\b" + m.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b",
|
|
462
448
|
"g"
|
|
463
449
|
),
|
|
464
450
|
`<<#${j}#>>`
|
|
@@ -466,7 +452,7 @@ class Wt {
|
|
|
466
452
|
}
|
|
467
453
|
r = r.replace(
|
|
468
454
|
/<<#(\d+)#>>/g,
|
|
469
|
-
(
|
|
455
|
+
(m, d) => n[Number(d)]
|
|
470
456
|
);
|
|
471
457
|
try {
|
|
472
458
|
return this.evaluateBasicExpression(r);
|
|
@@ -483,13 +469,13 @@ class Wt {
|
|
|
483
469
|
* Supports: numbers, string literals, true/false, null, arrays, unary !,
|
|
484
470
|
* arithmetic (+ - * / %), comparisons, logical && and ||, parentheses, and ternary `a ? b : c`.
|
|
485
471
|
*/
|
|
486
|
-
static evaluateBasicExpression(
|
|
487
|
-
const t = this.tokenize(
|
|
472
|
+
static evaluateBasicExpression(s) {
|
|
473
|
+
const t = this.tokenize(s);
|
|
488
474
|
let r = 0;
|
|
489
|
-
function
|
|
475
|
+
function n() {
|
|
490
476
|
return t[r];
|
|
491
477
|
}
|
|
492
|
-
function
|
|
478
|
+
function c(u) {
|
|
493
479
|
const g = t[r++];
|
|
494
480
|
if (u && !g)
|
|
495
481
|
throw new Error(`Unexpected token EOF, expected ${u}`);
|
|
@@ -499,10 +485,10 @@ class Wt {
|
|
|
499
485
|
);
|
|
500
486
|
return g;
|
|
501
487
|
}
|
|
502
|
-
function
|
|
488
|
+
function o() {
|
|
503
489
|
return j();
|
|
504
490
|
}
|
|
505
|
-
function
|
|
491
|
+
function i(u) {
|
|
506
492
|
if (typeof u == "number") return u;
|
|
507
493
|
if (u == null) return NaN;
|
|
508
494
|
if (typeof u == "boolean") return u ? 1 : 0;
|
|
@@ -510,19 +496,19 @@ class Wt {
|
|
|
510
496
|
return Number.isNaN(g) ? NaN : g;
|
|
511
497
|
}
|
|
512
498
|
function f(u, g) {
|
|
513
|
-
return typeof u == "string" || typeof g == "string" ? String(u) + String(g) :
|
|
514
|
-
}
|
|
515
|
-
function m(u, g) {
|
|
516
|
-
return c(u) - c(g);
|
|
499
|
+
return typeof u == "string" || typeof g == "string" ? String(u) + String(g) : i(u) + i(g);
|
|
517
500
|
}
|
|
518
501
|
function b(u, g) {
|
|
519
|
-
return
|
|
520
|
-
}
|
|
521
|
-
function p(u, g) {
|
|
522
|
-
return c(u) / c(g);
|
|
502
|
+
return i(u) - i(g);
|
|
523
503
|
}
|
|
524
504
|
function y(u, g) {
|
|
525
|
-
return
|
|
505
|
+
return i(u) * i(g);
|
|
506
|
+
}
|
|
507
|
+
function m(u, g) {
|
|
508
|
+
return i(u) / i(g);
|
|
509
|
+
}
|
|
510
|
+
function d(u, g) {
|
|
511
|
+
return i(u) % i(g);
|
|
526
512
|
}
|
|
527
513
|
function C(u, g, l) {
|
|
528
514
|
if (typeof g == "number" && typeof l == "number")
|
|
@@ -553,12 +539,12 @@ class Wt {
|
|
|
553
539
|
}
|
|
554
540
|
}
|
|
555
541
|
function j() {
|
|
556
|
-
const u = S(), g =
|
|
542
|
+
const u = S(), g = n();
|
|
557
543
|
if (g && g.value === "?") {
|
|
558
|
-
|
|
559
|
-
const l =
|
|
560
|
-
|
|
561
|
-
const v =
|
|
544
|
+
c("?");
|
|
545
|
+
const l = o();
|
|
546
|
+
c(":");
|
|
547
|
+
const v = o();
|
|
562
548
|
return u ? l : v;
|
|
563
549
|
}
|
|
564
550
|
return u;
|
|
@@ -566,31 +552,31 @@ class Wt {
|
|
|
566
552
|
function S() {
|
|
567
553
|
let u = L();
|
|
568
554
|
for (; ; ) {
|
|
569
|
-
const g =
|
|
555
|
+
const g = n();
|
|
570
556
|
if (!g || g.value !== "||") break;
|
|
571
|
-
|
|
557
|
+
c("OP");
|
|
572
558
|
const l = L();
|
|
573
559
|
u = u || l;
|
|
574
560
|
}
|
|
575
561
|
return u;
|
|
576
562
|
}
|
|
577
563
|
function L() {
|
|
578
|
-
let u =
|
|
564
|
+
let u = p();
|
|
579
565
|
for (; ; ) {
|
|
580
|
-
const g =
|
|
566
|
+
const g = n();
|
|
581
567
|
if (!g || g.value !== "&&") break;
|
|
582
|
-
|
|
583
|
-
const l =
|
|
568
|
+
c("OP");
|
|
569
|
+
const l = p();
|
|
584
570
|
u = u && l;
|
|
585
571
|
}
|
|
586
572
|
return u;
|
|
587
573
|
}
|
|
588
|
-
function
|
|
574
|
+
function p() {
|
|
589
575
|
let u = T();
|
|
590
576
|
for (; ; ) {
|
|
591
|
-
const g =
|
|
577
|
+
const g = n();
|
|
592
578
|
if (!g || !["==", "!=", "===", "!=="].includes(g.value)) break;
|
|
593
|
-
const l =
|
|
579
|
+
const l = c("OP").value, v = T();
|
|
594
580
|
switch (l) {
|
|
595
581
|
case "==":
|
|
596
582
|
u = u == v;
|
|
@@ -611,9 +597,9 @@ class Wt {
|
|
|
611
597
|
function T() {
|
|
612
598
|
let u = a();
|
|
613
599
|
for (; ; ) {
|
|
614
|
-
const g =
|
|
600
|
+
const g = n();
|
|
615
601
|
if (!g || ![">", "<", ">=", "<="].includes(g.value)) break;
|
|
616
|
-
const l =
|
|
602
|
+
const l = c("OP").value, v = a();
|
|
617
603
|
switch (l) {
|
|
618
604
|
case ">":
|
|
619
605
|
u = C(">", u, v);
|
|
@@ -634,94 +620,94 @@ class Wt {
|
|
|
634
620
|
function a() {
|
|
635
621
|
let u = k();
|
|
636
622
|
for (; ; ) {
|
|
637
|
-
const g =
|
|
623
|
+
const g = n();
|
|
638
624
|
if (!g || g.value !== "+" && g.value !== "-") break;
|
|
639
|
-
const l =
|
|
640
|
-
u = l === "+" ? f(u, v) :
|
|
625
|
+
const l = c("OP").value, v = k();
|
|
626
|
+
u = l === "+" ? f(u, v) : b(u, v);
|
|
641
627
|
}
|
|
642
628
|
return u;
|
|
643
629
|
}
|
|
644
630
|
function k() {
|
|
645
631
|
let u = h();
|
|
646
632
|
for (; ; ) {
|
|
647
|
-
const g =
|
|
633
|
+
const g = n();
|
|
648
634
|
if (!g || g.value !== "*" && g.value !== "/" && g.value !== "%")
|
|
649
635
|
break;
|
|
650
|
-
const l =
|
|
636
|
+
const l = c("OP").value, v = h();
|
|
651
637
|
switch (l) {
|
|
652
638
|
case "*":
|
|
653
|
-
u =
|
|
639
|
+
u = y(u, v);
|
|
654
640
|
break;
|
|
655
641
|
case "/":
|
|
656
|
-
u =
|
|
642
|
+
u = m(u, v);
|
|
657
643
|
break;
|
|
658
644
|
case "%":
|
|
659
|
-
u =
|
|
645
|
+
u = d(u, v);
|
|
660
646
|
break;
|
|
661
647
|
}
|
|
662
648
|
}
|
|
663
649
|
return u;
|
|
664
650
|
}
|
|
665
651
|
function h() {
|
|
666
|
-
const u =
|
|
652
|
+
const u = n();
|
|
667
653
|
if (u && u.value === "!")
|
|
668
|
-
return
|
|
654
|
+
return c("OP"), !h();
|
|
669
655
|
if (u && u.value === "-") {
|
|
670
|
-
|
|
656
|
+
c("OP");
|
|
671
657
|
const g = h();
|
|
672
|
-
return
|
|
658
|
+
return b(0, g);
|
|
673
659
|
}
|
|
674
660
|
return w();
|
|
675
661
|
}
|
|
676
662
|
function w() {
|
|
677
|
-
const u =
|
|
663
|
+
const u = n();
|
|
678
664
|
if (u) {
|
|
679
665
|
if (u.type === "NUMBER")
|
|
680
|
-
return
|
|
666
|
+
return c("NUMBER"), Number(u.value);
|
|
681
667
|
if (u.type === "STRING")
|
|
682
|
-
return
|
|
668
|
+
return c("STRING"), u.value.slice(1, -1);
|
|
683
669
|
if (u.type === "IDENT")
|
|
684
|
-
return
|
|
670
|
+
return c("IDENT"), u.value === "true" ? !0 : u.value === "false" ? !1 : u.value === "null" ? null : void 0;
|
|
685
671
|
if (u.value === "[") {
|
|
686
|
-
|
|
672
|
+
c("PUNC");
|
|
687
673
|
const g = [];
|
|
688
674
|
for (; ; ) {
|
|
689
|
-
const l =
|
|
675
|
+
const l = n();
|
|
690
676
|
if (!l || l.value === "]") break;
|
|
691
|
-
g.push(
|
|
692
|
-
const v =
|
|
693
|
-
v && v.value === "," &&
|
|
677
|
+
g.push(o());
|
|
678
|
+
const v = n();
|
|
679
|
+
v && v.value === "," && c("PUNC");
|
|
694
680
|
}
|
|
695
|
-
return
|
|
681
|
+
return c("PUNC"), g;
|
|
696
682
|
}
|
|
697
683
|
if (u.value === "(") {
|
|
698
|
-
|
|
699
|
-
const g =
|
|
700
|
-
return
|
|
684
|
+
c("PUNC");
|
|
685
|
+
const g = o();
|
|
686
|
+
return c("PUNC"), g;
|
|
701
687
|
}
|
|
702
688
|
throw new Error("Unexpected token in expression");
|
|
703
689
|
}
|
|
704
690
|
}
|
|
705
|
-
return
|
|
691
|
+
return o();
|
|
706
692
|
}
|
|
707
|
-
static tokenize(
|
|
693
|
+
static tokenize(s) {
|
|
708
694
|
const t = [], r = /\s*(=>|===|!==|==|!=|>=|<=|\|\||&&|[()?:,[\]]|\+|-|\*|\/|%|>|<|!|\d+\.?\d*|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[a-zA-Z_][a-zA-Z0-9_]*|\S)\s*/g;
|
|
709
|
-
let
|
|
710
|
-
for (; (
|
|
711
|
-
const
|
|
712
|
-
|
|
695
|
+
let n;
|
|
696
|
+
for (; (n = r.exec(s)) !== null; ) {
|
|
697
|
+
const c = n[1];
|
|
698
|
+
c && (/^\d/.test(c) ? t.push({ type: "NUMBER", value: c }) : /^"/.test(c) || /^'/.test(c) ? t.push({ type: "STRING", value: c }) : /^[a-zA-Z_]/.test(c) ? t.push({ type: "IDENT", value: c }) : /^[()?:,[\]]$/.test(c) ? t.push({ type: "PUNC", value: c }) : t.push({ type: "OP", value: c }));
|
|
713
699
|
}
|
|
714
700
|
return t;
|
|
715
701
|
}
|
|
716
|
-
static evaluateSimpleValue(
|
|
717
|
-
if (
|
|
718
|
-
if (
|
|
719
|
-
if (!isNaN(Number(
|
|
720
|
-
if (
|
|
721
|
-
const r =
|
|
722
|
-
return
|
|
702
|
+
static evaluateSimpleValue(s, t) {
|
|
703
|
+
if (s === "true") return !0;
|
|
704
|
+
if (s === "false") return !1;
|
|
705
|
+
if (!isNaN(Number(s))) return Number(s);
|
|
706
|
+
if (s.startsWith("ctx.")) {
|
|
707
|
+
const r = s.slice(4);
|
|
708
|
+
return z(t, r);
|
|
723
709
|
}
|
|
724
|
-
return
|
|
710
|
+
return s.startsWith('"') && s.endsWith('"') || s.startsWith("'") && s.endsWith("'") ? s.slice(1, -1) : s;
|
|
725
711
|
}
|
|
726
712
|
static clearCache() {
|
|
727
713
|
this.cache.clear();
|
|
@@ -730,83 +716,83 @@ class Wt {
|
|
|
730
716
|
return this.cache.size;
|
|
731
717
|
}
|
|
732
718
|
}
|
|
733
|
-
function Pe(e,
|
|
734
|
-
return Array.isArray(e) && Array.isArray(
|
|
719
|
+
function Pe(e, s) {
|
|
720
|
+
return Array.isArray(e) && Array.isArray(s) ? JSON.stringify([...e].sort()) !== JSON.stringify([...s].sort()) : e !== s;
|
|
735
721
|
}
|
|
736
|
-
function st(e,
|
|
722
|
+
function st(e, s, t, r, n) {
|
|
737
723
|
if (e) {
|
|
738
|
-
const
|
|
739
|
-
if (
|
|
740
|
-
const
|
|
741
|
-
|
|
724
|
+
const c = s.value;
|
|
725
|
+
if (n && typeof c == "object" && c !== null) {
|
|
726
|
+
const o = { ...c };
|
|
727
|
+
o[n] = t, s.value = o;
|
|
742
728
|
} else
|
|
743
|
-
|
|
729
|
+
s.value = t;
|
|
744
730
|
} else {
|
|
745
|
-
const
|
|
746
|
-
Re(
|
|
731
|
+
const c = r._state || r;
|
|
732
|
+
Re(c, s, t);
|
|
747
733
|
}
|
|
748
734
|
}
|
|
749
|
-
function Oe(e,
|
|
735
|
+
function Oe(e, s, t, r) {
|
|
750
736
|
if (typeof e._requestRender == "function" && e._requestRender(), typeof e._triggerWatchers == "function") {
|
|
751
|
-
const
|
|
752
|
-
e._triggerWatchers(
|
|
737
|
+
const n = s ? "reactiveState" : t;
|
|
738
|
+
e._triggerWatchers(n, r);
|
|
753
739
|
}
|
|
754
740
|
}
|
|
755
|
-
function
|
|
756
|
-
const r = `update:${X(
|
|
741
|
+
function Wt(e, s, t) {
|
|
742
|
+
const r = `update:${X(s)}`, n = `update:${s}`, c = new CustomEvent(r, {
|
|
757
743
|
detail: t,
|
|
758
744
|
bubbles: !0,
|
|
759
745
|
cancelable: !0
|
|
760
|
-
}),
|
|
746
|
+
}), o = new CustomEvent(n, {
|
|
761
747
|
detail: t,
|
|
762
748
|
bubbles: !0,
|
|
763
749
|
cancelable: !0
|
|
764
750
|
});
|
|
765
|
-
e.dispatchEvent(
|
|
751
|
+
e.dispatchEvent(c), e.dispatchEvent(o);
|
|
766
752
|
}
|
|
767
|
-
function rt(e,
|
|
768
|
-
const
|
|
753
|
+
function rt(e, s, t, r) {
|
|
754
|
+
const n = t;
|
|
769
755
|
if (x(() => {
|
|
770
756
|
if (typeof e.setAttribute == "function")
|
|
771
757
|
try {
|
|
772
|
-
e[
|
|
758
|
+
e[s] = n;
|
|
773
759
|
} catch {
|
|
774
760
|
}
|
|
775
761
|
else
|
|
776
|
-
e[
|
|
777
|
-
}),
|
|
778
|
-
const
|
|
779
|
-
|
|
780
|
-
typeof e.setAttribute == "function" &&
|
|
762
|
+
e[s] = n;
|
|
763
|
+
}), n == null || typeof n == "string" || typeof n == "number" || typeof n == "boolean") {
|
|
764
|
+
const c = F(n);
|
|
765
|
+
c !== null ? x(() => {
|
|
766
|
+
typeof e.setAttribute == "function" && K(
|
|
781
767
|
e,
|
|
782
|
-
X(
|
|
783
|
-
String(
|
|
768
|
+
X(s),
|
|
769
|
+
String(c)
|
|
784
770
|
);
|
|
785
771
|
}) : x(() => {
|
|
786
|
-
typeof e.removeAttribute == "function" && Z(e, X(
|
|
772
|
+
typeof e.removeAttribute == "function" && Z(e, X(s));
|
|
787
773
|
});
|
|
788
774
|
}
|
|
789
775
|
}
|
|
790
|
-
function
|
|
776
|
+
function Dt(e, s, t, r) {
|
|
791
777
|
if (e) {
|
|
792
|
-
const
|
|
793
|
-
return r && typeof
|
|
778
|
+
const n = s.value;
|
|
779
|
+
return r && typeof n == "object" && n !== null ? n[r] : n;
|
|
794
780
|
} else {
|
|
795
|
-
const
|
|
796
|
-
return
|
|
781
|
+
const n = t._state || t;
|
|
782
|
+
return z(n, s);
|
|
797
783
|
}
|
|
798
784
|
}
|
|
799
785
|
function Le(e) {
|
|
800
786
|
return e != null && typeof e == "object" && "value" in e;
|
|
801
787
|
}
|
|
802
|
-
function
|
|
788
|
+
function ze(e) {
|
|
803
789
|
return e != null && typeof e == "object" && "value" in e ? e.value : e;
|
|
804
790
|
}
|
|
805
|
-
function re(e,
|
|
791
|
+
function re(e, s, t) {
|
|
806
792
|
if (!e) return;
|
|
807
793
|
e.attrs || (e.attrs = {});
|
|
808
794
|
const r = e.attrs;
|
|
809
|
-
r[
|
|
795
|
+
r[s] = t;
|
|
810
796
|
}
|
|
811
797
|
function Q(e) {
|
|
812
798
|
return e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement;
|
|
@@ -817,55 +803,55 @@ function de(e) {
|
|
|
817
803
|
function dt(e) {
|
|
818
804
|
return e.substring(2, 3).toLowerCase() + e.substring(3);
|
|
819
805
|
}
|
|
820
|
-
function
|
|
806
|
+
function Fe(e) {
|
|
821
807
|
return typeof e == "boolean" || e === "true" || e === "false";
|
|
822
808
|
}
|
|
823
|
-
function
|
|
824
|
-
if (!
|
|
825
|
-
const f =
|
|
809
|
+
function Kt(e, s, t, r, n, c, o, i) {
|
|
810
|
+
if (!c) return;
|
|
811
|
+
const f = s.includes("lazy"), b = s.includes("trim"), y = s.includes("number"), m = () => {
|
|
826
812
|
if (O(e)) {
|
|
827
813
|
const k = e.value;
|
|
828
|
-
return
|
|
814
|
+
return i && o && (o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement) && typeof k == "object" && k !== null ? k[i] : k;
|
|
829
815
|
}
|
|
830
|
-
const a =
|
|
831
|
-
return
|
|
832
|
-
},
|
|
816
|
+
const a = c?._state || c;
|
|
817
|
+
return z(a, e);
|
|
818
|
+
}, d = m();
|
|
833
819
|
let C = "text";
|
|
834
|
-
|
|
835
|
-
const j =
|
|
820
|
+
o instanceof HTMLInputElement ? C = r?.type || o.type || "text" : o instanceof HTMLSelectElement ? C = "select" : o instanceof HTMLTextAreaElement && (C = "textarea");
|
|
821
|
+
const j = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, L = j ? C === "checkbox" || C === "radio" ? "checked" : "value" : i ?? "modelValue";
|
|
836
822
|
if (C === "checkbox")
|
|
837
|
-
if (Array.isArray(
|
|
838
|
-
t[L] =
|
|
839
|
-
String(
|
|
823
|
+
if (Array.isArray(d))
|
|
824
|
+
t[L] = d.includes(
|
|
825
|
+
String(o?.getAttribute("value") ?? r?.value ?? "")
|
|
840
826
|
);
|
|
841
827
|
else {
|
|
842
|
-
const a =
|
|
843
|
-
t[L] =
|
|
828
|
+
const a = o?.getAttribute("true-value") ?? !0;
|
|
829
|
+
t[L] = d === a;
|
|
844
830
|
}
|
|
845
831
|
else if (C === "radio")
|
|
846
|
-
t[L] =
|
|
832
|
+
t[L] = d === (r?.value ?? "");
|
|
847
833
|
else if (C === "select")
|
|
848
|
-
if (
|
|
849
|
-
const a = Array.isArray(
|
|
834
|
+
if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
|
|
835
|
+
const a = Array.isArray(d) ? d.map(String) : [];
|
|
850
836
|
queueMicrotask(() => {
|
|
851
|
-
Array.from(
|
|
837
|
+
Array.from(o.options).forEach((k) => {
|
|
852
838
|
k.selected = a.includes(k.value);
|
|
853
839
|
});
|
|
854
|
-
}), t[L] = Array.isArray(
|
|
840
|
+
}), t[L] = Array.isArray(d) ? d : [];
|
|
855
841
|
} else
|
|
856
|
-
t[L] =
|
|
842
|
+
t[L] = d;
|
|
857
843
|
else if (!j && O(e))
|
|
858
844
|
t[L] = e;
|
|
859
845
|
else {
|
|
860
|
-
t[L] =
|
|
846
|
+
t[L] = d;
|
|
861
847
|
try {
|
|
862
848
|
const a = X(L);
|
|
863
|
-
r && (r[a] =
|
|
849
|
+
r && (r[a] = d);
|
|
864
850
|
} catch {
|
|
865
851
|
}
|
|
866
852
|
}
|
|
867
|
-
const
|
|
868
|
-
if (a.isComposing ||
|
|
853
|
+
const p = f || C === "checkbox" || C === "radio" || C === "select" ? "change" : "input", T = (a) => {
|
|
854
|
+
if (a.isComposing || n._isComposing)
|
|
869
855
|
return;
|
|
870
856
|
const k = globalThis.process, h = !!k && k.env?.NODE_ENV === "test" || typeof window < "u" && globalThis.__vitest__;
|
|
871
857
|
if (a.isTrusted === !1 && !h)
|
|
@@ -875,7 +861,7 @@ function zt(e, n, t, r, s, o, i, c) {
|
|
|
875
861
|
return;
|
|
876
862
|
let E = w.value;
|
|
877
863
|
if (C === "checkbox") {
|
|
878
|
-
const l =
|
|
864
|
+
const l = m();
|
|
879
865
|
if (Array.isArray(l)) {
|
|
880
866
|
const v = w.getAttribute("value") ?? "", _ = Array.from(l);
|
|
881
867
|
if (w.checked)
|
|
@@ -895,15 +881,15 @@ function zt(e, n, t, r, s, o, i, c) {
|
|
|
895
881
|
E = Array.from(w.selectedOptions).map(
|
|
896
882
|
(l) => l.value
|
|
897
883
|
);
|
|
898
|
-
else if (
|
|
884
|
+
else if (b && typeof E == "string" && (E = E.trim()), y) {
|
|
899
885
|
const l = Number(E);
|
|
900
886
|
isNaN(l) || (E = l);
|
|
901
887
|
}
|
|
902
|
-
const u =
|
|
888
|
+
const u = m();
|
|
903
889
|
if (Pe(E, u)) {
|
|
904
890
|
w._modelUpdating = !0;
|
|
905
891
|
try {
|
|
906
|
-
st(O(e), e, E,
|
|
892
|
+
st(O(e), e, E, c, i), Oe(c, O(e), e, E), w && Wt(w, L, E);
|
|
907
893
|
} finally {
|
|
908
894
|
queueMicrotask(
|
|
909
895
|
() => w._modelUpdating = !1
|
|
@@ -912,22 +898,22 @@ function zt(e, n, t, r, s, o, i, c) {
|
|
|
912
898
|
}
|
|
913
899
|
};
|
|
914
900
|
if (j) {
|
|
915
|
-
if (
|
|
916
|
-
const a =
|
|
917
|
-
|
|
901
|
+
if (n[p]) {
|
|
902
|
+
const a = n[p];
|
|
903
|
+
o && Y.removeListener(o, p, a);
|
|
918
904
|
}
|
|
919
|
-
|
|
905
|
+
n[p] = T;
|
|
920
906
|
} else {
|
|
921
907
|
const a = `update:${X(L)}`, k = `update:${L}`;
|
|
922
|
-
if (
|
|
923
|
-
const h =
|
|
924
|
-
|
|
908
|
+
if (n[a]) {
|
|
909
|
+
const h = n[a];
|
|
910
|
+
o && Y.removeListener(o, a, h);
|
|
925
911
|
}
|
|
926
|
-
if (
|
|
927
|
-
const h =
|
|
928
|
-
|
|
912
|
+
if (n[k]) {
|
|
913
|
+
const h = n[k];
|
|
914
|
+
o && Y.removeListener(o, k, h);
|
|
929
915
|
}
|
|
930
|
-
if (
|
|
916
|
+
if (n[a] = (h) => {
|
|
931
917
|
const w = h.detail;
|
|
932
918
|
let E = w !== void 0 ? w : void 0;
|
|
933
919
|
if (E === void 0) {
|
|
@@ -939,14 +925,14 @@ function zt(e, n, t, r, s, o, i, c) {
|
|
|
939
925
|
E = void 0;
|
|
940
926
|
}
|
|
941
927
|
}
|
|
942
|
-
const u =
|
|
928
|
+
const u = Dt(
|
|
943
929
|
O(e),
|
|
944
930
|
e,
|
|
945
|
-
|
|
946
|
-
|
|
931
|
+
c,
|
|
932
|
+
i
|
|
947
933
|
);
|
|
948
934
|
if (Pe(E, u)) {
|
|
949
|
-
st(O(e), e, E,
|
|
935
|
+
st(O(e), e, E, c, i), Oe(c, O(e), e, E);
|
|
950
936
|
const l = h.target;
|
|
951
937
|
l && rt(
|
|
952
938
|
l,
|
|
@@ -967,13 +953,13 @@ function zt(e, n, t, r, s, o, i, c) {
|
|
|
967
953
|
), E = new Set(
|
|
968
954
|
w.map((u) => `update:${X(u)}`)
|
|
969
955
|
);
|
|
970
|
-
for (const u of Object.keys(
|
|
971
|
-
u.startsWith("update:") && u !== a && u !== k && !E.has(u) && (
|
|
956
|
+
for (const u of Object.keys(n))
|
|
957
|
+
u.startsWith("update:") && u !== a && u !== k && !E.has(u) && (o && Y.removeListener(o, u, n[u]), delete n[u]);
|
|
972
958
|
for (const u of w) {
|
|
973
959
|
const g = String(u), l = `update:${X(g)}`, v = `update:${g}`;
|
|
974
|
-
l !== a && (
|
|
975
|
-
const A = _.detail !== void 0 ? _.detail : _.target?.value, N = O(e) ? e.value[g] :
|
|
976
|
-
|
|
960
|
+
l !== a && (n[l] && o && (Y.removeListener(o, l, n[l]), delete n[l]), n[l] = (_) => {
|
|
961
|
+
const A = _.detail !== void 0 ? _.detail : _.target?.value, N = O(e) ? e.value[g] : z(
|
|
962
|
+
c?._state || c,
|
|
977
963
|
e
|
|
978
964
|
);
|
|
979
965
|
if (!Pe(A, N)) return;
|
|
@@ -984,37 +970,37 @@ function zt(e, n, t, r, s, o, i, c) {
|
|
|
984
970
|
M[g] = A, e.value = M;
|
|
985
971
|
} else
|
|
986
972
|
Re(
|
|
987
|
-
|
|
973
|
+
c?._state || c,
|
|
988
974
|
e,
|
|
989
975
|
A
|
|
990
976
|
);
|
|
991
|
-
Oe(
|
|
992
|
-
const H = _.currentTarget ||
|
|
977
|
+
Oe(c, O(e), e, A);
|
|
978
|
+
const H = _.currentTarget || o || _.target;
|
|
993
979
|
H && rt(
|
|
994
980
|
H,
|
|
995
981
|
L,
|
|
996
982
|
O(e) ? e : A,
|
|
997
983
|
O(e)
|
|
998
984
|
);
|
|
999
|
-
},
|
|
985
|
+
}, n[v] = n[l]);
|
|
1000
986
|
}
|
|
1001
987
|
}
|
|
1002
|
-
|
|
988
|
+
n[k] = n[a];
|
|
1003
989
|
}
|
|
1004
|
-
(C === "text" || C === "textarea") && (
|
|
1005
|
-
|
|
990
|
+
(C === "text" || C === "textarea") && (n.compositionstart = () => n._isComposing = !0, n.compositionend = (a) => {
|
|
991
|
+
n._isComposing = !1;
|
|
1006
992
|
const k = a.target;
|
|
1007
993
|
k && queueMicrotask(() => {
|
|
1008
|
-
const h = k.value, w =
|
|
994
|
+
const h = k.value, w = c?._state || c, E = z(w, e);
|
|
1009
995
|
let u = h;
|
|
1010
|
-
if (
|
|
996
|
+
if (b && (u = u.trim()), y) {
|
|
1011
997
|
const l = Number(u);
|
|
1012
998
|
isNaN(l) || (u = l);
|
|
1013
999
|
}
|
|
1014
1000
|
if (Pe(u, E)) {
|
|
1015
1001
|
k._modelUpdating = !0;
|
|
1016
1002
|
try {
|
|
1017
|
-
Re(w, e, u), Oe(
|
|
1003
|
+
Re(w, e, u), Oe(c, O(e), e, u);
|
|
1018
1004
|
} finally {
|
|
1019
1005
|
queueMicrotask(
|
|
1020
1006
|
() => k._modelUpdating = !1
|
|
@@ -1024,130 +1010,130 @@ function zt(e, n, t, r, s, o, i, c) {
|
|
|
1024
1010
|
});
|
|
1025
1011
|
});
|
|
1026
1012
|
}
|
|
1027
|
-
function
|
|
1013
|
+
function Ut(e, s, t, r, n) {
|
|
1028
1014
|
if (typeof e == "object" && e !== null)
|
|
1029
|
-
for (const [
|
|
1030
|
-
if (
|
|
1031
|
-
t[
|
|
1032
|
-
else if (
|
|
1033
|
-
const
|
|
1015
|
+
for (const [c, o] of Object.entries(e))
|
|
1016
|
+
if (c.startsWith("data-") || c.startsWith("aria-") || c === "class")
|
|
1017
|
+
t[c] = o;
|
|
1018
|
+
else if (c === "disabled" && n && Q(n)) {
|
|
1019
|
+
const i = o && typeof o == "object" && "value" in o;
|
|
1034
1020
|
(() => {
|
|
1035
1021
|
try {
|
|
1036
|
-
return O(
|
|
1022
|
+
return O(o);
|
|
1037
1023
|
} catch {
|
|
1038
1024
|
return !1;
|
|
1039
1025
|
}
|
|
1040
|
-
})() ||
|
|
1026
|
+
})() || i ? s[c] = o : t[c] = o;
|
|
1041
1027
|
} else
|
|
1042
|
-
|
|
1028
|
+
s[c] = o;
|
|
1043
1029
|
else if (typeof e == "string") {
|
|
1044
1030
|
if (!r) return;
|
|
1045
1031
|
try {
|
|
1046
|
-
const
|
|
1047
|
-
if (typeof
|
|
1048
|
-
for (const [
|
|
1049
|
-
if (
|
|
1050
|
-
t[
|
|
1051
|
-
else if (
|
|
1052
|
-
const f =
|
|
1032
|
+
const c = je(e, r);
|
|
1033
|
+
if (typeof c == "object" && c !== null) {
|
|
1034
|
+
for (const [o, i] of Object.entries(c))
|
|
1035
|
+
if (o.startsWith("data-") || o.startsWith("aria-") || o === "class")
|
|
1036
|
+
t[o] = i;
|
|
1037
|
+
else if (o === "disabled" && n && Q(n)) {
|
|
1038
|
+
const f = i && typeof i == "object" && "value" in i;
|
|
1053
1039
|
(() => {
|
|
1054
1040
|
try {
|
|
1055
|
-
return O(
|
|
1041
|
+
return O(i);
|
|
1056
1042
|
} catch {
|
|
1057
1043
|
return !1;
|
|
1058
1044
|
}
|
|
1059
|
-
})() || f ?
|
|
1045
|
+
})() || f ? s[o] = i : t[o] = i;
|
|
1060
1046
|
} else
|
|
1061
|
-
|
|
1047
|
+
s[o] = i;
|
|
1062
1048
|
return;
|
|
1063
1049
|
} else {
|
|
1064
|
-
t[e] =
|
|
1050
|
+
t[e] = c;
|
|
1065
1051
|
return;
|
|
1066
1052
|
}
|
|
1067
1053
|
} catch {
|
|
1068
|
-
const
|
|
1054
|
+
const c = z(
|
|
1069
1055
|
r,
|
|
1070
1056
|
e
|
|
1071
1057
|
);
|
|
1072
|
-
t[e] =
|
|
1058
|
+
t[e] = c;
|
|
1073
1059
|
}
|
|
1074
1060
|
}
|
|
1075
1061
|
}
|
|
1076
|
-
function
|
|
1062
|
+
function zt(e, s, t) {
|
|
1077
1063
|
let r;
|
|
1078
1064
|
if (typeof e == "string") {
|
|
1079
1065
|
if (!t) return;
|
|
1080
1066
|
r = je(e, t);
|
|
1081
1067
|
} else
|
|
1082
1068
|
r = e;
|
|
1083
|
-
const
|
|
1084
|
-
let
|
|
1069
|
+
const n = String(s.style || "");
|
|
1070
|
+
let c = n;
|
|
1085
1071
|
if (r) {
|
|
1086
|
-
if (
|
|
1087
|
-
const
|
|
1072
|
+
if (n) {
|
|
1073
|
+
const o = String(n).split(";").map((f) => f.trim()).filter(Boolean), i = o.findIndex(
|
|
1088
1074
|
(f) => f.startsWith("display:")
|
|
1089
1075
|
);
|
|
1090
|
-
|
|
1076
|
+
i >= 0 && o[i] === "display: none" && (o.splice(i, 1), c = o.length > 0 ? o.join("; ") + ";" : "");
|
|
1091
1077
|
}
|
|
1092
|
-
} else if (
|
|
1093
|
-
const
|
|
1078
|
+
} else if (n) {
|
|
1079
|
+
const o = String(n).split(";").filter(Boolean), i = o.findIndex(
|
|
1094
1080
|
(f) => f.trim().startsWith("display:")
|
|
1095
1081
|
);
|
|
1096
|
-
|
|
1082
|
+
i >= 0 ? o[i] = "display: none" : o.push("display: none"), c = o.join("; ");
|
|
1097
1083
|
} else
|
|
1098
|
-
|
|
1099
|
-
|
|
1084
|
+
c = "display: none";
|
|
1085
|
+
c !== n && (c ? s.style = c : s.style = void 0);
|
|
1100
1086
|
}
|
|
1101
|
-
function je(e,
|
|
1102
|
-
return
|
|
1087
|
+
function je(e, s) {
|
|
1088
|
+
return Bt.evaluate(e, s);
|
|
1103
1089
|
}
|
|
1104
|
-
function
|
|
1105
|
-
let
|
|
1090
|
+
function Ft(e, s, t, r) {
|
|
1091
|
+
let n;
|
|
1106
1092
|
if (typeof e == "string") {
|
|
1107
1093
|
if (!t) return;
|
|
1108
|
-
|
|
1094
|
+
n = je(e, t);
|
|
1109
1095
|
} else
|
|
1110
|
-
|
|
1096
|
+
n = e;
|
|
1111
1097
|
try {
|
|
1112
|
-
if (
|
|
1113
|
-
if (O(
|
|
1114
|
-
|
|
1115
|
-
else if ("value" in
|
|
1116
|
-
const
|
|
1117
|
-
|
|
1098
|
+
if (n && typeof n == "object") {
|
|
1099
|
+
if (O(n))
|
|
1100
|
+
n = n.value;
|
|
1101
|
+
else if ("value" in n && typeof n.value < "u") {
|
|
1102
|
+
const b = n.value;
|
|
1103
|
+
b instanceof Node || (n = b);
|
|
1118
1104
|
}
|
|
1119
1105
|
}
|
|
1120
1106
|
} catch {
|
|
1121
1107
|
}
|
|
1122
|
-
let
|
|
1123
|
-
if (typeof
|
|
1124
|
-
|
|
1125
|
-
else if (Array.isArray(
|
|
1126
|
-
|
|
1127
|
-
else if (typeof
|
|
1128
|
-
for (const [
|
|
1129
|
-
|
|
1130
|
-
const
|
|
1131
|
-
f ?
|
|
1132
|
-
}
|
|
1133
|
-
function
|
|
1108
|
+
let c = [];
|
|
1109
|
+
if (typeof n == "string")
|
|
1110
|
+
c = [n];
|
|
1111
|
+
else if (Array.isArray(n))
|
|
1112
|
+
c = n.filter(Boolean);
|
|
1113
|
+
else if (typeof n == "object" && n !== null)
|
|
1114
|
+
for (const [b, y] of Object.entries(n))
|
|
1115
|
+
y && c.push(b);
|
|
1116
|
+
const o = c.join(" "), i = r && r.class || s.class || "", f = i ? `${i} ${o}`.trim() : o.trim();
|
|
1117
|
+
f ? s.class = f : s.class = void 0;
|
|
1118
|
+
}
|
|
1119
|
+
function qt(e, s, t) {
|
|
1134
1120
|
let r;
|
|
1135
1121
|
if (typeof e == "string") {
|
|
1136
1122
|
if (!t) return;
|
|
1137
1123
|
r = je(e, t);
|
|
1138
1124
|
} else
|
|
1139
1125
|
r = e;
|
|
1140
|
-
let
|
|
1126
|
+
let n = "";
|
|
1141
1127
|
if (typeof r == "string")
|
|
1142
|
-
|
|
1128
|
+
n = r;
|
|
1143
1129
|
else if (r && typeof r == "object") {
|
|
1144
|
-
const
|
|
1145
|
-
for (const [
|
|
1130
|
+
const o = [];
|
|
1131
|
+
for (const [i, f] of Object.entries(r))
|
|
1146
1132
|
if (f != null && f !== "") {
|
|
1147
|
-
const
|
|
1133
|
+
const b = i.replace(
|
|
1148
1134
|
/[A-Z]/g,
|
|
1149
|
-
(
|
|
1150
|
-
),
|
|
1135
|
+
(d) => `-${d.toLowerCase()}`
|
|
1136
|
+
), y = [
|
|
1151
1137
|
"width",
|
|
1152
1138
|
"height",
|
|
1153
1139
|
"top",
|
|
@@ -1173,205 +1159,205 @@ function Vt(e, n, t) {
|
|
|
1173
1159
|
"min-height",
|
|
1174
1160
|
"max-height"
|
|
1175
1161
|
];
|
|
1176
|
-
let
|
|
1177
|
-
typeof f == "number" &&
|
|
1162
|
+
let m = String(f);
|
|
1163
|
+
typeof f == "number" && y.includes(b) && (m = `${f}px`), o.push(`${b}: ${m}`);
|
|
1178
1164
|
}
|
|
1179
|
-
|
|
1165
|
+
n = o.join("; ") + (o.length > 0 ? ";" : "");
|
|
1180
1166
|
}
|
|
1181
|
-
const
|
|
1182
|
-
|
|
1167
|
+
const c = String(s.style || "");
|
|
1168
|
+
s.style = c + (c && !c.endsWith(";") ? "; " : "") + n;
|
|
1183
1169
|
}
|
|
1184
|
-
function
|
|
1170
|
+
function Vt(e, s, t) {
|
|
1185
1171
|
let r = e;
|
|
1186
|
-
typeof e == "string" && t && (r = je(e, t)), O(r) ?
|
|
1187
|
-
}
|
|
1188
|
-
function pt(e,
|
|
1189
|
-
const
|
|
1190
|
-
for (const [
|
|
1191
|
-
const { value:
|
|
1192
|
-
if (
|
|
1193
|
-
const
|
|
1194
|
-
|
|
1195
|
-
m,
|
|
1196
|
-
// Pass the original value (could be string or reactive state object)
|
|
1172
|
+
typeof e == "string" && t && (r = je(e, t)), O(r) ? s.reactiveRef = r : s.ref = r;
|
|
1173
|
+
}
|
|
1174
|
+
function pt(e, s, t, r) {
|
|
1175
|
+
const n = {}, c = { ...r || {} }, o = {};
|
|
1176
|
+
for (const [i, f] of Object.entries(e)) {
|
|
1177
|
+
const { value: b, modifiers: y, arg: m } = f;
|
|
1178
|
+
if (i === "model" || i.startsWith("model:")) {
|
|
1179
|
+
const d = i.split(":"), C = d.length > 1 ? d[1] : m;
|
|
1180
|
+
Kt(
|
|
1197
1181
|
b,
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
i,
|
|
1182
|
+
// Pass the original value (could be string or reactive state object)
|
|
1183
|
+
y,
|
|
1201
1184
|
n,
|
|
1185
|
+
c,
|
|
1186
|
+
o,
|
|
1187
|
+
s,
|
|
1202
1188
|
t,
|
|
1203
1189
|
C
|
|
1204
1190
|
);
|
|
1205
1191
|
continue;
|
|
1206
1192
|
}
|
|
1207
|
-
switch (
|
|
1193
|
+
switch (i) {
|
|
1208
1194
|
case "bind":
|
|
1209
|
-
|
|
1195
|
+
Ut(b, n, c, s, t);
|
|
1210
1196
|
break;
|
|
1211
1197
|
case "show":
|
|
1212
|
-
|
|
1198
|
+
zt(b, c, s);
|
|
1213
1199
|
break;
|
|
1214
1200
|
case "class":
|
|
1215
|
-
|
|
1201
|
+
Ft(b, c, s, r);
|
|
1216
1202
|
break;
|
|
1217
1203
|
case "style":
|
|
1218
|
-
|
|
1204
|
+
qt(b, c, s);
|
|
1219
1205
|
break;
|
|
1220
1206
|
case "ref":
|
|
1221
|
-
|
|
1207
|
+
Vt(b, n, s);
|
|
1222
1208
|
break;
|
|
1223
1209
|
}
|
|
1224
1210
|
}
|
|
1225
1211
|
try {
|
|
1226
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1227
|
-
const f =
|
|
1228
|
-
let
|
|
1212
|
+
if (Object.prototype.hasOwnProperty.call(n, "disabled") && t && Q(t)) {
|
|
1213
|
+
const f = n.disabled, b = f && typeof f == "object" && "value" in f;
|
|
1214
|
+
let y = !1;
|
|
1229
1215
|
try {
|
|
1230
|
-
|
|
1216
|
+
y = O(f);
|
|
1231
1217
|
} catch {
|
|
1232
|
-
|
|
1218
|
+
y = !1;
|
|
1233
1219
|
}
|
|
1234
|
-
!
|
|
1220
|
+
!b && !y && (c.disabled = f, delete n.disabled);
|
|
1235
1221
|
}
|
|
1236
1222
|
} catch {
|
|
1237
1223
|
}
|
|
1238
|
-
return { props:
|
|
1224
|
+
return { props: n, attrs: c, listeners: o };
|
|
1239
1225
|
}
|
|
1240
|
-
function
|
|
1226
|
+
function me(e) {
|
|
1241
1227
|
return e ? e.split(/\s+/).filter(Boolean) : [];
|
|
1242
1228
|
}
|
|
1243
|
-
function
|
|
1244
|
-
if (
|
|
1245
|
-
const t =
|
|
1229
|
+
function ge(e, s) {
|
|
1230
|
+
if (s.length === 0) return;
|
|
1231
|
+
const t = s.filter(
|
|
1246
1232
|
(r) => r && !e.classList.contains(r)
|
|
1247
1233
|
);
|
|
1248
1234
|
t.length > 0 && e.classList.add(...t);
|
|
1249
1235
|
}
|
|
1250
|
-
function ye(e,
|
|
1251
|
-
if (
|
|
1252
|
-
const t =
|
|
1236
|
+
function ye(e, s) {
|
|
1237
|
+
if (s.length === 0) return;
|
|
1238
|
+
const t = s.filter(Boolean);
|
|
1253
1239
|
t.length > 0 && e.classList.remove(...t);
|
|
1254
1240
|
}
|
|
1255
|
-
function
|
|
1256
|
-
const
|
|
1257
|
-
const
|
|
1258
|
-
return
|
|
1241
|
+
function Gt(e) {
|
|
1242
|
+
const s = window.getComputedStyle(e), t = s.transitionDuration || "0s", r = s.transitionDelay || "0s", n = (c) => {
|
|
1243
|
+
const o = parseFloat(c);
|
|
1244
|
+
return c.includes("ms") ? o : o * 1e3;
|
|
1259
1245
|
};
|
|
1260
|
-
return
|
|
1246
|
+
return n(t) + n(r);
|
|
1261
1247
|
}
|
|
1262
|
-
function ht(e,
|
|
1248
|
+
function ht(e, s) {
|
|
1263
1249
|
return new Promise((t) => {
|
|
1264
|
-
const r =
|
|
1250
|
+
const r = s ?? Gt(e);
|
|
1265
1251
|
if (r <= 0) {
|
|
1266
1252
|
t();
|
|
1267
1253
|
return;
|
|
1268
1254
|
}
|
|
1269
|
-
let
|
|
1270
|
-
const
|
|
1271
|
-
|
|
1272
|
-
},
|
|
1273
|
-
e.addEventListener("transitionend",
|
|
1255
|
+
let n = !1;
|
|
1256
|
+
const c = () => {
|
|
1257
|
+
n || (n = !0, e.removeEventListener("transitionend", o), e.removeEventListener("transitioncancel", o), t());
|
|
1258
|
+
}, o = () => c();
|
|
1259
|
+
e.addEventListener("transitionend", o), e.addEventListener("transitioncancel", o), setTimeout(c, r + 50);
|
|
1274
1260
|
});
|
|
1275
1261
|
}
|
|
1276
|
-
async function
|
|
1277
|
-
const { classes: t, hooks: r, css:
|
|
1262
|
+
async function _e(e, s) {
|
|
1263
|
+
const { classes: t, hooks: r, css: n, duration: c } = s;
|
|
1278
1264
|
if (r?.onBeforeEnter)
|
|
1279
1265
|
try {
|
|
1280
1266
|
r.onBeforeEnter(e);
|
|
1281
|
-
} catch (
|
|
1282
|
-
W("Transition onBeforeEnter error:",
|
|
1267
|
+
} catch (m) {
|
|
1268
|
+
W("Transition onBeforeEnter error:", m);
|
|
1283
1269
|
}
|
|
1284
|
-
if (!
|
|
1285
|
-
return r?.onEnter ? new Promise((
|
|
1286
|
-
const
|
|
1287
|
-
typeof
|
|
1270
|
+
if (!n)
|
|
1271
|
+
return r?.onEnter ? new Promise((m) => {
|
|
1272
|
+
const d = r.onEnter;
|
|
1273
|
+
typeof d == "function" ? d(e, () => {
|
|
1288
1274
|
if (r?.onAfterEnter)
|
|
1289
1275
|
try {
|
|
1290
1276
|
r.onAfterEnter(e);
|
|
1291
1277
|
} catch (C) {
|
|
1292
1278
|
W("Transition onAfterEnter error:", C);
|
|
1293
1279
|
}
|
|
1294
|
-
|
|
1295
|
-
}) :
|
|
1280
|
+
m();
|
|
1281
|
+
}) : m();
|
|
1296
1282
|
}) : void 0;
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1299
|
-
let
|
|
1283
|
+
const o = me(t?.enterFrom), i = me(t?.enterActive), f = me(t?.enterTo);
|
|
1284
|
+
ge(e, o), e.offsetHeight, ge(e, i), e.offsetHeight;
|
|
1285
|
+
let b;
|
|
1300
1286
|
if (r?.onEnter) {
|
|
1301
|
-
const
|
|
1302
|
-
|
|
1287
|
+
const m = new Promise((d) => {
|
|
1288
|
+
b = d;
|
|
1303
1289
|
});
|
|
1304
1290
|
try {
|
|
1305
|
-
const
|
|
1306
|
-
typeof
|
|
1307
|
-
|
|
1291
|
+
const d = r.onEnter;
|
|
1292
|
+
typeof d == "function" && d(e, () => {
|
|
1293
|
+
b && b();
|
|
1308
1294
|
});
|
|
1309
|
-
} catch (
|
|
1310
|
-
W("Transition onEnter error:",
|
|
1295
|
+
} catch (d) {
|
|
1296
|
+
W("Transition onEnter error:", d);
|
|
1311
1297
|
}
|
|
1312
|
-
|
|
1298
|
+
b && await m;
|
|
1313
1299
|
}
|
|
1314
|
-
await new Promise((
|
|
1315
|
-
let
|
|
1316
|
-
if (typeof
|
|
1300
|
+
await new Promise((m) => requestAnimationFrame(() => m())), e.offsetHeight, ye(e, o), ge(e, f), e.offsetHeight, await new Promise((m) => requestAnimationFrame(() => m()));
|
|
1301
|
+
let y;
|
|
1302
|
+
if (typeof c == "number" ? y = c : c && typeof c == "object" && "enter" in c && (y = c.enter), await ht(e, y), ye(e, i), r?.onAfterEnter)
|
|
1317
1303
|
try {
|
|
1318
1304
|
r.onAfterEnter(e);
|
|
1319
|
-
} catch (
|
|
1320
|
-
W("Transition onAfterEnter error:",
|
|
1305
|
+
} catch (m) {
|
|
1306
|
+
W("Transition onAfterEnter error:", m);
|
|
1321
1307
|
}
|
|
1322
1308
|
}
|
|
1323
|
-
async function
|
|
1324
|
-
const { classes: t, hooks: r, css:
|
|
1309
|
+
async function Ke(e, s) {
|
|
1310
|
+
const { classes: t, hooks: r, css: n, duration: c } = s;
|
|
1325
1311
|
if (r?.onBeforeLeave)
|
|
1326
1312
|
try {
|
|
1327
1313
|
r.onBeforeLeave(e);
|
|
1328
|
-
} catch (
|
|
1329
|
-
W("Transition onBeforeLeave error:",
|
|
1314
|
+
} catch (m) {
|
|
1315
|
+
W("Transition onBeforeLeave error:", m);
|
|
1330
1316
|
}
|
|
1331
|
-
if (!
|
|
1332
|
-
return r?.onLeave ? new Promise((
|
|
1333
|
-
const
|
|
1334
|
-
typeof
|
|
1317
|
+
if (!n)
|
|
1318
|
+
return r?.onLeave ? new Promise((m) => {
|
|
1319
|
+
const d = r.onLeave;
|
|
1320
|
+
typeof d == "function" ? d(e, () => {
|
|
1335
1321
|
if (r?.onAfterLeave)
|
|
1336
1322
|
try {
|
|
1337
1323
|
r.onAfterLeave(e);
|
|
1338
1324
|
} catch (C) {
|
|
1339
1325
|
W("Transition onAfterLeave error:", C);
|
|
1340
1326
|
}
|
|
1341
|
-
|
|
1342
|
-
}) :
|
|
1327
|
+
m();
|
|
1328
|
+
}) : m();
|
|
1343
1329
|
}) : void 0;
|
|
1344
|
-
const
|
|
1345
|
-
|
|
1346
|
-
let
|
|
1330
|
+
const o = me(t?.leaveFrom), i = me(t?.leaveActive), f = me(t?.leaveTo);
|
|
1331
|
+
ge(e, o), e.offsetHeight, ge(e, i);
|
|
1332
|
+
let b;
|
|
1347
1333
|
if (r?.onLeave) {
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1334
|
+
const m = new Promise((d) => {
|
|
1335
|
+
b = d;
|
|
1350
1336
|
});
|
|
1351
1337
|
try {
|
|
1352
|
-
const
|
|
1353
|
-
typeof
|
|
1354
|
-
|
|
1338
|
+
const d = r.onLeave;
|
|
1339
|
+
typeof d == "function" && d(e, () => {
|
|
1340
|
+
b && b();
|
|
1355
1341
|
});
|
|
1356
|
-
} catch (
|
|
1357
|
-
W("Transition onLeave error:",
|
|
1342
|
+
} catch (d) {
|
|
1343
|
+
W("Transition onLeave error:", d);
|
|
1358
1344
|
}
|
|
1359
|
-
|
|
1345
|
+
b && await m;
|
|
1360
1346
|
}
|
|
1361
|
-
await new Promise((
|
|
1362
|
-
let
|
|
1363
|
-
if (typeof
|
|
1347
|
+
await new Promise((m) => requestAnimationFrame(() => m())), ye(e, o), ge(e, f);
|
|
1348
|
+
let y;
|
|
1349
|
+
if (typeof c == "number" ? y = c : c && typeof c == "object" && "leave" in c && (y = c.leave), await ht(e, y), ye(e, i), ye(e, f), ye(e, o), r?.onAfterLeave)
|
|
1364
1350
|
try {
|
|
1365
1351
|
r.onAfterLeave(e);
|
|
1366
|
-
} catch (
|
|
1367
|
-
W("Transition onAfterLeave error:",
|
|
1352
|
+
} catch (m) {
|
|
1353
|
+
W("Transition onAfterLeave error:", m);
|
|
1368
1354
|
}
|
|
1369
1355
|
}
|
|
1370
1356
|
const yt = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap();
|
|
1371
1357
|
function xe(e) {
|
|
1372
1358
|
if (!e) return;
|
|
1373
|
-
const
|
|
1374
|
-
if (
|
|
1359
|
+
const s = yt.get(e);
|
|
1360
|
+
if (s !== void 0) return s;
|
|
1375
1361
|
try {
|
|
1376
1362
|
const t = e;
|
|
1377
1363
|
if (t && t.key != null) return String(t.key);
|
|
@@ -1382,27 +1368,27 @@ function xe(e) {
|
|
|
1382
1368
|
if (t) return t;
|
|
1383
1369
|
}
|
|
1384
1370
|
}
|
|
1385
|
-
function G(e,
|
|
1371
|
+
function G(e, s) {
|
|
1386
1372
|
try {
|
|
1387
|
-
yt.set(e,
|
|
1373
|
+
yt.set(e, s);
|
|
1388
1374
|
} catch {
|
|
1389
1375
|
}
|
|
1390
1376
|
try {
|
|
1391
|
-
e.key =
|
|
1377
|
+
e.key = s;
|
|
1392
1378
|
} catch {
|
|
1393
1379
|
}
|
|
1394
1380
|
try {
|
|
1395
1381
|
if (e instanceof Element) {
|
|
1396
|
-
const t = F(
|
|
1397
|
-
t !== null &&
|
|
1382
|
+
const t = F(s);
|
|
1383
|
+
t !== null && K(e, "data-anchor-key", t);
|
|
1398
1384
|
}
|
|
1399
1385
|
} catch {
|
|
1400
1386
|
}
|
|
1401
1387
|
}
|
|
1402
|
-
function
|
|
1388
|
+
function Jt(e) {
|
|
1403
1389
|
if (!e) return;
|
|
1404
|
-
const
|
|
1405
|
-
if (
|
|
1390
|
+
const s = mt.get(e);
|
|
1391
|
+
if (s !== void 0) return s;
|
|
1406
1392
|
try {
|
|
1407
1393
|
const t = e;
|
|
1408
1394
|
if (t && t._transitionGroup != null)
|
|
@@ -1410,130 +1396,130 @@ function Zt(e) {
|
|
|
1410
1396
|
} catch {
|
|
1411
1397
|
}
|
|
1412
1398
|
}
|
|
1413
|
-
function
|
|
1399
|
+
function Zt(e, s) {
|
|
1414
1400
|
try {
|
|
1415
|
-
mt.set(e,
|
|
1401
|
+
mt.set(e, s);
|
|
1416
1402
|
} catch {
|
|
1417
1403
|
}
|
|
1418
1404
|
try {
|
|
1419
|
-
e._transitionGroup =
|
|
1405
|
+
e._transitionGroup = s;
|
|
1420
1406
|
} catch {
|
|
1421
1407
|
}
|
|
1422
1408
|
}
|
|
1423
1409
|
const Ie = /* @__PURE__ */ new WeakMap();
|
|
1424
|
-
function ue(e,
|
|
1425
|
-
if (
|
|
1410
|
+
function ue(e, s) {
|
|
1411
|
+
if (s) {
|
|
1426
1412
|
if (e instanceof Element) {
|
|
1427
1413
|
Y.cleanup(e);
|
|
1428
1414
|
const t = [];
|
|
1429
|
-
for (const r in
|
|
1430
|
-
|
|
1415
|
+
for (const r in s)
|
|
1416
|
+
s[r] === e && t.push(r);
|
|
1431
1417
|
for (const r of t)
|
|
1432
|
-
delete
|
|
1418
|
+
delete s[r];
|
|
1433
1419
|
}
|
|
1434
1420
|
if (e.hasChildNodes()) {
|
|
1435
1421
|
const t = e.childNodes;
|
|
1436
1422
|
for (let r = t.length - 1; r >= 0; r--)
|
|
1437
|
-
ue(t[r],
|
|
1423
|
+
ue(t[r], s);
|
|
1438
1424
|
}
|
|
1439
1425
|
}
|
|
1440
1426
|
}
|
|
1441
|
-
function
|
|
1427
|
+
function Ae(e, s, t) {
|
|
1442
1428
|
if (typeof e == "string") return;
|
|
1443
|
-
const r = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef),
|
|
1429
|
+
const r = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), n = e.props?.ref ?? (e.props?.props && e.props.props.ref);
|
|
1444
1430
|
if (r)
|
|
1445
1431
|
try {
|
|
1446
1432
|
if (O(r) || typeof r == "object" && "value" in r)
|
|
1447
|
-
r.value =
|
|
1433
|
+
r.value = s;
|
|
1448
1434
|
else if (typeof r == "function")
|
|
1449
|
-
r(
|
|
1435
|
+
r(s);
|
|
1450
1436
|
else if (typeof r == "string" && t)
|
|
1451
1437
|
try {
|
|
1452
|
-
const
|
|
1453
|
-
t[
|
|
1438
|
+
const c = String(r);
|
|
1439
|
+
t[c] = s;
|
|
1454
1440
|
} catch {
|
|
1455
1441
|
}
|
|
1456
1442
|
} catch {
|
|
1457
1443
|
}
|
|
1458
|
-
else if (
|
|
1444
|
+
else if (n && t)
|
|
1459
1445
|
try {
|
|
1460
|
-
const
|
|
1461
|
-
t[
|
|
1446
|
+
const c = String(n);
|
|
1447
|
+
t[c] = s;
|
|
1462
1448
|
} catch {
|
|
1463
1449
|
}
|
|
1464
1450
|
}
|
|
1465
|
-
function
|
|
1451
|
+
function qe(e, s) {
|
|
1466
1452
|
if (Array.isArray(e)) {
|
|
1467
|
-
const
|
|
1468
|
-
return e.map((
|
|
1469
|
-
if (!
|
|
1470
|
-
let f =
|
|
1453
|
+
const c = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
1454
|
+
return e.map((i) => {
|
|
1455
|
+
if (!i || typeof i != "object") return i;
|
|
1456
|
+
let f = i.props?.key ?? i.key;
|
|
1471
1457
|
if (!f) {
|
|
1472
|
-
const
|
|
1458
|
+
const m = i.tag || "node", C = [
|
|
1473
1459
|
// attrs (kebab-case)
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1460
|
+
i.props?.attrs?.id,
|
|
1461
|
+
i.props?.attrs?.name,
|
|
1462
|
+
i.props?.attrs?.["data-key"],
|
|
1477
1463
|
// promoted JS props (camelCase or original)
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1464
|
+
i.props?.props?.id,
|
|
1465
|
+
i.props?.props?.name,
|
|
1466
|
+
i.props?.props?.dataKey,
|
|
1467
|
+
i.props?.props?.["data-key"]
|
|
1482
1468
|
].find((j) => j != null) ?? "";
|
|
1483
|
-
f = C ? `${
|
|
1469
|
+
f = C ? `${s}:${m}:${C}` : `${s}:${m}`;
|
|
1484
1470
|
}
|
|
1485
|
-
let
|
|
1486
|
-
if (
|
|
1487
|
-
const
|
|
1488
|
-
|
|
1471
|
+
let b = f;
|
|
1472
|
+
if (c.has(b)) {
|
|
1473
|
+
const m = (o.get(b) ?? 1) + 1;
|
|
1474
|
+
o.set(b, m), b = `${f}#${m}`;
|
|
1489
1475
|
}
|
|
1490
|
-
|
|
1491
|
-
let
|
|
1492
|
-
return Array.isArray(
|
|
1476
|
+
o.set(f, (o.get(f) ?? 0) + 1), c.add(b);
|
|
1477
|
+
let y = i.children;
|
|
1478
|
+
return Array.isArray(y) && (y = qe(y, b)), { ...i, key: b, children: y };
|
|
1493
1479
|
});
|
|
1494
1480
|
}
|
|
1495
|
-
const t = e, r = t.props?.key ?? t.key ??
|
|
1496
|
-
let
|
|
1497
|
-
return Array.isArray(
|
|
1481
|
+
const t = e, r = t.props?.key ?? t.key ?? s;
|
|
1482
|
+
let n = t.children;
|
|
1483
|
+
return Array.isArray(n) && (n = qe(n, r)), { ...t, key: r, children: n };
|
|
1498
1484
|
}
|
|
1499
|
-
function it(e,
|
|
1500
|
-
const
|
|
1501
|
-
|
|
1485
|
+
function it(e, s, t, r) {
|
|
1486
|
+
const n = t.directives ?? {}, c = t.attrs ? { ...t.attrs } : {}, o = pt(
|
|
1487
|
+
n,
|
|
1502
1488
|
r,
|
|
1503
1489
|
e,
|
|
1504
|
-
|
|
1505
|
-
),
|
|
1506
|
-
...
|
|
1490
|
+
c
|
|
1491
|
+
), i = {
|
|
1492
|
+
...s.props || {},
|
|
1507
1493
|
...t.props || {},
|
|
1508
|
-
...
|
|
1494
|
+
...o.props || {}
|
|
1509
1495
|
}, f = {
|
|
1510
|
-
...
|
|
1511
|
-
...
|
|
1512
|
-
},
|
|
1513
|
-
let
|
|
1496
|
+
...c || {},
|
|
1497
|
+
...o.attrs || {}
|
|
1498
|
+
}, b = s.props ?? {}, y = i, m = !!(t?.isCustomElement ?? s?.isCustomElement ?? !1);
|
|
1499
|
+
let d = !1;
|
|
1514
1500
|
const C = /* @__PURE__ */ new Set();
|
|
1515
|
-
for (const a in m) C.add(a);
|
|
1516
1501
|
for (const a in b) C.add(a);
|
|
1502
|
+
for (const a in y) C.add(a);
|
|
1517
1503
|
for (const a of C) {
|
|
1518
|
-
const k =
|
|
1504
|
+
const k = b[a], h = y[a];
|
|
1519
1505
|
let w = k, E = h;
|
|
1520
1506
|
if (x(() => {
|
|
1521
1507
|
O(k) ? w = k.peek() : Le(k) && (w = k.value);
|
|
1522
1508
|
}), x(() => {
|
|
1523
1509
|
O(h) ? E = h.peek() : Le(h) && (E = h.value);
|
|
1524
1510
|
}), !(k === h && w === E))
|
|
1525
|
-
if (
|
|
1526
|
-
const u =
|
|
1511
|
+
if (d = !0, a === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement)) {
|
|
1512
|
+
const u = ze(h), g = u == null ? "" : String(u);
|
|
1527
1513
|
e.value !== g && (e.value = g);
|
|
1528
1514
|
} else if (a === "checked" && e instanceof HTMLInputElement) {
|
|
1529
|
-
const u =
|
|
1515
|
+
const u = ze(h);
|
|
1530
1516
|
e.checked = !!u;
|
|
1531
1517
|
} else if (a.startsWith("on") && typeof h == "function") {
|
|
1532
1518
|
const u = dt(a);
|
|
1533
1519
|
typeof k == "function" && Y.removeListener(e, u, k), typeof h == "function" && Y.addListener(e, u, h);
|
|
1534
1520
|
try {
|
|
1535
1521
|
if (u && u.startsWith("update:")) {
|
|
1536
|
-
const g = u.split(":", 2)[1], l =
|
|
1522
|
+
const g = u.split(":", 2)[1], l = y[g];
|
|
1537
1523
|
let v = [];
|
|
1538
1524
|
try {
|
|
1539
1525
|
if (O(l)) {
|
|
@@ -1548,7 +1534,7 @@ function it(e, n, t, r) {
|
|
|
1548
1534
|
);
|
|
1549
1535
|
for (const A of _) {
|
|
1550
1536
|
const N = `update:${A}`, $ = (H) => {
|
|
1551
|
-
const M = H.detail !== void 0 ? H.detail : H.target instanceof HTMLInputElement || H.target instanceof HTMLTextAreaElement || H.target instanceof HTMLSelectElement ? H.target.value : void 0, R = { ...O(l) ? l.value || {} :
|
|
1537
|
+
const M = H.detail !== void 0 ? H.detail : H.target instanceof HTMLInputElement || H.target instanceof HTMLTextAreaElement || H.target instanceof HTMLSelectElement ? H.target.value : void 0, R = { ...O(l) ? l.value || {} : y[g] || {}, [A]: M };
|
|
1552
1538
|
try {
|
|
1553
1539
|
typeof h == "function" && h({
|
|
1554
1540
|
detail: R
|
|
@@ -1566,7 +1552,7 @@ function it(e, n, t, r) {
|
|
|
1566
1552
|
} else if (h == null)
|
|
1567
1553
|
Z(e, a);
|
|
1568
1554
|
else {
|
|
1569
|
-
const u = t?.isCustomElement ??
|
|
1555
|
+
const u = t?.isCustomElement ?? s?.isCustomElement ?? !1;
|
|
1570
1556
|
if (u || a in e)
|
|
1571
1557
|
try {
|
|
1572
1558
|
e[a] = h, a === "disabled" && h === !1 && !u && Q(e) && Z(e, "disabled");
|
|
@@ -1576,13 +1562,13 @@ function it(e, n, t, r) {
|
|
|
1576
1562
|
h === !1 && Z(e, a);
|
|
1577
1563
|
}
|
|
1578
1564
|
}
|
|
1579
|
-
const j =
|
|
1565
|
+
const j = o.listeners ?? {}, S = Ie.get(e) ?? {};
|
|
1580
1566
|
for (const [a, k] of Object.entries(S))
|
|
1581
1567
|
Y.removeListener(e, a, k);
|
|
1582
1568
|
for (const [a, k] of Object.entries(j))
|
|
1583
1569
|
Y.addListener(e, a, k);
|
|
1584
1570
|
Object.keys(j).length > 0 ? Ie.set(e, j) : Ie.delete(e);
|
|
1585
|
-
const L = { ...
|
|
1571
|
+
const L = { ...s.attrs ?? {} }, p = f, T = o && o.attrs || {};
|
|
1586
1572
|
if (Object.prototype.hasOwnProperty.call(T, "class") && typeof e.getAttribute == "function") {
|
|
1587
1573
|
const a = e.getAttribute("class");
|
|
1588
1574
|
a !== null && (L.class = a);
|
|
@@ -1612,14 +1598,14 @@ function it(e, n, t, r) {
|
|
|
1612
1598
|
}
|
|
1613
1599
|
} catch {
|
|
1614
1600
|
}
|
|
1615
|
-
for (const a in { ...L, ...
|
|
1616
|
-
const k = L[a], h =
|
|
1601
|
+
for (const a in { ...L, ...p }) {
|
|
1602
|
+
const k = L[a], h = p[a];
|
|
1617
1603
|
let w = k, E = h;
|
|
1618
1604
|
if (O(k) && (w = k.peek()), O(h) && (E = h.peek()), w !== E)
|
|
1619
|
-
if (
|
|
1605
|
+
if (d = !0, E == null || E === !1)
|
|
1620
1606
|
x(() => {
|
|
1621
1607
|
Z(e, a);
|
|
1622
|
-
}), re(
|
|
1608
|
+
}), re(s, a, void 0), a === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement ? x(() => {
|
|
1623
1609
|
e.value = "";
|
|
1624
1610
|
}) : e instanceof HTMLSelectElement ? x(() => {
|
|
1625
1611
|
e.value = "";
|
|
@@ -1657,12 +1643,12 @@ function it(e, n, t, r) {
|
|
|
1657
1643
|
}
|
|
1658
1644
|
if (a === "style") {
|
|
1659
1645
|
const g = F(E);
|
|
1660
|
-
g !== null &&
|
|
1646
|
+
g !== null && K(e, a, String(g)), re(s, a, E);
|
|
1661
1647
|
continue;
|
|
1662
1648
|
}
|
|
1663
1649
|
if (a === "class") {
|
|
1664
1650
|
const g = F(E);
|
|
1665
|
-
g !== null &&
|
|
1651
|
+
g !== null && K(e, a, String(g)), re(s, a, E);
|
|
1666
1652
|
continue;
|
|
1667
1653
|
}
|
|
1668
1654
|
if (a === "disabled" && Q(e)) {
|
|
@@ -1670,61 +1656,61 @@ function it(e, n, t, r) {
|
|
|
1670
1656
|
const g = de(E);
|
|
1671
1657
|
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = g);
|
|
1672
1658
|
}), de(E) ? x(() => {
|
|
1673
|
-
|
|
1659
|
+
K(e, a, "");
|
|
1674
1660
|
}) : x(() => {
|
|
1675
1661
|
Z(e, a);
|
|
1676
1662
|
});
|
|
1677
1663
|
continue;
|
|
1678
1664
|
}
|
|
1679
1665
|
const u = e.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1680
|
-
if (
|
|
1666
|
+
if (m && !u && a.includes("-"))
|
|
1681
1667
|
if (ft(a)) {
|
|
1682
1668
|
const g = F(h ?? E);
|
|
1683
1669
|
if (g !== null) {
|
|
1684
1670
|
try {
|
|
1685
|
-
|
|
1671
|
+
K(e, a, String(g));
|
|
1686
1672
|
} catch {
|
|
1687
1673
|
}
|
|
1688
|
-
re(
|
|
1674
|
+
re(s, a, E);
|
|
1689
1675
|
}
|
|
1690
1676
|
} else {
|
|
1691
|
-
const g =
|
|
1677
|
+
const g = Ge(a);
|
|
1692
1678
|
try {
|
|
1693
1679
|
const l = e;
|
|
1694
|
-
l[g] = O(h) ? h : E, re(
|
|
1680
|
+
l[g] = O(h) ? h : E, re(s, a, E);
|
|
1695
1681
|
} catch {
|
|
1696
1682
|
const l = F(h ?? E);
|
|
1697
|
-
l !== null &&
|
|
1683
|
+
l !== null && K(e, a, String(l));
|
|
1698
1684
|
}
|
|
1699
1685
|
}
|
|
1700
1686
|
else if (!u && a in e)
|
|
1701
1687
|
try {
|
|
1702
1688
|
const g = e;
|
|
1703
|
-
g[a] = O(h) ? h : E, re(
|
|
1689
|
+
g[a] = O(h) ? h : E, re(s, a, E);
|
|
1704
1690
|
} catch {
|
|
1705
1691
|
const g = F(E);
|
|
1706
|
-
g !== null && (
|
|
1692
|
+
g !== null && (K(e, a, String(g)), re(s, a, E));
|
|
1707
1693
|
}
|
|
1708
1694
|
else {
|
|
1709
1695
|
const g = F(E);
|
|
1710
|
-
g !== null && (
|
|
1696
|
+
g !== null && (K(e, a, String(g)), re(s, a, E));
|
|
1711
1697
|
}
|
|
1712
1698
|
}
|
|
1713
1699
|
}
|
|
1714
1700
|
try {
|
|
1715
1701
|
if (Q(e)) {
|
|
1716
|
-
const a =
|
|
1702
|
+
const a = i.disabled;
|
|
1717
1703
|
let k;
|
|
1718
1704
|
try {
|
|
1719
1705
|
const w = Object.prototype.hasOwnProperty.call(
|
|
1720
|
-
|
|
1706
|
+
o.props || {},
|
|
1721
1707
|
"disabled"
|
|
1722
1708
|
), E = a && typeof a == "object" && "value" in a;
|
|
1723
1709
|
let u = !1;
|
|
1724
1710
|
x(() => {
|
|
1725
1711
|
u = !!O(a);
|
|
1726
1712
|
});
|
|
1727
|
-
const g =
|
|
1713
|
+
const g = Fe(a);
|
|
1728
1714
|
u || E || w || g ? k = a : k = f.disabled;
|
|
1729
1715
|
} catch {
|
|
1730
1716
|
k = f.disabled;
|
|
@@ -1733,14 +1719,14 @@ function it(e, n, t, r) {
|
|
|
1733
1719
|
x(() => {
|
|
1734
1720
|
(e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement || e instanceof HTMLButtonElement) && (e.disabled = h);
|
|
1735
1721
|
}), h ? x(() => {
|
|
1736
|
-
|
|
1722
|
+
K(e, "disabled", "");
|
|
1737
1723
|
}) : x(() => {
|
|
1738
1724
|
Z(e, "disabled");
|
|
1739
1725
|
});
|
|
1740
1726
|
}
|
|
1741
1727
|
} catch {
|
|
1742
1728
|
}
|
|
1743
|
-
if (
|
|
1729
|
+
if (m && d) {
|
|
1744
1730
|
const a = e;
|
|
1745
1731
|
x(() => {
|
|
1746
1732
|
a._applyProps?.(a._cfg);
|
|
@@ -1749,149 +1735,149 @@ function it(e, n, t, r) {
|
|
|
1749
1735
|
});
|
|
1750
1736
|
}
|
|
1751
1737
|
}
|
|
1752
|
-
function J(e,
|
|
1738
|
+
function J(e, s, t, r = null) {
|
|
1753
1739
|
if (typeof e == "string")
|
|
1754
1740
|
return document.createTextNode(e);
|
|
1755
1741
|
if (e.tag === "#text") {
|
|
1756
|
-
const
|
|
1742
|
+
const p = document.createTextNode(
|
|
1757
1743
|
typeof e.children == "string" ? e.children : ""
|
|
1758
1744
|
);
|
|
1759
|
-
return e.key != null && G(
|
|
1745
|
+
return e.key != null && G(p, e.key), p;
|
|
1760
1746
|
}
|
|
1761
1747
|
if (e.tag === "#raw") {
|
|
1762
|
-
const
|
|
1763
|
-
return
|
|
1748
|
+
const p = typeof e.children == "string" ? e.children : "";
|
|
1749
|
+
return te(
|
|
1764
1750
|
"[#raw] Inserting unsanitized HTML. Ensure the content is trusted or sanitized before use — unsanitized input can lead to XSS vulnerabilities."
|
|
1765
|
-
), document.createRange().createContextualFragment(
|
|
1751
|
+
), document.createRange().createContextualFragment(p);
|
|
1766
1752
|
}
|
|
1767
1753
|
if (e.tag === "#anchor") {
|
|
1768
|
-
const
|
|
1769
|
-
|
|
1754
|
+
const p = e, T = Array.isArray(p.children) ? p.children : [], a = document.createTextNode(""), k = document.createTextNode("");
|
|
1755
|
+
p.key != null && (G(a, `${p.key}:start`), G(k, `${p.key}:end`)), p._startNode = a, p._endNode = k;
|
|
1770
1756
|
const h = document.createDocumentFragment();
|
|
1771
1757
|
h.appendChild(a);
|
|
1772
1758
|
for (const w of T) {
|
|
1773
1759
|
const E = J(
|
|
1774
1760
|
w,
|
|
1775
|
-
|
|
1761
|
+
s,
|
|
1776
1762
|
t,
|
|
1777
1763
|
// propagate parent namespace (was previously a boolean)
|
|
1778
1764
|
r
|
|
1779
1765
|
);
|
|
1780
|
-
if (
|
|
1766
|
+
if (p.key != null && E instanceof Element && !E.hasAttribute("data-anchor-key")) {
|
|
1781
1767
|
const u = w;
|
|
1782
|
-
u && typeof u == "object" && u.key != null || G(E, String(
|
|
1768
|
+
u && typeof u == "object" && u.key != null || G(E, String(p.key));
|
|
1783
1769
|
}
|
|
1784
1770
|
h.appendChild(E);
|
|
1785
1771
|
}
|
|
1786
1772
|
return h.appendChild(k), h;
|
|
1787
1773
|
}
|
|
1788
|
-
const
|
|
1789
|
-
e.key != null && G(
|
|
1790
|
-
|
|
1774
|
+
const n = e && typeof e == "object" && e.props && e.props.attrs ? e.props.attrs : void 0, o = (n && typeof n.xmlns == "string" ? String(n.xmlns) : void 0) ?? r ?? _t[e.tag] ?? null, i = o ? document.createElementNS(o, e.tag) : document.createElement(e.tag);
|
|
1775
|
+
e.key != null && G(i, e.key), e.props && e.props?._transitionGroup && Zt(
|
|
1776
|
+
i,
|
|
1791
1777
|
e.props?._transitionGroup
|
|
1792
1778
|
);
|
|
1793
|
-
const { props: f = {}, attrs:
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
),
|
|
1779
|
+
const { props: f = {}, attrs: b = {}, directives: y = {} } = e.props ?? {}, m = pt(
|
|
1780
|
+
y,
|
|
1781
|
+
s,
|
|
1782
|
+
i instanceof HTMLElement ? i : void 0,
|
|
1783
|
+
b
|
|
1784
|
+
), d = {
|
|
1799
1785
|
...f,
|
|
1800
|
-
...
|
|
1786
|
+
...m.props
|
|
1801
1787
|
}, C = {
|
|
1802
|
-
...
|
|
1803
|
-
...
|
|
1788
|
+
...b,
|
|
1789
|
+
...m.attrs
|
|
1804
1790
|
};
|
|
1805
1791
|
try {
|
|
1806
|
-
const
|
|
1792
|
+
const p = (C && C.class) ?? (d && d.class) ?? (e.props && e.props.attrs && e.props.attrs.class) ?? (e.props && e.props.props && e.props.props.class), T = F(p);
|
|
1807
1793
|
if (T !== null) {
|
|
1808
1794
|
const a = String(T).trim();
|
|
1809
|
-
a &&
|
|
1795
|
+
a && K(i, "class", a);
|
|
1810
1796
|
}
|
|
1811
1797
|
} catch {
|
|
1812
1798
|
}
|
|
1813
1799
|
try {
|
|
1814
|
-
if (
|
|
1815
|
-
const
|
|
1800
|
+
if (d.disabled !== void 0 && i && Q(i)) {
|
|
1801
|
+
const p = d.disabled, T = p && typeof p == "object" && "value" in p;
|
|
1816
1802
|
let a = !1;
|
|
1817
1803
|
try {
|
|
1818
|
-
a = O(
|
|
1804
|
+
a = O(p);
|
|
1819
1805
|
} catch {
|
|
1820
1806
|
a = !1;
|
|
1821
1807
|
}
|
|
1822
1808
|
!T && !a && x(() => {
|
|
1823
|
-
C.disabled =
|
|
1809
|
+
C.disabled = p, delete d.disabled;
|
|
1824
1810
|
});
|
|
1825
1811
|
}
|
|
1826
1812
|
} catch {
|
|
1827
1813
|
}
|
|
1828
|
-
const j =
|
|
1829
|
-
for (const
|
|
1830
|
-
const T = C[
|
|
1831
|
-
if (typeof
|
|
1814
|
+
const j = i.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1815
|
+
for (const p in C) {
|
|
1816
|
+
const T = C[p];
|
|
1817
|
+
if (typeof p != "string" || /\[object Object\]/.test(p))
|
|
1832
1818
|
continue;
|
|
1833
|
-
const a =
|
|
1819
|
+
const a = ze(T);
|
|
1834
1820
|
if (typeof a == "boolean")
|
|
1835
|
-
a ?
|
|
1836
|
-
Z(
|
|
1821
|
+
a ? K(i, p, "") : x(() => {
|
|
1822
|
+
Z(i, p);
|
|
1837
1823
|
});
|
|
1838
1824
|
else if (a != null) {
|
|
1839
|
-
if (
|
|
1840
|
-
const k =
|
|
1825
|
+
if (p === "disabled" && Q(i)) {
|
|
1826
|
+
const k = d.disabled, h = Fe(k) ? k : a, w = de(h);
|
|
1841
1827
|
x(() => {
|
|
1842
|
-
|
|
1828
|
+
i.disabled = w;
|
|
1843
1829
|
}), w ? x(() => {
|
|
1844
|
-
|
|
1830
|
+
K(i, p, "");
|
|
1845
1831
|
}) : x(() => {
|
|
1846
|
-
Z(
|
|
1832
|
+
Z(i, p);
|
|
1847
1833
|
});
|
|
1848
1834
|
continue;
|
|
1849
1835
|
}
|
|
1850
|
-
if (!j &&
|
|
1836
|
+
if (!j && p === "value" && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement || i instanceof HTMLProgressElement))
|
|
1851
1837
|
try {
|
|
1852
|
-
|
|
1838
|
+
i instanceof HTMLProgressElement ? i.value = Number(a) : i.value = String(a ?? "");
|
|
1853
1839
|
} catch {
|
|
1854
1840
|
const k = F(a);
|
|
1855
|
-
k !== null &&
|
|
1841
|
+
k !== null && K(i, p, String(k));
|
|
1856
1842
|
}
|
|
1857
|
-
else if (!j &&
|
|
1843
|
+
else if (!j && p === "checked" && i instanceof HTMLInputElement)
|
|
1858
1844
|
try {
|
|
1859
|
-
|
|
1845
|
+
i.checked = !!a;
|
|
1860
1846
|
} catch {
|
|
1861
1847
|
const k = F(a);
|
|
1862
|
-
k !== null &&
|
|
1848
|
+
k !== null && K(i, p, String(k));
|
|
1863
1849
|
}
|
|
1864
|
-
else if (!j &&
|
|
1850
|
+
else if (!j && p in i)
|
|
1865
1851
|
try {
|
|
1866
|
-
|
|
1852
|
+
i[p] = a, p === "disabled" && a === !1 && Q(i) && Z(i, "disabled"), re(e.props, p, a);
|
|
1867
1853
|
} catch {
|
|
1868
1854
|
const k = F(a);
|
|
1869
|
-
k !== null &&
|
|
1855
|
+
k !== null && K(i, p, String(k));
|
|
1870
1856
|
}
|
|
1871
|
-
else if ((e.props?.isCustomElement ?? !1) && !j &&
|
|
1872
|
-
const h =
|
|
1857
|
+
else if ((e.props?.isCustomElement ?? !1) && !j && p.includes("-")) {
|
|
1858
|
+
const h = Ge(p);
|
|
1873
1859
|
try {
|
|
1874
|
-
|
|
1860
|
+
i[h] = a;
|
|
1875
1861
|
} catch {
|
|
1876
1862
|
const w = F(a);
|
|
1877
|
-
w !== null &&
|
|
1863
|
+
w !== null && K(i, p, String(w));
|
|
1878
1864
|
}
|
|
1879
1865
|
} else {
|
|
1880
1866
|
const h = F(a);
|
|
1881
|
-
h !== null &&
|
|
1867
|
+
h !== null && K(i, p, String(h));
|
|
1882
1868
|
}
|
|
1883
1869
|
}
|
|
1884
1870
|
}
|
|
1885
|
-
for (const
|
|
1886
|
-
const T =
|
|
1887
|
-
if (!(typeof
|
|
1888
|
-
if (
|
|
1871
|
+
for (const p in d) {
|
|
1872
|
+
const T = d[p];
|
|
1873
|
+
if (!(typeof p != "string" || /\[object Object\]/.test(p)))
|
|
1874
|
+
if (p === "value" && (i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement || i instanceof HTMLSelectElement)) {
|
|
1889
1875
|
const a = typeof T == "object" && T !== null && Le(T) ? T.value : T;
|
|
1890
1876
|
x(() => {
|
|
1891
|
-
|
|
1877
|
+
i.value = String(a ?? "");
|
|
1892
1878
|
});
|
|
1893
|
-
} else if (
|
|
1894
|
-
const a = dt(
|
|
1879
|
+
} else if (p.startsWith("on") && typeof T == "function") {
|
|
1880
|
+
const a = dt(p), k = a.includes(":") ? (() => {
|
|
1895
1881
|
const h = a.split(":"), w = h[1];
|
|
1896
1882
|
if (w.includes("-")) {
|
|
1897
1883
|
const E = w.split("-").map(
|
|
@@ -1903,123 +1889,123 @@ function J(e, n, t, r = null) {
|
|
|
1903
1889
|
return `${h[0]}:${E}`;
|
|
1904
1890
|
}
|
|
1905
1891
|
})() : a;
|
|
1906
|
-
|
|
1892
|
+
m.listeners && (m.listeners[a] || m.listeners[k]) || Y.addListener(i, a, T);
|
|
1907
1893
|
} else {
|
|
1908
|
-
if (
|
|
1894
|
+
if (p.startsWith("on") && T === void 0)
|
|
1909
1895
|
continue;
|
|
1910
1896
|
if (T == null || T === !1)
|
|
1911
|
-
Z(
|
|
1897
|
+
Z(i, p);
|
|
1912
1898
|
else {
|
|
1913
1899
|
const a = e.props?.isCustomElement ?? !1, k = typeof T == "object" && T !== null && O(T) ? T : Le(T) && typeof T.value < "u" ? T.value : T;
|
|
1914
|
-
if (
|
|
1900
|
+
if (p === "class" || p === "style") {
|
|
1915
1901
|
try {
|
|
1916
1902
|
const h = F(k);
|
|
1917
|
-
h !== null &&
|
|
1903
|
+
h !== null && K(i, p, String(h));
|
|
1918
1904
|
} catch {
|
|
1919
1905
|
}
|
|
1920
1906
|
continue;
|
|
1921
1907
|
}
|
|
1922
|
-
if (a ||
|
|
1908
|
+
if (a || p in i)
|
|
1923
1909
|
try {
|
|
1924
1910
|
const h = typeof T == "object" && T !== null && O(T) ? T : Le(T) ? T.value : T;
|
|
1925
|
-
if (
|
|
1926
|
-
const w =
|
|
1911
|
+
if (p === "disabled" && Q(i)) {
|
|
1912
|
+
const w = d.disabled !== void 0 ? d.disabled : h, E = de(w);
|
|
1927
1913
|
x(() => {
|
|
1928
|
-
|
|
1914
|
+
i.disabled = E;
|
|
1929
1915
|
}), E ? x(() => {
|
|
1930
|
-
|
|
1916
|
+
K(i, p, "");
|
|
1931
1917
|
}) : x(() => {
|
|
1932
|
-
Z(
|
|
1918
|
+
Z(i, p);
|
|
1933
1919
|
});
|
|
1934
1920
|
continue;
|
|
1935
1921
|
}
|
|
1936
1922
|
try {
|
|
1937
|
-
if (typeof
|
|
1923
|
+
if (typeof i[p] == "boolean") {
|
|
1938
1924
|
let E = h;
|
|
1939
|
-
typeof h == "string" ? h === "false" ? E = !1 : h === "true" ? E = !0 : E = !!h && h !== "" : E = !!h,
|
|
1925
|
+
typeof h == "string" ? h === "false" ? E = !1 : h === "true" ? E = !0 : E = !!h && h !== "" : E = !!h, i[p] = E;
|
|
1940
1926
|
} else
|
|
1941
|
-
|
|
1927
|
+
i[p] = h;
|
|
1942
1928
|
} catch {
|
|
1943
|
-
|
|
1929
|
+
i[p] = h;
|
|
1944
1930
|
}
|
|
1945
1931
|
} catch {
|
|
1946
1932
|
}
|
|
1947
1933
|
}
|
|
1948
1934
|
}
|
|
1949
1935
|
}
|
|
1950
|
-
const S =
|
|
1951
|
-
for (const [
|
|
1952
|
-
Y.addListener(
|
|
1953
|
-
Object.keys(S).length > 0 && Ie.set(
|
|
1936
|
+
const S = m.listeners ?? {};
|
|
1937
|
+
for (const [p, T] of Object.entries(S))
|
|
1938
|
+
Y.addListener(i, p, T);
|
|
1939
|
+
Object.keys(S).length > 0 && Ie.set(i, S);
|
|
1954
1940
|
const L = {
|
|
1955
1941
|
...e,
|
|
1956
1942
|
props: {
|
|
1957
1943
|
...e.props,
|
|
1958
|
-
...
|
|
1944
|
+
...m.props
|
|
1959
1945
|
}
|
|
1960
1946
|
};
|
|
1961
|
-
|
|
1947
|
+
Ae(L, i, t);
|
|
1962
1948
|
try {
|
|
1963
|
-
const
|
|
1964
|
-
if (typeof
|
|
1949
|
+
const p = i;
|
|
1950
|
+
if (typeof p._applyProps == "function")
|
|
1965
1951
|
try {
|
|
1966
|
-
|
|
1952
|
+
p._applyProps(p._cfg);
|
|
1967
1953
|
} catch {
|
|
1968
1954
|
}
|
|
1969
|
-
typeof
|
|
1955
|
+
typeof p.requestRender == "function" ? p.requestRender() : typeof p._render == "function" && p._render(p._cfg);
|
|
1970
1956
|
} catch {
|
|
1971
1957
|
}
|
|
1972
1958
|
if (Array.isArray(e.children)) {
|
|
1973
|
-
const
|
|
1959
|
+
const p = e.tag === "foreignObject" && o === At ? null : i.namespaceURI ?? null;
|
|
1974
1960
|
for (const T of e.children)
|
|
1975
|
-
|
|
1976
|
-
} else typeof e.children == "string" && (
|
|
1961
|
+
i.appendChild(J(T, s, t, p));
|
|
1962
|
+
} else typeof e.children == "string" && (i.textContent = e.children);
|
|
1977
1963
|
try {
|
|
1978
|
-
if (
|
|
1964
|
+
if (i instanceof HTMLSelectElement && C && Object.prototype.hasOwnProperty.call(C, "value"))
|
|
1979
1965
|
try {
|
|
1980
|
-
|
|
1966
|
+
i.value = String(C.value ?? "");
|
|
1981
1967
|
} catch {
|
|
1982
1968
|
}
|
|
1983
1969
|
} catch {
|
|
1984
1970
|
}
|
|
1985
1971
|
try {
|
|
1986
|
-
if (Q(
|
|
1987
|
-
const
|
|
1972
|
+
if (Q(i)) {
|
|
1973
|
+
const p = d.disabled, T = C.disabled, a = p && typeof p == "object" && "value" in p;
|
|
1988
1974
|
let k = !1;
|
|
1989
1975
|
try {
|
|
1990
|
-
k = !!O(
|
|
1976
|
+
k = !!O(p);
|
|
1991
1977
|
} catch {
|
|
1992
1978
|
k = !1;
|
|
1993
1979
|
}
|
|
1994
|
-
const w = k || a ||
|
|
1980
|
+
const w = k || a || Fe(p) ? p : T, E = de(w);
|
|
1995
1981
|
x(() => {
|
|
1996
|
-
|
|
1982
|
+
i.disabled = E;
|
|
1997
1983
|
}), E ? x(() => {
|
|
1998
|
-
|
|
1984
|
+
K(i, "disabled", "");
|
|
1999
1985
|
}) : x(() => {
|
|
2000
|
-
Z(
|
|
1986
|
+
Z(i, "disabled");
|
|
2001
1987
|
});
|
|
2002
1988
|
}
|
|
2003
1989
|
} catch {
|
|
2004
1990
|
}
|
|
2005
|
-
return
|
|
1991
|
+
return i;
|
|
2006
1992
|
}
|
|
2007
|
-
function
|
|
1993
|
+
function Yt(e, s, t, r, n) {
|
|
2008
1994
|
if (typeof t == "string") {
|
|
2009
1995
|
e.textContent !== t && (e.textContent = t);
|
|
2010
1996
|
return;
|
|
2011
1997
|
}
|
|
2012
1998
|
if (!Array.isArray(t)) return;
|
|
2013
|
-
const
|
|
2014
|
-
for (let S = 0; S <
|
|
2015
|
-
|
|
2016
|
-
const
|
|
1999
|
+
const c = e.childNodes, o = [];
|
|
2000
|
+
for (let S = 0; S < c.length; S++)
|
|
2001
|
+
o.push(c[S]);
|
|
2002
|
+
const i = Array.isArray(s) ? s : [], f = Jt(e);
|
|
2017
2003
|
if (f) {
|
|
2018
2004
|
const S = (a) => {
|
|
2019
2005
|
if (typeof a == "string")
|
|
2020
2006
|
return a.startsWith("each-") ? a.substring(5) : a;
|
|
2021
2007
|
if (typeof a == "number") return String(a);
|
|
2022
|
-
}, L = [],
|
|
2008
|
+
}, L = [], p = [];
|
|
2023
2009
|
for (const a of t)
|
|
2024
2010
|
if (a && a.tag === "#anchor") {
|
|
2025
2011
|
const k = Array.isArray(a.children) ? a.children : [];
|
|
@@ -2030,38 +2016,38 @@ function Xt(e, n, t, r, s) {
|
|
|
2030
2016
|
L.push({ ...h, key: w });
|
|
2031
2017
|
}
|
|
2032
2018
|
} else a && L.push({ ...a, key: S(a.key) });
|
|
2033
|
-
for (const a of
|
|
2019
|
+
for (const a of i)
|
|
2034
2020
|
if (a && a.tag === "#anchor") {
|
|
2035
2021
|
const k = Array.isArray(a.children) ? a.children : [];
|
|
2036
2022
|
for (const h of k) {
|
|
2037
2023
|
const w = S(
|
|
2038
2024
|
h.key ?? a.key ?? "unknown"
|
|
2039
2025
|
);
|
|
2040
|
-
|
|
2026
|
+
p.push({ ...h, key: w });
|
|
2041
2027
|
}
|
|
2042
|
-
} else a &&
|
|
2028
|
+
} else a && p.push({
|
|
2043
2029
|
...a,
|
|
2044
2030
|
key: S(a.key)
|
|
2045
2031
|
});
|
|
2046
|
-
if (L.some((a) => a && a.key != null) ||
|
|
2032
|
+
if (L.some((a) => a && a.key != null) || p.some((a) => a && a.key != null)) {
|
|
2047
2033
|
const a = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map();
|
|
2048
|
-
for (const l of
|
|
2034
|
+
for (const l of p)
|
|
2049
2035
|
if (l && l.key != null) {
|
|
2050
2036
|
const v = String(l.key);
|
|
2051
2037
|
a.set(v, l);
|
|
2052
2038
|
}
|
|
2053
|
-
for (let l = 0; l <
|
|
2054
|
-
const v =
|
|
2039
|
+
for (let l = 0; l < o.length; l++) {
|
|
2040
|
+
const v = o[l];
|
|
2055
2041
|
let _ = xe(v);
|
|
2056
2042
|
if (_ = S(_), _ != null && v instanceof Element && v.nodeType === Node.ELEMENT_NODE) {
|
|
2057
2043
|
let A = typeof _ == "string" && _.includes(":") ? _.substring(0, _.lastIndexOf(":")) : _;
|
|
2058
2044
|
A = String(A), k.set(A, v);
|
|
2059
2045
|
}
|
|
2060
2046
|
}
|
|
2061
|
-
const h = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Map(), E =
|
|
2047
|
+
const h = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Map(), E = o.length > 0;
|
|
2062
2048
|
if (f.moveClass && E)
|
|
2063
|
-
for (let l = 0; l <
|
|
2064
|
-
const v =
|
|
2049
|
+
for (let l = 0; l < o.length; l++) {
|
|
2050
|
+
const v = o[l];
|
|
2065
2051
|
if (v instanceof HTMLElement && v.parentElement) {
|
|
2066
2052
|
const _ = v.getBoundingClientRect();
|
|
2067
2053
|
w.set(v, _);
|
|
@@ -2075,7 +2061,7 @@ function Xt(e, n, t, r, s) {
|
|
|
2075
2061
|
const _ = a.get(v);
|
|
2076
2062
|
let A = k.get(v);
|
|
2077
2063
|
if (A && _) {
|
|
2078
|
-
const N =
|
|
2064
|
+
const N = Te(A, _, l, r);
|
|
2079
2065
|
h.add(A);
|
|
2080
2066
|
const $ = String(v);
|
|
2081
2067
|
G(N, $), u.push({
|
|
@@ -2093,16 +2079,16 @@ function Xt(e, n, t, r, s) {
|
|
|
2093
2079
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2094
2080
|
), G(A, String(v)), e.appendChild(A);
|
|
2095
2081
|
const N = E || f.appear === !0;
|
|
2096
|
-
A instanceof HTMLElement && N &&
|
|
2082
|
+
A instanceof HTMLElement && N && _e(A, f).catch(($) => {
|
|
2097
2083
|
W("Enter transition error:", $);
|
|
2098
2084
|
}), u.push({ node: A, key: v, newVNode: l, isNew: !0 });
|
|
2099
2085
|
}
|
|
2100
2086
|
}
|
|
2101
2087
|
const g = [];
|
|
2102
|
-
for (let l = 0; l <
|
|
2103
|
-
const v =
|
|
2088
|
+
for (let l = 0; l < o.length; l++) {
|
|
2089
|
+
const v = o[l], _ = xe(v);
|
|
2104
2090
|
if (!h.has(v) && _ != null && v instanceof HTMLElement) {
|
|
2105
|
-
const N =
|
|
2091
|
+
const N = Ke(v, f).then(() => {
|
|
2106
2092
|
e.contains(v) && e.removeChild(v);
|
|
2107
2093
|
}).catch(($) => {
|
|
2108
2094
|
W("Leave transition error:", $), e.contains(v) && e.removeChild(v);
|
|
@@ -2145,8 +2131,8 @@ function Xt(e, n, t, r, s) {
|
|
|
2145
2131
|
for (const { node: M, moveClasses: D } of v) {
|
|
2146
2132
|
M.style.removeProperty("transform");
|
|
2147
2133
|
const R = () => {
|
|
2148
|
-
for (const
|
|
2149
|
-
M.classList.remove(
|
|
2134
|
+
for (const ee of D)
|
|
2135
|
+
M.classList.remove(ee);
|
|
2150
2136
|
M.style.removeProperty("transition"), M.removeEventListener("transitionend", R), M.removeEventListener("transitioncancel", R);
|
|
2151
2137
|
};
|
|
2152
2138
|
M.addEventListener("transitionend", R, {
|
|
@@ -2165,27 +2151,27 @@ function Xt(e, n, t, r, s) {
|
|
|
2165
2151
|
return;
|
|
2166
2152
|
}
|
|
2167
2153
|
}
|
|
2168
|
-
const m = /* @__PURE__ */ new Map();
|
|
2169
|
-
for (const S of c)
|
|
2170
|
-
S && S.key != null && m.set(S.key, S);
|
|
2171
2154
|
const b = /* @__PURE__ */ new Map();
|
|
2172
|
-
for (
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2155
|
+
for (const S of i)
|
|
2156
|
+
S && S.key != null && b.set(S.key, S);
|
|
2157
|
+
const y = /* @__PURE__ */ new Map();
|
|
2158
|
+
for (let S = 0; S < o.length; S++) {
|
|
2159
|
+
const L = o[S], p = xe(L);
|
|
2160
|
+
p != null && y.set(p, L);
|
|
2161
|
+
}
|
|
2162
|
+
const m = /* @__PURE__ */ new Set();
|
|
2163
|
+
let d = e.firstChild;
|
|
2178
2164
|
function C(S, L) {
|
|
2179
|
-
let
|
|
2180
|
-
for (;
|
|
2181
|
-
|
|
2165
|
+
let p = S;
|
|
2166
|
+
for (; p && (m.add(p), p !== L); )
|
|
2167
|
+
p = p.nextSibling;
|
|
2182
2168
|
}
|
|
2183
|
-
function j(S, L,
|
|
2169
|
+
function j(S, L, p, T, a, k = !0) {
|
|
2184
2170
|
const h = [];
|
|
2185
2171
|
let w = S.nextSibling;
|
|
2186
2172
|
for (; w && w !== L; )
|
|
2187
2173
|
h.push(w), w = w.nextSibling;
|
|
2188
|
-
const E = Array.isArray(
|
|
2174
|
+
const E = Array.isArray(p) ? p : [];
|
|
2189
2175
|
if (T.some((g) => g && g.key != null) || E.some((g) => g && g.key != null)) {
|
|
2190
2176
|
const g = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
|
|
2191
2177
|
for (const N of E)
|
|
@@ -2198,10 +2184,10 @@ function Xt(e, n, t, r, s) {
|
|
|
2198
2184
|
let A = S.nextSibling;
|
|
2199
2185
|
for (const N of T) {
|
|
2200
2186
|
if (typeof N == "object" && N.tag === "#anchor") {
|
|
2201
|
-
const H = N.key, M = `${H}:start`, D = `${H}:end`, R = l.get(M),
|
|
2187
|
+
const H = N.key, M = `${H}:start`, D = `${H}:end`, R = l.get(M), ee = l.get(D), q = Array.isArray(N.children) ? N.children : [], I = g.get(H);
|
|
2202
2188
|
let P, B;
|
|
2203
|
-
if (R &&
|
|
2204
|
-
P = R, B =
|
|
2189
|
+
if (R && ee && e.contains(R))
|
|
2190
|
+
P = R, B = ee, j(
|
|
2205
2191
|
P,
|
|
2206
2192
|
B,
|
|
2207
2193
|
I?.children,
|
|
@@ -2220,21 +2206,21 @@ function Xt(e, n, t, r, s) {
|
|
|
2220
2206
|
}
|
|
2221
2207
|
e.insertBefore(B, A);
|
|
2222
2208
|
}
|
|
2223
|
-
let
|
|
2224
|
-
for (;
|
|
2225
|
-
|
|
2209
|
+
let U = P;
|
|
2210
|
+
for (; U && (_.add(U), U !== B); )
|
|
2211
|
+
U = U.nextSibling;
|
|
2226
2212
|
N._startNode = P, N._endNode = B, A = B.nextSibling;
|
|
2227
2213
|
continue;
|
|
2228
2214
|
}
|
|
2229
2215
|
let $;
|
|
2230
2216
|
if (N.key != null && l.has(N.key)) {
|
|
2231
2217
|
const H = g.get(N.key);
|
|
2232
|
-
$ =
|
|
2218
|
+
$ = Te(
|
|
2233
2219
|
l.get(N.key),
|
|
2234
2220
|
H,
|
|
2235
2221
|
N,
|
|
2236
2222
|
r
|
|
2237
|
-
), _.add($), a && $ instanceof HTMLElement && v && a.appear &&
|
|
2223
|
+
), _.add($), a && $ instanceof HTMLElement && v && a.appear && _e($, a).catch((M) => {
|
|
2238
2224
|
W("Transition enter error (appear):", M);
|
|
2239
2225
|
}), $ !== A && e.contains($) && e.insertBefore($, A);
|
|
2240
2226
|
} else
|
|
@@ -2243,13 +2229,13 @@ function Xt(e, n, t, r, s) {
|
|
|
2243
2229
|
r,
|
|
2244
2230
|
void 0,
|
|
2245
2231
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2246
|
-
), e.insertBefore($, A), _.add($), a && $ instanceof HTMLElement && k &&
|
|
2232
|
+
), e.insertBefore($, A), _.add($), a && $ instanceof HTMLElement && k && _e($, a).catch((H) => {
|
|
2247
2233
|
W("Transition enter error:", H);
|
|
2248
2234
|
});
|
|
2249
2235
|
A = $.nextSibling;
|
|
2250
2236
|
}
|
|
2251
2237
|
for (const N of h)
|
|
2252
|
-
!_.has(N) && e.contains(N) && (a && N instanceof HTMLElement && k ?
|
|
2238
|
+
!_.has(N) && e.contains(N) && (a && N instanceof HTMLElement && k ? Ke(N, a).then(() => {
|
|
2253
2239
|
e.contains(N) && e.removeChild(N);
|
|
2254
2240
|
}).catch(($) => {
|
|
2255
2241
|
W("Transition leave error:", $), e.contains(N) && e.removeChild(N);
|
|
@@ -2260,7 +2246,7 @@ function Xt(e, n, t, r, s) {
|
|
|
2260
2246
|
T.length
|
|
2261
2247
|
);
|
|
2262
2248
|
for (let l = 0; l < g; l++) {
|
|
2263
|
-
const v = E[l], _ = T[l], A =
|
|
2249
|
+
const v = E[l], _ = T[l], A = Te(h[l], v, _, r);
|
|
2264
2250
|
A !== h[l] && (e.insertBefore(A, h[l]), e.removeChild(h[l]));
|
|
2265
2251
|
}
|
|
2266
2252
|
for (let l = g; l < T.length; l++) {
|
|
@@ -2270,13 +2256,13 @@ function Xt(e, n, t, r, s) {
|
|
|
2270
2256
|
void 0,
|
|
2271
2257
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2272
2258
|
);
|
|
2273
|
-
e.insertBefore(v, L), a && v instanceof HTMLElement && k &&
|
|
2259
|
+
e.insertBefore(v, L), a && v instanceof HTMLElement && k && _e(v, a).catch((_) => {
|
|
2274
2260
|
W("Transition enter error:", _);
|
|
2275
2261
|
});
|
|
2276
2262
|
}
|
|
2277
2263
|
for (let l = g; l < h.length; l++) {
|
|
2278
2264
|
const v = h[l];
|
|
2279
|
-
a && v instanceof HTMLElement && k ?
|
|
2265
|
+
a && v instanceof HTMLElement && k ? Ke(v, a).then(() => {
|
|
2280
2266
|
e.contains(v) && e.removeChild(v);
|
|
2281
2267
|
}).catch((_) => {
|
|
2282
2268
|
W("Transition leave error:", _), e.contains(v) && e.removeChild(v);
|
|
@@ -2287,249 +2273,249 @@ function Xt(e, n, t, r, s) {
|
|
|
2287
2273
|
for (const S of t) {
|
|
2288
2274
|
let L;
|
|
2289
2275
|
if (S.tag === "#anchor") {
|
|
2290
|
-
const
|
|
2291
|
-
let k =
|
|
2276
|
+
const p = S.key, T = `${p}:start`, a = `${p}:end`;
|
|
2277
|
+
let k = y.get(T), h = y.get(a);
|
|
2292
2278
|
const w = Array.isArray(S.children) ? S.children : [];
|
|
2293
2279
|
if (k || (k = document.createTextNode(""), G(k, T)), h || (h = document.createTextNode(""), G(h, a)), S._startNode = k, S._endNode = h, !e.contains(k) || !e.contains(h)) {
|
|
2294
|
-
e.insertBefore(k,
|
|
2280
|
+
e.insertBefore(k, d);
|
|
2295
2281
|
const E = S._transition, g = !(E && E.state === "visible" && w.length > 0) || E.appear;
|
|
2296
2282
|
for (const l of w) {
|
|
2297
2283
|
const v = J(
|
|
2298
2284
|
l,
|
|
2299
2285
|
r,
|
|
2300
|
-
|
|
2286
|
+
n,
|
|
2301
2287
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2302
2288
|
);
|
|
2303
|
-
e.insertBefore(v,
|
|
2289
|
+
e.insertBefore(v, d), E && v instanceof HTMLElement && g && _e(v, E).catch((_) => {
|
|
2304
2290
|
W("Transition enter error:", _);
|
|
2305
2291
|
});
|
|
2306
2292
|
}
|
|
2307
|
-
e.insertBefore(h,
|
|
2293
|
+
e.insertBefore(h, d);
|
|
2308
2294
|
} else {
|
|
2309
|
-
const E = S._transition, g =
|
|
2295
|
+
const E = S._transition, g = b.get(p)._transition, l = g && g.state !== E?.state, v = E && E.state === "visible" && w.length > 0 && !l, _ = l || !v || E?.appear === !0;
|
|
2310
2296
|
j(
|
|
2311
2297
|
k,
|
|
2312
2298
|
h,
|
|
2313
|
-
|
|
2299
|
+
b.get(p)?.children,
|
|
2314
2300
|
w,
|
|
2315
2301
|
E,
|
|
2316
2302
|
_
|
|
2317
2303
|
);
|
|
2318
2304
|
}
|
|
2319
|
-
C(k, h),
|
|
2305
|
+
C(k, h), d = h.nextSibling;
|
|
2320
2306
|
continue;
|
|
2321
2307
|
}
|
|
2322
|
-
if (S.key != null &&
|
|
2323
|
-
const
|
|
2324
|
-
L =
|
|
2325
|
-
|
|
2326
|
-
|
|
2308
|
+
if (S.key != null && y.has(S.key)) {
|
|
2309
|
+
const p = b.get(S.key);
|
|
2310
|
+
L = Te(
|
|
2311
|
+
y.get(S.key),
|
|
2312
|
+
p,
|
|
2327
2313
|
S,
|
|
2328
2314
|
r,
|
|
2329
|
-
|
|
2330
|
-
),
|
|
2315
|
+
n
|
|
2316
|
+
), m.add(L), L !== d && e.contains(L) && (d && !e.contains(d) && (d = null), e.insertBefore(L, d));
|
|
2331
2317
|
} else
|
|
2332
2318
|
L = J(
|
|
2333
2319
|
S,
|
|
2334
2320
|
r,
|
|
2335
|
-
|
|
2321
|
+
n,
|
|
2336
2322
|
e instanceof Element ? e.namespaceURI ?? null : null
|
|
2337
|
-
),
|
|
2338
|
-
|
|
2323
|
+
), d && !e.contains(d) && (d = null), e.insertBefore(L, d), m.add(L);
|
|
2324
|
+
d = L.nextSibling;
|
|
2339
2325
|
}
|
|
2340
|
-
for (let S = 0; S <
|
|
2341
|
-
const L =
|
|
2342
|
-
!
|
|
2326
|
+
for (let S = 0; S < o.length; S++) {
|
|
2327
|
+
const L = o[S];
|
|
2328
|
+
!m.has(L) && e.contains(L) && (ue(L, n), e.removeChild(L));
|
|
2343
2329
|
}
|
|
2344
2330
|
}
|
|
2345
|
-
function
|
|
2346
|
-
if (
|
|
2331
|
+
function Te(e, s, t, r, n) {
|
|
2332
|
+
if (s && typeof s != "string" && s.props?.ref && n && ue(e, n), s === t) return e;
|
|
2347
2333
|
if (typeof t == "string") {
|
|
2348
2334
|
if (e.nodeType === Node.TEXT_NODE)
|
|
2349
2335
|
return e.textContent !== t && (e.textContent = t), e;
|
|
2350
2336
|
{
|
|
2351
|
-
const
|
|
2352
|
-
return e.parentNode?.replaceChild(
|
|
2337
|
+
const o = document.createTextNode(t);
|
|
2338
|
+
return e.parentNode?.replaceChild(o, e), o;
|
|
2353
2339
|
}
|
|
2354
2340
|
}
|
|
2355
2341
|
if (t && typeof t != "string" && t.tag === "#anchor") {
|
|
2356
|
-
const
|
|
2357
|
-
|
|
2358
|
-
const
|
|
2359
|
-
|
|
2360
|
-
for (const
|
|
2361
|
-
const
|
|
2362
|
-
|
|
2342
|
+
const o = t, i = Array.isArray(o.children) ? o.children : [], f = o._startNode ?? document.createTextNode(""), b = o._endNode ?? document.createTextNode("");
|
|
2343
|
+
o.key != null && (G(f, `${o.key}:start`), G(b, `${o.key}:end`)), o._startNode = f, o._endNode = b;
|
|
2344
|
+
const y = document.createDocumentFragment();
|
|
2345
|
+
y.appendChild(f);
|
|
2346
|
+
for (const m of i) {
|
|
2347
|
+
const d = J(
|
|
2348
|
+
m,
|
|
2363
2349
|
r,
|
|
2364
|
-
|
|
2350
|
+
n,
|
|
2365
2351
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
2366
2352
|
);
|
|
2367
|
-
|
|
2353
|
+
y.appendChild(d);
|
|
2368
2354
|
}
|
|
2369
|
-
return
|
|
2355
|
+
return y.appendChild(b), e.parentNode?.replaceChild(y, e), f;
|
|
2370
2356
|
}
|
|
2371
2357
|
if (!t) {
|
|
2372
|
-
ue(e,
|
|
2373
|
-
const
|
|
2374
|
-
return e.parentNode?.replaceChild(
|
|
2358
|
+
ue(e, n);
|
|
2359
|
+
const o = document.createComment("removed");
|
|
2360
|
+
return e.parentNode?.replaceChild(o, e), o;
|
|
2375
2361
|
}
|
|
2376
|
-
if (!
|
|
2377
|
-
ue(e,
|
|
2378
|
-
const
|
|
2362
|
+
if (!s || typeof s == "string") {
|
|
2363
|
+
ue(e, n);
|
|
2364
|
+
const o = J(
|
|
2379
2365
|
t,
|
|
2380
2366
|
r,
|
|
2381
|
-
|
|
2367
|
+
n,
|
|
2382
2368
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
2383
2369
|
);
|
|
2384
|
-
return
|
|
2370
|
+
return Ae(t, o, n), e.parentNode?.replaceChild(o, e), o;
|
|
2385
2371
|
}
|
|
2386
2372
|
if (t.tag === "#anchor") {
|
|
2387
|
-
const
|
|
2388
|
-
t.key != null && (G(
|
|
2389
|
-
const
|
|
2390
|
-
|
|
2391
|
-
for (const
|
|
2392
|
-
|
|
2373
|
+
const o = Array.isArray(t.children) ? t.children : [], i = t._startNode ?? document.createTextNode(""), f = t._endNode ?? document.createTextNode("");
|
|
2374
|
+
t.key != null && (G(i, `${t.key}:start`), G(f, `${t.key}:end`)), t._startNode = i, t._endNode = f;
|
|
2375
|
+
const b = document.createDocumentFragment();
|
|
2376
|
+
b.appendChild(i);
|
|
2377
|
+
for (const y of o)
|
|
2378
|
+
b.appendChild(
|
|
2393
2379
|
J(
|
|
2394
|
-
|
|
2380
|
+
y,
|
|
2395
2381
|
r,
|
|
2396
|
-
|
|
2382
|
+
n,
|
|
2397
2383
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
2398
2384
|
)
|
|
2399
2385
|
);
|
|
2400
|
-
return
|
|
2386
|
+
return b.appendChild(f), e.parentNode?.replaceChild(b, e), i;
|
|
2401
2387
|
}
|
|
2402
|
-
if (typeof
|
|
2403
|
-
const
|
|
2404
|
-
return it(
|
|
2388
|
+
if (typeof s != "string" && typeof t != "string" && s.tag === t.tag && s.key === t.key) {
|
|
2389
|
+
const o = e;
|
|
2390
|
+
return it(o, s.props || {}, t.props || {}, r), Yt(o, s.children, t.children, r, n), Ae(t, o, n), o;
|
|
2405
2391
|
}
|
|
2406
|
-
if (typeof
|
|
2392
|
+
if (typeof s != "string" && typeof t != "string" && s.tag === t.tag && (s.tag && String(s.tag).includes("-") || t.props && t.props.isCustomElement || s.props && s.props.isCustomElement))
|
|
2407
2393
|
try {
|
|
2408
|
-
const
|
|
2409
|
-
return it(
|
|
2394
|
+
const i = e;
|
|
2395
|
+
return it(i, s.props || {}, t.props || {}, r), Ae(t, i, n), i;
|
|
2410
2396
|
} catch {
|
|
2411
2397
|
}
|
|
2412
|
-
ue(e,
|
|
2413
|
-
const
|
|
2398
|
+
ue(e, n);
|
|
2399
|
+
const c = J(
|
|
2414
2400
|
t,
|
|
2415
2401
|
r,
|
|
2416
|
-
|
|
2402
|
+
n,
|
|
2417
2403
|
e.parentNode instanceof Element ? e.parentNode.namespaceURI ?? null : null
|
|
2418
2404
|
);
|
|
2419
|
-
return
|
|
2405
|
+
return Ae(t, c, n), e.parentNode?.replaceChild(c, e), c;
|
|
2420
2406
|
}
|
|
2421
|
-
function
|
|
2422
|
-
let
|
|
2423
|
-
Array.isArray(
|
|
2407
|
+
function Xt(e, s, t, r) {
|
|
2408
|
+
let n;
|
|
2409
|
+
Array.isArray(s) ? s.length === 1 ? (n = s[0], n && typeof n == "object" && n.key == null && (n = { ...n, key: "__root__" })) : n = { tag: "div", key: "__root__", children: s } : (n = s, n && typeof n == "object" && n.key == null && (n = { ...n, key: "__root__" })), n && typeof n == "object" && n.tag === "#anchor" && (n = {
|
|
2424
2410
|
tag: "div",
|
|
2425
2411
|
key: "__anchor_root__",
|
|
2426
2412
|
props: {
|
|
2427
2413
|
attrs: { "data-anchor-block-root": "", key: "__anchor_root__" }
|
|
2428
2414
|
},
|
|
2429
|
-
children: [
|
|
2430
|
-
}),
|
|
2431
|
-
const
|
|
2432
|
-
let
|
|
2433
|
-
|
|
2434
|
-
|
|
2415
|
+
children: [n]
|
|
2416
|
+
}), n = qe(n, String(n.key ?? "root"));
|
|
2417
|
+
const c = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
|
|
2418
|
+
let i;
|
|
2419
|
+
c && o ? typeof c != "string" && typeof n != "string" && c.tag === n.tag && c.key === n.key ? i = Te(o, c, n, t, r) : (i = J(
|
|
2420
|
+
n,
|
|
2435
2421
|
t,
|
|
2436
2422
|
r,
|
|
2437
2423
|
e.host instanceof Element ? e.host.namespaceURI ?? null : null
|
|
2438
|
-
), e.replaceChild(
|
|
2439
|
-
|
|
2424
|
+
), e.replaceChild(i, o)) : (i = J(
|
|
2425
|
+
n,
|
|
2440
2426
|
t,
|
|
2441
2427
|
r,
|
|
2442
2428
|
e.host instanceof Element ? e.host.namespaceURI ?? null : null
|
|
2443
|
-
), e.firstChild ? e.replaceChild(
|
|
2429
|
+
), e.firstChild ? e.replaceChild(i, e.firstChild) : e.appendChild(i));
|
|
2444
2430
|
const f = [];
|
|
2445
|
-
for (let
|
|
2446
|
-
const
|
|
2447
|
-
|
|
2431
|
+
for (let y = 0; y < e.childNodes.length; y++) {
|
|
2432
|
+
const m = e.childNodes[y];
|
|
2433
|
+
m !== i && m.nodeName !== "STYLE" && (ue(m, r), f.push(m));
|
|
2448
2434
|
}
|
|
2449
|
-
f.forEach((
|
|
2450
|
-
const
|
|
2451
|
-
...
|
|
2435
|
+
f.forEach((y) => e.removeChild(y));
|
|
2436
|
+
const b = n && typeof n == "object" && n.props ? {
|
|
2437
|
+
...n,
|
|
2452
2438
|
props: {
|
|
2453
|
-
...
|
|
2454
|
-
attrs:
|
|
2455
|
-
props:
|
|
2439
|
+
...n.props,
|
|
2440
|
+
attrs: n.props.attrs ? { ...n.props.attrs } : void 0,
|
|
2441
|
+
props: n.props.props ? { ...n.props.props } : void 0
|
|
2456
2442
|
}
|
|
2457
|
-
} :
|
|
2458
|
-
e._prevVNode =
|
|
2443
|
+
} : n;
|
|
2444
|
+
e._prevVNode = b, e._prevDom = i;
|
|
2459
2445
|
}
|
|
2460
|
-
const Ne = [], ot = /* @__PURE__ */ new WeakMap(),
|
|
2461
|
-
function
|
|
2462
|
-
|
|
2446
|
+
const Ne = [], ot = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap();
|
|
2447
|
+
function Qt(e, s) {
|
|
2448
|
+
be.has(e) || be.set(e, /* @__PURE__ */ new Set()), be.get(e).add(s);
|
|
2463
2449
|
}
|
|
2464
|
-
function
|
|
2465
|
-
const t =
|
|
2466
|
-
t && (t.delete(
|
|
2450
|
+
function en(e, s) {
|
|
2451
|
+
const t = be.get(e);
|
|
2452
|
+
t && (t.delete(s), t.size === 0 && be.delete(e));
|
|
2467
2453
|
}
|
|
2468
|
-
function
|
|
2454
|
+
function tn(e, s, t, r, n, c, o, i) {
|
|
2469
2455
|
if (e) {
|
|
2470
2456
|
Ne.push(t);
|
|
2471
2457
|
try {
|
|
2472
|
-
const f =
|
|
2458
|
+
const f = s.render(t);
|
|
2473
2459
|
if (f instanceof Promise) {
|
|
2474
|
-
|
|
2475
|
-
const
|
|
2476
|
-
f.then((
|
|
2477
|
-
|
|
2478
|
-
}).catch((
|
|
2479
|
-
|
|
2460
|
+
c(!0);
|
|
2461
|
+
const b = e.host.isConnected, y = e, m = y._asyncRenderToken = (y._asyncRenderToken ?? 0) + 1;
|
|
2462
|
+
f.then((d) => {
|
|
2463
|
+
b && !e.host.isConnected || y._asyncRenderToken === m && (c(!1), o(null), ct(e, d, t, r, n), i(e.innerHTML));
|
|
2464
|
+
}).catch((d) => {
|
|
2465
|
+
b && !e.host.isConnected || y._asyncRenderToken === m && (c(!1), o(d instanceof Error ? d : new Error(String(d))));
|
|
2480
2466
|
});
|
|
2481
2467
|
return;
|
|
2482
2468
|
}
|
|
2483
|
-
ct(e, f, t, r,
|
|
2469
|
+
ct(e, f, t, r, n), i(e.innerHTML);
|
|
2484
2470
|
} catch (f) {
|
|
2485
|
-
|
|
2471
|
+
o(f instanceof Error ? f : new Error(String(f)));
|
|
2486
2472
|
} finally {
|
|
2487
2473
|
Ne.pop();
|
|
2488
2474
|
}
|
|
2489
2475
|
}
|
|
2490
2476
|
}
|
|
2491
|
-
function ct(e,
|
|
2477
|
+
function ct(e, s, t, r, n) {
|
|
2492
2478
|
if (e)
|
|
2493
2479
|
try {
|
|
2494
|
-
|
|
2480
|
+
Xt(
|
|
2495
2481
|
e,
|
|
2496
|
-
Array.isArray(
|
|
2482
|
+
Array.isArray(s) ? s : [s],
|
|
2497
2483
|
t,
|
|
2498
2484
|
r
|
|
2499
|
-
),
|
|
2500
|
-
} catch (
|
|
2501
|
-
throw W("Error during VDOM rendering:",
|
|
2485
|
+
), n(e.innerHTML);
|
|
2486
|
+
} catch (c) {
|
|
2487
|
+
throw W("Error during VDOM rendering:", c), c;
|
|
2502
2488
|
}
|
|
2503
2489
|
}
|
|
2504
|
-
function
|
|
2505
|
-
|
|
2506
|
-
const
|
|
2490
|
+
function nn(e, s, t, r, n, c, o) {
|
|
2491
|
+
c !== null && clearTimeout(c);
|
|
2492
|
+
const b = Date.now() - s < 16, y = (() => {
|
|
2507
2493
|
try {
|
|
2508
2494
|
return typeof window < "u" && !!window.Cypress;
|
|
2509
2495
|
} catch {
|
|
2510
2496
|
return !1;
|
|
2511
2497
|
}
|
|
2512
|
-
})(),
|
|
2498
|
+
})(), m = (() => {
|
|
2513
2499
|
try {
|
|
2514
|
-
return globalThis.process?.env?.NODE_ENV === "test" && !
|
|
2500
|
+
return globalThis.process?.env?.NODE_ENV === "test" && !y;
|
|
2515
2501
|
} catch {
|
|
2516
2502
|
return !1;
|
|
2517
2503
|
}
|
|
2518
|
-
})(),
|
|
2519
|
-
if (
|
|
2504
|
+
})(), d = m || y;
|
|
2505
|
+
if (b) {
|
|
2520
2506
|
const S = t + 1;
|
|
2521
|
-
|
|
2522
|
-
const L =
|
|
2523
|
-
if (S === L && !
|
|
2524
|
-
|
|
2507
|
+
n(S);
|
|
2508
|
+
const L = d ? 50 : 10, p = d ? 100 : 25, T = m ? 12 : 50;
|
|
2509
|
+
if (S === L && !d)
|
|
2510
|
+
te(
|
|
2525
2511
|
`⚠️ Component rendering frequently. Performance may be impacted.
|
|
2526
2512
|
Common causes:
|
|
2527
2513
|
• State updates during render cycle
|
|
2528
2514
|
• Event handlers with immediate function calls
|
|
2529
2515
|
• Missing effect dependencies`
|
|
2530
2516
|
);
|
|
2531
|
-
else if (S ===
|
|
2532
|
-
|
|
2517
|
+
else if (S === p && !d)
|
|
2518
|
+
te(
|
|
2533
2519
|
`⚠️ Component is re-rendering rapidly. Applying throttling.
|
|
2534
2520
|
This might indicate:
|
|
2535
2521
|
• Event handler calling function immediately: @click="\${fn()}" should be @click="\${fn}"
|
|
@@ -2543,13 +2529,13 @@ Possible causes:
|
|
|
2543
2529
|
• State updates triggering immediate re-renders
|
|
2544
2530
|
• Computed values changing during evaluation
|
|
2545
2531
|
• Circular dependencies in reactive system`
|
|
2546
|
-
),
|
|
2532
|
+
), o(null);
|
|
2547
2533
|
return;
|
|
2548
2534
|
}
|
|
2549
2535
|
} else
|
|
2550
|
-
|
|
2536
|
+
n(0);
|
|
2551
2537
|
let C = 0;
|
|
2552
|
-
|
|
2538
|
+
d || (t >= 40 ? C = 500 : t >= 25 ? C = 100 : t >= 15 && (C = 16));
|
|
2553
2539
|
const j = () => {
|
|
2554
2540
|
r(Date.now());
|
|
2555
2541
|
try {
|
|
@@ -2557,33 +2543,33 @@ Possible causes:
|
|
|
2557
2543
|
} catch (S) {
|
|
2558
2544
|
W("Error during render execution:", S);
|
|
2559
2545
|
} finally {
|
|
2560
|
-
|
|
2546
|
+
o(null);
|
|
2561
2547
|
}
|
|
2562
2548
|
};
|
|
2563
2549
|
if (C > 0) {
|
|
2564
2550
|
const S = setTimeout(j, C);
|
|
2565
|
-
|
|
2566
|
-
} else
|
|
2551
|
+
o(S);
|
|
2552
|
+
} else d ? j() : (o({}), queueMicrotask(j));
|
|
2567
2553
|
}
|
|
2568
|
-
function
|
|
2569
|
-
let t =
|
|
2554
|
+
function sn(e, s) {
|
|
2555
|
+
let t = s;
|
|
2570
2556
|
try {
|
|
2571
|
-
const r =
|
|
2557
|
+
const r = be.get(e);
|
|
2572
2558
|
if (r?.size)
|
|
2573
|
-
for (const
|
|
2559
|
+
for (const n of r)
|
|
2574
2560
|
try {
|
|
2575
|
-
const
|
|
2576
|
-
|
|
2577
|
-
` +
|
|
2561
|
+
const c = n.lastHtmlStringForJitCSS;
|
|
2562
|
+
c?.trim() && (t += `
|
|
2563
|
+
` + c);
|
|
2578
2564
|
} catch {
|
|
2579
2565
|
}
|
|
2580
2566
|
else {
|
|
2581
|
-
const
|
|
2582
|
-
for (const
|
|
2567
|
+
const n = e.querySelectorAll("*");
|
|
2568
|
+
for (const c of n)
|
|
2583
2569
|
try {
|
|
2584
|
-
const
|
|
2585
|
-
|
|
2586
|
-
` +
|
|
2570
|
+
const o = c.lastHtmlStringForJitCSS;
|
|
2571
|
+
o?.trim() && (t += `
|
|
2572
|
+
` + o);
|
|
2587
2573
|
} catch {
|
|
2588
2574
|
}
|
|
2589
2575
|
}
|
|
@@ -2594,31 +2580,31 @@ function rn(e, n) {
|
|
|
2594
2580
|
function at(e) {
|
|
2595
2581
|
return "adoptedStyleSheets" in e && typeof CSSStyleSheet < "u" && "replaceSync" in CSSStyleSheet.prototype;
|
|
2596
2582
|
}
|
|
2597
|
-
function lt(e,
|
|
2583
|
+
function lt(e, s) {
|
|
2598
2584
|
let t = e.querySelector(
|
|
2599
2585
|
"style[data-cer-runtime]"
|
|
2600
2586
|
);
|
|
2601
|
-
t || (t = document.createElement("style"),
|
|
2587
|
+
t || (t = document.createElement("style"), K(t, "data-cer-runtime", "true"), e.appendChild(t));
|
|
2602
2588
|
try {
|
|
2603
|
-
t.textContent =
|
|
2589
|
+
t.textContent = s;
|
|
2604
2590
|
} catch {
|
|
2605
2591
|
}
|
|
2606
2592
|
}
|
|
2607
|
-
function
|
|
2593
|
+
function rn(e, s, t, r, n) {
|
|
2608
2594
|
if (!e) return;
|
|
2609
|
-
const
|
|
2610
|
-
if (ot.get(e) ===
|
|
2595
|
+
const c = sn(e, t);
|
|
2596
|
+
if (ot.get(e) === c)
|
|
2611
2597
|
return;
|
|
2612
|
-
ot.set(e,
|
|
2613
|
-
const
|
|
2614
|
-
if (!
|
|
2615
|
-
if (
|
|
2598
|
+
ot.set(e, c);
|
|
2599
|
+
const i = wt(e) ? Lt(c) : "", f = Nt(), b = s._computedStyle;
|
|
2600
|
+
if (!i?.trim() && !b && !f) {
|
|
2601
|
+
if (n(null), at(e))
|
|
2616
2602
|
e.adoptedStyleSheets = [
|
|
2617
2603
|
$e(),
|
|
2618
2604
|
he()
|
|
2619
2605
|
];
|
|
2620
2606
|
else {
|
|
2621
|
-
const
|
|
2607
|
+
const p = ke(tt), T = he();
|
|
2622
2608
|
let a = "";
|
|
2623
2609
|
try {
|
|
2624
2610
|
T?.cssRules && (a = Array.from(T.cssRules).map((h) => h.cssText).join(`
|
|
@@ -2626,7 +2612,7 @@ function on(e, n, t, r, s) {
|
|
|
2626
2612
|
} catch {
|
|
2627
2613
|
a = "";
|
|
2628
2614
|
}
|
|
2629
|
-
const k =
|
|
2615
|
+
const k = ke(`${p}
|
|
2630
2616
|
${a}`);
|
|
2631
2617
|
lt(e, k);
|
|
2632
2618
|
try {
|
|
@@ -2636,21 +2622,21 @@ ${a}`);
|
|
|
2636
2622
|
}
|
|
2637
2623
|
return;
|
|
2638
2624
|
}
|
|
2639
|
-
let
|
|
2640
|
-
if (
|
|
2641
|
-
`),
|
|
2642
|
-
`),
|
|
2625
|
+
let y = "";
|
|
2626
|
+
if (b && (y += b + `
|
|
2627
|
+
`), i && (y += i + `
|
|
2628
|
+
`), y = Mt(y), y = ke(y), at(e)) {
|
|
2643
2629
|
let L = r;
|
|
2644
2630
|
L || (L = new CSSStyleSheet());
|
|
2645
2631
|
try {
|
|
2646
|
-
L.replaceSync(
|
|
2647
|
-
const
|
|
2648
|
-
f &&
|
|
2632
|
+
L.replaceSync(y);
|
|
2633
|
+
const p = [$e(), he()];
|
|
2634
|
+
f && p.push(f), p.push(L), e.adoptedStyleSheets = p, n(L);
|
|
2649
2635
|
return;
|
|
2650
2636
|
} catch {
|
|
2651
2637
|
}
|
|
2652
2638
|
}
|
|
2653
|
-
const
|
|
2639
|
+
const d = ke(tt), C = he();
|
|
2654
2640
|
let j = "";
|
|
2655
2641
|
try {
|
|
2656
2642
|
C?.cssRules && (j = Array.from(C.cssRules).map((L) => L.cssText).join(`
|
|
@@ -2658,9 +2644,9 @@ ${a}`);
|
|
|
2658
2644
|
} catch {
|
|
2659
2645
|
j = "";
|
|
2660
2646
|
}
|
|
2661
|
-
const S =
|
|
2647
|
+
const S = ke(`${d}
|
|
2662
2648
|
${j}
|
|
2663
|
-
${
|
|
2649
|
+
${y}`);
|
|
2664
2650
|
lt(e, S);
|
|
2665
2651
|
try {
|
|
2666
2652
|
const L = [
|
|
@@ -2669,8 +2655,8 @@ ${b}`);
|
|
|
2669
2655
|
];
|
|
2670
2656
|
if (f && L.push(f), typeof CSSStyleSheet < "u")
|
|
2671
2657
|
try {
|
|
2672
|
-
const
|
|
2673
|
-
|
|
2658
|
+
const p = new CSSStyleSheet();
|
|
2659
|
+
p.replaceSync(y), L.push(p);
|
|
2674
2660
|
} catch {
|
|
2675
2661
|
L.push({
|
|
2676
2662
|
cssRules: [],
|
|
@@ -2681,10 +2667,10 @@ ${b}`);
|
|
|
2681
2667
|
e.adoptedStyleSheets = L;
|
|
2682
2668
|
} catch {
|
|
2683
2669
|
}
|
|
2684
|
-
|
|
2670
|
+
n(null);
|
|
2685
2671
|
}
|
|
2686
|
-
function
|
|
2687
|
-
if (!
|
|
2672
|
+
function on(e, s) {
|
|
2673
|
+
if (!s.render)
|
|
2688
2674
|
throw new Error("Component must have a render function");
|
|
2689
2675
|
return typeof window > "u" ? class {
|
|
2690
2676
|
constructor() {
|
|
@@ -2732,10 +2718,10 @@ function cn(e, n) {
|
|
|
2732
2718
|
_templateLoading = !1;
|
|
2733
2719
|
_templateError = null;
|
|
2734
2720
|
constructor() {
|
|
2735
|
-
super(), this.attachShadow({ mode: "open" }), this._cfg =
|
|
2736
|
-
const t = this._initContext(
|
|
2737
|
-
Object.defineProperty(
|
|
2738
|
-
value:
|
|
2721
|
+
super(), this.shadowRoot || this.attachShadow({ mode: "open" }), this._cfg = we.get(e) || s, this._componentId = `${e}-${crypto.randomUUID()}`;
|
|
2722
|
+
const t = this._initContext(s), r = (c, o, i) => {
|
|
2723
|
+
Object.defineProperty(c, o, {
|
|
2724
|
+
value: i,
|
|
2739
2725
|
writable: !1,
|
|
2740
2726
|
enumerable: !1,
|
|
2741
2727
|
configurable: !1
|
|
@@ -2752,67 +2738,93 @@ function cn(e, n) {
|
|
|
2752
2738
|
), r(t, "_componentId", this._componentId), r(
|
|
2753
2739
|
t,
|
|
2754
2740
|
"_triggerWatchers",
|
|
2755
|
-
(
|
|
2741
|
+
(c, o) => this._triggerWatchers(c, o)
|
|
2756
2742
|
), this.context = t, x(() => {
|
|
2757
2743
|
r(t, "_host", this);
|
|
2758
2744
|
}), r(
|
|
2759
2745
|
this.context,
|
|
2760
2746
|
"emit",
|
|
2761
|
-
(o, i
|
|
2747
|
+
(c, o, i) => {
|
|
2762
2748
|
const f = {
|
|
2763
|
-
detail:
|
|
2749
|
+
detail: o,
|
|
2764
2750
|
bubbles: !0,
|
|
2765
2751
|
composed: !0,
|
|
2766
|
-
...
|
|
2767
|
-
},
|
|
2768
|
-
this.dispatchEvent(
|
|
2769
|
-
const
|
|
2770
|
-
if (
|
|
2771
|
-
const
|
|
2752
|
+
...i || {}
|
|
2753
|
+
}, b = new CustomEvent(c, f);
|
|
2754
|
+
this.dispatchEvent(b);
|
|
2755
|
+
const y = c.indexOf(":");
|
|
2756
|
+
if (y > 0) {
|
|
2757
|
+
const m = c.substring(0, y), d = c.substring(y + 1), C = d.includes("-") ? `${m}:${d.split("-").map(
|
|
2772
2758
|
(j, S) => S === 0 ? j : j.charAt(0).toUpperCase() + j.slice(1)
|
|
2773
|
-
).join("")}` : `${
|
|
2774
|
-
C !==
|
|
2759
|
+
).join("")}` : `${m}:${d.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
|
|
2760
|
+
C !== c && x(() => {
|
|
2775
2761
|
this.dispatchEvent(new CustomEvent(C, f));
|
|
2776
2762
|
});
|
|
2777
2763
|
}
|
|
2778
|
-
return !
|
|
2764
|
+
return !b.defaultPrevented;
|
|
2779
2765
|
}
|
|
2780
2766
|
);
|
|
2781
|
-
const
|
|
2782
|
-
for (const
|
|
2783
|
-
const
|
|
2784
|
-
typeof
|
|
2785
|
-
}
|
|
2786
|
-
if (
|
|
2787
|
-
for (const
|
|
2788
|
-
let
|
|
2789
|
-
Object.defineProperty(this,
|
|
2767
|
+
const n = we.get(e) || s;
|
|
2768
|
+
for (const c in n) {
|
|
2769
|
+
const o = n[c];
|
|
2770
|
+
typeof o == "function" && (this.context[c] = (...i) => o(...i, this.context));
|
|
2771
|
+
}
|
|
2772
|
+
if (n.props)
|
|
2773
|
+
for (const c in n.props) {
|
|
2774
|
+
let o = this[c];
|
|
2775
|
+
Object.defineProperty(this, c, {
|
|
2790
2776
|
get() {
|
|
2791
|
-
return
|
|
2777
|
+
return o;
|
|
2792
2778
|
},
|
|
2793
|
-
set(
|
|
2794
|
-
const f =
|
|
2795
|
-
|
|
2779
|
+
set(i) {
|
|
2780
|
+
const f = o;
|
|
2781
|
+
o = i, this.context[c] = i, this._initializing || (this._applyProps(n), f !== i && this._requestRender());
|
|
2796
2782
|
},
|
|
2797
2783
|
enumerable: !0,
|
|
2798
2784
|
configurable: !0
|
|
2799
2785
|
});
|
|
2800
2786
|
}
|
|
2801
|
-
this._initializing = !1, this._initWatchers(
|
|
2787
|
+
this._initializing = !1, this._initWatchers(n), this._applyProps(n), this._render(n);
|
|
2802
2788
|
}
|
|
2803
2789
|
connectedCallback() {
|
|
2804
|
-
this._runLogicWithinErrorBoundary(
|
|
2790
|
+
this._runLogicWithinErrorBoundary(s, () => {
|
|
2805
2791
|
const t = this.getRootNode();
|
|
2806
|
-
t && t !== document && "host" in t &&
|
|
2792
|
+
t && t !== document && "host" in t && Qt(t, this);
|
|
2793
|
+
const r = this.getAttribute("data-cer-hydrate");
|
|
2794
|
+
if (r !== "none") {
|
|
2795
|
+
if (r === "idle") {
|
|
2796
|
+
const n = () => this._hydrateNow(s);
|
|
2797
|
+
typeof requestIdleCallback < "u" ? requestIdleCallback(n) : setTimeout(n, 200);
|
|
2798
|
+
return;
|
|
2799
|
+
}
|
|
2800
|
+
if (r === "visible") {
|
|
2801
|
+
new IntersectionObserver(
|
|
2802
|
+
(c, o) => {
|
|
2803
|
+
c.some((i) => i.isIntersecting) && (o.disconnect(), this._hydrateNow(s));
|
|
2804
|
+
},
|
|
2805
|
+
{ rootMargin: "0px", threshold: 0 }
|
|
2806
|
+
).observe(this);
|
|
2807
|
+
return;
|
|
2808
|
+
}
|
|
2809
|
+
this._applyProps(s), this._requestRender(), nt(s, this.context, this._mounted, (n) => {
|
|
2810
|
+
this._mounted = n;
|
|
2811
|
+
});
|
|
2812
|
+
}
|
|
2813
|
+
});
|
|
2814
|
+
}
|
|
2815
|
+
/** Execute the standard hydration sequence (used by deferred strategies). */
|
|
2816
|
+
_hydrateNow(t) {
|
|
2817
|
+
this._runLogicWithinErrorBoundary(t, () => {
|
|
2818
|
+
this._applyProps(t), this._requestRender(), nt(t, this.context, this._mounted, (r) => {
|
|
2807
2819
|
this._mounted = r;
|
|
2808
2820
|
});
|
|
2809
2821
|
});
|
|
2810
2822
|
}
|
|
2811
2823
|
disconnectedCallback() {
|
|
2812
|
-
this._runLogicWithinErrorBoundary(
|
|
2824
|
+
this._runLogicWithinErrorBoundary(s, () => {
|
|
2813
2825
|
const t = this.getRootNode();
|
|
2814
|
-
t && t !== document && "host" in t &&
|
|
2815
|
-
|
|
2826
|
+
t && t !== document && "host" in t && en(t, this), xt(
|
|
2827
|
+
s,
|
|
2816
2828
|
this.context,
|
|
2817
2829
|
this._listeners,
|
|
2818
2830
|
() => {
|
|
@@ -2830,21 +2842,21 @@ function cn(e, n) {
|
|
|
2830
2842
|
(r) => {
|
|
2831
2843
|
this._mounted = r;
|
|
2832
2844
|
}
|
|
2833
|
-
),
|
|
2845
|
+
), Ue.cleanup(this._componentId);
|
|
2834
2846
|
});
|
|
2835
2847
|
}
|
|
2836
|
-
attributeChangedCallback(t, r,
|
|
2837
|
-
this._runLogicWithinErrorBoundary(
|
|
2838
|
-
this._applyProps(
|
|
2848
|
+
attributeChangedCallback(t, r, n) {
|
|
2849
|
+
this._runLogicWithinErrorBoundary(s, () => {
|
|
2850
|
+
this._applyProps(s), r !== n && this._requestRender(), Ht(s, t, r, n, this.context);
|
|
2839
2851
|
});
|
|
2840
2852
|
}
|
|
2841
2853
|
static get observedAttributes() {
|
|
2842
|
-
return
|
|
2854
|
+
return s.props ? Object.keys(s.props).map(X) : [];
|
|
2843
2855
|
}
|
|
2844
2856
|
// --- Render ---
|
|
2845
2857
|
_render(t) {
|
|
2846
2858
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2847
|
-
|
|
2859
|
+
tn(
|
|
2848
2860
|
this.shadowRoot,
|
|
2849
2861
|
t,
|
|
2850
2862
|
this.context,
|
|
@@ -2867,8 +2879,8 @@ function cn(e, n) {
|
|
|
2867
2879
|
}
|
|
2868
2880
|
_requestRender() {
|
|
2869
2881
|
this._runLogicWithinErrorBoundary(this._cfg, () => {
|
|
2870
|
-
|
|
2871
|
-
|
|
2882
|
+
Ce(() => {
|
|
2883
|
+
nn(
|
|
2872
2884
|
() => this._render(this._cfg),
|
|
2873
2885
|
this._lastRenderTime,
|
|
2874
2886
|
this._renderCount,
|
|
@@ -2889,13 +2901,13 @@ function cn(e, n) {
|
|
|
2889
2901
|
// --- Style ---
|
|
2890
2902
|
_applyStyle(t, r) {
|
|
2891
2903
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2892
|
-
|
|
2904
|
+
rn(
|
|
2893
2905
|
this.shadowRoot,
|
|
2894
2906
|
this.context,
|
|
2895
2907
|
r,
|
|
2896
2908
|
this._styleSheet,
|
|
2897
|
-
(
|
|
2898
|
-
this._styleSheet =
|
|
2909
|
+
(n) => {
|
|
2910
|
+
this._styleSheet = n;
|
|
2899
2911
|
}
|
|
2900
2912
|
);
|
|
2901
2913
|
});
|
|
@@ -2904,42 +2916,42 @@ function cn(e, n) {
|
|
|
2904
2916
|
_runLogicWithinErrorBoundary(t, r) {
|
|
2905
2917
|
try {
|
|
2906
2918
|
r(), this._hasError = !1;
|
|
2907
|
-
} catch (
|
|
2919
|
+
} catch (n) {
|
|
2908
2920
|
this._hasError = !0;
|
|
2909
2921
|
try {
|
|
2910
|
-
const
|
|
2922
|
+
const c = this.tagName?.toLowerCase?.() || "<unknown>", o = this._componentId || "<unknown-id>", i = {};
|
|
2911
2923
|
if (t && t.props)
|
|
2912
2924
|
for (const f of Object.keys(t.props))
|
|
2913
2925
|
try {
|
|
2914
|
-
const
|
|
2915
|
-
|
|
2926
|
+
const b = this.context[f];
|
|
2927
|
+
b instanceof Node ? i[f] = `[DOM Node: ${b.nodeName}]` : typeof b == "object" && b !== null ? i[f] = Object.keys(b).length > 5 ? `[object(${Object.keys(b).length} keys)]` : b : i[f] = b;
|
|
2916
2928
|
} catch {
|
|
2917
|
-
|
|
2929
|
+
i[f] = "[unreadable]";
|
|
2918
2930
|
}
|
|
2919
|
-
W(`Error rendering component <${
|
|
2931
|
+
W(`Error rendering component <${c}> (id=${o}):`, n), W("Component props snapshot:", i), te(
|
|
2920
2932
|
"Common causes: accessing properties of null/undefined inside template interpolations; expensive or throwing expressions inside templates that evaluate eagerly. Fixes: use optional chaining (obj?.prop), guard with ternary, or use the runtime lazy overload: when(cond, () => html`...`)."
|
|
2921
2933
|
);
|
|
2922
2934
|
} catch {
|
|
2923
2935
|
}
|
|
2924
|
-
if (t.onError && t.onError(
|
|
2925
|
-
let
|
|
2926
|
-
if (!
|
|
2927
|
-
const
|
|
2928
|
-
|
|
2936
|
+
if (t.onError && t.onError(n, this.context), this.tagName.toLowerCase() !== "cer-error-boundary") {
|
|
2937
|
+
let c = this.parentElement;
|
|
2938
|
+
if (!c) {
|
|
2939
|
+
const o = this.getRootNode();
|
|
2940
|
+
o instanceof ShadowRoot && (c = o.host.parentElement);
|
|
2929
2941
|
}
|
|
2930
|
-
for (;
|
|
2931
|
-
if (
|
|
2932
|
-
|
|
2933
|
-
|
|
2942
|
+
for (; c; ) {
|
|
2943
|
+
if (c.tagName.toLowerCase() === "cer-error-boundary") {
|
|
2944
|
+
c._cerHandleChildError?.(
|
|
2945
|
+
n
|
|
2934
2946
|
);
|
|
2935
2947
|
break;
|
|
2936
2948
|
}
|
|
2937
|
-
let
|
|
2938
|
-
if (!
|
|
2939
|
-
const
|
|
2940
|
-
|
|
2949
|
+
let o = c.parentElement;
|
|
2950
|
+
if (!o) {
|
|
2951
|
+
const i = c.getRootNode();
|
|
2952
|
+
i instanceof ShadowRoot && (o = i.host.parentElement);
|
|
2941
2953
|
}
|
|
2942
|
-
|
|
2954
|
+
c = o;
|
|
2943
2955
|
}
|
|
2944
2956
|
}
|
|
2945
2957
|
}
|
|
@@ -2947,12 +2959,12 @@ function cn(e, n) {
|
|
|
2947
2959
|
// --- State, props, computed ---
|
|
2948
2960
|
_initContext(t) {
|
|
2949
2961
|
try {
|
|
2950
|
-
let r = function(
|
|
2951
|
-
if (Array.isArray(
|
|
2952
|
-
return new Proxy(
|
|
2953
|
-
get(
|
|
2954
|
-
const
|
|
2955
|
-
return typeof
|
|
2962
|
+
let r = function(c, o = "") {
|
|
2963
|
+
if (Array.isArray(c))
|
|
2964
|
+
return new Proxy(c, {
|
|
2965
|
+
get(i, f, b) {
|
|
2966
|
+
const y = Reflect.get(i, f, b);
|
|
2967
|
+
return typeof y == "function" && typeof f == "string" && [
|
|
2956
2968
|
"push",
|
|
2957
2969
|
"pop",
|
|
2958
2970
|
"shift",
|
|
@@ -2960,63 +2972,63 @@ function cn(e, n) {
|
|
|
2960
2972
|
"splice",
|
|
2961
2973
|
"sort",
|
|
2962
2974
|
"reverse"
|
|
2963
|
-
].includes(f) ? function(...
|
|
2964
|
-
const C =
|
|
2965
|
-
if (!
|
|
2966
|
-
const j =
|
|
2967
|
-
|
|
2968
|
-
() =>
|
|
2969
|
-
|
|
2975
|
+
].includes(f) ? function(...d) {
|
|
2976
|
+
const C = y.apply(i, d);
|
|
2977
|
+
if (!n._initializing) {
|
|
2978
|
+
const j = o || "root";
|
|
2979
|
+
n._triggerWatchers(j, i), Ce(
|
|
2980
|
+
() => n._render(t),
|
|
2981
|
+
n._componentId
|
|
2970
2982
|
);
|
|
2971
2983
|
}
|
|
2972
2984
|
return C;
|
|
2973
|
-
} :
|
|
2985
|
+
} : y;
|
|
2974
2986
|
},
|
|
2975
|
-
set(
|
|
2976
|
-
if (
|
|
2977
|
-
const
|
|
2978
|
-
|
|
2987
|
+
set(i, f, b) {
|
|
2988
|
+
if (i[String(f)] = b, !n._initializing) {
|
|
2989
|
+
const y = o ? `${o}.${String(f)}` : String(f);
|
|
2990
|
+
n._triggerWatchers(y, b), Ce(() => n._render(t), n._componentId);
|
|
2979
2991
|
}
|
|
2980
2992
|
return !0;
|
|
2981
2993
|
},
|
|
2982
|
-
deleteProperty(
|
|
2983
|
-
if (delete
|
|
2984
|
-
const
|
|
2985
|
-
|
|
2994
|
+
deleteProperty(i, f) {
|
|
2995
|
+
if (delete i[String(f)], !n._initializing) {
|
|
2996
|
+
const b = o ? `${o}.${String(f)}` : String(f);
|
|
2997
|
+
n._triggerWatchers(b, void 0), Ce(() => n._render(t), n._componentId);
|
|
2986
2998
|
}
|
|
2987
2999
|
return !0;
|
|
2988
3000
|
}
|
|
2989
3001
|
});
|
|
2990
|
-
if (
|
|
2991
|
-
if (O(
|
|
2992
|
-
return
|
|
2993
|
-
for (const
|
|
2994
|
-
const f =
|
|
2995
|
-
|
|
3002
|
+
if (c && typeof c == "object") {
|
|
3003
|
+
if (O(c))
|
|
3004
|
+
return c;
|
|
3005
|
+
for (const i in c) {
|
|
3006
|
+
const f = o ? `${o}.${i}` : i;
|
|
3007
|
+
c[i] = r(c[i], f);
|
|
2996
3008
|
}
|
|
2997
|
-
return new Proxy(
|
|
2998
|
-
set(
|
|
2999
|
-
const
|
|
3000
|
-
return
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
),
|
|
3009
|
+
return new Proxy(c, {
|
|
3010
|
+
set(i, f, b) {
|
|
3011
|
+
const y = o ? `${o}.${String(f)}` : String(f);
|
|
3012
|
+
return i[String(f)] = r(b, y), n._initializing || (n._triggerWatchers(
|
|
3013
|
+
y,
|
|
3014
|
+
i[String(f)]
|
|
3015
|
+
), Ce(() => n._render(t), n._componentId)), !0;
|
|
3004
3016
|
},
|
|
3005
|
-
get(
|
|
3006
|
-
return Reflect.get(
|
|
3017
|
+
get(i, f, b) {
|
|
3018
|
+
return Reflect.get(i, f, b);
|
|
3007
3019
|
}
|
|
3008
3020
|
});
|
|
3009
3021
|
}
|
|
3010
|
-
return
|
|
3022
|
+
return c;
|
|
3011
3023
|
};
|
|
3012
|
-
const
|
|
3024
|
+
const n = this;
|
|
3013
3025
|
return r({
|
|
3014
3026
|
// For functional components, state is managed by state() function calls
|
|
3015
3027
|
// Include prop defaults in initial reactive context so prop updates trigger reactivity
|
|
3016
3028
|
...t.props ? Object.fromEntries(
|
|
3017
|
-
Object.entries(t.props).map(([
|
|
3018
|
-
|
|
3019
|
-
|
|
3029
|
+
Object.entries(t.props).map(([c, o]) => [
|
|
3030
|
+
c,
|
|
3031
|
+
o.default
|
|
3020
3032
|
])
|
|
3021
3033
|
) : {}
|
|
3022
3034
|
});
|
|
@@ -3044,60 +3056,61 @@ function cn(e, n) {
|
|
|
3044
3056
|
}
|
|
3045
3057
|
};
|
|
3046
3058
|
}
|
|
3047
|
-
function He(e,
|
|
3048
|
-
for (const
|
|
3059
|
+
function He(e, s, t, r) {
|
|
3060
|
+
for (const n of t)
|
|
3049
3061
|
try {
|
|
3050
|
-
|
|
3051
|
-
} catch (
|
|
3062
|
+
n(...r);
|
|
3063
|
+
} catch (c) {
|
|
3052
3064
|
W(
|
|
3053
|
-
`[${e}] Error in ${
|
|
3054
|
-
|
|
3065
|
+
`[${e}] Error in ${s} lifecycle hook:`,
|
|
3066
|
+
c
|
|
3055
3067
|
);
|
|
3056
3068
|
}
|
|
3057
3069
|
}
|
|
3058
|
-
function
|
|
3059
|
-
|
|
3060
|
-
let
|
|
3061
|
-
|
|
3062
|
-
const
|
|
3070
|
+
function bn(e, s, t) {
|
|
3071
|
+
Tt();
|
|
3072
|
+
let r = X(e);
|
|
3073
|
+
r.includes("-") || (r = `cer-${r}`);
|
|
3074
|
+
const n = {}, c = {
|
|
3063
3075
|
// Props are accessed via useProps() hook
|
|
3064
3076
|
props: {},
|
|
3077
|
+
hydrate: t?.hydrate,
|
|
3065
3078
|
// Add lifecycle hooks from the stored functions
|
|
3066
3079
|
onConnected: (o) => {
|
|
3067
|
-
if (
|
|
3080
|
+
if (n.onConnected)
|
|
3068
3081
|
try {
|
|
3069
|
-
|
|
3082
|
+
n.onConnected(o);
|
|
3070
3083
|
} catch (i) {
|
|
3071
|
-
W(`[${
|
|
3084
|
+
W(`[${r}] Error in onConnected lifecycle hook:`, i);
|
|
3072
3085
|
}
|
|
3073
3086
|
},
|
|
3074
3087
|
onDisconnected: (o) => {
|
|
3075
|
-
if (
|
|
3088
|
+
if (n.onDisconnected)
|
|
3076
3089
|
try {
|
|
3077
|
-
|
|
3090
|
+
n.onDisconnected(o);
|
|
3078
3091
|
} catch (i) {
|
|
3079
|
-
W(`[${
|
|
3092
|
+
W(`[${r}] Error in onDisconnected lifecycle hook:`, i);
|
|
3080
3093
|
}
|
|
3081
3094
|
},
|
|
3082
|
-
onAttributeChanged: (o, i,
|
|
3083
|
-
if (
|
|
3095
|
+
onAttributeChanged: (o, i, f, b) => {
|
|
3096
|
+
if (n.onAttributeChanged)
|
|
3084
3097
|
try {
|
|
3085
|
-
|
|
3086
|
-
} catch (
|
|
3087
|
-
W(`[${
|
|
3098
|
+
n.onAttributeChanged(o, i, f, b);
|
|
3099
|
+
} catch (y) {
|
|
3100
|
+
W(`[${r}] Error in onAttributeChanged lifecycle hook:`, y);
|
|
3088
3101
|
}
|
|
3089
3102
|
},
|
|
3090
3103
|
onError: (o, i) => {
|
|
3091
|
-
if (
|
|
3104
|
+
if (n.onError && o)
|
|
3092
3105
|
try {
|
|
3093
|
-
|
|
3094
|
-
} catch (
|
|
3095
|
-
W(`[${
|
|
3106
|
+
n.onError(o, i);
|
|
3107
|
+
} catch (f) {
|
|
3108
|
+
W(`[${r}] Error in onError handler (the error handler itself threw):`, f);
|
|
3096
3109
|
}
|
|
3097
3110
|
},
|
|
3098
3111
|
render: (o) => {
|
|
3099
|
-
const i = o,
|
|
3100
|
-
|
|
3112
|
+
const i = o, f = i._componentId || `${r}-${crypto.randomUUID()}`;
|
|
3113
|
+
Ue.setCurrentComponent(f, () => {
|
|
3101
3114
|
o.requestRender && o.requestRender();
|
|
3102
3115
|
});
|
|
3103
3116
|
try {
|
|
@@ -3111,92 +3124,92 @@ function En(e, n) {
|
|
|
3111
3124
|
writable: !0,
|
|
3112
3125
|
enumerable: !1,
|
|
3113
3126
|
configurable: !0
|
|
3114
|
-
}),
|
|
3115
|
-
let
|
|
3127
|
+
}), Ye(o), et();
|
|
3128
|
+
let b;
|
|
3116
3129
|
try {
|
|
3117
|
-
|
|
3118
|
-
} catch (
|
|
3130
|
+
b = s();
|
|
3131
|
+
} catch (y) {
|
|
3119
3132
|
try {
|
|
3120
|
-
const
|
|
3121
|
-
if (Array.isArray(
|
|
3122
|
-
for (const
|
|
3133
|
+
const d = i._hookCallbacks?.onError;
|
|
3134
|
+
if (Array.isArray(d))
|
|
3135
|
+
for (const C of d)
|
|
3123
3136
|
try {
|
|
3124
|
-
y
|
|
3137
|
+
C(y);
|
|
3125
3138
|
} catch {
|
|
3126
3139
|
}
|
|
3127
|
-
else if (typeof
|
|
3140
|
+
else if (typeof d == "function")
|
|
3128
3141
|
try {
|
|
3129
|
-
|
|
3142
|
+
d(y);
|
|
3130
3143
|
} catch {
|
|
3131
3144
|
}
|
|
3132
3145
|
} catch {
|
|
3133
3146
|
}
|
|
3134
3147
|
try {
|
|
3135
|
-
const
|
|
3136
|
-
if (
|
|
3137
|
-
let
|
|
3138
|
-
for (;
|
|
3139
|
-
if (
|
|
3140
|
-
|
|
3141
|
-
|
|
3148
|
+
const m = i._host;
|
|
3149
|
+
if (m?.parentElement) {
|
|
3150
|
+
let d = m.parentElement;
|
|
3151
|
+
for (; d; ) {
|
|
3152
|
+
if (d.tagName.toLowerCase() === "cer-error-boundary") {
|
|
3153
|
+
d._cerHandleChildError?.(
|
|
3154
|
+
y
|
|
3142
3155
|
);
|
|
3143
3156
|
break;
|
|
3144
3157
|
}
|
|
3145
|
-
let
|
|
3146
|
-
if (!
|
|
3147
|
-
const
|
|
3148
|
-
|
|
3158
|
+
let C = d.parentElement;
|
|
3159
|
+
if (!C) {
|
|
3160
|
+
const j = d.getRootNode();
|
|
3161
|
+
j instanceof ShadowRoot && (C = j.host.parentElement);
|
|
3149
3162
|
}
|
|
3150
|
-
|
|
3163
|
+
d = C;
|
|
3151
3164
|
}
|
|
3152
3165
|
}
|
|
3153
3166
|
} catch {
|
|
3154
3167
|
}
|
|
3155
|
-
throw
|
|
3168
|
+
throw y;
|
|
3156
3169
|
}
|
|
3157
3170
|
if (i._hookCallbacks) {
|
|
3158
|
-
const
|
|
3159
|
-
if (
|
|
3160
|
-
const
|
|
3161
|
-
|
|
3162
|
-
He(
|
|
3171
|
+
const y = i._hookCallbacks;
|
|
3172
|
+
if (y.onConnected) {
|
|
3173
|
+
const m = y.onConnected;
|
|
3174
|
+
n.onConnected = (d) => {
|
|
3175
|
+
He(r, "useOnConnected", m, [d]);
|
|
3163
3176
|
};
|
|
3164
3177
|
}
|
|
3165
|
-
if (
|
|
3166
|
-
const
|
|
3167
|
-
|
|
3168
|
-
He(
|
|
3178
|
+
if (y.onDisconnected) {
|
|
3179
|
+
const m = y.onDisconnected;
|
|
3180
|
+
n.onDisconnected = (d) => {
|
|
3181
|
+
He(r, "useOnDisconnected", m, [d]);
|
|
3169
3182
|
};
|
|
3170
3183
|
}
|
|
3171
|
-
if (
|
|
3172
|
-
const
|
|
3173
|
-
|
|
3174
|
-
He(
|
|
3184
|
+
if (y.onAttributeChanged) {
|
|
3185
|
+
const m = y.onAttributeChanged;
|
|
3186
|
+
n.onAttributeChanged = (d, C, j, S) => {
|
|
3187
|
+
He(r, "useOnAttributeChanged", m, [d, C, j, S]);
|
|
3175
3188
|
};
|
|
3176
3189
|
}
|
|
3177
|
-
if (
|
|
3178
|
-
const
|
|
3179
|
-
|
|
3180
|
-
He(
|
|
3190
|
+
if (y.onError) {
|
|
3191
|
+
const m = y.onError;
|
|
3192
|
+
n.onError = (d) => {
|
|
3193
|
+
He(r, "useOnError", m, [d]);
|
|
3181
3194
|
};
|
|
3182
3195
|
}
|
|
3183
|
-
if (
|
|
3184
|
-
const
|
|
3185
|
-
|
|
3186
|
-
Object.entries(
|
|
3187
|
-
|
|
3188
|
-
{ type: typeof
|
|
3196
|
+
if (y.props && !Object.keys(c.props ?? {}).length) {
|
|
3197
|
+
const m = y.props;
|
|
3198
|
+
c.props = Object.fromEntries(
|
|
3199
|
+
Object.entries(m).map(([d, C]) => [
|
|
3200
|
+
d,
|
|
3201
|
+
{ type: typeof C == "boolean" ? Boolean : typeof C == "number" ? Number : typeof C == "string" ? String : Function, default: C }
|
|
3189
3202
|
])
|
|
3190
|
-
),
|
|
3203
|
+
), we.set(r, c);
|
|
3191
3204
|
}
|
|
3192
3205
|
}
|
|
3193
|
-
return
|
|
3206
|
+
return b;
|
|
3194
3207
|
} finally {
|
|
3195
|
-
|
|
3208
|
+
Xe(), Ue.clearCurrentComponent();
|
|
3196
3209
|
}
|
|
3197
3210
|
}
|
|
3198
3211
|
};
|
|
3199
|
-
if (
|
|
3212
|
+
if (we.set(r, c), typeof window < "u") {
|
|
3200
3213
|
try {
|
|
3201
3214
|
const o = {
|
|
3202
3215
|
_hookCallbacks: {},
|
|
@@ -3204,55 +3217,55 @@ function En(e, n) {
|
|
|
3204
3217
|
},
|
|
3205
3218
|
emit: () => !0
|
|
3206
3219
|
};
|
|
3207
|
-
|
|
3220
|
+
Ye(o), Et(), et();
|
|
3208
3221
|
try {
|
|
3209
|
-
|
|
3222
|
+
s();
|
|
3210
3223
|
} catch (i) {
|
|
3211
3224
|
try {
|
|
3212
|
-
const
|
|
3213
|
-
if (Array.isArray(
|
|
3214
|
-
for (const
|
|
3225
|
+
const b = o?._hookCallbacks?.onError;
|
|
3226
|
+
if (Array.isArray(b))
|
|
3227
|
+
for (const y of b)
|
|
3215
3228
|
try {
|
|
3216
|
-
|
|
3229
|
+
y(i);
|
|
3217
3230
|
} catch {
|
|
3218
3231
|
}
|
|
3219
|
-
else if (typeof
|
|
3232
|
+
else if (typeof b == "function")
|
|
3220
3233
|
try {
|
|
3221
|
-
|
|
3234
|
+
b(i);
|
|
3222
3235
|
} catch {
|
|
3223
3236
|
}
|
|
3224
3237
|
W(
|
|
3225
|
-
`Error during component discovery render <${
|
|
3238
|
+
`Error during component discovery render <${r}>:`,
|
|
3226
3239
|
i
|
|
3227
|
-
),
|
|
3240
|
+
), te(
|
|
3228
3241
|
"Error occurred during initial component discovery render. Consider guarding expensive expressions or using lazy factories for directives like when()."
|
|
3229
3242
|
);
|
|
3230
3243
|
} catch {
|
|
3231
3244
|
}
|
|
3232
3245
|
throw i;
|
|
3233
3246
|
} finally {
|
|
3234
|
-
St(),
|
|
3247
|
+
St(), Xe();
|
|
3235
3248
|
}
|
|
3236
3249
|
if (o._hookCallbacks?.props) {
|
|
3237
3250
|
const i = o._hookCallbacks.props;
|
|
3238
|
-
|
|
3239
|
-
Object.entries(i).map(([
|
|
3240
|
-
|
|
3241
|
-
{ type: typeof
|
|
3251
|
+
c.props = Object.fromEntries(
|
|
3252
|
+
Object.entries(i).map(([f, b]) => [
|
|
3253
|
+
f,
|
|
3254
|
+
{ type: typeof b == "boolean" ? Boolean : typeof b == "number" ? Number : typeof b == "string" ? String : Function, default: b }
|
|
3242
3255
|
])
|
|
3243
|
-
),
|
|
3256
|
+
), we.set(r, c);
|
|
3244
3257
|
}
|
|
3245
3258
|
} catch {
|
|
3246
3259
|
}
|
|
3247
|
-
customElements.get(
|
|
3248
|
-
|
|
3249
|
-
|
|
3260
|
+
typeof customElements < "u" && !customElements.get(r) && customElements.define(
|
|
3261
|
+
r,
|
|
3262
|
+
on(r, c)
|
|
3250
3263
|
);
|
|
3251
3264
|
}
|
|
3252
3265
|
}
|
|
3253
|
-
function ie(e,
|
|
3254
|
-
const
|
|
3255
|
-
return { tag: e, key:
|
|
3266
|
+
function ie(e, s = {}, t, r) {
|
|
3267
|
+
const n = r ?? s.key;
|
|
3268
|
+
return { tag: e, key: n, props: s, children: t };
|
|
3256
3269
|
}
|
|
3257
3270
|
function Me(e) {
|
|
3258
3271
|
return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
|
|
@@ -3260,39 +3273,39 @@ function Me(e) {
|
|
|
3260
3273
|
function fe(e) {
|
|
3261
3274
|
return typeof e == "object" && e !== null && "tag" in e && !Me(e);
|
|
3262
3275
|
}
|
|
3263
|
-
function
|
|
3264
|
-
return e.key != null ? e : { ...e, key:
|
|
3276
|
+
function cn(e, s) {
|
|
3277
|
+
return e.key != null ? e : { ...e, key: s };
|
|
3265
3278
|
}
|
|
3266
|
-
function
|
|
3279
|
+
function an(e, s) {
|
|
3267
3280
|
if (e == null) {
|
|
3268
|
-
|
|
3269
|
-
`⚠️ Event handler for '@${
|
|
3281
|
+
te(
|
|
3282
|
+
`⚠️ Event handler for '@${s}' is ${e}. This will prevent the event from working. Use a function reference instead: @${s}="\${functionName}"`
|
|
3270
3283
|
);
|
|
3271
3284
|
return;
|
|
3272
3285
|
}
|
|
3273
|
-
typeof e != "function" &&
|
|
3274
|
-
`🚨 Potential infinite loop detected! Event handler for '@${
|
|
3275
|
-
), e === void 0 && typeof e != "function" &&
|
|
3276
|
-
`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${
|
|
3286
|
+
typeof e != "function" && te(
|
|
3287
|
+
`🚨 Potential infinite loop detected! Event handler for '@${s}' appears to be the result of a function call (${typeof e}) instead of a function reference. Change @${s}="\${functionName()}" to @${s}="\${functionName}" to pass the function reference instead of calling it immediately.`
|
|
3288
|
+
), e === void 0 && typeof e != "function" && te(
|
|
3289
|
+
`💡 Tip: If your event handler function returns undefined, make sure you're passing the function reference, not calling it. Use @${s}="\${fn}" not @${s}="\${fn()}"`
|
|
3277
3290
|
);
|
|
3278
3291
|
}
|
|
3279
|
-
function
|
|
3280
|
-
const r = {},
|
|
3292
|
+
function ln(e, s = [], t = {}) {
|
|
3293
|
+
const r = {}, n = {}, c = {}, o = [], i = /([:@#]?)([a-zA-Z0-9-:.]+)(?:\s*=\s*("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)'|([^\s>]+)))?/g;
|
|
3281
3294
|
let f;
|
|
3282
|
-
for (; f =
|
|
3283
|
-
const
|
|
3284
|
-
let
|
|
3285
|
-
for (let
|
|
3286
|
-
if (f[
|
|
3287
|
-
|
|
3295
|
+
for (; f = i.exec(e); ) {
|
|
3296
|
+
const b = f[1], y = f[2];
|
|
3297
|
+
let m = "";
|
|
3298
|
+
for (let p = 3; p < f.length; p++)
|
|
3299
|
+
if (f[p] !== void 0) {
|
|
3300
|
+
m = f[p];
|
|
3288
3301
|
break;
|
|
3289
3302
|
}
|
|
3290
|
-
|
|
3291
|
-
const
|
|
3292
|
-
let S =
|
|
3303
|
+
m.length >= 2 && (m[0] === '"' && m[m.length - 1] === '"' || m[0] === "'" && m[m.length - 1] === "'") && (m = m.slice(1, -1));
|
|
3304
|
+
const d = !/=/.test(f[0]), C = m.match(/^{{(\d+)}}$/), j = !C && /{{(\d+)}}/.test(m);
|
|
3305
|
+
let S = d ? !0 : C ? s[Number(C[1])] ?? null : j ? m.replace(
|
|
3293
3306
|
/{{(\d+)}}/g,
|
|
3294
|
-
(
|
|
3295
|
-
) :
|
|
3307
|
+
(p, T) => String(s[Number(T)] ?? "")
|
|
3308
|
+
) : m;
|
|
3296
3309
|
!C && !j && (S === "true" ? S = !0 : S === "false" ? S = !1 : S === "null" ? S = null : isNaN(Number(S)) || (S = Number(S)));
|
|
3297
3310
|
const L = [
|
|
3298
3311
|
"model",
|
|
@@ -3303,72 +3316,72 @@ function fn(e, n = [], t = {}) {
|
|
|
3303
3316
|
"ref",
|
|
3304
3317
|
"when"
|
|
3305
3318
|
];
|
|
3306
|
-
if (
|
|
3307
|
-
const [
|
|
3319
|
+
if (b === ":") {
|
|
3320
|
+
const [p, T] = y.split(":"), [a, ...k] = p.split(".");
|
|
3308
3321
|
if (L.includes(a)) {
|
|
3309
3322
|
const h = [...k], w = a === "model" && T ? `model:${T}` : a;
|
|
3310
|
-
|
|
3323
|
+
c[w] = {
|
|
3311
3324
|
value: S,
|
|
3312
3325
|
modifiers: h,
|
|
3313
3326
|
arg: T
|
|
3314
3327
|
};
|
|
3315
|
-
} else if (
|
|
3328
|
+
} else if (y === "disabled") {
|
|
3316
3329
|
let h = S;
|
|
3317
3330
|
h && O(h) && (h = h.value);
|
|
3318
3331
|
const w = typeof h;
|
|
3319
3332
|
if (h === "" || w === "boolean" || w === "string" && (h === "true" || h === "false") || h == null || w === "number")
|
|
3320
|
-
r[
|
|
3333
|
+
r[y] = h;
|
|
3321
3334
|
else {
|
|
3322
3335
|
let g = S;
|
|
3323
|
-
g && O(g) && (g = g.value),
|
|
3336
|
+
g && O(g) && (g = g.value), n[y] = g;
|
|
3324
3337
|
}
|
|
3325
|
-
|
|
3338
|
+
o.push(y);
|
|
3326
3339
|
} else {
|
|
3327
3340
|
let h = S;
|
|
3328
|
-
h && O(h) && (h = h.value),
|
|
3341
|
+
h && O(h) && (h = h.value), n[y] = h, o.push(y);
|
|
3329
3342
|
}
|
|
3330
|
-
} else if (
|
|
3331
|
-
const [
|
|
3332
|
-
|
|
3343
|
+
} else if (b === "@") {
|
|
3344
|
+
const [p, ...T] = y.split("."), a = T;
|
|
3345
|
+
an(S, p);
|
|
3333
3346
|
const k = typeof S == "function" ? S : typeof t[S] == "function" ? t[S] : void 0;
|
|
3334
3347
|
if (k) {
|
|
3335
3348
|
const h = (E) => {
|
|
3336
3349
|
if (a.includes("prevent") && E.preventDefault(), a.includes("stop") && E.stopPropagation(), !(a.includes("self") && E.target !== E.currentTarget))
|
|
3337
3350
|
return a.includes("once") && E.currentTarget?.removeEventListener(
|
|
3338
|
-
|
|
3351
|
+
p,
|
|
3339
3352
|
h
|
|
3340
3353
|
), k(E);
|
|
3341
|
-
}, w = "on" +
|
|
3354
|
+
}, w = "on" + p.charAt(0).toUpperCase() + p.slice(1);
|
|
3342
3355
|
r[w] = h;
|
|
3343
3356
|
}
|
|
3344
|
-
} else
|
|
3357
|
+
} else y === "ref" ? r.ref = S : n[y] = S;
|
|
3345
3358
|
}
|
|
3346
|
-
return { props: r, attrs:
|
|
3359
|
+
return { props: r, attrs: n, directives: c, bound: o };
|
|
3347
3360
|
}
|
|
3348
|
-
function
|
|
3361
|
+
function Ve(e) {
|
|
3349
3362
|
if (!fe(e) || Me(e))
|
|
3350
3363
|
return e;
|
|
3351
|
-
const
|
|
3352
|
-
if (
|
|
3353
|
-
const t =
|
|
3354
|
-
delete
|
|
3355
|
-
const
|
|
3356
|
-
Object.keys(
|
|
3357
|
-
const
|
|
3364
|
+
const s = e.props?.directives;
|
|
3365
|
+
if (s && s.when) {
|
|
3366
|
+
const t = s.when.value, r = O(t) ? t.value : t, n = { ...s };
|
|
3367
|
+
delete n.when;
|
|
3368
|
+
const c = { ...e.props };
|
|
3369
|
+
Object.keys(n).length > 0 ? c.directives = n : delete c.directives;
|
|
3370
|
+
const o = {
|
|
3358
3371
|
...e,
|
|
3359
|
-
props:
|
|
3372
|
+
props: c
|
|
3360
3373
|
};
|
|
3361
|
-
return Array.isArray(
|
|
3362
|
-
(f) => typeof f == "object" && f !== null ?
|
|
3374
|
+
return Array.isArray(o.children) && (o.children = o.children.map(
|
|
3375
|
+
(f) => typeof f == "object" && f !== null ? Ve(f) : f
|
|
3363
3376
|
)), {
|
|
3364
3377
|
tag: "#anchor",
|
|
3365
3378
|
key: e.key != null ? `when-${e.key}` : `when-${e.tag}`,
|
|
3366
|
-
children: r ? [
|
|
3379
|
+
children: r ? [o] : []
|
|
3367
3380
|
};
|
|
3368
3381
|
}
|
|
3369
3382
|
if (Array.isArray(e.children)) {
|
|
3370
3383
|
const t = e.children.map(
|
|
3371
|
-
(r) => typeof r == "object" && r !== null ?
|
|
3384
|
+
(r) => typeof r == "object" && r !== null ? Ve(r) : r
|
|
3372
3385
|
);
|
|
3373
3386
|
return {
|
|
3374
3387
|
...e,
|
|
@@ -3377,24 +3390,24 @@ function Ge(e) {
|
|
|
3377
3390
|
}
|
|
3378
3391
|
return e;
|
|
3379
3392
|
}
|
|
3380
|
-
function
|
|
3381
|
-
const r = Ne.length > 0 ? Ne[Ne.length - 1] : void 0,
|
|
3382
|
-
if (
|
|
3383
|
-
const l =
|
|
3393
|
+
function fn(e, s, t) {
|
|
3394
|
+
const r = Ne.length > 0 ? Ne[Ne.length - 1] : void 0, n = t ?? r, c = !t && s.length === 0, o = c ? e.join("<!--TEMPLATE_DELIM-->") : null;
|
|
3395
|
+
if (c && o) {
|
|
3396
|
+
const l = De.get(o);
|
|
3384
3397
|
if (l) return l;
|
|
3385
3398
|
}
|
|
3386
|
-
function
|
|
3399
|
+
function i(l, v) {
|
|
3387
3400
|
return ie("#text", {}, l, v);
|
|
3388
3401
|
}
|
|
3389
3402
|
function f(l, v, _ = !1) {
|
|
3390
3403
|
let A = typeof l == "string" ? Ct(l) : l;
|
|
3391
3404
|
return !_ && typeof A == "string" && /[\r\n]/.test(A) && (A = A.replace(/\s+/g, " ")), ie("#text", {}, A, v);
|
|
3392
3405
|
}
|
|
3393
|
-
let
|
|
3406
|
+
let b = "";
|
|
3394
3407
|
for (let l = 0; l < e.length; l++)
|
|
3395
|
-
|
|
3396
|
-
const
|
|
3397
|
-
let
|
|
3408
|
+
b += e[l], l < s.length && (b += `{{${l}}}`);
|
|
3409
|
+
const y = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, m = [];
|
|
3410
|
+
let d, C = [], j = null, S = {}, L, p = 0;
|
|
3398
3411
|
const T = [], a = /* @__PURE__ */ new Set([
|
|
3399
3412
|
"pre",
|
|
3400
3413
|
"code",
|
|
@@ -3405,7 +3418,7 @@ function un(e, n, t) {
|
|
|
3405
3418
|
function k() {
|
|
3406
3419
|
if (j && a.has(j.toLowerCase()))
|
|
3407
3420
|
return !0;
|
|
3408
|
-
for (const l of
|
|
3421
|
+
for (const l of m)
|
|
3409
3422
|
if (a.has(l.tag.toLowerCase()))
|
|
3410
3423
|
return !0;
|
|
3411
3424
|
return !1;
|
|
@@ -3442,26 +3455,26 @@ function un(e, n, t) {
|
|
|
3442
3455
|
return;
|
|
3443
3456
|
}
|
|
3444
3457
|
if (fe(l)) {
|
|
3445
|
-
_.push(
|
|
3458
|
+
_.push(cn(l, void 0));
|
|
3446
3459
|
return;
|
|
3447
3460
|
}
|
|
3448
3461
|
if (Array.isArray(l)) {
|
|
3449
3462
|
if (l.length === 0) return;
|
|
3450
3463
|
for (let A = 0; A < l.length; A++) {
|
|
3451
3464
|
const N = l[A];
|
|
3452
|
-
Me(N) || fe(N) || Array.isArray(N) ? w(N, `${v}-${A}`) : N !== null && typeof N == "object" ?
|
|
3465
|
+
Me(N) || fe(N) || Array.isArray(N) ? w(N, `${v}-${A}`) : N !== null && typeof N == "object" ? Qe(N) ? _.push(
|
|
3453
3466
|
ie(
|
|
3454
3467
|
"#raw",
|
|
3455
3468
|
{},
|
|
3456
3469
|
N.__rawHTML,
|
|
3457
3470
|
`${v}-${A}`
|
|
3458
3471
|
)
|
|
3459
|
-
) : h(N) : _.push(
|
|
3472
|
+
) : h(N) : _.push(i(String(N), `${v}-${A}`));
|
|
3460
3473
|
}
|
|
3461
3474
|
return;
|
|
3462
3475
|
}
|
|
3463
3476
|
if (l !== null && typeof l == "object") {
|
|
3464
|
-
if (
|
|
3477
|
+
if (Qe(l)) {
|
|
3465
3478
|
const A = l.__rawHTML ?? "";
|
|
3466
3479
|
_.push(ie("#raw", {}, A, v));
|
|
3467
3480
|
return;
|
|
@@ -3469,7 +3482,7 @@ function un(e, n, t) {
|
|
|
3469
3482
|
h(l);
|
|
3470
3483
|
return;
|
|
3471
3484
|
}
|
|
3472
|
-
_.push(
|
|
3485
|
+
_.push(i(String(l), v));
|
|
3473
3486
|
}
|
|
3474
3487
|
const E = /* @__PURE__ */ new Set([
|
|
3475
3488
|
"area",
|
|
@@ -3487,18 +3500,18 @@ function un(e, n, t) {
|
|
|
3487
3500
|
"track",
|
|
3488
3501
|
"wbr"
|
|
3489
3502
|
]);
|
|
3490
|
-
for (;
|
|
3491
|
-
if (!(
|
|
3492
|
-
if (
|
|
3493
|
-
const l =
|
|
3503
|
+
for (; d = y.exec(b); )
|
|
3504
|
+
if (!(d[0].startsWith("<!--") && d[0].endsWith("-->"))) {
|
|
3505
|
+
if (d[1]) {
|
|
3506
|
+
const l = d[1], v = d[0][1] === "/", _ = d[0][d[0].length - 2] === "/" || E.has(l), {
|
|
3494
3507
|
props: A,
|
|
3495
3508
|
attrs: N,
|
|
3496
3509
|
directives: $,
|
|
3497
3510
|
bound: H
|
|
3498
|
-
} =
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3511
|
+
} = ln(
|
|
3512
|
+
d[2] || "",
|
|
3513
|
+
s,
|
|
3514
|
+
n ?? {}
|
|
3502
3515
|
), M = { props: {}, attrs: {} };
|
|
3503
3516
|
for (const D in A) M.props[D] = A[D];
|
|
3504
3517
|
for (const D in N) M.attrs[D] = N[D];
|
|
@@ -3530,9 +3543,9 @@ function un(e, n, t) {
|
|
|
3530
3543
|
audio: ["muted", "autoplay", "controls", "loop"],
|
|
3531
3544
|
img: ["src", "alt", "width", "height"],
|
|
3532
3545
|
button: ["type", "name", "value", "autofocus", "form"]
|
|
3533
|
-
}, R = l.toLowerCase(),
|
|
3546
|
+
}, R = l.toLowerCase(), ee = D[R] ?? [];
|
|
3534
3547
|
if (M.attrs) {
|
|
3535
|
-
for (const I of
|
|
3548
|
+
for (const I of ee)
|
|
3536
3549
|
if (H && H.includes(I) && I in M.attrs && !(M.props && I in M.props)) {
|
|
3537
3550
|
let P = M.attrs[I];
|
|
3538
3551
|
if (P && O(P))
|
|
@@ -3548,19 +3561,19 @@ function un(e, n, t) {
|
|
|
3548
3561
|
if (I === "disabled")
|
|
3549
3562
|
(P === "" || B === "boolean" || B === "string" && (P === "true" || P === "false") || P == null || B === "number") && (M.props[I] = P, delete M.attrs[I]);
|
|
3550
3563
|
else if (P === "" || B === "string" || B === "number" || B === "boolean" || P == null) {
|
|
3551
|
-
const
|
|
3552
|
-
M.props[I] =
|
|
3564
|
+
const U = (R === "select" || R === "option") && I === "value" ? String(P) : P;
|
|
3565
|
+
M.props[I] = U, delete M.attrs[I];
|
|
3553
3566
|
}
|
|
3554
3567
|
}
|
|
3555
3568
|
}
|
|
3556
3569
|
}
|
|
3557
|
-
if (l.includes("-") || !!
|
|
3570
|
+
if (l.includes("-") || !!n?.__customElements?.has?.(l)) {
|
|
3558
3571
|
if (M.isCustomElement = !0, H && M.attrs) {
|
|
3559
3572
|
const I = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
|
|
3560
3573
|
for (const P of H)
|
|
3561
3574
|
if (P in M.attrs && !(M.props && P in M.props)) {
|
|
3562
|
-
const B = P.includes("-") ?
|
|
3563
|
-
if (M.props[B] =
|
|
3575
|
+
const B = P.includes("-") ? Ge(P) : P, U = M.attrs[P];
|
|
3576
|
+
if (M.props[B] = U, I.has(P) || ft(P))
|
|
3564
3577
|
try {
|
|
3565
3578
|
const oe = F(M.attrs[P]);
|
|
3566
3579
|
oe === null ? delete M.attrs[P] : M.attrs[P] = oe;
|
|
@@ -3585,15 +3598,15 @@ function un(e, n, t) {
|
|
|
3585
3598
|
(D) => D === "model" || D.startsWith("model:")
|
|
3586
3599
|
))
|
|
3587
3600
|
try {
|
|
3588
|
-
const R = globalThis[/* @__PURE__ */ Symbol.for("cer.registry")],
|
|
3589
|
-
if (!!(l.includes("-") || I ||
|
|
3590
|
-
for (const
|
|
3591
|
-
if (
|
|
3592
|
-
const pe = $[
|
|
3601
|
+
const R = globalThis[/* @__PURE__ */ Symbol.for("cer.registry")], ee = !!(R && typeof R.has == "function" && R.has(l)), q = n, I = !!(q && (q.__customElements instanceof Set && q.__customElements.has(l) || Array.isArray(q.__isCustomElements) && q.__isCustomElements.includes(l)));
|
|
3602
|
+
if (!!(l.includes("-") || I || ee))
|
|
3603
|
+
for (const U of Object.keys($)) {
|
|
3604
|
+
if (U !== "model" && !U.startsWith("model:")) continue;
|
|
3605
|
+
const pe = $[U], oe = pe.arg ?? (U.includes(":") ? U.split(":", 2)[1] : void 0), V = pe.value, Be = oe ?? "modelValue", Je = z, gt = Re, ve = n?._state || n;
|
|
3593
3606
|
let se;
|
|
3594
|
-
if (typeof V == "string" &&
|
|
3595
|
-
se =
|
|
3596
|
-
|
|
3607
|
+
if (typeof V == "string" && ve)
|
|
3608
|
+
se = Je(
|
|
3609
|
+
ve,
|
|
3597
3610
|
V
|
|
3598
3611
|
);
|
|
3599
3612
|
else if (se = V, O(V))
|
|
@@ -3608,48 +3621,48 @@ function un(e, n, t) {
|
|
|
3608
3621
|
} catch {
|
|
3609
3622
|
}
|
|
3610
3623
|
M.isCustomElement = !0;
|
|
3611
|
-
const
|
|
3624
|
+
const Ze = `update:${X(Be)}`.replace(
|
|
3612
3625
|
/-([a-z])/g,
|
|
3613
3626
|
(ce, ne) => ne.toUpperCase()
|
|
3614
|
-
), bt = "on" +
|
|
3627
|
+
), bt = "on" + Ze.charAt(0).toUpperCase() + Ze.slice(1);
|
|
3615
3628
|
M.props[bt] = function(ce) {
|
|
3616
3629
|
const ne = ce.detail !== void 0 ? ce.detail : ce.target ? ce.target.value : void 0;
|
|
3617
|
-
if (
|
|
3630
|
+
if (ve)
|
|
3618
3631
|
if (V && O(V)) {
|
|
3619
3632
|
const ae = V.value;
|
|
3620
3633
|
if (Array.isArray(ne) && Array.isArray(ae) ? JSON.stringify([...ne].sort()) !== JSON.stringify([...ae].sort()) : ne !== ae) {
|
|
3621
3634
|
V.value = ne;
|
|
3622
3635
|
try {
|
|
3623
|
-
const le =
|
|
3636
|
+
const le = n;
|
|
3624
3637
|
if (le) {
|
|
3625
|
-
const
|
|
3626
|
-
typeof
|
|
3638
|
+
const Ee = le.requestRender, Se = le._requestRender;
|
|
3639
|
+
typeof Ee == "function" ? Ee() : typeof Se == "function" && Se();
|
|
3627
3640
|
}
|
|
3628
3641
|
} catch {
|
|
3629
3642
|
}
|
|
3630
3643
|
}
|
|
3631
3644
|
} else {
|
|
3632
|
-
const ae =
|
|
3633
|
-
|
|
3645
|
+
const ae = Je(
|
|
3646
|
+
ve || {},
|
|
3634
3647
|
typeof V == "string" ? V : String(V)
|
|
3635
3648
|
);
|
|
3636
3649
|
if (Array.isArray(ne) && Array.isArray(ae) ? JSON.stringify([...ne].sort()) !== JSON.stringify([...ae].sort()) : ne !== ae) {
|
|
3637
3650
|
gt(
|
|
3638
|
-
|
|
3651
|
+
ve || {},
|
|
3639
3652
|
typeof V == "string" ? V : String(V),
|
|
3640
3653
|
ne
|
|
3641
3654
|
);
|
|
3642
3655
|
try {
|
|
3643
|
-
const le =
|
|
3656
|
+
const le = n;
|
|
3644
3657
|
if (le) {
|
|
3645
|
-
const
|
|
3646
|
-
typeof
|
|
3658
|
+
const Ee = le.requestRender, Se = le._requestRender;
|
|
3659
|
+
typeof Ee == "function" ? Ee() : typeof Se == "function" && Se();
|
|
3647
3660
|
}
|
|
3648
3661
|
} catch {
|
|
3649
3662
|
}
|
|
3650
3663
|
}
|
|
3651
3664
|
}
|
|
3652
|
-
}, delete $[
|
|
3665
|
+
}, delete $[U];
|
|
3653
3666
|
}
|
|
3654
3667
|
} catch {
|
|
3655
3668
|
}
|
|
@@ -3675,57 +3688,57 @@ function un(e, n, t) {
|
|
|
3675
3688
|
}
|
|
3676
3689
|
I === 0 && P === C.length - 1 ? R = C : I > P ? R = [] : R = C.slice(I, P + 1);
|
|
3677
3690
|
}
|
|
3678
|
-
const
|
|
3691
|
+
const ee = ie(
|
|
3679
3692
|
j,
|
|
3680
3693
|
S,
|
|
3681
3694
|
R.length === 1 && fe(R[0]) && R[0].tag === "#text" ? typeof R[0].children == "string" ? R[0].children : "" : R.length ? R : void 0,
|
|
3682
3695
|
L
|
|
3683
|
-
), q =
|
|
3684
|
-
q ? (j = q.tag, S = q.props, L = q.key, C = q.children, C.push(
|
|
3685
|
-
} else _ ? j ? C.push(ie(l, M, void 0, void 0)) : T.push(ie(l, M, void 0, void 0)) : (j &&
|
|
3696
|
+
), q = m.pop();
|
|
3697
|
+
q ? (j = q.tag, S = q.props, L = q.key, C = q.children, C.push(ee)) : (T.push(ee), j = null, S = {}, L = void 0, C = []);
|
|
3698
|
+
} else _ ? j ? C.push(ie(l, M, void 0, void 0)) : T.push(ie(l, M, void 0, void 0)) : (j && m.push({
|
|
3686
3699
|
tag: j,
|
|
3687
3700
|
props: S,
|
|
3688
3701
|
children: C,
|
|
3689
3702
|
key: L
|
|
3690
3703
|
}), j = l, S = M, C = []);
|
|
3691
|
-
} else if (typeof
|
|
3692
|
-
const l = Number(
|
|
3704
|
+
} else if (typeof d[3] < "u") {
|
|
3705
|
+
const l = Number(d[3]), v = s[l], _ = `interp-${l}`;
|
|
3693
3706
|
w(v, _);
|
|
3694
|
-
} else if (
|
|
3695
|
-
const l =
|
|
3707
|
+
} else if (d[4]) {
|
|
3708
|
+
const l = d[4], v = j ? C : T, _ = l.split(/({{\d+}})/);
|
|
3696
3709
|
for (const A of _) {
|
|
3697
3710
|
if (!A) continue;
|
|
3698
3711
|
const N = A.match(/^{{(\d+)}}$/);
|
|
3699
3712
|
if (N) {
|
|
3700
|
-
const $ = Number(N[1]), H =
|
|
3713
|
+
const $ = Number(N[1]), H = s[$], M = `interp-${$}`;
|
|
3701
3714
|
w(H, M);
|
|
3702
3715
|
} else {
|
|
3703
|
-
const $ = `text-${
|
|
3716
|
+
const $ = `text-${p++}`, H = k();
|
|
3704
3717
|
v.push(f(A, $, H));
|
|
3705
3718
|
}
|
|
3706
3719
|
}
|
|
3707
3720
|
}
|
|
3708
3721
|
}
|
|
3709
3722
|
const g = T.filter((l) => fe(l) && l.tag === "#text" ? typeof l.children == "string" && l.children.trim() !== "" : !0).map(
|
|
3710
|
-
(l) =>
|
|
3723
|
+
(l) => Ve(l)
|
|
3711
3724
|
);
|
|
3712
3725
|
if (g.length === 1) {
|
|
3713
3726
|
const l = g[0];
|
|
3714
|
-
return
|
|
3727
|
+
return c && o && De.set(o, l), l;
|
|
3715
3728
|
} else if (g.length > 1) {
|
|
3716
3729
|
const l = g;
|
|
3717
|
-
return
|
|
3730
|
+
return c && o && De.set(o, l), l;
|
|
3718
3731
|
}
|
|
3719
3732
|
return ie("div", {}, "", "fallback-root");
|
|
3720
3733
|
}
|
|
3721
|
-
function
|
|
3734
|
+
function vn(e, ...s) {
|
|
3722
3735
|
if (kt()) return [];
|
|
3723
|
-
const t =
|
|
3724
|
-
return
|
|
3736
|
+
const t = s[s.length - 1], r = typeof t == "object" && t && !Array.isArray(t) ? t : void 0;
|
|
3737
|
+
return fn(e, s, r);
|
|
3725
3738
|
}
|
|
3726
3739
|
export {
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3740
|
+
bn as c,
|
|
3741
|
+
vn as h,
|
|
3742
|
+
Xt as v
|
|
3730
3743
|
};
|
|
3731
|
-
//# sourceMappingURL=template-compiler-
|
|
3744
|
+
//# sourceMappingURL=template-compiler-DtpNsqE-.js.map
|