@bquery/bquery 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +139 -120
  2. package/dist/component/component.d.ts.map +1 -1
  3. package/dist/component/index.d.ts +2 -0
  4. package/dist/component/index.d.ts.map +1 -1
  5. package/dist/component/library.d.ts +34 -0
  6. package/dist/component/library.d.ts.map +1 -0
  7. package/dist/component/types.d.ts +10 -6
  8. package/dist/component/types.d.ts.map +1 -1
  9. package/dist/component-CY5MVoYN.js +531 -0
  10. package/dist/component-CY5MVoYN.js.map +1 -0
  11. package/dist/component.es.mjs +6 -184
  12. package/dist/config-DRmZZno3.js +40 -0
  13. package/dist/config-DRmZZno3.js.map +1 -0
  14. package/dist/core-CK2Mfpf4.js +648 -0
  15. package/dist/core-CK2Mfpf4.js.map +1 -0
  16. package/dist/core-DPdbItcq.js +112 -0
  17. package/dist/core-DPdbItcq.js.map +1 -0
  18. package/dist/core.es.mjs +45 -1261
  19. package/dist/full.d.ts +6 -6
  20. package/dist/full.d.ts.map +1 -1
  21. package/dist/full.es.mjs +98 -92
  22. package/dist/full.iife.js +173 -3
  23. package/dist/full.iife.js.map +1 -1
  24. package/dist/full.umd.js +173 -3
  25. package/dist/full.umd.js.map +1 -1
  26. package/dist/index.es.mjs +143 -139
  27. package/dist/motion/transition.d.ts +1 -1
  28. package/dist/motion/transition.d.ts.map +1 -1
  29. package/dist/motion/types.d.ts +11 -1
  30. package/dist/motion/types.d.ts.map +1 -1
  31. package/dist/motion-C5DRdPnO.js +415 -0
  32. package/dist/motion-C5DRdPnO.js.map +1 -0
  33. package/dist/motion.es.mjs +25 -361
  34. package/dist/object-qGpWr6-J.js +38 -0
  35. package/dist/object-qGpWr6-J.js.map +1 -0
  36. package/dist/platform/announcer.d.ts +59 -0
  37. package/dist/platform/announcer.d.ts.map +1 -0
  38. package/dist/platform/config.d.ts +92 -0
  39. package/dist/platform/config.d.ts.map +1 -0
  40. package/dist/platform/cookies.d.ts +45 -0
  41. package/dist/platform/cookies.d.ts.map +1 -0
  42. package/dist/platform/index.d.ts +8 -0
  43. package/dist/platform/index.d.ts.map +1 -1
  44. package/dist/platform/meta.d.ts +62 -0
  45. package/dist/platform/meta.d.ts.map +1 -0
  46. package/dist/platform-B7JhGBc7.js +361 -0
  47. package/dist/platform-B7JhGBc7.js.map +1 -0
  48. package/dist/platform.es.mjs +11 -248
  49. package/dist/reactive/async-data.d.ts +114 -0
  50. package/dist/reactive/async-data.d.ts.map +1 -0
  51. package/dist/reactive/index.d.ts +2 -2
  52. package/dist/reactive/index.d.ts.map +1 -1
  53. package/dist/reactive/signal.d.ts +2 -0
  54. package/dist/reactive/signal.d.ts.map +1 -1
  55. package/dist/reactive-BDya-ia8.js +253 -0
  56. package/dist/reactive-BDya-ia8.js.map +1 -0
  57. package/dist/reactive.es.mjs +18 -34
  58. package/dist/router-CijiICxt.js +188 -0
  59. package/dist/router-CijiICxt.js.map +1 -0
  60. package/dist/router.es.mjs +11 -200
  61. package/dist/sanitize-jyJ2ryE2.js +302 -0
  62. package/dist/sanitize-jyJ2ryE2.js.map +1 -0
  63. package/dist/security/constants.d.ts.map +1 -1
  64. package/dist/security.es.mjs +10 -56
  65. package/dist/store-CPK9E62U.js +262 -0
  66. package/dist/store-CPK9E62U.js.map +1 -0
  67. package/dist/store.es.mjs +12 -25
  68. package/dist/view-Cdi0g-qo.js +396 -0
  69. package/dist/view-Cdi0g-qo.js.map +1 -0
  70. package/dist/view.es.mjs +10 -430
  71. package/package.json +15 -11
  72. package/src/component/component.ts +319 -289
  73. package/src/component/index.ts +42 -40
  74. package/src/component/library.ts +504 -0
  75. package/src/component/types.ts +91 -85
  76. package/src/core/collection.ts +628 -628
  77. package/src/core/element.ts +774 -774
  78. package/src/core/index.ts +48 -48
  79. package/src/core/utils/function.ts +151 -151
  80. package/src/full.ts +223 -187
  81. package/src/motion/animate.ts +113 -113
  82. package/src/motion/flip.ts +176 -176
  83. package/src/motion/scroll.ts +57 -57
  84. package/src/motion/spring.ts +150 -150
  85. package/src/motion/timeline.ts +246 -246
  86. package/src/motion/transition.ts +53 -7
  87. package/src/motion/types.ts +208 -198
  88. package/src/platform/announcer.ts +208 -0
  89. package/src/platform/config.ts +163 -0
  90. package/src/platform/cookies.ts +165 -0
  91. package/src/platform/index.ts +39 -18
  92. package/src/platform/meta.ts +168 -0
  93. package/src/platform/storage.ts +215 -215
  94. package/src/reactive/async-data.ts +486 -0
  95. package/src/reactive/core.ts +114 -114
  96. package/src/reactive/effect.ts +54 -54
  97. package/src/reactive/index.ts +37 -23
  98. package/src/reactive/internals.ts +122 -122
  99. package/src/reactive/signal.ts +29 -20
  100. package/src/security/constants.ts +211 -209
  101. package/src/security/sanitize-core.ts +364 -364
  102. package/src/view/evaluate.ts +290 -290
  103. package/dist/batch-x7b2eZST.js +0 -13
  104. package/dist/batch-x7b2eZST.js.map +0 -1
  105. package/dist/component.es.mjs.map +0 -1
  106. package/dist/core-BhpuvPhy.js +0 -170
  107. package/dist/core-BhpuvPhy.js.map +0 -1
  108. package/dist/core.es.mjs.map +0 -1
  109. package/dist/full.es.mjs.map +0 -1
  110. package/dist/index.es.mjs.map +0 -1
  111. package/dist/motion.es.mjs.map +0 -1
  112. package/dist/persisted-DHoi3uEs.js +0 -278
  113. package/dist/persisted-DHoi3uEs.js.map +0 -1
  114. package/dist/platform.es.mjs.map +0 -1
  115. package/dist/reactive.es.mjs.map +0 -1
  116. package/dist/router.es.mjs.map +0 -1
  117. package/dist/sanitize-Cxvxa-DX.js +0 -283
  118. package/dist/sanitize-Cxvxa-DX.js.map +0 -1
  119. package/dist/security.es.mjs.map +0 -1
  120. package/dist/store.es.mjs.map +0 -1
  121. package/dist/type-guards-BdKlYYlS.js +0 -32
  122. package/dist/type-guards-BdKlYYlS.js.map +0 -1
  123. package/dist/untrack-DNnnqdlR.js +0 -6
  124. package/dist/untrack-DNnnqdlR.js.map +0 -1
  125. package/dist/view.es.mjs.map +0 -1
  126. package/dist/watch-DXXv3iAI.js +0 -58
  127. package/dist/watch-DXXv3iAI.js.map +0 -1
