@salla.sa/ui-address-autocomplete-widget 0.1.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.
- package/README.md +501 -0
- package/dist/index.js +1597 -0
- package/package.json +41 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1597 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const M = globalThis, K = M.ShadowRoot && (M.ShadyCSS === void 0 || M.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, W = Symbol(), J = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let pe = class {
|
|
8
|
+
constructor(e, t, r) {
|
|
9
|
+
if (this._$cssResult$ = !0, r !== W) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
|
+
this.cssText = e, this.t = t;
|
|
11
|
+
}
|
|
12
|
+
get styleSheet() {
|
|
13
|
+
let e = this.o;
|
|
14
|
+
const t = this.t;
|
|
15
|
+
if (K && e === void 0) {
|
|
16
|
+
const r = t !== void 0 && t.length === 1;
|
|
17
|
+
r && (e = J.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && J.set(t, e));
|
|
18
|
+
}
|
|
19
|
+
return e;
|
|
20
|
+
}
|
|
21
|
+
toString() {
|
|
22
|
+
return this.cssText;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const ve = (s) => new pe(typeof s == "string" ? s : s + "", void 0, W), ye = (s, ...e) => {
|
|
26
|
+
const t = s.length === 1 ? s[0] : e.reduce((r, i, o) => r + ((n) => {
|
|
27
|
+
if (n._$cssResult$ === !0) return n.cssText;
|
|
28
|
+
if (typeof n == "number") return n;
|
|
29
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
+
})(i) + s[o + 1], s[0]);
|
|
31
|
+
return new pe(t, s, W);
|
|
32
|
+
}, be = (s, e) => {
|
|
33
|
+
if (K) s.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
34
|
+
else for (const t of e) {
|
|
35
|
+
const r = document.createElement("style"), i = M.litNonce;
|
|
36
|
+
i !== void 0 && r.setAttribute("nonce", i), r.textContent = t.cssText, s.appendChild(r);
|
|
37
|
+
}
|
|
38
|
+
}, Y = K ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((e) => {
|
|
39
|
+
let t = "";
|
|
40
|
+
for (const r of e.cssRules) t += r.cssText;
|
|
41
|
+
return ve(t);
|
|
42
|
+
})(s) : s;
|
|
43
|
+
/**
|
|
44
|
+
* @license
|
|
45
|
+
* Copyright 2017 Google LLC
|
|
46
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
+
*/
|
|
48
|
+
const { is: $e, defineProperty: _e, getOwnPropertyDescriptor: xe, getOwnPropertyNames: we, getOwnPropertySymbols: Ae, getPrototypeOf: Se } = Object, $ = globalThis, X = $.trustedTypes, Ee = X ? X.emptyScript : "", B = $.reactiveElementPolyfillSupport, T = (s, e) => s, L = { toAttribute(s, e) {
|
|
49
|
+
switch (e) {
|
|
50
|
+
case Boolean:
|
|
51
|
+
s = s ? Ee : null;
|
|
52
|
+
break;
|
|
53
|
+
case Object:
|
|
54
|
+
case Array:
|
|
55
|
+
s = s == null ? s : JSON.stringify(s);
|
|
56
|
+
}
|
|
57
|
+
return s;
|
|
58
|
+
}, fromAttribute(s, e) {
|
|
59
|
+
let t = s;
|
|
60
|
+
switch (e) {
|
|
61
|
+
case Boolean:
|
|
62
|
+
t = s !== null;
|
|
63
|
+
break;
|
|
64
|
+
case Number:
|
|
65
|
+
t = s === null ? null : Number(s);
|
|
66
|
+
break;
|
|
67
|
+
case Object:
|
|
68
|
+
case Array:
|
|
69
|
+
try {
|
|
70
|
+
t = JSON.parse(s);
|
|
71
|
+
} catch {
|
|
72
|
+
t = null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return t;
|
|
76
|
+
} }, Z = (s, e) => !$e(s, e), Q = { attribute: !0, type: String, converter: L, reflect: !1, useDefault: !1, hasChanged: Z };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), $.litPropertyMetadata ?? ($.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
+
let k = class extends HTMLElement {
|
|
79
|
+
static addInitializer(e) {
|
|
80
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(e);
|
|
81
|
+
}
|
|
82
|
+
static get observedAttributes() {
|
|
83
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
|
+
}
|
|
85
|
+
static createProperty(e, t = Q) {
|
|
86
|
+
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
87
|
+
const r = Symbol(), i = this.getPropertyDescriptor(e, r, t);
|
|
88
|
+
i !== void 0 && _e(this.prototype, e, i);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
static getPropertyDescriptor(e, t, r) {
|
|
92
|
+
const { get: i, set: o } = xe(this.prototype, e) ?? { get() {
|
|
93
|
+
return this[t];
|
|
94
|
+
}, set(n) {
|
|
95
|
+
this[t] = n;
|
|
96
|
+
} };
|
|
97
|
+
return { get: i, set(n) {
|
|
98
|
+
const l = i == null ? void 0 : i.call(this);
|
|
99
|
+
o == null || o.call(this, n), this.requestUpdate(e, l, r);
|
|
100
|
+
}, configurable: !0, enumerable: !0 };
|
|
101
|
+
}
|
|
102
|
+
static getPropertyOptions(e) {
|
|
103
|
+
return this.elementProperties.get(e) ?? Q;
|
|
104
|
+
}
|
|
105
|
+
static _$Ei() {
|
|
106
|
+
if (this.hasOwnProperty(T("elementProperties"))) return;
|
|
107
|
+
const e = Se(this);
|
|
108
|
+
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
109
|
+
}
|
|
110
|
+
static finalize() {
|
|
111
|
+
if (this.hasOwnProperty(T("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(T("properties"))) {
|
|
113
|
+
const t = this.properties, r = [...we(t), ...Ae(t)];
|
|
114
|
+
for (const i of r) this.createProperty(i, t[i]);
|
|
115
|
+
}
|
|
116
|
+
const e = this[Symbol.metadata];
|
|
117
|
+
if (e !== null) {
|
|
118
|
+
const t = litPropertyMetadata.get(e);
|
|
119
|
+
if (t !== void 0) for (const [r, i] of t) this.elementProperties.set(r, i);
|
|
120
|
+
}
|
|
121
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
122
|
+
for (const [t, r] of this.elementProperties) {
|
|
123
|
+
const i = this._$Eu(t, r);
|
|
124
|
+
i !== void 0 && this._$Eh.set(i, t);
|
|
125
|
+
}
|
|
126
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
|
+
}
|
|
128
|
+
static finalizeStyles(e) {
|
|
129
|
+
const t = [];
|
|
130
|
+
if (Array.isArray(e)) {
|
|
131
|
+
const r = new Set(e.flat(1 / 0).reverse());
|
|
132
|
+
for (const i of r) t.unshift(Y(i));
|
|
133
|
+
} else e !== void 0 && t.push(Y(e));
|
|
134
|
+
return t;
|
|
135
|
+
}
|
|
136
|
+
static _$Eu(e, t) {
|
|
137
|
+
const r = t.attribute;
|
|
138
|
+
return r === !1 ? void 0 : typeof r == "string" ? r : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
139
|
+
}
|
|
140
|
+
constructor() {
|
|
141
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
142
|
+
}
|
|
143
|
+
_$Ev() {
|
|
144
|
+
var e;
|
|
145
|
+
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
|
|
146
|
+
}
|
|
147
|
+
addController(e) {
|
|
148
|
+
var t;
|
|
149
|
+
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(e), this.renderRoot !== void 0 && this.isConnected && ((t = e.hostConnected) == null || t.call(e));
|
|
150
|
+
}
|
|
151
|
+
removeController(e) {
|
|
152
|
+
var t;
|
|
153
|
+
(t = this._$EO) == null || t.delete(e);
|
|
154
|
+
}
|
|
155
|
+
_$E_() {
|
|
156
|
+
const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
|
|
157
|
+
for (const r of t.keys()) this.hasOwnProperty(r) && (e.set(r, this[r]), delete this[r]);
|
|
158
|
+
e.size > 0 && (this._$Ep = e);
|
|
159
|
+
}
|
|
160
|
+
createRenderRoot() {
|
|
161
|
+
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
+
return be(e, this.constructor.elementStyles), e;
|
|
163
|
+
}
|
|
164
|
+
connectedCallback() {
|
|
165
|
+
var e;
|
|
166
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((t) => {
|
|
167
|
+
var r;
|
|
168
|
+
return (r = t.hostConnected) == null ? void 0 : r.call(t);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
enableUpdating(e) {
|
|
172
|
+
}
|
|
173
|
+
disconnectedCallback() {
|
|
174
|
+
var e;
|
|
175
|
+
(e = this._$EO) == null || e.forEach((t) => {
|
|
176
|
+
var r;
|
|
177
|
+
return (r = t.hostDisconnected) == null ? void 0 : r.call(t);
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
attributeChangedCallback(e, t, r) {
|
|
181
|
+
this._$AK(e, r);
|
|
182
|
+
}
|
|
183
|
+
_$ET(e, t) {
|
|
184
|
+
var o;
|
|
185
|
+
const r = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, r);
|
|
186
|
+
if (i !== void 0 && r.reflect === !0) {
|
|
187
|
+
const n = (((o = r.converter) == null ? void 0 : o.toAttribute) !== void 0 ? r.converter : L).toAttribute(t, r.type);
|
|
188
|
+
this._$Em = e, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
_$AK(e, t) {
|
|
192
|
+
var o, n;
|
|
193
|
+
const r = this.constructor, i = r._$Eh.get(e);
|
|
194
|
+
if (i !== void 0 && this._$Em !== i) {
|
|
195
|
+
const l = r.getPropertyOptions(i), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((o = l.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? l.converter : L;
|
|
196
|
+
this._$Em = i;
|
|
197
|
+
const u = a.fromAttribute(t, l.type);
|
|
198
|
+
this[i] = u ?? ((n = this._$Ej) == null ? void 0 : n.get(i)) ?? u, this._$Em = null;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
requestUpdate(e, t, r, i = !1, o) {
|
|
202
|
+
var n;
|
|
203
|
+
if (e !== void 0) {
|
|
204
|
+
const l = this.constructor;
|
|
205
|
+
if (i === !1 && (o = this[e]), r ?? (r = l.getPropertyOptions(e)), !((r.hasChanged ?? Z)(o, t) || r.useDefault && r.reflect && o === ((n = this._$Ej) == null ? void 0 : n.get(e)) && !this.hasAttribute(l._$Eu(e, r)))) return;
|
|
206
|
+
this.C(e, t, r);
|
|
207
|
+
}
|
|
208
|
+
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
209
|
+
}
|
|
210
|
+
C(e, t, { useDefault: r, reflect: i, wrapped: o }, n) {
|
|
211
|
+
r && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, n ?? t ?? this[e]), o !== !0 || n !== void 0) || (this._$AL.has(e) || (this.hasUpdated || r || (t = void 0), this._$AL.set(e, t)), i === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e));
|
|
212
|
+
}
|
|
213
|
+
async _$EP() {
|
|
214
|
+
this.isUpdatePending = !0;
|
|
215
|
+
try {
|
|
216
|
+
await this._$ES;
|
|
217
|
+
} catch (t) {
|
|
218
|
+
Promise.reject(t);
|
|
219
|
+
}
|
|
220
|
+
const e = this.scheduleUpdate();
|
|
221
|
+
return e != null && await e, !this.isUpdatePending;
|
|
222
|
+
}
|
|
223
|
+
scheduleUpdate() {
|
|
224
|
+
return this.performUpdate();
|
|
225
|
+
}
|
|
226
|
+
performUpdate() {
|
|
227
|
+
var r;
|
|
228
|
+
if (!this.isUpdatePending) return;
|
|
229
|
+
if (!this.hasUpdated) {
|
|
230
|
+
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
231
|
+
for (const [o, n] of this._$Ep) this[o] = n;
|
|
232
|
+
this._$Ep = void 0;
|
|
233
|
+
}
|
|
234
|
+
const i = this.constructor.elementProperties;
|
|
235
|
+
if (i.size > 0) for (const [o, n] of i) {
|
|
236
|
+
const { wrapped: l } = n, a = this[o];
|
|
237
|
+
l !== !0 || this._$AL.has(o) || a === void 0 || this.C(o, void 0, n, a);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
let e = !1;
|
|
241
|
+
const t = this._$AL;
|
|
242
|
+
try {
|
|
243
|
+
e = this.shouldUpdate(t), e ? (this.willUpdate(t), (r = this._$EO) == null || r.forEach((i) => {
|
|
244
|
+
var o;
|
|
245
|
+
return (o = i.hostUpdate) == null ? void 0 : o.call(i);
|
|
246
|
+
}), this.update(t)) : this._$EM();
|
|
247
|
+
} catch (i) {
|
|
248
|
+
throw e = !1, this._$EM(), i;
|
|
249
|
+
}
|
|
250
|
+
e && this._$AE(t);
|
|
251
|
+
}
|
|
252
|
+
willUpdate(e) {
|
|
253
|
+
}
|
|
254
|
+
_$AE(e) {
|
|
255
|
+
var t;
|
|
256
|
+
(t = this._$EO) == null || t.forEach((r) => {
|
|
257
|
+
var i;
|
|
258
|
+
return (i = r.hostUpdated) == null ? void 0 : i.call(r);
|
|
259
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
260
|
+
}
|
|
261
|
+
_$EM() {
|
|
262
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
263
|
+
}
|
|
264
|
+
get updateComplete() {
|
|
265
|
+
return this.getUpdateComplete();
|
|
266
|
+
}
|
|
267
|
+
getUpdateComplete() {
|
|
268
|
+
return this._$ES;
|
|
269
|
+
}
|
|
270
|
+
shouldUpdate(e) {
|
|
271
|
+
return !0;
|
|
272
|
+
}
|
|
273
|
+
update(e) {
|
|
274
|
+
this._$Eq && (this._$Eq = this._$Eq.forEach((t) => this._$ET(t, this[t]))), this._$EM();
|
|
275
|
+
}
|
|
276
|
+
updated(e) {
|
|
277
|
+
}
|
|
278
|
+
firstUpdated(e) {
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[T("elementProperties")] = /* @__PURE__ */ new Map(), k[T("finalized")] = /* @__PURE__ */ new Map(), B == null || B({ ReactiveElement: k }), ($.reactiveElementVersions ?? ($.reactiveElementVersions = [])).push("2.1.2");
|
|
282
|
+
/**
|
|
283
|
+
* @license
|
|
284
|
+
* Copyright 2017 Google LLC
|
|
285
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
286
|
+
*/
|
|
287
|
+
const R = globalThis, ee = (s) => s, H = R.trustedTypes, te = H ? H.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, ue = "$lit$", b = `lit$${Math.random().toFixed(9).slice(2)}$`, me = "?" + b, ke = `<${me}>`, A = document, N = () => A.createComment(""), O = (s) => s === null || typeof s != "object" && typeof s != "function", G = Array.isArray, Pe = (s) => G(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", F = `[
|
|
288
|
+
\f\r]`, C = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, se = /-->/g, re = />/g, _ = RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^
|
|
289
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ie = /'/g, oe = /"/g, fe = /^(?:script|style|textarea|title)$/i, Ce = (s) => (e, ...t) => ({ _$litType$: s, strings: e, values: t }), v = Ce(1), S = Symbol.for("lit-noChange"), f = Symbol.for("lit-nothing"), ne = /* @__PURE__ */ new WeakMap(), x = A.createTreeWalker(A, 129);
|
|
290
|
+
function ge(s, e) {
|
|
291
|
+
if (!G(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
292
|
+
return te !== void 0 ? te.createHTML(e) : e;
|
|
293
|
+
}
|
|
294
|
+
const Te = (s, e) => {
|
|
295
|
+
const t = s.length - 1, r = [];
|
|
296
|
+
let i, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = C;
|
|
297
|
+
for (let l = 0; l < t; l++) {
|
|
298
|
+
const a = s[l];
|
|
299
|
+
let u, d, p = -1, g = 0;
|
|
300
|
+
for (; g < a.length && (n.lastIndex = g, d = n.exec(a), d !== null); ) g = n.lastIndex, n === C ? d[1] === "!--" ? n = se : d[1] !== void 0 ? n = re : d[2] !== void 0 ? (fe.test(d[2]) && (i = RegExp("</" + d[2], "g")), n = _) : d[3] !== void 0 && (n = _) : n === _ ? d[0] === ">" ? (n = i ?? C, p = -1) : d[1] === void 0 ? p = -2 : (p = n.lastIndex - d[2].length, u = d[1], n = d[3] === void 0 ? _ : d[3] === '"' ? oe : ie) : n === oe || n === ie ? n = _ : n === se || n === re ? n = C : (n = _, i = void 0);
|
|
301
|
+
const y = n === _ && s[l + 1].startsWith("/>") ? " " : "";
|
|
302
|
+
o += n === C ? a + ke : p >= 0 ? (r.push(u), a.slice(0, p) + ue + a.slice(p) + b + y) : a + b + (p === -2 ? l : y);
|
|
303
|
+
}
|
|
304
|
+
return [ge(s, o + (s[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
|
|
305
|
+
};
|
|
306
|
+
class z {
|
|
307
|
+
constructor({ strings: e, _$litType$: t }, r) {
|
|
308
|
+
let i;
|
|
309
|
+
this.parts = [];
|
|
310
|
+
let o = 0, n = 0;
|
|
311
|
+
const l = e.length - 1, a = this.parts, [u, d] = Te(e, t);
|
|
312
|
+
if (this.el = z.createElement(u, r), x.currentNode = this.el.content, t === 2 || t === 3) {
|
|
313
|
+
const p = this.el.content.firstChild;
|
|
314
|
+
p.replaceWith(...p.childNodes);
|
|
315
|
+
}
|
|
316
|
+
for (; (i = x.nextNode()) !== null && a.length < l; ) {
|
|
317
|
+
if (i.nodeType === 1) {
|
|
318
|
+
if (i.hasAttributes()) for (const p of i.getAttributeNames()) if (p.endsWith(ue)) {
|
|
319
|
+
const g = d[n++], y = i.getAttribute(p).split(b), I = /([.?@])?(.*)/.exec(g);
|
|
320
|
+
a.push({ type: 1, index: o, name: I[2], strings: y, ctor: I[1] === "." ? Ue : I[1] === "?" ? Ne : I[1] === "@" ? Oe : V }), i.removeAttribute(p);
|
|
321
|
+
} else p.startsWith(b) && (a.push({ type: 6, index: o }), i.removeAttribute(p));
|
|
322
|
+
if (fe.test(i.tagName)) {
|
|
323
|
+
const p = i.textContent.split(b), g = p.length - 1;
|
|
324
|
+
if (g > 0) {
|
|
325
|
+
i.textContent = H ? H.emptyScript : "";
|
|
326
|
+
for (let y = 0; y < g; y++) i.append(p[y], N()), x.nextNode(), a.push({ type: 2, index: ++o });
|
|
327
|
+
i.append(p[g], N());
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
} else if (i.nodeType === 8) if (i.data === me) a.push({ type: 2, index: o });
|
|
331
|
+
else {
|
|
332
|
+
let p = -1;
|
|
333
|
+
for (; (p = i.data.indexOf(b, p + 1)) !== -1; ) a.push({ type: 7, index: o }), p += b.length - 1;
|
|
334
|
+
}
|
|
335
|
+
o++;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
static createElement(e, t) {
|
|
339
|
+
const r = A.createElement("template");
|
|
340
|
+
return r.innerHTML = e, r;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
function P(s, e, t = s, r) {
|
|
344
|
+
var n, l;
|
|
345
|
+
if (e === S) return e;
|
|
346
|
+
let i = r !== void 0 ? (n = t._$Co) == null ? void 0 : n[r] : t._$Cl;
|
|
347
|
+
const o = O(e) ? void 0 : e._$litDirective$;
|
|
348
|
+
return (i == null ? void 0 : i.constructor) !== o && ((l = i == null ? void 0 : i._$AO) == null || l.call(i, !1), o === void 0 ? i = void 0 : (i = new o(s), i._$AT(s, t, r)), r !== void 0 ? (t._$Co ?? (t._$Co = []))[r] = i : t._$Cl = i), i !== void 0 && (e = P(s, i._$AS(s, e.values), i, r)), e;
|
|
349
|
+
}
|
|
350
|
+
class Re {
|
|
351
|
+
constructor(e, t) {
|
|
352
|
+
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
353
|
+
}
|
|
354
|
+
get parentNode() {
|
|
355
|
+
return this._$AM.parentNode;
|
|
356
|
+
}
|
|
357
|
+
get _$AU() {
|
|
358
|
+
return this._$AM._$AU;
|
|
359
|
+
}
|
|
360
|
+
u(e) {
|
|
361
|
+
const { el: { content: t }, parts: r } = this._$AD, i = ((e == null ? void 0 : e.creationScope) ?? A).importNode(t, !0);
|
|
362
|
+
x.currentNode = i;
|
|
363
|
+
let o = x.nextNode(), n = 0, l = 0, a = r[0];
|
|
364
|
+
for (; a !== void 0; ) {
|
|
365
|
+
if (n === a.index) {
|
|
366
|
+
let u;
|
|
367
|
+
a.type === 2 ? u = new D(o, o.nextSibling, this, e) : a.type === 1 ? u = new a.ctor(o, a.name, a.strings, this, e) : a.type === 6 && (u = new ze(o, this, e)), this._$AV.push(u), a = r[++l];
|
|
368
|
+
}
|
|
369
|
+
n !== (a == null ? void 0 : a.index) && (o = x.nextNode(), n++);
|
|
370
|
+
}
|
|
371
|
+
return x.currentNode = A, i;
|
|
372
|
+
}
|
|
373
|
+
p(e) {
|
|
374
|
+
let t = 0;
|
|
375
|
+
for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(e, r, t), t += r.strings.length - 2) : r._$AI(e[t])), t++;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
class D {
|
|
379
|
+
get _$AU() {
|
|
380
|
+
var e;
|
|
381
|
+
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
382
|
+
}
|
|
383
|
+
constructor(e, t, r, i) {
|
|
384
|
+
this.type = 2, this._$AH = f, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
|
|
385
|
+
}
|
|
386
|
+
get parentNode() {
|
|
387
|
+
let e = this._$AA.parentNode;
|
|
388
|
+
const t = this._$AM;
|
|
389
|
+
return t !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = t.parentNode), e;
|
|
390
|
+
}
|
|
391
|
+
get startNode() {
|
|
392
|
+
return this._$AA;
|
|
393
|
+
}
|
|
394
|
+
get endNode() {
|
|
395
|
+
return this._$AB;
|
|
396
|
+
}
|
|
397
|
+
_$AI(e, t = this) {
|
|
398
|
+
e = P(this, e, t), O(e) ? e === f || e == null || e === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : e !== this._$AH && e !== S && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Pe(e) ? this.k(e) : this._(e);
|
|
399
|
+
}
|
|
400
|
+
O(e) {
|
|
401
|
+
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
402
|
+
}
|
|
403
|
+
T(e) {
|
|
404
|
+
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
405
|
+
}
|
|
406
|
+
_(e) {
|
|
407
|
+
this._$AH !== f && O(this._$AH) ? this._$AA.nextSibling.data = e : this.T(A.createTextNode(e)), this._$AH = e;
|
|
408
|
+
}
|
|
409
|
+
$(e) {
|
|
410
|
+
var o;
|
|
411
|
+
const { values: t, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = z.createElement(ge(r.h, r.h[0]), this.options)), r);
|
|
412
|
+
if (((o = this._$AH) == null ? void 0 : o._$AD) === i) this._$AH.p(t);
|
|
413
|
+
else {
|
|
414
|
+
const n = new Re(i, this), l = n.u(this.options);
|
|
415
|
+
n.p(t), this.T(l), this._$AH = n;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
_$AC(e) {
|
|
419
|
+
let t = ne.get(e.strings);
|
|
420
|
+
return t === void 0 && ne.set(e.strings, t = new z(e)), t;
|
|
421
|
+
}
|
|
422
|
+
k(e) {
|
|
423
|
+
G(this._$AH) || (this._$AH = [], this._$AR());
|
|
424
|
+
const t = this._$AH;
|
|
425
|
+
let r, i = 0;
|
|
426
|
+
for (const o of e) i === t.length ? t.push(r = new D(this.O(N()), this.O(N()), this, this.options)) : r = t[i], r._$AI(o), i++;
|
|
427
|
+
i < t.length && (this._$AR(r && r._$AB.nextSibling, i), t.length = i);
|
|
428
|
+
}
|
|
429
|
+
_$AR(e = this._$AA.nextSibling, t) {
|
|
430
|
+
var r;
|
|
431
|
+
for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, t); e !== this._$AB; ) {
|
|
432
|
+
const i = ee(e).nextSibling;
|
|
433
|
+
ee(e).remove(), e = i;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
setConnected(e) {
|
|
437
|
+
var t;
|
|
438
|
+
this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e));
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
class V {
|
|
442
|
+
get tagName() {
|
|
443
|
+
return this.element.tagName;
|
|
444
|
+
}
|
|
445
|
+
get _$AU() {
|
|
446
|
+
return this._$AM._$AU;
|
|
447
|
+
}
|
|
448
|
+
constructor(e, t, r, i, o) {
|
|
449
|
+
this.type = 1, this._$AH = f, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = f;
|
|
450
|
+
}
|
|
451
|
+
_$AI(e, t = this, r, i) {
|
|
452
|
+
const o = this.strings;
|
|
453
|
+
let n = !1;
|
|
454
|
+
if (o === void 0) e = P(this, e, t, 0), n = !O(e) || e !== this._$AH && e !== S, n && (this._$AH = e);
|
|
455
|
+
else {
|
|
456
|
+
const l = e;
|
|
457
|
+
let a, u;
|
|
458
|
+
for (e = o[0], a = 0; a < o.length - 1; a++) u = P(this, l[r + a], t, a), u === S && (u = this._$AH[a]), n || (n = !O(u) || u !== this._$AH[a]), u === f ? e = f : e !== f && (e += (u ?? "") + o[a + 1]), this._$AH[a] = u;
|
|
459
|
+
}
|
|
460
|
+
n && !i && this.j(e);
|
|
461
|
+
}
|
|
462
|
+
j(e) {
|
|
463
|
+
e === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
class Ue extends V {
|
|
467
|
+
constructor() {
|
|
468
|
+
super(...arguments), this.type = 3;
|
|
469
|
+
}
|
|
470
|
+
j(e) {
|
|
471
|
+
this.element[this.name] = e === f ? void 0 : e;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
class Ne extends V {
|
|
475
|
+
constructor() {
|
|
476
|
+
super(...arguments), this.type = 4;
|
|
477
|
+
}
|
|
478
|
+
j(e) {
|
|
479
|
+
this.element.toggleAttribute(this.name, !!e && e !== f);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
class Oe extends V {
|
|
483
|
+
constructor(e, t, r, i, o) {
|
|
484
|
+
super(e, t, r, i, o), this.type = 5;
|
|
485
|
+
}
|
|
486
|
+
_$AI(e, t = this) {
|
|
487
|
+
if ((e = P(this, e, t, 0) ?? f) === S) return;
|
|
488
|
+
const r = this._$AH, i = e === f && r !== f || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== f && (r === f || i);
|
|
489
|
+
i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
490
|
+
}
|
|
491
|
+
handleEvent(e) {
|
|
492
|
+
var t;
|
|
493
|
+
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
class ze {
|
|
497
|
+
constructor(e, t, r) {
|
|
498
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = r;
|
|
499
|
+
}
|
|
500
|
+
get _$AU() {
|
|
501
|
+
return this._$AM._$AU;
|
|
502
|
+
}
|
|
503
|
+
_$AI(e) {
|
|
504
|
+
P(this, e);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
const j = R.litHtmlPolyfillSupport;
|
|
508
|
+
j == null || j(z, D), (R.litHtmlVersions ?? (R.litHtmlVersions = [])).push("3.3.2");
|
|
509
|
+
const De = (s, e, t) => {
|
|
510
|
+
const r = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
511
|
+
let i = r._$litPart$;
|
|
512
|
+
if (i === void 0) {
|
|
513
|
+
const o = (t == null ? void 0 : t.renderBefore) ?? null;
|
|
514
|
+
r._$litPart$ = i = new D(e.insertBefore(N(), o), o, void 0, t ?? {});
|
|
515
|
+
}
|
|
516
|
+
return i._$AI(s), i;
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* @license
|
|
520
|
+
* Copyright 2017 Google LLC
|
|
521
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
522
|
+
*/
|
|
523
|
+
const w = globalThis;
|
|
524
|
+
let U = class extends k {
|
|
525
|
+
constructor() {
|
|
526
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
527
|
+
}
|
|
528
|
+
createRenderRoot() {
|
|
529
|
+
var t;
|
|
530
|
+
const e = super.createRenderRoot();
|
|
531
|
+
return (t = this.renderOptions).renderBefore ?? (t.renderBefore = e.firstChild), e;
|
|
532
|
+
}
|
|
533
|
+
update(e) {
|
|
534
|
+
const t = this.render();
|
|
535
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = De(t, this.renderRoot, this.renderOptions);
|
|
536
|
+
}
|
|
537
|
+
connectedCallback() {
|
|
538
|
+
var e;
|
|
539
|
+
super.connectedCallback(), (e = this._$Do) == null || e.setConnected(!0);
|
|
540
|
+
}
|
|
541
|
+
disconnectedCallback() {
|
|
542
|
+
var e;
|
|
543
|
+
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
|
|
544
|
+
}
|
|
545
|
+
render() {
|
|
546
|
+
return S;
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
var ce;
|
|
550
|
+
U._$litElement$ = !0, U.finalized = !0, (ce = w.litElementHydrateSupport) == null || ce.call(w, { LitElement: U });
|
|
551
|
+
const q = w.litElementPolyfillSupport;
|
|
552
|
+
q == null || q({ LitElement: U });
|
|
553
|
+
(w.litElementVersions ?? (w.litElementVersions = [])).push("4.2.2");
|
|
554
|
+
/**
|
|
555
|
+
* @license
|
|
556
|
+
* Copyright 2017 Google LLC
|
|
557
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
558
|
+
*/
|
|
559
|
+
const Ie = (s) => (e, t) => {
|
|
560
|
+
t !== void 0 ? t.addInitializer(() => {
|
|
561
|
+
customElements.define(s, e);
|
|
562
|
+
}) : customElements.define(s, e);
|
|
563
|
+
};
|
|
564
|
+
/**
|
|
565
|
+
* @license
|
|
566
|
+
* Copyright 2017 Google LLC
|
|
567
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
568
|
+
*/
|
|
569
|
+
const Me = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged: Z }, Le = (s = Me, e, t) => {
|
|
570
|
+
const { kind: r, metadata: i } = t;
|
|
571
|
+
let o = globalThis.litPropertyMetadata.get(i);
|
|
572
|
+
if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), r === "setter" && ((s = Object.create(s)).wrapped = !0), o.set(t.name, s), r === "accessor") {
|
|
573
|
+
const { name: n } = t;
|
|
574
|
+
return { set(l) {
|
|
575
|
+
const a = e.get.call(this);
|
|
576
|
+
e.set.call(this, l), this.requestUpdate(n, a, s, !0, l);
|
|
577
|
+
}, init(l) {
|
|
578
|
+
return l !== void 0 && this.C(n, void 0, s, l), l;
|
|
579
|
+
} };
|
|
580
|
+
}
|
|
581
|
+
if (r === "setter") {
|
|
582
|
+
const { name: n } = t;
|
|
583
|
+
return function(l) {
|
|
584
|
+
const a = this[n];
|
|
585
|
+
e.call(this, l), this.requestUpdate(n, a, s, !0, l);
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
throw Error("Unsupported decorator location: " + r);
|
|
589
|
+
};
|
|
590
|
+
function m(s) {
|
|
591
|
+
return (e, t) => typeof t == "object" ? Le(s, e, t) : ((r, i, o) => {
|
|
592
|
+
const n = i.hasOwnProperty(o);
|
|
593
|
+
return i.constructor.createProperty(o, r), n ? Object.getOwnPropertyDescriptor(i, o) : void 0;
|
|
594
|
+
})(s, e, t);
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* @license
|
|
598
|
+
* Copyright 2017 Google LLC
|
|
599
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
600
|
+
*/
|
|
601
|
+
function E(s) {
|
|
602
|
+
return m({ ...s, state: !0, attribute: !1 });
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* @license
|
|
606
|
+
* Copyright 2017 Google LLC
|
|
607
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
608
|
+
*/
|
|
609
|
+
const He = (s, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(s, e, t), t);
|
|
610
|
+
/**
|
|
611
|
+
* @license
|
|
612
|
+
* Copyright 2017 Google LLC
|
|
613
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
614
|
+
*/
|
|
615
|
+
function Ve(s, e) {
|
|
616
|
+
return (t, r, i) => {
|
|
617
|
+
const o = (n) => {
|
|
618
|
+
var l;
|
|
619
|
+
return ((l = n.renderRoot) == null ? void 0 : l.querySelector(s)) ?? null;
|
|
620
|
+
};
|
|
621
|
+
return He(t, r, { get() {
|
|
622
|
+
return o(this);
|
|
623
|
+
} });
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* @license
|
|
628
|
+
* Copyright 2017 Google LLC
|
|
629
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
630
|
+
*/
|
|
631
|
+
const Be = { ATTRIBUTE: 1 }, Fe = (s) => (...e) => ({ _$litDirective$: s, values: e });
|
|
632
|
+
class je {
|
|
633
|
+
constructor(e) {
|
|
634
|
+
}
|
|
635
|
+
get _$AU() {
|
|
636
|
+
return this._$AM._$AU;
|
|
637
|
+
}
|
|
638
|
+
_$AT(e, t, r) {
|
|
639
|
+
this._$Ct = e, this._$AM = t, this._$Ci = r;
|
|
640
|
+
}
|
|
641
|
+
_$AS(e, t) {
|
|
642
|
+
return this.update(e, t);
|
|
643
|
+
}
|
|
644
|
+
update(e, t) {
|
|
645
|
+
return this.render(...t);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* @license
|
|
650
|
+
* Copyright 2018 Google LLC
|
|
651
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
652
|
+
*/
|
|
653
|
+
const ae = Fe(class extends je {
|
|
654
|
+
constructor(s) {
|
|
655
|
+
var e;
|
|
656
|
+
if (super(s), s.type !== Be.ATTRIBUTE || s.name !== "class" || ((e = s.strings) == null ? void 0 : e.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
657
|
+
}
|
|
658
|
+
render(s) {
|
|
659
|
+
return " " + Object.keys(s).filter((e) => s[e]).join(" ") + " ";
|
|
660
|
+
}
|
|
661
|
+
update(s, [e]) {
|
|
662
|
+
var r, i;
|
|
663
|
+
if (this.st === void 0) {
|
|
664
|
+
this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((o) => o !== "")));
|
|
665
|
+
for (const o in e) e[o] && !((r = this.nt) != null && r.has(o)) && this.st.add(o);
|
|
666
|
+
return this.render(e);
|
|
667
|
+
}
|
|
668
|
+
const t = s.element.classList;
|
|
669
|
+
for (const o of this.st) o in e || (t.remove(o), this.st.delete(o));
|
|
670
|
+
for (const o in e) {
|
|
671
|
+
const n = !!e[o];
|
|
672
|
+
n === this.st.has(o) || (i = this.nt) != null && i.has(o) || (n ? (t.add(o), this.st.add(o)) : (t.remove(o), this.st.delete(o)));
|
|
673
|
+
}
|
|
674
|
+
return S;
|
|
675
|
+
}
|
|
676
|
+
}), qe = [
|
|
677
|
+
"AE",
|
|
678
|
+
"AR",
|
|
679
|
+
"AT",
|
|
680
|
+
"AU",
|
|
681
|
+
"BE",
|
|
682
|
+
"BG",
|
|
683
|
+
"BR",
|
|
684
|
+
"CA",
|
|
685
|
+
"CH",
|
|
686
|
+
"CL",
|
|
687
|
+
"CO",
|
|
688
|
+
"CZ",
|
|
689
|
+
"DE",
|
|
690
|
+
"DK",
|
|
691
|
+
"EE",
|
|
692
|
+
"ES",
|
|
693
|
+
"FI",
|
|
694
|
+
"FR",
|
|
695
|
+
"GB",
|
|
696
|
+
"GR",
|
|
697
|
+
"HK",
|
|
698
|
+
"HR",
|
|
699
|
+
"HU",
|
|
700
|
+
"ID",
|
|
701
|
+
"IE",
|
|
702
|
+
"IL",
|
|
703
|
+
"IN",
|
|
704
|
+
"IT",
|
|
705
|
+
"JP",
|
|
706
|
+
"KR",
|
|
707
|
+
"LT",
|
|
708
|
+
"LU",
|
|
709
|
+
"LV",
|
|
710
|
+
"MX",
|
|
711
|
+
"MY",
|
|
712
|
+
"NL",
|
|
713
|
+
"NO",
|
|
714
|
+
"NZ",
|
|
715
|
+
"PE",
|
|
716
|
+
"PH",
|
|
717
|
+
"PL",
|
|
718
|
+
"PT",
|
|
719
|
+
"RO",
|
|
720
|
+
"SE",
|
|
721
|
+
"SG",
|
|
722
|
+
"SI",
|
|
723
|
+
"SK",
|
|
724
|
+
"TH",
|
|
725
|
+
"TR",
|
|
726
|
+
"TW",
|
|
727
|
+
"US",
|
|
728
|
+
"VN",
|
|
729
|
+
"ZA"
|
|
730
|
+
];
|
|
731
|
+
function tt(s, e) {
|
|
732
|
+
let t = null, r = 0;
|
|
733
|
+
return function(...i) {
|
|
734
|
+
const o = Date.now(), n = e - (o - r);
|
|
735
|
+
n <= 0 || n > e ? (t && (clearTimeout(t), t = null), r = o, s.apply(this, i)) : t || (t = setTimeout(() => {
|
|
736
|
+
r = Date.now(), t = null, s.apply(this, i);
|
|
737
|
+
}, n));
|
|
738
|
+
};
|
|
739
|
+
}
|
|
740
|
+
function Ke(s, e) {
|
|
741
|
+
let t = null;
|
|
742
|
+
return function(...r) {
|
|
743
|
+
t && clearTimeout(t), t = setTimeout(() => {
|
|
744
|
+
s.apply(this, r);
|
|
745
|
+
}, e);
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
function We() {
|
|
749
|
+
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(s) {
|
|
750
|
+
const e = Math.random() * 16 | 0;
|
|
751
|
+
return (s === "x" ? e : e & 3 | 8).toString(16);
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
function Ze(s) {
|
|
755
|
+
if (!s) return null;
|
|
756
|
+
const e = s.find(
|
|
757
|
+
(t) => t.types.includes("country")
|
|
758
|
+
);
|
|
759
|
+
return e ? e.short_name : null;
|
|
760
|
+
}
|
|
761
|
+
function le(s, e) {
|
|
762
|
+
let t = null;
|
|
763
|
+
return s.address_components ? t = Ze(s.address_components) : e && e.length === 1 && (t = e[0].toUpperCase()), t ? {
|
|
764
|
+
isSupported: qe.includes(t),
|
|
765
|
+
countryCode: t
|
|
766
|
+
} : {
|
|
767
|
+
isSupported: null,
|
|
768
|
+
countryCode: null
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
function st(s, e) {
|
|
772
|
+
const t = [];
|
|
773
|
+
let r = 0;
|
|
774
|
+
return [...e].sort((o, n) => o.offset - n.offset).forEach((o) => {
|
|
775
|
+
o.offset > r && t.push({
|
|
776
|
+
text: s.substring(r, o.offset),
|
|
777
|
+
highlight: !1
|
|
778
|
+
}), t.push({
|
|
779
|
+
text: s.substring(o.offset, o.offset + o.length),
|
|
780
|
+
highlight: !0
|
|
781
|
+
}), r = o.offset + o.length;
|
|
782
|
+
}), r < s.length && t.push({
|
|
783
|
+
text: s.substring(r),
|
|
784
|
+
highlight: !1
|
|
785
|
+
}), t;
|
|
786
|
+
}
|
|
787
|
+
const de = {
|
|
788
|
+
en: {
|
|
789
|
+
placeholder: "Search for an address...",
|
|
790
|
+
noResults: "No address found for this search. Try different keywords.",
|
|
791
|
+
errorFetchPredictions: "Unable to search for addresses. Please try again.",
|
|
792
|
+
errorFetchDetails: "Unable to load address details. Please try again.",
|
|
793
|
+
errorNetwork: "Network error. Please check your connection and try again."
|
|
794
|
+
},
|
|
795
|
+
ar: {
|
|
796
|
+
placeholder: "ابحث عن عنوان...",
|
|
797
|
+
noResults: "لم يتم العثور على عنوان لهذا البحث. جرب كلمات مختلفة.",
|
|
798
|
+
errorFetchPredictions: "تعذر البحث عن العناوين. يرجى المحاولة مرة أخرى.",
|
|
799
|
+
errorFetchDetails: "تعذر تحميل تفاصيل العنوان. يرجى المحاولة مرة أخرى.",
|
|
800
|
+
errorNetwork: "خطأ في الشبكة. يرجى التحقق من اتصالك والمحاولة مرة أخرى."
|
|
801
|
+
},
|
|
802
|
+
es: {
|
|
803
|
+
placeholder: "Buscar una dirección...",
|
|
804
|
+
noResults: "No se encontró ninguna dirección para esta búsqueda. Intenta con diferentes palabras.",
|
|
805
|
+
errorFetchPredictions: "No se pueden buscar direcciones. Por favor, inténtelo de nuevo.",
|
|
806
|
+
errorFetchDetails: "No se pueden cargar los detalles de la dirección. Por favor, inténtelo de nuevo.",
|
|
807
|
+
errorNetwork: "Error de red. Verifique su conexión e inténtelo de nuevo."
|
|
808
|
+
},
|
|
809
|
+
fr: {
|
|
810
|
+
placeholder: "Rechercher une adresse...",
|
|
811
|
+
noResults: "Aucune adresse trouvée pour cette recherche. Essayez différents mots-clés.",
|
|
812
|
+
errorFetchPredictions: "Impossible de rechercher des adresses. Veuillez réessayer.",
|
|
813
|
+
errorFetchDetails: "Impossible de charger les détails de l'adresse. Veuillez réessayer.",
|
|
814
|
+
errorNetwork: "Erreur réseau. Vérifiez votre connexion et réessayez."
|
|
815
|
+
},
|
|
816
|
+
de: {
|
|
817
|
+
placeholder: "Nach einer Adresse suchen...",
|
|
818
|
+
noResults: "Keine Adresse für diese Suche gefunden. Versuchen Sie es mit anderen Stichwörtern.",
|
|
819
|
+
errorFetchPredictions: "Adressen können nicht gesucht werden. Bitte versuchen Sie es erneut.",
|
|
820
|
+
errorFetchDetails: "Adressdetails können nicht geladen werden. Bitte versuchen Sie es erneut.",
|
|
821
|
+
errorNetwork: "Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung und versuchen Sie es erneut."
|
|
822
|
+
},
|
|
823
|
+
it: {
|
|
824
|
+
placeholder: "Cerca un indirizzo...",
|
|
825
|
+
noResults: "Nessun indirizzo trovato per questa ricerca. Prova con parole chiave diverse.",
|
|
826
|
+
errorFetchPredictions: "Impossibile cercare indirizzi. Riprova.",
|
|
827
|
+
errorFetchDetails: "Impossibile caricare i dettagli dell'indirizzo. Riprova.",
|
|
828
|
+
errorNetwork: "Errore di rete. Controlla la connessione e riprova."
|
|
829
|
+
},
|
|
830
|
+
pt: {
|
|
831
|
+
placeholder: "Pesquisar um endereço...",
|
|
832
|
+
noResults: "Nenhum endereço encontrado para esta pesquisa. Tente palavras-chave diferentes.",
|
|
833
|
+
errorFetchPredictions: "Não é possível pesquisar endereços. Por favor, tente novamente.",
|
|
834
|
+
errorFetchDetails: "Não é possível carregar os detalhes do endereço. Por favor, tente novamente.",
|
|
835
|
+
errorNetwork: "Erro de rede. Verifique sua conexão e tente novamente."
|
|
836
|
+
},
|
|
837
|
+
ru: {
|
|
838
|
+
placeholder: "Поиск адреса...",
|
|
839
|
+
noResults: "Адрес для этого поиска не найден. Попробуйте другие ключевые слова.",
|
|
840
|
+
errorFetchPredictions: "Невозможно выполнить поиск адресов. Пожалуйста, попробуйте еще раз.",
|
|
841
|
+
errorFetchDetails: "Невозможно загрузить детали адреса. Пожалуйста, попробуйте еще раз.",
|
|
842
|
+
errorNetwork: "Ошибка сети. Проверьте соединение и попробуйте еще раз."
|
|
843
|
+
},
|
|
844
|
+
ja: {
|
|
845
|
+
placeholder: "住所を検索...",
|
|
846
|
+
noResults: "この検索では住所が見つかりませんでした。別のキーワードをお試しください。",
|
|
847
|
+
errorFetchPredictions: "住所を検索できません。もう一度お試しください。",
|
|
848
|
+
errorFetchDetails: "住所の詳細を読み込めません。もう一度お試しください。",
|
|
849
|
+
errorNetwork: "ネットワークエラー。接続を確認してもう一度お試しください。"
|
|
850
|
+
},
|
|
851
|
+
zh: {
|
|
852
|
+
placeholder: "搜索地址...",
|
|
853
|
+
noResults: "未找到此搜索的地址。请尝试不同的关键词。",
|
|
854
|
+
errorFetchPredictions: "无法搜索地址。请重试。",
|
|
855
|
+
errorFetchDetails: "无法加载地址详情。请重试。",
|
|
856
|
+
errorNetwork: "网络错误。请检查您的连接并重试。"
|
|
857
|
+
},
|
|
858
|
+
ko: {
|
|
859
|
+
placeholder: "주소 검색...",
|
|
860
|
+
noResults: "이 검색에 대한 주소를 찾을 수 없습니다. 다른 키워드를 시도해보세요.",
|
|
861
|
+
errorFetchPredictions: "주소를 검색할 수 없습니다. 다시 시도해주세요.",
|
|
862
|
+
errorFetchDetails: "주소 세부정보를 불러올 수 없습니다. 다시 시도해주세요.",
|
|
863
|
+
errorNetwork: "네트워크 오류입니다. 연결을 확인하고 다시 시도해주세요."
|
|
864
|
+
},
|
|
865
|
+
hi: {
|
|
866
|
+
placeholder: "पता खोजें...",
|
|
867
|
+
noResults: "इस खोज के लिए कोई पता नहीं मिला। विभिन्न कीवर्ड आज़माएं।",
|
|
868
|
+
errorFetchPredictions: "पते खोजने में असमर्थ। कृपया पुनः प्रयास करें।",
|
|
869
|
+
errorFetchDetails: "पते का विवरण लोड करने में असमर्थ। कृपया पुनः प्रयास करें।",
|
|
870
|
+
errorNetwork: "नेटवर्क त्रुटि। कृपया अपना कनेक्शन जांचें और पुनः प्रयास करें।"
|
|
871
|
+
},
|
|
872
|
+
tr: {
|
|
873
|
+
placeholder: "Adres ara...",
|
|
874
|
+
noResults: "Bu arama için adres bulunamadı. Farklı anahtar kelimeler deneyin.",
|
|
875
|
+
errorFetchPredictions: "Adresler aranamıyor. Lütfen tekrar deneyin.",
|
|
876
|
+
errorFetchDetails: "Adres detayları yüklenemiyor. Lütfen tekrar deneyin.",
|
|
877
|
+
errorNetwork: "Ağ hatası. Lütfen bağlantınızı kontrol edin ve tekrar deneyin."
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
function he(s = "en") {
|
|
881
|
+
return de[s] || de.en;
|
|
882
|
+
}
|
|
883
|
+
function Ge(s) {
|
|
884
|
+
return ["ar"].includes(s);
|
|
885
|
+
}
|
|
886
|
+
var Je = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, c = (s, e, t, r) => {
|
|
887
|
+
for (var i = r > 1 ? void 0 : r ? Ye(e, t) : e, o = s.length - 1, n; o >= 0; o--)
|
|
888
|
+
(n = s[o]) && (i = (r ? n(e, t, i) : n(i)) || i);
|
|
889
|
+
return r && i && Je(e, t, i), i;
|
|
890
|
+
};
|
|
891
|
+
let h = class extends U {
|
|
892
|
+
constructor() {
|
|
893
|
+
super(...arguments), this.proxyUrl = "https://api.salla.dev", this.authToken = null, this.placeholder = "", this.value = "", this.defaultPlace = "", this.label = null, this.className = "", this.language = "en", this.dir = "auto", this.includedRegionCodes = null, this.locationBias = null, this.locationRestriction = null, this.types = null, this._fields = ["formatted_address", "geometry"], this.strictBounds = !1, this.useSessionToken = !0, this.onValidateAddress = null, this.debounceDelay = 300, this.minChars = 3, this.predictions = [], this.isOpen = !1, this.isLoading = !1, this.error = null, this.activeIndex = -1, this.inputValue = "", this.sessionToken = null, this.abortController = null;
|
|
894
|
+
}
|
|
895
|
+
set country(s) {
|
|
896
|
+
this.includedRegionCodes = s ? s.split(",").map((e) => e.trim()).filter((e) => e) : null;
|
|
897
|
+
}
|
|
898
|
+
get country() {
|
|
899
|
+
return this.includedRegionCodes ? this.includedRegionCodes.join(",") : null;
|
|
900
|
+
}
|
|
901
|
+
set fieldsStr(s) {
|
|
902
|
+
this._fields = s ? s.split(",").map((e) => e.trim()).filter((e) => e) : ["formatted_address", "geometry"];
|
|
903
|
+
}
|
|
904
|
+
get fieldsStr() {
|
|
905
|
+
return this._fields.join(",");
|
|
906
|
+
}
|
|
907
|
+
set fields(s) {
|
|
908
|
+
this._fields = s && s.length > 0 ? s : ["formatted_address", "geometry"];
|
|
909
|
+
}
|
|
910
|
+
get fields() {
|
|
911
|
+
return this._fields;
|
|
912
|
+
}
|
|
913
|
+
connectedCallback() {
|
|
914
|
+
super.connectedCallback(), this.createNewSession(), this.initializeDebounce();
|
|
915
|
+
}
|
|
916
|
+
disconnectedCallback() {
|
|
917
|
+
super.disconnectedCallback(), this.terminateSession(), this.cancelPendingRequest();
|
|
918
|
+
}
|
|
919
|
+
initializeDebounce() {
|
|
920
|
+
this.debouncedFetch = Ke(this.fetchPredictions.bind(this), this.debounceDelay);
|
|
921
|
+
}
|
|
922
|
+
firstUpdated() {
|
|
923
|
+
const s = this.value || this.defaultPlace;
|
|
924
|
+
s && (this.inputValue = s);
|
|
925
|
+
}
|
|
926
|
+
updated(s) {
|
|
927
|
+
s.has("value") && this.value !== this.inputValue && (this.inputValue = this.value), s.has("defaultPlace") && !this.value && this.defaultPlace !== this.inputValue && (this.inputValue = this.defaultPlace), s.has("debounceDelay") && this.initializeDebounce();
|
|
928
|
+
}
|
|
929
|
+
createNewSession() {
|
|
930
|
+
this.useSessionToken && (this.sessionToken = We());
|
|
931
|
+
}
|
|
932
|
+
terminateSession() {
|
|
933
|
+
this.sessionToken = null;
|
|
934
|
+
}
|
|
935
|
+
cancelPendingRequest() {
|
|
936
|
+
this.abortController && (this.abortController.abort(), this.abortController = null);
|
|
937
|
+
}
|
|
938
|
+
async fetchPredictions(s) {
|
|
939
|
+
if (!s.trim()) {
|
|
940
|
+
this.predictions = [], this.isOpen = !1, this.isLoading = !1;
|
|
941
|
+
return;
|
|
942
|
+
}
|
|
943
|
+
if (s.trim().length < this.minChars) {
|
|
944
|
+
this.predictions = [], this.isOpen = !1, this.isLoading = !1;
|
|
945
|
+
return;
|
|
946
|
+
}
|
|
947
|
+
this.cancelPendingRequest(), this.abortController = new AbortController();
|
|
948
|
+
const e = this.abortController.signal;
|
|
949
|
+
this.isLoading = !0, this.error = null;
|
|
950
|
+
try {
|
|
951
|
+
const t = { input: s };
|
|
952
|
+
this.sessionToken && (t.sessiontoken = this.sessionToken), this.includedRegionCodes && this.includedRegionCodes.length > 0 && (t.country = this.includedRegionCodes.join(",")), this.types && this.types.length > 0 && (t.types = this.types.join("|")), this.locationBias && this.locationBias.radius && this.locationBias.center && (t.location = `${this.locationBias.center.lat},${this.locationBias.center.lng}`, t.radius = this.locationBias.radius.toString()), this.strictBounds && (t.strictbounds = "true");
|
|
953
|
+
const r = new URLSearchParams(t), o = `${this.proxyUrl || ""}/store/v1/checkout/address/autocomplete/query?${r.toString()}`, n = {};
|
|
954
|
+
this.authToken && (n.Authorization = `Bearer ${this.authToken}`);
|
|
955
|
+
const l = await fetch(o, { signal: e, headers: n });
|
|
956
|
+
if (!l.ok)
|
|
957
|
+
throw new Error(`HTTP ${l.status}: ${l.statusText}`);
|
|
958
|
+
const a = await l.json();
|
|
959
|
+
a.success && Array.isArray(a.data) ? (this.error = null, a.data.length > 0 ? (this.predictions = a.data.map((d) => ({
|
|
960
|
+
place_id: d.id,
|
|
961
|
+
description: d.description || d.formatted_address,
|
|
962
|
+
formatted_address: d.formatted_address,
|
|
963
|
+
short_address: d.short_address,
|
|
964
|
+
structured_formatting: {
|
|
965
|
+
main_text: d.formatted_address || d.description,
|
|
966
|
+
main_text_matched_substrings: [],
|
|
967
|
+
secondary_text: d.description || ""
|
|
968
|
+
},
|
|
969
|
+
types: d.types || [],
|
|
970
|
+
geometry: d.geometry,
|
|
971
|
+
address_components: d.address_components
|
|
972
|
+
})), this.isOpen = !0, this.activeIndex = -1) : (this.predictions = [], this.isOpen = !0)) : (this.predictions = [], this.isOpen = !0);
|
|
973
|
+
} catch (t) {
|
|
974
|
+
if (t instanceof Error && t.name === "AbortError")
|
|
975
|
+
return;
|
|
976
|
+
this.predictions = [], this.isOpen = !0;
|
|
977
|
+
} finally {
|
|
978
|
+
this.isLoading = !1, this.abortController = null;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
async fetchPlaceDetails(s) {
|
|
982
|
+
var e;
|
|
983
|
+
this.isLoading = !0, this.error = null;
|
|
984
|
+
try {
|
|
985
|
+
const t = { place_id: s };
|
|
986
|
+
this.fields && this.fields.length > 0 && (t.fields = this.fields.join(",")), this.sessionToken && (t.sessiontoken = this.sessionToken), this.includedRegionCodes && this.includedRegionCodes.length > 0 && (t.country = this.includedRegionCodes.join(","));
|
|
987
|
+
const r = new URLSearchParams(t), o = `${this.proxyUrl || ""}/store/v1/checkout/address/autocomplete/details?${r.toString()}`, n = {};
|
|
988
|
+
this.authToken && (n.Authorization = `Bearer ${this.authToken}`);
|
|
989
|
+
const l = await fetch(o, { headers: n });
|
|
990
|
+
if (!l.ok)
|
|
991
|
+
throw new Error(`HTTP ${l.status}: ${l.statusText}`);
|
|
992
|
+
const a = await l.json();
|
|
993
|
+
return !a.success || a.message ? (this.error = a.message || "Failed to fetch place details", null) : a.success && a.data && a.data.id ? {
|
|
994
|
+
place_id: a.data.id,
|
|
995
|
+
...a.data,
|
|
996
|
+
components: (e = a.data.address_components) == null ? void 0 : e.reduce((d, p) => (p.types.forEach((g) => {
|
|
997
|
+
d[g] || (d[g] = []), d[g].push({
|
|
998
|
+
long_name: p.long_name,
|
|
999
|
+
short_name: p.short_name
|
|
1000
|
+
});
|
|
1001
|
+
}), d), {})
|
|
1002
|
+
} : null;
|
|
1003
|
+
} catch (t) {
|
|
1004
|
+
const r = he(this.language);
|
|
1005
|
+
return this.error = t instanceof Error ? t.message : r.errorFetchDetails, null;
|
|
1006
|
+
} finally {
|
|
1007
|
+
this.isLoading = !1;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
async validateAddress(s) {
|
|
1011
|
+
try {
|
|
1012
|
+
if (!s || !s.formatted_address)
|
|
1013
|
+
return console.error("Cannot validate address - place or formatted_address is missing"), null;
|
|
1014
|
+
if (!this.onValidateAddress || typeof this.onValidateAddress != "function")
|
|
1015
|
+
return console.error("onValidateAddress callback is required for address validation"), null;
|
|
1016
|
+
const e = le(s, this.includedRegionCodes), t = await this.onValidateAddress({
|
|
1017
|
+
place: s,
|
|
1018
|
+
sessionToken: this.sessionToken,
|
|
1019
|
+
validationSupport: e
|
|
1020
|
+
});
|
|
1021
|
+
return this.terminateSession(), t;
|
|
1022
|
+
} catch (e) {
|
|
1023
|
+
return console.error("Error validating address:", e), this.terminateSession(), null;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
getValidationSupport(s) {
|
|
1027
|
+
return le(s, this.includedRegionCodes);
|
|
1028
|
+
}
|
|
1029
|
+
handleInput(s) {
|
|
1030
|
+
const e = s.target;
|
|
1031
|
+
this.inputValue = e.value, this.inputValue.trim().length >= this.minChars && (this.isLoading = !0), this.debouncedFetch(this.inputValue), this.dispatchEvent(new CustomEvent("input", {
|
|
1032
|
+
detail: { value: this.inputValue },
|
|
1033
|
+
bubbles: !0,
|
|
1034
|
+
composed: !0
|
|
1035
|
+
}));
|
|
1036
|
+
}
|
|
1037
|
+
async handleSelect(s) {
|
|
1038
|
+
var t;
|
|
1039
|
+
this.inputValue = s.formatted_address, this.isOpen = !1, this.predictions = [];
|
|
1040
|
+
let e = null;
|
|
1041
|
+
if ((t = s.geometry) != null && t.location ? e = {
|
|
1042
|
+
place_id: s.place_id,
|
|
1043
|
+
formatted_address: s.formatted_address || s.description,
|
|
1044
|
+
geometry: s.geometry,
|
|
1045
|
+
types: s.types,
|
|
1046
|
+
address_components: s.address_components
|
|
1047
|
+
} : e = await this.fetchPlaceDetails(s.place_id), e) {
|
|
1048
|
+
e.formatted_address && (this.inputValue = e.formatted_address);
|
|
1049
|
+
const r = this.getValidationSupport(e);
|
|
1050
|
+
this.dispatchEvent(new CustomEvent("place-select", {
|
|
1051
|
+
detail: { place: e, validationSupport: r },
|
|
1052
|
+
bubbles: !0,
|
|
1053
|
+
composed: !0
|
|
1054
|
+
})), this.dispatchEvent(new CustomEvent("place-changed", {
|
|
1055
|
+
detail: { place: e, validationSupport: r },
|
|
1056
|
+
bubbles: !0,
|
|
1057
|
+
composed: !0
|
|
1058
|
+
}));
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
handleKeyDown(s) {
|
|
1062
|
+
if (!(!this.isOpen || this.predictions.length === 0))
|
|
1063
|
+
switch (s.key) {
|
|
1064
|
+
case "ArrowDown":
|
|
1065
|
+
s.preventDefault(), this.activeIndex = Math.min(this.activeIndex + 1, this.predictions.length - 1);
|
|
1066
|
+
break;
|
|
1067
|
+
case "ArrowUp":
|
|
1068
|
+
s.preventDefault(), this.activeIndex = Math.max(this.activeIndex - 1, -1);
|
|
1069
|
+
break;
|
|
1070
|
+
case "Enter":
|
|
1071
|
+
s.preventDefault(), this.activeIndex >= 0 && this.activeIndex < this.predictions.length && this.handleSelect(this.predictions[this.activeIndex]);
|
|
1072
|
+
break;
|
|
1073
|
+
case "Escape":
|
|
1074
|
+
s.preventDefault(), this.isOpen = !1, this.activeIndex = -1;
|
|
1075
|
+
break;
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
handleBlur() {
|
|
1079
|
+
setTimeout(() => {
|
|
1080
|
+
this.isOpen = !1, this.activeIndex = -1;
|
|
1081
|
+
}, 200);
|
|
1082
|
+
}
|
|
1083
|
+
handleFocus() {
|
|
1084
|
+
this.predictions.length > 0 && (this.isOpen = !0);
|
|
1085
|
+
}
|
|
1086
|
+
renderLocationIcon() {
|
|
1087
|
+
return v`
|
|
1088
|
+
<svg class="location-icon" fill="currentColor" viewBox="0 0 20 20">
|
|
1089
|
+
<path fill-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z" clip-rule="evenodd" />
|
|
1090
|
+
</svg>
|
|
1091
|
+
`;
|
|
1092
|
+
}
|
|
1093
|
+
renderPrediction(s, e) {
|
|
1094
|
+
const t = {
|
|
1095
|
+
"dropdown-item": !0,
|
|
1096
|
+
active: e === this.activeIndex
|
|
1097
|
+
};
|
|
1098
|
+
let r = s.structured_formatting.main_text;
|
|
1099
|
+
return s.short_address && r.includes(s.short_address) && (r = r.replace(s.short_address, "").trim(), r = r.replace(/\s*,\s*,\s*/g, ", ").replace(/^\s*,\s*|\s*,\s*$/g, "").trim()), v`
|
|
1100
|
+
<div
|
|
1101
|
+
class=${ae(t)}
|
|
1102
|
+
part="dropdown-item ${e === this.activeIndex ? "dropdown-item-active" : ""}"
|
|
1103
|
+
@click=${() => this.handleSelect(s)}
|
|
1104
|
+
role="option"
|
|
1105
|
+
aria-selected=${e === this.activeIndex}
|
|
1106
|
+
>
|
|
1107
|
+
${this.renderLocationIcon()}
|
|
1108
|
+
<div class="place-info" part="place-info">
|
|
1109
|
+
<div class="main-text" part="main-text">
|
|
1110
|
+
${s.short_address ? v`
|
|
1111
|
+
<span class="national-address-badge" part="national-address-badge">
|
|
1112
|
+
<img
|
|
1113
|
+
src="https://cdn.salla.network/images/shipping/png/national-address-icon-small-min.png"
|
|
1114
|
+
alt="national address icon"
|
|
1115
|
+
class="national-address-icon"
|
|
1116
|
+
/>
|
|
1117
|
+
<span class="national-address-text">${s.short_address}</span>
|
|
1118
|
+
<span class="national-address-separator">-</span>
|
|
1119
|
+
</span>
|
|
1120
|
+
` : ""}
|
|
1121
|
+
${r}
|
|
1122
|
+
</div>
|
|
1123
|
+
${s.structured_formatting.secondary_text ? v`
|
|
1124
|
+
<div class="secondary-text" part="secondary-text">
|
|
1125
|
+
${s.structured_formatting.secondary_text}
|
|
1126
|
+
</div>
|
|
1127
|
+
` : ""}
|
|
1128
|
+
</div>
|
|
1129
|
+
</div>
|
|
1130
|
+
`;
|
|
1131
|
+
}
|
|
1132
|
+
render() {
|
|
1133
|
+
const s = {
|
|
1134
|
+
dropdown: !0,
|
|
1135
|
+
open: this.isOpen
|
|
1136
|
+
}, e = he(this.language), t = this.dir === "auto" ? Ge(this.language) ? "rtl" : "ltr" : this.dir, r = this.placeholder || e.placeholder;
|
|
1137
|
+
return v`
|
|
1138
|
+
<div class="wrapper ${this.className}" part="wrapper" dir="${t}">
|
|
1139
|
+
<div class="input-container" part="input-container">
|
|
1140
|
+
${this.label ? v`<label part="label">${this.label}</label>` : ""}
|
|
1141
|
+
<div style="position: relative;">
|
|
1142
|
+
<input
|
|
1143
|
+
part="input"
|
|
1144
|
+
type="text"
|
|
1145
|
+
name="salla-address-search"
|
|
1146
|
+
.value=${this.inputValue}
|
|
1147
|
+
placeholder=${r}
|
|
1148
|
+
@input=${this.handleInput}
|
|
1149
|
+
@keydown=${this.handleKeyDown}
|
|
1150
|
+
@blur=${this.handleBlur}
|
|
1151
|
+
@focus=${this.handleFocus}
|
|
1152
|
+
role="combobox"
|
|
1153
|
+
aria-expanded=${this.isOpen}
|
|
1154
|
+
aria-autocomplete="list"
|
|
1155
|
+
aria-controls="predictions-list"
|
|
1156
|
+
autocomplete="off"
|
|
1157
|
+
/>
|
|
1158
|
+
${this.isLoading ? v`<div class="loading-spinner" part="spinner"></div>` : ""}
|
|
1159
|
+
</div>
|
|
1160
|
+
${this.error ? v`<div class="error-message" part="error">${this.error}</div>` : ""}
|
|
1161
|
+
</div>
|
|
1162
|
+
|
|
1163
|
+
<div
|
|
1164
|
+
id="predictions-list"
|
|
1165
|
+
class=${ae(s)}
|
|
1166
|
+
part="dropdown"
|
|
1167
|
+
role="listbox"
|
|
1168
|
+
>
|
|
1169
|
+
${this.predictions.length > 0 ? this.predictions.map((i, o) => this.renderPrediction(i, o)) : this.inputValue && !this.isLoading ? v`<div class="no-results" part="no-results">${e.noResults}</div>` : ""}
|
|
1170
|
+
</div>
|
|
1171
|
+
</div>
|
|
1172
|
+
`;
|
|
1173
|
+
}
|
|
1174
|
+
};
|
|
1175
|
+
h.styles = ye`
|
|
1176
|
+
:host {
|
|
1177
|
+
display: block;
|
|
1178
|
+
position: relative;
|
|
1179
|
+
font-family: var(--salla-autocomplete-font-family, system-ui, -apple-system, sans-serif);
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
.wrapper {
|
|
1183
|
+
position: relative;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
.input-container {
|
|
1187
|
+
position: relative;
|
|
1188
|
+
display: flex;
|
|
1189
|
+
flex-direction: column;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
label {
|
|
1193
|
+
display: block;
|
|
1194
|
+
margin-bottom: var(--salla-autocomplete-label-margin, 0.5rem);
|
|
1195
|
+
font-size: var(--salla-autocomplete-label-font-size, 0.875rem);
|
|
1196
|
+
font-weight: var(--salla-autocomplete-label-font-weight, 500);
|
|
1197
|
+
color: var(--salla-autocomplete-label-color, #374151);
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
input {
|
|
1201
|
+
width: 100%;
|
|
1202
|
+
padding-block: 0.75rem;
|
|
1203
|
+
padding-inline-start: var(--salla-autocomplete-input-padding-start, 0.875rem);
|
|
1204
|
+
padding-inline-end: var(--salla-autocomplete-input-padding-end, 2.75rem);
|
|
1205
|
+
font-size: var(--salla-autocomplete-input-font-size, 1rem);
|
|
1206
|
+
line-height: var(--salla-autocomplete-input-line-height, 1.5);
|
|
1207
|
+
border: var(--salla-autocomplete-input-border, 1px solid #d1d5db);
|
|
1208
|
+
border-radius: var(--salla-autocomplete-input-border-radius, 0.5rem);
|
|
1209
|
+
background: var(--salla-autocomplete-input-background, white);
|
|
1210
|
+
color: var(--salla-autocomplete-input-color, #111827);
|
|
1211
|
+
outline: none;
|
|
1212
|
+
transition: all 0.2s;
|
|
1213
|
+
box-sizing: border-box;
|
|
1214
|
+
min-height: 44px;
|
|
1215
|
+
-webkit-appearance: none;
|
|
1216
|
+
appearance: none;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
@media (max-width: 640px) {
|
|
1220
|
+
input {
|
|
1221
|
+
font-size: var(--salla-autocomplete-input-font-size-mobile, 16px);
|
|
1222
|
+
padding-block: 0.75rem;
|
|
1223
|
+
padding-inline-start: var(--salla-autocomplete-input-padding-start-mobile, 0.875rem);
|
|
1224
|
+
padding-inline-end: var(--salla-autocomplete-input-padding-end-mobile, 2.75rem);
|
|
1225
|
+
min-height: 44px;
|
|
1226
|
+
touch-action: manipulation;
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
input:focus {
|
|
1231
|
+
border-color: var(--salla-autocomplete-input-focus-border-color, #3b82f6);
|
|
1232
|
+
box-shadow: var(--salla-autocomplete-input-focus-shadow, 0 0 0 3px rgba(59, 130, 246, 0.1));
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
input:disabled {
|
|
1236
|
+
background-color: var(--salla-autocomplete-input-disabled-bg, #f3f4f6);
|
|
1237
|
+
cursor: not-allowed;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
input::placeholder {
|
|
1241
|
+
color: var(--salla-autocomplete-input-placeholder-color, #9ca3af);
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
.loading-spinner {
|
|
1245
|
+
position: absolute;
|
|
1246
|
+
inset-inline-end: 0.875rem;
|
|
1247
|
+
top: 50%;
|
|
1248
|
+
transform: translateY(-50%);
|
|
1249
|
+
width: var(--salla-autocomplete-spinner-size, 1.25rem);
|
|
1250
|
+
height: var(--salla-autocomplete-spinner-size, 1.25rem);
|
|
1251
|
+
border: 2px solid var(--salla-autocomplete-spinner-border-color, #e5e7eb);
|
|
1252
|
+
border-top-color: var(--salla-autocomplete-spinner-color, #3b82f6);
|
|
1253
|
+
border-radius: 50%;
|
|
1254
|
+
animation: spin 0.6s linear infinite;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
@media (max-width: 640px) {
|
|
1258
|
+
.loading-spinner {
|
|
1259
|
+
width: var(--salla-autocomplete-spinner-size-mobile, 1.375rem);
|
|
1260
|
+
height: var(--salla-autocomplete-spinner-size-mobile, 1.375rem);
|
|
1261
|
+
inset-inline-end: 1rem;
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
@keyframes spin {
|
|
1266
|
+
to { transform: translateY(-50%) rotate(360deg); }
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
/* Custom scrollbar styling */
|
|
1270
|
+
.dropdown::-webkit-scrollbar {
|
|
1271
|
+
width: 6px;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
.dropdown::-webkit-scrollbar-track {
|
|
1275
|
+
background: #f1f1f1;
|
|
1276
|
+
border-radius: 3px;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
.dropdown::-webkit-scrollbar-thumb {
|
|
1280
|
+
background: #c1c1c1;
|
|
1281
|
+
border-radius: 3px;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
.dropdown::-webkit-scrollbar-thumb:hover {
|
|
1285
|
+
background: #a8a8a8;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
.dropdown {
|
|
1289
|
+
position: absolute;
|
|
1290
|
+
top: 100%;
|
|
1291
|
+
left: 0;
|
|
1292
|
+
right: 0;
|
|
1293
|
+
margin-top: var(--salla-autocomplete-dropdown-margin-top, 0.375rem);
|
|
1294
|
+
background: var(--salla-autocomplete-dropdown-background, white);
|
|
1295
|
+
border: var(--salla-autocomplete-dropdown-border, 1px solid #e5e7eb);
|
|
1296
|
+
border-radius: var(--salla-autocomplete-dropdown-border-radius, 0.5rem);
|
|
1297
|
+
box-shadow: var(--salla-autocomplete-dropdown-shadow, 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1));
|
|
1298
|
+
max-height: var(--salla-autocomplete-dropdown-max-height, 240px);
|
|
1299
|
+
overflow-y: auto;
|
|
1300
|
+
overflow-x: hidden;
|
|
1301
|
+
z-index: var(--salla-autocomplete-dropdown-z-index, 100);
|
|
1302
|
+
display: none;
|
|
1303
|
+
-webkit-overflow-scrolling: touch;
|
|
1304
|
+
overscroll-behavior: contain;
|
|
1305
|
+
scroll-behavior: smooth;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
@media (max-width: 640px) {
|
|
1309
|
+
.dropdown {
|
|
1310
|
+
max-height: var(--salla-autocomplete-dropdown-max-height-mobile, 35vh);
|
|
1311
|
+
border-radius: var(--salla-autocomplete-dropdown-border-radius-mobile, 0.5rem);
|
|
1312
|
+
margin-top: var(--salla-autocomplete-dropdown-margin-top-mobile, 0.25rem);
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
@media (max-width: 640px) and (max-height: 667px) {
|
|
1317
|
+
/* Smaller phones (iPhone SE, iPhone 8, etc.) */
|
|
1318
|
+
.dropdown {
|
|
1319
|
+
max-height: var(--salla-autocomplete-dropdown-max-height-small, 30vh);
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
@media (max-width: 640px) and (min-height: 668px) and (max-height: 896px) {
|
|
1324
|
+
/* Standard phones (iPhone 12, iPhone 13, etc.) */
|
|
1325
|
+
.dropdown {
|
|
1326
|
+
max-height: var(--salla-autocomplete-dropdown-max-height-standard, 38vh);
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
@media (max-width: 640px) and (min-height: 897px) {
|
|
1331
|
+
/* Larger phones (iPhone 14 Pro Max, etc.) */
|
|
1332
|
+
.dropdown {
|
|
1333
|
+
max-height: var(--salla-autocomplete-dropdown-max-height-large, 40vh);
|
|
1334
|
+
}
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
.dropdown.open {
|
|
1338
|
+
display: block;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
.dropdown-item {
|
|
1342
|
+
display: flex;
|
|
1343
|
+
align-items: flex-start;
|
|
1344
|
+
padding: var(--salla-autocomplete-item-padding, 0.625rem 0.75rem);
|
|
1345
|
+
cursor: pointer;
|
|
1346
|
+
transition: background-color 0.15s;
|
|
1347
|
+
border-bottom: 1px solid var(--salla-autocomplete-item-border-color, #e5e7eb);
|
|
1348
|
+
min-height: 48px;
|
|
1349
|
+
-webkit-tap-highlight-color: transparent;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
@media (max-width: 640px) {
|
|
1353
|
+
.dropdown-item {
|
|
1354
|
+
padding: var(--salla-autocomplete-item-padding-mobile, 0.75rem 0.875rem);
|
|
1355
|
+
min-height: 52px;
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
.dropdown-item:last-child {
|
|
1360
|
+
border-bottom: none;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
.dropdown-item:hover,
|
|
1364
|
+
.dropdown-item.selected {
|
|
1365
|
+
background-color: var(--salla-autocomplete-item-hover-bg, #f9fafb);
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
.dropdown-item.active {
|
|
1369
|
+
background-color: var(--salla-autocomplete-item-active-bg, #eff6ff);
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
@media (hover: none) and (pointer: coarse) {
|
|
1373
|
+
.dropdown-item:hover {
|
|
1374
|
+
background-color: transparent;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
.dropdown-item:active {
|
|
1378
|
+
background-color: var(--salla-autocomplete-item-active-bg, #eff6ff);
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
.location-icon {
|
|
1383
|
+
display: none;
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
.place-info {
|
|
1387
|
+
flex: 1;
|
|
1388
|
+
min-width: 0;
|
|
1389
|
+
display: flex;
|
|
1390
|
+
flex-direction: column;
|
|
1391
|
+
gap: 0.25rem;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
.main-text {
|
|
1395
|
+
font-size: var(--salla-autocomplete-main-text-font-size, 0.875rem);
|
|
1396
|
+
font-weight: var(--salla-autocomplete-main-text-font-weight, 600);
|
|
1397
|
+
color: var(--salla-autocomplete-main-text-color, #111827);
|
|
1398
|
+
line-height: 1.4;
|
|
1399
|
+
word-wrap: break-word;
|
|
1400
|
+
overflow-wrap: break-word;
|
|
1401
|
+
hyphens: auto;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
@media (max-width: 640px) {
|
|
1405
|
+
.main-text {
|
|
1406
|
+
font-size: var(--salla-autocomplete-main-text-font-size-mobile, 0.9375rem);
|
|
1407
|
+
line-height: 1.3;
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
.main-text .highlight {
|
|
1412
|
+
font-weight: var(--salla-autocomplete-highlight-font-weight, 700);
|
|
1413
|
+
color: var(--salla-autocomplete-highlight-color, inherit);
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
.national-address-badge {
|
|
1417
|
+
display: inline-flex;
|
|
1418
|
+
align-items: center;
|
|
1419
|
+
font-size: 0.8125rem;
|
|
1420
|
+
line-height: 1;
|
|
1421
|
+
vertical-align: middle;
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
.national-address-icon {
|
|
1425
|
+
width: 11px;
|
|
1426
|
+
height: auto;
|
|
1427
|
+
flex-shrink: 0;
|
|
1428
|
+
display: inline-block;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
.national-address-text {
|
|
1432
|
+
padding-inline-start: 3px;
|
|
1433
|
+
-webkit-text-fill-color: transparent;
|
|
1434
|
+
background-clip: text;
|
|
1435
|
+
-webkit-background-clip: text;
|
|
1436
|
+
background-image: linear-gradient(135deg, #0052cc, #00b8d9 50%, #36b37e);
|
|
1437
|
+
font-weight: 600;
|
|
1438
|
+
display: inline-block;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
.national-address-separator {
|
|
1442
|
+
padding-inline: 4px;
|
|
1443
|
+
color: #6b7280;
|
|
1444
|
+
display: inline-block;
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
.secondary-text {
|
|
1448
|
+
font-size: var(--salla-autocomplete-secondary-text-font-size, 0.75rem);
|
|
1449
|
+
color: var(--salla-autocomplete-secondary-text-color, #6b7280);
|
|
1450
|
+
line-height: 1.4;
|
|
1451
|
+
word-wrap: break-word;
|
|
1452
|
+
overflow-wrap: break-word;
|
|
1453
|
+
hyphens: auto;
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
@media (max-width: 640px) {
|
|
1457
|
+
.secondary-text {
|
|
1458
|
+
font-size: var(--salla-autocomplete-secondary-text-font-size-mobile, 0.8125rem);
|
|
1459
|
+
line-height: 1.3;
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
.error-message {
|
|
1464
|
+
margin-top: 0.5rem;
|
|
1465
|
+
font-size: var(--salla-autocomplete-error-font-size, 0.875rem);
|
|
1466
|
+
color: var(--salla-autocomplete-error-color, #dc2626);
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
.no-results {
|
|
1470
|
+
padding: 1rem;
|
|
1471
|
+
text-align: start;
|
|
1472
|
+
color: var(--salla-autocomplete-no-results-color, #6b7280);
|
|
1473
|
+
font-size: var(--salla-autocomplete-no-results-font-size, 0.875rem);
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
.no-results.error-state {
|
|
1477
|
+
color: var(--salla-autocomplete-error-color, #dc2626);
|
|
1478
|
+
background-color: var(--salla-autocomplete-error-bg, #fef2f2);
|
|
1479
|
+
border-radius: 0.375rem;
|
|
1480
|
+
margin: 0.5rem;
|
|
1481
|
+
padding: 0.875rem;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
@media (max-width: 640px) {
|
|
1485
|
+
.no-results {
|
|
1486
|
+
padding: 0.875rem;
|
|
1487
|
+
font-size: var(--salla-autocomplete-no-results-font-size-mobile, 0.8125rem);
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
.no-results.error-state {
|
|
1491
|
+
margin: 0.375rem;
|
|
1492
|
+
padding: 0.75rem;
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
`;
|
|
1496
|
+
c([
|
|
1497
|
+
m({ type: String })
|
|
1498
|
+
], h.prototype, "proxyUrl", 2);
|
|
1499
|
+
c([
|
|
1500
|
+
m({ type: String })
|
|
1501
|
+
], h.prototype, "authToken", 2);
|
|
1502
|
+
c([
|
|
1503
|
+
m({ type: String })
|
|
1504
|
+
], h.prototype, "placeholder", 2);
|
|
1505
|
+
c([
|
|
1506
|
+
m({ type: String })
|
|
1507
|
+
], h.prototype, "value", 2);
|
|
1508
|
+
c([
|
|
1509
|
+
m({ type: String })
|
|
1510
|
+
], h.prototype, "defaultPlace", 2);
|
|
1511
|
+
c([
|
|
1512
|
+
m({ type: String })
|
|
1513
|
+
], h.prototype, "label", 2);
|
|
1514
|
+
c([
|
|
1515
|
+
m({ type: String })
|
|
1516
|
+
], h.prototype, "className", 2);
|
|
1517
|
+
c([
|
|
1518
|
+
m({ type: String })
|
|
1519
|
+
], h.prototype, "language", 2);
|
|
1520
|
+
c([
|
|
1521
|
+
m({ type: String })
|
|
1522
|
+
], h.prototype, "dir", 2);
|
|
1523
|
+
c([
|
|
1524
|
+
m({ type: String })
|
|
1525
|
+
], h.prototype, "country", 1);
|
|
1526
|
+
c([
|
|
1527
|
+
m({ type: Array })
|
|
1528
|
+
], h.prototype, "includedRegionCodes", 2);
|
|
1529
|
+
c([
|
|
1530
|
+
m({ type: Object })
|
|
1531
|
+
], h.prototype, "locationBias", 2);
|
|
1532
|
+
c([
|
|
1533
|
+
m({ type: Object })
|
|
1534
|
+
], h.prototype, "locationRestriction", 2);
|
|
1535
|
+
c([
|
|
1536
|
+
m({ type: Array })
|
|
1537
|
+
], h.prototype, "types", 2);
|
|
1538
|
+
c([
|
|
1539
|
+
m({ type: String })
|
|
1540
|
+
], h.prototype, "fieldsStr", 1);
|
|
1541
|
+
c([
|
|
1542
|
+
m({ type: Array })
|
|
1543
|
+
], h.prototype, "fields", 1);
|
|
1544
|
+
c([
|
|
1545
|
+
m({ type: Boolean })
|
|
1546
|
+
], h.prototype, "strictBounds", 2);
|
|
1547
|
+
c([
|
|
1548
|
+
m({ type: Boolean })
|
|
1549
|
+
], h.prototype, "useSessionToken", 2);
|
|
1550
|
+
c([
|
|
1551
|
+
m({ type: Function })
|
|
1552
|
+
], h.prototype, "onValidateAddress", 2);
|
|
1553
|
+
c([
|
|
1554
|
+
m({ type: Number })
|
|
1555
|
+
], h.prototype, "debounceDelay", 2);
|
|
1556
|
+
c([
|
|
1557
|
+
m({ type: Number })
|
|
1558
|
+
], h.prototype, "minChars", 2);
|
|
1559
|
+
c([
|
|
1560
|
+
E()
|
|
1561
|
+
], h.prototype, "predictions", 2);
|
|
1562
|
+
c([
|
|
1563
|
+
E()
|
|
1564
|
+
], h.prototype, "isOpen", 2);
|
|
1565
|
+
c([
|
|
1566
|
+
E()
|
|
1567
|
+
], h.prototype, "isLoading", 2);
|
|
1568
|
+
c([
|
|
1569
|
+
E()
|
|
1570
|
+
], h.prototype, "error", 2);
|
|
1571
|
+
c([
|
|
1572
|
+
E()
|
|
1573
|
+
], h.prototype, "activeIndex", 2);
|
|
1574
|
+
c([
|
|
1575
|
+
E()
|
|
1576
|
+
], h.prototype, "inputValue", 2);
|
|
1577
|
+
c([
|
|
1578
|
+
E()
|
|
1579
|
+
], h.prototype, "sessionToken", 2);
|
|
1580
|
+
c([
|
|
1581
|
+
Ve("input")
|
|
1582
|
+
], h.prototype, "inputElement", 2);
|
|
1583
|
+
h = c([
|
|
1584
|
+
Ie("salla-address-autocomplete")
|
|
1585
|
+
], h);
|
|
1586
|
+
export {
|
|
1587
|
+
qe as ADDRESS_VALIDATION_SUPPORTED_COUNTRIES,
|
|
1588
|
+
h as SallaAddressAutocomplete,
|
|
1589
|
+
le as checkValidationSupport,
|
|
1590
|
+
Ke as debounce,
|
|
1591
|
+
We as generateSessionToken,
|
|
1592
|
+
Ze as getCountryCode,
|
|
1593
|
+
he as getTranslations,
|
|
1594
|
+
Ge as isRTL,
|
|
1595
|
+
st as parseHighlight,
|
|
1596
|
+
tt as throttle
|
|
1597
|
+
};
|