ezh 0.1.6 → 0.2.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/lib/elements.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a1, S, R, U } from './RbTree';
2
- const V = {
1
+ import { Z, Q, O, R } from './RbTree';
2
+ const S = {
3
3
  'ariaAtomic': 'aria-atomic',
4
4
  'ariaAutoComplete': 'aria-autocomplete',
5
5
  'ariaBrailleLabel': 'aria-braillelabel',
@@ -92,132 +92,132 @@ const V = {
92
92
  'wordSpacing': 'word-spacing',
93
93
  'writingMode': 'writing-mode',
94
94
  };
95
- const a3 = {};
96
- const W = [];
97
- Object.freeze(a3);
98
- Object.freeze(W);
99
- const C = () => false;
100
- const w = [];
101
- const y = new Set();
102
- const a4 = new U();
103
- const ag = new U();
95
+ const a2 = {};
96
+ const U = [];
97
+ Object.freeze(a2);
98
+ Object.freeze(U);
99
+ const A = () => false;
100
+ const v = [];
101
+ const x = new Set();
102
+ const a3 = new R();
103
+ const af = new R();
104
+ const aq = [];
104
105
  const ar = [];
105
- const at = [];
106
- const au = {
106
+ const at = {
107
107
  id: '',
108
108
  index: 0,
109
109
  firstElement: null,
110
- attachTo: C,
111
- move: C,
112
- detachFrom: C,
113
- update: C,
114
- refresh: C,
115
- release: C,
110
+ attachTo: A,
111
+ move: A,
112
+ detachFrom: A,
113
+ update: A,
114
+ refresh: A,
115
+ release: A,
116
116
  version: 1,
117
- markChanged: C,
118
- watchMountChange: C,
117
+ markChanged: A,
118
+ watchMountChange: A,
119
119
  };
120
- let D = '';
121
- let ai = 20000;
122
- let J = 0;
123
- let av = 0;
124
- let K = undefined;
125
- const G = new U();
126
- export const n = new Map();
127
- export let p = au;
128
- export let L = 1;
129
- const aF = (x, aV) => {
130
- return document.createElement(x);
120
+ let B = '';
121
+ let ah = 20000;
122
+ let H = 0;
123
+ let au = 0;
124
+ let I = undefined;
125
+ const E = new R();
126
+ export const m = new Map();
127
+ export let o = at;
128
+ export let J = 1;
129
+ const aE = (w, aU) => {
130
+ return document.createElement(w);
131
131
  };
132
- let a6 = aF;
133
- const aw = {
134
- 'svg': (x, M) => {
135
- M.a5();
136
- return document.createElementNS('http://www.w3.org/2000/svg', x);
132
+ let a5 = aE;
133
+ const av = {
134
+ 'svg': (w, K) => {
135
+ K.a4();
136
+ return document.createElementNS('http://www.w3.org/2000/svg', w);
137
137
  },
138
- 'math': (x, M) => {
139
- M.a5();
140
- return document.createElementNS('http://www.w3.org/1998/Math/MathML', x);
138
+ 'math': (w, K) => {
139
+ K.a4();
140
+ return document.createElementNS('http://www.w3.org/1998/Math/MathML', w);
141
141
  },
142
- 'foreignObject': (x, M) => {
143
- if (x !== 'foreignObject') {
144
- return document.createElement(x);
142
+ 'foreignObject': (w, K) => {
143
+ if (w !== 'foreignObject') {
144
+ return document.createElement(w);
145
145
  }
146
- M.a5();
147
- return document.createElementNS('http://www.w3.org/2000/svg', x);
146
+ K.a4();
147
+ return document.createElementNS('http://www.w3.org/2000/svg', w);
148
148
  },
149
149
  };
150
- const aj = () => {
151
- if (++av >= J) {
152
- for (const element of y) {
153
- y.delete(element);
150
+ const ai = () => {
151
+ if (++au >= H) {
152
+ for (const element of x) {
153
+ x.delete(element);
154
154
  if (element.id) {
155
155
  element.release();
156
156
  }
157
157
  else {
158
- if (--av < J) {
159
- y.add(element);
158
+ if (--au < H) {
159
+ x.add(element);
160
160
  break;
161
161
  }
162
162
  }
163
163
  }
164
164
  }
165
165
  else {
166
- y.add(Object.create(au));
166
+ x.add(Object.create(at));
167
167
  }
168
- if (K) {
169
- K = setTimeout(aj, ai);
168
+ if (I) {
169
+ I = setTimeout(ai, ah);
170
170
  }
171
171
  };
172
- const ax = (parent, m) => {
173
- const ay = ['', m];
174
- while (parent.constructor !== ah) {
175
- ay.push(parent.id);
172
+ const aw = (parent, l) => {
173
+ const ax = ['', l];
174
+ while (parent.constructor !== ag) {
175
+ ax.push(parent.id);
176
176
  parent = parent.parent;
177
177
  }
178
- return ay.reverse().join(',');
178
+ return ax.reverse().join(',');
179
179
  };
180
- const aG = () => {
180
+ const aF = () => {
181
181
  let element;
182
- while (element = G.aq(true)) {
182
+ while (element = E.ap(true)) {
183
183
  const { id, newChildren, parent } = element;
184
184
  if (newChildren) {
185
- if (parent && ak(parent)) {
185
+ if (parent && aj(parent)) {
186
186
  element.refresh(newChildren);
187
187
  parent.currentBefore = undefined;
188
188
  }
189
189
  else if (element.version) {
190
- a4.A(id, element);
190
+ a3._(id, element);
191
191
  }
192
192
  }
193
193
  }
194
- L++;
195
- for (const { parent, element } of w) {
194
+ J++;
195
+ for (const { parent, element } of v) {
196
196
  if (element.parent !== parent) {
197
- if (!ag.ae() && ak(parent)) {
198
- const a2 = !element.parent;
199
- const a7 = ax(parent, element.id);
200
- ag.af((key, value) => {
201
- if (key.startsWith(a7)) {
202
- value._(value.B, a2);
203
- return S;
197
+ if (!af.ad() && aj(parent)) {
198
+ const a1 = !element.parent;
199
+ const a6 = aw(parent, element.id);
200
+ af.ae((key, value) => {
201
+ if (key.startsWith(a6)) {
202
+ value.z(value.a0, a1);
203
+ return Q;
204
204
  }
205
- return R;
206
- }, a7);
205
+ return O;
206
+ }, a6);
207
207
  }
208
208
  }
209
209
  if (!element.parent) {
210
- if (J) {
211
- y.add(element);
210
+ if (H) {
211
+ x.add(element);
212
212
  }
213
213
  else {
214
214
  element.release();
215
215
  }
216
216
  }
217
217
  }
218
- w.length = 0;
218
+ v.length = 0;
219
219
  };
220
- const N = (children, f = [], from = 0) => {
220
+ const L = (children, f = [], from = 0) => {
221
221
  let a = children[from];
222
222
  for (;;) {
223
223
  if (a && a.id !== undefined) {
@@ -226,7 +226,7 @@ const N = (children, f = [], from = 0) => {
226
226
  else if (a !== null && a !== undefined) {
227
227
  switch (typeof a) {
228
228
  case 'object':
229
- N(a, f);
229
+ L(a, f);
230
230
  break;
231
231
  case 'function':
232
232
  a = a();
@@ -236,7 +236,7 @@ const N = (children, f = [], from = 0) => {
236
236
  case 'bigint':
237
237
  a = '' + a;
238
238
  default:
239
- f.push(new al('', a));
239
+ f.push(new ak('', a));
240
240
  }
241
241
  }
242
242
  if (++from < children.length) {
@@ -248,37 +248,37 @@ const N = (children, f = [], from = 0) => {
248
248
  }
249
249
  return f;
250
250
  };
251
- const a8 = (z, children, parent) => {
251
+ const a7 = (y, children, parent) => {
252
252
  let f;
253
- const length = z.length;
253
+ const length = y.length;
254
254
  let newChildren = children;
255
255
  let b = 0;
256
256
  while (b < length) {
257
- const az = z[b];
258
- if (az !== newChildren[b]) {
257
+ const ay = y[b];
258
+ if (ay !== newChildren[b]) {
259
259
  if (b === newChildren.length) {
260
260
  return newChildren;
261
261
  }
262
262
  const a = newChildren[b];
263
263
  if (!a || a.id === undefined) {
264
- newChildren = N(newChildren, newChildren.slice(0, b), b);
264
+ newChildren = L(newChildren, newChildren.slice(0, b), b);
265
265
  continue;
266
266
  }
267
267
  else if (f !== newChildren) {
268
268
  break;
269
269
  }
270
270
  }
271
- if (!f && az.parent !== parent) {
272
- f = z;
271
+ if (!f && ay.parent !== parent) {
272
+ f = y;
273
273
  }
274
274
  b++;
275
275
  }
276
276
  if (b === newChildren.length) {
277
277
  return f;
278
278
  }
279
- return newChildren === children ? N(newChildren, z.slice(0, b), b) : newChildren;
279
+ return newChildren === children ? L(newChildren, y.slice(0, b), b) : newChildren;
280
280
  };
281
- const ak = (element) => {
281
+ const aj = (element) => {
282
282
  let parent = element;
283
283
  do {
284
284
  if (parent.parent === parent) {
@@ -288,97 +288,97 @@ const ak = (element) => {
288
288
  } while (parent);
289
289
  return false;
290
290
  };
291
- const a9 = (z, newChildren, parent, aH) => {
292
- let b, i;
291
+ const a8 = (y, newChildren, parent, aG) => {
292
+ let b, h;
293
293
  let a;
294
- if (newChildren !== z && z.length) {
295
- const am = [];
296
- let s;
297
- i = newChildren.length;
294
+ if (newChildren !== y && y.length) {
295
+ const al = [];
296
+ let r;
297
+ h = newChildren.length;
298
298
  b = 10000000;
299
- while (--i >= 0) {
300
- a = newChildren[i];
299
+ while (--h >= 0) {
300
+ a = newChildren[h];
301
301
  if (a.parent === parent) {
302
- const a$ = i - a.index;
303
- if (a$ === b) {
304
- s.E++;
305
- a.index = i;
302
+ const az = h - a.index;
303
+ if (az === b) {
304
+ r.C++;
305
+ a.index = h;
306
306
  }
307
307
  else {
308
- s = {
308
+ r = {
309
309
  from: a.index,
310
- to: i,
311
- E: 1,
310
+ to: h,
311
+ C: 1,
312
312
  };
313
- b = a$;
314
- a.index = -am.push(s);
313
+ b = az;
314
+ a.index = -al.push(r);
315
315
  }
316
316
  }
317
317
  else if (b !== 10000000) {
318
318
  b = 10000000;
319
319
  }
320
320
  }
321
- const an = [];
322
- i = z.length - 1;
323
- while (i >= 0) {
324
- a = z[i];
321
+ const am = [];
322
+ h = y.length - 1;
323
+ while (h >= 0) {
324
+ a = y[h];
325
325
  if (a.index < 0) {
326
- s = am[-a.index - 1];
327
- an.push(s);
328
- i -= s.E;
326
+ r = al[-a.index - 1];
327
+ am.push(r);
328
+ h -= r.C;
329
329
  }
330
330
  else {
331
331
  a.detachFrom(parent);
332
- i--;
332
+ h--;
333
333
  }
334
334
  }
335
- let O;
336
- let aa;
337
- let ab = 0;
338
- i = newChildren.length - 1;
339
- while (i >= 0) {
340
- a = newChildren[i];
335
+ let M;
336
+ let a9;
337
+ let aa = 0;
338
+ h = newChildren.length - 1;
339
+ while (h >= 0) {
340
+ a = newChildren[h];
341
341
  if (a.parent !== parent) {
342
- a.index = i--;
342
+ a.index = h--;
343
343
  a.attachTo(parent);
344
344
  }
345
345
  else {
346
- s = am[-a.index - 1];
347
- aa = s.E;
348
- O = an[ab];
349
- a.index = i;
350
- if (!aH) {
351
- if (O === s) {
352
- ab++;
353
- i -= s.E;
346
+ r = al[-a.index - 1];
347
+ a9 = r.C;
348
+ M = am[aa];
349
+ a.index = h;
350
+ if (!aG) {
351
+ if (M === r) {
352
+ aa++;
353
+ h -= r.C;
354
354
  parent.currentBefore = undefined;
355
355
  continue;
356
356
  }
357
- if (O.from > s.from) {
358
- b = ab;
357
+ if (M.from > r.from) {
358
+ b = aa;
359
359
  do {
360
- aa -= O.E;
361
- O = an[++b];
362
- } while (O.from > s.from && aa > 0);
363
- if (aa > 0) {
364
- i -= s.E;
360
+ a9 -= M.C;
361
+ M = am[++b];
362
+ } while (M.from > r.from && a9 > 0);
363
+ if (a9 > 0) {
364
+ h -= r.C;
365
365
  parent.currentBefore = undefined;
366
- ab = b;
366
+ aa = b;
367
367
  continue;
368
368
  }
369
369
  }
370
370
  }
371
- b = i - s.E;
371
+ b = h - r.C;
372
372
  do {
373
373
  a.move();
374
- } while (--i > b && (a = newChildren[i]));
374
+ } while (--h > b && (a = newChildren[h]));
375
375
  }
376
376
  }
377
377
  }
378
378
  else {
379
- for (i = newChildren.length - 1; i >= 0; i--) {
380
- a = newChildren[i];
381
- a.index = i;
379
+ for (h = newChildren.length - 1; h >= 0; h--) {
380
+ a = newChildren[h];
381
+ a.index = h;
382
382
  if (parent !== a.parent) {
383
383
  a.attachTo(parent);
384
384
  }
@@ -386,11 +386,11 @@ const a9 = (z, newChildren, parent, aH) => {
386
386
  }
387
387
  parent.currentBefore = undefined;
388
388
  };
389
- class al {
389
+ class ak {
390
390
  constructor(id, text) {
391
391
  this.id = id;
392
392
  this.index = 0;
393
- this.ac = text;
393
+ this.ab = text;
394
394
  }
395
395
  id;
396
396
  parent;
@@ -398,33 +398,33 @@ class al {
398
398
  firstElement;
399
399
  attachTo(target) {
400
400
  if (!this.firstElement) {
401
- this.firstElement = document.createTextNode(this.ac);
401
+ this.firstElement = document.createTextNode(this.ab);
402
402
  }
403
403
  const { parent, firstElement, index } = this;
404
404
  if (this.id) {
405
405
  if (!parent) {
406
- y.delete(this);
406
+ x.delete(this);
407
407
  }
408
408
  else {
409
- w.push({ parent, element: this });
409
+ v.push({ parent, element: this });
410
410
  firstElement.remove();
411
411
  }
412
412
  }
413
413
  this.parent = target;
414
- let q = target.currentBefore;
415
- if (q === undefined) {
416
- q = target.findNextSiblingElement(index);
414
+ let p = target.currentBefore;
415
+ if (p === undefined) {
416
+ p = target.findNextSiblingElement(index);
417
417
  }
418
- target.element.insertBefore(firstElement, q);
418
+ target.element.insertBefore(firstElement, p);
419
419
  target.currentBefore = firstElement;
420
420
  }
421
421
  move() {
422
422
  const { parent, index, firstElement } = this;
423
- let q = parent.currentBefore;
424
- if (q === undefined) {
425
- q = parent.findNextSiblingElement(index);
423
+ let p = parent.currentBefore;
424
+ if (p === undefined) {
425
+ p = parent.findNextSiblingElement(index);
426
426
  }
427
- parent.element.insertBefore(firstElement, q);
427
+ parent.element.insertBefore(firstElement, p);
428
428
  parent.currentBefore = firstElement;
429
429
  }
430
430
  detachFrom(target) {
@@ -432,13 +432,13 @@ class al {
432
432
  this.firstElement.remove();
433
433
  this.parent = undefined;
434
434
  if (this.id) {
435
- w.push({ parent: target, element: this });
435
+ v.push({ parent: target, element: this });
436
436
  }
437
437
  }
438
438
  }
439
439
  update(text) {
440
- if (this.ac !== text) {
441
- this.ac = text;
440
+ if (this.ab !== text) {
441
+ this.ab = text;
442
442
  if (this.firstElement) {
443
443
  this.firstElement.nodeValue = text;
444
444
  }
@@ -451,16 +451,16 @@ class al {
451
451
  if (target) {
452
452
  this.firstElement.remove();
453
453
  }
454
- n.delete(this.id);
454
+ m.delete(this.id);
455
455
  }
456
456
  }
457
- ac;
457
+ ab;
458
458
  }
459
- export class aI {
460
- constructor(id, children, aJ) {
459
+ export class aH {
460
+ constructor(id, children, aI) {
461
461
  this.id = id;
462
462
  this.index = 0;
463
- this.newChildren = this.d = aJ ? N(children) : (children || W);
463
+ this.newChildren = this.d = aI ? L(children) : (children || U);
464
464
  }
465
465
  id;
466
466
  parent;
@@ -473,9 +473,9 @@ export class aI {
473
473
  get firstElement() {
474
474
  const { d } = this;
475
475
  for (let b = 0; b < d.length; b++) {
476
- const h = d[b].firstElement;
477
- if (h) {
478
- return h;
476
+ const e = d[b].firstElement;
477
+ if (e) {
478
+ return e;
479
479
  }
480
480
  }
481
481
  return null;
@@ -483,10 +483,10 @@ export class aI {
483
483
  attachTo(target) {
484
484
  const { parent, d, newChildren } = this;
485
485
  if (!parent) {
486
- y.delete(this);
486
+ x.delete(this);
487
487
  }
488
488
  else {
489
- w.push({ parent, element: this });
489
+ v.push({ parent, element: this });
490
490
  for (let b = d.length - 1; b >= 0; b--) {
491
491
  d[b].detachFrom(this);
492
492
  }
@@ -506,7 +506,7 @@ export class aI {
506
506
  move() {
507
507
  const { d, newChildren } = this;
508
508
  if (newChildren) {
509
- a9(d, newChildren, this, true);
509
+ a8(d, newChildren, this, true);
510
510
  this.d = newChildren;
511
511
  this.newChildren = undefined;
512
512
  }
@@ -524,12 +524,12 @@ export class aI {
524
524
  a.detachFrom(this);
525
525
  }
526
526
  this.parent = undefined;
527
- w.push({ parent: target, element: this });
527
+ v.push({ parent: target, element: this });
528
528
  }
529
529
  }
530
- update(o, children) {
530
+ update(n, children) {
531
531
  if (children) {
532
- const newChildren = a8(this.d, children, this);
532
+ const newChildren = a7(this.d, children, this);
533
533
  if (newChildren) {
534
534
  this.newChildren = newChildren;
535
535
  return true;
@@ -538,7 +538,7 @@ export class aI {
538
538
  return false;
539
539
  }
540
540
  refresh(newChildren) {
541
- a9(this.d, newChildren, this);
541
+ a8(this.d, newChildren, this);
542
542
  this.d = newChildren;
543
543
  this.newChildren = undefined;
544
544
  }
@@ -550,67 +550,67 @@ export class aI {
550
550
  a.detachFrom(this);
551
551
  }
552
552
  }
553
- n.delete(this.id);
553
+ m.delete(this.id);
554
554
  }
555
555
  }
556
556
  findNextSiblingElement(index) {
557
557
  const children = this.newChildren || this.d;
558
- let h;
558
+ let e;
559
559
  let b = index + 1;
560
560
  let a = children[b];
561
561
  while (a) {
562
- h = a.firstElement;
563
- if (h) {
564
- return h;
562
+ e = a.firstElement;
563
+ if (e) {
564
+ return e;
565
565
  }
566
566
  a = children[++b];
567
567
  }
568
- h = this.parent.currentBefore;
569
- return h !== undefined ? h : this.parent.findNextSiblingElement(this.index);
568
+ e = this.parent.currentBefore;
569
+ return e !== undefined ? e : this.parent.findNextSiblingElement(this.index);
570
570
  }
571
571
  d;
572
572
  }
573
- export class aK {
573
+ export class aJ {
574
574
  constructor(id, tag, props, children, check, mutableChild) {
575
575
  this.id = id;
576
576
  this.index = 0;
577
- this.firstElement = this.element = a6(tag, this);
578
- this.newChildren = this.d = mutableChild ? N(children) : (children || W);
577
+ this.firstElement = this.element = a5(tag, this);
578
+ this.newChildren = this.d = mutableChild ? L(children) : (children || U);
579
579
  if (props) {
580
- this.o = a3;
581
- this.t = -1;
580
+ this.n = a2;
581
+ this.s = -1;
582
582
  if (tag === 'select') {
583
- const ao = this.element;
584
- const ap = props;
585
- const c = ap.value;
583
+ const an = this.element;
584
+ const ao = props;
585
+ const c = ao.value;
586
586
  if (c) {
587
- ap.value = undefined;
588
- const aL = this.refresh;
587
+ ao.value = undefined;
588
+ const aK = this.refresh;
589
589
  this.refresh = (newChildren) => {
590
- a9(this.d, newChildren, this);
590
+ a8(this.d, newChildren, this);
591
591
  this.d = newChildren;
592
592
  this.newChildren = undefined;
593
593
  if (Array.isArray(c)) {
594
- const a_ = c;
595
- const [e, X, Q] = a_;
596
- ao.value = Q;
597
- const _ = a_[3] = (v) => e[X] = v.target.value;
598
- ao.addEventListener('change', _);
594
+ const a$ = c;
595
+ const [state, V, N] = a$;
596
+ an.value = N;
597
+ const z = a$[3] = (u) => state[V] = u.target.value;
598
+ an.addEventListener('change', z);
599
599
  }
600
600
  else {
601
- ao.value = c;
601
+ an.value = c;
602
602
  }
603
- ap.value = c;
604
- this.refresh = aL;
603
+ ao.value = c;
604
+ this.refresh = aK;
605
605
  };
606
606
  }
607
607
  }
608
608
  this.update(props);
609
- this.t = check ?? 0;
609
+ this.s = check ?? 0;
610
610
  }
611
611
  else {
612
- this.o = props;
613
- this.t = 0;
612
+ this.n = props;
613
+ this.s = 0;
614
614
  }
615
615
  }
616
616
  id;
@@ -623,21 +623,21 @@ export class aK {
623
623
  attachTo(target) {
624
624
  const { parent, element, newChildren, index } = this;
625
625
  if (!parent) {
626
- y.delete(this);
626
+ x.delete(this);
627
627
  }
628
628
  else {
629
- w.push({ parent, element: this });
629
+ v.push({ parent, element: this });
630
630
  element.remove();
631
631
  }
632
632
  this.parent = target;
633
633
  if (newChildren) {
634
634
  this.refresh(newChildren);
635
635
  }
636
- let q = target.currentBefore;
637
- if (q === undefined) {
638
- q = target.findNextSiblingElement(index);
636
+ let p = target.currentBefore;
637
+ if (p === undefined) {
638
+ p = target.findNextSiblingElement(index);
639
639
  }
640
- target.element.insertBefore(element, q);
640
+ target.element.insertBefore(element, p);
641
641
  target.currentBefore = element;
642
642
  }
643
643
  move() {
@@ -645,38 +645,38 @@ export class aK {
645
645
  if (newChildren) {
646
646
  this.refresh(newChildren);
647
647
  }
648
- let q = parent.currentBefore;
649
- if (q === undefined) {
650
- q = parent.findNextSiblingElement(index);
648
+ let p = parent.currentBefore;
649
+ if (p === undefined) {
650
+ p = parent.findNextSiblingElement(index);
651
651
  }
652
- parent.element.insertBefore(element, q);
652
+ parent.element.insertBefore(element, p);
653
653
  parent.currentBefore = element;
654
654
  }
655
655
  detachFrom(target) {
656
656
  if (this.parent === target) {
657
657
  this.element.remove();
658
658
  this.parent = undefined;
659
- w.push({ parent: target, element: this });
659
+ v.push({ parent: target, element: this });
660
660
  }
661
661
  }
662
662
  update(props, children) {
663
- const { element, o, t } = this;
664
- if (o && t) {
665
- this.o = props;
666
- let k = t;
663
+ const { element, n, s } = this;
664
+ if (n && s) {
665
+ this.n = props;
666
+ let j = s;
667
667
  for (const key in props) {
668
668
  const c = props[key];
669
- const g = o[key];
669
+ const g = n[key];
670
670
  if (c !== g) {
671
671
  if (c !== null && c !== undefined) {
672
672
  switch (typeof c) {
673
673
  case 'string': {
674
- const Y = V[key];
675
- if (!Y) {
674
+ const W = S[key];
675
+ if (!W) {
676
676
  element[key] = c;
677
677
  }
678
678
  else {
679
- element.setAttribute(Y, c);
679
+ element.setAttribute(W, c);
680
680
  }
681
681
  break;
682
682
  }
@@ -688,65 +688,65 @@ export class aK {
688
688
  }
689
689
  default: {
690
690
  if (Array.isArray(c)) {
691
- const [e, X, Q] = c;
691
+ const [state, V, N] = c;
692
692
  if (g) {
693
- const [aM, aN, aO, aA] = g;
694
- if (aO !== Q && element[key] !== Q) {
695
- element[key] = Q;
693
+ const [aL, aM, aN, a_] = g;
694
+ if (aN !== N && element[key] !== N) {
695
+ element[key] = N;
696
696
  }
697
- if (aM === e && aN === X) {
698
- c[3] = aA;
697
+ if (aL === state && aM === V) {
698
+ c[3] = a_;
699
699
  }
700
700
  else {
701
- const _ = c[3] = (v) => e[X] = v.target[key];
702
- element.removeEventListener('change', aA);
703
- element.addEventListener('change', _);
701
+ const z = c[3] = (u) => state[V] = u.target[key];
702
+ element.removeEventListener('change', a_);
703
+ element.addEventListener('change', z);
704
704
  }
705
705
  }
706
706
  else {
707
- element[key] = Q;
708
- const _ = c[3] = (v) => e[X] = v.target[key];
709
- element.addEventListener('change', _);
707
+ element[key] = N;
708
+ const z = c[3] = (u) => state[V] = u.target[key];
709
+ element.addEventListener('change', z);
710
710
  }
711
711
  break;
712
712
  }
713
713
  if (key === 'style') {
714
714
  if (!g) {
715
715
  const style = element.style;
716
- const r = {};
717
- let k = 0;
718
- for (const l in c) {
719
- const Z = c[l];
720
- r[l] = Z;
721
- k++;
722
- style[l] = Z;
716
+ const q = {};
717
+ let j = 0;
718
+ for (const k in c) {
719
+ const X = c[k];
720
+ q[k] = X;
721
+ j++;
722
+ style[k] = X;
723
723
  }
724
- props[key] = r;
725
- r.k = k;
724
+ props[key] = q;
725
+ q.j = j;
726
726
  break;
727
727
  }
728
728
  const style = element.style;
729
- const r = {};
730
- let k = 0;
731
- let H = g.k;
732
- for (const l in c) {
733
- const I = c[l];
734
- r[l] = I;
735
- if (l in g) {
736
- H--;
729
+ const q = {};
730
+ let j = 0;
731
+ let F = g.j;
732
+ for (const k in c) {
733
+ const G = c[k];
734
+ q[k] = G;
735
+ if (k in g) {
736
+ F--;
737
737
  }
738
- k++;
739
- if (I !== g[key]) {
740
- style[l] = I;
738
+ j++;
739
+ if (G !== g[key]) {
740
+ style[k] = G;
741
741
  }
742
742
  }
743
- props[key] = r;
744
- r.k = k;
745
- if (H) {
746
- for (const l in g) {
747
- if (!(l in c)) {
748
- style[l] = null;
749
- if (!--H) {
743
+ props[key] = q;
744
+ q.j = j;
745
+ if (F) {
746
+ for (const k in g) {
747
+ if (!(k in c)) {
748
+ style[k] = null;
749
+ if (!--F) {
750
750
  break;
751
751
  }
752
752
  }
@@ -761,12 +761,12 @@ export class aK {
761
761
  else {
762
762
  switch (typeof g) {
763
763
  case 'string': {
764
- const Y = V[key];
765
- if (!Y) {
764
+ const W = S[key];
765
+ if (!W) {
766
766
  this.element[key] = c;
767
767
  }
768
768
  else {
769
- this.element.removeAttribute(Y);
769
+ this.element.removeAttribute(W);
770
770
  }
771
771
  break;
772
772
  }
@@ -775,7 +775,7 @@ export class aK {
775
775
  if (Array.isArray(g)) {
776
776
  element.removeEventListener('change', g[3]);
777
777
  }
778
- else if (g === a3) {
778
+ else if (g === a2) {
779
779
  element[key] = c;
780
780
  }
781
781
  }
@@ -790,13 +790,13 @@ export class aK {
790
790
  }
791
791
  }
792
792
  }
793
- if (!--k) {
793
+ if (!--j) {
794
794
  break;
795
795
  }
796
796
  }
797
797
  }
798
798
  if (children) {
799
- const newChildren = a8(this.d, children, this);
799
+ const newChildren = a7(this.d, children, this);
800
800
  if (newChildren) {
801
801
  this.newChildren = newChildren;
802
802
  return true;
@@ -805,7 +805,7 @@ export class aK {
805
805
  return false;
806
806
  }
807
807
  refresh(newChildren) {
808
- a9(this.d, newChildren, this);
808
+ a8(this.d, newChildren, this);
809
809
  this.d = newChildren;
810
810
  this.newChildren = undefined;
811
811
  }
@@ -818,44 +818,44 @@ export class aK {
818
818
  for (const a of d) {
819
819
  a.release(this);
820
820
  }
821
- n.delete(this.id);
821
+ m.delete(this.id);
822
822
  }
823
823
  }
824
824
  findNextSiblingElement(index) {
825
825
  const children = this.newChildren || this.d;
826
- let h;
826
+ let e;
827
827
  let b = index + 1;
828
828
  let a = children[b];
829
829
  while (a) {
830
- h = a.firstElement;
831
- if (h) {
832
- return h;
830
+ e = a.firstElement;
831
+ if (e) {
832
+ return e;
833
833
  }
834
834
  a = children[++b];
835
835
  }
836
836
  return null;
837
837
  }
838
- a5() {
839
- this.update = this.aP;
838
+ a4() {
839
+ this.update = this.aO;
840
840
  }
841
- aP(props, children) {
842
- const { element, o, t } = this;
843
- if (o && t) {
844
- this.o = props;
845
- let k = t;
841
+ aO(props, children) {
842
+ const { element, n, s } = this;
843
+ if (n && s) {
844
+ this.n = props;
845
+ let j = s;
846
846
  for (const key in props) {
847
847
  const c = props[key];
848
- const g = o[key];
848
+ const g = n[key];
849
849
  if (c !== g) {
850
850
  if (c !== null && c !== undefined) {
851
851
  switch (typeof c) {
852
852
  case 'string': {
853
- element.setAttribute(V[key] ?? key, c);
853
+ element.setAttribute(S[key] ?? key, c);
854
854
  break;
855
855
  }
856
856
  case 'number':
857
857
  case 'boolean': {
858
- element.setAttribute(V[key] ?? key, '' + c);
858
+ element.setAttribute(S[key] ?? key, '' + c);
859
859
  break;
860
860
  }
861
861
  case 'function': {
@@ -866,40 +866,40 @@ export class aK {
866
866
  if (key === 'style') {
867
867
  if (!g) {
868
868
  const style = element.style;
869
- const r = {};
870
- let k = 0;
871
- for (const l in c) {
872
- const Z = c[l];
873
- r[l] = Z;
874
- k++;
875
- style[l] = Z;
869
+ const q = {};
870
+ let j = 0;
871
+ for (const k in c) {
872
+ const X = c[k];
873
+ q[k] = X;
874
+ j++;
875
+ style[k] = X;
876
876
  }
877
- props[key] = r;
878
- r.k = k;
877
+ props[key] = q;
878
+ q.j = j;
879
879
  break;
880
880
  }
881
881
  const style = element.style;
882
- const r = {};
883
- let k = 0;
884
- let H = g.k;
885
- for (const l in c) {
886
- const I = c[l];
887
- r[l] = I;
888
- if (l in g) {
889
- H--;
882
+ const q = {};
883
+ let j = 0;
884
+ let F = g.j;
885
+ for (const k in c) {
886
+ const G = c[k];
887
+ q[k] = G;
888
+ if (k in g) {
889
+ F--;
890
890
  }
891
- k++;
892
- if (I !== g[key]) {
893
- style[l] = I;
891
+ j++;
892
+ if (G !== g[key]) {
893
+ style[k] = G;
894
894
  }
895
895
  }
896
- props[key] = r;
897
- r.k = k;
898
- if (H) {
899
- for (const l in g) {
900
- if (!(l in c)) {
901
- style[l] = null;
902
- if (!--H) {
896
+ props[key] = q;
897
+ q.j = j;
898
+ if (F) {
899
+ for (const k in g) {
900
+ if (!(k in c)) {
901
+ style[k] = null;
902
+ if (!--F) {
903
903
  break;
904
904
  }
905
905
  }
@@ -912,12 +912,12 @@ export class aK {
912
912
  }
913
913
  }
914
914
  else {
915
- const aQ = typeof g;
916
- switch (aQ) {
915
+ const aP = typeof g;
916
+ switch (aP) {
917
917
  case 'string':
918
918
  case 'number':
919
919
  case 'boolean': {
920
- element.removeAttribute(V[key] ?? key);
920
+ element.removeAttribute(S[key] ?? key);
921
921
  break;
922
922
  }
923
923
  default: {
@@ -926,13 +926,13 @@ export class aK {
926
926
  }
927
927
  }
928
928
  }
929
- if (!--k) {
929
+ if (!--j) {
930
930
  break;
931
931
  }
932
932
  }
933
933
  }
934
934
  if (children) {
935
- const newChildren = a8(this.d, children, this);
935
+ const newChildren = a7(this.d, children, this);
936
936
  if (newChildren) {
937
937
  this.newChildren = newChildren;
938
938
  return true;
@@ -940,19 +940,19 @@ export class aK {
940
940
  }
941
941
  return false;
942
942
  }
943
- o;
943
+ n;
944
944
  d;
945
- t;
945
+ s;
946
946
  }
947
- export class aB {
947
+ export class aA {
948
948
  constructor(id, entry, props, children, check, mutableChild) {
949
949
  this.id = id;
950
950
  this.index = 0;
951
951
  this.version = 1;
952
- this.aC = entry;
953
- this.o = props;
954
- this.newChildren = this.d = mutableChild ? N(children) : (children || W);
955
- this.t = check ?? 0;
952
+ this.aB = entry;
953
+ this.n = props;
954
+ this.newChildren = this.d = mutableChild ? L(children) : (children || U);
955
+ this.s = check ?? 0;
956
956
  }
957
957
  id;
958
958
  parent;
@@ -960,60 +960,60 @@ export class aB {
960
960
  index;
961
961
  version;
962
962
  get firstElement() {
963
- return this.j?.firstElement || null;
963
+ return this.i?.firstElement || null;
964
964
  }
965
965
  attachTo(target) {
966
- const { parent, newChildren, j } = this;
966
+ const { parent, newChildren, i } = this;
967
967
  this.parent = target;
968
968
  if (newChildren) {
969
969
  this.refresh(newChildren);
970
970
  }
971
- else if (j) {
972
- j.index = this.index;
973
- j.attachTo(target);
971
+ else if (i) {
972
+ i.index = this.index;
973
+ i.attachTo(target);
974
974
  }
975
975
  if (!parent) {
976
- y.delete(this);
976
+ x.delete(this);
977
977
  }
978
978
  else {
979
- w.push({ parent, element: this });
979
+ v.push({ parent, element: this });
980
980
  }
981
981
  }
982
982
  move() {
983
- const { newChildren, j } = this;
983
+ const { newChildren, i } = this;
984
984
  if (newChildren) {
985
985
  this.refresh(newChildren);
986
986
  }
987
- else if (j) {
988
- j.index = this.index;
989
- j.move();
987
+ else if (i) {
988
+ i.index = this.index;
989
+ i.move();
990
990
  }
991
991
  }
992
992
  detachFrom(target) {
993
993
  if (this.parent === target) {
994
- this.j?.detachFrom(target);
994
+ this.i?.detachFrom(target);
995
995
  this.parent = undefined;
996
- w.push({ parent: target, element: this });
996
+ v.push({ parent: target, element: this });
997
997
  }
998
998
  }
999
999
  update(props, children) {
1000
- const { o, d, t } = this;
1001
- this.o = props;
1000
+ const { n, d, s } = this;
1001
+ this.n = props;
1002
1002
  if (children) {
1003
- const newChildren = a8(d, children, this.parent);
1003
+ const newChildren = a7(d, children, this.parent);
1004
1004
  if (newChildren) {
1005
1005
  this.newChildren = newChildren;
1006
1006
  return true;
1007
1007
  }
1008
1008
  }
1009
- if (!this.newChildren && t) {
1010
- let k = t;
1011
- for (const key in o) {
1012
- if (o[key] !== props[key]) {
1009
+ if (!this.newChildren && s) {
1010
+ let j = s;
1011
+ for (const key in n) {
1012
+ if (n[key] !== props[key]) {
1013
1013
  this.newChildren = d;
1014
1014
  return true;
1015
1015
  }
1016
- if (!--k) {
1016
+ if (!--j) {
1017
1017
  break;
1018
1018
  }
1019
1019
  }
@@ -1021,70 +1021,70 @@ export class aB {
1021
1021
  return false;
1022
1022
  }
1023
1023
  refresh(newChildren) {
1024
- const { id, parent, j, index } = this;
1025
- const aR = p;
1026
- p = this;
1027
- let u = this.aC(this.o || a3, newChildren);
1028
- if (u !== j) {
1029
- switch (typeof u) {
1024
+ const { id, parent, i, index } = this;
1025
+ const aQ = o;
1026
+ o = this;
1027
+ let t = this.aB(this.n || a2, newChildren);
1028
+ if (t !== i) {
1029
+ switch (typeof t) {
1030
1030
  case 'boolean':
1031
1031
  case 'number':
1032
1032
  case 'bigint':
1033
- u = '' + u;
1033
+ t = '' + t;
1034
1034
  case 'string':
1035
- u = new al('', u);
1036
- this.j = u;
1037
- u.index = index;
1038
- u.attachTo(parent);
1039
- j?.detachFrom(parent);
1035
+ t = new ak('', t);
1036
+ this.i = t;
1037
+ t.index = index;
1038
+ t.attachTo(parent);
1039
+ i?.detachFrom(parent);
1040
1040
  break;
1041
1041
  default:
1042
- if (u) {
1043
- this.j = u;
1044
- u.index = index;
1045
- u.attachTo(parent);
1046
- j?.detachFrom(parent);
1047
- if (!a4.ae()) {
1048
- a4.af((a0, com) => {
1049
- if (!a0.startsWith(id)) {
1050
- return R;
1042
+ if (t) {
1043
+ this.i = t;
1044
+ t.index = index;
1045
+ t.attachTo(parent);
1046
+ i?.detachFrom(parent);
1047
+ if (!a3.ad()) {
1048
+ a3.ae((Y, com) => {
1049
+ if (!Y.startsWith(id)) {
1050
+ return O;
1051
1051
  }
1052
- if (com.parent && ak(com.parent)) {
1053
- G.A(a0, com);
1054
- return S;
1052
+ if (com.parent && aj(com.parent)) {
1053
+ E._(Y, com);
1054
+ return Q;
1055
1055
  }
1056
- return a1;
1056
+ return Z;
1057
1057
  }, id);
1058
1058
  }
1059
1059
  }
1060
1060
  else {
1061
- this.j = undefined;
1062
- j?.detachFrom(parent);
1061
+ this.i = undefined;
1062
+ i?.detachFrom(parent);
1063
1063
  }
1064
1064
  }
1065
1065
  }
1066
- else if (j) {
1067
- if (j.parent !== parent) {
1068
- j.index = index;
1069
- j.attachTo(parent);
1066
+ else if (i) {
1067
+ if (i.parent !== parent) {
1068
+ i.index = index;
1069
+ i.attachTo(parent);
1070
1070
  }
1071
- else if (j.index !== index) {
1072
- j.index = index;
1073
- j.move();
1071
+ else if (i.index !== index) {
1072
+ i.index = index;
1073
+ i.move();
1074
1074
  }
1075
1075
  }
1076
1076
  this.d = newChildren;
1077
1077
  this.newChildren = undefined;
1078
- p = aR;
1078
+ o = aQ;
1079
1079
  }
1080
1080
  release(target) {
1081
1081
  if (this.parent === target) {
1082
- this.j?.release(target);
1082
+ this.i?.release(target);
1083
1083
  this.parent = undefined;
1084
1084
  if (this.newChildren) {
1085
- a4.delete(this.id);
1085
+ a3.delete(this.id);
1086
1086
  }
1087
- n.delete(this.id);
1087
+ m.delete(this.id);
1088
1088
  }
1089
1089
  }
1090
1090
  markChanged() {
@@ -1094,17 +1094,17 @@ export class aB {
1094
1094
  }
1095
1095
  return false;
1096
1096
  }
1097
- watchMountChange(aS, _, B) {
1098
- const a7 = ax(this.parent, this.id);
1099
- ag.A(a7 + aS, { _, B }, true);
1097
+ watchMountChange(aR, z, a0) {
1098
+ const a6 = aw(this.parent, this.id);
1099
+ af._(a6 + aR, { z, a0 }, true);
1100
1100
  }
1101
- aC;
1102
- o;
1101
+ aB;
1102
+ n;
1103
1103
  d;
1104
- t;
1105
- j;
1104
+ s;
1105
+ i;
1106
1106
  }
1107
- class ah {
1107
+ class ag {
1108
1108
  constructor(id, rootElement) {
1109
1109
  this.id = id;
1110
1110
  this.element = rootElement;
@@ -1114,125 +1114,125 @@ class ah {
1114
1114
  element;
1115
1115
  parent;
1116
1116
  currentBefore;
1117
- findNextSiblingElement(aY) {
1117
+ findNextSiblingElement(aX) {
1118
1118
  return null;
1119
1119
  }
1120
1120
  render(entry) {
1121
- if (!this.ad) {
1122
- this.ad = new aB(this.id, entry, null, W);
1123
- n.set(this.id, this.ad);
1124
- this.ad.attachTo(this);
1125
- L++;
1121
+ if (!this.ac) {
1122
+ this.ac = new aA(this.id, entry, null, U);
1123
+ m.set(this.id, this.ac);
1124
+ this.ac.attachTo(this);
1125
+ J++;
1126
1126
  }
1127
1127
  }
1128
- ad;
1128
+ ac;
1129
1129
  }
1130
1130
  export const addComReader = (readerRecord, key) => {
1131
- if (p.id) {
1132
- let F = readerRecord[key];
1133
- if (!F) {
1134
- F = new Map();
1135
- readerRecord[key] = F;
1131
+ if (o.id) {
1132
+ let D = readerRecord[key];
1133
+ if (!D) {
1134
+ D = new Map();
1135
+ readerRecord[key] = D;
1136
1136
  }
1137
- F.set(p.id, p.version);
1137
+ D.set(o.id, o.version);
1138
1138
  }
1139
1139
  };
1140
1140
  export let refreshComReaders = (readerRecord, key) => {
1141
- const F = readerRecord[key];
1142
- if (F) {
1143
- for (const [a0, version] of F) {
1144
- const com = n.get(a0);
1141
+ const D = readerRecord[key];
1142
+ if (D) {
1143
+ for (const [Y, version] of D) {
1144
+ const com = m.get(Y);
1145
1145
  if (com?.version === version && com.markChanged()) {
1146
- if (G.ae()) {
1147
- queueMicrotask(aG);
1146
+ if (E.ad()) {
1147
+ queueMicrotask(aF);
1148
1148
  }
1149
- G.A(a0, com);
1149
+ E._(Y, com);
1150
1150
  }
1151
1151
  }
1152
- F.clear();
1152
+ D.clear();
1153
1153
  }
1154
1154
  };
1155
- export const aD = (replace) => refreshComReaders = replace;
1155
+ export const aC = (replace) => refreshComReaders = replace;
1156
1156
  export const configGC = (waitIntervals, interval = 20000) => {
1157
1157
  if (waitIntervals >= 0 && interval >= 1000) {
1158
- ai = interval;
1159
- if (J) {
1160
- clearTimeout(K);
1158
+ ah = interval;
1159
+ if (H) {
1160
+ clearTimeout(I);
1161
1161
  }
1162
1162
  if (waitIntervals) {
1163
- K = setTimeout(aj, ai);
1163
+ I = setTimeout(ai, ah);
1164
1164
  }
1165
- else if (K) {
1166
- K = undefined;
1167
- for (let b = 0; b < J; b++) {
1168
- aj();
1165
+ else if (I) {
1166
+ I = undefined;
1167
+ for (let b = 0; b < H; b++) {
1168
+ ai();
1169
1169
  }
1170
1170
  }
1171
- J = waitIntervals;
1171
+ H = waitIntervals;
1172
1172
  return true;
1173
1173
  }
1174
1174
  return false;
1175
1175
  };
1176
- const aT = () => {
1177
- D = at.pop();
1176
+ const aS = () => {
1177
+ B = ar.pop();
1178
1178
  };
1179
1179
  export var $ezh;
1180
1180
  (function ($ezh) {
1181
1181
  $ezh.render = (rootElement, entry) => {
1182
- const id = (ar.length || '') + '|';
1183
- const aE = new ah(id, rootElement);
1184
- ar.push(aE);
1185
- aE.render(entry);
1182
+ const id = (aq.length || '') + '|';
1183
+ const aD = new ag(id, rootElement);
1184
+ aq.push(aD);
1185
+ aD.render(entry);
1186
1186
  };
1187
1187
  $ezh.$ = (id, tag, props, children, check, mutableChild) => {
1188
- const m = `${p.id}${id}${D}`;
1189
- let element = n.get(m);
1188
+ const l = `${o.id}${id}${B}`;
1189
+ let element = m.get(l);
1190
1190
  if (element) {
1191
1191
  if ((props || children) && element.update(props, children)) {
1192
- G.A(m, element);
1192
+ E._(l, element);
1193
1193
  }
1194
1194
  return element;
1195
1195
  }
1196
- element = new aK(m, tag, props, children, check, mutableChild);
1197
- n.set(m, element);
1196
+ element = new aJ(l, tag, props, children, check, mutableChild);
1197
+ m.set(l, element);
1198
1198
  return element;
1199
1199
  };
1200
1200
  $ezh.$c = (id, entry, props, children, check, mutableChild) => {
1201
- const m = `${p.id}${id}${D}`;
1202
- let element = n.get(m);
1201
+ const l = `${o.id}${id}${B}`;
1202
+ let element = m.get(l);
1203
1203
  if (element) {
1204
1204
  if ((props || children) && element.update(props, children)) {
1205
- G.A(m, element);
1205
+ E._(l, element);
1206
1206
  }
1207
1207
  return element;
1208
1208
  }
1209
- element = new aB(m, entry, props, children, check, mutableChild);
1210
- n.set(m, element);
1209
+ element = new aA(l, entry, props, children, check, mutableChild);
1210
+ m.set(l, element);
1211
1211
  return element;
1212
1212
  };
1213
1213
  $ezh.$f = (id, children, mutableChild) => {
1214
- const m = `${p.id}${id}${D}`;
1215
- let element = n.get(m);
1214
+ const l = `${o.id}${id}${B}`;
1215
+ let element = m.get(l);
1216
1216
  if (element) {
1217
1217
  if (children && element.update(null, children)) {
1218
- G.A(m, element);
1218
+ E._(l, element);
1219
1219
  }
1220
1220
  return element;
1221
1221
  }
1222
- element = new aI(m, children, mutableChild);
1223
- n.set(m, element);
1222
+ element = new aH(l, children, mutableChild);
1223
+ m.set(l, element);
1224
1224
  return element;
1225
1225
  };
1226
1226
  $ezh.$k = (key) => {
1227
- at.push(D);
1228
- D = `${D || '{'}${key}}`;
1229
- return aT;
1227
+ ar.push(B);
1228
+ B = `${B || '{'}${key}}`;
1229
+ return aS;
1230
1230
  };
1231
1231
  $ezh.$n = (ns) => {
1232
- const aU = a6;
1233
- a6 = aw[ns];
1232
+ const aT = a5;
1233
+ a5 = av[ns];
1234
1234
  return () => {
1235
- a6 = aU;
1235
+ a5 = aT;
1236
1236
  };
1237
1237
  };
1238
1238
  $ezh.$s = (cb, element) => {
@@ -1240,16 +1240,16 @@ export var $ezh;
1240
1240
  return element;
1241
1241
  };
1242
1242
  $ezh.$t = (id, text, mayChange) => {
1243
- const m = `${p.id}${id}${D}`;
1244
- let element = n.get(m);
1243
+ const l = `${o.id}${id}${B}`;
1244
+ let element = m.get(l);
1245
1245
  if (element) {
1246
1246
  if (mayChange) {
1247
1247
  element.update(text);
1248
1248
  }
1249
1249
  return element;
1250
1250
  }
1251
- element = new al(m, text);
1252
- n.set(element.id, element);
1251
+ element = new ak(l, text);
1252
+ m.set(element.id, element);
1253
1253
  return element;
1254
1254
  };
1255
1255
  })($ezh || ($ezh = {}));