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