mealz-components 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,19 +3,19 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const N = globalThis, q = N.ShadowRoot && (N.ShadyCSS === void 0 || N.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, J = Symbol(), F = /* @__PURE__ */ new WeakMap();
6
+ const N = globalThis, V = N.ShadowRoot && (N.ShadyCSS === void 0 || N.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, F = Symbol(), W = /* @__PURE__ */ new WeakMap();
7
7
  let nt = class {
8
- constructor(t, e, s) {
9
- if (this._$cssResult$ = !0, s !== J)
8
+ constructor(t, e, i) {
9
+ if (this._$cssResult$ = !0, i !== F)
10
10
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
11
11
  this.cssText = t, this.t = e;
12
12
  }
13
13
  get styleSheet() {
14
14
  let t = this.o;
15
15
  const e = this.t;
16
- if (q && t === void 0) {
17
- const s = e !== void 0 && e.length === 1;
18
- s && (t = F.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && F.set(e, t));
16
+ if (V && t === void 0) {
17
+ const i = e !== void 0 && e.length === 1;
18
+ i && (t = W.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && W.set(e, t));
19
19
  }
20
20
  return t;
21
21
  }
@@ -23,64 +23,64 @@ let nt = class {
23
23
  return this.cssText;
24
24
  }
25
25
  };
26
- const pt = (i) => new nt(typeof i == "string" ? i : i + "", void 0, J), ct = (i, ...t) => {
27
- const e = i.length === 1 ? i[0] : t.reduce((s, o, r) => s + ((n) => {
26
+ const dt = (s) => new nt(typeof s == "string" ? s : s + "", void 0, F), ct = (s, ...t) => {
27
+ const e = s.length === 1 ? s[0] : t.reduce((i, o, r) => i + ((n) => {
28
28
  if (n._$cssResult$ === !0)
29
29
  return n.cssText;
30
30
  if (typeof n == "number")
31
31
  return n;
32
32
  throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
33
- })(o) + i[r + 1], i[0]);
34
- return new nt(e, i, J);
35
- }, ut = (i, t) => {
36
- if (q)
37
- i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
33
+ })(o) + s[r + 1], s[0]);
34
+ return new nt(e, s, F);
35
+ }, ut = (s, t) => {
36
+ if (V)
37
+ s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
38
38
  else
39
39
  for (const e of t) {
40
- const s = document.createElement("style"), o = N.litNonce;
41
- o !== void 0 && s.setAttribute("nonce", o), s.textContent = e.cssText, i.appendChild(s);
40
+ const i = document.createElement("style"), o = N.litNonce;
41
+ o !== void 0 && i.setAttribute("nonce", o), i.textContent = e.cssText, s.appendChild(i);
42
42
  }
43
- }, Z = q ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
43
+ }, G = V ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
44
44
  let e = "";
45
- for (const s of t.cssRules)
46
- e += s.cssText;
47
- return pt(e);
48
- })(i) : i;
45
+ for (const i of t.cssRules)
46
+ e += i.cssText;
47
+ return dt(e);
48
+ })(s) : s;
49
49
  /**
50
50
  * @license
51
51
  * Copyright 2017 Google LLC
52
52
  * SPDX-License-Identifier: BSD-3-Clause
53
53
  */
