@alikhalilll/ui 1.2.1 → 1.2.2
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/README.md +68 -45
- package/dist/assets/styles.css +2 -74
- package/dist/chunks/AResponsivePopoverContent.vue_vue_type_script_setup_true_lang-BrBsDiHc.mjs +113 -0
- package/dist/chunks/AResponsivePopoverContent.vue_vue_type_script_setup_true_lang-BrBsDiHc.mjs.map +1 -0
- package/dist/chunks/ATellInput.vue_vue_type_script_setup_true_lang-D4odgAna.mjs +1606 -0
- package/dist/chunks/ATellInput.vue_vue_type_script_setup_true_lang-D4odgAna.mjs.map +1 -0
- package/dist/chunks/useEventScrollLock-BcP8fg-L.mjs +241 -0
- package/dist/chunks/useEventScrollLock-BcP8fg-L.mjs.map +1 -0
- package/dist/entries/drawer/components/ADrawer.vue.d.ts +31 -0
- package/dist/entries/drawer/components/ADrawer.vue.d.ts.map +1 -0
- package/dist/entries/drawer/components/ADrawerContent.vue.d.ts +33 -0
- package/dist/entries/drawer/components/ADrawerContent.vue.d.ts.map +1 -0
- package/dist/entries/drawer/components/ADrawerOverlay.vue.d.ts +9 -0
- package/dist/entries/drawer/components/ADrawerOverlay.vue.d.ts.map +1 -0
- package/dist/entries/drawer/components/ADrawerTrigger.vue.d.ts +15 -0
- package/dist/entries/drawer/components/ADrawerTrigger.vue.d.ts.map +1 -0
- package/dist/entries/drawer/index.d.ts +5 -0
- package/dist/entries/drawer/index.d.ts.map +1 -0
- package/dist/entries/input/components/AInput.vue.d.ts +36 -0
- package/dist/entries/input/components/AInput.vue.d.ts.map +1 -0
- package/dist/entries/input/index.d.ts +2 -0
- package/dist/entries/input/index.d.ts.map +1 -0
- package/dist/entries/popover/components/APopover.vue.d.ts +24 -0
- package/dist/entries/popover/components/APopover.vue.d.ts.map +1 -0
- package/dist/entries/popover/components/APopoverContent.vue.d.ts +48 -0
- package/dist/entries/popover/components/APopoverContent.vue.d.ts.map +1 -0
- package/dist/entries/popover/components/APopoverOverlay.vue.d.ts +17 -0
- package/dist/entries/popover/components/APopoverOverlay.vue.d.ts.map +1 -0
- package/dist/entries/popover/components/APopoverTrigger.vue.d.ts +15 -0
- package/dist/entries/popover/components/APopoverTrigger.vue.d.ts.map +1 -0
- package/dist/entries/popover/composables/useEventScrollLock.d.ts +21 -0
- package/dist/entries/popover/composables/useEventScrollLock.d.ts.map +1 -0
- package/dist/entries/popover/index.d.ts +6 -0
- package/dist/entries/popover/index.d.ts.map +1 -0
- package/dist/entries/responsive-popover/components/AResponsivePopover.vue.d.ts +50 -0
- package/dist/entries/responsive-popover/components/AResponsivePopover.vue.d.ts.map +1 -0
- package/dist/entries/responsive-popover/components/AResponsivePopoverContent.vue.d.ts +39 -0
- package/dist/entries/responsive-popover/components/AResponsivePopoverContent.vue.d.ts.map +1 -0
- package/dist/entries/responsive-popover/components/AResponsivePopoverTrigger.vue.d.ts +20 -0
- package/dist/entries/responsive-popover/components/AResponsivePopoverTrigger.vue.d.ts.map +1 -0
- package/dist/entries/responsive-popover/composables/useResponsivePopoverContext.d.ts +10 -0
- package/dist/entries/responsive-popover/composables/useResponsivePopoverContext.d.ts.map +1 -0
- package/dist/entries/responsive-popover/index.d.ts +4 -0
- package/dist/entries/responsive-popover/index.d.ts.map +1 -0
- package/dist/entries/tell-input/components/ACountryFlag.vue.d.ts +30 -0
- package/dist/entries/tell-input/components/ACountryFlag.vue.d.ts.map +1 -0
- package/dist/entries/tell-input/components/ACountrySelect.vue.d.ts +140 -0
- package/dist/entries/tell-input/components/ACountrySelect.vue.d.ts.map +1 -0
- package/dist/entries/tell-input/components/ATellInput.vue.d.ts +145 -0
- package/dist/entries/tell-input/components/ATellInput.vue.d.ts.map +1 -0
- package/dist/entries/tell-input/composables/useCountryDetection.d.ts +44 -0
- package/dist/entries/tell-input/composables/useCountryDetection.d.ts.map +1 -0
- package/dist/entries/tell-input/composables/useCountryMatching.d.ts +44 -0
- package/dist/entries/tell-input/composables/useCountryMatching.d.ts.map +1 -0
- package/dist/entries/tell-input/composables/usePhoneValidation.d.ts +110 -0
- package/dist/entries/tell-input/composables/usePhoneValidation.d.ts.map +1 -0
- package/dist/entries/tell-input/composables/useTellInputValidation.d.ts +67 -0
- package/dist/entries/tell-input/composables/useTellInputValidation.d.ts.map +1 -0
- package/dist/entries/tell-input/composables/useTypingPhase.d.ts +50 -0
- package/dist/entries/tell-input/composables/useTypingPhase.d.ts.map +1 -0
- package/dist/entries/tell-input/index.d.ts +12 -0
- package/dist/entries/tell-input/index.d.ts.map +1 -0
- package/dist/entries/tell-input/utils/digits.d.ts +22 -0
- package/dist/entries/tell-input/utils/digits.d.ts.map +1 -0
- package/dist/entries/tell-input/utils/flag-url.d.ts +8 -0
- package/dist/entries/tell-input/utils/flag-url.d.ts.map +1 -0
- package/dist/entries/tell-input/utils/types.d.ts +120 -0
- package/dist/entries/tell-input/utils/types.d.ts.map +1 -0
- package/dist/index.d.ts +7 -1139
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +39 -33
- package/dist/popover.mjs +5 -4
- package/dist/responsive-popover.mjs +1 -1
- package/dist/tell-input.mjs +14 -9
- package/dist/utils/cn.d.ts +3 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/{utils.d.ts → utils/sizes.d.ts} +18 -29
- package/dist/utils/sizes.d.ts.map +1 -0
- package/package.json +14 -10
- package/dist/chunks/APopoverContent.vue_vue_type_script_setup_true_lang-CjiJ12DR.mjs +0 -132
- package/dist/chunks/APopoverContent.vue_vue_type_script_setup_true_lang-CjiJ12DR.mjs.map +0 -1
- package/dist/chunks/AResponsivePopoverContent.vue_vue_type_script_setup_true_lang-5YbO6FdM.mjs +0 -92
- package/dist/chunks/AResponsivePopoverContent.vue_vue_type_script_setup_true_lang-5YbO6FdM.mjs.map +0 -1
- package/dist/chunks/ATellInput.vue_vue_type_script_setup_true_lang-D7hPj1g1.mjs +0 -1489
- package/dist/chunks/ATellInput.vue_vue_type_script_setup_true_lang-D7hPj1g1.mjs.map +0 -1
- package/dist/drawer.d.ts +0 -116
- package/dist/input.d.ts +0 -65
- package/dist/popover.d.ts +0 -117
- package/dist/responsive-popover.d.ts +0 -124
- package/dist/tell-input.d.ts +0 -740
|
@@ -0,0 +1,1606 @@
|
|
|
1
|
+
import { ref as L, onMounted as me, readonly as ce, computed as k, defineComponent as ve, watch as re, openBlock as M, createElementBlock as O, normalizeClass as Z, unref as o, toDisplayString as z, renderSlot as y, createElementVNode as A, useModel as pe, createBlock as Te, withCtx as R, createVNode as N, createCommentVNode as j, withDirectives as Ge, vModelText as He, Fragment as de, renderList as Ce, mergeModels as De, useId as Ze, Transition as fe, createSlots as je, normalizeProps as Q, guardReactiveProps as X } from "vue";
|
|
2
|
+
import { ChevronDown as Je, Search as Ye, Check as Ae, Loader2 as qe, CheckCircle2 as We, AlertCircle as Qe } from "lucide-vue-next";
|
|
3
|
+
import { c as V } from "./cn-B6yFEsav.mjs";
|
|
4
|
+
import { c as te, d as q, b as Be, D as Me } from "./sizes-B_9MfLkz.mjs";
|
|
5
|
+
import { isValidPhoneNumber as Xe, parsePhoneNumberFromString as ie, getExampleNumber as et } from "libphonenumber-js";
|
|
6
|
+
import tt from "libphonenumber-js/examples.mobile.json";
|
|
7
|
+
import { useDebounceFn as at } from "@vueuse/core";
|
|
8
|
+
import { cva as rt } from "class-variance-authority";
|
|
9
|
+
import { _ as nt, b as lt, a as ot } from "./AResponsivePopoverContent.vue_vue_type_script_setup_true_lang-BrBsDiHc.mjs";
|
|
10
|
+
const st = [
|
|
11
|
+
{ name: "arabic-indic", base: 1632 },
|
|
12
|
+
// ٠١٢٣٤٥٦٧٨٩
|
|
13
|
+
{ name: "extended-arabic", base: 1776 },
|
|
14
|
+
// ۰۱۲۳۴۵۶۷۸۹ — Persian / Urdu
|
|
15
|
+
{ name: "devanagari", base: 2406 },
|
|
16
|
+
// ०१२३४५६७८९
|
|
17
|
+
{ name: "bengali", base: 2534 }
|
|
18
|
+
// ০১২৩৪৫৬৭৮৯
|
|
19
|
+
], it = (() => {
|
|
20
|
+
const a = /* @__PURE__ */ new Map();
|
|
21
|
+
for (const { base: t } of st)
|
|
22
|
+
for (let e = 0; e <= 9; e++) a.set(t + e, String(e));
|
|
23
|
+
return a;
|
|
24
|
+
})();
|
|
25
|
+
function se(a) {
|
|
26
|
+
const t = String(a ?? "");
|
|
27
|
+
let e = "";
|
|
28
|
+
for (const n of t) {
|
|
29
|
+
const g = n.codePointAt(0);
|
|
30
|
+
e += g != null && it.get(g) || n;
|
|
31
|
+
}
|
|
32
|
+
return e;
|
|
33
|
+
}
|
|
34
|
+
const ke = "ali_ui_phone_countries_v1", ut = "https://restcountries.com/v3.1/all?fields=name,cca2,idd,flags", ct = tt, Se = () => typeof window < "u";
|
|
35
|
+
function W(a) {
|
|
36
|
+
return se(String(a ?? "")).replace(/\D/g, "");
|
|
37
|
+
}
|
|
38
|
+
function dt(a, t) {
|
|
39
|
+
if (!t) return a;
|
|
40
|
+
try {
|
|
41
|
+
const e = new Intl.NumberFormat(t, { useGrouping: !1 });
|
|
42
|
+
return a.replace(/[0-9]/g, (n) => e.format(Number(n)));
|
|
43
|
+
} catch {
|
|
44
|
+
return a;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function he(a) {
|
|
48
|
+
const t = W(a);
|
|
49
|
+
return t ? `+${t}` : "";
|
|
50
|
+
}
|
|
51
|
+
function oe(a) {
|
|
52
|
+
return String(a ?? "").trim().toUpperCase();
|
|
53
|
+
}
|
|
54
|
+
function Ne(a) {
|
|
55
|
+
return String(a ?? "").replace(/^0+/, "");
|
|
56
|
+
}
|
|
57
|
+
function ae(a, t) {
|
|
58
|
+
const e = he(a), n = Ne(W(t));
|
|
59
|
+
return e && n ? `${e}${n}` : null;
|
|
60
|
+
}
|
|
61
|
+
function ft(a) {
|
|
62
|
+
const t = W(a);
|
|
63
|
+
if (!t) return { min: null, max: null };
|
|
64
|
+
const e = t.length;
|
|
65
|
+
return { min: Math.max(4, e - 2), max: e + 2 };
|
|
66
|
+
}
|
|
67
|
+
function gt(a) {
|
|
68
|
+
const t = a?.root?.trim();
|
|
69
|
+
if (!t || !t.startsWith("+")) return null;
|
|
70
|
+
const e = a?.suffixes?.[0]?.trim() ?? "", n = `${t}${e}`;
|
|
71
|
+
return n.startsWith("+") ? n : null;
|
|
72
|
+
}
|
|
73
|
+
function ue(a) {
|
|
74
|
+
return String(a ?? "").toLowerCase().replace(/\s+/g, " ").trim().replace(/[^\p{L}\p{N}+ ]/gu, "");
|
|
75
|
+
}
|
|
76
|
+
function pt(a, t) {
|
|
77
|
+
if (!t) return a;
|
|
78
|
+
let e;
|
|
79
|
+
try {
|
|
80
|
+
e = new Intl.DisplayNames([t], { type: "region" });
|
|
81
|
+
} catch {
|
|
82
|
+
return a;
|
|
83
|
+
}
|
|
84
|
+
return a.map((n) => {
|
|
85
|
+
let g = n.raw_data.name;
|
|
86
|
+
try {
|
|
87
|
+
g = e.of(n.raw_data.iso2) || n.raw_data.name;
|
|
88
|
+
} catch {
|
|
89
|
+
}
|
|
90
|
+
if (g === n.raw_data.name) return n;
|
|
91
|
+
const c = n.raw_data.dial_code;
|
|
92
|
+
return {
|
|
93
|
+
...n,
|
|
94
|
+
label: `${g} (${c})`,
|
|
95
|
+
search_key: ue(
|
|
96
|
+
`${g} ${n.raw_data.name} ${c} ${n.raw_data.iso2} ${n.raw_data.dial_digits}`
|
|
97
|
+
),
|
|
98
|
+
raw_data: { ...n.raw_data, name: g }
|
|
99
|
+
};
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function x(a, t, e) {
|
|
103
|
+
const n = W(e);
|
|
104
|
+
return {
|
|
105
|
+
label: `${t} (+${n})`,
|
|
106
|
+
value: a,
|
|
107
|
+
search_key: ue(`${t} +${n} ${a}`),
|
|
108
|
+
raw_data: {
|
|
109
|
+
iso2: a,
|
|
110
|
+
dial_code: `+${n}`,
|
|
111
|
+
dial_digits: n,
|
|
112
|
+
name: t,
|
|
113
|
+
flag: `https://flagcdn.com/w40/${a.toLowerCase()}.png`,
|
|
114
|
+
source: "fallback",
|
|
115
|
+
original: {}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
const $e = [
|
|
120
|
+
x("SA", "Saudi Arabia", "+966"),
|
|
121
|
+
x("EG", "Egypt", "+20"),
|
|
122
|
+
x("AE", "United Arab Emirates", "+971"),
|
|
123
|
+
x("US", "United States", "+1"),
|
|
124
|
+
x("GB", "United Kingdom", "+44"),
|
|
125
|
+
x("DE", "Germany", "+49"),
|
|
126
|
+
x("FR", "France", "+33"),
|
|
127
|
+
x("ES", "Spain", "+34"),
|
|
128
|
+
x("IT", "Italy", "+39"),
|
|
129
|
+
x("TR", "Turkey", "+90"),
|
|
130
|
+
x("RU", "Russia", "+7"),
|
|
131
|
+
x("CN", "China", "+86"),
|
|
132
|
+
x("IN", "India", "+91"),
|
|
133
|
+
x("JP", "Japan", "+81"),
|
|
134
|
+
x("KR", "South Korea", "+82"),
|
|
135
|
+
x("BR", "Brazil", "+55"),
|
|
136
|
+
x("MX", "Mexico", "+52"),
|
|
137
|
+
x("CA", "Canada", "+1"),
|
|
138
|
+
x("AU", "Australia", "+61"),
|
|
139
|
+
x("NG", "Nigeria", "+234"),
|
|
140
|
+
x("PK", "Pakistan", "+92"),
|
|
141
|
+
x("ID", "Indonesia", "+62")
|
|
142
|
+
];
|
|
143
|
+
function Pe() {
|
|
144
|
+
const a = L([]), t = L(!1), e = L(/* @__PURE__ */ new Map()), n = L(/* @__PURE__ */ new Map());
|
|
145
|
+
function g(p) {
|
|
146
|
+
const _ = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
|
|
147
|
+
for (const r of p) {
|
|
148
|
+
_.set(r.value, r);
|
|
149
|
+
const u = r.raw_data.dial_digits;
|
|
150
|
+
if (u) {
|
|
151
|
+
const f = d.get(u) ?? [];
|
|
152
|
+
f.push(r), d.set(u, f);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
e.value = _, n.value = d;
|
|
156
|
+
}
|
|
157
|
+
function c(p) {
|
|
158
|
+
a.value = p, g(p);
|
|
159
|
+
}
|
|
160
|
+
function b(p) {
|
|
161
|
+
const _ = [];
|
|
162
|
+
for (const r of p) {
|
|
163
|
+
const u = r?.name?.common?.trim(), f = oe(r?.cca2), I = gt(r?.idd), F = r?.flags?.png?.trim() || r?.flags?.svg?.trim() || null;
|
|
164
|
+
if (!u || !f || !I) continue;
|
|
165
|
+
const D = W(I), P = ue(`${u} ${I} ${f} ${D}`);
|
|
166
|
+
_.push({
|
|
167
|
+
label: `${u} (${I})`,
|
|
168
|
+
value: f,
|
|
169
|
+
search_key: P,
|
|
170
|
+
raw_data: {
|
|
171
|
+
iso2: f,
|
|
172
|
+
dial_code: I,
|
|
173
|
+
dial_digits: D,
|
|
174
|
+
name: u,
|
|
175
|
+
flag: F,
|
|
176
|
+
source: "restcountries",
|
|
177
|
+
original: r
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
const d = /* @__PURE__ */ new Map();
|
|
182
|
+
for (const r of _) {
|
|
183
|
+
const u = d.get(r.value);
|
|
184
|
+
if (!u) {
|
|
185
|
+
d.set(r.value, r);
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
const f = (u.raw_data.flag ? 1 : 0) + (u.raw_data.dial_code ? 1 : 0);
|
|
189
|
+
(r.raw_data.flag ? 1 : 0) + (r.raw_data.dial_code ? 1 : 0) > f && d.set(r.value, r);
|
|
190
|
+
}
|
|
191
|
+
return Array.from(d.values()).sort((r, u) => r.raw_data.name.localeCompare(u.raw_data.name));
|
|
192
|
+
}
|
|
193
|
+
async function $(p) {
|
|
194
|
+
const _ = !!p?.force;
|
|
195
|
+
if (!_ && a.value.length) return a.value;
|
|
196
|
+
if (!_ && Se())
|
|
197
|
+
try {
|
|
198
|
+
const d = localStorage.getItem(ke);
|
|
199
|
+
if (d) {
|
|
200
|
+
const r = JSON.parse(d);
|
|
201
|
+
if (Array.isArray(r) && r.length)
|
|
202
|
+
return c(r), a.value;
|
|
203
|
+
}
|
|
204
|
+
} catch {
|
|
205
|
+
}
|
|
206
|
+
t.value = !0;
|
|
207
|
+
try {
|
|
208
|
+
const d = await fetch(ut);
|
|
209
|
+
if (!d.ok) throw new Error(`Failed to fetch countries: ${d.status}`);
|
|
210
|
+
const r = await d.json(), u = b(r);
|
|
211
|
+
if (c(u.length ? u : $e), Se())
|
|
212
|
+
try {
|
|
213
|
+
localStorage.setItem(ke, JSON.stringify(a.value));
|
|
214
|
+
} catch {
|
|
215
|
+
}
|
|
216
|
+
return a.value;
|
|
217
|
+
} catch {
|
|
218
|
+
return c($e), a.value;
|
|
219
|
+
} finally {
|
|
220
|
+
t.value = !1;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
function C(p, _ = 50) {
|
|
224
|
+
const d = ue(p);
|
|
225
|
+
if (!d) return a.value.slice(0, _);
|
|
226
|
+
const r = [];
|
|
227
|
+
for (const u of a.value)
|
|
228
|
+
if (u.search_key.includes(d) && (r.push(u), r.length >= _))
|
|
229
|
+
break;
|
|
230
|
+
return r;
|
|
231
|
+
}
|
|
232
|
+
function T(p) {
|
|
233
|
+
return e.value.get(oe(p)) ?? null;
|
|
234
|
+
}
|
|
235
|
+
function v(p) {
|
|
236
|
+
return n.value.get(W(p)) ?? [];
|
|
237
|
+
}
|
|
238
|
+
function m(p, _) {
|
|
239
|
+
const d = oe(p.iso2);
|
|
240
|
+
if (!d) return null;
|
|
241
|
+
try {
|
|
242
|
+
const r = et(d, ct), u = r?.formatNational?.() ?? "", f = r?.format?.("E.164") ?? "", I = ft(u), F = p.dial_code ? he(p.dial_code) : f ? `+${r?.countryCallingCode}` : "", D = W(u);
|
|
243
|
+
return {
|
|
244
|
+
iso2: d,
|
|
245
|
+
dial_code: F,
|
|
246
|
+
placeholder: "",
|
|
247
|
+
example_national: u,
|
|
248
|
+
example_e164: f,
|
|
249
|
+
national_number_length: I,
|
|
250
|
+
format_hint: D ? `e.g. ${dt(D, _)}` : ""
|
|
251
|
+
};
|
|
252
|
+
} catch {
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
function E(p) {
|
|
257
|
+
const _ = p.country ?? null;
|
|
258
|
+
if (!_?.iso2)
|
|
259
|
+
return {
|
|
260
|
+
ok: !1,
|
|
261
|
+
reason: "missing_country",
|
|
262
|
+
country: null,
|
|
263
|
+
phone: { raw: ("phone" in p ? p.phone : null) ?? null, digits: "" },
|
|
264
|
+
full_phone: null,
|
|
265
|
+
required: null
|
|
266
|
+
};
|
|
267
|
+
const d = oe(_.iso2), r = m({ iso2: d, dial_code: _.dial_code }, p.locale);
|
|
268
|
+
if (!r)
|
|
269
|
+
return {
|
|
270
|
+
ok: !1,
|
|
271
|
+
reason: "country_not_supported",
|
|
272
|
+
country: { iso2: d, dial_code: he(_.dial_code) },
|
|
273
|
+
phone: { raw: ("phone" in p ? p.phone : null) ?? null, digits: "" },
|
|
274
|
+
full_phone: null,
|
|
275
|
+
required: null
|
|
276
|
+
};
|
|
277
|
+
if (!("phone" in p))
|
|
278
|
+
return {
|
|
279
|
+
ok: !0,
|
|
280
|
+
reason: null,
|
|
281
|
+
country: { iso2: r.iso2, dial_code: r.dial_code },
|
|
282
|
+
phone: { raw: null, digits: "" },
|
|
283
|
+
full_phone: null,
|
|
284
|
+
required: r
|
|
285
|
+
};
|
|
286
|
+
const u = p.phone, f = W(u);
|
|
287
|
+
if (!u || !String(u).trim())
|
|
288
|
+
return {
|
|
289
|
+
ok: !0,
|
|
290
|
+
reason: null,
|
|
291
|
+
country: { iso2: r.iso2, dial_code: r.dial_code },
|
|
292
|
+
phone: { raw: u ?? null, digits: "" },
|
|
293
|
+
full_phone: null,
|
|
294
|
+
required: r
|
|
295
|
+
};
|
|
296
|
+
if (String(u).replace(/\s+/g, "").match(/[^\d+]/))
|
|
297
|
+
return {
|
|
298
|
+
ok: !1,
|
|
299
|
+
reason: "phone_has_non_digits",
|
|
300
|
+
country: { iso2: r.iso2, dial_code: r.dial_code },
|
|
301
|
+
phone: { raw: u, digits: f },
|
|
302
|
+
full_phone: ae(r.dial_code, f),
|
|
303
|
+
required: r
|
|
304
|
+
};
|
|
305
|
+
const I = Ne(f), { min: F, max: D } = r.national_number_length;
|
|
306
|
+
if (F !== null && I.length < F)
|
|
307
|
+
return {
|
|
308
|
+
ok: !1,
|
|
309
|
+
reason: "too_short",
|
|
310
|
+
country: { iso2: r.iso2, dial_code: r.dial_code },
|
|
311
|
+
phone: { raw: u, digits: f },
|
|
312
|
+
full_phone: ae(r.dial_code, f),
|
|
313
|
+
required: r,
|
|
314
|
+
details: { min: F, actual: I.length }
|
|
315
|
+
};
|
|
316
|
+
if (D !== null && I.length > D)
|
|
317
|
+
return {
|
|
318
|
+
ok: !1,
|
|
319
|
+
reason: "too_long",
|
|
320
|
+
country: { iso2: r.iso2, dial_code: r.dial_code },
|
|
321
|
+
phone: { raw: u, digits: f },
|
|
322
|
+
full_phone: ae(r.dial_code, f),
|
|
323
|
+
required: r,
|
|
324
|
+
details: { max: D, actual: I.length }
|
|
325
|
+
};
|
|
326
|
+
const P = ae(r.dial_code, f) ?? String(u);
|
|
327
|
+
try {
|
|
328
|
+
if (!Xe(P, d)) {
|
|
329
|
+
const G = ie(P, d);
|
|
330
|
+
return {
|
|
331
|
+
ok: !1,
|
|
332
|
+
reason: "invalid_phone",
|
|
333
|
+
country: { iso2: r.iso2, dial_code: r.dial_code },
|
|
334
|
+
phone: { raw: u, digits: f },
|
|
335
|
+
full_phone: G?.number ?? null,
|
|
336
|
+
required: r,
|
|
337
|
+
details: {
|
|
338
|
+
type: G?.getType?.() ?? null,
|
|
339
|
+
possible: G?.isPossible?.() ?? null,
|
|
340
|
+
country: G?.country ?? null
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
const K = ie(P, d);
|
|
345
|
+
return {
|
|
346
|
+
ok: !0,
|
|
347
|
+
reason: null,
|
|
348
|
+
country: { iso2: r.iso2, dial_code: r.dial_code },
|
|
349
|
+
phone: { raw: u, digits: f },
|
|
350
|
+
full_phone: K?.number ?? P,
|
|
351
|
+
required: r
|
|
352
|
+
};
|
|
353
|
+
} catch (B) {
|
|
354
|
+
return {
|
|
355
|
+
ok: !1,
|
|
356
|
+
reason: "parse_failed",
|
|
357
|
+
country: { iso2: r.iso2, dial_code: r.dial_code },
|
|
358
|
+
phone: { raw: u, digits: f },
|
|
359
|
+
full_phone: ae(r.dial_code, f),
|
|
360
|
+
required: r,
|
|
361
|
+
details: { error: B?.message ?? String(B) }
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
return {
|
|
366
|
+
countries: a,
|
|
367
|
+
isCountriesLoading: t,
|
|
368
|
+
getCountries: $,
|
|
369
|
+
searchCountries: C,
|
|
370
|
+
getCountryByValue: T,
|
|
371
|
+
getCountriesByDial: v,
|
|
372
|
+
getRequiredInfo: m,
|
|
373
|
+
validate: E
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
const Ue = "ali_ui_country_detected", ne = () => typeof window < "u" && typeof document < "u", ht = {
|
|
377
|
+
// Africa
|
|
378
|
+
"Africa/Cairo": "EG",
|
|
379
|
+
"Africa/Johannesburg": "ZA",
|
|
380
|
+
"Africa/Lagos": "NG",
|
|
381
|
+
"Africa/Casablanca": "MA",
|
|
382
|
+
"Africa/Algiers": "DZ",
|
|
383
|
+
"Africa/Nairobi": "KE",
|
|
384
|
+
"Africa/Accra": "GH",
|
|
385
|
+
"Africa/Tunis": "TN",
|
|
386
|
+
// Americas
|
|
387
|
+
"America/Argentina/Buenos_Aires": "AR",
|
|
388
|
+
"America/Bogota": "CO",
|
|
389
|
+
"America/Caracas": "VE",
|
|
390
|
+
"America/Chicago": "US",
|
|
391
|
+
"America/Denver": "US",
|
|
392
|
+
"America/Halifax": "CA",
|
|
393
|
+
"America/Lima": "PE",
|
|
394
|
+
"America/Los_Angeles": "US",
|
|
395
|
+
"America/Mexico_City": "MX",
|
|
396
|
+
"America/New_York": "US",
|
|
397
|
+
"America/Phoenix": "US",
|
|
398
|
+
"America/Sao_Paulo": "BR",
|
|
399
|
+
"America/Santiago": "CL",
|
|
400
|
+
"America/Toronto": "CA",
|
|
401
|
+
"America/Vancouver": "CA",
|
|
402
|
+
// Asia
|
|
403
|
+
"Asia/Baghdad": "IQ",
|
|
404
|
+
"Asia/Bahrain": "BH",
|
|
405
|
+
"Asia/Bangkok": "TH",
|
|
406
|
+
"Asia/Beirut": "LB",
|
|
407
|
+
"Asia/Damascus": "SY",
|
|
408
|
+
"Asia/Dhaka": "BD",
|
|
409
|
+
"Asia/Dubai": "AE",
|
|
410
|
+
"Asia/Hong_Kong": "HK",
|
|
411
|
+
"Asia/Jakarta": "ID",
|
|
412
|
+
"Asia/Jerusalem": "IL",
|
|
413
|
+
"Asia/Karachi": "PK",
|
|
414
|
+
"Asia/Kolkata": "IN",
|
|
415
|
+
"Asia/Kuala_Lumpur": "MY",
|
|
416
|
+
"Asia/Kuwait": "KW",
|
|
417
|
+
"Asia/Manila": "PH",
|
|
418
|
+
"Asia/Muscat": "OM",
|
|
419
|
+
"Asia/Qatar": "QA",
|
|
420
|
+
"Asia/Riyadh": "SA",
|
|
421
|
+
"Asia/Seoul": "KR",
|
|
422
|
+
"Asia/Shanghai": "CN",
|
|
423
|
+
"Asia/Singapore": "SG",
|
|
424
|
+
"Asia/Taipei": "TW",
|
|
425
|
+
"Asia/Tehran": "IR",
|
|
426
|
+
"Asia/Tokyo": "JP",
|
|
427
|
+
"Asia/Yangon": "MM",
|
|
428
|
+
// Europe
|
|
429
|
+
"Europe/Amsterdam": "NL",
|
|
430
|
+
"Europe/Athens": "GR",
|
|
431
|
+
"Europe/Belgrade": "RS",
|
|
432
|
+
"Europe/Berlin": "DE",
|
|
433
|
+
"Europe/Brussels": "BE",
|
|
434
|
+
"Europe/Bucharest": "RO",
|
|
435
|
+
"Europe/Budapest": "HU",
|
|
436
|
+
"Europe/Copenhagen": "DK",
|
|
437
|
+
"Europe/Dublin": "IE",
|
|
438
|
+
"Europe/Helsinki": "FI",
|
|
439
|
+
"Europe/Istanbul": "TR",
|
|
440
|
+
"Europe/Kyiv": "UA",
|
|
441
|
+
"Europe/Lisbon": "PT",
|
|
442
|
+
"Europe/London": "GB",
|
|
443
|
+
"Europe/Madrid": "ES",
|
|
444
|
+
"Europe/Moscow": "RU",
|
|
445
|
+
"Europe/Oslo": "NO",
|
|
446
|
+
"Europe/Paris": "FR",
|
|
447
|
+
"Europe/Prague": "CZ",
|
|
448
|
+
"Europe/Rome": "IT",
|
|
449
|
+
"Europe/Sofia": "BG",
|
|
450
|
+
"Europe/Stockholm": "SE",
|
|
451
|
+
"Europe/Vienna": "AT",
|
|
452
|
+
"Europe/Warsaw": "PL",
|
|
453
|
+
"Europe/Zurich": "CH",
|
|
454
|
+
// Oceania
|
|
455
|
+
"Australia/Brisbane": "AU",
|
|
456
|
+
"Australia/Melbourne": "AU",
|
|
457
|
+
"Australia/Perth": "AU",
|
|
458
|
+
"Australia/Sydney": "AU",
|
|
459
|
+
"Pacific/Auckland": "NZ",
|
|
460
|
+
"Pacific/Honolulu": "US"
|
|
461
|
+
};
|
|
462
|
+
function mt() {
|
|
463
|
+
if (!ne()) return null;
|
|
464
|
+
try {
|
|
465
|
+
const a = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
466
|
+
return ht[a] ?? null;
|
|
467
|
+
} catch {
|
|
468
|
+
return null;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
function vt() {
|
|
472
|
+
if (!ne()) return null;
|
|
473
|
+
try {
|
|
474
|
+
const t = (navigator.language ?? "").match(/^[a-z]{2,3}-([A-Z]{2})/);
|
|
475
|
+
return t ? t[1] : null;
|
|
476
|
+
} catch {
|
|
477
|
+
return null;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
async function yt(a, t) {
|
|
481
|
+
if (!ne() || typeof fetch != "function") return null;
|
|
482
|
+
const e = new AbortController(), n = setTimeout(() => e.abort(), t);
|
|
483
|
+
try {
|
|
484
|
+
const g = await fetch(a, { signal: e.signal, credentials: "omit" });
|
|
485
|
+
if (!g.ok) return null;
|
|
486
|
+
const c = await g.json(), b = (c.country_code ?? c.country ?? "").toString().toUpperCase();
|
|
487
|
+
return /^[A-Z]{2}$/.test(b) ? b : null;
|
|
488
|
+
} catch {
|
|
489
|
+
return null;
|
|
490
|
+
} finally {
|
|
491
|
+
clearTimeout(n);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
function bt() {
|
|
495
|
+
if (!ne()) return null;
|
|
496
|
+
try {
|
|
497
|
+
const a = sessionStorage.getItem(Ue);
|
|
498
|
+
return a && /^[A-Z]{2}$/.test(a) ? a : null;
|
|
499
|
+
} catch {
|
|
500
|
+
return null;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
function xe(a) {
|
|
504
|
+
if (ne())
|
|
505
|
+
try {
|
|
506
|
+
sessionStorage.setItem(Ue, a);
|
|
507
|
+
} catch {
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
async function Re(a = {}) {
|
|
511
|
+
const {
|
|
512
|
+
strategy: t = "auto",
|
|
513
|
+
ipEndpoint: e = "https://ipapi.co/json/",
|
|
514
|
+
defaultCountry: n = "US",
|
|
515
|
+
timeoutMs: g = 2e3,
|
|
516
|
+
cache: c = !0
|
|
517
|
+
} = a;
|
|
518
|
+
if (c) {
|
|
519
|
+
const C = bt();
|
|
520
|
+
if (C) return C;
|
|
521
|
+
}
|
|
522
|
+
if (t === "none")
|
|
523
|
+
return n.toUpperCase();
|
|
524
|
+
if (t === "auto") {
|
|
525
|
+
const C = await yt(e, g);
|
|
526
|
+
if (C)
|
|
527
|
+
return c && xe(C), C;
|
|
528
|
+
}
|
|
529
|
+
const $ = (mt() ?? vt() ?? n).toUpperCase();
|
|
530
|
+
return c && xe($), $;
|
|
531
|
+
}
|
|
532
|
+
function ma(a = {}) {
|
|
533
|
+
const t = L(null), e = L(!1);
|
|
534
|
+
async function n() {
|
|
535
|
+
e.value = !0;
|
|
536
|
+
try {
|
|
537
|
+
t.value = await Re(a);
|
|
538
|
+
} finally {
|
|
539
|
+
e.value = !1;
|
|
540
|
+
}
|
|
541
|
+
return t.value;
|
|
542
|
+
}
|
|
543
|
+
return me(() => {
|
|
544
|
+
n();
|
|
545
|
+
}), { country: t, isLoading: e, refresh: n };
|
|
546
|
+
}
|
|
547
|
+
const Ee = {
|
|
548
|
+
1: "US",
|
|
549
|
+
7: "RU",
|
|
550
|
+
20: "EG",
|
|
551
|
+
27: "ZA",
|
|
552
|
+
30: "GR",
|
|
553
|
+
31: "NL",
|
|
554
|
+
32: "BE",
|
|
555
|
+
33: "FR",
|
|
556
|
+
34: "ES",
|
|
557
|
+
39: "IT",
|
|
558
|
+
44: "GB",
|
|
559
|
+
46: "SE",
|
|
560
|
+
47: "NO",
|
|
561
|
+
48: "PL",
|
|
562
|
+
49: "DE",
|
|
563
|
+
52: "MX",
|
|
564
|
+
54: "AR",
|
|
565
|
+
55: "BR",
|
|
566
|
+
60: "MY",
|
|
567
|
+
61: "AU",
|
|
568
|
+
62: "ID",
|
|
569
|
+
63: "PH",
|
|
570
|
+
64: "NZ",
|
|
571
|
+
65: "SG",
|
|
572
|
+
66: "TH",
|
|
573
|
+
81: "JP",
|
|
574
|
+
82: "KR",
|
|
575
|
+
84: "VN",
|
|
576
|
+
86: "CN",
|
|
577
|
+
90: "TR",
|
|
578
|
+
91: "IN",
|
|
579
|
+
92: "PK",
|
|
580
|
+
95: "MM",
|
|
581
|
+
212: "MA",
|
|
582
|
+
213: "DZ",
|
|
583
|
+
216: "TN",
|
|
584
|
+
218: "LY",
|
|
585
|
+
234: "NG",
|
|
586
|
+
254: "KE",
|
|
587
|
+
352: "LU",
|
|
588
|
+
353: "IE",
|
|
589
|
+
358: "FI",
|
|
590
|
+
359: "BG",
|
|
591
|
+
380: "UA",
|
|
592
|
+
420: "CZ",
|
|
593
|
+
421: "SK",
|
|
594
|
+
961: "LB",
|
|
595
|
+
962: "JO",
|
|
596
|
+
963: "SY",
|
|
597
|
+
964: "IQ",
|
|
598
|
+
965: "KW",
|
|
599
|
+
966: "SA",
|
|
600
|
+
967: "YE",
|
|
601
|
+
968: "OM",
|
|
602
|
+
970: "PS",
|
|
603
|
+
971: "AE",
|
|
604
|
+
972: "IL",
|
|
605
|
+
973: "BH",
|
|
606
|
+
974: "QA"
|
|
607
|
+
}, _t = "ali_ui_country_recents_v1";
|
|
608
|
+
function wt() {
|
|
609
|
+
if (typeof window > "u") return [];
|
|
610
|
+
try {
|
|
611
|
+
const a = localStorage.getItem(_t);
|
|
612
|
+
if (!a) return [];
|
|
613
|
+
const t = JSON.parse(a);
|
|
614
|
+
return Array.isArray(t) ? t.filter((e) => typeof e == "string") : [];
|
|
615
|
+
} catch {
|
|
616
|
+
return [];
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
function Ct(a) {
|
|
620
|
+
const { getCountryByValue: t, getCountriesByDial: e } = a;
|
|
621
|
+
function n(b) {
|
|
622
|
+
const $ = String(b ?? "").trim();
|
|
623
|
+
if (!$) return "";
|
|
624
|
+
if (/^[A-Za-z]{2}$/.test($)) return $.toUpperCase();
|
|
625
|
+
const C = $.replace(/^\+/, "");
|
|
626
|
+
if (!/^\d+$/.test(C)) return "";
|
|
627
|
+
const T = e(C)[0];
|
|
628
|
+
return T ? T.value : Ee[C] ?? "";
|
|
629
|
+
}
|
|
630
|
+
function g(b) {
|
|
631
|
+
if (!b) return null;
|
|
632
|
+
const C = t(b)?.raw_data?.dial_digits ?? Object.entries(Ee).find(([, v]) => v === b)?.[0];
|
|
633
|
+
if (!C) return null;
|
|
634
|
+
const T = Number(C);
|
|
635
|
+
return Number.isFinite(T) ? T : null;
|
|
636
|
+
}
|
|
637
|
+
function c(b, $ = {}) {
|
|
638
|
+
if (!b) return null;
|
|
639
|
+
const { hintCountry: C, currentIso2: T } = $;
|
|
640
|
+
try {
|
|
641
|
+
const v = ie(`+${b}`);
|
|
642
|
+
if (v?.country && v.countryCallingCode) {
|
|
643
|
+
const m = t(v.country);
|
|
644
|
+
if (m)
|
|
645
|
+
return { country: m, nationalNumber: String(v.nationalNumber ?? "") };
|
|
646
|
+
}
|
|
647
|
+
} catch {
|
|
648
|
+
}
|
|
649
|
+
if (C && b.length >= 4)
|
|
650
|
+
try {
|
|
651
|
+
const v = ie(b, C);
|
|
652
|
+
if (v?.isValid()) {
|
|
653
|
+
const m = t(v.country || C);
|
|
654
|
+
if (m)
|
|
655
|
+
return { country: m, nationalNumber: String(v.nationalNumber ?? "") };
|
|
656
|
+
}
|
|
657
|
+
} catch {
|
|
658
|
+
}
|
|
659
|
+
for (let v = Math.min(3, b.length); v >= 1; v--) {
|
|
660
|
+
const m = b.slice(0, v), E = e(m);
|
|
661
|
+
if (!E.length) continue;
|
|
662
|
+
const p = b.slice(m.length);
|
|
663
|
+
if (E.length === 1) return { country: E[0], nationalNumber: p };
|
|
664
|
+
const _ = T ? E.find((u) => u.value === T.toUpperCase()) : null;
|
|
665
|
+
if (_) return { country: _, nationalNumber: p };
|
|
666
|
+
const r = wt().map((u) => E.find((f) => f.value === u)).find((u) => !!u);
|
|
667
|
+
return r ? { country: r, nationalNumber: p } : { country: E[0], nationalNumber: p };
|
|
668
|
+
}
|
|
669
|
+
return null;
|
|
670
|
+
}
|
|
671
|
+
return {
|
|
672
|
+
resolveCountryIdentifier: n,
|
|
673
|
+
dialNumberFor: g,
|
|
674
|
+
matchLeadingDialCode: c
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
function At(a) {
|
|
678
|
+
const t = L(!1), e = L(!0), n = L(!1), g = at(() => {
|
|
679
|
+
t.value = !1, e.value = !0, a.onSettle?.();
|
|
680
|
+
}, a.debounceMs);
|
|
681
|
+
function c() {
|
|
682
|
+
t.value = !0, e.value = !1, g();
|
|
683
|
+
}
|
|
684
|
+
function b() {
|
|
685
|
+
n.value = !0;
|
|
686
|
+
}
|
|
687
|
+
function $() {
|
|
688
|
+
t.value = !1, e.value = !0, n.value = !1;
|
|
689
|
+
}
|
|
690
|
+
return {
|
|
691
|
+
isDetecting: ce(t),
|
|
692
|
+
hasFinishedTyping: ce(e),
|
|
693
|
+
detectionAttempted: ce(n),
|
|
694
|
+
markTyping: c,
|
|
695
|
+
markDetectionAttempt: b,
|
|
696
|
+
reset: $
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
function kt(a, t, e) {
|
|
700
|
+
const n = k(
|
|
701
|
+
() => t.selectedIso2.value ? a.getRequiredInfo({ iso2: t.selectedIso2.value }, e.locale()) : null
|
|
702
|
+
), g = k(
|
|
703
|
+
() => a.validate({
|
|
704
|
+
country: t.selectedIso2.value ? { iso2: t.selectedIso2.value } : null,
|
|
705
|
+
phone: t.phone.value ?? "",
|
|
706
|
+
locale: e.locale()
|
|
707
|
+
})
|
|
708
|
+
), c = k(() => t.phone.value ? g.value.ok ? "valid" : "error" : "idle"), b = k(
|
|
709
|
+
() => t.hasFinishedTyping.value ? c.value : "idle"
|
|
710
|
+
), $ = k(() => {
|
|
711
|
+
const m = g.value;
|
|
712
|
+
return m.ok || !m.reason || !t.phone.value ? null : e.errorMessages()?.[m.reason] ?? t.messages.value.errorMessages[m.reason];
|
|
713
|
+
}), C = k(
|
|
714
|
+
() => !!(e.showValidation() && t.hasFinishedTyping.value && $.value)
|
|
715
|
+
), T = k(
|
|
716
|
+
() => !C.value && !t.phone.value && !!n.value?.format_hint
|
|
717
|
+
), v = k(() => t.selectedIso2.value ? a.getCountryByValue(t.selectedIso2.value)?.raw_data.dial_code ?? null : null);
|
|
718
|
+
return {
|
|
719
|
+
validation: g,
|
|
720
|
+
required: n,
|
|
721
|
+
validationState: c,
|
|
722
|
+
visibleValidationState: b,
|
|
723
|
+
errorMessage: $,
|
|
724
|
+
showError: C,
|
|
725
|
+
showHint: T,
|
|
726
|
+
selectedDialCode: v
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
const St = rt(
|
|
730
|
+
// items-center (not items-stretch) so #prefix/#suffix icons centre vertically without distortion.
|
|
731
|
+
// The country trigger button and the input element both carry `h-full`, so they still fill the
|
|
732
|
+
// field height regardless of this setting.
|
|
733
|
+
"border-input bg-background ring-offset-background focus-within:ring-ring flex w-full items-center overflow-hidden rounded-md border shadow-sm transition-colors focus-within:ring-1 has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50",
|
|
734
|
+
{
|
|
735
|
+
variants: {
|
|
736
|
+
size: {
|
|
737
|
+
xs: `${te.xs} ${q.xs}`,
|
|
738
|
+
sm: `${te.sm} ${q.sm}`,
|
|
739
|
+
md: `${te.md} ${q.md}`,
|
|
740
|
+
lg: `${te.lg} ${q.lg}`,
|
|
741
|
+
xl: `${te.xl} ${q.xl}`
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
defaultVariants: { size: "md" }
|
|
745
|
+
}
|
|
746
|
+
), ze = {
|
|
747
|
+
missing_country: "Please select a country.",
|
|
748
|
+
country_not_supported: "This country is not supported.",
|
|
749
|
+
phone_has_non_digits: "Phone number can only contain digits.",
|
|
750
|
+
too_short: "Phone number is too short.",
|
|
751
|
+
too_long: "Phone number is too long.",
|
|
752
|
+
invalid_phone: "Phone number is invalid.",
|
|
753
|
+
parse_failed: "Could not parse phone number."
|
|
754
|
+
}, Ie = {
|
|
755
|
+
searchPlaceholder: "Search country or +code…",
|
|
756
|
+
emptyText: "No countries found.",
|
|
757
|
+
loadingText: "Loading countries…",
|
|
758
|
+
suggestedLabel: "Suggested",
|
|
759
|
+
allCountriesLabel: "All countries",
|
|
760
|
+
errorMessages: ze,
|
|
761
|
+
countryLabel: "Country",
|
|
762
|
+
selectCountryLabel: "Select country",
|
|
763
|
+
phoneInputLabel: "Phone number"
|
|
764
|
+
};
|
|
765
|
+
function $t(a) {
|
|
766
|
+
return a ? {
|
|
767
|
+
...Ie,
|
|
768
|
+
...a,
|
|
769
|
+
errorMessages: { ...ze, ...a.errorMessages }
|
|
770
|
+
} : Ie;
|
|
771
|
+
}
|
|
772
|
+
function xt(a, t = 40) {
|
|
773
|
+
return `https://flagcdn.com/w${t}/${a.toLowerCase()}.png`;
|
|
774
|
+
}
|
|
775
|
+
const Et = ["src", "alt"], It = ["aria-label"], ge = /* @__PURE__ */ ve({
|
|
776
|
+
__name: "ACountryFlag",
|
|
777
|
+
props: {
|
|
778
|
+
iso2: {},
|
|
779
|
+
width: { default: 40 },
|
|
780
|
+
src: {},
|
|
781
|
+
flagUrl: {},
|
|
782
|
+
alt: {},
|
|
783
|
+
class: { type: [Boolean, null, String, Object, Array] }
|
|
784
|
+
},
|
|
785
|
+
setup(a) {
|
|
786
|
+
const t = a, e = k(() => t.src ? t.src : t.iso2 ? (t.flagUrl ?? xt)(t.iso2, t.width) : null), n = L(!1);
|
|
787
|
+
re(e, () => {
|
|
788
|
+
n.value = !1;
|
|
789
|
+
});
|
|
790
|
+
const g = k(() => (t.iso2 ?? "").slice(0, 2).toUpperCase());
|
|
791
|
+
return (c, b) => e.value && !n.value ? (M(), O("img", {
|
|
792
|
+
key: 0,
|
|
793
|
+
src: e.value,
|
|
794
|
+
alt: t.alt ?? `${t.iso2} flag`,
|
|
795
|
+
loading: "lazy",
|
|
796
|
+
"data-slot": "country-flag",
|
|
797
|
+
class: Z(o(V)("ring-border/40 inline-block h-4 w-6 rounded-sm object-cover ring-1", t.class)),
|
|
798
|
+
onError: b[0] || (b[0] = ($) => n.value = !0)
|
|
799
|
+
}, null, 42, Et)) : g.value ? (M(), O("span", {
|
|
800
|
+
key: 1,
|
|
801
|
+
"data-slot": "country-flag-fallback",
|
|
802
|
+
"aria-label": t.alt ?? `${t.iso2} flag`,
|
|
803
|
+
class: Z(
|
|
804
|
+
o(V)(
|
|
805
|
+
"ring-border/40 bg-muted text-muted-foreground inline-flex h-4 w-6 items-center justify-center rounded-sm text-[8px] font-semibold leading-none tracking-tight ring-1",
|
|
806
|
+
t.class
|
|
807
|
+
)
|
|
808
|
+
)
|
|
809
|
+
}, z(g.value), 11, It)) : y(c.$slots, "empty", { key: 2 }, () => [
|
|
810
|
+
A("span", {
|
|
811
|
+
"data-slot": "country-flag-empty",
|
|
812
|
+
class: Z(o(V)("bg-muted inline-block h-4 w-6 rounded-sm", t.class))
|
|
813
|
+
}, null, 2)
|
|
814
|
+
]);
|
|
815
|
+
}
|
|
816
|
+
}), Lt = ["disabled", "data-state", "aria-label"], Tt = { class: "border-border/70 border-b p-1.5" }, Dt = { class: "bg-muted/40 ring-border/70 focus-within:ring-ring/50 relative flex items-center rounded-md ring-1 transition-shadow" }, Bt = ["placeholder"], Mt = {
|
|
817
|
+
key: 0,
|
|
818
|
+
class: "bg-background text-muted-foreground border-border absolute top-1/2 end-2 hidden -translate-y-1/2 items-center gap-0.5 rounded border px-1.5 py-0.5 font-mono text-[10px] tracking-tight md:inline-flex"
|
|
819
|
+
}, Nt = {
|
|
820
|
+
key: 1,
|
|
821
|
+
class: "bg-background text-muted-foreground border-border absolute top-1/2 end-2 hidden -translate-y-1/2 rounded border px-1.5 py-0.5 font-mono text-[10px] tracking-tight md:inline-block"
|
|
822
|
+
}, Pt = { class: "flex-1 overflow-y-auto" }, Ut = { class: "text-muted-foreground p-4 text-center text-sm" }, Rt = { class: "text-muted-foreground p-4 text-center text-sm" }, zt = {
|
|
823
|
+
key: 0,
|
|
824
|
+
"data-slot": "country-select-group",
|
|
825
|
+
"data-group": "suggested"
|
|
826
|
+
}, Ot = { class: "text-muted-foreground bg-popover sticky top-0 z-10 px-3 py-1.5 text-[10px] font-medium tracking-wider uppercase" }, Ft = ["aria-label"], Vt = ["aria-selected", "aria-disabled"], Kt = ["disabled", "data-selected", "onClick"], Gt = { class: "flex-1 truncate" }, Ht = { class: "text-muted-foreground tabular-nums" }, Zt = {
|
|
827
|
+
"data-slot": "country-select-group",
|
|
828
|
+
"data-group": "all"
|
|
829
|
+
}, jt = { class: "text-muted-foreground bg-popover sticky top-0 z-10 px-3 py-1.5 text-[10px] font-medium tracking-wider uppercase" }, Jt = ["aria-label"], Yt = ["aria-selected", "aria-disabled"], qt = ["disabled", "data-selected", "onClick"], Wt = { class: "flex-1 truncate" }, Qt = { class: "text-muted-foreground tabular-nums" }, Le = "ali_ui_country_recents_v1", Xt = /* @__PURE__ */ ve({
|
|
830
|
+
__name: "ACountrySelect",
|
|
831
|
+
props: /* @__PURE__ */ De({
|
|
832
|
+
class: { type: [Boolean, null, String, Object, Array] },
|
|
833
|
+
triggerClass: { type: [Boolean, null, String, Object, Array] },
|
|
834
|
+
contentClass: { type: [Boolean, null, String, Object, Array] },
|
|
835
|
+
popoverClass: { type: [Boolean, null, String, Object, Array] },
|
|
836
|
+
drawerClass: { type: [Boolean, null, String, Object, Array] },
|
|
837
|
+
searchPlaceholder: { default: "Search country or +code…" },
|
|
838
|
+
emptyText: { default: "No countries found." },
|
|
839
|
+
loadingText: { default: "Loading countries…" },
|
|
840
|
+
suggestedLabel: { default: "Suggested" },
|
|
841
|
+
allCountriesLabel: { default: "All countries" },
|
|
842
|
+
allowedDialCodes: {},
|
|
843
|
+
disabled: { type: Boolean },
|
|
844
|
+
size: { default: Me },
|
|
845
|
+
suggestedLimit: { default: 4 },
|
|
846
|
+
maxResults: { default: 80 },
|
|
847
|
+
flagUrl: {},
|
|
848
|
+
searcher: {},
|
|
849
|
+
countries: {},
|
|
850
|
+
kbdOpen: { default: "⌘K" },
|
|
851
|
+
kbdClose: { default: "Esc" },
|
|
852
|
+
locale: {},
|
|
853
|
+
countryLabel: { default: "Country" },
|
|
854
|
+
selectCountryLabel: { default: "Select country" },
|
|
855
|
+
scrollLock: {}
|
|
856
|
+
}, {
|
|
857
|
+
selected: { default: "" },
|
|
858
|
+
selectedModifiers: {}
|
|
859
|
+
}),
|
|
860
|
+
emits: ["update:selected"],
|
|
861
|
+
setup(a, { expose: t }) {
|
|
862
|
+
const e = a, n = k(
|
|
863
|
+
() => `${Be[e.size]} ${q[e.size]}`
|
|
864
|
+
), g = pe(a, "selected"), {
|
|
865
|
+
countries: c,
|
|
866
|
+
isCountriesLoading: b,
|
|
867
|
+
getCountries: $,
|
|
868
|
+
searchCountries: C,
|
|
869
|
+
getCountryByValue: T
|
|
870
|
+
} = Pe(), v = L(!1), m = L("");
|
|
871
|
+
$();
|
|
872
|
+
const E = k(
|
|
873
|
+
() => e.countries && e.countries.length ? e.countries : pt(c.value, e.locale)
|
|
874
|
+
), p = k(
|
|
875
|
+
() => new Map(E.value.map((s) => [s.value, s]))
|
|
876
|
+
);
|
|
877
|
+
function _(s) {
|
|
878
|
+
return s ? p.value.get(s) ?? T(s) : null;
|
|
879
|
+
}
|
|
880
|
+
const d = L([]);
|
|
881
|
+
function r() {
|
|
882
|
+
if (!(typeof window > "u"))
|
|
883
|
+
try {
|
|
884
|
+
const s = localStorage.getItem(Le);
|
|
885
|
+
if (!s) return;
|
|
886
|
+
const h = JSON.parse(s);
|
|
887
|
+
if (!Array.isArray(h)) return;
|
|
888
|
+
d.value = h.filter((l) => typeof l == "string").slice(0, 8);
|
|
889
|
+
} catch {
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
function u(s) {
|
|
893
|
+
if (typeof window > "u" || !s) return;
|
|
894
|
+
const h = [s, ...d.value.filter((l) => l !== s)].slice(0, 8);
|
|
895
|
+
d.value = h;
|
|
896
|
+
try {
|
|
897
|
+
localStorage.setItem(Le, JSON.stringify(h));
|
|
898
|
+
} catch {
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
me(r);
|
|
902
|
+
const f = k(() => m.value.trim().length > 0);
|
|
903
|
+
function I(s, h) {
|
|
904
|
+
return h.search_key.includes(s.toLowerCase());
|
|
905
|
+
}
|
|
906
|
+
const F = k(() => {
|
|
907
|
+
if (!f.value) return [];
|
|
908
|
+
if (!e.countries && !e.searcher && !e.locale)
|
|
909
|
+
return C(m.value, e.maxResults);
|
|
910
|
+
const s = m.value.trim(), h = e.searcher ?? I, l = [];
|
|
911
|
+
for (const U of E.value)
|
|
912
|
+
if (h(s, U) && (l.push(U), l.length >= e.maxResults))
|
|
913
|
+
break;
|
|
914
|
+
return l;
|
|
915
|
+
}), D = k(() => {
|
|
916
|
+
if (f.value) return [];
|
|
917
|
+
const s = /* @__PURE__ */ new Set(), h = [], l = (H) => {
|
|
918
|
+
if (!H || s.has(H)) return;
|
|
919
|
+
const J = _(H);
|
|
920
|
+
J && (s.add(H), h.push(J));
|
|
921
|
+
};
|
|
922
|
+
l(g.value);
|
|
923
|
+
const U = e.allowedDialCodes;
|
|
924
|
+
if (Array.isArray(U) && U.length > 0) {
|
|
925
|
+
for (const H of E.value)
|
|
926
|
+
U.includes(H.raw_data.dial_digits) && l(H.value);
|
|
927
|
+
return h;
|
|
928
|
+
}
|
|
929
|
+
for (const H of d.value)
|
|
930
|
+
if (l(H), h.length >= e.suggestedLimit) break;
|
|
931
|
+
return h.slice(0, e.suggestedLimit);
|
|
932
|
+
}), P = k(() => f.value ? [] : E.value), B = k(() => _(g.value));
|
|
933
|
+
function K(s) {
|
|
934
|
+
const h = e.allowedDialCodes;
|
|
935
|
+
return !h || h.length === 0 ? !0 : h.includes(s.raw_data.dial_digits);
|
|
936
|
+
}
|
|
937
|
+
function G(s) {
|
|
938
|
+
K(s) && (g.value = s.value, u(s.value), v.value = !1);
|
|
939
|
+
}
|
|
940
|
+
return re(v, (s) => {
|
|
941
|
+
s || (m.value = "");
|
|
942
|
+
}), t({
|
|
943
|
+
open: v,
|
|
944
|
+
setOpen: (s) => v.value = s,
|
|
945
|
+
search: m,
|
|
946
|
+
setSearch: (s) => m.value = s,
|
|
947
|
+
selectedCountry: B,
|
|
948
|
+
selectCountry: G,
|
|
949
|
+
countries: E,
|
|
950
|
+
recents: d
|
|
951
|
+
}), (s, h) => (M(), Te(o(nt), {
|
|
952
|
+
open: v.value,
|
|
953
|
+
"onUpdate:open": h[1] || (h[1] = (l) => v.value = l),
|
|
954
|
+
"scroll-lock": e.scrollLock
|
|
955
|
+
}, {
|
|
956
|
+
default: R(() => [
|
|
957
|
+
N(o(lt), { "as-child": "" }, {
|
|
958
|
+
default: R(() => [
|
|
959
|
+
y(s.$slots, "trigger", {
|
|
960
|
+
selectedCountry: B.value,
|
|
961
|
+
open: v.value,
|
|
962
|
+
sizeClasses: n.value
|
|
963
|
+
}, () => [
|
|
964
|
+
A("button", {
|
|
965
|
+
type: "button",
|
|
966
|
+
disabled: e.disabled,
|
|
967
|
+
"data-slot": "country-select-trigger",
|
|
968
|
+
"data-state": v.value ? "open" : "closed",
|
|
969
|
+
class: Z(
|
|
970
|
+
o(V)(
|
|
971
|
+
"bg-transparent hover:bg-muted focus-visible:bg-muted data-[state=open]:bg-muted focus-visible:ring-ring inline-flex h-full shrink-0 items-center gap-1.5 transition-colors focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
972
|
+
n.value,
|
|
973
|
+
e.triggerClass
|
|
974
|
+
)
|
|
975
|
+
),
|
|
976
|
+
"aria-label": B.value ? `${e.countryLabel}: ${B.value.raw_data.name}` : e.selectCountryLabel
|
|
977
|
+
}, [
|
|
978
|
+
B.value ? y(s.$slots, "flag", {
|
|
979
|
+
key: 0,
|
|
980
|
+
country: B.value,
|
|
981
|
+
context: "trigger"
|
|
982
|
+
}, () => [
|
|
983
|
+
N(ge, {
|
|
984
|
+
iso2: B.value.raw_data.iso2,
|
|
985
|
+
src: B.value.raw_data.flag,
|
|
986
|
+
"flag-url": e.flagUrl
|
|
987
|
+
}, null, 8, ["iso2", "src", "flag-url"])
|
|
988
|
+
]) : j("", !0),
|
|
989
|
+
y(s.$slots, "chevron", { open: v.value }, () => [
|
|
990
|
+
N(o(Je), {
|
|
991
|
+
class: Z(["text-muted-foreground size-3.5 shrink-0 transition-transform duration-200", v.value && "rotate-180"])
|
|
992
|
+
}, null, 8, ["class"])
|
|
993
|
+
])
|
|
994
|
+
], 10, Lt)
|
|
995
|
+
])
|
|
996
|
+
]),
|
|
997
|
+
_: 3
|
|
998
|
+
}),
|
|
999
|
+
N(o(ot), {
|
|
1000
|
+
align: "end",
|
|
1001
|
+
"side-offset": 6,
|
|
1002
|
+
class: Z(o(V)("flex flex-col overflow-hidden p-0", e.contentClass)),
|
|
1003
|
+
"popover-class": o(V)(
|
|
1004
|
+
"w-[min(20rem,calc(100vw-2rem))] max-h-[min(22rem,var(--reka-popover-content-available-height))]",
|
|
1005
|
+
e.popoverClass
|
|
1006
|
+
),
|
|
1007
|
+
"drawer-class": o(V)("max-h-[80vh] pb-4", e.drawerClass)
|
|
1008
|
+
}, {
|
|
1009
|
+
default: R(() => [
|
|
1010
|
+
y(s.$slots, "search", {
|
|
1011
|
+
value: m.value,
|
|
1012
|
+
setValue: (l) => m.value = l,
|
|
1013
|
+
isSearching: f.value
|
|
1014
|
+
}, () => [
|
|
1015
|
+
A("div", Tt, [
|
|
1016
|
+
A("div", Dt, [
|
|
1017
|
+
y(s.$slots, "search-icon", {}, () => [
|
|
1018
|
+
N(o(Ye), { class: "text-muted-foreground absolute top-1/2 start-2.5 size-3.5 -translate-y-1/2" })
|
|
1019
|
+
]),
|
|
1020
|
+
Ge(A("input", {
|
|
1021
|
+
"onUpdate:modelValue": h[0] || (h[0] = (l) => m.value = l),
|
|
1022
|
+
type: "text",
|
|
1023
|
+
"data-slot": "country-select-search",
|
|
1024
|
+
placeholder: e.searchPlaceholder,
|
|
1025
|
+
class: "placeholder:text-muted-foreground h-10 w-full bg-transparent pe-14 ps-8 text-sm outline-none"
|
|
1026
|
+
}, null, 8, Bt), [
|
|
1027
|
+
[He, m.value]
|
|
1028
|
+
]),
|
|
1029
|
+
!f.value && e.kbdOpen ? (M(), O("kbd", Mt, z(e.kbdOpen), 1)) : f.value && e.kbdClose ? (M(), O("kbd", Nt, z(e.kbdClose), 1)) : j("", !0)
|
|
1030
|
+
])
|
|
1031
|
+
])
|
|
1032
|
+
]),
|
|
1033
|
+
A("div", Pt, [
|
|
1034
|
+
o(b) && E.value.length === 0 ? y(s.$slots, "loading", { key: 0 }, () => [
|
|
1035
|
+
A("div", Ut, z(e.loadingText), 1)
|
|
1036
|
+
]) : f.value && F.value.length === 0 ? y(s.$slots, "empty", {
|
|
1037
|
+
key: 1,
|
|
1038
|
+
query: m.value
|
|
1039
|
+
}, () => [
|
|
1040
|
+
A("div", Rt, z(e.emptyText), 1)
|
|
1041
|
+
]) : (M(), O(de, { key: 2 }, [
|
|
1042
|
+
D.value.length > 0 ? (M(), O("section", zt, [
|
|
1043
|
+
y(s.$slots, "group-header", {
|
|
1044
|
+
label: e.suggestedLabel,
|
|
1045
|
+
group: "suggested"
|
|
1046
|
+
}, () => [
|
|
1047
|
+
A("header", Ot, z(e.suggestedLabel), 1)
|
|
1048
|
+
]),
|
|
1049
|
+
A("ul", {
|
|
1050
|
+
role: "listbox",
|
|
1051
|
+
"aria-label": e.suggestedLabel,
|
|
1052
|
+
class: "pb-1"
|
|
1053
|
+
}, [
|
|
1054
|
+
(M(!0), O(de, null, Ce(D.value, (l) => (M(), O("li", {
|
|
1055
|
+
key: `s-${l.value}`,
|
|
1056
|
+
role: "option",
|
|
1057
|
+
"aria-selected": l.value === g.value,
|
|
1058
|
+
"aria-disabled": !K(l)
|
|
1059
|
+
}, [
|
|
1060
|
+
y(s.$slots, "item", {
|
|
1061
|
+
country: l,
|
|
1062
|
+
selected: l.value === g.value,
|
|
1063
|
+
disabled: !K(l),
|
|
1064
|
+
select: () => G(l)
|
|
1065
|
+
}, () => [
|
|
1066
|
+
A("button", {
|
|
1067
|
+
type: "button",
|
|
1068
|
+
disabled: !K(l),
|
|
1069
|
+
"data-slot": "country-select-item",
|
|
1070
|
+
"data-selected": l.value === g.value ? "" : void 0,
|
|
1071
|
+
class: "hover:bg-muted/60 focus-visible:bg-muted/60 data-[selected]:bg-muted flex w-full items-center gap-3 px-3 py-2 text-left text-sm transition-colors focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent",
|
|
1072
|
+
onClick: (U) => G(l)
|
|
1073
|
+
}, [
|
|
1074
|
+
y(s.$slots, "flag", {
|
|
1075
|
+
country: l,
|
|
1076
|
+
context: "item"
|
|
1077
|
+
}, () => [
|
|
1078
|
+
N(ge, {
|
|
1079
|
+
iso2: l.raw_data.iso2,
|
|
1080
|
+
src: l.raw_data.flag,
|
|
1081
|
+
"flag-url": e.flagUrl
|
|
1082
|
+
}, null, 8, ["iso2", "src", "flag-url"])
|
|
1083
|
+
]),
|
|
1084
|
+
A("span", Gt, z(l.raw_data.name), 1),
|
|
1085
|
+
A("span", Ht, z(l.raw_data.dial_code), 1),
|
|
1086
|
+
l.value === g.value ? y(s.$slots, "item-check", {
|
|
1087
|
+
key: 0,
|
|
1088
|
+
country: l
|
|
1089
|
+
}, () => [
|
|
1090
|
+
N(o(Ae), { class: "text-foreground size-3.5 shrink-0" })
|
|
1091
|
+
]) : j("", !0)
|
|
1092
|
+
], 8, Kt)
|
|
1093
|
+
])
|
|
1094
|
+
], 8, Vt))), 128))
|
|
1095
|
+
], 8, Ft)
|
|
1096
|
+
])) : j("", !0),
|
|
1097
|
+
A("section", Zt, [
|
|
1098
|
+
!f.value && P.value.length > 0 ? y(s.$slots, "group-header", {
|
|
1099
|
+
key: 0,
|
|
1100
|
+
label: e.allCountriesLabel,
|
|
1101
|
+
group: "all"
|
|
1102
|
+
}, () => [
|
|
1103
|
+
A("header", jt, z(e.allCountriesLabel), 1)
|
|
1104
|
+
]) : j("", !0),
|
|
1105
|
+
A("ul", {
|
|
1106
|
+
role: "listbox",
|
|
1107
|
+
"aria-label": f.value ? e.searchPlaceholder : e.allCountriesLabel,
|
|
1108
|
+
class: "pb-1"
|
|
1109
|
+
}, [
|
|
1110
|
+
(M(!0), O(de, null, Ce(f.value ? F.value : P.value, (l) => (M(), O("li", {
|
|
1111
|
+
key: l.value,
|
|
1112
|
+
role: "option",
|
|
1113
|
+
"aria-selected": l.value === g.value,
|
|
1114
|
+
"aria-disabled": !K(l)
|
|
1115
|
+
}, [
|
|
1116
|
+
y(s.$slots, "item", {
|
|
1117
|
+
country: l,
|
|
1118
|
+
selected: l.value === g.value,
|
|
1119
|
+
disabled: !K(l),
|
|
1120
|
+
select: () => G(l)
|
|
1121
|
+
}, () => [
|
|
1122
|
+
A("button", {
|
|
1123
|
+
type: "button",
|
|
1124
|
+
disabled: !K(l),
|
|
1125
|
+
"data-slot": "country-select-item",
|
|
1126
|
+
"data-selected": l.value === g.value ? "" : void 0,
|
|
1127
|
+
class: "hover:bg-muted/60 focus-visible:bg-muted/60 data-[selected]:bg-muted flex w-full items-center gap-3 px-3 py-2 text-left text-sm transition-colors focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-transparent",
|
|
1128
|
+
onClick: (U) => G(l)
|
|
1129
|
+
}, [
|
|
1130
|
+
y(s.$slots, "flag", {
|
|
1131
|
+
country: l,
|
|
1132
|
+
context: "item"
|
|
1133
|
+
}, () => [
|
|
1134
|
+
N(ge, {
|
|
1135
|
+
iso2: l.raw_data.iso2,
|
|
1136
|
+
src: l.raw_data.flag,
|
|
1137
|
+
"flag-url": e.flagUrl
|
|
1138
|
+
}, null, 8, ["iso2", "src", "flag-url"])
|
|
1139
|
+
]),
|
|
1140
|
+
A("span", Wt, z(l.raw_data.name), 1),
|
|
1141
|
+
A("span", Qt, z(l.raw_data.dial_code), 1),
|
|
1142
|
+
l.value === g.value ? y(s.$slots, "item-check", {
|
|
1143
|
+
key: 0,
|
|
1144
|
+
country: l
|
|
1145
|
+
}, () => [
|
|
1146
|
+
N(o(Ae), { class: "text-foreground size-3.5 shrink-0" })
|
|
1147
|
+
]) : j("", !0)
|
|
1148
|
+
], 8, qt)
|
|
1149
|
+
])
|
|
1150
|
+
], 8, Yt))), 128))
|
|
1151
|
+
], 8, Jt)
|
|
1152
|
+
])
|
|
1153
|
+
], 64))
|
|
1154
|
+
])
|
|
1155
|
+
]),
|
|
1156
|
+
_: 3
|
|
1157
|
+
}, 8, ["class", "popover-class", "drawer-class"])
|
|
1158
|
+
]),
|
|
1159
|
+
_: 3
|
|
1160
|
+
}, 8, ["open", "scroll-lock"]));
|
|
1161
|
+
}
|
|
1162
|
+
}), ea = ["dir"], ta = {
|
|
1163
|
+
class: "flex items-center gap-2",
|
|
1164
|
+
dir: "ltr"
|
|
1165
|
+
}, aa = ["data-state"], ra = ["value", "disabled", "placeholder", "aria-label", "aria-invalid", "aria-describedby"], na = {
|
|
1166
|
+
key: 0,
|
|
1167
|
+
class: "text-muted-foreground inline-flex h-full shrink-0 items-center px-2",
|
|
1168
|
+
"aria-hidden": "true",
|
|
1169
|
+
"data-slot": "tell-input-detecting"
|
|
1170
|
+
}, la = {
|
|
1171
|
+
key: 0,
|
|
1172
|
+
class: "inline-flex h-full shrink-0 items-center",
|
|
1173
|
+
"data-slot": "tell-input-country-wrapper"
|
|
1174
|
+
}, oa = ["id"], va = /* @__PURE__ */ ve({
|
|
1175
|
+
__name: "ATellInput",
|
|
1176
|
+
props: /* @__PURE__ */ De({
|
|
1177
|
+
flagUrl: {},
|
|
1178
|
+
searcher: {},
|
|
1179
|
+
countries: {},
|
|
1180
|
+
detector: {},
|
|
1181
|
+
contentClass: {},
|
|
1182
|
+
popoverClass: {},
|
|
1183
|
+
drawerClass: {},
|
|
1184
|
+
inputClass: {},
|
|
1185
|
+
fieldClass: {},
|
|
1186
|
+
hintClass: {},
|
|
1187
|
+
errorClass: {},
|
|
1188
|
+
scrollLock: {},
|
|
1189
|
+
class: { type: [Boolean, null, String, Object, Array] },
|
|
1190
|
+
placeholder: { default: "Phone number" },
|
|
1191
|
+
disabled: { type: Boolean },
|
|
1192
|
+
loading: { type: Boolean },
|
|
1193
|
+
size: { default: Me },
|
|
1194
|
+
dir: {},
|
|
1195
|
+
locale: {},
|
|
1196
|
+
messages: {},
|
|
1197
|
+
allowedDialCodes: {},
|
|
1198
|
+
showValidation: { type: Boolean },
|
|
1199
|
+
showValidationIcon: { type: Boolean, default: !1 },
|
|
1200
|
+
detectCountry: { default: "auto" },
|
|
1201
|
+
defaultCountry: { default: "" },
|
|
1202
|
+
ipEndpoint: { default: "https://ipapi.co/json/" },
|
|
1203
|
+
searchPlaceholder: {},
|
|
1204
|
+
emptyText: {},
|
|
1205
|
+
loadingText: {},
|
|
1206
|
+
errorMessages: {},
|
|
1207
|
+
detectFromInput: { type: Boolean, default: !0 },
|
|
1208
|
+
detectDebounceMs: { default: 800 }
|
|
1209
|
+
}, {
|
|
1210
|
+
phone: { default: "" },
|
|
1211
|
+
phoneModifiers: {},
|
|
1212
|
+
country: { default: null },
|
|
1213
|
+
countryModifiers: {}
|
|
1214
|
+
}),
|
|
1215
|
+
emits: ["update:phone", "update:country"],
|
|
1216
|
+
setup(a, { expose: t }) {
|
|
1217
|
+
const e = a, n = pe(a, "phone"), g = pe(a, "country"), c = L(""), { getCountries: b, validate: $, getRequiredInfo: C, getCountryByValue: T, getCountriesByDial: v } = Pe(), { resolveCountryIdentifier: m, dialNumberFor: E, matchLeadingDialCode: p } = Ct({
|
|
1218
|
+
getCountryByValue: T,
|
|
1219
|
+
getCountriesByDial: v
|
|
1220
|
+
});
|
|
1221
|
+
b();
|
|
1222
|
+
const _ = L(!1), d = L(!1), r = L(m(e.defaultCountry));
|
|
1223
|
+
function u(i) {
|
|
1224
|
+
return p(i, {
|
|
1225
|
+
hintCountry: r.value,
|
|
1226
|
+
currentIso2: c.value
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
const f = At({
|
|
1230
|
+
debounceMs: k(() => Math.max(0, e.detectDebounceMs)),
|
|
1231
|
+
onSettle: () => {
|
|
1232
|
+
if (!e.detectFromInput || _.value || c.value) return;
|
|
1233
|
+
const i = n.value;
|
|
1234
|
+
if (!i) return;
|
|
1235
|
+
f.markDetectionAttempt();
|
|
1236
|
+
const w = u(i);
|
|
1237
|
+
w && (d.value = !0, c.value = w.country.value, n.value = w.nationalNumber);
|
|
1238
|
+
}
|
|
1239
|
+
}), { isDetecting: I, hasFinishedTyping: F, detectionAttempted: D } = f;
|
|
1240
|
+
me(async () => {
|
|
1241
|
+
if (c.value) return;
|
|
1242
|
+
if (e.defaultCountry) {
|
|
1243
|
+
const Y = m(e.defaultCountry);
|
|
1244
|
+
if (Y) {
|
|
1245
|
+
r.value = Y, d.value = !0, c.value = Y;
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
const i = {
|
|
1250
|
+
strategy: e.detectCountry,
|
|
1251
|
+
ipEndpoint: e.ipEndpoint,
|
|
1252
|
+
defaultCountry: ""
|
|
1253
|
+
};
|
|
1254
|
+
let w;
|
|
1255
|
+
if (e.detector)
|
|
1256
|
+
try {
|
|
1257
|
+
w = await e.detector(i);
|
|
1258
|
+
} catch {
|
|
1259
|
+
w = null;
|
|
1260
|
+
}
|
|
1261
|
+
w || (w = await Re(i));
|
|
1262
|
+
const S = w ? w.toUpperCase() : "";
|
|
1263
|
+
if (e.detectFromInput) {
|
|
1264
|
+
if (r.value = S, n.value && !_.value && !c.value) {
|
|
1265
|
+
const Y = u(n.value);
|
|
1266
|
+
Y && (d.value = !0, c.value = Y.country.value, n.value = Y.nationalNumber);
|
|
1267
|
+
}
|
|
1268
|
+
return;
|
|
1269
|
+
}
|
|
1270
|
+
!c.value && S && (d.value = !0, c.value = S);
|
|
1271
|
+
}), re(
|
|
1272
|
+
g,
|
|
1273
|
+
(i) => {
|
|
1274
|
+
if (i == null) {
|
|
1275
|
+
c.value && (c.value = "");
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
if (E(c.value) === i) return;
|
|
1279
|
+
const w = m(String(i));
|
|
1280
|
+
w && (c.value = w);
|
|
1281
|
+
},
|
|
1282
|
+
{ immediate: !0 }
|
|
1283
|
+
), re(
|
|
1284
|
+
c,
|
|
1285
|
+
(i, w) => {
|
|
1286
|
+
const S = d.value;
|
|
1287
|
+
d.value = !1;
|
|
1288
|
+
const Y = E(i);
|
|
1289
|
+
g.value !== Y && (g.value = Y), !S && e.detectFromInput && i && w !== i && (_.value = !0);
|
|
1290
|
+
},
|
|
1291
|
+
{ flush: "sync" }
|
|
1292
|
+
);
|
|
1293
|
+
const P = L(String(n.value ?? ""));
|
|
1294
|
+
let B = !1;
|
|
1295
|
+
function K(i) {
|
|
1296
|
+
B = !0, n.value = i;
|
|
1297
|
+
}
|
|
1298
|
+
function G(i) {
|
|
1299
|
+
const w = i.target;
|
|
1300
|
+
P.value = w.value;
|
|
1301
|
+
const S = se(w.value).replace(/\D/g, "");
|
|
1302
|
+
if (!S) {
|
|
1303
|
+
f.reset(), e.detectFromInput && (d.value = !0, c.value = "", _.value = !1), K("");
|
|
1304
|
+
return;
|
|
1305
|
+
}
|
|
1306
|
+
f.markTyping(), K(S);
|
|
1307
|
+
}
|
|
1308
|
+
function s(i) {
|
|
1309
|
+
const w = i.target;
|
|
1310
|
+
P.value = se(w.value).replace(/\D/g, "");
|
|
1311
|
+
}
|
|
1312
|
+
re(
|
|
1313
|
+
() => n.value,
|
|
1314
|
+
(i) => {
|
|
1315
|
+
const w = se(String(i ?? "")).replace(/\D/g, "");
|
|
1316
|
+
if (w !== i) {
|
|
1317
|
+
n.value = w;
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
if (B) {
|
|
1321
|
+
B = !1;
|
|
1322
|
+
return;
|
|
1323
|
+
}
|
|
1324
|
+
P.value = w;
|
|
1325
|
+
},
|
|
1326
|
+
{ flush: "post" }
|
|
1327
|
+
);
|
|
1328
|
+
const h = k(() => $t(e.messages)), l = k(
|
|
1329
|
+
() => e.dir === "ltr" || e.dir === "rtl" ? e.dir : void 0
|
|
1330
|
+
), {
|
|
1331
|
+
validation: U,
|
|
1332
|
+
required: ee,
|
|
1333
|
+
validationState: H,
|
|
1334
|
+
visibleValidationState: J,
|
|
1335
|
+
errorMessage: ye,
|
|
1336
|
+
showError: be,
|
|
1337
|
+
showHint: _e,
|
|
1338
|
+
selectedDialCode: le
|
|
1339
|
+
} = kt(
|
|
1340
|
+
{ validate: $, getRequiredInfo: C, getCountryByValue: T },
|
|
1341
|
+
{ phone: n, selectedIso2: c, hasFinishedTyping: F, messages: h },
|
|
1342
|
+
{
|
|
1343
|
+
locale: () => e.locale,
|
|
1344
|
+
showValidation: () => e.showValidation,
|
|
1345
|
+
errorMessages: () => e.errorMessages
|
|
1346
|
+
}
|
|
1347
|
+
), Oe = k(
|
|
1348
|
+
() => e.placeholder || ee.value?.format_hint || h.value.phoneInputLabel
|
|
1349
|
+
), Fe = k(
|
|
1350
|
+
() => `${Be[e.size]} ${q[e.size]}`
|
|
1351
|
+
), Ve = k(() => `px-2 ${q[e.size]}`), we = Ze(), Ke = k(() => be.value || _e.value ? we : void 0);
|
|
1352
|
+
return t({
|
|
1353
|
+
validation: U,
|
|
1354
|
+
required: ee,
|
|
1355
|
+
selectedDialCode: le,
|
|
1356
|
+
validationState: H,
|
|
1357
|
+
visibleValidationState: J,
|
|
1358
|
+
isDetecting: I,
|
|
1359
|
+
hasFinishedTyping: F,
|
|
1360
|
+
detectionAttempted: D
|
|
1361
|
+
}), (i, w) => (M(), O("div", {
|
|
1362
|
+
class: Z(o(V)("flex w-full flex-col gap-1.5", i.$attrs.class)),
|
|
1363
|
+
"data-slot": "tell-input",
|
|
1364
|
+
dir: l.value
|
|
1365
|
+
}, [
|
|
1366
|
+
A("div", ta, [
|
|
1367
|
+
A("div", {
|
|
1368
|
+
class: Z(
|
|
1369
|
+
o(V)(
|
|
1370
|
+
o(St)({ size: e.size }),
|
|
1371
|
+
"focus-within:ring-2 focus-within:ring-offset-0",
|
|
1372
|
+
// Validation field colors are an opt-in via `showValidation` — by default the
|
|
1373
|
+
// field stays neutral and the consumer drives error rendering from `validation`.
|
|
1374
|
+
(!e.showValidation || o(J) === "idle") && "focus-within:ring-ring/40",
|
|
1375
|
+
e.showValidation && o(J) === "valid" && "border-emerald-500/60 ring-1 ring-emerald-500/20 focus-within:ring-emerald-500/40",
|
|
1376
|
+
e.showValidation && o(J) === "error" && "border-destructive/80 ring-1 ring-destructive/20 focus-within:ring-destructive/40",
|
|
1377
|
+
e.class,
|
|
1378
|
+
e.fieldClass
|
|
1379
|
+
)
|
|
1380
|
+
),
|
|
1381
|
+
"data-state": o(J)
|
|
1382
|
+
}, [
|
|
1383
|
+
y(i.$slots, "prefix"),
|
|
1384
|
+
o(le) ? (M(), O("span", {
|
|
1385
|
+
key: 0,
|
|
1386
|
+
"data-slot": "tell-input-dial",
|
|
1387
|
+
dir: "ltr",
|
|
1388
|
+
"aria-hidden": "true",
|
|
1389
|
+
class: Z(o(V)("text-muted-foreground shrink-0 tabular-nums select-none", Ve.value))
|
|
1390
|
+
}, z(o(le)), 3)) : j("", !0),
|
|
1391
|
+
A("input", {
|
|
1392
|
+
value: P.value,
|
|
1393
|
+
type: "tel",
|
|
1394
|
+
inputmode: "numeric",
|
|
1395
|
+
autocomplete: "tel",
|
|
1396
|
+
dir: "ltr",
|
|
1397
|
+
"data-slot": "tell-input-field",
|
|
1398
|
+
disabled: e.disabled || e.loading,
|
|
1399
|
+
placeholder: Oe.value,
|
|
1400
|
+
"aria-label": h.value.phoneInputLabel,
|
|
1401
|
+
"aria-invalid": o(J) === "error" || void 0,
|
|
1402
|
+
"aria-describedby": Ke.value,
|
|
1403
|
+
class: Z(
|
|
1404
|
+
o(V)(
|
|
1405
|
+
"placeholder:text-muted-foreground h-full w-full min-w-0 flex-1 bg-transparent tabular-nums outline-none disabled:cursor-not-allowed",
|
|
1406
|
+
Fe.value,
|
|
1407
|
+
o(le) && "ps-1",
|
|
1408
|
+
e.inputClass
|
|
1409
|
+
)
|
|
1410
|
+
),
|
|
1411
|
+
onInput: G,
|
|
1412
|
+
onChange: s
|
|
1413
|
+
}, null, 42, ra),
|
|
1414
|
+
N(fe, {
|
|
1415
|
+
"enter-active-class": "transition-all duration-200 ease-out overflow-hidden",
|
|
1416
|
+
"leave-active-class": "transition-all duration-150 ease-in overflow-hidden",
|
|
1417
|
+
"enter-from-class": "opacity-0 max-w-0",
|
|
1418
|
+
"leave-to-class": "opacity-0 max-w-0",
|
|
1419
|
+
"enter-to-class": "max-w-[2.5rem]",
|
|
1420
|
+
"leave-from-class": "max-w-[2.5rem]"
|
|
1421
|
+
}, {
|
|
1422
|
+
default: R(() => [
|
|
1423
|
+
o(I) && !c.value && !o(D) ? (M(), O("div", na, [
|
|
1424
|
+
y(i.$slots, "detecting", {}, () => [
|
|
1425
|
+
N(o(qe), { class: "size-4 animate-spin" })
|
|
1426
|
+
])
|
|
1427
|
+
])) : j("", !0)
|
|
1428
|
+
]),
|
|
1429
|
+
_: 3
|
|
1430
|
+
}),
|
|
1431
|
+
N(fe, {
|
|
1432
|
+
"enter-active-class": "transition-all duration-200 ease-out overflow-hidden",
|
|
1433
|
+
"leave-active-class": "transition-all duration-150 ease-in overflow-hidden",
|
|
1434
|
+
"enter-from-class": "opacity-0 max-w-0",
|
|
1435
|
+
"leave-to-class": "opacity-0 max-w-0",
|
|
1436
|
+
"enter-to-class": "max-w-[12rem]",
|
|
1437
|
+
"leave-from-class": "max-w-[12rem]"
|
|
1438
|
+
}, {
|
|
1439
|
+
default: R(() => [
|
|
1440
|
+
!e.detectFromInput || c.value || o(D) ? (M(), O("div", la, [
|
|
1441
|
+
N(Xt, {
|
|
1442
|
+
selected: c.value,
|
|
1443
|
+
"onUpdate:selected": w[0] || (w[0] = (S) => c.value = S),
|
|
1444
|
+
"allowed-dial-codes": e.allowedDialCodes,
|
|
1445
|
+
disabled: e.disabled || e.loading,
|
|
1446
|
+
size: e.size,
|
|
1447
|
+
locale: e.locale,
|
|
1448
|
+
"search-placeholder": e.searchPlaceholder ?? h.value.searchPlaceholder,
|
|
1449
|
+
"empty-text": e.emptyText ?? h.value.emptyText,
|
|
1450
|
+
"loading-text": e.loadingText ?? h.value.loadingText,
|
|
1451
|
+
"suggested-label": h.value.suggestedLabel,
|
|
1452
|
+
"all-countries-label": h.value.allCountriesLabel,
|
|
1453
|
+
"country-label": h.value.countryLabel,
|
|
1454
|
+
"select-country-label": h.value.selectCountryLabel,
|
|
1455
|
+
"flag-url": e.flagUrl,
|
|
1456
|
+
searcher: e.searcher,
|
|
1457
|
+
countries: e.countries,
|
|
1458
|
+
"content-class": e.contentClass,
|
|
1459
|
+
"popover-class": e.popoverClass,
|
|
1460
|
+
"drawer-class": e.drawerClass,
|
|
1461
|
+
"scroll-lock": e.scrollLock
|
|
1462
|
+
}, je({ _: 2 }, [
|
|
1463
|
+
i.$slots.trigger ? {
|
|
1464
|
+
name: "trigger",
|
|
1465
|
+
fn: R((S) => [
|
|
1466
|
+
y(i.$slots, "trigger", Q(X(S)))
|
|
1467
|
+
]),
|
|
1468
|
+
key: "0"
|
|
1469
|
+
} : void 0,
|
|
1470
|
+
i.$slots.chevron ? {
|
|
1471
|
+
name: "chevron",
|
|
1472
|
+
fn: R((S) => [
|
|
1473
|
+
y(i.$slots, "chevron", Q(X(S)))
|
|
1474
|
+
]),
|
|
1475
|
+
key: "1"
|
|
1476
|
+
} : void 0,
|
|
1477
|
+
i.$slots.flag ? {
|
|
1478
|
+
name: "flag",
|
|
1479
|
+
fn: R((S) => [
|
|
1480
|
+
y(i.$slots, "flag", Q(X(S)))
|
|
1481
|
+
]),
|
|
1482
|
+
key: "2"
|
|
1483
|
+
} : void 0,
|
|
1484
|
+
i.$slots.item ? {
|
|
1485
|
+
name: "item",
|
|
1486
|
+
fn: R((S) => [
|
|
1487
|
+
y(i.$slots, "item", Q(X(S)))
|
|
1488
|
+
]),
|
|
1489
|
+
key: "3"
|
|
1490
|
+
} : void 0,
|
|
1491
|
+
i.$slots["group-header"] ? {
|
|
1492
|
+
name: "group-header",
|
|
1493
|
+
fn: R((S) => [
|
|
1494
|
+
y(i.$slots, "group-header", Q(X(S)))
|
|
1495
|
+
]),
|
|
1496
|
+
key: "4"
|
|
1497
|
+
} : void 0,
|
|
1498
|
+
i.$slots.search ? {
|
|
1499
|
+
name: "search",
|
|
1500
|
+
fn: R((S) => [
|
|
1501
|
+
y(i.$slots, "search", Q(X(S)))
|
|
1502
|
+
]),
|
|
1503
|
+
key: "5"
|
|
1504
|
+
} : void 0,
|
|
1505
|
+
i.$slots.loading ? {
|
|
1506
|
+
name: "loading",
|
|
1507
|
+
fn: R(() => [
|
|
1508
|
+
y(i.$slots, "loading")
|
|
1509
|
+
]),
|
|
1510
|
+
key: "6"
|
|
1511
|
+
} : void 0,
|
|
1512
|
+
i.$slots.empty ? {
|
|
1513
|
+
name: "empty",
|
|
1514
|
+
fn: R((S) => [
|
|
1515
|
+
y(i.$slots, "empty", Q(X(S)))
|
|
1516
|
+
]),
|
|
1517
|
+
key: "7"
|
|
1518
|
+
} : void 0
|
|
1519
|
+
]), 1032, ["selected", "allowed-dial-codes", "disabled", "size", "locale", "search-placeholder", "empty-text", "loading-text", "suggested-label", "all-countries-label", "country-label", "select-country-label", "flag-url", "searcher", "countries", "content-class", "popover-class", "drawer-class", "scroll-lock"])
|
|
1520
|
+
])) : j("", !0)
|
|
1521
|
+
]),
|
|
1522
|
+
_: 3
|
|
1523
|
+
}),
|
|
1524
|
+
y(i.$slots, "suffix", {
|
|
1525
|
+
validationState: o(H),
|
|
1526
|
+
validation: o(U)
|
|
1527
|
+
})
|
|
1528
|
+
], 10, aa),
|
|
1529
|
+
e.showValidationIcon ? (M(), Te(fe, {
|
|
1530
|
+
key: 0,
|
|
1531
|
+
"enter-active-class": "transition duration-150 ease-out",
|
|
1532
|
+
"leave-active-class": "transition duration-100 ease-in",
|
|
1533
|
+
"enter-from-class": "opacity-0 scale-90",
|
|
1534
|
+
"leave-to-class": "opacity-0 scale-90"
|
|
1535
|
+
}, {
|
|
1536
|
+
default: R(() => [
|
|
1537
|
+
o(J) === "valid" ? y(i.$slots, "valid-icon", { key: 0 }, () => [
|
|
1538
|
+
N(o(We), {
|
|
1539
|
+
class: "size-5 shrink-0 text-emerald-500",
|
|
1540
|
+
"aria-hidden": "true"
|
|
1541
|
+
})
|
|
1542
|
+
]) : o(J) === "error" ? y(i.$slots, "error-icon", {
|
|
1543
|
+
key: 1,
|
|
1544
|
+
reason: o(U).reason ?? ""
|
|
1545
|
+
}, () => [
|
|
1546
|
+
N(o(Qe), {
|
|
1547
|
+
class: "text-destructive size-5 shrink-0",
|
|
1548
|
+
"aria-hidden": "true"
|
|
1549
|
+
})
|
|
1550
|
+
]) : j("", !0)
|
|
1551
|
+
]),
|
|
1552
|
+
_: 3
|
|
1553
|
+
})) : j("", !0)
|
|
1554
|
+
]),
|
|
1555
|
+
A("div", {
|
|
1556
|
+
id: o(we),
|
|
1557
|
+
"aria-live": "polite"
|
|
1558
|
+
}, [
|
|
1559
|
+
o(be) ? y(i.$slots, "error", {
|
|
1560
|
+
key: 0,
|
|
1561
|
+
message: o(ye),
|
|
1562
|
+
reason: o(U).reason ?? "",
|
|
1563
|
+
validation: o(U)
|
|
1564
|
+
}, () => [
|
|
1565
|
+
A("p", {
|
|
1566
|
+
"data-slot": "tell-input-error",
|
|
1567
|
+
class: Z(o(V)("text-destructive text-xs", e.errorClass)),
|
|
1568
|
+
role: "alert"
|
|
1569
|
+
}, z(o(ye)), 3)
|
|
1570
|
+
]) : o(_e) ? y(i.$slots, "hint", {
|
|
1571
|
+
key: 1,
|
|
1572
|
+
country: c.value,
|
|
1573
|
+
formatHint: o(ee).format_hint,
|
|
1574
|
+
example: o(ee).example_e164
|
|
1575
|
+
}, () => [
|
|
1576
|
+
A("p", {
|
|
1577
|
+
"data-slot": "tell-input-hint",
|
|
1578
|
+
class: Z(o(V)("text-muted-foreground text-xs tabular-nums", e.hintClass))
|
|
1579
|
+
}, z(o(ee).format_hint), 3)
|
|
1580
|
+
]) : j("", !0)
|
|
1581
|
+
], 8, oa)
|
|
1582
|
+
], 10, ea));
|
|
1583
|
+
}
|
|
1584
|
+
});
|
|
1585
|
+
export {
|
|
1586
|
+
_t as C,
|
|
1587
|
+
ze as D,
|
|
1588
|
+
st as L,
|
|
1589
|
+
ge as _,
|
|
1590
|
+
Xt as a,
|
|
1591
|
+
va as b,
|
|
1592
|
+
Ie as c,
|
|
1593
|
+
Ee as d,
|
|
1594
|
+
St as e,
|
|
1595
|
+
xt as f,
|
|
1596
|
+
Re as g,
|
|
1597
|
+
Ct as h,
|
|
1598
|
+
Pe as i,
|
|
1599
|
+
kt as j,
|
|
1600
|
+
At as k,
|
|
1601
|
+
pt as l,
|
|
1602
|
+
se as n,
|
|
1603
|
+
$t as r,
|
|
1604
|
+
ma as u
|
|
1605
|
+
};
|
|
1606
|
+
//# sourceMappingURL=ATellInput.vue_vue_type_script_setup_true_lang-D4odgAna.mjs.map
|