ezh 0.1.3 → 0.1.5
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/lib/RbTree.js +110 -58
- package/lib/bundle.min.js +1 -1
- package/lib/debugCheck.js +14 -14
- package/lib/elements.js +391 -448
- package/lib/router.js +5 -5
- package/lib/state.js +26 -26
- package/package.json +4 -3
package/lib/RbTree.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a1, R, S, E, U, J, };
|
|
2
2
|
class F {
|
|
3
|
-
|
|
3
|
+
ae() {
|
|
4
4
|
return !this.k;
|
|
5
5
|
}
|
|
6
6
|
G(a) {
|
|
@@ -50,7 +50,7 @@ class F {
|
|
|
50
50
|
}
|
|
51
51
|
this.k.e = false;
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
r(a) {
|
|
54
54
|
const { c, d, parent } = a;
|
|
55
55
|
if (!c) {
|
|
56
56
|
if (!parent) {
|
|
@@ -93,11 +93,11 @@ class F {
|
|
|
93
93
|
c.e = false;
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
let
|
|
96
|
+
let u;
|
|
97
97
|
let replace;
|
|
98
98
|
let target = d;
|
|
99
99
|
if (!target.c) {
|
|
100
|
-
|
|
100
|
+
u = target;
|
|
101
101
|
replace = target.d;
|
|
102
102
|
}
|
|
103
103
|
else {
|
|
@@ -105,15 +105,15 @@ class F {
|
|
|
105
105
|
target = target.c;
|
|
106
106
|
} while (target.c);
|
|
107
107
|
replace = target.d;
|
|
108
|
-
|
|
109
|
-
if (
|
|
110
|
-
|
|
108
|
+
u = target.parent;
|
|
109
|
+
if (u.c === target) {
|
|
110
|
+
u.c = replace;
|
|
111
111
|
}
|
|
112
112
|
else {
|
|
113
|
-
|
|
113
|
+
u.d = replace;
|
|
114
114
|
}
|
|
115
115
|
if (replace) {
|
|
116
|
-
replace.parent =
|
|
116
|
+
replace.parent = u;
|
|
117
117
|
}
|
|
118
118
|
target.d = d;
|
|
119
119
|
d.parent = target;
|
|
@@ -132,14 +132,14 @@ class F {
|
|
|
132
132
|
target.parent = parent;
|
|
133
133
|
target.c = c;
|
|
134
134
|
c.parent = target;
|
|
135
|
-
const
|
|
135
|
+
const L = target.e;
|
|
136
136
|
target.e = a.e;
|
|
137
137
|
if (replace) {
|
|
138
138
|
replace.e = false;
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
|
-
if (!
|
|
142
|
-
this.H(
|
|
141
|
+
if (!L) {
|
|
142
|
+
this.H(u);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
H(parent) {
|
|
@@ -208,64 +208,90 @@ class F {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
y(a) {
|
|
211
|
-
const
|
|
212
|
-
a.d =
|
|
213
|
-
if (
|
|
214
|
-
|
|
211
|
+
const s = a.d;
|
|
212
|
+
a.d = s?.c;
|
|
213
|
+
if (s?.c) {
|
|
214
|
+
s.c.parent = a;
|
|
215
215
|
}
|
|
216
|
-
|
|
216
|
+
s.parent = a.parent;
|
|
217
217
|
if (!a.parent) {
|
|
218
|
-
this.k =
|
|
218
|
+
this.k = s;
|
|
219
219
|
}
|
|
220
220
|
else if (a === a.parent.c) {
|
|
221
|
-
a.parent.c =
|
|
221
|
+
a.parent.c = s;
|
|
222
222
|
}
|
|
223
223
|
else {
|
|
224
|
-
a.parent.d =
|
|
224
|
+
a.parent.d = s;
|
|
225
225
|
}
|
|
226
|
-
|
|
227
|
-
a.parent =
|
|
226
|
+
s.c = a;
|
|
227
|
+
a.parent = s;
|
|
228
228
|
}
|
|
229
229
|
z(a) {
|
|
230
|
-
const
|
|
231
|
-
a.c =
|
|
232
|
-
if (
|
|
233
|
-
|
|
230
|
+
const t = a.c;
|
|
231
|
+
a.c = t?.d;
|
|
232
|
+
if (t?.d) {
|
|
233
|
+
t.d.parent = a;
|
|
234
234
|
}
|
|
235
|
-
|
|
235
|
+
t.parent = a.parent;
|
|
236
236
|
if (!a.parent) {
|
|
237
|
-
this.k =
|
|
237
|
+
this.k = t;
|
|
238
238
|
}
|
|
239
239
|
else if (a === a.parent.d) {
|
|
240
|
-
a.parent.d =
|
|
240
|
+
a.parent.d = t;
|
|
241
241
|
}
|
|
242
242
|
else {
|
|
243
|
-
a.parent.c =
|
|
243
|
+
a.parent.c = t;
|
|
244
244
|
}
|
|
245
|
-
|
|
246
|
-
a.parent =
|
|
245
|
+
t.d = a;
|
|
246
|
+
a.parent = t;
|
|
247
247
|
}
|
|
248
248
|
k;
|
|
249
249
|
}
|
|
250
250
|
const _ = 1;
|
|
251
|
-
const
|
|
252
|
-
const
|
|
253
|
-
const
|
|
254
|
-
const
|
|
251
|
+
const B = 2;
|
|
252
|
+
const a1 = 0;
|
|
253
|
+
const R = 1;
|
|
254
|
+
const S = 2;
|
|
255
255
|
const E = 3;
|
|
256
|
-
class
|
|
256
|
+
class U extends F {
|
|
257
257
|
search(key) {
|
|
258
258
|
return this.I(key)?.value;
|
|
259
259
|
}
|
|
260
260
|
delete(key) {
|
|
261
261
|
const a = this.I(key);
|
|
262
262
|
if (a) {
|
|
263
|
-
this.
|
|
263
|
+
this.r(a);
|
|
264
|
+
return a.value;
|
|
265
|
+
}
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
aq(pop) {
|
|
269
|
+
let a = this.k;
|
|
270
|
+
if (a) {
|
|
271
|
+
while (a.c) {
|
|
272
|
+
a = a.c;
|
|
273
|
+
}
|
|
274
|
+
if (pop) {
|
|
275
|
+
this.r(a);
|
|
276
|
+
}
|
|
277
|
+
return a.value;
|
|
278
|
+
}
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
M(pop) {
|
|
282
|
+
let a = this.k;
|
|
283
|
+
if (a) {
|
|
284
|
+
while (a.d) {
|
|
285
|
+
a = a.d;
|
|
286
|
+
}
|
|
287
|
+
if (pop) {
|
|
288
|
+
this.r(a);
|
|
289
|
+
}
|
|
264
290
|
return a.value;
|
|
265
291
|
}
|
|
266
292
|
return;
|
|
267
293
|
}
|
|
268
|
-
|
|
294
|
+
A(key, value, $) {
|
|
269
295
|
let a = this.k;
|
|
270
296
|
if (a) {
|
|
271
297
|
let i;
|
|
@@ -298,7 +324,7 @@ class W extends F {
|
|
|
298
324
|
this.k = { key, value, e: false, parent: undefined, c: undefined, d: undefined };
|
|
299
325
|
return;
|
|
300
326
|
}
|
|
301
|
-
|
|
327
|
+
af(o, n) {
|
|
302
328
|
let f = 0;
|
|
303
329
|
let a = this.k;
|
|
304
330
|
if (a) {
|
|
@@ -332,7 +358,7 @@ class W extends F {
|
|
|
332
358
|
for (;;) {
|
|
333
359
|
const p = o(a.key, a.value);
|
|
334
360
|
f++;
|
|
335
|
-
if (p &
|
|
361
|
+
if (p & B) {
|
|
336
362
|
(j ?? (j = [])).push(a);
|
|
337
363
|
}
|
|
338
364
|
if (p & _) {
|
|
@@ -356,7 +382,7 @@ class W extends F {
|
|
|
356
382
|
if (j) {
|
|
357
383
|
let b = j.length;
|
|
358
384
|
while (b > 0) {
|
|
359
|
-
this.
|
|
385
|
+
this.r(j[--b]);
|
|
360
386
|
}
|
|
361
387
|
}
|
|
362
388
|
}
|
|
@@ -396,7 +422,7 @@ class W extends F {
|
|
|
396
422
|
for (;;) {
|
|
397
423
|
const p = o(a.key, a.value);
|
|
398
424
|
f++;
|
|
399
|
-
if (p &
|
|
425
|
+
if (p & B) {
|
|
400
426
|
(j ?? (j = [])).push(a);
|
|
401
427
|
}
|
|
402
428
|
if (p & _) {
|
|
@@ -420,7 +446,7 @@ class W extends F {
|
|
|
420
446
|
if (j) {
|
|
421
447
|
let b = j.length;
|
|
422
448
|
while (b > 0) {
|
|
423
|
-
this.
|
|
449
|
+
this.r(j[--b]);
|
|
424
450
|
}
|
|
425
451
|
}
|
|
426
452
|
}
|
|
@@ -452,7 +478,7 @@ class J extends F {
|
|
|
452
478
|
search(key) {
|
|
453
479
|
let a = this.k;
|
|
454
480
|
if (a) {
|
|
455
|
-
const {
|
|
481
|
+
const { v: D } = this;
|
|
456
482
|
let q;
|
|
457
483
|
while ((q = D(key, a)) !== 0) {
|
|
458
484
|
if (q < 0) {
|
|
@@ -475,19 +501,45 @@ class J extends F {
|
|
|
475
501
|
delete(key) {
|
|
476
502
|
const a = this.search(key);
|
|
477
503
|
if (a) {
|
|
478
|
-
this.
|
|
504
|
+
this.r(a);
|
|
479
505
|
a.e = undefined;
|
|
480
506
|
return a;
|
|
481
507
|
}
|
|
482
508
|
return;
|
|
483
509
|
}
|
|
484
|
-
|
|
510
|
+
aq(pop) {
|
|
511
|
+
let a = this.k;
|
|
512
|
+
if (a) {
|
|
513
|
+
while (a.c) {
|
|
514
|
+
a = a.c;
|
|
515
|
+
}
|
|
516
|
+
if (pop) {
|
|
517
|
+
this.r(a);
|
|
518
|
+
}
|
|
519
|
+
return a;
|
|
520
|
+
}
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
M(pop) {
|
|
524
|
+
let a = this.k;
|
|
525
|
+
if (a) {
|
|
526
|
+
while (a.d) {
|
|
527
|
+
a = a.d;
|
|
528
|
+
}
|
|
529
|
+
if (pop) {
|
|
530
|
+
this.r(a);
|
|
531
|
+
}
|
|
532
|
+
return a;
|
|
533
|
+
}
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
A(i, $) {
|
|
485
537
|
if (i.e !== undefined) {
|
|
486
538
|
throw new Error('Cannot insert a node which is already in an ObjRbTree');
|
|
487
539
|
}
|
|
488
540
|
let a = this.k;
|
|
489
541
|
if (a) {
|
|
490
|
-
const {
|
|
542
|
+
const { v: D } = this;
|
|
491
543
|
let q;
|
|
492
544
|
while ((q = D(i, a)) !== 0) {
|
|
493
545
|
if (q < 0) {
|
|
@@ -539,15 +591,15 @@ class J extends F {
|
|
|
539
591
|
this.k = i;
|
|
540
592
|
return;
|
|
541
593
|
}
|
|
542
|
-
|
|
594
|
+
af(o, n) {
|
|
543
595
|
let f = 0;
|
|
544
596
|
let a = this.k;
|
|
545
597
|
if (a) {
|
|
546
598
|
const stack = [];
|
|
547
599
|
if (n) {
|
|
548
|
-
const {
|
|
600
|
+
const { v } = this;
|
|
549
601
|
for (;;) {
|
|
550
|
-
const q =
|
|
602
|
+
const q = v(n, a);
|
|
551
603
|
if (q < 0) {
|
|
552
604
|
if (a.c) {
|
|
553
605
|
stack.push(a);
|
|
@@ -575,7 +627,7 @@ class J extends F {
|
|
|
575
627
|
for (;;) {
|
|
576
628
|
const p = o(a);
|
|
577
629
|
f++;
|
|
578
|
-
if (p &
|
|
630
|
+
if (p & B) {
|
|
579
631
|
(j ?? (j = [])).push(a);
|
|
580
632
|
}
|
|
581
633
|
if (p & _) {
|
|
@@ -599,7 +651,7 @@ class J extends F {
|
|
|
599
651
|
if (j) {
|
|
600
652
|
let b = j.length;
|
|
601
653
|
while (b > 0) {
|
|
602
|
-
this.
|
|
654
|
+
this.r(j[--b]);
|
|
603
655
|
}
|
|
604
656
|
}
|
|
605
657
|
}
|
|
@@ -611,9 +663,9 @@ class J extends F {
|
|
|
611
663
|
if (a) {
|
|
612
664
|
const stack = [];
|
|
613
665
|
if (n) {
|
|
614
|
-
const {
|
|
666
|
+
const { v } = this;
|
|
615
667
|
for (;;) {
|
|
616
|
-
const q =
|
|
668
|
+
const q = v(n, a);
|
|
617
669
|
if (q > 0) {
|
|
618
670
|
if (a.d) {
|
|
619
671
|
stack.push(a);
|
|
@@ -641,7 +693,7 @@ class J extends F {
|
|
|
641
693
|
for (;;) {
|
|
642
694
|
const p = o(a);
|
|
643
695
|
f++;
|
|
644
|
-
if (p &
|
|
696
|
+
if (p & B) {
|
|
645
697
|
(j ?? (j = [])).push(a);
|
|
646
698
|
}
|
|
647
699
|
if (p & _) {
|
|
@@ -665,7 +717,7 @@ class J extends F {
|
|
|
665
717
|
if (j) {
|
|
666
718
|
let b = j.length;
|
|
667
719
|
while (b > 0) {
|
|
668
|
-
this.
|
|
720
|
+
this.r(j[--b]);
|
|
669
721
|
}
|
|
670
722
|
}
|
|
671
723
|
}
|
package/lib/bundle.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{ye:()=>q,N_:()=>$e,Wt:()=>je,Ix:()=>Pe,On:()=>M,er:()=>ee,te:()=>L,oo:()=>we,LU:()=>N,wE:()=>Ee,J0:()=>te});class r{a4(){return!this.k}G(e){for(;e.parent?.e;){let t=e.parent,r=t.parent;if(t===r.c){const n=r.d;n?.e?(t.e=!1,n.e=!1,r.e=!0,e=r):(e===t.d&&(e=t,this.y(e),t=e.parent,r=t.parent),t.e=!1,r.e=!0,this.z(r))}else{const n=r.c;!0===n?.e?(t.e=!1,n.e=!1,r.e=!0,e=r):(e===t.c&&(e=t,this.z(e),t=e.parent,r=t.parent),t.e=!1,r.e=!0,this.y(r))}}this.k.e=!1}v(e){const{c:t,d:r,parent:n}=e;if(!t)return n?(n.c===e?n.c=r:n.d=r,r?(r.parent=n,void(r.e=!1)):void(e.e||this.H(n))):(this.k=r,void(r&&(r.parent=void 0,r.e=!1)));if(!r)return n?n.c===e?n.c=t:n.d=t:this.k=t,t.parent=n,void(t.e=!1);let i,a,s=r;if(s.c){do{s=s.c}while(s.c);a=s.d,i=s.parent,i.c===s?i.c=a:i.d=a,a&&(a.parent=i),s.d=r,r.parent=s}else i=s,a=s.d;n?n.c===e?n.c=s:n.d=s:this.k=s,s.parent=n,s.c=t,t.parent=s;const o=s.e;s.e=e.e,a?a.e=!1:o||this.H(i)}H(e){let t,r;for(;;){if(t===e.c){if(r=e.d,r.e){this.y(e),r.e=!1,e.e=!0,r=e.d;continue}if(r.d?.e)return this.y(e),r.e=e.e,e.e=!1,void(r.d.e=!1);if(r.c?.e){r.c.e=!1,this.z(r),r.e=!0,r=e.d;continue}}else{if(r=e.c,r.e){this.z(e),r.e=!1,e.e=!0,r=e.c;continue}if(r.c?.e)return this.z(e),r.e=e.e,e.e=!1,void(r.c.e=!1);if(r.d?.e){r.d.e=!1,this.y(r),r.e=!0,r=e.c;continue}}if(e.e)return e.e=!1,void(r.e=!0);if(r.e=!0,t=e,!t.parent)return;e=t.parent}}y(e){const t=e.d;e.d=t?.c,t?.c&&(t.c.parent=e),t.parent=e.parent,e.parent?e===e.parent.c?e.parent.c=t:e.parent.d=t:this.k=t,t.c=e,e.parent=t}z(e){const t=e.c;e.c=t?.d,t?.d&&(t.d.parent=e),t.parent=e.parent,e.parent?e===e.parent.d?e.parent.d=t:e.parent.c=t:this.k=t,t.d=e,e.parent=t}k}class n extends r{search(e){return this.I(e)?.value}delete(e){const t=this.I(e);if(t)return this.v(t),t.value}C(e,t,r){let n=this.k;if(n){let i;for(;e!==n.key;){if(e<n.key){if(n.c){n=n.c;continue}i={key:e,value:t,e:!0,parent:n,c:void 0,d:void 0},n.c=i}else{if(n.d){n=n.d;continue}i={key:e,value:t,e:!0,parent:n,c:void 0,d:void 0},n.d=i}return void this.G(i)}const a=n.value;return r&&(n.value=t),a}this.k={key:e,value:t,e:!1,parent:void 0,c:void 0,d:void 0}}a5(e,t){let r=0,n=this.k;if(n){const i=[];if(void 0!==t)for(;;){if(t<n.key){if(n.c){i.push(n),n=n.c;continue}}else if(t>n.key){if(n.d){n=n.d;continue}return r}break}else for(;n.c;)i.push(n),n=n.c;let a;for(;;){const t=e(n.key,n.value);if(r++,2&t&&(a??(a=[])).push(n),1&t){r=-r;break}if(n.d)for(n=n.d;n.c;)i.push(n),n=n.c;else if(n=i.pop(),!n)break}if(a){let e=a.length;for(;e>0;)this.v(a[--e])}}return r}O(e,t){let r=0,n=this.k;if(n){const i=[];if(void 0!==t)for(;;){if(t>n.key){if(n.d){i.push(n),n=n.d;continue}}else if(t<n.key){if(n.c){n=n.c;continue}return r}break}else for(;n.d;)i.push(n),n=n.d;let a;for(;;){const t=e(n.key,n.value);if(r++,2&t&&(a??(a=[])).push(n),1&t){r=-r;break}if(n.c)for(n=n.c;n.d;)i.push(n),n=n.d;else if(n=i.pop(),!n)break}if(a){let e=a.length;for(;e>0;)this.v(a[--e])}}return r}I(e){let t=this.k;if(t)for(;e!==t.key;){if(e<t.key){if(t.c){t=t.c;continue}}else if(t.d){t=t.d;continue}return}return t}}const i={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBrailleLabel:"aria-braillelabel",ariaBrailleRoleDescription:"aria-brailleroledescription",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",alignmentBaseline:"alignment-baseline",annotationXml:"annotation-xml",baselineShift:"baseline-shift",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",pointerEvents:"pointer-events",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",style:"style",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",unicodeBidi:"unicode-bidi",vectorEffect:"vector-effect",wordSpacing:"word-spacing",writingMode:"writing-mode"},a={},s=[];Object.freeze(a),Object.freeze(s);const o=()=>!1,l=[],c=new Set,h=new n,u=new n,d=[],f=[],p={id:"",index:0,firstElement:null,attachTo:o,move:o,detachFrom:o,update:o,refresh:o,release:o,version:0,parentCom:{},markChanged:o,watchMountChange:o};let m,v="",g=2e4,y=0,b=0;const w=new n,k=new Map;let x=p,C=(e,t)=>document.createElement(e);const E={svg:(e,t)=>(t.a9(),document.createElementNS("http://www.w3.org/2000/svg",e)),math:(e,t)=>(t.a9(),document.createElementNS("http://www.w3.org/1998/Math/MathML",e)),foreignObject:(e,t)=>"foreignObject"!==e?document.createElement(e):(t.a9(),document.createElementNS("http://www.w3.org/2000/svg",e))},P=()=>{if(++b>=y){for(const e of c)if(c.delete(e),e.id)e.release();else if(--b<y){c.add(e);break}}else c.add(Object.create(p));m&&(m=setTimeout(P,g))},S=(e,t)=>{const r=["",t];for(;e.constructor!==T;)r.push(e.id),e=e.parent;return r.reverse().join(",")},$=()=>{do{w.a5(((e,t)=>{const{newChildren:r,parent:n}=t;return r&&(n&&R(n)?(t.refresh(r),n.currentBefore=void 0):t.constructor===I&&h.C(e,t)),2}))}while(!w.a4());for(const{parent:e,element:t}of l)if(t.detachFrom(a),t.parent!==e&&!u.a4()&&R(e)){const r=!t.parent,n=S(e,t.id);u.a5(((e,t)=>e.startsWith(n)?(t._(t.D,r),2):1),n)}l.length=0},j=(e,t=[],r=0)=>{let n=e[r];for(;;){if(n&&void 0!==n.id)t.push(n);else if(null!=n)switch(typeof n){case"object":j(n,t);break;case"function":n=n();continue;case"boolean":case"number":case"bigint":n=""+n;default:t.push(new F("",n))}if(!(++r<e.length))break;n=e[r]}return t},A=(e,t,r)=>{let n;const i=e.length;let a=t,s=0;for(;s<i;){const t=e[s];if(t!==a[s]){if(s===a.length)return a;const e=a[s];if(!e||void 0===e.id){a=j(a,a.slice(0,s),s);continue}if(n!==a)break}n||t.parent===r||(n=e),s++}return s===a.length?n:a===t?j(a,e.slice(0,s),s):a},R=e=>{let t=e;do{if(t.constructor===T)return!0;t=t.parent}while(t);return!1},B=(e,t,r,n)=>{let i,a,s;if(t!==e&&e.length){const o=[];let l;for(a=t.length,i=1e7;--a>=0;)if(s=t[a],s.parent===r){const e=a-s.index;e===i?(l.H++,s.index=a):(l={from:s.index,to:a,H:1},i=e,s.index=-o.push(l))}else 1e7!==i&&(i=1e7);const c=[];for(a=e.length-1;a>=0;)s=e[a],s.index<0?(l=o[-s.index-1],c.push(l),a-=l.H):(s.detachFrom(r),a--);let h,u,d=0;for(a=t.length-1;a>=0;)if(s=t[a],s.parent!==r)s.index=a--,s.attachTo(r);else{if(l=o[-s.index-1],u=l.H,h=c[d],s.index=a,!n){if(h===l){d++,a-=l.H,r.currentBefore=void 0;continue}if(h.from>l.from){i=d;do{u-=h.H,h=c[++i]}while(h.from>l.from&&u>0);if(u>0){a-=l.H,r.currentBefore=void 0,d=i;continue}}}i=a-l.H;do{s.move()}while(--a>i&&(s=t[a]))}}else for(a=t.length-1;a>=0;a--)s=t[a],s.index=a,r!==s.parent&&s.attachTo(r);r.currentBefore=void 0};class F{constructor(e,t){this.id=e,this.parent=void 0,this.index=0,this.n=0,this.ag=t}id;parent;index;firstElement;attachTo(e){this.firstElement||(this.firstElement=document.createTextNode(this.ag));const{parent:t,firstElement:r,index:n}=this;this.id&&(this.n++||c.delete(this),t&&(r.remove(),l.push({parent:t,element:this}))),this.parent=e;let i=e.currentBefore;void 0===i&&(i=e.findNextSiblingElement(n)),e.element.insertBefore(r,i),e.currentBefore=r}move(){const{parent:e,index:t,firstElement:r}=this;let n=e.currentBefore;void 0===n&&(n=e.findNextSiblingElement(t)),e.element.insertBefore(r,n),e.currentBefore=r}detachFrom(e){this.parent===e?(this.firstElement.remove(),this.parent=void 0,this.id&&l.push({parent:e,element:this})):this.id&&! --this.n&&(y?c.add(this):this.release())}update(e){return this.ag!==e&&(this.ag=e,this.firstElement&&(this.firstElement.nodeValue=e)),!1}refresh(){}release(e){e&&this.parent===e&&(this.firstElement.remove(),this.parent=void 0),this.id&&--this.n<=0&&k.delete(this.id)}n;ag}class O{constructor(e,t,r){this.id=e,this.parent=void 0,this.index=0,this.n=0,this.newChildren=this.d=r?j(t):t||s,this.currentBefore=void 0}id;parent;index;newChildren;currentBefore;get element(){return this.parent.element}get firstElement(){const{d:e}=this;for(let t=0;t<e.length;t++){const r=e[t].firstElement;if(r)return r}return null}attachTo(e){const{parent:t,d:r,newChildren:n}=this;if(this.n++||c.delete(this),t){l.push({parent:t,element:this});for(let e=r.length-1;e>=0;e--)r[e].detachFrom(this)}this.parent=e;const i=n||r;for(let e=i.length-1;e>=0;e--){const t=i[e];t.index=e,t.attachTo(this)}e.currentBefore=this.currentBefore,this.currentBefore=void 0,this.d=i,this.newChildren=void 0}move(){const{d:e,newChildren:t}=this;if(t)B(e,t,this,!0),this.d=t,this.newChildren=void 0;else{for(let t=e.length-1;t>=0;t--)e[t].move();this.currentBefore=void 0}}detachFrom(e){if(this.parent===e){const{d:t}=this;for(const e of t)e.detachFrom(this);this.parent=void 0,l.push({parent:e,element:this})}else--this.n||(y?c.add(this):this.release())}update(e,t){if(t){const e=A(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}refresh(e){B(this.d,e,this),this.d=e,this.newChildren=void 0}release(e){if(e&&this.parent===e){const{d:e}=this;for(const t of e)t.detachFrom(this);this.parent=void 0}--this.n<=0&&k.delete(this.id)}findNextSiblingElement(e){const t=this.newChildren||this.d;let r,n=e+1,i=t[n];for(;i;){if(r=i.firstElement,r)return r;i=t[++n]}return r=this.parent.currentBefore,void 0!==r?r:this.parent.findNextSiblingElement(this.index)}n;d}class z{constructor(e,t,r,n,i,o){if(this.id=e,this.parent=void 0,this.index=0,this.n=0,this.firstElement=this.element=C(t,this),this.newChildren=this.d=o?j(n):n||s,this.currentBefore=void 0,r){if(this.p=a,this.u=-1,"select"===t){const e=this.element,t=r,n=t.value;if(n){t.value=void 0;const r=this.refresh;this.refresh=i=>{if(B(this.d,i,this),this.d=i,this.newChildren=void 0,Array.isArray(n)){const t=n,[r,i,a]=t;e.value=a;const s=t[3]=e=>r[i]=e.target.value;e.addEventListener("change",s)}else e.value=n;t.value=n,this.refresh=r}}}this.update(r),this.u=i??0}else this.p=r,this.u=0}id;element;parent;newChildren;index;currentBefore;firstElement;attachTo(e){const{parent:t,element:r,newChildren:n,index:i}=this;this.n++||c.delete(this),t&&(r.remove(),l.push({parent:t,element:this})),this.parent=e,n&&this.refresh(n);let a=e.currentBefore;void 0===a&&(a=e.findNextSiblingElement(i)),e.element.insertBefore(r,a),e.currentBefore=r}move(){const{parent:e,newChildren:t,index:r,element:n}=this;t&&this.refresh(t);let i=e.currentBefore;void 0===i&&(i=e.findNextSiblingElement(r)),e.element.insertBefore(n,i),e.currentBefore=n}detachFrom(e){this.parent===e?(this.element.remove(),this.parent=void 0,l.push({parent:e,element:this})):--this.n||(y?c.add(this):this.release())}update(e,t){const{element:r,p:n,u:s}=this;if(n&&s){this.p=e;let t=s;for(const s in e){const o=e[s],l=n[s];if(o!==l)if(null!=o)switch(typeof o){case"string":{const e=i[s];e?r.setAttribute(e,o):r[s]=o;break}case"number":case"boolean":case"function":r[s]=o;break;default:if(Array.isArray(o)){const[e,t,n]=o;if(l){const[i,a,c,h]=l;if(c!==n&&r[s]!==n&&(r[s]=n),i===e&&a===t)o[3]=h;else{const n=o[3]=r=>e[t]=r.target[s];r.removeEventListener("change",h),r.addEventListener("change",n)}}else{r[s]=n;const i=o[3]=r=>e[t]=r.target[s];r.addEventListener("change",i)}break}if("style"===s){if(!l){const t=r.style,n={};let i=0;for(const e in o){const r=o[e];n[e]=r,i++,t[e]=r}e[s]=n,n.k=i;break}const t=r.style,n={};let i=0,a=l.k;for(const e in o){const r=o[e];n[e]=r,e in l&&a--,i++,r!==l[s]&&(t[e]=r)}if(e[s]=n,n.k=i,a)for(const e in l)if(!(e in o)&&(t[e]=null,! --a))break;break}r[s]=o}else switch(typeof l){case"string":{const e=i[s];e?this.element.removeAttribute(e):this.element[s]=o;break}case"object":l?Array.isArray(l)?r.removeEventListener("change",l[3]):l===a&&(r[s]=o):r[s]=o;break;default:r[s]=o}if(! --t)break}}if(t){const e=A(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}refresh(e){B(this.d,e,this),this.d=e,this.newChildren=void 0}release(e){if(e&&this.parent===e&&(this.element.remove(),this.parent=void 0),--this.n<=0){const{d:e}=this;for(const t of e)t.release(this);k.delete(this.id)}}findNextSiblingElement(e){const t=this.newChildren||this.d;let r,n=e+1,i=t[n];for(;i;){if(r=i.firstElement,r)return r;i=t[++n]}return null}a9(){this.update=this.aP}aP(e,t){const{element:r,p:n,u:a}=this;if(n&&a){this.p=e;let t=a;for(const a in e){const s=e[a],o=n[a];if(s!==o)if(null!=s)switch(typeof s){case"string":r.setAttribute(i[a]??a,s);break;case"number":case"boolean":r.setAttribute(i[a]??a,""+s);break;case"function":r[a]=s;break;default:if("style"===a){if(!o){const t=r.style,n={};let i=0;for(const e in s){const r=s[e];n[e]=r,i++,t[e]=r}e[a]=n,n.k=i;break}const t=r.style,n={};let i=0,l=o.k;for(const e in s){const r=s[e];n[e]=r,e in o&&l--,i++,r!==o[a]&&(t[e]=r)}if(e[a]=n,n.k=i,l)for(const e in o)if(!(e in s)&&(t[e]=null,! --l))break;break}r[a]=s}else switch(typeof o){case"string":case"number":case"boolean":r.removeAttribute(i[a]??a);break;default:r[a]=s}if(! --t)break}}if(t){const e=A(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}n;p;d;u}class I{constructor(e,t,r,n,i,a,o){this.id=e,this.parentCom=t,this.parent=void 0,this.index=0,this.version=0,this.n=0,this.aC=r,this.p=n,this.newChildren=this.d=o?j(i):i||s,this.u=a??0}id;parentCom;parent;newChildren;index;version;get firstElement(){return this.j?.firstElement||null}attachTo(e){const{parent:t,newChildren:r,j:n}=this;this.parent=e,r?this.refresh(r):n&&(n.index=this.index,n.attachTo(e)),this.n++||c.delete(this),t&&l.push({parent:t,element:this})}move(){const{newChildren:e,j:t}=this;e?this.refresh(e):t&&(t.index=this.index,t.move())}detachFrom(e){this.parent===e?(this.j?.detachFrom(e),this.parent=void 0,l.push({parent:e,element:this})):--this.n||(y?c.add(this):this.release())}update(e,t){const{p:r,d:n,u:i}=this;if(this.p=e,t){const e=A(n,t,this.parent);if(e)return this.newChildren=e,!0}if(!this.newChildren&&i){let t=i;for(const i in r){if(r[i]!==e[i])return this.newChildren=n,!0;if(! --t)break}}return!1}refresh(e){const{id:t,parent:r,j:n,index:i}=this,s=x;x=this;let o=this.aC(this.p||a,e);if(o!==n)switch(typeof o){case"boolean":case"number":case"bigint":o=""+o;case"string":o=new F("",o),this.j=o,o.index=i,o.attachTo(r),n?.detachFrom(r);break;default:o?(this.j=o,o.index=i,o.attachTo(r),n?.detachFrom(r),h.a4()||h.a5(((e,r)=>e.startsWith(t)?r.parent&&R(r.parent)?(w.C(e,r),2):0:1),t)):(this.j=void 0,n?.detachFrom(r))}else n&&(n.parent!==r?(n.index=i,n.attachTo(r)):n.index!==i&&(n.index=i,n.move()));this.d=e,this.newChildren=void 0,x=s}release(e){e&&this.parent===e&&(this.j?.detachFrom(e),this.parent=void 0),--this.n<=0&&(this.newChildren&&h.delete(this.id),k.delete(this.id))}markChanged(){return!this.newChildren&&(this.newChildren=this.d,!0)}watchMountChange(e,t,r){const n=S(this.parent,this.id);u.C(n+e,{_:t,D:r},!0)}n;aC;p;d;u;j}class T{constructor(e,t){this.id=e,this.element=t,this.currentBefore=void 0}id;element;parent;currentBefore;findNextSiblingElement(e){return null}render(e){this.ah||(this.ah=new I(this.id,p,e,null,s),k.set(this.id,this.ah),this.ah.attachTo(this))}ah}const M=(e,t)=>{if(x.id){let r=e[t];r||(r=new Map,e[t]=r),r.set(x.id,x.version)}};let N=(e,t)=>{const r=e[t];if(r){for(const[e,t]of r){const r=k.get(e);r?.version===t&&r.markChanged()&&(w.a4()&&queueMicrotask($),w.C(e,r))}r.clear()}};const L=(e,t=2e4)=>{if(e>=0&&t>=1e3){if(g=t,y&&clearTimeout(m),e)m=setTimeout(P,g);else if(m){m=void 0;for(let e=0;e<y;e++)P()}return y=e,!0}return!1},U=()=>{v=f.pop()};var q;!function(e){e.render=(e,t)=>{const r=(d.length||"")+"|",n=new T(r,e);d.push(n),n.render(t)},e.$=(e,t,r,n,i,a)=>{const s=`${x.id}${e}${v}`;let o=k.get(s);return o?((r||n)&&o.update(r,n)&&w.C(s,o),o):(o=new z(s,t,r,n,i,a),k.set(s,o),o)},e.$c=(e,t,r,n,i,a)=>{const s=`${x.id}${e}${v}`;let o=k.get(s);return o?((r||n)&&o.update(r,n)&&w.C(s,o),o):(o=new I(s,x,t,r,n,i,a),k.set(s,o),o)},e.$f=(e,t,r)=>{const n=`${x.id}${e}${v}`;let i=k.get(n);return i?(t&&i.update(null,t)&&w.C(n,i),i):(i=new O(n,t,r),k.set(n,i),i)},e.$k=e=>(f.push(v),v=`${v||"{"}${e}}`,U),e.$n=e=>{const t=C;return C=E[e],()=>{C=t}},e.$s=(e,t)=>(e(),t),e.$t=(e,t,r)=>{const n=`${x.id}${e}${v}`;let i=k.get(n);return i?(r&&i.update(t),i):(i=new F(n,t),k.set(i.id,i),i)}}(q||(q={}));const H=Symbol(),_=Array.prototype,D=M;let Z=(e,t)=>{Z=N,Z(e,t)},V=!1;const W=new WeakMap,Q=e=>function(...t){const r=this.length;let n,i,a;switch(e){case _.push:n=r,i=n+t.length,a=r;break;case _.unshift:n=0,i=t.length,a=r;break;case _.fill:n=t[1],void 0===n||n<=-r?n=0:n<0&&(n=r+n),i=t[2],void 0===i||i>r?i=r:i<=-r?i=0:i<0&&(i=r+i),a=i;break;case _.sort:case _.reverse:n=i=0,a=r;break;case _.pop:n=i=r-1,a=r;break;case _.shift:n=i=0,a=r;break;default:n=t[0],n<0&&(n=r+n),i=t.length>2?t.length-2:0,a=t[1],void 0===a&&(a=r-n),a=a>0?a!==i?r:n+i:i?r:n,i+=n}const s=e.bind(this)(...t),o=this[H];let l;for(let e=n;e<i;e++){switch(l=this[e],typeof l){case"object":if(l){for(;e<i;)l=this[e],l&&!l[H]&&(this[e]=X(l)),e++;break}case"undefined":continue}break}return r!==this.length&&Z(o,"length"),Z(o,Symbol.iterator),s},G={push:Q(_.push),unshift:Q(_.unshift),fill:Q(_.fill),sort:Q(_.sort),reverse:Q(_.reverse),pop:Q(_.pop),shift:Q(_.shift),splice:Q(_.splice)},J={get(e,t){if(t!==H){let r=e[t];if(r&&r===_[t]){const n=G[t];if(n)return n.bind(e);r=r.bind(e)}return D(e[H],"length"!==t?Symbol.iterator:t),r}return e},set(e,t,r){if(t!==H){if(e[t]===r)return!0;const n=e[H];return r&&"object"==typeof r&&(r=X(r)),e[t]=r,"length"===t&&Z(n,t),Z(n,Symbol.iterator),!0}return((e,t)=>{const r=t.length,n=e.length;let i;for(let n=0;n<r;n++){let a=t[n];if(a&&"object"==typeof a){do{a=t[n],i=e[n],a?i?i!==a&&(i[H]=a):e[n]=X(a):e[n]=a}while(++n<r);break}if(null!=a){do{e[n]=t[n]}while(++n<r);break}e[n]=a}const a=e[H];n!==r&&(n>r&&(e.length=r),Z(a,"length")),Z(a,Symbol.iterator)})(e,r),!0},has:(e,t)=>(D(e[H],isNaN(parseInt(t))?t:Symbol.iterator),t in e),deleteProperty:(e,t)=>(isNaN(parseInt(t))||(t=Symbol.iterator),void 0!==e[t]&&Z(e[H],t),delete e[t])},K={get(e,t){if(t!==H){const r=e[t];return"id"!==t&&D(e[H],t),r}return e},set(e,t,r,n){if(t!==H){if(e[t]===r)return!0;const n=e[H];return r&&"object"==typeof r&&(r=X(r)),e[t]=r,Z(n,t),!0}return((e,t,r)=>{const n={...e};let i;for(const a in r){delete n[a];const s=r[a];s&&"object"==typeof s&&(i=e[a],i)?i[H]=s:e[a]!==s&&(t[a]=s)}for(const e in n)delete t[e]})(e,n,r),!0},has:(e,t)=>(D(e[H],t),t in e),deleteProperty:(e,t)=>(void 0!==e[t]&&Z(e[H],t),delete e[t])},X=e=>{let t;if(Array.isArray(e)){t=[];const r=e.length;for(let n=0;n<r;n++){let i=e[n];if(i&&"object"==typeof i){do{t[n]=(i=e[n])&&X(i)}while(++n<r);break}if(null!=i){do{t[n]=e[n]}while(++n<r);break}t[n]=i}e=new Proxy(t,J)}else{t={};for(const r in e){const n=e[r];t[r]=n&&"object"==typeof n?X(n):n}e=new Proxy(t,K)}return t[H]={},e},Y=(e,t)=>{t?e.w=!0:e.com.watchMountChange("s",Y,e)},ee=(e,t)=>[e,t,e[t]],te=(e,t)=>{const r=x;if(r.id){let n=W.get(r);if(n){const t=n.e;return n.w?(V=!0,"function"==typeof e&&(e=e()),t[H]=e,V=!1,n.w=!1,r.watchMountChange("s",Y,n)):"function"==typeof e&&(V=!0,(e=e(t))!==t&&(t[H]=e),V=!1),t}"function"==typeof e&&(e=e());const i=X(e);return n={com:r,e:i,w:!1},W.set(r,n),t&&r.watchMountChange("s",Y,n),i}return"function"==typeof e&&(e=e()),X(e)};var re=function(){return re=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},re.apply(this,arguments)},ne=function(e){return void 0===e&&(e={}),{arrayFormat:e.arrayFormat||"none",booleanFormat:e.booleanFormat||"none",nullFormat:e.nullFormat||"default"}},ie=function(e){return encodeURIComponent(e)},ae=function(e){return decodeURIComponent(e)},se=function(e,t){var r=ne(t);return function(e){var t=e.indexOf("?");return-1===t?e:e.slice(t+1)}(e).split("&").reduce((function(e,t){var n=t.split("="),i=n[0],a=n[1],s=function(e){var t=e.indexOf("["),r=-1!==t;return{hasBrackets:r,name:r?e.slice(0,t):e}}(i),o=s.hasBrackets,l=s.name,c=e[l],h=function(e,t){if(void 0===e)return"empty-true"===t.booleanFormat||null;if("string"===t.booleanFormat){if("true"===e)return!0;if("false"===e)return!1}if("unicode"===t.booleanFormat){if("✓"===ae(e))return!0;if("✗"===ae(e))return!1}return"string"===t.nullFormat&&"null"===e?null:ae(e)}(a,r);return e[l]=void 0===c?o?[h]:h:(Array.isArray(c)?c:[c]).concat(h),e}),{})},oe=/[^!$'()*+,;|:]/g,le=function(e){return e.replace(oe,(function(e){return encodeURIComponent(e)}))},ce={default:le,uri:encodeURI,uriComponent:encodeURIComponent,none:function(e){return e},legacy:encodeURI},he={default:decodeURIComponent,uri:decodeURI,uriComponent:decodeURIComponent,none:function(e){return e},legacy:decodeURIComponent},ue=function(e,t,r){var n=ce[t]||le;return r?String(e).split("/").map(n).join("/"):n(String(e))},de=function(e){return"("+(e?e.replace(/(^<|>$)/g,""):"[a-zA-Z0-9-_.~%':|=+\\*@$]+")+")"},fe=[{name:"url-parameter",pattern:/^:([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})(<(.+?)>)?/,regex:function(e){return new RegExp(de(e[2]))}},{name:"url-parameter-splat",pattern:/^\*([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})/,regex:/([^?]*)/},{name:"url-parameter-matrix",pattern:/^;([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})(<(.+?)>)?/,regex:function(e){return new RegExp(";"+e[1]+"="+de(e[2]))}},{name:"query-parameter",pattern:/^(?:\?|&)(?::)?([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})/},{name:"delimiter",pattern:/^(\/|\?)/,regex:function(e){return new RegExp("\\"+e[0])}},{name:"sub-delimiter",pattern:/^(!|&|-|_|\.|;)/,regex:function(e){return new RegExp(e[0])}},{name:"fragment",pattern:/^([0-9a-zA-Z]+)/,regex:function(e){return new RegExp(e[0])}}],pe=function e(t,r){if(void 0===r&&(r=[]),!fe.some((function(n){var i=t.match(n.pattern);return!!i&&(r.push({type:n.name,match:i[0],val:i.slice(1,2),otherVal:i.slice(2),regex:n.regex instanceof Function?n.regex(i):n.regex}),i[0].length<t.length&&(r=e(t.substr(i[0].length),r)),!0)})))throw new Error("Could not parse path '"+t+"'");return r},me=function(e){return null!=e},ve={urlParamsEncoding:"default"},ge=function(){function e(e,t){if(!e)throw new Error("Missing path in Path constructor");this.path=e,this.options=re(re({},ve),t),this.tokens=pe(e),this.hasUrlParams=this.tokens.filter((function(e){return/^url-parameter/.test(e.type)})).length>0,this.hasSpatParam=this.tokens.filter((function(e){return/splat$/.test(e.type)})).length>0,this.hasMatrixParams=this.tokens.filter((function(e){return/matrix$/.test(e.type)})).length>0,this.hasQueryParams=this.tokens.filter((function(e){return/^query-parameter/.test(e.type)})).length>0,this.spatParams=this.getParams("url-parameter-splat"),this.urlParams=this.getParams(/^url-parameter/),this.queryParams=this.getParams("query-parameter"),this.params=this.urlParams.concat(this.queryParams),this.source=this.tokens.filter((function(e){return void 0!==e.regex})).map((function(e){return e.regex.source})).join("")}return e.createPath=function(t,r){return new e(t,r)},e.prototype.isQueryParam=function(e){return-1!==this.queryParams.indexOf(e)},e.prototype.isSpatParam=function(e){return-1!==this.spatParams.indexOf(e)},e.prototype.test=function(e,t){var r=this,n=re(re({caseSensitive:!1,strictTrailingSlash:!1},this.options),t),i=function(e,t){return t||"\\/"===e?e:e.replace(/\\\/$/,"")+"(?:\\/)?"}(this.source,n.strictTrailingSlash),a=this.urlTest(e,i+(this.hasQueryParams?"(\\?.*$|$)":"$"),n.caseSensitive,n.urlParamsEncoding);if(!a||!this.hasQueryParams)return a;var s=se(e,n.queryParams);return 0===Object.keys(s).filter((function(e){return!r.isQueryParam(e)})).length?(Object.keys(s).forEach((function(e){return a[e]=s[e]})),a):null},e.prototype.partialTest=function(e,t){var r=this,n=re(re({caseSensitive:!1,delimited:!0},this.options),t),i=function(e,t){return t?/(\/)$/.test(e)?e:e+"(\\/|\\?|\\.|;|$)":e}(this.source,n.delimited),a=this.urlTest(e,i,n.caseSensitive,n.urlParamsEncoding);if(!a)return a;if(!this.hasQueryParams)return a;var s=se(e,n.queryParams);return Object.keys(s).filter((function(e){return r.isQueryParam(e)})).forEach((function(e){return function(e,t,r){void 0===r&&(r="");var n=e[t];return e[t]=void 0===n?r:Array.isArray(n)?n.concat(r):[n,r],e}(a,e,s[e])})),a},e.prototype.build=function(e,t){var r=this;void 0===e&&(e={});var n=re(re({ignoreConstraints:!1,ignoreSearch:!1,queryParams:{}},this.options),t),i=Object.keys(e).filter((function(e){return!r.isQueryParam(e)})).reduce((function(t,i){if(!me(e[i]))return t;var a=e[i],s=r.isSpatParam(i);return"boolean"==typeof a?t[i]=a:Array.isArray(a)?t[i]=a.map((function(e){return ue(e,n.urlParamsEncoding,s)})):t[i]=ue(a,n.urlParamsEncoding,s),t}),{});if(this.urlParams.some((function(t){return!me(e[t])}))){var a=this.urlParams.filter((function(t){return!me(e[t])}));throw new Error("Cannot build path: '"+this.path+"' requires missing parameters { "+a.join(", ")+" }")}if(!n.ignoreConstraints){var s=this.tokens.filter((function(e){return/^url-parameter/.test(e.type)&&!/-splat$/.test(e.type)})).every((function(e){return new RegExp("^"+de(e.otherVal[0])+"$").test(i[e.val])}));if(!s)throw new Error("Some parameters of '"+this.path+"' are of invalid format")}var o=this.tokens.filter((function(e){return!1===/^query-parameter/.test(e.type)})).map((function(e){return"url-parameter-matrix"===e.type?";"+e.val+"="+i[e.val[0]]:/^url-parameter/.test(e.type)?i[e.val[0]]:e.match})).join("");if(n.ignoreSearch)return o;var l=function(e,t){var r=ne(t);return Object.keys(e).filter((function(t){return void 0!==e[t]})).map((function(t){return function(e,t,r){return null===t?function(e,t){return"hidden"===t.nullFormat?"":"string"===t.nullFormat?e+"=null":e}(e,r):"boolean"==typeof t?function(e,t,r){return"empty-true"===r.booleanFormat&&t?e:e+"="+("unicode"===r.booleanFormat?t?"✓":"✗":t.toString())}(e,t,r):Array.isArray(t)?function(e,t,r){var n=function(e){return"index"===e.arrayFormat?function(e,t){return e+"["+t+"]"}:"brackets"===e.arrayFormat?function(e){return e+"[]"}:function(e){return e}}(r);return t.map((function(t,r){return n(e,r)+"="+ie(t)})).join("&")}(e,t,r):e+"="+ie(t)}(t,e[t],r)})).filter(Boolean).join("&")}(this.queryParams.filter((function(t){return-1!==Object.keys(e).indexOf(t)})).reduce((function(t,r){return t[r]=e[r],t}),{}),n.queryParams);return l?o+"?"+l:o},e.prototype.getParams=function(e){var t=e instanceof RegExp?function(t){return e.test(t.type)}:function(t){return t.type===e};return this.tokens.filter(t).map((function(e){return e.val[0]}))},e.prototype.urlTest=function(e,t,r,n){var i=this,a=new RegExp("^"+t,r?"":"i"),s=e.match(a);return s?this.urlParams.length?s.slice(1,this.urlParams.length+1).reduce((function(e,t,r){return e[i.urlParams[r]]=(he[n]||decodeURIComponent)(t),e}),{}):{}:null},e}();let ye=0;const be=te({c:0});window.addEventListener("popstate",(()=>{be.c=++ye}));const we=(e,t)=>{const{pathname:r,search:n,hash:i}=window.location;e!==`${r}${n}${i}`&&(t?window.history.replaceState(void 0,"",e):window.history.pushState(void 0,"",e),queueMicrotask((()=>{be.c=++ye})))},ke="ezhEZH";class xe{constructor(e,t,r){this.com=e,this.b=ge.createPath(t+ke),this.needAuth=r}com;needAuth;parseParam(e){const t=this.b.test(e);if(t)return delete t[ke],t}buildUrl(e){throw new Error("WildcardRoute does not support buildUrl")}b}class Ce{constructor(e,t,r){this.com=e,this.b=ge.createPath(t),this.needAuth=r}com;needAuth;parseParam(e){return this.b.test(e)}buildUrl(e){return this.b.build(e)}b}const Ee=(e,t,r=!0)=>t.endsWith("*")?new xe(e,t,r):new Ce(e,t,r),Pe=({routes:e,notFound:t,checkAuth:r})=>{ye=be.c;const{pathname:n,search:i,hash:a}=window.location,s=`${n}${i}${a}`,{$s:o,$k:l,$c:c}=q;for(const t in e){const n=e[t],i=n.parseParam(s);if(i){if(r&&n.needAuth){const e=r(s);if(e)return void we(e)}return o(l(t),c("_",n.com,i,void 0,i))}}return t?o(l("404"),c("_",t,{})):void 0},Se=(e,t,r)=>{e.preventDefault();const{pathname:n,search:i,hash:a}=window.location;t!==`${n}${i}${a}`&&(r?window.history.replaceState(void 0,"",t):window.history.pushState(void 0,"",t),be.c=++ye)},$e=(e,t)=>{const{href:r,className:n,style:i,title:a,replace:s}=e,o=r?e=>Se(e,r,s):void 0;return q.$("_","a",{className:n,style:i,title:a,href:r,onclick:o},t,-1,1)},je=(e,t)=>{const{route:r,params:n,className:i,style:a,title:s,replace:o}=e,l=r.buildUrl(n);return q.$("_","a",{className:i,style:a,title:s,href:l,onclick:e=>Se(e,l,o)},t,-1,1)};var Ae=t.ye,Re=t.N_,Be=t.Wt,Fe=t.Ix,Oe=t.On,ze=t.er,Ie=t.te,Te=t.oo,Me=t.LU,Ne=t.wE,Le=t.J0;export{Ae as $ezh,Re as Link,Be as RouteLink,Fe as Router,Oe as addComReader,ze as bindData,Ie as configGC,Te as navigate,Me as refreshComReaders,Ne as route,Le as useState};
|
|
1
|
+
class e{ae(){return!this.k}G(e){for(;e.parent?.e;){let t=e.parent,r=t.parent;if(t===r.c){const n=r.d;n?.e?(t.e=!1,n.e=!1,r.e=!0,e=r):(e===t.d&&(e=t,this.y(e),t=e.parent,r=t.parent),t.e=!1,r.e=!0,this.z(r))}else{const n=r.c;!0===n?.e?(t.e=!1,n.e=!1,r.e=!0,e=r):(e===t.c&&(e=t,this.z(e),t=e.parent,r=t.parent),t.e=!1,r.e=!0,this.y(r))}}this.k.e=!1}r(e){const{c:t,d:r,parent:n}=e;if(!t)return n?(n.c===e?n.c=r:n.d=r,r?(r.parent=n,void(r.e=!1)):void(e.e||this.H(n))):(this.k=r,void(r&&(r.parent=void 0,r.e=!1)));if(!r)return n?n.c===e?n.c=t:n.d=t:this.k=t,t.parent=n,void(t.e=!1);let i,a,o=r;if(o.c){do{o=o.c}while(o.c);a=o.d,i=o.parent,i.c===o?i.c=a:i.d=a,a&&(a.parent=i),o.d=r,r.parent=o}else i=o,a=o.d;n?n.c===e?n.c=o:n.d=o:this.k=o,o.parent=n,o.c=t,t.parent=o;const s=o.e;o.e=e.e,a?a.e=!1:s||this.H(i)}H(e){let t,r;for(;;){if(t===e.c){if(r=e.d,r.e){this.y(e),r.e=!1,e.e=!0,r=e.d;continue}if(r.d?.e)return this.y(e),r.e=e.e,e.e=!1,void(r.d.e=!1);if(r.c?.e){r.c.e=!1,this.z(r),r.e=!0,r=e.d;continue}}else{if(r=e.c,r.e){this.z(e),r.e=!1,e.e=!0,r=e.c;continue}if(r.c?.e)return this.z(e),r.e=e.e,e.e=!1,void(r.c.e=!1);if(r.d?.e){r.d.e=!1,this.y(r),r.e=!0,r=e.c;continue}}if(e.e)return e.e=!1,void(r.e=!0);if(r.e=!0,t=e,!t.parent)return;e=t.parent}}y(e){const t=e.d;e.d=t?.c,t?.c&&(t.c.parent=e),t.parent=e.parent,e.parent?e===e.parent.c?e.parent.c=t:e.parent.d=t:this.k=t,t.c=e,e.parent=t}z(e){const t=e.c;e.c=t?.d,t?.d&&(t.d.parent=e),t.parent=e.parent,e.parent?e===e.parent.d?e.parent.d=t:e.parent.c=t:this.k=t,t.d=e,e.parent=t}k}class t extends e{search(e){return this.I(e)?.value}delete(e){const t=this.I(e);if(t)return this.r(t),t.value}aq(e){let t=this.k;if(t){for(;t.c;)t=t.c;return e&&this.r(t),t.value}}M(e){let t=this.k;if(t){for(;t.d;)t=t.d;return e&&this.r(t),t.value}}A(e,t,r){let n=this.k;if(n){let i;for(;e!==n.key;){if(e<n.key){if(n.c){n=n.c;continue}i={key:e,value:t,e:!0,parent:n,c:void 0,d:void 0},n.c=i}else{if(n.d){n=n.d;continue}i={key:e,value:t,e:!0,parent:n,c:void 0,d:void 0},n.d=i}return void this.G(i)}const a=n.value;return r&&(n.value=t),a}this.k={key:e,value:t,e:!1,parent:void 0,c:void 0,d:void 0}}af(e,t){let r=0,n=this.k;if(n){const i=[];if(void 0!==t)for(;;){if(t<n.key){if(n.c){i.push(n),n=n.c;continue}}else if(t>n.key){if(n.d){n=n.d;continue}return r}break}else for(;n.c;)i.push(n),n=n.c;let a;for(;;){const t=e(n.key,n.value);if(r++,2&t&&(a??(a=[])).push(n),1&t){r=-r;break}if(n.d)for(n=n.d;n.c;)i.push(n),n=n.c;else if(n=i.pop(),!n)break}if(a){let e=a.length;for(;e>0;)this.r(a[--e])}}return r}O(e,t){let r=0,n=this.k;if(n){const i=[];if(void 0!==t)for(;;){if(t>n.key){if(n.d){i.push(n),n=n.d;continue}}else if(t<n.key){if(n.c){n=n.c;continue}return r}break}else for(;n.d;)i.push(n),n=n.d;let a;for(;;){const t=e(n.key,n.value);if(r++,2&t&&(a??(a=[])).push(n),1&t){r=-r;break}if(n.c)for(n=n.c;n.d;)i.push(n),n=n.d;else if(n=i.pop(),!n)break}if(a){let e=a.length;for(;e>0;)this.r(a[--e])}}return r}I(e){let t=this.k;if(t)for(;e!==t.key;){if(e<t.key){if(t.c){t=t.c;continue}}else if(t.d){t=t.d;continue}return}return t}}const r={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBrailleLabel:"aria-braillelabel",ariaBrailleRoleDescription:"aria-brailleroledescription",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",alignmentBaseline:"alignment-baseline",annotationXml:"annotation-xml",baselineShift:"baseline-shift",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",pointerEvents:"pointer-events",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",style:"style",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",unicodeBidi:"unicode-bidi",vectorEffect:"vector-effect",wordSpacing:"word-spacing",writingMode:"writing-mode"},n={},i=[];Object.freeze(n),Object.freeze(i);const a=()=>!1,o=[],s=new Set,l=new t,c=new t,h=[],u=[],d={id:"",index:0,firstElement:null,attachTo:a,move:a,detachFrom:a,update:a,refresh:a,release:a,version:1,markChanged:a,watchMountChange:a};let f,p="",m=2e4,v=0,g=0;const y=new t,b=new Map;let w=d,k=(e,t)=>document.createElement(e);const x={svg:(e,t)=>(t.a5(),document.createElementNS("http://www.w3.org/2000/svg",e)),math:(e,t)=>(t.a5(),document.createElementNS("http://www.w3.org/1998/Math/MathML",e)),foreignObject:(e,t)=>"foreignObject"!==e?document.createElement(e):(t.a5(),document.createElementNS("http://www.w3.org/2000/svg",e))},E=()=>{if(++g>=v){for(const e of s)if(s.delete(e),e.id)e.release();else if(--g<v){s.add(e);break}}else s.add(Object.create(d));f&&(f=setTimeout(E,m))},C=(e,t)=>{const r=["",t];for(;e.constructor!==z;)r.push(e.id),e=e.parent;return r.reverse().join(",")},P=()=>{let e;for(;e=y.aq(!0);){const{id:t,newChildren:r,parent:n}=e;r&&(n&&$(n)?(e.refresh(r),n.currentBefore=void 0):e.version&&l.A(t,e))}for(const{parent:e,element:t}of o){if(t.parent!==e&&!c.ae()&&$(e)){const r=!t.parent,n=C(e,t.id);c.af(((e,t)=>e.startsWith(n)?(t._(t.B,r),2):1),n)}t.parent||(v?s.add(t):t.release())}o.length=0},S=(e,t=[],r=0)=>{let n=e[r];for(;;){if(n&&void 0!==n.id)t.push(n);else if(null!=n)switch(typeof n){case"object":S(n,t);break;case"function":n=n();continue;case"boolean":case"number":case"bigint":n=""+n;default:t.push(new B("",n))}if(!(++r<e.length))break;n=e[r]}return t},A=(e,t,r)=>{let n;const i=e.length;let a=t,o=0;for(;o<i;){const t=e[o];if(t!==a[o]){if(o===a.length)return a;const e=a[o];if(!e||void 0===e.id){a=S(a,a.slice(0,o),o);continue}if(n!==a)break}n||t.parent===r||(n=e),o++}return o===a.length?n:a===t?S(a,e.slice(0,o),o):a},$=e=>{let t=e;do{if(t.parent===t)return!0;t=t.parent}while(t);return!1},j=(e,t,r,n)=>{let i,a,o;if(t!==e&&e.length){const s=[];let l;for(a=t.length,i=1e7;--a>=0;)if(o=t[a],o.parent===r){const e=a-o.index;e===i?(l.E++,o.index=a):(l={from:o.index,to:a,E:1},i=e,o.index=-s.push(l))}else 1e7!==i&&(i=1e7);const c=[];for(a=e.length-1;a>=0;)o=e[a],o.index<0?(l=s[-o.index-1],c.push(l),a-=l.E):(o.detachFrom(r),a--);let h,u,d=0;for(a=t.length-1;a>=0;)if(o=t[a],o.parent!==r)o.index=a--,o.attachTo(r);else{if(l=s[-o.index-1],u=l.E,h=c[d],o.index=a,!n){if(h===l){d++,a-=l.E,r.currentBefore=void 0;continue}if(h.from>l.from){i=d;do{u-=h.E,h=c[++i]}while(h.from>l.from&&u>0);if(u>0){a-=l.E,r.currentBefore=void 0,d=i;continue}}}i=a-l.E;do{o.move()}while(--a>i&&(o=t[a]))}}else for(a=t.length-1;a>=0;a--)o=t[a],o.index=a,r!==o.parent&&o.attachTo(r);r.currentBefore=void 0};class B{constructor(e,t){this.id=e,this.index=0,this.ac=t}id;parent;index;firstElement;attachTo(e){this.firstElement||(this.firstElement=document.createTextNode(this.ac));const{parent:t,firstElement:r,index:n}=this;this.id&&(t?(o.push({parent:t,element:this}),r.remove()):s.delete(this)),this.parent=e;let i=e.currentBefore;void 0===i&&(i=e.findNextSiblingElement(n)),e.element.insertBefore(r,i),e.currentBefore=r}move(){const{parent:e,index:t,firstElement:r}=this;let n=e.currentBefore;void 0===n&&(n=e.findNextSiblingElement(t)),e.element.insertBefore(r,n),e.currentBefore=r}detachFrom(e){this.parent===e&&(this.firstElement.remove(),this.parent=void 0,this.id&&o.push({parent:e,element:this}))}update(e){return this.ac!==e&&(this.ac=e,this.firstElement&&(this.firstElement.nodeValue=e)),!1}refresh(){}release(e){this.parent===e&&(e&&this.firstElement.remove(),b.delete(this.id))}ac}class R{constructor(e,t,r){this.id=e,this.index=0,this.newChildren=this.d=r?S(t):t||i}id;parent;index;newChildren;currentBefore;get element(){return this.parent.element}get firstElement(){const{d:e}=this;for(let t=0;t<e.length;t++){const r=e[t].firstElement;if(r)return r}return null}attachTo(e){const{parent:t,d:r,newChildren:n}=this;if(t){o.push({parent:t,element:this});for(let e=r.length-1;e>=0;e--)r[e].detachFrom(this)}else s.delete(this);this.parent=e;const i=n||r;for(let e=i.length-1;e>=0;e--){const t=i[e];t.index=e,t.attachTo(this)}e.currentBefore=this.currentBefore,this.currentBefore=void 0,this.d=i,this.newChildren=void 0}move(){const{d:e,newChildren:t}=this;if(t)j(e,t,this,!0),this.d=t,this.newChildren=void 0;else{for(let t=e.length-1;t>=0;t--)e[t].move();this.currentBefore=void 0}}detachFrom(e){if(this.parent===e){const{d:t}=this;for(const e of t)e.detachFrom(this);this.parent=void 0,o.push({parent:e,element:this})}}update(e,t){if(t){const e=A(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}refresh(e){j(this.d,e,this),this.d=e,this.newChildren=void 0}release(e){if(this.parent===e){if(e){const{d:e}=this;for(const t of e)t.detachFrom(this)}b.delete(this.id)}}findNextSiblingElement(e){const t=this.newChildren||this.d;let r,n=e+1,i=t[n];for(;i;){if(r=i.firstElement,r)return r;i=t[++n]}return r=this.parent.currentBefore,void 0!==r?r:this.parent.findNextSiblingElement(this.index)}d}class F{constructor(e,t,r,a,o,s){if(this.id=e,this.index=0,this.firstElement=this.element=k(t,this),this.newChildren=this.d=s?S(a):a||i,r){if(this.o=n,this.t=-1,"select"===t){const e=this.element,t=r,n=t.value;if(n){t.value=void 0;const r=this.refresh;this.refresh=i=>{if(j(this.d,i,this),this.d=i,this.newChildren=void 0,Array.isArray(n)){const t=n,[r,i,a]=t;e.value=a;const o=t[3]=e=>r[i]=e.target.value;e.addEventListener("change",o)}else e.value=n;t.value=n,this.refresh=r}}}this.update(r),this.t=o??0}else this.o=r,this.t=0}id;element;parent;newChildren;index;currentBefore;firstElement;attachTo(e){const{parent:t,element:r,newChildren:n,index:i}=this;t?(o.push({parent:t,element:this}),r.remove()):s.delete(this),this.parent=e,n&&this.refresh(n);let a=e.currentBefore;void 0===a&&(a=e.findNextSiblingElement(i)),e.element.insertBefore(r,a),e.currentBefore=r}move(){const{parent:e,newChildren:t,index:r,element:n}=this;t&&this.refresh(t);let i=e.currentBefore;void 0===i&&(i=e.findNextSiblingElement(r)),e.element.insertBefore(n,i),e.currentBefore=n}detachFrom(e){this.parent===e&&(this.element.remove(),this.parent=void 0,o.push({parent:e,element:this}))}update(e,t){const{element:i,o:a,t:o}=this;if(a&&o){this.o=e;let t=o;for(const o in e){const s=e[o],l=a[o];if(s!==l)if(null!=s)switch(typeof s){case"string":{const e=r[o];e?i.setAttribute(e,s):i[o]=s;break}case"number":case"boolean":case"function":i[o]=s;break;default:if(Array.isArray(s)){const[e,t,r]=s;if(l){const[n,a,c,h]=l;if(c!==r&&i[o]!==r&&(i[o]=r),n===e&&a===t)s[3]=h;else{const r=s[3]=r=>e[t]=r.target[o];i.removeEventListener("change",h),i.addEventListener("change",r)}}else{i[o]=r;const n=s[3]=r=>e[t]=r.target[o];i.addEventListener("change",n)}break}if("style"===o){if(!l){const t=i.style,r={};let n=0;for(const e in s){const i=s[e];r[e]=i,n++,t[e]=i}e[o]=r,r.k=n;break}const t=i.style,r={};let n=0,a=l.k;for(const e in s){const i=s[e];r[e]=i,e in l&&a--,n++,i!==l[o]&&(t[e]=i)}if(e[o]=r,r.k=n,a)for(const e in l)if(!(e in s)&&(t[e]=null,! --a))break;break}i[o]=s}else switch(typeof l){case"string":{const e=r[o];e?this.element.removeAttribute(e):this.element[o]=s;break}case"object":l?Array.isArray(l)?i.removeEventListener("change",l[3]):l===n&&(i[o]=s):i[o]=s;break;default:i[o]=s}if(! --t)break}}if(t){const e=A(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}refresh(e){j(this.d,e,this),this.d=e,this.newChildren=void 0}release(e){if(this.parent===e){e&&this.element.remove();const{d:t}=this;for(const e of t)e.release(this);b.delete(this.id)}}findNextSiblingElement(e){const t=this.newChildren||this.d;let r,n=e+1,i=t[n];for(;i;){if(r=i.firstElement,r)return r;i=t[++n]}return null}a5(){this.update=this.aP}aP(e,t){const{element:n,o:i,t:a}=this;if(i&&a){this.o=e;let t=a;for(const a in e){const o=e[a],s=i[a];if(o!==s)if(null!=o)switch(typeof o){case"string":n.setAttribute(r[a]??a,o);break;case"number":case"boolean":n.setAttribute(r[a]??a,""+o);break;case"function":n[a]=o;break;default:if("style"===a){if(!s){const t=n.style,r={};let i=0;for(const e in o){const n=o[e];r[e]=n,i++,t[e]=n}e[a]=r,r.k=i;break}const t=n.style,r={};let i=0,l=s.k;for(const e in o){const n=o[e];r[e]=n,e in s&&l--,i++,n!==s[a]&&(t[e]=n)}if(e[a]=r,r.k=i,l)for(const e in s)if(!(e in o)&&(t[e]=null,! --l))break;break}n[a]=o}else switch(typeof s){case"string":case"number":case"boolean":n.removeAttribute(r[a]??a);break;default:n[a]=o}if(! --t)break}}if(t){const e=A(this.d,t,this);if(e)return this.newChildren=e,!0}return!1}o;d;t}class O{constructor(e,t,r,n,a,o){this.id=e,this.index=0,this.version=1,this.aC=t,this.o=r,this.newChildren=this.d=o?S(n):n||i,this.t=a??0}id;parent;newChildren;index;version;get firstElement(){return this.j?.firstElement||null}attachTo(e){const{parent:t,newChildren:r,j:n}=this;this.parent=e,r?this.refresh(r):n&&(n.index=this.index,n.attachTo(e)),t?o.push({parent:t,element:this}):s.delete(this)}move(){const{newChildren:e,j:t}=this;e?this.refresh(e):t&&(t.index=this.index,t.move())}detachFrom(e){this.parent===e&&(this.j?.detachFrom(e),this.parent=void 0,o.push({parent:e,element:this}))}update(e,t){const{o:r,d:n,t:i}=this;if(this.o=e,t){const e=A(n,t,this.parent);if(e)return this.newChildren=e,!0}if(!this.newChildren&&i){let t=i;for(const i in r){if(r[i]!==e[i])return this.newChildren=n,!0;if(! --t)break}}return!1}refresh(e){const{id:t,parent:r,j:i,index:a}=this,o=w;w=this;let s=this.aC(this.o||n,e);if(s!==i)switch(typeof s){case"boolean":case"number":case"bigint":s=""+s;case"string":s=new B("",s),this.j=s,s.index=a,s.attachTo(r),i?.detachFrom(r);break;default:s?(this.j=s,s.index=a,s.attachTo(r),i?.detachFrom(r),l.ae()||l.af(((e,r)=>e.startsWith(t)?r.parent&&$(r.parent)?(y.A(e,r),2):0:1),t)):(this.j=void 0,i?.detachFrom(r))}else i&&(i.parent!==r?(i.index=a,i.attachTo(r)):i.index!==a&&(i.index=a,i.move()));this.d=e,this.newChildren=void 0,w=o}release(e){this.parent===e&&(this.j?.release(e),this.parent=void 0,this.newChildren&&l.delete(this.id),b.delete(this.id))}markChanged(){return!this.newChildren&&(this.newChildren=this.d,!0)}watchMountChange(e,t,r){const n=C(this.parent,this.id);c.A(n+e,{_:t,B:r},!0)}aC;o;d;t;j}class z{constructor(e,t){this.id=e,this.element=t,this.parent=this}id;element;parent;currentBefore;findNextSiblingElement(e){return null}render(e){this.ad||(this.ad=new O(this.id,e,null,i),b.set(this.id,this.ad),this.ad.attachTo(this))}ad}const T=(e,t)=>{if(w.id){let r=e[t];r||(r=new Map,e[t]=r),r.set(w.id,w.version)}};let I=(e,t)=>{const r=e[t];if(r){for(const[e,t]of r){const r=b.get(e);r?.version===t&&r.markChanged()&&(y.ae()&&queueMicrotask(P),y.A(e,r))}r.clear()}};const M=(e,t=2e4)=>{if(e>=0&&t>=1e3){if(m=t,v&&clearTimeout(f),e)f=setTimeout(E,m);else if(f){f=void 0;for(let e=0;e<v;e++)E()}return v=e,!0}return!1},N=()=>{p=u.pop()};var q;!function(e){e.render=(e,t)=>{const r=(h.length||"")+"|",n=new z(r,e);h.push(n),n.render(t)},e.$=(e,t,r,n,i,a)=>{const o=`${w.id}${e}${p}`;let s=b.get(o);return s?((r||n)&&s.update(r,n)&&y.A(o,s),s):(s=new F(o,t,r,n,i,a),b.set(o,s),s)},e.$c=(e,t,r,n,i,a)=>{const o=`${w.id}${e}${p}`;let s=b.get(o);return s?((r||n)&&s.update(r,n)&&y.A(o,s),s):(s=new O(o,t,r,n,i,a),b.set(o,s),s)},e.$f=(e,t,r)=>{const n=`${w.id}${e}${p}`;let i=b.get(n);return i?(t&&i.update(null,t)&&y.A(n,i),i):(i=new R(n,t,r),b.set(n,i),i)},e.$k=e=>(u.push(p),p=`${p||"{"}${e}}`,N),e.$n=e=>{const t=k;return k=x[e],()=>{k=t}},e.$s=(e,t)=>(e(),t),e.$t=(e,t,r)=>{const n=`${w.id}${e}${p}`;let i=b.get(n);return i?(r&&i.update(t),i):(i=new B(n,t),b.set(i.id,i),i)}}(q||(q={}));const U=Symbol(),L=Array.prototype,_=T;let Z=(e,t)=>{Z=I,Z(e,t)},V=!1;const D=new WeakMap,Q=e=>function(...t){const r=this.length;let n,i,a;switch(e){case L.push:n=r,i=n+t.length,a=r;break;case L.unshift:n=0,i=t.length,a=r;break;case L.fill:n=t[1],void 0===n||n<=-r?n=0:n<0&&(n=r+n),i=t[2],void 0===i||i>r?i=r:i<=-r?i=0:i<0&&(i=r+i),a=i;break;case L.sort:case L.reverse:n=i=0,a=r;break;case L.pop:n=i=r-1,a=r;break;case L.shift:n=i=0,a=r;break;default:n=t[0],n<0&&(n=r+n),i=t.length>2?t.length-2:0,a=t[1],void 0===a&&(a=r-n),a=a>0?a!==i?r:n+i:i?r:n,i+=n}const o=e.bind(this)(...t),s=this[U];let l;for(let e=n;e<i;e++){switch(l=this[e],typeof l){case"object":if(l){for(;e<i;)l=this[e],l&&!l[U]&&(this[e]=K(l)),e++;break}case"undefined":continue}break}return r!==this.length&&Z(s,"length"),Z(s,Symbol.iterator),o},H={push:Q(L.push),unshift:Q(L.unshift),fill:Q(L.fill),sort:Q(L.sort),reverse:Q(L.reverse),pop:Q(L.pop),shift:Q(L.shift),splice:Q(L.splice)},W={get(e,t){if(t!==U){let r=e[t];if(r&&r===L[t]){const n=H[t];if(n)return n.bind(e);r=r.bind(e)}return _(e[U],"length"!==t?Symbol.iterator:t),r}return e},set(e,t,r){if(t!==U){if(e[t]===r)return!0;const n=e[U];return r&&"object"==typeof r&&(r=K(r)),e[t]=r,"length"===t&&Z(n,t),Z(n,Symbol.iterator),!0}return((e,t)=>{const r=t.length,n=e.length;let i;for(let n=0;n<r;n++){let a=t[n];if(a&&"object"==typeof a){do{a=t[n],i=e[n],a?i?i!==a&&(i[U]=a):e[n]=K(a):e[n]=a}while(++n<r);break}if(null!=a){do{e[n]=t[n]}while(++n<r);break}e[n]=a}const a=e[U];n!==r&&(n>r&&(e.length=r),Z(a,"length")),Z(a,Symbol.iterator)})(e,r),!0},has:(e,t)=>(_(e[U],isNaN(parseInt(t))?t:Symbol.iterator),t in e),deleteProperty:(e,t)=>(isNaN(parseInt(t))||(t=Symbol.iterator),void 0!==e[t]&&Z(e[U],t),delete e[t])},G={get(e,t){if(t!==U){const r=e[t];return"id"!==t&&_(e[U],t),r}return e},set(e,t,r,n){if(t!==U){if(e[t]===r)return!0;const n=e[U];return r&&"object"==typeof r&&(r=K(r)),e[t]=r,Z(n,t),!0}return((e,t,r)=>{const n={...e};let i;for(const a in r){delete n[a];const o=r[a];o&&"object"==typeof o&&(i=e[a],i)?i[U]=o:e[a]!==o&&(t[a]=o)}for(const e in n)delete t[e]})(e,n,r),!0},has:(e,t)=>(_(e[U],t),t in e),deleteProperty:(e,t)=>(void 0!==e[t]&&Z(e[U],t),delete e[t])},K=e=>{let t;if(Array.isArray(e)){t=[];const r=e.length;for(let n=0;n<r;n++){let i=e[n];if(i&&"object"==typeof i){do{t[n]=(i=e[n])&&K(i)}while(++n<r);break}if(null!=i){do{t[n]=e[n]}while(++n<r);break}t[n]=i}e=new Proxy(t,W)}else{t={};for(const r in e){const n=e[r];t[r]=n&&"object"==typeof n?K(n):n}e=new Proxy(t,G)}return t[U]={},e},X=(e,t)=>{t?e.w=!0:e.com.watchMountChange("s",X,e)},J=(e,t)=>[e,t,e[t]],Y=(e,t)=>{const r=w;if(r.id){let n=D.get(r);if(n){const t=n.e;return n.w?(V=!0,"function"==typeof e&&(e=e()),t[U]=e,V=!1,n.w=!1,r.watchMountChange("s",X,n)):"function"==typeof e&&(V=!0,(e=e(t))!==t&&(t[U]=e),V=!1),t}"function"==typeof e&&(e=e());const i=K(e);return n={com:r,e:i,w:!1},D.set(r,n),t&&r.watchMountChange("s",X,n),i}return"function"==typeof e&&(e=e()),K(e)};var ee=function(){return ee=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ee.apply(this,arguments)},te=function(e){return void 0===e&&(e={}),{arrayFormat:e.arrayFormat||"none",booleanFormat:e.booleanFormat||"none",nullFormat:e.nullFormat||"default"}},re=function(e){return encodeURIComponent(e)},ne=function(e){return decodeURIComponent(e)},ie=function(e,t){var r=te(t);return function(e){var t=e.indexOf("?");return-1===t?e:e.slice(t+1)}(e).split("&").reduce((function(e,t){var n=t.split("="),i=n[0],a=n[1],o=function(e){var t=e.indexOf("["),r=-1!==t;return{hasBrackets:r,name:r?e.slice(0,t):e}}(i),s=o.hasBrackets,l=o.name,c=e[l],h=function(e,t){if(void 0===e)return"empty-true"===t.booleanFormat||null;if("string"===t.booleanFormat){if("true"===e)return!0;if("false"===e)return!1}if("unicode"===t.booleanFormat){if("✓"===ne(e))return!0;if("✗"===ne(e))return!1}return"string"===t.nullFormat&&"null"===e?null:ne(e)}(a,r);return e[l]=void 0===c?s?[h]:h:(Array.isArray(c)?c:[c]).concat(h),e}),{})},ae=/[^!$'()*+,;|:]/g,oe=function(e){return e.replace(ae,(function(e){return encodeURIComponent(e)}))},se={default:oe,uri:encodeURI,uriComponent:encodeURIComponent,none:function(e){return e},legacy:encodeURI},le={default:decodeURIComponent,uri:decodeURI,uriComponent:decodeURIComponent,none:function(e){return e},legacy:decodeURIComponent},ce=function(e,t,r){var n=se[t]||oe;return r?String(e).split("/").map(n).join("/"):n(String(e))},he=function(e){return"("+(e?e.replace(/(^<|>$)/g,""):"[a-zA-Z0-9-_.~%':|=+\\*@$]+")+")"},ue=[{name:"url-parameter",pattern:/^:([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})(<(.+?)>)?/,regex:function(e){return new RegExp(he(e[2]))}},{name:"url-parameter-splat",pattern:/^\*([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})/,regex:/([^?]*)/},{name:"url-parameter-matrix",pattern:/^;([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})(<(.+?)>)?/,regex:function(e){return new RegExp(";"+e[1]+"="+he(e[2]))}},{name:"query-parameter",pattern:/^(?:\?|&)(?::)?([a-zA-Z0-9-_]*[a-zA-Z0-9]{1})/},{name:"delimiter",pattern:/^(\/|\?)/,regex:function(e){return new RegExp("\\"+e[0])}},{name:"sub-delimiter",pattern:/^(!|&|-|_|\.|;)/,regex:function(e){return new RegExp(e[0])}},{name:"fragment",pattern:/^([0-9a-zA-Z]+)/,regex:function(e){return new RegExp(e[0])}}],de=function e(t,r){if(void 0===r&&(r=[]),!ue.some((function(n){var i=t.match(n.pattern);return!!i&&(r.push({type:n.name,match:i[0],val:i.slice(1,2),otherVal:i.slice(2),regex:n.regex instanceof Function?n.regex(i):n.regex}),i[0].length<t.length&&(r=e(t.substr(i[0].length),r)),!0)})))throw new Error("Could not parse path '"+t+"'");return r},fe=function(e){return null!=e},pe={urlParamsEncoding:"default"},me=function(){function e(e,t){if(!e)throw new Error("Missing path in Path constructor");this.path=e,this.options=ee(ee({},pe),t),this.tokens=de(e),this.hasUrlParams=this.tokens.filter((function(e){return/^url-parameter/.test(e.type)})).length>0,this.hasSpatParam=this.tokens.filter((function(e){return/splat$/.test(e.type)})).length>0,this.hasMatrixParams=this.tokens.filter((function(e){return/matrix$/.test(e.type)})).length>0,this.hasQueryParams=this.tokens.filter((function(e){return/^query-parameter/.test(e.type)})).length>0,this.spatParams=this.getParams("url-parameter-splat"),this.urlParams=this.getParams(/^url-parameter/),this.queryParams=this.getParams("query-parameter"),this.params=this.urlParams.concat(this.queryParams),this.source=this.tokens.filter((function(e){return void 0!==e.regex})).map((function(e){return e.regex.source})).join("")}return e.createPath=function(t,r){return new e(t,r)},e.prototype.isQueryParam=function(e){return-1!==this.queryParams.indexOf(e)},e.prototype.isSpatParam=function(e){return-1!==this.spatParams.indexOf(e)},e.prototype.test=function(e,t){var r=this,n=ee(ee({caseSensitive:!1,strictTrailingSlash:!1},this.options),t),i=function(e,t){return t||"\\/"===e?e:e.replace(/\\\/$/,"")+"(?:\\/)?"}(this.source,n.strictTrailingSlash),a=this.urlTest(e,i+(this.hasQueryParams?"(\\?.*$|$)":"$"),n.caseSensitive,n.urlParamsEncoding);if(!a||!this.hasQueryParams)return a;var o=ie(e,n.queryParams),s=Object.keys(o).filter((function(e){return!r.isQueryParam(e)}));return 0===s.length?(Object.keys(o).forEach((function(e){return a[e]=o[e]})),a):null},e.prototype.partialTest=function(e,t){var r=this,n=ee(ee({caseSensitive:!1,delimited:!0},this.options),t),i=function(e,t){return t?/(\/)$/.test(e)?e:e+"(\\/|\\?|\\.|;|$)":e}(this.source,n.delimited),a=this.urlTest(e,i,n.caseSensitive,n.urlParamsEncoding);if(!a)return a;if(!this.hasQueryParams)return a;var o=ie(e,n.queryParams);return Object.keys(o).filter((function(e){return r.isQueryParam(e)})).forEach((function(e){return function(e,t,r){void 0===r&&(r="");var n=e[t];return e[t]=void 0===n?r:Array.isArray(n)?n.concat(r):[n,r],e}(a,e,o[e])})),a},e.prototype.build=function(e,t){var r=this;void 0===e&&(e={});var n=ee(ee({ignoreConstraints:!1,ignoreSearch:!1,queryParams:{}},this.options),t),i=Object.keys(e).filter((function(e){return!r.isQueryParam(e)})).reduce((function(t,i){if(!fe(e[i]))return t;var a=e[i],o=r.isSpatParam(i);return"boolean"==typeof a?t[i]=a:Array.isArray(a)?t[i]=a.map((function(e){return ce(e,n.urlParamsEncoding,o)})):t[i]=ce(a,n.urlParamsEncoding,o),t}),{});if(this.urlParams.some((function(t){return!fe(e[t])}))){var a=this.urlParams.filter((function(t){return!fe(e[t])}));throw new Error("Cannot build path: '"+this.path+"' requires missing parameters { "+a.join(", ")+" }")}if(!n.ignoreConstraints){var o=this.tokens.filter((function(e){return/^url-parameter/.test(e.type)&&!/-splat$/.test(e.type)})).every((function(e){return new RegExp("^"+he(e.otherVal[0])+"$").test(i[e.val])}));if(!o)throw new Error("Some parameters of '"+this.path+"' are of invalid format")}var s=this.tokens.filter((function(e){return!1===/^query-parameter/.test(e.type)})).map((function(e){return"url-parameter-matrix"===e.type?";"+e.val+"="+i[e.val[0]]:/^url-parameter/.test(e.type)?i[e.val[0]]:e.match})).join("");if(n.ignoreSearch)return s;var l=this.queryParams.filter((function(t){return-1!==Object.keys(e).indexOf(t)})).reduce((function(t,r){return t[r]=e[r],t}),{}),c=function(e,t){var r=te(t);return Object.keys(e).filter((function(t){return void 0!==e[t]})).map((function(t){return function(e,t,r){return null===t?function(e,t){return"hidden"===t.nullFormat?"":"string"===t.nullFormat?e+"=null":e}(e,r):"boolean"==typeof t?function(e,t,r){return"empty-true"===r.booleanFormat&&t?e:e+"="+("unicode"===r.booleanFormat?t?"✓":"✗":t.toString())}(e,t,r):Array.isArray(t)?function(e,t,r){var n=function(e){return"index"===e.arrayFormat?function(e,t){return e+"["+t+"]"}:"brackets"===e.arrayFormat?function(e){return e+"[]"}:function(e){return e}}(r);return t.map((function(t,r){return n(e,r)+"="+re(t)})).join("&")}(e,t,r):e+"="+re(t)}(t,e[t],r)})).filter(Boolean).join("&")}(l,n.queryParams);return c?s+"?"+c:s},e.prototype.getParams=function(e){var t=e instanceof RegExp?function(t){return e.test(t.type)}:function(t){return t.type===e};return this.tokens.filter(t).map((function(e){return e.val[0]}))},e.prototype.urlTest=function(e,t,r,n){var i=this,a=new RegExp("^"+t,r?"":"i"),o=e.match(a);return o?this.urlParams.length?o.slice(1,this.urlParams.length+1).reduce((function(e,t,r){return e[i.urlParams[r]]=(le[n]||decodeURIComponent)(t),e}),{}):{}:null},e}();let ve=0;const ge=Y({c:0});window.addEventListener("popstate",(()=>{ge.c=++ve}));const ye=(e,t)=>{const{pathname:r,search:n,hash:i}=window.location;e!==`${r}${n}${i}`&&(t?window.history.replaceState(void 0,"",e):window.history.pushState(void 0,"",e),queueMicrotask((()=>{ge.c=++ve})))},be="ezhEZH";class we{constructor(e,t,r){this.com=e,this.b=me.createPath(t+be),this.needAuth=r}com;needAuth;parseParam(e){const t=this.b.test(e);if(t)return delete t[be],t}buildUrl(e){throw new Error("WildcardRoute does not support buildUrl")}b}class ke{constructor(e,t,r){this.com=e,this.b=me.createPath(t),this.needAuth=r}com;needAuth;parseParam(e){return this.b.test(e)}buildUrl(e){return this.b.build(e)}b}const xe=(e,t,r=!0)=>t.endsWith("*")?new we(e,t,r):new ke(e,t,r),Ee=({routes:e,notFound:t,checkAuth:r})=>{ve=ge.c;const{pathname:n,search:i,hash:a}=window.location,o=`${n}${i}${a}`,{$s:s,$k:l,$c:c}=q;for(const t in e){const n=e[t],i=n.parseParam(o);if(i){if(r&&n.needAuth){const e=r(o);if(e)return void ye(e)}return s(l(t),c("_",n.com,i,void 0,-1))}}return t?s(l("404"),c("_",t,{})):void 0},Ce=(e,t,r)=>{e.preventDefault();const{pathname:n,search:i,hash:a}=window.location;t!==`${n}${i}${a}`&&(r?window.history.replaceState(void 0,"",t):window.history.pushState(void 0,"",t),ge.c=++ve)},Pe=(e,t)=>{const{href:r,className:n,style:i,title:a,replace:o}=e,s=r?e=>Ce(e,r,o):void 0;return q.$("_","a",{className:n,style:i,title:a,href:r,onclick:s},t,-1,1)},Se=(e,t)=>{const{route:r,params:n,className:i,style:a,title:o,replace:s}=e,l=r.buildUrl(n);return q.$("_","a",{className:i,style:a,title:o,href:l,onclick:e=>Ce(e,l,s)},t,-1,1)};export{q as $ezh,Pe as Link,Se as RouteLink,Ee as Router,T as addComReader,J as bindData,M as configGC,ye as navigate,I as refreshComReaders,xe as route,Y as useState};
|
package/lib/debugCheck.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p, L, n, refreshComReaders, aD } from './elements';
|
|
2
2
|
import { t, y } from './state';
|
|
3
3
|
const d = (text, k) => {
|
|
4
4
|
const f = new Error(text);
|
|
@@ -18,9 +18,9 @@ const j = (target, l) => {
|
|
|
18
18
|
target.get = function (key) {
|
|
19
19
|
const h = get.bind(this)(key);
|
|
20
20
|
if (h) {
|
|
21
|
-
if (
|
|
22
|
-
if (h.e <
|
|
23
|
-
h.e =
|
|
21
|
+
if (p.id && !t) {
|
|
22
|
+
if (h.e < L) {
|
|
23
|
+
h.e = L;
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
26
26
|
l();
|
|
@@ -30,17 +30,17 @@ const j = (target, l) => {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
target.set = function (key, a) {
|
|
33
|
-
const
|
|
34
|
-
e:
|
|
33
|
+
const o = {
|
|
34
|
+
e: L,
|
|
35
35
|
data: a,
|
|
36
36
|
};
|
|
37
|
-
return set.bind(this)(key,
|
|
37
|
+
return set.bind(this)(key, o);
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
const m = refreshComReaders;
|
|
41
41
|
let g = false;
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
42
|
+
const q = (readerRecord, key) => {
|
|
43
|
+
if (p.id) {
|
|
44
44
|
if (!t) {
|
|
45
45
|
throw d('Models should not be modified while rendering', 3);
|
|
46
46
|
}
|
|
@@ -50,16 +50,16 @@ const n = (readerRecord, key) => {
|
|
|
50
50
|
g = false;
|
|
51
51
|
};
|
|
52
52
|
const r = () => {
|
|
53
|
-
aD(
|
|
54
|
-
j(
|
|
53
|
+
aD(q);
|
|
54
|
+
j(n, () => {
|
|
55
55
|
throw d('This element already exists, "key" prop is required when it is in a loop', 5);
|
|
56
56
|
});
|
|
57
57
|
j(y, () => {
|
|
58
58
|
throw d('The "useState" function can only be called once in the com function', 4);
|
|
59
59
|
});
|
|
60
|
-
const s =
|
|
61
|
-
|
|
62
|
-
if (!g && !
|
|
60
|
+
const s = n.get;
|
|
61
|
+
n.get = function (key) {
|
|
62
|
+
if (!g && !p.id) {
|
|
63
63
|
throw d('All the elements must be in a closure that passed to h.render()', 3);
|
|
64
64
|
}
|
|
65
65
|
return s.bind(this)(key);
|