gc_i18n 1.5.11 → 1.6.1

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/lib/gc_i18n.es.js CHANGED
@@ -1,41 +1,41 @@
1
1
  import './gc_i18n.css';
2
- import ft from "keyboardjs";
3
- import { h as ye, ref as ne, computed as De, onMounted as In, nextTick as pt, Vue as ve } from "vue-demi";
4
- import Xe from "axios";
5
- import k from "store2";
6
- import T from "lodash-es";
7
- import { jws as Pn } from "jsrsasign";
8
- const Mn = [
2
+ import mt from "keyboardjs";
3
+ import { h as ve, ref as ne, computed as Re, onMounted as jn, nextTick as bt, Vue as Ce } from "vue-demi";
4
+ import Qe from "axios";
5
+ import x from "store2";
6
+ import A from "lodash-es";
7
+ import { jws as Un } from "jsrsasign";
8
+ const Rn = [
9
9
  "ar-SA",
10
10
  // 阿拉伯语(沙特阿拉伯)
11
11
  "ar-EG",
12
12
  // 阿拉伯语-埃及
13
13
  "fa-IR"
14
14
  // 波斯语(伊朗)
15
- ], Ce = (t) => {
15
+ ], ke = (t) => {
16
16
  if (!t || typeof t != "string") return !1;
17
- if (Mn.includes(t)) return !0;
17
+ if (Rn.includes(t)) return !0;
18
18
  const e = t.split("-")[0].toLowerCase();
19
19
  return ["ar", "fa"].includes(e);
20
- }, On = (t) => {
20
+ }, Hn = (t) => {
21
21
  const e = {};
22
22
  for (const n of t)
23
23
  e[n.key] = n.value;
24
24
  return e;
25
- }, Nn = (t, e, n) => (e.forEach((o) => {
25
+ }, Vn = (t, e, n) => (e.forEach((o) => {
26
26
  const s = o.key.split(".");
27
- s[0] === "common" && T.find(t, { key: `${n}.${s[1]}` }) && T.remove(t, { key: `${n}.${s[1]}` });
28
- const r = T.find(t, { key: o.key });
29
- r ? T.merge(r, o) : t.push(o);
30
- }), t), he = Xe.create({
27
+ s[0] === "common" && A.find(t, { key: `${n}.${s[1]}` }) && A.remove(t, { key: `${n}.${s[1]}` });
28
+ const r = A.find(t, { key: o.key });
29
+ r ? A.merge(r, o) : t.push(o);
30
+ }), t), ie = Qe.create({
31
31
  timeout: 8e3
32
- }), ke = /* @__PURE__ */ new Map(), qe = (t) => String(t || "guest").replace(/[^\w-]/g, "_"), It = async ({
32
+ }), xe = /* @__PURE__ */ new Map(), Ke = (t) => String(t || "guest").replace(/[^\w-]/g, "_"), Nt = async ({
33
33
  baseUrl: t,
34
34
  token: e,
35
35
  appCode: n,
36
36
  isRemote: o = !1
37
37
  }) => {
38
- const s = k.get("I18N_LANGUAGES");
38
+ const s = x.get("I18N_LANGUAGES");
39
39
  if (s && Array.isArray(s) && s.length > 0 && !o)
40
40
  return s.map((r) => ({
41
41
  langCode: r.language || r.langCode || r,
@@ -44,31 +44,31 @@ const Mn = [
44
44
  if (!n)
45
45
  return [];
46
46
  try {
47
- const r = await he.get(`${t}/i18n-web//app/getsupportedlangs`, {
47
+ const r = await ie.get(`${t}/i18n-web//app/getsupportedlangs`, {
48
48
  headers: {
49
49
  appCode: n,
50
50
  Authorization: e
51
51
  }
52
52
  });
53
53
  if (r.data && r.data.result === 0) {
54
- const d = T.get(r.data, "retVal", []), c = d.map((i) => ({
54
+ const a = A.get(r.data, "retVal", []), c = a.map((i) => ({
55
55
  langCode: i.language || i.langCode || i,
56
56
  langName: i.langName || i.language || i
57
57
  }));
58
- return k.set("I18N_LANGUAGES", d), c;
58
+ return x.set("I18N_LANGUAGES", a), c;
59
59
  }
60
60
  } catch (r) {
61
61
  console.error("获取语言列表失败:", r);
62
62
  }
63
63
  return [];
64
- }, zn = async ({ baseUrl: t, token: e, appCode: n }) => he.get(
64
+ }, Fn = async ({ baseUrl: t, token: e, appCode: n }) => ie.get(
65
65
  t + "/i18n-web/app/getsupportedlangs?appCode=" + n,
66
66
  {
67
67
  headers: {
68
68
  Authorization: e
69
69
  }
70
70
  }
71
- ), gt = async ({
71
+ ), yt = async ({
72
72
  appCode: t,
73
73
  language: e = "zh-CN",
74
74
  lastPullDate: n,
@@ -76,8 +76,8 @@ const Mn = [
76
76
  token: s
77
77
  }) => {
78
78
  try {
79
- const r = o + "/i18n-web/kv_translate/kv_translates", d = n ? r + "?lastPullDate=" + n : r, c = await he({
80
- url: d,
79
+ const r = o + "/i18n-web/kv_translate/kv_translates", a = n ? r + "?lastPullDate=" + n : r, c = await ie({
80
+ url: a,
81
81
  method: "GET",
82
82
  headers: {
83
83
  appCode: t,
@@ -89,21 +89,59 @@ const Mn = [
89
89
  } catch (r) {
90
90
  return console.error("获取翻译数据失败:", r), null;
91
91
  }
92
- }, jn = async ({ data: t, token: e, baseUrl: n }) => he({
92
+ }, qn = async ({ data: t, token: e, baseUrl: n }) => ie({
93
93
  url: n + "/i18n-web/kv_translate/userDicts",
94
94
  method: "POST",
95
95
  headers: {
96
96
  Authorization: e
97
97
  },
98
98
  data: t
99
- }), Dn = async ({ data: t, token: e, baseUrl: n }) => he({
99
+ }), Kn = async ({ data: t, token: e, baseUrl: n }) => ie({
100
100
  url: n + "/i18n-web/kv_translate/batch",
101
101
  method: "POST",
102
102
  data: t,
103
103
  headers: {
104
104
  Authorization: e
105
105
  }
106
- }), Un = async ({
106
+ }), vt = (t) => {
107
+ if (typeof t == "string") {
108
+ const e = t.trim();
109
+ return !e || /^<!doctype/i.test(e) || /^<html/i.test(e) ? (console.warn("i18n_token 接口未返回有效 token,请检查业务项目接口"), "") : e;
110
+ }
111
+ return A.get(t, "retVal.i18n_token") || A.get(t, "retVal.token") || A.get(t, "i18n_token") || A.get(t, "token") || "";
112
+ }, Gn = async ({
113
+ request: t,
114
+ appCode: e,
115
+ orgCode: n,
116
+ userCode: o,
117
+ token: s
118
+ }) => {
119
+ if (typeof t == "function") {
120
+ const a = await t({
121
+ appCode: e,
122
+ orgCode: n,
123
+ userCode: o,
124
+ token: s
125
+ });
126
+ return vt((a == null ? void 0 : a.data) ?? a);
127
+ }
128
+ const r = await ie({
129
+ url: "/i18n_token",
130
+ method: "GET",
131
+ headers: s ? {
132
+ Accept: "application/json",
133
+ Authorization: s
134
+ } : {
135
+ Accept: "application/json"
136
+ },
137
+ params: {
138
+ appCode: e,
139
+ orgCode: n,
140
+ userCode: o
141
+ }
142
+ });
143
+ return vt(r == null ? void 0 : r.data);
144
+ }, Wn = async ({
107
145
  baseUrl: t,
108
146
  appCode: e,
109
147
  language: n = "zh-CN",
@@ -112,117 +150,117 @@ const Mn = [
112
150
  cacheScope: r = "guest"
113
151
  }) => {
114
152
  try {
115
- const d = qe(r), c = `I18N_${T.toUpper(e)}_${d}`, i = k.namespace(c), l = {
153
+ const a = Ke(r), c = `I18N_${A.toUpper(e)}_${a}`, i = x.namespace(c), u = {
116
154
  baseUrl: t,
117
155
  appCode: e,
118
156
  language: n,
119
157
  token: o
120
- }, u = i.get(n), h = [
158
+ }, d = i.get(n), h = [
121
159
  t || "",
122
160
  e || "",
123
161
  n || "",
124
- d,
162
+ a,
125
163
  o || "",
126
- T.get(u, "lastPullDate", "")
164
+ A.get(d, "lastPullDate", "")
127
165
  ].join("|");
128
- if (ke.has(h))
129
- return ke.get(h);
166
+ if (xe.has(h))
167
+ return xe.get(h);
130
168
  const w = (async () => {
131
- if (!u || !u.lastPullDate) {
132
- const B = await gt(l);
133
- return B ? (i.set(n, B), T.get(B, "translatesDTOs", [])) : T.get(u, "translatesDTOs", []);
169
+ if (!d || !d.lastPullDate) {
170
+ const $ = await yt(u);
171
+ return $ ? (i.set(n, $), A.get($, "translatesDTOs", [])) : A.get(d, "translatesDTOs", []);
134
172
  }
135
- const { lastPullDate: x } = u, A = await gt({
136
- ...l,
137
- lastPullDate: x
173
+ const { lastPullDate: k } = d, T = await yt({
174
+ ...u,
175
+ lastPullDate: k
138
176
  });
139
- if (!A)
140
- return T.get(u, "translatesDTOs", []);
141
- const $ = T.get(u, "translatesDTOs", []);
142
- if (!T.isEmpty(A.translatesDTOs)) {
143
- const B = Nn($, A.translatesDTOs, s), E = {
144
- lastPullDate: A.lastPullDate,
145
- translatesDTOs: B
177
+ if (!T)
178
+ return A.get(d, "translatesDTOs", []);
179
+ const _ = A.get(d, "translatesDTOs", []);
180
+ if (!A.isEmpty(T.translatesDTOs)) {
181
+ const $ = Vn(_, T.translatesDTOs, s), E = {
182
+ lastPullDate: T.lastPullDate,
183
+ translatesDTOs: $
146
184
  };
147
- return i.set(n, E, ":"), B;
185
+ return i.set(n, E, ":"), $;
148
186
  }
149
- return $;
187
+ return _;
150
188
  })();
151
- return ke.set(h, w), w.finally(() => {
152
- ke.delete(h);
189
+ return xe.set(h, w), w.finally(() => {
190
+ xe.delete(h);
153
191
  }), w;
154
- } catch (d) {
155
- console.error("处理翻译数据失败:", d);
156
- const c = qe(r), i = k.namespace(`I18N_${T.toUpper(e)}_${c}`);
157
- return T.get(i.get(n), "translatesDTOs", []);
192
+ } catch (a) {
193
+ console.error("处理翻译数据失败:", a);
194
+ const c = Ke(r), i = x.namespace(`I18N_${A.toUpper(e)}_${c}`);
195
+ return A.get(i.get(n), "translatesDTOs", []);
158
196
  }
159
- }, Hn = ({ appCode: t, cacheScope: e } = {}) => {
197
+ }, Yn = ({ appCode: t, cacheScope: e } = {}) => {
160
198
  if (t) {
161
199
  if (e) {
162
- k.namespace(`I18N_${T.toUpper(t)}_${qe(e)}`).clearAll();
200
+ x.namespace(`I18N_${A.toUpper(t)}_${Ke(e)}`).clearAll();
163
201
  return;
164
202
  }
165
- k.namespace(`I18N_${T.toUpper(t)}`).clearAll();
203
+ x.namespace(`I18N_${A.toUpper(t)}`).clearAll();
166
204
  }
167
205
  };
168
206
  /*!
169
207
  * sweetalert2 v11.26.18
170
208
  * Released under the MIT License.
171
209
  */
172
- function Pt(t, e, n) {
210
+ function zt(t, e, n) {
173
211
  if (typeof t == "function" ? t === e : t.has(e)) return arguments.length < 3 ? e : n;
174
212
  throw new TypeError("Private element is not present on this object");
175
213
  }
176
- function Rn(t, e) {
214
+ function Zn(t, e) {
177
215
  if (e.has(t)) throw new TypeError("Cannot initialize the same private elements twice on an object");
178
216
  }
179
- function mt(t, e) {
180
- return t.get(Pt(t, e));
217
+ function Ct(t, e) {
218
+ return t.get(zt(t, e));
181
219
  }
182
- function Vn(t, e, n) {
183
- Rn(t, e), e.set(t, n);
220
+ function Xn(t, e, n) {
221
+ Zn(t, e), e.set(t, n);
184
222
  }
185
- function Fn(t, e, n) {
186
- return t.set(Pt(t, e), n), n;
223
+ function Jn(t, e, n) {
224
+ return t.set(zt(t, e), n), n;
187
225
  }
188
- const qn = 100, p = {}, Kn = () => {
226
+ const Qn = 100, p = {}, eo = () => {
189
227
  p.previousActiveElement instanceof HTMLElement ? (p.previousActiveElement.focus(), p.previousActiveElement = null) : document.body && document.body.focus();
190
- }, Gn = (t) => new Promise((e) => {
228
+ }, to = (t) => new Promise((e) => {
191
229
  if (!t)
192
230
  return e();
193
231
  const n = window.scrollX, o = window.scrollY;
194
232
  p.restoreFocusTimeout = setTimeout(() => {
195
- Kn(), e();
196
- }, qn), window.scrollTo(n, o);
197
- }), Mt = "swal2-", Wn = ["container", "shown", "height-auto", "iosfix", "popup", "modal", "no-backdrop", "no-transition", "toast", "toast-shown", "show", "hide", "close", "title", "html-container", "actions", "confirm", "deny", "cancel", "footer", "icon", "icon-content", "image", "input", "file", "range", "select", "radio", "checkbox", "label", "textarea", "inputerror", "input-label", "validation-message", "progress-steps", "active-progress-step", "progress-step", "progress-step-line", "loader", "loading", "styled", "top", "top-start", "top-end", "top-left", "top-right", "center", "center-start", "center-end", "center-left", "center-right", "bottom", "bottom-start", "bottom-end", "bottom-left", "bottom-right", "grow-row", "grow-column", "grow-fullscreen", "rtl", "timer-progress-bar", "timer-progress-bar-container", "scrollbar-measure", "icon-success", "icon-warning", "icon-info", "icon-question", "icon-error", "draggable", "dragging"], a = Wn.reduce(
198
- (t, e) => (t[e] = Mt + e, t),
233
+ eo(), e();
234
+ }, Qn), window.scrollTo(n, o);
235
+ }), Dt = "swal2-", no = ["container", "shown", "height-auto", "iosfix", "popup", "modal", "no-backdrop", "no-transition", "toast", "toast-shown", "show", "hide", "close", "title", "html-container", "actions", "confirm", "deny", "cancel", "footer", "icon", "icon-content", "image", "input", "file", "range", "select", "radio", "checkbox", "label", "textarea", "inputerror", "input-label", "validation-message", "progress-steps", "active-progress-step", "progress-step", "progress-step-line", "loader", "loading", "styled", "top", "top-start", "top-end", "top-left", "top-right", "center", "center-start", "center-end", "center-left", "center-right", "bottom", "bottom-start", "bottom-end", "bottom-left", "bottom-right", "grow-row", "grow-column", "grow-fullscreen", "rtl", "timer-progress-bar", "timer-progress-bar-container", "scrollbar-measure", "icon-success", "icon-warning", "icon-info", "icon-question", "icon-error", "draggable", "dragging"], l = no.reduce(
236
+ (t, e) => (t[e] = Dt + e, t),
199
237
  /** @type {SwalClasses} */
200
238
  {}
201
- ), Yn = ["success", "warning", "info", "question", "error"], Ee = Yn.reduce(
202
- (t, e) => (t[e] = Mt + e, t),
239
+ ), oo = ["success", "warning", "info", "question", "error"], Le = oo.reduce(
240
+ (t, e) => (t[e] = Dt + e, t),
203
241
  /** @type {SwalIcons} */
204
242
  {}
205
- ), Ot = "SweetAlert2:", Je = (t) => t.charAt(0).toUpperCase() + t.slice(1), z = (t) => {
206
- console.warn(`${Ot} ${typeof t == "object" ? t.join(" ") : t}`);
243
+ ), jt = "SweetAlert2:", et = (t) => t.charAt(0).toUpperCase() + t.slice(1), z = (t) => {
244
+ console.warn(`${jt} ${typeof t == "object" ? t.join(" ") : t}`);
207
245
  }, ee = (t) => {
208
- console.error(`${Ot} ${t}`);
209
- }, bt = [], Zn = (t) => {
210
- bt.includes(t) || (bt.push(t), z(t));
211
- }, Nt = (t, e = null) => {
212
- Zn(`"${t}" is deprecated and will be removed in the next major release.${e ? ` Use "${e}" instead.` : ""}`);
213
- }, Me = (t) => typeof t == "function" ? t() : t, Qe = (t) => t && typeof t.toPromise == "function", we = (t) => Qe(t) ? t.toPromise() : Promise.resolve(t), et = (t) => t && Promise.resolve(t) === t, j = () => document.body.querySelector(`.${a.container}`), fe = (t) => {
214
- const e = j();
246
+ console.error(`${jt} ${t}`);
247
+ }, kt = [], so = (t) => {
248
+ kt.includes(t) || (kt.push(t), z(t));
249
+ }, Ut = (t, e = null) => {
250
+ so(`"${t}" is deprecated and will be removed in the next major release.${e ? ` Use "${e}" instead.` : ""}`);
251
+ }, Oe = (t) => typeof t == "function" ? t() : t, tt = (t) => t && typeof t.toPromise == "function", fe = (t) => tt(t) ? t.toPromise() : Promise.resolve(t), nt = (t) => t && Promise.resolve(t) === t, D = () => document.body.querySelector(`.${l.container}`), pe = (t) => {
252
+ const e = D();
215
253
  return e ? e.querySelector(t) : null;
216
- }, H = (t) => fe(`.${t}`), S = () => H(a.popup), ie = () => H(a.icon), Xn = () => H(a["icon-content"]), zt = () => H(a.title), tt = () => H(a["html-container"]), jt = () => H(a.image), nt = () => H(a["progress-steps"]), Oe = () => H(a["validation-message"]), q = () => (
254
+ }, R = (t) => pe(`.${t}`), S = () => R(l.popup), ae = () => R(l.icon), ro = () => R(l["icon-content"]), Rt = () => R(l.title), ot = () => R(l["html-container"]), Ht = () => R(l.image), st = () => R(l["progress-steps"]), Ne = () => R(l["validation-message"]), q = () => (
217
255
  /** @type {HTMLButtonElement} */
218
- fe(`.${a.actions} .${a.confirm}`)
219
- ), ae = () => (
256
+ pe(`.${l.actions} .${l.confirm}`)
257
+ ), le = () => (
220
258
  /** @type {HTMLButtonElement} */
221
- fe(`.${a.actions} .${a.cancel}`)
259
+ pe(`.${l.actions} .${l.cancel}`)
222
260
  ), te = () => (
223
261
  /** @type {HTMLButtonElement} */
224
- fe(`.${a.actions} .${a.deny}`)
225
- ), Jn = () => H(a["input-label"]), le = () => fe(`.${a.loader}`), pe = () => H(a.actions), Dt = () => H(a.footer), Ne = () => H(a["timer-progress-bar"]), ot = () => H(a.close), Qn = `
262
+ pe(`.${l.actions} .${l.deny}`)
263
+ ), io = () => R(l["input-label"]), ce = () => pe(`.${l.loader}`), ge = () => R(l.actions), Vt = () => R(l.footer), ze = () => R(l["timer-progress-bar"]), rt = () => R(l.close), ao = `
226
264
  a[href],
227
265
  area[href],
228
266
  input:not([disabled]),
@@ -237,30 +275,30 @@ const qn = 100, p = {}, Kn = () => {
237
275
  audio[controls],
238
276
  video[controls],
239
277
  summary
240
- `, st = () => {
278
+ `, it = () => {
241
279
  const t = S();
242
280
  if (!t)
243
281
  return [];
244
- const e = t.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'), n = Array.from(e).sort((r, d) => {
245
- const c = parseInt(r.getAttribute("tabindex") || "0"), i = parseInt(d.getAttribute("tabindex") || "0");
282
+ const e = t.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'), n = Array.from(e).sort((r, a) => {
283
+ const c = parseInt(r.getAttribute("tabindex") || "0"), i = parseInt(a.getAttribute("tabindex") || "0");
246
284
  return c > i ? 1 : c < i ? -1 : 0;
247
- }), o = t.querySelectorAll(Qn), s = Array.from(o).filter((r) => r.getAttribute("tabindex") !== "-1");
248
- return [...new Set(n.concat(s))].filter((r) => D(r));
249
- }, rt = () => K(document.body, a.shown) && !K(document.body, a["toast-shown"]) && !K(document.body, a["no-backdrop"]), ze = () => {
285
+ }), o = t.querySelectorAll(ao), s = Array.from(o).filter((r) => r.getAttribute("tabindex") !== "-1");
286
+ return [...new Set(n.concat(s))].filter((r) => j(r));
287
+ }, at = () => K(document.body, l.shown) && !K(document.body, l["toast-shown"]) && !K(document.body, l["no-backdrop"]), De = () => {
250
288
  const t = S();
251
- return t ? K(t, a.toast) : !1;
252
- }, eo = () => {
289
+ return t ? K(t, l.toast) : !1;
290
+ }, lo = () => {
253
291
  const t = S();
254
292
  return t ? t.hasAttribute("data-loading") : !1;
255
- }, R = (t, e) => {
293
+ }, H = (t, e) => {
256
294
  if (t.textContent = "", e) {
257
295
  const o = new DOMParser().parseFromString(e, "text/html"), s = o.querySelector("head");
258
- s && Array.from(s.childNodes).forEach((d) => {
259
- t.appendChild(d);
296
+ s && Array.from(s.childNodes).forEach((a) => {
297
+ t.appendChild(a);
260
298
  });
261
299
  const r = o.querySelector("body");
262
- r && Array.from(r.childNodes).forEach((d) => {
263
- d instanceof HTMLVideoElement || d instanceof HTMLAudioElement ? t.appendChild(d.cloneNode(!0)) : t.appendChild(d);
300
+ r && Array.from(r.childNodes).forEach((a) => {
301
+ a instanceof HTMLVideoElement || a instanceof HTMLAudioElement ? t.appendChild(a.cloneNode(!0)) : t.appendChild(a);
264
302
  });
265
303
  }
266
304
  }, K = (t, e) => {
@@ -271,12 +309,12 @@ const qn = 100, p = {}, Kn = () => {
271
309
  if (!t.classList.contains(n[o]))
272
310
  return !1;
273
311
  return !0;
274
- }, to = (t, e) => {
312
+ }, co = (t, e) => {
275
313
  Array.from(t.classList).forEach((n) => {
276
- !Object.values(a).includes(n) && !Object.values(Ee).includes(n) && !Object.values(e.showClass || {}).includes(n) && t.classList.remove(n);
314
+ !Object.values(l).includes(n) && !Object.values(Le).includes(n) && !Object.values(e.showClass || {}).includes(n) && t.classList.remove(n);
277
315
  });
278
316
  }, U = (t, e, n) => {
279
- if (to(t, e), !e.customClass)
317
+ if (co(t, e), !e.customClass)
280
318
  return;
281
319
  const o = e.customClass[
282
320
  /** @type {keyof SweetAlertCustomClass} */
@@ -296,31 +334,31 @@ const qn = 100, p = {}, Kn = () => {
296
334
  case "select":
297
335
  case "textarea":
298
336
  case "file":
299
- return t.querySelector(`.${a.popup} > .${a[e]}`);
337
+ return t.querySelector(`.${l.popup} > .${l[e]}`);
300
338
  case "checkbox":
301
- return t.querySelector(`.${a.popup} > .${a.checkbox} input`);
339
+ return t.querySelector(`.${l.popup} > .${l.checkbox} input`);
302
340
  case "radio":
303
- return t.querySelector(`.${a.popup} > .${a.radio} input:checked`) || t.querySelector(`.${a.popup} > .${a.radio} input:first-child`);
341
+ return t.querySelector(`.${l.popup} > .${l.radio} input:checked`) || t.querySelector(`.${l.popup} > .${l.radio} input:first-child`);
304
342
  case "range":
305
- return t.querySelector(`.${a.popup} > .${a.range} input`);
343
+ return t.querySelector(`.${l.popup} > .${l.range} input`);
306
344
  default:
307
- return t.querySelector(`.${a.popup} > .${a.input}`);
345
+ return t.querySelector(`.${l.popup} > .${l.input}`);
308
346
  }
309
- }, Ut = (t) => {
347
+ }, Ft = (t) => {
310
348
  if (t.focus(), t.type !== "file") {
311
349
  const e = t.value;
312
350
  t.value = "", t.value = e;
313
351
  }
314
- }, Ht = (t, e, n) => {
352
+ }, qt = (t, e, n) => {
315
353
  !t || !e || (typeof e == "string" && (e = e.split(/\s+/).filter(Boolean)), e.forEach((o) => {
316
354
  Array.isArray(t) ? t.forEach((s) => {
317
355
  n ? s.classList.add(o) : s.classList.remove(o);
318
356
  }) : n ? t.classList.add(o) : t.classList.remove(o);
319
357
  }));
320
358
  }, L = (t, e) => {
321
- Ht(t, e, !0);
359
+ qt(t, e, !0);
322
360
  }, V = (t, e) => {
323
- Ht(t, e, !1);
361
+ qt(t, e, !1);
324
362
  }, G = (t, e) => {
325
363
  const n = Array.from(t.children);
326
364
  for (let o = 0; o < n.length; o++) {
@@ -337,99 +375,99 @@ const qn = 100, p = {}, Kn = () => {
337
375
  t && (t.style.display = e);
338
376
  }, N = (t) => {
339
377
  t && (t.style.display = "none");
340
- }, it = (t, e = "block") => {
378
+ }, lt = (t, e = "block") => {
341
379
  t && new MutationObserver(() => {
342
- ge(t, t.innerHTML, e);
380
+ me(t, t.innerHTML, e);
343
381
  }).observe(t, {
344
382
  childList: !0,
345
383
  subtree: !0
346
384
  });
347
- }, yt = (t, e, n, o) => {
385
+ }, xt = (t, e, n, o) => {
348
386
  const s = t.querySelector(e);
349
387
  s && s.style.setProperty(n, o);
350
- }, ge = (t, e, n = "flex") => {
388
+ }, me = (t, e, n = "flex") => {
351
389
  e ? M(t, n) : N(t);
352
- }, D = (t) => !!(t && (t.offsetWidth || t.offsetHeight || t.getClientRects().length)), no = () => !D(q()) && !D(te()) && !D(ae()), Ke = (t) => t.scrollHeight > t.clientHeight, oo = (t, e) => {
390
+ }, j = (t) => !!(t && (t.offsetWidth || t.offsetHeight || t.getClientRects().length)), uo = () => !j(q()) && !j(te()) && !j(le()), Ge = (t) => t.scrollHeight > t.clientHeight, ho = (t, e) => {
353
391
  let n = (
354
392
  /** @type {HTMLElement | null} */
355
393
  t
356
394
  );
357
395
  for (; n && n !== e; ) {
358
- if (Ke(n))
396
+ if (Ge(n))
359
397
  return !0;
360
398
  n = n.parentElement;
361
399
  }
362
400
  return !1;
363
- }, Rt = (t) => {
401
+ }, Kt = (t) => {
364
402
  const e = window.getComputedStyle(t), n = parseFloat(e.getPropertyValue("animation-duration") || "0"), o = parseFloat(e.getPropertyValue("transition-duration") || "0");
365
403
  return n > 0 || o > 0;
366
- }, at = (t, e = !1) => {
367
- const n = Ne();
368
- n && D(n) && (e && (n.style.transition = "none", n.style.width = "100%"), setTimeout(() => {
404
+ }, ct = (t, e = !1) => {
405
+ const n = ze();
406
+ n && j(n) && (e && (n.style.transition = "none", n.style.width = "100%"), setTimeout(() => {
369
407
  n.style.transition = `width ${t / 1e3}s linear`, n.style.width = "0%";
370
408
  }, 10));
371
- }, so = () => {
372
- const t = Ne();
409
+ }, wo = () => {
410
+ const t = ze();
373
411
  if (!t)
374
412
  return;
375
413
  const e = parseInt(window.getComputedStyle(t).width);
376
414
  t.style.removeProperty("transition"), t.style.width = "100%";
377
415
  const n = parseInt(window.getComputedStyle(t).width), o = e / n * 100;
378
416
  t.style.width = `${o}%`;
379
- }, ro = () => typeof window > "u" || typeof document > "u", io = `
380
- <div aria-labelledby="${a.title}" aria-describedby="${a["html-container"]}" class="${a.popup}" tabindex="-1">
381
- <button type="button" class="${a.close}"></button>
382
- <ul class="${a["progress-steps"]}"></ul>
383
- <div class="${a.icon}"></div>
384
- <img class="${a.image}" />
385
- <h2 class="${a.title}" id="${a.title}"></h2>
386
- <div class="${a["html-container"]}" id="${a["html-container"]}"></div>
387
- <input class="${a.input}" id="${a.input}" />
388
- <input type="file" class="${a.file}" />
389
- <div class="${a.range}">
417
+ }, fo = () => typeof window > "u" || typeof document > "u", po = `
418
+ <div aria-labelledby="${l.title}" aria-describedby="${l["html-container"]}" class="${l.popup}" tabindex="-1">
419
+ <button type="button" class="${l.close}"></button>
420
+ <ul class="${l["progress-steps"]}"></ul>
421
+ <div class="${l.icon}"></div>
422
+ <img class="${l.image}" />
423
+ <h2 class="${l.title}" id="${l.title}"></h2>
424
+ <div class="${l["html-container"]}" id="${l["html-container"]}"></div>
425
+ <input class="${l.input}" id="${l.input}" />
426
+ <input type="file" class="${l.file}" />
427
+ <div class="${l.range}">
390
428
  <input type="range" />
391
429
  <output></output>
392
430
  </div>
393
- <select class="${a.select}" id="${a.select}"></select>
394
- <div class="${a.radio}"></div>
395
- <label class="${a.checkbox}">
396
- <input type="checkbox" id="${a.checkbox}" />
397
- <span class="${a.label}"></span>
431
+ <select class="${l.select}" id="${l.select}"></select>
432
+ <div class="${l.radio}"></div>
433
+ <label class="${l.checkbox}">
434
+ <input type="checkbox" id="${l.checkbox}" />
435
+ <span class="${l.label}"></span>
398
436
  </label>
399
- <textarea class="${a.textarea}" id="${a.textarea}"></textarea>
400
- <div class="${a["validation-message"]}" id="${a["validation-message"]}"></div>
401
- <div class="${a.actions}">
402
- <div class="${a.loader}"></div>
403
- <button type="button" class="${a.confirm}"></button>
404
- <button type="button" class="${a.deny}"></button>
405
- <button type="button" class="${a.cancel}"></button>
437
+ <textarea class="${l.textarea}" id="${l.textarea}"></textarea>
438
+ <div class="${l["validation-message"]}" id="${l["validation-message"]}"></div>
439
+ <div class="${l.actions}">
440
+ <div class="${l.loader}"></div>
441
+ <button type="button" class="${l.confirm}"></button>
442
+ <button type="button" class="${l.deny}"></button>
443
+ <button type="button" class="${l.cancel}"></button>
406
444
  </div>
407
- <div class="${a.footer}"></div>
408
- <div class="${a["timer-progress-bar-container"]}">
409
- <div class="${a["timer-progress-bar"]}"></div>
445
+ <div class="${l.footer}"></div>
446
+ <div class="${l["timer-progress-bar-container"]}">
447
+ <div class="${l["timer-progress-bar"]}"></div>
410
448
  </div>
411
449
  </div>
412
- `.replace(/(^|\n)\s*/g, ""), ao = () => {
413
- const t = j();
450
+ `.replace(/(^|\n)\s*/g, ""), go = () => {
451
+ const t = D();
414
452
  return t ? (t.remove(), V([document.documentElement, document.body], [
415
- a["no-backdrop"],
416
- a["toast-shown"],
453
+ l["no-backdrop"],
454
+ l["toast-shown"],
417
455
  // @ts-ignore: 'has-column' is not defined in swalClasses but may be set dynamically
418
- a["has-column"]
456
+ l["has-column"]
419
457
  ]), !0) : !1;
420
458
  }, Z = () => {
421
459
  p.currentInstance && p.currentInstance.resetValidationMessage();
422
- }, lo = () => {
460
+ }, mo = () => {
423
461
  const t = S();
424
462
  if (!t)
425
463
  return;
426
- const e = G(t, a.input), n = G(t, a.file), o = t.querySelector(`.${a.range} input`), s = t.querySelector(`.${a.range} output`), r = G(t, a.select), d = t.querySelector(`.${a.checkbox} input`), c = G(t, a.textarea);
427
- e && (e.oninput = Z), n && (n.onchange = Z), r && (r.onchange = Z), d && (d.onchange = Z), c && (c.oninput = Z), o && s && (o.oninput = () => {
464
+ const e = G(t, l.input), n = G(t, l.file), o = t.querySelector(`.${l.range} input`), s = t.querySelector(`.${l.range} output`), r = G(t, l.select), a = t.querySelector(`.${l.checkbox} input`), c = G(t, l.textarea);
465
+ e && (e.oninput = Z), n && (n.onchange = Z), r && (r.onchange = Z), a && (a.onchange = Z), c && (c.oninput = Z), o && s && (o.oninput = () => {
428
466
  Z(), s.value = o.value;
429
467
  }, o.onchange = () => {
430
468
  Z(), s.value = o.value;
431
469
  });
432
- }, co = (t) => {
470
+ }, bo = (t) => {
433
471
  if (typeof t == "string") {
434
472
  const e = document.querySelector(t);
435
473
  if (!e)
@@ -440,182 +478,182 @@ const qn = 100, p = {}, Kn = () => {
440
478
  );
441
479
  }
442
480
  return t;
443
- }, uo = (t) => {
481
+ }, yo = (t) => {
444
482
  const e = S();
445
483
  e && (e.setAttribute("role", t.toast ? "alert" : "dialog"), e.setAttribute("aria-live", t.toast ? "polite" : "assertive"), t.toast || e.setAttribute("aria-modal", "true"));
446
- }, ho = (t) => {
447
- window.getComputedStyle(t).direction === "rtl" && (L(j(), a.rtl), p.isRTL = !0);
448
- }, wo = (t) => {
449
- const e = ao();
450
- if (ro()) {
484
+ }, vo = (t) => {
485
+ window.getComputedStyle(t).direction === "rtl" && (L(D(), l.rtl), p.isRTL = !0);
486
+ }, Co = (t) => {
487
+ const e = go();
488
+ if (fo()) {
451
489
  ee("SweetAlert2 requires document to initialize");
452
490
  return;
453
491
  }
454
492
  const n = document.createElement("div");
455
- n.className = a.container, e && L(n, a["no-transition"]), R(n, io), n.dataset.swal2Theme = t.theme;
456
- const o = co(t.target || "body");
457
- o.appendChild(n), t.topLayer && (n.setAttribute("popover", ""), n.showPopover()), uo(t), ho(o), lo();
458
- }, lt = (t, e) => {
459
- t instanceof HTMLElement ? e.appendChild(t) : typeof t == "object" ? fo(t, e) : t && R(e, t);
460
- }, fo = (t, e) => {
461
- "jquery" in t ? po(e, t) : R(e, t.toString());
462
- }, po = (t, e) => {
493
+ n.className = l.container, e && L(n, l["no-transition"]), H(n, po), n.dataset.swal2Theme = t.theme;
494
+ const o = bo(t.target || "body");
495
+ o.appendChild(n), t.topLayer && (n.setAttribute("popover", ""), n.showPopover()), yo(t), vo(o), mo();
496
+ }, ut = (t, e) => {
497
+ t instanceof HTMLElement ? e.appendChild(t) : typeof t == "object" ? ko(t, e) : t && H(e, t);
498
+ }, ko = (t, e) => {
499
+ "jquery" in t ? xo(e, t) : H(e, t.toString());
500
+ }, xo = (t, e) => {
463
501
  if (t.textContent = "", 0 in e)
464
502
  for (let n = 0; n in e; n++)
465
503
  t.appendChild(e[n].cloneNode(!0));
466
504
  else
467
505
  t.appendChild(e.cloneNode(!0));
468
- }, go = (t, e) => {
469
- const n = pe(), o = le();
470
- !n || !o || (!e.showConfirmButton && !e.showDenyButton && !e.showCancelButton ? N(n) : M(n), U(n, e, "actions"), mo(n, o, e), R(o, e.loaderHtml || ""), U(o, e, "loader"));
506
+ }, Ao = (t, e) => {
507
+ const n = ge(), o = ce();
508
+ !n || !o || (!e.showConfirmButton && !e.showDenyButton && !e.showCancelButton ? N(n) : M(n), U(n, e, "actions"), Eo(n, o, e), H(o, e.loaderHtml || ""), U(o, e, "loader"));
471
509
  };
472
- function mo(t, e, n) {
473
- const o = q(), s = te(), r = ae();
474
- !o || !s || !r || (He(o, "confirm", n), He(s, "deny", n), He(r, "cancel", n), bo(o, s, r, n), n.reverseButtons && (n.toast ? (t.insertBefore(r, o), t.insertBefore(s, o)) : (t.insertBefore(r, e), t.insertBefore(s, e), t.insertBefore(o, e))));
510
+ function Eo(t, e, n) {
511
+ const o = q(), s = te(), r = le();
512
+ !o || !s || !r || (Ve(o, "confirm", n), Ve(s, "deny", n), Ve(r, "cancel", n), Lo(o, s, r, n), n.reverseButtons && (n.toast ? (t.insertBefore(r, o), t.insertBefore(s, o)) : (t.insertBefore(r, e), t.insertBefore(s, e), t.insertBefore(o, e))));
475
513
  }
476
- function bo(t, e, n, o) {
514
+ function Lo(t, e, n, o) {
477
515
  if (!o.buttonsStyling) {
478
- V([t, e, n], a.styled);
516
+ V([t, e, n], l.styled);
479
517
  return;
480
518
  }
481
- L([t, e, n], a.styled), o.confirmButtonColor && t.style.setProperty("--swal2-confirm-button-background-color", o.confirmButtonColor), o.denyButtonColor && e.style.setProperty("--swal2-deny-button-background-color", o.denyButtonColor), o.cancelButtonColor && n.style.setProperty("--swal2-cancel-button-background-color", o.cancelButtonColor), Ue(t), Ue(e), Ue(n);
519
+ L([t, e, n], l.styled), o.confirmButtonColor && t.style.setProperty("--swal2-confirm-button-background-color", o.confirmButtonColor), o.denyButtonColor && e.style.setProperty("--swal2-deny-button-background-color", o.denyButtonColor), o.cancelButtonColor && n.style.setProperty("--swal2-cancel-button-background-color", o.cancelButtonColor), He(t), He(e), He(n);
482
520
  }
483
- function Ue(t) {
521
+ function He(t) {
484
522
  const e = window.getComputedStyle(t);
485
523
  if (e.getPropertyValue("--swal2-action-button-focus-box-shadow"))
486
524
  return;
487
525
  const n = e.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/, "rgba($1, $2, $3, 0.5)");
488
526
  t.style.setProperty("--swal2-action-button-focus-box-shadow", e.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/, ` ${n}`));
489
527
  }
490
- function He(t, e, n) {
528
+ function Ve(t, e, n) {
491
529
  const o = (
492
530
  /** @type {'Confirm' | 'Deny' | 'Cancel'} */
493
- Je(e)
531
+ et(e)
494
532
  );
495
- ge(t, n[`show${o}Button`], "inline-block"), R(t, n[`${e}ButtonText`] || ""), t.setAttribute("aria-label", n[`${e}ButtonAriaLabel`] || ""), t.className = a[e], U(t, n, `${e}Button`);
533
+ me(t, n[`show${o}Button`], "inline-block"), H(t, n[`${e}ButtonText`] || ""), t.setAttribute("aria-label", n[`${e}ButtonAriaLabel`] || ""), t.className = l[e], U(t, n, `${e}Button`);
496
534
  }
497
- const yo = (t, e) => {
498
- const n = ot();
499
- n && (R(n, e.closeButtonHtml || ""), U(n, e, "closeButton"), ge(n, e.showCloseButton), n.setAttribute("aria-label", e.closeButtonAriaLabel || ""));
500
- }, vo = (t, e) => {
501
- const n = j();
502
- n && (Co(n, e.backdrop), ko(n, e.position), xo(n, e.grow), U(n, e, "container"));
535
+ const So = (t, e) => {
536
+ const n = rt();
537
+ n && (H(n, e.closeButtonHtml || ""), U(n, e, "closeButton"), me(n, e.showCloseButton), n.setAttribute("aria-label", e.closeButtonAriaLabel || ""));
538
+ }, To = (t, e) => {
539
+ const n = D();
540
+ n && (_o(n, e.backdrop), Io(n, e.position), $o(n, e.grow), U(n, e, "container"));
503
541
  };
504
- function Co(t, e) {
505
- typeof e == "string" ? t.style.background = e : e || L([document.documentElement, document.body], a["no-backdrop"]);
542
+ function _o(t, e) {
543
+ typeof e == "string" ? t.style.background = e : e || L([document.documentElement, document.body], l["no-backdrop"]);
506
544
  }
507
- function ko(t, e) {
508
- e && (e in a ? L(t, a[e]) : (z('The "position" parameter is not valid, defaulting to "center"'), L(t, a.center)));
545
+ function Io(t, e) {
546
+ e && (e in l ? L(t, l[e]) : (z('The "position" parameter is not valid, defaulting to "center"'), L(t, l.center)));
509
547
  }
510
- function xo(t, e) {
511
- e && L(t, a[`grow-${e}`]);
548
+ function $o(t, e) {
549
+ e && L(t, l[`grow-${e}`]);
512
550
  }
513
- var _ = {
551
+ var I = {
514
552
  innerParams: /* @__PURE__ */ new WeakMap(),
515
553
  domCache: /* @__PURE__ */ new WeakMap()
516
554
  };
517
- const Ao = ["input", "file", "range", "select", "radio", "checkbox", "textarea"], Eo = (t, e) => {
555
+ const Bo = ["input", "file", "range", "select", "radio", "checkbox", "textarea"], Po = (t, e) => {
518
556
  const n = S();
519
557
  if (!n)
520
558
  return;
521
- const o = _.innerParams.get(t), s = !o || e.input !== o.input;
522
- Ao.forEach((r) => {
523
- const d = G(n, a[r]);
524
- d && (To(r, e.inputAttributes), d.className = a[r], s && N(d));
525
- }), e.input && (s && Lo(e), _o(e));
526
- }, Lo = (t) => {
559
+ const o = I.innerParams.get(t), s = !o || e.input !== o.input;
560
+ Bo.forEach((r) => {
561
+ const a = G(n, l[r]);
562
+ a && (No(r, e.inputAttributes), a.className = l[r], s && N(a));
563
+ }), e.input && (s && Mo(e), zo(e));
564
+ }, Mo = (t) => {
527
565
  if (!t.input)
528
566
  return;
529
- if (!I[t.input]) {
530
- ee(`Unexpected type of input! Expected ${Object.keys(I).join(" | ")}, got "${t.input}"`);
567
+ if (!B[t.input]) {
568
+ ee(`Unexpected type of input! Expected ${Object.keys(B).join(" | ")}, got "${t.input}"`);
531
569
  return;
532
570
  }
533
- const e = Vt(t.input);
571
+ const e = Gt(t.input);
534
572
  if (!e)
535
573
  return;
536
- const n = I[t.input](e, t);
574
+ const n = B[t.input](e, t);
537
575
  M(e), t.inputAutoFocus && setTimeout(() => {
538
- Ut(n);
576
+ Ft(n);
539
577
  });
540
- }, So = (t) => {
578
+ }, Oo = (t) => {
541
579
  for (let e = 0; e < t.attributes.length; e++) {
542
580
  const n = t.attributes[e].name;
543
581
  ["id", "type", "value", "style"].includes(n) || t.removeAttribute(n);
544
582
  }
545
- }, To = (t, e) => {
583
+ }, No = (t, e) => {
546
584
  const n = S();
547
585
  if (!n)
548
586
  return;
549
587
  const o = je(n, t);
550
588
  if (o) {
551
- So(o);
589
+ Oo(o);
552
590
  for (const s in e)
553
591
  o.setAttribute(s, e[s]);
554
592
  }
555
- }, _o = (t) => {
593
+ }, zo = (t) => {
556
594
  if (!t.input)
557
595
  return;
558
- const e = Vt(t.input);
596
+ const e = Gt(t.input);
559
597
  e && U(e, t, "input");
560
- }, ct = (t, e) => {
598
+ }, dt = (t, e) => {
561
599
  !t.placeholder && e.inputPlaceholder && (t.placeholder = e.inputPlaceholder);
562
- }, me = (t, e, n) => {
600
+ }, be = (t, e, n) => {
563
601
  if (n.inputLabel) {
564
- const o = document.createElement("label"), s = a["input-label"];
602
+ const o = document.createElement("label"), s = l["input-label"];
565
603
  o.setAttribute("for", t.id), o.className = s, typeof n.customClass == "object" && L(o, n.customClass.inputLabel), o.innerText = n.inputLabel, e.insertAdjacentElement("beforebegin", o);
566
604
  }
567
- }, Vt = (t) => {
605
+ }, Gt = (t) => {
568
606
  const e = S();
569
607
  if (e)
570
- return G(e, a[
608
+ return G(e, l[
571
609
  /** @type {SwalClass} */
572
610
  t
573
- ] || a.input);
574
- }, Le = (t, e) => {
575
- ["string", "number"].includes(typeof e) ? t.value = `${e}` : et(e) || z(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e}"`);
576
- }, I = {};
577
- I.text = I.email = I.password = I.number = I.tel = I.url = I.search = I.date = I["datetime-local"] = I.time = I.week = I.month = /** @type {(input: Input | HTMLElement, params: SweetAlertOptions) => Input} */
611
+ ] || l.input);
612
+ }, Se = (t, e) => {
613
+ ["string", "number"].includes(typeof e) ? t.value = `${e}` : nt(e) || z(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e}"`);
614
+ }, B = {};
615
+ B.text = B.email = B.password = B.number = B.tel = B.url = B.search = B.date = B["datetime-local"] = B.time = B.week = B.month = /** @type {(input: Input | HTMLElement, params: SweetAlertOptions) => Input} */
578
616
  (t, e) => {
579
617
  const n = (
580
618
  /** @type {HTMLInputElement} */
581
619
  t
582
620
  );
583
- return Le(n, e.inputValue), me(n, n, e), ct(n, e), n.type = /** @type {string} */
621
+ return Se(n, e.inputValue), be(n, n, e), dt(n, e), n.type = /** @type {string} */
584
622
  e.input, n;
585
623
  };
586
- I.file = (t, e) => {
624
+ B.file = (t, e) => {
587
625
  const n = (
588
626
  /** @type {HTMLInputElement} */
589
627
  t
590
628
  );
591
- return me(n, n, e), ct(n, e), n;
629
+ return be(n, n, e), dt(n, e), n;
592
630
  };
593
- I.range = (t, e) => {
631
+ B.range = (t, e) => {
594
632
  const n = (
595
633
  /** @type {HTMLElement} */
596
634
  t
597
635
  ), o = n.querySelector("input"), s = n.querySelector("output");
598
- return o && (Le(o, e.inputValue), o.type = /** @type {string} */
599
- e.input, me(
636
+ return o && (Se(o, e.inputValue), o.type = /** @type {string} */
637
+ e.input, be(
600
638
  o,
601
639
  /** @type {Input} */
602
640
  t,
603
641
  e
604
- )), s && Le(s, e.inputValue), /** @type {Input} */
642
+ )), s && Se(s, e.inputValue), /** @type {Input} */
605
643
  t;
606
644
  };
607
- I.select = (t, e) => {
645
+ B.select = (t, e) => {
608
646
  const n = (
609
647
  /** @type {HTMLSelectElement} */
610
648
  t
611
649
  );
612
650
  if (n.textContent = "", e.inputPlaceholder) {
613
651
  const o = document.createElement("option");
614
- R(o, e.inputPlaceholder), o.value = "", o.disabled = !0, o.selected = !0, n.appendChild(o);
652
+ H(o, e.inputPlaceholder), o.value = "", o.disabled = !0, o.selected = !0, n.appendChild(o);
615
653
  }
616
- return me(n, n, e), n;
654
+ return be(n, n, e), n;
617
655
  };
618
- I.radio = (t) => {
656
+ B.radio = (t) => {
619
657
  const e = (
620
658
  /** @type {HTMLElement} */
621
659
  t
@@ -623,7 +661,7 @@ I.radio = (t) => {
623
661
  return e.textContent = "", /** @type {Input} */
624
662
  t;
625
663
  };
626
- I.checkbox = (t, e) => {
664
+ B.checkbox = (t, e) => {
627
665
  const n = S();
628
666
  if (!n)
629
667
  throw new Error("Popup not found");
@@ -633,139 +671,139 @@ I.checkbox = (t, e) => {
633
671
  o.value = "1", o.checked = !!e.inputValue;
634
672
  const r = /** @type {HTMLElement} */ t.querySelector("span");
635
673
  if (r) {
636
- const d = e.inputPlaceholder || e.inputLabel;
637
- d && R(r, d);
674
+ const a = e.inputPlaceholder || e.inputLabel;
675
+ a && H(r, a);
638
676
  }
639
677
  return o;
640
678
  };
641
- I.textarea = (t, e) => {
679
+ B.textarea = (t, e) => {
642
680
  const n = (
643
681
  /** @type {HTMLTextAreaElement} */
644
682
  t
645
683
  );
646
- Le(n, e.inputValue), ct(n, e), me(n, n, e);
684
+ Se(n, e.inputValue), dt(n, e), be(n, n, e);
647
685
  const o = (s) => parseInt(window.getComputedStyle(s).marginLeft) + parseInt(window.getComputedStyle(s).marginRight);
648
686
  return setTimeout(() => {
649
687
  if ("MutationObserver" in window) {
650
688
  const s = S();
651
689
  if (!s)
652
690
  return;
653
- const r = parseInt(window.getComputedStyle(s).width), d = () => {
691
+ const r = parseInt(window.getComputedStyle(s).width), a = () => {
654
692
  if (!document.body.contains(n))
655
693
  return;
656
694
  const c = n.offsetWidth + o(n), i = S();
657
695
  i && (c > r ? i.style.width = `${c}px` : J(i, "width", e.width));
658
696
  };
659
- new MutationObserver(d).observe(n, {
697
+ new MutationObserver(a).observe(n, {
660
698
  attributes: !0,
661
699
  attributeFilter: ["style"]
662
700
  });
663
701
  }
664
702
  }), n;
665
703
  };
666
- const $o = (t, e) => {
667
- const n = tt();
668
- n && (it(n), U(n, e, "htmlContainer"), e.html ? (lt(e.html, n), M(n, "block")) : e.text ? (n.textContent = e.text, M(n, "block")) : N(n), Eo(t, e));
669
- }, Bo = (t, e) => {
670
- const n = Dt();
671
- n && (it(n), ge(n, !!e.footer, "block"), e.footer && lt(e.footer, n), U(n, e, "footer"));
672
- }, Io = (t, e) => {
673
- const n = _.innerParams.get(t), o = ie();
704
+ const Do = (t, e) => {
705
+ const n = ot();
706
+ n && (lt(n), U(n, e, "htmlContainer"), e.html ? (ut(e.html, n), M(n, "block")) : e.text ? (n.textContent = e.text, M(n, "block")) : N(n), Po(t, e));
707
+ }, jo = (t, e) => {
708
+ const n = Vt();
709
+ n && (lt(n), me(n, !!e.footer, "block"), e.footer && ut(e.footer, n), U(n, e, "footer"));
710
+ }, Uo = (t, e) => {
711
+ const n = I.innerParams.get(t), o = ae();
674
712
  if (!o)
675
713
  return;
676
714
  if (n && e.icon === n.icon) {
677
- Ct(o, e), vt(o, e);
715
+ Et(o, e), At(o, e);
678
716
  return;
679
717
  }
680
718
  if (!e.icon && !e.iconHtml) {
681
719
  N(o);
682
720
  return;
683
721
  }
684
- if (e.icon && Object.keys(Ee).indexOf(e.icon) === -1) {
722
+ if (e.icon && Object.keys(Le).indexOf(e.icon) === -1) {
685
723
  ee(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`), N(o);
686
724
  return;
687
725
  }
688
- M(o), Ct(o, e), vt(o, e), L(o, e.showClass && e.showClass.icon), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", Ft);
689
- }, vt = (t, e) => {
690
- for (const [n, o] of Object.entries(Ee))
726
+ M(o), Et(o, e), At(o, e), L(o, e.showClass && e.showClass.icon), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", Wt);
727
+ }, At = (t, e) => {
728
+ for (const [n, o] of Object.entries(Le))
691
729
  e.icon !== n && V(t, o);
692
- L(t, e.icon && Ee[e.icon]), Oo(t, e), Ft(), U(t, e, "icon");
693
- }, Ft = () => {
730
+ L(t, e.icon && Le[e.icon]), Vo(t, e), Wt(), U(t, e, "icon");
731
+ }, Wt = () => {
694
732
  const t = S();
695
733
  if (!t)
696
734
  return;
697
735
  const e = window.getComputedStyle(t).getPropertyValue("background-color"), n = t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");
698
736
  for (let o = 0; o < n.length; o++)
699
737
  n[o].style.backgroundColor = e;
700
- }, Po = (t) => `
738
+ }, Ro = (t) => `
701
739
  ${t.animation ? '<div class="swal2-success-circular-line-left"></div>' : ""}
702
740
  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
703
741
  <div class="swal2-success-ring"></div>
704
742
  ${t.animation ? '<div class="swal2-success-fix"></div>' : ""}
705
743
  ${t.animation ? '<div class="swal2-success-circular-line-right"></div>' : ""}
706
- `, Mo = `
744
+ `, Ho = `
707
745
  <span class="swal2-x-mark">
708
746
  <span class="swal2-x-mark-line-left"></span>
709
747
  <span class="swal2-x-mark-line-right"></span>
710
748
  </span>
711
- `, Ct = (t, e) => {
749
+ `, Et = (t, e) => {
712
750
  if (!e.icon && !e.iconHtml)
713
751
  return;
714
752
  let n = t.innerHTML, o = "";
715
- e.iconHtml ? o = kt(e.iconHtml) : e.icon === "success" ? (o = Po(e), n = n.replace(/ style=".*?"/g, "")) : e.icon === "error" ? o = Mo : e.icon && (o = kt({
753
+ e.iconHtml ? o = Lt(e.iconHtml) : e.icon === "success" ? (o = Ro(e), n = n.replace(/ style=".*?"/g, "")) : e.icon === "error" ? o = Ho : e.icon && (o = Lt({
716
754
  question: "?",
717
755
  warning: "!",
718
756
  info: "i"
719
- }[e.icon])), n.trim() !== o.trim() && R(t, o);
720
- }, Oo = (t, e) => {
757
+ }[e.icon])), n.trim() !== o.trim() && H(t, o);
758
+ }, Vo = (t, e) => {
721
759
  if (e.iconColor) {
722
760
  t.style.color = e.iconColor, t.style.borderColor = e.iconColor;
723
761
  for (const n of [".swal2-success-line-tip", ".swal2-success-line-long", ".swal2-x-mark-line-left", ".swal2-x-mark-line-right"])
724
- yt(t, n, "background-color", e.iconColor);
725
- yt(t, ".swal2-success-ring", "border-color", e.iconColor);
762
+ xt(t, n, "background-color", e.iconColor);
763
+ xt(t, ".swal2-success-ring", "border-color", e.iconColor);
726
764
  }
727
- }, kt = (t) => `<div class="${a["icon-content"]}">${t}</div>`, No = (t, e) => {
728
- const n = jt();
765
+ }, Lt = (t) => `<div class="${l["icon-content"]}">${t}</div>`, Fo = (t, e) => {
766
+ const n = Ht();
729
767
  if (n) {
730
768
  if (!e.imageUrl) {
731
769
  N(n);
732
770
  return;
733
771
  }
734
- M(n, ""), n.setAttribute("src", e.imageUrl), n.setAttribute("alt", e.imageAlt || ""), J(n, "width", e.imageWidth), J(n, "height", e.imageHeight), n.className = a.image, U(n, e, "image");
772
+ M(n, ""), n.setAttribute("src", e.imageUrl), n.setAttribute("alt", e.imageAlt || ""), J(n, "width", e.imageWidth), J(n, "height", e.imageHeight), n.className = l.image, U(n, e, "image");
735
773
  }
736
774
  };
737
- let dt = !1, qt = 0, Kt = 0, Gt = 0, Wt = 0;
738
- const zo = (t) => {
739
- t.addEventListener("mousedown", Se), document.body.addEventListener("mousemove", Te), t.addEventListener("mouseup", _e), t.addEventListener("touchstart", Se), document.body.addEventListener("touchmove", Te), t.addEventListener("touchend", _e);
740
- }, jo = (t) => {
741
- t.removeEventListener("mousedown", Se), document.body.removeEventListener("mousemove", Te), t.removeEventListener("mouseup", _e), t.removeEventListener("touchstart", Se), document.body.removeEventListener("touchmove", Te), t.removeEventListener("touchend", _e);
742
- }, Se = (t) => {
775
+ let ht = !1, Yt = 0, Zt = 0, Xt = 0, Jt = 0;
776
+ const qo = (t) => {
777
+ t.addEventListener("mousedown", Te), document.body.addEventListener("mousemove", _e), t.addEventListener("mouseup", Ie), t.addEventListener("touchstart", Te), document.body.addEventListener("touchmove", _e), t.addEventListener("touchend", Ie);
778
+ }, Ko = (t) => {
779
+ t.removeEventListener("mousedown", Te), document.body.removeEventListener("mousemove", _e), t.removeEventListener("mouseup", Ie), t.removeEventListener("touchstart", Te), document.body.removeEventListener("touchmove", _e), t.removeEventListener("touchend", Ie);
780
+ }, Te = (t) => {
743
781
  const e = S();
744
782
  if (!e)
745
783
  return;
746
- const n = ie();
784
+ const n = ae();
747
785
  if (t.target === e || n && n.contains(
748
786
  /** @type {HTMLElement} */
749
787
  t.target
750
788
  )) {
751
- dt = !0;
752
- const o = Yt(t);
753
- qt = o.clientX, Kt = o.clientY, Gt = parseInt(e.style.insetInlineStart) || 0, Wt = parseInt(e.style.insetBlockStart) || 0, L(e, "swal2-dragging");
789
+ ht = !0;
790
+ const o = Qt(t);
791
+ Yt = o.clientX, Zt = o.clientY, Xt = parseInt(e.style.insetInlineStart) || 0, Jt = parseInt(e.style.insetBlockStart) || 0, L(e, "swal2-dragging");
754
792
  }
755
- }, Te = (t) => {
793
+ }, _e = (t) => {
756
794
  const e = S();
757
- if (e && dt) {
795
+ if (e && ht) {
758
796
  let {
759
797
  clientX: n,
760
798
  clientY: o
761
- } = Yt(t);
762
- const s = n - qt;
763
- e.style.insetInlineStart = `${Gt + (p.isRTL ? -s : s)}px`, e.style.insetBlockStart = `${Wt + (o - Kt)}px`;
799
+ } = Qt(t);
800
+ const s = n - Yt;
801
+ e.style.insetInlineStart = `${Xt + (p.isRTL ? -s : s)}px`, e.style.insetBlockStart = `${Jt + (o - Zt)}px`;
764
802
  }
765
- }, _e = () => {
803
+ }, Ie = () => {
766
804
  const t = S();
767
- dt = !1, V(t, "swal2-dragging");
768
- }, Yt = (t) => {
805
+ ht = !1, V(t, "swal2-dragging");
806
+ }, Qt = (t) => {
769
807
  let e = 0, n = 0;
770
808
  return t.type.startsWith("mouse") ? (e = /** @type {MouseEvent} */
771
809
  t.clientX, n = /** @type {MouseEvent} */
@@ -775,22 +813,22 @@ const zo = (t) => {
775
813
  clientX: e,
776
814
  clientY: n
777
815
  };
778
- }, Do = (t, e) => {
779
- const n = j(), o = S();
816
+ }, Go = (t, e) => {
817
+ const n = D(), o = S();
780
818
  if (!(!n || !o)) {
781
819
  if (e.toast) {
782
820
  J(n, "width", e.width), o.style.width = "100%";
783
- const s = le();
784
- s && o.insertBefore(s, ie());
821
+ const s = ce();
822
+ s && o.insertBefore(s, ae());
785
823
  } else
786
824
  J(o, "width", e.width);
787
- J(o, "padding", e.padding), e.color && (o.style.color = e.color), e.background && (o.style.background = e.background), N(Oe()), Uo(o, e), e.draggable && !e.toast ? (L(o, a.draggable), zo(o)) : (V(o, a.draggable), jo(o));
825
+ J(o, "padding", e.padding), e.color && (o.style.color = e.color), e.background && (o.style.background = e.background), N(Ne()), Wo(o, e), e.draggable && !e.toast ? (L(o, l.draggable), qo(o)) : (V(o, l.draggable), Ko(o));
788
826
  }
789
- }, Uo = (t, e) => {
827
+ }, Wo = (t, e) => {
790
828
  const n = e.showClass || {};
791
- t.className = `${a.popup} ${D(t) ? n.popup : ""}`, e.toast ? (L([document.documentElement, document.body], a["toast-shown"]), L(t, a.toast)) : L(t, a.modal), U(t, e, "popup"), typeof e.customClass == "string" && L(t, e.customClass), e.icon && L(t, a[`icon-${e.icon}`]);
792
- }, Ho = (t, e) => {
793
- const n = nt();
829
+ t.className = `${l.popup} ${j(t) ? n.popup : ""}`, e.toast ? (L([document.documentElement, document.body], l["toast-shown"]), L(t, l.toast)) : L(t, l.modal), U(t, e, "popup"), typeof e.customClass == "string" && L(t, e.customClass), e.icon && L(t, l[`icon-${e.icon}`]);
830
+ }, Yo = (t, e) => {
831
+ const n = st();
794
832
  if (!n)
795
833
  return;
796
834
  const {
@@ -801,43 +839,43 @@ const zo = (t) => {
801
839
  N(n);
802
840
  return;
803
841
  }
804
- M(n), n.textContent = "", s >= o.length && z("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"), o.forEach((r, d) => {
805
- const c = Ro(r);
806
- if (n.appendChild(c), d === s && L(c, a["active-progress-step"]), d !== o.length - 1) {
807
- const i = Vo(e);
842
+ M(n), n.textContent = "", s >= o.length && z("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"), o.forEach((r, a) => {
843
+ const c = Zo(r);
844
+ if (n.appendChild(c), a === s && L(c, l["active-progress-step"]), a !== o.length - 1) {
845
+ const i = Xo(e);
808
846
  n.appendChild(i);
809
847
  }
810
848
  });
811
- }, Ro = (t) => {
849
+ }, Zo = (t) => {
812
850
  const e = document.createElement("li");
813
- return L(e, a["progress-step"]), R(e, t), e;
814
- }, Vo = (t) => {
851
+ return L(e, l["progress-step"]), H(e, t), e;
852
+ }, Xo = (t) => {
815
853
  const e = document.createElement("li");
816
- return L(e, a["progress-step-line"]), t.progressStepsDistance && J(e, "width", t.progressStepsDistance), e;
817
- }, Fo = (t, e) => {
818
- const n = zt();
819
- n && (it(n), ge(n, !!(e.title || e.titleText), "block"), e.title && lt(e.title, n), e.titleText && (n.innerText = e.titleText), U(n, e, "title"));
820
- }, Zt = (t, e) => {
854
+ return L(e, l["progress-step-line"]), t.progressStepsDistance && J(e, "width", t.progressStepsDistance), e;
855
+ }, Jo = (t, e) => {
856
+ const n = Rt();
857
+ n && (lt(n), me(n, !!(e.title || e.titleText), "block"), e.title && ut(e.title, n), e.titleText && (n.innerText = e.titleText), U(n, e, "title"));
858
+ }, en = (t, e) => {
821
859
  var n;
822
- Do(t, e), vo(t, e), Ho(t, e), Io(t, e), No(t, e), Fo(t, e), yo(t, e), $o(t, e), go(t, e), Bo(t, e);
860
+ Go(t, e), To(t, e), Yo(t, e), Uo(t, e), Fo(t, e), Jo(t, e), So(t, e), Do(t, e), Ao(t, e), jo(t, e);
823
861
  const o = S();
824
862
  typeof e.didRender == "function" && o && e.didRender(o), (n = p.eventEmitter) === null || n === void 0 || n.emit("didRender", o);
825
- }, qo = () => D(S()), Xt = () => {
863
+ }, Qo = () => j(S()), tn = () => {
826
864
  var t;
827
865
  return (t = q()) === null || t === void 0 ? void 0 : t.click();
828
- }, Ko = () => {
866
+ }, es = () => {
829
867
  var t;
830
868
  return (t = te()) === null || t === void 0 ? void 0 : t.click();
831
- }, Go = () => {
869
+ }, ts = () => {
832
870
  var t;
833
- return (t = ae()) === null || t === void 0 ? void 0 : t.click();
834
- }, ce = Object.freeze({
871
+ return (t = le()) === null || t === void 0 ? void 0 : t.click();
872
+ }, ue = Object.freeze({
835
873
  cancel: "cancel",
836
874
  backdrop: "backdrop",
837
875
  close: "close",
838
876
  esc: "esc",
839
877
  timer: "timer"
840
- }), Jt = (t) => {
878
+ }), nn = (t) => {
841
879
  if (t.keydownTarget && t.keydownHandlerAdded && t.keydownHandler) {
842
880
  const e = (
843
881
  /** @type {EventListenerOrEventListenerObject} */
@@ -848,9 +886,9 @@ const zo = (t) => {
848
886
  capture: t.keydownListenerCapture
849
887
  }), t.keydownHandlerAdded = !1;
850
888
  }
851
- }, Wo = (t, e, n) => {
852
- if (Jt(t), !e.toast) {
853
- const o = (r) => Zo(e, r, n);
889
+ }, ns = (t, e, n) => {
890
+ if (nn(t), !e.toast) {
891
+ const o = (r) => ss(e, r, n);
854
892
  t.keydownHandler = o;
855
893
  const s = e.keydownListenerCapture ? window : S();
856
894
  if (s) {
@@ -865,18 +903,18 @@ const zo = (t) => {
865
903
  }), t.keydownHandlerAdded = !0;
866
904
  }
867
905
  }
868
- }, Ge = (t, e) => {
906
+ }, We = (t, e) => {
869
907
  var n;
870
- const o = st();
908
+ const o = it();
871
909
  if (o.length) {
872
910
  t = t + e, t === -2 && (t = o.length - 1), t === o.length ? t = 0 : t === -1 && (t = o.length - 1), o[t].focus();
873
911
  return;
874
912
  }
875
913
  (n = S()) === null || n === void 0 || n.focus();
876
- }, Qt = ["ArrowRight", "ArrowDown"], Yo = ["ArrowLeft", "ArrowUp"], Zo = (t, e, n) => {
877
- t && (e.isComposing || e.keyCode === 229 || (t.stopKeydownPropagation && e.stopPropagation(), e.key === "Enter" ? Xo(e, t) : e.key === "Tab" ? Jo(e) : [...Qt, ...Yo].includes(e.key) ? Qo(e.key) : e.key === "Escape" && es(e, t, n)));
878
- }, Xo = (t, e) => {
879
- if (!Me(e.allowEnterKey))
914
+ }, on = ["ArrowRight", "ArrowDown"], os = ["ArrowLeft", "ArrowUp"], ss = (t, e, n) => {
915
+ t && (e.isComposing || e.keyCode === 229 || (t.stopKeydownPropagation && e.stopPropagation(), e.key === "Enter" ? rs(e, t) : e.key === "Tab" ? is(e) : [...on, ...os].includes(e.key) ? as(e.key) : e.key === "Escape" && ls(e, t, n)));
916
+ }, rs = (t, e) => {
917
+ if (!Oe(e.allowEnterKey))
880
918
  return;
881
919
  const n = S();
882
920
  if (!n || !e.input)
@@ -885,120 +923,120 @@ const zo = (t) => {
885
923
  if (t.target && o && t.target instanceof HTMLElement && t.target.outerHTML === o.outerHTML) {
886
924
  if (["textarea", "file"].includes(e.input))
887
925
  return;
888
- Xt(), t.preventDefault();
926
+ tn(), t.preventDefault();
889
927
  }
890
- }, Jo = (t) => {
891
- const e = t.target, n = st();
928
+ }, is = (t) => {
929
+ const e = t.target, n = it();
892
930
  let o = -1;
893
931
  for (let s = 0; s < n.length; s++)
894
932
  if (e === n[s]) {
895
933
  o = s;
896
934
  break;
897
935
  }
898
- t.shiftKey ? Ge(o, -1) : Ge(o, 1), t.stopPropagation(), t.preventDefault();
899
- }, Qo = (t) => {
900
- const e = pe(), n = q(), o = te(), s = ae();
936
+ t.shiftKey ? We(o, -1) : We(o, 1), t.stopPropagation(), t.preventDefault();
937
+ }, as = (t) => {
938
+ const e = ge(), n = q(), o = te(), s = le();
901
939
  if (!e || !n || !o || !s)
902
940
  return;
903
941
  const r = [n, o, s];
904
942
  if (document.activeElement instanceof HTMLElement && !r.includes(document.activeElement))
905
943
  return;
906
- const d = Qt.includes(t) ? "nextElementSibling" : "previousElementSibling";
944
+ const a = on.includes(t) ? "nextElementSibling" : "previousElementSibling";
907
945
  let c = document.activeElement;
908
946
  if (c) {
909
947
  for (let i = 0; i < e.children.length; i++) {
910
- if (c = c[d], !c)
948
+ if (c = c[a], !c)
911
949
  return;
912
- if (c instanceof HTMLButtonElement && D(c))
950
+ if (c instanceof HTMLButtonElement && j(c))
913
951
  break;
914
952
  }
915
953
  c instanceof HTMLButtonElement && c.focus();
916
954
  }
917
- }, es = (t, e, n) => {
918
- t.preventDefault(), Me(e.allowEscapeKey) && n(ce.esc);
955
+ }, ls = (t, e, n) => {
956
+ t.preventDefault(), Oe(e.allowEscapeKey) && n(ue.esc);
919
957
  };
920
958
  var se = {
921
959
  swalPromiseResolve: /* @__PURE__ */ new WeakMap(),
922
960
  swalPromiseReject: /* @__PURE__ */ new WeakMap()
923
961
  };
924
- const ts = () => {
925
- const t = j();
962
+ const cs = () => {
963
+ const t = D();
926
964
  Array.from(document.body.children).forEach((n) => {
927
965
  n.contains(t) || (n.hasAttribute("aria-hidden") && n.setAttribute("data-previous-aria-hidden", n.getAttribute("aria-hidden") || ""), n.setAttribute("aria-hidden", "true"));
928
966
  });
929
- }, en = () => {
967
+ }, sn = () => {
930
968
  Array.from(document.body.children).forEach((e) => {
931
969
  e.hasAttribute("data-previous-aria-hidden") ? (e.setAttribute("aria-hidden", e.getAttribute("data-previous-aria-hidden") || ""), e.removeAttribute("data-previous-aria-hidden")) : e.removeAttribute("aria-hidden");
932
970
  });
933
- }, tn = typeof window < "u" && !!window.GestureEvent, ns = () => {
934
- if (tn && !K(document.body, a.iosfix)) {
971
+ }, rn = typeof window < "u" && !!window.GestureEvent, us = () => {
972
+ if (rn && !K(document.body, l.iosfix)) {
935
973
  const t = document.body.scrollTop;
936
- document.body.style.top = `${t * -1}px`, L(document.body, a.iosfix), os();
974
+ document.body.style.top = `${t * -1}px`, L(document.body, l.iosfix), ds();
937
975
  }
938
- }, os = () => {
939
- const t = j();
976
+ }, ds = () => {
977
+ const t = D();
940
978
  if (!t)
941
979
  return;
942
980
  let e;
943
981
  t.ontouchstart = (n) => {
944
- e = ss(n);
982
+ e = hs(n);
945
983
  }, t.ontouchmove = (n) => {
946
984
  e && (n.preventDefault(), n.stopPropagation());
947
985
  };
948
- }, ss = (t) => {
949
- const e = t.target, n = j(), o = tt();
950
- return !n || !o || rs(t) || is(t) ? !1 : e === n || !Ke(n) && e instanceof HTMLElement && !oo(e, o) && // #2823
986
+ }, hs = (t) => {
987
+ const e = t.target, n = D(), o = ot();
988
+ return !n || !o || ws(t) || fs(t) ? !1 : e === n || !Ge(n) && e instanceof HTMLElement && !ho(e, o) && // #2823
951
989
  e.tagName !== "INPUT" && // #1603
952
990
  e.tagName !== "TEXTAREA" && // #2266
953
- !(Ke(o) && // #1944
991
+ !(Ge(o) && // #1944
954
992
  o.contains(e));
955
- }, rs = (t) => !!(t.touches && t.touches.length && // @ts-ignore - touchType is not a standard property
956
- t.touches[0].touchType === "stylus"), is = (t) => t.touches && t.touches.length > 1, as = () => {
957
- if (K(document.body, a.iosfix)) {
993
+ }, ws = (t) => !!(t.touches && t.touches.length && // @ts-ignore - touchType is not a standard property
994
+ t.touches[0].touchType === "stylus"), fs = (t) => t.touches && t.touches.length > 1, ps = () => {
995
+ if (K(document.body, l.iosfix)) {
958
996
  const t = parseInt(document.body.style.top, 10);
959
- V(document.body, a.iosfix), document.body.style.top = "", document.body.scrollTop = t * -1;
997
+ V(document.body, l.iosfix), document.body.style.top = "", document.body.scrollTop = t * -1;
960
998
  }
961
- }, ls = () => {
999
+ }, gs = () => {
962
1000
  const t = document.createElement("div");
963
- t.className = a["scrollbar-measure"], document.body.appendChild(t);
1001
+ t.className = l["scrollbar-measure"], document.body.appendChild(t);
964
1002
  const e = t.getBoundingClientRect().width - t.clientWidth;
965
1003
  return document.body.removeChild(t), e;
966
1004
  };
967
1005
  let oe = null;
968
- const cs = (t) => {
969
- oe === null && (document.body.scrollHeight > window.innerHeight || t === "scroll") && (oe = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${oe + ls()}px`);
970
- }, ds = () => {
1006
+ const ms = (t) => {
1007
+ oe === null && (document.body.scrollHeight > window.innerHeight || t === "scroll") && (oe = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${oe + gs()}px`);
1008
+ }, bs = () => {
971
1009
  oe !== null && (document.body.style.paddingRight = `${oe}px`, oe = null);
972
1010
  };
973
- function nn(t, e, n, o) {
974
- ze() ? xt(t, o) : (Gn(n).then(() => xt(t, o)), Jt(p)), tn ? (e.setAttribute("style", "display:none !important"), e.removeAttribute("class"), e.innerHTML = "") : e.remove(), rt() && (ds(), as(), en()), us();
1011
+ function an(t, e, n, o) {
1012
+ De() ? St(t, o) : (to(n).then(() => St(t, o)), nn(p)), rn ? (e.setAttribute("style", "display:none !important"), e.removeAttribute("class"), e.innerHTML = "") : e.remove(), at() && (bs(), ps(), sn()), ys();
975
1013
  }
976
- function us() {
977
- V([document.documentElement, document.body], [a.shown, a["height-auto"], a["no-backdrop"], a["toast-shown"]]);
1014
+ function ys() {
1015
+ V([document.documentElement, document.body], [l.shown, l["height-auto"], l["no-backdrop"], l["toast-shown"]]);
978
1016
  }
979
1017
  function W(t) {
980
- t = ws(t);
981
- const e = se.swalPromiseResolve.get(this), n = hs(this);
982
- this.isAwaitingPromise ? t.isDismissed || (be(this), e(t)) : n && e(t);
1018
+ t = Cs(t);
1019
+ const e = se.swalPromiseResolve.get(this), n = vs(this);
1020
+ this.isAwaitingPromise ? t.isDismissed || (ye(this), e(t)) : n && e(t);
983
1021
  }
984
- const hs = (t) => {
1022
+ const vs = (t) => {
985
1023
  const e = S();
986
1024
  if (!e)
987
1025
  return !1;
988
- const n = _.innerParams.get(t);
1026
+ const n = I.innerParams.get(t);
989
1027
  if (!n || K(e, n.hideClass.popup))
990
1028
  return !1;
991
1029
  V(e, n.showClass.popup), L(e, n.hideClass.popup);
992
- const o = j();
993
- return V(o, n.showClass.backdrop), L(o, n.hideClass.backdrop), fs(t, e, n), !0;
1030
+ const o = D();
1031
+ return V(o, n.showClass.backdrop), L(o, n.hideClass.backdrop), ks(t, e, n), !0;
994
1032
  };
995
- function on(t) {
1033
+ function ln(t) {
996
1034
  const e = se.swalPromiseReject.get(this);
997
- be(this), e && e(t);
1035
+ ye(this), e && e(t);
998
1036
  }
999
- const be = (t) => {
1000
- t.isAwaitingPromise && (delete t.isAwaitingPromise, _.innerParams.get(t) || t._destroy());
1001
- }, ws = (t) => typeof t > "u" ? {
1037
+ const ye = (t) => {
1038
+ t.isAwaitingPromise && (delete t.isAwaitingPromise, I.innerParams.get(t) || t._destroy());
1039
+ }, Cs = (t) => typeof t > "u" ? {
1002
1040
  isConfirmed: !1,
1003
1041
  isDenied: !1,
1004
1042
  isDismissed: !0
@@ -1006,20 +1044,20 @@ const be = (t) => {
1006
1044
  isConfirmed: !1,
1007
1045
  isDenied: !1,
1008
1046
  isDismissed: !1
1009
- }, t), fs = (t, e, n) => {
1047
+ }, t), ks = (t, e, n) => {
1010
1048
  var o;
1011
- const s = j(), r = Rt(e);
1012
- typeof n.willClose == "function" && n.willClose(e), (o = p.eventEmitter) === null || o === void 0 || o.emit("willClose", e), r && s ? ps(t, e, s, !!n.returnFocus, n.didClose) : s && nn(t, s, !!n.returnFocus, n.didClose);
1013
- }, ps = (t, e, n, o, s) => {
1014
- p.swalCloseEventFinishedCallback = nn.bind(null, t, n, o, s);
1015
- const r = function(d) {
1016
- if (d.target === e) {
1049
+ const s = D(), r = Kt(e);
1050
+ typeof n.willClose == "function" && n.willClose(e), (o = p.eventEmitter) === null || o === void 0 || o.emit("willClose", e), r && s ? xs(t, e, s, !!n.returnFocus, n.didClose) : s && an(t, s, !!n.returnFocus, n.didClose);
1051
+ }, xs = (t, e, n, o, s) => {
1052
+ p.swalCloseEventFinishedCallback = an.bind(null, t, n, o, s);
1053
+ const r = function(a) {
1054
+ if (a.target === e) {
1017
1055
  var c;
1018
1056
  (c = p.swalCloseEventFinishedCallback) === null || c === void 0 || c.call(p), delete p.swalCloseEventFinishedCallback, e.removeEventListener("animationend", r), e.removeEventListener("transitionend", r);
1019
1057
  }
1020
1058
  };
1021
1059
  e.addEventListener("animationend", r), e.addEventListener("transitionend", r);
1022
- }, xt = (t, e) => {
1060
+ }, St = (t, e) => {
1023
1061
  setTimeout(() => {
1024
1062
  var n;
1025
1063
  typeof e == "function" && e.bind(t.params)(), (n = p.eventEmitter) === null || n === void 0 || n.emit("didClose"), t._destroy && t._destroy();
@@ -1028,71 +1066,71 @@ const be = (t) => {
1028
1066
  let e = S();
1029
1067
  if (e || new O(), e = S(), !e)
1030
1068
  return;
1031
- const n = le();
1032
- ze() ? N(ie()) : gs(e, t), M(n), e.setAttribute("data-loading", "true"), e.setAttribute("aria-busy", "true"), e.focus();
1033
- }, gs = (t, e) => {
1034
- const n = pe(), o = le();
1035
- !n || !o || (!e && D(q()) && (e = q()), M(n), e && (N(e), o.setAttribute("data-button-to-replace", e.className), n.insertBefore(o, e)), L([t, n], a.loading));
1036
- }, ms = (t, e) => {
1037
- e.input === "select" || e.input === "radio" ? ks(t, e) : ["text", "email", "number", "tel", "textarea"].some((n) => n === e.input) && (Qe(e.inputValue) || et(e.inputValue)) && (re(q()), xs(t, e));
1038
- }, bs = (t, e) => {
1069
+ const n = ce();
1070
+ De() ? N(ae()) : As(e, t), M(n), e.setAttribute("data-loading", "true"), e.setAttribute("aria-busy", "true"), e.focus();
1071
+ }, As = (t, e) => {
1072
+ const n = ge(), o = ce();
1073
+ !n || !o || (!e && j(q()) && (e = q()), M(n), e && (N(e), o.setAttribute("data-button-to-replace", e.className), n.insertBefore(o, e)), L([t, n], l.loading));
1074
+ }, Es = (t, e) => {
1075
+ e.input === "select" || e.input === "radio" ? Is(t, e) : ["text", "email", "number", "tel", "textarea"].some((n) => n === e.input) && (tt(e.inputValue) || nt(e.inputValue)) && (re(q()), $s(t, e));
1076
+ }, Ls = (t, e) => {
1039
1077
  const n = t.getInput();
1040
1078
  if (!n)
1041
1079
  return null;
1042
1080
  switch (e.input) {
1043
1081
  case "checkbox":
1044
- return ys(n);
1082
+ return Ss(n);
1045
1083
  case "radio":
1046
- return vs(n);
1084
+ return Ts(n);
1047
1085
  case "file":
1048
- return Cs(n);
1086
+ return _s(n);
1049
1087
  default:
1050
1088
  return e.inputAutoTrim ? n.value.trim() : n.value;
1051
1089
  }
1052
- }, ys = (t) => t.checked ? 1 : 0, vs = (t) => t.checked ? t.value : null, Cs = (t) => t.files && t.files.length ? t.getAttribute("multiple") !== null ? t.files : t.files[0] : null, ks = (t, e) => {
1090
+ }, Ss = (t) => t.checked ? 1 : 0, Ts = (t) => t.checked ? t.value : null, _s = (t) => t.files && t.files.length ? t.getAttribute("multiple") !== null ? t.files : t.files[0] : null, Is = (t, e) => {
1053
1091
  const n = S();
1054
1092
  if (!n)
1055
1093
  return;
1056
1094
  const o = (s) => {
1057
- e.input === "select" ? As(n, $e(s), e) : e.input === "radio" && Es(n, $e(s), e);
1095
+ e.input === "select" ? Bs(n, $e(s), e) : e.input === "radio" && Ps(n, $e(s), e);
1058
1096
  };
1059
- Qe(e.inputOptions) || et(e.inputOptions) ? (re(q()), we(e.inputOptions).then((s) => {
1097
+ tt(e.inputOptions) || nt(e.inputOptions) ? (re(q()), fe(e.inputOptions).then((s) => {
1060
1098
  t.hideLoading(), o(s);
1061
1099
  })) : typeof e.inputOptions == "object" ? o(e.inputOptions) : ee(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`);
1062
- }, xs = (t, e) => {
1100
+ }, $s = (t, e) => {
1063
1101
  const n = t.getInput();
1064
- n && (N(n), we(e.inputValue).then((o) => {
1102
+ n && (N(n), fe(e.inputValue).then((o) => {
1065
1103
  n.value = e.input === "number" ? `${parseFloat(o) || 0}` : `${o}`, M(n), n.focus(), t.hideLoading();
1066
1104
  }).catch((o) => {
1067
1105
  ee(`Error in inputValue promise: ${o}`), n.value = "", M(n), n.focus(), t.hideLoading();
1068
1106
  }));
1069
1107
  };
1070
- function As(t, e, n) {
1071
- const o = G(t, a.select);
1108
+ function Bs(t, e, n) {
1109
+ const o = G(t, l.select);
1072
1110
  if (!o)
1073
1111
  return;
1074
- const s = (r, d, c) => {
1112
+ const s = (r, a, c) => {
1075
1113
  const i = document.createElement("option");
1076
- i.value = c, R(i, d), i.selected = sn(c, n.inputValue), r.appendChild(i);
1114
+ i.value = c, H(i, a), i.selected = cn(c, n.inputValue), r.appendChild(i);
1077
1115
  };
1078
1116
  e.forEach((r) => {
1079
- const d = r[0], c = r[1];
1117
+ const a = r[0], c = r[1];
1080
1118
  if (Array.isArray(c)) {
1081
1119
  const i = document.createElement("optgroup");
1082
- i.label = d, i.disabled = !1, o.appendChild(i), c.forEach((l) => s(i, l[1], l[0]));
1120
+ i.label = a, i.disabled = !1, o.appendChild(i), c.forEach((u) => s(i, u[1], u[0]));
1083
1121
  } else
1084
- s(o, c, d);
1122
+ s(o, c, a);
1085
1123
  }), o.focus();
1086
1124
  }
1087
- function Es(t, e, n) {
1088
- const o = G(t, a.radio);
1125
+ function Ps(t, e, n) {
1126
+ const o = G(t, l.radio);
1089
1127
  if (!o)
1090
1128
  return;
1091
1129
  e.forEach((r) => {
1092
- const d = r[0], c = r[1], i = document.createElement("input"), l = document.createElement("label");
1093
- i.type = "radio", i.name = a.radio, i.value = d, sn(d, n.inputValue) && (i.checked = !0);
1094
- const u = document.createElement("span");
1095
- R(u, c), u.className = a.label, l.appendChild(i), l.appendChild(u), o.appendChild(l);
1130
+ const a = r[0], c = r[1], i = document.createElement("input"), u = document.createElement("label");
1131
+ i.type = "radio", i.name = l.radio, i.value = a, cn(a, n.inputValue) && (i.checked = !0);
1132
+ const d = document.createElement("span");
1133
+ H(d, c), d.className = l.label, u.appendChild(i), u.appendChild(d), o.appendChild(u);
1096
1134
  });
1097
1135
  const s = o.querySelectorAll("input");
1098
1136
  s.length && s[0].focus();
@@ -1106,45 +1144,45 @@ const $e = (t) => {
1106
1144
  let o = t[n];
1107
1145
  typeof o == "object" && (o = $e(o)), e.push([n, o]);
1108
1146
  }), e;
1109
- }, sn = (t, e) => !!e && e !== null && e !== void 0 && e.toString() === t.toString(), Ls = (t) => {
1110
- const e = _.innerParams.get(t);
1111
- t.disableButtons(), e.input ? rn(t, "confirm") : ht(t, !0);
1112
- }, Ss = (t) => {
1113
- const e = _.innerParams.get(t);
1114
- t.disableButtons(), e.returnInputValueOnDeny ? rn(t, "deny") : ut(t, !1);
1115
- }, Ts = (t, e) => {
1116
- t.disableButtons(), e(ce.cancel);
1117
- }, rn = (t, e) => {
1118
- const n = _.innerParams.get(t);
1147
+ }, cn = (t, e) => !!e && e !== null && e !== void 0 && e.toString() === t.toString(), Ms = (t) => {
1148
+ const e = I.innerParams.get(t);
1149
+ t.disableButtons(), e.input ? un(t, "confirm") : ft(t, !0);
1150
+ }, Os = (t) => {
1151
+ const e = I.innerParams.get(t);
1152
+ t.disableButtons(), e.returnInputValueOnDeny ? un(t, "deny") : wt(t, !1);
1153
+ }, Ns = (t, e) => {
1154
+ t.disableButtons(), e(ue.cancel);
1155
+ }, un = (t, e) => {
1156
+ const n = I.innerParams.get(t);
1119
1157
  if (!n.input) {
1120
- ee(`The "input" parameter is needed to be set when using returnInputValueOn${Je(e)}`);
1158
+ ee(`The "input" parameter is needed to be set when using returnInputValueOn${et(e)}`);
1121
1159
  return;
1122
1160
  }
1123
- const o = t.getInput(), s = bs(t, n);
1124
- n.inputValidator ? _s(t, s, e) : o && !o.checkValidity() ? (t.enableButtons(), t.showValidationMessage(n.validationMessage || o.validationMessage)) : e === "deny" ? ut(t, s) : ht(t, s);
1125
- }, _s = (t, e, n) => {
1126
- const o = _.innerParams.get(t);
1127
- t.disableInput(), Promise.resolve().then(() => we(o.inputValidator(e, o.validationMessage))).then((r) => {
1128
- t.enableButtons(), t.enableInput(), r ? t.showValidationMessage(r) : n === "deny" ? ut(t, e) : ht(t, e);
1161
+ const o = t.getInput(), s = Ls(t, n);
1162
+ n.inputValidator ? zs(t, s, e) : o && !o.checkValidity() ? (t.enableButtons(), t.showValidationMessage(n.validationMessage || o.validationMessage)) : e === "deny" ? wt(t, s) : ft(t, s);
1163
+ }, zs = (t, e, n) => {
1164
+ const o = I.innerParams.get(t);
1165
+ t.disableInput(), Promise.resolve().then(() => fe(o.inputValidator(e, o.validationMessage))).then((r) => {
1166
+ t.enableButtons(), t.enableInput(), r ? t.showValidationMessage(r) : n === "deny" ? wt(t, e) : ft(t, e);
1129
1167
  });
1130
- }, ut = (t, e) => {
1131
- const n = _.innerParams.get(t);
1132
- n.showLoaderOnDeny && re(te()), n.preDeny ? (t.isAwaitingPromise = !0, Promise.resolve().then(() => we(n.preDeny(e, n.validationMessage))).then((s) => {
1133
- s === !1 ? (t.hideLoading(), be(t)) : t.close(
1168
+ }, wt = (t, e) => {
1169
+ const n = I.innerParams.get(t);
1170
+ n.showLoaderOnDeny && re(te()), n.preDeny ? (t.isAwaitingPromise = !0, Promise.resolve().then(() => fe(n.preDeny(e, n.validationMessage))).then((s) => {
1171
+ s === !1 ? (t.hideLoading(), ye(t)) : t.close(
1134
1172
  /** @type SweetAlertResult */
1135
1173
  {
1136
1174
  isDenied: !0,
1137
1175
  value: typeof s > "u" ? e : s
1138
1176
  }
1139
1177
  );
1140
- }).catch((s) => an(t, s))) : t.close(
1178
+ }).catch((s) => dn(t, s))) : t.close(
1141
1179
  /** @type SweetAlertResult */
1142
1180
  {
1143
1181
  isDenied: !0,
1144
1182
  value: e
1145
1183
  }
1146
1184
  );
1147
- }, At = (t, e) => {
1185
+ }, Tt = (t, e) => {
1148
1186
  t.close(
1149
1187
  /** @type SweetAlertResult */
1150
1188
  {
@@ -1152,72 +1190,72 @@ const $e = (t) => {
1152
1190
  value: e
1153
1191
  }
1154
1192
  );
1155
- }, an = (t, e) => {
1193
+ }, dn = (t, e) => {
1156
1194
  t.rejectPromise(e);
1157
- }, ht = (t, e) => {
1158
- const n = _.innerParams.get(t);
1159
- n.showLoaderOnConfirm && re(), n.preConfirm ? (t.resetValidationMessage(), t.isAwaitingPromise = !0, Promise.resolve().then(() => we(n.preConfirm(e, n.validationMessage))).then((s) => {
1160
- D(Oe()) || s === !1 ? (t.hideLoading(), be(t)) : At(t, typeof s > "u" ? e : s);
1161
- }).catch((s) => an(t, s))) : At(t, e);
1195
+ }, ft = (t, e) => {
1196
+ const n = I.innerParams.get(t);
1197
+ n.showLoaderOnConfirm && re(), n.preConfirm ? (t.resetValidationMessage(), t.isAwaitingPromise = !0, Promise.resolve().then(() => fe(n.preConfirm(e, n.validationMessage))).then((s) => {
1198
+ j(Ne()) || s === !1 ? (t.hideLoading(), ye(t)) : Tt(t, typeof s > "u" ? e : s);
1199
+ }).catch((s) => dn(t, s))) : Tt(t, e);
1162
1200
  };
1163
1201
  function Be() {
1164
- const t = _.innerParams.get(this);
1202
+ const t = I.innerParams.get(this);
1165
1203
  if (!t)
1166
1204
  return;
1167
- const e = _.domCache.get(this);
1168
- N(e.loader), ze() ? t.icon && M(ie()) : $s(e), V([e.popup, e.actions], a.loading), e.popup.removeAttribute("aria-busy"), e.popup.removeAttribute("data-loading"), e.confirmButton.disabled = !1, e.denyButton.disabled = !1, e.cancelButton.disabled = !1;
1205
+ const e = I.domCache.get(this);
1206
+ N(e.loader), De() ? t.icon && M(ae()) : Ds(e), V([e.popup, e.actions], l.loading), e.popup.removeAttribute("aria-busy"), e.popup.removeAttribute("data-loading"), e.confirmButton.disabled = !1, e.denyButton.disabled = !1, e.cancelButton.disabled = !1;
1169
1207
  }
1170
- const $s = (t) => {
1208
+ const Ds = (t) => {
1171
1209
  const e = t.loader.getAttribute("data-button-to-replace"), n = e ? t.popup.getElementsByClassName(e) : [];
1172
1210
  n.length ? M(
1173
1211
  /** @type {HTMLElement} */
1174
1212
  n[0],
1175
1213
  "inline-block"
1176
- ) : no() && N(t.actions);
1214
+ ) : uo() && N(t.actions);
1177
1215
  };
1178
- function ln() {
1179
- const t = _.innerParams.get(this), e = _.domCache.get(this);
1216
+ function hn() {
1217
+ const t = I.innerParams.get(this), e = I.domCache.get(this);
1180
1218
  return e ? je(e.popup, t.input) : null;
1181
1219
  }
1182
- function cn(t, e, n) {
1183
- const o = _.domCache.get(t);
1220
+ function wn(t, e, n) {
1221
+ const o = I.domCache.get(t);
1184
1222
  e.forEach((s) => {
1185
1223
  o[s].disabled = n;
1186
1224
  });
1187
1225
  }
1188
- function dn(t, e) {
1226
+ function fn(t, e) {
1189
1227
  const n = S();
1190
1228
  if (!(!n || !t))
1191
1229
  if (t.type === "radio") {
1192
- const o = n.querySelectorAll(`[name="${a.radio}"]`);
1230
+ const o = n.querySelectorAll(`[name="${l.radio}"]`);
1193
1231
  for (let s = 0; s < o.length; s++)
1194
1232
  o[s].disabled = e;
1195
1233
  } else
1196
1234
  t.disabled = e;
1197
1235
  }
1198
- function un() {
1199
- cn(this, ["confirmButton", "denyButton", "cancelButton"], !1);
1236
+ function pn() {
1237
+ wn(this, ["confirmButton", "denyButton", "cancelButton"], !1);
1200
1238
  }
1201
- function hn() {
1202
- cn(this, ["confirmButton", "denyButton", "cancelButton"], !0);
1239
+ function gn() {
1240
+ wn(this, ["confirmButton", "denyButton", "cancelButton"], !0);
1203
1241
  }
1204
- function wn() {
1205
- dn(this.getInput(), !1);
1242
+ function mn() {
1243
+ fn(this.getInput(), !1);
1206
1244
  }
1207
- function fn() {
1208
- dn(this.getInput(), !0);
1245
+ function bn() {
1246
+ fn(this.getInput(), !0);
1209
1247
  }
1210
- function pn(t) {
1211
- const e = _.domCache.get(this), n = _.innerParams.get(this);
1212
- R(e.validationMessage, t), e.validationMessage.className = a["validation-message"], n.customClass && n.customClass.validationMessage && L(e.validationMessage, n.customClass.validationMessage), M(e.validationMessage);
1248
+ function yn(t) {
1249
+ const e = I.domCache.get(this), n = I.innerParams.get(this);
1250
+ H(e.validationMessage, t), e.validationMessage.className = l["validation-message"], n.customClass && n.customClass.validationMessage && L(e.validationMessage, n.customClass.validationMessage), M(e.validationMessage);
1213
1251
  const o = this.getInput();
1214
- o && (o.setAttribute("aria-invalid", "true"), o.setAttribute("aria-describedby", a["validation-message"]), Ut(o), L(o, a.inputerror));
1252
+ o && (o.setAttribute("aria-invalid", "true"), o.setAttribute("aria-describedby", l["validation-message"]), Ft(o), L(o, l.inputerror));
1215
1253
  }
1216
- function gn() {
1217
- const t = _.domCache.get(this);
1254
+ function vn() {
1255
+ const t = I.domCache.get(this);
1218
1256
  t.validationMessage && N(t.validationMessage);
1219
1257
  const e = this.getInput();
1220
- e && (e.removeAttribute("aria-invalid"), e.removeAttribute("aria-describedby"), V(e, a.inputerror));
1258
+ e && (e.removeAttribute("aria-invalid"), e.removeAttribute("aria-describedby"), V(e, l.inputerror));
1221
1259
  }
1222
1260
  const Y = {
1223
1261
  title: "",
@@ -1312,28 +1350,28 @@ const Y = {
1312
1350
  didDestroy: void 0,
1313
1351
  scrollbarPadding: !0,
1314
1352
  topLayer: !1
1315
- }, Bs = ["allowEscapeKey", "allowOutsideClick", "background", "buttonsStyling", "cancelButtonAriaLabel", "cancelButtonColor", "cancelButtonText", "closeButtonAriaLabel", "closeButtonHtml", "color", "confirmButtonAriaLabel", "confirmButtonColor", "confirmButtonText", "currentProgressStep", "customClass", "denyButtonAriaLabel", "denyButtonColor", "denyButtonText", "didClose", "didDestroy", "draggable", "footer", "hideClass", "html", "icon", "iconColor", "iconHtml", "imageAlt", "imageHeight", "imageUrl", "imageWidth", "preConfirm", "preDeny", "progressSteps", "returnFocus", "reverseButtons", "showCancelButton", "showCloseButton", "showConfirmButton", "showDenyButton", "text", "title", "titleText", "theme", "willClose"], Is = {
1353
+ }, js = ["allowEscapeKey", "allowOutsideClick", "background", "buttonsStyling", "cancelButtonAriaLabel", "cancelButtonColor", "cancelButtonText", "closeButtonAriaLabel", "closeButtonHtml", "color", "confirmButtonAriaLabel", "confirmButtonColor", "confirmButtonText", "currentProgressStep", "customClass", "denyButtonAriaLabel", "denyButtonColor", "denyButtonText", "didClose", "didDestroy", "draggable", "footer", "hideClass", "html", "icon", "iconColor", "iconHtml", "imageAlt", "imageHeight", "imageUrl", "imageWidth", "preConfirm", "preDeny", "progressSteps", "returnFocus", "reverseButtons", "showCancelButton", "showCloseButton", "showConfirmButton", "showDenyButton", "text", "title", "titleText", "theme", "willClose"], Us = {
1316
1354
  allowEnterKey: void 0
1317
- }, Ps = ["allowOutsideClick", "allowEnterKey", "backdrop", "draggable", "focusConfirm", "focusDeny", "focusCancel", "returnFocus", "heightAuto", "keydownListenerCapture"], mn = (t) => Object.prototype.hasOwnProperty.call(Y, t), bn = (t) => Bs.indexOf(t) !== -1, yn = (t) => Is[t], Ms = (t) => {
1318
- mn(t) || z(`Unknown parameter "${t}"`);
1319
- }, Os = (t) => {
1320
- Ps.includes(t) && z(`The parameter "${t}" is incompatible with toasts`);
1321
- }, Ns = (t) => {
1322
- const e = yn(t);
1323
- e && Nt(t, e);
1324
- }, vn = (t) => {
1355
+ }, Rs = ["allowOutsideClick", "allowEnterKey", "backdrop", "draggable", "focusConfirm", "focusDeny", "focusCancel", "returnFocus", "heightAuto", "keydownListenerCapture"], Cn = (t) => Object.prototype.hasOwnProperty.call(Y, t), kn = (t) => js.indexOf(t) !== -1, xn = (t) => Us[t], Hs = (t) => {
1356
+ Cn(t) || z(`Unknown parameter "${t}"`);
1357
+ }, Vs = (t) => {
1358
+ Rs.includes(t) && z(`The parameter "${t}" is incompatible with toasts`);
1359
+ }, Fs = (t) => {
1360
+ const e = xn(t);
1361
+ e && Ut(t, e);
1362
+ }, An = (t) => {
1325
1363
  t.backdrop === !1 && t.allowOutsideClick && z('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'), t.theme && !["light", "dark", "auto", "minimal", "borderless", "bootstrap-4", "bootstrap-4-light", "bootstrap-4-dark", "bootstrap-5", "bootstrap-5-light", "bootstrap-5-dark", "material-ui", "material-ui-light", "material-ui-dark", "embed-iframe", "bulma", "bulma-light", "bulma-dark"].includes(t.theme) && z(`Invalid theme "${t.theme}"`);
1326
1364
  for (const e in t)
1327
- Ms(e), t.toast && Os(e), Ns(e);
1365
+ Hs(e), t.toast && Vs(e), Fs(e);
1328
1366
  };
1329
- function Cn(t) {
1330
- const e = j(), n = S(), o = _.innerParams.get(this);
1367
+ function En(t) {
1368
+ const e = D(), n = S(), o = I.innerParams.get(this);
1331
1369
  if (!n || K(n, o.hideClass.popup)) {
1332
1370
  z("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");
1333
1371
  return;
1334
1372
  }
1335
- const s = zs(t), r = Object.assign({}, o, s);
1336
- vn(r), e && (e.dataset.swal2Theme = r.theme), Zt(this, r), _.innerParams.set(this, r), Object.defineProperties(this, {
1373
+ const s = qs(t), r = Object.assign({}, o, s);
1374
+ An(r), e && (e.dataset.swal2Theme = r.theme), en(this, r), I.innerParams.set(this, r), Object.defineProperties(this, {
1337
1375
  params: {
1338
1376
  value: Object.assign({}, this.params, t),
1339
1377
  writable: !1,
@@ -1341,10 +1379,10 @@ function Cn(t) {
1341
1379
  }
1342
1380
  });
1343
1381
  }
1344
- const zs = (t) => {
1382
+ const qs = (t) => {
1345
1383
  const e = {};
1346
1384
  return Object.keys(t).forEach((n) => {
1347
- if (bn(n)) {
1385
+ if (kn(n)) {
1348
1386
  const o = (
1349
1387
  /** @type {Record<string, any>} */
1350
1388
  t
@@ -1354,85 +1392,85 @@ const zs = (t) => {
1354
1392
  z(`Invalid parameter to update: ${n}`);
1355
1393
  }), e;
1356
1394
  };
1357
- function kn() {
1395
+ function Ln() {
1358
1396
  var t;
1359
- const e = _.domCache.get(this), n = _.innerParams.get(this);
1397
+ const e = I.domCache.get(this), n = I.innerParams.get(this);
1360
1398
  if (!n) {
1361
- xn(this);
1399
+ Sn(this);
1362
1400
  return;
1363
1401
  }
1364
- e.popup && p.swalCloseEventFinishedCallback && (p.swalCloseEventFinishedCallback(), delete p.swalCloseEventFinishedCallback), typeof n.didDestroy == "function" && n.didDestroy(), (t = p.eventEmitter) === null || t === void 0 || t.emit("didDestroy"), js(this);
1402
+ e.popup && p.swalCloseEventFinishedCallback && (p.swalCloseEventFinishedCallback(), delete p.swalCloseEventFinishedCallback), typeof n.didDestroy == "function" && n.didDestroy(), (t = p.eventEmitter) === null || t === void 0 || t.emit("didDestroy"), Ks(this);
1365
1403
  }
1366
- const js = (t) => {
1367
- xn(t), delete t.params, delete p.keydownHandler, delete p.keydownTarget, delete p.currentInstance;
1368
- }, xn = (t) => {
1369
- t.isAwaitingPromise ? (Re(_, t), t.isAwaitingPromise = !0) : (Re(se, t), Re(_, t), delete t.isAwaitingPromise, delete t.disableButtons, delete t.enableButtons, delete t.getInput, delete t.disableInput, delete t.enableInput, delete t.hideLoading, delete t.disableLoading, delete t.showValidationMessage, delete t.resetValidationMessage, delete t.close, delete t.closePopup, delete t.closeModal, delete t.closeToast, delete t.rejectPromise, delete t.update, delete t._destroy);
1370
- }, Re = (t, e) => {
1404
+ const Ks = (t) => {
1405
+ Sn(t), delete t.params, delete p.keydownHandler, delete p.keydownTarget, delete p.currentInstance;
1406
+ }, Sn = (t) => {
1407
+ t.isAwaitingPromise ? (Fe(I, t), t.isAwaitingPromise = !0) : (Fe(se, t), Fe(I, t), delete t.isAwaitingPromise, delete t.disableButtons, delete t.enableButtons, delete t.getInput, delete t.disableInput, delete t.enableInput, delete t.hideLoading, delete t.disableLoading, delete t.showValidationMessage, delete t.resetValidationMessage, delete t.close, delete t.closePopup, delete t.closeModal, delete t.closeToast, delete t.rejectPromise, delete t.update, delete t._destroy);
1408
+ }, Fe = (t, e) => {
1371
1409
  for (const n in t)
1372
1410
  t[n].delete(e);
1373
1411
  };
1374
- var Ds = /* @__PURE__ */ Object.freeze({
1412
+ var Gs = /* @__PURE__ */ Object.freeze({
1375
1413
  __proto__: null,
1376
- _destroy: kn,
1414
+ _destroy: Ln,
1377
1415
  close: W,
1378
1416
  closeModal: W,
1379
1417
  closePopup: W,
1380
1418
  closeToast: W,
1381
- disableButtons: hn,
1382
- disableInput: fn,
1419
+ disableButtons: gn,
1420
+ disableInput: bn,
1383
1421
  disableLoading: Be,
1384
- enableButtons: un,
1385
- enableInput: wn,
1386
- getInput: ln,
1387
- handleAwaitingPromise: be,
1422
+ enableButtons: pn,
1423
+ enableInput: mn,
1424
+ getInput: hn,
1425
+ handleAwaitingPromise: ye,
1388
1426
  hideLoading: Be,
1389
- rejectPromise: on,
1390
- resetValidationMessage: gn,
1391
- showValidationMessage: pn,
1392
- update: Cn
1427
+ rejectPromise: ln,
1428
+ resetValidationMessage: vn,
1429
+ showValidationMessage: yn,
1430
+ update: En
1393
1431
  });
1394
- const Us = (t, e, n) => {
1395
- t.toast ? Hs(t, e, n) : (Vs(e), Fs(e), qs(t, e, n));
1396
- }, Hs = (t, e, n) => {
1432
+ const Ws = (t, e, n) => {
1433
+ t.toast ? Ys(t, e, n) : (Xs(e), Js(e), Qs(t, e, n));
1434
+ }, Ys = (t, e, n) => {
1397
1435
  e.popup.onclick = () => {
1398
- t && (Rs(t) || t.timer || t.input) || n(ce.close);
1436
+ t && (Zs(t) || t.timer || t.input) || n(ue.close);
1399
1437
  };
1400
- }, Rs = (t) => !!(t.showConfirmButton || t.showDenyButton || t.showCancelButton || t.showCloseButton);
1401
- let Ie = !1;
1402
- const Vs = (t) => {
1438
+ }, Zs = (t) => !!(t.showConfirmButton || t.showDenyButton || t.showCancelButton || t.showCloseButton);
1439
+ let Pe = !1;
1440
+ const Xs = (t) => {
1403
1441
  t.popup.onmousedown = () => {
1404
1442
  t.container.onmouseup = function(e) {
1405
1443
  t.container.onmouseup = () => {
1406
- }, e.target === t.container && (Ie = !0);
1444
+ }, e.target === t.container && (Pe = !0);
1407
1445
  };
1408
1446
  };
1409
- }, Fs = (t) => {
1447
+ }, Js = (t) => {
1410
1448
  t.container.onmousedown = (e) => {
1411
1449
  e.target === t.container && e.preventDefault(), t.popup.onmouseup = function(n) {
1412
1450
  t.popup.onmouseup = () => {
1413
- }, (n.target === t.popup || n.target instanceof HTMLElement && t.popup.contains(n.target)) && (Ie = !0);
1451
+ }, (n.target === t.popup || n.target instanceof HTMLElement && t.popup.contains(n.target)) && (Pe = !0);
1414
1452
  };
1415
1453
  };
1416
- }, qs = (t, e, n) => {
1454
+ }, Qs = (t, e, n) => {
1417
1455
  e.container.onclick = (o) => {
1418
- if (Ie) {
1419
- Ie = !1;
1456
+ if (Pe) {
1457
+ Pe = !1;
1420
1458
  return;
1421
1459
  }
1422
- o.target === e.container && Me(t.allowOutsideClick) && n(ce.backdrop);
1460
+ o.target === e.container && Oe(t.allowOutsideClick) && n(ue.backdrop);
1423
1461
  };
1424
- }, Ks = (t) => typeof t == "object" && t !== null && "jquery" in t, Et = (t) => t instanceof Element || Ks(t), Gs = (t) => {
1462
+ }, er = (t) => typeof t == "object" && t !== null && "jquery" in t, _t = (t) => t instanceof Element || er(t), tr = (t) => {
1425
1463
  const e = {};
1426
- return typeof t[0] == "object" && !Et(t[0]) ? Object.assign(e, t[0]) : ["title", "html", "icon"].forEach((n, o) => {
1464
+ return typeof t[0] == "object" && !_t(t[0]) ? Object.assign(e, t[0]) : ["title", "html", "icon"].forEach((n, o) => {
1427
1465
  const s = t[o];
1428
- typeof s == "string" || Et(s) ? e[n] = s : s !== void 0 && ee(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof s}`);
1466
+ typeof s == "string" || _t(s) ? e[n] = s : s !== void 0 && ee(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof s}`);
1429
1467
  }), /** @type {SweetAlertOptions} */
1430
1468
  e;
1431
1469
  };
1432
- function Ws(...t) {
1470
+ function nr(...t) {
1433
1471
  return new this(...t);
1434
1472
  }
1435
- function Ys(t) {
1473
+ function or(t) {
1436
1474
  class e extends this {
1437
1475
  /**
1438
1476
  * @param {any} params
@@ -1444,44 +1482,44 @@ function Ys(t) {
1444
1482
  }
1445
1483
  return e;
1446
1484
  }
1447
- const Zs = () => p.timeout && p.timeout.getTimerLeft(), An = () => {
1485
+ const sr = () => p.timeout && p.timeout.getTimerLeft(), Tn = () => {
1448
1486
  if (p.timeout)
1449
- return so(), p.timeout.stop();
1450
- }, En = () => {
1487
+ return wo(), p.timeout.stop();
1488
+ }, _n = () => {
1451
1489
  if (p.timeout) {
1452
1490
  const t = p.timeout.start();
1453
- return at(t), t;
1491
+ return ct(t), t;
1454
1492
  }
1455
- }, Xs = () => {
1493
+ }, rr = () => {
1456
1494
  const t = p.timeout;
1457
- return t && (t.running ? An() : En());
1458
- }, Js = (t) => {
1495
+ return t && (t.running ? Tn() : _n());
1496
+ }, ir = (t) => {
1459
1497
  if (p.timeout) {
1460
1498
  const e = p.timeout.increase(t);
1461
- return at(e, !0), e;
1499
+ return ct(e, !0), e;
1462
1500
  }
1463
- }, Qs = () => !!(p.timeout && p.timeout.isRunning());
1464
- let Lt = !1;
1465
- const We = {};
1466
- function er(t = "data-swal-template") {
1467
- We[t] = this, Lt || (document.body.addEventListener("click", tr), Lt = !0);
1501
+ }, ar = () => !!(p.timeout && p.timeout.isRunning());
1502
+ let It = !1;
1503
+ const Ye = {};
1504
+ function lr(t = "data-swal-template") {
1505
+ Ye[t] = this, It || (document.body.addEventListener("click", cr), It = !0);
1468
1506
  }
1469
- const tr = (t) => {
1507
+ const cr = (t) => {
1470
1508
  for (let e = (
1471
1509
  /** @type {any} */
1472
1510
  t.target
1473
1511
  ); e && e !== document; e = e.parentNode)
1474
- for (const n in We) {
1512
+ for (const n in Ye) {
1475
1513
  const o = e.getAttribute && e.getAttribute(n);
1476
1514
  if (o) {
1477
- We[n].fire({
1515
+ Ye[n].fire({
1478
1516
  template: o
1479
1517
  });
1480
1518
  return;
1481
1519
  }
1482
1520
  }
1483
1521
  };
1484
- class nr {
1522
+ class ur {
1485
1523
  constructor() {
1486
1524
  this.events = {};
1487
1525
  }
@@ -1546,12 +1584,12 @@ class nr {
1546
1584
  this.events = {};
1547
1585
  }
1548
1586
  }
1549
- p.eventEmitter = new nr();
1550
- const or = (t, e) => {
1587
+ p.eventEmitter = new ur();
1588
+ const dr = (t, e) => {
1551
1589
  p.eventEmitter && p.eventEmitter.on(t, e);
1552
- }, sr = (t, e) => {
1590
+ }, hr = (t, e) => {
1553
1591
  p.eventEmitter && p.eventEmitter.once(t, e);
1554
- }, rr = (t, e) => {
1592
+ }, wr = (t, e) => {
1555
1593
  if (p.eventEmitter) {
1556
1594
  if (!t) {
1557
1595
  p.eventEmitter.reset();
@@ -1560,52 +1598,52 @@ const or = (t, e) => {
1560
1598
  e ? p.eventEmitter.removeListener(t, e) : p.eventEmitter.removeAllListeners(t);
1561
1599
  }
1562
1600
  };
1563
- var ir = /* @__PURE__ */ Object.freeze({
1601
+ var fr = /* @__PURE__ */ Object.freeze({
1564
1602
  __proto__: null,
1565
- argsToParams: Gs,
1566
- bindClickHandler: er,
1567
- clickCancel: Go,
1568
- clickConfirm: Xt,
1569
- clickDeny: Ko,
1603
+ argsToParams: tr,
1604
+ bindClickHandler: lr,
1605
+ clickCancel: ts,
1606
+ clickConfirm: tn,
1607
+ clickDeny: es,
1570
1608
  enableLoading: re,
1571
- fire: Ws,
1572
- getActions: pe,
1573
- getCancelButton: ae,
1574
- getCloseButton: ot,
1609
+ fire: nr,
1610
+ getActions: ge,
1611
+ getCancelButton: le,
1612
+ getCloseButton: rt,
1575
1613
  getConfirmButton: q,
1576
- getContainer: j,
1614
+ getContainer: D,
1577
1615
  getDenyButton: te,
1578
- getFocusableElements: st,
1579
- getFooter: Dt,
1580
- getHtmlContainer: tt,
1581
- getIcon: ie,
1582
- getIconContent: Xn,
1583
- getImage: jt,
1584
- getInputLabel: Jn,
1585
- getLoader: le,
1616
+ getFocusableElements: it,
1617
+ getFooter: Vt,
1618
+ getHtmlContainer: ot,
1619
+ getIcon: ae,
1620
+ getIconContent: ro,
1621
+ getImage: Ht,
1622
+ getInputLabel: io,
1623
+ getLoader: ce,
1586
1624
  getPopup: S,
1587
- getProgressSteps: nt,
1588
- getTimerLeft: Zs,
1589
- getTimerProgressBar: Ne,
1590
- getTitle: zt,
1591
- getValidationMessage: Oe,
1592
- increaseTimer: Js,
1593
- isDeprecatedParameter: yn,
1594
- isLoading: eo,
1595
- isTimerRunning: Qs,
1596
- isUpdatableParameter: bn,
1597
- isValidParameter: mn,
1598
- isVisible: qo,
1599
- mixin: Ys,
1600
- off: rr,
1601
- on: or,
1602
- once: sr,
1603
- resumeTimer: En,
1625
+ getProgressSteps: st,
1626
+ getTimerLeft: sr,
1627
+ getTimerProgressBar: ze,
1628
+ getTitle: Rt,
1629
+ getValidationMessage: Ne,
1630
+ increaseTimer: ir,
1631
+ isDeprecatedParameter: xn,
1632
+ isLoading: lo,
1633
+ isTimerRunning: ar,
1634
+ isUpdatableParameter: kn,
1635
+ isValidParameter: Cn,
1636
+ isVisible: Qo,
1637
+ mixin: or,
1638
+ off: wr,
1639
+ on: dr,
1640
+ once: hr,
1641
+ resumeTimer: _n,
1604
1642
  showLoading: re,
1605
- stopTimer: An,
1606
- toggleTimer: Xs
1643
+ stopTimer: Tn,
1644
+ toggleTimer: rr
1607
1645
  });
1608
- class ar {
1646
+ class pr {
1609
1647
  /**
1610
1648
  * @param {() => void} callback
1611
1649
  * @param {number} delay
@@ -1646,7 +1684,7 @@ class ar {
1646
1684
  return this.running;
1647
1685
  }
1648
1686
  }
1649
- const Ln = ["swal-title", "swal-html", "swal-footer"], lr = (t) => {
1687
+ const In = ["swal-title", "swal-html", "swal-footer"], gr = (t) => {
1650
1688
  const e = typeof t.template == "string" ? (
1651
1689
  /** @type {HTMLTemplateElement} */
1652
1690
  document.querySelector(t.template)
@@ -1654,8 +1692,8 @@ const Ln = ["swal-title", "swal-html", "swal-footer"], lr = (t) => {
1654
1692
  if (!e)
1655
1693
  return {};
1656
1694
  const n = e.content;
1657
- return gr(n), Object.assign(cr(n), dr(n), ur(n), hr(n), wr(n), fr(n), pr(n, Ln));
1658
- }, cr = (t) => {
1695
+ return Ar(n), Object.assign(mr(n), br(n), yr(n), vr(n), Cr(n), kr(n), xr(n, In));
1696
+ }, mr = (t) => {
1659
1697
  const e = {};
1660
1698
  return Array.from(t.querySelectorAll("swal-param")).forEach((o) => {
1661
1699
  Q(o, ["name", "value"]);
@@ -1671,7 +1709,7 @@ const Ln = ["swal-title", "swal-html", "swal-footer"], lr = (t) => {
1671
1709
  s
1672
1710
  ] == "object" ? e[s] = JSON.parse(r) : e[s] = r);
1673
1711
  }), e;
1674
- }, dr = (t) => {
1712
+ }, br = (t) => {
1675
1713
  const e = {};
1676
1714
  return Array.from(t.querySelectorAll("swal-function-param")).forEach((o) => {
1677
1715
  const s = (
@@ -1680,13 +1718,13 @@ const Ln = ["swal-title", "swal-html", "swal-footer"], lr = (t) => {
1680
1718
  ), r = o.getAttribute("value");
1681
1719
  !s || !r || (e[s] = new Function(`return ${r}`)());
1682
1720
  }), e;
1683
- }, ur = (t) => {
1721
+ }, yr = (t) => {
1684
1722
  const e = {};
1685
1723
  return Array.from(t.querySelectorAll("swal-button")).forEach((o) => {
1686
1724
  Q(o, ["type", "color", "aria-label"]);
1687
1725
  const s = o.getAttribute("type");
1688
1726
  if (!(!s || !["confirm", "cancel", "deny"].includes(s))) {
1689
- if (e[`${s}ButtonText`] = o.innerHTML, e[`show${Je(s)}Button`] = !0, o.hasAttribute("color")) {
1727
+ if (e[`${s}ButtonText`] = o.innerHTML, e[`show${et(s)}Button`] = !0, o.hasAttribute("color")) {
1690
1728
  const r = o.getAttribute("color");
1691
1729
  r !== null && (e[`${s}ButtonColor`] = r);
1692
1730
  }
@@ -1696,13 +1734,13 @@ const Ln = ["swal-title", "swal-html", "swal-footer"], lr = (t) => {
1696
1734
  }
1697
1735
  }
1698
1736
  }), e;
1699
- }, hr = (t) => {
1737
+ }, vr = (t) => {
1700
1738
  const e = {}, n = t.querySelector("swal-image");
1701
1739
  return n && (Q(n, ["src", "width", "height", "alt"]), n.hasAttribute("src") && (e.imageUrl = n.getAttribute("src") || void 0), n.hasAttribute("width") && (e.imageWidth = n.getAttribute("width") || void 0), n.hasAttribute("height") && (e.imageHeight = n.getAttribute("height") || void 0), n.hasAttribute("alt") && (e.imageAlt = n.getAttribute("alt") || void 0)), e;
1702
- }, wr = (t) => {
1740
+ }, Cr = (t) => {
1703
1741
  const e = {}, n = t.querySelector("swal-icon");
1704
1742
  return n && (Q(n, ["type", "color"]), n.hasAttribute("type") && (e.icon = n.getAttribute("type")), n.hasAttribute("color") && (e.iconColor = n.getAttribute("color")), e.iconHtml = n.innerHTML), e;
1705
- }, fr = (t) => {
1743
+ }, kr = (t) => {
1706
1744
  const e = {}, n = t.querySelector("swal-input");
1707
1745
  n && (Q(n, ["type", "label", "placeholder", "value"]), e.input = n.getAttribute("type") || "text", n.hasAttribute("label") && (e.inputLabel = n.getAttribute("label")), n.hasAttribute("placeholder") && (e.inputPlaceholder = n.getAttribute("placeholder")), n.hasAttribute("value") && (e.inputValue = n.getAttribute("value")));
1708
1746
  const o = Array.from(t.querySelectorAll("swal-input-option"));
@@ -1711,18 +1749,18 @@ const Ln = ["swal-title", "swal-html", "swal-footer"], lr = (t) => {
1711
1749
  const r = s.getAttribute("value");
1712
1750
  if (!r)
1713
1751
  return;
1714
- const d = s.innerHTML;
1715
- e.inputOptions[r] = d;
1752
+ const a = s.innerHTML;
1753
+ e.inputOptions[r] = a;
1716
1754
  })), e;
1717
- }, pr = (t, e) => {
1755
+ }, xr = (t, e) => {
1718
1756
  const n = {};
1719
1757
  for (const o in e) {
1720
1758
  const s = e[o], r = t.querySelector(s);
1721
1759
  r && (Q(r, []), n[s.replace(/^swal-/, "")] = r.innerHTML.trim());
1722
1760
  }
1723
1761
  return n;
1724
- }, gr = (t) => {
1725
- const e = Ln.concat(["swal-param", "swal-function-param", "swal-button", "swal-image", "swal-icon", "swal-input", "swal-input-option"]);
1762
+ }, Ar = (t) => {
1763
+ const e = In.concat(["swal-param", "swal-function-param", "swal-button", "swal-image", "swal-icon", "swal-input", "swal-input-option"]);
1726
1764
  Array.from(t.children).forEach((n) => {
1727
1765
  const o = n.tagName.toLowerCase();
1728
1766
  e.includes(o) || z(`Unrecognized element <${o}>`);
@@ -1731,40 +1769,40 @@ const Ln = ["swal-title", "swal-html", "swal-footer"], lr = (t) => {
1731
1769
  Array.from(t.attributes).forEach((n) => {
1732
1770
  e.indexOf(n.name) === -1 && z([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`, `${e.length ? `Allowed attributes are: ${e.join(", ")}` : "To set the value, use HTML within the element."}`]);
1733
1771
  });
1734
- }, Sn = 10, mr = (t) => {
1772
+ }, $n = 10, Er = (t) => {
1735
1773
  var e, n;
1736
- const o = j(), s = S();
1774
+ const o = D(), s = S();
1737
1775
  if (!o || !s)
1738
1776
  return;
1739
1777
  typeof t.willOpen == "function" && t.willOpen(s), (e = p.eventEmitter) === null || e === void 0 || e.emit("willOpen", s);
1740
- const d = window.getComputedStyle(document.body).overflowY;
1741
- if (vr(o, s, t), setTimeout(() => {
1742
- br(o, s);
1743
- }, Sn), rt() && (yr(o, t.scrollbarPadding !== void 0 ? t.scrollbarPadding : !1, d), ts()), !ze() && !p.previousActiveElement && (p.previousActiveElement = document.activeElement), typeof t.didOpen == "function") {
1778
+ const a = window.getComputedStyle(document.body).overflowY;
1779
+ if (Tr(o, s, t), setTimeout(() => {
1780
+ Lr(o, s);
1781
+ }, $n), at() && (Sr(o, t.scrollbarPadding !== void 0 ? t.scrollbarPadding : !1, a), cs()), !De() && !p.previousActiveElement && (p.previousActiveElement = document.activeElement), typeof t.didOpen == "function") {
1744
1782
  const c = t.didOpen;
1745
1783
  setTimeout(() => c(s));
1746
1784
  }
1747
1785
  (n = p.eventEmitter) === null || n === void 0 || n.emit("didOpen", s);
1748
- }, Pe = (t) => {
1786
+ }, Me = (t) => {
1749
1787
  const e = S();
1750
1788
  if (!e || t.target !== e)
1751
1789
  return;
1752
- const n = j();
1753
- n && (e.removeEventListener("animationend", Pe), e.removeEventListener("transitionend", Pe), n.style.overflowY = "auto", V(n, a["no-transition"]));
1754
- }, br = (t, e) => {
1755
- Rt(e) ? (t.style.overflowY = "hidden", e.addEventListener("animationend", Pe), e.addEventListener("transitionend", Pe)) : t.style.overflowY = "auto";
1756
- }, yr = (t, e, n) => {
1757
- ns(), e && n !== "hidden" && cs(n), setTimeout(() => {
1790
+ const n = D();
1791
+ n && (e.removeEventListener("animationend", Me), e.removeEventListener("transitionend", Me), n.style.overflowY = "auto", V(n, l["no-transition"]));
1792
+ }, Lr = (t, e) => {
1793
+ Kt(e) ? (t.style.overflowY = "hidden", e.addEventListener("animationend", Me), e.addEventListener("transitionend", Me)) : t.style.overflowY = "auto";
1794
+ }, Sr = (t, e, n) => {
1795
+ us(), e && n !== "hidden" && ms(n), setTimeout(() => {
1758
1796
  t.scrollTop = 0;
1759
1797
  });
1760
- }, vr = (t, e, n) => {
1798
+ }, Tr = (t, e, n) => {
1761
1799
  var o;
1762
1800
  (o = n.showClass) !== null && o !== void 0 && o.backdrop && L(t, n.showClass.backdrop), n.animation ? (e.style.setProperty("opacity", "0", "important"), M(e, "grid"), setTimeout(() => {
1763
1801
  var s;
1764
1802
  (s = n.showClass) !== null && s !== void 0 && s.popup && L(e, n.showClass.popup), e.style.removeProperty("opacity");
1765
- }, Sn)) : M(e, "grid"), L([document.documentElement, document.body], a.shown), n.heightAuto && n.backdrop && !n.toast && L([document.documentElement, document.body], a["height-auto"]);
1803
+ }, $n)) : M(e, "grid"), L([document.documentElement, document.body], l.shown), n.heightAuto && n.backdrop && !n.toast && L([document.documentElement, document.body], l["height-auto"]);
1766
1804
  };
1767
- var St = {
1805
+ var $t = {
1768
1806
  /**
1769
1807
  * @param {string} string
1770
1808
  * @param {string} [validationMessage]
@@ -1778,29 +1816,29 @@ var St = {
1778
1816
  */
1779
1817
  url: (t, e) => /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t) ? Promise.resolve() : Promise.resolve(e || "Invalid URL")
1780
1818
  };
1781
- function Cr(t) {
1782
- t.inputValidator || (t.input === "email" && (t.inputValidator = St.email), t.input === "url" && (t.inputValidator = St.url));
1819
+ function _r(t) {
1820
+ t.inputValidator || (t.input === "email" && (t.inputValidator = $t.email), t.input === "url" && (t.inputValidator = $t.url));
1783
1821
  }
1784
- function kr(t) {
1822
+ function Ir(t) {
1785
1823
  (!t.target || typeof t.target == "string" && !document.querySelector(t.target) || typeof t.target != "string" && !t.target.appendChild) && (z('Target parameter is not valid, defaulting to "body"'), t.target = "body");
1786
1824
  }
1787
- function xr(t) {
1788
- Cr(t), t.showLoaderOnConfirm && !t.preConfirm && z(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
1825
+ function $r(t) {
1826
+ _r(t), t.showLoaderOnConfirm && !t.preConfirm && z(`showLoaderOnConfirm is set to true, but preConfirm is not defined.
1789
1827
  showLoaderOnConfirm should be used together with preConfirm, see usage example:
1790
- https://sweetalert2.github.io/#ajax-request`), kr(t), typeof t.title == "string" && (t.title = t.title.split(`
1791
- `).join("<br />")), wo(t);
1828
+ https://sweetalert2.github.io/#ajax-request`), Ir(t), typeof t.title == "string" && (t.title = t.title.split(`
1829
+ `).join("<br />")), Co(t);
1792
1830
  }
1793
1831
  let F;
1794
- var xe = /* @__PURE__ */ new WeakMap();
1832
+ var Ae = /* @__PURE__ */ new WeakMap();
1795
1833
  class P {
1796
1834
  /**
1797
1835
  * @param {...(SweetAlertOptions | string)} args
1798
1836
  * @this {SweetAlert}
1799
1837
  */
1800
1838
  constructor(...e) {
1801
- if (Vn(
1839
+ if (Xn(
1802
1840
  this,
1803
- xe,
1841
+ Ae,
1804
1842
  /** @type {Promise<SweetAlertResult>} */
1805
1843
  Promise.resolve({
1806
1844
  isConfirmed: !1,
@@ -1811,67 +1849,67 @@ class P {
1811
1849
  return;
1812
1850
  F = this;
1813
1851
  const n = Object.freeze(this.constructor.argsToParams(e));
1814
- this.params = n, this.isAwaitingPromise = !1, Fn(xe, this, this._main(F.params));
1852
+ this.params = n, this.isAwaitingPromise = !1, Jn(Ae, this, this._main(F.params));
1815
1853
  }
1816
1854
  /**
1817
1855
  * @param {any} userParams
1818
1856
  * @param {any} mixinParams
1819
1857
  */
1820
1858
  _main(e, n = {}) {
1821
- if (vn(Object.assign({}, n, e)), p.currentInstance) {
1859
+ if (An(Object.assign({}, n, e)), p.currentInstance) {
1822
1860
  const r = se.swalPromiseResolve.get(p.currentInstance), {
1823
- isAwaitingPromise: d
1861
+ isAwaitingPromise: a
1824
1862
  } = p.currentInstance;
1825
- p.currentInstance._destroy(), d || r({
1863
+ p.currentInstance._destroy(), a || r({
1826
1864
  isDismissed: !0
1827
- }), rt() && en();
1865
+ }), at() && sn();
1828
1866
  }
1829
1867
  p.currentInstance = F;
1830
- const o = Er(e, n);
1831
- xr(o), Object.freeze(o), p.timeout && (p.timeout.stop(), delete p.timeout), clearTimeout(p.restoreFocusTimeout);
1832
- const s = Lr(F);
1833
- return Zt(F, o), _.innerParams.set(F, o), Ar(F, s, o);
1868
+ const o = Pr(e, n);
1869
+ $r(o), Object.freeze(o), p.timeout && (p.timeout.stop(), delete p.timeout), clearTimeout(p.restoreFocusTimeout);
1870
+ const s = Mr(F);
1871
+ return en(F, o), I.innerParams.set(F, o), Br(F, s, o);
1834
1872
  }
1835
1873
  // `catch` cannot be the name of a module export, so we define our thenable methods here instead
1836
1874
  /**
1837
1875
  * @param {any} onFulfilled
1838
1876
  */
1839
1877
  then(e) {
1840
- return mt(xe, this).then(e);
1878
+ return Ct(Ae, this).then(e);
1841
1879
  }
1842
1880
  /**
1843
1881
  * @param {any} onFinally
1844
1882
  */
1845
1883
  finally(e) {
1846
- return mt(xe, this).finally(e);
1884
+ return Ct(Ae, this).finally(e);
1847
1885
  }
1848
1886
  }
1849
- const Ar = (t, e, n) => new Promise((o, s) => {
1850
- const r = (d) => {
1887
+ const Br = (t, e, n) => new Promise((o, s) => {
1888
+ const r = (a) => {
1851
1889
  t.close({
1852
1890
  isDismissed: !0,
1853
- dismiss: d,
1891
+ dismiss: a,
1854
1892
  isConfirmed: !1,
1855
1893
  isDenied: !1
1856
1894
  });
1857
1895
  };
1858
1896
  se.swalPromiseResolve.set(t, o), se.swalPromiseReject.set(t, s), e.confirmButton.onclick = () => {
1859
- Ls(t);
1897
+ Ms(t);
1860
1898
  }, e.denyButton.onclick = () => {
1861
- Ss(t);
1899
+ Os(t);
1862
1900
  }, e.cancelButton.onclick = () => {
1863
- Ts(t, r);
1901
+ Ns(t, r);
1864
1902
  }, e.closeButton.onclick = () => {
1865
- r(ce.close);
1866
- }, Us(n, e, r), Wo(p, n, r), ms(t, n), mr(n), Sr(p, n, r), Tr(e, n), setTimeout(() => {
1903
+ r(ue.close);
1904
+ }, Ws(n, e, r), ns(p, n, r), Es(t, n), Er(n), Or(p, n, r), Nr(e, n), setTimeout(() => {
1867
1905
  e.container.scrollTop = 0;
1868
1906
  });
1869
- }), Er = (t, e) => {
1870
- const n = lr(t), o = Object.assign({}, Y, e, n, t);
1907
+ }), Pr = (t, e) => {
1908
+ const n = gr(t), o = Object.assign({}, Y, e, n, t);
1871
1909
  return o.showClass = Object.assign({}, Y.showClass, o.showClass), o.hideClass = Object.assign({}, Y.hideClass, o.hideClass), o.animation === !1 && (o.showClass = {
1872
1910
  backdrop: "swal2-noanimation"
1873
1911
  }, o.hideClass = {}), o;
1874
- }, Lr = (t) => {
1912
+ }, Mr = (t) => {
1875
1913
  const e = (
1876
1914
  /** @type {DomCache} */
1877
1915
  {
@@ -1881,11 +1919,11 @@ const Ar = (t, e, n) => new Promise((o, s) => {
1881
1919
  ),
1882
1920
  container: (
1883
1921
  /** @type {HTMLElement} */
1884
- j()
1922
+ D()
1885
1923
  ),
1886
1924
  actions: (
1887
1925
  /** @type {HTMLElement} */
1888
- pe()
1926
+ ge()
1889
1927
  ),
1890
1928
  confirmButton: (
1891
1929
  /** @type {HTMLElement} */
@@ -1897,78 +1935,78 @@ const Ar = (t, e, n) => new Promise((o, s) => {
1897
1935
  ),
1898
1936
  cancelButton: (
1899
1937
  /** @type {HTMLElement} */
1900
- ae()
1938
+ le()
1901
1939
  ),
1902
1940
  loader: (
1903
1941
  /** @type {HTMLElement} */
1904
- le()
1942
+ ce()
1905
1943
  ),
1906
1944
  closeButton: (
1907
1945
  /** @type {HTMLElement} */
1908
- ot()
1946
+ rt()
1909
1947
  ),
1910
1948
  validationMessage: (
1911
1949
  /** @type {HTMLElement} */
1912
- Oe()
1950
+ Ne()
1913
1951
  ),
1914
1952
  progressSteps: (
1915
1953
  /** @type {HTMLElement} */
1916
- nt()
1954
+ st()
1917
1955
  )
1918
1956
  }
1919
1957
  );
1920
- return _.domCache.set(t, e), e;
1921
- }, Sr = (t, e, n) => {
1922
- const o = Ne();
1923
- N(o), e.timer && (t.timeout = new ar(() => {
1958
+ return I.domCache.set(t, e), e;
1959
+ }, Or = (t, e, n) => {
1960
+ const o = ze();
1961
+ N(o), e.timer && (t.timeout = new pr(() => {
1924
1962
  n("timer"), delete t.timeout;
1925
1963
  }, e.timer), e.timerProgressBar && o && (M(o), U(o, e, "timerProgressBar"), setTimeout(() => {
1926
- t.timeout && t.timeout.running && at(
1964
+ t.timeout && t.timeout.running && ct(
1927
1965
  /** @type {number} */
1928
1966
  e.timer
1929
1967
  );
1930
1968
  })));
1931
- }, Tr = (t, e) => {
1969
+ }, Nr = (t, e) => {
1932
1970
  if (!e.toast) {
1933
- if (!Me(e.allowEnterKey)) {
1934
- Nt("allowEnterKey"), Br();
1971
+ if (!Oe(e.allowEnterKey)) {
1972
+ Ut("allowEnterKey"), jr();
1935
1973
  return;
1936
1974
  }
1937
- _r(t) || $r(t, e) || Ge(-1, 1);
1975
+ zr(t) || Dr(t, e) || We(-1, 1);
1938
1976
  }
1939
- }, _r = (t) => {
1977
+ }, zr = (t) => {
1940
1978
  const e = Array.from(t.popup.querySelectorAll("[autofocus]"));
1941
1979
  for (const n of e)
1942
- if (n instanceof HTMLElement && D(n))
1980
+ if (n instanceof HTMLElement && j(n))
1943
1981
  return n.focus(), !0;
1944
1982
  return !1;
1945
- }, $r = (t, e) => e.focusDeny && D(t.denyButton) ? (t.denyButton.focus(), !0) : e.focusCancel && D(t.cancelButton) ? (t.cancelButton.focus(), !0) : e.focusConfirm && D(t.confirmButton) ? (t.confirmButton.focus(), !0) : !1, Br = () => {
1983
+ }, Dr = (t, e) => e.focusDeny && j(t.denyButton) ? (t.denyButton.focus(), !0) : e.focusCancel && j(t.cancelButton) ? (t.cancelButton.focus(), !0) : e.focusConfirm && j(t.confirmButton) ? (t.confirmButton.focus(), !0) : !1, jr = () => {
1946
1984
  document.activeElement instanceof HTMLElement && typeof document.activeElement.blur == "function" && document.activeElement.blur();
1947
1985
  };
1948
- P.prototype.disableButtons = hn;
1949
- P.prototype.enableButtons = un;
1950
- P.prototype.getInput = ln;
1951
- P.prototype.disableInput = fn;
1952
- P.prototype.enableInput = wn;
1986
+ P.prototype.disableButtons = gn;
1987
+ P.prototype.enableButtons = pn;
1988
+ P.prototype.getInput = hn;
1989
+ P.prototype.disableInput = bn;
1990
+ P.prototype.enableInput = mn;
1953
1991
  P.prototype.hideLoading = Be;
1954
1992
  P.prototype.disableLoading = Be;
1955
- P.prototype.showValidationMessage = pn;
1956
- P.prototype.resetValidationMessage = gn;
1993
+ P.prototype.showValidationMessage = yn;
1994
+ P.prototype.resetValidationMessage = vn;
1957
1995
  P.prototype.close = W;
1958
1996
  P.prototype.closePopup = W;
1959
1997
  P.prototype.closeModal = W;
1960
1998
  P.prototype.closeToast = W;
1961
- P.prototype.rejectPromise = on;
1962
- P.prototype.update = Cn;
1963
- P.prototype._destroy = kn;
1964
- Object.assign(P, ir);
1965
- Object.keys(Ds).forEach((t) => {
1999
+ P.prototype.rejectPromise = ln;
2000
+ P.prototype.update = En;
2001
+ P.prototype._destroy = Ln;
2002
+ Object.assign(P, fr);
2003
+ Object.keys(Gs).forEach((t) => {
1966
2004
  P[t] = function(...e) {
1967
2005
  if (F && F[t])
1968
2006
  return F[t](...e);
1969
2007
  };
1970
2008
  });
1971
- P.DismissReason = ce;
2009
+ P.DismissReason = ue;
1972
2010
  P.version = "11.26.18";
1973
2011
  const O = P;
1974
2012
  O.default = O;
@@ -1981,8 +2019,8 @@ typeof document < "u" && (function(t, e) {
1981
2019
  n.innerText = e;
1982
2020
  }
1983
2021
  })(document, ':root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-icon-animations: true;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem;container-name:swal2-popup}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}@container swal2-popup style(--swal2-icon-animations:true){div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:all}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}@container swal2-popup style(--swal2-icon-animations:true){.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}');
1984
- Xe.create();
1985
- class Ir {
2022
+ Qe.create();
2023
+ class Ur {
1986
2024
  constructor() {
1987
2025
  this.isActive = !1, this.baseUrl = "", this.appCode = "", this.token = "", this.currentLocale = "zh-CN", this.languages = [], this.wrappedElements = /* @__PURE__ */ new Set(), this.clickHandler = this.handleElementClick.bind(this);
1988
2026
  }
@@ -1990,14 +2028,14 @@ class Ir {
1990
2028
  * 初始化配置
1991
2029
  */
1992
2030
  async initConfig() {
1993
- const e = k.get("I18N_CONFIG") || {}, n = e.env || "local";
1994
- this.baseUrl = n === "local" ? "" : n === "dev" ? "https://test.ihotel.cn" : "https://trans.ihotel.cn", console.log("baseUrl:", this.baseUrl), this.appCode = e.appCode || "", this.unitCode = e.unitCode || "GREENCLOUD", this.token = e.token || (k.get("I18N_CONFIG") || {}).token || "", this.currentLocale = e.locale || k.get("I18N_LANGUAGE") || "zh-CN", await this.loadLanguages();
2031
+ const e = x.get("I18N_CONFIG") || {}, n = e.env || "local";
2032
+ this.baseUrl = n === "local" ? "" : n === "dev" ? "https://test.ihotel.cn" : "https://trans.ihotel.cn", console.log("baseUrl:", this.baseUrl), this.appCode = e.appCode || "", this.unitCode = e.unitCode || "GREENCLOUD", this.token = e.token || (x.get("I18N_CONFIG") || {}).token || "", this.currentLocale = e.locale || x.get("I18N_LANGUAGE") || "zh-CN", await this.loadLanguages();
1995
2033
  }
1996
2034
  /**
1997
2035
  * 加载语言列表
1998
2036
  */
1999
2037
  async loadLanguages() {
2000
- const e = k.get("I18N_LANGUAGES");
2038
+ const e = x.get("I18N_LANGUAGES");
2001
2039
  if (e && Array.isArray(e) && e.length > 0) {
2002
2040
  this.languages = e;
2003
2041
  return;
@@ -2007,17 +2045,17 @@ class Ir {
2007
2045
  return;
2008
2046
  }
2009
2047
  try {
2010
- const n = await zn({
2048
+ const n = await Fn({
2011
2049
  baseUrl: this.baseUrl,
2012
2050
  appCode: this.appCode,
2013
2051
  token: this.token
2014
2052
  });
2015
2053
  if (n.data && n.data.result === 0) {
2016
- const o = T.get(n.data, "retVal", []);
2054
+ const o = A.get(n.data, "retVal", []);
2017
2055
  this.languages = o.map((s) => ({
2018
2056
  langCode: s.language || s.langCode || s,
2019
2057
  langName: s.langName || s.language || s
2020
- })), k.set("I18N_LANGUAGES", this.languages);
2058
+ })), x.set("I18N_LANGUAGES", this.languages);
2021
2059
  }
2022
2060
  } catch (n) {
2023
2061
  console.error("获取语言列表失败:", n), this.languages = [];
@@ -2069,9 +2107,9 @@ class Ir {
2069
2107
  for (; s = n.nextNode(); )
2070
2108
  o.push(s);
2071
2109
  o.forEach((r) => {
2072
- const d = r.textContent;
2073
- if (!d || !d.trim()) return;
2074
- const c = this.findKeyByValue(d.trim());
2110
+ const a = r.textContent;
2111
+ if (!a || !a.trim()) return;
2112
+ const c = this.findKeyByValue(a.trim());
2075
2113
  c ? this.wrapTextNode(r, c) : this.wrapPartialTextNode(r);
2076
2114
  });
2077
2115
  }
@@ -2102,17 +2140,17 @@ class Ir {
2102
2140
  if (!o || o.tagName === "SCRIPT" || o.tagName === "STYLE" || o.tagName === "IFRAME" || o.classList.contains("i18n-editable-text") || o.classList.contains("i18n-text-overlay") || o.closest(".swal2-container"))
2103
2141
  return;
2104
2142
  const s = e.textContent, r = document.createDocumentFragment();
2105
- let d = 0;
2143
+ let a = 0;
2106
2144
  if (n.forEach((c) => {
2107
- const { translatedValue: i, key: l, index: u } = c;
2108
- if (u > d) {
2109
- const w = s.substring(d, u);
2145
+ const { translatedValue: i, key: u, index: d } = c;
2146
+ if (d > a) {
2147
+ const w = s.substring(a, d);
2110
2148
  r.appendChild(document.createTextNode(w));
2111
2149
  }
2112
2150
  const h = document.createElement("span");
2113
- h.className = "i18n-editable-text i18n-text-overlay", h.setAttribute("data-i18n-key", l), h.textContent = i, r.appendChild(h), this.wrappedElements.add(h), d = u + i.length;
2114
- }), d < s.length) {
2115
- const c = s.substring(d);
2151
+ h.className = "i18n-editable-text i18n-text-overlay", h.setAttribute("data-i18n-key", u), h.textContent = i, r.appendChild(h), this.wrappedElements.add(h), a = d + i.length;
2152
+ }), a < s.length) {
2153
+ const c = s.substring(a);
2116
2154
  r.appendChild(document.createTextNode(c));
2117
2155
  }
2118
2156
  o.replaceChild(r, e);
@@ -2125,13 +2163,13 @@ class Ir {
2125
2163
  if (!e) return null;
2126
2164
  if (globalThis.__I18N_KEY_VALUE_MAP__ && globalThis.__I18N_KEY_VALUE_MAP__[e])
2127
2165
  return globalThis.__I18N_KEY_VALUE_MAP__[e];
2128
- const s = `I18N_MESSAGES_COMMON_${(k.get("I18N_CONFIG") || {}).locale || "zh-CN"}`, r = k.get(s) || {};
2129
- for (const [i, l] of Object.entries(r))
2130
- if (l === e)
2166
+ const s = `I18N_MESSAGES_COMMON_${(x.get("I18N_CONFIG") || {}).locale || "zh-CN"}`, r = x.get(s) || {};
2167
+ for (const [i, u] of Object.entries(r))
2168
+ if (u === e)
2131
2169
  return i;
2132
- const d = `I18N_MESSAGES_${this.currentLocale}`, c = k.get(d) || {};
2133
- for (const [i, l] of Object.entries(c))
2134
- if (l === e)
2170
+ const a = `I18N_MESSAGES_${this.currentLocale}`, c = x.get(a) || {};
2171
+ for (const [i, u] of Object.entries(c))
2172
+ if (u === e)
2135
2173
  return i;
2136
2174
  return null;
2137
2175
  }
@@ -2208,12 +2246,12 @@ class Ir {
2208
2246
  type="text"
2209
2247
  class="i18n-edit-input"
2210
2248
  data-lang="${c.langCode}"
2211
- value="${this.escapeHtml(T.get(o, c.langCode) || "")}"
2249
+ value="${this.escapeHtml(A.get(o, c.langCode) || "")}"
2212
2250
  placeholder="请输入${c.langName}翻译"
2213
2251
  />
2214
2252
  </div>
2215
2253
  `
2216
- ).join(""), { value: r, isConfirmed: d } = await O.fire({
2254
+ ).join(""), { value: r, isConfirmed: a } = await O.fire({
2217
2255
  title: `原值参考:${o["zh-CN_raw"]}`,
2218
2256
  html: `
2219
2257
  <div class="i18n-edit-form">
@@ -2233,19 +2271,19 @@ class Ir {
2233
2271
  },
2234
2272
  preConfirm: async () => {
2235
2273
  const c = document.querySelectorAll(".i18n-edit-input"), i = {};
2236
- c.forEach((u) => {
2237
- i[u.getAttribute("data-lang")] = u.value;
2274
+ c.forEach((d) => {
2275
+ i[d.getAttribute("data-lang")] = d.value;
2238
2276
  });
2239
- const l = document.getElementById("i18n-save-error");
2240
- l && (l.style.display = "none", l.textContent = "");
2277
+ const u = document.getElementById("i18n-save-error");
2278
+ u && (u.style.display = "none", u.textContent = "");
2241
2279
  try {
2242
2280
  return await this.saveTranslations(e, i, n), i;
2243
- } catch (u) {
2244
- return l && (l.textContent = u.message || "保存失败,请检查网络连接或权限", l.style.display = "block"), !1;
2281
+ } catch (d) {
2282
+ return u && (u.textContent = d.message || "保存失败,请检查网络连接或权限", u.style.display = "block"), !1;
2245
2283
  }
2246
2284
  }
2247
2285
  });
2248
- d && r && (this.notifyLanguageUpdate(), O.fire({
2286
+ a && r && (this.notifyLanguageUpdate(), O.fire({
2249
2287
  text: "保存成功",
2250
2288
  icon: "success",
2251
2289
  timer: 1500,
@@ -2268,12 +2306,12 @@ class Ir {
2268
2306
  if (!this.appCode)
2269
2307
  return [];
2270
2308
  try {
2271
- const o = (k.get("I18N_CONFIG") || {}).routerName || "", s = await jn({
2309
+ const o = (x.get("I18N_CONFIG") || {}).routerName || "", s = await qn({
2272
2310
  baseUrl: this.baseUrl,
2273
2311
  data: {
2274
2312
  appCode: this.appCode,
2275
2313
  commaSeparatedKeys: e,
2276
- commaSeparatedLangs: T.map(this.languages, "langCode").toString(),
2314
+ commaSeparatedLangs: A.map(this.languages, "langCode").toString(),
2277
2315
  searchBlur: "",
2278
2316
  page: o,
2279
2317
  pageSize: 10
@@ -2281,7 +2319,7 @@ class Ir {
2281
2319
  token: this.token
2282
2320
  });
2283
2321
  if (s.data && s.data.result === 0)
2284
- return T.get(s.data, "retVal.datas", []);
2322
+ return A.get(s.data, "retVal.datas", []);
2285
2323
  } catch (n) {
2286
2324
  console.error("获取翻译数据失败:", n);
2287
2325
  }
@@ -2294,20 +2332,20 @@ class Ir {
2294
2332
  var i;
2295
2333
  const s = o[0], { page: r } = s;
2296
2334
  console.log(n);
2297
- const d = [];
2298
- T.map(n, (l, u) => {
2299
- d.push({
2335
+ const a = [];
2336
+ A.map(n, (u, d) => {
2337
+ a.push({
2300
2338
  appCode: this.appCode,
2301
2339
  page: r,
2302
2340
  key: e,
2303
2341
  unitCode: this.unitCode,
2304
- lang: u,
2305
- value: l,
2342
+ lang: d,
2343
+ value: u,
2306
2344
  fromAi: "F"
2307
2345
  });
2308
2346
  });
2309
- const c = await Dn({
2310
- data: { data: d, isLocal: "F" },
2347
+ const c = await Kn({
2348
+ data: { data: a, isLocal: "F" },
2311
2349
  token: this.token,
2312
2350
  baseUrl: this.baseUrl
2313
2351
  });
@@ -2342,198 +2380,198 @@ class Ir {
2342
2380
  });
2343
2381
  }
2344
2382
  }
2345
- const Pr = new Ir();
2346
- function Mr(t) {
2383
+ const Rr = new Ur();
2384
+ function Hr(t) {
2347
2385
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
2348
2386
  }
2349
- var Ve = { exports: {} }, Tt;
2350
- function Or() {
2351
- return Tt || (Tt = 1, (function(t) {
2387
+ var qe = { exports: {} }, Bt;
2388
+ function Vr() {
2389
+ return Bt || (Bt = 1, (function(t) {
2352
2390
  var e = (function() {
2353
2391
  var n = String.fromCharCode, o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$", r = {};
2354
- function d(i, l) {
2392
+ function a(i, u) {
2355
2393
  if (!r[i]) {
2356
2394
  r[i] = {};
2357
- for (var u = 0; u < i.length; u++)
2358
- r[i][i.charAt(u)] = u;
2395
+ for (var d = 0; d < i.length; d++)
2396
+ r[i][i.charAt(d)] = d;
2359
2397
  }
2360
- return r[i][l];
2398
+ return r[i][u];
2361
2399
  }
2362
2400
  var c = {
2363
2401
  compressToBase64: function(i) {
2364
2402
  if (i == null) return "";
2365
- var l = c._compress(i, 6, function(u) {
2366
- return o.charAt(u);
2403
+ var u = c._compress(i, 6, function(d) {
2404
+ return o.charAt(d);
2367
2405
  });
2368
- switch (l.length % 4) {
2406
+ switch (u.length % 4) {
2369
2407
  // To produce valid Base64
2370
2408
  default:
2371
2409
  // When could this happen ?
2372
2410
  case 0:
2373
- return l;
2411
+ return u;
2374
2412
  case 1:
2375
- return l + "===";
2413
+ return u + "===";
2376
2414
  case 2:
2377
- return l + "==";
2415
+ return u + "==";
2378
2416
  case 3:
2379
- return l + "=";
2417
+ return u + "=";
2380
2418
  }
2381
2419
  },
2382
2420
  decompressFromBase64: function(i) {
2383
- return i == null ? "" : i == "" ? null : c._decompress(i.length, 32, function(l) {
2384
- return d(o, i.charAt(l));
2421
+ return i == null ? "" : i == "" ? null : c._decompress(i.length, 32, function(u) {
2422
+ return a(o, i.charAt(u));
2385
2423
  });
2386
2424
  },
2387
2425
  compressToUTF16: function(i) {
2388
- return i == null ? "" : c._compress(i, 15, function(l) {
2389
- return n(l + 32);
2426
+ return i == null ? "" : c._compress(i, 15, function(u) {
2427
+ return n(u + 32);
2390
2428
  }) + " ";
2391
2429
  },
2392
2430
  decompressFromUTF16: function(i) {
2393
- return i == null ? "" : i == "" ? null : c._decompress(i.length, 16384, function(l) {
2394
- return i.charCodeAt(l) - 32;
2431
+ return i == null ? "" : i == "" ? null : c._decompress(i.length, 16384, function(u) {
2432
+ return i.charCodeAt(u) - 32;
2395
2433
  });
2396
2434
  },
2397
2435
  //compress into uint8array (UCS-2 big endian format)
2398
2436
  compressToUint8Array: function(i) {
2399
- for (var l = c.compress(i), u = new Uint8Array(l.length * 2), h = 0, w = l.length; h < w; h++) {
2400
- var x = l.charCodeAt(h);
2401
- u[h * 2] = x >>> 8, u[h * 2 + 1] = x % 256;
2437
+ for (var u = c.compress(i), d = new Uint8Array(u.length * 2), h = 0, w = u.length; h < w; h++) {
2438
+ var k = u.charCodeAt(h);
2439
+ d[h * 2] = k >>> 8, d[h * 2 + 1] = k % 256;
2402
2440
  }
2403
- return u;
2441
+ return d;
2404
2442
  },
2405
2443
  //decompress from uint8array (UCS-2 big endian format)
2406
2444
  decompressFromUint8Array: function(i) {
2407
2445
  if (i == null)
2408
2446
  return c.decompress(i);
2409
- for (var l = new Array(i.length / 2), u = 0, h = l.length; u < h; u++)
2410
- l[u] = i[u * 2] * 256 + i[u * 2 + 1];
2447
+ for (var u = new Array(i.length / 2), d = 0, h = u.length; d < h; d++)
2448
+ u[d] = i[d * 2] * 256 + i[d * 2 + 1];
2411
2449
  var w = [];
2412
- return l.forEach(function(x) {
2413
- w.push(n(x));
2450
+ return u.forEach(function(k) {
2451
+ w.push(n(k));
2414
2452
  }), c.decompress(w.join(""));
2415
2453
  },
2416
2454
  //compress into a string that is already URI encoded
2417
2455
  compressToEncodedURIComponent: function(i) {
2418
- return i == null ? "" : c._compress(i, 6, function(l) {
2419
- return s.charAt(l);
2456
+ return i == null ? "" : c._compress(i, 6, function(u) {
2457
+ return s.charAt(u);
2420
2458
  });
2421
2459
  },
2422
2460
  //decompress from an output of compressToEncodedURIComponent
2423
2461
  decompressFromEncodedURIComponent: function(i) {
2424
- return i == null ? "" : i == "" ? null : (i = i.replace(/ /g, "+"), c._decompress(i.length, 32, function(l) {
2425
- return d(s, i.charAt(l));
2462
+ return i == null ? "" : i == "" ? null : (i = i.replace(/ /g, "+"), c._decompress(i.length, 32, function(u) {
2463
+ return a(s, i.charAt(u));
2426
2464
  }));
2427
2465
  },
2428
2466
  compress: function(i) {
2429
- return c._compress(i, 16, function(l) {
2430
- return n(l);
2467
+ return c._compress(i, 16, function(u) {
2468
+ return n(u);
2431
2469
  });
2432
2470
  },
2433
- _compress: function(i, l, u) {
2471
+ _compress: function(i, u, d) {
2434
2472
  if (i == null) return "";
2435
- var h, w, x = {}, A = {}, $ = "", B = "", E = "", g = 2, v = 3, y = 2, C = [], f = 0, m = 0, b;
2473
+ var h, w, k = {}, T = {}, _ = "", $ = "", E = "", g = 2, y = 3, v = 2, C = [], f = 0, m = 0, b;
2436
2474
  for (b = 0; b < i.length; b += 1)
2437
- if ($ = i.charAt(b), Object.prototype.hasOwnProperty.call(x, $) || (x[$] = v++, A[$] = !0), B = E + $, Object.prototype.hasOwnProperty.call(x, B))
2438
- E = B;
2475
+ if (_ = i.charAt(b), Object.prototype.hasOwnProperty.call(k, _) || (k[_] = y++, T[_] = !0), $ = E + _, Object.prototype.hasOwnProperty.call(k, $))
2476
+ E = $;
2439
2477
  else {
2440
- if (Object.prototype.hasOwnProperty.call(A, E)) {
2478
+ if (Object.prototype.hasOwnProperty.call(T, E)) {
2441
2479
  if (E.charCodeAt(0) < 256) {
2442
- for (h = 0; h < y; h++)
2443
- f = f << 1, m == l - 1 ? (m = 0, C.push(u(f)), f = 0) : m++;
2480
+ for (h = 0; h < v; h++)
2481
+ f = f << 1, m == u - 1 ? (m = 0, C.push(d(f)), f = 0) : m++;
2444
2482
  for (w = E.charCodeAt(0), h = 0; h < 8; h++)
2445
- f = f << 1 | w & 1, m == l - 1 ? (m = 0, C.push(u(f)), f = 0) : m++, w = w >> 1;
2483
+ f = f << 1 | w & 1, m == u - 1 ? (m = 0, C.push(d(f)), f = 0) : m++, w = w >> 1;
2446
2484
  } else {
2447
- for (w = 1, h = 0; h < y; h++)
2448
- f = f << 1 | w, m == l - 1 ? (m = 0, C.push(u(f)), f = 0) : m++, w = 0;
2485
+ for (w = 1, h = 0; h < v; h++)
2486
+ f = f << 1 | w, m == u - 1 ? (m = 0, C.push(d(f)), f = 0) : m++, w = 0;
2449
2487
  for (w = E.charCodeAt(0), h = 0; h < 16; h++)
2450
- f = f << 1 | w & 1, m == l - 1 ? (m = 0, C.push(u(f)), f = 0) : m++, w = w >> 1;
2488
+ f = f << 1 | w & 1, m == u - 1 ? (m = 0, C.push(d(f)), f = 0) : m++, w = w >> 1;
2451
2489
  }
2452
- g--, g == 0 && (g = Math.pow(2, y), y++), delete A[E];
2490
+ g--, g == 0 && (g = Math.pow(2, v), v++), delete T[E];
2453
2491
  } else
2454
- for (w = x[E], h = 0; h < y; h++)
2455
- f = f << 1 | w & 1, m == l - 1 ? (m = 0, C.push(u(f)), f = 0) : m++, w = w >> 1;
2456
- g--, g == 0 && (g = Math.pow(2, y), y++), x[B] = v++, E = String($);
2492
+ for (w = k[E], h = 0; h < v; h++)
2493
+ f = f << 1 | w & 1, m == u - 1 ? (m = 0, C.push(d(f)), f = 0) : m++, w = w >> 1;
2494
+ g--, g == 0 && (g = Math.pow(2, v), v++), k[$] = y++, E = String(_);
2457
2495
  }
2458
2496
  if (E !== "") {
2459
- if (Object.prototype.hasOwnProperty.call(A, E)) {
2497
+ if (Object.prototype.hasOwnProperty.call(T, E)) {
2460
2498
  if (E.charCodeAt(0) < 256) {
2461
- for (h = 0; h < y; h++)
2462
- f = f << 1, m == l - 1 ? (m = 0, C.push(u(f)), f = 0) : m++;
2499
+ for (h = 0; h < v; h++)
2500
+ f = f << 1, m == u - 1 ? (m = 0, C.push(d(f)), f = 0) : m++;
2463
2501
  for (w = E.charCodeAt(0), h = 0; h < 8; h++)
2464
- f = f << 1 | w & 1, m == l - 1 ? (m = 0, C.push(u(f)), f = 0) : m++, w = w >> 1;
2502
+ f = f << 1 | w & 1, m == u - 1 ? (m = 0, C.push(d(f)), f = 0) : m++, w = w >> 1;
2465
2503
  } else {
2466
- for (w = 1, h = 0; h < y; h++)
2467
- f = f << 1 | w, m == l - 1 ? (m = 0, C.push(u(f)), f = 0) : m++, w = 0;
2504
+ for (w = 1, h = 0; h < v; h++)
2505
+ f = f << 1 | w, m == u - 1 ? (m = 0, C.push(d(f)), f = 0) : m++, w = 0;
2468
2506
  for (w = E.charCodeAt(0), h = 0; h < 16; h++)
2469
- f = f << 1 | w & 1, m == l - 1 ? (m = 0, C.push(u(f)), f = 0) : m++, w = w >> 1;
2507
+ f = f << 1 | w & 1, m == u - 1 ? (m = 0, C.push(d(f)), f = 0) : m++, w = w >> 1;
2470
2508
  }
2471
- g--, g == 0 && (g = Math.pow(2, y), y++), delete A[E];
2509
+ g--, g == 0 && (g = Math.pow(2, v), v++), delete T[E];
2472
2510
  } else
2473
- for (w = x[E], h = 0; h < y; h++)
2474
- f = f << 1 | w & 1, m == l - 1 ? (m = 0, C.push(u(f)), f = 0) : m++, w = w >> 1;
2475
- g--, g == 0 && (g = Math.pow(2, y), y++);
2511
+ for (w = k[E], h = 0; h < v; h++)
2512
+ f = f << 1 | w & 1, m == u - 1 ? (m = 0, C.push(d(f)), f = 0) : m++, w = w >> 1;
2513
+ g--, g == 0 && (g = Math.pow(2, v), v++);
2476
2514
  }
2477
- for (w = 2, h = 0; h < y; h++)
2478
- f = f << 1 | w & 1, m == l - 1 ? (m = 0, C.push(u(f)), f = 0) : m++, w = w >> 1;
2515
+ for (w = 2, h = 0; h < v; h++)
2516
+ f = f << 1 | w & 1, m == u - 1 ? (m = 0, C.push(d(f)), f = 0) : m++, w = w >> 1;
2479
2517
  for (; ; )
2480
- if (f = f << 1, m == l - 1) {
2481
- C.push(u(f));
2518
+ if (f = f << 1, m == u - 1) {
2519
+ C.push(d(f));
2482
2520
  break;
2483
2521
  } else m++;
2484
2522
  return C.join("");
2485
2523
  },
2486
2524
  decompress: function(i) {
2487
- return i == null ? "" : i == "" ? null : c._decompress(i.length, 32768, function(l) {
2488
- return i.charCodeAt(l);
2525
+ return i == null ? "" : i == "" ? null : c._decompress(i.length, 32768, function(u) {
2526
+ return i.charCodeAt(u);
2489
2527
  });
2490
2528
  },
2491
- _decompress: function(i, l, u) {
2492
- var h = [], w = 4, x = 4, A = 3, $ = "", B = [], E, g, v, y, C, f, m, b = { val: u(0), position: l, index: 1 };
2529
+ _decompress: function(i, u, d) {
2530
+ var h = [], w = 4, k = 4, T = 3, _ = "", $ = [], E, g, y, v, C, f, m, b = { val: d(0), position: u, index: 1 };
2493
2531
  for (E = 0; E < 3; E += 1)
2494
2532
  h[E] = E;
2495
- for (v = 0, C = Math.pow(2, 2), f = 1; f != C; )
2496
- y = b.val & b.position, b.position >>= 1, b.position == 0 && (b.position = l, b.val = u(b.index++)), v |= (y > 0 ? 1 : 0) * f, f <<= 1;
2497
- switch (v) {
2533
+ for (y = 0, C = Math.pow(2, 2), f = 1; f != C; )
2534
+ v = b.val & b.position, b.position >>= 1, b.position == 0 && (b.position = u, b.val = d(b.index++)), y |= (v > 0 ? 1 : 0) * f, f <<= 1;
2535
+ switch (y) {
2498
2536
  case 0:
2499
- for (v = 0, C = Math.pow(2, 8), f = 1; f != C; )
2500
- y = b.val & b.position, b.position >>= 1, b.position == 0 && (b.position = l, b.val = u(b.index++)), v |= (y > 0 ? 1 : 0) * f, f <<= 1;
2501
- m = n(v);
2537
+ for (y = 0, C = Math.pow(2, 8), f = 1; f != C; )
2538
+ v = b.val & b.position, b.position >>= 1, b.position == 0 && (b.position = u, b.val = d(b.index++)), y |= (v > 0 ? 1 : 0) * f, f <<= 1;
2539
+ m = n(y);
2502
2540
  break;
2503
2541
  case 1:
2504
- for (v = 0, C = Math.pow(2, 16), f = 1; f != C; )
2505
- y = b.val & b.position, b.position >>= 1, b.position == 0 && (b.position = l, b.val = u(b.index++)), v |= (y > 0 ? 1 : 0) * f, f <<= 1;
2506
- m = n(v);
2542
+ for (y = 0, C = Math.pow(2, 16), f = 1; f != C; )
2543
+ v = b.val & b.position, b.position >>= 1, b.position == 0 && (b.position = u, b.val = d(b.index++)), y |= (v > 0 ? 1 : 0) * f, f <<= 1;
2544
+ m = n(y);
2507
2545
  break;
2508
2546
  case 2:
2509
2547
  return "";
2510
2548
  }
2511
- for (h[3] = m, g = m, B.push(m); ; ) {
2549
+ for (h[3] = m, g = m, $.push(m); ; ) {
2512
2550
  if (b.index > i)
2513
2551
  return "";
2514
- for (v = 0, C = Math.pow(2, A), f = 1; f != C; )
2515
- y = b.val & b.position, b.position >>= 1, b.position == 0 && (b.position = l, b.val = u(b.index++)), v |= (y > 0 ? 1 : 0) * f, f <<= 1;
2516
- switch (m = v) {
2552
+ for (y = 0, C = Math.pow(2, T), f = 1; f != C; )
2553
+ v = b.val & b.position, b.position >>= 1, b.position == 0 && (b.position = u, b.val = d(b.index++)), y |= (v > 0 ? 1 : 0) * f, f <<= 1;
2554
+ switch (m = y) {
2517
2555
  case 0:
2518
- for (v = 0, C = Math.pow(2, 8), f = 1; f != C; )
2519
- y = b.val & b.position, b.position >>= 1, b.position == 0 && (b.position = l, b.val = u(b.index++)), v |= (y > 0 ? 1 : 0) * f, f <<= 1;
2520
- h[x++] = n(v), m = x - 1, w--;
2556
+ for (y = 0, C = Math.pow(2, 8), f = 1; f != C; )
2557
+ v = b.val & b.position, b.position >>= 1, b.position == 0 && (b.position = u, b.val = d(b.index++)), y |= (v > 0 ? 1 : 0) * f, f <<= 1;
2558
+ h[k++] = n(y), m = k - 1, w--;
2521
2559
  break;
2522
2560
  case 1:
2523
- for (v = 0, C = Math.pow(2, 16), f = 1; f != C; )
2524
- y = b.val & b.position, b.position >>= 1, b.position == 0 && (b.position = l, b.val = u(b.index++)), v |= (y > 0 ? 1 : 0) * f, f <<= 1;
2525
- h[x++] = n(v), m = x - 1, w--;
2561
+ for (y = 0, C = Math.pow(2, 16), f = 1; f != C; )
2562
+ v = b.val & b.position, b.position >>= 1, b.position == 0 && (b.position = u, b.val = d(b.index++)), y |= (v > 0 ? 1 : 0) * f, f <<= 1;
2563
+ h[k++] = n(y), m = k - 1, w--;
2526
2564
  break;
2527
2565
  case 2:
2528
- return B.join("");
2566
+ return $.join("");
2529
2567
  }
2530
- if (w == 0 && (w = Math.pow(2, A), A++), h[m])
2531
- $ = h[m];
2532
- else if (m === x)
2533
- $ = g + g.charAt(0);
2568
+ if (w == 0 && (w = Math.pow(2, T), T++), h[m])
2569
+ _ = h[m];
2570
+ else if (m === k)
2571
+ _ = g + g.charAt(0);
2534
2572
  else
2535
2573
  return null;
2536
- B.push($), h[x++] = g + $.charAt(0), w--, g = $, w == 0 && (w = Math.pow(2, A), A++);
2574
+ $.push(_), h[k++] = g + _.charAt(0), w--, g = _, w == 0 && (w = Math.pow(2, T), T++);
2537
2575
  }
2538
2576
  }
2539
2577
  };
@@ -2542,44 +2580,159 @@ function Or() {
2542
2580
  t != null ? t.exports = e : typeof angular < "u" && angular != null && angular.module("LZString", []).factory("LZString", function() {
2543
2581
  return e;
2544
2582
  });
2545
- })(Ve)), Ve.exports;
2546
- }
2547
- var Nr = Or();
2548
- const Ae = /* @__PURE__ */ Mr(Nr);
2549
- function Ye(t) {
2550
- const e = [], n = /(?:\$t|_ctx\.\$t)\s*\(\s*(['"])([^'"]+?)\1/gs;
2551
- if (t.template) {
2552
- let o;
2553
- for (; (o = n.exec(t.template)) !== null; )
2554
- e.push(o[2]);
2555
- }
2556
- if (t.render) {
2583
+ })(qe)), qe.exports;
2584
+ }
2585
+ var Fr = Vr();
2586
+ const Ee = /* @__PURE__ */ Hr(Fr);
2587
+ function Ze(t) {
2588
+ const e = [], n = (o) => {
2589
+ e.push(...qr(o));
2590
+ };
2591
+ if (t.template && n(t.template), t.render) {
2557
2592
  const o = t.render.toString();
2558
- let s;
2559
- for (; (s = n.exec(o)) !== null; )
2560
- e.push(s[2]);
2593
+ n(o);
2561
2594
  }
2562
2595
  if (t.setup) {
2563
2596
  const o = t.setup.toString();
2564
- let s;
2565
- for (; (s = n.exec(o)) !== null; )
2566
- e.push(s[2]);
2597
+ n(o);
2567
2598
  }
2568
2599
  if (t.methods)
2569
2600
  for (const o in t.methods) {
2570
2601
  const s = t.methods[o].toString();
2571
- let r;
2572
- for (; (r = n.exec(s)) !== null; )
2573
- e.push(r[2]);
2602
+ n(s);
2574
2603
  }
2575
2604
  if (t.components)
2576
2605
  for (const o in t.components) {
2577
2606
  const s = t.components[o];
2578
- e.push(...Ye(s));
2607
+ e.push(...Ze(s));
2579
2608
  }
2580
2609
  return [...new Set(e)];
2581
2610
  }
2582
- const _t = {
2611
+ function qr(t) {
2612
+ const e = [], n = /(?:\$t|(?:this|_vm|_ctx|\$setup|ctx|globalThis)\.\$t)\s*\(/g;
2613
+ for (; n.exec(t) !== null; ) {
2614
+ const o = n.lastIndex - 1, s = Bn(t, o);
2615
+ if (s === -1) continue;
2616
+ const r = t.slice(o + 1, s), a = Kr(r);
2617
+ e.push(...Xe(a)), n.lastIndex = s + 1;
2618
+ }
2619
+ return e;
2620
+ }
2621
+ function Xe(t) {
2622
+ const e = Yr(t.trim()), n = Zr(e);
2623
+ if (n !== null) return [n];
2624
+ const o = Gr(e);
2625
+ return o ? [
2626
+ ...Xe(o.consequent),
2627
+ ...Xe(o.alternate)
2628
+ ] : [];
2629
+ }
2630
+ function Kr(t) {
2631
+ const e = Pn(t, ",");
2632
+ return e === -1 ? t : t.slice(0, e);
2633
+ }
2634
+ function Gr(t) {
2635
+ const e = Pn(t, "?");
2636
+ if (e === -1) return null;
2637
+ const n = Wr(t, e + 1);
2638
+ return n === -1 ? null : {
2639
+ consequent: t.slice(e + 1, n),
2640
+ alternate: t.slice(n + 1)
2641
+ };
2642
+ }
2643
+ function Bn(t, e) {
2644
+ let n = 0;
2645
+ for (let o = e; o < t.length; o++) {
2646
+ const s = t[o];
2647
+ if (Ue(s)) {
2648
+ o = pt(t, o);
2649
+ continue;
2650
+ }
2651
+ if (s === "(" && n++, s === ")" && (n--, n === 0))
2652
+ return o;
2653
+ }
2654
+ return -1;
2655
+ }
2656
+ function Pn(t, e) {
2657
+ let n = 0, o = 0, s = 0;
2658
+ for (let r = 0; r < t.length; r++) {
2659
+ const a = t[r];
2660
+ if (Ue(a)) {
2661
+ r = pt(t, r);
2662
+ continue;
2663
+ }
2664
+ if (a === "(") n++;
2665
+ else if (a === ")") n--;
2666
+ else if (a === "[") o++;
2667
+ else if (a === "]") o--;
2668
+ else if (a === "{") s++;
2669
+ else if (a === "}") s--;
2670
+ else if (a === e && !Mn(t, r, e) && n === 0 && o === 0 && s === 0)
2671
+ return r;
2672
+ }
2673
+ return -1;
2674
+ }
2675
+ function Wr(t, e) {
2676
+ let n = 0, o = 0, s = 0, r = 0;
2677
+ for (let a = e; a < t.length; a++) {
2678
+ const c = t[a];
2679
+ if (Ue(c)) {
2680
+ a = pt(t, a);
2681
+ continue;
2682
+ }
2683
+ if (c === "(") o++;
2684
+ else if (c === ")") o--;
2685
+ else if (c === "[") s++;
2686
+ else if (c === "]") s--;
2687
+ else if (c === "{") r++;
2688
+ else if (c === "}") r--;
2689
+ else if (o === 0 && s === 0 && r === 0 && (c === "?" && !Mn(t, a, "?") && n++, c === ":")) {
2690
+ if (n === 0) return a;
2691
+ n--;
2692
+ }
2693
+ }
2694
+ return -1;
2695
+ }
2696
+ function Yr(t) {
2697
+ let e = t;
2698
+ for (; e.startsWith("(") && Bn(e, 0) === e.length - 1; )
2699
+ e = e.slice(1, -1).trim();
2700
+ return e;
2701
+ }
2702
+ function Zr(t) {
2703
+ if (!t || !Ue(t[0])) return null;
2704
+ const e = t[0];
2705
+ let n = "";
2706
+ for (let o = 1; o < t.length; o++) {
2707
+ const s = t[o];
2708
+ if (s === "\\") {
2709
+ n += t[o + 1] || "", o++;
2710
+ continue;
2711
+ }
2712
+ if (s === e)
2713
+ return e === "`" && n.includes("${") || t.slice(o + 1).trim() ? null : n;
2714
+ n += s;
2715
+ }
2716
+ return null;
2717
+ }
2718
+ function pt(t, e) {
2719
+ const n = t[e];
2720
+ for (let o = e + 1; o < t.length; o++) {
2721
+ if (t[o] === "\\") {
2722
+ o++;
2723
+ continue;
2724
+ }
2725
+ if (t[o] === n) return o;
2726
+ }
2727
+ return t.length - 1;
2728
+ }
2729
+ function Ue(t) {
2730
+ return t === "'" || t === '"' || t === "`";
2731
+ }
2732
+ function Mn(t, e, n) {
2733
+ return n === "?" && (t[e + 1] === "." || t[e + 1] === "?");
2734
+ }
2735
+ const Pt = {
2583
2736
  name: "Earth",
2584
2737
  props: {
2585
2738
  editable: {
@@ -2619,55 +2772,55 @@ const _t = {
2619
2772
  },
2620
2773
  emits: ["update:modelValue"],
2621
2774
  setup(t, { emit: e }) {
2622
- const n = ne("zh-CN"), o = ne(""), s = ne(""), r = ne([]), d = () => {
2623
- const g = k.get("I18N_CONFIG") || {};
2624
- o.value = g.appCode || "", s.value = g.token || (k.get("I18N_CONFIG") || {}).token || "", n.value = k.get("I18N_LANGUAGE") || g.locale || "zh-CN";
2775
+ const n = ne("zh-CN"), o = ne(""), s = ne(""), r = ne([]), a = () => {
2776
+ const g = x.get("I18N_CONFIG") || {};
2777
+ o.value = g.appCode || "", s.value = g.token || (x.get("I18N_CONFIG") || {}).token || "", n.value = x.get("I18N_LANGUAGE") || g.locale || "zh-CN";
2625
2778
  }, c = async () => {
2626
2779
  if (t.languages && t.languages.length > 0) {
2627
2780
  r.value = t.languages;
2628
2781
  return;
2629
2782
  }
2630
- const g = await It({
2783
+ const g = await Nt({
2631
2784
  baseUrl: t.baseUrl,
2632
2785
  token: s.value,
2633
2786
  appCode: o.value
2634
2787
  });
2635
2788
  r.value = g;
2636
- }, i = De(() => {
2789
+ }, i = Re(() => {
2637
2790
  const g = {};
2638
- return !t.modelValue || !Array.isArray(t.modelValue) || t.modelValue.forEach((v) => {
2639
- v && typeof v == "object" && Object.keys(v).forEach((y) => {
2640
- g[y] = v[y];
2791
+ return !t.modelValue || !Array.isArray(t.modelValue) || t.modelValue.forEach((y) => {
2792
+ y && typeof y == "object" && Object.keys(y).forEach((v) => {
2793
+ g[v] = y[v];
2641
2794
  });
2642
2795
  }), g;
2643
- }), l = De(() => i.value[n.value] || ""), u = De(() => Object.keys(i.value).filter((v) => v !== n.value).map((v) => ({
2644
- lang: v,
2645
- value: i.value[v]
2796
+ }), u = Re(() => i.value[n.value] || ""), d = Re(() => Object.keys(i.value).filter((y) => y !== n.value).map((y) => ({
2797
+ lang: y,
2798
+ value: i.value[y]
2646
2799
  }))), h = (g) => {
2647
2800
  if (!g) return "";
2648
- const v = document.createElement("div");
2649
- return v.textContent = g, v.innerHTML;
2801
+ const y = document.createElement("div");
2802
+ return y.textContent = g, y.innerHTML;
2650
2803
  }, w = (g) => {
2651
- g.data && g.data.type === "updateLanguage" && (n.value = k.get("I18N_LANGUAGE") || "zh-CN");
2652
- }, x = () => {
2804
+ g.data && g.data.type === "updateLanguage" && (n.value = x.get("I18N_LANGUAGE") || "zh-CN");
2805
+ }, k = () => {
2653
2806
  if (typeof window > "u") return;
2654
- const g = { type: "updateLanguage" }, v = window.location.origin, y = [window];
2807
+ const g = { type: "updateLanguage" }, y = window.location.origin, v = [window];
2655
2808
  try {
2656
- window.parent && window.parent !== window && y.push(window.parent);
2809
+ window.parent && window.parent !== window && v.push(window.parent);
2657
2810
  } catch {
2658
2811
  }
2659
2812
  try {
2660
- window.top && window.top !== window && window.top !== window.parent && y.push(window.top);
2813
+ window.top && window.top !== window && window.top !== window.parent && v.push(window.top);
2661
2814
  } catch {
2662
2815
  }
2663
- Array.from(new Set(y)).forEach((C) => {
2664
- C.postMessage(g, v);
2816
+ Array.from(new Set(v)).forEach((C) => {
2817
+ C.postMessage(g, y);
2665
2818
  });
2666
- }, A = () => {
2819
+ }, T = () => {
2667
2820
  window.addEventListener("storage", (g) => {
2668
2821
  g.key === "I18N_LANGUAGE" && (n.value = g.newValue || "zh-CN");
2669
2822
  });
2670
- }, $ = async () => {
2823
+ }, _ = async () => {
2671
2824
  r.value.length === 0 && await c();
2672
2825
  const g = r.value.map(
2673
2826
  (C) => `
@@ -2682,7 +2835,7 @@ const _t = {
2682
2835
  />
2683
2836
  </div>
2684
2837
  `
2685
- ).join(""), { value: v, isConfirmed: y } = await O.fire({
2838
+ ).join(""), { value: y, isConfirmed: v } = await O.fire({
2686
2839
  title: "编辑多语言",
2687
2840
  html: `
2688
2841
  <div class="i18n-edit-form">
@@ -2715,11 +2868,11 @@ const _t = {
2715
2868
  return f;
2716
2869
  }
2717
2870
  });
2718
- if (y && v) {
2719
- const C = Object.keys(v).map((f) => ({
2720
- [f]: v[f]
2871
+ if (v && y) {
2872
+ const C = Object.keys(y).map((f) => ({
2873
+ [f]: y[f]
2721
2874
  }));
2722
- e("update:modelValue", C), x(), O.fire({
2875
+ e("update:modelValue", C), k(), O.fire({
2723
2876
  text: "保存成功",
2724
2877
  icon: "success",
2725
2878
  timer: 1500,
@@ -2728,8 +2881,8 @@ const _t = {
2728
2881
  toast: !0
2729
2882
  });
2730
2883
  }
2731
- }, B = () => {
2732
- const g = u.value;
2884
+ }, $ = () => {
2885
+ const g = d.value;
2733
2886
  if (g.length === 0) {
2734
2887
  O.fire({
2735
2888
  title: "多语言翻译",
@@ -2737,11 +2890,11 @@ const _t = {
2737
2890
  });
2738
2891
  return;
2739
2892
  }
2740
- const v = g.map(
2741
- (y) => `
2893
+ const y = g.map(
2894
+ (v) => `
2742
2895
  <div class="i18n-lang-item">
2743
- <span class="i18n-lang-code">${y.lang}:</span>
2744
- <span class="i18n-lang-value">${y.value || "-"}</span>
2896
+ <span class="i18n-lang-code">${v.lang}:</span>
2897
+ <span class="i18n-lang-value">${v.value || "-"}</span>
2745
2898
  </div>
2746
2899
  `
2747
2900
  ).join("");
@@ -2751,11 +2904,11 @@ const _t = {
2751
2904
  <div class="i18n-modal-content">
2752
2905
  <div class="i18n-current-lang">
2753
2906
  <strong>当前语言 (${n.value}):</strong>
2754
- <span>${l.value || "-"}</span>
2907
+ <span>${u.value || "-"}</span>
2755
2908
  </div>
2756
2909
  <div class="i18n-other-langs">
2757
2910
  <strong>其他语言:</strong>
2758
- ${v}
2911
+ ${y}
2759
2912
  </div>
2760
2913
  </div>
2761
2914
  `,
@@ -2770,19 +2923,19 @@ const _t = {
2770
2923
  }
2771
2924
  });
2772
2925
  }, E = () => {
2773
- t.request && typeof t.request == "function" ? $() : B();
2926
+ t.request && typeof t.request == "function" ? _() : $();
2774
2927
  };
2775
- return In(() => {
2776
- d(), c(), window.addEventListener("message", w), A();
2928
+ return jn(() => {
2929
+ a(), c(), window.addEventListener("message", w), T();
2777
2930
  }), {
2778
- currentValue: l,
2931
+ currentValue: u,
2779
2932
  openModal: E
2780
2933
  };
2781
2934
  },
2782
2935
  render() {
2783
2936
  const { editable: t, width: e, className: n } = this, o = e !== null ? { width: e + "px" } : {}, s = n ? `earth ${n}` : "earth";
2784
- return ye("div", { class: s }, [
2785
- ye("input", {
2937
+ return ve("div", { class: s }, [
2938
+ ve("input", {
2786
2939
  class: "input",
2787
2940
  type: "text",
2788
2941
  value: this.currentValue,
@@ -2791,7 +2944,7 @@ const _t = {
2791
2944
  placeholder: "",
2792
2945
  style: o
2793
2946
  }),
2794
- ye(
2947
+ ve(
2795
2948
  "svg",
2796
2949
  {
2797
2950
  class: "icon earth-icon",
@@ -2802,7 +2955,7 @@ const _t = {
2802
2955
  onClick: this.openModal
2803
2956
  },
2804
2957
  [
2805
- ye("path", {
2958
+ ve("path", {
2806
2959
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"
2807
2960
  })
2808
2961
  ]
@@ -2810,7 +2963,7 @@ const _t = {
2810
2963
  ]);
2811
2964
  }
2812
2965
  };
2813
- function ue(t) {
2966
+ function we(t) {
2814
2967
  if (!t || typeof t != "string") return t;
2815
2968
  const e = t.toLowerCase();
2816
2969
  return {
@@ -2821,29 +2974,29 @@ function ue(t) {
2821
2974
  "en-us": "en-US"
2822
2975
  }[e] || t;
2823
2976
  }
2824
- function Tn(t = {}) {
2977
+ function On(t = {}) {
2825
2978
  const e = Object.entries(t || {});
2826
- return e.some(([, o]) => o && typeof o == "object" && !Array.isArray(o) && Object.keys(o).some((s) => s.includes("-"))) ? e.reduce((o, [s, r]) => (!r || typeof r != "object" || Array.isArray(r) || Object.entries(r).forEach(([d, c]) => {
2827
- const i = ue(d);
2979
+ return e.some(([, o]) => o && typeof o == "object" && !Array.isArray(o) && Object.keys(o).some((s) => s.includes("-"))) ? e.reduce((o, [s, r]) => (!r || typeof r != "object" || Array.isArray(r) || Object.entries(r).forEach(([a, c]) => {
2980
+ const i = we(a);
2828
2981
  o[i] = o[i] || {}, o[i][s] = c;
2829
- }), o), {}) : e.reduce((o, [s, r]) => (o[ue(s)] = r, o), {});
2982
+ }), o), {}) : e.reduce((o, [s, r]) => (o[we(s)] = r, o), {});
2830
2983
  }
2831
- function $t(t, e) {
2832
- return t[e] || t[ue(e)] || t[String(e || "").toLowerCase()] || {};
2984
+ function Mt(t, e) {
2985
+ return t[e] || t[we(e)] || t[String(e || "").toLowerCase()] || {};
2833
2986
  }
2834
- function de(t, e) {
2987
+ function he(t, e) {
2835
2988
  if (typeof t != "string" || !e || typeof e != "object" || Array.isArray(e))
2836
2989
  return t;
2837
2990
  const n = Object.entries(e);
2838
2991
  return t.replace(/\\?\$\{\s*([^}]+?)\s*\}/g, (o, s) => {
2839
- const r = String(s || "").trim(), d = n.find(([i]) => i === r || r === "this." + i || r === "_vm." + i || r === "_ctx." + i || r === "$setup." + i || i === r.replace(/^(?:this|_vm|_ctx|\$setup)\./, ""));
2840
- if (!d)
2992
+ const r = String(s || "").trim(), a = n.find(([i]) => i === r || r === "this." + i || r === "_vm." + i || r === "_ctx." + i || r === "$setup." + i || i === r.replace(/^(?:this|_vm|_ctx|\$setup)\./, ""));
2993
+ if (!a)
2841
2994
  return o;
2842
- const c = d[1];
2995
+ const c = a[1];
2843
2996
  return c != null ? String(c) : o;
2844
2997
  });
2845
2998
  }
2846
- function _n(t, e) {
2999
+ function Nn(t, e) {
2847
3000
  return e === void 0 && t && typeof t == "object" && !Array.isArray(t) ? {
2848
3001
  defaultValue: void 0,
2849
3002
  values: t
@@ -2852,13 +3005,13 @@ function _n(t, e) {
2852
3005
  values: e
2853
3006
  };
2854
3007
  }
2855
- function zr(t) {
2856
- const { locale: e = "zh-CN", messages: n = {} } = t, o = Tn(n), s = ne(e), r = ne(0), d = wt(), c = Ze() && d && typeof d.observable == "function" ? d.observable({
3008
+ function Xr(t) {
3009
+ const { locale: e = "zh-CN", messages: n = {} } = t, o = On(n), s = ne(e), r = ne(0), a = gt(), c = Je() && a && typeof a.observable == "function" ? a.observable({
2857
3010
  locale: e,
2858
3011
  messageVersion: 0
2859
- }) : null, i = () => c ? c.locale : s.value, l = (w) => {
3012
+ }) : null, i = () => c ? c.locale : s.value, u = (w) => {
2860
3013
  s.value = w, c && (c.locale = w);
2861
- }, u = () => {
3014
+ }, d = () => {
2862
3015
  r.value += 1, c && (c.messageVersion += 1);
2863
3016
  }, h = {
2864
3017
  // 当前语言 (兼容 Vue 3 的 .value 访问)
@@ -2867,48 +3020,75 @@ function zr(t) {
2867
3020
  return i();
2868
3021
  },
2869
3022
  set value(w) {
2870
- l(w);
3023
+ u(w);
2871
3024
  }
2872
3025
  },
2873
3026
  // 翻译函数(支持嵌套 key 的点号访问)
2874
- t(w, x, A) {
2875
- const $ = _n(x, A);
2876
- x = $.defaultValue, A = $.values, r.value, c && c.messageVersion;
2877
- const B = i();
2878
- if (B === "zh-CN" && !w.startsWith("i.") && !w.startsWith("pro."))
2879
- return de(x || w, A);
2880
- const E = $t(o, B);
3027
+ t(w, k, T) {
3028
+ const _ = Nn(k, T);
3029
+ k = _.defaultValue, T = _.values, r.value, c && c.messageVersion;
3030
+ const $ = i();
3031
+ if ($ === "zh-CN" && !w.startsWith("i.") && !w.startsWith("pro."))
3032
+ return he(k || w, T);
3033
+ const E = Mt(o, $);
2881
3034
  let g = E[w];
2882
- return g === void 0 && w.includes(".") && (g = w.split(".").reduce((y, C) => y && typeof y == "object" ? y[C] : void 0, E)), de(g && typeof g == "string" && g !== w ? g : x || w, A);
3035
+ return g === void 0 && w.includes(".") && (g = w.split(".").reduce((v, C) => v && typeof v == "object" ? v[C] : void 0, E)), he(g && typeof g == "string" && g !== w ? g : k || w, T);
2883
3036
  },
2884
3037
  // 设置某个语言的所有消息
2885
- setLocaleMessage(w, x) {
2886
- return o[ue(w)] = { ...x }, u(), o[ue(w)];
3038
+ setLocaleMessage(w, k) {
3039
+ return o[we(w)] = { ...k }, d(), o[we(w)];
2887
3040
  },
2888
3041
  // 获取某个语言的消息
2889
3042
  getLocaleMessage(w) {
2890
- return $t(o, w);
3043
+ return Mt(o, w);
2891
3044
  }
2892
3045
  };
2893
3046
  return h.global = h, h;
2894
3047
  }
2895
- const $n = Xe.create({
3048
+ const zn = Qe.create({
2896
3049
  timeout: 8e3
2897
3050
  });
2898
- $n.interceptors.request.use((t) => {
2899
- const n = (k.get("I18N_CONFIG") || {}).token;
3051
+ zn.interceptors.request.use((t) => {
3052
+ const n = (x.get("I18N_CONFIG") || {}).token;
2900
3053
  return n && (t.headers.Authorization = `Bearer ${n}`), t;
2901
3054
  });
2902
- function jr(t) {
2903
- const e = {
3055
+ function Jr(t = {}) {
3056
+ const n = JSON.stringify({
2904
3057
  alg: "HS512"
2905
3058
  // 算法
2906
- }, n = {
2907
- orgCode: t
2908
- }, o = JSON.stringify(e), s = JSON.stringify(n);
2909
- return Pn.JWS.sign("HS512", o, s, "");
3059
+ }), o = JSON.stringify(t);
3060
+ return Un.JWS.sign("HS512", n, o, "");
3061
+ }
3062
+ function Qr(t) {
3063
+ if (!t || typeof t != "string") return "";
3064
+ const e = t.replace(/-/g, "+").replace(/_/g, "/"), n = e.padEnd(
3065
+ e.length + (4 - e.length % 4) % 4,
3066
+ "="
3067
+ );
3068
+ try {
3069
+ if (typeof atob == "function")
3070
+ return decodeURIComponent(
3071
+ Array.from(atob(n), (o) => `%${o.charCodeAt(0).toString(16).padStart(2, "0")}`).join("")
3072
+ );
3073
+ } catch {
3074
+ }
3075
+ return "";
3076
+ }
3077
+ function ei(t) {
3078
+ if (!t || typeof t != "string") return null;
3079
+ const e = t.split(".");
3080
+ if (e.length !== 3) return null;
3081
+ try {
3082
+ return JSON.parse(Qr(e[1]));
3083
+ } catch {
3084
+ return null;
3085
+ }
3086
+ }
3087
+ function ti(t) {
3088
+ const e = ei(t);
3089
+ return !!(e && (e.mainAppCode && e.userCode && e.deviceType || e.appCode && e.orgCode && e.userCode && e.i18n_token));
2910
3090
  }
2911
- function Bt(t) {
3091
+ function Ot(t) {
2912
3092
  if (!t) return "";
2913
3093
  const e = String(t);
2914
3094
  let n = 0;
@@ -2916,22 +3096,22 @@ function Bt(t) {
2916
3096
  n = (n << 5) - n + e.charCodeAt(o), n |= 0;
2917
3097
  return `user_${Math.abs(n)}`;
2918
3098
  }
2919
- function Fe(t, ...e) {
3099
+ function de(t, ...e) {
2920
3100
  if (typeof t == "function")
2921
3101
  return t(...e);
2922
3102
  }
2923
- function wt(t) {
2924
- return t && (t.version || t.prototype || t.config) ? t : ve && ve.version ? ve : ve;
3103
+ function gt(t) {
3104
+ return t && (t.version || t.prototype || t.config) ? t : Ce && Ce.version ? Ce : Ce;
2925
3105
  }
2926
- function Ze(t) {
3106
+ function Je(t) {
2927
3107
  if (t && t.config && t.config.globalProperties)
2928
3108
  return !1;
2929
- const e = wt(t), n = e && e.version;
3109
+ const e = gt(t), n = e && e.version;
2930
3110
  return typeof n == "string" ? n.split(".")[0] === "2" : !!(e && e.prototype);
2931
3111
  }
2932
- function Bn(t, e = /* @__PURE__ */ new Set()) {
3112
+ function Dn(t, e = /* @__PURE__ */ new Set()) {
2933
3113
  if (!t || e.has(t)) return;
2934
- e.add(t), typeof t.$forceUpdate == "function" && t.$forceUpdate(), (t.$children || []).forEach((o) => Bn(o, e));
3114
+ e.add(t), typeof t.$forceUpdate == "function" && t.$forceUpdate(), (t.$children || []).forEach((o) => Dn(o, e));
2935
3115
  }
2936
3116
  class X {
2937
3117
  constructor(e = {}) {
@@ -2940,36 +3120,35 @@ class X {
2940
3120
  appCode: o,
2941
3121
  messages: s,
2942
3122
  token: r,
2943
- orgCode: d,
3123
+ orgCode: a,
2944
3124
  loginRouteName: c,
2945
3125
  login: i,
2946
- keyboard: l,
2947
- locale: u,
3126
+ keyboard: u,
3127
+ locale: d,
2948
3128
  env: h,
2949
3129
  dev: w,
2950
- auth: x
3130
+ i18nTokenRequest: k,
3131
+ auth: T
2951
3132
  } = e;
2952
- this.env = h || "local", this.baseUrl = h === "dev" || w === !0 ? "https://test.ihotel.cn" : !h || h === "local" ? "" : "https://trans.ihotel.cn", this.baseToken = r || (d ? jr(d) : "") || (k.get("I18N_CONFIG") || {}).token || k.get("token"), this.token = this.baseToken, this.auth = x || null, this.manualAuthScope = d || (r ? Bt(r) : ""), this.authUnsubscribe = null, this.authVersion = 0, this.languageVersion = 0, this.activeCacheScope = this.manualAuthScope || "guest", this.loadI18n = !0, this.appCode = o, this.router = n, this.locale = this.normalizeLocale(
2953
- u || k.get("I18N_LANGUAGE") || navigator.language || "zh-CN"
2954
- ), this._isRTL = Ce(this.locale), k.set("I18N_CONFIG", {
2955
- baseUrl: this.baseUrl,
2956
- appCode: this.appCode,
2957
- token: this.token,
2958
- locale: this.locale,
2959
- env: this.env
2960
- }), this.name = "", this.messages = Tn(s || {}), this.translationKeys = [], this.translationKeySet = /* @__PURE__ */ new Set(), this.loginRouteName = c || "login", this.login = i, this.loginTranslationKeys = [], this.keyboard = l || "ctrl+shift+l", this.vueInstances = /* @__PURE__ */ new Set(), this.editKeyboard = e.editKeyboard || "ctrl+shift+e", this.applyAuthState(this.resolveAuthState(), { silent: !0 }), this.initI18n(e), this.router && this.initRouterGuards(), ft.bind(this.keyboard, (A) => {
2961
- A.preventDefault();
3133
+ this.env = h || "local", this.baseUrl = h === "dev" || w === !0 ? "https://test.ihotel.cn" : !h || h === "local" ? "" : "https://trans.ihotel.cn", this.i18nTokenRequest = k || null, this.baseToken = r || (x.get("I18N_CONFIG") || {}).token || x.get("token"), this.token = this.baseToken, this.auth = T || null, this.authInfo = {
3134
+ appCode: o,
3135
+ orgCode: a || "",
3136
+ userCode: ""
3137
+ }, this.tokenResolveVersion = 0, this.manualAuthScope = a || (r ? Ot(r) : ""), this.authUnsubscribe = null, this.authVersion = 0, this.languageVersion = 0, this.activeCacheScope = this.manualAuthScope || "guest", this.loadI18n = !0, this.appCode = o, this.router = n, this.locale = this.normalizeLocale(
3138
+ d || x.get("I18N_LANGUAGE") || navigator.language || "zh-CN"
3139
+ ), this._isRTL = ke(this.locale), this.persistI18nConfig(), this.name = "", this.messages = On(s || {}), this.translationKeys = [], this.translationKeySet = /* @__PURE__ */ new Set(), this.loginRouteName = c || "login", this.login = i, this.loginTranslationKeys = [], this.keyboard = u || "ctrl+shift+l", this.vueInstances = /* @__PURE__ */ new Set(), this.editKeyboard = e.editKeyboard || "ctrl+shift+e", this.applyAuthState(this.resolveAuthState(), { silent: !0 }), this.initI18n(e), this.router && this.initRouterGuards(), mt.bind(this.keyboard, (_) => {
3140
+ _.preventDefault();
2962
3141
  const $ = Array.from(this.translationKeySet);
2963
3142
  this.translationKeys = Array.from(
2964
3143
  /* @__PURE__ */ new Set([...this.translationKeys || [], ...$])
2965
3144
  );
2966
- const B = {
3145
+ const E = {
2967
3146
  name: this.name,
2968
3147
  token: this.token,
2969
3148
  appCode: this.appCode,
2970
3149
  env: this.env,
2971
3150
  translationKeys: this.translationKeys
2972
- }, E = this.encodeQueryParams(B), g = `${this.baseUrl}/i18n-admin-front/#/config?data=${E}`;
3151
+ }, g = this.encodeQueryParams(E), y = `${this.baseUrl}/i18n-admin-front/#/config?data=${g}`;
2973
3152
  this.swalInstance = O.fire({
2974
3153
  titleText: "多语言管理",
2975
3154
  padding: "0px",
@@ -2985,10 +3164,10 @@ class X {
2985
3164
  closeButton: "gc_i18n_close_button",
2986
3165
  htmlContainer: "gc_i18n_html_container"
2987
3166
  },
2988
- html: `<iframe src="${g}" style="width: 100%; height: 100%;border: none;min-height: 480px;"></iframe>`
3167
+ html: `<iframe src="${y}" style="width: 100%; height: 100%;border: none;min-height: 480px;"></iframe>`
2989
3168
  });
2990
- }), ft.bind(this.editKeyboard, (A) => {
2991
- A.preventDefault(), Pr.toggle();
3169
+ }), mt.bind(this.editKeyboard, (_) => {
3170
+ _.preventDefault(), Rr.toggle();
2992
3171
  }), this.setupLanguageChangeListener(), this.setupAuthListener(), this.setupMessageListener();
2993
3172
  }
2994
3173
  /**
@@ -3010,25 +3189,80 @@ class X {
3010
3189
  });
3011
3190
  }
3012
3191
  resolveAuthState() {
3013
- const e = this.auth || {}, n = Fe(e.getToken) ?? "", o = Fe(e.getScope) ?? Fe(e.getUserScope) ?? "", s = typeof e.isAuthenticated == "function" ? !!e.isAuthenticated() : !!n, r = s ? String(
3014
- o || Bt(n) || this.manualAuthScope || "user"
3192
+ const e = this.auth || {}, n = de(e.getToken) ?? "", o = de(e.getScope) ?? de(e.getUserScope) ?? "", s = de(e.getOrgCode) ?? "", r = de(e.getUserCode) ?? "", a = typeof e.isAuthenticated == "function" ? !!e.isAuthenticated() : !!n, c = a ? String(
3193
+ o || Ot(n) || this.manualAuthScope || "user"
3015
3194
  ) : "guest";
3016
3195
  return {
3017
3196
  token: n,
3018
- scope: r,
3019
- isAuthenticated: s
3197
+ scope: c,
3198
+ orgCode: s,
3199
+ userCode: r,
3200
+ isAuthenticated: a
3020
3201
  };
3021
3202
  }
3022
- applyAuthState(e = {}, { silent: n = !1 } = {}) {
3023
- const o = this.token, s = this.activeCacheScope, r = e.token ?? "", d = e.isAuthenticated ? e.scope || "user" : "guest";
3024
- return this.userToken = r, this.token = e.isAuthenticated ? r || this.baseToken : this.baseToken, this.activeCacheScope = d, k.set("I18N_TOKEN", this.token), k.set("I18N_CONFIG", {
3203
+ normalizeAuthInfo(e = {}) {
3204
+ const n = {
3205
+ appCode: e.appCode || this.appCode,
3206
+ orgCode: e.orgCode || "",
3207
+ userCode: e.userCode || ""
3208
+ };
3209
+ return this.authInfo = n, n;
3210
+ }
3211
+ persistI18nConfig(e = {}) {
3212
+ x.set("I18N_CONFIG", {
3213
+ ...x.get("I18N_CONFIG") || {},
3025
3214
  baseUrl: this.baseUrl,
3026
3215
  appCode: this.appCode,
3027
3216
  token: this.token,
3028
3217
  locale: this.locale,
3029
3218
  env: this.env,
3030
- cacheScope: this.activeCacheScope
3031
- }), n ? !1 : o !== this.token || s !== this.activeCacheScope;
3219
+ cacheScope: this.activeCacheScope,
3220
+ ...e
3221
+ });
3222
+ }
3223
+ async createI18nToken(e, n = {}) {
3224
+ if (!e) return "";
3225
+ if (ti(e))
3226
+ return e;
3227
+ const o = {
3228
+ appCode: n.appCode || this.appCode,
3229
+ orgCode: n.orgCode || "",
3230
+ userCode: n.userCode || ""
3231
+ };
3232
+ if (!o.orgCode || !o.userCode)
3233
+ return console.warn(
3234
+ "非 JWT token 需要通过 setToken(token, { orgCode, userCode }) 提供鉴权信息"
3235
+ ), e;
3236
+ try {
3237
+ const s = await Gn({
3238
+ request: this.i18nTokenRequest,
3239
+ appCode: o.appCode || this.appCode,
3240
+ orgCode: o.orgCode,
3241
+ userCode: o.userCode,
3242
+ token: e
3243
+ });
3244
+ return s ? Jr({
3245
+ appCode: o.appCode || this.appCode,
3246
+ orgCode: o.orgCode,
3247
+ userCode: o.userCode,
3248
+ i18n_token: s
3249
+ }) : (console.warn("获取 i18n_token 失败,继续使用原 token"), e);
3250
+ } catch (s) {
3251
+ return console.warn("获取 i18n_token 失败,继续使用原 token", s), e;
3252
+ }
3253
+ }
3254
+ resolveAndApplyI18nToken(e, n = {}, { refresh: o = !0 } = {}) {
3255
+ const s = ++this.tokenResolveVersion;
3256
+ return this.createI18nToken(e, n).then((r) => {
3257
+ if (s !== this.tokenResolveVersion || !r)
3258
+ return !1;
3259
+ const a = this.token !== r;
3260
+ return this.token = r, x.set("I18N_TOKEN", this.token), this.persistI18nConfig(), a && o ? this.refreshLanguageForCurrentAuth() : a;
3261
+ });
3262
+ }
3263
+ applyAuthState(e = {}, { silent: n = !1 } = {}) {
3264
+ const o = this.token, s = this.activeCacheScope, r = e.token ?? "", a = e.isAuthenticated ? e.scope || "user" : "guest";
3265
+ return this.userToken = r, this.token = e.isAuthenticated ? r || this.baseToken : this.baseToken, this.activeCacheScope = a, x.set("I18N_TOKEN", this.token), this.persistI18nConfig(), n ? !1 : o !== this.token || s !== this.activeCacheScope;
3032
3266
  }
3033
3267
  async refreshLanguageForCurrentAuth() {
3034
3268
  const e = ++this.authVersion, n = this.locale, o = this.activeCacheScope || "guest";
@@ -3042,6 +3276,9 @@ class X {
3042
3276
  const n = {
3043
3277
  token: (e == null ? void 0 : e.token) ?? this.resolveAuthState().token,
3044
3278
  scope: (e == null ? void 0 : e.scope) ?? (e == null ? void 0 : e.userScope) ?? (e == null ? void 0 : e.orgCode) ?? "",
3279
+ orgCode: (e == null ? void 0 : e.orgCode) ?? "",
3280
+ userCode: (e == null ? void 0 : e.userCode) ?? "",
3281
+ appCode: (e == null ? void 0 : e.appCode) ?? this.appCode,
3045
3282
  isAuthenticated: typeof (e == null ? void 0 : e.isAuthenticated) == "boolean" ? e.isAuthenticated : !!((e == null ? void 0 : e.token) ?? this.resolveAuthState().token)
3046
3283
  };
3047
3284
  this.applyAuthState(n) && this.refreshLanguageForCurrentAuth();
@@ -3084,56 +3321,56 @@ class X {
3084
3321
  this.router && (X._routerGuardRegistered || (X._routerGuardRegistered = !0, this.router.beforeEach(async (e, n, o) => {
3085
3322
  var c, i;
3086
3323
  const { language: s, token: r } = e.query;
3087
- if (this.configInstance && this.configInstance.closeModal(), this.name = e.name, this.translationKeySet = /* @__PURE__ */ new Set(), r && this.setToken(r), this.loadI18n)
3324
+ if (this.configInstance && this.configInstance.closeModal(), this.name = e.name, this.translationKeySet = /* @__PURE__ */ new Set(), r && await this.setToken(r), this.loadI18n)
3088
3325
  try {
3089
3326
  await this.setLanguage(s || this.locale, {
3090
3327
  cacheScope: this.activeCacheScope
3091
3328
  });
3092
- } catch (l) {
3093
- console.error("初始化语言失败,已跳过阻塞:", l);
3329
+ } catch (u) {
3330
+ console.error("初始化语言失败,已跳过阻塞:", u);
3094
3331
  }
3095
3332
  this.loadI18n = !1;
3096
- const d = this.router.getRoutes().find((l) => l.name === this.loginRouteName || l.path === `/${this.loginRouteName}`);
3097
- if (d && d.components) {
3098
- let l = (c = d.components) == null ? void 0 : c.default;
3099
- if (typeof l == "function" && l.toString().includes("import("))
3333
+ const a = this.router.getRoutes().find((u) => u.name === this.loginRouteName || u.path === `/${this.loginRouteName}`);
3334
+ if (a && a.components) {
3335
+ let u = (c = a.components) == null ? void 0 : c.default;
3336
+ if (typeof u == "function" && u.toString().includes("import("))
3100
3337
  try {
3101
- l = await l(), l = l.default;
3338
+ u = await u(), u = u.default;
3102
3339
  } catch (h) {
3103
3340
  console.error("加载异步组件时出错:", h), o();
3104
3341
  return;
3105
3342
  }
3106
- const u = Ye(l);
3107
- this.loginTranslationKeys = u;
3343
+ const d = Ze(u);
3344
+ this.loginTranslationKeys = d;
3108
3345
  }
3109
3346
  if (e.matched.length > 0)
3110
3347
  try {
3111
- const l = [];
3112
- for (const u of e.matched) {
3113
- let h = (i = u.components) == null ? void 0 : i.default;
3348
+ const u = [];
3349
+ for (const d of e.matched) {
3350
+ let h = (i = d.components) == null ? void 0 : i.default;
3114
3351
  if (typeof h == "function" && h.toString().includes("import(") && (h = await h(), h = h.default), h) {
3115
- const w = Ye(h);
3116
- l.push(...w);
3352
+ const w = Ze(h);
3353
+ u.push(...w);
3117
3354
  }
3118
3355
  }
3119
- this.translationKeys = l;
3120
- } catch (l) {
3121
- console.error("加载异步组件时出错:", l), o();
3356
+ this.translationKeys = u;
3357
+ } catch (u) {
3358
+ console.error("加载异步组件时出错:", u), o();
3122
3359
  return;
3123
3360
  }
3124
3361
  o();
3125
3362
  }), X._afterEachGuardRegistered || (X._afterEachGuardRegistered = !0, this.router.afterEach(async () => {
3126
- var r, d;
3127
- await pt();
3363
+ var r, a;
3364
+ await bt();
3128
3365
  const e = Array.from(this.translationKeySet), n = Array.from(
3129
3366
  /* @__PURE__ */ new Set([...this.translationKeys || [], ...e])
3130
3367
  );
3131
3368
  this.translationKeys = n;
3132
- const o = (r = this.router) == null ? void 0 : r.currentRoute, s = (d = (o == null ? void 0 : o.value) ?? o) == null ? void 0 : d.name;
3369
+ const o = (r = this.router) == null ? void 0 : r.currentRoute, s = (a = (o == null ? void 0 : o.value) ?? o) == null ? void 0 : a.name;
3133
3370
  if (s === this.loginRouteName && (this.loginTranslationKeys = n), s) {
3134
3371
  this.name = s;
3135
- const c = k.get("I18N_CONFIG") || {};
3136
- k.set("I18N_CONFIG", {
3372
+ const c = x.get("I18N_CONFIG") || {};
3373
+ x.set("I18N_CONFIG", {
3137
3374
  ...c,
3138
3375
  routerName: s
3139
3376
  });
@@ -3142,33 +3379,33 @@ class X {
3142
3379
  }
3143
3380
  // 初始化 i18n 实例
3144
3381
  initI18n(e) {
3145
- this.i18n = zr({
3382
+ this.i18n = Xr({
3146
3383
  locale: this.locale,
3147
3384
  messages: e.messages || {}
3148
3385
  }), this.keyValueMap = {}, globalThis.__I18N_ALL_KEYS__ = /* @__PURE__ */ new Set();
3149
3386
  const n = this;
3150
3387
  globalThis.$t = (o, s, r) => {
3151
3388
  var h, w;
3152
- const d = _n(s, r);
3153
- if (s = d.defaultValue, r = d.values, typeof o == "string" && (n.translationKeySet.add(o), globalThis.__I18N_ALL_KEYS__ && globalThis.__I18N_ALL_KEYS__.add(o)), n.i18n.global.locale.value === "zh-CN" && typeof o == "string" && !o.startsWith("i.") && !o.startsWith("pro."))
3154
- return de(s || o, r);
3155
- const i = (h = n.router) == null ? void 0 : h.currentRoute, l = (w = (i == null ? void 0 : i.value) ?? i) == null ? void 0 : w.name;
3156
- let u;
3157
- if (l) {
3158
- const x = `${l}.${o}`, A = n.i18n.t(x, void 0, r);
3159
- if (A !== x && !T.isEmpty(A))
3160
- u = A;
3389
+ const a = Nn(s, r);
3390
+ if (s = a.defaultValue, r = a.values, typeof o == "string" && (n.translationKeySet.add(o), globalThis.__I18N_ALL_KEYS__ && globalThis.__I18N_ALL_KEYS__.add(o)), n.i18n.global.locale.value === "zh-CN" && typeof o == "string" && !o.startsWith("i.") && !o.startsWith("pro."))
3391
+ return he(s || o, r);
3392
+ const i = (h = n.router) == null ? void 0 : h.currentRoute, u = (w = (i == null ? void 0 : i.value) ?? i) == null ? void 0 : w.name;
3393
+ let d;
3394
+ if (u) {
3395
+ const k = `${u}.${o}`, T = n.i18n.t(k, void 0, r);
3396
+ if (T !== k && !A.isEmpty(T))
3397
+ d = T;
3161
3398
  else {
3162
- const $ = `common.${o}`, B = n.i18n.t($, void 0, r);
3163
- B !== $ ? u = B : u = n.i18n.t(o, void 0, r);
3399
+ const _ = `common.${o}`, $ = n.i18n.t(_, void 0, r);
3400
+ $ !== _ ? d = $ : d = n.i18n.t(o, void 0, r);
3164
3401
  }
3165
3402
  } else
3166
- u = n.i18n.t(o, void 0, r);
3167
- return u === o && typeof s == "string" && s && (u = s), u = de(u, r), typeof o == "string" && typeof u == "string" && (n.keyValueMap[u] = o, globalThis.__I18N_KEY_VALUE_MAP__ || (globalThis.__I18N_KEY_VALUE_MAP__ = {}), globalThis.__I18N_KEY_VALUE_MAP__[u] = o), u;
3403
+ d = n.i18n.t(o, void 0, r);
3404
+ return d === o && typeof s == "string" && s && (d = s), d = he(d, r), typeof o == "string" && typeof d == "string" && (n.keyValueMap[d] = o, globalThis.__I18N_KEY_VALUE_MAP__ || (globalThis.__I18N_KEY_VALUE_MAP__ = {}), globalThis.__I18N_KEY_VALUE_MAP__[d] = o), d;
3168
3405
  }, this.t = globalThis.$t, globalThis.$deepScan = function(o) {
3169
3406
  return o;
3170
3407
  }, globalThis.$clearI18n = this.clearI18n = () => {
3171
- Hn({
3408
+ Yn({
3172
3409
  appCode: this.appCode,
3173
3410
  cacheScope: this.activeCacheScope
3174
3411
  });
@@ -3191,7 +3428,7 @@ class X {
3191
3428
  * @returns {boolean}
3192
3429
  */
3193
3430
  static checkRTL(e) {
3194
- return Ce(e);
3431
+ return ke(e);
3195
3432
  }
3196
3433
  /**
3197
3434
  * 压缩编码 translationKeys 数组为 URL 安全的字符串
@@ -3201,7 +3438,7 @@ class X {
3201
3438
  encodeTranslationKeys(e) {
3202
3439
  if (!e || e.length === 0) return "";
3203
3440
  const n = JSON.stringify(e);
3204
- return Ae.compressToEncodedURIComponent(n);
3441
+ return Ee.compressToEncodedURIComponent(n);
3205
3442
  }
3206
3443
  /**
3207
3444
  * 压缩整个 query 参数对象为 URL 安全的字符串
@@ -3211,7 +3448,7 @@ class X {
3211
3448
  encodeQueryParams(e) {
3212
3449
  if (!e) return "";
3213
3450
  const n = JSON.stringify(e);
3214
- return Ae.compressToEncodedURIComponent(n);
3451
+ return Ee.compressToEncodedURIComponent(n);
3215
3452
  }
3216
3453
  /**
3217
3454
  * 解码压缩的 translationKeys 字符串
@@ -3221,7 +3458,7 @@ class X {
3221
3458
  static decodeTranslationKeys(e) {
3222
3459
  if (!e) return [];
3223
3460
  try {
3224
- const n = Ae.decompressFromEncodedURIComponent(e);
3461
+ const n = Ee.decompressFromEncodedURIComponent(e);
3225
3462
  return n ? JSON.parse(n) : [];
3226
3463
  } catch (n) {
3227
3464
  return console.error("解码 translationKeys 失败:", n), [];
@@ -3235,7 +3472,7 @@ class X {
3235
3472
  static decodeQueryParams(e) {
3236
3473
  if (!e) return {};
3237
3474
  try {
3238
- const n = Ae.decompressFromEncodedURIComponent(e);
3475
+ const n = Ee.decompressFromEncodedURIComponent(e);
3239
3476
  return n ? JSON.parse(n) : {};
3240
3477
  } catch (n) {
3241
3478
  return console.error("解码 query 参数失败:", n), {};
@@ -3248,9 +3485,9 @@ class X {
3248
3485
  typeof document < "u" && (document.documentElement.dir = this._isRTL ? "rtl" : "ltr", document.documentElement.lang = this.locale);
3249
3486
  }
3250
3487
  notifyLanguageChanged(e, n) {
3251
- Ze() && this.vueInstances && this.vueInstances.size > 0 && pt(() => {
3488
+ Je() && this.vueInstances && this.vueInstances.size > 0 && bt(() => {
3252
3489
  this.vueInstances.forEach((o) => {
3253
- Bn(o);
3490
+ Dn(o);
3254
3491
  });
3255
3492
  }), typeof window < "u" && typeof CustomEvent == "function" && window.dispatchEvent(
3256
3493
  new CustomEvent("gc-i18n-language-changed", {
@@ -3261,19 +3498,12 @@ class X {
3261
3498
  })
3262
3499
  );
3263
3500
  }
3264
- setToken(e) {
3265
- this.baseToken = e || "", this.token = this.baseToken, k.set("I18N_TOKEN", this.token), k.set("I18N_CONFIG", {
3266
- ...k.get("I18N_CONFIG") || {},
3267
- baseUrl: this.baseUrl,
3268
- appCode: this.appCode,
3269
- token: this.token,
3270
- locale: this.locale,
3271
- env: this.env,
3272
- cacheScope: this.activeCacheScope
3273
- });
3501
+ setToken(e, n = {}) {
3502
+ const o = this.normalizeAuthInfo(n);
3503
+ return this.baseToken = e || "", this.token = this.baseToken, x.set("I18N_TOKEN", this.token), this.persistI18nConfig(), this.resolveAndApplyI18nToken(this.baseToken, o);
3274
3504
  }
3275
3505
  async getLanguages(e = !1) {
3276
- return await It({
3506
+ return await Nt({
3277
3507
  baseUrl: this.baseUrl,
3278
3508
  token: this.token,
3279
3509
  appCode: this.appCode,
@@ -3282,16 +3512,16 @@ class X {
3282
3512
  }
3283
3513
  async setLanguage(e = "zh-CN", n = {}) {
3284
3514
  e = this.normalizeLocale(e);
3285
- const o = n.cacheScope || this.activeCacheScope || "guest", s = n.authVersion || this.authVersion, r = ++this.languageVersion, d = "I18N_MESSAGES_COMMON_" + e;
3286
- let c = k.get(d);
3287
- if (T.isEmpty(c))
3515
+ const o = n.cacheScope || this.activeCacheScope || "guest", s = n.authVersion || this.authVersion, r = ++this.languageVersion, a = "I18N_MESSAGES_COMMON_" + e;
3516
+ let c = x.get(a);
3517
+ if (A.isEmpty(c))
3288
3518
  try {
3289
- const i = await $n.get(
3519
+ const i = await zn.get(
3290
3520
  `https://cdn.ihotel.cn/i18n_messages/${e}.json`
3291
3521
  );
3292
3522
  if (i) {
3293
- const { data: l } = i;
3294
- c = l, k.set(d, l);
3523
+ const { data: u } = i;
3524
+ c = u, x.set(a, u);
3295
3525
  }
3296
3526
  } catch (i) {
3297
3527
  console.warn(
@@ -3300,7 +3530,7 @@ class X {
3300
3530
  ), c = {};
3301
3531
  }
3302
3532
  try {
3303
- const i = await Un({
3533
+ const i = await Wn({
3304
3534
  baseUrl: this.baseUrl,
3305
3535
  appCode: this.appCode,
3306
3536
  language: e || this.locale,
@@ -3311,36 +3541,36 @@ class X {
3311
3541
  if (s !== this.authVersion || r !== this.languageVersion)
3312
3542
  return !1;
3313
3543
  if (i && Array.isArray(i)) {
3314
- const l = On(i), u = T.assign(
3544
+ const u = Hn(i), d = A.assign(
3315
3545
  {},
3316
3546
  c,
3317
- T.get(this.messages, e),
3318
- l
3547
+ A.get(this.messages, e),
3548
+ u
3319
3549
  );
3320
- this.i18n.global.setLocaleMessage(e, u);
3550
+ this.i18n.global.setLocaleMessage(e, d);
3321
3551
  } else {
3322
- const l = T.assign(
3552
+ const u = A.assign(
3323
3553
  {},
3324
3554
  c,
3325
- T.get(this.messages, e)
3555
+ A.get(this.messages, e)
3326
3556
  );
3327
- this.i18n.global.setLocaleMessage(e, l);
3557
+ this.i18n.global.setLocaleMessage(e, u);
3328
3558
  }
3329
- return this.locale = e, this._isRTL = Ce(e), this.i18n.global.locale.value = e, k.set("I18N_LANGUAGE", e), this.updateDocumentDir(), this.notifyLanguageChanged(e, !0), !0;
3559
+ return this.locale = e, this._isRTL = ke(e), this.i18n.global.locale.value = e, x.set("I18N_LANGUAGE", e), this.updateDocumentDir(), this.notifyLanguageChanged(e, !0), !0;
3330
3560
  } catch (i) {
3331
3561
  if (console.error(`设置语言 ${e} 失败,使用本地消息继续运行:`, i), s !== this.authVersion || r !== this.languageVersion)
3332
3562
  return !1;
3333
- const l = T.assign(
3563
+ const u = A.assign(
3334
3564
  {},
3335
3565
  c,
3336
- T.get(this.messages, e)
3566
+ A.get(this.messages, e)
3337
3567
  );
3338
- return this.i18n.global.setLocaleMessage(e, l), this.locale = e, this._isRTL = Ce(e), this.i18n.global.locale.value = e, k.set("I18N_LANGUAGE", e), this.updateDocumentDir(), this.notifyLanguageChanged(e, !1), !1;
3568
+ return this.i18n.global.setLocaleMessage(e, u), this.locale = e, this._isRTL = ke(e), this.i18n.global.locale.value = e, x.set("I18N_LANGUAGE", e), this.updateDocumentDir(), this.notifyLanguageChanged(e, !1), !1;
3339
3569
  }
3340
3570
  }
3341
3571
  install(e, n = {}) {
3342
- if (Ze(e)) {
3343
- const o = wt(e);
3572
+ if (Je(e)) {
3573
+ const o = gt(e);
3344
3574
  if (o.prototype.$t = this.t || globalThis.$t, o.prototype.$i18n = this.i18n, !X._vue2UpdateMixinRegistered && o.mixin) {
3345
3575
  X._vue2UpdateMixinRegistered = !0;
3346
3576
  const s = this;
@@ -3356,9 +3586,9 @@ class X {
3356
3586
  } else
3357
3587
  e.config.globalProperties.$t = this.t || globalThis.$t, e.config.globalProperties.$i18n = this.i18n;
3358
3588
  e.component("i18n-earth", {
3359
- ..._t,
3589
+ ...Pt,
3360
3590
  props: {
3361
- ..._t.props,
3591
+ ...Pt.props,
3362
3592
  baseUrl: {
3363
3593
  type: String,
3364
3594
  default: this.baseUrl