@telia-ace/widget-components-widget-header-flamingo 1.1.120-rc.6 → 1.1.120-rc.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,22 +21,22 @@ function ss(i, t, e, s) {
21
21
  });
22
22
  }
23
23
  return new (e || (e = Promise))(function(r, o) {
24
- function a(h) {
24
+ function a(u) {
25
25
  try {
26
- c(s.next(h));
27
- } catch (u) {
28
- o(u);
26
+ c(s.next(u));
27
+ } catch (h) {
28
+ o(h);
29
29
  }
30
30
  }
31
- function l(h) {
31
+ function l(u) {
32
32
  try {
33
- c(s.throw(h));
34
- } catch (u) {
35
- o(u);
33
+ c(s.throw(u));
34
+ } catch (h) {
35
+ o(h);
36
36
  }
37
37
  }
38
- function c(h) {
39
- h.done ? r(h.value) : n(h.value).then(a, l);
38
+ function c(u) {
39
+ u.done ? r(u.value) : n(u.value).then(a, l);
40
40
  }
41
41
  c((s = s.apply(i, t || [])).next());
42
42
  });
@@ -50,8 +50,8 @@ function ri(i, t) {
50
50
  return this;
51
51
  }), o;
52
52
  function a(c) {
53
- return function(h) {
54
- return l([c, h]);
53
+ return function(u) {
54
+ return l([c, u]);
55
55
  };
56
56
  }
57
57
  function l(c) {
@@ -92,8 +92,8 @@ function ri(i, t) {
92
92
  continue;
93
93
  }
94
94
  c = t.call(i, e);
95
- } catch (h) {
96
- c = [6, h], n = 0;
95
+ } catch (u) {
96
+ c = [6, u], n = 0;
97
97
  } finally {
98
98
  s = r = 0;
99
99
  }
@@ -144,7 +144,7 @@ function ns(i, t, e) {
144
144
  }, n;
145
145
  function o(f) {
146
146
  return function(v) {
147
- return Promise.resolve(v).then(f, u);
147
+ return Promise.resolve(v).then(f, h);
148
148
  };
149
149
  }
150
150
  function a(f, v) {
@@ -162,12 +162,12 @@ function ns(i, t, e) {
162
162
  }
163
163
  }
164
164
  function c(f) {
165
- f.value instanceof q ? Promise.resolve(f.value.v).then(h, u) : d(r[0][2], f);
165
+ f.value instanceof q ? Promise.resolve(f.value.v).then(u, h) : d(r[0][2], f);
166
166
  }
167
- function h(f) {
167
+ function u(f) {
168
168
  l("next", f);
169
169
  }
170
- function u(f) {
170
+ function h(f) {
171
171
  l("throw", f);
172
172
  }
173
173
  function d(f, v) {
@@ -244,18 +244,18 @@ var Tt = function() {
244
244
  }
245
245
  else
246
246
  o.remove(this);
247
- var h = this.initialTeardown;
248
- if ($(h))
247
+ var u = this.initialTeardown;
248
+ if ($(u))
249
249
  try {
250
- h();
250
+ u();
251
251
  } catch (g) {
252
252
  r = g instanceof Nt ? g.errors : [g];
253
253
  }
254
- var u = this._finalizers;
255
- if (u) {
254
+ var h = this._finalizers;
255
+ if (h) {
256
256
  this._finalizers = null;
257
257
  try {
258
- for (var d = Z(u), f = d.next(); !f.done; f = d.next()) {
258
+ for (var d = Z(h), f = d.next(); !f.done; f = d.next()) {
259
259
  var v = f.value;
260
260
  try {
261
261
  _e(v);
@@ -339,7 +339,7 @@ var ie = function(i) {
339
339
  Q(t, i);
340
340
  function t(e) {
341
341
  var s = i.call(this) || this;
342
- return s.isStopped = !1, e ? (s.destination = e, li(e) && e.add(s)) : s.destination = hs, s;
342
+ return s.isStopped = !1, e ? (s.destination = e, li(e) && e.add(s)) : s.destination = us, s;
343
343
  }
344
344
  return t.create = function(e, s, n) {
345
345
  return new Xt(e, s, n);
@@ -415,7 +415,7 @@ function pt(i) {
415
415
  function cs(i) {
416
416
  throw i;
417
417
  }
418
- var hs = {
418
+ var us = {
419
419
  closed: !0,
420
420
  next: we,
421
421
  error: cs,
@@ -423,11 +423,11 @@ var hs = {
423
423
  }, se = function() {
424
424
  return typeof Symbol == "function" && Symbol.observable || "@@observable";
425
425
  }();
426
- function hi(i) {
426
+ function ui(i) {
427
427
  return i;
428
428
  }
429
- function us(i) {
430
- return i.length === 0 ? hi : i.length === 1 ? i[0] : function(e) {
429
+ function hs(i) {
430
+ return i.length === 0 ? ui : i.length === 1 ? i[0] : function(e) {
431
431
  return i.reduce(function(s, n) {
432
432
  return n(s);
433
433
  }, e);
@@ -476,7 +476,7 @@ var w = function() {
476
476
  }, i.prototype.pipe = function() {
477
477
  for (var t = [], e = 0; e < arguments.length; e++)
478
478
  t[e] = arguments[e];
479
- return us(t)(this);
479
+ return hs(t)(this);
480
480
  }, i.prototype.toPromise = function(t) {
481
481
  var e = this;
482
482
  return t = xe(t), new t(function(s, n) {
@@ -529,14 +529,14 @@ var gs = function(i) {
529
529
  return l.onFinalize = o, l.shouldUnsubscribe = a, l._next = s ? function(c) {
530
530
  try {
531
531
  s(c);
532
- } catch (h) {
533
- e.error(h);
532
+ } catch (u) {
533
+ e.error(u);
534
534
  }
535
535
  } : i.prototype._next, l._error = r ? function(c) {
536
536
  try {
537
537
  r(c);
538
- } catch (h) {
539
- e.error(h);
538
+ } catch (u) {
539
+ e.error(u);
540
540
  } finally {
541
541
  this.unsubscribe();
542
542
  }
@@ -659,7 +659,7 @@ var gs = function(i) {
659
659
  var s, n;
660
660
  return (n = (s = this.source) === null || s === void 0 ? void 0 : s.subscribe(e)) !== null && n !== void 0 ? n : ai;
661
661
  }, t;
662
- }(It), ui = function(i) {
662
+ }(It), hi = function(i) {
663
663
  Q(t, i);
664
664
  function t(e) {
665
665
  var s = i.call(this) || this;
@@ -976,14 +976,14 @@ function Us(i, t) {
976
976
  });
977
977
  }
978
978
  function Ms(i, t, e, s, n, r, o, a) {
979
- var l = [], c = 0, h = 0, u = !1, d = function() {
980
- u && !l.length && !c && t.complete();
979
+ var l = [], c = 0, u = 0, h = !1, d = function() {
980
+ h && !l.length && !c && t.complete();
981
981
  }, f = function(g) {
982
982
  return c < s ? v(g) : l.push(g);
983
983
  }, v = function(g) {
984
984
  c++;
985
985
  var ft = !1;
986
- J(e(g, h++)).subscribe(mt(t, function(tt) {
986
+ J(e(g, u++)).subscribe(mt(t, function(tt) {
987
987
  t.next(tt);
988
988
  }, function() {
989
989
  ft = !0;
@@ -1003,7 +1003,7 @@ function Ms(i, t, e, s, n, r, o, a) {
1003
1003
  }));
1004
1004
  };
1005
1005
  return i.subscribe(mt(t, f, function() {
1006
- u = !0, d();
1006
+ h = !0, d();
1007
1007
  })), function() {
1008
1008
  };
1009
1009
  }
@@ -1017,7 +1017,7 @@ function ki(i, t, e) {
1017
1017
  }));
1018
1018
  }
1019
1019
  function js(i) {
1020
- return i === void 0 && (i = 1 / 0), ki(hi, i);
1020
+ return i === void 0 && (i = 1 / 0), ki(ui, i);
1021
1021
  }
1022
1022
  function Ns() {
1023
1023
  for (var i = [], t = 0; t < arguments.length; t++)
@@ -1321,10 +1321,10 @@ const Qs = (i, t) => {
1321
1321
  let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = et;
1322
1322
  for (let a = 0; a < e; a++) {
1323
1323
  const l = i[a];
1324
- let c, h, u = -1, d = 0;
1325
- for (; d < l.length && (o.lastIndex = d, h = o.exec(l), h !== null); ) d = o.lastIndex, o === et ? h[1] === "!--" ? o = Te : h[1] !== void 0 ? o = Pe : h[2] !== void 0 ? (Ti.test(h[2]) && (n = RegExp("</" + h[2], "g")), o = I) : h[3] !== void 0 && (o = I) : o === I ? h[0] === ">" ? (o = n ?? et, u = -1) : h[1] === void 0 ? u = -2 : (u = o.lastIndex - h[2].length, c = h[1], o = h[3] === void 0 ? I : h[3] === '"' ? Le : Ie) : o === Le || o === Ie ? o = I : o === Te || o === Pe ? o = et : (o = I, n = void 0);
1324
+ let c, u, h = -1, d = 0;
1325
+ for (; d < l.length && (o.lastIndex = d, u = o.exec(l), u !== null); ) d = o.lastIndex, o === et ? u[1] === "!--" ? o = Te : u[1] !== void 0 ? o = Pe : u[2] !== void 0 ? (Ti.test(u[2]) && (n = RegExp("</" + u[2], "g")), o = I) : u[3] !== void 0 && (o = I) : o === I ? u[0] === ">" ? (o = n ?? et, h = -1) : u[1] === void 0 ? h = -2 : (h = o.lastIndex - u[2].length, c = u[1], o = u[3] === void 0 ? I : u[3] === '"' ? Le : Ie) : o === Le || o === Ie ? o = I : o === Te || o === Pe ? o = et : (o = I, n = void 0);
1326
1326
  const f = o === I && i[a + 1].startsWith("/>") ? " " : "";
1327
- r += o === et ? l + Zs : u >= 0 ? (s.push(c), l.slice(0, u) + Ei + l.slice(u) + O + f) : l + O + (u === -2 ? a : f);
1327
+ r += o === et ? l + Zs : h >= 0 ? (s.push(c), l.slice(0, h) + Ei + l.slice(h) + O + f) : l + O + (h === -2 ? a : f);
1328
1328
  }
1329
1329
  return [Pi(i, r + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
1330
1330
  };
@@ -1333,29 +1333,29 @@ let Qt = class Ii {
1333
1333
  let n;
1334
1334
  this.parts = [];
1335
1335
  let r = 0, o = 0;
1336
- const a = t.length - 1, l = this.parts, [c, h] = Qs(t, e);
1336
+ const a = t.length - 1, l = this.parts, [c, u] = Qs(t, e);
1337
1337
  if (this.el = Ii.createElement(c, s), R.currentNode = this.el.content, e === 2 || e === 3) {
1338
- const u = this.el.content.firstChild;
1339
- u.replaceWith(...u.childNodes);
1338
+ const h = this.el.content.firstChild;
1339
+ h.replaceWith(...h.childNodes);
1340
1340
  }
1341
1341
  for (; (n = R.nextNode()) !== null && l.length < a; ) {
1342
1342
  if (n.nodeType === 1) {
1343
- if (n.hasAttributes()) for (const u of n.getAttributeNames()) if (u.endsWith(Ei)) {
1344
- const d = h[o++], f = n.getAttribute(u).split(O), v = /([.?@])?(.*)/.exec(d);
1345
- l.push({ type: 1, index: r, name: v[2], strings: f, ctor: v[1] === "." ? Vs : v[1] === "?" ? tn : v[1] === "@" ? en : Lt }), n.removeAttribute(u);
1346
- } else u.startsWith(O) && (l.push({ type: 6, index: r }), n.removeAttribute(u));
1343
+ if (n.hasAttributes()) for (const h of n.getAttributeNames()) if (h.endsWith(Ei)) {
1344
+ const d = u[o++], f = n.getAttribute(h).split(O), v = /([.?@])?(.*)/.exec(d);
1345
+ l.push({ type: 1, index: r, name: v[2], strings: f, ctor: v[1] === "." ? Vs : v[1] === "?" ? tn : v[1] === "@" ? en : Lt }), n.removeAttribute(h);
1346
+ } else h.startsWith(O) && (l.push({ type: 6, index: r }), n.removeAttribute(h));
1347
1347
  if (Ti.test(n.tagName)) {
1348
- const u = n.textContent.split(O), d = u.length - 1;
1348
+ const h = n.textContent.split(O), d = h.length - 1;
1349
1349
  if (d > 0) {
1350
1350
  n.textContent = bt ? bt.emptyScript : "";
1351
- for (let f = 0; f < d; f++) n.append(u[f], rt()), R.nextNode(), l.push({ type: 2, index: ++r });
1352
- n.append(u[d], rt());
1351
+ for (let f = 0; f < d; f++) n.append(h[f], rt()), R.nextNode(), l.push({ type: 2, index: ++r });
1352
+ n.append(h[d], rt());
1353
1353
  }
1354
1354
  }
1355
1355
  } else if (n.nodeType === 8) if (n.data === Oi) l.push({ type: 2, index: r });
1356
1356
  else {
1357
- let u = -1;
1358
- for (; (u = n.data.indexOf(O, u + 1)) !== -1; ) l.push({ type: 7, index: r }), u += O.length - 1;
1357
+ let h = -1;
1358
+ for (; (h = n.data.indexOf(O, h + 1)) !== -1; ) l.push({ type: 7, index: r }), h += O.length - 1;
1359
1359
  }
1360
1360
  r++;
1361
1361
  }
@@ -1389,7 +1389,7 @@ class Js {
1389
1389
  for (; l !== void 0; ) {
1390
1390
  if (o === l.index) {
1391
1391
  let c;
1392
- l.type === 2 ? c = new ht(r, r.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(r, l.name, l.strings, this, t) : l.type === 6 && (c = new sn(r, this, t)), this._$AV.push(c), l = s[++a];
1392
+ l.type === 2 ? c = new ut(r, r.nextSibling, this, t) : l.type === 1 ? c = new l.ctor(r, l.name, l.strings, this, t) : l.type === 6 && (c = new sn(r, this, t)), this._$AV.push(c), l = s[++a];
1393
1393
  }
1394
1394
  o !== (l == null ? void 0 : l.index) && (r = R.nextNode(), o++);
1395
1395
  }
@@ -1400,7 +1400,7 @@ class Js {
1400
1400
  for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
1401
1401
  }
1402
1402
  }
1403
- class ht {
1403
+ class ut {
1404
1404
  get _$AU() {
1405
1405
  var t;
1406
1406
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
@@ -1448,7 +1448,7 @@ class ht {
1448
1448
  ae(this._$AH) || (this._$AH = [], this._$AR());
1449
1449
  const e = this._$AH;
1450
1450
  let s, n = 0;
1451
- for (const r of t) n === e.length ? e.push(s = new ht(this.O(rt()), this.O(rt()), this, this.options)) : s = e[n], s._$AI(r), n++;
1451
+ for (const r of t) n === e.length ? e.push(s = new ut(this.O(rt()), this.O(rt()), this, this.options)) : s = e[n], s._$AI(r), n++;
1452
1452
  n < e.length && (this._$AR(s && s._$AB.nextSibling, n), e.length = n);
1453
1453
  }
1454
1454
  _$AR(t = this._$AA.nextSibling, e) {
@@ -1530,13 +1530,13 @@ class sn {
1530
1530
  }
1531
1531
  }
1532
1532
  const Ht = st.litHtmlPolyfillSupport;
1533
- Ht == null || Ht(Qt, ht), (st.litHtmlVersions ?? (st.litHtmlVersions = [])).push("3.3.0");
1533
+ Ht == null || Ht(Qt, ut), (st.litHtmlVersions ?? (st.litHtmlVersions = [])).push("3.3.0");
1534
1534
  const nn = (i, t, e) => {
1535
1535
  const s = (e == null ? void 0 : e.renderBefore) ?? t;
1536
1536
  let n = s._$litPart$;
1537
1537
  if (n === void 0) {
1538
1538
  const r = (e == null ? void 0 : e.renderBefore) ?? null;
1539
- s._$litPart$ = n = new ht(t.insertBefore(rt(), r), r, void 0, e ?? {});
1539
+ s._$litPart$ = n = new ut(t.insertBefore(rt(), r), r, void 0, e ?? {});
1540
1540
  }
1541
1541
  return n._$AI(i), n;
1542
1542
  };
@@ -1709,17 +1709,17 @@ const nt = (i, t) => {
1709
1709
  e.add(i), dn(t);
1710
1710
  }
1711
1711
  };
1712
- function hn(i) {
1712
+ function un(i) {
1713
1713
  this._$AN !== void 0 ? (wt(this), this._$AM = i, Ri(this)) : this._$AM = i;
1714
1714
  }
1715
- function un(i, t = !1, e = 0) {
1715
+ function hn(i, t = !1, e = 0) {
1716
1716
  const s = this._$AH, n = this._$AN;
1717
1717
  if (n !== void 0 && n.size !== 0) if (t) if (Array.isArray(s)) for (let r = e; r < s.length; r++) nt(s[r], !1), wt(s[r]);
1718
1718
  else s != null && (nt(s, !1), wt(s));
1719
1719
  else nt(this, i);
1720
1720
  }
1721
1721
  const dn = (i) => {
1722
- i.type == le.CHILD && (i._$AP ?? (i._$AP = un), i._$AQ ?? (i._$AQ = hn));
1722
+ i.type == le.CHILD && (i._$AP ?? (i._$AP = hn), i._$AQ ?? (i._$AQ = un));
1723
1723
  };
1724
1724
  class Ui extends Li {
1725
1725
  constructor() {
@@ -1907,13 +1907,13 @@ class $n extends Ui {
1907
1907
  let o = !1;
1908
1908
  const a = {};
1909
1909
  for (const l in e) {
1910
- const c = t[l], h = e[l];
1910
+ const c = t[l], u = e[l];
1911
1911
  if (l in Wt) {
1912
- const u = Wt[l];
1913
- if (c === void 0 || h === void 0) continue;
1914
- const d = u(c, h);
1912
+ const h = Wt[l];
1913
+ if (c === void 0 || u === void 0) continue;
1914
+ const d = h(c, u);
1915
1915
  d.transform !== void 0 && (a[l] = d.value, o = !0, n.transform = `${n.transform ?? ""} ${d.transform}`, d.overrideFrom !== void 0 && Object.assign(n, d.overrideFrom));
1916
- } else c !== h && c !== void 0 && h !== void 0 && (o = !0, n[l] = c, r[l] = h);
1916
+ } else c !== u && c !== void 0 && u !== void 0 && (o = !0, n[l] = c, r[l] = u);
1917
1917
  }
1918
1918
  return n.transformOrigin = r.transformOrigin = s ? "center center" : "top left", this.animatingProperties = a, o ? [n, r] : void 0;
1919
1919
  }
@@ -1972,7 +1972,7 @@ const ze = ce(class extends Li {
1972
1972
  }), C = (i, t, e) => {
1973
1973
  i && e.style.setProperty(t, i);
1974
1974
  }, ji = (i, t) => {
1975
- var e, s, n, r, o, a, l, c, h;
1975
+ var e, s, n, r, o, a, l, c, u;
1976
1976
  C((e = i.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), C(
1977
1977
  (s = i.colors) == null ? void 0 : s.textOnPrimaryBackground,
1978
1978
  "--text-on-primary-background",
@@ -2001,7 +2001,7 @@ const ze = ce(class extends Li {
2001
2001
  (c = i.colors) == null ? void 0 : c.interactiveTextOnPrimaryBackground,
2002
2002
  "--interactive-text-on-primary-background",
2003
2003
  t
2004
- ), C((h = i.colors) == null ? void 0 : h.focusColor, "--focus-color", t);
2004
+ ), C((u = i.colors) == null ? void 0 : u.focusColor, "--focus-color", t);
2005
2005
  };
2006
2006
  /**
2007
2007
  * @license
@@ -2038,14 +2038,14 @@ const qt = /* @__PURE__ */ new WeakMap(), St = ce(class extends Ui {
2038
2038
  this.rt(this.ct);
2039
2039
  }
2040
2040
  });
2041
- var wn = Object.defineProperty, ut = (i, t, e, s) => {
2041
+ var wn = Object.defineProperty, ht = (i, t, e, s) => {
2042
2042
  for (var n = void 0, r = i.length - 1, o; r >= 0; r--)
2043
2043
  (o = i[r]) && (n = o(t, e, n) || n);
2044
2044
  return n && wn(t, e, n), n;
2045
2045
  };
2046
2046
  const ve = class ve extends A {
2047
2047
  constructor() {
2048
- super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = xt(), this.widgetActive$ = new ui(!1), this.componentIsDestroyed$ = new It();
2048
+ super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = xt(), this.widgetActive$ = new hi(!1), this.componentIsDestroyed$ = new It();
2049
2049
  }
2050
2050
  async connectedCallback() {
2051
2051
  super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
@@ -2090,13 +2090,13 @@ const ve = class ve extends A {
2090
2090
  const s = (c = this.application) == null ? void 0 : c.triggerIcon;
2091
2091
  if (!s)
2092
2092
  return p;
2093
- const n = async (h) => bn, { type: r, content: o } = s;
2093
+ const n = async (u) => bn, { type: r, content: o } = s;
2094
2094
  switch (r) {
2095
2095
  case "Telia": {
2096
- const h = await n();
2097
- return h ? m`<telia-icon
2096
+ const u = await n();
2097
+ return u ? m`<telia-icon
2098
2098
  class="trigger-icon"
2099
- svg=${h.svg}
2099
+ svg=${u.svg}
2100
2100
  size="lg"
2101
2101
  ></telia-icon>` : p;
2102
2102
  }
@@ -2316,19 +2316,19 @@ ve.styles = [
2316
2316
  `
2317
2317
  ];
2318
2318
  let E = ve;
2319
- ut([
2319
+ ht([
2320
2320
  _({ attribute: !1 })
2321
2321
  ], E.prototype, "application");
2322
- ut([
2322
+ ht([
2323
2323
  x()
2324
2324
  ], E.prototype, "active");
2325
- ut([
2325
+ ht([
2326
2326
  x()
2327
2327
  ], E.prototype, "triggerVisible");
2328
- ut([
2328
+ ht([
2329
2329
  x()
2330
2330
  ], E.prototype, "loaded");
2331
- ut([
2331
+ ht([
2332
2332
  x()
2333
2333
  ], E.prototype, "icon");
2334
2334
  var xn = Object.defineProperty, L = (i, t, e, s) => {
@@ -2541,7 +2541,7 @@ var On = Object.defineProperty, Fi = (i, t, e, s) => {
2541
2541
  };
2542
2542
  const Tn = "application", me = class me extends A {
2543
2543
  constructor() {
2544
- super(...arguments), this.nodes = [], this.wrapperRef = xt(), this.fullscreen = !1, this.isReady = new ui(!1);
2544
+ super(...arguments), this.nodes = [], this.wrapperRef = xt(), this.fullscreen = !1, this.isReady = new hi(!1);
2545
2545
  }
2546
2546
  addChild(t) {
2547
2547
  t.parent = this, this.nodes.push(t);
@@ -2784,7 +2784,7 @@ const Ot = class Ot {
2784
2784
  };
2785
2785
  Ot.endpoint = "https://widgets.ace.teliacompany.net/api";
2786
2786
  let We = Ot;
2787
- var Pn = Object.defineProperty, he = (i, t, e, s) => {
2787
+ var Pn = Object.defineProperty, ue = (i, t, e, s) => {
2788
2788
  for (var n = void 0, r = i.length - 1, o; r >= 0; r--)
2789
2789
  (o = i[r]) && (n = o(t, e, n) || n);
2790
2790
  return n && Pn(t, e, n), n;
@@ -2829,13 +2829,13 @@ ye.styles = [
2829
2829
  `
2830
2830
  ];
2831
2831
  let X = ye;
2832
- he([
2832
+ ue([
2833
2833
  _({ attribute: !0 })
2834
2834
  ], X.prototype, "name");
2835
- he([
2835
+ ue([
2836
2836
  x()
2837
2837
  ], X.prototype, "widget");
2838
- he([
2838
+ ue([
2839
2839
  x()
2840
2840
  ], X.prototype, "status");
2841
2841
  customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", _t);
@@ -2988,7 +2988,7 @@ const z = {
2988
2988
  transformTagName: !1,
2989
2989
  attachStyles: !0
2990
2990
  };
2991
- let D, Bi, Rt, Hi = !1, At = !1, ue = !1, b = !1, qe = null, Vt = !1;
2991
+ let D, Bi, Rt, Hi = !1, At = !1, he = !1, b = !1, qe = null, Vt = !1;
2992
2992
  const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, zi = Ut.HTMLElement || class {
2993
2993
  }, y = {
2994
2994
  $flags$: 0,
@@ -3047,21 +3047,21 @@ const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, z
3047
3047
  s & 10 && (e["s-sc"] = r, e.classList.add(r + "-h"), s & 2 && e.classList.add(r + "-s")), n();
3048
3048
  }, Wi = (i, t) => "sc-" + (t && i.$flags$ & 32 ? i.$tagName$ + "-" + t : i.$tagName$), qn = (i) => yr.map((t) => t(i)).find((t) => !!t), Ze = {}, Gn = "http://www.w3.org/2000/svg", Yn = "http://www.w3.org/1999/xhtml", Zn = (i) => i != null, de = (i) => (i = typeof i, i === "object" || i === "function"), G = (i, t, ...e) => {
3049
3049
  let s = null, n = null, r = null, o = !1, a = !1, l = [];
3050
- const c = (u) => {
3051
- for (let d = 0; d < u.length; d++)
3052
- s = u[d], Array.isArray(s) ? c(s) : s != null && typeof s != "boolean" && ((o = typeof i != "function" && !de(s)) && (s = String(s)), o && a ? l[l.length - 1].$text$ += s : l.push(o ? kt(null, s) : s), a = o);
3050
+ const c = (h) => {
3051
+ for (let d = 0; d < h.length; d++)
3052
+ s = h[d], Array.isArray(s) ? c(s) : s != null && typeof s != "boolean" && ((o = typeof i != "function" && !de(s)) && (s = String(s)), o && a ? l[l.length - 1].$text$ += s : l.push(o ? kt(null, s) : s), a = o);
3053
3053
  };
3054
3054
  if (c(e), t) {
3055
3055
  t.key && (n = t.key), t.name && (r = t.name);
3056
3056
  {
3057
- const u = t.className || t.class;
3058
- u && (t.class = typeof u != "object" ? u : Object.keys(u).filter((d) => u[d]).join(" "));
3057
+ const h = t.className || t.class;
3058
+ h && (t.class = typeof h != "object" ? h : Object.keys(h).filter((d) => h[d]).join(" "));
3059
3059
  }
3060
3060
  }
3061
3061
  if (typeof i == "function")
3062
3062
  return i(t === null ? {} : t, l, Xn);
3063
- const h = kt(i, null);
3064
- return h.$attrs$ = t, l.length > 0 && (h.$children$ = l), h.$key$ = n, h.$name$ = r, h;
3063
+ const u = kt(i, null);
3064
+ return u.$attrs$ = t, l.length > 0 && (u.$children$ = l), u.$key$ = n, u.$name$ = r, u;
3065
3065
  }, kt = (i, t) => {
3066
3066
  const e = {
3067
3067
  $flags$: 0,
@@ -3092,8 +3092,8 @@ const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, z
3092
3092
  if (e !== s) {
3093
3093
  let o = ti(i, t), a = t.toLowerCase();
3094
3094
  if (t === "class") {
3095
- const l = i.classList, c = Qe(e), h = Qe(s);
3096
- l.remove(...c.filter((u) => u && !h.includes(u))), l.add(...h.filter((u) => u && !c.includes(u)));
3095
+ const l = i.classList, c = Qe(e), u = Qe(s);
3096
+ l.remove(...c.filter((h) => h && !u.includes(h))), l.add(...u.filter((h) => h && !c.includes(h)));
3097
3097
  } else if (t === "style") {
3098
3098
  for (const l in e)
3099
3099
  (!s || s[l] == null) && (l.includes("-") ? i.style.removeProperty(l) : i.style[l] = "");
@@ -3111,8 +3111,8 @@ const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, z
3111
3111
  if (i.tagName.includes("-"))
3112
3112
  i[t] = s;
3113
3113
  else {
3114
- let h = s ?? "";
3115
- t === "list" ? o = !1 : (e == null || i[t] != h) && (i[t] = h);
3114
+ let u = s ?? "";
3115
+ t === "list" ? o = !1 : (e == null || i[t] != u) && (i[t] = u);
3116
3116
  }
3117
3117
  } catch {
3118
3118
  }
@@ -3128,7 +3128,7 @@ const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, z
3128
3128
  Xe(n, s, r[s], o[s], e, t.$flags$);
3129
3129
  }, Ct = (i, t, e, s) => {
3130
3130
  let n = t.$children$[e], r = 0, o, a, l;
3131
- if (Hi || (ue = !0, n.$tag$ === "slot" && (D && s.classList.add(D + "-s"), n.$flags$ |= n.$children$ ? (
3131
+ if (Hi || (he = !0, n.$tag$ === "slot" && (D && s.classList.add(D + "-s"), n.$flags$ |= n.$children$ ? (
3132
3132
  // slot element has fallback content
3133
3133
  2
3134
3134
  ) : (
@@ -3150,7 +3150,7 @@ const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, z
3150
3150
  const e = i.childNodes;
3151
3151
  for (let s = e.length - 1; s >= 0; s--) {
3152
3152
  const n = e[s];
3153
- n["s-hn"] !== Rt && n["s-ol"] && (Zi(n).insertBefore(n, pe(n)), n["s-ol"].remove(), n["s-ol"] = void 0, ue = !0), t && ct(n, t);
3153
+ n["s-hn"] !== Rt && n["s-ol"] && (Zi(n).insertBefore(n, pe(n)), n["s-ol"].remove(), n["s-ol"] = void 0, he = !0), t && ct(n, t);
3154
3154
  }
3155
3155
  y.$flags$ &= -2;
3156
3156
  }, Gi = (i, t, e, s, n, r) => {
@@ -3161,24 +3161,24 @@ const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, z
3161
3161
  for (; t <= e; ++t)
3162
3162
  (s = i[t]) && (n = s.$elm$, Qi(s), At = !0, n["s-ol"] ? n["s-ol"].remove() : ct(n, !0), n.remove());
3163
3163
  }, Vn = (i, t, e, s) => {
3164
- let n = 0, r = 0, o = 0, a = 0, l = t.length - 1, c = t[0], h = t[l], u = s.length - 1, d = s[0], f = s[u], v, g;
3165
- for (; n <= l && r <= u; )
3164
+ let n = 0, r = 0, o = 0, a = 0, l = t.length - 1, c = t[0], u = t[l], h = s.length - 1, d = s[0], f = s[h], v, g;
3165
+ for (; n <= l && r <= h; )
3166
3166
  if (c == null)
3167
3167
  c = t[++n];
3168
- else if (h == null)
3169
- h = t[--l];
3168
+ else if (u == null)
3169
+ u = t[--l];
3170
3170
  else if (d == null)
3171
3171
  d = s[++r];
3172
3172
  else if (f == null)
3173
- f = s[--u];
3173
+ f = s[--h];
3174
3174
  else if (gt(c, d))
3175
3175
  W(c, d), c = t[++n], d = s[++r];
3176
- else if (gt(h, f))
3177
- W(h, f), h = t[--l], f = s[--u];
3176
+ else if (gt(u, f))
3177
+ W(u, f), u = t[--l], f = s[--h];
3178
3178
  else if (gt(c, f))
3179
- (c.$tag$ === "slot" || f.$tag$ === "slot") && ct(c.$elm$.parentNode, !1), W(c, f), i.insertBefore(c.$elm$, h.$elm$.nextSibling), c = t[++n], f = s[--u];
3180
- else if (gt(h, d))
3181
- (c.$tag$ === "slot" || f.$tag$ === "slot") && ct(h.$elm$.parentNode, !1), W(h, d), i.insertBefore(h.$elm$, c.$elm$), h = t[--l], d = s[++r];
3179
+ (c.$tag$ === "slot" || f.$tag$ === "slot") && ct(c.$elm$.parentNode, !1), W(c, f), i.insertBefore(c.$elm$, u.$elm$.nextSibling), c = t[++n], f = s[--h];
3180
+ else if (gt(u, d))
3181
+ (c.$tag$ === "slot" || f.$tag$ === "slot") && ct(u.$elm$.parentNode, !1), W(u, d), i.insertBefore(u.$elm$, c.$elm$), u = t[--l], d = s[++r];
3182
3182
  else {
3183
3183
  for (o = -1, a = n; a <= l; ++a)
3184
3184
  if (t[a] && t[a].$key$ !== null && t[a].$key$ === d.$key$) {
@@ -3187,7 +3187,7 @@ const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, z
3187
3187
  }
3188
3188
  o >= 0 ? (g = t[o], g.$tag$ !== d.$tag$ ? v = Ct(t && t[r], e, o, i) : (W(g, d), t[o] = void 0, v = g.$elm$), d = s[++r]) : (v = Ct(t && t[r], e, r, i), d = s[++r]), v && Zi(c.$elm$).insertBefore(v, pe(c.$elm$));
3189
3189
  }
3190
- n > l ? Gi(i, s[u + 1] == null ? null : s[u + 1].$elm$, e, s, r, u) : r > u && Yi(t, n, l);
3190
+ n > l ? Gi(i, s[h + 1] == null ? null : s[h + 1].$elm$, e, s, r, h) : r > h && Yi(t, n, l);
3191
3191
  }, gt = (i, t) => i.$tag$ === t.$tag$ ? i.$tag$ === "slot" ? i.$name$ === t.$name$ : i.$key$ === t.$key$ : !1, pe = (i) => i && i["s-ol"] || i, Zi = (i) => (i["s-ol"] ? i["s-ol"] : i).parentNode, W = (i, t) => {
3192
3192
  const e = t.$elm$ = i.$elm$, s = i.$children$, n = t.$children$, r = t.$tag$, o = t.$text$;
3193
3193
  let a;
@@ -3215,12 +3215,12 @@ const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, z
3215
3215
  for (; a < c; a++) {
3216
3216
  if (t = l[a], t["s-sr"] && (e = t["s-cr"]) && e.parentNode)
3217
3217
  for (s = e.parentNode.childNodes, n = t["s-sn"], o = s.length - 1; o >= 0; o--)
3218
- e = s[o], !e["s-cn"] && !e["s-nr"] && e["s-hn"] !== t["s-hn"] && (Je(e, n) ? (r = S.find((h) => h.$nodeToRelocate$ === e), At = !0, e["s-sn"] = e["s-sn"] || n, r ? r.$slotRefNode$ = t : S.push({
3218
+ e = s[o], !e["s-cn"] && !e["s-nr"] && e["s-hn"] !== t["s-hn"] && (Je(e, n) ? (r = S.find((u) => u.$nodeToRelocate$ === e), At = !0, e["s-sn"] = e["s-sn"] || n, r ? r.$slotRefNode$ = t : S.push({
3219
3219
  $slotRefNode$: t,
3220
3220
  $nodeToRelocate$: e
3221
- }), e["s-sr"] && S.map((h) => {
3222
- Je(h.$nodeToRelocate$, e["s-sn"]) && (r = S.find((u) => u.$nodeToRelocate$ === e), r && !h.$slotRefNode$ && (h.$slotRefNode$ = r.$slotRefNode$));
3223
- })) : S.some((h) => h.$nodeToRelocate$ === e) || S.push({
3221
+ }), e["s-sr"] && S.map((u) => {
3222
+ Je(u.$nodeToRelocate$, e["s-sn"]) && (r = S.find((h) => h.$nodeToRelocate$ === e), r && !u.$slotRefNode$ && (u.$slotRefNode$ = r.$slotRefNode$));
3223
+ })) : S.some((u) => u.$nodeToRelocate$ === e) || S.push({
3224
3224
  $nodeToRelocate$: e
3225
3225
  }));
3226
3226
  t.nodeType === 1 && Xi(t);
@@ -3231,19 +3231,19 @@ const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, z
3231
3231
  const e = i.$hostElement$, s = i.$cmpMeta$, n = i.$vnode$ || kt(null, null), r = Kn(t) ? t : G(null, null, t);
3232
3232
  Rt = e.tagName, s.$attrsToReflect$ && (r.$attrs$ = r.$attrs$ || {}, s.$attrsToReflect$.map(([o, a]) => r.$attrs$[a] = e[o])), r.$tag$ = null, r.$flags$ |= 4, i.$vnode$ = r, r.$elm$ = n.$elm$ = e.shadowRoot || e, D = e["s-sc"], Bi = e["s-cr"], Hi = (s.$flags$ & 1) !== 0, At = !1, W(n, r);
3233
3233
  {
3234
- if (y.$flags$ |= 1, ue) {
3234
+ if (y.$flags$ |= 1, he) {
3235
3235
  Xi(r.$elm$);
3236
- let o, a, l, c, h, u, d = 0;
3236
+ let o, a, l, c, u, h, d = 0;
3237
3237
  for (; d < S.length; d++)
3238
3238
  o = S[d], a = o.$nodeToRelocate$, a["s-ol"] || (l = k.createTextNode(""), l["s-nr"] = a, a.parentNode.insertBefore(a["s-ol"] = l, a));
3239
3239
  for (d = 0; d < S.length; d++)
3240
3240
  if (o = S[d], a = o.$nodeToRelocate$, o.$slotRefNode$) {
3241
- for (c = o.$slotRefNode$.parentNode, h = o.$slotRefNode$.nextSibling, l = a["s-ol"]; l = l.previousSibling; )
3242
- if (u = l["s-nr"], u && u["s-sn"] === a["s-sn"] && c === u.parentNode && (u = u.nextSibling, !u || !u["s-nr"])) {
3243
- h = u;
3241
+ for (c = o.$slotRefNode$.parentNode, u = o.$slotRefNode$.nextSibling, l = a["s-ol"]; l = l.previousSibling; )
3242
+ if (h = l["s-nr"], h && h["s-sn"] === a["s-sn"] && c === h.parentNode && (h = h.nextSibling, !h || !h["s-nr"])) {
3243
+ u = h;
3244
3244
  break;
3245
3245
  }
3246
- (!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));
3246
+ (!u && c !== a.parentNode || a.nextSibling !== u) && a !== u && (!a["s-hn"] && a["s-ol"] && (a["s-hn"] = a["s-ol"].parentNode.nodeName), c.insertBefore(a, u));
3247
3247
  } else
3248
3248
  a.nodeType === 1 && (a.hidden = !0);
3249
3249
  }
@@ -3289,7 +3289,7 @@ const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, z
3289
3289
  } catch (s) {
3290
3290
  dt(s);
3291
3291
  }
3292
- }, Ve = (i, t) => i && i.then ? i.then(t) : t(), cr = (i, t) => i != null && !de(i) ? t & 4 ? i === "false" ? !1 : i === "" || !!i : t & 2 ? parseFloat(i) : t & 1 ? String(i) : i : i, hr = (i, t) => Mt(i).$instanceValues$.get(t), ur = (i, t, e, s) => {
3292
+ }, Ve = (i, t) => i && i.then ? i.then(t) : t(), cr = (i, t) => i != null && !de(i) ? t & 4 ? i === "false" ? !1 : i === "" || !!i : t & 2 ? parseFloat(i) : t & 1 ? String(i) : i : i, ur = (i, t) => Mt(i).$instanceValues$.get(t), hr = (i, t, e, s) => {
3293
3293
  const n = Mt(i), r = i, o = n.$instanceValues$.get(t), a = n.$flags$, l = r;
3294
3294
  e = cr(e, s.$members$[t][0]);
3295
3295
  const c = Number.isNaN(o) && Number.isNaN(e);
@@ -3297,8 +3297,8 @@ const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, z
3297
3297
  n.$instanceValues$.set(t, e);
3298
3298
  {
3299
3299
  if (s.$watchers$ && a & 128) {
3300
- const u = s.$watchers$[t];
3301
- u && u.map((d) => {
3300
+ const h = s.$watchers$[t];
3301
+ h && h.map((d) => {
3302
3302
  try {
3303
3303
  l[d](e, o, t);
3304
3304
  } catch (f) {
@@ -3320,10 +3320,10 @@ const Ut = typeof window < "u" ? window : {}, k = Ut.document || { head: {} }, z
3320
3320
  s.map(([r, [o]]) => {
3321
3321
  (o & 31 || o & 32) && Object.defineProperty(n, r, {
3322
3322
  get() {
3323
- return hr(this, r);
3323
+ return ur(this, r);
3324
3324
  },
3325
3325
  set(a) {
3326
- ur(this, r, a, t);
3326
+ hr(this, r, a, t);
3327
3327
  },
3328
3328
  configurable: !0,
3329
3329
  enumerable: !0
@@ -3561,18 +3561,23 @@ const si = Ni(A), be = class be extends si {
3561
3561
  }), this.application.storage.set("open", !1));
3562
3562
  }
3563
3563
  notify(t, e = {}) {
3564
- window != null && window.parent && window.parent.postMessage(
3565
- {
3566
- type: t,
3567
- data: e
3568
- },
3569
- "*"
3570
- );
3564
+ if (window != null && window.parent) {
3565
+ const s = window.location.origin;
3566
+ window.parent.postMessage(
3567
+ {
3568
+ type: t,
3569
+ data: e
3570
+ },
3571
+ s
3572
+ );
3573
+ }
3571
3574
  }
3572
3575
  connectedCallback() {
3573
3576
  super.connectedCallback();
3574
- const t = this.application.storage.get("auth");
3575
- t != null && t.authenticated && (this.UserName = t == null ? void 0 : t.name, this.authState = "authenticated"), document.addEventListener("click", this._onClickOutside);
3577
+ const t = this.application.storage.get(
3578
+ "auth"
3579
+ );
3580
+ t != null && t.authenticated && (this.UserName = (t == null ? void 0 : t.name) ?? "", this.authState = "authenticated"), document.addEventListener("click", this._onClickOutside);
3576
3581
  }
3577
3582
  disconnectedCallback() {
3578
3583
  super.disconnectedCallback(), document.removeEventListener("click", this._onClickOutside);
@@ -3586,11 +3591,54 @@ const si = Ni(A), be = class be extends si {
3586
3591
  _logout(t = "non-authenticated") {
3587
3592
  this.authState = t, this.application.storage.removeItem("auth"), this.UserName = "", this.authUrl = "";
3588
3593
  }
3594
+ renderAuthSection(t) {
3595
+ return this.shouldUseAuth && this.authState !== "chat-ended" ? m`<div class="options-menu__auth-container">
3596
+ <p class="options-menu__auth-helper-text" data-testid="auth-helper-text">
3597
+ ${t.getOrFallback(
3598
+ "widget-header.authentication-text",
3599
+ "AUTHENTICATED AS"
3600
+ )}
3601
+ </p>
3602
+ ${this.renderAuthStatus(t)}
3603
+ </div>` : p;
3604
+ }
3605
+ renderAuthStatus(t) {
3606
+ return this.authState === "non-authenticated" ? m` <div class="options-menu__auth">
3607
+ <p class="options-menu__auth-status" data-testid="auth-status">
3608
+ ${t.getOrFallback(
3609
+ "widget-header.not-authenticated",
3610
+ "Not authenticated"
3611
+ )}
3612
+ </p>
3613
+ <a
3614
+ href="${this.authUrl}"
3615
+ @click=${this._onStartAuth}
3616
+ target="_blank"
3617
+ class="options-menu__auth-link"
3618
+ data-testid="auth-link"
3619
+ >
3620
+ ${t.getOrFallback("widget-header.identify", "Identify")}
3621
+ </a>
3622
+ </div>` : m` <div class="options-menu__auth">
3623
+ <p class="options-menu__auth-status" data-testid="auth-status">
3624
+ ${this.UserName}
3625
+ </p>
3626
+ ${this.authState === "authenticated" ? m`<button
3627
+ @click=${this._showLogoutForm}
3628
+ href="#"
3629
+ target="_blank"
3630
+ class="options-menu__auth-link"
3631
+ data-testid="auth-link"
3632
+ >
3633
+ ${t.getOrFallback("widget-header.log-out", "Log out")}
3634
+ </button>` : p}
3635
+ </div>`;
3636
+ }
3589
3637
  render() {
3590
- var a, l, c, h, u;
3638
+ var a, l, c, u, h;
3591
3639
  const t = this.application.branding(), e = (a = t == null ? void 0 : t.graphics) == null ? void 0 : a.logotype, s = this.application.texts, n = s.get("widget-header.header", "ACE Widget"), r = this.application.settings.components.conversation;
3592
3640
  this.shouldUseAuth = (c = (l = this.application.settings) == null ? void 0 : l.auth) == null ? void 0 : c.shouldUseAuth;
3593
- const o = (u = (h = r == null ? void 0 : r.properties) == null ? void 0 : h.chat) == null ? void 0 : u.isThirdPartyWidget;
3641
+ const o = (h = (u = r == null ? void 0 : r.properties) == null ? void 0 : u.chat) == null ? void 0 : h.isThirdPartyWidget;
3594
3642
  return m` <div class="widget-header">
3595
3643
  ${e ? m` <img
3596
3644
  src=${e}
@@ -3627,51 +3675,7 @@ const si = Ni(A), be = class be extends si {
3627
3675
  <h3>
3628
3676
  ${s.getOrFallback("widget-header.OptionsLabel", "Options")}
3629
3677
  </h3>
3630
- ${this.shouldUseAuth && this.authState !== "chat-ended" ? m`<div class="options-menu__auth-container">
3631
- <p class="options-menu__auth-helper-text">
3632
- ${s.getOrFallback(
3633
- "widget-header.authentication-text",
3634
- "AUTHENTICATED AS"
3635
- )}
3636
- </p>
3637
- ${this.authState === "non-authenticated" ? m` <div class="options-menu__auth">
3638
- <p class="options-menu__auth-status">
3639
- ${s.getOrFallback(
3640
- "widget-header.not-authenticated",
3641
- "Not authenticated"
3642
- )}
3643
- </p>
3644
- <a
3645
- href="${this.authUrl}"
3646
- @click=${this._onStartAuth}
3647
- target="_blank"
3648
- class="options-menu__auth-link"
3649
- >
3650
- ${s.getOrFallback(
3651
- "widget-header.identify",
3652
- "Identify"
3653
- )}
3654
- </a>
3655
- </div>` : (
3656
- //TODO: add authenticated status
3657
- m` <div class="options-menu__auth">
3658
- <p class="options-menu__auth-status">
3659
- ${this.UserName}
3660
- </p>
3661
- ${this.authState === "authenticated" ? m`<button
3662
- @click=${this._showLogoutForm}
3663
- href="#"
3664
- target="_blank"
3665
- class="options-menu__auth-link"
3666
- >
3667
- ${s.getOrFallback(
3668
- "widget-header.log-out",
3669
- "Log out"
3670
- )}
3671
- </button>` : p}
3672
- </div>`
3673
- )}
3674
- </div>` : p}
3678
+ ${this.renderAuthSection(s)}
3675
3679
  ${this.options.options.map((d) => m`<button
3676
3680
  class="options-menu__item"
3677
3681
  data-testid="${d.key}"