@startinblox/boilerplate 4.3.1 → 6.0.0

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.
Files changed (53) hide show
  1. package/.gitlab-ci.yml +3 -3
  2. package/AGENTS.md +518 -0
  3. package/README.md +16 -19
  4. package/biome.json +1 -1
  5. package/cypress/component/sample-object.cy.ts +816 -0
  6. package/cypress/component/solid-boilerplate.cy.ts +894 -5
  7. package/cypress/e2e/helpers/components/setupCacheInvalidation.cy.ts +512 -0
  8. package/cypress/e2e/helpers/components/setupCacheOnResourceReady.cy.ts +497 -0
  9. package/cypress/e2e/helpers/components/setupComponentSubscriptions.cy.ts +239 -0
  10. package/cypress/e2e/helpers/components/setupOnSaveReset.cy.ts +393 -0
  11. package/cypress/e2e/helpers/datas/checkValueInIntervalRecursive.cy.ts +563 -0
  12. package/cypress/e2e/helpers/datas/dataBuilder.cy.ts +508 -0
  13. package/cypress/e2e/helpers/datas/filterGenerator.cy.ts +285 -0
  14. package/cypress/e2e/helpers/datas/filterObjectByDateAfter.cy.ts +389 -0
  15. package/cypress/e2e/helpers/datas/filterObjectByDateInterval.cy.ts +613 -0
  16. package/cypress/e2e/helpers/datas/filterObjectById.cy.ts +276 -0
  17. package/cypress/e2e/helpers/datas/filterObjectByInterval.cy.ts +237 -0
  18. package/cypress/e2e/helpers/datas/filterObjectByNamedValue.cy.ts +299 -0
  19. package/cypress/e2e/helpers/datas/filterObjectByType.cy.ts +307 -0
  20. package/cypress/e2e/helpers/datas/filterObjectByValue.cy.ts +375 -0
  21. package/cypress/e2e/helpers/datas/sort.cy.ts +293 -0
  22. package/cypress/e2e/helpers/ui/formatDate.cy.ts +233 -0
  23. package/cypress/e2e/helpers/utils/requestNavigation.cy.ts +257 -0
  24. package/cypress/e2e/helpers/utils/uniq.cy.ts +160 -0
  25. package/cypress/support/e2e.ts +1 -0
  26. package/cypress.config.ts +2 -0
  27. package/dist/index.js +614 -646
  28. package/package.json +17 -15
  29. package/scripts/init.js +355 -0
  30. package/src/components/solid-boilerplate.ts +3 -6
  31. package/src/helpers/components/componentObjectHandler.ts +5 -7
  32. package/src/helpers/components/componentObjectsHandler.ts +8 -3
  33. package/src/helpers/components/orbitComponent.ts +106 -57
  34. package/src/helpers/components/setupCacheInvalidation.ts +50 -23
  35. package/src/helpers/components/setupCacheOnResourceReady.ts +42 -23
  36. package/src/helpers/components/setupComponentSubscriptions.ts +10 -9
  37. package/src/helpers/components/setupOnSaveReset.ts +27 -5
  38. package/src/helpers/datas/checkValueInIntervalRecursive.ts +66 -0
  39. package/src/helpers/datas/dataBuilder.ts +4 -4
  40. package/src/helpers/datas/filterGenerator.ts +13 -10
  41. package/src/helpers/datas/filterObjectByDateAfter.ts +3 -3
  42. package/src/helpers/datas/filterObjectByDateInterval.ts +44 -0
  43. package/src/helpers/datas/filterObjectById.ts +7 -6
  44. package/src/helpers/datas/filterObjectByInterval.ts +6 -110
  45. package/src/helpers/datas/filterObjectByNamedValue.ts +35 -33
  46. package/src/helpers/datas/filterObjectByType.ts +3 -3
  47. package/src/helpers/datas/filterObjectByValue.ts +17 -16
  48. package/src/helpers/datas/sort.ts +50 -23
  49. package/src/helpers/index.ts +6 -4
  50. package/src/helpers/ui/formatDate.ts +14 -1
  51. package/src/helpers/utils/requestNavigation.ts +5 -2
  52. package/src/helpers/utils/uniq.ts +1 -1
  53. package/src/index.ts +2 -2
