@masonitestudios/spartanauth-widgets 1.0.1 → 1.0.3

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.
@@ -1,115 +1,115 @@
1
- const Vt = (e, t) => e === t, Re = {
2
- equals: Vt
1
+ const Zt = (e, t) => e === t, He = {
2
+ equals: Zt
3
3
  };
4
- let vt = Ft;
5
- const we = 1, Le = 2, At = {
4
+ let xt = Ot;
5
+ const _e = 1, We = 2, St = {
6
6
  owned: null,
7
7
  cleanups: null,
8
8
  context: null,
9
9
  owner: null
10
10
  };
11
- var se = null;
12
- let He = null, Kt = null, Z = null, ee = null, ve = null, Ke = 0;
13
- function Gt(e, t) {
14
- const n = Z, r = se, s = e.length === 0, u = t === void 0 ? r : t, o = s ? At : {
11
+ var ce = null;
12
+ let rt = null, Yt = null, Y = null, ie = null, ke = null, et = 0;
13
+ function Xt(e, t) {
14
+ const n = Y, r = ce, s = e.length === 0, i = t === void 0 ? r : t, u = s ? St : {
15
15
  owned: null,
16
16
  cleanups: null,
17
- context: u ? u.context : null,
18
- owner: u
19
- }, l = s ? e : () => e(() => Ge(() => Oe(o)));
20
- se = o, Z = null;
17
+ context: i ? i.context : null,
18
+ owner: i
19
+ }, l = s ? e : () => e(() => tt(() => Ue(u)));
20
+ ce = u, Y = null;
21
21
  try {
22
- return Pe(l, !0);
22
+ return Ve(l, !0);
23
23
  } finally {
24
- Z = n, se = r;
24
+ Y = n, ce = r;
25
25
  }
26
26
  }
27
- function E(e, t) {
28
- t = t ? Object.assign({}, Re, t) : Re;
27
+ function w(e, t) {
28
+ t = t ? Object.assign({}, He, t) : He;
29
29
  const n = {
30
30
  value: e,
31
31
  observers: null,
32
32
  observerSlots: null,
33
33
  comparator: t.equals || void 0
34
- }, r = (s) => (typeof s == "function" && (s = s(n.value)), Et(n, s));
35
- return [wt.bind(n), r];
34
+ }, r = (s) => (typeof s == "function" && (s = s(n.value)), Tt(n, s));
35
+ return [_t.bind(n), r];
36
36
  }
37
- function $(e, t, n) {
38
- const r = nt(e, t, !1, we);
39
- Ie(r);
37
+ function y(e, t, n) {
38
+ const r = dt(e, t, !1, _e);
39
+ Je(r);
40
40
  }
41
- function Ht(e, t, n) {
42
- vt = Yt;
43
- const r = nt(e, t, !1, we);
44
- r.user = !0, ve ? ve.push(r) : Ie(r);
41
+ function Qt(e, t, n) {
42
+ xt = nn;
43
+ const r = dt(e, t, !1, _e);
44
+ r.user = !0, ke ? ke.push(r) : Je(r);
45
45
  }
46
46
  function p(e, t, n) {
47
- n = n ? Object.assign({}, Re, n) : Re;
48
- const r = nt(e, t, !0, 0);
49
- return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, Ie(r), wt.bind(r);
50
- }
51
- function Ge(e) {
52
- if (Z === null) return e();
53
- const t = Z;
54
- Z = null;
47
+ n = n ? Object.assign({}, He, n) : He;
48
+ const r = dt(e, t, !0, 0);
49
+ return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, Je(r), _t.bind(r);
50
+ }
51
+ function tt(e) {
52
+ if (Y === null) return e();
53
+ const t = Y;
54
+ Y = null;
55
55
  try {
56
56
  return e();
57
57
  } finally {
58
- Z = t;
58
+ Y = t;
59
59
  }
60
60
  }
61
- function tt(e) {
62
- Ht(() => Ge(e));
61
+ function ct(e) {
62
+ Qt(() => tt(e));
63
63
  }
64
- function wt() {
64
+ function _t() {
65
65
  if (this.sources && this.state)
66
- if (this.state === we) Ie(this);
66
+ if (this.state === _e) Je(this);
67
67
  else {
68
- const e = ee;
69
- ee = null, Pe(() => Ue(this), !1), ee = e;
68
+ const e = ie;
69
+ ie = null, Ve(() => Ye(this), !1), ie = e;
70
70
  }
71
- if (Z) {
71
+ if (Y) {
72
72
  const e = this.observers ? this.observers.length : 0;
73
- Z.sources ? (Z.sources.push(this), Z.sourceSlots.push(e)) : (Z.sources = [this], Z.sourceSlots = [e]), this.observers ? (this.observers.push(Z), this.observerSlots.push(Z.sources.length - 1)) : (this.observers = [Z], this.observerSlots = [Z.sources.length - 1]);
73
+ Y.sources ? (Y.sources.push(this), Y.sourceSlots.push(e)) : (Y.sources = [this], Y.sourceSlots = [e]), this.observers ? (this.observers.push(Y), this.observerSlots.push(Y.sources.length - 1)) : (this.observers = [Y], this.observerSlots = [Y.sources.length - 1]);
74
74
  }
75
75
  return this.value;
76
76
  }
77
- function Et(e, t, n) {
77
+ function Tt(e, t, n) {
78
78
  let r = e.value;
79
- return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && Pe(() => {
79
+ return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && Ve(() => {
80
80
  for (let s = 0; s < e.observers.length; s += 1) {
81
- const u = e.observers[s], o = He && He.running;
82
- o && He.disposed.has(u), (o ? !u.tState : !u.state) && (u.pure ? ee.push(u) : ve.push(u), u.observers && yt(u)), o || (u.state = we);
81
+ const i = e.observers[s], u = rt && rt.running;
82
+ u && rt.disposed.has(i), (u ? !i.tState : !i.state) && (i.pure ? ie.push(i) : ke.push(i), i.observers && It(i)), u || (i.state = _e);
83
83
  }
84
- if (ee.length > 1e6)
85
- throw ee = [], new Error();
84
+ if (ie.length > 1e6)
85
+ throw ie = [], new Error();
86
86
  }, !1)), t;
87
87
  }
88
- function Ie(e) {
88
+ function Je(e) {
89
89
  if (!e.fn) return;
90
- Oe(e);
91
- const t = Ke;
92
- Wt(
90
+ Ue(e);
91
+ const t = et;
92
+ en(
93
93
  e,
94
94
  e.value,
95
95
  t
96
96
  );
97
97
  }
98
- function Wt(e, t, n) {
98
+ function en(e, t, n) {
99
99
  let r;
100
- const s = se, u = Z;
101
- Z = se = e;
100
+ const s = ce, i = Y;
101
+ Y = ce = e;
102
102
  try {
103
103
  r = e.fn(t);
104
- } catch (o) {
105
- return e.pure && (e.state = we, e.owned && e.owned.forEach(Oe), e.owned = null), e.updatedAt = n + 1, $t(o);
104
+ } catch (u) {
105
+ return e.pure && (e.state = _e, e.owned && e.owned.forEach(Ue), e.owned = null), e.updatedAt = n + 1, Pt(u);
106
106
  } finally {
107
- Z = u, se = s;
107
+ Y = i, ce = s;
108
108
  }
109
- (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Et(e, r) : e.value = r, e.updatedAt = n);
109
+ (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Tt(e, r) : e.value = r, e.updatedAt = n);
110
110
  }
111
- function nt(e, t, n, r = we, s) {
112
- const u = {
111
+ function dt(e, t, n, r = _e, s) {
112
+ const i = {
113
113
  fn: e,
114
114
  state: r,
115
115
  updatedAt: null,
@@ -118,86 +118,86 @@ function nt(e, t, n, r = we, s) {
118
118
  sourceSlots: null,
119
119
  cleanups: null,
120
120
  value: t,
121
- owner: se,
122
- context: se ? se.context : null,
121
+ owner: ce,
122
+ context: ce ? ce.context : null,
123
123
  pure: n
124
124
  };
125
- return se === null || se !== At && (se.owned ? se.owned.push(u) : se.owned = [u]), u;
125
+ return ce === null || ce !== St && (ce.owned ? ce.owned.push(i) : ce.owned = [i]), i;
126
126
  }
127
- function qe(e) {
127
+ function Ze(e) {
128
128
  if (e.state === 0) return;
129
- if (e.state === Le) return Ue(e);
130
- if (e.suspense && Ge(e.suspense.inFallback)) return e.suspense.effects.push(e);
129
+ if (e.state === We) return Ye(e);
130
+ if (e.suspense && tt(e.suspense.inFallback)) return e.suspense.effects.push(e);
131
131
  const t = [e];
132
- for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Ke); )
132
+ for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < et); )
133
133
  e.state && t.push(e);
134
134
  for (let n = t.length - 1; n >= 0; n--)
135
- if (e = t[n], e.state === we)
136
- Ie(e);
137
- else if (e.state === Le) {
138
- const r = ee;
139
- ee = null, Pe(() => Ue(e, t[0]), !1), ee = r;
135
+ if (e = t[n], e.state === _e)
136
+ Je(e);
137
+ else if (e.state === We) {
138
+ const r = ie;
139
+ ie = null, Ve(() => Ye(e, t[0]), !1), ie = r;
140
140
  }
141
141
  }
142
- function Pe(e, t) {
143
- if (ee) return e();
142
+ function Ve(e, t) {
143
+ if (ie) return e();
144
144
  let n = !1;
145
- t || (ee = []), ve ? n = !0 : ve = [], Ke++;
145
+ t || (ie = []), ke ? n = !0 : ke = [], et++;
146
146
  try {
147
147
  const r = e();
148
- return Zt(n), r;
148
+ return tn(n), r;
149
149
  } catch (r) {
150
- n || (ve = null), ee = null, $t(r);
150
+ n || (ke = null), ie = null, Pt(r);
151
151
  }
152
152
  }
153
- function Zt(e) {
154
- if (ee && (Ft(ee), ee = null), e) return;
155
- const t = ve;
156
- ve = null, t.length && Pe(() => vt(t), !1);
153
+ function tn(e) {
154
+ if (ie && (Ot(ie), ie = null), e) return;
155
+ const t = ke;
156
+ ke = null, t.length && Ve(() => xt(t), !1);
157
157
  }
158
- function Ft(e) {
159
- for (let t = 0; t < e.length; t++) qe(e[t]);
158
+ function Ot(e) {
159
+ for (let t = 0; t < e.length; t++) Ze(e[t]);
160
160
  }
161
- function Yt(e) {
161
+ function nn(e) {
162
162
  let t, n = 0;
163
163
  for (t = 0; t < e.length; t++) {
164
164
  const r = e[t];
165
- r.user ? e[n++] = r : qe(r);
165
+ r.user ? e[n++] = r : Ze(r);
166
166
  }
167
- for (t = 0; t < n; t++) qe(e[t]);
167
+ for (t = 0; t < n; t++) Ze(e[t]);
168
168
  }
169
- function Ue(e, t) {
169
+ function Ye(e, t) {
170
170
  e.state = 0;
171
171
  for (let n = 0; n < e.sources.length; n += 1) {
172
172
  const r = e.sources[n];
173
173
  if (r.sources) {
174
174
  const s = r.state;
175
- s === we ? r !== t && (!r.updatedAt || r.updatedAt < Ke) && qe(r) : s === Le && Ue(r, t);
175
+ s === _e ? r !== t && (!r.updatedAt || r.updatedAt < et) && Ze(r) : s === We && Ye(r, t);
176
176
  }
177
177
  }
178
178
  }
179
- function yt(e) {
179
+ function It(e) {
180
180
  for (let t = 0; t < e.observers.length; t += 1) {
181
181
  const n = e.observers[t];
182
- n.state || (n.state = Le, n.pure ? ee.push(n) : ve.push(n), n.observers && yt(n));
182
+ n.state || (n.state = We, n.pure ? ie.push(n) : ke.push(n), n.observers && It(n));
183
183
  }
184
184
  }
185
- function Oe(e) {
185
+ function Ue(e) {
186
186
  let t;
187
187
  if (e.sources)
188
188
  for (; e.sources.length; ) {
189
189
  const n = e.sources.pop(), r = e.sourceSlots.pop(), s = n.observers;
190
190
  if (s && s.length) {
191
- const u = s.pop(), o = n.observerSlots.pop();
192
- r < s.length && (u.sourceSlots[o] = r, s[r] = u, n.observerSlots[r] = o);
191
+ const i = s.pop(), u = n.observerSlots.pop();
192
+ r < s.length && (i.sourceSlots[u] = r, s[r] = i, n.observerSlots[r] = u);
193
193
  }
194
194
  }
195
195
  if (e.tOwned) {
196
- for (t = e.tOwned.length - 1; t >= 0; t--) Oe(e.tOwned[t]);
196
+ for (t = e.tOwned.length - 1; t >= 0; t--) Ue(e.tOwned[t]);
197
197
  delete e.tOwned;
198
198
  }
199
199
  if (e.owned) {
200
- for (t = e.owned.length - 1; t >= 0; t--) Oe(e.owned[t]);
200
+ for (t = e.owned.length - 1; t >= 0; t--) Ue(e.owned[t]);
201
201
  e.owned = null;
202
202
  }
203
203
  if (e.cleanups) {
@@ -206,93 +206,93 @@ function Oe(e) {
206
206
  }
207
207
  e.state = 0;
208
208
  }
209
- function Xt(e) {
209
+ function rn(e) {
210
210
  return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
211
211
  cause: e
212
212
  });
213
213
  }
214
- function $t(e, t = se) {
215
- throw Xt(e);
214
+ function Pt(e, t = ce) {
215
+ throw rn(e);
216
216
  }
217
- function Qt(e, t, n) {
218
- let r = n.length, s = t.length, u = r, o = 0, l = 0, v = t[s - 1].nextSibling, B = null;
219
- for (; o < s || l < u; ) {
220
- if (t[o] === n[l]) {
221
- o++, l++;
217
+ function sn(e, t, n) {
218
+ let r = n.length, s = t.length, i = r, u = 0, l = 0, C = t[s - 1].nextSibling, $ = null;
219
+ for (; u < s || l < i; ) {
220
+ if (t[u] === n[l]) {
221
+ u++, l++;
222
222
  continue;
223
223
  }
224
- for (; t[s - 1] === n[u - 1]; )
225
- s--, u--;
226
- if (s === o) {
227
- const D = u < r ? l ? n[l - 1].nextSibling : n[u - l] : v;
228
- for (; l < u; ) e.insertBefore(n[l++], D);
229
- } else if (u === l)
230
- for (; o < s; )
231
- (!B || !B.has(t[o])) && t[o].remove(), o++;
232
- else if (t[o] === n[u - 1] && n[l] === t[s - 1]) {
224
+ for (; t[s - 1] === n[i - 1]; )
225
+ s--, i--;
226
+ if (s === u) {
227
+ const D = i < r ? l ? n[l - 1].nextSibling : n[i - l] : C;
228
+ for (; l < i; ) e.insertBefore(n[l++], D);
229
+ } else if (i === l)
230
+ for (; u < s; )
231
+ (!$ || !$.has(t[u])) && t[u].remove(), u++;
232
+ else if (t[u] === n[i - 1] && n[l] === t[s - 1]) {
233
233
  const D = t[--s].nextSibling;
234
- e.insertBefore(n[l++], t[o++].nextSibling), e.insertBefore(n[--u], D), t[s] = n[u];
234
+ e.insertBefore(n[l++], t[u++].nextSibling), e.insertBefore(n[--i], D), t[s] = n[i];
235
235
  } else {
236
- if (!B) {
237
- B = /* @__PURE__ */ new Map();
238
- let x = l;
239
- for (; x < u; ) B.set(n[x], x++);
236
+ if (!$) {
237
+ $ = /* @__PURE__ */ new Map();
238
+ let B = l;
239
+ for (; B < i; ) $.set(n[B], B++);
240
240
  }
241
- const D = B.get(t[o]);
241
+ const D = $.get(t[u]);
242
242
  if (D != null)
243
- if (l < D && D < u) {
244
- let x = o, te = 1, ue;
245
- for (; ++x < s && x < u && !((ue = B.get(t[x])) == null || ue !== D + te); )
246
- te++;
247
- if (te > D - l) {
248
- const ge = t[o];
249
- for (; l < D; ) e.insertBefore(n[l++], ge);
250
- } else e.replaceChild(n[l++], t[o++]);
251
- } else o++;
252
- else t[o++].remove();
243
+ if (l < D && D < i) {
244
+ let B = u, ae = 1, de;
245
+ for (; ++B < s && B < i && !((de = $.get(t[B])) == null || de !== D + ae); )
246
+ ae++;
247
+ if (ae > D - l) {
248
+ const Ee = t[u];
249
+ for (; l < D; ) e.insertBefore(n[l++], Ee);
250
+ } else e.replaceChild(n[l++], t[u++]);
251
+ } else u++;
252
+ else t[u++].remove();
253
253
  }
254
254
  }
255
255
  }
256
- const lt = "_$DX_DELEGATE";
256
+ const gt = "_$DX_DELEGATE";
257
257
  function F(e, t, n, r) {
258
258
  let s;
259
- const u = () => {
259
+ const i = () => {
260
260
  const l = document.createElement("template");
261
261
  return l.innerHTML = e, l.content.firstChild;
262
- }, o = () => (s || (s = u())).cloneNode(!0);
263
- return o.cloneNode = o, o;
262
+ }, u = () => (s || (s = i())).cloneNode(!0);
263
+ return u.cloneNode = u, u;
264
264
  }
265
- function rt(e, t = window.document) {
266
- const n = t[lt] || (t[lt] = /* @__PURE__ */ new Set());
265
+ function ft(e, t = window.document) {
266
+ const n = t[gt] || (t[gt] = /* @__PURE__ */ new Set());
267
267
  for (let r = 0, s = e.length; r < s; r++) {
268
- const u = e[r];
269
- n.has(u) || (n.add(u), t.addEventListener(u, en));
268
+ const i = e[r];
269
+ n.has(i) || (n.add(i), t.addEventListener(i, an));
270
270
  }
271
271
  }
272
- function ce(e, t, n) {
272
+ function le(e, t, n) {
273
273
  n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
274
274
  }
275
- function Bt(e, t, n) {
276
- return Ge(() => e(t, n));
275
+ function zt(e, t, n) {
276
+ return tt(() => e(t, n));
277
277
  }
278
278
  function f(e, t, n, r) {
279
- if (n !== void 0 && !r && (r = []), typeof t != "function") return Je(e, t, r, n);
280
- $((s) => Je(e, t(), s, n), r);
279
+ if (n !== void 0 && !r && (r = []), typeof t != "function") return Xe(e, t, r, n);
280
+ y((s) => Xe(e, t(), s, n), r);
281
281
  }
282
- function en(e) {
282
+ function an(e) {
283
283
  let t = e.target;
284
- const n = `$$${e.type}`, r = e.target, s = e.currentTarget, u = (v) => Object.defineProperty(e, "target", {
284
+ const n = `$$${e.type}`, r = e.target, s = e.currentTarget, i = (C) => Object.defineProperty(e, "target", {
285
285
  configurable: !0,
286
- value: v
287
- }), o = () => {
288
- const v = t[n];
289
- if (v && !t.disabled) {
290
- const B = t[`${n}Data`];
291
- if (B !== void 0 ? v.call(t, B, e) : v.call(t, e), e.cancelBubble) return;
292
- }
293
- return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && u(t.host), !0;
286
+ value: C
287
+ }), u = () => {
288
+ const C = t[n];
289
+ if (C && !t.disabled) {
290
+ const $ = t[`${n}Data`];
291
+ if ($ !== void 0 ? C.call(t, $, e) : C.call(t, e), e.cancelBubble) return;
292
+ }
293
+ return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && i(t.host), !0;
294
294
  }, l = () => {
295
- for (; o() && (t = t._$host || t.parentNode || t.host); ) ;
295
+ for (; u() && (t = t._$host || t.parentNode || t.host); ) ;
296
296
  };
297
297
  if (Object.defineProperty(e, "currentTarget", {
298
298
  configurable: !0,
@@ -300,9 +300,9 @@ function en(e) {
300
300
  return t || document;
301
301
  }
302
302
  }), e.composedPath) {
303
- const v = e.composedPath();
304
- u(v[0]);
305
- for (let B = 0; B < v.length - 2 && (t = v[B], !!o()); B++) {
303
+ const C = e.composedPath();
304
+ i(C[0]);
305
+ for (let $ = 0; $ < C.length - 2 && (t = C[$], !!u()); $++) {
306
306
  if (t._$host) {
307
307
  t = t._$host, l();
308
308
  break;
@@ -311,127 +311,127 @@ function en(e) {
311
311
  break;
312
312
  }
313
313
  } else l();
314
- u(r);
314
+ i(r);
315
315
  }
316
- function Je(e, t, n, r, s) {
316
+ function Xe(e, t, n, r, s) {
317
317
  for (; typeof n == "function"; ) n = n();
318
318
  if (t === n) return n;
319
- const u = typeof t, o = r !== void 0;
320
- if (e = o && n[0] && n[0].parentNode || e, u === "string" || u === "number") {
321
- if (u === "number" && (t = t.toString(), t === n))
319
+ const i = typeof t, u = r !== void 0;
320
+ if (e = u && n[0] && n[0].parentNode || e, i === "string" || i === "number") {
321
+ if (i === "number" && (t = t.toString(), t === n))
322
322
  return n;
323
- if (o) {
323
+ if (u) {
324
324
  let l = n[0];
325
- l && l.nodeType === 3 ? l.data !== t && (l.data = t) : l = document.createTextNode(t), n = $e(e, n, r, l);
325
+ l && l.nodeType === 3 ? l.data !== t && (l.data = t) : l = document.createTextNode(t), n = Ne(e, n, r, l);
326
326
  } else
327
327
  n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
328
- } else if (t == null || u === "boolean")
329
- n = $e(e, n, r);
328
+ } else if (t == null || i === "boolean")
329
+ n = Ne(e, n, r);
330
330
  else {
331
- if (u === "function")
332
- return $(() => {
331
+ if (i === "function")
332
+ return y(() => {
333
333
  let l = t();
334
334
  for (; typeof l == "function"; ) l = l();
335
- n = Je(e, l, n, r);
335
+ n = Xe(e, l, n, r);
336
336
  }), () => n;
337
337
  if (Array.isArray(t)) {
338
- const l = [], v = n && Array.isArray(n);
339
- if (Xe(l, t, n, s))
340
- return $(() => n = Je(e, l, n, r, !0)), () => n;
338
+ const l = [], C = n && Array.isArray(n);
339
+ if (ut(l, t, n, s))
340
+ return y(() => n = Xe(e, l, n, r, !0)), () => n;
341
341
  if (l.length === 0) {
342
- if (n = $e(e, n, r), o) return n;
343
- } else v ? n.length === 0 ? ct(e, l, r) : Qt(e, n, l) : (n && $e(e), ct(e, l));
342
+ if (n = Ne(e, n, r), u) return n;
343
+ } else C ? n.length === 0 ? mt(e, l, r) : sn(e, n, l) : (n && Ne(e), mt(e, l));
344
344
  n = l;
345
345
  } else if (t.nodeType) {
346
346
  if (Array.isArray(n)) {
347
- if (o) return n = $e(e, n, r, t);
348
- $e(e, n, null, t);
347
+ if (u) return n = Ne(e, n, r, t);
348
+ Ne(e, n, null, t);
349
349
  } else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
350
350
  n = t;
351
351
  }
352
352
  }
353
353
  return n;
354
354
  }
355
- function Xe(e, t, n, r) {
355
+ function ut(e, t, n, r) {
356
356
  let s = !1;
357
- for (let u = 0, o = t.length; u < o; u++) {
358
- let l = t[u], v = n && n[e.length], B;
359
- if (!(l == null || l === !0 || l === !1)) if ((B = typeof l) == "object" && l.nodeType)
357
+ for (let i = 0, u = t.length; i < u; i++) {
358
+ let l = t[i], C = n && n[e.length], $;
359
+ if (!(l == null || l === !0 || l === !1)) if (($ = typeof l) == "object" && l.nodeType)
360
360
  e.push(l);
361
361
  else if (Array.isArray(l))
362
- s = Xe(e, l, v) || s;
363
- else if (B === "function")
362
+ s = ut(e, l, C) || s;
363
+ else if ($ === "function")
364
364
  if (r) {
365
365
  for (; typeof l == "function"; ) l = l();
366
- s = Xe(
366
+ s = ut(
367
367
  e,
368
368
  Array.isArray(l) ? l : [l],
369
- Array.isArray(v) ? v : [v]
369
+ Array.isArray(C) ? C : [C]
370
370
  ) || s;
371
371
  } else
372
372
  e.push(l), s = !0;
373
373
  else {
374
374
  const D = String(l);
375
- v && v.nodeType === 3 && v.data === D ? e.push(v) : e.push(document.createTextNode(D));
375
+ C && C.nodeType === 3 && C.data === D ? e.push(C) : e.push(document.createTextNode(D));
376
376
  }
377
377
  }
378
378
  return s;
379
379
  }
380
- function ct(e, t, n = null) {
380
+ function mt(e, t, n = null) {
381
381
  for (let r = 0, s = t.length; r < s; r++) e.insertBefore(t[r], n);
382
382
  }
383
- function $e(e, t, n, r) {
383
+ function Ne(e, t, n, r) {
384
384
  if (n === void 0) return e.textContent = "";
385
385
  const s = r || document.createTextNode("");
386
386
  if (t.length) {
387
- let u = !1;
388
- for (let o = t.length - 1; o >= 0; o--) {
389
- const l = t[o];
387
+ let i = !1;
388
+ for (let u = t.length - 1; u >= 0; u--) {
389
+ const l = t[u];
390
390
  if (s !== l) {
391
- const v = l.parentNode === e;
392
- !u && !o ? v ? e.replaceChild(s, l) : e.insertBefore(s, n) : v && l.remove();
393
- } else u = !0;
391
+ const C = l.parentNode === e;
392
+ !i && !u ? C ? e.replaceChild(s, l) : e.insertBefore(s, n) : C && l.remove();
393
+ } else i = !0;
394
394
  }
395
395
  } else e.insertBefore(s, n);
396
396
  return [s];
397
397
  }
398
- function tn(e) {
398
+ function un(e) {
399
399
  return Object.keys(e).reduce((n, r) => {
400
400
  const s = e[r];
401
- return n[r] = Object.assign({}, s), xt(s.value) && !an(s.value) && !Array.isArray(s.value) && (n[r].value = Object.assign({}, s.value)), Array.isArray(s.value) && (n[r].value = s.value.slice(0)), n;
401
+ return n[r] = Object.assign({}, s), Mt(s.value) && !fn(s.value) && !Array.isArray(s.value) && (n[r].value = Object.assign({}, s.value)), Array.isArray(s.value) && (n[r].value = s.value.slice(0)), n;
402
402
  }, {});
403
403
  }
404
- function nn(e) {
404
+ function on(e) {
405
405
  return e ? Object.keys(e).reduce((n, r) => {
406
406
  const s = e[r];
407
- return n[r] = xt(s) && "value" in s ? s : {
407
+ return n[r] = Mt(s) && "value" in s ? s : {
408
408
  value: s
409
- }, n[r].attribute || (n[r].attribute = un(r)), n[r].parse = "parse" in n[r] ? n[r].parse : typeof n[r].value != "string", n;
409
+ }, n[r].attribute || (n[r].attribute = dn(r)), n[r].parse = "parse" in n[r] ? n[r].parse : typeof n[r].value != "string", n;
410
410
  }, {}) : {};
411
411
  }
412
- function rn(e) {
412
+ function ln(e) {
413
413
  return Object.keys(e).reduce((n, r) => (n[r] = e[r].value, n), {});
414
414
  }
415
- function sn(e, t) {
416
- const n = tn(t);
415
+ function cn(e, t) {
416
+ const n = un(t);
417
417
  return Object.keys(t).forEach((s) => {
418
- const u = n[s], o = e.getAttribute(u.attribute), l = e[s];
419
- o != null && (u.value = u.parse ? kt(o) : o), l != null && (u.value = Array.isArray(l) ? l.slice(0) : l), u.reflect && dt(e, u.attribute, u.value, !!u.parse), Object.defineProperty(e, s, {
418
+ const i = n[s], u = e.getAttribute(i.attribute), l = e[s];
419
+ u != null && (i.value = i.parse ? Nt(u) : u), l != null && (i.value = Array.isArray(l) ? l.slice(0) : l), i.reflect && bt(e, i.attribute, i.value, !!i.parse), Object.defineProperty(e, s, {
420
420
  get() {
421
- return u.value;
421
+ return i.value;
422
422
  },
423
- set(v) {
424
- const B = u.value;
425
- u.value = v, u.reflect && dt(this, u.attribute, u.value, !!u.parse);
426
- for (let D = 0, x = this.__propertyChangedCallbacks.length; D < x; D++)
427
- this.__propertyChangedCallbacks[D](s, v, B);
423
+ set(C) {
424
+ const $ = i.value;
425
+ i.value = C, i.reflect && bt(this, i.attribute, i.value, !!i.parse);
426
+ for (let D = 0, B = this.__propertyChangedCallbacks.length; D < B; D++)
427
+ this.__propertyChangedCallbacks[D](s, C, $);
428
428
  },
429
429
  enumerable: !0,
430
430
  configurable: !0
431
431
  });
432
432
  }), n;
433
433
  }
434
- function kt(e) {
434
+ function Nt(e) {
435
435
  if (e)
436
436
  try {
437
437
  return JSON.parse(e);
@@ -439,25 +439,25 @@ function kt(e) {
439
439
  return e;
440
440
  }
441
441
  }
442
- function dt(e, t, n, r) {
442
+ function bt(e, t, n, r) {
443
443
  if (n == null || n === !1) return e.removeAttribute(t);
444
444
  let s = r ? JSON.stringify(n) : n;
445
445
  e.__updating[t] = !0, s === "true" && (s = ""), e.setAttribute(t, s), Promise.resolve().then(() => delete e.__updating[t]);
446
446
  }
447
- function un(e) {
447
+ function dn(e) {
448
448
  return e.replace(/\.?([A-Z]+)/g, (t, n) => "-" + n.toLowerCase()).replace("_", "-").replace(/^-/, "");
449
449
  }
450
- function xt(e) {
450
+ function Mt(e) {
451
451
  return e != null && (typeof e == "object" || typeof e == "function");
452
452
  }
453
- function an(e) {
453
+ function fn(e) {
454
454
  return Object.prototype.toString.call(e) === "[object Function]";
455
455
  }
456
- function on(e) {
456
+ function hn(e) {
457
457
  return typeof e == "function" && e.toString().indexOf("class") === 0;
458
458
  }
459
- let We;
460
- function ln(e, t) {
459
+ let st;
460
+ function pn(e, t) {
461
461
  const n = Object.keys(t);
462
462
  return class extends e {
463
463
  static get observedAttributes() {
@@ -468,16 +468,16 @@ function ln(e, t) {
468
468
  }
469
469
  connectedCallback() {
470
470
  if (this.__initialized) return;
471
- this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = sn(this, t);
472
- const s = rn(this.props), u = this.Component, o = We;
471
+ this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = cn(this, t);
472
+ const s = ln(this.props), i = this.Component, u = st;
473
473
  try {
474
- We = this, this.__initialized = !0, on(u) ? new u(s, {
474
+ st = this, this.__initialized = !0, hn(i) ? new i(s, {
475
475
  element: this
476
- }) : u(s, {
476
+ }) : i(s, {
477
477
  element: this
478
478
  });
479
479
  } finally {
480
- We = o;
480
+ st = u;
481
481
  }
482
482
  }
483
483
  async disconnectedCallback() {
@@ -487,15 +487,15 @@ function ln(e, t) {
487
487
  for (; s = this.__releaseCallbacks.pop(); ) s(this);
488
488
  delete this.__initialized, this.__released = !0;
489
489
  }
490
- attributeChangedCallback(s, u, o) {
490
+ attributeChangedCallback(s, i, u) {
491
491
  if (this.__initialized && !this.__updating[s] && (s = this.lookupProp(s), s in t)) {
492
- if (o == null && !this[s]) return;
493
- this[s] = t[s].parse ? kt(o) : o;
492
+ if (u == null && !this[s]) return;
493
+ this[s] = t[s].parse ? Nt(u) : u;
494
494
  }
495
495
  }
496
496
  lookupProp(s) {
497
497
  if (t)
498
- return n.find((u) => s === u || s === t[u].attribute);
498
+ return n.find((i) => s === i || s === t[i].attribute);
499
499
  }
500
500
  get renderRoot() {
501
501
  return this.shadowRoot || this.attachShadow({
@@ -510,56 +510,56 @@ function ln(e, t) {
510
510
  }
511
511
  };
512
512
  }
513
- function cn(e, t = {}, n = {}) {
513
+ function Dn(e, t = {}, n = {}) {
514
514
  const {
515
515
  BaseElement: r = HTMLElement,
516
516
  extension: s,
517
- customElements: u = window.customElements
517
+ customElements: i = window.customElements
518
518
  } = n;
519
- return (o) => {
519
+ return (u) => {
520
520
  if (!e) throw new Error("tag is required to register a Component");
521
- let l = u.get(e);
522
- return l ? (l.prototype.Component = o, l) : (l = ln(r, nn(t)), l.prototype.Component = o, l.prototype.registeredTag = e, u.define(e, l, s), l);
521
+ let l = i.get(e);
522
+ return l ? (l.prototype.Component = u, l) : (l = pn(r, on(t)), l.prototype.Component = u, l.prototype.registeredTag = e, i.define(e, l, s), l);
523
523
  };
524
524
  }
525
- function dn(e) {
525
+ function gn(e) {
526
526
  const t = Object.keys(e), n = {};
527
527
  for (let r = 0; r < t.length; r++) {
528
- const [s, u] = E(e[t[r]]);
528
+ const [s, i] = w(e[t[r]]);
529
529
  Object.defineProperty(n, t[r], {
530
530
  get: s,
531
- set(o) {
532
- u(() => o);
531
+ set(u) {
532
+ i(() => u);
533
533
  }
534
534
  });
535
535
  }
536
536
  return n;
537
537
  }
538
- function fn(e) {
538
+ function mn(e) {
539
539
  if (e.assignedSlot && e.assignedSlot._$owner) return e.assignedSlot._$owner;
540
540
  let t = e.parentNode;
541
541
  for (; t && !t._$owner && !(t.assignedSlot && t.assignedSlot._$owner); )
542
542
  t = t.parentNode;
543
543
  return t && t.assignedSlot ? t.assignedSlot._$owner : e._$owner;
544
544
  }
545
- function hn(e) {
545
+ function bn(e) {
546
546
  return (t, n) => {
547
547
  const { element: r } = n;
548
- return Gt((s) => {
549
- const u = dn(t);
550
- r.addPropertyChangedCallback((l, v) => u[l] = v), r.addReleaseCallback(() => {
548
+ return Xt((s) => {
549
+ const i = gn(t);
550
+ r.addPropertyChangedCallback((l, C) => i[l] = C), r.addReleaseCallback(() => {
551
551
  r.renderRoot.textContent = "", s();
552
552
  });
553
- const o = e(u, n);
554
- return f(r.renderRoot, o);
555
- }, fn(r));
553
+ const u = e(i, n);
554
+ return f(r.renderRoot, u);
555
+ }, mn(r));
556
556
  };
557
557
  }
558
- function st(e, t, n) {
559
- return arguments.length === 2 && (n = t, t = {}), cn(e, t)(hn(n));
558
+ function ht(e, t, n) {
559
+ return arguments.length === 2 && (n = t, t = {}), Dn(e, t)(bn(n));
560
560
  }
561
- var Dn = "٠١٢٣٤٥٦٧٨٩", pn = "۰۱۲۳۴۵۶۷۸۹", gn = "൦൧൨൩൪൫൬൭൮൯", mn = "೦೧೨೩೪೫೬೭೮೯", bn = "໐໑໒໓໔໕໖໗໘໙", Cn = "୦୧୨୩୪୫୬୭୮୯", vn = "០១២៣៤៥៦៧៨៩", An = "߀߁߂߃߄߅߆߇߈߉", wn = "੦੧੨੩੪੫੬੭੮੯", En = "૦૧૨૩૪૫૬૭૮૯", Fn = "०१२३४५६७८९", yn = "၀၁၂၃၄၅၆၇၈၉", $n = "௦௧௨௩௪௫௬௭௮௯", Bn = "౦౧౨౩౪౫౬౭౮౯", kn = "๐๑๒๓๔๕๖๗๘๙", xn = "༠༡༢༣༤༥༦༧༨༩", ft = { ar: Dn, fa: pn, ml: gn, kn: mn, lo: bn, or: Cn, kh: vn, nqo: An, pa: wn, gu: En, hi: Fn, my: yn, ta: $n, te: Bn, th: kn, bo: xn }, Sn = ["ru"], _n = ["id"], Tn = ["id"], On = ["ady-cyrl"], In = ["aeb-arab"], Pn = ["sq"], zn = ["ru"], Nn = ["zh-hant"], Mn = ["es"], jn = ["hi"], Rn = ["es"], Ln = ["ar"], qn = ["ar"], Un = ["ar"], Jn = ["es"], Vn = ["fr"], Kn = ["ru"], Gn = ["fr", "es", "ru"], Hn = ["hi"], Wn = ["es"], Zn = ["fa"], Yn = ["ru"], Xn = ["id"], Qn = ["de"], er = ["bbc-latn"], tr = ["fa"], nr = ["fa"], rr = ["bho"], sr = ["en"], ur = ["id"], ir = ["fr"], ar = ["bn"], or = ["fa"], lr = ["fr"], cr = ["id"], dr = ["id"], fr = ["ru"], hr = ["oc"], Dr = ["nan", "zh-hant"], pr = ["ru"], gr = ["it"], mr = ["crh-latn"], br = ["sk"], Cr = ["pl"], vr = ["ru"], Ar = ["hsb", "de"], wr = ["ms"], Er = ["ne"], Fr = ["it"], yr = ["it"], $r = ["es"], Br = ["fr"], kr = ["fi"], xr = ["fr"], Sr = ["fr"], _r = ["de"], Tr = ["it"], Or = ["tr"], Ir = ["gan-hant", "zh-hant", "zh-hans"], Pr = ["fr"], zr = ["pt"], Nr = ["fa"], Mr = ["es"], jr = ["gom-deva"], Rr = ["id"], Lr = ["de"], qr = ["es"], Ur = ["zh-hant"], Jr = ["hif-latn"], Vr = ["de"], Kr = ["dsb", "de"], Gr = ["fr"], Hr = ["hy"], Wr = ["zh-cn", "zh-hans"], Zr = ["ru"], Yr = ["eo"], Xr = ["ike-cans"], Qr = ["en"], es = ["da"], ts = ["id"], ns = ["kk-latn", "kk-cyrl"], rs = ["fr"], ss = ["kbd-cyrl"], us = ["fr"], is = ["ur"], as = ["tr"], os = ["my"], ls = ["kk-cyrl"], cs = ["da"], ds = ["ru"], fs = ["ru"], hs = ["fi"], Ds = ["ks-arab"], ps = ["de"], gs = ["ku-latn"], ms = ["ru"], bs = ["ru"], Cs = ["es"], vs = ["de"], As = ["ru"], ws = ["ru", "az"], Es = ["nl"], Fs = ["it"], ys = ["et"], $s = ["fa"], Bs = ["it", "rm", "fur"], ks = ["pms", "eml", "lij", "vec", "it"], xs = ["fr"], Ss = ["fa"], _s = ["lv"], Ts = ["fa"], Os = ["zh-hant"], Is = ["tr"], Ps = ["id"], zs = ["hi"], Ns = ["myv", "ru"], Ms = ["fr"], js = ["mrj", "ru"], Rs = ["id"], Ls = ["my"], qs = ["ro"], Us = ["mhr", "ru"], Js = ["pt"], Vs = ["mdf", "ru"], Ks = ["fa"], Gs = ["es"], Hs = ["cdo", "zh-hant"], Ws = ["it"], Zs = ["nn"], Ys = ["de"], Xs = ["id"], Qs = ["nb"], eu = ["fr"], tu = ["ca", "fr"], nu = ["fi"], ru = ["ru"], su = ["fr"], uu = ["de"], iu = ["de"], au = ["de"], ou = ["en"], lu = ["it"], cu = ["el"], du = ["pt-br"], fu = ["qug", "es"], hu = ["qu", "es"], Du = ["it"], pu = ["ro"], gu = ["uk", "ru"], mu = ["ro"], bu = ["ruq-latn", "ro"], Cu = ["hi"], vu = ["ru"], Au = ["it"], wu = ["en"], Eu = ["it"], Fu = ["cbk", "fa"], yu = ["fr"], $u = ["fr"], Bu = ["lt"], ku = ["bs", "sr-el", "hr"], xu = ["fr"], Su = ["shy-latn"], _u = ["cs"], Tu = ["skr-arab"], Ou = ["de"], Iu = ["fi"], Pu = ["sr-ec"], zu = ["nl"], Nu = ["de"], Mu = ["ru"], ju = ["id"], Ru = ["pl"], Lu = ["zh-tw", "zh-hant", "zh-hans"], qu = ["zh-tw", "zh-hant", "zh-hans"], Uu = ["kn"], Ju = ["pt"], Vu = ["tg-cyrl"], Ku = ["zh-tw", "zh-hant", "zh-hans"], Gu = ["tt-cyrl", "ru"], Hu = ["fr"], Wu = ["ru"], Zu = ["ru"], Yu = ["ug-arab"], Xu = ["it"], Qu = ["et"], ei = ["nl"], ti = ["de"], ni = ["fi"], ri = ["et"], si = ["fr"], ui = ["fr"], ii = ["zh-hans"], ai = ["ru"], oi = ["ka"], li = ["he"], ci = ["zh-hans"], di = ["nl"], fi = ["kab"], hi = ["zh-hans"], St = { ab: Sn, abs: _n, ace: Tn, ady: On, aeb: In, "aeb-arab": ["ar"], aln: Pn, alt: zn, ami: Nn, an: Mn, anp: jn, arn: Rn, arq: Ln, ary: qn, arz: Un, ast: Jn, atj: Vn, av: Kn, avk: Gn, awa: Hn, ay: Wn, azb: Zn, ba: Yn, ban: Xn, "ban-bali": ["ban"], bar: Qn, bbc: er, "bbc-latn": ["id"], bcc: tr, "be-tarask": ["be"], bgn: nr, bh: rr, bi: sr, bjn: ur, bm: ir, bpy: ar, bqi: or, br: lr, btm: cr, bug: dr, bxr: fr, ca: hr, "cbk-zam": ["es"], cdo: Dr, ce: pr, co: gr, crh: mr, "crh-cyrl": ["ru"], cs: br, csb: Cr, cv: vr, "de-at": ["de"], "de-ch": ["de"], "de-formal": ["de"], dsb: Ar, dtp: wr, dty: Er, egl: Fr, eml: yr, "en-ca": ["en"], "en-gb": ["en"], "es-419": ["es"], "es-formal": ["es"], ext: $r, ff: Br, fit: kr, frc: xr, frp: Sr, frr: _r, fur: Tr, gag: Or, gan: Ir, "gan-hans": ["zh-hans"], "gan-hant": ["zh-hant", "zh-hans"], gcr: Pr, gl: zr, glk: Nr, gn: Mr, gom: jr, "gom-deva": ["hi"], gor: Rr, gsw: Lr, guc: qr, hak: Ur, hif: Jr, hrx: Vr, hsb: Kr, ht: Gr, "hu-formal": ["hu"], hyw: Hr, ii: Wr, inh: Zr, io: Yr, iu: Xr, jam: Qr, jut: es, jv: ts, kaa: ns, kab: rs, kbd: ss, kbp: us, khw: is, kiu: as, kjp: os, kk: ls, "kk-arab": ["kk-cyrl"], "kk-cn": ["kk-arab", "kk-cyrl"], "kk-kz": ["kk-cyrl"], "kk-latn": ["kk-cyrl"], "kk-tr": ["kk-latn", "kk-cyrl"], kl: cs, "ko-kp": ["ko"], koi: ds, krc: fs, krl: hs, ks: Ds, ksh: ps, ku: gs, "ku-arab": ["ckb"], kum: ms, kv: bs, lad: Cs, lb: vs, lbe: As, lez: ws, li: Es, lij: Fs, liv: ys, lki: $s, lld: Bs, lmo: ks, ln: xs, lrc: Ss, ltg: _s, luz: Ts, lzh: Os, lzz: Is, mad: Ps, mai: zs, "map-bms": ["jv", "id"], mdf: Ns, mg: Ms, mhr: js, min: Rs, mnw: Ls, mo: qs, mrj: Us, "ms-arab": ["ms"], mwl: Js, myv: Vs, mzn: Ks, nah: Gs, nan: Hs, nap: Ws, nb: Zs, nds: Ys, "nds-nl": ["nl"], nia: Xs, "nl-informal": ["nl"], nn: Qs, nrm: eu, oc: tu, olo: nu, os: ru, pcd: su, pdc: uu, pdt: iu, pfl: au, pih: ou, pms: lu, pnt: cu, pt: du, "pt-br": ["pt"], qu: fu, qug: hu, rgn: Du, rmy: pu, "roa-tara": ["it"], rue: gu, rup: mu, ruq: bu, "ruq-cyrl": ["mk"], "ruq-latn": ["ro"], sa: Cu, sah: vu, scn: Au, sco: wu, sdc: Eu, sdh: Fu, ses: yu, sg: $u, sgs: Bu, sh: ku, shi: xu, shy: Su, "shy-latn": ["fr"], sk: _u, skr: Tu, "skr-arab": ["ur", "pnb"], sli: Ou, smn: Iu, sr: Pu, srn: zu, stq: Nu, sty: Mu, su: ju, szl: Ru, szy: Lu, tay: qu, tcy: Uu, tet: Ju, tg: Vu, trv: Ku, tt: Gu, "tt-cyrl": ["ru"], ty: Hu, tyv: Wu, udm: Zu, ug: Yu, vec: Xu, vep: Qu, vls: ei, vmf: ti, vot: ni, vro: ri, wa: si, wo: ui, wuu: ii, xal: ai, xmf: oi, yi: li, za: ci, zea: di, zgh: fi, zh: hi, "zh-cn": ["zh-hans"], "zh-hant": ["zh-hans"], "zh-hk": ["zh-hant", "zh-hans"], "zh-mo": ["zh-hk", "zh-hant", "zh-hans"], "zh-my": ["zh-sg", "zh-hans"], "zh-sg": ["zh-hans"], "zh-tw": ["zh-hant", "zh-hans"] };
562
- let ie = class {
561
+ var vn = "٠١٢٣٤٥٦٧٨٩", Cn = "۰۱۲۳۴۵۶۷۸۹", wn = "൦൧൨൩൪൫൬൭൮൯", An = "೦೧೨೩೪೫೬೭೮೯", En = "໐໑໒໓໔໕໖໗໘໙", Fn = "୦୧୨୩୪୫୬୭୮୯", yn = "០១២៣៤៥៦៧៨៩", $n = "߀߁߂߃߄߅߆߇߈߉", Bn = "੦੧੨੩੪੫੬੭੮੯", kn = "૦૧૨૩૪૫૬૭૮૯", xn = "०१२३४५६७८९", Sn = "၀၁၂၃၄၅၆၇၈၉", _n = "௦௧௨௩௪௫௬௭௮௯", Tn = "౦౧౨౩౪౫౬౭౮౯", On = "๐๑๒๓๔๕๖๗๘๙", In = "༠༡༢༣༤༥༦༧༨༩", vt = { ar: vn, fa: Cn, ml: wn, kn: An, lo: En, or: Fn, kh: yn, nqo: $n, pa: Bn, gu: kn, hi: xn, my: Sn, ta: _n, te: Tn, th: On, bo: In }, Pn = ["ru"], zn = ["id"], Nn = ["id"], Mn = ["ady-cyrl"], jn = ["aeb-arab"], Rn = ["sq"], Ln = ["ru"], qn = ["zh-hant"], Un = ["es"], Jn = ["hi"], Vn = ["es"], Kn = ["ar"], Gn = ["ar"], Hn = ["ar"], Wn = ["es"], Zn = ["fr"], Yn = ["ru"], Xn = ["fr", "es", "ru"], Qn = ["hi"], er = ["es"], tr = ["fa"], nr = ["ru"], rr = ["id"], sr = ["de"], ir = ["bbc-latn"], ar = ["fa"], ur = ["fa"], or = ["bho"], lr = ["en"], cr = ["id"], dr = ["fr"], fr = ["bn"], hr = ["fa"], pr = ["fr"], Dr = ["id"], gr = ["id"], mr = ["ru"], br = ["oc"], vr = ["nan", "zh-hant"], Cr = ["ru"], wr = ["it"], Ar = ["crh-latn"], Er = ["sk"], Fr = ["pl"], yr = ["ru"], $r = ["hsb", "de"], Br = ["ms"], kr = ["ne"], xr = ["it"], Sr = ["it"], _r = ["es"], Tr = ["fr"], Or = ["fi"], Ir = ["fr"], Pr = ["fr"], zr = ["de"], Nr = ["it"], Mr = ["tr"], jr = ["gan-hant", "zh-hant", "zh-hans"], Rr = ["fr"], Lr = ["pt"], qr = ["fa"], Ur = ["es"], Jr = ["gom-deva"], Vr = ["id"], Kr = ["de"], Gr = ["es"], Hr = ["zh-hant"], Wr = ["hif-latn"], Zr = ["de"], Yr = ["dsb", "de"], Xr = ["fr"], Qr = ["hy"], es = ["zh-cn", "zh-hans"], ts = ["ru"], ns = ["eo"], rs = ["ike-cans"], ss = ["en"], is = ["da"], as = ["id"], us = ["kk-latn", "kk-cyrl"], os = ["fr"], ls = ["kbd-cyrl"], cs = ["fr"], ds = ["ur"], fs = ["tr"], hs = ["my"], ps = ["kk-cyrl"], Ds = ["da"], gs = ["ru"], ms = ["ru"], bs = ["fi"], vs = ["ks-arab"], Cs = ["de"], ws = ["ku-latn"], As = ["ru"], Es = ["ru"], Fs = ["es"], ys = ["de"], $s = ["ru"], Bs = ["ru", "az"], ks = ["nl"], xs = ["it"], Ss = ["et"], _s = ["fa"], Ts = ["it", "rm", "fur"], Os = ["pms", "eml", "lij", "vec", "it"], Is = ["fr"], Ps = ["fa"], zs = ["lv"], Ns = ["fa"], Ms = ["zh-hant"], js = ["tr"], Rs = ["id"], Ls = ["hi"], qs = ["myv", "ru"], Us = ["fr"], Js = ["mrj", "ru"], Vs = ["id"], Ks = ["my"], Gs = ["ro"], Hs = ["mhr", "ru"], Ws = ["pt"], Zs = ["mdf", "ru"], Ys = ["fa"], Xs = ["es"], Qs = ["cdo", "zh-hant"], ei = ["it"], ti = ["nn"], ni = ["de"], ri = ["id"], si = ["nb"], ii = ["fr"], ai = ["ca", "fr"], ui = ["fi"], oi = ["ru"], li = ["fr"], ci = ["de"], di = ["de"], fi = ["de"], hi = ["en"], pi = ["it"], Di = ["el"], gi = ["pt-br"], mi = ["qug", "es"], bi = ["qu", "es"], vi = ["it"], Ci = ["ro"], wi = ["uk", "ru"], Ai = ["ro"], Ei = ["ruq-latn", "ro"], Fi = ["hi"], yi = ["ru"], $i = ["it"], Bi = ["en"], ki = ["it"], xi = ["cbk", "fa"], Si = ["fr"], _i = ["fr"], Ti = ["lt"], Oi = ["bs", "sr-el", "hr"], Ii = ["fr"], Pi = ["shy-latn"], zi = ["cs"], Ni = ["skr-arab"], Mi = ["de"], ji = ["fi"], Ri = ["sr-ec"], Li = ["nl"], qi = ["de"], Ui = ["ru"], Ji = ["id"], Vi = ["pl"], Ki = ["zh-tw", "zh-hant", "zh-hans"], Gi = ["zh-tw", "zh-hant", "zh-hans"], Hi = ["kn"], Wi = ["pt"], Zi = ["tg-cyrl"], Yi = ["zh-tw", "zh-hant", "zh-hans"], Xi = ["tt-cyrl", "ru"], Qi = ["fr"], ea = ["ru"], ta = ["ru"], na = ["ug-arab"], ra = ["it"], sa = ["et"], ia = ["nl"], aa = ["de"], ua = ["fi"], oa = ["et"], la = ["fr"], ca = ["fr"], da = ["zh-hans"], fa = ["ru"], ha = ["ka"], pa = ["he"], Da = ["zh-hans"], ga = ["nl"], ma = ["kab"], ba = ["zh-hans"], jt = { ab: Pn, abs: zn, ace: Nn, ady: Mn, aeb: jn, "aeb-arab": ["ar"], aln: Rn, alt: Ln, ami: qn, an: Un, anp: Jn, arn: Vn, arq: Kn, ary: Gn, arz: Hn, ast: Wn, atj: Zn, av: Yn, avk: Xn, awa: Qn, ay: er, azb: tr, ba: nr, ban: rr, "ban-bali": ["ban"], bar: sr, bbc: ir, "bbc-latn": ["id"], bcc: ar, "be-tarask": ["be"], bgn: ur, bh: or, bi: lr, bjn: cr, bm: dr, bpy: fr, bqi: hr, br: pr, btm: Dr, bug: gr, bxr: mr, ca: br, "cbk-zam": ["es"], cdo: vr, ce: Cr, co: wr, crh: Ar, "crh-cyrl": ["ru"], cs: Er, csb: Fr, cv: yr, "de-at": ["de"], "de-ch": ["de"], "de-formal": ["de"], dsb: $r, dtp: Br, dty: kr, egl: xr, eml: Sr, "en-ca": ["en"], "en-gb": ["en"], "es-419": ["es"], "es-formal": ["es"], ext: _r, ff: Tr, fit: Or, frc: Ir, frp: Pr, frr: zr, fur: Nr, gag: Mr, gan: jr, "gan-hans": ["zh-hans"], "gan-hant": ["zh-hant", "zh-hans"], gcr: Rr, gl: Lr, glk: qr, gn: Ur, gom: Jr, "gom-deva": ["hi"], gor: Vr, gsw: Kr, guc: Gr, hak: Hr, hif: Wr, hrx: Zr, hsb: Yr, ht: Xr, "hu-formal": ["hu"], hyw: Qr, ii: es, inh: ts, io: ns, iu: rs, jam: ss, jut: is, jv: as, kaa: us, kab: os, kbd: ls, kbp: cs, khw: ds, kiu: fs, kjp: hs, kk: ps, "kk-arab": ["kk-cyrl"], "kk-cn": ["kk-arab", "kk-cyrl"], "kk-kz": ["kk-cyrl"], "kk-latn": ["kk-cyrl"], "kk-tr": ["kk-latn", "kk-cyrl"], kl: Ds, "ko-kp": ["ko"], koi: gs, krc: ms, krl: bs, ks: vs, ksh: Cs, ku: ws, "ku-arab": ["ckb"], kum: As, kv: Es, lad: Fs, lb: ys, lbe: $s, lez: Bs, li: ks, lij: xs, liv: Ss, lki: _s, lld: Ts, lmo: Os, ln: Is, lrc: Ps, ltg: zs, luz: Ns, lzh: Ms, lzz: js, mad: Rs, mai: Ls, "map-bms": ["jv", "id"], mdf: qs, mg: Us, mhr: Js, min: Vs, mnw: Ks, mo: Gs, mrj: Hs, "ms-arab": ["ms"], mwl: Ws, myv: Zs, mzn: Ys, nah: Xs, nan: Qs, nap: ei, nb: ti, nds: ni, "nds-nl": ["nl"], nia: ri, "nl-informal": ["nl"], nn: si, nrm: ii, oc: ai, olo: ui, os: oi, pcd: li, pdc: ci, pdt: di, pfl: fi, pih: hi, pms: pi, pnt: Di, pt: gi, "pt-br": ["pt"], qu: mi, qug: bi, rgn: vi, rmy: Ci, "roa-tara": ["it"], rue: wi, rup: Ai, ruq: Ei, "ruq-cyrl": ["mk"], "ruq-latn": ["ro"], sa: Fi, sah: yi, scn: $i, sco: Bi, sdc: ki, sdh: xi, ses: Si, sg: _i, sgs: Ti, sh: Oi, shi: Ii, shy: Pi, "shy-latn": ["fr"], sk: zi, skr: Ni, "skr-arab": ["ur", "pnb"], sli: Mi, smn: ji, sr: Ri, srn: Li, stq: qi, sty: Ui, su: Ji, szl: Vi, szy: Ki, tay: Gi, tcy: Hi, tet: Wi, tg: Zi, trv: Yi, tt: Xi, "tt-cyrl": ["ru"], ty: Qi, tyv: ea, udm: ta, ug: na, vec: ra, vep: sa, vls: ia, vmf: aa, vot: ua, vro: oa, wa: la, wo: ca, wuu: da, xal: fa, xmf: ha, yi: pa, za: Da, zea: ga, zgh: ma, zh: ba, "zh-cn": ["zh-hans"], "zh-hant": ["zh-hans"], "zh-hk": ["zh-hant", "zh-hans"], "zh-mo": ["zh-hk", "zh-hant", "zh-hans"], "zh-my": ["zh-sg", "zh-hans"], "zh-sg": ["zh-hans"], "zh-tw": ["zh-hant", "zh-hans"] };
562
+ let he = class {
563
563
  constructor(e) {
564
564
  this.locale = e;
565
565
  }
@@ -567,9 +567,9 @@ let ie = class {
567
567
  const n = /\d+=/i;
568
568
  if (!t || t.length === 0) return "";
569
569
  for (let s = 0; s < t.length; s++) {
570
- const u = t[s];
571
- if (n.test(u)) {
572
- if (parseInt(u.slice(0, u.indexOf("=")), 10) === e) return u.slice(u.indexOf("=") + 1);
570
+ const i = t[s];
571
+ if (n.test(i)) {
572
+ if (parseInt(i.slice(0, i.indexOf("=")), 10) === e) return i.slice(i.indexOf("=") + 1);
573
573
  t[s] = void 0;
574
574
  }
575
575
  }
@@ -578,24 +578,24 @@ let ie = class {
578
578
  return r = Math.min(r, t.length - 1), t[r];
579
579
  }
580
580
  getPluralForm(e, t) {
581
- const n = ["zero", "one", "two", "few", "many", "other"], r = new Intl.PluralRules(t), s = r.resolvedOptions().pluralCategories, u = r.select(e);
582
- return n.filter((o) => s.includes(o)).indexOf(u);
581
+ const n = ["zero", "one", "two", "few", "many", "other"], r = new Intl.PluralRules(t), s = r.resolvedOptions().pluralCategories, i = r.select(e);
582
+ return n.filter((u) => s.includes(u)).indexOf(i);
583
583
  }
584
584
  convertNumber(e, t = !1) {
585
585
  let n = this.digitTransformTable(this.locale), r = "";
586
586
  if (t) {
587
587
  if (parseFloat(e, 10) === e || !n) return e;
588
588
  const s = [];
589
- for (const o in n) s[n[o]] = o;
589
+ for (const u in n) s[n[u]] = u;
590
590
  n = s;
591
- const u = String(e);
592
- for (let o = 0; o < u.length; o++) r += n[u[o]] || u[o];
591
+ const i = String(e);
592
+ for (let u = 0; u < i.length; u++) r += n[i[u]] || i[u];
593
593
  return parseFloat(r, 10);
594
594
  }
595
595
  if (Intl.NumberFormat) {
596
596
  let s;
597
- const u = [...St[this.locale] || [], "en"];
598
- return Intl.NumberFormat.supportedLocalesOf(this.locale).length ? s = [this.locale] : s = u, r = new Intl.NumberFormat(s).format(e), r === "NaN" && (r = e), r;
597
+ const i = [...jt[this.locale] || [], "en"];
598
+ return Intl.NumberFormat.supportedLocalesOf(this.locale).length ? s = [this.locale] : s = i, r = new Intl.NumberFormat(s).format(e), r === "NaN" && (r = e), r;
599
599
  }
600
600
  }
601
601
  convertGrammar(e) {
@@ -607,9 +607,9 @@ let ie = class {
607
607
  return e === "male" ? t[0] : e === "female" ? t[1] : t.length === 3 ? t[2] : t[0];
608
608
  }
609
609
  digitTransformTable(e) {
610
- return ft[e] ? ft[e].split("") : !1;
610
+ return vt[e] ? vt[e].split("") : !1;
611
611
  }
612
- }, Di = class extends ie {
612
+ }, va = class extends he {
613
613
  convertGrammar(e, t) {
614
614
  switch (t) {
615
615
  case "prefixed":
@@ -618,7 +618,7 @@ let ie = class {
618
618
  }
619
619
  return e;
620
620
  }
621
- }, pi = class extends ie {
621
+ }, Ca = class extends he {
622
622
  convertGrammar(t, n) {
623
623
  switch (n) {
624
624
  case "instrumental":
@@ -630,7 +630,7 @@ let ie = class {
630
630
  }
631
631
  return t;
632
632
  }
633
- }, gi = class extends ie {
633
+ }, wa = class extends he {
634
634
  convertGrammar(e, t) {
635
635
  switch (t) {
636
636
  case "instrumental":
@@ -642,7 +642,7 @@ let ie = class {
642
642
  }
643
643
  return e;
644
644
  }
645
- }, mi = class extends ie {
645
+ }, Aa = class extends he {
646
646
  convertGrammar(e, t) {
647
647
  switch (t) {
648
648
  case "instrumental":
@@ -654,7 +654,7 @@ let ie = class {
654
654
  }
655
655
  return e;
656
656
  }
657
- }, bi = class extends ie {
657
+ }, Ea = class extends he {
658
658
  convertGrammar(e, t) {
659
659
  let n = e.match(/[aou][^äöy]*$/i);
660
660
  const r = e;
@@ -680,12 +680,12 @@ let ie = class {
680
680
  }
681
681
  return e;
682
682
  }
683
- }, Ci = class extends ie {
683
+ }, Fa = class extends he {
684
684
  convertGrammar(e, t) {
685
685
  return t === "genitive" && (e.slice(-1) === "ь" ? e = e.slice(0, -1) + "я" : e.slice(-2) === "ия" ? e = e.slice(0, -2) + "ии" : e.slice(-2) === "ка" ? e = e.slice(0, -2) + "ки" : e.slice(-2) === "ти" ? e = e.slice(0, -2) + "тей" : e.slice(-2) === "ды" ? e = e.slice(0, -2) + "дов" : e.slice(-3) === "ник" && (e = e.slice(0, -3) + "ника")), e;
686
686
  }
687
687
  };
688
- class vi extends ie {
688
+ class ya extends he {
689
689
  convertGrammar(t, n) {
690
690
  switch (n) {
691
691
  case "mestnik":
@@ -698,7 +698,7 @@ class vi extends ie {
698
698
  return t;
699
699
  }
700
700
  }
701
- let Ai = class extends ie {
701
+ let $a = class extends he {
702
702
  convertGrammar(e, t) {
703
703
  switch (t) {
704
704
  case "genitive":
@@ -714,12 +714,12 @@ let Ai = class extends ie {
714
714
  return e;
715
715
  }
716
716
  };
717
- class wi extends ie {
717
+ class Ba extends he {
718
718
  convertGrammar(t, n) {
719
719
  return n === "genitive" && (t.slice(-1) === "ա" ? t = t.slice(0, -1) + "այի" : t.slice(-1) === "ո" ? t = t.slice(0, -1) + "ոյի" : t.slice(-4) === "գիրք" ? t = t.slice(0, -4) + "գրքի" : t = t + "ի"), t;
720
720
  }
721
721
  }
722
- let Ei = class extends ie {
722
+ let ka = class extends he {
723
723
  convertGrammar(e, t) {
724
724
  if (t === "ainmlae") switch (e) {
725
725
  case "an Domhnach":
@@ -746,7 +746,7 @@ let Ei = class extends ie {
746
746
  }
747
747
  return e;
748
748
  }
749
- }, Fi = class extends ie {
749
+ }, xa = class extends he {
750
750
  convertGrammar(e, t) {
751
751
  switch (t) {
752
752
  case "rol":
@@ -761,36 +761,36 @@ let Ei = class extends ie {
761
761
  }
762
762
  return e;
763
763
  }
764
- }, yi = class extends ie {
764
+ }, Sa = class extends he {
765
765
  convertGrammar(e, t) {
766
- let n, r, s, u;
767
- switch (n = "мæ", r = "", s = "", u = "", e.match(/тæ$/i) ? (e = e.slice(0, -1), n = "æм") : e.match(/[аæеёиоыэюя]$/i) ? r = "й" : e.match(/у$/i) ? e.slice(-2, -1).match(/[аæеёиоыэюя]$/i) || (r = "й") : e.match(/[бвгджзйклмнопрстфхцчшщьъ]$/i) || (s = "-"), t) {
766
+ let n, r, s, i;
767
+ switch (n = "мæ", r = "", s = "", i = "", e.match(/тæ$/i) ? (e = e.slice(0, -1), n = "æм") : e.match(/[аæеёиоыэюя]$/i) ? r = "й" : e.match(/у$/i) ? e.slice(-2, -1).match(/[аæеёиоыэюя]$/i) || (r = "й") : e.match(/[бвгджзйклмнопрстфхцчшщьъ]$/i) || (s = "-"), t) {
768
768
  case "genitive":
769
- u = s + r + "ы";
769
+ i = s + r + "ы";
770
770
  break;
771
771
  case "dative":
772
- u = s + r + "æн";
772
+ i = s + r + "æн";
773
773
  break;
774
774
  case "allative":
775
- u = s + n;
775
+ i = s + n;
776
776
  break;
777
777
  case "ablative":
778
- r === "й" ? u = s + r + "æ" : u = s + r + "æй";
778
+ r === "й" ? i = s + r + "æ" : i = s + r + "æй";
779
779
  break;
780
780
  case "superessive":
781
- u = s + r + "ыл";
781
+ i = s + r + "ыл";
782
782
  break;
783
783
  case "equative":
784
- u = s + r + "ау";
784
+ i = s + r + "ау";
785
785
  break;
786
786
  case "comitative":
787
- u = s + "имæ";
787
+ i = s + "имæ";
788
788
  break;
789
789
  }
790
- return e + u;
790
+ return e + i;
791
791
  }
792
792
  };
793
- class $i extends ie {
793
+ class _a extends he {
794
794
  convertGrammar(t, n) {
795
795
  switch (n) {
796
796
  case "genitive":
@@ -803,11 +803,11 @@ class $i extends ie {
803
803
  return t;
804
804
  }
805
805
  }
806
- var ht = { bs: pi, default: ie, dsb: gi, fi: bi, ga: Ei, he: Di, hsb: mi, hu: Fi, hy: wi, la: Ai, os: yi, ru: Ci, sl: vi, uk: $i };
807
- const Bi = new RegExp("(?:([A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁːˑˠ-ˤˮͰ-ͳͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-҂Ҋ-ԯԱ-Ֆՙ-՟ա-և։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ঀংঃঅ-ঌএঐও-নপ-রলশ-হঽ-ীেৈোৌৎৗড়ঢ়য়-ৡ০-ৱ৴-৺ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ીૉોૌૐૠૡ૦-૰ૹଂଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽାୀେୈୋୌୗଡ଼ଢ଼ୟ-ୡ୦-୷ஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹாிுூெ-ைொ-ௌௐௗ௦-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౚౠౡ౦-౯౿ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊೋೕೖೞೠೡ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ീെ-ൈൊ-ൌൎൗൟ-ൡ൦-൵൹-ൿංඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-෴ก-ะาำเ-ๆ๏-๛ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆ໐-໙ໜ-ໟༀ-༗༚-༴༶༸༾-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿚က-ာေးျြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃႄႇ-ႌႎ-ႜ႞-ჅჇჍა-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፼ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙿᚁ-ᚚᚠ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះៈ។-៚ៜ០-៩᠐-᠙ᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸ᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨖᨙᨚ᨞-ᩕᩗᩡᩣᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-ᭋ᭐-᭪᭴-᭼ᮂ-ᮡᮦᮧ᮪ᮮ-ᯥᯧᯪ-ᯬᯮ᯲᯳᯼-ᰫᰴᰵ᰻-᱉ᱍ-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳳᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〮〯〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎ㆐-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿕ꀀ-ꒌꓐ-ꘌꘐ-ꘫꙀ-ꙮꚀ-ꚝꚠ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꣽ꤀-ꤥ꤮-ꥆꥒ꥓꥟-ꥼꦃ-ꦲꦴꦵꦺꦻꦽ-꧍ꧏ-꧙꧞-ꧤꧦ-ꧾꨀ-ꨨꨯꨰꨳꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-ꩻꩽ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫫꫮ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭥꭰ-ꯤꯦꯧꯩ-꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]|\uD800[\uDC00-\uDC0B]|\uD800[\uDC0D-\uDC26]|\uD800[\uDC28-\uDC3A]|𐀼|𐀽|\uD800[\uDC3F-\uDC4D]|\uD800[\uDC50-\uDC5D]|\uD800[\uDC80-\uDCFA]|𐄀|𐄂|\uD800[\uDD07-\uDD33]|\uD800[\uDD37-\uDD3F]|\uD800[\uDDD0-\uDDFC]|\uD800[\uDE80-\uDE9C]|\uD800[\uDEA0-\uDED0]|\uD800[\uDF00-\uDF23]|\uD800[\uDF30-\uDF4A]|\uD800[\uDF50-\uDF75]|\uD800[\uDF80-\uDF9D]|\uD800[\uDF9F-\uDFC3]|\uD800[\uDFC8-\uDFD5]|\uD801[\uDC00-\uDC9D]|\uD801[\uDCA0-\uDCA9]|\uD801[\uDD00-\uDD27]|\uD801[\uDD30-\uDD63]|𐕯|\uD801[\uDE00-\uDF36]|\uD801[\uDF40-\uDF55]|\uD801[\uDF60-\uDF67]|𑀀|\uD804[\uDC02-\uDC37]|\uD804[\uDC47-\uDC4D]|\uD804[\uDC66-\uDC6F]|\uD804[\uDC82-\uDCB2]|𑂷|𑂸|\uD804[\uDCBB-\uDCC1]|\uD804[\uDCD0-\uDCE8]|\uD804[\uDCF0-\uDCF9]|\uD804[\uDD03-\uDD26]|𑄬|\uD804[\uDD36-\uDD43]|\uD804[\uDD50-\uDD72]|\uD804[\uDD74-\uDD76]|\uD804[\uDD82-\uDDB5]|\uD804[\uDDBF-\uDDC9]|𑇍|\uD804[\uDDD0-\uDDDF]|\uD804[\uDDE1-\uDDF4]|\uD804[\uDE00-\uDE11]|\uD804[\uDE13-\uDE2E]|𑈲|𑈳|𑈵|\uD804[\uDE38-\uDE3D]|\uD804[\uDE80-\uDE86]|𑊈|\uD804[\uDE8A-\uDE8D]|\uD804[\uDE8F-\uDE9D]|\uD804[\uDE9F-\uDEA9]|\uD804[\uDEB0-\uDEDE]|\uD804[\uDEE0-\uDEE2]|\uD804[\uDEF0-\uDEF9]|𑌂|𑌃|\uD804[\uDF05-\uDF0C]|𑌏|𑌐|\uD804[\uDF13-\uDF28]|\uD804[\uDF2A-\uDF30]|𑌲|𑌳|\uD804[\uDF35-\uDF39]|\uD804[\uDF3D-\uDF3F]|\uD804[\uDF41-\uDF44]|𑍇|𑍈|\uD804[\uDF4B-\uDF4D]|𑍐|𑍗|\uD804[\uDF5D-\uDF63]|\uD805[\uDC80-\uDCB2]|𑒹|\uD805[\uDCBB-\uDCBE]|𑓁|\uD805[\uDCC4-\uDCC7]|\uD805[\uDCD0-\uDCD9]|\uD805[\uDD80-\uDDB1]|\uD805[\uDDB8-\uDDBB]|𑖾|\uD805[\uDDC1-\uDDDB]|\uD805[\uDE00-\uDE32]|𑘻|𑘼|𑘾|\uD805[\uDE41-\uDE44]|\uD805[\uDE50-\uDE59]|\uD805[\uDE80-\uDEAA]|𑚬|𑚮|𑚯|𑚶|\uD805[\uDEC0-\uDEC9]|\uD805[\uDF00-\uDF19]|𑜠|𑜡|𑜦|\uD805[\uDF30-\uDF3F]|\uD806[\uDCA0-\uDCF2]|𑣿|\uD806[\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E]|\uD809[\uDC70-\uDC74]|\uD809[\uDC80-\uDD43]|\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38]|\uD81A[\uDE40-\uDE5E]|\uD81A[\uDE60-\uDE69]|𖩮|𖩯|\uD81A[\uDED0-\uDEED]|𖫵|\uD81A[\uDF00-\uDF2F]|\uD81A[\uDF37-\uDF45]|\uD81A[\uDF50-\uDF59]|\uD81A[\uDF5B-\uDF61]|\uD81A[\uDF63-\uDF77]|\uD81A[\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44]|\uD81B[\uDF50-\uDF7E]|\uD81B[\uDF93-\uDF9F]|𛀀|𛀁|\uD82F[\uDC00-\uDC6A]|\uD82F[\uDC70-\uDC7C]|\uD82F[\uDC80-\uDC88]|\uD82F[\uDC90-\uDC99]|𛲜|𛲟|\uD834[\uDC00-\uDCF5]|\uD834[\uDD00-\uDD26]|\uD834[\uDD29-\uDD66]|\uD834[\uDD6A-\uDD72]|𝆃|𝆄|\uD834[\uDD8C-\uDDA9]|\uD834[\uDDAE-\uDDE8]|\uD834[\uDF60-\uDF71]|\uD835[\uDC00-\uDC54]|\uD835[\uDC56-\uDC9C]|𝒞|𝒟|𝒢|𝒥|𝒦|\uD835[\uDCA9-\uDCAC]|\uD835[\uDCAE-\uDCB9]|𝒻|\uD835[\uDCBD-\uDCC3]|\uD835[\uDCC5-\uDD05]|\uD835[\uDD07-\uDD0A]|\uD835[\uDD0D-\uDD14]|\uD835[\uDD16-\uDD1C]|\uD835[\uDD1E-\uDD39]|\uD835[\uDD3B-\uDD3E]|\uD835[\uDD40-\uDD44]|𝕆|\uD835[\uDD4A-\uDD50]|\uD835[\uDD52-\uDEA5]|\uD835[\uDEA8-\uDEDA]|\uD835[\uDEDC-\uDF14]|\uD835[\uDF16-\uDF4E]|\uD835[\uDF50-\uDF88]|\uD835[\uDF8A-\uDFC2]|\uD835[\uDFC4-\uDFCB]|\uD836[\uDC00-\uDDFF]|\uD836[\uDE37-\uDE3A]|\uD836[\uDE6D-\uDE74]|\uD836[\uDE76-\uDE83]|\uD836[\uDE85-\uDE8B]|\uD83C[\uDD10-\uDD2E]|\uD83C[\uDD30-\uDD69]|\uD83C[\uDD70-\uDD9A]|\uD83C[\uDDE6-\uDE02]|\uD83C[\uDE10-\uDE3A]|\uD83C[\uDE40-\uDE48]|🉐|🉑|[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6]|\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34]|\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|[\uDB80-\uDBBE][\uDC00-\uDFFF]|\uDBBF[\uDC00-\uDFFD]|[\uDBC0-\uDBFE][\uDC00-\uDFFF]|\uDBFF[\uDC00-\uDFFD])|([֐־׀׃׆׈-׿߀-ߪߴߵߺ-ࠕࠚࠤࠨ࠮-ࡘ࡜-࢟‏יִײַ-ﬨשׁ-ﭏ؈؋؍؛-ي٭-ٯٱ-ەۥۦۮۯۺ-ܐܒ-ܯ݋-ޥޱ-޿ࢠ-࣢ﭐ-ﴽ﵀-﷏ﷰ-﷼﷾﷿ﹰ-﻾]|\uD802[\uDC00-\uDD1E]|\uD802[\uDD20-\uDE00]|𐨄|\uD802[\uDE07-\uDE0B]|\uD802[\uDE10-\uDE37]|\uD802[\uDE3B-\uDE3E]|\uD802[\uDE40-\uDEE4]|\uD802[\uDEE7-\uDF38]|\uD802[\uDF40-\uDFFF]|\uD803[\uDC00-\uDE5F]|\uD803[\uDE7F-\uDFFF]|\uD83A[\uDC00-\uDCCF]|\uD83A[\uDCD7-\uDFFF]|\uD83B[\uDC00-\uDDFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDE00-\uDEEF]|\uD83B[\uDEF2-\uDEFF]))");
808
- let _t = class {
806
+ var Ct = { bs: Ca, default: he, dsb: wa, fi: Ea, ga: ka, he: va, hsb: Aa, hu: xa, hy: Ba, la: $a, os: Sa, ru: Fa, sl: ya, uk: _a };
807
+ const Ta = new RegExp("(?:([A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁːˑˠ-ˤˮͰ-ͳͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-҂Ҋ-ԯԱ-Ֆՙ-՟ա-և։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ঀংঃঅ-ঌএঐও-নপ-রলশ-হঽ-ীেৈোৌৎৗড়ঢ়য়-ৡ০-ৱ৴-৺ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੀਖ਼-ੜਫ਼੦-੯ੲ-ੴઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ીૉોૌૐૠૡ૦-૰ૹଂଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽାୀେୈୋୌୗଡ଼ଢ଼ୟ-ୡ୦-୷ஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹாிுூெ-ைொ-ௌௐௗ௦-௲ఁ-ఃఅ-ఌఎ-ఐఒ-నప-హఽు-ౄౘ-ౚౠౡ౦-౯౿ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊೋೕೖೞೠೡ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ീെ-ൈൊ-ൌൎൗൟ-ൡ൦-൵൹-ൿංඃඅ-ඖක-නඳ-රලව-ෆා-ෑෘ-ෟ෦-෯ෲ-෴ก-ะาำเ-ๆ๏-๛ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆ໐-໙ໜ-ໟༀ-༗༚-༴༶༸༾-ཇཉ-ཬཿ྅ྈ-ྌ྾-࿅࿇-࿌࿎-࿚က-ာေးျြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃႄႇ-ႌႎ-ႜ႞-ჅჇჍა-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፠-፼ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙿᚁ-ᚚᚠ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱ᜵᜶ᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳាើ-ៅះៈ។-៚ៜ០-៩᠐-᠙ᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸ᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨖᨙᨚ᨞-ᩕᩗᩡᩣᩤᩭ-ᩲ᪀-᪉᪐-᪙᪠-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-ᭋ᭐-᭪᭴-᭼ᮂ-ᮡᮦᮧ᮪ᮮ-ᯥᯧᯪ-ᯬᯮ᯲᯳᯼-ᰫᰴᰵ᰻-᱉ᱍ-᱿᳀-᳇᳓᳡ᳩ-ᳬᳮ-ᳳᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵰ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〮〯〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎ㆐-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㋾㌀-㍶㍻-㏝㏠-㏾㐀-䶵一-鿕ꀀ-ꒌꓐ-ꘌꘐ-ꘫꙀ-ꙮꚀ-ꚝꚠ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꞭꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꣽ꤀-ꤥ꤮-ꥆꥒ꥓꥟-ꥼꦃ-ꦲꦴꦵꦺꦻꦽ-꧍ꧏ-꧙꧞-ꧤꧦ-ꧾꨀ-ꨨꨯꨰꨳꨴꩀ-ꩂꩄ-ꩋꩍ꩐-꩙꩜-ꩻꩽ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫫꫮ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭥꭰ-ꯤꯦꯧꯩ-꯬꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ-舘並-龎ff-stﬓ-ﬗA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]|\uD800[\uDC00-\uDC0B]|\uD800[\uDC0D-\uDC26]|\uD800[\uDC28-\uDC3A]|𐀼|𐀽|\uD800[\uDC3F-\uDC4D]|\uD800[\uDC50-\uDC5D]|\uD800[\uDC80-\uDCFA]|𐄀|𐄂|\uD800[\uDD07-\uDD33]|\uD800[\uDD37-\uDD3F]|\uD800[\uDDD0-\uDDFC]|\uD800[\uDE80-\uDE9C]|\uD800[\uDEA0-\uDED0]|\uD800[\uDF00-\uDF23]|\uD800[\uDF30-\uDF4A]|\uD800[\uDF50-\uDF75]|\uD800[\uDF80-\uDF9D]|\uD800[\uDF9F-\uDFC3]|\uD800[\uDFC8-\uDFD5]|\uD801[\uDC00-\uDC9D]|\uD801[\uDCA0-\uDCA9]|\uD801[\uDD00-\uDD27]|\uD801[\uDD30-\uDD63]|𐕯|\uD801[\uDE00-\uDF36]|\uD801[\uDF40-\uDF55]|\uD801[\uDF60-\uDF67]|𑀀|\uD804[\uDC02-\uDC37]|\uD804[\uDC47-\uDC4D]|\uD804[\uDC66-\uDC6F]|\uD804[\uDC82-\uDCB2]|𑂷|𑂸|\uD804[\uDCBB-\uDCC1]|\uD804[\uDCD0-\uDCE8]|\uD804[\uDCF0-\uDCF9]|\uD804[\uDD03-\uDD26]|𑄬|\uD804[\uDD36-\uDD43]|\uD804[\uDD50-\uDD72]|\uD804[\uDD74-\uDD76]|\uD804[\uDD82-\uDDB5]|\uD804[\uDDBF-\uDDC9]|𑇍|\uD804[\uDDD0-\uDDDF]|\uD804[\uDDE1-\uDDF4]|\uD804[\uDE00-\uDE11]|\uD804[\uDE13-\uDE2E]|𑈲|𑈳|𑈵|\uD804[\uDE38-\uDE3D]|\uD804[\uDE80-\uDE86]|𑊈|\uD804[\uDE8A-\uDE8D]|\uD804[\uDE8F-\uDE9D]|\uD804[\uDE9F-\uDEA9]|\uD804[\uDEB0-\uDEDE]|\uD804[\uDEE0-\uDEE2]|\uD804[\uDEF0-\uDEF9]|𑌂|𑌃|\uD804[\uDF05-\uDF0C]|𑌏|𑌐|\uD804[\uDF13-\uDF28]|\uD804[\uDF2A-\uDF30]|𑌲|𑌳|\uD804[\uDF35-\uDF39]|\uD804[\uDF3D-\uDF3F]|\uD804[\uDF41-\uDF44]|𑍇|𑍈|\uD804[\uDF4B-\uDF4D]|𑍐|𑍗|\uD804[\uDF5D-\uDF63]|\uD805[\uDC80-\uDCB2]|𑒹|\uD805[\uDCBB-\uDCBE]|𑓁|\uD805[\uDCC4-\uDCC7]|\uD805[\uDCD0-\uDCD9]|\uD805[\uDD80-\uDDB1]|\uD805[\uDDB8-\uDDBB]|𑖾|\uD805[\uDDC1-\uDDDB]|\uD805[\uDE00-\uDE32]|𑘻|𑘼|𑘾|\uD805[\uDE41-\uDE44]|\uD805[\uDE50-\uDE59]|\uD805[\uDE80-\uDEAA]|𑚬|𑚮|𑚯|𑚶|\uD805[\uDEC0-\uDEC9]|\uD805[\uDF00-\uDF19]|𑜠|𑜡|𑜦|\uD805[\uDF30-\uDF3F]|\uD806[\uDCA0-\uDCF2]|𑣿|\uD806[\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E]|\uD809[\uDC70-\uDC74]|\uD809[\uDC80-\uDD43]|\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38]|\uD81A[\uDE40-\uDE5E]|\uD81A[\uDE60-\uDE69]|𖩮|𖩯|\uD81A[\uDED0-\uDEED]|𖫵|\uD81A[\uDF00-\uDF2F]|\uD81A[\uDF37-\uDF45]|\uD81A[\uDF50-\uDF59]|\uD81A[\uDF5B-\uDF61]|\uD81A[\uDF63-\uDF77]|\uD81A[\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44]|\uD81B[\uDF50-\uDF7E]|\uD81B[\uDF93-\uDF9F]|𛀀|𛀁|\uD82F[\uDC00-\uDC6A]|\uD82F[\uDC70-\uDC7C]|\uD82F[\uDC80-\uDC88]|\uD82F[\uDC90-\uDC99]|𛲜|𛲟|\uD834[\uDC00-\uDCF5]|\uD834[\uDD00-\uDD26]|\uD834[\uDD29-\uDD66]|\uD834[\uDD6A-\uDD72]|𝆃|𝆄|\uD834[\uDD8C-\uDDA9]|\uD834[\uDDAE-\uDDE8]|\uD834[\uDF60-\uDF71]|\uD835[\uDC00-\uDC54]|\uD835[\uDC56-\uDC9C]|𝒞|𝒟|𝒢|𝒥|𝒦|\uD835[\uDCA9-\uDCAC]|\uD835[\uDCAE-\uDCB9]|𝒻|\uD835[\uDCBD-\uDCC3]|\uD835[\uDCC5-\uDD05]|\uD835[\uDD07-\uDD0A]|\uD835[\uDD0D-\uDD14]|\uD835[\uDD16-\uDD1C]|\uD835[\uDD1E-\uDD39]|\uD835[\uDD3B-\uDD3E]|\uD835[\uDD40-\uDD44]|𝕆|\uD835[\uDD4A-\uDD50]|\uD835[\uDD52-\uDEA5]|\uD835[\uDEA8-\uDEDA]|\uD835[\uDEDC-\uDF14]|\uD835[\uDF16-\uDF4E]|\uD835[\uDF50-\uDF88]|\uD835[\uDF8A-\uDFC2]|\uD835[\uDFC4-\uDFCB]|\uD836[\uDC00-\uDDFF]|\uD836[\uDE37-\uDE3A]|\uD836[\uDE6D-\uDE74]|\uD836[\uDE76-\uDE83]|\uD836[\uDE85-\uDE8B]|\uD83C[\uDD10-\uDD2E]|\uD83C[\uDD30-\uDD69]|\uD83C[\uDD70-\uDD9A]|\uD83C[\uDDE6-\uDE02]|\uD83C[\uDE10-\uDE3A]|\uD83C[\uDE40-\uDE48]|🉐|🉑|[\uD840-\uD868][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6]|\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF34]|\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|[\uDB80-\uDBBE][\uDC00-\uDFFF]|\uDBBF[\uDC00-\uDFFD]|[\uDBC0-\uDBFE][\uDC00-\uDFFF]|\uDBFF[\uDC00-\uDFFD])|([֐־׀׃׆׈-׿߀-ߪߴߵߺ-ࠕࠚࠤࠨ࠮-ࡘ࡜-࢟‏יִײַ-ﬨשׁ-ﭏ؈؋؍؛-ي٭-ٯٱ-ەۥۦۮۯۺ-ܐܒ-ܯ݋-ޥޱ-޿ࢠ-࣢ﭐ-ﴽ﵀-﷏ﷰ-﷼﷾﷿ﹰ-﻾]|\uD802[\uDC00-\uDD1E]|\uD802[\uDD20-\uDE00]|𐨄|\uD802[\uDE07-\uDE0B]|\uD802[\uDE10-\uDE37]|\uD802[\uDE3B-\uDE3E]|\uD802[\uDE40-\uDEE4]|\uD802[\uDEE7-\uDF38]|\uD802[\uDF40-\uDFFF]|\uD803[\uDC00-\uDE5F]|\uD803[\uDE7F-\uDFFF]|\uD83A[\uDC00-\uDCCF]|\uD83A[\uDCD7-\uDFFF]|\uD83B[\uDC00-\uDDFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDF00-\uDFFF]|\uD83B[\uDE00-\uDEEF]|\uD83B[\uDEF2-\uDEFF]))");
808
+ let Rt = class {
809
809
  constructor(e) {
810
- this.locale = Be(e), this.language = new (ht[this.locale] || ht.default)(this.locale);
810
+ this.locale = Me(e), this.language = new (Ct[this.locale] || Ct.default)(this.locale);
811
811
  }
812
812
  emit(e, t) {
813
813
  let n, r, s;
@@ -817,7 +817,7 @@ let _t = class {
817
817
  n = e;
818
818
  break;
819
819
  case "object":
820
- if (r = e.slice(1).map((u) => this.emit(u, t)), s = e[0].toLowerCase(), typeof this[s] == "function") n = this[s](r, t);
820
+ if (r = e.slice(1).map((i) => this.emit(i, t)), s = e[0].toLowerCase(), typeof this[s] == "function") n = this[s](r, t);
821
821
  else throw new Error('unknown operation "' + s + '"');
822
822
  break;
823
823
  case "undefined":
@@ -861,7 +861,7 @@ let _t = class {
861
861
  return `<a href="${e[0]}">${e[1]}</a>`;
862
862
  }
863
863
  bidi(e) {
864
- const t = ki(e[0]);
864
+ const t = Oa(e[0]);
865
865
  return t === "ltr" ? "‪" + e[0] + "‬" : t === "rtl" ? "‫" + e[0] + "‬" : e[0];
866
866
  }
867
867
  formatnum(e) {
@@ -876,217 +876,217 @@ let _t = class {
876
876
  htmlelement(e) {
877
877
  const t = e.shift(), n = e.shift();
878
878
  let r = e, s = "";
879
- for (const o in n) s += ` ${o}="${n[o]}"`;
879
+ for (const u in n) s += ` ${u}="${n[u]}"`;
880
880
  Array.isArray(r) || (r = [r]);
881
- const u = r.join("");
882
- return `<${t}${s}>${u}</${t}>`;
881
+ const i = r.join("");
882
+ return `<${t}${s}>${i}</${t}>`;
883
883
  }
884
884
  };
885
- function Be(e) {
885
+ function Me(e) {
886
886
  return typeof e == "string" ? e.toLowerCase() : e;
887
887
  }
888
- function ki(e) {
889
- const t = e.match(Bi);
888
+ function Oa(e) {
889
+ const t = e.match(Ta);
890
890
  return t ? t[2] === void 0 ? "ltr" : "rtl" : null;
891
891
  }
892
- function xi(e, { wikilinks: t = !1 } = {}) {
892
+ function Ia(e, { wikilinks: t = !1 } = {}) {
893
893
  let n = 0;
894
- function r(i) {
894
+ function r(c) {
895
895
  return () => {
896
- for (let d = 0; d < i.length; d++) {
897
- const y = i[d]();
898
- if (y !== null) return y;
896
+ for (let m = 0; m < c.length; m++) {
897
+ const O = c[m]();
898
+ if (O !== null) return O;
899
899
  }
900
900
  return null;
901
901
  };
902
902
  }
903
- function s(i) {
904
- const d = n, y = [];
905
- for (let A = 0; A < i.length; A++) {
906
- const q = i[A]();
907
- if (q === null) return n = d, null;
908
- y.push(q);
903
+ function s(c) {
904
+ const m = n, O = [];
905
+ for (let x = 0; x < c.length; x++) {
906
+ const ee = c[x]();
907
+ if (ee === null) return n = m, null;
908
+ O.push(ee);
909
909
  }
910
- return y;
910
+ return O;
911
911
  }
912
- function u(i, d) {
912
+ function i(c, m) {
913
913
  return () => {
914
- const y = n, A = [];
915
- let q = d();
916
- for (; q !== null; ) A.push(q), q = d();
917
- return A.length < i ? (n = y, null) : A;
914
+ const O = n, x = [];
915
+ let ee = m();
916
+ for (; ee !== null; ) x.push(ee), ee = m();
917
+ return x.length < c ? (n = O, null) : x;
918
918
  };
919
919
  }
920
- function o(i) {
921
- const d = i.length;
920
+ function u(c) {
921
+ const m = c.length;
922
922
  return () => {
923
- let y = null;
924
- return e.slice(n, n + d) === i && (y = i, n += d), y;
923
+ let O = null;
924
+ return e.slice(n, n + m) === c && (O = c, n += m), O;
925
925
  };
926
926
  }
927
- function l(i) {
927
+ function l(c) {
928
928
  return () => {
929
- const d = e.slice(n).match(i);
930
- return d === null ? null : (n += d[0].length, d[0]);
929
+ const m = e.slice(n).match(c);
930
+ return m === null ? null : (n += m[0].length, m[0]);
931
931
  };
932
932
  }
933
- const v = l(/^\s+/), B = o("|"), D = o(":"), x = o("\\"), te = l(/^./), ue = o("$"), ge = l(/^\d+/), z = o('"'), H = o("'"), W = l(t ? /^[^{}[\]$<\\]/ : /^[^{}$<\\]/), ne = l(t ? /^[^{}[\]$\\|]/ : /^[^{}$\\|]/), K = l(t ? /^[^{}[\]$\s]/ : /^[^{}$\s]/);
934
- function Q(i, d) {
933
+ const C = l(/^\s+/), $ = u("|"), D = u(":"), B = u("\\"), ae = l(/^./), de = u("$"), Ee = l(/^\d+/), L = u('"'), W = u("'"), Z = l(t ? /^[^{}[\]$<\\]/ : /^[^{}$<\\]/), ue = l(t ? /^[^{}[\]$\\|]/ : /^[^{}$\\|]/), G = l(t ? /^[^{}[\]$\s]/ : /^[^{}$\s]/);
934
+ function te(c, m) {
935
935
  return () => {
936
- const y = i();
937
- return y === null ? null : d(y);
936
+ const O = c();
937
+ return O === null ? null : m(O);
938
938
  };
939
939
  }
940
- function U() {
941
- const i = u(1, Y)();
942
- return i === null ? null : i.join("");
940
+ function J() {
941
+ const c = i(1, X)();
942
+ return c === null ? null : c.join("");
943
943
  }
944
- function he() {
945
- const i = u(1, be)();
946
- return i === null ? null : i.join("");
944
+ function we() {
945
+ const c = i(1, ye)();
946
+ return c === null ? null : c.join("");
947
947
  }
948
- const me = r([k, K]);
949
- function De() {
950
- const i = u(1, me)();
951
- return i === null ? null : i.join("");
948
+ const Fe = r([k, G]);
949
+ function Ae() {
950
+ const c = i(1, Fe)();
951
+ return c === null ? null : c.join("");
952
952
  }
953
953
  function k() {
954
- const i = s([x, te]);
955
- return i === null ? null : i[1];
954
+ const c = s([B, ae]);
955
+ return c === null ? null : c[1];
956
956
  }
957
- const Y = r([k, ne]), be = r([k, W]);
958
- function ae() {
959
- const i = s([ue, ge]);
960
- return i === null ? null : ["REPLACE", parseInt(i[1], 10) - 1];
957
+ const X = r([k, ue]), ye = r([k, Z]);
958
+ function pe() {
959
+ const c = s([de, Ee]);
960
+ return c === null ? null : ["REPLACE", parseInt(c[1], 10) - 1];
961
961
  }
962
- const oe = Q(l(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/), function(i) {
963
- return i.toString();
962
+ const De = te(l(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/), function(c) {
963
+ return c.toString();
964
964
  });
965
965
  function b() {
966
- const i = s([B, u(0, G)]);
967
- if (i === null) return null;
968
- const d = i[1];
969
- return d.length > 1 ? ["CONCAT"].concat(d) : d[0];
970
- }
971
- function pe() {
972
- const i = s([oe, D, ae]);
973
- return i === null ? null : [i[0], i[2]];
974
- }
975
- function xe() {
976
- const i = s([oe, D, G]);
977
- return i === null ? null : [i[0], i[2]];
978
- }
979
- function le() {
980
- const i = s([oe, D]);
981
- return i === null ? null : [i[0], ""];
982
- }
983
- const Fe = r([function() {
984
- const i = s([r([pe, xe, le]), u(0, b)]);
985
- return i === null ? null : i[0].concat(i[1]);
966
+ const c = s([$, i(0, H)]);
967
+ if (c === null) return null;
968
+ const m = c[1];
969
+ return m.length > 1 ? ["CONCAT"].concat(m) : m[0];
970
+ }
971
+ function ge() {
972
+ const c = s([De, D, pe]);
973
+ return c === null ? null : [c[0], c[2]];
974
+ }
975
+ function Re() {
976
+ const c = s([De, D, H]);
977
+ return c === null ? null : [c[0], c[2]];
978
+ }
979
+ function me() {
980
+ const c = s([De, D]);
981
+ return c === null ? null : [c[0], ""];
982
+ }
983
+ const Pe = r([function() {
984
+ const c = s([r([ge, Re, me]), i(0, b)]);
985
+ return c === null ? null : c[0].concat(c[1]);
986
986
  }, function() {
987
- const i = s([oe, u(0, b)]);
988
- return i === null ? null : [i[0]].concat(i[1]);
989
- }]), Se = o("{{"), _e = o("}}"), Ee = o("[["), h = o("]]"), Ce = o("["), Ae = o("]");
990
- function fe() {
991
- const i = s([Se, Fe, _e]);
992
- return i === null ? null : i[1];
993
- }
994
- function ye() {
995
- const i = s([u(1, G), B, u(1, j)]);
996
- return i === null ? null : [["CONCAT"].concat(i[0]), ["CONCAT"].concat(i[2])];
987
+ const c = s([De, i(0, b)]);
988
+ return c === null ? null : [c[0]].concat(c[1]);
989
+ }]), Le = u("{{"), qe = u("}}"), Te = u("[["), Oe = u("]]"), Ie = u("["), ze = u("]");
990
+ function ve() {
991
+ const c = s([Le, Pe, qe]);
992
+ return c === null ? null : c[1];
997
993
  }
998
- function Te() {
999
- const i = s([u(1, G)]);
1000
- return i === null ? null : [["CONCAT"].concat(i[0])];
1001
- }
1002
- const w = r([ye, Te]);
1003
- function C() {
1004
- let i = null;
1005
- const d = s([Ee, w, h]);
1006
- if (d !== null) {
1007
- const y = d[1];
1008
- i = ["WIKILINK"].concat(y);
994
+ function xe() {
995
+ const c = s([i(1, H), $, i(1, q)]);
996
+ return c === null ? null : [["CONCAT"].concat(c[0]), ["CONCAT"].concat(c[2])];
997
+ }
998
+ function Se() {
999
+ const c = s([i(1, H)]);
1000
+ return c === null ? null : [["CONCAT"].concat(c[0])];
1001
+ }
1002
+ const A = r([xe, Se]);
1003
+ function v() {
1004
+ let c = null;
1005
+ const m = s([Te, A, Oe]);
1006
+ if (m !== null) {
1007
+ const O = m[1];
1008
+ c = ["WIKILINK"].concat(O);
1009
1009
  }
1010
- return i;
1011
- }
1012
- function _() {
1013
- let i = null;
1014
- const d = s([Ce, u(1, J), v, u(1, j), Ae]);
1015
- return d !== null && (i = ["EXTLINK", d[1].length === 1 ? d[1][0] : ["CONCAT"].concat(d[1]), ["CONCAT"].concat(d[3])]), i;
1016
- }
1017
- const N = l(/^[A-Za-z]+/);
1018
- function R(i, d, y, A = { allowedHtmlElements: ["b", "bdi", "del", "i", "ins", "u", "font", "big", "small", "sub", "sup", "h1", "h2", "h3", "h4", "h5", "h6", "cite", "code", "em", "s", "strike", "strong", "tt", "var", "div", "center", "blockquote", "ol", "ul", "dl", "table", "caption", "pre", "ruby", "rb", "rp", "rt", "rtc", "p", "span", "abbr", "dfn", "kbd", "samp", "data", "time", "mark", "li", "dt", "dd"], allowedHtmlCommonAttributes: ["id", "class", "style", "lang", "dir", "title", "aria-describedby", "aria-flowto", "aria-hidden", "aria-label", "aria-labelledby", "aria-owns", "role", "about", "property", "resource", "datatype", "typeof", "itemid", "itemprop", "itemref", "itemscope", "itemtype"], allowedHtmlAttributesByElement: {} }) {
1019
- if (i = i.toLowerCase(), d = d.toLowerCase(), i !== d || A.allowedHtmlElements.indexOf(i) === -1) return !1;
1020
- const q = /[\000-\010\013\016-\037\177]|expression|filter\s*:|accelerator\s*:|-o-link\s*:|-o-link-source\s*:|-o-replace\s*:|url\s*\(|image\s*\(|image-set\s*\(/i;
1021
- for (let m = 0, c = y.length; m < c; m += 2) {
1022
- const g = y[m];
1023
- if (A.allowedHtmlCommonAttributes.indexOf(g) === -1 && (A.allowedHtmlAttributesByElement[i] || []).indexOf(g) === -1 || g === "style" && y[m + 1].search(q) !== -1) return !1;
1010
+ return c;
1011
+ }
1012
+ function S() {
1013
+ let c = null;
1014
+ const m = s([Ie, i(1, V), C, i(1, q), ze]);
1015
+ return m !== null && (c = ["EXTLINK", m[1].length === 1 ? m[1][0] : ["CONCAT"].concat(m[1]), ["CONCAT"].concat(m[3])]), c;
1016
+ }
1017
+ const R = l(/^[A-Za-z]+/);
1018
+ function d(c, m, O, x = { allowedHtmlElements: ["b", "bdi", "del", "i", "ins", "u", "font", "big", "small", "sub", "sup", "h1", "h2", "h3", "h4", "h5", "h6", "cite", "code", "em", "s", "strike", "strong", "tt", "var", "div", "center", "blockquote", "ol", "ul", "dl", "table", "caption", "pre", "ruby", "rb", "rp", "rt", "rtc", "p", "span", "abbr", "dfn", "kbd", "samp", "data", "time", "mark", "li", "dt", "dd"], allowedHtmlCommonAttributes: ["id", "class", "style", "lang", "dir", "title", "aria-describedby", "aria-flowto", "aria-hidden", "aria-label", "aria-labelledby", "aria-owns", "role", "about", "property", "resource", "datatype", "typeof", "itemid", "itemprop", "itemref", "itemscope", "itemtype"], allowedHtmlAttributesByElement: {} }) {
1019
+ if (c = c.toLowerCase(), m = m.toLowerCase(), c !== m || x.allowedHtmlElements.indexOf(c) === -1) return !1;
1020
+ const ee = /[\000-\010\013\016-\037\177]|expression|filter\s*:|accelerator\s*:|-o-link\s*:|-o-link-source\s*:|-o-replace\s*:|url\s*\(|image\s*\(|image-set\s*\(/i;
1021
+ for (let re = 0, se = O.length; re < se; re += 2) {
1022
+ const fe = O[re];
1023
+ if (x.allowedHtmlCommonAttributes.indexOf(fe) === -1 && (x.allowedHtmlAttributesByElement[c] || []).indexOf(fe) === -1 || fe === "style" && O[re + 1].search(ee) !== -1) return !1;
1024
1024
  }
1025
1025
  return !0;
1026
1026
  }
1027
- function P() {
1028
- const i = l(/^[^"]*/), d = s([z, i, z]);
1029
- return d === null ? null : d[1];
1027
+ function _() {
1028
+ const c = l(/^[^"]*/), m = s([L, c, L]);
1029
+ return m === null ? null : m[1];
1030
1030
  }
1031
- function M() {
1032
- const i = l(/^[^']*/), d = s([H, i, H]);
1033
- return d === null ? null : d[1];
1031
+ function z() {
1032
+ const c = l(/^[^']*/), m = s([W, c, W]);
1033
+ return m === null ? null : m[1];
1034
1034
  }
1035
- function L() {
1036
- const i = l(/^\s*=\s*/), d = s([v, N, i, r([P, M])]);
1037
- return d === null ? null : [d[1], d[3]];
1035
+ function P() {
1036
+ const c = l(/^\s*=\s*/), m = s([C, R, c, r([_, z])]);
1037
+ return m === null ? null : [m[1], m[3]];
1038
1038
  }
1039
1039
  function T() {
1040
- const i = u(0, L)();
1041
- return Array.prototype.concat.apply(["HTMLATTRIBUTES"], i);
1042
- }
1043
- function X() {
1044
- let i = null;
1045
- const d = n, y = o("<"), A = l(/^\/?/), q = l(/^\s*>/), m = s([y, N, T, A, q]);
1046
- if (m === null) return null;
1047
- const c = n, g = m[1], O = u(0, j)(), ze = n, Ne = o("</"), it = s([Ne, N, q]);
1048
- if (it === null) return ["CONCAT", e.slice(d, c)].concat(O);
1049
- const Lt = n, qt = it[1], at = m[2], Ut = at.slice(1);
1050
- if (R(g, qt, Ut)) i = ["HTMLELEMENT", g, at].concat(O);
1040
+ const c = i(0, P)();
1041
+ return Array.prototype.concat.apply(["HTMLATTRIBUTES"], c);
1042
+ }
1043
+ function Q() {
1044
+ let c = null;
1045
+ const m = n, O = u("<"), x = l(/^\/?/), ee = l(/^\s*>/), re = s([O, R, T, x, ee]);
1046
+ if (re === null) return null;
1047
+ const se = n, fe = re[1], $e = i(0, q)(), nt = n, o = u("</"), g = s([o, R, ee]);
1048
+ if (g === null) return ["CONCAT", e.slice(m, se)].concat($e);
1049
+ const E = n, oe = g[1], Be = re[2], M = Be.slice(1);
1050
+ if (d(fe, oe, M)) c = ["HTMLELEMENT", fe, Be].concat($e);
1051
1051
  else {
1052
- const ot = (Jt) => Jt.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
1053
- i = ["CONCAT", ot(e.slice(d, c))].concat(O, ot(e.slice(ze, Lt)));
1052
+ const a = (h) => h.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
1053
+ c = ["CONCAT", a(e.slice(m, se))].concat($e, a(e.slice(nt, E)));
1054
1054
  }
1055
- return i;
1055
+ return c;
1056
1056
  }
1057
- const J = r([fe, ae, C, _, De]), j = r([fe, ae, C, _, X, he]), G = r([fe, ae, U]);
1058
- function re() {
1059
- const i = u(0, j)();
1060
- return i === null ? null : ["CONCAT"].concat(i);
1057
+ const V = r([ve, pe, v, S, Ae]), q = r([ve, pe, v, S, Q, we]), H = r([ve, pe, J]);
1058
+ function ne() {
1059
+ const c = i(0, q)();
1060
+ return c === null ? null : ["CONCAT"].concat(c);
1061
1061
  }
1062
- const a = re();
1063
- if (a === null || n !== e.length) throw new Error("Parse error at position " + n.toString() + " in input: " + e);
1064
- return a;
1062
+ const U = ne();
1063
+ if (U === null || n !== e.length) throw new Error("Parse error at position " + n.toString() + " in input: " + e);
1064
+ return U;
1065
1065
  }
1066
- class Dt {
1066
+ class wt {
1067
1067
  constructor(t, { wikilinks: n = !1 } = {}) {
1068
- this.locale = Be(t), this.wikilinks = n, this.emitter = new _t(this.locale);
1068
+ this.locale = Me(t), this.wikilinks = n, this.emitter = new Rt(this.locale);
1069
1069
  }
1070
1070
  parse(t, n) {
1071
1071
  if (t.includes("{{") || t.includes("<") || this.wikilinks && t.includes("[")) {
1072
- const r = xi(t, { wikilinks: this.wikilinks });
1072
+ const r = Ia(t, { wikilinks: this.wikilinks });
1073
1073
  return this.emitter.emit(r, n);
1074
1074
  } else return this.simpleParse(t, n);
1075
1075
  }
1076
1076
  simpleParse(t, n) {
1077
1077
  return t.replace(/\$(\d+)/g, (r, s) => {
1078
- const u = parseInt(s, 10) - 1;
1079
- return n[u] !== void 0 ? n[u] : "$" + s;
1078
+ const i = parseInt(s, 10) - 1;
1079
+ return n[i] !== void 0 ? n[i] : "$" + s;
1080
1080
  });
1081
1081
  }
1082
1082
  }
1083
- class Si {
1083
+ class Pa {
1084
1084
  constructor() {
1085
1085
  this.sourceMap = /* @__PURE__ */ new Map();
1086
1086
  }
1087
1087
  load(t, n) {
1088
1088
  if (typeof t != "object") throw new Error("Invalid message source. Must be an object");
1089
- if (n = Be(n), n) {
1089
+ if (n = Me(n), n) {
1090
1090
  if (!/^[a-zA-Z0-9-]+$/.test(n)) throw new Error(`Invalid locale ${n}`);
1091
1091
  for (const r in t) if (r.indexOf("@") !== 0) {
1092
1092
  if (typeof t[r] == "object") return this.load(t);
@@ -1097,16 +1097,16 @@ class Si {
1097
1097
  } else for (n in t) this.load(t[n], n);
1098
1098
  }
1099
1099
  getMessage(t, n) {
1100
- const r = this.sourceMap.get(Be(n));
1100
+ const r = this.sourceMap.get(Me(n));
1101
1101
  return r ? r[t] : null;
1102
1102
  }
1103
1103
  hasLocale(t) {
1104
1104
  return this.sourceMap.has(t);
1105
1105
  }
1106
1106
  }
1107
- class _i {
1107
+ class za {
1108
1108
  constructor(t, { finalFallback: n = "en", messages: r = void 0, wikilinks: s = !1 } = {}) {
1109
- this.locale = Be(t), this.parser = new Dt(this.locale, { wikilinks: s }), this.messageStore = new Si(), r && this.load(r, this.locale), this.finalFallback = n, this.wikilinks = s;
1109
+ this.locale = Me(t), this.parser = new wt(this.locale, { wikilinks: s }), this.messageStore = new Pa(), r && this.load(r, this.locale), this.finalFallback = n, this.wikilinks = s;
1110
1110
  }
1111
1111
  load(t, n) {
1112
1112
  return this.messageStore.load(t, n || this.locale);
@@ -1115,31 +1115,31 @@ class _i {
1115
1115
  return this.parser.parse(this.getMessage(t), n);
1116
1116
  }
1117
1117
  setLocale(t) {
1118
- this.locale = Be(t), this.parser = new Dt(this.locale, { wikilinks: this.wikilinks });
1118
+ this.locale = Me(t), this.parser = new wt(this.locale, { wikilinks: this.wikilinks });
1119
1119
  }
1120
1120
  getFallbackLocales() {
1121
- return [...St[this.locale] || [], this.finalFallback];
1121
+ return [...jt[this.locale] || [], this.finalFallback];
1122
1122
  }
1123
1123
  getMessage(t) {
1124
1124
  let n = this.locale, r = 0;
1125
1125
  const s = this.getFallbackLocales(this.locale);
1126
1126
  for (; n; ) {
1127
- const u = n.split("-");
1128
- let o = u.length;
1127
+ const i = n.split("-");
1128
+ let u = i.length;
1129
1129
  do {
1130
- const l = u.slice(0, o).join("-"), v = this.messageStore.getMessage(t, l);
1131
- if (typeof v == "string") return v;
1132
- o--;
1133
- } while (o);
1130
+ const l = i.slice(0, u).join("-"), C = this.messageStore.getMessage(t, l);
1131
+ if (typeof C == "string") return C;
1132
+ u--;
1133
+ } while (u);
1134
1134
  n = s[r], r++;
1135
1135
  }
1136
1136
  return t;
1137
1137
  }
1138
1138
  registerParserPlugin(t, n) {
1139
- _t.prototype[t] = n;
1139
+ Rt.prototype[t] = n;
1140
1140
  }
1141
1141
  }
1142
- const Tt = {
1142
+ const Lt = {
1143
1143
  "@metadata": { authors: ["Mason Payne"], "last-updated": "2024-01-08", locale: "en" },
1144
1144
  "sa-login": "Login",
1145
1145
  "sa-username": "Email",
@@ -1191,6 +1191,7 @@ const Tt = {
1191
1191
  "sa-otp-send-code": "Send Code",
1192
1192
  "sa-otp-verify": "Verify Code",
1193
1193
  "sa-unknown-challenge": "Unknown challenge type.",
1194
+ "sa-complete-invite": "Complete Your Invitation",
1194
1195
  "sa-invite-otp": "Verification Code",
1195
1196
  "sa-invite-otp-hint": "Enter the code from your invite email",
1196
1197
  "sa-invite-password": "Choose a Password",
@@ -1224,7 +1225,7 @@ const Tt = {
1224
1225
  "sa-signup-webauthn-setup": "Set Up Passkey",
1225
1226
  "sa-signup-webauthn-done": "Skip for now",
1226
1227
  "sa-signup-webauthn-error": "Error setting up passkey. Please try again from your account settings."
1227
- }, Ti = {
1228
+ }, Na = {
1228
1229
  "@metadata": { authors: ["Mason Payne"], "last-updated": "2022-05-28", locale: "fr" },
1229
1230
  "sa-login": "Connexion",
1230
1231
  "sa-username": "Adresse e-mail",
@@ -1277,7 +1278,7 @@ const Tt = {
1277
1278
  "sa-signup-webauthn-setup": "Configurer la clé d'accès",
1278
1279
  "sa-signup-webauthn-done": "Ignorer pour l'instant",
1279
1280
  "sa-signup-webauthn-error": "Erreur lors de la configuration de la clé d'accès. Veuillez réessayer depuis les paramètres de votre compte."
1280
- }, Oi = {
1281
+ }, Ma = {
1281
1282
  "@metadata": { authors: ["Mason Payne"], "last-updated": "2022-05-28", locale: "es" },
1282
1283
  "sa-login": "Acceso",
1283
1284
  "sa-username": "Correo electrónico",
@@ -1328,7 +1329,7 @@ const Tt = {
1328
1329
  "sa-signup-webauthn-setup": "Configurar clave de acceso",
1329
1330
  "sa-signup-webauthn-done": "Omitir por ahora",
1330
1331
  "sa-signup-webauthn-error": "Error al configurar la clave de acceso. Intenta de nuevo desde la configuración de tu cuenta."
1331
- }, Ii = {
1332
+ }, ja = {
1332
1333
  "@metadata": { authors: ["Mason Payne"], "last-updated": "2022-05-28", locale: "ja" },
1333
1334
  "sa-login": "ログイン",
1334
1335
  "sa-username": "メールアドレス",
@@ -1381,51 +1382,51 @@ const Tt = {
1381
1382
  "sa-signup-webauthn-setup": "パスキーを設定",
1382
1383
  "sa-signup-webauthn-done": "今はスキップ",
1383
1384
  "sa-signup-webauthn-error": "パスキーの設定中にエラーが発生しました。アカウント設定から再試行してください。"
1384
- }, Pi = {
1385
- en: Tt,
1386
- fr: Ti,
1387
- es: Oi,
1388
- ja: Ii
1385
+ }, Ra = {
1386
+ en: Lt,
1387
+ fr: Na,
1388
+ es: Ma,
1389
+ ja
1389
1390
  };
1390
- function ut(e) {
1391
- const t = new _i("en", {
1392
- messages: Tt
1391
+ function pt(e) {
1392
+ const t = new za("en", {
1393
+ messages: Lt
1393
1394
  });
1394
- return e !== "en" && (t.load(Pi[e], e), t.setLocale(e)), t;
1395
+ return e !== "en" && (t.load(Ra[e], e), t.setLocale(e)), t;
1395
1396
  }
1396
- function Ot(e) {
1397
- const t = "==".slice(0, (4 - e.length % 4) % 4), n = e.replace(/-/g, "+").replace(/_/g, "/") + t, r = atob(n), s = new ArrayBuffer(r.length), u = new Uint8Array(s);
1398
- for (let o = 0; o < r.length; o++)
1399
- u[o] = r.charCodeAt(o);
1397
+ function qt(e) {
1398
+ const t = "==".slice(0, (4 - e.length % 4) % 4), n = e.replace(/-/g, "+").replace(/_/g, "/") + t, r = atob(n), s = new ArrayBuffer(r.length), i = new Uint8Array(s);
1399
+ for (let u = 0; u < r.length; u++)
1400
+ i[u] = r.charCodeAt(u);
1400
1401
  return s;
1401
1402
  }
1402
- function It(e) {
1403
+ function Ut(e) {
1403
1404
  const t = new Uint8Array(e);
1404
1405
  let n = "";
1405
- for (const u of t)
1406
- n += String.fromCharCode(u);
1406
+ for (const i of t)
1407
+ n += String.fromCharCode(i);
1407
1408
  return btoa(n).replace(/\+/g, "-").replace(
1408
1409
  /\//g,
1409
1410
  "_"
1410
1411
  ).replace(/=/g, "");
1411
1412
  }
1412
- var S = "copy", de = "convert";
1413
- function ke(e, t, n) {
1414
- if (t === S)
1413
+ var I = "copy", be = "convert";
1414
+ function je(e, t, n) {
1415
+ if (t === I)
1415
1416
  return n;
1416
- if (t === de)
1417
+ if (t === be)
1417
1418
  return e(n);
1418
1419
  if (t instanceof Array)
1419
- return n.map((r) => ke(e, t[0], r));
1420
+ return n.map((r) => je(e, t[0], r));
1420
1421
  if (t instanceof Object) {
1421
1422
  const r = {};
1422
- for (const [s, u] of Object.entries(t)) {
1423
- if (u.derive) {
1424
- const o = u.derive(n);
1425
- o !== void 0 && (n[s] = o);
1423
+ for (const [s, i] of Object.entries(t)) {
1424
+ if (i.derive) {
1425
+ const u = i.derive(n);
1426
+ u !== void 0 && (n[s] = u);
1426
1427
  }
1427
1428
  if (!(s in n)) {
1428
- if (u.required)
1429
+ if (i.required)
1429
1430
  throw new Error(`Missing key: ${s}`);
1430
1431
  continue;
1431
1432
  }
@@ -1433,153 +1434,153 @@ function ke(e, t, n) {
1433
1434
  r[s] = null;
1434
1435
  continue;
1435
1436
  }
1436
- r[s] = ke(
1437
+ r[s] = je(
1437
1438
  e,
1438
- u.schema,
1439
+ i.schema,
1439
1440
  n[s]
1440
1441
  );
1441
1442
  }
1442
1443
  return r;
1443
1444
  }
1444
1445
  }
1445
- function Qe(e, t) {
1446
+ function ot(e, t) {
1446
1447
  return {
1447
1448
  required: !0,
1448
1449
  schema: e,
1449
1450
  derive: t
1450
1451
  };
1451
1452
  }
1452
- function I(e) {
1453
+ function j(e) {
1453
1454
  return {
1454
1455
  required: !0,
1455
1456
  schema: e
1456
1457
  };
1457
1458
  }
1458
- function V(e) {
1459
+ function K(e) {
1459
1460
  return {
1460
1461
  required: !1,
1461
1462
  schema: e
1462
1463
  };
1463
1464
  }
1464
- var Pt = {
1465
- type: I(S),
1466
- id: I(de),
1467
- transports: V(S)
1468
- }, zt = {
1469
- appid: V(S),
1470
- appidExclude: V(S),
1471
- credProps: V(S)
1472
- }, Nt = {
1473
- appid: V(S),
1474
- appidExclude: V(S),
1475
- credProps: V(S)
1476
- }, zi = {
1477
- publicKey: I({
1478
- rp: I(S),
1479
- user: I({
1480
- id: I(de),
1481
- name: I(S),
1482
- displayName: I(S)
1465
+ var Jt = {
1466
+ type: j(I),
1467
+ id: j(be),
1468
+ transports: K(I)
1469
+ }, Vt = {
1470
+ appid: K(I),
1471
+ appidExclude: K(I),
1472
+ credProps: K(I)
1473
+ }, Kt = {
1474
+ appid: K(I),
1475
+ appidExclude: K(I),
1476
+ credProps: K(I)
1477
+ }, La = {
1478
+ publicKey: j({
1479
+ rp: j(I),
1480
+ user: j({
1481
+ id: j(be),
1482
+ name: j(I),
1483
+ displayName: j(I)
1483
1484
  }),
1484
- challenge: I(de),
1485
- pubKeyCredParams: I(S),
1486
- timeout: V(S),
1487
- excludeCredentials: V([Pt]),
1488
- authenticatorSelection: V(S),
1489
- attestation: V(S),
1490
- extensions: V(zt)
1485
+ challenge: j(be),
1486
+ pubKeyCredParams: j(I),
1487
+ timeout: K(I),
1488
+ excludeCredentials: K([Jt]),
1489
+ authenticatorSelection: K(I),
1490
+ attestation: K(I),
1491
+ extensions: K(Vt)
1491
1492
  }),
1492
- signal: V(S)
1493
- }, Ni = {
1494
- type: I(S),
1495
- id: I(S),
1496
- rawId: I(de),
1497
- authenticatorAttachment: V(S),
1498
- response: I({
1499
- clientDataJSON: I(de),
1500
- attestationObject: I(de),
1501
- transports: Qe(
1502
- S,
1493
+ signal: K(I)
1494
+ }, qa = {
1495
+ type: j(I),
1496
+ id: j(I),
1497
+ rawId: j(be),
1498
+ authenticatorAttachment: K(I),
1499
+ response: j({
1500
+ clientDataJSON: j(be),
1501
+ attestationObject: j(be),
1502
+ transports: ot(
1503
+ I,
1503
1504
  (e) => {
1504
1505
  var t;
1505
1506
  return ((t = e.getTransports) == null ? void 0 : t.call(e)) || [];
1506
1507
  }
1507
1508
  )
1508
1509
  }),
1509
- clientExtensionResults: Qe(
1510
- Nt,
1510
+ clientExtensionResults: ot(
1511
+ Kt,
1511
1512
  (e) => e.getClientExtensionResults()
1512
1513
  )
1513
- }, Mi = {
1514
- mediation: V(S),
1515
- publicKey: I({
1516
- challenge: I(de),
1517
- timeout: V(S),
1518
- rpId: V(S),
1519
- allowCredentials: V([Pt]),
1520
- userVerification: V(S),
1521
- extensions: V(zt)
1514
+ }, Ua = {
1515
+ mediation: K(I),
1516
+ publicKey: j({
1517
+ challenge: j(be),
1518
+ timeout: K(I),
1519
+ rpId: K(I),
1520
+ allowCredentials: K([Jt]),
1521
+ userVerification: K(I),
1522
+ extensions: K(Vt)
1522
1523
  }),
1523
- signal: V(S)
1524
- }, ji = {
1525
- type: I(S),
1526
- id: I(S),
1527
- rawId: I(de),
1528
- authenticatorAttachment: V(S),
1529
- response: I({
1530
- clientDataJSON: I(de),
1531
- authenticatorData: I(de),
1532
- signature: I(de),
1533
- userHandle: I(de)
1524
+ signal: K(I)
1525
+ }, Ja = {
1526
+ type: j(I),
1527
+ id: j(I),
1528
+ rawId: j(be),
1529
+ authenticatorAttachment: K(I),
1530
+ response: j({
1531
+ clientDataJSON: j(be),
1532
+ authenticatorData: j(be),
1533
+ signature: j(be),
1534
+ userHandle: j(be)
1534
1535
  }),
1535
- clientExtensionResults: Qe(
1536
- Nt,
1536
+ clientExtensionResults: ot(
1537
+ Kt,
1537
1538
  (e) => e.getClientExtensionResults()
1538
1539
  )
1539
1540
  };
1540
- function Mt(e) {
1541
- return ke(Ot, zi, e);
1541
+ function Gt(e) {
1542
+ return je(qt, La, e);
1542
1543
  }
1543
- function Ri(e) {
1544
- return ke(
1545
- It,
1546
- Ni,
1544
+ function Va(e) {
1545
+ return je(
1546
+ Ut,
1547
+ qa,
1547
1548
  e
1548
1549
  );
1549
1550
  }
1550
- function Li(e) {
1551
- return ke(Ot, Mi, e);
1551
+ function Ka(e) {
1552
+ return je(qt, Ua, e);
1552
1553
  }
1553
- function qi(e) {
1554
- return ke(
1555
- It,
1556
- ji,
1554
+ function Ga(e) {
1555
+ return je(
1556
+ Ut,
1557
+ Ja,
1557
1558
  e
1558
1559
  );
1559
1560
  }
1560
- async function jt(e) {
1561
+ async function Ht(e) {
1561
1562
  const t = await navigator.credentials.create(
1562
1563
  e
1563
1564
  );
1564
- return t.toJSON = () => Ri(t), t;
1565
+ return t.toJSON = () => Va(t), t;
1565
1566
  }
1566
- async function Ui(e) {
1567
+ async function Ha(e) {
1567
1568
  const t = await navigator.credentials.get(
1568
1569
  e
1569
1570
  );
1570
- return t.toJSON = () => qi(t), t;
1571
+ return t.toJSON = () => Ga(t), t;
1571
1572
  }
1572
- function et(e) {
1573
+ function lt(e) {
1573
1574
  this.message = e;
1574
1575
  }
1575
- et.prototype = new Error(), et.prototype.name = "InvalidCharacterError";
1576
- var pt = typeof window < "u" && window.atob && window.atob.bind(window) || function(e) {
1576
+ lt.prototype = new Error(), lt.prototype.name = "InvalidCharacterError";
1577
+ var At = typeof window < "u" && window.atob && window.atob.bind(window) || function(e) {
1577
1578
  var t = String(e).replace(/=+$/, "");
1578
- if (t.length % 4 == 1) throw new et("'atob' failed: The string to be decoded is not correctly encoded.");
1579
- for (var n, r, s = 0, u = 0, o = ""; r = t.charAt(u++); ~r && (n = s % 4 ? 64 * n + r : r, s++ % 4) ? o += String.fromCharCode(255 & n >> (-2 * s & 6)) : 0) r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);
1580
- return o;
1579
+ if (t.length % 4 == 1) throw new lt("'atob' failed: The string to be decoded is not correctly encoded.");
1580
+ for (var n, r, s = 0, i = 0, u = ""; r = t.charAt(i++); ~r && (n = s % 4 ? 64 * n + r : r, s++ % 4) ? u += String.fromCharCode(255 & n >> (-2 * s & 6)) : 0) r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);
1581
+ return u;
1581
1582
  };
1582
- function Ji(e) {
1583
+ function Wa(e) {
1583
1584
  var t = e.replace(/-/g, "+").replace(/_/g, "/");
1584
1585
  switch (t.length % 4) {
1585
1586
  case 0:
@@ -1595,50 +1596,50 @@ function Ji(e) {
1595
1596
  }
1596
1597
  try {
1597
1598
  return function(n) {
1598
- return decodeURIComponent(pt(n).replace(/(.)/g, function(r, s) {
1599
- var u = s.charCodeAt(0).toString(16).toUpperCase();
1600
- return u.length < 2 && (u = "0" + u), "%" + u;
1599
+ return decodeURIComponent(At(n).replace(/(.)/g, function(r, s) {
1600
+ var i = s.charCodeAt(0).toString(16).toUpperCase();
1601
+ return i.length < 2 && (i = "0" + i), "%" + i;
1601
1602
  }));
1602
1603
  }(t);
1603
1604
  } catch {
1604
- return pt(t);
1605
+ return At(t);
1605
1606
  }
1606
1607
  }
1607
- function Ve(e) {
1608
+ function Qe(e) {
1608
1609
  this.message = e;
1609
1610
  }
1610
- function Vi(e, t) {
1611
- if (typeof e != "string") throw new Ve("Invalid token specified");
1611
+ function Za(e, t) {
1612
+ if (typeof e != "string") throw new Qe("Invalid token specified");
1612
1613
  var n = (t = t || {}).header === !0 ? 0 : 1;
1613
1614
  try {
1614
- return JSON.parse(Ji(e.split(".")[n]));
1615
+ return JSON.parse(Wa(e.split(".")[n]));
1615
1616
  } catch (r) {
1616
- throw new Ve("Invalid token specified: " + r.message);
1617
+ throw new Qe("Invalid token specified: " + r.message);
1617
1618
  }
1618
1619
  }
1619
- Ve.prototype = new Error(), Ve.prototype.name = "InvalidTokenError";
1620
- const je = "spartan-token";
1621
- function Rt() {
1622
- const e = localStorage.getItem(je);
1620
+ Qe.prototype = new Error(), Qe.prototype.name = "InvalidTokenError";
1621
+ const Ge = "spartan-token";
1622
+ function Wt() {
1623
+ const e = localStorage.getItem(Ge);
1623
1624
  let t = null;
1624
1625
  if (e)
1625
1626
  try {
1626
- if (t = Vi(e), t.exp > Gi())
1627
+ if (t = Za(e), t.exp > Xa())
1627
1628
  return t;
1628
- localStorage.removeItem(je);
1629
+ localStorage.removeItem(Ge);
1629
1630
  } catch (n) {
1630
- console.error("Error decoding token", n), localStorage.removeItem(je);
1631
+ console.error("Error decoding token", n), localStorage.removeItem(Ge);
1631
1632
  }
1632
1633
  return null;
1633
1634
  }
1634
- function Ki() {
1635
- const e = localStorage.getItem(je);
1635
+ function Ya() {
1636
+ const e = localStorage.getItem(Ge);
1636
1637
  return e || null;
1637
1638
  }
1638
- function Gi() {
1639
+ function Xa() {
1639
1640
  return Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3);
1640
1641
  }
1641
- var Hi = /* @__PURE__ */ F(`<form class=login-frame><style>.login-frame {
1642
+ var Qa = /* @__PURE__ */ F(`<form class=login-frame><style>.login-frame {
1642
1643
  display: flex;
1643
1644
  flex-direction: column;
1644
1645
  justify-content: center;
@@ -1749,8 +1750,26 @@ var Hi = /* @__PURE__ */ F(`<form class=login-frame><style>.login-frame {
1749
1750
  opacity: 0.6;
1750
1751
  cursor: not-allowed;
1751
1752
  }
1752
- </style><style></style><h1></h1><input type=text>`), Wi = /* @__PURE__ */ F("<span class=error-message>"), Ze = /* @__PURE__ */ F("<span>"), gt = /* @__PURE__ */ F("<input type=password>"), Ye = /* @__PURE__ */ F("<p>"), Zi = /* @__PURE__ */ F("<select>"), Yi = /* @__PURE__ */ F("<option> (<!>)"), Xi = /* @__PURE__ */ F("<input type=text>"), mt = /* @__PURE__ */ F("<input type=text autocomplete=one-time-code>"), Qi = /* @__PURE__ */ F("<input type=password autocomplete=new-password>"), ea = /* @__PURE__ */ F("<span class=checkbox-wrapper><input type=checkbox><span>&nbsp;"), ta = /* @__PURE__ */ F("<button type=submit>"), na = /* @__PURE__ */ F("<button type=button>"), Me = /* @__PURE__ */ F("<a class=centered-text href=#>"), ra = /* @__PURE__ */ F("<div class=social-divider><span>"), sa = /* @__PURE__ */ F("<button type=button class=social-btn>"), ua = /* @__PURE__ */ F('<svg width=18 height=18 viewBox="0 0 18 18"xmlns=http://www.w3.org/2000/svg><path d="M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"fill=#4285F4></path><path d="M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18z"fill=#34A853></path><path d="M3.964 10.707c-.18-.54-.282-1.117-.282-1.707s.102-1.167.282-1.707V4.961H.957C.347 6.175 0 7.548 0 9s.348 2.825.957 4.039l3.007-2.332z"fill=#FBBC05></path><path d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.961L3.964 7.293C4.672 5.166 6.656 3.58 9 3.58z"fill=#EA4335>'), ia = /* @__PURE__ */ F('<svg width=18 height=18 viewBox="0 0 16 16"xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"fill=currentColor>'), aa = /* @__PURE__ */ F('<svg width=18 height=18 viewBox="20 16 16 19"xmlns=http://www.w3.org/2000/svg><path d="M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z"fill=currentColor fill-rule=nonzero>'), oa = /* @__PURE__ */ F('<svg width=18 height=18 viewBox="0 0 24 24"xmlns=http://www.w3.org/2000/svg><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 4a3 3 0 110 6 3 3 0 010-6zm0 14c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08s5.97 1.09 6 3.08c-1.29 1.94-3.5 3.22-6 3.22z"fill=currentColor>');
1753
- const la = {
1753
+ .login-frame .success-message {
1754
+ color: green;
1755
+ margin: 10px 0;
1756
+ }
1757
+
1758
+ .login-frame .info-message {
1759
+ color: #666;
1760
+ margin: 10px 0;
1761
+ font-size: 0.9em;
1762
+ }
1763
+
1764
+ .login-frame .hint {
1765
+ color: #666;
1766
+ font-size: 0.85em;
1767
+ margin-top: 5px;
1768
+ margin-bottom: 0;
1769
+ display: block;
1770
+ }
1771
+ </style><style></style><h1>`), eu = /* @__PURE__ */ F("<span class=error-message>"), it = /* @__PURE__ */ F("<span>"), tu = /* @__PURE__ */ F("<input type=text autocomplete=one-time-code required>"), Et = /* @__PURE__ */ F("<span class=hint>"), nu = /* @__PURE__ */ F("<input type=password autocomplete=new-password required>"), Ft = /* @__PURE__ */ F("<button type=submit>"), ru = /* @__PURE__ */ F("<span class=info-message>"), su = /* @__PURE__ */ F("<span class=success-message>"), iu = /* @__PURE__ */ F("<input type=text autocomplete=username>"), au = /* @__PURE__ */ F("<input type=password autocomplete=current-password>"), at = /* @__PURE__ */ F("<p>"), uu = /* @__PURE__ */ F("<select>"), ou = /* @__PURE__ */ F("<option> (<!>)"), lu = /* @__PURE__ */ F("<input type=text>"), yt = /* @__PURE__ */ F("<input type=text autocomplete=one-time-code>"), $t = /* @__PURE__ */ F("<input type=password autocomplete=new-password>"), cu = /* @__PURE__ */ F("<span class=checkbox-wrapper><input type=checkbox><span>&nbsp;"), du = /* @__PURE__ */ F("<button type=button>"), Ke = /* @__PURE__ */ F("<a class=centered-text href=#>"), fu = /* @__PURE__ */ F("<div class=social-divider><span>"), hu = /* @__PURE__ */ F("<button type=button class=social-btn>"), pu = /* @__PURE__ */ F('<svg width=18 height=18 viewBox="0 0 18 18"xmlns=http://www.w3.org/2000/svg><path d="M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z"fill=#4285F4></path><path d="M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18z"fill=#34A853></path><path d="M3.964 10.707c-.18-.54-.282-1.117-.282-1.707s.102-1.167.282-1.707V4.961H.957C.347 6.175 0 7.548 0 9s.348 2.825.957 4.039l3.007-2.332z"fill=#FBBC05></path><path d="M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.961L3.964 7.293C4.672 5.166 6.656 3.58 9 3.58z"fill=#EA4335>'), Du = /* @__PURE__ */ F('<svg width=18 height=18 viewBox="0 0 16 16"xmlns=http://www.w3.org/2000/svg><path fill-rule=evenodd d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"fill=currentColor>'), gu = /* @__PURE__ */ F('<svg width=18 height=18 viewBox="20 16 16 19"xmlns=http://www.w3.org/2000/svg><path d="M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z"fill=currentColor fill-rule=nonzero>'), mu = /* @__PURE__ */ F('<svg width=18 height=18 viewBox="0 0 24 24"xmlns=http://www.w3.org/2000/svg><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 4a3 3 0 110 6 3 3 0 010-6zm0 14c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08s5.97 1.09 6 3.08c-1.29 1.94-3.5 3.22-6 3.22z"fill=currentColor>');
1772
+ const bu = {
1754
1773
  domain: "http://127.0.0.1:11000",
1755
1774
  sector: "0ad5c3e5-0186-4557-8b32-4b36f247bf09",
1756
1775
  // defaults to the admin sector
@@ -1759,27 +1778,27 @@ const la = {
1759
1778
  locale: "en",
1760
1779
  redirect: ""
1761
1780
  };
1762
- st("spartan-login", la, (e) => {
1763
- const [t, n] = E((e.startMode || "password").toLowerCase()), [r, s] = E(""), [u, o] = E(""), [l, v] = E(""), [B, D] = E(""), [x] = E(e.redirect), [te, ue] = E(!1), [ge, z] = E(!1), [H, W] = E(!1), [ne, K] = E(""), [Q, U] = E(""), [he, me] = E([]), [De, k] = E(""), [Y, be] = E([]), [ae, oe] = E(""), [b, pe] = E(!1), [xe, le] = E(!1), [Fe, Se] = E(""), [_e, Ee] = E(""), h = ut(e.locale);
1764
- let Ce, Ae;
1781
+ ht("spartan-login", bu, (e) => {
1782
+ const [t, n] = w((e.startMode || "password").toLowerCase()), [r, s] = w(""), [i, u] = w(""), [l, C] = w(""), [$, D] = w(""), [B] = w(e.redirect), [ae, de] = w(!1), [Ee, L] = w(!1), [W, Z] = w(!1), [ue, G] = w(""), [te, J] = w(""), [we, Fe] = w([]), [Ae, k] = w(""), [X, ye] = w([]), [pe, De] = w(""), [b, ge] = w(!1), [Re, me] = w(!1), [Pe, Le] = w(""), [qe, Te] = w(""), [Oe, Ie] = w(""), [ze, ve] = w(""), [xe, Se] = w(""), [A, v] = w(""), [S, R] = w(!1), d = pt(e.locale);
1783
+ let _, z;
1765
1784
  try {
1766
- Ae = e.styles;
1785
+ z = e.styles;
1767
1786
  } catch {
1768
- Ae = "";
1787
+ z = "";
1769
1788
  }
1770
- console.log(Ae), tt(async () => {
1771
- const a = new URLSearchParams(window.location.search);
1772
- if (a.get("error")) {
1789
+ console.log(z), ct(async () => {
1790
+ const o = new URLSearchParams(window.location.search);
1791
+ if (o.get("error")) {
1773
1792
  history.replaceState({}, "", window.location.pathname);
1774
- const A = a.get("error_description");
1775
- D(A || h.i18n("sa-social-error")), fe(), ye();
1793
+ const M = o.get("error_description");
1794
+ D(M || d.i18n("sa-social-error")), P(), T();
1776
1795
  return;
1777
1796
  }
1778
- const d = a.get("code");
1779
- if (d) {
1780
- history.replaceState({}, "", window.location.pathname);
1797
+ const E = o.get("code");
1798
+ if (E) {
1799
+ history.replaceState({}, "", window.location.pathname), ge(!0);
1781
1800
  try {
1782
- const A = await fetch(`${e.domain}/api/v1/oauth/exchange`, {
1801
+ const M = await fetch(`${e.domain}/api/v1/oauth/exchange`, {
1783
1802
  method: "POST",
1784
1803
  mode: "cors",
1785
1804
  cache: "no-cache",
@@ -1787,30 +1806,39 @@ st("spartan-login", la, (e) => {
1787
1806
  "Content-Type": "application/json"
1788
1807
  },
1789
1808
  body: JSON.stringify({
1790
- code: d
1809
+ code: E
1791
1810
  })
1792
1811
  });
1793
- if (!A.ok) throw new Error(h.i18n("sa-social-error"));
1794
- const q = await A.json();
1795
- localStorage.setItem("spartan-token", q.token), Ce.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login", {
1812
+ if (!M.ok) throw new Error(d.i18n("sa-social-error"));
1813
+ const a = await M.json();
1814
+ localStorage.setItem("spartan-token", a.token), _.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login", {
1796
1815
  bubbles: !0,
1797
1816
  cancelable: !0,
1798
1817
  detail: {
1799
- token: q.token
1818
+ token: a.token
1800
1819
  }
1801
- })), e.redirect !== "" && (window.location.href = e.redirect);
1802
- } catch (A) {
1803
- D(A.message || h.i18n("sa-social-error"));
1820
+ })), e.redirect !== "" ? window.location.href = e.redirect : (ge(!1), P(), T());
1821
+ } catch (M) {
1822
+ D(M.message || d.i18n("sa-social-error")), ge(!1), P(), T();
1804
1823
  }
1805
1824
  return;
1806
1825
  }
1807
- if (Rt() && e.redirect !== "" && window.location.pathname !== e.redirect) {
1826
+ const oe = o.get("sub");
1827
+ if (oe) {
1828
+ Ie(oe);
1829
+ const M = o.get("email");
1830
+ M && ve(M);
1831
+ const h = new URLSearchParams(window.location.hash.replace(/^#/, "")).get("otp");
1832
+ h && Se(h), n("invite");
1833
+ return;
1834
+ }
1835
+ if (Wt() && e.redirect !== "" && window.location.pathname !== e.redirect) {
1808
1836
  window.location.href = e.redirect;
1809
1837
  return;
1810
1838
  }
1811
- fe(), ye();
1839
+ P(), T();
1812
1840
  });
1813
- function fe() {
1841
+ function P() {
1814
1842
  fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`, {
1815
1843
  method: "GET",
1816
1844
  mode: "cors",
@@ -1818,35 +1846,35 @@ st("spartan-login", la, (e) => {
1818
1846
  headers: {
1819
1847
  "Content-Type": "application/json"
1820
1848
  }
1821
- }).then((a) => {
1822
- if (a.ok)
1823
- return a.json();
1849
+ }).then((o) => {
1850
+ if (o.ok)
1851
+ return o.json();
1824
1852
  throw new Error("Network response was not ok.");
1825
- }).then((a) => {
1826
- console.log(a), ue(a.SelfSignUpAllowed), le(a.MFARequired || !1);
1827
- }).catch((a) => {
1828
- console.log(a), D(a.message);
1853
+ }).then((o) => {
1854
+ console.log(o), de(o.SelfSignUpAllowed), me(o.MFARequired || !1);
1855
+ }).catch((o) => {
1856
+ console.log(o), D(o.message);
1829
1857
  });
1830
1858
  }
1831
- function ye() {
1859
+ function T() {
1832
1860
  fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`, {
1833
1861
  method: "GET",
1834
1862
  mode: "cors",
1835
1863
  cache: "no-cache"
1836
- }).then((a) => {
1837
- if (a.ok) return a.json();
1864
+ }).then((o) => {
1865
+ if (o.ok) return o.json();
1838
1866
  throw new Error("Failed to load social providers");
1839
- }).then((a) => {
1840
- const i = (a.providers || []).filter((d) => d.enabled);
1841
- be(i);
1867
+ }).then((o) => {
1868
+ const g = (o.providers || []).filter((E) => E.enabled);
1869
+ ye(g);
1842
1870
  }).catch(() => {
1843
1871
  });
1844
1872
  }
1845
- function Te(a) {
1846
- if (ae()) return;
1847
- oe(a), D("");
1848
- const i = window.location.origin + window.location.pathname;
1849
- fetch(`${e.domain}/api/v1/oauth/${a}/initiate`, {
1873
+ function Q(o) {
1874
+ if (pe()) return;
1875
+ De(o), D("");
1876
+ const g = window.location.origin + window.location.pathname;
1877
+ fetch(`${e.domain}/api/v1/oauth/${o}/initiate`, {
1850
1878
  method: "POST",
1851
1879
  mode: "cors",
1852
1880
  cache: "no-cache",
@@ -1855,19 +1883,19 @@ st("spartan-login", la, (e) => {
1855
1883
  },
1856
1884
  body: JSON.stringify({
1857
1885
  sectorID: e.sector,
1858
- redirectURI: i
1886
+ redirectURI: g
1859
1887
  })
1860
- }).then((d) => {
1861
- if (d.ok) return d.json();
1862
- throw new Error(h.i18n("sa-social-error"));
1863
- }).then((d) => {
1864
- window.location.href = d.authURL;
1865
- }).catch((d) => {
1866
- oe(""), D(d.message);
1888
+ }).then((E) => {
1889
+ if (E.ok) return E.json();
1890
+ throw new Error(d.i18n("sa-social-error"));
1891
+ }).then((E) => {
1892
+ window.location.href = E.authURL;
1893
+ }).catch((E) => {
1894
+ De(""), D(E.message);
1867
1895
  });
1868
1896
  }
1869
- function w(a, i) {
1870
- return D(""), Ee(i), fetch(`${e.domain}/api/v1/signup/mfa/begin`, {
1897
+ function V(o, g) {
1898
+ return D(""), Te(g), fetch(`${e.domain}/api/v1/signup/mfa/begin`, {
1871
1899
  method: "POST",
1872
1900
  mode: "cors",
1873
1901
  cache: "no-cache",
@@ -1875,20 +1903,20 @@ st("spartan-login", la, (e) => {
1875
1903
  "Content-Type": "application/json"
1876
1904
  },
1877
1905
  body: JSON.stringify({
1878
- email: a,
1906
+ email: o,
1879
1907
  sectorID: e.sector,
1880
- transactionId: i
1908
+ transactionId: g
1881
1909
  })
1882
- }).then((d) => {
1883
- if (!d.ok)
1884
- throw new Error(h.i18n("sa-signup-verify-error"));
1910
+ }).then((E) => {
1911
+ if (!E.ok)
1912
+ throw new Error(d.i18n("sa-signup-verify-error"));
1885
1913
  }).then(() => {
1886
1914
  n("signup-verify");
1887
- }).catch((d) => {
1888
- D(d.message);
1915
+ }).catch((E) => {
1916
+ D(E.message);
1889
1917
  });
1890
1918
  }
1891
- function C() {
1919
+ function q() {
1892
1920
  return D(""), fetch(`${e.domain}/api/v1/signup/mfa/verify`, {
1893
1921
  method: "POST",
1894
1922
  mode: "cors",
@@ -1900,92 +1928,92 @@ st("spartan-login", la, (e) => {
1900
1928
  email: r(),
1901
1929
  code: l().toUpperCase().trim(),
1902
1930
  sectorID: e.sector,
1903
- transactionId: _e()
1931
+ transactionId: qe()
1904
1932
  })
1905
- }).then((a) => {
1906
- if (a.ok) return a.json();
1907
- throw a.status === 400 ? new Error(h.i18n("sa-signup-verify-error")) : new Error(h.i18n("sa-signup-verify-error"));
1908
- }).then((a) => {
1909
- Se(a.token), localStorage.setItem("spartan-token", a.token), Ce.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login", {
1933
+ }).then((o) => {
1934
+ if (o.ok) return o.json();
1935
+ throw o.status === 400 ? new Error(d.i18n("sa-signup-verify-error")) : new Error(d.i18n("sa-signup-verify-error"));
1936
+ }).then((o) => {
1937
+ Le(o.token), localStorage.setItem("spartan-token", o.token), _.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login", {
1910
1938
  bubbles: !0,
1911
1939
  cancelable: !0,
1912
1940
  detail: {
1913
- token: a.token
1941
+ token: o.token
1914
1942
  }
1915
- })), v(""), n("signup-webauthn");
1916
- }).catch((a) => {
1917
- D(a.message);
1943
+ })), C(""), n("signup-webauthn");
1944
+ }).catch((o) => {
1945
+ D(o.message);
1918
1946
  });
1919
1947
  }
1920
- function _() {
1921
- b() || (pe(!0), D(""), fetch(`${e.domain}/api/v1/webauthn/registration/begin`, {
1948
+ function H() {
1949
+ b() || (ge(!0), D(""), fetch(`${e.domain}/api/v1/webauthn/registration/begin`, {
1922
1950
  method: "POST",
1923
1951
  mode: "cors",
1924
1952
  cache: "no-cache",
1925
1953
  headers: {
1926
1954
  "Content-Type": "application/json",
1927
- Authorization: `bearer ${Fe()}`
1955
+ Authorization: `bearer ${Pe()}`
1928
1956
  },
1929
1957
  body: JSON.stringify({
1930
1958
  keyName: "Default",
1931
1959
  sectorID: e.sector
1932
1960
  })
1933
- }).then((a) => {
1934
- if (!a.ok) throw new Error(h.i18n("sa-signup-webauthn-error"));
1935
- return a.json();
1936
- }).then((a) => {
1937
- const i = Mt(a.Options);
1938
- return jt(i).then((d) => {
1939
- let y = JSON.parse(JSON.stringify(d));
1940
- return y.transactionID = a.TransactionID, y;
1961
+ }).then((o) => {
1962
+ if (!o.ok) throw new Error(d.i18n("sa-signup-webauthn-error"));
1963
+ return o.json();
1964
+ }).then((o) => {
1965
+ const g = Gt(o.Options);
1966
+ return Ht(g).then((E) => {
1967
+ let oe = JSON.parse(JSON.stringify(E));
1968
+ return oe.transactionID = o.TransactionID, oe;
1941
1969
  });
1942
- }).then((a) => fetch(`${e.domain}/api/v1/webauthn/registration/finish`, {
1970
+ }).then((o) => fetch(`${e.domain}/api/v1/webauthn/registration/finish`, {
1943
1971
  method: "POST",
1944
1972
  mode: "cors",
1945
1973
  cache: "no-cache",
1946
1974
  headers: {
1947
1975
  "Content-Type": "application/json",
1948
- Authorization: `bearer ${Fe()}`
1976
+ Authorization: `bearer ${Pe()}`
1949
1977
  },
1950
- body: JSON.stringify(a)
1951
- })).then((a) => {
1952
- if (!a.ok) throw new Error(h.i18n("sa-signup-webauthn-error"));
1953
- N();
1954
- }).catch((a) => {
1955
- D((a == null ? void 0 : a.message) || String(a));
1978
+ body: JSON.stringify(o)
1979
+ })).then((o) => {
1980
+ if (!o.ok) throw new Error(d.i18n("sa-signup-webauthn-error"));
1981
+ ne();
1982
+ }).catch((o) => {
1983
+ D((o == null ? void 0 : o.message) || String(o));
1956
1984
  }).finally(() => {
1957
- pe(!1);
1985
+ ge(!1);
1958
1986
  }));
1959
1987
  }
1960
- function N() {
1988
+ function ne() {
1961
1989
  n(e.startMode), e.redirect !== "" && (window.location.href = e.redirect);
1962
1990
  }
1963
- function R() {
1964
- return console.log("login"), D(""), t() === "password" ? L() : t() === "webauthn" ? M() : t() === "otp-pick" ? J(De()) : t() === "otp" ? j() : t() === "reset-email" ? G() : t() === "reset-code" ? re() : Promise.resolve();
1991
+ function U() {
1992
+ return console.log("login"), D(""), t() === "password" ? O() : t() === "webauthn" ? m() : t() === "otp-pick" ? re(Ae()) : t() === "otp" ? se() : t() === "reset-email" ? fe() : t() === "reset-code" ? $e() : Promise.resolve();
1965
1993
  }
1966
- function P() {
1967
- return console.log("signup"), D(""), z(!1), fetch(`${e.domain}/api/v1/users`, {
1994
+ function c() {
1995
+ return console.log("signup"), D(""), L(!1), fetch(`${e.domain}/api/v1/users`, {
1968
1996
  method: "POST",
1969
1997
  mode: "cors",
1970
1998
  cache: "no-cache",
1971
1999
  body: JSON.stringify({
1972
2000
  username: r(),
1973
- password: u(),
2001
+ password: i(),
1974
2002
  sectorID: e.sector
1975
2003
  })
1976
- }).then((a) => {
1977
- if (a.ok)
1978
- return a.json();
1979
- throw new Error(h.i18n("sa-error-creating-user"));
1980
- }).then((a) => {
1981
- if (console.log(a), xe())
1982
- return w(r(), a.enrollmentTransactionId || "");
1983
- z(!0), n(e.startMode);
1984
- }).catch((a) => {
1985
- z(!1), D(a.message), console.log(a);
2004
+ }).then((o) => {
2005
+ if (o.ok)
2006
+ return o.json();
2007
+ throw new Error(d.i18n("sa-error-creating-user"));
2008
+ }).then((o) => {
2009
+ if (console.log(o), Re())
2010
+ return V(r(), o.enrollmentTransactionId || "");
2011
+ L(!0), n(e.startMode);
2012
+ }).catch((o) => {
2013
+ L(!1), D(o.message), console.log(o);
1986
2014
  });
1987
2015
  }
1988
- function M() {
2016
+ function m() {
1989
2017
  return console.log("webauthnLogin"), fetch(`${e.domain}/api/v1/login/webauthn/begin`, {
1990
2018
  method: "POST",
1991
2019
  mode: "cors",
@@ -1994,114 +2022,114 @@ st("spartan-login", la, (e) => {
1994
2022
  username: r(),
1995
2023
  sectorID: e.sector
1996
2024
  })
1997
- }).then((a) => {
1998
- if (a.ok)
1999
- return a.json();
2000
- throw a.status === 401 ? (n("password"), D(h.i18n("webauthn-not-enrolled")), new Error(h.i18n("webauthn-not-enrolled"))) : new Error(`${a.status} ${a.statusText}: Network response was not ok.`);
2001
- }).then((a) => {
2002
- console.log(a);
2003
- const i = Li(a.CredentialAssertion);
2004
- return console.log("Parsed WebAuthn request options:", i), Ui(i).then((d) => {
2005
- const y = JSON.stringify(d);
2006
- let A = JSON.parse(y);
2007
- return A.transactionID = a.TransactionID, A;
2025
+ }).then((o) => {
2026
+ if (o.ok)
2027
+ return o.json();
2028
+ throw o.status === 401 ? (n("password"), D(d.i18n("webauthn-not-enrolled")), new Error(d.i18n("webauthn-not-enrolled"))) : new Error(`${o.status} ${o.statusText}: Network response was not ok.`);
2029
+ }).then((o) => {
2030
+ console.log(o);
2031
+ const g = Ka(o.CredentialAssertion);
2032
+ return console.log("Parsed WebAuthn request options:", g), Ha(g).then((E) => {
2033
+ const oe = JSON.stringify(E);
2034
+ let Be = JSON.parse(oe);
2035
+ return Be.transactionID = o.TransactionID, Be;
2008
2036
  });
2009
- }).then((a) => fetch(`${e.domain}/api/v1/login/webauthn/finish`, {
2037
+ }).then((o) => fetch(`${e.domain}/api/v1/login/webauthn/finish`, {
2010
2038
  method: "POST",
2011
2039
  mode: "cors",
2012
2040
  cache: "no-cache",
2013
- body: JSON.stringify(a)
2014
- })).then(T).catch((a) => {
2015
- D(a.message), console.log(a);
2041
+ body: JSON.stringify(o)
2042
+ })).then(x).catch((o) => {
2043
+ D(o.message), console.log(o);
2016
2044
  });
2017
2045
  }
2018
- function L() {
2046
+ function O() {
2019
2047
  return console.log("password login"), fetch(e.domain + "/api/v1/login/password", {
2020
2048
  method: "post",
2021
2049
  mode: "cors",
2022
2050
  cache: "no-cache",
2023
2051
  body: JSON.stringify({
2024
2052
  username: r(),
2025
- password: u(),
2053
+ password: i(),
2026
2054
  sectorID: e.sector
2027
2055
  })
2028
- }).then(T);
2029
- }
2030
- function T(a) {
2031
- return Promise.resolve(a).then((i) => {
2032
- if (i.ok)
2033
- return i.json();
2034
- throw i;
2035
- }).then((i) => {
2036
- if (console.log(i), localStorage.setItem("spartan-txid", i.transactionID), !i.token) {
2037
- if (i.challengeType === "email_enrollment")
2038
- return w(r(), i.transactionID || "");
2039
- if (i.challengeType.indexOf("otp") !== -1)
2040
- return X();
2041
- i.challengeType.indexOf("webauthn") !== -1 ? (n("webauthn"), D(h.i18n("sa-webauthn-required"))) : D(h.i18n("sa-unknown-challenge"));
2056
+ }).then(x);
2057
+ }
2058
+ function x(o) {
2059
+ return Promise.resolve(o).then((g) => {
2060
+ if (g.ok)
2061
+ return g.json();
2062
+ throw g;
2063
+ }).then((g) => {
2064
+ if (console.log(g), localStorage.setItem("spartan-txid", g.transactionID), !g.token) {
2065
+ if (g.challengeType === "email_enrollment")
2066
+ return V(r(), g.transactionID || "");
2067
+ if (g.challengeType.indexOf("otp") !== -1)
2068
+ return ee();
2069
+ g.challengeType.indexOf("webauthn") !== -1 ? (n("webauthn"), D(d.i18n("sa-webauthn-required"))) : D(d.i18n("sa-unknown-challenge"));
2042
2070
  return;
2043
2071
  }
2044
- localStorage.setItem("spartan-token", i.token);
2045
- const d = new CustomEvent("spartan-login", {
2072
+ localStorage.setItem("spartan-token", g.token);
2073
+ const E = new CustomEvent("spartan-login", {
2046
2074
  bubbles: !0,
2047
2075
  cancelable: !0,
2048
2076
  detail: {
2049
- token: i.token,
2050
- transactionID: i.transactionID
2077
+ token: g.token,
2078
+ transactionID: g.transactionID
2051
2079
  }
2052
2080
  });
2053
- Ce.getRootNode().host.dispatchEvent(d), x() !== "" && (window.location.href = x());
2054
- }).catch((i) => i.json().then((d) => {
2055
- console.log(d.message), D(d.message);
2056
- }).catch((d) => {
2057
- console.log(d);
2081
+ _.getRootNode().host.dispatchEvent(E), B() !== "" && (window.location.href = B());
2082
+ }).catch((g) => g.json().then((E) => {
2083
+ console.log(E.message), D(E.message);
2084
+ }).catch((E) => {
2085
+ console.log(E);
2058
2086
  }));
2059
2087
  }
2060
- function X() {
2061
- const a = localStorage.getItem("spartan-txid") || "";
2062
- return fetch(e.domain + `/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(a)}&sectorID=${encodeURIComponent(e.sector)}`, {
2088
+ function ee() {
2089
+ const o = localStorage.getItem("spartan-txid") || "";
2090
+ return fetch(e.domain + `/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(o)}&sectorID=${encodeURIComponent(e.sector)}`, {
2063
2091
  method: "get",
2064
2092
  mode: "cors",
2065
2093
  cache: "no-cache"
2066
- }).then((i) => {
2067
- if (i.ok)
2068
- return i.json();
2069
- throw new Error(h.i18n("error-otp-list"));
2070
- }).then((i) => {
2071
- const d = i.registrations || [];
2072
- if (d.length === 0) {
2073
- D(h.i18n("sa-otp-no-registrations"));
2094
+ }).then((g) => {
2095
+ if (g.ok)
2096
+ return g.json();
2097
+ throw new Error(d.i18n("error-otp-list"));
2098
+ }).then((g) => {
2099
+ const E = g.registrations || [];
2100
+ if (E.length === 0) {
2101
+ D(d.i18n("sa-otp-no-registrations"));
2074
2102
  return;
2075
2103
  }
2076
- if (d.length === 1)
2077
- return J(d[0].ID || "");
2078
- me(d), k(d[0].ID || ""), n("otp-pick"), D("");
2079
- }).catch((i) => {
2080
- D(i.message), console.log(i);
2104
+ if (E.length === 1)
2105
+ return re(E[0].ID || "");
2106
+ Fe(E), k(E[0].ID || ""), n("otp-pick"), D("");
2107
+ }).catch((g) => {
2108
+ D(g.message), console.log(g);
2081
2109
  });
2082
2110
  }
2083
- function J(a) {
2084
- return console.log("begin OTP, registrationID:", a), fetch(e.domain + "/api/v1/login/otp/begin", {
2111
+ function re(o) {
2112
+ return console.log("begin OTP, registrationID:", o), fetch(e.domain + "/api/v1/login/otp/begin", {
2085
2113
  method: "post",
2086
2114
  mode: "cors",
2087
2115
  cache: "no-cache",
2088
2116
  body: JSON.stringify({
2089
2117
  username: r(),
2090
2118
  transactionID: localStorage.getItem("spartan-txid"),
2091
- registrationID: a,
2119
+ registrationID: o,
2092
2120
  sectorID: e.sector
2093
2121
  })
2094
- }).then((i) => {
2095
- if (i.ok)
2096
- return i.json();
2097
- throw new Error(`${i.status} ${i.statusText}`);
2098
- }).then((i) => {
2099
- console.log(i), i.transactionID && localStorage.setItem("spartan-txid", i.transactionID), v(""), D(""), n("otp");
2100
- }).catch((i) => {
2101
- D(i.message), console.log(i);
2122
+ }).then((g) => {
2123
+ if (g.ok)
2124
+ return g.json();
2125
+ throw new Error(`${g.status} ${g.statusText}`);
2126
+ }).then((g) => {
2127
+ console.log(g), g.transactionID && localStorage.setItem("spartan-txid", g.transactionID), C(""), D(""), n("otp");
2128
+ }).catch((g) => {
2129
+ D(g.message), console.log(g);
2102
2130
  });
2103
2131
  }
2104
- function j() {
2132
+ function se() {
2105
2133
  return console.log("OTP login submit"), fetch(e.domain + "/api/v1/login/otp", {
2106
2134
  method: "post",
2107
2135
  mode: "cors",
@@ -2112,10 +2140,10 @@ st("spartan-login", la, (e) => {
2112
2140
  transactionID: localStorage.getItem("spartan-txid"),
2113
2141
  sectorID: e.sector
2114
2142
  })
2115
- }).then(T);
2143
+ }).then(x);
2116
2144
  }
2117
- function G() {
2118
- return console.log("begin password reset"), D(""), W(!1), fetch(`${e.domain}/api/v1/password/reset/begin`, {
2145
+ function fe() {
2146
+ return console.log("begin password reset"), D(""), Z(!1), fetch(`${e.domain}/api/v1/password/reset/begin`, {
2119
2147
  method: "POST",
2120
2148
  mode: "cors",
2121
2149
  cache: "no-cache",
@@ -2126,17 +2154,17 @@ st("spartan-login", la, (e) => {
2126
2154
  email: r(),
2127
2155
  sectorID: e.sector
2128
2156
  })
2129
- }).then((a) => {
2130
- if (a.ok)
2131
- return a.json();
2132
- throw new Error(h.i18n("sa-reset-error"));
2133
- }).then((a) => {
2134
- console.log(a), D(h.i18n("sa-reset-email-sent")), K(""), U(""), n("reset-code");
2135
- }).catch((a) => {
2136
- D(a.message), console.log(a);
2157
+ }).then((o) => {
2158
+ if (o.ok)
2159
+ return o.json();
2160
+ throw new Error(d.i18n("sa-reset-error"));
2161
+ }).then((o) => {
2162
+ console.log(o), D(d.i18n("sa-reset-email-sent")), G(""), J(""), n("reset-code");
2163
+ }).catch((o) => {
2164
+ D(o.message), console.log(o);
2137
2165
  });
2138
2166
  }
2139
- function re() {
2167
+ function $e() {
2140
2168
  return console.log("complete password reset"), D(""), fetch(`${e.domain}/api/v1/password/reset/complete`, {
2141
2169
  method: "POST",
2142
2170
  mode: "cors",
@@ -2146,175 +2174,243 @@ st("spartan-login", la, (e) => {
2146
2174
  },
2147
2175
  body: JSON.stringify({
2148
2176
  email: r(),
2149
- code: ne().toUpperCase().trim(),
2150
- newPassword: Q(),
2177
+ code: ue().toUpperCase().trim(),
2178
+ newPassword: te(),
2151
2179
  sectorID: e.sector
2152
2180
  })
2153
- }).then((a) => {
2154
- if (a.ok)
2155
- return a.json();
2156
- throw a.status === 400 ? new Error(h.i18n("sa-reset-error-code")) : new Error(h.i18n("sa-reset-error"));
2157
- }).then((a) => {
2158
- console.log(a), W(!0), K(""), U(""), o(""), n(e.startMode);
2159
- }).catch((a) => {
2160
- D(a.message), console.log(a);
2181
+ }).then((o) => {
2182
+ if (o.ok)
2183
+ return o.json();
2184
+ throw o.status === 400 ? new Error(d.i18n("sa-reset-error-code")) : new Error(d.i18n("sa-reset-error"));
2185
+ }).then((o) => {
2186
+ console.log(o), Z(!0), G(""), J(""), u(""), n(e.startMode);
2187
+ }).catch((o) => {
2188
+ D(o.message), console.log(o);
2161
2189
  });
2162
2190
  }
2191
+ async function nt() {
2192
+ if (D(""), !xe() || xe().trim().length === 0) {
2193
+ D(d.i18n("sa-invite-error-otp"));
2194
+ return;
2195
+ }
2196
+ if (!A() || A().length < 8) {
2197
+ D("Password must be at least 8 characters");
2198
+ return;
2199
+ }
2200
+ const o = Oe();
2201
+ if (!o) {
2202
+ D("Missing invitation information");
2203
+ return;
2204
+ }
2205
+ const g = await fetch(`${e.domain}/api/v1/users/invite/complete`, {
2206
+ method: "POST",
2207
+ mode: "cors",
2208
+ cache: "no-cache",
2209
+ headers: {
2210
+ "Content-Type": "application/json"
2211
+ },
2212
+ body: JSON.stringify({
2213
+ sub: o,
2214
+ otp: xe().toUpperCase().trim(),
2215
+ password: A(),
2216
+ sectorID: e.sector
2217
+ })
2218
+ }).catch(() => null);
2219
+ if (!g) {
2220
+ D(d.i18n("sa-invite-error-generic"));
2221
+ return;
2222
+ }
2223
+ if (g.ok) {
2224
+ history.replaceState({}, "", window.location.pathname);
2225
+ const E = await g.json().catch(() => ({})), oe = _.getRootNode().host;
2226
+ E.token ? (localStorage.setItem("spartan-token", E.token), oe.dispatchEvent(new CustomEvent("spartan-login", {
2227
+ bubbles: !0,
2228
+ cancelable: !0,
2229
+ detail: {
2230
+ token: E.token
2231
+ }
2232
+ })), B() !== "" ? window.location.href = B() : e.redirect !== "" ? window.location.href = e.redirect : (R(!1), Ie(""), ve(""), Se(""), v(""), n(e.startMode), P(), T())) : (R(!0), oe.dispatchEvent(new CustomEvent("spartan-invite-complete", {
2233
+ bubbles: !0,
2234
+ cancelable: !0,
2235
+ detail: {
2236
+ sub: o,
2237
+ success: !0
2238
+ }
2239
+ })), setTimeout(() => {
2240
+ B() !== "" ? window.location.href = B() : e.redirect !== "" ? window.location.href = e.redirect : (R(!1), Ie(""), ve(""), Se(""), v(""), n(e.startMode), P(), T());
2241
+ }, 2e3));
2242
+ } else {
2243
+ const E = await g.json().catch(() => ({}));
2244
+ g.status === 400 || String(E.message).includes("invalid OTP") ? D(d.i18n("sa-invite-error-otp")) : g.status === 504 || String(E.message).includes("expired") ? D(d.i18n("sa-invite-error-expired")) : D(E.message || d.i18n("sa-invite-error-generic"));
2245
+ }
2246
+ }
2163
2247
  return (() => {
2164
- var a = Hi(), i = a.firstChild, d = i.nextSibling, y = d.nextSibling, A = y.nextSibling, q = Ce;
2165
- return typeof q == "function" ? Bt(q, a) : Ce = a, a.addEventListener("submit", (m) => {
2166
- if (m.preventDefault(), b()) return;
2167
- pe(!0), (t() === "sign-up" ? P() : t() === "signup-verify" ? C() : R()).finally(() => pe(!1));
2168
- }), f(d, Ae), f(y, (() => {
2169
- var m = p(() => t() === "reset-email" || t() === "reset-code");
2170
- return () => m() ? h.i18n("sa-reset-password") : p(() => t() === "signup-verify" || t() === "signup-webauthn")() ? h.i18n("sa-signup-mfa-title") : h.i18n("sa-login");
2171
- })()), f(a, B && (() => {
2172
- var m = Wi();
2173
- return f(m, B), m;
2174
- })(), A), f(a, (() => {
2175
- var m = p(() => !!ge());
2176
- return () => m() && (() => {
2177
- var c = Ze();
2178
- return f(c, () => h.i18n("sa-signup-complete")), c;
2248
+ var o = Qa(), g = o.firstChild, E = g.nextSibling, oe = E.nextSibling, Be = _;
2249
+ return typeof Be == "function" ? zt(Be, o) : _ = o, o.addEventListener("submit", (M) => {
2250
+ if (M.preventDefault(), b()) return;
2251
+ ge(!0), (t() === "sign-up" ? c() : t() === "signup-verify" ? q() : t() === "invite" ? Promise.resolve(nt()) : U()).finally(() => ge(!1));
2252
+ }), f(E, z), f(oe, (() => {
2253
+ var M = p(() => t() === "reset-email" || t() === "reset-code");
2254
+ return () => M() ? d.i18n("sa-reset-password") : p(() => t() === "signup-verify" || t() === "signup-webauthn")() ? d.i18n("sa-signup-mfa-title") : p(() => t() === "invite")() ? d.i18n("sa-complete-invite") : d.i18n("sa-login");
2255
+ })()), f(o, $ && (() => {
2256
+ var M = eu();
2257
+ return f(M, $), M;
2258
+ })(), null), f(o, (() => {
2259
+ var M = p(() => !!Ee());
2260
+ return () => M() && (() => {
2261
+ var a = it();
2262
+ return f(a, () => d.i18n("sa-signup-complete")), a;
2179
2263
  })();
2180
- })(), A), f(a, (() => {
2181
- var m = p(() => !!H());
2182
- return () => m() && (() => {
2183
- var c = Ze();
2184
- return f(c, () => h.i18n("sa-reset-success")), c;
2264
+ })(), null), f(o, (() => {
2265
+ var M = p(() => !!W());
2266
+ return () => M() && (() => {
2267
+ var a = it();
2268
+ return f(a, () => d.i18n("sa-reset-success")), a;
2185
2269
  })();
2186
- })(), A), A.$$input = (m) => s(m.currentTarget.value), f(a, (() => {
2187
- var m = p(() => t() !== "sign-up" && t() !== "signup-verify" && t() !== "signup-webauthn");
2188
- return () => m() && [p(() => p(() => t() === "password")() && (() => {
2189
- var c = gt();
2190
- return c.$$input = (g) => o(g.currentTarget.value), $(() => ce(c, "placeholder", h.i18n("sa-password"))), $(() => c.value = u()), c;
2191
- })()), p(() => p(() => t() === "webauthn")() && Ze()), p(() => p(() => t() === "otp-pick")() && [(() => {
2192
- var c = Ye();
2193
- return f(c, () => h.i18n("sa-otp-choose")), c;
2270
+ })(), null), f(o, (() => {
2271
+ var M = p(() => t() === "invite");
2272
+ return () => M() && [p(() => p(() => !!ze())() && (() => {
2273
+ var a = ru();
2274
+ return f(a, ze), a;
2275
+ })()), p(() => p(() => !!S())() && (() => {
2276
+ var a = su();
2277
+ return f(a, () => d.i18n("sa-invite-success")), a;
2278
+ })()), (() => {
2279
+ var a = tu();
2280
+ return a.$$input = (h) => Se(h.currentTarget.value), y((h) => {
2281
+ var N = d.i18n("sa-invite-otp"), Ce = b() || S();
2282
+ return N !== h.e && le(a, "placeholder", h.e = N), Ce !== h.t && (a.disabled = h.t = Ce), h;
2283
+ }, {
2284
+ e: void 0,
2285
+ t: void 0
2286
+ }), y(() => a.value = xe()), a;
2287
+ })(), (() => {
2288
+ var a = Et();
2289
+ return f(a, () => d.i18n("sa-invite-otp-hint")), a;
2290
+ })(), (() => {
2291
+ var a = nu();
2292
+ return a.$$input = (h) => v(h.currentTarget.value), y((h) => {
2293
+ var N = d.i18n("sa-invite-password"), Ce = b() || S();
2294
+ return N !== h.e && le(a, "placeholder", h.e = N), Ce !== h.t && (a.disabled = h.t = Ce), h;
2295
+ }, {
2296
+ e: void 0,
2297
+ t: void 0
2298
+ }), y(() => a.value = A()), a;
2194
2299
  })(), (() => {
2195
- var c = Zi();
2196
- return c.addEventListener("change", (g) => k(g.currentTarget.value)), f(c, () => he().map((g) => (() => {
2197
- var O = Yi(), ze = O.firstChild, Ne = ze.nextSibling;
2198
- return Ne.nextSibling, f(O, () => g.DisplayName || g.ID, ze), f(O, () => g.Type, Ne), $(() => O.value = g.ID), O;
2199
- })())), $(() => c.value = De()), c;
2300
+ var a = Et();
2301
+ return f(a, () => d.i18n("sa-invite-password-hint")), a;
2302
+ })(), (() => {
2303
+ var a = Ft();
2304
+ return f(a, (() => {
2305
+ var h = p(() => !!b());
2306
+ return () => h() ? d.i18n("sa-invite-completing") : d.i18n("sa-invite-submit");
2307
+ })()), y(() => a.disabled = b() || S()), a;
2308
+ })()];
2309
+ })(), null), f(o, (() => {
2310
+ var M = p(() => t() !== "invite");
2311
+ return () => M() && [(() => {
2312
+ var a = iu();
2313
+ return a.addEventListener("change", (h) => s(h.currentTarget.value)), a.$$input = (h) => s(h.currentTarget.value), y((h) => {
2314
+ var N = d.i18n("sa-username"), Ce = t() === "otp" || t() === "otp-pick" || t() === "reset-code" || t() === "signup-verify" || t() === "signup-webauthn";
2315
+ return N !== h.e && le(a, "placeholder", h.e = N), Ce !== h.t && (a.disabled = h.t = Ce), h;
2316
+ }, {
2317
+ e: void 0,
2318
+ t: void 0
2319
+ }), y(() => a.value = r()), a;
2320
+ })(), p(() => p(() => t() !== "sign-up" && t() !== "signup-verify" && t() !== "signup-webauthn")() && [p(() => p(() => t() === "password")() && (() => {
2321
+ var a = au();
2322
+ return a.addEventListener("change", (h) => u(h.currentTarget.value)), a.$$input = (h) => u(h.currentTarget.value), y(() => le(a, "placeholder", d.i18n("sa-password"))), y(() => a.value = i()), a;
2323
+ })()), p(() => p(() => t() === "webauthn")() && it()), p(() => p(() => t() === "otp-pick")() && [(() => {
2324
+ var a = at();
2325
+ return f(a, () => d.i18n("sa-otp-choose")), a;
2326
+ })(), (() => {
2327
+ var a = uu();
2328
+ return a.addEventListener("change", (h) => k(h.currentTarget.value)), f(a, () => we().map((h) => (() => {
2329
+ var N = ou(), Ce = N.firstChild, Dt = Ce.nextSibling;
2330
+ return Dt.nextSibling, f(N, () => h.DisplayName || h.ID, Ce), f(N, () => h.Type, Dt), y(() => N.value = h.ID), N;
2331
+ })())), y(() => a.value = Ae()), a;
2200
2332
  })()]), p(() => p(() => t() === "otp")() && (() => {
2201
- var c = Xi();
2202
- return c.$$input = (g) => v(g.currentTarget.value), $(() => ce(c, "placeholder", h.i18n("sa-code"))), $(() => c.value = l()), c;
2333
+ var a = lu();
2334
+ return a.$$input = (h) => C(h.currentTarget.value), y(() => le(a, "placeholder", d.i18n("sa-code"))), y(() => a.value = l()), a;
2203
2335
  })()), p(() => p(() => t() === "reset-code")() && [(() => {
2204
- var c = mt();
2205
- return c.$$input = (g) => K(g.currentTarget.value), $(() => ce(c, "placeholder", h.i18n("sa-reset-code"))), $(() => c.value = ne()), c;
2336
+ var a = yt();
2337
+ return a.$$input = (h) => G(h.currentTarget.value), y(() => le(a, "placeholder", d.i18n("sa-reset-code"))), y(() => a.value = ue()), a;
2206
2338
  })(), (() => {
2207
- var c = Qi();
2208
- return c.$$input = (g) => U(g.currentTarget.value), $(() => ce(c, "placeholder", h.i18n("sa-new-password"))), $(() => c.value = Q()), c;
2339
+ var a = $t();
2340
+ return a.$$input = (h) => J(h.currentTarget.value), y(() => le(a, "placeholder", d.i18n("sa-new-password"))), y(() => a.value = te()), a;
2209
2341
  })()]), p(() => p(() => t() === "password" || t() === "webauthn")() && (() => {
2210
- var c = ea(), g = c.firstChild, O = g.nextSibling;
2211
- return O.firstChild, c.$$click = () => n(t() === "password" ? "webauthn" : "password"), f(O, () => h.i18n("sa-use-password"), null), $(() => g.checked = t() === "password"), c;
2212
- })())];
2213
- })(), null), f(a, (() => {
2214
- var m = p(() => t() === "sign-up");
2215
- return () => m() && (() => {
2216
- var c = gt();
2217
- return c.$$input = (g) => o(g.currentTarget.value), $(() => ce(c, "placeholder", h.i18n("sa-password"))), $(() => c.value = u()), c;
2218
- })();
2219
- })(), null), f(a, (() => {
2220
- var m = p(() => t() === "signup-verify");
2221
- return () => m() && [(() => {
2222
- var c = Ye();
2223
- return f(c, () => h.i18n("sa-signup-verify-prompt")), c;
2342
+ var a = cu(), h = a.firstChild, N = h.nextSibling;
2343
+ return N.firstChild, a.$$click = () => n(t() === "password" ? "webauthn" : "password"), f(N, () => d.i18n("sa-use-password"), null), y(() => h.checked = t() === "password"), a;
2344
+ })())]), p(() => p(() => t() === "sign-up")() && (() => {
2345
+ var a = $t();
2346
+ return a.addEventListener("change", (h) => u(h.currentTarget.value)), a.$$input = (h) => u(h.currentTarget.value), y(() => le(a, "placeholder", d.i18n("sa-password"))), y(() => a.value = i()), a;
2347
+ })()), p(() => p(() => t() === "signup-verify")() && [(() => {
2348
+ var a = at();
2349
+ return f(a, () => d.i18n("sa-signup-verify-prompt")), a;
2224
2350
  })(), (() => {
2225
- var c = mt();
2226
- return c.$$input = (g) => v(g.currentTarget.value), $(() => ce(c, "placeholder", h.i18n("sa-code"))), $(() => c.value = l()), c;
2227
- })()];
2228
- })(), null), f(a, (() => {
2229
- var m = p(() => t() === "signup-webauthn");
2230
- return () => m() && (() => {
2231
- var c = Ye();
2232
- return f(c, () => h.i18n("sa-signup-webauthn-prompt")), c;
2233
- })();
2234
- })(), null), f(a, (() => {
2235
- var m = p(() => t() !== "signup-webauthn");
2236
- return () => m() && (() => {
2237
- var c = ta();
2238
- return f(c, (() => {
2239
- var g = p(() => !!b());
2240
- return () => g() ? h.i18n("sa-loading") : p(() => t() === "sign-up")() ? h.i18n("sa-signup") : p(() => t() === "otp-pick")() ? h.i18n("sa-otp-send-code") : p(() => t() === "otp")() ? h.i18n("sa-otp-verify") : p(() => t() === "reset-email")() ? h.i18n("sa-otp-send-code") : p(() => t() === "reset-code")() ? h.i18n("sa-reset-submit") : p(() => t() === "signup-verify")() ? h.i18n("sa-otp-verify") : h.i18n("sa-login");
2241
- })()), $(() => c.disabled = b()), c;
2242
- })();
2243
- })(), null), f(a, (() => {
2244
- var m = p(() => t() === "signup-webauthn");
2245
- return () => m() && [(() => {
2246
- var c = na();
2247
- return c.$$click = () => _(), f(c, (() => {
2248
- var g = p(() => !!b());
2249
- return () => g() ? h.i18n("sa-loading") : h.i18n("sa-signup-webauthn-setup");
2250
- })()), $(() => c.disabled = b()), c;
2351
+ var a = yt();
2352
+ return a.$$input = (h) => C(h.currentTarget.value), y(() => le(a, "placeholder", d.i18n("sa-code"))), y(() => a.value = l()), a;
2353
+ })()]), p(() => p(() => t() === "signup-webauthn")() && (() => {
2354
+ var a = at();
2355
+ return f(a, () => d.i18n("sa-signup-webauthn-prompt")), a;
2356
+ })()), p(() => p(() => t() !== "signup-webauthn")() && (() => {
2357
+ var a = Ft();
2358
+ return f(a, (() => {
2359
+ var h = p(() => !!b());
2360
+ return () => h() ? d.i18n("sa-loading") : p(() => t() === "sign-up")() ? d.i18n("sa-signup") : p(() => t() === "otp-pick")() ? d.i18n("sa-otp-send-code") : p(() => t() === "otp")() ? d.i18n("sa-otp-verify") : p(() => t() === "reset-email")() ? d.i18n("sa-otp-send-code") : p(() => t() === "reset-code")() ? d.i18n("sa-reset-submit") : p(() => t() === "signup-verify")() ? d.i18n("sa-otp-verify") : d.i18n("sa-login");
2361
+ })()), y(() => a.disabled = b()), a;
2362
+ })()), p(() => p(() => t() === "signup-webauthn")() && [(() => {
2363
+ var a = du();
2364
+ return a.$$click = () => H(), f(a, (() => {
2365
+ var h = p(() => !!b());
2366
+ return () => h() ? d.i18n("sa-loading") : d.i18n("sa-signup-webauthn-setup");
2367
+ })()), y(() => a.disabled = b()), a;
2251
2368
  })(), (() => {
2252
- var c = Me();
2253
- return c.$$click = () => N(), f(c, () => h.i18n("sa-signup-webauthn-done")), c;
2254
- })()];
2255
- })(), null), f(a, (() => {
2256
- var m = p(() => t() === "password");
2257
- return () => m() && (() => {
2258
- var c = Me();
2259
- return c.$$click = () => {
2260
- D(""), W(!1), n("reset-email");
2261
- }, f(c, () => h.i18n("sa-forgot-password")), c;
2262
- })();
2263
- })(), null), f(a, (() => {
2264
- var m = p(() => t() === "reset-email" || t() === "reset-code");
2265
- return () => m() && (() => {
2266
- var c = Me();
2267
- return c.$$click = () => {
2268
- D(""), K(""), U(""), n(e.startMode);
2269
- }, f(c, () => h.i18n("sa-back")), c;
2270
- })();
2271
- })(), null), f(a, (() => {
2272
- var m = p(() => !!(te() && t() !== "reset-email" && t() !== "reset-code" && t() !== "signup-verify" && t() !== "signup-webauthn"));
2273
- return () => m() && (() => {
2274
- var c = Me();
2275
- return c.$$click = () => t() === "sign-up" ? n(e.startMode) : n("sign-up"), f(c, (() => {
2276
- var g = p(() => t() === "sign-up");
2277
- return () => g() ? h.i18n("sa-back") : h.i18n("sa-signup");
2278
- })()), c;
2279
- })();
2280
- })(), null), f(a, (() => {
2281
- var m = p(() => Y().length > 0 && (t() === "password" || t() === "webauthn" || t() === "sign-up"));
2282
- return () => m() && [(() => {
2283
- var c = ra(), g = c.firstChild;
2284
- return f(g, () => h.i18n("sa-or")), c;
2285
- })(), p(() => Y().map((c) => (() => {
2286
- var g = sa();
2287
- return g.$$click = () => Te(c.provider), f(g, (() => {
2288
- var O = p(() => c.provider === "google");
2289
- return () => O() && ua();
2290
- })(), null), f(g, (() => {
2291
- var O = p(() => c.provider === "github");
2292
- return () => O() && ia();
2293
- })(), null), f(g, (() => {
2294
- var O = p(() => c.provider === "apple");
2295
- return () => O() && // <svg width="18" height="18" viewBox="0 0 814 1000" xmlns="http://www.w3.org/2000/svg">
2296
- // <path d="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76 0-103.7 40.8-165.9 40.8s-105-57.8-155.5-127.4C46 790.7 0 663 0 541.8c0-207.8 134.4-317.3 266.5-317.3 100.3 0 183.4 67.7 244.6 67.7 57.3 0 147.4-71.6 260.1-71.6zm-174.5-92.5c-50.9 67-123.1 110.6-195.7 110.6-8.3 0-16.6-.8-24.8-2.5 1.7-63.2 43.3-131.2 94.1-179.3 52.7-49.9 132.7-85.3 207.3-87.5 1.6 8.8 2.4 17.7 2.4 26.7 0 61.6-28.4 127-83.3 131.9z" fill="currentColor"/>
2297
- // </svg>
2298
- aa();
2299
- })(), null), f(g, (() => {
2300
- var O = p(() => c.provider === "oidc");
2301
- return () => O() && oa();
2302
- })(), null), f(g, (() => {
2303
- var O = p(() => c.provider === "google");
2304
- return () => O() ? h.i18n("sa-social-google") : p(() => c.provider === "github")() ? h.i18n("sa-social-github") : p(() => c.provider === "apple")() ? h.i18n("sa-social-apple") : h.i18n("sa-social-oidc");
2305
- })(), null), $(() => g.disabled = !!ae()), g;
2306
- })()))];
2307
- })(), null), $((m) => {
2308
- var c = h.i18n("sa-username"), g = t() === "otp" || t() === "otp-pick" || t() === "reset-code" || t() === "signup-verify" || t() === "signup-webauthn";
2309
- return c !== m.e && ce(A, "placeholder", m.e = c), g !== m.t && (A.disabled = m.t = g), m;
2310
- }, {
2311
- e: void 0,
2312
- t: void 0
2313
- }), $(() => A.value = r()), a;
2369
+ var a = Ke();
2370
+ return a.$$click = () => ne(), f(a, () => d.i18n("sa-signup-webauthn-done")), a;
2371
+ })()]), p(() => p(() => t() === "password")() && (() => {
2372
+ var a = Ke();
2373
+ return a.$$click = () => {
2374
+ D(""), Z(!1), n("reset-email");
2375
+ }, f(a, () => d.i18n("sa-forgot-password")), a;
2376
+ })()), p(() => p(() => t() === "reset-email" || t() === "reset-code")() && (() => {
2377
+ var a = Ke();
2378
+ return a.$$click = () => {
2379
+ D(""), G(""), J(""), n(e.startMode);
2380
+ }, f(a, () => d.i18n("sa-back")), a;
2381
+ })()), p(() => p(() => !!(ae() && t() !== "reset-email" && t() !== "reset-code" && t() !== "signup-verify" && t() !== "signup-webauthn"))() && (() => {
2382
+ var a = Ke();
2383
+ return a.$$click = () => t() === "sign-up" ? n(e.startMode) : n("sign-up"), f(a, (() => {
2384
+ var h = p(() => t() === "sign-up");
2385
+ return () => h() ? d.i18n("sa-back") : d.i18n("sa-signup");
2386
+ })()), a;
2387
+ })()), p(() => p(() => X().length > 0 && (t() === "password" || t() === "webauthn" || t() === "sign-up"))() && [(() => {
2388
+ var a = fu(), h = a.firstChild;
2389
+ return f(h, () => d.i18n("sa-or")), a;
2390
+ })(), p(() => X().map((a) => (() => {
2391
+ var h = hu();
2392
+ return h.$$click = () => Q(a.provider), f(h, (() => {
2393
+ var N = p(() => a.provider === "google");
2394
+ return () => N() && pu();
2395
+ })(), null), f(h, (() => {
2396
+ var N = p(() => a.provider === "github");
2397
+ return () => N() && Du();
2398
+ })(), null), f(h, (() => {
2399
+ var N = p(() => a.provider === "apple");
2400
+ return () => N() && gu();
2401
+ })(), null), f(h, (() => {
2402
+ var N = p(() => a.provider === "oidc");
2403
+ return () => N() && mu();
2404
+ })(), null), f(h, (() => {
2405
+ var N = p(() => a.provider === "google");
2406
+ return () => N() ? d.i18n("sa-social-google") : p(() => a.provider === "github")() ? d.i18n("sa-social-github") : p(() => a.provider === "apple")() ? d.i18n("sa-social-apple") : d.i18n("sa-social-oidc");
2407
+ })(), null), y(() => h.disabled = !!pe() || b()), h;
2408
+ })()))])];
2409
+ })(), null), o;
2314
2410
  })();
2315
2411
  });
2316
- rt(["input", "click"]);
2317
- var ca = /* @__PURE__ */ F(`<div class=container><style>.container {
2412
+ ft(["input", "click"]);
2413
+ var vu = /* @__PURE__ */ F(`<div class=container><style>.container {
2318
2414
  background-color: #ffffff;
2319
2415
  border-radius: 10px;
2320
2416
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
@@ -2492,8 +2588,8 @@ var ca = /* @__PURE__ */ F(`<div class=container><style>.container {
2492
2588
  .modal-content .btn.verify:hover {
2493
2589
  background-color: #0056b3;
2494
2590
  }
2495
- </style><style></style><h1 class=header>`), bt = /* @__PURE__ */ F("<span class=error-message>"), da = /* @__PURE__ */ F("<div class=section><h2></h2><div class=security-keys>"), fa = /* @__PURE__ */ F('<div class=key-item><span></span><button class="btn remove">'), Ct = /* @__PURE__ */ F("<span>"), ha = /* @__PURE__ */ F("<div class=section><div class=security-keys>"), Da = /* @__PURE__ */ F('<button class="btn add">+ '), pa = /* @__PURE__ */ F('<div class=add-key-form><div class=add-key-item><label for=keyName style=display:none;></label><input id=keyName type=text><button class="btn remove"></button><button class="btn add">'), ga = /* @__PURE__ */ F("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"), ma = /* @__PURE__ */ F('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'), ba = /* @__PURE__ */ F('<span>&nbsp; <button class="btn validate">'), Ca = /* @__PURE__ */ F('<div class=section><div class=mfa-manage><button class="btn add">+ '), va = /* @__PURE__ */ F('<div class=section><h2></h2><div class=mfa-manage><div class=mfa-item><label for=email></label><input id=email type=text><button class="btn add"></button></div><div class=mfa-item><label for=phone></label><input id=phone type=text><button class="btn add"></button></div><div class=mfa-item><button class="btn remove">'), Aa = /* @__PURE__ */ F('<div class=modal id=mfaModal><div class=modal-content><span class=close id=closeModal>&times;</span><h2>MFA Verification</h2><p>Please enter the verification code sent to your email or phone:</p><input type=text id=mfaCode placeholder="Enter verification code"><button class="btn verify"id=verifyMfa>Verify');
2496
- const wa = {
2591
+ </style><style></style><h1 class=header>`), Bt = /* @__PURE__ */ F("<span class=error-message>"), Cu = /* @__PURE__ */ F("<div class=section><h2></h2><div class=security-keys>"), wu = /* @__PURE__ */ F('<div class=key-item><span></span><button class="btn remove">'), kt = /* @__PURE__ */ F("<span>"), Au = /* @__PURE__ */ F("<div class=section><div class=security-keys>"), Eu = /* @__PURE__ */ F('<button class="btn add">+ '), Fu = /* @__PURE__ */ F('<div class=add-key-form><div class=add-key-item><label for=keyName style=display:none;></label><input id=keyName type=text><button class="btn remove"></button><button class="btn add">'), yu = /* @__PURE__ */ F("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"), $u = /* @__PURE__ */ F('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'), Bu = /* @__PURE__ */ F('<span>&nbsp; <button class="btn validate">'), ku = /* @__PURE__ */ F('<div class=section><div class=mfa-manage><button class="btn add">+ '), xu = /* @__PURE__ */ F('<div class=section><h2></h2><div class=mfa-manage><div class=mfa-item><label for=email></label><input id=email type=text><button class="btn add"></button></div><div class=mfa-item><label for=phone></label><input id=phone type=text><button class="btn add"></button></div><div class=mfa-item><button class="btn remove">'), Su = /* @__PURE__ */ F('<div class=modal id=mfaModal><div class=modal-content><span class=close id=closeModal>&times;</span><h2>MFA Verification</h2><p>Please enter the verification code sent to your email or phone:</p><input type=text id=mfaCode placeholder="Enter verification code"><button class="btn verify"id=verifyMfa>Verify');
2592
+ const _u = {
2497
2593
  domain: "http://127.0.0.1:11000",
2498
2594
  sector: "0ad5c3e5-0186-4557-8b32-4b36f247bf09",
2499
2595
  // defaults to the admin sector
@@ -2503,291 +2599,291 @@ const wa = {
2503
2599
  redirect: "/",
2504
2600
  redirectOnUnauthenticated: !0
2505
2601
  };
2506
- st("spartan-account-settings", wa, (e) => {
2507
- E(""), E("");
2508
- const [t, n] = E(""), [r, s] = E(""), [u, o] = E(""), [l] = E(e.showWebAuthn), [v, B] = E(!1), [D, x] = E(!1), [te, ue] = E(!1), [ge, z] = E(!1), [H, W] = E(!1), [ne, K] = E([]), [Q, U] = E([]), [he, me] = E(""), [De, k] = E(""), [Y, be] = E(""), [ae, oe] = E(""), b = ut(e.locale);
2509
- let pe;
2602
+ ht("spartan-account-settings", _u, (e) => {
2603
+ w(""), w("");
2604
+ const [t, n] = w(""), [r, s] = w(""), [i, u] = w(""), [l] = w(e.showWebAuthn), [C, $] = w(!1), [D, B] = w(!1), [ae, de] = w(!1), [Ee, L] = w(!1), [W, Z] = w(!1), [ue, G] = w([]), [te, J] = w([]), [we, Fe] = w(""), [Ae, k] = w(""), [X, ye] = w(""), [pe, De] = w(""), b = pt(e.locale);
2605
+ let ge;
2510
2606
  try {
2511
- pe = e.styles;
2607
+ ge = e.styles;
2512
2608
  } catch {
2513
- pe = "";
2609
+ ge = "";
2514
2610
  }
2515
- tt(async () => {
2516
- if (Rt())
2517
- x(!0), s("");
2611
+ ct(async () => {
2612
+ if (Wt())
2613
+ B(!0), s("");
2518
2614
  else {
2519
2615
  if (e.redirectOnUnauthenticated) {
2520
2616
  window.location.href = e.redirect;
2521
2617
  return;
2522
2618
  }
2523
- x(!1), s(b.i18n("not-authenticated"));
2619
+ B(!1), s(b.i18n("not-authenticated"));
2524
2620
  }
2525
- xe().then((C) => {
2526
- console.log(C);
2527
- }), await Ee(), fe().then((C) => {
2528
- U(C.registrations);
2621
+ Re().then((v) => {
2622
+ console.log(v);
2623
+ }), await Te(), ve().then((v) => {
2624
+ J(v.registrations);
2529
2625
  });
2530
2626
  });
2531
- async function xe() {
2532
- return await (await fetch(`${e.domain}/api/v1/users/self`, le("get"))).json();
2627
+ async function Re() {
2628
+ return await (await fetch(`${e.domain}/api/v1/users/self`, me("get"))).json();
2533
2629
  }
2534
- function le(w = "get") {
2630
+ function me(A = "get") {
2535
2631
  return {
2536
- method: w,
2632
+ method: A,
2537
2633
  mode: "cors",
2538
2634
  cache: "no-cache",
2539
2635
  headers: {
2540
2636
  "Content-Type": "application",
2541
- Authorization: `bearer ${Ki()}`
2637
+ Authorization: `bearer ${Ya()}`
2542
2638
  }
2543
2639
  };
2544
2640
  }
2545
- function Fe() {
2546
- if (H()) return;
2547
- W(!0);
2548
- let w = le("post");
2549
- w.body = JSON.stringify({
2641
+ function Pe() {
2642
+ if (W()) return;
2643
+ Z(!0);
2644
+ let A = me("post");
2645
+ A.body = JSON.stringify({
2550
2646
  keyName: t(),
2551
2647
  sectorID: e.sector
2552
- }), fetch(`${e.domain}/api/v1/webauthn/registration/begin`, w).then((C) => {
2553
- if (C.status === 200)
2554
- return C.json();
2555
- throw C;
2556
- }).then((C) => (console.log(C), Se(C))).catch((C) => {
2557
- C.json ? C.json().then((_) => {
2558
- s(_.message);
2559
- }) : s(C);
2648
+ }), fetch(`${e.domain}/api/v1/webauthn/registration/begin`, A).then((v) => {
2649
+ if (v.status === 200)
2650
+ return v.json();
2651
+ throw v;
2652
+ }).then((v) => (console.log(v), Le(v))).catch((v) => {
2653
+ v.json ? v.json().then((S) => {
2654
+ s(S.message);
2655
+ }) : s(v);
2560
2656
  }).finally(() => {
2561
- W(!1);
2657
+ Z(!1);
2562
2658
  });
2563
2659
  }
2564
- async function Se(w) {
2660
+ async function Le(A) {
2565
2661
  try {
2566
- const C = Mt(w.Options);
2567
- console.log("Parsed WebAuthn creation options:", C);
2568
- const _ = await jt(C), N = JSON.stringify(_);
2569
- let R = JSON.parse(N);
2570
- R.transactionID = w.TransactionID;
2571
- let P = le("post");
2572
- P.body = JSON.stringify(R);
2573
- const M = await fetch(`${e.domain}/api/v1/webauthn/registration/finish`, P);
2574
- if (M.status !== 200) {
2575
- const L = await M.json();
2576
- s(L.message);
2662
+ const v = Gt(A.Options);
2663
+ console.log("Parsed WebAuthn creation options:", v);
2664
+ const S = await Ht(v), R = JSON.stringify(S);
2665
+ let d = JSON.parse(R);
2666
+ d.transactionID = A.TransactionID;
2667
+ let _ = me("post");
2668
+ _.body = JSON.stringify(d);
2669
+ const z = await fetch(`${e.domain}/api/v1/webauthn/registration/finish`, _);
2670
+ if (z.status !== 200) {
2671
+ const P = await z.json();
2672
+ s(P.message);
2577
2673
  return;
2578
2674
  }
2579
- B(!1), n(""), Ee();
2580
- } catch (C) {
2581
- console.error("WebAuthn registration error:", C), s((C == null ? void 0 : C.message) || String(C));
2675
+ $(!1), n(""), Te();
2676
+ } catch (v) {
2677
+ console.error("WebAuthn registration error:", v), s((v == null ? void 0 : v.message) || String(v));
2582
2678
  }
2583
2679
  }
2584
- async function _e(w) {
2585
- let C = le("delete");
2586
- C.body = JSON.stringify({
2587
- ID: w
2680
+ async function qe(A) {
2681
+ let v = me("delete");
2682
+ v.body = JSON.stringify({
2683
+ ID: A
2588
2684
  });
2589
2685
  try {
2590
- if ((await fetch(`${e.domain}/api/v1/webauthn/${w}`, C)).status !== 200) {
2686
+ if ((await fetch(`${e.domain}/api/v1/webauthn/${A}`, v)).status !== 200) {
2591
2687
  s(b.i18n("error-webauthn-remove"));
2592
2688
  return;
2593
2689
  }
2594
- Ee();
2595
- } catch (_) {
2596
- console.error(_), s(b.i18n("error-webauthn-remove"));
2690
+ Te();
2691
+ } catch (S) {
2692
+ console.error(S), s(b.i18n("error-webauthn-remove"));
2597
2693
  return;
2598
2694
  }
2599
2695
  }
2600
- async function Ee() {
2601
- let w = le("get");
2696
+ async function Te() {
2697
+ let A = me("get");
2602
2698
  try {
2603
- const _ = await (await fetch(`${e.domain}/api/v1/webauthn/registration/list`, w)).json();
2604
- K(_.registrations || []);
2605
- } catch (C) {
2606
- console.error(C), K([]);
2699
+ const S = await (await fetch(`${e.domain}/api/v1/webauthn/registration/list`, A)).json();
2700
+ G(S.registrations || []);
2701
+ } catch (v) {
2702
+ console.error(v), G([]);
2607
2703
  }
2608
2704
  }
2609
- function h(w, C) {
2610
- H() || (W(!0), Ce(w, C).then((_) => {
2611
- if (_)
2612
- return fe().then((N) => {
2613
- U(N.registrations), me(_.transactionID), z(!0);
2705
+ function Oe(A, v) {
2706
+ W() || (Z(!0), Ie(A, v).then((S) => {
2707
+ if (S)
2708
+ return ve().then((R) => {
2709
+ J(R.registrations), Fe(S.transactionID), L(!0);
2614
2710
  });
2615
2711
  }).finally(() => {
2616
- W(!1);
2712
+ Z(!1);
2617
2713
  }));
2618
2714
  }
2619
- function Ce(w, C) {
2620
- let _ = le("post");
2621
- return _.body = JSON.stringify({
2622
- destination: w,
2623
- OTPType: Te(C),
2715
+ function Ie(A, v) {
2716
+ let S = me("post");
2717
+ return S.body = JSON.stringify({
2718
+ destination: A,
2719
+ OTPType: Se(v),
2624
2720
  sectorID: e.sector
2625
- }), fetch(`${e.domain}/api/v1/otp/begin`, _).then((N) => {
2626
- if (N.status !== 200) {
2721
+ }), fetch(`${e.domain}/api/v1/otp/begin`, S).then((R) => {
2722
+ if (R.status !== 200) {
2627
2723
  s(b.i18n("error-otp-verification"));
2628
2724
  return;
2629
2725
  }
2630
- return N.json();
2631
- }).catch((N) => {
2632
- console.error(N), s(b.i18n("error-otp-registration"));
2726
+ return R.json();
2727
+ }).catch((R) => {
2728
+ console.error(R), s(b.i18n("error-otp-registration"));
2633
2729
  });
2634
2730
  }
2635
- function Ae(w, C) {
2636
- if (H()) return;
2637
- W(!0);
2638
- let _ = le("post");
2639
- _.body = JSON.stringify({
2640
- transactionID: w,
2641
- password: C
2642
- }), fetch(`${e.domain}/api/v1/otp/finish`, _).then((N) => {
2643
- if (N.status !== 200) {
2644
- o(b.i18n("error-otp-verification"));
2731
+ function ze(A, v) {
2732
+ if (W()) return;
2733
+ Z(!0);
2734
+ let S = me("post");
2735
+ S.body = JSON.stringify({
2736
+ transactionID: A,
2737
+ password: v
2738
+ }), fetch(`${e.domain}/api/v1/otp/finish`, S).then((R) => {
2739
+ if (R.status !== 200) {
2740
+ u(b.i18n("error-otp-verification"));
2645
2741
  return;
2646
2742
  }
2647
- return z(!1), k(""), ue(!1), oe(""), be(""), fe().then((R) => {
2648
- U(R.registrations);
2649
- }), N.json();
2650
- }).catch((N) => {
2651
- console.error(N), o(b.i18n("error-otp-registration"));
2743
+ return L(!1), k(""), de(!1), De(""), ye(""), ve().then((d) => {
2744
+ J(d.registrations);
2745
+ }), R.json();
2746
+ }).catch((R) => {
2747
+ console.error(R), u(b.i18n("error-otp-registration"));
2652
2748
  }).finally(() => {
2653
- W(!1);
2749
+ Z(!1);
2654
2750
  });
2655
2751
  }
2656
- async function fe() {
2657
- let w = le("get");
2752
+ async function ve() {
2753
+ let A = me("get");
2658
2754
  try {
2659
- return await (await fetch(`${e.domain}/api/v1/otp/list`, w)).json();
2660
- } catch (C) {
2661
- console.error(C), s(b.i18n("error-otp-list"));
2755
+ return await (await fetch(`${e.domain}/api/v1/otp/list`, A)).json();
2756
+ } catch (v) {
2757
+ console.error(v), s(b.i18n("error-otp-list"));
2662
2758
  return;
2663
2759
  }
2664
2760
  }
2665
- async function ye(w) {
2666
- let C = le("delete");
2667
- C.body = JSON.stringify({
2668
- ID: w
2761
+ async function xe(A) {
2762
+ let v = me("delete");
2763
+ v.body = JSON.stringify({
2764
+ ID: A
2669
2765
  });
2670
2766
  try {
2671
- if ((await fetch(`${e.domain}/api/v1/otp/${w}`, C)).status !== 200) {
2767
+ if ((await fetch(`${e.domain}/api/v1/otp/${A}`, v)).status !== 200) {
2672
2768
  s(b.i18n("error-otp-remove"));
2673
2769
  return;
2674
2770
  }
2675
- fe().then((N) => {
2676
- U(N.registrations);
2771
+ ve().then((R) => {
2772
+ J(R.registrations);
2677
2773
  });
2678
- } catch (_) {
2679
- console.error(_), s(b.i18n("error-otp-remove"));
2774
+ } catch (S) {
2775
+ console.error(S), s(b.i18n("error-otp-remove"));
2680
2776
  return;
2681
2777
  }
2682
2778
  }
2683
- function Te(w) {
2684
- return w === "EMAIL" ? 2 : 1;
2779
+ function Se(A) {
2780
+ return A === "EMAIL" ? 2 : 1;
2685
2781
  }
2686
2782
  return (() => {
2687
- var w = ca(), C = w.firstChild, _ = C.nextSibling, N = _.nextSibling;
2688
- return f(_, pe), f(N, () => b.i18n("sa-account-settings")), f(w, r && (() => {
2689
- var R = bt();
2690
- return f(R, r), R;
2691
- })(), null), f(w, (() => {
2692
- var R = p(() => !!(l() && ne().length));
2693
- return () => R() && (() => {
2694
- var P = da(), M = P.firstChild, L = M.nextSibling;
2695
- return f(M, () => b.i18n("sa-webauthn-security-keys")), f(L, () => ne().map((T) => (() => {
2696
- var X = fa(), J = X.firstChild, j = J.nextSibling;
2697
- return f(J, () => T.keyName), j.$$click = () => {
2698
- confirm(b.i18n("sa-confirm-delete-key")) && _e(T.keyName);
2699
- }, f(j, () => b.i18n("sa-remove")), X;
2700
- })()), null), f(L, (() => {
2701
- var T = p(() => ne().length <= 0);
2783
+ var A = vu(), v = A.firstChild, S = v.nextSibling, R = S.nextSibling;
2784
+ return f(S, ge), f(R, () => b.i18n("sa-account-settings")), f(A, r && (() => {
2785
+ var d = Bt();
2786
+ return f(d, r), d;
2787
+ })(), null), f(A, (() => {
2788
+ var d = p(() => !!(l() && ue().length));
2789
+ return () => d() && (() => {
2790
+ var _ = Cu(), z = _.firstChild, P = z.nextSibling;
2791
+ return f(z, () => b.i18n("sa-webauthn-security-keys")), f(P, () => ue().map((T) => (() => {
2792
+ var Q = wu(), V = Q.firstChild, q = V.nextSibling;
2793
+ return f(V, () => T.keyName), q.$$click = () => {
2794
+ confirm(b.i18n("sa-confirm-delete-key")) && qe(T.keyName);
2795
+ }, f(q, () => b.i18n("sa-remove")), Q;
2796
+ })()), null), f(P, (() => {
2797
+ var T = p(() => ue().length <= 0);
2702
2798
  return () => T() && (() => {
2703
- var X = Ct();
2704
- return f(X, () => b.i18n("sa-no-security-keys")), X;
2799
+ var Q = kt();
2800
+ return f(Q, () => b.i18n("sa-no-security-keys")), Q;
2705
2801
  })();
2706
- })(), null), P;
2802
+ })(), null), _;
2707
2803
  })();
2708
- })(), null), f(w, (() => {
2709
- var R = p(() => !!l());
2710
- return () => R() && (() => {
2711
- var P = ha(), M = P.firstChild;
2712
- return f(M, (() => {
2713
- var L = p(() => !v());
2714
- return () => L() && (() => {
2715
- var T = Da();
2716
- return T.firstChild, T.$$click = () => B(!0), f(T, () => b.i18n("sa-add-security-key"), null), T;
2804
+ })(), null), f(A, (() => {
2805
+ var d = p(() => !!l());
2806
+ return () => d() && (() => {
2807
+ var _ = Au(), z = _.firstChild;
2808
+ return f(z, (() => {
2809
+ var P = p(() => !C());
2810
+ return () => P() && (() => {
2811
+ var T = Eu();
2812
+ return T.firstChild, T.$$click = () => $(!0), f(T, () => b.i18n("sa-add-security-key"), null), T;
2717
2813
  })();
2718
- })(), null), f(M, (() => {
2719
- var L = p(() => !!v());
2720
- return () => L() && (() => {
2721
- var T = pa(), X = T.firstChild, J = X.firstChild, j = J.nextSibling, G = j.nextSibling, re = G.nextSibling;
2722
- return f(J, () => b.i18n("sa-webauthn-key-name")), j.$$input = (a) => n(a.currentTarget.value), G.$$click = () => B(!1), f(G, () => b.i18n("sa-cancel")), re.$$click = () => t() !== "" && Fe(), f(re, () => b.i18n("sa-register")), $((a) => {
2723
- var i = b.i18n("sa-webauthn-key-name"), d = t() === "" || H();
2724
- return i !== a.e && ce(j, "placeholder", a.e = i), d !== a.t && (re.disabled = a.t = d), a;
2814
+ })(), null), f(z, (() => {
2815
+ var P = p(() => !!C());
2816
+ return () => P() && (() => {
2817
+ var T = Fu(), Q = T.firstChild, V = Q.firstChild, q = V.nextSibling, H = q.nextSibling, ne = H.nextSibling;
2818
+ return f(V, () => b.i18n("sa-webauthn-key-name")), q.$$input = (U) => n(U.currentTarget.value), H.$$click = () => $(!1), f(H, () => b.i18n("sa-cancel")), ne.$$click = () => t() !== "" && Pe(), f(ne, () => b.i18n("sa-register")), y((U) => {
2819
+ var c = b.i18n("sa-webauthn-key-name"), m = t() === "" || W();
2820
+ return c !== U.e && le(q, "placeholder", U.e = c), m !== U.t && (ne.disabled = U.t = m), U;
2725
2821
  }, {
2726
2822
  e: void 0,
2727
2823
  t: void 0
2728
- }), $(() => j.value = t()), T;
2824
+ }), y(() => q.value = t()), T;
2729
2825
  })();
2730
- })(), null), P;
2826
+ })(), null), _;
2731
2827
  })();
2732
- })(), null), f(w, (() => {
2733
- var R = p(() => Q().length > 0);
2734
- return () => R() && (() => {
2735
- var P = ga(), M = P.firstChild, L = M.nextSibling, T = L.firstChild, X = T.firstChild, J = X.firstChild, j = J.nextSibling, G = j.nextSibling, re = T.nextSibling;
2736
- return f(M, () => b.i18n("sa-mfa")), f(J, () => b.i18n("sa-mfa-destination")), f(j, () => b.i18n("sa-mfa-validated")), f(G, () => b.i18n("sa-mfa-action")), f(re, () => Q().map((a) => (() => {
2737
- var i = ma(), d = i.firstChild, y = d.nextSibling, A = y.nextSibling, q = A.firstChild;
2738
- return f(d, () => a.DisplayName), f(y, (() => {
2739
- var m = p(() => !!a.Validated);
2740
- return () => m() ? (() => {
2741
- var c = Ct();
2742
- return f(c, () => b.i18n("sa-yes")), c;
2828
+ })(), null), f(A, (() => {
2829
+ var d = p(() => te().length > 0);
2830
+ return () => d() && (() => {
2831
+ var _ = yu(), z = _.firstChild, P = z.nextSibling, T = P.firstChild, Q = T.firstChild, V = Q.firstChild, q = V.nextSibling, H = q.nextSibling, ne = T.nextSibling;
2832
+ return f(z, () => b.i18n("sa-mfa")), f(V, () => b.i18n("sa-mfa-destination")), f(q, () => b.i18n("sa-mfa-validated")), f(H, () => b.i18n("sa-mfa-action")), f(ne, () => te().map((U) => (() => {
2833
+ var c = $u(), m = c.firstChild, O = m.nextSibling, x = O.nextSibling, ee = x.firstChild;
2834
+ return f(m, () => U.DisplayName), f(O, (() => {
2835
+ var re = p(() => !!U.Validated);
2836
+ return () => re() ? (() => {
2837
+ var se = kt();
2838
+ return f(se, () => b.i18n("sa-yes")), se;
2743
2839
  })() : (() => {
2744
- var c = ba(), g = c.firstChild, O = g.nextSibling;
2745
- return f(c, () => b.i18n("sa-no"), g), O.$$click = () => {
2746
- h(a.DisplayName, a.Type === "email" ? "EMAIL" : "SMS");
2747
- }, f(O, () => b.i18n("sa-validate")), $(() => O.disabled = H()), c;
2840
+ var se = Bu(), fe = se.firstChild, $e = fe.nextSibling;
2841
+ return f(se, () => b.i18n("sa-no"), fe), $e.$$click = () => {
2842
+ Oe(U.DisplayName, U.Type === "email" ? "EMAIL" : "SMS");
2843
+ }, f($e, () => b.i18n("sa-validate")), y(() => $e.disabled = W()), se;
2748
2844
  })();
2749
- })()), q.$$click = () => {
2750
- confirm(b.i18n("sa-confirm-delete-key")) && ye(a.ID);
2751
- }, f(q, () => b.i18n("sa-remove")), $(() => ce(d, "title", a.DisplayName)), i;
2752
- })())), P;
2845
+ })()), ee.$$click = () => {
2846
+ confirm(b.i18n("sa-confirm-delete-key")) && xe(U.ID);
2847
+ }, f(ee, () => b.i18n("sa-remove")), y(() => le(m, "title", U.DisplayName)), c;
2848
+ })())), _;
2753
2849
  })();
2754
- })(), null), f(w, (() => {
2755
- var R = p(() => !te());
2756
- return () => R() && (() => {
2757
- var P = Ca(), M = P.firstChild, L = M.firstChild;
2758
- return L.firstChild, L.$$click = () => ue(!0), f(L, () => b.i18n("sa-register-mfa"), null), P;
2850
+ })(), null), f(A, (() => {
2851
+ var d = p(() => !ae());
2852
+ return () => d() && (() => {
2853
+ var _ = ku(), z = _.firstChild, P = z.firstChild;
2854
+ return P.firstChild, P.$$click = () => de(!0), f(P, () => b.i18n("sa-register-mfa"), null), _;
2759
2855
  })();
2760
- })(), null), f(w, (() => {
2761
- var R = p(() => !!te());
2762
- return () => R() && (() => {
2763
- var P = va(), M = P.firstChild, L = M.nextSibling, T = L.firstChild, X = T.firstChild, J = X.nextSibling, j = J.nextSibling, G = T.nextSibling, re = G.firstChild, a = re.nextSibling, i = a.nextSibling, d = G.nextSibling, y = d.firstChild;
2764
- return f(M, () => b.i18n("sa-add-mfa")), f(X, () => b.i18n("sa-email")), J.$$input = (A) => be(A.currentTarget.value), j.$$click = () => h(Y(), "EMAIL"), f(j, () => b.i18n("sa-add-email")), f(re, () => b.i18n("sa-phone")), a.$$input = (A) => oe(A.currentTarget.value), i.$$click = () => h(ae(), "SMS"), f(i, () => b.i18n("sa-add-sms")), y.$$click = () => ue(!1), f(y, () => b.i18n("sa-cancel")), $((A) => {
2765
- var q = b.i18n("sa-email"), m = H(), c = b.i18n("sa-phone"), g = H();
2766
- return q !== A.e && ce(J, "placeholder", A.e = q), m !== A.t && (j.disabled = A.t = m), c !== A.a && ce(a, "placeholder", A.a = c), g !== A.o && (i.disabled = A.o = g), A;
2856
+ })(), null), f(A, (() => {
2857
+ var d = p(() => !!ae());
2858
+ return () => d() && (() => {
2859
+ var _ = xu(), z = _.firstChild, P = z.nextSibling, T = P.firstChild, Q = T.firstChild, V = Q.nextSibling, q = V.nextSibling, H = T.nextSibling, ne = H.firstChild, U = ne.nextSibling, c = U.nextSibling, m = H.nextSibling, O = m.firstChild;
2860
+ return f(z, () => b.i18n("sa-add-mfa")), f(Q, () => b.i18n("sa-email")), V.$$input = (x) => ye(x.currentTarget.value), q.$$click = () => Oe(X(), "EMAIL"), f(q, () => b.i18n("sa-add-email")), f(ne, () => b.i18n("sa-phone")), U.$$input = (x) => De(x.currentTarget.value), c.$$click = () => Oe(pe(), "SMS"), f(c, () => b.i18n("sa-add-sms")), O.$$click = () => de(!1), f(O, () => b.i18n("sa-cancel")), y((x) => {
2861
+ var ee = b.i18n("sa-email"), re = W(), se = b.i18n("sa-phone"), fe = W();
2862
+ return ee !== x.e && le(V, "placeholder", x.e = ee), re !== x.t && (q.disabled = x.t = re), se !== x.a && le(U, "placeholder", x.a = se), fe !== x.o && (c.disabled = x.o = fe), x;
2767
2863
  }, {
2768
2864
  e: void 0,
2769
2865
  t: void 0,
2770
2866
  a: void 0,
2771
2867
  o: void 0
2772
- }), $(() => J.value = Y()), $(() => a.value = ae()), P;
2868
+ }), y(() => V.value = X()), y(() => U.value = pe()), _;
2773
2869
  })();
2774
- })(), null), f(w, (() => {
2775
- var R = p(() => !!ge());
2776
- return () => R() && (() => {
2777
- var P = Aa(), M = P.firstChild, L = M.firstChild, T = L.nextSibling, X = T.nextSibling, J = X.nextSibling, j = J.nextSibling;
2778
- return P.$$click = () => z(!1), M.$$click = (G) => G.stopPropagation(), L.$$click = () => z(!1), f(M, (() => {
2779
- var G = p(() => !!u());
2780
- return () => G() && (() => {
2781
- var re = bt();
2782
- return f(re, u), re;
2870
+ })(), null), f(A, (() => {
2871
+ var d = p(() => !!Ee());
2872
+ return () => d() && (() => {
2873
+ var _ = Su(), z = _.firstChild, P = z.firstChild, T = P.nextSibling, Q = T.nextSibling, V = Q.nextSibling, q = V.nextSibling;
2874
+ return _.$$click = () => L(!1), z.$$click = (H) => H.stopPropagation(), P.$$click = () => L(!1), f(z, (() => {
2875
+ var H = p(() => !!i());
2876
+ return () => H() && (() => {
2877
+ var ne = Bt();
2878
+ return f(ne, i), ne;
2783
2879
  })();
2784
- })(), X), J.$$input = (G) => k(G.currentTarget.value), j.$$click = () => Ae(he(), De()), $(() => j.disabled = H()), $(() => J.value = De()), P;
2880
+ })(), Q), V.$$input = (H) => k(H.currentTarget.value), q.$$click = () => ze(we(), Ae()), y(() => q.disabled = W()), y(() => V.value = Ae()), _;
2785
2881
  })();
2786
- })(), null), w;
2882
+ })(), null), A;
2787
2883
  })();
2788
2884
  });
2789
- rt(["click", "input"]);
2790
- var Ea = /* @__PURE__ */ F(`<form class=invite-frame><style>.invite-frame {
2885
+ ft(["click", "input"]);
2886
+ var Tu = /* @__PURE__ */ F(`<form class=invite-frame><style>.invite-frame {
2791
2887
  display: flex;
2792
2888
  flex-direction: column;
2793
2889
  justify-content: center;
@@ -2847,8 +2943,8 @@ var Ea = /* @__PURE__ */ F(`<form class=invite-frame><style>.invite-frame {
2847
2943
  margin-bottom: 10px;
2848
2944
  display: block;
2849
2945
  }
2850
- </style><style></style><h1></h1><input type=text autocomplete=one-time-code required><span class=hint></span><input type=password autocomplete=new-password required minlength=8><span class=hint></span><button type=submit>`), Fa = /* @__PURE__ */ F("<span class=info-message>"), ya = /* @__PURE__ */ F("<span class=error-message>"), $a = /* @__PURE__ */ F("<span class=success-message>");
2851
- const Ba = {
2946
+ </style><style></style><h1></h1><input type=text autocomplete=one-time-code required><span class=hint></span><input type=password autocomplete=new-password required minlength=8><span class=hint></span><button type=submit>`), Ou = /* @__PURE__ */ F("<span class=info-message>"), Iu = /* @__PURE__ */ F("<span class=error-message>"), Pu = /* @__PURE__ */ F("<span class=success-message>");
2947
+ const zu = {
2852
2948
  domain: "http://127.0.0.1:11000",
2853
2949
  sector: "0ad5c3e5-0186-4557-8b32-4b36f247bf09",
2854
2950
  // defaults to the admin sector
@@ -2861,36 +2957,37 @@ const Ba = {
2861
2957
  redirect: ""
2862
2958
  // where to redirect after successful completion
2863
2959
  };
2864
- st("spartan-invite", Ba, (e) => {
2865
- const [t, n] = E(""), [r, s] = E(""), [u, o] = E(""), [l, v] = E(""), [B, D] = E(!1), x = ut(e.locale);
2866
- let te, ue;
2960
+ ht("spartan-invite", zu, (e) => {
2961
+ console.warn("[spartan-invite] <spartan-invite> is deprecated. Use <spartan-login> instead — it now handles invite links by detecting ?sub= URL params automatically.");
2962
+ const [t, n] = w(""), [r, s] = w(""), [i, u] = w(""), [l, C] = w(""), [$, D] = w(!1), B = pt(e.locale);
2963
+ let ae, de;
2867
2964
  try {
2868
- ue = e.styles;
2965
+ de = e.styles;
2869
2966
  } catch {
2870
- ue = "";
2967
+ de = "";
2871
2968
  }
2872
- tt(async () => {
2873
- e.sub || new URLSearchParams(window.location.search).get("sub") || o("Missing invitation information. Please use the link from your invite email.");
2874
- const H = new URLSearchParams(window.location.hash.replace("#", "")).get("otp");
2875
- H && n(H);
2969
+ ct(async () => {
2970
+ e.sub || new URLSearchParams(window.location.search).get("sub") || u("Missing invitation information. Please use the link from your invite email.");
2971
+ const W = new URLSearchParams(window.location.hash.replace("#", "")).get("otp");
2972
+ W && n(W);
2876
2973
  });
2877
- async function ge(z) {
2878
- var ne, K;
2879
- if (z.preventDefault(), o(""), v(""), D(!0), !t() || t().trim().length === 0) {
2880
- o("Please enter your verification code"), D(!1);
2974
+ async function Ee(L) {
2975
+ var ue, G;
2976
+ if (L.preventDefault(), u(""), C(""), D(!0), !t() || t().trim().length === 0) {
2977
+ u("Please enter your verification code"), D(!1);
2881
2978
  return;
2882
2979
  }
2883
2980
  if (!r() || r().length < 8) {
2884
- o("Password must be at least 8 characters"), D(!1);
2981
+ u("Password must be at least 8 characters"), D(!1);
2885
2982
  return;
2886
2983
  }
2887
- const H = new URLSearchParams(window.location.search), W = e.sub || H.get("sub") || "";
2888
- if (!W) {
2889
- o("Missing invitation information"), D(!1);
2984
+ const W = new URLSearchParams(window.location.search), Z = e.sub || W.get("sub") || "";
2985
+ if (!Z) {
2986
+ u("Missing invitation information"), D(!1);
2890
2987
  return;
2891
2988
  }
2892
2989
  try {
2893
- const Q = await fetch(`${e.domain}/api/v1/users/invite/complete`, {
2990
+ const te = await fetch(`${e.domain}/api/v1/users/invite/complete`, {
2894
2991
  method: "POST",
2895
2992
  mode: "cors",
2896
2993
  cache: "no-cache",
@@ -2898,67 +2995,67 @@ st("spartan-invite", Ba, (e) => {
2898
2995
  "Content-Type": "application/json"
2899
2996
  },
2900
2997
  body: JSON.stringify({
2901
- sub: W,
2998
+ sub: Z,
2902
2999
  otp: t().toUpperCase().trim(),
2903
3000
  password: r(),
2904
3001
  sectorID: e.sector
2905
3002
  })
2906
3003
  });
2907
- if (Q.ok) {
2908
- const U = await Q.json();
2909
- v(x.i18n("sa-invite-success"));
2910
- const he = new CustomEvent("spartan-invite-complete", {
3004
+ if (te.ok) {
3005
+ const J = await te.json();
3006
+ C(B.i18n("sa-invite-success"));
3007
+ const we = new CustomEvent("spartan-invite-complete", {
2911
3008
  bubbles: !0,
2912
3009
  cancelable: !0,
2913
3010
  detail: {
2914
- sub: W,
3011
+ sub: Z,
2915
3012
  success: !0
2916
3013
  }
2917
3014
  });
2918
- te && te.getRootNode().host.dispatchEvent(he), setTimeout(() => {
3015
+ ae && ae.getRootNode().host.dispatchEvent(we), setTimeout(() => {
2919
3016
  e.redirect && e.redirect !== "" && (window.location.href = e.redirect);
2920
3017
  }, 2e3);
2921
3018
  } else {
2922
- const U = await Q.json().catch(() => ({}));
2923
- Q.status === 400 || (ne = U.message) != null && ne.includes("invalid OTP") ? o(x.i18n("sa-invite-error-otp")) : Q.status === 504 || (K = U.message) != null && K.includes("expired") ? o(x.i18n("sa-invite-error-expired")) : o(U.message || x.i18n("sa-invite-error-generic")), D(!1);
3019
+ const J = await te.json().catch(() => ({}));
3020
+ te.status === 400 || (ue = J.message) != null && ue.includes("invalid OTP") ? u(B.i18n("sa-invite-error-otp")) : te.status === 504 || (G = J.message) != null && G.includes("expired") ? u(B.i18n("sa-invite-error-expired")) : u(J.message || B.i18n("sa-invite-error-generic")), D(!1);
2924
3021
  }
2925
- } catch (Q) {
2926
- console.error("Error completing invite:", Q), o(x.i18n("sa-invite-error-generic")), D(!1);
3022
+ } catch (te) {
3023
+ console.error("Error completing invite:", te), u(B.i18n("sa-invite-error-generic")), D(!1);
2927
3024
  }
2928
3025
  }
2929
3026
  return (() => {
2930
- var z = Ea(), H = z.firstChild, W = H.nextSibling, ne = W.nextSibling, K = ne.nextSibling, Q = K.nextSibling, U = Q.nextSibling, he = U.nextSibling, me = he.nextSibling, De = te;
2931
- return typeof De == "function" ? Bt(De, z) : te = z, z.addEventListener("submit", ge), f(W, ue), f(ne, () => x.i18n("sa-complete-invite")), f(z, (() => {
3027
+ var L = Tu(), W = L.firstChild, Z = W.nextSibling, ue = Z.nextSibling, G = ue.nextSibling, te = G.nextSibling, J = te.nextSibling, we = J.nextSibling, Fe = we.nextSibling, Ae = ae;
3028
+ return typeof Ae == "function" ? zt(Ae, L) : ae = L, L.addEventListener("submit", Ee), f(Z, de), f(ue, () => B.i18n("sa-complete-invite")), f(L, (() => {
2932
3029
  var k = p(() => !!e.email);
2933
3030
  return () => k() && (() => {
2934
- var Y = Fa();
2935
- return f(Y, () => e.email), Y;
3031
+ var X = Ou();
3032
+ return f(X, () => e.email), X;
2936
3033
  })();
2937
- })(), K), f(z, (() => {
2938
- var k = p(() => !!u());
3034
+ })(), G), f(L, (() => {
3035
+ var k = p(() => !!i());
2939
3036
  return () => k() && (() => {
2940
- var Y = ya();
2941
- return f(Y, u), Y;
3037
+ var X = Iu();
3038
+ return f(X, i), X;
2942
3039
  })();
2943
- })(), K), f(z, (() => {
3040
+ })(), G), f(L, (() => {
2944
3041
  var k = p(() => !!l());
2945
3042
  return () => k() && (() => {
2946
- var Y = $a();
2947
- return f(Y, l), Y;
3043
+ var X = Pu();
3044
+ return f(X, l), X;
2948
3045
  })();
2949
- })(), K), K.$$input = (k) => n(k.currentTarget.value), f(Q, () => x.i18n("sa-invite-otp-hint")), U.$$input = (k) => s(k.currentTarget.value), f(he, () => x.i18n("sa-invite-password-hint")), f(me, (() => {
2950
- var k = p(() => !!B());
2951
- return () => k() ? x.i18n("sa-invite-completing") : x.i18n("sa-invite-submit");
2952
- })()), $((k) => {
2953
- var Y = x.i18n("sa-invite-otp"), be = B() || l() !== "", ae = x.i18n("sa-invite-password"), oe = B() || l() !== "", b = B() || l() !== "";
2954
- return Y !== k.e && ce(K, "placeholder", k.e = Y), be !== k.t && (K.disabled = k.t = be), ae !== k.a && ce(U, "placeholder", k.a = ae), oe !== k.o && (U.disabled = k.o = oe), b !== k.i && (me.disabled = k.i = b), k;
3046
+ })(), G), G.$$input = (k) => n(k.currentTarget.value), f(te, () => B.i18n("sa-invite-otp-hint")), J.$$input = (k) => s(k.currentTarget.value), f(we, () => B.i18n("sa-invite-password-hint")), f(Fe, (() => {
3047
+ var k = p(() => !!$());
3048
+ return () => k() ? B.i18n("sa-invite-completing") : B.i18n("sa-invite-submit");
3049
+ })()), y((k) => {
3050
+ var X = B.i18n("sa-invite-otp"), ye = $() || l() !== "", pe = B.i18n("sa-invite-password"), De = $() || l() !== "", b = $() || l() !== "";
3051
+ return X !== k.e && le(G, "placeholder", k.e = X), ye !== k.t && (G.disabled = k.t = ye), pe !== k.a && le(J, "placeholder", k.a = pe), De !== k.o && (J.disabled = k.o = De), b !== k.i && (Fe.disabled = k.i = b), k;
2955
3052
  }, {
2956
3053
  e: void 0,
2957
3054
  t: void 0,
2958
3055
  a: void 0,
2959
3056
  o: void 0,
2960
3057
  i: void 0
2961
- }), $(() => K.value = t()), $(() => U.value = r()), z;
3058
+ }), y(() => G.value = t()), y(() => J.value = r()), L;
2962
3059
  })();
2963
3060
  });
2964
- rt(["input"]);
3061
+ ft(["input"]);