@salla.sa/ui-address-autocomplete-widget 0.1.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/dist/index.js +887 -479
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
6
|
+
const D = globalThis, G = D.ShadowRoot && (D.ShadyCSS === void 0 || D.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Z = Symbol(), X = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let pe = class {
|
|
8
8
|
constructor(e, t, r) {
|
|
9
|
-
if (this._$cssResult$ = !0, r !==
|
|
9
|
+
if (this._$cssResult$ = !0, r !== Z) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = e, this.t = t;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let e = this.o;
|
|
14
14
|
const t = this.t;
|
|
15
|
-
if (
|
|
15
|
+
if (G && e === void 0) {
|
|
16
16
|
const r = t !== void 0 && t.length === 1;
|
|
17
|
-
r && (e =
|
|
17
|
+
r && (e = X.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && X.set(t, e));
|
|
18
18
|
}
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
@@ -22,59 +22,59 @@ let pe = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const ve = (
|
|
26
|
-
const t =
|
|
27
|
-
if (
|
|
28
|
-
if (typeof
|
|
29
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
30
|
-
})(
|
|
31
|
-
return new pe(t,
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
25
|
+
const ve = (i) => new pe(typeof i == "string" ? i : i + "", void 0, Z), be = (i, ...e) => {
|
|
26
|
+
const t = i.length === 1 ? i[0] : e.reduce((r, s, o) => r + ((a) => {
|
|
27
|
+
if (a._$cssResult$ === !0) return a.cssText;
|
|
28
|
+
if (typeof a == "number") return a;
|
|
29
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
+
})(s) + i[o + 1], i[0]);
|
|
31
|
+
return new pe(t, i, Z);
|
|
32
|
+
}, ye = (i, e) => {
|
|
33
|
+
if (G) i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
34
34
|
else for (const t of e) {
|
|
35
|
-
const r = document.createElement("style"),
|
|
36
|
-
|
|
35
|
+
const r = document.createElement("style"), s = D.litNonce;
|
|
36
|
+
s !== void 0 && r.setAttribute("nonce", s), r.textContent = t.cssText, i.appendChild(r);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, Q = G ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
|
|
39
39
|
let t = "";
|
|
40
40
|
for (const r of e.cssRules) t += r.cssText;
|
|
41
41
|
return ve(t);
|
|
42
|
-
})(
|
|
42
|
+
})(i) : i;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is: $e, defineProperty:
|
|
48
|
+
const { is: $e, defineProperty: Ae, getOwnPropertyDescriptor: we, getOwnPropertyNames: _e, getOwnPropertySymbols: xe, getPrototypeOf: Se } = Object, A = globalThis, ee = A.trustedTypes, Ee = ee ? ee.emptyScript : "", H = A.reactiveElementPolyfillSupport, C = (i, e) => i, M = { toAttribute(i, e) {
|
|
49
49
|
switch (e) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
|
|
51
|
+
i = i ? Ee : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
55
|
-
|
|
55
|
+
i = i == null ? i : JSON.stringify(i);
|
|
56
56
|
}
|
|
57
|
-
return
|
|
58
|
-
}, fromAttribute(
|
|
59
|
-
let t =
|
|
57
|
+
return i;
|
|
58
|
+
}, fromAttribute(i, e) {
|
|
59
|
+
let t = i;
|
|
60
60
|
switch (e) {
|
|
61
61
|
case Boolean:
|
|
62
|
-
t =
|
|
62
|
+
t = i !== null;
|
|
63
63
|
break;
|
|
64
64
|
case Number:
|
|
65
|
-
t =
|
|
65
|
+
t = i === null ? null : Number(i);
|
|
66
66
|
break;
|
|
67
67
|
case Object:
|
|
68
68
|
case Array:
|
|
69
69
|
try {
|
|
70
|
-
t = JSON.parse(
|
|
70
|
+
t = JSON.parse(i);
|
|
71
71
|
} catch {
|
|
72
72
|
t = null;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return t;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
76
|
+
} }, Y = (i, e) => !$e(i, e), te = { attribute: !0, type: String, converter: M, reflect: !1, useDefault: !1, hasChanged: Y };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), A.litPropertyMetadata ?? (A.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
let k = class extends HTMLElement {
|
|
79
79
|
static addInitializer(e) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(e);
|
|
@@ -82,46 +82,46 @@ let k = class extends HTMLElement {
|
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(e, t =
|
|
85
|
+
static createProperty(e, t = te) {
|
|
86
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(),
|
|
88
|
-
|
|
87
|
+
const r = Symbol(), s = this.getPropertyDescriptor(e, r, t);
|
|
88
|
+
s !== void 0 && Ae(this.prototype, e, s);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(e, t, r) {
|
|
92
|
-
const { get:
|
|
92
|
+
const { get: s, set: o } = we(this.prototype, e) ?? { get() {
|
|
93
93
|
return this[t];
|
|
94
|
-
}, set(
|
|
95
|
-
this[t] =
|
|
94
|
+
}, set(a) {
|
|
95
|
+
this[t] = a;
|
|
96
96
|
} };
|
|
97
|
-
return { get:
|
|
98
|
-
const l =
|
|
99
|
-
o == null || o.call(this,
|
|
97
|
+
return { get: s, set(a) {
|
|
98
|
+
const l = s == null ? void 0 : s.call(this);
|
|
99
|
+
o == null || o.call(this, a), this.requestUpdate(e, l, r);
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(e) {
|
|
103
|
-
return this.elementProperties.get(e) ??
|
|
103
|
+
return this.elementProperties.get(e) ?? te;
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
|
-
if (this.hasOwnProperty(
|
|
106
|
+
if (this.hasOwnProperty(C("elementProperties"))) return;
|
|
107
107
|
const e = Se(this);
|
|
108
108
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
111
|
-
if (this.hasOwnProperty(
|
|
112
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
113
|
-
const t = this.properties, r = [...
|
|
114
|
-
for (const
|
|
111
|
+
if (this.hasOwnProperty(C("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(C("properties"))) {
|
|
113
|
+
const t = this.properties, r = [..._e(t), ...xe(t)];
|
|
114
|
+
for (const s of r) this.createProperty(s, t[s]);
|
|
115
115
|
}
|
|
116
116
|
const e = this[Symbol.metadata];
|
|
117
117
|
if (e !== null) {
|
|
118
118
|
const t = litPropertyMetadata.get(e);
|
|
119
|
-
if (t !== void 0) for (const [r,
|
|
119
|
+
if (t !== void 0) for (const [r, s] of t) this.elementProperties.set(r, s);
|
|
120
120
|
}
|
|
121
121
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
122
122
|
for (const [t, r] of this.elementProperties) {
|
|
123
|
-
const
|
|
124
|
-
|
|
123
|
+
const s = this._$Eu(t, r);
|
|
124
|
+
s !== void 0 && this._$Eh.set(s, t);
|
|
125
125
|
}
|
|
126
126
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
127
|
}
|
|
@@ -129,8 +129,8 @@ let k = class extends HTMLElement {
|
|
|
129
129
|
const t = [];
|
|
130
130
|
if (Array.isArray(e)) {
|
|
131
131
|
const r = new Set(e.flat(1 / 0).reverse());
|
|
132
|
-
for (const
|
|
133
|
-
} else e !== void 0 && t.push(
|
|
132
|
+
for (const s of r) t.unshift(Q(s));
|
|
133
|
+
} else e !== void 0 && t.push(Q(e));
|
|
134
134
|
return t;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(e, t) {
|
|
@@ -159,7 +159,7 @@ let k = class extends HTMLElement {
|
|
|
159
159
|
}
|
|
160
160
|
createRenderRoot() {
|
|
161
161
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
162
|
-
return
|
|
162
|
+
return ye(e, this.constructor.elementStyles), e;
|
|
163
163
|
}
|
|
164
164
|
connectedCallback() {
|
|
165
165
|
var e;
|
|
@@ -182,33 +182,33 @@ let k = class extends HTMLElement {
|
|
|
182
182
|
}
|
|
183
183
|
_$ET(e, t) {
|
|
184
184
|
var o;
|
|
185
|
-
const r = this.constructor.elementProperties.get(e),
|
|
186
|
-
if (
|
|
187
|
-
const
|
|
188
|
-
this._$Em = e,
|
|
185
|
+
const r = this.constructor.elementProperties.get(e), s = this.constructor._$Eu(e, r);
|
|
186
|
+
if (s !== void 0 && r.reflect === !0) {
|
|
187
|
+
const a = (((o = r.converter) == null ? void 0 : o.toAttribute) !== void 0 ? r.converter : M).toAttribute(t, r.type);
|
|
188
|
+
this._$Em = e, a == null ? this.removeAttribute(s) : this.setAttribute(s, a), this._$Em = null;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
_$AK(e, t) {
|
|
192
|
-
var o,
|
|
193
|
-
const r = this.constructor,
|
|
194
|
-
if (
|
|
195
|
-
const l = r.getPropertyOptions(
|
|
196
|
-
this._$Em =
|
|
197
|
-
const
|
|
198
|
-
this[
|
|
192
|
+
var o, a;
|
|
193
|
+
const r = this.constructor, s = r._$Eh.get(e);
|
|
194
|
+
if (s !== void 0 && this._$Em !== s) {
|
|
195
|
+
const l = r.getPropertyOptions(s), n = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((o = l.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? l.converter : M;
|
|
196
|
+
this._$Em = s;
|
|
197
|
+
const m = n.fromAttribute(t, l.type);
|
|
198
|
+
this[s] = m ?? ((a = this._$Ej) == null ? void 0 : a.get(s)) ?? m, this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
requestUpdate(e, t, r,
|
|
202
|
-
var
|
|
201
|
+
requestUpdate(e, t, r, s = !1, o) {
|
|
202
|
+
var a;
|
|
203
203
|
if (e !== void 0) {
|
|
204
204
|
const l = this.constructor;
|
|
205
|
-
if (
|
|
205
|
+
if (s === !1 && (o = this[e]), r ?? (r = l.getPropertyOptions(e)), !((r.hasChanged ?? Y)(o, t) || r.useDefault && r.reflect && o === ((a = this._$Ej) == null ? void 0 : a.get(e)) && !this.hasAttribute(l._$Eu(e, r)))) return;
|
|
206
206
|
this.C(e, t, r);
|
|
207
207
|
}
|
|
208
208
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
209
209
|
}
|
|
210
|
-
C(e, t, { useDefault: r, reflect:
|
|
211
|
-
r && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e,
|
|
210
|
+
C(e, t, { useDefault: r, reflect: s, wrapped: o }, a) {
|
|
211
|
+
r && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(e) && (this._$Ej.set(e, a ?? t ?? this[e]), o !== !0 || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || r || (t = void 0), this._$AL.set(e, t)), s === !0 && this._$Em !== e && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(e));
|
|
212
212
|
}
|
|
213
213
|
async _$EP() {
|
|
214
214
|
this.isUpdatePending = !0;
|
|
@@ -228,24 +228,24 @@ let k = class extends HTMLElement {
|
|
|
228
228
|
if (!this.isUpdatePending) return;
|
|
229
229
|
if (!this.hasUpdated) {
|
|
230
230
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
231
|
-
for (const [o,
|
|
231
|
+
for (const [o, a] of this._$Ep) this[o] = a;
|
|
232
232
|
this._$Ep = void 0;
|
|
233
233
|
}
|
|
234
|
-
const
|
|
235
|
-
if (
|
|
236
|
-
const { wrapped: l } =
|
|
237
|
-
l !== !0 || this._$AL.has(o) ||
|
|
234
|
+
const s = this.constructor.elementProperties;
|
|
235
|
+
if (s.size > 0) for (const [o, a] of s) {
|
|
236
|
+
const { wrapped: l } = a, n = this[o];
|
|
237
|
+
l !== !0 || this._$AL.has(o) || n === void 0 || this.C(o, void 0, a, n);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
let e = !1;
|
|
241
241
|
const t = this._$AL;
|
|
242
242
|
try {
|
|
243
|
-
e = this.shouldUpdate(t), e ? (this.willUpdate(t), (r = this._$EO) == null || r.forEach((
|
|
243
|
+
e = this.shouldUpdate(t), e ? (this.willUpdate(t), (r = this._$EO) == null || r.forEach((s) => {
|
|
244
244
|
var o;
|
|
245
|
-
return (o =
|
|
245
|
+
return (o = s.hostUpdate) == null ? void 0 : o.call(s);
|
|
246
246
|
}), this.update(t)) : this._$EM();
|
|
247
|
-
} catch (
|
|
248
|
-
throw e = !1, this._$EM(),
|
|
247
|
+
} catch (s) {
|
|
248
|
+
throw e = !1, this._$EM(), s;
|
|
249
249
|
}
|
|
250
250
|
e && this._$AE(t);
|
|
251
251
|
}
|
|
@@ -254,8 +254,8 @@ let k = class extends HTMLElement {
|
|
|
254
254
|
_$AE(e) {
|
|
255
255
|
var t;
|
|
256
256
|
(t = this._$EO) == null || t.forEach((r) => {
|
|
257
|
-
var
|
|
258
|
-
return (
|
|
257
|
+
var s;
|
|
258
|
+
return (s = r.hostUpdated) == null ? void 0 : s.call(r);
|
|
259
259
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
260
260
|
}
|
|
261
261
|
_$EM() {
|
|
@@ -278,74 +278,74 @@ let k = class extends HTMLElement {
|
|
|
278
278
|
firstUpdated(e) {
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
|
-
k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[
|
|
281
|
+
k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[C("elementProperties")] = /* @__PURE__ */ new Map(), k[C("finalized")] = /* @__PURE__ */ new Map(), H == null || H({ ReactiveElement: k }), (A.reactiveElementVersions ?? (A.reactiveElementVersions = [])).push("2.1.2");
|
|
282
282
|
/**
|
|
283
283
|
* @license
|
|
284
284
|
* Copyright 2017 Google LLC
|
|
285
285
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
286
286
|
*/
|
|
287
|
-
const R = globalThis,
|
|
288
|
-
\f\r]`,
|
|
289
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
290
|
-
function ge(
|
|
291
|
-
if (!
|
|
292
|
-
return
|
|
287
|
+
const R = globalThis, ie = (i) => i, L = R.trustedTypes, re = L ? L.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ue = "$lit$", $ = `lit$${Math.random().toFixed(9).slice(2)}$`, me = "?" + $, ke = `<${me}>`, S = document, N = () => S.createComment(""), z = (i) => i === null || typeof i != "object" && typeof i != "function", J = Array.isArray, Pe = (i) => J(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", B = `[
|
|
288
|
+
\f\r]`, T = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, se = /-->/g, oe = />/g, w = RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^
|
|
289
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ae = /'/g, ne = /"/g, fe = /^(?:script|style|textarea|title)$/i, Te = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), g = Te(1), E = Symbol.for("lit-noChange"), f = Symbol.for("lit-nothing"), le = /* @__PURE__ */ new WeakMap(), _ = S.createTreeWalker(S, 129);
|
|
290
|
+
function ge(i, e) {
|
|
291
|
+
if (!J(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
292
|
+
return re !== void 0 ? re.createHTML(e) : e;
|
|
293
293
|
}
|
|
294
|
-
const
|
|
295
|
-
const t =
|
|
296
|
-
let
|
|
294
|
+
const Ce = (i, e) => {
|
|
295
|
+
const t = i.length - 1, r = [];
|
|
296
|
+
let s, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", a = T;
|
|
297
297
|
for (let l = 0; l < t; l++) {
|
|
298
|
-
const
|
|
299
|
-
let
|
|
300
|
-
for (;
|
|
301
|
-
const y =
|
|
302
|
-
o +=
|
|
298
|
+
const n = i[l];
|
|
299
|
+
let m, c, u = -1, v = 0;
|
|
300
|
+
for (; v < n.length && (a.lastIndex = v, c = a.exec(n), c !== null); ) v = a.lastIndex, a === T ? c[1] === "!--" ? a = se : c[1] !== void 0 ? a = oe : c[2] !== void 0 ? (fe.test(c[2]) && (s = RegExp("</" + c[2], "g")), a = w) : c[3] !== void 0 && (a = w) : a === w ? c[0] === ">" ? (a = s ?? T, u = -1) : c[1] === void 0 ? u = -2 : (u = a.lastIndex - c[2].length, m = c[1], a = c[3] === void 0 ? w : c[3] === '"' ? ne : ae) : a === ne || a === ae ? a = w : a === se || a === oe ? a = T : (a = w, s = void 0);
|
|
301
|
+
const y = a === w && i[l + 1].startsWith("/>") ? " " : "";
|
|
302
|
+
o += a === T ? n + ke : u >= 0 ? (r.push(m), n.slice(0, u) + ue + n.slice(u) + $ + y) : n + $ + (u === -2 ? l : y);
|
|
303
303
|
}
|
|
304
|
-
return [ge(
|
|
304
|
+
return [ge(i, o + (i[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
|
|
305
305
|
};
|
|
306
|
-
class
|
|
306
|
+
class F {
|
|
307
307
|
constructor({ strings: e, _$litType$: t }, r) {
|
|
308
|
-
let
|
|
308
|
+
let s;
|
|
309
309
|
this.parts = [];
|
|
310
|
-
let o = 0,
|
|
311
|
-
const l = e.length - 1,
|
|
312
|
-
if (this.el =
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
}
|
|
316
|
-
for (; (
|
|
317
|
-
if (
|
|
318
|
-
if (
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
} else
|
|
322
|
-
if (fe.test(
|
|
323
|
-
const
|
|
324
|
-
if (
|
|
325
|
-
|
|
326
|
-
for (let y = 0; y <
|
|
327
|
-
|
|
310
|
+
let o = 0, a = 0;
|
|
311
|
+
const l = e.length - 1, n = this.parts, [m, c] = Ce(e, t);
|
|
312
|
+
if (this.el = F.createElement(m, r), _.currentNode = this.el.content, t === 2 || t === 3) {
|
|
313
|
+
const u = this.el.content.firstChild;
|
|
314
|
+
u.replaceWith(...u.childNodes);
|
|
315
|
+
}
|
|
316
|
+
for (; (s = _.nextNode()) !== null && n.length < l; ) {
|
|
317
|
+
if (s.nodeType === 1) {
|
|
318
|
+
if (s.hasAttributes()) for (const u of s.getAttributeNames()) if (u.endsWith(ue)) {
|
|
319
|
+
const v = c[a++], y = s.getAttribute(u).split($), V = /([.?@])?(.*)/.exec(v);
|
|
320
|
+
n.push({ type: 1, index: o, name: V[2], strings: y, ctor: V[1] === "." ? Ie : V[1] === "?" ? Ne : V[1] === "@" ? ze : q }), s.removeAttribute(u);
|
|
321
|
+
} else u.startsWith($) && (n.push({ type: 6, index: o }), s.removeAttribute(u));
|
|
322
|
+
if (fe.test(s.tagName)) {
|
|
323
|
+
const u = s.textContent.split($), v = u.length - 1;
|
|
324
|
+
if (v > 0) {
|
|
325
|
+
s.textContent = L ? L.emptyScript : "";
|
|
326
|
+
for (let y = 0; y < v; y++) s.append(u[y], N()), _.nextNode(), n.push({ type: 2, index: ++o });
|
|
327
|
+
s.append(u[v], N());
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
} else if (
|
|
330
|
+
} else if (s.nodeType === 8) if (s.data === me) n.push({ type: 2, index: o });
|
|
331
331
|
else {
|
|
332
|
-
let
|
|
333
|
-
for (; (
|
|
332
|
+
let u = -1;
|
|
333
|
+
for (; (u = s.data.indexOf($, u + 1)) !== -1; ) n.push({ type: 7, index: o }), u += $.length - 1;
|
|
334
334
|
}
|
|
335
335
|
o++;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
static createElement(e, t) {
|
|
339
|
-
const r =
|
|
339
|
+
const r = S.createElement("template");
|
|
340
340
|
return r.innerHTML = e, r;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
function P(
|
|
344
|
-
var
|
|
345
|
-
if (e ===
|
|
346
|
-
let
|
|
347
|
-
const o =
|
|
348
|
-
return (
|
|
343
|
+
function P(i, e, t = i, r) {
|
|
344
|
+
var a, l;
|
|
345
|
+
if (e === E) return e;
|
|
346
|
+
let s = r !== void 0 ? (a = t._$Co) == null ? void 0 : a[r] : t._$Cl;
|
|
347
|
+
const o = z(e) ? void 0 : e._$litDirective$;
|
|
348
|
+
return (s == null ? void 0 : s.constructor) !== o && ((l = s == null ? void 0 : s._$AO) == null || l.call(s, !1), o === void 0 ? s = void 0 : (s = new o(i), s._$AT(i, t, r)), r !== void 0 ? (t._$Co ?? (t._$Co = []))[r] = s : t._$Cl = s), s !== void 0 && (e = P(i, s._$AS(i, e.values), s, r)), e;
|
|
349
349
|
}
|
|
350
350
|
class Re {
|
|
351
351
|
constructor(e, t) {
|
|
@@ -358,30 +358,30 @@ class Re {
|
|
|
358
358
|
return this._$AM._$AU;
|
|
359
359
|
}
|
|
360
360
|
u(e) {
|
|
361
|
-
const { el: { content: t }, parts: r } = this._$AD,
|
|
362
|
-
|
|
363
|
-
let o =
|
|
364
|
-
for (;
|
|
365
|
-
if (
|
|
366
|
-
let
|
|
367
|
-
|
|
361
|
+
const { el: { content: t }, parts: r } = this._$AD, s = ((e == null ? void 0 : e.creationScope) ?? S).importNode(t, !0);
|
|
362
|
+
_.currentNode = s;
|
|
363
|
+
let o = _.nextNode(), a = 0, l = 0, n = r[0];
|
|
364
|
+
for (; n !== void 0; ) {
|
|
365
|
+
if (a === n.index) {
|
|
366
|
+
let m;
|
|
367
|
+
n.type === 2 ? m = new U(o, o.nextSibling, this, e) : n.type === 1 ? m = new n.ctor(o, n.name, n.strings, this, e) : n.type === 6 && (m = new Fe(o, this, e)), this._$AV.push(m), n = r[++l];
|
|
368
368
|
}
|
|
369
|
-
|
|
369
|
+
a !== (n == null ? void 0 : n.index) && (o = _.nextNode(), a++);
|
|
370
370
|
}
|
|
371
|
-
return
|
|
371
|
+
return _.currentNode = S, s;
|
|
372
372
|
}
|
|
373
373
|
p(e) {
|
|
374
374
|
let t = 0;
|
|
375
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
376
|
}
|
|
377
377
|
}
|
|
378
|
-
class
|
|
378
|
+
class U {
|
|
379
379
|
get _$AU() {
|
|
380
380
|
var e;
|
|
381
381
|
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
382
382
|
}
|
|
383
|
-
constructor(e, t, r,
|
|
384
|
-
this.type = 2, this._$AH = f, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options =
|
|
383
|
+
constructor(e, t, r, s) {
|
|
384
|
+
this.type = 2, this._$AH = f, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = r, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
|
|
385
385
|
}
|
|
386
386
|
get parentNode() {
|
|
387
387
|
let e = this._$AA.parentNode;
|
|
@@ -395,7 +395,7 @@ class D {
|
|
|
395
395
|
return this._$AB;
|
|
396
396
|
}
|
|
397
397
|
_$AI(e, t = this) {
|
|
398
|
-
e = P(this, e, t),
|
|
398
|
+
e = P(this, e, t), z(e) ? e === f || e == null || e === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : e !== this._$AH && e !== E && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Pe(e) ? this.k(e) : this._(e);
|
|
399
399
|
}
|
|
400
400
|
O(e) {
|
|
401
401
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -404,33 +404,33 @@ class D {
|
|
|
404
404
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
405
405
|
}
|
|
406
406
|
_(e) {
|
|
407
|
-
this._$AH !== f &&
|
|
407
|
+
this._$AH !== f && z(this._$AH) ? this._$AA.nextSibling.data = e : this.T(S.createTextNode(e)), this._$AH = e;
|
|
408
408
|
}
|
|
409
409
|
$(e) {
|
|
410
410
|
var o;
|
|
411
|
-
const { values: t, _$litType$: r } = e,
|
|
412
|
-
if (((o = this._$AH) == null ? void 0 : o._$AD) ===
|
|
411
|
+
const { values: t, _$litType$: r } = e, s = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = F.createElement(ge(r.h, r.h[0]), this.options)), r);
|
|
412
|
+
if (((o = this._$AH) == null ? void 0 : o._$AD) === s) this._$AH.p(t);
|
|
413
413
|
else {
|
|
414
|
-
const
|
|
415
|
-
|
|
414
|
+
const a = new Re(s, this), l = a.u(this.options);
|
|
415
|
+
a.p(t), this.T(l), this._$AH = a;
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
418
|
_$AC(e) {
|
|
419
|
-
let t =
|
|
420
|
-
return t === void 0 &&
|
|
419
|
+
let t = le.get(e.strings);
|
|
420
|
+
return t === void 0 && le.set(e.strings, t = new F(e)), t;
|
|
421
421
|
}
|
|
422
422
|
k(e) {
|
|
423
|
-
|
|
423
|
+
J(this._$AH) || (this._$AH = [], this._$AR());
|
|
424
424
|
const t = this._$AH;
|
|
425
|
-
let r,
|
|
426
|
-
for (const o of e)
|
|
427
|
-
|
|
425
|
+
let r, s = 0;
|
|
426
|
+
for (const o of e) s === t.length ? t.push(r = new U(this.O(N()), this.O(N()), this, this.options)) : r = t[s], r._$AI(o), s++;
|
|
427
|
+
s < t.length && (this._$AR(r && r._$AB.nextSibling, s), t.length = s);
|
|
428
428
|
}
|
|
429
429
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
430
430
|
var r;
|
|
431
431
|
for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, t); e !== this._$AB; ) {
|
|
432
|
-
const
|
|
433
|
-
|
|
432
|
+
const s = ie(e).nextSibling;
|
|
433
|
+
ie(e).remove(), e = s;
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
setConnected(e) {
|
|
@@ -438,32 +438,32 @@ class D {
|
|
|
438
438
|
this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e));
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
class
|
|
441
|
+
class q {
|
|
442
442
|
get tagName() {
|
|
443
443
|
return this.element.tagName;
|
|
444
444
|
}
|
|
445
445
|
get _$AU() {
|
|
446
446
|
return this._$AM._$AU;
|
|
447
447
|
}
|
|
448
|
-
constructor(e, t, r,
|
|
449
|
-
this.type = 1, this._$AH = f, this._$AN = void 0, this.element = e, this.name = t, this._$AM =
|
|
448
|
+
constructor(e, t, r, s, o) {
|
|
449
|
+
this.type = 1, this._$AH = f, this._$AN = void 0, this.element = e, this.name = t, this._$AM = s, 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
450
|
}
|
|
451
|
-
_$AI(e, t = this, r,
|
|
451
|
+
_$AI(e, t = this, r, s) {
|
|
452
452
|
const o = this.strings;
|
|
453
|
-
let
|
|
454
|
-
if (o === void 0) e = P(this, e, t, 0),
|
|
453
|
+
let a = !1;
|
|
454
|
+
if (o === void 0) e = P(this, e, t, 0), a = !z(e) || e !== this._$AH && e !== E, a && (this._$AH = e);
|
|
455
455
|
else {
|
|
456
456
|
const l = e;
|
|
457
|
-
let
|
|
458
|
-
for (e = o[0],
|
|
457
|
+
let n, m;
|
|
458
|
+
for (e = o[0], n = 0; n < o.length - 1; n++) m = P(this, l[r + n], t, n), m === E && (m = this._$AH[n]), a || (a = !z(m) || m !== this._$AH[n]), m === f ? e = f : e !== f && (e += (m ?? "") + o[n + 1]), this._$AH[n] = m;
|
|
459
459
|
}
|
|
460
|
-
|
|
460
|
+
a && !s && this.j(e);
|
|
461
461
|
}
|
|
462
462
|
j(e) {
|
|
463
463
|
e === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
class
|
|
466
|
+
class Ie extends q {
|
|
467
467
|
constructor() {
|
|
468
468
|
super(...arguments), this.type = 3;
|
|
469
469
|
}
|
|
@@ -471,7 +471,7 @@ class Ue extends V {
|
|
|
471
471
|
this.element[this.name] = e === f ? void 0 : e;
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
class Ne extends
|
|
474
|
+
class Ne extends q {
|
|
475
475
|
constructor() {
|
|
476
476
|
super(...arguments), this.type = 4;
|
|
477
477
|
}
|
|
@@ -479,21 +479,21 @@ class Ne extends V {
|
|
|
479
479
|
this.element.toggleAttribute(this.name, !!e && e !== f);
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
class
|
|
483
|
-
constructor(e, t, r,
|
|
484
|
-
super(e, t, r,
|
|
482
|
+
class ze extends q {
|
|
483
|
+
constructor(e, t, r, s, o) {
|
|
484
|
+
super(e, t, r, s, o), this.type = 5;
|
|
485
485
|
}
|
|
486
486
|
_$AI(e, t = this) {
|
|
487
|
-
if ((e = P(this, e, t, 0) ?? f) ===
|
|
488
|
-
const r = this._$AH,
|
|
489
|
-
|
|
487
|
+
if ((e = P(this, e, t, 0) ?? f) === E) return;
|
|
488
|
+
const r = this._$AH, s = e === f && r !== f || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== f && (r === f || s);
|
|
489
|
+
s && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
490
490
|
}
|
|
491
491
|
handleEvent(e) {
|
|
492
492
|
var t;
|
|
493
493
|
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
|
-
class
|
|
496
|
+
class Fe {
|
|
497
497
|
constructor(e, t, r) {
|
|
498
498
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = r;
|
|
499
499
|
}
|
|
@@ -505,23 +505,23 @@ class ze {
|
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
const j = R.litHtmlPolyfillSupport;
|
|
508
|
-
j == null || j(
|
|
509
|
-
const
|
|
508
|
+
j == null || j(F, U), (R.litHtmlVersions ?? (R.litHtmlVersions = [])).push("3.3.2");
|
|
509
|
+
const Ue = (i, e, t) => {
|
|
510
510
|
const r = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
511
|
-
let
|
|
512
|
-
if (
|
|
511
|
+
let s = r._$litPart$;
|
|
512
|
+
if (s === void 0) {
|
|
513
513
|
const o = (t == null ? void 0 : t.renderBefore) ?? null;
|
|
514
|
-
r._$litPart$ =
|
|
514
|
+
r._$litPart$ = s = new U(e.insertBefore(N(), o), o, void 0, t ?? {});
|
|
515
515
|
}
|
|
516
|
-
return
|
|
516
|
+
return s._$AI(i), s;
|
|
517
517
|
};
|
|
518
518
|
/**
|
|
519
519
|
* @license
|
|
520
520
|
* Copyright 2017 Google LLC
|
|
521
521
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
522
522
|
*/
|
|
523
|
-
const
|
|
524
|
-
let
|
|
523
|
+
const x = globalThis;
|
|
524
|
+
let I = class extends k {
|
|
525
525
|
constructor() {
|
|
526
526
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
527
527
|
}
|
|
@@ -532,7 +532,7 @@ let U = class extends k {
|
|
|
532
532
|
}
|
|
533
533
|
update(e) {
|
|
534
534
|
const t = this.render();
|
|
535
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do =
|
|
535
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Ue(t, this.renderRoot, this.renderOptions);
|
|
536
536
|
}
|
|
537
537
|
connectedCallback() {
|
|
538
538
|
var e;
|
|
@@ -543,82 +543,82 @@ let U = class extends k {
|
|
|
543
543
|
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
|
|
544
544
|
}
|
|
545
545
|
render() {
|
|
546
|
-
return
|
|
546
|
+
return E;
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
549
|
var ce;
|
|
550
|
-
|
|
551
|
-
const
|
|
552
|
-
|
|
553
|
-
(
|
|
550
|
+
I._$litElement$ = !0, I.finalized = !0, (ce = x.litElementHydrateSupport) == null || ce.call(x, { LitElement: I });
|
|
551
|
+
const W = x.litElementPolyfillSupport;
|
|
552
|
+
W == null || W({ LitElement: I });
|
|
553
|
+
(x.litElementVersions ?? (x.litElementVersions = [])).push("4.2.2");
|
|
554
554
|
/**
|
|
555
555
|
* @license
|
|
556
556
|
* Copyright 2017 Google LLC
|
|
557
557
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
558
558
|
*/
|
|
559
|
-
const
|
|
559
|
+
const Ve = (i) => (e, t) => {
|
|
560
560
|
t !== void 0 ? t.addInitializer(() => {
|
|
561
|
-
customElements.define(
|
|
562
|
-
}) : customElements.define(
|
|
561
|
+
customElements.define(i, e);
|
|
562
|
+
}) : customElements.define(i, e);
|
|
563
563
|
};
|
|
564
564
|
/**
|
|
565
565
|
* @license
|
|
566
566
|
* Copyright 2017 Google LLC
|
|
567
567
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
568
568
|
*/
|
|
569
|
-
const
|
|
570
|
-
const { kind: r, metadata:
|
|
571
|
-
let o = globalThis.litPropertyMetadata.get(
|
|
572
|
-
if (o === void 0 && globalThis.litPropertyMetadata.set(
|
|
573
|
-
const { name:
|
|
569
|
+
const Oe = { attribute: !0, type: String, converter: M, reflect: !1, hasChanged: Y }, De = (i = Oe, e, t) => {
|
|
570
|
+
const { kind: r, metadata: s } = t;
|
|
571
|
+
let o = globalThis.litPropertyMetadata.get(s);
|
|
572
|
+
if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), r === "setter" && ((i = Object.create(i)).wrapped = !0), o.set(t.name, i), r === "accessor") {
|
|
573
|
+
const { name: a } = t;
|
|
574
574
|
return { set(l) {
|
|
575
|
-
const
|
|
576
|
-
e.set.call(this, l), this.requestUpdate(
|
|
575
|
+
const n = e.get.call(this);
|
|
576
|
+
e.set.call(this, l), this.requestUpdate(a, n, i, !0, l);
|
|
577
577
|
}, init(l) {
|
|
578
|
-
return l !== void 0 && this.C(
|
|
578
|
+
return l !== void 0 && this.C(a, void 0, i, l), l;
|
|
579
579
|
} };
|
|
580
580
|
}
|
|
581
581
|
if (r === "setter") {
|
|
582
|
-
const { name:
|
|
582
|
+
const { name: a } = t;
|
|
583
583
|
return function(l) {
|
|
584
|
-
const
|
|
585
|
-
e.call(this, l), this.requestUpdate(
|
|
584
|
+
const n = this[a];
|
|
585
|
+
e.call(this, l), this.requestUpdate(a, n, i, !0, l);
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
588
|
throw Error("Unsupported decorator location: " + r);
|
|
589
589
|
};
|
|
590
|
-
function
|
|
591
|
-
return (e, t) => typeof t == "object" ?
|
|
592
|
-
const
|
|
593
|
-
return
|
|
594
|
-
})(
|
|
590
|
+
function p(i) {
|
|
591
|
+
return (e, t) => typeof t == "object" ? De(i, e, t) : ((r, s, o) => {
|
|
592
|
+
const a = s.hasOwnProperty(o);
|
|
593
|
+
return s.constructor.createProperty(o, r), a ? Object.getOwnPropertyDescriptor(s, o) : void 0;
|
|
594
|
+
})(i, e, t);
|
|
595
595
|
}
|
|
596
596
|
/**
|
|
597
597
|
* @license
|
|
598
598
|
* Copyright 2017 Google LLC
|
|
599
599
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
600
600
|
*/
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function b(i) {
|
|
602
|
+
return p({ ...i, state: !0, attribute: !1 });
|
|
603
603
|
}
|
|
604
604
|
/**
|
|
605
605
|
* @license
|
|
606
606
|
* Copyright 2017 Google LLC
|
|
607
607
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
608
608
|
*/
|
|
609
|
-
const
|
|
609
|
+
const Me = (i, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(i, e, t), t);
|
|
610
610
|
/**
|
|
611
611
|
* @license
|
|
612
612
|
* Copyright 2017 Google LLC
|
|
613
613
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
614
614
|
*/
|
|
615
|
-
function
|
|
616
|
-
return (t, r,
|
|
617
|
-
const o = (
|
|
615
|
+
function Le(i, e) {
|
|
616
|
+
return (t, r, s) => {
|
|
617
|
+
const o = (a) => {
|
|
618
618
|
var l;
|
|
619
|
-
return ((l =
|
|
619
|
+
return ((l = a.renderRoot) == null ? void 0 : l.querySelector(i)) ?? null;
|
|
620
620
|
};
|
|
621
|
-
return
|
|
621
|
+
return Me(t, r, { get() {
|
|
622
622
|
return o(this);
|
|
623
623
|
} });
|
|
624
624
|
};
|
|
@@ -628,8 +628,8 @@ function Ve(s, e) {
|
|
|
628
628
|
* Copyright 2017 Google LLC
|
|
629
629
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
630
630
|
*/
|
|
631
|
-
const
|
|
632
|
-
class
|
|
631
|
+
const qe = { ATTRIBUTE: 1 }, He = (i) => (...e) => ({ _$litDirective$: i, values: e });
|
|
632
|
+
class Be {
|
|
633
633
|
constructor(e) {
|
|
634
634
|
}
|
|
635
635
|
get _$AU() {
|
|
@@ -650,30 +650,30 @@ class je {
|
|
|
650
650
|
* Copyright 2018 Google LLC
|
|
651
651
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
652
652
|
*/
|
|
653
|
-
const
|
|
654
|
-
constructor(
|
|
653
|
+
const O = He(class extends Be {
|
|
654
|
+
constructor(i) {
|
|
655
655
|
var e;
|
|
656
|
-
if (super(
|
|
656
|
+
if (super(i), i.type !== qe.ATTRIBUTE || i.name !== "class" || ((e = i.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
657
|
}
|
|
658
|
-
render(
|
|
659
|
-
return " " + Object.keys(
|
|
658
|
+
render(i) {
|
|
659
|
+
return " " + Object.keys(i).filter((e) => i[e]).join(" ") + " ";
|
|
660
660
|
}
|
|
661
|
-
update(
|
|
662
|
-
var r,
|
|
661
|
+
update(i, [e]) {
|
|
662
|
+
var r, s;
|
|
663
663
|
if (this.st === void 0) {
|
|
664
|
-
this.st = /* @__PURE__ */ new Set(),
|
|
664
|
+
this.st = /* @__PURE__ */ new Set(), i.strings !== void 0 && (this.nt = new Set(i.strings.join(" ").split(/\s/).filter((o) => o !== "")));
|
|
665
665
|
for (const o in e) e[o] && !((r = this.nt) != null && r.has(o)) && this.st.add(o);
|
|
666
666
|
return this.render(e);
|
|
667
667
|
}
|
|
668
|
-
const t =
|
|
668
|
+
const t = i.element.classList;
|
|
669
669
|
for (const o of this.st) o in e || (t.remove(o), this.st.delete(o));
|
|
670
670
|
for (const o in e) {
|
|
671
|
-
const
|
|
672
|
-
|
|
671
|
+
const a = !!e[o];
|
|
672
|
+
a === this.st.has(o) || (s = this.nt) != null && s.has(o) || (a ? (t.add(o), this.st.add(o)) : (t.remove(o), this.st.delete(o)));
|
|
673
673
|
}
|
|
674
|
-
return
|
|
674
|
+
return E;
|
|
675
675
|
}
|
|
676
|
-
}),
|
|
676
|
+
}), je = [
|
|
677
677
|
"AE",
|
|
678
678
|
"AR",
|
|
679
679
|
"AT",
|
|
@@ -728,184 +728,230 @@ const ae = Fe(class extends je {
|
|
|
728
728
|
"VN",
|
|
729
729
|
"ZA"
|
|
730
730
|
];
|
|
731
|
-
function tt(
|
|
731
|
+
function tt(i, e) {
|
|
732
732
|
let t = null, r = 0;
|
|
733
|
-
return function(...
|
|
734
|
-
const o = Date.now(),
|
|
735
|
-
|
|
736
|
-
r = Date.now(), t = null,
|
|
737
|
-
},
|
|
733
|
+
return function(...s) {
|
|
734
|
+
const o = Date.now(), a = e - (o - r);
|
|
735
|
+
a <= 0 || a > e ? (t && (clearTimeout(t), t = null), r = o, i.apply(this, s)) : t || (t = setTimeout(() => {
|
|
736
|
+
r = Date.now(), t = null, i.apply(this, s);
|
|
737
|
+
}, a));
|
|
738
738
|
};
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function We(i, e) {
|
|
741
741
|
let t = null;
|
|
742
742
|
return function(...r) {
|
|
743
743
|
t && clearTimeout(t), t = setTimeout(() => {
|
|
744
|
-
|
|
744
|
+
i.apply(this, r);
|
|
745
745
|
}, e);
|
|
746
746
|
};
|
|
747
747
|
}
|
|
748
|
-
function
|
|
749
|
-
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(
|
|
748
|
+
function Ke() {
|
|
749
|
+
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(i) {
|
|
750
750
|
const e = Math.random() * 16 | 0;
|
|
751
|
-
return (
|
|
751
|
+
return (i === "x" ? e : e & 3 | 8).toString(16);
|
|
752
752
|
});
|
|
753
753
|
}
|
|
754
|
-
function
|
|
755
|
-
if (!
|
|
756
|
-
const e =
|
|
754
|
+
function Ge(i) {
|
|
755
|
+
if (!i) return null;
|
|
756
|
+
const e = i.find(
|
|
757
757
|
(t) => t.types.includes("country")
|
|
758
758
|
);
|
|
759
759
|
return e ? e.short_name : null;
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function de(i, e) {
|
|
762
762
|
let t = null;
|
|
763
|
-
return
|
|
764
|
-
isSupported:
|
|
763
|
+
return i.address_components ? t = Ge(i.address_components) : e && e.length === 1 && (t = e[0].toUpperCase()), t ? {
|
|
764
|
+
isSupported: je.includes(t),
|
|
765
765
|
countryCode: t
|
|
766
766
|
} : {
|
|
767
767
|
isSupported: null,
|
|
768
768
|
countryCode: null
|
|
769
769
|
};
|
|
770
770
|
}
|
|
771
|
-
function
|
|
771
|
+
function it(i, e) {
|
|
772
772
|
const t = [];
|
|
773
773
|
let r = 0;
|
|
774
|
-
return [...e].sort((o,
|
|
774
|
+
return [...e].sort((o, a) => o.offset - a.offset).forEach((o) => {
|
|
775
775
|
o.offset > r && t.push({
|
|
776
|
-
text:
|
|
776
|
+
text: i.substring(r, o.offset),
|
|
777
777
|
highlight: !1
|
|
778
778
|
}), t.push({
|
|
779
|
-
text:
|
|
779
|
+
text: i.substring(o.offset, o.offset + o.length),
|
|
780
780
|
highlight: !0
|
|
781
781
|
}), r = o.offset + o.length;
|
|
782
|
-
}), r <
|
|
783
|
-
text:
|
|
782
|
+
}), r < i.length && t.push({
|
|
783
|
+
text: i.substring(r),
|
|
784
784
|
highlight: !1
|
|
785
785
|
}), t;
|
|
786
786
|
}
|
|
787
|
-
const
|
|
787
|
+
const he = {
|
|
788
788
|
en: {
|
|
789
789
|
placeholder: "Search for an address...",
|
|
790
790
|
noResults: "No address found for this search. Try different keywords.",
|
|
791
791
|
errorFetchPredictions: "Unable to search for addresses. Please try again.",
|
|
792
792
|
errorFetchDetails: "Unable to load address details. Please try again.",
|
|
793
|
-
errorNetwork: "Network error. Please check your connection and try again."
|
|
793
|
+
errorNetwork: "Network error. Please check your connection and try again.",
|
|
794
|
+
validationRequired: "This field is required",
|
|
795
|
+
validationPattern: "Invalid format",
|
|
796
|
+
validationSaudiFormat: "Please enter a valid Saudi national address (format: AAAA1234)"
|
|
794
797
|
},
|
|
795
798
|
ar: {
|
|
796
799
|
placeholder: "ابحث عن عنوان...",
|
|
797
800
|
noResults: "لم يتم العثور على عنوان لهذا البحث. جرب كلمات مختلفة.",
|
|
798
801
|
errorFetchPredictions: "تعذر البحث عن العناوين. يرجى المحاولة مرة أخرى.",
|
|
799
802
|
errorFetchDetails: "تعذر تحميل تفاصيل العنوان. يرجى المحاولة مرة أخرى.",
|
|
800
|
-
errorNetwork: "خطأ في الشبكة. يرجى التحقق من اتصالك والمحاولة مرة أخرى."
|
|
803
|
+
errorNetwork: "خطأ في الشبكة. يرجى التحقق من اتصالك والمحاولة مرة أخرى.",
|
|
804
|
+
validationRequired: "هذا الحقل مطلوب",
|
|
805
|
+
validationPattern: "صيغة غير صحيحة",
|
|
806
|
+
validationSaudiFormat: "الرجاء إدخال عنوان وطني صحيح (الصيغة: AAAA1234)"
|
|
801
807
|
},
|
|
802
808
|
es: {
|
|
803
809
|
placeholder: "Buscar una dirección...",
|
|
804
810
|
noResults: "No se encontró ninguna dirección para esta búsqueda. Intenta con diferentes palabras.",
|
|
805
811
|
errorFetchPredictions: "No se pueden buscar direcciones. Por favor, inténtelo de nuevo.",
|
|
806
812
|
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."
|
|
813
|
+
errorNetwork: "Error de red. Verifique su conexión e inténtelo de nuevo.",
|
|
814
|
+
validationRequired: "Este campo es obligatorio",
|
|
815
|
+
validationPattern: "Formato inválido",
|
|
816
|
+
validationSaudiFormat: "Por favor ingrese una dirección nacional saudí válida (formato: AAAA1234)"
|
|
808
817
|
},
|
|
809
818
|
fr: {
|
|
810
819
|
placeholder: "Rechercher une adresse...",
|
|
811
820
|
noResults: "Aucune adresse trouvée pour cette recherche. Essayez différents mots-clés.",
|
|
812
821
|
errorFetchPredictions: "Impossible de rechercher des adresses. Veuillez réessayer.",
|
|
813
822
|
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."
|
|
823
|
+
errorNetwork: "Erreur réseau. Vérifiez votre connexion et réessayez.",
|
|
824
|
+
validationRequired: "Ce champ est obligatoire",
|
|
825
|
+
validationPattern: "Format invalide",
|
|
826
|
+
validationSaudiFormat: "Veuillez saisir une adresse nationale saoudienne valide (format: AAAA1234)"
|
|
815
827
|
},
|
|
816
828
|
de: {
|
|
817
829
|
placeholder: "Nach einer Adresse suchen...",
|
|
818
830
|
noResults: "Keine Adresse für diese Suche gefunden. Versuchen Sie es mit anderen Stichwörtern.",
|
|
819
831
|
errorFetchPredictions: "Adressen können nicht gesucht werden. Bitte versuchen Sie es erneut.",
|
|
820
832
|
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."
|
|
833
|
+
errorNetwork: "Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung und versuchen Sie es erneut.",
|
|
834
|
+
validationRequired: "Dieses Feld ist erforderlich",
|
|
835
|
+
validationPattern: "Ungültiges Format",
|
|
836
|
+
validationSaudiFormat: "Bitte geben Sie eine gültige saudi-arabische nationale Adresse ein (Format: AAAA1234)"
|
|
822
837
|
},
|
|
823
838
|
it: {
|
|
824
839
|
placeholder: "Cerca un indirizzo...",
|
|
825
840
|
noResults: "Nessun indirizzo trovato per questa ricerca. Prova con parole chiave diverse.",
|
|
826
841
|
errorFetchPredictions: "Impossibile cercare indirizzi. Riprova.",
|
|
827
842
|
errorFetchDetails: "Impossibile caricare i dettagli dell'indirizzo. Riprova.",
|
|
828
|
-
errorNetwork: "Errore di rete. Controlla la connessione e riprova."
|
|
843
|
+
errorNetwork: "Errore di rete. Controlla la connessione e riprova.",
|
|
844
|
+
validationRequired: "Questo campo è obbligatorio",
|
|
845
|
+
validationPattern: "Formato non valido",
|
|
846
|
+
validationSaudiFormat: "Inserisci un indirizzo nazionale saudita valido (formato: AAAA1234)"
|
|
829
847
|
},
|
|
830
848
|
pt: {
|
|
831
849
|
placeholder: "Pesquisar um endereço...",
|
|
832
850
|
noResults: "Nenhum endereço encontrado para esta pesquisa. Tente palavras-chave diferentes.",
|
|
833
851
|
errorFetchPredictions: "Não é possível pesquisar endereços. Por favor, tente novamente.",
|
|
834
852
|
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."
|
|
853
|
+
errorNetwork: "Erro de rede. Verifique sua conexão e tente novamente.",
|
|
854
|
+
validationRequired: "Este campo é obrigatório",
|
|
855
|
+
validationPattern: "Formato inválido",
|
|
856
|
+
validationSaudiFormat: "Por favor, insira um endereço nacional saudita válido (formato: AAAA1234)"
|
|
836
857
|
},
|
|
837
858
|
ru: {
|
|
838
859
|
placeholder: "Поиск адреса...",
|
|
839
860
|
noResults: "Адрес для этого поиска не найден. Попробуйте другие ключевые слова.",
|
|
840
861
|
errorFetchPredictions: "Невозможно выполнить поиск адресов. Пожалуйста, попробуйте еще раз.",
|
|
841
862
|
errorFetchDetails: "Невозможно загрузить детали адреса. Пожалуйста, попробуйте еще раз.",
|
|
842
|
-
errorNetwork: "Ошибка сети. Проверьте соединение и попробуйте еще раз."
|
|
863
|
+
errorNetwork: "Ошибка сети. Проверьте соединение и попробуйте еще раз.",
|
|
864
|
+
validationRequired: "Это поле обязательно",
|
|
865
|
+
validationPattern: "Неверный формат",
|
|
866
|
+
validationSaudiFormat: "Пожалуйста, введите действительный национальный адрес Саудовской Аравии (формат: AAAA1234)"
|
|
843
867
|
},
|
|
844
868
|
ja: {
|
|
845
869
|
placeholder: "住所を検索...",
|
|
846
870
|
noResults: "この検索では住所が見つかりませんでした。別のキーワードをお試しください。",
|
|
847
871
|
errorFetchPredictions: "住所を検索できません。もう一度お試しください。",
|
|
848
872
|
errorFetchDetails: "住所の詳細を読み込めません。もう一度お試しください。",
|
|
849
|
-
errorNetwork: "ネットワークエラー。接続を確認してもう一度お試しください。"
|
|
873
|
+
errorNetwork: "ネットワークエラー。接続を確認してもう一度お試しください。",
|
|
874
|
+
validationRequired: "この項目は必須です",
|
|
875
|
+
validationPattern: "無効な形式",
|
|
876
|
+
validationSaudiFormat: "有効なサウジアラビアの国内住所を入力してください(形式:AAAA1234)"
|
|
850
877
|
},
|
|
851
878
|
zh: {
|
|
852
879
|
placeholder: "搜索地址...",
|
|
853
880
|
noResults: "未找到此搜索的地址。请尝试不同的关键词。",
|
|
854
881
|
errorFetchPredictions: "无法搜索地址。请重试。",
|
|
855
882
|
errorFetchDetails: "无法加载地址详情。请重试。",
|
|
856
|
-
errorNetwork: "网络错误。请检查您的连接并重试。"
|
|
883
|
+
errorNetwork: "网络错误。请检查您的连接并重试。",
|
|
884
|
+
validationRequired: "此字段为必填项",
|
|
885
|
+
validationPattern: "格式无效",
|
|
886
|
+
validationSaudiFormat: "请输入有效的沙特国家地址(格式:AAAA1234)"
|
|
857
887
|
},
|
|
858
888
|
ko: {
|
|
859
889
|
placeholder: "주소 검색...",
|
|
860
890
|
noResults: "이 검색에 대한 주소를 찾을 수 없습니다. 다른 키워드를 시도해보세요.",
|
|
861
891
|
errorFetchPredictions: "주소를 검색할 수 없습니다. 다시 시도해주세요.",
|
|
862
892
|
errorFetchDetails: "주소 세부정보를 불러올 수 없습니다. 다시 시도해주세요.",
|
|
863
|
-
errorNetwork: "네트워크 오류입니다. 연결을 확인하고 다시 시도해주세요."
|
|
893
|
+
errorNetwork: "네트워크 오류입니다. 연결을 확인하고 다시 시도해주세요.",
|
|
894
|
+
validationRequired: "이 필드는 필수입니다",
|
|
895
|
+
validationPattern: "유효하지 않은 형식",
|
|
896
|
+
validationSaudiFormat: "유효한 사우디 국가 주소를 입력하세요 (형식: AAAA1234)"
|
|
864
897
|
},
|
|
865
898
|
hi: {
|
|
866
899
|
placeholder: "पता खोजें...",
|
|
867
900
|
noResults: "इस खोज के लिए कोई पता नहीं मिला। विभिन्न कीवर्ड आज़माएं।",
|
|
868
901
|
errorFetchPredictions: "पते खोजने में असमर्थ। कृपया पुनः प्रयास करें।",
|
|
869
902
|
errorFetchDetails: "पते का विवरण लोड करने में असमर्थ। कृपया पुनः प्रयास करें।",
|
|
870
|
-
errorNetwork: "नेटवर्क त्रुटि। कृपया अपना कनेक्शन जांचें और पुनः प्रयास करें।"
|
|
903
|
+
errorNetwork: "नेटवर्क त्रुटि। कृपया अपना कनेक्शन जांचें और पुनः प्रयास करें।",
|
|
904
|
+
validationRequired: "यह फ़ील्ड आवश्यक है",
|
|
905
|
+
validationPattern: "अमान्य प्रारूप",
|
|
906
|
+
validationSaudiFormat: "कृपया एक मान्य सऊदी राष्ट्रीय पता दर्ज करें (प्रारूप: AAAA1234)"
|
|
871
907
|
},
|
|
872
908
|
tr: {
|
|
873
909
|
placeholder: "Adres ara...",
|
|
874
910
|
noResults: "Bu arama için adres bulunamadı. Farklı anahtar kelimeler deneyin.",
|
|
875
911
|
errorFetchPredictions: "Adresler aranamıyor. Lütfen tekrar deneyin.",
|
|
876
912
|
errorFetchDetails: "Adres detayları yüklenemiyor. Lütfen tekrar deneyin.",
|
|
877
|
-
errorNetwork: "Ağ hatası. Lütfen bağlantınızı kontrol edin ve tekrar deneyin."
|
|
913
|
+
errorNetwork: "Ağ hatası. Lütfen bağlantınızı kontrol edin ve tekrar deneyin.",
|
|
914
|
+
validationRequired: "Bu alan zorunludur",
|
|
915
|
+
validationPattern: "Geçersiz format",
|
|
916
|
+
validationSaudiFormat: "Lütfen geçerli bir Suudi ulusal adresi girin (format: AAAA1234)"
|
|
878
917
|
}
|
|
879
918
|
};
|
|
880
|
-
function
|
|
881
|
-
return
|
|
919
|
+
function K(i = "en") {
|
|
920
|
+
return he[i] || he.en;
|
|
882
921
|
}
|
|
883
|
-
function
|
|
884
|
-
return ["ar"].includes(
|
|
922
|
+
function Ze(i) {
|
|
923
|
+
return ["ar"].includes(i);
|
|
885
924
|
}
|
|
886
|
-
var
|
|
887
|
-
for (var
|
|
888
|
-
(
|
|
889
|
-
return r &&
|
|
925
|
+
var Ye = Object.defineProperty, Je = Object.getOwnPropertyDescriptor, h = (i, e, t, r) => {
|
|
926
|
+
for (var s = r > 1 ? void 0 : r ? Je(e, t) : e, o = i.length - 1, a; o >= 0; o--)
|
|
927
|
+
(a = i[o]) && (s = (r ? a(e, t, s) : a(s)) || s);
|
|
928
|
+
return r && s && Ye(e, t, s), s;
|
|
890
929
|
};
|
|
891
|
-
let
|
|
930
|
+
let d = class extends I {
|
|
892
931
|
constructor() {
|
|
893
|
-
super(
|
|
932
|
+
super(), this.proxyUrl = "https://api.salla.dev", this.authToken = null, this.placeholder = "", this.defaultPlace = "", this.label = null, this.className = "", this.language = "en", this.dir = "auto", this.mode = "search", this.name = "", this.required = !1, this.pattern = null, this.tooltip = null, this.selectedId = null, this.errors = [], this.disabled = !1, this._value = "", this._country = null, this.locationBias = null, this.locationRestriction = null, this.types = null, this._fields = ["formatted_address", "geometry"], this.strictBounds = !1, this.useSessionToken = !0, this.resolve = !1, 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.validationError = null, this.touched = !1, this.showNationalAddressIcon = !1, this.abortController = null, this._internals = this.attachInternals();
|
|
894
933
|
}
|
|
895
|
-
set
|
|
896
|
-
|
|
934
|
+
set value(i) {
|
|
935
|
+
const e = this._value;
|
|
936
|
+
this._value = i || "", this.requestUpdate("value", e);
|
|
937
|
+
}
|
|
938
|
+
get value() {
|
|
939
|
+
return this._value;
|
|
940
|
+
}
|
|
941
|
+
set country(i) {
|
|
942
|
+
i == null ? this._country = null : Array.isArray(i) ? this._country = i.filter((e) => e && e.trim()).map((e) => e.trim()) : this._country = i.split(",").map((e) => e.trim()).filter((e) => e);
|
|
897
943
|
}
|
|
898
944
|
get country() {
|
|
899
|
-
return this.
|
|
945
|
+
return this._country;
|
|
900
946
|
}
|
|
901
|
-
set fieldsStr(
|
|
902
|
-
this._fields =
|
|
947
|
+
set fieldsStr(i) {
|
|
948
|
+
this._fields = i ? i.split(",").map((e) => e.trim()).filter((e) => e) : ["formatted_address", "geometry"];
|
|
903
949
|
}
|
|
904
950
|
get fieldsStr() {
|
|
905
951
|
return this._fields.join(",");
|
|
906
952
|
}
|
|
907
|
-
set fields(
|
|
908
|
-
this._fields =
|
|
953
|
+
set fields(i) {
|
|
954
|
+
this._fields = i && i.length > 0 ? i : ["formatted_address", "geometry"];
|
|
909
955
|
}
|
|
910
956
|
get fields() {
|
|
911
957
|
return this._fields;
|
|
@@ -917,17 +963,27 @@ let h = class extends U {
|
|
|
917
963
|
super.disconnectedCallback(), this.terminateSession(), this.cancelPendingRequest();
|
|
918
964
|
}
|
|
919
965
|
initializeDebounce() {
|
|
920
|
-
this.debouncedFetch =
|
|
966
|
+
this.debouncedFetch = We(this.fetchPredictions.bind(this), this.debounceDelay);
|
|
921
967
|
}
|
|
922
968
|
firstUpdated() {
|
|
923
|
-
const
|
|
924
|
-
|
|
969
|
+
const i = this.value || this.defaultPlace || "";
|
|
970
|
+
i && (this.inputValue = i, this.isSaudiFormMode() && this.isShortAddressFormat(i) && (this.showNationalAddressIcon = !0));
|
|
971
|
+
}
|
|
972
|
+
$nextTick(i) {
|
|
973
|
+
Promise.resolve().then(i);
|
|
974
|
+
}
|
|
975
|
+
isShortAddressFormat(i) {
|
|
976
|
+
return /^[a-zA-Z]{4}\d{4}$/.test(i == null ? void 0 : i.trim());
|
|
925
977
|
}
|
|
926
|
-
updated(
|
|
927
|
-
|
|
978
|
+
updated(i) {
|
|
979
|
+
if (i.has("value")) {
|
|
980
|
+
const e = this.value || "";
|
|
981
|
+
e !== this.inputValue && (this.inputValue = e, this.isSaudiFormMode() && e && this.isShortAddressFormat(e) ? this.showNationalAddressIcon = !0 : this.showNationalAddressIcon = !1);
|
|
982
|
+
}
|
|
983
|
+
i.has("defaultPlace") && !this.value && this.defaultPlace !== this.inputValue && (this.inputValue = this.defaultPlace || "", this.isSaudiFormMode() && this.defaultPlace && this.isShortAddressFormat(this.defaultPlace) ? this.showNationalAddressIcon = !0 : this.showNationalAddressIcon = !1), i.has("selectedId") && this.selectedId && this.selectedId !== this.inputValue && this.isSaudiFormMode() && this.isShortAddressFormat(this.selectedId) && (this.inputValue = this.selectedId || "", this.showNationalAddressIcon = !0, this._internals.setFormValue(this.selectedId || "")), i.has("debounceDelay") && this.initializeDebounce();
|
|
928
984
|
}
|
|
929
985
|
createNewSession() {
|
|
930
|
-
this.useSessionToken && (this.sessionToken =
|
|
986
|
+
this.useSessionToken && (this.sessionToken = Ke());
|
|
931
987
|
}
|
|
932
988
|
terminateSession() {
|
|
933
989
|
this.sessionToken = null;
|
|
@@ -935,12 +991,12 @@ let h = class extends U {
|
|
|
935
991
|
cancelPendingRequest() {
|
|
936
992
|
this.abortController && (this.abortController.abort(), this.abortController = null);
|
|
937
993
|
}
|
|
938
|
-
async fetchPredictions(
|
|
939
|
-
if (!
|
|
994
|
+
async fetchPredictions(i) {
|
|
995
|
+
if (!i.trim()) {
|
|
940
996
|
this.predictions = [], this.isOpen = !1, this.isLoading = !1;
|
|
941
997
|
return;
|
|
942
998
|
}
|
|
943
|
-
if (
|
|
999
|
+
if (i.trim().length < this.minChars) {
|
|
944
1000
|
this.predictions = [], this.isOpen = !1, this.isLoading = !1;
|
|
945
1001
|
return;
|
|
946
1002
|
}
|
|
@@ -948,27 +1004,27 @@ let h = class extends U {
|
|
|
948
1004
|
const e = this.abortController.signal;
|
|
949
1005
|
this.isLoading = !0, this.error = null;
|
|
950
1006
|
try {
|
|
951
|
-
const t = { input:
|
|
952
|
-
this.sessionToken && (t.sessiontoken = this.sessionToken), this.
|
|
953
|
-
const r = new URLSearchParams(t), o = `${this.proxyUrl || ""}/store/v1/checkout/address/autocomplete/query?${r.toString()}`,
|
|
954
|
-
this.authToken && (
|
|
955
|
-
const l = await fetch(o, { signal: e, headers:
|
|
1007
|
+
const t = { input: i };
|
|
1008
|
+
this.sessionToken && (t.sessiontoken = this.sessionToken), this.country && this.country.length > 0 && (t.country = this.country.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");
|
|
1009
|
+
const r = new URLSearchParams(t), o = `${this.proxyUrl || ""}/store/v1/checkout/address/autocomplete/query?${r.toString()}`, a = {};
|
|
1010
|
+
this.authToken && (a.Authorization = `Bearer ${this.authToken}`);
|
|
1011
|
+
const l = await fetch(o, { signal: e, headers: a });
|
|
956
1012
|
if (!l.ok)
|
|
957
1013
|
throw new Error(`HTTP ${l.status}: ${l.statusText}`);
|
|
958
|
-
const
|
|
959
|
-
|
|
960
|
-
place_id:
|
|
961
|
-
description:
|
|
962
|
-
formatted_address:
|
|
963
|
-
short_address:
|
|
1014
|
+
const n = await l.json();
|
|
1015
|
+
n.success && Array.isArray(n.data) ? (this.error = null, n.data.length > 0 ? (this.predictions = n.data.map((c) => ({
|
|
1016
|
+
place_id: c.id,
|
|
1017
|
+
description: c.description || c.formatted_address,
|
|
1018
|
+
formatted_address: c.formatted_address,
|
|
1019
|
+
short_address: c.short_address,
|
|
964
1020
|
structured_formatting: {
|
|
965
|
-
main_text:
|
|
1021
|
+
main_text: c.formatted_address || c.description,
|
|
966
1022
|
main_text_matched_substrings: [],
|
|
967
|
-
secondary_text:
|
|
1023
|
+
secondary_text: c.description || ""
|
|
968
1024
|
},
|
|
969
|
-
types:
|
|
970
|
-
geometry:
|
|
971
|
-
address_components:
|
|
1025
|
+
types: c.types || [],
|
|
1026
|
+
geometry: c.geometry,
|
|
1027
|
+
address_components: c.address_components
|
|
972
1028
|
})), this.isOpen = !0, this.activeIndex = -1) : (this.predictions = [], this.isOpen = !0)) : (this.predictions = [], this.isOpen = !0);
|
|
973
1029
|
} catch (t) {
|
|
974
1030
|
if (t instanceof Error && t.name === "AbortError")
|
|
@@ -978,43 +1034,43 @@ let h = class extends U {
|
|
|
978
1034
|
this.isLoading = !1, this.abortController = null;
|
|
979
1035
|
}
|
|
980
1036
|
}
|
|
981
|
-
async fetchPlaceDetails(
|
|
1037
|
+
async fetchPlaceDetails(i) {
|
|
982
1038
|
var e;
|
|
983
1039
|
this.isLoading = !0, this.error = null;
|
|
984
1040
|
try {
|
|
985
|
-
const t = { place_id:
|
|
986
|
-
this.fields && this.fields.length > 0 && (t.fields = this.fields.join(",")), this.sessionToken && (t.sessiontoken = this.sessionToken), this.
|
|
987
|
-
const r = new URLSearchParams(t), o = `${this.proxyUrl || ""}/store/v1/checkout/address/autocomplete/details?${r.toString()}`,
|
|
988
|
-
this.authToken && (
|
|
989
|
-
const l = await fetch(o, { headers:
|
|
1041
|
+
const t = { place_id: i };
|
|
1042
|
+
this.fields && this.fields.length > 0 && (t.fields = this.fields.join(",")), this.sessionToken && (t.sessiontoken = this.sessionToken), this.country && this.country.length > 0 && (t.country = this.country.join(",")), this.resolve && (t.resolve = "true");
|
|
1043
|
+
const r = new URLSearchParams(t), o = `${this.proxyUrl || ""}/store/v1/checkout/address/autocomplete/details?${r.toString()}`, a = {};
|
|
1044
|
+
this.authToken && (a.Authorization = `Bearer ${this.authToken}`);
|
|
1045
|
+
const l = await fetch(o, { headers: a });
|
|
990
1046
|
if (!l.ok)
|
|
991
1047
|
throw new Error(`HTTP ${l.status}: ${l.statusText}`);
|
|
992
|
-
const
|
|
993
|
-
return !
|
|
994
|
-
place_id:
|
|
995
|
-
...
|
|
996
|
-
components: (e =
|
|
997
|
-
|
|
998
|
-
long_name:
|
|
999
|
-
short_name:
|
|
1048
|
+
const n = await l.json();
|
|
1049
|
+
return !n.success || n.message ? (this.error = n.message || "Failed to fetch place details", null) : n.success && n.data && n.data.id ? {
|
|
1050
|
+
place_id: n.data.id,
|
|
1051
|
+
...n.data,
|
|
1052
|
+
components: (e = n.data.address_components) == null ? void 0 : e.reduce((c, u) => (u.types.forEach((v) => {
|
|
1053
|
+
c[v] || (c[v] = []), c[v].push({
|
|
1054
|
+
long_name: u.long_name,
|
|
1055
|
+
short_name: u.short_name
|
|
1000
1056
|
});
|
|
1001
|
-
}),
|
|
1057
|
+
}), c), {})
|
|
1002
1058
|
} : null;
|
|
1003
1059
|
} catch (t) {
|
|
1004
|
-
const r =
|
|
1060
|
+
const r = K(this.language);
|
|
1005
1061
|
return this.error = t instanceof Error ? t.message : r.errorFetchDetails, null;
|
|
1006
1062
|
} finally {
|
|
1007
1063
|
this.isLoading = !1;
|
|
1008
1064
|
}
|
|
1009
1065
|
}
|
|
1010
|
-
async validateAddress(
|
|
1066
|
+
async validateAddress(i) {
|
|
1011
1067
|
try {
|
|
1012
|
-
if (!
|
|
1068
|
+
if (!i || !i.formatted_address)
|
|
1013
1069
|
return console.error("Cannot validate address - place or formatted_address is missing"), null;
|
|
1014
1070
|
if (!this.onValidateAddress || typeof this.onValidateAddress != "function")
|
|
1015
1071
|
return console.error("onValidateAddress callback is required for address validation"), null;
|
|
1016
|
-
const e =
|
|
1017
|
-
place:
|
|
1072
|
+
const e = de(i, this.country), t = await this.onValidateAddress({
|
|
1073
|
+
place: i,
|
|
1018
1074
|
sessionToken: this.sessionToken,
|
|
1019
1075
|
validationSupport: e
|
|
1020
1076
|
});
|
|
@@ -1023,29 +1079,150 @@ let h = class extends U {
|
|
|
1023
1079
|
return console.error("Error validating address:", e), this.terminateSession(), null;
|
|
1024
1080
|
}
|
|
1025
1081
|
}
|
|
1026
|
-
getValidationSupport(
|
|
1027
|
-
return
|
|
1082
|
+
getValidationSupport(i) {
|
|
1083
|
+
return de(i, this.country);
|
|
1084
|
+
}
|
|
1085
|
+
isSaudiFormMode() {
|
|
1086
|
+
return this.mode === "form" && this.country !== null && this.country.length === 1 && this.country[0].toLowerCase() === "sa";
|
|
1087
|
+
}
|
|
1088
|
+
getWhatsAppLink() {
|
|
1089
|
+
const i = "966112898888", e = encodeURIComponent("العنوان الوطني");
|
|
1090
|
+
return `https://wa.me/${i}?text=${e}`;
|
|
1091
|
+
}
|
|
1092
|
+
renderWhatsAppIcon() {
|
|
1093
|
+
return g`
|
|
1094
|
+
<svg class="whatsapp-icon" viewBox="0 0 24 24" fill="currentColor" part="whatsapp-icon">
|
|
1095
|
+
<path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"/>
|
|
1096
|
+
</svg>
|
|
1097
|
+
`;
|
|
1098
|
+
}
|
|
1099
|
+
getSaudiHelpTextContent() {
|
|
1100
|
+
return {
|
|
1101
|
+
helpText: this.language === "ar" ? "لا تعرف العنوان الوطني؟" : "Don't know your national address?",
|
|
1102
|
+
linkText: this.language === "ar" ? "احصل على العنوان الوطني عبر الواتساب" : "Get your national address via WhatsApp"
|
|
1103
|
+
};
|
|
1028
1104
|
}
|
|
1029
|
-
|
|
1030
|
-
const
|
|
1031
|
-
|
|
1105
|
+
renderSaudiFriendlyError() {
|
|
1106
|
+
const i = this.inputValue && this.inputValue.trim().length > 0;
|
|
1107
|
+
let e, t;
|
|
1108
|
+
i ? (e = "العنوان الوطني المختصر غير صحيح (الصيغة: AAAA1234). يمكنك الحصول عليه بسهولة", t = "The short national address format is incorrect (format: AAAA1234). You can easily get it") : (e = "العنوان الوطني المختصر مطلوب. يمكنك الحصول عليه بسهولة", t = "The short national address is required. You can easily get it");
|
|
1109
|
+
const r = "عبر الواتساب (اضغط هنا)", s = "via WhatsApp (click here)", o = "أو ابحث أعلاه", a = "or search above", l = this.language === "ar" ? e : t, n = this.language === "ar" ? r : s, m = this.language === "ar" ? o : a;
|
|
1110
|
+
return g`
|
|
1111
|
+
<span>
|
|
1112
|
+
${l}
|
|
1113
|
+
<a
|
|
1114
|
+
href="${this.getWhatsAppLink()}"
|
|
1115
|
+
target="_blank"
|
|
1116
|
+
rel="noopener noreferrer"
|
|
1117
|
+
class="whatsapp-link-inline"
|
|
1118
|
+
part="whatsapp-link"
|
|
1119
|
+
>
|
|
1120
|
+
${this.renderWhatsAppIcon()}
|
|
1121
|
+
${n}
|
|
1122
|
+
</a>
|
|
1123
|
+
${m}
|
|
1124
|
+
</span>
|
|
1125
|
+
`;
|
|
1126
|
+
}
|
|
1127
|
+
renderSaudiHelpText() {
|
|
1128
|
+
if (!this.isSaudiFormMode() || this.validationError || this.errors && this.errors.length > 0)
|
|
1129
|
+
return "";
|
|
1130
|
+
const i = "لا تعرف العنوان الوطني؟ احصل عليه بسهولة", e = "Don't know your national address? Get it easily", t = "عبر الواتساب (اضغط هنا)", r = "via WhatsApp (click here)", s = "أو ابحث أعلاه", o = "or search above", a = this.language === "ar" ? i : e, l = this.language === "ar" ? t : r, n = this.language === "ar" ? s : o;
|
|
1131
|
+
return g`
|
|
1132
|
+
<div class="help-text" part="help-text">
|
|
1133
|
+
<span>
|
|
1134
|
+
${a}
|
|
1135
|
+
<a
|
|
1136
|
+
href="${this.getWhatsAppLink()}"
|
|
1137
|
+
target="_blank"
|
|
1138
|
+
rel="noopener noreferrer"
|
|
1139
|
+
class="whatsapp-link-inline"
|
|
1140
|
+
part="whatsapp-link"
|
|
1141
|
+
>
|
|
1142
|
+
${this.renderWhatsAppIcon()}
|
|
1143
|
+
${l}
|
|
1144
|
+
</a>
|
|
1145
|
+
${n}
|
|
1146
|
+
</span>
|
|
1147
|
+
</div>
|
|
1148
|
+
`;
|
|
1149
|
+
}
|
|
1150
|
+
checkValidity() {
|
|
1151
|
+
return this.validate();
|
|
1152
|
+
}
|
|
1153
|
+
reportValidity() {
|
|
1154
|
+
this.touched = !0;
|
|
1155
|
+
const i = this.validate();
|
|
1156
|
+
return i || this.dispatchEvent(new CustomEvent("invalid", {
|
|
1157
|
+
detail: { error: this.validationError },
|
|
1158
|
+
bubbles: !0,
|
|
1159
|
+
composed: !0
|
|
1160
|
+
})), i;
|
|
1161
|
+
}
|
|
1162
|
+
reset() {
|
|
1163
|
+
this.inputValue = "", this.selectedId = null, this.validationError = null, this.errors = [], this.touched = !1, this.predictions = [], this.isOpen = !1, this.error = null, this.showNationalAddressIcon = !1, this.mode === "form" && (this._internals.setFormValue(null), this._internals.setValidity({}));
|
|
1164
|
+
}
|
|
1165
|
+
// Form lifecycle callbacks
|
|
1166
|
+
formResetCallback() {
|
|
1167
|
+
this.reset();
|
|
1168
|
+
}
|
|
1169
|
+
formStateRestoreCallback(i) {
|
|
1170
|
+
i && this.mode === "form" && (this.selectedId = i);
|
|
1171
|
+
}
|
|
1172
|
+
validate() {
|
|
1173
|
+
if (this.mode !== "form")
|
|
1174
|
+
return !0;
|
|
1175
|
+
const i = K(this.language), e = this.inputValue || "";
|
|
1176
|
+
return this.required && !e.trim() ? (this.validationError = i.validationRequired, this._internals.setValidity(
|
|
1177
|
+
{ valueMissing: !0 },
|
|
1178
|
+
this.validationError,
|
|
1179
|
+
this.inputElement
|
|
1180
|
+
), !1) : this.isSaudiFormMode() && e.trim() && !this.isShortAddressFormat(e) ? (this.validationError = i.validationSaudiFormat, this._internals.setValidity(
|
|
1181
|
+
{ patternMismatch: !0 },
|
|
1182
|
+
this.validationError,
|
|
1183
|
+
this.inputElement
|
|
1184
|
+
), !1) : this.pattern && e.trim() && !new RegExp(this.pattern).test(e) ? (this.validationError = i.validationPattern, this._internals.setValidity(
|
|
1185
|
+
{ patternMismatch: !0 },
|
|
1186
|
+
this.validationError,
|
|
1187
|
+
this.inputElement
|
|
1188
|
+
), !1) : (this.validationError = null, this._internals.setValidity({}), !0);
|
|
1189
|
+
}
|
|
1190
|
+
handleInput(i) {
|
|
1191
|
+
if (this.disabled) return;
|
|
1192
|
+
const e = i.target, t = this.inputValue;
|
|
1193
|
+
this.inputValue = e.value, this.touched = !0, this.showNationalAddressIcon && (this.showNationalAddressIcon = !1), this.mode === "form" && (this.validationError && (this.validationError = null), this.selectedId = null, this._internals.setFormValue(this.inputValue || null), this.validate()), this.errors && this.errors.length > 0 && (this.errors = []), this.inputValue.trim().length >= this.minChars && (this.isLoading = !0), this.debouncedFetch(this.inputValue), this._value = this.inputValue, this.requestUpdate("value", t), this.dispatchEvent(new CustomEvent("input", {
|
|
1032
1194
|
detail: { value: this.inputValue },
|
|
1033
1195
|
bubbles: !0,
|
|
1034
1196
|
composed: !0
|
|
1197
|
+
})), this.dispatchEvent(new Event("change", {
|
|
1198
|
+
bubbles: !0,
|
|
1199
|
+
composed: !0
|
|
1200
|
+
})), this.dispatchEvent(new InputEvent("input", {
|
|
1201
|
+
data: this.inputValue,
|
|
1202
|
+
bubbles: !0,
|
|
1203
|
+
composed: !0
|
|
1035
1204
|
}));
|
|
1036
1205
|
}
|
|
1037
|
-
async handleSelect(
|
|
1206
|
+
async handleSelect(i) {
|
|
1038
1207
|
var t;
|
|
1039
|
-
|
|
1208
|
+
if (this.disabled) return;
|
|
1209
|
+
this.isSaudiFormMode() && i.place_id && this.isShortAddressFormat(i.place_id) ? (this.inputValue = i.place_id, this.showNationalAddressIcon = !0) : (this.inputValue = i.formatted_address, this.showNationalAddressIcon = !1), this.isOpen = !1, this.predictions = [], this.touched = !0;
|
|
1040
1210
|
let e = null;
|
|
1041
|
-
if ((t =
|
|
1042
|
-
place_id:
|
|
1043
|
-
formatted_address:
|
|
1044
|
-
geometry:
|
|
1045
|
-
types:
|
|
1046
|
-
address_components:
|
|
1047
|
-
} : e = await this.fetchPlaceDetails(
|
|
1048
|
-
e.formatted_address && (this.inputValue = e.formatted_address)
|
|
1211
|
+
if (this.mode === "form" ? e = await this.fetchPlaceDetails(i.place_id) : (t = i.geometry) != null && t.location ? e = {
|
|
1212
|
+
place_id: i.place_id,
|
|
1213
|
+
formatted_address: i.formatted_address || i.description,
|
|
1214
|
+
geometry: i.geometry,
|
|
1215
|
+
types: i.types,
|
|
1216
|
+
address_components: i.address_components
|
|
1217
|
+
} : e = await this.fetchPlaceDetails(i.place_id), e) {
|
|
1218
|
+
this.isSaudiFormMode() && e.place_id && this.isShortAddressFormat(e.place_id) ? (this.inputValue = e.place_id, this.showNationalAddressIcon = !0) : (e.formatted_address && (this.inputValue = e.formatted_address), this.showNationalAddressIcon = !1), this.mode === "form" && (this.selectedId = e.place_id, this._internals.setFormValue(this.inputValue), this.validate()), this._value = this.inputValue, this.dispatchEvent(new CustomEvent("input", {
|
|
1219
|
+
detail: { value: this.inputValue },
|
|
1220
|
+
bubbles: !0,
|
|
1221
|
+
composed: !0
|
|
1222
|
+
})), this.dispatchEvent(new Event("change", {
|
|
1223
|
+
bubbles: !0,
|
|
1224
|
+
composed: !0
|
|
1225
|
+
}));
|
|
1049
1226
|
const r = this.getValidationSupport(e);
|
|
1050
1227
|
this.dispatchEvent(new CustomEvent("place-select", {
|
|
1051
1228
|
detail: { place: e, validationSupport: r },
|
|
@@ -1058,71 +1235,84 @@ let h = class extends U {
|
|
|
1058
1235
|
}));
|
|
1059
1236
|
}
|
|
1060
1237
|
}
|
|
1061
|
-
handleKeyDown(
|
|
1062
|
-
if (!(!this.isOpen || this.predictions.length === 0))
|
|
1063
|
-
switch (
|
|
1238
|
+
handleKeyDown(i) {
|
|
1239
|
+
if (!this.disabled && !(!this.isOpen || this.predictions.length === 0))
|
|
1240
|
+
switch (i.key) {
|
|
1064
1241
|
case "ArrowDown":
|
|
1065
|
-
|
|
1242
|
+
i.preventDefault(), this.activeIndex = Math.min(this.activeIndex + 1, this.predictions.length - 1);
|
|
1066
1243
|
break;
|
|
1067
1244
|
case "ArrowUp":
|
|
1068
|
-
|
|
1245
|
+
i.preventDefault(), this.activeIndex = Math.max(this.activeIndex - 1, -1);
|
|
1069
1246
|
break;
|
|
1070
1247
|
case "Enter":
|
|
1071
|
-
|
|
1248
|
+
i.preventDefault(), this.activeIndex >= 0 && this.activeIndex < this.predictions.length && this.handleSelect(this.predictions[this.activeIndex]);
|
|
1072
1249
|
break;
|
|
1073
1250
|
case "Escape":
|
|
1074
|
-
|
|
1251
|
+
i.preventDefault(), this.isOpen = !1, this.activeIndex = -1;
|
|
1075
1252
|
break;
|
|
1076
1253
|
}
|
|
1077
1254
|
}
|
|
1078
1255
|
handleBlur() {
|
|
1079
1256
|
setTimeout(() => {
|
|
1080
|
-
this.isOpen = !1, this.activeIndex = -1
|
|
1257
|
+
this.isOpen = !1, this.activeIndex = -1, this.mode === "form" && this.touched && this.validate(), this.dispatchEvent(new Event("blur", {
|
|
1258
|
+
bubbles: !0,
|
|
1259
|
+
composed: !0
|
|
1260
|
+
}));
|
|
1081
1261
|
}, 200);
|
|
1082
1262
|
}
|
|
1083
1263
|
handleFocus() {
|
|
1084
|
-
this.predictions.length > 0 && (this.isOpen = !0);
|
|
1264
|
+
this.disabled || this.predictions.length > 0 && (this.isOpen = !0);
|
|
1085
1265
|
}
|
|
1086
1266
|
renderLocationIcon() {
|
|
1087
|
-
return
|
|
1267
|
+
return g`
|
|
1088
1268
|
<svg class="location-icon" fill="currentColor" viewBox="0 0 20 20">
|
|
1089
1269
|
<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
1270
|
</svg>
|
|
1091
1271
|
`;
|
|
1092
1272
|
}
|
|
1093
|
-
|
|
1273
|
+
renderTooltip() {
|
|
1274
|
+
return this.tooltip ? g`
|
|
1275
|
+
<span class="tooltip-toggle" part="tooltip-toggle">
|
|
1276
|
+
<svg class="tooltip-icon" part="tooltip-icon" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
1277
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
|
1278
|
+
</svg>
|
|
1279
|
+
<span class="tooltip-content" part="tooltip-content">${this.tooltip}</span>
|
|
1280
|
+
</span>
|
|
1281
|
+
` : "";
|
|
1282
|
+
}
|
|
1283
|
+
renderPrediction(i, e) {
|
|
1094
1284
|
const t = {
|
|
1095
1285
|
"dropdown-item": !0,
|
|
1096
1286
|
active: e === this.activeIndex
|
|
1097
1287
|
};
|
|
1098
|
-
let r =
|
|
1099
|
-
return
|
|
1288
|
+
let r = i.structured_formatting.main_text;
|
|
1289
|
+
return i.short_address && r.includes(i.short_address) && (r = r.replace(i.short_address, "").trim(), r = r.replace(/\s*,\s*,\s*/g, ", ").replace(/^\s*,\s*|\s*,\s*$/g, "").trim()), g`
|
|
1100
1290
|
<div
|
|
1101
|
-
class=${
|
|
1291
|
+
class=${O(t)}
|
|
1102
1292
|
part="dropdown-item ${e === this.activeIndex ? "dropdown-item-active" : ""}"
|
|
1103
|
-
@click=${() => this.handleSelect(
|
|
1293
|
+
@click=${() => this.handleSelect(i)}
|
|
1104
1294
|
role="option"
|
|
1105
1295
|
aria-selected=${e === this.activeIndex}
|
|
1106
1296
|
>
|
|
1107
1297
|
${this.renderLocationIcon()}
|
|
1108
1298
|
<div class="place-info" part="place-info">
|
|
1109
1299
|
<div class="main-text" part="main-text">
|
|
1110
|
-
${
|
|
1300
|
+
${i.short_address ? g`
|
|
1111
1301
|
<span class="national-address-badge" part="national-address-badge">
|
|
1112
1302
|
<img
|
|
1113
1303
|
src="https://cdn.salla.network/images/shipping/png/national-address-icon-small-min.png"
|
|
1114
1304
|
alt="national address icon"
|
|
1115
1305
|
class="national-address-icon"
|
|
1116
1306
|
/>
|
|
1117
|
-
<span class="national-address-text">${
|
|
1307
|
+
<span class="national-address-text">${i.short_address}</span>
|
|
1118
1308
|
<span class="national-address-separator">-</span>
|
|
1119
1309
|
</span>
|
|
1120
1310
|
` : ""}
|
|
1121
1311
|
${r}
|
|
1122
1312
|
</div>
|
|
1123
|
-
${
|
|
1313
|
+
${i.structured_formatting.secondary_text ? g`
|
|
1124
1314
|
<div class="secondary-text" part="secondary-text">
|
|
1125
|
-
${
|
|
1315
|
+
${i.structured_formatting.secondary_text}
|
|
1126
1316
|
</div>
|
|
1127
1317
|
` : ""}
|
|
1128
1318
|
</div>
|
|
@@ -1130,21 +1320,35 @@ let h = class extends U {
|
|
|
1130
1320
|
`;
|
|
1131
1321
|
}
|
|
1132
1322
|
render() {
|
|
1133
|
-
const
|
|
1323
|
+
const i = {
|
|
1134
1324
|
dropdown: !0,
|
|
1135
1325
|
open: this.isOpen
|
|
1136
|
-
}, e =
|
|
1137
|
-
|
|
1138
|
-
|
|
1326
|
+
}, e = {
|
|
1327
|
+
"is-invalid": !!(this.mode === "form" && this.validationError) || this.errors && this.errors.length > 0,
|
|
1328
|
+
"with-national-icon": this.showNationalAddressIcon
|
|
1329
|
+
}, t = {
|
|
1330
|
+
required: this.mode === "form" && this.required
|
|
1331
|
+
}, r = K(this.language), s = this.dir === "auto" ? Ze(this.language) ? "rtl" : "ltr" : this.dir, o = this.placeholder || r.placeholder, a = this.name || "salla-address-search";
|
|
1332
|
+
return g`
|
|
1333
|
+
<div class="wrapper ${this.className}" part="wrapper" dir="${s}">
|
|
1139
1334
|
<div class="input-container" part="input-container">
|
|
1140
|
-
${this.label ?
|
|
1141
|
-
|
|
1335
|
+
${this.label ? g`
|
|
1336
|
+
<label part="label" class=${O(t)}>
|
|
1337
|
+
<span class="label-content">
|
|
1338
|
+
<span>${this.label}</span>
|
|
1339
|
+
${this.renderTooltip()}
|
|
1340
|
+
</span>
|
|
1341
|
+
</label>
|
|
1342
|
+
` : ""}
|
|
1343
|
+
<div class="input-wrapper">
|
|
1142
1344
|
<input
|
|
1143
1345
|
part="input"
|
|
1346
|
+
class=${O(e)}
|
|
1144
1347
|
type="text"
|
|
1145
|
-
name="
|
|
1348
|
+
name="${a}"
|
|
1146
1349
|
.value=${this.inputValue}
|
|
1147
|
-
placeholder=${
|
|
1350
|
+
placeholder=${o}
|
|
1351
|
+
?disabled=${this.disabled}
|
|
1148
1352
|
@input=${this.handleInput}
|
|
1149
1353
|
@keydown=${this.handleKeyDown}
|
|
1150
1354
|
@blur=${this.handleBlur}
|
|
@@ -1153,26 +1357,41 @@ let h = class extends U {
|
|
|
1153
1357
|
aria-expanded=${this.isOpen}
|
|
1154
1358
|
aria-autocomplete="list"
|
|
1155
1359
|
aria-controls="predictions-list"
|
|
1360
|
+
aria-invalid=${this.mode === "form" && this.validationError || this.errors && this.errors.length > 0 ? "true" : "false"}
|
|
1361
|
+
aria-required=${this.mode === "form" && this.required ? "true" : "false"}
|
|
1156
1362
|
autocomplete="off"
|
|
1363
|
+
autocorrect="off"
|
|
1364
|
+
autocapitalize="off"
|
|
1365
|
+
spellcheck="false"
|
|
1157
1366
|
/>
|
|
1158
|
-
${this.isLoading ?
|
|
1159
|
-
</div>
|
|
1160
|
-
${this.error ? v`<div class="error-message" part="error">${this.error}</div>` : ""}
|
|
1161
|
-
</div>
|
|
1367
|
+
${this.isLoading ? g`<div class="loading-spinner" part="spinner"></div>` : ""}
|
|
1162
1368
|
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1369
|
+
<div
|
|
1370
|
+
id="predictions-list"
|
|
1371
|
+
class=${O(i)}
|
|
1372
|
+
part="dropdown"
|
|
1373
|
+
role="listbox"
|
|
1374
|
+
>
|
|
1375
|
+
${this.predictions.length > 0 ? this.predictions.map((l, n) => this.renderPrediction(l, n)) : this.inputValue && !this.isLoading ? g`<div class="no-results" part="no-results">${r.noResults}</div>` : ""}
|
|
1376
|
+
</div>
|
|
1377
|
+
</div>
|
|
1378
|
+
${this.mode === "form" && this.validationError ? g`
|
|
1379
|
+
<div class="validation-error" part="validation-error">
|
|
1380
|
+
${this.isSaudiFormMode() ? this.renderSaudiFriendlyError() : g`<span>${this.validationError}</span>`}
|
|
1381
|
+
</div>
|
|
1382
|
+
` : ""}
|
|
1383
|
+
${this.errors && this.errors.length > 0 ? g`
|
|
1384
|
+
<div class="validation-error" part="validation-error">${this.errors[0]}</div>
|
|
1385
|
+
` : ""}
|
|
1386
|
+
${this.error ? g`<div class="error-message" part="error">${this.error}</div>` : ""}
|
|
1387
|
+
${this.renderSaudiHelpText()}
|
|
1170
1388
|
</div>
|
|
1171
1389
|
</div>
|
|
1172
1390
|
`;
|
|
1173
1391
|
}
|
|
1174
1392
|
};
|
|
1175
|
-
|
|
1393
|
+
d.formAssociated = !0;
|
|
1394
|
+
d.styles = be`
|
|
1176
1395
|
:host {
|
|
1177
1396
|
display: block;
|
|
1178
1397
|
position: relative;
|
|
@@ -1184,11 +1403,14 @@ h.styles = ye`
|
|
|
1184
1403
|
}
|
|
1185
1404
|
|
|
1186
1405
|
.input-container {
|
|
1187
|
-
position: relative;
|
|
1188
1406
|
display: flex;
|
|
1189
1407
|
flex-direction: column;
|
|
1190
1408
|
}
|
|
1191
1409
|
|
|
1410
|
+
.input-wrapper {
|
|
1411
|
+
position: relative;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1192
1414
|
label {
|
|
1193
1415
|
display: block;
|
|
1194
1416
|
margin-bottom: var(--salla-autocomplete-label-margin, 0.5rem);
|
|
@@ -1197,11 +1419,68 @@ h.styles = ye`
|
|
|
1197
1419
|
color: var(--salla-autocomplete-label-color, #374151);
|
|
1198
1420
|
}
|
|
1199
1421
|
|
|
1422
|
+
label.required::after {
|
|
1423
|
+
content: ' *';
|
|
1424
|
+
color: var(--salla-autocomplete-required-color, #dc2626);
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
.label-content {
|
|
1428
|
+
display: inline-flex;
|
|
1429
|
+
align-items: center;
|
|
1430
|
+
gap: 0.5rem;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
.tooltip-toggle {
|
|
1434
|
+
position: relative;
|
|
1435
|
+
display: inline-flex;
|
|
1436
|
+
align-items: center;
|
|
1437
|
+
cursor: help;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
.tooltip-icon {
|
|
1441
|
+
width: 1rem;
|
|
1442
|
+
height: 1rem;
|
|
1443
|
+
color: var(--salla-autocomplete-tooltip-icon-color, #6b7280);
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
.tooltip-content {
|
|
1447
|
+
display: none;
|
|
1448
|
+
position: absolute;
|
|
1449
|
+
bottom: 125%;
|
|
1450
|
+
left: 50%;
|
|
1451
|
+
transform: translateX(-50%);
|
|
1452
|
+
background: var(--salla-autocomplete-tooltip-bg, #1f2937);
|
|
1453
|
+
color: var(--salla-autocomplete-tooltip-color, white);
|
|
1454
|
+
padding: 0.5rem 0.75rem;
|
|
1455
|
+
border-radius: 0.375rem;
|
|
1456
|
+
font-size: 0.75rem;
|
|
1457
|
+
line-height: 1.4;
|
|
1458
|
+
white-space: nowrap;
|
|
1459
|
+
z-index: 1000;
|
|
1460
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
.tooltip-content::after {
|
|
1464
|
+
content: '';
|
|
1465
|
+
position: absolute;
|
|
1466
|
+
top: 100%;
|
|
1467
|
+
left: 50%;
|
|
1468
|
+
transform: translateX(-50%);
|
|
1469
|
+
border: 5px solid transparent;
|
|
1470
|
+
border-top-color: var(--salla-autocomplete-tooltip-bg, #1f2937);
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
.tooltip-toggle:hover .tooltip-content,
|
|
1474
|
+
.tooltip-toggle:focus .tooltip-content {
|
|
1475
|
+
display: block;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1200
1478
|
input {
|
|
1201
1479
|
width: 100%;
|
|
1202
1480
|
padding-block: 0.75rem;
|
|
1203
1481
|
padding-inline-start: var(--salla-autocomplete-input-padding-start, 0.875rem);
|
|
1204
1482
|
padding-inline-end: var(--salla-autocomplete-input-padding-end, 2.75rem);
|
|
1483
|
+
font-family: var(--salla-autocomplete-font-family, system-ui, -apple-system, sans-serif);
|
|
1205
1484
|
font-size: var(--salla-autocomplete-input-font-size, 1rem);
|
|
1206
1485
|
line-height: var(--salla-autocomplete-input-line-height, 1.5);
|
|
1207
1486
|
border: var(--salla-autocomplete-input-border, 1px solid #d1d5db);
|
|
@@ -1216,6 +1495,21 @@ h.styles = ye`
|
|
|
1216
1495
|
appearance: none;
|
|
1217
1496
|
}
|
|
1218
1497
|
|
|
1498
|
+
input.with-national-icon {
|
|
1499
|
+
padding-inline-start: var(--salla-autocomplete-input-padding-start-icon, 2rem);
|
|
1500
|
+
background-image: url('https://cdn.salla.network/images/shipping/png/national-address-icon-small-min.png');
|
|
1501
|
+
background-repeat: no-repeat;
|
|
1502
|
+
background-position: 0.75rem center;
|
|
1503
|
+
background-size: 16px;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
input.with-national-icon[dir="rtl"],
|
|
1507
|
+
:host([dir="rtl"]) input.with-national-icon {
|
|
1508
|
+
padding-inline-start: var(--salla-autocomplete-input-padding-start, 0.875rem);
|
|
1509
|
+
padding-inline-end: var(--salla-autocomplete-input-padding-end-icon, 2.75rem);
|
|
1510
|
+
background-position: calc(100% - 0.75rem) center;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1219
1513
|
@media (max-width: 640px) {
|
|
1220
1514
|
input {
|
|
1221
1515
|
font-size: var(--salla-autocomplete-input-font-size-mobile, 16px);
|
|
@@ -1225,6 +1519,18 @@ h.styles = ye`
|
|
|
1225
1519
|
min-height: 44px;
|
|
1226
1520
|
touch-action: manipulation;
|
|
1227
1521
|
}
|
|
1522
|
+
|
|
1523
|
+
input.with-national-icon {
|
|
1524
|
+
padding-inline-start: var(--salla-autocomplete-input-padding-start-icon-mobile, 2rem);
|
|
1525
|
+
background-position: 0.875rem center;
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
input.with-national-icon[dir="rtl"],
|
|
1529
|
+
:host([dir="rtl"]) input.with-national-icon {
|
|
1530
|
+
padding-inline-start: var(--salla-autocomplete-input-padding-start-mobile, 0.875rem);
|
|
1531
|
+
padding-inline-end: var(--salla-autocomplete-input-padding-end-icon-mobile, 2.75rem);
|
|
1532
|
+
background-position: calc(100% - 0.875rem) center;
|
|
1533
|
+
}
|
|
1228
1534
|
}
|
|
1229
1535
|
|
|
1230
1536
|
input:focus {
|
|
@@ -1237,10 +1543,79 @@ h.styles = ye`
|
|
|
1237
1543
|
cursor: not-allowed;
|
|
1238
1544
|
}
|
|
1239
1545
|
|
|
1546
|
+
input.is-invalid {
|
|
1547
|
+
border-color: var(--salla-autocomplete-input-error-border-color, #dc2626);
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
input.is-invalid:focus {
|
|
1551
|
+
border-color: var(--salla-autocomplete-input-error-border-color, #dc2626);
|
|
1552
|
+
box-shadow: var(--salla-autocomplete-input-error-shadow, 0 0 0 3px rgba(220, 38, 38, 0.1));
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1240
1555
|
input::placeholder {
|
|
1241
1556
|
color: var(--salla-autocomplete-input-placeholder-color, #9ca3af);
|
|
1242
1557
|
}
|
|
1243
1558
|
|
|
1559
|
+
.validation-error {
|
|
1560
|
+
display: flex;
|
|
1561
|
+
flex-wrap: wrap;
|
|
1562
|
+
align-items: center;
|
|
1563
|
+
gap: 0.5rem;
|
|
1564
|
+
margin-top: 0.375rem;
|
|
1565
|
+
font-size: var(--salla-autocomplete-error-font-size, 0.875rem);
|
|
1566
|
+
color: var(--salla-autocomplete-error-color, #dc2626);
|
|
1567
|
+
line-height: 1.5;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
.validation-error > span {
|
|
1571
|
+
line-height: 1.5;
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
.whatsapp-link-inline {
|
|
1575
|
+
color: var(--salla-autocomplete-whatsapp-brand-color, #25D366);
|
|
1576
|
+
white-space: nowrap;
|
|
1577
|
+
line-height: inherit;
|
|
1578
|
+
display: inline-flex;
|
|
1579
|
+
align-items: center;
|
|
1580
|
+
vertical-align: middle;
|
|
1581
|
+
text-decoration: underline;
|
|
1582
|
+
cursor: pointer;
|
|
1583
|
+
transition: all 0.2s ease;
|
|
1584
|
+
gap: 0.25rem;
|
|
1585
|
+
margin-inline: 0.25rem;
|
|
1586
|
+
font-weight: 500;
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
.whatsapp-link-inline:hover {
|
|
1590
|
+
color: var(--salla-autocomplete-whatsapp-brand-hover, #1da851);
|
|
1591
|
+
opacity: 0.9;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
.whatsapp-link-inline:active {
|
|
1595
|
+
transform: scale(0.98);
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.whatsapp-link-inline .whatsapp-icon {
|
|
1599
|
+
color: var(--salla-autocomplete-whatsapp-brand-color, #25D366);
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
.help-text {
|
|
1603
|
+
display: block;
|
|
1604
|
+
margin-top: 0.5rem;
|
|
1605
|
+
font-size: var(--salla-autocomplete-help-font-size, 0.875rem);
|
|
1606
|
+
color: var(--salla-autocomplete-help-color, #6b7280);
|
|
1607
|
+
line-height: 1.5;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
.help-text span {
|
|
1611
|
+
line-height: 1.5;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
.whatsapp-icon {
|
|
1615
|
+
width: 1rem;
|
|
1616
|
+
height: 1rem;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1244
1619
|
.loading-spinner {
|
|
1245
1620
|
position: absolute;
|
|
1246
1621
|
inset-inline-end: 0.875rem;
|
|
@@ -1312,21 +1687,21 @@ h.styles = ye`
|
|
|
1312
1687
|
margin-top: var(--salla-autocomplete-dropdown-margin-top-mobile, 0.25rem);
|
|
1313
1688
|
}
|
|
1314
1689
|
}
|
|
1315
|
-
|
|
1690
|
+
|
|
1316
1691
|
@media (max-width: 640px) and (max-height: 667px) {
|
|
1317
1692
|
/* Smaller phones (iPhone SE, iPhone 8, etc.) */
|
|
1318
1693
|
.dropdown {
|
|
1319
1694
|
max-height: var(--salla-autocomplete-dropdown-max-height-small, 30vh);
|
|
1320
1695
|
}
|
|
1321
1696
|
}
|
|
1322
|
-
|
|
1697
|
+
|
|
1323
1698
|
@media (max-width: 640px) and (min-height: 668px) and (max-height: 896px) {
|
|
1324
1699
|
/* Standard phones (iPhone 12, iPhone 13, etc.) */
|
|
1325
1700
|
.dropdown {
|
|
1326
1701
|
max-height: var(--salla-autocomplete-dropdown-max-height-standard, 38vh);
|
|
1327
1702
|
}
|
|
1328
1703
|
}
|
|
1329
|
-
|
|
1704
|
+
|
|
1330
1705
|
@media (max-width: 640px) and (min-height: 897px) {
|
|
1331
1706
|
/* Larger phones (iPhone 14 Pro Max, etc.) */
|
|
1332
1707
|
.dropdown {
|
|
@@ -1480,7 +1855,7 @@ h.styles = ye`
|
|
|
1480
1855
|
margin: 0.5rem;
|
|
1481
1856
|
padding: 0.875rem;
|
|
1482
1857
|
}
|
|
1483
|
-
|
|
1858
|
+
|
|
1484
1859
|
@media (max-width: 640px) {
|
|
1485
1860
|
.no-results {
|
|
1486
1861
|
padding: 0.875rem;
|
|
@@ -1493,105 +1868,138 @@ h.styles = ye`
|
|
|
1493
1868
|
}
|
|
1494
1869
|
}
|
|
1495
1870
|
`;
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
],
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
],
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
],
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
],
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
],
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
],
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
],
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
],
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
],
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
],
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
],
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
],
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
],
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
],
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
],
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
],
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
],
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
],
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
],
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
],
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
],
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
],
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
],
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
],
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
],
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
],
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
],
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
],
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
],
|
|
1583
|
-
h
|
|
1584
|
-
|
|
1585
|
-
],
|
|
1871
|
+
h([
|
|
1872
|
+
p({ type: String })
|
|
1873
|
+
], d.prototype, "proxyUrl", 2);
|
|
1874
|
+
h([
|
|
1875
|
+
p({ type: String })
|
|
1876
|
+
], d.prototype, "authToken", 2);
|
|
1877
|
+
h([
|
|
1878
|
+
p({ type: String })
|
|
1879
|
+
], d.prototype, "placeholder", 2);
|
|
1880
|
+
h([
|
|
1881
|
+
p({ type: String })
|
|
1882
|
+
], d.prototype, "defaultPlace", 2);
|
|
1883
|
+
h([
|
|
1884
|
+
p({ type: String })
|
|
1885
|
+
], d.prototype, "label", 2);
|
|
1886
|
+
h([
|
|
1887
|
+
p({ type: String })
|
|
1888
|
+
], d.prototype, "className", 2);
|
|
1889
|
+
h([
|
|
1890
|
+
p({ type: String })
|
|
1891
|
+
], d.prototype, "language", 2);
|
|
1892
|
+
h([
|
|
1893
|
+
p({ type: String })
|
|
1894
|
+
], d.prototype, "dir", 2);
|
|
1895
|
+
h([
|
|
1896
|
+
p({ type: String })
|
|
1897
|
+
], d.prototype, "mode", 2);
|
|
1898
|
+
h([
|
|
1899
|
+
p({ type: String })
|
|
1900
|
+
], d.prototype, "name", 2);
|
|
1901
|
+
h([
|
|
1902
|
+
p({ type: Boolean })
|
|
1903
|
+
], d.prototype, "required", 2);
|
|
1904
|
+
h([
|
|
1905
|
+
p({ type: String })
|
|
1906
|
+
], d.prototype, "pattern", 2);
|
|
1907
|
+
h([
|
|
1908
|
+
p({ type: String })
|
|
1909
|
+
], d.prototype, "tooltip", 2);
|
|
1910
|
+
h([
|
|
1911
|
+
p({ type: String })
|
|
1912
|
+
], d.prototype, "selectedId", 2);
|
|
1913
|
+
h([
|
|
1914
|
+
p({ type: Array })
|
|
1915
|
+
], d.prototype, "errors", 2);
|
|
1916
|
+
h([
|
|
1917
|
+
p({ type: Boolean })
|
|
1918
|
+
], d.prototype, "disabled", 2);
|
|
1919
|
+
h([
|
|
1920
|
+
p({ type: String })
|
|
1921
|
+
], d.prototype, "value", 1);
|
|
1922
|
+
h([
|
|
1923
|
+
p({ type: String })
|
|
1924
|
+
], d.prototype, "country", 1);
|
|
1925
|
+
h([
|
|
1926
|
+
p({ type: Object })
|
|
1927
|
+
], d.prototype, "locationBias", 2);
|
|
1928
|
+
h([
|
|
1929
|
+
p({ type: Object })
|
|
1930
|
+
], d.prototype, "locationRestriction", 2);
|
|
1931
|
+
h([
|
|
1932
|
+
p({ type: Array })
|
|
1933
|
+
], d.prototype, "types", 2);
|
|
1934
|
+
h([
|
|
1935
|
+
p({ type: String })
|
|
1936
|
+
], d.prototype, "fieldsStr", 1);
|
|
1937
|
+
h([
|
|
1938
|
+
p({ type: Array })
|
|
1939
|
+
], d.prototype, "fields", 1);
|
|
1940
|
+
h([
|
|
1941
|
+
p({ type: Boolean })
|
|
1942
|
+
], d.prototype, "strictBounds", 2);
|
|
1943
|
+
h([
|
|
1944
|
+
p({ type: Boolean })
|
|
1945
|
+
], d.prototype, "useSessionToken", 2);
|
|
1946
|
+
h([
|
|
1947
|
+
p({ type: Boolean })
|
|
1948
|
+
], d.prototype, "resolve", 2);
|
|
1949
|
+
h([
|
|
1950
|
+
p({ type: Function })
|
|
1951
|
+
], d.prototype, "onValidateAddress", 2);
|
|
1952
|
+
h([
|
|
1953
|
+
p({ type: Number })
|
|
1954
|
+
], d.prototype, "debounceDelay", 2);
|
|
1955
|
+
h([
|
|
1956
|
+
p({ type: Number })
|
|
1957
|
+
], d.prototype, "minChars", 2);
|
|
1958
|
+
h([
|
|
1959
|
+
b()
|
|
1960
|
+
], d.prototype, "predictions", 2);
|
|
1961
|
+
h([
|
|
1962
|
+
b()
|
|
1963
|
+
], d.prototype, "isOpen", 2);
|
|
1964
|
+
h([
|
|
1965
|
+
b()
|
|
1966
|
+
], d.prototype, "isLoading", 2);
|
|
1967
|
+
h([
|
|
1968
|
+
b()
|
|
1969
|
+
], d.prototype, "error", 2);
|
|
1970
|
+
h([
|
|
1971
|
+
b()
|
|
1972
|
+
], d.prototype, "activeIndex", 2);
|
|
1973
|
+
h([
|
|
1974
|
+
b()
|
|
1975
|
+
], d.prototype, "inputValue", 2);
|
|
1976
|
+
h([
|
|
1977
|
+
b()
|
|
1978
|
+
], d.prototype, "sessionToken", 2);
|
|
1979
|
+
h([
|
|
1980
|
+
b()
|
|
1981
|
+
], d.prototype, "validationError", 2);
|
|
1982
|
+
h([
|
|
1983
|
+
b()
|
|
1984
|
+
], d.prototype, "touched", 2);
|
|
1985
|
+
h([
|
|
1986
|
+
b()
|
|
1987
|
+
], d.prototype, "showNationalAddressIcon", 2);
|
|
1988
|
+
h([
|
|
1989
|
+
Le("input")
|
|
1990
|
+
], d.prototype, "inputElement", 2);
|
|
1991
|
+
d = h([
|
|
1992
|
+
Ve("salla-address-autocomplete")
|
|
1993
|
+
], d);
|
|
1586
1994
|
export {
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1995
|
+
je as ADDRESS_VALIDATION_SUPPORTED_COUNTRIES,
|
|
1996
|
+
d as SallaAddressAutocomplete,
|
|
1997
|
+
de as checkValidationSupport,
|
|
1998
|
+
We as debounce,
|
|
1999
|
+
Ke as generateSessionToken,
|
|
2000
|
+
Ge as getCountryCode,
|
|
2001
|
+
K as getTranslations,
|
|
2002
|
+
Ze as isRTL,
|
|
2003
|
+
it as parseHighlight,
|
|
1596
2004
|
tt as throttle
|
|
1597
2005
|
};
|