@telia-ace/widget-conversation-flamingo 1.1.12-rc.1 → 1.1.12-rc.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/conversation-8e924136.js +572 -0
  2. package/conversation-a518bd92.mjs +2634 -0
  3. package/conversation-component.d.ts +2 -0
  4. package/conversation-platform.d.ts +9 -49
  5. package/conversation-session.d.ts +11 -0
  6. package/conversation.d.ts +23 -0
  7. package/entry.d.ts +9 -0
  8. package/group.d.ts +7 -0
  9. package/index-231900d1.mjs +780 -0
  10. package/index-592f145b.js +3 -0
  11. package/index-b34ddf78.js +1 -0
  12. package/{index-1ea0fde8.mjs → index-b5ca9962.mjs} +320 -319
  13. package/index.d.ts +6 -10
  14. package/index.js +1 -1
  15. package/index.mjs +7 -9
  16. package/{components/conversation/ui/message-types → message-types}/message-type-html.d.ts +3 -2
  17. package/models/agent.d.ts +8 -0
  18. package/models/conversation-entry.d.ts +11 -0
  19. package/models/conversation-provider.d.ts +19 -0
  20. package/models/conversation-session-state.d.ts +13 -0
  21. package/models/user.d.ts +8 -0
  22. package/package.json +5 -6
  23. package/types.d.ts +9 -123
  24. package/agent.d.ts +0 -20
  25. package/components/conversation/conversation.d.ts +0 -19
  26. package/components/conversation/plugin.d.ts +0 -45
  27. package/components/conversation/ui/message-list.d.ts +0 -9
  28. package/components/conversation/ui/message-types/message-type-link-list.d.ts +0 -8
  29. package/components/conversation/ui/message-types/message-type-separator.d.ts +0 -7
  30. package/components/conversation/ui/message.d.ts +0 -8
  31. package/components/conversation/utils.d.ts +0 -1
  32. package/conversation-5265abc7.js +0 -446
  33. package/conversation-8c2255c2.mjs +0 -1865
  34. package/conversation-controller.d.ts +0 -118
  35. package/conversation-history.d.ts +0 -26
  36. package/conversation-provider.d.ts +0 -32
  37. package/index-5cf6726d.js +0 -156
  38. package/index-836222bd.mjs +0 -3923
  39. package/index-c51d4b6a.js +0 -1
  40. package/send-18482cae.mjs +0 -4
  41. package/send-eb8b9428.js +0 -1
  42. package/store.d.ts +0 -31
  43. package/user.d.ts +0 -9
  44. package/utils/custom-message.d.ts +0 -2
  45. package/utils/index.d.ts +0 -1
  46. package/utils/open-chat-widget.d.ts +0 -4
  47. package/utils/swap-provider.d.ts +0 -8