54
- const { is: mt, defineProperty: gt, getOwnPropertyDescriptor: ft, getOwnPropertyNames: _t, getOwnPropertySymbols: $t, getPrototypeOf: yt } = Object, $ = globalThis, G = $.trustedTypes, bt = G ? G.emptyScript : "", z = $.reactiveElementPolyfillSupport, S = (i, t) => i, H = { toAttribute(i, t) {
54
+ const { is: mt, defineProperty: gt, getOwnPropertyDescriptor: ft, getOwnPropertyNames: _t, getOwnPropertySymbols: $t, getPrototypeOf: bt } = Object, b = globalThis, Z = b.trustedTypes, yt = Z ? Z.emptyScript : "", z = b.reactiveElementPolyfillSupport, P = (s, t) => s, I = { toAttribute(s, t) {
55
55
  switch (t) {
56
56
  case Boolean:
57
- i = i ? bt : null;
57
+ s = s ? yt : null;
58
58
  break;
59
59
  case Object:
60
60
  case Array:
61
- i = i == null ? i : JSON.stringify(i);
61
+ s = s == null ? s : JSON.stringify(s);
62
62
  }
63
- return i;
64
- }, fromAttribute(i, t) {
65
- let e = i;
63
+ return s;
64
+ }, fromAttribute(s, t) {
65
+ let e = s;
66
66
  switch (t) {
67
67
  case Boolean:
68
- e = i !== null;
68
+ e = s !== null;
69
69
  break;
70
70
  case Number:
71
- e = i === null ? null : Number(i);
71
+ e = s === null ? null : Number(s);
72
72
  break;
73
73
  case Object:
74
74
  case Array:
75
75
  try {
76
- e = JSON.parse(i);
76
+ e = JSON.parse(s);
77
77
  } catch {
78
78
  e = null;
79
79
  }
80
80
  }
81
81
  return e;
82
- } }, W = (i, t) => !mt(i, t), K = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: W };
83
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), $.litPropertyMetadata ?? ($.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
82
+ } }, J = (s, t) => !mt(s, t), K = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: J };
83
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), b.litPropertyMetadata ?? (b.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
84
84
  class w extends HTMLElement {
85
85
  static addInitializer(t) {
86
86
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
@@ -90,11 +90,11 @@ class w extends HTMLElement {
90
90
  }
91
91
  static createProperty(t, e = K) {
92
92
  if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
93
- const s = Symbol(), o = this.getPropertyDescriptor(t, s, e);
93
+ const i = Symbol(), o = this.getPropertyDescriptor(t, i, e);
94
94
  o !== void 0 && gt(this.prototype, t, o);
95
95
  }
96
96
  }
97
- static getPropertyDescriptor(t, e, s) {
97
+ static getPropertyDescriptor(t, e, i) {
98
98
  const { get: o, set: r } = ft(this.prototype, t) ?? { get() {
99
99
  return this[e];
100
100
  }, set(n) {
@@ -104,36 +104,36 @@ class w extends HTMLElement {
104
104
  return o == null ? void 0 : o.call(this);
105
105
  }, set(n) {
106
106
  const l = o == null ? void 0 : o.call(this);
107
- r.call(this, n), this.requestUpdate(t, l, s);
107
+ r.call(this, n), this.requestUpdate(t, l, i);
108
108
  }, configurable: !0, enumerable: !0 };
109
109
  }
110
110
  static getPropertyOptions(t) {
111
111
  return this.elementProperties.get(t) ?? K;
112
112
  }
113
113
  static _$Ei() {
114
- if (this.hasOwnProperty(S("elementProperties")))
114
+ if (this.hasOwnProperty(P("elementProperties")))
115
115
  return;
116
- const t = yt(this);
116
+ const t = bt(this);
117
117
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
118
118
  }
119
119
  static finalize() {
120
- if (this.hasOwnProperty(S("finalized")))
120
+ if (this.hasOwnProperty(P("finalized")))
121
121
  return;
122
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(S("properties"))) {
123
- const e = this.properties, s = [..._t(e), ...$t(e)];
124
- for (const o of s)
122
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
123
+ const e = this.properties, i = [..._t(e), ...$t(e)];
124
+ for (const o of i)
125
125
  this.createProperty(o, e[o]);
126
126
  }
127
127
  const t = this[Symbol.metadata];
128
128
  if (t !== null) {
129
129
  const e = litPropertyMetadata.get(t);
130
130
  if (e !== void 0)
131
- for (const [s, o] of e)
132
- this.elementProperties.set(s, o);
131
+ for (const [i, o] of e)
132
+ this.elementProperties.set(i, o);
133
133
  }
134
134
  this._$Eh = /* @__PURE__ */ new Map();
135
- for (const [e, s] of this.elementProperties) {
136
- const o = this._$Eu(e, s);
135
+ for (const [e, i] of this.elementProperties) {
136
+ const o = this._$Eu(e, i);
137
137
  o !== void 0 && this._$Eh.set(o, e);
138
138
  }
139
139
  this.elementStyles = this.finalizeStyles(this.styles);
@@ -141,16 +141,16 @@ class w extends HTMLElement {
141
141
  static finalizeStyles(t) {
142
142
  const e = [];
143
143
  if (Array.isArray(t)) {
144
- const s = new Set(t.flat(1 / 0).reverse());
145
- for (const o of s)
146
- e.unshift(Z(o));
144
+ const i = new Set(t.flat(1 / 0).reverse());
145
+ for (const o of i)
146
+ e.unshift(G(o));
147
147
  } else
148
- t !== void 0 && e.push(Z(t));
148
+ t !== void 0 && e.push(G(t));
149
149
  return e;
150
150
  }
151
151
  static _$Eu(t, e) {
152
- const s = e.attribute;
153
- return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
152
+ const i = e.attribute;
153
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
154
154
  }
155
155
  constructor() {
156
156
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
@@ -169,8 +169,8 @@ class w extends HTMLElement {
169
169
  }
170
170
  _$E_() {
171
171
  const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
172
- for (const s of e.keys())
173
- this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
172
+ for (const i of e.keys())
173
+ this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
174
174
  t.size > 0 && (this._$Ep = t);
175
175
  }
176
176
  createRenderRoot() {
@@ -180,8 +180,8 @@ class w extends HTMLElement {
180
180
  connectedCallback() {
181
181
  var t;
182
182
  this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
183
- var s;
184
- return (s = e.hostConnected) == null ? void 0 : s.call(e);
183
+ var i;
184
+ return (i = e.hostConnected) == null ? void 0 : i.call(e);
185
185
  });
186
186
  }
187
187
  enableUpdating(t) {
@@ -189,39 +189,39 @@ class w extends HTMLElement {
189
189
  disconnectedCallback() {
190
190
  var t;
191
191
  (t = this._$EO) == null || t.forEach((e) => {
192
- var s;
193
- return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
192
+ var i;
193
+ return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
194
194
  });
195
195
  }
196
- attributeChangedCallback(t, e, s) {
197
- this._$AK(t, s);
196
+ attributeChangedCallback(t, e, i) {
197
+ this._$AK(t, i);
198
198
  }
199
199
  _$EC(t, e) {
200
200
  var r;
201
- const s = this.constructor.elementProperties.get(t), o = this.constructor._$Eu(t, s);
202
- if (o !== void 0 && s.reflect === !0) {
203
- const n = (((r = s.converter) == null ? void 0 : r.toAttribute) !== void 0 ? s.converter : H).toAttribute(e, s.type);
201
+ const i = this.constructor.elementProperties.get(t), o = this.constructor._$Eu(t, i);
202
+ if (o !== void 0 && i.reflect === !0) {
203
+ const n = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : I).toAttribute(e, i.type);
204
204
  this._$Em = t, n == null ? this.removeAttribute(o) : this.setAttribute(o, n), this._$Em = null;
205
205
  }
206
206
  }
207
207
  _$AK(t, e) {
208
208
  var r;
209
- const s = this.constructor, o = s._$Eh.get(t);
209
+ const i = this.constructor, o = i._$Eh.get(t);
210
210
  if (o !== void 0 && this._$Em !== o) {
211
- const n = s.getPropertyOptions(o), l = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((r = n.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? n.converter : H;
211
+ const n = i.getPropertyOptions(o), l = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((r = n.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? n.converter : I;
212
212
  this._$Em = o, this[o] = l.fromAttribute(e, n.type), this._$Em = null;
213
213
  }
214
214
  }
215
- requestUpdate(t, e, s) {
215
+ requestUpdate(t, e, i) {
216
216
  if (t !== void 0) {
217
- if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? W)(this[t], e))
217
+ if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? J)(this[t], e))
218
218
  return;
219
- this.P(t, e, s);
219
+ this.P(t, e, i);
220
220
  }
221
221
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
222
222
  }
223
- P(t, e, s) {
224
- this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
223
+ P(t, e, i) {
224
+ this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
225
225
  }
226
226
  async _$ET() {
227
227
  this.isUpdatePending = !0;
@@ -237,7 +237,7 @@ class w extends HTMLElement {
237
237
  return this.performUpdate();
238
238
  }
239
239
  performUpdate() {
240
- var s;
240
+ var i;
241
241
  if (!this.isUpdatePending)
242
242
  return;
243
243
  if (!this.hasUpdated) {
@@ -254,7 +254,7 @@ class w extends HTMLElement {
254
254
  let t = !1;
255
255
  const e = this._$AL;
256
256
  try {
257
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((o) => {
257
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((o) => {
258
258
  var r;
259
259
  return (r = o.hostUpdate) == null ? void 0 : r.call(o);
260
260
  }), this.update(e)) : this._$EU();
@@ -267,9 +267,9 @@ class w extends HTMLElement {
267
267
  }
268
268
  _$AE(t) {
269
269
  var e;
270
- (e = this._$EO) == null || e.forEach((s) => {
270
+ (e = this._$EO) == null || e.forEach((i) => {
271
271
  var o;
272
- return (o = s.hostUpdated) == null ? void 0 : o.call(s);
272
+ return (o = i.hostUpdated) == null ? void 0 : o.call(i);
273
273
  }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
274
274
  }
275
275
  _$EU() {
@@ -292,86 +292,86 @@ class w extends HTMLElement {
292
292
  firstUpdated(t) {
293
293
  }
294
294
  }
295
- w.elementStyles = [], w.shadowRootOptions = { mode: "open" }, w[S("elementProperties")] = /* @__PURE__ */ new Map(), w[S("finalized")] = /* @__PURE__ */ new Map(), z == null || z({ ReactiveElement: w }), ($.reactiveElementVersions ?? ($.reactiveElementVersions = [])).push("2.0.4");
295
+ w.elementStyles = [], w.shadowRootOptions = { mode: "open" }, w[P("elementProperties")] = /* @__PURE__ */ new Map(), w[P("finalized")] = /* @__PURE__ */ new Map(), z == null || z({ ReactiveElement: w }), (b.reactiveElementVersions ?? (b.reactiveElementVersions = [])).push("2.0.4");
296
296
  /**
297
297
  * @license
298
298
  * Copyright 2017 Google LLC
299
299
  * SPDX-License-Identifier: BSD-3-Clause
300
300
  */
301
- const P = globalThis, I = P.trustedTypes, Y = I ? I.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, rt = "$lit$", _ = `lit$${(Math.random() + "").slice(9)}$`, at = "?" + _, vt = `<${at}>`, v = document, U = () => v.createComment(""), k = (i) => i === null || typeof i != "object" && typeof i != "function", lt = Array.isArray, At = (i) => lt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", D = `[
302
- \f\r]`, E = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Q = /-->/g, X = />/g, y = RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^
303
- \f\r"'\`<>=]|("|')|))|$)`, "g"), tt = /'/g, et = /"/g, ht = /^(?:script|style|textarea|title)$/i, wt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), f = wt(1), x = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), st = /* @__PURE__ */ new WeakMap(), b = v.createTreeWalker(v, 129);
304
- function dt(i, t) {
305
- if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
301
+ const L = globalThis, B = L.trustedTypes, Y = B ? B.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, rt = "$lit$", $ = `lit$${(Math.random() + "").slice(9)}$`, at = "?" + $, vt = `<${at}>`, A = document, U = () => A.createComment(""), M = (s) => s === null || typeof s != "object" && typeof s != "function", lt = Array.isArray, xt = (s) => lt(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", D = `[
302
+ \f\r]`, C = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Q = /-->/g, X = />/g, v = RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^
303
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), tt = /'/g, et = /"/g, pt = /^(?:script|style|textarea|title)$/i, At = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), u = At(1), S = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), st = /* @__PURE__ */ new WeakMap(), x = A.createTreeWalker(A, 129);
304
+ function ht(s, t) {
305
+ if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
306
306
  throw Error("invalid template strings array");
307
307
  return Y !== void 0 ? Y.createHTML(t) : t;
308
308
  }
309
- const xt = (i, t) => {
310
- const e = i.length - 1, s = [];
311
- let o, r = t === 2 ? "<svg>" : "", n = E;
309
+ const wt = (s, t) => {
310
+ const e = s.length - 1, i = [];
311
+ let o, r = t === 2 ? "<svg>" : "", n = C;
312
312
  for (let l = 0; l < e; l++) {
313
- const a = i[l];
314
- let d, c, h = -1, m = 0;
315
- for (; m < a.length && (n.lastIndex = m, c = n.exec(a), c !== null); )
316
- m = n.lastIndex, n === E ? c[1] === "!--" ? n = Q : c[1] !== void 0 ? n = X : c[2] !== void 0 ? (ht.test(c[2]) && (o = RegExp("</" + c[2], "g")), n = y) : c[3] !== void 0 && (n = y) : n === y ? c[0] === ">" ? (n = o ?? E, h = -1) : c[1] === void 0 ? h = -2 : (h = n.lastIndex - c[2].length, d = c[1], n = c[3] === void 0 ? y : c[3] === '"' ? et : tt) : n === et || n === tt ? n = y : n === Q || n === X ? n = E : (n = y, o = void 0);
317
- const g = n === y && i[l + 1].startsWith("/>") ? " " : "";
318
- r += n === E ? a + vt : h >= 0 ? (s.push(d), a.slice(0, h) + rt + a.slice(h) + _ + g) : a + _ + (h === -2 ? l : g);
319
- }
320
- return [dt(i, r + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
313
+ const a = s[l];
314
+ let h, c, p = -1, f = 0;
315
+ for (; f < a.length && (n.lastIndex = f, c = n.exec(a), c !== null); )
316
+ f = n.lastIndex, n === C ? c[1] === "!--" ? n = Q : c[1] !== void 0 ? n = X : c[2] !== void 0 ? (pt.test(c[2]) && (o = RegExp("</" + c[2], "g")), n = v) : c[3] !== void 0 && (n = v) : n === v ? c[0] === ">" ? (n = o ?? C, p = -1) : c[1] === void 0 ? p = -2 : (p = n.lastIndex - c[2].length, h = c[1], n = c[3] === void 0 ? v : c[3] === '"' ? et : tt) : n === et || n === tt ? n = v : n === Q || n === X ? n = C : (n = v, o = void 0);
317
+ const _ = n === v && s[l + 1].startsWith("/>") ? " " : "";
318
+ r += n === C ? a + vt : p >= 0 ? (i.push(h), a.slice(0, p) + rt + a.slice(p) + $ + _) : a + $ + (p === -2 ? l : _);
319
+ }
320
+ return [ht(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
321
321
  };
322
- class L {
323
- constructor({ strings: t, _$litType$: e }, s) {
322
+ class R {
323
+ constructor({ strings: t, _$litType$: e }, i) {
324
324
  let o;
325
325
  this.parts = [];
326
326
  let r = 0, n = 0;
327
- const l = t.length - 1, a = this.parts, [d, c] = xt(t, e);
328
- if (this.el = L.createElement(d, s), b.currentNode = this.el.content, e === 2) {
329
- const h = this.el.content.firstChild;
330
- h.replaceWith(...h.childNodes);
327
+ const l = t.length - 1, a = this.parts, [h, c] = wt(t, e);
328
+ if (this.el = R.createElement(h, i), x.currentNode = this.el.content, e === 2) {
329
+ const p = this.el.content.firstChild;
330
+ p.replaceWith(...p.childNodes);
331
331
  }
332
- for (; (o = b.nextNode()) !== null && a.length < l; ) {
332
+ for (; (o = x.nextNode()) !== null && a.length < l; ) {
333
333
  if (o.nodeType === 1) {
334
334
  if (o.hasAttributes())
335
- for (const h of o.getAttributeNames())
336
- if (h.endsWith(rt)) {
337
- const m = c[n++], g = o.getAttribute(h).split(_), R = /([.?@])?(.*)/.exec(m);
338
- a.push({ type: 1, index: r, name: R[2], strings: g, ctor: R[1] === "." ? Et : R[1] === "?" ? St : R[1] === "@" ? Pt : B }), o.removeAttribute(h);
335
+ for (const p of o.getAttributeNames())
336
+ if (p.endsWith(rt)) {
337
+ const f = c[n++], _ = o.getAttribute(p).split($), O = /([.?@])?(.*)/.exec(f);
338
+ a.push({ type: 1, index: r, name: O[2], strings: _, ctor: O[1] === "." ? Et : O[1] === "?" ? Ct : O[1] === "@" ? Pt : H }), o.removeAttribute(p);
339
339
  } else
340
- h.startsWith(_) && (a.push({ type: 6, index: r }), o.removeAttribute(h));
341
- if (ht.test(o.tagName)) {
342
- const h = o.textContent.split(_), m = h.length - 1;
343
- if (m > 0) {
344
- o.textContent = I ? I.emptyScript : "";
345
- for (let g = 0; g < m; g++)
346
- o.append(h[g], U()), b.nextNode(), a.push({ type: 2, index: ++r });
347
- o.append(h[m], U());
340
+ p.startsWith($) && (a.push({ type: 6, index: r }), o.removeAttribute(p));
341
+ if (pt.test(o.tagName)) {
342
+ const p = o.textContent.split($), f = p.length - 1;
343
+ if (f > 0) {
344
+ o.textContent = B ? B.emptyScript : "";
345
+ for (let _ = 0; _ < f; _++)
346
+ o.append(p[_], U()), x.nextNode(), a.push({ type: 2, index: ++r });
347
+ o.append(p[f], U());
348
348
  }
349
349
  }
350
350
  } else if (o.nodeType === 8)
351
351
  if (o.data === at)
352
352
  a.push({ type: 2, index: r });
353
353
  else {
354
- let h = -1;
355
- for (; (h = o.data.indexOf(_, h + 1)) !== -1; )
356
- a.push({ type: 7, index: r }), h += _.length - 1;
354
+ let p = -1;
355
+ for (; (p = o.data.indexOf($, p + 1)) !== -1; )
356
+ a.push({ type: 7, index: r }), p += $.length - 1;
357
357
  }
358
358
  r++;
359
359
  }
360
360
  }
361
361
  static createElement(t, e) {
362
- const s = v.createElement("template");
363
- return s.innerHTML = t, s;
362
+ const i = A.createElement("template");
363
+ return i.innerHTML = t, i;
364
364
  }
365
365
  }
366
- function C(i, t, e = i, s) {
366
+ function E(s, t, e = s, i) {
367
367
  var n, l;
368
- if (t === x)
368
+ if (t === S)
369
369
  return t;
370
- let o = s !== void 0 ? (n = e._$Co) == null ? void 0 : n[s] : e._$Cl;
371
- const r = k(t) ? void 0 : t._$litDirective$;
372
- return (o == null ? void 0 : o.constructor) !== r && ((l = o == null ? void 0 : o._$AO) == null || l.call(o, !1), r === void 0 ? o = void 0 : (o = new r(i), o._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = o : e._$Cl = o), o !== void 0 && (t = C(i, o._$AS(i, t.values), o, s)), t;
370
+ let o = i !== void 0 ? (n = e._$Co) == null ? void 0 : n[i] : e._$Cl;
371
+ const r = M(t) ? void 0 : t._$litDirective$;
372
+ return (o == null ? void 0 : o.constructor) !== r && ((l = o == null ? void 0 : o._$AO) == null || l.call(o, !1), r === void 0 ? o = void 0 : (o = new r(s), o._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = o : e._$Cl = o), o !== void 0 && (t = E(s, o._$AS(s, t.values), o, i)), t;
373
373
  }
374
- class Ct {
374
+ class St {
375
375
  constructor(t, e) {
376
376
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
377
377
  }
@@ -382,31 +382,31 @@ class Ct {
382
382
  return this._$AM._$AU;
383
383
  }
384
384
  u(t) {
385
- const { el: { content: e }, parts: s } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ?? v).importNode(e, !0);
386
- b.currentNode = o;
387
- let r = b.nextNode(), n = 0, l = 0, a = s[0];
385
+ const { el: { content: e }, parts: i } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ?? A).importNode(e, !0);
386
+ x.currentNode = o;
387
+ let r = x.nextNode(), n = 0, l = 0, a = i[0];
388
388
  for (; a !== void 0; ) {
389
389
  if (n === a.index) {
390
- let d;
391
- a.type === 2 ? d = new O(r, r.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (d = new Tt(r, this, t)), this._$AV.push(d), a = s[++l];
390
+ let h;
391
+ a.type === 2 ? h = new k(r, r.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (h = new Lt(r, this, t)), this._$AV.push(h), a = i[++l];
392
392
  }
393
- n !== (a == null ? void 0 : a.index) && (r = b.nextNode(), n++);
393
+ n !== (a == null ? void 0 : a.index) && (r = x.nextNode(), n++);
394
394
  }
395
- return b.currentNode = v, o;
395
+ return x.currentNode = A, o;
396
396
  }
397
397
  p(t) {
398
398
  let e = 0;
399
- for (const s of this._$AV)
400
- s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
399
+ for (const i of this._$AV)
400
+ i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
401
401
  }
402
402
  }
403
- class O {
403
+ class k {
404
404
  get _$AU() {
405
405
  var t;
406
406
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
407
407
  }
408
- constructor(t, e, s, o) {
409
- this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = o, this._$Cv = (o == null ? void 0 : o.isConnected) ?? !0;
408
+ constructor(t, e, i, o) {
409
+ this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = o, this._$Cv = (o == null ? void 0 : o.isConnected) ?? !0;
410
410
  }
411
411
  get parentNode() {
412
412
  let t = this._$AA.parentNode;
@@ -420,7 +420,7 @@ class O {
420
420
  return this._$AB;
421
421
  }
422
422
  _$AI(t, e = this) {
423
- t = C(this, t, e), k(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : At(t) ? this.k(t) : this._(t);
423
+ t = E(this, t, e), M(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : xt(t) ? this.k(t) : this._(t);
424
424
  }
425
425
  S(t) {
426
426
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -429,33 +429,33 @@ class O {
429
429
  this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
430
430
  }
431
431
  _(t) {
432
- this._$AH !== p && k(this._$AH) ? this._$AA.nextSibling.data = t : this.T(v.createTextNode(t)), this._$AH = t;
432
+ this._$AH !== d && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t;
433
433
  }
434
434
  $(t) {
435
435
  var r;
436
- const { values: e, _$litType$: s } = t, o = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = L.createElement(dt(s.h, s.h[0]), this.options)), s);
436
+ const { values: e, _$litType$: i } = t, o = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = R.createElement(ht(i.h, i.h[0]), this.options)), i);
437
437
  if (((r = this._$AH) == null ? void 0 : r._$AD) === o)
438
438
  this._$AH.p(e);
439
439
  else {
440
- const n = new Ct(o, this), l = n.u(this.options);
440
+ const n = new St(o, this), l = n.u(this.options);
441
441
  n.p(e), this.T(l), this._$AH = n;
442
442
  }
443
443
  }
444
444
  _$AC(t) {
445
445
  let e = st.get(t.strings);
446
- return e === void 0 && st.set(t.strings, e = new L(t)), e;
446
+ return e === void 0 && st.set(t.strings, e = new R(t)), e;
447
447
  }
448
448
  k(t) {
449
449
  lt(this._$AH) || (this._$AH = [], this._$AR());
450
450
  const e = this._$AH;
451
- let s, o = 0;
451
+ let i, o = 0;
452
452
  for (const r of t)
453
- o === e.length ? e.push(s = new O(this.S(U()), this.S(U()), this, this.options)) : s = e[o], s._$AI(r), o++;
454
- o < e.length && (this._$AR(s && s._$AB.nextSibling, o), e.length = o);
453
+ o === e.length ? e.push(i = new k(this.S(U()), this.S(U()), this, this.options)) : i = e[o], i._$AI(r), o++;
454
+ o < e.length && (this._$AR(i && i._$AB.nextSibling, o), e.length = o);
455
455
  }
456
456
  _$AR(t = this._$AA.nextSibling, e) {
457
- var s;
458
- for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
457
+ var i;
458
+ for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
459
459
  const o = t.nextSibling;
460
460
  t.remove(), t = o;
461
461
  }
@@ -465,85 +465,85 @@ class O {
465
465
  this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
466
466
  }
467
467
  }
468
- class B {
468
+ class H {
469
469
  get tagName() {
470
470
  return this.element.tagName;
471
471
  }
472
472
  get _$AU() {
473
473
  return this._$AM._$AU;
474
474
  }
475
- constructor(t, e, s, o, r) {
476
- this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = o, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = p;
475
+ constructor(t, e, i, o, r) {
476
+ this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = o, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = d;
477
477
  }
478
- _$AI(t, e = this, s, o) {
478
+ _$AI(t, e = this, i, o) {
479
479
  const r = this.strings;
480
480
  let n = !1;
481
481
  if (r === void 0)
482
- t = C(this, t, e, 0), n = !k(t) || t !== this._$AH && t !== x, n && (this._$AH = t);
482
+ t = E(this, t, e, 0), n = !M(t) || t !== this._$AH && t !== S, n && (this._$AH = t);
483
483
  else {
484
484
  const l = t;
485
- let a, d;
485
+ let a, h;
486
486
  for (t = r[0], a = 0; a < r.length - 1; a++)
487
- d = C(this, l[s + a], e, a), d === x && (d = this._$AH[a]), n || (n = !k(d) || d !== this._$AH[a]), d === p ? t = p : t !== p && (t += (d ?? "") + r[a + 1]), this._$AH[a] = d;
487
+ h = E(this, l[i + a], e, a), h === S && (h = this._$AH[a]), n || (n = !M(h) || h !== this._$AH[a]), h === d ? t = d : t !== d && (t += (h ?? "") + r[a + 1]), this._$AH[a] = h;
488
488
  }
489
489
  n && !o && this.j(t);
490
490
  }
491
491
  j(t) {
492
- t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
492
+ t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
493
493
  }
494
494
  }
495
- class Et extends B {
495
+ class Et extends H {
496
496
  constructor() {
497
497
  super(...arguments), this.type = 3;
498
498
  }
499
499
  j(t) {
500
- this.element[this.name] = t === p ? void 0 : t;
500
+ this.element[this.name] = t === d ? void 0 : t;
501
501
  }
502
502
  }
503
- class St extends B {
503
+ class Ct extends H {
504
504
  constructor() {
505
505
  super(...arguments), this.type = 4;
506
506
  }
507
507
  j(t) {
508
- this.element.toggleAttribute(this.name, !!t && t !== p);
508
+ this.element.toggleAttribute(this.name, !!t && t !== d);
509
509
  }
510
510
  }
511
- class Pt extends B {
512
- constructor(t, e, s, o, r) {
513
- super(t, e, s, o, r), this.type = 5;
511
+ class Pt extends H {
512
+ constructor(t, e, i, o, r) {
513
+ super(t, e, i, o, r), this.type = 5;
514
514
  }
515
515
  _$AI(t, e = this) {
516
- if ((t = C(this, t, e, 0) ?? p) === x)
516
+ if ((t = E(this, t, e, 0) ?? d) === S)
517
517
  return;
518
- const s = this._$AH, o = t === p && s !== p || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== p && (s === p || o);
519
- o && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
518
+ const i = this._$AH, o = t === d && i !== d || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== d && (i === d || o);
519
+ o && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
520
520
  }
521
521
  handleEvent(t) {
522
522
  var e;
523
523
  typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
524
524
  }
525
525
  }
526
- class Tt {
527
- constructor(t, e, s) {
528
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
526
+ class Lt {
527
+ constructor(t, e, i) {
528
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
529
529
  }
530
530
  get _$AU() {
531
531
  return this._$AM._$AU;
532
532
  }
533
533
  _$AI(t) {
534
- C(this, t);
534
+ E(this, t);
535
535
  }
536
536
  }
537
- const j = P.litHtmlPolyfillSupport;
538
- j == null || j(L, O), (P.litHtmlVersions ?? (P.litHtmlVersions = [])).push("3.1.2");
539
- const Ut = (i, t, e) => {
540
- const s = (e == null ? void 0 : e.renderBefore) ?? t;
541
- let o = s._$litPart$;
537
+ const j = L.litHtmlPolyfillSupport;
538
+ j == null || j(R, k), (L.litHtmlVersions ?? (L.litHtmlVersions = [])).push("3.1.2");
539
+ const Tt = (s, t, e) => {
540
+ const i = (e == null ? void 0 : e.renderBefore) ?? t;
541
+ let o = i._$litPart$;
542
542
  if (o === void 0) {
543
543
  const r = (e == null ? void 0 : e.renderBefore) ?? null;
544
- s._$litPart$ = o = new O(t.insertBefore(U(), r), r, void 0, e ?? {});
544
+ i._$litPart$ = o = new k(t.insertBefore(U(), r), r, void 0, e ?? {});
545
545
  }
546
- return o._$AI(i), o;
546
+ return o._$AI(s), o;
547
547
  };
548
548
  /**
549
549
  * @license
@@ -561,7 +561,7 @@ class T extends w {
561
561
  }
562
562
  update(t) {
563
563
  const e = this.render();
564
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ut(e, this.renderRoot, this.renderOptions);
564
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Tt(e, this.renderRoot, this.renderOptions);
565
565
  }
566
566
  connectedCallback() {
567
567
  var t;
@@ -572,96 +572,96 @@ class T extends w {
572
572
  super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
573
573
  }
574
574
  render() {
575
- return x;
575
+ return S;
576
576
  }
577
577
  }
578
578
  var ot;
579
579
  T._$litElement$ = !0, T.finalized = !0, (ot = globalThis.litElementHydrateSupport) == null || ot.call(globalThis, { LitElement: T });
580
- const V = globalThis.litElementPolyfillSupport;
581
- V == null || V({ LitElement: T });
580
+ const q = globalThis.litElementPolyfillSupport;
581
+ q == null || q({ LitElement: T });
582
582
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
583
583
  /**
584
584
  * @license
585
585
  * Copyright 2017 Google LLC
586
586
  * SPDX-License-Identifier: BSD-3-Clause
587
587
  */
588
- const kt = (i) => (t, e) => {
588
+ const Ut = (s) => (t, e) => {
589
589
  e !== void 0 ? e.addInitializer(() => {
590
- customElements.define(i, t);
591
- }) : customElements.define(i, t);
590
+ customElements.define(s, t);
591
+ }) : customElements.define(s, t);
592
592
  };
593
593
  /**
594
594
  * @license
595
595
  * Copyright 2017 Google LLC
596
596
  * SPDX-License-Identifier: BSD-3-Clause
597
597
  */
598
- const Lt = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: W }, Ot = (i = Lt, t, e) => {
599
- const { kind: s, metadata: o } = e;
598
+ const Mt = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: J }, Rt = (s = Mt, t, e) => {
599
+ const { kind: i, metadata: o } = e;
600
600
  let r = globalThis.litPropertyMetadata.get(o);
601
- if (r === void 0 && globalThis.litPropertyMetadata.set(o, r = /* @__PURE__ */ new Map()), r.set(e.name, i), s === "accessor") {
601
+ if (r === void 0 && globalThis.litPropertyMetadata.set(o, r = /* @__PURE__ */ new Map()), r.set(e.name, s), i === "accessor") {
602
602
  const { name: n } = e;
603
603
  return { set(l) {
604
604
  const a = t.get.call(this);
605
- t.set.call(this, l), this.requestUpdate(n, a, i);
605
+ t.set.call(this, l), this.requestUpdate(n, a, s);
606
606
  }, init(l) {
607
- return l !== void 0 && this.P(n, void 0, i), l;
607
+ return l !== void 0 && this.P(n, void 0, s), l;
608
608
  } };
609
609
  }
610
- if (s === "setter") {
610
+ if (i === "setter") {
611
611
  const { name: n } = e;
612
612
  return function(l) {
613
613
  const a = this[n];
614
- t.call(this, l), this.requestUpdate(n, a, i);
614
+ t.call(this, l), this.requestUpdate(n, a, s);
615
615
  };
616
616
  }
617
- throw Error("Unsupported decorator location: " + s);
617
+ throw Error("Unsupported decorator location: " + i);
618
618
  };
619
- function M(i) {
620
- return (t, e) => typeof e == "object" ? Ot(i, t, e) : ((s, o, r) => {
619
+ function y(s) {
620
+ return (t, e) => typeof e == "object" ? Rt(s, t, e) : ((i, o, r) => {
621
621
  const n = o.hasOwnProperty(r);
622
- return o.constructor.createProperty(r, n ? { ...s, wrapped: !0 } : s), n ? Object.getOwnPropertyDescriptor(o, r) : void 0;
623
- })(i, t, e);
622
+ return o.constructor.createProperty(r, n ? { ...i, wrapped: !0 } : i), n ? Object.getOwnPropertyDescriptor(o, r) : void 0;
623
+ })(s, t, e);
624
624
  }
625
625
  /**
626
626
  * @license
627
627
  * Copyright 2017 Google LLC
628
628
  * SPDX-License-Identifier: BSD-3-Clause
629
629
  */
630
- function Mt(i) {
631
- return M({ ...i, state: !0, attribute: !1 });
630
+ function kt(s) {
631
+ return y({ ...s, state: !0, attribute: !1 });
632
632
  }
633
633
  /**
634
634
  * @license
635
635
  * Copyright 2017 Google LLC
636
636
  * SPDX-License-Identifier: BSD-3-Clause
637
637
  */
638
- const it = (i, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(i, t, e), e);
638
+ const it = (s, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(s, t, e), e);
639
639
  /**
640
640
  * @license
641
641
  * Copyright 2017 Google LLC
642
642
  * SPDX-License-Identifier: BSD-3-Clause
643
643
  */
644
- function Rt(i, t) {
645
- return (e, s, o) => {
644
+ function Ot(s, t) {
645
+ return (e, i, o) => {
646
646
  const r = (n) => {
647
647
  var l;
648
- return ((l = n.renderRoot) == null ? void 0 : l.querySelector(i)) ?? null;
648
+ return ((l = n.renderRoot) == null ? void 0 : l.querySelector(s)) ?? null;
649
649
  };
650
650
  if (t) {
651
- const { get: n, set: l } = typeof s == "object" ? e : o ?? (() => {
651
+ const { get: n, set: l } = typeof i == "object" ? e : o ?? (() => {
652
652
  const a = Symbol();
653
653
  return { get() {
654
654
  return this[a];
655
- }, set(d) {
656
- this[a] = d;
655
+ }, set(h) {
656
+ this[a] = h;
657
657
  } };
658
658
  })();
659
- return it(e, s, { get() {
659
+ return it(e, i, { get() {
660
660
  let a = n.call(this);
661
661
  return a === void 0 && (a = r(this), (a !== null || this.hasUpdated) && l.call(this, a)), a;
662
662
  } });
663
663
  }
664
- return it(e, s, { get() {
664
+ return it(e, i, { get() {
665
665
  return r(this);
666
666
  } });
667
667
  };
@@ -671,29 +671,29 @@ class Nt {
671
671
  return this.attributes["ext-id"];
672
672
  }
673
673
  }
674
- class Ht {
675
- }
676
- var It = Object.defineProperty, Bt = Object.getOwnPropertyDescriptor, A = (i, t, e, s) => {
677
- for (var o = s > 1 ? void 0 : s ? Bt(t, e) : t, r = i.length - 1, n; r >= 0; r--)
678
- (n = i[r]) && (o = (s ? n(t, e, o) : n(o)) || o);
679
- return s && o && It(t, e, o), o;
674
+ var It = Object.defineProperty, Bt = Object.getOwnPropertyDescriptor, g = (s, t, e, i) => {
675
+ for (var o = i > 1 ? void 0 : i ? Bt(t, e) : t, r = s.length - 1, n; r >= 0; r--)
676
+ (n = s[r]) && (o = (i ? n(t, e, o) : n(o)) || o);
677
+ return i && o && It(t, e, o), o;
680
678
  };
681
- let u = class extends T {
679
+ let m = class extends T {
682
680
  constructor() {
683
- var i, t, e, s;
684
- super(...arguments), this.getByAddress = (t = (i = window.miam) == null ? void 0 : i.pos) == null ? void 0 : t.getByAddress, this.getByCoordinates = (s = (e = window.miam) == null ? void 0 : e.pos) == null ? void 0 : s.getByCoordinates, this._posList = [], this._markers = [], this._searchingPos = !1;
681
+ var s, t, e, i, o, r;
682
+ super(...arguments), this.selectedRadius = 25, this.radiusOption = [10, 25, 50], this.getByAddress = (t = (s = window.miam) == null ? void 0 : s.pos) == null ? void 0 : t.getByAddress, this.getByCoordinates = (i = (e = window.miam) == null ? void 0 : e.pos) == null ? void 0 : i.getByCoordinates, this.getAffiliateSuppliers = (r = (o = window.miam) == null ? void 0 : o.supplier) == null ? void 0 : r.getAffiliateSuppliers, this._posList = [], this._markers = [], this._searchingPos = !1, this._searchSubmitted = !1, this._previousSearchMethod = () => {
683
+ }, this._suppliers = [], this._selectedSuppliers = [], this._showPosList = !1;
685
684
  }
686
- set geolocationCoordinates(i) {
687
- this._geolocationCoordinates = i, this._geolocationCoordinates && Object.keys(this._geolocationCoordinates).length > 0 && this.getPosByCoordinates(this._geolocationCoordinates.latitude, this._geolocationCoordinates.longitude);
685
+ set geolocationCoordinates(s) {
686
+ var t, e;
687
+ this._geolocationCoordinates = s, (t = s == null ? void 0 : s.coords) != null && t.latitude && ((e = s == null ? void 0 : s.coords) != null && e.longitude) && this.getPosByCoordinates();
688
688
  }
689
689
  get geolocationCoordinates() {
690
690
  return this._geolocationCoordinates;
691
691
  }
692
- _nameOfStore(i) {
693
- return `${i.supplier.attributes.name} - ${i.attributes.name}`;
692
+ _nameOfStore(s) {
693
+ return `${s.supplier.attributes.name} - ${s.attributes.name}`;
694
694
  }
695
695
  connectedCallback() {
696
- super.connectedCallback(), console.debug("[MealzComponents] loading store locator"), this.initLeaflet();
696
+ super.connectedCallback(), console.debug("[MealzComponents] loading store locator"), this.initLeaflet(), this.fetchSuppliers();
697
697
  }
698
698
  disconnectedCallback() {
699
699
  super.disconnectedCallback(), this._leafletCss.remove(), this._miamDs.remove(), this._leafletJs.remove();
@@ -704,107 +704,160 @@ let u = class extends T {
704
704
  }
705
705
  // Executes after rendering
706
706
  firstUpdated() {
707
- this.loadMap(), this.geolocationTimeout();
707
+ this.loadMap(), this.geolocationTimeout(), this.listenFormSubmit();
708
708
  }
709
709
  posSelectionTemplate() {
710
- return f`
710
+ return u`
711
711
  <div class="wrapper miam-ds-body">
712
712
  <div class="pos-selection">
713
713
  <div class="title">
714
714
  <button @click=${() => this.dispatchShow(!1)}><</button>
715
715
  <span>Sélectionner un magasin</span>
716
716
  </div>
717
- <div class="address-input-container">
718
- ${this.geolocButtonTemplate()}
719
- <input class="address-input" type="text" name="address" placeholder="Votre code postal ou ville"
720
- @keydown=${(i) => {
721
- i.stopPropagation();
722
- }}>
723
- <button @click=${this.setAddress} class="miam-ds-button primary search-address-button">OK</button>
724
- </div>
725
- ${this.posListTemplate()}
717
+ <form id="store-locator-form">
718
+ <div class="address-input-container">
719
+ ${this.geolocButtonTemplate()}
720
+ <input required class="address-input" type="text" name="address" placeholder="Votre code postal ou ville">
721
+ <button type="submit" class="miam-ds-button primary search-address-button">OK</button>
722
+ </div>
723
+ ${this.selectRadiusTemplate()}
724
+ ${this.selectSupplierTemplate()}
725
+ </form>
726
+ ${this.posListTemplate()}
727
+ ${this._posList.length > 0 ? u`
728
+ <div id="mobile-buttons-wrapper" class="mobile-buttons-wrapper__see-list">
729
+ <button @click=${() => this.togglePosList(this._showPosList)} class="miam-ds-button primary hide-pos-button">
730
+ ${this.getButtonLabel()}
731
+ </button>
732
+ </div>` : ""}
726
733
  </div>
734
+ </div>
727
735
  ${this.posMapTemplate()}
728
736
  </div>
729
737
  `;
730
738
  }
731
739
  geolocButtonTemplate() {
732
- let i;
733
- if (this._geolocationCoordinates === void 0)
734
- i = f`<div class="miam-ds-loader"></div>`;
735
- else if (Object.keys(this._geolocationCoordinates).length > 0)
736
- i = f`<img title="Votre position" class="geolocation-icon" src="https://storage.googleapis.com/assets.miam.tech/generic/icons/locate-primary.svg" alt="Geolocaliser"/>`;
740
+ var t, e, i, o;
741
+ let s;
742
+ if (this.geolocationCoordinates === void 0)
743
+ s = u`<div class="miam-ds-loader"></div>`;
744
+ else if ((e = (t = this.geolocationCoordinates) == null ? void 0 : t.coords) != null && e.longitude && ((o = (i = this.geolocationCoordinates) == null ? void 0 : i.coords) != null && o.latitude))
745
+ s = u`<img title="Votre position" class="geolocation-icon" src="https://storage.googleapis.com/assets.miam.tech/generic/icons/locate-primary.svg" alt="Geolocaliser"/>`;
737
746
  else
738
- return f``;
739
- return f`
740
- <button ?disabled=${this._geolocationCoordinates === void 0} class="locate-button" @click=${this.setGeolocation}>
741
- ${i}
747
+ return u``;
748
+ return u`
749
+ <button type="button" ?disabled=${this.geolocationCoordinates === void 0} class="miam-ds-button square ghost locate-button" @click=${this.setGeolocation}>
750
+ ${s}
742
751
  </button>
743
752
  `;
744
753
  }
754
+ selectRadiusTemplate() {
755
+ return u`
756
+ <div class="select-radius miam-ds-dropdown">
757
+ <select @change=${this.radiusChanged}>
758
+ ${this.radiusOption.map((s) => u`<option ?selected=${s === this.selectedRadius} value=${s}>${s} km</option>`)}
759
+ </select>
760
+ </div>`;
761
+ }
762
+ radiusChanged(s) {
763
+ this.selectedRadius = parseInt(s.target.value), this._showPosList = !0, this._previousSearchMethod(!0);
764
+ }
745
765
  posMapTemplate() {
746
- return f`
766
+ return u`
747
767
  <div id="map"></div>
748
768
  `;
749
769
  }
770
+ selectSupplierTemplate() {
771
+ return u`
772
+ <div class="select-supplier miam-ds-dropdown">
773
+ <select @change=${this.supplierSelected}>
774
+ <option ?selected=${this._selectedSuppliers.length < 1} value="${null}">Toutes les enseignes</option>
775
+ ${this._suppliers.map((s) => u`
776
+ <option ?selected=${s === this._selectedSuppliers[0]} value=${s.id}>
777
+ ${s.name}
778
+ </option>`)}
779
+ </select>
780
+ </div>`;
781
+ }
782
+ supplierSelected(s) {
783
+ s.target.value ? this._selectedSuppliers[0] = s.target.value : this._selectedSuppliers = [], this._previousSearchMethod(!0);
784
+ }
750
785
  posListTemplate() {
751
- if (!(this._posList.length < 1))
752
- return f`
753
- <div id="pos-list">
754
- ${this._posList.map((i) => f`
786
+ if (this._searchingPos)
787
+ return u`
788
+ <div class="pos-loader">
789
+ <div class="miam-ds-loader"></div>
790
+ </div>
791
+ `;
792
+ if (this._posList.length < 1 && this._searchSubmitted)
793
+ return u`
794
+ <div class="no-pos-found">
795
+ <b>Aucun magasin trouvé à proximité.</b>
796
+ <span>Essayez une autre adresse.</span>
797
+ </div>
798
+ `;
799
+ if (this._posList.length < 1)
800
+ return;
801
+ const s = this.shadowRoot.querySelector(".pos-selection");
802
+ return s && s.classList.toggle("pos-selection__height", this._showPosList), u`
803
+ <div id="pos-list" class="${this._showPosList ? "pos-list__visible" : "pos-list__hidden"}">
804
+ ${this._posList.map((t) => u`
755
805
  <div class="pos-item">
756
806
  <div class="top">
757
- <img src="${i.supplier.attributes.logo}" alt="${i.supplier.attributes.name}"/>
807
+ <img src="${t.supplier.attributes.logo}" alt="${t.supplier.attributes.name}"/>
758
808
  <div class="top-right">
759
- <div class="name">${this._nameOfStore(i)}</div>
760
- <div class="address">${i.attributes.address}</div>
809
+ <div class="name">${this._nameOfStore(t)}</div>
810
+ <div class="address">${t.attributes.address}</div>
761
811
  </div>
762
812
  </div>
763
813
  <div class="bottom">
764
- <button @click=${() => this.dispatchPos(i)} class="miam-ds-button primary select-pos-button">Sélectionner</button>
814
+ <button @click=${() => this.dispatchPos(t)} class="miam-ds-button primary select-pos-button">Sélectionner</button>
765
815
  </div>
766
816
  </div>
767
817
  `)}
768
818
  </div>
769
- <div id="hide-pos-wrapper">
770
- <button @click=${() => this.togglePosList(!1)} class="miam-ds-button primary hide-pos-button">Masquer</button>
771
- </div>
772
819
  `;
773
820
  }
774
- setAddress() {
775
- if (!this._addressInput.value || this._addressInput.value.length < 3 || this._searchingPos || this._prevAddress === this._addressInput.value + ", France")
821
+ getButtonLabel() {
822
+ if (this._showPosList)
823
+ return "Voir la carte";
824
+ const s = this._posList.length;
825
+ return s === 1 ? "Voir le magasin" : `Voir les ${s} magasins`;
826
+ }
827
+ setAddress(s = !1) {
828
+ if (!this._addressInput.value || this._addressInput.value.length < 3 || this._searchingPos || !s && this._prevAddress === this._addressInput.value + ", France")
776
829
  return;
777
- const i = this.shadowRoot.getElementById("pos-list");
778
- i && i.style.display === "none" && this.togglePosList(!0), this._prevAddress = this._addressInput.value + ", France", this._searchingPos = !0, this.getByAddress(this._prevAddress, 10).subscribe((t) => {
779
- this.setPosList(t), this.setNewLocation(), this._searchingPos = !1, this.requestUpdate();
830
+ const t = this.shadowRoot.getElementById("pos-list");
831
+ t && t.style.display === "none" && this.togglePosList(!0), this._previousSearchMethod = this.setAddress, this._prevAddress = this._addressInput.value + ", France", this._searchingPos = !0, this.requestUpdate(), this.getByAddress(this._prevAddress, this.selectedRadius, this._selectedSuppliers).subscribe((e) => {
832
+ this.setPosList(e), this.setNewLocation(), this._searchingPos = !1, this._searchSubmitted = !0, this.requestUpdate();
780
833
  });
781
834
  }
782
- setGeolocation() {
783
- const i = this.shadowRoot.getElementById("pos-list");
784
- i && i.style.display === "none" && this.togglePosList(!0), this._prevAddress = "", this.getPosByCoordinates();
835
+ setGeolocation(s = !1) {
836
+ const t = this.shadowRoot.getElementById("pos-list");
837
+ t && t.style.display === "none" && this.togglePosList(!0), this._prevAddress = "", this._previousSearchMethod = this.setGeolocation, this.getPosByCoordinates();
785
838
  }
786
839
  getPosByCoordinates() {
787
- this.getByCoordinates(this.geolocationCoordinates.latitude, this.geolocationCoordinates.longitude, 10).subscribe((i) => {
788
- this._addressInput.value = "", this.setPosList(i), this.setNewLocation(), this.requestUpdate();
840
+ this._searchingPos = !0, this.requestUpdate(), this.getByCoordinates(this.geolocationCoordinates.coords.latitude, this.geolocationCoordinates.coords.longitude, this.selectedRadius, this._selectedSuppliers).subscribe((s) => {
841
+ this._addressInput.value = "", this.setPosList(s), this._searchingPos = !1, this.setNewLocation(), this._searchSubmitted = !0, this.requestUpdate();
789
842
  });
790
843
  }
791
- setPosList(i) {
792
- this._posList = i.data.map((t) => {
844
+ setPosList(s) {
845
+ this._posList = s.data.map((t) => {
793
846
  const e = Object.assign(new Nt(), t);
794
- return e.supplier = i.included.find((s) => s.id === e.relationships.supplier.data.id), e;
847
+ return e.supplier = s.included.find((i) => i.id === e.relationships.supplier.data.id), e;
795
848
  });
796
849
  }
797
- dispatchPos(i) {
850
+ dispatchPos(s) {
798
851
  const t = {
799
- detail: { posId: i.id, posExtId: i.extId, supplierId: i.supplier.id, posName: this._nameOfStore(i) },
852
+ detail: { posId: s.id, posExtId: s.extId, supplierId: s.supplier.id, posName: this._nameOfStore(s) },
800
853
  bubbles: !0,
801
854
  composed: !0
802
855
  };
803
856
  console.debug("[MealzComponents] dispatchEvent posIdChange", t), this.dispatchEvent(new CustomEvent("posIdChange", t));
804
857
  }
805
- dispatchShow(i) {
858
+ dispatchShow(s) {
806
859
  const t = {
807
- detail: { show: i },
860
+ detail: { show: s },
808
861
  bubbles: !0,
809
862
  composed: !0
810
863
  };
@@ -814,37 +867,56 @@ let u = class extends T {
814
867
  initLeaflet() {
815
868
  this._leafletCss = document.createElement("link"), this._leafletCss.setAttribute("rel", "stylesheet"), this._leafletCss.setAttribute("href", "https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), this._leafletCss.setAttribute("integrity", "sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="), this._leafletCss.setAttribute("crossorigin", ""), this._leafletJs = document.createElement("script"), this._leafletJs.setAttribute("src", "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"), this._leafletJs.setAttribute("integrity", "sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="), this._leafletJs.setAttribute("crossorigin", ""), this._miamDs = document.createElement("link"), this._miamDs.setAttribute("rel", "stylesheet"), this._miamDs.setAttribute("href", "https://unpkg.com/miam-ds@1.2.4/miam-ds.min.css"), this.shadowRoot.appendChild(this._miamDs), this.shadowRoot.appendChild(this._leafletCss), document.head.appendChild(this._leafletJs);
816
869
  }
870
+ waitForLeaflet(s) {
871
+ let i = 50;
872
+ console.debug("[Map] Checking for window.L");
873
+ const o = setInterval(() => {
874
+ window.L !== void 0 || i === 0 ? (clearInterval(o), window.L !== void 0 ? (console.debug("[Map] window.L is defined"), s(!0)) : (console.error("[Map] Failed to load Leaflet after", 50 * 100, "ms"), s(!1))) : i--;
875
+ }, 100);
876
+ }
877
+ initMap() {
878
+ this._map && (this._map.off(), this._map.remove()), this.setNewLocation(), window.L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png", {
879
+ maxZoom: 19,
880
+ attribution: "Map tiles by Carto, under CC BY 3.0. Data by OpenStreetMap, under ODbL."
881
+ }).addTo(this._map);
882
+ }
817
883
  loadMap() {
818
- this._map && (this._map.off(), this._map.remove()), setTimeout(() => {
819
- this.setNewLocation(), window.L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png", {
820
- maxZoom: 19,
821
- attribution: "Map tiles by Carto, under CC BY 3.0. Data by OpenStreetMap, under ODbL."
822
- }).addTo(this._map);
823
- }, 250);
884
+ this.waitForLeaflet((s) => {
885
+ s && this.initMap();
886
+ });
887
+ }
888
+ fetchSuppliers() {
889
+ this.getAffiliateSuppliers().subscribe((s) => {
890
+ this._suppliers = s.map((t) => ({
891
+ id: t.id,
892
+ name: t.attributes.name
893
+ })), this.requestUpdate();
894
+ });
824
895
  }
825
896
  setNewLocation() {
826
- const i = this.shadowRoot.getElementById("map");
827
- i && (this._map ? (this._markers.forEach((t) => {
828
- this._map.removeLayer(t);
829
- }), this._markers = [], this._map.panTo(this.getCoordinates())) : this._map = window.L.map(i).setView(this.getCoordinates(), 13), this.addMarkers());
897
+ var t;
898
+ const s = this.shadowRoot.getElementById("map");
899
+ s && (this._map ? (this._markers.forEach((e) => {
900
+ this._map.removeLayer(e);
901
+ }), this._markers = [], this._map.panTo(this.getCoordinates())) : this._map = (t = window.L) == null ? void 0 : t.map(s).setView(this.getCoordinates(), 13), this.addMarkers());
830
902
  }
831
903
  getCoordinates() {
832
904
  return this._posList.length < 1 ? [48.866667, 2.333333] : [this._posList[0].attributes.latitude, this._posList[0].attributes.longitude];
833
905
  }
834
906
  addMarkers() {
835
- this._posList.length > 0 && this._posList.forEach((i, t) => {
907
+ this._posList.length > 0 && this._posList.forEach((s, t) => {
836
908
  this._markers.push(window.L.marker(
837
- [i.attributes.latitude, i.attributes.longitude],
838
- { icon: this.buildIcon(i.supplier) }
909
+ [s.attributes.latitude, s.attributes.longitude],
910
+ { icon: this.buildIcon(s.supplier) }
839
911
  ).addTo(this._map));
840
912
  let e = window.L.popup({
841
913
  content: `
842
914
  <div class="pos-item">
843
915
  <div class="top">
844
- <img class="pos-img" src="${i.supplier.attributes.logo}" alt="${i.supplier.attributes.name}"/>
916
+ <img class="pos-img" src="${s.supplier.attributes.logo}" alt="${s.supplier.attributes.name}"/>
845
917
  <div class="top-right">
846
- <div class="name">${this._nameOfStore(i)}</div>
847
- <div class="address">${i.attributes.address}</div>
918
+ <div class="name">${this._nameOfStore(s)}</div>
919
+ <div class="address">${s.attributes.address}</div>
848
920
  </div>
849
921
  </div>
850
922
  <div class="bottom">
@@ -853,16 +925,16 @@ let u = class extends T {
853
925
  </div>
854
926
  `
855
927
  });
856
- this._markers[t].bindPopup(e).on("popupopen", (s) => {
857
- s.target.getPopup().getElement().querySelector("#select").addEventListener("click", () => {
858
- this.dispatchPos(i);
928
+ this._markers[t].bindPopup(e).on("popupopen", (i) => {
929
+ i.target.getPopup().getElement().querySelector("#select").addEventListener("click", () => {
930
+ this.dispatchPos(s);
859
931
  });
860
932
  });
861
933
  });
862
934
  }
863
- buildIcon(i) {
935
+ buildIcon(s) {
864
936
  return window.L.icon({
865
- iconUrl: i.attributes.logo || "https://cdn-icons-png.flaticon.com/512/3515/3515146.png",
937
+ iconUrl: s.attributes.logo || "https://cdn-icons-png.flaticon.com/512/3515/3515146.png",
866
938
  shadowUrl: "https://storage.googleapis.com/assets.miam.tech/mealz-components/store-locator/marker.svg",
867
939
  iconSize: [32, 32],
868
940
  // size of the icon
@@ -876,17 +948,22 @@ let u = class extends T {
876
948
  // point from which the popup should open relative to the iconAnchor
877
949
  });
878
950
  }
879
- togglePosList(i) {
880
- const t = this.shadowRoot.getElementById("pos-list"), e = this.shadowRoot.getElementById("hide-pos-wrapper");
881
- !t || !e || (i ? (t.style.display = "flex", e.style.display = "flex") : (t.style.display = "none", e.style.display = "none"));
951
+ togglePosList(s) {
952
+ const t = this.shadowRoot.getElementById("pos-list"), e = this.shadowRoot.getElementById("mobile-buttons-wrapper");
953
+ !t || !e || (s ? (t.style.display = "none", e.className = "mobile-buttons-wrapper__see-list") : (t.style.display = "flex", e.className = "mobile-buttons-wrapper__see-map"), this._showPosList = !this._showPosList, this.requestUpdate());
882
954
  }
883
955
  geolocationTimeout() {
884
956
  setTimeout(() => {
885
- this._geolocationCoordinates === void 0 && (this._geolocationCoordinates = {});
957
+ this.geolocationCoordinates === void 0 && (this.geolocationCoordinates = {});
886
958
  }, 2e4);
887
959
  }
960
+ listenFormSubmit() {
961
+ this.shadowRoot.getElementById("store-locator-form").addEventListener("submit", (t) => {
962
+ t.preventDefault(), this.setAddress();
963
+ });
964
+ }
888
965
  };
889
- u.styles = [
966
+ m.styles = [
890
967
  ct`
891
968
  :host {
892
969
  display: block;
@@ -903,12 +980,18 @@ u.styles = [
903
980
  width: 320px;
904
981
  padding: 40px var(--spacing-padding-16-px, 16px);
905
982
  flex-direction: column;
906
- align-items: flex-start;
983
+ align-items: stretch;
907
984
  gap: var(--spacing-padding-16-px, 16px);
908
985
  flex-shrink: 0;
909
986
  background: var(--miam-ds-color-neutral-50, #FFF);
910
987
  box-shadow: 2px 0px 16px 0px rgba(0, 0, 0, 0.15);
911
988
  z-index: 1;
989
+
990
+ form {
991
+ display: flex;
992
+ flex-direction: column;
993
+ gap: var(--spacing-padding-8-px, 8px);
994
+ }
912
995
  }
913
996
 
914
997
  .pos-selection .title {
@@ -927,36 +1010,40 @@ u.styles = [
927
1010
  gap: 8px;
928
1011
  height: 40px;
929
1012
  position: relative;
930
- width: 100%;
1013
+ }
1014
+
1015
+ .pos-selection .address-input-container {
1016
+ .address-input {
1017
+ padding-left: 8px;
1018
+ }
931
1019
 
932
- button + .address-input {
1020
+ .locate-button + .address-input {
933
1021
  padding-left: 40px;
934
1022
  }
935
1023
 
936
1024
  .address-input {
937
1025
  flex: 1;
938
1026
  }
939
-
940
- .locate-button {
941
- position: absolute;
942
- background: unset;
943
- border: unset;
944
- padding: 0;
945
- top: 8px;
946
- left: 8px;
947
- width: 24px;
948
- height: 24px;
949
-
950
- img {
951
- cursor: pointer;
952
- width: 24px;
953
- height: 24px;
954
- }
955
- }
1027
+ }
1028
+
1029
+ .pos-selection .address-input-container .locate-button {
1030
+ position: absolute;
1031
+ background: unset;
1032
+ border: unset;
1033
+ padding: 0;
1034
+ top: 8px;
1035
+ left: 8px;
1036
+ width: 24px;
1037
+ height: 24px;
1038
+ }
1039
+
1040
+ .pos-selection .address-input-container .locate-button img {
1041
+ cursor: pointer;
1042
+ width: 24px;
1043
+ height: 24px;
956
1044
  }
957
1045
 
958
1046
  .pos-selection #pos-list {
959
- display: flex;
960
1047
  flex-direction: column;
961
1048
  align-items: flex-start;
962
1049
  gap: var(--spacing-padding-12-px, 12px);
@@ -964,6 +1051,58 @@ u.styles = [
964
1051
  overflow: auto;
965
1052
  }
966
1053
 
1054
+ .pos-list__visible,
1055
+ .pos-list__hidden {
1056
+ display: flex;
1057
+ }
1058
+
1059
+ .pos-selection .pos-loader {
1060
+ flex: 1;
1061
+ width: 100%;
1062
+ display: flex;
1063
+ justify-content: center;
1064
+ align-items: center;
1065
+ }
1066
+
1067
+ .pos-selection .pos-loader .miam-ds-loader {
1068
+ margin: 16px;
1069
+ display: flex;
1070
+ width: 72px;
1071
+ height: 72px;
1072
+ background-position-x: 36px;
1073
+ background-size: 36px 36px;
1074
+ }
1075
+
1076
+ .pos-selection .no-pos-found {
1077
+ margin-bottom: 16px;
1078
+ width: 100%;
1079
+ flex: 1;
1080
+ display: flex;
1081
+ justify-content: center;
1082
+ align-items: center;
1083
+ flex-direction: column;
1084
+ }
1085
+
1086
+ .pos-selection .select-radius {
1087
+ display: flex;
1088
+ }
1089
+
1090
+ .pos-selection .select-radius select {
1091
+ flex: 1;
1092
+ padding: 10px;
1093
+ max-width: initial;
1094
+ }
1095
+
1096
+ .pos-selection .select-supplier {
1097
+ display: flex;
1098
+
1099
+ select {
1100
+ flex: 1;
1101
+ padding: 10px;
1102
+ max-width: initial;
1103
+ }
1104
+ }
1105
+
967
1106
  .pos-item {
968
1107
  display: flex;
969
1108
  flex-direction: column;
@@ -1008,7 +1147,7 @@ u.styles = [
1008
1147
  width: 100%;
1009
1148
  }
1010
1149
 
1011
- #hide-pos-wrapper {
1150
+ #mobile-buttons-wrapper {
1012
1151
  display: none;
1013
1152
  }
1014
1153
 
@@ -1016,6 +1155,8 @@ u.styles = [
1016
1155
  width: 100%;
1017
1156
  min-height: 100%;
1018
1157
  z-index: 0;
1158
+ position: absolute;
1159
+ top: 0;
1019
1160
  }
1020
1161
 
1021
1162
  #map .pos-item {
@@ -1037,13 +1178,16 @@ u.styles = [
1037
1178
  width: 100%;
1038
1179
  padding: 0;
1039
1180
  gap: 0;
1181
+
1182
+ form {
1183
+ padding: 24px 16px;
1184
+ }
1040
1185
  }
1041
1186
 
1042
1187
  .pos-selection .title {
1043
1188
  position: relative;
1044
- height: 56px;
1189
+ min-height: 56px;
1045
1190
  font-size: 16px;
1046
- width: 100%;
1047
1191
  display: flex;
1048
1192
  align-items: center;
1049
1193
  justify-content: center;
@@ -1059,11 +1203,6 @@ u.styles = [
1059
1203
  height: 32px;
1060
1204
  }
1061
1205
 
1062
- .pos-selection .address-input-container {
1063
- width: calc(100% - 32px);
1064
- margin: 24px 16px;
1065
- }
1066
-
1067
1206
  .pos-selection .address-input-container input {
1068
1207
  width: calc(100% - 44px);
1069
1208
  }
@@ -1071,20 +1210,70 @@ u.styles = [
1071
1210
  .pos-selection .address-input-container button {
1072
1211
  width: 36px;
1073
1212
  }
1213
+
1214
+ .pos-selection .suppliers-selection-container {
1215
+ width: calc(100% - 32px);
1216
+ margin: 8px 16px 24px 16px;
1217
+ }
1074
1218
 
1075
1219
  .pos-selection #pos-list {
1076
1220
  padding: 0 16px 12px;
1077
- max-height: 235px;
1078
1221
  align-items: center;
1079
1222
  }
1223
+
1224
+ .pos-list__visible {
1225
+ display: flex;
1226
+ }
1227
+
1228
+ .pos-list__hidden {
1229
+ display: none;
1230
+ }
1231
+
1232
+ .pos-selection__height {
1233
+ height: 100%;
1234
+ }
1235
+
1236
+ .pos-selection .pos-loader {
1237
+ position: absolute;
1238
+ height: 100%;
1239
+ }
1240
+
1241
+ .suppliers-list-wrapper__not-mobile {
1242
+ display: none;
1243
+ }
1244
+
1245
+ .suppliers-list-wrapper__mobile {
1246
+ display: block;
1247
+
1248
+ .suppliers-list {
1249
+ position: relative;
1250
+ z-index: 1;
1251
+ width: calc(100% - 32px);
1252
+ margin: -16px 16px 8px 16px;
1253
+
1254
+ .suppliers-list__supplier {
1255
+ padding: 8px 16px;
1256
+ }
1257
+ }
1258
+ }
1080
1259
 
1081
- #hide-pos-wrapper {
1260
+ #mobile-buttons-wrapper {
1082
1261
  width: 100%;
1083
1262
  display: flex;
1084
1263
  justify-content: center;
1085
1264
  padding: 12px 0;
1086
1265
  }
1087
1266
 
1267
+ .mobile-buttons-wrapper__see-list {
1268
+ z-index: 1;
1269
+ bottom: 40px;
1270
+ position: absolute;
1271
+ }
1272
+
1273
+ .mobile-buttons-wrapper__see-map {
1274
+ margin-top: auto;
1275
+ }
1276
+
1088
1277
  #map {
1089
1278
  min-height: unset;
1090
1279
  position: absolute;
@@ -1094,28 +1283,37 @@ u.styles = [
1094
1283
  }
1095
1284
  `
1096
1285
  ];
1097
- A([
1098
- M({ type: Boolean })
1099
- ], u.prototype, "show", 2);
1100
- A([
1101
- M({ type: Ht })
1102
- ], u.prototype, "geolocationCoordinates", 1);
1103
- A([
1104
- M()
1105
- ], u.prototype, "getByAddress", 2);
1106
- A([
1107
- M()
1108
- ], u.prototype, "getByCoordinates", 2);
1109
- A([
1110
- Mt()
1111
- ], u.prototype, "_geolocationCoordinates", 2);
1112
- A([
1113
- Rt("input")
1114
- ], u.prototype, "_addressInput", 2);
1115
- u = A([
1116
- kt("mealz-store-locator")
1117
- ], u);
1118
- window.customElements.get("mealz-store-locator") || window.customElements.define("mealz-store-locator", u);
1286
+ g([
1287
+ y({ type: Boolean })
1288
+ ], m.prototype, "show", 2);
1289
+ g([
1290
+ y({ type: Number })
1291
+ ], m.prototype, "selectedRadius", 2);
1292
+ g([
1293
+ y({ type: Array })
1294
+ ], m.prototype, "radiusOption", 2);
1295
+ g([
1296
+ y({ type: GeolocationPosition })
1297
+ ], m.prototype, "geolocationCoordinates", 1);
1298
+ g([
1299
+ y()
1300
+ ], m.prototype, "getByAddress", 2);
1301
+ g([
1302
+ y()
1303
+ ], m.prototype, "getByCoordinates", 2);
1304
+ g([
1305
+ y()
1306
+ ], m.prototype, "getAffiliateSuppliers", 2);
1307
+ g([
1308
+ kt()
1309
+ ], m.prototype, "_geolocationCoordinates", 2);
1310
+ g([
1311
+ Ot("input")
1312
+ ], m.prototype, "_addressInput", 2);
1313
+ m = g([
1314
+ Ut("mealz-store-locator")
1315
+ ], m);
1316
+ window.customElements.get("mealz-store-locator") || window.customElements.define("mealz-store-locator", m);
1119
1317
  export {
1120
- u as MealzStoreLocator
1318
+ m as MealzStoreLocator
1121
1319
  };