@telia-ace/widget-conversation-flamingo 1.1.12 → 1.1.13

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-1bf28a6e.js +572 -0
  2. package/conversation-7da6b954.mjs +2619 -0
  3. package/conversation-component.d.ts +2 -0
  4. package/conversation-platform.d.ts +10 -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-1ea0fde8.mjs → index-217978bc.mjs} +320 -319
  10. package/index-43151bb4.js +1 -0
  11. package/index-494250de.js +3 -0
  12. package/index-4ba82b09.mjs +777 -0
  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,2619 @@
1
+ import { C as wt } from "./index-4ba82b09.mjs";
2
+ /**
3
+ * @license
4
+ * Copyright 2019 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const it = globalThis, Ht = it.ShadowRoot && (it.ShadyCSS === void 0 || it.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Rt = Symbol(), Kt = /* @__PURE__ */ new WeakMap();
8
+ let Se = class {
9
+ constructor(t, s, i) {
10
+ if (this._$cssResult$ = !0, i !== Rt)
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 (Ht && t === void 0) {
18
+ const i = s !== void 0 && s.length === 1;
19
+ i && (t = Kt.get(s)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Kt.set(s, t));
20
+ }
21
+ return t;
22
+ }
23
+ toString() {
24
+ return this.cssText;
25
+ }
26
+ };
27
+ const rs = (e) => new Se(typeof e == "string" ? e : e + "", void 0, Rt), 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 Se(s, e, Rt);
36
+ }, os = (e, t) => {
37
+ if (Ht)
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 = it.litNonce;
42
+ n !== void 0 && i.setAttribute("nonce", n), i.textContent = s.cssText, e.appendChild(i);
43
+ }
44
+ }, Qt = Ht ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
45
+ let s = "";
46
+ for (const i of t.cssRules)
47
+ s += i.cssText;
48
+ return rs(s);
49
+ })(e) : e;
50
+ /**
51
+ * @license
52
+ * Copyright 2017 Google LLC
53
+ * SPDX-License-Identifier: BSD-3-Clause
54
+ */
55
+ const { is: as, defineProperty: ls, getOwnPropertyDescriptor: cs, getOwnPropertyNames: ds, getOwnPropertySymbols: hs, getPrototypeOf: ps } = Object, E = globalThis, Zt = E.trustedTypes, us = Zt ? Zt.emptyScript : "", At = E.reactiveElementPolyfillSupport, W = (e, t) => e, nt = { toAttribute(e, t) {
56
+ switch (t) {
57
+ case Boolean:
58
+ e = e ? us : 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
+ } }, Mt = (e, t) => !as(e, t), Xt = { attribute: !0, type: String, converter: nt, reflect: !1, hasChanged: Mt };
84
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), E.litPropertyMetadata ?? (E.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
85
+ let N = 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 = Xt) {
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 && ls(this.prototype, t, n);
96
+ }
97
+ }
98
+ static getPropertyDescriptor(t, s, i) {
99
+ const { get: n, set: r } = cs(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) ?? Xt;
113
+ }
114
+ static _$Ei() {
115
+ if (this.hasOwnProperty(W("elementProperties")))
116
+ return;
117
+ const t = ps(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(W("finalized")))
122
+ return;
123
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(W("properties"))) {
124
+ const s = this.properties, i = [...ds(s), ...hs(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(Qt(n));
148
+ } else
149
+ t !== void 0 && s.push(Qt(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 os(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 : nt).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 : nt;
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 ?? Mt)(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
+ N.elementStyles = [], N.shadowRootOptions = { mode: "open" }, N[W("elementProperties")] = /* @__PURE__ */ new Map(), N[W("finalized")] = /* @__PURE__ */ new Map(), At == null || At({ ReactiveElement: N }), (E.reactiveElementVersions ?? (E.reactiveElementVersions = [])).push("2.0.1");
297
+ /**
298
+ * @license
299
+ * Copyright 2017 Google LLC
300
+ * SPDX-License-Identifier: BSD-3-Clause
301
+ */
302
+ const G = globalThis, rt = G.trustedTypes, Jt = rt ? rt.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Ee = "$lit$", S = `lit$${(Math.random() + "").slice(9)}$`, Ce = "?" + S, fs = `<${Ce}>`, P = document, Y = () => P.createComment(""), K = (e) => e === null || typeof e != "object" && typeof e != "function", ke = Array.isArray, $s = (e) => ke(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", St = `[
303
+ \f\r]`, F = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Vt = /-->/g, te = />/g, k = RegExp(`>|${St}(?:([^\\s"'>=/]+)(${St}*=${St}*(?:[^
304
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ee = /'/g, se = /"/g, Te = /^(?:script|style|textarea|title)$/i, gs = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), $ = gs(1), C = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), ie = /* @__PURE__ */ new WeakMap(), O = P.createTreeWalker(P, 129);
305
+ function Oe(e, t) {
306
+ if (!Array.isArray(e) || !e.hasOwnProperty("raw"))
307
+ throw Error("invalid template strings array");
308
+ return Jt !== void 0 ? Jt.createHTML(t) : t;
309
+ }
310
+ const ms = (e, t) => {
311
+ const s = e.length - 1, i = [];
312
+ let n, r = t === 2 ? "<svg>" : "", o = F;
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 === F ? h[1] === "!--" ? o = Vt : h[1] !== void 0 ? o = te : h[2] !== void 0 ? (Te.test(h[2]) && (n = RegExp("</" + h[2], "g")), o = k) : h[3] !== void 0 && (o = k) : o === k ? h[0] === ">" ? (o = n ?? F, d = -1) : h[1] === void 0 ? d = -2 : (d = o.lastIndex - h[2].length, c = h[1], o = h[3] === void 0 ? k : h[3] === '"' ? se : ee) : o === se || o === ee ? o = k : o === Vt || o === te ? o = F : (o = k, n = void 0);
318
+ const f = o === k && e[a + 1].startsWith("/>") ? " " : "";
319
+ r += o === F ? l + fs : d >= 0 ? (i.push(c), l.slice(0, d) + Ee + l.slice(d) + S + f) : l + S + (d === -2 ? a : f);
320
+ }
321
+ return [Oe(e, r + (e[s] || "<?>") + (t === 2 ? "</svg>" : "")), i];
322
+ };
323
+ class Q {
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] = ms(t, s);
329
+ if (this.el = Q.createElement(c, i), O.currentNode = this.el.content, s === 2) {
330
+ const d = this.el.content.firstChild;
331
+ d.replaceWith(...d.childNodes);
332
+ }
333
+ for (; (n = O.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(Ee)) {
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] === "." ? ys : _[1] === "?" ? bs : _[1] === "@" ? _s : ft }), n.removeAttribute(d);
340
+ } else
341
+ d.startsWith(S) && (l.push({ type: 6, index: r }), n.removeAttribute(d));
342
+ if (Te.test(n.tagName)) {
343
+ const d = n.textContent.split(S), p = d.length - 1;
344
+ if (p > 0) {
345
+ n.textContent = rt ? rt.emptyScript : "";
346
+ for (let f = 0; f < p; f++)
347
+ n.append(d[f], Y()), O.nextNode(), l.push({ type: 2, index: ++r });
348
+ n.append(d[p], Y());
349
+ }
350
+ }
351
+ } else if (n.nodeType === 8)
352
+ if (n.data === Ce)
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 = P.createElement("template");
364
+ return i.innerHTML = t, i;
365
+ }
366
+ }
367
+ function I(e, t, s = e, i) {
368
+ var o, a;
369
+ if (t === C)
370
+ return t;
371
+ let n = i !== void 0 ? (o = s._$Co) == null ? void 0 : o[i] : s._$Cl;
372
+ const r = K(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 = I(e, n._$AS(e, t.values), n, i)), t;
374
+ }
375
+ class vs {
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) ?? P).importNode(s, !0);
387
+ O.currentNode = n;
388
+ let r = O.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 X(r, r.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(r, l.name, l.strings, this, t) : l.type === 6 && (c = new xs(r, this, t)), this._$AV.push(c), l = i[++a];
393
+ }
394
+ o !== (l == null ? void 0 : l.index) && (r = O.nextNode(), o++);
395
+ }
396
+ return O.currentNode = P, 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 X {
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 = I(this, t, s), K(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== C && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : $s(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 && K(this._$AH) ? this._$AA.nextSibling.data = t : this.$(P.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 = Q.createElement(Oe(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 vs(n, this), a = o.u(this.options);
442
+ o.p(s), this.$(a), this._$AH = o;
443
+ }
444
+ }
445
+ _$AC(t) {
446
+ let s = ie.get(t.strings);
447
+ return s === void 0 && ie.set(t.strings, s = new Q(t)), s;
448
+ }
449
+ T(t) {
450
+ ke(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 X(this.k(Y()), this.k(Y()), 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 ft {
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 = I(this, t, s, 0), o = !K(t) || t !== this._$AH && t !== C, 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 = I(this, a[i + l], s, l), c === C && (c = this._$AH[l]), o || (o = !K(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 ys extends ft {
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 bs = class extends ft {
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 _s extends ft {
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 = I(this, t, s, 0) ?? u) === C)
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 xs {
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
+ I(this, t);
536
+ }
537
+ }
538
+ const Et = G.litHtmlPolyfillSupport;
539
+ Et == null || Et(Q, X), (G.litHtmlVersions ?? (G.litHtmlVersions = [])).push("3.0.2");
540
+ const ws = (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 X(t.insertBefore(Y(), 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 N {
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 = ws(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 C;
577
+ }
578
+ };
579
+ var Ae;
580
+ y._$litElement$ = !0, y.finalized = !0, (Ae = globalThis.litElementHydrateSupport) == null || Ae.call(globalThis, { LitElement: y });
581
+ const Ct = globalThis.litElementPolyfillSupport;
582
+ Ct == null || Ct({ LitElement: y });
583
+ (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
584
+ const As = { 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>' }, H = {
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 R, Pe, $t, Le = !1, ot = !1, jt = !1, v = !1, ne = null, Pt = !1;
669
+ const gt = typeof window < "u" ? window : {}, x = gt.document || { head: {} }, Ue = gt.HTMLElement || class {
670
+ }, m = {
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
+ }, Ss = /* @__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
+ })(), Es = (e) => Promise.resolve(e), Cs = /* @__PURE__ */ (() => {
690
+ try {
691
+ return new CSSStyleSheet(), typeof new CSSStyleSheet().replace == "function";
692
+ } catch {
693
+ }
694
+ return !1;
695
+ })(), Ne = (e, t, s, i) => {
696
+ s && s.map(([n, r, o]) => {
697
+ const a = Ts(e, n), l = ks(t, o), c = Os(n);
698
+ m.ael(a, r, l, c), (t.$rmListeners$ = t.$rmListeners$ || []).push(() => m.rel(a, r, l, c));
699
+ });
700
+ }, ks = (e, t) => (s) => {
701
+ try {
702
+ H.lazyLoad || e.$hostElement$[t](s);
703
+ } catch (i) {
704
+ J(i);
705
+ }
706
+ }, Ts = (e, t) => t & 4 ? x : t & 8 ? gt : t & 16 ? x.body : e, Os = (e) => Ss ? {
707
+ passive: (e & 1) !== 0,
708
+ capture: (e & 2) !== 0
709
+ } : (e & 2) !== 0, re = "http://www.w3.org/1999/xlink", L = (e, t = "") => () => {
710
+ }, oe = /* @__PURE__ */ new WeakMap(), Ps = (e, t, s) => {
711
+ let i = ct.get(e);
712
+ Cs && s ? (i = i || new CSSStyleSheet(), i.replace(t)) : i = t, ct.set(e, i);
713
+ }, Ls = (e, t, s, i) => {
714
+ let n = He(t, s), r = ct.get(n);
715
+ if (e = e.nodeType === 11 ? e : x, r)
716
+ if (typeof r == "string") {
717
+ e = e.head || e;
718
+ let o = oe.get(e), a;
719
+ o || oe.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
+ }, Us = (e) => {
724
+ const t = e.$cmpMeta$, s = e.$hostElement$, i = t.$flags$, n = L("attachStyles", t.$tagName$), r = Ls(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
+ }, He = (e, t) => "sc-" + (t && e.$flags$ & 32 ? e.$tagName$ + "-" + t : e.$tagName$), Ns = (e) => li.map((t) => t(e)).find((t) => !!t), ae = {}, Hs = "http://www.w3.org/2000/svg", Rs = "http://www.w3.org/1999/xhtml", Ms = (e) => e != null, Dt = (e) => (e = typeof e, e === "object" || e === "function"), j = (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" && !Dt(i)) && (i = String(i)), o && a ? l[l.length - 1].$text$ += i : l.push(o ? at(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, Ds);
741
+ const h = at(e, null);
742
+ return h.$attrs$ = t, l.length > 0 && (h.$children$ = l), h.$key$ = n, h.$name$ = r, h;
743
+ }, at = (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
+ }, It = {}, js = (e) => e && e.$tag$ === It, Ds = {
753
+ forEach: (e, t) => e.map(le).forEach(t),
754
+ map: (e, t) => e.map(le).map(t).map(Is)
755
+ }, le = (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
+ }), Is = (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), j(e.vtag, s, ...e.vchildren || []);
766
+ }
767
+ const t = at(e.vtag, e.vtext);
768
+ return t.$attrs$ = e.vattrs, t.$children$ = e.vchildren, t.$key$ = e.vkey, t.$name$ = e.vname, t;
769
+ }, ce = (e, t, s, i, n, r) => {
770
+ if (s !== i) {
771
+ let o = ue(e, t), a = t.toLowerCase();
772
+ if (t === "class") {
773
+ const l = e.classList, c = de(s), h = de(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) : ue(gt, a) ? t = a.slice(2) : t = a[2] + t.slice(3), s && m.rel(e, t, s, !1), i && m.ael(e, t, i, !1);
785
+ else {
786
+ const l = Dt(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(re, t) : e.removeAttribute(t)) : (!o || r & 4 || n) && !l && (i = i === !0 ? "" : i, c ? e.setAttributeNS(re, t, i) : e.setAttribute(t, i));
799
+ }
800
+ }
801
+ }, Bs = /\s/, de = (e) => e ? e.split(Bs) : [], Re = (e, t, s, i) => {
802
+ const n = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, r = e && e.$attrs$ || ae, o = t.$attrs$ || ae;
803
+ for (i in r)
804
+ i in o || ce(n, i, r[i], void 0, s, t.$flags$);
805
+ for (i in o)
806
+ ce(n, i, r[i], o[i], s, t.$flags$);
807
+ }, lt = (e, t, s, i) => {
808
+ let n = t.$children$[s], r = 0, o, a, l;
809
+ if (Le || (jt = !0, n.$tag$ === "slot" && (R && i.classList.add(R + "-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 (v || (v = n.$tag$ === "svg"), o = n.$elm$ = x.createElementNS(v ? Hs : Rs, n.$flags$ & 2 ? "slot-fb" : n.$tag$), v && n.$tag$ === "foreignObject" && (v = !1), Re(null, n, v), Ms(R) && o["s-si"] !== R && o.classList.add(o["s-si"] = R), n.$children$)
821
+ for (r = 0; r < n.$children$.length; ++r)
822
+ a = lt(e, n, r, o), a && o.appendChild(a);
823
+ n.$tag$ === "svg" ? v = !1 : o.tagName === "foreignObject" && (v = !0);
824
+ }
825
+ return o["s-hn"] = $t, n.$flags$ & 3 && (o["s-sr"] = !0, o["s-cr"] = Pe, o["s-sn"] = n.$name$ || "", l = e && e.$children$ && e.$children$[s], l && l.$tag$ === n.$tag$ && e.$elm$ && Z(e.$elm$, !1)), o;
826
+ }, Z = (e, t) => {
827
+ m.$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"] !== $t && n["s-ol"] && (De(n).insertBefore(n, Bt(n)), n["s-ol"].remove(), n["s-ol"] = void 0, jt = !0), t && Z(n, t);
832
+ }
833
+ m.$flags$ &= -2;
834
+ }, Me = (e, t, s, i, n, r) => {
835
+ let o = e["s-cr"] && e["s-cr"].parentNode || e, a;
836
+ for (o.shadowRoot && o.tagName === $t && (o = o.shadowRoot); n <= r; ++n)
837
+ i[n] && (a = lt(null, s, n, e), a && (i[n].$elm$ = a, o.insertBefore(a, Bt(t))));
838
+ }, je = (e, t, s, i, n) => {
839
+ for (; t <= s; ++t)
840
+ (i = e[t]) && (n = i.$elm$, ze(i), ot = !0, n["s-ol"] ? n["s-ol"].remove() : Z(n, !0), n.remove());
841
+ }, zs = (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], _, tt;
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 (et(c, p))
853
+ M(c, p), c = t[++n], p = i[++r];
854
+ else if (et(h, f))
855
+ M(h, f), h = t[--l], f = i[--d];
856
+ else if (et(c, f))
857
+ (c.$tag$ === "slot" || f.$tag$ === "slot") && Z(c.$elm$.parentNode, !1), M(c, f), e.insertBefore(c.$elm$, h.$elm$.nextSibling), c = t[++n], f = i[--d];
858
+ else if (et(h, p))
859
+ (c.$tag$ === "slot" || f.$tag$ === "slot") && Z(h.$elm$.parentNode, !1), M(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 ? (tt = t[o], tt.$tag$ !== p.$tag$ ? _ = lt(t && t[r], s, o, e) : (M(tt, p), t[o] = void 0, _ = tt.$elm$), p = i[++r]) : (_ = lt(t && t[r], s, r, e), p = i[++r]), _ && De(c.$elm$).insertBefore(_, Bt(c.$elm$));
867
+ }
868
+ n > l ? Me(e, i[d + 1] == null ? null : i[d + 1].$elm$, s, i, r, d) : r > d && je(t, n, l);
869
+ }, et = (e, t) => e.$tag$ === t.$tag$ ? e.$tag$ === "slot" ? e.$name$ === t.$name$ : e.$key$ === t.$key$ : !1, Bt = (e) => e && e["s-ol"] || e, De = (e) => (e["s-ol"] ? e["s-ol"] : e).parentNode, M = (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 ? (v = r === "svg" ? !0 : r === "foreignObject" ? !1 : v, r === "slot" || Re(e, t, v), i !== null && n !== null ? zs(s, i, t, n) : n !== null ? (e.$text$ !== null && (s.textContent = ""), Me(s, null, t, n, 0, n.length - 1)) : i !== null && je(i, 0, i.length - 1), v && r === "svg" && (v = !1)) : (a = s["s-cr"]) ? a.parentNode.textContent = o : e.$text$ !== o && (s.data = o);
873
+ }, Ie = (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
+ Ie(s);
890
+ }
891
+ }, b = [], Be = (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"] && (he(s, n) ? (r = b.find((h) => h.$nodeToRelocate$ === s), ot = !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
+ he(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 && Be(t);
905
+ }
906
+ }, he = (e, t) => e.nodeType === 1 ? e.getAttribute("slot") === null && t === "" || e.getAttribute("slot") === t : e["s-sn"] === t ? !0 : t === "", ze = (e) => {
907
+ e.$attrs$ && e.$attrs$.ref && e.$attrs$.ref(null), e.$children$ && e.$children$.map(ze);
908
+ }, Fs = (e, t) => {
909
+ const s = e.$hostElement$, i = e.$cmpMeta$, n = e.$vnode$ || at(null, null), r = js(t) ? t : j(null, null, t);
910
+ $t = 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, R = s["s-sc"], Pe = s["s-cr"], Le = (i.$flags$ & 1) !== 0, ot = !1, M(n, r);
911
+ {
912
+ if (m.$flags$ |= 1, jt) {
913
+ Be(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
+ ot && Ie(r.$elm$), m.$flags$ &= -2, b.length = 0;
929
+ }
930
+ }, Ws = (e) => e, Gs = (e, t, s) => {
931
+ const i = Ws(e);
932
+ return {
933
+ emit: (n) => qs(i, t, {
934
+ bubbles: !!(s & 4),
935
+ composed: !!(s & 2),
936
+ cancelable: !!(s & 1),
937
+ detail: n
938
+ })
939
+ };
940
+ }, qs = (e, t, s) => {
941
+ const i = m.ce(t, s);
942
+ return e.dispatchEvent(i), i;
943
+ }, Ys = (e, t) => {
944
+ }, Fe = (e, t) => (e.$flags$ |= 16, Ys(e, e.$ancestorComponent$), hi(() => Ks(e, t))), Ks = (e, t) => {
945
+ const s = e.$hostElement$, i = L("scheduleUpdate", e.$cmpMeta$.$tagName$), n = s;
946
+ let r;
947
+ return t ? r = D(n, "componentWillLoad") : r = D(n, "componentWillUpdate"), r = pe(r, () => D(n, "componentWillRender")), i(), pe(r, () => Qs(e, n, t));
948
+ }, Qs = async (e, t, s) => {
949
+ const i = e.$hostElement$, n = L("update", e.$cmpMeta$.$tagName$);
950
+ i["s-rc"], s && Us(e);
951
+ const r = L("render", e.$cmpMeta$.$tagName$);
952
+ Zs(e, t, i), r(), n(), Xs(e);
953
+ }, Zs = (e, t, s) => {
954
+ try {
955
+ ne = t, t = t.render && t.render(), e.$flags$ &= -17, e.$flags$ |= 2, (H.hasRenderFn || H.reflect) && (H.vdomRender || H.reflect) && (H.hydrateServerSide || Fs(e, t));
956
+ } catch (a) {
957
+ J(a, e.$hostElement$);
958
+ }
959
+ return ne = null, null;
960
+ }, Xs = (e) => {
961
+ const t = e.$cmpMeta$.$tagName$, s = e.$hostElement$, i = L("postUpdate", t), n = s;
962
+ e.$ancestorComponent$, D(n, "componentDidRender"), e.$flags$ & 64 ? (D(n, "componentDidUpdate"), i()) : (e.$flags$ |= 64, D(n, "componentDidLoad"), i());
963
+ }, D = (e, t, s) => {
964
+ if (e && e[t])
965
+ try {
966
+ return e[t](s);
967
+ } catch (i) {
968
+ J(i);
969
+ }
970
+ }, pe = (e, t) => e && e.then ? e.then(t) : t(), Js = (e, t) => e != null && !Dt(e) ? t & 4 ? e === "false" ? !1 : e === "" || !!e : t & 2 ? parseFloat(e) : t & 1 ? String(e) : e : e, Vs = (e, t) => mt(e).$instanceValues$.get(t), ti = (e, t, s, i) => {
971
+ const n = mt(e), r = e, o = n.$instanceValues$.get(t), a = n.$flags$, l = r;
972
+ s = Js(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
+ J(f, r);
984
+ }
985
+ });
986
+ }
987
+ if ((a & 18) === 2) {
988
+ if (l.componentShouldUpdate && l.componentShouldUpdate(s, o, t) === !1)
989
+ return;
990
+ Fe(n, !1);
991
+ }
992
+ }
993
+ }
994
+ }, ei = (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 Vs(this, r);
1002
+ },
1003
+ set(a) {
1004
+ ti(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
+ m.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
+ }, si = 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$ = Ns(e)]);
1035
+ const a = He(s, t.$modeName$);
1036
+ if (!ct.has(a)) {
1037
+ const l = L("registerStyles", s.$tagName$);
1038
+ Ps(a, o, !!(s.$flags$ & 1)), l();
1039
+ }
1040
+ }
1041
+ t.$ancestorComponent$, (() => Fe(t, !0))();
1042
+ }, ii = (e) => {
1043
+ }, ni = (e) => {
1044
+ if (!(m.$flags$ & 1)) {
1045
+ const t = mt(e), s = t.$cmpMeta$, i = L("connectedCallback", s.$tagName$);
1046
+ t.$flags$ & 1 ? (Ne(e, t, s.$listeners$), ii(t.$lazyInstance$)) : (t.$flags$ |= 1, s.$flags$ & 12 && ri(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
+ }), si(e, t, s)), i();
1052
+ }
1053
+ }, ri = (e) => {
1054
+ const t = e["s-cr"] = x.createComment("");
1055
+ t["s-cn"] = !0, e.insertBefore(t, e.firstChild);
1056
+ }, oi = (e) => {
1057
+ if (!(m.$flags$ & 1)) {
1058
+ const t = mt(e);
1059
+ t.$rmListeners$ && (t.$rmListeners$.map((s) => s()), t.$rmListeners$ = void 0);
1060
+ }
1061
+ }, We = (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
+ ai(this, s);
1071
+ },
1072
+ connectedCallback() {
1073
+ ni(this), i && i.call(this);
1074
+ },
1075
+ disconnectedCallback() {
1076
+ oi(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$, ei(e, s);
1085
+ }, Ge = /* @__PURE__ */ new WeakMap(), mt = (e) => Ge.get(e), ai = (e, t) => {
1086
+ const s = {
1087
+ $flags$: 0,
1088
+ $hostElement$: e,
1089
+ $cmpMeta$: t,
1090
+ $instanceValues$: /* @__PURE__ */ new Map()
1091
+ };
1092
+ return Ne(e, s, t.$listeners$), Ge.set(e, s);
1093
+ }, ue = (e, t) => t in e, J = (e, t) => (0, console.error)(e, t), ct = /* @__PURE__ */ new Map(), li = [], fe = [], qe = [], ci = (e, t) => (s) => {
1094
+ e.push(s), Pt || (Pt = !0, t && m.$flags$ & 4 ? di(Lt) : m.raf(Lt));
1095
+ }, $e = (e) => {
1096
+ for (let t = 0; t < e.length; t++)
1097
+ try {
1098
+ e[t](performance.now());
1099
+ } catch (s) {
1100
+ J(s);
1101
+ }
1102
+ e.length = 0;
1103
+ }, Lt = () => {
1104
+ $e(fe), $e(qe), (Pt = fe.length > 0) && m.raf(Lt);
1105
+ }, di = (e) => Es().then(e), hi = /* @__PURE__ */ ci(qe, !0), pi = (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
+ }, ui = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim();
1114
+ function fi(e) {
1115
+ return `${e.getFullYear()}.${e.getMonth() + 1}`;
1116
+ }
1117
+ class $i {
1118
+ constructor(t) {
1119
+ this.voca_component = t, this.voca_added = fi(/* @__PURE__ */ new Date());
1120
+ }
1121
+ }
1122
+ const gi = "telia-vst{display:none}", mi = /* @__PURE__ */ We(class extends Ue {
1123
+ constructor() {
1124
+ super(), this.__registerHost(), this.vocaInternalUStats = Gs(this, "vocaInternalUStats", 7);
1125
+ }
1126
+ connectedCallback() {
1127
+ this.vocaInternalUStats.emit(new $i(this.dataTrackingId));
1128
+ }
1129
+ render() {
1130
+ return j(It, null);
1131
+ }
1132
+ static get style() {
1133
+ return gi;
1134
+ }
1135
+ }, [0, "telia-vst", {
1136
+ dataTrackingId: [1, "data-tracking-id"]
1137
+ }]);
1138
+ function Ye() {
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, mi);
1145
+ break;
1146
+ }
1147
+ });
1148
+ }
1149
+ Ye();
1150
+ function Ut() {
1151
+ return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : { vocadsIcons: void 0, vocadsIconsRegistered: !1 };
1152
+ }
1153
+ function vi() {
1154
+ if (typeof Ut().vocadsIcons !== void 0)
1155
+ return Ut().vocadsIcons;
1156
+ }
1157
+ function yi() {
1158
+ return Ut().vocadsIconsRegistered;
1159
+ }
1160
+ const bi = ".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))}", _i = /* @__PURE__ */ We(class extends Ue {
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 (yi() && this.name) {
1173
+ const e = vi();
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 = pi({
1185
+ content: ui(e),
1186
+ attributes: t,
1187
+ title: this.allyTitle
1188
+ });
1189
+ return j(It, { class: `telia-icon telia-icon--${this.size}` }, j("span", { "aria-label": this.allyTitle, class: "telia-icon__container", innerHTML: s }), j("telia-vst", { dataTrackingId: this.dataTrackingId }));
1190
+ }
1191
+ static get style() {
1192
+ return bi;
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 xi() {
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, _i);
1208
+ break;
1209
+ case "telia-vst":
1210
+ customElements.get(t) || Ye();
1211
+ break;
1212
+ }
1213
+ });
1214
+ }
1215
+ xi();
1216
+ /**
1217
+ * @license
1218
+ * Copyright 2017 Google LLC
1219
+ * SPDX-License-Identifier: BSD-3-Clause
1220
+ */
1221
+ const vt = (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 wi = { attribute: !0, type: String, converter: nt, reflect: !1, hasChanged: Mt }, Ai = (e = wi, 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" ? Ai(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 Si = (e) => e.strings === void 0;
1272
+ /**
1273
+ * @license
1274
+ * Copyright 2017 Google LLC
1275
+ * SPDX-License-Identifier: BSD-3-Clause
1276
+ */
1277
+ const yt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, bt = (e) => (...t) => ({ _$litDirective$: e, values: t });
1278
+ let zt = 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 q = (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), q(n, t);
1306
+ return !0;
1307
+ }, dt = (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
+ }, Ke = (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), ki(t);
1322
+ }
1323
+ };
1324
+ function Ei(e) {
1325
+ this._$AN !== void 0 ? (dt(this), this._$AM = e, Ke(this)) : this._$AM = e;
1326
+ }
1327
+ function Ci(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
+ q(i[r], !1), dt(i[r]);
1334
+ else
1335
+ i != null && (q(i, !1), dt(i));
1336
+ else
1337
+ q(this, e);
1338
+ }
1339
+ const ki = (e) => {
1340
+ e.type == yt.CHILD && (e._$AP ?? (e._$AP = Ci), e._$AQ ?? (e._$AQ = Ei));
1341
+ };
1342
+ let Qe = class extends zt {
1343
+ constructor() {
1344
+ super(...arguments), this._$AN = void 0;
1345
+ }
1346
+ _$AT(t, s, i) {
1347
+ super._$AT(t, s, i), Ke(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 && (q(this, t), dt(this));
1352
+ }
1353
+ setValue(t) {
1354
+ if (Si(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 Ze = () => new Ti();
1372
+ class Ti {
1373
+ }
1374
+ const kt = /* @__PURE__ */ new WeakMap(), Xe = bt(class extends Qe {
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 = kt.get(t);
1387
+ s === void 0 && (s = /* @__PURE__ */ new WeakMap(), kt.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 = kt.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 Ft = bt(class extends zt {
1408
+ constructor(e) {
1409
+ var t;
1410
+ if (super(e), e.type !== yt.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 C;
1432
+ }
1433
+ }), st = (e, t, s) => {
1434
+ e && s.style.setProperty(t, e);
1435
+ }, Je = (e, t) => {
1436
+ var s, i, n, r;
1437
+ st((s = e.colors) == null ? void 0 : s.primaryBackground, "--primary-background", t), st(
1438
+ (i = e.colors) == null ? void 0 : i.textOnPrimaryBackground,
1439
+ "--text-on-primary-background",
1440
+ t
1441
+ ), st(
1442
+ (n = e.colors) == null ? void 0 : n.secondaryBackground,
1443
+ "--secondary-background",
1444
+ t
1445
+ ), st(
1446
+ (r = e.colors) == null ? void 0 : r.textOnSecondaryBackground,
1447
+ "--text-on-secondary-background",
1448
+ t
1449
+ );
1450
+ };
1451
+ var Oi = Object.defineProperty, Pi = Object.getOwnPropertyDescriptor, _t = (e, t, s, i) => {
1452
+ for (var n = i > 1 ? void 0 : i ? Pi(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 && Oi(t, s, n), n;
1455
+ };
1456
+ class U 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 t;
1465
+ if (!((t = this.application) != null && t.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 t;
1475
+ (t = this.application) != null && t.settings && Je(this.application.settings.branding, this);
1476
+ }
1477
+ async _renderSymbol() {
1478
+ var r;
1479
+ const t = (r = this.application) == null ? void 0 : r.triggerIcon;
1480
+ if (!t)
1481
+ return u;
1482
+ const s = async (o) => await import("./index-217978bc.mjs").then(
1483
+ (l) => l[o]
1484
+ ), { type: i, content: n } = t;
1485
+ switch (i) {
1486
+ case "Telia": {
1487
+ const o = await s(n);
1488
+ return o ? $`<telia-icon
1489
+ class="trigger-icon"
1490
+ svg=${o.svg}
1491
+ size="lg"
1492
+ ></telia-icon>` : u;
1493
+ }
1494
+ default:
1495
+ return u;
1496
+ }
1497
+ }
1498
+ render() {
1499
+ return $`<button
1500
+ class=${Ft({
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
+ U.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
+ _t([
1610
+ g({ attribute: !1 })
1611
+ ], U.prototype, "application", 2);
1612
+ _t([
1613
+ A()
1614
+ ], U.prototype, "active", 2);
1615
+ _t([
1616
+ A()
1617
+ ], U.prototype, "loaded", 2);
1618
+ _t([
1619
+ A()
1620
+ ], U.prototype, "icon", 2);
1621
+ var Li = Object.defineProperty, Ui = Object.getOwnPropertyDescriptor, T = (e, t, s, i) => {
1622
+ for (var n = i > 1 ? void 0 : i ? Ui(t, s) : t, r = e.length - 1, o; r >= 0; r--)
1623
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
1624
+ return i && n && Li(t, s, n), n;
1625
+ };
1626
+ const Ve = (e) => {
1627
+ class t extends e {
1628
+ constructor() {
1629
+ super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
1630
+ }
1631
+ writeProperties(i) {
1632
+ this.properties = i;
1633
+ }
1634
+ writeLayout(i) {
1635
+ this.layout = i;
1636
+ }
1637
+ writeContext(i) {
1638
+ this.context = i;
1639
+ }
1640
+ addChild(i) {
1641
+ i.parent = this, this.nodes.push(i);
1642
+ }
1643
+ connectedCallback() {
1644
+ super.connectedCallback(), this.renderRoot.host.style.setProperty(
1645
+ "--width",
1646
+ this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
1647
+ );
1648
+ }
1649
+ }
1650
+ return t.styles = [
1651
+ // (superClass as unknown as typeof LitElement).styles ?? [],
1652
+ w`
1653
+ :host {
1654
+ font-family: var(--font-family);
1655
+ grid-column: span var(--width);
1656
+ max-width: 100%;
1657
+ overflow: hidden;
1658
+ box-sizing: border-box;
1659
+ display: block;
1660
+ }
1661
+ * {
1662
+ box-sizing: border-box;
1663
+ }
1664
+ `
1665
+ ], T([
1666
+ g()
1667
+ ], t.prototype, "properties", 2), T([
1668
+ g()
1669
+ ], t.prototype, "context", 2), T([
1670
+ g()
1671
+ ], t.prototype, "layout", 2), T([
1672
+ g()
1673
+ ], t.prototype, "name", 2), T([
1674
+ g()
1675
+ ], t.prototype, "type", 2), T([
1676
+ g({ attribute: !1 })
1677
+ ], t.prototype, "application", 2), T([
1678
+ g({ attribute: !1 })
1679
+ ], t.prototype, "parent", 2), t;
1680
+ };
1681
+ class ts extends Ve(y) {
1682
+ render() {
1683
+ return $`Non resolved component`;
1684
+ }
1685
+ }
1686
+ ts.styles = [
1687
+ w`
1688
+ :host {
1689
+ display: block;
1690
+ }
1691
+ `
1692
+ ];
1693
+ /**
1694
+ * @license
1695
+ * Copyright 2021 Google LLC
1696
+ * SPDX-License-Identifier: BSD-3-Clause
1697
+ */
1698
+ function* Ni(e, t) {
1699
+ if (e !== void 0) {
1700
+ let s = 0;
1701
+ for (const i of e)
1702
+ yield t(i, s++);
1703
+ }
1704
+ }
1705
+ var Wt = /* @__PURE__ */ ((e) => (e.Inline = "inline", e.Trigger = "trigger", e))(Wt || {}), Hi = Object.defineProperty, Ri = Object.getOwnPropertyDescriptor, Mi = (e, t, s, i) => {
1706
+ for (var n = i > 1 ? void 0 : i ? Ri(t, s) : t, r = e.length - 1, o; r >= 0; r--)
1707
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
1708
+ return i && n && Hi(t, s, n), n;
1709
+ };
1710
+ class Gt extends y {
1711
+ constructor() {
1712
+ super(...arguments), this.nodes = [], this.wrapperRef = Ze();
1713
+ }
1714
+ addChild(t) {
1715
+ t.parent = this, this.nodes.push(t);
1716
+ }
1717
+ applyBranding() {
1718
+ if (this.wrapperRef.value) {
1719
+ const t = this.application.settings;
1720
+ t != null && t.branding && Je(t.branding, this.wrapperRef.value);
1721
+ }
1722
+ }
1723
+ firstUpdated(t) {
1724
+ this.applyBranding();
1725
+ }
1726
+ render() {
1727
+ return this.application.renderStrategy === Wt.Trigger && this.renderRoot.host.classList.add("floating"), $`<div class="widget-container" ${Xe(this.wrapperRef)}>
1728
+ ${Ni(this.nodes, (t) => t)}
1729
+ </div>`;
1730
+ }
1731
+ }
1732
+ Gt.styles = w`
1733
+ :host {
1734
+ --font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
1735
+ --spacing-xs: 0.2rem;
1736
+ --spacing-sm: 0.5rem;
1737
+ --spacing-md: 1rem;
1738
+ --spacing-lg: 1.2rem;
1739
+ --spacing-xl: 1.8rem;
1740
+
1741
+ --text-color: #222222;
1742
+ --link-color: #990ae3;
1743
+ --gray-color: #f3f3f8;
1744
+ --gray-dark-color: #a6a6a6;
1745
+
1746
+ --box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
1747
+ --border-radius: var(--spacing-sm);
1748
+ --border-radius-sm: var(--spacing-sm);
1749
+ }
1750
+ :host {
1751
+ --voca-rem-multiplier: 0.625;
1752
+ box-sizing: border-box;
1753
+ display: block;
1754
+ }
1755
+
1756
+ :host(.floating) {
1757
+ position: fixed;
1758
+ z-index: 6;
1759
+ inset: auto 20px 95px auto;
1760
+ max-height: calc(100vh - 120px);
1761
+ width: 400px;
1762
+ height: 700px;
1763
+ }
1764
+ :host(.floating) .widget-container {
1765
+ box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
1766
+ border-radius: 0.7rem;
1767
+ }
1768
+ :host(.inline) {
1769
+ height: 100%;
1770
+ position: fixed;
1771
+ inset: 0 0 0 0;
1772
+ }
1773
+
1774
+ * {
1775
+ box-sizing: border-box;
1776
+ }
1777
+ .widget-container {
1778
+ height: 100%;
1779
+ background-color: var(--primary-background);
1780
+ padding: 0 var(--spacing-sm);
1781
+ }
1782
+ .widget-container.expanded {
1783
+ opacity: 1;
1784
+ animation: slideUp 0.5s;
1785
+ }
1786
+ .widget-container.hidden {
1787
+ opacity: 0;
1788
+ animation: slideDown 0.5s;
1789
+ }
1790
+ @keyframes slideDown {
1791
+ from {
1792
+ transform: translateY(0);
1793
+ opacity: 1;
1794
+ }
1795
+ to {
1796
+ transform: translateY(100%);
1797
+ opacity: 0;
1798
+ }
1799
+ }
1800
+ @keyframes slideUp {
1801
+ from {
1802
+ transform: translateY(100%);
1803
+ opacity: 0;
1804
+ }
1805
+ to {
1806
+ transform: translateY(0);
1807
+ opacity: 1;
1808
+ }
1809
+ }
1810
+ `;
1811
+ Mi([
1812
+ g({ attribute: !1 })
1813
+ ], Gt.prototype, "application", 2);
1814
+ var ji = Object.defineProperty, Di = Object.getOwnPropertyDescriptor, qt = (e, t, s, i) => {
1815
+ for (var n = i > 1 ? void 0 : i ? Di(t, s) : t, r = e.length - 1, o; r >= 0; r--)
1816
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
1817
+ return i && n && ji(t, s, n), n;
1818
+ };
1819
+ class V extends y {
1820
+ constructor() {
1821
+ super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
1822
+ }
1823
+ async connectedCallback() {
1824
+ super.connectedCallback(), await this.getGlobalEnvironment();
1825
+ }
1826
+ disconnectedCallback() {
1827
+ super.disconnectedCallback(), this.removeEventListener("environment-created", this.onEnvironmentCreated);
1828
+ }
1829
+ async onEnvironmentCreated(t) {
1830
+ this.widget = t.detail.widget, await this.activate(), this.requestUpdate();
1831
+ }
1832
+ async activate() {
1833
+ this.widget && (await this.widget.activate(), this.status = "activated");
1834
+ }
1835
+ async getGlobalEnvironment() {
1836
+ const t = globalThis.widgets;
1837
+ t && (this.widget = t.applications.find(
1838
+ (s) => s.name === this.name
1839
+ ), await this.activate());
1840
+ }
1841
+ render() {
1842
+ if (!this.widget || this.status !== "activated")
1843
+ return u;
1844
+ if (this.widget.renderStrategy === Wt.Trigger) {
1845
+ const t = new U();
1846
+ return t.application = this.widget, t;
1847
+ }
1848
+ return this.widget.render();
1849
+ }
1850
+ }
1851
+ V.styles = [
1852
+ w`
1853
+ :host {
1854
+ display: block;
1855
+ }
1856
+ `
1857
+ ];
1858
+ qt([
1859
+ g({ attribute: !0 })
1860
+ ], V.prototype, "name", 2);
1861
+ qt([
1862
+ A()
1863
+ ], V.prototype, "widget", 2);
1864
+ qt([
1865
+ A()
1866
+ ], V.prototype, "status", 2);
1867
+ customElements.get("ace-trigger") || customElements.define("ace-trigger", U);
1868
+ customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", ts);
1869
+ customElements.get("ace-wrapper") || customElements.define("ace-wrapper", Gt);
1870
+ customElements.get("ace-widget") || customElements.define("ace-widget", V);
1871
+ const Ii = /* @__PURE__ */ new WeakMap();
1872
+ let ge = 0;
1873
+ const Tt = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new WeakSet(), ve = () => new Promise((e) => requestAnimationFrame(e)), Bi = [{ opacity: 0 }], ye = [{ opacity: 0 }, { opacity: 1 }], be = (e, t) => {
1874
+ const s = e - t;
1875
+ return s === 0 ? void 0 : s;
1876
+ }, _e = (e, t) => {
1877
+ const s = e / t;
1878
+ return s === 1 ? void 0 : s;
1879
+ }, Ot = { left: (e, t) => {
1880
+ const s = be(e, t);
1881
+ return { value: s, transform: s == null || isNaN(s) ? void 0 : `translateX(${s}px)` };
1882
+ }, top: (e, t) => {
1883
+ const s = be(e, t);
1884
+ return { value: s, transform: s == null || isNaN(s) ? void 0 : `translateY(${s}px)` };
1885
+ }, width: (e, t) => {
1886
+ let s;
1887
+ t === 0 && (t = 1, s = { width: "1px" });
1888
+ const i = _e(e, t);
1889
+ return { value: i, overrideFrom: s, transform: i == null || isNaN(i) ? void 0 : `scaleX(${i})` };
1890
+ }, height: (e, t) => {
1891
+ let s;
1892
+ t === 0 && (t = 1, s = { height: "1px" });
1893
+ const i = _e(e, t);
1894
+ return { value: i, overrideFrom: s, transform: i == null || isNaN(i) ? void 0 : `scaleY(${i})` };
1895
+ } }, zi = { duration: 333, easing: "ease-in-out" }, Fi = ["left", "top", "width", "height", "opacity", "color", "background"], xe = /* @__PURE__ */ new WeakMap();
1896
+ class Wi extends Qe {
1897
+ constructor(t) {
1898
+ if (super(t), this.t = null, this.i = null, this.o = !0, this.shouldLog = !1, t.type === yt.CHILD)
1899
+ throw Error("The `animate` directive must be used in attribute position.");
1900
+ this.createFinished();
1901
+ }
1902
+ createFinished() {
1903
+ var t;
1904
+ (t = this.resolveFinished) == null || t.call(this), this.finished = new Promise((s) => {
1905
+ this.h = s;
1906
+ });
1907
+ }
1908
+ async resolveFinished() {
1909
+ var t;
1910
+ (t = this.h) == null || t.call(this), this.h = void 0;
1911
+ }
1912
+ render(t) {
1913
+ return u;
1914
+ }
1915
+ getController() {
1916
+ return Ii.get(this.l);
1917
+ }
1918
+ isDisabled() {
1919
+ var t;
1920
+ return this.options.disabled || ((t = this.getController()) == null ? void 0 : t.disabled);
1921
+ }
1922
+ update(t, [s]) {
1923
+ var n;
1924
+ const i = this.l === void 0;
1925
+ return i && (this.l = (n = t.options) == null ? void 0 : n.host, this.l.addController(this), this.element = t.element, xe.set(this.element, this)), this.optionsOrCallback = s, (i || typeof s != "function") && this.u(s), this.render(s);
1926
+ }
1927
+ u(t) {
1928
+ t = t ?? {};
1929
+ const s = this.getController();
1930
+ s !== void 0 && ((t = { ...s.defaultOptions, ...t }).keyframeOptions = { ...s.defaultOptions.keyframeOptions, ...t.keyframeOptions }), t.properties ?? (t.properties = Fi), this.options = t;
1931
+ }
1932
+ p() {
1933
+ const t = {}, s = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
1934
+ return this.options.properties.forEach((n) => {
1935
+ const r = s[n] ?? (Ot[n] ? void 0 : i[n]), o = Number(r);
1936
+ t[n] = isNaN(o) ? r + "" : o;
1937
+ }), t;
1938
+ }
1939
+ m() {
1940
+ let t, s = !0;
1941
+ return this.options.guard && (t = this.options.guard(), s = ((i, n) => {
1942
+ if (Array.isArray(i)) {
1943
+ if (Array.isArray(n) && n.length === i.length && i.every((r, o) => r === n[o]))
1944
+ return !1;
1945
+ } else if (n === i)
1946
+ return !1;
1947
+ return !0;
1948
+ })(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;
1949
+ }
1950
+ hostUpdate() {
1951
+ 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);
1952
+ }
1953
+ async hostUpdated() {
1954
+ if (!this.o || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered)
1955
+ return;
1956
+ let t;
1957
+ this.prepare(), await ve;
1958
+ const s = this._(), i = this.A(this.options.keyframeOptions, s), n = this.p();
1959
+ if (this.g !== void 0) {
1960
+ const { from: r, to: o } = this.O(this.g, n, s);
1961
+ this.log("measured", [this.g, n, r, o]), t = this.calculateKeyframes(r, o);
1962
+ } else {
1963
+ const r = Tt.get(this.options.inId);
1964
+ if (r) {
1965
+ Tt.delete(this.options.inId);
1966
+ const { from: o, to: a } = this.O(r, n, s);
1967
+ t = this.calculateKeyframes(o, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, ge++, t.forEach((l) => l.zIndex = ge);
1968
+ } else
1969
+ this.options.in && (t = [...this.options.in, {}]);
1970
+ }
1971
+ this.animate(t, i);
1972
+ }
1973
+ resetStyles() {
1974
+ this.j !== void 0 && (this.element.setAttribute("style", this.j ?? ""), this.j = void 0);
1975
+ }
1976
+ commitStyles() {
1977
+ var t, s;
1978
+ this.j = this.element.getAttribute("style"), (t = this.webAnimation) == null || t.commitStyles(), (s = this.webAnimation) == null || s.cancel();
1979
+ }
1980
+ reconnected() {
1981
+ }
1982
+ async disconnected() {
1983
+ var s;
1984
+ if (!this.o || (this.options.id !== void 0 && Tt.set(this.options.id, this.g), this.options.out === void 0))
1985
+ return;
1986
+ if (this.prepare(), await ve(), (s = this.t) == null ? void 0 : s.isConnected) {
1987
+ const i = this.i && this.i.parentNode === this.t ? this.i : null;
1988
+ if (this.t.insertBefore(this.element, i), this.options.stabilizeOut) {
1989
+ const n = this.p();
1990
+ this.log("stabilizing out");
1991
+ const r = this.g.left - n.left, o = this.g.top - n.top;
1992
+ 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");
1993
+ }
1994
+ }
1995
+ const t = this.A(this.options.keyframeOptions);
1996
+ await this.animate(this.options.out, t), this.element.remove();
1997
+ }
1998
+ prepare() {
1999
+ this.createFinished();
2000
+ }
2001
+ start() {
2002
+ var t, s;
2003
+ (s = (t = this.options).onStart) == null || s.call(t, this);
2004
+ }
2005
+ didFinish(t) {
2006
+ var s, i;
2007
+ 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();
2008
+ }
2009
+ _() {
2010
+ const t = [];
2011
+ for (let s = this.element.parentNode; s; s = s == null ? void 0 : s.parentNode) {
2012
+ const i = xe.get(s);
2013
+ i && !i.isDisabled() && i && t.push(i);
2014
+ }
2015
+ return t;
2016
+ }
2017
+ get isHostRendered() {
2018
+ const t = me.has(this.l);
2019
+ return t || this.l.updateComplete.then(() => {
2020
+ me.add(this.l);
2021
+ }), t;
2022
+ }
2023
+ A(t, s = this._()) {
2024
+ const i = { ...zi };
2025
+ return s.forEach((n) => Object.assign(i, n.options.keyframeOptions)), Object.assign(i, t), i;
2026
+ }
2027
+ O(t, s, i) {
2028
+ t = { ...t }, s = { ...s };
2029
+ const n = i.map((a) => a.animatingProperties).filter((a) => a !== void 0);
2030
+ let r = 1, o = 1;
2031
+ return n !== void 0 && (n.forEach((a) => {
2032
+ a.width && (r /= a.width), a.height && (o /= a.height);
2033
+ }), 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 };
2034
+ }
2035
+ calculateKeyframes(t, s, i = !1) {
2036
+ const n = {}, r = {};
2037
+ let o = !1;
2038
+ const a = {};
2039
+ for (const l in s) {
2040
+ const c = t[l], h = s[l];
2041
+ if (l in Ot) {
2042
+ const d = Ot[l];
2043
+ if (c === void 0 || h === void 0)
2044
+ continue;
2045
+ const p = d(c, h);
2046
+ 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));
2047
+ } else
2048
+ c !== h && c !== void 0 && h !== void 0 && (o = !0, n[l] = c, r[l] = h);
2049
+ }
2050
+ return n.transformOrigin = r.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, o ? [n, r] : void 0;
2051
+ }
2052
+ async animate(t, s = this.options.keyframeOptions) {
2053
+ this.start(), this.frames = t;
2054
+ let i = !1;
2055
+ if (!this.isAnimating() && !this.isDisabled() && (this.options.onFrames && (this.frames = t = this.options.onFrames(this), this.log("modified frames", t)), t !== void 0)) {
2056
+ this.log("animate", [t, s]), i = !0, this.webAnimation = this.element.animate(t, s);
2057
+ const n = this.getController();
2058
+ n == null || n.add(this);
2059
+ try {
2060
+ await this.webAnimation.finished;
2061
+ } catch {
2062
+ }
2063
+ n == null || n.remove(this);
2064
+ }
2065
+ return this.didFinish(i), i;
2066
+ }
2067
+ isAnimating() {
2068
+ var t, s;
2069
+ return ((t = this.webAnimation) == null ? void 0 : t.playState) === "running" || ((s = this.webAnimation) == null ? void 0 : s.pending);
2070
+ }
2071
+ log(t, s) {
2072
+ this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, s);
2073
+ }
2074
+ }
2075
+ const we = bt(Wi);
2076
+ var Gi = Object.defineProperty, qi = Object.getOwnPropertyDescriptor, xt = (e, t, s, i) => {
2077
+ for (var n = i > 1 ? void 0 : i ? qi(t, s) : t, r = e.length - 1, o; r >= 0; r--)
2078
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
2079
+ return i && n && Gi(t, s, n), n;
2080
+ };
2081
+ let B = class extends y {
2082
+ constructor() {
2083
+ super(...arguments), this.loading = !1, this.entries = [];
2084
+ }
2085
+ connectedCallback() {
2086
+ super.connectedCallback(), this.session.entries().subscribe((e) => {
2087
+ this.entries = e;
2088
+ });
2089
+ }
2090
+ render() {
2091
+ return $`<div class="conversation-session">
2092
+ ${this.entries.map(
2093
+ (e) => $`<div class="conversation-entry" tabindex="-1">
2094
+ <conversation-entry
2095
+ .entry=${e}
2096
+ ${we({
2097
+ keyframeOptions: {},
2098
+ in: ye,
2099
+ stabilizeOut: !0,
2100
+ skipInitial: !1
2101
+ })}
2102
+ >
2103
+ </conversation-entry>
2104
+ </div>`
2105
+ )}
2106
+ ${this.loading ? $`<div
2107
+ class="loader"
2108
+ ${we({
2109
+ in: ye,
2110
+ out: Bi,
2111
+ skipInitial: !1
2112
+ })}
2113
+ >
2114
+ <div></div>
2115
+ <div></div>
2116
+ <div></div>
2117
+ </div>` : u}
2118
+ </div>`;
2119
+ }
2120
+ };
2121
+ B.styles = [
2122
+ w`
2123
+ :host {
2124
+ display: block;
2125
+ }
2126
+ .conversation-session {
2127
+ display: flex;
2128
+ flex-direction: column;
2129
+ justify-content: end;
2130
+ min-height: 100%;
2131
+ }
2132
+ `
2133
+ ];
2134
+ xt([
2135
+ g({ type: Boolean })
2136
+ ], B.prototype, "loading", 2);
2137
+ xt([
2138
+ g({ attribute: !1 })
2139
+ ], B.prototype, "session", 2);
2140
+ xt([
2141
+ A()
2142
+ ], B.prototype, "entries", 2);
2143
+ B = xt([
2144
+ vt("ace-conversation-session")
2145
+ ], B);
2146
+ var Yi = Object.defineProperty, Ki = Object.getOwnPropertyDescriptor, es = (e, t, s, i) => {
2147
+ for (var n = i > 1 ? void 0 : i ? Ki(t, s) : t, r = e.length - 1, o; r >= 0; r--)
2148
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
2149
+ return i && n && Yi(t, s, n), n;
2150
+ };
2151
+ let ht = class extends y {
2152
+ connectedCallback() {
2153
+ var e;
2154
+ super.connectedCallback(), (e = this.entry.didUpdate) == null || e.subscribe(() => {
2155
+ this.requestUpdate();
2156
+ });
2157
+ }
2158
+ _renderTimestamp(e, t) {
2159
+ if (!e && !t)
2160
+ return u;
2161
+ const s = (n) => new Date(n).toLocaleTimeString([], {
2162
+ hour: "2-digit",
2163
+ minute: "2-digit"
2164
+ });
2165
+ let i = "";
2166
+ return e ? t ? i = `${e}: ${s(t)}` : i = e : t && (i = s(t)), $`<p class="conversation-timestamp">${i}</p>`;
2167
+ }
2168
+ render() {
2169
+ var e, t;
2170
+ switch (this.entry.type) {
2171
+ case wt.System:
2172
+ return "";
2173
+ case wt.Agent:
2174
+ return $`<div
2175
+ class=${Ft({
2176
+ "conversation-agent-message": !0,
2177
+ "has-avatar": !!((e = this.entry.sender) != null && e.avatar)
2178
+ })}
2179
+ >
2180
+ ${typeof ((t = this.entry.sender) == null ? void 0 : t.avatar) == "string" ? $`<div class="avatar">
2181
+ <img src=${this.entry.sender.avatar} />
2182
+ </div>` : u}
2183
+
2184
+ <div class="entry-content">
2185
+ ${this.entry.messages.map(
2186
+ (s) => $`
2187
+ <div class="message-container">
2188
+ <div class="message-content">
2189
+ <conversation-group .group=${s}></conversation-group>
2190
+ </div>
2191
+ </div>
2192
+ `
2193
+ )}
2194
+ </div>
2195
+ ${this._renderTimestamp(
2196
+ this.entry.sender.name || "",
2197
+ this.entry.timestamp
2198
+ )}
2199
+ </div>`;
2200
+ case wt.User:
2201
+ return $`<div class="conversation-user-message">
2202
+ <div class="entry-content">
2203
+ ${this.entry.messages.map(
2204
+ (s) => $`
2205
+ <div class="message-container">
2206
+ <div class="message-content">
2207
+ <conversation-group .group=${s}></conversation-group>
2208
+ </div>
2209
+ </div>
2210
+ `
2211
+ )}
2212
+ </div>
2213
+ ${this._renderTimestamp(
2214
+ this.entry.sender.name || "",
2215
+ this.entry.timestamp
2216
+ )}
2217
+ </div>`;
2218
+ default:
2219
+ return u;
2220
+ }
2221
+ }
2222
+ };
2223
+ ht.styles = [
2224
+ w`
2225
+ :host {
2226
+ box-sizing: border-box;
2227
+ display: block;
2228
+ }
2229
+ * {
2230
+ box-sizing: border-box;
2231
+ }
2232
+ .message-content {
2233
+ padding: var(--spacing-md);
2234
+ display: inline-block;
2235
+ margin-top: var(--spacing-md);
2236
+ max-width: 100%;
2237
+ border: 1px solid var(--gray-color);
2238
+ border-radius: var(--border-radius);
2239
+ background-color: var(--bubble-bg-color);
2240
+ color: var(--bubble-text-color);
2241
+ }
2242
+
2243
+ .conversation-user-message {
2244
+ --bubble-bg-color: var(--conversation-user-bg-color);
2245
+ --bubble-text-color: var(--conversation-user-text-color);
2246
+ margin-left: 10%;
2247
+ width: 90%;
2248
+ display: flex;
2249
+ flex-direction: column;
2250
+ align-items: flex-end;
2251
+ }
2252
+
2253
+ .conversation-agent-message {
2254
+ --bubble-bg-color: var(--conversation-agent-bg-color);
2255
+ --bubble-text-color: var(--conversation-agent-text-color);
2256
+ display: grid;
2257
+ margin-right: 10%;
2258
+ width: 90%;
2259
+
2260
+ grid-template-columns: 1fr;
2261
+ grid-template-rows: 1fr auto;
2262
+ grid-template-areas:
2263
+ 'content'
2264
+ 'info';
2265
+ }
2266
+ .conversation-agent-message.has-avatar {
2267
+ grid-template-columns: auto 1fr;
2268
+ grid-template-rows: 1fr auto;
2269
+ grid-template-areas:
2270
+ 'avatar content'
2271
+ '. info';
2272
+ }
2273
+
2274
+ .avatar {
2275
+ grid-area: avatar;
2276
+ place-self: flex-end;
2277
+ width: 32px;
2278
+ height: 32px;
2279
+ border-radius: 50%;
2280
+ align-self: flex-end;
2281
+ justify-self: center;
2282
+ overflow: hidden;
2283
+ margin-right: var(--spacing-md);
2284
+ justify-content: center;
2285
+ align-items: center;
2286
+ }
2287
+ .avatar img {
2288
+ height: 100%;
2289
+ width: 100%;
2290
+ object-fit: cover;
2291
+ }
2292
+
2293
+ .conversation-timestamp {
2294
+ grid-area: info;
2295
+ margin: 0;
2296
+ line-height: 1.5em;
2297
+ grid-area: info;
2298
+ color: var(--text-color);
2299
+ font-size: 0.8rem;
2300
+ font-weight: 300;
2301
+ }
2302
+
2303
+ .entry-content {
2304
+ grid-area: content;
2305
+ }
2306
+ `
2307
+ ];
2308
+ es([
2309
+ g({ attribute: !1 })
2310
+ ], ht.prototype, "entry", 2);
2311
+ ht = es([
2312
+ vt("conversation-entry")
2313
+ ], ht);
2314
+ var Qi = Object.defineProperty, Zi = Object.getOwnPropertyDescriptor, ss = (e, t, s, i) => {
2315
+ for (var n = i > 1 ? void 0 : i ? Zi(t, s) : t, r = e.length - 1, o; r >= 0; r--)
2316
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
2317
+ return i && n && Qi(t, s, n), n;
2318
+ };
2319
+ let pt = class extends y {
2320
+ render() {
2321
+ return $`
2322
+ <div class="message-group">
2323
+ ${this.group.items.map(
2324
+ ([e, t]) => $`
2325
+ ${e === "html" ? $`
2326
+ <message-type-html .message=${t}></message-type-html>
2327
+ ` : u}
2328
+ `
2329
+ )}
2330
+ </div>
2331
+ `;
2332
+ }
2333
+ };
2334
+ pt.styles = [
2335
+ w`
2336
+ :host {
2337
+ box-sizing: border-box;
2338
+ display: block;
2339
+ }
2340
+ * {
2341
+ box-sizing: border-box;
2342
+ }
2343
+ .message-group {
2344
+ display: flex;
2345
+ flex-direction: column;
2346
+ gap: var(--spacing-md);
2347
+ }
2348
+ `
2349
+ ];
2350
+ ss([
2351
+ g({ attribute: !1 })
2352
+ ], pt.prototype, "group", 2);
2353
+ pt = ss([
2354
+ vt("conversation-group")
2355
+ ], pt);
2356
+ /**
2357
+ * @license
2358
+ * Copyright 2017 Google LLC
2359
+ * SPDX-License-Identifier: BSD-3-Clause
2360
+ */
2361
+ class Nt extends zt {
2362
+ constructor(t) {
2363
+ if (super(t), this.et = u, t.type !== yt.CHILD)
2364
+ throw Error(this.constructor.directiveName + "() can only be used in child bindings");
2365
+ }
2366
+ render(t) {
2367
+ if (t === u || t == null)
2368
+ return this.vt = void 0, this.et = t;
2369
+ if (t === C)
2370
+ return t;
2371
+ if (typeof t != "string")
2372
+ throw Error(this.constructor.directiveName + "() called with a non-string value");
2373
+ if (t === this.et)
2374
+ return this.vt;
2375
+ this.et = t;
2376
+ const s = [t];
2377
+ return s.raw = s, this.vt = { _$litType$: this.constructor.resultType, strings: s, values: [] };
2378
+ }
2379
+ }
2380
+ Nt.directiveName = "unsafeHTML", Nt.resultType = 1;
2381
+ const Xi = bt(Nt);
2382
+ var Ji = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, is = (e, t, s, i) => {
2383
+ for (var n = i > 1 ? void 0 : i ? Vi(t, s) : t, r = e.length - 1, o; r >= 0; r--)
2384
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
2385
+ return i && n && Ji(t, s, n), n;
2386
+ };
2387
+ let ut = class extends y {
2388
+ render() {
2389
+ return $`<div class="message-type-html">
2390
+ ${Xi(this.message.content)}
2391
+ </div>`;
2392
+ }
2393
+ };
2394
+ ut.styles = [
2395
+ w`
2396
+ :host {
2397
+ box-sizing: border-box;
2398
+ }
2399
+ * {
2400
+ box-sizing: border-box;
2401
+ }
2402
+ p {
2403
+ margin: 0;
2404
+ padding: 0;
2405
+ word-break: break-word;
2406
+ }
2407
+ `
2408
+ ];
2409
+ is([
2410
+ g({ attribute: !1 })
2411
+ ], ut.prototype, "message", 2);
2412
+ ut = is([
2413
+ vt("message-type-html")
2414
+ ], ut);
2415
+ var tn = Object.defineProperty, en = Object.getOwnPropertyDescriptor, Yt = (e, t, s, i) => {
2416
+ for (var n = i > 1 ? void 0 : i ? en(t, s) : t, r = e.length - 1, o; r >= 0; r--)
2417
+ (o = e[r]) && (n = (i ? o(t, s, n) : o(n)) || n);
2418
+ return i && n && tn(t, s, n), n;
2419
+ };
2420
+ const sn = (e) => {
2421
+ e.scrollTo ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight;
2422
+ }, ns = Ve(y);
2423
+ class z extends ns {
2424
+ constructor() {
2425
+ super(...arguments), this.message = "", this.platform = null, this.session = null, this.conversationContentRef = Ze(), this.chatScrollHeight = 0;
2426
+ }
2427
+ async connectedCallback() {
2428
+ super.connectedCallback();
2429
+ const t = await this.application.container.get(
2430
+ "conversation"
2431
+ );
2432
+ this.platform = t || null, this.platform && (this.platform.activeSessionId ? this.session = this.platform.sessions.get(this.platform.activeSessionId) || null : this.session = this.platform.createSession(this) || null);
2433
+ }
2434
+ async _onSendMessage(t) {
2435
+ t.preventDefault();
2436
+ const s = new CustomEvent("user-submit", {
2437
+ detail: { text: this.message }
2438
+ });
2439
+ this.dispatchEvent(s), this.message = "";
2440
+ }
2441
+ _inputHandler(t) {
2442
+ this.message = t.target.value;
2443
+ }
2444
+ _actionHandler(t) {
2445
+ }
2446
+ updated(t) {
2447
+ const s = this.conversationContentRef.value;
2448
+ s && setTimeout(() => {
2449
+ const i = s.scrollHeight;
2450
+ i > this.chatScrollHeight && (sn(s), this.chatScrollHeight = i);
2451
+ }, 1e3);
2452
+ }
2453
+ render() {
2454
+ return $` <div
2455
+ @action=${this._actionHandler}
2456
+ class=${Ft({
2457
+ conversation: !0,
2458
+ "input-has-text": this.message.length > 0
2459
+ })}
2460
+ >
2461
+ <div class="conversation-content" ${Xe(this.conversationContentRef)}>
2462
+ ${this.session ? $`<ace-conversation-session
2463
+ .session=${this.session}
2464
+ ></ace-conversation-session>` : u}
2465
+ </div>
2466
+ <form class="conversation-bottom" @submit=${this._onSendMessage}>
2467
+ <input
2468
+ placeholder=${this.properties.inputPlaceholder || "Type your message here..."}
2469
+ .value=${this.message}
2470
+ @input=${this._inputHandler}
2471
+ />
2472
+ <div class="conversation-actions">
2473
+ <button class="conversation-send-button" type="submit">
2474
+ <telia-icon svg=${As.svg}></telia-icon>
2475
+ </button>
2476
+ </div>
2477
+ </form>
2478
+ </div>`;
2479
+ }
2480
+ }
2481
+ z.styles = [
2482
+ ns.styles || [],
2483
+ w`
2484
+ :host {
2485
+ font-family: var(--font-family);
2486
+ /* --send-icon-color: var(--gray-dark-color, #a6a6a6); */
2487
+ --send-icon-opacity: 0.4;
2488
+ --send-icon-color: var(--text-color);
2489
+ --conversation-bg: #fafafa;
2490
+ --conversation-agent-bg-color: var(--secondary-background);
2491
+ --conversation-agent-text-color: var(--text-on-secondary-background);
2492
+ --conversation-user-bg-color: var(--primary-background);
2493
+ --conversation-user-text-color: var(--text-on-primary-background);
2494
+
2495
+ scrollbar-width: thin; /* Firefox */
2496
+ scrollbar-color: #7f7f7f transparent; /* Firefox */
2497
+ }
2498
+ ::-webkit-scrollbar {
2499
+ width: 3px !important;
2500
+ background-color: transparent;
2501
+ border-left: none;
2502
+ }
2503
+ ::-webkit-scrollbar-thumb {
2504
+ background-color: #7f7f7f;
2505
+ }
2506
+ ::-webkit-scrollbar-track {
2507
+ -webkit-box-shadow: none !important;
2508
+ background-color: transparent;
2509
+ }
2510
+
2511
+ .conversation {
2512
+ display: grid;
2513
+ grid-template-rows: 1fr auto;
2514
+ gap: var(--spacing-lg);
2515
+ height: 100%;
2516
+ background-color: transparent;
2517
+ }
2518
+ .conversation.input-has-text {
2519
+ /* --send-icon-color: var(--primary-color); */
2520
+ --send-icon-opacity: 1;
2521
+ }
2522
+ .conversation-content {
2523
+ flex: 1;
2524
+ background-color: var(--conversation-bg);
2525
+ padding: var(--spacing-md);
2526
+ overflow-y: auto;
2527
+ overflow-x: hidden;
2528
+ border-radius: var(--border-radius-sm);
2529
+ }
2530
+ .conversation-bottom {
2531
+ border-top: 1px solid var(--gray-color);
2532
+ border-radius: var(--border-radius-sm);
2533
+ background-color: #fff;
2534
+ min-height: 50px;
2535
+ max-height: 150px;
2536
+ display: flex;
2537
+ align-items: center;
2538
+ padding: 0 var(--spacing-md);
2539
+ margin: 0;
2540
+ }
2541
+ .conversation-bottom-left {
2542
+ border-right: 1px solid var(--gray-color);
2543
+ padding-right: var(--spacing-md);
2544
+ }
2545
+ .conversation-send-button {
2546
+ border: none;
2547
+ background: transparent;
2548
+ cursor: pointer;
2549
+ color: var(--send-icon-color);
2550
+ opacity: var(--send-icon-opacity);
2551
+ transition: opacity 200ms ease-in-out;
2552
+ }
2553
+ .conversation-send-button:hover {
2554
+ --send-icon-opacity: 1;
2555
+ }
2556
+ input {
2557
+ border: none;
2558
+ font-family: inherit;
2559
+ font-size: inherit;
2560
+ flex: 1;
2561
+ height: 2.5rem;
2562
+ outline: none;
2563
+ }
2564
+
2565
+ @keyframes loaderanim {
2566
+ 0% {
2567
+ opacity: 0;
2568
+ }
2569
+ 75% {
2570
+ opacity: 1;
2571
+ }
2572
+ 100% {
2573
+ opacity: 0;
2574
+ }
2575
+ }
2576
+
2577
+ .loader {
2578
+ display: flex;
2579
+ justify-content: center;
2580
+ }
2581
+
2582
+ .loader > div {
2583
+ height: 10px;
2584
+ width: 10px;
2585
+ border-radius: 50%;
2586
+ margin: 5px;
2587
+ background-color: var(--text-color);
2588
+ animation-name: loaderanim;
2589
+ animation-duration: 1s;
2590
+ animation-iteration-count: infinite;
2591
+ }
2592
+
2593
+ .loader > div:nth-of-type(2) {
2594
+ animation-delay: 100ms;
2595
+ }
2596
+
2597
+ .loader > div:nth-of-type(3) {
2598
+ animation-delay: 200ms;
2599
+ }
2600
+ `
2601
+ ];
2602
+ Yt([
2603
+ A()
2604
+ ], z.prototype, "message", 2);
2605
+ Yt([
2606
+ A()
2607
+ ], z.prototype, "platform", 2);
2608
+ Yt([
2609
+ A()
2610
+ ], z.prototype, "session", 2);
2611
+ const hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2612
+ __proto__: null,
2613
+ Conversation: z,
2614
+ default: z
2615
+ }, Symbol.toStringTag, { value: "Module" }));
2616
+ export {
2617
+ hn as c,
2618
+ As as s
2619
+ };