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.js CHANGED
@@ -1,8 +1,159 @@
1
- const tt = (e) => typeof e == 'string',
2
- f = (e) => Array.isArray(e),
3
- v = (e) => e !== null && !f(e) && typeof e == 'object',
4
- et = (e, t) => t.createElement(e),
5
- st = (e, t) => {
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
- tt(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
164
+ $(r) && r.trim() === '' ? e.removeAttribute(s) : e.setAttribute(s, r)
14
165
  }
15
166
  },
16
- rt = (e, t, s) => {
167
+ yt = (e, t, s) => {
17
168
  const r = {}
18
169
  for (const n in t) {
19
- const i = t[n],
20
- a = (l) => s(i, l)
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: i,
175
+ busEvent: o,
25
176
  listener: a,
26
177
  })
27
178
  }
28
179
  e.eventMaps = r
29
180
  },
30
- nt = (e, t, s, r) => {
31
- const n = et(e, r.document)
32
- return st(n, t), rt(n, s, r.publish), n
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
- y = 'http://www.w3.org/2000/svg',
35
- it = {
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
- ot = (e, t) => !!(it[e] || (e === 'a' && t === y)),
100
- ut = (e, t, s) => {
101
- const r = s.createElementNS(y, e)
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
- at = (e) => e.namespaceURI === y,
109
- ct = (e, t) => t.createTextNode(e)
110
- class lt {
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 = ct(this.value, t.document)
266
+ const s = _t(this.value, t.document)
116
267
  return (s.__jsx = 'TextNode'), [s]
117
268
  }
118
269
  }
119
- const ht = (e) => typeof e == 'string' || typeof e == 'number',
120
- dt = (e) => new lt(e),
121
- pt = (e) => (ht(e) ? dt(e) : e),
122
- T = (e) => mt(e).map(pt).flat(),
123
- mt = (e) => (Array.isArray(e) ? e.flat() : e ? [e] : []),
124
- j = (e, t = {}) => T(e || t.children || []),
125
- ft = (e, t = '') => {
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 i = e[n]
280
+ const o = e[n]
130
281
  if (n.match(/^on.+/i)) {
131
282
  const a = n.slice(2).toLowerCase()
132
- r[a] = i ? i.toString() : ''
283
+ r[a] = o ? o.toString() : ''
133
284
  } else {
134
- if (i === !1) continue
135
- n === '__source' ? (s.__source = e.__source) : (s[n] = bt(n, i, t))
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
- bt = (e, t, s = '') => (t == null ? s : t.toString()),
144
- vt = (e, t) => {
294
+ $t = (e, t, s = '') => (t == null ? s : t.toString()),
295
+ Dt = (e, t) => {
145
296
  const s = e || {},
146
- r = j(t, s)
297
+ r = P(t, s)
147
298
  return (s.children = s.children || r), s
148
299
  },
149
- O = (e, t, s, r = []) => e.reduce(gt(t, s), r).flat(),
150
- gt = (e, t) => (s, r) =>
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
- ? O(r, e, t, s)
304
+ ? B(r, e, t, s)
154
305
  : (r.render(e, t).forEach((n) => s.push(n)), s)
155
306
  : s
156
- class M {
307
+ class V {
157
308
  constructor(t) {
158
- this.collection = T(t)
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 O(this.collection, t, this.parentElement)
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 yt {
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 Et {
351
+ class Vt {
201
352
  constructor(t, s, r = []) {
202
353
  this.type = t
203
- const { events: n, attributes: i } = ft(s)
354
+ const { events: n, attributes: o } = kt(s)
204
355
  ;(this.events = n),
205
- (this.attributes = i),
206
- (this.isSvg = ot(this.type, this.attributes.xmlns)),
207
- (this.children = new M(r))
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 = nt(this.type, this.attributes, this.events, t)
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 = ut(this.type, this.attributes, t.document)
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 yt(this.type, this.attributes).generate()
376
+ return new Bt(this.type, this.attributes).generate()
226
377
  }
227
378
  }
228
- const xt = (e, t, ...s) =>
229
- typeof e == 'string' ? new Et(e, t, s) : e(vt(t, s))
230
- xt.fragment = (e, t) => {
231
- const s = j(t, e)
232
- return new M(s)
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 At {
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 wt = (e, t, s) => {
260
- const r = new At(e, t, s)
410
+ const zt = (e, t, s) => {
411
+ const r = new Lt(e, t, s)
261
412
  return r.renderAndAttach(s), r
262
413
  },
263
- k = 'go-to-href',
264
- $ = 'go-to',
265
- m = 'navigation:location-change',
266
- D = 'navigation:route-change',
267
- Nt = /* @__PURE__ */ Object.freeze(
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: k,
272
- locationChangeEvent: m,
273
- navigationEvent: $,
274
- routeChangeEvent: D,
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
- P = (e) => {
431
+ K = (e) => {
281
432
  e.create('route', {
282
433
  host: '',
283
434
  path: '',
284
435
  query: {},
285
436
  })
286
437
  },
287
- V = (e) => {
438
+ R = (e) => {
288
439
  const t = e.closest('[href]')
289
440
  return (t && t.getAttribute('href')) || ''
290
441
  },
291
- E = (e, { publish: t, window: s }) => {
292
- s.history.pushState(null, '', e), t(m, null)
442
+ N = ({ payload: e, publish: t, window: s }) => {
443
+ s.history.pushState(null, '', e), t(g, null)
293
444
  },
294
- F = (e, t) => {
295
- if (!e || !e.target) return
296
- e.preventDefault()
297
- const s = V(e.target)
298
- E(s, t)
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
- L = (e) =>
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
- z = (e, t) => {
310
- const { state: s, publish: r, window: n } = t,
311
- { host: i, pathname: a, search: l } = n.location,
312
- u = a,
313
- d = L(l),
314
- c = {
315
- host: i,
316
- path: u,
317
- query: d,
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
- s.store('route').update(c), r(D, c)
471
+ t.store('route').update(h), s(z, h)
320
472
  },
321
- B = (e) => {
473
+ I = (e) => {
322
474
  const { subscribe: t } = e
323
- t(k, F),
324
- t($, (s, r) => {
325
- E(s, r)
475
+ t(F, U),
476
+ t(L, (s) => {
477
+ N(s)
326
478
  })
327
479
  },
328
- K = (e) => {
480
+ J = (e) => {
329
481
  const { publish: t, subscribe: s, state: r, window: n } = e
330
- P(r), n.addEventListener('popstate', () => t(m, null)), s(m, z)
482
+ K(r), n.addEventListener('popstate', () => t(g, null)), s(g, q)
331
483
  },
332
- R = (e) => {
333
- setTimeout(() => e.publish(m, null), 0)
484
+ G = (e) => {
485
+ setTimeout(() => e.publish(g, null), 0)
334
486
  },
335
- U = (e) => {
336
- K(e), B(e), R(e)
487
+ H = (e) => {
488
+ J(e), I(e), G(e)
337
489
  },
338
- _t = /* @__PURE__ */ Object.freeze(
490
+ Rt = /* @__PURE__ */ Object.freeze(
339
491
  /* @__PURE__ */ Object.defineProperty(
340
492
  {
341
493
  __proto__: null,
342
- publishLocation: R,
343
- startNavigation: U,
344
- subscribeToHistoryChange: K,
345
- subscribeToNavigation: B,
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 C {
503
+ class Q {
352
504
  constructor({
353
505
  window: t,
354
506
  document: s,
355
507
  publish: r,
356
508
  subscribe: n,
357
- bus: i,
509
+ bus: o,
358
510
  state: a,
359
- renderKit: l,
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 = i),
517
+ (this.bus = o),
366
518
  (this.state = a),
367
- (this.renderKit = l),
519
+ (this.renderKit = c),
368
520
  (this.roots = [])
369
521
  }
370
522
  render(t, s) {
371
- const r = wt(t, s, this.renderKit)
523
+ const r = zt(t, s, this.renderKit)
372
524
  return this.roots.push(r), r
373
525
  }
374
526
  startNavigation() {
375
- U(this)
527
+ H(this)
376
528
  }
377
529
  }
378
- const De = /* @__PURE__ */ Object.freeze(
530
+ const Ue = /* @__PURE__ */ Object.freeze(
379
531
  /* @__PURE__ */ Object.defineProperty(
380
532
  {
381
533
  __proto__: null,
382
- App: C,
534
+ App: Q,
383
535
  },
384
536
  Symbol.toStringTag,
385
537
  { value: 'Module' },
386
538
  ),
387
539
  )
388
- class I {
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 q {
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 St {
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 Tt = (e) => {
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
- jt = (e) => {
633
+ qt = (e) => {
482
634
  let t
483
- 'timer' in e ? (t = e) : (t = Tt(e))
484
- const s = new St(t)
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 J {
639
+ class Y {
488
640
  constructor() {
489
- ;(this.exactSubscriptions = new I()),
490
- (this.fuzzySubscriptions = new q()),
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, i) => n.index - i.index)
660
+ .sort((n, o) => n.index - o.index)
509
661
  .forEach((n) => {
510
- n.listener(s, this.listenerOptions(t))
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 G = () => {
525
- const e = new J()
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
- Pe = /* @__PURE__ */ Object.freeze(
685
+ Ce = /* @__PURE__ */ Object.freeze(
533
686
  /* @__PURE__ */ Object.defineProperty(
534
687
  {
535
688
  __proto__: null,
536
- ExactSubscriptions: I,
537
- FuzzySubscriptions: q,
538
- JaxsBus: J,
539
- createBus: G,
540
- publishPeriodically: jt,
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
- Ot = (e, t) => e === t,
547
- Mt = (e, t) => Object.keys(e).length === Object.keys(t).length,
548
- kt = (e, t) =>
549
- !(v(e) && v(t)) || !Mt(e, t)
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 x(r, n)
707
+ return E(r, n)
555
708
  }),
556
- $t = (e, t) =>
557
- !(f(e) && f(t)) || e.length !== t.length
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 x(s, n)
714
+ return E(s, n)
562
715
  }),
563
- x = (e, t) => (v(e) ? kt(e, t) : f(e) ? $t(e, t) : Ot(e, t))
564
- class g {
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
- x(this._value, t) || ((this._value = t), this.parent.notify(this.name))
745
+ E(this._value, t) || ((this._value = t), this.parent.notify(this.name))
588
746
  }
589
747
  getUpdatedValue(t) {
590
- return t(structuredClone(this.value))
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 zt = (e) => new Lt(e),
683
- Bt = {
684
- object: Pt,
685
- list: Ft,
686
- boolean: zt,
751
+ const Gt = {
752
+ object: b,
753
+ list: m,
754
+ boolean: f,
687
755
  },
688
- w = 'state'
689
- class H {
756
+ _ = 'state'
757
+ class st {
690
758
  constructor(t) {
691
759
  ;(this.publisher = t),
692
760
  (this.stores = {}),
693
- (this.eventNamePrefix = w),
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 g({
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 g({
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 Q = (e) => new H(e),
750
- Ve = /* @__PURE__ */ Object.freeze(
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: H,
755
- Store: g,
756
- createState: Q,
757
- eventName: w,
758
- updaters: Bt,
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 Kt {
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 C({
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 } = G()
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 = Q(this.publish)
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 Fe = (e = {}) => {
817
- const s = new Kt(e).setup()
884
+ const Je = (e = {}) => {
885
+ const s = new Ht(e).setup()
818
886
  return s.startNavigation(), s
819
887
  }
820
- var o = /* @__PURE__ */ ((e) => (
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
- ))(o || {})
834
- const Le = /* @__PURE__ */ Object.freeze(
901
+ ))(i || {})
902
+ const Ge = /* @__PURE__ */ Object.freeze(
835
903
  /* @__PURE__ */ Object.defineProperty(
836
904
  {
837
905
  __proto__: null,
838
- ChangeInstructionTypes: o,
906
+ ChangeInstructionTypes: i,
839
907
  },
840
908
  Symbol.toStringTag,
841
909
  { value: 'Module' },
842
910
  ),
843
911
  ),
844
- Rt = (e, t) => ({
912
+ Qt = (e, t) => ({
845
913
  source: e,
846
914
  target: t,
847
- type: o.changeText,
915
+ type: i.changeText,
848
916
  data: {},
849
917
  }),
850
- Ut = (e, t) => ({
918
+ Wt = (e, t) => ({
851
919
  source: e,
852
920
  target: t,
853
- type: o.replaceNode,
921
+ type: i.replaceNode,
854
922
  data: {},
855
923
  }),
856
- Ct = (e, t, s) => ({
924
+ Xt = (e, t, s) => ({
857
925
  source: e,
858
926
  target: t,
859
927
  data: s,
860
- type: o.removeAttribute,
928
+ type: i.removeAttribute,
861
929
  }),
862
- It = (e, t, s) => ({
930
+ Yt = (e, t, s) => ({
863
931
  source: e,
864
932
  target: t,
865
933
  data: s,
866
- type: o.addAttribute,
934
+ type: i.addAttribute,
867
935
  }),
868
- qt = (e, t, s) => ({
936
+ Zt = (e, t, s) => ({
869
937
  source: e,
870
938
  target: t,
871
939
  data: s,
872
- type: o.updateAttribute,
940
+ type: i.updateAttribute,
873
941
  }),
874
- Jt = (e, t, s) => ({
942
+ te = (e, t, s) => ({
875
943
  source: e,
876
944
  target: t,
877
945
  data: s,
878
- type: o.removeEvent,
946
+ type: i.removeEvent,
879
947
  }),
880
- Gt = (e, t, s) => ({
948
+ ee = (e, t, s) => ({
881
949
  source: e,
882
950
  target: t,
883
951
  data: s,
884
- type: o.addEvent,
952
+ type: i.addEvent,
885
953
  }),
886
- Ht = (e, t, s) => ({
954
+ se = (e, t, s) => ({
887
955
  source: e,
888
956
  target: t,
889
957
  data: s,
890
- type: o.updateEvent,
958
+ type: i.updateEvent,
891
959
  }),
892
- N = (e) => ({
960
+ S = (e) => ({
893
961
  source: e,
894
962
  target: e,
895
963
  // for type crap only
896
- type: o.removeNode,
964
+ type: i.removeNode,
897
965
  data: {},
898
966
  }),
899
- b = (e, t) => ({
967
+ A = (e, t) => ({
900
968
  target: e,
901
969
  source: e,
902
970
  // for type crap only
903
- type: o.insertNode,
971
+ type: i.insertNode,
904
972
  data: t,
905
973
  }),
906
- Qt = (e, t, s) => ({
974
+ re = (e, t, s) => ({
907
975
  source: e,
908
976
  target: t,
909
- type: o.changeValue,
977
+ type: i.changeValue,
910
978
  data: s,
911
979
  }),
912
- Wt = (e, t) => (e.type > t.type ? 1 : e.type < t.type ? -1 : 0),
913
- _ = { index: -1 }
914
- class Xt {
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) ? _ : this.map[s].shift()
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, i) => (i.element !== t && n.push(i), 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 S = (e) => {
948
- const t = new Xt()
1015
+ const j = (e) => {
1016
+ const t = new oe()
949
1017
  return t.populate(e), t
950
1018
  },
951
- W = (e, t, s = !1) => {
1019
+ nt = (e, t, s = !1) => {
952
1020
  const r = [],
953
1021
  n = e.attributes,
954
- i = n.length,
1022
+ o = n.length,
955
1023
  a = t.attributes,
956
- l = a.length
957
- let u, d, c
958
- for (u = 0; u < i; u++) {
959
- c = null
960
- const h = n.item(u)
961
- if (h) {
962
- for (d = 0; d < l; d++) {
963
- const p = a.item(d)
964
- if (p && h.name == p.name) {
965
- c = p
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
- c
970
- ? h.value !== c.value &&
1037
+ d
1038
+ ? l.value !== d.value &&
971
1039
  r.push(
972
- qt(e, t, {
973
- name: h.name,
974
- value: c.value,
1040
+ Zt(e, t, {
1041
+ name: l.name,
1042
+ value: d.value,
975
1043
  isSvg: s,
976
1044
  }),
977
1045
  )
978
- : r.push(Ct(e, t, { name: h.name, isSvg: s }))
1046
+ : r.push(Xt(e, t, { name: l.name, isSvg: s }))
979
1047
  }
980
1048
  }
981
- for (u = 0; u < l; u++) {
982
- c = null
983
- const h = a.item(u)
984
- if (h) {
985
- for (d = 0; d < i; d++) {
986
- const p = n.item(d)
987
- if (p && p.name == h.name) {
988
- c = p
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
- c ||
1060
+ d ||
993
1061
  r.push(
994
- It(e, t, {
995
- name: h.name,
996
- value: h.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
- Yt = (e, t) => {
1072
+ ie = (e, t) => {
1005
1073
  const s = [],
1006
1074
  r = e.eventMaps,
1007
1075
  n = t.eventMaps,
1008
- i = Object.keys(r),
1076
+ o = Object.keys(r),
1009
1077
  a = Object.keys(n)
1010
1078
  return (
1011
- i.forEach((l) => {
1012
- const u = r[l],
1013
- d = n[l]
1014
- d
1015
- ? d.busEvent !== u.busEvent &&
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
- Ht(e, t, {
1018
- name: l,
1019
- targetValue: d.listener,
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
- Jt(e, t, {
1092
+ te(e, t, {
1025
1093
  name: u.domEvent,
1026
1094
  value: u.listener,
1027
1095
  }),
1028
1096
  )
1029
1097
  }),
1030
- a.forEach((l) => {
1031
- const u = r[l],
1032
- d = n[l]
1098
+ a.forEach((c) => {
1099
+ const u = r[c],
1100
+ h = n[c]
1033
1101
  u ||
1034
1102
  s.push(
1035
- Gt(e, t, {
1036
- name: d.domEvent,
1037
- value: d.listener,
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
- Zt = (e) => e.tagName !== 'INPUT',
1045
- te = (e, t) => e.value === t.value,
1046
- ee = (e, t) => {
1047
- if (Zt(e) || te(e, t)) return []
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 [Qt(s, r, { name: 'value', value: r.value })]
1118
+ return [re(s, r, { name: 'value', value: r.value })]
1051
1119
  },
1052
- se = (e, t) => {
1053
- const s = W(e, t),
1054
- r = Yt(e, t),
1055
- n = ee(e, t)
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
- re = (e, t) => W(e, t, !0),
1059
- ne = (e, t) => (e.textContent !== t.textContent ? [Rt(e, t)] : []),
1060
- ie = (e, t, s) => {
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 && at(e)) {
1130
+ if (e.nodeType === 1 && Nt(e)) {
1063
1131
  const n = e,
1064
- i = t,
1065
- a = re(n, i),
1066
- l = s(n.childNodes, i.childNodes, n)
1067
- r = a.concat(l)
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
- i = t,
1071
- a = se(n, i),
1072
- l = s(n.childNodes, i.childNodes, n)
1073
- r = a.concat(l)
1074
- } else e.nodeType === 3 && (r = ne(e, t))
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
- X = (e, t, s) => {
1145
+ ot = (e, t, s) => {
1078
1146
  const r = [],
1079
- n = oe(e, t),
1080
- i = S(e),
1081
- a = S(t),
1082
- l = []
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 c = e[u],
1086
- h = t[u]
1087
- if (h && a.check(h)) {
1088
- const p = i.pullMatch(h)
1089
- a.clear(h),
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
- b(p.element, {
1161
+ A(p.element, {
1094
1162
  parent: s,
1095
1163
  index: u,
1096
1164
  }),
1097
1165
  ),
1098
- l.push({
1166
+ c.push({
1099
1167
  source: p.element,
1100
- target: h,
1168
+ target: l,
1101
1169
  }))
1102
- : c
1103
- ? a.check(c)
1104
- ? r.push(b(h, { parent: s, index: u }))
1105
- : (i.clear(c), r.push(Ut(c, h)))
1106
- : r.push(b(h, { parent: s, index: u }))
1107
- } else c && i.pullMatch(c).element && r.push(N(c))
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
- i.remaining().forEach(({ element: c }) => {
1110
- r.push(N(c))
1177
+ o.remaining().forEach(({ element: d }) => {
1178
+ r.push(S(d))
1111
1179
  })
1112
- const d = l.reduce(
1113
- (c, { source: h, target: p }) => c.concat(ie(h, p, X)),
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(d).sort(Wt)
1184
+ return r.concat(h).sort(ne)
1117
1185
  },
1118
- oe = (e, t) => {
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
- ue = (e, t, s) => {
1124
- const r = X(e, t, s)
1191
+ fe = (e, t, s) => {
1192
+ const r = ot(e, t, s)
1125
1193
  return (
1126
1194
  r.forEach((n) => {
1127
- ae(n)
1195
+ be(n)
1128
1196
  }),
1129
1197
  r
1130
1198
  )
1131
1199
  },
1132
- ae = (e) => {
1133
- ;(Ee[e.type] || ce)(e)
1200
+ be = (e) => {
1201
+ ;(je[e.type] || ve)(e)
1134
1202
  },
1135
- ce = (e) => {},
1136
- le = (e) => {
1203
+ ve = (e) => {},
1204
+ ge = (e) => {
1137
1205
  const { source: t, target: s } = e
1138
1206
  t.nodeValue = s.textContent
1139
1207
  },
1140
- he = (e) => {
1208
+ ye = (e) => {
1141
1209
  const { source: t } = e
1142
1210
  t.remove()
1143
1211
  },
1144
- de = (e) => {
1212
+ Ee = (e) => {
1145
1213
  const { target: t, data: s } = e,
1146
1214
  { parent: r, index: n } = s,
1147
- i = r.childNodes[n]
1148
- i ? i && i !== t && r.insertBefore(t, i) : r.appendChild(t)
1215
+ o = r.childNodes[n]
1216
+ o ? o && o !== t && r.insertBefore(t, o) : r.appendChild(t)
1149
1217
  },
1150
- pe = (e) => {
1218
+ Ae = (e) => {
1151
1219
  const { source: t, target: s } = e
1152
1220
  t.replaceWith(s)
1153
1221
  },
1154
- me = (e) => {
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
- Y = (e) => {
1227
+ it = (e) => {
1160
1228
  const { source: t, data: s } = e,
1161
- { name: r, value: n, isSvg: i } = s
1162
- i ? t.setAttributeNS(null, r, n) : t.setAttribute(r, n)
1229
+ { name: r, value: n, isSvg: o } = s
1230
+ o ? t.setAttributeNS(null, r, n) : t.setAttribute(r, n)
1163
1231
  },
1164
- fe = (e) => {
1165
- Y(e)
1232
+ we = (e) => {
1233
+ it(e)
1166
1234
  },
1167
- be = (e) => {
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
- ve = (e) => {
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
- ge = (e) => {
1247
+ Se = (e) => {
1180
1248
  const t = e.data,
1181
1249
  s = e.source,
1182
- { name: r, sourceValue: n, targetValue: i } = t
1183
- s.removeEventListener(r, n), s.addEventListener(r, i)
1250
+ { name: r, sourceValue: n, targetValue: o } = t
1251
+ s.removeEventListener(r, n), s.addEventListener(r, o)
1184
1252
  },
1185
- ye = (e) => {
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
- Ee = {
1192
- [o.changeText]: le,
1193
- [o.removeNode]: he,
1194
- [o.insertNode]: de,
1195
- [o.replaceNode]: pe,
1196
- [o.removeAttribute]: me,
1197
- [o.addAttribute]: Y,
1198
- [o.updateAttribute]: fe,
1199
- [o.removeEvent]: be,
1200
- [o.addEvent]: ve,
1201
- [o.updateEvent]: ge,
1202
- [o.changeValue]: ye,
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
- xe = (e, t, s) => {
1272
+ Oe = (e, t, s) => {
1205
1273
  const r = [...t]
1206
1274
  return (
1207
1275
  e.forEach((n) => {
1208
- Ae(n, r, s)
1276
+ Me(n, r, s)
1209
1277
  }),
1210
1278
  r
1211
1279
  )
1212
1280
  },
1213
- Ae = (e, t, s) => {
1214
- const r = Se[e.type]
1281
+ Me = (e, t, s) => {
1282
+ const r = Pe[e.type]
1215
1283
  r && r(e, t, s)
1216
1284
  },
1217
- we = (e, t) => {
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
- Ne = (e, t, s) => {
1290
+ $e = (e, t, s) => {
1223
1291
  const { target: r } = e,
1224
1292
  n = e.data,
1225
- { index: i, parent: a } = n
1226
- s === a && t.splice(i, 0, r)
1293
+ { index: o, parent: a } = n
1294
+ s === a && t.splice(o, 0, r)
1227
1295
  },
1228
- _e = (e, t) => {
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
- Se = {
1234
- [o.removeNode]: we,
1235
- [o.insertNode]: Ne,
1236
- [o.replaceNode]: _e,
1301
+ Pe = {
1302
+ [i.removeNode]: ke,
1303
+ [i.insertNode]: $e,
1304
+ [i.replaceNode]: De,
1237
1305
  }
1238
- class Te {
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 = ue(this.dom, t, this.parentElement)
1271
- this.dom = xe(s, this.dom, this.parentElement)
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 `${w}:${t}`
1348
+ return `${_}:${t}`
1281
1349
  }
1282
1350
  }
1283
- const je = (e) => e,
1284
- Oe = ({ Template: e, viewModel: t, subscriptions: s }) => (
1351
+ const Ve = (e) => e,
1352
+ Fe = ({ Template: e, viewModel: t, subscriptions: s }) => (
1285
1353
  (s = s || []),
1286
- (t = t || je),
1354
+ (t = t || Ve),
1287
1355
  (r) =>
1288
- new Te({ Template: e, viewModel: t, subscriptions: s, attributes: r })
1356
+ new Be({ Template: e, viewModel: t, subscriptions: s, attributes: r })
1289
1357
  ),
1290
- Me =
1358
+ Le =
1291
1359
  (e) =>
1292
1360
  ({ path: t }) =>
1293
1361
  t === e,
1294
- ke = () => !0,
1295
- Z =
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
- ze = /* @__PURE__ */ Object.freeze(
1369
+ He = /* @__PURE__ */ Object.freeze(
1302
1370
  /* @__PURE__ */ Object.defineProperty(
1303
1371
  {
1304
1372
  __proto__: null,
1305
- buildRouter: Z,
1306
- catchAll: ke,
1307
- exactPathMatch: Me,
1373
+ buildRouter: ut,
1374
+ catchAll: ze,
1375
+ exactPathMatch: Le,
1308
1376
  },
1309
1377
  Symbol.toStringTag,
1310
1378
  { value: 'Module' },
1311
1379
  ),
1312
1380
  ),
1313
- $e = () => ({
1381
+ Ke = () => ({
1314
1382
  render: (e, t) => [],
1315
1383
  }),
1316
- Be = (e) => {
1317
- const t = Z(e)
1318
- return Oe({
1319
- Template: ({ route: r }) => (t({ route: r }) || $e)(),
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
- Ke = /* @__PURE__ */ Object.freeze(
1391
+ We = /* @__PURE__ */ Object.freeze(
1324
1392
  /* @__PURE__ */ Object.defineProperty(
1325
1393
  {
1326
1394
  __proto__: null,
1327
- createRouteState: P,
1328
- events: Nt,
1329
- extractQueryParams: L,
1330
- findHref: V,
1331
- navigate: E,
1332
- onLinkClick: F,
1333
- onLocationChange: z,
1334
- start: _t,
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
- Le as JaxsTypes,
1342
- De as appBuilding,
1343
- Oe as bind,
1344
- Fe as createApp,
1345
- xt as jsx,
1346
- Pe as messageBus,
1347
- Ke as navigation,
1348
- Be as routedView,
1349
- ze as routing,
1350
- Ve as state,
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
  }