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.umd.cjs
CHANGED
|
@@ -7,33 +7,37 @@
|
|
|
7
7
|
f((p.jaxs = {})))
|
|
8
8
|
})(this, function (p) {
|
|
9
9
|
'use strict'
|
|
10
|
-
const f = (e
|
|
11
|
-
|
|
10
|
+
const f = (e) => typeof e == 'string',
|
|
11
|
+
v = (e) => Array.isArray(e),
|
|
12
|
+
g = (e) => e !== null && !v(e) && typeof e == 'object',
|
|
13
|
+
rt = (e, t) => t.createElement(e),
|
|
14
|
+
it = (e, t) => {
|
|
12
15
|
for (const s in t) {
|
|
13
16
|
if (s === '__self') continue
|
|
14
17
|
const n = t[s].toString()
|
|
15
18
|
if (s === 'value') {
|
|
16
19
|
const r = e
|
|
17
20
|
r.value !== n && (r.value = n)
|
|
18
|
-
} else
|
|
21
|
+
} else
|
|
22
|
+
f(n) && n.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, n)
|
|
19
23
|
}
|
|
20
24
|
},
|
|
21
|
-
|
|
25
|
+
ot = (e, t, s) => {
|
|
22
26
|
const n = {}
|
|
23
27
|
for (const r in t) {
|
|
24
28
|
const i = t[r],
|
|
25
|
-
a = (
|
|
29
|
+
a = (c) => s(i, c)
|
|
26
30
|
e.addEventListener(r, a),
|
|
27
31
|
(n[r] = { domEvent: r, busEvent: i, listener: a })
|
|
28
32
|
}
|
|
29
33
|
e.eventMaps = n
|
|
30
34
|
},
|
|
31
|
-
|
|
32
|
-
const r =
|
|
33
|
-
return
|
|
35
|
+
ut = (e, t, s, n) => {
|
|
36
|
+
const r = rt(e, n.document)
|
|
37
|
+
return it(r, t), ot(r, s, n.publish), r
|
|
34
38
|
},
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
y = 'http://www.w3.org/2000/svg',
|
|
40
|
+
at = {
|
|
37
41
|
animate: !0,
|
|
38
42
|
animateMotion: !0,
|
|
39
43
|
animateTransform: !0,
|
|
@@ -97,33 +101,33 @@
|
|
|
97
101
|
use: !0,
|
|
98
102
|
view: !0,
|
|
99
103
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const n = s.createElementNS(
|
|
104
|
+
ct = (e, t) => !!(at[e] || (e === 'a' && t === y)),
|
|
105
|
+
lt = (e, t, s) => {
|
|
106
|
+
const n = s.createElementNS(y, e)
|
|
103
107
|
for (const r in t)
|
|
104
108
|
r === '__self' ||
|
|
105
109
|
r === 'xmlns' ||
|
|
106
110
|
n.setAttributeNS(null, r, t[r].toString())
|
|
107
111
|
return n
|
|
108
112
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
class
|
|
113
|
+
ht = (e) => e.namespaceURI === y,
|
|
114
|
+
dt = (e, t) => t.createTextNode(e)
|
|
115
|
+
class pt {
|
|
112
116
|
constructor(t) {
|
|
113
117
|
this.value = t.toString()
|
|
114
118
|
}
|
|
115
119
|
render(t) {
|
|
116
|
-
const s =
|
|
120
|
+
const s = dt(this.value, t.document)
|
|
117
121
|
return (s.__jsx = 'TextNode'), [s]
|
|
118
122
|
}
|
|
119
123
|
}
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
const mt = (e) => typeof e == 'string' || typeof e == 'number',
|
|
125
|
+
ft = (e) => new pt(e),
|
|
126
|
+
bt = (e) => (mt(e) ? ft(e) : e),
|
|
127
|
+
S = (e) => vt(e).map(bt).flat(),
|
|
128
|
+
vt = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
|
|
129
|
+
T = (e, t = {}) => S(e || t.children || []),
|
|
130
|
+
gt = (e, t = '') => {
|
|
127
131
|
const s = {},
|
|
128
132
|
n = {}
|
|
129
133
|
for (const r in e) {
|
|
@@ -133,27 +137,27 @@
|
|
|
133
137
|
n[a] = i ? i.toString() : ''
|
|
134
138
|
} else {
|
|
135
139
|
if (i === !1) continue
|
|
136
|
-
r === '__source' ? (s.__source = e.__source) : (s[r] =
|
|
140
|
+
r === '__source' ? (s.__source = e.__source) : (s[r] = yt(r, i, t))
|
|
137
141
|
}
|
|
138
142
|
}
|
|
139
143
|
return { attributes: s, events: n }
|
|
140
144
|
},
|
|
141
|
-
|
|
142
|
-
|
|
145
|
+
yt = (e, t, s = '') => (t == null ? s : t.toString()),
|
|
146
|
+
Et = (e, t) => {
|
|
143
147
|
const s = e || {},
|
|
144
|
-
n =
|
|
148
|
+
n = T(t, s)
|
|
145
149
|
return (s.children = s.children || n), s
|
|
146
150
|
},
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
j = (e, t, s, n = []) => e.reduce(At(t, s), n).flat(),
|
|
152
|
+
At = (e, t) => (s, n) =>
|
|
149
153
|
n
|
|
150
154
|
? Array.isArray(n)
|
|
151
|
-
?
|
|
155
|
+
? j(n, e, t, s)
|
|
152
156
|
: (n.render(e, t).forEach((r) => s.push(r)), s)
|
|
153
157
|
: s
|
|
154
|
-
class
|
|
158
|
+
class O {
|
|
155
159
|
constructor(t) {
|
|
156
|
-
this.collection =
|
|
160
|
+
this.collection = S(t)
|
|
157
161
|
}
|
|
158
162
|
render(t, s) {
|
|
159
163
|
this.parentElement = s
|
|
@@ -161,7 +165,7 @@
|
|
|
161
165
|
return this.attachToParent(n), n
|
|
162
166
|
}
|
|
163
167
|
generateDom(t) {
|
|
164
|
-
return
|
|
168
|
+
return j(this.collection, t, this.parentElement)
|
|
165
169
|
}
|
|
166
170
|
attachToParent(t) {
|
|
167
171
|
if (this.parentElement === void 0) return
|
|
@@ -169,7 +173,7 @@
|
|
|
169
173
|
t.forEach((n) => s.appendChild(n))
|
|
170
174
|
}
|
|
171
175
|
}
|
|
172
|
-
class
|
|
176
|
+
class xt {
|
|
173
177
|
constructor(t, s) {
|
|
174
178
|
;(this.type = t), (this.attributes = s)
|
|
175
179
|
}
|
|
@@ -197,14 +201,14 @@
|
|
|
197
201
|
return `${this.type}${t}${s}${n}`
|
|
198
202
|
}
|
|
199
203
|
}
|
|
200
|
-
class
|
|
204
|
+
class wt {
|
|
201
205
|
constructor(t, s, n = []) {
|
|
202
206
|
this.type = t
|
|
203
|
-
const { events: r, attributes: i } =
|
|
207
|
+
const { events: r, attributes: i } = gt(s)
|
|
204
208
|
;(this.events = r),
|
|
205
209
|
(this.attributes = i),
|
|
206
|
-
(this.isSvg =
|
|
207
|
-
(this.children = new
|
|
210
|
+
(this.isSvg = ct(this.type, this.attributes.xmlns)),
|
|
211
|
+
(this.children = new O(n))
|
|
208
212
|
}
|
|
209
213
|
render(t) {
|
|
210
214
|
const s = this.generateDom(t)
|
|
@@ -214,24 +218,24 @@
|
|
|
214
218
|
return this.isSvg ? this.generateSvgDom(t) : this.generateHtmlDom(t)
|
|
215
219
|
}
|
|
216
220
|
generateHtmlDom(t) {
|
|
217
|
-
const s =
|
|
221
|
+
const s = ut(this.type, this.attributes, this.events, t)
|
|
218
222
|
return (s.__jsx = this.jsxKey()), s
|
|
219
223
|
}
|
|
220
224
|
generateSvgDom(t) {
|
|
221
|
-
const s =
|
|
225
|
+
const s = lt(this.type, this.attributes, t.document)
|
|
222
226
|
return (s.__jsx = this.jsxKey()), s
|
|
223
227
|
}
|
|
224
228
|
jsxKey() {
|
|
225
|
-
return new
|
|
229
|
+
return new xt(this.type, this.attributes).generate()
|
|
226
230
|
}
|
|
227
231
|
}
|
|
228
|
-
const
|
|
229
|
-
typeof e == 'string' ? new
|
|
230
|
-
|
|
231
|
-
const s =
|
|
232
|
-
return new
|
|
232
|
+
const M = (e, t, ...s) =>
|
|
233
|
+
typeof e == 'string' ? new wt(e, t, s) : e(Et(t, s))
|
|
234
|
+
M.fragment = (e, t) => {
|
|
235
|
+
const s = T(t, e)
|
|
236
|
+
return new O(s)
|
|
233
237
|
}
|
|
234
|
-
class
|
|
238
|
+
class Nt {
|
|
235
239
|
constructor(t, s, n) {
|
|
236
240
|
;(this.template = t),
|
|
237
241
|
(this.selector = s),
|
|
@@ -256,44 +260,45 @@
|
|
|
256
260
|
return this.renderKit.document.querySelector(this.selector)
|
|
257
261
|
}
|
|
258
262
|
}
|
|
259
|
-
const
|
|
260
|
-
const n = new
|
|
263
|
+
const _t = (e, t, s) => {
|
|
264
|
+
const n = new Nt(e, t, s)
|
|
261
265
|
return n.renderAndAttach(s), n
|
|
262
266
|
},
|
|
263
|
-
|
|
264
|
-
|
|
267
|
+
k = 'go-to-href',
|
|
268
|
+
$ = 'go-to',
|
|
265
269
|
b = 'navigation:location-change',
|
|
266
|
-
|
|
267
|
-
|
|
270
|
+
D = 'navigation:route-change',
|
|
271
|
+
St = Object.freeze(
|
|
268
272
|
Object.defineProperty(
|
|
269
273
|
{
|
|
270
274
|
__proto__: null,
|
|
271
|
-
linkNavigationEvent:
|
|
275
|
+
linkNavigationEvent: k,
|
|
272
276
|
locationChangeEvent: b,
|
|
273
|
-
navigationEvent:
|
|
274
|
-
routeChangeEvent:
|
|
277
|
+
navigationEvent: $,
|
|
278
|
+
routeChangeEvent: D,
|
|
275
279
|
},
|
|
276
280
|
Symbol.toStringTag,
|
|
277
281
|
{ value: 'Module' },
|
|
278
282
|
),
|
|
279
283
|
),
|
|
280
|
-
|
|
284
|
+
P = (e) => {
|
|
281
285
|
e.create('route', { host: '', path: '', query: {} })
|
|
282
286
|
},
|
|
283
|
-
|
|
287
|
+
V = (e) => {
|
|
284
288
|
const t = e.closest('[href]')
|
|
285
289
|
return (t && t.getAttribute('href')) || ''
|
|
286
290
|
},
|
|
287
|
-
|
|
291
|
+
E = ({ payload: e, publish: t, window: s }) => {
|
|
288
292
|
s.history.pushState(null, '', e), t(b, 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,45 +307,45 @@
|
|
|
302
307
|
const n = s.split('=')
|
|
303
308
|
return (t[n[0]] = n[1]), t
|
|
304
309
|
}, {}),
|
|
305
|
-
L = (e, t) => {
|
|
306
|
-
const { state: s, publish: n, window: r } = t,
|
|
307
|
-
{ host: i, pathname: a, search: l } = r.location,
|
|
308
|
-
u = a,
|
|
309
|
-
d = F(l),
|
|
310
|
-
c = { host: i, path: u, query: d }
|
|
311
|
-
s.store('route').update(c), n($, c)
|
|
312
|
-
},
|
|
313
310
|
z = (e) => {
|
|
311
|
+
const { state: t, publish: s, window: n } = e,
|
|
312
|
+
{ host: r, pathname: i, search: a } = n.location,
|
|
313
|
+
c = i,
|
|
314
|
+
u = L(a),
|
|
315
|
+
h = { host: r, path: c, query: u }
|
|
316
|
+
t.store('route').update(h), s(D, h)
|
|
317
|
+
},
|
|
318
|
+
B = (e) => {
|
|
314
319
|
const { subscribe: t } = e
|
|
315
|
-
t(
|
|
316
|
-
t(
|
|
317
|
-
|
|
320
|
+
t(k, F),
|
|
321
|
+
t($, (s) => {
|
|
322
|
+
E(s)
|
|
318
323
|
})
|
|
319
324
|
},
|
|
320
|
-
|
|
325
|
+
K = (e) => {
|
|
321
326
|
const { publish: t, subscribe: s, state: n, window: r } = e
|
|
322
|
-
|
|
327
|
+
P(n), r.addEventListener('popstate', () => t(b, null)), s(b, z)
|
|
323
328
|
},
|
|
324
|
-
|
|
329
|
+
R = (e) => {
|
|
325
330
|
setTimeout(() => e.publish(b, null), 0)
|
|
326
331
|
},
|
|
327
|
-
|
|
328
|
-
|
|
332
|
+
U = (e) => {
|
|
333
|
+
K(e), B(e), R(e)
|
|
329
334
|
},
|
|
330
|
-
|
|
335
|
+
Tt = Object.freeze(
|
|
331
336
|
Object.defineProperty(
|
|
332
337
|
{
|
|
333
338
|
__proto__: null,
|
|
334
|
-
publishLocation:
|
|
335
|
-
startNavigation:
|
|
336
|
-
subscribeToHistoryChange:
|
|
337
|
-
subscribeToNavigation:
|
|
339
|
+
publishLocation: R,
|
|
340
|
+
startNavigation: U,
|
|
341
|
+
subscribeToHistoryChange: K,
|
|
342
|
+
subscribeToNavigation: B,
|
|
338
343
|
},
|
|
339
344
|
Symbol.toStringTag,
|
|
340
345
|
{ value: 'Module' },
|
|
341
346
|
),
|
|
342
347
|
)
|
|
343
|
-
class
|
|
348
|
+
class C {
|
|
344
349
|
constructor({
|
|
345
350
|
window: t,
|
|
346
351
|
document: s,
|
|
@@ -348,7 +353,7 @@
|
|
|
348
353
|
subscribe: r,
|
|
349
354
|
bus: i,
|
|
350
355
|
state: a,
|
|
351
|
-
renderKit:
|
|
356
|
+
renderKit: c,
|
|
352
357
|
}) {
|
|
353
358
|
;(this.window = t),
|
|
354
359
|
(this.document = s),
|
|
@@ -356,23 +361,23 @@
|
|
|
356
361
|
(this.subscribe = r),
|
|
357
362
|
(this.bus = i),
|
|
358
363
|
(this.state = a),
|
|
359
|
-
(this.renderKit =
|
|
364
|
+
(this.renderKit = c),
|
|
360
365
|
(this.roots = [])
|
|
361
366
|
}
|
|
362
367
|
render(t, s) {
|
|
363
|
-
const n =
|
|
368
|
+
const n = _t(t, s, this.renderKit)
|
|
364
369
|
return this.roots.push(n), n
|
|
365
370
|
}
|
|
366
371
|
startNavigation() {
|
|
367
|
-
|
|
372
|
+
U(this)
|
|
368
373
|
}
|
|
369
374
|
}
|
|
370
|
-
const
|
|
371
|
-
Object.defineProperty({ __proto__: null, App:
|
|
375
|
+
const jt = Object.freeze(
|
|
376
|
+
Object.defineProperty({ __proto__: null, App: C }, Symbol.toStringTag, {
|
|
372
377
|
value: 'Module',
|
|
373
378
|
}),
|
|
374
379
|
)
|
|
375
|
-
class
|
|
380
|
+
class I {
|
|
376
381
|
constructor() {
|
|
377
382
|
this.lookup = {}
|
|
378
383
|
}
|
|
@@ -395,7 +400,7 @@
|
|
|
395
400
|
this.lookup[t] || (this.lookup[t] = [])
|
|
396
401
|
}
|
|
397
402
|
}
|
|
398
|
-
class
|
|
403
|
+
class q {
|
|
399
404
|
constructor() {
|
|
400
405
|
this.lookup = []
|
|
401
406
|
}
|
|
@@ -410,7 +415,7 @@
|
|
|
410
415
|
return this.lookup.filter((s) => s.matcher.test(t))
|
|
411
416
|
}
|
|
412
417
|
}
|
|
413
|
-
class
|
|
418
|
+
class Ot {
|
|
414
419
|
constructor({ publish: t, event: s, payload: n, timer: r }) {
|
|
415
420
|
;(this.setNewTimeout = () => {
|
|
416
421
|
this.stopped ||
|
|
@@ -447,7 +452,7 @@
|
|
|
447
452
|
((this.callCount += 1), this.publish(this.event, this.payload))
|
|
448
453
|
}
|
|
449
454
|
}
|
|
450
|
-
const
|
|
455
|
+
const Mt = (e) => {
|
|
451
456
|
const { offset: t, period: s } = e,
|
|
452
457
|
n = ({ callCount: r }) => (t && r == 0 ? t : s)
|
|
453
458
|
return {
|
|
@@ -457,16 +462,16 @@
|
|
|
457
462
|
timer: n,
|
|
458
463
|
}
|
|
459
464
|
},
|
|
460
|
-
|
|
465
|
+
kt = (e) => {
|
|
461
466
|
let t
|
|
462
|
-
'timer' in e ? (t = e) : (t =
|
|
463
|
-
const s = new
|
|
467
|
+
'timer' in e ? (t = e) : (t = Mt(e))
|
|
468
|
+
const s = new Ot(t)
|
|
464
469
|
return s.start(), s.stop
|
|
465
470
|
}
|
|
466
|
-
class
|
|
471
|
+
class J {
|
|
467
472
|
constructor() {
|
|
468
|
-
;(this.exactSubscriptions = new
|
|
469
|
-
(this.fuzzySubscriptions = new
|
|
473
|
+
;(this.exactSubscriptions = new I()),
|
|
474
|
+
(this.fuzzySubscriptions = new q()),
|
|
470
475
|
(this.currentIndex = 0)
|
|
471
476
|
}
|
|
472
477
|
subscribe(t, s) {
|
|
@@ -486,58 +491,61 @@
|
|
|
486
491
|
]
|
|
487
492
|
.sort((r, i) => r.index - i.index)
|
|
488
493
|
.forEach((r) => {
|
|
489
|
-
r.listener(
|
|
494
|
+
r.listener(this.listenerOptions(t, s))
|
|
490
495
|
})
|
|
491
496
|
}
|
|
492
497
|
addListenerOptions(t) {
|
|
493
498
|
this.options = t
|
|
494
499
|
}
|
|
495
|
-
listenerOptions(t) {
|
|
496
|
-
return {
|
|
500
|
+
listenerOptions(t, s) {
|
|
501
|
+
return {
|
|
502
|
+
eventName: t,
|
|
503
|
+
...this.options,
|
|
504
|
+
publish: this.publish.bind(this),
|
|
505
|
+
payload: s,
|
|
506
|
+
}
|
|
497
507
|
}
|
|
498
508
|
}
|
|
499
|
-
const
|
|
500
|
-
const e = new
|
|
509
|
+
const G = () => {
|
|
510
|
+
const e = new J()
|
|
501
511
|
return {
|
|
502
512
|
bus: e,
|
|
503
513
|
publish: (n, r) => e.publish(n, r),
|
|
504
514
|
subscribe: (n, r) => e.subscribe(n, r),
|
|
505
515
|
}
|
|
506
516
|
},
|
|
507
|
-
|
|
517
|
+
$t = Object.freeze(
|
|
508
518
|
Object.defineProperty(
|
|
509
519
|
{
|
|
510
520
|
__proto__: null,
|
|
511
|
-
ExactSubscriptions:
|
|
512
|
-
FuzzySubscriptions:
|
|
513
|
-
JaxsBus:
|
|
514
|
-
createBus:
|
|
515
|
-
publishPeriodically:
|
|
521
|
+
ExactSubscriptions: I,
|
|
522
|
+
FuzzySubscriptions: q,
|
|
523
|
+
JaxsBus: J,
|
|
524
|
+
createBus: G,
|
|
525
|
+
publishPeriodically: kt,
|
|
516
526
|
},
|
|
517
527
|
Symbol.toStringTag,
|
|
518
528
|
{ value: 'Module' },
|
|
519
529
|
),
|
|
520
530
|
),
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
Pt = (e, t) =>
|
|
526
|
-
!(E(e) && E(t)) || !Dt(e, t)
|
|
531
|
+
Dt = (e, t) => e === t,
|
|
532
|
+
Pt = (e, t) => Object.keys(e).length === Object.keys(t).length,
|
|
533
|
+
Vt = (e, t) =>
|
|
534
|
+
!(g(e) && g(t)) || !Pt(e, t)
|
|
527
535
|
? !1
|
|
528
536
|
: Object.keys(e).every((s) => {
|
|
529
537
|
const n = e[s],
|
|
530
538
|
r = t[s]
|
|
531
539
|
return A(n, r)
|
|
532
540
|
}),
|
|
533
|
-
|
|
541
|
+
Ft = (e, t) =>
|
|
534
542
|
!(v(e) && v(t)) || e.length !== t.length
|
|
535
543
|
? !1
|
|
536
544
|
: e.every((s, n) => {
|
|
537
545
|
const r = t[n]
|
|
538
546
|
return A(s, r)
|
|
539
547
|
}),
|
|
540
|
-
A = (e, t) => (
|
|
548
|
+
A = (e, t) => (g(e) ? Vt(e, t) : v(e) ? Ft(e, t) : Dt(e, t))
|
|
541
549
|
class x {
|
|
542
550
|
constructor(t) {
|
|
543
551
|
;(this.name = t.name),
|
|
@@ -581,7 +589,7 @@
|
|
|
581
589
|
return this.store.value
|
|
582
590
|
}
|
|
583
591
|
}
|
|
584
|
-
class
|
|
592
|
+
class Lt extends w {
|
|
585
593
|
updateAttribute(t, s) {
|
|
586
594
|
const n = { ...this.value }
|
|
587
595
|
;(n[t] = s), this.update(n)
|
|
@@ -601,8 +609,8 @@
|
|
|
601
609
|
;(s[t] = n), this.update(s)
|
|
602
610
|
}
|
|
603
611
|
}
|
|
604
|
-
const
|
|
605
|
-
class
|
|
612
|
+
const zt = (e) => new Lt(e)
|
|
613
|
+
class Bt extends w {
|
|
606
614
|
push(t) {
|
|
607
615
|
const s = [...this.value, t]
|
|
608
616
|
this.update(s)
|
|
@@ -643,8 +651,8 @@
|
|
|
643
651
|
this.update(s)
|
|
644
652
|
}
|
|
645
653
|
}
|
|
646
|
-
const
|
|
647
|
-
class
|
|
654
|
+
const Kt = (e) => new Bt(e)
|
|
655
|
+
class Rt extends w {
|
|
648
656
|
toggle() {
|
|
649
657
|
const t = !this.value
|
|
650
658
|
this.update(t)
|
|
@@ -656,9 +664,9 @@
|
|
|
656
664
|
this.update(!1)
|
|
657
665
|
}
|
|
658
666
|
}
|
|
659
|
-
const
|
|
667
|
+
const Ut = { object: zt, list: Kt, boolean: (e) => new Rt(e) },
|
|
660
668
|
N = 'state'
|
|
661
|
-
class
|
|
669
|
+
class H {
|
|
662
670
|
constructor(t) {
|
|
663
671
|
;(this.publisher = t),
|
|
664
672
|
(this.stores = {}),
|
|
@@ -704,22 +712,22 @@
|
|
|
704
712
|
return `${this.eventNamePrefix}:${t}`
|
|
705
713
|
}
|
|
706
714
|
}
|
|
707
|
-
const
|
|
708
|
-
|
|
715
|
+
const Q = (e) => new H(e),
|
|
716
|
+
Ct = Object.freeze(
|
|
709
717
|
Object.defineProperty(
|
|
710
718
|
{
|
|
711
719
|
__proto__: null,
|
|
712
|
-
State:
|
|
720
|
+
State: H,
|
|
713
721
|
Store: x,
|
|
714
|
-
createState:
|
|
722
|
+
createState: Q,
|
|
715
723
|
eventName: N,
|
|
716
|
-
updaters:
|
|
724
|
+
updaters: Ut,
|
|
717
725
|
},
|
|
718
726
|
Symbol.toStringTag,
|
|
719
727
|
{ value: 'Module' },
|
|
720
728
|
),
|
|
721
729
|
)
|
|
722
|
-
class
|
|
730
|
+
class It {
|
|
723
731
|
constructor(t) {
|
|
724
732
|
this.setupDomEnvironment(t)
|
|
725
733
|
}
|
|
@@ -729,7 +737,7 @@
|
|
|
729
737
|
this.setupState(),
|
|
730
738
|
this.addBusOptions(),
|
|
731
739
|
this.setRenderKit(),
|
|
732
|
-
new
|
|
740
|
+
new C({
|
|
733
741
|
window: this.window,
|
|
734
742
|
document: this.document,
|
|
735
743
|
publish: this.publish,
|
|
@@ -749,11 +757,11 @@
|
|
|
749
757
|
: ((this.window = window), (this.document = document))
|
|
750
758
|
}
|
|
751
759
|
setupBus() {
|
|
752
|
-
const { publish: t, subscribe: s, bus: n } =
|
|
760
|
+
const { publish: t, subscribe: s, bus: n } = G()
|
|
753
761
|
;(this.publish = t), (this.subscribe = s), (this.bus = n)
|
|
754
762
|
}
|
|
755
763
|
setupState() {
|
|
756
|
-
this.state =
|
|
764
|
+
this.state = Q(this.publish)
|
|
757
765
|
}
|
|
758
766
|
addBusOptions() {
|
|
759
767
|
this.bus.addListenerOptions({
|
|
@@ -772,8 +780,8 @@
|
|
|
772
780
|
}
|
|
773
781
|
}
|
|
774
782
|
}
|
|
775
|
-
const
|
|
776
|
-
const s = new
|
|
783
|
+
const qt = (e = {}) => {
|
|
784
|
+
const s = new It(e).setup()
|
|
777
785
|
return s.startNavigation(), s
|
|
778
786
|
}
|
|
779
787
|
var o = ((e) => (
|
|
@@ -790,37 +798,37 @@
|
|
|
790
798
|
(e[(e.changeText = 10)] = 'changeText'),
|
|
791
799
|
e
|
|
792
800
|
))(o || {})
|
|
793
|
-
const
|
|
801
|
+
const Jt = Object.freeze(
|
|
794
802
|
Object.defineProperty(
|
|
795
803
|
{ __proto__: null, ChangeInstructionTypes: o },
|
|
796
804
|
Symbol.toStringTag,
|
|
797
805
|
{ value: 'Module' },
|
|
798
806
|
),
|
|
799
807
|
),
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
808
|
+
Gt = (e, t) => ({ source: e, target: t, type: o.changeText, data: {} }),
|
|
809
|
+
Ht = (e, t) => ({ source: e, target: t, type: o.replaceNode, data: {} }),
|
|
810
|
+
Qt = (e, t, s) => ({
|
|
803
811
|
source: e,
|
|
804
812
|
target: t,
|
|
805
813
|
data: s,
|
|
806
814
|
type: o.removeAttribute,
|
|
807
815
|
}),
|
|
808
|
-
|
|
809
|
-
|
|
816
|
+
Wt = (e, t, s) => ({ source: e, target: t, data: s, type: o.addAttribute }),
|
|
817
|
+
Xt = (e, t, s) => ({
|
|
810
818
|
source: e,
|
|
811
819
|
target: t,
|
|
812
820
|
data: s,
|
|
813
821
|
type: o.updateAttribute,
|
|
814
822
|
}),
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
823
|
+
Yt = (e, t, s) => ({ source: e, target: t, data: s, type: o.removeEvent }),
|
|
824
|
+
Zt = (e, t, s) => ({ source: e, target: t, data: s, type: o.addEvent }),
|
|
825
|
+
te = (e, t, s) => ({ source: e, target: t, data: s, type: o.updateEvent }),
|
|
826
|
+
W = (e) => ({ source: e, target: e, type: o.removeNode, data: {} }),
|
|
819
827
|
_ = (e, t) => ({ target: e, source: e, type: o.insertNode, data: t }),
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
class
|
|
828
|
+
ee = (e, t, s) => ({ source: e, target: t, type: o.changeValue, data: s }),
|
|
829
|
+
se = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
|
|
830
|
+
X = { index: -1 }
|
|
831
|
+
class ne {
|
|
824
832
|
constructor() {
|
|
825
833
|
this.map = {}
|
|
826
834
|
}
|
|
@@ -835,7 +843,7 @@
|
|
|
835
843
|
pullMatch(t) {
|
|
836
844
|
const s = t && t.__jsx
|
|
837
845
|
return !s || !(this.map[s] && this.map[s].length)
|
|
838
|
-
?
|
|
846
|
+
? X
|
|
839
847
|
: this.map[s].shift()
|
|
840
848
|
}
|
|
841
849
|
clear(t) {
|
|
@@ -852,261 +860,261 @@
|
|
|
852
860
|
return Object.values(this.map).flat()
|
|
853
861
|
}
|
|
854
862
|
}
|
|
855
|
-
const
|
|
856
|
-
const t = new
|
|
863
|
+
const Y = (e) => {
|
|
864
|
+
const t = new ne()
|
|
857
865
|
return t.populate(e), t
|
|
858
866
|
},
|
|
859
|
-
|
|
867
|
+
Z = (e, t, s = !1) => {
|
|
860
868
|
const n = [],
|
|
861
869
|
r = e.attributes,
|
|
862
870
|
i = r.length,
|
|
863
871
|
a = t.attributes,
|
|
864
|
-
|
|
865
|
-
let u,
|
|
872
|
+
c = a.length
|
|
873
|
+
let u, h, d
|
|
866
874
|
for (u = 0; u < i; u++) {
|
|
867
|
-
|
|
868
|
-
const
|
|
869
|
-
if (
|
|
870
|
-
for (
|
|
871
|
-
const m = a.item(
|
|
872
|
-
if (m &&
|
|
873
|
-
|
|
875
|
+
d = null
|
|
876
|
+
const l = r.item(u)
|
|
877
|
+
if (l) {
|
|
878
|
+
for (h = 0; h < c; h++) {
|
|
879
|
+
const m = a.item(h)
|
|
880
|
+
if (m && l.name == m.name) {
|
|
881
|
+
d = m
|
|
874
882
|
break
|
|
875
883
|
}
|
|
876
884
|
}
|
|
877
|
-
|
|
878
|
-
?
|
|
879
|
-
n.push(
|
|
880
|
-
: n.push(
|
|
885
|
+
d
|
|
886
|
+
? l.value !== d.value &&
|
|
887
|
+
n.push(Xt(e, t, { name: l.name, value: d.value, isSvg: s }))
|
|
888
|
+
: n.push(Qt(e, t, { name: l.name, isSvg: s }))
|
|
881
889
|
}
|
|
882
890
|
}
|
|
883
|
-
for (u = 0; u <
|
|
884
|
-
|
|
885
|
-
const
|
|
886
|
-
if (
|
|
887
|
-
for (
|
|
888
|
-
const m = r.item(
|
|
889
|
-
if (m && m.name ==
|
|
890
|
-
|
|
891
|
+
for (u = 0; u < c; u++) {
|
|
892
|
+
d = null
|
|
893
|
+
const l = a.item(u)
|
|
894
|
+
if (l) {
|
|
895
|
+
for (h = 0; h < i; h++) {
|
|
896
|
+
const m = r.item(h)
|
|
897
|
+
if (m && m.name == l.name) {
|
|
898
|
+
d = m
|
|
891
899
|
break
|
|
892
900
|
}
|
|
893
901
|
}
|
|
894
|
-
|
|
902
|
+
d || n.push(Wt(e, t, { name: l.name, value: l.value, isSvg: s }))
|
|
895
903
|
}
|
|
896
904
|
}
|
|
897
905
|
return n
|
|
898
906
|
},
|
|
899
|
-
|
|
907
|
+
re = (e, t) => {
|
|
900
908
|
const s = [],
|
|
901
909
|
n = e.eventMaps,
|
|
902
910
|
r = t.eventMaps,
|
|
903
911
|
i = Object.keys(n),
|
|
904
912
|
a = Object.keys(r)
|
|
905
913
|
return (
|
|
906
|
-
i.forEach((
|
|
907
|
-
const u = n[
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
?
|
|
914
|
+
i.forEach((c) => {
|
|
915
|
+
const u = n[c],
|
|
916
|
+
h = r[c]
|
|
917
|
+
h
|
|
918
|
+
? h.busEvent !== u.busEvent &&
|
|
911
919
|
s.push(
|
|
912
|
-
|
|
913
|
-
name:
|
|
914
|
-
targetValue:
|
|
920
|
+
te(e, t, {
|
|
921
|
+
name: c,
|
|
922
|
+
targetValue: h.listener,
|
|
915
923
|
sourceValue: u.listener,
|
|
916
924
|
}),
|
|
917
925
|
)
|
|
918
|
-
: s.push(
|
|
926
|
+
: s.push(Yt(e, t, { name: u.domEvent, value: u.listener }))
|
|
919
927
|
}),
|
|
920
|
-
a.forEach((
|
|
921
|
-
const u = n[
|
|
922
|
-
|
|
923
|
-
u || s.push(
|
|
928
|
+
a.forEach((c) => {
|
|
929
|
+
const u = n[c],
|
|
930
|
+
h = r[c]
|
|
931
|
+
u || s.push(Zt(e, t, { name: h.domEvent, value: h.listener }))
|
|
924
932
|
}),
|
|
925
933
|
s
|
|
926
934
|
)
|
|
927
935
|
},
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
if (
|
|
936
|
+
ie = (e) => e.tagName !== 'INPUT',
|
|
937
|
+
oe = (e, t) => e.value === t.value,
|
|
938
|
+
ue = (e, t) => {
|
|
939
|
+
if (ie(e) || oe(e, t)) return []
|
|
932
940
|
const s = e,
|
|
933
941
|
n = t
|
|
934
|
-
return [
|
|
942
|
+
return [ee(s, n, { name: 'value', value: n.value })]
|
|
935
943
|
},
|
|
936
|
-
|
|
937
|
-
const s =
|
|
938
|
-
n =
|
|
939
|
-
r =
|
|
944
|
+
ae = (e, t) => {
|
|
945
|
+
const s = Z(e, t),
|
|
946
|
+
n = re(e, t),
|
|
947
|
+
r = ue(e, t)
|
|
940
948
|
return s.concat(n).concat(r)
|
|
941
949
|
},
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
950
|
+
ce = (e, t) => Z(e, t, !0),
|
|
951
|
+
le = (e, t) => (e.textContent !== t.textContent ? [Gt(e, t)] : []),
|
|
952
|
+
he = (e, t, s) => {
|
|
945
953
|
let n = []
|
|
946
|
-
if (e.nodeType === 1 &&
|
|
954
|
+
if (e.nodeType === 1 && ht(e)) {
|
|
947
955
|
const r = e,
|
|
948
956
|
i = t,
|
|
949
|
-
a =
|
|
950
|
-
|
|
951
|
-
n = a.concat(
|
|
957
|
+
a = ce(r, i),
|
|
958
|
+
c = s(r.childNodes, i.childNodes, r)
|
|
959
|
+
n = a.concat(c)
|
|
952
960
|
} else if (e.nodeType === 1) {
|
|
953
961
|
const r = e,
|
|
954
962
|
i = t,
|
|
955
|
-
a =
|
|
956
|
-
|
|
957
|
-
n = a.concat(
|
|
958
|
-
} else e.nodeType === 3 && (n =
|
|
963
|
+
a = ae(r, i),
|
|
964
|
+
c = s(r.childNodes, i.childNodes, r)
|
|
965
|
+
n = a.concat(c)
|
|
966
|
+
} else e.nodeType === 3 && (n = le(e, t))
|
|
959
967
|
return n
|
|
960
968
|
},
|
|
961
|
-
|
|
969
|
+
tt = (e, t, s) => {
|
|
962
970
|
const n = [],
|
|
963
|
-
r =
|
|
964
|
-
i =
|
|
965
|
-
a =
|
|
966
|
-
|
|
971
|
+
r = de(e, t),
|
|
972
|
+
i = Y(e),
|
|
973
|
+
a = Y(t),
|
|
974
|
+
c = []
|
|
967
975
|
let u = 0
|
|
968
976
|
for (; u < r; u++) {
|
|
969
|
-
const
|
|
970
|
-
|
|
971
|
-
if (
|
|
972
|
-
const m = i.pullMatch(
|
|
973
|
-
a.clear(
|
|
977
|
+
const d = e[u],
|
|
978
|
+
l = t[u]
|
|
979
|
+
if (l && a.check(l)) {
|
|
980
|
+
const m = i.pullMatch(l)
|
|
981
|
+
a.clear(l),
|
|
974
982
|
m.element
|
|
975
983
|
? (m.index !== u && n.push(_(m.element, { parent: s, index: u })),
|
|
976
|
-
|
|
977
|
-
:
|
|
978
|
-
? a.check(
|
|
979
|
-
? n.push(_(
|
|
980
|
-
: (i.clear(
|
|
981
|
-
: n.push(_(
|
|
982
|
-
} else
|
|
984
|
+
c.push({ source: m.element, target: l }))
|
|
985
|
+
: d
|
|
986
|
+
? a.check(d)
|
|
987
|
+
? n.push(_(l, { parent: s, index: u }))
|
|
988
|
+
: (i.clear(d), n.push(Ht(d, l)))
|
|
989
|
+
: n.push(_(l, { parent: s, index: u }))
|
|
990
|
+
} else d && i.pullMatch(d).element && n.push(W(d))
|
|
983
991
|
}
|
|
984
|
-
i.remaining().forEach(({ element:
|
|
985
|
-
n.push(
|
|
992
|
+
i.remaining().forEach(({ element: d }) => {
|
|
993
|
+
n.push(W(d))
|
|
986
994
|
})
|
|
987
|
-
const
|
|
988
|
-
(
|
|
995
|
+
const h = c.reduce(
|
|
996
|
+
(d, { source: l, target: m }) => d.concat(he(l, m, tt)),
|
|
989
997
|
[],
|
|
990
998
|
)
|
|
991
|
-
return n.concat(
|
|
999
|
+
return n.concat(h).sort(se)
|
|
992
1000
|
},
|
|
993
|
-
|
|
1001
|
+
de = (e, t) => {
|
|
994
1002
|
const s = e.length,
|
|
995
1003
|
n = t.length
|
|
996
1004
|
return s > n ? s : n
|
|
997
1005
|
},
|
|
998
|
-
|
|
999
|
-
const n =
|
|
1006
|
+
pe = (e, t, s) => {
|
|
1007
|
+
const n = tt(e, t, s)
|
|
1000
1008
|
return (
|
|
1001
1009
|
n.forEach((r) => {
|
|
1002
|
-
|
|
1010
|
+
me(r)
|
|
1003
1011
|
}),
|
|
1004
1012
|
n
|
|
1005
1013
|
)
|
|
1006
1014
|
},
|
|
1007
|
-
|
|
1008
|
-
;(
|
|
1015
|
+
me = (e) => {
|
|
1016
|
+
;(Se[e.type] || fe)(e)
|
|
1009
1017
|
},
|
|
1010
|
-
|
|
1011
|
-
|
|
1018
|
+
fe = (e) => {},
|
|
1019
|
+
be = (e) => {
|
|
1012
1020
|
const { source: t, target: s } = e
|
|
1013
1021
|
t.nodeValue = s.textContent
|
|
1014
1022
|
},
|
|
1015
|
-
|
|
1023
|
+
ve = (e) => {
|
|
1016
1024
|
const { source: t } = e
|
|
1017
1025
|
t.remove()
|
|
1018
1026
|
},
|
|
1019
|
-
|
|
1027
|
+
ge = (e) => {
|
|
1020
1028
|
const { target: t, data: s } = e,
|
|
1021
1029
|
{ parent: n, index: r } = s,
|
|
1022
1030
|
i = n.childNodes[r]
|
|
1023
1031
|
i ? i && i !== t && n.insertBefore(t, i) : n.appendChild(t)
|
|
1024
1032
|
},
|
|
1025
|
-
|
|
1033
|
+
ye = (e) => {
|
|
1026
1034
|
const { source: t, target: s } = e
|
|
1027
1035
|
t.replaceWith(s)
|
|
1028
1036
|
},
|
|
1029
|
-
|
|
1037
|
+
Ee = (e) => {
|
|
1030
1038
|
const { source: t, data: s } = e,
|
|
1031
1039
|
{ name: n, isSvg: r } = s
|
|
1032
1040
|
r ? t.removeAttributeNS(null, n) : t.removeAttribute(n)
|
|
1033
1041
|
},
|
|
1034
|
-
|
|
1042
|
+
et = (e) => {
|
|
1035
1043
|
const { source: t, data: s } = e,
|
|
1036
1044
|
{ name: n, value: r, isSvg: i } = s
|
|
1037
1045
|
i ? t.setAttributeNS(null, n, r) : t.setAttribute(n, r)
|
|
1038
1046
|
},
|
|
1039
|
-
Ee = (e) => {
|
|
1040
|
-
tt(e)
|
|
1041
|
-
},
|
|
1042
1047
|
Ae = (e) => {
|
|
1048
|
+
et(e)
|
|
1049
|
+
},
|
|
1050
|
+
xe = (e) => {
|
|
1043
1051
|
const t = e.data,
|
|
1044
1052
|
s = e.source,
|
|
1045
1053
|
{ name: n, value: r } = t
|
|
1046
1054
|
s.removeEventListener(n, r)
|
|
1047
1055
|
},
|
|
1048
|
-
|
|
1056
|
+
we = (e) => {
|
|
1049
1057
|
const t = e.data,
|
|
1050
1058
|
s = e.source,
|
|
1051
1059
|
{ name: n, value: r } = t
|
|
1052
1060
|
s.addEventListener(n, r)
|
|
1053
1061
|
},
|
|
1054
|
-
|
|
1062
|
+
Ne = (e) => {
|
|
1055
1063
|
const t = e.data,
|
|
1056
1064
|
s = e.source,
|
|
1057
1065
|
{ name: n, sourceValue: r, targetValue: i } = t
|
|
1058
1066
|
s.removeEventListener(n, r), s.addEventListener(n, i)
|
|
1059
1067
|
},
|
|
1060
|
-
|
|
1068
|
+
_e = (e) => {
|
|
1061
1069
|
const t = e.data,
|
|
1062
1070
|
s = e.source,
|
|
1063
1071
|
{ value: n } = t
|
|
1064
1072
|
s.value = n
|
|
1065
1073
|
},
|
|
1066
|
-
|
|
1067
|
-
[o.changeText]:
|
|
1068
|
-
[o.removeNode]:
|
|
1069
|
-
[o.insertNode]:
|
|
1070
|
-
[o.replaceNode]:
|
|
1071
|
-
[o.removeAttribute]:
|
|
1072
|
-
[o.addAttribute]:
|
|
1073
|
-
[o.updateAttribute]:
|
|
1074
|
-
[o.removeEvent]:
|
|
1075
|
-
[o.addEvent]:
|
|
1076
|
-
[o.updateEvent]:
|
|
1077
|
-
[o.changeValue]:
|
|
1074
|
+
Se = {
|
|
1075
|
+
[o.changeText]: be,
|
|
1076
|
+
[o.removeNode]: ve,
|
|
1077
|
+
[o.insertNode]: ge,
|
|
1078
|
+
[o.replaceNode]: ye,
|
|
1079
|
+
[o.removeAttribute]: Ee,
|
|
1080
|
+
[o.addAttribute]: et,
|
|
1081
|
+
[o.updateAttribute]: Ae,
|
|
1082
|
+
[o.removeEvent]: xe,
|
|
1083
|
+
[o.addEvent]: we,
|
|
1084
|
+
[o.updateEvent]: Ne,
|
|
1085
|
+
[o.changeValue]: _e,
|
|
1078
1086
|
},
|
|
1079
|
-
|
|
1087
|
+
Te = (e, t, s) => {
|
|
1080
1088
|
const n = [...t]
|
|
1081
1089
|
return (
|
|
1082
1090
|
e.forEach((r) => {
|
|
1083
|
-
|
|
1091
|
+
je(r, n, s)
|
|
1084
1092
|
}),
|
|
1085
1093
|
n
|
|
1086
1094
|
)
|
|
1087
1095
|
},
|
|
1088
|
-
|
|
1089
|
-
const n =
|
|
1096
|
+
je = (e, t, s) => {
|
|
1097
|
+
const n = $e[e.type]
|
|
1090
1098
|
n && n(e, t, s)
|
|
1091
1099
|
},
|
|
1092
|
-
|
|
1100
|
+
Oe = (e, t) => {
|
|
1093
1101
|
const { source: s } = e,
|
|
1094
1102
|
n = t.indexOf(s)
|
|
1095
1103
|
n >= 0 && t.splice(n, 1)
|
|
1096
1104
|
},
|
|
1097
|
-
|
|
1105
|
+
Me = (e, t, s) => {
|
|
1098
1106
|
const { target: n } = e,
|
|
1099
1107
|
r = e.data,
|
|
1100
1108
|
{ index: i, parent: a } = r
|
|
1101
1109
|
s === a && t.splice(i, 0, n)
|
|
1102
1110
|
},
|
|
1103
|
-
|
|
1111
|
+
ke = (e, t) => {
|
|
1104
1112
|
const { target: s, source: n } = e,
|
|
1105
1113
|
r = t.indexOf(n)
|
|
1106
1114
|
r >= 0 && (t[r] = s)
|
|
1107
1115
|
},
|
|
1108
|
-
|
|
1109
|
-
class
|
|
1116
|
+
$e = { [o.removeNode]: Oe, [o.insertNode]: Me, [o.replaceNode]: ke }
|
|
1117
|
+
class De {
|
|
1110
1118
|
constructor({
|
|
1111
1119
|
Template: t,
|
|
1112
1120
|
subscriptions: s,
|
|
@@ -1143,8 +1151,8 @@
|
|
|
1143
1151
|
this.parentElement = n
|
|
1144
1152
|
}
|
|
1145
1153
|
const t = this.generateDom(this.renderKit),
|
|
1146
|
-
s =
|
|
1147
|
-
this.dom =
|
|
1154
|
+
s = pe(this.dom, t, this.parentElement)
|
|
1155
|
+
this.dom = Te(s, this.dom, this.parentElement)
|
|
1148
1156
|
}
|
|
1149
1157
|
subscribeForRerender() {
|
|
1150
1158
|
const { subscribe: t } = this.renderKit
|
|
@@ -1156,36 +1164,19 @@
|
|
|
1156
1164
|
return `${N}:${t}`
|
|
1157
1165
|
}
|
|
1158
1166
|
}
|
|
1159
|
-
const
|
|
1160
|
-
|
|
1167
|
+
const Pe = (e) => e,
|
|
1168
|
+
st = ({ Template: e, viewModel: t, subscriptions: s }) => (
|
|
1161
1169
|
(s = s || []),
|
|
1162
|
-
(t = t ||
|
|
1170
|
+
(t = t || Pe),
|
|
1163
1171
|
(n) =>
|
|
1164
|
-
new
|
|
1165
|
-
),
|
|
1166
|
-
Pe = Object.freeze(
|
|
1167
|
-
Object.defineProperty(
|
|
1168
|
-
{
|
|
1169
|
-
__proto__: null,
|
|
1170
|
-
createRouteState: D,
|
|
1171
|
-
events: _t,
|
|
1172
|
-
extractQueryParams: F,
|
|
1173
|
-
findHref: P,
|
|
1174
|
-
navigate: y,
|
|
1175
|
-
onLinkClick: V,
|
|
1176
|
-
onLocationChange: L,
|
|
1177
|
-
start: St,
|
|
1178
|
-
},
|
|
1179
|
-
Symbol.toStringTag,
|
|
1180
|
-
{ value: 'Module' },
|
|
1181
|
-
),
|
|
1172
|
+
new De({ Template: e, viewModel: t, subscriptions: s, attributes: n })
|
|
1182
1173
|
),
|
|
1183
1174
|
Ve =
|
|
1184
1175
|
(e) =>
|
|
1185
1176
|
({ path: t }) =>
|
|
1186
1177
|
t === e,
|
|
1187
1178
|
Fe = () => !0,
|
|
1188
|
-
|
|
1179
|
+
nt =
|
|
1189
1180
|
(e) =>
|
|
1190
1181
|
({ route: t }) => {
|
|
1191
1182
|
const s = e.find((n) => n.match(t))
|
|
@@ -1193,28 +1184,45 @@
|
|
|
1193
1184
|
},
|
|
1194
1185
|
Le = Object.freeze(
|
|
1195
1186
|
Object.defineProperty(
|
|
1196
|
-
{ __proto__: null, buildRouter:
|
|
1187
|
+
{ __proto__: null, buildRouter: nt, catchAll: Fe, exactPathMatch: Ve },
|
|
1197
1188
|
Symbol.toStringTag,
|
|
1198
1189
|
{ value: 'Module' },
|
|
1199
1190
|
),
|
|
1200
1191
|
),
|
|
1201
1192
|
ze = () => ({ render: (e, t) => [] }),
|
|
1202
1193
|
Be = (e) => {
|
|
1203
|
-
const t =
|
|
1204
|
-
return
|
|
1194
|
+
const t = nt(e)
|
|
1195
|
+
return st({
|
|
1205
1196
|
Template: ({ route: n }) => (t({ route: n }) || ze)(),
|
|
1206
1197
|
subscriptions: ['route'],
|
|
1207
1198
|
})
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1199
|
+
},
|
|
1200
|
+
Ke = Object.freeze(
|
|
1201
|
+
Object.defineProperty(
|
|
1202
|
+
{
|
|
1203
|
+
__proto__: null,
|
|
1204
|
+
createRouteState: P,
|
|
1205
|
+
events: St,
|
|
1206
|
+
extractQueryParams: L,
|
|
1207
|
+
findHref: V,
|
|
1208
|
+
navigate: E,
|
|
1209
|
+
onLinkClick: F,
|
|
1210
|
+
onLocationChange: z,
|
|
1211
|
+
start: Tt,
|
|
1212
|
+
},
|
|
1213
|
+
Symbol.toStringTag,
|
|
1214
|
+
{ value: 'Module' },
|
|
1215
|
+
),
|
|
1216
|
+
)
|
|
1217
|
+
;(p.JaxsTypes = Jt),
|
|
1218
|
+
(p.appBuilding = jt),
|
|
1219
|
+
(p.bind = st),
|
|
1220
|
+
(p.createApp = qt),
|
|
1221
|
+
(p.jsx = M),
|
|
1222
|
+
(p.messageBus = $t),
|
|
1223
|
+
(p.navigation = Ke),
|
|
1216
1224
|
(p.routedView = Be),
|
|
1217
1225
|
(p.routing = Le),
|
|
1218
|
-
(p.state =
|
|
1226
|
+
(p.state = Ct),
|
|
1219
1227
|
Object.defineProperty(p, Symbol.toStringTag, { value: 'Module' })
|
|
1220
1228
|
})
|