@telia-ace/widget-core-flamingo 1.1.113-rc.6 → 1.1.113
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.
- package/index.js +13 -26
- package/index.mjs +271 -284
- package/package.json +1 -1
package/index.mjs
CHANGED
@@ -27,24 +27,24 @@ function gt(r) {
|
|
27
27
|
function mt(r, t) {
|
28
28
|
var e = typeof Symbol == "function" && r[Symbol.iterator];
|
29
29
|
if (!e) return r;
|
30
|
-
var i = e.call(r), s,
|
30
|
+
var i = e.call(r), s, n = [], o;
|
31
31
|
try {
|
32
|
-
for (; (t === void 0 || t-- > 0) && !(s = i.next()).done; )
|
32
|
+
for (; (t === void 0 || t-- > 0) && !(s = i.next()).done; ) n.push(s.value);
|
33
33
|
} catch (a) {
|
34
|
-
|
34
|
+
o = { error: a };
|
35
35
|
} finally {
|
36
36
|
try {
|
37
37
|
s && !s.done && (e = i.return) && e.call(i);
|
38
38
|
} finally {
|
39
|
-
if (
|
39
|
+
if (o) throw o.error;
|
40
40
|
}
|
41
41
|
}
|
42
|
-
return
|
42
|
+
return n;
|
43
43
|
}
|
44
44
|
function vt(r, t, e) {
|
45
|
-
if (e || arguments.length === 2) for (var i = 0, s = t.length,
|
46
|
-
(
|
47
|
-
return r.concat(
|
45
|
+
if (e || arguments.length === 2) for (var i = 0, s = t.length, n; i < s; i++)
|
46
|
+
(n || !(i in t)) && (n || (n = Array.prototype.slice.call(t, 0, i)), n[i] = t[i]);
|
47
|
+
return r.concat(n || Array.prototype.slice.call(t));
|
48
48
|
}
|
49
49
|
function _(r) {
|
50
50
|
return typeof r == "function";
|
@@ -55,7 +55,7 @@ function ae(r) {
|
|
55
55
|
}, e = r(t);
|
56
56
|
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
57
57
|
}
|
58
|
-
var
|
58
|
+
var ot = ae(function(r) {
|
59
59
|
return function(e) {
|
60
60
|
r(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
61
61
|
` + e.map(function(i, s) {
|
@@ -75,14 +75,14 @@ var rt = function() {
|
|
75
75
|
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
76
76
|
}
|
77
77
|
return r.prototype.unsubscribe = function() {
|
78
|
-
var t, e, i, s,
|
78
|
+
var t, e, i, s, n;
|
79
79
|
if (!this.closed) {
|
80
80
|
this.closed = !0;
|
81
|
-
var
|
82
|
-
if (
|
83
|
-
if (this._parentage = null, Array.isArray(
|
81
|
+
var o = this._parentage;
|
82
|
+
if (o)
|
83
|
+
if (this._parentage = null, Array.isArray(o))
|
84
84
|
try {
|
85
|
-
for (var a = gt(
|
85
|
+
for (var a = gt(o), c = a.next(); !c.done; c = a.next()) {
|
86
86
|
var l = c.value;
|
87
87
|
l.remove(this);
|
88
88
|
}
|
@@ -96,13 +96,13 @@ var rt = function() {
|
|
96
96
|
}
|
97
97
|
}
|
98
98
|
else
|
99
|
-
|
99
|
+
o.remove(this);
|
100
100
|
var h = this.initialTeardown;
|
101
101
|
if (_(h))
|
102
102
|
try {
|
103
103
|
h();
|
104
104
|
} catch (v) {
|
105
|
-
|
105
|
+
n = v instanceof ot ? v.errors : [v];
|
106
106
|
}
|
107
107
|
var d = this._finalizers;
|
108
108
|
if (d) {
|
@@ -113,7 +113,7 @@ var rt = function() {
|
|
113
113
|
try {
|
114
114
|
Ut(g);
|
115
115
|
} catch (v) {
|
116
|
-
|
116
|
+
n = n ?? [], v instanceof ot ? n = vt(vt([], mt(n)), mt(v.errors)) : n.push(v);
|
117
117
|
}
|
118
118
|
}
|
119
119
|
} catch (v) {
|
@@ -126,8 +126,8 @@ var rt = function() {
|
|
126
126
|
}
|
127
127
|
}
|
128
128
|
}
|
129
|
-
if (
|
130
|
-
throw new
|
129
|
+
if (n)
|
130
|
+
throw new ot(n);
|
131
131
|
}
|
132
132
|
}, r.prototype.add = function(t) {
|
133
133
|
var e;
|
@@ -253,12 +253,12 @@ var le = function(r) {
|
|
253
253
|
}(), bt = function(r) {
|
254
254
|
Y(t, r);
|
255
255
|
function t(e, i, s) {
|
256
|
-
var
|
257
|
-
return _(e) || !e ?
|
256
|
+
var n = r.call(this) || this, o;
|
257
|
+
return _(e) || !e ? o = {
|
258
258
|
next: e ?? void 0,
|
259
259
|
error: i ?? void 0,
|
260
260
|
complete: s ?? void 0
|
261
|
-
} :
|
261
|
+
} : o = e, n.destination = new Pe(o), n;
|
262
262
|
}
|
263
263
|
return t;
|
264
264
|
}(le);
|
@@ -294,11 +294,11 @@ var jt = function() {
|
|
294
294
|
var e = new r();
|
295
295
|
return e.source = this, e.operator = t, e;
|
296
296
|
}, r.prototype.subscribe = function(t, e, i) {
|
297
|
-
var s = this,
|
297
|
+
var s = this, n = Me(t) ? t : new bt(t, e, i);
|
298
298
|
return G(function() {
|
299
|
-
var
|
300
|
-
|
301
|
-
}),
|
299
|
+
var o = s, a = o.operator, c = o.source;
|
300
|
+
n.add(a ? a.call(n, c) : c ? s._subscribe(n) : s._trySubscribe(n));
|
301
|
+
}), n;
|
302
302
|
}, r.prototype._trySubscribe = function(t) {
|
303
303
|
try {
|
304
304
|
return this._subscribe(t);
|
@@ -307,19 +307,19 @@ var jt = function() {
|
|
307
307
|
}
|
308
308
|
}, r.prototype.forEach = function(t, e) {
|
309
309
|
var i = this;
|
310
|
-
return e = Ht(e), new e(function(s,
|
311
|
-
var
|
310
|
+
return e = Ht(e), new e(function(s, n) {
|
311
|
+
var o = new bt({
|
312
312
|
next: function(a) {
|
313
313
|
try {
|
314
314
|
t(a);
|
315
315
|
} catch (c) {
|
316
|
-
|
316
|
+
n(c), o.unsubscribe();
|
317
317
|
}
|
318
318
|
},
|
319
|
-
error:
|
319
|
+
error: n,
|
320
320
|
complete: s
|
321
321
|
});
|
322
|
-
i.subscribe(
|
322
|
+
i.subscribe(o);
|
323
323
|
});
|
324
324
|
}, r.prototype._subscribe = function(t) {
|
325
325
|
var e;
|
@@ -333,13 +333,13 @@ var jt = function() {
|
|
333
333
|
}, r.prototype.toPromise = function(t) {
|
334
334
|
var e = this;
|
335
335
|
return t = Ht(t), new t(function(i, s) {
|
336
|
-
var
|
337
|
-
e.subscribe(function(
|
338
|
-
return
|
339
|
-
}, function(
|
340
|
-
return s(
|
336
|
+
var n;
|
337
|
+
e.subscribe(function(o) {
|
338
|
+
return n = o;
|
339
|
+
}, function(o) {
|
340
|
+
return s(o);
|
341
341
|
}, function() {
|
342
|
-
return i(
|
342
|
+
return i(n);
|
343
343
|
});
|
344
344
|
});
|
345
345
|
}, r.create = function(t) {
|
@@ -367,7 +367,7 @@ var Ue = ae(function(r) {
|
|
367
367
|
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
368
368
|
}
|
369
369
|
return t.prototype.lift = function(e) {
|
370
|
-
var i = new
|
370
|
+
var i = new Bt(this, this);
|
371
371
|
return i.operator = e, i;
|
372
372
|
}, t.prototype._throwIfClosed = function() {
|
373
373
|
if (this.closed)
|
@@ -375,11 +375,11 @@ var Ue = ae(function(r) {
|
|
375
375
|
}, t.prototype.next = function(e) {
|
376
376
|
var i = this;
|
377
377
|
G(function() {
|
378
|
-
var s,
|
378
|
+
var s, n;
|
379
379
|
if (i._throwIfClosed(), !i.isStopped) {
|
380
380
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
381
381
|
try {
|
382
|
-
for (var
|
382
|
+
for (var o = gt(i.currentObservers), a = o.next(); !a.done; a = o.next()) {
|
383
383
|
var c = a.value;
|
384
384
|
c.next(e);
|
385
385
|
}
|
@@ -387,7 +387,7 @@ var Ue = ae(function(r) {
|
|
387
387
|
s = { error: l };
|
388
388
|
} finally {
|
389
389
|
try {
|
390
|
-
a && !a.done && (
|
390
|
+
a && !a.done && (n = o.return) && n.call(o);
|
391
391
|
} finally {
|
392
392
|
if (s) throw s.error;
|
393
393
|
}
|
@@ -426,20 +426,20 @@ var Ue = ae(function(r) {
|
|
426
426
|
}, t.prototype._subscribe = function(e) {
|
427
427
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
428
428
|
}, t.prototype._innerSubscribe = function(e) {
|
429
|
-
var i = this, s = this,
|
430
|
-
return
|
429
|
+
var i = this, s = this, n = s.hasError, o = s.isStopped, a = s.observers;
|
430
|
+
return n || o ? ce : (this.currentObservers = null, a.push(e), new rt(function() {
|
431
431
|
i.currentObservers = null, yt(a, e);
|
432
432
|
}));
|
433
433
|
}, t.prototype._checkFinalizedStatuses = function(e) {
|
434
|
-
var i = this, s = i.hasError,
|
435
|
-
s ? e.error(
|
434
|
+
var i = this, s = i.hasError, n = i.thrownError, o = i.isStopped;
|
435
|
+
s ? e.error(n) : o && e.complete();
|
436
436
|
}, t.prototype.asObservable = function() {
|
437
437
|
var e = new jt();
|
438
438
|
return e.source = this, e;
|
439
439
|
}, t.create = function(e, i) {
|
440
|
-
return new
|
440
|
+
return new Bt(e, i);
|
441
441
|
}, t;
|
442
|
-
}(jt),
|
442
|
+
}(jt), Bt = function(r) {
|
443
443
|
Y(t, r);
|
444
444
|
function t(e, i) {
|
445
445
|
var s = r.call(this) || this;
|
@@ -458,7 +458,7 @@ var Ue = ae(function(r) {
|
|
458
458
|
var i, s;
|
459
459
|
return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(e)) !== null && s !== void 0 ? s : ce;
|
460
460
|
}, t;
|
461
|
-
}(_t),
|
461
|
+
}(_t), At = function(r) {
|
462
462
|
Y(t, r);
|
463
463
|
function t(e) {
|
464
464
|
var i = r.call(this) || this;
|
@@ -474,17 +474,17 @@ var Ue = ae(function(r) {
|
|
474
474
|
var i = r.prototype._subscribe.call(this, e);
|
475
475
|
return !i.closed && e.next(this._value), i;
|
476
476
|
}, t.prototype.getValue = function() {
|
477
|
-
var e = this, i = e.hasError, s = e.thrownError,
|
477
|
+
var e = this, i = e.hasError, s = e.thrownError, n = e._value;
|
478
478
|
if (i)
|
479
479
|
throw s;
|
480
|
-
return this._throwIfClosed(),
|
480
|
+
return this._throwIfClosed(), n;
|
481
481
|
}, t.prototype.next = function(e) {
|
482
482
|
r.prototype.next.call(this, this._value = e);
|
483
483
|
}, t;
|
484
484
|
}(_t), de = /* @__PURE__ */ ((r) => (r.Loading = "loading", r.Ready = "ready", r))(de || {});
|
485
|
-
class
|
485
|
+
class Dt {
|
486
486
|
constructor(t, e) {
|
487
|
-
this.state = new
|
487
|
+
this.state = new At(
|
488
488
|
"loading"
|
489
489
|
/* Loading */
|
490
490
|
), this.resolvers = /* @__PURE__ */ new Map(), this.name = t, this.environment = e, this.state.next(
|
@@ -507,7 +507,7 @@ class Bt {
|
|
507
507
|
* Copyright 2019 Google LLC
|
508
508
|
* SPDX-License-Identifier: BSD-3-Clause
|
509
509
|
*/
|
510
|
-
const J = globalThis,
|
510
|
+
const J = globalThis, xt = J.ShadowRoot && (J.ShadyCSS === void 0 || J.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ct = Symbol(), zt = /* @__PURE__ */ new WeakMap();
|
511
511
|
let ue = class {
|
512
512
|
constructor(t, e, i) {
|
513
513
|
if (this._$cssResult$ = !0, i !== Ct) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
@@ -516,9 +516,9 @@ let ue = class {
|
|
516
516
|
get styleSheet() {
|
517
517
|
let t = this.o;
|
518
518
|
const e = this.t;
|
519
|
-
if (
|
519
|
+
if (xt && t === void 0) {
|
520
520
|
const i = e !== void 0 && e.length === 1;
|
521
|
-
i && (t =
|
521
|
+
i && (t = zt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && zt.set(e, t));
|
522
522
|
}
|
523
523
|
return t;
|
524
524
|
}
|
@@ -527,19 +527,19 @@ let ue = class {
|
|
527
527
|
}
|
528
528
|
};
|
529
529
|
const Le = (r) => new ue(typeof r == "string" ? r : r + "", void 0, Ct), U = (r, ...t) => {
|
530
|
-
const e = r.length === 1 ? r[0] : t.reduce((i, s,
|
531
|
-
if (
|
532
|
-
if (typeof
|
533
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
534
|
-
})(s) + r[
|
530
|
+
const e = r.length === 1 ? r[0] : t.reduce((i, s, n) => i + ((o) => {
|
531
|
+
if (o._$cssResult$ === !0) return o.cssText;
|
532
|
+
if (typeof o == "number") return o;
|
533
|
+
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.");
|
534
|
+
})(s) + r[n + 1], r[0]);
|
535
535
|
return new ue(e, r, Ct);
|
536
536
|
}, je = (r, t) => {
|
537
|
-
if (
|
537
|
+
if (xt) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
538
538
|
else for (const e of t) {
|
539
539
|
const i = document.createElement("style"), s = J.litNonce;
|
540
540
|
s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
|
541
541
|
}
|
542
|
-
},
|
542
|
+
}, Ft = xt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
543
543
|
let e = "";
|
544
544
|
for (const i of t.cssRules) e += i.cssText;
|
545
545
|
return Le(e);
|
@@ -549,7 +549,7 @@ const Le = (r) => new ue(typeof r == "string" ? r : r + "", void 0, Ct), U = (r,
|
|
549
549
|
* Copyright 2017 Google LLC
|
550
550
|
* SPDX-License-Identifier: BSD-3-Clause
|
551
551
|
*/
|
552
|
-
const { is: He, defineProperty:
|
552
|
+
const { is: He, defineProperty: Be, getOwnPropertyDescriptor: De, getOwnPropertyNames: ze, getOwnPropertySymbols: Fe, getPrototypeOf: Ve } = Object, C = globalThis, Vt = C.trustedTypes, We = Vt ? Vt.emptyScript : "", at = C.reactiveElementPolyfillSupport, H = (r, t) => r, X = { toAttribute(r, t) {
|
553
553
|
switch (t) {
|
554
554
|
case Boolean:
|
555
555
|
r = r ? We : null;
|
@@ -589,20 +589,20 @@ let k = class extends HTMLElement {
|
|
589
589
|
static createProperty(t, e = Wt) {
|
590
590
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
591
591
|
const i = Symbol(), s = this.getPropertyDescriptor(t, i, e);
|
592
|
-
s !== void 0 &&
|
592
|
+
s !== void 0 && Be(this.prototype, t, s);
|
593
593
|
}
|
594
594
|
}
|
595
595
|
static getPropertyDescriptor(t, e, i) {
|
596
|
-
const { get: s, set:
|
596
|
+
const { get: s, set: n } = De(this.prototype, t) ?? { get() {
|
597
597
|
return this[e];
|
598
|
-
}, set(
|
599
|
-
this[e] =
|
598
|
+
}, set(o) {
|
599
|
+
this[e] = o;
|
600
600
|
} };
|
601
601
|
return { get() {
|
602
602
|
return s == null ? void 0 : s.call(this);
|
603
|
-
}, set(
|
603
|
+
}, set(o) {
|
604
604
|
const a = s == null ? void 0 : s.call(this);
|
605
|
-
|
605
|
+
n.call(this, o), this.requestUpdate(t, a, i);
|
606
606
|
}, configurable: !0, enumerable: !0 };
|
607
607
|
}
|
608
608
|
static getPropertyOptions(t) {
|
@@ -616,7 +616,7 @@ let k = class extends HTMLElement {
|
|
616
616
|
static finalize() {
|
617
617
|
if (this.hasOwnProperty(H("finalized"))) return;
|
618
618
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(H("properties"))) {
|
619
|
-
const e = this.properties, i = [...
|
619
|
+
const e = this.properties, i = [...ze(e), ...Fe(e)];
|
620
620
|
for (const s of i) this.createProperty(s, e[s]);
|
621
621
|
}
|
622
622
|
const t = this[Symbol.metadata];
|
@@ -635,8 +635,8 @@ let k = class extends HTMLElement {
|
|
635
635
|
const e = [];
|
636
636
|
if (Array.isArray(t)) {
|
637
637
|
const i = new Set(t.flat(1 / 0).reverse());
|
638
|
-
for (const s of i) e.unshift(
|
639
|
-
} else t !== void 0 && e.push(
|
638
|
+
for (const s of i) e.unshift(Ft(s));
|
639
|
+
} else t !== void 0 && e.push(Ft(t));
|
640
640
|
return e;
|
641
641
|
}
|
642
642
|
static _$Eu(t, e) {
|
@@ -687,19 +687,19 @@ let k = class extends HTMLElement {
|
|
687
687
|
this._$AK(t, i);
|
688
688
|
}
|
689
689
|
_$EC(t, e) {
|
690
|
-
var
|
690
|
+
var n;
|
691
691
|
const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
|
692
692
|
if (s !== void 0 && i.reflect === !0) {
|
693
|
-
const
|
694
|
-
this._$Em = t,
|
693
|
+
const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : X).toAttribute(e, i.type);
|
694
|
+
this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
|
695
695
|
}
|
696
696
|
}
|
697
697
|
_$AK(t, e) {
|
698
|
-
var
|
698
|
+
var n;
|
699
699
|
const i = this.constructor, s = i._$Eh.get(t);
|
700
700
|
if (s !== void 0 && this._$Em !== s) {
|
701
|
-
const
|
702
|
-
this._$Em = s, this[s] = a.fromAttribute(e,
|
701
|
+
const o = i.getPropertyOptions(s), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? o.converter : X;
|
702
|
+
this._$Em = s, this[s] = a.fromAttribute(e, o.type), this._$Em = null;
|
703
703
|
}
|
704
704
|
}
|
705
705
|
requestUpdate(t, e, i) {
|
@@ -730,18 +730,18 @@ let k = class extends HTMLElement {
|
|
730
730
|
if (!this.isUpdatePending) return;
|
731
731
|
if (!this.hasUpdated) {
|
732
732
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
733
|
-
for (const [
|
733
|
+
for (const [n, o] of this._$Ep) this[n] = o;
|
734
734
|
this._$Ep = void 0;
|
735
735
|
}
|
736
736
|
const s = this.constructor.elementProperties;
|
737
|
-
if (s.size > 0) for (const [
|
737
|
+
if (s.size > 0) for (const [n, o] of s) o.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], o);
|
738
738
|
}
|
739
739
|
let t = !1;
|
740
740
|
const e = this._$AL;
|
741
741
|
try {
|
742
742
|
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((s) => {
|
743
|
-
var
|
744
|
-
return (
|
743
|
+
var n;
|
744
|
+
return (n = s.hostUpdate) == null ? void 0 : n.call(s);
|
745
745
|
}), this.update(e)) : this._$EU();
|
746
746
|
} catch (s) {
|
747
747
|
throw t = !1, this._$EU(), s;
|
@@ -783,7 +783,7 @@ k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[H("elementProper
|
|
783
783
|
* Copyright 2017 Google LLC
|
784
784
|
* SPDX-License-Identifier: BSD-3-Clause
|
785
785
|
*/
|
786
|
-
const
|
786
|
+
const B = globalThis, Q = B.trustedTypes, Yt = Q ? Q.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, pe = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, fe = "?" + x, Ye = `<${fe}>`, O = document, z = () => O.createComment(""), F = (r) => r === null || typeof r != "object" && typeof r != "function", Et = Array.isArray, qe = (r) => Et(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", ct = `[
|
787
787
|
\f\r]`, j = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, qt = /-->/g, Kt = />/g, S = RegExp(`>|${ct}(?:([^\\s"'>=/]+)(${ct}*=${ct}*(?:[^
|
788
788
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), Zt = /'/g, Gt = /"/g, ge = /^(?:script|style|textarea|title)$/i, Ke = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), T = Ke(1), I = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), Jt = /* @__PURE__ */ new WeakMap(), P = O.createTreeWalker(O, 129);
|
789
789
|
function me(r, t) {
|
@@ -792,21 +792,21 @@ function me(r, t) {
|
|
792
792
|
}
|
793
793
|
const Ze = (r, t) => {
|
794
794
|
const e = r.length - 1, i = [];
|
795
|
-
let s,
|
795
|
+
let s, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = j;
|
796
796
|
for (let a = 0; a < e; a++) {
|
797
797
|
const c = r[a];
|
798
798
|
let l, h, d = -1, u = 0;
|
799
|
-
for (; u < c.length && (
|
800
|
-
const f =
|
801
|
-
|
799
|
+
for (; u < c.length && (o.lastIndex = u, h = o.exec(c), h !== null); ) u = o.lastIndex, o === j ? h[1] === "!--" ? o = qt : h[1] !== void 0 ? o = Kt : h[2] !== void 0 ? (ge.test(h[2]) && (s = RegExp("</" + h[2], "g")), o = S) : h[3] !== void 0 && (o = S) : o === S ? h[0] === ">" ? (o = s ?? j, d = -1) : h[1] === void 0 ? d = -2 : (d = o.lastIndex - h[2].length, l = h[1], o = h[3] === void 0 ? S : h[3] === '"' ? Gt : Zt) : o === Gt || o === Zt ? o = S : o === qt || o === Kt ? o = j : (o = S, s = void 0);
|
800
|
+
const f = o === S && r[a + 1].startsWith("/>") ? " " : "";
|
801
|
+
n += o === j ? c + Ye : d >= 0 ? (i.push(l), c.slice(0, d) + pe + c.slice(d) + x + f) : c + x + (d === -2 ? a : f);
|
802
802
|
}
|
803
|
-
return [me(r,
|
803
|
+
return [me(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
804
804
|
};
|
805
805
|
let wt = class ve {
|
806
806
|
constructor({ strings: t, _$litType$: e }, i) {
|
807
807
|
let s;
|
808
808
|
this.parts = [];
|
809
|
-
let
|
809
|
+
let n = 0, o = 0;
|
810
810
|
const a = t.length - 1, c = this.parts, [l, h] = Ze(t, e);
|
811
811
|
if (this.el = ve.createElement(l, i), P.currentNode = this.el.content, e === 2 || e === 3) {
|
812
812
|
const d = this.el.content.firstChild;
|
@@ -815,23 +815,23 @@ let wt = class ve {
|
|
815
815
|
for (; (s = P.nextNode()) !== null && c.length < a; ) {
|
816
816
|
if (s.nodeType === 1) {
|
817
817
|
if (s.hasAttributes()) for (const d of s.getAttributeNames()) if (d.endsWith(pe)) {
|
818
|
-
const u = h[
|
819
|
-
c.push({ type: 1, index:
|
820
|
-
} else d.startsWith(
|
818
|
+
const u = h[o++], f = s.getAttribute(d).split(x), g = /([.?@])?(.*)/.exec(u);
|
819
|
+
c.push({ type: 1, index: n, name: g[2], strings: f, ctor: g[1] === "." ? Je : g[1] === "?" ? Xe : g[1] === "@" ? Qe : nt }), s.removeAttribute(d);
|
820
|
+
} else d.startsWith(x) && (c.push({ type: 6, index: n }), s.removeAttribute(d));
|
821
821
|
if (ge.test(s.tagName)) {
|
822
|
-
const d = s.textContent.split(
|
822
|
+
const d = s.textContent.split(x), u = d.length - 1;
|
823
823
|
if (u > 0) {
|
824
824
|
s.textContent = Q ? Q.emptyScript : "";
|
825
|
-
for (let f = 0; f < u; f++) s.append(d[f],
|
826
|
-
s.append(d[u],
|
825
|
+
for (let f = 0; f < u; f++) s.append(d[f], z()), P.nextNode(), c.push({ type: 2, index: ++n });
|
826
|
+
s.append(d[u], z());
|
827
827
|
}
|
828
828
|
}
|
829
|
-
} else if (s.nodeType === 8) if (s.data === fe) c.push({ type: 2, index:
|
829
|
+
} else if (s.nodeType === 8) if (s.data === fe) c.push({ type: 2, index: n });
|
830
830
|
else {
|
831
831
|
let d = -1;
|
832
|
-
for (; (d = s.data.indexOf(
|
832
|
+
for (; (d = s.data.indexOf(x, d + 1)) !== -1; ) c.push({ type: 7, index: n }), d += x.length - 1;
|
833
833
|
}
|
834
|
-
|
834
|
+
n++;
|
835
835
|
}
|
836
836
|
}
|
837
837
|
static createElement(t, e) {
|
@@ -840,11 +840,11 @@ let wt = class ve {
|
|
840
840
|
}
|
841
841
|
};
|
842
842
|
function R(r, t, e = r, i) {
|
843
|
-
var
|
843
|
+
var o, a;
|
844
844
|
if (t === I) return t;
|
845
|
-
let s = i !== void 0 ? (
|
846
|
-
const
|
847
|
-
return (s == null ? void 0 : s.constructor) !==
|
845
|
+
let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
846
|
+
const n = F(t) ? void 0 : t._$litDirective$;
|
847
|
+
return (s == null ? void 0 : s.constructor) !== n && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), n === void 0 ? s = void 0 : (s = new n(r), s._$AT(r, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = s : e._$Cl = s), s !== void 0 && (t = R(r, s._$AS(r, t.values), s, i)), t;
|
848
848
|
}
|
849
849
|
class Ge {
|
850
850
|
constructor(t, e) {
|
@@ -859,13 +859,13 @@ class Ge {
|
|
859
859
|
u(t) {
|
860
860
|
const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? O).importNode(e, !0);
|
861
861
|
P.currentNode = s;
|
862
|
-
let
|
862
|
+
let n = P.nextNode(), o = 0, a = 0, c = i[0];
|
863
863
|
for (; c !== void 0; ) {
|
864
|
-
if (
|
864
|
+
if (o === c.index) {
|
865
865
|
let l;
|
866
|
-
c.type === 2 ? l = new q(
|
866
|
+
c.type === 2 ? l = new q(n, n.nextSibling, this, t) : c.type === 1 ? l = new c.ctor(n, c.name, c.strings, this, t) : c.type === 6 && (l = new ti(n, this, t)), this._$AV.push(l), c = i[++a];
|
867
867
|
}
|
868
|
-
|
868
|
+
o !== (c == null ? void 0 : c.index) && (n = P.nextNode(), o++);
|
869
869
|
}
|
870
870
|
return P.currentNode = O, s;
|
871
871
|
}
|
@@ -894,7 +894,7 @@ class q {
|
|
894
894
|
return this._$AB;
|
895
895
|
}
|
896
896
|
_$AI(t, e = this) {
|
897
|
-
t = R(this, t, e),
|
897
|
+
t = R(this, t, e), F(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== I && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : qe(t) ? this.k(t) : this._(t);
|
898
898
|
}
|
899
899
|
O(t) {
|
900
900
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
@@ -903,15 +903,15 @@ class q {
|
|
903
903
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
904
904
|
}
|
905
905
|
_(t) {
|
906
|
-
this._$AH !== p &&
|
906
|
+
this._$AH !== p && F(this._$AH) ? this._$AA.nextSibling.data = t : this.T(O.createTextNode(t)), this._$AH = t;
|
907
907
|
}
|
908
908
|
$(t) {
|
909
|
-
var
|
909
|
+
var n;
|
910
910
|
const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = wt.createElement(me(i.h, i.h[0]), this.options)), i);
|
911
|
-
if (((
|
911
|
+
if (((n = this._$AH) == null ? void 0 : n._$AD) === s) this._$AH.p(e);
|
912
912
|
else {
|
913
|
-
const
|
914
|
-
|
913
|
+
const o = new Ge(s, this), a = o.u(this.options);
|
914
|
+
o.p(e), this.T(a), this._$AH = o;
|
915
915
|
}
|
916
916
|
}
|
917
917
|
_$AC(t) {
|
@@ -922,7 +922,7 @@ class q {
|
|
922
922
|
Et(this._$AH) || (this._$AH = [], this._$AR());
|
923
923
|
const e = this._$AH;
|
924
924
|
let i, s = 0;
|
925
|
-
for (const
|
925
|
+
for (const n of t) s === e.length ? e.push(i = new q(this.O(z()), this.O(z()), this, this.options)) : i = e[s], i._$AI(n), s++;
|
926
926
|
s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
|
927
927
|
}
|
928
928
|
_$AR(t = this._$AA.nextSibling, e) {
|
@@ -937,32 +937,32 @@ class q {
|
|
937
937
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
938
938
|
}
|
939
939
|
}
|
940
|
-
class
|
940
|
+
class nt {
|
941
941
|
get tagName() {
|
942
942
|
return this.element.tagName;
|
943
943
|
}
|
944
944
|
get _$AU() {
|
945
945
|
return this._$AM._$AU;
|
946
946
|
}
|
947
|
-
constructor(t, e, i, s,
|
948
|
-
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options =
|
947
|
+
constructor(t, e, i, s, n) {
|
948
|
+
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = p;
|
949
949
|
}
|
950
950
|
_$AI(t, e = this, i, s) {
|
951
|
-
const
|
952
|
-
let
|
953
|
-
if (
|
951
|
+
const n = this.strings;
|
952
|
+
let o = !1;
|
953
|
+
if (n === void 0) t = R(this, t, e, 0), o = !F(t) || t !== this._$AH && t !== I, o && (this._$AH = t);
|
954
954
|
else {
|
955
955
|
const a = t;
|
956
956
|
let c, l;
|
957
|
-
for (t =
|
957
|
+
for (t = n[0], c = 0; c < n.length - 1; c++) l = R(this, a[i + c], e, c), l === I && (l = this._$AH[c]), o || (o = !F(l) || l !== this._$AH[c]), l === p ? t = p : t !== p && (t += (l ?? "") + n[c + 1]), this._$AH[c] = l;
|
958
958
|
}
|
959
|
-
|
959
|
+
o && !s && this.j(t);
|
960
960
|
}
|
961
961
|
j(t) {
|
962
962
|
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
963
963
|
}
|
964
964
|
}
|
965
|
-
class Je extends
|
965
|
+
class Je extends nt {
|
966
966
|
constructor() {
|
967
967
|
super(...arguments), this.type = 3;
|
968
968
|
}
|
@@ -970,7 +970,7 @@ class Je extends ot {
|
|
970
970
|
this.element[this.name] = t === p ? void 0 : t;
|
971
971
|
}
|
972
972
|
}
|
973
|
-
class Xe extends
|
973
|
+
class Xe extends nt {
|
974
974
|
constructor() {
|
975
975
|
super(...arguments), this.type = 4;
|
976
976
|
}
|
@@ -978,14 +978,14 @@ class Xe extends ot {
|
|
978
978
|
this.element.toggleAttribute(this.name, !!t && t !== p);
|
979
979
|
}
|
980
980
|
}
|
981
|
-
class Qe extends
|
982
|
-
constructor(t, e, i, s,
|
983
|
-
super(t, e, i, s,
|
981
|
+
class Qe extends nt {
|
982
|
+
constructor(t, e, i, s, n) {
|
983
|
+
super(t, e, i, s, n), this.type = 5;
|
984
984
|
}
|
985
985
|
_$AI(t, e = this) {
|
986
986
|
if ((t = R(this, t, e, 0) ?? p) === I) return;
|
987
|
-
const i = this._$AH, s = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive,
|
988
|
-
s && this.element.removeEventListener(this.name, this, i),
|
987
|
+
const i = this._$AH, s = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== p && (i === p || s);
|
988
|
+
s && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
989
989
|
}
|
990
990
|
handleEvent(t) {
|
991
991
|
var e;
|
@@ -1003,14 +1003,14 @@ class ti {
|
|
1003
1003
|
R(this, t);
|
1004
1004
|
}
|
1005
1005
|
}
|
1006
|
-
const ht =
|
1007
|
-
ht == null || ht(wt, q), (
|
1006
|
+
const ht = B.litHtmlPolyfillSupport;
|
1007
|
+
ht == null || ht(wt, q), (B.litHtmlVersions ?? (B.litHtmlVersions = [])).push("3.2.1");
|
1008
1008
|
const ei = (r, t, e) => {
|
1009
1009
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
1010
1010
|
let s = i._$litPart$;
|
1011
1011
|
if (s === void 0) {
|
1012
|
-
const
|
1013
|
-
i._$litPart$ = s = new q(t.insertBefore(
|
1012
|
+
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
1013
|
+
i._$litPart$ = s = new q(t.insertBefore(z(), n), n, void 0, e ?? {});
|
1014
1014
|
}
|
1015
1015
|
return s._$AI(r), s;
|
1016
1016
|
};
|
@@ -1019,7 +1019,7 @@ const ei = (r, t, e) => {
|
|
1019
1019
|
* Copyright 2017 Google LLC
|
1020
1020
|
* SPDX-License-Identifier: BSD-3-Clause
|
1021
1021
|
*/
|
1022
|
-
let
|
1022
|
+
let A = class extends k {
|
1023
1023
|
constructor() {
|
1024
1024
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
1025
1025
|
}
|
@@ -1044,10 +1044,10 @@ let x = class extends k {
|
|
1044
1044
|
return I;
|
1045
1045
|
}
|
1046
1046
|
};
|
1047
|
-
var
|
1048
|
-
|
1047
|
+
var oe;
|
1048
|
+
A._$litElement$ = !0, A.finalized = !0, (oe = globalThis.litElementHydrateSupport) == null || oe.call(globalThis, { LitElement: A });
|
1049
1049
|
const lt = globalThis.litElementPolyfillSupport;
|
1050
|
-
lt == null || lt({ LitElement:
|
1050
|
+
lt == null || lt({ LitElement: A });
|
1051
1051
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
1052
1052
|
/**
|
1053
1053
|
* @license
|
@@ -1056,29 +1056,29 @@ lt == null || lt({ LitElement: x });
|
|
1056
1056
|
*/
|
1057
1057
|
const ii = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: St }, si = (r = ii, t, e) => {
|
1058
1058
|
const { kind: i, metadata: s } = e;
|
1059
|
-
let
|
1060
|
-
if (
|
1061
|
-
const { name:
|
1059
|
+
let n = globalThis.litPropertyMetadata.get(s);
|
1060
|
+
if (n === void 0 && globalThis.litPropertyMetadata.set(s, n = /* @__PURE__ */ new Map()), n.set(e.name, r), i === "accessor") {
|
1061
|
+
const { name: o } = e;
|
1062
1062
|
return { set(a) {
|
1063
1063
|
const c = t.get.call(this);
|
1064
|
-
t.set.call(this, a), this.requestUpdate(
|
1064
|
+
t.set.call(this, a), this.requestUpdate(o, c, r);
|
1065
1065
|
}, init(a) {
|
1066
|
-
return a !== void 0 && this.P(
|
1066
|
+
return a !== void 0 && this.P(o, void 0, r), a;
|
1067
1067
|
} };
|
1068
1068
|
}
|
1069
1069
|
if (i === "setter") {
|
1070
|
-
const { name:
|
1070
|
+
const { name: o } = e;
|
1071
1071
|
return function(a) {
|
1072
|
-
const c = this[
|
1073
|
-
t.call(this, a), this.requestUpdate(
|
1072
|
+
const c = this[o];
|
1073
|
+
t.call(this, a), this.requestUpdate(o, c, r);
|
1074
1074
|
};
|
1075
1075
|
}
|
1076
1076
|
throw Error("Unsupported decorator location: " + i);
|
1077
1077
|
};
|
1078
1078
|
function m(r) {
|
1079
|
-
return (t, e) => typeof e == "object" ? si(r, t, e) : ((i, s,
|
1080
|
-
const
|
1081
|
-
return s.constructor.createProperty(
|
1079
|
+
return (t, e) => typeof e == "object" ? si(r, t, e) : ((i, s, n) => {
|
1080
|
+
const o = s.hasOwnProperty(n);
|
1081
|
+
return s.constructor.createProperty(n, o ? { ...i, wrapped: !0 } : i), o ? Object.getOwnPropertyDescriptor(s, n) : void 0;
|
1082
1082
|
})(r, t, e);
|
1083
1083
|
}
|
1084
1084
|
/**
|
@@ -1089,12 +1089,12 @@ function m(r) {
|
|
1089
1089
|
function L(r) {
|
1090
1090
|
return m({ ...r, state: !0, attribute: !1 });
|
1091
1091
|
}
|
1092
|
-
var ri = Object.defineProperty,
|
1093
|
-
for (var s = void 0,
|
1094
|
-
(
|
1092
|
+
var ri = Object.defineProperty, ni = (r, t, e, i) => {
|
1093
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
1094
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
1095
1095
|
return s && ri(t, e, s), s;
|
1096
1096
|
};
|
1097
|
-
const kt = class kt extends
|
1097
|
+
const kt = class kt extends A {
|
1098
1098
|
constructor() {
|
1099
1099
|
super(...arguments), this.anchor = "BottomRight";
|
1100
1100
|
}
|
@@ -1126,7 +1126,7 @@ kt.styles = [
|
|
1126
1126
|
`
|
1127
1127
|
];
|
1128
1128
|
let V = kt;
|
1129
|
-
|
1129
|
+
ni([
|
1130
1130
|
m({ attribute: !0 })
|
1131
1131
|
], V.prototype, "anchor");
|
1132
1132
|
/**
|
@@ -1156,17 +1156,17 @@ let ye = class {
|
|
1156
1156
|
* Copyright 2020 Google LLC
|
1157
1157
|
* SPDX-License-Identifier: BSD-3-Clause
|
1158
1158
|
*/
|
1159
|
-
const
|
1159
|
+
const oi = (r) => r.strings === void 0;
|
1160
1160
|
/**
|
1161
1161
|
* @license
|
1162
1162
|
* Copyright 2017 Google LLC
|
1163
1163
|
* SPDX-License-Identifier: BSD-3-Clause
|
1164
1164
|
*/
|
1165
|
-
const
|
1165
|
+
const D = (r, t) => {
|
1166
1166
|
var i;
|
1167
1167
|
const e = r._$AN;
|
1168
1168
|
if (e === void 0) return !1;
|
1169
|
-
for (const s of e) (i = s._$AO) == null || i.call(s, t, !1),
|
1169
|
+
for (const s of e) (i = s._$AO) == null || i.call(s, t, !1), D(s, t);
|
1170
1170
|
return !0;
|
1171
1171
|
}, tt = (r) => {
|
1172
1172
|
let t, e;
|
@@ -1187,9 +1187,9 @@ function ai(r) {
|
|
1187
1187
|
}
|
1188
1188
|
function ci(r, t = !1, e = 0) {
|
1189
1189
|
const i = this._$AH, s = this._$AN;
|
1190
|
-
if (s !== void 0 && s.size !== 0) if (t) if (Array.isArray(i)) for (let
|
1191
|
-
else i != null && (
|
1192
|
-
else
|
1190
|
+
if (s !== void 0 && s.size !== 0) if (t) if (Array.isArray(i)) for (let n = e; n < i.length; n++) D(i[n], !1), tt(i[n]);
|
1191
|
+
else i != null && (D(i, !1), tt(i));
|
1192
|
+
else D(this, r);
|
1193
1193
|
}
|
1194
1194
|
const hi = (r) => {
|
1195
1195
|
r.type == Pt.CHILD && (r._$AP ?? (r._$AP = ci), r._$AQ ?? (r._$AQ = ai));
|
@@ -1203,10 +1203,10 @@ class we extends ye {
|
|
1203
1203
|
}
|
1204
1204
|
_$AO(t, e = !0) {
|
1205
1205
|
var i, s;
|
1206
|
-
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (s = this.disconnected) == null || s.call(this)), e && (
|
1206
|
+
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (s = this.disconnected) == null || s.call(this)), e && (D(this, t), tt(this));
|
1207
1207
|
}
|
1208
1208
|
setValue(t) {
|
1209
|
-
if (
|
1209
|
+
if (oi(this._$Ct)) this._$Ct._$AI(t, this);
|
1210
1210
|
else {
|
1211
1211
|
const e = [...this._$Ct._$AH];
|
1212
1212
|
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
@@ -1270,7 +1270,7 @@ class fi extends we {
|
|
1270
1270
|
update(t, [e]) {
|
1271
1271
|
var s;
|
1272
1272
|
const i = this.u === void 0;
|
1273
|
-
return i && (this.u = (s = t.options) == null ? void 0 : s.host, this.u.addController(this), this.u.updateComplete.then((
|
1273
|
+
return i && (this.u = (s = t.options) == null ? void 0 : s.host, this.u.addController(this), this.u.updateComplete.then((n) => this.t = !0), this.element = t.element, se.set(this.element, this)), this.optionsOrCallback = e, (i || typeof e != "function") && this.p(e), this.render(e);
|
1274
1274
|
}
|
1275
1275
|
p(t) {
|
1276
1276
|
t = t ?? {};
|
@@ -1280,15 +1280,15 @@ class fi extends we {
|
|
1280
1280
|
m() {
|
1281
1281
|
const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
|
1282
1282
|
return this.options.properties.forEach((s) => {
|
1283
|
-
const
|
1284
|
-
t[s] = isNaN(
|
1283
|
+
const n = e[s] ?? (ut[s] ? void 0 : i[s]), o = Number(n);
|
1284
|
+
t[s] = isNaN(o) ? n + "" : o;
|
1285
1285
|
}), t;
|
1286
1286
|
}
|
1287
1287
|
v() {
|
1288
1288
|
let t, e = !0;
|
1289
1289
|
return this.options.guard && (t = this.options.guard(), e = ((i, s) => {
|
1290
1290
|
if (Array.isArray(i)) {
|
1291
|
-
if (Array.isArray(s) && s.length === i.length && i.every((
|
1291
|
+
if (Array.isArray(s) && s.length === i.length && i.every((n, o) => n === s[o])) return !1;
|
1292
1292
|
} else if (s === i) return !1;
|
1293
1293
|
return !0;
|
1294
1294
|
})(t, this._)), this.h = this.t && !this.isDisabled() && !this.isAnimating() && e && this.element.isConnected, this.h && (this._ = Array.isArray(t) ? Array.from(t) : t), this.h;
|
@@ -1302,14 +1302,14 @@ class fi extends we {
|
|
1302
1302
|
this.prepare(), await te;
|
1303
1303
|
const e = this.O(), i = this.j(this.options.keyframeOptions, e), s = this.m();
|
1304
1304
|
if (this.A !== void 0) {
|
1305
|
-
const { from:
|
1306
|
-
this.log("measured", [this.A, s,
|
1305
|
+
const { from: n, to: o } = this.N(this.A, s, e);
|
1306
|
+
this.log("measured", [this.A, s, n, o]), t = this.calculateKeyframes(n, o);
|
1307
1307
|
} else {
|
1308
|
-
const
|
1309
|
-
if (
|
1308
|
+
const n = dt.get(this.options.inId);
|
1309
|
+
if (n) {
|
1310
1310
|
dt.delete(this.options.inId);
|
1311
|
-
const { from:
|
1312
|
-
t = this.calculateKeyframes(
|
1311
|
+
const { from: o, to: a } = this.N(n, s, e);
|
1312
|
+
t = this.calculateKeyframes(o, a), t = this.options.in ? [{ ...this.options.in[0], ...t[0] }, ...this.options.in.slice(1), t[1]] : t, Xt++, t.forEach((c) => c.zIndex = Xt);
|
1313
1313
|
} else this.options.in && (t = [...this.options.in, {}]);
|
1314
1314
|
}
|
1315
1315
|
this.animate(t, i);
|
@@ -1331,8 +1331,8 @@ class fi extends we {
|
|
1331
1331
|
if (this.i.insertBefore(this.element, i), this.options.stabilizeOut) {
|
1332
1332
|
const s = this.m();
|
1333
1333
|
this.log("stabilizing out");
|
1334
|
-
const
|
1335
|
-
getComputedStyle(this.element).position !== "static" ||
|
1334
|
+
const n = this.A.left - s.left, o = this.A.top - s.top;
|
1335
|
+
getComputedStyle(this.element).position !== "static" || n === 0 && o === 0 || (this.element.style.position = "relative"), n !== 0 && (this.element.style.left = n + "px"), o !== 0 && (this.element.style.top = o + "px");
|
1336
1336
|
}
|
1337
1337
|
}
|
1338
1338
|
const t = this.j(this.options.keyframeOptions);
|
@@ -1370,14 +1370,14 @@ class fi extends we {
|
|
1370
1370
|
N(t, e, i) {
|
1371
1371
|
t = { ...t }, e = { ...e };
|
1372
1372
|
const s = i.map((a) => a.animatingProperties).filter((a) => a !== void 0);
|
1373
|
-
let
|
1373
|
+
let n = 1, o = 1;
|
1374
1374
|
return s.length > 0 && (s.forEach((a) => {
|
1375
|
-
a.width && (
|
1376
|
-
}), t.left !== void 0 && e.left !== void 0 && (t.left =
|
1375
|
+
a.width && (n /= a.width), a.height && (o /= a.height);
|
1376
|
+
}), t.left !== void 0 && e.left !== void 0 && (t.left = n * t.left, e.left = n * e.left), t.top !== void 0 && e.top !== void 0 && (t.top = o * t.top, e.top = o * e.top)), { from: t, to: e };
|
1377
1377
|
}
|
1378
1378
|
calculateKeyframes(t, e, i = !1) {
|
1379
|
-
const s = {},
|
1380
|
-
let
|
1379
|
+
const s = {}, n = {};
|
1380
|
+
let o = !1;
|
1381
1381
|
const a = {};
|
1382
1382
|
for (const c in e) {
|
1383
1383
|
const l = t[c], h = e[c];
|
@@ -1385,10 +1385,10 @@ class fi extends we {
|
|
1385
1385
|
const d = ut[c];
|
1386
1386
|
if (l === void 0 || h === void 0) continue;
|
1387
1387
|
const u = d(l, h);
|
1388
|
-
u.transform !== void 0 && (a[c] = u.value,
|
1389
|
-
} else l !== h && l !== void 0 && h !== void 0 && (
|
1388
|
+
u.transform !== void 0 && (a[c] = u.value, o = !0, s.transform = `${s.transform ?? ""} ${u.transform}`, u.overrideFrom !== void 0 && Object.assign(s, u.overrideFrom));
|
1389
|
+
} else l !== h && l !== void 0 && h !== void 0 && (o = !0, s[c] = l, n[c] = h);
|
1390
1390
|
}
|
1391
|
-
return s.transformOrigin =
|
1391
|
+
return s.transformOrigin = n.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, o ? [s, n] : void 0;
|
1392
1392
|
}
|
1393
1393
|
async animate(t, e = this.options.keyframeOptions) {
|
1394
1394
|
this.start(), this.frames = t;
|
@@ -1430,22 +1430,22 @@ const re = Ot(class extends ye {
|
|
1430
1430
|
update(r, [t]) {
|
1431
1431
|
var i, s;
|
1432
1432
|
if (this.st === void 0) {
|
1433
|
-
this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter((
|
1434
|
-
for (const
|
1433
|
+
this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter((n) => n !== "")));
|
1434
|
+
for (const n in t) t[n] && !((i = this.nt) != null && i.has(n)) && this.st.add(n);
|
1435
1435
|
return this.render(t);
|
1436
1436
|
}
|
1437
1437
|
const e = r.element.classList;
|
1438
|
-
for (const
|
1439
|
-
for (const
|
1440
|
-
const
|
1441
|
-
|
1438
|
+
for (const n of this.st) n in t || (e.remove(n), this.st.delete(n));
|
1439
|
+
for (const n in t) {
|
1440
|
+
const o = !!t[n];
|
1441
|
+
o === this.st.has(n) || (s = this.nt) != null && s.has(n) || (o ? (e.add(n), this.st.add(n)) : (e.remove(n), this.st.delete(n)));
|
1442
1442
|
}
|
1443
1443
|
return I;
|
1444
1444
|
}
|
1445
1445
|
}), w = (r, t, e) => {
|
1446
1446
|
r && e.style.setProperty(t, r);
|
1447
1447
|
}, $e = (r, t) => {
|
1448
|
-
var e, i, s,
|
1448
|
+
var e, i, s, n, o, a, c, l, h;
|
1449
1449
|
w((e = r.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), w(
|
1450
1450
|
(i = r.colors) == null ? void 0 : i.textOnPrimaryBackground,
|
1451
1451
|
"--text-on-primary-background",
|
@@ -1455,11 +1455,11 @@ const re = Ot(class extends ye {
|
|
1455
1455
|
"--secondary-background",
|
1456
1456
|
t
|
1457
1457
|
), w(
|
1458
|
-
(
|
1458
|
+
(n = r.colors) == null ? void 0 : n.textOnSecondaryBackground,
|
1459
1459
|
"--text-on-secondary-background",
|
1460
1460
|
t
|
1461
1461
|
), w(
|
1462
|
-
(
|
1462
|
+
(o = r.colors) == null ? void 0 : o.interactiveDestructiveBackground,
|
1463
1463
|
"--destructive-color",
|
1464
1464
|
t
|
1465
1465
|
), w(
|
@@ -1484,7 +1484,7 @@ const re = Ot(class extends ye {
|
|
1484
1484
|
const _e = () => new vi();
|
1485
1485
|
class vi {
|
1486
1486
|
}
|
1487
|
-
const pt = /* @__PURE__ */ new WeakMap(),
|
1487
|
+
const pt = /* @__PURE__ */ new WeakMap(), Ae = Ot(class extends we {
|
1488
1488
|
render(r) {
|
1489
1489
|
return p;
|
1490
1490
|
}
|
@@ -1512,13 +1512,13 @@ const pt = /* @__PURE__ */ new WeakMap(), xe = Ot(class extends we {
|
|
1512
1512
|
}
|
1513
1513
|
});
|
1514
1514
|
var yi = Object.defineProperty, K = (r, t, e, i) => {
|
1515
|
-
for (var s = void 0,
|
1516
|
-
(
|
1515
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
1516
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
1517
1517
|
return s && yi(t, e, s), s;
|
1518
1518
|
};
|
1519
|
-
const Tt = class Tt extends
|
1519
|
+
const Tt = class Tt extends A {
|
1520
1520
|
constructor() {
|
1521
|
-
super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = _e(), this.widgetActive$ = new
|
1521
|
+
super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = _e(), this.widgetActive$ = new At(!1), this.componentIsDestroyed$ = new _t();
|
1522
1522
|
}
|
1523
1523
|
async connectedCallback() {
|
1524
1524
|
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
|
@@ -1563,8 +1563,8 @@ const Tt = class Tt extends x {
|
|
1563
1563
|
const i = (l = this.application) == null ? void 0 : l.triggerIcon;
|
1564
1564
|
if (!i)
|
1565
1565
|
return p;
|
1566
|
-
const s = async (h) => mi, { type:
|
1567
|
-
switch (
|
1566
|
+
const s = async (h) => mi, { type: n, content: o } = i;
|
1567
|
+
switch (n) {
|
1568
1568
|
case "Telia": {
|
1569
1569
|
const h = await s();
|
1570
1570
|
return h ? T`<telia-icon
|
@@ -1590,7 +1590,7 @@ const Tt = class Tt extends x {
|
|
1590
1590
|
"trigger-container": !0,
|
1591
1591
|
hidden: !this.triggerVisible
|
1592
1592
|
})}
|
1593
|
-
${
|
1593
|
+
${Ae(this.containerRef)}
|
1594
1594
|
>
|
1595
1595
|
${!this.active && ((s = (i = (e = (t = this.application) == null ? void 0 : t.settings) == null ? void 0 : e.branding) == null ? void 0 : i.other) != null && s.showButtonLabel) ? T`
|
1596
1596
|
<button
|
@@ -1798,8 +1798,8 @@ K([
|
|
1798
1798
|
L()
|
1799
1799
|
], b.prototype, "icon");
|
1800
1800
|
var bi = Object.defineProperty, E = (r, t, e, i) => {
|
1801
|
-
for (var s = void 0,
|
1802
|
-
(
|
1801
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
1802
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
1803
1803
|
return s && bi(t, e, s), s;
|
1804
1804
|
};
|
1805
1805
|
const wi = (r) => {
|
@@ -1858,7 +1858,7 @@ const wi = (r) => {
|
|
1858
1858
|
], t.prototype, "application"), E([
|
1859
1859
|
m({ attribute: !1 })
|
1860
1860
|
], t.prototype, "parent"), t;
|
1861
|
-
}, Rt = class Rt extends wi(
|
1861
|
+
}, Rt = class Rt extends wi(A) {
|
1862
1862
|
render() {
|
1863
1863
|
return T`Non resolved component`;
|
1864
1864
|
}
|
@@ -1903,7 +1903,7 @@ let _i = class extends Event {
|
|
1903
1903
|
* Copyright 2021 Google LLC
|
1904
1904
|
* SPDX-License-Identifier: BSD-3-Clause
|
1905
1905
|
*/
|
1906
|
-
class
|
1906
|
+
class Ai {
|
1907
1907
|
get value() {
|
1908
1908
|
return this.o;
|
1909
1909
|
}
|
@@ -1936,30 +1936,30 @@ class xi {
|
|
1936
1936
|
* Copyright 2021 Google LLC
|
1937
1937
|
* SPDX-License-Identifier: BSD-3-Clause
|
1938
1938
|
*/
|
1939
|
-
let
|
1939
|
+
let xi = class extends Event {
|
1940
1940
|
constructor(t, e) {
|
1941
1941
|
super("context-provider", { bubbles: !0, composed: !0 }), this.context = t, this.contextTarget = e;
|
1942
1942
|
}
|
1943
1943
|
};
|
1944
|
-
class
|
1944
|
+
class ne extends Ai {
|
1945
1945
|
constructor(t, e, i) {
|
1946
|
-
var s,
|
1947
|
-
super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (
|
1948
|
-
if (
|
1949
|
-
const a =
|
1950
|
-
a !== this.host && (
|
1951
|
-
}, this.onProviderRequest = (
|
1952
|
-
if (
|
1946
|
+
var s, n;
|
1947
|
+
super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (o) => {
|
1948
|
+
if (o.context !== this.context) return;
|
1949
|
+
const a = o.contextTarget ?? o.composedPath()[0];
|
1950
|
+
a !== this.host && (o.stopPropagation(), this.addCallback(o.callback, a, o.subscribe));
|
1951
|
+
}, this.onProviderRequest = (o) => {
|
1952
|
+
if (o.context !== this.context || (o.contextTarget ?? o.composedPath()[0]) === this.host) return;
|
1953
1953
|
const a = /* @__PURE__ */ new Set();
|
1954
1954
|
for (const [c, { consumerHost: l }] of this.subscriptions) a.has(c) || (a.add(c), l.dispatchEvent(new _i(this.context, l, c, !0)));
|
1955
|
-
|
1956
|
-
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (
|
1955
|
+
o.stopPropagation();
|
1956
|
+
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (n = (s = this.host).addController) == null || n.call(s, this);
|
1957
1957
|
}
|
1958
1958
|
attachListeners() {
|
1959
1959
|
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
1960
1960
|
}
|
1961
1961
|
hostConnected() {
|
1962
|
-
this.host.dispatchEvent(new
|
1962
|
+
this.host.dispatchEvent(new xi(this.context, this.host));
|
1963
1963
|
}
|
1964
1964
|
}
|
1965
1965
|
/**
|
@@ -1971,47 +1971,47 @@ function Ci({ context: r }) {
|
|
1971
1971
|
return (t, e) => {
|
1972
1972
|
const i = /* @__PURE__ */ new WeakMap();
|
1973
1973
|
if (typeof e == "object") return e.addInitializer(function() {
|
1974
|
-
i.set(this, new
|
1974
|
+
i.set(this, new ne(this, { context: r }));
|
1975
1975
|
}), { get() {
|
1976
1976
|
return t.get.call(this);
|
1977
1977
|
}, set(s) {
|
1978
|
-
var
|
1979
|
-
return (
|
1978
|
+
var n;
|
1979
|
+
return (n = i.get(this)) == null || n.setValue(s), t.set.call(this, s);
|
1980
1980
|
}, init(s) {
|
1981
|
-
var
|
1982
|
-
return (
|
1981
|
+
var n;
|
1982
|
+
return (n = i.get(this)) == null || n.setValue(s), s;
|
1983
1983
|
} };
|
1984
1984
|
{
|
1985
|
-
t.constructor.addInitializer((
|
1986
|
-
i.set(
|
1985
|
+
t.constructor.addInitializer((o) => {
|
1986
|
+
i.set(o, new ne(o, { context: r }));
|
1987
1987
|
});
|
1988
1988
|
const s = Object.getOwnPropertyDescriptor(t, e);
|
1989
|
-
let
|
1989
|
+
let n;
|
1990
1990
|
if (s === void 0) {
|
1991
|
-
const
|
1992
|
-
|
1993
|
-
return
|
1991
|
+
const o = /* @__PURE__ */ new WeakMap();
|
1992
|
+
n = { get() {
|
1993
|
+
return o.get(this);
|
1994
1994
|
}, set(a) {
|
1995
|
-
i.get(this).setValue(a),
|
1995
|
+
i.get(this).setValue(a), o.set(this, a);
|
1996
1996
|
}, configurable: !0, enumerable: !0 };
|
1997
1997
|
} else {
|
1998
|
-
const
|
1999
|
-
|
2000
|
-
i.get(this).setValue(a),
|
1998
|
+
const o = s.set;
|
1999
|
+
n = { ...s, set(a) {
|
2000
|
+
i.get(this).setValue(a), o == null || o.call(this, a);
|
2001
2001
|
} };
|
2002
2002
|
}
|
2003
|
-
return void Object.defineProperty(t, e,
|
2003
|
+
return void Object.defineProperty(t, e, n);
|
2004
2004
|
}
|
2005
2005
|
};
|
2006
2006
|
}
|
2007
|
-
var Si = Object.defineProperty,
|
2008
|
-
for (var s = void 0,
|
2009
|
-
(
|
2007
|
+
var Si = Object.defineProperty, xe = (r, t, e, i) => {
|
2008
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
2009
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
2010
2010
|
return s && Si(t, e, s), s;
|
2011
2011
|
};
|
2012
|
-
const Ei = "application", Nt = class Nt extends
|
2012
|
+
const Ei = "application", Nt = class Nt extends A {
|
2013
2013
|
constructor() {
|
2014
|
-
super(...arguments), this.nodes = [], this.wrapperRef = _e(), this.fullscreen = !1, this.isReady = new
|
2014
|
+
super(...arguments), this.nodes = [], this.wrapperRef = _e(), this.fullscreen = !1, this.isReady = new At(!1);
|
2015
2015
|
}
|
2016
2016
|
addChild(t) {
|
2017
2017
|
t.parent = this, this.nodes.push(t);
|
@@ -2036,8 +2036,8 @@ const Ei = "application", Nt = class Nt extends x {
|
|
2036
2036
|
render() {
|
2037
2037
|
var i, s;
|
2038
2038
|
const t = this.application.settings.components.conversation;
|
2039
|
-
return ((s = (i = t == null ? void 0 : t.properties) == null ? void 0 : i.chat) == null ? void 0 : s.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === $.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), this.application.fullscreen && this.renderRoot.host.classList.add("fullscreen"), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), T`<div class="widget-container" ${
|
2040
|
-
${$i(this.nodes, (
|
2039
|
+
return ((s = (i = t == null ? void 0 : t.properties) == null ? void 0 : i.chat) == null ? void 0 : s.isThirdPartyWidget) ? this.renderRoot.host.classList.add("third-party") : this.application.renderStrategy === $.Trigger && (this.renderRoot.host.classList.add("floating"), this.application.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.application.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right")), this.application.fullscreen && this.renderRoot.host.classList.add("fullscreen"), window.self !== window.top && this.renderRoot.host.classList.add("embedded"), T`<div class="widget-container" ${Ae(this.wrapperRef)}>
|
2040
|
+
${$i(this.nodes, (n) => n)}
|
2041
2041
|
</div>`;
|
2042
2042
|
}
|
2043
2043
|
};
|
@@ -2057,20 +2057,7 @@ Nt.styles = U`
|
|
2057
2057
|
--gray-color: #f3f3f8;
|
2058
2058
|
--white-color: #fff;
|
2059
2059
|
--gray-dark-color: #a6a6a6;
|
2060
|
-
|
2061
|
-
--text-weak: #00000070;
|
2062
|
-
--text-medium: #0000009E;
|
2063
|
-
--text-default: #000000CC
|
2064
|
-
--text-weak-negative: #FFFFFF5E;
|
2065
|
-
--text-medium-negative: #FFFFFFA8;
|
2066
|
-
--text-default-negative: #FFFFFFF2;
|
2067
|
-
|
2068
|
-
--border-color-weak: #00000029;
|
2069
|
-
--border-color-medium: #00000054;
|
2070
|
-
--border-color-strong: #0000008a;
|
2071
|
-
--border-color-weak-negative: #ffffff29;
|
2072
|
-
--border-color-medium-negative: #ffffff54;
|
2073
|
-
--border-color-strong-negative: #ffffff8a;
|
2060
|
+
--black-border-color: #00000054;
|
2074
2061
|
|
2075
2062
|
--box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
2076
2063
|
--border-radius: var(--spacing-sm);
|
@@ -2208,10 +2195,10 @@ Nt.styles = U`
|
|
2208
2195
|
}
|
2209
2196
|
`;
|
2210
2197
|
let N = Nt;
|
2211
|
-
|
2198
|
+
xe([
|
2212
2199
|
m({ attribute: !0 })
|
2213
2200
|
], N.prototype, "fullscreen");
|
2214
|
-
|
2201
|
+
xe([
|
2215
2202
|
m({ attribute: !1 }),
|
2216
2203
|
Ci({ context: Ei })
|
2217
2204
|
], N.prototype, "application");
|
@@ -2251,8 +2238,8 @@ class Pi {
|
|
2251
2238
|
// views
|
2252
2239
|
));
|
2253
2240
|
});
|
2254
|
-
}, { entry:
|
2255
|
-
return s(this, this.root, [
|
2241
|
+
}, { entry: n, components: o } = t;
|
2242
|
+
return s(this, this.root, [n], o), this.root;
|
2256
2243
|
}
|
2257
2244
|
createRoot() {
|
2258
2245
|
return typeof window < "u" && (window.customElements.get("ace-wrapper") || window.customElements.define("ace-wrapper", N)), document.createElement("ace-wrapper");
|
@@ -2313,8 +2300,8 @@ class Oi {
|
|
2313
2300
|
}
|
2314
2301
|
const s = i.category;
|
2315
2302
|
if (this.policy[s]) {
|
2316
|
-
const
|
2317
|
-
this.storage.setItem(this._prefixKey(t), JSON.stringify(
|
2303
|
+
const n = { value: e, category: s };
|
2304
|
+
this.storage.setItem(this._prefixKey(t), JSON.stringify(n));
|
2318
2305
|
} else
|
2319
2306
|
console.warn(
|
2320
2307
|
`Storage policy does not allow storing items in category: ${s}`
|
@@ -2371,7 +2358,7 @@ class Ii {
|
|
2371
2358
|
return this.texts.get(t) || e;
|
2372
2359
|
}
|
2373
2360
|
}
|
2374
|
-
const ki = "
|
2361
|
+
const ki = "##__WIDGETS_VERSION__##";
|
2375
2362
|
class Ti {
|
2376
2363
|
constructor(t) {
|
2377
2364
|
this.widget = t, this.name = t.name;
|
@@ -2395,8 +2382,8 @@ class Ti {
|
|
2395
2382
|
}
|
2396
2383
|
}
|
2397
2384
|
class Ri {
|
2398
|
-
constructor(t, e, i, s,
|
2399
|
-
this.id = t, this.name = e, this.container = i, this.settings = s, this.options =
|
2385
|
+
constructor(t, e, i, s, n) {
|
2386
|
+
this.id = t, this.name = e, this.container = i, this.settings = s, this.options = n, this.platform = new Pi(), this.texts = new Ii(), this.renderStrategy = $.Inline, this.fullscreen = !1, this.anchor = "BottomRight", this.autoActivate = !1, this.plugins = [], this.componentResolver = new $t(), this.components = [], this.trigger = null, this.api = new Ti(this), this.onMessageReceived = async (a) => {
|
2400
2387
|
var l;
|
2401
2388
|
const c = a.data;
|
2402
2389
|
switch (c.type) {
|
@@ -2445,7 +2432,7 @@ class Ri {
|
|
2445
2432
|
return;
|
2446
2433
|
}
|
2447
2434
|
}, this.renderStrategy = this.options.renderStrategy || $.Inline, this.triggerIcon = this.options.triggerIcon;
|
2448
|
-
const
|
2435
|
+
const o = {
|
2449
2436
|
[y.Necessary]: !0,
|
2450
2437
|
[y.Functional]: !0,
|
2451
2438
|
[y.Analytics]: !0
|
@@ -2453,9 +2440,9 @@ class Ri {
|
|
2453
2440
|
this.storage = new Oi(
|
2454
2441
|
this.id,
|
2455
2442
|
"sessionStorage",
|
2456
|
-
|
2443
|
+
o,
|
2457
2444
|
this.settings.storage
|
2458
|
-
), typeof
|
2445
|
+
), typeof n.autoActivate == "boolean" && (this.autoActivate = n.autoActivate), n.anchor && (this.anchor = n.anchor), this.container.register("$settings", s), this.texts.loadTexts(s.texts || {}), window.addEventListener("message", this.onMessageReceived);
|
2459
2446
|
}
|
2460
2447
|
async activate() {
|
2461
2448
|
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(de.Ready), this.autoActivate) {
|
@@ -2556,13 +2543,13 @@ const Vi = (r) => new W(r), st = class st {
|
|
2556
2543
|
id: i.id,
|
2557
2544
|
triggers: i.triggers || [],
|
2558
2545
|
apps: (i.widgets || []).map((s) => {
|
2559
|
-
let
|
2560
|
-
s.renderStrategy.toLowerCase() === "inline" && (
|
2561
|
-
const
|
2546
|
+
let n = $.Trigger;
|
2547
|
+
s.renderStrategy.toLowerCase() === "inline" && (n = $.Inline);
|
2548
|
+
const o = s.widgetId ? s.widgetId : s.id, a = typeof s.autoActivate == "boolean" ? s.autoActivate : !1, c = typeof s.anchor == "string" ? s.anchor : "BottomRight", l = typeof s.triggerIcon == "string" ? s.triggerIcon : "question";
|
2562
2549
|
return {
|
2563
|
-
id:
|
2564
|
-
widgetId:
|
2565
|
-
renderStrategy:
|
2550
|
+
id: o,
|
2551
|
+
widgetId: o,
|
2552
|
+
renderStrategy: n,
|
2566
2553
|
autoActivate: a,
|
2567
2554
|
anchor: c,
|
2568
2555
|
triggerIcon: {
|
@@ -2591,12 +2578,12 @@ class Ni {
|
|
2591
2578
|
var i;
|
2592
2579
|
(((i = this.site.environment) == null ? void 0 : i.applications) || []).forEach((s) => {
|
2593
2580
|
if (s.storage) {
|
2594
|
-
const
|
2581
|
+
const n = {
|
2595
2582
|
[y.Analytics]: t.includes("analytics"),
|
2596
2583
|
[y.Necessary]: t.includes("necessary"),
|
2597
2584
|
[y.Functional]: t.includes("functional")
|
2598
2585
|
};
|
2599
|
-
s.storage.updatePolicy(
|
2586
|
+
s.storage.updatePolicy(n);
|
2600
2587
|
}
|
2601
2588
|
});
|
2602
2589
|
}
|
@@ -2609,7 +2596,7 @@ class Ni {
|
|
2609
2596
|
}
|
2610
2597
|
class Mi {
|
2611
2598
|
constructor() {
|
2612
|
-
this.applications = [], this.container = new
|
2599
|
+
this.applications = [], this.container = new Dt("environment", this), this.bootstrapped = !1, this.site = null, this.widgetAPIHandlers = /* @__PURE__ */ new Map(), this.siteConfigurationHandlers = [], setTimeout(() => {
|
2613
2600
|
this.notifyWidgetsOfCreation();
|
2614
2601
|
}, 1e3);
|
2615
2602
|
}
|
@@ -2629,13 +2616,13 @@ class Mi {
|
|
2629
2616
|
(i) => i.autoActivate
|
2630
2617
|
);
|
2631
2618
|
(((e = this.site) == null ? void 0 : e.triggers) || []).filter((i) => i.triggerType === "visit").forEach((i) => {
|
2632
|
-
const s = window.location.pathname,
|
2633
|
-
i.condition.type === "url" &&
|
2634
|
-
const a =
|
2635
|
-
if ((
|
2619
|
+
const s = window.location.pathname, n = i.condition.outputs || [];
|
2620
|
+
i.condition.type === "url" && n.forEach((o) => {
|
2621
|
+
const a = o.action.type === "render_widget";
|
2622
|
+
if ((o.value === s || o.value === "*") && a) {
|
2636
2623
|
let l = { widgetId: "" };
|
2637
2624
|
try {
|
2638
|
-
l = JSON.parse(
|
2625
|
+
l = JSON.parse(o.action.data);
|
2639
2626
|
} catch {
|
2640
2627
|
l = {
|
2641
2628
|
widgetId: ""
|
@@ -2675,16 +2662,16 @@ class Mi {
|
|
2675
2662
|
if (!i) {
|
2676
2663
|
const s = this.widgetAPIHandlers.get(t) || [];
|
2677
2664
|
s.push(() => {
|
2678
|
-
const
|
2679
|
-
e(
|
2665
|
+
const n = this.applications.find((o) => o.name === t);
|
2666
|
+
e(n == null ? void 0 : n.api);
|
2680
2667
|
}), this.widgetAPIHandlers.set(t, s);
|
2681
2668
|
return;
|
2682
2669
|
}
|
2683
2670
|
e(i == null ? void 0 : i.api);
|
2684
2671
|
}
|
2685
2672
|
registerApp(t, e, i, s) {
|
2686
|
-
const
|
2687
|
-
this.applications.push(
|
2673
|
+
const n = new Dt(e, this), o = new Ri(t, e, n, i, s);
|
2674
|
+
this.applications.push(o);
|
2688
2675
|
}
|
2689
2676
|
registerSite(t) {
|
2690
2677
|
this.site = t;
|
@@ -2752,11 +2739,11 @@ class Ui {
|
|
2752
2739
|
}
|
2753
2740
|
}
|
2754
2741
|
var Li = Object.defineProperty, It = (r, t, e, i) => {
|
2755
|
-
for (var s = void 0,
|
2756
|
-
(
|
2742
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
2743
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
2757
2744
|
return s && Li(t, e, s), s;
|
2758
2745
|
};
|
2759
|
-
const Mt = class Mt extends
|
2746
|
+
const Mt = class Mt extends A {
|
2760
2747
|
constructor() {
|
2761
2748
|
super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
|
2762
2749
|
}
|
@@ -2817,7 +2804,7 @@ const Wi = async (r, t, e = {}) => {
|
|
2817
2804
|
export {
|
2818
2805
|
M as AceWidget,
|
2819
2806
|
Ri as Application,
|
2820
|
-
|
2807
|
+
Dt as Container,
|
2821
2808
|
Mi as Environment,
|
2822
2809
|
W as HttpClient,
|
2823
2810
|
Ui as Site,
|