jaxs 0.9.2 → 0.9.4
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/dist/jaxs.d.ts +41 -28
- package/dist/jaxs.js +382 -351
- package/dist/jaxs.umd.cjs +311 -298
- package/package.json +1 -1
package/dist/jaxs.umd.cjs
CHANGED
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
for (let s = e.length - 1; s >= 0; s--) e[s] === t && e.splice(s, 1)
|
|
12
12
|
return e
|
|
13
13
|
},
|
|
14
|
-
|
|
14
|
+
O = (e, t) => {
|
|
15
15
|
for (let s = e.length - 1; s >= 0; s--) t(e[s]) && e.splice(s, 1)
|
|
16
16
|
return e
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
M = (e, t, s) => (e.splice(t, 0, s), e),
|
|
19
|
+
k = (e, t) => (e.includes(t) || e.push(t), e),
|
|
20
|
+
pt = {
|
|
21
21
|
remove: b,
|
|
22
|
-
removeBy:
|
|
23
|
-
insertAt:
|
|
24
|
-
appendIfUnique:
|
|
22
|
+
removeBy: O,
|
|
23
|
+
insertAt: M,
|
|
24
|
+
appendIfUnique: k,
|
|
25
25
|
push: (e, t) => e.push(t),
|
|
26
26
|
pop: (e) => e.pop(),
|
|
27
27
|
unshift: (e, t) => e.unshift(t),
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
sortBy: (e, t) => e.sort(t),
|
|
30
30
|
includes: (e, t) => e.includes(t),
|
|
31
31
|
}
|
|
32
|
-
class
|
|
32
|
+
class ft {
|
|
33
33
|
constructor(t) {
|
|
34
34
|
this.store = t
|
|
35
35
|
}
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
return this.value === !1
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
const v = (e) => new
|
|
63
|
-
|
|
62
|
+
const v = (e) => new ft(e),
|
|
63
|
+
mt = {
|
|
64
64
|
toggle: (e) => v(e).toggle(),
|
|
65
65
|
setTrue: (e) => v(e).setTrue(),
|
|
66
66
|
setFalse: (e) => v(e).setFalse(),
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
isTrue: (e) => v(e).isTrue(),
|
|
69
69
|
isFalse: (e) => v(e).isFalse(),
|
|
70
70
|
}
|
|
71
|
-
class
|
|
71
|
+
class bt {
|
|
72
72
|
constructor(t) {
|
|
73
73
|
this.store = t
|
|
74
74
|
}
|
|
@@ -105,14 +105,14 @@
|
|
|
105
105
|
}
|
|
106
106
|
insertAt(t, s) {
|
|
107
107
|
const r = this.value
|
|
108
|
-
|
|
108
|
+
M(r, t, s), this.update(r)
|
|
109
109
|
}
|
|
110
110
|
remove(t) {
|
|
111
111
|
const s = b(this.value, t)
|
|
112
112
|
this.update(s)
|
|
113
113
|
}
|
|
114
114
|
removeBy(t) {
|
|
115
|
-
const s =
|
|
115
|
+
const s = O(this.value, t)
|
|
116
116
|
this.update(s)
|
|
117
117
|
}
|
|
118
118
|
includes(t) {
|
|
@@ -120,11 +120,19 @@
|
|
|
120
120
|
}
|
|
121
121
|
appendIfUnique(t) {
|
|
122
122
|
const s = this.value
|
|
123
|
-
|
|
123
|
+
k(s, t), this.update(s)
|
|
124
|
+
}
|
|
125
|
+
findBy(t) {
|
|
126
|
+
return this.value.find(t)
|
|
127
|
+
}
|
|
128
|
+
replace(t, s) {
|
|
129
|
+
const r = this.value,
|
|
130
|
+
n = r.indexOf(t)
|
|
131
|
+
n !== -1 && ((r[n] = s), this.update(r))
|
|
124
132
|
}
|
|
125
133
|
}
|
|
126
|
-
const m = (e) => new
|
|
127
|
-
|
|
134
|
+
const m = (e) => new bt(e),
|
|
135
|
+
vt = {
|
|
128
136
|
push: (e, t) => m(e).push(t),
|
|
129
137
|
pop: (e) => m(e).pop(),
|
|
130
138
|
unshift: (e, t) => m(e).unshift(t),
|
|
@@ -136,8 +144,10 @@
|
|
|
136
144
|
reset: (e) => m(e).reset(),
|
|
137
145
|
includes: (e, t) => m(e).includes(t),
|
|
138
146
|
appendIfUnique: (e, t) => m(e).appendIfUnique(t),
|
|
147
|
+
findBy: (e, t) => m(e).findBy(t),
|
|
148
|
+
replace: (e, t, s) => m(e).replace(t, s),
|
|
139
149
|
}
|
|
140
|
-
class
|
|
150
|
+
class yt {
|
|
141
151
|
constructor(t) {
|
|
142
152
|
this.store = t
|
|
143
153
|
}
|
|
@@ -176,22 +186,22 @@
|
|
|
176
186
|
return !!this.value[t]
|
|
177
187
|
}
|
|
178
188
|
}
|
|
179
|
-
const y = (e) => new
|
|
180
|
-
|
|
189
|
+
const y = (e) => new yt(e),
|
|
190
|
+
gt = {
|
|
181
191
|
reset: (e) => y(e).reset(),
|
|
182
192
|
resetAttribute: (e, t) => y(e).resetAttribute(t),
|
|
183
193
|
updateAttribute: (e, t, s) => y(e).updateAttribute(t, s),
|
|
184
194
|
updateAttributes: (e, t) => y(e).updateAttributes(t),
|
|
185
195
|
attributeTruthy: (e, t) => y(e).attributeTruthy(t),
|
|
186
196
|
},
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
197
|
+
Et = (e) => typeof e == 'boolean',
|
|
198
|
+
At = (e) => typeof e == 'number',
|
|
199
|
+
$ = (e) => typeof e == 'string',
|
|
190
200
|
g = (e) => Array.isArray(e),
|
|
191
201
|
A = (e) => e !== null && !g(e) && typeof e == 'object',
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
202
|
+
wt = { boolean: Et, number: At, string: $, array: g, object: A },
|
|
203
|
+
Nt = (e, t) => t.createElement(e),
|
|
204
|
+
St = (e, t) => {
|
|
195
205
|
for (const s in t) {
|
|
196
206
|
if (s === '__self') continue
|
|
197
207
|
const r = t[s].toString()
|
|
@@ -199,25 +209,25 @@
|
|
|
199
209
|
const n = e
|
|
200
210
|
n.value !== r && (n.value = r)
|
|
201
211
|
} else
|
|
202
|
-
|
|
212
|
+
$(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
|
|
203
213
|
}
|
|
204
214
|
},
|
|
205
|
-
|
|
215
|
+
_t = (e, t, s) => {
|
|
206
216
|
const r = {}
|
|
207
217
|
for (const n in t) {
|
|
208
218
|
const i = t[n],
|
|
209
|
-
|
|
210
|
-
e.addEventListener(n,
|
|
211
|
-
(r[n] = { domEvent: n, busEvent: i, listener:
|
|
219
|
+
o = (c) => s(i, c)
|
|
220
|
+
e.addEventListener(n, o),
|
|
221
|
+
(r[n] = { domEvent: n, busEvent: i, listener: o })
|
|
212
222
|
}
|
|
213
223
|
e.eventMaps = r
|
|
214
224
|
},
|
|
215
|
-
|
|
216
|
-
const n =
|
|
217
|
-
return
|
|
225
|
+
xt = (e, t, s, r) => {
|
|
226
|
+
const n = Nt(e, r.document)
|
|
227
|
+
return St(n, t), _t(n, s, r.publish), n
|
|
218
228
|
},
|
|
219
229
|
N = 'http://www.w3.org/2000/svg',
|
|
220
|
-
|
|
230
|
+
Tt = {
|
|
221
231
|
animate: !0,
|
|
222
232
|
animateMotion: !0,
|
|
223
233
|
animateTransform: !0,
|
|
@@ -281,8 +291,8 @@
|
|
|
281
291
|
use: !0,
|
|
282
292
|
view: !0,
|
|
283
293
|
},
|
|
284
|
-
|
|
285
|
-
|
|
294
|
+
jt = (e, t) => !!(Tt[e] || (e === 'a' && t === N)),
|
|
295
|
+
Ot = (e, t, s) => {
|
|
286
296
|
const r = s.createElementNS(N, e)
|
|
287
297
|
for (const n in t)
|
|
288
298
|
n === '__self' ||
|
|
@@ -290,54 +300,54 @@
|
|
|
290
300
|
r.setAttributeNS(null, n, t[n].toString())
|
|
291
301
|
return r
|
|
292
302
|
},
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
class
|
|
303
|
+
Mt = (e) => e.namespaceURI === N,
|
|
304
|
+
kt = (e, t) => t.createTextNode(e)
|
|
305
|
+
class $t {
|
|
296
306
|
constructor(t) {
|
|
297
307
|
this.value = t.toString()
|
|
298
308
|
}
|
|
299
309
|
render(t) {
|
|
300
|
-
const s =
|
|
310
|
+
const s = kt(this.value, t.document)
|
|
301
311
|
return (s.__jsx = 'TextNode'), [s]
|
|
302
312
|
}
|
|
303
313
|
}
|
|
304
|
-
const
|
|
305
|
-
Dt = (e) => new
|
|
306
|
-
Pt = (e) => (
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
D = (e, t = {}) =>
|
|
310
|
-
|
|
314
|
+
const Bt = (e) => typeof e == 'string' || typeof e == 'number',
|
|
315
|
+
Dt = (e) => new $t(e),
|
|
316
|
+
Pt = (e) => (Bt(e) ? Dt(e) : e),
|
|
317
|
+
B = (e) => Ft(e).map(Pt).flat(),
|
|
318
|
+
Ft = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
|
|
319
|
+
D = (e, t = {}) => B(e || t.children || []),
|
|
320
|
+
Vt = (e, t = '') => {
|
|
311
321
|
const s = {},
|
|
312
322
|
r = {}
|
|
313
323
|
for (const n in e) {
|
|
314
324
|
const i = e[n]
|
|
315
325
|
if (n.match(/^on.+/i)) {
|
|
316
|
-
const
|
|
317
|
-
r[
|
|
326
|
+
const o = n.slice(2).toLowerCase()
|
|
327
|
+
r[o] = i ? i.toString() : ''
|
|
318
328
|
} else {
|
|
319
329
|
if (i === !1) continue
|
|
320
|
-
n === '__source' ? (s.__source = e.__source) : (s[n] =
|
|
330
|
+
n === '__source' ? (s.__source = e.__source) : (s[n] = Lt(n, i, t))
|
|
321
331
|
}
|
|
322
332
|
}
|
|
323
333
|
return { attributes: s, events: r }
|
|
324
334
|
},
|
|
325
|
-
|
|
326
|
-
|
|
335
|
+
Lt = (e, t, s = '') => (t == null ? s : t.toString()),
|
|
336
|
+
zt = (e, t) => {
|
|
327
337
|
const s = e || {},
|
|
328
338
|
r = D(t, s)
|
|
329
339
|
return (s.children = s.children || r), s
|
|
330
340
|
},
|
|
331
|
-
P = (e, t, s, r = []) => e.reduce(
|
|
332
|
-
|
|
341
|
+
P = (e, t, s, r = []) => e.reduce(Kt(t, s), r).flat(),
|
|
342
|
+
Kt = (e, t) => (s, r) =>
|
|
333
343
|
r
|
|
334
344
|
? Array.isArray(r)
|
|
335
345
|
? P(r, e, t, s)
|
|
336
346
|
: (r.render(e, t).forEach((n) => s.push(n)), s)
|
|
337
347
|
: s
|
|
338
|
-
class
|
|
348
|
+
class F {
|
|
339
349
|
constructor(t) {
|
|
340
|
-
this.collection =
|
|
350
|
+
this.collection = B(t)
|
|
341
351
|
}
|
|
342
352
|
render(t, s) {
|
|
343
353
|
this.parentElement = s
|
|
@@ -353,7 +363,7 @@
|
|
|
353
363
|
t.forEach((r) => s.appendChild(r))
|
|
354
364
|
}
|
|
355
365
|
}
|
|
356
|
-
class
|
|
366
|
+
class Rt {
|
|
357
367
|
constructor(t, s) {
|
|
358
368
|
;(this.type = t), (this.attributes = s)
|
|
359
369
|
}
|
|
@@ -381,14 +391,14 @@
|
|
|
381
391
|
return `${this.type}${t}${s}${r}`
|
|
382
392
|
}
|
|
383
393
|
}
|
|
384
|
-
class
|
|
394
|
+
class Ut {
|
|
385
395
|
constructor(t, s, r = []) {
|
|
386
396
|
this.type = t
|
|
387
|
-
const { events: n, attributes: i } =
|
|
397
|
+
const { events: n, attributes: i } = Vt(s)
|
|
388
398
|
;(this.events = n),
|
|
389
399
|
(this.attributes = i),
|
|
390
|
-
(this.isSvg =
|
|
391
|
-
(this.children = new
|
|
400
|
+
(this.isSvg = jt(this.type, this.attributes.xmlns)),
|
|
401
|
+
(this.children = new F(r))
|
|
392
402
|
}
|
|
393
403
|
render(t) {
|
|
394
404
|
const s = this.generateDom(t)
|
|
@@ -398,24 +408,24 @@
|
|
|
398
408
|
return this.isSvg ? this.generateSvgDom(t) : this.generateHtmlDom(t)
|
|
399
409
|
}
|
|
400
410
|
generateHtmlDom(t) {
|
|
401
|
-
const s =
|
|
411
|
+
const s = xt(this.type, this.attributes, this.events, t)
|
|
402
412
|
return (s.__jsx = this.jsxKey()), s
|
|
403
413
|
}
|
|
404
414
|
generateSvgDom(t) {
|
|
405
|
-
const s =
|
|
415
|
+
const s = Ot(this.type, this.attributes, t.document)
|
|
406
416
|
return (s.__jsx = this.jsxKey()), s
|
|
407
417
|
}
|
|
408
418
|
jsxKey() {
|
|
409
|
-
return new
|
|
419
|
+
return new Rt(this.type, this.attributes).generate()
|
|
410
420
|
}
|
|
411
421
|
}
|
|
412
|
-
const
|
|
413
|
-
typeof e == 'string' ? new
|
|
414
|
-
|
|
422
|
+
const V = (e, t, ...s) =>
|
|
423
|
+
typeof e == 'string' ? new Ut(e, t, s) : e(zt(t, s))
|
|
424
|
+
V.fragment = (e, t) => {
|
|
415
425
|
const s = D(t, e)
|
|
416
|
-
return new
|
|
426
|
+
return new F(s)
|
|
417
427
|
}
|
|
418
|
-
class
|
|
428
|
+
class qt {
|
|
419
429
|
constructor(t, s, r) {
|
|
420
430
|
;(this.template = t),
|
|
421
431
|
(this.selector = s),
|
|
@@ -440,45 +450,45 @@
|
|
|
440
450
|
return this.renderKit.document.querySelector(this.selector)
|
|
441
451
|
}
|
|
442
452
|
}
|
|
443
|
-
const
|
|
444
|
-
const r = new
|
|
453
|
+
const It = (e, t, s) => {
|
|
454
|
+
const r = new qt(e, t, s)
|
|
445
455
|
return r.renderAndAttach(s), r
|
|
446
456
|
},
|
|
447
|
-
|
|
448
|
-
|
|
457
|
+
L = 'go-to-href',
|
|
458
|
+
z = 'go-to',
|
|
449
459
|
E = 'navigation:location-change',
|
|
450
|
-
|
|
451
|
-
|
|
460
|
+
K = 'navigation:route-change',
|
|
461
|
+
Jt = Object.freeze(
|
|
452
462
|
Object.defineProperty(
|
|
453
463
|
{
|
|
454
464
|
__proto__: null,
|
|
455
|
-
linkNavigationEvent:
|
|
465
|
+
linkNavigationEvent: L,
|
|
456
466
|
locationChangeEvent: E,
|
|
457
|
-
navigationEvent:
|
|
458
|
-
routeChangeEvent:
|
|
467
|
+
navigationEvent: z,
|
|
468
|
+
routeChangeEvent: K,
|
|
459
469
|
},
|
|
460
470
|
Symbol.toStringTag,
|
|
461
471
|
{ value: 'Module' },
|
|
462
472
|
),
|
|
463
473
|
),
|
|
464
|
-
|
|
474
|
+
R = (e) => {
|
|
465
475
|
e.create('route', { host: '', path: '', query: {} })
|
|
466
476
|
},
|
|
467
|
-
|
|
477
|
+
U = (e) => {
|
|
468
478
|
const t = e.closest('[href]')
|
|
469
479
|
return (t && t.getAttribute('href')) || ''
|
|
470
480
|
},
|
|
471
481
|
S = ({ payload: e, publish: t, window: s }) => {
|
|
472
482
|
s.history.pushState(null, '', e), t(E, null)
|
|
473
483
|
},
|
|
474
|
-
|
|
484
|
+
q = (e) => {
|
|
475
485
|
const t = e.payload
|
|
476
486
|
if (!t || !t.target) return
|
|
477
487
|
t.preventDefault()
|
|
478
|
-
const s =
|
|
488
|
+
const s = U(t.target)
|
|
479
489
|
S({ ...e, payload: s })
|
|
480
490
|
},
|
|
481
|
-
|
|
491
|
+
I = (e) =>
|
|
482
492
|
e
|
|
483
493
|
.replace(/^\?/, '')
|
|
484
494
|
.split('&')
|
|
@@ -487,39 +497,39 @@
|
|
|
487
497
|
const r = s.split('=')
|
|
488
498
|
return (t[r[0]] = r[1]), t
|
|
489
499
|
}, {}),
|
|
490
|
-
|
|
500
|
+
J = (e) => {
|
|
491
501
|
const { state: t, publish: s, window: r } = e,
|
|
492
|
-
{ host: n, pathname: i, search:
|
|
502
|
+
{ host: n, pathname: i, search: o } = r.location,
|
|
493
503
|
c = i,
|
|
494
|
-
u =
|
|
504
|
+
u = I(o),
|
|
495
505
|
d = { host: n, path: c, query: u }
|
|
496
|
-
t.store('route').update(d), s(
|
|
506
|
+
t.store('route').update(d), s(K, d)
|
|
497
507
|
},
|
|
498
|
-
|
|
508
|
+
H = (e) => {
|
|
499
509
|
const { subscribe: t } = e
|
|
500
|
-
t(
|
|
501
|
-
t(
|
|
510
|
+
t(L, q),
|
|
511
|
+
t(z, (s) => {
|
|
502
512
|
S(s)
|
|
503
513
|
})
|
|
504
514
|
},
|
|
505
515
|
G = (e) => {
|
|
506
516
|
const { publish: t, subscribe: s, state: r, window: n } = e
|
|
507
|
-
|
|
517
|
+
R(r), n.addEventListener('popstate', () => t(E, null)), s(E, J)
|
|
508
518
|
},
|
|
509
|
-
|
|
519
|
+
W = (e) => {
|
|
510
520
|
setTimeout(() => e.publish(E, null), 0)
|
|
511
521
|
},
|
|
512
522
|
C = (e) => {
|
|
513
|
-
G(e),
|
|
523
|
+
G(e), H(e), W(e)
|
|
514
524
|
},
|
|
515
|
-
|
|
525
|
+
Ht = Object.freeze(
|
|
516
526
|
Object.defineProperty(
|
|
517
527
|
{
|
|
518
528
|
__proto__: null,
|
|
519
|
-
publishLocation:
|
|
529
|
+
publishLocation: W,
|
|
520
530
|
startNavigation: C,
|
|
521
531
|
subscribeToHistoryChange: G,
|
|
522
|
-
subscribeToNavigation:
|
|
532
|
+
subscribeToNavigation: H,
|
|
523
533
|
},
|
|
524
534
|
Symbol.toStringTag,
|
|
525
535
|
{ value: 'Module' },
|
|
@@ -532,7 +542,7 @@
|
|
|
532
542
|
publish: r,
|
|
533
543
|
subscribe: n,
|
|
534
544
|
bus: i,
|
|
535
|
-
state:
|
|
545
|
+
state: o,
|
|
536
546
|
renderKit: c,
|
|
537
547
|
}) {
|
|
538
548
|
;(this.window = t),
|
|
@@ -540,12 +550,12 @@
|
|
|
540
550
|
(this.publish = r),
|
|
541
551
|
(this.subscribe = n),
|
|
542
552
|
(this.bus = i),
|
|
543
|
-
(this.state =
|
|
553
|
+
(this.state = o),
|
|
544
554
|
(this.renderKit = c),
|
|
545
555
|
(this.roots = [])
|
|
546
556
|
}
|
|
547
557
|
render(t, s) {
|
|
548
|
-
const r =
|
|
558
|
+
const r = It(t, s, this.renderKit)
|
|
549
559
|
return this.roots.push(r), r
|
|
550
560
|
}
|
|
551
561
|
startNavigation() {
|
|
@@ -557,7 +567,7 @@
|
|
|
557
567
|
value: 'Module',
|
|
558
568
|
}),
|
|
559
569
|
)
|
|
560
|
-
class
|
|
570
|
+
class X {
|
|
561
571
|
constructor() {
|
|
562
572
|
this.lookup = {}
|
|
563
573
|
}
|
|
@@ -580,7 +590,7 @@
|
|
|
580
590
|
this.lookup[t] || (this.lookup[t] = [])
|
|
581
591
|
}
|
|
582
592
|
}
|
|
583
|
-
class
|
|
593
|
+
class Y {
|
|
584
594
|
constructor() {
|
|
585
595
|
this.lookup = []
|
|
586
596
|
}
|
|
@@ -595,7 +605,7 @@
|
|
|
595
605
|
return this.lookup.filter((s) => s.matcher.test(t))
|
|
596
606
|
}
|
|
597
607
|
}
|
|
598
|
-
class
|
|
608
|
+
class _ {
|
|
599
609
|
constructor({ publish: t, event: s, payload: r, timer: n }) {
|
|
600
610
|
;(this.setNewTimeout = () => {
|
|
601
611
|
this.stopped ||
|
|
@@ -632,26 +642,28 @@
|
|
|
632
642
|
((this.callCount += 1), this.publish(this.event, this.payload))
|
|
633
643
|
}
|
|
634
644
|
}
|
|
635
|
-
const
|
|
636
|
-
const { offset:
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
publish: e.publish,
|
|
641
|
-
payload: e.payload,
|
|
642
|
-
timer: r,
|
|
643
|
-
}
|
|
645
|
+
const Wt = (e) => (t, s) => {
|
|
646
|
+
const { offset: r, period: n, payload: i } = s,
|
|
647
|
+
o = ({ callCount: u }) => (r && u == 0 ? r : n),
|
|
648
|
+
c = new _({ payload: i, event: t, publish: e, timer: o })
|
|
649
|
+
return c.start(), c.stop
|
|
644
650
|
},
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
651
|
+
Ct =
|
|
652
|
+
(e) =>
|
|
653
|
+
(t, { timeout: s, payload: r }) => {
|
|
654
|
+
const n = ({ callCount: o, stop: c }) => (o > 1 && c(), s),
|
|
655
|
+
i = new _({ publish: e, event: t, payload: r, timer: n })
|
|
656
|
+
return i.start(), i.stop
|
|
657
|
+
},
|
|
658
|
+
Qt = (e) => (t, s) => {
|
|
659
|
+
const r = { ...s, event: t, publish: e },
|
|
660
|
+
n = new _(r)
|
|
661
|
+
return n.start(), n.stop
|
|
650
662
|
}
|
|
651
|
-
class
|
|
663
|
+
class Z {
|
|
652
664
|
constructor() {
|
|
653
|
-
;(this.exactSubscriptions = new
|
|
654
|
-
(this.fuzzySubscriptions = new
|
|
665
|
+
;(this.exactSubscriptions = new X()),
|
|
666
|
+
(this.fuzzySubscriptions = new Y()),
|
|
655
667
|
(this.currentIndex = 0)
|
|
656
668
|
}
|
|
657
669
|
subscribe(t, s) {
|
|
@@ -686,48 +698,49 @@
|
|
|
686
698
|
}
|
|
687
699
|
}
|
|
688
700
|
}
|
|
689
|
-
const
|
|
690
|
-
const e = new
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
701
|
+
const tt = () => {
|
|
702
|
+
const e = new Z(),
|
|
703
|
+
t = (r, n) => e.publish(r, n)
|
|
704
|
+
return (
|
|
705
|
+
(t.withTimeout = Ct(t)),
|
|
706
|
+
(t.periodically = Wt(t)),
|
|
707
|
+
(t.periodicallyWithCustomTimer = Qt(t)),
|
|
708
|
+
{ bus: e, publish: t, subscribe: (r, n) => e.subscribe(r, n) }
|
|
709
|
+
)
|
|
696
710
|
},
|
|
697
|
-
|
|
711
|
+
Xt = Object.freeze(
|
|
698
712
|
Object.defineProperty(
|
|
699
713
|
{
|
|
700
714
|
__proto__: null,
|
|
701
|
-
ExactSubscriptions:
|
|
702
|
-
FuzzySubscriptions:
|
|
703
|
-
JaxsBus:
|
|
704
|
-
createBus:
|
|
705
|
-
publishPeriodically: Qt,
|
|
715
|
+
ExactSubscriptions: X,
|
|
716
|
+
FuzzySubscriptions: Y,
|
|
717
|
+
JaxsBus: Z,
|
|
718
|
+
createBus: tt,
|
|
706
719
|
},
|
|
707
720
|
Symbol.toStringTag,
|
|
708
721
|
{ value: 'Module' },
|
|
709
722
|
),
|
|
710
723
|
),
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
!(A(e) && A(t)) || !
|
|
724
|
+
Yt = (e, t) => e === t,
|
|
725
|
+
Zt = (e, t) => Object.keys(e).length === Object.keys(t).length,
|
|
726
|
+
et = (e, t) =>
|
|
727
|
+
!(A(e) && A(t)) || !Zt(e, t)
|
|
715
728
|
? !1
|
|
716
729
|
: Object.keys(e).every((s) => {
|
|
717
730
|
const r = e[s],
|
|
718
731
|
n = t[s]
|
|
719
732
|
return w(r, n)
|
|
720
733
|
}),
|
|
721
|
-
|
|
734
|
+
st = (e, t) =>
|
|
722
735
|
!(g(e) && g(t)) || e.length !== t.length
|
|
723
736
|
? !1
|
|
724
737
|
: e.every((s, r) => {
|
|
725
738
|
const n = t[r]
|
|
726
739
|
return w(s, n)
|
|
727
740
|
}),
|
|
728
|
-
w = (e, t) => (A(e) ?
|
|
729
|
-
|
|
730
|
-
class
|
|
741
|
+
w = (e, t) => (A(e) ? et(e, t) : g(e) ? st(e, t) : Yt(e, t)),
|
|
742
|
+
te = { objects: et, arrays: st, equal: w }
|
|
743
|
+
class x {
|
|
731
744
|
constructor(t) {
|
|
732
745
|
;(this.name = t.name),
|
|
733
746
|
(this.parent = t.parent),
|
|
@@ -756,21 +769,21 @@
|
|
|
756
769
|
return t(this.value)
|
|
757
770
|
}
|
|
758
771
|
}
|
|
759
|
-
const
|
|
760
|
-
class
|
|
772
|
+
const T = 'state'
|
|
773
|
+
class rt {
|
|
761
774
|
constructor(t) {
|
|
762
775
|
;(this.publisher = t),
|
|
763
776
|
(this.stores = {}),
|
|
764
|
-
(this.eventNamePrefix =
|
|
777
|
+
(this.eventNamePrefix = T),
|
|
765
778
|
(this.notifications = new Set()),
|
|
766
779
|
(this.inTransaction = !1)
|
|
767
780
|
}
|
|
768
781
|
create(t, s) {
|
|
769
|
-
const r = new
|
|
782
|
+
const r = new x({ name: t, parent: this, value: s })
|
|
770
783
|
return (this.stores[t] = r), r
|
|
771
784
|
}
|
|
772
785
|
store(t) {
|
|
773
|
-
return this.stores[t] || new
|
|
786
|
+
return this.stores[t] || new x({ name: t, parent: this, value: void 0 })
|
|
774
787
|
}
|
|
775
788
|
get(t) {
|
|
776
789
|
return this.store(t).value
|
|
@@ -803,15 +816,15 @@
|
|
|
803
816
|
return `${this.eventNamePrefix}:${t}`
|
|
804
817
|
}
|
|
805
818
|
}
|
|
806
|
-
const
|
|
807
|
-
|
|
819
|
+
const nt = (e) => new rt(e),
|
|
820
|
+
ee = Object.freeze(
|
|
808
821
|
Object.defineProperty(
|
|
809
|
-
{ __proto__: null, State:
|
|
822
|
+
{ __proto__: null, State: rt, Store: x, createState: nt, eventName: T },
|
|
810
823
|
Symbol.toStringTag,
|
|
811
824
|
{ value: 'Module' },
|
|
812
825
|
),
|
|
813
826
|
)
|
|
814
|
-
class
|
|
827
|
+
class se {
|
|
815
828
|
constructor(t) {
|
|
816
829
|
this.setupDomEnvironment(t)
|
|
817
830
|
}
|
|
@@ -841,11 +854,11 @@
|
|
|
841
854
|
: ((this.window = window), (this.document = document))
|
|
842
855
|
}
|
|
843
856
|
setupBus() {
|
|
844
|
-
const { publish: t, subscribe: s, bus: r } =
|
|
857
|
+
const { publish: t, subscribe: s, bus: r } = tt()
|
|
845
858
|
;(this.publish = t), (this.subscribe = s), (this.bus = r)
|
|
846
859
|
}
|
|
847
860
|
setupState() {
|
|
848
|
-
this.state =
|
|
861
|
+
this.state = nt(this.publish)
|
|
849
862
|
}
|
|
850
863
|
addBusOptions() {
|
|
851
864
|
this.bus.addListenerOptions({
|
|
@@ -864,11 +877,11 @@
|
|
|
864
877
|
}
|
|
865
878
|
}
|
|
866
879
|
}
|
|
867
|
-
const
|
|
868
|
-
const s = new
|
|
880
|
+
const re = (e = {}) => {
|
|
881
|
+
const s = new se(e).setup()
|
|
869
882
|
return s.startNavigation(), s
|
|
870
883
|
}
|
|
871
|
-
var
|
|
884
|
+
var a = ((e) => (
|
|
872
885
|
(e[(e.removeNode = 0)] = 'removeNode'),
|
|
873
886
|
(e[(e.insertNode = 1)] = 'insertNode'),
|
|
874
887
|
(e[(e.replaceNode = 2)] = 'replaceNode'),
|
|
@@ -881,38 +894,38 @@
|
|
|
881
894
|
(e[(e.changeValue = 9)] = 'changeValue'),
|
|
882
895
|
(e[(e.changeText = 10)] = 'changeText'),
|
|
883
896
|
e
|
|
884
|
-
))(
|
|
885
|
-
const
|
|
897
|
+
))(a || {})
|
|
898
|
+
const ne = Object.freeze(
|
|
886
899
|
Object.defineProperty(
|
|
887
|
-
{ __proto__: null, ChangeInstructionTypes:
|
|
900
|
+
{ __proto__: null, ChangeInstructionTypes: a },
|
|
888
901
|
Symbol.toStringTag,
|
|
889
902
|
{ value: 'Module' },
|
|
890
903
|
),
|
|
891
904
|
),
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
905
|
+
ie = (e, t) => ({ source: e, target: t, type: a.changeText, data: {} }),
|
|
906
|
+
oe = (e, t) => ({ source: e, target: t, type: a.replaceNode, data: {} }),
|
|
907
|
+
ue = (e, t, s) => ({
|
|
895
908
|
source: e,
|
|
896
909
|
target: t,
|
|
897
910
|
data: s,
|
|
898
|
-
type:
|
|
911
|
+
type: a.removeAttribute,
|
|
899
912
|
}),
|
|
900
|
-
|
|
901
|
-
|
|
913
|
+
ae = (e, t, s) => ({ source: e, target: t, data: s, type: a.addAttribute }),
|
|
914
|
+
ce = (e, t, s) => ({
|
|
902
915
|
source: e,
|
|
903
916
|
target: t,
|
|
904
917
|
data: s,
|
|
905
|
-
type:
|
|
918
|
+
type: a.updateAttribute,
|
|
906
919
|
}),
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
class
|
|
920
|
+
le = (e, t, s) => ({ source: e, target: t, data: s, type: a.removeEvent }),
|
|
921
|
+
he = (e, t, s) => ({ source: e, target: t, data: s, type: a.addEvent }),
|
|
922
|
+
de = (e, t, s) => ({ source: e, target: t, data: s, type: a.updateEvent }),
|
|
923
|
+
it = (e) => ({ source: e, target: e, type: a.removeNode, data: {} }),
|
|
924
|
+
j = (e, t) => ({ target: e, source: e, type: a.insertNode, data: t }),
|
|
925
|
+
pe = (e, t, s) => ({ source: e, target: t, type: a.changeValue, data: s }),
|
|
926
|
+
fe = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
|
|
927
|
+
ot = { index: -1 }
|
|
928
|
+
class me {
|
|
916
929
|
constructor() {
|
|
917
930
|
this.map = {}
|
|
918
931
|
}
|
|
@@ -927,7 +940,7 @@
|
|
|
927
940
|
pullMatch(t) {
|
|
928
941
|
const s = t && t.__jsx
|
|
929
942
|
return !s || !(this.map[s] && this.map[s].length)
|
|
930
|
-
?
|
|
943
|
+
? ot
|
|
931
944
|
: this.map[s].shift()
|
|
932
945
|
}
|
|
933
946
|
clear(t) {
|
|
@@ -944,23 +957,23 @@
|
|
|
944
957
|
return Object.values(this.map).flat()
|
|
945
958
|
}
|
|
946
959
|
}
|
|
947
|
-
const
|
|
948
|
-
const t = new
|
|
960
|
+
const ut = (e) => {
|
|
961
|
+
const t = new me()
|
|
949
962
|
return t.populate(e), t
|
|
950
963
|
},
|
|
951
|
-
|
|
964
|
+
at = (e, t, s = !1) => {
|
|
952
965
|
const r = [],
|
|
953
966
|
n = e.attributes,
|
|
954
967
|
i = n.length,
|
|
955
|
-
|
|
956
|
-
c =
|
|
968
|
+
o = t.attributes,
|
|
969
|
+
c = o.length
|
|
957
970
|
let u, d, p
|
|
958
971
|
for (u = 0; u < i; u++) {
|
|
959
972
|
p = null
|
|
960
973
|
const h = n.item(u)
|
|
961
974
|
if (h) {
|
|
962
975
|
for (d = 0; d < c; d++) {
|
|
963
|
-
const f =
|
|
976
|
+
const f = o.item(d)
|
|
964
977
|
if (f && h.name == f.name) {
|
|
965
978
|
p = f
|
|
966
979
|
break
|
|
@@ -968,13 +981,13 @@
|
|
|
968
981
|
}
|
|
969
982
|
p
|
|
970
983
|
? h.value !== p.value &&
|
|
971
|
-
r.push(
|
|
972
|
-
: r.push(
|
|
984
|
+
r.push(ce(e, t, { name: h.name, value: p.value, isSvg: s }))
|
|
985
|
+
: r.push(ue(e, t, { name: h.name, isSvg: s }))
|
|
973
986
|
}
|
|
974
987
|
}
|
|
975
988
|
for (u = 0; u < c; u++) {
|
|
976
989
|
p = null
|
|
977
|
-
const h =
|
|
990
|
+
const h = o.item(u)
|
|
978
991
|
if (h) {
|
|
979
992
|
for (d = 0; d < i; d++) {
|
|
980
993
|
const f = n.item(d)
|
|
@@ -983,17 +996,17 @@
|
|
|
983
996
|
break
|
|
984
997
|
}
|
|
985
998
|
}
|
|
986
|
-
p || r.push(
|
|
999
|
+
p || r.push(ae(e, t, { name: h.name, value: h.value, isSvg: s }))
|
|
987
1000
|
}
|
|
988
1001
|
}
|
|
989
1002
|
return r
|
|
990
1003
|
},
|
|
991
|
-
|
|
1004
|
+
be = (e, t) => {
|
|
992
1005
|
const s = [],
|
|
993
1006
|
r = e.eventMaps,
|
|
994
1007
|
n = t.eventMaps,
|
|
995
1008
|
i = Object.keys(r),
|
|
996
|
-
|
|
1009
|
+
o = Object.keys(n)
|
|
997
1010
|
return (
|
|
998
1011
|
i.forEach((c) => {
|
|
999
1012
|
const u = r[c],
|
|
@@ -1001,135 +1014,135 @@
|
|
|
1001
1014
|
d
|
|
1002
1015
|
? d.busEvent !== u.busEvent &&
|
|
1003
1016
|
s.push(
|
|
1004
|
-
|
|
1017
|
+
de(e, t, {
|
|
1005
1018
|
name: c,
|
|
1006
1019
|
targetValue: d.listener,
|
|
1007
1020
|
sourceValue: u.listener,
|
|
1008
1021
|
}),
|
|
1009
1022
|
)
|
|
1010
|
-
: s.push(
|
|
1023
|
+
: s.push(le(e, t, { name: u.domEvent, value: u.listener }))
|
|
1011
1024
|
}),
|
|
1012
|
-
|
|
1025
|
+
o.forEach((c) => {
|
|
1013
1026
|
const u = r[c],
|
|
1014
1027
|
d = n[c]
|
|
1015
|
-
u || s.push(
|
|
1028
|
+
u || s.push(he(e, t, { name: d.domEvent, value: d.listener }))
|
|
1016
1029
|
}),
|
|
1017
1030
|
s
|
|
1018
1031
|
)
|
|
1019
1032
|
},
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
if (
|
|
1033
|
+
ve = (e) => e.tagName !== 'INPUT',
|
|
1034
|
+
ye = (e, t) => e.value === t.value,
|
|
1035
|
+
ge = (e, t) => {
|
|
1036
|
+
if (ve(e) || ye(e, t)) return []
|
|
1024
1037
|
const s = e,
|
|
1025
1038
|
r = t
|
|
1026
|
-
return [
|
|
1039
|
+
return [pe(s, r, { name: 'value', value: r.value })]
|
|
1027
1040
|
},
|
|
1028
|
-
|
|
1029
|
-
const s =
|
|
1030
|
-
r =
|
|
1031
|
-
n =
|
|
1041
|
+
Ee = (e, t) => {
|
|
1042
|
+
const s = at(e, t),
|
|
1043
|
+
r = be(e, t),
|
|
1044
|
+
n = ge(e, t)
|
|
1032
1045
|
return s.concat(r).concat(n)
|
|
1033
1046
|
},
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1047
|
+
Ae = (e, t) => at(e, t, !0),
|
|
1048
|
+
we = (e, t) => (e.textContent !== t.textContent ? [ie(e, t)] : []),
|
|
1049
|
+
Ne = (e, t, s) => {
|
|
1037
1050
|
let r = []
|
|
1038
|
-
if (e.nodeType === 1 &&
|
|
1051
|
+
if (e.nodeType === 1 && Mt(e)) {
|
|
1039
1052
|
const n = e,
|
|
1040
1053
|
i = t,
|
|
1041
|
-
|
|
1054
|
+
o = Ae(n, i),
|
|
1042
1055
|
c = s(n.childNodes, i.childNodes, n)
|
|
1043
|
-
r =
|
|
1056
|
+
r = o.concat(c)
|
|
1044
1057
|
} else if (e.nodeType === 1) {
|
|
1045
1058
|
const n = e,
|
|
1046
1059
|
i = t,
|
|
1047
|
-
|
|
1060
|
+
o = Ee(n, i),
|
|
1048
1061
|
c = s(n.childNodes, i.childNodes, n)
|
|
1049
|
-
r =
|
|
1050
|
-
} else e.nodeType === 3 && (r =
|
|
1062
|
+
r = o.concat(c)
|
|
1063
|
+
} else e.nodeType === 3 && (r = we(e, t))
|
|
1051
1064
|
return r
|
|
1052
1065
|
},
|
|
1053
|
-
|
|
1066
|
+
ct = (e, t, s) => {
|
|
1054
1067
|
const r = [],
|
|
1055
|
-
n =
|
|
1056
|
-
i =
|
|
1057
|
-
|
|
1068
|
+
n = Se(e, t),
|
|
1069
|
+
i = ut(e),
|
|
1070
|
+
o = ut(t),
|
|
1058
1071
|
c = []
|
|
1059
1072
|
let u = 0
|
|
1060
1073
|
for (; u < n; u++) {
|
|
1061
1074
|
const p = e[u],
|
|
1062
1075
|
h = t[u]
|
|
1063
|
-
if (h &&
|
|
1076
|
+
if (h && o.check(h)) {
|
|
1064
1077
|
const f = i.pullMatch(h)
|
|
1065
|
-
|
|
1078
|
+
o.clear(h),
|
|
1066
1079
|
f.element
|
|
1067
|
-
? (f.index !== u && r.push(
|
|
1080
|
+
? (f.index !== u && r.push(j(f.element, { parent: s, index: u })),
|
|
1068
1081
|
c.push({ source: f.element, target: h }))
|
|
1069
1082
|
: p
|
|
1070
|
-
?
|
|
1071
|
-
? r.push(
|
|
1072
|
-
: (i.clear(p), r.push(
|
|
1073
|
-
: r.push(
|
|
1074
|
-
} else p && i.pullMatch(p).element && r.push(
|
|
1083
|
+
? o.check(p)
|
|
1084
|
+
? r.push(j(h, { parent: s, index: u }))
|
|
1085
|
+
: (i.clear(p), r.push(oe(p, h)))
|
|
1086
|
+
: r.push(j(h, { parent: s, index: u }))
|
|
1087
|
+
} else p && i.pullMatch(p).element && r.push(it(p))
|
|
1075
1088
|
}
|
|
1076
1089
|
i.remaining().forEach(({ element: p }) => {
|
|
1077
|
-
r.push(
|
|
1090
|
+
r.push(it(p))
|
|
1078
1091
|
})
|
|
1079
1092
|
const d = c.reduce(
|
|
1080
|
-
(p, { source: h, target: f }) => p.concat(
|
|
1093
|
+
(p, { source: h, target: f }) => p.concat(Ne(h, f, ct)),
|
|
1081
1094
|
[],
|
|
1082
1095
|
)
|
|
1083
|
-
return r.concat(d).sort(
|
|
1096
|
+
return r.concat(d).sort(fe)
|
|
1084
1097
|
},
|
|
1085
|
-
|
|
1098
|
+
Se = (e, t) => {
|
|
1086
1099
|
const s = e.length,
|
|
1087
1100
|
r = t.length
|
|
1088
1101
|
return s > r ? s : r
|
|
1089
1102
|
},
|
|
1090
|
-
|
|
1091
|
-
const r =
|
|
1103
|
+
_e = (e, t, s) => {
|
|
1104
|
+
const r = ct(e, t, s)
|
|
1092
1105
|
return (
|
|
1093
1106
|
r.forEach((n) => {
|
|
1094
|
-
|
|
1107
|
+
xe(n)
|
|
1095
1108
|
}),
|
|
1096
1109
|
r
|
|
1097
1110
|
)
|
|
1098
1111
|
},
|
|
1099
|
-
|
|
1100
|
-
;(
|
|
1112
|
+
xe = (e) => {
|
|
1113
|
+
;(Le[e.type] || Te)(e)
|
|
1101
1114
|
},
|
|
1102
|
-
|
|
1103
|
-
|
|
1115
|
+
Te = (e) => {},
|
|
1116
|
+
je = (e) => {
|
|
1104
1117
|
const { source: t, target: s } = e
|
|
1105
1118
|
t.nodeValue = s.textContent
|
|
1106
1119
|
},
|
|
1107
|
-
|
|
1120
|
+
Oe = (e) => {
|
|
1108
1121
|
const { source: t } = e
|
|
1109
1122
|
t.remove()
|
|
1110
1123
|
},
|
|
1111
|
-
|
|
1124
|
+
Me = (e) => {
|
|
1112
1125
|
const { target: t, data: s } = e,
|
|
1113
1126
|
{ parent: r, index: n } = s,
|
|
1114
1127
|
i = r.childNodes[n]
|
|
1115
1128
|
i ? i && i !== t && r.insertBefore(t, i) : r.appendChild(t)
|
|
1116
1129
|
},
|
|
1117
|
-
|
|
1130
|
+
ke = (e) => {
|
|
1118
1131
|
const { source: t, target: s } = e
|
|
1119
1132
|
t.replaceWith(s)
|
|
1120
1133
|
},
|
|
1121
|
-
|
|
1134
|
+
$e = (e) => {
|
|
1122
1135
|
const { source: t, data: s } = e,
|
|
1123
1136
|
{ name: r, isSvg: n } = s
|
|
1124
1137
|
n ? t.removeAttributeNS(null, r) : t.removeAttribute(r)
|
|
1125
1138
|
},
|
|
1126
|
-
|
|
1139
|
+
lt = (e) => {
|
|
1127
1140
|
const { source: t, data: s } = e,
|
|
1128
1141
|
{ name: r, value: n, isSvg: i } = s
|
|
1129
1142
|
i ? t.setAttributeNS(null, r, n) : t.setAttribute(r, n)
|
|
1130
1143
|
},
|
|
1131
|
-
|
|
1132
|
-
|
|
1144
|
+
Be = (e) => {
|
|
1145
|
+
lt(e)
|
|
1133
1146
|
},
|
|
1134
1147
|
De = (e) => {
|
|
1135
1148
|
const t = e.data,
|
|
@@ -1143,62 +1156,62 @@
|
|
|
1143
1156
|
{ name: r, value: n } = t
|
|
1144
1157
|
s.addEventListener(r, n)
|
|
1145
1158
|
},
|
|
1146
|
-
|
|
1159
|
+
Fe = (e) => {
|
|
1147
1160
|
const t = e.data,
|
|
1148
1161
|
s = e.source,
|
|
1149
1162
|
{ name: r, sourceValue: n, targetValue: i } = t
|
|
1150
1163
|
s.removeEventListener(r, n), s.addEventListener(r, i)
|
|
1151
1164
|
},
|
|
1152
|
-
|
|
1165
|
+
Ve = (e) => {
|
|
1153
1166
|
const t = e.data,
|
|
1154
1167
|
s = e.source,
|
|
1155
1168
|
{ value: r } = t
|
|
1156
1169
|
s.value = r
|
|
1157
1170
|
},
|
|
1158
|
-
|
|
1159
|
-
[
|
|
1160
|
-
[
|
|
1161
|
-
[
|
|
1162
|
-
[
|
|
1163
|
-
[
|
|
1164
|
-
[
|
|
1165
|
-
[
|
|
1166
|
-
[
|
|
1167
|
-
[
|
|
1168
|
-
[
|
|
1169
|
-
[
|
|
1171
|
+
Le = {
|
|
1172
|
+
[a.changeText]: je,
|
|
1173
|
+
[a.removeNode]: Oe,
|
|
1174
|
+
[a.insertNode]: Me,
|
|
1175
|
+
[a.replaceNode]: ke,
|
|
1176
|
+
[a.removeAttribute]: $e,
|
|
1177
|
+
[a.addAttribute]: lt,
|
|
1178
|
+
[a.updateAttribute]: Be,
|
|
1179
|
+
[a.removeEvent]: De,
|
|
1180
|
+
[a.addEvent]: Pe,
|
|
1181
|
+
[a.updateEvent]: Fe,
|
|
1182
|
+
[a.changeValue]: Ve,
|
|
1170
1183
|
},
|
|
1171
|
-
|
|
1184
|
+
ze = (e, t, s) => {
|
|
1172
1185
|
const r = [...t]
|
|
1173
1186
|
return (
|
|
1174
1187
|
e.forEach((n) => {
|
|
1175
|
-
|
|
1188
|
+
Ke(n, r, s)
|
|
1176
1189
|
}),
|
|
1177
1190
|
r
|
|
1178
1191
|
)
|
|
1179
1192
|
},
|
|
1180
|
-
|
|
1181
|
-
const r =
|
|
1193
|
+
Ke = (e, t, s) => {
|
|
1194
|
+
const r = Ie[e.type]
|
|
1182
1195
|
r && r(e, t, s)
|
|
1183
1196
|
},
|
|
1184
|
-
|
|
1197
|
+
Re = (e, t) => {
|
|
1185
1198
|
const { source: s } = e,
|
|
1186
1199
|
r = t.indexOf(s)
|
|
1187
1200
|
r >= 0 && t.splice(r, 1)
|
|
1188
1201
|
},
|
|
1189
|
-
|
|
1202
|
+
Ue = (e, t, s) => {
|
|
1190
1203
|
const { target: r } = e,
|
|
1191
1204
|
n = e.data,
|
|
1192
|
-
{ index: i, parent:
|
|
1193
|
-
s ===
|
|
1205
|
+
{ index: i, parent: o } = n
|
|
1206
|
+
s === o && t.splice(i, 0, r)
|
|
1194
1207
|
},
|
|
1195
|
-
|
|
1208
|
+
qe = (e, t) => {
|
|
1196
1209
|
const { target: s, source: r } = e,
|
|
1197
1210
|
n = t.indexOf(r)
|
|
1198
1211
|
n >= 0 && (t[n] = s)
|
|
1199
1212
|
},
|
|
1200
|
-
|
|
1201
|
-
class
|
|
1213
|
+
Ie = { [a.removeNode]: Re, [a.insertNode]: Ue, [a.replaceNode]: qe }
|
|
1214
|
+
class Je {
|
|
1202
1215
|
constructor({
|
|
1203
1216
|
Template: t,
|
|
1204
1217
|
subscriptions: s,
|
|
@@ -1235,8 +1248,8 @@
|
|
|
1235
1248
|
this.parentElement = r
|
|
1236
1249
|
}
|
|
1237
1250
|
const t = this.generateDom(this.renderKit),
|
|
1238
|
-
s =
|
|
1239
|
-
this.dom =
|
|
1251
|
+
s = _e(this.dom, t, this.parentElement)
|
|
1252
|
+
this.dom = ze(s, this.dom, this.parentElement)
|
|
1240
1253
|
}
|
|
1241
1254
|
subscribeForRerender() {
|
|
1242
1255
|
const { subscribe: t } = this.renderKit
|
|
@@ -1245,22 +1258,22 @@
|
|
|
1245
1258
|
})
|
|
1246
1259
|
}
|
|
1247
1260
|
eventName(t) {
|
|
1248
|
-
return `${
|
|
1261
|
+
return `${T}:${t}`
|
|
1249
1262
|
}
|
|
1250
1263
|
}
|
|
1251
|
-
const
|
|
1252
|
-
|
|
1264
|
+
const He = (e) => e,
|
|
1265
|
+
ht = ({ Template: e, viewModel: t, subscriptions: s }) => (
|
|
1253
1266
|
(s = s || []),
|
|
1254
|
-
(t = t ||
|
|
1267
|
+
(t = t || He),
|
|
1255
1268
|
(r) =>
|
|
1256
|
-
new
|
|
1269
|
+
new Je({ Template: e, viewModel: t, subscriptions: s, attributes: r })
|
|
1257
1270
|
),
|
|
1258
1271
|
Ge =
|
|
1259
1272
|
(e) =>
|
|
1260
1273
|
({ path: t }) =>
|
|
1261
1274
|
t === e,
|
|
1262
|
-
|
|
1263
|
-
|
|
1275
|
+
We = () => !0,
|
|
1276
|
+
dt =
|
|
1264
1277
|
(e) =>
|
|
1265
1278
|
({ route: t }) => {
|
|
1266
1279
|
const s = e.find((r) => r.match(t))
|
|
@@ -1268,51 +1281,51 @@
|
|
|
1268
1281
|
},
|
|
1269
1282
|
Ce = Object.freeze(
|
|
1270
1283
|
Object.defineProperty(
|
|
1271
|
-
{ __proto__: null, buildRouter:
|
|
1284
|
+
{ __proto__: null, buildRouter: dt, catchAll: We, exactPathMatch: Ge },
|
|
1272
1285
|
Symbol.toStringTag,
|
|
1273
1286
|
{ value: 'Module' },
|
|
1274
1287
|
),
|
|
1275
1288
|
),
|
|
1276
1289
|
Qe = () => ({ render: (e, t) => [] }),
|
|
1277
|
-
|
|
1278
|
-
const t =
|
|
1279
|
-
return
|
|
1290
|
+
Xe = (e) => {
|
|
1291
|
+
const t = dt(e)
|
|
1292
|
+
return ht({
|
|
1280
1293
|
Template: ({ route: r }) => (t({ route: r }) || Qe)(),
|
|
1281
1294
|
subscriptions: ['route'],
|
|
1282
1295
|
})
|
|
1283
1296
|
},
|
|
1284
|
-
|
|
1297
|
+
Ye = Object.freeze(
|
|
1285
1298
|
Object.defineProperty(
|
|
1286
1299
|
{
|
|
1287
1300
|
__proto__: null,
|
|
1288
|
-
createRouteState:
|
|
1289
|
-
events:
|
|
1290
|
-
extractQueryParams:
|
|
1291
|
-
findHref:
|
|
1301
|
+
createRouteState: R,
|
|
1302
|
+
events: Jt,
|
|
1303
|
+
extractQueryParams: I,
|
|
1304
|
+
findHref: U,
|
|
1292
1305
|
navigate: S,
|
|
1293
|
-
onLinkClick:
|
|
1294
|
-
onLocationChange:
|
|
1295
|
-
start:
|
|
1306
|
+
onLinkClick: q,
|
|
1307
|
+
onLocationChange: J,
|
|
1308
|
+
start: Ht,
|
|
1296
1309
|
},
|
|
1297
1310
|
Symbol.toStringTag,
|
|
1298
1311
|
{ value: 'Module' },
|
|
1299
1312
|
),
|
|
1300
1313
|
)
|
|
1301
|
-
;(l.ArrayModifiers =
|
|
1302
|
-
(l.BooleanStore =
|
|
1303
|
-
(l.Equality =
|
|
1304
|
-
(l.Is =
|
|
1305
|
-
(l.JaxsTypes =
|
|
1306
|
-
(l.ListStore =
|
|
1307
|
-
(l.RecordStore =
|
|
1314
|
+
;(l.ArrayModifiers = pt),
|
|
1315
|
+
(l.BooleanStore = mt),
|
|
1316
|
+
(l.Equality = te),
|
|
1317
|
+
(l.Is = wt),
|
|
1318
|
+
(l.JaxsTypes = ne),
|
|
1319
|
+
(l.ListStore = vt),
|
|
1320
|
+
(l.RecordStore = gt),
|
|
1308
1321
|
(l.appBuilding = Gt),
|
|
1309
|
-
(l.bind =
|
|
1310
|
-
(l.createApp =
|
|
1311
|
-
(l.jsx =
|
|
1312
|
-
(l.messageBus =
|
|
1313
|
-
(l.navigation =
|
|
1314
|
-
(l.routedView =
|
|
1322
|
+
(l.bind = ht),
|
|
1323
|
+
(l.createApp = re),
|
|
1324
|
+
(l.jsx = V),
|
|
1325
|
+
(l.messageBus = Xt),
|
|
1326
|
+
(l.navigation = Ye),
|
|
1327
|
+
(l.routedView = Xe),
|
|
1315
1328
|
(l.routing = Ce),
|
|
1316
|
-
(l.state =
|
|
1329
|
+
(l.state = ee),
|
|
1317
1330
|
Object.defineProperty(l, Symbol.toStringTag, { value: 'Module' })
|
|
1318
1331
|
})
|