jaxs 0.8.0 → 0.9.1
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 +153 -90
- package/dist/jaxs.js +460 -371
- package/dist/jaxs.umd.cjs +624 -551
- package/package.json +1 -1
package/dist/jaxs.js
CHANGED
|
@@ -1,8 +1,182 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
const O = (e, t) => e.reduce((s, r) => (r !== t && s.push(r), s), []),
|
|
2
|
+
M = (e, t) => e.reduce((s, r) => (t(r) || s.push(r), s), []),
|
|
3
|
+
k = (e, t, s) => (e.splice(t, 0, s), e),
|
|
4
|
+
$ = (e, t) => (e.includes(t) || e.push(t), e),
|
|
5
|
+
Ve = {
|
|
6
|
+
remove: O,
|
|
7
|
+
removeBy: M,
|
|
8
|
+
insertAt: k,
|
|
9
|
+
appendIfUnique: $,
|
|
10
|
+
}
|
|
11
|
+
class ct {
|
|
12
|
+
constructor(t) {
|
|
13
|
+
this.store = t
|
|
14
|
+
}
|
|
15
|
+
update(t) {
|
|
16
|
+
this.store.update(t)
|
|
17
|
+
}
|
|
18
|
+
get value() {
|
|
19
|
+
return this.store.value
|
|
20
|
+
}
|
|
21
|
+
reset() {
|
|
22
|
+
this.store.update(this.store.initialValue)
|
|
23
|
+
}
|
|
24
|
+
toggle() {
|
|
25
|
+
const t = !this.value
|
|
26
|
+
this.update(t)
|
|
27
|
+
}
|
|
28
|
+
setTrue() {
|
|
29
|
+
this.update(!0)
|
|
30
|
+
}
|
|
31
|
+
setFalse() {
|
|
32
|
+
this.update(!1)
|
|
33
|
+
}
|
|
34
|
+
isTrue() {
|
|
35
|
+
return this.value === !0
|
|
36
|
+
}
|
|
37
|
+
isFalse() {
|
|
38
|
+
return this.value === !1
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const f = (e) => new ct(e),
|
|
42
|
+
Le = {
|
|
43
|
+
toggle: (e) => f(e).toggle(),
|
|
44
|
+
setTrue: (e) => f(e).setTrue(),
|
|
45
|
+
setFalse: (e) => f(e).setFalse(),
|
|
46
|
+
reset: (e) => f(e).reset(),
|
|
47
|
+
isTrue: (e) => f(e).isTrue(),
|
|
48
|
+
isFalse: (e) => f(e).isFalse(),
|
|
49
|
+
}
|
|
50
|
+
class lt {
|
|
51
|
+
constructor(t) {
|
|
52
|
+
this.store = t
|
|
53
|
+
}
|
|
54
|
+
update(t) {
|
|
55
|
+
this.store.update(t)
|
|
56
|
+
}
|
|
57
|
+
get value() {
|
|
58
|
+
return this.store.value
|
|
59
|
+
}
|
|
60
|
+
reset() {
|
|
61
|
+
this.store.update(this.store.initialValue)
|
|
62
|
+
}
|
|
63
|
+
push(t) {
|
|
64
|
+
const s = this.value
|
|
65
|
+
s.push(t), this.update(s)
|
|
66
|
+
}
|
|
67
|
+
pop() {
|
|
68
|
+
const t = this.value,
|
|
69
|
+
s = t.pop()
|
|
70
|
+
return this.update(t), s
|
|
71
|
+
}
|
|
72
|
+
unshift(t) {
|
|
73
|
+
const s = this.value
|
|
74
|
+
s.unshift(t), this.update(s)
|
|
75
|
+
}
|
|
76
|
+
shift() {
|
|
77
|
+
const t = this.value,
|
|
78
|
+
s = t.shift()
|
|
79
|
+
return this.update(t), s
|
|
80
|
+
}
|
|
81
|
+
sortBy(t) {
|
|
82
|
+
const s = this.value
|
|
83
|
+
s.sort(t), this.update(s)
|
|
84
|
+
}
|
|
85
|
+
insertAt(t, s) {
|
|
86
|
+
const r = this.value
|
|
87
|
+
k(r, t, s), this.update(r)
|
|
88
|
+
}
|
|
89
|
+
remove(t) {
|
|
90
|
+
const s = O(this.value, t)
|
|
91
|
+
this.update(s)
|
|
92
|
+
}
|
|
93
|
+
removeBy(t) {
|
|
94
|
+
const s = M(this.value, t)
|
|
95
|
+
this.update(s)
|
|
96
|
+
}
|
|
97
|
+
includes(t) {
|
|
98
|
+
return this.value.includes(t)
|
|
99
|
+
}
|
|
100
|
+
appendIfUnique(t) {
|
|
101
|
+
const s = this.value
|
|
102
|
+
$(s, t), this.update(s)
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
const m = (e) => new lt(e),
|
|
106
|
+
ze = {
|
|
107
|
+
push: (e, t) => m(e).push(t),
|
|
108
|
+
pop: (e) => m(e).pop(),
|
|
109
|
+
unshift: (e, t) => m(e).unshift(t),
|
|
110
|
+
shift: (e) => m(e).shift(),
|
|
111
|
+
sortBy: (e, t) => m(e).sortBy(t),
|
|
112
|
+
insertAt: (e, t, s) => m(e).insertAt(t, s),
|
|
113
|
+
remove: (e, t) => m(e).remove(t),
|
|
114
|
+
removeBy: (e, t) => m(e).removeBy(t),
|
|
115
|
+
reset: (e) => m(e).reset(),
|
|
116
|
+
includes: (e, t) => m(e).includes(t),
|
|
117
|
+
appendIfUnique: (e, t) => m(e).appendIfUnique(t),
|
|
118
|
+
}
|
|
119
|
+
class ht {
|
|
120
|
+
constructor(t) {
|
|
121
|
+
this.store = t
|
|
122
|
+
}
|
|
123
|
+
update(t) {
|
|
124
|
+
this.store.update(t)
|
|
125
|
+
}
|
|
126
|
+
get value() {
|
|
127
|
+
return this.store.value
|
|
128
|
+
}
|
|
129
|
+
reset() {
|
|
130
|
+
this.store.update(this.store.initialValue)
|
|
131
|
+
}
|
|
132
|
+
updateAttribute(t, s) {
|
|
133
|
+
const r = { ...this.value }
|
|
134
|
+
;(r[t] = s), this.update(r)
|
|
135
|
+
}
|
|
136
|
+
updateDynamicAttribute(t, s) {
|
|
137
|
+
this.isKey(t) && this.isValueType(t, s) && this.updateAttribute(t, s)
|
|
138
|
+
}
|
|
139
|
+
isKey(t) {
|
|
140
|
+
return t in this.store.initialValue
|
|
141
|
+
}
|
|
142
|
+
isValueType(t, s) {
|
|
143
|
+
return typeof this.store.initialValue[t] == typeof s
|
|
144
|
+
}
|
|
145
|
+
resetAttribute(t) {
|
|
146
|
+
const s = { ...this.value },
|
|
147
|
+
r = this.store.initialValue[t]
|
|
148
|
+
;(s[t] = r), this.update(s)
|
|
149
|
+
}
|
|
150
|
+
updateAttributes(t) {
|
|
151
|
+
const s = { ...this.value, ...t }
|
|
152
|
+
this.update(s)
|
|
153
|
+
}
|
|
154
|
+
attributeTruthy(t) {
|
|
155
|
+
return !!this.value[t]
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
const b = (e) => new ht(e),
|
|
159
|
+
Ke = {
|
|
160
|
+
reset: (e) => b(e).reset(),
|
|
161
|
+
resetAttribute: (e, t) => b(e).resetAttribute(t),
|
|
162
|
+
updateAttribute: (e, t, s) => b(e).updateAttribute(t, s),
|
|
163
|
+
updateAttributes: (e, t) => b(e).updateAttributes(t),
|
|
164
|
+
attributeTruthy: (e, t) => b(e).attributeTruthy(t),
|
|
165
|
+
},
|
|
166
|
+
dt = (e) => typeof e == 'boolean',
|
|
167
|
+
pt = (e) => typeof e == 'number',
|
|
168
|
+
D = (e) => typeof e == 'string',
|
|
169
|
+
v = (e) => Array.isArray(e),
|
|
170
|
+
y = (e) => e !== null && !v(e) && typeof e == 'object',
|
|
171
|
+
Re = {
|
|
172
|
+
boolean: dt,
|
|
173
|
+
number: pt,
|
|
174
|
+
string: D,
|
|
175
|
+
array: v,
|
|
176
|
+
object: y,
|
|
177
|
+
},
|
|
178
|
+
mt = (e, t) => t.createElement(e),
|
|
179
|
+
ft = (e, t) => {
|
|
6
180
|
for (const s in t) {
|
|
7
181
|
if (s === '__self') continue
|
|
8
182
|
const r = t[s].toString()
|
|
@@ -10,10 +184,10 @@ const tt = (e) => typeof e == 'string',
|
|
|
10
184
|
const n = e
|
|
11
185
|
n.value !== r && (n.value = r)
|
|
12
186
|
} else
|
|
13
|
-
|
|
187
|
+
D(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
|
|
14
188
|
}
|
|
15
189
|
},
|
|
16
|
-
|
|
190
|
+
bt = (e, t, s) => {
|
|
17
191
|
const r = {}
|
|
18
192
|
for (const n in t) {
|
|
19
193
|
const i = t[n],
|
|
@@ -27,12 +201,12 @@ const tt = (e) => typeof e == 'string',
|
|
|
27
201
|
}
|
|
28
202
|
e.eventMaps = r
|
|
29
203
|
},
|
|
30
|
-
|
|
31
|
-
const n =
|
|
32
|
-
return
|
|
204
|
+
vt = (e, t, s, r) => {
|
|
205
|
+
const n = mt(e, r.document)
|
|
206
|
+
return ft(n, t), bt(n, s, r.publish), n
|
|
33
207
|
},
|
|
34
|
-
|
|
35
|
-
|
|
208
|
+
w = 'http://www.w3.org/2000/svg',
|
|
209
|
+
gt = {
|
|
36
210
|
animate: !0,
|
|
37
211
|
animateMotion: !0,
|
|
38
212
|
animateTransform: !0,
|
|
@@ -96,33 +270,33 @@ const tt = (e) => typeof e == 'string',
|
|
|
96
270
|
use: !0,
|
|
97
271
|
view: !0,
|
|
98
272
|
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const r = s.createElementNS(
|
|
273
|
+
yt = (e, t) => !!(gt[e] || (e === 'a' && t === w)),
|
|
274
|
+
Et = (e, t, s) => {
|
|
275
|
+
const r = s.createElementNS(w, e)
|
|
102
276
|
for (const n in t)
|
|
103
277
|
n === '__self' ||
|
|
104
278
|
n === 'xmlns' ||
|
|
105
279
|
r.setAttributeNS(null, n, t[n].toString())
|
|
106
280
|
return r
|
|
107
281
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
class
|
|
282
|
+
At = (e) => e.namespaceURI === w,
|
|
283
|
+
xt = (e, t) => t.createTextNode(e)
|
|
284
|
+
class wt {
|
|
111
285
|
constructor(t) {
|
|
112
286
|
this.value = t.toString()
|
|
113
287
|
}
|
|
114
288
|
render(t) {
|
|
115
|
-
const s =
|
|
289
|
+
const s = xt(this.value, t.document)
|
|
116
290
|
return (s.__jsx = 'TextNode'), [s]
|
|
117
291
|
}
|
|
118
292
|
}
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
293
|
+
const Nt = (e) => typeof e == 'string' || typeof e == 'number',
|
|
294
|
+
_t = (e) => new wt(e),
|
|
295
|
+
St = (e) => (Nt(e) ? _t(e) : e),
|
|
296
|
+
P = (e) => Tt(e).map(St).flat(),
|
|
297
|
+
Tt = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
|
|
298
|
+
F = (e, t = {}) => P(e || t.children || []),
|
|
299
|
+
jt = (e, t = '') => {
|
|
126
300
|
const s = {},
|
|
127
301
|
r = {}
|
|
128
302
|
for (const n in e) {
|
|
@@ -132,7 +306,7 @@ const ht = (e) => typeof e == 'string' || typeof e == 'number',
|
|
|
132
306
|
r[a] = i ? i.toString() : ''
|
|
133
307
|
} else {
|
|
134
308
|
if (i === !1) continue
|
|
135
|
-
n === '__source' ? (s.__source = e.__source) : (s[n] =
|
|
309
|
+
n === '__source' ? (s.__source = e.__source) : (s[n] = Ot(n, i, t))
|
|
136
310
|
}
|
|
137
311
|
}
|
|
138
312
|
return {
|
|
@@ -140,22 +314,22 @@ const ht = (e) => typeof e == 'string' || typeof e == 'number',
|
|
|
140
314
|
events: r,
|
|
141
315
|
}
|
|
142
316
|
},
|
|
143
|
-
|
|
144
|
-
|
|
317
|
+
Ot = (e, t, s = '') => (t == null ? s : t.toString()),
|
|
318
|
+
Mt = (e, t) => {
|
|
145
319
|
const s = e || {},
|
|
146
|
-
r =
|
|
320
|
+
r = F(t, s)
|
|
147
321
|
return (s.children = s.children || r), s
|
|
148
322
|
},
|
|
149
|
-
|
|
150
|
-
|
|
323
|
+
B = (e, t, s, r = []) => e.reduce(kt(t, s), r).flat(),
|
|
324
|
+
kt = (e, t) => (s, r) =>
|
|
151
325
|
r
|
|
152
326
|
? Array.isArray(r)
|
|
153
|
-
?
|
|
327
|
+
? B(r, e, t, s)
|
|
154
328
|
: (r.render(e, t).forEach((n) => s.push(n)), s)
|
|
155
329
|
: s
|
|
156
|
-
class
|
|
330
|
+
class V {
|
|
157
331
|
constructor(t) {
|
|
158
|
-
this.collection =
|
|
332
|
+
this.collection = P(t)
|
|
159
333
|
}
|
|
160
334
|
render(t, s) {
|
|
161
335
|
this.parentElement = s
|
|
@@ -163,7 +337,7 @@ class M {
|
|
|
163
337
|
return this.attachToParent(r), r
|
|
164
338
|
}
|
|
165
339
|
generateDom(t) {
|
|
166
|
-
return
|
|
340
|
+
return B(this.collection, t, this.parentElement)
|
|
167
341
|
}
|
|
168
342
|
attachToParent(t) {
|
|
169
343
|
if (this.parentElement === void 0) return
|
|
@@ -171,7 +345,7 @@ class M {
|
|
|
171
345
|
t.forEach((r) => s.appendChild(r))
|
|
172
346
|
}
|
|
173
347
|
}
|
|
174
|
-
class
|
|
348
|
+
class $t {
|
|
175
349
|
constructor(t, s) {
|
|
176
350
|
;(this.type = t), (this.attributes = s)
|
|
177
351
|
}
|
|
@@ -197,14 +371,14 @@ class yt {
|
|
|
197
371
|
return `${this.type}${t}${s}${r}`
|
|
198
372
|
}
|
|
199
373
|
}
|
|
200
|
-
class
|
|
374
|
+
class Dt {
|
|
201
375
|
constructor(t, s, r = []) {
|
|
202
376
|
this.type = t
|
|
203
|
-
const { events: n, attributes: i } =
|
|
377
|
+
const { events: n, attributes: i } = jt(s)
|
|
204
378
|
;(this.events = n),
|
|
205
379
|
(this.attributes = i),
|
|
206
|
-
(this.isSvg =
|
|
207
|
-
(this.children = new
|
|
380
|
+
(this.isSvg = yt(this.type, this.attributes.xmlns)),
|
|
381
|
+
(this.children = new V(r))
|
|
208
382
|
}
|
|
209
383
|
render(t) {
|
|
210
384
|
const s = this.generateDom(t)
|
|
@@ -214,24 +388,24 @@ class Et {
|
|
|
214
388
|
return this.isSvg ? this.generateSvgDom(t) : this.generateHtmlDom(t)
|
|
215
389
|
}
|
|
216
390
|
generateHtmlDom(t) {
|
|
217
|
-
const s =
|
|
391
|
+
const s = vt(this.type, this.attributes, this.events, t)
|
|
218
392
|
return (s.__jsx = this.jsxKey()), s
|
|
219
393
|
}
|
|
220
394
|
generateSvgDom(t) {
|
|
221
|
-
const s =
|
|
395
|
+
const s = Et(this.type, this.attributes, t.document)
|
|
222
396
|
return (s.__jsx = this.jsxKey()), s
|
|
223
397
|
}
|
|
224
398
|
jsxKey() {
|
|
225
|
-
return new
|
|
399
|
+
return new $t(this.type, this.attributes).generate()
|
|
226
400
|
}
|
|
227
401
|
}
|
|
228
|
-
const
|
|
229
|
-
typeof e == 'string' ? new
|
|
230
|
-
|
|
231
|
-
const s =
|
|
232
|
-
return new
|
|
402
|
+
const Pt = (e, t, ...s) =>
|
|
403
|
+
typeof e == 'string' ? new Dt(e, t, s) : e(Mt(t, s))
|
|
404
|
+
Pt.fragment = (e, t) => {
|
|
405
|
+
const s = F(t, e)
|
|
406
|
+
return new V(s)
|
|
233
407
|
}
|
|
234
|
-
class
|
|
408
|
+
class Ft {
|
|
235
409
|
constructor(t, s, r) {
|
|
236
410
|
;(this.template = t),
|
|
237
411
|
(this.selector = s),
|
|
@@ -256,49 +430,49 @@ class At {
|
|
|
256
430
|
return this.renderKit.document.querySelector(this.selector)
|
|
257
431
|
}
|
|
258
432
|
}
|
|
259
|
-
const
|
|
260
|
-
const r = new
|
|
433
|
+
const Bt = (e, t, s) => {
|
|
434
|
+
const r = new Ft(e, t, s)
|
|
261
435
|
return r.renderAndAttach(s), r
|
|
262
436
|
},
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
437
|
+
L = 'go-to-href',
|
|
438
|
+
z = 'go-to',
|
|
439
|
+
g = 'navigation:location-change',
|
|
440
|
+
K = 'navigation:route-change',
|
|
441
|
+
Vt = /* @__PURE__ */ Object.freeze(
|
|
268
442
|
/* @__PURE__ */ Object.defineProperty(
|
|
269
443
|
{
|
|
270
444
|
__proto__: null,
|
|
271
|
-
linkNavigationEvent:
|
|
272
|
-
locationChangeEvent:
|
|
273
|
-
navigationEvent:
|
|
274
|
-
routeChangeEvent:
|
|
445
|
+
linkNavigationEvent: L,
|
|
446
|
+
locationChangeEvent: g,
|
|
447
|
+
navigationEvent: z,
|
|
448
|
+
routeChangeEvent: K,
|
|
275
449
|
},
|
|
276
450
|
Symbol.toStringTag,
|
|
277
451
|
{ value: 'Module' },
|
|
278
452
|
),
|
|
279
453
|
),
|
|
280
|
-
|
|
454
|
+
R = (e) => {
|
|
281
455
|
e.create('route', {
|
|
282
456
|
host: '',
|
|
283
457
|
path: '',
|
|
284
458
|
query: {},
|
|
285
459
|
})
|
|
286
460
|
},
|
|
287
|
-
|
|
461
|
+
U = (e) => {
|
|
288
462
|
const t = e.closest('[href]')
|
|
289
463
|
return (t && t.getAttribute('href')) || ''
|
|
290
464
|
},
|
|
291
|
-
|
|
292
|
-
s.history.pushState(null, '', e), t(
|
|
465
|
+
N = ({ payload: e, publish: t, window: s }) => {
|
|
466
|
+
s.history.pushState(null, '', e), t(g, null)
|
|
293
467
|
},
|
|
294
|
-
|
|
468
|
+
q = (e) => {
|
|
295
469
|
const t = e.payload
|
|
296
470
|
if (!t || !t.target) return
|
|
297
471
|
t.preventDefault()
|
|
298
|
-
const s =
|
|
299
|
-
|
|
472
|
+
const s = U(t.target)
|
|
473
|
+
N({ ...e, payload: s })
|
|
300
474
|
},
|
|
301
|
-
|
|
475
|
+
I = (e) =>
|
|
302
476
|
e
|
|
303
477
|
.replace(/^\?/, '')
|
|
304
478
|
.split('&')
|
|
@@ -307,49 +481,49 @@ const wt = (e, t, s) => {
|
|
|
307
481
|
const r = s.split('=')
|
|
308
482
|
return (t[r[0]] = r[1]), t
|
|
309
483
|
}, {}),
|
|
310
|
-
|
|
484
|
+
C = (e) => {
|
|
311
485
|
const { state: t, publish: s, window: r } = e,
|
|
312
486
|
{ host: n, pathname: i, search: a } = r.location,
|
|
313
487
|
c = i,
|
|
314
|
-
u =
|
|
488
|
+
u = I(a),
|
|
315
489
|
h = {
|
|
316
490
|
host: n,
|
|
317
491
|
path: c,
|
|
318
492
|
query: u,
|
|
319
493
|
}
|
|
320
|
-
t.store('route').update(h), s(
|
|
494
|
+
t.store('route').update(h), s(K, h)
|
|
321
495
|
},
|
|
322
|
-
|
|
496
|
+
J = (e) => {
|
|
323
497
|
const { subscribe: t } = e
|
|
324
|
-
t(
|
|
325
|
-
t(
|
|
326
|
-
|
|
498
|
+
t(L, q),
|
|
499
|
+
t(z, (s) => {
|
|
500
|
+
N(s)
|
|
327
501
|
})
|
|
328
502
|
},
|
|
329
|
-
|
|
503
|
+
G = (e) => {
|
|
330
504
|
const { publish: t, subscribe: s, state: r, window: n } = e
|
|
331
|
-
|
|
505
|
+
R(r), n.addEventListener('popstate', () => t(g, null)), s(g, C)
|
|
332
506
|
},
|
|
333
|
-
|
|
334
|
-
setTimeout(() => e.publish(
|
|
507
|
+
H = (e) => {
|
|
508
|
+
setTimeout(() => e.publish(g, null), 0)
|
|
335
509
|
},
|
|
336
|
-
|
|
337
|
-
|
|
510
|
+
Q = (e) => {
|
|
511
|
+
G(e), J(e), H(e)
|
|
338
512
|
},
|
|
339
|
-
|
|
513
|
+
Lt = /* @__PURE__ */ Object.freeze(
|
|
340
514
|
/* @__PURE__ */ Object.defineProperty(
|
|
341
515
|
{
|
|
342
516
|
__proto__: null,
|
|
343
|
-
publishLocation:
|
|
344
|
-
startNavigation:
|
|
345
|
-
subscribeToHistoryChange:
|
|
346
|
-
subscribeToNavigation:
|
|
517
|
+
publishLocation: H,
|
|
518
|
+
startNavigation: Q,
|
|
519
|
+
subscribeToHistoryChange: G,
|
|
520
|
+
subscribeToNavigation: J,
|
|
347
521
|
},
|
|
348
522
|
Symbol.toStringTag,
|
|
349
523
|
{ value: 'Module' },
|
|
350
524
|
),
|
|
351
525
|
)
|
|
352
|
-
class
|
|
526
|
+
class W {
|
|
353
527
|
constructor({
|
|
354
528
|
window: t,
|
|
355
529
|
document: s,
|
|
@@ -369,24 +543,24 @@ class C {
|
|
|
369
543
|
(this.roots = [])
|
|
370
544
|
}
|
|
371
545
|
render(t, s) {
|
|
372
|
-
const r =
|
|
546
|
+
const r = Bt(t, s, this.renderKit)
|
|
373
547
|
return this.roots.push(r), r
|
|
374
548
|
}
|
|
375
549
|
startNavigation() {
|
|
376
|
-
|
|
550
|
+
Q(this)
|
|
377
551
|
}
|
|
378
552
|
}
|
|
379
|
-
const
|
|
553
|
+
const Ue = /* @__PURE__ */ Object.freeze(
|
|
380
554
|
/* @__PURE__ */ Object.defineProperty(
|
|
381
555
|
{
|
|
382
556
|
__proto__: null,
|
|
383
|
-
App:
|
|
557
|
+
App: W,
|
|
384
558
|
},
|
|
385
559
|
Symbol.toStringTag,
|
|
386
560
|
{ value: 'Module' },
|
|
387
561
|
),
|
|
388
562
|
)
|
|
389
|
-
class
|
|
563
|
+
class X {
|
|
390
564
|
constructor() {
|
|
391
565
|
this.lookup = {}
|
|
392
566
|
}
|
|
@@ -413,7 +587,7 @@ class I {
|
|
|
413
587
|
this.lookup[t] || (this.lookup[t] = [])
|
|
414
588
|
}
|
|
415
589
|
}
|
|
416
|
-
class
|
|
590
|
+
class Y {
|
|
417
591
|
constructor() {
|
|
418
592
|
this.lookup = []
|
|
419
593
|
}
|
|
@@ -432,7 +606,7 @@ class q {
|
|
|
432
606
|
return this.lookup.filter((s) => s.matcher.test(t))
|
|
433
607
|
}
|
|
434
608
|
}
|
|
435
|
-
class
|
|
609
|
+
class zt {
|
|
436
610
|
constructor({ publish: t, event: s, payload: r, timer: n }) {
|
|
437
611
|
;(this.setNewTimeout = () => {
|
|
438
612
|
this.stopped ||
|
|
@@ -469,7 +643,7 @@ class St {
|
|
|
469
643
|
((this.callCount += 1), this.publish(this.event, this.payload))
|
|
470
644
|
}
|
|
471
645
|
}
|
|
472
|
-
const
|
|
646
|
+
const Kt = (e) => {
|
|
473
647
|
const { offset: t, period: s } = e,
|
|
474
648
|
r = ({ callCount: n }) => (t && n == 0 ? t : s)
|
|
475
649
|
return {
|
|
@@ -479,16 +653,16 @@ const Tt = (e) => {
|
|
|
479
653
|
timer: r,
|
|
480
654
|
}
|
|
481
655
|
},
|
|
482
|
-
|
|
656
|
+
Rt = (e) => {
|
|
483
657
|
let t
|
|
484
|
-
'timer' in e ? (t = e) : (t =
|
|
485
|
-
const s = new
|
|
658
|
+
'timer' in e ? (t = e) : (t = Kt(e))
|
|
659
|
+
const s = new zt(t)
|
|
486
660
|
return s.start(), s.stop
|
|
487
661
|
}
|
|
488
|
-
class
|
|
662
|
+
class Z {
|
|
489
663
|
constructor() {
|
|
490
|
-
;(this.exactSubscriptions = new
|
|
491
|
-
(this.fuzzySubscriptions = new
|
|
664
|
+
;(this.exactSubscriptions = new X()),
|
|
665
|
+
(this.fuzzySubscriptions = new Y()),
|
|
492
666
|
(this.currentIndex = 0)
|
|
493
667
|
}
|
|
494
668
|
subscribe(t, s) {
|
|
@@ -523,47 +697,52 @@ class J {
|
|
|
523
697
|
}
|
|
524
698
|
}
|
|
525
699
|
}
|
|
526
|
-
const
|
|
527
|
-
const e = new
|
|
700
|
+
const tt = () => {
|
|
701
|
+
const e = new Z()
|
|
528
702
|
return {
|
|
529
703
|
bus: e,
|
|
530
704
|
publish: (r, n) => e.publish(r, n),
|
|
531
705
|
subscribe: (r, n) => e.subscribe(r, n),
|
|
532
706
|
}
|
|
533
707
|
},
|
|
534
|
-
|
|
708
|
+
qe = /* @__PURE__ */ Object.freeze(
|
|
535
709
|
/* @__PURE__ */ Object.defineProperty(
|
|
536
710
|
{
|
|
537
711
|
__proto__: null,
|
|
538
|
-
ExactSubscriptions:
|
|
539
|
-
FuzzySubscriptions:
|
|
540
|
-
JaxsBus:
|
|
541
|
-
createBus:
|
|
542
|
-
publishPeriodically:
|
|
712
|
+
ExactSubscriptions: X,
|
|
713
|
+
FuzzySubscriptions: Y,
|
|
714
|
+
JaxsBus: Z,
|
|
715
|
+
createBus: tt,
|
|
716
|
+
publishPeriodically: Rt,
|
|
543
717
|
},
|
|
544
718
|
Symbol.toStringTag,
|
|
545
719
|
{ value: 'Module' },
|
|
546
720
|
),
|
|
547
721
|
),
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
!(
|
|
722
|
+
Ut = (e, t) => e === t,
|
|
723
|
+
qt = (e, t) => Object.keys(e).length === Object.keys(t).length,
|
|
724
|
+
et = (e, t) =>
|
|
725
|
+
!(y(e) && y(t)) || !qt(e, t)
|
|
552
726
|
? !1
|
|
553
727
|
: Object.keys(e).every((s) => {
|
|
554
728
|
const r = e[s],
|
|
555
729
|
n = t[s]
|
|
556
|
-
return
|
|
730
|
+
return E(r, n)
|
|
557
731
|
}),
|
|
558
|
-
|
|
559
|
-
!(
|
|
732
|
+
st = (e, t) =>
|
|
733
|
+
!(v(e) && v(t)) || e.length !== t.length
|
|
560
734
|
? !1
|
|
561
735
|
: e.every((s, r) => {
|
|
562
736
|
const n = t[r]
|
|
563
|
-
return
|
|
737
|
+
return E(s, n)
|
|
564
738
|
}),
|
|
565
|
-
|
|
566
|
-
|
|
739
|
+
E = (e, t) => (y(e) ? et(e, t) : v(e) ? st(e, t) : Ut(e, t)),
|
|
740
|
+
Ie = {
|
|
741
|
+
objects: et,
|
|
742
|
+
arrays: st,
|
|
743
|
+
equal: E,
|
|
744
|
+
}
|
|
745
|
+
class x {
|
|
567
746
|
constructor(t) {
|
|
568
747
|
;(this.name = t.name),
|
|
569
748
|
(this.parent = t.parent),
|
|
@@ -571,7 +750,7 @@ class g {
|
|
|
571
750
|
(this.initialValue = structuredClone(t.value))
|
|
572
751
|
}
|
|
573
752
|
get value() {
|
|
574
|
-
return this._value
|
|
753
|
+
return structuredClone(this._value)
|
|
575
754
|
}
|
|
576
755
|
set value(t) {
|
|
577
756
|
throw new Error('Cannot set value directly. Use an updater!')
|
|
@@ -586,118 +765,23 @@ class g {
|
|
|
586
765
|
} else this.updateValue(t)
|
|
587
766
|
}
|
|
588
767
|
updateValue(t) {
|
|
589
|
-
|
|
768
|
+
E(this._value, t) || ((this._value = t), this.parent.notify(this.name))
|
|
590
769
|
}
|
|
591
770
|
getUpdatedValue(t) {
|
|
592
|
-
return t(
|
|
771
|
+
return t(this.value)
|
|
593
772
|
}
|
|
594
773
|
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
this.store = t
|
|
598
|
-
}
|
|
599
|
-
update(t) {
|
|
600
|
-
this.store.update(t)
|
|
601
|
-
}
|
|
602
|
-
reset() {
|
|
603
|
-
this.store.update(this.store.initialValue)
|
|
604
|
-
}
|
|
605
|
-
get value() {
|
|
606
|
-
return this.store.value
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
class Dt extends A {
|
|
610
|
-
updateAttribute(t, s) {
|
|
611
|
-
const r = { ...this.value }
|
|
612
|
-
;(r[t] = s), this.update(r)
|
|
613
|
-
}
|
|
614
|
-
updateDynamicAttribute(t, s) {
|
|
615
|
-
this.isKey(t) && this.isValueType(t, s) && this.updateAttribute(t, s)
|
|
616
|
-
}
|
|
617
|
-
isKey(t) {
|
|
618
|
-
return t in this.store.initialValue
|
|
619
|
-
}
|
|
620
|
-
isValueType(t, s) {
|
|
621
|
-
return typeof this.store.initialValue[t] == typeof s
|
|
622
|
-
}
|
|
623
|
-
resetAttribute(t) {
|
|
624
|
-
const s = { ...this.value },
|
|
625
|
-
r = this.store.initialValue[t]
|
|
626
|
-
;(s[t] = r), this.update(s)
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
const Pt = (e) => new Dt(e)
|
|
630
|
-
class Vt extends A {
|
|
631
|
-
push(t) {
|
|
632
|
-
const s = [...this.value, t]
|
|
633
|
-
this.update(s)
|
|
634
|
-
}
|
|
635
|
-
pop() {
|
|
636
|
-
const t = [...this.value],
|
|
637
|
-
s = t.pop()
|
|
638
|
-
return this.update(t), s
|
|
639
|
-
}
|
|
640
|
-
unshift(t) {
|
|
641
|
-
const s = [t, ...this.value]
|
|
642
|
-
this.update(s)
|
|
643
|
-
}
|
|
644
|
-
shift() {
|
|
645
|
-
const t = [...this.value],
|
|
646
|
-
s = t.shift()
|
|
647
|
-
return this.update(t), s
|
|
648
|
-
}
|
|
649
|
-
addSorter(t, s) {
|
|
650
|
-
this[t] = () => {
|
|
651
|
-
this.sortBy(s)
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
sortBy(t) {
|
|
655
|
-
const s = [...this.value]
|
|
656
|
-
s.sort(t), this.update(s)
|
|
657
|
-
}
|
|
658
|
-
insertAt(t, s) {
|
|
659
|
-
const r = [...this.value]
|
|
660
|
-
r.splice(t, 0, s), this.update(r)
|
|
661
|
-
}
|
|
662
|
-
remove(t) {
|
|
663
|
-
const s = this.value.reduce((r, n) => (n !== t && r.push(n), r), [])
|
|
664
|
-
this.update(s)
|
|
665
|
-
}
|
|
666
|
-
removeBy(t) {
|
|
667
|
-
const s = this.value.reduce((r, n) => (t(n) || r.push(n), r), [])
|
|
668
|
-
this.update(s)
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
const Ft = (e) => new Vt(e)
|
|
672
|
-
class Lt extends A {
|
|
673
|
-
toggle() {
|
|
674
|
-
const t = !this.value
|
|
675
|
-
this.update(t)
|
|
676
|
-
}
|
|
677
|
-
setTrue() {
|
|
678
|
-
this.update(!0)
|
|
679
|
-
}
|
|
680
|
-
setFalse() {
|
|
681
|
-
this.update(!1)
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
const zt = (e) => new Lt(e),
|
|
685
|
-
Bt = {
|
|
686
|
-
object: Pt,
|
|
687
|
-
list: Ft,
|
|
688
|
-
boolean: zt,
|
|
689
|
-
},
|
|
690
|
-
w = 'state'
|
|
691
|
-
class H {
|
|
774
|
+
const _ = 'state'
|
|
775
|
+
class rt {
|
|
692
776
|
constructor(t) {
|
|
693
777
|
;(this.publisher = t),
|
|
694
778
|
(this.stores = {}),
|
|
695
|
-
(this.eventNamePrefix =
|
|
779
|
+
(this.eventNamePrefix = _),
|
|
696
780
|
(this.notifications = /* @__PURE__ */ new Set()),
|
|
697
781
|
(this.inTransaction = !1)
|
|
698
782
|
}
|
|
699
783
|
create(t, s) {
|
|
700
|
-
const r = new
|
|
784
|
+
const r = new x({
|
|
701
785
|
name: t,
|
|
702
786
|
parent: this,
|
|
703
787
|
value: s,
|
|
@@ -707,7 +791,7 @@ class H {
|
|
|
707
791
|
store(t) {
|
|
708
792
|
return (
|
|
709
793
|
this.stores[t] ||
|
|
710
|
-
new
|
|
794
|
+
new x({
|
|
711
795
|
name: t,
|
|
712
796
|
parent: this,
|
|
713
797
|
value: void 0,
|
|
@@ -748,22 +832,21 @@ class H {
|
|
|
748
832
|
return `${this.eventNamePrefix}:${t}`
|
|
749
833
|
}
|
|
750
834
|
}
|
|
751
|
-
const
|
|
752
|
-
|
|
835
|
+
const nt = (e) => new rt(e),
|
|
836
|
+
Ce = /* @__PURE__ */ Object.freeze(
|
|
753
837
|
/* @__PURE__ */ Object.defineProperty(
|
|
754
838
|
{
|
|
755
839
|
__proto__: null,
|
|
756
|
-
State:
|
|
757
|
-
Store:
|
|
758
|
-
createState:
|
|
759
|
-
eventName:
|
|
760
|
-
updaters: Bt,
|
|
840
|
+
State: rt,
|
|
841
|
+
Store: x,
|
|
842
|
+
createState: nt,
|
|
843
|
+
eventName: _,
|
|
761
844
|
},
|
|
762
845
|
Symbol.toStringTag,
|
|
763
846
|
{ value: 'Module' },
|
|
764
847
|
),
|
|
765
848
|
)
|
|
766
|
-
class
|
|
849
|
+
class It {
|
|
767
850
|
constructor(t) {
|
|
768
851
|
this.setupDomEnvironment(t)
|
|
769
852
|
}
|
|
@@ -773,7 +856,7 @@ class Kt {
|
|
|
773
856
|
this.setupState(),
|
|
774
857
|
this.addBusOptions(),
|
|
775
858
|
this.setRenderKit(),
|
|
776
|
-
new
|
|
859
|
+
new W({
|
|
777
860
|
window: this.window,
|
|
778
861
|
document: this.document,
|
|
779
862
|
publish: this.publish,
|
|
@@ -792,11 +875,11 @@ class Kt {
|
|
|
792
875
|
: ((this.window = window), (this.document = document))
|
|
793
876
|
}
|
|
794
877
|
setupBus() {
|
|
795
|
-
const { publish: t, subscribe: s, bus: r } =
|
|
878
|
+
const { publish: t, subscribe: s, bus: r } = tt()
|
|
796
879
|
;(this.publish = t), (this.subscribe = s), (this.bus = r)
|
|
797
880
|
}
|
|
798
881
|
setupState() {
|
|
799
|
-
this.state =
|
|
882
|
+
this.state = nt(this.publish)
|
|
800
883
|
}
|
|
801
884
|
addBusOptions() {
|
|
802
885
|
this.bus.addListenerOptions({
|
|
@@ -815,8 +898,8 @@ class Kt {
|
|
|
815
898
|
}
|
|
816
899
|
}
|
|
817
900
|
}
|
|
818
|
-
const
|
|
819
|
-
const s = new
|
|
901
|
+
const Je = (e = {}) => {
|
|
902
|
+
const s = new It(e).setup()
|
|
820
903
|
return s.startNavigation(), s
|
|
821
904
|
}
|
|
822
905
|
var o = /* @__PURE__ */ ((e) => (
|
|
@@ -833,7 +916,7 @@ var o = /* @__PURE__ */ ((e) => (
|
|
|
833
916
|
(e[(e.changeText = 10)] = 'changeText'),
|
|
834
917
|
e
|
|
835
918
|
))(o || {})
|
|
836
|
-
const
|
|
919
|
+
const Ge = /* @__PURE__ */ Object.freeze(
|
|
837
920
|
/* @__PURE__ */ Object.defineProperty(
|
|
838
921
|
{
|
|
839
922
|
__proto__: null,
|
|
@@ -843,77 +926,77 @@ const Le = /* @__PURE__ */ Object.freeze(
|
|
|
843
926
|
{ value: 'Module' },
|
|
844
927
|
),
|
|
845
928
|
),
|
|
846
|
-
|
|
929
|
+
Ct = (e, t) => ({
|
|
847
930
|
source: e,
|
|
848
931
|
target: t,
|
|
849
932
|
type: o.changeText,
|
|
850
933
|
data: {},
|
|
851
934
|
}),
|
|
852
|
-
|
|
935
|
+
Jt = (e, t) => ({
|
|
853
936
|
source: e,
|
|
854
937
|
target: t,
|
|
855
938
|
type: o.replaceNode,
|
|
856
939
|
data: {},
|
|
857
940
|
}),
|
|
858
|
-
|
|
941
|
+
Gt = (e, t, s) => ({
|
|
859
942
|
source: e,
|
|
860
943
|
target: t,
|
|
861
944
|
data: s,
|
|
862
945
|
type: o.removeAttribute,
|
|
863
946
|
}),
|
|
864
|
-
|
|
947
|
+
Ht = (e, t, s) => ({
|
|
865
948
|
source: e,
|
|
866
949
|
target: t,
|
|
867
950
|
data: s,
|
|
868
951
|
type: o.addAttribute,
|
|
869
952
|
}),
|
|
870
|
-
|
|
953
|
+
Qt = (e, t, s) => ({
|
|
871
954
|
source: e,
|
|
872
955
|
target: t,
|
|
873
956
|
data: s,
|
|
874
957
|
type: o.updateAttribute,
|
|
875
958
|
}),
|
|
876
|
-
|
|
959
|
+
Wt = (e, t, s) => ({
|
|
877
960
|
source: e,
|
|
878
961
|
target: t,
|
|
879
962
|
data: s,
|
|
880
963
|
type: o.removeEvent,
|
|
881
964
|
}),
|
|
882
|
-
|
|
965
|
+
Xt = (e, t, s) => ({
|
|
883
966
|
source: e,
|
|
884
967
|
target: t,
|
|
885
968
|
data: s,
|
|
886
969
|
type: o.addEvent,
|
|
887
970
|
}),
|
|
888
|
-
|
|
971
|
+
Yt = (e, t, s) => ({
|
|
889
972
|
source: e,
|
|
890
973
|
target: t,
|
|
891
974
|
data: s,
|
|
892
975
|
type: o.updateEvent,
|
|
893
976
|
}),
|
|
894
|
-
|
|
977
|
+
S = (e) => ({
|
|
895
978
|
source: e,
|
|
896
979
|
target: e,
|
|
897
980
|
// for type crap only
|
|
898
981
|
type: o.removeNode,
|
|
899
982
|
data: {},
|
|
900
983
|
}),
|
|
901
|
-
|
|
984
|
+
A = (e, t) => ({
|
|
902
985
|
target: e,
|
|
903
986
|
source: e,
|
|
904
987
|
// for type crap only
|
|
905
988
|
type: o.insertNode,
|
|
906
989
|
data: t,
|
|
907
990
|
}),
|
|
908
|
-
|
|
991
|
+
Zt = (e, t, s) => ({
|
|
909
992
|
source: e,
|
|
910
993
|
target: t,
|
|
911
994
|
type: o.changeValue,
|
|
912
995
|
data: s,
|
|
913
996
|
}),
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
class
|
|
997
|
+
te = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
|
|
998
|
+
T = { index: -1 }
|
|
999
|
+
class ee {
|
|
917
1000
|
constructor() {
|
|
918
1001
|
this.map = {}
|
|
919
1002
|
}
|
|
@@ -930,7 +1013,7 @@ class Xt {
|
|
|
930
1013
|
}
|
|
931
1014
|
pullMatch(t) {
|
|
932
1015
|
const s = t && t.__jsx
|
|
933
|
-
return !s || !(this.map[s] && this.map[s].length) ?
|
|
1016
|
+
return !s || !(this.map[s] && this.map[s].length) ? T : this.map[s].shift()
|
|
934
1017
|
}
|
|
935
1018
|
clear(t) {
|
|
936
1019
|
const s = t && t.__jsx
|
|
@@ -946,11 +1029,11 @@ class Xt {
|
|
|
946
1029
|
return Object.values(this.map).flat()
|
|
947
1030
|
}
|
|
948
1031
|
}
|
|
949
|
-
const
|
|
950
|
-
const t = new
|
|
1032
|
+
const j = (e) => {
|
|
1033
|
+
const t = new ee()
|
|
951
1034
|
return t.populate(e), t
|
|
952
1035
|
},
|
|
953
|
-
|
|
1036
|
+
it = (e, t, s = !1) => {
|
|
954
1037
|
const r = [],
|
|
955
1038
|
n = e.attributes,
|
|
956
1039
|
i = n.length,
|
|
@@ -971,13 +1054,13 @@ const S = (e) => {
|
|
|
971
1054
|
d
|
|
972
1055
|
? l.value !== d.value &&
|
|
973
1056
|
r.push(
|
|
974
|
-
|
|
1057
|
+
Qt(e, t, {
|
|
975
1058
|
name: l.name,
|
|
976
1059
|
value: d.value,
|
|
977
1060
|
isSvg: s,
|
|
978
1061
|
}),
|
|
979
1062
|
)
|
|
980
|
-
: r.push(
|
|
1063
|
+
: r.push(Gt(e, t, { name: l.name, isSvg: s }))
|
|
981
1064
|
}
|
|
982
1065
|
}
|
|
983
1066
|
for (u = 0; u < c; u++) {
|
|
@@ -993,7 +1076,7 @@ const S = (e) => {
|
|
|
993
1076
|
}
|
|
994
1077
|
d ||
|
|
995
1078
|
r.push(
|
|
996
|
-
|
|
1079
|
+
Ht(e, t, {
|
|
997
1080
|
name: l.name,
|
|
998
1081
|
value: l.value,
|
|
999
1082
|
isSvg: s,
|
|
@@ -1003,7 +1086,7 @@ const S = (e) => {
|
|
|
1003
1086
|
}
|
|
1004
1087
|
return r
|
|
1005
1088
|
},
|
|
1006
|
-
|
|
1089
|
+
se = (e, t) => {
|
|
1007
1090
|
const s = [],
|
|
1008
1091
|
r = e.eventMaps,
|
|
1009
1092
|
n = t.eventMaps,
|
|
@@ -1016,14 +1099,14 @@ const S = (e) => {
|
|
|
1016
1099
|
h
|
|
1017
1100
|
? h.busEvent !== u.busEvent &&
|
|
1018
1101
|
s.push(
|
|
1019
|
-
|
|
1102
|
+
Yt(e, t, {
|
|
1020
1103
|
name: c,
|
|
1021
1104
|
targetValue: h.listener,
|
|
1022
1105
|
sourceValue: u.listener,
|
|
1023
1106
|
}),
|
|
1024
1107
|
)
|
|
1025
1108
|
: s.push(
|
|
1026
|
-
|
|
1109
|
+
Wt(e, t, {
|
|
1027
1110
|
name: u.domEvent,
|
|
1028
1111
|
value: u.listener,
|
|
1029
1112
|
}),
|
|
@@ -1034,7 +1117,7 @@ const S = (e) => {
|
|
|
1034
1117
|
h = n[c]
|
|
1035
1118
|
u ||
|
|
1036
1119
|
s.push(
|
|
1037
|
-
|
|
1120
|
+
Xt(e, t, {
|
|
1038
1121
|
name: h.domEvent,
|
|
1039
1122
|
value: h.listener,
|
|
1040
1123
|
}),
|
|
@@ -1043,44 +1126,44 @@ const S = (e) => {
|
|
|
1043
1126
|
s
|
|
1044
1127
|
)
|
|
1045
1128
|
},
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
if (
|
|
1129
|
+
re = (e) => e.tagName !== 'INPUT',
|
|
1130
|
+
ne = (e, t) => e.value === t.value,
|
|
1131
|
+
ie = (e, t) => {
|
|
1132
|
+
if (re(e) || ne(e, t)) return []
|
|
1050
1133
|
const s = e,
|
|
1051
1134
|
r = t
|
|
1052
|
-
return [
|
|
1135
|
+
return [Zt(s, r, { name: 'value', value: r.value })]
|
|
1053
1136
|
},
|
|
1054
|
-
|
|
1055
|
-
const s =
|
|
1056
|
-
r =
|
|
1057
|
-
n =
|
|
1137
|
+
oe = (e, t) => {
|
|
1138
|
+
const s = it(e, t),
|
|
1139
|
+
r = se(e, t),
|
|
1140
|
+
n = ie(e, t)
|
|
1058
1141
|
return s.concat(r).concat(n)
|
|
1059
1142
|
},
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1143
|
+
ue = (e, t) => it(e, t, !0),
|
|
1144
|
+
ae = (e, t) => (e.textContent !== t.textContent ? [Ct(e, t)] : []),
|
|
1145
|
+
ce = (e, t, s) => {
|
|
1063
1146
|
let r = []
|
|
1064
|
-
if (e.nodeType === 1 &&
|
|
1147
|
+
if (e.nodeType === 1 && At(e)) {
|
|
1065
1148
|
const n = e,
|
|
1066
1149
|
i = t,
|
|
1067
|
-
a =
|
|
1150
|
+
a = ue(n, i),
|
|
1068
1151
|
c = s(n.childNodes, i.childNodes, n)
|
|
1069
1152
|
r = a.concat(c)
|
|
1070
1153
|
} else if (e.nodeType === 1) {
|
|
1071
1154
|
const n = e,
|
|
1072
1155
|
i = t,
|
|
1073
|
-
a =
|
|
1156
|
+
a = oe(n, i),
|
|
1074
1157
|
c = s(n.childNodes, i.childNodes, n)
|
|
1075
1158
|
r = a.concat(c)
|
|
1076
|
-
} else e.nodeType === 3 && (r =
|
|
1159
|
+
} else e.nodeType === 3 && (r = ae(e, t))
|
|
1077
1160
|
return r
|
|
1078
1161
|
},
|
|
1079
|
-
|
|
1162
|
+
ot = (e, t, s) => {
|
|
1080
1163
|
const r = [],
|
|
1081
|
-
n =
|
|
1082
|
-
i =
|
|
1083
|
-
a =
|
|
1164
|
+
n = le(e, t),
|
|
1165
|
+
i = j(e),
|
|
1166
|
+
a = j(t),
|
|
1084
1167
|
c = []
|
|
1085
1168
|
let u = 0
|
|
1086
1169
|
for (; u < n; u++) {
|
|
@@ -1092,7 +1175,7 @@ const S = (e) => {
|
|
|
1092
1175
|
p.element
|
|
1093
1176
|
? (p.index !== u &&
|
|
1094
1177
|
r.push(
|
|
1095
|
-
|
|
1178
|
+
A(p.element, {
|
|
1096
1179
|
parent: s,
|
|
1097
1180
|
index: u,
|
|
1098
1181
|
}),
|
|
@@ -1103,141 +1186,141 @@ const S = (e) => {
|
|
|
1103
1186
|
}))
|
|
1104
1187
|
: d
|
|
1105
1188
|
? a.check(d)
|
|
1106
|
-
? r.push(
|
|
1107
|
-
: (i.clear(d), r.push(
|
|
1108
|
-
: r.push(
|
|
1109
|
-
} else d && i.pullMatch(d).element && r.push(
|
|
1189
|
+
? r.push(A(l, { parent: s, index: u }))
|
|
1190
|
+
: (i.clear(d), r.push(Jt(d, l)))
|
|
1191
|
+
: r.push(A(l, { parent: s, index: u }))
|
|
1192
|
+
} else d && i.pullMatch(d).element && r.push(S(d))
|
|
1110
1193
|
}
|
|
1111
1194
|
i.remaining().forEach(({ element: d }) => {
|
|
1112
|
-
r.push(
|
|
1195
|
+
r.push(S(d))
|
|
1113
1196
|
})
|
|
1114
1197
|
const h = c.reduce(
|
|
1115
|
-
(d, { source: l, target: p }) => d.concat(
|
|
1198
|
+
(d, { source: l, target: p }) => d.concat(ce(l, p, ot)),
|
|
1116
1199
|
[],
|
|
1117
1200
|
)
|
|
1118
|
-
return r.concat(h).sort(
|
|
1201
|
+
return r.concat(h).sort(te)
|
|
1119
1202
|
},
|
|
1120
|
-
|
|
1203
|
+
le = (e, t) => {
|
|
1121
1204
|
const s = e.length,
|
|
1122
1205
|
r = t.length
|
|
1123
1206
|
return s > r ? s : r
|
|
1124
1207
|
},
|
|
1125
|
-
|
|
1126
|
-
const r =
|
|
1208
|
+
he = (e, t, s) => {
|
|
1209
|
+
const r = ot(e, t, s)
|
|
1127
1210
|
return (
|
|
1128
1211
|
r.forEach((n) => {
|
|
1129
|
-
|
|
1212
|
+
de(n)
|
|
1130
1213
|
}),
|
|
1131
1214
|
r
|
|
1132
1215
|
)
|
|
1133
1216
|
},
|
|
1134
|
-
|
|
1135
|
-
;(
|
|
1217
|
+
de = (e) => {
|
|
1218
|
+
;(Ne[e.type] || pe)(e)
|
|
1136
1219
|
},
|
|
1137
|
-
|
|
1138
|
-
|
|
1220
|
+
pe = (e) => {},
|
|
1221
|
+
me = (e) => {
|
|
1139
1222
|
const { source: t, target: s } = e
|
|
1140
1223
|
t.nodeValue = s.textContent
|
|
1141
1224
|
},
|
|
1142
|
-
|
|
1225
|
+
fe = (e) => {
|
|
1143
1226
|
const { source: t } = e
|
|
1144
1227
|
t.remove()
|
|
1145
1228
|
},
|
|
1146
|
-
|
|
1229
|
+
be = (e) => {
|
|
1147
1230
|
const { target: t, data: s } = e,
|
|
1148
1231
|
{ parent: r, index: n } = s,
|
|
1149
1232
|
i = r.childNodes[n]
|
|
1150
1233
|
i ? i && i !== t && r.insertBefore(t, i) : r.appendChild(t)
|
|
1151
1234
|
},
|
|
1152
|
-
|
|
1235
|
+
ve = (e) => {
|
|
1153
1236
|
const { source: t, target: s } = e
|
|
1154
1237
|
t.replaceWith(s)
|
|
1155
1238
|
},
|
|
1156
|
-
|
|
1239
|
+
ge = (e) => {
|
|
1157
1240
|
const { source: t, data: s } = e,
|
|
1158
1241
|
{ name: r, isSvg: n } = s
|
|
1159
1242
|
n ? t.removeAttributeNS(null, r) : t.removeAttribute(r)
|
|
1160
1243
|
},
|
|
1161
|
-
|
|
1244
|
+
ut = (e) => {
|
|
1162
1245
|
const { source: t, data: s } = e,
|
|
1163
1246
|
{ name: r, value: n, isSvg: i } = s
|
|
1164
1247
|
i ? t.setAttributeNS(null, r, n) : t.setAttribute(r, n)
|
|
1165
1248
|
},
|
|
1166
|
-
|
|
1167
|
-
|
|
1249
|
+
ye = (e) => {
|
|
1250
|
+
ut(e)
|
|
1168
1251
|
},
|
|
1169
|
-
|
|
1252
|
+
Ee = (e) => {
|
|
1170
1253
|
const t = e.data,
|
|
1171
1254
|
s = e.source,
|
|
1172
1255
|
{ name: r, value: n } = t
|
|
1173
1256
|
s.removeEventListener(r, n)
|
|
1174
1257
|
},
|
|
1175
|
-
|
|
1258
|
+
Ae = (e) => {
|
|
1176
1259
|
const t = e.data,
|
|
1177
1260
|
s = e.source,
|
|
1178
1261
|
{ name: r, value: n } = t
|
|
1179
1262
|
s.addEventListener(r, n)
|
|
1180
1263
|
},
|
|
1181
|
-
|
|
1264
|
+
xe = (e) => {
|
|
1182
1265
|
const t = e.data,
|
|
1183
1266
|
s = e.source,
|
|
1184
1267
|
{ name: r, sourceValue: n, targetValue: i } = t
|
|
1185
1268
|
s.removeEventListener(r, n), s.addEventListener(r, i)
|
|
1186
1269
|
},
|
|
1187
|
-
|
|
1270
|
+
we = (e) => {
|
|
1188
1271
|
const t = e.data,
|
|
1189
1272
|
s = e.source,
|
|
1190
1273
|
{ value: r } = t
|
|
1191
1274
|
s.value = r
|
|
1192
1275
|
},
|
|
1193
|
-
|
|
1194
|
-
[o.changeText]:
|
|
1195
|
-
[o.removeNode]:
|
|
1196
|
-
[o.insertNode]:
|
|
1197
|
-
[o.replaceNode]:
|
|
1198
|
-
[o.removeAttribute]:
|
|
1199
|
-
[o.addAttribute]:
|
|
1200
|
-
[o.updateAttribute]:
|
|
1201
|
-
[o.removeEvent]:
|
|
1202
|
-
[o.addEvent]:
|
|
1203
|
-
[o.updateEvent]:
|
|
1204
|
-
[o.changeValue]:
|
|
1276
|
+
Ne = {
|
|
1277
|
+
[o.changeText]: me,
|
|
1278
|
+
[o.removeNode]: fe,
|
|
1279
|
+
[o.insertNode]: be,
|
|
1280
|
+
[o.replaceNode]: ve,
|
|
1281
|
+
[o.removeAttribute]: ge,
|
|
1282
|
+
[o.addAttribute]: ut,
|
|
1283
|
+
[o.updateAttribute]: ye,
|
|
1284
|
+
[o.removeEvent]: Ee,
|
|
1285
|
+
[o.addEvent]: Ae,
|
|
1286
|
+
[o.updateEvent]: xe,
|
|
1287
|
+
[o.changeValue]: we,
|
|
1205
1288
|
},
|
|
1206
|
-
|
|
1289
|
+
_e = (e, t, s) => {
|
|
1207
1290
|
const r = [...t]
|
|
1208
1291
|
return (
|
|
1209
1292
|
e.forEach((n) => {
|
|
1210
|
-
|
|
1293
|
+
Se(n, r, s)
|
|
1211
1294
|
}),
|
|
1212
1295
|
r
|
|
1213
1296
|
)
|
|
1214
1297
|
},
|
|
1215
|
-
|
|
1216
|
-
const r =
|
|
1298
|
+
Se = (e, t, s) => {
|
|
1299
|
+
const r = Me[e.type]
|
|
1217
1300
|
r && r(e, t, s)
|
|
1218
1301
|
},
|
|
1219
|
-
|
|
1302
|
+
Te = (e, t) => {
|
|
1220
1303
|
const { source: s } = e,
|
|
1221
1304
|
r = t.indexOf(s)
|
|
1222
1305
|
r >= 0 && t.splice(r, 1)
|
|
1223
1306
|
},
|
|
1224
|
-
|
|
1307
|
+
je = (e, t, s) => {
|
|
1225
1308
|
const { target: r } = e,
|
|
1226
1309
|
n = e.data,
|
|
1227
1310
|
{ index: i, parent: a } = n
|
|
1228
1311
|
s === a && t.splice(i, 0, r)
|
|
1229
1312
|
},
|
|
1230
|
-
|
|
1313
|
+
Oe = (e, t) => {
|
|
1231
1314
|
const { target: s, source: r } = e,
|
|
1232
1315
|
n = t.indexOf(r)
|
|
1233
1316
|
n >= 0 && (t[n] = s)
|
|
1234
1317
|
},
|
|
1235
|
-
|
|
1236
|
-
[o.removeNode]:
|
|
1237
|
-
[o.insertNode]:
|
|
1238
|
-
[o.replaceNode]:
|
|
1318
|
+
Me = {
|
|
1319
|
+
[o.removeNode]: Te,
|
|
1320
|
+
[o.insertNode]: je,
|
|
1321
|
+
[o.replaceNode]: Oe,
|
|
1239
1322
|
}
|
|
1240
|
-
class
|
|
1323
|
+
class ke {
|
|
1241
1324
|
constructor({ Template: t, subscriptions: s, attributes: r, viewModel: n }) {
|
|
1242
1325
|
;(this.Template = t),
|
|
1243
1326
|
(this.viewModel = n),
|
|
@@ -1269,8 +1352,8 @@ class Te {
|
|
|
1269
1352
|
this.parentElement = r
|
|
1270
1353
|
}
|
|
1271
1354
|
const t = this.generateDom(this.renderKit),
|
|
1272
|
-
s =
|
|
1273
|
-
this.dom =
|
|
1355
|
+
s = he(this.dom, t, this.parentElement)
|
|
1356
|
+
this.dom = _e(s, this.dom, this.parentElement)
|
|
1274
1357
|
}
|
|
1275
1358
|
subscribeForRerender() {
|
|
1276
1359
|
const { subscribe: t } = this.renderKit
|
|
@@ -1279,75 +1362,81 @@ class Te {
|
|
|
1279
1362
|
})
|
|
1280
1363
|
}
|
|
1281
1364
|
eventName(t) {
|
|
1282
|
-
return `${
|
|
1365
|
+
return `${_}:${t}`
|
|
1283
1366
|
}
|
|
1284
1367
|
}
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1368
|
+
const $e = (e) => e,
|
|
1369
|
+
De = ({ Template: e, viewModel: t, subscriptions: s }) => (
|
|
1287
1370
|
(s = s || []),
|
|
1288
|
-
(t = t ||
|
|
1371
|
+
(t = t || $e),
|
|
1289
1372
|
(r) =>
|
|
1290
|
-
new
|
|
1373
|
+
new ke({ Template: e, viewModel: t, subscriptions: s, attributes: r })
|
|
1291
1374
|
),
|
|
1292
|
-
|
|
1375
|
+
Pe =
|
|
1293
1376
|
(e) =>
|
|
1294
1377
|
({ path: t }) =>
|
|
1295
1378
|
t === e,
|
|
1296
|
-
|
|
1297
|
-
|
|
1379
|
+
Fe = () => !0,
|
|
1380
|
+
at =
|
|
1298
1381
|
(e) =>
|
|
1299
1382
|
({ route: t }) => {
|
|
1300
1383
|
const s = e.find((r) => r.match(t))
|
|
1301
1384
|
return s && s.Partial
|
|
1302
1385
|
},
|
|
1303
|
-
|
|
1386
|
+
He = /* @__PURE__ */ Object.freeze(
|
|
1304
1387
|
/* @__PURE__ */ Object.defineProperty(
|
|
1305
1388
|
{
|
|
1306
1389
|
__proto__: null,
|
|
1307
|
-
buildRouter:
|
|
1308
|
-
catchAll:
|
|
1309
|
-
exactPathMatch:
|
|
1390
|
+
buildRouter: at,
|
|
1391
|
+
catchAll: Fe,
|
|
1392
|
+
exactPathMatch: Pe,
|
|
1310
1393
|
},
|
|
1311
1394
|
Symbol.toStringTag,
|
|
1312
1395
|
{ value: 'Module' },
|
|
1313
1396
|
),
|
|
1314
1397
|
),
|
|
1315
|
-
|
|
1398
|
+
Be = () => ({
|
|
1316
1399
|
render: (e, t) => [],
|
|
1317
1400
|
}),
|
|
1318
|
-
|
|
1319
|
-
const t =
|
|
1320
|
-
return
|
|
1321
|
-
Template: ({ route: r }) => (t({ route: r }) ||
|
|
1401
|
+
Qe = (e) => {
|
|
1402
|
+
const t = at(e)
|
|
1403
|
+
return De({
|
|
1404
|
+
Template: ({ route: r }) => (t({ route: r }) || Be)(),
|
|
1322
1405
|
subscriptions: ['route'],
|
|
1323
1406
|
})
|
|
1324
1407
|
},
|
|
1325
|
-
|
|
1408
|
+
We = /* @__PURE__ */ Object.freeze(
|
|
1326
1409
|
/* @__PURE__ */ Object.defineProperty(
|
|
1327
1410
|
{
|
|
1328
1411
|
__proto__: null,
|
|
1329
|
-
createRouteState:
|
|
1330
|
-
events:
|
|
1331
|
-
extractQueryParams:
|
|
1332
|
-
findHref:
|
|
1333
|
-
navigate:
|
|
1334
|
-
onLinkClick:
|
|
1335
|
-
onLocationChange:
|
|
1336
|
-
start:
|
|
1412
|
+
createRouteState: R,
|
|
1413
|
+
events: Vt,
|
|
1414
|
+
extractQueryParams: I,
|
|
1415
|
+
findHref: U,
|
|
1416
|
+
navigate: N,
|
|
1417
|
+
onLinkClick: q,
|
|
1418
|
+
onLocationChange: C,
|
|
1419
|
+
start: Lt,
|
|
1337
1420
|
},
|
|
1338
1421
|
Symbol.toStringTag,
|
|
1339
1422
|
{ value: 'Module' },
|
|
1340
1423
|
),
|
|
1341
1424
|
)
|
|
1342
1425
|
export {
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
Ke as
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1426
|
+
Ve as ArrayModifiers,
|
|
1427
|
+
Le as BooleanStore,
|
|
1428
|
+
Ie as Equality,
|
|
1429
|
+
Re as Is,
|
|
1430
|
+
Ge as JaxsTypes,
|
|
1431
|
+
ze as ListStore,
|
|
1432
|
+
Ke as RecordStore,
|
|
1433
|
+
Ue as appBuilding,
|
|
1434
|
+
De as bind,
|
|
1435
|
+
Je as createApp,
|
|
1436
|
+
Pt as jsx,
|
|
1437
|
+
qe as messageBus,
|
|
1438
|
+
We as navigation,
|
|
1439
|
+
Qe as routedView,
|
|
1440
|
+
He as routing,
|
|
1441
|
+
Ce as state,
|
|
1353
1442
|
}
|