bitboss-ui 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BbBadge/BbBadge.vue.d.ts +1 -1
- package/dist/components/BbCheckbox/BbCheckbox.vue.d.ts +3 -0
- package/dist/index104.js +2 -2
- package/dist/index112.js +1 -1
- package/dist/index114.js +4 -4
- package/dist/index116.js +1 -1
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +3 -3
- package/dist/index120.js +1 -1
- package/dist/index121.js +1 -1
- package/dist/index122.js +1 -1
- package/dist/index128.js +1 -1
- package/dist/index129.js +1 -1
- package/dist/index130.js +1 -1
- package/dist/index134.js +2 -2
- package/dist/index14.js +9 -8
- package/dist/index14.js.map +1 -1
- package/dist/index16.js +8 -8
- package/dist/index18.js +11 -11
- package/dist/index20.js +3 -3
- package/dist/index201.js +2 -295
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +4 -16
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +2 -16
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +234 -18
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +2 -20
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +5 -29
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +16 -8
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +16 -2
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +19 -2
- package/dist/index209.js.map +1 -1
- package/dist/index210.js +20 -4
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +29 -2
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +8 -3
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +2 -35
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +3 -6
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +3 -121
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +118 -131
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +134 -2
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +33 -172
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +159 -353
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +2 -2
- package/dist/index220.js +6 -373
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +346 -213
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +364 -70
- package/dist/index222.js.map +1 -1
- package/dist/index224.js +3 -3
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +79 -3
- package/dist/index225.js.map +1 -1
- package/dist/index227.js +9 -8
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +9 -23
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +23 -6
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +6 -17
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +17 -79
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +78 -5
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +4 -2
- package/dist/index233.js.map +1 -1
- package/dist/index234.js +295 -2
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +6 -2
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +2 -2
- package/dist/index239.js +2 -4
- package/dist/index239.js.map +1 -1
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +2 -2
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +2 -5
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +224 -69
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +252 -429
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +2 -89
- package/dist/index244.js.map +1 -1
- package/dist/index247.js +424 -189
- package/dist/index247.js.map +1 -1
- package/dist/index249.js +200 -224
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +68 -257
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +5 -2
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +2 -15
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +89 -4
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +15 -4
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +4 -61
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +4 -2
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +64 -0
- package/dist/index257.js.map +1 -0
- package/dist/index258.js +5 -0
- package/dist/index258.js.map +1 -0
- package/dist/index26.js +2 -2
- package/dist/index30.js +3 -3
- package/dist/index32.js +6 -6
- package/dist/index34.js +1 -1
- package/dist/index36.js +2 -2
- package/dist/index44.js +4 -4
- package/dist/index44.js.map +1 -1
- package/dist/index50.js +1 -1
- package/dist/index52.js +1 -1
- package/dist/index52.js.map +1 -1
- package/dist/index56.js +24 -18
- package/dist/index56.js.map +1 -1
- package/dist/index58.js +8 -8
- package/dist/index58.js.map +1 -1
- package/dist/index60.js +8 -8
- package/dist/index60.js.map +1 -1
- package/dist/index68.js +5 -5
- package/dist/index72.js +2 -2
- package/dist/index75.js +1 -1
- package/dist/index78.js +1 -1
- package/dist/index80.js +1 -1
- package/dist/index82.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +2 -2
package/dist/index219.js
CHANGED
|
@@ -1,371 +1,177 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const e = $(t);
|
|
20
|
-
if (!R(e))
|
|
21
|
-
return x(1);
|
|
22
|
-
const n = e.getBoundingClientRect(), {
|
|
23
|
-
width: o,
|
|
24
|
-
height: s,
|
|
25
|
-
$: c
|
|
26
|
-
} = j(e);
|
|
27
|
-
let i = (c ? N(n.width) : n.width) / o, r = (c ? N(n.height) : n.height) / s;
|
|
28
|
-
return (!i || !Number.isFinite(i)) && (i = 1), (!r || !Number.isFinite(r)) && (r = 1), {
|
|
29
|
-
x: i,
|
|
30
|
-
y: r
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
const st = /* @__PURE__ */ x(0);
|
|
34
|
-
function G(t) {
|
|
35
|
-
const e = E(t);
|
|
36
|
-
return !U() || !e.visualViewport ? st : {
|
|
37
|
-
x: e.visualViewport.offsetLeft,
|
|
38
|
-
y: e.visualViewport.offsetTop
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function rt(t, e, n) {
|
|
42
|
-
return e === void 0 && (e = !1), !n || e && n !== E(t) ? !1 : e;
|
|
43
|
-
}
|
|
44
|
-
function L(t, e, n, o) {
|
|
45
|
-
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
46
|
-
const s = t.getBoundingClientRect(), c = $(t);
|
|
47
|
-
let i = x(1);
|
|
48
|
-
e && (o ? b(o) && (i = F(o)) : i = F(t));
|
|
49
|
-
const r = rt(c, n, o) ? G(c) : x(0);
|
|
50
|
-
let l = (s.left + r.x) / i.x, f = (s.top + r.y) / i.y, u = s.width / i.x, h = s.height / i.y;
|
|
51
|
-
if (c) {
|
|
52
|
-
const w = E(c), g = o && b(o) ? E(o) : o;
|
|
53
|
-
let v = w, a = v.frameElement;
|
|
54
|
-
for (; a && o && g !== v; ) {
|
|
55
|
-
const p = F(a), d = a.getBoundingClientRect(), m = y(a), O = d.left + (a.clientLeft + parseFloat(m.paddingLeft)) * p.x, B = d.top + (a.clientTop + parseFloat(m.paddingTop)) * p.y;
|
|
56
|
-
l *= p.x, f *= p.y, u *= p.x, h *= p.y, l += O, f += B, v = E(a), a = v.frameElement;
|
|
57
|
-
}
|
|
1
|
+
/*! maska v2.1.11 | (c) Alexander Shabunevich | Released under the MIT license */
|
|
2
|
+
var V = Object.defineProperty, P = (a, t, e) => t in a ? V(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, g = (a, t, e) => (P(a, typeof t != "symbol" ? t + "" : t, e), e);
|
|
3
|
+
const R = {
|
|
4
|
+
"#": { pattern: /[0-9]/ },
|
|
5
|
+
"@": { pattern: /[a-zA-Z]/ },
|
|
6
|
+
"*": { pattern: /[a-zA-Z0-9]/ }
|
|
7
|
+
};
|
|
8
|
+
class b {
|
|
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 } : { ...R, ...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 = R;
|
|
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;
|
|
58
19
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
height: h,
|
|
62
|
-
x: l,
|
|
63
|
-
y: f
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
const ct = [":popover-open", ":modal"];
|
|
67
|
-
function J(t) {
|
|
68
|
-
return ct.some((e) => {
|
|
69
|
-
try {
|
|
70
|
-
return t.matches(e);
|
|
71
|
-
} catch {
|
|
72
|
-
return !1;
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function lt(t) {
|
|
77
|
-
let {
|
|
78
|
-
elements: e,
|
|
79
|
-
rect: n,
|
|
80
|
-
offsetParent: o,
|
|
81
|
-
strategy: s
|
|
82
|
-
} = t;
|
|
83
|
-
const c = s === "fixed", i = C(o), r = e ? J(e.floating) : !1;
|
|
84
|
-
if (o === i || r && c)
|
|
85
|
-
return n;
|
|
86
|
-
let l = {
|
|
87
|
-
scrollLeft: 0,
|
|
88
|
-
scrollTop: 0
|
|
89
|
-
}, f = x(1);
|
|
90
|
-
const u = x(0), h = R(o);
|
|
91
|
-
if ((h || !h && !c) && ((W(o) !== "body" || S(i)) && (l = D(o)), R(o))) {
|
|
92
|
-
const w = L(o);
|
|
93
|
-
f = F(o), u.x = w.x + o.clientLeft, u.y = w.y + o.clientTop;
|
|
20
|
+
masked(t) {
|
|
21
|
+
return this.process(t, this.findMask(t));
|
|
94
22
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
height: n.height * f.y,
|
|
98
|
-
x: n.x * f.x - l.scrollLeft * f.x + u.x,
|
|
99
|
-
y: n.y * f.y - l.scrollTop * f.y + u.y
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
function ft(t) {
|
|
103
|
-
return Array.from(t.getClientRects());
|
|
104
|
-
}
|
|
105
|
-
function Q(t) {
|
|
106
|
-
return L(C(t)).left + D(t).scrollLeft;
|
|
107
|
-
}
|
|
108
|
-
function ut(t) {
|
|
109
|
-
const e = C(t), n = D(t), o = t.ownerDocument.body, s = T(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), c = T(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
|
|
110
|
-
let i = -n.scrollLeft + Q(t);
|
|
111
|
-
const r = -n.scrollTop;
|
|
112
|
-
return y(o).direction === "rtl" && (i += T(e.clientWidth, o.clientWidth) - s), {
|
|
113
|
-
width: s,
|
|
114
|
-
height: c,
|
|
115
|
-
x: i,
|
|
116
|
-
y: r
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
function ht(t, e) {
|
|
120
|
-
const n = E(t), o = C(t), s = n.visualViewport;
|
|
121
|
-
let c = o.clientWidth, i = o.clientHeight, r = 0, l = 0;
|
|
122
|
-
if (s) {
|
|
123
|
-
c = s.width, i = s.height;
|
|
124
|
-
const f = U();
|
|
125
|
-
(!f || f && e === "fixed") && (r = s.offsetLeft, l = s.offsetTop);
|
|
23
|
+
unmasked(t) {
|
|
24
|
+
return this.process(t, this.findMask(t), !1);
|
|
126
25
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
height: i,
|
|
130
|
-
x: r,
|
|
131
|
-
y: l
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
function at(t, e) {
|
|
135
|
-
const n = L(t, !0, e === "fixed"), o = n.top + t.clientTop, s = n.left + t.clientLeft, c = R(t) ? F(t) : x(1), i = t.clientWidth * c.x, r = t.clientHeight * c.y, l = s * c.x, f = o * c.y;
|
|
136
|
-
return {
|
|
137
|
-
width: i,
|
|
138
|
-
height: r,
|
|
139
|
-
x: l,
|
|
140
|
-
y: f
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
function _(t, e, n) {
|
|
144
|
-
let o;
|
|
145
|
-
if (e === "viewport")
|
|
146
|
-
o = ht(t, n);
|
|
147
|
-
else if (e === "document")
|
|
148
|
-
o = ut(C(t));
|
|
149
|
-
else if (b(e))
|
|
150
|
-
o = at(e, n);
|
|
151
|
-
else {
|
|
152
|
-
const s = G(t);
|
|
153
|
-
o = {
|
|
154
|
-
...e,
|
|
155
|
-
x: e.x - s.x,
|
|
156
|
-
y: e.y - s.y
|
|
157
|
-
};
|
|
26
|
+
isEager() {
|
|
27
|
+
return this.opts.eager === !0;
|
|
158
28
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
function Y(t, e) {
|
|
162
|
-
const n = z(t);
|
|
163
|
-
return n === e || !b(n) || X(n) ? !1 : y(n).position === "fixed" || Y(n, e);
|
|
164
|
-
}
|
|
165
|
-
function dt(t, e) {
|
|
166
|
-
const n = e.get(t);
|
|
167
|
-
if (n)
|
|
168
|
-
return n;
|
|
169
|
-
let o = V(t, [], !1).filter((r) => b(r) && W(r) !== "body"), s = null;
|
|
170
|
-
const c = y(t).position === "fixed";
|
|
171
|
-
let i = c ? z(t) : t;
|
|
172
|
-
for (; b(i) && !X(i); ) {
|
|
173
|
-
const r = y(i), l = K(i);
|
|
174
|
-
!l && r.position === "fixed" && (s = null), (c ? !l && !s : !l && r.position === "static" && !!s && ["absolute", "fixed"].includes(s.position) || S(i) && !l && Y(t, i)) ? o = o.filter((u) => u !== i) : s = r, i = z(i);
|
|
29
|
+
isReversed() {
|
|
30
|
+
return this.opts.reversed === !0;
|
|
175
31
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
if (o || !o && !c)
|
|
214
|
-
if ((W(e) !== "body" || S(s)) && (r = D(e)), o) {
|
|
215
|
-
const h = L(e, !0, c, e);
|
|
216
|
-
l.x = h.x + e.clientLeft, l.y = h.y + e.clientTop;
|
|
217
|
-
} else
|
|
218
|
-
s && (l.x = Q(s));
|
|
219
|
-
const f = i.left + r.scrollLeft - l.x, u = i.top + r.scrollTop - l.y;
|
|
220
|
-
return {
|
|
221
|
-
x: f,
|
|
222
|
-
y: u,
|
|
223
|
-
width: i.width,
|
|
224
|
-
height: i.height
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
function k(t, e) {
|
|
228
|
-
return !R(t) || y(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
|
|
229
|
-
}
|
|
230
|
-
function Z(t, e) {
|
|
231
|
-
const n = E(t);
|
|
232
|
-
if (!R(t) || J(t))
|
|
233
|
-
return n;
|
|
234
|
-
let o = k(t, e);
|
|
235
|
-
for (; o && nt(o) && y(o).position === "static"; )
|
|
236
|
-
o = k(o, e);
|
|
237
|
-
return o && (W(o) === "html" || W(o) === "body" && y(o).position === "static" && !K(o)) ? n : o || it(t) || n;
|
|
238
|
-
}
|
|
239
|
-
const wt = async function(t) {
|
|
240
|
-
const e = this.getOffsetParent || Z, n = this.getDimensions;
|
|
241
|
-
return {
|
|
242
|
-
reference: mt(t.reference, await e(t.floating), t.strategy),
|
|
243
|
-
floating: {
|
|
244
|
-
x: 0,
|
|
245
|
-
y: 0,
|
|
246
|
-
...await n(t.floating)
|
|
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
|
+
if (e == null)
|
|
58
|
+
return t;
|
|
59
|
+
const n = `value=${t},mask=${e},masked=${s ? 1 : 0}`;
|
|
60
|
+
if (this.memo.has(n))
|
|
61
|
+
return this.memo.get(n);
|
|
62
|
+
const { mask: i, escaped: p } = this.escapeMask(e), o = [], k = this.opts.tokens != null ? this.opts.tokens : {}, l = this.isReversed() ? -1 : 1, m = this.isReversed() ? "unshift" : "push", c = this.isReversed() ? 0 : i.length - 1, T = this.isReversed() ? () => r > -1 && u > -1 : () => r < i.length && u < t.length, S = (d) => !this.isReversed() && d <= c || this.isReversed() && d >= c;
|
|
63
|
+
let E, f = -1, r = this.isReversed() ? i.length - 1 : 0, u = this.isReversed() ? t.length - 1 : 0, y = !1;
|
|
64
|
+
for (; T(); ) {
|
|
65
|
+
const d = i.charAt(r), h = k[d], v = (h == null ? void 0 : h.transform) != null ? h.transform(t.charAt(u)) : t.charAt(u);
|
|
66
|
+
if (!p.includes(r) && h != null ? (v.match(h.pattern) != null ? (o[m](v), h.repeated ? (f === -1 ? f = r : r === c && r !== f && (r = f - l), c === f && (r -= l)) : h.multiple && (y = !0, r -= l), r += l) : h.multiple ? y && (r += l, u -= l, y = !1) : v === E ? E = void 0 : h.optional && (r += l, u -= l), u += l) : (s && !this.isEager() && o[m](d), v === d && !this.isEager() ? u += l : E = d, this.isEager() || (r += l)), this.isEager())
|
|
67
|
+
for (; S(r) && (k[i.charAt(r)] == null || p.includes(r)); )
|
|
68
|
+
s ? o[m](i.charAt(r)) : i.charAt(r) === t.charAt(u) && (u += l), r += l;
|
|
247
69
|
}
|
|
248
|
-
|
|
249
|
-
};
|
|
250
|
-
function yt(t) {
|
|
251
|
-
return y(t).direction === "rtl";
|
|
252
|
-
}
|
|
253
|
-
const vt = {
|
|
254
|
-
convertOffsetParentRelativeRectToViewportRelativeRect: lt,
|
|
255
|
-
getDocumentElement: C,
|
|
256
|
-
getClippingRect: gt,
|
|
257
|
-
getOffsetParent: Z,
|
|
258
|
-
getElementRects: wt,
|
|
259
|
-
getClientRects: ft,
|
|
260
|
-
getDimensions: pt,
|
|
261
|
-
getScale: F,
|
|
262
|
-
isElement: b,
|
|
263
|
-
isRTL: yt
|
|
264
|
-
};
|
|
265
|
-
function xt(t, e) {
|
|
266
|
-
let n = null, o;
|
|
267
|
-
const s = C(t);
|
|
268
|
-
function c() {
|
|
269
|
-
var r;
|
|
270
|
-
clearTimeout(o), (r = n) == null || r.disconnect(), n = null;
|
|
70
|
+
return this.memo.set(n, o.join("")), this.memo.get(n);
|
|
271
71
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
72
|
+
}
|
|
73
|
+
const O = (a) => JSON.parse(a.replaceAll("'", '"')), w = (a, t = {}) => {
|
|
74
|
+
const e = { ...t };
|
|
75
|
+
return a.dataset.maska != null && a.dataset.maska !== "" && (e.mask = W(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 = j(a.dataset.maskaTokens)), e;
|
|
76
|
+
}, M = (a) => a !== "" ? !!JSON.parse(a) : !0, W = (a) => a.startsWith("[") && a.endsWith("]") ? O(a) : a, j = (a) => {
|
|
77
|
+
if (a.startsWith("{") && a.endsWith("}"))
|
|
78
|
+
return O(a);
|
|
79
|
+
const t = {};
|
|
80
|
+
return a.split("|").forEach((e) => {
|
|
81
|
+
const s = e.split(":");
|
|
82
|
+
t[s[0]] = {
|
|
83
|
+
pattern: new RegExp(s[1]),
|
|
84
|
+
optional: s[2] === "optional",
|
|
85
|
+
multiple: s[2] === "multiple",
|
|
86
|
+
repeated: s[2] === "repeated"
|
|
285
87
|
};
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
88
|
+
}), t;
|
|
89
|
+
};
|
|
90
|
+
class L {
|
|
91
|
+
constructor(t, e = {}) {
|
|
92
|
+
g(this, "items", /* @__PURE__ */ new Map()), g(this, "beforeinputEvent", (s) => {
|
|
93
|
+
const n = s.target, i = this.items.get(n);
|
|
94
|
+
i.isEager() && "inputType" in s && s.inputType.startsWith("delete") && i.unmasked(n.value).length <= 1 && this.setMaskedValue(n, "");
|
|
95
|
+
}), g(this, "inputEvent", (s) => {
|
|
96
|
+
if (s instanceof CustomEvent && s.type === "input" && s.detail != null && typeof s.detail == "object" && "masked" in s.detail)
|
|
97
|
+
return;
|
|
98
|
+
const n = s.target, i = this.items.get(n), p = n.value, o = n.selectionStart, k = n.selectionEnd;
|
|
99
|
+
let l = p;
|
|
100
|
+
if (i.isEager()) {
|
|
101
|
+
const m = i.masked(p), c = i.unmasked(p);
|
|
102
|
+
c === "" && "data" in s && s.data != null ? l = s.data : c !== i.unmasked(m) && (l = c);
|
|
295
103
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
104
|
+
if (this.setMaskedValue(n, l), "inputType" in s && (s.inputType.startsWith("delete") || o != null && o < p.length))
|
|
105
|
+
try {
|
|
106
|
+
n.setSelectionRange(o, k);
|
|
107
|
+
} catch {
|
|
108
|
+
}
|
|
109
|
+
}), this.options = e, typeof t == "string" ? this.init(
|
|
110
|
+
Array.from(document.querySelectorAll(t)),
|
|
111
|
+
this.getMaskOpts(e)
|
|
112
|
+
) : this.init(
|
|
113
|
+
"length" in t ? Array.from(t) : [t],
|
|
114
|
+
this.getMaskOpts(e)
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
destroy() {
|
|
118
|
+
for (const t of this.items.keys())
|
|
119
|
+
t.removeEventListener("input", this.inputEvent), t.removeEventListener("beforeinput", this.beforeinputEvent);
|
|
120
|
+
this.items.clear();
|
|
121
|
+
}
|
|
122
|
+
needUpdateOptions(t, e) {
|
|
123
|
+
const s = this.items.get(t), n = new b(w(t, this.getMaskOpts(e)));
|
|
124
|
+
return JSON.stringify(s.opts) !== JSON.stringify(n.opts);
|
|
125
|
+
}
|
|
126
|
+
needUpdateValue(t) {
|
|
127
|
+
const e = t.dataset.maskaValue;
|
|
128
|
+
return e == null && t.value !== "" || e != null && e !== t.value;
|
|
129
|
+
}
|
|
130
|
+
getMaskOpts(t) {
|
|
131
|
+
const { onMaska: e, preProcess: s, postProcess: n, ...i } = t;
|
|
132
|
+
return i;
|
|
133
|
+
}
|
|
134
|
+
init(t, e) {
|
|
135
|
+
for (const s of t) {
|
|
136
|
+
const n = new b(w(s, e));
|
|
137
|
+
this.items.set(s, n), s.value !== "" && this.setMaskedValue(s, s.value), s.addEventListener("input", this.inputEvent), s.addEventListener("beforeinput", this.beforeinputEvent);
|
|
306
138
|
}
|
|
307
|
-
n.observe(t);
|
|
308
139
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
ancestorScroll: s = !0,
|
|
315
|
-
ancestorResize: c = !0,
|
|
316
|
-
elementResize: i = typeof ResizeObserver == "function",
|
|
317
|
-
layoutShift: r = typeof IntersectionObserver == "function",
|
|
318
|
-
animationFrame: l = !1
|
|
319
|
-
} = o, f = $(t), u = s || c ? [...f ? V(f) : [], ...V(e)] : [];
|
|
320
|
-
u.forEach((d) => {
|
|
321
|
-
s && d.addEventListener("scroll", n, {
|
|
322
|
-
passive: !0
|
|
323
|
-
}), c && d.addEventListener("resize", n);
|
|
324
|
-
});
|
|
325
|
-
const h = f && r ? xt(f, n) : null;
|
|
326
|
-
let w = -1, g = null;
|
|
327
|
-
i && (g = new ResizeObserver((d) => {
|
|
328
|
-
let [m] = d;
|
|
329
|
-
m && m.target === f && g && (g.unobserve(e), cancelAnimationFrame(w), w = requestAnimationFrame(() => {
|
|
330
|
-
var O;
|
|
331
|
-
(O = g) == null || O.observe(e);
|
|
332
|
-
})), n();
|
|
333
|
-
}), f && !l && g.observe(f), g.observe(e));
|
|
334
|
-
let v, a = l ? L(t) : null;
|
|
335
|
-
l && p();
|
|
336
|
-
function p() {
|
|
337
|
-
const d = L(t);
|
|
338
|
-
a && (d.x !== a.x || d.y !== a.y || d.width !== a.width || d.height !== a.height) && n(), a = d, v = requestAnimationFrame(p);
|
|
140
|
+
setMaskedValue(t, e) {
|
|
141
|
+
const s = this.items.get(t);
|
|
142
|
+
this.options.preProcess != null && (e = this.options.preProcess(e));
|
|
143
|
+
const n = s.masked(e), i = s.unmasked(s.isEager() ? n : e), p = s.completed(e), o = { masked: n, unmasked: i, completed: p };
|
|
144
|
+
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((k) => k(o)) : this.options.onMaska(o)), t.dispatchEvent(new CustomEvent("maska", { detail: o })), t.dispatchEvent(new CustomEvent("input", { detail: o }));
|
|
339
145
|
}
|
|
340
|
-
return n(), () => {
|
|
341
|
-
var d;
|
|
342
|
-
u.forEach((m) => {
|
|
343
|
-
s && m.removeEventListener("scroll", n), c && m.removeEventListener("resize", n);
|
|
344
|
-
}), h == null || h(), (d = g) == null || d.disconnect(), g = null, l && cancelAnimationFrame(v);
|
|
345
|
-
};
|
|
346
146
|
}
|
|
347
|
-
const
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}, c = {
|
|
352
|
-
...s.platform,
|
|
353
|
-
_c: o
|
|
354
|
-
};
|
|
355
|
-
return ot(t, e, {
|
|
356
|
-
...s,
|
|
357
|
-
platform: c
|
|
147
|
+
const A = /* @__PURE__ */ new WeakMap(), C = (a) => {
|
|
148
|
+
setTimeout(() => {
|
|
149
|
+
var t;
|
|
150
|
+
((t = A.get(a)) == null ? void 0 : t.needUpdateValue(a)) === !0 && a.dispatchEvent(new CustomEvent("input"));
|
|
358
151
|
});
|
|
152
|
+
}, J = (a, t) => {
|
|
153
|
+
const e = a instanceof HTMLInputElement ? a : a.querySelector("input"), s = { ...t.arg };
|
|
154
|
+
if (e == null || (e == null ? void 0 : e.type) === "file")
|
|
155
|
+
return;
|
|
156
|
+
C(e);
|
|
157
|
+
const n = A.get(e);
|
|
158
|
+
if (n != null) {
|
|
159
|
+
if (!n.needUpdateOptions(e, s))
|
|
160
|
+
return;
|
|
161
|
+
n.destroy();
|
|
162
|
+
}
|
|
163
|
+
if (t.value != null) {
|
|
164
|
+
const i = t.value, p = (o) => {
|
|
165
|
+
i.masked = o.masked, i.unmasked = o.unmasked, i.completed = o.completed;
|
|
166
|
+
};
|
|
167
|
+
s.onMaska = s.onMaska == null ? p : Array.isArray(s.onMaska) ? [...s.onMaska, p] : [s.onMaska, p];
|
|
168
|
+
}
|
|
169
|
+
A.set(e, new L(e, s));
|
|
359
170
|
};
|
|
360
171
|
export {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
Lt as flip,
|
|
366
|
-
V as getOverflowAncestors,
|
|
367
|
-
Nt as offset,
|
|
368
|
-
vt as platform,
|
|
369
|
-
Et as shift
|
|
172
|
+
b as Mask,
|
|
173
|
+
L as MaskInput,
|
|
174
|
+
R as tokens,
|
|
175
|
+
J as vMaska
|
|
370
176
|
};
|
|
371
177
|
//# sourceMappingURL=index219.js.map
|