@@ -0,0 +1,2634 @@
1
+ import { C as St } from "./index-231900d1.mjs";
2
+ /**
3
+ * @license
4
+ * Copyright 2019 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const rt = globalThis, jt = rt.ShadowRoot && (rt.ShadyCSS === void 0 || rt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Dt = Symbol(), Qt = /* @__PURE__ */ new WeakMap();
8
+ let Ee = class {
9
+ constructor(t, s, i) {
10
+ if (this._$cssResult$ = !0, i !== Dt)
11
+ throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
12
+ this.cssText = t, this.t = s;
13
+ }
14
+ get styleSheet() {
15
+ let t = this.o;
16
+ const s = this.t;
17
+ if (jt && t === void 0) {
18
+ const i = s !== void 0 && s.length === 1;
19
+ i && (t = Qt.get(s)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Qt.set(s, t));
20
+ }
21
+ return t;
22
+ }
23
+ toString() {
24
+ return this.cssText;
25
+ }
26
+ };
27
+ const as = (e) => new Ee(typeof e == "string" ? e : e + "", void 0, Dt), w = (e, ...t) => {
28
+ const s = e.length === 1 ? e[0] : t.reduce((i, n, r) => i + ((o) => {
29
+ if (o._$cssResult$ === !0)
30
+ return o.cssText;
31
+ if (typeof o == "number")
32
+ return o;
33
+ 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.");
34
+ })(n) + e[r + 1], e[0]);
35
+ return new Ee(s, e, Dt);
36
+ }, ls = (e, t) => {
37
+ if (jt)
38
+ e.adoptedStyleSheets = t.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet);
39
+ else
40
+ for (const s of t) {
41
+ const i = document.createElement("style"), n = rt.litNonce;
42
+ n !== void 0 && i.setAttribute("nonce", n), i.textContent = s.cssText, e.appendChild(i);
43
+ }
44
+ }, Zt = jt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
45
+ let s = "";
46
+ for (const i of t.cssRules)
47
+ s += i.cssText;
48
+ return as(s);
49
+ })(e) : e;
50
+ /**
51
+ * @license
52
+ * Copyright 2017 Google LLC
53
+ * SPDX-License-Identifier: BSD-3-Clause
54
+ */
55
+ const { is: cs, defineProperty: ds, getOwnPropertyDescriptor: hs, getOwnPropertyNames: ps, getOwnPropertySymbols: us, getPrototypeOf: fs } = Object, C = globalThis, Xt = C.trustedTypes, $s = Xt ? Xt.emptyScript : "", Ct = C.reactiveElementPolyfillSupport, q = (e, t) => e, ot = { toAttribute(e, t) {
56
+ switch (t) {
57
+ case Boolean:
58
+ e = e ? $s : null;
59
+ break;
60
+ case Object:
61
+ case Array:
62
+ e = e == null ? e : JSON.stringify(e);
63
+ }
64
+ return e;
65
+ }, fromAttribute(e, t) {
66
+ let s = e;
67
+ switch (t) {
68
+ case Boolean:
69
+ s = e !== null;
70
+ break;
71
+ case Number:
72
+ s = e === null ? null : Number(e);
73
+ break;
74
+ case Object:
75
+ case Array:
76
+ try {
77
+ s = JSON.parse(e);
78
+ } catch {
79
+ s = null;
80
+ }
81
+ }
82
+ return s;
83
+ } }, It = (e, t) => !cs(e, t), Jt = { attribute: !0, type: String, converter: ot, reflect: !1, hasChanged: It };
84
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), C.litPropertyMetadata ?? (C.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
85
+ let H = class extends HTMLElement {
86
+ static addInitializer(t) {
87
+ this._$Ei(), (this.l ?? (this.l = [])).push(t);
88
+ }
89
+ static get observedAttributes() {
90
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
91
+ }
92
+ static createProperty(t, s = Jt) {
93
+ if (s.state && (s.attribute = !1), this._$Ei(), this.elementProperties.set(t, s), !s.noAccessor) {
94
+ const i = Symbol(), n = this.getPropertyDescriptor(t, i, s);
95
+ n !== void 0 && ds(this.prototype, t, n);
96
+ }
97
+ }
98
+ static getPropertyDescriptor(t, s, i) {
99
+ const { get: n, set: r } = hs(this.prototype, t) ?? { get() {
100
+ return this[s];
101
+ }, set(o) {
102
+ this[s] = o;
103
+ } };
104
+ return { get() {
105
+ return n == null ? void 0 : n.call(this);
106
+ }, set(o) {
107
+ const a = n == null ? void 0 : n.call(this);
108
+ r.call(this, o), this.requestUpdate(t, a, i);
109
+ }, configurable: !0, enumerable: !0 };
110
+ }
111
+ static getPropertyOptions(t) {
112
+ return this.elementProperties.get(t) ?? Jt;
113
+ }
114
+ static _$Ei() {
115
+ if (this.hasOwnProperty(q("elementProperties")))
116
+ return;
117
+ const t = fs(this);
118
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
119
+ }
120
+ static finalize() {
121
+ if (this.hasOwnProperty(q("finalized")))
122
+ return;
123
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(q("properties"))) {
124
+ const s = this.properties, i = [...ps(s), ...us(s)];
125
+ for (const n of i)
126
+ this.createProperty(n, s[n]);
127
+ }
128
+ const t = this[Symbol.metadata];
129
+ if (t !== null) {
130
+ const s = litPropertyMetadata.get(t);
131
+ if (s !== void 0)
132
+ for (const [i, n] of s)
133
+ this.elementProperties.set(i, n);
134
+ }
135
+ this._$Eh = /* @__PURE__ */ new Map();
136
+ for (const [s, i] of this.elementProperties) {
137
+ const n = this._$Eu(s, i);
138
+ n !== void 0 && this._$Eh.set(n, s);
139
+ }
140
+ this.elementStyles = this.finalizeStyles(this.styles);
141
+ }
142
+ static finalizeStyles(t) {
143
+ const s = [];
144
+ if (Array.isArray(t)) {
145
+ const i = new Set(t.flat(1 / 0).reverse());
146
+ for (const n of i)
147
+ s.unshift(Zt(n));
148
+ } else
149
+ t !== void 0 && s.push(Zt(t));
150
+ return s;
151
+ }
152
+ static _$Eu(t, s) {
153
+ const i = s.attribute;
154
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
155
+ }
156
+ constructor() {
157
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
158
+ }
159
+ _$Ev() {
160
+ var t;
161
+ this._$Eg = new Promise((s) => this.enableUpdating = s), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((s) => s(this));
162
+ }
163
+ addController(t) {
164
+ var s;
165
+ (this._$ES ?? (this._$ES = [])).push(t), this.renderRoot !== void 0 && this.isConnected && ((s = t.hostConnected) == null || s.call(t));
166
+ }
167
+ removeController(t) {
168
+ var s;
169
+ (s = this._$ES) == null || s.splice(this._$ES.indexOf(t) >>> 0, 1);
170
+ }
171
+ _$E_() {
172
+ const t = /* @__PURE__ */ new Map(), s = this.constructor.elementProperties;
173
+ for (const i of s.keys())
174
+ this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
175
+ t.size > 0 && (this._$Ep = t);
176
+ }
177
+ createRenderRoot() {
178
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
179
+ return ls(t, this.constructor.elementStyles), t;
180
+ }
181
+ connectedCallback() {
182
+ var t;
183
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) == null || t.forEach((s) => {
184
+ var i;
185
+ return (i = s.hostConnected) == null ? void 0 : i.call(s);
186
+ });
187
+ }
188
+ enableUpdating(t) {
189
+ }
190
+ disconnectedCallback() {
191
+ var t;
192
+ (t = this._$ES) == null || t.forEach((s) => {
193
+ var i;
194
+ return (i = s.hostDisconnected) == null ? void 0 : i.call(s);
195
+ });
196
+ }
197
+ attributeChangedCallback(t, s, i) {
198
+ this._$AK(t, i);
199
+ }
200
+ _$EO(t, s) {
201
+ var r;
202
+ const i = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, i);
203
+ if (n !== void 0 && i.reflect === !0) {
204
+ const o = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : ot).toAttribute(s, i.type);
205
+ this._$Em = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$Em = null;
206
+ }
207
+ }
208
+ _$AK(t, s) {
209
+ var r;
210
+ const i = this.constructor, n = i._$Eh.get(t);
211
+ if (n !== void 0 && this._$Em !== n) {
212
+ const o = i.getPropertyOptions(n), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((r = o.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? o.converter : ot;
213
+ this._$Em = n, this[n] = a.fromAttribute(s, o.type), this._$Em = null;
214
+ }
215
+ }
216
+ requestUpdate(t, s, i, n = !1, r) {
217
+ if (t !== void 0) {
218
+ if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? It)(n ? r : this[t], s))
219
+ return;
220
+ this.C(t, s, i);
221
+ }
222
+ this.isUpdatePending === !1 && (this._$Eg = this._$EP());
223
+ }
224
+ C(t, s, i) {
225
+ this._$AL.has(t) || this._$AL.set(t, s), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
226
+ }
227
+ async _$EP() {
228
+ this.isUpdatePending = !0;
229
+ try {
230
+ await this._$Eg;
231
+ } catch (s) {
232
+ Promise.reject(s);
233
+ }
234
+ const t = this.scheduleUpdate();
235
+ return t != null && await t, !this.isUpdatePending;
236
+ }
237
+ scheduleUpdate() {
238
+ return this.performUpdate();
239
+ }
240
+ performUpdate() {
241
+ var i;
242
+ if (!this.isUpdatePending)
243
+ return;
244
+ if (!this.hasUpdated) {
245
+ if (this._$Ep) {
246
+ for (const [r, o] of this._$Ep)
247
+ this[r] = o;
248
+ this._$Ep = void 0;
249
+ }
250
+ const n = this.constructor.elementProperties;
251
+ if (n.size > 0)
252
+ for (const [r, o] of n)
253
+ o.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.C(r, this[r], o);
254
+ }
255
+ let t = !1;
256
+ const s = this._$AL;
257
+ try {
258
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), (i = this._$ES) == null || i.forEach((n) => {
259
+ var r;
260
+ return (r = n.hostUpdate) == null ? void 0 : r.call(n);
261
+ }), this.update(s)) : this._$ET();
262
+ } catch (n) {
263
+ throw t = !1, this._$ET(), n;
264
+ }
265
+ t && this._$AE(s);
266
+ }
267
+ willUpdate(t) {
268
+ }
269
+ _$AE(t) {
270
+ var s;
271
+ (s = this._$ES) == null || s.forEach((i) => {
272
+ var n;
273
+ return (n = i.hostUpdated) == null ? void 0 : n.call(i);
274
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
275
+ }
276
+ _$ET() {
277
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
278
+ }
279
+ get updateComplete() {
280
+ return this.getUpdateComplete();
281
+ }
282
+ getUpdateComplete() {
283
+ return this._$Eg;
284
+ }
285
+ shouldUpdate(t) {
286
+ return !0;
287
+ }
288
+ update(t) {
289
+ this._$Ej && (this._$Ej = this._$Ej.forEach((s) => this._$EO(s, this[s]))), this._$ET();
290
+ }
291
+ updated(t) {
292
+ }
293
+ firstUpdated(t) {
294
+ }
295
+ };
296
+ H.elementStyles = [], H.shadowRootOptions = { mode: "open" }, H[q("elementProperties")] = /* @__PURE__ */ new Map(), H[q("finalized")] = /* @__PURE__ */ new Map(), Ct == null || Ct({ ReactiveElement: H }), (C.reactiveElementVersions ?? (C.reactiveElementVersions = [])).push("2.0.1");
297
+ /**
298
+ * @license
299
+ * Copyright 2017 Google LLC
300
+ * SPDX-License-Identifier: BSD-3-Clause
301
+ */
302
+ const Y = globalThis, at = Y.trustedTypes, Vt = at ? at.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Te = "$lit$", S = `lit$${(Math.random() + "").slice(9)}$`, ke = "?" + S, gs = `<${ke}>`, U = document, Q = () => U.createComment(""), Z = (e) => e === null || typeof e != "object" && typeof e != "function", Oe = Array.isArray, vs = (e) => Oe(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", Et = `[
303
+ \f\r]`, G = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, te = /-->/g, ee = />/g, O = RegExp(`>|${Et}(?:([^\\s"'>=/]+)(${Et}*=${Et}*(?:[^
304
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), se = /'/g, ie = /"/g, Pe = /^(?:script|style|textarea|title)$/i, ms = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), $ = ms(1), E = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), ne = /* @__PURE__ */ new WeakMap(), L = U.createTreeWalker(U, 129);
305
+ function Le(e, t) {
306
+ if (!Array.isArray(e) || !e.hasOwnProperty("raw"))
307
+ throw Error("invalid template strings array");
308
+ return Vt !== void 0 ? Vt.createHTML(t) : t;
309
+ }
310
+ const ys = (e, t) => {
311
+ const s = e.length - 1, i = [];
312
+ let n, r = t === 2 ? "<svg>" : "", o = G;
313
+ for (let a = 0; a < s; a++) {
314
+ const l = e[a];
315
+ let c, h, d = -1, p = 0;
316
+ for (; p < l.length && (o.lastIndex = p, h = o.exec(l), h !== null); )
317
+ p = o.lastIndex, o === G ? h[1] === "!--" ? o = te : h[1] !== void 0 ? o = ee : h[2] !== void 0 ? (Pe.test(h[2]) && (n = RegExp("</" + h[2], "g")), o = O) : h[3] !== void 0 && (o = O) : o === O ? h[0] === ">" ? (o = n ?? G, d = -1) : h[1] === void 0 ? d = -2 : (d = o.lastIndex - h[2].length, c = h[1], o = h[3] === void 0 ? O : h[3] === '"' ? ie : se) : o === ie || o === se ? o = O : o === te || o === ee ? o = G : (o = O, n = void 0);
318
+ const f = o === O && e[a + 1].startsWith("/>") ? " " : "";
319
+ r += o === G ? l + gs : d >= 0 ? (i.push(c), l.slice(0, d) + Te + l.slice(d) + S + f) : l + S + (d === -2 ? a : f);
320
+ }
321
+ return [Le(e, r + (e[s] || "<?>") + (t === 2 ? "</svg>" : "")), i];
322
+ };
323
+ class X {
324
+ constructor({ strings: t, _$litType$: s }, i) {
325
+ let n;
326
+ this.parts = [];
327
+ let r = 0, o = 0;
328
+ const a = t.length - 1, l = this.parts, [c, h] = ys(t, s);
329
+ if (this.el = X.createElement(c, i), L.currentNode = this.el.content, s === 2) {
330
+ const d = this.el.content.firstChild;
331
+ d.replaceWith(...d.childNodes);
332
+ }
333
+ for (; (n = L.nextNode()) !== null && l.length < a; ) {
334
+ if (n.nodeType === 1) {
335
+ if (n.hasAttributes())
336
+ for (const d of n.getAttributeNames())
337
+ if (d.endsWith(Te)) {
338
+ const p = h[o++], f = n.getAttribute(d).split(S), _ = /([.?@])?(.*)/.exec(p);
339
+ l.push({ type: 1, index: r, name: _[2], strings: f, ctor: _[1] === "." ? _s : _[1] === "?" ? xs : _[1] === "@" ? ws : vt }), n.removeAttribute(d);
340
+ } else
341
+ d.startsWith(S) && (l.push({ type: 6, index: r }), n.removeAttribute(d));
342
+ if (Pe.test(n.tagName)) {
343
+ const d = n.textContent.split(S), p = d.length - 1;
344
+ if (p > 0) {
345
+ n.textContent = at ? at.emptyScript : "";
346
+ for (let f = 0; f < p; f++)
347
+ n.append(d[f], Q()), L.nextNode(), l.push({ type: 2, index: ++r });
348
+ n.append(d[p], Q());
349
+ }
350
+ }
351
+ } else if (n.nodeType === 8)
352
+ if (n.data === ke)
353
+ l.push({ type: 2, index: r });
354
+ else {
355
+ let d = -1;
356
+ for (; (d = n.data.indexOf(S, d + 1)) !== -1; )
357
+ l.push({ type: 7, index: r }), d += S.length - 1;
358
+ }
359
+ r++;
360
+ }
361
+ }
362
+ static createElement(t, s) {
363
+ const i = U.createElement("template");
364
+ return i.innerHTML = t, i;
365
+ }
366
+ }
367
+ function B(e, t, s = e, i) {
368
+ var o, a;
369
+ if (t === E)
370
+ return t;
371
+ let n = i !== void 0 ? (o = s._$Co) == null ? void 0 : o[i] : s._$Cl;
372
+ const r = Z(t) ? void 0 : t._$litDirective$;
373
+ return (n == null ? void 0 : n.constructor) !== r && ((a = n == null ? void 0 : n._$AO) == null || a.call(n, !1), r === void 0 ? n = void 0 : (n = new r(e), n._$AT(e, s, i)), i !== void 0 ? (s._$Co ?? (s._$Co = []))[i] = n : s._$Cl = n), n !== void 0 && (t = B(e, n._$AS(e, t.values), n, i)), t;
374
+ }
375
+ class bs {
376
+ constructor(t, s) {
377
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = s;
378
+ }
379
+ get parentNode() {
380
+ return this._$AM.parentNode;
381
+ }
382
+ get _$AU() {
383
+ return this._$AM._$AU;
384
+ }
385
+ u(t) {
386
+ const { el: { content: s }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? U).importNode(s, !0);
387
+ L.currentNode = n;
388
+ let r = L.nextNode(), o = 0, a = 0, l = i[0];
389
+ for (; l !== void 0; ) {
390
+ if (o === l.index) {
391
+ let c;
392
+ l.type === 2 ? c = new V(r, r.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(r, l.name, l.strings, this, t) : l.type === 6 && (c = new As(r, this, t)), this._$AV.push(c), l = i[++a];
393
+ }
394
+ o !== (l == null ? void 0 : l.index) && (r = L.nextNode(), o++);
395
+ }
396
+ return L.currentNode = U, n;
397
+ }
398
+ p(t) {
399
+ let s = 0;
400
+ for (const i of this._$AV)
401
+ i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, s), s += i.strings.length - 2) : i._$AI(t[s])), s++;
402
+ }
403
+ }
404
+ class V {
405
+ get _$AU() {
406
+ var t;
407
+ return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
408
+ }
409
+ constructor(t, s, i, n) {
410
+ this.type = 2, this._$AH = u, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = i, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
411
+ }
412
+ get parentNode() {
413
+ let t = this._$AA.parentNode;
414
+ const s = this._$AM;
415
+ return s !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = s.parentNode), t;
416
+ }
417
+ get startNode() {
418
+ return this._$AA;
419
+ }
420
+ get endNode() {
421
+ return this._$AB;
422
+ }
423
+ _$AI(t, s = this) {
424
+ t = B(this, t, s), Z(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : vs(t) ? this.T(t) : this._(t);
425
+ }
426
+ k(t) {
427
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
428
+ }
429
+ $(t) {
430
+ this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
431
+ }
432
+ _(t) {
433
+ this._$AH !== u && Z(this._$AH) ? this._$AA.nextSibling.data = t : this.$(U.createTextNode(t)), this._$AH = t;
434
+ }
435
+ g(t) {
436
+ var r;
437
+ const { values: s, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = X.createElement(Le(i.h, i.h[0]), this.options)), i);
438
+ if (((r = this._$AH) == null ? void 0 : r._$AD) === n)
439
+ this._$AH.p(s);
440
+ else {
441
+ const o = new bs(n, this), a = o.u(this.options);
442
+ o.p(s), this.$(a), this._$AH = o;
443
+ }
444
+ }
445
+ _$AC(t) {
446
+ let s = ne.get(t.strings);
447
+ return s === void 0 && ne.set(t.strings, s = new X(t)), s;
448
+ }
449
+ T(t) {
450
+ Oe(this._$AH) || (this._$AH = [], this._$AR());
451
+ const s = this._$AH;
452
+ let i, n = 0;
453
+ for (const r of t)
454
+ n === s.length ? s.push(i = new V(this.k(Q()), this.k(Q()), this, this.options)) : i = s[n], i._$AI(r), n++;
455
+ n < s.length && (this._$AR(i && i._$AB.nextSibling, n), s.length = n);
456
+ }
457
+ _$AR(t = this._$AA.nextSibling, s) {
458
+ var i;
459
+ for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, s); t && t !== this._$AB; ) {
460
+ const n = t.nextSibling;
461
+ t.remove(), t = n;
462
+ }
463
+ }
464
+ setConnected(t) {
465
+ var s;
466
+ this._$AM === void 0 && (this._$Cv = t, (s = this._$AP) == null || s.call(this, t));
467
+ }
468
+ }
469
+ class vt {
470
+ get tagName() {
471
+ return this.element.tagName;
472
+ }
473
+ get _$AU() {
474
+ return this._$AM._$AU;
475
+ }
476
+ constructor(t, s, i, n, r) {
477
+ this.type = 1, this._$AH = u, this._$AN = void 0, this.element = t, this.name = s, this._$AM = n, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = u;
478
+ }
479
+ _$AI(t, s = this, i, n) {
480
+ const r = this.strings;
481
+ let o = !1;
482
+ if (r === void 0)
483
+ t = B(this, t, s, 0), o = !Z(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
484
+ else {
485
+ const a = t;
486
+ let l, c;
487
+ for (t = r[0], l = 0; l < r.length - 1; l++)
488
+ c = B(this, a[i + l], s, l), c === E && (c = this._$AH[l]), o || (o = !Z(c) || c !== this._$AH[l]), c === u ? t = u : t !== u && (t += (c ?? "") + r[l + 1]), this._$AH[l] = c;
489
+ }
490
+ o && !n && this.O(t);
491
+ }
492
+ O(t) {
493
+ t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
494
+ }
495
+ }
496
+ class _s extends vt {
497
+ constructor() {
498
+ super(...arguments), this.type = 3;
499
+ }
500
+ O(t) {
501
+ this.element[this.name] = t === u ? void 0 : t;
502
+ }
503
+ }
504
+ let xs = class extends vt {
505
+ constructor() {
506
+ super(...arguments), this.type = 4;
507
+ }
508
+ O(t) {
509
+ this.element.toggleAttribute(this.name, !!t && t !== u);
510
+ }
511
+ };
512
+ class ws extends vt {
513
+ constructor(t, s, i, n, r) {
514
+ super(t, s, i, n, r), this.type = 5;
515
+ }
516
+ _$AI(t, s = this) {
517
+ if ((t = B(this, t, s, 0) ?? u) === E)
518
+ return;
519
+ const i = this._$AH, n = t === u && i !== u || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== u && (i === u || n);
520
+ n && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
521
+ }
522
+ handleEvent(t) {
523
+ var s;
524
+ typeof this._$AH == "function" ? this._$AH.call(((s = this.options) == null ? void 0 : s.host) ?? this.element, t) : this._$AH.handleEvent(t);
525
+ }
526
+ }
527
+ class As {
528
+ constructor(t, s, i) {
529
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = i;
530
+ }
531
+ get _$AU() {
532
+ return this._$AM._$AU;
533
+ }
534
+ _$AI(t) {
535
+ B(this, t);
536
+ }
537
+ }
538
+ const Tt = Y.litHtmlPolyfillSupport;
539
+ Tt == null || Tt(X, V), (Y.litHtmlVersions ?? (Y.litHtmlVersions = [])).push("3.0.2");
540
+ const Ss = (e, t, s) => {
541
+ const i = (s == null ? void 0 : s.renderBefore) ?? t;
542
+ let n = i._$litPart$;
543
+ if (n === void 0) {
544
+ const r = (s == null ? void 0 : s.renderBefore) ?? null;
545
+ i._$litPart$ = n = new V(t.insertBefore(Q(), r), r, void 0, s ?? {});
546
+ }
547
+ return n._$AI(e), n;
548
+ };
549
+ /**
550
+ * @license
551
+ * Copyright 2017 Google LLC
552
+ * SPDX-License-Identifier: BSD-3-Clause
553
+ */
554
+ let y = class extends H {
555
+ constructor() {
556
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
557
+ }
558
+ createRenderRoot() {
559
+ var s;
560
+ const t = super.createRenderRoot();
561
+ return (s = this.renderOptions).renderBefore ?? (s.renderBefore = t.firstChild), t;
562
+ }
563
+ update(t) {
564
+ const s = this.render();
565
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ss(s, this.renderRoot, this.renderOptions);
566
+ }
567
+ connectedCallback() {
568
+ var t;
569
+ super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
570
+ }
571
+ disconnectedCallback() {
572
+ var t;
573
+ super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
574
+ }
575
+ render() {
576
+ return E;
577
+ }
578
+ };
579
+ var Ce;
580
+ y._$litElement$ = !0, y.finalized = !0, (Ce = globalThis.litElementHydrateSupport) == null || Ce.call(globalThis, { LitElement: y });
581
+ const kt = globalThis.litElementPolyfillSupport;
582
+ kt == null || kt({ LitElement: y });
583
+ (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
584
+ const Cs = { name: "send", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8.41642 6.29292C5.99705 5.18016 3.38612 7.41823 4.12858 9.96847L10.5427 32L4.12858 54.0315C3.38612 56.5818 5.99704 58.8198 8.41642 57.7071L58.1942 34.8125C60.6019 33.7051 60.6019 30.2949 58.1942 29.1875L8.41642 6.29292ZM14.2569 29.9351L8.74174 10.9913L49.9295 29.9351H14.2569ZM14.2568 34.0651L8.74174 53.0087L49.9291 34.0651H14.2568Z"/></svg>' }, R = {
585
+ allRenderFn: !1,
586
+ cmpDidLoad: !0,
587
+ cmpDidUnload: !1,
588
+ cmpDidUpdate: !0,
589
+ cmpDidRender: !0,
590
+ cmpWillLoad: !0,
591
+ cmpWillUpdate: !0,
592
+ cmpWillRender: !0,
593
+ connectedCallback: !0,
594
+ disconnectedCallback: !0,
595
+ element: !0,
596
+ event: !0,
597
+ hasRenderFn: !0,
598
+ lifecycle: !0,
599
+ hostListener: !0,
600
+ hostListenerTargetWindow: !0,
601
+ hostListenerTargetDocument: !0,
602
+ hostListenerTargetBody: !0,
603
+ hostListenerTargetParent: !1,
604
+ hostListenerTarget: !0,
605
+ member: !0,
606
+ method: !0,
607
+ mode: !0,
608
+ observeAttribute: !0,
609
+ prop: !0,
610
+ propMutable: !0,
611
+ reflect: !0,
612
+ scoped: !0,
613
+ shadowDom: !0,
614
+ slot: !0,
615
+ cssAnnotations: !0,
616
+ state: !0,
617
+ style: !0,
618
+ svg: !0,
619
+ updatable: !0,
620
+ vdomAttribute: !0,
621
+ vdomXlink: !0,
622
+ vdomClass: !0,
623
+ vdomFunctional: !0,
624
+ vdomKey: !0,
625
+ vdomListener: !0,
626
+ vdomRef: !0,
627
+ vdomPropOrAttr: !0,
628
+ vdomRender: !0,
629
+ vdomStyle: !0,
630
+ vdomText: !0,
631
+ watchCallback: !0,
632
+ taskQueue: !0,
633
+ hotModuleReplacement: !1,
634
+ isDebug: !1,
635
+ isDev: !1,
636
+ isTesting: !1,
637
+ hydrateServerSide: !1,
638
+ hydrateClientSide: !1,
639
+ lifecycleDOMEvents: !1,
640
+ lazyLoad: !1,
641
+ profile: !1,
642
+ slotRelocation: !0,
643
+ appendChildSlotFix: !1,
644
+ cloneNodeFix: !1,
645
+ hydratedAttribute: !1,
646
+ hydratedClass: !0,
647
+ safari10: !1,
648
+ scriptDataOpts: !1,
649
+ scopedSlotTextContentFix: !1,
650
+ shadowDomShim: !1,
651
+ slotChildNodesFix: !1,
652
+ invisiblePrehydration: !0,
653
+ propBoolean: !0,
654
+ propNumber: !0,
655
+ propString: !0,
656
+ cssVarShim: !1,
657
+ constructableCSS: !0,
658
+ cmpShouldUpdate: !0,
659
+ devTools: !1,
660
+ dynamicImportShim: !1,
661
+ shadowDelegatesFocus: !0,
662
+ initializeNextTick: !1,
663
+ asyncLoading: !1,
664
+ asyncQueue: !1,
665
+ transformTagName: !1,
666
+ attachStyles: !0
667
+ };
668
+ let M, Ue, mt, Ne = !1, lt = !1, Bt = !1, m = !1, re = null, Ut = !1;
669
+ const yt = typeof window < "u" ? window : {}, x = yt.document || { head: {} }, He = yt.HTMLElement || class {
670
+ }, v = {
671
+ $flags$: 0,
672
+ $resourcesUrl$: "",
673
+ jmp: (e) => e(),
674
+ raf: (e) => requestAnimationFrame(e),
675
+ ael: (e, t, s, i) => e.addEventListener(t, s, i),
676
+ rel: (e, t, s, i) => e.removeEventListener(t, s, i),
677
+ ce: (e, t) => new CustomEvent(e, t)
678
+ }, Es = /* @__PURE__ */ (() => {
679
+ let e = !1;
680
+ try {
681
+ x.addEventListener("e", null, Object.defineProperty({}, "passive", {
682
+ get() {
683
+ e = !0;
684
+ }
685
+ }));
686
+ } catch {
687
+ }
688
+ return e;
689
+ })(), Ts = (e) => Promise.resolve(e), ks = /* @__PURE__ */ (() => {
690
+ try {
691
+ return new CSSStyleSheet(), typeof new CSSStyleSheet().replace == "function";
692
+ } catch {
693
+ }
694
+ return !1;
695
+ })(), Re = (e, t, s, i) => {
696
+ s && s.map(([n, r, o]) => {
697
+ const a = Ps(e, n), l = Os(t, o), c = Ls(n);
698
+ v.ael(a, r, l, c), (t.$rmListeners$ = t.$rmListeners$ || []).push(() => v.rel(a, r, l, c));
699
+ });
700
+ }, Os = (e, t) => (s) => {
701
+ try {
702
+ R.lazyLoad || e.$hostElement$[t](s);
703
+ } catch (i) {
704
+ tt(i);
705
+ }
706
+ }, Ps = (e, t) => t & 4 ? x : t & 8 ? yt : t & 16 ? x.body : e, Ls = (e) => Es ? {
707
+ passive: (e & 1) !== 0,
708
+ capture: (e & 2) !== 0
709
+ } : (e & 2) !== 0, oe = "http://www.w3.org/1999/xlink", N = (e, t = "") => () => {
710
+ }, ae = /* @__PURE__ */ new WeakMap(), Us = (e, t, s) => {
711
+ let i = ht.get(e);
712
+ ks && s ? (i = i || new CSSStyleSheet(), i.replace(t)) : i = t, ht.set(e, i);
713
+ }, Ns = (e, t, s, i) => {
714
+ let n = Me(t, s), r = ht.get(n);
715
+ if (e = e.nodeType === 11 ? e : x, r)
716
+ if (typeof r == "string") {
717
+ e = e.head || e;
718
+ let o = ae.get(e), a;
719
+ o || ae.set(e, o = /* @__PURE__ */ new Set()), o.has(n) || (a = x.createElement("style"), a.innerHTML = r, e.insertBefore(a, e.querySelector("link")), o && o.add(n));
720
+ } else
721
+ e.adoptedStyleSheets.includes(r) || (e.adoptedStyleSheets = [...e.adoptedStyleSheets, r]);
722
+ return n;
723
+ }, Hs = (e) => {
724
+ const t = e.$cmpMeta$, s = e.$hostElement$, i = t.$flags$, n = N("attachStyles", t.$tagName$), r = Ns(s.shadowRoot ? s.shadowRoot : s.getRootNode(), t, e.$modeName$);
725
+ i & 10 && (s["s-sc"] = r, s.classList.add(r + "-h"), i & 2 && s.classList.add(r + "-s")), n();
726
+ }, Me = (e, t) => "sc-" + (t && e.$flags$ & 32 ? e.$tagName$ + "-" + t : e.$tagName$), Rs = (e) => di.map((t) => t(e)).find((t) => !!t), le = {}, Ms = "http://www.w3.org/2000/svg", js = "http://www.w3.org/1999/xhtml", Ds = (e) => e != null, zt = (e) => (e = typeof e, e === "object" || e === "function"), D = (e, t, ...s) => {
727
+ let i = null, n = null, r = null, o = !1, a = !1, l = [];
728
+ const c = (d) => {
729
+ for (let p = 0; p < d.length; p++)
730
+ i = d[p], Array.isArray(i) ? c(i) : i != null && typeof i != "boolean" && ((o = typeof e != "function" && !zt(i)) && (i = String(i)), o && a ? l[l.length - 1].$text$ += i : l.push(o ? ct(null, i) : i), a = o);
731
+ };
732
+ if (c(s), t) {
733
+ t.key && (n = t.key), t.name && (r = t.name);
734
+ {
735
+ const d = t.className || t.class;
736
+ d && (t.class = typeof d != "object" ? d : Object.keys(d).filter((p) => d[p]).join(" "));
737
+ }
738
+ }
739
+ if (typeof e == "function")
740
+ return e(t === null ? {} : t, l, Bs);
741
+ const h = ct(e, null);
742
+ return h.$attrs$ = t, l.length > 0 && (h.$children$ = l), h.$key$ = n, h.$name$ = r, h;
743
+ }, ct = (e, t) => {
744
+ const s = {
745
+ $flags$: 0,
746
+ $tag$: e,
747
+ $text$: t,
748
+ $elm$: null,
749
+ $children$: null
750
+ };
751
+ return s.$attrs$ = null, s.$key$ = null, s.$name$ = null, s;
752
+ }, Ft = {}, Is = (e) => e && e.$tag$ === Ft, Bs = {
753
+ forEach: (e, t) => e.map(ce).forEach(t),
754
+ map: (e, t) => e.map(ce).map(t).map(zs)
755
+ }, ce = (e) => ({
756
+ vattrs: e.$attrs$,
757
+ vchildren: e.$children$,
758
+ vkey: e.$key$,
759
+ vname: e.$name$,
760
+ vtag: e.$tag$,
761
+ vtext: e.$text$
762
+ }), zs = (e) => {
763
+ if (typeof e.vtag == "function") {
764
+ const s = Object.assign({}, e.vattrs);
765
+ return e.vkey && (s.key = e.vkey), e.vname && (s.name = e.vname), D(e.vtag, s, ...e.vchildren || []);
766
+ }
767
+ const t = ct(e.vtag, e.vtext);
768
+ return t.$attrs$ = e.vattrs, t.$children$ = e.vchildren, t.$key$ = e.vkey, t.$name$ = e.vname, t;
769
+ }, de = (e, t, s, i, n, r) => {
770
+ if (s !== i) {
771
+ let o = fe(e, t), a = t.toLowerCase();
772
+ if (t === "class") {
773
+ const l = e.classList, c = he(s), h = he(i);
774
+ l.remove(...c.filter((d) => d && !h.includes(d))), l.add(...h.filter((d) => d && !c.includes(d)));
775
+ } else if (t === "style") {
776
+ for (const l in s)
777
+ (!i || i[l] == null) && (l.includes("-") ? e.style.removeProperty(l) : e.style[l] = "");
778
+ for (const l in i)
779
+ (!s || i[l] !== s[l]) && (l.includes("-") ? e.style.setProperty(l, i[l]) : e.style[l] = i[l]);
780
+ } else if (t !== "key")
781
+ if (t === "ref")
782
+ i && i(e);
783
+ else if (!e.__lookupSetter__(t) && t[0] === "o" && t[1] === "n")
784
+ t[2] === "-" ? t = t.slice(3) : fe(yt, a) ? t = a.slice(2) : t = a[2] + t.slice(3), s && v.rel(e, t, s, !1), i && v.ael(e, t, i, !1);
785
+ else {
786
+ const l = zt(i);
787
+ if ((o || l && i !== null) && !n)
788
+ try {
789
+ if (e.tagName.includes("-"))
790
+ e[t] = i;
791
+ else {
792
+ let h = i ?? "";
793
+ t === "list" ? o = !1 : (s == null || e[t] != h) && (e[t] = h);
794
+ }
795
+ } catch {
796
+ }
797
+ let c = !1;
798
+ a !== (a = a.replace(/^xlink\:?/, "")) && (t = a, c = !0), i == null || i === !1 ? (i !== !1 || e.getAttribute(t) === "") && (c ? e.removeAttributeNS(oe, t) : e.removeAttribute(t)) : (!o || r & 4 || n) && !l && (i = i === !0 ? "" : i, c ? e.setAttributeNS(oe, t, i) : e.setAttribute(t, i));
799
+ }
800
+ }
801
+ }, Fs = /\s/, he = (e) => e ? e.split(Fs) : [], je = (e, t, s, i) => {
802
+ const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, r = e && e.$attrs$ || le, o = t.$attrs$ || le;
803
+ for (i in r)
804
+ i in o || de(n, i, r[i], void 0, s, t.$flags$);
805
+ for (i in o)
806
+ de(n, i, r[i], o[i], s, t.$flags$);
807
+ }, dt = (e, t, s, i) => {
808
+ let n = t.$children$[s], r = 0, o, a, l;
809
+ if (Ne || (Bt = !0, n.$tag$ === "slot" && (M && i.classList.add(M + "-s"), n.$flags$ |= n.$children$ ? (
810
+ // slot element has fallback content
811
+ 2
812
+ ) : (
813
+ // slot element does not have fallback content
814
+ 1
815
+ ))), n.$text$ !== null)
816
+ o = n.$elm$ = x.createTextNode(n.$text$);
817
+ else if (n.$flags$ & 1)
818
+ o = n.$elm$ = x.createTextNode("");
819
+ else {
820
+ if (m || (m = n.$tag$ === "svg"), o = n.$elm$ = x.createElementNS(m ? Ms : js, n.$flags$ & 2 ? "slot-fb" : n.$tag$), m && n.$tag$ === "foreignObject" && (m = !1), je(null, n, m), Ds(M) && o["s-si"] !== M && o.classList.add(o["s-si"] = M), n.$children$)
821
+ for (r = 0; r < n.$children$.length; ++r)
822
+ a = dt(e, n, r, o), a && o.appendChild(a);
823
+ n.$tag$ === "svg" ? m = !1 : o.tagName === "foreignObject" && (m = !0);
824
+ }
825
+ return o["s-hn"] = mt, n.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = Ue, o["s-sn"] = n.$name$ || "", l = e && e.$children$ && e.$children$[s], l && l.$tag$ === n.$tag$ && e.$elm$ && J(e.$elm$, !1)), o;
826
+ }, J = (e, t) => {
827
+ v.$flags$ |= 1;
828
+ const s = e.childNodes;
829
+ for (let i = s.length - 1; i >= 0; i--) {
830
+ const n = s[i];
831
+ n["s-hn"] !== mt && n["s-ol"] && (Be(n).insertBefore(n, Wt(n)), n["s-ol"].remove(), n["s-ol"] = void 0, Bt = !0), t && J(n, t);
832
+ }
833
+ v.$flags$ &= -2;
834
+ }, De = (e, t, s, i, n, r) => {
835
+ let o = e["s-cr"] && e["s-cr"].parentNode || e, a;
836
+ for (o.shadowRoot && o.tagName === mt && (o = o.shadowRoot); n <= r; ++n)
837
+ i[n] && (a = dt(null, s, n, e), a && (i[n].$elm$ = a, o.insertBefore(a, Wt(t))));
838
+ }, Ie = (e, t, s, i, n) => {
839
+ for (; t <= s; ++t)
840
+ (i = e[t]) && (n = i.$elm$, We(i), lt = !0, n["s-ol"] ? n["s-ol"].remove() : J(n, !0), n.remove());
841
+ }, Ws = (e, t, s, i) => {
842
+ let n = 0, r = 0, o = 0, a = 0, l = t.length - 1, c = t[0], h = t[l], d = i.length - 1, p = i[0], f = i[d], _, st;
843
+ for (; n <= l && r <= d; )
844
+ if (c == null)
845
+ c = t[++n];
846
+ else if (h == null)
847
+ h = t[--l];
848
+ else if (p == null)
849
+ p = i[++r];
850
+ else if (f == null)
851
+ f = i[--d];
852
+ else if (it(c, p))
853
+ j(c, p), c = t[++n], p = i[++r];
854
+ else if (it(h, f))
855
+ j(h, f), h = t[--l], f = i[--d];
856
+ else if (it(c, f))
857
+ (c.$tag$ === "slot" || f.$tag$ === "slot") && J(c.$elm$.parentNode, !1), j(c, f), e.insertBefore(c.$elm$, h.$elm$.nextSibling), c = t[++n], f = i[--d];
858
+ else if (it(h, p))
859
+ (c.$tag$ === "slot" || f.$tag$ === "slot") && J(h.$elm$.parentNode, !1), j(h, p), e.insertBefore(h.$elm$, c.$elm$), h = t[--l], p = i[++r];
860
+ else {
861
+ for (o = -1, a = n; a <= l; ++a)
862
+ if (t[a] && t[a].$key$ !== null && t[a].$key$ === p.$key$) {
863
+ o = a;
864
+ break;
865
+ }
866
+ o >= 0 ? (st = t[o], st.$tag$ !== p.$tag$ ? _ = dt(t && t[r], s, o, e) : (j(st, p), t[o] = void 0, _ = st.$elm$), p = i[++r]) : (_ = dt(t && t[r], s, r, e), p = i[++r]), _ && Be(c.$elm$).insertBefore(_, Wt(c.$elm$));
867
+ }
868
+ n > l ? De(e, i[d + 1] == null ? null : i[d + 1].$elm$, s, i, r, d) : r > d && Ie(t, n, l);
869
+ }, it = (e, t) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : e.$key$ === t.$key$ : !1, Wt = (e) => e && e["s-ol"] || e, Be = (e) => (e["s-ol"] ? e["s-ol"] : e).parentNode, j = (e, t) => {
870
+ const s = t.$elm$ = e.$elm$, i = e.$children$, n = t.$children$, r = t.$tag$, o = t.$text$;
871
+ let a;
872
+ o === null ? (m = r === "svg" ? !0 : r === "foreignObject" ? !1 : m, r === "slot" || je(e, t, m), i !== null && n !== null ? Ws(s, i, t, n) : n !== null ? (e.$text$ !== null && (s.textContent = ""), De(s, null, t, n, 0, n.length - 1)) : i !== null && Ie(i, 0, i.length - 1), m && r === "svg" && (m = !1)) : (a = s["s-cr"]) ? a.parentNode.textContent = o : e.$text$ !== o && (s.data = o);
873
+ }, ze = (e) => {
874
+ let t = e.childNodes, s, i, n, r, o, a;
875
+ for (i = 0, n = t.length; i < n; i++)
876
+ if (s = t[i], s.nodeType === 1) {
877
+ if (s["s-sr"]) {
878
+ for (o = s["s-sn"], s.hidden = !1, r = 0; r < n; r++)
879
+ if (a = t[r].nodeType, t[r]["s-hn"] !== s["s-hn"] || o !== "") {
880
+ if (a === 1 && o === t[r].getAttribute("slot")) {
881
+ s.hidden = !0;
882
+ break;
883
+ }
884
+ } else if (a === 1 || a === 3 && t[r].textContent.trim() !== "") {
885
+ s.hidden = !0;
886
+ break;
887
+ }
888
+ }
889
+ ze(s);
890
+ }
891
+ }, b = [], Fe = (e) => {
892
+ let t, s, i, n, r, o, a = 0, l = e.childNodes, c = l.length;
893
+ for (; a < c; a++) {
894
+ if (t = l[a], t["s-sr"] && (s = t["s-cr"]) && s.parentNode)
895
+ for (i = s.parentNode.childNodes, n = t["s-sn"], o = i.length - 1; o >= 0; o--)
896
+ s = i[o], !s["s-cn"] && !s["s-nr"] && s["s-hn"] !== t["s-hn"] && (pe(s, n) ? (r = b.find((h) => h.$nodeToRelocate$ === s), lt = !0, s["s-sn"] = s["s-sn"] || n, r ? r.$slotRefNode$ = t : b.push({
897
+ $slotRefNode$: t,
898
+ $nodeToRelocate$: s
899
+ }), s["s-sr"] && b.map((h) => {
900
+ pe(h.$nodeToRelocate$, s["s-sn"]) && (r = b.find((d) => d.$nodeToRelocate$ === s), r && !h.$slotRefNode$ && (h.$slotRefNode$ = r.$slotRefNode$));
901
+ })) : b.some((h) => h.$nodeToRelocate$ === s) || b.push({
902
+ $nodeToRelocate$: s
903
+ }));
904
+ t.nodeType === 1 && Fe(t);
905
+ }
906
+ }, pe = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", We = (e) => {
907
+ e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(We);
908
+ }, Gs = (e, t) => {
909
+ const s = e.$hostElement$, i = e.$cmpMeta$, n = e.$vnode$ || ct(null, null), r = Is(t) ? t : D(null, null, t);
910
+ mt = s.tagName, i.$attrsToReflect$ && (r.$attrs$ = r.$attrs$ || {}, i.$attrsToReflect$.map(([o, a]) => r.$attrs$[a] = s[o])), r.$tag$ = null, r.$flags$ |= 4, e.$vnode$ = r, r.$elm$ = n.$elm$ = s.shadowRoot || s, M = s["s-sc"], Ue = s["s-cr"], Ne = (i.$flags$ & 1) !== 0, lt = !1, j(n, r);
911
+ {
912
+ if (v.$flags$ |= 1, Bt) {
913
+ Fe(r.$elm$);
914
+ let o, a, l, c, h, d, p = 0;
915
+ for (; p < b.length; p++)
916
+ o = b[p], a = o.$nodeToRelocate$, a["s-ol"] || (l = x.createTextNode(""), l["s-nr"] = a, a.parentNode.insertBefore(a["s-ol"] = l, a));
917
+ for (p = 0; p < b.length; p++)
918
+ if (o = b[p], a = o.$nodeToRelocate$, o.$slotRefNode$) {
919
+ for (c = o.$slotRefNode$.parentNode, h = o.$slotRefNode$.nextSibling, l = a["s-ol"]; l = l.previousSibling; )
920
+ if (d = l["s-nr"], d && d["s-sn"] === a["s-sn"] && c === d.parentNode && (d = d.nextSibling, !d || !d["s-nr"])) {
921
+ h = d;
922
+ break;
923
+ }
924
+ (!h && c !== a.parentNode || a.nextSibling !== h) && a !== h && (!a["s-hn"] && a["s-ol"] && (a["s-hn"] = a["s-ol"].parentNode.nodeName), c.insertBefore(a, h));
925
+ } else
926
+ a.nodeType === 1 && (a.hidden = !0);
927
+ }
928
+ lt && ze(r.$elm$), v.$flags$ &= -2, b.length = 0;
929
+ }
930
+ }, qs = (e) => e, Ys = (e, t, s) => {
931
+ const i = qs(e);
932
+ return {
933
+ emit: (n) => Ks(i, t, {
934
+ bubbles: !!(s & 4),
935
+ composed: !!(s & 2),
936
+ cancelable: !!(s & 1),
937
+ detail: n
938
+ })
939
+ };
940
+ }, Ks = (e, t, s) => {
941
+ const i = v.ce(t, s);
942
+ return e.dispatchEvent(i), i;
943
+ }, Qs = (e, t) => {
944
+ }, Ge = (e, t) => (e.$flags$ |= 16, Qs(e, e.$ancestorComponent$), ui(() => Zs(e, t))), Zs = (e, t) => {
945
+ const s = e.$hostElement$, i = N("scheduleUpdate", e.$cmpMeta$.$tagName$), n = s;
946
+ let r;
947
+ return t ? r = I(n, "componentWillLoad") : r = I(n, "componentWillUpdate"), r = ue(r, () => I(n, "componentWillRender")), i(), ue(r, () => Xs(e, n, t));
948
+ }, Xs = async (e, t, s) => {
949
+ const i = e.$hostElement$, n = N("update", e.$cmpMeta$.$tagName$);
950
+ i["s-rc"], s && Hs(e);
951
+ const r = N("render", e.$cmpMeta$.$tagName$);
952
+ Js(e, t, i), r(), n(), Vs(e);
953
+ }, Js = (e, t, s) => {
954
+ try {
955
+ re = t, t = t.render && t.render(), e.$flags$ &= -17, e.$flags$ |= 2, (R.hasRenderFn || R.reflect) && (R.vdomRender || R.reflect) && (R.hydrateServerSide || Gs(e, t));
956
+ } catch (a) {
957
+ tt(a, e.$hostElement$);
958
+ }
959
+ return re = null, null;
960
+ }, Vs = (e) => {
961
+ const t = e.$cmpMeta$.$tagName$, s = e.$hostElement$, i = N("postUpdate", t), n = s;
962
+ e.$ancestorComponent$, I(n, "componentDidRender"), e.$flags$ & 64 ? (I(n, "componentDidUpdate"), i()) : (e.$flags$ |= 64, I(n, "componentDidLoad"), i());
963
+ }, I = (e, t, s) => {
964
+ if (e && e[t])
965
+ try {
966
+ return e[t](s);
967
+ } catch (i) {
968
+ tt(i);
969
+ }
970
+ }, ue = (e, t) => e && e.then ? e.then(t) : t(), ti = (e, t) => e != null && !zt(e) ? t & 4 ? e === "false" ? !1 : e === "" || !!e : t & 2 ? parseFloat(e) : t & 1 ? String(e) : e : e, ei = (e, t) => bt(e).$instanceValues$.get(t), si = (e, t, s, i) => {
971
+ const n = bt(e), r = e, o = n.$instanceValues$.get(t), a = n.$flags$, l = r;
972
+ s = ti(s, i.$members$[t][0]);
973
+ const c = Number.isNaN(o) && Number.isNaN(s);
974
+ if (s !== o && !c) {
975
+ n.$instanceValues$.set(t, s);
976
+ {
977
+ if (i.$watchers$ && a & 128) {
978
+ const d = i.$watchers$[t];
979
+ d && d.map((p) => {
980
+ try {
981
+ l[p](s, o, t);
982
+ } catch (f) {
983
+ tt(f, r);
984
+ }
985
+ });
986
+ }
987
+ if ((a & 18) === 2) {
988
+ if (l.componentShouldUpdate && l.componentShouldUpdate(s, o, t) === !1)
989
+ return;
990
+ Ge(n, !1);
991
+ }
992
+ }
993
+ }
994
+ }, ii = (e, t, s) => {
995
+ if (t.$members$) {
996
+ e.watchers && (t.$watchers$ = e.watchers);
997
+ const i = Object.entries(t.$members$), n = e.prototype;
998
+ i.map(([r, [o]]) => {
999
+ (o & 31 || o & 32) && Object.defineProperty(n, r, {
1000
+ get() {
1001
+ return ei(this, r);
1002
+ },
1003
+ set(a) {
1004
+ si(this, r, a, t);
1005
+ },
1006
+ configurable: !0,
1007
+ enumerable: !0
1008
+ });
1009
+ });
1010
+ {
1011
+ const r = /* @__PURE__ */ new Map();
1012
+ n.attributeChangedCallback = function(o, a, l) {
1013
+ v.jmp(() => {
1014
+ const c = r.get(o);
1015
+ if (this.hasOwnProperty(c))
1016
+ l = this[c], delete this[c];
1017
+ else if (n.hasOwnProperty(c) && typeof this[c] == "number" && this[c] == l)
1018
+ return;
1019
+ this[c] = l === null && typeof this[c] == "boolean" ? !1 : l;
1020
+ });
1021
+ }, e.observedAttributes = i.filter(
1022
+ ([o, a]) => a[0] & 15
1023
+ /* HasAttribute */
1024
+ ).map(([o, a]) => {
1025
+ const l = a[1] || o;
1026
+ return r.set(l, o), a[0] & 512 && t.$attrsToReflect$.push([o, l]), l;
1027
+ });
1028
+ }
1029
+ }
1030
+ return e;
1031
+ }, ni = async (e, t, s, i, n) => {
1032
+ if (!(t.$flags$ & 32) && (n = e.constructor, t.$flags$ |= 32, customElements.whenDefined(s.$tagName$).then(() => t.$flags$ |= 128), n.style)) {
1033
+ let o = n.style;
1034
+ typeof o != "string" && (o = o[t.$modeName$ = Rs(e)]);
1035
+ const a = Me(s, t.$modeName$);
1036
+ if (!ht.has(a)) {
1037
+ const l = N("registerStyles", s.$tagName$);
1038
+ Us(a, o, !!(s.$flags$ & 1)), l();
1039
+ }
1040
+ }
1041
+ t.$ancestorComponent$, (() => Ge(t, !0))();
1042
+ }, ri = (e) => {
1043
+ }, oi = (e) => {
1044
+ if (!(v.$flags$ & 1)) {
1045
+ const t = bt(e), s = t.$cmpMeta$, i = N("connectedCallback", s.$tagName$);
1046
+ t.$flags$ & 1 ? (Re(e, t, s.$listeners$), ri(t.$lazyInstance$)) : (t.$flags$ |= 1, s.$flags$ & 12 && ai(e), s.$members$ && Object.entries(s.$members$).map(([n, [r]]) => {
1047
+ if (r & 31 && e.hasOwnProperty(n)) {
1048
+ const o = e[n];
1049
+ delete e[n], e[n] = o;
1050
+ }
1051
+ }), ni(e, t, s)), i();
1052
+ }
1053
+ }, ai = (e) => {
1054
+ const t = e["s-cr"] = x.createComment("");
1055
+ t["s-cn"] = !0, e.insertBefore(t, e.firstChild);
1056
+ }, li = (e) => {
1057
+ if (!(v.$flags$ & 1)) {
1058
+ const t = bt(e);
1059
+ t.$rmListeners$ && (t.$rmListeners$.map((s) => s()), t.$rmListeners$ = void 0);
1060
+ }
1061
+ }, qe = (e, t) => {
1062
+ const s = {
1063
+ $flags$: t[0],
1064
+ $tagName$: t[1]
1065
+ };
1066
+ s.$members$ = t[2], s.$listeners$ = t[3], s.$watchers$ = e.$watchers$, s.$attrsToReflect$ = [];
1067
+ const i = e.prototype.connectedCallback, n = e.prototype.disconnectedCallback;
1068
+ return Object.assign(e.prototype, {
1069
+ __registerHost() {
1070
+ ci(this, s);
1071
+ },
1072
+ connectedCallback() {
1073
+ oi(this), i && i.call(this);
1074
+ },
1075
+ disconnectedCallback() {
1076
+ li(this), n && n.call(this);
1077
+ },
1078
+ __attachShadow() {
1079
+ this.attachShadow({
1080
+ mode: "open",
1081
+ delegatesFocus: !!(s.$flags$ & 16)
1082
+ });
1083
+ }
1084
+ }), e.is = s.$tagName$, ii(e, s);
1085
+ }, Ye = /* @__PURE__ */ new WeakMap(), bt = (e) => Ye.get(e), ci = (e, t) => {
1086
+ const s = {
1087
+ $flags$: 0,
1088
+ $hostElement$: e,
1089
+ $cmpMeta$: t,
1090
+ $instanceValues$: /* @__PURE__ */ new Map()
1091
+ };
1092
+ return Re(e, s, t.$listeners$), Ye.set(e, s);
1093
+ }, fe = (e, t) => t in e, tt = (e, t) => (0, console.error)(e, t), ht = /* @__PURE__ */ new Map(), di = [], $e = [], Ke = [], hi = (e, t) => (s) => {
1094
+ e.push(s), Ut || (Ut = !0, t && v.$flags$ & 4 ? pi(Nt) : v.raf(Nt));
1095
+ }, ge = (e) => {
1096
+ for (let t = 0; t < e.length; t++)
1097
+ try {
1098
+ e[t](performance.now());
1099
+ } catch (s) {
1100
+ tt(s);
1101
+ }
1102
+ e.length = 0;
1103
+ }, Nt = () => {
1104
+ ge($e), ge(Ke), (Ut = $e.length > 0) && v.raf(Nt);
1105
+ }, pi = (e) => Ts().then(e), ui = /* @__PURE__ */ hi(Ke, !0), fi = (e = {}) => {
1106
+ const { content: t = "", title: s, attributes: i = [] } = e;
1107
+ let n = "", r = [
1108
+ { name: "xmlns", value: "http://www.w3.org/2000/svg" },
1109
+ { name: "fill", value: "currentColor" },
1110
+ ...i
1111
+ ];
1112
+ return s && (n = `<title>${s}</title>`), `<svg ${r.map((a) => `${a.name}="${a.value}"`).join(" ")}>${n}${t}</svg>`;
1113
+ }, $i = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim();
1114
+ function gi(e) {
1115
+ return `${e.getFullYear()}.${e.getMonth() + 1}`;
1116
+ }
1117
+ class vi {
1118
+ constructor(t) {
1119
+ this.voca_component = t, this.voca_added = gi(/* @__PURE__ */ new Date());
1120
+ }
1121
+ }
1122
+ const mi = "telia-vst{display:none}", yi = /* @__PURE__ */ qe(class extends He {
1123
+ constructor() {
1124
+ super(), this.__registerHost(), this.vocaInternalUStats = Ys(this, "vocaInternalUStats", 7);
1125
+ }
1126
+ connectedCallback() {
1127
+ this.vocaInternalUStats.emit(new vi(this.dataTrackingId));
1128
+ }
1129
+ render() {
1130
+ return D(Ft, null);
1131
+ }
1132
+ static get style() {
1133
+ return mi;
1134
+ }
1135
+ }, [0, "telia-vst", {
1136
+ dataTrackingId: [1, "data-tracking-id"]
1137
+ }]);
1138
+ function Qe() {
1139
+ if (typeof customElements > "u")
1140
+ return;
1141
+ ["telia-vst"].forEach((t) => {
1142
+ switch (t) {
1143
+ case "telia-vst":
1144
+ customElements.get(t) || customElements.define(t, yi);
1145
+ break;
1146
+ }
1147
+ });
1148
+ }
1149
+ Qe();
1150
+ function Ht() {
1151
+ return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : { vocadsIcons: void 0, vocadsIconsRegistered: !1 };
1152
+ }
1153
+ function bi() {
1154
+ if (typeof Ht().vocadsIcons !== void 0)
1155
+ return Ht().vocadsIcons;
1156
+ }
1157
+ function _i() {
1158
+ return Ht().vocadsIconsRegistered;
1159
+ }
1160
+ const xi = ".telia-icon{display:inline-block}.telia-icon__container{display:block;height:inherit}.telia-icon svg{display:block}.telia-icon--sm{height:calc(1.6rem * var(--voca-rem-multiplier));min-width:calc(1.6rem * var(--voca-rem-multiplier));width:calc(1.6rem * var(--voca-rem-multiplier))}.telia-icon--md{height:calc(2.4rem * var(--voca-rem-multiplier));min-width:calc(2.4rem * var(--voca-rem-multiplier));width:calc(2.4rem * var(--voca-rem-multiplier))}.telia-icon--lg{height:calc(3.2rem * var(--voca-rem-multiplier));min-width:calc(3.2rem * var(--voca-rem-multiplier));width:calc(3.2rem * var(--voca-rem-multiplier))}", wi = /* @__PURE__ */ qe(class extends He {
1161
+ constructor() {
1162
+ super(), this.__registerHost(), this.size = "md", this.allyTitle = null, this.dataTrackingId = "telia-icon";
1163
+ }
1164
+ /**
1165
+ * Returns svg string from svg property or svg string from icons bundle if icons bundle is registered
1166
+ * @private
1167
+ * @returns string
1168
+ */
1169
+ getSvgString() {
1170
+ if (this.svg)
1171
+ return this.svg;
1172
+ if (_i() && this.name) {
1173
+ const e = bi();
1174
+ return e[this.name] ? e[this.name].svg : "";
1175
+ }
1176
+ return this.name && console.warn(this.name, "Icons bundle is not registered and will not be rendered. Check if you have registered icons bundle or use svg property"), "";
1177
+ }
1178
+ render() {
1179
+ let e = this.getSvgString(), t = [{ name: "viewBox", value: "0 0 64 64" }];
1180
+ this.allyTitle ? t = [...t, { name: "role", value: "img" }] : t = [
1181
+ ...t,
1182
+ { name: "aria-hidden", value: "true" }
1183
+ ];
1184
+ const s = fi({
1185
+ content: $i(e),
1186
+ attributes: t,
1187
+ title: this.allyTitle
1188
+ });
1189
+ return D(Ft, { class: `telia-icon telia-icon--${this.size}` }, D("span", { "aria-label": this.allyTitle, class: "telia-icon__container", innerHTML: s }), D("telia-vst", { dataTrackingId: this.dataTrackingId }));
1190
+ }
1191
+ static get style() {
1192
+ return xi;
1193
+ }
1194
+ }, [0, "telia-icon", {
1195
+ name: [1],
1196
+ svg: [1],
1197
+ size: [1],
1198
+ allyTitle: [1, "ally-title"],
1199
+ dataTestid: [1, "data-testid"]
1200
+ }]);
1201
+ function Ai() {
1202
+ if (typeof customElements > "u")
1203
+ return;
1204
+ ["telia-icon", "telia-vst"].forEach((t) => {
1205
+ switch (t) {
1206
+ case "telia-icon":
1207
+ customElements.get(t) || customElements.define(t, wi);
1208
+ break;
1209
+ case "telia-vst":
1210
+ customElements.get(t) || Qe();
1211
+ break;
1212
+ }
1213
+ });
1214
+ }
1215
+ Ai();
1216
+ /**
1217
+ * @license
1218
+ * Copyright 2017 Google LLC
1219
+ * SPDX-License-Identifier: BSD-3-Clause
1220
+ */
1221
+ const k = (e) => (t, s) => {
1222
+ s !== void 0 ? s.addInitializer(() => {
1223
+ customElements.define(e, t);
1224
+ }) : customElements.define(e, t);
1225
+ };
1226
+ /**
1227
+ * @license
1228
+ * Copyright 2017 Google LLC
1229
+ * SPDX-License-Identifier: BSD-3-Clause
1230
+ */
1231
+ const Si = { attribute: !0, type: String, converter: ot, reflect: !1, hasChanged: It }, Ci = (e = Si, t, s) => {
1232
+ const { kind: i, metadata: n } = s;
1233
+ let r = globalThis.litPropertyMetadata.get(n);
1234
+ if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), r.set(s.name, e), i === "accessor") {
1235
+ const { name: o } = s;
1236
+ return { set(a) {
1237
+ const l = t.get.call(this);
1238
+ t.set.call(this, a), this.requestUpdate(o, l, e);
1239
+ }, init(a) {
1240
+ return a !== void 0 && this.C(o, void 0, e), a;
1241
+ } };
1242
+ }
1243
+ if (i === "setter") {
1244
+ const { name: o } = s;
1245
+ return function(a) {
1246
+ const l = this[o];
1247
+ t.call(this, a), this.requestUpdate(o, l, e);
1248
+ };
1249
+ }
1250
+ throw Error("Unsupported decorator location: " + i);
1251
+ };
1252
+ function g(e) {
1253
+ return (t, s) => typeof s == "object" ? Ci(e, t, s) : ((i, n, r) => {
1254
+ const o = n.hasOwnProperty(r);
1255
+ return n.constructor.createProperty(r, o ? { ...i, wrapped: !0 } : i), o ? Object.getOwnPropertyDescriptor(n, r) : void 0;
1256
+ })(e, t, s);
1257
+ }
1258
+ /**
1259
+ * @license
1260
+ * Copyright 2017 Google LLC
1261
+ * SPDX-License-Identifier: BSD-3-Clause
1262
+ */
1263
+ function A(e) {
1264
+ return g({ ...e, state: !0, attribute: !1 });
1265
+ }
1266
+ /**
1267
+ * @license
1268
+ * Copyright 2020 Google LLC
1269
+ * SPDX-License-Identifier: BSD-3-Clause
1270
+ */
1271
+ const Ei = (e) => e.strings === void 0;
1272
+ /**
1273
+ * @license
1274
+ * Copyright 2017 Google LLC
1275
+ * SPDX-License-Identifier: BSD-3-Clause
1276
+ */
1277
+ const _t = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, xt = (e) => (...t) => ({ _$litDirective$: e, values: t });
1278
+ let Gt = class {
1279
+ constructor(t) {
1280
+ }
1281
+ get _$AU() {
1282
+ return this._$AM._$AU;
1283
+ }
1284
+ _$AT(t, s, i) {
1285
+ this._$Ct = t, this._$AM = s, this._$Ci = i;
1286
+ }
1287
+ _$AS(t, s) {
1288
+ return this.update(t, s);
1289
+ }
1290
+ update(t, s) {
1291
+ return this.render(...s);
1292
+ }
1293
+ };
1294
+ /**
1295
+ * @license
1296
+ * Copyright 2017 Google LLC
1297
+ * SPDX-License-Identifier: BSD-3-Clause
1298
+ */
1299
+ const K = (e, t) => {
1300
+ var i;
1301
+ const s = e._$AN;
1302
+ if (s === void 0)
1303
+ return !1;
1304
+ for (const n of s)
1305
+ (i = n._$AO) == null || i.call(n, t, !1), K(n, t);
1306
+ return !0;
1307
+ }, pt = (e) => {
1308
+ let t, s;
1309
+ do {
1310
+ if ((t = e._$AM) === void 0)
1311
+ break;
1312
+ s = t._$AN, s.delete(e), e = t;
1313
+ } while ((s == null ? void 0 : s.size) === 0);
1314
+ }, Ze = (e) => {
1315
+ for (let t; t = e._$AM; e = t) {
1316
+ let s = t._$AN;
1317
+ if (s === void 0)
1318
+ t._$AN = s = /* @__PURE__ */ new Set();
1319
+ else if (s.has(e))
1320
+ break;
1321
+ s.add(e), Oi(t);
1322
+ }
1323
+ };
1324
+ function Ti(e) {
1325
+ this._$AN !== void 0 ? (pt(this), this._$AM = e, Ze(this)) : this._$AM = e;
1326
+ }
1327
+ function ki(e, t = !1, s = 0) {
1328
+ const i = this._$AH, n = this._$AN;
1329
+ if (n !== void 0 && n.size !== 0)
1330
+ if (t)
1331
+ if (Array.isArray(i))
1332
+ for (let r = s; r < i.length; r++)
1333
+ K(i[r], !1), pt(i[r]);
1334
+ else
1335
+ i != null && (K(i, !1), pt(i));
1336
+ else
1337
+ K(this, e);
1338
+ }
1339
+ const Oi = (e) => {
1340
+ e.type == _t.CHILD && (e._$AP ?? (e._$AP = ki), e._$AQ ?? (e._$AQ = Ti));
1341
+ };
1342
+ let Xe = class extends Gt {
1343
+ constructor() {
1344
+ super(...arguments), this._$AN = void 0;
1345
+ }
1346
+ _$AT(t, s, i) {
1347
+ super._$AT(t, s, i), Ze(this), this.isConnected = t._$AU;
1348
+ }
1349
+ _$AO(t, s = !0) {
1350
+ var i, n;
1351
+ t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), s && (K(this, t), pt(this));
1352
+ }
1353
+ setValue(t) {
1354
+ if (Ei(this._$Ct))
1355
+ this._$Ct._$AI(t, this);
1356
+ else {
1357
+ const s = [...this._$Ct._$AH];
1358
+ s[this._$Ci] = t, this._$Ct._$AI(s, this, 0);
1359
+ }
1360
+ }
1361
+ disconnected() {
1362
+ }
1363
+ reconnected() {
1364
+ }
1365
+ };
1366
+ /**
1367
+ * @license
1368
+ * Copyright 2020 Google LLC
1369
+ * SPDX-License-Identifier: BSD-3-Clause
1370
+ */
1371
+ const Je = () => new Pi();
1372
+ class Pi {
1373
+ }
1374
+ const Ot = /* @__PURE__ */ new WeakMap(), Ve = xt(class extends Xe {
1375
+ render(e) {
1376
+ return u;
1377
+ }
1378
+ update(e, [t]) {
1379
+ var i;
1380
+ const s = t !== this.G;
1381
+ return s && this.G !== void 0 && this.ot(void 0), (s || this.rt !== this.lt) && (this.G = t, this.ct = (i = e.options) == null ? void 0 : i.host, this.ot(this.lt = e.element)), u;
1382
+ }
1383
+ ot(e) {
1384
+ if (typeof this.G == "function") {
1385
+ const t = this.ct ?? globalThis;
1386
+ let s = Ot.get(t);
1387
+ s === void 0 && (s = /* @__PURE__ */ new WeakMap(), Ot.set(t, s)), s.get(this.G) !== void 0 && this.G.call(this.ct, void 0), s.set(this.G, e), e !== void 0 && this.G.call(this.ct, e);
1388
+ } else
1389
+ this.G.value = e;
1390
+ }
1391
+ get rt() {
1392
+ var e, t;
1393
+ return typeof this.G == "function" ? (e = Ot.get(this.ct ?? globalThis)) == null ? void 0 : e.get(this.G) : (t = this.G) == null ? void 0 : t.value;
1394
+ }
1395
+ disconnected() {
1396
+ this.rt === this.lt && this.ot(void 0);
1397
+ }
1398
+ reconnected() {
1399
+ this.ot(this.lt);
1400
+ }
1401
+ });
1402
+ /**
1403
+ * @license
1404
+ * Copyright 2018 Google LLC
1405
+ * SPDX-License-Identifier: BSD-3-Clause
1406
+ */
1407
+ const qt = xt(class extends Gt {
1408
+ constructor(e) {
1409
+ var t;
1410
+ if (super(e), e.type !== _t.ATTRIBUTE || e.name !== "class" || ((t = e.strings) == null ? void 0 : t.length) > 2)
1411
+ throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
1412
+ }
1413
+ render(e) {
1414
+ return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
1415
+ }
1416
+ update(e, [t]) {
1417
+ var i, n;
1418
+ if (this.it === void 0) {
1419
+ this.it = /* @__PURE__ */ new Set(), e.strings !== void 0 && (this.st = new Set(e.strings.join(" ").split(/\s/).filter((r) => r !== "")));
1420
+ for (const r in t)
1421
+ t[r] && !((i = this.st) != null && i.has(r)) && this.it.add(r);
1422
+ return this.render(t);
1423
+ }
1424
+ const s = e.element.classList;
1425
+ for (const r of this.it)
1426
+ r in t || (s.remove(r), this.it.delete(r));
1427
+ for (const r in t) {
1428
+ const o = !!t[r];
1429
+ o === this.it.has(r) || (n = this.st) != null && n.has(r) || (o ? (s.add(r), this.it.add(r)) : (s.remove(r), this.it.delete(r)));
1430
+ }
1431
+ return E;
1432
+ }
1433
+ }), nt = (e, t, s) => {
1434
+ e && s.style.setProperty(t, e);
1435
+ }, ts = (e, t) => {
1436
+ var s, i, n, r;
1437
+ nt((s = e.colors) == null ? void 0 : s.primaryBackground, "--primary-background", t), nt(
1438
+ (i = e.colors) == null ? void 0 : i.textOnPrimaryBackground,
1439
+ "--text-on-primary-background",
1440
+ t
1441
+ ), nt(
1442
+ (n = e.colors) == null ? void 0 : n.secondaryBackground,
1443
+ "--secondary-background",
1444
+ t
1445
+ ), nt(
1446
+ (r = e.colors) == null ? void 0 : r.textOnSecondaryBackground,
1447
+ "--text-on-secondary-background",
1448
+ t
1449
+ );
1450
+ };
1451
+ var Li = Object.defineProperty, Ui = Object.getOwnPropertyDescriptor, et = (e, t, s, i) => {
1452
+ for (var n = i > 1 ? void 0 : i ? Ui(t, s) : t, r = e.length - 1, o; r >= 0; r--)
1453
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
1454
+ return i && n && Li(t, s, n), n;
1455
+ };
1456
+ let T = class extends y {
1457
+ constructor() {
1458
+ super(...arguments), this.active = !1, this.loaded = !1;
1459
+ }
1460
+ async connectedCallback() {
1461
+ super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
1462
+ }
1463
+ _toggleActive() {
1464
+ var e;
1465
+ if (!((e = this.application) != null && e.root)) {
1466
+ console.warn(
1467
+ "Could not activate widget. No root element assigned to widget."
1468
+ );
1469
+ return;
1470
+ }
1471
+ this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.removeFromDOM();
1472
+ }
1473
+ _applyBranding() {
1474
+ var e;
1475
+ (e = this.application) != null && e.settings && ts(this.application.settings.branding, this);
1476
+ }
1477
+ async _renderSymbol() {
1478
+ var n;
1479
+ const e = (n = this.application) == null ? void 0 : n.triggerIcon;
1480
+ if (!e)
1481
+ return u;
1482
+ const t = async (r) => await import("./index-b5ca9962.mjs").then(
1483
+ (a) => a[r]
1484
+ ), { type: s, content: i } = e;
1485
+ switch (s) {
1486
+ case "Telia": {
1487
+ const r = await t(i);
1488
+ return r ? $`<telia-icon
1489
+ class="trigger-icon"
1490
+ svg=${r.svg}
1491
+ size="lg"
1492
+ ></telia-icon>` : u;
1493
+ }
1494
+ default:
1495
+ return u;
1496
+ }
1497
+ }
1498
+ render() {
1499
+ return $`<button
1500
+ class=${qt({
1501
+ trigger: !0,
1502
+ active: this.active,
1503
+ rendered: this.loaded
1504
+ })}
1505
+ @click=${this._toggleActive}
1506
+ >
1507
+ ${this.icon}
1508
+ <span class="trigger-close">
1509
+ <svg
1510
+ width="18"
1511
+ height="9"
1512
+ viewBox="0 0 18 9"
1513
+ fill="none"
1514
+ xmlns="http://www.w3.org/2000/svg"
1515
+ >
1516
+ <path
1517
+ 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"
1518
+ fill="white"
1519
+ />
1520
+ </svg>
1521
+ </span>
1522
+ <span class="trigger-loader">
1523
+ <svg viewBox="25 25 50 50">
1524
+ <circle
1525
+ cx="50"
1526
+ cy="50"
1527
+ r="20"
1528
+ fill="none"
1529
+ stroke="#000"
1530
+ stroke-width="2"
1531
+ stroke-miterlimit="10"
1532
+ />
1533
+ </svg>
1534
+ </span>
1535
+ </button>`;
1536
+ }
1537
+ };
1538
+ T.styles = [
1539
+ w`
1540
+ :host {
1541
+ --voca-rem-multiplier: 0.625;
1542
+ display: block;
1543
+ box-sizing: border-box;
1544
+ }
1545
+
1546
+ .trigger {
1547
+ position: fixed;
1548
+ transform: scale(0);
1549
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
1550
+ bottom: 20px;
1551
+ right: 20px;
1552
+ z-index: 5;
1553
+ display: flex;
1554
+ align-items: center;
1555
+ justify-content: center;
1556
+ border: none;
1557
+ line-height: 55px;
1558
+ height: 55px;
1559
+ width: 55px;
1560
+ border-radius: 55px;
1561
+ cursor: pointer;
1562
+ background-color: var(--trigger-bg, var(--primary-background));
1563
+ font-family: Lato;
1564
+ text-decoration: none;
1565
+ border: 3px dashed transparent;
1566
+ box-sizing: border-box;
1567
+ transition: transform 200ms ease-out;
1568
+ }
1569
+ .trigger:hover {
1570
+ transform: scale(1.1) !important;
1571
+ }
1572
+ .trigger.rendered {
1573
+ transform: scale(1);
1574
+ }
1575
+ .trigger.active .trigger-icon {
1576
+ opacity: 0;
1577
+ transform: rotate(-180deg) scale(0);
1578
+ }
1579
+ .trigger.active .trigger-close {
1580
+ opacity: 1;
1581
+ transform: rotate(0deg) scale(1);
1582
+ }
1583
+
1584
+ .trigger-icon {
1585
+ display: inline-block;
1586
+ line-height: inherit;
1587
+ text-align: center;
1588
+ opacity: 1;
1589
+ transform: rotate(0deg) scale(1);
1590
+ transition: opacity 200ms ease-out, transform 200ms ease-out;
1591
+ color: var(--trigger-text-color, var(--text-on-primary-background));
1592
+ }
1593
+ .trigger-close {
1594
+ opacity: 0;
1595
+ transition: transform 200ms ease-out;
1596
+ transform: rotate(180deg) scale(0);
1597
+ position: absolute;
1598
+ top: 0;
1599
+ bottom: 0;
1600
+ left: 0;
1601
+ right: 0;
1602
+ display: flex;
1603
+ justify-content: center;
1604
+ align-items: center;
1605
+ fill: var(--trigger-text-color, var(--text-on-primary-background));
1606
+ }
1607
+ `
1608
+ ];
1609
+ et([
1610
+ g({ attribute: !1 })
1611
+ ], T.prototype, "application", 2);
1612
+ et([
1613
+ A()
1614
+ ], T.prototype, "active", 2);
1615
+ et([
1616
+ A()
1617
+ ], T.prototype, "loaded", 2);
1618
+ et([
1619
+ A()
1620
+ ], T.prototype, "icon", 2);
1621
+ T = et([
1622
+ k("ace-trigger")
1623
+ ], T);
1624
+ var Ni = Object.defineProperty, Hi = Object.getOwnPropertyDescriptor, P = (e, t, s, i) => {
1625
+ for (var n = i > 1 ? void 0 : i ? Hi(t, s) : t, r = e.length - 1, o; r >= 0; r--)
1626
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
1627
+ return i && n && Ni(t, s, n), n;
1628
+ };
1629
+ const es = (e) => {
1630
+ class t extends e {
1631
+ constructor() {
1632
+ super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
1633
+ }
1634
+ writeProperties(i) {
1635
+ this.properties = i;
1636
+ }
1637
+ writeLayout(i) {
1638
+ this.layout = i;
1639
+ }
1640
+ writeContext(i) {
1641
+ this.context = i;
1642
+ }
1643
+ addChild(i) {
1644
+ i.parent = this, this.nodes.push(i);
1645
+ }
1646
+ connectedCallback() {
1647
+ super.connectedCallback(), this.renderRoot.host.style.setProperty(
1648
+ "--width",
1649
+ this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
1650
+ );
1651
+ }
1652
+ }
1653
+ return t.styles = [
1654
+ // (superClass as unknown as typeof LitElement).styles ?? [],
1655
+ w`
1656
+ :host {
1657
+ font-family: var(--font-family);
1658
+ grid-column: span var(--width);
1659
+ max-width: 100%;
1660
+ overflow: hidden;
1661
+ box-sizing: border-box;
1662
+ display: block;
1663
+ }
1664
+ * {
1665
+ box-sizing: border-box;
1666
+ }
1667
+ `
1668
+ ], P([
1669
+ g()
1670
+ ], t.prototype, "properties", 2), P([
1671
+ g()
1672
+ ], t.prototype, "context", 2), P([
1673
+ g()
1674
+ ], t.prototype, "layout", 2), P([
1675
+ g()
1676
+ ], t.prototype, "name", 2), P([
1677
+ g()
1678
+ ], t.prototype, "type", 2), P([
1679
+ g({ attribute: !1 })
1680
+ ], t.prototype, "application", 2), P([
1681
+ g({ attribute: !1 })
1682
+ ], t.prototype, "parent", 2), t;
1683
+ };
1684
+ var Ri = Object.defineProperty, Mi = Object.getOwnPropertyDescriptor, ji = (e, t, s, i) => {
1685
+ for (var n = i > 1 ? void 0 : i ? Mi(t, s) : t, r = e.length - 1, o; r >= 0; r--)
1686
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
1687
+ return i && n && Ri(t, s, n), n;
1688
+ };
1689
+ let Rt = class extends es(y) {
1690
+ render() {
1691
+ return $`Non resolved component`;
1692
+ }
1693
+ };
1694
+ Rt.styles = [
1695
+ w`
1696
+ :host {
1697
+ display: block;
1698
+ }
1699
+ `
1700
+ ];
1701
+ Rt = ji([
1702
+ k("ace-unresolved-component")
1703
+ ], Rt);
1704
+ /**
1705
+ * @license
1706
+ * Copyright 2021 Google LLC
1707
+ * SPDX-License-Identifier: BSD-3-Clause
1708
+ */
1709
+ function* Di(e, t) {
1710
+ if (e !== void 0) {
1711
+ let s = 0;
1712
+ for (const i of e)
1713
+ yield t(i, s++);
1714
+ }
1715
+ }
1716
+ var Yt = /* @__PURE__ */ ((e) => (e.Inline = "inline", e.Trigger = "trigger", e))(Yt || {}), Ii = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, ss = (e, t, s, i) => {
1717
+ for (var n = i > 1 ? void 0 : i ? Bi(t, s) : t, r = e.length - 1, o; r >= 0; r--)
1718
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
1719
+ return i && n && Ii(t, s, n), n;
1720
+ };
1721
+ let ut = class extends y {
1722
+ constructor() {
1723
+ super(...arguments), this.nodes = [], this.wrapperRef = Je();
1724
+ }
1725
+ addChild(e) {
1726
+ e.parent = this, this.nodes.push(e);
1727
+ }
1728
+ applyBranding() {
1729
+ if (this.wrapperRef.value) {
1730
+ const e = this.application.settings;
1731
+ e != null && e.branding && ts(e.branding, this.wrapperRef.value);
1732
+ }
1733
+ }
1734
+ firstUpdated(e) {
1735
+ this.applyBranding();
1736
+ }
1737
+ render() {
1738
+ return this.application.renderStrategy === Yt.Trigger && this.renderRoot.host.classList.add("floating"), $`<div class="widget-container" ${Ve(this.wrapperRef)}>
1739
+ ${Di(this.nodes, (e) => e)}
1740
+ </div>`;
1741
+ }
1742
+ };
1743
+ ut.styles = w`
1744
+ :host {
1745
+ --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
1746
+ --spacing-xs: 0.2rem;
1747
+ --spacing-sm: 0.5rem;
1748
+ --spacing-md: 1rem;
1749
+ --spacing-lg: 1.2rem;
1750
+ --spacing-xl: 1.8rem;
1751
+
1752
+ --text-color: #222222;
1753
+ --link-color: #990ae3;
1754
+ --gray-color: #f3f3f8;
1755
+ --gray-dark-color: #a6a6a6;
1756
+
1757
+ --box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
1758
+ --border-radius: var(--spacing-sm);
1759
+ --border-radius-sm: var(--spacing-sm);
1760
+ }
1761
+ :host {
1762
+ --voca-rem-multiplier: 0.625;
1763
+ box-sizing: border-box;
1764
+ display: block;
1765
+ }
1766
+
1767
+ :host(.floating) {
1768
+ position: fixed;
1769
+ z-index: 6;
1770
+ inset: auto 20px 95px auto;
1771
+ max-height: calc(100vh - 120px);
1772
+ width: 400px;
1773
+ height: 700px;
1774
+ }
1775
+ :host(.floating) .widget-container {
1776
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
1777
+ border-radius: 0.7rem;
1778
+ }
1779
+ :host(.inline) {
1780
+ height: 100%;
1781
+ position: fixed;
1782
+ inset: 0 0 0 0;
1783
+ }
1784
+
1785
+ * {
1786
+ box-sizing: border-box;
1787
+ }
1788
+ .widget-container {
1789
+ height: 100%;
1790
+ background-color: var(--primary-background);
1791
+ padding: 0 var(--spacing-sm);
1792
+ }
1793
+ .widget-container.expanded {
1794
+ opacity: 1;
1795
+ animation: slideUp 0.5s;
1796
+ }
1797
+ .widget-container.hidden {
1798
+ opacity: 0;
1799
+ animation: slideDown 0.5s;
1800
+ }
1801
+ @keyframes slideDown {
1802
+ from {
1803
+ transform: translateY(0);
1804
+ opacity: 1;
1805
+ }
1806
+ to {
1807
+ transform: translateY(100%);
1808
+ opacity: 0;
1809
+ }
1810
+ }
1811
+ @keyframes slideUp {
1812
+ from {
1813
+ transform: translateY(100%);
1814
+ opacity: 0;
1815
+ }
1816
+ to {
1817
+ transform: translateY(0);
1818
+ opacity: 1;
1819
+ }
1820
+ }
1821
+ `;
1822
+ ss([
1823
+ g({ attribute: !1 })
1824
+ ], ut.prototype, "application", 2);
1825
+ ut = ss([
1826
+ k("ace-wrapper")
1827
+ ], ut);
1828
+ var zi = Object.defineProperty, Fi = Object.getOwnPropertyDescriptor, wt = (e, t, s, i) => {
1829
+ for (var n = i > 1 ? void 0 : i ? Fi(t, s) : t, r = e.length - 1, o; r >= 0; r--)
1830
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
1831
+ return i && n && zi(t, s, n), n;
1832
+ };
1833
+ let z = class extends y {
1834
+ constructor() {
1835
+ super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
1836
+ }
1837
+ async connectedCallback() {
1838
+ super.connectedCallback(), await this.getGlobalEnvironment();
1839
+ }
1840
+ disconnectedCallback() {
1841
+ super.disconnectedCallback(), this.removeEventListener("environment-created", this.onEnvironmentCreated);
1842
+ }
1843
+ async onEnvironmentCreated(e) {
1844
+ this.widget = e.detail.widget, await this.activate(), this.requestUpdate();
1845
+ }
1846
+ async activate() {
1847
+ this.widget && (await this.widget.activate(), this.status = "activated");
1848
+ }
1849
+ async getGlobalEnvironment() {
1850
+ const e = globalThis.widgets;
1851
+ e && (this.widget = e.applications.find(
1852
+ (t) => t.name === this.name
1853
+ ), await this.activate());
1854
+ }
1855
+ render() {
1856
+ if (!this.widget || this.status !== "activated")
1857
+ return u;
1858
+ if (this.widget.renderStrategy === Yt.Trigger) {
1859
+ const e = new T();
1860
+ return e.application = this.widget, e;
1861
+ }
1862
+ return this.widget.render();
1863
+ }
1864
+ };
1865
+ z.styles = [
1866
+ w`
1867
+ :host {
1868
+ display: block;
1869
+ }
1870
+ `
1871
+ ];
1872
+ wt([
1873
+ g({ attribute: !0 })
1874
+ ], z.prototype, "name", 2);
1875
+ wt([
1876
+ A()
1877
+ ], z.prototype, "widget", 2);
1878
+ wt([
1879
+ A()
1880
+ ], z.prototype, "status", 2);
1881
+ z = wt([
1882
+ k("ace-widget")
1883
+ ], z);
1884
+ const Wi = /* @__PURE__ */ new WeakMap();
1885
+ let ve = 0;
1886
+ const Pt = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new WeakSet(), ye = () => new Promise((e) => requestAnimationFrame(e)), be = [{ opacity: 0 }], _e = [{ opacity: 0 }, { opacity: 1 }], xe = (e, t) => {
1887
+ const s = e - t;
1888
+ return s === 0 ? void 0 : s;
1889
+ }, we = (e, t) => {
1890
+ const s = e / t;
1891
+ return s === 1 ? void 0 : s;
1892
+ }, Lt = { left: (e, t) => {
1893
+ const s = xe(e, t);
1894
+ return { value: s, transform: s == null || isNaN(s) ? void 0 : `translateX(${s}px)` };
1895
+ }, top: (e, t) => {
1896
+ const s = xe(e, t);
1897
+ return { value: s, transform: s == null || isNaN(s) ? void 0 : `translateY(${s}px)` };
1898
+ }, width: (e, t) => {
1899
+ let s;
1900
+ t === 0 && (t = 1, s = { width: "1px" });
1901
+ const i = we(e, t);
1902
+ return { value: i, overrideFrom: s, transform: i == null || isNaN(i) ? void 0 : `scaleX(${i})` };
1903
+ }, height: (e, t) => {
1904
+ let s;
1905
+ t === 0 && (t = 1, s = { height: "1px" });
1906
+ const i = we(e, t);
1907
+ return { value: i, overrideFrom: s, transform: i == null || isNaN(i) ? void 0 : `scaleY(${i})` };
1908
+ } }, Gi = { duration: 333, easing: "ease-in-out" }, qi = ["left", "top", "width", "height", "opacity", "color", "background"], Ae = /* @__PURE__ */ new WeakMap();
1909
+ class Yi extends Xe {
1910
+ constructor(t) {
1911
+ if (super(t), this.t = null, this.i = null, this.o = !0, this.shouldLog = !1, t.type === _t.CHILD)
1912
+ throw Error("The `animate` directive must be used in attribute position.");
1913
+ this.createFinished();
1914
+ }
1915
+ createFinished() {
1916
+ var t;
1917
+ (t = this.resolveFinished) == null || t.call(this), this.finished = new Promise((s) => {
1918
+ this.h = s;
1919
+ });
1920
+ }
1921
+ async resolveFinished() {
1922
+ var t;
1923
+ (t = this.h) == null || t.call(this), this.h = void 0;
1924
+ }
1925
+ render(t) {
1926
+ return u;
1927
+ }
1928
+ getController() {
1929
+ return Wi.get(this.l);
1930
+ }
1931
+ isDisabled() {
1932
+ var t;
1933
+ return this.options.disabled || ((t = this.getController()) == null ? void 0 : t.disabled);
1934
+ }
1935
+ update(t, [s]) {
1936
+ var n;
1937
+ const i = this.l === void 0;
1938
+ return i && (this.l = (n = t.options) == null ? void 0 : n.host, this.l.addController(this), this.element = t.element, Ae.set(this.element, this)), this.optionsOrCallback = s, (i || typeof s != "function") && this.u(s), this.render(s);
1939
+ }
1940
+ u(t) {
1941
+ t = t ?? {};
1942
+ const s = this.getController();
1943
+ s !== void 0 && ((t = { ...s.defaultOptions, ...t }).keyframeOptions = { ...s.defaultOptions.keyframeOptions, ...t.keyframeOptions }), t.properties ?? (t.properties = qi), this.options = t;
1944
+ }
1945
+ p() {
1946
+ const t = {}, s = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
1947
+ return this.options.properties.forEach((n) => {
1948
+ const r = s[n] ?? (Lt[n] ? void 0 : i[n]), o = Number(r);
1949
+ t[n] = isNaN(o) ? r + "" : o;
1950
+ }), t;
1951
+ }
1952
+ m() {
1953
+ let t, s = !0;
1954
+ return this.options.guard && (t = this.options.guard(), s = ((i, n) => {
1955
+ if (Array.isArray(i)) {
1956
+ if (Array.isArray(n) && n.length === i.length && i.every((r, o) => r === n[o]))
1957
+ return !1;
1958
+ } else if (n === i)
1959
+ return !1;
1960
+ return !0;
1961
+ })(t, this.v)), this.o = this.l.hasUpdated && !this.isDisabled() && !this.isAnimating() && s && this.element.isConnected, this.o && (this.v = Array.isArray(t) ? Array.from(t) : t), this.o;
1962
+ }
1963
+ hostUpdate() {
1964
+ 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);
1965
+ }
1966
+ async hostUpdated() {
1967
+ if (!this.o || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
1968
+ return;
1969
+ let t;
1970
+ this.prepare(), await ye;
1971
+ const s = this._(), i = this.A(this.options.keyframeOptions, s), n = this.p();
1972
+ if (this.g !== void 0) {
1973
+ const { from: r, to: o } = this.O(this.g, n, s);
1974
+ this.log("measured", [this.g, n, r, o]), t = this.calculateKeyframes(r, o);
1975
+ } else {
1976
+ const r = Pt.get(this.options.inId);
1977
+ if (r) {
1978
+ Pt.delete(this.options.inId);
1979
+ const { from: o, to: a } = this.O(r, n, s);
1980
+ t = this.calculateKeyframes(o, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, ve++, t.forEach((l) => l.zIndex = ve);
1981
+ } else
1982
+ this.options.in && (t = [...this.options.in, {}]);
1983
+ }
1984
+ this.animate(t, i);
1985
+ }
1986
+ resetStyles() {
1987
+ this.j !== void 0 && (this.element.setAttribute("style", this.j ?? ""), this.j = void 0);
1988
+ }
1989
+ commitStyles() {
1990
+ var t, s;
1991
+ this.j = this.element.getAttribute("style"), (t = this.webAnimation) == null || t.commitStyles(), (s = this.webAnimation) == null || s.cancel();
1992
+ }
1993
+ reconnected() {
1994
+ }
1995
+ async disconnected() {
1996
+ var s;
1997
+ if (!this.o || (this.options.id !== void 0 && Pt.set(this.options.id, this.g), this.options.out === void 0))
1998
+ return;
1999
+ if (this.prepare(), await ye(), (s = this.t) == null ? void 0 : s.isConnected) {
2000
+ const i = this.i && this.i.parentNode === this.t ? this.i : null;
2001
+ if (this.t.insertBefore(this.element, i), this.options.stabilizeOut) {
2002
+ const n = this.p();
2003
+ this.log("stabilizing out");
2004
+ const r = this.g.left - n.left, o = this.g.top - n.top;
2005
+ getComputedStyle(this.element).position !== "static" || r === 0 && o === 0 || (this.element.style.position = "relative"), r !== 0 && (this.element.style.left = r + "px"), o !== 0 && (this.element.style.top = o + "px");
2006
+ }
2007
+ }
2008
+ const t = this.A(this.options.keyframeOptions);
2009
+ await this.animate(this.options.out, t), this.element.remove();
2010
+ }
2011
+ prepare() {
2012
+ this.createFinished();
2013
+ }
2014
+ start() {
2015
+ var t, s;
2016
+ (s = (t = this.options).onStart) == null || s.call(t, this);
2017
+ }
2018
+ didFinish(t) {
2019
+ var s, i;
2020
+ t && ((i = (s = this.options).onComplete) == null || i.call(s, this)), this.g = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
2021
+ }
2022
+ _() {
2023
+ const t = [];
2024
+ for (let s = this.element.parentNode; s; s = s == null ? void 0 : s.parentNode) {
2025
+ const i = Ae.get(s);
2026
+ i && !i.isDisabled() && i && t.push(i);
2027
+ }
2028
+ return t;
2029
+ }
2030
+ get isHostRendered() {
2031
+ const t = me.has(this.l);
2032
+ return t || this.l.updateComplete.then(() => {
2033
+ me.add(this.l);
2034
+ }), t;
2035
+ }
2036
+ A(t, s = this._()) {
2037
+ const i = { ...Gi };
2038
+ return s.forEach((n) => Object.assign(i, n.options.keyframeOptions)), Object.assign(i, t), i;
2039
+ }
2040
+ O(t, s, i) {
2041
+ t = { ...t }, s = { ...s };
2042
+ const n = i.map((a) => a.animatingProperties).filter((a) => a !== void 0);
2043
+ let r = 1, o = 1;
2044
+ return n !== void 0 && (n.forEach((a) => {
2045
+ a.width && (r /= a.width), a.height && (o /= a.height);
2046
+ }), t.left !== void 0 && s.left !== void 0 && (t.left = r * t.left, s.left = r * s.left), t.top !== void 0 && s.top !== void 0 && (t.top = o * t.top, s.top = o * s.top)), { from: t, to: s };
2047
+ }
2048
+ calculateKeyframes(t, s, i = !1) {
2049
+ const n = {}, r = {};
2050
+ let o = !1;
2051
+ const a = {};
2052
+ for (const l in s) {
2053
+ const c = t[l], h = s[l];
2054
+ if (l in Lt) {
2055
+ const d = Lt[l];
2056
+ if (c === void 0 || h === void 0)
2057
+ continue;
2058
+ const p = d(c, h);
2059
+ p.transform !== void 0 && (a[l] = p.value, o = !0, n.transform = `${n.transform ?? ""} ${p.transform}`, p.overrideFrom !== void 0 && Object.assign(n, p.overrideFrom));
2060
+ } else
2061
+ c !== h && c !== void 0 && h !== void 0 && (o = !0, n[l] = c, r[l] = h);
2062
+ }
2063
+ return n.transformOrigin = r.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, o ? [n, r] : void 0;
2064
+ }
2065
+ async animate(t, s = this.options.keyframeOptions) {
2066
+ this.start(), this.frames = t;
2067
+ let i = !1;
2068
+ if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t = this.options.onFrames(this), this.log("modified frames", t)), t !== void 0)) {
2069
+ this.log("animate", [t, s]), i = !0, this.webAnimation = this.element.animate(t, s);
2070
+ const n = this.getController();
2071
+ n == null || n.add(this);
2072
+ try {
2073
+ await this.webAnimation.finished;
2074
+ } catch {
2075
+ }
2076
+ n == null || n.remove(this);
2077
+ }
2078
+ return this.didFinish(i), i;
2079
+ }
2080
+ isAnimating() {
2081
+ var t, s;
2082
+ return ((t = this.webAnimation) == null ? void 0 : t.playState) === "running" || ((s = this.webAnimation) == null ? void 0 : s.pending);
2083
+ }
2084
+ log(t, s) {
2085
+ this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, s);
2086
+ }
2087
+ }
2088
+ const Se = xt(Yi);
2089
+ var Ki = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, At = (e, t, s, i) => {
2090
+ for (var n = i > 1 ? void 0 : i ? Qi(t, s) : t, r = e.length - 1, o; r >= 0; r--)
2091
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
2092
+ return i && n && Ki(t, s, n), n;
2093
+ };
2094
+ let F = class extends y {
2095
+ constructor() {
2096
+ super(...arguments), this.loading = !1, this.entries = [];
2097
+ }
2098
+ connectedCallback() {
2099
+ super.connectedCallback(), this.session.entries().subscribe((e) => {
2100
+ this.entries = e;
2101
+ });
2102
+ }
2103
+ render() {
2104
+ return $`<div class="convesation-session">
2105
+ ${this.entries.map(
2106
+ (e) => $`<div class="conversation-entry" tabindex="-1">
2107
+ <conversation-entry
2108
+ .entry=${e}
2109
+ ${Se({
2110
+ keyframeOptions: {},
2111
+ in: _e,
2112
+ out: be,
2113
+ stabilizeOut: !0,
2114
+ skipInitial: !1
2115
+ })}
2116
+ >
2117
+ </conversation-entry>
2118
+ </div>`
2119
+ )}
2120
+ ${this.loading ? $`<div
2121
+ class="loader"
2122
+ ${Se({
2123
+ in: _e,
2124
+ out: be,
2125
+ skipInitial: !1
2126
+ })}
2127
+ >
2128
+ <div></div>
2129
+ <div></div>
2130
+ <div></div>
2131
+ </div>` : u}
2132
+ </div>`;
2133
+ }
2134
+ };
2135
+ F.styles = [
2136
+ w`
2137
+ :host {
2138
+ display: block;
2139
+ }
2140
+ .conversation-session {
2141
+ display: flex;
2142
+ flex-direction: column;
2143
+ justify-content: end;
2144
+ min-height: 100%;
2145
+ }
2146
+ `
2147
+ ];
2148
+ At([
2149
+ g({ type: Boolean })
2150
+ ], F.prototype, "loading", 2);
2151
+ At([
2152
+ g({ attribute: !1 })
2153
+ ], F.prototype, "session", 2);
2154
+ At([
2155
+ A()
2156
+ ], F.prototype, "entries", 2);
2157
+ F = At([
2158
+ k("ace-conversation-session")
2159
+ ], F);
2160
+ var Zi = Object.defineProperty, Xi = Object.getOwnPropertyDescriptor, is = (e, t, s, i) => {
2161
+ for (var n = i > 1 ? void 0 : i ? Xi(t, s) : t, r = e.length - 1, o; r >= 0; r--)
2162
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
2163
+ return i && n && Zi(t, s, n), n;
2164
+ };
2165
+ let ft = class extends y {
2166
+ connectedCallback() {
2167
+ var e;
2168
+ super.connectedCallback(), (e = this.entry.didUpdate) == null || e.subscribe(() => {
2169
+ this.requestUpdate();
2170
+ });
2171
+ }
2172
+ _renderTimestamp(e, t) {
2173
+ if (!e && !t)
2174
+ return u;
2175
+ const s = (n) => new Date(n).toLocaleTimeString([], {
2176
+ hour: "2-digit",
2177
+ minute: "2-digit"
2178
+ });
2179
+ let i = "";
2180
+ return e ? t ? i = `${e}: ${s(t)}` : i = e : t && (i = s(t)), $`<p class="conversation-timestamp">${i}</p>`;
2181
+ }
2182
+ render() {
2183
+ var e, t;
2184
+ switch (this.entry.type) {
2185
+ case St.System:
2186
+ return "";
2187
+ case St.Agent:
2188
+ return $`<div
2189
+ class=${qt({
2190
+ "conversation-agent-message": !0,
2191
+ "has-avatar": !!((e = this.entry.sender) != null && e.avatar)
2192
+ })}
2193
+ >
2194
+ ${typeof ((t = this.entry.sender) == null ? void 0 : t.avatar) == "string" ? $`<div class="avatar">
2195
+ <img src=${this.entry.sender.avatar} />
2196
+ </div>` : u}
2197
+
2198
+ <div class="entry-content">
2199
+ ${this.entry.messages.map(
2200
+ (s) => $`
2201
+ <div class="message-container">
2202
+ <div class="message-content">
2203
+ <conversation-group .group=${s}></conversation-group>
2204
+ </div>
2205
+ </div>
2206
+ `
2207
+ )}
2208
+ </div>
2209
+ ${this._renderTimestamp(
2210
+ this.entry.sender.name || "",
2211
+ this.entry.timestamp
2212
+ )}
2213
+ </div>`;
2214
+ case St.User:
2215
+ return $`<div class="conversation-user-message">
2216
+ <div class="entry-content">
2217
+ ${this.entry.messages.map(
2218
+ (s) => $`
2219
+ <div class="message-container">
2220
+ <div class="message-content">
2221
+ <conversation-group .group=${s}></conversation-group>
2222
+ </div>
2223
+ </div>
2224
+ `
2225
+ )}
2226
+ </div>
2227
+ ${this._renderTimestamp(
2228
+ this.entry.sender.name || "",
2229
+ this.entry.timestamp
2230
+ )}
2231
+ </div>`;
2232
+ default:
2233
+ return u;
2234
+ }
2235
+ }
2236
+ };
2237
+ ft.styles = [
2238
+ w`
2239
+ :host {
2240
+ box-sizing: border-box;
2241
+ display: block;
2242
+ }
2243
+ * {
2244
+ box-sizing: border-box;
2245
+ }
2246
+ .message-content {
2247
+ padding: var(--spacing-md);
2248
+ display: inline-block;
2249
+ margin-top: var(--spacing-md);
2250
+ max-width: 100%;
2251
+ border: 1px solid var(--gray-color);
2252
+ border-radius: var(--border-radius);
2253
+ background-color: var(--bubble-bg-color);
2254
+ color: var(--bubble-text-color);
2255
+ }
2256
+
2257
+ .conversation-user-message {
2258
+ --bubble-bg-color: var(--conversation-user-bg-color);
2259
+ --bubble-text-color: var(--conversation-user-text-color);
2260
+ margin-left: 10%;
2261
+ width: 90%;
2262
+ display: flex;
2263
+ flex-direction: column;
2264
+ align-items: flex-end;
2265
+ }
2266
+
2267
+ .conversation-agent-message {
2268
+ --bubble-bg-color: var(--conversation-agent-bg-color);
2269
+ --bubble-text-color: var(--conversation-agent-text-color);
2270
+ display: grid;
2271
+ margin-right: 10%;
2272
+ width: 90%;
2273
+
2274
+ grid-template-columns: 1fr;
2275
+ grid-template-rows: 1fr auto;
2276
+ grid-template-areas:
2277
+ 'content'
2278
+ 'info';
2279
+ }
2280
+ .conversation-agent-message.has-avatar {
2281
+ grid-template-columns: auto 1fr;
2282
+ grid-template-rows: 1fr auto;
2283
+ grid-template-areas:
2284
+ 'avatar content'
2285
+ '. info';
2286
+ }
2287
+
2288
+ .avatar {
2289
+ grid-area: avatar;
2290
+ place-self: flex-end;
2291
+ width: 32px;
2292
+ height: 32px;
2293
+ border-radius: 50%;
2294
+ align-self: flex-end;
2295
+ justify-self: center;
2296
+ overflow: hidden;
2297
+ margin-right: var(--spacing-md);
2298
+ justify-content: center;
2299
+ align-items: center;
2300
+ }
2301
+ .avatar img {
2302
+ height: 100%;
2303
+ width: 100%;
2304
+ object-fit: cover;
2305
+ }
2306
+
2307
+ .conversation-timestamp {
2308
+ grid-area: info;
2309
+ margin: 0;
2310
+ line-height: 1.5em;
2311
+ grid-area: info;
2312
+ color: var(--text-color);
2313
+ font-size: 0.8rem;
2314
+ font-weight: 300;
2315
+ }
2316
+
2317
+ .entry-content {
2318
+ grid-area: content;
2319
+ }
2320
+ `
2321
+ ];
2322
+ is([
2323
+ g({ attribute: !1 })
2324
+ ], ft.prototype, "entry", 2);
2325
+ ft = is([
2326
+ k("conversation-entry")
2327
+ ], ft);
2328
+ var Ji = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, ns = (e, t, s, i) => {
2329
+ for (var n = i > 1 ? void 0 : i ? Vi(t, s) : t, r = e.length - 1, o; r >= 0; r--)
2330
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
2331
+ return i && n && Ji(t, s, n), n;
2332
+ };
2333
+ let $t = class extends y {
2334
+ render() {
2335
+ return $`
2336
+ <div class="message-group">
2337
+ ${this.group.items.map(
2338
+ ([e, t]) => $`
2339
+ ${e === "html" ? $`
2340
+ <message-type-html .message=${t}></message-type-html>
2341
+ ` : u}
2342
+ `
2343
+ )}
2344
+ </div>
2345
+ `;
2346
+ }
2347
+ };
2348
+ $t.styles = [
2349
+ w`
2350
+ :host {
2351
+ box-sizing: border-box;
2352
+ display: block;
2353
+ }
2354
+ * {
2355
+ box-sizing: border-box;
2356
+ }
2357
+ .message-group {
2358
+ display: flex;
2359
+ flex-direction: column;
2360
+ gap: var(--spacing-md);
2361
+ }
2362
+ `
2363
+ ];
2364
+ ns([
2365
+ g({ attribute: !1 })
2366
+ ], $t.prototype, "group", 2);
2367
+ $t = ns([
2368
+ k("conversation-group")
2369
+ ], $t);
2370
+ /**
2371
+ * @license
2372
+ * Copyright 2017 Google LLC
2373
+ * SPDX-License-Identifier: BSD-3-Clause
2374
+ */
2375
+ class Mt extends Gt {
2376
+ constructor(t) {
2377
+ if (super(t), this.et = u, t.type !== _t.CHILD)
2378
+ throw Error(this.constructor.directiveName + "() can only be used in child bindings");
2379
+ }
2380
+ render(t) {
2381
+ if (t === u || t == null)
2382
+ return this.vt = void 0, this.et = t;
2383
+ if (t === E)
2384
+ return t;
2385
+ if (typeof t != "string")
2386
+ throw Error(this.constructor.directiveName + "() called with a non-string value");
2387
+ if (t === this.et)
2388
+ return this.vt;
2389
+ this.et = t;
2390
+ const s = [t];
2391
+ return s.raw = s, this.vt = { _$litType$: this.constructor.resultType, strings: s, values: [] };
2392
+ }
2393
+ }
2394
+ Mt.directiveName = "unsafeHTML", Mt.resultType = 1;
2395
+ const tn = xt(Mt);
2396
+ var en = Object.defineProperty, sn = Object.getOwnPropertyDescriptor, rs = (e, t, s, i) => {
2397
+ for (var n = i > 1 ? void 0 : i ? sn(t, s) : t, r = e.length - 1, o; r >= 0; r--)
2398
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
2399
+ return i && n && en(t, s, n), n;
2400
+ };
2401
+ let gt = class extends y {
2402
+ render() {
2403
+ return $`<div class="message-type-html">
2404
+ ${tn(this.message.content)}
2405
+ </div>`;
2406
+ }
2407
+ };
2408
+ gt.styles = [
2409
+ w`
2410
+ :host {
2411
+ box-sizing: border-box;
2412
+ }
2413
+ * {
2414
+ box-sizing: border-box;
2415
+ }
2416
+ p {
2417
+ margin: 0;
2418
+ padding: 0;
2419
+ word-break: break-word;
2420
+ }
2421
+ `
2422
+ ];
2423
+ rs([
2424
+ g({ attribute: !1 })
2425
+ ], gt.prototype, "message", 2);
2426
+ gt = rs([
2427
+ k("message-type-html")
2428
+ ], gt);
2429
+ var nn = Object.defineProperty, rn = Object.getOwnPropertyDescriptor, Kt = (e, t, s, i) => {
2430
+ for (var n = i > 1 ? void 0 : i ? rn(t, s) : t, r = e.length - 1, o; r >= 0; r--)
2431
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
2432
+ return i && n && nn(t, s, n), n;
2433
+ };
2434
+ const on = (e) => {
2435
+ e.scrollTo ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight;
2436
+ }, os = es(y);
2437
+ class W extends os {
2438
+ constructor() {
2439
+ super(...arguments), this.message = "", this.platform = null, this.session = null, this.conversationContentRef = Je(), this.chatScrollHeight = 0;
2440
+ }
2441
+ async connectedCallback() {
2442
+ var s;
2443
+ super.connectedCallback();
2444
+ const t = await this.application.container.environment.container.get(
2445
+ "conversation"
2446
+ );
2447
+ this.platform = t || null, this.session = ((s = this.platform) == null ? void 0 : s.createSession(this)) || null;
2448
+ }
2449
+ async _onSendMessage(t) {
2450
+ t.preventDefault();
2451
+ const s = new CustomEvent("user-submit", {
2452
+ detail: { text: this.message }
2453
+ });
2454
+ this.dispatchEvent(s), this.message = "";
2455
+ }
2456
+ _inputHandler(t) {
2457
+ this.message = t.target.value;
2458
+ }
2459
+ _actionHandler(t) {
2460
+ }
2461
+ updated(t) {
2462
+ const s = this.conversationContentRef.value;
2463
+ s && setTimeout(() => {
2464
+ const i = s.scrollHeight;
2465
+ i > this.chatScrollHeight && (on(s), this.chatScrollHeight = i);
2466
+ }, 1e3);
2467
+ }
2468
+ render() {
2469
+ return $` <div
2470
+ @action=${this._actionHandler}
2471
+ class=${qt({
2472
+ conversation: !0,
2473
+ "input-has-text": this.message.length > 0
2474
+ })}
2475
+ >
2476
+ <div class="conversation-content" ${Ve(this.conversationContentRef)}>
2477
+ ${this.session ? $`<ace-conversation-session
2478
+ .session=${this.session}
2479
+ ></ace-conversation-session>` : u}
2480
+ </div>
2481
+ <form class="conversation-bottom" @submit=${this._onSendMessage}>
2482
+ <input
2483
+ placeholder=${this.properties.inputPlaceholder || "Type your message here..."}
2484
+ .value=${this.message}
2485
+ @input=${this._inputHandler}
2486
+ />
2487
+ <div class="conversation-actions">
2488
+ <button class="conversation-send-button" type="submit">
2489
+ <telia-icon svg=${Cs.svg}></telia-icon>
2490
+ </button>
2491
+ </div>
2492
+ </form>
2493
+ </div>`;
2494
+ }
2495
+ }
2496
+ W.styles = [
2497
+ os.styles || [],
2498
+ w`
2499
+ :host {
2500
+ font-family: var(--font-family);
2501
+ /* --send-icon-color: var(--gray-dark-color, #a6a6a6); */
2502
+ --send-icon-opacity: 0.4;
2503
+ --send-icon-color: var(--text-color);
2504
+ --conversation-bg: #fafafa;
2505
+ --conversation-agent-bg-color: var(--secondary-background);
2506
+ --conversation-agent-text-color: var(--text-on-secondary-background);
2507
+ --conversation-user-bg-color: var(--primary-background);
2508
+ --conversation-user-text-color: var(--text-on-primary-background);
2509
+
2510
+ scrollbar-width: thin; /* Firefox */
2511
+ scrollbar-color: #7f7f7f transparent; /* Firefox */
2512
+ }
2513
+ ::-webkit-scrollbar {
2514
+ width: 3px !important;
2515
+ background-color: transparent;
2516
+ border-left: none;
2517
+ }
2518
+ ::-webkit-scrollbar-thumb {
2519
+ background-color: #7f7f7f;
2520
+ }
2521
+ ::-webkit-scrollbar-track {
2522
+ -webkit-box-shadow: none !important;
2523
+ background-color: transparent;
2524
+ }
2525
+
2526
+ .conversation {
2527
+ display: grid;
2528
+ grid-template-rows: 1fr auto;
2529
+ gap: var(--spacing-lg);
2530
+ height: 100%;
2531
+ background-color: transparent;
2532
+ }
2533
+ .conversation.input-has-text {
2534
+ /* --send-icon-color: var(--primary-color); */
2535
+ --send-icon-opacity: 1;
2536
+ }
2537
+ .conversation-content {
2538
+ flex: 1;
2539
+ background-color: var(--conversation-bg);
2540
+ padding: var(--spacing-md);
2541
+ overflow-y: auto;
2542
+ overflow-x: hidden;
2543
+ border-radius: var(--border-radius-sm);
2544
+ }
2545
+ .conversation-bottom {
2546
+ border-top: 1px solid var(--gray-color);
2547
+ border-radius: var(--border-radius-sm);
2548
+ background-color: #fff;
2549
+ min-height: 50px;
2550
+ max-height: 150px;
2551
+ display: flex;
2552
+ align-items: center;
2553
+ padding: 0 var(--spacing-md);
2554
+ margin: 0;
2555
+ }
2556
+ .conversation-bottom-left {
2557
+ border-right: 1px solid var(--gray-color);
2558
+ padding-right: var(--spacing-md);
2559
+ }
2560
+ .conversation-send-button {
2561
+ border: none;
2562
+ background: transparent;
2563
+ cursor: pointer;
2564
+ color: var(--send-icon-color);
2565
+ opacity: var(--send-icon-opacity);
2566
+ transition: opacity 200ms ease-in-out;
2567
+ }
2568
+ .conversation-send-button:hover {
2569
+ --send-icon-opacity: 1;
2570
+ }
2571
+ input {
2572
+ border: none;
2573
+ font-family: inherit;
2574
+ font-size: inherit;
2575
+ flex: 1;
2576
+ height: 2.5rem;
2577
+ outline: none;
2578
+ }
2579
+
2580
+ @keyframes loaderanim {
2581
+ 0% {
2582
+ opacity: 0;
2583
+ }
2584
+ 75% {
2585
+ opacity: 1;
2586
+ }
2587
+ 100% {
2588
+ opacity: 0;
2589
+ }
2590
+ }
2591
+
2592
+ .loader {
2593
+ display: flex;
2594
+ justify-content: center;
2595
+ }
2596
+
2597
+ .loader > div {
2598
+ height: 10px;
2599
+ width: 10px;
2600
+ border-radius: 50%;
2601
+ margin: 5px;
2602
+ background-color: var(--text-color);
2603
+ animation-name: loaderanim;
2604
+ animation-duration: 1s;
2605
+ animation-iteration-count: infinite;
2606
+ }
2607
+
2608
+ .loader > div:nth-of-type(2) {
2609
+ animation-delay: 100ms;
2610
+ }
2611
+
2612
+ .loader > div:nth-of-type(3) {
2613
+ animation-delay: 200ms;
2614
+ }
2615
+ `
2616
+ ];
2617
+ Kt([
2618
+ A()
2619
+ ], W.prototype, "message", 2);
2620
+ Kt([
2621
+ A()
2622
+ ], W.prototype, "platform", 2);
2623
+ Kt([
2624
+ A()
2625
+ ], W.prototype, "session", 2);
2626
+ const fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2627
+ __proto__: null,
2628
+ Conversation: W,
2629
+ default: W
2630
+ }, Symbol.toStringTag, { value: "Module" }));
2631
+ export {
2632
+ fn as c,
2633
+ Cs as s
2634
+ };