jaxs 0.7.2 → 0.8.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/dist/jaxs.d.ts +697 -991
- package/dist/jaxs.js +332 -328
- package/dist/jaxs.umd.cjs +321 -313
- package/package.json +6 -4
package/dist/jaxs.js
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
1
|
+
const tt = (e) => typeof e == 'string',
|
|
2
|
+
f = (e) => Array.isArray(e),
|
|
3
|
+
v = (e) => e !== null && !f(e) && typeof e == 'object',
|
|
4
|
+
et = (e, t) => t.createElement(e),
|
|
5
|
+
st = (e, t) => {
|
|
3
6
|
for (const s in t) {
|
|
4
7
|
if (s === '__self') continue
|
|
5
8
|
const r = t[s].toString()
|
|
6
9
|
if (s === 'value') {
|
|
7
10
|
const n = e
|
|
8
11
|
n.value !== r && (n.value = r)
|
|
9
|
-
} else
|
|
12
|
+
} else
|
|
13
|
+
tt(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
|
|
10
14
|
}
|
|
11
15
|
},
|
|
12
|
-
|
|
16
|
+
rt = (e, t, s) => {
|
|
13
17
|
const r = {}
|
|
14
18
|
for (const n in t) {
|
|
15
19
|
const i = t[n],
|
|
16
|
-
a = (
|
|
20
|
+
a = (c) => s(i, c)
|
|
17
21
|
e.addEventListener(n, a),
|
|
18
22
|
(r[n] = {
|
|
19
23
|
domEvent: n,
|
|
@@ -23,12 +27,12 @@ const Z = (e, t) => t.createElement(e),
|
|
|
23
27
|
}
|
|
24
28
|
e.eventMaps = r
|
|
25
29
|
},
|
|
26
|
-
|
|
27
|
-
const n =
|
|
28
|
-
return
|
|
30
|
+
nt = (e, t, s, r) => {
|
|
31
|
+
const n = et(e, r.document)
|
|
32
|
+
return st(n, t), rt(n, s, r.publish), n
|
|
29
33
|
},
|
|
30
34
|
y = 'http://www.w3.org/2000/svg',
|
|
31
|
-
|
|
35
|
+
it = {
|
|
32
36
|
animate: !0,
|
|
33
37
|
animateMotion: !0,
|
|
34
38
|
animateTransform: !0,
|
|
@@ -92,8 +96,8 @@ const Z = (e, t) => t.createElement(e),
|
|
|
92
96
|
use: !0,
|
|
93
97
|
view: !0,
|
|
94
98
|
},
|
|
95
|
-
|
|
96
|
-
|
|
99
|
+
ot = (e, t) => !!(it[e] || (e === 'a' && t === y)),
|
|
100
|
+
ut = (e, t, s) => {
|
|
97
101
|
const r = s.createElementNS(y, e)
|
|
98
102
|
for (const n in t)
|
|
99
103
|
n === '__self' ||
|
|
@@ -101,24 +105,24 @@ const Z = (e, t) => t.createElement(e),
|
|
|
101
105
|
r.setAttributeNS(null, n, t[n].toString())
|
|
102
106
|
return r
|
|
103
107
|
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
class
|
|
108
|
+
at = (e) => e.namespaceURI === y,
|
|
109
|
+
ct = (e, t) => t.createTextNode(e)
|
|
110
|
+
class lt {
|
|
107
111
|
constructor(t) {
|
|
108
112
|
this.value = t.toString()
|
|
109
113
|
}
|
|
110
114
|
render(t) {
|
|
111
|
-
const s =
|
|
115
|
+
const s = ct(this.value, t.document)
|
|
112
116
|
return (s.__jsx = 'TextNode'), [s]
|
|
113
117
|
}
|
|
114
118
|
}
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
const ht = (e) => typeof e == 'string' || typeof e == 'number',
|
|
120
|
+
dt = (e) => new lt(e),
|
|
121
|
+
pt = (e) => (ht(e) ? dt(e) : e),
|
|
122
|
+
T = (e) => mt(e).map(pt).flat(),
|
|
123
|
+
mt = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
|
|
124
|
+
j = (e, t = {}) => T(e || t.children || []),
|
|
125
|
+
ft = (e, t = '') => {
|
|
122
126
|
const s = {},
|
|
123
127
|
r = {}
|
|
124
128
|
for (const n in e) {
|
|
@@ -128,7 +132,7 @@ const ct = (e) => typeof e == 'string' || typeof e == 'number',
|
|
|
128
132
|
r[a] = i ? i.toString() : ''
|
|
129
133
|
} else {
|
|
130
134
|
if (i === !1) continue
|
|
131
|
-
n === '__source' ? (s.__source = e.__source) : (s[n] =
|
|
135
|
+
n === '__source' ? (s.__source = e.__source) : (s[n] = bt(n, i, t))
|
|
132
136
|
}
|
|
133
137
|
}
|
|
134
138
|
return {
|
|
@@ -136,22 +140,22 @@ const ct = (e) => typeof e == 'string' || typeof e == 'number',
|
|
|
136
140
|
events: r,
|
|
137
141
|
}
|
|
138
142
|
},
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
bt = (e, t, s = '') => (t == null ? s : t.toString()),
|
|
144
|
+
vt = (e, t) => {
|
|
141
145
|
const s = e || {},
|
|
142
|
-
r =
|
|
146
|
+
r = j(t, s)
|
|
143
147
|
return (s.children = s.children || r), s
|
|
144
148
|
},
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
O = (e, t, s, r = []) => e.reduce(gt(t, s), r).flat(),
|
|
150
|
+
gt = (e, t) => (s, r) =>
|
|
147
151
|
r
|
|
148
152
|
? Array.isArray(r)
|
|
149
|
-
?
|
|
153
|
+
? O(r, e, t, s)
|
|
150
154
|
: (r.render(e, t).forEach((n) => s.push(n)), s)
|
|
151
155
|
: s
|
|
152
|
-
class
|
|
156
|
+
class M {
|
|
153
157
|
constructor(t) {
|
|
154
|
-
this.collection =
|
|
158
|
+
this.collection = T(t)
|
|
155
159
|
}
|
|
156
160
|
render(t, s) {
|
|
157
161
|
this.parentElement = s
|
|
@@ -159,7 +163,7 @@ class O {
|
|
|
159
163
|
return this.attachToParent(r), r
|
|
160
164
|
}
|
|
161
165
|
generateDom(t) {
|
|
162
|
-
return
|
|
166
|
+
return O(this.collection, t, this.parentElement)
|
|
163
167
|
}
|
|
164
168
|
attachToParent(t) {
|
|
165
169
|
if (this.parentElement === void 0) return
|
|
@@ -167,7 +171,7 @@ class O {
|
|
|
167
171
|
t.forEach((r) => s.appendChild(r))
|
|
168
172
|
}
|
|
169
173
|
}
|
|
170
|
-
class
|
|
174
|
+
class yt {
|
|
171
175
|
constructor(t, s) {
|
|
172
176
|
;(this.type = t), (this.attributes = s)
|
|
173
177
|
}
|
|
@@ -193,14 +197,14 @@ class gt {
|
|
|
193
197
|
return `${this.type}${t}${s}${r}`
|
|
194
198
|
}
|
|
195
199
|
}
|
|
196
|
-
class
|
|
200
|
+
class Et {
|
|
197
201
|
constructor(t, s, r = []) {
|
|
198
202
|
this.type = t
|
|
199
|
-
const { events: n, attributes: i } =
|
|
203
|
+
const { events: n, attributes: i } = ft(s)
|
|
200
204
|
;(this.events = n),
|
|
201
205
|
(this.attributes = i),
|
|
202
|
-
(this.isSvg =
|
|
203
|
-
(this.children = new
|
|
206
|
+
(this.isSvg = ot(this.type, this.attributes.xmlns)),
|
|
207
|
+
(this.children = new M(r))
|
|
204
208
|
}
|
|
205
209
|
render(t) {
|
|
206
210
|
const s = this.generateDom(t)
|
|
@@ -210,24 +214,24 @@ class yt {
|
|
|
210
214
|
return this.isSvg ? this.generateSvgDom(t) : this.generateHtmlDom(t)
|
|
211
215
|
}
|
|
212
216
|
generateHtmlDom(t) {
|
|
213
|
-
const s =
|
|
217
|
+
const s = nt(this.type, this.attributes, this.events, t)
|
|
214
218
|
return (s.__jsx = this.jsxKey()), s
|
|
215
219
|
}
|
|
216
220
|
generateSvgDom(t) {
|
|
217
|
-
const s =
|
|
221
|
+
const s = ut(this.type, this.attributes, t.document)
|
|
218
222
|
return (s.__jsx = this.jsxKey()), s
|
|
219
223
|
}
|
|
220
224
|
jsxKey() {
|
|
221
|
-
return new
|
|
225
|
+
return new yt(this.type, this.attributes).generate()
|
|
222
226
|
}
|
|
223
227
|
}
|
|
224
|
-
const
|
|
225
|
-
typeof e == 'string' ? new
|
|
226
|
-
|
|
227
|
-
const s =
|
|
228
|
-
return new
|
|
228
|
+
const xt = (e, t, ...s) =>
|
|
229
|
+
typeof e == 'string' ? new Et(e, t, s) : e(vt(t, s))
|
|
230
|
+
xt.fragment = (e, t) => {
|
|
231
|
+
const s = j(t, e)
|
|
232
|
+
return new M(s)
|
|
229
233
|
}
|
|
230
|
-
class
|
|
234
|
+
class At {
|
|
231
235
|
constructor(t, s, r) {
|
|
232
236
|
;(this.template = t),
|
|
233
237
|
(this.selector = s),
|
|
@@ -252,48 +256,49 @@ class xt {
|
|
|
252
256
|
return this.renderKit.document.querySelector(this.selector)
|
|
253
257
|
}
|
|
254
258
|
}
|
|
255
|
-
const
|
|
256
|
-
const r = new
|
|
259
|
+
const wt = (e, t, s) => {
|
|
260
|
+
const r = new At(e, t, s)
|
|
257
261
|
return r.renderAndAttach(s), r
|
|
258
262
|
},
|
|
259
|
-
|
|
260
|
-
|
|
263
|
+
k = 'go-to-href',
|
|
264
|
+
$ = 'go-to',
|
|
261
265
|
m = 'navigation:location-change',
|
|
262
|
-
|
|
263
|
-
|
|
266
|
+
D = 'navigation:route-change',
|
|
267
|
+
Nt = /* @__PURE__ */ Object.freeze(
|
|
264
268
|
/* @__PURE__ */ Object.defineProperty(
|
|
265
269
|
{
|
|
266
270
|
__proto__: null,
|
|
267
|
-
linkNavigationEvent:
|
|
271
|
+
linkNavigationEvent: k,
|
|
268
272
|
locationChangeEvent: m,
|
|
269
|
-
navigationEvent:
|
|
270
|
-
routeChangeEvent:
|
|
273
|
+
navigationEvent: $,
|
|
274
|
+
routeChangeEvent: D,
|
|
271
275
|
},
|
|
272
276
|
Symbol.toStringTag,
|
|
273
277
|
{ value: 'Module' },
|
|
274
278
|
),
|
|
275
279
|
),
|
|
276
|
-
|
|
280
|
+
P = (e) => {
|
|
277
281
|
e.create('route', {
|
|
278
282
|
host: '',
|
|
279
283
|
path: '',
|
|
280
284
|
query: {},
|
|
281
285
|
})
|
|
282
286
|
},
|
|
283
|
-
|
|
287
|
+
V = (e) => {
|
|
284
288
|
const t = e.closest('[href]')
|
|
285
289
|
return (t && t.getAttribute('href')) || ''
|
|
286
290
|
},
|
|
287
|
-
E = (e,
|
|
291
|
+
E = ({ payload: e, publish: t, window: s }) => {
|
|
288
292
|
s.history.pushState(null, '', e), t(m, null)
|
|
289
293
|
},
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
294
|
+
F = (e) => {
|
|
295
|
+
const t = e.payload
|
|
296
|
+
if (!t || !t.target) return
|
|
297
|
+
t.preventDefault()
|
|
298
|
+
const s = V(t.target)
|
|
299
|
+
E({ ...e, payload: s })
|
|
295
300
|
},
|
|
296
|
-
|
|
301
|
+
L = (e) =>
|
|
297
302
|
e
|
|
298
303
|
.replace(/^\?/, '')
|
|
299
304
|
.split('&')
|
|
@@ -302,49 +307,49 @@ const At = (e, t, s) => {
|
|
|
302
307
|
const r = s.split('=')
|
|
303
308
|
return (t[r[0]] = r[1]), t
|
|
304
309
|
}, {}),
|
|
305
|
-
|
|
306
|
-
const { state:
|
|
307
|
-
{ host:
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
host:
|
|
312
|
-
path:
|
|
313
|
-
query:
|
|
310
|
+
z = (e) => {
|
|
311
|
+
const { state: t, publish: s, window: r } = e,
|
|
312
|
+
{ host: n, pathname: i, search: a } = r.location,
|
|
313
|
+
c = i,
|
|
314
|
+
u = L(a),
|
|
315
|
+
h = {
|
|
316
|
+
host: n,
|
|
317
|
+
path: c,
|
|
318
|
+
query: u,
|
|
314
319
|
}
|
|
315
|
-
|
|
320
|
+
t.store('route').update(h), s(D, h)
|
|
316
321
|
},
|
|
317
|
-
|
|
322
|
+
B = (e) => {
|
|
318
323
|
const { subscribe: t } = e
|
|
319
|
-
t(
|
|
320
|
-
t(
|
|
321
|
-
E(s
|
|
324
|
+
t(k, F),
|
|
325
|
+
t($, (s) => {
|
|
326
|
+
E(s)
|
|
322
327
|
})
|
|
323
328
|
},
|
|
324
|
-
|
|
329
|
+
K = (e) => {
|
|
325
330
|
const { publish: t, subscribe: s, state: r, window: n } = e
|
|
326
|
-
|
|
331
|
+
P(r), n.addEventListener('popstate', () => t(m, null)), s(m, z)
|
|
327
332
|
},
|
|
328
|
-
|
|
333
|
+
R = (e) => {
|
|
329
334
|
setTimeout(() => e.publish(m, null), 0)
|
|
330
335
|
},
|
|
331
|
-
|
|
332
|
-
|
|
336
|
+
U = (e) => {
|
|
337
|
+
K(e), B(e), R(e)
|
|
333
338
|
},
|
|
334
|
-
|
|
339
|
+
_t = /* @__PURE__ */ Object.freeze(
|
|
335
340
|
/* @__PURE__ */ Object.defineProperty(
|
|
336
341
|
{
|
|
337
342
|
__proto__: null,
|
|
338
|
-
publishLocation:
|
|
339
|
-
startNavigation:
|
|
340
|
-
subscribeToHistoryChange:
|
|
341
|
-
subscribeToNavigation:
|
|
343
|
+
publishLocation: R,
|
|
344
|
+
startNavigation: U,
|
|
345
|
+
subscribeToHistoryChange: K,
|
|
346
|
+
subscribeToNavigation: B,
|
|
342
347
|
},
|
|
343
348
|
Symbol.toStringTag,
|
|
344
349
|
{ value: 'Module' },
|
|
345
350
|
),
|
|
346
351
|
)
|
|
347
|
-
class
|
|
352
|
+
class C {
|
|
348
353
|
constructor({
|
|
349
354
|
window: t,
|
|
350
355
|
document: s,
|
|
@@ -352,7 +357,7 @@ class U {
|
|
|
352
357
|
subscribe: n,
|
|
353
358
|
bus: i,
|
|
354
359
|
state: a,
|
|
355
|
-
renderKit:
|
|
360
|
+
renderKit: c,
|
|
356
361
|
}) {
|
|
357
362
|
;(this.window = t),
|
|
358
363
|
(this.document = s),
|
|
@@ -360,28 +365,28 @@ class U {
|
|
|
360
365
|
(this.subscribe = n),
|
|
361
366
|
(this.bus = i),
|
|
362
367
|
(this.state = a),
|
|
363
|
-
(this.renderKit =
|
|
368
|
+
(this.renderKit = c),
|
|
364
369
|
(this.roots = [])
|
|
365
370
|
}
|
|
366
371
|
render(t, s) {
|
|
367
|
-
const r =
|
|
372
|
+
const r = wt(t, s, this.renderKit)
|
|
368
373
|
return this.roots.push(r), r
|
|
369
374
|
}
|
|
370
375
|
startNavigation() {
|
|
371
|
-
|
|
376
|
+
U(this)
|
|
372
377
|
}
|
|
373
378
|
}
|
|
374
|
-
const
|
|
379
|
+
const De = /* @__PURE__ */ Object.freeze(
|
|
375
380
|
/* @__PURE__ */ Object.defineProperty(
|
|
376
381
|
{
|
|
377
382
|
__proto__: null,
|
|
378
|
-
App:
|
|
383
|
+
App: C,
|
|
379
384
|
},
|
|
380
385
|
Symbol.toStringTag,
|
|
381
386
|
{ value: 'Module' },
|
|
382
387
|
),
|
|
383
388
|
)
|
|
384
|
-
class
|
|
389
|
+
class I {
|
|
385
390
|
constructor() {
|
|
386
391
|
this.lookup = {}
|
|
387
392
|
}
|
|
@@ -408,7 +413,7 @@ class C {
|
|
|
408
413
|
this.lookup[t] || (this.lookup[t] = [])
|
|
409
414
|
}
|
|
410
415
|
}
|
|
411
|
-
class
|
|
416
|
+
class q {
|
|
412
417
|
constructor() {
|
|
413
418
|
this.lookup = []
|
|
414
419
|
}
|
|
@@ -427,7 +432,7 @@ class I {
|
|
|
427
432
|
return this.lookup.filter((s) => s.matcher.test(t))
|
|
428
433
|
}
|
|
429
434
|
}
|
|
430
|
-
class
|
|
435
|
+
class St {
|
|
431
436
|
constructor({ publish: t, event: s, payload: r, timer: n }) {
|
|
432
437
|
;(this.setNewTimeout = () => {
|
|
433
438
|
this.stopped ||
|
|
@@ -464,7 +469,7 @@ class _t {
|
|
|
464
469
|
((this.callCount += 1), this.publish(this.event, this.payload))
|
|
465
470
|
}
|
|
466
471
|
}
|
|
467
|
-
const
|
|
472
|
+
const Tt = (e) => {
|
|
468
473
|
const { offset: t, period: s } = e,
|
|
469
474
|
r = ({ callCount: n }) => (t && n == 0 ? t : s)
|
|
470
475
|
return {
|
|
@@ -474,16 +479,16 @@ const St = (e) => {
|
|
|
474
479
|
timer: r,
|
|
475
480
|
}
|
|
476
481
|
},
|
|
477
|
-
|
|
482
|
+
jt = (e) => {
|
|
478
483
|
let t
|
|
479
|
-
'timer' in e ? (t = e) : (t =
|
|
480
|
-
const s = new
|
|
484
|
+
'timer' in e ? (t = e) : (t = Tt(e))
|
|
485
|
+
const s = new St(t)
|
|
481
486
|
return s.start(), s.stop
|
|
482
487
|
}
|
|
483
|
-
class
|
|
488
|
+
class J {
|
|
484
489
|
constructor() {
|
|
485
|
-
;(this.exactSubscriptions = new
|
|
486
|
-
(this.fuzzySubscriptions = new
|
|
490
|
+
;(this.exactSubscriptions = new I()),
|
|
491
|
+
(this.fuzzySubscriptions = new q()),
|
|
487
492
|
(this.currentIndex = 0)
|
|
488
493
|
}
|
|
489
494
|
subscribe(t, s) {
|
|
@@ -503,62 +508,61 @@ class q {
|
|
|
503
508
|
]
|
|
504
509
|
.sort((n, i) => n.index - i.index)
|
|
505
510
|
.forEach((n) => {
|
|
506
|
-
n.listener(
|
|
511
|
+
n.listener(this.listenerOptions(t, s))
|
|
507
512
|
})
|
|
508
513
|
}
|
|
509
514
|
addListenerOptions(t) {
|
|
510
515
|
this.options = t
|
|
511
516
|
}
|
|
512
|
-
listenerOptions(t) {
|
|
517
|
+
listenerOptions(t, s) {
|
|
513
518
|
return {
|
|
514
519
|
eventName: t,
|
|
515
520
|
...this.options,
|
|
516
521
|
publish: this.publish.bind(this),
|
|
522
|
+
payload: s,
|
|
517
523
|
}
|
|
518
524
|
}
|
|
519
525
|
}
|
|
520
|
-
const
|
|
521
|
-
const e = new
|
|
526
|
+
const G = () => {
|
|
527
|
+
const e = new J()
|
|
522
528
|
return {
|
|
523
529
|
bus: e,
|
|
524
530
|
publish: (r, n) => e.publish(r, n),
|
|
525
531
|
subscribe: (r, n) => e.subscribe(r, n),
|
|
526
532
|
}
|
|
527
533
|
},
|
|
528
|
-
|
|
534
|
+
Pe = /* @__PURE__ */ Object.freeze(
|
|
529
535
|
/* @__PURE__ */ Object.defineProperty(
|
|
530
536
|
{
|
|
531
537
|
__proto__: null,
|
|
532
|
-
ExactSubscriptions:
|
|
533
|
-
FuzzySubscriptions:
|
|
534
|
-
JaxsBus:
|
|
535
|
-
createBus:
|
|
536
|
-
publishPeriodically:
|
|
538
|
+
ExactSubscriptions: I,
|
|
539
|
+
FuzzySubscriptions: q,
|
|
540
|
+
JaxsBus: J,
|
|
541
|
+
createBus: G,
|
|
542
|
+
publishPeriodically: jt,
|
|
537
543
|
},
|
|
538
544
|
Symbol.toStringTag,
|
|
539
545
|
{ value: 'Module' },
|
|
540
546
|
),
|
|
541
547
|
),
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
Mt = (e, t) =>
|
|
547
|
-
!(v(e) && v(t)) || !Ot(e, t)
|
|
548
|
+
Ot = (e, t) => e === t,
|
|
549
|
+
Mt = (e, t) => Object.keys(e).length === Object.keys(t).length,
|
|
550
|
+
kt = (e, t) =>
|
|
551
|
+
!(v(e) && v(t)) || !Mt(e, t)
|
|
548
552
|
? !1
|
|
549
553
|
: Object.keys(e).every((s) => {
|
|
550
554
|
const r = e[s],
|
|
551
555
|
n = t[s]
|
|
552
556
|
return x(r, n)
|
|
553
557
|
}),
|
|
554
|
-
|
|
558
|
+
$t = (e, t) =>
|
|
555
559
|
!(f(e) && f(t)) || e.length !== t.length
|
|
556
560
|
? !1
|
|
557
561
|
: e.every((s, r) => {
|
|
558
562
|
const n = t[r]
|
|
559
563
|
return x(s, n)
|
|
560
564
|
}),
|
|
561
|
-
x = (e, t) => (v(e) ?
|
|
565
|
+
x = (e, t) => (v(e) ? kt(e, t) : f(e) ? $t(e, t) : Ot(e, t))
|
|
562
566
|
class g {
|
|
563
567
|
constructor(t) {
|
|
564
568
|
;(this.name = t.name),
|
|
@@ -602,7 +606,7 @@ class A {
|
|
|
602
606
|
return this.store.value
|
|
603
607
|
}
|
|
604
608
|
}
|
|
605
|
-
class
|
|
609
|
+
class Dt extends A {
|
|
606
610
|
updateAttribute(t, s) {
|
|
607
611
|
const r = { ...this.value }
|
|
608
612
|
;(r[t] = s), this.update(r)
|
|
@@ -622,8 +626,8 @@ class $t extends A {
|
|
|
622
626
|
;(s[t] = r), this.update(s)
|
|
623
627
|
}
|
|
624
628
|
}
|
|
625
|
-
const
|
|
626
|
-
class
|
|
629
|
+
const Pt = (e) => new Dt(e)
|
|
630
|
+
class Vt extends A {
|
|
627
631
|
push(t) {
|
|
628
632
|
const s = [...this.value, t]
|
|
629
633
|
this.update(s)
|
|
@@ -664,8 +668,8 @@ class Pt extends A {
|
|
|
664
668
|
this.update(s)
|
|
665
669
|
}
|
|
666
670
|
}
|
|
667
|
-
const
|
|
668
|
-
class
|
|
671
|
+
const Ft = (e) => new Vt(e)
|
|
672
|
+
class Lt extends A {
|
|
669
673
|
toggle() {
|
|
670
674
|
const t = !this.value
|
|
671
675
|
this.update(t)
|
|
@@ -677,14 +681,14 @@ class Ft extends A {
|
|
|
677
681
|
this.update(!1)
|
|
678
682
|
}
|
|
679
683
|
}
|
|
680
|
-
const
|
|
681
|
-
|
|
682
|
-
object:
|
|
683
|
-
list:
|
|
684
|
-
boolean:
|
|
684
|
+
const zt = (e) => new Lt(e),
|
|
685
|
+
Bt = {
|
|
686
|
+
object: Pt,
|
|
687
|
+
list: Ft,
|
|
688
|
+
boolean: zt,
|
|
685
689
|
},
|
|
686
690
|
w = 'state'
|
|
687
|
-
class
|
|
691
|
+
class H {
|
|
688
692
|
constructor(t) {
|
|
689
693
|
;(this.publisher = t),
|
|
690
694
|
(this.stores = {}),
|
|
@@ -744,22 +748,22 @@ class G {
|
|
|
744
748
|
return `${this.eventNamePrefix}:${t}`
|
|
745
749
|
}
|
|
746
750
|
}
|
|
747
|
-
const
|
|
748
|
-
|
|
751
|
+
const Q = (e) => new H(e),
|
|
752
|
+
Ve = /* @__PURE__ */ Object.freeze(
|
|
749
753
|
/* @__PURE__ */ Object.defineProperty(
|
|
750
754
|
{
|
|
751
755
|
__proto__: null,
|
|
752
|
-
State:
|
|
756
|
+
State: H,
|
|
753
757
|
Store: g,
|
|
754
|
-
createState:
|
|
758
|
+
createState: Q,
|
|
755
759
|
eventName: w,
|
|
756
|
-
updaters:
|
|
760
|
+
updaters: Bt,
|
|
757
761
|
},
|
|
758
762
|
Symbol.toStringTag,
|
|
759
763
|
{ value: 'Module' },
|
|
760
764
|
),
|
|
761
765
|
)
|
|
762
|
-
class
|
|
766
|
+
class Kt {
|
|
763
767
|
constructor(t) {
|
|
764
768
|
this.setupDomEnvironment(t)
|
|
765
769
|
}
|
|
@@ -769,7 +773,7 @@ class Bt {
|
|
|
769
773
|
this.setupState(),
|
|
770
774
|
this.addBusOptions(),
|
|
771
775
|
this.setRenderKit(),
|
|
772
|
-
new
|
|
776
|
+
new C({
|
|
773
777
|
window: this.window,
|
|
774
778
|
document: this.document,
|
|
775
779
|
publish: this.publish,
|
|
@@ -788,11 +792,11 @@ class Bt {
|
|
|
788
792
|
: ((this.window = window), (this.document = document))
|
|
789
793
|
}
|
|
790
794
|
setupBus() {
|
|
791
|
-
const { publish: t, subscribe: s, bus: r } =
|
|
795
|
+
const { publish: t, subscribe: s, bus: r } = G()
|
|
792
796
|
;(this.publish = t), (this.subscribe = s), (this.bus = r)
|
|
793
797
|
}
|
|
794
798
|
setupState() {
|
|
795
|
-
this.state =
|
|
799
|
+
this.state = Q(this.publish)
|
|
796
800
|
}
|
|
797
801
|
addBusOptions() {
|
|
798
802
|
this.bus.addListenerOptions({
|
|
@@ -811,8 +815,8 @@ class Bt {
|
|
|
811
815
|
}
|
|
812
816
|
}
|
|
813
817
|
}
|
|
814
|
-
const
|
|
815
|
-
const s = new
|
|
818
|
+
const Fe = (e = {}) => {
|
|
819
|
+
const s = new Kt(e).setup()
|
|
816
820
|
return s.startNavigation(), s
|
|
817
821
|
}
|
|
818
822
|
var o = /* @__PURE__ */ ((e) => (
|
|
@@ -829,7 +833,7 @@ var o = /* @__PURE__ */ ((e) => (
|
|
|
829
833
|
(e[(e.changeText = 10)] = 'changeText'),
|
|
830
834
|
e
|
|
831
835
|
))(o || {})
|
|
832
|
-
const
|
|
836
|
+
const Le = /* @__PURE__ */ Object.freeze(
|
|
833
837
|
/* @__PURE__ */ Object.defineProperty(
|
|
834
838
|
{
|
|
835
839
|
__proto__: null,
|
|
@@ -839,49 +843,49 @@ const Fe = /* @__PURE__ */ Object.freeze(
|
|
|
839
843
|
{ value: 'Module' },
|
|
840
844
|
),
|
|
841
845
|
),
|
|
842
|
-
|
|
846
|
+
Rt = (e, t) => ({
|
|
843
847
|
source: e,
|
|
844
848
|
target: t,
|
|
845
849
|
type: o.changeText,
|
|
846
850
|
data: {},
|
|
847
851
|
}),
|
|
848
|
-
|
|
852
|
+
Ut = (e, t) => ({
|
|
849
853
|
source: e,
|
|
850
854
|
target: t,
|
|
851
855
|
type: o.replaceNode,
|
|
852
856
|
data: {},
|
|
853
857
|
}),
|
|
854
|
-
|
|
858
|
+
Ct = (e, t, s) => ({
|
|
855
859
|
source: e,
|
|
856
860
|
target: t,
|
|
857
861
|
data: s,
|
|
858
862
|
type: o.removeAttribute,
|
|
859
863
|
}),
|
|
860
|
-
|
|
864
|
+
It = (e, t, s) => ({
|
|
861
865
|
source: e,
|
|
862
866
|
target: t,
|
|
863
867
|
data: s,
|
|
864
868
|
type: o.addAttribute,
|
|
865
869
|
}),
|
|
866
|
-
|
|
870
|
+
qt = (e, t, s) => ({
|
|
867
871
|
source: e,
|
|
868
872
|
target: t,
|
|
869
873
|
data: s,
|
|
870
874
|
type: o.updateAttribute,
|
|
871
875
|
}),
|
|
872
|
-
|
|
876
|
+
Jt = (e, t, s) => ({
|
|
873
877
|
source: e,
|
|
874
878
|
target: t,
|
|
875
879
|
data: s,
|
|
876
880
|
type: o.removeEvent,
|
|
877
881
|
}),
|
|
878
|
-
|
|
882
|
+
Gt = (e, t, s) => ({
|
|
879
883
|
source: e,
|
|
880
884
|
target: t,
|
|
881
885
|
data: s,
|
|
882
886
|
type: o.addEvent,
|
|
883
887
|
}),
|
|
884
|
-
|
|
888
|
+
Ht = (e, t, s) => ({
|
|
885
889
|
source: e,
|
|
886
890
|
target: t,
|
|
887
891
|
data: s,
|
|
@@ -901,15 +905,15 @@ const Fe = /* @__PURE__ */ Object.freeze(
|
|
|
901
905
|
type: o.insertNode,
|
|
902
906
|
data: t,
|
|
903
907
|
}),
|
|
904
|
-
|
|
908
|
+
Qt = (e, t, s) => ({
|
|
905
909
|
source: e,
|
|
906
910
|
target: t,
|
|
907
911
|
type: o.changeValue,
|
|
908
912
|
data: s,
|
|
909
913
|
}),
|
|
910
|
-
|
|
914
|
+
Wt = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
|
|
911
915
|
_ = { index: -1 }
|
|
912
|
-
class
|
|
916
|
+
class Xt {
|
|
913
917
|
constructor() {
|
|
914
918
|
this.map = {}
|
|
915
919
|
}
|
|
@@ -943,55 +947,55 @@ class Wt {
|
|
|
943
947
|
}
|
|
944
948
|
}
|
|
945
949
|
const S = (e) => {
|
|
946
|
-
const t = new
|
|
950
|
+
const t = new Xt()
|
|
947
951
|
return t.populate(e), t
|
|
948
952
|
},
|
|
949
|
-
|
|
953
|
+
W = (e, t, s = !1) => {
|
|
950
954
|
const r = [],
|
|
951
955
|
n = e.attributes,
|
|
952
956
|
i = n.length,
|
|
953
957
|
a = t.attributes,
|
|
954
|
-
|
|
955
|
-
let u,
|
|
958
|
+
c = a.length
|
|
959
|
+
let u, h, d
|
|
956
960
|
for (u = 0; u < i; u++) {
|
|
957
|
-
|
|
958
|
-
const
|
|
959
|
-
if (
|
|
960
|
-
for (
|
|
961
|
-
const p = a.item(
|
|
962
|
-
if (p &&
|
|
963
|
-
|
|
961
|
+
d = null
|
|
962
|
+
const l = n.item(u)
|
|
963
|
+
if (l) {
|
|
964
|
+
for (h = 0; h < c; h++) {
|
|
965
|
+
const p = a.item(h)
|
|
966
|
+
if (p && l.name == p.name) {
|
|
967
|
+
d = p
|
|
964
968
|
break
|
|
965
969
|
}
|
|
966
970
|
}
|
|
967
|
-
|
|
968
|
-
?
|
|
971
|
+
d
|
|
972
|
+
? l.value !== d.value &&
|
|
969
973
|
r.push(
|
|
970
|
-
|
|
971
|
-
name:
|
|
972
|
-
value:
|
|
974
|
+
qt(e, t, {
|
|
975
|
+
name: l.name,
|
|
976
|
+
value: d.value,
|
|
973
977
|
isSvg: s,
|
|
974
978
|
}),
|
|
975
979
|
)
|
|
976
|
-
: r.push(
|
|
980
|
+
: r.push(Ct(e, t, { name: l.name, isSvg: s }))
|
|
977
981
|
}
|
|
978
982
|
}
|
|
979
|
-
for (u = 0; u <
|
|
980
|
-
|
|
981
|
-
const
|
|
982
|
-
if (
|
|
983
|
-
for (
|
|
984
|
-
const p = n.item(
|
|
985
|
-
if (p && p.name ==
|
|
986
|
-
|
|
983
|
+
for (u = 0; u < c; u++) {
|
|
984
|
+
d = null
|
|
985
|
+
const l = a.item(u)
|
|
986
|
+
if (l) {
|
|
987
|
+
for (h = 0; h < i; h++) {
|
|
988
|
+
const p = n.item(h)
|
|
989
|
+
if (p && p.name == l.name) {
|
|
990
|
+
d = p
|
|
987
991
|
break
|
|
988
992
|
}
|
|
989
993
|
}
|
|
990
|
-
|
|
994
|
+
d ||
|
|
991
995
|
r.push(
|
|
992
|
-
|
|
993
|
-
name:
|
|
994
|
-
value:
|
|
996
|
+
It(e, t, {
|
|
997
|
+
name: l.name,
|
|
998
|
+
value: l.value,
|
|
995
999
|
isSvg: s,
|
|
996
1000
|
}),
|
|
997
1001
|
)
|
|
@@ -999,92 +1003,92 @@ const S = (e) => {
|
|
|
999
1003
|
}
|
|
1000
1004
|
return r
|
|
1001
1005
|
},
|
|
1002
|
-
|
|
1006
|
+
Yt = (e, t) => {
|
|
1003
1007
|
const s = [],
|
|
1004
1008
|
r = e.eventMaps,
|
|
1005
1009
|
n = t.eventMaps,
|
|
1006
1010
|
i = Object.keys(r),
|
|
1007
1011
|
a = Object.keys(n)
|
|
1008
1012
|
return (
|
|
1009
|
-
i.forEach((
|
|
1010
|
-
const u = r[
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
?
|
|
1013
|
+
i.forEach((c) => {
|
|
1014
|
+
const u = r[c],
|
|
1015
|
+
h = n[c]
|
|
1016
|
+
h
|
|
1017
|
+
? h.busEvent !== u.busEvent &&
|
|
1014
1018
|
s.push(
|
|
1015
|
-
|
|
1016
|
-
name:
|
|
1017
|
-
targetValue:
|
|
1019
|
+
Ht(e, t, {
|
|
1020
|
+
name: c,
|
|
1021
|
+
targetValue: h.listener,
|
|
1018
1022
|
sourceValue: u.listener,
|
|
1019
1023
|
}),
|
|
1020
1024
|
)
|
|
1021
1025
|
: s.push(
|
|
1022
|
-
|
|
1026
|
+
Jt(e, t, {
|
|
1023
1027
|
name: u.domEvent,
|
|
1024
1028
|
value: u.listener,
|
|
1025
1029
|
}),
|
|
1026
1030
|
)
|
|
1027
1031
|
}),
|
|
1028
|
-
a.forEach((
|
|
1029
|
-
const u = r[
|
|
1030
|
-
|
|
1032
|
+
a.forEach((c) => {
|
|
1033
|
+
const u = r[c],
|
|
1034
|
+
h = n[c]
|
|
1031
1035
|
u ||
|
|
1032
1036
|
s.push(
|
|
1033
|
-
|
|
1034
|
-
name:
|
|
1035
|
-
value:
|
|
1037
|
+
Gt(e, t, {
|
|
1038
|
+
name: h.domEvent,
|
|
1039
|
+
value: h.listener,
|
|
1036
1040
|
}),
|
|
1037
1041
|
)
|
|
1038
1042
|
}),
|
|
1039
1043
|
s
|
|
1040
1044
|
)
|
|
1041
1045
|
},
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
if (
|
|
1046
|
+
Zt = (e) => e.tagName !== 'INPUT',
|
|
1047
|
+
te = (e, t) => e.value === t.value,
|
|
1048
|
+
ee = (e, t) => {
|
|
1049
|
+
if (Zt(e) || te(e, t)) return []
|
|
1046
1050
|
const s = e,
|
|
1047
1051
|
r = t
|
|
1048
|
-
return [
|
|
1052
|
+
return [Qt(s, r, { name: 'value', value: r.value })]
|
|
1049
1053
|
},
|
|
1050
|
-
|
|
1051
|
-
const s =
|
|
1052
|
-
r =
|
|
1053
|
-
n =
|
|
1054
|
+
se = (e, t) => {
|
|
1055
|
+
const s = W(e, t),
|
|
1056
|
+
r = Yt(e, t),
|
|
1057
|
+
n = ee(e, t)
|
|
1054
1058
|
return s.concat(r).concat(n)
|
|
1055
1059
|
},
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1060
|
+
re = (e, t) => W(e, t, !0),
|
|
1061
|
+
ne = (e, t) => (e.textContent !== t.textContent ? [Rt(e, t)] : []),
|
|
1062
|
+
ie = (e, t, s) => {
|
|
1059
1063
|
let r = []
|
|
1060
|
-
if (e.nodeType === 1 &&
|
|
1064
|
+
if (e.nodeType === 1 && at(e)) {
|
|
1061
1065
|
const n = e,
|
|
1062
1066
|
i = t,
|
|
1063
|
-
a =
|
|
1064
|
-
|
|
1065
|
-
r = a.concat(
|
|
1067
|
+
a = re(n, i),
|
|
1068
|
+
c = s(n.childNodes, i.childNodes, n)
|
|
1069
|
+
r = a.concat(c)
|
|
1066
1070
|
} else if (e.nodeType === 1) {
|
|
1067
1071
|
const n = e,
|
|
1068
1072
|
i = t,
|
|
1069
|
-
a =
|
|
1070
|
-
|
|
1071
|
-
r = a.concat(
|
|
1072
|
-
} else e.nodeType === 3 && (r =
|
|
1073
|
+
a = se(n, i),
|
|
1074
|
+
c = s(n.childNodes, i.childNodes, n)
|
|
1075
|
+
r = a.concat(c)
|
|
1076
|
+
} else e.nodeType === 3 && (r = ne(e, t))
|
|
1073
1077
|
return r
|
|
1074
1078
|
},
|
|
1075
|
-
|
|
1079
|
+
X = (e, t, s) => {
|
|
1076
1080
|
const r = [],
|
|
1077
|
-
n =
|
|
1081
|
+
n = oe(e, t),
|
|
1078
1082
|
i = S(e),
|
|
1079
1083
|
a = S(t),
|
|
1080
|
-
|
|
1084
|
+
c = []
|
|
1081
1085
|
let u = 0
|
|
1082
1086
|
for (; u < n; u++) {
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1085
|
-
if (
|
|
1086
|
-
const p = i.pullMatch(
|
|
1087
|
-
a.clear(
|
|
1087
|
+
const d = e[u],
|
|
1088
|
+
l = t[u]
|
|
1089
|
+
if (l && a.check(l)) {
|
|
1090
|
+
const p = i.pullMatch(l)
|
|
1091
|
+
a.clear(l),
|
|
1088
1092
|
p.element
|
|
1089
1093
|
? (p.index !== u &&
|
|
1090
1094
|
r.push(
|
|
@@ -1093,147 +1097,147 @@ const S = (e) => {
|
|
|
1093
1097
|
index: u,
|
|
1094
1098
|
}),
|
|
1095
1099
|
),
|
|
1096
|
-
|
|
1100
|
+
c.push({
|
|
1097
1101
|
source: p.element,
|
|
1098
|
-
target:
|
|
1102
|
+
target: l,
|
|
1099
1103
|
}))
|
|
1100
|
-
:
|
|
1101
|
-
? a.check(
|
|
1102
|
-
? r.push(b(
|
|
1103
|
-
: (i.clear(
|
|
1104
|
-
: r.push(b(
|
|
1105
|
-
} else
|
|
1104
|
+
: d
|
|
1105
|
+
? a.check(d)
|
|
1106
|
+
? r.push(b(l, { parent: s, index: u }))
|
|
1107
|
+
: (i.clear(d), r.push(Ut(d, l)))
|
|
1108
|
+
: r.push(b(l, { parent: s, index: u }))
|
|
1109
|
+
} else d && i.pullMatch(d).element && r.push(N(d))
|
|
1106
1110
|
}
|
|
1107
|
-
i.remaining().forEach(({ element:
|
|
1108
|
-
r.push(N(
|
|
1111
|
+
i.remaining().forEach(({ element: d }) => {
|
|
1112
|
+
r.push(N(d))
|
|
1109
1113
|
})
|
|
1110
|
-
const
|
|
1111
|
-
(
|
|
1114
|
+
const h = c.reduce(
|
|
1115
|
+
(d, { source: l, target: p }) => d.concat(ie(l, p, X)),
|
|
1112
1116
|
[],
|
|
1113
1117
|
)
|
|
1114
|
-
return r.concat(
|
|
1118
|
+
return r.concat(h).sort(Wt)
|
|
1115
1119
|
},
|
|
1116
|
-
|
|
1120
|
+
oe = (e, t) => {
|
|
1117
1121
|
const s = e.length,
|
|
1118
1122
|
r = t.length
|
|
1119
1123
|
return s > r ? s : r
|
|
1120
1124
|
},
|
|
1121
|
-
|
|
1122
|
-
const r =
|
|
1125
|
+
ue = (e, t, s) => {
|
|
1126
|
+
const r = X(e, t, s)
|
|
1123
1127
|
return (
|
|
1124
1128
|
r.forEach((n) => {
|
|
1125
|
-
|
|
1129
|
+
ae(n)
|
|
1126
1130
|
}),
|
|
1127
1131
|
r
|
|
1128
1132
|
)
|
|
1129
1133
|
},
|
|
1130
|
-
|
|
1131
|
-
;(
|
|
1134
|
+
ae = (e) => {
|
|
1135
|
+
;(Ee[e.type] || ce)(e)
|
|
1132
1136
|
},
|
|
1133
|
-
|
|
1134
|
-
|
|
1137
|
+
ce = (e) => {},
|
|
1138
|
+
le = (e) => {
|
|
1135
1139
|
const { source: t, target: s } = e
|
|
1136
1140
|
t.nodeValue = s.textContent
|
|
1137
1141
|
},
|
|
1138
|
-
|
|
1142
|
+
he = (e) => {
|
|
1139
1143
|
const { source: t } = e
|
|
1140
1144
|
t.remove()
|
|
1141
1145
|
},
|
|
1142
|
-
|
|
1146
|
+
de = (e) => {
|
|
1143
1147
|
const { target: t, data: s } = e,
|
|
1144
1148
|
{ parent: r, index: n } = s,
|
|
1145
1149
|
i = r.childNodes[n]
|
|
1146
1150
|
i ? i && i !== t && r.insertBefore(t, i) : r.appendChild(t)
|
|
1147
1151
|
},
|
|
1148
|
-
|
|
1152
|
+
pe = (e) => {
|
|
1149
1153
|
const { source: t, target: s } = e
|
|
1150
1154
|
t.replaceWith(s)
|
|
1151
1155
|
},
|
|
1152
|
-
|
|
1156
|
+
me = (e) => {
|
|
1153
1157
|
const { source: t, data: s } = e,
|
|
1154
1158
|
{ name: r, isSvg: n } = s
|
|
1155
1159
|
n ? t.removeAttributeNS(null, r) : t.removeAttribute(r)
|
|
1156
1160
|
},
|
|
1157
|
-
|
|
1161
|
+
Y = (e) => {
|
|
1158
1162
|
const { source: t, data: s } = e,
|
|
1159
1163
|
{ name: r, value: n, isSvg: i } = s
|
|
1160
1164
|
i ? t.setAttributeNS(null, r, n) : t.setAttribute(r, n)
|
|
1161
1165
|
},
|
|
1162
|
-
me = (e) => {
|
|
1163
|
-
X(e)
|
|
1164
|
-
},
|
|
1165
1166
|
fe = (e) => {
|
|
1167
|
+
Y(e)
|
|
1168
|
+
},
|
|
1169
|
+
be = (e) => {
|
|
1166
1170
|
const t = e.data,
|
|
1167
1171
|
s = e.source,
|
|
1168
1172
|
{ name: r, value: n } = t
|
|
1169
1173
|
s.removeEventListener(r, n)
|
|
1170
1174
|
},
|
|
1171
|
-
|
|
1175
|
+
ve = (e) => {
|
|
1172
1176
|
const t = e.data,
|
|
1173
1177
|
s = e.source,
|
|
1174
1178
|
{ name: r, value: n } = t
|
|
1175
1179
|
s.addEventListener(r, n)
|
|
1176
1180
|
},
|
|
1177
|
-
|
|
1181
|
+
ge = (e) => {
|
|
1178
1182
|
const t = e.data,
|
|
1179
1183
|
s = e.source,
|
|
1180
1184
|
{ name: r, sourceValue: n, targetValue: i } = t
|
|
1181
1185
|
s.removeEventListener(r, n), s.addEventListener(r, i)
|
|
1182
1186
|
},
|
|
1183
|
-
|
|
1187
|
+
ye = (e) => {
|
|
1184
1188
|
const t = e.data,
|
|
1185
1189
|
s = e.source,
|
|
1186
1190
|
{ value: r } = t
|
|
1187
1191
|
s.value = r
|
|
1188
1192
|
},
|
|
1189
|
-
|
|
1190
|
-
[o.changeText]:
|
|
1191
|
-
[o.removeNode]:
|
|
1192
|
-
[o.insertNode]:
|
|
1193
|
-
[o.replaceNode]:
|
|
1194
|
-
[o.removeAttribute]:
|
|
1195
|
-
[o.addAttribute]:
|
|
1196
|
-
[o.updateAttribute]:
|
|
1197
|
-
[o.removeEvent]:
|
|
1198
|
-
[o.addEvent]:
|
|
1199
|
-
[o.updateEvent]:
|
|
1200
|
-
[o.changeValue]:
|
|
1193
|
+
Ee = {
|
|
1194
|
+
[o.changeText]: le,
|
|
1195
|
+
[o.removeNode]: he,
|
|
1196
|
+
[o.insertNode]: de,
|
|
1197
|
+
[o.replaceNode]: pe,
|
|
1198
|
+
[o.removeAttribute]: me,
|
|
1199
|
+
[o.addAttribute]: Y,
|
|
1200
|
+
[o.updateAttribute]: fe,
|
|
1201
|
+
[o.removeEvent]: be,
|
|
1202
|
+
[o.addEvent]: ve,
|
|
1203
|
+
[o.updateEvent]: ge,
|
|
1204
|
+
[o.changeValue]: ye,
|
|
1201
1205
|
},
|
|
1202
|
-
|
|
1206
|
+
xe = (e, t, s) => {
|
|
1203
1207
|
const r = [...t]
|
|
1204
1208
|
return (
|
|
1205
1209
|
e.forEach((n) => {
|
|
1206
|
-
|
|
1210
|
+
Ae(n, r, s)
|
|
1207
1211
|
}),
|
|
1208
1212
|
r
|
|
1209
1213
|
)
|
|
1210
1214
|
},
|
|
1211
|
-
|
|
1212
|
-
const r =
|
|
1215
|
+
Ae = (e, t, s) => {
|
|
1216
|
+
const r = Se[e.type]
|
|
1213
1217
|
r && r(e, t, s)
|
|
1214
1218
|
},
|
|
1215
|
-
|
|
1219
|
+
we = (e, t) => {
|
|
1216
1220
|
const { source: s } = e,
|
|
1217
1221
|
r = t.indexOf(s)
|
|
1218
1222
|
r >= 0 && t.splice(r, 1)
|
|
1219
1223
|
},
|
|
1220
|
-
|
|
1224
|
+
Ne = (e, t, s) => {
|
|
1221
1225
|
const { target: r } = e,
|
|
1222
1226
|
n = e.data,
|
|
1223
1227
|
{ index: i, parent: a } = n
|
|
1224
1228
|
s === a && t.splice(i, 0, r)
|
|
1225
1229
|
},
|
|
1226
|
-
|
|
1230
|
+
_e = (e, t) => {
|
|
1227
1231
|
const { target: s, source: r } = e,
|
|
1228
1232
|
n = t.indexOf(r)
|
|
1229
1233
|
n >= 0 && (t[n] = s)
|
|
1230
1234
|
},
|
|
1231
|
-
|
|
1232
|
-
[o.removeNode]:
|
|
1233
|
-
[o.insertNode]:
|
|
1234
|
-
[o.replaceNode]:
|
|
1235
|
+
Se = {
|
|
1236
|
+
[o.removeNode]: we,
|
|
1237
|
+
[o.insertNode]: Ne,
|
|
1238
|
+
[o.replaceNode]: _e,
|
|
1235
1239
|
}
|
|
1236
|
-
class
|
|
1240
|
+
class Te {
|
|
1237
1241
|
constructor({ Template: t, subscriptions: s, attributes: r, viewModel: n }) {
|
|
1238
1242
|
;(this.Template = t),
|
|
1239
1243
|
(this.viewModel = n),
|
|
@@ -1265,8 +1269,8 @@ class Se {
|
|
|
1265
1269
|
this.parentElement = r
|
|
1266
1270
|
}
|
|
1267
1271
|
const t = this.generateDom(this.renderKit),
|
|
1268
|
-
s =
|
|
1269
|
-
this.dom =
|
|
1272
|
+
s = ue(this.dom, t, this.parentElement)
|
|
1273
|
+
this.dom = xe(s, this.dom, this.parentElement)
|
|
1270
1274
|
}
|
|
1271
1275
|
subscribeForRerender() {
|
|
1272
1276
|
const { subscribe: t } = this.renderKit
|
|
@@ -1278,36 +1282,19 @@ class Se {
|
|
|
1278
1282
|
return `${w}:${t}`
|
|
1279
1283
|
}
|
|
1280
1284
|
}
|
|
1281
|
-
const
|
|
1282
|
-
|
|
1285
|
+
const je = (e) => e,
|
|
1286
|
+
Oe = ({ Template: e, viewModel: t, subscriptions: s }) => (
|
|
1283
1287
|
(s = s || []),
|
|
1284
|
-
(t = t ||
|
|
1288
|
+
(t = t || je),
|
|
1285
1289
|
(r) =>
|
|
1286
|
-
new
|
|
1287
|
-
),
|
|
1288
|
-
Le = /* @__PURE__ */ Object.freeze(
|
|
1289
|
-
/* @__PURE__ */ Object.defineProperty(
|
|
1290
|
-
{
|
|
1291
|
-
__proto__: null,
|
|
1292
|
-
createRouteState: D,
|
|
1293
|
-
events: wt,
|
|
1294
|
-
extractQueryParams: F,
|
|
1295
|
-
findHref: P,
|
|
1296
|
-
navigate: E,
|
|
1297
|
-
onLinkClick: V,
|
|
1298
|
-
onLocationChange: L,
|
|
1299
|
-
start: Nt,
|
|
1300
|
-
},
|
|
1301
|
-
Symbol.toStringTag,
|
|
1302
|
-
{ value: 'Module' },
|
|
1303
|
-
),
|
|
1290
|
+
new Te({ Template: e, viewModel: t, subscriptions: s, attributes: r })
|
|
1304
1291
|
),
|
|
1305
|
-
|
|
1292
|
+
Me =
|
|
1306
1293
|
(e) =>
|
|
1307
1294
|
({ path: t }) =>
|
|
1308
1295
|
t === e,
|
|
1309
|
-
|
|
1310
|
-
|
|
1296
|
+
ke = () => !0,
|
|
1297
|
+
Z =
|
|
1311
1298
|
(e) =>
|
|
1312
1299
|
({ route: t }) => {
|
|
1313
1300
|
const s = e.find((r) => r.match(t))
|
|
@@ -1317,33 +1304,50 @@ const Te = (e) => e,
|
|
|
1317
1304
|
/* @__PURE__ */ Object.defineProperty(
|
|
1318
1305
|
{
|
|
1319
1306
|
__proto__: null,
|
|
1320
|
-
buildRouter:
|
|
1321
|
-
catchAll:
|
|
1322
|
-
exactPathMatch:
|
|
1307
|
+
buildRouter: Z,
|
|
1308
|
+
catchAll: ke,
|
|
1309
|
+
exactPathMatch: Me,
|
|
1323
1310
|
},
|
|
1324
1311
|
Symbol.toStringTag,
|
|
1325
1312
|
{ value: 'Module' },
|
|
1326
1313
|
),
|
|
1327
1314
|
),
|
|
1328
|
-
|
|
1315
|
+
$e = () => ({
|
|
1329
1316
|
render: (e, t) => [],
|
|
1330
1317
|
}),
|
|
1331
1318
|
Be = (e) => {
|
|
1332
|
-
const t =
|
|
1333
|
-
return
|
|
1334
|
-
Template: ({ route: r }) => (t({ route: r }) ||
|
|
1319
|
+
const t = Z(e)
|
|
1320
|
+
return Oe({
|
|
1321
|
+
Template: ({ route: r }) => (t({ route: r }) || $e)(),
|
|
1335
1322
|
subscriptions: ['route'],
|
|
1336
1323
|
})
|
|
1337
|
-
}
|
|
1324
|
+
},
|
|
1325
|
+
Ke = /* @__PURE__ */ Object.freeze(
|
|
1326
|
+
/* @__PURE__ */ Object.defineProperty(
|
|
1327
|
+
{
|
|
1328
|
+
__proto__: null,
|
|
1329
|
+
createRouteState: P,
|
|
1330
|
+
events: Nt,
|
|
1331
|
+
extractQueryParams: L,
|
|
1332
|
+
findHref: V,
|
|
1333
|
+
navigate: E,
|
|
1334
|
+
onLinkClick: F,
|
|
1335
|
+
onLocationChange: z,
|
|
1336
|
+
start: _t,
|
|
1337
|
+
},
|
|
1338
|
+
Symbol.toStringTag,
|
|
1339
|
+
{ value: 'Module' },
|
|
1340
|
+
),
|
|
1341
|
+
)
|
|
1338
1342
|
export {
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1343
|
+
Le as JaxsTypes,
|
|
1344
|
+
De as appBuilding,
|
|
1345
|
+
Oe as bind,
|
|
1346
|
+
Fe as createApp,
|
|
1347
|
+
xt as jsx,
|
|
1348
|
+
Pe as messageBus,
|
|
1349
|
+
Ke as navigation,
|
|
1346
1350
|
Be as routedView,
|
|
1347
1351
|
ze as routing,
|
|
1348
|
-
|
|
1352
|
+
Ve as state,
|
|
1349
1353
|
}
|