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