package/dist/index.js CHANGED
@@ -1,20 +1,15 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const N = globalThis, et = N.ShadowRoot && (N.ShadyCSS === void 0 || N.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, st = Symbol(), ut = /* @__PURE__ */ new WeakMap();
7
- let Ct = class {
8
- constructor(t, e, r) {
9
- if (this._$cssResult$ = !0, r !== st) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
1
+ const D = globalThis, tt = D.ShadowRoot && (D.ShadyCSS === void 0 || D.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, et = /* @__PURE__ */ Symbol(), ut = /* @__PURE__ */ new WeakMap();
2
+ let Rt = class {
3
+ constructor(t, e, i) {
4
+ if (this._$cssResult$ = !0, i !== et) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
5
  this.cssText = t, this.t = e;
11
6
  }
12
7
  get styleSheet() {
13
8
  let t = this.o;
14
9
  const e = this.t;
15
- if (et && t === void 0) {
16
- const r = e !== void 0 && e.length === 1;
17
- r && (t = ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && ut.set(e, t));
10
+ if (tt && t === void 0) {
11
+ const i = e !== void 0 && e.length === 1;
12
+ i && (t = ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ut.set(e, t));
18
13
  }
19
14
  return t;
20
15
  }
@@ -22,33 +17,28 @@ let Ct = class {
22
17
  return this.cssText;
23
18
  }
24
19
  };
25
- const it = (s) => new Ct(typeof s == "string" ? s : s + "", void 0, st), rt = (s, ...t) => {
26
- const e = s.length === 1 ? s[0] : t.reduce(((r, i, o) => r + ((n) => {
20
+ const st = (s) => new Rt(typeof s == "string" ? s : s + "", void 0, et), rt = (s, ...t) => {
21
+ const e = s.length === 1 ? s[0] : t.reduce((i, r, o) => i + ((n) => {
27
22
  if (n._$cssResult$ === !0) return n.cssText;
28
23
  if (typeof n == "number") return n;
29
24
  throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
- })(i) + s[o + 1]), s[0]);
31
- return new Ct(e, s, st);
32
- }, Vt = (s, t) => {
33
- if (et) s.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
25
+ })(r) + s[o + 1], s[0]);
26
+ return new Rt(e, s, et);
27
+ }, Bt = (s, t) => {
28
+ if (tt) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
34
29
  else for (const e of t) {
35
- const r = document.createElement("style"), i = N.litNonce;
36
- i !== void 0 && r.setAttribute("nonce", i), r.textContent = e.cssText, s.appendChild(r);
30
+ const i = document.createElement("style"), r = D.litNonce;
31
+ r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i);
37
32
  }
38
- }, dt = et ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
33
+ }, dt = tt ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
39
34
  let e = "";
40
- for (const r of t.cssRules) e += r.cssText;
41
- return it(e);
35
+ for (const i of t.cssRules) e += i.cssText;
36
+ return st(e);
42
37
  })(s) : s;
43
- /**
44
- * @license
45
- * Copyright 2017 Google LLC
46
- * SPDX-License-Identifier: BSD-3-Clause
47
- */
48
- const { is: Bt, defineProperty: Wt, getOwnPropertyDescriptor: Ft, getOwnPropertyNames: Kt, getOwnPropertySymbols: Xt, getPrototypeOf: Jt } = Object, B = globalThis, pt = B.trustedTypes, Zt = pt ? pt.emptyScript : "", Gt = B.reactiveElementPolyfillSupport, O = (s, t) => s, D = { toAttribute(s, t) {
38
+ const { is: Wt, defineProperty: Ft, getOwnPropertyDescriptor: Kt, getOwnPropertyNames: Zt, getOwnPropertySymbols: Jt, getPrototypeOf: Xt } = Object, W = globalThis, pt = W.trustedTypes, Gt = pt ? pt.emptyScript : "", Qt = W.reactiveElementPolyfillSupport, O = (s, t) => s, q = { toAttribute(s, t) {
49
39
  switch (t) {
50
40
  case Boolean:
51
- s = s ? Zt : null;
41
+ s = s ? Gt : null;
52
42
  break;
53
43
  case Object:
54
44
  case Array:
@@ -73,8 +63,8 @@ const { is: Bt, defineProperty: Wt, getOwnPropertyDescriptor: Ft, getOwnProperty
73
63
  }
74
64
  }
75
65
  return e;
76
- } }, W = (s, t) => !Bt(s, t), ft = { attribute: !0, type: String, converter: D, reflect: !1, useDefault: !1, hasChanged: W };
77
- Symbol.metadata ??= Symbol("metadata"), B.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
66
+ } }, F = (s, t) => !Wt(s, t), ft = { attribute: !0, type: String, converter: q, reflect: !1, useDefault: !1, hasChanged: F };
67
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), W.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
68
  let E = class extends HTMLElement {
79
69
  static addInitializer(t) {
80
70
  this._$Ei(), (this.l ??= []).push(t);
@@ -84,19 +74,19 @@ let E = class extends HTMLElement {
84
74
  }
85
75
  static createProperty(t, e = ft) {
86
76
  if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
87
- const r = Symbol(), i = this.getPropertyDescriptor(t, r, e);
88
- i !== void 0 && Wt(this.prototype, t, i);
77
+ const i = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, i, e);
78
+ r !== void 0 && Ft(this.prototype, t, r);
89
79
  }
90
80
  }
91
- static getPropertyDescriptor(t, e, r) {
92
- const { get: i, set: o } = Ft(this.prototype, t) ?? { get() {
81
+ static getPropertyDescriptor(t, e, i) {
82
+ const { get: r, set: o } = Kt(this.prototype, t) ?? { get() {
93
83
  return this[e];
94
84
  }, set(n) {
95
85
  this[e] = n;
96
86
  } };
97
- return { get: i, set(n) {
98
- const h = i?.call(this);
99
- o?.call(this, n), this.requestUpdate(t, h, r);
87
+ return { get: r, set(n) {
88
+ const c = r?.call(this);
89
+ o?.call(this, n), this.requestUpdate(t, c, i);
100
90
  }, configurable: !0, enumerable: !0 };
101
91
  }
102
92
  static getPropertyOptions(t) {
@@ -104,44 +94,44 @@ let E = class extends HTMLElement {
104
94
  }
105
95
  static _$Ei() {
106
96
  if (this.hasOwnProperty(O("elementProperties"))) return;
107
- const t = Jt(this);
97
+ const t = Xt(this);
108
98
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
109
99
  }
110
100
  static finalize() {
111
101
  if (this.hasOwnProperty(O("finalized"))) return;
112
102
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(O("properties"))) {
113
- const e = this.properties, r = [...Kt(e), ...Xt(e)];
114
- for (const i of r) this.createProperty(i, e[i]);
103
+ const e = this.properties, i = [...Zt(e), ...Jt(e)];
104
+ for (const r of i) this.createProperty(r, e[r]);
115
105
  }
116
106
  const t = this[Symbol.metadata];
117
107
  if (t !== null) {
118
108
  const e = litPropertyMetadata.get(t);
119
- if (e !== void 0) for (const [r, i] of e) this.elementProperties.set(r, i);
109
+ if (e !== void 0) for (const [i, r] of e) this.elementProperties.set(i, r);
120
110
  }
121
111
  this._$Eh = /* @__PURE__ */ new Map();
122
- for (const [e, r] of this.elementProperties) {
123
- const i = this._$Eu(e, r);
124
- i !== void 0 && this._$Eh.set(i, e);
112
+ for (const [e, i] of this.elementProperties) {
113
+ const r = this._$Eu(e, i);
114
+ r !== void 0 && this._$Eh.set(r, e);
125
115
  }
126
116
  this.elementStyles = this.finalizeStyles(this.styles);
127
117
  }
128
118
  static finalizeStyles(t) {
129
119
  const e = [];
130
120
  if (Array.isArray(t)) {
131
- const r = new Set(t.flat(1 / 0).reverse());
132
- for (const i of r) e.unshift(dt(i));
121
+ const i = new Set(t.flat(1 / 0).reverse());
122
+ for (const r of i) e.unshift(dt(r));
133
123
  } else t !== void 0 && e.push(dt(t));
134
124
  return e;
135
125
  }
136
126
  static _$Eu(t, e) {
137
- const r = e.attribute;
138
- return r === !1 ? void 0 : typeof r == "string" ? r : typeof t == "string" ? t.toLowerCase() : void 0;
127
+ const i = e.attribute;
128
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
139
129
  }
140
130
  constructor() {
141
131
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
142
132
  }
143
133
  _$Ev() {
144
- this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
134
+ this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
145
135
  }
146
136
  addController(t) {
147
137
  (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
@@ -151,50 +141,50 @@ let E = class extends HTMLElement {
151
141
  }
152
142
  _$E_() {
153
143
  const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
154
- for (const r of e.keys()) this.hasOwnProperty(r) && (t.set(r, this[r]), delete this[r]);
144
+ for (const i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
155
145
  t.size > 0 && (this._$Ep = t);
156
146
  }
157
147
  createRenderRoot() {
158
148
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
159
- return Vt(t, this.constructor.elementStyles), t;
149
+ return Bt(t, this.constructor.elementStyles), t;
160
150
  }
161
151
  connectedCallback() {
162
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
152
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
163
153
  }
164
154
  enableUpdating(t) {
165
155
  }
166
156
  disconnectedCallback() {
167
- this._$EO?.forEach(((t) => t.hostDisconnected?.()));
157
+ this._$EO?.forEach((t) => t.hostDisconnected?.());
168
158
  }
169
- attributeChangedCallback(t, e, r) {
170
- this._$AK(t, r);
159
+ attributeChangedCallback(t, e, i) {
160
+ this._$AK(t, i);
171
161
  }
172
162
  _$ET(t, e) {
173
- const r = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, r);
174
- if (i !== void 0 && r.reflect === !0) {
175
- const o = (r.converter?.toAttribute !== void 0 ? r.converter : D).toAttribute(e, r.type);
176
- this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
163
+ const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
164
+ if (r !== void 0 && i.reflect === !0) {
165
+ const o = (i.converter?.toAttribute !== void 0 ? i.converter : q).toAttribute(e, i.type);
166
+ this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
177
167
  }
178
168
  }
179
169
  _$AK(t, e) {
180
- const r = this.constructor, i = r._$Eh.get(t);
181
- if (i !== void 0 && this._$Em !== i) {
182
- const o = r.getPropertyOptions(i), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : D;
183
- this._$Em = i;
184
- const h = n.fromAttribute(e, o.type);
185
- this[i] = h ?? this._$Ej?.get(i) ?? h, this._$Em = null;
170
+ const i = this.constructor, r = i._$Eh.get(t);
171
+ if (r !== void 0 && this._$Em !== r) {
172
+ const o = i.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : q;
173
+ this._$Em = r;
174
+ const c = n.fromAttribute(e, o.type);
175
+ this[r] = c ?? this._$Ej?.get(r) ?? c, this._$Em = null;
186
176
  }
187
177
  }
188
- requestUpdate(t, e, r) {
178
+ requestUpdate(t, e, i, r = !1, o) {
189
179
  if (t !== void 0) {
190
- const i = this.constructor, o = this[t];
191
- if (r ??= i.getPropertyOptions(t), !((r.hasChanged ?? W)(o, e) || r.useDefault && r.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, r)))) return;
192
- this.C(t, e, r);
180
+ const n = this.constructor;
181
+ if (r === !1 && (o = this[t]), i ??= n.getPropertyOptions(t), !((i.hasChanged ?? F)(o, e) || i.useDefault && i.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(n._$Eu(t, i)))) return;
182
+ this.C(t, e, i);
193
183
  }
194
184
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
195
185
  }
196
- C(t, e, { useDefault: r, reflect: i, wrapped: o }, n) {
197
- r && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || r || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
186
+ C(t, e, { useDefault: i, reflect: r, wrapped: o }, n) {
187
+ i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
198
188
  }
199
189
  async _$EP() {
200
190
  this.isUpdatePending = !0;
@@ -213,28 +203,28 @@ let E = class extends HTMLElement {
213
203
  if (!this.isUpdatePending) return;
214
204
  if (!this.hasUpdated) {
215
205
  if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
216
- for (const [i, o] of this._$Ep) this[i] = o;
206
+ for (const [r, o] of this._$Ep) this[r] = o;
217
207
  this._$Ep = void 0;
218
208
  }
219
- const r = this.constructor.elementProperties;
220
- if (r.size > 0) for (const [i, o] of r) {
221
- const { wrapped: n } = o, h = this[i];
222
- n !== !0 || this._$AL.has(i) || h === void 0 || this.C(i, void 0, o, h);
209
+ const i = this.constructor.elementProperties;
210
+ if (i.size > 0) for (const [r, o] of i) {
211
+ const { wrapped: n } = o, c = this[r];
212
+ n !== !0 || this._$AL.has(r) || c === void 0 || this.C(r, void 0, o, c);
223
213
  }
224
214
  }
225
215
  let t = !1;
226
216
  const e = this._$AL;
227
217
  try {
228
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((r) => r.hostUpdate?.())), this.update(e)) : this._$EM();
229
- } catch (r) {
230
- throw t = !1, this._$EM(), r;
218
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((i) => i.hostUpdate?.()), this.update(e)) : this._$EM();
219
+ } catch (i) {
220
+ throw t = !1, this._$EM(), i;
231
221
  }
232
222
  t && this._$AE(e);
233
223
  }
234
224
  willUpdate(t) {
235
225
  }
236
226
  _$AE(t) {
237
- this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
227
+ this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
238
228
  }
239
229
  _$EM() {
240
230
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
@@ -249,82 +239,165 @@ let E = class extends HTMLElement {
249
239
  return !0;
250
240
  }
251
241
  update(t) {
252
- this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
242
+ this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM();
253
243
  }
254
244
  updated(t) {
255
245
  }
256
246
  firstUpdated(t) {
257
247
  }
258
248
  };
259
- E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[O("elementProperties")] = /* @__PURE__ */ new Map(), E[O("finalized")] = /* @__PURE__ */ new Map(), Gt?.({ ReactiveElement: E }), (B.reactiveElementVersions ??= []).push("2.1.1");
260
- /**
261
- * @license
262
- * Copyright 2017 Google LLC
263
- * SPDX-License-Identifier: BSD-3-Clause
264
- */
265
- const ot = globalThis, q = ot.trustedTypes, _t = q ? q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Pt = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, Rt = "?" + y, Qt = `<${Rt}>`, A = document, j = () => A.createComment(""), x = (s) => s === null || typeof s != "object" && typeof s != "function", nt = Array.isArray, Yt = (s) => nt(s) || typeof s?.[Symbol.iterator] == "function", K = `[
266
- \f\r]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, $t = /-->/g, gt = />/g, b = RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^
267
- \f\r"'\`<>=]|("|')|))|$)`, "g"), yt = /'/g, vt = /"/g, Ot = /^(?:script|style|textarea|title)$/i, te = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), T = te(1), C = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), bt = /* @__PURE__ */ new WeakMap(), w = A.createTreeWalker(A, 129);
268
- function jt(s, t) {
269
- if (!nt(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
270
- return _t !== void 0 ? _t.createHTML(t) : t;
249
+ E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[O("elementProperties")] = /* @__PURE__ */ new Map(), E[O("finalized")] = /* @__PURE__ */ new Map(), Qt?.({ ReactiveElement: E }), (W.reactiveElementVersions ??= []).push("2.1.2");
250
+ const Yt = /* @__PURE__ */ Symbol();
251
+ let te = class {
252
+ get taskComplete() {
253
+ return this.t || (this.i === 1 ? this.t = new Promise(((t, e) => {
254
+ this.o = t, this.h = e;
255
+ })) : this.i === 3 ? this.t = Promise.reject(this.l) : this.t = Promise.resolve(this.u)), this.t;
256
+ }
257
+ constructor(t, e, i) {
258
+ this.p = 0, this.i = 0, (this._ = t).addController(this);
259
+ const r = typeof e == "object" ? e : { task: e, args: i };
260
+ this.v = r.task, this.j = r.args, this.m = r.argsEqual ?? ee, this.k = r.onComplete, this.A = r.onError, this.autoRun = r.autoRun ?? !0, "initialValue" in r && (this.u = r.initialValue, this.i = 2, this.O = this.T?.());
261
+ }
262
+ hostUpdate() {
263
+ this.autoRun === !0 && this.S();
264
+ }
265
+ hostUpdated() {
266
+ this.autoRun === "afterUpdate" && this.S();
267
+ }
268
+ T() {
269
+ if (this.j === void 0) return;
270
+ const t = this.j();
271
+ if (!Array.isArray(t)) throw Error("The args function must return an array");
272
+ return t;
273
+ }
274
+ async S() {
275
+ const t = this.T(), e = this.O;
276
+ this.O = t, t === e || t === void 0 || e !== void 0 && this.m(e, t) || await this.run(t);
277
+ }
278
+ async run(t) {
279
+ let e, i;
280
+ t ??= this.T(), this.O = t, this.i === 1 ? this.q?.abort() : (this.t = void 0, this.o = void 0, this.h = void 0), this.i = 1, this.autoRun === "afterUpdate" ? queueMicrotask((() => this._.requestUpdate())) : this._.requestUpdate();
281
+ const r = ++this.p;
282
+ this.q = new AbortController();
283
+ let o = !1;
284
+ try {
285
+ e = await this.v(t, { signal: this.q.signal });
286
+ } catch (n) {
287
+ o = !0, i = n;
288
+ }
289
+ if (this.p === r) {
290
+ if (e === Yt) this.i = 0;
291
+ else {
292
+ if (o === !1) {
293
+ try {
294
+ this.k?.(e);
295
+ } catch {
296
+ }
297
+ this.i = 2, this.o?.(e);
298
+ } else {
299
+ try {
300
+ this.A?.(i);
301
+ } catch {
302
+ }
303
+ this.i = 3, this.h?.(i);
304
+ }
305
+ this.u = e, this.l = i;
306
+ }
307
+ this._.requestUpdate();
308
+ }
309
+ }
310
+ abort(t) {
311
+ this.i === 1 && this.q?.abort(t);
312
+ }
313
+ get value() {
314
+ return this.u;
315
+ }
316
+ get error() {
317
+ return this.l;
318
+ }
319
+ get status() {
320
+ return this.i;
321
+ }
322
+ render(t) {
323
+ switch (this.i) {
324
+ case 0:
325
+ return t.initial?.();
326
+ case 1:
327
+ return t.pending?.();
328
+ case 2:
329
+ return t.complete?.(this.value);
330
+ case 3:
331
+ return t.error?.(this.error);
332
+ default:
333
+ throw Error("Unexpected status: " + this.i);
334
+ }
335
+ }
336
+ };
337
+ const ee = (s, t) => s === t || s.length === t.length && s.every(((e, i) => !F(e, t[i])));
338
+ const it = globalThis, _t = (s) => s, k = it.trustedTypes, $t = k ? k.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, xt = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, Ot = "?" + v, se = `<${Ot}>`, S = document, j = () => S.createComment(""), T = (s) => s === null || typeof s != "object" && typeof s != "function", ot = Array.isArray, re = (s) => ot(s) || typeof s?.[Symbol.iterator] == "function", Z = `[
339
+ \f\r]`, x = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, gt = /-->/g, yt = />/g, m = RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^
340
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), vt = /'/g, mt = /"/g, jt = /^(?:script|style|textarea|title)$/i, ie = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), L = ie(1), C = /* @__PURE__ */ Symbol.for("lit-noChange"), d = /* @__PURE__ */ Symbol.for("lit-nothing"), bt = /* @__PURE__ */ new WeakMap(), A = S.createTreeWalker(S, 129);
341
+ function Tt(s, t) {
342
+ if (!ot(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
343
+ return $t !== void 0 ? $t.createHTML(t) : t;
271
344
  }
272
- const ee = (s, t) => {
273
- const e = s.length - 1, r = [];
274
- let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = R;
275
- for (let h = 0; h < e; h++) {
276
- const a = s[h];
277
- let u, d, l = -1, f = 0;
278
- for (; f < a.length && (n.lastIndex = f, d = n.exec(a), d !== null); ) f = n.lastIndex, n === R ? d[1] === "!--" ? n = $t : d[1] !== void 0 ? n = gt : d[2] !== void 0 ? (Ot.test(d[2]) && (i = RegExp("</" + d[2], "g")), n = b) : d[3] !== void 0 && (n = b) : n === b ? d[0] === ">" ? (n = i ?? R, l = -1) : d[1] === void 0 ? l = -2 : (l = n.lastIndex - d[2].length, u = d[1], n = d[3] === void 0 ? b : d[3] === '"' ? vt : yt) : n === vt || n === yt ? n = b : n === $t || n === gt ? n = R : (n = b, i = void 0);
279
- const g = n === b && s[h + 1].startsWith("/>") ? " " : "";
280
- o += n === R ? a + Qt : l >= 0 ? (r.push(u), a.slice(0, l) + Pt + a.slice(l) + y + g) : a + y + (l === -2 ? h : g);
281
- }
282
- return [jt(s, o + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
345
+ const oe = (s, t) => {
346
+ const e = s.length - 1, i = [];
347
+ let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = x;
348
+ for (let c = 0; c < e; c++) {
349
+ const a = s[c];
350
+ let l, u, h = -1, p = 0;
351
+ for (; p < a.length && (n.lastIndex = p, u = n.exec(a), u !== null); ) p = n.lastIndex, n === x ? u[1] === "!--" ? n = gt : u[1] !== void 0 ? n = yt : u[2] !== void 0 ? (jt.test(u[2]) && (r = RegExp("</" + u[2], "g")), n = m) : u[3] !== void 0 && (n = m) : n === m ? u[0] === ">" ? (n = r ?? x, h = -1) : u[1] === void 0 ? h = -2 : (h = n.lastIndex - u[2].length, l = u[1], n = u[3] === void 0 ? m : u[3] === '"' ? mt : vt) : n === mt || n === vt ? n = m : n === gt || n === yt ? n = x : (n = m, r = void 0);
352
+ const y = n === m && s[c + 1].startsWith("/>") ? " " : "";
353
+ o += n === x ? a + se : h >= 0 ? (i.push(l), a.slice(0, h) + xt + a.slice(h) + v + y) : a + v + (h === -2 ? c : y);
354
+ }
355
+ return [Tt(s, o + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
283
356
  };
284
- class L {
285
- constructor({ strings: t, _$litType$: e }, r) {
286
- let i;
357
+ class U {
358
+ constructor({ strings: t, _$litType$: e }, i) {
359
+ let r;
287
360
  this.parts = [];
288
361
  let o = 0, n = 0;
289
- const h = t.length - 1, a = this.parts, [u, d] = ee(t, e);
290
- if (this.el = L.createElement(u, r), w.currentNode = this.el.content, e === 2 || e === 3) {
291
- const l = this.el.content.firstChild;
292
- l.replaceWith(...l.childNodes);
362
+ const c = t.length - 1, a = this.parts, [l, u] = oe(t, e);
363
+ if (this.el = U.createElement(l, i), A.currentNode = this.el.content, e === 2 || e === 3) {
364
+ const h = this.el.content.firstChild;
365
+ h.replaceWith(...h.childNodes);
293
366
  }
294
- for (; (i = w.nextNode()) !== null && a.length < h; ) {
295
- if (i.nodeType === 1) {
296
- if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(Pt)) {
297
- const f = d[n++], g = i.getAttribute(l).split(y), M = /([.?@])?(.*)/.exec(f);
298
- a.push({ type: 1, index: o, name: M[2], strings: g, ctor: M[1] === "." ? ie : M[1] === "?" ? re : M[1] === "@" ? oe : F }), i.removeAttribute(l);
299
- } else l.startsWith(y) && (a.push({ type: 6, index: o }), i.removeAttribute(l));
300
- if (Ot.test(i.tagName)) {
301
- const l = i.textContent.split(y), f = l.length - 1;
302
- if (f > 0) {
303
- i.textContent = q ? q.emptyScript : "";
304
- for (let g = 0; g < f; g++) i.append(l[g], j()), w.nextNode(), a.push({ type: 2, index: ++o });
305
- i.append(l[f], j());
367
+ for (; (r = A.nextNode()) !== null && a.length < c; ) {
368
+ if (r.nodeType === 1) {
369
+ if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(xt)) {
370
+ const p = u[n++], y = r.getAttribute(h).split(v), N = /([.?@])?(.*)/.exec(p);
371
+ a.push({ type: 1, index: o, name: N[2], strings: y, ctor: N[1] === "." ? ae : N[1] === "?" ? ce : N[1] === "@" ? le : K }), r.removeAttribute(h);
372
+ } else h.startsWith(v) && (a.push({ type: 6, index: o }), r.removeAttribute(h));
373
+ if (jt.test(r.tagName)) {
374
+ const h = r.textContent.split(v), p = h.length - 1;
375
+ if (p > 0) {
376
+ r.textContent = k ? k.emptyScript : "";
377
+ for (let y = 0; y < p; y++) r.append(h[y], j()), A.nextNode(), a.push({ type: 2, index: ++o });
378
+ r.append(h[p], j());
306
379
  }
307
380
  }
308
- } else if (i.nodeType === 8) if (i.data === Rt) a.push({ type: 2, index: o });
381
+ } else if (r.nodeType === 8) if (r.data === Ot) a.push({ type: 2, index: o });
309
382
  else {
310
- let l = -1;
311
- for (; (l = i.data.indexOf(y, l + 1)) !== -1; ) a.push({ type: 7, index: o }), l += y.length - 1;
383
+ let h = -1;
384
+ for (; (h = r.data.indexOf(v, h + 1)) !== -1; ) a.push({ type: 7, index: o }), h += v.length - 1;
312
385
  }
313
386
  o++;
314
387
  }
315
388
  }
316
389
  static createElement(t, e) {
317
- const r = A.createElement("template");
318
- return r.innerHTML = t, r;
390
+ const i = S.createElement("template");
391
+ return i.innerHTML = t, i;
319
392
  }
320
393
  }
321
- function P(s, t, e = s, r) {
394
+ function R(s, t, e = s, i) {
322
395
  if (t === C) return t;
323
- let i = r !== void 0 ? e._$Co?.[r] : e._$Cl;
324
- const o = x(t) ? void 0 : t._$litDirective$;
325
- return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(s), i._$AT(s, e, r)), r !== void 0 ? (e._$Co ??= [])[r] = i : e._$Cl = i), i !== void 0 && (t = P(s, i._$AS(s, t.values), i, r)), t;
396
+ let r = i !== void 0 ? e._$Co?.[i] : e._$Cl;
397
+ const o = T(t) ? void 0 : t._$litDirective$;
398
+ return r?.constructor !== o && (r?._$AO?.(!1), o === void 0 ? r = void 0 : (r = new o(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ??= [])[i] = r : e._$Cl = r), r !== void 0 && (t = R(s, r._$AS(s, t.values), r, i)), t;
326
399
  }
327
- class se {
400
+ class ne {
328
401
  constructor(t, e) {
329
402
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
330
403
  }
@@ -335,29 +408,29 @@ class se {
335
408
  return this._$AM._$AU;
336
409
  }
337
410
  u(t) {
338
- const { el: { content: e }, parts: r } = this._$AD, i = (t?.creationScope ?? A).importNode(e, !0);
339
- w.currentNode = i;
340
- let o = w.nextNode(), n = 0, h = 0, a = r[0];
411
+ const { el: { content: e }, parts: i } = this._$AD, r = (t?.creationScope ?? S).importNode(e, !0);
412
+ A.currentNode = r;
413
+ let o = A.nextNode(), n = 0, c = 0, a = i[0];
341
414
  for (; a !== void 0; ) {
342
415
  if (n === a.index) {
343
- let u;
344
- a.type === 2 ? u = new U(o, o.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (u = new ne(o, this, t)), this._$AV.push(u), a = r[++h];
416
+ let l;
417
+ a.type === 2 ? l = new M(o, o.nextSibling, this, t) : a.type === 1 ? l = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (l = new he(o, this, t)), this._$AV.push(l), a = i[++c];
345
418
  }
346
- n !== a?.index && (o = w.nextNode(), n++);
419
+ n !== a?.index && (o = A.nextNode(), n++);
347
420
  }
348
- return w.currentNode = A, i;
421
+ return A.currentNode = S, r;
349
422
  }
350
423
  p(t) {
351
424
  let e = 0;
352
- for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, e), e += r.strings.length - 2) : r._$AI(t[e])), e++;
425
+ for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
353
426
  }
354
427
  }
355
- class U {
428
+ class M {
356
429
  get _$AU() {
357
430
  return this._$AM?._$AU ?? this._$Cv;
358
431
  }
359
- constructor(t, e, r, i) {
360
- this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
432
+ constructor(t, e, i, r) {
433
+ this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
361
434
  }
362
435
  get parentNode() {
363
436
  let t = this._$AA.parentNode;
@@ -371,7 +444,7 @@ class U {
371
444
  return this._$AB;
372
445
  }
373
446
  _$AI(t, e = this) {
374
- t = P(this, t, e), x(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== C && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Yt(t) ? this.k(t) : this._(t);
447
+ t = R(this, t, e), T(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== C && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : re(t) ? this.k(t) : this._(t);
375
448
  }
376
449
  O(t) {
377
450
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -380,120 +453,115 @@ class U {
380
453
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
381
454
  }
382
455
  _(t) {
383
- this._$AH !== c && x(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t;
456
+ this._$AH !== d && T(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t;
384
457
  }
385
458
  $(t) {
386
- const { values: e, _$litType$: r } = t, i = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = L.createElement(jt(r.h, r.h[0]), this.options)), r);
387
- if (this._$AH?._$AD === i) this._$AH.p(e);
459
+ const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = U.createElement(Tt(i.h, i.h[0]), this.options)), i);
460
+ if (this._$AH?._$AD === r) this._$AH.p(e);
388
461
  else {
389
- const o = new se(i, this), n = o.u(this.options);
462
+ const o = new ne(r, this), n = o.u(this.options);
390
463
  o.p(e), this.T(n), this._$AH = o;
391
464
  }
392
465
  }
393
466
  _$AC(t) {
394
467
  let e = bt.get(t.strings);
395
- return e === void 0 && bt.set(t.strings, e = new L(t)), e;
468
+ return e === void 0 && bt.set(t.strings, e = new U(t)), e;
396
469
  }
397
470
  k(t) {
398
- nt(this._$AH) || (this._$AH = [], this._$AR());
471
+ ot(this._$AH) || (this._$AH = [], this._$AR());
399
472
  const e = this._$AH;
400
- let r, i = 0;
401
- for (const o of t) i === e.length ? e.push(r = new U(this.O(j()), this.O(j()), this, this.options)) : r = e[i], r._$AI(o), i++;
402
- i < e.length && (this._$AR(r && r._$AB.nextSibling, i), e.length = i);
473
+ let i, r = 0;
474
+ for (const o of t) r === e.length ? e.push(i = new M(this.O(j()), this.O(j()), this, this.options)) : i = e[r], i._$AI(o), r++;
475
+ r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r);
403
476
  }
404
477
  _$AR(t = this._$AA.nextSibling, e) {
405
478
  for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
406
- const r = t.nextSibling;
407
- t.remove(), t = r;
479
+ const i = _t(t).nextSibling;
480
+ _t(t).remove(), t = i;
408
481
  }
409
482
  }
410
483
  setConnected(t) {
411
484
  this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
412
485
  }
413
486
  }
414
- class F {
487
+ class K {
415
488
  get tagName() {
416
489
  return this.element.tagName;
417
490
  }
418
491
  get _$AU() {
419
492
  return this._$AM._$AU;
420
493
  }
421
- constructor(t, e, r, i, o) {
422
- this.type = 1, this._$AH = c, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = c;
494
+ constructor(t, e, i, r, o) {
495
+ this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = d;
423
496
  }
424
- _$AI(t, e = this, r, i) {
497
+ _$AI(t, e = this, i, r) {
425
498
  const o = this.strings;
426
499
  let n = !1;
427
- if (o === void 0) t = P(this, t, e, 0), n = !x(t) || t !== this._$AH && t !== C, n && (this._$AH = t);
500
+ if (o === void 0) t = R(this, t, e, 0), n = !T(t) || t !== this._$AH && t !== C, n && (this._$AH = t);
428
501
  else {
429
- const h = t;
430
- let a, u;
431
- for (t = o[0], a = 0; a < o.length - 1; a++) u = P(this, h[r + a], e, a), u === C && (u = this._$AH[a]), n ||= !x(u) || u !== this._$AH[a], u === c ? t = c : t !== c && (t += (u ?? "") + o[a + 1]), this._$AH[a] = u;
502
+ const c = t;
503
+ let a, l;
504
+ for (t = o[0], a = 0; a < o.length - 1; a++) l = R(this, c[i + a], e, a), l === C && (l = this._$AH[a]), n ||= !T(l) || l !== this._$AH[a], l === d ? t = d : t !== d && (t += (l ?? "") + o[a + 1]), this._$AH[a] = l;
432
505
  }
433
- n && !i && this.j(t);
506
+ n && !r && this.j(t);
434
507
  }
435
508
  j(t) {
436
- t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
509
+ t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
437
510
  }
438
511
  }
439
- class ie extends F {
512
+ class ae extends K {
440
513
  constructor() {
441
514
  super(...arguments), this.type = 3;
442
515
  }
443
516
  j(t) {
444
- this.element[this.name] = t === c ? void 0 : t;
517
+ this.element[this.name] = t === d ? void 0 : t;
445
518
  }
446
519
  }
447
- class re extends F {
520
+ class ce extends K {
448
521
  constructor() {
449
522
  super(...arguments), this.type = 4;
450
523
  }
451
524
  j(t) {
452
- this.element.toggleAttribute(this.name, !!t && t !== c);
525
+ this.element.toggleAttribute(this.name, !!t && t !== d);
453
526
  }
454
527
  }
455
- class oe extends F {
456
- constructor(t, e, r, i, o) {
457
- super(t, e, r, i, o), this.type = 5;
528
+ class le extends K {
529
+ constructor(t, e, i, r, o) {
530
+ super(t, e, i, r, o), this.type = 5;
458
531
  }
459
532
  _$AI(t, e = this) {
460
- if ((t = P(this, t, e, 0) ?? c) === C) return;
461
- const r = this._$AH, i = t === c && r !== c || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, o = t !== c && (r === c || i);
462
- i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
533
+ if ((t = R(this, t, e, 0) ?? d) === C) return;
534
+ const i = this._$AH, r = t === d && i !== d || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== d && (i === d || r);
535
+ r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
463
536
  }
464
537
  handleEvent(t) {
465
538
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
466
539
  }
467
540
  }
468
- class ne {
469
- constructor(t, e, r) {
470
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = r;
541
+ class he {
542
+ constructor(t, e, i) {
543
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
471
544
  }
472
545
  get _$AU() {
473
546
  return this._$AM._$AU;
474
547
  }
475
548
  _$AI(t) {
476
- P(this, t);
549
+ R(this, t);
477
550
  }
478
551
  }
479
- const ae = ot.litHtmlPolyfillSupport;
480
- ae?.(L, U), (ot.litHtmlVersions ??= []).push("3.3.1");
481
- const he = (s, t, e) => {
482
- const r = e?.renderBefore ?? t;
483
- let i = r._$litPart$;
484
- if (i === void 0) {
552
+ const ue = it.litHtmlPolyfillSupport;
553
+ ue?.(U, M), (it.litHtmlVersions ??= []).push("3.3.2");
554
+ const de = (s, t, e) => {
555
+ const i = e?.renderBefore ?? t;
556
+ let r = i._$litPart$;
557
+ if (r === void 0) {
485
558
  const o = e?.renderBefore ?? null;
486
- r._$litPart$ = i = new U(t.insertBefore(j(), o), o, void 0, e ?? {});
559
+ i._$litPart$ = r = new M(t.insertBefore(j(), o), o, void 0, e ?? {});
487
560
  }
488
- return i._$AI(s), i;
561
+ return r._$AI(s), r;
489
562
  };
490
- /**
491
- * @license
492
- * Copyright 2017 Google LLC
493
- * SPDX-License-Identifier: BSD-3-Clause
494
- */
495
- const at = globalThis;
496
- let S = class extends E {
563
+ const nt = globalThis;
564
+ class P extends E {
497
565
  constructor() {
498
566
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
499
567
  }
@@ -503,7 +571,7 @@ let S = class extends E {
503
571
  }
504
572
  update(t) {
505
573
  const e = this.render();
506
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = he(e, this.renderRoot, this.renderOptions);
574
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = de(e, this.renderRoot, this.renderOptions);
507
575
  }
508
576
  connectedCallback() {
509
577
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -514,199 +582,116 @@ let S = class extends E {
514
582
  render() {
515
583
  return C;
516
584
  }
517
- };
518
- S._$litElement$ = !0, S.finalized = !0, at.litElementHydrateSupport?.({ LitElement: S });
519
- const le = at.litElementPolyfillSupport;
520
- le?.({ LitElement: S });
521
- (at.litElementVersions ??= []).push("4.2.1");
522
- /**
523
- * @license
524
- * Copyright 2017 Google LLC
525
- * SPDX-License-Identifier: BSD-3-Clause
526
- */
527
- const ht = (s) => (t, e) => {
528
- e !== void 0 ? e.addInitializer((() => {
585
+ }
586
+ P._$litElement$ = !0, P.finalized = !0, nt.litElementHydrateSupport?.({ LitElement: P });
587
+ const pe = nt.litElementPolyfillSupport;
588
+ pe?.({ LitElement: P });
589
+ (nt.litElementVersions ??= []).push("4.2.2");
590
+ const at = (s) => (t, e) => {
591
+ e !== void 0 ? e.addInitializer(() => {
529
592
  customElements.define(s, t);
530
- })) : customElements.define(s, t);
593
+ }) : customElements.define(s, t);
531
594
  };
532
- /**
533
- * @license
534
- * Copyright 2017 Google LLC
535
- * SPDX-License-Identifier: BSD-3-Clause
536
- */
537
- const ce = { attribute: !0, type: String, converter: D, reflect: !1, hasChanged: W }, ue = (s = ce, t, e) => {
538
- const { kind: r, metadata: i } = e;
539
- let o = globalThis.litPropertyMetadata.get(i);
540
- if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), r === "setter" && ((s = Object.create(s)).wrapped = !0), o.set(e.name, s), r === "accessor") {
595
+ const fe = { attribute: !0, type: String, converter: q, reflect: !1, hasChanged: F }, _e = (s = fe, t, e) => {
596
+ const { kind: i, metadata: r } = e;
597
+ let o = globalThis.litPropertyMetadata.get(r);
598
+ if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), o.set(e.name, s), i === "accessor") {
541
599
  const { name: n } = e;
542
- return { set(h) {
600
+ return { set(c) {
543
601
  const a = t.get.call(this);
544
- t.set.call(this, h), this.requestUpdate(n, a, s);
545
- }, init(h) {
546
- return h !== void 0 && this.C(n, void 0, s, h), h;
602
+ t.set.call(this, c), this.requestUpdate(n, a, s, !0, c);
603
+ }, init(c) {
604
+ return c !== void 0 && this.C(n, void 0, s, c), c;
547
605
  } };
548
606
  }
549
- if (r === "setter") {
607
+ if (i === "setter") {
550
608
  const { name: n } = e;
551
- return function(h) {
609
+ return function(c) {
552
610
  const a = this[n];
553
- t.call(this, h), this.requestUpdate(n, a, s);
611
+ t.call(this, c), this.requestUpdate(n, a, s, !0, c);
554
612
  };
555
613
  }
556
- throw Error("Unsupported decorator location: " + r);
614
+ throw Error("Unsupported decorator location: " + i);
557
615
  };
558
- function p(s) {
559
- return (t, e) => typeof e == "object" ? ue(s, t, e) : ((r, i, o) => {
560
- const n = i.hasOwnProperty(o);
561
- return i.constructor.createProperty(o, r), n ? Object.getOwnPropertyDescriptor(i, o) : void 0;
616
+ function f(s) {
617
+ return (t, e) => typeof e == "object" ? _e(s, t, e) : ((i, r, o) => {
618
+ const n = r.hasOwnProperty(o);
619
+ return r.constructor.createProperty(o, i), n ? Object.getOwnPropertyDescriptor(r, o) : void 0;
562
620
  })(s, t, e);
563
621
  }
564
- /**
565
- * @license
566
- * Copyright 2017 Google LLC
567
- * SPDX-License-Identifier: BSD-3-Clause
568
- */
569
- function xt(s) {
570
- return p({ ...s, state: !0, attribute: !1 });
622
+ function ct(s) {
623
+ return f({ ...s, state: !0, attribute: !1 });
571
624
  }
572
- /**
573
- * @license
574
- * Copyright 2017 Google LLC
575
- * SPDX-License-Identifier: BSD-3-Clause
576
- */
577
- const de = Symbol();
578
- class pe {
579
- get taskComplete() {
580
- return this.t || (this.i === 1 ? this.t = new Promise(((t, e) => {
581
- this.o = t, this.h = e;
582
- })) : this.i === 3 ? this.t = Promise.reject(this.l) : this.t = Promise.resolve(this.u)), this.t;
583
- }
584
- constructor(t, e, r) {
585
- this.p = 0, this.i = 0, (this._ = t).addController(this);
586
- const i = typeof e == "object" ? e : { task: e, args: r };
587
- this.v = i.task, this.j = i.args, this.m = i.argsEqual ?? fe, this.k = i.onComplete, this.A = i.onError, this.autoRun = i.autoRun ?? !0, "initialValue" in i && (this.u = i.initialValue, this.i = 2, this.O = this.T?.());
588
- }
589
- hostUpdate() {
590
- this.autoRun === !0 && this.S();
591
- }
592
- hostUpdated() {
593
- this.autoRun === "afterUpdate" && this.S();
594
- }
595
- T() {
596
- if (this.j === void 0) return;
597
- const t = this.j();
598
- if (!Array.isArray(t)) throw Error("The args function must return an array");
599
- return t;
600
- }
601
- async S() {
602
- const t = this.T(), e = this.O;
603
- this.O = t, t === e || t === void 0 || e !== void 0 && this.m(e, t) || await this.run(t);
604
- }
605
- async run(t) {
606
- let e, r;
607
- t ??= this.T(), this.O = t, this.i === 1 ? this.q?.abort() : (this.t = void 0, this.o = void 0, this.h = void 0), this.i = 1, this.autoRun === "afterUpdate" ? queueMicrotask((() => this._.requestUpdate())) : this._.requestUpdate();
608
- const i = ++this.p;
609
- this.q = new AbortController();
610
- let o = !1;
611
- try {
612
- e = await this.v(t, { signal: this.q.signal });
613
- } catch (n) {
614
- o = !0, r = n;
615
- }
616
- if (this.p === i) {
617
- if (e === de) this.i = 0;
618
- else {
619
- if (o === !1) {
620
- try {
621
- this.k?.(e);
622
- } catch {
623
- }
624
- this.i = 2, this.o?.(e);
625
- } else {
626
- try {
627
- this.A?.(r);
628
- } catch {
629
- }
630
- this.i = 3, this.h?.(r);
631
- }
632
- this.u = e, this.l = r;
633
- }
634
- this._.requestUpdate();
635
- }
636
- }
637
- abort(t) {
638
- this.i === 1 && this.q?.abort(t);
639
- }
640
- get value() {
641
- return this.u;
642
- }
643
- get error() {
644
- return this.l;
645
- }
646
- get status() {
647
- return this.i;
648
- }
649
- render(t) {
650
- switch (this.i) {
651
- case 0:
652
- return t.initial?.();
653
- case 1:
654
- return t.pending?.();
655
- case 2:
656
- return t.complete?.(this.value);
657
- case 3:
658
- return t.error?.(this.error);
659
- default:
660
- throw Error("Unexpected status: " + this.i);
661
- }
662
- }
663
- }
664
- const fe = (s, t) => s === t || s.length === t.length && s.every(((e, r) => !W(e, t[r])));
665
625
  !window.orbit && !"/".includes("cypress") && await new Promise((s) => {
666
626
  document.addEventListener("orbit-ready", () => {
667
627
  s(!0);
668
628
  });
669
629
  });
670
- var _e = Object.defineProperty, $e = (s, t, e, r) => {
671
- for (var i = void 0, o = s.length - 1, n; o >= 0; o--)
672
- (n = s[o]) && (i = n(t, e, i) || i);
673
- return i && _e(t, e, i), i;
630
+ class $e extends P {
631
+ constructor() {
632
+ super(...arguments), this.object = {
633
+ "@id": ""
634
+ }, this.isType = (t, e) => {
635
+ const r = (e ?? this.object)["@type"];
636
+ return Array.isArray(r) ? r.includes(t) : typeof r == "string" ? r === t : !1;
637
+ };
638
+ }
639
+ }
640
+ var ge = Object.defineProperty, ye = (s, t, e, i) => {
641
+ for (var r = void 0, o = s.length - 1, n; o >= 0; o--)
642
+ (n = s[o]) && (r = n(t, e, r) || r);
643
+ return r && ge(t, e, r), r;
674
644
  };
675
- class lt extends S {
645
+ class lt extends P {
676
646
  constructor() {
677
- super(...arguments), this.objects = [], this.hasType = (t, e = this.objects) => new Set(e.flatMap((i) => i["@type"])).has(t);
647
+ super(...arguments), this.objects = [], this.hasType = (t, e) => (e ?? this.objects ?? []).some((r) => {
648
+ const o = r["@type"];
649
+ return Array.isArray(o) ? o.includes(t) : typeof o == "string" ? o === t : !1;
650
+ });
678
651
  }
679
652
  }
680
- $e([
681
- p({ attribute: !1 })
653
+ ye([
654
+ f({ attribute: !1 })
682
655
  ], lt.prototype, "objects");
683
- var ge = Object.defineProperty, v = (s, t, e, r) => {
684
- for (var i = void 0, o = s.length - 1, n; o >= 0; o--)
685
- (n = s[o]) && (i = n(t, e, i) || i);
686
- return i && ge(t, e, i), i;
656
+ var ve = Object.defineProperty, g = (s, t, e, i) => {
657
+ for (var r = void 0, o = s.length - 1, n; o >= 0; o--)
658
+ (n = s[o]) && (r = n(t, e, r) || r);
659
+ return r && ve(t, e, r), r;
687
660
  };
688
- class $ extends lt {
661
+ class _ extends lt {
689
662
  constructor({
690
663
  defaultRoute: t = !1,
691
664
  setupSubscriptions: e = !0,
692
- ignoreRouter: r = !1
665
+ ignoreRouter: i = !1
693
666
  } = {}) {
694
- super(), this.cherryPickedProperties = [], this.currentRoute = "";
695
- const i = () => {
696
- document.readyState === "complete" && this._attach(t, e, r).then(
667
+ super(), this.ready = !1, this.cherryPickedProperties = [], this.currentRoute = "";
668
+ const r = () => {
669
+ document.readyState === "complete" && this._attach(t, e, i).then(
697
670
  (o) => {
698
671
  o && this.requestUpdate();
699
672
  }
700
673
  );
701
674
  };
702
- document.readyState === "complete" ? i() : document.addEventListener("readystatechange", i);
703
- }
704
- async _attach(t, e, r) {
705
- return !this.orbit && window.orbit && (this.orbit = window.orbit, e) ? (be({
706
- component: this,
707
- defaultRoute: t,
708
- ignoreRouter: r
709
- }), this.route && (this.component = this.orbit.getComponentFromRoute(this.route), this.component && this.orbit.components.map((i) => (i.uniq === this.component.uniq && (i.instance = this), i))), await this._afterAttach(), Promise.resolve(!0)) : Promise.resolve(!1);
675
+ document.readyState === "complete" ? r() : document.addEventListener("readystatechange", r);
676
+ }
677
+ async _attach(t, e, i) {
678
+ if (!this.orbit && window.orbit && (this.orbit = window.orbit, e)) {
679
+ if (we({
680
+ component: this,
681
+ defaultRoute: t,
682
+ ignoreRouter: i
683
+ }), this.route && (this.component = this.orbit.getComponentFromRoute(this.route), this.component))
684
+ for (const r of this.orbit.components)
685
+ r.uniq === this.component.uniq && (r.instance = this);
686
+ return await this._afterAttach(), this.ready = !0, this.dispatchEvent(
687
+ new CustomEvent("component-ready", {
688
+ detail: {
689
+ component: this.component
690
+ }
691
+ })
692
+ ), Promise.resolve(!0);
693
+ }
694
+ return Promise.resolve(!1);
710
695
  }
711
696
  async _afterAttach() {
712
697
  return Promise.resolve();
@@ -714,62 +699,72 @@ class $ extends lt {
714
699
  _navigate(t) {
715
700
  window.sibRouter.previousRoute = this.currentRoute, window.sibRouter.previousResource = window.sibRouter.currentResource;
716
701
  const e = t.target?.closest("[navigation-target]");
717
- let r = e.getAttribute("navigation-target");
718
- const i = e.getAttribute("navigation-subrouter"), o = e.getAttribute("navigation-resource"), n = e.getAttribute("navigation-rdf-type");
702
+ let i = e.getAttribute("navigation-target");
703
+ const r = e.getAttribute("navigation-subrouter"), o = e.getAttribute("navigation-resource"), n = e.getAttribute("navigation-rdf-type");
719
704
  if (n) {
720
- const h = window.orbit?.components?.filter(
705
+ const c = window.orbit?.components?.filter(
721
706
  (a) => a?.routeAttributes?.["rdf-type"] === n
722
707
  );
723
- h && (r = h[0]?.uniq);
708
+ c && (i = c[0]?.uniq);
724
709
  }
725
- r && Ae(
726
- (window.orbit ? window.orbit.getRoute(r, !0) : r) + (i ? `-${i}` : ""),
710
+ i && Se(
711
+ (window.orbit ? window.orbit.getRoute(i, !0) : i) + (r ? `-${r}` : ""),
727
712
  o
728
713
  ), t.preventDefault();
729
714
  }
730
715
  _normalizeLdpContains(t) {
731
- return !Array.isArray(t) && t !== null ? [t] : t;
716
+ return t === null ? [] : Array.isArray(t) ? t : [t];
732
717
  }
733
- async _expandContainer(t, e = !0) {
718
+ async _expandContainer(t, e = !0, i = this.cherryPickedProperties) {
734
719
  const r = [];
735
- for (const i of t) {
736
- const o = await this._getProxyValue(i, e);
737
- o && r.push(o);
738
- }
739
- return r;
720
+ return await Promise.all(
721
+ t.map(async (o) => {
722
+ const n = await this._getProxyValue(
723
+ await o,
724
+ e,
725
+ i
726
+ );
727
+ n && r.push(n);
728
+ })
729
+ ), r;
740
730
  }
741
- async _getProperties(t, e = !0, r = this.cherryPickedProperties) {
742
- const i = await t.properties, o = {
731
+ async _getProperties(t, e = !0, i = this.cherryPickedProperties) {
732
+ const r = await t.properties, o = {
743
733
  "@id": t["@id"],
744
734
  "@type": t["@type"],
745
735
  "@context": t.serverContext,
746
736
  _originalResource: t
747
- };
748
- for (const n of r)
749
- i?.includes(n.key) && (o[n.value] = await t.get(n.key), n.expand && (o[n.value] = await this._getProxyValue(
750
- o[n.value],
751
- e,
752
- r
753
- )), n.cast && (o[n.value] = await n.cast(o[n.value])));
737
+ }, n = i.map(async (a) => {
738
+ if (!r?.includes(a.key)) return;
739
+ let l = await t.get(a.key);
740
+ return a.expand && (l = await this._getProxyValue(l, e, i)), a.cast && (l = await a.cast(l)), { prop: a, value: l };
741
+ }), c = (await Promise.all(n)).filter(
742
+ (a) => a !== void 0
743
+ );
744
+ for (const { prop: a, value: l } of c)
745
+ l !== void 0 && (o[a.value] = l);
754
746
  return await this._responseAdaptator(o);
755
747
  }
756
- async _getProxyValue(t, e = !0, r = this.cherryPickedProperties) {
748
+ async _hasCherryPickedProperties(t) {
749
+ const e = await t.properties;
750
+ for (const i of this.cherryPickedProperties)
751
+ if (e?.includes(i.key))
752
+ return !0;
753
+ return !1;
754
+ }
755
+ async _getProxyValue(t, e = !0, i = this.cherryPickedProperties) {
757
756
  try {
758
- if (t) {
759
- let i = t;
760
- if (typeof t == "string" && (i = await window.sibStore.getData(t, wt)), typeof t != "string" && t.isFullResource && (t.isFullResource?.() || (i = await window.sibStore.getData(
761
- t["@id"],
762
- wt
763
- ))), typeof t != "string" && !t.isFullResource && (i.properties = Object.keys(i), i.get = (o) => i[o]), !i) return { _originalResource: i };
764
- if (typeof i == "object" && i !== null) {
765
- if (i["ldp:contains"]) {
766
- const o = this._normalizeLdpContains(i["ldp:contains"]);
767
- return await this._expandContainer(o, e);
768
- }
769
- return await this._getProperties(i, e, r);
770
- }
757
+ if (!t) return;
758
+ let r = t;
759
+ if (typeof t == "string" ? r = await window.sibStore.getData(t, wt) : t.isFullResource && !t.isFullResource?.() && (r = await window.sibStore.getData(t["@id"], wt)), !r) return { _originalResource: r };
760
+ if (typeof r != "object" || r === null) return;
761
+ if (r.isContainer?.() && r["ldp:contains"]) {
762
+ if (await this._hasCherryPickedProperties(r))
763
+ return await this._getProperties(r, e, i);
764
+ const o = this._normalizeLdpContains(await r["ldp:contains"]);
765
+ return await this._expandContainer(o, e, i);
771
766
  }
772
- return;
767
+ return await this._getProperties(r, e, i);
773
768
  } catch {
774
769
  }
775
770
  }
@@ -778,108 +773,133 @@ class $ extends lt {
778
773
  }
779
774
  gatekeeper() {
780
775
  if (!this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute) || !this.dataSrc)
781
- return c;
776
+ return d;
782
777
  }
783
778
  }
784
- v([
785
- p({ attribute: "default-data-src", reflect: !0 })
786
- ], $.prototype, "defaultDataSrc");
787
- v([
788
- p({ attribute: "data-src", reflect: !0 })
789
- ], $.prototype, "dataSrc");
790
- v([
791
- p({ attribute: "nested-field" })
792
- ], $.prototype, "nestedField");
793
- v([
794
- p({ attribute: "uniq" })
795
- ], $.prototype, "uniq");
796
- v([
797
- p({ attribute: "route" })
798
- ], $.prototype, "route");
799
- v([
800
- p({ attribute: !1 })
801
- ], $.prototype, "cherryPickedProperties");
802
- v([
803
- xt()
804
- ], $.prototype, "orbit");
805
- v([
806
- xt()
807
- ], $.prototype, "currentRoute");
808
- const ye = (s, { keywords: t = [], attributes: e = ["dataSrc"] } = {}) => {
809
- const r = () => {
810
- t && e && (s.caching === void 0 && (s.caching = 0), s.hasCachedDatas === void 0 && (s.hasCachedDatas = !1), s.cacheListener = (i) => {
811
- const o = i.detail.id || i.detail.resource["@id"];
812
- if (t.some((n) => o?.includes(n))) {
813
- for (const n of e)
814
- s[n] && o !== s[n] && window.sibStore.clearCache(s[n]);
815
- s.caching++, s.hasCachedDatas = !1, s.requestUpdate();
816
- }
817
- }, s._subscriptions.add(["save", s.cacheListener]), s._subscribe());
779
+ g([
780
+ ct()
781
+ ], _.prototype, "ready");
782
+ g([
783
+ f({ attribute: "default-data-src", reflect: !0 })
784
+ ], _.prototype, "defaultDataSrc");
785
+ g([
786
+ f({ attribute: "data-src", reflect: !0 })
787
+ ], _.prototype, "dataSrc");
788
+ g([
789
+ f({ attribute: "nested-field" })
790
+ ], _.prototype, "nestedField");
791
+ g([
792
+ f({ attribute: "uniq" })
793
+ ], _.prototype, "uniq");
794
+ g([
795
+ f({ attribute: "route" })
796
+ ], _.prototype, "route");
797
+ g([
798
+ f({ attribute: !1 })
799
+ ], _.prototype, "cherryPickedProperties");
800
+ g([
801
+ ct()
802
+ ], _.prototype, "orbit");
803
+ g([
804
+ ct()
805
+ ], _.prototype, "currentRoute");
806
+ const me = (s, { keywords: t = [], attributes: e = ["dataSrc"] } = {}) => {
807
+ const i = () => {
808
+ if (!t.length || !e.length) return;
809
+ s.caching === void 0 && (s.caching = 0), s.hasCachedDatas === void 0 && (s.hasCachedDatas = !1);
810
+ let r = !1;
811
+ const o = new Set(t);
812
+ s.cacheListener = (n) => {
813
+ const c = n.detail.id || n.detail.resource?.["@id"];
814
+ if (!c || !Array.from(o).some((u) => {
815
+ const h = c.indexOf(u);
816
+ return h !== -1 && (h === 0 || c[h - 1] === "/");
817
+ })) return;
818
+ let l = !1;
819
+ for (const u of e)
820
+ s[u] && c !== s[u] && (window.sibStore.clearCache(s[u]), l = !0);
821
+ l && (s.caching++, s.hasCachedDatas = !1, r || (r = !0, requestAnimationFrame(() => {
822
+ s.requestUpdate(), r = !1;
823
+ })));
824
+ }, s._subscriptions.add(["save", s.cacheListener]), s._subscribe();
818
825
  };
819
- document.readyState !== "complete" ? document.addEventListener("DOMContentLoaded", r) : r();
826
+ if (document.readyState !== "complete") {
827
+ const r = () => {
828
+ document.readyState === "complete" && (document.removeEventListener("readystatechange", r), i());
829
+ };
830
+ document.addEventListener("readystatechange", r);
831
+ } else
832
+ i();
820
833
  };
821
- function ve() {
822
- return Math.random().toString(16).slice(2);
834
+ function be() {
835
+ return `${Date.now()}-${Math.random().toString(16).slice(2)}`;
823
836
  }
824
- const be = ({
837
+ const we = ({
825
838
  component: s,
826
839
  defaultRoute: t = !1,
827
840
  ignoreRouter: e = !1
828
841
  }) => {
829
- if (s.uniq || (s.uniq = ve(), t && !s.route && !e && (s.route = t)), s._subscriptions = /* @__PURE__ */ new Set(), !e) {
842
+ if (s.uniq || (s.uniq = be(), t && !s.route && !e && (s.route = t)), s._subscriptions = /* @__PURE__ */ new Set(), !e) {
830
843
  s.route || (s.route = s.uniq, window.orbit && (s.route = window.orbit.getRoute(s.uniq))), s.noRouter = !0;
831
- let r = document.querySelector("solid-router");
832
- for (; r; )
833
- s.noRouter = !1, s.currentRoute = r.currentRouteName, s.currentResource = window.sibRouter.currentResource, r = document.querySelector(
834
- `[data-view="${r.currentRouteName}"] solid-router`
835
- );
844
+ let i = document.querySelector("solid-router");
845
+ const r = window.sibRouter.currentResource;
846
+ for (; i; ) {
847
+ s.noRouter = !1, s.currentRoute = i.currentRouteName, s.currentResource = r;
848
+ const o = `[data-view="${i.currentRouteName}"] solid-router`;
849
+ i = document.querySelector(o);
850
+ }
836
851
  s.navigationListener = () => {
837
- let i = document.querySelector("solid-router");
838
- for (; i; )
839
- s.noRouter = !1, s.currentRoute = i.currentRouteName, s.currentResource = window.sibRouter.currentResource, i = document.querySelector(
840
- `[data-view="${i.currentRouteName}"] solid-router`
841
- );
852
+ let o = document.querySelector("solid-router");
853
+ const n = window.sibRouter.currentResource;
854
+ for (; o; ) {
855
+ s.noRouter = !1, s.currentRoute = o.currentRouteName, s.currentResource = n;
856
+ const c = `[data-view="${o.currentRouteName}"] solid-router`;
857
+ o = document.querySelector(c);
858
+ }
842
859
  s.requestUpdate();
843
860
  }, s._subscriptions.add(["navigate", s.navigationListener]);
844
861
  }
845
862
  s._subscribe = () => {
846
863
  s._unsubscribe();
847
- for (const r of s._subscriptions)
848
- document.addEventListener(r[0], r[1]);
864
+ for (const i of s._subscriptions)
865
+ document.addEventListener(i[0], i[1]);
849
866
  }, s._unsubscribe = () => {
850
- for (const r of s._subscriptions)
851
- document.removeEventListener(r[0], r[1]);
867
+ for (const i of s._subscriptions)
868
+ document.removeEventListener(i[0], i[1]);
852
869
  }, s._subscribe();
853
- };
854
- class me extends S {
855
- constructor() {
856
- super(...arguments), this.object = {
857
- "@id": ""
858
- }, this.isType = (t, e = this.object) => {
859
- const r = e["@type"];
860
- return Array.isArray(r) ? r.includes(t) : typeof r == "string" ? r === t : !1;
861
- };
862
- }
863
- }
864
- const mt = (s, t) => {
870
+ }, b = (s, t) => {
865
871
  let e = s;
866
- for (let r = 0; r < t.length && (e && t[r] in e); r++)
867
- e = e[t[r]];
872
+ for (const i of t)
873
+ if (e && i in e)
874
+ e = e[i];
875
+ else
876
+ return;
868
877
  return e;
869
- }, we = (s, t, e = "asc") => s.sort((r, i) => {
870
- let o = r, n = i;
871
- Array.isArray(t) ? (o = mt(r, t), n = mt(i, t)) : (o = r[t], n = i[t]);
872
- let h = 0;
873
- if (typeof o == "number" && typeof n == "number")
874
- h = o - n;
875
- else if (typeof o == "string" && typeof n == "string")
876
- h = o.localeCompare(n);
877
- else if (o instanceof Date && n instanceof Date)
878
- h = o.getTime() - n.getTime();
879
- else
878
+ }, Ae = (s, t, e = "asc") => {
879
+ const i = Array.isArray(t) ? t : [t], r = e !== "asc", o = [...s], c = (() => {
880
+ const a = b(o[0], i);
881
+ if (typeof a == "number")
882
+ return (l, u) => {
883
+ const h = b(l, i), p = b(u, i);
884
+ return h == null ? p == null ? 0 : 1 : p == null ? -1 : h - p;
885
+ };
886
+ if (typeof a == "string")
887
+ return (l, u) => {
888
+ const h = b(l, i), p = b(u, i);
889
+ return h == null ? p == null ? 0 : 1 : p == null ? -1 : h.localeCompare(p);
890
+ };
891
+ if (a instanceof Date)
892
+ return (l, u) => {
893
+ const h = b(l, i), p = b(u, i);
894
+ return h == null ? p == null ? 0 : 1 : p == null ? -1 : h.getTime() - p.getTime();
895
+ };
880
896
  throw new TypeError(`Unsupported data type for key "${t}"`);
881
- return e === "asc" ? h : -h;
882
- }), Ae = (s, t = !1) => {
897
+ })();
898
+ return o.sort((a, l) => {
899
+ const u = c(a, l);
900
+ return r ? -u : u;
901
+ }), o;
902
+ }, Se = (s, t = !1) => {
883
903
  window.dispatchEvent(
884
904
  new CustomEvent("requestNavigation", {
885
905
  detail: {
@@ -889,43 +909,41 @@ const mt = (s, t) => {
889
909
  })
890
910
  );
891
911
  }, wt = {};
892
- var Ee = Object.getOwnPropertyDescriptor, Se = (s, t, e, r) => {
893
- for (var i = r > 1 ? void 0 : r ? Ee(t, e) : t, o = s.length - 1, n; o >= 0; o--)
894
- (n = s[o]) && (i = n(i) || i);
895
- return i;
912
+ var Ee = Object.getOwnPropertyDescriptor, Pe = (s, t, e, i) => {
913
+ for (var r = i > 1 ? void 0 : i ? Ee(t, e) : t, o = s.length - 1, n; o >= 0; o--)
914
+ (n = s[o]) && (r = n(r) || r);
915
+ return r;
896
916
  };
897
- let Q = class extends $ {
917
+ let G = class extends _ {
898
918
  constructor() {
899
- super(...arguments), this.cherryPickedProperties = [
900
- { key: "name", value: "name" }
901
- ], this._getResource = new pe(this, {
919
+ super(...arguments), this.cherryPickedProperties = [{ key: "name", value: "name" }], this._getResource = new te(this, {
902
920
  task: async ([s]) => {
903
921
  if (!(!s || !this.orbit || !this.noRouter && this.route && this.currentRoute && !this.route.startsWith(this.currentRoute))) {
904
922
  if (!this.hasCachedDatas || this.oldDataSrc !== s) {
905
923
  if (!s) return;
906
924
  this.datas = await this._getProxyValue(s), this.hasCachedDatas = !0;
907
925
  }
908
- return this.oldDataSrc !== s && (this.oldDataSrc = s), we(this.datas, "name", "asc");
926
+ return this.oldDataSrc !== s && (this.oldDataSrc = s), Ae(this.datas, "name", "asc");
909
927
  }
910
928
  },
911
929
  args: () => [this.dataSrc, this.caching, this.currentRoute]
912
930
  });
913
931
  }
914
932
  async _afterAttach() {
915
- return ye(this, {
933
+ return me(this, {
916
934
  keywords: ["some-keyword", "for-invalidating", "cache"]
917
935
  }), Promise.resolve();
918
936
  }
919
937
  render() {
920
938
  return this.gatekeeper() || this._getResource.render({
921
- pending: () => T`<solid-loader></solid-loader>`,
922
- complete: (s) => s ? T`<div>
939
+ pending: () => L`<solid-loader></solid-loader>`,
940
+ complete: (s) => s ? L`<div>
923
941
  <sample-objects .objects=${s}></sample-objects>
924
- </div>` : c
942
+ </div>` : d
925
943
  });
926
944
  }
927
945
  };
928
- Q.styles = rt`
946
+ G.styles = rt`
929
947
  div {
930
948
  background-color: red;
931
949
  position: absolute;
@@ -935,47 +953,27 @@ Q.styles = rt`
935
953
  bottom: 0;
936
954
  }
937
955
  `;
938
- Q = Se([
939
- ht("solid-boilerplate")
940
- ], Q);
941
- /**
942
- * @license
943
- * Copyright 2021 Google LLC
944
- * SPDX-License-Identifier: BSD-3-Clause
945
- */
946
- const Y = "lit-localize-status";
947
- /**
948
- * @license
949
- * Copyright 2021 Google LLC
950
- * SPDX-License-Identifier: BSD-3-Clause
951
- */
956
+ G = Pe([
957
+ at("solid-boilerplate")
958
+ ], G);
959
+ const Q = "lit-localize-status";
952
960
  const Ce = (s, ...t) => ({
953
961
  strTag: !0,
954
962
  strings: s,
955
963
  values: t
956
- }), Tt = Ce, Pe = (s) => typeof s != "string" && "strTag" in s, Lt = (s, t, e) => {
957
- let r = s[0];
958
- for (let i = 1; i < s.length; i++)
959
- r += t[e ? e[i - 1] : i - 1], r += s[i];
960
- return r;
964
+ }), Lt = Ce, Re = (s) => typeof s != "string" && "strTag" in s, Ut = (s, t, e) => {
965
+ let i = s[0];
966
+ for (let r = 1; r < s.length; r++)
967
+ i += t[e ? e[r - 1] : r - 1], i += s[r];
968
+ return i;
961
969
  };
962
- /**
963
- * @license
964
- * Copyright 2021 Google LLC
965
- * SPDX-License-Identifier: BSD-3-Clause
966
- */
967
- const Ut = ((s) => Pe(s) ? Lt(s.strings, s.values) : s);
968
- let ct = Ut, At = !1;
969
- function Re(s) {
970
+ const Mt = ((s) => Re(s) ? Ut(s.strings, s.values) : s);
971
+ let ht = Mt, At = !1;
972
+ function xe(s) {
970
973
  if (At)
971
974
  throw new Error("lit-localize can only be configured once");
972
- ct = s, At = !0;
975
+ ht = s, At = !0;
973
976
  }
974
- /**
975
- * @license
976
- * Copyright 2021 Google LLC
977
- * SPDX-License-Identifier: BSD-3-Clause
978
- */
979
977
  class Oe {
980
978
  constructor(t) {
981
979
  this.__litLocalizeEventHandler = (e) => {
@@ -983,24 +981,14 @@ class Oe {
983
981
  }, this.host = t;
984
982
  }
985
983
  hostConnected() {
986
- window.addEventListener(Y, this.__litLocalizeEventHandler);
984
+ window.addEventListener(Q, this.__litLocalizeEventHandler);
987
985
  }
988
986
  hostDisconnected() {
989
- window.removeEventListener(Y, this.__litLocalizeEventHandler);
987
+ window.removeEventListener(Q, this.__litLocalizeEventHandler);
990
988
  }
991
989
  }
992
- const je = (s) => s.addController(new Oe(s)), xe = je;
993
- /**
994
- * @license
995
- * Copyright 2021 Google LLC
996
- * SPDX-License-Identifier: BSD-3-Clause
997
- */
998
- const Mt = () => (s, t) => (s.addInitializer(xe), s);
999
- /**
1000
- * @license
1001
- * Copyright 2020 Google LLC
1002
- * SPDX-License-Identifier: BSD-3-Clause
1003
- */
990
+ const je = (s) => s.addController(new Oe(s)), Te = je;
991
+ const Nt = () => (s, t) => (s.addInitializer(Te), s);
1004
992
  class Ht {
1005
993
  constructor() {
1006
994
  this.settled = !1, this.promise = new Promise((t, e) => {
@@ -1014,170 +1002,150 @@ class Ht {
1014
1002
  this.settled = !0, this._reject(t);
1015
1003
  }
1016
1004
  }
1017
- /**
1018
- * @license
1019
- * Copyright 2014 Travis Webb
1020
- * SPDX-License-Identifier: MIT
1021
- */
1022
- const _ = [];
1005
+ const $ = [];
1023
1006
  for (let s = 0; s < 256; s++)
1024
- _[s] = (s >> 4 & 15).toString(16) + (s & 15).toString(16);
1025
- function Te(s) {
1026
- let t = 0, e = 8997, r = 0, i = 33826, o = 0, n = 40164, h = 0, a = 52210;
1027
- for (let u = 0; u < s.length; u++)
1028
- e ^= s.charCodeAt(u), t = e * 435, r = i * 435, o = n * 435, h = a * 435, o += e << 8, h += i << 8, r += t >>> 16, e = t & 65535, o += r >>> 16, i = r & 65535, a = h + (o >>> 16) & 65535, n = o & 65535;
1029
- return _[a >> 8] + _[a & 255] + _[n >> 8] + _[n & 255] + _[i >> 8] + _[i & 255] + _[e >> 8] + _[e & 255];
1007
+ $[s] = (s >> 4 & 15).toString(16) + (s & 15).toString(16);
1008
+ function Le(s) {
1009
+ let t = 0, e = 8997, i = 0, r = 33826, o = 0, n = 40164, c = 0, a = 52210;
1010
+ for (let l = 0; l < s.length; l++)
1011
+ e ^= s.charCodeAt(l), t = e * 435, i = r * 435, o = n * 435, c = a * 435, o += e << 8, c += r << 8, i += t >>> 16, e = t & 65535, o += i >>> 16, r = i & 65535, a = c + (o >>> 16) & 65535, n = o & 65535;
1012
+ return $[a >> 8] + $[a & 255] + $[n >> 8] + $[n & 255] + $[r >> 8] + $[r & 255] + $[e >> 8] + $[e & 255];
1030
1013
  }
1031
- /**
1032
- * @license
1033
- * Copyright 2020 Google LLC
1034
- * SPDX-License-Identifier: BSD-3-Clause
1035
- */
1036
- const Le = "", Ue = "h", Me = "s";
1014
+ const Ue = "", Me = "h", Ne = "s";
1037
1015
  function He(s, t) {
1038
- return (t ? Ue : Me) + Te(typeof s == "string" ? s : s.join(Le));
1016
+ return (t ? Me : Ne) + Le(typeof s == "string" ? s : s.join(Ue));
1039
1017
  }
1040
- /**
1041
- * @license
1042
- * Copyright 2021 Google LLC
1043
- * SPDX-License-Identifier: BSD-3-Clause
1044
- */
1045
- const Et = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new Map();
1046
- function Ne(s, t, e) {
1018
+ const St = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new Map();
1019
+ function De(s, t, e) {
1047
1020
  if (s) {
1048
- const r = e?.id ?? De(t), i = s[r];
1049
- if (i) {
1050
- if (typeof i == "string")
1051
- return i;
1052
- if ("strTag" in i)
1053
- return Lt(
1054
- i.strings,
1021
+ const i = e?.id ?? qe(t), r = s[i];
1022
+ if (r) {
1023
+ if (typeof r == "string")
1024
+ return r;
1025
+ if ("strTag" in r)
1026
+ return Ut(
1027
+ r.strings,
1055
1028
  // Cast `template` because its type wasn't automatically narrowed (but
1056
1029
  // we know it must be the same type as `localized`).
1057
1030
  t.values,
1058
- i.values
1031
+ r.values
1059
1032
  );
1060
1033
  {
1061
- let o = Et.get(i);
1062
- return o === void 0 && (o = i.values, Et.set(i, o)), {
1063
- ...i,
1034
+ let o = St.get(r);
1035
+ return o === void 0 && (o = r.values, St.set(r, o)), {
1036
+ ...r,
1064
1037
  values: o.map((n) => t.values[n])
1065
1038
  };
1066
1039
  }
1067
1040
  }
1068
1041
  }
1069
- return Ut(t);
1042
+ return Mt(t);
1070
1043
  }
1071
- function De(s) {
1044
+ function qe(s) {
1072
1045
  const t = typeof s == "string" ? s : s.strings;
1073
- let e = St.get(t);
1074
- return e === void 0 && (e = He(t, typeof s != "string" && !("strTag" in s)), St.set(t, e)), e;
1046
+ let e = Et.get(t);
1047
+ return e === void 0 && (e = He(t, typeof s != "string" && !("strTag" in s)), Et.set(t, e)), e;
1075
1048
  }
1076
- /**
1077
- * @license
1078
- * Copyright 2021 Google LLC
1079
- * SPDX-License-Identifier: BSD-3-Clause
1080
- */
1081
- function X(s) {
1082
- window.dispatchEvent(new CustomEvent(Y, { detail: s }));
1049
+ function J(s) {
1050
+ window.dispatchEvent(new CustomEvent(Q, { detail: s }));
1083
1051
  }
1084
- let I = "", J, Nt, k, tt, Dt, m = new Ht();
1085
- m.resolve();
1052
+ let z = "", X, Dt, I, Y, qt, w = new Ht();
1053
+ w.resolve();
1086
1054
  let H = 0;
1087
- const qe = (s) => (Re(((t, e) => Ne(Dt, t, e))), I = Nt = s.sourceLocale, k = new Set(s.targetLocales), k.add(s.sourceLocale), tt = s.loadLocale, { getLocale: Ie, setLocale: ke }), Ie = () => I, ke = (s) => {
1088
- if (s === (J ?? I))
1089
- return m.promise;
1090
- if (!k || !tt)
1055
+ const ke = (s) => (xe(((t, e) => De(qt, t, e))), z = Dt = s.sourceLocale, I = new Set(s.targetLocales), I.add(s.sourceLocale), Y = s.loadLocale, { getLocale: ze, setLocale: Ie }), ze = () => z, Ie = (s) => {
1056
+ if (s === (X ?? z))
1057
+ return w.promise;
1058
+ if (!I || !Y)
1091
1059
  throw new Error("Internal error");
1092
- if (!k.has(s))
1060
+ if (!I.has(s))
1093
1061
  throw new Error("Invalid locale code");
1094
1062
  H++;
1095
1063
  const t = H;
1096
- return J = s, m.settled && (m = new Ht()), X({ status: "loading", loadingLocale: s }), (s === Nt ? (
1064
+ return X = s, w.settled && (w = new Ht()), J({ status: "loading", loadingLocale: s }), (s === Dt ? (
1097
1065
  // We could switch to the source locale synchronously, but we prefer to
1098
1066
  // queue it on a microtask so that switching locales is consistently
1099
1067
  // asynchronous.
1100
1068
  Promise.resolve({ templates: void 0 })
1101
- ) : tt(s)).then((r) => {
1102
- H === t && (I = s, J = void 0, Dt = r.templates, X({ status: "ready", readyLocale: s }), m.resolve());
1103
- }, (r) => {
1104
- H === t && (X({
1069
+ ) : Y(s)).then((i) => {
1070
+ H === t && (z = s, X = void 0, qt = i.templates, J({ status: "ready", readyLocale: s }), w.resolve());
1071
+ }, (i) => {
1072
+ H === t && (J({
1105
1073
  status: "error",
1106
1074
  errorLocale: s,
1107
- errorMessage: r.toString()
1108
- }), m.reject(r));
1109
- }), m.promise;
1110
- }, qt = ":host{background-color:pink;user-select:none}";
1111
- var ze = Object.defineProperty, Ve = Object.getOwnPropertyDescriptor, It = (s, t, e, r) => {
1112
- for (var i = r > 1 ? void 0 : r ? Ve(t, e) : t, o = s.length - 1, n; o >= 0; o--)
1113
- (n = s[o]) && (i = (r ? n(t, e, i) : n(i)) || i);
1114
- return r && i && ze(t, e, i), i;
1075
+ errorMessage: i.toString()
1076
+ }), w.reject(i));
1077
+ }), w.promise;
1078
+ }, kt = ":host{background-color:pink;user-select:none}";
1079
+ var Ve = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, zt = (s, t, e, i) => {
1080
+ for (var r = i > 1 ? void 0 : i ? Be(t, e) : t, o = s.length - 1, n; o >= 0; o--)
1081
+ (n = s[o]) && (r = (i ? n(t, e, r) : n(r)) || r);
1082
+ return i && r && Ve(t, e, r), r;
1115
1083
  };
1116
- let z = class extends me {
1084
+ let V = class extends $e {
1117
1085
  constructor() {
1118
1086
  super(...arguments), this.object = { "@id": "" };
1119
1087
  }
1120
1088
  render() {
1121
- return this.isType("some:Type") ? c : T`<li>
1122
- ${ct(Tt`Sample object named: ${this.object.name}`)}
1089
+ return this.isType("some:Type") ? d : L`<li>
1090
+ ${ht(Lt`Sample object named: ${this.object.name}`)}
1123
1091
  </li>`;
1124
1092
  }
1125
1093
  };
1126
- z.styles = rt`
1127
- ${it(qt)}
1094
+ V.styles = rt`
1095
+ ${st(kt)}
1128
1096
  `;
1129
- It([
1130
- p({ attribute: !1, type: Object })
1131
- ], z.prototype, "object", 2);
1132
- z = It([
1133
- ht("sample-object"),
1134
- Mt()
1135
- ], z);
1136
- var Be = Object.defineProperty, We = Object.getOwnPropertyDescriptor, kt = (s, t, e, r) => {
1137
- for (var i = r > 1 ? void 0 : r ? We(t, e) : t, o = s.length - 1, n; o >= 0; o--)
1138
- (n = s[o]) && (i = (r ? n(t, e, i) : n(i)) || i);
1139
- return r && i && Be(t, e, i), i;
1097
+ zt([
1098
+ f({ attribute: !1, type: Object })
1099
+ ], V.prototype, "object", 2);
1100
+ V = zt([
1101
+ at("sample-object"),
1102
+ Nt()
1103
+ ], V);
1104
+ var We = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, It = (s, t, e, i) => {
1105
+ for (var r = i > 1 ? void 0 : i ? Fe(t, e) : t, o = s.length - 1, n; o >= 0; o--)
1106
+ (n = s[o]) && (r = (i ? n(t, e, r) : n(r)) || r);
1107
+ return i && r && We(t, e, r), r;
1140
1108
  };
1141
- let V = class extends lt {
1109
+ let B = class extends lt {
1142
1110
  constructor() {
1143
1111
  super(...arguments), this.objects = [];
1144
1112
  }
1145
1113
  render() {
1146
- return this.hasType("some:Type") ? c : T`${ct("Here are all of our objects:")}<br />
1114
+ return this.hasType("some:Type") ? d : L`${ht("Here are all of our objects:")}<br />
1147
1115
  <ul>
1148
1116
  ${this.objects.map(
1149
- (s) => T`<sample-object .object=${s}></sample-object>`
1117
+ (s) => L`<sample-object .object=${s}></sample-object>`
1150
1118
  )}
1151
1119
  </ul>`;
1152
1120
  }
1153
1121
  };
1154
- V.styles = rt`
1155
- ${it(qt)}
1122
+ B.styles = rt`
1123
+ ${st(kt)}
1156
1124
  `;
1157
- kt([
1158
- p({ attribute: !1, type: Object })
1159
- ], V.prototype, "objects", 2);
1160
- V = kt([
1161
- ht("sample-objects"),
1162
- Mt()
1163
- ], V);
1164
- const Fe = {
1165
- s9cb0b52fd65ea225: Tt`Sample object named: ${0}`,
1125
+ It([
1126
+ f({ attribute: !1, type: Object })
1127
+ ], B.prototype, "objects", 2);
1128
+ B = It([
1129
+ at("sample-objects"),
1130
+ Nt()
1131
+ ], B);
1132
+ const Ke = {
1133
+ s9cb0b52fd65ea225: Lt`Sample object named: ${0}`,
1166
1134
  se975788b1544119d: "Here are all of our objects:"
1167
- }, Ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1135
+ }, Ze = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1168
1136
  __proto__: null,
1169
- templates: Fe
1170
- }, Symbol.toStringTag, { value: "Module" })), Xe = "en", zt = [
1137
+ templates: Ke
1138
+ }, Symbol.toStringTag, { value: "Module" })), Je = "en", Vt = [
1171
1139
  "en"
1172
- ], Je = /* @__PURE__ */ Object.assign({ "../../generated/locales/en.ts": Ke }), Ze = new Map(
1173
- zt.map((s) => [
1140
+ ], Xe = /* @__PURE__ */ Object.assign({ "../../generated/locales/en.ts": Ze }), Ge = new Map(
1141
+ Vt.map((s) => [
1174
1142
  s,
1175
- Je[`../../generated/locales/${s}.ts`]
1143
+ Xe[`../../generated/locales/${s}.ts`]
1176
1144
  ])
1177
- ), { getLocale: Z, setLocale: G } = qe({
1178
- sourceLocale: Xe,
1179
- targetLocales: zt,
1180
- loadLocale: async (s) => Ze.get(s)
1145
+ ), { getLocale: Pt, setLocale: Ct } = ke({
1146
+ sourceLocale: Je,
1147
+ targetLocales: Vt,
1148
+ loadLocale: async (s) => Ge.get(s)
1181
1149
  });
1182
- window.getLocale = window.orbit ? window.getLocale ? window.getLocale.push(Z) : [Z] : Z;
1183
- window.setLocale = window.orbit ? window.setLocale ? window.setLocale.push(G) : [G] : G;
1150
+ window.getLocale = window.getLocale ? window.getLocale.push(Pt) : [Pt];
1151
+ window.setLocale = window.setLocale ? window.setLocale.push(Ct) : [Ct];