@fest-lib/core 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/core.js +241 -239
  2. package/package.json +6 -3
package/dist/core.js CHANGED
@@ -1,4 +1,4 @@
1
- function K() {
1
+ function X() {
2
2
  const e = globalThis;
3
3
  if (typeof e.HTMLElement == "function") return;
4
4
  const t = class {
@@ -7,7 +7,7 @@ function K() {
7
7
  };
8
8
  r("EventTarget"), r("Node"), r("Element"), r("HTMLElement"), r("SVGElement"), r("Text"), r("Comment"), r("DocumentFragment"), r("ShadowRoot"), r("HTMLDocument"), r("Document"), r("HTMLBodyElement"), r("HTMLHeadElement"), r("HTMLCanvasElement"), r("HTMLInputElement"), r("HTMLLinkElement"), r("HTMLStyleElement"), r("HTMLPreElement"), r("HTMLDivElement"), r("CSSStyleRule"), r("CSSLayerBlockRule");
9
9
  }
10
- function be() {
10
+ function Te() {
11
11
  let e, t, r = !1, n = !1;
12
12
  return {
13
13
  promise: new Promise((i, s) => {
@@ -27,7 +27,7 @@ function be() {
27
27
  }
28
28
  };
29
29
  }
30
- var Te = class {
30
+ var Re = class {
31
31
  queue = [];
32
32
  processing = !1;
33
33
  async add(e) {
@@ -54,13 +54,13 @@ var Te = class {
54
54
  return this.processing;
55
55
  }
56
56
  };
57
- function Re(e, t, r = "Operation timed out") {
57
+ function Ee(e, t, r = "Operation timed out") {
58
58
  const n = new Promise((i, s) => {
59
59
  setTimeout(() => s(new Error(r)), t);
60
60
  });
61
61
  return Promise.race([e, n]);
62
62
  }
63
- async function Ee(e, t = 3, r = 1e3, n = 2) {
63
+ async function Ie(e, t = 3, r = 1e3, n = 2) {
64
64
  let i;
65
65
  for (let s = 0; s <= t; s++) try {
66
66
  return await e();
@@ -72,7 +72,7 @@ async function Ee(e, t = 3, r = 1e3, n = 2) {
72
72
  }
73
73
  throw i;
74
74
  }
75
- async function Ie(e, t) {
75
+ async function _e(e, t) {
76
76
  const r = [], n = [];
77
77
  for (let i = 0; i < e.length; i++) {
78
78
  const s = e[i], f = Promise.resolve().then(async () => {
@@ -87,7 +87,7 @@ async function Ie(e, t) {
87
87
  }
88
88
  return await Promise.all(n), r;
89
89
  }
90
- var X = class {
90
+ var Z = class {
91
91
  channels = /* @__PURE__ */ new Map();
92
92
  listeners = /* @__PURE__ */ new Map();
93
93
  register(e, t) {
@@ -136,13 +136,13 @@ var X = class {
136
136
  clear() {
137
137
  this.channels.clear(), this.listeners.clear();
138
138
  }
139
- }, _e = new X();
140
- function De(e, t) {
139
+ }, De = new Z();
140
+ function We(e, t) {
141
141
  const r = {};
142
142
  for (const n of t) r[n] = (...i) => e.request(n, i);
143
143
  return r;
144
144
  }
145
- var Z = class {
145
+ var Y = class {
146
146
  healthChecks = /* @__PURE__ */ new Map();
147
147
  intervals = /* @__PURE__ */ new Map();
148
148
  healthStatus = /* @__PURE__ */ new Map();
@@ -180,7 +180,7 @@ var Z = class {
180
180
  for (const e of this.intervals.values()) clearInterval(e);
181
181
  this.intervals.clear(), this.healthChecks.clear(), this.healthStatus.clear();
182
182
  }
183
- }, We = new Z();
183
+ }, Ne = new Y();
184
184
  WeakMap.prototype.getOrInsert ??= function(e, t) {
185
185
  return this.has(e) || this.set(e, t), this.get(e);
186
186
  };
@@ -193,23 +193,23 @@ Map.prototype.getOrInsert ??= function(e, t) {
193
193
  Map.prototype.getOrInsertComputed ??= function(e, t) {
194
194
  return this.has(e) || this.set(e, t(e)), this.get(e);
195
195
  };
196
- var Ne = (e, t, r = () => null) => (e?.has?.(t) || e?.set?.(t, r?.()), e?.get?.(t)), ke = (e, t, r = () => null) => (e?.has?.(t) || e?.set?.(t, r?.(t)), e?.get?.(t)), F = /* @__PURE__ */ Symbol.for("@fix"), He = (e) => e?.some?.(g), Le = (e) => Array.isArray(e) || e instanceof Set || e instanceof Map, g = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" || typeof e > "u" || e == null, Y = (e, t) => g(e) ? t == "number" ? Number(e) || 0 : t == "string" ? String(e) || "" : t == "boolean" ? !!e : e : null, k = (e, t = "value") => (typeof e == "object" || typeof e == "function") && e != null && (t in e || e?.[t] != null), B = (e) => k(e, "value"), Q = (e) => g(e) ? e : B(e) ? e?.value : e, c = (e, t) => e?.[F] ?? e ?? t ?? t, E = (e) => e != null && (typeof e == "object" || typeof e == "function") && (e instanceof WeakRef || typeof e?.deref == "function") ? E(e?.deref?.()) : e, ee = (e) => {
196
+ var ke = (e, t, r = () => null) => (e?.has?.(t) || e?.set?.(t, r?.()), e?.get?.(t)), He = (e, t, r = () => null) => (e?.has?.(t) || e?.set?.(t, r?.(t)), e?.get?.(t)), F = /* @__PURE__ */ Symbol.for("@fix"), Le = (e) => e?.some?.(g), ze = (e) => Array.isArray(e) || e instanceof Set || e instanceof Map, g = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" || typeof e > "u" || e == null, Q = (e, t) => g(e) ? t == "number" ? Number(e) || 0 : t == "string" ? String(e) || "" : t == "boolean" ? !!e : e : null, k = (e, t = "value") => (typeof e == "object" || typeof e == "function") && e != null && (t in e || e?.[t] != null), B = (e) => k(e, "value"), ee = (e) => g(e) ? e : B(e) ? e?.value : e, c = (e, t) => e?.[F] ?? e ?? t ?? t, E = (e) => e != null && (typeof e == "object" || typeof e == "function") && (e instanceof WeakRef || typeof e?.deref == "function") ? E(e?.deref?.()) : e, te = (e) => {
197
197
  if (typeof e == "function" || e == null) return e;
198
198
  const t = function() {
199
199
  };
200
200
  return t[F] = e, t;
201
- }, ze = (e, t, r) => (e = E(e), e != null && (typeof e == "object" || typeof e == "function") ? e[t] = Q(r = E(r)) : e), te = (e) => crypto?.getRandomValues ? crypto?.getRandomValues?.(e) : (() => {
201
+ }, Fe = (e, t, r) => (e = E(e), e != null && (typeof e == "object" || typeof e == "function") ? e[t] = ee(r = E(r)) : e), re = (e) => crypto?.getRandomValues ? crypto?.getRandomValues?.(e) : (() => {
202
202
  const t = new Uint8Array(e.length);
203
203
  for (let r = 0; r < e.length; r++) t[r] = Math.floor(Math.random() * 256);
204
204
  return t;
205
205
  })();
206
- function Fe(e, t, r) {
206
+ function Be(e, t, r) {
207
207
  return Math.min(Math.max(e, t), r);
208
208
  }
209
- var Be = (e, t, r) => Math.max(e, Math.min(t, r)), Ue = (e, t) => typeof t == "function" ? t?.bind?.(e) ?? t : t, Ve = () => crypto?.randomUUID ? crypto?.randomUUID?.() : "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (e) => (+e ^ te?.(/* @__PURE__ */ new Uint8Array(1))?.[0] & 15 >> +e / 4).toString(16)), $e = (e) => e && e?.replace?.(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), Ge = (e) => e && e?.replace?.(/-([a-z])/g, (t, r) => r.toUpperCase()), qe = (e, t = 0) => {
209
+ var Ue = (e, t, r) => Math.max(e, Math.min(t, r)), Ve = (e, t) => typeof t == "function" ? t?.bind?.(e) ?? t : t, $e = () => crypto?.randomUUID ? crypto?.randomUUID?.() : "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (e) => (+e ^ re?.(/* @__PURE__ */ new Uint8Array(1))?.[0] & 15 >> +e / 4).toString(16)), Ge = (e) => e && e?.replace?.(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), qe = (e) => e && e?.replace?.(/-([a-z])/g, (t, r) => r.toUpperCase()), je = (e, t = 0) => {
210
210
  const r = Number(e);
211
211
  return Number.isFinite(r) ? r : t;
212
- }, je = (e, t) => !Number.isFinite(t) || t <= 0 || !Number.isFinite(e) ? 0 : Math.min(Math.max(e, 0), t), S = (e, t = 1) => Math.round(e * t) / t, Je = (e, t = 1) => Math.floor(e * t) / t, Ke = (e, t = 1) => Math.ceil(e * t) / t, Xe = (e) => typeof CSSStyleValue < "u" && e instanceof CSSStyleValue, Ze = (e) => e != null && (typeof e == "boolean" ? e !== !1 : !0) && typeof e != "object" && typeof e != "function", Ye = (e) => typeof e == "boolean" ? e ? "" : null : typeof e == "number" ? String(e) : e, I = /* @__PURE__ */ Symbol.for("@trigger-lock"), Qe = (e, t, r = "value") => {
212
+ }, Je = (e, t) => !Number.isFinite(t) || t <= 0 || !Number.isFinite(e) ? 0 : Math.min(Math.max(e, 0), t), S = (e, t = 1) => Math.round(e * t) / t, Ke = (e, t = 1) => Math.floor(e * t) / t, Xe = (e, t = 1) => Math.ceil(e * t) / t, Ze = (e) => typeof CSSStyleValue < "u" && e instanceof CSSStyleValue, Ye = (e) => e != null && (typeof e == "boolean" ? e !== !1 : !0) && typeof e != "object" && typeof e != "function", Qe = (e) => typeof e == "boolean" ? e ? "" : null : typeof e == "number" ? String(e) : e, I = /* @__PURE__ */ Symbol.for("@trigger-lock"), et = (e, t, r = "value") => {
213
213
  k(e, r) && (e[I] = !0);
214
214
  let n;
215
215
  try {
@@ -218,25 +218,25 @@ var Be = (e, t, r) => Math.max(e, Math.min(t, r)), Ue = (e, t) => typeof t == "f
218
218
  k(e, r) && delete e[I];
219
219
  }
220
220
  return n;
221
- }, et = (e) => {
221
+ }, tt = (e) => {
222
222
  if (typeof e != "string") return null;
223
223
  const t = [...e?.matchAll?.(/^\d+(\.\d+)?$/g)];
224
224
  if (t?.length != 1) return null;
225
225
  const r = parseFloat(t[0][0]);
226
226
  return !Number.isNaN(r) && Number.isFinite(r) ? r : null;
227
- }, re = /^\d+$/g, ne = (e) => {
227
+ }, ne = /^\d+$/g, ie = (e) => {
228
228
  if (typeof e != "string" || (e = e?.trim?.(), e == "" || e == null)) return null;
229
- const t = [...e?.matchAll?.(re)];
229
+ const t = [...e?.matchAll?.(ne)];
230
230
  if (t?.length != 1) return null;
231
231
  const r = parseInt(t[0][0]);
232
232
  return !Number.isNaN(r) && Number.isInteger(r) ? r : null;
233
- }, tt = (e) => typeof e == "number" && !Number.isNaN(e), rt = (e) => typeof e == "string" ? ne(e) != null : typeof e == "number" && Number.isInteger(e) && e >= 0, nt = (e) => Array.isArray(e) || e != null && typeof e == "object" && typeof e[Symbol.iterator] == "function", it = (e, t, r) => {
233
+ }, rt = (e) => typeof e == "number" && !Number.isNaN(e), nt = (e) => typeof e == "string" ? ie(e) != null : typeof e == "number" && Number.isInteger(e) && e >= 0, it = (e) => Array.isArray(e) || e != null && typeof e == "object" && typeof e[Symbol.iterator] == "function", st = (e, t, r) => {
234
234
  e = e instanceof WeakRef ? e.deref() : e;
235
235
  const n = [...Object.entries(r)].map?.(([i, s]) => e?.[t]?.call?.(e, i, s));
236
236
  return () => {
237
237
  n?.forEach?.((i) => i?.());
238
238
  };
239
- }, U = (e) => e instanceof WeakRef || typeof e?.deref == "function", st = (e) => U(e) ? E(e) : e, ot = (e) => e != null ? U(e) ? e : typeof e == "function" || typeof e == "object" ? new WeakRef(e) : e : e, ft = (e) => (typeof e == "object" || typeof e == "function") && (e?.value != null || e != null && "value" in e), at = (e) => e != null && (typeof e == "object" || typeof e == "function"), ut = (e) => B(e) ? e?.value : e, ct = (e, t) => e instanceof Promise || typeof e?.then == "function" ? e?.then?.(t) : t?.(e), lt = (e, t) => e instanceof Promise || typeof e?.then == "function" ? e?.then?.(t) : t?.(e), yt = function(e) {
239
+ }, U = (e) => e instanceof WeakRef || typeof e?.deref == "function", ot = (e) => U(e) ? E(e) : e, ft = (e) => e != null ? U(e) ? e : typeof e == "function" || typeof e == "object" ? new WeakRef(e) : e : e, at = (e) => (typeof e == "object" || typeof e == "function") && (e?.value != null || e != null && "value" in e), ut = (e) => e != null && (typeof e == "object" || typeof e == "function"), ct = (e) => B(e) ? e?.value : e, lt = (e, t) => e instanceof Promise || typeof e?.then == "function" ? e?.then?.(t) : t?.(e), yt = (e, t) => e instanceof Promise || typeof e?.then == "function" ? e?.then?.(t) : t?.(e), ht = function(e) {
240
240
  return (t) => {
241
241
  e[I] = !0;
242
242
  let r;
@@ -247,7 +247,7 @@ var Be = (e, t, r) => Math.max(e, Math.min(t, r)), Ue = (e, t) => typeof t == "f
247
247
  }
248
248
  return r;
249
249
  };
250
- }, V = (e) => Array.isArray(e) ? e?.flatMap?.((t) => Array.isArray(t) ? V(t) : t) : e, ie = (e) => V(e)?.every?.(x), x = (e) => g(e) || typeof SharedArrayBuffer == "function" && e instanceof SharedArrayBuffer || se(e) || Array.isArray(e) && ie(e), se = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), ht = (e) => typeof e == "symbol" || typeof e == "object" && Object.prototype.toString.call(e) == "[object Symbol]", mt = (e) => e instanceof Promise || typeof e?.then == "function", dt = (e) => g(e) || typeof ArrayBuffer == "function" && e instanceof ArrayBuffer || typeof MessagePort == "function" && e instanceof MessagePort || typeof ReadableStream == "function" && e instanceof ReadableStream || typeof WritableStream == "function" && e instanceof WritableStream || typeof TransformStream == "function" && e instanceof TransformStream || typeof ImageBitmap == "function" && e instanceof ImageBitmap || typeof VideoFrame == "function" && e instanceof VideoFrame || typeof OffscreenCanvas == "function" && e instanceof OffscreenCanvas || typeof RTCDataChannel == "function" && e instanceof RTCDataChannel || typeof AudioData == "function" && e instanceof AudioData || typeof WebTransportReceiveStream == "function" && e instanceof WebTransportReceiveStream || typeof WebTransportSendStream == "function" && e instanceof WebTransportSendStream || typeof WebTransportReceiveStream == "function" && e instanceof WebTransportReceiveStream, pt = (e) => {
250
+ }, V = (e) => Array.isArray(e) ? e?.flatMap?.((t) => Array.isArray(t) ? V(t) : t) : e, se = (e) => V(e)?.every?.(b), b = (e) => g(e) || typeof SharedArrayBuffer == "function" && e instanceof SharedArrayBuffer || oe(e) || Array.isArray(e) && se(e), oe = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), mt = (e) => typeof e == "symbol" || typeof e == "object" && Object.prototype.toString.call(e) == "[object Symbol]", dt = (e) => e instanceof Promise || typeof e?.then == "function", pt = (e) => g(e) || typeof ArrayBuffer == "function" && e instanceof ArrayBuffer || typeof MessagePort == "function" && e instanceof MessagePort || typeof ReadableStream == "function" && e instanceof ReadableStream || typeof WritableStream == "function" && e instanceof WritableStream || typeof TransformStream == "function" && e instanceof TransformStream || typeof ImageBitmap == "function" && e instanceof ImageBitmap || typeof VideoFrame == "function" && e instanceof VideoFrame || typeof OffscreenCanvas == "function" && e instanceof OffscreenCanvas || typeof RTCDataChannel == "function" && e instanceof RTCDataChannel || typeof AudioData == "function" && e instanceof AudioData || typeof WebTransportReceiveStream == "function" && e instanceof WebTransportReceiveStream || typeof WebTransportSendStream == "function" && e instanceof WebTransportSendStream || typeof WebTransportReceiveStream == "function" && e instanceof WebTransportReceiveStream, gt = (e) => {
251
251
  switch (typeof e) {
252
252
  case "number":
253
253
  return 0;
@@ -264,17 +264,17 @@ var Be = (e, t, r) => Math.max(e, Math.min(t, r)), Ue = (e, t) => typeof t == "f
264
264
  case "bigint":
265
265
  return 0n;
266
266
  }
267
- }, w = (e) => typeof e?.[Symbol.iterator] == "function", gt = (e) => [
267
+ }, C = (e) => typeof e?.[Symbol.iterator] == "function", St = (e) => [
268
268
  "symbol",
269
269
  "string",
270
270
  "number"
271
- ].indexOf(typeof e) >= 0, St = (e) => e != null && (typeof e == "function" || typeof e == "object") && !(e instanceof WeakRef), vt = (e, t = "id") => {
271
+ ].indexOf(typeof e) >= 0, vt = (e) => e != null && (typeof e == "function" || typeof e == "object") && !(e instanceof WeakRef), Mt = (e, t = "id") => {
272
272
  const r = Array.from(e?.values?.()).map((i) => [i?.[t], i]), n = new Map(r);
273
273
  return Array.from(n?.values?.() || []);
274
- }, oe = (e, t, r = null) => {
274
+ }, fe = (e, t, r = null) => {
275
275
  const n = r != null && (typeof e == "object" || typeof e == "function") ? e?.[r] ?? e : e;
276
276
  let i = [];
277
- t instanceof Set || t instanceof Map || Array.isArray(t) || w(t) ? i = (n instanceof Set || n instanceof WeakSet ? t?.values?.() : t?.entries?.()) || (Array.isArray(t) || w(t) ? t : []) : (typeof t == "object" || typeof t == "function") && (i = n instanceof Set || n instanceof WeakSet ? Object.values(t) : Object.entries(t));
277
+ t instanceof Set || t instanceof Map || Array.isArray(t) || C(t) ? i = (n instanceof Set || n instanceof WeakSet ? t?.values?.() : t?.entries?.()) || (Array.isArray(t) || C(t) ? t : []) : (typeof t == "object" || typeof t == "function") && (i = n instanceof Set || n instanceof WeakSet ? Object.values(t) : Object.entries(t));
278
278
  let s = [];
279
279
  Array.isArray(n) ? s = n.entries() : n instanceof Map || n instanceof WeakMap ? s = n?.entries?.() : n instanceof Set || n instanceof WeakSet ? s = n?.values?.() : (typeof n == "object" || typeof n == "function") && (s = Object.entries(n));
280
280
  const f = new Set(Array.from(i).map((u) => u?.[0])), o = new Set(Array.from(s).map((u) => u?.[0])), a = f?.difference?.(o);
@@ -284,10 +284,10 @@ var Be = (e, t, r) => Math.max(e, Math.min(t, r)), Ue = (e, t) => typeof t == "f
284
284
  } else if (n instanceof Map || n instanceof Set || n instanceof WeakMap || n instanceof WeakSet) for (const u of a) n.delete(u);
285
285
  else if (typeof n == "function" || typeof n == "object") for (const u of a) delete n[u];
286
286
  return n;
287
- }, fe = (e, t, r = null, n = !0, i = "id") => {
287
+ }, ae = (e, t, r = null, n = !0, i = "id") => {
288
288
  const s = r != null && (typeof e == "object" || typeof e == "function") ? e?.[r] ?? e : e;
289
289
  let f = null;
290
- if (n && oe(s, t), t instanceof Set || t instanceof Map || Array.isArray(t) || w(t) ? f = (s instanceof Set || s instanceof WeakSet ? t?.values?.() : t?.entries?.()) || (Array.isArray(t) || w(t) ? t : []) : (typeof t == "object" || typeof t == "function") && (f = s instanceof Set || s instanceof WeakSet ? Object.values(t) : Object.entries(t)), s && f && (typeof f == "object" || typeof f == "function")) {
290
+ if (n && fe(s, t), t instanceof Set || t instanceof Map || Array.isArray(t) || C(t) ? f = (s instanceof Set || s instanceof WeakSet ? t?.values?.() : t?.entries?.()) || (Array.isArray(t) || C(t) ? t : []) : (typeof t == "object" || typeof t == "function") && (f = s instanceof Set || s instanceof WeakSet ? Object.values(t) : Object.entries(t)), s && f && (typeof f == "object" || typeof f == "function")) {
291
291
  if (s instanceof Map || s instanceof WeakMap) {
292
292
  for (const o of f) s.set(...o);
293
293
  return s;
@@ -295,12 +295,12 @@ var Be = (e, t, r) => Math.max(e, Math.min(t, r)), Ue = (e, t) => typeof t == "f
295
295
  if (s instanceof Set || s instanceof WeakSet) {
296
296
  for (const o of f) {
297
297
  const a = o?.[i] ? Array.from(s?.values?.() || []).find((u) => !_?.(u?.[i], o?.[i])) : null;
298
- a != null ? fe(a, o, null, n, i) : s.add(o);
298
+ a != null ? ae(a, o, null, n, i) : s.add(o);
299
299
  }
300
300
  return s;
301
301
  }
302
302
  if (typeof s == "object" || typeof s == "function") {
303
- if (Array.isArray(s) || w(s)) {
303
+ if (Array.isArray(s) || C(s)) {
304
304
  let o = 0;
305
305
  for (const a of f) o < s.length ? s[o++] = a?.[1] : s?.push?.(a?.[1]);
306
306
  return s;
@@ -309,8 +309,8 @@ var Be = (e, t, r) => Math.max(e, Math.min(t, r)), Ue = (e, t) => typeof t == "f
309
309
  }
310
310
  }
311
311
  return r != null ? (Reflect.set(e, r, t), e) : typeof t == "object" || typeof t == "function" ? Object.assign(e, t) : t;
312
- }, ae = (e, t) => ce.getOrInsert(e, /* @__PURE__ */ new WeakMap()).getOrInsert(t, t?.bind?.(e)), Mt = (e, t) => (typeof t == "function" ? ae(e, t) : t) ?? t, W = (e, t, r, n) => {
313
- if (t == Symbol.iterator) return ue(e, r, n);
312
+ }, ue = (e, t) => le.getOrInsert(e, /* @__PURE__ */ new WeakMap()).getOrInsert(t, t?.bind?.(e)), At = (e, t) => (typeof t == "function" ? ue(e, t) : t) ?? t, W = (e, t, r, n) => {
313
+ if (t == Symbol.iterator) return ce(e, r, n);
314
314
  if (t == null || typeof t == "symbol" || typeof t == "object" || typeof t == "function") return;
315
315
  const i = (s, ...f) => {
316
316
  if (s != null) return r?.(s, ...f);
@@ -323,31 +323,33 @@ var Be = (e, t, r) => Math.max(e, Math.min(t, r)), Ue = (e, t) => typeof t == "f
323
323
  const s = typeof t == "string" ? parseInt(t) : t;
324
324
  return i?.(e?.[s], s, null, "@add");
325
325
  } else if (typeof e == "function" || typeof e == "object") return i?.(e?.[t], t, null, "@set");
326
- }, At = (e, t = {}) => (Object.entries(t)?.forEach?.(([r, n]) => {
326
+ }, Pt = (e, t = {}) => (Object.entries(t)?.forEach?.(([r, n]) => {
327
327
  _(n, e[r]) && (e[r] = n);
328
- }), e), ue = (e, t, r) => {
328
+ }), e), ce = (e, t, r) => {
329
329
  if (e == null) return;
330
330
  let n = [];
331
331
  if (e instanceof Set || e instanceof Map || typeof e?.keys == "function") return [...e?.keys?.() || n].forEach?.((i) => W(e, i, t, r));
332
- if (Array.isArray(e) || w(e)) return [...e].forEach?.((i, s) => W(e, s, t, r));
332
+ if (Array.isArray(e) || C(e)) return [...e].forEach?.((i, s) => W(e, s, t, r));
333
333
  if (typeof e == "object" || typeof e == "function") return [...Object.keys(e) || n].forEach?.((i) => W(e, i, t, r));
334
- }, Pt = (e, t) => e == null && t == null ? !1 : e == null || t == null ? !0 : e instanceof Map || e instanceof WeakMap ? e.size != t.size || Array.from(e.entries()).some(([r, n]) => !t.has(r) || !_(n, t.get(r))) : e instanceof Set || e instanceof WeakSet ? e.size != t.size || Array.from(e.values()).some((r) => !t.has(r)) : Array.isArray(e) || Array.isArray(t) ? e.length != t.length || e.some((r, n) => !_(r, t[n])) : typeof e == "object" || typeof t == "object" ? JSON.stringify(e) != JSON.stringify(t) : e != t, _ = (e, t) => e == null && t == null ? !1 : e == null || t == null ? !0 : typeof e == "boolean" && typeof t == "boolean" ? e != t : typeof e == "number" && typeof t == "number" ? !(e == t || Math.abs(e - t) < 1e-9) : typeof e == "string" && typeof t == "string" ? e != "" && t != "" && e != t || e !== t : typeof e != typeof t ? e !== t : e && t && e != t || e !== t, ce = /* @__PURE__ */ new WeakMap(), wt = (e, t) => {
334
+ }, Ct = (e, t) => e == null && t == null ? !1 : e == null || t == null ? !0 : e instanceof Map || e instanceof WeakMap ? e.size != t.size || Array.from(e.entries()).some(([r, n]) => !t.has(r) || !_(n, t.get(r))) : e instanceof Set || e instanceof WeakSet ? e.size != t.size || Array.from(e.values()).some((r) => !t.has(r)) : Array.isArray(e) || Array.isArray(t) ? e.length != t.length || e.some((r, n) => !_(r, t[n])) : typeof e == "object" || typeof t == "object" ? JSON.stringify(e) != JSON.stringify(t) : e != t, _ = (e, t) => e == null && t == null ? !1 : e == null || t == null ? !0 : typeof e == "boolean" && typeof t == "boolean" ? e != t : typeof e == "number" && typeof t == "number" ? !(e == t || Math.abs(e - t) < 1e-9) : typeof e == "string" && typeof t == "string" ? e != "" && t != "" && e != t || e !== t : typeof e != typeof t ? e !== t : e && t && e != t || e !== t, $ = /* @__PURE__ */ Symbol.for("object.boundCtx");
335
+ globalThis[$] ??= /* @__PURE__ */ new WeakMap();
336
+ var le = globalThis[$], wt = (e, t) => {
335
337
  const r = e == null || e < 0 || typeof e != "number" || e == Symbol.iterator || (t != null ? e >= (t?.length || 0) : !1);
336
338
  return t != null ? Array.isArray(t) && r : !1;
337
- }, Ct = /* @__PURE__ */ new WeakMap(), xt = (e, t) => typeof e?.[t] == "function" ? e?.[t]?.bind?.(e) : e?.[t], b = (e, t, r) => {
339
+ }, bt = /* @__PURE__ */ new WeakMap(), xt = (e, t) => typeof e?.[t] == "function" ? e?.[t]?.bind?.(e) : e?.[t], O = (e, t, r) => {
338
340
  if (Array.isArray(e))
339
- return e.every(x) ? e.map(t) : e.map((n, i) => b(n, t, [e, i]));
341
+ return e.every(b) ? e.map(t) : e.map((n, i) => O(n, t, [e, i]));
340
342
  if (e instanceof Map) {
341
343
  const n = Array.from(e.entries());
342
- return n.map(([i, s]) => s).every(x) ? new Map(n.map(([i, s]) => [i, t(s, i, e)])) : new Map(n.map(([i, s]) => [i, b(s, t, [e, i])]));
344
+ return n.map(([i, s]) => s).every(b) ? new Map(n.map(([i, s]) => [i, t(s, i, e)])) : new Map(n.map(([i, s]) => [i, O(s, t, [e, i])]));
343
345
  }
344
346
  if (e instanceof Set) {
345
347
  const n = Array.from(e.entries()), i = n.map(([s, f]) => f);
346
- return n.every(x) ? new Set(i.map(t)) : new Set(i.map((s) => b(s, t, [e, s])));
348
+ return n.every(b) ? new Set(i.map(t)) : new Set(i.map((s) => O(s, t, [e, s])));
347
349
  }
348
350
  if (typeof e == "object" && e?.constructor == Object && Object.prototype.toString.call(e) == "[object Object]") {
349
351
  const n = Array.from(Object.entries(e));
350
- return n.map(([i, s]) => s).every(x) ? Object.fromEntries(n.map(([i, s]) => [i, t(s, i, e)])) : Object.fromEntries(n.map(([i, s]) => [i, b(s, t, [e, i])]));
352
+ return n.map(([i, s]) => s).every(b) ? Object.fromEntries(n.map(([i, s]) => [i, t(s, i, e)])) : Object.fromEntries(n.map(([i, s]) => [i, O(s, t, [e, i])]));
351
353
  }
352
354
  return t(e, r?.[1] ?? "", r?.[0] ?? null);
353
355
  }, Ot = (e, t, r) => {
@@ -359,7 +361,7 @@ var Be = (e, t, r) => Math.max(e, Math.min(t, r)), Ue = (e, t) => typeof t == "f
359
361
  }, p = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), m = (e, t) => e instanceof Promise || typeof e?.then == "function" ? p?.has?.(e) ? t(p?.get?.(e)) : Promise.try?.(async () => {
360
362
  const r = await e;
361
363
  return p?.set?.(e, r), r;
362
- })?.then?.(t) : t(e), le = class {
364
+ })?.then?.(t) : t(e), ye = class {
363
365
  #e;
364
366
  #t;
365
367
  constructor(e, t) {
@@ -414,7 +416,7 @@ var Be = (e, t, r) => Math.max(e, Math.min(t, r)), Ue = (e, t) => typeof t == "f
414
416
  }
415
417
  }
416
418
  let n;
417
- return p?.has?.(e) && (n = p?.get?.(e))?.[t] != null ? n = p?.get?.(e)?.[t] : n = ye(m(e, async (i) => {
419
+ return p?.has?.(e) && (n = p?.get?.(e))?.[t] != null ? n = p?.get?.(e)?.[t] : n = he(m(e, async (i) => {
418
420
  if (c(i) instanceof Promise) return Reflect.get(i, t, r);
419
421
  if (g(i)) return t == Symbol.toPrimitive || t == Symbol.toStringTag ? i : void 0;
420
422
  let s;
@@ -425,7 +427,7 @@ var Be = (e, t, r) => Math.max(e, Math.min(t, r)), Ue = (e, t) => typeof t == "f
425
427
  }
426
428
  return typeof s == "function" ? s?.bind?.(i) : s;
427
429
  })), t == Symbol.toStringTag ? g(n) ? String(n ?? "") || "" : n?.[Symbol.toStringTag]?.() || String(n ?? "") || "" : t == Symbol.toPrimitive ? (i) => {
428
- if (g(n)) return Y(n, i);
430
+ if (g(n)) return Q(n, i);
429
431
  } : n;
430
432
  }
431
433
  set(e, t, r) {
@@ -442,10 +444,10 @@ var Be = (e, t, r) => Math.max(e, Math.min(t, r)), Ue = (e, t) => typeof t == "f
442
444
  });
443
445
  }
444
446
  };
445
- function ye(e, t, r) {
446
- return e instanceof Promise || typeof e?.then == "function" ? p?.has?.(e) ? p?.get?.(e) : (H?.has?.(e) || e?.then?.((n) => p?.set?.(e, n)), H?.getOrInsertComputed?.(e, () => new Proxy(ee(e), new le(t, r)))) : e;
447
+ function he(e, t, r) {
448
+ return e instanceof Promise || typeof e?.then == "function" ? p?.has?.(e) ? p?.get?.(e) : (H?.has?.(e) || e?.then?.((n) => p?.set?.(e, n)), H?.getOrInsertComputed?.(e, () => new Proxy(te(e), new ye(t, r)))) : e;
447
449
  }
448
- var N = /* @__PURE__ */ new WeakMap(), he = class {
450
+ var N = /* @__PURE__ */ new WeakMap(), me = class {
449
451
  _deref(e) {
450
452
  return e instanceof WeakRef || typeof e?.deref == "function" ? e?.deref?.() : e;
451
453
  }
@@ -495,25 +497,25 @@ var N = /* @__PURE__ */ new WeakMap(), he = class {
495
497
  return t ? Reflect.preventExtensions(t) : !0;
496
498
  }
497
499
  };
498
- function bt(e) {
500
+ function Tt(e) {
499
501
  if (!(typeof e == "object" || typeof e == "function") || typeof e == "symbol") return e;
500
502
  const t = e instanceof WeakRef || typeof e?.deref == "function";
501
503
  if (e = t ? e?.deref?.() : e, e != null && N.has(e)) return N.get(e);
502
- const r = new he(), n = new Proxy(t ? e : new WeakRef(e), r);
504
+ const r = new me(), n = new Proxy(t ? e : new WeakRef(e), r);
503
505
  return N.set(e, n), n;
504
506
  }
505
- var $ = (e, t, r = 0) => {
507
+ var G = (e, t, r = 0) => {
506
508
  const n = [...t], i = [...e];
507
509
  return r % 2 && (i.reverse(), n.reverse()), [(r == 0 || r == 3 ? i[0] : n[0] - i[0]) || 0, (r == 0 || r == 1 ? i[1] : n[1] - i[1]) || 0];
508
- }, Tt = (e, t, r = 0) => {
510
+ }, Rt = (e, t, r = 0) => {
509
511
  const n = [...t], i = [...e];
510
512
  r % 2 && n.reverse();
511
513
  const s = [(r == 0 || r == 3 ? i[0] : n[0] - i[0]) || 0, (r == 0 || r == 1 ? i[1] : n[1] - i[1]) || 0];
512
514
  return r % 2 && s.reverse(), s;
513
- }, Rt = (e, t = 0) => {
515
+ }, Et = (e, t = 0) => {
514
516
  const r = [...e];
515
517
  return t % 2 && r.reverse(), [(t == 0 || t == 3 ? r[0] : -r[0]) || 0, (t == 0 || t == 1 ? r[1] : -r[1]) || 0];
516
- }, Et = (e, t = 0) => {
518
+ }, It = (e, t = 0) => {
517
519
  const r = [...e], n = [(t == 0 || t == 3 ? r[0] : -r[0]) || 0, (t == 0 || t == 1 ? r[1] : -r[1]) || 0];
518
520
  return t % 2 && n.reverse(), n;
519
521
  }, v = (e, t = [4, 8]) => {
@@ -523,26 +525,26 @@ var $ = (e, t, r = 0) => {
523
525
  return [Math.max(1, Math.floor(Number(r.columns) || t[0])), Math.max(1, Math.floor(Number(r.rows) || t[1]))];
524
526
  }
525
527
  return [t[0], t[1]];
526
- }, me = (e, t) => {
528
+ }, de = (e, t) => {
527
529
  const [r, n] = v(t);
528
530
  return [Math.max(0, Math.min(r - 1, Math.floor(Number(e[0]) || 0))), Math.max(0, Math.min(n - 1, Math.floor(Number(e[1]) || 0)))];
529
- }, It = (e, t, r, n, i) => {
530
- const s = v(r), f = Math.max(1, t[0] || 1), o = Math.max(1, t[1] || 1), a = $(e, [f, o], n), u = {
531
+ }, _t = (e, t, r, n, i) => {
532
+ const s = v(r), f = Math.max(1, t[0] || 1), o = Math.max(1, t[1] || 1), a = G(e, [f, o], n), u = {
531
533
  item: i?.redirect?.item ?? { id: "" },
532
534
  list: i?.redirect?.list ?? [],
533
535
  items: i?.redirect?.items ?? /* @__PURE__ */ new Map(),
534
536
  layout: s,
535
537
  size: [f, o]
536
- }, y = ge(a, u, n), M = (i?.mode ?? "floor") === "round" ? [Math.round(y[0]), Math.round(y[1])] : [Math.floor(y[0]), Math.floor(y[1])], P = pe(M, u);
537
- return me(P, s);
538
- }, de = (e) => e == null ? [] : Array.isArray(e) ? e : e instanceof Map ? Array.from(e.values()) : e instanceof Set || typeof e[Symbol.iterator] == "function" ? Array.from(e) : [], _t = (e, t) => {
538
+ }, y = Se(a, u, n), M = (i?.mode ?? "floor") === "round" ? [Math.round(y[0]), Math.round(y[1])] : [Math.floor(y[0]), Math.floor(y[1])], P = ge(M, u);
539
+ return de(P, s);
540
+ }, pe = (e) => e == null ? [] : Array.isArray(e) ? e : e instanceof Map ? Array.from(e.values()) : e instanceof Set || typeof e[Symbol.iterator] == "function" ? Array.from(e) : [], Dt = (e, t) => {
539
541
  const r = e.style.getPropertyValue(["--ox-c-span", "--ox-r-span"][t]), n = (parseFloat(r || "1") || 1) - 1;
540
542
  return Math.min(Math.max(n - 1, 0), 1);
541
- }, pe = (e, t) => {
543
+ }, ge = (e, t) => {
542
544
  const r = v(t?.layout ?? [4, 8]), n = {
543
545
  ...t,
544
546
  layout: r
545
- }, i = de(n?.items), s = n?.item || {}, f = (d) => i.filter((C) => !(C == s || C?.id == s?.id)).some((C) => (C?.cell?.[0] || 0) == (d[0] || 0) && (C?.cell?.[1] || 0) == (d[1] || 0)), o = [...e];
547
+ }, i = pe(n?.items), s = n?.item || {}, f = (d) => i.filter((w) => !(w == s || w?.id == s?.id)).some((w) => (w?.cell?.[0] || 0) == (d[0] || 0) && (w?.cell?.[1] || 0) == (d[1] || 0)), o = [...e];
546
548
  if (!f(o)) return [...o];
547
549
  const a = r[0] || 4, u = r[1] || 8, y = ([
548
550
  [o[0] + 1, o[1]],
@@ -557,49 +559,49 @@ var $ = (e, t, r = 0) => {
557
559
  h[0]++, h[0] >= a && (h[0] = 0, h[1]++, h[1] >= u && (h[1] = 0));
558
560
  }
559
561
  return [...o];
560
- }, Dt = (e, t, r = 0) => {
562
+ }, Wt = (e, t, r = 0) => {
561
563
  const n = [...t.size], i = [...e], s = v(t.layout ?? [4, 8]);
562
564
  return r % 2 && n.reverse(), [S(i[0], n[0] / s[0]), S(i[1], n[1] / s[1])];
563
- }, ge = (e, t, r = 0) => {
565
+ }, Se = (e, t, r = 0) => {
564
566
  const n = [...t.size], i = [...e], s = v(t.layout ?? [4, 8]);
565
567
  r % 2 && n.reverse();
566
568
  const f = [s[0] / n[0], s[1] / n[1]];
567
569
  return [i[0] * f[0], i[1] * f[1]];
568
- }, Wt = (e, t, r = 0) => {
570
+ }, Nt = (e, t, r = 0) => {
569
571
  const n = [...e], i = [...t.size], s = v(t.layout ?? [4, 8]);
570
572
  r % 2 && i.reverse();
571
573
  const f = [i[0] / s[0], i[1] / s[1]];
572
574
  return [S(n[0], f[0]), S(n[1], f[1])];
573
- }, Nt = (e, t) => {
575
+ }, kt = (e, t) => {
574
576
  const r = v(t.layout ?? [4, 8]);
575
577
  return [Math.min(Math.max(S(e[0]), 0), r[0] - 1), Math.min(Math.max(S(e[1]), 0), r[1] - 1)];
576
- }, kt = (e, t, r = 0) => {
577
- const n = [...e], i = [...t.size], s = v(t.layout ?? [4, 8]), f = $(n, i, r), o = r % 2 ? [i[1], i[0]] : [i[0], i[1]];
578
+ }, Ht = (e, t, r = 0) => {
579
+ const n = [...e], i = [...t.size], s = v(t.layout ?? [4, 8]), f = G(n, i, r), o = r % 2 ? [i[1], i[0]] : [i[0], i[1]];
578
580
  return [Math.min(Math.max(S(f[0] / o[0] * s[0], 1), 0), s[0] - 1), Math.min(Math.max(S(f[1] / o[1] * s[1], 1), 0), s[1] - 1)];
579
581
  }, D = (e) => {
580
582
  const t = String(e ?? "").trim();
581
583
  return t ? (t.startsWith("/") ? t : `/${t}`).replace(/\/+/g, "/") : "/";
582
- }, G = (e) => {
584
+ }, q = (e) => {
583
585
  const t = D(e);
584
586
  return t === "/user" || t.startsWith("/user/");
585
- }, q = (e) => {
587
+ }, j = (e) => {
586
588
  const t = D(e);
587
589
  return t === "/user" ? "/" : t.startsWith("/user/") ? t.slice(5) || "/" : t;
588
- }, Ht = (e) => q(e).replace(/^\/+/, ""), Lt = (e) => {
590
+ }, Lt = (e) => j(e).replace(/^\/+/, ""), zt = (e) => {
589
591
  const t = D(e);
590
- return G(t) ? t : t === "/" ? "/user/" : `/user${t}`;
591
- }, zt = (e) => {
592
- const t = D(e), r = q(t);
593
- return G(t) ? Array.from(/* @__PURE__ */ new Set([r, t])) : [r];
594
- }, Ft = (e) => e ? (e = e?.replace?.(/_/g, " ") || e, e = e?.charAt?.(0)?.toUpperCase?.() + e?.slice?.(1) || e, e) : "", Bt = (e, t, r = -1, n = null) => {
592
+ return q(t) ? t : t === "/" ? "/user/" : `/user${t}`;
593
+ }, Ft = (e) => {
594
+ const t = D(e), r = j(t);
595
+ return q(t) ? Array.from(/* @__PURE__ */ new Set([r, t])) : [r];
596
+ }, Bt = (e) => e ? (e = e?.replace?.(/_/g, " ") || e, e = e?.charAt?.(0)?.toUpperCase?.() + e?.slice?.(1) || e, e) : "", Ut = (e, t, r = -1, n = null) => {
595
597
  e?.indexOf?.(t) >= 0 ? e.splice(e.indexOf(t), 1) : r >= 0 && r < e?.length && e.splice(r, 1);
596
- }, Ut = (e, t) => {
598
+ }, Vt = (e, t) => {
597
599
  e?.indexOf?.(t) >= 0 && e.splice(e.indexOf(t), 1);
598
- }, Se = (e, t) => {
600
+ }, ve = (e, t) => {
599
601
  e?.indexOf?.(t) < 0 && e.push(t);
600
- }, Vt = (e, t, r = -1) => {
601
- typeof r != "number" || r < 0 || r >= e?.length ? Se(e, t) : typeof r == "number" && e?.indexOf?.(t) < 0 && e.splice(r, 0, t);
602
- }, T = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new Map(), ve = async (e) => {
602
+ }, $t = (e, t, r = -1) => {
603
+ typeof r != "number" || r < 0 || r >= e?.length ? ve(e, t) : typeof r == "number" && e?.indexOf?.(t) < 0 && e.splice(r, 0, t);
604
+ }, T = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new Map(), Me = async (e) => {
603
605
  try {
604
606
  e = await e;
605
607
  } catch (n) {
@@ -619,7 +621,7 @@ var $ = (e, t, r = 0) => {
619
621
  }
620
622
  }
621
623
  return e && T.set(e, r), r;
622
- }, $t = async (e, t) => {
624
+ }, Gt = async (e, t) => {
623
625
  try {
624
626
  t = await t;
625
627
  } catch (n) {
@@ -627,9 +629,9 @@ var $ = (e, t, r = 0) => {
627
629
  }
628
630
  if (e == null) return null;
629
631
  if (R.has(e)) return R.get(e);
630
- const r = t != null ? await ve(t) : R?.get(e);
632
+ const r = t != null ? await Me(t) : R?.get(e);
631
633
  return e && R.set(e, r), r;
632
- }, Gt = (e, t) => {
634
+ }, qt = (e, t) => {
633
635
  const r = /* @__PURE__ */ new Map();
634
636
  e.forEach((i, s) => {
635
637
  i?.name && r.set(i.name, {
@@ -651,22 +653,22 @@ var $ = (e, t, r = 0) => {
651
653
  s?.name && !n.has(s.name) && e.splice(i, 1);
652
654
  }
653
655
  return e.sort((i, s) => i?.name?.localeCompare?.(s?.name ?? "")), e;
654
- }, Me = /\+?\d[\d\s().\-]{4,}\d/g, Ae = /(доб\.?|доп\.?|ext\.?|extension)\s*[:#\-x]*\s*\d+.*/i, j = {
656
+ }, Ae = /\+?\d[\d\s().\-]{4,}\d/g, Pe = /(доб\.?|доп\.?|ext\.?|extension)\s*[:#\-x]*\s*\d+.*/i, J = {
655
657
  defaultTrunk: "8",
656
658
  countryCode: "7",
657
659
  cityCode: null,
658
660
  stripExtensions: !0,
659
661
  minLocal: 5,
660
662
  maxLocal: 7
661
- }, O = (e, t = {}) => {
663
+ }, x = (e, t = {}) => {
662
664
  if (e == null) return null;
663
665
  const r = {
664
- ...j,
666
+ ...J,
665
667
  ...t
666
668
  };
667
669
  let n = String(e).trim();
668
670
  if (!n) return null;
669
- r.stripExtensions && (n = n.replace(Ae, ""));
671
+ r.stripExtensions && (n = n.replace(Pe, ""));
670
672
  const i = /^\+/.test(n);
671
673
  let s = n.replace(/\D/g, "");
672
674
  if (!s) return null;
@@ -680,28 +682,28 @@ var $ = (e, t, r = 0) => {
680
682
  return /^\d{11}$/.test(s) ? s : null;
681
683
  }, L = (e) => {
682
684
  if (e == null) return [];
683
- const t = String(e), r = t.match(Me);
685
+ const t = String(e), r = t.match(Ae);
684
686
  return r?.length ? r : t.split(/[;,/|]+/).map((n) => n.trim()).filter(Boolean);
685
- }, Pe = (e, t = {}) => {
687
+ }, Ce = (e, t = {}) => {
686
688
  const r = /* @__PURE__ */ new Set();
687
689
  if (Array.isArray(e)) for (const n of e) if (typeof n == "string") for (const i of L(n)) {
688
- const s = O(i, t);
690
+ const s = x(i, t);
689
691
  s && r.add(s);
690
692
  }
691
693
  else {
692
- const i = O(n, t);
694
+ const i = x(n, t);
693
695
  i && r.add(i);
694
696
  }
695
697
  else if (typeof e == "string") for (const n of L(e)) {
696
- const i = O(n, t);
698
+ const i = x(n, t);
697
699
  i && r.add(i);
698
700
  }
699
701
  else {
700
- const n = O(e, t);
702
+ const n = x(e, t);
701
703
  n && r.add(n);
702
704
  }
703
705
  return [...r];
704
- }, we = (e, t) => Array.isArray(e) && typeof e[1] == "number" ? e[1] : e && typeof e == "object" && typeof e.index == "number" ? e.index : t, Ce = (e) => {
706
+ }, we = (e, t) => Array.isArray(e) && typeof e[1] == "number" ? e[1] : e && typeof e == "object" && typeof e.index == "number" ? e.index : t, be = (e) => {
705
707
  if (Array.isArray(e)) return e[0];
706
708
  if (e && typeof e == "object") {
707
709
  if ("phones" in e) return e.phones;
@@ -709,13 +711,13 @@ var $ = (e, t, r = 0) => {
709
711
  }
710
712
  return e;
711
713
  };
712
- function qt(e, t = {}) {
714
+ function jt(e, t = {}) {
713
715
  const r = {
714
- ...j,
716
+ ...J,
715
717
  ...t
716
718
  }, n = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
717
719
  e.forEach((o, a) => {
718
- const u = we(o, a), y = Ce(o), M = Pe(y, r);
720
+ const u = we(o, a), y = be(o), M = Ce(y, r);
719
721
  i.has(u) || i.set(u, /* @__PURE__ */ new Set());
720
722
  const P = i.get(u);
721
723
  for (const h of M)
@@ -732,10 +734,10 @@ function qt(e, t = {}) {
732
734
  duplicatesByNumber: s,
733
735
  pairs: Object.entries(f).map(([o, a]) => [Number(o), a]).sort((o, a) => o[0] - a[0]),
734
736
  duplicatesByIndex: f,
735
- normalize: (o) => O(o, r)
737
+ normalize: (o) => x(o, r)
736
738
  };
737
739
  }
738
- var J = () => Intl.DateTimeFormat().resolvedOptions().timeZone;
740
+ var K = () => Intl.DateTimeFormat().resolvedOptions().timeZone;
739
741
  function xe(e) {
740
742
  return e ? /^([01]\d|2[0-3]):([0-5]\d)$/.test(String(e).trim()) : !1;
741
743
  }
@@ -758,30 +760,30 @@ function A(e) {
758
760
  }
759
761
  return new Date(String(e));
760
762
  }
761
- function jt(e) {
763
+ function Jt(e) {
762
764
  return e ? typeof e == "number" ? e >= 1e12 ? e : e * (Math.pow(10, 11 - (String(e | 0)?.length || 11)) | 0) : e instanceof Date ? e.getTime() : A(e)?.getTime?.() ?? Date.now() : Date.now();
763
765
  }
764
- var Jt = (e) => {
766
+ var Kt = (e) => {
765
767
  if (!e) return null;
766
768
  const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())), r = t.getUTCDay() || 7;
767
769
  t.setUTCDate(t.getUTCDate() + 4 - r);
768
770
  const n = new Date(Date.UTC(t.getUTCFullYear(), 0, 1));
769
771
  return Math.ceil(((t.getTime() - n.getTime()) / 864e5 + 1) / 7);
770
- }, Oe = (e) => e ? typeof e == "object" && (e.date || e.iso_date || e.timestamp) ? e : { iso_date: String(e) } : null, Kt = (e) => {
772
+ }, Oe = (e) => e ? typeof e == "object" && (e.date || e.iso_date || e.timestamp) ? e : { iso_date: String(e) } : null, Xt = (e) => {
771
773
  const t = Oe(e);
772
774
  return t && A(t)?.toLocaleTimeString?.("en-GB", {
773
775
  hour: "2-digit",
774
776
  minute: "2-digit",
775
777
  hour12: !1,
776
- timeZone: J()
778
+ timeZone: K()
777
779
  }) || "";
778
- }, Xt = (e) => A(e)?.toLocaleDateString?.("en-GB", {
780
+ }, Zt = (e) => A(e)?.toLocaleDateString?.("en-GB", {
779
781
  day: "numeric",
780
782
  month: "long",
781
783
  weekday: "long",
782
784
  year: "numeric",
783
- timeZone: J()
784
- }) || "", Zt = (e) => {
785
+ timeZone: K()
786
+ }) || "", Yt = (e) => {
785
787
  const t = new Date(e);
786
788
  return Number.isNaN(t.getTime()) ? "" : t.toLocaleString(void 0, {
787
789
  year: "numeric",
@@ -802,7 +804,7 @@ var Jt = (e) => {
802
804
  }
803
805
  const n = Number(e);
804
806
  return Number.isFinite(n) ? n : NaN;
805
- }, Yt = (e) => {
807
+ }, Qt = (e) => {
806
808
  const t = e instanceof Date || typeof e == "string" && e.match(/^\d{4}-\d{2}-\d{2}$/);
807
809
  let r = !1;
808
810
  try {
@@ -811,33 +813,33 @@ var Jt = (e) => {
811
813
  r = !1;
812
814
  }
813
815
  return !!((t && r) ?? !1);
814
- }, Qt = (e, t, r) => e && t ? l(e) < l(r) && l(r) < l(t) : e ? l(e) < l(r) : t ? l(r) < l(t) : !1, er = (e, t, r, n = 7) => {
816
+ }, er = (e, t, r) => e && t ? l(e) < l(r) && l(r) < l(t) : e ? l(e) < l(r) : t ? l(r) < l(t) : !1, tr = (e, t, r, n = 7) => {
815
817
  let i = !0;
816
818
  if (e && (i &&= l(r) <= l(e)), t && (i &&= l(r) < l(t)), n) {
817
819
  const s = l(r) + n * 24 * 60 * 60 * 1e3;
818
820
  i &&= l(e) < l(s);
819
821
  }
820
822
  return i;
821
- }, tr = (e, t) => {
823
+ }, rr = (e, t) => {
822
824
  const r = l(e) || 0, n = (Number.isFinite(r) ? r : 0) - (t || 0);
823
- return Math.round(n / (1440 * 60 * 1e3));
825
+ return Math.round(n / 864e5);
824
826
  };
825
- function rr(e, t) {
827
+ function nr(e, t) {
826
828
  let r;
827
829
  return (...n) => {
828
830
  clearTimeout(r), r = setTimeout(() => e(...n), t);
829
831
  };
830
832
  }
831
- function nr(e, t) {
833
+ function ir(e, t) {
832
834
  let r = !1;
833
835
  return (...n) => {
834
836
  r || (e(...n), r = !0, setTimeout(() => r = !1, t));
835
837
  };
836
838
  }
837
- function ir(e) {
839
+ function sr(e) {
838
840
  return new Promise((t) => setTimeout(t, e));
839
841
  }
840
- function sr(e = "") {
842
+ function or(e = "") {
841
843
  return `${e}${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 9)}`;
842
844
  }
843
845
  function z(e) {
@@ -851,161 +853,161 @@ function z(e) {
851
853
  }
852
854
  return e;
853
855
  }
854
- function or(e) {
856
+ function fr(e) {
855
857
  return e == null ? !0 : typeof e == "string" ? e.trim().length === 0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1;
856
858
  }
857
- function fr() {
859
+ function ar() {
858
860
  return typeof window < "u" && typeof document < "u";
859
861
  }
860
- function ar() {
862
+ function ur() {
861
863
  return typeof self < "u" && typeof window > "u";
862
864
  }
863
- K();
865
+ X();
864
866
  export {
865
- Qe as $avoidTrigger,
867
+ et as $avoidTrigger,
866
868
  F as $fxy,
867
- Q as $getValue,
868
- ze as $set,
869
+ ee as $getValue,
870
+ Fe as $set,
869
871
  I as $triggerLock,
870
- Te as AsyncQueue,
871
- Z as ChannelHealthMonitor,
872
- X as ChannelRegistry,
873
- Ae as EXT_CUT_RE,
874
- ve as GET_OR_CACHE,
875
- $t as GET_OR_CACHE_BY_NAME,
876
- re as INTEGER_REGEXP,
877
- Me as PHONE_CANDIDATE_RE,
878
- Se as PUSH_ONCE,
879
- ye as Promised,
880
- Ut as REMOVE_IF_HAS,
881
- Bt as REMOVE_IF_HAS_SIMILAR,
882
- Vt as SPLICE_INTO_ONCE,
883
- Ve as UUIDv4,
884
- bt as WRef,
885
- Mt as bindCtx,
872
+ Re as AsyncQueue,
873
+ Y as ChannelHealthMonitor,
874
+ Z as ChannelRegistry,
875
+ Pe as EXT_CUT_RE,
876
+ Me as GET_OR_CACHE,
877
+ Gt as GET_OR_CACHE_BY_NAME,
878
+ ne as INTEGER_REGEXP,
879
+ Ae as PHONE_CANDIDATE_RE,
880
+ ve as PUSH_ONCE,
881
+ he as Promised,
882
+ Vt as REMOVE_IF_HAS,
883
+ Ut as REMOVE_IF_HAS_SIMILAR,
884
+ $t as SPLICE_INTO_ONCE,
885
+ $e as UUIDv4,
886
+ Tt as WRef,
887
+ At as bindCtx,
886
888
  Ot as bindEvent,
887
- ae as bindFx,
888
- ce as boundCtx,
889
+ ue as bindFx,
890
+ le as boundCtx,
889
891
  T as cachedPerFile,
890
892
  R as cachedPerFileName,
891
- ue as callByAllProp,
893
+ ce as callByAllProp,
892
894
  W as callByProp,
893
- $e as camelToKebab,
894
- rt as canBeInteger,
895
- Ke as ceilNearest,
896
- Qt as checkInTimeRange,
897
- er as checkRemainsTime,
898
- Be as clamp,
899
- je as clampDimension,
900
- me as clampGridCellTuple,
901
- kt as clientSpaceInOrientCX,
902
- tr as computeTimelineOrderInGeneral,
903
- Ie as concurrentLimit,
895
+ Ge as camelToKebab,
896
+ nt as canBeInteger,
897
+ Xe as ceilNearest,
898
+ er as checkInTimeRange,
899
+ tr as checkRemainsTime,
900
+ Ue as clamp,
901
+ Je as clampDimension,
902
+ de as clampGridCellTuple,
903
+ Ht as clientSpaceInOrientCX,
904
+ rr as computeTimelineOrderInGeneral,
905
+ _e as concurrentLimit,
904
906
  xt as contextify,
905
- ge as convertOrientPxToCX,
906
- De as createChannelProxy,
907
- be as createDeferred,
908
- $ as cvt_cs_to_os,
909
- Tt as cvt_os_to_cs,
910
- Rt as cvt_rel_cs_to_os,
911
- Et as cvt_rel_os_to_cs,
912
- rr as debounce,
907
+ Se as convertOrientPxToCX,
908
+ We as createChannelProxy,
909
+ Te as createDeferred,
910
+ G as cvt_cs_to_os,
911
+ Rt as cvt_os_to_cs,
912
+ Et as cvt_rel_cs_to_os,
913
+ It as cvt_rel_os_to_cs,
914
+ nr as debounce,
913
915
  z as deepClone,
914
- b as deepOperateAndClone,
915
- pt as defaultByType,
916
+ O as deepOperateAndClone,
917
+ gt as defaultByType,
916
918
  E as deref,
917
- qt as findDuplicatePhones,
918
- ee as fixFx,
919
- Nt as floorInCX,
920
- Wt as floorInOrientPx,
921
- Je as floorNearest,
922
- Xt as formatAsDate,
923
- Kt as formatAsTime,
924
- Zt as formatDateTime,
919
+ jt as findDuplicatePhones,
920
+ te as fixFx,
921
+ kt as floorInCX,
922
+ Nt as floorInOrientPx,
923
+ Ke as floorNearest,
924
+ Zt as formatAsDate,
925
+ Xt as formatAsTime,
926
+ Yt as formatDateTime,
925
927
  l as getComparableTimeValue,
926
- Jt as getISOWeekNumber,
928
+ Kt as getISOWeekNumber,
927
929
  we as getIndexForRow,
928
- Ne as getOrInsert,
929
- ke as getOrInsertComputed,
930
- Ce as getPhonesFromRow,
931
- te as getRandomValues,
932
- _t as getSpan,
933
- J as getTimeZone,
934
- ut as getValue,
935
- We as globalChannelHealthMonitor,
936
- _e as globalChannelRegistry,
937
- de as gridItemsAsArray,
938
- it as handleListeners,
930
+ ke as getOrInsert,
931
+ He as getOrInsertComputed,
932
+ be as getPhonesFromRow,
933
+ re as getRandomValues,
934
+ Dt as getSpan,
935
+ K as getTimeZone,
936
+ ct as getValue,
937
+ Ne as globalChannelHealthMonitor,
938
+ De as globalChannelRegistry,
939
+ pe as gridItemsAsArray,
940
+ st as handleListeners,
939
941
  k as hasProperty,
940
942
  B as hasValue,
941
- Ct as inProxy,
943
+ bt as inProxy,
942
944
  wt as isArrayInvalidKey,
943
- nt as isArrayOrIterable,
944
- fr as isBrowser,
945
- x as isCanJustReturn,
946
- dt as isCanTransfer,
947
- Yt as isDate,
948
- or as isEmpty,
949
- He as isHasPrimitives,
950
- w as isIterable,
951
- gt as isKeyType,
952
- ie as isNotComplexArray,
945
+ it as isArrayOrIterable,
946
+ ar as isBrowser,
947
+ b as isCanJustReturn,
948
+ pt as isCanTransfer,
949
+ Qt as isDate,
950
+ fr as isEmpty,
951
+ Le as isHasPrimitives,
952
+ C as isIterable,
953
+ St as isKeyType,
954
+ se as isNotComplexArray,
953
955
  _ as isNotEqual,
954
- at as isObject,
955
- Pt as isObjectNotEqual,
956
- Le as isObservable,
956
+ ut as isObject,
957
+ Ct as isObjectNotEqual,
958
+ ze as isObservable,
957
959
  g as isPrimitive,
958
- mt as isPromise,
960
+ dt as isPromise,
959
961
  xe as isPureHHMM,
960
962
  U as isRef,
961
- ht as isSymbol,
962
- se as isTypedArray,
963
- G as isUserScopePath,
964
- Ze as isVal,
965
- tt as isValidNumber,
966
- St as isValidObj,
967
- ft as isValueRef,
968
- Xe as isValueUnit,
969
- ar as isWorker,
970
- Ge as kebabToCamel,
971
- Dt as makeOrientInset,
972
- yt as makeTriggerLess,
973
- Gt as mergeByExists,
974
- vt as mergeByKey,
963
+ mt as isSymbol,
964
+ oe as isTypedArray,
965
+ q as isUserScopePath,
966
+ Ye as isVal,
967
+ rt as isValidNumber,
968
+ vt as isValidObj,
969
+ at as isValueRef,
970
+ Ze as isValueUnit,
971
+ ur as isWorker,
972
+ qe as kebabToCamel,
973
+ Wt as makeOrientInset,
974
+ ht as makeTriggerLess,
975
+ qt as mergeByExists,
976
+ Mt as mergeByKey,
975
977
  v as normalizeGridLayout,
976
- O as normalizeOne,
977
- Pe as normalizePhones,
978
- Ye as normalizePrimitive,
978
+ x as normalizeOne,
979
+ Ce as normalizePhones,
980
+ Qe as normalizePrimitive,
979
981
  Oe as normalizeSchedule,
980
- fe as objectAssign,
981
- At as objectAssignNotEqual,
982
- jt as parseAndGetCorrectTime,
982
+ ae as objectAssign,
983
+ Pt as objectAssignNotEqual,
984
+ Jt as parseAndGetCorrectTime,
983
985
  A as parseDateCorrectly,
984
- ct as potentiallyAsync,
985
- lt as potentiallyAsyncMap,
986
- pe as redirectCell,
987
- oe as removeExtra,
988
- Ft as renderTabName,
989
- It as resolveLocalPointToGridCell,
990
- Ee as retry,
986
+ lt as potentiallyAsync,
987
+ yt as potentiallyAsyncMap,
988
+ ge as redirectCell,
989
+ fe as removeExtra,
990
+ Bt as renderTabName,
991
+ _t as resolveLocalPointToGridCell,
992
+ Ie as retry,
991
993
  S as roundNearest,
992
- ir as sleep,
994
+ sr as sleep,
993
995
  L as splitCandidates,
994
- q as stripUserScopePrefix,
995
- nr as throttle,
996
- qe as toFiniteNumber,
997
- ot as toRef,
998
- Ht as toUserRelativePath,
999
- Lt as toUserScopePath,
1000
- Y as tryParseByHint,
1001
- ne as tryStringAsInteger,
1002
- et as tryStringAsNumber,
1003
- sr as uniqueId,
1004
- st as unref,
996
+ j as stripUserScopePrefix,
997
+ ir as throttle,
998
+ je as toFiniteNumber,
999
+ ft as toRef,
1000
+ Lt as toUserRelativePath,
1001
+ zt as toUserScopePath,
1002
+ Q as tryParseByHint,
1003
+ ie as tryStringAsInteger,
1004
+ tt as tryStringAsNumber,
1005
+ or as uniqueId,
1006
+ ot as unref,
1005
1007
  c as unwrap,
1006
1008
  V as unwrapArray,
1007
- zt as userPathCandidates,
1008
- Fe as valueClamp,
1009
- Ue as withCtx,
1010
- Re as withTimeout
1009
+ Ft as userPathCandidates,
1010
+ Be as valueClamp,
1011
+ Ve as withCtx,
1012
+ Ee as withTimeout
1011
1013
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fest-lib/core",
3
3
  "description": "Core JavaScript/TypeScript utilities (fest-lib)",
4
- "version": "0.1.6",
4
+ "version": "0.1.8",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "sideEffects": false,
@@ -36,7 +36,9 @@
36
36
  "import": "./dist/core.js",
37
37
  "default": "./dist/core.js"
38
38
  },
39
- "./package.json": "./package.json"
39
+ "./package.json": "./package.json",
40
+ "./dist/index.js": "./dist/core.js",
41
+ "./index.js": "./dist/core.js"
40
42
  },
41
43
  "scripts": {
42
44
  "test": "vite --host 0.0.0.0",
@@ -44,9 +46,10 @@
44
46
  "watch": "vite build --watch",
45
47
  "build": "vite build --config vite.config.js && npm run docs && npm run docs:md",
46
48
  "build:publish": "FEST_NPM_IMPORTS=1 vite build --config vite.config.js",
47
- "publish": "npm install -D typedoc typedoc-plugin-markdown && npm audit fix && npm run build && npm publish --access public",
48
49
  "prepack": "npm run build:publish",
49
50
  "preview": "vite preview",
51
+ "release": "PUPPETEER_SKIP_DOWNLOAD=1 npm run build:publish && npm publish --access public --ignore-scripts",
52
+ "publish": "npm run release",
50
53
  "docs": "typedoc ./src/index.ts --options ./typedoc.json --out ./docs --tsconfig ./tsconfig.json --excludeExternals --excludePrivate --excludeProtected --skipErrorChecking",
51
54
  "docs:clean": "rm -rf ./docs && typedoc --options ./typedoc.json",
52
55
  "docs:md": "typedoc --options ./typedoc.md.json",