bitboss-ui 0.2.8 → 0.2.9

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 (128) hide show
  1. package/dist/index101.js +3 -3
  2. package/dist/index109.js +1 -1
  3. package/dist/index11.js +2 -2
  4. package/dist/index111.js +3 -3
  5. package/dist/index116.js +1 -1
  6. package/dist/index117.js +1 -1
  7. package/dist/index118.js +1 -1
  8. package/dist/index119.js +1 -1
  9. package/dist/index121.js +1 -1
  10. package/dist/index125.js +1 -1
  11. package/dist/index126.js +1 -1
  12. package/dist/index128.js +2 -2
  13. package/dist/index15.js +8 -8
  14. package/dist/index17.js +8 -8
  15. package/dist/index19.js +3 -3
  16. package/dist/index195.js +2 -2
  17. package/dist/index195.js.map +1 -1
  18. package/dist/index196.js +4 -2
  19. package/dist/index196.js.map +1 -1
  20. package/dist/index197.js +2 -4
  21. package/dist/index197.js.map +1 -1
  22. package/dist/index198.js +5 -3
  23. package/dist/index198.js.map +1 -1
  24. package/dist/index199.js +16 -35
  25. package/dist/index199.js.map +1 -1
  26. package/dist/index200.js +16 -6
  27. package/dist/index200.js.map +1 -1
  28. package/dist/index201.js +17 -349
  29. package/dist/index201.js.map +1 -1
  30. package/dist/index202.js +17 -131
  31. package/dist/index202.js.map +1 -1
  32. package/dist/index203.js +29 -5
  33. package/dist/index203.js.map +1 -1
  34. package/dist/index204.js +8 -19
  35. package/dist/index204.js.map +1 -1
  36. package/dist/index205.js +2 -2
  37. package/dist/index205.js.map +1 -1
  38. package/dist/index206.js +351 -2
  39. package/dist/index206.js.map +1 -1
  40. package/dist/index207.js +2 -186
  41. package/dist/index207.js.map +1 -1
  42. package/dist/index208.js +6 -23
  43. package/dist/index208.js.map +1 -1
  44. package/dist/index209.js +1 -1
  45. package/dist/index21.js +2 -2
  46. package/dist/index210.js +3 -3
  47. package/dist/index210.js.map +1 -1
  48. package/dist/index211.js +35 -3
  49. package/dist/index211.js.map +1 -1
  50. package/dist/index212.js +8 -233
  51. package/dist/index212.js.map +1 -1
  52. package/dist/index213.js +134 -2
  53. package/dist/index213.js.map +1 -1
  54. package/dist/index214.js +2 -10
  55. package/dist/index214.js.map +1 -1
  56. package/dist/index215.js +186 -2
  57. package/dist/index215.js.map +1 -1
  58. package/dist/index216.js +23 -16
  59. package/dist/index216.js.map +1 -1
  60. package/dist/index217.js +2 -16
  61. package/dist/index217.js.map +1 -1
  62. package/dist/index218.js +235 -20
  63. package/dist/index218.js.map +1 -1
  64. package/dist/index219.js +3 -29
  65. package/dist/index219.js.map +1 -1
  66. package/dist/index220.js +3 -8
  67. package/dist/index220.js.map +1 -1
  68. package/dist/index222.js +2 -2
  69. package/dist/index223.js +4 -4
  70. package/dist/index225.js +1 -1
  71. package/dist/index227.js +291 -431
  72. package/dist/index227.js.map +1 -1
  73. package/dist/index228.js +5 -88
  74. package/dist/index228.js.map +1 -1
  75. package/dist/index229.js +2 -6
  76. package/dist/index229.js.map +1 -1
  77. package/dist/index23.js +1 -1
  78. package/dist/index230.js +2 -2
  79. package/dist/index231.js +2 -295
  80. package/dist/index231.js.map +1 -1
  81. package/dist/index232.js +2 -2
  82. package/dist/index234.js +2 -117
  83. package/dist/index234.js.map +1 -1
  84. package/dist/index235.js +111 -100
  85. package/dist/index235.js.map +1 -1
  86. package/dist/index236.js +104 -198
  87. package/dist/index236.js.map +1 -1
  88. package/dist/index237.js +69 -2
  89. package/dist/index237.js.map +1 -1
  90. package/dist/index239.js +2 -69
  91. package/dist/index239.js.map +1 -1
  92. package/dist/index240.js +1 -1
  93. package/dist/index242.js +430 -219
  94. package/dist/index242.js.map +1 -1
  95. package/dist/index243.js +83 -252
  96. package/dist/index243.js.map +1 -1
  97. package/dist/index244.js +200 -2
  98. package/dist/index244.js.map +1 -1
  99. package/dist/index245.js +2 -2
  100. package/dist/index246.js +224 -2
  101. package/dist/index246.js.map +1 -1
  102. package/dist/index247.js +258 -2
  103. package/dist/index247.js.map +1 -1
  104. package/dist/index248.js +38 -2
  105. package/dist/index248.js.map +1 -1
  106. package/dist/index249.js +2 -38
  107. package/dist/index249.js.map +1 -1
  108. package/dist/index25.js +2 -2
  109. package/dist/index250.js +2 -2
  110. package/dist/index250.js.map +1 -1
  111. package/dist/index251.js +2 -2
  112. package/dist/index251.js.map +1 -1
  113. package/dist/index252.js +1 -1
  114. package/dist/index29.js +3 -3
  115. package/dist/index31.js +5 -5
  116. package/dist/index33.js +2 -2
  117. package/dist/index35.js +2 -2
  118. package/dist/index47.js +1 -1
  119. package/dist/index49.js +1 -1
  120. package/dist/index65.js +2 -2
  121. package/dist/index72.js +1 -1
  122. package/dist/index75.js +1 -1
  123. package/dist/index79.js +2 -2
  124. package/dist/index8.js +53 -54
  125. package/dist/index8.js.map +1 -1
  126. package/dist/index81.js +1 -1
  127. package/dist/style.css +1 -1
  128. package/package.json +1 -1
