@eox/itemfilter 0.4.0 → 0.5.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.
@@ -1,235 +1,235 @@
1
- var _e = Object.defineProperty;
2
- var ye = (i, t, e) => t in i ? _e(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var m = (i, t, e) => (ye(i, typeof t != "symbol" ? t + "" : t, e), e);
1
+ var Or = Object.defineProperty;
2
+ var Lr = (i, e, t) => e in i ? Or(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var Z = (i, e, t) => (Lr(i, typeof e != "symbol" ? e + "" : e, t), t);
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2019 Google LLC
7
7
  * SPDX-License-Identifier: BSD-3-Clause
8
8
  */
9
- const rt = window, kt = rt.ShadowRoot && (rt.ShadyCSS === void 0 || rt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ie = Symbol(), Pt = /* @__PURE__ */ new WeakMap();
10
- let $e = class {
11
- constructor(t, e, s) {
12
- if (this._$cssResult$ = !0, s !== ie)
9
+ const kt = window, Ms = kt.ShadowRoot && (kt.ShadyCSS === void 0 || kt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, yi = Symbol(), Gs = /* @__PURE__ */ new WeakMap();
10
+ let Tr = class {
11
+ constructor(e, t, s) {
12
+ if (this._$cssResult$ = !0, s !== yi)
13
13
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
14
- this.cssText = t, this.t = e;
14
+ this.cssText = e, this.t = t;
15
15
  }
16
16
  get styleSheet() {
17
- let t = this.o;
18
- const e = this.t;
19
- if (kt && t === void 0) {
20
- const s = e !== void 0 && e.length === 1;
21
- s && (t = Pt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Pt.set(e, t));
17
+ let e = this.o;
18
+ const t = this.t;
19
+ if (Ms && e === void 0) {
20
+ const s = t !== void 0 && t.length === 1;
21
+ s && (e = Gs.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && Gs.set(t, e));
22
22
  }
23
- return t;
23
+ return e;
24
24
  }
25
25
  toString() {
26
26
  return this.cssText;
27
27
  }
28
28
  };
29
- const ve = (i) => new $e(typeof i == "string" ? i : i + "", void 0, ie), Ae = (i, t) => {
30
- kt ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
31
- const s = document.createElement("style"), n = rt.litNonce;
32
- n !== void 0 && s.setAttribute("nonce", n), s.textContent = e.cssText, i.appendChild(s);
29
+ const Dr = (i) => new Tr(typeof i == "string" ? i : i + "", void 0, yi), Rr = (i, e) => {
30
+ Ms ? i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet) : e.forEach((t) => {
31
+ const s = document.createElement("style"), r = kt.litNonce;
32
+ r !== void 0 && s.setAttribute("nonce", r), s.textContent = t.cssText, i.appendChild(s);
33
33
  });
34
- }, jt = kt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
35
- let e = "";
36
- for (const s of t.cssRules)
37
- e += s.cssText;
38
- return ve(e);
34
+ }, Zs = Ms ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
35
+ let t = "";
36
+ for (const s of e.cssRules)
37
+ t += s.cssText;
38
+ return Dr(t);
39
39
  })(i) : i;
40
40
  /**
41
41
  * @license
42
42
  * Copyright 2017 Google LLC
43
43
  * SPDX-License-Identifier: BSD-3-Clause
44
44
  */
45
- var dt;
46
- const ot = window, Ht = ot.trustedTypes, Ee = Ht ? Ht.emptyScript : "", Ut = ot.reactiveElementPolyfillSupport, At = { toAttribute(i, t) {
47
- switch (t) {
45
+ var os;
46
+ const Ct = window, Qs = Ct.trustedTypes, Pr = Qs ? Qs.emptyScript : "", ei = Ct.reactiveElementPolyfillSupport, gs = { toAttribute(i, e) {
47
+ switch (e) {
48
48
  case Boolean:
49
- i = i ? Ee : null;
49
+ i = i ? Pr : null;
50
50
  break;
51
51
  case Object:
52
52
  case Array:
53
53
  i = i == null ? i : JSON.stringify(i);
54
54
  }
55
55
  return i;
56
- }, fromAttribute(i, t) {
57
- let e = i;
58
- switch (t) {
56
+ }, fromAttribute(i, e) {
57
+ let t = i;
58
+ switch (e) {
59
59
  case Boolean:
60
- e = i !== null;
60
+ t = i !== null;
61
61
  break;
62
62
  case Number:
63
- e = i === null ? null : Number(i);
63
+ t = i === null ? null : Number(i);
64
64
  break;
65
65
  case Object:
66
66
  case Array:
67
67
  try {
68
- e = JSON.parse(i);
68
+ t = JSON.parse(i);
69
69
  } catch {
70
- e = null;
70
+ t = null;
71
71
  }
72
72
  }
73
- return e;
74
- } }, ne = (i, t) => t !== i && (t == t || i == i), ft = { attribute: !0, type: String, converter: At, reflect: !1, hasChanged: ne };
75
- let B = class extends HTMLElement {
73
+ return t;
74
+ } }, bi = (i, e) => e !== i && (e == e || i == i), ls = { attribute: !0, type: String, converter: gs, reflect: !1, hasChanged: bi }, vs = "finalized";
75
+ let Qe = 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();
78
78
  }
79
- static addInitializer(t) {
80
- var e;
81
- this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
79
+ static addInitializer(e) {
80
+ var t;
81
+ this.finalize(), ((t = this.h) !== null && t !== void 0 ? t : this.h = []).push(e);
82
82
  }
83
83
  static get observedAttributes() {
84
84
  this.finalize();
85
- const t = [];
86
- return this.elementProperties.forEach((e, s) => {
87
- const n = this._$Ep(s, e);
88
- n !== void 0 && (this._$Ev.set(n, s), t.push(n));
89
- }), t;
90
- }
91
- static createProperty(t, e = ft) {
92
- if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
93
- const s = typeof t == "symbol" ? Symbol() : "__" + t, n = this.getPropertyDescriptor(t, s, e);
94
- n !== void 0 && Object.defineProperty(this.prototype, t, n);
85
+ const e = [];
86
+ return this.elementProperties.forEach((t, s) => {
87
+ const r = this._$Ep(s, t);
88
+ r !== void 0 && (this._$Ev.set(r, s), e.push(r));
89
+ }), e;
90
+ }
91
+ static createProperty(e, t = ls) {
92
+ if (t.state && (t.attribute = !1), this.finalize(), this.elementProperties.set(e, t), !t.noAccessor && !this.prototype.hasOwnProperty(e)) {
93
+ const s = typeof e == "symbol" ? Symbol() : "__" + e, r = this.getPropertyDescriptor(e, s, t);
94
+ r !== void 0 && Object.defineProperty(this.prototype, e, r);
95
95
  }
96
96
  }
97
- static getPropertyDescriptor(t, e, s) {
97
+ static getPropertyDescriptor(e, t, s) {
98
98
  return { get() {
99
- return this[e];
100
- }, set(n) {
101
- const r = this[t];
102
- this[e] = n, this.requestUpdate(t, r, s);
99
+ return this[t];
100
+ }, set(r) {
101
+ const o = this[e];
102
+ this[t] = r, this.requestUpdate(e, o, s);
103
103
  }, configurable: !0, enumerable: !0 };
104
104
  }
105
- static getPropertyOptions(t) {
106
- return this.elementProperties.get(t) || ft;
105
+ static getPropertyOptions(e) {
106
+ return this.elementProperties.get(e) || ls;
107
107
  }
108
108
  static finalize() {
109
- if (this.hasOwnProperty("finalized"))
109
+ if (this.hasOwnProperty(vs))
110
110
  return !1;
111
- this.finalized = !0;
112
- const t = Object.getPrototypeOf(this);
113
- if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
114
- const e = this.properties, s = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
115
- for (const n of s)
116
- this.createProperty(n, e[n]);
111
+ this[vs] = !0;
112
+ const e = Object.getPrototypeOf(this);
113
+ if (e.finalize(), e.h !== void 0 && (this.h = [...e.h]), this.elementProperties = new Map(e.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
114
+ const t = this.properties, s = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
115
+ for (const r of s)
116
+ this.createProperty(r, t[r]);
117
117
  }
118
118
  return this.elementStyles = this.finalizeStyles(this.styles), !0;
119
119
  }
120
- static finalizeStyles(t) {
121
- const e = [];
122
- if (Array.isArray(t)) {
123
- const s = new Set(t.flat(1 / 0).reverse());
124
- for (const n of s)
125
- e.unshift(jt(n));
120
+ static finalizeStyles(e) {
121
+ const t = [];
122
+ if (Array.isArray(e)) {
123
+ const s = new Set(e.flat(1 / 0).reverse());
124
+ for (const r of s)
125
+ t.unshift(Zs(r));
126
126
  } else
127
- t !== void 0 && e.push(jt(t));
128
- return e;
127
+ e !== void 0 && t.push(Zs(e));
128
+ return t;
129
129
  }
130
- static _$Ep(t, e) {
131
- const s = e.attribute;
132
- return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
130
+ static _$Ep(e, t) {
131
+ const s = t.attribute;
132
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof e == "string" ? e.toLowerCase() : void 0;
133
133
  }
134
134
  u() {
135
- var t;
136
- this._$E_ = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((e) => e(this));
135
+ var e;
136
+ this._$E_ = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (e = this.constructor.h) === null || e === void 0 || e.forEach((t) => t(this));
137
137
  }
138
- addController(t) {
139
- var e, s;
140
- ((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));
138
+ addController(e) {
139
+ var t, s;
140
+ ((t = this._$ES) !== null && t !== void 0 ? t : this._$ES = []).push(e), this.renderRoot !== void 0 && this.isConnected && ((s = e.hostConnected) === null || s === void 0 || s.call(e));
141
141
  }
142
- removeController(t) {
143
- var e;
144
- (e = this._$ES) === null || e === void 0 || e.splice(this._$ES.indexOf(t) >>> 0, 1);
142
+ removeController(e) {
143
+ var t;
144
+ (t = this._$ES) === null || t === void 0 || t.splice(this._$ES.indexOf(e) >>> 0, 1);
145
145
  }
146
146
  _$Eg() {
147
- this.constructor.elementProperties.forEach((t, e) => {
148
- this.hasOwnProperty(e) && (this._$Ei.set(e, this[e]), delete this[e]);
147
+ this.constructor.elementProperties.forEach((e, t) => {
148
+ this.hasOwnProperty(t) && (this._$Ei.set(t, this[t]), delete this[t]);
149
149
  });
150
150
  }
151
151
  createRenderRoot() {
152
- var t;
153
- const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
154
- return Ae(e, this.constructor.elementStyles), e;
152
+ var e;
153
+ const t = (e = this.shadowRoot) !== null && e !== void 0 ? e : this.attachShadow(this.constructor.shadowRootOptions);
154
+ return Rr(t, this.constructor.elementStyles), t;
155
155
  }
156
156
  connectedCallback() {
157
- var t;
158
- this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
157
+ var e;
158
+ this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$ES) === null || e === void 0 || e.forEach((t) => {
159
159
  var s;
160
- return (s = e.hostConnected) === null || s === void 0 ? void 0 : s.call(e);
160
+ return (s = t.hostConnected) === null || s === void 0 ? void 0 : s.call(t);
161
161
  });
162
162
  }
163
- enableUpdating(t) {
163
+ enableUpdating(e) {
164
164
  }
165
165
  disconnectedCallback() {
166
- var t;
167
- (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
166
+ var e;
167
+ (e = this._$ES) === null || e === void 0 || e.forEach((t) => {
168
168
  var s;
169
- return (s = e.hostDisconnected) === null || s === void 0 ? void 0 : s.call(e);
169
+ return (s = t.hostDisconnected) === null || s === void 0 ? void 0 : s.call(t);
170
170
  });
171
171
  }
172
- attributeChangedCallback(t, e, s) {
173
- this._$AK(t, s);
172
+ attributeChangedCallback(e, t, s) {
173
+ this._$AK(e, s);
174
174
  }
175
- _$EO(t, e, s = ft) {
176
- var n;
177
- const r = this.constructor._$Ep(t, s);
178
- if (r !== void 0 && s.reflect === !0) {
179
- const o = (((n = s.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? s.converter : At).toAttribute(e, s.type);
180
- this._$El = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$El = null;
175
+ _$EO(e, t, s = ls) {
176
+ var r;
177
+ const o = this.constructor._$Ep(e, s);
178
+ if (o !== void 0 && s.reflect === !0) {
179
+ const l = (((r = s.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? s.converter : gs).toAttribute(t, s.type);
180
+ this._$El = e, l == null ? this.removeAttribute(o) : this.setAttribute(o, l), this._$El = null;
181
181
  }
182
182
  }
183
- _$AK(t, e) {
183
+ _$AK(e, t) {
184
184
  var s;
185
- const n = this.constructor, r = n._$Ev.get(t);
186
- if (r !== void 0 && this._$El !== r) {
187
- const o = n.getPropertyOptions(r), c = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? o.converter : At;
188
- this._$El = r, this[r] = c.fromAttribute(e, o.type), this._$El = null;
185
+ const r = this.constructor, o = r._$Ev.get(e);
186
+ if (o !== void 0 && this._$El !== o) {
187
+ const l = r.getPropertyOptions(o), c = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((s = l.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? l.converter : gs;
188
+ this._$El = o, this[o] = c.fromAttribute(t, l.type), this._$El = null;
189
189
  }
190
190
  }
191
- requestUpdate(t, e, s) {
192
- let n = !0;
193
- t !== void 0 && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || ne)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, s))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
191
+ requestUpdate(e, t, s) {
192
+ let r = !0;
193
+ e !== void 0 && (((s = s || this.constructor.getPropertyOptions(e)).hasChanged || bi)(this[e], t) ? (this._$AL.has(e) || this._$AL.set(e, t), s.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, s))) : r = !1), !this.isUpdatePending && r && (this._$E_ = this._$Ej());
194
194
  }
195
195
  async _$Ej() {
196
196
  this.isUpdatePending = !0;
197
197
  try {
198
198
  await this._$E_;
199
- } catch (e) {
200
- Promise.reject(e);
199
+ } catch (t) {
200
+ Promise.reject(t);
201
201
  }
202
- const t = this.scheduleUpdate();
203
- return t != null && await t, !this.isUpdatePending;
202
+ const e = this.scheduleUpdate();
203
+ return e != null && await e, !this.isUpdatePending;
204
204
  }
205
205
  scheduleUpdate() {
206
206
  return this.performUpdate();
207
207
  }
208
208
  performUpdate() {
209
- var t;
209
+ var e;
210
210
  if (!this.isUpdatePending)
211
211
  return;
212
- this.hasUpdated, this._$Ei && (this._$Ei.forEach((n, r) => this[r] = n), this._$Ei = void 0);
213
- let e = !1;
212
+ this.hasUpdated, this._$Ei && (this._$Ei.forEach((r, o) => this[o] = r), this._$Ei = void 0);
213
+ let t = !1;
214
214
  const s = this._$AL;
215
215
  try {
216
- e = this.shouldUpdate(s), e ? (this.willUpdate(s), (t = this._$ES) === null || t === void 0 || t.forEach((n) => {
217
- var r;
218
- return (r = n.hostUpdate) === null || r === void 0 ? void 0 : r.call(n);
216
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), (e = this._$ES) === null || e === void 0 || e.forEach((r) => {
217
+ var o;
218
+ return (o = r.hostUpdate) === null || o === void 0 ? void 0 : o.call(r);
219
219
  }), this.update(s)) : this._$Ek();
220
- } catch (n) {
221
- throw e = !1, this._$Ek(), n;
220
+ } catch (r) {
221
+ throw t = !1, this._$Ek(), r;
222
222
  }
223
- e && this._$AE(s);
223
+ t && this._$AE(s);
224
224
  }
225
- willUpdate(t) {
225
+ willUpdate(e) {
226
226
  }
227
- _$AE(t) {
228
- var e;
229
- (e = this._$ES) === null || e === void 0 || e.forEach((s) => {
230
- var n;
231
- return (n = s.hostUpdated) === null || n === void 0 ? void 0 : n.call(s);
232
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
227
+ _$AE(e) {
228
+ var t;
229
+ (t = this._$ES) === null || t === void 0 || t.forEach((s) => {
230
+ var r;
231
+ return (r = s.hostUpdated) === null || r === void 0 ? void 0 : r.call(s);
232
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
233
233
  }
234
234
  _$Ek() {
235
235
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
@@ -240,104 +240,104 @@ let B = class extends HTMLElement {
240
240
  getUpdateComplete() {
241
241
  return this._$E_;
242
242
  }
243
- shouldUpdate(t) {
243
+ shouldUpdate(e) {
244
244
  return !0;
245
245
  }
246
- update(t) {
247
- this._$EC !== void 0 && (this._$EC.forEach((e, s) => this._$EO(s, this[s], e)), this._$EC = void 0), this._$Ek();
246
+ update(e) {
247
+ this._$EC !== void 0 && (this._$EC.forEach((t, s) => this._$EO(s, this[s], t)), this._$EC = void 0), this._$Ek();
248
248
  }
249
- updated(t) {
249
+ updated(e) {
250
250
  }
251
- firstUpdated(t) {
251
+ firstUpdated(e) {
252
252
  }
253
253
  };
254
- B.finalized = !0, B.elementProperties = /* @__PURE__ */ new Map(), B.elementStyles = [], B.shadowRootOptions = { mode: "open" }, Ut == null || Ut({ ReactiveElement: B }), ((dt = ot.reactiveElementVersions) !== null && dt !== void 0 ? dt : ot.reactiveElementVersions = []).push("1.6.1");
254
+ Qe[vs] = !0, Qe.elementProperties = /* @__PURE__ */ new Map(), Qe.elementStyles = [], Qe.shadowRootOptions = { mode: "open" }, ei == null || ei({ ReactiveElement: Qe }), ((os = Ct.reactiveElementVersions) !== null && os !== void 0 ? os : Ct.reactiveElementVersions = []).push("1.6.2");
255
255
  /**
256
256
  * @license
257
257
  * Copyright 2017 Google LLC
258
258
  * SPDX-License-Identifier: BSD-3-Clause
259
259
  */
260
- var pt;
261
- const lt = window, W = lt.trustedTypes, Ft = W ? W.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Et = "$lit$", O = `lit$${(Math.random() + "").slice(9)}$`, re = "?" + O, be = `<${re}>`, H = document, Z = () => H.createComment(""), q = (i) => i === null || typeof i != "object" && typeof i != "function", oe = Array.isArray, xe = (i) => oe(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", gt = `[
262
- \f\r]`, Y = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Dt = /-->/g, zt = />/g, N = RegExp(`>|${gt}(?:([^\\s"'>=/]+)(${gt}*=${gt}*(?:[^
263
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Bt = /'/g, Wt = /"/g, le = /^(?:script|style|textarea|title)$/i, Se = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), x = Se(1), U = Symbol.for("lit-noChange"), _ = Symbol.for("lit-nothing"), Vt = /* @__PURE__ */ new WeakMap(), j = H.createTreeWalker(H, 129, null, !1), we = (i, t) => {
264
- const e = i.length - 1, s = [];
265
- let n, r = t === 2 ? "<svg>" : "", o = Y;
266
- for (let l = 0; l < e; l++) {
267
- const a = i[l];
268
- let u, h, d = -1, p = 0;
269
- for (; p < a.length && (o.lastIndex = p, h = o.exec(a), h !== null); )
270
- p = o.lastIndex, o === Y ? h[1] === "!--" ? o = Dt : h[1] !== void 0 ? o = zt : h[2] !== void 0 ? (le.test(h[2]) && (n = RegExp("</" + h[2], "g")), o = N) : h[3] !== void 0 && (o = N) : o === N ? h[0] === ">" ? (o = n ?? Y, d = -1) : h[1] === void 0 ? d = -2 : (d = o.lastIndex - h[2].length, u = h[1], o = h[3] === void 0 ? N : h[3] === '"' ? Wt : Bt) : o === Wt || o === Bt ? o = N : o === Dt || o === zt ? o = Y : (o = N, n = void 0);
271
- const g = o === N && i[l + 1].startsWith("/>") ? " " : "";
272
- r += o === Y ? a + be : d >= 0 ? (s.push(u), a.slice(0, d) + Et + a.slice(d) + O + g) : a + O + (d === -2 ? (s.push(void 0), l) : g);
273
- }
274
- const c = r + (i[e] || "<?>") + (t === 2 ? "</svg>" : "");
260
+ var as;
261
+ const Ot = window, et = Ot.trustedTypes, ti = et ? et.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ms = "$lit$", Ne = `lit$${(Math.random() + "").slice(9)}$`, $i = "?" + Ne, Ir = `<${$i}>`, Ve = document, ct = () => Ve.createComment(""), ut = (i) => i === null || typeof i != "object" && typeof i != "function", _i = Array.isArray, Nr = (i) => _i(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", hs = `[
262
+ \f\r]`, ot = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, si = /-->/g, ii = />/g, Be = RegExp(`>|${hs}(?:([^\\s"'>=/]+)(${hs}*=${hs}*(?:[^
263
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ri = /'/g, ni = /"/g, xi = /^(?:script|style|textarea|title)$/i, jr = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), ge = jr(1), Ye = Symbol.for("lit-noChange"), te = Symbol.for("lit-nothing"), oi = /* @__PURE__ */ new WeakMap(), We = Ve.createTreeWalker(Ve, 129, null, !1), Hr = (i, e) => {
264
+ const t = i.length - 1, s = [];
265
+ let r, o = e === 2 ? "<svg>" : "", l = ot;
266
+ for (let u = 0; u < t; u++) {
267
+ const d = i[u];
268
+ let m, v, $ = -1, E = 0;
269
+ for (; E < d.length && (l.lastIndex = E, v = l.exec(d), v !== null); )
270
+ E = l.lastIndex, l === ot ? v[1] === "!--" ? l = si : v[1] !== void 0 ? l = ii : v[2] !== void 0 ? (xi.test(v[2]) && (r = RegExp("</" + v[2], "g")), l = Be) : v[3] !== void 0 && (l = Be) : l === Be ? v[0] === ">" ? (l = r ?? ot, $ = -1) : v[1] === void 0 ? $ = -2 : ($ = l.lastIndex - v[2].length, m = v[1], l = v[3] === void 0 ? Be : v[3] === '"' ? ni : ri) : l === ni || l === ri ? l = Be : l === si || l === ii ? l = ot : (l = Be, r = void 0);
271
+ const j = l === Be && i[u + 1].startsWith("/>") ? " " : "";
272
+ o += l === ot ? d + Ir : $ >= 0 ? (s.push(m), d.slice(0, $) + ms + d.slice($) + Ne + j) : d + Ne + ($ === -2 ? (s.push(void 0), u) : j);
273
+ }
274
+ const c = o + (i[t] || "<?>") + (e === 2 ? "</svg>" : "");
275
275
  if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
276
276
  throw Error("invalid template strings array");
277
- return [Ft !== void 0 ? Ft.createHTML(c) : c, s];
277
+ return [ti !== void 0 ? ti.createHTML(c) : c, s];
278
278
  };
279
- class tt {
280
- constructor({ strings: t, _$litType$: e }, s) {
281
- let n;
279
+ class dt {
280
+ constructor({ strings: e, _$litType$: t }, s) {
281
+ let r;
282
282
  this.parts = [];
283
- let r = 0, o = 0;
284
- const c = t.length - 1, l = this.parts, [a, u] = we(t, e);
285
- if (this.el = tt.createElement(a, s), j.currentNode = this.el.content, e === 2) {
286
- const h = this.el.content, d = h.firstChild;
287
- d.remove(), h.append(...d.childNodes);
288
- }
289
- for (; (n = j.nextNode()) !== null && l.length < c; ) {
290
- if (n.nodeType === 1) {
291
- if (n.hasAttributes()) {
292
- const h = [];
293
- for (const d of n.getAttributeNames())
294
- if (d.endsWith(Et) || d.startsWith(O)) {
295
- const p = u[o++];
296
- if (h.push(d), p !== void 0) {
297
- const g = n.getAttribute(p.toLowerCase() + Et).split(O), v = /([.?@])?(.*)/.exec(p);
298
- l.push({ type: 1, index: r, name: v[2], strings: g, ctor: v[1] === "." ? Ce : v[1] === "?" ? Ie : v[1] === "@" ? ke : at });
283
+ let o = 0, l = 0;
284
+ const c = e.length - 1, u = this.parts, [d, m] = Hr(e, t);
285
+ if (this.el = dt.createElement(d, s), We.currentNode = this.el.content, t === 2) {
286
+ const v = this.el.content, $ = v.firstChild;
287
+ $.remove(), v.append(...$.childNodes);
288
+ }
289
+ for (; (r = We.nextNode()) !== null && u.length < c; ) {
290
+ if (r.nodeType === 1) {
291
+ if (r.hasAttributes()) {
292
+ const v = [];
293
+ for (const $ of r.getAttributeNames())
294
+ if ($.endsWith(ms) || $.startsWith(Ne)) {
295
+ const E = m[l++];
296
+ if (v.push($), E !== void 0) {
297
+ const j = r.getAttribute(E.toLowerCase() + ms).split(Ne), G = /([.?@])?(.*)/.exec(E);
298
+ u.push({ type: 1, index: o, name: G[2], strings: j, ctor: G[1] === "." ? Fr : G[1] === "?" ? zr : G[1] === "@" ? Wr : Tt });
299
299
  } else
300
- l.push({ type: 6, index: r });
300
+ u.push({ type: 6, index: o });
301
301
  }
302
- for (const d of h)
303
- n.removeAttribute(d);
302
+ for (const $ of v)
303
+ r.removeAttribute($);
304
304
  }
305
- if (le.test(n.tagName)) {
306
- const h = n.textContent.split(O), d = h.length - 1;
307
- if (d > 0) {
308
- n.textContent = W ? W.emptyScript : "";
309
- for (let p = 0; p < d; p++)
310
- n.append(h[p], Z()), j.nextNode(), l.push({ type: 2, index: ++r });
311
- n.append(h[d], Z());
305
+ if (xi.test(r.tagName)) {
306
+ const v = r.textContent.split(Ne), $ = v.length - 1;
307
+ if ($ > 0) {
308
+ r.textContent = et ? et.emptyScript : "";
309
+ for (let E = 0; E < $; E++)
310
+ r.append(v[E], ct()), We.nextNode(), u.push({ type: 2, index: ++o });
311
+ r.append(v[$], ct());
312
312
  }
313
313
  }
314
- } else if (n.nodeType === 8)
315
- if (n.data === re)
316
- l.push({ type: 2, index: r });
314
+ } else if (r.nodeType === 8)
315
+ if (r.data === $i)
316
+ u.push({ type: 2, index: o });
317
317
  else {
318
- let h = -1;
319
- for (; (h = n.data.indexOf(O, h + 1)) !== -1; )
320
- l.push({ type: 7, index: r }), h += O.length - 1;
318
+ let v = -1;
319
+ for (; (v = r.data.indexOf(Ne, v + 1)) !== -1; )
320
+ u.push({ type: 7, index: o }), v += Ne.length - 1;
321
321
  }
322
- r++;
322
+ o++;
323
323
  }
324
324
  }
325
- static createElement(t, e) {
326
- const s = H.createElement("template");
327
- return s.innerHTML = t, s;
325
+ static createElement(e, t) {
326
+ const s = Ve.createElement("template");
327
+ return s.innerHTML = e, s;
328
328
  }
329
329
  }
330
- function V(i, t, e = i, s) {
331
- var n, r, o, c;
332
- if (t === U)
333
- return t;
334
- let l = s !== void 0 ? (n = e._$Co) === null || n === void 0 ? void 0 : n[s] : e._$Cl;
335
- const a = q(t) ? void 0 : t._$litDirective$;
336
- return (l == null ? void 0 : l.constructor) !== a && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), a === void 0 ? l = void 0 : (l = new a(i), l._$AT(i, 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 = V(i, l._$AS(i, t.values), l, s)), t;
330
+ function tt(i, e, t = i, s) {
331
+ var r, o, l, c;
332
+ if (e === Ye)
333
+ return e;
334
+ let u = s !== void 0 ? (r = t._$Co) === null || r === void 0 ? void 0 : r[s] : t._$Cl;
335
+ const d = ut(e) ? void 0 : e._$litDirective$;
336
+ return (u == null ? void 0 : u.constructor) !== d && ((o = u == null ? void 0 : u._$AO) === null || o === void 0 || o.call(u, !1), d === void 0 ? u = void 0 : (u = new d(i), u._$AT(i, t, s)), s !== void 0 ? ((l = (c = t)._$Co) !== null && l !== void 0 ? l : c._$Co = [])[s] = u : t._$Cl = u), u !== void 0 && (e = tt(i, u._$AS(i, e.values), u, s)), e;
337
337
  }
338
- class Me {
339
- constructor(t, e) {
340
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
338
+ class Ur {
339
+ constructor(e, t) {
340
+ this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
341
341
  }
342
342
  get parentNode() {
343
343
  return this._$AM.parentNode;
@@ -345,39 +345,39 @@ class Me {
345
345
  get _$AU() {
346
346
  return this._$AM._$AU;
347
347
  }
348
- u(t) {
349
- var e;
350
- const { el: { content: s }, parts: n } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : H).importNode(s, !0);
351
- j.currentNode = r;
352
- let o = j.nextNode(), c = 0, l = 0, a = n[0];
353
- for (; a !== void 0; ) {
354
- if (c === a.index) {
355
- let u;
356
- a.type === 2 ? u = new et(o, o.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (u = new Oe(o, this, t)), this._$AV.push(u), a = n[++l];
348
+ u(e) {
349
+ var t;
350
+ const { el: { content: s }, parts: r } = this._$AD, o = ((t = e == null ? void 0 : e.creationScope) !== null && t !== void 0 ? t : Ve).importNode(s, !0);
351
+ We.currentNode = o;
352
+ let l = We.nextNode(), c = 0, u = 0, d = r[0];
353
+ for (; d !== void 0; ) {
354
+ if (c === d.index) {
355
+ let m;
356
+ d.type === 2 ? m = new pt(l, l.nextSibling, this, e) : d.type === 1 ? m = new d.ctor(l, d.name, d.strings, this, e) : d.type === 6 && (m = new Vr(l, this, e)), this._$AV.push(m), d = r[++u];
357
357
  }
358
- c !== (a == null ? void 0 : a.index) && (o = j.nextNode(), c++);
358
+ c !== (d == null ? void 0 : d.index) && (l = We.nextNode(), c++);
359
359
  }
360
- return j.currentNode = H, r;
360
+ return We.currentNode = Ve, o;
361
361
  }
362
- v(t) {
363
- let e = 0;
362
+ v(e) {
363
+ let t = 0;
364
364
  for (const s of this._$AV)
365
- s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
365
+ s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, t), t += s.strings.length - 2) : s._$AI(e[t])), t++;
366
366
  }
367
367
  }
368
- class et {
369
- constructor(t, e, s, n) {
370
- var r;
371
- this.type = 2, this._$AH = _, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = n, this._$Cp = (r = n == null ? void 0 : n.isConnected) === null || r === void 0 || r;
368
+ class pt {
369
+ constructor(e, t, s, r) {
370
+ var o;
371
+ this.type = 2, this._$AH = te, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = s, this.options = r, this._$Cp = (o = r == null ? void 0 : r.isConnected) === null || o === void 0 || o;
372
372
  }
373
373
  get _$AU() {
374
- var t, e;
375
- return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cp;
374
+ var e, t;
375
+ return (t = (e = this._$AM) === null || e === void 0 ? void 0 : e._$AU) !== null && t !== void 0 ? t : this._$Cp;
376
376
  }
377
377
  get parentNode() {
378
- let t = this._$AA.parentNode;
379
- const e = this._$AM;
380
- return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
378
+ let e = this._$AA.parentNode;
379
+ const t = this._$AM;
380
+ return t !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = t.parentNode), e;
381
381
  }
382
382
  get startNode() {
383
383
  return this._$AA;
@@ -385,55 +385,55 @@ class et {
385
385
  get endNode() {
386
386
  return this._$AB;
387
387
  }
388
- _$AI(t, e = this) {
389
- t = V(this, t, e), q(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) : xe(t) ? this.T(t) : this._(t);
388
+ _$AI(e, t = this) {
389
+ e = tt(this, e, t), ut(e) ? e === te || e == null || e === "" ? (this._$AH !== te && this._$AR(), this._$AH = te) : e !== this._$AH && e !== Ye && this._(e) : e._$litType$ !== void 0 ? this.g(e) : e.nodeType !== void 0 ? this.$(e) : Nr(e) ? this.T(e) : this._(e);
390
390
  }
391
- k(t) {
392
- return this._$AA.parentNode.insertBefore(t, this._$AB);
391
+ k(e) {
392
+ return this._$AA.parentNode.insertBefore(e, this._$AB);
393
393
  }
394
- $(t) {
395
- this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
394
+ $(e) {
395
+ this._$AH !== e && (this._$AR(), this._$AH = this.k(e));
396
396
  }
397
- _(t) {
398
- this._$AH !== _ && q(this._$AH) ? this._$AA.nextSibling.data = t : this.$(H.createTextNode(t)), this._$AH = t;
397
+ _(e) {
398
+ this._$AH !== te && ut(this._$AH) ? this._$AA.nextSibling.data = e : this.$(Ve.createTextNode(e)), this._$AH = e;
399
399
  }
400
- g(t) {
401
- var e;
402
- const { values: s, _$litType$: n } = t, r = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = tt.createElement(n.h, this.options)), n);
403
- if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r)
400
+ g(e) {
401
+ var t;
402
+ const { values: s, _$litType$: r } = e, o = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = dt.createElement(r.h, this.options)), r);
403
+ if (((t = this._$AH) === null || t === void 0 ? void 0 : t._$AD) === o)
404
404
  this._$AH.v(s);
405
405
  else {
406
- const o = new Me(r, this), c = o.u(this.options);
407
- o.v(s), this.$(c), this._$AH = o;
406
+ const l = new Ur(o, this), c = l.u(this.options);
407
+ l.v(s), this.$(c), this._$AH = l;
408
408
  }
409
409
  }
410
- _$AC(t) {
411
- let e = Vt.get(t.strings);
412
- return e === void 0 && Vt.set(t.strings, e = new tt(t)), e;
410
+ _$AC(e) {
411
+ let t = oi.get(e.strings);
412
+ return t === void 0 && oi.set(e.strings, t = new dt(e)), t;
413
413
  }
414
- T(t) {
415
- oe(this._$AH) || (this._$AH = [], this._$AR());
416
- const e = this._$AH;
417
- let s, n = 0;
418
- for (const r of t)
419
- n === e.length ? e.push(s = new et(this.k(Z()), this.k(Z()), this, this.options)) : s = e[n], s._$AI(r), n++;
420
- n < e.length && (this._$AR(s && s._$AB.nextSibling, n), e.length = n);
414
+ T(e) {
415
+ _i(this._$AH) || (this._$AH = [], this._$AR());
416
+ const t = this._$AH;
417
+ let s, r = 0;
418
+ for (const o of e)
419
+ r === t.length ? t.push(s = new pt(this.k(ct()), this.k(ct()), this, this.options)) : s = t[r], s._$AI(o), r++;
420
+ r < t.length && (this._$AR(s && s._$AB.nextSibling, r), t.length = r);
421
421
  }
422
- _$AR(t = this._$AA.nextSibling, e) {
422
+ _$AR(e = this._$AA.nextSibling, t) {
423
423
  var s;
424
- for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, e); t && t !== this._$AB; ) {
425
- const n = t.nextSibling;
426
- t.remove(), t = n;
424
+ for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, t); e && e !== this._$AB; ) {
425
+ const r = e.nextSibling;
426
+ e.remove(), e = r;
427
427
  }
428
428
  }
429
- setConnected(t) {
430
- var e;
431
- this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
429
+ setConnected(e) {
430
+ var t;
431
+ this._$AM === void 0 && (this._$Cp = e, (t = this._$AP) === null || t === void 0 || t.call(this, e));
432
432
  }
433
433
  }
434
- class at {
435
- constructor(t, e, s, n, r) {
436
- this.type = 1, this._$AH = _, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = _;
434
+ class Tt {
435
+ constructor(e, t, s, r, o) {
436
+ this.type = 1, this._$AH = te, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = te;
437
437
  }
438
438
  get tagName() {
439
439
  return this.element.tagName;
@@ -441,175 +441,175 @@ class at {
441
441
  get _$AU() {
442
442
  return this._$AM._$AU;
443
443
  }
444
- _$AI(t, e = this, s, n) {
445
- const r = this.strings;
446
- let o = !1;
447
- if (r === void 0)
448
- t = V(this, t, e, 0), o = !q(t) || t !== this._$AH && t !== U, o && (this._$AH = t);
444
+ _$AI(e, t = this, s, r) {
445
+ const o = this.strings;
446
+ let l = !1;
447
+ if (o === void 0)
448
+ e = tt(this, e, t, 0), l = !ut(e) || e !== this._$AH && e !== Ye, l && (this._$AH = e);
449
449
  else {
450
- const c = t;
451
- let l, a;
452
- for (t = r[0], l = 0; l < r.length - 1; l++)
453
- a = V(this, c[s + l], e, l), a === U && (a = this._$AH[l]), o || (o = !q(a) || a !== this._$AH[l]), a === _ ? t = _ : t !== _ && (t += (a ?? "") + r[l + 1]), this._$AH[l] = a;
450
+ const c = e;
451
+ let u, d;
452
+ for (e = o[0], u = 0; u < o.length - 1; u++)
453
+ d = tt(this, c[s + u], t, u), d === Ye && (d = this._$AH[u]), l || (l = !ut(d) || d !== this._$AH[u]), d === te ? e = te : e !== te && (e += (d ?? "") + o[u + 1]), this._$AH[u] = d;
454
454
  }
455
- o && !n && this.j(t);
455
+ l && !r && this.j(e);
456
456
  }
457
- j(t) {
458
- t === _ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
457
+ j(e) {
458
+ e === te ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
459
459
  }
460
460
  }
461
- class Ce extends at {
461
+ class Fr extends Tt {
462
462
  constructor() {
463
463
  super(...arguments), this.type = 3;
464
464
  }
465
- j(t) {
466
- this.element[this.name] = t === _ ? void 0 : t;
465
+ j(e) {
466
+ this.element[this.name] = e === te ? void 0 : e;
467
467
  }
468
468
  }
469
- const Re = W ? W.emptyScript : "";
470
- class Ie extends at {
469
+ const Br = et ? et.emptyScript : "";
470
+ class zr extends Tt {
471
471
  constructor() {
472
472
  super(...arguments), this.type = 4;
473
473
  }
474
- j(t) {
475
- t && t !== _ ? this.element.setAttribute(this.name, Re) : this.element.removeAttribute(this.name);
474
+ j(e) {
475
+ e && e !== te ? this.element.setAttribute(this.name, Br) : this.element.removeAttribute(this.name);
476
476
  }
477
477
  }
478
- class ke extends at {
479
- constructor(t, e, s, n, r) {
480
- super(t, e, s, n, r), this.type = 5;
478
+ class Wr extends Tt {
479
+ constructor(e, t, s, r, o) {
480
+ super(e, t, s, r, o), this.type = 5;
481
481
  }
482
- _$AI(t, e = this) {
482
+ _$AI(e, t = this) {
483
483
  var s;
484
- if ((t = (s = V(this, t, e, 0)) !== null && s !== void 0 ? s : _) === U)
484
+ if ((e = (s = tt(this, e, t, 0)) !== null && s !== void 0 ? s : te) === Ye)
485
485
  return;
486
- const n = this._$AH, r = t === _ && n !== _ || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, o = t !== _ && (n === _ || r);
487
- r && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
486
+ const r = this._$AH, o = e === te && r !== te || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, l = e !== te && (r === te || o);
487
+ o && this.element.removeEventListener(this.name, this, r), l && this.element.addEventListener(this.name, this, e), this._$AH = e;
488
488
  }
489
- handleEvent(t) {
490
- var e, s;
491
- 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);
489
+ handleEvent(e) {
490
+ var t, s;
491
+ typeof this._$AH == "function" ? this._$AH.call((s = (t = this.options) === null || t === void 0 ? void 0 : t.host) !== null && s !== void 0 ? s : this.element, e) : this._$AH.handleEvent(e);
492
492
  }
493
493
  }
494
- class Oe {
495
- constructor(t, e, s) {
496
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
494
+ class Vr {
495
+ constructor(e, t, s) {
496
+ this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s;
497
497
  }
498
498
  get _$AU() {
499
499
  return this._$AM._$AU;
500
500
  }
501
- _$AI(t) {
502
- V(this, t);
501
+ _$AI(e) {
502
+ tt(this, e);
503
503
  }
504
504
  }
505
- const Kt = lt.litHtmlPolyfillSupport;
506
- Kt == null || Kt(tt, et), ((pt = lt.litHtmlVersions) !== null && pt !== void 0 ? pt : lt.litHtmlVersions = []).push("2.7.4");
507
- const Te = (i, t, e) => {
508
- var s, n;
509
- const r = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : t;
510
- let o = r._$litPart$;
511
- if (o === void 0) {
512
- const c = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : null;
513
- r._$litPart$ = o = new et(t.insertBefore(Z(), c), c, void 0, e ?? {});
505
+ const li = Ot.litHtmlPolyfillSupport;
506
+ li == null || li(dt, pt), ((as = Ot.litHtmlVersions) !== null && as !== void 0 ? as : Ot.litHtmlVersions = []).push("2.7.4");
507
+ const Yr = (i, e, t) => {
508
+ var s, r;
509
+ const o = (s = t == null ? void 0 : t.renderBefore) !== null && s !== void 0 ? s : e;
510
+ let l = o._$litPart$;
511
+ if (l === void 0) {
512
+ const c = (r = t == null ? void 0 : t.renderBefore) !== null && r !== void 0 ? r : null;
513
+ o._$litPart$ = l = new pt(e.insertBefore(ct(), c), c, void 0, t ?? {});
514
514
  }
515
- return o._$AI(i), o;
515
+ return l._$AI(i), l;
516
516
  };
517
517
  /**
518
518
  * @license
519
519
  * Copyright 2017 Google LLC
520
520
  * SPDX-License-Identifier: BSD-3-Clause
521
521
  */
522
- var mt, _t;
523
- class Q extends B {
522
+ var cs, us;
523
+ class ht extends Qe {
524
524
  constructor() {
525
525
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
526
526
  }
527
527
  createRenderRoot() {
528
- var t, e;
528
+ var e, t;
529
529
  const s = super.createRenderRoot();
530
- return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = s.firstChild), s;
530
+ return (e = (t = this.renderOptions).renderBefore) !== null && e !== void 0 || (t.renderBefore = s.firstChild), s;
531
531
  }
532
- update(t) {
533
- const e = this.render();
534
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Te(e, this.renderRoot, this.renderOptions);
532
+ update(e) {
533
+ const t = this.render();
534
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Yr(t, this.renderRoot, this.renderOptions);
535
535
  }
536
536
  connectedCallback() {
537
- var t;
538
- super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
537
+ var e;
538
+ super.connectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!0);
539
539
  }
540
540
  disconnectedCallback() {
541
- var t;
542
- super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
541
+ var e;
542
+ super.disconnectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!1);
543
543
  }
544
544
  render() {
545
- return U;
545
+ return Ye;
546
546
  }
547
547
  }
548
- Q.finalized = !0, Q._$litElement$ = !0, (mt = globalThis.litElementHydrateSupport) === null || mt === void 0 || mt.call(globalThis, { LitElement: Q });
549
- const Gt = globalThis.litElementPolyfillSupport;
550
- Gt == null || Gt({ LitElement: Q });
551
- ((_t = globalThis.litElementVersions) !== null && _t !== void 0 ? _t : globalThis.litElementVersions = []).push("3.3.2");
548
+ ht.finalized = !0, ht._$litElement$ = !0, (cs = globalThis.litElementHydrateSupport) === null || cs === void 0 || cs.call(globalThis, { LitElement: ht });
549
+ const ai = globalThis.litElementPolyfillSupport;
550
+ ai == null || ai({ LitElement: ht });
551
+ ((us = globalThis.litElementVersions) !== null && us !== void 0 ? us : globalThis.litElementVersions = []).push("3.3.2");
552
552
  /**
553
553
  * @license
554
554
  * Copyright 2017 Google LLC
555
555
  * SPDX-License-Identifier: BSD-3-Clause
556
556
  */
557
- const Le = (i) => (t) => typeof t == "function" ? ((e, s) => (customElements.define(e, s), s))(i, t) : ((e, s) => {
558
- const { kind: n, elements: r } = s;
559
- return { kind: n, elements: r, finisher(o) {
560
- customElements.define(e, o);
557
+ const Kr = (i) => (e) => typeof e == "function" ? ((t, s) => (customElements.define(t, s), s))(i, e) : ((t, s) => {
558
+ const { kind: r, elements: o } = s;
559
+ return { kind: r, elements: o, finisher(l) {
560
+ customElements.define(t, l);
561
561
  } };
562
- })(i, t);
562
+ })(i, e);
563
563
  /**
564
564
  * @license
565
565
  * Copyright 2017 Google LLC
566
566
  * SPDX-License-Identifier: BSD-3-Clause
567
567
  */
568
- const Ne = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
569
- e.createProperty(t.key, i);
570
- } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
571
- typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
572
- }, finisher(e) {
573
- e.createProperty(t.key, i);
574
- } };
575
- function Ot(i) {
576
- return (t, e) => e !== void 0 ? ((s, n, r) => {
577
- n.constructor.createProperty(r, s);
578
- })(i, t, e) : Ne(i, t);
568
+ const qr = (i, e) => e.kind === "method" && e.descriptor && !("value" in e.descriptor) ? { ...e, finisher(t) {
569
+ t.createProperty(e.key, i);
570
+ } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: e.key, initializer() {
571
+ typeof e.initializer == "function" && (this[e.key] = e.initializer.call(this));
572
+ }, finisher(t) {
573
+ t.createProperty(e.key, i);
574
+ } }, Xr = (i, e, t) => {
575
+ e.constructor.createProperty(t, i);
576
+ };
577
+ function Dt(i) {
578
+ return (e, t) => t !== void 0 ? Xr(i, e, t) : qr(i, e);
579
579
  }
580
580
  /**
581
581
  * @license
582
582
  * Copyright 2017 Google LLC
583
583
  * SPDX-License-Identifier: BSD-3-Clause
584
584
  */
585
- function ht(i) {
586
- return Ot({ ...i, state: !0 });
585
+ function Rt(i) {
586
+ return Dt({ ...i, state: !0 });
587
587
  }
588
588
  /**
589
589
  * @license
590
590
  * Copyright 2021 Google LLC
591
591
  * SPDX-License-Identifier: BSD-3-Clause
592
592
  */
593
- var yt;
594
- ((yt = window.HTMLSlotElement) === null || yt === void 0 ? void 0 : yt.prototype.assignedElements) != null;
593
+ var ds;
594
+ ((ds = window.HTMLSlotElement) === null || ds === void 0 ? void 0 : ds.prototype.assignedElements) != null;
595
595
  /**
596
596
  * @license
597
597
  * Copyright 2021 Google LLC
598
598
  * SPDX-License-Identifier: BSD-3-Clause
599
599
  */
600
- function J(i, t, e) {
601
- return i ? t() : e == null ? void 0 : e();
600
+ function Ze(i, e, t) {
601
+ return i ? e() : t == null ? void 0 : t();
602
602
  }
603
603
  /**
604
604
  * @license
605
605
  * Copyright 2021 Google LLC
606
606
  * SPDX-License-Identifier: BSD-3-Clause
607
607
  */
608
- function* X(i, t) {
608
+ function* lt(i, e) {
609
609
  if (i !== void 0) {
610
- let e = 0;
610
+ let t = 0;
611
611
  for (const s of i)
612
- yield t(s, e++);
612
+ yield e(s, t++);
613
613
  }
614
614
  }
615
615
  /**
@@ -617,21 +617,21 @@ function* X(i, t) {
617
617
  * Copyright 2017 Google LLC
618
618
  * SPDX-License-Identifier: BSD-3-Clause
619
619
  */
620
- const Pe = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, je = (i) => (...t) => ({ _$litDirective$: i, values: t });
621
- class He {
622
- constructor(t) {
620
+ const Jr = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Gr = (i) => (...e) => ({ _$litDirective$: i, values: e });
621
+ class Zr {
622
+ constructor(e) {
623
623
  }
624
624
  get _$AU() {
625
625
  return this._$AM._$AU;
626
626
  }
627
- _$AT(t, e, s) {
628
- this._$Ct = t, this._$AM = e, this._$Ci = s;
627
+ _$AT(e, t, s) {
628
+ this._$Ct = e, this._$AM = t, this._$Ci = s;
629
629
  }
630
- _$AS(t, e) {
631
- return this.update(t, e);
630
+ _$AS(e, t) {
631
+ return this.update(e, t);
632
632
  }
633
- update(t, e) {
634
- return this.render(...e);
633
+ update(e, t) {
634
+ return this.render(...t);
635
635
  }
636
636
  }
637
637
  /**
@@ -639,78 +639,78 @@ class He {
639
639
  * Copyright 2017 Google LLC
640
640
  * SPDX-License-Identifier: BSD-3-Clause
641
641
  */
642
- class bt extends He {
643
- constructor(t) {
644
- if (super(t), this.et = _, t.type !== Pe.CHILD)
642
+ class ys extends Zr {
643
+ constructor(e) {
644
+ if (super(e), this.et = te, e.type !== Jr.CHILD)
645
645
  throw Error(this.constructor.directiveName + "() can only be used in child bindings");
646
646
  }
647
- render(t) {
648
- if (t === _ || t == null)
649
- return this.ft = void 0, this.et = t;
650
- if (t === U)
651
- return t;
652
- if (typeof t != "string")
647
+ render(e) {
648
+ if (e === te || e == null)
649
+ return this.ft = void 0, this.et = e;
650
+ if (e === Ye)
651
+ return e;
652
+ if (typeof e != "string")
653
653
  throw Error(this.constructor.directiveName + "() called with a non-string value");
654
- if (t === this.et)
654
+ if (e === this.et)
655
655
  return this.ft;
656
- this.et = t;
657
- const e = [t];
658
- return e.raw = e, this.ft = { _$litType$: this.constructor.resultType, strings: e, values: [] };
656
+ this.et = e;
657
+ const t = [e];
658
+ return t.raw = t, this.ft = { _$litType$: this.constructor.resultType, strings: t, values: [] };
659
659
  }
660
660
  }
661
- bt.directiveName = "unsafeHTML", bt.resultType = 1;
662
- const Yt = je(bt);
663
- function k(i) {
664
- return Array.isArray ? Array.isArray(i) : he(i) === "[object Array]";
661
+ ys.directiveName = "unsafeHTML", ys.resultType = 1;
662
+ const hi = Gr(ys);
663
+ function Re(i) {
664
+ return Array.isArray ? Array.isArray(i) : Ei(i) === "[object Array]";
665
665
  }
666
- const Ue = 1 / 0;
667
- function Fe(i) {
666
+ const Qr = 1 / 0;
667
+ function en(i) {
668
668
  if (typeof i == "string")
669
669
  return i;
670
- let t = i + "";
671
- return t == "0" && 1 / i == -Ue ? "-0" : t;
670
+ let e = i + "";
671
+ return e == "0" && 1 / i == -Qr ? "-0" : e;
672
672
  }
673
- function De(i) {
674
- return i == null ? "" : Fe(i);
673
+ function tn(i) {
674
+ return i == null ? "" : en(i);
675
675
  }
676
- function C(i) {
676
+ function De(i) {
677
677
  return typeof i == "string";
678
678
  }
679
- function ce(i) {
679
+ function wi(i) {
680
680
  return typeof i == "number";
681
681
  }
682
- function ze(i) {
683
- return i === !0 || i === !1 || Be(i) && he(i) == "[object Boolean]";
682
+ function sn(i) {
683
+ return i === !0 || i === !1 || rn(i) && Ei(i) == "[object Boolean]";
684
684
  }
685
- function ae(i) {
685
+ function Ai(i) {
686
686
  return typeof i == "object";
687
687
  }
688
- function Be(i) {
689
- return ae(i) && i !== null;
688
+ function rn(i) {
689
+ return Ai(i) && i !== null;
690
690
  }
691
- function b(i) {
691
+ function xe(i) {
692
692
  return i != null;
693
693
  }
694
- function $t(i) {
694
+ function ps(i) {
695
695
  return !i.trim().length;
696
696
  }
697
- function he(i) {
697
+ function Ei(i) {
698
698
  return i == null ? i === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(i);
699
699
  }
700
- const We = "Incorrect 'index' type", Ve = (i) => `Invalid value for key ${i}`, Ke = (i) => `Pattern length exceeds max of ${i}.`, Ge = (i) => `Missing ${i} property in key`, Ye = (i) => `Property 'weight' in key '${i}' must be a positive integer`, Jt = Object.prototype.hasOwnProperty;
701
- class Je {
702
- constructor(t) {
700
+ const nn = "Incorrect 'index' type", on = (i) => `Invalid value for key ${i}`, ln = (i) => `Pattern length exceeds max of ${i}.`, an = (i) => `Missing ${i} property in key`, hn = (i) => `Property 'weight' in key '${i}' must be a positive integer`, ci = Object.prototype.hasOwnProperty;
701
+ class cn {
702
+ constructor(e) {
703
703
  this._keys = [], this._keyMap = {};
704
- let e = 0;
705
- t.forEach((s) => {
706
- let n = ue(s);
707
- e += n.weight, this._keys.push(n), this._keyMap[n.id] = n, e += n.weight;
704
+ let t = 0;
705
+ e.forEach((s) => {
706
+ let r = Mi(s);
707
+ t += r.weight, this._keys.push(r), this._keyMap[r.id] = r, t += r.weight;
708
708
  }), this._keys.forEach((s) => {
709
- s.weight /= e;
709
+ s.weight /= t;
710
710
  });
711
711
  }
712
- get(t) {
713
- return this._keyMap[t];
712
+ get(e) {
713
+ return this._keyMap[e];
714
714
  }
715
715
  keys() {
716
716
  return this._keys;
@@ -719,50 +719,50 @@ class Je {
719
719
  return JSON.stringify(this._keys);
720
720
  }
721
721
  }
722
- function ue(i) {
723
- let t = null, e = null, s = null, n = 1, r = null;
724
- if (C(i) || k(i))
725
- s = i, t = Xt(i), e = xt(i);
722
+ function Mi(i) {
723
+ let e = null, t = null, s = null, r = 1, o = null;
724
+ if (De(i) || Re(i))
725
+ s = i, e = ui(i), t = bs(i);
726
726
  else {
727
- if (!Jt.call(i, "name"))
728
- throw new Error(Ge("name"));
729
- const o = i.name;
730
- if (s = o, Jt.call(i, "weight") && (n = i.weight, n <= 0))
731
- throw new Error(Ye(o));
732
- t = Xt(o), e = xt(o), r = i.getFn;
733
- }
734
- return { path: t, id: e, weight: n, src: s, getFn: r };
735
- }
736
- function Xt(i) {
737
- return k(i) ? i : i.split(".");
738
- }
739
- function xt(i) {
740
- return k(i) ? i.join(".") : i;
741
- }
742
- function Xe(i, t) {
743
- let e = [], s = !1;
744
- const n = (r, o, c) => {
745
- if (b(r))
746
- if (!o[c])
747
- e.push(r);
727
+ if (!ci.call(i, "name"))
728
+ throw new Error(an("name"));
729
+ const l = i.name;
730
+ if (s = l, ci.call(i, "weight") && (r = i.weight, r <= 0))
731
+ throw new Error(hn(l));
732
+ e = ui(l), t = bs(l), o = i.getFn;
733
+ }
734
+ return { path: e, id: t, weight: r, src: s, getFn: o };
735
+ }
736
+ function ui(i) {
737
+ return Re(i) ? i : i.split(".");
738
+ }
739
+ function bs(i) {
740
+ return Re(i) ? i.join(".") : i;
741
+ }
742
+ function un(i, e) {
743
+ let t = [], s = !1;
744
+ const r = (o, l, c) => {
745
+ if (xe(o))
746
+ if (!l[c])
747
+ t.push(o);
748
748
  else {
749
- let l = o[c];
750
- const a = r[l];
751
- if (!b(a))
749
+ let u = l[c];
750
+ const d = o[u];
751
+ if (!xe(d))
752
752
  return;
753
- if (c === o.length - 1 && (C(a) || ce(a) || ze(a)))
754
- e.push(De(a));
755
- else if (k(a)) {
753
+ if (c === l.length - 1 && (De(d) || wi(d) || sn(d)))
754
+ t.push(tn(d));
755
+ else if (Re(d)) {
756
756
  s = !0;
757
- for (let u = 0, h = a.length; u < h; u += 1)
758
- n(a[u], o, c + 1);
757
+ for (let m = 0, v = d.length; m < v; m += 1)
758
+ r(d[m], l, c + 1);
759
759
  } else
760
- o.length && n(a, o, c + 1);
760
+ l.length && r(d, l, c + 1);
761
761
  }
762
762
  };
763
- return n(i, C(t) ? t.split(".") : t, 0), s ? e : e[0];
763
+ return r(i, De(e) ? e.split(".") : e, 0), s ? t : t[0];
764
764
  }
765
- const Qe = {
765
+ const dn = {
766
766
  // Whether the matches should be included in the result set. When `true`, each record in the result
767
767
  // set will include the indices of the matched characters.
768
768
  // These can consequently be used for highlighting purposes.
@@ -772,7 +772,7 @@ const Qe = {
772
772
  findAllMatches: !1,
773
773
  // Minimum number of characters that must be matched before a result is considered a match
774
774
  minMatchCharLength: 1
775
- }, Ze = {
775
+ }, pn = {
776
776
  // When `true`, the algorithm continues searching to the end of the input even if a perfect
777
777
  // match is found before the end of the same input.
778
778
  isCaseSensitive: !1,
@@ -783,8 +783,8 @@ const Qe = {
783
783
  // Whether to sort the result list, by score
784
784
  shouldSort: !0,
785
785
  // Default sort function: sort by ascending score, ascending index
786
- sortFn: (i, t) => i.score === t.score ? i.idx < t.idx ? -1 : 1 : i.score < t.score ? -1 : 1
787
- }, qe = {
786
+ sortFn: (i, e) => i.score === e.score ? i.idx < e.idx ? -1 : 1 : i.score < e.score ? -1 : 1
787
+ }, fn = {
788
788
  // Approximately where in the text is the pattern expected to be found?
789
789
  location: 0,
790
790
  // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match
@@ -796,12 +796,12 @@ const Qe = {
796
796
  // the exact location specified, a threshold of '1000' would require a perfect match
797
797
  // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
798
798
  distance: 100
799
- }, ts = {
799
+ }, gn = {
800
800
  // When `true`, it enables the use of unix-like search commands
801
801
  useExtendedSearch: !1,
802
802
  // The get function to use when fetching an object's properties.
803
803
  // The default will search nested paths *ie foo.bar.baz*
804
- getFn: Xe,
804
+ getFn: un,
805
805
  // When `true`, search will ignore `location` and `distance`, so it won't matter
806
806
  // where in the string the pattern appears.
807
807
  // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score
@@ -813,113 +813,113 @@ const Qe = {
813
813
  // The weight to determine how much field length norm effects scoring.
814
814
  fieldNormWeight: 1
815
815
  };
816
- var f = {
817
- ...Ze,
818
- ...Qe,
819
- ...qe,
820
- ...ts
816
+ var D = {
817
+ ...pn,
818
+ ...dn,
819
+ ...fn,
820
+ ...gn
821
821
  };
822
- const es = /[^ ]+/g;
823
- function ss(i = 1, t = 3) {
824
- const e = /* @__PURE__ */ new Map(), s = Math.pow(10, t);
822
+ const vn = /[^ ]+/g;
823
+ function mn(i = 1, e = 3) {
824
+ const t = /* @__PURE__ */ new Map(), s = Math.pow(10, e);
825
825
  return {
826
- get(n) {
827
- const r = n.match(es).length;
828
- if (e.has(r))
829
- return e.get(r);
830
- const o = 1 / Math.pow(r, 0.5 * i), c = parseFloat(Math.round(o * s) / s);
831
- return e.set(r, c), c;
826
+ get(r) {
827
+ const o = r.match(vn).length;
828
+ if (t.has(o))
829
+ return t.get(o);
830
+ const l = 1 / Math.pow(o, 0.5 * i), c = parseFloat(Math.round(l * s) / s);
831
+ return t.set(o, c), c;
832
832
  },
833
833
  clear() {
834
- e.clear();
834
+ t.clear();
835
835
  }
836
836
  };
837
837
  }
838
- class Tt {
838
+ class Ss {
839
839
  constructor({
840
- getFn: t = f.getFn,
841
- fieldNormWeight: e = f.fieldNormWeight
840
+ getFn: e = D.getFn,
841
+ fieldNormWeight: t = D.fieldNormWeight
842
842
  } = {}) {
843
- this.norm = ss(e, 3), this.getFn = t, this.isCreated = !1, this.setIndexRecords();
843
+ this.norm = mn(t, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords();
844
844
  }
845
- setSources(t = []) {
846
- this.docs = t;
845
+ setSources(e = []) {
846
+ this.docs = e;
847
847
  }
848
- setIndexRecords(t = []) {
849
- this.records = t;
848
+ setIndexRecords(e = []) {
849
+ this.records = e;
850
850
  }
851
- setKeys(t = []) {
852
- this.keys = t, this._keysMap = {}, t.forEach((e, s) => {
853
- this._keysMap[e.id] = s;
851
+ setKeys(e = []) {
852
+ this.keys = e, this._keysMap = {}, e.forEach((t, s) => {
853
+ this._keysMap[t.id] = s;
854
854
  });
855
855
  }
856
856
  create() {
857
- this.isCreated || !this.docs.length || (this.isCreated = !0, C(this.docs[0]) ? this.docs.forEach((t, e) => {
858
- this._addString(t, e);
859
- }) : this.docs.forEach((t, e) => {
860
- this._addObject(t, e);
857
+ this.isCreated || !this.docs.length || (this.isCreated = !0, De(this.docs[0]) ? this.docs.forEach((e, t) => {
858
+ this._addString(e, t);
859
+ }) : this.docs.forEach((e, t) => {
860
+ this._addObject(e, t);
861
861
  }), this.norm.clear());
862
862
  }
863
863
  // Adds a doc to the end of the index
864
- add(t) {
865
- const e = this.size();
866
- C(t) ? this._addString(t, e) : this._addObject(t, e);
864
+ add(e) {
865
+ const t = this.size();
866
+ De(e) ? this._addString(e, t) : this._addObject(e, t);
867
867
  }
868
868
  // Removes the doc at the specified index of the index
869
- removeAt(t) {
870
- this.records.splice(t, 1);
871
- for (let e = t, s = this.size(); e < s; e += 1)
872
- this.records[e].i -= 1;
869
+ removeAt(e) {
870
+ this.records.splice(e, 1);
871
+ for (let t = e, s = this.size(); t < s; t += 1)
872
+ this.records[t].i -= 1;
873
873
  }
874
- getValueForItemAtKeyId(t, e) {
875
- return t[this._keysMap[e]];
874
+ getValueForItemAtKeyId(e, t) {
875
+ return e[this._keysMap[t]];
876
876
  }
877
877
  size() {
878
878
  return this.records.length;
879
879
  }
880
- _addString(t, e) {
881
- if (!b(t) || $t(t))
880
+ _addString(e, t) {
881
+ if (!xe(e) || ps(e))
882
882
  return;
883
883
  let s = {
884
- v: t,
885
- i: e,
886
- n: this.norm.get(t)
884
+ v: e,
885
+ i: t,
886
+ n: this.norm.get(e)
887
887
  };
888
888
  this.records.push(s);
889
889
  }
890
- _addObject(t, e) {
891
- let s = { i: e, $: {} };
892
- this.keys.forEach((n, r) => {
893
- let o = n.getFn ? n.getFn(t) : this.getFn(t, n.path);
894
- if (b(o)) {
895
- if (k(o)) {
890
+ _addObject(e, t) {
891
+ let s = { i: t, $: {} };
892
+ this.keys.forEach((r, o) => {
893
+ let l = r.getFn ? r.getFn(e) : this.getFn(e, r.path);
894
+ if (xe(l)) {
895
+ if (Re(l)) {
896
896
  let c = [];
897
- const l = [{ nestedArrIndex: -1, value: o }];
898
- for (; l.length; ) {
899
- const { nestedArrIndex: a, value: u } = l.pop();
900
- if (b(u))
901
- if (C(u) && !$t(u)) {
902
- let h = {
903
- v: u,
904
- i: a,
905
- n: this.norm.get(u)
897
+ const u = [{ nestedArrIndex: -1, value: l }];
898
+ for (; u.length; ) {
899
+ const { nestedArrIndex: d, value: m } = u.pop();
900
+ if (xe(m))
901
+ if (De(m) && !ps(m)) {
902
+ let v = {
903
+ v: m,
904
+ i: d,
905
+ n: this.norm.get(m)
906
906
  };
907
- c.push(h);
907
+ c.push(v);
908
908
  } else
909
- k(u) && u.forEach((h, d) => {
910
- l.push({
911
- nestedArrIndex: d,
912
- value: h
909
+ Re(m) && m.forEach((v, $) => {
910
+ u.push({
911
+ nestedArrIndex: $,
912
+ value: v
913
913
  });
914
914
  });
915
915
  }
916
- s.$[r] = c;
917
- } else if (C(o) && !$t(o)) {
916
+ s.$[o] = c;
917
+ } else if (De(l) && !ps(l)) {
918
918
  let c = {
919
- v: o,
920
- n: this.norm.get(o)
919
+ v: l,
920
+ n: this.norm.get(l)
921
921
  };
922
- s.$[r] = c;
922
+ s.$[o] = c;
923
923
  }
924
924
  }
925
925
  }), this.records.push(s);
@@ -931,221 +931,221 @@ class Tt {
931
931
  };
932
932
  }
933
933
  }
934
- function de(i, t, { getFn: e = f.getFn, fieldNormWeight: s = f.fieldNormWeight } = {}) {
935
- const n = new Tt({ getFn: e, fieldNormWeight: s });
936
- return n.setKeys(i.map(ue)), n.setSources(t), n.create(), n;
934
+ function Si(i, e, { getFn: t = D.getFn, fieldNormWeight: s = D.fieldNormWeight } = {}) {
935
+ const r = new Ss({ getFn: t, fieldNormWeight: s });
936
+ return r.setKeys(i.map(Mi)), r.setSources(e), r.create(), r;
937
937
  }
938
- function is(i, { getFn: t = f.getFn, fieldNormWeight: e = f.fieldNormWeight } = {}) {
939
- const { keys: s, records: n } = i, r = new Tt({ getFn: t, fieldNormWeight: e });
940
- return r.setKeys(s), r.setIndexRecords(n), r;
938
+ function yn(i, { getFn: e = D.getFn, fieldNormWeight: t = D.fieldNormWeight } = {}) {
939
+ const { keys: s, records: r } = i, o = new Ss({ getFn: e, fieldNormWeight: t });
940
+ return o.setKeys(s), o.setIndexRecords(r), o;
941
941
  }
942
- function it(i, {
943
- errors: t = 0,
944
- currentLocation: e = 0,
942
+ function Mt(i, {
943
+ errors: e = 0,
944
+ currentLocation: t = 0,
945
945
  expectedLocation: s = 0,
946
- distance: n = f.distance,
947
- ignoreLocation: r = f.ignoreLocation
946
+ distance: r = D.distance,
947
+ ignoreLocation: o = D.ignoreLocation
948
948
  } = {}) {
949
- const o = t / i.length;
950
- if (r)
951
- return o;
952
- const c = Math.abs(s - e);
953
- return n ? o + c / n : c ? 1 : o;
954
- }
955
- function ns(i = [], t = f.minMatchCharLength) {
956
- let e = [], s = -1, n = -1, r = 0;
957
- for (let o = i.length; r < o; r += 1) {
958
- let c = i[r];
959
- c && s === -1 ? s = r : !c && s !== -1 && (n = r - 1, n - s + 1 >= t && e.push([s, n]), s = -1);
960
- }
961
- return i[r - 1] && r - s >= t && e.push([s, r - 1]), e;
962
- }
963
- const P = 32;
964
- function rs(i, t, e, {
965
- location: s = f.location,
966
- distance: n = f.distance,
967
- threshold: r = f.threshold,
968
- findAllMatches: o = f.findAllMatches,
969
- minMatchCharLength: c = f.minMatchCharLength,
970
- includeMatches: l = f.includeMatches,
971
- ignoreLocation: a = f.ignoreLocation
949
+ const l = e / i.length;
950
+ if (o)
951
+ return l;
952
+ const c = Math.abs(s - t);
953
+ return r ? l + c / r : c ? 1 : l;
954
+ }
955
+ function bn(i = [], e = D.minMatchCharLength) {
956
+ let t = [], s = -1, r = -1, o = 0;
957
+ for (let l = i.length; o < l; o += 1) {
958
+ let c = i[o];
959
+ c && s === -1 ? s = o : !c && s !== -1 && (r = o - 1, r - s + 1 >= e && t.push([s, r]), s = -1);
960
+ }
961
+ return i[o - 1] && o - s >= e && t.push([s, o - 1]), t;
962
+ }
963
+ const ze = 32;
964
+ function $n(i, e, t, {
965
+ location: s = D.location,
966
+ distance: r = D.distance,
967
+ threshold: o = D.threshold,
968
+ findAllMatches: l = D.findAllMatches,
969
+ minMatchCharLength: c = D.minMatchCharLength,
970
+ includeMatches: u = D.includeMatches,
971
+ ignoreLocation: d = D.ignoreLocation
972
972
  } = {}) {
973
- if (t.length > P)
974
- throw new Error(Ke(P));
975
- const u = t.length, h = i.length, d = Math.max(0, Math.min(s, h));
976
- let p = r, g = d;
977
- const v = c > 1 || l, M = v ? Array(h) : [];
978
- let A;
979
- for (; (A = i.indexOf(t, g)) > -1; ) {
980
- let $ = it(t, {
981
- currentLocation: A,
982
- expectedLocation: d,
983
- distance: n,
984
- ignoreLocation: a
973
+ if (e.length > ze)
974
+ throw new Error(ln(ze));
975
+ const m = e.length, v = i.length, $ = Math.max(0, Math.min(s, v));
976
+ let E = o, j = $;
977
+ const G = c > 1 || u, ve = G ? Array(v) : [];
978
+ let le;
979
+ for (; (le = i.indexOf(e, j)) > -1; ) {
980
+ let X = Mt(e, {
981
+ currentLocation: le,
982
+ expectedLocation: $,
983
+ distance: r,
984
+ ignoreLocation: d
985
985
  });
986
- if (p = Math.min($, p), g = A + u, v) {
987
- let E = 0;
988
- for (; E < u; )
989
- M[A + E] = 1, E += 1;
990
- }
991
- }
992
- g = -1;
993
- let R = [], I = 1, D = u + h;
994
- const G = 1 << u - 1;
995
- for (let $ = 0; $ < u; $ += 1) {
996
- let E = 0, S = D;
997
- for (; E < S; )
998
- it(t, {
999
- errors: $,
1000
- currentLocation: d + S,
1001
- expectedLocation: d,
1002
- distance: n,
1003
- ignoreLocation: a
1004
- }) <= p ? E = S : D = S, S = Math.floor((D - E) / 2 + E);
1005
- D = S;
1006
- let Lt = Math.max(1, d - S + 1), ut = o ? h : Math.min(d + S, h) + u, z = Array(ut + 2);
1007
- z[ut + 1] = (1 << $) - 1;
1008
- for (let w = ut; w >= Lt; w -= 1) {
1009
- let st = w - 1, Nt = e[i.charAt(st)];
1010
- if (v && (M[st] = +!!Nt), z[w] = (z[w + 1] << 1 | 1) & Nt, $ && (z[w] |= (R[w + 1] | R[w]) << 1 | 1 | R[w + 1]), z[w] & G && (I = it(t, {
1011
- errors: $,
1012
- currentLocation: st,
1013
- expectedLocation: d,
1014
- distance: n,
1015
- ignoreLocation: a
1016
- }), I <= p)) {
1017
- if (p = I, g = st, g <= d)
986
+ if (E = Math.min(X, E), j = le + m, G) {
987
+ let ie = 0;
988
+ for (; ie < m; )
989
+ ve[le + ie] = 1, ie += 1;
990
+ }
991
+ }
992
+ j = -1;
993
+ let me = [], pe = 1, Ee = m + v;
994
+ const ye = 1 << m - 1;
995
+ for (let X = 0; X < m; X += 1) {
996
+ let ie = 0, z = Ee;
997
+ for (; ie < z; )
998
+ Mt(e, {
999
+ errors: X,
1000
+ currentLocation: $ + z,
1001
+ expectedLocation: $,
1002
+ distance: r,
1003
+ ignoreLocation: d
1004
+ }) <= E ? ie = z : Ee = z, z = Math.floor((Ee - ie) / 2 + ie);
1005
+ Ee = z;
1006
+ let B = Math.max(1, $ - z + 1), Oe = l ? v : Math.min($ + z, v) + m, Me = Array(Oe + 2);
1007
+ Me[Oe + 1] = (1 << X) - 1;
1008
+ for (let y = Oe; y >= B; y -= 1) {
1009
+ let b = y - 1, k = t[i.charAt(b)];
1010
+ if (G && (ve[b] = +!!k), Me[y] = (Me[y + 1] << 1 | 1) & k, X && (Me[y] |= (me[y + 1] | me[y]) << 1 | 1 | me[y + 1]), Me[y] & ye && (pe = Mt(e, {
1011
+ errors: X,
1012
+ currentLocation: b,
1013
+ expectedLocation: $,
1014
+ distance: r,
1015
+ ignoreLocation: d
1016
+ }), pe <= E)) {
1017
+ if (E = pe, j = b, j <= $)
1018
1018
  break;
1019
- Lt = Math.max(1, 2 * d - g);
1019
+ B = Math.max(1, 2 * $ - j);
1020
1020
  }
1021
1021
  }
1022
- if (it(t, {
1023
- errors: $ + 1,
1024
- currentLocation: d,
1025
- expectedLocation: d,
1026
- distance: n,
1027
- ignoreLocation: a
1028
- }) > p)
1022
+ if (Mt(e, {
1023
+ errors: X + 1,
1024
+ currentLocation: $,
1025
+ expectedLocation: $,
1026
+ distance: r,
1027
+ ignoreLocation: d
1028
+ }) > E)
1029
1029
  break;
1030
- R = z;
1030
+ me = Me;
1031
1031
  }
1032
- const y = {
1033
- isMatch: g >= 0,
1032
+ const F = {
1033
+ isMatch: j >= 0,
1034
1034
  // Count exact matches (those with a score of 0) to be "almost" exact
1035
- score: Math.max(1e-3, I)
1035
+ score: Math.max(1e-3, pe)
1036
1036
  };
1037
- if (v) {
1038
- const $ = ns(M, c);
1039
- $.length ? l && (y.indices = $) : y.isMatch = !1;
1037
+ if (G) {
1038
+ const X = bn(ve, c);
1039
+ X.length ? u && (F.indices = X) : F.isMatch = !1;
1040
1040
  }
1041
- return y;
1041
+ return F;
1042
1042
  }
1043
- function os(i) {
1044
- let t = {};
1045
- for (let e = 0, s = i.length; e < s; e += 1) {
1046
- const n = i.charAt(e);
1047
- t[n] = (t[n] || 0) | 1 << s - e - 1;
1043
+ function _n(i) {
1044
+ let e = {};
1045
+ for (let t = 0, s = i.length; t < s; t += 1) {
1046
+ const r = i.charAt(t);
1047
+ e[r] = (e[r] || 0) | 1 << s - t - 1;
1048
1048
  }
1049
- return t;
1049
+ return e;
1050
1050
  }
1051
- class fe {
1052
- constructor(t, {
1053
- location: e = f.location,
1054
- threshold: s = f.threshold,
1055
- distance: n = f.distance,
1056
- includeMatches: r = f.includeMatches,
1057
- findAllMatches: o = f.findAllMatches,
1058
- minMatchCharLength: c = f.minMatchCharLength,
1059
- isCaseSensitive: l = f.isCaseSensitive,
1060
- ignoreLocation: a = f.ignoreLocation
1051
+ class ki {
1052
+ constructor(e, {
1053
+ location: t = D.location,
1054
+ threshold: s = D.threshold,
1055
+ distance: r = D.distance,
1056
+ includeMatches: o = D.includeMatches,
1057
+ findAllMatches: l = D.findAllMatches,
1058
+ minMatchCharLength: c = D.minMatchCharLength,
1059
+ isCaseSensitive: u = D.isCaseSensitive,
1060
+ ignoreLocation: d = D.ignoreLocation
1061
1061
  } = {}) {
1062
1062
  if (this.options = {
1063
- location: e,
1063
+ location: t,
1064
1064
  threshold: s,
1065
- distance: n,
1066
- includeMatches: r,
1067
- findAllMatches: o,
1065
+ distance: r,
1066
+ includeMatches: o,
1067
+ findAllMatches: l,
1068
1068
  minMatchCharLength: c,
1069
- isCaseSensitive: l,
1070
- ignoreLocation: a
1071
- }, this.pattern = l ? t : t.toLowerCase(), this.chunks = [], !this.pattern.length)
1069
+ isCaseSensitive: u,
1070
+ ignoreLocation: d
1071
+ }, this.pattern = u ? e : e.toLowerCase(), this.chunks = [], !this.pattern.length)
1072
1072
  return;
1073
- const u = (d, p) => {
1073
+ const m = ($, E) => {
1074
1074
  this.chunks.push({
1075
- pattern: d,
1076
- alphabet: os(d),
1077
- startIndex: p
1075
+ pattern: $,
1076
+ alphabet: _n($),
1077
+ startIndex: E
1078
1078
  });
1079
- }, h = this.pattern.length;
1080
- if (h > P) {
1081
- let d = 0;
1082
- const p = h % P, g = h - p;
1083
- for (; d < g; )
1084
- u(this.pattern.substr(d, P), d), d += P;
1085
- if (p) {
1086
- const v = h - P;
1087
- u(this.pattern.substr(v), v);
1079
+ }, v = this.pattern.length;
1080
+ if (v > ze) {
1081
+ let $ = 0;
1082
+ const E = v % ze, j = v - E;
1083
+ for (; $ < j; )
1084
+ m(this.pattern.substr($, ze), $), $ += ze;
1085
+ if (E) {
1086
+ const G = v - ze;
1087
+ m(this.pattern.substr(G), G);
1088
1088
  }
1089
1089
  } else
1090
- u(this.pattern, 0);
1090
+ m(this.pattern, 0);
1091
1091
  }
1092
- searchIn(t) {
1093
- const { isCaseSensitive: e, includeMatches: s } = this.options;
1094
- if (e || (t = t.toLowerCase()), this.pattern === t) {
1095
- let g = {
1092
+ searchIn(e) {
1093
+ const { isCaseSensitive: t, includeMatches: s } = this.options;
1094
+ if (t || (e = e.toLowerCase()), this.pattern === e) {
1095
+ let j = {
1096
1096
  isMatch: !0,
1097
1097
  score: 0
1098
1098
  };
1099
- return s && (g.indices = [[0, t.length - 1]]), g;
1099
+ return s && (j.indices = [[0, e.length - 1]]), j;
1100
1100
  }
1101
1101
  const {
1102
- location: n,
1103
- distance: r,
1104
- threshold: o,
1102
+ location: r,
1103
+ distance: o,
1104
+ threshold: l,
1105
1105
  findAllMatches: c,
1106
- minMatchCharLength: l,
1107
- ignoreLocation: a
1106
+ minMatchCharLength: u,
1107
+ ignoreLocation: d
1108
1108
  } = this.options;
1109
- let u = [], h = 0, d = !1;
1110
- this.chunks.forEach(({ pattern: g, alphabet: v, startIndex: M }) => {
1111
- const { isMatch: A, score: R, indices: I } = rs(t, g, v, {
1112
- location: n + M,
1113
- distance: r,
1114
- threshold: o,
1109
+ let m = [], v = 0, $ = !1;
1110
+ this.chunks.forEach(({ pattern: j, alphabet: G, startIndex: ve }) => {
1111
+ const { isMatch: le, score: me, indices: pe } = $n(e, j, G, {
1112
+ location: r + ve,
1113
+ distance: o,
1114
+ threshold: l,
1115
1115
  findAllMatches: c,
1116
- minMatchCharLength: l,
1116
+ minMatchCharLength: u,
1117
1117
  includeMatches: s,
1118
- ignoreLocation: a
1118
+ ignoreLocation: d
1119
1119
  });
1120
- A && (d = !0), h += R, A && I && (u = [...u, ...I]);
1120
+ le && ($ = !0), v += me, le && pe && (m = [...m, ...pe]);
1121
1121
  });
1122
- let p = {
1123
- isMatch: d,
1124
- score: d ? h / this.chunks.length : 1
1122
+ let E = {
1123
+ isMatch: $,
1124
+ score: $ ? v / this.chunks.length : 1
1125
1125
  };
1126
- return d && s && (p.indices = u), p;
1126
+ return $ && s && (E.indices = m), E;
1127
1127
  }
1128
1128
  }
1129
- class L {
1130
- constructor(t) {
1131
- this.pattern = t;
1129
+ class je {
1130
+ constructor(e) {
1131
+ this.pattern = e;
1132
1132
  }
1133
- static isMultiMatch(t) {
1134
- return Qt(t, this.multiRegex);
1133
+ static isMultiMatch(e) {
1134
+ return di(e, this.multiRegex);
1135
1135
  }
1136
- static isSingleMatch(t) {
1137
- return Qt(t, this.singleRegex);
1136
+ static isSingleMatch(e) {
1137
+ return di(e, this.singleRegex);
1138
1138
  }
1139
1139
  search() {
1140
1140
  }
1141
1141
  }
1142
- function Qt(i, t) {
1143
- const e = i.match(t);
1144
- return e ? e[1] : null;
1142
+ function di(i, e) {
1143
+ const t = i.match(e);
1144
+ return t ? t[1] : null;
1145
1145
  }
1146
- class ls extends L {
1147
- constructor(t) {
1148
- super(t);
1146
+ class xn extends je {
1147
+ constructor(e) {
1148
+ super(e);
1149
1149
  }
1150
1150
  static get type() {
1151
1151
  return "exact";
@@ -1156,18 +1156,18 @@ class ls extends L {
1156
1156
  static get singleRegex() {
1157
1157
  return /^=(.*)$/;
1158
1158
  }
1159
- search(t) {
1160
- const e = t === this.pattern;
1159
+ search(e) {
1160
+ const t = e === this.pattern;
1161
1161
  return {
1162
- isMatch: e,
1163
- score: e ? 0 : 1,
1162
+ isMatch: t,
1163
+ score: t ? 0 : 1,
1164
1164
  indices: [0, this.pattern.length - 1]
1165
1165
  };
1166
1166
  }
1167
1167
  }
1168
- class cs extends L {
1169
- constructor(t) {
1170
- super(t);
1168
+ class wn extends je {
1169
+ constructor(e) {
1170
+ super(e);
1171
1171
  }
1172
1172
  static get type() {
1173
1173
  return "inverse-exact";
@@ -1178,18 +1178,18 @@ class cs extends L {
1178
1178
  static get singleRegex() {
1179
1179
  return /^!(.*)$/;
1180
1180
  }
1181
- search(t) {
1182
- const s = t.indexOf(this.pattern) === -1;
1181
+ search(e) {
1182
+ const s = e.indexOf(this.pattern) === -1;
1183
1183
  return {
1184
1184
  isMatch: s,
1185
1185
  score: s ? 0 : 1,
1186
- indices: [0, t.length - 1]
1186
+ indices: [0, e.length - 1]
1187
1187
  };
1188
1188
  }
1189
1189
  }
1190
- class as extends L {
1191
- constructor(t) {
1192
- super(t);
1190
+ class An extends je {
1191
+ constructor(e) {
1192
+ super(e);
1193
1193
  }
1194
1194
  static get type() {
1195
1195
  return "prefix-exact";
@@ -1200,18 +1200,18 @@ class as extends L {
1200
1200
  static get singleRegex() {
1201
1201
  return /^\^(.*)$/;
1202
1202
  }
1203
- search(t) {
1204
- const e = t.startsWith(this.pattern);
1203
+ search(e) {
1204
+ const t = e.startsWith(this.pattern);
1205
1205
  return {
1206
- isMatch: e,
1207
- score: e ? 0 : 1,
1206
+ isMatch: t,
1207
+ score: t ? 0 : 1,
1208
1208
  indices: [0, this.pattern.length - 1]
1209
1209
  };
1210
1210
  }
1211
1211
  }
1212
- class hs extends L {
1213
- constructor(t) {
1214
- super(t);
1212
+ class En extends je {
1213
+ constructor(e) {
1214
+ super(e);
1215
1215
  }
1216
1216
  static get type() {
1217
1217
  return "inverse-prefix-exact";
@@ -1222,18 +1222,18 @@ class hs extends L {
1222
1222
  static get singleRegex() {
1223
1223
  return /^!\^(.*)$/;
1224
1224
  }
1225
- search(t) {
1226
- const e = !t.startsWith(this.pattern);
1225
+ search(e) {
1226
+ const t = !e.startsWith(this.pattern);
1227
1227
  return {
1228
- isMatch: e,
1229
- score: e ? 0 : 1,
1230
- indices: [0, t.length - 1]
1228
+ isMatch: t,
1229
+ score: t ? 0 : 1,
1230
+ indices: [0, e.length - 1]
1231
1231
  };
1232
1232
  }
1233
1233
  }
1234
- class us extends L {
1235
- constructor(t) {
1236
- super(t);
1234
+ class Mn extends je {
1235
+ constructor(e) {
1236
+ super(e);
1237
1237
  }
1238
1238
  static get type() {
1239
1239
  return "suffix-exact";
@@ -1244,18 +1244,18 @@ class us extends L {
1244
1244
  static get singleRegex() {
1245
1245
  return /^(.*)\$$/;
1246
1246
  }
1247
- search(t) {
1248
- const e = t.endsWith(this.pattern);
1247
+ search(e) {
1248
+ const t = e.endsWith(this.pattern);
1249
1249
  return {
1250
- isMatch: e,
1251
- score: e ? 0 : 1,
1252
- indices: [t.length - this.pattern.length, t.length - 1]
1250
+ isMatch: t,
1251
+ score: t ? 0 : 1,
1252
+ indices: [e.length - this.pattern.length, e.length - 1]
1253
1253
  };
1254
1254
  }
1255
1255
  }
1256
- class ds extends L {
1257
- constructor(t) {
1258
- super(t);
1256
+ class Sn extends je {
1257
+ constructor(e) {
1258
+ super(e);
1259
1259
  }
1260
1260
  static get type() {
1261
1261
  return "inverse-suffix-exact";
@@ -1266,35 +1266,35 @@ class ds extends L {
1266
1266
  static get singleRegex() {
1267
1267
  return /^!(.*)\$$/;
1268
1268
  }
1269
- search(t) {
1270
- const e = !t.endsWith(this.pattern);
1269
+ search(e) {
1270
+ const t = !e.endsWith(this.pattern);
1271
1271
  return {
1272
- isMatch: e,
1273
- score: e ? 0 : 1,
1274
- indices: [0, t.length - 1]
1272
+ isMatch: t,
1273
+ score: t ? 0 : 1,
1274
+ indices: [0, e.length - 1]
1275
1275
  };
1276
1276
  }
1277
1277
  }
1278
- class pe extends L {
1279
- constructor(t, {
1280
- location: e = f.location,
1281
- threshold: s = f.threshold,
1282
- distance: n = f.distance,
1283
- includeMatches: r = f.includeMatches,
1284
- findAllMatches: o = f.findAllMatches,
1285
- minMatchCharLength: c = f.minMatchCharLength,
1286
- isCaseSensitive: l = f.isCaseSensitive,
1287
- ignoreLocation: a = f.ignoreLocation
1278
+ class Ci extends je {
1279
+ constructor(e, {
1280
+ location: t = D.location,
1281
+ threshold: s = D.threshold,
1282
+ distance: r = D.distance,
1283
+ includeMatches: o = D.includeMatches,
1284
+ findAllMatches: l = D.findAllMatches,
1285
+ minMatchCharLength: c = D.minMatchCharLength,
1286
+ isCaseSensitive: u = D.isCaseSensitive,
1287
+ ignoreLocation: d = D.ignoreLocation
1288
1288
  } = {}) {
1289
- super(t), this._bitapSearch = new fe(t, {
1290
- location: e,
1289
+ super(e), this._bitapSearch = new ki(e, {
1290
+ location: t,
1291
1291
  threshold: s,
1292
- distance: n,
1293
- includeMatches: r,
1294
- findAllMatches: o,
1292
+ distance: r,
1293
+ includeMatches: o,
1294
+ findAllMatches: l,
1295
1295
  minMatchCharLength: c,
1296
- isCaseSensitive: l,
1297
- ignoreLocation: a
1296
+ isCaseSensitive: u,
1297
+ ignoreLocation: d
1298
1298
  });
1299
1299
  }
1300
1300
  static get type() {
@@ -1306,13 +1306,13 @@ class pe extends L {
1306
1306
  static get singleRegex() {
1307
1307
  return /^(.*)$/;
1308
1308
  }
1309
- search(t) {
1310
- return this._bitapSearch.searchIn(t);
1309
+ search(e) {
1310
+ return this._bitapSearch.searchIn(e);
1311
1311
  }
1312
1312
  }
1313
- class ge extends L {
1314
- constructor(t) {
1315
- super(t);
1313
+ class Oi extends je {
1314
+ constructor(e) {
1315
+ super(e);
1316
1316
  }
1317
1317
  static get type() {
1318
1318
  return "include";
@@ -1323,110 +1323,110 @@ class ge extends L {
1323
1323
  static get singleRegex() {
1324
1324
  return /^'(.*)$/;
1325
1325
  }
1326
- search(t) {
1327
- let e = 0, s;
1328
- const n = [], r = this.pattern.length;
1329
- for (; (s = t.indexOf(this.pattern, e)) > -1; )
1330
- e = s + r, n.push([s, e - 1]);
1331
- const o = !!n.length;
1326
+ search(e) {
1327
+ let t = 0, s;
1328
+ const r = [], o = this.pattern.length;
1329
+ for (; (s = e.indexOf(this.pattern, t)) > -1; )
1330
+ t = s + o, r.push([s, t - 1]);
1331
+ const l = !!r.length;
1332
1332
  return {
1333
- isMatch: o,
1334
- score: o ? 0 : 1,
1335
- indices: n
1333
+ isMatch: l,
1334
+ score: l ? 0 : 1,
1335
+ indices: r
1336
1336
  };
1337
1337
  }
1338
1338
  }
1339
- const St = [
1340
- ls,
1341
- ge,
1342
- as,
1343
- hs,
1344
- ds,
1345
- us,
1346
- cs,
1347
- pe
1348
- ], Zt = St.length, fs = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, ps = "|";
1349
- function gs(i, t = {}) {
1350
- return i.split(ps).map((e) => {
1351
- let s = e.trim().split(fs).filter((r) => r && !!r.trim()), n = [];
1352
- for (let r = 0, o = s.length; r < o; r += 1) {
1353
- const c = s[r];
1354
- let l = !1, a = -1;
1355
- for (; !l && ++a < Zt; ) {
1356
- const u = St[a];
1357
- let h = u.isMultiMatch(c);
1358
- h && (n.push(new u(h, t)), l = !0);
1339
+ const $s = [
1340
+ xn,
1341
+ Oi,
1342
+ An,
1343
+ En,
1344
+ Sn,
1345
+ Mn,
1346
+ wn,
1347
+ Ci
1348
+ ], pi = $s.length, kn = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Cn = "|";
1349
+ function On(i, e = {}) {
1350
+ return i.split(Cn).map((t) => {
1351
+ let s = t.trim().split(kn).filter((o) => o && !!o.trim()), r = [];
1352
+ for (let o = 0, l = s.length; o < l; o += 1) {
1353
+ const c = s[o];
1354
+ let u = !1, d = -1;
1355
+ for (; !u && ++d < pi; ) {
1356
+ const m = $s[d];
1357
+ let v = m.isMultiMatch(c);
1358
+ v && (r.push(new m(v, e)), u = !0);
1359
1359
  }
1360
- if (!l)
1361
- for (a = -1; ++a < Zt; ) {
1362
- const u = St[a];
1363
- let h = u.isSingleMatch(c);
1364
- if (h) {
1365
- n.push(new u(h, t));
1360
+ if (!u)
1361
+ for (d = -1; ++d < pi; ) {
1362
+ const m = $s[d];
1363
+ let v = m.isSingleMatch(c);
1364
+ if (v) {
1365
+ r.push(new m(v, e));
1366
1366
  break;
1367
1367
  }
1368
1368
  }
1369
1369
  }
1370
- return n;
1370
+ return r;
1371
1371
  });
1372
1372
  }
1373
- const ms = /* @__PURE__ */ new Set([pe.type, ge.type]);
1374
- class _s {
1375
- constructor(t, {
1376
- isCaseSensitive: e = f.isCaseSensitive,
1377
- includeMatches: s = f.includeMatches,
1378
- minMatchCharLength: n = f.minMatchCharLength,
1379
- ignoreLocation: r = f.ignoreLocation,
1380
- findAllMatches: o = f.findAllMatches,
1381
- location: c = f.location,
1382
- threshold: l = f.threshold,
1383
- distance: a = f.distance
1373
+ const Ln = /* @__PURE__ */ new Set([Ci.type, Oi.type]);
1374
+ class Tn {
1375
+ constructor(e, {
1376
+ isCaseSensitive: t = D.isCaseSensitive,
1377
+ includeMatches: s = D.includeMatches,
1378
+ minMatchCharLength: r = D.minMatchCharLength,
1379
+ ignoreLocation: o = D.ignoreLocation,
1380
+ findAllMatches: l = D.findAllMatches,
1381
+ location: c = D.location,
1382
+ threshold: u = D.threshold,
1383
+ distance: d = D.distance
1384
1384
  } = {}) {
1385
1385
  this.query = null, this.options = {
1386
- isCaseSensitive: e,
1386
+ isCaseSensitive: t,
1387
1387
  includeMatches: s,
1388
- minMatchCharLength: n,
1389
- findAllMatches: o,
1390
- ignoreLocation: r,
1388
+ minMatchCharLength: r,
1389
+ findAllMatches: l,
1390
+ ignoreLocation: o,
1391
1391
  location: c,
1392
- threshold: l,
1393
- distance: a
1394
- }, this.pattern = e ? t : t.toLowerCase(), this.query = gs(this.pattern, this.options);
1392
+ threshold: u,
1393
+ distance: d
1394
+ }, this.pattern = t ? e : e.toLowerCase(), this.query = On(this.pattern, this.options);
1395
1395
  }
1396
- static condition(t, e) {
1397
- return e.useExtendedSearch;
1396
+ static condition(e, t) {
1397
+ return t.useExtendedSearch;
1398
1398
  }
1399
- searchIn(t) {
1400
- const e = this.query;
1401
- if (!e)
1399
+ searchIn(e) {
1400
+ const t = this.query;
1401
+ if (!t)
1402
1402
  return {
1403
1403
  isMatch: !1,
1404
1404
  score: 1
1405
1405
  };
1406
- const { includeMatches: s, isCaseSensitive: n } = this.options;
1407
- t = n ? t : t.toLowerCase();
1408
- let r = 0, o = [], c = 0;
1409
- for (let l = 0, a = e.length; l < a; l += 1) {
1410
- const u = e[l];
1411
- o.length = 0, r = 0;
1412
- for (let h = 0, d = u.length; h < d; h += 1) {
1413
- const p = u[h], { isMatch: g, indices: v, score: M } = p.search(t);
1414
- if (g) {
1415
- if (r += 1, c += M, s) {
1416
- const A = p.constructor.type;
1417
- ms.has(A) ? o = [...o, ...v] : o.push(v);
1406
+ const { includeMatches: s, isCaseSensitive: r } = this.options;
1407
+ e = r ? e : e.toLowerCase();
1408
+ let o = 0, l = [], c = 0;
1409
+ for (let u = 0, d = t.length; u < d; u += 1) {
1410
+ const m = t[u];
1411
+ l.length = 0, o = 0;
1412
+ for (let v = 0, $ = m.length; v < $; v += 1) {
1413
+ const E = m[v], { isMatch: j, indices: G, score: ve } = E.search(e);
1414
+ if (j) {
1415
+ if (o += 1, c += ve, s) {
1416
+ const le = E.constructor.type;
1417
+ Ln.has(le) ? l = [...l, ...G] : l.push(G);
1418
1418
  }
1419
1419
  } else {
1420
- c = 0, r = 0, o.length = 0;
1420
+ c = 0, o = 0, l.length = 0;
1421
1421
  break;
1422
1422
  }
1423
1423
  }
1424
- if (r) {
1425
- let h = {
1424
+ if (o) {
1425
+ let v = {
1426
1426
  isMatch: !0,
1427
- score: c / r
1427
+ score: c / o
1428
1428
  };
1429
- return s && (h.indices = o), h;
1429
+ return s && (v.indices = l), v;
1430
1430
  }
1431
1431
  }
1432
1432
  return {
@@ -1435,354 +1435,1573 @@ class _s {
1435
1435
  };
1436
1436
  }
1437
1437
  }
1438
- const wt = [];
1439
- function ys(...i) {
1440
- wt.push(...i);
1438
+ const _s = [];
1439
+ function Dn(...i) {
1440
+ _s.push(...i);
1441
1441
  }
1442
- function Mt(i, t) {
1443
- for (let e = 0, s = wt.length; e < s; e += 1) {
1444
- let n = wt[e];
1445
- if (n.condition(i, t))
1446
- return new n(i, t);
1442
+ function xs(i, e) {
1443
+ for (let t = 0, s = _s.length; t < s; t += 1) {
1444
+ let r = _s[t];
1445
+ if (r.condition(i, e))
1446
+ return new r(i, e);
1447
1447
  }
1448
- return new fe(i, t);
1448
+ return new ki(i, e);
1449
1449
  }
1450
- const ct = {
1450
+ const Lt = {
1451
1451
  AND: "$and",
1452
1452
  OR: "$or"
1453
- }, Ct = {
1453
+ }, ws = {
1454
1454
  PATH: "$path",
1455
1455
  PATTERN: "$val"
1456
- }, Rt = (i) => !!(i[ct.AND] || i[ct.OR]), $s = (i) => !!i[Ct.PATH], vs = (i) => !k(i) && ae(i) && !Rt(i), qt = (i) => ({
1457
- [ct.AND]: Object.keys(i).map((t) => ({
1458
- [t]: i[t]
1456
+ }, As = (i) => !!(i[Lt.AND] || i[Lt.OR]), Rn = (i) => !!i[ws.PATH], Pn = (i) => !Re(i) && Ai(i) && !As(i), fi = (i) => ({
1457
+ [Lt.AND]: Object.keys(i).map((e) => ({
1458
+ [e]: i[e]
1459
1459
  }))
1460
1460
  });
1461
- function me(i, t, { auto: e = !0 } = {}) {
1462
- const s = (n) => {
1463
- let r = Object.keys(n);
1464
- const o = $s(n);
1465
- if (!o && r.length > 1 && !Rt(n))
1466
- return s(qt(n));
1467
- if (vs(n)) {
1468
- const l = o ? n[Ct.PATH] : r[0], a = o ? n[Ct.PATTERN] : n[l];
1469
- if (!C(a))
1470
- throw new Error(Ve(l));
1471
- const u = {
1472
- keyId: xt(l),
1473
- pattern: a
1461
+ function Li(i, e, { auto: t = !0 } = {}) {
1462
+ const s = (r) => {
1463
+ let o = Object.keys(r);
1464
+ const l = Rn(r);
1465
+ if (!l && o.length > 1 && !As(r))
1466
+ return s(fi(r));
1467
+ if (Pn(r)) {
1468
+ const u = l ? r[ws.PATH] : o[0], d = l ? r[ws.PATTERN] : r[u];
1469
+ if (!De(d))
1470
+ throw new Error(on(u));
1471
+ const m = {
1472
+ keyId: bs(u),
1473
+ pattern: d
1474
1474
  };
1475
- return e && (u.searcher = Mt(a, t)), u;
1475
+ return t && (m.searcher = xs(d, e)), m;
1476
1476
  }
1477
1477
  let c = {
1478
1478
  children: [],
1479
- operator: r[0]
1479
+ operator: o[0]
1480
1480
  };
1481
- return r.forEach((l) => {
1482
- const a = n[l];
1483
- k(a) && a.forEach((u) => {
1484
- c.children.push(s(u));
1481
+ return o.forEach((u) => {
1482
+ const d = r[u];
1483
+ Re(d) && d.forEach((m) => {
1484
+ c.children.push(s(m));
1485
1485
  });
1486
1486
  }), c;
1487
1487
  };
1488
- return Rt(i) || (i = qt(i)), s(i);
1488
+ return As(i) || (i = fi(i)), s(i);
1489
1489
  }
1490
- function As(i, { ignoreFieldNorm: t = f.ignoreFieldNorm }) {
1491
- i.forEach((e) => {
1490
+ function In(i, { ignoreFieldNorm: e = D.ignoreFieldNorm }) {
1491
+ i.forEach((t) => {
1492
1492
  let s = 1;
1493
- e.matches.forEach(({ key: n, norm: r, score: o }) => {
1494
- const c = n ? n.weight : null;
1493
+ t.matches.forEach(({ key: r, norm: o, score: l }) => {
1494
+ const c = r ? r.weight : null;
1495
1495
  s *= Math.pow(
1496
- o === 0 && c ? Number.EPSILON : o,
1497
- (c || 1) * (t ? 1 : r)
1496
+ l === 0 && c ? Number.EPSILON : l,
1497
+ (c || 1) * (e ? 1 : o)
1498
1498
  );
1499
- }), e.score = s;
1499
+ }), t.score = s;
1500
1500
  });
1501
1501
  }
1502
- function Es(i, t) {
1503
- const e = i.matches;
1504
- t.matches = [], b(e) && e.forEach((s) => {
1505
- if (!b(s.indices) || !s.indices.length)
1502
+ function Nn(i, e) {
1503
+ const t = i.matches;
1504
+ e.matches = [], xe(t) && t.forEach((s) => {
1505
+ if (!xe(s.indices) || !s.indices.length)
1506
1506
  return;
1507
- const { indices: n, value: r } = s;
1508
- let o = {
1509
- indices: n,
1510
- value: r
1507
+ const { indices: r, value: o } = s;
1508
+ let l = {
1509
+ indices: r,
1510
+ value: o
1511
1511
  };
1512
- s.key && (o.key = s.key.src), s.idx > -1 && (o.refIndex = s.idx), t.matches.push(o);
1512
+ s.key && (l.key = s.key.src), s.idx > -1 && (l.refIndex = s.idx), e.matches.push(l);
1513
1513
  });
1514
1514
  }
1515
- function bs(i, t) {
1516
- t.score = i.score;
1515
+ function jn(i, e) {
1516
+ e.score = i.score;
1517
1517
  }
1518
- function xs(i, t, {
1519
- includeMatches: e = f.includeMatches,
1520
- includeScore: s = f.includeScore
1518
+ function Hn(i, e, {
1519
+ includeMatches: t = D.includeMatches,
1520
+ includeScore: s = D.includeScore
1521
1521
  } = {}) {
1522
- const n = [];
1523
- return e && n.push(Es), s && n.push(bs), i.map((r) => {
1524
- const { idx: o } = r, c = {
1525
- item: t[o],
1526
- refIndex: o
1522
+ const r = [];
1523
+ return t && r.push(Nn), s && r.push(jn), i.map((o) => {
1524
+ const { idx: l } = o, c = {
1525
+ item: e[l],
1526
+ refIndex: l
1527
1527
  };
1528
- return n.length && n.forEach((l) => {
1529
- l(r, c);
1528
+ return r.length && r.forEach((u) => {
1529
+ u(o, c);
1530
1530
  }), c;
1531
1531
  });
1532
1532
  }
1533
- class K {
1534
- constructor(t, e = {}, s) {
1535
- this.options = { ...f, ...e }, this.options.useExtendedSearch, this._keyStore = new Je(this.options.keys), this.setCollection(t, s);
1533
+ class st {
1534
+ constructor(e, t = {}, s) {
1535
+ this.options = { ...D, ...t }, this.options.useExtendedSearch, this._keyStore = new cn(this.options.keys), this.setCollection(e, s);
1536
1536
  }
1537
- setCollection(t, e) {
1538
- if (this._docs = t, e && !(e instanceof Tt))
1539
- throw new Error(We);
1540
- this._myIndex = e || de(this.options.keys, this._docs, {
1537
+ setCollection(e, t) {
1538
+ if (this._docs = e, t && !(t instanceof Ss))
1539
+ throw new Error(nn);
1540
+ this._myIndex = t || Si(this.options.keys, this._docs, {
1541
1541
  getFn: this.options.getFn,
1542
1542
  fieldNormWeight: this.options.fieldNormWeight
1543
1543
  });
1544
1544
  }
1545
- add(t) {
1546
- b(t) && (this._docs.push(t), this._myIndex.add(t));
1545
+ add(e) {
1546
+ xe(e) && (this._docs.push(e), this._myIndex.add(e));
1547
1547
  }
1548
- remove(t = () => !1) {
1549
- const e = [];
1550
- for (let s = 0, n = this._docs.length; s < n; s += 1) {
1551
- const r = this._docs[s];
1552
- t(r, s) && (this.removeAt(s), s -= 1, n -= 1, e.push(r));
1548
+ remove(e = () => !1) {
1549
+ const t = [];
1550
+ for (let s = 0, r = this._docs.length; s < r; s += 1) {
1551
+ const o = this._docs[s];
1552
+ e(o, s) && (this.removeAt(s), s -= 1, r -= 1, t.push(o));
1553
1553
  }
1554
- return e;
1554
+ return t;
1555
1555
  }
1556
- removeAt(t) {
1557
- this._docs.splice(t, 1), this._myIndex.removeAt(t);
1556
+ removeAt(e) {
1557
+ this._docs.splice(e, 1), this._myIndex.removeAt(e);
1558
1558
  }
1559
1559
  getIndex() {
1560
1560
  return this._myIndex;
1561
1561
  }
1562
- search(t, { limit: e = -1 } = {}) {
1562
+ search(e, { limit: t = -1 } = {}) {
1563
1563
  const {
1564
1564
  includeMatches: s,
1565
- includeScore: n,
1566
- shouldSort: r,
1567
- sortFn: o,
1565
+ includeScore: r,
1566
+ shouldSort: o,
1567
+ sortFn: l,
1568
1568
  ignoreFieldNorm: c
1569
1569
  } = this.options;
1570
- let l = C(t) ? C(this._docs[0]) ? this._searchStringList(t) : this._searchObjectList(t) : this._searchLogical(t);
1571
- return As(l, { ignoreFieldNorm: c }), r && l.sort(o), ce(e) && e > -1 && (l = l.slice(0, e)), xs(l, this._docs, {
1570
+ let u = De(e) ? De(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
1571
+ return In(u, { ignoreFieldNorm: c }), o && u.sort(l), wi(t) && t > -1 && (u = u.slice(0, t)), Hn(u, this._docs, {
1572
1572
  includeMatches: s,
1573
- includeScore: n
1573
+ includeScore: r
1574
1574
  });
1575
1575
  }
1576
- _searchStringList(t) {
1577
- const e = Mt(t, this.options), { records: s } = this._myIndex, n = [];
1578
- return s.forEach(({ v: r, i: o, n: c }) => {
1579
- if (!b(r))
1576
+ _searchStringList(e) {
1577
+ const t = xs(e, this.options), { records: s } = this._myIndex, r = [];
1578
+ return s.forEach(({ v: o, i: l, n: c }) => {
1579
+ if (!xe(o))
1580
1580
  return;
1581
- const { isMatch: l, score: a, indices: u } = e.searchIn(r);
1582
- l && n.push({
1583
- item: r,
1584
- idx: o,
1585
- matches: [{ score: a, value: r, norm: c, indices: u }]
1581
+ const { isMatch: u, score: d, indices: m } = t.searchIn(o);
1582
+ u && r.push({
1583
+ item: o,
1584
+ idx: l,
1585
+ matches: [{ score: d, value: o, norm: c, indices: m }]
1586
1586
  });
1587
- }), n;
1587
+ }), r;
1588
1588
  }
1589
- _searchLogical(t) {
1590
- const e = me(t, this.options), s = (c, l, a) => {
1589
+ _searchLogical(e) {
1590
+ const t = Li(e, this.options), s = (c, u, d) => {
1591
1591
  if (!c.children) {
1592
- const { keyId: h, searcher: d } = c, p = this._findMatches({
1593
- key: this._keyStore.get(h),
1594
- value: this._myIndex.getValueForItemAtKeyId(l, h),
1595
- searcher: d
1592
+ const { keyId: v, searcher: $ } = c, E = this._findMatches({
1593
+ key: this._keyStore.get(v),
1594
+ value: this._myIndex.getValueForItemAtKeyId(u, v),
1595
+ searcher: $
1596
1596
  });
1597
- return p && p.length ? [
1597
+ return E && E.length ? [
1598
1598
  {
1599
- idx: a,
1600
- item: l,
1601
- matches: p
1599
+ idx: d,
1600
+ item: u,
1601
+ matches: E
1602
1602
  }
1603
1603
  ] : [];
1604
1604
  }
1605
- const u = [];
1606
- for (let h = 0, d = c.children.length; h < d; h += 1) {
1607
- const p = c.children[h], g = s(p, l, a);
1608
- if (g.length)
1609
- u.push(...g);
1610
- else if (c.operator === ct.AND)
1605
+ const m = [];
1606
+ for (let v = 0, $ = c.children.length; v < $; v += 1) {
1607
+ const E = c.children[v], j = s(E, u, d);
1608
+ if (j.length)
1609
+ m.push(...j);
1610
+ else if (c.operator === Lt.AND)
1611
1611
  return [];
1612
1612
  }
1613
- return u;
1614
- }, n = this._myIndex.records, r = {}, o = [];
1615
- return n.forEach(({ $: c, i: l }) => {
1616
- if (b(c)) {
1617
- let a = s(e, c, l);
1618
- a.length && (r[l] || (r[l] = { idx: l, item: c, matches: [] }, o.push(r[l])), a.forEach(({ matches: u }) => {
1619
- r[l].matches.push(...u);
1613
+ return m;
1614
+ }, r = this._myIndex.records, o = {}, l = [];
1615
+ return r.forEach(({ $: c, i: u }) => {
1616
+ if (xe(c)) {
1617
+ let d = s(t, c, u);
1618
+ d.length && (o[u] || (o[u] = { idx: u, item: c, matches: [] }, l.push(o[u])), d.forEach(({ matches: m }) => {
1619
+ o[u].matches.push(...m);
1620
1620
  }));
1621
1621
  }
1622
- }), o;
1622
+ }), l;
1623
1623
  }
1624
- _searchObjectList(t) {
1625
- const e = Mt(t, this.options), { keys: s, records: n } = this._myIndex, r = [];
1626
- return n.forEach(({ $: o, i: c }) => {
1627
- if (!b(o))
1624
+ _searchObjectList(e) {
1625
+ const t = xs(e, this.options), { keys: s, records: r } = this._myIndex, o = [];
1626
+ return r.forEach(({ $: l, i: c }) => {
1627
+ if (!xe(l))
1628
1628
  return;
1629
- let l = [];
1630
- s.forEach((a, u) => {
1631
- l.push(
1629
+ let u = [];
1630
+ s.forEach((d, m) => {
1631
+ u.push(
1632
1632
  ...this._findMatches({
1633
- key: a,
1634
- value: o[u],
1635
- searcher: e
1633
+ key: d,
1634
+ value: l[m],
1635
+ searcher: t
1636
1636
  })
1637
1637
  );
1638
- }), l.length && r.push({
1638
+ }), u.length && o.push({
1639
1639
  idx: c,
1640
- item: o,
1641
- matches: l
1640
+ item: l,
1641
+ matches: u
1642
1642
  });
1643
- }), r;
1643
+ }), o;
1644
1644
  }
1645
- _findMatches({ key: t, value: e, searcher: s }) {
1646
- if (!b(e))
1645
+ _findMatches({ key: e, value: t, searcher: s }) {
1646
+ if (!xe(t))
1647
1647
  return [];
1648
- let n = [];
1649
- if (k(e))
1650
- e.forEach(({ v: r, i: o, n: c }) => {
1651
- if (!b(r))
1648
+ let r = [];
1649
+ if (Re(t))
1650
+ t.forEach(({ v: o, i: l, n: c }) => {
1651
+ if (!xe(o))
1652
1652
  return;
1653
- const { isMatch: l, score: a, indices: u } = s.searchIn(r);
1654
- l && n.push({
1655
- score: a,
1656
- key: t,
1657
- value: r,
1658
- idx: o,
1653
+ const { isMatch: u, score: d, indices: m } = s.searchIn(o);
1654
+ u && r.push({
1655
+ score: d,
1656
+ key: e,
1657
+ value: o,
1658
+ idx: l,
1659
1659
  norm: c,
1660
- indices: u
1660
+ indices: m
1661
1661
  });
1662
1662
  });
1663
1663
  else {
1664
- const { v: r, n: o } = e, { isMatch: c, score: l, indices: a } = s.searchIn(r);
1665
- c && n.push({ score: l, key: t, value: r, norm: o, indices: a });
1664
+ const { v: o, n: l } = t, { isMatch: c, score: u, indices: d } = s.searchIn(o);
1665
+ c && r.push({ score: u, key: e, value: o, norm: l, indices: d });
1666
1666
  }
1667
- return n;
1667
+ return r;
1668
1668
  }
1669
1669
  }
1670
- K.version = "6.6.2";
1671
- K.createIndex = de;
1672
- K.parseIndex = is;
1673
- K.config = f;
1674
- K.parseQuery = me;
1675
- ys(_s);
1676
- var nt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1677
- function Ss(i) {
1670
+ st.version = "6.6.2";
1671
+ st.createIndex = Si;
1672
+ st.parseIndex = yn;
1673
+ st.config = D;
1674
+ st.parseQuery = Li;
1675
+ Dn(Tn);
1676
+ var at = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1677
+ function Ti(i) {
1678
1678
  return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
1679
1679
  }
1680
- var ws = "Expected a function", te = 0 / 0, Ms = "[object Symbol]", Cs = /^\s+|\s+$/g, Rs = /^[-+]0x[0-9a-f]+$/i, Is = /^0b[01]+$/i, ks = /^0o[0-7]+$/i, Os = parseInt, Ts = typeof nt == "object" && nt && nt.Object === Object && nt, Ls = typeof self == "object" && self && self.Object === Object && self, Ns = Ts || Ls || Function("return this")(), Ps = Object.prototype, js = Ps.toString, Hs = Math.max, Us = Math.min, vt = function() {
1681
- return Ns.Date.now();
1680
+ var Un = "Expected a function", gi = 0 / 0, Fn = "[object Symbol]", Bn = /^\s+|\s+$/g, zn = /^[-+]0x[0-9a-f]+$/i, Wn = /^0b[01]+$/i, Vn = /^0o[0-7]+$/i, Yn = parseInt, Kn = typeof at == "object" && at && at.Object === Object && at, qn = typeof self == "object" && self && self.Object === Object && self, Xn = Kn || qn || Function("return this")(), Jn = Object.prototype, Gn = Jn.toString, Zn = Math.max, Qn = Math.min, fs = function() {
1681
+ return Xn.Date.now();
1682
1682
  };
1683
- function Fs(i, t, e) {
1684
- var s, n, r, o, c, l, a = 0, u = !1, h = !1, d = !0;
1683
+ function eo(i, e, t) {
1684
+ var s, r, o, l, c, u, d = 0, m = !1, v = !1, $ = !0;
1685
1685
  if (typeof i != "function")
1686
- throw new TypeError(ws);
1687
- t = ee(t) || 0, It(e) && (u = !!e.leading, h = "maxWait" in e, r = h ? Hs(ee(e.maxWait) || 0, t) : r, d = "trailing" in e ? !!e.trailing : d);
1688
- function p(y) {
1689
- var $ = s, E = n;
1690
- return s = n = void 0, a = y, o = i.apply(E, $), o;
1686
+ throw new TypeError(Un);
1687
+ e = vi(e) || 0, Es(t) && (m = !!t.leading, v = "maxWait" in t, o = v ? Zn(vi(t.maxWait) || 0, e) : o, $ = "trailing" in t ? !!t.trailing : $);
1688
+ function E(F) {
1689
+ var X = s, ie = r;
1690
+ return s = r = void 0, d = F, l = i.apply(ie, X), l;
1691
1691
  }
1692
- function g(y) {
1693
- return a = y, c = setTimeout(A, t), u ? p(y) : o;
1692
+ function j(F) {
1693
+ return d = F, c = setTimeout(le, e), m ? E(F) : l;
1694
1694
  }
1695
- function v(y) {
1696
- var $ = y - l, E = y - a, S = t - $;
1697
- return h ? Us(S, r - E) : S;
1695
+ function G(F) {
1696
+ var X = F - u, ie = F - d, z = e - X;
1697
+ return v ? Qn(z, o - ie) : z;
1698
1698
  }
1699
- function M(y) {
1700
- var $ = y - l, E = y - a;
1701
- return l === void 0 || $ >= t || $ < 0 || h && E >= r;
1699
+ function ve(F) {
1700
+ var X = F - u, ie = F - d;
1701
+ return u === void 0 || X >= e || X < 0 || v && ie >= o;
1702
1702
  }
1703
- function A() {
1704
- var y = vt();
1705
- if (M(y))
1706
- return R(y);
1707
- c = setTimeout(A, v(y));
1703
+ function le() {
1704
+ var F = fs();
1705
+ if (ve(F))
1706
+ return me(F);
1707
+ c = setTimeout(le, G(F));
1708
1708
  }
1709
- function R(y) {
1710
- return c = void 0, d && s ? p(y) : (s = n = void 0, o);
1709
+ function me(F) {
1710
+ return c = void 0, $ && s ? E(F) : (s = r = void 0, l);
1711
1711
  }
1712
- function I() {
1713
- c !== void 0 && clearTimeout(c), a = 0, s = l = n = c = void 0;
1712
+ function pe() {
1713
+ c !== void 0 && clearTimeout(c), d = 0, s = u = r = c = void 0;
1714
1714
  }
1715
- function D() {
1716
- return c === void 0 ? o : R(vt());
1715
+ function Ee() {
1716
+ return c === void 0 ? l : me(fs());
1717
1717
  }
1718
- function G() {
1719
- var y = vt(), $ = M(y);
1720
- if (s = arguments, n = this, l = y, $) {
1718
+ function ye() {
1719
+ var F = fs(), X = ve(F);
1720
+ if (s = arguments, r = this, u = F, X) {
1721
1721
  if (c === void 0)
1722
- return g(l);
1723
- if (h)
1724
- return c = setTimeout(A, t), p(l);
1722
+ return j(u);
1723
+ if (v)
1724
+ return c = setTimeout(le, e), E(u);
1725
1725
  }
1726
- return c === void 0 && (c = setTimeout(A, t)), o;
1726
+ return c === void 0 && (c = setTimeout(le, e)), l;
1727
1727
  }
1728
- return G.cancel = I, G.flush = D, G;
1728
+ return ye.cancel = pe, ye.flush = Ee, ye;
1729
1729
  }
1730
- function It(i) {
1731
- var t = typeof i;
1732
- return !!i && (t == "object" || t == "function");
1730
+ function Es(i) {
1731
+ var e = typeof i;
1732
+ return !!i && (e == "object" || e == "function");
1733
1733
  }
1734
- function Ds(i) {
1734
+ function to(i) {
1735
1735
  return !!i && typeof i == "object";
1736
1736
  }
1737
- function zs(i) {
1738
- return typeof i == "symbol" || Ds(i) && js.call(i) == Ms;
1737
+ function so(i) {
1738
+ return typeof i == "symbol" || to(i) && Gn.call(i) == Fn;
1739
1739
  }
1740
- function ee(i) {
1740
+ function vi(i) {
1741
1741
  if (typeof i == "number")
1742
1742
  return i;
1743
- if (zs(i))
1744
- return te;
1745
- if (It(i)) {
1746
- var t = typeof i.valueOf == "function" ? i.valueOf() : i;
1747
- i = It(t) ? t + "" : t;
1743
+ if (so(i))
1744
+ return gi;
1745
+ if (Es(i)) {
1746
+ var e = typeof i.valueOf == "function" ? i.valueOf() : i;
1747
+ i = Es(e) ? e + "" : e;
1748
1748
  }
1749
1749
  if (typeof i != "string")
1750
1750
  return i === 0 ? i : +i;
1751
- i = i.replace(Cs, "");
1752
- var e = Is.test(i);
1753
- return e || ks.test(i) ? Os(i.slice(2), e ? 2 : 8) : Rs.test(i) ? te : +i;
1754
- }
1755
- var Bs = Fs;
1756
- const Ws = /* @__PURE__ */ Ss(Bs), Vs = (i, t = "highlight", e = "title") => {
1757
- const s = (r, o, c) => {
1758
- const l = o.split(".");
1759
- let a;
1760
- for (a = 0; a < l.length - 1; a++)
1761
- r = r[l[a]];
1762
- r[l[a]] = c;
1763
- }, n = (r, o = []) => {
1764
- let c = "", l = 0;
1765
- return o.forEach((a) => {
1766
- const u = a[1] + 1;
1751
+ i = i.replace(Bn, "");
1752
+ var t = Wn.test(i);
1753
+ return t || Vn.test(i) ? Yn(i.slice(2), t ? 2 : 8) : zn.test(i) ? gi : +i;
1754
+ }
1755
+ var io = eo;
1756
+ const ro = /* @__PURE__ */ Ti(io);
1757
+ (() => {
1758
+ var i = Object.defineProperty, e = Math.pow, t = (n, h, f) => h in n ? i(n, h, { enumerable: !0, configurable: !0, writable: !0, value: f }) : n[h] = f, s = (n, h, f) => (t(n, typeof h != "symbol" ? h + "" : h, f), f), r = (n, h) => ` ${h && h.length > 0 ? h.map((f) => `<link rel="stylesheet" href="${f}" />`).join("") : ""} <style> ${n} </style> <div class="range-slider-box"> <div class="row"> <div id="range-slider" class="range-slider"> <div class="container"> <div class="panel"></div> <div class="panel-fill"></div> <div class="container"> <div class="pointer" tabindex="0" role="slider"> <div class="pointer-shape"></div> </div> </div> </div> </div> </div> </div>`, o = ":host{--width:300px;--height:.25rem;--opacity:.4;--panel-bg:#cbd5e1;--panel-bg-hover:#94a3b8;--panel-bg-fill:#475569;--panel-bg-border-radius:1rem;--pointer-width:1rem;--pointer-height:1rem;--pointer-bg:#fff;--pointer-bg-hover:#dcdcdc;--pointer-bg-focus:#dcdcdc;--pointer-shadow:0 0 2px rgba(0,0,0,0.8);--pointer-shadow-hover:0 0 2px #000;--pointer-shadow-focus:var(--pointer-shadow-hover);--pointer-border:1px solid hsla(0,0%,88%,0.5);--pointer-border-hover:1px solid #94a3b8;--pointer-border-focus:var(--pointer-border-hover);--pointer-border-radius:100%;--animate-onclick:.3s}:host{max-width:100%}.range-slider-box{display:flex;position:relative;flex-direction:column}.range-slider{position:relative;width:var(--width,100%);height:var(--height,0.25rem);touch-action:none;max-width:100%;box-sizing:border-box;cursor:pointer}.row{width:100%;display:flex;align-items:center}.range-slider.disabled{opacity:var(--opacity,0.4);cursor:default}.pointer.disabled{-webkit-filter:brightness(0.8);filter:brightness(0.8);cursor:default}.range-slider *{box-sizing:border-box}.container{position:absolute;width:100%;height:100%}.panel{position:absolute;z-index:10;width:100%;height:100%;background:var(--panel-bg,#2d4373);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;transition:.3s all ease}.panel-fill{background:var(--panel-bg-fill,#000);border-radius:var(--panel-bg-border-radius,1rem);overflow:hidden;height:100%;position:absolute;z-index:10}.panel:hover{background:var(--panel-bg-hover,#5f79b7)}.disabled .panel:hover{background:var(--panel-bg,#5f79b7)}.pointer{position:absolute;z-index:20;outline:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;box-shadow:var(--pointer-shadow);border:var(--pointer-border);border-radius:var(--pointer-border-radius,100%);-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pointer-width,15px);height:var(--pointer-height,15px);transition:.3s all ease}.pointer-shape:hover{background:var(--pointer-bg-hover,#fff);background-size:contain;border:var(--pointer-border-hover);box-shadow:var(--pointer-shadow-hover)}.disabled .pointer-shape:hover{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.pointer:focus .pointer-shape{background:var(--pointer-bg-focus,#fff);background-size:contain;border:var(--pointer-border-focus);box-shadow:var(--pointer-shadow-focus)}.disabled .pointer:focus .pointer-shape{background:var(--pointer-bg,#fff);background-size:contain;border:var(--pointer-border);box-shadow:var(--pointer-shadow)}.type-vertical .range-slider{--width:.25rem;--height:300px;max-height:100%}.type-vertical .range-slider .pointer{left:50%}.type-vertical .range-slider .panel-fill{width:100%}.type-vertical.range-slider-box{flex-direction:row}.type-vertical .row{flex-direction:column}.animate-on-click .pointer,.animate-on-click .panel-fill{transition:all var(--animate-onclick)}.range-dragging .panel-fill{cursor:move}", l = "pointers-overlap", c = "pointers-min-distance", u = "pointers-max-distance", d = "range-dragging", m = "data", v = "min", $ = "max", E = "step", j = "round", G = "type", ve = "theme", le = "rtl", me = "btt", pe = "disabled", Ee = "keyboard-disabled", ye = "mousewheel-disabled", F = "slider-width", X = "slider-height", ie = "slider-radius", z = "slider-bg", B = "slider-bg-hover", Oe = "slider-bg-fill", Me = "pointer-width", T = "pointer-height", y = "pointer-radius", b = "pointer-bg", k = "pointer-bg-hover", _ = "pointer-bg-focus", P = "pointer-shadow", R = "pointer-shadow-hover", V = "pointer-shadow-focus", se = "pointer-border", Q = "pointer-border-hover", he = "pointer-border-focus", Se = "animate-onclick", ke = "css-links", ue = "vertical", we = "horizontal", Le = (n, h, f, p, x) => {
1759
+ let C = h - n;
1760
+ return C === 0 ? f : (p - f) * (x - n) / C + f;
1761
+ }, ee = (n) => !isNaN(parseFloat(n)) && isFinite(n), K = (n, h) => ee(n) ? Number(n) : h, Ke = (n, h) => h === 0 ? 0 : Math.round(n / h) * h, qe = (n, h = 1 / 0) => {
1762
+ if (h === 1 / 0)
1763
+ return n;
1764
+ let f = e(10, h);
1765
+ return Math.round(n * f) / f;
1766
+ }, de = (n) => n == null ? !1 : typeof n == "boolean" ? n : n.trim().toLowerCase() === "true", Ri = (n, h) => {
1767
+ n.dispatchEvent(new CustomEvent("onPointerClicked", { detail: { $pointer: h } }));
1768
+ }, Pi = (n, h) => {
1769
+ n.dispatchEvent(new CustomEvent("onMouseDown", { detail: { nativeEvent: h } }));
1770
+ }, Ii = (n, h) => {
1771
+ n.dispatchEvent(new CustomEvent("onMouseUp", { detail: { nativeEvent: h } }));
1772
+ }, Ni = (n, h) => {
1773
+ n.dispatchEvent(new CustomEvent("onKeyDown", { detail: { nativeEvent: h } }));
1774
+ }, ji = (n, h) => {
1775
+ if (!h || h.length <= 0)
1776
+ return;
1777
+ let f = h.map((x) => ee(x) ? K(x, x) : x), p = { values: f || [] };
1778
+ p.value = f[0], p.value0 = f[0], p.value1 = f[0];
1779
+ for (let x = 1; x < f.length; x++)
1780
+ p[`value${x + 1}`] = f[x];
1781
+ n.dispatchEvent(new CustomEvent("change", { detail: p }));
1782
+ }, Pt = (n, h, f) => {
1783
+ let p = 0, x, C, I, w, A = !1, N = (L, J, ce, ae, re, ne) => {
1784
+ let be = p;
1785
+ ce !== void 0 && L > ce && (L = ce), J !== void 0 && L < J && (L = J), p = L;
1786
+ let $e = p;
1787
+ return (ae === ue && ne || ae === we && re) && ($e = 100 - $e), ae === ue ? h.style.top = `${$e}%` : h.style.left = `${$e}%`, be !== p;
1788
+ }, U = (L) => L === h || h.contains(L), S = (L, J, ce, ae) => {
1789
+ x = L, C = J, I = ce, w = ae;
1790
+ }, Y = (L) => {
1791
+ A = L, h.classList.toggle("disabled", A), A ? h.setAttribute("aria-disabled", "true") : h.hasAttribute("aria-disabled") && h.removeAttribute("aria-disabled");
1792
+ }, Ae = (L, J) => {
1793
+ J == null ? h.removeAttribute(L) : h.setAttribute(L, J);
1794
+ }, fe = (L) => h.getAttribute(L), O = (L) => {
1795
+ if (!A) {
1796
+ switch (L.key) {
1797
+ case "ArrowLeft": {
1798
+ L.preventDefault(), typeof x == "function" && x(f);
1799
+ break;
1800
+ }
1801
+ case "ArrowRight": {
1802
+ L.preventDefault(), typeof C == "function" && C(f);
1803
+ break;
1804
+ }
1805
+ case "ArrowUp": {
1806
+ L.preventDefault(), typeof I == "function" && I(f);
1807
+ break;
1808
+ }
1809
+ case "ArrowDown": {
1810
+ L.preventDefault(), typeof w == "function" && w(f);
1811
+ break;
1812
+ }
1813
+ }
1814
+ Ni(n, L);
1815
+ }
1816
+ }, H = () => {
1817
+ A || Ri(n, h);
1818
+ };
1819
+ return h.className = `pointer pointer-${f}`, h.addEventListener("keydown", O), h.addEventListener("click", H), { $pointer: h, get percent() {
1820
+ return p;
1821
+ }, get disabled() {
1822
+ return A;
1823
+ }, set disabled(L) {
1824
+ Y(L);
1825
+ }, updatePosition: N, isClicked: U, setCallbacks: S, setAttr: Ae, getAttr: fe, destroy: () => {
1826
+ h.removeEventListener("keydown", O), h.removeEventListener("click", H), h.remove();
1827
+ } };
1828
+ }, Hi = (n) => {
1829
+ if (n == null)
1830
+ return;
1831
+ if (Array.isArray(n))
1832
+ return n;
1833
+ if (n.trim() === "")
1834
+ return;
1835
+ let h = n.split(","), f = [], p = !0;
1836
+ for (let x = 0; x < h.length; x++) {
1837
+ let C = h[x].trim();
1838
+ C !== "" && (f.push(C), ee(C) || (p = !1));
1839
+ }
1840
+ return p ? f.map((x) => Number(x)) : f;
1841
+ }, Ui = (n, h) => h ? h.findIndex((f) => f === n || f.toString().trim() === n.toString().trim()) : -1, Fi = (n) => ({ updatePosition: (h, f, p, x) => {
1842
+ if (f.length <= 0)
1843
+ return;
1844
+ let C = f.length === 1, I = f[0], w = f[f.length - 1];
1845
+ h === ue ? (n.style.removeProperty("width"), n.style.removeProperty("right"), n.style.removeProperty("left"), C ? n.style.height = `${I}%` : n.style.height = `${Math.abs(I - w)}%`, x ? (n.style.bottom = "0%", C ? n.style.top = "auto" : n.style.top = `${Math.min(100 - w, 100 - I)}%`) : (n.style.bottom = "auto", C ? n.style.top = "0%" : n.style.top = `${Math.min(I, w)}%`)) : (n.style.removeProperty("height"), n.style.removeProperty("top"), n.style.removeProperty("bottom"), C ? n.style.width = `${I}%` : n.style.width = `${Math.abs(I - w)}%`, p ? (n.style.right = "0%", C ? n.style.left = "auto" : n.style.left = `${Math.min(100 - w, 100 - I)}%`) : (n.style.right = "auto", C ? n.style.left = "0%" : n.style.left = `${Math.min(I, w)}%`));
1846
+ } }), ks = "--animate-onclick", Bi = "--width", zi = "--height", Wi = "--panel-bg-border-radius", Vi = "--panel-bg", Yi = "--panel-bg-hover", Ki = "--panel-bg-fill", qi = "--pointer-width", Xi = "--pointer-height", Ji = "--pointer-border-radius", Gi = "--pointer-bg", Zi = "--pointer-bg-hover", Qi = "--pointer-bg-focus", er = "--pointer-shadow", tr = "--pointer-shadow-hover", sr = "--pointer-shadow-focus", ir = "--pointer-border", rr = "--pointer-border-hover", nr = "--pointer-border-focus", ft = (n, h, f) => {
1847
+ let p = /* @__PURE__ */ new Map();
1848
+ for (let x of n.attributes) {
1849
+ let C = x.nodeName.trim().toLowerCase();
1850
+ if (!h.test(C))
1851
+ continue;
1852
+ let I = C.replace(/\D/g, "").trim(), w = I === "" || I === "0" || I === "1" ? 0 : K(I, 0) - 1, A = f && typeof f == "function" ? f(x.value) : x.value;
1853
+ p.set(w, A);
1854
+ }
1855
+ return p;
1856
+ }, or = (n) => {
1857
+ if (!n)
1858
+ return null;
1859
+ let h = n.getAttribute(ke);
1860
+ if (!h)
1861
+ return null;
1862
+ let f = h.split(";"), p = [];
1863
+ for (let x of f)
1864
+ x.trim() !== "" && p.push(x.trim());
1865
+ return p;
1866
+ }, Cs = [[Bi, F, "sliderWidth", null], [zi, X, "sliderHeight", null], [Wi, ie, "sliderRadius", null], [Vi, z, "sliderBg", null], [Yi, B, "sliderBgHover", null], [Ki, Oe, "sliderBgFill", null], [qi, Me, "pointer#Width", /^pointer([0-9]*)-width$/], [Xi, T, "pointer#Height", /^pointer([0-9]*)-height$/], [Ji, y, "pointer#Radius", /^pointer([0-9]*)-radius$/], [Gi, b, "pointer#Bg", /^pointer([0-9]*)-bg$/], [Zi, k, "pointer#BgHover", /^pointer([0-9]*)-bg-hover$/], [Qi, _, "pointer#BgFocus", /^pointer([0-9]*)-bg-focus$/], [er, P, "pointer#Shadow", /^pointer([0-9]*)-shadow$/], [tr, R, "pointer#ShadowHover", /^pointer([0-9]*)-shadow-hover$/], [sr, V, "pointer#ShadowFocus", /^pointer([0-9]*)-shadow-focus$/], [ir, se, "pointer#Border", /^pointer([0-9]*)-border$/], [rr, Q, "pointer#BorderHover", /^pointer([0-9]*)-border-hover$/], [nr, he, "pointer#BorderFocus", /^pointer([0-9]*)-border-focus$/]], lr = (n, h, f) => {
1867
+ let p = null, x = [], C = /* @__PURE__ */ new Map(), I = (O, H = h) => {
1868
+ let L = [...H.classList];
1869
+ for (let J of L)
1870
+ J.startsWith(O) && h.classList.remove(J);
1871
+ }, w = () => {
1872
+ I("shape");
1873
+ let O = h.querySelectorAll(".pointer");
1874
+ for (let H of O)
1875
+ I("shape", H);
1876
+ }, A = (O) => {
1877
+ p = O, I("theme-"), typeof O == "string" && h.classList.add(`theme-${O}`);
1878
+ }, N = () => {
1879
+ if (w(), !(x.length <= 0)) {
1880
+ h.classList.add("shape", `shape-${x[0]}`);
1881
+ for (let O = 1; O < x.length; O++) {
1882
+ let H = x[O];
1883
+ if (!H)
1884
+ continue;
1885
+ let L = h.querySelector(`.pointer-${O}`);
1886
+ !L || L.classList.add("shape", `shape-${H}`);
1887
+ }
1888
+ }
1889
+ }, U = (O, H) => {
1890
+ x[O] = H, N();
1891
+ }, S = () => {
1892
+ w();
1893
+ let O = ft(n, /^pointer([0-9]*)-shape$/);
1894
+ if (!(O.size <= 0)) {
1895
+ for (let H of O) {
1896
+ let L = H[0];
1897
+ x[L] = H[1];
1898
+ }
1899
+ N();
1900
+ }
1901
+ }, Y = (O, H) => `${O}-${H}`, Ae = (O, H, L) => {
1902
+ let J = f[L];
1903
+ if (!J)
1904
+ return;
1905
+ let ce = L === 0 ? h : J.$pointer;
1906
+ if (H == null) {
1907
+ C.has(Y(O, L)) && C.delete(Y(O, L)), ce.style.removeProperty(O);
1908
+ return;
1909
+ }
1910
+ C.set(Y(O, L), H), ce.style.setProperty(O, H);
1911
+ }, fe = (O, H) => C.get(Y(O, H));
1912
+ return (() => {
1913
+ for (let O of Cs) {
1914
+ let [H, L, J, ce] = O;
1915
+ if (ce) {
1916
+ let re = ft(n, ce);
1917
+ for (let ne of re) {
1918
+ let be = ne[0], $e = ne[1];
1919
+ Ae(H, $e, be);
1920
+ }
1921
+ } else {
1922
+ let re = n.getAttribute(L);
1923
+ Ae(H, re, 0);
1924
+ }
1925
+ let ae = [];
1926
+ if (J.indexOf("#") === -1)
1927
+ ae.push([J, 0]);
1928
+ else {
1929
+ ae.push([J.replace("#", ""), 0]), ae.push([J.replace("#", "0"), 0]), ae.push([J.replace("#", "1"), 0]);
1930
+ for (let re = 1; re < f.length; re++)
1931
+ ae.push([J.replace("#", (re + 1).toString()), re]);
1932
+ }
1933
+ for (let re of ae)
1934
+ try {
1935
+ let ne = re[0], be = re[1];
1936
+ Object.prototype.hasOwnProperty.call(n, ne) || Object.defineProperty(n, ne, { get() {
1937
+ return fe(H, be);
1938
+ }, set: ($e) => {
1939
+ Ae(H, $e, be);
1940
+ } });
1941
+ } catch (ne) {
1942
+ console.error(ne);
1943
+ }
1944
+ }
1945
+ A(n.getAttribute(ve)), S();
1946
+ })(), { setStyle: Ae, getStyle: fe, get theme() {
1947
+ return p;
1948
+ }, set theme(O) {
1949
+ A(O);
1950
+ }, get pointerShapes() {
1951
+ return x;
1952
+ }, setPointerShape: U };
1953
+ }, Xe = "animate-on-click", Os = "range-dragging", ar = (n, h, f, p) => {
1954
+ let x = [], C = (U) => {
1955
+ for (let S of x)
1956
+ S.update && typeof S.update == "function" && S.update(U);
1957
+ }, I = () => {
1958
+ for (let U of x)
1959
+ U.destroy && typeof U.destroy == "function" && U.destroy();
1960
+ }, w = (U, S) => {
1961
+ for (let Y of x)
1962
+ Y.onAttrChange && typeof Y.onAttrChange == "function" && Y.onAttrChange(U, S);
1963
+ }, A = (U) => {
1964
+ if (U.gettersAndSetters) {
1965
+ for (let S of U.gettersAndSetters)
1966
+ if (!(!S.name || !S.attributes))
1967
+ try {
1968
+ Object.prototype.hasOwnProperty.call(n, S.name) || Object.defineProperty(n, S.name, S.attributes);
1969
+ } catch (Y) {
1970
+ console.error("defineSettersGetters error:", Y);
1971
+ }
1972
+ }
1973
+ }, N = (U) => {
1974
+ var S;
1975
+ if (!U.css)
1976
+ return;
1977
+ let Y = (S = n.shadowRoot) == null ? void 0 : S.querySelector("style");
1978
+ !Y || (Y.innerHTML += U.css);
1979
+ };
1980
+ return { init: () => {
1981
+ if (window.tcRangeSliderPlugins)
1982
+ for (let U of window.tcRangeSliderPlugins) {
1983
+ let S = U();
1984
+ x.push(S), S.init && typeof S.init == "function" && (S.init(n, h, f, p), A(S), N(S));
1985
+ }
1986
+ }, update: C, onAttrChange: w, destroy: I };
1987
+ }, hr = 10, cr = (n, h) => {
1988
+ let f = /* @__PURE__ */ new Map(), p = /^value([0-9]*)$/;
1989
+ for (let w of n.attributes) {
1990
+ let A = w.nodeName.trim().toLowerCase();
1991
+ if (!p.test(A))
1992
+ continue;
1993
+ let N = A.replace("value", "").trim(), U = N === "" || N === "0" || N === "1" ? 0 : K(N, 0) - 1, S = ee(w.value) ? K(w.value, 0) : w.value;
1994
+ f.set(U, S);
1995
+ }
1996
+ let x = Math.max(...Array.from(f.keys())), C = [];
1997
+ C.push([Pt(n, h, 0), f.get(0)]);
1998
+ let I = h;
1999
+ for (let w = 1; w <= x; w++) {
2000
+ let A = h.cloneNode(!0);
2001
+ I.after(A), I = A, C.push([Pt(n, A, w), f.get(w)]);
2002
+ }
2003
+ return C;
2004
+ }, Ls = (n, h, f, p, x, C, I) => {
2005
+ try {
2006
+ Object.defineProperty(n, p, { configurable: !0, get() {
2007
+ if (!h)
2008
+ return;
2009
+ let w = h.pointers[f];
2010
+ if (!w)
2011
+ return;
2012
+ let A = h.getTextValue(w.percent);
2013
+ return ee(A) ? K(A, A) : A;
2014
+ }, set: (w) => {
2015
+ h.pointers[f] ? h == null || h.setValue(w, f) : h == null || h.addPointer(w);
2016
+ } }), Object.defineProperty(n, x, { configurable: !0, get() {
2017
+ var w, A;
2018
+ return (A = (w = h == null ? void 0 : h.pointers[f]) == null ? void 0 : w.getAttr("aria-label")) != null ? A : void 0;
2019
+ }, set: (w) => {
2020
+ !h || h.setAriaLabel(f, w);
2021
+ } }), Object.defineProperty(n, C, { configurable: !0, get() {
2022
+ var w, A;
2023
+ return (A = (w = h == null ? void 0 : h.styles) == null ? void 0 : w.pointerShapes[f]) != null ? A : null;
2024
+ }, set: (w) => {
2025
+ !h || !h.styles || h.styles.setPointerShape(f, w);
2026
+ } }), Object.defineProperty(n, I, { configurable: !0, get() {
2027
+ var w;
2028
+ return (w = h == null ? void 0 : h.pointers[f].disabled) != null ? w : !1;
2029
+ }, set: (w) => {
2030
+ if (!h)
2031
+ return;
2032
+ let A = h == null ? void 0 : h.pointers[f];
2033
+ !A || (A.disabled = w);
2034
+ } });
2035
+ } catch (w) {
2036
+ console.error(w);
2037
+ }
2038
+ }, ur = (n, h) => {
2039
+ let f = [["value", "ariaLabel", "pointerShape", "pointerDisabled", 0], ["value0", "ariaLabel0", "pointerShape0", "pointer0Disabled", 0], ["value1", "ariaLabel1", "pointerShape1", "pointer1Disabled", 0]];
2040
+ for (let p = 2; p < hr; p++)
2041
+ f.push([`value${p}`, `ariaLabel${p}`, `pointer${p}Shape`, `pointer${p}Disabled`, p - 1]);
2042
+ for (let p of f)
2043
+ Ls(n, h, p[4], p[0], p[1], p[2], p[3]);
2044
+ }, Ts = (n, h, f) => {
2045
+ var p;
2046
+ let x = (p = f.shadowRoot) == null ? void 0 : p.querySelector(".container");
2047
+ if (x)
2048
+ for (let C of n)
2049
+ h ? x.prepend(C.$pointer) : x.append(C.$pointer);
2050
+ }, It = 0, it = 100, Je = 2, Ds = "0.3s", dr = (n, h, f) => {
2051
+ let p = f.map((a) => a[0]), x = null, C = null, I = null, w = null, A = It, N = it, U, S, Y = we, Ae = Je, fe = !1, O = !1, H = !1, L = 0, J = 1 / 0, ce = !1, ae, re, ne = !1, be = !1, $e = !1, Ie = Ds, Rs = [], Ps = (a) => {
2052
+ ne || (a.preventDefault && a.preventDefault(), Ue(a), window.addEventListener("mousemove", Ue), window.addEventListener("mouseup", gt), Pi(n, a));
2053
+ }, gt = (a) => {
2054
+ ne || (ae = void 0, re = void 0, window.removeEventListener("mousemove", Ue), window.removeEventListener("mouseup", gt), Ie && h.classList.add(Xe), Ii(n, a));
2055
+ }, gr = (a, g) => {
2056
+ if (p.length <= 0)
2057
+ return;
2058
+ if (p.length === 1)
2059
+ return p[0].isClicked(a) && Ie && h.classList.remove(Xe), p[0];
2060
+ let M = mr(a);
2061
+ if (ce) {
2062
+ let W = g, Ce = mt(W);
2063
+ Ce !== void 0 && (W = Ke(W, Ce)), M ? (ae = W, re = 0, Ie && h.classList.remove(Xe)) : ae !== void 0 && (re = W - ae, ae = W);
2064
+ }
2065
+ if (!vr(a) && !M) {
2066
+ for (let W of p)
2067
+ if (!(!W.isClicked(a) || W.disabled))
2068
+ return Ie && h.classList.remove(Xe), W;
2069
+ for (let W of p)
2070
+ if (x === W)
2071
+ return W;
2072
+ }
2073
+ let q = 1 / 0, oe = null;
2074
+ for (let W of p) {
2075
+ if (W.disabled)
2076
+ continue;
2077
+ let Ce = Math.abs(g - W.percent);
2078
+ Ce < q && (q = Ce, oe = W);
2079
+ }
2080
+ return oe;
2081
+ }, Is = () => p.findIndex((a) => x === a && !a.disabled), Ue = (a) => {
2082
+ let g;
2083
+ if (Y === ue) {
2084
+ let { height: q, top: oe } = h.getBoundingClientRect(), W = a.type.indexOf("mouse") !== -1 ? a.clientY : a.touches[0].clientY;
2085
+ g = Math.min(Math.max(0, W - oe), q) * 100 / q;
2086
+ } else {
2087
+ let { width: q, left: oe } = h.getBoundingClientRect(), W = a.type.indexOf("mouse") !== -1 ? a.clientX : a.touches[0].clientX;
2088
+ g = Math.min(Math.max(0, W - oe), q) * 100 / q;
2089
+ }
2090
+ if ((fe || O) && (g = 100 - g), x = gr(a.target, g), ce && p.length > 1 && re !== void 0) {
2091
+ let q = p[0], oe = p[p.length - 1], W = q.percent + re < 0, Ce = oe.percent + re > 100;
2092
+ if (W || Ce)
2093
+ return;
2094
+ for (let Et = 0; Et < p.length; Et++)
2095
+ _e(Et, p[Et].percent + re);
2096
+ return;
2097
+ }
2098
+ let M = Is();
2099
+ M !== -1 && (_e(M, g), x == null || x.$pointer.focus());
2100
+ }, vt = (a) => {
2101
+ if (ne || document.activeElement !== n || x != null && x.disabled)
2102
+ return;
2103
+ a.stopPropagation(), a.preventDefault();
2104
+ let g = a.deltaY < 0, M = fe || O, q = g ? !M : M, oe = Is();
2105
+ oe !== -1 && (q ? rt(oe, p[oe].percent) : nt(oe, p[oe].percent));
2106
+ }, Ns = (a) => {
2107
+ ne || be || (Y === ue ? O ? _e(a, 100) : _e(a, 0) : fe ? nt(a, p[a].percent) : rt(a, p[a].percent));
2108
+ }, js = (a) => {
2109
+ ne || be || (Y === ue ? O ? _e(a, 0) : _e(a, 100) : fe ? rt(a, p[a].percent) : nt(a, p[a].percent));
2110
+ }, Hs = (a) => {
2111
+ ne || be || (Y === ue ? O ? nt(a, p[a].percent) : rt(a, p[a].percent) : fe ? _e(a, 100) : _e(a, 0));
2112
+ }, Us = (a) => {
2113
+ ne || be || (Y === ue ? O ? rt(a, p[a].percent) : nt(a, p[a].percent) : fe ? _e(a, 0) : _e(a, 100));
2114
+ }, vr = (a) => a.classList.contains("panel"), mr = (a) => a.classList.contains("panel-fill"), rt = (a, g) => {
2115
+ if (g === void 0)
2116
+ return;
2117
+ let M = mt(g);
2118
+ M == null && (M = 1), g -= M, g < 0 && (g = 0), _e(a, g);
2119
+ }, nt = (a, g) => {
2120
+ if (g === void 0)
2121
+ return;
2122
+ let M = mt(g);
2123
+ M == null && (M = 1), g += M, g > 100 && (g = 100), _e(a, g);
2124
+ }, Fe = () => {
2125
+ !w || w.update({ percents: Fs(), values: Bs(), $pointers: zs(), min: Ws(), max: Vs(), data: Ht(), step: jt(), round: Ft(), type: Ut(), textMin: yt(), textMax: bt(), rightToLeft: Wt(), bottomToTop: Vt(), pointersOverlap: Xt(), pointersMinDistance: Bt(), pointersMaxDistance: zt(), rangeDragging: Jt(), disabled: Yt(), keyboardDisabled: Kt(), mousewheelDisabled: qt() });
2126
+ }, yr = () => {
2127
+ Fe();
2128
+ }, br = (a) => {
2129
+ if (!(H || p.length <= 1 || N === A))
2130
+ if (a === 0) {
2131
+ let g = J * 100 / (N - A);
2132
+ return Math.max(0, p[a + 1].percent - g);
2133
+ } else {
2134
+ let g = L * 100 / (N - A);
2135
+ return Math.min(p[a - 1].percent + g, 100);
2136
+ }
2137
+ }, $r = (a) => {
2138
+ if (!(H || p.length <= 1 || N === A))
2139
+ if (a === p.length - 1) {
2140
+ let g = J * 100 / (N - A);
2141
+ return Math.min(p[a - 1].percent + g, 100);
2142
+ } else {
2143
+ let g = L * 100 / (N - A);
2144
+ return Math.max(0, p[a + 1].percent - g);
2145
+ }
2146
+ }, mt = (a) => {
2147
+ let g;
2148
+ if (typeof U == "function") {
2149
+ let M = Le(0, 100, A, N, a);
2150
+ g = U(M, a);
2151
+ } else
2152
+ g = U;
2153
+ if (ee(g)) {
2154
+ let M = N - A;
2155
+ return g = M === 0 ? 0 : g * 100 / M, g;
2156
+ }
2157
+ }, Ge = (a) => {
2158
+ if (a === void 0)
2159
+ return;
2160
+ let g = Le(0, 100, A, N, a);
2161
+ return S !== void 0 ? S[Math.round(g)] : qe(g, Ae);
2162
+ }, yt = () => S !== void 0 ? S[A] : A, bt = () => S !== void 0 ? S[N] : N, jt = () => U, _r = (a) => {
2163
+ var g;
2164
+ return a <= 0 || H ? yt() : (g = Ge(p[a - 1].percent)) != null ? g : "";
2165
+ }, xr = (a) => {
2166
+ var g;
2167
+ return p.length <= 1 || a >= p.length - 1 || H ? bt() : (g = Ge(p[a + 1].percent)) != null ? g : "";
2168
+ }, Fs = () => p.map((a) => a.percent), Bs = () => p.map((a) => Ge(a.percent)), zs = () => p.map((a) => a.$pointer), Ws = () => A, Vs = () => N, Ht = () => S, Ut = () => Y, Ft = () => Ae, Bt = () => L, zt = () => J, wr = (a) => Rs[a], Wt = () => fe, Vt = () => O, Yt = () => ne, Kt = () => be, qt = () => $e, Xt = () => H, Jt = () => ce, _e = (a, g) => {
2169
+ if (g === void 0)
2170
+ return;
2171
+ let M = mt(g);
2172
+ M !== void 0 && (g = Ke(g, M));
2173
+ let q = p[a];
2174
+ if (!q)
2175
+ return;
2176
+ let oe = q.updatePosition(g, br(a), $r(a), Y, fe, O);
2177
+ C == null || C.updatePosition(Y, p.map((W) => W.percent), fe, O), Fe();
2178
+ for (let W of p) {
2179
+ let Ce = Ge(W.percent);
2180
+ Ce !== void 0 && (W.setAttr("aria-valuenow", Ce.toString()), W.setAttr("aria-valuetext", Ce.toString()));
2181
+ }
2182
+ Er(), oe && ji(n, p.map((W) => Ge(W.percent)));
2183
+ }, Te = () => {
2184
+ for (let a = 0; a < p.length; a++)
2185
+ _e(a, p[a].percent);
2186
+ }, Ar = (a, g) => {
2187
+ A = S !== void 0 ? 0 : K(a, It), N = S !== void 0 ? S.length - 1 : K(g, it), $t(A), _t(N);
2188
+ }, Er = () => {
2189
+ var a, g;
2190
+ for (let M = 0; M < p.length; M++) {
2191
+ let q = p[M];
2192
+ q.setAttr("aria-valuemin", ((a = _r(M)) != null ? a : "").toString()), q.setAttr("aria-valuemax", ((g = xr(M)) != null ? g : "").toString());
2193
+ }
2194
+ }, $t = (a) => {
2195
+ A = K(a, It), A > N && (N = A + it), Te();
2196
+ }, _t = (a) => {
2197
+ N = K(a, it), N < A && (N = A + it), Te();
2198
+ }, Ys = (a) => {
2199
+ H = !0;
2200
+ for (let g = 0; g < a.length; g++)
2201
+ xt(a[g], g);
2202
+ H = !1;
2203
+ for (let g = 0; g < a.length; g++)
2204
+ xt(a[g], g);
2205
+ }, xt = (a, g) => {
2206
+ let M;
2207
+ S !== void 0 ? (M = a == null ? 0 : Ui(a, S), M === -1 && (M = 0)) : (M = K(a, A), M < A && (M = A), M > N && (M = N));
2208
+ let q = Le(A, N, 0, 100, M);
2209
+ _e(g, q);
2210
+ }, wt = (a) => {
2211
+ if (a == null) {
2212
+ U = void 0;
2213
+ return;
2214
+ }
2215
+ if (typeof a == "function") {
2216
+ U = a, Te();
2217
+ return;
2218
+ }
2219
+ if (ee(a)) {
2220
+ U = K(a, 1);
2221
+ let g = Math.abs(N - A);
2222
+ U > g && (U = void 0), Te();
2223
+ return;
2224
+ }
2225
+ U = void 0;
2226
+ }, Gt = (a) => {
2227
+ H = a, Te();
2228
+ }, Zt = (a) => {
2229
+ (!ee(a) || a < 0) && (a = 0), L = a;
2230
+ }, Qt = (a) => {
2231
+ (!ee(a) || a < 0) && (a = 1 / 0), J = a;
2232
+ }, es = (a) => {
2233
+ ne = a, h.classList.toggle("disabled", ne), ne ? h.setAttribute("aria-disabled", "true") : h.hasAttribute("aria-disabled") && h.removeAttribute("aria-disabled");
2234
+ }, Ks = (a) => {
2235
+ be = a;
2236
+ }, qs = (a) => {
2237
+ $e = a, $e ? document.removeEventListener("wheel", vt) : document.addEventListener("wheel", vt, { passive: !1 });
2238
+ }, ts = (a) => {
2239
+ if (a == null) {
2240
+ S = void 0;
2241
+ return;
2242
+ }
2243
+ if (S = Hi(a), S === void 0 || S.length <= 0) {
2244
+ S = void 0;
2245
+ return;
2246
+ }
2247
+ $t(0), _t(S.length - 1), U === void 0 && wt(1);
2248
+ }, ss = (a) => {
2249
+ var g;
2250
+ typeof a == "string" ? Y = a.trim().toLowerCase() === ue ? ue : we : Y = we;
2251
+ let M = (g = n.shadowRoot) == null ? void 0 : g.querySelector(".range-slider-box");
2252
+ if (!M)
2253
+ return;
2254
+ M.className = `range-slider-box type-${Y}`, Te();
2255
+ let q = Y === ue ? "vertical" : "horizontal";
2256
+ for (let oe of p)
2257
+ oe.setAttr("aria-orientation", q);
2258
+ }, is = (a) => {
2259
+ fe = a, p.length > 1 && Ts(p, fe, n), Te(), Fe();
2260
+ }, rs = (a) => {
2261
+ O = a, p.length > 1 && Ts(p, O, n), Te(), Fe();
2262
+ }, ns = (a) => {
2263
+ Ae = K(a, Je), Ae < 0 && (Ae = Je), Fe();
2264
+ }, Xs = (a) => {
2265
+ a == null || a.toString().trim().toLowerCase() === "false" ? (Ie = void 0, h.style.removeProperty(ks), h.classList.remove(Xe)) : (Ie = a.toString(), h.style.setProperty(ks, Ie), h.classList.add(Xe));
2266
+ }, Js = (a, g) => {
2267
+ let M = p[a];
2268
+ !M || (M.setAttr("aria-label", g), Rs[a] = g);
2269
+ }, At = (a) => {
2270
+ if (ae = void 0, p.length <= 1) {
2271
+ ce = !1, h.classList.remove(Os);
2272
+ return;
2273
+ }
2274
+ ce = a, h.classList.toggle(Os, ce);
2275
+ }, Mr = () => {
2276
+ es(de(n.getAttribute(pe))), be = de(n.getAttribute(Ee)), $e = de(n.getAttribute(ye));
2277
+ let a = ft(n, /^pointer([0-9]*)-disabled$/, (g) => de(g));
2278
+ for (let g of a) {
2279
+ let M = g[0];
2280
+ !p[M] || (p[M].disabled = g[1]);
2281
+ }
2282
+ }, Sr = () => {
2283
+ let a = ft(n, /^aria-label([0-9]*)$/);
2284
+ for (let g of a) {
2285
+ let M = g[0];
2286
+ Js(M, g[1]);
2287
+ }
2288
+ }, kr = (a) => {
2289
+ let g = p.length, M = p[g - 1].$pointer, q = M.cloneNode(!0);
2290
+ M.after(q);
2291
+ let oe = Pt(n, q, g);
2292
+ return oe.setCallbacks(Ns, js, Hs, Us), p.push(oe), xt(a, g), Te(), Fe(), g;
2293
+ }, Cr = () => {
2294
+ let a = p.length, g = p[a - 1];
2295
+ return g ? (g.destroy(), p.pop(), p.length <= 1 && At(!1), Te(), Fe(), a - 1) : -1;
2296
+ };
2297
+ return (() => {
2298
+ var a, g;
2299
+ for (let q of p)
2300
+ q.setCallbacks(Ns, js, Hs, Us);
2301
+ let M = (a = n.shadowRoot) == null ? void 0 : a.querySelector(".panel-fill");
2302
+ M && (C = Fi(M)), ss(n.getAttribute(G)), is(de(n.getAttribute(le))), rs(de(n.getAttribute(me))), Ar(n.getAttribute(v), n.getAttribute($)), wt(n.getAttribute(E)), ts(n.getAttribute(m)), Ys(f.map((q) => q[1])), Gt(de(n.getAttribute(l))), Zt(K(n.getAttribute(c), 0)), Qt(K(n.getAttribute(u), 1 / 0)), At(de(n.getAttribute(d))), ns(K(n.getAttribute(j), Je)), Mr(), Sr(), I = lr(n, h, p), Xs((g = n.getAttribute(Se)) != null ? g : Ds), h.addEventListener("mousedown", Ps), h.addEventListener("mouseup", gt), h.addEventListener("touchmove", Ue), h.addEventListener("touchstart", Ue), $e || document.addEventListener("wheel", vt, { passive: !1 }), w = ar(n, yr, { setValues: Ys, setMin: $t, setMax: _t, setStep: wt, setPointersOverlap: Gt, setPointersMinDistance: Zt, setPointersMaxDistance: Qt, setDisabled: es, setType: ss, setRightToLeft: is, setBottomToTop: rs, setRound: ns, setKeyboardDisabled: Ks, setMousewheelDisabled: qs, setRangeDragging: At, setData: ts }, { getPercents: Fs, getValues: Bs, getPointerElements: zs, getMin: Ws, getMax: Vs, getStep: jt, getData: Ht, getType: Ut, getRound: Ft, getTextMin: yt, getTextMax: bt, isRightToLeft: Wt, isBottomToTop: Vt, isDisabled: Yt, isKeyboardDisabled: Kt, isMousewheelDisabled: qt, isPointersOverlap: Xt, isRangeDraggingEnabled: Jt, getPointersMinDistance: Bt, getPointersMaxDistance: zt }), w.init();
2303
+ })(), { get pointers() {
2304
+ return p;
2305
+ }, get styles() {
2306
+ return I;
2307
+ }, get pluginsManager() {
2308
+ return w;
2309
+ }, get min() {
2310
+ return yt();
2311
+ }, get max() {
2312
+ return bt();
2313
+ }, get step() {
2314
+ return jt();
2315
+ }, get pointersOverlap() {
2316
+ return Xt();
2317
+ }, set pointersOverlap(a) {
2318
+ Gt(a);
2319
+ }, get pointersMinDistance() {
2320
+ return Bt();
2321
+ }, set pointersMinDistance(a) {
2322
+ Zt(a);
2323
+ }, get pointersMaxDistance() {
2324
+ return zt();
2325
+ }, set pointersMaxDistance(a) {
2326
+ Qt(a);
2327
+ }, get disabled() {
2328
+ return Yt();
2329
+ }, set disabled(a) {
2330
+ es(a);
2331
+ }, get data() {
2332
+ return Ht();
2333
+ }, get type() {
2334
+ return Ut();
2335
+ }, set type(a) {
2336
+ ss(a);
2337
+ }, get rightToLeft() {
2338
+ return Wt();
2339
+ }, set rightToLeft(a) {
2340
+ is(a);
2341
+ }, get bottomToTop() {
2342
+ return Vt();
2343
+ }, set bottomToTop(a) {
2344
+ rs(a);
2345
+ }, get round() {
2346
+ return Ft();
2347
+ }, set round(a) {
2348
+ ns(a);
2349
+ }, get animateOnClick() {
2350
+ return Ie;
2351
+ }, set animateOnClick(a) {
2352
+ Xs(a);
2353
+ }, get keyboardDisabled() {
2354
+ return Kt();
2355
+ }, set keyboardDisabled(a) {
2356
+ Ks(a);
2357
+ }, get mousewheelDisabled() {
2358
+ return qt();
2359
+ }, set mousewheelDisabled(a) {
2360
+ qs(a);
2361
+ }, get rangeDragging() {
2362
+ return Jt();
2363
+ }, set rangeDragging(a) {
2364
+ At(a);
2365
+ }, setMin: $t, setMax: _t, setValue: xt, setStep: wt, setData: ts, getTextValue: Ge, setAriaLabel: Js, getAriaLabel: wr, addPointer: kr, removePointer: Cr, destroy: () => {
2366
+ h.removeEventListener("mousedown", Ps), h.removeEventListener("mouseup", gt), h.removeEventListener("touchmove", Ue), h.removeEventListener("touchstart", Ue), document.removeEventListener("wheel", vt);
2367
+ for (let a of p)
2368
+ a.destroy();
2369
+ w == null || w.destroy();
2370
+ } };
2371
+ }, pr = (n, h, f) => {
2372
+ let p = Cs.find(([w, A, N, U]) => A.replace("#", "") === h.replace(/\d+/g, ""));
2373
+ if (p && n.styles) {
2374
+ let [w, A, N, U] = p, S = h.replace(/\D/g, "").trim(), Y = S === "" || S === "0" || S === "1" ? 0 : K(S, 0) - 1;
2375
+ n.styles.setStyle(w, f, Y);
2376
+ return;
2377
+ }
2378
+ switch (n && n.pluginsManager && n.pluginsManager.onAttrChange(h, f), h) {
2379
+ case v: {
2380
+ n.setMin(f);
2381
+ break;
2382
+ }
2383
+ case $: {
2384
+ n.setMax(f);
2385
+ break;
2386
+ }
2387
+ case E: {
2388
+ n.setStep(f);
2389
+ break;
2390
+ }
2391
+ case l: {
2392
+ n.pointersOverlap = de(f);
2393
+ break;
2394
+ }
2395
+ case c: {
2396
+ n.pointersMinDistance = K(f, 0);
2397
+ break;
2398
+ }
2399
+ case d: {
2400
+ n.rangeDragging = de(f);
2401
+ break;
2402
+ }
2403
+ case u: {
2404
+ n.pointersMaxDistance = K(f, 1 / 0);
2405
+ break;
2406
+ }
2407
+ case pe: {
2408
+ n.disabled = de(f);
2409
+ break;
2410
+ }
2411
+ case Ee: {
2412
+ n.keyboardDisabled = de(f);
2413
+ break;
2414
+ }
2415
+ case ye: {
2416
+ n.mousewheelDisabled = de(f);
2417
+ break;
2418
+ }
2419
+ case m: {
2420
+ n.setData(f);
2421
+ break;
2422
+ }
2423
+ case G: {
2424
+ n.type = f;
2425
+ break;
2426
+ }
2427
+ case le: {
2428
+ n.rightToLeft = de(f);
2429
+ break;
2430
+ }
2431
+ case me: {
2432
+ n.bottomToTop = de(f);
2433
+ break;
2434
+ }
2435
+ case j: {
2436
+ n.round = K(f, Je);
2437
+ break;
2438
+ }
2439
+ case ve: {
2440
+ n.styles && (n.styles.theme = f);
2441
+ break;
2442
+ }
2443
+ case Se: {
2444
+ n.animateOnClick = f;
2445
+ break;
2446
+ }
2447
+ }
2448
+ let x = null;
2449
+ if (/^value([0-9]*)$/.test(h) && (x = "value"), /^pointer([0-9]*)-disabled$/.test(h) && (x = "pointer-disabled"), /^aria-label([0-9]*)$/.test(h) && (x = "aria-label"), /^pointer([0-9]*)-shape$/.test(h) && (x = "pointer-shape"), !x)
2450
+ return;
2451
+ let C = h.replace(/\D/g, "").trim(), I = C === "" || C === "0" || C === "1" ? 0 : K(C, 0) - 1;
2452
+ switch (x) {
2453
+ case "value": {
2454
+ n.setValue(f, I);
2455
+ break;
2456
+ }
2457
+ case "pointer-disabled": {
2458
+ let w = n == null ? void 0 : n.pointers[I];
2459
+ if (!w)
2460
+ return;
2461
+ w.disabled = de(f);
2462
+ break;
2463
+ }
2464
+ case "aria-label": {
2465
+ n.setAriaLabel(I, f);
2466
+ break;
2467
+ }
2468
+ case "pointer-shape": {
2469
+ n.styles && n.styles.setPointerShape(I, f);
2470
+ break;
2471
+ }
2472
+ }
2473
+ }, fr = class extends HTMLElement {
2474
+ constructor() {
2475
+ super(), s(this, "slider"), s(this, "_externalCSSList", []), s(this, "_observer", null), this.attachShadow({ mode: "open" });
2476
+ }
2477
+ set step(n) {
2478
+ this.slider && this.slider.setStep(n);
2479
+ }
2480
+ get step() {
2481
+ var n;
2482
+ return (n = this.slider) == null ? void 0 : n.step;
2483
+ }
2484
+ set disabled(n) {
2485
+ this.slider && (this.slider.disabled = n);
2486
+ }
2487
+ get disabled() {
2488
+ var n, h;
2489
+ return (h = (n = this.slider) == null ? void 0 : n.disabled) != null ? h : !1;
2490
+ }
2491
+ set data(n) {
2492
+ var h;
2493
+ (h = this.slider) == null || h.setData(n);
2494
+ }
2495
+ get data() {
2496
+ var n;
2497
+ return (n = this.slider) == null ? void 0 : n.data;
2498
+ }
2499
+ set min(n) {
2500
+ var h;
2501
+ (h = this.slider) == null || h.setMin(n);
2502
+ }
2503
+ get min() {
2504
+ var n;
2505
+ return (n = this.slider) == null ? void 0 : n.min;
2506
+ }
2507
+ set max(n) {
2508
+ var h;
2509
+ (h = this.slider) == null || h.setMax(n);
2510
+ }
2511
+ get max() {
2512
+ var n;
2513
+ return (n = this.slider) == null ? void 0 : n.max;
2514
+ }
2515
+ set round(n) {
2516
+ !this.slider || (this.slider.round = n);
2517
+ }
2518
+ get round() {
2519
+ var n, h;
2520
+ return (h = (n = this.slider) == null ? void 0 : n.round) != null ? h : Je;
2521
+ }
2522
+ set type(n) {
2523
+ !this.slider || (this.slider.type = n ?? we);
2524
+ }
2525
+ get type() {
2526
+ var n;
2527
+ return ((n = this.slider) == null ? void 0 : n.type) || we;
2528
+ }
2529
+ set pointersOverlap(n) {
2530
+ !this.slider || (this.slider.pointersOverlap = n);
2531
+ }
2532
+ get pointersOverlap() {
2533
+ var n, h;
2534
+ return (h = (n = this.slider) == null ? void 0 : n.pointersOverlap) != null ? h : !1;
2535
+ }
2536
+ set pointersMinDistance(n) {
2537
+ !this.slider || (this.slider.pointersMinDistance = n);
2538
+ }
2539
+ get pointersMinDistance() {
2540
+ var n, h;
2541
+ return (h = (n = this.slider) == null ? void 0 : n.pointersMinDistance) != null ? h : 0;
2542
+ }
2543
+ set pointersMaxDistance(n) {
2544
+ !this.slider || (this.slider.pointersMaxDistance = n);
2545
+ }
2546
+ get pointersMaxDistance() {
2547
+ var n, h;
2548
+ return (h = (n = this.slider) == null ? void 0 : n.pointersMaxDistance) != null ? h : 1 / 0;
2549
+ }
2550
+ set theme(n) {
2551
+ !this.slider || !this.slider.styles || (this.slider.styles.theme = n);
2552
+ }
2553
+ get theme() {
2554
+ var n, h, f;
2555
+ return (f = (h = (n = this.slider) == null ? void 0 : n.styles) == null ? void 0 : h.theme) != null ? f : null;
2556
+ }
2557
+ set rtl(n) {
2558
+ !this.slider || (this.slider.rightToLeft = n);
2559
+ }
2560
+ get rtl() {
2561
+ var n, h;
2562
+ return (h = (n = this.slider) == null ? void 0 : n.rightToLeft) != null ? h : !1;
2563
+ }
2564
+ set btt(n) {
2565
+ !this.slider || (this.slider.bottomToTop = n);
2566
+ }
2567
+ get btt() {
2568
+ var n, h;
2569
+ return (h = (n = this.slider) == null ? void 0 : n.bottomToTop) != null ? h : !1;
2570
+ }
2571
+ set keyboardDisabled(n) {
2572
+ !this.slider || (this.slider.keyboardDisabled = n);
2573
+ }
2574
+ get keyboardDisabled() {
2575
+ var n, h;
2576
+ return (h = (n = this.slider) == null ? void 0 : n.keyboardDisabled) != null ? h : !1;
2577
+ }
2578
+ set mousewheelDisabled(n) {
2579
+ !this.slider || (this.slider.mousewheelDisabled = n);
2580
+ }
2581
+ get mousewheelDisabled() {
2582
+ var n, h;
2583
+ return (h = (n = this.slider) == null ? void 0 : n.mousewheelDisabled) != null ? h : !1;
2584
+ }
2585
+ set animateOnClick(n) {
2586
+ !this.slider || (this.slider.animateOnClick = n);
2587
+ }
2588
+ get animateOnClick() {
2589
+ var n;
2590
+ return (n = this.slider) == null ? void 0 : n.animateOnClick;
2591
+ }
2592
+ get rangeDragging() {
2593
+ var n, h;
2594
+ return (h = (n = this.slider) == null ? void 0 : n.rangeDragging) != null ? h : !1;
2595
+ }
2596
+ set rangeDragging(n) {
2597
+ this.slider && (this.slider.rangeDragging = de(n));
2598
+ }
2599
+ get externalCSSList() {
2600
+ return this._externalCSSList;
2601
+ }
2602
+ addPointer(n) {
2603
+ var h;
2604
+ if (!this.slider)
2605
+ return;
2606
+ let f = (h = this.slider) == null ? void 0 : h.addPointer(n);
2607
+ Ls(this, this.slider, f, `value${f + 1}`, `ariaLabel${f + 1}`, `pointerShape${f + 1}`, `pointer${f + 1}Disabled`);
2608
+ }
2609
+ removePointer() {
2610
+ var n;
2611
+ !this.slider || (n = this.slider) == null || n.removePointer();
2612
+ }
2613
+ addCSS(n) {
2614
+ if (!this.shadowRoot)
2615
+ return;
2616
+ let h = document.createElement("style");
2617
+ h.textContent = n, this.shadowRoot.appendChild(h);
2618
+ }
2619
+ connectedCallback() {
2620
+ var n, h;
2621
+ if (!this.shadowRoot)
2622
+ return;
2623
+ this._externalCSSList = or(this), this.shadowRoot.innerHTML = r(o, this._externalCSSList);
2624
+ let f = (n = this.shadowRoot) == null ? void 0 : n.querySelector(".pointer");
2625
+ if (!f)
2626
+ return;
2627
+ let p = (h = this.shadowRoot) == null ? void 0 : h.getElementById("range-slider");
2628
+ if (!p)
2629
+ return;
2630
+ let x = cr(this, f);
2631
+ this.slider = dr(this, p, x), ur(this, this.slider), this._observer = new MutationObserver((C) => {
2632
+ C.forEach((I) => {
2633
+ var w;
2634
+ if (!this.slider || I.type !== "attributes")
2635
+ return;
2636
+ let A = I.attributeName;
2637
+ !A || pr(this.slider, A, (w = this.getAttribute(A)) != null ? w : "");
2638
+ });
2639
+ }), this._observer.observe(this, { attributes: !0 });
2640
+ }
2641
+ disconnectedCallback() {
2642
+ this._observer && this._observer.disconnect(), this.slider && this.slider.destroy();
2643
+ }
2644
+ }, Nt = fr;
2645
+ window.tcRangeSlider = Nt, customElements.get("toolcool-range-slider") || customElements.define("toolcool-range-slider", Nt), customElements.get("tc-range-slider") || customElements.define("tc-range-slider", class extends Nt {
2646
+ });
2647
+ })();
2648
+ var Di = { exports: {} };
2649
+ (function(i, e) {
2650
+ (function(t, s) {
2651
+ i.exports = s();
2652
+ })(at, function() {
2653
+ var t = 1e3, s = 6e4, r = 36e5, o = "millisecond", l = "second", c = "minute", u = "hour", d = "day", m = "week", v = "month", $ = "quarter", E = "year", j = "date", G = "Invalid Date", ve = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, le = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, me = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(T) {
2654
+ var y = ["th", "st", "nd", "rd"], b = T % 100;
2655
+ return "[" + T + (y[(b - 20) % 10] || y[b] || y[0]) + "]";
2656
+ } }, pe = function(T, y, b) {
2657
+ var k = String(T);
2658
+ return !k || k.length >= y ? T : "" + Array(y + 1 - k.length).join(b) + T;
2659
+ }, Ee = { s: pe, z: function(T) {
2660
+ var y = -T.utcOffset(), b = Math.abs(y), k = Math.floor(b / 60), _ = b % 60;
2661
+ return (y <= 0 ? "+" : "-") + pe(k, 2, "0") + ":" + pe(_, 2, "0");
2662
+ }, m: function T(y, b) {
2663
+ if (y.date() < b.date())
2664
+ return -T(b, y);
2665
+ var k = 12 * (b.year() - y.year()) + (b.month() - y.month()), _ = y.clone().add(k, v), P = b - _ < 0, R = y.clone().add(k + (P ? -1 : 1), v);
2666
+ return +(-(k + (b - _) / (P ? _ - R : R - _)) || 0);
2667
+ }, a: function(T) {
2668
+ return T < 0 ? Math.ceil(T) || 0 : Math.floor(T);
2669
+ }, p: function(T) {
2670
+ return { M: v, y: E, w: m, d, D: j, h: u, m: c, s: l, ms: o, Q: $ }[T] || String(T || "").toLowerCase().replace(/s$/, "");
2671
+ }, u: function(T) {
2672
+ return T === void 0;
2673
+ } }, ye = "en", F = {};
2674
+ F[ye] = me;
2675
+ var X = function(T) {
2676
+ return T instanceof Oe;
2677
+ }, ie = function T(y, b, k) {
2678
+ var _;
2679
+ if (!y)
2680
+ return ye;
2681
+ if (typeof y == "string") {
2682
+ var P = y.toLowerCase();
2683
+ F[P] && (_ = P), b && (F[P] = b, _ = P);
2684
+ var R = y.split("-");
2685
+ if (!_ && R.length > 1)
2686
+ return T(R[0]);
2687
+ } else {
2688
+ var V = y.name;
2689
+ F[V] = y, _ = V;
2690
+ }
2691
+ return !k && _ && (ye = _), _ || !k && ye;
2692
+ }, z = function(T, y) {
2693
+ if (X(T))
2694
+ return T.clone();
2695
+ var b = typeof y == "object" ? y : {};
2696
+ return b.date = T, b.args = arguments, new Oe(b);
2697
+ }, B = Ee;
2698
+ B.l = ie, B.i = X, B.w = function(T, y) {
2699
+ return z(T, { locale: y.$L, utc: y.$u, x: y.$x, $offset: y.$offset });
2700
+ };
2701
+ var Oe = function() {
2702
+ function T(b) {
2703
+ this.$L = ie(b.locale, null, !0), this.parse(b);
2704
+ }
2705
+ var y = T.prototype;
2706
+ return y.parse = function(b) {
2707
+ this.$d = function(k) {
2708
+ var _ = k.date, P = k.utc;
2709
+ if (_ === null)
2710
+ return /* @__PURE__ */ new Date(NaN);
2711
+ if (B.u(_))
2712
+ return /* @__PURE__ */ new Date();
2713
+ if (_ instanceof Date)
2714
+ return new Date(_);
2715
+ if (typeof _ == "string" && !/Z$/i.test(_)) {
2716
+ var R = _.match(ve);
2717
+ if (R) {
2718
+ var V = R[2] - 1 || 0, se = (R[7] || "0").substring(0, 3);
2719
+ return P ? new Date(Date.UTC(R[1], V, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, se)) : new Date(R[1], V, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, se);
2720
+ }
2721
+ }
2722
+ return new Date(_);
2723
+ }(b), this.$x = b.x || {}, this.init();
2724
+ }, y.init = function() {
2725
+ var b = this.$d;
2726
+ this.$y = b.getFullYear(), this.$M = b.getMonth(), this.$D = b.getDate(), this.$W = b.getDay(), this.$H = b.getHours(), this.$m = b.getMinutes(), this.$s = b.getSeconds(), this.$ms = b.getMilliseconds();
2727
+ }, y.$utils = function() {
2728
+ return B;
2729
+ }, y.isValid = function() {
2730
+ return this.$d.toString() !== G;
2731
+ }, y.isSame = function(b, k) {
2732
+ var _ = z(b);
2733
+ return this.startOf(k) <= _ && _ <= this.endOf(k);
2734
+ }, y.isAfter = function(b, k) {
2735
+ return z(b) < this.startOf(k);
2736
+ }, y.isBefore = function(b, k) {
2737
+ return this.endOf(k) < z(b);
2738
+ }, y.$g = function(b, k, _) {
2739
+ return B.u(b) ? this[k] : this.set(_, b);
2740
+ }, y.unix = function() {
2741
+ return Math.floor(this.valueOf() / 1e3);
2742
+ }, y.valueOf = function() {
2743
+ return this.$d.getTime();
2744
+ }, y.startOf = function(b, k) {
2745
+ var _ = this, P = !!B.u(k) || k, R = B.p(b), V = function(Le, ee) {
2746
+ var K = B.w(_.$u ? Date.UTC(_.$y, ee, Le) : new Date(_.$y, ee, Le), _);
2747
+ return P ? K : K.endOf(d);
2748
+ }, se = function(Le, ee) {
2749
+ return B.w(_.toDate()[Le].apply(_.toDate("s"), (P ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ee)), _);
2750
+ }, Q = this.$W, he = this.$M, Se = this.$D, ke = "set" + (this.$u ? "UTC" : "");
2751
+ switch (R) {
2752
+ case E:
2753
+ return P ? V(1, 0) : V(31, 11);
2754
+ case v:
2755
+ return P ? V(1, he) : V(0, he + 1);
2756
+ case m:
2757
+ var ue = this.$locale().weekStart || 0, we = (Q < ue ? Q + 7 : Q) - ue;
2758
+ return V(P ? Se - we : Se + (6 - we), he);
2759
+ case d:
2760
+ case j:
2761
+ return se(ke + "Hours", 0);
2762
+ case u:
2763
+ return se(ke + "Minutes", 1);
2764
+ case c:
2765
+ return se(ke + "Seconds", 2);
2766
+ case l:
2767
+ return se(ke + "Milliseconds", 3);
2768
+ default:
2769
+ return this.clone();
2770
+ }
2771
+ }, y.endOf = function(b) {
2772
+ return this.startOf(b, !1);
2773
+ }, y.$set = function(b, k) {
2774
+ var _, P = B.p(b), R = "set" + (this.$u ? "UTC" : ""), V = (_ = {}, _[d] = R + "Date", _[j] = R + "Date", _[v] = R + "Month", _[E] = R + "FullYear", _[u] = R + "Hours", _[c] = R + "Minutes", _[l] = R + "Seconds", _[o] = R + "Milliseconds", _)[P], se = P === d ? this.$D + (k - this.$W) : k;
2775
+ if (P === v || P === E) {
2776
+ var Q = this.clone().set(j, 1);
2777
+ Q.$d[V](se), Q.init(), this.$d = Q.set(j, Math.min(this.$D, Q.daysInMonth())).$d;
2778
+ } else
2779
+ V && this.$d[V](se);
2780
+ return this.init(), this;
2781
+ }, y.set = function(b, k) {
2782
+ return this.clone().$set(b, k);
2783
+ }, y.get = function(b) {
2784
+ return this[B.p(b)]();
2785
+ }, y.add = function(b, k) {
2786
+ var _, P = this;
2787
+ b = Number(b);
2788
+ var R = B.p(k), V = function(he) {
2789
+ var Se = z(P);
2790
+ return B.w(Se.date(Se.date() + Math.round(he * b)), P);
2791
+ };
2792
+ if (R === v)
2793
+ return this.set(v, this.$M + b);
2794
+ if (R === E)
2795
+ return this.set(E, this.$y + b);
2796
+ if (R === d)
2797
+ return V(1);
2798
+ if (R === m)
2799
+ return V(7);
2800
+ var se = (_ = {}, _[c] = s, _[u] = r, _[l] = t, _)[R] || 1, Q = this.$d.getTime() + b * se;
2801
+ return B.w(Q, this);
2802
+ }, y.subtract = function(b, k) {
2803
+ return this.add(-1 * b, k);
2804
+ }, y.format = function(b) {
2805
+ var k = this, _ = this.$locale();
2806
+ if (!this.isValid())
2807
+ return _.invalidDate || G;
2808
+ var P = b || "YYYY-MM-DDTHH:mm:ssZ", R = B.z(this), V = this.$H, se = this.$m, Q = this.$M, he = _.weekdays, Se = _.months, ke = function(ee, K, Ke, qe) {
2809
+ return ee && (ee[K] || ee(k, P)) || Ke[K].slice(0, qe);
2810
+ }, ue = function(ee) {
2811
+ return B.s(V % 12 || 12, ee, "0");
2812
+ }, we = _.meridiem || function(ee, K, Ke) {
2813
+ var qe = ee < 12 ? "AM" : "PM";
2814
+ return Ke ? qe.toLowerCase() : qe;
2815
+ }, Le = { YY: String(this.$y).slice(-2), YYYY: B.s(this.$y, 4, "0"), M: Q + 1, MM: B.s(Q + 1, 2, "0"), MMM: ke(_.monthsShort, Q, Se, 3), MMMM: ke(Se, Q), D: this.$D, DD: B.s(this.$D, 2, "0"), d: String(this.$W), dd: ke(_.weekdaysMin, this.$W, he, 2), ddd: ke(_.weekdaysShort, this.$W, he, 3), dddd: he[this.$W], H: String(V), HH: B.s(V, 2, "0"), h: ue(1), hh: ue(2), a: we(V, se, !0), A: we(V, se, !1), m: String(se), mm: B.s(se, 2, "0"), s: String(this.$s), ss: B.s(this.$s, 2, "0"), SSS: B.s(this.$ms, 3, "0"), Z: R };
2816
+ return P.replace(le, function(ee, K) {
2817
+ return K || Le[ee] || R.replace(":", "");
2818
+ });
2819
+ }, y.utcOffset = function() {
2820
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
2821
+ }, y.diff = function(b, k, _) {
2822
+ var P, R = B.p(k), V = z(b), se = (V.utcOffset() - this.utcOffset()) * s, Q = this - V, he = B.m(this, V);
2823
+ return he = (P = {}, P[E] = he / 12, P[v] = he, P[$] = he / 3, P[m] = (Q - se) / 6048e5, P[d] = (Q - se) / 864e5, P[u] = Q / r, P[c] = Q / s, P[l] = Q / t, P)[R] || Q, _ ? he : B.a(he);
2824
+ }, y.daysInMonth = function() {
2825
+ return this.endOf(v).$D;
2826
+ }, y.$locale = function() {
2827
+ return F[this.$L];
2828
+ }, y.locale = function(b, k) {
2829
+ if (!b)
2830
+ return this.$L;
2831
+ var _ = this.clone(), P = ie(b, k, !0);
2832
+ return P && (_.$L = P), _;
2833
+ }, y.clone = function() {
2834
+ return B.w(this.$d, this);
2835
+ }, y.toDate = function() {
2836
+ return new Date(this.valueOf());
2837
+ }, y.toJSON = function() {
2838
+ return this.isValid() ? this.toISOString() : null;
2839
+ }, y.toISOString = function() {
2840
+ return this.$d.toISOString();
2841
+ }, y.toString = function() {
2842
+ return this.$d.toUTCString();
2843
+ }, T;
2844
+ }(), Me = Oe.prototype;
2845
+ return z.prototype = Me, [["$ms", o], ["$s", l], ["$m", c], ["$H", u], ["$W", d], ["$M", v], ["$y", E], ["$D", j]].forEach(function(T) {
2846
+ Me[T[1]] = function(y) {
2847
+ return this.$g(y, T[0], T[1]);
2848
+ };
2849
+ }), z.extend = function(T, y) {
2850
+ return T.$i || (T(y, Oe, z), T.$i = !0), z;
2851
+ }, z.locale = ie, z.isDayjs = X, z.unix = function(T) {
2852
+ return z(1e3 * T);
2853
+ }, z.en = F[ye], z.Ls = F, z.p = {}, z;
2854
+ });
2855
+ })(Di);
2856
+ var no = Di.exports;
2857
+ const St = /* @__PURE__ */ Ti(no);
2858
+ class oo extends ht {
2859
+ constructor() {
2860
+ super(...arguments), this.templates = {}, this._renderedTemplates = {};
2861
+ }
2862
+ /**
2863
+ * Set an alternative binding syntax. Default is {{ <value> }}
2864
+ *
2865
+ * @param {string} startStr start of binding syntax
2866
+ * @param {string} endStr end of binding syntax
2867
+ */
2868
+ setBindingSyntax(e, t) {
2869
+ this._startExpression = e, this._endExpression = t;
2870
+ const s = this.escapeRegex(this._startExpression), r = this.escapeRegex(this._endExpression);
2871
+ this._expression = new RegExp(
2872
+ `${s}\\s*([$\\w\\.,'"\\s()\\[\\]]+)\\s*${r}`,
2873
+ "g"
2874
+ );
2875
+ }
2876
+ /**
2877
+ * Check if a specific template has been provided.
2878
+ *
2879
+ * @param {string} templateName
2880
+ * @returns {boolean}
2881
+ */
2882
+ hasTemplate(e) {
2883
+ return this.templates && !!this.templates[e];
2884
+ }
2885
+ /**
2886
+ * Render a <template> by type and return content to render
2887
+ *
2888
+ * @param templateType type of template (indicated by the data-type attribute)
2889
+ * @param context the data context that should be expanded in template
2890
+ * @param slotName the slot name that will be used to host the new rendered template. set to a unique value if multiple templates of this type will be rendered. default is templateType
2891
+ */
2892
+ renderTemplate(e, t, s) {
2893
+ if (!this.hasTemplate(e))
2894
+ return null;
2895
+ s = s || e;
2896
+ const r = ge` <slot name=${s}></slot> `, o = { [e]: { ...t } };
2897
+ if (this._renderedTemplates.hasOwnProperty(s)) {
2898
+ const { slot: c } = (
2899
+ // @ts-ignore
2900
+ this._renderedTemplates[s]
2901
+ );
2902
+ this.removeChild(c);
2903
+ }
2904
+ const l = document.createElement("div");
2905
+ return l.slot = s, l.dataset.generated = "template", this._renderTemplate(l, this.templates[e], o), this.appendChild(l), this._renderedTemplates[s] = { context: o, slot: l }, r;
2906
+ }
2907
+ getTemplates() {
2908
+ const e = {};
2909
+ for (let t = 0; t < this.children.length; t++) {
2910
+ const s = this.children[t];
2911
+ if (s.nodeName === "TEMPLATE") {
2912
+ const r = s;
2913
+ r.dataset.type ? e[r.dataset.type] = r : e.default = r, r.templateOrder = t;
2914
+ }
2915
+ }
2916
+ return e;
2917
+ }
2918
+ _renderTemplate(e, t, s) {
2919
+ let r;
2920
+ if (t.content && t.content.childNodes.length) {
2921
+ const o = t.content.cloneNode(!0);
2922
+ r = this.renderNode(o, e, s);
2923
+ }
2924
+ r && e.appendChild(r);
2925
+ }
2926
+ expandExpressionsAsString(e, t) {
2927
+ return e.replace(this.expression, (s, r) => {
2928
+ const o = this.evalInContext(
2929
+ r || this.trimExpression(s),
2930
+ t
2931
+ );
2932
+ return o ? typeof o == "object" ? JSON.stringify(o) : o.toString() : "";
2933
+ });
2934
+ }
2935
+ get expression() {
2936
+ return this._expression || this.setBindingSyntax("{{", "}}"), this._expression;
2937
+ }
2938
+ escapeRegex(e) {
2939
+ return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
2940
+ }
2941
+ evalInContext(e, t) {
2942
+ t = { ...t };
2943
+ const s = new Function("with(this) { return " + e + ";}");
2944
+ let r;
2945
+ try {
2946
+ r = s.call(t);
2947
+ } catch {
2948
+ }
2949
+ return r;
2950
+ }
2951
+ trimExpression(e) {
2952
+ return e = e.trim(), e.startsWith(this._startExpression) && e.endsWith(this._endExpression) && (e = e.substr(
2953
+ this._startExpression.length,
2954
+ e.length - this._startExpression.length - this._endExpression.length
2955
+ ), e = e.trim()), e;
2956
+ }
2957
+ renderNode(e, t, s) {
2958
+ if (e.nodeName === "#text")
2959
+ return e.textContent = this.expandExpressionsAsString(
2960
+ e.textContent,
2961
+ s
2962
+ ), e;
2963
+ if (e.nodeName === "TEMPLATE")
2964
+ return e.$parentTemplateContext = s, e;
2965
+ for (let r = 0; r < e.childNodes.length; r++) {
2966
+ const o = e.childNodes[r];
2967
+ this.renderNode(o, t, s);
2968
+ }
2969
+ return e;
2970
+ }
2971
+ updated() {
2972
+ this.templates = this.getTemplates();
2973
+ }
2974
+ }
2975
+ const lo = (i, e = "highlight", t = "title") => {
2976
+ const s = (o, l, c) => {
2977
+ const u = l.split(".");
2978
+ let d;
2979
+ for (d = 0; d < u.length - 1; d++)
2980
+ o = o[u[d]];
2981
+ o[u[d]] = c;
2982
+ }, r = (o, l = []) => {
2983
+ let c = "", u = 0;
2984
+ return l.forEach((d) => {
2985
+ const m = d[1] + 1;
1767
2986
  c += [
1768
- r.substring(l, a[0]),
1769
- `<mark class="${t}">`,
1770
- r.substring(a[0], u),
2987
+ o.substring(u, d[0]),
2988
+ `<mark class="${e}">`,
2989
+ o.substring(d[0], m),
1771
2990
  "</mark>"
1772
- ].join(""), l = u;
1773
- }), c += r.substring(l), c;
2991
+ ].join(""), u = m;
2992
+ }), c += o.substring(u), c;
1774
2993
  };
1775
- return i.filter(({ matches: r }) => r && r.length).map(({ item: r, matches: o }) => {
1776
- const c = { ...r };
1777
- return o.forEach((l) => {
1778
- l.key === e && s(
2994
+ return i.filter(({ matches: o }) => o && o.length).map(({ item: o, matches: l }) => {
2995
+ const c = { ...o };
2996
+ return l.forEach((u) => {
2997
+ u.key === t && s(
1779
2998
  c,
1780
- l.key,
1781
- n(l.value, l.indices)
2999
+ u.key,
3000
+ r(u.value, u.indices)
1782
3001
  );
1783
3002
  }), c;
1784
3003
  });
1785
- }, Ks = `
3004
+ }, ao = `
1786
3005
  :host {
1787
3006
  display: flex;
1788
3007
  box-sizing: border-box;
@@ -1800,6 +3019,9 @@ form {
1800
3019
  display: flex;
1801
3020
  flex-direction: column;
1802
3021
  }
3022
+
3023
+
3024
+ `, ho = `
1803
3025
  ul {
1804
3026
  padding-left: 0;
1805
3027
  margin-top: 0;
@@ -1838,22 +3060,31 @@ details summary {
1838
3060
  .details-filter summary {
1839
3061
  justify-content: space-between;
1840
3062
  }
3063
+ .details-filter summary span {
3064
+ font-size: small;
3065
+ font-weight: 900;
3066
+ }
1841
3067
  #details-results summary {
1842
3068
  list-style: none;
1843
3069
  }
1844
- .details-filter summary svg,
1845
- #details-results summary svg {
3070
+ #details-results summary>.title {
3071
+ font-weight: 900;
3072
+ }
3073
+ .details-filter summary::after,
3074
+ #details-results summary::before {
3075
+ content: url("data:image/svg+xml,%3Csvg data-cy='expand-button' xmlns='http://www.w3.org/2000/svg' viewBox='6 6 12 12' %3E%3Ctitle%3Echevron-down%3C/title%3E%3Cpath d='M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z' /%3E%3C/svg%3E");
1846
3076
  width: 14px;
1847
3077
  height: 14px;
3078
+ margin-right: 4px;
1848
3079
  transition: all ease-in-out 0.3s;
1849
3080
  }
1850
- #details-results summary svg {
3081
+ #details-results summary::before {
1851
3082
  transform: rotate(-90deg);
1852
3083
  }
1853
- .details-filter[open] summary svg {
3084
+ .details-filter[open] summary::after {
1854
3085
  transform: rotate(180deg);
1855
3086
  }
1856
- #details-results[open] summary svg {
3087
+ #details-results[open] summary::before {
1857
3088
  transform: rotate(0deg);
1858
3089
  }
1859
3090
  .details-filter li span,
@@ -1901,6 +3132,7 @@ ul#results li {
1901
3132
  }
1902
3133
  #filter-reset {
1903
3134
  cursor: pointer;
3135
+ font-size: small;
1904
3136
  }
1905
3137
  section.inline,
1906
3138
  section.inline > ul {
@@ -1927,92 +3159,92 @@ section.inline details.details-filter summary {
1927
3159
  overflow-y: auto;
1928
3160
  }
1929
3161
  `;
1930
- var Gs = Object.defineProperty, Ys = Object.getOwnPropertyDescriptor, F = (i, t, e, s) => {
1931
- for (var n = s > 1 ? void 0 : s ? Ys(t, e) : t, r = i.length - 1, o; r >= 0; r--)
1932
- (o = i[r]) && (n = (s ? o(t, e, n) : o(n)) || n);
1933
- return s && n && Gs(t, e, n), n;
3162
+ var co = Object.defineProperty, uo = Object.getOwnPropertyDescriptor, He = (i, e, t, s) => {
3163
+ for (var r = s > 1 ? void 0 : s ? uo(e, t) : e, o = i.length - 1, l; o >= 0; o--)
3164
+ (l = i[o]) && (r = (s ? l(e, t, r) : l(r)) || r);
3165
+ return s && r && co(e, t, r), r;
1934
3166
  };
1935
- class se {
3167
+ class mi {
1936
3168
  constructor() {
1937
3169
  /**
1938
3170
  * Aggregate results by a property key
1939
3171
  */
1940
- m(this, "aggregateResults");
3172
+ Z(this, "aggregateResults");
1941
3173
  /**
1942
3174
  * Highlighting of search result character matches
1943
3175
  */
1944
- m(this, "enableHighlighting", !1);
3176
+ Z(this, "enableHighlighting", !1);
1945
3177
  /**
1946
3178
  * Search functionality
1947
3179
  */
1948
- m(this, "enableSearch", !1);
3180
+ Z(this, "enableSearch", !1);
1949
3181
  /**
1950
3182
  * Make the filters mutually exclusive
1951
3183
  */
1952
- m(this, "exclusiveFilters", !1);
3184
+ Z(this, "exclusiveFilters", !1);
1953
3185
  /**
1954
3186
  * Use an external search endpoint instead of fuse search.
1955
3187
  * Passed properties: input string, filters object
1956
3188
  */
1957
- m(this, "externalSearch");
3189
+ Z(this, "externalSearch");
1958
3190
  /**
1959
3191
  * The filter properties.
1960
3192
  * @param filterProperties
1961
3193
  */
1962
- m(this, "filterProperties", []);
3194
+ Z(this, "filterProperties", []);
1963
3195
  /**
1964
3196
  * Native fuse.js config override
1965
3197
  */
1966
- m(this, "fuseConfig", {
3198
+ Z(this, "fuseConfig", {
1967
3199
  keys: ["title"]
1968
3200
  });
1969
3201
  /**
1970
3202
  * Inline mode, for rendering the itemfilter in avery condensed space.
1971
3203
  * Expexts showResults to be false and enableSearch to be true
1972
3204
  */
1973
- m(this, "inlineMode", !1);
3205
+ Z(this, "inlineMode", !1);
1974
3206
  /**
1975
3207
  * Show all result items if nothing is input by the user
1976
3208
  * @default true
1977
3209
  */
1978
- m(this, "matchAllWhenEmpty", !0);
3210
+ Z(this, "matchAllWhenEmpty", !0);
1979
3211
  /**
1980
3212
  * Callback that is triggered on item search
1981
3213
  * @returns result items
1982
3214
  */
1983
- m(this, "onSearch", () => {
3215
+ Z(this, "onSearch", () => {
1984
3216
  });
1985
3217
  /**
1986
3218
  * Callback that is triggered on item selection
1987
3219
  * @returns selected item
1988
3220
  */
1989
- m(this, "onSelect", () => {
3221
+ Z(this, "onSelect", () => {
1990
3222
  });
1991
3223
  /**
1992
3224
  * Display results list
1993
3225
  */
1994
- m(this, "showResults", !0);
3226
+ Z(this, "showResults", !0);
1995
3227
  /**
1996
3228
  * The property of the result items used for display
1997
3229
  */
1998
- m(this, "titleProperty", "title");
3230
+ Z(this, "titleProperty", "title");
1999
3231
  }
2000
3232
  }
2001
- let T = class extends Q {
3233
+ let Pe = class extends oo {
2002
3234
  constructor() {
2003
3235
  super(...arguments);
2004
- m(this, "_fuse");
2005
- m(this, "_resultAggregation", []);
2006
- m(this, "_items", []);
2007
- m(this, "_results");
2008
- m(this, "_filters", {});
2009
- m(this, "_selectedResult");
2010
- m(this, "_config", new se());
2011
- m(this, "apply", (t) => {
2012
- this._items = t.map((e, s) => ({
2013
- ...e,
2014
- id: `item-${s}`
2015
- })), this._fuse = new K(this._items, {
3236
+ Z(this, "_fuse");
3237
+ Z(this, "_resultAggregation", []);
3238
+ Z(this, "_items", []);
3239
+ Z(this, "_results");
3240
+ Z(this, "_filters", {});
3241
+ Z(this, "_selectedResult");
3242
+ Z(this, "_config", new mi());
3243
+ Z(this, "apply", (e) => {
3244
+ this._items = e.map((t, s) => ({
3245
+ id: `item-${s}`,
3246
+ ...t
3247
+ })), this._fuse = new st(this._items, {
2016
3248
  // minMatchCharLength: 3,
2017
3249
  // location: 0,
2018
3250
  threshold: 0.4,
@@ -2020,138 +3252,202 @@ let T = class extends Q {
2020
3252
  includeMatches: !0,
2021
3253
  useExtendedSearch: !0,
2022
3254
  ...this._config.fuseConfig
2023
- }), this._config.filterProperties.length && this._config.filterProperties.forEach((e) => {
2024
- const s = {};
2025
- this._items.forEach((n) => {
2026
- Array.isArray(n[e.key]) ? n[e.key].forEach((r) => {
2027
- s[r] = void 0;
2028
- }) : s[n[e.key]] = void 0;
2029
- }), this._filters[e.key] = s;
3255
+ }), this._config.filterProperties.length && this._config.filterProperties.forEach((t) => {
3256
+ const s = {}, r = (o) => t.format === "date" ? St(o).unix() : parseInt(o);
3257
+ this._items.forEach((o) => {
3258
+ if (t.type === "range") {
3259
+ if (Array.isArray(o[t.key])) {
3260
+ const l = [
3261
+ // @ts-ignore
3262
+ r(o[t.key][0]),
3263
+ // @ts-ignore
3264
+ r(o[t.key][1])
3265
+ ];
3266
+ s.min = // @ts-ignore
3267
+ s.min !== void 0 ? (
3268
+ // @ts-ignore
3269
+ Math.min(s.min, l[0])
3270
+ ) : l[0], s.max = // @ts-ignore
3271
+ s.max !== void 0 ? (
3272
+ // @ts-ignore
3273
+ Math.max(s.max, l[1])
3274
+ ) : l[1];
3275
+ } else {
3276
+ const l = r(o[t.key]);
3277
+ s.min = // @ts-ignore
3278
+ s.min !== void 0 ? (
3279
+ // @ts-ignore
3280
+ Math.min(s.min, l)
3281
+ ) : l, s.max = // @ts-ignore
3282
+ s.max !== void 0 ? (
3283
+ // @ts-ignore
3284
+ Math.max(s.max, l)
3285
+ ) : l;
3286
+ }
3287
+ return;
3288
+ }
3289
+ Array.isArray(o[t.key]) ? o[t.key].forEach((l) => {
3290
+ s[l] = void 0;
3291
+ }) : s[o[t.key]] = void 0;
3292
+ }), this._filters[t.key] = {
3293
+ type: t.type || "string",
3294
+ keys: s,
3295
+ ...t.type === "range" && {
3296
+ // @ts-ignore
3297
+ min: s.min,
3298
+ // @ts-ignore
3299
+ max: s.max,
3300
+ format: t.format
3301
+ }
3302
+ };
2030
3303
  }), this._config.matchAllWhenEmpty !== !1 && (this._results = this.sortResults(this._items), this.requestUpdate()), this._config.aggregateResults && (this._resultAggregation = [
2031
3304
  ...new Set(
2032
- this._items.reduce((e, s) => e.concat(s[this._config.aggregateResults]), [])
3305
+ this._items.reduce((t, s) => t.concat(s[this._config.aggregateResults]), [])
2033
3306
  )
2034
- ].sort((e, s) => e.localeCompare(s)));
3307
+ ].sort((t, s) => t.localeCompare(s)));
2035
3308
  });
2036
- m(this, "inputHandler", () => {
3309
+ Z(this, "unstyled");
3310
+ Z(this, "inputHandler", () => {
2037
3311
  this.search(this.renderRoot.querySelector("input[type='text']").value);
2038
3312
  });
2039
- m(this, "debouncedInputHandler", Ws(this.inputHandler, 500, {
3313
+ Z(this, "debouncedInputHandler", ro(this.inputHandler, 500, {
2040
3314
  leading: !0
2041
3315
  }));
2042
3316
  }
2043
- set config(t) {
2044
- const e = this._config;
3317
+ set config(e) {
3318
+ const t = this._config;
2045
3319
  this._config = {
2046
- ...new se(),
2047
- ...t
2048
- }, this.requestUpdate("config", e);
3320
+ ...new mi(),
3321
+ ...e
3322
+ }, this.requestUpdate("config", t);
2049
3323
  }
2050
3324
  get config() {
2051
3325
  return this._config;
2052
3326
  }
2053
- async search(t = "", e = this._filters) {
2054
- const s = Object.entries(e).reduce(
2055
- (r, [o, c]) => {
2056
- const l = "$or", a = [], u = (h) => {
2057
- const d = {};
2058
- d[o] = `="${h}"`, a.push(d);
2059
- };
2060
- return Object.entries(c).filter(([h, d]) => d).forEach(([h, d]) => u(h)), a.length > 0 && r.push({
2061
- [l]: a
2062
- }), r;
2063
- },
2064
- []
2065
- );
2066
- let n;
2067
- if (!(t.length > 0) && !s.length && this._config.matchAllWhenEmpty !== !1)
2068
- n = this._items;
3327
+ async search(e = "", t = this._filters) {
3328
+ const s = Object.entries(t).filter(([l, c]) => c.type === "string").reduce((l, [c, u]) => {
3329
+ const d = "$or", m = [], v = ($) => {
3330
+ const E = {};
3331
+ E[c] = `="${$}"`, m.push(E);
3332
+ };
3333
+ return Object.entries(u.keys).filter(([$, E]) => E).forEach(([$, E]) => v($)), m.length > 0 && l.push({
3334
+ [d]: m
3335
+ }), l;
3336
+ }, []);
3337
+ let r;
3338
+ if (!(e.length > 0) && !s.length && this._config.matchAllWhenEmpty !== !1)
3339
+ r = this._items;
2069
3340
  else if (this.config.externalSearch)
2070
- n = (await (await fetch(
2071
- `${this.config.externalSearch(t, e)}`
3341
+ r = (await (await fetch(
3342
+ `${this.config.externalSearch(e, t)}`
2072
3343
  )).json()).features;
2073
3344
  else {
2074
- const r = {
3345
+ const l = {
2075
3346
  $and: [
2076
- ...t.length > 0 ? [
3347
+ ...e.length > 0 ? [
2077
3348
  {
2078
3349
  $or: [
2079
3350
  // @ts-ignore
2080
- ...this._config.fuseConfig.keys.map((c) => ({
2081
- [c]: t
3351
+ ...this._config.fuseConfig.keys.map((u) => ({
3352
+ [u]: e
2082
3353
  }))
2083
3354
  ]
2084
3355
  }
2085
3356
  ] : [],
2086
3357
  ...s
2087
3358
  ]
2088
- }, o = this._fuse.search(r);
2089
- n = this._config.enableHighlighting ? Vs(o, "highlight", this._config.titleProperty) : o.map((c) => c.item);
3359
+ }, c = this._fuse.search(l);
3360
+ r = this._config.enableHighlighting ? lo(c, "highlight", this._config.titleProperty) : c.map((u) => u.item);
3361
+ }
3362
+ const o = Object.entries(this._filters).filter(([l, c]) => c.type === "range").reduce((l, [c, u]) => (l[c] = {
3363
+ min: u.keys.min,
3364
+ max: u.keys.max,
3365
+ format: u.format
3366
+ }, l), {});
3367
+ if (Object.keys(o).length > 0) {
3368
+ const l = [];
3369
+ for (let c = 0; c < r.length; c++) {
3370
+ const u = {};
3371
+ for (let [d, m] of Object.entries(o)) {
3372
+ const v = ($) => m.format === "date" ? St($).unix() : $;
3373
+ r[c].hasOwnProperty(d) ? Array.isArray(r[c][d]) ? u[d] = // @ts-ignore
3374
+ o[d].min <= v(r[c][d][1]) && // @ts-ignore
3375
+ v(r[c][d][0]) <= o[d].max : /* @ts-ignore */ v(r[c][d]) >= o[d].min && // @ts-ignore
3376
+ v(r[c][d]) <= o[d].max ? u[d] = !0 : u[d] = !1 : u[d] = !0;
3377
+ }
3378
+ Object.values(u).every((d) => !!d) && l.push(r[c]);
3379
+ }
3380
+ r = [...l];
2090
3381
  }
2091
- this._results = this.sortResults(n), this._config.onSearch(n), this.requestUpdate();
3382
+ this._results = this.sortResults(r), this._config.onSearch(r), this.requestUpdate();
2092
3383
  }
2093
- aggregateResults(t, e) {
2094
- return t.filter((s) => {
2095
- const n = s[this._config.aggregateResults], r = Object.keys(
3384
+ aggregateResults(e, t) {
3385
+ return e.filter((s) => {
3386
+ const r = s[this._config.aggregateResults], o = Object.keys(
2096
3387
  // @ts-ignore
2097
3388
  this._filters[this._config.aggregateResults]
2098
3389
  // @ts-ignore
2099
- ).filter((c) => this._filters[this._config.aggregateResults][c]);
2100
- return (r.length ? (
3390
+ ).filter((c) => this._filters[this._config.aggregateResults].keys[c]);
3391
+ return (o.length ? (
2101
3392
  // @ts-ignore
2102
- r.includes(e)
2103
- ) : !0) && Array.isArray(n) ? n.includes(e) : n === e;
3393
+ o.includes(t)
3394
+ ) : !0) && Array.isArray(r) ? r.includes(t) : r === t;
2104
3395
  });
2105
3396
  }
2106
- sortResults(t) {
2107
- return [...t].sort(
2108
- (e, s) => (
3397
+ sortResults(e) {
3398
+ return [...e].sort(
3399
+ (t, s) => (
2109
3400
  // @ts-ignore
2110
- e[this._config.titleProperty].localeCompare(s[this._config.titleProperty])
3401
+ t[this._config.titleProperty].localeCompare(s[this._config.titleProperty])
2111
3402
  )
2112
3403
  );
2113
3404
  }
2114
- toggleFilter(t, e, s) {
2115
- s && Object.keys(this._filters).forEach((o) => {
2116
- this._config.filterProperties.find((c) => c.key === o).exclusive && Object.keys(this._filters[o]).forEach((c) => {
2117
- this._filters[o][c] = !1;
3405
+ toggleFilter(e, t, s) {
3406
+ s && Object.keys(this._filters).filter((l) => this._filters[l].type === "string").forEach((l) => {
3407
+ this._config.filterProperties.find((c) => c.key === l).exclusive && Object.keys(this._filters[l].keys).forEach((c) => {
3408
+ this._filters[l].keys[c] = !1;
2118
3409
  });
2119
- }), this._filters[t][e] = !this._filters[t][e];
2120
- const n = this.renderRoot.querySelector('input[type="text"]');
2121
- n ? this.search(n.value) : this.search();
2122
- const r = this.renderRoot.querySelectorAll(
3410
+ }), this._filters[e].keys[t] = !this._filters[e].keys[t];
3411
+ const r = this.renderRoot.querySelector('input[type="text"]');
3412
+ r ? this.search(r.value) : this.search();
3413
+ const o = this.renderRoot.querySelectorAll(
2123
3414
  "ul#results input[type='radio']"
2124
3415
  );
2125
- for (let o = 0; o < r.length; o++)
2126
- r[o].checked = !1;
3416
+ for (let l = 0; l < o.length; l++)
3417
+ o[l].checked = !1;
2127
3418
  this._selectedResult && setTimeout(() => {
2128
- const o = this.renderRoot.querySelector(
3419
+ const l = this.renderRoot.querySelector(
2129
3420
  // @ts-ignore
2130
3421
  `#${this._selectedResult.id}`
2131
3422
  );
2132
- o && (o.checked = !0, this.requestUpdate());
3423
+ l && (l.checked = !0, this.requestUpdate());
2133
3424
  });
2134
3425
  }
2135
3426
  resetFilters() {
2136
- this.renderRoot.querySelectorAll(".details-filter input").forEach((e) => {
2137
- e.checked = !1;
3427
+ this.renderRoot.querySelectorAll(".details-filter input").forEach((t) => {
3428
+ t.checked = !1;
2138
3429
  });
2139
- const t = this.renderRoot.querySelector('input[type="text"]');
2140
- t && (t.value = ""), Object.keys(this._filters).forEach((e) => {
2141
- Object.keys(this._filters[e]).forEach((s) => {
2142
- this._filters[e][s] = !1;
3430
+ const e = this.renderRoot.querySelector('input[type="text"]');
3431
+ e && (e.value = ""), Object.keys(this._filters).forEach((t) => {
3432
+ if (this._filters[t].type === "range") {
3433
+ this._filters[t].keys.min = this._filters[t].min, this._filters[t].keys.max = this._filters[t].max;
3434
+ return;
3435
+ }
3436
+ Object.keys(this._filters[t].keys).forEach((s) => {
3437
+ this._filters[t].keys[s] = !1;
2143
3438
  });
2144
3439
  }), this.search(), this.requestUpdate();
2145
3440
  }
2146
3441
  render() {
2147
- return x`
3442
+ return ge`
2148
3443
  <style>
2149
- ${Ks}
3444
+ ${ao}
3445
+ ${!this.unstyled && ho}
2150
3446
  </style>
2151
- <form @submit="${(t) => t.preventDefault()}">
2152
- ${J(
3447
+ <form @submit="${(e) => e.preventDefault()}">
3448
+ ${Ze(
2153
3449
  this._config.enableSearch,
2154
- () => x`
3450
+ () => ge`
2155
3451
  <section>
2156
3452
  <input
2157
3453
  type="text"
@@ -2163,179 +3459,211 @@ let T = class extends Q {
2163
3459
  </section>
2164
3460
  `
2165
3461
  )}
2166
- ${J(
3462
+ ${Ze(
2167
3463
  this._config.filterProperties.length,
2168
- () => x`
2169
- <section class="${this.config.inlineMode ? "inline" : _}">
2170
- ${J(
3464
+ () => ge`
3465
+ <section class="${this.config.inlineMode ? "inline" : te}">
3466
+ ${Ze(
2171
3467
  !this.config.inlineMode,
2172
- () => x` <slot name="filterstitle"></slot> `
3468
+ () => ge` <slot name="filterstitle"></slot> `
2173
3469
  )}
2174
3470
  <ul id="filters">
2175
- ${X(
3471
+ ${lt(
2176
3472
  this._config.filterProperties,
2177
- (t) => x`
3473
+ (e) => ge`
2178
3474
  <details
2179
3475
  class="details-filter"
2180
3476
  part="details-filter"
2181
- data-filter="${t.key}"
3477
+ data-filter="${e.key}"
2182
3478
  >
2183
3479
  <summary>
2184
- <small>
2185
- <strong
2186
- class="title"
2187
- style="${!t.title && "text-transform: capitalize"}"
2188
- >
2189
- ${t.title || t.key}
2190
- ${// @ts-ignore
2191
- Object.values(this._filters[t.key]).filter(
2192
- (e) => e
2193
- ).length ? `(${Object.values(
2194
- // @ts-ignore
2195
- this._filters[t.key]
2196
- ).filter((e) => e).length})` : _}
2197
- </strong>
2198
- </small>
2199
- <div
2200
- style="display: flex; align-items: center; justify-content: center; margin-left: 4px;"
3480
+ <span
3481
+ class="title"
3482
+ style="${!e.title && "text-transform: capitalize"}"
2201
3483
  >
2202
- <svg
2203
- data-cy="expand-button"
2204
- xmlns="http://www.w3.org/2000/svg"
2205
- viewBox="6 6 12 12"
2206
- >
2207
- <title>chevron-down</title>
2208
- <path
2209
- d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"
2210
- />
2211
- </svg>
2212
- </div>
3484
+ ${e.title || e.key}
3485
+ ${e.type === "string" && Object.values(
3486
+ // @ts-ignore
3487
+ this._filters[e.key].keys
3488
+ ).filter((t) => t).length ? `(${Object.values(
3489
+ // @ts-ignore
3490
+ this._filters[e.key].keys
3491
+ ).filter((t) => t).length})` : te}
3492
+ </span>
2213
3493
  </summary>
2214
3494
  <div class="scroll" style="max-height: 150px">
2215
- <ul>
2216
- ${// @ts-ignore
2217
- this._filters[t.key] ? X(
3495
+ ${e.type === "range" ? ge`
3496
+ <div>
3497
+ ${e.format === "date" ? St.unix(
2218
3498
  // @ts-ignore
2219
- Object.keys(this._filters[t.key]).sort(
2220
- (e, s) => e.localeCompare(s)
2221
- ),
2222
- (e) => x`
2223
- <li>
2224
- <label>
2225
- <input
2226
- name="selection"
2227
- type="${t.exclusive ? "radio" : "checkbox"}"
2228
- checked="${// @ts-ignore
2229
- this._filters[t.key][e] || _}"
2230
- @click=${() => this.toggleFilter(
2231
- t.key,
2232
- e,
2233
- t.exclusive
3499
+ this._filters[e.key].keys.min
3500
+ ) : (
3501
+ // @ts-ignore
3502
+ this._filters[e.key].keys.min
3503
+ )}
3504
+ </div>
3505
+ <tc-range-slider
3506
+ min="${// @ts-ignore
3507
+ this._filters[e.key].min}"
3508
+ max="${// @ts-ignore
3509
+ this._filters[e.key].max}"
3510
+ value1="${// @ts-ignore
3511
+ this._filters[e.key].keys.min}"
3512
+ value2="${// @ts-ignore
3513
+ this._filters[e.key].keys.max}"
3514
+ step="1"
3515
+ @change="${(t) => {
3516
+ [
3517
+ // @ts-ignore
3518
+ this._filters[e.key].keys.min,
3519
+ // @ts-ignore
3520
+ this._filters[e.key].keys.max
3521
+ // @ts-ignore
3522
+ ] = t.detail.values, this.search(
3523
+ this.renderRoot.querySelector(
3524
+ "input[type='text']"
3525
+ // @ts-ignore
3526
+ ).value
3527
+ );
3528
+ }}"
3529
+ ></tc-range-slider>
3530
+ <div>
3531
+ ${e.format === "date" ? St.unix(
3532
+ // @ts-ignore
3533
+ this._filters[e.key].keys.max
3534
+ ) : (
3535
+ // @ts-ignore
3536
+ this._filters[e.key].keys.max
3537
+ )}
3538
+ </div>
3539
+ ` : ge`
3540
+ <ul>
3541
+ ${// @ts-ignore
3542
+ this._filters[e.key] ? lt(
3543
+ Object.keys(
3544
+ // @ts-ignore
3545
+ this._filters[e.key].keys
3546
+ ).sort((t, s) => t.localeCompare(s)),
3547
+ (t) => ge`
3548
+ <li>
3549
+ <label>
3550
+ <input
3551
+ name="selection"
3552
+ type="${e.exclusive ? "radio" : "checkbox"}"
3553
+ checked="${// @ts-ignore
3554
+ this._filters[e.key].keys[t] || te}"
3555
+ @click=${() => this.toggleFilter(
3556
+ e.key,
3557
+ t,
3558
+ e.exclusive
2234
3559
  )}
2235
- />
2236
- <span class="title">${e}</span>
2237
- </label>
2238
- </li>
2239
- `
3560
+ />
3561
+ <span class="title">${t}</span>
3562
+ </label>
3563
+ </li>
3564
+ `
2240
3565
  ) : null}
2241
- </ul>
3566
+ </ul>
3567
+ `}
2242
3568
  </div>
2243
3569
  </details>
2244
3570
  `
2245
3571
  )}
2246
3572
  </ul>
2247
- ${J(
3573
+ ${Ze(
2248
3574
  this._config.filterProperties,
2249
- () => x`
3575
+ () => ge`
2250
3576
  <a
2251
3577
  id="filter-reset"
2252
3578
  data-cy="filter-reset"
2253
3579
  @click=${() => this.resetFilters()}
2254
- ><small>Reset filters</small></a
3580
+ >Reset filters</a
2255
3581
  >
2256
3582
  `
2257
3583
  )}
2258
3584
  </section>
2259
3585
  `
2260
3586
  )}
2261
- ${J(
3587
+ ${Ze(
2262
3588
  this.config.showResults && this._results,
2263
- () => x`
3589
+ () => ge`
2264
3590
  <section id="section-results">
2265
3591
  <div>
2266
3592
  <slot name="resultstitle"></slot>
2267
3593
  </div>
2268
3594
  <div id="container-results" class="scroll">
2269
- ${this._results.length < 1 ? x` <small class="no-results">No matching items</small> ` : _}
3595
+ ${this._results.length < 1 ? ge` <small class="no-results">No matching items</small> ` : te}
2270
3596
  <ul id="results" part="results">
2271
- ${this._config.aggregateResults ? X(
3597
+ ${this._config.aggregateResults ? lt(
2272
3598
  this._resultAggregation.filter(
2273
- (t) => this.aggregateResults(
3599
+ (e) => this.aggregateResults(
2274
3600
  this._results,
2275
- t
3601
+ e
2276
3602
  ).length
2277
3603
  ),
2278
- (t) => x`<details
3604
+ (e) => ge`<details
2279
3605
  id="details-results"
2280
3606
  open
2281
3607
  >
2282
3608
  <summary>
2283
- <svg
2284
- xmlns="http://www.w3.org/2000/svg"
2285
- viewBox="0 0 24 24"
2286
- >
2287
- <title>chevron-down</title>
2288
- <path
2289
- d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"
2290
- />
2291
- </svg>
2292
- <strong class="title">
2293
- ${t}
2294
- </strong>
2295
- <span style="margin-left: 0.25rem"
2296
- >(${this.aggregateResults(
3609
+ <span class="title">
3610
+ ${e}
3611
+ <span class="count"
3612
+ >(${this.aggregateResults(
2297
3613
  this._results,
2298
- t
3614
+ e
2299
3615
  ).length})</span
2300
- >
3616
+ >
3617
+ </span>
2301
3618
  </summary>
2302
3619
  <ul>
2303
- ${X(
3620
+ ${lt(
2304
3621
  this.aggregateResults(
2305
3622
  this._results,
2306
- t
3623
+ e
2307
3624
  ),
2308
3625
  // @ts-ignore
2309
- (e) => x`
3626
+ (t) => ge`
2310
3627
  <li>
2311
3628
  <label>
2312
3629
  <input
2313
3630
  type="radio"
2314
3631
  name="result"
2315
3632
  id="${// @ts-ignore
2316
- e.id}"
3633
+ t.id}"
2317
3634
  @click=${() => {
2318
- this._selectedResult = e, this._config.onSelect(e);
3635
+ this._selectedResult = t, this._config.onSelect(t);
2319
3636
  }}
2320
3637
  />
2321
- <span class="title"
2322
- >${Yt(
2323
- // @ts-ignore
2324
- e[this._config.titleProperty]
2325
- )}</span
2326
- >
3638
+ ${Ze(
3639
+ this.hasTemplate("result"),
3640
+ () => this.renderTemplate(
3641
+ "result",
3642
+ t,
3643
+ // @ts-ignore
3644
+ `result-${t.id}`
3645
+ ),
3646
+ () => ge`
3647
+ <span class="title"
3648
+ >${hi(
3649
+ // @ts-ignore
3650
+ t[this._config.titleProperty]
3651
+ )}</span
3652
+ >
3653
+ `
3654
+ )}
2327
3655
  </label>
2328
3656
  </li>
2329
3657
  `
2330
3658
  )}
2331
3659
  </ul>
2332
3660
  </details>`
2333
- ) : X(
3661
+ ) : lt(
2334
3662
  this._results,
2335
3663
  // @ts-ignore
2336
- (t) => x`<li part="result">
3664
+ (e) => ge`<li part="result">
2337
3665
  ${// @ts-ignore
2338
- Yt(t[this._config.titleProperty])}
3666
+ hi(e[this._config.titleProperty])}
2339
3667
  </li>`
2340
3668
  )}
2341
3669
  </ul>
@@ -2363,27 +3691,30 @@ let T = class extends Q {
2363
3691
  // slot.replaceWith(clon);
2364
3692
  // }
2365
3693
  };
2366
- F([
2367
- ht()
2368
- ], T.prototype, "_items", 2);
2369
- F([
2370
- ht()
2371
- ], T.prototype, "_results", 2);
2372
- F([
2373
- ht()
2374
- ], T.prototype, "_filters", 2);
2375
- F([
2376
- ht()
2377
- ], T.prototype, "_selectedResult", 2);
2378
- F([
2379
- Ot({ attribute: !1 })
2380
- ], T.prototype, "config", 1);
2381
- F([
2382
- Ot()
2383
- ], T.prototype, "apply", 2);
2384
- T = F([
2385
- Le("eox-itemfilter")
2386
- ], T);
3694
+ He([
3695
+ Rt()
3696
+ ], Pe.prototype, "_items", 2);
3697
+ He([
3698
+ Rt()
3699
+ ], Pe.prototype, "_results", 2);
3700
+ He([
3701
+ Rt()
3702
+ ], Pe.prototype, "_filters", 2);
3703
+ He([
3704
+ Rt()
3705
+ ], Pe.prototype, "_selectedResult", 2);
3706
+ He([
3707
+ Dt({ attribute: !1 })
3708
+ ], Pe.prototype, "config", 1);
3709
+ He([
3710
+ Dt()
3711
+ ], Pe.prototype, "apply", 2);
3712
+ He([
3713
+ Dt({ type: Boolean })
3714
+ ], Pe.prototype, "unstyled", 2);
3715
+ Pe = He([
3716
+ Kr("eox-itemfilter")
3717
+ ], Pe);
2387
3718
  export {
2388
- T as EOxItemFilter
3719
+ Pe as EOxItemFilter
2389
3720
  };