@telia-ace/widget-components-widget-header-flamingo 1.1.28 → 1.1.29

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.
@@ -0,0 +1,1576 @@
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, i) {
9
+ if (this._$cssResult$ = !0, i !== 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 i = e !== void 0 && e.length === 1;
18
+ i && (t = ht.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ht.set(e, t));
19
+ }
20
+ return t;
21
+ }
22
+ toString() {
23
+ return this.cssText;
24
+ }
25
+ };
26
+ const Dt = (r) => new Ct(typeof r == "string" ? r : r + "", void 0, et), O = (r, ...t) => {
27
+ const e = r.length === 1 ? r[0] : t.reduce((i, s, n) => i + ((o) => {
28
+ if (o._$cssResult$ === !0)
29
+ return o.cssText;
30
+ if (typeof o == "number")
31
+ return o;
32
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
33
+ })(s) + r[n + 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 i = document.createElement("style"), s = I.litNonce;
41
+ s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
42
+ }
43
+ }, lt = tt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
44
+ let e = "";
45
+ for (const i of t.cssRules)
46
+ e += i.cssText;
47
+ return Dt(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: Wt, getOwnPropertyDescriptor: Ft, getOwnPropertyNames: Gt, getOwnPropertySymbols: Vt, getPrototypeOf: qt } = Object, y = globalThis, ct = y.trustedTypes, Yt = ct ? ct.emptyScript : "", q = y.reactiveElementPolyfillSupport, k = (r, t) => r, W = { 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
+ } }, it = (r, t) => !It(r, t), dt = { attribute: !0, type: String, converter: W, reflect: !1, hasChanged: it };
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 i = Symbol(), s = this.getPropertyDescriptor(t, i, e);
94
+ s !== void 0 && Wt(this.prototype, t, s);
95
+ }
96
+ }
97
+ static getPropertyDescriptor(t, e, i) {
98
+ const { get: s, set: n } = Ft(this.prototype, t) ?? { get() {
99
+ return this[e];
100
+ }, set(o) {
101
+ this[e] = o;
102
+ } };
103
+ return { get() {
104
+ return s == null ? void 0 : s.call(this);
105
+ }, set(o) {
106
+ const h = s == null ? void 0 : s.call(this);
107
+ n.call(this, o), this.requestUpdate(t, h, i);
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, i = [...Gt(e), ...Vt(e)];
124
+ for (const s of i)
125
+ this.createProperty(s, e[s]);
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 [i, s] of e)
132
+ this.elementProperties.set(i, s);
133
+ }
134
+ this._$Eh = /* @__PURE__ */ new Map();
135
+ for (const [e, i] of this.elementProperties) {
136
+ const s = this._$Eu(e, i);
137
+ s !== void 0 && this._$Eh.set(s, e);
138
+ }
139
+ this.elementStyles = this.finalizeStyles(this.styles);
140
+ }
141
+ static finalizeStyles(t) {
142
+ const e = [];
143
+ if (Array.isArray(t)) {
144
+ const i = new Set(t.flat(1 / 0).reverse());
145
+ for (const s of i)
146
+ e.unshift(lt(s));
147
+ } else
148
+ t !== void 0 && e.push(lt(t));
149
+ return e;
150
+ }
151
+ static _$Eu(t, e) {
152
+ const i = e.attribute;
153
+ return i === !1 ? void 0 : typeof i == "string" ? i : 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 i of e.keys())
173
+ this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
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 i;
184
+ return (i = e.hostConnected) == null ? void 0 : i.call(e);
185
+ });
186
+ }
187
+ enableUpdating(t) {
188
+ }
189
+ disconnectedCallback() {
190
+ var t;
191
+ (t = this._$ES) == null || t.forEach((e) => {
192
+ var i;
193
+ return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
194
+ });
195
+ }
196
+ attributeChangedCallback(t, e, i) {
197
+ this._$AK(t, i);
198
+ }
199
+ _$EO(t, e) {
200
+ var n;
201
+ const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
202
+ if (s !== void 0 && i.reflect === !0) {
203
+ const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : W).toAttribute(e, i.type);
204
+ this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
205
+ }
206
+ }
207
+ _$AK(t, e) {
208
+ var n;
209
+ const i = this.constructor, s = i._$Eh.get(t);
210
+ if (s !== void 0 && this._$Em !== s) {
211
+ const o = i.getPropertyOptions(s), h = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : W;
212
+ this._$Em = s, this[s] = h.fromAttribute(e, o.type), this._$Em = null;
213
+ }
214
+ }
215
+ requestUpdate(t, e, i, s = !1, n) {
216
+ if (t !== void 0) {
217
+ if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? it)(s ? n : this[t], e))
218
+ return;
219
+ this.C(t, e, i);
220
+ }
221
+ this.isUpdatePending === !1 && (this._$Eg = this._$EP());
222
+ }
223
+ C(t, e, i) {
224
+ this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
225
+ }
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 i;
241
+ if (!this.isUpdatePending)
242
+ return;
243
+ if (!this.hasUpdated) {
244
+ if (this._$Ep) {
245
+ for (const [n, o] of this._$Ep)
246
+ this[n] = o;
247
+ this._$Ep = void 0;
248
+ }
249
+ const s = this.constructor.elementProperties;
250
+ if (s.size > 0)
251
+ for (const [n, o] of s)
252
+ o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.C(n, this[n], o);
253
+ }
254
+ let t = !1;
255
+ const e = this._$AL;
256
+ try {
257
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$ES) == null || i.forEach((s) => {
258
+ var n;
259
+ return (n = s.hostUpdate) == null ? void 0 : n.call(s);
260
+ }), this.update(e)) : this._$ET();
261
+ } catch (s) {
262
+ throw t = !1, this._$ET(), s;
263
+ }
264
+ t && this._$AE(e);
265
+ }
266
+ willUpdate(t) {
267
+ }
268
+ _$AE(t) {
269
+ var e;
270
+ (e = this._$ES) == null || e.forEach((i) => {
271
+ var s;
272
+ return (s = i.hostUpdated) == null ? void 0 : s.call(i);
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, F = N.trustedTypes, pt = F ? F.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Et = "$lit$", v = `lit$${(Math.random() + "").slice(9)}$`, St = "?" + v, Kt = `<${St}>`, x = document, R = () => x.createComment(""), H = (r) => r === null || typeof r != "object" && typeof r != "function", Ot = Array.isArray, Xt = (r) => Ot(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, b = RegExp(`>|${Y}(?:([^\\s"'>=/]+)(${Y}*=${Y}*(?:[^
303
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ft = /'/g, mt = /"/g, Pt = /^(?:script|style|textarea|title)$/i, Jt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), f = Jt(1), C = Symbol.for("lit-noChange"), l = 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, i = [];
311
+ let s, n = t === 2 ? "<svg>" : "", o = T;
312
+ for (let h = 0; h < e; h++) {
313
+ const a = r[h];
314
+ let c, d, p = -1, u = 0;
315
+ for (; u < a.length && (o.lastIndex = u, d = o.exec(a), d !== null); )
316
+ u = o.lastIndex, o === T ? d[1] === "!--" ? o = ut : d[1] !== void 0 ? o = gt : d[2] !== void 0 ? (Pt.test(d[2]) && (s = RegExp("</" + d[2], "g")), o = b) : d[3] !== void 0 && (o = b) : o === b ? d[0] === ">" ? (o = s ?? T, p = -1) : d[1] === void 0 ? p = -2 : (p = o.lastIndex - d[2].length, c = d[1], o = d[3] === void 0 ? b : d[3] === '"' ? mt : ft) : o === mt || o === ft ? o = b : o === ut || o === gt ? o = T : (o = b, s = void 0);
317
+ const $ = o === b && r[h + 1].startsWith("/>") ? " " : "";
318
+ n += o === T ? a + Kt : p >= 0 ? (i.push(c), a.slice(0, p) + Et + a.slice(p) + v + $) : a + v + (p === -2 ? h : $);
319
+ }
320
+ return [Tt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
321
+ };
322
+ class M {
323
+ constructor({ strings: t, _$litType$: e }, i) {
324
+ let s;
325
+ this.parts = [];
326
+ let n = 0, o = 0;
327
+ const h = t.length - 1, a = this.parts, [c, d] = Zt(t, e);
328
+ if (this.el = M.createElement(c, i), w.currentNode = this.el.content, e === 2) {
329
+ const p = this.el.content.firstChild;
330
+ p.replaceWith(...p.childNodes);
331
+ }
332
+ for (; (s = w.nextNode()) !== null && a.length < h; ) {
333
+ if (s.nodeType === 1) {
334
+ if (s.hasAttributes())
335
+ for (const p of s.getAttributeNames())
336
+ if (p.endsWith(Et)) {
337
+ const u = d[o++], $ = s.getAttribute(p).split(v), D = /([.?@])?(.*)/.exec(u);
338
+ a.push({ type: 1, index: n, name: D[2], strings: $, ctor: D[1] === "." ? te : D[1] === "?" ? ee : D[1] === "@" ? ie : V }), s.removeAttribute(p);
339
+ } else
340
+ p.startsWith(v) && (a.push({ type: 6, index: n }), s.removeAttribute(p));
341
+ if (Pt.test(s.tagName)) {
342
+ const p = s.textContent.split(v), u = p.length - 1;
343
+ if (u > 0) {
344
+ s.textContent = F ? F.emptyScript : "";
345
+ for (let $ = 0; $ < u; $++)
346
+ s.append(p[$], R()), w.nextNode(), a.push({ type: 2, index: ++n });
347
+ s.append(p[u], R());
348
+ }
349
+ }
350
+ } else if (s.nodeType === 8)
351
+ if (s.data === St)
352
+ a.push({ type: 2, index: n });
353
+ else {
354
+ let p = -1;
355
+ for (; (p = s.data.indexOf(v, p + 1)) !== -1; )
356
+ a.push({ type: 7, index: n }), p += v.length - 1;
357
+ }
358
+ n++;
359
+ }
360
+ }
361
+ static createElement(t, e) {
362
+ const i = x.createElement("template");
363
+ return i.innerHTML = t, i;
364
+ }
365
+ }
366
+ function S(r, t, e = r, i) {
367
+ var o, h;
368
+ if (t === C)
369
+ return t;
370
+ let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
371
+ const n = H(t) ? void 0 : t._$litDirective$;
372
+ return (s == null ? void 0 : s.constructor) !== n && ((h = s == null ? void 0 : s._$AO) == null || h.call(s, !1), n === void 0 ? s = void 0 : (s = new n(r), s._$AT(r, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = s : e._$Cl = s), s !== void 0 && (t = S(r, s._$AS(r, t.values), s, i)), 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: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? x).importNode(e, !0);
386
+ w.currentNode = s;
387
+ let n = w.nextNode(), o = 0, h = 0, a = i[0];
388
+ for (; a !== void 0; ) {
389
+ if (o === a.index) {
390
+ let c;
391
+ a.type === 2 ? c = new L(n, n.nextSibling, this, t) : a.type === 1 ? c = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (c = new se(n, this, t)), this._$AV.push(c), a = i[++h];
392
+ }
393
+ o !== (a == null ? void 0 : a.index) && (n = w.nextNode(), o++);
394
+ }
395
+ return w.currentNode = x, s;
396
+ }
397
+ p(t) {
398
+ let e = 0;
399
+ for (const i of this._$AV)
400
+ i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
401
+ }
402
+ }
403
+ class L {
404
+ get _$AU() {
405
+ var t;
406
+ return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
407
+ }
408
+ constructor(t, e, i, s) {
409
+ this.type = 2, this._$AH = l, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cv = (s == null ? void 0 : s.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), H(t) ? t === l || t == null || t === "" ? (this._$AH !== l && this._$AR(), this._$AH = l) : 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 !== l && H(this._$AH) ? this._$AA.nextSibling.data = t : this.$(x.createTextNode(t)), this._$AH = t;
433
+ }
434
+ g(t) {
435
+ var n;
436
+ const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = M.createElement(Tt(i.h, i.h[0]), this.options)), i);
437
+ if (((n = this._$AH) == null ? void 0 : n._$AD) === s)
438
+ this._$AH.p(e);
439
+ else {
440
+ const o = new Qt(s, this), h = o.u(this.options);
441
+ o.p(e), this.$(h), this._$AH = o;
442
+ }
443
+ }
444
+ _$AC(t) {
445
+ let e = $t.get(t.strings);
446
+ return e === void 0 && $t.set(t.strings, e = new M(t)), e;
447
+ }
448
+ T(t) {
449
+ Ot(this._$AH) || (this._$AH = [], this._$AR());
450
+ const e = this._$AH;
451
+ let i, s = 0;
452
+ for (const n of t)
453
+ s === e.length ? e.push(i = new L(this.k(R()), this.k(R()), this, this.options)) : i = e[s], i._$AI(n), s++;
454
+ s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
455
+ }
456
+ _$AR(t = this._$AA.nextSibling, e) {
457
+ var i;
458
+ for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
459
+ const s = t.nextSibling;
460
+ t.remove(), t = s;
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, i, s, n) {
476
+ this.type = 1, this._$AH = l, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = l;
477
+ }
478
+ _$AI(t, e = this, i, s) {
479
+ const n = this.strings;
480
+ let o = !1;
481
+ if (n === void 0)
482
+ t = S(this, t, e, 0), o = !H(t) || t !== this._$AH && t !== C, o && (this._$AH = t);
483
+ else {
484
+ const h = t;
485
+ let a, c;
486
+ for (t = n[0], a = 0; a < n.length - 1; a++)
487
+ c = S(this, h[i + a], e, a), c === C && (c = this._$AH[a]), o || (o = !H(c) || c !== this._$AH[a]), c === l ? t = l : t !== l && (t += (c ?? "") + n[a + 1]), this._$AH[a] = c;
488
+ }
489
+ o && !s && this.O(t);
490
+ }
491
+ O(t) {
492
+ t === l ? 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 === l ? 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 !== l);
509
+ }
510
+ }
511
+ class ie extends V {
512
+ constructor(t, e, i, s, n) {
513
+ super(t, e, i, s, n), this.type = 5;
514
+ }
515
+ _$AI(t, e = this) {
516
+ if ((t = S(this, t, e, 0) ?? l) === C)
517
+ return;
518
+ const i = this._$AH, s = t === l && i !== l || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== l && (i === l || s);
519
+ s && this.element.removeEventListener(this.name, this, i), n && 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 se {
527
+ constructor(t, e, i) {
528
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
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(M, L), (N.litHtmlVersions ?? (N.litHtmlVersions = [])).push("3.0.2");
539
+ const re = (r, t, e) => {
540
+ const i = (e == null ? void 0 : e.renderBefore) ?? t;
541
+ let s = i._$litPart$;
542
+ if (s === void 0) {
543
+ const n = (e == null ? void 0 : e.renderBefore) ?? null;
544
+ i._$litPart$ = s = new L(t.insertBefore(R(), n), n, void 0, e ?? {});
545
+ }
546
+ return s._$AI(r), s;
547
+ };
548
+ /**
549
+ * @license
550
+ * Copyright 2017 Google LLC
551
+ * SPDX-License-Identifier: BSD-3-Clause
552
+ */
553
+ let m = 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
+ m._$litElement$ = !0, m.finalized = !0, (xt = globalThis.litElementHydrateSupport) == null || xt.call(globalThis, { LitElement: m });
580
+ const X = globalThis.litElementPolyfillSupport;
581
+ X == null || X({ LitElement: m });
582
+ (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
583
+ /**
584
+ * @license
585
+ * Copyright 2017 Google LLC
586
+ * SPDX-License-Identifier: BSD-3-Clause
587
+ */
588
+ const st = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, rt = (r) => (...t) => ({ _$litDirective$: r, values: t });
589
+ let kt = class {
590
+ constructor(t) {
591
+ }
592
+ get _$AU() {
593
+ return this._$AM._$AU;
594
+ }
595
+ _$AT(t, e, i) {
596
+ this._$Ct = t, this._$AM = e, this._$Ci = i;
597
+ }
598
+ _$AS(t, e) {
599
+ return this.update(t, e);
600
+ }
601
+ update(t, e) {
602
+ return this.render(...e);
603
+ }
604
+ };
605
+ /**
606
+ * @license
607
+ * Copyright 2020 Google LLC
608
+ * SPDX-License-Identifier: BSD-3-Clause
609
+ */
610
+ const ne = (r) => r.strings === void 0;
611
+ /**
612
+ * @license
613
+ * Copyright 2017 Google LLC
614
+ * SPDX-License-Identifier: BSD-3-Clause
615
+ */
616
+ const U = (r, t) => {
617
+ var i;
618
+ const e = r._$AN;
619
+ if (e === void 0)
620
+ return !1;
621
+ for (const s of e)
622
+ (i = s._$AO) == null || i.call(s, t, !1), U(s, t);
623
+ return !0;
624
+ }, G = (r) => {
625
+ let t, e;
626
+ do {
627
+ if ((t = r._$AM) === void 0)
628
+ break;
629
+ e = t._$AN, e.delete(r), r = t;
630
+ } while ((e == null ? void 0 : e.size) === 0);
631
+ }, Nt = (r) => {
632
+ for (let t; t = r._$AM; r = t) {
633
+ let e = t._$AN;
634
+ if (e === void 0)
635
+ t._$AN = e = /* @__PURE__ */ new Set();
636
+ else if (e.has(r))
637
+ break;
638
+ e.add(r), he(t);
639
+ }
640
+ };
641
+ function oe(r) {
642
+ this._$AN !== void 0 ? (G(this), this._$AM = r, Nt(this)) : this._$AM = r;
643
+ }
644
+ function ae(r, t = !1, e = 0) {
645
+ const i = this._$AH, s = this._$AN;
646
+ if (s !== void 0 && s.size !== 0)
647
+ if (t)
648
+ if (Array.isArray(i))
649
+ for (let n = e; n < i.length; n++)
650
+ U(i[n], !1), G(i[n]);
651
+ else
652
+ i != null && (U(i, !1), G(i));
653
+ else
654
+ U(this, r);
655
+ }
656
+ const he = (r) => {
657
+ r.type == st.CHILD && (r._$AP ?? (r._$AP = ae), r._$AQ ?? (r._$AQ = oe));
658
+ };
659
+ class Ut extends kt {
660
+ constructor() {
661
+ super(...arguments), this._$AN = void 0;
662
+ }
663
+ _$AT(t, e, i) {
664
+ super._$AT(t, e, i), Nt(this), this.isConnected = t._$AU;
665
+ }
666
+ _$AO(t, e = !0) {
667
+ var i, s;
668
+ t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (s = this.disconnected) == null || s.call(this)), e && (U(this, t), G(this));
669
+ }
670
+ setValue(t) {
671
+ if (ne(this._$Ct))
672
+ this._$Ct._$AI(t, this);
673
+ else {
674
+ const e = [...this._$Ct._$AH];
675
+ e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
676
+ }
677
+ }
678
+ disconnected() {
679
+ }
680
+ reconnected() {
681
+ }
682
+ }
683
+ const le = /* @__PURE__ */ new WeakMap();
684
+ let vt = 0;
685
+ const J = /* @__PURE__ */ new Map(), yt = /* @__PURE__ */ new WeakSet(), _t = () => new Promise((r) => requestAnimationFrame(r)), ce = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], bt = (r, t) => {
686
+ const e = r - t;
687
+ return e === 0 ? void 0 : e;
688
+ }, At = (r, t) => {
689
+ const e = r / t;
690
+ return e === 1 ? void 0 : e;
691
+ }, Z = { left: (r, t) => {
692
+ const e = bt(r, t);
693
+ return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateX(${e}px)` };
694
+ }, top: (r, t) => {
695
+ const e = bt(r, t);
696
+ return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateY(${e}px)` };
697
+ }, width: (r, t) => {
698
+ let e;
699
+ t === 0 && (t = 1, e = { width: "1px" });
700
+ const i = At(r, t);
701
+ return { value: i, overrideFrom: e, transform: i == null || isNaN(i) ? void 0 : `scaleX(${i})` };
702
+ }, height: (r, t) => {
703
+ let e;
704
+ t === 0 && (t = 1, e = { height: "1px" });
705
+ const i = At(r, t);
706
+ return { value: i, overrideFrom: e, transform: i == null || isNaN(i) ? void 0 : `scaleY(${i})` };
707
+ } }, de = { duration: 333, easing: "ease-in-out" }, pe = ["left", "top", "width", "height", "opacity", "color", "background"], wt = /* @__PURE__ */ new WeakMap();
708
+ class ue extends Ut {
709
+ constructor(t) {
710
+ if (super(t), this.t = null, this.i = null, this.o = !0, this.shouldLog = !1, t.type === st.CHILD)
711
+ throw Error("The `animate` directive must be used in attribute position.");
712
+ this.createFinished();
713
+ }
714
+ createFinished() {
715
+ var t;
716
+ (t = this.resolveFinished) == null || t.call(this), this.finished = new Promise((e) => {
717
+ this.h = e;
718
+ });
719
+ }
720
+ async resolveFinished() {
721
+ var t;
722
+ (t = this.h) == null || t.call(this), this.h = void 0;
723
+ }
724
+ render(t) {
725
+ return l;
726
+ }
727
+ getController() {
728
+ return le.get(this.l);
729
+ }
730
+ isDisabled() {
731
+ var t;
732
+ return this.options.disabled || ((t = this.getController()) == null ? void 0 : t.disabled);
733
+ }
734
+ update(t, [e]) {
735
+ var s;
736
+ const i = this.l === void 0;
737
+ return i && (this.l = (s = t.options) == null ? void 0 : s.host, this.l.addController(this), this.element = t.element, wt.set(this.element, this)), this.optionsOrCallback = e, (i || typeof e != "function") && this.u(e), this.render(e);
738
+ }
739
+ u(t) {
740
+ t = t ?? {};
741
+ const e = this.getController();
742
+ e !== void 0 && ((t = { ...e.defaultOptions, ...t }).keyframeOptions = { ...e.defaultOptions.keyframeOptions, ...t.keyframeOptions }), t.properties ?? (t.properties = pe), this.options = t;
743
+ }
744
+ p() {
745
+ const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
746
+ return this.options.properties.forEach((s) => {
747
+ const n = e[s] ?? (Z[s] ? void 0 : i[s]), o = Number(n);
748
+ t[s] = isNaN(o) ? n + "" : o;
749
+ }), t;
750
+ }
751
+ m() {
752
+ let t, e = !0;
753
+ return this.options.guard && (t = this.options.guard(), e = ((i, s) => {
754
+ if (Array.isArray(i)) {
755
+ if (Array.isArray(s) && s.length === i.length && i.every((n, o) => n === s[o]))
756
+ return !1;
757
+ } else if (s === i)
758
+ return !1;
759
+ return !0;
760
+ })(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;
761
+ }
762
+ hostUpdate() {
763
+ 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);
764
+ }
765
+ async hostUpdated() {
766
+ if (!this.o || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
767
+ return;
768
+ let t;
769
+ this.prepare(), await _t;
770
+ const e = this._(), i = this.A(this.options.keyframeOptions, e), s = this.p();
771
+ if (this.g !== void 0) {
772
+ const { from: n, to: o } = this.O(this.g, s, e);
773
+ this.log("measured", [this.g, s, n, o]), t = this.calculateKeyframes(n, o);
774
+ } else {
775
+ const n = J.get(this.options.inId);
776
+ if (n) {
777
+ J.delete(this.options.inId);
778
+ const { from: o, to: h } = this.O(n, s, e);
779
+ t = this.calculateKeyframes(o, h), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, vt++, t.forEach((a) => a.zIndex = vt);
780
+ } else
781
+ this.options.in && (t = [...this.options.in, {}]);
782
+ }
783
+ this.animate(t, i);
784
+ }
785
+ resetStyles() {
786
+ this.j !== void 0 && (this.element.setAttribute("style", this.j ?? ""), this.j = void 0);
787
+ }
788
+ commitStyles() {
789
+ var t, e;
790
+ this.j = this.element.getAttribute("style"), (t = this.webAnimation) == null || t.commitStyles(), (e = this.webAnimation) == null || e.cancel();
791
+ }
792
+ reconnected() {
793
+ }
794
+ async disconnected() {
795
+ var e;
796
+ if (!this.o || (this.options.id !== void 0 && J.set(this.options.id, this.g), this.options.out === void 0))
797
+ return;
798
+ if (this.prepare(), await _t(), (e = this.t) == null ? void 0 : e.isConnected) {
799
+ const i = this.i && this.i.parentNode === this.t ? this.i : null;
800
+ if (this.t.insertBefore(this.element, i), this.options.stabilizeOut) {
801
+ const s = this.p();
802
+ this.log("stabilizing out");
803
+ const n = this.g.left - s.left, o = this.g.top - s.top;
804
+ getComputedStyle(this.element).position !== "static" || n === 0 && o === 0 || (this.element.style.position = "relative"), n !== 0 && (this.element.style.left = n + "px"), o !== 0 && (this.element.style.top = o + "px");
805
+ }
806
+ }
807
+ const t = this.A(this.options.keyframeOptions);
808
+ await this.animate(this.options.out, t), this.element.remove();
809
+ }
810
+ prepare() {
811
+ this.createFinished();
812
+ }
813
+ start() {
814
+ var t, e;
815
+ (e = (t = this.options).onStart) == null || e.call(t, this);
816
+ }
817
+ didFinish(t) {
818
+ var e, i;
819
+ t && ((i = (e = this.options).onComplete) == null || i.call(e, this)), this.g = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
820
+ }
821
+ _() {
822
+ const t = [];
823
+ for (let e = this.element.parentNode; e; e = e == null ? void 0 : e.parentNode) {
824
+ const i = wt.get(e);
825
+ i && !i.isDisabled() && i && t.push(i);
826
+ }
827
+ return t;
828
+ }
829
+ get isHostRendered() {
830
+ const t = yt.has(this.l);
831
+ return t || this.l.updateComplete.then(() => {
832
+ yt.add(this.l);
833
+ }), t;
834
+ }
835
+ A(t, e = this._()) {
836
+ const i = { ...de };
837
+ return e.forEach((s) => Object.assign(i, s.options.keyframeOptions)), Object.assign(i, t), i;
838
+ }
839
+ O(t, e, i) {
840
+ t = { ...t }, e = { ...e };
841
+ const s = i.map((h) => h.animatingProperties).filter((h) => h !== void 0);
842
+ let n = 1, o = 1;
843
+ return s !== void 0 && (s.forEach((h) => {
844
+ h.width && (n /= h.width), h.height && (o /= h.height);
845
+ }), t.left !== void 0 && e.left !== void 0 && (t.left = n * t.left, e.left = n * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = o * t.top, e.top = o * e.top)), { from: t, to: e };
846
+ }
847
+ calculateKeyframes(t, e, i = !1) {
848
+ const s = {}, n = {};
849
+ let o = !1;
850
+ const h = {};
851
+ for (const a in e) {
852
+ const c = t[a], d = e[a];
853
+ if (a in Z) {
854
+ const p = Z[a];
855
+ if (c === void 0 || d === void 0)
856
+ continue;
857
+ const u = p(c, d);
858
+ u.transform !== void 0 && (h[a] = u.value, o = !0, s.transform = `${s.transform ?? ""} ${u.transform}`, u.overrideFrom !== void 0 && Object.assign(s, u.overrideFrom));
859
+ } else
860
+ c !== d && c !== void 0 && d !== void 0 && (o = !0, s[a] = c, n[a] = d);
861
+ }
862
+ return s.transformOrigin = n.transformOrigin = i ? "center center" : "top left", this.animatingProperties = h, o ? [s, n] : void 0;
863
+ }
864
+ async animate(t, e = this.options.keyframeOptions) {
865
+ this.start(), this.frames = t;
866
+ let i = !1;
867
+ if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t = this.options.onFrames(this), this.log("modified frames", t)), t !== void 0)) {
868
+ this.log("animate", [t, e]), i = !0, this.webAnimation = this.element.animate(t, e);
869
+ const s = this.getController();
870
+ s == null || s.add(this);
871
+ try {
872
+ await this.webAnimation.finished;
873
+ } catch {
874
+ }
875
+ s == null || s.remove(this);
876
+ }
877
+ return this.didFinish(i), i;
878
+ }
879
+ isAnimating() {
880
+ var t, e;
881
+ return ((t = this.webAnimation) == null ? void 0 : t.playState) === "running" || ((e = this.webAnimation) == null ? void 0 : e.pending);
882
+ }
883
+ log(t, e) {
884
+ this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, e);
885
+ }
886
+ }
887
+ const ge = rt(ue);
888
+ /**
889
+ * @license
890
+ * Copyright 2017 Google LLC
891
+ * SPDX-License-Identifier: BSD-3-Clause
892
+ */
893
+ const fe = { attribute: !0, type: String, converter: W, reflect: !1, hasChanged: it }, me = (r = fe, t, e) => {
894
+ const { kind: i, metadata: s } = e;
895
+ let n = globalThis.litPropertyMetadata.get(s);
896
+ if (n === void 0 && globalThis.litPropertyMetadata.set(s, n = /* @__PURE__ */ new Map()), n.set(e.name, r), i === "accessor") {
897
+ const { name: o } = e;
898
+ return { set(h) {
899
+ const a = t.get.call(this);
900
+ t.set.call(this, h), this.requestUpdate(o, a, r);
901
+ }, init(h) {
902
+ return h !== void 0 && this.C(o, void 0, r), h;
903
+ } };
904
+ }
905
+ if (i === "setter") {
906
+ const { name: o } = e;
907
+ return function(h) {
908
+ const a = this[o];
909
+ t.call(this, h), this.requestUpdate(o, a, r);
910
+ };
911
+ }
912
+ throw Error("Unsupported decorator location: " + i);
913
+ };
914
+ function g(r) {
915
+ return (t, e) => typeof e == "object" ? me(r, t, e) : ((i, s, n) => {
916
+ const o = s.hasOwnProperty(n);
917
+ return s.constructor.createProperty(n, o ? { ...i, wrapped: !0 } : i), o ? Object.getOwnPropertyDescriptor(s, n) : void 0;
918
+ })(r, t, e);
919
+ }
920
+ /**
921
+ * @license
922
+ * Copyright 2017 Google LLC
923
+ * SPDX-License-Identifier: BSD-3-Clause
924
+ */
925
+ function P(r) {
926
+ return g({ ...r, state: !0, attribute: !1 });
927
+ }
928
+ /**
929
+ * @license
930
+ * Copyright 2018 Google LLC
931
+ * SPDX-License-Identifier: BSD-3-Clause
932
+ */
933
+ const $e = rt(class extends kt {
934
+ constructor(r) {
935
+ var t;
936
+ if (super(r), r.type !== st.ATTRIBUTE || r.name !== "class" || ((t = r.strings) == null ? void 0 : t.length) > 2)
937
+ throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
938
+ }
939
+ render(r) {
940
+ return " " + Object.keys(r).filter((t) => r[t]).join(" ") + " ";
941
+ }
942
+ update(r, [t]) {
943
+ var i, s;
944
+ if (this.it === void 0) {
945
+ this.it = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.st = new Set(r.strings.join(" ").split(/\s/).filter((n) => n !== "")));
946
+ for (const n in t)
947
+ t[n] && !((i = this.st) != null && i.has(n)) && this.it.add(n);
948
+ return this.render(t);
949
+ }
950
+ const e = r.element.classList;
951
+ for (const n of this.it)
952
+ n in t || (e.remove(n), this.it.delete(n));
953
+ for (const n in t) {
954
+ const o = !!t[n];
955
+ o === this.it.has(n) || (s = this.st) != null && s.has(n) || (o ? (e.add(n), this.it.add(n)) : (e.remove(n), this.it.delete(n)));
956
+ }
957
+ return C;
958
+ }
959
+ }), B = (r, t, e) => {
960
+ r && e.style.setProperty(t, r);
961
+ }, Rt = (r, t) => {
962
+ var e, i, s, n;
963
+ B((e = r.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), B(
964
+ (i = r.colors) == null ? void 0 : i.textOnPrimaryBackground,
965
+ "--text-on-primary-background",
966
+ t
967
+ ), B(
968
+ (s = r.colors) == null ? void 0 : s.secondaryBackground,
969
+ "--secondary-background",
970
+ t
971
+ ), B(
972
+ (n = r.colors) == null ? void 0 : n.textOnSecondaryBackground,
973
+ "--text-on-secondary-background",
974
+ t
975
+ );
976
+ };
977
+ /**
978
+ * @license
979
+ * Copyright 2020 Google LLC
980
+ * SPDX-License-Identifier: BSD-3-Clause
981
+ */
982
+ const Ht = () => new ve();
983
+ class ve {
984
+ }
985
+ const Q = /* @__PURE__ */ new WeakMap(), Mt = rt(class extends Ut {
986
+ render(r) {
987
+ return l;
988
+ }
989
+ update(r, [t]) {
990
+ var i;
991
+ const e = t !== this.G;
992
+ return e && this.G !== void 0 && this.ot(void 0), (e || this.rt !== this.lt) && (this.G = t, this.ct = (i = r.options) == null ? void 0 : i.host, this.ot(this.lt = r.element)), l;
993
+ }
994
+ ot(r) {
995
+ if (typeof this.G == "function") {
996
+ const t = this.ct ?? globalThis;
997
+ let e = Q.get(t);
998
+ 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);
999
+ } else
1000
+ this.G.value = r;
1001
+ }
1002
+ get rt() {
1003
+ var r, t;
1004
+ 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;
1005
+ }
1006
+ disconnected() {
1007
+ this.rt === this.lt && this.ot(void 0);
1008
+ }
1009
+ reconnected() {
1010
+ this.ot(this.lt);
1011
+ }
1012
+ });
1013
+ var ye = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, j = (r, t, e, i) => {
1014
+ for (var s = i > 1 ? void 0 : i ? _e(t, e) : t, n = r.length - 1, o; n >= 0; n--)
1015
+ (o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
1016
+ return i && s && ye(t, e, s), s;
1017
+ };
1018
+ class _ extends m {
1019
+ constructor() {
1020
+ super(...arguments), this.active = !1, this.loaded = !1, this.offset = 0, this.buttonRef = Ht();
1021
+ }
1022
+ async connectedCallback() {
1023
+ 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)`);
1024
+ }
1025
+ _toggleActive() {
1026
+ var t;
1027
+ if (!((t = this.application) != null && t.root)) {
1028
+ console.warn(
1029
+ "Could not activate widget. No root element assigned to widget."
1030
+ );
1031
+ return;
1032
+ }
1033
+ this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.hide();
1034
+ }
1035
+ _applyBranding() {
1036
+ var t;
1037
+ (t = this.application) != null && t.settings && Rt(this.application.settings.branding, this);
1038
+ }
1039
+ async _renderSymbol() {
1040
+ var h, a, c;
1041
+ const t = (h = this.application) == null ? void 0 : h.branding(), e = (a = t == null ? void 0 : t.graphics) == null ? void 0 : a.trigger;
1042
+ if (e)
1043
+ return f` <img src=${e} class="trigger-icon" alt="" /> `;
1044
+ const i = (c = this.application) == null ? void 0 : c.triggerIcon;
1045
+ if (!i)
1046
+ return l;
1047
+ const s = async (d) => await import("./index-5087564d.mjs").then(
1048
+ (u) => u[d]
1049
+ ), { type: n, content: o } = i;
1050
+ switch (n) {
1051
+ case "Telia": {
1052
+ const d = await s(o);
1053
+ return d ? f`<telia-icon
1054
+ class="trigger-icon"
1055
+ svg=${d.svg}
1056
+ size="lg"
1057
+ ></telia-icon>` : l;
1058
+ }
1059
+ default:
1060
+ return l;
1061
+ }
1062
+ }
1063
+ setOffset(t) {
1064
+ this.offset = t;
1065
+ }
1066
+ render() {
1067
+ var t, e, i, s;
1068
+ return f`<div class="trigger-container">
1069
+ ${!this.active && ((s = (i = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : i.other) != null && s.showButtonLabel) ? f`
1070
+ <button
1071
+ class="trigger-label"
1072
+ @click=${this._toggleActive}
1073
+ ${ge({
1074
+ keyframeOptions: {},
1075
+ in: ce,
1076
+ stabilizeOut: !0,
1077
+ skipInitial: !1
1078
+ })}
1079
+ >
1080
+ ${this.application.settings.branding.other.buttonLabelText}
1081
+ </button>
1082
+ ` : l}
1083
+
1084
+ <button
1085
+ class=${$e({
1086
+ trigger: !0,
1087
+ active: this.active,
1088
+ rendered: this.loaded
1089
+ })}
1090
+ @click=${this._toggleActive}
1091
+ ${Mt(this.buttonRef)}
1092
+ >
1093
+ ${this.icon}
1094
+ <span class="trigger-close">
1095
+ <svg
1096
+ width="18"
1097
+ height="9"
1098
+ viewBox="0 0 18 9"
1099
+ fill="none"
1100
+ xmlns="http://www.w3.org/2000/svg"
1101
+ >
1102
+ <path
1103
+ 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"
1104
+ fill="white"
1105
+ />
1106
+ </svg>
1107
+ </span>
1108
+ <span class="trigger-loader">
1109
+ <svg viewBox="25 25 50 50">
1110
+ <circle
1111
+ cx="50"
1112
+ cy="50"
1113
+ r="20"
1114
+ fill="none"
1115
+ stroke="#000"
1116
+ stroke-width="2"
1117
+ stroke-miterlimit="10"
1118
+ />
1119
+ </svg>
1120
+ </span>
1121
+ </button>
1122
+ </div>`;
1123
+ }
1124
+ }
1125
+ _.styles = [
1126
+ O`
1127
+ :host {
1128
+ --voca-rem-multiplier: 0.625;
1129
+ --trigger-label-bg: #f5e0ff;
1130
+ --trigger-label-text-color: rgba(0, 0, 0, 0.8);
1131
+ display: block;
1132
+ box-sizing: border-box;
1133
+ /* font-family: var(--font-family); */
1134
+ font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
1135
+ }
1136
+
1137
+ .trigger-container {
1138
+ position: fixed;
1139
+ bottom: 20px;
1140
+ right: 20px;
1141
+ display: flex;
1142
+ align-items: center;
1143
+ gap: 1rem;
1144
+ }
1145
+
1146
+ .trigger {
1147
+ transform: scale(0);
1148
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
1149
+ z-index: 5;
1150
+ display: flex;
1151
+ align-items: center;
1152
+ justify-content: center;
1153
+ border: none;
1154
+ line-height: 55px;
1155
+ height: 55px;
1156
+ width: 55px;
1157
+ border-radius: 55px;
1158
+ cursor: pointer;
1159
+ background-color: var(--trigger-bg, var(--primary-background));
1160
+ font-family: Lato;
1161
+ text-decoration: none;
1162
+ border: 3px dashed transparent;
1163
+ box-sizing: border-box;
1164
+ transition: transform 200ms ease-out;
1165
+ }
1166
+ .trigger:active {
1167
+ transform: scale(0.8) !important;
1168
+ }
1169
+ .trigger:hover:not(:active) {
1170
+ transform: scale(1.1) !important;
1171
+ }
1172
+ .trigger.rendered {
1173
+ transform: scale(1);
1174
+ }
1175
+ .trigger.active .trigger-icon {
1176
+ opacity: 0;
1177
+ transform: rotate(-180deg) scale(0);
1178
+ }
1179
+ .trigger.active .trigger-close {
1180
+ opacity: 1;
1181
+ transform: rotate(0deg) scale(1);
1182
+ }
1183
+
1184
+ .trigger-icon {
1185
+ display: inline-block;
1186
+ line-height: inherit;
1187
+ text-align: center;
1188
+ opacity: 1;
1189
+ transform: rotate(0deg) scale(1);
1190
+ transition: opacity 200ms ease-out, transform 200ms ease-out;
1191
+ color: var(--trigger-text-color, var(--text-on-primary-background));
1192
+ }
1193
+ .trigger-close {
1194
+ opacity: 0;
1195
+ transition: transform 200ms ease-out;
1196
+ transform: rotate(180deg) scale(0);
1197
+ position: absolute;
1198
+ top: 0;
1199
+ bottom: 0;
1200
+ left: 0;
1201
+ right: 0;
1202
+ display: flex;
1203
+ justify-content: center;
1204
+ align-items: center;
1205
+ fill: var(--trigger-text-color, var(--text-on-primary-background));
1206
+ }
1207
+
1208
+ img {
1209
+ max-width: 100%;
1210
+ }
1211
+
1212
+ .trigger-label {
1213
+ box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);
1214
+ background-color: var(--trigger-label-bg);
1215
+ color: var(--trigger-label-text-color);
1216
+ white-space: nowrap;
1217
+ padding: 0.7rem 1rem;
1218
+ border-radius: 0.3rem;
1219
+ font-weight: 500;
1220
+ display: flex;
1221
+ justify-content: center;
1222
+ align-items: center;
1223
+ cursor: pointer;
1224
+ border: none;
1225
+ font-size: 1rem;
1226
+ font-family: inherit;
1227
+ transition: all 300ms ease-in-out;
1228
+ }
1229
+
1230
+ .trigger-label:hover {
1231
+ opacity: 0.8;
1232
+ }
1233
+ `
1234
+ ];
1235
+ j([
1236
+ g({ attribute: !1 })
1237
+ ], _.prototype, "application", 2);
1238
+ j([
1239
+ P()
1240
+ ], _.prototype, "active", 2);
1241
+ j([
1242
+ P()
1243
+ ], _.prototype, "loaded", 2);
1244
+ j([
1245
+ P()
1246
+ ], _.prototype, "icon", 2);
1247
+ j([
1248
+ P()
1249
+ ], _.prototype, "offset", 2);
1250
+ var be = Object.defineProperty, Ae = Object.getOwnPropertyDescriptor, A = (r, t, e, i) => {
1251
+ for (var s = i > 1 ? void 0 : i ? Ae(t, e) : t, n = r.length - 1, o; n >= 0; n--)
1252
+ (o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
1253
+ return i && s && be(t, e, s), s;
1254
+ };
1255
+ const Lt = (r) => {
1256
+ class t extends r {
1257
+ constructor() {
1258
+ super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
1259
+ }
1260
+ writeProperties(i) {
1261
+ this.properties = i;
1262
+ }
1263
+ writeLayout(i) {
1264
+ this.layout = i;
1265
+ }
1266
+ writeContext(i) {
1267
+ this.context = i;
1268
+ }
1269
+ addChild(i) {
1270
+ i.parent = this, this.nodes.push(i);
1271
+ }
1272
+ connectedCallback() {
1273
+ super.connectedCallback(), this.renderRoot.host.style.setProperty(
1274
+ "--width",
1275
+ this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
1276
+ );
1277
+ }
1278
+ }
1279
+ return t.styles = [
1280
+ // (superClass as unknown as typeof LitElement).styles ?? [],
1281
+ O`
1282
+ :host {
1283
+ font-family: var(--font-family);
1284
+ grid-column: span var(--width);
1285
+ max-width: 100%;
1286
+ overflow: hidden;
1287
+ box-sizing: border-box;
1288
+ display: block;
1289
+ }
1290
+ * {
1291
+ box-sizing: border-box;
1292
+ }
1293
+ `
1294
+ ], A([
1295
+ g()
1296
+ ], t.prototype, "properties", 2), A([
1297
+ g()
1298
+ ], t.prototype, "context", 2), A([
1299
+ g()
1300
+ ], t.prototype, "layout", 2), A([
1301
+ g()
1302
+ ], t.prototype, "name", 2), A([
1303
+ g()
1304
+ ], t.prototype, "type", 2), A([
1305
+ g({ attribute: !1 })
1306
+ ], t.prototype, "application", 2), A([
1307
+ g({ attribute: !1 })
1308
+ ], t.prototype, "parent", 2), t;
1309
+ };
1310
+ class jt extends Lt(m) {
1311
+ render() {
1312
+ return f`Non resolved component`;
1313
+ }
1314
+ }
1315
+ jt.styles = [
1316
+ O`
1317
+ :host {
1318
+ display: block;
1319
+ }
1320
+ `
1321
+ ];
1322
+ /**
1323
+ * @license
1324
+ * Copyright 2021 Google LLC
1325
+ * SPDX-License-Identifier: BSD-3-Clause
1326
+ */
1327
+ function* we(r, t) {
1328
+ if (r !== void 0) {
1329
+ let e = 0;
1330
+ for (const i of r)
1331
+ yield t(i, e++);
1332
+ }
1333
+ }
1334
+ var nt = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r))(nt || {}), xe = Object.defineProperty, Ce = Object.getOwnPropertyDescriptor, Ee = (r, t, e, i) => {
1335
+ for (var s = i > 1 ? void 0 : i ? Ce(t, e) : t, n = r.length - 1, o; n >= 0; n--)
1336
+ (o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
1337
+ return i && s && xe(t, e, s), s;
1338
+ };
1339
+ class ot extends m {
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 && Rt(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(([i, s]) => {
1357
+ e.style.setProperty(`--${i}`, s);
1358
+ });
1359
+ }
1360
+ firstUpdated(t) {
1361
+ this.applyBranding(), this.applyStyles();
1362
+ }
1363
+ render() {
1364
+ return this.application.renderStrategy === nt.Trigger && this.renderRoot.host.classList.add("floating"), f`<div class="widget-container" ${Mt(this.wrapperRef)}>
1365
+ ${we(this.nodes, (t) => t)}
1366
+ </div>`;
1367
+ }
1368
+ }
1369
+ ot.styles = O`
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
+ Ee([
1462
+ g({ attribute: !1 })
1463
+ ], ot.prototype, "application", 2);
1464
+ var Se = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, at = (r, t, e, i) => {
1465
+ for (var s = i > 1 ? void 0 : i ? Oe(t, e) : t, n = r.length - 1, o; n >= 0; n--)
1466
+ (o = r[n]) && (s = (i ? o(t, e, s) : o(s)) || s);
1467
+ return i && s && Se(t, e, s), s;
1468
+ };
1469
+ class z extends m {
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 l;
1494
+ if (this.widget.renderStrategy === nt.Trigger) {
1495
+ const t = new _();
1496
+ return t.application = this.widget, t;
1497
+ }
1498
+ return this.widget.render();
1499
+ }
1500
+ }
1501
+ z.styles = [
1502
+ O`
1503
+ :host {
1504
+ display: block;
1505
+ }
1506
+ `
1507
+ ];
1508
+ at([
1509
+ g({ attribute: !0 })
1510
+ ], z.prototype, "name", 2);
1511
+ at([
1512
+ P()
1513
+ ], z.prototype, "widget", 2);
1514
+ at([
1515
+ P()
1516
+ ], z.prototype, "status", 2);
1517
+ customElements.get("ace-trigger") || customElements.define("ace-trigger", _);
1518
+ customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", jt);
1519
+ customElements.get("ace-wrapper") || customElements.define("ace-wrapper", ot);
1520
+ customElements.get("ace-widget") || customElements.define("ace-widget", z);
1521
+ const zt = Lt(m);
1522
+ class Pe extends zt {
1523
+ render() {
1524
+ var n;
1525
+ const t = this.application.branding(), e = (n = t == null ? void 0 : t.graphics) == null ? void 0 : n.logotype, s = this.application.texts.get("widget-header.header", "ACE Widget");
1526
+ return f` <div class="widget-header">
1527
+ <!-- <telia-icon svg={aiRobot.svg} size="lg"></telia-icon> -->
1528
+ ${e ? f` <img src=${e} class="logotype" alt="" />` : l}
1529
+
1530
+ <div>
1531
+ <h1>${s}</h1>
1532
+
1533
+ ${this.properties.tagline ? f`<p>${this.properties.tagline}</p>` : l}
1534
+ </div>
1535
+ </div>`;
1536
+ }
1537
+ }
1538
+ Pe.styles = [
1539
+ zt.styles || [],
1540
+ O`
1541
+ :host {
1542
+ --header-text-color: var(--text-on-primary-background);
1543
+ }
1544
+
1545
+ img {
1546
+ max-width: 140px;
1547
+ max-height: 80%;
1548
+ }
1549
+
1550
+ .widget-header {
1551
+ background-color: transparent;
1552
+ color: var(--header-text-color);
1553
+ height: 69px;
1554
+ display: flex;
1555
+ gap: var(--spacing-md);
1556
+ flex-direction: row;
1557
+ align-items: center;
1558
+ border-radius: var(--spacing-sm) var(--spacing-sm) 0px 0px;
1559
+ padding: 0 var(--spacing-md);
1560
+ }
1561
+
1562
+ h1 {
1563
+ font-size: 1.2rem;
1564
+ }
1565
+
1566
+ h1,
1567
+ p {
1568
+ margin: 0;
1569
+ padding: 0;
1570
+ }
1571
+ `
1572
+ ];
1573
+ export {
1574
+ Pe as WidgetHeader,
1575
+ Pe as default
1576
+ };