@@ -0,0 +1,648 @@
1
+ import { n as m } from "./sanitize-jyJ2ryE2.js";
2
+ import { a as w, i as E, n as C, o as v, r as L, t as H } from "./object-qGpWr6-J.js";
3
+ var y = (n) => Array.isArray(n) ? n : [n], l = (n, e) => {
4
+ for (const t of n) e(t);
5
+ }, g = (n) => m(n), N = (n, e) => {
6
+ n.innerHTML = m(e);
7
+ }, b = (n) => {
8
+ const e = document.createElement("template");
9
+ return e.innerHTML = m(n), e.content.firstElementChild ?? document.createElement("div");
10
+ }, A = (n, e, t) => {
11
+ if (typeof e == "string") {
12
+ n.insertAdjacentHTML(t, m(e));
13
+ return;
14
+ }
15
+ const r = y(e);
16
+ l(t === "afterbegin" || t === "afterend" ? r.slice().reverse() : r, (s) => {
17
+ n.insertAdjacentElement(t, s);
18
+ });
19
+ }, h = class p {
20
+ constructor(e) {
21
+ this.element = e, this.delegatedHandlers = /* @__PURE__ */ new Map();
22
+ }
23
+ get raw() {
24
+ return this.element;
25
+ }
26
+ get node() {
27
+ return this.element;
28
+ }
29
+ addClass(...e) {
30
+ return this.element.classList.add(...e), this;
31
+ }
32
+ removeClass(...e) {
33
+ return this.element.classList.remove(...e), this;
34
+ }
35
+ toggleClass(e, t) {
36
+ return this.element.classList.toggle(e, t), this;
37
+ }
38
+ attr(e, t) {
39
+ return t === void 0 ? this.element.getAttribute(e) ?? "" : (this.element.setAttribute(e, t), this);
40
+ }
41
+ removeAttr(e) {
42
+ return this.element.removeAttribute(e), this;
43
+ }
44
+ toggleAttr(e, t) {
45
+ const r = this.element.hasAttribute(e);
46
+ return t ?? !r ? this.element.setAttribute(e, "") : this.element.removeAttribute(e), this;
47
+ }
48
+ prop(e, t) {
49
+ return t === void 0 ? this.element[e] : (this.element[e] = t, this);
50
+ }
51
+ data(e, t) {
52
+ const r = e.replace(/[A-Z]/g, (s) => `-${s.toLowerCase()}`);
53
+ return t === void 0 ? this.element.getAttribute(`data-${r}`) ?? "" : (this.element.setAttribute(`data-${r}`, t), this);
54
+ }
55
+ text(e) {
56
+ return e === void 0 ? this.element.textContent ?? "" : (this.element.textContent = e, this);
57
+ }
58
+ html(e) {
59
+ return N(this.element, e), this;
60
+ }
61
+ htmlUnsafe(e) {
62
+ return this.element.innerHTML = e, this;
63
+ }
64
+ css(e, t) {
65
+ if (typeof e == "string") {
66
+ if (t !== void 0)
67
+ return this.element.style.setProperty(e, t), this;
68
+ const r = this.element.ownerDocument?.defaultView;
69
+ return !r || typeof r.getComputedStyle != "function" ? "" : r.getComputedStyle(this.element).getPropertyValue(e);
70
+ }
71
+ for (const [r, s] of Object.entries(e)) this.element.style.setProperty(r, s);
72
+ return this;
73
+ }
74
+ append(e) {
75
+ return this.insertContent(e, "beforeend"), this;
76
+ }
77
+ prepend(e) {
78
+ return this.insertContent(e, "afterbegin"), this;
79
+ }
80
+ before(e) {
81
+ return this.insertContent(e, "beforebegin"), this;
82
+ }
83
+ after(e) {
84
+ return this.insertContent(e, "afterend"), this;
85
+ }
86
+ wrap(e) {
87
+ const t = typeof e == "string" ? document.createElement(e) : e;
88
+ return this.element.parentNode?.insertBefore(t, this.element), t.appendChild(this.element), this;
89
+ }
90
+ unwrap() {
91
+ const e = this.element.parentElement;
92
+ return e && e.parentNode && (e.parentNode.insertBefore(this.element, e), e.remove()), this;
93
+ }
94
+ replaceWith(e) {
95
+ const t = typeof e == "string" ? b(e) : e;
96
+ return this.element.replaceWith(t), new p(t);
97
+ }
98
+ scrollTo(e = { behavior: "smooth" }) {
99
+ return this.element.scrollIntoView(e), this;
100
+ }
101
+ remove() {
102
+ return this.element.remove(), this;
103
+ }
104
+ empty() {
105
+ return this.element.innerHTML = "", this;
106
+ }
107
+ clone(e = !0) {
108
+ return new p(this.element.cloneNode(e));
109
+ }
110
+ find(e) {
111
+ return Array.from(this.element.querySelectorAll(e));
112
+ }
113
+ findOne(e) {
114
+ return this.element.querySelector(e);
115
+ }
116
+ closest(e) {
117
+ return this.element.closest(e);
118
+ }
119
+ parent() {
120
+ return this.element.parentElement;
121
+ }
122
+ children() {
123
+ return Array.from(this.element.children);
124
+ }
125
+ siblings() {
126
+ const e = this.element.parentElement;
127
+ return e ? Array.from(e.children).filter((t) => t !== this.element) : [];
128
+ }
129
+ next() {
130
+ return this.element.nextElementSibling;
131
+ }
132
+ prev() {
133
+ return this.element.previousElementSibling;
134
+ }
135
+ on(e, t) {
136
+ return this.element.addEventListener(e, t), this;
137
+ }
138
+ once(e, t) {
139
+ return this.element.addEventListener(e, t, { once: !0 }), this;
140
+ }
141
+ off(e, t) {
142
+ return this.element.removeEventListener(e, t), this;
143
+ }
144
+ trigger(e, t) {
145
+ return this.element.dispatchEvent(new CustomEvent(e, {
146
+ detail: t,
147
+ bubbles: !0,
148
+ cancelable: !0
149
+ })), this;
150
+ }
151
+ delegate(e, t, r) {
152
+ const s = `${e}:${t}`, i = (o) => {
153
+ const a = o.target.closest(t);
154
+ a && this.element.contains(a) && r(o, a);
155
+ };
156
+ return this.delegatedHandlers.has(s) || this.delegatedHandlers.set(s, /* @__PURE__ */ new Map()), this.delegatedHandlers.get(s).set(r, i), this.element.addEventListener(e, i), this;
157
+ }
158
+ undelegate(e, t, r) {
159
+ const s = `${e}:${t}`, i = this.delegatedHandlers.get(s);
160
+ if (i) {
161
+ const o = i.get(r);
162
+ o && (this.element.removeEventListener(e, o), i.delete(r), i.size === 0 && this.delegatedHandlers.delete(s));
163
+ }
164
+ return this;
165
+ }
166
+ matches(e) {
167
+ return this.element.matches(e);
168
+ }
169
+ is(e) {
170
+ return this.matches(e);
171
+ }
172
+ hasClass(e) {
173
+ return this.element.classList.contains(e);
174
+ }
175
+ show(e = "") {
176
+ return this.element.removeAttribute("hidden"), this.element.style.display = e, this;
177
+ }
178
+ hide() {
179
+ return this.element.style.display = "none", this;
180
+ }
181
+ toggle(e) {
182
+ const t = this.element.style.display === "none";
183
+ return e ?? t ? this.show() : this.hide();
184
+ }
185
+ focus() {
186
+ return this.element.focus(), this;
187
+ }
188
+ blur() {
189
+ return this.element.blur(), this;
190
+ }
191
+ val(e) {
192
+ const t = this.element;
193
+ return e === void 0 ? t.value ?? "" : (t.value = e, this);
194
+ }
195
+ serialize() {
196
+ const e = this.element;
197
+ if (e.tagName.toLowerCase() !== "form") return {};
198
+ const t = {}, r = new FormData(e);
199
+ for (const [s, i] of r.entries())
200
+ if (typeof i == "string")
201
+ if (s in t) {
202
+ const o = t[s];
203
+ Array.isArray(o) ? o.push(i) : t[s] = [o, i];
204
+ } else t[s] = i;
205
+ return t;
206
+ }
207
+ serializeString() {
208
+ const e = this.element;
209
+ if (e.tagName.toLowerCase() !== "form") return "";
210
+ const t = new FormData(e), r = new URLSearchParams();
211
+ for (const [s, i] of t.entries()) typeof i == "string" && r.append(s, i);
212
+ return r.toString();
213
+ }
214
+ rect() {
215
+ return this.element.getBoundingClientRect();
216
+ }
217
+ offset() {
218
+ const e = this.element;
219
+ return {
220
+ width: e.offsetWidth,
221
+ height: e.offsetHeight,
222
+ top: e.offsetTop,
223
+ left: e.offsetLeft
224
+ };
225
+ }
226
+ insertContent(e, t) {
227
+ A(this.element, e, t);
228
+ }
229
+ }, d = class f {
230
+ constructor(e) {
231
+ this.elements = e, this.delegatedHandlers = /* @__PURE__ */ new WeakMap();
232
+ }
233
+ get length() {
234
+ return this.elements.length;
235
+ }
236
+ first() {
237
+ return this.elements[0];
238
+ }
239
+ eq(e) {
240
+ const t = this.elements[e];
241
+ return t ? new h(t) : void 0;
242
+ }
243
+ firstEl() {
244
+ return this.eq(0);
245
+ }
246
+ lastEl() {
247
+ return this.eq(this.elements.length - 1);
248
+ }
249
+ each(e) {
250
+ return this.elements.forEach((t, r) => {
251
+ e(new h(t), r);
252
+ }), this;
253
+ }
254
+ map(e) {
255
+ return this.elements.map(e);
256
+ }
257
+ filter(e) {
258
+ return new f(this.elements.filter(e));
259
+ }
260
+ reduce(e, t) {
261
+ return this.elements.reduce(e, t);
262
+ }
263
+ toArray() {
264
+ return this.elements.map((e) => new h(e));
265
+ }
266
+ addClass(...e) {
267
+ return l(this.elements, (t) => t.classList.add(...e)), this;
268
+ }
269
+ removeClass(...e) {
270
+ return l(this.elements, (t) => t.classList.remove(...e)), this;
271
+ }
272
+ toggleClass(e, t) {
273
+ return l(this.elements, (r) => r.classList.toggle(e, t)), this;
274
+ }
275
+ attr(e, t) {
276
+ return t === void 0 ? this.first()?.getAttribute(e) ?? "" : (l(this.elements, (r) => r.setAttribute(e, t)), this);
277
+ }
278
+ removeAttr(e) {
279
+ return l(this.elements, (t) => t.removeAttribute(e)), this;
280
+ }
281
+ toggleAttr(e, t) {
282
+ return l(this.elements, (r) => {
283
+ const s = r.hasAttribute(e);
284
+ t ?? !s ? r.setAttribute(e, "") : r.removeAttribute(e);
285
+ }), this;
286
+ }
287
+ text(e) {
288
+ return e === void 0 ? this.first()?.textContent ?? "" : (l(this.elements, (t) => {
289
+ t.textContent = e;
290
+ }), this);
291
+ }
292
+ html(e) {
293
+ if (e === void 0) return this.first()?.innerHTML ?? "";
294
+ const t = g(e);
295
+ return l(this.elements, (r) => {
296
+ r.innerHTML = t;
297
+ }), this;
298
+ }
299
+ htmlUnsafe(e) {
300
+ return l(this.elements, (t) => {
301
+ t.innerHTML = e;
302
+ }), this;
303
+ }
304
+ append(e) {
305
+ return this.insertAll(e, "beforeend"), this;
306
+ }
307
+ prepend(e) {
308
+ return this.insertAll(e, "afterbegin"), this;
309
+ }
310
+ before(e) {
311
+ return this.insertAll(e, "beforebegin"), this;
312
+ }
313
+ after(e) {
314
+ return this.insertAll(e, "afterend"), this;
315
+ }
316
+ css(e, t) {
317
+ if (typeof e == "string") {
318
+ if (t !== void 0)
319
+ return l(this.elements, (i) => {
320
+ i.style.setProperty(e, t);
321
+ }), this;
322
+ const r = this.first();
323
+ if (!r) return "";
324
+ const s = r.ownerDocument?.defaultView;
325
+ return !s || typeof s.getComputedStyle != "function" ? "" : s.getComputedStyle(r).getPropertyValue(e);
326
+ }
327
+ return l(this.elements, (r) => {
328
+ for (const [s, i] of Object.entries(e)) r.style.setProperty(s, i);
329
+ }), this;
330
+ }
331
+ wrap(e) {
332
+ return this.elements.forEach((t, r) => {
333
+ const s = typeof e == "string" ? document.createElement(e) : r === 0 ? e : e.cloneNode(!0);
334
+ t.parentNode?.insertBefore(s, t), s.appendChild(t);
335
+ }), this;
336
+ }
337
+ unwrap() {
338
+ const e = /* @__PURE__ */ new Set();
339
+ for (const t of this.elements) t.parentElement && e.add(t.parentElement);
340
+ return e.forEach((t) => {
341
+ const r = t.parentNode;
342
+ if (r) {
343
+ for (; t.firstChild; ) r.insertBefore(t.firstChild, t);
344
+ t.remove();
345
+ }
346
+ }), this;
347
+ }
348
+ replaceWith(e) {
349
+ const t = [];
350
+ return this.elements.forEach((r, s) => {
351
+ const i = typeof e == "string" ? b(e) : s === 0 ? e : e.cloneNode(!0);
352
+ r.replaceWith(i), t.push(i);
353
+ }), new f(t);
354
+ }
355
+ show(e = "") {
356
+ return l(this.elements, (t) => {
357
+ t.removeAttribute("hidden"), t.style.display = e;
358
+ }), this;
359
+ }
360
+ hide() {
361
+ return l(this.elements, (e) => {
362
+ e.style.display = "none";
363
+ }), this;
364
+ }
365
+ on(e, t) {
366
+ return l(this.elements, (r) => r.addEventListener(e, t)), this;
367
+ }
368
+ once(e, t) {
369
+ return l(this.elements, (r) => r.addEventListener(e, t, { once: !0 })), this;
370
+ }
371
+ off(e, t) {
372
+ return l(this.elements, (r) => r.removeEventListener(e, t)), this;
373
+ }
374
+ trigger(e, t) {
375
+ return l(this.elements, (r) => {
376
+ r.dispatchEvent(new CustomEvent(e, {
377
+ detail: t,
378
+ bubbles: !0,
379
+ cancelable: !0
380
+ }));
381
+ }), this;
382
+ }
383
+ delegate(e, t, r) {
384
+ const s = `${e}:${t}`;
385
+ return l(this.elements, (i) => {
386
+ const o = (u) => {
387
+ const c = u.target.closest(t);
388
+ c && i.contains(c) && r(u, c);
389
+ };
390
+ this.delegatedHandlers.has(i) || this.delegatedHandlers.set(i, /* @__PURE__ */ new Map());
391
+ const a = this.delegatedHandlers.get(i);
392
+ a.has(s) || a.set(s, /* @__PURE__ */ new Map()), a.get(s).set(r, o), i.addEventListener(e, o);
393
+ }), this;
394
+ }
395
+ undelegate(e, t, r) {
396
+ const s = `${e}:${t}`;
397
+ return l(this.elements, (i) => {
398
+ const o = this.delegatedHandlers.get(i);
399
+ if (!o) return;
400
+ const a = o.get(s);
401
+ if (!a) return;
402
+ const u = a.get(r);
403
+ u && (i.removeEventListener(e, u), a.delete(r), a.size === 0 && o.delete(s), o.size === 0 && this.delegatedHandlers.delete(i));
404
+ }), this;
405
+ }
406
+ find(e) {
407
+ const t = /* @__PURE__ */ new Set(), r = [];
408
+ for (const s of this.elements) {
409
+ const i = s.querySelectorAll(e);
410
+ for (let o = 0; o < i.length; o++) t.has(i[o]) || (t.add(i[o]), r.push(i[o]));
411
+ }
412
+ return new f(r);
413
+ }
414
+ remove() {
415
+ return l(this.elements, (e) => e.remove()), this;
416
+ }
417
+ empty() {
418
+ return l(this.elements, (e) => {
419
+ e.innerHTML = "";
420
+ }), this;
421
+ }
422
+ insertAll(e, t) {
423
+ if (typeof e == "string") {
424
+ const s = g(e);
425
+ l(this.elements, (i) => {
426
+ i.insertAdjacentHTML(t, s);
427
+ });
428
+ return;
429
+ }
430
+ const r = y(e);
431
+ this.elements.forEach((s, i) => {
432
+ A(s, i === 0 ? r : r.map((o) => o.cloneNode(!0)), t);
433
+ });
434
+ }
435
+ }, ae = (n) => {
436
+ if (typeof n != "string") return new h(n);
437
+ const e = document.querySelector(n);
438
+ if (!e) throw new Error(`bQuery: element not found for selector "${n}"`);
439
+ return new h(e);
440
+ }, ue = (n) => Array.isArray(n) ? new d(n) : n instanceof NodeList ? new d(Array.from(n)) : new d(Array.from(document.querySelectorAll(n)));
441
+ function $(n) {
442
+ return n == null ? [] : Array.isArray(n) ? n : [n];
443
+ }
444
+ function M(n) {
445
+ return Array.from(new Set(n));
446
+ }
447
+ function S(n, e) {
448
+ if (e <= 0) return [];
449
+ const t = [];
450
+ for (let r = 0; r < n.length; r += e) t.push(n.slice(r, r + e));
451
+ return t;
452
+ }
453
+ function T(n) {
454
+ return n.filter(Boolean);
455
+ }
456
+ function j(n) {
457
+ const e = [];
458
+ for (const t of n) Array.isArray(t) ? e.push(...t) : e.push(t);
459
+ return e;
460
+ }
461
+ function k(n, e) {
462
+ let t;
463
+ return Object.assign((...r) => {
464
+ t !== void 0 && clearTimeout(t), t = setTimeout(() => {
465
+ t = void 0, n(...r);
466
+ }, e);
467
+ }, { cancel: () => {
468
+ t !== void 0 && (clearTimeout(t), t = void 0);
469
+ } });
470
+ }
471
+ function B(n, e) {
472
+ let t = 0;
473
+ return Object.assign((...r) => {
474
+ const s = Date.now();
475
+ s - t >= e && (t = s, n(...r));
476
+ }, { cancel: () => {
477
+ t = 0;
478
+ } });
479
+ }
480
+ function P(n) {
481
+ let e = !1, t;
482
+ return (...r) => (e || (t = n(...r), e = !0), t);
483
+ }
484
+ function D() {
485
+ }
486
+ function O(n = "bQuery") {
487
+ return `${n}_${Math.random().toString(36).slice(2, 9)}`;
488
+ }
489
+ function x(n) {
490
+ return new Promise((e) => setTimeout(e, n));
491
+ }
492
+ function z(n, e) {
493
+ try {
494
+ return JSON.parse(n);
495
+ } catch {
496
+ return e;
497
+ }
498
+ }
499
+ function q(n) {
500
+ return n == null ? !0 : typeof n == "string" ? n.trim().length === 0 : Array.isArray(n) ? n.length === 0 : typeof n == "object" ? Object.keys(n).length === 0 : !1;
501
+ }
502
+ function R(n, e) {
503
+ return Math.floor(Math.random() * (e - n + 1)) + n;
504
+ }
505
+ function F(n, e, t) {
506
+ return Math.min(Math.max(n, e), t);
507
+ }
508
+ function Q(n, e, t, r = !0) {
509
+ return r ? n >= e && n <= t : n > e && n < t;
510
+ }
511
+ function W(n, e = 0) {
512
+ const t = typeof n == "number" ? n : Number(n);
513
+ return Number.isNaN(t) ? e : t;
514
+ }
515
+ function U(n) {
516
+ return n && n.charAt(0).toUpperCase() + n.slice(1);
517
+ }
518
+ function I(n) {
519
+ return n.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
520
+ }
521
+ function V(n) {
522
+ return n.replace(/[-_\s]+(.)?/g, (e, t) => t ? t.toUpperCase() : "").replace(/^[A-Z]/, (e) => e.toLowerCase());
523
+ }
524
+ function Z(n, e, t = "…") {
525
+ if (e <= 0) return "";
526
+ if (n.length <= e) return n;
527
+ const r = Math.max(0, e - t.length);
528
+ return `${n.slice(0, r)}${t}`;
529
+ }
530
+ function J(n) {
531
+ return n.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^\w\s-]/g, "").trim().replace(/[\s_-]+/g, "-").toLowerCase();
532
+ }
533
+ function K(n) {
534
+ return n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
535
+ }
536
+ function _(n) {
537
+ return typeof Element < "u" && n instanceof Element;
538
+ }
539
+ function G(n) {
540
+ return !!(n && typeof n == "object" && "elements" in n);
541
+ }
542
+ function X(n) {
543
+ return typeof n == "function";
544
+ }
545
+ function Y(n) {
546
+ return typeof n == "string";
547
+ }
548
+ function ee(n) {
549
+ return typeof n == "number" && !Number.isNaN(n);
550
+ }
551
+ function te(n) {
552
+ return typeof n == "boolean";
553
+ }
554
+ function ne(n) {
555
+ return Array.isArray(n);
556
+ }
557
+ function re(n) {
558
+ return n instanceof Date;
559
+ }
560
+ function se(n) {
561
+ return !!(n && (n instanceof Promise || typeof n == "object" && "then" in n && typeof n.then == "function"));
562
+ }
563
+ function ie(n) {
564
+ return typeof n == "object" && n !== null;
565
+ }
566
+ var he = {
567
+ clone: H,
568
+ merge: E,
569
+ pick: v,
570
+ omit: w,
571
+ hasOwn: C,
572
+ debounce: k,
573
+ throttle: B,
574
+ once: P,
575
+ noop: D,
576
+ uid: O,
577
+ isElement: _,
578
+ isCollection: G,
579
+ isEmpty: q,
580
+ isPlainObject: L,
581
+ isFunction: X,
582
+ isString: Y,
583
+ isNumber: ee,
584
+ isBoolean: te,
585
+ isArray: ne,
586
+ isDate: re,
587
+ isPromise: se,
588
+ isObject: ie,
589
+ parseJson: z,
590
+ sleep: x,
591
+ randomInt: R,
592
+ clamp: F,
593
+ inRange: Q,
594
+ toNumber: W,
595
+ capitalize: U,
596
+ toKebabCase: I,
597
+ toCamelCase: V,
598
+ truncate: Z,
599
+ slugify: J,
600
+ escapeRegExp: K,
601
+ ensureArray: $,
602
+ unique: M,
603
+ chunk: S,
604
+ compact: T,
605
+ flatten: j
606
+ };
607
+ export {
608
+ S as A,
609
+ z as C,
610
+ D,
611
+ k as E,
612
+ ae as F,
613
+ ue as I,
614
+ d as L,
615
+ $ as M,
616
+ j as N,
617
+ P as O,
618
+ M as P,
619
+ h as R,
620
+ q as S,
621
+ O as T,
622
+ Z as _,
623
+ re as a,
624
+ R as b,
625
+ ee as c,
626
+ Y as d,
627
+ U as f,
628
+ I as g,
629
+ V as h,
630
+ G as i,
631
+ T as j,
632
+ B as k,
633
+ ie as l,
634
+ J as m,
635
+ ne as n,
636
+ _ as o,
637
+ K as p,
638
+ te as r,
639
+ X as s,
640
+ he as t,
641
+ se as u,
642
+ F as v,
643
+ x as w,
644
+ W as x,
645
+ Q as y
646
+ };
647
+
648
+ //# sourceMappingURL=core-CK2Mfpf4.js.map