@telia-ace/widget-core-flamingo 1.1.82-rc.9 → 1.1.83
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +26 -21
- package/index.mjs +300 -284
- package/package.json +1 -1
package/index.mjs
CHANGED
@@ -27,24 +27,24 @@ function mt(r) {
|
|
27
27
|
function vt(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 yt(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 = mt(
|
85
|
+
for (var a = mt(o), c = a.next(); !c.done; c = a.next()) {
|
86
86
|
var l = c.value;
|
87
87
|
l.remove(this);
|
88
88
|
}
|
@@ -96,38 +96,38 @@ 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) {
|
109
109
|
this._finalizers = null;
|
110
110
|
try {
|
111
|
-
for (var
|
111
|
+
for (var u = mt(d), f = u.next(); !f.done; f = u.next()) {
|
112
112
|
var g = f.value;
|
113
113
|
try {
|
114
114
|
Ut(g);
|
115
115
|
} catch (v) {
|
116
|
-
|
116
|
+
n = n ?? [], v instanceof ot ? n = yt(yt([], vt(n)), vt(v.errors)) : n.push(v);
|
117
117
|
}
|
118
118
|
}
|
119
119
|
} catch (v) {
|
120
120
|
i = { error: v };
|
121
121
|
} finally {
|
122
122
|
try {
|
123
|
-
f && !f.done && (s =
|
123
|
+
f && !f.done && (s = u.return) && s.call(u);
|
124
124
|
} finally {
|
125
125
|
if (i) throw i.error;
|
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;
|
@@ -261,24 +261,24 @@ var Ie = function() {
|
|
261
261
|
}(), wt = function(r) {
|
262
262
|
Y(t, r);
|
263
263
|
function t(e, i, s) {
|
264
|
-
var
|
264
|
+
var n = r.call(this) || this, o;
|
265
265
|
if (_(e) || !e)
|
266
|
-
|
266
|
+
o = {
|
267
267
|
next: e ?? void 0,
|
268
268
|
error: i ?? void 0,
|
269
269
|
complete: s ?? void 0
|
270
270
|
};
|
271
271
|
else {
|
272
272
|
var a;
|
273
|
-
|
274
|
-
return
|
275
|
-
},
|
273
|
+
n && le.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
|
274
|
+
return n.unsubscribe();
|
275
|
+
}, o = {
|
276
276
|
next: e.next && at(e.next, a),
|
277
277
|
error: e.error && at(e.error, a),
|
278
278
|
complete: e.complete && at(e.complete, a)
|
279
|
-
}) :
|
279
|
+
}) : o = e;
|
280
280
|
}
|
281
|
-
return
|
281
|
+
return n.destination = new Ie(o), n;
|
282
282
|
}
|
283
283
|
return t;
|
284
284
|
}(de);
|
@@ -314,11 +314,11 @@ var jt = function() {
|
|
314
314
|
var e = new r();
|
315
315
|
return e.source = this, e.operator = t, e;
|
316
316
|
}, r.prototype.subscribe = function(t, e, i) {
|
317
|
-
var s = this,
|
317
|
+
var s = this, n = Le(t) ? t : new wt(t, e, i);
|
318
318
|
return G(function() {
|
319
|
-
var
|
320
|
-
|
321
|
-
}),
|
319
|
+
var o = s, a = o.operator, c = o.source;
|
320
|
+
n.add(a ? a.call(n, c) : c ? s._subscribe(n) : s._trySubscribe(n));
|
321
|
+
}), n;
|
322
322
|
}, r.prototype._trySubscribe = function(t) {
|
323
323
|
try {
|
324
324
|
return this._subscribe(t);
|
@@ -327,19 +327,19 @@ var jt = function() {
|
|
327
327
|
}
|
328
328
|
}, r.prototype.forEach = function(t, e) {
|
329
329
|
var i = this;
|
330
|
-
return e = Ht(e), new e(function(s,
|
331
|
-
var
|
330
|
+
return e = Ht(e), new e(function(s, n) {
|
331
|
+
var o = new wt({
|
332
332
|
next: function(a) {
|
333
333
|
try {
|
334
334
|
t(a);
|
335
335
|
} catch (c) {
|
336
|
-
|
336
|
+
n(c), o.unsubscribe();
|
337
337
|
}
|
338
338
|
},
|
339
|
-
error:
|
339
|
+
error: n,
|
340
340
|
complete: s
|
341
341
|
});
|
342
|
-
i.subscribe(
|
342
|
+
i.subscribe(o);
|
343
343
|
});
|
344
344
|
}, r.prototype._subscribe = function(t) {
|
345
345
|
var e;
|
@@ -353,13 +353,13 @@ var jt = function() {
|
|
353
353
|
}, r.prototype.toPromise = function(t) {
|
354
354
|
var e = this;
|
355
355
|
return t = Ht(t), new t(function(i, s) {
|
356
|
-
var
|
357
|
-
e.subscribe(function(
|
358
|
-
return
|
359
|
-
}, function(
|
360
|
-
return s(
|
356
|
+
var n;
|
357
|
+
e.subscribe(function(o) {
|
358
|
+
return n = o;
|
359
|
+
}, function(o) {
|
360
|
+
return s(o);
|
361
361
|
}, function() {
|
362
|
-
return i(
|
362
|
+
return i(n);
|
363
363
|
});
|
364
364
|
});
|
365
365
|
}, r.create = function(t) {
|
@@ -395,11 +395,11 @@ var je = ae(function(r) {
|
|
395
395
|
}, t.prototype.next = function(e) {
|
396
396
|
var i = this;
|
397
397
|
G(function() {
|
398
|
-
var s,
|
398
|
+
var s, n;
|
399
399
|
if (i._throwIfClosed(), !i.isStopped) {
|
400
400
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
401
401
|
try {
|
402
|
-
for (var
|
402
|
+
for (var o = mt(i.currentObservers), a = o.next(); !a.done; a = o.next()) {
|
403
403
|
var c = a.value;
|
404
404
|
c.next(e);
|
405
405
|
}
|
@@ -407,7 +407,7 @@ var je = ae(function(r) {
|
|
407
407
|
s = { error: l };
|
408
408
|
} finally {
|
409
409
|
try {
|
410
|
-
a && !a.done && (
|
410
|
+
a && !a.done && (n = o.return) && n.call(o);
|
411
411
|
} finally {
|
412
412
|
if (s) throw s.error;
|
413
413
|
}
|
@@ -446,13 +446,13 @@ var je = ae(function(r) {
|
|
446
446
|
}, t.prototype._subscribe = function(e) {
|
447
447
|
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
448
448
|
}, t.prototype._innerSubscribe = function(e) {
|
449
|
-
var i = this, s = this,
|
450
|
-
return
|
449
|
+
var i = this, s = this, n = s.hasError, o = s.isStopped, a = s.observers;
|
450
|
+
return n || o ? ce : (this.currentObservers = null, a.push(e), new rt(function() {
|
451
451
|
i.currentObservers = null, bt(a, e);
|
452
452
|
}));
|
453
453
|
}, t.prototype._checkFinalizedStatuses = function(e) {
|
454
|
-
var i = this, s = i.hasError,
|
455
|
-
s ? e.error(
|
454
|
+
var i = this, s = i.hasError, n = i.thrownError, o = i.isStopped;
|
455
|
+
s ? e.error(n) : o && e.complete();
|
456
456
|
}, t.prototype.asObservable = function() {
|
457
457
|
var e = new jt();
|
458
458
|
return e.source = this, e;
|
@@ -478,7 +478,7 @@ var je = ae(function(r) {
|
|
478
478
|
var i, s;
|
479
479
|
return (s = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(e)) !== null && s !== void 0 ? s : ce;
|
480
480
|
}, t;
|
481
|
-
}(At),
|
481
|
+
}(At), ue = function(r) {
|
482
482
|
Y(t, r);
|
483
483
|
function t(e) {
|
484
484
|
var i = r.call(this) || this;
|
@@ -494,17 +494,17 @@ var je = ae(function(r) {
|
|
494
494
|
var i = r.prototype._subscribe.call(this, e);
|
495
495
|
return !i.closed && e.next(this._value), i;
|
496
496
|
}, t.prototype.getValue = function() {
|
497
|
-
var e = this, i = e.hasError, s = e.thrownError,
|
497
|
+
var e = this, i = e.hasError, s = e.thrownError, n = e._value;
|
498
498
|
if (i)
|
499
499
|
throw s;
|
500
|
-
return this._throwIfClosed(),
|
500
|
+
return this._throwIfClosed(), n;
|
501
501
|
}, t.prototype.next = function(e) {
|
502
502
|
r.prototype.next.call(this, this._value = e);
|
503
503
|
}, t;
|
504
|
-
}(At),
|
504
|
+
}(At), pe = /* @__PURE__ */ ((r) => (r.Loading = "loading", r.Ready = "ready", r))(pe || {});
|
505
505
|
class Dt {
|
506
506
|
constructor(t, e) {
|
507
|
-
this.state = new
|
507
|
+
this.state = new ue(
|
508
508
|
"loading"
|
509
509
|
/* Loading */
|
510
510
|
), this.resolvers = /* @__PURE__ */ new Map(), this.name = t, this.environment = e, this.state.next(
|
@@ -547,11 +547,11 @@ let fe = class {
|
|
547
547
|
}
|
548
548
|
};
|
549
549
|
const He = (r) => new fe(typeof r == "string" ? r : r + "", void 0, Ct), U = (r, ...t) => {
|
550
|
-
const e = r.length === 1 ? r[0] : t.reduce((i, s,
|
551
|
-
if (
|
552
|
-
if (typeof
|
553
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
554
|
-
})(s) + r[
|
550
|
+
const e = r.length === 1 ? r[0] : t.reduce((i, s, n) => i + ((o) => {
|
551
|
+
if (o._$cssResult$ === !0) return o.cssText;
|
552
|
+
if (typeof o == "number") return o;
|
553
|
+
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.");
|
554
|
+
})(s) + r[n + 1], r[0]);
|
555
555
|
return new fe(e, r, Ct);
|
556
556
|
}, Be = (r, t) => {
|
557
557
|
if (xt) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
@@ -613,16 +613,16 @@ let T = class extends HTMLElement {
|
|
613
613
|
}
|
614
614
|
}
|
615
615
|
static getPropertyDescriptor(t, e, i) {
|
616
|
-
const { get: s, set:
|
616
|
+
const { get: s, set: n } = Fe(this.prototype, t) ?? { get() {
|
617
617
|
return this[e];
|
618
|
-
}, set(
|
619
|
-
this[e] =
|
618
|
+
}, set(o) {
|
619
|
+
this[e] = o;
|
620
620
|
} };
|
621
621
|
return { get() {
|
622
622
|
return s == null ? void 0 : s.call(this);
|
623
|
-
}, set(
|
623
|
+
}, set(o) {
|
624
624
|
const a = s == null ? void 0 : s.call(this);
|
625
|
-
|
625
|
+
n.call(this, o), this.requestUpdate(t, a, i);
|
626
626
|
}, configurable: !0, enumerable: !0 };
|
627
627
|
}
|
628
628
|
static getPropertyOptions(t) {
|
@@ -707,19 +707,19 @@ let T = class extends HTMLElement {
|
|
707
707
|
this._$AK(t, i);
|
708
708
|
}
|
709
709
|
_$EC(t, e) {
|
710
|
-
var
|
710
|
+
var n;
|
711
711
|
const i = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, i);
|
712
712
|
if (s !== void 0 && i.reflect === !0) {
|
713
|
-
const
|
714
|
-
this._$Em = t,
|
713
|
+
const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : X).toAttribute(e, i.type);
|
714
|
+
this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
|
715
715
|
}
|
716
716
|
}
|
717
717
|
_$AK(t, e) {
|
718
|
-
var
|
718
|
+
var n;
|
719
719
|
const i = this.constructor, s = i._$Eh.get(t);
|
720
720
|
if (s !== void 0 && this._$Em !== s) {
|
721
|
-
const
|
722
|
-
this._$Em = s, this[s] = a.fromAttribute(e,
|
721
|
+
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;
|
722
|
+
this._$Em = s, this[s] = a.fromAttribute(e, o.type), this._$Em = null;
|
723
723
|
}
|
724
724
|
}
|
725
725
|
requestUpdate(t, e, i) {
|
@@ -750,18 +750,18 @@ let T = class extends HTMLElement {
|
|
750
750
|
if (!this.isUpdatePending) return;
|
751
751
|
if (!this.hasUpdated) {
|
752
752
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
753
|
-
for (const [
|
753
|
+
for (const [n, o] of this._$Ep) this[n] = o;
|
754
754
|
this._$Ep = void 0;
|
755
755
|
}
|
756
756
|
const s = this.constructor.elementProperties;
|
757
|
-
if (s.size > 0) for (const [
|
757
|
+
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);
|
758
758
|
}
|
759
759
|
let t = !1;
|
760
760
|
const e = this._$AL;
|
761
761
|
try {
|
762
762
|
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((s) => {
|
763
|
-
var
|
764
|
-
return (
|
763
|
+
var n;
|
764
|
+
return (n = s.hostUpdate) == null ? void 0 : n.call(s);
|
765
765
|
}), this.update(e)) : this._$EU();
|
766
766
|
} catch (s) {
|
767
767
|
throw t = !1, this._$EU(), s;
|
@@ -805,28 +805,28 @@ T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[H("elementProper
|
|
805
805
|
*/
|
806
806
|
const B = globalThis, Q = B.trustedTypes, Yt = Q ? Q.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, ge = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, me = "?" + x, Ke = `<${me}>`, O = document, z = () => O.createComment(""), F = (r) => r === null || typeof r != "object" && typeof r != "function", Et = Array.isArray, Ze = (r) => Et(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", ht = `[
|
807
807
|
\f\r]`, j = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, qt = /-->/g, Kt = />/g, S = RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
|
808
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Zt = /'/g, Gt = /"/g, ve = /^(?:script|style|textarea|title)$/i, Ge = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), k = Ge(1), I = Symbol.for("lit-noChange"),
|
808
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Zt = /'/g, Gt = /"/g, ve = /^(?:script|style|textarea|title)$/i, Ge = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), k = Ge(1), I = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), Jt = /* @__PURE__ */ new WeakMap(), P = O.createTreeWalker(O, 129);
|
809
809
|
function ye(r, t) {
|
810
810
|
if (!Et(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
811
811
|
return Yt !== void 0 ? Yt.createHTML(t) : t;
|
812
812
|
}
|
813
813
|
const Je = (r, t) => {
|
814
814
|
const e = r.length - 1, i = [];
|
815
|
-
let s,
|
815
|
+
let s, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = j;
|
816
816
|
for (let a = 0; a < e; a++) {
|
817
817
|
const c = r[a];
|
818
|
-
let l, h, d = -1,
|
819
|
-
for (;
|
820
|
-
const f =
|
821
|
-
|
818
|
+
let l, h, d = -1, u = 0;
|
819
|
+
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 ? (ve.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);
|
820
|
+
const f = o === S && r[a + 1].startsWith("/>") ? " " : "";
|
821
|
+
n += o === j ? c + Ke : d >= 0 ? (i.push(l), c.slice(0, d) + ge + c.slice(d) + x + f) : c + x + (d === -2 ? a : f);
|
822
822
|
}
|
823
|
-
return [ye(r,
|
823
|
+
return [ye(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
824
824
|
};
|
825
825
|
let $t = class be {
|
826
826
|
constructor({ strings: t, _$litType$: e }, i) {
|
827
827
|
let s;
|
828
828
|
this.parts = [];
|
829
|
-
let
|
829
|
+
let n = 0, o = 0;
|
830
830
|
const a = t.length - 1, c = this.parts, [l, h] = Je(t, e);
|
831
831
|
if (this.el = be.createElement(l, i), P.currentNode = this.el.content, e === 2 || e === 3) {
|
832
832
|
const d = this.el.content.firstChild;
|
@@ -835,23 +835,23 @@ let $t = class be {
|
|
835
835
|
for (; (s = P.nextNode()) !== null && c.length < a; ) {
|
836
836
|
if (s.nodeType === 1) {
|
837
837
|
if (s.hasAttributes()) for (const d of s.getAttributeNames()) if (d.endsWith(ge)) {
|
838
|
-
const
|
839
|
-
c.push({ type: 1, index:
|
840
|
-
} else d.startsWith(x) && (c.push({ type: 6, index:
|
838
|
+
const u = h[o++], f = s.getAttribute(d).split(x), g = /([.?@])?(.*)/.exec(u);
|
839
|
+
c.push({ type: 1, index: n, name: g[2], strings: f, ctor: g[1] === "." ? Qe : g[1] === "?" ? ti : g[1] === "@" ? ei : nt }), s.removeAttribute(d);
|
840
|
+
} else d.startsWith(x) && (c.push({ type: 6, index: n }), s.removeAttribute(d));
|
841
841
|
if (ve.test(s.tagName)) {
|
842
|
-
const d = s.textContent.split(x),
|
843
|
-
if (
|
842
|
+
const d = s.textContent.split(x), u = d.length - 1;
|
843
|
+
if (u > 0) {
|
844
844
|
s.textContent = Q ? Q.emptyScript : "";
|
845
|
-
for (let f = 0; f <
|
846
|
-
s.append(d[
|
845
|
+
for (let f = 0; f < u; f++) s.append(d[f], z()), P.nextNode(), c.push({ type: 2, index: ++n });
|
846
|
+
s.append(d[u], z());
|
847
847
|
}
|
848
848
|
}
|
849
|
-
} else if (s.nodeType === 8) if (s.data === me) c.push({ type: 2, index:
|
849
|
+
} else if (s.nodeType === 8) if (s.data === me) c.push({ type: 2, index: n });
|
850
850
|
else {
|
851
851
|
let d = -1;
|
852
|
-
for (; (d = s.data.indexOf(x, d + 1)) !== -1; ) c.push({ type: 7, index:
|
852
|
+
for (; (d = s.data.indexOf(x, d + 1)) !== -1; ) c.push({ type: 7, index: n }), d += x.length - 1;
|
853
853
|
}
|
854
|
-
|
854
|
+
n++;
|
855
855
|
}
|
856
856
|
}
|
857
857
|
static createElement(t, e) {
|
@@ -860,11 +860,11 @@ let $t = class be {
|
|
860
860
|
}
|
861
861
|
};
|
862
862
|
function R(r, t, e = r, i) {
|
863
|
-
var
|
863
|
+
var o, a;
|
864
864
|
if (t === I) return t;
|
865
|
-
let s = i !== void 0 ? (
|
866
|
-
const
|
867
|
-
return (s == null ? void 0 : s.constructor) !==
|
865
|
+
let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
866
|
+
const n = F(t) ? void 0 : t._$litDirective$;
|
867
|
+
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;
|
868
868
|
}
|
869
869
|
class Xe {
|
870
870
|
constructor(t, e) {
|
@@ -879,13 +879,13 @@ class Xe {
|
|
879
879
|
u(t) {
|
880
880
|
const { el: { content: e }, parts: i } = this._$AD, s = ((t == null ? void 0 : t.creationScope) ?? O).importNode(e, !0);
|
881
881
|
P.currentNode = s;
|
882
|
-
let
|
882
|
+
let n = P.nextNode(), o = 0, a = 0, c = i[0];
|
883
883
|
for (; c !== void 0; ) {
|
884
|
-
if (
|
884
|
+
if (o === c.index) {
|
885
885
|
let l;
|
886
|
-
c.type === 2 ? l = new q(
|
886
|
+
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 ii(n, this, t)), this._$AV.push(l), c = i[++a];
|
887
887
|
}
|
888
|
-
|
888
|
+
o !== (c == null ? void 0 : c.index) && (n = P.nextNode(), o++);
|
889
889
|
}
|
890
890
|
return P.currentNode = O, s;
|
891
891
|
}
|
@@ -900,7 +900,7 @@ class q {
|
|
900
900
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
901
901
|
}
|
902
902
|
constructor(t, e, i, s) {
|
903
|
-
this.type = 2, this._$AH =
|
903
|
+
this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cv = (s == null ? void 0 : s.isConnected) ?? !0;
|
904
904
|
}
|
905
905
|
get parentNode() {
|
906
906
|
let t = this._$AA.parentNode;
|
@@ -914,7 +914,7 @@ class q {
|
|
914
914
|
return this._$AB;
|
915
915
|
}
|
916
916
|
_$AI(t, e = this) {
|
917
|
-
t = R(this, t, e), F(t) ? t ===
|
917
|
+
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) : Ze(t) ? this.k(t) : this._(t);
|
918
918
|
}
|
919
919
|
O(t) {
|
920
920
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
@@ -923,15 +923,15 @@ class q {
|
|
923
923
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
924
924
|
}
|
925
925
|
_(t) {
|
926
|
-
this._$AH !==
|
926
|
+
this._$AH !== p && F(this._$AH) ? this._$AA.nextSibling.data = t : this.T(O.createTextNode(t)), this._$AH = t;
|
927
927
|
}
|
928
928
|
$(t) {
|
929
|
-
var
|
929
|
+
var n;
|
930
930
|
const { values: e, _$litType$: i } = t, s = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = $t.createElement(ye(i.h, i.h[0]), this.options)), i);
|
931
|
-
if (((
|
931
|
+
if (((n = this._$AH) == null ? void 0 : n._$AD) === s) this._$AH.p(e);
|
932
932
|
else {
|
933
|
-
const
|
934
|
-
|
933
|
+
const o = new Xe(s, this), a = o.u(this.options);
|
934
|
+
o.p(e), this.T(a), this._$AH = o;
|
935
935
|
}
|
936
936
|
}
|
937
937
|
_$AC(t) {
|
@@ -942,7 +942,7 @@ class q {
|
|
942
942
|
Et(this._$AH) || (this._$AH = [], this._$AR());
|
943
943
|
const e = this._$AH;
|
944
944
|
let i, s = 0;
|
945
|
-
for (const
|
945
|
+
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++;
|
946
946
|
s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s);
|
947
947
|
}
|
948
948
|
_$AR(t = this._$AA.nextSibling, e) {
|
@@ -957,55 +957,55 @@ class q {
|
|
957
957
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
958
958
|
}
|
959
959
|
}
|
960
|
-
class
|
960
|
+
class nt {
|
961
961
|
get tagName() {
|
962
962
|
return this.element.tagName;
|
963
963
|
}
|
964
964
|
get _$AU() {
|
965
965
|
return this._$AM._$AU;
|
966
966
|
}
|
967
|
-
constructor(t, e, i, s,
|
968
|
-
this.type = 1, this._$AH =
|
967
|
+
constructor(t, e, i, s, n) {
|
968
|
+
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;
|
969
969
|
}
|
970
970
|
_$AI(t, e = this, i, s) {
|
971
|
-
const
|
972
|
-
let
|
973
|
-
if (
|
971
|
+
const n = this.strings;
|
972
|
+
let o = !1;
|
973
|
+
if (n === void 0) t = R(this, t, e, 0), o = !F(t) || t !== this._$AH && t !== I, o && (this._$AH = t);
|
974
974
|
else {
|
975
975
|
const a = t;
|
976
976
|
let c, l;
|
977
|
-
for (t =
|
977
|
+
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;
|
978
978
|
}
|
979
|
-
|
979
|
+
o && !s && this.j(t);
|
980
980
|
}
|
981
981
|
j(t) {
|
982
|
-
t ===
|
982
|
+
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
983
983
|
}
|
984
984
|
}
|
985
|
-
class Qe extends
|
985
|
+
class Qe extends nt {
|
986
986
|
constructor() {
|
987
987
|
super(...arguments), this.type = 3;
|
988
988
|
}
|
989
989
|
j(t) {
|
990
|
-
this.element[this.name] = t ===
|
990
|
+
this.element[this.name] = t === p ? void 0 : t;
|
991
991
|
}
|
992
992
|
}
|
993
|
-
class ti extends
|
993
|
+
class ti extends nt {
|
994
994
|
constructor() {
|
995
995
|
super(...arguments), this.type = 4;
|
996
996
|
}
|
997
997
|
j(t) {
|
998
|
-
this.element.toggleAttribute(this.name, !!t && t !==
|
998
|
+
this.element.toggleAttribute(this.name, !!t && t !== p);
|
999
999
|
}
|
1000
1000
|
}
|
1001
|
-
class ei extends
|
1002
|
-
constructor(t, e, i, s,
|
1003
|
-
super(t, e, i, s,
|
1001
|
+
class ei extends nt {
|
1002
|
+
constructor(t, e, i, s, n) {
|
1003
|
+
super(t, e, i, s, n), this.type = 5;
|
1004
1004
|
}
|
1005
1005
|
_$AI(t, e = this) {
|
1006
|
-
if ((t = R(this, t, e, 0) ??
|
1007
|
-
const i = this._$AH, s = t ===
|
1008
|
-
s && this.element.removeEventListener(this.name, this, i),
|
1006
|
+
if ((t = R(this, t, e, 0) ?? p) === I) return;
|
1007
|
+
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);
|
1008
|
+
s && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
1009
1009
|
}
|
1010
1010
|
handleEvent(t) {
|
1011
1011
|
var e;
|
@@ -1029,8 +1029,8 @@ const si = (r, t, e) => {
|
|
1029
1029
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
1030
1030
|
let s = i._$litPart$;
|
1031
1031
|
if (s === void 0) {
|
1032
|
-
const
|
1033
|
-
i._$litPart$ = s = new q(t.insertBefore(z(),
|
1032
|
+
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
1033
|
+
i._$litPart$ = s = new q(t.insertBefore(z(), n), n, void 0, e ?? {});
|
1034
1034
|
}
|
1035
1035
|
return s._$AI(r), s;
|
1036
1036
|
};
|
@@ -1064,8 +1064,8 @@ let A = class extends T {
|
|
1064
1064
|
return I;
|
1065
1065
|
}
|
1066
1066
|
};
|
1067
|
-
var
|
1068
|
-
A._$litElement$ = !0, A.finalized = !0, (
|
1067
|
+
var oe;
|
1068
|
+
A._$litElement$ = !0, A.finalized = !0, (oe = globalThis.litElementHydrateSupport) == null || oe.call(globalThis, { LitElement: A });
|
1069
1069
|
const dt = globalThis.litElementPolyfillSupport;
|
1070
1070
|
dt == null || dt({ LitElement: A });
|
1071
1071
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
@@ -1074,31 +1074,31 @@ dt == null || dt({ LitElement: A });
|
|
1074
1074
|
* Copyright 2017 Google LLC
|
1075
1075
|
* SPDX-License-Identifier: BSD-3-Clause
|
1076
1076
|
*/
|
1077
|
-
const ri = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: St },
|
1077
|
+
const ri = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: St }, ni = (r = ri, t, e) => {
|
1078
1078
|
const { kind: i, metadata: s } = e;
|
1079
|
-
let
|
1080
|
-
if (
|
1081
|
-
const { name:
|
1079
|
+
let n = globalThis.litPropertyMetadata.get(s);
|
1080
|
+
if (n === void 0 && globalThis.litPropertyMetadata.set(s, n = /* @__PURE__ */ new Map()), n.set(e.name, r), i === "accessor") {
|
1081
|
+
const { name: o } = e;
|
1082
1082
|
return { set(a) {
|
1083
1083
|
const c = t.get.call(this);
|
1084
|
-
t.set.call(this, a), this.requestUpdate(
|
1084
|
+
t.set.call(this, a), this.requestUpdate(o, c, r);
|
1085
1085
|
}, init(a) {
|
1086
|
-
return a !== void 0 && this.P(
|
1086
|
+
return a !== void 0 && this.P(o, void 0, r), a;
|
1087
1087
|
} };
|
1088
1088
|
}
|
1089
1089
|
if (i === "setter") {
|
1090
|
-
const { name:
|
1090
|
+
const { name: o } = e;
|
1091
1091
|
return function(a) {
|
1092
|
-
const c = this[
|
1093
|
-
t.call(this, a), this.requestUpdate(
|
1092
|
+
const c = this[o];
|
1093
|
+
t.call(this, a), this.requestUpdate(o, c, r);
|
1094
1094
|
};
|
1095
1095
|
}
|
1096
1096
|
throw Error("Unsupported decorator location: " + i);
|
1097
1097
|
};
|
1098
1098
|
function m(r) {
|
1099
|
-
return (t, e) => typeof e == "object" ?
|
1100
|
-
const
|
1101
|
-
return s.constructor.createProperty(
|
1099
|
+
return (t, e) => typeof e == "object" ? ni(r, t, e) : ((i, s, n) => {
|
1100
|
+
const o = s.hasOwnProperty(n);
|
1101
|
+
return s.constructor.createProperty(n, o ? { ...i, wrapped: !0 } : i), o ? Object.getOwnPropertyDescriptor(s, n) : void 0;
|
1102
1102
|
})(r, t, e);
|
1103
1103
|
}
|
1104
1104
|
/**
|
@@ -1109,10 +1109,10 @@ function m(r) {
|
|
1109
1109
|
function L(r) {
|
1110
1110
|
return m({ ...r, state: !0, attribute: !1 });
|
1111
1111
|
}
|
1112
|
-
var
|
1113
|
-
for (var s = void 0,
|
1114
|
-
(
|
1115
|
-
return s &&
|
1112
|
+
var oi = Object.defineProperty, ai = (r, t, e, i) => {
|
1113
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
1114
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
1115
|
+
return s && oi(t, e, s), s;
|
1116
1116
|
};
|
1117
1117
|
const Tt = class Tt extends A {
|
1118
1118
|
constructor() {
|
@@ -1123,7 +1123,7 @@ const Tt = class Tt extends A {
|
|
1123
1123
|
return (e = this.shadowRoot) == null || e.appendChild(t), t;
|
1124
1124
|
}
|
1125
1125
|
render() {
|
1126
|
-
return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"),
|
1126
|
+
return this.anchor === "BottomLeft" ? this.renderRoot.host.classList.add("bottom-left") : this.anchor === "BottomRight" && this.renderRoot.host.classList.add("bottom-right"), p;
|
1127
1127
|
}
|
1128
1128
|
};
|
1129
1129
|
Tt.styles = [
|
@@ -1207,7 +1207,7 @@ function hi(r) {
|
|
1207
1207
|
}
|
1208
1208
|
function li(r, t = !1, e = 0) {
|
1209
1209
|
const i = this._$AH, s = this._$AN;
|
1210
|
-
if (s !== void 0 && s.size !== 0) if (t) if (Array.isArray(i)) for (let
|
1210
|
+
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]);
|
1211
1211
|
else i != null && (D(i, !1), tt(i));
|
1212
1212
|
else D(this, r);
|
1213
1213
|
}
|
@@ -1237,15 +1237,15 @@ class _e extends we {
|
|
1237
1237
|
reconnected() {
|
1238
1238
|
}
|
1239
1239
|
}
|
1240
|
-
const
|
1240
|
+
const ui = /* @__PURE__ */ new WeakMap();
|
1241
1241
|
let Xt = 0;
|
1242
|
-
const
|
1242
|
+
const ut = /* @__PURE__ */ new Map(), Qt = /* @__PURE__ */ new WeakSet(), te = () => new Promise((r) => requestAnimationFrame(r)), pi = [{ transform: "translateX(100%) scale(0)", opacity: 0 }], ee = (r, t) => {
|
1243
1243
|
const e = r - t;
|
1244
1244
|
return e === 0 ? void 0 : e;
|
1245
1245
|
}, ie = (r, t) => {
|
1246
1246
|
const e = r / t;
|
1247
1247
|
return e === 1 ? void 0 : e;
|
1248
|
-
},
|
1248
|
+
}, pt = { left: (r, t) => {
|
1249
1249
|
const e = ee(r, t);
|
1250
1250
|
return { value: e, transform: e == null || isNaN(e) ? void 0 : `translateX(${e}px)` };
|
1251
1251
|
}, top: (r, t) => {
|
@@ -1278,10 +1278,10 @@ class mi extends _e {
|
|
1278
1278
|
(t = this.l) == null || t.call(this), this.l = void 0;
|
1279
1279
|
}
|
1280
1280
|
render(t) {
|
1281
|
-
return
|
1281
|
+
return p;
|
1282
1282
|
}
|
1283
1283
|
getController() {
|
1284
|
-
return
|
1284
|
+
return ui.get(this.u);
|
1285
1285
|
}
|
1286
1286
|
isDisabled() {
|
1287
1287
|
var t;
|
@@ -1290,7 +1290,7 @@ class mi extends _e {
|
|
1290
1290
|
update(t, [e]) {
|
1291
1291
|
var s;
|
1292
1292
|
const i = this.u === void 0;
|
1293
|
-
return i && (this.u = (s = t.options) == null ? void 0 : s.host, this.u.addController(this), this.u.updateComplete.then((
|
1293
|
+
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);
|
1294
1294
|
}
|
1295
1295
|
p(t) {
|
1296
1296
|
t = t ?? {};
|
@@ -1300,15 +1300,15 @@ class mi extends _e {
|
|
1300
1300
|
m() {
|
1301
1301
|
const t = {}, e = this.element.getBoundingClientRect(), i = getComputedStyle(this.element);
|
1302
1302
|
return this.options.properties.forEach((s) => {
|
1303
|
-
const
|
1304
|
-
t[s] = isNaN(
|
1303
|
+
const n = e[s] ?? (pt[s] ? void 0 : i[s]), o = Number(n);
|
1304
|
+
t[s] = isNaN(o) ? n + "" : o;
|
1305
1305
|
}), t;
|
1306
1306
|
}
|
1307
1307
|
v() {
|
1308
1308
|
let t, e = !0;
|
1309
1309
|
return this.options.guard && (t = this.options.guard(), e = ((i, s) => {
|
1310
1310
|
if (Array.isArray(i)) {
|
1311
|
-
if (Array.isArray(s) && s.length === i.length && i.every((
|
1311
|
+
if (Array.isArray(s) && s.length === i.length && i.every((n, o) => n === s[o])) return !1;
|
1312
1312
|
} else if (s === i) return !1;
|
1313
1313
|
return !0;
|
1314
1314
|
})(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;
|
@@ -1322,14 +1322,14 @@ class mi extends _e {
|
|
1322
1322
|
this.prepare(), await te;
|
1323
1323
|
const e = this.O(), i = this.j(this.options.keyframeOptions, e), s = this.m();
|
1324
1324
|
if (this.A !== void 0) {
|
1325
|
-
const { from:
|
1326
|
-
this.log("measured", [this.A, s,
|
1325
|
+
const { from: n, to: o } = this.N(this.A, s, e);
|
1326
|
+
this.log("measured", [this.A, s, n, o]), t = this.calculateKeyframes(n, o);
|
1327
1327
|
} else {
|
1328
|
-
const
|
1329
|
-
if (
|
1330
|
-
|
1331
|
-
const { from:
|
1332
|
-
t = this.calculateKeyframes(
|
1328
|
+
const n = ut.get(this.options.inId);
|
1329
|
+
if (n) {
|
1330
|
+
ut.delete(this.options.inId);
|
1331
|
+
const { from: o, to: a } = this.N(n, s, e);
|
1332
|
+
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);
|
1333
1333
|
} else this.options.in && (t = [...this.options.in, {}]);
|
1334
1334
|
}
|
1335
1335
|
this.animate(t, i);
|
@@ -1345,14 +1345,14 @@ class mi extends _e {
|
|
1345
1345
|
}
|
1346
1346
|
async disconnected() {
|
1347
1347
|
var e;
|
1348
|
-
if (!this.h || (this.options.id !== void 0 &&
|
1348
|
+
if (!this.h || (this.options.id !== void 0 && ut.set(this.options.id, this.A), this.options.out === void 0)) return;
|
1349
1349
|
if (this.prepare(), await te(), (e = this.i) == null ? void 0 : e.isConnected) {
|
1350
1350
|
const i = this.o && this.o.parentNode === this.i ? this.o : null;
|
1351
1351
|
if (this.i.insertBefore(this.element, i), this.options.stabilizeOut) {
|
1352
1352
|
const s = this.m();
|
1353
1353
|
this.log("stabilizing out");
|
1354
|
-
const
|
1355
|
-
getComputedStyle(this.element).position !== "static" ||
|
1354
|
+
const n = this.A.left - s.left, o = this.A.top - s.top;
|
1355
|
+
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");
|
1356
1356
|
}
|
1357
1357
|
}
|
1358
1358
|
const t = this.j(this.options.keyframeOptions);
|
@@ -1390,25 +1390,25 @@ class mi extends _e {
|
|
1390
1390
|
N(t, e, i) {
|
1391
1391
|
t = { ...t }, e = { ...e };
|
1392
1392
|
const s = i.map((a) => a.animatingProperties).filter((a) => a !== void 0);
|
1393
|
-
let
|
1393
|
+
let n = 1, o = 1;
|
1394
1394
|
return s.length > 0 && (s.forEach((a) => {
|
1395
|
-
a.width && (
|
1396
|
-
}), t.left !== void 0 && e.left !== void 0 && (t.left =
|
1395
|
+
a.width && (n /= a.width), a.height && (o /= a.height);
|
1396
|
+
}), 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 };
|
1397
1397
|
}
|
1398
1398
|
calculateKeyframes(t, e, i = !1) {
|
1399
|
-
const s = {},
|
1400
|
-
let
|
1399
|
+
const s = {}, n = {};
|
1400
|
+
let o = !1;
|
1401
1401
|
const a = {};
|
1402
1402
|
for (const c in e) {
|
1403
1403
|
const l = t[c], h = e[c];
|
1404
|
-
if (c in
|
1405
|
-
const d =
|
1404
|
+
if (c in pt) {
|
1405
|
+
const d = pt[c];
|
1406
1406
|
if (l === void 0 || h === void 0) continue;
|
1407
|
-
const
|
1408
|
-
|
1409
|
-
} else l !== h && l !== void 0 && h !== void 0 && (
|
1407
|
+
const u = d(l, h);
|
1408
|
+
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));
|
1409
|
+
} else l !== h && l !== void 0 && h !== void 0 && (o = !0, s[c] = l, n[c] = h);
|
1410
1410
|
}
|
1411
|
-
return s.transformOrigin =
|
1411
|
+
return s.transformOrigin = n.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, o ? [s, n] : void 0;
|
1412
1412
|
}
|
1413
1413
|
async animate(t, e = this.options.keyframeOptions) {
|
1414
1414
|
this.start(), this.frames = t;
|
@@ -1450,22 +1450,22 @@ const re = Ot(class extends we {
|
|
1450
1450
|
update(r, [t]) {
|
1451
1451
|
var i, s;
|
1452
1452
|
if (this.st === void 0) {
|
1453
|
-
this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter((
|
1454
|
-
for (const
|
1453
|
+
this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter((n) => n !== "")));
|
1454
|
+
for (const n in t) t[n] && !((i = this.nt) != null && i.has(n)) && this.st.add(n);
|
1455
1455
|
return this.render(t);
|
1456
1456
|
}
|
1457
1457
|
const e = r.element.classList;
|
1458
|
-
for (const
|
1459
|
-
for (const
|
1460
|
-
const
|
1461
|
-
|
1458
|
+
for (const n of this.st) n in t || (e.remove(n), this.st.delete(n));
|
1459
|
+
for (const n in t) {
|
1460
|
+
const o = !!t[n];
|
1461
|
+
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)));
|
1462
1462
|
}
|
1463
1463
|
return I;
|
1464
1464
|
}
|
1465
1465
|
}), w = (r, t, e) => {
|
1466
1466
|
r && e.style.setProperty(t, r);
|
1467
1467
|
}, Ae = (r, t) => {
|
1468
|
-
var e, i, s,
|
1468
|
+
var e, i, s, n, o, a, c, l, h;
|
1469
1469
|
w((e = r.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), w(
|
1470
1470
|
(i = r.colors) == null ? void 0 : i.textOnPrimaryBackground,
|
1471
1471
|
"--text-on-primary-background",
|
@@ -1475,11 +1475,11 @@ const re = Ot(class extends we {
|
|
1475
1475
|
"--secondary-background",
|
1476
1476
|
t
|
1477
1477
|
), w(
|
1478
|
-
(
|
1478
|
+
(n = r.colors) == null ? void 0 : n.textOnSecondaryBackground,
|
1479
1479
|
"--text-on-secondary-background",
|
1480
1480
|
t
|
1481
1481
|
), w(
|
1482
|
-
(
|
1482
|
+
(o = r.colors) == null ? void 0 : o.interactiveDestructiveBackground,
|
1483
1483
|
"--destructive-color",
|
1484
1484
|
t
|
1485
1485
|
), w(
|
@@ -1506,12 +1506,12 @@ class bi {
|
|
1506
1506
|
}
|
1507
1507
|
const ft = /* @__PURE__ */ new WeakMap(), Ce = Ot(class extends _e {
|
1508
1508
|
render(r) {
|
1509
|
-
return
|
1509
|
+
return p;
|
1510
1510
|
}
|
1511
1511
|
update(r, [t]) {
|
1512
1512
|
var i;
|
1513
1513
|
const e = t !== this.Y;
|
1514
|
-
return e && this.Y !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.Y = t, this.ht = (i = r.options) == null ? void 0 : i.host, this.rt(this.ct = r.element)),
|
1514
|
+
return e && this.Y !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.Y = t, this.ht = (i = r.options) == null ? void 0 : i.host, this.rt(this.ct = r.element)), p;
|
1515
1515
|
}
|
1516
1516
|
rt(r) {
|
1517
1517
|
if (this.isConnected || (r = void 0), typeof this.Y == "function") {
|
@@ -1532,13 +1532,13 @@ const ft = /* @__PURE__ */ new WeakMap(), Ce = Ot(class extends _e {
|
|
1532
1532
|
}
|
1533
1533
|
});
|
1534
1534
|
var wi = Object.defineProperty, K = (r, t, e, i) => {
|
1535
|
-
for (var s = void 0,
|
1536
|
-
(
|
1535
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
1536
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
1537
1537
|
return s && wi(t, e, s), s;
|
1538
1538
|
};
|
1539
1539
|
const kt = class kt extends A {
|
1540
1540
|
constructor() {
|
1541
|
-
super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = xe(), this.widgetActive$ = new
|
1541
|
+
super(...arguments), this.active = !1, this.triggerVisible = !0, this.loaded = !1, this.containerRef = xe(), this.widgetActive$ = new ue(!1), this.componentIsDestroyed$ = new At();
|
1542
1542
|
}
|
1543
1543
|
async connectedCallback() {
|
1544
1544
|
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
|
@@ -1582,19 +1582,19 @@ const kt = class kt extends A {
|
|
1582
1582
|
return k` <img src=${e} class="trigger-icon" alt="" /> `;
|
1583
1583
|
const i = (l = this.application) == null ? void 0 : l.triggerIcon;
|
1584
1584
|
if (!i)
|
1585
|
-
return
|
1586
|
-
const s = async (h) => yi, { type:
|
1587
|
-
switch (
|
1585
|
+
return p;
|
1586
|
+
const s = async (h) => yi, { type: n, content: o } = i;
|
1587
|
+
switch (n) {
|
1588
1588
|
case "Telia": {
|
1589
1589
|
const h = await s();
|
1590
1590
|
return h ? k`<telia-icon
|
1591
1591
|
class="trigger-icon"
|
1592
1592
|
svg=${h.svg}
|
1593
1593
|
size="lg"
|
1594
|
-
></telia-icon>` :
|
1594
|
+
></telia-icon>` : p;
|
1595
1595
|
}
|
1596
1596
|
default:
|
1597
|
-
return
|
1597
|
+
return p;
|
1598
1598
|
}
|
1599
1599
|
}
|
1600
1600
|
hideTrigger() {
|
@@ -1619,14 +1619,14 @@ const kt = class kt extends A {
|
|
1619
1619
|
@click=${this.toggleActive}
|
1620
1620
|
${vi({
|
1621
1621
|
keyframeOptions: {},
|
1622
|
-
in:
|
1622
|
+
in: pi,
|
1623
1623
|
stabilizeOut: !0,
|
1624
1624
|
skipInitial: !1
|
1625
1625
|
})}
|
1626
1626
|
>
|
1627
1627
|
${this.application.settings.branding.other.buttonLabelText}
|
1628
1628
|
</button>
|
1629
|
-
` :
|
1629
|
+
` : p}
|
1630
1630
|
|
1631
1631
|
<button
|
1632
1632
|
label="Widget trigger"
|
@@ -1818,8 +1818,8 @@ K([
|
|
1818
1818
|
L()
|
1819
1819
|
], b.prototype, "icon");
|
1820
1820
|
var $i = Object.defineProperty, E = (r, t, e, i) => {
|
1821
|
-
for (var s = void 0,
|
1822
|
-
(
|
1821
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
1822
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
1823
1823
|
return s && $i(t, e, s), s;
|
1824
1824
|
};
|
1825
1825
|
const _i = (r) => {
|
@@ -1961,19 +1961,19 @@ let Si = class extends Event {
|
|
1961
1961
|
super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
|
1962
1962
|
}
|
1963
1963
|
};
|
1964
|
-
class
|
1964
|
+
class ne extends Ci {
|
1965
1965
|
constructor(t, e, i) {
|
1966
|
-
var s,
|
1967
|
-
super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (
|
1968
|
-
const a =
|
1969
|
-
|
1970
|
-
}, this.onProviderRequest = (
|
1971
|
-
const a =
|
1972
|
-
if (
|
1966
|
+
var s, n;
|
1967
|
+
super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (o) => {
|
1968
|
+
const a = o.composedPath()[0];
|
1969
|
+
o.context === this.context && a !== this.host && (o.stopPropagation(), this.addCallback(o.callback, a, o.subscribe));
|
1970
|
+
}, this.onProviderRequest = (o) => {
|
1971
|
+
const a = o.composedPath()[0];
|
1972
|
+
if (o.context !== this.context || a === this.host) return;
|
1973
1973
|
const c = /* @__PURE__ */ new Set();
|
1974
1974
|
for (const [l, { consumerHost: h }] of this.subscriptions) c.has(l) || (c.add(l), h.dispatchEvent(new xi(this.context, l, !0)));
|
1975
|
-
|
1976
|
-
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (
|
1975
|
+
o.stopPropagation();
|
1976
|
+
}, 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);
|
1977
1977
|
}
|
1978
1978
|
attachListeners() {
|
1979
1979
|
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
@@ -1991,47 +1991,47 @@ function Ei({ context: r }) {
|
|
1991
1991
|
return (t, e) => {
|
1992
1992
|
const i = /* @__PURE__ */ new WeakMap();
|
1993
1993
|
if (typeof e == "object") return e.addInitializer(function() {
|
1994
|
-
i.set(this, new
|
1994
|
+
i.set(this, new ne(this, { context: r }));
|
1995
1995
|
}), { get() {
|
1996
1996
|
return t.get.call(this);
|
1997
1997
|
}, set(s) {
|
1998
|
-
var
|
1999
|
-
return (
|
1998
|
+
var n;
|
1999
|
+
return (n = i.get(this)) == null || n.setValue(s), t.set.call(this, s);
|
2000
2000
|
}, init(s) {
|
2001
|
-
var
|
2002
|
-
return (
|
2001
|
+
var n;
|
2002
|
+
return (n = i.get(this)) == null || n.setValue(s), s;
|
2003
2003
|
} };
|
2004
2004
|
{
|
2005
|
-
t.constructor.addInitializer((
|
2006
|
-
i.set(
|
2005
|
+
t.constructor.addInitializer((o) => {
|
2006
|
+
i.set(o, new ne(o, { context: r }));
|
2007
2007
|
});
|
2008
2008
|
const s = Object.getOwnPropertyDescriptor(t, e);
|
2009
|
-
let
|
2009
|
+
let n;
|
2010
2010
|
if (s === void 0) {
|
2011
|
-
const
|
2012
|
-
|
2013
|
-
return
|
2011
|
+
const o = /* @__PURE__ */ new WeakMap();
|
2012
|
+
n = { get() {
|
2013
|
+
return o.get(this);
|
2014
2014
|
}, set(a) {
|
2015
|
-
i.get(this).setValue(a),
|
2015
|
+
i.get(this).setValue(a), o.set(this, a);
|
2016
2016
|
}, configurable: !0, enumerable: !0 };
|
2017
2017
|
} else {
|
2018
|
-
const
|
2019
|
-
|
2020
|
-
i.get(this).setValue(a),
|
2018
|
+
const o = s.set;
|
2019
|
+
n = { ...s, set(a) {
|
2020
|
+
i.get(this).setValue(a), o == null || o.call(this, a);
|
2021
2021
|
} };
|
2022
2022
|
}
|
2023
|
-
return void Object.defineProperty(t, e,
|
2023
|
+
return void Object.defineProperty(t, e, n);
|
2024
2024
|
}
|
2025
2025
|
};
|
2026
2026
|
}
|
2027
2027
|
var Pi = Object.defineProperty, Se = (r, t, e, i) => {
|
2028
|
-
for (var s = void 0,
|
2029
|
-
(
|
2028
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
2029
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
2030
2030
|
return s && Pi(t, e, s), s;
|
2031
2031
|
};
|
2032
2032
|
const Oi = "application", Mt = class Mt extends A {
|
2033
2033
|
constructor() {
|
2034
|
-
super(...arguments), this.nodes = [], this.wrapperRef = xe(), this.
|
2034
|
+
super(...arguments), this.nodes = [], this.wrapperRef = xe(), this.fullscreen = !1;
|
2035
2035
|
}
|
2036
2036
|
addChild(t) {
|
2037
2037
|
t.parent = this, this.nodes.push(t);
|
@@ -2056,8 +2056,8 @@ const Oi = "application", Mt = class Mt extends A {
|
|
2056
2056
|
render() {
|
2057
2057
|
var i, s;
|
2058
2058
|
const t = this.application.settings.components.conversation;
|
2059
|
-
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.
|
2060
|
-
${Ai(this.nodes, (
|
2059
|
+
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"), k`<div class="widget-container" ${Ce(this.wrapperRef)}>
|
2060
|
+
${Ai(this.nodes, (n) => n)}
|
2061
2061
|
</div>`;
|
2062
2062
|
}
|
2063
2063
|
};
|
@@ -2106,14 +2106,14 @@ Mt.styles = U`
|
|
2106
2106
|
position: fixed;
|
2107
2107
|
}
|
2108
2108
|
|
2109
|
-
:host(.
|
2109
|
+
:host(.fullscreen.floating) {
|
2110
2110
|
inset: 0 !important;
|
2111
2111
|
height: 100% !important;
|
2112
2112
|
width: auto !important;
|
2113
2113
|
max-height: none !important;
|
2114
2114
|
}
|
2115
2115
|
|
2116
|
-
:host(.
|
2116
|
+
:host(.fullscreen.floating) .widget-container {
|
2117
2117
|
box-shadow: none !important;
|
2118
2118
|
border-radius: 0 !important;
|
2119
2119
|
}
|
@@ -2208,11 +2208,16 @@ Mt.styles = U`
|
|
2208
2208
|
animation: slideDown 0.3s linear;
|
2209
2209
|
pointer-events: none;
|
2210
2210
|
}
|
2211
|
+
|
2212
|
+
:host(.hidden.embedded),
|
2213
|
+
:host(.expanded.embedded) {
|
2214
|
+
animation: none;
|
2215
|
+
}
|
2211
2216
|
`;
|
2212
2217
|
let M = Mt;
|
2213
2218
|
Se([
|
2214
2219
|
m({ attribute: !0 })
|
2215
|
-
], M.prototype, "
|
2220
|
+
], M.prototype, "fullscreen");
|
2216
2221
|
Se([
|
2217
2222
|
m({ attribute: !1 }),
|
2218
2223
|
Ei({ context: Oi })
|
@@ -2237,15 +2242,15 @@ class Ii {
|
|
2237
2242
|
};
|
2238
2243
|
}, s = (a, c, l, h) => {
|
2239
2244
|
l.forEach((d) => {
|
2240
|
-
const
|
2245
|
+
const u = i(d), f = h[u.definitionId];
|
2241
2246
|
if (!f) {
|
2242
2247
|
console.error(
|
2243
|
-
`No definition found for component type '${
|
2248
|
+
`No definition found for component type '${u.definitionId}'.`
|
2244
2249
|
);
|
2245
2250
|
return;
|
2246
2251
|
}
|
2247
2252
|
const g = a.createNode(f.type, f.type);
|
2248
|
-
g && (g.name =
|
2253
|
+
g && (g.name = u.definitionId, g.application = e, f.properties && g.writeProperties(f.properties), f.context && g.writeContext(f.context), f.layout && g.writeLayout(f.layout), c.addChild(g), f.children && s(
|
2249
2254
|
a,
|
2250
2255
|
g,
|
2251
2256
|
f.children,
|
@@ -2253,8 +2258,8 @@ class Ii {
|
|
2253
2258
|
// views
|
2254
2259
|
));
|
2255
2260
|
});
|
2256
|
-
}, { entry:
|
2257
|
-
return s(this, this.root, [
|
2261
|
+
}, { entry: n, components: o } = t;
|
2262
|
+
return s(this, this.root, [n], o), this.root;
|
2258
2263
|
}
|
2259
2264
|
createRoot() {
|
2260
2265
|
return typeof window < "u" && (window.customElements.get("ace-wrapper") || window.customElements.define("ace-wrapper", M)), document.createElement("ace-wrapper");
|
@@ -2315,8 +2320,8 @@ class Ti {
|
|
2315
2320
|
}
|
2316
2321
|
const s = i.category;
|
2317
2322
|
if (this.policy[s]) {
|
2318
|
-
const
|
2319
|
-
this.storage.setItem(this._prefixKey(t), JSON.stringify(
|
2323
|
+
const n = { value: e, category: s };
|
2324
|
+
this.storage.setItem(this._prefixKey(t), JSON.stringify(n));
|
2320
2325
|
} else
|
2321
2326
|
console.warn(
|
2322
2327
|
`Storage policy does not allow storing items in category: ${s}`
|
@@ -2351,6 +2356,9 @@ class Ti {
|
|
2351
2356
|
disallowKey(t) {
|
2352
2357
|
this.disallowedKeys.includes(t) || this.disallowedKeys.push(t), this.removeItem(t);
|
2353
2358
|
}
|
2359
|
+
stringify() {
|
2360
|
+
return JSON.stringify(this.storage);
|
2361
|
+
}
|
2354
2362
|
_prefixKey(t) {
|
2355
2363
|
return `ace_${this.widgetId.substring(0, 7)}-${t}`;
|
2356
2364
|
}
|
@@ -2370,19 +2378,19 @@ class ki {
|
|
2370
2378
|
return this.texts.get(t) || e;
|
2371
2379
|
}
|
2372
2380
|
}
|
2373
|
-
const Ri = "
|
2381
|
+
const Ri = "##__WIDGETS_VERSION__##";
|
2374
2382
|
class Mi {
|
2375
2383
|
constructor(t) {
|
2376
2384
|
this.widget = t, this.name = t.name;
|
2377
2385
|
}
|
2378
|
-
open() {
|
2379
|
-
this.widget.appendToDOM();
|
2386
|
+
open(t = {}) {
|
2387
|
+
this.widget.appendToDOM(t);
|
2380
2388
|
}
|
2381
2389
|
close() {
|
2382
2390
|
this.widget.hide();
|
2383
2391
|
}
|
2384
|
-
|
2385
|
-
this.widget.
|
2392
|
+
setFullscreenMode(t) {
|
2393
|
+
this.widget.setFullscreenMode(t);
|
2386
2394
|
}
|
2387
2395
|
setZIndex(t) {
|
2388
2396
|
this.widget.setZIndex(t);
|
@@ -2394,8 +2402,8 @@ class Mi {
|
|
2394
2402
|
}
|
2395
2403
|
}
|
2396
2404
|
class Ni {
|
2397
|
-
constructor(t, e, i, s,
|
2398
|
-
this.id = t, this.name = e, this.container = i, this.settings = s, this.options =
|
2405
|
+
constructor(t, e, i, s, n) {
|
2406
|
+
this.id = t, this.name = e, this.container = i, this.settings = s, this.options = n, this.platform = new Ii(), this.texts = new ki(), 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 Mi(this), this.onMessageReceived = async (a) => {
|
2399
2407
|
var l;
|
2400
2408
|
const c = a.data;
|
2401
2409
|
switch (c.type) {
|
@@ -2413,9 +2421,9 @@ class Ni {
|
|
2413
2421
|
h && this.storage.disallowKey(h);
|
2414
2422
|
return;
|
2415
2423
|
}
|
2416
|
-
case "set-
|
2424
|
+
case "set-fullscreen-mode": {
|
2417
2425
|
const { value: h } = c.data;
|
2418
|
-
typeof h == "boolean" && this.
|
2426
|
+
typeof h == "boolean" && this.setFullscreenMode(h);
|
2419
2427
|
return;
|
2420
2428
|
}
|
2421
2429
|
case "open": {
|
@@ -2436,11 +2444,15 @@ class Ni {
|
|
2436
2444
|
this.hide(), (l = this.trigger) == null || l.hideTrigger(), h && this.storage.set("open", !0);
|
2437
2445
|
return;
|
2438
2446
|
}
|
2447
|
+
case "set-open": {
|
2448
|
+
typeof c.data.value == "boolean" && this.storage.set("open", c.data.value);
|
2449
|
+
return;
|
2450
|
+
}
|
2439
2451
|
default:
|
2440
2452
|
return;
|
2441
2453
|
}
|
2442
2454
|
}, this.renderStrategy = this.options.renderStrategy || $.Inline, this.triggerIcon = this.options.triggerIcon;
|
2443
|
-
const
|
2455
|
+
const o = {
|
2444
2456
|
[y.Necessary]: !0,
|
2445
2457
|
[y.Functional]: !0,
|
2446
2458
|
[y.Analytics]: !0
|
@@ -2448,12 +2460,12 @@ class Ni {
|
|
2448
2460
|
this.storage = new Ti(
|
2449
2461
|
this.id,
|
2450
2462
|
"sessionStorage",
|
2451
|
-
|
2463
|
+
o,
|
2452
2464
|
this.settings.storage
|
2453
|
-
), typeof
|
2465
|
+
), 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);
|
2454
2466
|
}
|
2455
2467
|
async activate() {
|
2456
|
-
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(
|
2468
|
+
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(pe.Ready), this.autoActivate) {
|
2457
2469
|
const t = this.render();
|
2458
2470
|
t && this._getTargetElement().appendChild(t);
|
2459
2471
|
}
|
@@ -2462,7 +2474,11 @@ class Ni {
|
|
2462
2474
|
window.parent.postMessage(
|
2463
2475
|
{
|
2464
2476
|
type: "widget-activated",
|
2465
|
-
data: {
|
2477
|
+
data: {
|
2478
|
+
widgetId: this.id,
|
2479
|
+
version: t,
|
2480
|
+
storage: this.storage.stringify()
|
2481
|
+
}
|
2466
2482
|
},
|
2467
2483
|
"*"
|
2468
2484
|
);
|
@@ -2481,8 +2497,8 @@ class Ni {
|
|
2481
2497
|
plugin(t) {
|
2482
2498
|
return this.plugins.push(t), this;
|
2483
2499
|
}
|
2484
|
-
appendToDOM() {
|
2485
|
-
this.root && (this.root.classList.add("expanded"), this.root.classList.remove("hidden"), document.body.appendChild(this.root)), this.storage.set("open", !0);
|
2500
|
+
appendToDOM(t = {}) {
|
2501
|
+
this.root && (this.root.classList.add("expanded"), this.root.classList.remove("hidden"), document.body.appendChild(this.root)), t.ignoreStorage || this.storage.set("open", !0);
|
2486
2502
|
}
|
2487
2503
|
hide() {
|
2488
2504
|
this.root && (this.root.classList.add("hidden"), this.root.classList.remove("expanded")), this.storage.set("open", !1);
|
@@ -2522,8 +2538,8 @@ class Ni {
|
|
2522
2538
|
_isEmbeddedInIFrame() {
|
2523
2539
|
return window.self !== window.top;
|
2524
2540
|
}
|
2525
|
-
|
2526
|
-
this.
|
2541
|
+
setFullscreenMode(t) {
|
2542
|
+
this.fullscreen = t, this.root && (this.root.fullscreen = !0);
|
2527
2543
|
}
|
2528
2544
|
render() {
|
2529
2545
|
if (this._isEmbeddedInIFrame())
|
@@ -2547,13 +2563,13 @@ const Yi = (r) => new W(r), st = class st {
|
|
2547
2563
|
id: i.id,
|
2548
2564
|
triggers: i.triggers || [],
|
2549
2565
|
apps: (i.widgets || []).map((s) => {
|
2550
|
-
let
|
2551
|
-
s.renderStrategy.toLowerCase() === "inline" && (
|
2552
|
-
const
|
2566
|
+
let n = $.Trigger;
|
2567
|
+
s.renderStrategy.toLowerCase() === "inline" && (n = $.Inline);
|
2568
|
+
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";
|
2553
2569
|
return {
|
2554
|
-
id:
|
2555
|
-
widgetId:
|
2556
|
-
renderStrategy:
|
2570
|
+
id: o,
|
2571
|
+
widgetId: o,
|
2572
|
+
renderStrategy: n,
|
2557
2573
|
autoActivate: a,
|
2558
2574
|
anchor: c,
|
2559
2575
|
triggerIcon: {
|
@@ -2582,12 +2598,12 @@ class Ui {
|
|
2582
2598
|
var i;
|
2583
2599
|
(((i = this.site.environment) == null ? void 0 : i.applications) || []).forEach((s) => {
|
2584
2600
|
if (s.storage) {
|
2585
|
-
const
|
2601
|
+
const n = {
|
2586
2602
|
[y.Analytics]: t.includes("analytics"),
|
2587
2603
|
[y.Necessary]: t.includes("necessary"),
|
2588
2604
|
[y.Functional]: t.includes("functional")
|
2589
2605
|
};
|
2590
|
-
s.storage.updatePolicy(
|
2606
|
+
s.storage.updatePolicy(n);
|
2591
2607
|
}
|
2592
2608
|
});
|
2593
2609
|
}
|
@@ -2620,22 +2636,22 @@ class Li {
|
|
2620
2636
|
(i) => i.autoActivate
|
2621
2637
|
);
|
2622
2638
|
(((e = this.site) == null ? void 0 : e.triggers) || []).filter((i) => i.triggerType === "visit").forEach((i) => {
|
2623
|
-
const s = window.location.pathname,
|
2624
|
-
i.condition.type === "url" &&
|
2625
|
-
const a =
|
2626
|
-
if ((
|
2639
|
+
const s = window.location.pathname, n = i.condition.outputs || [];
|
2640
|
+
i.condition.type === "url" && n.forEach((o) => {
|
2641
|
+
const a = o.action.type === "render_widget";
|
2642
|
+
if ((o.value === s || o.value === "*") && a) {
|
2627
2643
|
let l = { widgetId: "" };
|
2628
2644
|
try {
|
2629
|
-
l = JSON.parse(
|
2645
|
+
l = JSON.parse(o.action.data);
|
2630
2646
|
} catch {
|
2631
2647
|
l = {
|
2632
2648
|
widgetId: ""
|
2633
2649
|
};
|
2634
2650
|
}
|
2635
2651
|
const h = t.findIndex(
|
2636
|
-
(
|
2652
|
+
(u) => u.id === l.widgetId
|
2637
2653
|
) > -1, d = this.applications.find(
|
2638
|
-
(
|
2654
|
+
(u) => u.id === l.widgetId
|
2639
2655
|
);
|
2640
2656
|
d && !h && (d.autoActivate = !0, t.push(d));
|
2641
2657
|
}
|
@@ -2666,16 +2682,16 @@ class Li {
|
|
2666
2682
|
if (!i) {
|
2667
2683
|
const s = this.widgetAPIHandlers.get(t) || [];
|
2668
2684
|
s.push(() => {
|
2669
|
-
const
|
2670
|
-
e(
|
2685
|
+
const n = this.applications.find((o) => o.name === t);
|
2686
|
+
e(n == null ? void 0 : n.api);
|
2671
2687
|
}), this.widgetAPIHandlers.set(t, s);
|
2672
2688
|
return;
|
2673
2689
|
}
|
2674
2690
|
e(i == null ? void 0 : i.api);
|
2675
2691
|
}
|
2676
2692
|
registerApp(t, e, i, s) {
|
2677
|
-
const
|
2678
|
-
this.applications.push(
|
2693
|
+
const n = new Dt(e, this), o = new Ni(t, e, n, i, s);
|
2694
|
+
this.applications.push(o);
|
2679
2695
|
}
|
2680
2696
|
registerSite(t) {
|
2681
2697
|
this.site = t;
|
@@ -2743,8 +2759,8 @@ class ji {
|
|
2743
2759
|
}
|
2744
2760
|
}
|
2745
2761
|
var Hi = Object.defineProperty, It = (r, t, e, i) => {
|
2746
|
-
for (var s = void 0,
|
2747
|
-
(
|
2762
|
+
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
2763
|
+
(o = r[n]) && (s = o(t, e, s) || s);
|
2748
2764
|
return s && Hi(t, e, s), s;
|
2749
2765
|
};
|
2750
2766
|
const Nt = class Nt extends A {
|
@@ -2771,7 +2787,7 @@ const Nt = class Nt extends A {
|
|
2771
2787
|
}
|
2772
2788
|
render() {
|
2773
2789
|
if (!this.widget || this.status !== "activated")
|
2774
|
-
return
|
2790
|
+
return p;
|
2775
2791
|
if (this.widget.renderStrategy === $.Trigger) {
|
2776
2792
|
const t = new b();
|
2777
2793
|
return t.application = this.widget, t;
|