@masonitestudios/spartanauth-widgets 1.1.1 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,26 +2,26 @@ const Qt = (e, t) => e === t, Ze = {
2
2
  equals: Qt
3
3
  };
4
4
  let Tt = zt;
5
- const Te = 1, Ye = 2, Ot = {
5
+ const ze = 1, Ye = 2, Ot = {
6
6
  owned: null,
7
7
  cleanups: null,
8
8
  context: null,
9
9
  owner: null
10
10
  };
11
- var Q = null;
12
- let at = null, en = null, X = null, ae = null, Be = null, nt = 0;
11
+ var ee = null;
12
+ let at = null, en = null, Q = null, he = null, _e = null, nt = 0;
13
13
  function tn(e, t) {
14
- const n = X, r = Q, s = e.length === 0, i = t === void 0 ? r : t, u = s ? Ot : {
14
+ const n = Q, r = ee, i = e.length === 0, s = t === void 0 ? r : t, u = i ? Ot : {
15
15
  owned: null,
16
16
  cleanups: null,
17
- context: i ? i.context : null,
18
- owner: i
19
- }, o = s ? e : () => e(() => rt(() => Je(u)));
20
- Q = u, X = null;
17
+ context: s ? s.context : null,
18
+ owner: s
19
+ }, o = i ? e : () => e(() => rt(() => Je(u)));
20
+ ee = u, Q = null;
21
21
  try {
22
- return Ke(o, !0);
22
+ return Ge(o, !0);
23
23
  } finally {
24
- X = n, Q = r;
24
+ Q = n, ee = r;
25
25
  }
26
26
  }
27
27
  function w(e, t) {
@@ -31,64 +31,64 @@ function w(e, t) {
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)), Pt(n, s));
34
+ }, r = (i) => (typeof i == "function" && (i = i(n.value)), Pt(n, i));
35
35
  return [It.bind(n), r];
36
36
  }
37
37
  function y(e, t, n) {
38
- const r = pt(e, t, !1, Te);
38
+ const r = pt(e, t, !1, ze);
39
39
  Ve(r);
40
40
  }
41
41
  function nn(e, t, n) {
42
42
  Tt = on;
43
- const r = pt(e, t, !1, Te);
44
- r.user = !0, Be ? Be.push(r) : Ve(r);
43
+ const r = pt(e, t, !1, ze);
44
+ r.user = !0, _e ? _e.push(r) : Ve(r);
45
45
  }
