@eox/itemfilter 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,7 +31,7 @@ const fe = (i) => new de(typeof i == "string" ? i : i + "", void 0, Jt), pe = (i
31
31
  const s = document.createElement("style"), r = et.litNonce;
32
32
  r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
33
33
  });
34
- }, Nt = wt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
34
+ }, Ot = wt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
35
35
  let e = "";
36
36
  for (const s of t.cssRules)
37
37
  e += s.cssText;
@@ -43,7 +43,7 @@ const fe = (i) => new de(typeof i == "string" ? i : i + "", void 0, Jt), pe = (i
43
43
  * SPDX-License-Identifier: BSD-3-Clause
44
44
  */
45
45
  var ht;
46
- const st = window, Ot = st.trustedTypes, ge = Ot ? Ot.emptyScript : "", kt = st.reactiveElementPolyfillSupport, _t = { toAttribute(i, t) {
46
+ const st = window, kt = st.trustedTypes, ge = kt ? kt.emptyScript : "", Nt = st.reactiveElementPolyfillSupport, mt = { toAttribute(i, t) {
47
47
  switch (t) {
48
48
  case Boolean:
49
49
  i = i ? ge : null;
@@ -71,7 +71,7 @@ const st = window, Ot = st.trustedTypes, ge = Ot ? Ot.emptyScript : "", kt = st.
71
71
  }
72
72
  }
73
73
  return e;
74
- } }, Qt = (i, t) => t !== i && (t == t || i == i), at = { attribute: !0, type: String, converter: _t, reflect: !1, hasChanged: Qt };
74
+ } }, Qt = (i, t) => t !== i && (t == t || i == i), at = { attribute: !0, type: String, converter: mt, reflect: !1, hasChanged: Qt };
75
75
  let z = class extends HTMLElement {
76
76
  constructor() {
77
77
  super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
@@ -122,9 +122,9 @@ let z = class extends HTMLElement {
122
122
  if (Array.isArray(t)) {
123
123
  const s = new Set(t.flat(1 / 0).reverse());
124
124
  for (const r of s)
125
- e.unshift(Nt(r));
125
+ e.unshift(Ot(r));
126
126
  } else
127
- t !== void 0 && e.push(Nt(t));
127
+ t !== void 0 && e.push(Ot(t));
128
128
  return e;
129
129
  }
130
130
  static _$Ep(t, e) {
@@ -176,7 +176,7 @@ let z = class extends HTMLElement {
176
176
  var r;
177
177
  const n = this.constructor._$Ep(t, s);
178
178
  if (n !== void 0 && s.reflect === !0) {
179
- const o = (((r = s.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? s.converter : _t).toAttribute(e, s.type);
179
+ const o = (((r = s.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? s.converter : mt).toAttribute(e, s.type);
180
180
  this._$El = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$El = null;
181
181
  }
182
182
  }
@@ -184,7 +184,7 @@ let z = class extends HTMLElement {
184
184
  var s;
185
185
  const r = this.constructor, n = r._$Ev.get(t);
186
186
  if (n !== void 0 && this._$El !== n) {
187
- const o = r.getPropertyOptions(n), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? o.converter : _t;
187
+ const o = r.getPropertyOptions(n), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? o.converter : mt;
188
188
  this._$El = n, this[n] = c.fromAttribute(e, o.type), this._$El = null;
189
189
  }
190
190
  }
@@ -251,25 +251,25 @@ let z = class extends HTMLElement {
251
251
  firstUpdated(t) {
252
252
  }
253
253
  };
254
- z.finalized = !0, z.elementProperties = /* @__PURE__ */ new Map(), z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, kt == null || kt({ ReactiveElement: z }), ((ht = st.reactiveElementVersions) !== null && ht !== void 0 ? ht : st.reactiveElementVersions = []).push("1.6.1");
254
+ z.finalized = !0, z.elementProperties = /* @__PURE__ */ new Map(), z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, Nt == null || Nt({ ReactiveElement: z }), ((ht = st.reactiveElementVersions) !== null && ht !== void 0 ? ht : st.reactiveElementVersions = []).push("1.6.1");
255
255
  /**
256
256
  * @license
257
257
  * Copyright 2017 Google LLC
258
258
  * SPDX-License-Identifier: BSD-3-Clause
259
259
  */
260
260
  var ut;
261
- const it = window, D = it.trustedTypes, Pt = D ? D.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, $t = "$lit$", M = `lit$${(Math.random() + "").slice(9)}$`, Xt = "?" + M, me = `<${Xt}>`, T = document, G = () => T.createComment(""), J = (i) => i === null || typeof i != "object" && typeof i != "function", Zt = Array.isArray, _e = (i) => Zt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", dt = `[
262
- \f\r]`, K = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tt = /-->/g, Ut = />/g, N = RegExp(`>|${dt}(?:([^\\s"'>=/]+)(${dt}*=${dt}*(?:[^
263
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Ht = /'/g, jt = /"/g, qt = /^(?:script|style|textarea|title)$/i, $e = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), O = $e(1), U = Symbol.for("lit-noChange"), m = Symbol.for("lit-nothing"), Ft = /* @__PURE__ */ new WeakMap(), P = T.createTreeWalker(T, 129, null, !1), ve = (i, t) => {
261
+ const it = window, D = it.trustedTypes, Pt = D ? D.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, $t = "$lit$", M = `lit$${(Math.random() + "").slice(9)}$`, Xt = "?" + M, _e = `<${Xt}>`, T = document, G = () => T.createComment(""), J = (i) => i === null || typeof i != "object" && typeof i != "function", Zt = Array.isArray, me = (i) => Zt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", dt = `[
262
+ \f\r]`, K = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tt = /-->/g, Ut = />/g, O = RegExp(`>|${dt}(?:([^\\s"'>=/]+)(${dt}*=${dt}*(?:[^
263
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Ht = /'/g, jt = /"/g, qt = /^(?:script|style|textarea|title)$/i, $e = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), k = $e(1), U = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), Ft = /* @__PURE__ */ new WeakMap(), P = T.createTreeWalker(T, 129, null, !1), ve = (i, t) => {
264
264
  const e = i.length - 1, s = [];
265
265
  let r, n = t === 2 ? "<svg>" : "", o = K;
266
266
  for (let l = 0; l < e; l++) {
267
267
  const h = i[l];
268
268
  let a, u, d = -1, p = 0;
269
269
  for (; p < h.length && (o.lastIndex = p, u = o.exec(h), u !== null); )
270
- p = o.lastIndex, o === K ? u[1] === "!--" ? o = Tt : u[1] !== void 0 ? o = Ut : u[2] !== void 0 ? (qt.test(u[2]) && (r = RegExp("</" + u[2], "g")), o = N) : u[3] !== void 0 && (o = N) : o === N ? u[0] === ">" ? (o = r ?? K, d = -1) : u[1] === void 0 ? d = -2 : (d = o.lastIndex - u[2].length, a = u[1], o = u[3] === void 0 ? N : u[3] === '"' ? jt : Ht) : o === jt || o === Ht ? o = N : o === Tt || o === Ut ? o = K : (o = N, r = void 0);
271
- const g = o === N && i[l + 1].startsWith("/>") ? " " : "";
272
- n += o === K ? h + me : d >= 0 ? (s.push(a), h.slice(0, d) + $t + h.slice(d) + M + g) : h + M + (d === -2 ? (s.push(void 0), l) : g);
270
+ p = o.lastIndex, o === K ? u[1] === "!--" ? o = Tt : u[1] !== void 0 ? o = Ut : u[2] !== void 0 ? (qt.test(u[2]) && (r = RegExp("</" + u[2], "g")), o = O) : u[3] !== void 0 && (o = O) : o === O ? u[0] === ">" ? (o = r ?? K, d = -1) : u[1] === void 0 ? d = -2 : (d = o.lastIndex - u[2].length, a = u[1], o = u[3] === void 0 ? O : u[3] === '"' ? jt : Ht) : o === jt || o === Ht ? o = O : o === Tt || o === Ut ? o = K : (o = O, r = void 0);
271
+ const g = o === O && i[l + 1].startsWith("/>") ? " " : "";
272
+ n += o === K ? h + _e : d >= 0 ? (s.push(a), h.slice(0, d) + $t + h.slice(d) + M + g) : h + M + (d === -2 ? (s.push(void 0), l) : g);
273
273
  }
274
274
  const c = n + (i[e] || "<?>") + (t === 2 ? "</svg>" : "");
275
275
  if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
@@ -294,8 +294,8 @@ class Q {
294
294
  if (d.endsWith($t) || d.startsWith(M)) {
295
295
  const p = a[o++];
296
296
  if (u.push(d), p !== void 0) {
297
- const g = r.getAttribute(p.toLowerCase() + $t).split(M), _ = /([.?@])?(.*)/.exec(p);
298
- l.push({ type: 1, index: n, name: _[2], strings: g, ctor: _[1] === "." ? Ae : _[1] === "?" ? xe : _[1] === "@" ? Se : nt });
297
+ const g = r.getAttribute(p.toLowerCase() + $t).split(M), m = /([.?@])?(.*)/.exec(p);
298
+ l.push({ type: 1, index: n, name: m[2], strings: g, ctor: m[1] === "." ? Ae : m[1] === "?" ? xe : m[1] === "@" ? Se : nt });
299
299
  } else
300
300
  l.push({ type: 6, index: n });
301
301
  }
@@ -368,7 +368,7 @@ class ye {
368
368
  class X {
369
369
  constructor(t, e, s, r) {
370
370
  var n;
371
- this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = r, this._$Cp = (n = r == null ? void 0 : r.isConnected) === null || n === void 0 || n;
371
+ this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = r, this._$Cp = (n = r == null ? void 0 : r.isConnected) === null || n === void 0 || n;
372
372
  }
373
373
  get _$AU() {
374
374
  var t, e;
@@ -386,7 +386,7 @@ class X {
386
386
  return this._$AB;
387
387
  }
388
388
  _$AI(t, e = this) {
389
- t = B(this, t, e), J(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : _e(t) ? this.T(t) : this._(t);
389
+ t = B(this, t, e), J(t) ? t === _ || t == null || t === "" ? (this._$AH !== _ && this._$AR(), this._$AH = _) : t !== this._$AH && t !== U && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : me(t) ? this.T(t) : this._(t);
390
390
  }
391
391
  k(t) {
392
392
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -395,7 +395,7 @@ class X {
395
395
  this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
396
396
  }
397
397
  _(t) {
398
- this._$AH !== m && J(this._$AH) ? this._$AA.nextSibling.data = t : this.$(T.createTextNode(t)), this._$AH = t;
398
+ this._$AH !== _ && J(this._$AH) ? this._$AA.nextSibling.data = t : this.$(T.createTextNode(t)), this._$AH = t;
399
399
  }
400
400
  g(t) {
401
401
  var e;
@@ -433,7 +433,7 @@ class X {
433
433
  }
434
434
  class nt {
435
435
  constructor(t, e, s, r, n) {
436
- this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = m;
436
+ this.type = 1, this._$AH = _, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = _;
437
437
  }
438
438
  get tagName() {
439
439
  return this.element.tagName;
@@ -450,12 +450,12 @@ class nt {
450
450
  const c = t;
451
451
  let l, h;
452
452
  for (t = n[0], l = 0; l < n.length - 1; l++)
453
- h = B(this, c[s + l], e, l), h === U && (h = this._$AH[l]), o || (o = !J(h) || h !== this._$AH[l]), h === m ? t = m : t !== m && (t += (h ?? "") + n[l + 1]), this._$AH[l] = h;
453
+ h = B(this, c[s + l], e, l), h === U && (h = this._$AH[l]), o || (o = !J(h) || h !== this._$AH[l]), h === _ ? t = _ : t !== _ && (t += (h ?? "") + n[l + 1]), this._$AH[l] = h;
454
454
  }
455
455
  o && !r && this.j(t);
456
456
  }
457
457
  j(t) {
458
- t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
458
+ t === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
459
  }
460
460
  }
461
461
  class Ae extends nt {
@@ -463,7 +463,7 @@ class Ae extends nt {
463
463
  super(...arguments), this.type = 3;
464
464
  }
465
465
  j(t) {
466
- this.element[this.name] = t === m ? void 0 : t;
466
+ this.element[this.name] = t === _ ? void 0 : t;
467
467
  }
468
468
  }
469
469
  const Ee = D ? D.emptyScript : "";
@@ -472,7 +472,7 @@ class xe extends nt {
472
472
  super(...arguments), this.type = 4;
473
473
  }
474
474
  j(t) {
475
- t && t !== m ? this.element.setAttribute(this.name, Ee) : this.element.removeAttribute(this.name);
475
+ t && t !== _ ? this.element.setAttribute(this.name, Ee) : this.element.removeAttribute(this.name);
476
476
  }
477
477
  }
478
478
  class Se extends nt {
@@ -481,9 +481,9 @@ class Se extends nt {
481
481
  }
482
482
  _$AI(t, e = this) {
483
483
  var s;
484
- if ((t = (s = B(this, t, e, 0)) !== null && s !== void 0 ? s : m) === U)
484
+ if ((t = (s = B(this, t, e, 0)) !== null && s !== void 0 ? s : _) === U)
485
485
  return;
486
- const r = this._$AH, n = t === m && r !== m || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, o = t !== m && (r === m || n);
486
+ const r = this._$AH, n = t === _ && r !== _ || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, o = t !== _ && (r === _ || n);
487
487
  n && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
488
488
  }
489
489
  handleEvent(t) {
@@ -565,7 +565,7 @@ const Me = (i) => (t) => typeof t == "function" ? ((e, s) => (customElements.def
565
565
  * Copyright 2017 Google LLC
566
566
  * SPDX-License-Identifier: BSD-3-Clause
567
567
  */
568
- const Ce = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
568
+ const Re = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
569
569
  e.createProperty(t.key, i);
570
570
  } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
571
571
  typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
@@ -575,7 +575,7 @@ const Ce = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descr
575
575
  function Mt(i) {
576
576
  return (t, e) => e !== void 0 ? ((s, r, n) => {
577
577
  r.constructor.createProperty(n, s);
578
- })(i, t, e) : Ce(i, t);
578
+ })(i, t, e) : Re(i, t);
579
579
  }
580
580
  /**
581
581
  * @license
@@ -609,7 +609,7 @@ function* V(i, t) {
609
609
  * Copyright 2017 Google LLC
610
610
  * SPDX-License-Identifier: BSD-3-Clause
611
611
  */
612
- const Re = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Ie = (i) => (...t) => ({ _$litDirective$: i, values: t });
612
+ const Ce = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Ie = (i) => (...t) => ({ _$litDirective$: i, values: t });
613
613
  class Le {
614
614
  constructor(t) {
615
615
  }
@@ -633,11 +633,11 @@ class Le {
633
633
  */
634
634
  class vt extends Le {
635
635
  constructor(t) {
636
- if (super(t), this.et = m, t.type !== Re.CHILD)
636
+ if (super(t), this.et = _, t.type !== Ce.CHILD)
637
637
  throw Error(this.constructor.directiveName + "() can only be used in child bindings");
638
638
  }
639
639
  render(t) {
640
- if (t === m || t == null)
640
+ if (t === _ || t == null)
641
641
  return this.ft = void 0, this.et = t;
642
642
  if (t === U)
643
643
  return t;
@@ -655,15 +655,15 @@ const Bt = Ie(vt);
655
655
  function S(i) {
656
656
  return Array.isArray ? Array.isArray(i) : se(i) === "[object Array]";
657
657
  }
658
- const Ne = 1 / 0;
659
- function Oe(i) {
658
+ const Oe = 1 / 0;
659
+ function ke(i) {
660
660
  if (typeof i == "string")
661
661
  return i;
662
662
  let t = i + "";
663
- return t == "0" && 1 / i == -Ne ? "-0" : t;
663
+ return t == "0" && 1 / i == -Oe ? "-0" : t;
664
664
  }
665
- function ke(i) {
666
- return i == null ? "" : Oe(i);
665
+ function Ne(i) {
666
+ return i == null ? "" : ke(i);
667
667
  }
668
668
  function A(i) {
669
669
  return typeof i == "string";
@@ -683,7 +683,7 @@ function Te(i) {
683
683
  function $(i) {
684
684
  return i != null;
685
685
  }
686
- function mt(i) {
686
+ function _t(i) {
687
687
  return !i.trim().length;
688
688
  }
689
689
  function se(i) {
@@ -743,7 +743,7 @@ function Be(i, t) {
743
743
  if (!$(h))
744
744
  return;
745
745
  if (c === o.length - 1 && (A(h) || te(h) || Pe(h)))
746
- e.push(ke(h));
746
+ e.push(Ne(h));
747
747
  else if (S(h)) {
748
748
  s = !0;
749
749
  for (let a = 0, u = h.length; a < u; a += 1)
@@ -827,7 +827,7 @@ function Je(i = 1, t = 3) {
827
827
  }
828
828
  };
829
829
  }
830
- class Ct {
830
+ class Rt {
831
831
  constructor({
832
832
  getFn: t = f.getFn,
833
833
  fieldNormWeight: e = f.fieldNormWeight
@@ -870,7 +870,7 @@ class Ct {
870
870
  return this.records.length;
871
871
  }
872
872
  _addString(t, e) {
873
- if (!$(t) || mt(t))
873
+ if (!$(t) || _t(t))
874
874
  return;
875
875
  let s = {
876
876
  v: t,
@@ -890,7 +890,7 @@ class Ct {
890
890
  for (; l.length; ) {
891
891
  const { nestedArrIndex: h, value: a } = l.pop();
892
892
  if ($(a))
893
- if (A(a) && !mt(a)) {
893
+ if (A(a) && !_t(a)) {
894
894
  let u = {
895
895
  v: a,
896
896
  i: h,
@@ -906,7 +906,7 @@ class Ct {
906
906
  });
907
907
  }
908
908
  s.$[n] = c;
909
- } else if (A(o) && !mt(o)) {
909
+ } else if (A(o) && !_t(o)) {
910
910
  let c = {
911
911
  v: o,
912
912
  n: this.norm.get(o)
@@ -924,11 +924,11 @@ class Ct {
924
924
  }
925
925
  }
926
926
  function re(i, t, { getFn: e = f.getFn, fieldNormWeight: s = f.fieldNormWeight } = {}) {
927
- const r = new Ct({ getFn: e, fieldNormWeight: s });
927
+ const r = new Rt({ getFn: e, fieldNormWeight: s });
928
928
  return r.setKeys(i.map(ie)), r.setSources(t), r.create(), r;
929
929
  }
930
930
  function Qe(i, { getFn: t = f.getFn, fieldNormWeight: e = f.fieldNormWeight } = {}) {
931
- const { keys: s, records: r } = i, n = new Ct({ getFn: t, fieldNormWeight: e });
931
+ const { keys: s, records: r } = i, n = new Rt({ getFn: t, fieldNormWeight: e });
932
932
  return n.setKeys(s), n.setIndexRecords(r), n;
933
933
  }
934
934
  function tt(i, {
@@ -952,7 +952,7 @@ function Xe(i = [], t = f.minMatchCharLength) {
952
952
  }
953
953
  return i[n - 1] && n - s >= t && e.push([s, n - 1]), e;
954
954
  }
955
- const k = 32;
955
+ const N = 32;
956
956
  function Ze(i, t, e, {
957
957
  location: s = f.location,
958
958
  distance: r = f.distance,
@@ -962,11 +962,11 @@ function Ze(i, t, e, {
962
962
  includeMatches: l = f.includeMatches,
963
963
  ignoreLocation: h = f.ignoreLocation
964
964
  } = {}) {
965
- if (t.length > k)
966
- throw new Error(je(k));
965
+ if (t.length > N)
966
+ throw new Error(je(N));
967
967
  const a = t.length, u = i.length, d = Math.max(0, Math.min(s, u));
968
968
  let p = n, g = d;
969
- const _ = c > 1 || l, I = _ ? Array(u) : [];
969
+ const m = c > 1 || l, I = m ? Array(u) : [];
970
970
  let E;
971
971
  for (; (E = i.indexOf(t, g)) > -1; ) {
972
972
  let v = tt(t, {
@@ -975,7 +975,7 @@ function Ze(i, t, e, {
975
975
  distance: r,
976
976
  ignoreLocation: h
977
977
  });
978
- if (p = Math.min(v, p), g = E + a, _) {
978
+ if (p = Math.min(v, p), g = E + a, m) {
979
979
  let b = 0;
980
980
  for (; b < a; )
981
981
  I[E + b] = 1, b += 1;
@@ -995,11 +995,11 @@ function Ze(i, t, e, {
995
995
  ignoreLocation: h
996
996
  }) <= p ? b = w : Z = w, w = Math.floor((Z - b) / 2 + b);
997
997
  Z = w;
998
- let Rt = Math.max(1, d - w + 1), ct = o ? u : Math.min(d + w, u) + a, F = Array(ct + 2);
998
+ let Ct = Math.max(1, d - w + 1), ct = o ? u : Math.min(d + w, u) + a, F = Array(ct + 2);
999
999
  F[ct + 1] = (1 << v) - 1;
1000
- for (let y = ct; y >= Rt; y -= 1) {
1000
+ for (let y = ct; y >= Ct; y -= 1) {
1001
1001
  let q = y - 1, It = e[i.charAt(q)];
1002
- if (_ && (I[q] = +!!It), F[y] = (F[y + 1] << 1 | 1) & It, v && (F[y] |= (j[y + 1] | j[y]) << 1 | 1 | j[y + 1]), F[y] & he && (L = tt(t, {
1002
+ if (m && (I[q] = +!!It), F[y] = (F[y + 1] << 1 | 1) & It, v && (F[y] |= (j[y + 1] | j[y]) << 1 | 1 | j[y + 1]), F[y] & he && (L = tt(t, {
1003
1003
  errors: v,
1004
1004
  currentLocation: q,
1005
1005
  expectedLocation: d,
@@ -1008,7 +1008,7 @@ function Ze(i, t, e, {
1008
1008
  }), L <= p)) {
1009
1009
  if (p = L, g = q, g <= d)
1010
1010
  break;
1011
- Rt = Math.max(1, 2 * d - g);
1011
+ Ct = Math.max(1, 2 * d - g);
1012
1012
  }
1013
1013
  }
1014
1014
  if (tt(t, {
@@ -1026,7 +1026,7 @@ function Ze(i, t, e, {
1026
1026
  // Count exact matches (those with a score of 0) to be "almost" exact
1027
1027
  score: Math.max(1e-3, L)
1028
1028
  };
1029
- if (_) {
1029
+ if (m) {
1030
1030
  const v = Xe(I, c);
1031
1031
  v.length ? l && (lt.indices = v) : lt.isMatch = !1;
1032
1032
  }
@@ -1069,14 +1069,14 @@ class ne {
1069
1069
  startIndex: p
1070
1070
  });
1071
1071
  }, u = this.pattern.length;
1072
- if (u > k) {
1072
+ if (u > N) {
1073
1073
  let d = 0;
1074
- const p = u % k, g = u - p;
1074
+ const p = u % N, g = u - p;
1075
1075
  for (; d < g; )
1076
- a(this.pattern.substr(d, k), d), d += k;
1076
+ a(this.pattern.substr(d, N), d), d += N;
1077
1077
  if (p) {
1078
- const _ = u - k;
1079
- a(this.pattern.substr(_), _);
1078
+ const m = u - N;
1079
+ a(this.pattern.substr(m), m);
1080
1080
  }
1081
1081
  } else
1082
1082
  a(this.pattern, 0);
@@ -1099,8 +1099,8 @@ class ne {
1099
1099
  ignoreLocation: h
1100
1100
  } = this.options;
1101
1101
  let a = [], u = 0, d = !1;
1102
- this.chunks.forEach(({ pattern: g, alphabet: _, startIndex: I }) => {
1103
- const { isMatch: E, score: j, indices: L } = Ze(t, g, _, {
1102
+ this.chunks.forEach(({ pattern: g, alphabet: m, startIndex: I }) => {
1103
+ const { isMatch: E, score: j, indices: L } = Ze(t, g, m, {
1104
1104
  location: r + I,
1105
1105
  distance: n,
1106
1106
  threshold: o,
@@ -1118,7 +1118,7 @@ class ne {
1118
1118
  return d && s && (p.indices = a), p;
1119
1119
  }
1120
1120
  }
1121
- class R {
1121
+ class C {
1122
1122
  constructor(t) {
1123
1123
  this.pattern = t;
1124
1124
  }
@@ -1135,7 +1135,7 @@ function Vt(i, t) {
1135
1135
  const e = i.match(t);
1136
1136
  return e ? e[1] : null;
1137
1137
  }
1138
- class ts extends R {
1138
+ class ts extends C {
1139
1139
  constructor(t) {
1140
1140
  super(t);
1141
1141
  }
@@ -1157,7 +1157,7 @@ class ts extends R {
1157
1157
  };
1158
1158
  }
1159
1159
  }
1160
- class es extends R {
1160
+ class es extends C {
1161
1161
  constructor(t) {
1162
1162
  super(t);
1163
1163
  }
@@ -1179,7 +1179,7 @@ class es extends R {
1179
1179
  };
1180
1180
  }
1181
1181
  }
1182
- class ss extends R {
1182
+ class ss extends C {
1183
1183
  constructor(t) {
1184
1184
  super(t);
1185
1185
  }
@@ -1201,7 +1201,7 @@ class ss extends R {
1201
1201
  };
1202
1202
  }
1203
1203
  }
1204
- class is extends R {
1204
+ class is extends C {
1205
1205
  constructor(t) {
1206
1206
  super(t);
1207
1207
  }
@@ -1223,7 +1223,7 @@ class is extends R {
1223
1223
  };
1224
1224
  }
1225
1225
  }
1226
- class rs extends R {
1226
+ class rs extends C {
1227
1227
  constructor(t) {
1228
1228
  super(t);
1229
1229
  }
@@ -1245,7 +1245,7 @@ class rs extends R {
1245
1245
  };
1246
1246
  }
1247
1247
  }
1248
- class ns extends R {
1248
+ class ns extends C {
1249
1249
  constructor(t) {
1250
1250
  super(t);
1251
1251
  }
@@ -1267,7 +1267,7 @@ class ns extends R {
1267
1267
  };
1268
1268
  }
1269
1269
  }
1270
- class oe extends R {
1270
+ class oe extends C {
1271
1271
  constructor(t, {
1272
1272
  location: e = f.location,
1273
1273
  threshold: s = f.threshold,
@@ -1302,7 +1302,7 @@ class oe extends R {
1302
1302
  return this._bitapSearch.searchIn(t);
1303
1303
  }
1304
1304
  }
1305
- class le extends R {
1305
+ class le extends C {
1306
1306
  constructor(t) {
1307
1307
  super(t);
1308
1308
  }
@@ -1402,11 +1402,11 @@ class as {
1402
1402
  const a = e[l];
1403
1403
  o.length = 0, n = 0;
1404
1404
  for (let u = 0, d = a.length; u < d; u += 1) {
1405
- const p = a[u], { isMatch: g, indices: _, score: I } = p.search(t);
1405
+ const p = a[u], { isMatch: g, indices: m, score: I } = p.search(t);
1406
1406
  if (g) {
1407
1407
  if (n += 1, c += I, s) {
1408
1408
  const E = p.constructor.type;
1409
- hs.has(E) ? o = [...o, ..._] : o.push(_);
1409
+ hs.has(E) ? o = [...o, ...m] : o.push(m);
1410
1410
  }
1411
1411
  } else {
1412
1412
  c = 0, n = 0, o.length = 0;
@@ -1504,15 +1504,15 @@ function gs(i, t) {
1504
1504
  s.key && (o.key = s.key.src), s.idx > -1 && (o.refIndex = s.idx), t.matches.push(o);
1505
1505
  });
1506
1506
  }
1507
- function ms(i, t) {
1507
+ function _s(i, t) {
1508
1508
  t.score = i.score;
1509
1509
  }
1510
- function _s(i, t, {
1510
+ function ms(i, t, {
1511
1511
  includeMatches: e = f.includeMatches,
1512
1512
  includeScore: s = f.includeScore
1513
1513
  } = {}) {
1514
1514
  const r = [];
1515
- return e && r.push(gs), s && r.push(ms), i.map((n) => {
1515
+ return e && r.push(gs), s && r.push(_s), i.map((n) => {
1516
1516
  const { idx: o } = n, c = {
1517
1517
  item: t[o],
1518
1518
  refIndex: o
@@ -1527,7 +1527,7 @@ class W {
1527
1527
  this.options = { ...f, ...e }, this.options.useExtendedSearch, this._keyStore = new De(this.options.keys), this.setCollection(t, s);
1528
1528
  }
1529
1529
  setCollection(t, e) {
1530
- if (this._docs = t, e && !(e instanceof Ct))
1530
+ if (this._docs = t, e && !(e instanceof Rt))
1531
1531
  throw new Error(Ue);
1532
1532
  this._myIndex = e || re(this.options.keys, this._docs, {
1533
1533
  getFn: this.options.getFn,
@@ -1560,7 +1560,7 @@ class W {
1560
1560
  ignoreFieldNorm: c
1561
1561
  } = this.options;
1562
1562
  let l = A(t) ? A(this._docs[0]) ? this._searchStringList(t) : this._searchObjectList(t) : this._searchLogical(t);
1563
- return ps(l, { ignoreFieldNorm: c }), n && l.sort(o), te(e) && e > -1 && (l = l.slice(0, e)), _s(l, this._docs, {
1563
+ return ps(l, { ignoreFieldNorm: c }), n && l.sort(o), te(e) && e > -1 && (l = l.slice(0, e)), ms(l, this._docs, {
1564
1564
  includeMatches: s,
1565
1565
  includeScore: r
1566
1566
  });
@@ -1804,6 +1804,9 @@ ul#results {
1804
1804
  ul#results li {
1805
1805
  padding-left: 0.5rem;
1806
1806
  }
1807
+ #filter-reset {
1808
+ cursor: pointer;
1809
+ }
1807
1810
  .scroll {
1808
1811
  height: 100%;
1809
1812
  overflow-x: hidden;
@@ -1815,7 +1818,7 @@ var ys = Object.defineProperty, As = Object.getOwnPropertyDescriptor, H = (i, t,
1815
1818
  (o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
1816
1819
  return s && r && ys(t, e, r), r;
1817
1820
  };
1818
- let C = class extends Y {
1821
+ let R = class extends Y {
1819
1822
  constructor() {
1820
1823
  super(...arguments);
1821
1824
  x(this, "_fuse");
@@ -1880,10 +1883,14 @@ let C = class extends Y {
1880
1883
  const n = {
1881
1884
  ...t.length > 2 && s.length ? {
1882
1885
  $and: [
1883
- // @ts-ignore
1884
- ...this.config.fuseConfig.keys.map((c) => ({
1885
- [c]: t
1886
- })),
1886
+ {
1887
+ $or: [
1888
+ // @ts-ignore
1889
+ ...this.config.fuseConfig.keys.map((c) => ({
1890
+ [c]: t
1891
+ }))
1892
+ ]
1893
+ },
1887
1894
  {
1888
1895
  $or: s
1889
1896
  }
@@ -1906,8 +1913,15 @@ let C = class extends Y {
1906
1913
  }
1907
1914
  aggregateResults(t, e) {
1908
1915
  return t.filter((s) => {
1909
- const r = s[this.config.aggregateResults];
1910
- return Array.isArray(r) ? r.includes(e) : r === e;
1916
+ const r = s[this.config.aggregateResults], n = Object.keys(
1917
+ // @ts-ignore
1918
+ this._filters[this.config.aggregateResults]
1919
+ // @ts-ignore
1920
+ ).filter((c) => this._filters[this.config.aggregateResults][c]);
1921
+ return (n.length ? (
1922
+ // @ts-ignore
1923
+ n.includes(e)
1924
+ ) : !0) && Array.isArray(r) ? r.includes(e) : r === e;
1911
1925
  });
1912
1926
  }
1913
1927
  sortResults(t) {
@@ -1919,26 +1933,39 @@ let C = class extends Y {
1919
1933
  );
1920
1934
  }
1921
1935
  toggleFilter(t, e) {
1922
- this.config.exclusiveFilters === !0 && Object.keys(this._filters).forEach((r) => {
1923
- Object.keys(this._filters[r]).forEach((n) => {
1924
- this._filters[r][n] = !1;
1936
+ this.config.exclusiveFilters === !0 && Object.keys(this._filters).forEach((n) => {
1937
+ Object.keys(this._filters[n]).forEach((o) => {
1938
+ this._filters[n][o] = !1;
1925
1939
  });
1926
- }), this._filters[t][e] = !this._filters[t][e], this.search();
1927
- const s = this.renderRoot.querySelectorAll(
1940
+ }), this._filters[t][e] = !this._filters[t][e];
1941
+ const s = this.renderRoot.querySelector('input[type="text"]');
1942
+ s ? this.search(s.value) : this.search();
1943
+ const r = this.renderRoot.querySelectorAll(
1928
1944
  "ul#results input[type='radio']"
1929
1945
  );
1930
- for (let r = 0; r < s.length; r++)
1931
- s[r].checked = !1;
1932
- setTimeout(() => {
1933
- const r = this.renderRoot.querySelector(
1946
+ for (let n = 0; n < r.length; n++)
1947
+ r[n].checked = !1;
1948
+ this._selectedResult && setTimeout(() => {
1949
+ const n = this.renderRoot.querySelector(
1934
1950
  // @ts-ignore
1935
1951
  `#${this._selectedResult.id}`
1936
1952
  );
1937
- r && (r.checked = !0, this.requestUpdate());
1953
+ n && (n.checked = !0, this.requestUpdate());
1938
1954
  });
1939
1955
  }
1956
+ resetFilters() {
1957
+ this.renderRoot.querySelectorAll("#details-filter input").forEach((e) => {
1958
+ e.checked = !1;
1959
+ });
1960
+ const t = this.renderRoot.querySelector('input[type="text"]');
1961
+ t && (t.value = ""), Object.keys(this._filters).forEach((e) => {
1962
+ Object.keys(this._filters[e]).forEach((s) => {
1963
+ this._filters[e][s] = !1;
1964
+ });
1965
+ }), this.search(), this.requestUpdate();
1966
+ }
1940
1967
  render() {
1941
- return O`
1968
+ return k`
1942
1969
  <style>
1943
1970
  ${vs}
1944
1971
  </style>
@@ -1956,7 +1983,7 @@ let C = class extends Y {
1956
1983
  <ul id="filters">
1957
1984
  ${V(
1958
1985
  this.config.filterProperties,
1959
- (t) => O`
1986
+ (t) => k`
1960
1987
  <details
1961
1988
  id="details-filter"
1962
1989
  data-filter="${t}"
@@ -1986,14 +2013,14 @@ let C = class extends Y {
1986
2013
  this._filters[t] ? V(
1987
2014
  // @ts-ignore
1988
2015
  Object.keys(this._filters[t]).sort(),
1989
- (e) => O`
2016
+ (e) => k`
1990
2017
  <li>
1991
2018
  <label>
1992
2019
  <input
1993
2020
  name="selection"
1994
2021
  type="${this.config.exclusiveFilters === !0 ? "radio" : "checkbox"}"
1995
2022
  checked="${// @ts-ignore
1996
- this._filters[t][e] || m}"
2023
+ this._filters[t][e] || _}"
1997
2024
  @click=${() => this.toggleFilter(t, e)}
1998
2025
  />
1999
2026
  <span class="title">${e}</span>
@@ -2007,13 +2034,16 @@ let C = class extends Y {
2007
2034
  `
2008
2035
  )}
2009
2036
  </ul>
2037
+ <a id="filter-reset" @click=${() => this.resetFilters()}
2038
+ ><small>Reset filters</small></a
2039
+ >
2010
2040
  </section>
2011
2041
  <section id="section-results">
2012
2042
  <div>
2013
2043
  <slot name="resultstitle"></slot>
2014
2044
  </div>
2015
2045
  <div id="container-results" class="scroll">
2016
- ${this._results.length < 1 ? O` <small class="no-results">No matching items</small> ` : m}
2046
+ ${this._results.length < 1 ? k` <small class="no-results">No matching items</small> ` : _}
2017
2047
  <ul id="results">
2018
2048
  ${this.config.aggregateResults ? V(
2019
2049
  this._resultAggregation.filter(
@@ -2022,7 +2052,7 @@ let C = class extends Y {
2022
2052
  t
2023
2053
  ).length
2024
2054
  ),
2025
- (t) => O`<details
2055
+ (t) => k`<details
2026
2056
  id="details-results"
2027
2057
  open
2028
2058
  >
@@ -2051,7 +2081,7 @@ let C = class extends Y {
2051
2081
  t
2052
2082
  ),
2053
2083
  // @ts-ignore
2054
- (e) => O`
2084
+ (e) => k`
2055
2085
  <li>
2056
2086
  <label>
2057
2087
  <input
@@ -2076,7 +2106,7 @@ let C = class extends Y {
2076
2106
  ) : V(
2077
2107
  this._results,
2078
2108
  // @ts-ignore
2079
- (t) => O`<li>
2109
+ (t) => k`<li>
2080
2110
  ${// @ts-ignore
2081
2111
  Bt(t[this.config.titleProperty])}
2082
2112
  </li>`
@@ -2090,25 +2120,25 @@ let C = class extends Y {
2090
2120
  };
2091
2121
  H([
2092
2122
  ot()
2093
- ], C.prototype, "_items", 2);
2123
+ ], R.prototype, "_items", 2);
2094
2124
  H([
2095
2125
  ot()
2096
- ], C.prototype, "_results", 2);
2126
+ ], R.prototype, "_results", 2);
2097
2127
  H([
2098
2128
  ot()
2099
- ], C.prototype, "_filters", 2);
2129
+ ], R.prototype, "_filters", 2);
2100
2130
  H([
2101
2131
  ot()
2102
- ], C.prototype, "_selectedResult", 2);
2132
+ ], R.prototype, "_selectedResult", 2);
2103
2133
  H([
2104
2134
  Mt({ attribute: !1 })
2105
- ], C.prototype, "config", 2);
2135
+ ], R.prototype, "config", 2);
2106
2136
  H([
2107
2137
  Mt()
2108
- ], C.prototype, "apply", 2);
2109
- C = H([
2138
+ ], R.prototype, "apply", 2);
2139
+ R = H([
2110
2140
  Me("eox-itemfilter")
2111
- ], C);
2141
+ ], R);
2112
2142
  export {
2113
- C as EOxItemFilter
2143
+ R as EOxItemFilter
2114
2144
  };
@@ -2,21 +2,21 @@
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const v=window,S=v.ShadowRoot&&(v.ShadyCSS===void 0||v.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,It=Symbol(),Rt=new WeakMap;let he=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==It)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(S&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=Rt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Rt.set(e,t))}return t}toString(){return this.cssText}};const ae=r=>new he(typeof r=="string"?r:r+"",void 0,It),ue=(r,t)=>{S?r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),i=v.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)})},Ot=S?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return ae(e)})(r):r;/**
5
+ */const v=window,S=v.ShadowRoot&&(v.ShadyCSS===void 0||v.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ct=Symbol(),It=new WeakMap;let he=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Ct)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(S&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=It.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&It.set(e,t))}return t}toString(){return this.cssText}};const ae=r=>new he(typeof r=="string"?r:r+"",void 0,Ct),ue=(r,t)=>{S?r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const s=document.createElement("style"),i=v.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)})},Ot=S?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return ae(e)})(r):r;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */var ct;const tt=window,Lt=tt.trustedTypes,de=Lt?Lt.emptyScript:"",Nt=tt.reactiveElementPolyfillSupport,ht={toAttribute(r,t){switch(t){case Boolean:r=r?de:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Tt=(r,t)=>t!==r&&(t==t||r==r),at={attribute:!0,type:String,converter:ht,reflect:!1,hasChanged:Tt};let z=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const i=this._$Ep(s,e);i!==void 0&&(this._$Ev.set(i,s),t.push(i))}),t}static createProperty(t,e=at){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const n=this[t];this[e]=i,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||at}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of s)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(Ot(i))}else t!==void 0&&e.push(Ot(t));return e}static _$Ep(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return ue(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=at){var i;const n=this.constructor._$Ep(t,s);if(n!==void 0&&s.reflect===!0){const o=(((i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?s.converter:ht).toAttribute(e,s.type);this._$El=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$El=null}}_$AK(t,e){var s;const i=this.constructor,n=i._$Ev.get(t);if(n!==void 0&&this._$El!==n){const o=i.getPropertyOptions(n),c=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?o.converter:ht;this._$El=n,this[n]=c.fromAttribute(e,o.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||Tt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,n)=>this[n]=i),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(i=>{var n;return(n=i.hostUpdate)===null||n===void 0?void 0:n.call(i)}),this.update(s)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var i;return(i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},Nt==null||Nt({ReactiveElement:z}),((ct=tt.reactiveElementVersions)!==null&&ct!==void 0?ct:tt.reactiveElementVersions=[]).push("1.6.1");/**
9
+ */var ct;const tt=window,Lt=tt.trustedTypes,de=Lt?Lt.emptyScript:"",kt=tt.reactiveElementPolyfillSupport,ht={toAttribute(r,t){switch(t){case Boolean:r=r?de:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Nt=(r,t)=>t!==r&&(t==t||r==r),at={attribute:!0,type:String,converter:ht,reflect:!1,hasChanged:Nt};let z=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,s)=>{const i=this._$Ep(s,e);i!==void 0&&(this._$Ev.set(i,s),t.push(i))}),t}static createProperty(t,e=at){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=typeof t=="symbol"?Symbol():"__"+t,i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const n=this[t];this[e]=i,this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||at}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,s=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of s)this.createProperty(i,e[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(Ot(i))}else t!==void 0&&e.push(Ot(t));return e}static _$Ep(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,s;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((s=t.hostConnected)===null||s===void 0||s.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return ue(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostConnected)===null||s===void 0?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var s;return(s=e.hostDisconnected)===null||s===void 0?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EO(t,e,s=at){var i;const n=this.constructor._$Ep(t,s);if(n!==void 0&&s.reflect===!0){const o=(((i=s.converter)===null||i===void 0?void 0:i.toAttribute)!==void 0?s.converter:ht).toAttribute(e,s.type);this._$El=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$El=null}}_$AK(t,e){var s;const i=this.constructor,n=i._$Ev.get(t);if(n!==void 0&&this._$El!==n){const o=i.getPropertyOptions(n),c=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)===null||s===void 0?void 0:s.fromAttribute)!==void 0?o.converter:ht;this._$El=n,this[n]=c.fromAttribute(e,o.type),this._$El=null}}requestUpdate(t,e,s){let i=!0;t!==void 0&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||Nt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,s))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((i,n)=>this[n]=i),this._$Ei=void 0);let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),(t=this._$ES)===null||t===void 0||t.forEach(i=>{var n;return(n=i.hostUpdate)===null||n===void 0?void 0:n.call(i)}),this.update(s)):this._$Ek()}catch(i){throw e=!1,this._$Ek(),i}e&&this._$AE(s)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(s=>{var i;return(i=s.hostUpdated)===null||i===void 0?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,s)=>this._$EO(s,this[s],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};z.finalized=!0,z.elementProperties=new Map,z.elementStyles=[],z.shadowRootOptions={mode:"open"},kt==null||kt({ReactiveElement:z}),((ct=tt.reactiveElementVersions)!==null&&ct!==void 0?ct:tt.reactiveElementVersions=[]).push("1.6.1");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */var ut;const et=window,B=et.trustedTypes,kt=B?B.createPolicy("lit-html",{createHTML:r=>r}):void 0,dt="$lit$",C=`lit$${(Math.random()+"").slice(9)}$`,Pt="?"+C,fe=`<${Pt}>`,L=document,Y=()=>L.createComment(""),G=r=>r===null||typeof r!="object"&&typeof r!="function",Ut=Array.isArray,pe=r=>Ut(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",ft=`[
14
- \f\r]`,J=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ht=/-->/g,jt=/>/g,N=RegExp(`>|${ft}(?:([^\\s"'>=/]+)(${ft}*=${ft}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Ft=/'/g,zt=/"/g,Bt=/^(?:script|style|textarea|title)$/i,ge=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),T=ge(1),k=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Dt=new WeakMap,P=L.createTreeWalker(L,129,null,!1),me=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":"",o=J;for(let l=0;l<e;l++){const h=r[l];let u,a,d=-1,p=0;for(;p<h.length&&(o.lastIndex=p,a=o.exec(h),a!==null);)p=o.lastIndex,o===J?a[1]==="!--"?o=Ht:a[1]!==void 0?o=jt:a[2]!==void 0?(Bt.test(a[2])&&(i=RegExp("</"+a[2],"g")),o=N):a[3]!==void 0&&(o=N):o===N?a[0]===">"?(o=i??J,d=-1):a[1]===void 0?d=-2:(d=o.lastIndex-a[2].length,u=a[1],o=a[3]===void 0?N:a[3]==='"'?zt:Ft):o===zt||o===Ft?o=N:o===Ht||o===jt?o=J:(o=N,i=void 0);const g=o===N&&r[l+1].startsWith("/>")?" ":"";n+=o===J?h+fe:d>=0?(s.push(u),h.slice(0,d)+dt+h.slice(d)+C+g):h+C+(d===-2?(s.push(void 0),l):g)}const c=n+(r[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return[kt!==void 0?kt.createHTML(c):c,s]};class Q{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const c=t.length-1,l=this.parts,[h,u]=me(t,e);if(this.el=Q.createElement(h,s),P.currentNode=this.el.content,e===2){const a=this.el.content,d=a.firstChild;d.remove(),a.append(...d.childNodes)}for(;(i=P.nextNode())!==null&&l.length<c;){if(i.nodeType===1){if(i.hasAttributes()){const a=[];for(const d of i.getAttributeNames())if(d.endsWith(dt)||d.startsWith(C)){const p=u[o++];if(a.push(d),p!==void 0){const g=i.getAttribute(p.toLowerCase()+dt).split(C),$=/([.?@])?(.*)/.exec(p);l.push({type:1,index:n,name:$[2],strings:g,ctor:$[1]==="."?$e:$[1]==="?"?ye:$[1]==="@"?Ae:st})}else l.push({type:6,index:n})}for(const d of a)i.removeAttribute(d)}if(Bt.test(i.tagName)){const a=i.textContent.split(C),d=a.length-1;if(d>0){i.textContent=B?B.emptyScript:"";for(let p=0;p<d;p++)i.append(a[p],Y()),P.nextNode(),l.push({type:2,index:++n});i.append(a[d],Y())}}}else if(i.nodeType===8)if(i.data===Pt)l.push({type:2,index:n});else{let a=-1;for(;(a=i.data.indexOf(C,a+1))!==-1;)l.push({type:7,index:n}),a+=C.length-1}n++}}static createElement(t,e){const s=L.createElement("template");return s.innerHTML=t,s}}function D(r,t,e=r,s){var i,n,o,c;if(t===k)return t;let l=s!==void 0?(i=e._$Co)===null||i===void 0?void 0:i[s]:e._$Cl;const h=G(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((n=l==null?void 0:l._$AO)===null||n===void 0||n.call(l,!1),h===void 0?l=void 0:(l=new h(r),l._$AT(r,e,s)),s!==void 0?((o=(c=e)._$Co)!==null&&o!==void 0?o:c._$Co=[])[s]=l:e._$Cl=l),l!==void 0&&(t=D(r,l._$AS(r,t.values),l,s)),t}class _e{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:s},parts:i}=this._$AD,n=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:L).importNode(s,!0);P.currentNode=n;let o=P.nextNode(),c=0,l=0,h=i[0];for(;h!==void 0;){if(c===h.index){let u;h.type===2?u=new X(o,o.nextSibling,this,t):h.type===1?u=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(u=new Ee(o,this,t)),this._$AV.push(u),h=i[++l]}c!==(h==null?void 0:h.index)&&(o=P.nextNode(),c++)}return P.currentNode=L,n}v(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class X{constructor(t,e,s,i){var n;this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cp=(n=i==null?void 0:i.isConnected)===null||n===void 0||n}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=D(this,t,e),G(t)?t===m||t==null||t===""?(this._$AH!==m&&this._$AR(),this._$AH=m):t!==this._$AH&&t!==k&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):pe(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==m&&G(this._$AH)?this._$AA.nextSibling.data=t:this.$(L.createTextNode(t)),this._$AH=t}g(t){var e;const{values:s,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Q.createElement(i.h,this.options)),i);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===n)this._$AH.v(s);else{const o=new _e(n,this),c=o.u(this.options);o.v(s),this.$(c),this._$AH=o}}_$AC(t){let e=Dt.get(t.strings);return e===void 0&&Dt.set(t.strings,e=new Q(t)),e}T(t){Ut(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new X(this.k(Y()),this.k(Y()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class st{constructor(t,e,s,i,n){this.type=1,this._$AH=m,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=m}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=D(this,t,e,0),o=!G(t)||t!==this._$AH&&t!==k,o&&(this._$AH=t);else{const c=t;let l,h;for(t=n[0],l=0;l<n.length-1;l++)h=D(this,c[s+l],e,l),h===k&&(h=this._$AH[l]),o||(o=!G(h)||h!==this._$AH[l]),h===m?t=m:t!==m&&(t+=(h??"")+n[l+1]),this._$AH[l]=h}o&&!i&&this.j(t)}j(t){t===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class $e extends st{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===m?void 0:t}}const ve=B?B.emptyScript:"";class ye extends st{constructor(){super(...arguments),this.type=4}j(t){t&&t!==m?this.element.setAttribute(this.name,ve):this.element.removeAttribute(this.name)}}class Ae extends st{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var s;if((t=(s=D(this,t,e,0))!==null&&s!==void 0?s:m)===k)return;const i=this._$AH,n=t===m&&i!==m||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==m&&(i===m||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&s!==void 0?s:this.element,t):this._$AH.handleEvent(t)}}class Ee{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){D(this,t)}}const Wt=et.litHtmlPolyfillSupport;Wt==null||Wt(Q,X),((ut=et.litHtmlVersions)!==null&&ut!==void 0?ut:et.litHtmlVersions=[]).push("2.7.4");const xe=(r,t,e)=>{var s,i;const n=(s=e==null?void 0:e.renderBefore)!==null&&s!==void 0?s:t;let o=n._$litPart$;if(o===void 0){const c=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:null;n._$litPart$=o=new X(t.insertBefore(Y(),c),c,void 0,e??{})}return o._$AI(r),o};/**
13
+ */var ut;const et=window,B=et.trustedTypes,Tt=B?B.createPolicy("lit-html",{createHTML:r=>r}):void 0,dt="$lit$",R=`lit$${(Math.random()+"").slice(9)}$`,Pt="?"+R,fe=`<${Pt}>`,L=document,Y=()=>L.createComment(""),G=r=>r===null||typeof r!="object"&&typeof r!="function",Ut=Array.isArray,pe=r=>Ut(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",ft=`[
14
+ \f\r]`,J=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ht=/-->/g,Ft=/>/g,k=RegExp(`>|${ft}(?:([^\\s"'>=/]+)(${ft}*=${ft}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),jt=/'/g,zt=/"/g,Bt=/^(?:script|style|textarea|title)$/i,ge=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),N=ge(1),T=Symbol.for("lit-noChange"),m=Symbol.for("lit-nothing"),Dt=new WeakMap,P=L.createTreeWalker(L,129,null,!1),me=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":"",o=J;for(let l=0;l<e;l++){const h=r[l];let u,a,d=-1,p=0;for(;p<h.length&&(o.lastIndex=p,a=o.exec(h),a!==null);)p=o.lastIndex,o===J?a[1]==="!--"?o=Ht:a[1]!==void 0?o=Ft:a[2]!==void 0?(Bt.test(a[2])&&(i=RegExp("</"+a[2],"g")),o=k):a[3]!==void 0&&(o=k):o===k?a[0]===">"?(o=i??J,d=-1):a[1]===void 0?d=-2:(d=o.lastIndex-a[2].length,u=a[1],o=a[3]===void 0?k:a[3]==='"'?zt:jt):o===zt||o===jt?o=k:o===Ht||o===Ft?o=J:(o=k,i=void 0);const g=o===k&&r[l+1].startsWith("/>")?" ":"";n+=o===J?h+fe:d>=0?(s.push(u),h.slice(0,d)+dt+h.slice(d)+R+g):h+R+(d===-2?(s.push(void 0),l):g)}const c=n+(r[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Tt!==void 0?Tt.createHTML(c):c,s]};class Q{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const c=t.length-1,l=this.parts,[h,u]=me(t,e);if(this.el=Q.createElement(h,s),P.currentNode=this.el.content,e===2){const a=this.el.content,d=a.firstChild;d.remove(),a.append(...d.childNodes)}for(;(i=P.nextNode())!==null&&l.length<c;){if(i.nodeType===1){if(i.hasAttributes()){const a=[];for(const d of i.getAttributeNames())if(d.endsWith(dt)||d.startsWith(R)){const p=u[o++];if(a.push(d),p!==void 0){const g=i.getAttribute(p.toLowerCase()+dt).split(R),$=/([.?@])?(.*)/.exec(p);l.push({type:1,index:n,name:$[2],strings:g,ctor:$[1]==="."?$e:$[1]==="?"?ye:$[1]==="@"?Ae:st})}else l.push({type:6,index:n})}for(const d of a)i.removeAttribute(d)}if(Bt.test(i.tagName)){const a=i.textContent.split(R),d=a.length-1;if(d>0){i.textContent=B?B.emptyScript:"";for(let p=0;p<d;p++)i.append(a[p],Y()),P.nextNode(),l.push({type:2,index:++n});i.append(a[d],Y())}}}else if(i.nodeType===8)if(i.data===Pt)l.push({type:2,index:n});else{let a=-1;for(;(a=i.data.indexOf(R,a+1))!==-1;)l.push({type:7,index:n}),a+=R.length-1}n++}}static createElement(t,e){const s=L.createElement("template");return s.innerHTML=t,s}}function D(r,t,e=r,s){var i,n,o,c;if(t===T)return t;let l=s!==void 0?(i=e._$Co)===null||i===void 0?void 0:i[s]:e._$Cl;const h=G(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((n=l==null?void 0:l._$AO)===null||n===void 0||n.call(l,!1),h===void 0?l=void 0:(l=new h(r),l._$AT(r,e,s)),s!==void 0?((o=(c=e)._$Co)!==null&&o!==void 0?o:c._$Co=[])[s]=l:e._$Cl=l),l!==void 0&&(t=D(r,l._$AS(r,t.values),l,s)),t}class _e{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:s},parts:i}=this._$AD,n=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:L).importNode(s,!0);P.currentNode=n;let o=P.nextNode(),c=0,l=0,h=i[0];for(;h!==void 0;){if(c===h.index){let u;h.type===2?u=new X(o,o.nextSibling,this,t):h.type===1?u=new h.ctor(o,h.name,h.strings,this,t):h.type===6&&(u=new Ee(o,this,t)),this._$AV.push(u),h=i[++l]}c!==(h==null?void 0:h.index)&&(o=P.nextNode(),c++)}return P.currentNode=L,n}v(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class X{constructor(t,e,s,i){var n;this.type=2,this._$AH=m,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cp=(n=i==null?void 0:i.isConnected)===null||n===void 0||n}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=D(this,t,e),G(t)?t===m||t==null||t===""?(this._$AH!==m&&this._$AR(),this._$AH=m):t!==this._$AH&&t!==T&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):pe(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==m&&G(this._$AH)?this._$AA.nextSibling.data=t:this.$(L.createTextNode(t)),this._$AH=t}g(t){var e;const{values:s,_$litType$:i}=t,n=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Q.createElement(i.h,this.options)),i);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===n)this._$AH.v(s);else{const o=new _e(n,this),c=o.u(this.options);o.v(s),this.$(c),this._$AH=o}}_$AC(t){let e=Dt.get(t.strings);return e===void 0&&Dt.set(t.strings,e=new Q(t)),e}T(t){Ut(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new X(this.k(Y()),this.k(Y()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)===null||s===void 0||s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class st{constructor(t,e,s,i,n){this.type=1,this._$AH=m,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=m}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=D(this,t,e,0),o=!G(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const c=t;let l,h;for(t=n[0],l=0;l<n.length-1;l++)h=D(this,c[s+l],e,l),h===T&&(h=this._$AH[l]),o||(o=!G(h)||h!==this._$AH[l]),h===m?t=m:t!==m&&(t+=(h??"")+n[l+1]),this._$AH[l]=h}o&&!i&&this.j(t)}j(t){t===m?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class $e extends st{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===m?void 0:t}}const ve=B?B.emptyScript:"";class ye extends st{constructor(){super(...arguments),this.type=4}j(t){t&&t!==m?this.element.setAttribute(this.name,ve):this.element.removeAttribute(this.name)}}class Ae extends st{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){var s;if((t=(s=D(this,t,e,0))!==null&&s!==void 0?s:m)===T)return;const i=this._$AH,n=t===m&&i!==m||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==m&&(i===m||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,s;typeof this._$AH=="function"?this._$AH.call((s=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&s!==void 0?s:this.element,t):this._$AH.handleEvent(t)}}class Ee{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){D(this,t)}}const Wt=et.litHtmlPolyfillSupport;Wt==null||Wt(Q,X),((ut=et.litHtmlVersions)!==null&&ut!==void 0?ut:et.litHtmlVersions=[]).push("2.7.4");const xe=(r,t,e)=>{var s,i;const n=(s=e==null?void 0:e.renderBefore)!==null&&s!==void 0?s:t;let o=n._$litPart$;if(o===void 0){const c=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:null;n._$litPart$=o=new X(t.insertBefore(Y(),c),c,void 0,e??{})}return o._$AI(r),o};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */var pt,gt;class Z extends z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=xe(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return k}}Z.finalized=!0,Z._$litElement$=!0,(pt=globalThis.litElementHydrateSupport)===null||pt===void 0||pt.call(globalThis,{LitElement:Z});const Kt=globalThis.litElementPolyfillSupport;Kt==null||Kt({LitElement:Z}),((gt=globalThis.litElementVersions)!==null&&gt!==void 0?gt:globalThis.litElementVersions=[]).push("3.3.2");/**
19
+ */var pt,gt;class Z extends z{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const s=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=s.firstChild),s}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=xe(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return T}}Z.finalized=!0,Z._$litElement$=!0,(pt=globalThis.litElementHydrateSupport)===null||pt===void 0||pt.call(globalThis,{LitElement:Z});const Kt=globalThis.litElementPolyfillSupport;Kt==null||Kt({LitElement:Z}),((gt=globalThis.litElementVersions)!==null&&gt!==void 0?gt:globalThis.litElementVersions=[]).push("3.3.2");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
@@ -40,11 +40,11 @@
40
40
  * @license
41
41
  * Copyright 2017 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
- */const we={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Me=r=>(...t)=>({_$litDirective$:r,values:t});class Ce{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
43
+ */const we={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Me=r=>(...t)=>({_$litDirective$:r,values:t});class Re{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
44
44
  * @license
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
- */class $t extends Ce{constructor(t){if(super(t),this.et=m,t.type!==we.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===m||t==null)return this.ft=void 0,this.et=t;if(t===k)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}$t.directiveName="unsafeHTML",$t.resultType=1;const Vt=Me($t);function b(r){return Array.isArray?Array.isArray(r):Jt(r)==="[object Array]"}const Ie=1/0;function Re(r){if(typeof r=="string")return r;let t=r+"";return t=="0"&&1/r==-Ie?"-0":t}function Oe(r){return r==null?"":Re(r)}function x(r){return typeof r=="string"}function Yt(r){return typeof r=="number"}function Le(r){return r===!0||r===!1||Ne(r)&&Jt(r)=="[object Boolean]"}function Gt(r){return typeof r=="object"}function Ne(r){return Gt(r)&&r!==null}function y(r){return r!=null}function vt(r){return!r.trim().length}function Jt(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const $s="Extended search is not available",Te="Incorrect 'index' type",ke=r=>`Invalid value for key ${r}`,Pe=r=>`Pattern length exceeds max of ${r}.`,Ue=r=>`Missing ${r} property in key`,He=r=>`Property 'weight' in key '${r}' must be a positive integer`,Qt=Object.prototype.hasOwnProperty;class je{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(s=>{let i=Xt(s);e+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,e+=i.weight}),this._keys.forEach(s=>{s.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Xt(r){let t=null,e=null,s=null,i=1,n=null;if(x(r)||b(r))s=r,t=Zt(r),e=yt(r);else{if(!Qt.call(r,"name"))throw new Error(Ue("name"));const o=r.name;if(s=o,Qt.call(r,"weight")&&(i=r.weight,i<=0))throw new Error(He(o));t=Zt(o),e=yt(o),n=r.getFn}return{path:t,id:e,weight:i,src:s,getFn:n}}function Zt(r){return b(r)?r:r.split(".")}function yt(r){return b(r)?r.join("."):r}function Fe(r,t){let e=[],s=!1;const i=(n,o,c)=>{if(y(n))if(!o[c])e.push(n);else{let l=o[c];const h=n[l];if(!y(h))return;if(c===o.length-1&&(x(h)||Yt(h)||Le(h)))e.push(Oe(h));else if(b(h)){s=!0;for(let u=0,a=h.length;u<a;u+=1)i(h[u],o,c+1)}else o.length&&i(h,o,c+1)}};return i(r,x(t)?t.split("."):t,0),s?e:e[0]}var f={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(r,t)=>r.score===t.score?r.idx<t.idx?-1:1:r.score<t.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:Fe,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const ze=/[^ ]+/g;function Be(r=1,t=3){const e=new Map,s=Math.pow(10,t);return{get(i){const n=i.match(ze).length;if(e.has(n))return e.get(n);const o=1/Math.pow(n,.5*r),c=parseFloat(Math.round(o*s)/s);return e.set(n,c),c},clear(){e.clear()}}}class At{constructor({getFn:t=f.getFn,fieldNormWeight:e=f.fieldNormWeight}={}){this.norm=Be(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((e,s)=>{this._keysMap[e.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,x(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const e=this.size();x(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,s=this.size();e<s;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!y(t)||vt(t))return;let s={v:t,i:e,n:this.norm.get(t)};this.records.push(s)}_addObject(t,e){let s={i:e,$:{}};this.keys.forEach((i,n)=>{let o=i.getFn?i.getFn(t):this.getFn(t,i.path);if(y(o)){if(b(o)){let c=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:h,value:u}=l.pop();if(y(u))if(x(u)&&!vt(u)){let a={v:u,i:h,n:this.norm.get(u)};c.push(a)}else b(u)&&u.forEach((a,d)=>{l.push({nestedArrIndex:d,value:a})})}s.$[n]=c}else if(x(o)&&!vt(o)){let c={v:o,n:this.norm.get(o)};s.$[n]=c}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function qt(r,t,{getFn:e=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){const i=new At({getFn:e,fieldNormWeight:s});return i.setKeys(r.map(Xt)),i.setSources(t),i.create(),i}function De(r,{getFn:t=f.getFn,fieldNormWeight:e=f.fieldNormWeight}={}){const{keys:s,records:i}=r,n=new At({getFn:t,fieldNormWeight:e});return n.setKeys(s),n.setIndexRecords(i),n}function rt(r,{errors:t=0,currentLocation:e=0,expectedLocation:s=0,distance:i=f.distance,ignoreLocation:n=f.ignoreLocation}={}){const o=t/r.length;if(n)return o;const c=Math.abs(s-e);return i?o+c/i:c?1:o}function We(r=[],t=f.minMatchCharLength){let e=[],s=-1,i=-1,n=0;for(let o=r.length;n<o;n+=1){let c=r[n];c&&s===-1?s=n:!c&&s!==-1&&(i=n-1,i-s+1>=t&&e.push([s,i]),s=-1)}return r[n-1]&&n-s>=t&&e.push([s,n-1]),e}const U=32;function Ke(r,t,e,{location:s=f.location,distance:i=f.distance,threshold:n=f.threshold,findAllMatches:o=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,includeMatches:l=f.includeMatches,ignoreLocation:h=f.ignoreLocation}={}){if(t.length>U)throw new Error(Pe(U));const u=t.length,a=r.length,d=Math.max(0,Math.min(s,a));let p=n,g=d;const $=c>1||l,j=$?Array(a):[];let w;for(;(w=r.indexOf(t,g))>-1;){let A=rt(t,{currentLocation:w,expectedLocation:d,distance:i,ignoreLocation:h});if(p=Math.min(A,p),g=w+u,$){let R=0;for(;R<u;)j[w+R]=1,R+=1}}g=-1;let K=[],F=1,ot=u+a;const gs=1<<u-1;for(let A=0;A<u;A+=1){let R=0,O=ot;for(;R<O;)rt(t,{errors:A,currentLocation:d+O,expectedLocation:d,distance:i,ignoreLocation:h})<=p?R=O:ot=O,O=Math.floor((ot-R)/2+R);ot=O;let le=Math.max(1,d-O+1),Ct=o?a:Math.min(d+O,a)+u,V=Array(Ct+2);V[Ct+1]=(1<<A)-1;for(let E=Ct;E>=le;E-=1){let lt=E-1,ce=e[r.charAt(lt)];if($&&(j[lt]=+!!ce),V[E]=(V[E+1]<<1|1)&ce,A&&(V[E]|=(K[E+1]|K[E])<<1|1|K[E+1]),V[E]&gs&&(F=rt(t,{errors:A,currentLocation:lt,expectedLocation:d,distance:i,ignoreLocation:h}),F<=p)){if(p=F,g=lt,g<=d)break;le=Math.max(1,2*d-g)}}if(rt(t,{errors:A+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:h})>p)break;K=V}const Mt={isMatch:g>=0,score:Math.max(.001,F)};if($){const A=We(j,c);A.length?l&&(Mt.indices=A):Mt.isMatch=!1}return Mt}function Ve(r){let t={};for(let e=0,s=r.length;e<s;e+=1){const i=r.charAt(e);t[i]=(t[i]||0)|1<<s-e-1}return t}class te{constructor(t,{location:e=f.location,threshold:s=f.threshold,distance:i=f.distance,includeMatches:n=f.includeMatches,findAllMatches:o=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,isCaseSensitive:l=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){if(this.options={location:e,threshold:s,distance:i,includeMatches:n,findAllMatches:o,minMatchCharLength:c,isCaseSensitive:l,ignoreLocation:h},this.pattern=l?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const u=(d,p)=>{this.chunks.push({pattern:d,alphabet:Ve(d),startIndex:p})},a=this.pattern.length;if(a>U){let d=0;const p=a%U,g=a-p;for(;d<g;)u(this.pattern.substr(d,U),d),d+=U;if(p){const $=a-U;u(this.pattern.substr($),$)}}else u(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,includeMatches:s}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let g={isMatch:!0,score:0};return s&&(g.indices=[[0,t.length-1]]),g}const{location:i,distance:n,threshold:o,findAllMatches:c,minMatchCharLength:l,ignoreLocation:h}=this.options;let u=[],a=0,d=!1;this.chunks.forEach(({pattern:g,alphabet:$,startIndex:j})=>{const{isMatch:w,score:K,indices:F}=Ke(t,g,$,{location:i+j,distance:n,threshold:o,findAllMatches:c,minMatchCharLength:l,includeMatches:s,ignoreLocation:h});w&&(d=!0),a+=K,w&&F&&(u=[...u,...F])});let p={isMatch:d,score:d?a/this.chunks.length:1};return d&&s&&(p.indices=u),p}}class I{constructor(t){this.pattern=t}static isMultiMatch(t){return ee(t,this.multiRegex)}static isSingleMatch(t){return ee(t,this.singleRegex)}search(){}}function ee(r,t){const e=r.match(t);return e?e[1]:null}class Ye extends I{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Ge extends I{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class Je extends I{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Qe extends I{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class Xe extends I{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Ze extends I{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class se extends I{constructor(t,{location:e=f.location,threshold:s=f.threshold,distance:i=f.distance,includeMatches:n=f.includeMatches,findAllMatches:o=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,isCaseSensitive:l=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){super(t),this._bitapSearch=new te(t,{location:e,threshold:s,distance:i,includeMatches:n,findAllMatches:o,minMatchCharLength:c,isCaseSensitive:l,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class ie extends I{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e=0,s;const i=[],n=this.pattern.length;for(;(s=t.indexOf(this.pattern,e))>-1;)e=s+n,i.push([s,e-1]);const o=!!i.length;return{isMatch:o,score:o?0:1,indices:i}}}const Et=[Ye,ie,Je,Qe,Ze,Xe,Ge,se],re=Et.length,qe=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,ts="|";function es(r,t={}){return r.split(ts).map(e=>{let s=e.trim().split(qe).filter(n=>n&&!!n.trim()),i=[];for(let n=0,o=s.length;n<o;n+=1){const c=s[n];let l=!1,h=-1;for(;!l&&++h<re;){const u=Et[h];let a=u.isMultiMatch(c);a&&(i.push(new u(a,t)),l=!0)}if(!l)for(h=-1;++h<re;){const u=Et[h];let a=u.isSingleMatch(c);if(a){i.push(new u(a,t));break}}}return i})}const ss=new Set([se.type,ie.type]);class is{constructor(t,{isCaseSensitive:e=f.isCaseSensitive,includeMatches:s=f.includeMatches,minMatchCharLength:i=f.minMatchCharLength,ignoreLocation:n=f.ignoreLocation,findAllMatches:o=f.findAllMatches,location:c=f.location,threshold:l=f.threshold,distance:h=f.distance}={}){this.query=null,this.options={isCaseSensitive:e,includeMatches:s,minMatchCharLength:i,findAllMatches:o,ignoreLocation:n,location:c,threshold:l,distance:h},this.pattern=e?t:t.toLowerCase(),this.query=es(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:i}=this.options;t=i?t:t.toLowerCase();let n=0,o=[],c=0;for(let l=0,h=e.length;l<h;l+=1){const u=e[l];o.length=0,n=0;for(let a=0,d=u.length;a<d;a+=1){const p=u[a],{isMatch:g,indices:$,score:j}=p.search(t);if(g){if(n+=1,c+=j,s){const w=p.constructor.type;ss.has(w)?o=[...o,...$]:o.push($)}}else{c=0,n=0,o.length=0;break}}if(n){let a={isMatch:!0,score:c/n};return s&&(a.indices=o),a}}return{isMatch:!1,score:1}}}const xt=[];function rs(...r){xt.push(...r)}function St(r,t){for(let e=0,s=xt.length;e<s;e+=1){let i=xt[e];if(i.condition(r,t))return new i(r,t)}return new te(r,t)}const nt={AND:"$and",OR:"$or"},bt={PATH:"$path",PATTERN:"$val"},wt=r=>!!(r[nt.AND]||r[nt.OR]),ns=r=>!!r[bt.PATH],os=r=>!b(r)&&Gt(r)&&!wt(r),ne=r=>({[nt.AND]:Object.keys(r).map(t=>({[t]:r[t]}))});function oe(r,t,{auto:e=!0}={}){const s=i=>{let n=Object.keys(i);const o=ns(i);if(!o&&n.length>1&&!wt(i))return s(ne(i));if(os(i)){const l=o?i[bt.PATH]:n[0],h=o?i[bt.PATTERN]:i[l];if(!x(h))throw new Error(ke(l));const u={keyId:yt(l),pattern:h};return e&&(u.searcher=St(h,t)),u}let c={children:[],operator:n[0]};return n.forEach(l=>{const h=i[l];b(h)&&h.forEach(u=>{c.children.push(s(u))})}),c};return wt(r)||(r=ne(r)),s(r)}function ls(r,{ignoreFieldNorm:t=f.ignoreFieldNorm}){r.forEach(e=>{let s=1;e.matches.forEach(({key:i,norm:n,score:o})=>{const c=i?i.weight:null;s*=Math.pow(o===0&&c?Number.EPSILON:o,(c||1)*(t?1:n))}),e.score=s})}function cs(r,t){const e=r.matches;t.matches=[],y(e)&&e.forEach(s=>{if(!y(s.indices)||!s.indices.length)return;const{indices:i,value:n}=s;let o={indices:i,value:n};s.key&&(o.key=s.key.src),s.idx>-1&&(o.refIndex=s.idx),t.matches.push(o)})}function hs(r,t){t.score=r.score}function as(r,t,{includeMatches:e=f.includeMatches,includeScore:s=f.includeScore}={}){const i=[];return e&&i.push(cs),s&&i.push(hs),r.map(n=>{const{idx:o}=n,c={item:t[o],refIndex:o};return i.length&&i.forEach(l=>{l(n,c)}),c})}class W{constructor(t,e={},s){this.options={...f,...e},this.options.useExtendedSearch,this._keyStore=new je(this.options.keys),this.setCollection(t,s)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof At))throw new Error(Te);this._myIndex=e||qt(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){y(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let s=0,i=this._docs.length;s<i;s+=1){const n=this._docs[s];t(n,s)&&(this.removeAt(s),s-=1,i-=1,e.push(n))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:s,includeScore:i,shouldSort:n,sortFn:o,ignoreFieldNorm:c}=this.options;let l=x(t)?x(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return ls(l,{ignoreFieldNorm:c}),n&&l.sort(o),Yt(e)&&e>-1&&(l=l.slice(0,e)),as(l,this._docs,{includeMatches:s,includeScore:i})}_searchStringList(t){const e=St(t,this.options),{records:s}=this._myIndex,i=[];return s.forEach(({v:n,i:o,n:c})=>{if(!y(n))return;const{isMatch:l,score:h,indices:u}=e.searchIn(n);l&&i.push({item:n,idx:o,matches:[{score:h,value:n,norm:c,indices:u}]})}),i}_searchLogical(t){const e=oe(t,this.options),s=(c,l,h)=>{if(!c.children){const{keyId:a,searcher:d}=c,p=this._findMatches({key:this._keyStore.get(a),value:this._myIndex.getValueForItemAtKeyId(l,a),searcher:d});return p&&p.length?[{idx:h,item:l,matches:p}]:[]}const u=[];for(let a=0,d=c.children.length;a<d;a+=1){const p=c.children[a],g=s(p,l,h);if(g.length)u.push(...g);else if(c.operator===nt.AND)return[]}return u},i=this._myIndex.records,n={},o=[];return i.forEach(({$:c,i:l})=>{if(y(c)){let h=s(e,c,l);h.length&&(n[l]||(n[l]={idx:l,item:c,matches:[]},o.push(n[l])),h.forEach(({matches:u})=>{n[l].matches.push(...u)}))}}),o}_searchObjectList(t){const e=St(t,this.options),{keys:s,records:i}=this._myIndex,n=[];return i.forEach(({$:o,i:c})=>{if(!y(o))return;let l=[];s.forEach((h,u)=>{l.push(...this._findMatches({key:h,value:o[u],searcher:e}))}),l.length&&n.push({idx:c,item:o,matches:l})}),n}_findMatches({key:t,value:e,searcher:s}){if(!y(e))return[];let i=[];if(b(e))e.forEach(({v:n,i:o,n:c})=>{if(!y(n))return;const{isMatch:l,score:h,indices:u}=s.searchIn(n);l&&i.push({score:h,key:t,value:n,idx:o,norm:c,indices:u})});else{const{v:n,n:o}=e,{isMatch:c,score:l,indices:h}=s.searchIn(n);c&&i.push({score:l,key:t,value:n,norm:o,indices:h})}return i}}W.version="6.6.2",W.createIndex=qt,W.parseIndex=De,W.config=f,W.parseQuery=oe,rs(is);const us=(r,t="highlight",e="title")=>{const s=(n,o,c)=>{const l=o.split(".");let h;for(h=0;h<l.length-1;h++)n=n[l[h]];n[l[h]]=c},i=(n,o=[])=>{let c="",l=0;return o.forEach(h=>{const u=h[1]+1;c+=[n.substring(l,h[0]),`<mark class="${t}">`,n.substring(h[0],u),"</mark>"].join(""),l=u}),c+=n.substring(l),c};return r.filter(({matches:n})=>n&&n.length).map(({item:n,matches:o})=>{const c={...n};return o.forEach(l=>{l.key===e&&s(c,l.key,i(l.value,l.indices))}),c})},ds=`
47
+ */class $t extends Re{constructor(t){if(super(t),this.et=m,t.type!==we.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===m||t==null)return this.ft=void 0,this.et=t;if(t===T)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}$t.directiveName="unsafeHTML",$t.resultType=1;const Vt=Me($t);function b(r){return Array.isArray?Array.isArray(r):Jt(r)==="[object Array]"}const Ce=1/0;function Ie(r){if(typeof r=="string")return r;let t=r+"";return t=="0"&&1/r==-Ce?"-0":t}function Oe(r){return r==null?"":Ie(r)}function x(r){return typeof r=="string"}function Yt(r){return typeof r=="number"}function Le(r){return r===!0||r===!1||ke(r)&&Jt(r)=="[object Boolean]"}function Gt(r){return typeof r=="object"}function ke(r){return Gt(r)&&r!==null}function y(r){return r!=null}function vt(r){return!r.trim().length}function Jt(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const $s="Extended search is not available",Ne="Incorrect 'index' type",Te=r=>`Invalid value for key ${r}`,Pe=r=>`Pattern length exceeds max of ${r}.`,Ue=r=>`Missing ${r} property in key`,He=r=>`Property 'weight' in key '${r}' must be a positive integer`,Qt=Object.prototype.hasOwnProperty;class Fe{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(s=>{let i=Xt(s);e+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,e+=i.weight}),this._keys.forEach(s=>{s.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Xt(r){let t=null,e=null,s=null,i=1,n=null;if(x(r)||b(r))s=r,t=Zt(r),e=yt(r);else{if(!Qt.call(r,"name"))throw new Error(Ue("name"));const o=r.name;if(s=o,Qt.call(r,"weight")&&(i=r.weight,i<=0))throw new Error(He(o));t=Zt(o),e=yt(o),n=r.getFn}return{path:t,id:e,weight:i,src:s,getFn:n}}function Zt(r){return b(r)?r:r.split(".")}function yt(r){return b(r)?r.join("."):r}function je(r,t){let e=[],s=!1;const i=(n,o,c)=>{if(y(n))if(!o[c])e.push(n);else{let l=o[c];const h=n[l];if(!y(h))return;if(c===o.length-1&&(x(h)||Yt(h)||Le(h)))e.push(Oe(h));else if(b(h)){s=!0;for(let u=0,a=h.length;u<a;u+=1)i(h[u],o,c+1)}else o.length&&i(h,o,c+1)}};return i(r,x(t)?t.split("."):t,0),s?e:e[0]}var f={...{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(r,t)=>r.score===t.score?r.idx<t.idx?-1:1:r.score<t.score?-1:1},...{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},...{location:0,threshold:.6,distance:100},...{useExtendedSearch:!1,getFn:je,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1}};const ze=/[^ ]+/g;function Be(r=1,t=3){const e=new Map,s=Math.pow(10,t);return{get(i){const n=i.match(ze).length;if(e.has(n))return e.get(n);const o=1/Math.pow(n,.5*r),c=parseFloat(Math.round(o*s)/s);return e.set(n,c),c},clear(){e.clear()}}}class At{constructor({getFn:t=f.getFn,fieldNormWeight:e=f.fieldNormWeight}={}){this.norm=Be(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((e,s)=>{this._keysMap[e.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,x(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const e=this.size();x(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,s=this.size();e<s;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!y(t)||vt(t))return;let s={v:t,i:e,n:this.norm.get(t)};this.records.push(s)}_addObject(t,e){let s={i:e,$:{}};this.keys.forEach((i,n)=>{let o=i.getFn?i.getFn(t):this.getFn(t,i.path);if(y(o)){if(b(o)){let c=[];const l=[{nestedArrIndex:-1,value:o}];for(;l.length;){const{nestedArrIndex:h,value:u}=l.pop();if(y(u))if(x(u)&&!vt(u)){let a={v:u,i:h,n:this.norm.get(u)};c.push(a)}else b(u)&&u.forEach((a,d)=>{l.push({nestedArrIndex:d,value:a})})}s.$[n]=c}else if(x(o)&&!vt(o)){let c={v:o,n:this.norm.get(o)};s.$[n]=c}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function qt(r,t,{getFn:e=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){const i=new At({getFn:e,fieldNormWeight:s});return i.setKeys(r.map(Xt)),i.setSources(t),i.create(),i}function De(r,{getFn:t=f.getFn,fieldNormWeight:e=f.fieldNormWeight}={}){const{keys:s,records:i}=r,n=new At({getFn:t,fieldNormWeight:e});return n.setKeys(s),n.setIndexRecords(i),n}function rt(r,{errors:t=0,currentLocation:e=0,expectedLocation:s=0,distance:i=f.distance,ignoreLocation:n=f.ignoreLocation}={}){const o=t/r.length;if(n)return o;const c=Math.abs(s-e);return i?o+c/i:c?1:o}function We(r=[],t=f.minMatchCharLength){let e=[],s=-1,i=-1,n=0;for(let o=r.length;n<o;n+=1){let c=r[n];c&&s===-1?s=n:!c&&s!==-1&&(i=n-1,i-s+1>=t&&e.push([s,i]),s=-1)}return r[n-1]&&n-s>=t&&e.push([s,n-1]),e}const U=32;function Ke(r,t,e,{location:s=f.location,distance:i=f.distance,threshold:n=f.threshold,findAllMatches:o=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,includeMatches:l=f.includeMatches,ignoreLocation:h=f.ignoreLocation}={}){if(t.length>U)throw new Error(Pe(U));const u=t.length,a=r.length,d=Math.max(0,Math.min(s,a));let p=n,g=d;const $=c>1||l,F=$?Array(a):[];let w;for(;(w=r.indexOf(t,g))>-1;){let A=rt(t,{currentLocation:w,expectedLocation:d,distance:i,ignoreLocation:h});if(p=Math.min(A,p),g=w+u,$){let I=0;for(;I<u;)F[w+I]=1,I+=1}}g=-1;let K=[],j=1,ot=u+a;const gs=1<<u-1;for(let A=0;A<u;A+=1){let I=0,O=ot;for(;I<O;)rt(t,{errors:A,currentLocation:d+O,expectedLocation:d,distance:i,ignoreLocation:h})<=p?I=O:ot=O,O=Math.floor((ot-I)/2+I);ot=O;let le=Math.max(1,d-O+1),Rt=o?a:Math.min(d+O,a)+u,V=Array(Rt+2);V[Rt+1]=(1<<A)-1;for(let E=Rt;E>=le;E-=1){let lt=E-1,ce=e[r.charAt(lt)];if($&&(F[lt]=+!!ce),V[E]=(V[E+1]<<1|1)&ce,A&&(V[E]|=(K[E+1]|K[E])<<1|1|K[E+1]),V[E]&gs&&(j=rt(t,{errors:A,currentLocation:lt,expectedLocation:d,distance:i,ignoreLocation:h}),j<=p)){if(p=j,g=lt,g<=d)break;le=Math.max(1,2*d-g)}}if(rt(t,{errors:A+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:h})>p)break;K=V}const Mt={isMatch:g>=0,score:Math.max(.001,j)};if($){const A=We(F,c);A.length?l&&(Mt.indices=A):Mt.isMatch=!1}return Mt}function Ve(r){let t={};for(let e=0,s=r.length;e<s;e+=1){const i=r.charAt(e);t[i]=(t[i]||0)|1<<s-e-1}return t}class te{constructor(t,{location:e=f.location,threshold:s=f.threshold,distance:i=f.distance,includeMatches:n=f.includeMatches,findAllMatches:o=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,isCaseSensitive:l=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){if(this.options={location:e,threshold:s,distance:i,includeMatches:n,findAllMatches:o,minMatchCharLength:c,isCaseSensitive:l,ignoreLocation:h},this.pattern=l?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const u=(d,p)=>{this.chunks.push({pattern:d,alphabet:Ve(d),startIndex:p})},a=this.pattern.length;if(a>U){let d=0;const p=a%U,g=a-p;for(;d<g;)u(this.pattern.substr(d,U),d),d+=U;if(p){const $=a-U;u(this.pattern.substr($),$)}}else u(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,includeMatches:s}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let g={isMatch:!0,score:0};return s&&(g.indices=[[0,t.length-1]]),g}const{location:i,distance:n,threshold:o,findAllMatches:c,minMatchCharLength:l,ignoreLocation:h}=this.options;let u=[],a=0,d=!1;this.chunks.forEach(({pattern:g,alphabet:$,startIndex:F})=>{const{isMatch:w,score:K,indices:j}=Ke(t,g,$,{location:i+F,distance:n,threshold:o,findAllMatches:c,minMatchCharLength:l,includeMatches:s,ignoreLocation:h});w&&(d=!0),a+=K,w&&j&&(u=[...u,...j])});let p={isMatch:d,score:d?a/this.chunks.length:1};return d&&s&&(p.indices=u),p}}class C{constructor(t){this.pattern=t}static isMultiMatch(t){return ee(t,this.multiRegex)}static isSingleMatch(t){return ee(t,this.singleRegex)}search(){}}function ee(r,t){const e=r.match(t);return e?e[1]:null}class Ye extends C{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Ge extends C{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class Je extends C{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Qe extends C{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class Xe extends C{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Ze extends C{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class se extends C{constructor(t,{location:e=f.location,threshold:s=f.threshold,distance:i=f.distance,includeMatches:n=f.includeMatches,findAllMatches:o=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,isCaseSensitive:l=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){super(t),this._bitapSearch=new te(t,{location:e,threshold:s,distance:i,includeMatches:n,findAllMatches:o,minMatchCharLength:c,isCaseSensitive:l,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class ie extends C{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e=0,s;const i=[],n=this.pattern.length;for(;(s=t.indexOf(this.pattern,e))>-1;)e=s+n,i.push([s,e-1]);const o=!!i.length;return{isMatch:o,score:o?0:1,indices:i}}}const Et=[Ye,ie,Je,Qe,Ze,Xe,Ge,se],re=Et.length,qe=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,ts="|";function es(r,t={}){return r.split(ts).map(e=>{let s=e.trim().split(qe).filter(n=>n&&!!n.trim()),i=[];for(let n=0,o=s.length;n<o;n+=1){const c=s[n];let l=!1,h=-1;for(;!l&&++h<re;){const u=Et[h];let a=u.isMultiMatch(c);a&&(i.push(new u(a,t)),l=!0)}if(!l)for(h=-1;++h<re;){const u=Et[h];let a=u.isSingleMatch(c);if(a){i.push(new u(a,t));break}}}return i})}const ss=new Set([se.type,ie.type]);class is{constructor(t,{isCaseSensitive:e=f.isCaseSensitive,includeMatches:s=f.includeMatches,minMatchCharLength:i=f.minMatchCharLength,ignoreLocation:n=f.ignoreLocation,findAllMatches:o=f.findAllMatches,location:c=f.location,threshold:l=f.threshold,distance:h=f.distance}={}){this.query=null,this.options={isCaseSensitive:e,includeMatches:s,minMatchCharLength:i,findAllMatches:o,ignoreLocation:n,location:c,threshold:l,distance:h},this.pattern=e?t:t.toLowerCase(),this.query=es(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:i}=this.options;t=i?t:t.toLowerCase();let n=0,o=[],c=0;for(let l=0,h=e.length;l<h;l+=1){const u=e[l];o.length=0,n=0;for(let a=0,d=u.length;a<d;a+=1){const p=u[a],{isMatch:g,indices:$,score:F}=p.search(t);if(g){if(n+=1,c+=F,s){const w=p.constructor.type;ss.has(w)?o=[...o,...$]:o.push($)}}else{c=0,n=0,o.length=0;break}}if(n){let a={isMatch:!0,score:c/n};return s&&(a.indices=o),a}}return{isMatch:!1,score:1}}}const xt=[];function rs(...r){xt.push(...r)}function St(r,t){for(let e=0,s=xt.length;e<s;e+=1){let i=xt[e];if(i.condition(r,t))return new i(r,t)}return new te(r,t)}const nt={AND:"$and",OR:"$or"},bt={PATH:"$path",PATTERN:"$val"},wt=r=>!!(r[nt.AND]||r[nt.OR]),ns=r=>!!r[bt.PATH],os=r=>!b(r)&&Gt(r)&&!wt(r),ne=r=>({[nt.AND]:Object.keys(r).map(t=>({[t]:r[t]}))});function oe(r,t,{auto:e=!0}={}){const s=i=>{let n=Object.keys(i);const o=ns(i);if(!o&&n.length>1&&!wt(i))return s(ne(i));if(os(i)){const l=o?i[bt.PATH]:n[0],h=o?i[bt.PATTERN]:i[l];if(!x(h))throw new Error(Te(l));const u={keyId:yt(l),pattern:h};return e&&(u.searcher=St(h,t)),u}let c={children:[],operator:n[0]};return n.forEach(l=>{const h=i[l];b(h)&&h.forEach(u=>{c.children.push(s(u))})}),c};return wt(r)||(r=ne(r)),s(r)}function ls(r,{ignoreFieldNorm:t=f.ignoreFieldNorm}){r.forEach(e=>{let s=1;e.matches.forEach(({key:i,norm:n,score:o})=>{const c=i?i.weight:null;s*=Math.pow(o===0&&c?Number.EPSILON:o,(c||1)*(t?1:n))}),e.score=s})}function cs(r,t){const e=r.matches;t.matches=[],y(e)&&e.forEach(s=>{if(!y(s.indices)||!s.indices.length)return;const{indices:i,value:n}=s;let o={indices:i,value:n};s.key&&(o.key=s.key.src),s.idx>-1&&(o.refIndex=s.idx),t.matches.push(o)})}function hs(r,t){t.score=r.score}function as(r,t,{includeMatches:e=f.includeMatches,includeScore:s=f.includeScore}={}){const i=[];return e&&i.push(cs),s&&i.push(hs),r.map(n=>{const{idx:o}=n,c={item:t[o],refIndex:o};return i.length&&i.forEach(l=>{l(n,c)}),c})}class W{constructor(t,e={},s){this.options={...f,...e},this.options.useExtendedSearch,this._keyStore=new Fe(this.options.keys),this.setCollection(t,s)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof At))throw new Error(Ne);this._myIndex=e||qt(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){y(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let s=0,i=this._docs.length;s<i;s+=1){const n=this._docs[s];t(n,s)&&(this.removeAt(s),s-=1,i-=1,e.push(n))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:s,includeScore:i,shouldSort:n,sortFn:o,ignoreFieldNorm:c}=this.options;let l=x(t)?x(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return ls(l,{ignoreFieldNorm:c}),n&&l.sort(o),Yt(e)&&e>-1&&(l=l.slice(0,e)),as(l,this._docs,{includeMatches:s,includeScore:i})}_searchStringList(t){const e=St(t,this.options),{records:s}=this._myIndex,i=[];return s.forEach(({v:n,i:o,n:c})=>{if(!y(n))return;const{isMatch:l,score:h,indices:u}=e.searchIn(n);l&&i.push({item:n,idx:o,matches:[{score:h,value:n,norm:c,indices:u}]})}),i}_searchLogical(t){const e=oe(t,this.options),s=(c,l,h)=>{if(!c.children){const{keyId:a,searcher:d}=c,p=this._findMatches({key:this._keyStore.get(a),value:this._myIndex.getValueForItemAtKeyId(l,a),searcher:d});return p&&p.length?[{idx:h,item:l,matches:p}]:[]}const u=[];for(let a=0,d=c.children.length;a<d;a+=1){const p=c.children[a],g=s(p,l,h);if(g.length)u.push(...g);else if(c.operator===nt.AND)return[]}return u},i=this._myIndex.records,n={},o=[];return i.forEach(({$:c,i:l})=>{if(y(c)){let h=s(e,c,l);h.length&&(n[l]||(n[l]={idx:l,item:c,matches:[]},o.push(n[l])),h.forEach(({matches:u})=>{n[l].matches.push(...u)}))}}),o}_searchObjectList(t){const e=St(t,this.options),{keys:s,records:i}=this._myIndex,n=[];return i.forEach(({$:o,i:c})=>{if(!y(o))return;let l=[];s.forEach((h,u)=>{l.push(...this._findMatches({key:h,value:o[u],searcher:e}))}),l.length&&n.push({idx:c,item:o,matches:l})}),n}_findMatches({key:t,value:e,searcher:s}){if(!y(e))return[];let i=[];if(b(e))e.forEach(({v:n,i:o,n:c})=>{if(!y(n))return;const{isMatch:l,score:h,indices:u}=s.searchIn(n);l&&i.push({score:h,key:t,value:n,idx:o,norm:c,indices:u})});else{const{v:n,n:o}=e,{isMatch:c,score:l,indices:h}=s.searchIn(n);c&&i.push({score:l,key:t,value:n,norm:o,indices:h})}return i}}W.version="6.6.2",W.createIndex=qt,W.parseIndex=De,W.config=f,W.parseQuery=oe,rs(is);const us=(r,t="highlight",e="title")=>{const s=(n,o,c)=>{const l=o.split(".");let h;for(h=0;h<l.length-1;h++)n=n[l[h]];n[l[h]]=c},i=(n,o=[])=>{let c="",l=0;return o.forEach(h=>{const u=h[1]+1;c+=[n.substring(l,h[0]),`<mark class="${t}">`,n.substring(h[0],u),"</mark>"].join(""),l=u}),c+=n.substring(l),c};return r.filter(({matches:n})=>n&&n.length).map(({item:n,matches:o})=>{const c={...n};return o.forEach(l=>{l.key===e&&s(c,l.key,i(l.value,l.indices))}),c})},ds=`
48
48
  :host {
49
49
  display: flex;
50
50
  box-sizing: border-box;
@@ -154,12 +154,15 @@ ul#results {
154
154
  ul#results li {
155
155
  padding-left: 0.5rem;
156
156
  }
157
+ #filter-reset {
158
+ cursor: pointer;
159
+ }
157
160
  .scroll {
158
161
  height: 100%;
159
162
  overflow-x: hidden;
160
163
  overflow-y: auto;
161
164
  }
162
- `;var fs=Object.defineProperty,ps=Object.getOwnPropertyDescriptor,H=(r,t,e,s)=>{for(var i=s>1?void 0:s?ps(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&fs(t,e,i),i};_.EOxItemFilter=class extends Z{constructor(){super(...arguments);M(this,"_fuse");M(this,"_resultAggregation",[]);M(this,"_items",[]);M(this,"_results",[]);M(this,"_filters",{});M(this,"_selectedResult");M(this,"config",{titleProperty:"title",filterProperties:["themes"],aggregateResults:"themes",fuseConfig:{},enableSearch:!0,enableHighlighting:!1,onSelect:()=>{},matchAllWhenEmpty:!0,exclusiveFilters:!1});M(this,"apply",e=>{this._items=e.map((s,i)=>({...s,id:`item-${i}`})),this._fuse=new W(this._items,{minMatchCharLength:3,threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...this.config.fuseConfig}),this.config.filterProperties.forEach(s=>{const i={};this._items.forEach(n=>{Array.isArray(n[s])?n[s].forEach(o=>{i[o]=void 0}):i[n[s]]=void 0}),this._filters[s]=i}),this.config.matchAllWhenEmpty!==!1&&(this._results=this.sortResults(this._items),this.requestUpdate()),this.config.aggregateResults&&(this._resultAggregation=[...new Set(this._items.reduce((s,i)=>s.concat(i[this.config.aggregateResults]),[]))].sort())})}search(e="",s=this._filters){const i=Object.entries(s).reduce((o,[c,l])=>{const h=u=>{const a={};a[c]=`="${u}"`,o.push(a)};return Object.entries(l).filter(([u,a])=>a).forEach(([u,a])=>h(u)),o},[]);let n;if(!(e.length>2)&&!i.length&&this.config.matchAllWhenEmpty!==!1)n=this._items;else{const o={...e.length>2&&i.length?{$and:[...this.config.fuseConfig.keys.map(l=>({[l]:e})),{$or:i}]}:{$or:[...this.config.fuseConfig.keys.map(l=>({[l]:e})),{$or:i}]}},c=this._fuse.search(o);n=this.config.enableHighlighting?us(c,"highlight",this.config.titleProperty):c.map(l=>l.item)}this._results=this.sortResults(n),this.requestUpdate()}aggregateResults(e,s){return e.filter(i=>{const n=i[this.config.aggregateResults];return Array.isArray(n)?n.includes(s):n===s})}sortResults(e){return[...e].sort((s,i)=>s[this.config.titleProperty]<i[this.config.titleProperty]?-1:1)}toggleFilter(e,s){this.config.exclusiveFilters===!0&&Object.keys(this._filters).forEach(n=>{Object.keys(this._filters[n]).forEach(o=>{this._filters[n][o]=!1})}),this._filters[e][s]=!this._filters[e][s],this.search();const i=this.renderRoot.querySelectorAll("ul#results input[type='radio']");for(let n=0;n<i.length;n++)i[n].checked=!1;setTimeout(()=>{const n=this.renderRoot.querySelector(`#${this._selectedResult.id}`);n&&(n.checked=!0,this.requestUpdate())})}render(){return T`
165
+ `;var fs=Object.defineProperty,ps=Object.getOwnPropertyDescriptor,H=(r,t,e,s)=>{for(var i=s>1?void 0:s?ps(t,e):t,n=r.length-1,o;n>=0;n--)(o=r[n])&&(i=(s?o(t,e,i):o(i))||i);return s&&i&&fs(t,e,i),i};_.EOxItemFilter=class extends Z{constructor(){super(...arguments);M(this,"_fuse");M(this,"_resultAggregation",[]);M(this,"_items",[]);M(this,"_results",[]);M(this,"_filters",{});M(this,"_selectedResult");M(this,"config",{titleProperty:"title",filterProperties:["themes"],aggregateResults:"themes",fuseConfig:{},enableSearch:!0,enableHighlighting:!1,onSelect:()=>{},matchAllWhenEmpty:!0,exclusiveFilters:!1});M(this,"apply",e=>{this._items=e.map((s,i)=>({...s,id:`item-${i}`})),this._fuse=new W(this._items,{minMatchCharLength:3,threshold:.4,distance:50,includeMatches:!0,useExtendedSearch:!0,...this.config.fuseConfig}),this.config.filterProperties.forEach(s=>{const i={};this._items.forEach(n=>{Array.isArray(n[s])?n[s].forEach(o=>{i[o]=void 0}):i[n[s]]=void 0}),this._filters[s]=i}),this.config.matchAllWhenEmpty!==!1&&(this._results=this.sortResults(this._items),this.requestUpdate()),this.config.aggregateResults&&(this._resultAggregation=[...new Set(this._items.reduce((s,i)=>s.concat(i[this.config.aggregateResults]),[]))].sort())})}search(e="",s=this._filters){const i=Object.entries(s).reduce((o,[c,l])=>{const h=u=>{const a={};a[c]=`="${u}"`,o.push(a)};return Object.entries(l).filter(([u,a])=>a).forEach(([u,a])=>h(u)),o},[]);let n;if(!(e.length>2)&&!i.length&&this.config.matchAllWhenEmpty!==!1)n=this._items;else{const o={...e.length>2&&i.length?{$and:[{$or:[...this.config.fuseConfig.keys.map(l=>({[l]:e}))]},{$or:i}]}:{$or:[...this.config.fuseConfig.keys.map(l=>({[l]:e})),{$or:i}]}},c=this._fuse.search(o);n=this.config.enableHighlighting?us(c,"highlight",this.config.titleProperty):c.map(l=>l.item)}this._results=this.sortResults(n),this.requestUpdate()}aggregateResults(e,s){return e.filter(i=>{const n=i[this.config.aggregateResults],o=Object.keys(this._filters[this.config.aggregateResults]).filter(l=>this._filters[this.config.aggregateResults][l]);return(o.length?o.includes(s):!0)&&Array.isArray(n)?n.includes(s):n===s})}sortResults(e){return[...e].sort((s,i)=>s[this.config.titleProperty]<i[this.config.titleProperty]?-1:1)}toggleFilter(e,s){this.config.exclusiveFilters===!0&&Object.keys(this._filters).forEach(o=>{Object.keys(this._filters[o]).forEach(c=>{this._filters[o][c]=!1})}),this._filters[e][s]=!this._filters[e][s];const i=this.renderRoot.querySelector('input[type="text"]');i?this.search(i.value):this.search();const n=this.renderRoot.querySelectorAll("ul#results input[type='radio']");for(let o=0;o<n.length;o++)n[o].checked=!1;this._selectedResult&&setTimeout(()=>{const o=this.renderRoot.querySelector(`#${this._selectedResult.id}`);o&&(o.checked=!0,this.requestUpdate())})}resetFilters(){this.renderRoot.querySelectorAll("#details-filter input").forEach(s=>{s.checked=!1});const e=this.renderRoot.querySelector('input[type="text"]');e&&(e.value=""),Object.keys(this._filters).forEach(s=>{Object.keys(this._filters[s]).forEach(i=>{this._filters[s][i]=!1})}),this.search(),this.requestUpdate()}render(){return N`
163
166
  <style>
164
167
  ${ds}
165
168
  </style>
@@ -175,7 +178,7 @@ ul#results li {
175
178
  <section>
176
179
  <slot name="filterstitle"></slot>
177
180
  <ul id="filters">
178
- ${q(this.config.filterProperties,e=>T`
181
+ ${q(this.config.filterProperties,e=>N`
179
182
  <details
180
183
  id="details-filter"
181
184
  data-filter="${e}"
@@ -199,7 +202,7 @@ ul#results li {
199
202
  </summary>
200
203
  <div class="scroll" style="max-height: 150px">
201
204
  <ul>
202
- ${this._filters[e]?q(Object.keys(this._filters[e]).sort(),s=>T`
205
+ ${this._filters[e]?q(Object.keys(this._filters[e]).sort(),s=>N`
203
206
  <li>
204
207
  <label>
205
208
  <input
@@ -217,15 +220,18 @@ ul#results li {
217
220
  </details>
218
221
  `)}
219
222
  </ul>
223
+ <a id="filter-reset" @click=${()=>this.resetFilters()}
224
+ ><small>Reset filters</small></a
225
+ >
220
226
  </section>
221
227
  <section id="section-results">
222
228
  <div>
223
229
  <slot name="resultstitle"></slot>
224
230
  </div>
225
231
  <div id="container-results" class="scroll">
226
- ${this._results.length<1?T` <small class="no-results">No matching items</small> `:m}
232
+ ${this._results.length<1?N` <small class="no-results">No matching items</small> `:m}
227
233
  <ul id="results">
228
- ${this.config.aggregateResults?q(this._resultAggregation.filter(e=>this.aggregateResults(this._results,e).length),e=>T`<details
234
+ ${this.config.aggregateResults?q(this._resultAggregation.filter(e=>this.aggregateResults(this._results,e).length),e=>N`<details
229
235
  id="details-results"
230
236
  open
231
237
  >
@@ -245,7 +251,7 @@ ul#results li {
245
251
  >
246
252
  </summary>
247
253
  <ul>
248
- ${q(this.aggregateResults(this._results,e),s=>T`
254
+ ${q(this.aggregateResults(this._results,e),s=>N`
249
255
  <li>
250
256
  <label>
251
257
  <input
@@ -261,7 +267,7 @@ ul#results li {
261
267
  </li>
262
268
  `)}
263
269
  </ul>
264
- </details>`):q(this._results,e=>T`<li>
270
+ </details>`):q(this._results,e=>N`<li>
265
271
  ${Vt(e[this.config.titleProperty])}
266
272
  </li>`)}
267
273
  </ul>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/itemfilter",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "devDependencies": {
6
6
  "@eox/eslint-config": "^1.0.0",
@@ -11,7 +11,7 @@ describe("Item Filter", () => {
11
11
  const EOxItemFilter = <EOxItemFilter>$el[0];
12
12
  EOxItemFilter.config = {
13
13
  titleProperty: "title",
14
- filterProperties: ["themes", "code", "description"],
14
+ filterProperties: ["themes"],
15
15
  aggregateResults: "themes",
16
16
  enableSearch: true,
17
17
  enableHighlighting: true,