jaxs 0.9.6 → 0.9.8
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 +2 -2
- package/dist/jaxs.js +174 -174
- package/dist/jaxs.umd.cjs +173 -173
- package/package.json +1 -1
package/dist/jaxs.js
CHANGED
|
@@ -7,12 +7,12 @@ const M = (e, t) => {
|
|
|
7
7
|
return e
|
|
8
8
|
},
|
|
9
9
|
$ = (e, t, s) => (e.splice(t, 0, s), e),
|
|
10
|
-
|
|
10
|
+
D = (e, t) => (e.includes(t) || e.push(t), e),
|
|
11
11
|
ze = {
|
|
12
12
|
remove: M,
|
|
13
13
|
removeBy: k,
|
|
14
14
|
insertAt: $,
|
|
15
|
-
appendIfUnique:
|
|
15
|
+
appendIfUnique: D,
|
|
16
16
|
push: (e, t) => e.push(t),
|
|
17
17
|
// mutates
|
|
18
18
|
pop: (e) => e.pop(),
|
|
@@ -64,8 +64,43 @@ const f = (e) => new ht(e),
|
|
|
64
64
|
reset: (e) => f(e).reset(),
|
|
65
65
|
isTrue: (e) => f(e).isTrue(),
|
|
66
66
|
isFalse: (e) => f(e).isFalse(),
|
|
67
|
+
},
|
|
68
|
+
dt = (e) => typeof e == 'boolean',
|
|
69
|
+
pt = (e) => typeof e == 'number',
|
|
70
|
+
P = (e) => typeof e == 'string',
|
|
71
|
+
v = (e) => Array.isArray(e),
|
|
72
|
+
E = (e) => e !== null && !v(e) && typeof e == 'object',
|
|
73
|
+
Re = {
|
|
74
|
+
boolean: dt,
|
|
75
|
+
number: pt,
|
|
76
|
+
string: P,
|
|
77
|
+
array: v,
|
|
78
|
+
object: E,
|
|
79
|
+
},
|
|
80
|
+
mt = (e, t) => e === t,
|
|
81
|
+
ft = (e, t) => Object.keys(e).length === Object.keys(t).length,
|
|
82
|
+
B = (e, t) =>
|
|
83
|
+
!(E(e) && E(t)) || !ft(e, t)
|
|
84
|
+
? !1
|
|
85
|
+
: Object.keys(e).every((s) => {
|
|
86
|
+
const r = e[s],
|
|
87
|
+
n = t[s]
|
|
88
|
+
return g(r, n)
|
|
89
|
+
}),
|
|
90
|
+
F = (e, t) =>
|
|
91
|
+
!(v(e) && v(t)) || e.length !== t.length
|
|
92
|
+
? !1
|
|
93
|
+
: e.every((s, r) => {
|
|
94
|
+
const n = t[r]
|
|
95
|
+
return g(s, n)
|
|
96
|
+
}),
|
|
97
|
+
g = (e, t) => (E(e) ? B(e, t) : v(e) ? F(e, t) : mt(e, t)),
|
|
98
|
+
Ue = {
|
|
99
|
+
objects: B,
|
|
100
|
+
arrays: F,
|
|
101
|
+
equal: g,
|
|
67
102
|
}
|
|
68
|
-
class
|
|
103
|
+
class bt {
|
|
69
104
|
constructor(t) {
|
|
70
105
|
this.store = t
|
|
71
106
|
}
|
|
@@ -117,19 +152,19 @@ class dt {
|
|
|
117
152
|
}
|
|
118
153
|
appendIfUnique(t) {
|
|
119
154
|
const s = this.value
|
|
120
|
-
|
|
155
|
+
D(s, t), this.update(s)
|
|
121
156
|
}
|
|
122
|
-
|
|
157
|
+
find(t) {
|
|
123
158
|
return this.value.find(t)
|
|
124
159
|
}
|
|
125
160
|
replace(t, s) {
|
|
126
161
|
const r = this.value,
|
|
127
|
-
n = r.
|
|
162
|
+
n = r.findIndex((i) => g(i, t))
|
|
128
163
|
n !== -1 && ((r[n] = s), this.update(r))
|
|
129
164
|
}
|
|
130
165
|
}
|
|
131
|
-
const m = (e) => new
|
|
132
|
-
|
|
166
|
+
const m = (e) => new bt(e),
|
|
167
|
+
Ie = {
|
|
133
168
|
push: (e, t) => m(e).push(t),
|
|
134
169
|
pop: (e) => m(e).pop(),
|
|
135
170
|
unshift: (e, t) => m(e).unshift(t),
|
|
@@ -141,10 +176,10 @@ const m = (e) => new dt(e),
|
|
|
141
176
|
reset: (e) => m(e).reset(),
|
|
142
177
|
includes: (e, t) => m(e).includes(t),
|
|
143
178
|
appendIfUnique: (e, t) => m(e).appendIfUnique(t),
|
|
144
|
-
|
|
179
|
+
find: (e, t) => m(e).find(t),
|
|
145
180
|
replace: (e, t, s) => m(e).replace(t, s),
|
|
146
181
|
}
|
|
147
|
-
class
|
|
182
|
+
class vt {
|
|
148
183
|
constructor(t) {
|
|
149
184
|
this.store = t
|
|
150
185
|
}
|
|
@@ -183,28 +218,16 @@ class pt {
|
|
|
183
218
|
return !!this.value[t]
|
|
184
219
|
}
|
|
185
220
|
}
|
|
186
|
-
const b = (e) => new
|
|
187
|
-
|
|
221
|
+
const b = (e) => new vt(e),
|
|
222
|
+
qe = {
|
|
188
223
|
reset: (e) => b(e).reset(),
|
|
189
224
|
resetAttribute: (e, t) => b(e).resetAttribute(t),
|
|
190
225
|
updateAttribute: (e, t, s) => b(e).updateAttribute(t, s),
|
|
191
226
|
updateAttributes: (e, t) => b(e).updateAttributes(t),
|
|
192
227
|
attributeTruthy: (e, t) => b(e).attributeTruthy(t),
|
|
193
228
|
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
D = (e) => typeof e == 'string',
|
|
197
|
-
v = (e) => Array.isArray(e),
|
|
198
|
-
g = (e) => e !== null && !v(e) && typeof e == 'object',
|
|
199
|
-
qe = {
|
|
200
|
-
boolean: mt,
|
|
201
|
-
number: ft,
|
|
202
|
-
string: D,
|
|
203
|
-
array: v,
|
|
204
|
-
object: g,
|
|
205
|
-
},
|
|
206
|
-
bt = (e, t) => t.createElement(e),
|
|
207
|
-
vt = (e, t) => {
|
|
229
|
+
yt = (e, t) => t.createElement(e),
|
|
230
|
+
gt = (e, t) => {
|
|
208
231
|
for (const s in t) {
|
|
209
232
|
if (s === '__self') continue
|
|
210
233
|
const r = t[s].toString()
|
|
@@ -212,10 +235,10 @@ const b = (e) => new pt(e),
|
|
|
212
235
|
const n = e
|
|
213
236
|
n.value !== r && (n.value = r)
|
|
214
237
|
} else
|
|
215
|
-
|
|
238
|
+
P(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
|
|
216
239
|
}
|
|
217
240
|
},
|
|
218
|
-
|
|
241
|
+
Et = (e, t, s) => {
|
|
219
242
|
const r = {}
|
|
220
243
|
for (const n in t) {
|
|
221
244
|
const i = t[n],
|
|
@@ -229,12 +252,12 @@ const b = (e) => new pt(e),
|
|
|
229
252
|
}
|
|
230
253
|
e.eventMaps = r
|
|
231
254
|
},
|
|
232
|
-
|
|
233
|
-
const n =
|
|
234
|
-
return
|
|
255
|
+
At = (e, t, s, r) => {
|
|
256
|
+
const n = yt(e, r.document)
|
|
257
|
+
return gt(n, t), Et(n, s, r.publish), n
|
|
235
258
|
},
|
|
236
259
|
w = 'http://www.w3.org/2000/svg',
|
|
237
|
-
|
|
260
|
+
xt = {
|
|
238
261
|
animate: !0,
|
|
239
262
|
animateMotion: !0,
|
|
240
263
|
animateTransform: !0,
|
|
@@ -298,8 +321,8 @@ const b = (e) => new pt(e),
|
|
|
298
321
|
use: !0,
|
|
299
322
|
view: !0,
|
|
300
323
|
},
|
|
301
|
-
|
|
302
|
-
|
|
324
|
+
wt = (e, t) => !!(xt[e] || (e === 'a' && t === w)),
|
|
325
|
+
Nt = (e, t, s) => {
|
|
303
326
|
const r = s.createElementNS(w, e)
|
|
304
327
|
for (const n in t)
|
|
305
328
|
n === '__self' ||
|
|
@@ -307,24 +330,24 @@ const b = (e) => new pt(e),
|
|
|
307
330
|
r.setAttributeNS(null, n, t[n].toString())
|
|
308
331
|
return r
|
|
309
332
|
},
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
class
|
|
333
|
+
_t = (e) => e.namespaceURI === w,
|
|
334
|
+
St = (e, t) => t.createTextNode(e)
|
|
335
|
+
class Tt {
|
|
313
336
|
constructor(t) {
|
|
314
337
|
this.value = t.toString()
|
|
315
338
|
}
|
|
316
339
|
render(t) {
|
|
317
|
-
const s =
|
|
340
|
+
const s = St(this.value, t.document)
|
|
318
341
|
return (s.__jsx = 'TextNode'), [s]
|
|
319
342
|
}
|
|
320
343
|
}
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
344
|
+
const jt = (e) => typeof e == 'string' || typeof e == 'number',
|
|
345
|
+
Ot = (e) => new Tt(e),
|
|
346
|
+
Mt = (e) => (jt(e) ? Ot(e) : e),
|
|
347
|
+
V = (e) => kt(e).map(Mt).flat(),
|
|
348
|
+
kt = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
|
|
349
|
+
L = (e, t = {}) => V(e || t.children || []),
|
|
350
|
+
$t = (e, t = '') => {
|
|
328
351
|
const s = {},
|
|
329
352
|
r = {}
|
|
330
353
|
for (const n in e) {
|
|
@@ -334,7 +357,7 @@ const St = (e) => typeof e == 'string' || typeof e == 'number',
|
|
|
334
357
|
r[o] = i ? i.toString() : ''
|
|
335
358
|
} else {
|
|
336
359
|
if (i === !1) continue
|
|
337
|
-
n === '__source' ? (s.__source = e.__source) : (s[n] =
|
|
360
|
+
n === '__source' ? (s.__source = e.__source) : (s[n] = Dt(n, i, t))
|
|
338
361
|
}
|
|
339
362
|
}
|
|
340
363
|
return {
|
|
@@ -342,22 +365,22 @@ const St = (e) => typeof e == 'string' || typeof e == 'number',
|
|
|
342
365
|
events: r,
|
|
343
366
|
}
|
|
344
367
|
},
|
|
345
|
-
|
|
346
|
-
|
|
368
|
+
Dt = (e, t, s = '') => (t == null ? s : t.toString()),
|
|
369
|
+
Pt = (e, t) => {
|
|
347
370
|
const s = e || {},
|
|
348
|
-
r =
|
|
371
|
+
r = L(t, s)
|
|
349
372
|
return (s.children = s.children || r), s
|
|
350
373
|
},
|
|
351
|
-
|
|
374
|
+
z = (e, t, s, r = []) => e.reduce(Bt(t, s), r).flat(),
|
|
352
375
|
Bt = (e, t) => (s, r) =>
|
|
353
376
|
r
|
|
354
377
|
? Array.isArray(r)
|
|
355
|
-
?
|
|
378
|
+
? z(r, e, t, s)
|
|
356
379
|
: (r.render(e, t).forEach((n) => s.push(n)), s)
|
|
357
380
|
: s
|
|
358
|
-
class
|
|
381
|
+
class K {
|
|
359
382
|
constructor(t) {
|
|
360
|
-
this.collection =
|
|
383
|
+
this.collection = V(t)
|
|
361
384
|
}
|
|
362
385
|
render(t, s) {
|
|
363
386
|
this.parentElement = s
|
|
@@ -365,7 +388,7 @@ class L {
|
|
|
365
388
|
return this.attachToParent(r), r
|
|
366
389
|
}
|
|
367
390
|
generateDom(t) {
|
|
368
|
-
return
|
|
391
|
+
return z(this.collection, t, this.parentElement)
|
|
369
392
|
}
|
|
370
393
|
attachToParent(t) {
|
|
371
394
|
if (this.parentElement === void 0) return
|
|
@@ -373,7 +396,7 @@ class L {
|
|
|
373
396
|
t.forEach((r) => s.appendChild(r))
|
|
374
397
|
}
|
|
375
398
|
}
|
|
376
|
-
class
|
|
399
|
+
class Ft {
|
|
377
400
|
constructor(t, s) {
|
|
378
401
|
;(this.type = t), (this.attributes = s)
|
|
379
402
|
}
|
|
@@ -399,14 +422,14 @@ class Dt {
|
|
|
399
422
|
return `${this.type}${t}${s}${r}`
|
|
400
423
|
}
|
|
401
424
|
}
|
|
402
|
-
class
|
|
425
|
+
class Vt {
|
|
403
426
|
constructor(t, s, r = []) {
|
|
404
427
|
this.type = t
|
|
405
|
-
const { events: n, attributes: i } =
|
|
428
|
+
const { events: n, attributes: i } = $t(s)
|
|
406
429
|
;(this.events = n),
|
|
407
430
|
(this.attributes = i),
|
|
408
|
-
(this.isSvg =
|
|
409
|
-
(this.children = new
|
|
431
|
+
(this.isSvg = wt(this.type, this.attributes.xmlns)),
|
|
432
|
+
(this.children = new K(r))
|
|
410
433
|
}
|
|
411
434
|
render(t) {
|
|
412
435
|
const s = this.generateDom(t)
|
|
@@ -416,24 +439,24 @@ class Pt {
|
|
|
416
439
|
return this.isSvg ? this.generateSvgDom(t) : this.generateHtmlDom(t)
|
|
417
440
|
}
|
|
418
441
|
generateHtmlDom(t) {
|
|
419
|
-
const s =
|
|
442
|
+
const s = At(this.type, this.attributes, this.events, t)
|
|
420
443
|
return (s.__jsx = this.jsxKey()), s
|
|
421
444
|
}
|
|
422
445
|
generateSvgDom(t) {
|
|
423
|
-
const s =
|
|
446
|
+
const s = Nt(this.type, this.attributes, t.document)
|
|
424
447
|
return (s.__jsx = this.jsxKey()), s
|
|
425
448
|
}
|
|
426
449
|
jsxKey() {
|
|
427
|
-
return new
|
|
450
|
+
return new Ft(this.type, this.attributes).generate()
|
|
428
451
|
}
|
|
429
452
|
}
|
|
430
|
-
const
|
|
431
|
-
typeof e == 'string' ? new
|
|
432
|
-
|
|
433
|
-
const s =
|
|
434
|
-
return new
|
|
453
|
+
const Lt = (e, t, ...s) =>
|
|
454
|
+
typeof e == 'string' ? new Vt(e, t, s) : e(Pt(t, s))
|
|
455
|
+
Lt.fragment = (e, t) => {
|
|
456
|
+
const s = L(t, e)
|
|
457
|
+
return new K(s)
|
|
435
458
|
}
|
|
436
|
-
class
|
|
459
|
+
class zt {
|
|
437
460
|
constructor(t, s, r) {
|
|
438
461
|
;(this.template = t),
|
|
439
462
|
(this.selector = s),
|
|
@@ -458,49 +481,49 @@ class Vt {
|
|
|
458
481
|
return this.renderKit.document.querySelector(this.selector)
|
|
459
482
|
}
|
|
460
483
|
}
|
|
461
|
-
const
|
|
462
|
-
const r = new
|
|
484
|
+
const Kt = (e, t, s) => {
|
|
485
|
+
const r = new zt(e, t, s)
|
|
463
486
|
return r.renderAndAttach(s), r
|
|
464
487
|
},
|
|
465
|
-
|
|
466
|
-
|
|
488
|
+
R = 'go-to-href',
|
|
489
|
+
U = 'go-to',
|
|
467
490
|
y = 'navigation:location-change',
|
|
468
|
-
|
|
469
|
-
|
|
491
|
+
I = 'navigation:route-change',
|
|
492
|
+
Rt = /* @__PURE__ */ Object.freeze(
|
|
470
493
|
/* @__PURE__ */ Object.defineProperty(
|
|
471
494
|
{
|
|
472
495
|
__proto__: null,
|
|
473
|
-
linkNavigationEvent:
|
|
496
|
+
linkNavigationEvent: R,
|
|
474
497
|
locationChangeEvent: y,
|
|
475
|
-
navigationEvent:
|
|
476
|
-
routeChangeEvent:
|
|
498
|
+
navigationEvent: U,
|
|
499
|
+
routeChangeEvent: I,
|
|
477
500
|
},
|
|
478
501
|
Symbol.toStringTag,
|
|
479
502
|
{ value: 'Module' },
|
|
480
503
|
),
|
|
481
504
|
),
|
|
482
|
-
|
|
505
|
+
q = (e) => {
|
|
483
506
|
e.create('route', {
|
|
484
507
|
host: '',
|
|
485
508
|
path: '',
|
|
486
509
|
query: {},
|
|
487
510
|
})
|
|
488
511
|
},
|
|
489
|
-
|
|
512
|
+
J = (e) => {
|
|
490
513
|
const t = e.closest('[href]')
|
|
491
514
|
return (t && t.getAttribute('href')) || ''
|
|
492
515
|
},
|
|
493
516
|
N = ({ payload: e, publish: t, window: s }) => {
|
|
494
517
|
s.history.pushState(null, '', e), t(y, null)
|
|
495
518
|
},
|
|
496
|
-
|
|
519
|
+
H = (e) => {
|
|
497
520
|
const t = e.payload
|
|
498
521
|
if (!t || !t.target) return
|
|
499
522
|
t.preventDefault()
|
|
500
|
-
const s =
|
|
523
|
+
const s = J(t.target)
|
|
501
524
|
N({ ...e, payload: s })
|
|
502
525
|
},
|
|
503
|
-
|
|
526
|
+
G = (e) =>
|
|
504
527
|
e
|
|
505
528
|
.replace(/^\?/, '')
|
|
506
529
|
.split('&')
|
|
@@ -509,49 +532,49 @@ const Lt = (e, t, s) => {
|
|
|
509
532
|
const r = s.split('=')
|
|
510
533
|
return (t[r[0]] = r[1]), t
|
|
511
534
|
}, {}),
|
|
512
|
-
|
|
535
|
+
W = (e) => {
|
|
513
536
|
const { state: t, publish: s, window: r } = e,
|
|
514
537
|
{ host: n, pathname: i, search: o } = r.location,
|
|
515
538
|
a = i,
|
|
516
|
-
u =
|
|
539
|
+
u = G(o),
|
|
517
540
|
h = {
|
|
518
541
|
host: n,
|
|
519
542
|
path: a,
|
|
520
543
|
query: u,
|
|
521
544
|
}
|
|
522
|
-
t.store('route').update(h), s(
|
|
545
|
+
t.store('route').update(h), s(I, h)
|
|
523
546
|
},
|
|
524
|
-
|
|
547
|
+
C = (e) => {
|
|
525
548
|
const { subscribe: t } = e
|
|
526
|
-
t(
|
|
527
|
-
t(
|
|
549
|
+
t(R, H),
|
|
550
|
+
t(U, (s) => {
|
|
528
551
|
N(s)
|
|
529
552
|
})
|
|
530
553
|
},
|
|
531
|
-
|
|
554
|
+
Q = (e) => {
|
|
532
555
|
const { publish: t, subscribe: s, state: r, window: n } = e
|
|
533
|
-
|
|
556
|
+
q(r), n.addEventListener('popstate', () => t(y, null)), s(y, W)
|
|
534
557
|
},
|
|
535
|
-
|
|
558
|
+
X = (e) => {
|
|
536
559
|
setTimeout(() => e.publish(y, null), 0)
|
|
537
560
|
},
|
|
538
|
-
|
|
539
|
-
|
|
561
|
+
Y = (e) => {
|
|
562
|
+
Q(e), C(e), X(e)
|
|
540
563
|
},
|
|
541
|
-
|
|
564
|
+
Ut = /* @__PURE__ */ Object.freeze(
|
|
542
565
|
/* @__PURE__ */ Object.defineProperty(
|
|
543
566
|
{
|
|
544
567
|
__proto__: null,
|
|
545
|
-
publishLocation:
|
|
546
|
-
startNavigation:
|
|
547
|
-
subscribeToHistoryChange:
|
|
548
|
-
subscribeToNavigation:
|
|
568
|
+
publishLocation: X,
|
|
569
|
+
startNavigation: Y,
|
|
570
|
+
subscribeToHistoryChange: Q,
|
|
571
|
+
subscribeToNavigation: C,
|
|
549
572
|
},
|
|
550
573
|
Symbol.toStringTag,
|
|
551
574
|
{ value: 'Module' },
|
|
552
575
|
),
|
|
553
576
|
)
|
|
554
|
-
class
|
|
577
|
+
class Z {
|
|
555
578
|
constructor({
|
|
556
579
|
window: t,
|
|
557
580
|
document: s,
|
|
@@ -571,24 +594,24 @@ class X {
|
|
|
571
594
|
(this.roots = [])
|
|
572
595
|
}
|
|
573
596
|
render(t, s) {
|
|
574
|
-
const r =
|
|
597
|
+
const r = Kt(t, s, this.renderKit)
|
|
575
598
|
return this.roots.push(r), r
|
|
576
599
|
}
|
|
577
600
|
startNavigation() {
|
|
578
|
-
|
|
601
|
+
Y(this)
|
|
579
602
|
}
|
|
580
603
|
}
|
|
581
|
-
const
|
|
604
|
+
const Je = /* @__PURE__ */ Object.freeze(
|
|
582
605
|
/* @__PURE__ */ Object.defineProperty(
|
|
583
606
|
{
|
|
584
607
|
__proto__: null,
|
|
585
|
-
App:
|
|
608
|
+
App: Z,
|
|
586
609
|
},
|
|
587
610
|
Symbol.toStringTag,
|
|
588
611
|
{ value: 'Module' },
|
|
589
612
|
),
|
|
590
613
|
)
|
|
591
|
-
class
|
|
614
|
+
class tt {
|
|
592
615
|
constructor() {
|
|
593
616
|
this.lookup = {}
|
|
594
617
|
}
|
|
@@ -615,7 +638,7 @@ class Y {
|
|
|
615
638
|
this.lookup[t] || (this.lookup[t] = [])
|
|
616
639
|
}
|
|
617
640
|
}
|
|
618
|
-
class
|
|
641
|
+
class et {
|
|
619
642
|
constructor() {
|
|
620
643
|
this.lookup = []
|
|
621
644
|
}
|
|
@@ -671,7 +694,7 @@ class _ {
|
|
|
671
694
|
((this.callCount += 1), this.publish(this.event, this.payload))
|
|
672
695
|
}
|
|
673
696
|
}
|
|
674
|
-
const
|
|
697
|
+
const It = (e) => (t, s) => {
|
|
675
698
|
const { offset: r, period: n, payload: i } = s,
|
|
676
699
|
o = ({ callCount: u }) => (r && u == 0 ? r : n),
|
|
677
700
|
a = new _({
|
|
@@ -682,10 +705,10 @@ const Rt = (e) => (t, s) => {
|
|
|
682
705
|
})
|
|
683
706
|
return a.start(), a.stop
|
|
684
707
|
},
|
|
685
|
-
|
|
708
|
+
qt =
|
|
686
709
|
(e) =>
|
|
687
710
|
(t, { timeout: s, payload: r }) => {
|
|
688
|
-
const n = ({ callCount: o, stop: a }) => (o
|
|
711
|
+
const n = ({ callCount: o, stop: a }) => (o >= 1 && a(), s),
|
|
689
712
|
i = new _({
|
|
690
713
|
publish: e,
|
|
691
714
|
event: t,
|
|
@@ -694,7 +717,7 @@ const Rt = (e) => (t, s) => {
|
|
|
694
717
|
})
|
|
695
718
|
return i.start(), i.stop
|
|
696
719
|
},
|
|
697
|
-
|
|
720
|
+
Jt = (e) => (t, s) => {
|
|
698
721
|
const r = {
|
|
699
722
|
...s,
|
|
700
723
|
event: t,
|
|
@@ -703,10 +726,10 @@ const Rt = (e) => (t, s) => {
|
|
|
703
726
|
n = new _(r)
|
|
704
727
|
return n.start(), n.stop
|
|
705
728
|
}
|
|
706
|
-
class
|
|
729
|
+
class st {
|
|
707
730
|
constructor() {
|
|
708
|
-
;(this.exactSubscriptions = new
|
|
709
|
-
(this.fuzzySubscriptions = new
|
|
731
|
+
;(this.exactSubscriptions = new tt()),
|
|
732
|
+
(this.fuzzySubscriptions = new et()),
|
|
710
733
|
(this.currentIndex = 0)
|
|
711
734
|
}
|
|
712
735
|
subscribe(t, s) {
|
|
@@ -736,66 +759,43 @@ class tt {
|
|
|
736
759
|
return {
|
|
737
760
|
eventName: t,
|
|
738
761
|
...this.options,
|
|
739
|
-
publish:
|
|
762
|
+
publish: rt(this.publish.bind(this)),
|
|
740
763
|
payload: s,
|
|
741
764
|
}
|
|
742
765
|
}
|
|
743
766
|
}
|
|
744
|
-
const
|
|
767
|
+
const rt = (e) => {
|
|
745
768
|
const t = e
|
|
746
769
|
return (
|
|
747
|
-
(t.withTimeout =
|
|
748
|
-
(t.periodically =
|
|
749
|
-
(t.periodicallyWithCustomTimer =
|
|
770
|
+
(t.withTimeout = qt(e)),
|
|
771
|
+
(t.periodically = It(e)),
|
|
772
|
+
(t.periodicallyWithCustomTimer = Jt(e)),
|
|
750
773
|
t
|
|
751
774
|
)
|
|
752
775
|
},
|
|
753
|
-
|
|
754
|
-
const e = new
|
|
776
|
+
nt = () => {
|
|
777
|
+
const e = new st(),
|
|
755
778
|
t = (r, n) => e.publish(r, n),
|
|
756
779
|
s = (r, n) => e.subscribe(r, n)
|
|
757
780
|
return {
|
|
758
781
|
bus: e,
|
|
759
|
-
publish:
|
|
782
|
+
publish: rt(t),
|
|
760
783
|
subscribe: s,
|
|
761
784
|
}
|
|
762
785
|
},
|
|
763
|
-
|
|
786
|
+
He = /* @__PURE__ */ Object.freeze(
|
|
764
787
|
/* @__PURE__ */ Object.defineProperty(
|
|
765
788
|
{
|
|
766
789
|
__proto__: null,
|
|
767
|
-
ExactSubscriptions:
|
|
768
|
-
FuzzySubscriptions:
|
|
769
|
-
JaxsBus:
|
|
770
|
-
createBus:
|
|
790
|
+
ExactSubscriptions: tt,
|
|
791
|
+
FuzzySubscriptions: et,
|
|
792
|
+
JaxsBus: st,
|
|
793
|
+
createBus: nt,
|
|
771
794
|
},
|
|
772
795
|
Symbol.toStringTag,
|
|
773
796
|
{ value: 'Module' },
|
|
774
797
|
),
|
|
775
|
-
)
|
|
776
|
-
It = (e, t) => e === t,
|
|
777
|
-
Jt = (e, t) => Object.keys(e).length === Object.keys(t).length,
|
|
778
|
-
rt = (e, t) =>
|
|
779
|
-
!(g(e) && g(t)) || !Jt(e, t)
|
|
780
|
-
? !1
|
|
781
|
-
: Object.keys(e).every((s) => {
|
|
782
|
-
const r = e[s],
|
|
783
|
-
n = t[s]
|
|
784
|
-
return E(r, n)
|
|
785
|
-
}),
|
|
786
|
-
nt = (e, t) =>
|
|
787
|
-
!(v(e) && v(t)) || e.length !== t.length
|
|
788
|
-
? !1
|
|
789
|
-
: e.every((s, r) => {
|
|
790
|
-
const n = t[r]
|
|
791
|
-
return E(s, n)
|
|
792
|
-
}),
|
|
793
|
-
E = (e, t) => (g(e) ? rt(e, t) : v(e) ? nt(e, t) : It(e, t)),
|
|
794
|
-
He = {
|
|
795
|
-
objects: rt,
|
|
796
|
-
arrays: nt,
|
|
797
|
-
equal: E,
|
|
798
|
-
}
|
|
798
|
+
)
|
|
799
799
|
class x {
|
|
800
800
|
constructor(t) {
|
|
801
801
|
;(this.name = t.name),
|
|
@@ -819,7 +819,7 @@ class x {
|
|
|
819
819
|
} else this.updateValue(t)
|
|
820
820
|
}
|
|
821
821
|
updateValue(t) {
|
|
822
|
-
|
|
822
|
+
g(this._value, t) || ((this._value = t), this.parent.notify(this.name))
|
|
823
823
|
}
|
|
824
824
|
getUpdatedValue(t) {
|
|
825
825
|
return t(this.value)
|
|
@@ -910,7 +910,7 @@ class Ht {
|
|
|
910
910
|
this.setupState(),
|
|
911
911
|
this.addBusOptions(),
|
|
912
912
|
this.setRenderKit(),
|
|
913
|
-
new
|
|
913
|
+
new Z({
|
|
914
914
|
window: this.window,
|
|
915
915
|
document: this.document,
|
|
916
916
|
publish: this.publish,
|
|
@@ -929,7 +929,7 @@ class Ht {
|
|
|
929
929
|
: ((this.window = window), (this.document = document))
|
|
930
930
|
}
|
|
931
931
|
setupBus() {
|
|
932
|
-
const { publish: t, subscribe: s, bus: r } =
|
|
932
|
+
const { publish: t, subscribe: s, bus: r } = nt()
|
|
933
933
|
;(this.publish = t), (this.subscribe = s), (this.bus = r)
|
|
934
934
|
}
|
|
935
935
|
setupState() {
|
|
@@ -1198,7 +1198,7 @@ const O = (e) => {
|
|
|
1198
1198
|
le = (e, t) => (e.textContent !== t.textContent ? [Gt(e, t)] : []),
|
|
1199
1199
|
he = (e, t, s) => {
|
|
1200
1200
|
let r = []
|
|
1201
|
-
if (e.nodeType === 1 &&
|
|
1201
|
+
if (e.nodeType === 1 && _t(e)) {
|
|
1202
1202
|
const n = e,
|
|
1203
1203
|
i = t,
|
|
1204
1204
|
o = ce(n, i),
|
|
@@ -1374,7 +1374,7 @@ const O = (e) => {
|
|
|
1374
1374
|
[c.insertNode]: Me,
|
|
1375
1375
|
[c.replaceNode]: ke,
|
|
1376
1376
|
}
|
|
1377
|
-
class
|
|
1377
|
+
class De {
|
|
1378
1378
|
constructor({ Template: t, subscriptions: s, attributes: r, viewModel: n }) {
|
|
1379
1379
|
;(this.Template = t),
|
|
1380
1380
|
(this.viewModel = n),
|
|
@@ -1419,12 +1419,12 @@ class Be {
|
|
|
1419
1419
|
return `${S}:${t}`
|
|
1420
1420
|
}
|
|
1421
1421
|
}
|
|
1422
|
-
const
|
|
1423
|
-
|
|
1422
|
+
const Pe = (e) => e,
|
|
1423
|
+
Be = ({ Template: e, viewModel: t, subscriptions: s }) => (
|
|
1424
1424
|
(s = s || []),
|
|
1425
|
-
(t = t ||
|
|
1425
|
+
(t = t || Pe),
|
|
1426
1426
|
(r) =>
|
|
1427
|
-
new
|
|
1427
|
+
new De({ Template: e, viewModel: t, subscriptions: s, attributes: r })
|
|
1428
1428
|
),
|
|
1429
1429
|
Fe =
|
|
1430
1430
|
(e) =>
|
|
@@ -1454,7 +1454,7 @@ const De = (e) => e,
|
|
|
1454
1454
|
}),
|
|
1455
1455
|
Xe = (e) => {
|
|
1456
1456
|
const t = lt(e)
|
|
1457
|
-
return
|
|
1457
|
+
return Be({
|
|
1458
1458
|
Template: ({ route: r }) => (t({ route: r }) || Le)(),
|
|
1459
1459
|
subscriptions: ['route'],
|
|
1460
1460
|
})
|
|
@@ -1463,14 +1463,14 @@ const De = (e) => e,
|
|
|
1463
1463
|
/* @__PURE__ */ Object.defineProperty(
|
|
1464
1464
|
{
|
|
1465
1465
|
__proto__: null,
|
|
1466
|
-
createRouteState:
|
|
1467
|
-
events:
|
|
1468
|
-
extractQueryParams:
|
|
1469
|
-
findHref:
|
|
1466
|
+
createRouteState: q,
|
|
1467
|
+
events: Rt,
|
|
1468
|
+
extractQueryParams: G,
|
|
1469
|
+
findHref: J,
|
|
1470
1470
|
navigate: N,
|
|
1471
|
-
onLinkClick:
|
|
1472
|
-
onLocationChange:
|
|
1473
|
-
start:
|
|
1471
|
+
onLinkClick: H,
|
|
1472
|
+
onLocationChange: W,
|
|
1473
|
+
start: Ut,
|
|
1474
1474
|
},
|
|
1475
1475
|
Symbol.toStringTag,
|
|
1476
1476
|
{ value: 'Module' },
|
|
@@ -1479,16 +1479,16 @@ const De = (e) => e,
|
|
|
1479
1479
|
export {
|
|
1480
1480
|
ze as ArrayModifiers,
|
|
1481
1481
|
Ke as BooleanStore,
|
|
1482
|
-
|
|
1483
|
-
|
|
1482
|
+
Ue as Equality,
|
|
1483
|
+
Re as Is,
|
|
1484
1484
|
Ce as JaxsTypes,
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1485
|
+
Ie as ListStore,
|
|
1486
|
+
qe as RecordStore,
|
|
1487
|
+
Je as appBuilding,
|
|
1488
|
+
Be as bind,
|
|
1489
1489
|
We as createApp,
|
|
1490
|
-
|
|
1491
|
-
|
|
1490
|
+
Lt as jsx,
|
|
1491
|
+
He as messageBus,
|
|
1492
1492
|
Ye as navigation,
|
|
1493
1493
|
Xe as routedView,
|
|
1494
1494
|
Qe as routing,
|