46
- function h(e, t, n) {
46
+ function f(e, t, n) {
47
47
  n = n ? Object.assign({}, Ze, n) : Ze;
48
48
  const r = pt(e, t, !0, 0);
49
49
  return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, Ve(r), It.bind(r);
50
50
  }
51
51
  function rt(e) {
52
- if (X === null) return e();
53
- const t = X;
54
- X = null;
52
+ if (Q === null) return e();
53
+ const t = Q;
54
+ Q = null;
55
55
  try {
56
56
  return e();
57
57
  } finally {
58
- X = t;
58
+ Q = t;
59
59
  }
60
60
  }
61
- function ht(e) {
61
+ function ft(e) {
62
62
  nn(() => rt(e));
63
63
  }
64
64
  function rn(e) {
65
- return Q === null || (Q.cleanups === null ? Q.cleanups = [e] : Q.cleanups.push(e)), e;
65
+ return ee === null || (ee.cleanups === null ? ee.cleanups = [e] : ee.cleanups.push(e)), e;
66
66
  }
67
67
  function sn() {
68
- return Q;
68
+ return ee;
69
69
  }
70
70
  function It() {
71
71
  if (this.sources && this.state)
72
- if (this.state === Te) Ve(this);
72
+ if (this.state === ze) Ve(this);
73
73
  else {
74
- const e = ae;
75
- ae = null, Ke(() => Qe(this), !1), ae = e;
74
+ const e = he;
75
+ he = null, Ge(() => Qe(this), !1), he = e;
76
76
  }
77
- if (X) {
77
+ if (Q) {
78
78
  const e = this.observers ? this.observers.length : 0;
79
- X.sources ? (X.sources.push(this), X.sourceSlots.push(e)) : (X.sources = [this], X.sourceSlots = [e]), this.observers ? (this.observers.push(X), this.observerSlots.push(X.sources.length - 1)) : (this.observers = [X], this.observerSlots = [X.sources.length - 1]);
79
+ Q.sources ? (Q.sources.push(this), Q.sourceSlots.push(e)) : (Q.sources = [this], Q.sourceSlots = [e]), this.observers ? (this.observers.push(Q), this.observerSlots.push(Q.sources.length - 1)) : (this.observers = [Q], this.observerSlots = [Q.sources.length - 1]);
80
80
  }
81
81
  return this.value;
82
82
  }
83
83
  function Pt(e, t, n) {
84
84
  let r = e.value;
85
- return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && Ke(() => {
86
- for (let s = 0; s < e.observers.length; s += 1) {
87
- const i = e.observers[s], u = at && at.running;
88
- u && at.disposed.has(i), (u ? !i.tState : !i.state) && (i.pure ? ae.push(i) : Be.push(i), i.observers && Nt(i)), u || (i.state = Te);
85
+ return (!e.comparator || !e.comparator(r, t)) && (e.value = t, e.observers && e.observers.length && Ge(() => {
86
+ for (let i = 0; i < e.observers.length; i += 1) {
87
+ const s = e.observers[i], u = at && at.running;
88
+ u && at.disposed.has(s), (u ? !s.tState : !s.state) && (s.pure ? he.push(s) : _e.push(s), s.observers && Mt(s)), u || (s.state = ze);
89
89
  }
90
- if (ae.length > 1e6)
91
- throw ae = [], new Error();
90
+ if (he.length > 1e6)
91
+ throw he = [], new Error();
92
92
  }, !1)), t;
93
93
  }
94
94
  function Ve(e) {
@@ -103,19 +103,19 @@ function Ve(e) {
103
103
  }
104
104
  function an(e, t, n) {
105
105
  let r;
106
- const s = Q, i = X;
107
- X = Q = e;
106
+ const i = ee, s = Q;
107
+ Q = ee = e;
108
108
  try {
109
109
  r = e.fn(t);
110
110
  } catch (u) {
111
- return e.pure && (e.state = Te, e.owned && e.owned.forEach(Je), e.owned = null), e.updatedAt = n + 1, Mt(u);
111
+ return e.pure && (e.state = ze, e.owned && e.owned.forEach(Je), e.owned = null), e.updatedAt = n + 1, Nt(u);
112
112
  } finally {
113
- X = i, Q = s;
113
+ Q = s, ee = i;
114
114
  }
115
115
  (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Pt(e, r) : e.value = r, e.updatedAt = n);
116
116
  }
117
- function pt(e, t, n, r = Te, s) {
118
- const i = {
117
+ function pt(e, t, n, r = ze, i) {
118
+ const s = {
119
119
  fn: e,
120
120
  state: r,
121
121
  updatedAt: null,
@@ -124,11 +124,11 @@ function pt(e, t, n, r = Te, s) {
124
124
  sourceSlots: null,
125
125
  cleanups: null,
126
126
  value: t,
127
- owner: Q,
128
- context: Q ? Q.context : null,
127
+ owner: ee,
128
+ context: ee ? ee.context : null,
129
129
  pure: n
130
130
  };
131
- return Q === null || Q !== Ot && (Q.owned ? Q.owned.push(i) : Q.owned = [i]), i;
131
+ return ee === null || ee !== Ot && (ee.owned ? ee.owned.push(s) : ee.owned = [s]), s;
132
132
  }
133
133
  function Xe(e) {
134
134
  if (e.state === 0) return;
@@ -138,28 +138,28 @@ function Xe(e) {
138
138
  for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < nt); )
139
139
  e.state && t.push(e);
140
140
  for (let n = t.length - 1; n >= 0; n--)
141
- if (e = t[n], e.state === Te)
141
+ if (e = t[n], e.state === ze)
142
142
  Ve(e);
143
143
  else if (e.state === Ye) {
144
- const r = ae;
145
- ae = null, Ke(() => Qe(e, t[0]), !1), ae = r;
144
+ const r = he;
145
+ he = null, Ge(() => Qe(e, t[0]), !1), he = r;
146
146
  }
147
147
  }
148
- function Ke(e, t) {
149
- if (ae) return e();
148
+ function Ge(e, t) {
149
+ if (he) return e();
150
150
  let n = !1;
151
- t || (ae = []), Be ? n = !0 : Be = [], nt++;
151
+ t || (he = []), _e ? n = !0 : _e = [], nt++;
152
152
  try {
153
153
  const r = e();
154
154
  return un(n), r;
155
155
  } catch (r) {
156
- n || (Be = null), ae = null, Mt(r);
156
+ n || (_e = null), he = null, Nt(r);
157
157
  }
158
158
  }
159
159
  function un(e) {
160
- if (ae && (zt(ae), ae = null), e) return;
161
- const t = Be;
162
- Be = null, t.length && Ke(() => Tt(t), !1);
160
+ if (he && (zt(he), he = null), e) return;
161
+ const t = _e;
162
+ _e = null, t.length && Ge(() => Tt(t), !1);
163
163
  }
164
164
  function zt(e) {
165
165
  for (let t = 0; t < e.length; t++) Xe(e[t]);
@@ -177,25 +177,25 @@ function Qe(e, t) {
177
177
  for (let n = 0; n < e.sources.length; n += 1) {
178
178
  const r = e.sources[n];
179
179
  if (r.sources) {
180
- const s = r.state;
181
- s === Te ? r !== t && (!r.updatedAt || r.updatedAt < nt) && Xe(r) : s === Ye && Qe(r, t);
180
+ const i = r.state;
181
+ i === ze ? r !== t && (!r.updatedAt || r.updatedAt < nt) && Xe(r) : i === Ye && Qe(r, t);
182
182
  }
183
183
  }
184
184
  }
185
- function Nt(e) {
185
+ function Mt(e) {
186
186
  for (let t = 0; t < e.observers.length; t += 1) {
187
187
  const n = e.observers[t];
188
- n.state || (n.state = Ye, n.pure ? ae.push(n) : Be.push(n), n.observers && Nt(n));
188
+ n.state || (n.state = Ye, n.pure ? he.push(n) : _e.push(n), n.observers && Mt(n));
189
189
  }
190
190
  }
191
191
  function Je(e) {
192
192
  let t;
193
193
  if (e.sources)
194
194
  for (; e.sources.length; ) {
195
- const n = e.sources.pop(), r = e.sourceSlots.pop(), s = n.observers;
196
- if (s && s.length) {
197
- const i = s.pop(), u = n.observerSlots.pop();
198
- r < s.length && (i.sourceSlots[u] = r, s[r] = i, n.observerSlots[r] = u);
195
+ const n = e.sources.pop(), r = e.sourceSlots.pop(), i = n.observers;
196
+ if (i && i.length) {
197
+ const s = i.pop(), u = n.observerSlots.pop();
198
+ r < i.length && (s.sourceSlots[u] = r, i[r] = s, n.observerSlots[r] = u);
199
199
  }
200
200
  }
201
201
  if (e.tOwned) {
@@ -217,42 +217,42 @@ function ln(e) {
217
217
  cause: e
218
218
  });
219
219
  }
220
- function Mt(e, t = Q) {
220
+ function Nt(e, t = ee) {
221
221
  throw ln(e);
222
222
  }
223
223
  function cn(e, t, n) {
224
- let r = n.length, s = t.length, i = r, u = 0, o = 0, C = t[s - 1].nextSibling, $ = null;
225
- for (; u < s || o < i; ) {
224
+ let r = n.length, i = t.length, s = r, u = 0, o = 0, A = t[i - 1].nextSibling, k = null;
225
+ for (; u < i || o < s; ) {
226
226
  if (t[u] === n[o]) {
227
227
  u++, o++;
228
228
  continue;
229
229
  }
230
- for (; t[s - 1] === n[i - 1]; )
231
- s--, i--;
232
- if (s === u) {
233
- const D = i < r ? o ? n[o - 1].nextSibling : n[i - o] : C;
234
- for (; o < i; ) e.insertBefore(n[o++], D);
235
- } else if (i === o)
236
- for (; u < s; )
237
- (!$ || !$.has(t[u])) && t[u].remove(), u++;
238
- else if (t[u] === n[i - 1] && n[o] === t[s - 1]) {
239
- const D = t[--s].nextSibling;
240
- e.insertBefore(n[o++], t[u++].nextSibling), e.insertBefore(n[--i], D), t[s] = n[i];
230
+ for (; t[i - 1] === n[s - 1]; )
231
+ i--, s--;
232
+ if (i === u) {
233
+ const g = s < r ? o ? n[o - 1].nextSibling : n[s - o] : A;
234
+ for (; o < s; ) e.insertBefore(n[o++], g);
235
+ } else if (s === o)
236
+ for (; u < i; )
237
+ (!k || !k.has(t[u])) && t[u].remove(), u++;
238
+ else if (t[u] === n[s - 1] && n[o] === t[i - 1]) {
239
+ const g = t[--i].nextSibling;
240
+ e.insertBefore(n[o++], t[u++].nextSibling), e.insertBefore(n[--s], g), t[i] = n[s];
241
241
  } else {
242
- if (!$) {
243
- $ = /* @__PURE__ */ new Map();
244
- let k = o;
245
- for (; k < i; ) $.set(n[k], k++);
242
+ if (!k) {
243
+ k = /* @__PURE__ */ new Map();
244
+ let q = o;
245
+ for (; q < s; ) k.set(n[q], q++);
246
246
  }
247
- const D = $.get(t[u]);
248
- if (D != null)
249
- if (o < D && D < i) {
250
- let k = u, ue = 1, fe;
251
- for (; ++k < s && k < i && !((fe = $.get(t[k])) == null || fe !== D + ue); )
252
- ue++;
253
- if (ue > D - o) {
254
- const Fe = t[u];
255
- for (; o < D; ) e.insertBefore(n[o++], Fe);
247
+ const g = k.get(t[u]);
248
+ if (g != null)
249
+ if (o < g && g < s) {
250
+ let q = u, Ae = 1, Ce;
251
+ for (; ++q < i && q < s && !((Ce = k.get(t[q])) == null || Ce !== g + Ae); )
252
+ Ae++;
253
+ if (Ae > g - o) {
254
+ const $e = t[u];
255
+ for (; o < g; ) e.insertBefore(n[o++], $e);
256
256
  } else e.replaceChild(n[o++], t[u++]);
257
257
  } else u++;
258
258
  else t[u++].remove();
@@ -260,43 +260,43 @@ function cn(e, t, n) {
260
260
  }
261
261
  }
262
262
  const vt = "_$DX_DELEGATE";
263
- function F(e, t, n, r) {
264
- let s;
265
- const i = () => {
263
+ function v(e, t, n, r) {
264
+ let i;
265
+ const s = () => {
266
266
  const o = document.createElement("template");
267
267
  return o.innerHTML = e, o.content.firstChild;
268
- }, u = () => (s || (s = i())).cloneNode(!0);
268
+ }, u = () => (i || (i = s())).cloneNode(!0);
269
269
  return u.cloneNode = u, u;
270
270
  }
271
- function Dt(e, t = window.document) {
271
+ function gt(e, t = window.document) {
272
272
  const n = t[vt] || (t[vt] = /* @__PURE__ */ new Set());
273
- for (let r = 0, s = e.length; r < s; r++) {
274
- const i = e[r];
275
- n.has(i) || (n.add(i), t.addEventListener(i, dn));
273
+ for (let r = 0, i = e.length; r < i; r++) {
274
+ const s = e[r];
275
+ n.has(s) || (n.add(s), t.addEventListener(s, dn));
276
276
  }
277
277
  }
278
- function de(e, t, n) {
278
+ function ge(e, t, n) {
279
279
  n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
280
280
  }
281
281
  function jt(e, t, n) {
282
282
  return rt(() => e(t, n));
283
283
  }
284
- function f(e, t, n, r) {
284
+ function d(e, t, n, r) {
285
285
  if (n !== void 0 && !r && (r = []), typeof t != "function") return et(e, t, r, n);
286
- y((s) => et(e, t(), s, n), r);
286
+ y((i) => et(e, t(), i, n), r);
287
287
  }
288
288
  function dn(e) {
289
289
  let t = e.target;
290
- const n = `$$${e.type}`, r = e.target, s = e.currentTarget, i = (C) => Object.defineProperty(e, "target", {
290
+ const n = `$$${e.type}`, r = e.target, i = e.currentTarget, s = (A) => Object.defineProperty(e, "target", {
291
291
  configurable: !0,
292
- value: C
292
+ value: A
293
293
  }), u = () => {
294
- const C = t[n];
295
- if (C && !t.disabled) {
296
- const $ = t[`${n}Data`];
297
- if ($ !== void 0 ? C.call(t, $, e) : C.call(t, e), e.cancelBubble) return;
294
+ const A = t[n];
295
+ if (A && !t.disabled) {
296
+ const k = t[`${n}Data`];
297
+ if (k !== void 0 ? A.call(t, k, e) : A.call(t, e), e.cancelBubble) return;
298
298
  }
299
- return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && i(t.host), !0;
299
+ return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && s(t.host), !0;
300
300
  }, o = () => {
301
301
  for (; u() && (t = t._$host || t.parentNode || t.host); ) ;
302
302
  };
@@ -306,52 +306,52 @@ function dn(e) {
306
306
  return t || document;
307
307
  }
308
308
  }), e.composedPath) {
309
- const C = e.composedPath();
310
- i(C[0]);
311
- for (let $ = 0; $ < C.length - 2 && (t = C[$], !!u()); $++) {
309
+ const A = e.composedPath();
310
+ s(A[0]);
311
+ for (let k = 0; k < A.length - 2 && (t = A[k], !!u()); k++) {
312
312
  if (t._$host) {
313
313
  t = t._$host, o();
314
314
  break;
315
315
  }
316
- if (t.parentNode === s)
316
+ if (t.parentNode === i)
317
317
  break;
318
318
  }
319
319
  } else o();
320
- i(r);
320
+ s(r);
321
321
  }
322
- function et(e, t, n, r, s) {
322
+ function et(e, t, n, r, i) {
323
323
  for (; typeof n == "function"; ) n = n();
324
324
  if (t === n) return n;
325
- const i = typeof t, u = r !== void 0;
326
- if (e = u && n[0] && n[0].parentNode || e, i === "string" || i === "number") {
327
- if (i === "number" && (t = t.toString(), t === n))
325
+ const s = typeof t, u = r !== void 0;
326
+ if (e = u && n[0] && n[0].parentNode || e, s === "string" || s === "number") {
327
+ if (s === "number" && (t = t.toString(), t === n))
328
328
  return n;
329
329
  if (u) {
330
330
  let o = n[0];
331
- o && o.nodeType === 3 ? o.data !== t && (o.data = t) : o = document.createTextNode(t), n = Me(e, n, r, o);
331
+ o && o.nodeType === 3 ? o.data !== t && (o.data = t) : o = document.createTextNode(t), n = Le(e, n, r, o);
332
332
  } else
333
333
  n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
334
- } else if (t == null || i === "boolean")
335
- n = Me(e, n, r);
334
+ } else if (t == null || s === "boolean")
335
+ n = Le(e, n, r);
336
336
  else {
337
- if (i === "function")
337
+ if (s === "function")
338
338
  return y(() => {
339
339
  let o = t();
340
340
  for (; typeof o == "function"; ) o = o();
341
341
  n = et(e, o, n, r);
342
342
  }), () => n;
343
343
  if (Array.isArray(t)) {
344
- const o = [], C = n && Array.isArray(n);
345
- if (ct(o, t, n, s))
344
+ const o = [], A = n && Array.isArray(n);
345
+ if (ct(o, t, n, i))
346
346
  return y(() => n = et(e, o, n, r, !0)), () => n;
347
347
  if (o.length === 0) {
348
- if (n = Me(e, n, r), u) return n;
349
- } else C ? n.length === 0 ? Ct(e, o, r) : cn(e, n, o) : (n && Me(e), Ct(e, o));
348
+ if (n = Le(e, n, r), u) return n;
349
+ } else A ? n.length === 0 ? Ct(e, o, r) : cn(e, n, o) : (n && Le(e), Ct(e, o));
350
350
  n = o;
351
351
  } else if (t.nodeType) {
352
352
  if (Array.isArray(n)) {
353
- if (u) return n = Me(e, n, r, t);
354
- Me(e, n, null, t);
353
+ if (u) return n = Le(e, n, r, t);
354
+ Le(e, n, null, t);
355
355
  } else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
356
356
  n = t;
357
357
  }
@@ -359,78 +359,78 @@ function et(e, t, n, r, s) {
359
359
  return n;
360
360
  }
361
361
  function ct(e, t, n, r) {
362
- let s = !1;
363
- for (let i = 0, u = t.length; i < u; i++) {
364
- let o = t[i], C = n && n[e.length], $;
365
- if (!(o == null || o === !0 || o === !1)) if (($ = typeof o) == "object" && o.nodeType)
362
+ let i = !1;
363
+ for (let s = 0, u = t.length; s < u; s++) {
364
+ let o = t[s], A = n && n[e.length], k;
365
+ if (!(o == null || o === !0 || o === !1)) if ((k = typeof o) == "object" && o.nodeType)
366
366
  e.push(o);
367
367
  else if (Array.isArray(o))
368
- s = ct(e, o, C) || s;
369
- else if ($ === "function")
368
+ i = ct(e, o, A) || i;
369
+ else if (k === "function")
370
370
  if (r) {
371
371
  for (; typeof o == "function"; ) o = o();
372
- s = ct(
372
+ i = ct(
373
373
  e,
374
374
  Array.isArray(o) ? o : [o],
375
- Array.isArray(C) ? C : [C]
376
- ) || s;
375
+ Array.isArray(A) ? A : [A]
376
+ ) || i;
377
377
  } else
378
- e.push(o), s = !0;
378
+ e.push(o), i = !0;
379
379
  else {
380
- const D = String(o);
381
- C && C.nodeType === 3 && C.data === D ? e.push(C) : e.push(document.createTextNode(D));
380
+ const g = String(o);
381
+ A && A.nodeType === 3 && A.data === g ? e.push(A) : e.push(document.createTextNode(g));
382
382
  }
383
383
  }
384
- return s;
384
+ return i;
385
385
  }
386
386
  function Ct(e, t, n = null) {
387
- for (let r = 0, s = t.length; r < s; r++) e.insertBefore(t[r], n);
387
+ for (let r = 0, i = t.length; r < i; r++) e.insertBefore(t[r], n);
388
388
  }
389
- function Me(e, t, n, r) {
389
+ function Le(e, t, n, r) {
390
390
  if (n === void 0) return e.textContent = "";
391
- const s = r || document.createTextNode("");
391
+ const i = r || document.createTextNode("");
392
392
  if (t.length) {
393
- let i = !1;
393
+ let s = !1;
394
394
  for (let u = t.length - 1; u >= 0; u--) {
395
395
  const o = t[u];
396
- if (s !== o) {
397
- const C = o.parentNode === e;
398
- !i && !u ? C ? e.replaceChild(s, o) : e.insertBefore(s, n) : C && o.remove();
399
- } else i = !0;
396
+ if (i !== o) {
397
+ const A = o.parentNode === e;
398
+ !s && !u ? A ? e.replaceChild(i, o) : e.insertBefore(i, n) : A && o.remove();
399
+ } else s = !0;
400
400
  }
401
- } else e.insertBefore(s, n);
402
- return [s];
401
+ } else e.insertBefore(i, n);
402
+ return [i];
403
403
  }
404
- function fn(e) {
404
+ function hn(e) {
405
405
  return Object.keys(e).reduce((n, r) => {
406
- const s = e[r];
407
- return n[r] = Object.assign({}, s), Lt(s.value) && !mn(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;
406
+ const i = e[r];
407
+ return n[r] = Object.assign({}, i), Lt(i.value) && !mn(i.value) && !Array.isArray(i.value) && (n[r].value = Object.assign({}, i.value)), Array.isArray(i.value) && (n[r].value = i.value.slice(0)), n;
408
408
  }, {});
409
409
  }
410
- function hn(e) {
410
+ function fn(e) {
411
411
  return e ? Object.keys(e).reduce((n, r) => {
412
- const s = e[r];
413
- return n[r] = Lt(s) && "value" in s ? s : {
414
- value: s
415
- }, n[r].attribute || (n[r].attribute = gn(r)), n[r].parse = "parse" in n[r] ? n[r].parse : typeof n[r].value != "string", n;
412
+ const i = e[r];
413
+ return n[r] = Lt(i) && "value" in i ? i : {
414
+ value: i
415
+ }, n[r].attribute || (n[r].attribute = Dn(r)), n[r].parse = "parse" in n[r] ? n[r].parse : typeof n[r].value != "string", n;
416
416
  }, {}) : {};
417
417
  }
418
418
  function pn(e) {
419
419
  return Object.keys(e).reduce((n, r) => (n[r] = e[r].value, n), {});
420
420
  }
421
- function Dn(e, t) {
422
- const n = fn(t);
423
- return Object.keys(t).forEach((s) => {
424
- const i = n[s], u = e.getAttribute(i.attribute), o = e[s];
425
- u != null && (i.value = i.parse ? Rt(u) : u), o != null && (i.value = Array.isArray(o) ? o.slice(0) : o), i.reflect && wt(e, i.attribute, i.value, !!i.parse), Object.defineProperty(e, s, {
421
+ function gn(e, t) {
422
+ const n = hn(t);
423
+ return Object.keys(t).forEach((i) => {
424
+ const s = n[i], u = e.getAttribute(s.attribute), o = e[i];
425
+ u != null && (s.value = s.parse ? Rt(u) : u), o != null && (s.value = Array.isArray(o) ? o.slice(0) : o), s.reflect && wt(e, s.attribute, s.value, !!s.parse), Object.defineProperty(e, i, {
426
426
  get() {
427
- return i.value;
427
+ return s.value;
428
428
  },
429
- set(C) {
430
- const $ = i.value;
431
- i.value = C, i.reflect && wt(this, i.attribute, i.value, !!i.parse);
432
- for (let D = 0, k = this.__propertyChangedCallbacks.length; D < k; D++)
433
- this.__propertyChangedCallbacks[D](s, C, $);
429
+ set(A) {
430
+ const k = s.value;
431
+ s.value = A, s.reflect && wt(this, s.attribute, s.value, !!s.parse);
432
+ for (let g = 0, q = this.__propertyChangedCallbacks.length; g < q; g++)
433
+ this.__propertyChangedCallbacks[g](i, A, k);
434
434
  },
435
435
  enumerable: !0,
436
436
  configurable: !0
@@ -447,10 +447,10 @@ function Rt(e) {
447
447
  }
448
448
  function wt(e, t, n, r) {
449
449
  if (n == null || n === !1) return e.removeAttribute(t);
450
- let s = r ? JSON.stringify(n) : n;
451
- e.__updating[t] = !0, s === "true" && (s = ""), e.setAttribute(t, s), Promise.resolve().then(() => delete e.__updating[t]);
450
+ let i = r ? JSON.stringify(n) : n;
451
+ e.__updating[t] = !0, i === "true" && (i = ""), e.setAttribute(t, i), Promise.resolve().then(() => delete e.__updating[t]);
452
452
  }
453
- function gn(e) {
453
+ function Dn(e) {
454
454
  return e.replace(/\.?([A-Z]+)/g, (t, n) => "-" + n.toLowerCase()).replace("_", "-").replace(/^-/, "");
455
455
  }
456
456
  function Lt(e) {
@@ -467,19 +467,19 @@ function vn(e, t) {
467
467
  const n = Object.keys(t);
468
468
  return class extends e {
469
469
  static get observedAttributes() {
470
- return n.map((s) => t[s].attribute);
470
+ return n.map((i) => t[i].attribute);
471
471
  }
472
472
  constructor() {
473
473
  super(), this.__initialized = !1, this.__released = !1, this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = {};
474
474
  }
475
475
  connectedCallback() {
476
476
  if (this.__initialized) return;
477
- this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = Dn(this, t);
478
- const s = pn(this.props), i = this.Component, u = ut;
477
+ this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = gn(this, t);
478
+ const i = pn(this.props), s = this.Component, u = ut;
479
479
  try {
480
- ut = this, this.__initialized = !0, bn(i) ? new i(s, {
480
+ ut = this, this.__initialized = !0, bn(s) ? new s(i, {
481
481
  element: this
482
- }) : i(s, {
482
+ }) : s(i, {
483
483
  element: this
484
484
  });
485
485
  } finally {
@@ -489,53 +489,53 @@ function vn(e, t) {
489
489
  async disconnectedCallback() {
490
490
  if (await Promise.resolve(), this.isConnected) return;
491
491
  this.__propertyChangedCallbacks.length = 0;
492
- let s = null;
493
- for (; s = this.__releaseCallbacks.pop(); ) s(this);
492
+ let i = null;
493
+ for (; i = this.__releaseCallbacks.pop(); ) i(this);
494
494
  delete this.__initialized, this.__released = !0;
495
495
  }
496
- attributeChangedCallback(s, i, u) {
497
- if (this.__initialized && !this.__updating[s] && (s = this.lookupProp(s), s in t)) {
498
- if (u == null && !this[s]) return;
499
- this[s] = t[s].parse ? Rt(u) : u;
496
+ attributeChangedCallback(i, s, u) {
497
+ if (this.__initialized && !this.__updating[i] && (i = this.lookupProp(i), i in t)) {
498
+ if (u == null && !this[i]) return;
499
+ this[i] = t[i].parse ? Rt(u) : u;
500
500
  }
501
501
  }
502
- lookupProp(s) {
502
+ lookupProp(i) {
503
503
  if (t)
504
- return n.find((i) => s === i || s === t[i].attribute);
504
+ return n.find((s) => i === s || i === t[s].attribute);
505
505
  }
506
506
  get renderRoot() {
507
507
  return this.shadowRoot || this.attachShadow({
508
508
  mode: "open"
509
509
  });
510
510
  }
511
- addReleaseCallback(s) {
512
- this.__releaseCallbacks.push(s);
511
+ addReleaseCallback(i) {
512
+ this.__releaseCallbacks.push(i);
513
513
  }
514
- addPropertyChangedCallback(s) {
515
- this.__propertyChangedCallbacks.push(s);
514
+ addPropertyChangedCallback(i) {
515
+ this.__propertyChangedCallbacks.push(i);
516
516
  }
517
517
  };
518
518
  }
519
519
  function Cn(e, t = {}, n = {}) {
520
520
  const {
521
521
  BaseElement: r = HTMLElement,
522
- extension: s,
523
- customElements: i = window.customElements
522
+ extension: i,
523
+ customElements: s = window.customElements
524
524
  } = n;
525
525
  return (u) => {
526
526
  if (!e) throw new Error("tag is required to register a Component");
527
- let o = i.get(e);
528
- return o ? (o.prototype.Component = u, o) : (o = vn(r, hn(t)), o.prototype.Component = u, o.prototype.registeredTag = e, i.define(e, o, s), o);
527
+ let o = s.get(e);
528
+ return o ? (o.prototype.Component = u, o) : (o = vn(r, fn(t)), o.prototype.Component = u, o.prototype.registeredTag = e, s.define(e, o, i), o);
529
529
  };
530
530
  }
531
531
  function wn(e) {
532
532
  const t = Object.keys(e), n = {};
533
533
  for (let r = 0; r < t.length; r++) {
534
- const [s, i] = w(e[t[r]]);
534
+ const [i, s] = w(e[t[r]]);
535
535
  Object.defineProperty(n, t[r], {
536
- get: s,
536
+ get: i,
537
537
  set(u) {
538
- i(() => u);
538
+ s(() => u);
539
539
  }
540
540
  });
541
541
  }
@@ -551,57 +551,57 @@ function An(e) {
551
551
  function En(e) {
552
552
  return (t, n) => {
553
553
  const { element: r } = n;
554
- return tn((s) => {
555
- const i = wn(t);
556
- r.addPropertyChangedCallback((o, C) => i[o] = C), r.addReleaseCallback(() => {
557
- r.renderRoot.textContent = "", s();
554
+ return tn((i) => {
555
+ const s = wn(t);
556
+ r.addPropertyChangedCallback((o, A) => s[o] = A), r.addReleaseCallback(() => {
557
+ r.renderRoot.textContent = "", i();
558
558
  });
559
- const u = e(i, n);
560
- return f(r.renderRoot, u);
559
+ const u = e(s, n);
560
+ return d(r.renderRoot, u);
561
561
  }, An(r));
562
562
  };
563
563
  }
564
- function gt(e, t, n) {
564
+ function Dt(e, t, n) {
565
565
  return arguments.length === 2 && (n = t, t = {}), Cn(e, t)(En(n));
566
566
  }
567
- var Fn = "٠١٢٣٤٥٦٧٨٩", yn = "۰۱۲۳۴۵۶۷۸۹", $n = "൦൧൨൩൪൫൬൭൮൯", kn = "೦೧೨೩೪೫೬೭೮೯", Bn = "໐໑໒໓໔໕໖໗໘໙", xn = "୦୧୨୩୪୫୬୭୮୯", Sn = "០១២៣៤៥៦៧៨៩", _n = "߀߁߂߃߄߅߆߇߈߉", Tn = "੦੧੨੩੪੫੬੭੮੯", On = "૦૧૨૩૪૫૬૭૮૯", In = "०१२३४५६७८९", Pn = "၀၁၂၃၄၅၆၇၈၉", zn = "௦௧௨௩௪௫௬௭௮௯", Nn = "౦౧౨౩౪౫౬౭౮౯", Mn = "๐๑๒๓๔๕๖๗๘๙", jn = "༠༡༢༣༤༥༦༧༨༩", At = { ar: Fn, fa: yn, ml: $n, kn, lo: Bn, or: xn, kh: Sn, nqo: _n, pa: Tn, gu: On, hi: In, my: Pn, ta: zn, te: Nn, th: Mn, bo: jn }, Rn = ["ru"], Ln = ["id"], qn = ["id"], Un = ["ady-cyrl"], Jn = ["aeb-arab"], Vn = ["sq"], Kn = ["ru"], Gn = ["zh-hant"], Hn = ["es"], Wn = ["hi"], Zn = ["es"], Yn = ["ar"], Xn = ["ar"], Qn = ["ar"], er = ["es"], tr = ["fr"], nr = ["ru"], rr = ["fr", "es", "ru"], sr = ["hi"], ir = ["es"], ar = ["fa"], ur = ["ru"], or = ["id"], lr = ["de"], cr = ["bbc-latn"], dr = ["fa"], fr = ["fa"], hr = ["bho"], pr = ["en"], Dr = ["id"], gr = ["fr"], mr = ["bn"], br = ["fa"], vr = ["fr"], Cr = ["id"], wr = ["id"], Ar = ["ru"], Er = ["oc"], Fr = ["nan", "zh-hant"], yr = ["ru"], $r = ["it"], kr = ["crh-latn"], Br = ["sk"], xr = ["pl"], Sr = ["ru"], _r = ["hsb", "de"], Tr = ["ms"], Or = ["ne"], Ir = ["it"], Pr = ["it"], zr = ["es"], Nr = ["fr"], Mr = ["fi"], jr = ["fr"], Rr = ["fr"], Lr = ["de"], qr = ["it"], Ur = ["tr"], Jr = ["gan-hant", "zh-hant", "zh-hans"], Vr = ["fr"], Kr = ["pt"], Gr = ["fa"], Hr = ["es"], Wr = ["gom-deva"], Zr = ["id"], Yr = ["de"], Xr = ["es"], Qr = ["zh-hant"], es = ["hif-latn"], ts = ["de"], ns = ["dsb", "de"], rs = ["fr"], ss = ["hy"], is = ["zh-cn", "zh-hans"], as = ["ru"], us = ["eo"], os = ["ike-cans"], ls = ["en"], cs = ["da"], ds = ["id"], fs = ["kk-latn", "kk-cyrl"], hs = ["fr"], ps = ["kbd-cyrl"], Ds = ["fr"], gs = ["ur"], ms = ["tr"], bs = ["my"], vs = ["kk-cyrl"], Cs = ["da"], ws = ["ru"], As = ["ru"], Es = ["fi"], Fs = ["ks-arab"], ys = ["de"], $s = ["ku-latn"], ks = ["ru"], Bs = ["ru"], xs = ["es"], Ss = ["de"], _s = ["ru"], Ts = ["ru", "az"], Os = ["nl"], Is = ["it"], Ps = ["et"], zs = ["fa"], Ns = ["it", "rm", "fur"], Ms = ["pms", "eml", "lij", "vec", "it"], js = ["fr"], Rs = ["fa"], Ls = ["lv"], qs = ["fa"], Us = ["zh-hant"], Js = ["tr"], Vs = ["id"], Ks = ["hi"], Gs = ["myv", "ru"], Hs = ["fr"], Ws = ["mrj", "ru"], Zs = ["id"], Ys = ["my"], Xs = ["ro"], Qs = ["mhr", "ru"], ei = ["pt"], ti = ["mdf", "ru"], ni = ["fa"], ri = ["es"], si = ["cdo", "zh-hant"], ii = ["it"], ai = ["nn"], ui = ["de"], oi = ["id"], li = ["nb"], ci = ["fr"], di = ["ca", "fr"], fi = ["fi"], hi = ["ru"], pi = ["fr"], Di = ["de"], gi = ["de"], mi = ["de"], bi = ["en"], vi = ["it"], Ci = ["el"], wi = ["pt-br"], Ai = ["qug", "es"], Ei = ["qu", "es"], Fi = ["it"], yi = ["ro"], $i = ["uk", "ru"], ki = ["ro"], Bi = ["ruq-latn", "ro"], xi = ["hi"], Si = ["ru"], _i = ["it"], Ti = ["en"], Oi = ["it"], Ii = ["cbk", "fa"], Pi = ["fr"], zi = ["fr"], Ni = ["lt"], Mi = ["bs", "sr-el", "hr"], ji = ["fr"], Ri = ["shy-latn"], Li = ["cs"], qi = ["skr-arab"], Ui = ["de"], Ji = ["fi"], Vi = ["sr-ec"], Ki = ["nl"], Gi = ["de"], Hi = ["ru"], Wi = ["id"], Zi = ["pl"], Yi = ["zh-tw", "zh-hant", "zh-hans"], Xi = ["zh-tw", "zh-hant", "zh-hans"], Qi = ["kn"], ea = ["pt"], ta = ["tg-cyrl"], na = ["zh-tw", "zh-hant", "zh-hans"], ra = ["tt-cyrl", "ru"], sa = ["fr"], ia = ["ru"], aa = ["ru"], ua = ["ug-arab"], oa = ["it"], la = ["et"], ca = ["nl"], da = ["de"], fa = ["fi"], ha = ["et"], pa = ["fr"], Da = ["fr"], ga = ["zh-hans"], ma = ["ru"], ba = ["ka"], va = ["he"], Ca = ["zh-hans"], wa = ["nl"], Aa = ["kab"], Ea = ["zh-hans"], qt = { ab: Rn, abs: Ln, ace: qn, ady: Un, aeb: Jn, "aeb-arab": ["ar"], aln: Vn, alt: Kn, ami: Gn, an: Hn, anp: Wn, arn: Zn, arq: Yn, ary: Xn, arz: Qn, ast: er, atj: tr, av: nr, avk: rr, awa: sr, ay: ir, azb: ar, ba: ur, ban: or, "ban-bali": ["ban"], bar: lr, bbc: cr, "bbc-latn": ["id"], bcc: dr, "be-tarask": ["be"], bgn: fr, bh: hr, bi: pr, bjn: Dr, bm: gr, bpy: mr, bqi: br, br: vr, btm: Cr, bug: wr, bxr: Ar, ca: Er, "cbk-zam": ["es"], cdo: Fr, ce: yr, co: $r, crh: kr, "crh-cyrl": ["ru"], cs: Br, csb: xr, cv: Sr, "de-at": ["de"], "de-ch": ["de"], "de-formal": ["de"], dsb: _r, dtp: Tr, dty: Or, egl: Ir, eml: Pr, "en-ca": ["en"], "en-gb": ["en"], "es-419": ["es"], "es-formal": ["es"], ext: zr, ff: Nr, fit: Mr, frc: jr, frp: Rr, frr: Lr, fur: qr, gag: Ur, gan: Jr, "gan-hans": ["zh-hans"], "gan-hant": ["zh-hant", "zh-hans"], gcr: Vr, gl: Kr, glk: Gr, gn: Hr, gom: Wr, "gom-deva": ["hi"], gor: Zr, gsw: Yr, guc: Xr, hak: Qr, hif: es, hrx: ts, hsb: ns, ht: rs, "hu-formal": ["hu"], hyw: ss, ii: is, inh: as, io: us, iu: os, jam: ls, jut: cs, jv: ds, kaa: fs, kab: hs, kbd: ps, kbp: Ds, khw: gs, kiu: ms, kjp: bs, kk: vs, "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: ws, krc: As, krl: Es, ks: Fs, ksh: ys, ku: $s, "ku-arab": ["ckb"], kum: ks, kv: Bs, lad: xs, lb: Ss, lbe: _s, lez: Ts, li: Os, lij: Is, liv: Ps, lki: zs, lld: Ns, lmo: Ms, ln: js, lrc: Rs, ltg: Ls, luz: qs, lzh: Us, lzz: Js, mad: Vs, mai: Ks, "map-bms": ["jv", "id"], mdf: Gs, mg: Hs, mhr: Ws, min: Zs, mnw: Ys, mo: Xs, mrj: Qs, "ms-arab": ["ms"], mwl: ei, myv: ti, mzn: ni, nah: ri, nan: si, nap: ii, nb: ai, nds: ui, "nds-nl": ["nl"], nia: oi, "nl-informal": ["nl"], nn: li, nrm: ci, oc: di, olo: fi, os: hi, pcd: pi, pdc: Di, pdt: gi, pfl: mi, pih: bi, pms: vi, pnt: Ci, pt: wi, "pt-br": ["pt"], qu: Ai, qug: Ei, rgn: Fi, rmy: yi, "roa-tara": ["it"], rue: $i, rup: ki, ruq: Bi, "ruq-cyrl": ["mk"], "ruq-latn": ["ro"], sa: xi, sah: Si, scn: _i, sco: Ti, sdc: Oi, sdh: Ii, ses: Pi, sg: zi, sgs: Ni, sh: Mi, shi: ji, shy: Ri, "shy-latn": ["fr"], sk: Li, skr: qi, "skr-arab": ["ur", "pnb"], sli: Ui, smn: Ji, sr: Vi, srn: Ki, stq: Gi, sty: Hi, su: Wi, szl: Zi, szy: Yi, tay: Xi, tcy: Qi, tet: ea, tg: ta, trv: na, tt: ra, "tt-cyrl": ["ru"], ty: sa, tyv: ia, udm: aa, ug: ua, vec: oa, vep: la, vls: ca, vmf: da, vot: fa, vro: ha, wa: pa, wo: Da, wuu: ga, xal: ma, xmf: ba, yi: va, za: Ca, zea: wa, zgh: Aa, zh: Ea, "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"] };
568
- let De = class {
567
+ var Fn = "٠١٢٣٤٥٦٧٨٩", yn = "۰۱۲۳۴۵۶۷۸۹", $n = "൦൧൨൩൪൫൬൭൮൯", kn = "೦೧೨೩೪೫೬೭೮೯", Bn = "໐໑໒໓໔໕໖໗໘໙", xn = "୦୧୨୩୪୫୬୭୮୯", _n = "០១២៣៤៥៦៧៨៩", Sn = "߀߁߂߃߄߅߆߇߈߉", Tn = "੦੧੨੩੪੫੬੭੮੯", On = "૦૧૨૩૪૫૬૭૮૯", In = "०१२३४५६७८९", Pn = "၀၁၂၃၄၅၆၇၈၉", zn = "௦௧௨௩௪௫௬௭௮௯", Mn = "౦౧౨౩౪౫౬౭౮౯", Nn = "๐๑๒๓๔๕๖๗๘๙", jn = "༠༡༢༣༤༥༦༧༨༩", At = { ar: Fn, fa: yn, ml: $n, kn, lo: Bn, or: xn, kh: _n, nqo: Sn, pa: Tn, gu: On, hi: In, my: Pn, ta: zn, te: Mn, th: Nn, bo: jn }, Rn = ["ru"], Ln = ["id"], Un = ["id"], qn = ["ady-cyrl"], Jn = ["aeb-arab"], Vn = ["sq"], Gn = ["ru"], Kn = ["zh-hant"], Hn = ["es"], Wn = ["hi"], Zn = ["es"], Yn = ["ar"], Xn = ["ar"], Qn = ["ar"], er = ["es"], tr = ["fr"], nr = ["ru"], rr = ["fr", "es", "ru"], ir = ["hi"], sr = ["es"], ar = ["fa"], ur = ["ru"], or = ["id"], lr = ["de"], cr = ["bbc-latn"], dr = ["fa"], hr = ["fa"], fr = ["bho"], pr = ["en"], gr = ["id"], Dr = ["fr"], mr = ["bn"], br = ["fa"], vr = ["fr"], Cr = ["id"], wr = ["id"], Ar = ["ru"], Er = ["oc"], Fr = ["nan", "zh-hant"], yr = ["ru"], $r = ["it"], kr = ["crh-latn"], Br = ["sk"], xr = ["pl"], _r = ["ru"], Sr = ["hsb", "de"], Tr = ["ms"], Or = ["ne"], Ir = ["it"], Pr = ["it"], zr = ["es"], Mr = ["fr"], Nr = ["fi"], jr = ["fr"], Rr = ["fr"], Lr = ["de"], Ur = ["it"], qr = ["tr"], Jr = ["gan-hant", "zh-hant", "zh-hans"], Vr = ["fr"], Gr = ["pt"], Kr = ["fa"], Hr = ["es"], Wr = ["gom-deva"], Zr = ["id"], Yr = ["de"], Xr = ["es"], Qr = ["zh-hant"], ei = ["hif-latn"], ti = ["de"], ni = ["dsb", "de"], ri = ["fr"], ii = ["hy"], si = ["zh-cn", "zh-hans"], ai = ["ru"], ui = ["eo"], oi = ["ike-cans"], li = ["en"], ci = ["da"], di = ["id"], hi = ["kk-latn", "kk-cyrl"], fi = ["fr"], pi = ["kbd-cyrl"], gi = ["fr"], Di = ["ur"], mi = ["tr"], bi = ["my"], vi = ["kk-cyrl"], Ci = ["da"], wi = ["ru"], Ai = ["ru"], Ei = ["fi"], Fi = ["ks-arab"], yi = ["de"], $i = ["ku-latn"], ki = ["ru"], Bi = ["ru"], xi = ["es"], _i = ["de"], Si = ["ru"], Ti = ["ru", "az"], Oi = ["nl"], Ii = ["it"], Pi = ["et"], zi = ["fa"], Mi = ["it", "rm", "fur"], Ni = ["pms", "eml", "lij", "vec", "it"], ji = ["fr"], Ri = ["fa"], Li = ["lv"], Ui = ["fa"], qi = ["zh-hant"], Ji = ["tr"], Vi = ["id"], Gi = ["hi"], Ki = ["myv", "ru"], Hi = ["fr"], Wi = ["mrj", "ru"], Zi = ["id"], Yi = ["my"], Xi = ["ro"], Qi = ["mhr", "ru"], es = ["pt"], ts = ["mdf", "ru"], ns = ["fa"], rs = ["es"], is = ["cdo", "zh-hant"], ss = ["it"], as = ["nn"], us = ["de"], os = ["id"], ls = ["nb"], cs = ["fr"], ds = ["ca", "fr"], hs = ["fi"], fs = ["ru"], ps = ["fr"], gs = ["de"], Ds = ["de"], ms = ["de"], bs = ["en"], vs = ["it"], Cs = ["el"], ws = ["pt-br"], As = ["qug", "es"], Es = ["qu", "es"], Fs = ["it"], ys = ["ro"], $s = ["uk", "ru"], ks = ["ro"], Bs = ["ruq-latn", "ro"], xs = ["hi"], _s = ["ru"], Ss = ["it"], Ts = ["en"], Os = ["it"], Is = ["cbk", "fa"], Ps = ["fr"], zs = ["fr"], Ms = ["lt"], Ns = ["bs", "sr-el", "hr"], js = ["fr"], Rs = ["shy-latn"], Ls = ["cs"], Us = ["skr-arab"], qs = ["de"], Js = ["fi"], Vs = ["sr-ec"], Gs = ["nl"], Ks = ["de"], Hs = ["ru"], Ws = ["id"], Zs = ["pl"], Ys = ["zh-tw", "zh-hant", "zh-hans"], Xs = ["zh-tw", "zh-hant", "zh-hans"], Qs = ["kn"], ea = ["pt"], ta = ["tg-cyrl"], na = ["zh-tw", "zh-hant", "zh-hans"], ra = ["tt-cyrl", "ru"], ia = ["fr"], sa = ["ru"], aa = ["ru"], ua = ["ug-arab"], oa = ["it"], la = ["et"], ca = ["nl"], da = ["de"], ha = ["fi"], fa = ["et"], pa = ["fr"], ga = ["fr"], Da = ["zh-hans"], ma = ["ru"], ba = ["ka"], va = ["he"], Ca = ["zh-hans"], wa = ["nl"], Aa = ["kab"], Ea = ["zh-hans"], Ut = { ab: Rn, abs: Ln, ace: Un, ady: qn, aeb: Jn, "aeb-arab": ["ar"], aln: Vn, alt: Gn, ami: Kn, an: Hn, anp: Wn, arn: Zn, arq: Yn, ary: Xn, arz: Qn, ast: er, atj: tr, av: nr, avk: rr, awa: ir, ay: sr, azb: ar, ba: ur, ban: or, "ban-bali": ["ban"], bar: lr, bbc: cr, "bbc-latn": ["id"], bcc: dr, "be-tarask": ["be"], bgn: hr, bh: fr, bi: pr, bjn: gr, bm: Dr, bpy: mr, bqi: br, br: vr, btm: Cr, bug: wr, bxr: Ar, ca: Er, "cbk-zam": ["es"], cdo: Fr, ce: yr, co: $r, crh: kr, "crh-cyrl": ["ru"], cs: Br, csb: xr, cv: _r, "de-at": ["de"], "de-ch": ["de"], "de-formal": ["de"], dsb: Sr, dtp: Tr, dty: Or, egl: Ir, eml: Pr, "en-ca": ["en"], "en-gb": ["en"], "es-419": ["es"], "es-formal": ["es"], ext: zr, ff: Mr, fit: Nr, frc: jr, frp: Rr, frr: Lr, fur: Ur, gag: qr, gan: Jr, "gan-hans": ["zh-hans"], "gan-hant": ["zh-hant", "zh-hans"], gcr: Vr, gl: Gr, glk: Kr, gn: Hr, gom: Wr, "gom-deva": ["hi"], gor: Zr, gsw: Yr, guc: Xr, hak: Qr, hif: ei, hrx: ti, hsb: ni, ht: ri, "hu-formal": ["hu"], hyw: ii, ii: si, inh: ai, io: ui, iu: oi, jam: li, jut: ci, jv: di, kaa: hi, kab: fi, kbd: pi, kbp: gi, khw: Di, kiu: mi, kjp: bi, kk: vi, "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: Ci, "ko-kp": ["ko"], koi: wi, krc: Ai, krl: Ei, ks: Fi, ksh: yi, ku: $i, "ku-arab": ["ckb"], kum: ki, kv: Bi, lad: xi, lb: _i, lbe: Si, lez: Ti, li: Oi, lij: Ii, liv: Pi, lki: zi, lld: Mi, lmo: Ni, ln: ji, lrc: Ri, ltg: Li, luz: Ui, lzh: qi, lzz: Ji, mad: Vi, mai: Gi, "map-bms": ["jv", "id"], mdf: Ki, mg: Hi, mhr: Wi, min: Zi, mnw: Yi, mo: Xi, mrj: Qi, "ms-arab": ["ms"], mwl: es, myv: ts, mzn: ns, nah: rs, nan: is, nap: ss, nb: as, nds: us, "nds-nl": ["nl"], nia: os, "nl-informal": ["nl"], nn: ls, nrm: cs, oc: ds, olo: hs, os: fs, pcd: ps, pdc: gs, pdt: Ds, pfl: ms, pih: bs, pms: vs, pnt: Cs, pt: ws, "pt-br": ["pt"], qu: As, qug: Es, rgn: Fs, rmy: ys, "roa-tara": ["it"], rue: $s, rup: ks, ruq: Bs, "ruq-cyrl": ["mk"], "ruq-latn": ["ro"], sa: xs, sah: _s, scn: Ss, sco: Ts, sdc: Os, sdh: Is, ses: Ps, sg: zs, sgs: Ms, sh: Ns, shi: js, shy: Rs, "shy-latn": ["fr"], sk: Ls, skr: Us, "skr-arab": ["ur", "pnb"], sli: qs, smn: Js, sr: Vs, srn: Gs, stq: Ks, sty: Hs, su: Ws, szl: Zs, szy: Ys, tay: Xs, tcy: Qs, tet: ea, tg: ta, trv: na, tt: ra, "tt-cyrl": ["ru"], ty: ia, tyv: sa, udm: aa, ug: ua, vec: oa, vep: la, vls: ca, vmf: da, vot: ha, vro: fa, wa: pa, wo: ga, wuu: Da, xal: ma, xmf: ba, yi: va, za: Ca, zea: wa, zgh: Aa, zh: Ea, "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"] };
568
+ let ve = class {
569
569
  constructor(e) {
570
570
  this.locale = e;
571
571
  }
572
572
  convertPlural(e, t) {
573
573
  const n = /\d+=/i;
574
574
  if (!t || t.length === 0) return "";
575
- for (let s = 0; s < t.length; s++) {
576
- const i = t[s];
577
- if (n.test(i)) {
578
- if (parseInt(i.slice(0, i.indexOf("=")), 10) === e) return i.slice(i.indexOf("=") + 1);
579
- t[s] = void 0;
575
+ for (let i = 0; i < t.length; i++) {
576
+ const s = t[i];
577
+ if (n.test(s)) {
578
+ if (parseInt(s.slice(0, s.indexOf("=")), 10) === e) return s.slice(s.indexOf("=") + 1);
579
+ t[i] = void 0;
580
580
  }
581
581
  }
582
- t = t.filter((s) => !!s);
582
+ t = t.filter((i) => !!i);
583
583
  let r = this.getPluralForm(e, this.locale);
584
584
  return r = Math.min(r, t.length - 1), t[r];
585
585
  }
586
586
  getPluralForm(e, t) {
587
- const n = ["zero", "one", "two", "few", "many", "other"], r = new Intl.PluralRules(t), s = r.resolvedOptions().pluralCategories, i = r.select(e);
588
- return n.filter((u) => s.includes(u)).indexOf(i);
587
+ const n = ["zero", "one", "two", "few", "many", "other"], r = new Intl.PluralRules(t), i = r.resolvedOptions().pluralCategories, s = r.select(e);
588
+ return n.filter((u) => i.includes(u)).indexOf(s);
589
589
  }
590
590
  convertNumber(e, t = !1) {
591
591
  let n = this.digitTransformTable(this.locale), r = "";
592
592
  if (t) {
593
593
  if (parseFloat(e, 10) === e || !n) return e;
594
- const s = [];
595
- for (const u in n) s[n[u]] = u;
596
- n = s;
597
- const i = String(e);
598
- for (let u = 0; u < i.length; u++) r += n[i[u]] || i[u];
594
+ const i = [];
595
+ for (const u in n) i[n[u]] = u;
596
+ n = i;
597
+ const s = String(e);
598
+ for (let u = 0; u < s.length; u++) r += n[s[u]] || s[u];
599
599
  return parseFloat(r, 10);
600
600
  }
601
601
  if (Intl.NumberFormat) {
602
- let s;
603
- const i = [...qt[this.locale] || [], "en"];
604
- return Intl.NumberFormat.supportedLocalesOf(this.locale).length ? s = [this.locale] : s = i, r = new Intl.NumberFormat(s).format(e), r === "NaN" && (r = e), r;
602
+ let i;
603
+ const s = [...Ut[this.locale] || [], "en"];
604
+ return Intl.NumberFormat.supportedLocalesOf(this.locale).length ? i = [this.locale] : i = s, r = new Intl.NumberFormat(i).format(e), r === "NaN" && (r = e), r;
605
605
  }
606
606
  }
607
607
  convertGrammar(e) {
@@ -615,7 +615,7 @@ let De = class {
615
615
  digitTransformTable(e) {
616
616
  return At[e] ? At[e].split("") : !1;
617
617
  }
618
- }, Fa = class extends De {
618
+ }, Fa = class extends ve {
619
619
  convertGrammar(e, t) {
620
620
  switch (t) {
621
621
  case "prefixed":
@@ -624,7 +624,7 @@ let De = class {
624
624
  }
625
625
  return e;
626
626
  }
627
- }, ya = class extends De {
627
+ }, ya = class extends ve {
628
628
  convertGrammar(t, n) {
629
629
  switch (n) {
630
630
  case "instrumental":
@@ -636,7 +636,7 @@ let De = class {
636
636
  }
637
637
  return t;
638
638
  }
639
- }, $a = class extends De {
639
+ }, $a = class extends ve {
640
640
  convertGrammar(e, t) {
641
641
  switch (t) {
642
642
  case "instrumental":
@@ -648,7 +648,7 @@ let De = class {
648
648
  }
649
649
  return e;
650
650
  }
651
- }, ka = class extends De {
651
+ }, ka = class extends ve {
652
652
  convertGrammar(e, t) {
653
653
  switch (t) {
654
654
  case "instrumental":
@@ -660,7 +660,7 @@ let De = class {
660
660
  }
661
661
  return e;
662
662
  }
663
- }, Ba = class extends De {
663
+ }, Ba = class extends ve {
664
664
  convertGrammar(e, t) {
665
665
  let n = e.match(/[aou][^äöy]*$/i);
666
666
  const r = e;
@@ -686,12 +686,12 @@ let De = class {
686
686
  }
687
687
  return e;
688
688
  }
689
- }, xa = class extends De {
689
+ }, xa = class extends ve {
690
690
  convertGrammar(e, t) {
691
691
  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;
692
692
  }
693
693
  };
694
- class Sa extends De {
694
+ class _a extends ve {
695
695
  convertGrammar(t, n) {
696
696
  switch (n) {
697
697
  case "mestnik":
@@ -704,7 +704,7 @@ class Sa extends De {
704
704
  return t;
705
705
  }
706
706
  }
707
- let _a = class extends De {
707
+ let Sa = class extends ve {
708
708
  convertGrammar(e, t) {
709
709
  switch (t) {
710
710
  case "genitive":
@@ -720,12 +720,12 @@ let _a = class extends De {
720
720
  return e;
721
721
  }
722
722
  };
723
- class Ta extends De {
723
+ class Ta extends ve {
724
724
  convertGrammar(t, n) {
725
725
  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;
726
726
  }
727
727
  }
728
- let Oa = class extends De {
728
+ let Oa = class extends ve {
729
729
  convertGrammar(e, t) {
730
730
  if (t === "ainmlae") switch (e) {
731
731
  case "an Domhnach":
@@ -752,7 +752,7 @@ let Oa = class extends De {
752
752
  }
753
753
  return e;
754
754
  }
755
- }, Ia = class extends De {
755
+ }, Ia = class extends ve {
756
756
  convertGrammar(e, t) {
757
757
  switch (t) {
758
758
  case "rol":
@@ -767,36 +767,36 @@ let Oa = class extends De {
767
767
  }
768
768
  return e;
769
769
  }
770
- }, Pa = class extends De {
770
+ }, Pa = class extends ve {
771
771
  convertGrammar(e, t) {
772
- let n, r, s, i;
773
- 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) {
772
+ let n, r, i, s;
773
+ switch (n = "мæ", r = "", i = "", s = "", 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) || (i = "-"), t) {
774
774
  case "genitive":
775
- i = s + r + "ы";
775
+ s = i + r + "ы";
776
776
  break;
777
777
  case "dative":
778
- i = s + r + "æн";
778
+ s = i + r + "æн";
779
779
  break;
780
780
  case "allative":
781
- i = s + n;
781
+ s = i + n;
782
782
  break;
783
783
  case "ablative":
784
- r === "й" ? i = s + r + "æ" : i = s + r + "æй";
784
+ r === "й" ? s = i + r + "æ" : s = i + r + "æй";
785
785
  break;
786
786
  case "superessive":
787
- i = s + r + "ыл";
787
+ s = i + r + "ыл";
788
788
  break;
789
789
  case "equative":
790
- i = s + r + "ау";
790
+ s = i + r + "ау";
791
791
  break;
792
792
  case "comitative":
793
- i = s + "имæ";
793
+ s = i + "имæ";
794
794
  break;
795
795
  }
796
- return e + i;
796
+ return e + s;
797
797
  }
798
798
  };
799
- class za extends De {
799
+ class za extends ve {
800
800
  convertGrammar(t, n) {
801
801
  switch (n) {
802
802
  case "genitive":
@@ -809,22 +809,22 @@ class za extends De {
809
809
  return t;
810
810
  }
811
811
  }
812
- var Et = { bs: ya, default: De, dsb: $a, fi: Ba, ga: Oa, he: Fa, hsb: ka, hu: Ia, hy: Ta, la: _a, os: Pa, ru: xa, sl: Sa, uk: za };
813
- const Na = 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]))");
814
- let Ut = class {
812
+ var Et = { bs: ya, default: ve, dsb: $a, fi: Ba, ga: Oa, he: Fa, hsb: ka, hu: Ia, hy: Ta, la: Sa, os: Pa, ru: xa, sl: _a, uk: za };
813
+ const Ma = 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]))");
814
+ let qt = class {
815
815
  constructor(e) {
816
- this.locale = je(e), this.language = new (Et[this.locale] || Et.default)(this.locale);
816
+ this.locale = Ue(e), this.language = new (Et[this.locale] || Et.default)(this.locale);
817
817
  }
818
818
  emit(e, t) {
819
- let n, r, s;
819
+ let n, r, i;
820
820
  switch (typeof e) {
821
821
  case "string":
822
822
  case "number":
823
823
  n = e;
824
824
  break;
825
825
  case "object":
826
- if (r = e.slice(1).map((i) => this.emit(i, t)), s = e[0].toLowerCase(), typeof this[s] == "function") n = this[s](r, t);
827
- else throw new Error('unknown operation "' + s + '"');
826
+ if (r = e.slice(1).map((s) => this.emit(s, t)), i = e[0].toLowerCase(), typeof this[i] == "function") n = this[i](r, t);
827
+ else throw new Error('unknown operation "' + i + '"');
828
828
  break;
829
829
  case "undefined":
830
830
  n = "";
@@ -867,7 +867,7 @@ let Ut = class {
867
867
  return `<a href="${e[0]}">${e[1]}</a>`;
868
868
  }
869
869
  bidi(e) {
870
- const t = Ma(e[0]);
870
+ const t = Na(e[0]);
871
871
  return t === "ltr" ? "‪" + e[0] + "‬" : t === "rtl" ? "‫" + e[0] + "‬" : e[0];
872
872
  }
873
873
  formatnum(e) {
@@ -881,18 +881,18 @@ let Ut = class {
881
881
  }
882
882
  htmlelement(e) {
883
883
  const t = e.shift(), n = e.shift();
884
- let r = e, s = "";
885
- for (const u in n) s += ` ${u}="${n[u]}"`;
884
+ let r = e, i = "";
885
+ for (const u in n) i += ` ${u}="${n[u]}"`;
886
886
  Array.isArray(r) || (r = [r]);
887
- const i = r.join("");
888
- return `<${t}${s}>${i}</${t}>`;
887
+ const s = r.join("");
888
+ return `<${t}${i}>${s}</${t}>`;
889
889
  }
890
890
  };
891
- function je(e) {
891
+ function Ue(e) {
892
892
  return typeof e == "string" ? e.toLowerCase() : e;
893
893
  }
894
- function Ma(e) {
895
- const t = e.match(Na);
894
+ function Na(e) {
895
+ const t = e.match(Ma);
896
896
  return t ? t[2] === void 0 ? "ltr" : "rtl" : null;
897
897
  }
898
898
  function ja(e, { wikilinks: t = !1 } = {}) {
@@ -900,34 +900,34 @@ function ja(e, { wikilinks: t = !1 } = {}) {
900
900
  function r(c) {
901
901
  return () => {
902
902
  for (let m = 0; m < c.length; m++) {
903
- const T = c[m]();
904
- if (T !== null) return T;
903
+ const I = c[m]();
904
+ if (I !== null) return I;
905
905
  }
906
906
  return null;
907
907
  };
908
908
  }
909
- function s(c) {
910
- const m = n, T = [];
911
- for (let S = 0; S < c.length; S++) {
912
- const te = c[S]();
913
- if (te === null) return n = m, null;
914
- T.push(te);
909
+ function i(c) {
910
+ const m = n, I = [];
911
+ for (let _ = 0; _ < c.length; _++) {
912
+ const ne = c[_]();
913
+ if (ne === null) return n = m, null;
914
+ I.push(ne);
915
915
  }
916
- return T;
916
+ return I;
917
917
  }
918
- function i(c, m) {
918
+ function s(c, m) {
919
919
  return () => {
920
- const T = n, S = [];
921
- let te = m();
922
- for (; te !== null; ) S.push(te), te = m();
923
- return S.length < c ? (n = T, null) : S;
920
+ const I = n, _ = [];
921
+ let ne = m();
922
+ for (; ne !== null; ) _.push(ne), ne = m();
923
+ return _.length < c ? (n = I, null) : _;
924
924
  };
925
925
  }
926
926
  function u(c) {
927
927
  const m = c.length;
928
928
  return () => {
929
- let T = null;
930
- return e.slice(n, n + m) === c && (T = c, n += m), T;
929
+ let I = null;
930
+ return e.slice(n, n + m) === c && (I = c, n += m), I;
931
931
  };
932
932
  }
933
933
  function o(c) {
@@ -936,142 +936,142 @@ function ja(e, { wikilinks: t = !1 } = {}) {
936
936
  return m === null ? null : (n += m[0].length, m[0]);
937
937
  };
938
938
  }
939
- const C = o(/^\s+/), $ = u("|"), D = u(":"), k = u("\\"), ue = o(/^./), fe = u("$"), Fe = o(/^\d+/), R = u('"'), Z = u("'"), Y = o(t ? /^[^{}[\]$<\\]/ : /^[^{}$<\\]/), oe = o(t ? /^[^{}[\]$\\|]/ : /^[^{}$\\|]/), H = o(t ? /^[^{}[\]$\s]/ : /^[^{}$\s]/);
940
- function ne(c, m) {
939
+ const A = o(/^\s+/), k = u("|"), g = u(":"), q = u("\\"), Ae = o(/^./), Ce = u("$"), $e = o(/^\d+/), S = u('"'), re = u("'"), ue = o(t ? /^[^{}[\]$<\\]/ : /^[^{}$<\\]/), ke = o(t ? /^[^{}[\]$\\|]/ : /^[^{}$\\|]/), Fe = o(t ? /^[^{}[\]$\s]/ : /^[^{}$\s]/);
940
+ function Be(c, m) {
941
941
  return () => {
942
- const T = c();
943
- return T === null ? null : m(T);
942
+ const I = c();
943
+ return I === null ? null : m(I);
944
944
  };
945
945
  }
946
- function V() {
947
- const c = i(1, ee)();
946
+ function B() {
947
+ const c = s(1, ie)();
948
948
  return c === null ? null : c.join("");
949
949
  }
950
- function Ae() {
951
- const c = i(1, $e)();
950
+ function oe() {
951
+ const c = s(1, se)();
952
952
  return c === null ? null : c.join("");
953
953
  }
954
- const ye = r([B, H]);
955
- function Ee() {
956
- const c = i(1, ye)();
954
+ const H = r([Y, Fe]);
955
+ function De() {
956
+ const c = s(1, H)();
957
957
  return c === null ? null : c.join("");
958
958
  }
959
- function B() {
960
- const c = s([k, ue]);
959
+ function Y() {
960
+ const c = i([q, Ae]);
961
961
  return c === null ? null : c[1];
962
962
  }
963
- const ee = r([B, oe]), $e = r([B, Y]);
964
- function he() {
965
- const c = s([fe, Fe]);
963
+ const ie = r([Y, ke]), se = r([Y, ue]);
964
+ function le() {
965
+ const c = i([Ce, $e]);
966
966
  return c === null ? null : ["REPLACE", parseInt(c[1], 10) - 1];
967
967
  }
968
- const ge = ne(o(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/), function(c) {
968
+ const me = Be(o(/^[ !"$&'()*,./0-9;=?@A-Z^_`a-z~\x80-\xFF+-]+/), function(c) {
969
969
  return c.toString();
970
970
  });
971
971
  function b() {
972
- const c = s([$, i(0, K)]);
972
+ const c = i([k, s(0, W)]);
973
973
  if (c === null) return null;
974
974
  const m = c[1];
975
975
  return m.length > 1 ? ["CONCAT"].concat(m) : m[0];
976
976
  }
977
- function me() {
978
- const c = s([ge, D, he]);
977
+ function $() {
978
+ const c = i([me, g, le]);
979
979
  return c === null ? null : [c[0], c[2]];
980
980
  }
981
- function Le() {
982
- const c = s([ge, D, K]);
981
+ function O() {
982
+ const c = i([me, g, W]);
983
983
  return c === null ? null : [c[0], c[2]];
984
984
  }
985
- function be() {
986
- const c = s([ge, D]);
985
+ function z() {
986
+ const c = i([me, g]);
987
987
  return c === null ? null : [c[0], ""];
988
988
  }
989
- const ze = r([function() {
990
- const c = s([r([me, Le, be]), i(0, b)]);
989
+ const te = r([function() {
990
+ const c = i([r([$, O, z]), s(0, b)]);
991
991
  return c === null ? null : c[0].concat(c[1]);
992
992
  }, function() {
993
- const c = s([ge, i(0, b)]);
993
+ const c = i([me, s(0, b)]);
994
994
  return c === null ? null : [c[0]].concat(c[1]);
995
- }]), qe = u("{{"), Ue = u("}}"), Oe = u("[["), Ie = u("]]"), Pe = u("["), Ne = u("]");
996
- function Ce() {
997
- const c = s([qe, ze, Ue]);
995
+ }]), Se = u("{{"), Te = u("}}"), Me = u("[["), Ne = u("]]"), je = u("["), Re = u("]");
996
+ function Ee() {
997
+ const c = i([Se, te, Te]);
998
998
  return c === null ? null : c[1];
999
999
  }
1000
- function xe() {
1001
- const c = s([i(1, K), $, i(1, U)]);
1000
+ function Oe() {
1001
+ const c = i([s(1, W), k, s(1, G)]);
1002
1002
  return c === null ? null : [["CONCAT"].concat(c[0]), ["CONCAT"].concat(c[2])];
1003
1003
  }
1004
- function Se() {
1005
- const c = s([i(1, K)]);
1004
+ function Ie() {
1005
+ const c = i([s(1, W)]);
1006
1006
  return c === null ? null : [["CONCAT"].concat(c[0])];
1007
1007
  }
1008
- const A = r([xe, Se]);
1009
- function v() {
1008
+ const E = r([Oe, Ie]);
1009
+ function C() {
1010
1010
  let c = null;
1011
- const m = s([Oe, A, Ie]);
1011
+ const m = i([Me, E, Ne]);
1012
1012
  if (m !== null) {
1013
- const T = m[1];
1014
- c = ["WIKILINK"].concat(T);
1013
+ const I = m[1];
1014
+ c = ["WIKILINK"].concat(I);
1015
1015
  }
1016
1016
  return c;
1017
1017
  }
1018
1018
  function x() {
1019
1019
  let c = null;
1020
- const m = s([Pe, i(1, N), C, i(1, U), Ne]);
1020
+ const m = i([je, s(1, R), A, s(1, G), Re]);
1021
1021
  return m !== null && (c = ["EXTLINK", m[1].length === 1 ? m[1][0] : ["CONCAT"].concat(m[1]), ["CONCAT"].concat(m[3])]), c;
1022
1022
  }
1023
- const j = o(/^[A-Za-z]+/);
1024
- function d(c, m, T, S = { 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: {} }) {
1025
- if (c = c.toLowerCase(), m = m.toLowerCase(), c !== m || S.allowedHtmlElements.indexOf(c) === -1) return !1;
1026
- const te = /[\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;
1027
- for (let re = 0, se = T.length; re < se; re += 2) {
1028
- const ce = T[re];
1029
- if (S.allowedHtmlCommonAttributes.indexOf(ce) === -1 && (S.allowedHtmlAttributesByElement[c] || []).indexOf(ce) === -1 || ce === "style" && T[re + 1].search(te) !== -1) return !1;
1023
+ const U = o(/^[A-Za-z]+/);
1024
+ function h(c, m, I, _ = { 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: {} }) {
1025
+ if (c = c.toLowerCase(), m = m.toLowerCase(), c !== m || _.allowedHtmlElements.indexOf(c) === -1) return !1;
1026
+ const ne = /[\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;
1027
+ for (let ae = 0, ce = I.length; ae < ce; ae += 2) {
1028
+ const pe = I[ae];
1029
+ if (_.allowedHtmlCommonAttributes.indexOf(pe) === -1 && (_.allowedHtmlAttributesByElement[c] || []).indexOf(pe) === -1 || pe === "style" && I[ae + 1].search(ne) !== -1) return !1;
1030
1030
  }
1031
1031
  return !0;
1032
1032
  }
1033
- function _() {
1034
- const c = o(/^[^"]*/), m = s([R, c, R]);
1033
+ function T() {
1034
+ const c = o(/^[^"]*/), m = i([S, c, S]);
1035
1035
  return m === null ? null : m[1];
1036
1036
  }
1037
- function I() {
1038
- const c = o(/^[^']*/), m = s([Z, c, Z]);
1037
+ function M() {
1038
+ const c = o(/^[^']*/), m = i([re, c, re]);
1039
1039
  return m === null ? null : m[1];
1040
1040
  }
1041
- function z() {
1042
- const c = o(/^\s*=\s*/), m = s([C, j, c, r([_, I])]);
1041
+ function j() {
1042
+ const c = o(/^\s*=\s*/), m = i([A, U, c, r([T, M])]);
1043
1043
  return m === null ? null : [m[1], m[3]];
1044
1044
  }
1045
- function L() {
1046
- const c = i(0, z)();
1045
+ function J() {
1046
+ const c = s(0, j)();
1047
1047
  return Array.prototype.concat.apply(["HTMLATTRIBUTES"], c);
1048
1048
  }
1049
- function q() {
1049
+ function V() {
1050
1050
  let c = null;
1051
- const m = n, T = u("<"), S = o(/^\/?/), te = o(/^\s*>/), re = s([T, j, L, S, te]);
1052
- if (re === null) return null;
1053
- const se = n, ce = re[1], ke = i(0, U)(), st = n, it = u("</"), Ge = s([it, j, te]);
1054
- if (Ge === null) return ["CONCAT", e.slice(m, se)].concat(ke);
1055
- const l = n, g = Ge[1], E = re[2], ie = E.slice(1);
1056
- if (d(ce, g, ie)) c = ["HTMLELEMENT", ce, E].concat(ke);
1051
+ const m = n, I = u("<"), _ = o(/^\/?/), ne = o(/^\s*>/), ae = i([I, U, J, _, ne]);
1052
+ if (ae === null) return null;
1053
+ const ce = n, pe = ae[1], xe = s(0, G)(), it = n, st = u("</"), Ke = i([st, U, ne]);
1054
+ if (Ke === null) return ["CONCAT", e.slice(m, ce)].concat(xe);
1055
+ const l = n, D = Ke[1], F = ae[2], de = F.slice(1);
1056
+ if (h(pe, D, de)) c = ["HTMLELEMENT", pe, F].concat(xe);
1057
1057
  else {
1058
- const _e = (pe) => pe.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
1059
- c = ["CONCAT", _e(e.slice(m, se))].concat(ke, _e(e.slice(st, l)));
1058
+ const Pe = (be) => be.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
1059
+ c = ["CONCAT", Pe(e.slice(m, ce))].concat(xe, Pe(e.slice(it, l)));
1060
1060
  }
1061
1061
  return c;
1062
1062
  }
1063
- const N = r([Ce, he, v, x, Ee]), U = r([Ce, he, v, x, q, Ae]), K = r([Ce, he, V]);
1064
- function le() {
1065
- const c = i(0, U)();
1063
+ const R = r([Ee, le, C, x, De]), G = r([Ee, le, C, x, V, oe]), W = r([Ee, le, B]);
1064
+ function fe() {
1065
+ const c = s(0, G)();
1066
1066
  return c === null ? null : ["CONCAT"].concat(c);
1067
1067
  }
1068
- const J = le();
1069
- if (J === null || n !== e.length) throw new Error("Parse error at position " + n.toString() + " in input: " + e);
1070
- return J;
1068
+ const K = fe();
1069
+ if (K === null || n !== e.length) throw new Error("Parse error at position " + n.toString() + " in input: " + e);
1070
+ return K;
1071
1071
  }
1072
1072
  class Ft {
1073
1073
  constructor(t, { wikilinks: n = !1 } = {}) {
1074
- this.locale = je(t), this.wikilinks = n, this.emitter = new Ut(this.locale);
1074
+ this.locale = Ue(t), this.wikilinks = n, this.emitter = new qt(this.locale);
1075
1075
  }
1076
1076
  parse(t, n) {
1077
1077
  if (t.includes("{{") || t.includes("<") || this.wikilinks && t.includes("[")) {
@@ -1080,9 +1080,9 @@ class Ft {
1080
1080
  } else return this.simpleParse(t, n);
1081
1081
  }
1082
1082
  simpleParse(t, n) {
1083
- return t.replace(/\$(\d+)/g, (r, s) => {
1084
- const i = parseInt(s, 10) - 1;
1085
- return n[i] !== void 0 ? n[i] : "$" + s;
1083
+ return t.replace(/\$(\d+)/g, (r, i) => {
1084
+ const s = parseInt(i, 10) - 1;
1085
+ return n[s] !== void 0 ? n[s] : "$" + i;
1086
1086
  });
1087
1087
  }
1088
1088
  }
@@ -1092,7 +1092,7 @@ class Ra {
1092
1092
  }
1093
1093
  load(t, n) {
1094
1094
  if (typeof t != "object") throw new Error("Invalid message source. Must be an object");
1095
- if (n = je(n), n) {
1095
+ if (n = Ue(n), n) {
1096
1096
  if (!/^[a-zA-Z0-9-]+$/.test(n)) throw new Error(`Invalid locale ${n}`);
1097
1097
  for (const r in t) if (r.indexOf("@") !== 0) {
1098
1098
  if (typeof t[r] == "object") return this.load(t);
@@ -1103,7 +1103,7 @@ class Ra {
1103
1103
  } else for (n in t) this.load(t[n], n);
1104
1104
  }
1105
1105
  getMessage(t, n) {
1106
- const r = this.sourceMap.get(je(n));
1106
+ const r = this.sourceMap.get(Ue(n));
1107
1107
  return r ? r[t] : null;
1108
1108
  }
1109
1109
  hasLocale(t) {
@@ -1111,8 +1111,8 @@ class Ra {
1111
1111
  }
1112
1112
  }
1113
1113
  class La {
1114
- constructor(t, { finalFallback: n = "en", messages: r = void 0, wikilinks: s = !1 } = {}) {
1115
- this.locale = je(t), this.parser = new Ft(this.locale, { wikilinks: s }), this.messageStore = new Ra(), r && this.load(r, this.locale), this.finalFallback = n, this.wikilinks = s;
1114
+ constructor(t, { finalFallback: n = "en", messages: r = void 0, wikilinks: i = !1 } = {}) {
1115
+ this.locale = Ue(t), this.parser = new Ft(this.locale, { wikilinks: i }), this.messageStore = new Ra(), r && this.load(r, this.locale), this.finalFallback = n, this.wikilinks = i;
1116
1116
  }
1117
1117
  load(t, n) {
1118
1118
  return this.messageStore.load(t, n || this.locale);
@@ -1121,28 +1121,28 @@ class La {
1121
1121
  return this.parser.parse(this.getMessage(t), n);
1122
1122
  }
1123
1123
  setLocale(t) {
1124
- this.locale = je(t), this.parser = new Ft(this.locale, { wikilinks: this.wikilinks });
1124
+ this.locale = Ue(t), this.parser = new Ft(this.locale, { wikilinks: this.wikilinks });
1125
1125
  }
1126
1126
  getFallbackLocales() {
1127
- return [...qt[this.locale] || [], this.finalFallback];
1127
+ return [...Ut[this.locale] || [], this.finalFallback];
1128
1128
  }
1129
1129
  getMessage(t) {
1130
1130
  let n = this.locale, r = 0;
1131
- const s = this.getFallbackLocales(this.locale);
1131
+ const i = this.getFallbackLocales(this.locale);
1132
1132
  for (; n; ) {
1133
- const i = n.split("-");
1134
- let u = i.length;
1133
+ const s = n.split("-");
1134
+ let u = s.length;
1135
1135
  do {
1136
- const o = i.slice(0, u).join("-"), C = this.messageStore.getMessage(t, o);
1137
- if (typeof C == "string") return C;
1136
+ const o = s.slice(0, u).join("-"), A = this.messageStore.getMessage(t, o);
1137
+ if (typeof A == "string") return A;
1138
1138
  u--;
1139
1139
  } while (u);
1140
- n = s[r], r++;
1140
+ n = i[r], r++;
1141
1141
  }
1142
1142
  return t;
1143
1143
  }
1144
1144
  registerParserPlugin(t, n) {
1145
- Ut.prototype[t] = n;
1145
+ qt.prototype[t] = n;
1146
1146
  }
1147
1147
  }
1148
1148
  const Jt = {
@@ -1231,7 +1231,7 @@ const Jt = {
1231
1231
  "sa-signup-webauthn-setup": "Set Up Passkey",
1232
1232
  "sa-signup-webauthn-done": "Skip for now",
1233
1233
  "sa-signup-webauthn-error": "Error setting up passkey. Please try again from your account settings."
1234
- }, qa = {
1234
+ }, Ua = {
1235
1235
  "@metadata": { authors: ["Mason Payne"], "last-updated": "2022-05-28", locale: "fr" },
1236
1236
  "sa-login": "Connexion",
1237
1237
  "sa-username": "Adresse e-mail",
@@ -1284,7 +1284,7 @@ const Jt = {
1284
1284
  "sa-signup-webauthn-setup": "Configurer la clé d'accès",
1285
1285
  "sa-signup-webauthn-done": "Ignorer pour l'instant",
1286
1286
  "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."
1287
- }, Ua = {
1287
+ }, qa = {
1288
1288
  "@metadata": { authors: ["Mason Payne"], "last-updated": "2022-05-28", locale: "es" },
1289
1289
  "sa-login": "Acceso",
1290
1290
  "sa-username": "Correo electrónico",
@@ -1390,8 +1390,8 @@ const Jt = {
1390
1390
  "sa-signup-webauthn-error": "パスキーの設定中にエラーが発生しました。アカウント設定から再試行してください。"
1391
1391
  }, Va = {
1392
1392
  en: Jt,
1393
- fr: qa,
1394
- es: Ua,
1393
+ fr: Ua,
1394
+ es: qa,
1395
1395
  ja: Ja
1396
1396
  };
1397
1397
  function mt(e) {
@@ -1401,49 +1401,49 @@ function mt(e) {
1401
1401
  return e !== "en" && (t.load(Va[e], e), t.setLocale(e)), t;
1402
1402
  }
1403
1403
  function Vt(e) {
1404
- 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);
1404
+ const t = "==".slice(0, (4 - e.length % 4) % 4), n = e.replace(/-/g, "+").replace(/_/g, "/") + t, r = atob(n), i = new ArrayBuffer(r.length), s = new Uint8Array(i);
1405
1405
  for (let u = 0; u < r.length; u++)
1406
- i[u] = r.charCodeAt(u);
1407
- return s;
1406
+ s[u] = r.charCodeAt(u);
1407
+ return i;
1408
1408
  }
1409
- function Kt(e) {
1409
+ function Gt(e) {
1410
1410
  const t = new Uint8Array(e);
1411
1411
  let n = "";
1412
- for (const i of t)
1413
- n += String.fromCharCode(i);
1412
+ for (const s of t)
1413
+ n += String.fromCharCode(s);
1414
1414
  return btoa(n).replace(/\+/g, "-").replace(
1415
1415
  /\//g,
1416
1416
  "_"
1417
1417
  ).replace(/=/g, "");
1418
1418
  }
1419
- var O = "copy", ve = "convert";
1420
- function Re(e, t, n) {
1421
- if (t === O)
1419
+ var P = "copy", we = "convert";
1420
+ function qe(e, t, n) {
1421
+ if (t === P)
1422
1422
  return n;
1423
- if (t === ve)
1423
+ if (t === we)
1424
1424
  return e(n);
1425
1425
  if (t instanceof Array)
1426
- return n.map((r) => Re(e, t[0], r));
1426
+ return n.map((r) => qe(e, t[0], r));
1427
1427
  if (t instanceof Object) {
1428
1428
  const r = {};
1429
- for (const [s, i] of Object.entries(t)) {
1430
- if (i.derive) {
1431
- const u = i.derive(n);
1432
- u !== void 0 && (n[s] = u);
1429
+ for (const [i, s] of Object.entries(t)) {
1430
+ if (s.derive) {
1431
+ const u = s.derive(n);
1432
+ u !== void 0 && (n[i] = u);
1433
1433
  }
1434
- if (!(s in n)) {
1435
- if (i.required)
1436
- throw new Error(`Missing key: ${s}`);
1434
+ if (!(i in n)) {
1435
+ if (s.required)
1436
+ throw new Error(`Missing key: ${i}`);
1437
1437
  continue;
1438
1438
  }
1439
- if (n[s] == null) {
1440
- r[s] = null;
1439
+ if (n[i] == null) {
1440
+ r[i] = null;
1441
1441
  continue;
1442
1442
  }
1443
- r[s] = Re(
1443
+ r[i] = qe(
1444
1444
  e,
1445
- i.schema,
1446
- n[s]
1445
+ s.schema,
1446
+ n[i]
1447
1447
  );
1448
1448
  }
1449
1449
  return r;
@@ -1456,57 +1456,57 @@ function dt(e, t) {
1456
1456
  derive: t
1457
1457
  };
1458
1458
  }
1459
- function M(e) {
1459
+ function L(e) {
1460
1460
  return {
1461
1461
  required: !0,
1462
1462
  schema: e
1463
1463
  };
1464
1464
  }
1465
- function G(e) {
1465
+ function Z(e) {
1466
1466
  return {
1467
1467
  required: !1,
1468
1468
  schema: e
1469
1469
  };
1470
1470
  }
1471
- var Gt = {
1472
- type: M(O),
1473
- id: M(ve),
1474
- transports: G(O)
1471
+ var Kt = {
1472
+ type: L(P),
1473
+ id: L(we),
1474
+ transports: Z(P)
1475
1475
  }, Ht = {
1476
- appid: G(O),
1477
- appidExclude: G(O),
1478
- credProps: G(O)
1476
+ appid: Z(P),
1477
+ appidExclude: Z(P),
1478
+ credProps: Z(P)
1479
1479
  }, Wt = {
1480
- appid: G(O),
1481
- appidExclude: G(O),
1482
- credProps: G(O)
1483
- }, Ka = {
1484
- publicKey: M({
1485
- rp: M(O),
1486
- user: M({
1487
- id: M(ve),
1488
- name: M(O),
1489
- displayName: M(O)
1480
+ appid: Z(P),
1481
+ appidExclude: Z(P),
1482
+ credProps: Z(P)
1483
+ }, Ga = {
1484
+ publicKey: L({
1485
+ rp: L(P),
1486
+ user: L({
1487
+ id: L(we),
1488
+ name: L(P),
1489
+ displayName: L(P)
1490
1490
  }),
1491
- challenge: M(ve),
1492
- pubKeyCredParams: M(O),
1493
- timeout: G(O),
1494
- excludeCredentials: G([Gt]),
1495
- authenticatorSelection: G(O),
1496
- attestation: G(O),
1497
- extensions: G(Ht)
1491
+ challenge: L(we),
1492
+ pubKeyCredParams: L(P),
1493
+ timeout: Z(P),
1494
+ excludeCredentials: Z([Kt]),
1495
+ authenticatorSelection: Z(P),
1496
+ attestation: Z(P),
1497
+ extensions: Z(Ht)
1498
1498
  }),
1499
- signal: G(O)
1500
- }, Ga = {
1501
- type: M(O),
1502
- id: M(O),
1503
- rawId: M(ve),
1504
- authenticatorAttachment: G(O),
1505
- response: M({
1506
- clientDataJSON: M(ve),
1507
- attestationObject: M(ve),
1499
+ signal: Z(P)
1500
+ }, Ka = {
1501
+ type: L(P),
1502
+ id: L(P),
1503
+ rawId: L(we),
1504
+ authenticatorAttachment: Z(P),
1505
+ response: L({
1506
+ clientDataJSON: L(we),
1507
+ attestationObject: L(we),
1508
1508
  transports: dt(
1509
- O,
1509
+ P,
1510
1510
  (e) => {
1511
1511
  var t;
1512
1512
  return ((t = e.getTransports) == null ? void 0 : t.call(e)) || [];
@@ -1518,26 +1518,26 @@ var Gt = {
1518
1518
  (e) => e.getClientExtensionResults()
1519
1519
  )
1520
1520
  }, Ha = {
1521
- mediation: G(O),
1522
- publicKey: M({
1523
- challenge: M(ve),
1524
- timeout: G(O),
1525
- rpId: G(O),
1526
- allowCredentials: G([Gt]),
1527
- userVerification: G(O),
1528
- extensions: G(Ht)
1521
+ mediation: Z(P),
1522
+ publicKey: L({
1523
+ challenge: L(we),
1524
+ timeout: Z(P),
1525
+ rpId: Z(P),
1526
+ allowCredentials: Z([Kt]),
1527
+ userVerification: Z(P),
1528
+ extensions: Z(Ht)
1529
1529
  }),
1530
- signal: G(O)
1530
+ signal: Z(P)
1531
1531
  }, Wa = {
1532
- type: M(O),
1533
- id: M(O),
1534
- rawId: M(ve),
1535
- authenticatorAttachment: G(O),
1536
- response: M({
1537
- clientDataJSON: M(ve),
1538
- authenticatorData: M(ve),
1539
- signature: M(ve),
1540
- userHandle: M(ve)
1532
+ type: L(P),
1533
+ id: L(P),
1534
+ rawId: L(we),
1535
+ authenticatorAttachment: Z(P),
1536
+ response: L({
1537
+ clientDataJSON: L(we),
1538
+ authenticatorData: L(we),
1539
+ signature: L(we),
1540
+ userHandle: L(we)
1541
1541
  }),
1542
1542
  clientExtensionResults: dt(
1543
1543
  Wt,
@@ -1545,21 +1545,21 @@ var Gt = {
1545
1545
  )
1546
1546
  };
1547
1547
  function Zt(e) {
1548
- return Re(Vt, Ka, e);
1548
+ return qe(Vt, Ga, e);
1549
1549
  }
1550
1550
  function Za(e) {
1551
- return Re(
1552
- Kt,
1553
- Ga,
1551
+ return qe(
1552
+ Gt,
1553
+ Ka,
1554
1554
  e
1555
1555
  );
1556
1556
  }
1557
1557
  function Ya(e) {
1558
- return Re(Vt, Ha, e);
1558
+ return qe(Vt, Ha, e);
1559
1559
  }
1560
1560
  function Xa(e) {
1561
- return Re(
1562
- Kt,
1561
+ return qe(
1562
+ Gt,
1563
1563
  Wa,
1564
1564
  e
1565
1565
  );
@@ -1576,14 +1576,14 @@ async function Qa(e) {
1576
1576
  );
1577
1577
  return t.toJSON = () => Xa(t), t;
1578
1578
  }
1579
- function ft(e) {
1579
+ function ht(e) {
1580
1580
  this.message = e;
1581
1581
  }
1582
- ft.prototype = new Error(), ft.prototype.name = "InvalidCharacterError";
1582
+ ht.prototype = new Error(), ht.prototype.name = "InvalidCharacterError";
1583
1583
  var yt = typeof window < "u" && window.atob && window.atob.bind(window) || function(e) {
1584
1584
  var t = String(e).replace(/=+$/, "");
1585
- if (t.length % 4 == 1) throw new ft("'atob' failed: The string to be decoded is not correctly encoded.");
1586
- 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);
1585
+ if (t.length % 4 == 1) throw new ht("'atob' failed: The string to be decoded is not correctly encoded.");
1586
+ for (var n, r, i = 0, s = 0, u = ""; r = t.charAt(s++); ~r && (n = i % 4 ? 64 * n + r : r, i++ % 4) ? u += String.fromCharCode(255 & n >> (-2 * i & 6)) : 0) r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);
1587
1587
  return u;
1588
1588
  };
1589
1589
  function eu(e) {
@@ -1602,9 +1602,9 @@ function eu(e) {
1602
1602
  }
1603
1603
  try {
1604
1604
  return function(n) {
1605
- return decodeURIComponent(yt(n).replace(/(.)/g, function(r, s) {
1606
- var i = s.charCodeAt(0).toString(16).toUpperCase();
1607
- return i.length < 2 && (i = "0" + i), "%" + i;
1605
+ return decodeURIComponent(yt(n).replace(/(.)/g, function(r, i) {
1606
+ var s = i.charCodeAt(0).toString(16).toUpperCase();
1607
+ return s.length < 2 && (s = "0" + s), "%" + s;
1608
1608
  }));
1609
1609
  }(t);
1610
1610
  } catch {
@@ -1645,7 +1645,7 @@ function nu() {
1645
1645
  function ru() {
1646
1646
  return Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3);
1647
1647
  }
1648
- var su = /* @__PURE__ */ F(`<div class=widget-root><form class=login-frame><style>.widget-root {
1648
+ var iu = /* @__PURE__ */ v(`<div class=widget-root><form class=login-frame><style>.widget-root {
1649
1649
  display: block;
1650
1650
  position: relative;
1651
1651
  }
@@ -1791,7 +1791,7 @@ var su = /* @__PURE__ */ F(`<div class=widget-root><form class=login-frame><styl
1791
1791
  margin-bottom: 0;
1792
1792
  display: block;
1793
1793
  }
1794
- </style><style></style><h1>`), iu = /* @__PURE__ */ F("<span class=error-message>"), ot = /* @__PURE__ */ F("<span>"), au = /* @__PURE__ */ F("<input type=text autocomplete=one-time-code required>"), $t = /* @__PURE__ */ F("<span class=hint>"), uu = /* @__PURE__ */ F("<input type=password autocomplete=new-password required>"), kt = /* @__PURE__ */ F("<button type=submit>"), ou = /* @__PURE__ */ F("<span class=info-message>"), lu = /* @__PURE__ */ F("<span class=success-message>"), cu = /* @__PURE__ */ F("<input type=text autocomplete=username>"), du = /* @__PURE__ */ F("<input type=password autocomplete=current-password>"), lt = /* @__PURE__ */ F("<p>"), fu = /* @__PURE__ */ F("<select>"), hu = /* @__PURE__ */ F("<option> (<!>)"), pu = /* @__PURE__ */ F("<input type=text>"), Bt = /* @__PURE__ */ F("<input type=text autocomplete=one-time-code>"), xt = /* @__PURE__ */ F("<input type=password autocomplete=new-password>"), Du = /* @__PURE__ */ F("<span class=checkbox-wrapper><input type=checkbox><span>&nbsp;"), gu = /* @__PURE__ */ F("<button type=button>"), He = /* @__PURE__ */ F("<a class=centered-text href=#>"), mu = /* @__PURE__ */ F("<div class=social-divider><span>"), bu = /* @__PURE__ */ F("<button type=button class=social-btn>"), vu = /* @__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>'), Cu = /* @__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>'), wu = /* @__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>'), Au = /* @__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>'), Eu = /* @__PURE__ */ F("<div class=loading-overlay part=loading-overlay><slot name=loading>");
1794
+ </style><style></style><h1>`), su = /* @__PURE__ */ v("<span class=error-message>"), ot = /* @__PURE__ */ v("<span>"), au = /* @__PURE__ */ v("<input type=text autocomplete=one-time-code required>"), $t = /* @__PURE__ */ v("<span class=hint>"), uu = /* @__PURE__ */ v("<input type=password autocomplete=new-password required>"), kt = /* @__PURE__ */ v("<button type=submit>"), ou = /* @__PURE__ */ v("<span class=info-message>"), lu = /* @__PURE__ */ v("<span class=success-message>"), cu = /* @__PURE__ */ v("<input type=text autocomplete=username>"), du = /* @__PURE__ */ v("<input type=password autocomplete=current-password>"), lt = /* @__PURE__ */ v("<p>"), hu = /* @__PURE__ */ v("<select>"), fu = /* @__PURE__ */ v("<option> (<!>)"), pu = /* @__PURE__ */ v("<input type=text>"), Bt = /* @__PURE__ */ v("<input type=text autocomplete=one-time-code>"), xt = /* @__PURE__ */ v("<input type=password autocomplete=new-password>"), gu = /* @__PURE__ */ v("<span class=checkbox-wrapper><input type=checkbox><span>&nbsp;"), Du = /* @__PURE__ */ v("<button type=button>"), He = /* @__PURE__ */ v("<a class=centered-text href=#>"), mu = /* @__PURE__ */ v("<div class=social-divider><span>"), bu = /* @__PURE__ */ v("<button type=button class=social-btn>"), vu = /* @__PURE__ */ v('<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>'), Cu = /* @__PURE__ */ v('<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>'), wu = /* @__PURE__ */ v('<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>'), Au = /* @__PURE__ */ v('<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>'), Eu = /* @__PURE__ */ v("<div class=loading-overlay part=loading-overlay><slot name=loading>");
1795
1795
  const Fu = {
1796
1796
  domain: "http://127.0.0.1:11000",
1797
1797
  sector: "0ad5c3e5-0186-4557-8b32-4b36f247bf09",
@@ -1802,31 +1802,31 @@ const Fu = {
1802
1802
  redirect: "",
1803
1803
  hideSocial: !1
1804
1804
  };
1805
- gt("spartan-login", Fu, (e) => {
1806
- const [t, n] = w((e.startMode || "password").toLowerCase()), [r, s] = w(""), [i, u] = w(""), [o, C] = w(""), [$, D] = w(""), [k] = w(e.redirect), [ue, fe] = w(!1), [Fe, R] = w(!1), [Z, Y] = w(!1), [oe, H] = w(""), [ne, V] = w(""), [Ae, ye] = w([]), [Ee, B] = w(""), [ee, $e] = w([]), [he, ge] = w(""), [b, me] = w(!1), [Le, be] = w(!1), [ze, qe] = w(""), [Ue, Oe] = w(""), [Ie, Pe] = w(""), [Ne, Ce] = w(""), [xe, Se] = w(""), [A, v] = w(""), [x, j] = w(!1), d = mt(e.locale);
1807
- let _, I = null, z;
1808
- const L = () => b() || !!he();
1805
+ Dt("spartan-login", Fu, (e) => {
1806
+ const [t, n] = w((e.startMode || "password").toLowerCase()), [r, i] = w(""), [s, u] = w(""), [o, A] = w(""), [k, g] = w(""), [q] = w(e.redirect), [Ae, Ce] = w(!1), [$e, S] = w(!1), [re, ue] = w(!1), [ke, Fe] = w(""), [Be, B] = w(""), [oe, H] = w([]), [De, Y] = w(""), [ie, se] = w([]), [le, me] = w(""), [b, $] = w(!1), [O, z] = w(!1), [te, Se] = w(""), [Te, Me] = w(""), [Ne, je] = w(""), [Re, Ee] = w(""), [Oe, Ie] = w(""), [E, C] = w(""), [x, U] = w(!1), h = mt(e.locale);
1807
+ let T, M = null, j;
1808
+ const J = () => b() || !!le();
1809
1809
  rn(() => {
1810
- I && clearTimeout(I);
1810
+ M && clearTimeout(M);
1811
1811
  });
1812
1812
  try {
1813
- z = e.styles;
1813
+ j = e.styles;
1814
1814
  } catch {
1815
- z = "";
1815
+ j = "";
1816
1816
  }
1817
- console.log(z), ht(async () => {
1817
+ console.log(j), ft(async () => {
1818
1818
  const l = new URLSearchParams(window.location.search);
1819
1819
  if (l.get("error")) {
1820
1820
  history.replaceState({}, "", window.location.pathname);
1821
- const pe = l.get("error_description");
1822
- D(pe || d.i18n("sa-social-error")), q(), N();
1821
+ const be = l.get("error_description");
1822
+ g(be || h.i18n("sa-social-error")), V(), R();
1823
1823
  return;
1824
1824
  }
1825
- const E = l.get("code");
1826
- if (E) {
1827
- history.replaceState({}, "", window.location.pathname), me(!0);
1825
+ const F = l.get("code");
1826
+ if (F) {
1827
+ history.replaceState({}, "", window.location.pathname), $(!0);
1828
1828
  try {
1829
- const pe = await fetch(`${e.domain}/api/v1/oauth/exchange`, {
1829
+ const be = await fetch(`${e.domain}/api/v1/oauth/exchange`, {
1830
1830
  method: "POST",
1831
1831
  mode: "cors",
1832
1832
  cache: "no-cache",
@@ -1834,49 +1834,49 @@ gt("spartan-login", Fu, (e) => {
1834
1834
  "Content-Type": "application/json"
1835
1835
  },
1836
1836
  body: JSON.stringify({
1837
- code: E
1837
+ code: F
1838
1838
  })
1839
1839
  });
1840
- if (!pe.ok) throw new Error(d.i18n("sa-social-error"));
1841
- const W = await pe.json();
1842
- localStorage.setItem("spartan-token", W.token);
1843
- const a = _.getRootNode().host;
1840
+ if (!be.ok) throw new Error(h.i18n("sa-social-error"));
1841
+ const X = await be.json();
1842
+ localStorage.setItem("spartan-token", X.token);
1843
+ const a = T.getRootNode().host;
1844
1844
  e.redirect !== "" ? (a.dispatchEvent(new CustomEvent("spartan-login", {
1845
1845
  bubbles: !0,
1846
1846
  cancelable: !0,
1847
1847
  detail: {
1848
- token: W.token
1848
+ token: X.token
1849
1849
  }
1850
- })), window.location.href = e.redirect) : (I = setTimeout(() => {
1851
- I = null, me(!1), q(), N();
1850
+ })), window.location.href = e.redirect) : (M = setTimeout(() => {
1851
+ M = null, $(!1), V(), R();
1852
1852
  }, 5e3), a.dispatchEvent(new CustomEvent("spartan-login", {
1853
1853
  bubbles: !0,
1854
1854
  cancelable: !0,
1855
1855
  detail: {
1856
- token: W.token
1856
+ token: X.token
1857
1857
  }
1858
1858
  })));
1859
- } catch (pe) {
1860
- D(pe.message || d.i18n("sa-social-error")), me(!1), q(), N();
1859
+ } catch (be) {
1860
+ g(be.message || h.i18n("sa-social-error")), $(!1), V(), R();
1861
1861
  }
1862
1862
  return;
1863
1863
  }
1864
- const ie = l.get("sub");
1865
- if (ie) {
1866
- Pe(ie);
1867
- const pe = l.get("email");
1868
- pe && Ce(pe);
1864
+ const de = l.get("sub");
1865
+ if (de) {
1866
+ je(de);
1867
+ const be = l.get("email");
1868
+ be && Ee(be);
1869
1869
  const a = new URLSearchParams(window.location.hash.replace(/^#/, "")).get("otp");
1870
- a && Se(a), n("invite");
1870
+ a && Ie(a), n("invite");
1871
1871
  return;
1872
1872
  }
1873
1873
  if (Xt() && e.redirect !== "" && window.location.pathname !== e.redirect) {
1874
1874
  window.location.href = e.redirect;
1875
1875
  return;
1876
1876
  }
1877
- q(), N();
1877
+ V(), R();
1878
1878
  });
1879
- function q() {
1879
+ function V() {
1880
1880
  fetch(`${e.domain}/api/v1/sectors/${e.sector}/publicsettings`, {
1881
1881
  method: "GET",
1882
1882
  mode: "cors",
@@ -1889,12 +1889,12 @@ gt("spartan-login", Fu, (e) => {
1889
1889
  return l.json();
1890
1890
  throw new Error("Network response was not ok.");
1891
1891
  }).then((l) => {
1892
- console.log(l), fe(l.SelfSignUpAllowed), be(l.MFARequired || !1);
1892
+ console.log(l), Ce(l.SelfSignUpAllowed), z(l.MFARequired || !1);
1893
1893
  }).catch((l) => {
1894
- console.log(l), D(l.message);
1894
+ console.log(l), g(l.message);
1895
1895
  });
1896
1896
  }
1897
- function N() {
1897
+ function R() {
1898
1898
  e.hideSocial || fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`, {
1899
1899
  method: "GET",
1900
1900
  mode: "cors",
@@ -1903,15 +1903,15 @@ gt("spartan-login", Fu, (e) => {
1903
1903
  if (l.ok) return l.json();
1904
1904
  throw new Error("Failed to load social providers");
1905
1905
  }).then((l) => {
1906
- const g = (l.providers || []).filter((E) => E.enabled);
1907
- $e(g);
1906
+ const D = (l.providers || []).filter((F) => F.enabled);
1907
+ se(D);
1908
1908
  }).catch(() => {
1909
1909
  });
1910
1910
  }
1911
- function U(l) {
1912
- if (he()) return;
1913
- ge(l), D("");
1914
- const g = window.location.origin + window.location.pathname;
1911
+ function G(l) {
1912
+ if (le()) return;
1913
+ me(l), g("");
1914
+ const D = window.location.origin + window.location.pathname;
1915
1915
  fetch(`${e.domain}/api/v1/oauth/${l}/initiate`, {
1916
1916
  method: "POST",
1917
1917
  mode: "cors",
@@ -1921,19 +1921,19 @@ gt("spartan-login", Fu, (e) => {
1921
1921
  },
1922
1922
  body: JSON.stringify({
1923
1923
  sectorID: e.sector,
1924
- redirectURI: g
1924
+ redirectURI: D
1925
1925
  })
1926
- }).then((E) => {
1927
- if (E.ok) return E.json();
1928
- throw new Error(d.i18n("sa-social-error"));
1929
- }).then((E) => {
1930
- window.location.href = E.authURL;
1931
- }).catch((E) => {
1932
- ge(""), D(E.message);
1926
+ }).then((F) => {
1927
+ if (F.ok) return F.json();
1928
+ throw new Error(h.i18n("sa-social-error"));
1929
+ }).then((F) => {
1930
+ window.location.href = F.authURL;
1931
+ }).catch((F) => {
1932
+ me(""), g(F.message);
1933
1933
  });
1934
1934
  }
1935
- function K(l, g) {
1936
- return D(""), Oe(g), fetch(`${e.domain}/api/v1/signup/mfa/begin`, {
1935
+ function W(l, D) {
1936
+ return g(""), Me(D), fetch(`${e.domain}/api/v1/signup/mfa/begin`, {
1937
1937
  method: "POST",
1938
1938
  mode: "cors",
1939
1939
  cache: "no-cache",
@@ -1943,19 +1943,19 @@ gt("spartan-login", Fu, (e) => {
1943
1943
  body: JSON.stringify({
1944
1944
  email: l,
1945
1945
  sectorID: e.sector,
1946
- transactionId: g
1946
+ transactionId: D
1947
1947
  })
1948
- }).then((E) => {
1949
- if (!E.ok)
1950
- throw new Error(d.i18n("sa-signup-verify-error"));
1948
+ }).then((F) => {
1949
+ if (!F.ok)
1950
+ throw new Error(h.i18n("sa-signup-verify-error"));
1951
1951
  }).then(() => {
1952
1952
  n("signup-verify");
1953
- }).catch((E) => {
1954
- D(E.message);
1953
+ }).catch((F) => {
1954
+ g(F.message);
1955
1955
  });
1956
1956
  }
1957
- function le() {
1958
- return D(""), fetch(`${e.domain}/api/v1/signup/mfa/verify`, {
1957
+ function fe() {
1958
+ return g(""), fetch(`${e.domain}/api/v1/signup/mfa/verify`, {
1959
1959
  method: "POST",
1960
1960
  mode: "cors",
1961
1961
  cache: "no-cache",
@@ -1966,44 +1966,44 @@ gt("spartan-login", Fu, (e) => {
1966
1966
  email: r(),
1967
1967
  code: o().toUpperCase().trim(),
1968
1968
  sectorID: e.sector,
1969
- transactionId: Ue()
1969
+ transactionId: Te()
1970
1970
  })
1971
1971
  }).then((l) => {
1972
1972
  if (l.ok) return l.json();
1973
- throw l.status === 400 ? new Error(d.i18n("sa-signup-verify-error")) : new Error(d.i18n("sa-signup-verify-error"));
1973
+ throw l.status === 400 ? new Error(h.i18n("sa-signup-verify-error")) : new Error(h.i18n("sa-signup-verify-error"));
1974
1974
  }).then((l) => {
1975
- qe(l.token), localStorage.setItem("spartan-token", l.token), _.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login", {
1975
+ Se(l.token), localStorage.setItem("spartan-token", l.token), T.getRootNode().host.dispatchEvent(new CustomEvent("spartan-login", {
1976
1976
  bubbles: !0,
1977
1977
  cancelable: !0,
1978
1978
  detail: {
1979
1979
  token: l.token
1980
1980
  }
1981
- })), C(""), n("signup-webauthn");
1981
+ })), A(""), n("signup-webauthn");
1982
1982
  }).catch((l) => {
1983
- D(l.message);
1983
+ g(l.message);
1984
1984
  });
1985
1985
  }
1986
- function J() {
1987
- b() || (me(!0), D(""), fetch(`${e.domain}/api/v1/webauthn/registration/begin`, {
1986
+ function K() {
1987
+ b() || ($(!0), g(""), fetch(`${e.domain}/api/v1/webauthn/registration/begin`, {
1988
1988
  method: "POST",
1989
1989
  mode: "cors",
1990
1990
  cache: "no-cache",
1991
1991
  headers: {
1992
1992
  "Content-Type": "application/json",
1993
- Authorization: `bearer ${ze()}`
1993
+ Authorization: `bearer ${te()}`
1994
1994
  },
1995
1995
  body: JSON.stringify({
1996
1996
  keyName: "Default",
1997
1997
  sectorID: e.sector
1998
1998
  })
1999
1999
  }).then((l) => {
2000
- if (!l.ok) throw new Error(d.i18n("sa-signup-webauthn-error"));
2000
+ if (!l.ok) throw new Error(h.i18n("sa-signup-webauthn-error"));
2001
2001
  return l.json();
2002
2002
  }).then((l) => {
2003
- const g = Zt(l.Options);
2004
- return Yt(g).then((E) => {
2005
- let ie = JSON.parse(JSON.stringify(E));
2006
- return ie.transactionID = l.TransactionID, ie;
2003
+ const D = Zt(l.Options);
2004
+ return Yt(D).then((F) => {
2005
+ let de = JSON.parse(JSON.stringify(F));
2006
+ return de.transactionID = l.TransactionID, de;
2007
2007
  });
2008
2008
  }).then((l) => fetch(`${e.domain}/api/v1/webauthn/registration/finish`, {
2009
2009
  method: "POST",
@@ -2011,47 +2011,47 @@ gt("spartan-login", Fu, (e) => {
2011
2011
  cache: "no-cache",
2012
2012
  headers: {
2013
2013
  "Content-Type": "application/json",
2014
- Authorization: `bearer ${ze()}`
2014
+ Authorization: `bearer ${te()}`
2015
2015
  },
2016
2016
  body: JSON.stringify(l)
2017
2017
  })).then((l) => {
2018
- if (!l.ok) throw new Error(d.i18n("sa-signup-webauthn-error"));
2018
+ if (!l.ok) throw new Error(h.i18n("sa-signup-webauthn-error"));
2019
2019
  c();
2020
2020
  }).catch((l) => {
2021
- D((l == null ? void 0 : l.message) || String(l));
2021
+ g((l == null ? void 0 : l.message) || String(l));
2022
2022
  }).finally(() => {
2023
- me(!1);
2023
+ $(!1);
2024
2024
  }));
2025
2025
  }
2026
2026
  function c() {
2027
2027
  n(e.startMode), e.redirect !== "" && (window.location.href = e.redirect);
2028
2028
  }
2029
2029
  function m() {
2030
- return console.log("login"), D(""), t() === "password" ? te() : t() === "webauthn" ? S() : t() === "otp-pick" ? ce(Ee()) : t() === "otp" ? ke() : t() === "reset-email" ? st() : t() === "reset-code" ? it() : Promise.resolve();
2030
+ return console.log("login"), g(""), t() === "password" ? ne() : t() === "webauthn" ? _() : t() === "otp-pick" ? pe(De()) : t() === "otp" ? xe() : t() === "reset-email" ? it() : t() === "reset-code" ? st() : Promise.resolve();
2031
2031
  }
2032
- function T() {
2033
- return console.log("signup"), D(""), R(!1), fetch(`${e.domain}/api/v1/users`, {
2032
+ function I() {
2033
+ return console.log("signup"), g(""), S(!1), fetch(`${e.domain}/api/v1/users`, {
2034
2034
  method: "POST",
2035
2035
  mode: "cors",
2036
2036
  cache: "no-cache",
2037
2037
  body: JSON.stringify({
2038
2038
  username: r(),
2039
- password: i(),
2039
+ password: s(),
2040
2040
  sectorID: e.sector
2041
2041
  })
2042
2042
  }).then((l) => {
2043
2043
  if (l.ok)
2044
2044
  return l.json();
2045
- throw new Error(d.i18n("sa-error-creating-user"));
2045
+ throw new Error(h.i18n("sa-error-creating-user"));
2046
2046
  }).then((l) => {
2047
- if (console.log(l), Le())
2048
- return K(r(), l.enrollmentTransactionId || "");
2049
- R(!0), n(e.startMode);
2047
+ if (console.log(l), O())
2048
+ return W(r(), l.enrollmentTransactionId || "");
2049
+ S(!0), n(e.startMode);
2050
2050
  }).catch((l) => {
2051
- R(!1), D(l.message), console.log(l);
2051
+ S(!1), g(l.message), console.log(l);
2052
2052
  });
2053
2053
  }
2054
- function S() {
2054
+ function _() {
2055
2055
  return console.log("webauthnLogin"), fetch(`${e.domain}/api/v1/login/webauthn/begin`, {
2056
2056
  method: "POST",
2057
2057
  mode: "cors",
@@ -2063,90 +2063,90 @@ gt("spartan-login", Fu, (e) => {
2063
2063
  }).then((l) => {
2064
2064
  if (l.ok)
2065
2065
  return l.json();
2066
- throw l.status === 401 ? (n("password"), D(d.i18n("webauthn-not-enrolled")), new Error(d.i18n("webauthn-not-enrolled"))) : new Error(`${l.status} ${l.statusText}: Network response was not ok.`);
2066
+ throw l.status === 401 ? (n("password"), g(h.i18n("webauthn-not-enrolled")), new Error(h.i18n("webauthn-not-enrolled"))) : new Error(`${l.status} ${l.statusText}: Network response was not ok.`);
2067
2067
  }).then((l) => {
2068
2068
  console.log(l);
2069
- const g = Ya(l.CredentialAssertion);
2070
- return console.log("Parsed WebAuthn request options:", g), Qa(g).then((E) => {
2071
- const ie = JSON.stringify(E);
2072
- let _e = JSON.parse(ie);
2073
- return _e.transactionID = l.TransactionID, _e;
2069
+ const D = Ya(l.CredentialAssertion);
2070
+ return console.log("Parsed WebAuthn request options:", D), Qa(D).then((F) => {
2071
+ const de = JSON.stringify(F);
2072
+ let Pe = JSON.parse(de);
2073
+ return Pe.transactionID = l.TransactionID, Pe;
2074
2074
  });
2075
2075
  }).then((l) => fetch(`${e.domain}/api/v1/login/webauthn/finish`, {
2076
2076
  method: "POST",
2077
2077
  mode: "cors",
2078
2078
  cache: "no-cache",
2079
2079
  body: JSON.stringify(l)
2080
- })).then(re).catch((l) => {
2081
- D(l.message), console.log(l);
2080
+ })).then(ae).catch((l) => {
2081
+ g(l.message), console.log(l);
2082
2082
  });
2083
2083
  }
2084
- function te() {
2084
+ function ne() {
2085
2085
  return console.log("password login"), fetch(e.domain + "/api/v1/login/password", {
2086
2086
  method: "post",
2087
2087
  mode: "cors",
2088
2088
  cache: "no-cache",
2089
2089
  body: JSON.stringify({
2090
2090
  username: r(),
2091
- password: i(),
2091
+ password: s(),
2092
2092
  sectorID: e.sector
2093
2093
  })
2094
- }).then(re);
2095
- }
2096
- function re(l) {
2097
- return Promise.resolve(l).then((g) => {
2098
- if (g.ok)
2099
- return g.json();
2100
- throw g;
2101
- }).then((g) => {
2102
- if (console.log(g), localStorage.setItem("spartan-txid", g.transactionID), !g.token) {
2103
- if (g.challengeType === "email_enrollment")
2104
- return K(r(), g.transactionID || "");
2105
- if (g.challengeType.indexOf("otp") !== -1)
2106
- return se();
2107
- g.challengeType.indexOf("webauthn") !== -1 ? (n("webauthn"), D(d.i18n("sa-webauthn-required"))) : D(d.i18n("sa-unknown-challenge"));
2094
+ }).then(ae);
2095
+ }
2096
+ function ae(l) {
2097
+ return Promise.resolve(l).then((D) => {
2098
+ if (D.ok)
2099
+ return D.json();
2100
+ throw D;
2101
+ }).then((D) => {
2102
+ if (console.log(D), localStorage.setItem("spartan-txid", D.transactionID), !D.token) {
2103
+ if (D.challengeType === "email_enrollment")
2104
+ return W(r(), D.transactionID || "");
2105
+ if (D.challengeType.indexOf("otp") !== -1)
2106
+ return ce();
2107
+ D.challengeType.indexOf("webauthn") !== -1 ? (n("webauthn"), g(h.i18n("sa-webauthn-required"))) : g(h.i18n("sa-unknown-challenge"));
2108
2108
  return;
2109
2109
  }
2110
- localStorage.setItem("spartan-token", g.token);
2111
- const E = new CustomEvent("spartan-login", {
2110
+ localStorage.setItem("spartan-token", D.token);
2111
+ const F = new CustomEvent("spartan-login", {
2112
2112
  bubbles: !0,
2113
2113
  cancelable: !0,
2114
2114
  detail: {
2115
- token: g.token,
2116
- transactionID: g.transactionID
2115
+ token: D.token,
2116
+ transactionID: D.transactionID
2117
2117
  }
2118
2118
  });
2119
- _.getRootNode().host.dispatchEvent(E), k() !== "" && (window.location.href = k());
2120
- }).catch((g) => g.json().then((E) => {
2121
- console.log(E.message), D(E.message);
2122
- }).catch((E) => {
2123
- console.log(E);
2119
+ T.getRootNode().host.dispatchEvent(F), q() !== "" && (window.location.href = q());
2120
+ }).catch((D) => D.json().then((F) => {
2121
+ console.log(F.message), g(F.message);
2122
+ }).catch((F) => {
2123
+ console.log(F);
2124
2124
  }));
2125
2125
  }
2126
- function se() {
2126
+ function ce() {
2127
2127
  const l = localStorage.getItem("spartan-txid") || "";
2128
2128
  return fetch(e.domain + `/api/v1/otp/${encodeURIComponent(r())}?transactionID=${encodeURIComponent(l)}&sectorID=${encodeURIComponent(e.sector)}`, {
2129
2129
  method: "get",
2130
2130
  mode: "cors",
2131
2131
  cache: "no-cache"
2132
- }).then((g) => {
2133
- if (g.ok)
2134
- return g.json();
2135
- throw new Error(d.i18n("error-otp-list"));
2136
- }).then((g) => {
2137
- const E = g.registrations || [];
2138
- if (E.length === 0) {
2139
- D(d.i18n("sa-otp-no-registrations"));
2132
+ }).then((D) => {
2133
+ if (D.ok)
2134
+ return D.json();
2135
+ throw new Error(h.i18n("error-otp-list"));
2136
+ }).then((D) => {
2137
+ const F = D.registrations || [];
2138
+ if (F.length === 0) {
2139
+ g(h.i18n("sa-otp-no-registrations"));
2140
2140
  return;
2141
2141
  }
2142
- if (E.length === 1)
2143
- return ce(E[0].ID || "");
2144
- ye(E), B(E[0].ID || ""), n("otp-pick"), D("");
2145
- }).catch((g) => {
2146
- D(g.message), console.log(g);
2142
+ if (F.length === 1)
2143
+ return pe(F[0].ID || "");
2144
+ H(F), Y(F[0].ID || ""), n("otp-pick"), g("");
2145
+ }).catch((D) => {
2146
+ g(D.message), console.log(D);
2147
2147
  });
2148
2148
  }
2149
- function ce(l) {
2149
+ function pe(l) {
2150
2150
  return console.log("begin OTP, registrationID:", l), fetch(e.domain + "/api/v1/login/otp/begin", {
2151
2151
  method: "post",
2152
2152
  mode: "cors",
@@ -2157,17 +2157,17 @@ gt("spartan-login", Fu, (e) => {
2157
2157
  registrationID: l,
2158
2158
  sectorID: e.sector
2159
2159
  })
2160
- }).then((g) => {
2161
- if (g.ok)
2162
- return g.json();
2163
- throw new Error(`${g.status} ${g.statusText}`);
2164
- }).then((g) => {
2165
- console.log(g), g.transactionID && localStorage.setItem("spartan-txid", g.transactionID), C(""), D(""), n("otp");
2166
- }).catch((g) => {
2167
- D(g.message), console.log(g);
2160
+ }).then((D) => {
2161
+ if (D.ok)
2162
+ return D.json();
2163
+ throw new Error(`${D.status} ${D.statusText}`);
2164
+ }).then((D) => {
2165
+ console.log(D), D.transactionID && localStorage.setItem("spartan-txid", D.transactionID), A(""), g(""), n("otp");
2166
+ }).catch((D) => {
2167
+ g(D.message), console.log(D);
2168
2168
  });
2169
2169
  }
2170
- function ke() {
2170
+ function xe() {
2171
2171
  return console.log("OTP login submit"), fetch(e.domain + "/api/v1/login/otp", {
2172
2172
  method: "post",
2173
2173
  mode: "cors",
@@ -2178,10 +2178,10 @@ gt("spartan-login", Fu, (e) => {
2178
2178
  transactionID: localStorage.getItem("spartan-txid"),
2179
2179
  sectorID: e.sector
2180
2180
  })
2181
- }).then(re);
2181
+ }).then(ae);
2182
2182
  }
2183
- function st() {
2184
- return console.log("begin password reset"), D(""), Y(!1), fetch(`${e.domain}/api/v1/password/reset/begin`, {
2183
+ function it() {
2184
+ return console.log("begin password reset"), g(""), ue(!1), fetch(`${e.domain}/api/v1/password/reset/begin`, {
2185
2185
  method: "POST",
2186
2186
  mode: "cors",
2187
2187
  cache: "no-cache",
@@ -2195,15 +2195,15 @@ gt("spartan-login", Fu, (e) => {
2195
2195
  }).then((l) => {
2196
2196
  if (l.ok)
2197
2197
  return l.json();
2198
- throw new Error(d.i18n("sa-reset-error"));
2198
+ throw new Error(h.i18n("sa-reset-error"));
2199
2199
  }).then((l) => {
2200
- console.log(l), D(d.i18n("sa-reset-email-sent")), H(""), V(""), n("reset-code");
2200
+ console.log(l), g(h.i18n("sa-reset-email-sent")), Fe(""), B(""), n("reset-code");
2201
2201
  }).catch((l) => {
2202
- D(l.message), console.log(l);
2202
+ g(l.message), console.log(l);
2203
2203
  });
2204
2204
  }
2205
- function it() {
2206
- return console.log("complete password reset"), D(""), fetch(`${e.domain}/api/v1/password/reset/complete`, {
2205
+ function st() {
2206
+ return console.log("complete password reset"), g(""), fetch(`${e.domain}/api/v1/password/reset/complete`, {
2207
2207
  method: "POST",
2208
2208
  mode: "cors",
2209
2209
  cache: "no-cache",
@@ -2212,35 +2212,35 @@ gt("spartan-login", Fu, (e) => {
2212
2212
  },
2213
2213
  body: JSON.stringify({
2214
2214
  email: r(),
2215
- code: oe().toUpperCase().trim(),
2216
- newPassword: ne(),
2215
+ code: ke().toUpperCase().trim(),
2216
+ newPassword: Be(),
2217
2217
  sectorID: e.sector
2218
2218
  })
2219
2219
  }).then((l) => {
2220
2220
  if (l.ok)
2221
2221
  return l.json();
2222
- throw l.status === 400 ? new Error(d.i18n("sa-reset-error-code")) : new Error(d.i18n("sa-reset-error"));
2222
+ throw l.status === 400 ? new Error(h.i18n("sa-reset-error-code")) : new Error(h.i18n("sa-reset-error"));
2223
2223
  }).then((l) => {
2224
- console.log(l), Y(!0), H(""), V(""), u(""), n(e.startMode);
2224
+ console.log(l), ue(!0), Fe(""), B(""), u(""), n(e.startMode);
2225
2225
  }).catch((l) => {
2226
- D(l.message), console.log(l);
2226
+ g(l.message), console.log(l);
2227
2227
  });
2228
2228
  }
2229
- async function Ge() {
2230
- if (D(""), !xe() || xe().trim().length === 0) {
2231
- D(d.i18n("sa-invite-error-otp"));
2229
+ async function Ke() {
2230
+ if (g(""), !Oe() || Oe().trim().length === 0) {
2231
+ g(h.i18n("sa-invite-error-otp"));
2232
2232
  return;
2233
2233
  }
2234
- if (!A() || A().length < 8) {
2235
- D("Password must be at least 8 characters");
2234
+ if (!E() || E().length < 8) {
2235
+ g("Password must be at least 8 characters");
2236
2236
  return;
2237
2237
  }
2238
- const l = Ie();
2238
+ const l = Ne();
2239
2239
  if (!l) {
2240
- D("Missing invitation information");
2240
+ g("Missing invitation information");
2241
2241
  return;
2242
2242
  }
2243
- const g = await fetch(`${e.domain}/api/v1/users/invite/complete`, {
2243
+ const D = await fetch(`${e.domain}/api/v1/users/invite/complete`, {
2244
2244
  method: "POST",
2245
2245
  mode: "cors",
2246
2246
  cache: "no-cache",
@@ -2249,25 +2249,25 @@ gt("spartan-login", Fu, (e) => {
2249
2249
  },
2250
2250
  body: JSON.stringify({
2251
2251
  sub: l,
2252
- otp: xe().toUpperCase().trim(),
2253
- password: A(),
2252
+ otp: Oe().toUpperCase().trim(),
2253
+ password: E(),
2254
2254
  sectorID: e.sector
2255
2255
  })
2256
2256
  }).catch(() => null);
2257
- if (!g) {
2258
- D(d.i18n("sa-invite-error-generic"));
2257
+ if (!D) {
2258
+ g(h.i18n("sa-invite-error-generic"));
2259
2259
  return;
2260
2260
  }
2261
- if (g.ok) {
2261
+ if (D.ok) {
2262
2262
  history.replaceState({}, "", window.location.pathname);
2263
- const E = await g.json().catch(() => ({})), ie = _.getRootNode().host;
2264
- E.token ? (localStorage.setItem("spartan-token", E.token), ie.dispatchEvent(new CustomEvent("spartan-login", {
2263
+ const F = await D.json().catch(() => ({})), de = T.getRootNode().host;
2264
+ F.token ? (localStorage.setItem("spartan-token", F.token), de.dispatchEvent(new CustomEvent("spartan-login", {
2265
2265
  bubbles: !0,
2266
2266
  cancelable: !0,
2267
2267
  detail: {
2268
- token: E.token
2268
+ token: F.token
2269
2269
  }
2270
- })), k() !== "" ? window.location.href = k() : e.redirect !== "" ? window.location.href = e.redirect : (j(!1), Pe(""), Ce(""), Se(""), v(""), n(e.startMode), q(), N())) : (j(!0), ie.dispatchEvent(new CustomEvent("spartan-invite-complete", {
2270
+ })), q() !== "" ? window.location.href = q() : e.redirect !== "" ? window.location.href = e.redirect : (U(!1), je(""), Ee(""), Ie(""), C(""), n(e.startMode), V(), R())) : (U(!0), de.dispatchEvent(new CustomEvent("spartan-invite-complete", {
2271
2271
  bubbles: !0,
2272
2272
  cancelable: !0,
2273
2273
  detail: {
@@ -2275,186 +2275,186 @@ gt("spartan-login", Fu, (e) => {
2275
2275
  success: !0
2276
2276
  }
2277
2277
  })), setTimeout(() => {
2278
- k() !== "" ? window.location.href = k() : e.redirect !== "" ? window.location.href = e.redirect : (j(!1), Pe(""), Ce(""), Se(""), v(""), n(e.startMode), q(), N());
2278
+ q() !== "" ? window.location.href = q() : e.redirect !== "" ? window.location.href = e.redirect : (U(!1), je(""), Ee(""), Ie(""), C(""), n(e.startMode), V(), R());
2279
2279
  }, 2e3));
2280
2280
  } else {
2281
- const E = await g.json().catch(() => ({}));
2282
- 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"));
2281
+ const F = await D.json().catch(() => ({}));
2282
+ D.status === 400 || String(F.message).includes("invalid OTP") ? g(h.i18n("sa-invite-error-otp")) : D.status === 504 || String(F.message).includes("expired") ? g(h.i18n("sa-invite-error-expired")) : g(F.message || h.i18n("sa-invite-error-generic"));
2283
2283
  }
2284
2284
  }
2285
2285
  return (() => {
2286
- var l = su(), g = l.firstChild, E = g.firstChild, ie = E.nextSibling, _e = ie.nextSibling, pe = _;
2287
- return typeof pe == "function" ? jt(pe, g) : _ = g, g.addEventListener("submit", (W) => {
2288
- if (W.preventDefault(), b()) return;
2289
- me(!0), (t() === "sign-up" ? T() : t() === "signup-verify" ? le() : t() === "invite" ? Promise.resolve(Ge()) : m()).finally(() => me(!1));
2290
- }), f(ie, z), f(_e, (() => {
2291
- var W = h(() => t() === "reset-email" || t() === "reset-code");
2292
- return () => W() ? d.i18n("sa-reset-password") : h(() => t() === "signup-verify" || t() === "signup-webauthn")() ? d.i18n("sa-signup-mfa-title") : h(() => t() === "invite")() ? d.i18n("sa-complete-invite") : d.i18n("sa-login");
2293
- })()), f(g, $ && (() => {
2294
- var W = iu();
2295
- return f(W, $), W;
2296
- })(), null), f(g, (() => {
2297
- var W = h(() => !!Fe());
2298
- return () => W() && (() => {
2286
+ var l = iu(), D = l.firstChild, F = D.firstChild, de = F.nextSibling, Pe = de.nextSibling, be = T;
2287
+ return typeof be == "function" ? jt(be, D) : T = D, D.addEventListener("submit", (X) => {
2288
+ if (X.preventDefault(), b()) return;
2289
+ $(!0), (t() === "sign-up" ? I() : t() === "signup-verify" ? fe() : t() === "invite" ? Promise.resolve(Ke()) : m()).finally(() => $(!1));
2290
+ }), d(de, j), d(Pe, (() => {
2291
+ var X = f(() => t() === "reset-email" || t() === "reset-code");
2292
+ return () => X() ? h.i18n("sa-reset-password") : f(() => t() === "signup-verify" || t() === "signup-webauthn")() ? h.i18n("sa-signup-mfa-title") : f(() => t() === "invite")() ? h.i18n("sa-complete-invite") : h.i18n("sa-login");
2293
+ })()), d(D, k && (() => {
2294
+ var X = su();
2295
+ return d(X, k), X;
2296
+ })(), null), d(D, (() => {
2297
+ var X = f(() => !!$e());
2298
+ return () => X() && (() => {
2299
2299
  var a = ot();
2300
- return f(a, () => d.i18n("sa-signup-complete")), a;
2300
+ return d(a, () => h.i18n("sa-signup-complete")), a;
2301
2301
  })();
2302
- })(), null), f(g, (() => {
2303
- var W = h(() => !!Z());
2304
- return () => W() && (() => {
2302
+ })(), null), d(D, (() => {
2303
+ var X = f(() => !!re());
2304
+ return () => X() && (() => {
2305
2305
  var a = ot();
2306
- return f(a, () => d.i18n("sa-reset-success")), a;
2306
+ return d(a, () => h.i18n("sa-reset-success")), a;
2307
2307
  })();
2308
- })(), null), f(g, (() => {
2309
- var W = h(() => t() === "invite");
2310
- return () => W() && [h(() => h(() => !!Ne())() && (() => {
2308
+ })(), null), d(D, (() => {
2309
+ var X = f(() => t() === "invite");
2310
+ return () => X() && [f(() => f(() => !!Re())() && (() => {
2311
2311
  var a = ou();
2312
- return f(a, Ne), a;
2313
- })()), h(() => h(() => !!x())() && (() => {
2312
+ return d(a, Re), a;
2313
+ })()), f(() => f(() => !!x())() && (() => {
2314
2314
  var a = lu();
2315
- return f(a, () => d.i18n("sa-invite-success")), a;
2315
+ return d(a, () => h.i18n("sa-invite-success")), a;
2316
2316
  })()), (() => {
2317
2317
  var a = au();
2318
- return a.$$input = (p) => Se(p.currentTarget.value), y((p) => {
2319
- var P = d.i18n("sa-invite-otp"), we = b() || x();
2320
- return P !== p.e && de(a, "placeholder", p.e = P), we !== p.t && (a.disabled = p.t = we), p;
2318
+ return a.$$input = (p) => Ie(p.currentTarget.value), y((p) => {
2319
+ var N = h.i18n("sa-invite-otp"), ye = b() || x();
2320
+ return N !== p.e && ge(a, "placeholder", p.e = N), ye !== p.t && (a.disabled = p.t = ye), p;
2321
2321
  }, {
2322
2322
  e: void 0,
2323
2323
  t: void 0
2324
- }), y(() => a.value = xe()), a;
2324
+ }), y(() => a.value = Oe()), a;
2325
2325
  })(), (() => {
2326
2326
  var a = $t();
2327
- return f(a, () => d.i18n("sa-invite-otp-hint")), a;
2327
+ return d(a, () => h.i18n("sa-invite-otp-hint")), a;
2328
2328
  })(), (() => {
2329
2329
  var a = uu();
2330
- return a.$$input = (p) => v(p.currentTarget.value), y((p) => {
2331
- var P = d.i18n("sa-invite-password"), we = b() || x();
2332
- return P !== p.e && de(a, "placeholder", p.e = P), we !== p.t && (a.disabled = p.t = we), p;
2330
+ return a.$$input = (p) => C(p.currentTarget.value), y((p) => {
2331
+ var N = h.i18n("sa-invite-password"), ye = b() || x();
2332
+ return N !== p.e && ge(a, "placeholder", p.e = N), ye !== p.t && (a.disabled = p.t = ye), p;
2333
2333
  }, {
2334
2334
  e: void 0,
2335
2335
  t: void 0
2336
- }), y(() => a.value = A()), a;
2336
+ }), y(() => a.value = E()), a;
2337
2337
  })(), (() => {
2338
2338
  var a = $t();
2339
- return f(a, () => d.i18n("sa-invite-password-hint")), a;
2339
+ return d(a, () => h.i18n("sa-invite-password-hint")), a;
2340
2340
  })(), (() => {
2341
2341
  var a = kt();
2342
- return f(a, (() => {
2343
- var p = h(() => !!b());
2344
- return () => p() ? d.i18n("sa-invite-completing") : d.i18n("sa-invite-submit");
2342
+ return d(a, (() => {
2343
+ var p = f(() => !!b());
2344
+ return () => p() ? h.i18n("sa-invite-completing") : h.i18n("sa-invite-submit");
2345
2345
  })()), y(() => a.disabled = b() || x()), a;
2346
2346
  })()];
2347
- })(), null), f(g, (() => {
2348
- var W = h(() => t() !== "invite");
2349
- return () => W() && [(() => {
2347
+ })(), null), d(D, (() => {
2348
+ var X = f(() => t() !== "invite");
2349
+ return () => X() && [(() => {
2350
2350
  var a = cu();
2351
- return a.addEventListener("change", (p) => s(p.currentTarget.value)), a.$$input = (p) => s(p.currentTarget.value), y((p) => {
2352
- var P = d.i18n("sa-username"), we = t() === "otp" || t() === "otp-pick" || t() === "reset-code" || t() === "signup-verify" || t() === "signup-webauthn";
2353
- return P !== p.e && de(a, "placeholder", p.e = P), we !== p.t && (a.disabled = p.t = we), p;
2351
+ return a.addEventListener("change", (p) => i(p.currentTarget.value)), a.$$input = (p) => i(p.currentTarget.value), y((p) => {
2352
+ var N = h.i18n("sa-username"), ye = t() === "otp" || t() === "otp-pick" || t() === "reset-code" || t() === "signup-verify" || t() === "signup-webauthn";
2353
+ return N !== p.e && ge(a, "placeholder", p.e = N), ye !== p.t && (a.disabled = p.t = ye), p;
2354
2354
  }, {
2355
2355
  e: void 0,
2356
2356
  t: void 0
2357
2357
  }), y(() => a.value = r()), a;
2358
- })(), h(() => h(() => t() !== "sign-up" && t() !== "signup-verify" && t() !== "signup-webauthn")() && [h(() => h(() => t() === "password")() && (() => {
2358
+ })(), f(() => f(() => t() !== "sign-up" && t() !== "signup-verify" && t() !== "signup-webauthn")() && [f(() => f(() => t() === "password")() && (() => {
2359
2359
  var a = du();
2360
- return a.addEventListener("change", (p) => u(p.currentTarget.value)), a.$$input = (p) => u(p.currentTarget.value), y(() => de(a, "placeholder", d.i18n("sa-password"))), y(() => a.value = i()), a;
2361
- })()), h(() => h(() => t() === "webauthn")() && ot()), h(() => h(() => t() === "otp-pick")() && [(() => {
2360
+ return a.addEventListener("change", (p) => u(p.currentTarget.value)), a.$$input = (p) => u(p.currentTarget.value), y(() => ge(a, "placeholder", h.i18n("sa-password"))), y(() => a.value = s()), a;
2361
+ })()), f(() => f(() => t() === "webauthn")() && ot()), f(() => f(() => t() === "otp-pick")() && [(() => {
2362
2362
  var a = lt();
2363
- return f(a, () => d.i18n("sa-otp-choose")), a;
2363
+ return d(a, () => h.i18n("sa-otp-choose")), a;
2364
2364
  })(), (() => {
2365
- var a = fu();
2366
- return a.addEventListener("change", (p) => B(p.currentTarget.value)), f(a, () => Ae().map((p) => (() => {
2367
- var P = hu(), we = P.firstChild, bt = we.nextSibling;
2368
- return bt.nextSibling, f(P, () => p.DisplayName || p.ID, we), f(P, () => p.Type, bt), y(() => P.value = p.ID), P;
2369
- })())), y(() => a.value = Ee()), a;
2370
- })()]), h(() => h(() => t() === "otp")() && (() => {
2365
+ var a = hu();
2366
+ return a.addEventListener("change", (p) => Y(p.currentTarget.value)), d(a, () => oe().map((p) => (() => {
2367
+ var N = fu(), ye = N.firstChild, bt = ye.nextSibling;
2368
+ return bt.nextSibling, d(N, () => p.DisplayName || p.ID, ye), d(N, () => p.Type, bt), y(() => N.value = p.ID), N;
2369
+ })())), y(() => a.value = De()), a;
2370
+ })()]), f(() => f(() => t() === "otp")() && (() => {
2371
2371
  var a = pu();
2372
- return a.$$input = (p) => C(p.currentTarget.value), y(() => de(a, "placeholder", d.i18n("sa-code"))), y(() => a.value = o()), a;
2373
- })()), h(() => h(() => t() === "reset-code")() && [(() => {
2372
+ return a.$$input = (p) => A(p.currentTarget.value), y(() => ge(a, "placeholder", h.i18n("sa-code"))), y(() => a.value = o()), a;
2373
+ })()), f(() => f(() => t() === "reset-code")() && [(() => {
2374
2374
  var a = Bt();
2375
- return a.$$input = (p) => H(p.currentTarget.value), y(() => de(a, "placeholder", d.i18n("sa-reset-code"))), y(() => a.value = oe()), a;
2375
+ return a.$$input = (p) => Fe(p.currentTarget.value), y(() => ge(a, "placeholder", h.i18n("sa-reset-code"))), y(() => a.value = ke()), a;
2376
2376
  })(), (() => {
2377
2377
  var a = xt();
2378
- return a.$$input = (p) => V(p.currentTarget.value), y(() => de(a, "placeholder", d.i18n("sa-new-password"))), y(() => a.value = ne()), a;
2379
- })()]), h(() => h(() => t() === "password" || t() === "webauthn")() && (() => {
2380
- var a = Du(), p = a.firstChild, P = p.nextSibling;
2381
- return P.firstChild, a.$$click = () => n(t() === "password" ? "webauthn" : "password"), f(P, () => d.i18n("sa-use-password"), null), y(() => p.checked = t() === "password"), a;
2382
- })())]), h(() => h(() => t() === "sign-up")() && (() => {
2378
+ return a.$$input = (p) => B(p.currentTarget.value), y(() => ge(a, "placeholder", h.i18n("sa-new-password"))), y(() => a.value = Be()), a;
2379
+ })()]), f(() => f(() => t() === "password" || t() === "webauthn")() && (() => {
2380
+ var a = gu(), p = a.firstChild, N = p.nextSibling;
2381
+ return N.firstChild, a.$$click = () => n(t() === "password" ? "webauthn" : "password"), d(N, () => h.i18n("sa-use-password"), null), y(() => p.checked = t() === "password"), a;
2382
+ })())]), f(() => f(() => t() === "sign-up")() && (() => {
2383
2383
  var a = xt();
2384
- return a.addEventListener("change", (p) => u(p.currentTarget.value)), a.$$input = (p) => u(p.currentTarget.value), y(() => de(a, "placeholder", d.i18n("sa-password"))), y(() => a.value = i()), a;
2385
- })()), h(() => h(() => t() === "signup-verify")() && [(() => {
2384
+ return a.addEventListener("change", (p) => u(p.currentTarget.value)), a.$$input = (p) => u(p.currentTarget.value), y(() => ge(a, "placeholder", h.i18n("sa-password"))), y(() => a.value = s()), a;
2385
+ })()), f(() => f(() => t() === "signup-verify")() && [(() => {
2386
2386
  var a = lt();
2387
- return f(a, () => d.i18n("sa-signup-verify-prompt")), a;
2387
+ return d(a, () => h.i18n("sa-signup-verify-prompt")), a;
2388
2388
  })(), (() => {
2389
2389
  var a = Bt();
2390
- return a.$$input = (p) => C(p.currentTarget.value), y(() => de(a, "placeholder", d.i18n("sa-code"))), y(() => a.value = o()), a;
2391
- })()]), h(() => h(() => t() === "signup-webauthn")() && (() => {
2390
+ return a.$$input = (p) => A(p.currentTarget.value), y(() => ge(a, "placeholder", h.i18n("sa-code"))), y(() => a.value = o()), a;
2391
+ })()]), f(() => f(() => t() === "signup-webauthn")() && (() => {
2392
2392
  var a = lt();
2393
- return f(a, () => d.i18n("sa-signup-webauthn-prompt")), a;
2394
- })()), h(() => h(() => t() !== "signup-webauthn")() && (() => {
2393
+ return d(a, () => h.i18n("sa-signup-webauthn-prompt")), a;
2394
+ })()), f(() => f(() => t() !== "signup-webauthn")() && (() => {
2395
2395
  var a = kt();
2396
- return f(a, (() => {
2397
- var p = h(() => !!b());
2398
- return () => p() ? d.i18n("sa-loading") : h(() => t() === "sign-up")() ? d.i18n("sa-signup") : h(() => t() === "otp-pick")() ? d.i18n("sa-otp-send-code") : h(() => t() === "otp")() ? d.i18n("sa-otp-verify") : h(() => t() === "reset-email")() ? d.i18n("sa-otp-send-code") : h(() => t() === "reset-code")() ? d.i18n("sa-reset-submit") : h(() => t() === "signup-verify")() ? d.i18n("sa-otp-verify") : d.i18n("sa-login");
2396
+ return d(a, (() => {
2397
+ var p = f(() => !!b());
2398
+ return () => p() ? h.i18n("sa-loading") : f(() => t() === "sign-up")() ? h.i18n("sa-signup") : f(() => t() === "otp-pick")() ? h.i18n("sa-otp-send-code") : f(() => t() === "otp")() ? h.i18n("sa-otp-verify") : f(() => t() === "reset-email")() ? h.i18n("sa-otp-send-code") : f(() => t() === "reset-code")() ? h.i18n("sa-reset-submit") : f(() => t() === "signup-verify")() ? h.i18n("sa-otp-verify") : h.i18n("sa-login");
2399
2399
  })()), y(() => a.disabled = b()), a;
2400
- })()), h(() => h(() => t() === "signup-webauthn")() && [(() => {
2401
- var a = gu();
2402
- return a.$$click = () => J(), f(a, (() => {
2403
- var p = h(() => !!b());
2404
- return () => p() ? d.i18n("sa-loading") : d.i18n("sa-signup-webauthn-setup");
2400
+ })()), f(() => f(() => t() === "signup-webauthn")() && [(() => {
2401
+ var a = Du();
2402
+ return a.$$click = () => K(), d(a, (() => {
2403
+ var p = f(() => !!b());
2404
+ return () => p() ? h.i18n("sa-loading") : h.i18n("sa-signup-webauthn-setup");
2405
2405
  })()), y(() => a.disabled = b()), a;
2406
2406
  })(), (() => {
2407
2407
  var a = He();
2408
- return a.$$click = () => c(), f(a, () => d.i18n("sa-signup-webauthn-done")), a;
2409
- })()]), h(() => h(() => t() === "password")() && (() => {
2408
+ return a.$$click = () => c(), d(a, () => h.i18n("sa-signup-webauthn-done")), a;
2409
+ })()]), f(() => f(() => t() === "password")() && (() => {
2410
2410
  var a = He();
2411
2411
  return a.$$click = () => {
2412
- D(""), Y(!1), n("reset-email");
2413
- }, f(a, () => d.i18n("sa-forgot-password")), a;
2414
- })()), h(() => h(() => t() === "reset-email" || t() === "reset-code")() && (() => {
2412
+ g(""), ue(!1), n("reset-email");
2413
+ }, d(a, () => h.i18n("sa-forgot-password")), a;
2414
+ })()), f(() => f(() => t() === "reset-email" || t() === "reset-code")() && (() => {
2415
2415
  var a = He();
2416
2416
  return a.$$click = () => {
2417
- D(""), H(""), V(""), n(e.startMode);
2418
- }, f(a, () => d.i18n("sa-back")), a;
2419
- })()), h(() => h(() => !!(ue() && t() !== "reset-email" && t() !== "reset-code" && t() !== "signup-verify" && t() !== "signup-webauthn"))() && (() => {
2417
+ g(""), Fe(""), B(""), n(e.startMode);
2418
+ }, d(a, () => h.i18n("sa-back")), a;
2419
+ })()), f(() => f(() => !!(Ae() && t() !== "reset-email" && t() !== "reset-code" && t() !== "signup-verify" && t() !== "signup-webauthn"))() && (() => {
2420
2420
  var a = He();
2421
- return a.$$click = () => t() === "sign-up" ? n(e.startMode) : n("sign-up"), f(a, (() => {
2422
- var p = h(() => t() === "sign-up");
2423
- return () => p() ? d.i18n("sa-back") : d.i18n("sa-signup");
2421
+ return a.$$click = () => t() === "sign-up" ? n(e.startMode) : n("sign-up"), d(a, (() => {
2422
+ var p = f(() => t() === "sign-up");
2423
+ return () => p() ? h.i18n("sa-back") : h.i18n("sa-signup");
2424
2424
  })()), a;
2425
- })()), h(() => h(() => !e.hideSocial && ee().length > 0 && (t() === "password" || t() === "webauthn" || t() === "sign-up"))() && [(() => {
2425
+ })()), f(() => f(() => !e.hideSocial && ie().length > 0 && (t() === "password" || t() === "webauthn" || t() === "sign-up"))() && [(() => {
2426
2426
  var a = mu(), p = a.firstChild;
2427
- return f(p, () => d.i18n("sa-or")), a;
2428
- })(), h(() => ee().map((a) => (() => {
2427
+ return d(p, () => h.i18n("sa-or")), a;
2428
+ })(), f(() => ie().map((a) => (() => {
2429
2429
  var p = bu();
2430
- return p.$$click = () => U(a.provider), f(p, (() => {
2431
- var P = h(() => a.provider === "google");
2432
- return () => P() && vu();
2433
- })(), null), f(p, (() => {
2434
- var P = h(() => a.provider === "github");
2435
- return () => P() && Cu();
2436
- })(), null), f(p, (() => {
2437
- var P = h(() => a.provider === "apple");
2438
- return () => P() && wu();
2439
- })(), null), f(p, (() => {
2440
- var P = h(() => a.provider === "oidc");
2441
- return () => P() && Au();
2442
- })(), null), f(p, (() => {
2443
- var P = h(() => a.provider === "google");
2444
- return () => P() ? d.i18n("sa-social-google") : h(() => a.provider === "github")() ? d.i18n("sa-social-github") : h(() => a.provider === "apple")() ? d.i18n("sa-social-apple") : d.i18n("sa-social-oidc");
2445
- })(), null), y(() => p.disabled = !!he() || b()), p;
2430
+ return p.$$click = () => G(a.provider), d(p, (() => {
2431
+ var N = f(() => a.provider === "google");
2432
+ return () => N() && vu();
2433
+ })(), null), d(p, (() => {
2434
+ var N = f(() => a.provider === "github");
2435
+ return () => N() && Cu();
2436
+ })(), null), d(p, (() => {
2437
+ var N = f(() => a.provider === "apple");
2438
+ return () => N() && wu();
2439
+ })(), null), d(p, (() => {
2440
+ var N = f(() => a.provider === "oidc");
2441
+ return () => N() && Au();
2442
+ })(), null), d(p, (() => {
2443
+ var N = f(() => a.provider === "google");
2444
+ return () => N() ? h.i18n("sa-social-google") : f(() => a.provider === "github")() ? h.i18n("sa-social-github") : f(() => a.provider === "apple")() ? h.i18n("sa-social-apple") : h.i18n("sa-social-oidc");
2445
+ })(), null), y(() => p.disabled = !!le() || b()), p;
2446
2446
  })()))])];
2447
- })(), null), f(l, (() => {
2448
- var W = h(() => !!L());
2449
- return () => W() && (() => {
2447
+ })(), null), d(l, (() => {
2448
+ var X = f(() => !!J());
2449
+ return () => X() && (() => {
2450
2450
  var a = Eu(), p = a.firstChild;
2451
- return p._$owner = sn(), f(p, () => d.i18n("sa-loading")), a;
2451
+ return p._$owner = sn(), d(p, () => h.i18n("sa-loading")), a;
2452
2452
  })();
2453
2453
  })(), null), l;
2454
2454
  })();
2455
2455
  });
2456
- Dt(["input", "click"]);
2457
- var yu = /* @__PURE__ */ F(`<div class=container><style>.container {
2456
+ gt(["input", "click"]);
2457
+ var yu = /* @__PURE__ */ v(`<div class=container><style>.container {
2458
2458
  background-color: #ffffff;
2459
2459
  border-radius: 10px;
2460
2460
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
@@ -2632,8 +2632,8 @@ var yu = /* @__PURE__ */ F(`<div class=container><style>.container {
2632
2632
  .modal-content .btn.verify:hover {
2633
2633
  background-color: #0056b3;
2634
2634
  }
2635
- </style><style></style><h1 class=header>`), St = /* @__PURE__ */ F("<span class=error-message>"), $u = /* @__PURE__ */ F("<div class=section><h2></h2><div class=security-keys>"), ku = /* @__PURE__ */ F('<div class=key-item><span></span><button class="btn remove">'), _t = /* @__PURE__ */ F("<span>"), Bu = /* @__PURE__ */ F("<div class=section><div class=security-keys>"), xu = /* @__PURE__ */ F('<button class="btn add">+ '), Su = /* @__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">'), _u = /* @__PURE__ */ F("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"), Tu = /* @__PURE__ */ F('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'), Ou = /* @__PURE__ */ F('<span>&nbsp; <button class="btn validate">'), Iu = /* @__PURE__ */ F('<div class=section><div class=mfa-manage><button class="btn add">+ '), Pu = /* @__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">'), zu = /* @__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');
2636
- const Nu = {
2635
+ </style><style></style><h1 class=header>`), _t = /* @__PURE__ */ v("<span class=error-message>"), $u = /* @__PURE__ */ v("<div class=section><h2></h2><div class=security-keys>"), ku = /* @__PURE__ */ v('<div class=key-item><span></span><button class="btn remove">'), St = /* @__PURE__ */ v("<span>"), Bu = /* @__PURE__ */ v("<div class=section><div class=security-keys>"), xu = /* @__PURE__ */ v('<button class="btn add">+ '), _u = /* @__PURE__ */ v('<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">'), Su = /* @__PURE__ */ v("<div class=section><h2></h2><table><thead><tr><th></th><th></th><th></th></tr></thead><tbody>"), Tu = /* @__PURE__ */ v('<tr class=mfa-list-item><td></td><td></td><td><button class="btn remove">'), Ou = /* @__PURE__ */ v('<span>&nbsp; <button class="btn validate">'), Iu = /* @__PURE__ */ v('<div class=section><div class=mfa-manage><button class="btn add">+ '), Pu = /* @__PURE__ */ v('<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">'), zu = /* @__PURE__ */ v('<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');
2636
+ const Mu = {
2637
2637
  domain: "http://127.0.0.1:11000",
2638
2638
  sector: "0ad5c3e5-0186-4557-8b32-4b36f247bf09",
2639
2639
  // defaults to the admin sector
@@ -2643,37 +2643,37 @@ const Nu = {
2643
2643
  redirect: "/",
2644
2644
  redirectOnUnauthenticated: !0
2645
2645
  };
2646
- gt("spartan-account-settings", Nu, (e) => {
2646
+ Dt("spartan-account-settings", Mu, (e) => {
2647
2647
  w(""), w("");
2648
- const [t, n] = w(""), [r, s] = w(""), [i, u] = w(""), [o] = w(e.showWebAuthn), [C, $] = w(!1), [D, k] = w(!1), [ue, fe] = w(!1), [Fe, R] = w(!1), [Z, Y] = w(!1), [oe, H] = w([]), [ne, V] = w([]), [Ae, ye] = w(""), [Ee, B] = w(""), [ee, $e] = w(""), [he, ge] = w(""), b = mt(e.locale);
2649
- let me;
2648
+ const [t, n] = w(""), [r, i] = w(""), [s, u] = w(""), [o] = w(e.showWebAuthn), [A, k] = w(!1), [g, q] = w(!1), [Ae, Ce] = w(!1), [$e, S] = w(!1), [re, ue] = w(!1), [ke, Fe] = w([]), [Be, B] = w([]), [oe, H] = w(""), [De, Y] = w(""), [ie, se] = w(""), [le, me] = w(""), b = mt(e.locale);
2649
+ let $;
2650
2650
  try {
2651
- me = e.styles;
2651
+ $ = e.styles;
2652
2652
  } catch {
2653
- me = "";
2653
+ $ = "";
2654
2654
  }
2655
- ht(async () => {
2655
+ ft(async () => {
2656
2656
  if (Xt())
2657
- k(!0), s("");
2657
+ q(!0), i("");
2658
2658
  else {
2659
2659
  if (e.redirectOnUnauthenticated) {
2660
2660
  window.location.href = e.redirect;
2661
2661
  return;
2662
2662
  }
2663
- k(!1), s(b.i18n("not-authenticated"));
2663
+ q(!1), i(b.i18n("not-authenticated"));
2664
2664
  }
2665
- Le().then((v) => {
2666
- console.log(v);
2667
- }), await Oe(), Ce().then((v) => {
2668
- V(v.registrations);
2665
+ O().then((C) => {
2666
+ console.log(C);
2667
+ }), await Me(), Ee().then((C) => {
2668
+ B(C.registrations);
2669
2669
  });
2670
2670
  });
2671
- async function Le() {
2672
- return await (await fetch(`${e.domain}/api/v1/users/self`, be("get"))).json();
2671
+ async function O() {
2672
+ return await (await fetch(`${e.domain}/api/v1/users/self`, z("get"))).json();
2673
2673
  }
2674
- function be(A = "get") {
2674
+ function z(E = "get") {
2675
2675
  return {
2676
- method: A,
2676
+ method: E,
2677
2677
  mode: "cors",
2678
2678
  cache: "no-cache",
2679
2679
  headers: {
@@ -2682,252 +2682,252 @@ gt("spartan-account-settings", Nu, (e) => {
2682
2682
  }
2683
2683
  };
2684
2684
  }
2685
- function ze() {
2686
- if (Z()) return;
2687
- Y(!0);
2688
- let A = be("post");
2689
- A.body = JSON.stringify({
2685
+ function te() {
2686
+ if (re()) return;
2687
+ ue(!0);
2688
+ let E = z("post");
2689
+ E.body = JSON.stringify({
2690
2690
  keyName: t(),
2691
2691
  sectorID: e.sector
2692
- }), fetch(`${e.domain}/api/v1/webauthn/registration/begin`, A).then((v) => {
2693
- if (v.status === 200)
2694
- return v.json();
2695
- throw v;
2696
- }).then((v) => (console.log(v), qe(v))).catch((v) => {
2697
- v.json ? v.json().then((x) => {
2698
- s(x.message);
2699
- }) : s(v);
2692
+ }), fetch(`${e.domain}/api/v1/webauthn/registration/begin`, E).then((C) => {
2693
+ if (C.status === 200)
2694
+ return C.json();
2695
+ throw C;
2696
+ }).then((C) => (console.log(C), Se(C))).catch((C) => {
2697
+ C.json ? C.json().then((x) => {
2698
+ i(x.message);
2699
+ }) : i(C);
2700
2700
  }).finally(() => {
2701
- Y(!1);
2701
+ ue(!1);
2702
2702
  });
2703
2703
  }
2704
- async function qe(A) {
2704
+ async function Se(E) {
2705
2705
  try {
2706
- const v = Zt(A.Options);
2707
- console.log("Parsed WebAuthn creation options:", v);
2708
- const x = await Yt(v), j = JSON.stringify(x);
2709
- let d = JSON.parse(j);
2710
- d.transactionID = A.TransactionID;
2711
- let _ = be("post");
2712
- _.body = JSON.stringify(d);
2713
- const I = await fetch(`${e.domain}/api/v1/webauthn/registration/finish`, _);
2714
- if (I.status !== 200) {
2715
- const z = await I.json();
2716
- s(z.message);
2706
+ const C = Zt(E.Options);
2707
+ console.log("Parsed WebAuthn creation options:", C);
2708
+ const x = await Yt(C), U = JSON.stringify(x);
2709
+ let h = JSON.parse(U);
2710
+ h.transactionID = E.TransactionID;
2711
+ let T = z("post");
2712
+ T.body = JSON.stringify(h);
2713
+ const M = await fetch(`${e.domain}/api/v1/webauthn/registration/finish`, T);
2714
+ if (M.status !== 200) {
2715
+ const j = await M.json();
2716
+ i(j.message);
2717
2717
  return;
2718
2718
  }
2719
- $(!1), n(""), Oe();
2720
- } catch (v) {
2721
- console.error("WebAuthn registration error:", v), s((v == null ? void 0 : v.message) || String(v));
2719
+ k(!1), n(""), Me();
2720
+ } catch (C) {
2721
+ console.error("WebAuthn registration error:", C), i((C == null ? void 0 : C.message) || String(C));
2722
2722
  }
2723
2723
  }
2724
- async function Ue(A) {
2725
- let v = be("delete");
2726
- v.body = JSON.stringify({
2727
- ID: A
2724
+ async function Te(E) {
2725
+ let C = z("delete");
2726
+ C.body = JSON.stringify({
2727
+ ID: E
2728
2728
  });
2729
2729
  try {
2730
- if ((await fetch(`${e.domain}/api/v1/webauthn/${A}`, v)).status !== 200) {
2731
- s(b.i18n("error-webauthn-remove"));
2730
+ if ((await fetch(`${e.domain}/api/v1/webauthn/${E}`, C)).status !== 200) {
2731
+ i(b.i18n("error-webauthn-remove"));
2732
2732
  return;
2733
2733
  }
2734
- Oe();
2734
+ Me();
2735
2735
  } catch (x) {
2736
- console.error(x), s(b.i18n("error-webauthn-remove"));
2736
+ console.error(x), i(b.i18n("error-webauthn-remove"));
2737
2737
  return;
2738
2738
  }
2739
2739
  }
2740
- async function Oe() {
2741
- let A = be("get");
2740
+ async function Me() {
2741
+ let E = z("get");
2742
2742
  try {
2743
- const x = await (await fetch(`${e.domain}/api/v1/webauthn/registration/list`, A)).json();
2744
- H(x.registrations || []);
2745
- } catch (v) {
2746
- console.error(v), H([]);
2743
+ const x = await (await fetch(`${e.domain}/api/v1/webauthn/registration/list`, E)).json();
2744
+ Fe(x.registrations || []);
2745
+ } catch (C) {
2746
+ console.error(C), Fe([]);
2747
2747
  }
2748
2748
  }
2749
- function Ie(A, v) {
2750
- Z() || (Y(!0), Pe(A, v).then((x) => {
2749
+ function Ne(E, C) {
2750
+ re() || (ue(!0), je(E, C).then((x) => {
2751
2751
  if (x)
2752
- return Ce().then((j) => {
2753
- V(j.registrations), ye(x.transactionID), R(!0);
2752
+ return Ee().then((U) => {
2753
+ B(U.registrations), H(x.transactionID), S(!0);
2754
2754
  });
2755
2755
  }).finally(() => {
2756
- Y(!1);
2756
+ ue(!1);
2757
2757
  }));
2758
2758
  }
2759
- function Pe(A, v) {
2760
- let x = be("post");
2759
+ function je(E, C) {
2760
+ let x = z("post");
2761
2761
  return x.body = JSON.stringify({
2762
- destination: A,
2763
- OTPType: Se(v),
2762
+ destination: E,
2763
+ OTPType: Ie(C),
2764
2764
  sectorID: e.sector
2765
- }), fetch(`${e.domain}/api/v1/otp/begin`, x).then((j) => {
2766
- if (j.status !== 200) {
2767
- s(b.i18n("error-otp-verification"));
2765
+ }), fetch(`${e.domain}/api/v1/otp/begin`, x).then((U) => {
2766
+ if (U.status !== 200) {
2767
+ i(b.i18n("error-otp-verification"));
2768
2768
  return;
2769
2769
  }
2770
- return j.json();
2771
- }).catch((j) => {
2772
- console.error(j), s(b.i18n("error-otp-registration"));
2770
+ return U.json();
2771
+ }).catch((U) => {
2772
+ console.error(U), i(b.i18n("error-otp-registration"));
2773
2773
  });
2774
2774
  }
2775
- function Ne(A, v) {
2776
- if (Z()) return;
2777
- Y(!0);
2778
- let x = be("post");
2775
+ function Re(E, C) {
2776
+ if (re()) return;
2777
+ ue(!0);
2778
+ let x = z("post");
2779
2779
  x.body = JSON.stringify({
2780
- transactionID: A,
2781
- password: v
2782
- }), fetch(`${e.domain}/api/v1/otp/finish`, x).then((j) => {
2783
- if (j.status !== 200) {
2780
+ transactionID: E,
2781
+ password: C
2782
+ }), fetch(`${e.domain}/api/v1/otp/finish`, x).then((U) => {
2783
+ if (U.status !== 200) {
2784
2784
  u(b.i18n("error-otp-verification"));
2785
2785
  return;
2786
2786
  }
2787
- return R(!1), B(""), fe(!1), ge(""), $e(""), Ce().then((d) => {
2788
- V(d.registrations);
2789
- }), j.json();
2790
- }).catch((j) => {
2791
- console.error(j), u(b.i18n("error-otp-registration"));
2787
+ return S(!1), Y(""), Ce(!1), me(""), se(""), Ee().then((h) => {
2788
+ B(h.registrations);
2789
+ }), U.json();
2790
+ }).catch((U) => {
2791
+ console.error(U), u(b.i18n("error-otp-registration"));
2792
2792
  }).finally(() => {
2793
- Y(!1);
2793
+ ue(!1);
2794
2794
  });
2795
2795
  }
2796
- async function Ce() {
2797
- let A = be("get");
2796
+ async function Ee() {
2797
+ let E = z("get");
2798
2798
  try {
2799
- return await (await fetch(`${e.domain}/api/v1/otp/list`, A)).json();
2800
- } catch (v) {
2801
- console.error(v), s(b.i18n("error-otp-list"));
2799
+ return await (await fetch(`${e.domain}/api/v1/otp/list`, E)).json();
2800
+ } catch (C) {
2801
+ console.error(C), i(b.i18n("error-otp-list"));
2802
2802
  return;
2803
2803
  }
2804
2804
  }
2805
- async function xe(A) {
2806
- let v = be("delete");
2807
- v.body = JSON.stringify({
2808
- ID: A
2805
+ async function Oe(E) {
2806
+ let C = z("delete");
2807
+ C.body = JSON.stringify({
2808
+ ID: E
2809
2809
  });
2810
2810
  try {
2811
- if ((await fetch(`${e.domain}/api/v1/otp/${A}`, v)).status !== 200) {
2812
- s(b.i18n("error-otp-remove"));
2811
+ if ((await fetch(`${e.domain}/api/v1/otp/${E}`, C)).status !== 200) {
2812
+ i(b.i18n("error-otp-remove"));
2813
2813
  return;
2814
2814
  }
2815
- Ce().then((j) => {
2816
- V(j.registrations);
2815
+ Ee().then((U) => {
2816
+ B(U.registrations);
2817
2817
  });
2818
2818
  } catch (x) {
2819
- console.error(x), s(b.i18n("error-otp-remove"));
2819
+ console.error(x), i(b.i18n("error-otp-remove"));
2820
2820
  return;
2821
2821
  }
2822
2822
  }
2823
- function Se(A) {
2824
- return A === "EMAIL" ? 2 : 1;
2823
+ function Ie(E) {
2824
+ return E === "EMAIL" ? 2 : 1;
2825
2825
  }
2826
2826
  return (() => {
2827
- var A = yu(), v = A.firstChild, x = v.nextSibling, j = x.nextSibling;
2828
- return f(x, me), f(j, () => b.i18n("sa-account-settings")), f(A, r && (() => {
2829
- var d = St();
2830
- return f(d, r), d;
2831
- })(), null), f(A, (() => {
2832
- var d = h(() => !!(o() && oe().length));
2833
- return () => d() && (() => {
2834
- var _ = $u(), I = _.firstChild, z = I.nextSibling;
2835
- return f(I, () => b.i18n("sa-webauthn-security-keys")), f(z, () => oe().map((L) => (() => {
2836
- var q = ku(), N = q.firstChild, U = N.nextSibling;
2837
- return f(N, () => L.keyName), U.$$click = () => {
2838
- confirm(b.i18n("sa-confirm-delete-key")) && Ue(L.keyName);
2839
- }, f(U, () => b.i18n("sa-remove")), q;
2840
- })()), null), f(z, (() => {
2841
- var L = h(() => oe().length <= 0);
2842
- return () => L() && (() => {
2843
- var q = _t();
2844
- return f(q, () => b.i18n("sa-no-security-keys")), q;
2827
+ var E = yu(), C = E.firstChild, x = C.nextSibling, U = x.nextSibling;
2828
+ return d(x, $), d(U, () => b.i18n("sa-account-settings")), d(E, r && (() => {
2829
+ var h = _t();
2830
+ return d(h, r), h;
2831
+ })(), null), d(E, (() => {
2832
+ var h = f(() => !!(o() && ke().length));
2833
+ return () => h() && (() => {
2834
+ var T = $u(), M = T.firstChild, j = M.nextSibling;
2835
+ return d(M, () => b.i18n("sa-webauthn-security-keys")), d(j, () => ke().map((J) => (() => {
2836
+ var V = ku(), R = V.firstChild, G = R.nextSibling;
2837
+ return d(R, () => J.keyName), G.$$click = () => {
2838
+ confirm(b.i18n("sa-confirm-delete-key")) && Te(J.keyName);
2839
+ }, d(G, () => b.i18n("sa-remove")), V;
2840
+ })()), null), d(j, (() => {
2841
+ var J = f(() => ke().length <= 0);
2842
+ return () => J() && (() => {
2843
+ var V = St();
2844
+ return d(V, () => b.i18n("sa-no-security-keys")), V;
2845
2845
  })();
2846
- })(), null), _;
2846
+ })(), null), T;
2847
2847
  })();
2848
- })(), null), f(A, (() => {
2849
- var d = h(() => !!o());
2850
- return () => d() && (() => {
2851
- var _ = Bu(), I = _.firstChild;
2852
- return f(I, (() => {
2853
- var z = h(() => !C());
2854
- return () => z() && (() => {
2855
- var L = xu();
2856
- return L.firstChild, L.$$click = () => $(!0), f(L, () => b.i18n("sa-add-security-key"), null), L;
2848
+ })(), null), d(E, (() => {
2849
+ var h = f(() => !!o());
2850
+ return () => h() && (() => {
2851
+ var T = Bu(), M = T.firstChild;
2852
+ return d(M, (() => {
2853
+ var j = f(() => !A());
2854
+ return () => j() && (() => {
2855
+ var J = xu();
2856
+ return J.firstChild, J.$$click = () => k(!0), d(J, () => b.i18n("sa-add-security-key"), null), J;
2857
2857
  })();
2858
- })(), null), f(I, (() => {
2859
- var z = h(() => !!C());
2860
- return () => z() && (() => {
2861
- var L = Su(), q = L.firstChild, N = q.firstChild, U = N.nextSibling, K = U.nextSibling, le = K.nextSibling;
2862
- return f(N, () => b.i18n("sa-webauthn-key-name")), U.$$input = (J) => n(J.currentTarget.value), K.$$click = () => $(!1), f(K, () => b.i18n("sa-cancel")), le.$$click = () => t() !== "" && ze(), f(le, () => b.i18n("sa-register")), y((J) => {
2863
- var c = b.i18n("sa-webauthn-key-name"), m = t() === "" || Z();
2864
- return c !== J.e && de(U, "placeholder", J.e = c), m !== J.t && (le.disabled = J.t = m), J;
2858
+ })(), null), d(M, (() => {
2859
+ var j = f(() => !!A());
2860
+ return () => j() && (() => {
2861
+ var J = _u(), V = J.firstChild, R = V.firstChild, G = R.nextSibling, W = G.nextSibling, fe = W.nextSibling;
2862
+ return d(R, () => b.i18n("sa-webauthn-key-name")), G.$$input = (K) => n(K.currentTarget.value), W.$$click = () => k(!1), d(W, () => b.i18n("sa-cancel")), fe.$$click = () => t() !== "" && te(), d(fe, () => b.i18n("sa-register")), y((K) => {
2863
+ var c = b.i18n("sa-webauthn-key-name"), m = t() === "" || re();
2864
+ return c !== K.e && ge(G, "placeholder", K.e = c), m !== K.t && (fe.disabled = K.t = m), K;
2865
2865
  }, {
2866
2866
  e: void 0,
2867
2867
  t: void 0
2868
- }), y(() => U.value = t()), L;
2868
+ }), y(() => G.value = t()), J;
2869
2869
  })();
2870
- })(), null), _;
2870
+ })(), null), T;
2871
2871
  })();
2872
- })(), null), f(A, (() => {
2873
- var d = h(() => ne().length > 0);
2874
- return () => d() && (() => {
2875
- var _ = _u(), I = _.firstChild, z = I.nextSibling, L = z.firstChild, q = L.firstChild, N = q.firstChild, U = N.nextSibling, K = U.nextSibling, le = L.nextSibling;
2876
- return f(I, () => b.i18n("sa-mfa")), f(N, () => b.i18n("sa-mfa-destination")), f(U, () => b.i18n("sa-mfa-validated")), f(K, () => b.i18n("sa-mfa-action")), f(le, () => ne().map((J) => (() => {
2877
- var c = Tu(), m = c.firstChild, T = m.nextSibling, S = T.nextSibling, te = S.firstChild;
2878
- return f(m, () => J.DisplayName), f(T, (() => {
2879
- var re = h(() => !!J.Validated);
2880
- return () => re() ? (() => {
2881
- var se = _t();
2882
- return f(se, () => b.i18n("sa-yes")), se;
2872
+ })(), null), d(E, (() => {
2873
+ var h = f(() => Be().length > 0);
2874
+ return () => h() && (() => {
2875
+ var T = Su(), M = T.firstChild, j = M.nextSibling, J = j.firstChild, V = J.firstChild, R = V.firstChild, G = R.nextSibling, W = G.nextSibling, fe = J.nextSibling;
2876
+ return d(M, () => b.i18n("sa-mfa")), d(R, () => b.i18n("sa-mfa-destination")), d(G, () => b.i18n("sa-mfa-validated")), d(W, () => b.i18n("sa-mfa-action")), d(fe, () => Be().map((K) => (() => {
2877
+ var c = Tu(), m = c.firstChild, I = m.nextSibling, _ = I.nextSibling, ne = _.firstChild;
2878
+ return d(m, () => K.DisplayName), d(I, (() => {
2879
+ var ae = f(() => !!K.Validated);
2880
+ return () => ae() ? (() => {
2881
+ var ce = St();
2882
+ return d(ce, () => b.i18n("sa-yes")), ce;
2883
2883
  })() : (() => {
2884
- var se = Ou(), ce = se.firstChild, ke = ce.nextSibling;
2885
- return f(se, () => b.i18n("sa-no"), ce), ke.$$click = () => {
2886
- Ie(J.DisplayName, J.Type === "email" ? "EMAIL" : "SMS");
2887
- }, f(ke, () => b.i18n("sa-validate")), y(() => ke.disabled = Z()), se;
2884
+ var ce = Ou(), pe = ce.firstChild, xe = pe.nextSibling;
2885
+ return d(ce, () => b.i18n("sa-no"), pe), xe.$$click = () => {
2886
+ Ne(K.DisplayName, K.Type === "email" ? "EMAIL" : "SMS");
2887
+ }, d(xe, () => b.i18n("sa-validate")), y(() => xe.disabled = re()), ce;
2888
2888
  })();
2889
- })()), te.$$click = () => {
2890
- confirm(b.i18n("sa-confirm-delete-key")) && xe(J.ID);
2891
- }, f(te, () => b.i18n("sa-remove")), y(() => de(m, "title", J.DisplayName)), c;
2892
- })())), _;
2889
+ })()), ne.$$click = () => {
2890
+ confirm(b.i18n("sa-confirm-delete-key")) && Oe(K.ID);
2891
+ }, d(ne, () => b.i18n("sa-remove")), y(() => ge(m, "title", K.DisplayName)), c;
2892
+ })())), T;
2893
2893
  })();
2894
- })(), null), f(A, (() => {
2895
- var d = h(() => !ue());
2896
- return () => d() && (() => {
2897
- var _ = Iu(), I = _.firstChild, z = I.firstChild;
2898
- return z.firstChild, z.$$click = () => fe(!0), f(z, () => b.i18n("sa-register-mfa"), null), _;
2894
+ })(), null), d(E, (() => {
2895
+ var h = f(() => !Ae());
2896
+ return () => h() && (() => {
2897
+ var T = Iu(), M = T.firstChild, j = M.firstChild;
2898
+ return j.firstChild, j.$$click = () => Ce(!0), d(j, () => b.i18n("sa-register-mfa"), null), T;
2899
2899
  })();
2900
- })(), null), f(A, (() => {
2901
- var d = h(() => !!ue());
2902
- return () => d() && (() => {
2903
- var _ = Pu(), I = _.firstChild, z = I.nextSibling, L = z.firstChild, q = L.firstChild, N = q.nextSibling, U = N.nextSibling, K = L.nextSibling, le = K.firstChild, J = le.nextSibling, c = J.nextSibling, m = K.nextSibling, T = m.firstChild;
2904
- return f(I, () => b.i18n("sa-add-mfa")), f(q, () => b.i18n("sa-email")), N.$$input = (S) => $e(S.currentTarget.value), U.$$click = () => Ie(ee(), "EMAIL"), f(U, () => b.i18n("sa-add-email")), f(le, () => b.i18n("sa-phone")), J.$$input = (S) => ge(S.currentTarget.value), c.$$click = () => Ie(he(), "SMS"), f(c, () => b.i18n("sa-add-sms")), T.$$click = () => fe(!1), f(T, () => b.i18n("sa-cancel")), y((S) => {
2905
- var te = b.i18n("sa-email"), re = Z(), se = b.i18n("sa-phone"), ce = Z();
2906
- return te !== S.e && de(N, "placeholder", S.e = te), re !== S.t && (U.disabled = S.t = re), se !== S.a && de(J, "placeholder", S.a = se), ce !== S.o && (c.disabled = S.o = ce), S;
2900
+ })(), null), d(E, (() => {
2901
+ var h = f(() => !!Ae());
2902
+ return () => h() && (() => {
2903
+ var T = Pu(), M = T.firstChild, j = M.nextSibling, J = j.firstChild, V = J.firstChild, R = V.nextSibling, G = R.nextSibling, W = J.nextSibling, fe = W.firstChild, K = fe.nextSibling, c = K.nextSibling, m = W.nextSibling, I = m.firstChild;
2904
+ return d(M, () => b.i18n("sa-add-mfa")), d(V, () => b.i18n("sa-email")), R.$$input = (_) => se(_.currentTarget.value), G.$$click = () => Ne(ie(), "EMAIL"), d(G, () => b.i18n("sa-add-email")), d(fe, () => b.i18n("sa-phone")), K.$$input = (_) => me(_.currentTarget.value), c.$$click = () => Ne(le(), "SMS"), d(c, () => b.i18n("sa-add-sms")), I.$$click = () => Ce(!1), d(I, () => b.i18n("sa-cancel")), y((_) => {
2905
+ var ne = b.i18n("sa-email"), ae = re(), ce = b.i18n("sa-phone"), pe = re();
2906
+ return ne !== _.e && ge(R, "placeholder", _.e = ne), ae !== _.t && (G.disabled = _.t = ae), ce !== _.a && ge(K, "placeholder", _.a = ce), pe !== _.o && (c.disabled = _.o = pe), _;
2907
2907
  }, {
2908
2908
  e: void 0,
2909
2909
  t: void 0,
2910
2910
  a: void 0,
2911
2911
  o: void 0
2912
- }), y(() => N.value = ee()), y(() => J.value = he()), _;
2912
+ }), y(() => R.value = ie()), y(() => K.value = le()), T;
2913
2913
  })();
2914
- })(), null), f(A, (() => {
2915
- var d = h(() => !!Fe());
2916
- return () => d() && (() => {
2917
- var _ = zu(), I = _.firstChild, z = I.firstChild, L = z.nextSibling, q = L.nextSibling, N = q.nextSibling, U = N.nextSibling;
2918
- return _.$$click = () => R(!1), I.$$click = (K) => K.stopPropagation(), z.$$click = () => R(!1), f(I, (() => {
2919
- var K = h(() => !!i());
2920
- return () => K() && (() => {
2921
- var le = St();
2922
- return f(le, i), le;
2914
+ })(), null), d(E, (() => {
2915
+ var h = f(() => !!$e());
2916
+ return () => h() && (() => {
2917
+ var T = zu(), M = T.firstChild, j = M.firstChild, J = j.nextSibling, V = J.nextSibling, R = V.nextSibling, G = R.nextSibling;
2918
+ return T.$$click = () => S(!1), M.$$click = (W) => W.stopPropagation(), j.$$click = () => S(!1), d(M, (() => {
2919
+ var W = f(() => !!s());
2920
+ return () => W() && (() => {
2921
+ var fe = _t();
2922
+ return d(fe, s), fe;
2923
2923
  })();
2924
- })(), q), N.$$input = (K) => B(K.currentTarget.value), U.$$click = () => Ne(Ae(), Ee()), y(() => U.disabled = Z()), y(() => N.value = Ee()), _;
2924
+ })(), V), R.$$input = (W) => Y(W.currentTarget.value), G.$$click = () => Re(oe(), De()), y(() => G.disabled = re()), y(() => R.value = De()), T;
2925
2925
  })();
2926
- })(), null), A;
2926
+ })(), null), E;
2927
2927
  })();
2928
2928
  });
2929
- Dt(["click", "input"]);
2930
- var Mu = /* @__PURE__ */ F(`<form class=invite-frame><style>.invite-frame {
2929
+ gt(["click", "input"]);
2930
+ var Nu = /* @__PURE__ */ v(`<form class=invite-frame><style>.invite-frame {
2931
2931
  display: flex;
2932
2932
  flex-direction: column;
2933
2933
  justify-content: center;
@@ -2987,8 +2987,49 @@ var Mu = /* @__PURE__ */ F(`<form class=invite-frame><style>.invite-frame {
2987
2987
  margin-bottom: 10px;
2988
2988
  display: block;
2989
2989
  }
2990
- </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>`), ju = /* @__PURE__ */ F("<span class=info-message>"), Ru = /* @__PURE__ */ F("<span class=error-message>"), Lu = /* @__PURE__ */ F("<span class=success-message>");
2991
- const qu = {
2990
+
2991
+ .social-divider {
2992
+ display: flex;
2993
+ align-items: center;
2994
+ margin: 20px 0 4px 0;
2995
+ color: #888;
2996
+ font-size: 0.85em;
2997
+ }
2998
+ .social-divider::before, .social-divider::after {
2999
+ content: '';
3000
+ flex: 1;
3001
+ border-bottom: 1px solid #ccc;
3002
+ }
3003
+ .social-divider span {
3004
+ margin: 0 10px;
3005
+ }
3006
+
3007
+ .social-btn {
3008
+ display: flex;
3009
+ align-items: center;
3010
+ justify-content: center;
3011
+ gap: 10px;
3012
+ margin: 8px 0 0 0;
3013
+ padding: 10px;
3014
+ width: 100%;
3015
+ border: 1px solid #ccc;
3016
+ border-radius: 10px;
3017
+ background: #fff;
3018
+ cursor: pointer;
3019
+ font-size: inherit;
3020
+ font-family: inherit;
3021
+ box-sizing: border-box;
3022
+ color: #333;
3023
+ }
3024
+ .social-btn:hover:not(:disabled) {
3025
+ background-color: #f5f5f5;
3026
+ }
3027
+ .social-btn:disabled {
3028
+ opacity: 0.6;
3029
+ cursor: not-allowed;
3030
+ }
3031
+ </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>`), ju = /* @__PURE__ */ v("<span class=info-message>"), Ru = /* @__PURE__ */ v("<span class=error-message>"), Lu = /* @__PURE__ */ v("<span class=success-message>"), Uu = /* @__PURE__ */ v("<div class=social-divider><span>"), qu = /* @__PURE__ */ v("<button type=button class=social-btn>"), Ju = /* @__PURE__ */ v('<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>'), Vu = /* @__PURE__ */ v('<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__ */ v('<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>'), Ku = /* @__PURE__ */ v('<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>');
3032
+ const Hu = {
2992
3033
  domain: "http://127.0.0.1:11000",
2993
3034
  sector: "0ad5c3e5-0186-4557-8b32-4b36f247bf09",
2994
3035
  // defaults to the admin sector
@@ -2998,40 +3039,41 @@ const qu = {
2998
3039
  // email from invite
2999
3040
  styles: "",
3000
3041
  locale: "en",
3001
- redirect: ""
3042
+ redirect: "",
3002
3043
  // where to redirect after successful completion
3044
+ hideSocial: !1
3003
3045
  };
3004
- gt("spartan-invite", qu, (e) => {
3046
+ Dt("spartan-invite", Hu, (e) => {
3005
3047
  console.warn("[spartan-invite] <spartan-invite> is deprecated. Use <spartan-login> instead — it now handles invite links by detecting ?sub= URL params automatically.");
3006
- const [t, n] = w(""), [r, s] = w(""), [i, u] = w(""), [o, C] = w(""), [$, D] = w(!1), k = mt(e.locale);
3007
- let ue, fe;
3048
+ const [t, n] = w(""), [r, i] = w(""), [s, u] = w(""), [o, A] = w(""), [k, g] = w(!1), [q, Ae] = w([]), [Ce, $e] = w(""), S = mt(e.locale);
3049
+ let re, ue;
3008
3050
  try {
3009
- fe = e.styles;
3051
+ ue = e.styles;
3010
3052
  } catch {
3011
- fe = "";
3053
+ ue = "";
3012
3054
  }
3013
- ht(async () => {
3055
+ ft(async () => {
3014
3056
  e.sub || new URLSearchParams(window.location.search).get("sub") || u("Missing invitation information. Please use the link from your invite email.");
3015
- const Z = new URLSearchParams(window.location.hash.replace("#", "")).get("otp");
3016
- Z && n(Z);
3057
+ const oe = new URLSearchParams(window.location.hash.replace("#", "")).get("otp");
3058
+ oe && n(oe), Fe();
3017
3059
  });
3018
- async function Fe(R) {
3019
- var oe, H;
3020
- if (R.preventDefault(), u(""), C(""), D(!0), !t() || t().trim().length === 0) {
3021
- u("Please enter your verification code"), D(!1);
3060
+ async function ke(B) {
3061
+ var De, Y;
3062
+ if (B.preventDefault(), u(""), A(""), g(!0), !t() || t().trim().length === 0) {
3063
+ u("Please enter your verification code"), g(!1);
3022
3064
  return;
3023
3065
  }
3024
3066
  if (!r() || r().length < 8) {
3025
- u("Password must be at least 8 characters"), D(!1);
3067
+ u("Password must be at least 8 characters"), g(!1);
3026
3068
  return;
3027
3069
  }
3028
- const Z = new URLSearchParams(window.location.search), Y = e.sub || Z.get("sub") || "";
3029
- if (!Y) {
3030
- u("Missing invitation information"), D(!1);
3070
+ const oe = new URLSearchParams(window.location.search), H = e.sub || oe.get("sub") || "";
3071
+ if (!H) {
3072
+ u("Missing invitation information"), g(!1);
3031
3073
  return;
3032
3074
  }
3033
3075
  try {
3034
- const ne = await fetch(`${e.domain}/api/v1/users/invite/complete`, {
3076
+ const ie = await fetch(`${e.domain}/api/v1/users/invite/complete`, {
3035
3077
  method: "POST",
3036
3078
  mode: "cors",
3037
3079
  cache: "no-cache",
@@ -3039,67 +3081,129 @@ gt("spartan-invite", qu, (e) => {
3039
3081
  "Content-Type": "application/json"
3040
3082
  },
3041
3083
  body: JSON.stringify({
3042
- sub: Y,
3084
+ sub: H,
3043
3085
  otp: t().toUpperCase().trim(),
3044
3086
  password: r(),
3045
3087
  sectorID: e.sector
3046
3088
  })
3047
3089
  });
3048
- if (ne.ok) {
3049
- const V = await ne.json();
3050
- C(k.i18n("sa-invite-success"));
3051
- const Ae = new CustomEvent("spartan-invite-complete", {
3090
+ if (ie.ok) {
3091
+ const se = await ie.json();
3092
+ A(S.i18n("sa-invite-success"));
3093
+ const le = new CustomEvent("spartan-invite-complete", {
3052
3094
  bubbles: !0,
3053
3095
  cancelable: !0,
3054
3096
  detail: {
3055
- sub: Y,
3097
+ sub: H,
3056
3098
  success: !0
3057
3099
  }
3058
3100
  });
3059
- ue && ue.getRootNode().host.dispatchEvent(Ae), setTimeout(() => {
3101
+ re && re.getRootNode().host.dispatchEvent(le), setTimeout(() => {
3060
3102
  e.redirect && e.redirect !== "" && (window.location.href = e.redirect);
3061
3103
  }, 2e3);
3062
3104
  } else {
3063
- const V = await ne.json().catch(() => ({}));
3064
- ne.status === 400 || (oe = V.message) != null && oe.includes("invalid OTP") ? u(k.i18n("sa-invite-error-otp")) : ne.status === 504 || (H = V.message) != null && H.includes("expired") ? u(k.i18n("sa-invite-error-expired")) : u(V.message || k.i18n("sa-invite-error-generic")), D(!1);
3105
+ const se = await ie.json().catch(() => ({}));
3106
+ ie.status === 400 || (De = se.message) != null && De.includes("invalid OTP") ? u(S.i18n("sa-invite-error-otp")) : ie.status === 504 || (Y = se.message) != null && Y.includes("expired") ? u(S.i18n("sa-invite-error-expired")) : u(se.message || S.i18n("sa-invite-error-generic")), g(!1);
3065
3107
  }
3066
- } catch (ne) {
3067
- console.error("Error completing invite:", ne), u(k.i18n("sa-invite-error-generic")), D(!1);
3108
+ } catch (ie) {
3109
+ console.error("Error completing invite:", ie), u(S.i18n("sa-invite-error-generic")), g(!1);
3068
3110
  }
3069
3111
  }
3112
+ function Fe() {
3113
+ e.hideSocial || fetch(`${e.domain}/api/v1/sectors/${e.sector}/oauth/providers`, {
3114
+ method: "GET",
3115
+ mode: "cors",
3116
+ cache: "no-cache"
3117
+ }).then((B) => {
3118
+ if (B.ok) return B.json();
3119
+ throw new Error("Failed to load social providers");
3120
+ }).then((B) => {
3121
+ const oe = (B.providers || []).filter((H) => H.enabled);
3122
+ Ae(oe);
3123
+ }).catch(() => {
3124
+ });
3125
+ }
3126
+ function Be(B) {
3127
+ if (Ce()) return;
3128
+ $e(B), u("");
3129
+ const oe = window.location.origin + window.location.pathname;
3130
+ fetch(`${e.domain}/api/v1/oauth/${B}/initiate`, {
3131
+ method: "POST",
3132
+ mode: "cors",
3133
+ cache: "no-cache",
3134
+ headers: {
3135
+ "Content-Type": "application/json"
3136
+ },
3137
+ body: JSON.stringify({
3138
+ sectorID: e.sector,
3139
+ redirectURI: oe
3140
+ })
3141
+ }).then((H) => {
3142
+ if (H.ok) return H.json();
3143
+ throw new Error(S.i18n("sa-social-error"));
3144
+ }).then((H) => {
3145
+ window.location.href = H.authURL;
3146
+ }).catch((H) => {
3147
+ $e(""), u(H.message);
3148
+ });
3149
+ }
3070
3150
  return (() => {
3071
- var R = Mu(), Z = R.firstChild, Y = Z.nextSibling, oe = Y.nextSibling, H = oe.nextSibling, ne = H.nextSibling, V = ne.nextSibling, Ae = V.nextSibling, ye = Ae.nextSibling, Ee = ue;
3072
- return typeof Ee == "function" ? jt(Ee, R) : ue = R, R.addEventListener("submit", Fe), f(Y, fe), f(oe, () => k.i18n("sa-complete-invite")), f(R, (() => {
3073
- var B = h(() => !!e.email);
3074
- return () => B() && (() => {
3075
- var ee = ju();
3076
- return f(ee, () => e.email), ee;
3151
+ var B = Nu(), oe = B.firstChild, H = oe.nextSibling, De = H.nextSibling, Y = De.nextSibling, ie = Y.nextSibling, se = ie.nextSibling, le = se.nextSibling, me = le.nextSibling, b = re;
3152
+ return typeof b == "function" ? jt(b, B) : re = B, B.addEventListener("submit", ke), d(H, ue), d(De, () => S.i18n("sa-complete-invite")), d(B, (() => {
3153
+ var $ = f(() => !!e.email);
3154
+ return () => $() && (() => {
3155
+ var O = ju();
3156
+ return d(O, () => e.email), O;
3077
3157
  })();
3078
- })(), H), f(R, (() => {
3079
- var B = h(() => !!i());
3080
- return () => B() && (() => {
3081
- var ee = Ru();
3082
- return f(ee, i), ee;
3158
+ })(), Y), d(B, (() => {
3159
+ var $ = f(() => !!s());
3160
+ return () => $() && (() => {
3161
+ var O = Ru();
3162
+ return d(O, s), O;
3083
3163
  })();
3084
- })(), H), f(R, (() => {
3085
- var B = h(() => !!o());
3086
- return () => B() && (() => {
3087
- var ee = Lu();
3088
- return f(ee, o), ee;
3164
+ })(), Y), d(B, (() => {
3165
+ var $ = f(() => !!o());
3166
+ return () => $() && (() => {
3167
+ var O = Lu();
3168
+ return d(O, o), O;
3089
3169
  })();
3090
- })(), H), H.$$input = (B) => n(B.currentTarget.value), f(ne, () => k.i18n("sa-invite-otp-hint")), V.$$input = (B) => s(B.currentTarget.value), f(Ae, () => k.i18n("sa-invite-password-hint")), f(ye, (() => {
3091
- var B = h(() => !!$());
3092
- return () => B() ? k.i18n("sa-invite-completing") : k.i18n("sa-invite-submit");
3093
- })()), y((B) => {
3094
- var ee = k.i18n("sa-invite-otp"), $e = $() || o() !== "", he = k.i18n("sa-invite-password"), ge = $() || o() !== "", b = $() || o() !== "";
3095
- return ee !== B.e && de(H, "placeholder", B.e = ee), $e !== B.t && (H.disabled = B.t = $e), he !== B.a && de(V, "placeholder", B.a = he), ge !== B.o && (V.disabled = B.o = ge), b !== B.i && (ye.disabled = B.i = b), B;
3170
+ })(), Y), Y.$$input = ($) => n($.currentTarget.value), d(ie, () => S.i18n("sa-invite-otp-hint")), se.$$input = ($) => i($.currentTarget.value), d(le, () => S.i18n("sa-invite-password-hint")), d(me, (() => {
3171
+ var $ = f(() => !!k());
3172
+ return () => $() ? S.i18n("sa-invite-completing") : S.i18n("sa-invite-submit");
3173
+ })()), d(B, (() => {
3174
+ var $ = f(() => !e.hideSocial && q().length > 0);
3175
+ return () => $() && [(() => {
3176
+ var O = Uu(), z = O.firstChild;
3177
+ return d(z, () => S.i18n("sa-or")), O;
3178
+ })(), f(() => q().map((O) => (() => {
3179
+ var z = qu();
3180
+ return z.$$click = () => Be(O.provider), d(z, (() => {
3181
+ var te = f(() => O.provider === "google");
3182
+ return () => te() && Ju();
3183
+ })(), null), d(z, (() => {
3184
+ var te = f(() => O.provider === "github");
3185
+ return () => te() && Vu();
3186
+ })(), null), d(z, (() => {
3187
+ var te = f(() => O.provider === "apple");
3188
+ return () => te() && Gu();
3189
+ })(), null), d(z, (() => {
3190
+ var te = f(() => O.provider === "oidc");
3191
+ return () => te() && Ku();
3192
+ })(), null), d(z, (() => {
3193
+ var te = f(() => O.provider === "google");
3194
+ return () => te() ? S.i18n("sa-social-google") : f(() => O.provider === "github")() ? S.i18n("sa-social-github") : f(() => O.provider === "apple")() ? S.i18n("sa-social-apple") : S.i18n("sa-social-oidc");
3195
+ })(), null), y(() => z.disabled = !!Ce() || k()), z;
3196
+ })()))];
3197
+ })(), null), y(($) => {
3198
+ var O = S.i18n("sa-invite-otp"), z = k() || o() !== "", te = S.i18n("sa-invite-password"), Se = k() || o() !== "", Te = k() || o() !== "";
3199
+ return O !== $.e && ge(Y, "placeholder", $.e = O), z !== $.t && (Y.disabled = $.t = z), te !== $.a && ge(se, "placeholder", $.a = te), Se !== $.o && (se.disabled = $.o = Se), Te !== $.i && (me.disabled = $.i = Te), $;
3096
3200
  }, {
3097
3201
  e: void 0,
3098
3202
  t: void 0,
3099
3203
  a: void 0,
3100
3204
  o: void 0,
3101
3205
  i: void 0
3102
- }), y(() => H.value = t()), y(() => V.value = r()), R;
3206
+ }), y(() => Y.value = t()), y(() => se.value = r()), B;
3103
3207
  })();
3104
3208
  });
3105
- Dt(["input"]);
3209
+ gt(["input", "click"]);