@telia-ace/widget-components-area-flamingo 1.1.28-rc.0 → 1.1.28-rc.2
Sign up to get free protection for your applications and to get access to all the features.
- package/area-3e574351.js +330 -0
- package/area-e653d58f.mjs +1560 -0
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +2 -2
- package/area-a7a242d5.js +0 -283
- package/area-f93cd792.mjs +0 -1302
@@ -0,0 +1,1560 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright 2019 Google LLC
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
5
|
+
*/
|
6
|
+
const I = globalThis, tt = I.ShadowRoot && (I.ShadyCSS === void 0 || I.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, et = Symbol(), ht = /* @__PURE__ */ new WeakMap();
|
7
|
+
let Ct = class {
|
8
|
+
constructor(t, e, s) {
|
9
|
+
if (this._$cssResult$ = !0, s !== et)
|
10
|
+
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
11
|
+
this.cssText = t, this.t = e;
|
12
|
+
}
|
13
|
+
get styleSheet() {
|
14
|
+
let t = this.o;
|
15
|
+
const e = this.t;
|
16
|
+
if (tt && t === void 0) {
|
17
|
+
const s = e !== void 0 && e.length === 1;
|
18
|
+
s && (t = ht.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && ht.set(e, t));
|
19
|
+
}
|
20
|
+
return t;
|
21
|
+
}
|
22
|
+
toString() {
|
23
|
+
return this.cssText;
|
24
|
+
}
|
25
|
+
};
|
26
|
+
const zt = (r) => new Ct(typeof r == "string" ? r : r + "", void 0, et), P = (r, ...t) => {
|
27
|
+
const e = r.length === 1 ? r[0] : t.reduce((s, i, o) => s + ((n) => {
|
28
|
+
if (n._$cssResult$ === !0)
|
29
|
+
return n.cssText;
|
30
|
+
if (typeof n == "number")
|
31
|
+
return n;
|
32
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
33
|
+
})(i) + r[o + 1], r[0]);
|
34
|
+
return new Ct(e, r, et);
|
35
|
+
}, Bt = (r, t) => {
|
36
|
+
if (tt)
|
37
|
+
r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
38
|
+
else
|
39
|
+
for (const e of t) {
|
40
|
+
const s = document.createElement("style"), i = I.litNonce;
|
41
|
+
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
|
42
|
+
}
|
43
|
+
}, lt = tt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
44
|
+
let e = "";
|
45
|
+
for (const s of t.cssRules)
|
46
|
+
e += s.cssText;
|
47
|
+
return zt(e);
|
48
|
+
})(r) : r;
|
49
|
+
/**
|
50
|
+
* @license
|
51
|
+
* Copyright 2017 Google LLC
|
52
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
53
|
+
*/
|
54
|
+
const { is: It, defineProperty: Ft, getOwnPropertyDescriptor: Wt, getOwnPropertyNames: Gt, getOwnPropertySymbols: Vt, getPrototypeOf: qt } = Object, y = globalThis, ct = y.trustedTypes, Yt = ct ? ct.emptyScript : "", q = y.reactiveElementPolyfillSupport, k = (r, t) => r, F = { toAttribute(r, t) {
|
55
|
+
switch (t) {
|
56
|
+
case Boolean:
|
57
|
+
r = r ? Yt : null;
|
58
|
+
break;
|
59
|
+
case Object:
|
60
|
+
case Array:
|
61
|
+
r = r == null ? r : JSON.stringify(r);
|
62
|
+
}
|
63
|
+
return r;
|
64
|
+
}, fromAttribute(r, t) {
|
65
|
+
let e = r;
|
66
|
+
switch (t) {
|
67
|
+
case Boolean:
|
68
|
+
e = r !== null;
|
69
|
+
break;
|
70
|
+
case Number:
|
71
|
+
e = r === null ? null : Number(r);
|
72
|
+
break;
|
73
|
+
case Object:
|
74
|
+
case Array:
|
75
|
+
try {
|
76
|
+
e = JSON.parse(r);
|
77
|
+
} catch {
|
78
|
+
e = null;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
return e;
|
82
|
+
} }, st = (r, t) => !It(r, t), dt = { attribute: !0, type: String, converter: F, reflect: !1, hasChanged: st };
|
83
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), y.litPropertyMetadata ?? (y.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
84
|
+
let E = class extends HTMLElement {
|
85
|
+
static addInitializer(t) {
|
86
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
87
|
+
}
|
88
|
+
static get observedAttributes() {
|
89
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
90
|
+
}
|
91
|
+
static createProperty(t, e = dt) {
|
92
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
93
|
+
const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
|
94
|
+
i !== void 0 && Ft(this.prototype, t, i);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
static getPropertyDescriptor(t, e, s) {
|
98
|
+
const { get: i, set: o } = Wt(this.prototype, t) ?? { get() {
|
99
|
+
return this[e];
|
100
|
+
}, set(n) {
|
101
|
+
this[e] = n;
|
102
|
+
} };
|
103
|
+
return { get() {
|
104
|
+
return i == null ? void 0 : i.call(this);
|
105
|
+
}, set(n) {
|
106
|
+
const h = i == null ? void 0 : i.call(this);
|
107
|
+
o.call(this, n), this.requestUpdate(t, h, s);
|
108
|
+
}, configurable: !0, enumerable: !0 };
|
109
|
+
}
|
110
|
+
static getPropertyOptions(t) {
|
111
|
+
return this.elementProperties.get(t) ?? dt;
|
112
|
+
}
|
113
|
+
static _$Ei() {
|
114
|
+
if (this.hasOwnProperty(k("elementProperties")))
|
115
|
+
return;
|
116
|
+
const t = qt(this);
|
117
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
118
|
+
}
|
119
|
+
static finalize() {
|
120
|
+
if (this.hasOwnProperty(k("finalized")))
|
121
|
+
return;
|
122
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(k("properties"))) {
|
123
|
+
const e = this.properties, s = [...Gt(e), ...Vt(e)];
|
124
|
+
for (const i of s)
|
125
|
+
this.createProperty(i, e[i]);
|
126
|
+
}
|
127
|
+
const t = this[Symbol.metadata];
|
128
|
+
if (t !== null) {
|
129
|
+
const e = litPropertyMetadata.get(t);
|
130
|
+
if (e !== void 0)
|
131
|
+
for (const [s, i] of e)
|
132
|
+
this.elementProperties.set(s, i);
|
133
|
+
}
|
134
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
135
|
+
for (const [e, s] of this.elementProperties) {
|
136
|
+
const i = this._$Eu(e, s);
|
137
|
+
i !== void 0 && this._$Eh.set(i, e);
|
138
|
+
}
|
139
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
140
|
+
}
|
141
|
+
static finalizeStyles(t) {
|
142
|
+
const e = [];
|
143
|
+
if (Array.isArray(t)) {
|
144
|
+
const s = new Set(t.flat(1 / 0).reverse());
|
145
|
+
for (const i of s)
|
146
|
+
e.unshift(lt(i));
|
147
|
+
} else
|
148
|
+
t !== void 0 && e.push(lt(t));
|
149
|
+
return e;
|
150
|
+
}
|
151
|
+
static _$Eu(t, e) {
|
152
|
+
const s = e.attribute;
|
153
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
154
|
+
}
|
155
|
+
constructor() {
|
156
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
157
|
+
}
|
158
|
+
_$Ev() {
|
159
|
+
var t;
|
160
|
+
this._$Eg = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
161
|
+
}
|
162
|
+
addController(t) {
|
163
|
+
var e;
|
164
|
+
(this._$ES ?? (this._$ES = [])).push(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
165
|
+
}
|
166
|
+
removeController(t) {
|
167
|
+
var e;
|
168
|
+
(e = this._$ES) == null || e.splice(this._$ES.indexOf(t) >>> 0, 1);
|
169
|
+
}
|
170
|
+
_$E_() {
|
171
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
172
|
+
for (const s of e.keys())
|
173
|
+
this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
174
|
+
t.size > 0 && (this._$Ep = t);
|
175
|
+
}
|
176
|
+
createRenderRoot() {
|
177
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
178
|
+
return Bt(t, this.constructor.elementStyles), t;
|
179
|
+
}
|
180
|
+
connectedCallback() {
|
181
|
+
var t;
|
182
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) == null || t.forEach((e) => {
|
183
|
+
var s;
|
184
|
+
return (s = e.hostConnected) == null ? void 0 : s.call(e);
|
185
|
+
});
|
186
|
+
}
|
187
|
+
enableUpdating(t) {
|
188
|
+
}
|
189
|
+
disconnectedCallback() {
|
190
|
+
var t;
|
191
|
+
(t = this._$ES) == null || t.forEach((e) => {
|
192
|
+
var s;
|
193
|
+
return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
|
194
|
+
});
|
195
|
+
}
|
196
|
+
attributeChangedCallback(t, e, s) {
|
197
|
+
this._$AK(t, s);
|
198
|
+
}
|
199
|
+
_$EO(t, e) {
|
200
|
+
var o;
|
201
|
+
const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
|
202
|
+
if (i !== void 0 && s.reflect === !0) {
|
203
|
+
const n = (((o = s.converter) == null ? void 0 : o.toAttribute) !== void 0 ? s.converter : F).toAttribute(e, s.type);
|
204
|
+
this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
|
205
|
+
}
|
206
|
+
}
|
207
|
+
_$AK(t, e) {
|
208
|
+
var o;
|
209
|
+
const s = this.constructor, i = s._$Eh.get(t);
|
210
|
+
if (i !== void 0 && this._$Em !== i) {
|
211
|
+
const n = s.getPropertyOptions(i), h = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((o = n.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? n.converter : F;
|
212
|
+
this._$Em = i, this[i] = h.fromAttribute(e, n.type), this._$Em = null;
|
213
|
+
}
|
214
|
+
}
|
215
|
+
requestUpdate(t, e, s, i = !1, o) {
|
216
|
+
if (t !== void 0) {
|
217
|
+
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? st)(i ? o : this[t], e))
|
218
|
+
return;
|
219
|
+
this.C(t, e, s);
|
220
|
+
}
|
221
|
+
this.isUpdatePending === !1 && (this._$Eg = this._$EP());
|
222
|
+
}
|
223
|
+
C(t, e, s) {
|
224
|
+
this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
225
|
+
}
|
226
|
+
async _$EP() {
|
227
|
+
this.isUpdatePending = !0;
|
228
|
+
try {
|
229
|
+
await this._$Eg;
|
230
|
+
} catch (e) {
|
231
|
+
Promise.reject(e);
|
232
|
+
}
|
233
|
+
const t = this.scheduleUpdate();
|
234
|
+
return t != null && await t, !this.isUpdatePending;
|
235
|
+
}
|
236
|
+
scheduleUpdate() {
|
237
|
+
return this.performUpdate();
|
238
|
+
}
|
239
|
+
performUpdate() {
|
240
|
+
var s;
|
241
|
+
if (!this.isUpdatePending)
|
242
|
+
return;
|
243
|
+
if (!this.hasUpdated) {
|
244
|
+
if (this._$Ep) {
|
245
|
+
for (const [o, n] of this._$Ep)
|
246
|
+
this[o] = n;
|
247
|
+
this._$Ep = void 0;
|
248
|
+
}
|
249
|
+
const i = this.constructor.elementProperties;
|
250
|
+
if (i.size > 0)
|
251
|
+
for (const [o, n] of i)
|
252
|
+
n.wrapped !== !0 || this._$AL.has(o) || this[o] === void 0 || this.C(o, this[o], n);
|
253
|
+
}
|
254
|
+
let t = !1;
|
255
|
+
const e = this._$AL;
|
256
|
+
try {
|
257
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$ES) == null || s.forEach((i) => {
|
258
|
+
var o;
|
259
|
+
return (o = i.hostUpdate) == null ? void 0 : o.call(i);
|
260
|
+
}), this.update(e)) : this._$ET();
|
261
|
+
} catch (i) {
|
262
|
+
throw t = !1, this._$ET(), i;
|
263
|
+
}
|
264
|
+
t && this._$AE(e);
|
265
|
+
}
|
266
|
+
willUpdate(t) {
|
267
|
+
}
|
268
|
+
_$AE(t) {
|
269
|
+
var e;
|
270
|
+
(e = this._$ES) == null || e.forEach((s) => {
|
271
|
+
var i;
|
272
|
+
return (i = s.hostUpdated) == null ? void 0 : i.call(s);
|
273
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
274
|
+
}
|
275
|
+
_$ET() {
|
276
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
277
|
+
}
|
278
|
+
get updateComplete() {
|
279
|
+
return this.getUpdateComplete();
|
280
|
+
}
|
281
|
+
getUpdateComplete() {
|
282
|
+
return this._$Eg;
|
283
|
+
}
|
284
|
+
shouldUpdate(t) {
|
285
|
+
return !0;
|
286
|
+
}
|
287
|
+
update(t) {
|
288
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
|
289
|
+
}
|
290
|
+
updated(t) {
|
291
|
+
}
|
292
|
+
firstUpdated(t) {
|
293
|
+
}
|
294
|
+
};
|
295
|
+
E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[k("elementProperties")] = /* @__PURE__ */ new Map(), E[k("finalized")] = /* @__PURE__ */ new Map(), q == null || q({ ReactiveElement: E }), (y.reactiveElementVersions ?? (y.reactiveElementVersions = [])).push("2.0.1");
|
296
|
+
/**
|
297
|
+
* @license
|
298
|
+
* Copyright 2017 Google LLC
|
299
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
300
|
+
*/
|
301
|
+
const N = globalThis, W = N.trustedTypes, pt = W ? W.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Et = "$lit$", $ = `lit$${(Math.random() + "").slice(9)}$`, St = "?" + $, Kt = `<${St}>`, x = document, R = () => x.createComment(""), M = (r) => r === null || typeof r != "object" && typeof r != "function", Pt = Array.isArray, Xt = (r) => Pt(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", Y = `[
|
302
|
+
\f\r]`, T = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ut = /-->/g, gt = />/g, _ = RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^
|
303
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ft = /'/g, mt = /"/g, Ot = /^(?:script|style|textarea|title)$/i, Jt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), A = Jt(1), C = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), $t = /* @__PURE__ */ new WeakMap(), w = x.createTreeWalker(x, 129);
|
304
|
+
function Tt(r, t) {
|
305
|
+
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
306
|
+
throw Error("invalid template strings array");
|
307
|
+
return pt !== void 0 ? pt.createHTML(t) : t;
|
308
|
+
}
|
309
|
+
const Zt = (r, t) => {
|
310
|
+
const e = r.length - 1, s = [];
|
311
|
+
let i, o = t === 2 ? "<svg>" : "", n = T;
|
312
|
+
for (let h = 0; h < e; h++) {
|
313
|
+
const a = r[h];
|
314
|
+
let l, c, d = -1, u = 0;
|
315
|
+
for (; u < a.length && (n.lastIndex = u, c = n.exec(a), c !== null); )
|
316
|
+
u = n.lastIndex, n === T ? c[1] === "!--" ? n = ut : c[1] !== void 0 ? n = gt : c[2] !== void 0 ? (Ot.test(c[2]) && (i = RegExp("</" + c[2], "g")), n = _) : c[3] !== void 0 && (n = _) : n === _ ? c[0] === ">" ? (n = i ?? T, d = -1) : c[1] === void 0 ? d = -2 : (d = n.lastIndex - c[2].length, l = c[1], n = c[3] === void 0 ? _ : c[3] === '"' ? mt : ft) : n === mt || n === ft ? n = _ : n === ut || n === gt ? n = T : (n = _, i = void 0);
|
317
|
+
const m = n === _ && r[h + 1].startsWith("/>") ? " " : "";
|
318
|
+
o += n === T ? a + Kt : d >= 0 ? (s.push(l), a.slice(0, d) + Et + a.slice(d) + $ + m) : a + $ + (d === -2 ? h : m);
|
319
|
+
}
|
320
|
+
return [Tt(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
|
321
|
+
};
|
322
|
+
class H {
|
323
|
+
constructor({ strings: t, _$litType$: e }, s) {
|
324
|
+
let i;
|
325
|
+
this.parts = [];
|
326
|
+
let o = 0, n = 0;
|
327
|
+
const h = t.length - 1, a = this.parts, [l, c] = Zt(t, e);
|
328
|
+
if (this.el = H.createElement(l, s), w.currentNode = this.el.content, e === 2) {
|
329
|
+
const d = this.el.content.firstChild;
|
330
|
+
d.replaceWith(...d.childNodes);
|
331
|
+
}
|
332
|
+
for (; (i = w.nextNode()) !== null && a.length < h; ) {
|
333
|
+
if (i.nodeType === 1) {
|
334
|
+
if (i.hasAttributes())
|
335
|
+
for (const d of i.getAttributeNames())
|
336
|
+
if (d.endsWith(Et)) {
|
337
|
+
const u = c[n++], m = i.getAttribute(d).split($), z = /([.?@])?(.*)/.exec(u);
|
338
|
+
a.push({ type: 1, index: o, name: z[2], strings: m, ctor: z[1] === "." ? te : z[1] === "?" ? ee : z[1] === "@" ? se : V }), i.removeAttribute(d);
|
339
|
+
} else
|
340
|
+
d.startsWith($) && (a.push({ type: 6, index: o }), i.removeAttribute(d));
|
341
|
+
if (Ot.test(i.tagName)) {
|
342
|
+
const d = i.textContent.split($), u = d.length - 1;
|
343
|
+
if (u > 0) {
|
344
|
+
i.textContent = W ? W.emptyScript : "";
|
345
|
+
for (let m = 0; m < u; m++)
|
346
|
+
i.append(d[m], R()), w.nextNode(), a.push({ type: 2, index: ++o });
|
347
|
+
i.append(d[u], R());
|
348
|
+
}
|
349
|
+
}
|
350
|
+
} else if (i.nodeType === 8)
|
351
|
+
if (i.data === St)
|
352
|
+
a.push({ type: 2, index: o });
|
353
|
+
else {
|
354
|
+
let d = -1;
|
355
|
+
for (; (d = i.data.indexOf($, d + 1)) !== -1; )
|
356
|
+
a.push({ type: 7, index: o }), d += $.length - 1;
|
357
|
+
}
|
358
|
+
o++;
|
359
|
+
}
|
360
|
+
}
|
361
|
+
static createElement(t, e) {
|
362
|
+
const s = x.createElement("template");
|
363
|
+
return s.innerHTML = t, s;
|
364
|
+
}
|
365
|
+
}
|
366
|
+
function S(r, t, e = r, s) {
|
367
|
+
var n, h;
|
368
|
+
if (t === C)
|
369
|
+
return t;
|
370
|
+
let i = s !== void 0 ? (n = e._$Co) == null ? void 0 : n[s] : e._$Cl;
|
371
|
+
const o = M(t) ? void 0 : t._$litDirective$;
|
372
|
+
return (i == null ? void 0 : i.constructor) !== o && ((h = i == null ? void 0 : i._$AO) == null || h.call(i, !1), o === void 0 ? i = void 0 : (i = new o(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = S(r, i._$AS(r, t.values), i, s)), t;
|
373
|
+
}
|
374
|
+
class Qt {
|
375
|
+
constructor(t, e) {
|
376
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
377
|
+
}
|
378
|
+
get parentNode() {
|
379
|
+
return this._$AM.parentNode;
|
380
|
+
}
|
381
|
+
get _$AU() {
|
382
|
+
return this._$AM._$AU;
|
383
|
+
}
|
384
|
+
u(t) {
|
385
|
+
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? x).importNode(e, !0);
|
386
|
+
w.currentNode = i;
|
387
|
+
let o = w.nextNode(), n = 0, h = 0, a = s[0];
|
388
|
+
for (; a !== void 0; ) {
|
389
|
+
if (n === a.index) {
|
390
|
+
let l;
|
391
|
+
a.type === 2 ? l = new j(o, o.nextSibling, this, t) : a.type === 1 ? l = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (l = new ie(o, this, t)), this._$AV.push(l), a = s[++h];
|
392
|
+
}
|
393
|
+
n !== (a == null ? void 0 : a.index) && (o = w.nextNode(), n++);
|
394
|
+
}
|
395
|
+
return w.currentNode = x, i;
|
396
|
+
}
|
397
|
+
p(t) {
|
398
|
+
let e = 0;
|
399
|
+
for (const s of this._$AV)
|
400
|
+
s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
401
|
+
}
|
402
|
+
}
|
403
|
+
class j {
|
404
|
+
get _$AU() {
|
405
|
+
var t;
|
406
|
+
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
407
|
+
}
|
408
|
+
constructor(t, e, s, i) {
|
409
|
+
this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
|
410
|
+
}
|
411
|
+
get parentNode() {
|
412
|
+
let t = this._$AA.parentNode;
|
413
|
+
const e = this._$AM;
|
414
|
+
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
415
|
+
}
|
416
|
+
get startNode() {
|
417
|
+
return this._$AA;
|
418
|
+
}
|
419
|
+
get endNode() {
|
420
|
+
return this._$AB;
|
421
|
+
}
|
422
|
+
_$AI(t, e = this) {
|
423
|
+
t = S(this, t, e), M(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== C && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Xt(t) ? this.T(t) : this._(t);
|
424
|
+
}
|
425
|
+
k(t) {
|
426
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
427
|
+
}
|
428
|
+
$(t) {
|
429
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
430
|
+
}
|
431
|
+
_(t) {
|
432
|
+
this._$AH !== p && M(this._$AH) ? this._$AA.nextSibling.data = t : this.$(x.createTextNode(t)), this._$AH = t;
|
433
|
+
}
|
434
|
+
g(t) {
|
435
|
+
var o;
|
436
|
+
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = H.createElement(Tt(s.h, s.h[0]), this.options)), s);
|
437
|
+
if (((o = this._$AH) == null ? void 0 : o._$AD) === i)
|
438
|
+
this._$AH.p(e);
|
439
|
+
else {
|
440
|
+
const n = new Qt(i, this), h = n.u(this.options);
|
441
|
+
n.p(e), this.$(h), this._$AH = n;
|
442
|
+
}
|
443
|
+
}
|
444
|
+
_$AC(t) {
|
445
|
+
let e = $t.get(t.strings);
|
446
|
+
return e === void 0 && $t.set(t.strings, e = new H(t)), e;
|
447
|
+
}
|
448
|
+
T(t) {
|
449
|
+
Pt(this._$AH) || (this._$AH = [], this._$AR());
|
450
|
+
const e = this._$AH;
|
451
|
+
let s, i = 0;
|
452
|
+
for (const o of t)
|
453
|
+
i === e.length ? e.push(s = new j(this.k(R()), this.k(R()), this, this.options)) : s = e[i], s._$AI(o), i++;
|
454
|
+
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
|
455
|
+
}
|
456
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
457
|
+
var s;
|
458
|
+
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
459
|
+
const i = t.nextSibling;
|
460
|
+
t.remove(), t = i;
|
461
|
+
}
|
462
|
+
}
|
463
|
+
setConnected(t) {
|
464
|
+
var e;
|
465
|
+
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
466
|
+
}
|
467
|
+
}
|
468
|
+
class V {
|
469
|
+
get tagName() {
|
470
|
+
return this.element.tagName;
|
471
|
+
}
|
472
|
+
get _$AU() {
|
473
|
+
return this._$AM._$AU;
|
474
|
+
}
|
475
|
+
constructor(t, e, s, i, o) {
|
476
|
+
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = p;
|
477
|
+
}
|
478
|
+
_$AI(t, e = this, s, i) {
|
479
|
+
const o = this.strings;
|
480
|
+
let n = !1;
|
481
|
+
if (o === void 0)
|
482
|
+
t = S(this, t, e, 0), n = !M(t) || t !== this._$AH && t !== C, n && (this._$AH = t);
|
483
|
+
else {
|
484
|
+
const h = t;
|
485
|
+
let a, l;
|
486
|
+
for (t = o[0], a = 0; a < o.length - 1; a++)
|
487
|
+
l = S(this, h[s + a], e, a), l === C && (l = this._$AH[a]), n || (n = !M(l) || l !== this._$AH[a]), l === p ? t = p : t !== p && (t += (l ?? "") + o[a + 1]), this._$AH[a] = l;
|
488
|
+
}
|
489
|
+
n && !i && this.O(t);
|
490
|
+
}
|
491
|
+
O(t) {
|
492
|
+
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
493
|
+
}
|
494
|
+
}
|
495
|
+
class te extends V {
|
496
|
+
constructor() {
|
497
|
+
super(...arguments), this.type = 3;
|
498
|
+
}
|
499
|
+
O(t) {
|
500
|
+
this.element[this.name] = t === p ? void 0 : t;
|
501
|
+
}
|
502
|
+
}
|
503
|
+
class ee extends V {
|
504
|
+
constructor() {
|
505
|
+
super(...arguments), this.type = 4;
|
506
|
+
}
|
507
|
+
O(t) {
|
508
|
+
this.element.toggleAttribute(this.name, !!t && t !== p);
|
509
|
+
}
|
510
|
+
}
|
511
|
+
class se extends V {
|
512
|
+
constructor(t, e, s, i, o) {
|
513
|
+
super(t, e, s, i, o), this.type = 5;
|
514
|
+
}
|
515
|
+
_$AI(t, e = this) {
|
516
|
+
if ((t = S(this, t, e, 0) ?? p) === C)
|
517
|
+
return;
|
518
|
+
const s = this._$AH, i = t === p && s !== p || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== p && (s === p || i);
|
519
|
+
i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
520
|
+
}
|
521
|
+
handleEvent(t) {
|
522
|
+
var e;
|
523
|
+
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
524
|
+
}
|
525
|
+
}
|
526
|
+
class ie {
|
527
|
+
constructor(t, e, s) {
|
528
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
529
|
+
}
|
530
|
+
get _$AU() {
|
531
|
+
return this._$AM._$AU;
|
532
|
+
}
|
533
|
+
_$AI(t) {
|
534
|
+
S(this, t);
|
535
|
+
}
|
536
|
+
}
|
537
|
+
const K = N.litHtmlPolyfillSupport;
|
538
|
+
K == null || K(H, j), (N.litHtmlVersions ?? (N.litHtmlVersions = [])).push("3.0.2");
|
539
|
+
const re = (r, t, e) => {
|
540
|
+
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
541
|
+
let i = s._$litPart$;
|
542
|
+
if (i === void 0) {
|
543
|
+
const o = (e == null ? void 0 : e.renderBefore) ?? null;
|
544
|
+
s._$litPart$ = i = new j(t.insertBefore(R(), o), o, void 0, e ?? {});
|
545
|
+
}
|
546
|
+
return i._$AI(r), i;
|
547
|
+
};
|
548
|
+
/**
|
549
|
+
* @license
|
550
|
+
* Copyright 2017 Google LLC
|
551
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
552
|
+
*/
|
553
|
+
let f = class extends E {
|
554
|
+
constructor() {
|
555
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
556
|
+
}
|
557
|
+
createRenderRoot() {
|
558
|
+
var e;
|
559
|
+
const t = super.createRenderRoot();
|
560
|
+
return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
|
561
|
+
}
|
562
|
+
update(t) {
|
563
|
+
const e = this.render();
|
564
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = re(e, this.renderRoot, this.renderOptions);
|
565
|
+
}
|
566
|
+
connectedCallback() {
|
567
|
+
var t;
|
568
|
+
super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
|
569
|
+
}
|
570
|
+
disconnectedCallback() {
|
571
|
+
var t;
|
572
|
+
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
573
|
+
}
|
574
|
+
render() {
|
575
|
+
return C;
|
576
|
+
}
|
577
|
+
};
|
578
|
+
var xt;
|
579
|
+
f._$litElement$ = !0, f.finalized = !0, (xt = globalThis.litElementHydrateSupport) == null || xt.call(globalThis, { LitElement: f });
|
580
|
+
const X = globalThis.litElementPolyfillSupport;
|
581
|
+
X == null || X({ LitElement: f });
|
582
|
+
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
|
583
|
+
/**
|
584
|
+
* @license
|
585
|
+
* Copyright 2021 Google LLC
|
586
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
587
|
+
*/
|
588
|
+
function* kt(r, t) {
|
589
|
+
if (r !== void 0) {
|
590
|
+
let e = 0;
|
591
|
+
for (const s of r)
|
592
|
+
yield t(s, e++);
|
593
|
+
}
|
594
|
+
}
|
595
|
+
/**
|
596
|
+
* @license
|
597
|
+
* Copyright 2017 Google LLC
|
598
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
599
|
+
*/
|
600
|
+
const it = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, rt = (r) => (...t) => ({ _$litDirective$: r, values: t });
|
601
|
+
let Nt = class {
|
602
|
+
constructor(t) {
|
603
|
+
}
|
604
|
+
get _$AU() {
|
605
|
+
return this._$AM._$AU;
|
606
|
+
}
|
607
|
+
_$AT(t, e, s) {
|
608
|
+
this._$Ct = t, this._$AM = e, this._$Ci = s;
|
609
|
+
}
|
610
|
+
_$AS(t, e) {
|
611
|
+
return this.update(t, e);
|
612
|
+
}
|
613
|
+
update(t, e) {
|
614
|
+
return this.render(...e);
|
615
|
+
}
|
616
|
+
};
|
617
|
+
/**
|
618
|
+
* @license
|
619
|
+
* Copyright 2020 Google LLC
|
620
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
621
|
+
*/
|
622
|
+
const oe = (r) => r.strings === void 0;
|
623
|
+
/**
|
624
|
+
* @license
|
625
|
+
* Copyright 2017 Google LLC
|
626
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
627
|
+
*/
|
628
|
+
const U = (r, t) => {
|
629
|
+
var s;
|
630
|
+
const e = r._$AN;
|
631
|
+
if (e === void 0)
|
632
|
+
return !1;
|
633
|
+
for (const i of e)
|
634
|
+
(s = i._$AO) == null || s.call(i, t, !1), U(i, t);
|
635
|
+
return !0;
|
636
|
+
}, G = (r) => {
|
637
|
+
let t, e;
|
638
|
+
do {
|
639
|
+
if ((t = r._$AM) === void 0)
|
640
|
+
break;
|
641
|
+
e = t._$AN, e.delete(r), r = t;
|
642
|
+
} while ((e == null ? void 0 : e.size) === 0);
|
643
|
+
}, Ut = (r) => {
|
644
|
+
for (let t; t = r._$AM; r = t) {
|
645
|
+
let e = t._$AN;
|
646
|
+
if (e === void 0)
|
647
|
+
t._$AN = e = /* @__PURE__ */ new Set();
|
648
|
+
else if (e.has(r))
|
649
|
+
break;
|
650
|
+
e.add(r), he(t);
|
651
|
+
}
|
652
|
+
};
|
653
|
+
function ne(r) {
|
654
|
+
this._$AN !== void 0 ? (G(this), this._$AM = r, Ut(this)) : this._$AM = r;
|
655
|
+
}
|
656
|
+
function ae(r, t = !1, e = 0) {
|
657
|
+
const s = this._$AH, i = this._$AN;
|
658
|
+
if (i !== void 0 && i.size !== 0)
|
659
|
+
if (t)
|
660
|
+
if (Array.isArray(s))
|
661
|
+
for (let o = e; o < s.length; o++)
|
662
|
+
U(s[o], !1), G(s[o]);
|
663
|
+
else
|
664
|
+
s != null && (U(s, !1), G(s));
|
665
|
+
else
|
666
|
+
U(this, r);
|
667
|
+
}
|
668
|
+
const he = (r) => {
|
669
|
+
r.type == it.CHILD && (r._$AP ?? (r._$AP = ae), r._$AQ ?? (r._$AQ = ne));
|
670
|
+
};
|
671
|
+
class Rt extends Nt {
|
672
|
+
constructor() {
|
673
|
+
super(...arguments), this._$AN = void 0;
|
674
|
+
}
|
675
|
+
_$AT(t, e, s) {
|
676
|
+
super._$AT(t, e, s), Ut(this), this.isConnected = t._$AU;
|
677
|
+
}
|
678
|
+
_$AO(t, e = !0) {
|
679
|
+
var s, i;
|
680
|
+
t !== this.isConnected && (this.isConnected = t, t ? (s = this.reconnected) == null || s.call(this) : (i = this.disconnected) == null || i.call(this)), e && (U(this, t), G(this));
|
681
|
+
}
|
682
|
+
setValue(t) {
|
683
|
+
if (oe(this._$Ct))
|
684
|
+
this._$Ct._$AI(t, this);
|
685
|
+
else {
|
686
|
+
const e = [...this._$Ct._$AH];
|
687
|
+
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
688
|
+
}
|
689
|
+
}
|
690
|
+
disconnected() {
|
691
|
+
}
|
692
|
+
reconnected() {
|
693
|
+
}
|
694
|
+
}
|
695
|
+
const le = /* @__PURE__ */ new WeakMap();
|
696
|
+
let yt = 0;
|
697
|
+
const J = /* @__PURE__ */ new Map(), vt = /* @__PURE__ */ new WeakSet(), _t = () => new Promise((r) => requestAnimationFrame(r)), ce = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], bt = (r, t) => {
|
698
|
+
const e = r - t;
|
699
|
+
return e === 0 ? void 0 : e;
|
700
|
+
}, At = (r, t) => {
|
701
|
+
const e = r / t;
|
702
|
+
return e === 1 ? void 0 : e;
|
703
|
+
}, Z = { left: (r, t) => {
|
704
|
+
const e = bt(r, t);
|
705
|
+
return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateX(${e}px)` };
|
706
|
+
}, top: (r, t) => {
|
707
|
+
const e = bt(r, t);
|
708
|
+
return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateY(${e}px)` };
|
709
|
+
}, width: (r, t) => {
|
710
|
+
let e;
|
711
|
+
t === 0 && (t = 1, e = { width: "1px" });
|
712
|
+
const s = At(r, t);
|
713
|
+
return { value: s, overrideFrom: e, transform: s == null || isNaN(s) ? void 0 : `scaleX(${s})` };
|
714
|
+
}, height: (r, t) => {
|
715
|
+
let e;
|
716
|
+
t === 0 && (t = 1, e = { height: "1px" });
|
717
|
+
const s = At(r, t);
|
718
|
+
return { value: s, overrideFrom: e, transform: s == null || isNaN(s) ? void 0 : `scaleY(${s})` };
|
719
|
+
} }, de = { duration: 333, easing: "ease-in-out" }, pe = ["left", "top", "width", "height", "opacity", "color", "background"], wt = /* @__PURE__ */ new WeakMap();
|
720
|
+
class ue extends Rt {
|
721
|
+
constructor(t) {
|
722
|
+
if (super(t), this.t = null, this.i = null, this.o = !0, this.shouldLog = !1, t.type === it.CHILD)
|
723
|
+
throw Error("The `animate` directive must be used in attribute position.");
|
724
|
+
this.createFinished();
|
725
|
+
}
|
726
|
+
createFinished() {
|
727
|
+
var t;
|
728
|
+
(t = this.resolveFinished) == null || t.call(this), this.finished = new Promise((e) => {
|
729
|
+
this.h = e;
|
730
|
+
});
|
731
|
+
}
|
732
|
+
async resolveFinished() {
|
733
|
+
var t;
|
734
|
+
(t = this.h) == null || t.call(this), this.h = void 0;
|
735
|
+
}
|
736
|
+
render(t) {
|
737
|
+
return p;
|
738
|
+
}
|
739
|
+
getController() {
|
740
|
+
return le.get(this.l);
|
741
|
+
}
|
742
|
+
isDisabled() {
|
743
|
+
var t;
|
744
|
+
return this.options.disabled || ((t = this.getController()) == null ? void 0 : t.disabled);
|
745
|
+
}
|
746
|
+
update(t, [e]) {
|
747
|
+
var i;
|
748
|
+
const s = this.l === void 0;
|
749
|
+
return s && (this.l = (i = t.options) == null ? void 0 : i.host, this.l.addController(this), this.element = t.element, wt.set(this.element, this)), this.optionsOrCallback = e, (s || typeof e != "function") && this.u(e), this.render(e);
|
750
|
+
}
|
751
|
+
u(t) {
|
752
|
+
t = t ?? {};
|
753
|
+
const e = this.getController();
|
754
|
+
e !== void 0 && ((t = { ...e.defaultOptions, ...t }).keyframeOptions = { ...e.defaultOptions.keyframeOptions, ...t.keyframeOptions }), t.properties ?? (t.properties = pe), this.options = t;
|
755
|
+
}
|
756
|
+
p() {
|
757
|
+
const t = {}, e = this.element.getBoundingClientRect(), s = getComputedStyle(this.element);
|
758
|
+
return this.options.properties.forEach((i) => {
|
759
|
+
const o = e[i] ?? (Z[i] ? void 0 : s[i]), n = Number(o);
|
760
|
+
t[i] = isNaN(n) ? o + "" : n;
|
761
|
+
}), t;
|
762
|
+
}
|
763
|
+
m() {
|
764
|
+
let t, e = !0;
|
765
|
+
return this.options.guard && (t = this.options.guard(), e = ((s, i) => {
|
766
|
+
if (Array.isArray(s)) {
|
767
|
+
if (Array.isArray(i) && i.length === s.length && s.every((o, n) => o === i[n]))
|
768
|
+
return !1;
|
769
|
+
} else if (i === s)
|
770
|
+
return !1;
|
771
|
+
return !0;
|
772
|
+
})(t, this.v)), this.o = this.l.hasUpdated && !this.isDisabled() && !this.isAnimating() && e && this.element.isConnected, this.o && (this.v = Array.isArray(t) ? Array.from(t) : t), this.o;
|
773
|
+
}
|
774
|
+
hostUpdate() {
|
775
|
+
typeof this.optionsOrCallback == "function" && this.u(this.optionsOrCallback()), this.m() && (this.g = this.p(), this.t = this.t ?? this.element.parentNode, this.i = this.element.nextSibling);
|
776
|
+
}
|
777
|
+
async hostUpdated() {
|
778
|
+
if (!this.o || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
|
779
|
+
return;
|
780
|
+
let t;
|
781
|
+
this.prepare(), await _t;
|
782
|
+
const e = this._(), s = this.A(this.options.keyframeOptions, e), i = this.p();
|
783
|
+
if (this.g !== void 0) {
|
784
|
+
const { from: o, to: n } = this.O(this.g, i, e);
|
785
|
+
this.log("measured", [this.g, i, o, n]), t = this.calculateKeyframes(o, n);
|
786
|
+
} else {
|
787
|
+
const o = J.get(this.options.inId);
|
788
|
+
if (o) {
|
789
|
+
J.delete(this.options.inId);
|
790
|
+
const { from: n, to: h } = this.O(o, i, e);
|
791
|
+
t = this.calculateKeyframes(n, h), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, yt++, t.forEach((a) => a.zIndex = yt);
|
792
|
+
} else
|
793
|
+
this.options.in && (t = [...this.options.in, {}]);
|
794
|
+
}
|
795
|
+
this.animate(t, s);
|
796
|
+
}
|
797
|
+
resetStyles() {
|
798
|
+
this.j !== void 0 && (this.element.setAttribute("style", this.j ?? ""), this.j = void 0);
|
799
|
+
}
|
800
|
+
commitStyles() {
|
801
|
+
var t, e;
|
802
|
+
this.j = this.element.getAttribute("style"), (t = this.webAnimation) == null || t.commitStyles(), (e = this.webAnimation) == null || e.cancel();
|
803
|
+
}
|
804
|
+
reconnected() {
|
805
|
+
}
|
806
|
+
async disconnected() {
|
807
|
+
var e;
|
808
|
+
if (!this.o || (this.options.id !== void 0 && J.set(this.options.id, this.g), this.options.out === void 0))
|
809
|
+
return;
|
810
|
+
if (this.prepare(), await _t(), (e = this.t) == null ? void 0 : e.isConnected) {
|
811
|
+
const s = this.i && this.i.parentNode === this.t ? this.i : null;
|
812
|
+
if (this.t.insertBefore(this.element, s), this.options.stabilizeOut) {
|
813
|
+
const i = this.p();
|
814
|
+
this.log("stabilizing out");
|
815
|
+
const o = this.g.left - i.left, n = this.g.top - i.top;
|
816
|
+
getComputedStyle(this.element).position !== "static" || o === 0 && n === 0 || (this.element.style.position = "relative"), o !== 0 && (this.element.style.left = o + "px"), n !== 0 && (this.element.style.top = n + "px");
|
817
|
+
}
|
818
|
+
}
|
819
|
+
const t = this.A(this.options.keyframeOptions);
|
820
|
+
await this.animate(this.options.out, t), this.element.remove();
|
821
|
+
}
|
822
|
+
prepare() {
|
823
|
+
this.createFinished();
|
824
|
+
}
|
825
|
+
start() {
|
826
|
+
var t, e;
|
827
|
+
(e = (t = this.options).onStart) == null || e.call(t, this);
|
828
|
+
}
|
829
|
+
didFinish(t) {
|
830
|
+
var e, s;
|
831
|
+
t && ((s = (e = this.options).onComplete) == null || s.call(e, this)), this.g = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
|
832
|
+
}
|
833
|
+
_() {
|
834
|
+
const t = [];
|
835
|
+
for (let e = this.element.parentNode; e; e = e == null ? void 0 : e.parentNode) {
|
836
|
+
const s = wt.get(e);
|
837
|
+
s && !s.isDisabled() && s && t.push(s);
|
838
|
+
}
|
839
|
+
return t;
|
840
|
+
}
|
841
|
+
get isHostRendered() {
|
842
|
+
const t = vt.has(this.l);
|
843
|
+
return t || this.l.updateComplete.then(() => {
|
844
|
+
vt.add(this.l);
|
845
|
+
}), t;
|
846
|
+
}
|
847
|
+
A(t, e = this._()) {
|
848
|
+
const s = { ...de };
|
849
|
+
return e.forEach((i) => Object.assign(s, i.options.keyframeOptions)), Object.assign(s, t), s;
|
850
|
+
}
|
851
|
+
O(t, e, s) {
|
852
|
+
t = { ...t }, e = { ...e };
|
853
|
+
const i = s.map((h) => h.animatingProperties).filter((h) => h !== void 0);
|
854
|
+
let o = 1, n = 1;
|
855
|
+
return i !== void 0 && (i.forEach((h) => {
|
856
|
+
h.width && (o /= h.width), h.height && (n /= h.height);
|
857
|
+
}), t.left !== void 0 && e.left !== void 0 && (t.left = o * t.left, e.left = o * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = n * t.top, e.top = n * e.top)), { from: t, to: e };
|
858
|
+
}
|
859
|
+
calculateKeyframes(t, e, s = !1) {
|
860
|
+
const i = {}, o = {};
|
861
|
+
let n = !1;
|
862
|
+
const h = {};
|
863
|
+
for (const a in e) {
|
864
|
+
const l = t[a], c = e[a];
|
865
|
+
if (a in Z) {
|
866
|
+
const d = Z[a];
|
867
|
+
if (l === void 0 || c === void 0)
|
868
|
+
continue;
|
869
|
+
const u = d(l, c);
|
870
|
+
u.transform !== void 0 && (h[a] = u.value, n = !0, i.transform = `${i.transform ?? ""} ${u.transform}`, u.overrideFrom !== void 0 && Object.assign(i, u.overrideFrom));
|
871
|
+
} else
|
872
|
+
l !== c && l !== void 0 && c !== void 0 && (n = !0, i[a] = l, o[a] = c);
|
873
|
+
}
|
874
|
+
return i.transformOrigin = o.transformOrigin = s ? "center center" : "top left", this.animatingProperties = h, n ? [i, o] : void 0;
|
875
|
+
}
|
876
|
+
async animate(t, e = this.options.keyframeOptions) {
|
877
|
+
this.start(), this.frames = t;
|
878
|
+
let s = !1;
|
879
|
+
if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t = this.options.onFrames(this), this.log("modified frames", t)), t !== void 0)) {
|
880
|
+
this.log("animate", [t, e]), s = !0, this.webAnimation = this.element.animate(t, e);
|
881
|
+
const i = this.getController();
|
882
|
+
i == null || i.add(this);
|
883
|
+
try {
|
884
|
+
await this.webAnimation.finished;
|
885
|
+
} catch {
|
886
|
+
}
|
887
|
+
i == null || i.remove(this);
|
888
|
+
}
|
889
|
+
return this.didFinish(s), s;
|
890
|
+
}
|
891
|
+
isAnimating() {
|
892
|
+
var t, e;
|
893
|
+
return ((t = this.webAnimation) == null ? void 0 : t.playState) === "running" || ((e = this.webAnimation) == null ? void 0 : e.pending);
|
894
|
+
}
|
895
|
+
log(t, e) {
|
896
|
+
this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, e);
|
897
|
+
}
|
898
|
+
}
|
899
|
+
const ge = rt(ue);
|
900
|
+
/**
|
901
|
+
* @license
|
902
|
+
* Copyright 2017 Google LLC
|
903
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
904
|
+
*/
|
905
|
+
const fe = { attribute: !0, type: String, converter: F, reflect: !1, hasChanged: st }, me = (r = fe, t, e) => {
|
906
|
+
const { kind: s, metadata: i } = e;
|
907
|
+
let o = globalThis.litPropertyMetadata.get(i);
|
908
|
+
if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), o.set(e.name, r), s === "accessor") {
|
909
|
+
const { name: n } = e;
|
910
|
+
return { set(h) {
|
911
|
+
const a = t.get.call(this);
|
912
|
+
t.set.call(this, h), this.requestUpdate(n, a, r);
|
913
|
+
}, init(h) {
|
914
|
+
return h !== void 0 && this.C(n, void 0, r), h;
|
915
|
+
} };
|
916
|
+
}
|
917
|
+
if (s === "setter") {
|
918
|
+
const { name: n } = e;
|
919
|
+
return function(h) {
|
920
|
+
const a = this[n];
|
921
|
+
t.call(this, h), this.requestUpdate(n, a, r);
|
922
|
+
};
|
923
|
+
}
|
924
|
+
throw Error("Unsupported decorator location: " + s);
|
925
|
+
};
|
926
|
+
function g(r) {
|
927
|
+
return (t, e) => typeof e == "object" ? me(r, t, e) : ((s, i, o) => {
|
928
|
+
const n = i.hasOwnProperty(o);
|
929
|
+
return i.constructor.createProperty(o, n ? { ...s, wrapped: !0 } : s), n ? Object.getOwnPropertyDescriptor(i, o) : void 0;
|
930
|
+
})(r, t, e);
|
931
|
+
}
|
932
|
+
/**
|
933
|
+
* @license
|
934
|
+
* Copyright 2017 Google LLC
|
935
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
936
|
+
*/
|
937
|
+
function O(r) {
|
938
|
+
return g({ ...r, state: !0, attribute: !1 });
|
939
|
+
}
|
940
|
+
/**
|
941
|
+
* @license
|
942
|
+
* Copyright 2018 Google LLC
|
943
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
944
|
+
*/
|
945
|
+
const $e = rt(class extends Nt {
|
946
|
+
constructor(r) {
|
947
|
+
var t;
|
948
|
+
if (super(r), r.type !== it.ATTRIBUTE || r.name !== "class" || ((t = r.strings) == null ? void 0 : t.length) > 2)
|
949
|
+
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
950
|
+
}
|
951
|
+
render(r) {
|
952
|
+
return " " + Object.keys(r).filter((t) => r[t]).join(" ") + " ";
|
953
|
+
}
|
954
|
+
update(r, [t]) {
|
955
|
+
var s, i;
|
956
|
+
if (this.it === void 0) {
|
957
|
+
this.it = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.st = new Set(r.strings.join(" ").split(/\s/).filter((o) => o !== "")));
|
958
|
+
for (const o in t)
|
959
|
+
t[o] && !((s = this.st) != null && s.has(o)) && this.it.add(o);
|
960
|
+
return this.render(t);
|
961
|
+
}
|
962
|
+
const e = r.element.classList;
|
963
|
+
for (const o of this.it)
|
964
|
+
o in t || (e.remove(o), this.it.delete(o));
|
965
|
+
for (const o in t) {
|
966
|
+
const n = !!t[o];
|
967
|
+
n === this.it.has(o) || (i = this.st) != null && i.has(o) || (n ? (e.add(o), this.it.add(o)) : (e.remove(o), this.it.delete(o)));
|
968
|
+
}
|
969
|
+
return C;
|
970
|
+
}
|
971
|
+
}), B = (r, t, e) => {
|
972
|
+
r && e.style.setProperty(t, r);
|
973
|
+
}, Mt = (r, t) => {
|
974
|
+
var e, s, i, o;
|
975
|
+
B((e = r.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), B(
|
976
|
+
(s = r.colors) == null ? void 0 : s.textOnPrimaryBackground,
|
977
|
+
"--text-on-primary-background",
|
978
|
+
t
|
979
|
+
), B(
|
980
|
+
(i = r.colors) == null ? void 0 : i.secondaryBackground,
|
981
|
+
"--secondary-background",
|
982
|
+
t
|
983
|
+
), B(
|
984
|
+
(o = r.colors) == null ? void 0 : o.textOnSecondaryBackground,
|
985
|
+
"--text-on-secondary-background",
|
986
|
+
t
|
987
|
+
);
|
988
|
+
};
|
989
|
+
/**
|
990
|
+
* @license
|
991
|
+
* Copyright 2020 Google LLC
|
992
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
993
|
+
*/
|
994
|
+
const Ht = () => new ye();
|
995
|
+
class ye {
|
996
|
+
}
|
997
|
+
const Q = /* @__PURE__ */ new WeakMap(), jt = rt(class extends Rt {
|
998
|
+
render(r) {
|
999
|
+
return p;
|
1000
|
+
}
|
1001
|
+
update(r, [t]) {
|
1002
|
+
var s;
|
1003
|
+
const e = t !== this.G;
|
1004
|
+
return e && this.G !== void 0 && this.ot(void 0), (e || this.rt !== this.lt) && (this.G = t, this.ct = (s = r.options) == null ? void 0 : s.host, this.ot(this.lt = r.element)), p;
|
1005
|
+
}
|
1006
|
+
ot(r) {
|
1007
|
+
if (typeof this.G == "function") {
|
1008
|
+
const t = this.ct ?? globalThis;
|
1009
|
+
let e = Q.get(t);
|
1010
|
+
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), Q.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ct, void 0), e.set(this.G, r), r !== void 0 && this.G.call(this.ct, r);
|
1011
|
+
} else
|
1012
|
+
this.G.value = r;
|
1013
|
+
}
|
1014
|
+
get rt() {
|
1015
|
+
var r, t;
|
1016
|
+
return typeof this.G == "function" ? (r = Q.get(this.ct ?? globalThis)) == null ? void 0 : r.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
1017
|
+
}
|
1018
|
+
disconnected() {
|
1019
|
+
this.rt === this.lt && this.ot(void 0);
|
1020
|
+
}
|
1021
|
+
reconnected() {
|
1022
|
+
this.ot(this.lt);
|
1023
|
+
}
|
1024
|
+
});
|
1025
|
+
var ve = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, L = (r, t, e, s) => {
|
1026
|
+
for (var i = s > 1 ? void 0 : s ? _e(t, e) : t, o = r.length - 1, n; o >= 0; o--)
|
1027
|
+
(n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
|
1028
|
+
return s && i && ve(t, e, i), i;
|
1029
|
+
};
|
1030
|
+
class v extends f {
|
1031
|
+
constructor() {
|
1032
|
+
super(...arguments), this.active = !1, this.loaded = !1, this.offset = 0, this.buttonRef = Ht();
|
1033
|
+
}
|
1034
|
+
async connectedCallback() {
|
1035
|
+
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding(), this.offset > 0 && this.buttonRef.value && (this.buttonRef.value.style.right = `calc(${this.offset}px + 20px)`);
|
1036
|
+
}
|
1037
|
+
_toggleActive() {
|
1038
|
+
var t;
|
1039
|
+
if (!((t = this.application) != null && t.root)) {
|
1040
|
+
console.warn(
|
1041
|
+
"Could not activate widget. No root element assigned to widget."
|
1042
|
+
);
|
1043
|
+
return;
|
1044
|
+
}
|
1045
|
+
this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.hide();
|
1046
|
+
}
|
1047
|
+
_applyBranding() {
|
1048
|
+
var t;
|
1049
|
+
(t = this.application) != null && t.settings && Mt(this.application.settings.branding, this);
|
1050
|
+
}
|
1051
|
+
async _renderSymbol() {
|
1052
|
+
var h, a, l;
|
1053
|
+
const t = (h = this.application) == null ? void 0 : h.branding(), e = (a = t == null ? void 0 : t.graphics) == null ? void 0 : a.trigger;
|
1054
|
+
if (e)
|
1055
|
+
return A` <img src=${e} class="trigger-icon" alt="" /> `;
|
1056
|
+
const s = (l = this.application) == null ? void 0 : l.triggerIcon;
|
1057
|
+
if (!s)
|
1058
|
+
return p;
|
1059
|
+
const i = async (c) => await import("./index-5087564d.mjs").then(
|
1060
|
+
(u) => u[c]
|
1061
|
+
), { type: o, content: n } = s;
|
1062
|
+
switch (o) {
|
1063
|
+
case "Telia": {
|
1064
|
+
const c = await i(n);
|
1065
|
+
return c ? A`<telia-icon
|
1066
|
+
class="trigger-icon"
|
1067
|
+
svg=${c.svg}
|
1068
|
+
size="lg"
|
1069
|
+
></telia-icon>` : p;
|
1070
|
+
}
|
1071
|
+
default:
|
1072
|
+
return p;
|
1073
|
+
}
|
1074
|
+
}
|
1075
|
+
setOffset(t) {
|
1076
|
+
this.offset = t;
|
1077
|
+
}
|
1078
|
+
render() {
|
1079
|
+
var t, e, s, i;
|
1080
|
+
return A`<div class="trigger-container">
|
1081
|
+
${!this.active && ((i = (s = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : s.other) != null && i.showButtonLabel) ? A`
|
1082
|
+
<button
|
1083
|
+
class="trigger-label"
|
1084
|
+
@click=${this._toggleActive}
|
1085
|
+
${ge({
|
1086
|
+
keyframeOptions: {},
|
1087
|
+
in: ce,
|
1088
|
+
stabilizeOut: !0,
|
1089
|
+
skipInitial: !1
|
1090
|
+
})}
|
1091
|
+
>
|
1092
|
+
${this.application.settings.branding.other.buttonLabelText}
|
1093
|
+
</button>
|
1094
|
+
` : p}
|
1095
|
+
|
1096
|
+
<button
|
1097
|
+
class=${$e({
|
1098
|
+
trigger: !0,
|
1099
|
+
active: this.active,
|
1100
|
+
rendered: this.loaded
|
1101
|
+
})}
|
1102
|
+
@click=${this._toggleActive}
|
1103
|
+
${jt(this.buttonRef)}
|
1104
|
+
>
|
1105
|
+
${this.icon}
|
1106
|
+
<span class="trigger-close">
|
1107
|
+
<svg
|
1108
|
+
width="18"
|
1109
|
+
height="9"
|
1110
|
+
viewBox="0 0 18 9"
|
1111
|
+
fill="none"
|
1112
|
+
xmlns="http://www.w3.org/2000/svg"
|
1113
|
+
>
|
1114
|
+
<path
|
1115
|
+
d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
|
1116
|
+
fill="white"
|
1117
|
+
/>
|
1118
|
+
</svg>
|
1119
|
+
</span>
|
1120
|
+
<span class="trigger-loader">
|
1121
|
+
<svg viewBox="25 25 50 50">
|
1122
|
+
<circle
|
1123
|
+
cx="50"
|
1124
|
+
cy="50"
|
1125
|
+
r="20"
|
1126
|
+
fill="none"
|
1127
|
+
stroke="#000"
|
1128
|
+
stroke-width="2"
|
1129
|
+
stroke-miterlimit="10"
|
1130
|
+
/>
|
1131
|
+
</svg>
|
1132
|
+
</span>
|
1133
|
+
</button>
|
1134
|
+
</div>`;
|
1135
|
+
}
|
1136
|
+
}
|
1137
|
+
v.styles = [
|
1138
|
+
P`
|
1139
|
+
:host {
|
1140
|
+
--voca-rem-multiplier: 0.625;
|
1141
|
+
--trigger-label-bg: #f5e0ff;
|
1142
|
+
--trigger-label-text-color: rgba(0, 0, 0, 0.8);
|
1143
|
+
display: block;
|
1144
|
+
box-sizing: border-box;
|
1145
|
+
/* font-family: var(--font-family); */
|
1146
|
+
font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
1147
|
+
}
|
1148
|
+
|
1149
|
+
.trigger-container {
|
1150
|
+
position: fixed;
|
1151
|
+
bottom: 20px;
|
1152
|
+
right: 20px;
|
1153
|
+
display: flex;
|
1154
|
+
align-items: center;
|
1155
|
+
gap: 1rem;
|
1156
|
+
}
|
1157
|
+
|
1158
|
+
.trigger {
|
1159
|
+
transform: scale(0);
|
1160
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
1161
|
+
z-index: 5;
|
1162
|
+
display: flex;
|
1163
|
+
align-items: center;
|
1164
|
+
justify-content: center;
|
1165
|
+
border: none;
|
1166
|
+
line-height: 55px;
|
1167
|
+
height: 55px;
|
1168
|
+
width: 55px;
|
1169
|
+
border-radius: 55px;
|
1170
|
+
cursor: pointer;
|
1171
|
+
background-color: var(--trigger-bg, var(--primary-background));
|
1172
|
+
font-family: Lato;
|
1173
|
+
text-decoration: none;
|
1174
|
+
border: 3px dashed transparent;
|
1175
|
+
box-sizing: border-box;
|
1176
|
+
transition: transform 200ms ease-out;
|
1177
|
+
}
|
1178
|
+
.trigger:active {
|
1179
|
+
transform: scale(0.8) !important;
|
1180
|
+
}
|
1181
|
+
.trigger:hover:not(:active) {
|
1182
|
+
transform: scale(1.1) !important;
|
1183
|
+
}
|
1184
|
+
.trigger.rendered {
|
1185
|
+
transform: scale(1);
|
1186
|
+
}
|
1187
|
+
.trigger.active .trigger-icon {
|
1188
|
+
opacity: 0;
|
1189
|
+
transform: rotate(-180deg) scale(0);
|
1190
|
+
}
|
1191
|
+
.trigger.active .trigger-close {
|
1192
|
+
opacity: 1;
|
1193
|
+
transform: rotate(0deg) scale(1);
|
1194
|
+
}
|
1195
|
+
|
1196
|
+
.trigger-icon {
|
1197
|
+
display: inline-block;
|
1198
|
+
line-height: inherit;
|
1199
|
+
text-align: center;
|
1200
|
+
opacity: 1;
|
1201
|
+
transform: rotate(0deg) scale(1);
|
1202
|
+
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
1203
|
+
color: var(--trigger-text-color, var(--text-on-primary-background));
|
1204
|
+
}
|
1205
|
+
.trigger-close {
|
1206
|
+
opacity: 0;
|
1207
|
+
transition: transform 200ms ease-out;
|
1208
|
+
transform: rotate(180deg) scale(0);
|
1209
|
+
position: absolute;
|
1210
|
+
top: 0;
|
1211
|
+
bottom: 0;
|
1212
|
+
left: 0;
|
1213
|
+
right: 0;
|
1214
|
+
display: flex;
|
1215
|
+
justify-content: center;
|
1216
|
+
align-items: center;
|
1217
|
+
fill: var(--trigger-text-color, var(--text-on-primary-background));
|
1218
|
+
}
|
1219
|
+
|
1220
|
+
img {
|
1221
|
+
max-width: 100%;
|
1222
|
+
}
|
1223
|
+
|
1224
|
+
.trigger-label {
|
1225
|
+
box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
|
1226
|
+
background-color: var(--trigger-label-bg);
|
1227
|
+
color: var(--trigger-label-text-color);
|
1228
|
+
white-space: nowrap;
|
1229
|
+
padding: 0.7rem 1rem;
|
1230
|
+
border-radius: 0.3rem;
|
1231
|
+
font-weight: 500;
|
1232
|
+
display: flex;
|
1233
|
+
justify-content: center;
|
1234
|
+
align-items: center;
|
1235
|
+
cursor: pointer;
|
1236
|
+
border: none;
|
1237
|
+
font-size: 1rem;
|
1238
|
+
font-family: inherit;
|
1239
|
+
transition: all 300ms ease-in-out;
|
1240
|
+
}
|
1241
|
+
|
1242
|
+
.trigger-label:hover {
|
1243
|
+
opacity: 0.8;
|
1244
|
+
}
|
1245
|
+
`
|
1246
|
+
];
|
1247
|
+
L([
|
1248
|
+
g({ attribute: !1 })
|
1249
|
+
], v.prototype, "application", 2);
|
1250
|
+
L([
|
1251
|
+
O()
|
1252
|
+
], v.prototype, "active", 2);
|
1253
|
+
L([
|
1254
|
+
O()
|
1255
|
+
], v.prototype, "loaded", 2);
|
1256
|
+
L([
|
1257
|
+
O()
|
1258
|
+
], v.prototype, "icon", 2);
|
1259
|
+
L([
|
1260
|
+
O()
|
1261
|
+
], v.prototype, "offset", 2);
|
1262
|
+
var be = Object.defineProperty, Ae = Object.getOwnPropertyDescriptor, b = (r, t, e, s) => {
|
1263
|
+
for (var i = s > 1 ? void 0 : s ? Ae(t, e) : t, o = r.length - 1, n; o >= 0; o--)
|
1264
|
+
(n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
|
1265
|
+
return s && i && be(t, e, i), i;
|
1266
|
+
};
|
1267
|
+
const Lt = (r) => {
|
1268
|
+
class t extends r {
|
1269
|
+
constructor() {
|
1270
|
+
super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
|
1271
|
+
}
|
1272
|
+
writeProperties(s) {
|
1273
|
+
this.properties = s;
|
1274
|
+
}
|
1275
|
+
writeLayout(s) {
|
1276
|
+
this.layout = s;
|
1277
|
+
}
|
1278
|
+
writeContext(s) {
|
1279
|
+
this.context = s;
|
1280
|
+
}
|
1281
|
+
addChild(s) {
|
1282
|
+
s.parent = this, this.nodes.push(s);
|
1283
|
+
}
|
1284
|
+
connectedCallback() {
|
1285
|
+
super.connectedCallback(), this.renderRoot.host.style.setProperty(
|
1286
|
+
"--width",
|
1287
|
+
this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
|
1288
|
+
);
|
1289
|
+
}
|
1290
|
+
}
|
1291
|
+
return t.styles = [
|
1292
|
+
// (superClass as unknown as typeof LitElement).styles ?? [],
|
1293
|
+
P`
|
1294
|
+
:host {
|
1295
|
+
font-family: var(--font-family);
|
1296
|
+
grid-column: span var(--width);
|
1297
|
+
max-width: 100%;
|
1298
|
+
overflow: hidden;
|
1299
|
+
box-sizing: border-box;
|
1300
|
+
display: block;
|
1301
|
+
}
|
1302
|
+
* {
|
1303
|
+
box-sizing: border-box;
|
1304
|
+
}
|
1305
|
+
`
|
1306
|
+
], b([
|
1307
|
+
g()
|
1308
|
+
], t.prototype, "properties", 2), b([
|
1309
|
+
g()
|
1310
|
+
], t.prototype, "context", 2), b([
|
1311
|
+
g()
|
1312
|
+
], t.prototype, "layout", 2), b([
|
1313
|
+
g()
|
1314
|
+
], t.prototype, "name", 2), b([
|
1315
|
+
g()
|
1316
|
+
], t.prototype, "type", 2), b([
|
1317
|
+
g({ attribute: !1 })
|
1318
|
+
], t.prototype, "application", 2), b([
|
1319
|
+
g({ attribute: !1 })
|
1320
|
+
], t.prototype, "parent", 2), t;
|
1321
|
+
};
|
1322
|
+
class Dt extends Lt(f) {
|
1323
|
+
render() {
|
1324
|
+
return A`Non resolved component`;
|
1325
|
+
}
|
1326
|
+
}
|
1327
|
+
Dt.styles = [
|
1328
|
+
P`
|
1329
|
+
:host {
|
1330
|
+
display: block;
|
1331
|
+
}
|
1332
|
+
`
|
1333
|
+
];
|
1334
|
+
var ot = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r))(ot || {}), we = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, Ce = (r, t, e, s) => {
|
1335
|
+
for (var i = s > 1 ? void 0 : s ? xe(t, e) : t, o = r.length - 1, n; o >= 0; o--)
|
1336
|
+
(n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
|
1337
|
+
return s && i && we(t, e, i), i;
|
1338
|
+
};
|
1339
|
+
class nt extends f {
|
1340
|
+
constructor() {
|
1341
|
+
super(...arguments), this.nodes = [], this.wrapperRef = Ht();
|
1342
|
+
}
|
1343
|
+
addChild(t) {
|
1344
|
+
t.parent = this, this.nodes.push(t);
|
1345
|
+
}
|
1346
|
+
applyBranding() {
|
1347
|
+
if (!this.wrapperRef.value)
|
1348
|
+
return;
|
1349
|
+
const t = this.application.settings;
|
1350
|
+
t != null && t.branding && Mt(t.branding, this.wrapperRef.value);
|
1351
|
+
}
|
1352
|
+
applyStyles() {
|
1353
|
+
if (!this.wrapperRef.value)
|
1354
|
+
return;
|
1355
|
+
const t = this.application.styles(), e = this.wrapperRef.value;
|
1356
|
+
Object.entries(t).forEach(([s, i]) => {
|
1357
|
+
e.style.setProperty(`--${s}`, i);
|
1358
|
+
});
|
1359
|
+
}
|
1360
|
+
firstUpdated(t) {
|
1361
|
+
this.applyBranding(), this.applyStyles();
|
1362
|
+
}
|
1363
|
+
render() {
|
1364
|
+
return this.application.renderStrategy === ot.Trigger && this.renderRoot.host.classList.add("floating"), A`<div class="widget-container" ${jt(this.wrapperRef)}>
|
1365
|
+
${kt(this.nodes, (t) => t)}
|
1366
|
+
</div>`;
|
1367
|
+
}
|
1368
|
+
}
|
1369
|
+
nt.styles = P`
|
1370
|
+
:host {
|
1371
|
+
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
1372
|
+
--spacing-xs: 0.2rem;
|
1373
|
+
--spacing-sm: 0.5rem;
|
1374
|
+
--spacing-md: 1rem;
|
1375
|
+
--spacing-lg: 1.2rem;
|
1376
|
+
--spacing-xl: 1.8rem;
|
1377
|
+
|
1378
|
+
--text-color: #222222;
|
1379
|
+
--link-color: #990ae3;
|
1380
|
+
--gray-color: #f3f3f8;
|
1381
|
+
--gray-dark-color: #a6a6a6;
|
1382
|
+
|
1383
|
+
--box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
1384
|
+
--border-radius: var(--spacing-sm);
|
1385
|
+
--border-radius-sm: var(--spacing-sm);
|
1386
|
+
--gap: var(--spacing-sm);
|
1387
|
+
}
|
1388
|
+
:host {
|
1389
|
+
--voca-rem-multiplier: 0.625;
|
1390
|
+
box-sizing: border-box;
|
1391
|
+
display: block;
|
1392
|
+
}
|
1393
|
+
|
1394
|
+
:host(.inline) {
|
1395
|
+
height: 100%;
|
1396
|
+
position: fixed;
|
1397
|
+
inset: 0 0 0 0;
|
1398
|
+
}
|
1399
|
+
|
1400
|
+
:host(.floating) {
|
1401
|
+
z-index: 6;
|
1402
|
+
position: fixed;
|
1403
|
+
}
|
1404
|
+
@media screen and (max-width: 800px) {
|
1405
|
+
:host(.floating) {
|
1406
|
+
inset: 0 0 95px 0;
|
1407
|
+
}
|
1408
|
+
}
|
1409
|
+
@media screen and (min-width: 801px) {
|
1410
|
+
:host(.floating) {
|
1411
|
+
inset: auto 20px 95px auto;
|
1412
|
+
max-height: calc(100vh - 120px);
|
1413
|
+
width: 400px;
|
1414
|
+
height: 700px;
|
1415
|
+
}
|
1416
|
+
}
|
1417
|
+
|
1418
|
+
:host(.floating) .widget-container {
|
1419
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
1420
|
+
border-radius: 0.7rem;
|
1421
|
+
}
|
1422
|
+
|
1423
|
+
* {
|
1424
|
+
box-sizing: border-box;
|
1425
|
+
}
|
1426
|
+
.widget-container {
|
1427
|
+
height: 100%;
|
1428
|
+
background-color: var(--primary-background);
|
1429
|
+
padding: var(--spacing-sm);
|
1430
|
+
border: var(--widget-border, none);
|
1431
|
+
}
|
1432
|
+
@keyframes slideDown {
|
1433
|
+
from {
|
1434
|
+
transform: translateY(0);
|
1435
|
+
opacity: 1;
|
1436
|
+
}
|
1437
|
+
to {
|
1438
|
+
transform: translateY(100%);
|
1439
|
+
opacity: 0;
|
1440
|
+
}
|
1441
|
+
}
|
1442
|
+
@keyframes slideUp {
|
1443
|
+
from {
|
1444
|
+
transform: translateY(100%);
|
1445
|
+
opacity: 0;
|
1446
|
+
}
|
1447
|
+
to {
|
1448
|
+
transform: translateY(0);
|
1449
|
+
opacity: 1;
|
1450
|
+
}
|
1451
|
+
}
|
1452
|
+
:host(.expanded) {
|
1453
|
+
opacity: 1;
|
1454
|
+
animation: slideUp 0.3s linear;
|
1455
|
+
}
|
1456
|
+
:host(.hidden) {
|
1457
|
+
opacity: 0;
|
1458
|
+
animation: slideDown 0.3s linear;
|
1459
|
+
}
|
1460
|
+
`;
|
1461
|
+
Ce([
|
1462
|
+
g({ attribute: !1 })
|
1463
|
+
], nt.prototype, "application", 2);
|
1464
|
+
var Ee = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, at = (r, t, e, s) => {
|
1465
|
+
for (var i = s > 1 ? void 0 : s ? Se(t, e) : t, o = r.length - 1, n; o >= 0; o--)
|
1466
|
+
(n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
|
1467
|
+
return s && i && Ee(t, e, i), i;
|
1468
|
+
};
|
1469
|
+
class D extends f {
|
1470
|
+
constructor() {
|
1471
|
+
super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
|
1472
|
+
}
|
1473
|
+
async connectedCallback() {
|
1474
|
+
super.connectedCallback(), await this.getGlobalEnvironment();
|
1475
|
+
}
|
1476
|
+
disconnectedCallback() {
|
1477
|
+
super.disconnectedCallback(), this.removeEventListener("environment-created", this.onEnvironmentCreated);
|
1478
|
+
}
|
1479
|
+
async onEnvironmentCreated(t) {
|
1480
|
+
this.widget = t.detail.widget, await this.activate(), this.requestUpdate();
|
1481
|
+
}
|
1482
|
+
async activate() {
|
1483
|
+
this.widget && (await this.widget.activate(), this.status = "activated");
|
1484
|
+
}
|
1485
|
+
async getGlobalEnvironment() {
|
1486
|
+
const t = globalThis.widgets;
|
1487
|
+
t && (this.widget = t.applications.find(
|
1488
|
+
(e) => e.name === this.name
|
1489
|
+
), await this.activate());
|
1490
|
+
}
|
1491
|
+
render() {
|
1492
|
+
if (!this.widget || this.status !== "activated")
|
1493
|
+
return p;
|
1494
|
+
if (this.widget.renderStrategy === ot.Trigger) {
|
1495
|
+
const t = new v();
|
1496
|
+
return t.application = this.widget, t;
|
1497
|
+
}
|
1498
|
+
return this.widget.render();
|
1499
|
+
}
|
1500
|
+
}
|
1501
|
+
D.styles = [
|
1502
|
+
P`
|
1503
|
+
:host {
|
1504
|
+
display: block;
|
1505
|
+
}
|
1506
|
+
`
|
1507
|
+
];
|
1508
|
+
at([
|
1509
|
+
g({ attribute: !0 })
|
1510
|
+
], D.prototype, "name", 2);
|
1511
|
+
at([
|
1512
|
+
O()
|
1513
|
+
], D.prototype, "widget", 2);
|
1514
|
+
at([
|
1515
|
+
O()
|
1516
|
+
], D.prototype, "status", 2);
|
1517
|
+
customElements.get("ace-trigger") || customElements.define("ace-trigger", v);
|
1518
|
+
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", Dt);
|
1519
|
+
customElements.get("ace-wrapper") || customElements.define("ace-wrapper", nt);
|
1520
|
+
customElements.get("ace-widget") || customElements.define("ace-widget", D);
|
1521
|
+
const Pe = (r) => {
|
1522
|
+
const t = {};
|
1523
|
+
return Object.keys(r).forEach((e) => {
|
1524
|
+
e.indexOf("css-") > -1 && (t[e] = r[e]);
|
1525
|
+
}), t;
|
1526
|
+
}, Oe = (r, t) => {
|
1527
|
+
const e = Pe(t);
|
1528
|
+
Object.entries(e).forEach(([s, i]) => {
|
1529
|
+
r.style.setProperty(s.replace("css-", ""), i);
|
1530
|
+
});
|
1531
|
+
};
|
1532
|
+
class Te extends Lt(f) {
|
1533
|
+
constructor() {
|
1534
|
+
super(...arguments), this.nodes = [];
|
1535
|
+
}
|
1536
|
+
render() {
|
1537
|
+
var t;
|
1538
|
+
return Oe(this.renderRoot.host, this.properties), this.renderRoot.host.style.setProperty(
|
1539
|
+
"--columns",
|
1540
|
+
((t = this.properties.columns) == null ? void 0 : t.toString()) || "1"
|
1541
|
+
), A`${kt(this.nodes, (e) => e)}`;
|
1542
|
+
}
|
1543
|
+
}
|
1544
|
+
Te.styles = [
|
1545
|
+
P`
|
1546
|
+
:host {
|
1547
|
+
height: 100%;
|
1548
|
+
display: grid;
|
1549
|
+
justify-content: center;
|
1550
|
+
grid-auto-rows: max-content;
|
1551
|
+
grid-template-rows: auto;
|
1552
|
+
grid-template-columns: repeat(var(--columns), 1fr);
|
1553
|
+
gap: var(--gap);
|
1554
|
+
}
|
1555
|
+
`
|
1556
|
+
];
|
1557
|
+
export {
|
1558
|
+
Te as Area,
|
1559
|
+
Te as default
|
1560
|
+
};
|