package/dist/index207.js CHANGED
@@ -1,189 +1,5 @@
1
- /*! maska v2.1.10 | (c) Alexander Shabunevich | Released under the MIT license */
2
- var W = Object.defineProperty, L = (a, t, e) => t in a ? W(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, g = (a, t, e) => (L(a, typeof t != "symbol" ? t + "" : t, e), e);
3
- const b = {
4
- "#": { pattern: /[0-9]/ },
5
- "@": { pattern: /[a-zA-Z]/ },
6
- "*": { pattern: /[a-zA-Z0-9]/ }
7
- };
8
- class w {
9
- constructor(t = {}) {
10
- g(this, "opts", {}), g(this, "memo", /* @__PURE__ */ new Map());
11
- const e = { ...t };
12
- if (e.tokens != null) {
13
- e.tokens = e.tokensReplace ? { ...e.tokens } : { ...b, ...e.tokens };
14
- for (const s of Object.values(e.tokens))
15
- typeof s.pattern == "string" && (s.pattern = new RegExp(s.pattern));
16
- } else
17
- e.tokens = b;
18
- Array.isArray(e.mask) && (e.mask.length > 1 ? e.mask = [...e.mask].sort((s, n) => s.length - n.length) : e.mask = e.mask[0] ?? ""), e.mask === "" && (e.mask = null), this.opts = e;
19
- }
20
- masked(t) {
21
- return this.process(t, this.findMask(t));
22
- }
23
- unmasked(t) {
24
- return this.process(t, this.findMask(t), !1);
25
- }
26
- isEager() {
27
- return this.opts.eager === !0;
28
- }
29
- isReversed() {
30
- return this.opts.reversed === !0;
31
- }
32
- completed(t) {
33
- const e = this.findMask(t);
34
- if (this.opts.mask == null || e == null)
35
- return !1;
36
- const s = this.process(t, e).length;
37
- return typeof this.opts.mask == "string" ? s >= this.opts.mask.length : typeof this.opts.mask == "function" ? s >= e.length : this.opts.mask.filter((n) => s >= n.length).length === this.opts.mask.length;
38
- }
39
- findMask(t) {
40
- const e = this.opts.mask;
41
- if (e == null)
42
- return null;
43
- if (typeof e == "string")
44
- return e;
45
- if (typeof e == "function")
46
- return e(t);
47
- const s = this.process(t, e.slice(-1).pop() ?? "", !1);
48
- return e.find((n) => this.process(t, n, !1).length >= s.length) ?? "";
49
- }
50
- escapeMask(t) {
51
- const e = [], s = [];
52
- return t.split("").forEach((n, i) => {
53
- n === "!" && t[i - 1] !== "!" ? s.push(i - s.length) : e.push(n);
54
- }), { mask: e.join(""), escaped: s };
55
- }
56
- process(t, e, s = !0) {
57
- var n;
58
- if (e == null)
59
- return t;
60
- const i = `value=${t},mask=${e},masked=${s ? 1 : 0}`;
61
- if (this.memo.has(i))
62
- return this.memo.get(i);
63
- const { mask: o, escaped: p } = this.escapeMask(e), h = [], k = this.opts.tokens != null ? this.opts.tokens : {}, l = this.isReversed() ? -1 : 1, c = this.isReversed() ? "unshift" : "push", v = this.isReversed() ? 0 : o.length - 1, S = this.isReversed() ? () => r > -1 && u > -1 : () => r < o.length && u < t.length, V = (m) => !this.isReversed() && m <= v || this.isReversed() && m >= v;
64
- let y, f = -1, r = this.isReversed() ? o.length - 1 : 0, u = this.isReversed() ? t.length - 1 : 0;
65
- for (; S(); ) {
66
- const m = o.charAt(r), d = k[m], E = (d == null ? void 0 : d.transform) != null ? d.transform(t.charAt(u)) : t.charAt(u);
67
- if (!p.includes(r) && d != null) {
68
- if (E.match(d.pattern) != null)
69
- h[c](E), d.repeated ? (f === -1 ? f = r : r === v && r !== f && (r = f - l), v === f && (r -= l)) : d.multiple && (r -= l), r += l;
70
- else if (d.multiple) {
71
- const P = ((n = h[u - l]) == null ? void 0 : n.match(d.pattern)) != null, R = o.charAt(r + l);
72
- P && R !== "" && k[R] == null ? (r += l, u -= l) : h[c]("");
73
- } else
74
- E === y ? y = void 0 : d.optional && (r += l, u -= l);
75
- u += l;
76
- } else
77
- s && !this.isEager() && h[c](m), E === m && !this.isEager() ? u += l : y = m, this.isEager() || (r += l);
78
- if (this.isEager())
79
- for (; V(r) && (k[o.charAt(r)] == null || p.includes(r)); )
80
- s ? h[c](o.charAt(r)) : o.charAt(r) === t.charAt(u) && (u += l), r += l;
81
- }
82
- return this.memo.set(i, h.join("")), this.memo.get(i);
83
- }
84
- }
85
- const T = (a) => JSON.parse(a.replaceAll("'", '"')), O = (a, t = {}) => {
86
- const e = { ...t };
87
- return a.dataset.maska != null && a.dataset.maska !== "" && (e.mask = j(a.dataset.maska)), a.dataset.maskaEager != null && (e.eager = M(a.dataset.maskaEager)), a.dataset.maskaReversed != null && (e.reversed = M(a.dataset.maskaReversed)), a.dataset.maskaTokensReplace != null && (e.tokensReplace = M(a.dataset.maskaTokensReplace)), a.dataset.maskaTokens != null && (e.tokens = C(a.dataset.maskaTokens)), e;
88
- }, M = (a) => a !== "" ? !!JSON.parse(a) : !0, j = (a) => a.startsWith("[") && a.endsWith("]") ? T(a) : a, C = (a) => {
89
- if (a.startsWith("{") && a.endsWith("}"))
90
- return T(a);
91
- const t = {};
92
- return a.split("|").forEach((e) => {
93
- const s = e.split(":");
94
- t[s[0]] = {
95
- pattern: new RegExp(s[1]),
96
- optional: s[2] === "optional",
97
- multiple: s[2] === "multiple",
98
- repeated: s[2] === "repeated"
99
- };
100
- }), t;
101
- };
102
- class J {
103
- constructor(t, e = {}) {
104
- g(this, "items", /* @__PURE__ */ new Map()), g(this, "beforeinputEvent", (s) => {
105
- const n = s.target, i = this.items.get(n);
106
- i.isEager() && "inputType" in s && s.inputType.startsWith("delete") && i.unmasked(n.value).length <= 1 && this.setMaskedValue(n, "");
107
- }), g(this, "inputEvent", (s) => {
108
- if (s instanceof CustomEvent && s.type === "input" && s.detail != null && typeof s.detail == "object" && "masked" in s.detail)
109
- return;
110
- const n = s.target, i = this.items.get(n), o = n.value, p = n.selectionStart, h = n.selectionEnd;
111
- let k = o;
112
- if (i.isEager()) {
113
- const l = i.masked(o), c = i.unmasked(o);
114
- c === "" && "data" in s && s.data != null ? k = s.data : c !== i.unmasked(l) && (k = c);
115
- }
116
- if (this.setMaskedValue(n, k), "inputType" in s && (s.inputType.startsWith("delete") || p != null && p < o.length))
117
- try {
118
- n.setSelectionRange(p, h);
119
- } catch {
120
- }
121
- }), this.options = e, typeof t == "string" ? this.init(
122
- Array.from(document.querySelectorAll(t)),
123
- this.getMaskOpts(e)
124
- ) : this.init(
125
- "length" in t ? Array.from(t) : [t],
126
- this.getMaskOpts(e)
127
- );
128
- }
129
- destroy() {
130
- for (const t of this.items.keys())
131
- t.removeEventListener("input", this.inputEvent), t.removeEventListener("beforeinput", this.beforeinputEvent);
132
- this.items.clear();
133
- }
134
- needUpdateOptions(t, e) {
135
- const s = this.items.get(t), n = new w(O(t, this.getMaskOpts(e)));
136
- return JSON.stringify(s.opts) !== JSON.stringify(n.opts);
137
- }
138
- needUpdateValue(t) {
139
- const e = t.dataset.maskaValue;
140
- return e == null && t.value !== "" || e != null && e !== t.value;
141
- }
142
- getMaskOpts(t) {
143
- const { onMaska: e, preProcess: s, postProcess: n, ...i } = t;
144
- return i;
145
- }
146
- init(t, e) {
147
- for (const s of t) {
148
- const n = new w(O(s, e));
149
- this.items.set(s, n), s.value !== "" && this.setMaskedValue(s, s.value), s.addEventListener("input", this.inputEvent), s.addEventListener("beforeinput", this.beforeinputEvent);
150
- }
151
- }
152
- setMaskedValue(t, e) {
153
- const s = this.items.get(t);
154
- this.options.preProcess != null && (e = this.options.preProcess(e));
155
- const n = s.masked(e), i = s.unmasked(s.isEager() ? n : e), o = s.completed(e), p = { masked: n, unmasked: i, completed: o };
156
- e = n, this.options.postProcess != null && (e = this.options.postProcess(e)), t.value = e, t.dataset.maskaValue = e, this.options.onMaska != null && (Array.isArray(this.options.onMaska) ? this.options.onMaska.forEach((h) => h(p)) : this.options.onMaska(p)), t.dispatchEvent(new CustomEvent("maska", { detail: p })), t.dispatchEvent(new CustomEvent("input", { detail: p }));
157
- }
158
- }
159
- const A = /* @__PURE__ */ new WeakMap(), N = (a) => {
160
- setTimeout(() => {
161
- var t;
162
- ((t = A.get(a)) == null ? void 0 : t.needUpdateValue(a)) === !0 && a.dispatchEvent(new CustomEvent("input"));
163
- });
164
- }, U = (a, t) => {
165
- const e = a instanceof HTMLInputElement ? a : a.querySelector("input"), s = { ...t.arg };
166
- if (e == null || (e == null ? void 0 : e.type) === "file")
167
- return;
168
- N(e);
169
- const n = A.get(e);
170
- if (n != null) {
171
- if (!n.needUpdateOptions(e, s))
172
- return;
173
- n.destroy();
174
- }
175
- if (t.value != null) {
176
- const i = t.value, o = (p) => {
177
- i.masked = p.masked, i.unmasked = p.unmasked, i.completed = p.completed;
178
- };
179
- s.onMaska = s.onMaska == null ? o : Array.isArray(s.onMaska) ? [...s.onMaska, o] : [s.onMaska, o];
180
- }
181
- A.set(e, new J(e, s));
182
- };
1
+ const o = (e) => e[0];
183
2
  export {
184
- w as Mask,
185
- J as MaskInput,
186
- b as tokens,
187
- U as vMaska
3
+ o as head
188
4
  };
189
5
  //# sourceMappingURL=index207.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index207.js","sources":["../node_modules/maska/dist/maska.js"],"sourcesContent":["/*! maska v2.1.10 | (c) Alexander Shabunevich | Released under the MIT license */\nvar W = Object.defineProperty;\nvar b = (n, t, s) => t in n ? W(n, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[t] = s;\nvar m = (n, t, s) => (b(n, typeof t != \"symbol\" ? t + \"\" : t, s), s);\nconst O = {\n \"#\": { pattern: /[0-9]/ },\n \"@\": { pattern: /[a-zA-Z]/ },\n \"*\": { pattern: /[a-zA-Z0-9]/ }\n};\nclass w {\n constructor(t = {}) {\n m(this, \"opts\", {});\n m(this, \"memo\", /* @__PURE__ */ new Map());\n const s = { ...t };\n if (s.tokens != null) {\n s.tokens = s.tokensReplace ? { ...s.tokens } : { ...O, ...s.tokens };\n for (const e of Object.values(s.tokens))\n typeof e.pattern == \"string\" && (e.pattern = new RegExp(e.pattern));\n } else\n s.tokens = O;\n Array.isArray(s.mask) && (s.mask.length > 1 ? s.mask = [...s.mask].sort((e, a) => e.length - a.length) : s.mask = s.mask[0] ?? \"\"), s.mask === \"\" && (s.mask = null), this.opts = s;\n }\n masked(t) {\n return this.process(t, this.findMask(t));\n }\n unmasked(t) {\n return this.process(t, this.findMask(t), !1);\n }\n isEager() {\n return this.opts.eager === !0;\n }\n isReversed() {\n return this.opts.reversed === !0;\n }\n completed(t) {\n const s = this.findMask(t);\n if (this.opts.mask == null || s == null)\n return !1;\n const e = this.process(t, s).length;\n return typeof this.opts.mask == \"string\" ? e >= this.opts.mask.length : typeof this.opts.mask == \"function\" ? e >= s.length : this.opts.mask.filter((a) => e >= a.length).length === this.opts.mask.length;\n }\n findMask(t) {\n const s = this.opts.mask;\n if (s == null)\n return null;\n if (typeof s == \"string\")\n return s;\n if (typeof s == \"function\")\n return s(t);\n const e = this.process(t, s.slice(-1).pop() ?? \"\", !1);\n return s.find((a) => this.process(t, a, !1).length >= e.length) ?? \"\";\n }\n escapeMask(t) {\n const s = [], e = [];\n return t.split(\"\").forEach((a, i) => {\n a === \"!\" && t[i - 1] !== \"!\" ? e.push(i - e.length) : s.push(a);\n }), { mask: s.join(\"\"), escaped: e };\n }\n process(t, s, e = !0) {\n var A;\n if (s == null)\n return t;\n const a = `value=${t},mask=${s},masked=${e ? 1 : 0}`;\n if (this.memo.has(a))\n return this.memo.get(a);\n const { mask: i, escaped: h } = this.escapeMask(s), r = [], k = this.opts.tokens != null ? this.opts.tokens : {}, l = this.isReversed() ? -1 : 1, u = this.isReversed() ? \"unshift\" : \"push\", g = this.isReversed() ? 0 : i.length - 1, C = this.isReversed() ? () => o > -1 && c > -1 : () => o < i.length && c < t.length, S = (f) => !this.isReversed() && f <= g || this.isReversed() && f >= g;\n let E, d = -1, o = this.isReversed() ? i.length - 1 : 0, c = this.isReversed() ? t.length - 1 : 0;\n for (; C(); ) {\n const f = i.charAt(o), p = k[f], M = (p == null ? void 0 : p.transform) != null ? p.transform(t.charAt(c)) : t.charAt(c);\n if (!h.includes(o) && p != null) {\n if (M.match(p.pattern) != null)\n r[u](M), p.repeated ? (d === -1 ? d = o : o === g && o !== d && (o = d - l), g === d && (o -= l)) : p.multiple && (o -= l), o += l;\n else if (p.multiple) {\n const P = ((A = r[c - l]) == null ? void 0 : A.match(p.pattern)) != null, R = i.charAt(o + l);\n P && R !== \"\" && k[R] == null ? (o += l, c -= l) : r[u](\"\");\n } else\n M === E ? E = void 0 : p.optional && (o += l, c -= l);\n c += l;\n } else\n e && !this.isEager() && r[u](f), M === f && !this.isEager() ? c += l : E = f, this.isEager() || (o += l);\n if (this.isEager())\n for (; S(o) && (k[i.charAt(o)] == null || h.includes(o)); )\n e ? r[u](i.charAt(o)) : i.charAt(o) === t.charAt(c) && (c += l), o += l;\n }\n return this.memo.set(a, r.join(\"\")), this.memo.get(a);\n }\n}\nconst V = (n) => JSON.parse(n.replaceAll(\"'\", '\"')), T = (n, t = {}) => {\n const s = { ...t };\n return n.dataset.maska != null && n.dataset.maska !== \"\" && (s.mask = L(n.dataset.maska)), n.dataset.maskaEager != null && (s.eager = y(n.dataset.maskaEager)), n.dataset.maskaReversed != null && (s.reversed = y(n.dataset.maskaReversed)), n.dataset.maskaTokensReplace != null && (s.tokensReplace = y(n.dataset.maskaTokensReplace)), n.dataset.maskaTokens != null && (s.tokens = x(n.dataset.maskaTokens)), s;\n}, y = (n) => n !== \"\" ? !!JSON.parse(n) : !0, L = (n) => n.startsWith(\"[\") && n.endsWith(\"]\") ? V(n) : n, x = (n) => {\n if (n.startsWith(\"{\") && n.endsWith(\"}\"))\n return V(n);\n const t = {};\n return n.split(\"|\").forEach((s) => {\n const e = s.split(\":\");\n t[e[0]] = {\n pattern: new RegExp(e[1]),\n optional: e[2] === \"optional\",\n multiple: e[2] === \"multiple\",\n repeated: e[2] === \"repeated\"\n };\n }), t;\n};\nclass J {\n constructor(t, s = {}) {\n m(this, \"items\", /* @__PURE__ */ new Map());\n m(this, \"beforeinputEvent\", (t) => {\n const s = t.target, e = this.items.get(s);\n e.isEager() && \"inputType\" in t && t.inputType.startsWith(\"delete\") && e.unmasked(s.value).length <= 1 && this.setMaskedValue(s, \"\");\n });\n m(this, \"inputEvent\", (t) => {\n if (t instanceof CustomEvent && t.type === \"input\" && t.detail != null && typeof t.detail == \"object\" && \"masked\" in t.detail)\n return;\n const s = t.target, e = this.items.get(s), a = s.value, i = s.selectionStart, h = s.selectionEnd;\n let r = a;\n if (e.isEager()) {\n const k = e.masked(a), l = e.unmasked(a);\n l === \"\" && \"data\" in t && t.data != null ? r = t.data : l !== e.unmasked(k) && (r = l);\n }\n if (this.setMaskedValue(s, r), \"inputType\" in t && (t.inputType.startsWith(\"delete\") || i != null && i < a.length))\n try {\n s.setSelectionRange(i, h);\n } catch {\n }\n });\n this.options = s, typeof t == \"string\" ? this.init(\n Array.from(document.querySelectorAll(t)),\n this.getMaskOpts(s)\n ) : this.init(\n \"length\" in t ? Array.from(t) : [t],\n this.getMaskOpts(s)\n );\n }\n destroy() {\n for (const t of this.items.keys())\n t.removeEventListener(\"input\", this.inputEvent), t.removeEventListener(\"beforeinput\", this.beforeinputEvent);\n this.items.clear();\n }\n needUpdateOptions(t, s) {\n const e = this.items.get(t), a = new w(T(t, this.getMaskOpts(s)));\n return JSON.stringify(e.opts) !== JSON.stringify(a.opts);\n }\n needUpdateValue(t) {\n const s = t.dataset.maskaValue;\n return s == null && t.value !== \"\" || s != null && s !== t.value;\n }\n getMaskOpts(t) {\n const { onMaska: s, preProcess: e, postProcess: a, ...i } = t;\n return i;\n }\n init(t, s) {\n for (const e of t) {\n const a = new w(T(e, s));\n this.items.set(e, a), e.value !== \"\" && this.setMaskedValue(e, e.value), e.addEventListener(\"input\", this.inputEvent), e.addEventListener(\"beforeinput\", this.beforeinputEvent);\n }\n }\n setMaskedValue(t, s) {\n const e = this.items.get(t);\n this.options.preProcess != null && (s = this.options.preProcess(s));\n const a = e.masked(s), i = e.unmasked(e.isEager() ? a : s), h = e.completed(s), r = { masked: a, unmasked: i, completed: h };\n s = a, this.options.postProcess != null && (s = this.options.postProcess(s)), t.value = s, t.dataset.maskaValue = s, this.options.onMaska != null && (Array.isArray(this.options.onMaska) ? this.options.onMaska.forEach((k) => k(r)) : this.options.onMaska(r)), t.dispatchEvent(new CustomEvent(\"maska\", { detail: r })), t.dispatchEvent(new CustomEvent(\"input\", { detail: r }));\n }\n}\nconst v = /* @__PURE__ */ new WeakMap(), N = (n) => {\n setTimeout(() => {\n var t;\n ((t = v.get(n)) == null ? void 0 : t.needUpdateValue(n)) === !0 && n.dispatchEvent(new CustomEvent(\"input\"));\n });\n}, U = (n, t) => {\n const s = n instanceof HTMLInputElement ? n : n.querySelector(\"input\"), e = { ...t.arg };\n if (s == null || (s == null ? void 0 : s.type) === \"file\")\n return;\n N(s);\n const a = v.get(s);\n if (a != null) {\n if (!a.needUpdateOptions(s, e))\n return;\n a.destroy();\n }\n if (t.value != null) {\n const i = t.value, h = (r) => {\n i.masked = r.masked, i.unmasked = r.unmasked, i.completed = r.completed;\n };\n e.onMaska = e.onMaska == null ? h : Array.isArray(e.onMaska) ? [...e.onMaska, h] : [e.onMaska, h];\n }\n v.set(s, new J(s, e));\n};\nexport {\n w as Mask,\n J as MaskInput,\n O as tokens,\n U as vMaska\n};\n"],"names":["b","n","s","m","O","e","a","A","i","h","r","u","g","C","o","c","S","f","E","d","p","M","V","T","L","y","x","t","k","l","v"],"mappings":"AAAA;AACA,IAAI,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AAE,WAAWA,EAAE,UAAU,EAAE,YAAYA,EAAE;AAAA,IACpE;AACI,IAAAL,EAAE,UAAUA,EAAE,WAAW,OAAOI,IAAI,MAAM,QAAQJ,EAAE,OAAO,IAAI,CAAC,GAAGA,EAAE,SAASI,CAAC,IAAI,CAACJ,EAAE,SAASI,CAAC;AAAA,EACjG;AACD,EAAAqB,EAAE,IAAI5B,GAAG,IAAI,EAAEA,GAAGG,CAAC,CAAC;AACtB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index207.js","sources":["../src/utilities/functions/head.ts"],"sourcesContent":["/** Takes an array and returns the first item in it */\nexport const head = <T>(arr: T[]) => arr[0]"],"names":["head","arr"],"mappings":"AACO,MAAMA,IAAO,CAAIC,MAAaA,EAAI,CAAC;"}
package/dist/index208.js CHANGED
@@ -1,26 +1,9 @@
1
- const e = {
2
- inert: ":not([inert]):not([inert] *)",
3
- negTabIndex: ':not([tabindex^="-"])',
4
- disabled: ":not(:disabled)"
5
- }, n = [
6
- `a[href]${e.inert}${e.negTabIndex}`,
7
- `area[href]${e.inert}${e.negTabIndex}`,
8
- `input:not([type="hidden"]):not([type="radio"])${e.inert}${e.negTabIndex}${e.disabled}`,
9
- `input[type="radio"]${e.inert}${e.negTabIndex}${e.disabled}`,
10
- `select${e.inert}${e.negTabIndex}${e.disabled}`,
11
- `textarea${e.inert}${e.negTabIndex}${e.disabled}`,
12
- `button${e.inert}${e.negTabIndex}${e.disabled}`,
13
- `details${e.inert} > summary:first-of-type${e.negTabIndex}`,
14
- // Discard until Firefox supports `:has()`
15
- // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
16
- // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
17
- `iframe${e.inert}${e.negTabIndex}`,
18
- `audio[controls]${e.inert}${e.negTabIndex}`,
19
- `video[controls]${e.inert}${e.negTabIndex}`,
20
- `[contenteditable]${e.inert}${e.negTabIndex}`,
21
- `[tabindex]${e.inert}${e.negTabIndex}`
22
- ];
1
+ const i = (e, t = 50) => new Promise((r) => {
2
+ let a = setInterval(() => {
3
+ e() && (clearInterval(a), r());
4
+ }, t);
5
+ });
23
6
  export {
24
- n as default
7
+ i as waitFor
25
8
  };
26
9
  //# sourceMappingURL=index208.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index208.js","sources":["../node_modules/focusable-selectors/index.js"],"sourcesContent":["const not = {\n inert: ':not([inert]):not([inert] *)',\n negTabIndex: ':not([tabindex^=\"-\"])',\n disabled: ':not(:disabled)',\n}\n\nexport default [\n `a[href]${not.inert}${not.negTabIndex}`,\n `area[href]${not.inert}${not.negTabIndex}`,\n `input:not([type=\"hidden\"]):not([type=\"radio\"])${not.inert}${not.negTabIndex}${not.disabled}`,\n `input[type=\"radio\"]${not.inert}${not.negTabIndex}${not.disabled}`,\n `select${not.inert}${not.negTabIndex}${not.disabled}`,\n `textarea${not.inert}${not.negTabIndex}${not.disabled}`,\n `button${not.inert}${not.negTabIndex}${not.disabled}`,\n `details${not.inert} > summary:first-of-type${not.negTabIndex}`,\n // Discard until Firefox supports `:has()`\n // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12\n // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,\n `iframe${not.inert}${not.negTabIndex}`,\n `audio[controls]${not.inert}${not.negTabIndex}`,\n `video[controls]${not.inert}${not.negTabIndex}`,\n `[contenteditable]${not.inert}${not.negTabIndex}`,\n `[tabindex]${not.inert}${not.negTabIndex}`,\n]\n"],"names":["not","selectors"],"mappings":"AAAA,MAAMA,IAAM;AAAA,EACV,OAAO;AAAA,EACP,aAAa;AAAA,EACb,UAAU;AACZ,GAEeC,IAAA;AAAA,EACb,UAAUD,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EACrC,aAAaA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EACxC,iDAAiDA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EAC3F,sBAAsBA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EAChE,SAASA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EACnD,WAAWA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EACrD,SAASA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EACnD,UAAUA,EAAI,KAAK,2BAA2BA,EAAI,WAAW;AAAA;AAAA;AAAA;AAAA,EAI7D,SAASA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EACpC,kBAAkBA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EAC7C,kBAAkBA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EAC7C,oBAAoBA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EAC/C,aAAaA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAC1C;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index208.js","sources":["../src/utilities/functions/waitFor.ts"],"sourcesContent":["/** Wait until iteratee returns true to resolve the promise */\nexport const waitFor: (\n iteratee: () => boolean,\n interval?: number\n) => Promise<void> = (iteratee, interval = 50) =>\n new Promise((resolve) => {\n let i = setInterval(() => {\n if (iteratee()) {\n clearInterval(i);\n resolve();\n }\n }, interval);\n });\n"],"names":["waitFor","iteratee","interval","resolve","i"],"mappings":"AACa,MAAAA,IAGQ,CAACC,GAAUC,IAAW,OACzC,IAAI,QAAQ,CAACC,MAAY;AACnB,MAAAC,IAAI,YAAY,MAAM;AACxB,IAAIH,QACF,cAAcG,CAAC,GACPD;KAETD,CAAQ;AACb,CAAC;"}
package/dist/index209.js CHANGED
@@ -1,4 +1,4 @@
1
- import { evaluate as j, getSide as M, getOppositePlacement as J, getExpandedPlacements as K, getOppositeAxisPlacements as N, getAlignmentSides as Q, getSideAxis as F, clamp as B, getPaddingObject as I, rectToClientRect as X, getAlignmentAxis as W, getAlignment as Y, getOppositeAxis as U, getAxisLength as $, min as z } from "./index234.js";
1
+ import { evaluate as j, getSide as M, getOppositePlacement as J, getExpandedPlacements as K, getOppositeAxisPlacements as N, getAlignmentSides as Q, getSideAxis as F, clamp as B, getPaddingObject as I, rectToClientRect as X, getAlignmentAxis as W, getAlignment as Y, getOppositeAxis as U, getAxisLength as $, min as z } from "./index235.js";
2
2
  function H(o, i, d) {
3
3
  let {
4
4
  reference: e,
package/dist/index21.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as $, computed as n, openBlock as i, createElementBlock as b, createBlock as h, resolveDynamicComponent as v, normalizeProps as o, guardReactiveProps as l, withCtx as c, renderSlot as _, createTextVNode as A, toDisplayString as g, createElementVNode as E, unref as z, createVNode as S, Fragment as T, renderList as V } from "vue";
2
- import { deburr as N } from "./index210.js";
2
+ import { deburr as N } from "./index219.js";
3
3
  import { getAsPercentage as P } from "./index121.js";
4
- import { snakeCase as D } from "./index211.js";
4
+ import { snakeCase as D } from "./index220.js";
5
5
  import { useId as I } from "./index7.js";
6
6
  import F from "./index118.js";
7
7
  import "./index182.js";
package/dist/index210.js CHANGED
@@ -1,6 +1,6 @@
1
- import r from "./index242.js";
2
- const t = r;
1
+ import t from "./index243.js";
2
+ const r = t;
3
3
  export {
4
- t as deburr
4
+ r as throttle
5
5
  };
6
6
  //# sourceMappingURL=index210.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index210.js","sources":["../src/utilities/functions/deburr.ts"],"sourcesContent":["import d from \"lodash.deburr\";\n\nexport const deburr = d;"],"names":["deburr","d"],"mappings":";AAEO,MAAMA,IAASC;"}
1
+ {"version":3,"file":"index210.js","sources":["../src/utilities/functions/throttle.ts"],"sourcesContent":["import t from \"lodash.throttle\";\n\nexport const throttle = t;"],"names":["throttle"],"mappings":";AAEO,MAAMA,IAAW;"}
package/dist/index211.js CHANGED
@@ -1,6 +1,38 @@
1
- import o from "./index243.js";
2
- const e = o;
1
+ import { unrefElement as m } from "./index128.js";
2
+ import { ref as u, watch as l } from "vue";
3
+ import { createFocusTrap as d } from "./index242.js";
4
+ import { tryOnScopeDispose as D } from "./index212.js";
5
+ function O(i, a = {}) {
6
+ let e;
7
+ const { immediate: f, ...n } = a, c = u(!1), s = u(!1), o = (t) => e && e.activate(t), r = (t) => e && e.deactivate(t), v = () => {
8
+ e && (e.pause(), s.value = !0);
9
+ }, p = () => {
10
+ e && (e.unpause(), s.value = !1);
11
+ };
12
+ return l(
13
+ () => m(i),
14
+ (t) => {
15
+ t && (e = d(t, {
16
+ ...n,
17
+ onActivate() {
18
+ c.value = !0, a.onActivate && a.onActivate();
19
+ },
20
+ onDeactivate() {
21
+ c.value = !1, a.onDeactivate && a.onDeactivate();
22
+ }
23
+ }), f && o());
24
+ },
25
+ { flush: "post" }
26
+ ), D(() => r()), {
27
+ hasFocus: c,
28
+ isPaused: s,
29
+ activate: o,
30
+ deactivate: r,
31
+ pause: v,
32
+ unpause: p
33
+ };
34
+ }
3
35
  export {
4
- e as snakeCase
36
+ O as useFocusTrap
5
37
  };
6
38
  //# sourceMappingURL=index211.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index211.js","sources":["../src/utilities/functions/snakeCase.ts"],"sourcesContent":["import s from \"lodash.snakecase\";\n\nexport const snakeCase = s;"],"names":["snakeCase","s"],"mappings":";AAEO,MAAMA,IAAYC;"}
1
+ {"version":3,"file":"index211.js","sources":["../node_modules/@vueuse/integrations/useFocusTrap.mjs"],"sourcesContent":["import { unrefElement, tryOnScopeDispose } from '@vueuse/core';\nimport { ref, watch } from 'vue-demi';\nimport { createFocusTrap } from 'focus-trap';\n\nfunction useFocusTrap(target, options = {}) {\n let trap;\n const { immediate, ...focusTrapOptions } = options;\n const hasFocus = ref(false);\n const isPaused = ref(false);\n const activate = (opts) => trap && trap.activate(opts);\n const deactivate = (opts) => trap && trap.deactivate(opts);\n const pause = () => {\n if (trap) {\n trap.pause();\n isPaused.value = true;\n }\n };\n const unpause = () => {\n if (trap) {\n trap.unpause();\n isPaused.value = false;\n }\n };\n watch(\n () => unrefElement(target),\n (el) => {\n if (!el)\n return;\n trap = createFocusTrap(el, {\n ...focusTrapOptions,\n onActivate() {\n hasFocus.value = true;\n if (options.onActivate)\n options.onActivate();\n },\n onDeactivate() {\n hasFocus.value = false;\n if (options.onDeactivate)\n options.onDeactivate();\n }\n });\n if (immediate)\n activate();\n },\n { flush: \"post\" }\n );\n tryOnScopeDispose(() => deactivate());\n return {\n hasFocus,\n isPaused,\n activate,\n deactivate,\n pause,\n unpause\n };\n}\n\nexport { useFocusTrap };\n"],"names":["useFocusTrap","target","options","trap","immediate","focusTrapOptions","hasFocus","ref","isPaused","activate","opts","deactivate","pause","unpause","watch","unrefElement","el","createFocusTrap","tryOnScopeDispose"],"mappings":";;;;AAIA,SAASA,EAAaC,GAAQC,IAAU,IAAI;AAC1C,MAAIC;AACJ,QAAM,EAAE,WAAAC,GAAW,GAAGC,EAAgB,IAAKH,GACrCI,IAAWC,EAAI,EAAK,GACpBC,IAAWD,EAAI,EAAK,GACpBE,IAAW,CAACC,MAASP,KAAQA,EAAK,SAASO,CAAI,GAC/CC,IAAa,CAACD,MAASP,KAAQA,EAAK,WAAWO,CAAI,GACnDE,IAAQ,MAAM;AAClB,IAAIT,MACFA,EAAK,MAAK,GACVK,EAAS,QAAQ;AAAA,EAEvB,GACQK,IAAU,MAAM;AACpB,IAAIV,MACFA,EAAK,QAAO,GACZK,EAAS,QAAQ;AAAA,EAEvB;AACE,SAAAM;AAAA,IACE,MAAMC,EAAad,CAAM;AAAA,IACzB,CAACe,MAAO;AACN,MAAKA,MAELb,IAAOc,EAAgBD,GAAI;AAAA,QACzB,GAAGX;AAAA,QACH,aAAa;AACX,UAAAC,EAAS,QAAQ,IACbJ,EAAQ,cACVA,EAAQ,WAAU;AAAA,QACrB;AAAA,QACD,eAAe;AACb,UAAAI,EAAS,QAAQ,IACbJ,EAAQ,gBACVA,EAAQ,aAAY;AAAA,QACvB;AAAA,MACT,CAAO,GACGE,KACFK;IACH;AAAA,IACD,EAAE,OAAO,OAAQ;AAAA,EACrB,GACES,EAAkB,MAAMP,EAAU,CAAE,GAC7B;AAAA,IACL,UAAAL;AAAA,IACA,UAAAE;AAAA,IACA,UAAAC;AAAA,IACA,YAAAE;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,EACJ;AACA;","x_google_ignoreList":[0]}
package/dist/index212.js CHANGED
@@ -1,238 +1,13 @@
1
- import { commonjsGlobal as f, getDefaultExportFromCjs as $ } from "./index229.js";
2
- var D = "Expected a function", O = "__lodash_hash_undefined__", j = 1 / 0, F = "[object Function]", N = "[object GeneratorFunction]", H = "[object Symbol]", G = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, R = /^\w*$/, A = /^\./, M = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, K = /[\\^$.*+?()[\]{}|]/g, L = /\\(\\)?/g, z = /^\[object .+?Constructor\]$/, U = typeof f == "object" && f && f.Object === Object && f, q = typeof self == "object" && self && self.Object === Object && self, d = U || q || Function("return this")();
3
- function J(t, e) {
4
- return t == null ? void 0 : t[e];
1
+ import { getCurrentScope as o, onScopeDispose as n, unref as r } from "vue";
2
+ function f(e) {
3
+ return o() ? (n(e), !0) : !1;
5
4
  }
6
- function V(t) {
7
- var e = !1;
8
- if (t != null && typeof t.toString != "function")
9
- try {
10
- e = !!(t + "");
11
- } catch {
12
- }
13
- return e;
5
+ function p(e) {
6
+ return typeof e == "function" ? e() : r(e);
14
7
  }
15
- var X = Array.prototype, Y = Function.prototype, w = Object.prototype, l = d["__core-js_shared__"], m = function() {
16
- var t = /[^.]+$/.exec(l && l.keys && l.keys.IE_PROTO || "");
17
- return t ? "Symbol(src)_1." + t : "";
18
- }(), x = Y.toString, _ = w.hasOwnProperty, P = w.toString, B = RegExp(
19
- "^" + x.call(_).replace(K, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
20
- ), C = d.Symbol, Q = X.splice, W = T(d, "Map"), u = T(Object, "create"), v = C ? C.prototype : void 0, S = v ? v.toString : void 0;
21
- function a(t) {
22
- var e = -1, r = t ? t.length : 0;
23
- for (this.clear(); ++e < r; ) {
24
- var n = t[e];
25
- this.set(n[0], n[1]);
26
- }
27
- }
28
- function Z() {
29
- this.__data__ = u ? u(null) : {};
30
- }
31
- function k(t) {
32
- return this.has(t) && delete this.__data__[t];
33
- }
34
- function tt(t) {
35
- var e = this.__data__;
36
- if (u) {
37
- var r = e[t];
38
- return r === O ? void 0 : r;
39
- }
40
- return _.call(e, t) ? e[t] : void 0;
41
- }
42
- function et(t) {
43
- var e = this.__data__;
44
- return u ? e[t] !== void 0 : _.call(e, t);
45
- }
46
- function rt(t, e) {
47
- var r = this.__data__;
48
- return r[t] = u && e === void 0 ? O : e, this;
49
- }
50
- a.prototype.clear = Z;
51
- a.prototype.delete = k;
52
- a.prototype.get = tt;
53
- a.prototype.has = et;
54
- a.prototype.set = rt;
55
- function i(t) {
56
- var e = -1, r = t ? t.length : 0;
57
- for (this.clear(); ++e < r; ) {
58
- var n = t[e];
59
- this.set(n[0], n[1]);
60
- }
61
- }
62
- function nt() {
63
- this.__data__ = [];
64
- }
65
- function at(t) {
66
- var e = this.__data__, r = h(e, t);
67
- if (r < 0)
68
- return !1;
69
- var n = e.length - 1;
70
- return r == n ? e.pop() : Q.call(e, r, 1), !0;
71
- }
72
- function ot(t) {
73
- var e = this.__data__, r = h(e, t);
74
- return r < 0 ? void 0 : e[r][1];
75
- }
76
- function it(t) {
77
- return h(this.__data__, t) > -1;
78
- }
79
- function ct(t, e) {
80
- var r = this.__data__, n = h(r, t);
81
- return n < 0 ? r.push([t, e]) : r[n][1] = e, this;
82
- }
83
- i.prototype.clear = nt;
84
- i.prototype.delete = at;
85
- i.prototype.get = ot;
86
- i.prototype.has = it;
87
- i.prototype.set = ct;
88
- function o(t) {
89
- var e = -1, r = t ? t.length : 0;
90
- for (this.clear(); ++e < r; ) {
91
- var n = t[e];
92
- this.set(n[0], n[1]);
93
- }
94
- }
95
- function st() {
96
- this.__data__ = {
97
- hash: new a(),
98
- map: new (W || i)(),
99
- string: new a()
100
- };
101
- }
102
- function ut(t) {
103
- return p(this, t).delete(t);
104
- }
105
- function ft(t) {
106
- return p(this, t).get(t);
107
- }
108
- function ht(t) {
109
- return p(this, t).has(t);
110
- }
111
- function pt(t, e) {
112
- return p(this, t).set(t, e), this;
113
- }
114
- o.prototype.clear = st;
115
- o.prototype.delete = ut;
116
- o.prototype.get = ft;
117
- o.prototype.has = ht;
118
- o.prototype.set = pt;
119
- function h(t, e) {
120
- for (var r = t.length; r--; )
121
- if (Ot(t[r][0], e))
122
- return r;
123
- return -1;
124
- }
125
- function lt(t, e) {
126
- e = gt(e, t) ? [e] : yt(e);
127
- for (var r = 0, n = e.length; t != null && r < n; )
128
- t = t[vt(e[r++])];
129
- return r && r == n ? t : void 0;
130
- }
131
- function dt(t) {
132
- if (!E(t) || mt(t))
133
- return !1;
134
- var e = jt(t) || V(t) ? B : z;
135
- return e.test(St(t));
136
- }
137
- function _t(t) {
138
- if (typeof t == "string")
139
- return t;
140
- if (g(t))
141
- return S ? S.call(t) : "";
142
- var e = t + "";
143
- return e == "0" && 1 / t == -j ? "-0" : e;
144
- }
145
- function yt(t) {
146
- return I(t) ? t : Ct(t);
147
- }
148
- function p(t, e) {
149
- var r = t.__data__;
150
- return bt(e) ? r[typeof e == "string" ? "string" : "hash"] : r.map;
151
- }
152
- function T(t, e) {
153
- var r = J(t, e);
154
- return dt(r) ? r : void 0;
155
- }
156
- function gt(t, e) {
157
- if (I(t))
158
- return !1;
159
- var r = typeof t;
160
- return r == "number" || r == "symbol" || r == "boolean" || t == null || g(t) ? !0 : R.test(t) || !G.test(t) || e != null && t in Object(e);
161
- }
162
- function bt(t) {
163
- var e = typeof t;
164
- return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
165
- }
166
- function mt(t) {
167
- return !!m && m in t;
168
- }
169
- var Ct = y(function(t) {
170
- t = xt(t);
171
- var e = [];
172
- return A.test(t) && e.push(""), t.replace(M, function(r, n, c, s) {
173
- e.push(c ? s.replace(L, "$1") : n || r);
174
- }), e;
175
- });
176
- function vt(t) {
177
- if (typeof t == "string" || g(t))
178
- return t;
179
- var e = t + "";
180
- return e == "0" && 1 / t == -j ? "-0" : e;
181
- }
182
- function St(t) {
183
- if (t != null) {
184
- try {
185
- return x.call(t);
186
- } catch {
187
- }
188
- try {
189
- return t + "";
190
- } catch {
191
- }
192
- }
193
- return "";
194
- }
195
- function y(t, e) {
196
- if (typeof t != "function" || e && typeof e != "function")
197
- throw new TypeError(D);
198
- var r = function() {
199
- var n = arguments, c = e ? e.apply(this, n) : n[0], s = r.cache;
200
- if (s.has(c))
201
- return s.get(c);
202
- var b = t.apply(this, n);
203
- return r.cache = s.set(c, b), b;
204
- };
205
- return r.cache = new (y.Cache || o)(), r;
206
- }
207
- y.Cache = o;
208
- function Ot(t, e) {
209
- return t === e || t !== t && e !== e;
210
- }
211
- var I = Array.isArray;
212
- function jt(t) {
213
- var e = E(t) ? P.call(t) : "";
214
- return e == F || e == N;
215
- }
216
- function E(t) {
217
- var e = typeof t;
218
- return !!t && (e == "object" || e == "function");
219
- }
220
- function wt(t) {
221
- return !!t && typeof t == "object";
222
- }
223
- function g(t) {
224
- return typeof t == "symbol" || wt(t) && P.call(t) == H;
225
- }
226
- function xt(t) {
227
- return t == null ? "" : _t(t);
228
- }
229
- function Pt(t, e, r) {
230
- var n = t == null ? void 0 : lt(t, e);
231
- return n === void 0 ? r : n;
232
- }
233
- var Tt = Pt;
234
- const Et = /* @__PURE__ */ $(Tt);
8
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
235
9
  export {
236
- Et as default
10
+ p as toValue,
11
+ f as tryOnScopeDispose
237
12
  };
238
13
  //# sourceMappingURL=index212.js.map