@reactive-web-components/rwc 2.61.10 → 2.63.7

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.
@@ -1,18 +1,18 @@
1
- var dt = Object.defineProperty;
2
- var ht = (s, t, e) => t in s ? dt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var f = (s, t, e) => ht(s, typeof t != "symbol" ? t + "" : t, e);
4
- const F = (s) => s && typeof s == "object" && ("classList" in s || "attributes" in s || "customAttributes" in s || "reactiveClassList" in s || "listeners" in s || "customListeners" in s || "children" in s || "effects" in s || "style" in s || Object.keys(s).some(
1
+ var lt = Object.defineProperty;
2
+ var at = (s, t, e) => t in s ? lt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var f = (s, t, e) => at(s, typeof t != "symbol" ? t + "" : t, e);
4
+ const F = (s) => s && typeof s == "object" && ("classList" in s || "attributes" in s || "customAttributes" in s || "reactiveClassList" in s || "listeners" in s || "customListeners" in s || "children" in s || "effects" in s || "ref" in s || "style" in s || Object.keys(s).some(
5
5
  (t) => t.startsWith(".") || t.startsWith("@") || t.startsWith("$")
6
- )) && !("hostElement" in s), ft = (s) => s && typeof s == "object" && "hostElement" in s && "append" in s && "set" in s && "addStyle" in s && "setAttribute" in s && "addClass" in s && "addEffect" in s && "addReactiveContent" in s && "setReactiveContent" in s && "clear" in s, G = (s, t, ...e) => {
6
+ )) && !("hostElement" in s), dt = (s) => s && typeof s == "object" && "hostElement" in s && "append" in s && "set" in s && "addStyle" in s && "setAttribute" in s && "addClass" in s && "addEffect" in s && "addReactiveContent" in s && "setReactiveContent" in s && "clear" in s, G = (s, t, ...e) => {
7
7
  t && t.apply(s, e);
8
8
  };
9
9
  let z = !0;
10
- const S = (...s) => {
10
+ const C = (...s) => {
11
11
  z && console.debug(
12
12
  ["[rwc]", ...s].join(" | "),
13
13
  ...Array.from(s.join("").matchAll(/%c/gm)).map((t, e) => e % 2 === 0 ? "color:red" : "color:inherit")
14
14
  );
15
- }, V = (s) => s.replace(/([A-Z])/gm, (t) => `-${t.toLowerCase()}`), ut = (s) => s.replace(/-(\w)/gm, (t, e) => e.toUpperCase()), B = (s, ...t) => {
15
+ }, N = (s) => s.replace(/([A-Z])/gm, (t) => `-${t.toLowerCase()}`), ht = (s) => s.replace(/-(\w)/gm, (t, e) => e.toUpperCase()), V = (s, ...t) => {
16
16
  if (!z) return;
17
17
  const e = {
18
18
  r: "color: #ff0000",
@@ -31,70 +31,56 @@ const S = (...s) => {
31
31
  // orange
32
32
  w: "color: #808080"
33
33
  // gray (w for white/gray)
34
- }, n = s.match(/@[rgbpycow]/g) || [], o = n.map((c) => {
35
- const i = c.slice(1);
36
- return e[i] || "color: inherit";
34
+ }, n = s.match(/@[rgbpycow]/g) || [], o = n.map((i) => {
35
+ const c = i.slice(1);
36
+ return e[c] || "color: inherit";
37
37
  });
38
38
  let r = s;
39
- n.forEach((c) => {
40
- const i = new RegExp(`\\${c}([^\\s,]+)`, "g");
41
- r = r.replace(i, "%c$1");
39
+ n.forEach((i) => {
40
+ const c = new RegExp(`\\${i}([^\\s,]+)`, "g");
41
+ r = r.replace(c, "%c$1");
42
42
  }), console.log(r, ...o, ...t);
43
- }, Bt = () => {
43
+ }, kt = () => {
44
44
  z = !0;
45
- }, pt = () => {
45
+ }, ft = () => {
46
46
  z = !1;
47
47
  };
48
- pt();
49
- const Vt = (s, t) => {
48
+ ft();
49
+ const Pt = (s, t) => {
50
50
  s.every(Boolean) && t(s);
51
51
  }, k = /* @__PURE__ */ new Set();
52
- let Y = !1, K = !1;
53
- const mt = () => {
54
- if (!K) {
55
- K = !0;
56
- try {
57
- if (Y = !1, k.size === 0)
58
- return;
59
- const s = Array.from(k);
60
- k.clear(), s.forEach((t) => {
61
- if (t.status === "active") {
62
- Z(t), O.push(t);
63
- try {
64
- t();
65
- } catch (e) {
66
- console.error("Error in effect:", e);
67
- } finally {
68
- O.pop();
69
- }
52
+ let K = !1;
53
+ const ut = (s) => {
54
+ s.status === "active" && k.add(s), K || (K = !0, queueMicrotask(() => {
55
+ K = !1, C("pendingEffects.size", k.size);
56
+ const t = Array.from(k);
57
+ k.clear(), t.forEach((e) => {
58
+ if (e.status === "active") {
59
+ U(e), O.push(e);
60
+ try {
61
+ e();
62
+ } catch (n) {
63
+ console.error("Error in effect:", n);
64
+ } finally {
65
+ O.pop();
70
66
  }
71
- }), k.size > 0 && nt();
72
- } finally {
73
- K = !1;
74
- }
75
- }
76
- };
77
- function Et() {
78
- queueMicrotask(mt);
79
- }
80
- const nt = () => {
81
- Y || (Y = !0, Et());
82
- }, Ct = (s) => {
83
- k.add(s), nt();
84
- }, O = [], Z = (s) => {
67
+ }
68
+ }), C("after ------ pendingEffects.size", k.size);
69
+ }));
70
+ }, O = [], U = (s) => {
85
71
  var t, e, n, o;
86
72
  (t = s.children) == null || t.forEach((r) => {
87
- var c;
88
- return (c = r.destroy) == null ? void 0 : c.call(r);
73
+ var i;
74
+ return (i = r.destroy) == null ? void 0 : i.call(r);
89
75
  }), (e = s.children) == null || e.clear(), (n = s.cleanupSet) == null || n.forEach((r) => r()), (o = s.cleanupSet) == null || o.clear();
90
76
  };
91
77
  function j(s, t) {
92
78
  let e = (t == null ? void 0 : t.signalCompareFn) || (() => !0);
93
79
  const n = /* @__PURE__ */ new Set();
94
80
  function o() {
95
- var c;
81
+ var i;
96
82
  const r = O[O.length - 1];
97
- return r && !r.fake && !n.has(r) && r.status === "active" && (n.add(r), (c = r.cleanupSet) == null || c.add(() => n.delete(r))), !(t != null && t.name) && (r != null && r.effectId) && o.setName(r.effectId), s;
83
+ return r && !r.fake && !n.has(r) && r.status === "active" && (n.add(r), (i = r.cleanupSet) == null || i.add(() => n.delete(r))), !(t != null && t.name) && (r != null && r.effectId) && o.setName(r.effectId), s;
98
84
  }
99
85
  return o.signalId = `${(t == null ? void 0 : t.name) || ""}_${Math.random().toString(36).substring(2, 15)}`, o.setName = function(r) {
100
86
  return o.signalId = `${r}_${Math.random().toString(36).substring(2, 15)}`, o;
@@ -107,93 +93,99 @@ function j(s, t) {
107
93
  }, o.peek = function() {
108
94
  return Object.freeze(s);
109
95
  }, o.initValue = Object.freeze(s), o.forceSet = function(r) {
110
- s = r, n.forEach((c) => {
111
- Ct(c);
112
- });
113
- }, o.set = function(r, c = e) {
114
- s !== r && c(s, r) && o.forceSet(r);
96
+ s = r, n.forEach((i) => ut(i));
97
+ }, o.set = function(r, i = e) {
98
+ s !== r && i(s, r) && o.forceSet(r);
115
99
  }, o.update = function(r) {
116
100
  o.set(r(s));
117
- }, o.pipe = (r, c) => {
118
- c != null && c.name && o.setName(c.name);
119
- const i = j(null);
101
+ }, o.pipe = (r, i) => {
102
+ i != null && i.name && o.setName(i.name);
103
+ const c = j(null);
120
104
  return w(
121
105
  () => {
122
106
  const a = o();
123
107
  w(
124
108
  () => {
125
109
  const h = r(a);
126
- h instanceof Promise ? h.then((m) => i.set(m)) : g(h) ? w(() => i.set(h()), {
110
+ h instanceof Promise ? h.then((m) => c.set(m)) : g(h) ? w(() => c.set(h()), {
127
111
  name: "pipe_effect_inner"
128
- }) : i.set(h);
112
+ }) : c.set(h);
129
113
  },
130
114
  { name: "pipe_effect" }
131
115
  );
132
116
  },
133
- { name: (c == null ? void 0 : c.name) || `pipe_${o.signalId}` }
134
- ), i;
117
+ { name: (i == null ? void 0 : i.name) || `pipe_${o.signalId}` }
118
+ ), c;
135
119
  }, o;
136
120
  }
137
121
  function w(s, t) {
138
122
  var r;
139
123
  const e = `${(t == null ? void 0 : t.name) || ""}_${Math.random().toString(36).substring(2, 15)}`;
140
- S("current effect", `%c${e}%c`);
124
+ C("current effect", `%c${e}%c`);
141
125
  const n = s;
142
126
  n.status = "active", n.children = /* @__PURE__ */ new Set(), n.effectId = e;
143
127
  const o = O[O.length - 1];
144
- o && ((r = o.children) == null || r.add(n), n.parent = new WeakRef(o), n.destroy = () => {
145
- var c;
146
- Z(n), (c = o.children) == null || c.delete(n), n.destroy = void 0, n.status = "inactive";
147
- }), n.cleanupSet = /* @__PURE__ */ new Set(), O.push(n), n(), O.pop();
128
+ return o && ((r = o.children) == null || r.add(n), n.parent = new WeakRef(o), n.destroy = () => {
129
+ var i;
130
+ U(n), (i = o.children) == null || i.delete(n), n.destroy = void 0, n.status = "inactive";
131
+ }), n.cleanupSet = /* @__PURE__ */ new Set(), O.push(n), n(), O.pop(), n;
148
132
  }
149
133
  const g = (s) => !!s && ["object", "function"].includes(typeof s) && "set" in s && "update" in s && "forceSet" in s && "signalId" in s;
150
- function Jt(s, ...t) {
134
+ function Ft(s, ...t) {
151
135
  const e = j("");
152
136
  return w(() => {
153
137
  const n = t.map(
154
138
  (r) => g(r) ? String(r()) : String(r)
155
139
  ), o = [s[0]];
156
- n.forEach((r, c) => {
157
- o.push(r, s[c + 1]);
140
+ n.forEach((r, i) => {
141
+ o.push(r, s[i + 1]);
158
142
  }), e.set(o.join(""));
159
143
  }), e;
160
144
  }
161
- function qt(s, t) {
145
+ function Bt(s, t) {
162
146
  const e = j(t ?? null), n = (o) => e.set(o);
163
147
  return s instanceof Promise ? s.then(n) : typeof s == "function" && w(() => {
164
148
  const o = s();
165
149
  o instanceof Promise ? o.then(n) : g(o) ? w(() => n(o())) : n(o);
166
150
  }), e;
167
151
  }
168
- function zt(s, t) {
152
+ function Vt(s, t) {
169
153
  let e = s(), n = t();
170
154
  w(() => {
171
155
  const o = s(), r = t();
172
156
  o !== r && (o !== e ? t.set(o) : r !== n && s.set(r)), e = o, n = r;
173
157
  });
174
158
  }
175
- function Dt(...s) {
159
+ function Nt(...s) {
176
160
  let t = s.map((n) => n());
177
161
  const e = j(t);
178
162
  return s.forEach((n, o) => {
179
163
  w(() => {
180
- const r = () => t.filter((c) => c !== void 0).length;
164
+ const r = () => t.filter((i) => i !== void 0).length;
181
165
  r() === s.length && (t = Array.from(t).fill(void 0)), t[o] = n(), r() === s.length && e.set([...t]);
182
166
  });
183
167
  }), e;
184
168
  }
185
- const Gt = (...s) => {
169
+ const Jt = (...s) => {
186
170
  const t = j([]);
187
171
  return w(() => {
188
- t.set(s.map((e) => e()));
172
+ t.set(
173
+ s.map((e) => e())
174
+ );
189
175
  }), t;
190
- }, J = "eventProps", q = "EVENT_CONFIG", P = "observedAttributes", Kt = () => (s, t) => {
176
+ }, qt = (s, t) => {
177
+ let e = !0;
178
+ const n = w(() => {
179
+ var o;
180
+ e && (e = !1, t(s()), (o = n.destroy) == null || o.call(n));
181
+ });
182
+ }, J = "eventProps", q = "EVENT_CONFIG", P = "observedAttributes", zt = () => (s, t) => {
191
183
  Reflect.get(s, P) || Reflect.defineProperty(s, P, {
192
184
  value: []
193
185
  }), Reflect.get(s, P).push(
194
- V(t)
186
+ N(t)
195
187
  );
196
- }, Yt = (s) => (t, e) => {
188
+ }, Dt = (s) => (t, e) => {
197
189
  Reflect.get(t, J) || Reflect.defineProperty(t, J, {
198
190
  value: []
199
191
  }), Reflect.get(t, q) || Reflect.defineProperty(t, q, {
@@ -202,78 +194,78 @@ const Gt = (...s) => {
202
194
  bubbles: (s == null ? void 0 : s.bubbles) ?? !1,
203
195
  composed: (s == null ? void 0 : s.composed) ?? !1
204
196
  }, Reflect.get(t, J).push(e);
205
- }, ot = (s, t = !1) => (e) => {
206
- S(
197
+ }, st = (s, t = !1) => (e) => {
198
+ C(
207
199
  s,
208
200
  "start register static attr",
209
201
  e.prototype[P]
210
202
  );
211
203
  const n = [];
212
204
  if (e.styles) {
213
- const r = e.styles, c = [];
214
- Array.isArray(r) ? c.push(...r) : c.push(r), c.forEach((i) => {
205
+ const r = e.styles, i = [];
206
+ Array.isArray(r) ? i.push(...r) : i.push(r), i.forEach((c) => {
215
207
  const a = new CSSStyleSheet();
216
- a.replaceSync(i), n.push(a);
217
- const C = new CSSStyleSheet();
218
- C.replaceSync(i.slice(i.indexOf("@property"))), document.adoptedStyleSheets.push(C);
208
+ a.replaceSync(c), n.push(a);
209
+ const b = new CSSStyleSheet();
210
+ b.replaceSync(c.slice(c.indexOf("@property"))), document.adoptedStyleSheets.push(b);
219
211
  });
220
212
  }
221
213
  class o extends e {
222
- constructor(...c) {
223
- S("constructor", `%c${s}%c`), super(t, ...c), n.length > 0 && this.shadow.adoptedStyleSheets.push(...n);
214
+ constructor(...i) {
215
+ C("constructor", `%c${s}%c`), super(t, ...i), n.length > 0 && this.shadow.adoptedStyleSheets.push(...n);
224
216
  }
225
217
  render() {
226
- return S("rwc: render from new class"), e.prototype.render.call(this);
218
+ return C("rwc: render from new class"), e.prototype.render.call(this);
227
219
  }
228
- attributeChangedCallback(c, i, a) {
229
- S(
220
+ attributeChangedCallback(i, c, a) {
221
+ C(
230
222
  "%cAttribute has changed.%c",
231
- `%c${c}%c`,
232
- `oldValue: ${i}, newValue: ${a}`,
223
+ `%c${i}%c`,
224
+ `oldValue: ${c}, newValue: ${a}`,
233
225
  `%c${s}%c`
234
226
  );
235
227
  try {
236
228
  a = JSON.parse(a);
237
229
  } catch {
238
230
  }
239
- const C = ut(c);
240
- if (C in this && g(this[C])) {
241
- const h = this[C];
242
- h.setName(c), a === null ? (h.set(h.initValue), this.removeAttribute(c)) : h.set(a);
231
+ const b = ht(i);
232
+ if (b in this && g(this[b])) {
233
+ const h = this[b];
234
+ h.setName(i), a === null ? (h.set(h.initValue), this.removeAttribute(i)) : h.set(a);
243
235
  }
244
236
  G(
245
237
  this,
246
238
  e.prototype.attributeChangedCallback,
247
- c,
248
239
  i,
240
+ c,
249
241
  a
250
242
  );
251
243
  }
252
244
  connectedCallback() {
253
- const c = () => {
254
- var a, C;
255
- S("rwc: connectedCallback"), S("connectedCallback", `%c${s}%c`, this), (a = this.init) == null || a.call(this), this.providers && Object.keys(this.providers).length > 0 && (S("WRAPPER for providers", s), Object.entries(this.providers).forEach(
245
+ const i = () => {
246
+ var a, b;
247
+ C("rwc: connectedCallback"), C("connectedCallback", `%c${s}%c`, this), (a = this.init) == null || a.call(this), this.providers && Object.keys(this.providers).length > 0 && (C("WRAPPER for providers", s), Object.entries(this.providers).forEach(
256
248
  ([h, d]) => {
257
- S("register provider", h, d()), this.addEventListener(h, (m) => {
249
+ C("register provider", h, d()), this.addEventListener(h, (m) => {
258
250
  var u;
259
- S("send provider", h, d());
251
+ C("send provider", h, d());
260
252
  const p = m;
261
253
  ((u = p.detail) == null ? void 0 : u.context) === h && (p.stopPropagation(), p.detail.callback(d));
262
254
  });
263
255
  }
264
- )), this.checkInjects(), (C = e.prototype[J]) == null || C.forEach(
256
+ )), this.checkInjects(), (b = e.prototype[J]) == null || b.forEach(
265
257
  (h) => {
266
258
  this[h] = (d) => {
267
259
  const m = e.prototype[q][h], { bubbles: p, composed: u } = m;
268
260
  g(d) ? w(() => {
269
- B("@oemit reactive value", d()), this.dispatchEvent(
261
+ V("@oemit reactive value", d()), this.dispatchEvent(
270
262
  new CustomEvent(h, {
271
263
  detail: d(),
272
264
  bubbles: p,
273
265
  composed: u
274
266
  })
275
267
  );
276
- }) : (B("@oemit value", d), this.dispatchEvent(
268
+ }) : (V("@oemit value", d), this.dispatchEvent(
277
269
  new CustomEvent(h, {
278
270
  detail: d,
279
271
  bubbles: p,
@@ -282,9 +274,9 @@ const Gt = (...s) => {
282
274
  ));
283
275
  };
284
276
  }
285
- ), S("start render", `%c${s}%c`, s);
286
- const i = () => {
287
- S("rwc: insertRenderTemplate");
277
+ ), C("start render", `%c${s}%c`, s);
278
+ const c = () => {
279
+ C("rwc: insertRenderTemplate");
288
280
  const d = this.render().hostElement;
289
281
  d && this.shadow.appendChild(d), G(this, e.prototype.connectedCallback), this.appendSlotContent();
290
282
  };
@@ -297,25 +289,25 @@ const Gt = (...s) => {
297
289
  };
298
290
  if (h(d)) {
299
291
  const p = [];
300
- Array.isArray(d) ? p.push(...d) : p.push(d), Promise.all(p).then((u) => u.forEach((y) => m(y.default))).then(() => i());
292
+ Array.isArray(d) ? p.push(...d) : p.push(d), Promise.all(p).then((u) => u.forEach((y) => m(y.default))).then(() => c());
301
293
  } else {
302
294
  const p = [];
303
- Array.isArray(d) ? p.push(...d) : p.push(d), p.forEach((u) => m(u)), i();
295
+ Array.isArray(d) ? p.push(...d) : p.push(d), p.forEach((u) => m(u)), c();
304
296
  }
305
297
  } else
306
- i();
298
+ c();
307
299
  this.slotContext && Object.keys(this.slotContext).length > 0 && this.shadow.querySelectorAll("slot").forEach((h) => {
308
- S(
300
+ C(
309
301
  this.slotContext,
310
302
  this.slotContext && this.slotContext[h.name]
311
- ), B(
303
+ ), V(
312
304
  "@bslot element",
313
305
  h,
314
306
  `name:${h.name};`,
315
307
  h.assignedElements()
316
308
  ), h.assignedElements().forEach((d) => {
317
309
  const m = this.slotContext[h.name];
318
- this.slotContext && g(m) && (B(
310
+ this.slotContext && g(m) && (V(
319
311
  "@oslot element",
320
312
  h,
321
313
  `name:${h.name};`,
@@ -330,12 +322,12 @@ const Gt = (...s) => {
330
322
  });
331
323
  });
332
324
  };
333
- c.fake = !0, c.component = new WeakRef(this), this.effectSet.add(new WeakRef(c)), w(c, { name: "FAKE_wrapperEffect" });
325
+ i.fake = !0, i.component = new WeakRef(this), this.effectSet.add(new WeakRef(i)), w(i, { name: "FAKE_wrapperEffect" });
334
326
  }
335
327
  disconnectedCallback() {
336
- this.allSlotContent = [], this.slotContent = {}, this.htmlSlotContent = {}, this.effectSet.forEach((c) => {
337
- var i, a;
338
- return (a = (i = c.deref()) == null ? void 0 : i.destroy) == null ? void 0 : a.call(i);
328
+ this.allSlotContent = [], this.slotContent = {}, this.htmlSlotContent = {}, this.effectSet.forEach((i) => {
329
+ var c, a;
330
+ return (a = (c = i.deref()) == null ? void 0 : c.destroy) == null ? void 0 : a.call(c);
339
331
  }), this.effectSet.clear(), this.shadow.replaceChildren(), this.replaceChildren(), G(this, e.prototype.disconnectedCallback);
340
332
  }
341
333
  }
@@ -377,11 +369,11 @@ class _ extends HTMLElement {
377
369
  (e = this.appendAllSlotContent) == null || e.call(this);
378
370
  }
379
371
  inject(e) {
380
- return S("%cinject%c", e), this.injects[e] || (this.injects[e] = j(null)), this.injects[e];
372
+ return C("%cinject%c", e), this.injects[e] || (this.injects[e] = j(null)), this.injects[e];
381
373
  }
382
374
  checkInjects() {
383
375
  Object.entries(this.injects).forEach(([e, n]) => {
384
- S(
376
+ C(
385
377
  "%cinject%c",
386
378
  `%c${e}%c`,
387
379
  "from BaseElement (dispatch event)"
@@ -404,24 +396,24 @@ class _ extends HTMLElement {
404
396
  }
405
397
  }
406
398
  f(_, "observedAttributes", []), f(_, "renderTagName", ""), f(_, "styles");
407
- const Zt = (s) => "render" in s && "setReactiveValue" in s, bt = "handleSlotContext", Q = "onConnected", rt = (s) => typeof s == "string" ? s : JSON.stringify(s), St = (s) => {
399
+ const Gt = (s) => "render" in s && "setReactiveValue" in s, pt = "handleSlotContext", X = "onConnected", nt = (s) => typeof s == "string" ? s : JSON.stringify(s), mt = (s) => {
408
400
  const t = document.createElement("span");
409
- return t.textContent = rt(s), t;
410
- }, ct = (s, t) => (s.appendChild(St(t)), s), yt = (s, t) => (s.replaceChildren(), ct(s, t)), tt = (s) => {
401
+ return t.textContent = nt(s), t;
402
+ }, ot = (s, t) => (s.appendChild(mt(t)), s), Et = (s, t) => (s.replaceChildren(), ot(s, t)), Q = (s) => {
411
403
  const t = document.createElement("span");
412
404
  return w(() => {
413
405
  const e = s();
414
- t.textContent = rt(e);
406
+ t.textContent = nt(e);
415
407
  }), t;
416
408
  };
417
- class it {
409
+ class rt {
418
410
  constructor(t) {
419
411
  f(this, "wrapper");
420
412
  f(this, "keyedEffects", /* @__PURE__ */ new Map());
421
413
  f(this, "append", (...t) => (t.forEach((e) => {
422
414
  var o;
423
415
  const n = e.hostElement;
424
- n && ((o = this.hostElement) == null || o.appendChild(n), Q in n && setTimeout(() => {
416
+ n && ((o = this.hostElement) == null || o.appendChild(n), X in n && setTimeout(() => {
425
417
  var r;
426
418
  (r = n.onConnected) == null || r.call(
427
419
  n,
@@ -450,14 +442,15 @@ class it {
450
442
  }), this));
451
443
  f(this, "addHtmlContent", (t) => {
452
444
  const e = this.hostElement;
453
- return e ? (ct(e, t), this) : this;
445
+ return e ? (ot(e, t), this) : this;
454
446
  });
455
447
  f(this, "setHtmlContent", (t) => {
456
448
  const e = this.hostElement;
457
- return e ? (yt(e, t), this) : this;
449
+ return e ? (Et(e, t), this) : this;
458
450
  });
459
451
  f(this, "setAttribute", (t, e) => {
460
452
  var r;
453
+ C("setAttribute", t, e);
461
454
  const n = this.hostElement;
462
455
  if (!n) return this;
463
456
  let o;
@@ -466,30 +459,30 @@ class it {
466
459
  o = "";
467
460
  else {
468
461
  this.removeAttribute(t);
469
- const c = t.toLowerCase();
470
- return c in n && (n[c] = null), this;
462
+ const i = t.toLowerCase();
463
+ return i in n && (n[i] = null), this;
471
464
  }
472
465
  else typeof e != "string" ? o = JSON.stringify(e) : o = e;
473
- if ((r = this.hostElement) == null || r.setAttribute(V(t), o), !(n instanceof _)) {
474
- const c = t.toLowerCase();
475
- c in n && (n[c] = e);
466
+ if ((r = this.hostElement) == null || r.setAttribute(N(t), o), !(n instanceof _)) {
467
+ const i = t.toLowerCase();
468
+ i in n && (n[i] = e);
476
469
  }
477
470
  return this;
478
471
  });
479
472
  f(this, "setCustomAttribute", (t, e) => {
480
473
  var o;
481
474
  let n;
482
- return typeof e != "string" ? n = JSON.stringify(e) : n = e, (o = this.hostElement) == null || o.setAttribute(V(t), n), this;
475
+ return typeof e != "string" ? n = JSON.stringify(e) : n = e, (o = this.hostElement) == null || o.setAttribute(N(t), n), this;
483
476
  });
484
477
  f(this, "setReactiveAttribute", (t, e) => (this.addEffect((n) => {
485
- n.setAttribute(t, e());
478
+ C("setReactiveAttribute effect", t, e), n.setAttribute(t, e());
486
479
  }, t), this));
487
480
  f(this, "setReactiveCustomAttribute", (t, e) => (this.addEffect((n) => {
488
481
  n.setCustomAttribute(t, e());
489
482
  }), this));
490
483
  f(this, "removeAttribute", (t) => {
491
484
  var e;
492
- return (e = this.hostElement) == null || e.removeAttribute(V(t)), this;
485
+ return (e = this.hostElement) == null || e.removeAttribute(N(t)), this;
493
486
  });
494
487
  f(this, "addStyle", (t) => {
495
488
  const e = this.hostElement;
@@ -497,14 +490,14 @@ class it {
497
490
  const r = n.startsWith("--");
498
491
  typeof o == "function" ? this.addEffect(() => {
499
492
  if (r) {
500
- const c = String(o() || "");
501
- e.style.setProperty(n, c);
493
+ const i = String(o() || "");
494
+ e.style.setProperty(n, i);
502
495
  } else
503
496
  e.style[n] = o();
504
497
  }) : typeof o == "string" && (r ? e.style.setProperty(n, o) : e.style[n] = o);
505
498
  }), this) : this;
506
499
  });
507
- f(this, "onConnected", (t) => this.hostElement ? (Reflect.defineProperty(this.hostElement, Q, {
500
+ f(this, "onConnected", (t) => this.hostElement ? (Reflect.defineProperty(this.hostElement, X, {
508
501
  get() {
509
502
  return t;
510
503
  }
@@ -540,23 +533,23 @@ class it {
540
533
  return (n = this.hostElement) == null || n.classList.replace(t, e), this;
541
534
  });
542
535
  f(this, "addEffect", (t, e) => {
543
- var r, c;
536
+ var r, i;
544
537
  const n = this.hostElement;
545
538
  if (!n) return this;
546
539
  const o = () => t(this, n);
547
540
  if (e) {
548
- const i = (r = this.keyedEffects.get(e)) == null ? void 0 : r.deref();
549
- i && Z(i);
541
+ const c = (r = this.keyedEffects.get(e)) == null ? void 0 : r.deref();
542
+ c && U(c);
550
543
  }
551
- return (c = n.effectSet) == null || c.add(new WeakRef(o)), o.component = this.wrapper, w(o, { name: (e == null ? void 0 : e.toString()) || n.tagName }), this;
544
+ return (i = n.effectSet) == null || i.add(new WeakRef(o)), o.component = this.wrapper, w(o, { name: (e == null ? void 0 : e.toString()) || n.tagName }), this;
552
545
  });
553
546
  f(this, "addReactiveContent", (t) => {
554
547
  var e;
555
- return (e = this.hostElement) == null || e.appendChild(tt(t)), this;
548
+ return (e = this.hostElement) == null || e.appendChild(Q(t)), this;
556
549
  });
557
550
  f(this, "setReactiveContent", (t) => {
558
551
  var e;
559
- return this.clear(), (e = this.hostElement) == null || e.appendChild(tt(t)), this;
552
+ return this.clear(), (e = this.hostElement) == null || e.appendChild(Q(t)), this;
560
553
  });
561
554
  f(this, "clear", () => {
562
555
  var t;
@@ -578,53 +571,54 @@ class it {
578
571
  ), this;
579
572
  }
580
573
  }
581
- class wt extends it {
574
+ class Ct extends rt {
582
575
  constructor() {
583
576
  super(...arguments);
584
577
  f(this, "setReactiveValue", (e) => (this.hostElement instanceof _ && this.hostElement.setReactiveValue(e), this));
585
578
  f(this, "setSlotTemplate", (e) => {
586
579
  var o;
587
580
  const n = (o = this.hostElement) == null ? void 0 : o.slotTemplate;
588
- return n && Object.entries(e).forEach(([r, c]) => {
589
- n[r] = c;
581
+ return n && Object.entries(e).forEach(([r, i]) => {
582
+ n[r] = i;
590
583
  }), this;
591
584
  });
592
585
  }
593
586
  }
594
- const Ut = () => () => {
595
- }, vt = (s) => new wt(new WeakRef(s)), At = (s) => new it(new WeakRef(s)), Rt = (s, ...t) => ({
587
+ const Kt = () => () => {
588
+ }, bt = (s) => new Ct(new WeakRef(s)), St = (s) => new rt(new WeakRef(s)), yt = (s, ...t) => ({
596
589
  classList: [...s.map((e) => e.trim()).filter(Boolean), ...t]
597
- }), Xt = (s, ...t) => Rt(s, ...t), lt = (s, t) => {
590
+ }), Ut = (s, ...t) => yt(s, ...t), it = (s, t) => {
591
+ var o;
598
592
  if (!t || !s.deref()) return;
599
593
  const e = Object.keys(t || {}).filter(
600
- (o) => o.startsWith(".") || o.startsWith("@") || o.startsWith("$")
594
+ (r) => r.startsWith(".") || r.startsWith("@") || r.startsWith("$")
601
595
  );
602
- e.filter((o) => o.startsWith(".")).forEach((o) => {
603
- t != null && t.attributes || (t.attributes = {}), t.attributes[o.slice(1)] = t[o];
604
- }), e.filter((o) => o.startsWith("@")).forEach((o) => {
596
+ e.filter((r) => r.startsWith(".")).forEach((r) => {
597
+ t != null && t.attributes || (t.attributes = {}), t.attributes[r.slice(1)] = t[r];
598
+ }), e.filter((r) => r.startsWith("@")).forEach((r) => {
605
599
  t != null && t.listeners || (t.listeners = {});
606
- const r = o.slice(1);
607
- t.listeners[r] = t[o];
608
- }), e.filter((o) => o.startsWith("$")).forEach((o) => {
609
- t != null && t.effects || (t.effects = []), t.effects.push(t[o]);
600
+ const i = r.slice(1);
601
+ t.listeners[i] = t[r];
602
+ }), e.filter((r) => r.startsWith("$")).forEach((r) => {
603
+ t != null && t.effects || (t.effects = []), t.effects.push(t[r]);
610
604
  });
611
605
  const n = s.deref();
612
606
  if (n)
613
- return Ot(n, t.classList), jt(n, t.style), Tt(n, t.attributes), Mt(n, t.reactiveClassList), It(n, t.customAttributes), Lt(n, t.children), gt(n, t.effects), et(n, t.listeners), et(n, t.customListeners), n;
614
- }, et = (s, t) => {
607
+ return Rt(n, t.classList), Lt(n, t.style), It(n, t.attributes), gt(n, t.reactiveClassList), At(n, t.customAttributes), vt(n, t.children), wt(n, t.effects), tt(n, t.listeners), tt(n, t.customListeners), (o = t.ref) == null || o.set(n), n;
608
+ }, tt = (s, t) => {
615
609
  t && Object.entries(t).forEach(([e, n]) => {
616
610
  typeof n == "function" && s.addEventlistener(e, n);
617
611
  });
618
- }, gt = (s, t) => t == null ? void 0 : t.forEach((e) => s.addEffect(e)), Lt = (s, t) => D(new WeakRef(s), ...t || []) ?? s, It = (s, t) => {
612
+ }, wt = (s, t) => t == null ? void 0 : t.forEach((e) => s.addEffect(e)), vt = (s, t) => D(new WeakRef(s), ...t || []) ?? s, At = (s, t) => {
619
613
  const e = t;
620
614
  e && Object.keys(e).forEach((n) => {
621
615
  g(e[n]) ? s.setReactiveCustomAttribute(n, e[n]) : typeof e[n] == "function" ? s.addEffect(() => {
622
616
  s.setCustomAttribute(n, e[n]());
623
617
  }) : s.setCustomAttribute(n, e[n]);
624
618
  });
625
- }, Ot = (s, t) => s.addClass(...t || []), Mt = (s, t) => s.addReactiveClass(t || {}), jt = (s, t) => s.addStyle(t || {}), Tt = (s, t) => {
619
+ }, Rt = (s, t) => s.addClass(...t || []), gt = (s, t) => s.addReactiveClass(t || {}), Lt = (s, t) => s.addStyle(t || {}), It = (s, t) => {
626
620
  const e = t, n = (o, r) => {
627
- r !== void 0 && (g(r) ? s.setReactiveAttribute(o, r) : typeof r == "function" ? s.addEffect(() => {
621
+ r !== void 0 && (C("addAttribute", o, r), g(r) ? s.setReactiveAttribute(o, r) : typeof r == "function" ? s.addEffect(() => {
628
622
  s.setAttribute(o, r());
629
623
  }) : s.setAttribute(o, r));
630
624
  };
@@ -638,14 +632,14 @@ const Ut = () => () => {
638
632
  typeof n == "string" ? n.trim().length > 0 && e.addHtmlContent(n) : g(n) ? e.addReactiveContent(n) : e.append(n);
639
633
  }), e;
640
634
  }, W = (s, t) => {
641
- const e = document.createElement(s), n = At(e);
642
- return lt(new WeakRef(n), t) ?? n;
643
- }, U = (s, t) => {
635
+ const e = document.createElement(s), n = St(e);
636
+ return it(new WeakRef(n), t) ?? n;
637
+ }, Y = (s, t) => {
644
638
  const [e, ...n] = s.split(" ").map((r) => r.trim()), o = W(e, t);
645
639
  return n.length > 0 && o.addClass(...n), (...r) => D(
646
640
  new WeakRef(o),
647
641
  ...r.filter(Boolean).flat().flatMap(
648
- (c) => typeof c == "function" && !g(c) ? M(() => c(o)) : c
642
+ (i) => typeof i == "function" && !g(i) ? M(() => i(o)) : i
649
643
  )
650
644
  ) ?? o;
651
645
  }, M = (s) => {
@@ -653,89 +647,89 @@ const Ut = () => () => {
653
647
  return W("div").addStyle({ display: "contents" }).addEffect((e) => {
654
648
  e.clear(), D(new WeakRef(e), ...[s()].flat());
655
649
  }, t);
656
- }, Qt = (s, t, e) => {
657
- const n = W("div").addStyle({ display: "contents" }), o = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
650
+ }, Yt = (s, t, e) => {
651
+ const n = W("div").addStyle({ display: "contents" }), o = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
658
652
  let a = [];
659
- const C = /* @__PURE__ */ new Set();
653
+ const b = /* @__PURE__ */ new Set();
660
654
  let h = s.peek();
661
655
  const d = (u) => {
662
- C.delete(u), o.delete(u), r.delete(u), c.delete(u), i.delete(u);
656
+ b.delete(u), o.delete(u), r.delete(u), i.delete(u), c.delete(u);
663
657
  }, m = (u) => {
664
- if (!i.has(u)) {
658
+ if (!c.has(u)) {
665
659
  const y = a.indexOf(u);
666
- return i.set(u, y), y;
660
+ return c.set(u, y), y;
667
661
  }
668
- return i.get(u);
662
+ return c.get(u);
669
663
  }, p = (u, y, x) => Array.from(x.children).indexOf(u) !== y;
670
664
  return w(() => {
671
665
  const u = s(), y = u.map(t).map((E) => typeof E == "string" ? E : E.toString()), x = new Set(y);
672
- i.clear(), y.forEach((E, b) => {
673
- i.set(E, b);
666
+ c.clear(), y.forEach((E, S) => {
667
+ c.set(E, S);
674
668
  }), a = y;
675
669
  const L = n.hostElement;
676
670
  if (!L) return;
677
- S(
671
+ C(
678
672
  "containerChildren",
679
673
  Array.from(L.children),
680
674
  a
681
675
  );
682
676
  const H = [];
683
677
  Array.from(L.children).forEach((E) => {
684
- const b = E.dataset.key;
685
- b && !x.has(b) && H.push(E);
678
+ const S = E.dataset.key;
679
+ S && !x.has(S) && H.push(E);
686
680
  }), H.forEach((E) => {
687
- const b = E.dataset.key;
688
- S("remove element", b, E), E.remove(), d(b);
689
- }), y.forEach((E, b) => {
681
+ const S = E.dataset.key;
682
+ C("remove element", S, E), E.remove(), d(S);
683
+ }), y.forEach((E, S) => {
690
684
  var v;
691
- const A = u[b], $ = h[b];
685
+ const A = u[S], T = h[S];
692
686
  if (!o.has(E))
693
- S("create new element", E, A), o.set(
687
+ C("create new element", E, A), o.set(
694
688
  E,
695
689
  j(Math.random().toString(36).substring(2, 15))
696
690
  ), r.set(
697
691
  E,
698
- () => e(A, b, u).setCustomAttribute("data-key", E)
692
+ () => e(A, S, u).setCustomAttribute("data-key", E)
699
693
  );
700
- else if ($ && JSON.stringify(A) !== JSON.stringify($)) {
701
- const R = c.get(E);
694
+ else if (T && JSON.stringify(A) !== JSON.stringify(T)) {
695
+ const R = i.get(E);
702
696
  (v = o.get(E)) == null || v.set(Math.random().toString(36).substring(2, 15)), r.set(
703
697
  E,
704
- () => e(A, b, u).setCustomAttribute("data-key", E)
705
- ), R && R.parentNode && S("mark element for update", E);
698
+ () => e(A, S, u).setCustomAttribute("data-key", E)
699
+ ), R && R.parentNode && C("mark element for update", E);
706
700
  }
707
701
  }), h = [...u.map((E) => ({ ...E }))];
708
- const N = () => {
709
- o.forEach((E, b) => {
710
- S("key from setTimeout foreach currItemSignalMap", b), C.has(b) || (C.add(b), w(() => {
711
- var X;
702
+ const B = () => {
703
+ o.forEach((E, S) => {
704
+ C("key from setTimeout foreach currItemSignalMap", S), b.has(S) || (b.add(S), w(() => {
705
+ var Z;
712
706
  E();
713
- const A = m(b), $ = (X = r.get(b)) == null ? void 0 : X();
714
- if (!$ || !$.hostElement) return;
715
- const v = n.hostElement, R = $.hostElement;
707
+ const A = m(S), T = (Z = r.get(S)) == null ? void 0 : Z();
708
+ if (!T || !T.hostElement) return;
709
+ const v = n.hostElement, R = T.hostElement;
716
710
  if (!v) return;
717
- S("call effect from setTimeout", b, R);
718
- const I = c.get(b);
711
+ C("call effect from setTimeout", S, R);
712
+ const I = i.get(S);
719
713
  if (I && I.parentNode === v) {
720
714
  if (p(I, A, v)) {
721
- const T = v.children[A];
722
- T && T !== I ? v.insertBefore(I, T) : T || v.appendChild(I);
715
+ const $ = v.children[A];
716
+ $ && $ !== I ? v.insertBefore(I, $) : $ || v.appendChild(I);
723
717
  }
724
- R !== I && (I.replaceWith(R), c.set(b, R));
725
- } else if (c.set(b, R), A < v.children.length) {
726
- const T = v.children[A];
727
- T ? v.insertBefore(R, T) : v.appendChild(R);
718
+ R !== I && (I.replaceWith(R), i.set(S, R));
719
+ } else if (i.set(S, R), A < v.children.length) {
720
+ const $ = v.children[A];
721
+ $ ? v.insertBefore(R, $) : v.appendChild(R);
728
722
  } else
729
723
  v.appendChild(R);
730
724
  }));
731
725
  });
732
726
  };
733
- Promise.resolve().then(() => N());
727
+ Promise.resolve().then(() => B());
734
728
  }), n;
735
- }, te = (s) => {
729
+ }, Zt = (s) => {
736
730
  let t = [W("div")], e = !1;
737
731
  return w(() => {
738
- var r, c;
732
+ var r, i;
739
733
  const n = s();
740
734
  e = Array.isArray(n);
741
735
  const o = [];
@@ -743,95 +737,95 @@ const Ut = () => () => {
743
737
  W("div").addStyle({ display: "none" }).setAttribute("id", "empty_template")
744
738
  );
745
739
  try {
746
- S(
740
+ C(
747
741
  "newReactiveComponent.map",
748
- o.map((i) => {
742
+ o.map((c) => {
749
743
  var a;
750
- return S("newReactiveComponent hostElement", i.hostElement), (a = i.hostElement) == null ? void 0 : a.id;
744
+ return C("newReactiveComponent hostElement", c.hostElement), (a = c.hostElement) == null ? void 0 : a.id;
751
745
  })
752
- ), S(
746
+ ), C(
753
747
  "currComponent[0].hostElement?.id",
754
748
  (r = t[0].hostElement) == null ? void 0 : r.id,
755
749
  t
756
- ), (c = t[0].hostElement) == null || c.replaceWith(
757
- ...o.map((i) => i.hostElement).filter(Boolean)
758
- ), t.slice(1).forEach((i) => {
750
+ ), (i = t[0].hostElement) == null || i.replaceWith(
751
+ ...o.map((c) => c.hostElement).filter(Boolean)
752
+ ), t.slice(1).forEach((c) => {
759
753
  var a;
760
- return (a = i.hostElement) == null ? void 0 : a.remove();
754
+ return (a = c.hostElement) == null ? void 0 : a.remove();
761
755
  }), t = o;
762
- } catch (i) {
763
- console.error(i);
756
+ } catch (c) {
757
+ console.error(c);
764
758
  }
765
759
  }), e ? t : t[0];
766
- }, ee = (s) => bt in s, se = (s) => {
767
- const t = U("div")().addStyle({ display: "contents" }), e = (n) => {
760
+ }, Xt = (s) => pt in s, Qt = (s) => {
761
+ const t = Y("div")().addStyle({ display: "contents" }), e = (n) => {
768
762
  const o = t.hostElement;
769
763
  return o && (o.innerHTML = n), t;
770
764
  };
771
765
  return typeof s == "string" ? e(s) : t.addEffect(() => {
772
766
  e(s());
773
767
  }), t;
774
- }, at = (s, t, e) => s ? M(t) : e ? M(e) : U("div")().setAttribute("id", "empty_div_renderIf").addStyle({ display: "none" }), $t = (s, t, e) => M(() => at(!!s(), t, e)), ne = (s, t, e) => typeof s == "boolean" ? at(s, t, e) : $t(s, t, e), st = (s, t) => M(t).addEffect((e, n) => {
768
+ }, ct = (s, t, e) => s ? M(t) : e ? M(e) : Y("div")().setAttribute("id", "empty_div_renderIf").addStyle({ display: "none" }), Ot = (s, t, e) => M(() => ct(!!s(), t, e)), te = (s, t, e) => typeof s == "boolean" ? ct(s, t, e) : Ot(s, t, e), et = (s, t) => M(t).addEffect((e, n) => {
775
769
  if (typeof s == "boolean")
776
770
  n.style.display = s ? "block" : "none";
777
771
  else {
778
772
  const o = s() ? "block" : "none";
779
773
  n.style.display = o;
780
774
  }
781
- }), oe = (s, t, e) => {
775
+ }), ee = (s, t, e) => {
782
776
  const n = [
783
- st(s, t)
777
+ et(s, t)
784
778
  ].flat();
785
779
  return e && n.push(
786
780
  ...[
787
- st(
781
+ et(
788
782
  () => typeof s == "boolean" ? !s : !s(),
789
783
  e
790
784
  )
791
785
  ].flat()
792
786
  ), M(() => n);
793
- }, _t = (s, t) => {
794
- S("createCustomElement", s);
795
- const e = document.createElement(s), n = vt(e);
787
+ }, Mt = (s, t) => {
788
+ C("createCustomElement", s);
789
+ const e = document.createElement(s), n = bt(e);
796
790
  return e.init = () => {
797
- lt(new WeakRef(n), t);
791
+ it(new WeakRef(n), t);
798
792
  }, n;
799
- }, Wt = (s, t) => {
800
- const e = s.split(" ").slice(1).map((o) => o.trim()), n = _t(s.split(" ")[0], t);
793
+ }, jt = (s, t) => {
794
+ const e = s.split(" ").slice(1).map((o) => o.trim()), n = Mt(s.split(" ")[0], t);
801
795
  return Array.isArray(e) && e.length > 0 && n.addClass(...e), (...o) => {
802
796
  const r = o.filter(Boolean).flat().flatMap(
803
- (i) => typeof i == "function" && !g(i) ? M(() => i(n)) : i
804
- ), c = n.hostElement;
805
- return c && (c.allSlotContent = r, c.slotContent = r.filter(ft).reduce(
806
- (i, a) => {
797
+ (c) => typeof c == "function" && !g(c) ? M(() => c(n)) : c
798
+ ), i = n.hostElement;
799
+ return i && (i.allSlotContent = r, i.slotContent = r.filter(dt).reduce(
800
+ (c, a) => {
807
801
  var h;
808
- const C = ((h = a.hostElement) == null ? void 0 : h.getAttribute("slot")) || "default";
809
- return i[C] || (i[C] = []), i[C].push(a), i;
802
+ const b = ((h = a.hostElement) == null ? void 0 : h.getAttribute("slot")) || "default";
803
+ return c[b] || (c[b] = []), c[b].push(a), c;
810
804
  },
811
805
  {}
812
- ), c.appendAllSlotContent = () => {
806
+ ), i.appendAllSlotContent = () => {
813
807
  D(new WeakRef(n), ...r);
814
808
  }), n;
815
809
  };
816
- }, xt = (s, t, e) => Wt(
810
+ }, $t = (s, t, e) => jt(
817
811
  `${s.renderTagName}${t && typeof t == "string" ? " " + t : ""}`,
818
812
  F(t) ? t : t && typeof t == "string" ? e : void 0
819
- ), re = () => {
813
+ ), se = () => {
820
814
  const s = () => {
821
815
  };
822
816
  return s.oldValue = null, s;
823
- }, ce = () => ({}), Ht = (s, t, e) => {
824
- const n = t ? ot(t, e)(s) : s;
817
+ }, ne = () => ({}), Tt = (s, t, e) => {
818
+ const n = t ? st(t, e)(s) : s;
825
819
  return (o, ...r) => {
826
- const c = [...r];
827
- return o && !F(o) && c.unshift(o), xt(n, F(o) ? o : {})(...c);
820
+ const i = [...r];
821
+ return o && !F(o) && i.unshift(o), $t(n, F(o) ? o : {})(...i);
828
822
  };
829
- }, ie = (s) => [
830
- Ht(s),
823
+ }, oe = (s) => [
824
+ Tt(s),
831
825
  (t, e) => {
832
- ot(t, e)(s);
826
+ st(t, e)(s);
833
827
  }
834
- ], l = {}, kt = [
828
+ ], l = {}, _t = [
835
829
  "div",
836
830
  "span",
837
831
  "section",
@@ -893,43 +887,43 @@ const Ut = () => () => {
893
887
  "canvas",
894
888
  "slot"
895
889
  ];
896
- kt.forEach((s) => {
890
+ _t.forEach((s) => {
897
891
  l[s] = (t, ...e) => {
898
892
  let n = [...e];
899
- return t && !F(t) && (n = [t].concat(n)), U(s, F(t) ? t : {})(...n);
893
+ return t && !F(t) && (n = [t].concat(n)), Y(s, F(t) ? t : {})(...n);
900
894
  };
901
895
  });
902
- const Pt = l.div, le = l.span, ae = l.section, de = l.input, he = l.button, fe = l.table, ue = l.tr, pe = l.td, me = l.th, Ee = l.ul, Ce = l.li, be = l.ol, Se = l.form, ye = l.label, we = l.select, ve = l.option, Ae = l.textarea, Re = l.img, ge = l.a, Le = l.p, Ie = l.h1, Oe = l.h2, Me = l.h3, je = l.h4, Te = l.h5, $e = l.h6, _e = l.br, We = l.hr, xe = l.pre, He = l.code, ke = l.nav, Pe = l.header, Fe = l.footer, Ne = l.main, Be = l.aside, Ve = l.article, Je = l.figure, qe = l.figcaption, ze = l.blockquote, De = l.cite, Ge = l.small, Ke = l.strong, Ye = l.em, Ze = l.b, Ue = l.i, Xe = l.u, Qe = l.s, ts = l.sub, es = l.sup, ss = l.mark, ns = l.del, os = l.ins, rs = l.details, cs = l.summary, is = l.progress, ls = l.meter, as = l.audio, ds = l.video, hs = l.canvas, fs = l.slot, us = (s) => (t) => s(t).addClass(...t.classList ?? []).addReactiveClass(t.reactiveClassList ?? {});
903
- function Ft(s, t) {
896
+ const Wt = l.div, re = l.span, ie = l.section, ce = l.input, le = l.button, ae = l.table, de = l.tr, he = l.td, fe = l.th, ue = l.ul, pe = l.li, me = l.ol, Ee = l.form, Ce = l.label, be = l.select, Se = l.option, ye = l.textarea, we = l.img, ve = l.a, Ae = l.p, Re = l.h1, ge = l.h2, Le = l.h3, Ie = l.h4, Oe = l.h5, Me = l.h6, je = l.br, $e = l.hr, Te = l.pre, _e = l.code, We = l.nav, xe = l.header, He = l.footer, ke = l.main, Pe = l.aside, Fe = l.article, Be = l.figure, Ve = l.figcaption, Ne = l.blockquote, Je = l.cite, qe = l.small, ze = l.strong, De = l.em, Ge = l.b, Ke = l.i, Ue = l.u, Ye = l.s, Ze = l.sub, Xe = l.sup, Qe = l.mark, ts = l.del, es = l.ins, ss = l.details, ns = l.summary, os = l.progress, rs = l.meter, is = l.audio, cs = l.video, ls = l.canvas, as = l.slot, ds = (s) => (t) => s(t).addClass(...t.classList ?? []).addReactiveClass(t.reactiveClassList ?? {});
897
+ function xt(s, t) {
904
898
  let e = 0;
905
899
  return (...n) => {
906
900
  const o = Date.now();
907
901
  o - e >= t && (s(...n), e = o);
908
902
  };
909
903
  }
910
- const ps = (s, t) => M(() => {
904
+ const hs = (s, t) => M(() => {
911
905
  const e = s();
912
906
  let n = null;
913
907
  return e.map(
914
- (o, r) => Pt(
908
+ (o, r) => Wt(
915
909
  {
916
- "@dragstart": (c, i, a) => {
910
+ "@dragstart": (i, c, a) => {
917
911
  n = a;
918
912
  },
919
- "@dragend": (c, i, a) => {
913
+ "@dragend": (i, c, a) => {
920
914
  a.style.transform = "", a.removeAttribute("draggable");
921
915
  },
922
- "@mousedown": (c, i, a) => {
916
+ "@mousedown": (i, c, a) => {
923
917
  a.style.transform = "translateZ(0)", a.setAttribute("draggable", "true");
924
918
  },
925
- "@dragover": (c) => {
926
- c.preventDefault();
919
+ "@dragover": (i) => {
920
+ i.preventDefault();
927
921
  },
928
- "@dragenter": Ft((c, i, a) => {
929
- var C, h, d;
930
- if (c.preventDefault(), n) {
922
+ "@dragenter": xt((i, c, a) => {
923
+ var b, h, d;
924
+ if (i.preventDefault(), n) {
931
925
  let m = n, p = a;
932
- const u = ((C = n.getClientRects().item(0)) == null ? void 0 : C.y) ?? 0, y = ((h = a.getClientRects().item(0)) == null ? void 0 : h.y) ?? 0;
926
+ const u = ((b = n.getClientRects().item(0)) == null ? void 0 : b.y) ?? 0, y = ((h = a.getClientRects().item(0)) == null ? void 0 : h.y) ?? 0;
933
927
  u < y && ([m, p] = [a, n]), (d = a.parentElement) == null || d.insertBefore(m, p);
934
928
  }
935
929
  }, 200)
@@ -937,53 +931,53 @@ const ps = (s, t) => M(() => {
937
931
  t(o, r, [...s.peek()])
938
932
  )
939
933
  );
940
- }), ms = (s, t, e) => {
934
+ }), fs = (s, t, e) => {
941
935
  let n = [], o = [];
942
- const r = W("div").addStyle({ display: "contents" }), c = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
936
+ const r = W("div").addStyle({ display: "contents" }), i = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
943
937
  return w(() => {
944
- const a = s(), C = a.map(t);
945
- o.filter((d) => !C.includes(d)).forEach((d) => {
938
+ const a = s(), b = a.map(t);
939
+ o.filter((d) => !b.includes(d)).forEach((d) => {
946
940
  var m, p;
947
- c.delete(d), (p = (m = r.hostElement) == null ? void 0 : m.querySelector(`[data-key="${d}"]`)) == null || p.remove();
948
- }), C.forEach((d, m) => {
949
- o.includes(d) || c.set(
941
+ i.delete(d), (p = (m = r.hostElement) == null ? void 0 : m.querySelector(`[data-key="${d}"]`)) == null || p.remove();
942
+ }), b.forEach((d, m) => {
943
+ o.includes(d) || i.set(
950
944
  d,
951
945
  () => e(a[m], m, a).setCustomAttribute(
952
946
  "data-key",
953
947
  d
954
948
  )
955
949
  );
956
- }), C.forEach((d, m) => {
950
+ }), b.forEach((d, m) => {
957
951
  var p;
958
952
  if (o.includes(d)) {
959
- JSON.stringify(n[o.indexOf(d)]) !== JSON.stringify(a[m]) && ((p = i.get(d)) == null || p.set({
953
+ JSON.stringify(n[o.indexOf(d)]) !== JSON.stringify(a[m]) && ((p = c.get(d)) == null || p.set({
960
954
  templateFunc: () => e(a[m], m, a),
961
955
  items: a,
962
- itemsKey: C,
956
+ itemsKey: b,
963
957
  index: m
964
958
  }));
965
959
  return;
966
960
  }
967
- i.set(
961
+ c.set(
968
962
  d,
969
963
  j({
970
964
  templateFunc: () => e(a[m], m, a),
971
965
  items: a,
972
- itemsKey: C,
966
+ itemsKey: b,
973
967
  index: m
974
968
  })
975
969
  ), queueMicrotask(() => {
976
970
  w(() => {
977
- var H, N, E;
978
- const { templateFunc: u, index: y } = ((H = i.get(d)) == null ? void 0 : H()) ?? {}, x = (N = r.hostElement) == null ? void 0 : N.querySelector(
971
+ var H, B, E;
972
+ const { templateFunc: u, index: y } = ((H = c.get(d)) == null ? void 0 : H()) ?? {}, x = (B = r.hostElement) == null ? void 0 : B.querySelector(
979
973
  `[data-key="${d}"]`
980
974
  ), L = (u == null ? void 0 : u().setCustomAttribute("data-key", d).hostElement) ?? document.createElement("div");
981
- x ? (E = r.hostElement) == null || E.childNodes.forEach((b, A) => {
982
- b instanceof HTMLElement && b.getAttribute("data-key") === d && (y === A ? (h(
975
+ x ? (E = r.hostElement) == null || E.childNodes.forEach((S, A) => {
976
+ S instanceof HTMLElement && S.getAttribute("data-key") === d && (y === A ? (h(
983
977
  y ?? 0,
984
978
  r.hostElement,
985
979
  L
986
- ), b.remove()) : h(
980
+ ), S.remove()) : h(
987
981
  y ?? 0,
988
982
  r.hostElement,
989
983
  L
@@ -995,129 +989,130 @@ const ps = (s, t) => M(() => {
995
989
  const h = (d, m, p) => {
996
990
  p && m && (d < m.children.length ? m.insertBefore(p, m.children[d]) : m.appendChild(p));
997
991
  };
998
- o = C, n = [...a];
992
+ o = b, n = [...a];
999
993
  }), r;
1000
994
  };
1001
995
  export {
1002
996
  _ as BaseElement,
1003
- ge as a,
1004
- Tt as addAttributeList,
1005
- Ot as addClassList,
1006
- It as addCustomAttributes,
1007
- Mt as addReactiveClassList,
1008
- jt as addStyleList,
997
+ ve as a,
998
+ It as addAttributeList,
999
+ Rt as addClassList,
1000
+ At as addCustomAttributes,
1001
+ gt as addReactiveClassList,
1002
+ Lt as addStyleList,
1009
1003
  D as appendContentItem,
1010
- Ve as article,
1011
- Be as aside,
1012
- as as audio,
1013
- Ze as b,
1014
- zt as bindReactiveSignals,
1015
- ze as blockquote,
1016
- _e as br,
1017
- he as button,
1018
- V as camelToKebab,
1019
- hs as canvas,
1004
+ Fe as article,
1005
+ Pe as aside,
1006
+ is as audio,
1007
+ Ge as b,
1008
+ Vt as bindReactiveSignals,
1009
+ Ne as blockquote,
1010
+ je as br,
1011
+ le as button,
1012
+ N as camelToKebab,
1013
+ ls as canvas,
1020
1014
  G as checkCall,
1021
- Vt as checkRef,
1022
- De as cite,
1023
- Rt as classList,
1024
- Xt as cls,
1025
- He as code,
1026
- B as colorLog,
1027
- Gt as combineLatest,
1028
- ot as component,
1029
- ie as configCustomComponent,
1030
- us as createComponent,
1031
- xt as createCustom,
1032
- Wt as createCustomEl,
1033
- _t as createCustomElement,
1034
- U as createEl,
1015
+ Pt as checkRef,
1016
+ Je as cite,
1017
+ yt as classList,
1018
+ Ut as cls,
1019
+ _e as code,
1020
+ V as colorLog,
1021
+ Jt as combineLatest,
1022
+ st as component,
1023
+ oe as configCustomComponent,
1024
+ ds as createComponent,
1025
+ $t as createCustom,
1026
+ jt as createCustomEl,
1027
+ Mt as createCustomElement,
1028
+ Y as createEl,
1035
1029
  W as createElement,
1036
- qt as createSignal,
1037
- vt as customElementHelpers,
1038
- ps as ddList,
1039
- ce as defineSlotTemplate,
1040
- ns as del,
1041
- rs as details,
1042
- pt as disableLogs,
1043
- Pt as div,
1030
+ Bt as createSignal,
1031
+ bt as customElementHelpers,
1032
+ hs as ddList,
1033
+ ne as defineSlotTemplate,
1034
+ ts as del,
1035
+ ss as details,
1036
+ ft as disableLogs,
1037
+ Wt as div,
1044
1038
  w as effect,
1045
- At as elementHelpers,
1046
- Ye as em,
1047
- Bt as enableLogs,
1048
- Yt as event,
1049
- Ut as eventEmitter,
1050
- qe as figcaption,
1051
- Je as figure,
1052
- Fe as footer,
1053
- Dt as forkJoin,
1054
- Se as form,
1055
- ms as getList,
1039
+ St as elementHelpers,
1040
+ De as em,
1041
+ kt as enableLogs,
1042
+ Dt as event,
1043
+ Kt as eventEmitter,
1044
+ Ve as figcaption,
1045
+ Be as figure,
1046
+ qt as firstUpdate,
1047
+ He as footer,
1048
+ Nt as forkJoin,
1049
+ Ee as form,
1050
+ fs as getList,
1056
1051
  M as getSignalContent,
1057
- Ie as h1,
1058
- Oe as h2,
1059
- Me as h3,
1060
- je as h4,
1061
- Te as h5,
1062
- $e as h6,
1063
- Pe as header,
1064
- We as hr,
1065
- Ue as i,
1066
- Re as img,
1067
- lt as initComponent,
1068
- de as input,
1069
- os as ins,
1070
- Zt as isBaseElement,
1071
- ft as isComponentConfig,
1052
+ Re as h1,
1053
+ ge as h2,
1054
+ Le as h3,
1055
+ Ie as h4,
1056
+ Oe as h5,
1057
+ Me as h6,
1058
+ xe as header,
1059
+ $e as hr,
1060
+ Ke as i,
1061
+ we as img,
1062
+ it as initComponent,
1063
+ ce as input,
1064
+ es as ins,
1065
+ Gt as isBaseElement,
1066
+ dt as isComponentConfig,
1072
1067
  F as isComponentInitConfig,
1073
1068
  g as isReactiveSignal,
1074
- ee as isSlotTemplate,
1075
- ut as kebabToCamel,
1076
- ye as label,
1077
- Ce as li,
1078
- Ne as main,
1079
- ss as mark,
1080
- ls as meter,
1081
- ke as nav,
1082
- re as newEventEmitter,
1083
- be as ol,
1084
- Qt as oldGetList,
1085
- ve as option,
1086
- Le as p,
1087
- xe as pre,
1088
- is as progress,
1089
- S as projectLog,
1090
- Kt as property,
1091
- Z as removeEffect,
1092
- at as renderIf,
1093
- Jt as rs,
1094
- $t as rxRenderIf,
1095
- Qe as s,
1096
- ae as section,
1097
- we as select,
1098
- Lt as setChildren,
1099
- gt as setEffects,
1100
- et as setListeners,
1101
- oe as show,
1102
- st as showIf,
1069
+ Xt as isSlotTemplate,
1070
+ ht as kebabToCamel,
1071
+ Ce as label,
1072
+ pe as li,
1073
+ ke as main,
1074
+ Qe as mark,
1075
+ rs as meter,
1076
+ We as nav,
1077
+ se as newEventEmitter,
1078
+ me as ol,
1079
+ Yt as oldGetList,
1080
+ Se as option,
1081
+ Ae as p,
1082
+ Te as pre,
1083
+ os as progress,
1084
+ C as projectLog,
1085
+ zt as property,
1086
+ U as removeEffect,
1087
+ ct as renderIf,
1088
+ Ft as rs,
1089
+ Ot as rxRenderIf,
1090
+ Ye as s,
1091
+ ie as section,
1092
+ be as select,
1093
+ vt as setChildren,
1094
+ wt as setEffects,
1095
+ tt as setListeners,
1096
+ ee as show,
1097
+ et as showIf,
1103
1098
  j as signal,
1104
- te as signalComponent,
1105
- fs as slot,
1106
- Ge as small,
1107
- le as span,
1108
- Ke as strong,
1109
- ts as sub,
1110
- cs as summary,
1111
- es as sup,
1112
- fe as table,
1113
- pe as td,
1114
- Ae as textarea,
1115
- me as th,
1116
- ue as tr,
1117
- Xe as u,
1118
- Ee as ul,
1119
- se as unsafeHtml,
1120
- Ht as useCustomComponent,
1121
- ds as video,
1122
- ne as when
1099
+ Zt as signalComponent,
1100
+ as as slot,
1101
+ qe as small,
1102
+ re as span,
1103
+ ze as strong,
1104
+ Ze as sub,
1105
+ ns as summary,
1106
+ Xe as sup,
1107
+ ae as table,
1108
+ he as td,
1109
+ ye as textarea,
1110
+ fe as th,
1111
+ de as tr,
1112
+ Ue as u,
1113
+ ue as ul,
1114
+ Qt as unsafeHtml,
1115
+ Tt as useCustomComponent,
1116
+ cs as video,
1117
+ te as when
1123
1118
  };