@telia-ace/widget-core-flamingo 1.1.82-rc.0 → 1.1.82-rc.10
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +43 -31
- package/index.mjs +323 -288
- package/package.json +1 -1
package/index.mjs
CHANGED
@@ -83,8 +83,8 @@ var rt = function() {
|
|
83
83
|
if (this._parentage = null, Array.isArray(o))
|
84
84
|
try {
|
85
85
|
for (var a = mt(o), c = a.next(); !c.done; c = a.next()) {
|
86
|
-
var
|
87
|
-
|
86
|
+
var l = c.value;
|
87
|
+
l.remove(this);
|
88
88
|
}
|
89
89
|
} catch (v) {
|
90
90
|
t = { error: v };
|
@@ -97,10 +97,10 @@ var rt = function() {
|
|
97
97
|
}
|
98
98
|
else
|
99
99
|
o.remove(this);
|
100
|
-
var
|
101
|
-
if (_(
|
100
|
+
var h = this.initialTeardown;
|
101
|
+
if (_(h))
|
102
102
|
try {
|
103
|
-
|
103
|
+
h();
|
104
104
|
} catch (v) {
|
105
105
|
n = v instanceof ot ? v.errors : [v];
|
106
106
|
}
|
@@ -108,7 +108,7 @@ var rt = function() {
|
|
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);
|
@@ -120,7 +120,7 @@ var rt = function() {
|
|
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
|
}
|
@@ -171,7 +171,7 @@ var le = {
|
|
171
171
|
Promise: void 0,
|
172
172
|
useDeprecatedSynchronousErrorHandling: !1,
|
173
173
|
useDeprecatedNextContext: !1
|
174
|
-
},
|
174
|
+
}, Ee = {
|
175
175
|
setTimeout: function(r, t) {
|
176
176
|
for (var e = [], i = 2; i < arguments.length; i++)
|
177
177
|
e[i - 2] = arguments[i];
|
@@ -182,21 +182,21 @@ var le = {
|
|
182
182
|
},
|
183
183
|
delegate: void 0
|
184
184
|
};
|
185
|
-
function
|
186
|
-
|
185
|
+
function Pe(r) {
|
186
|
+
Ee.setTimeout(function() {
|
187
187
|
throw r;
|
188
188
|
});
|
189
189
|
}
|
190
190
|
function Lt() {
|
191
191
|
}
|
192
|
-
function
|
192
|
+
function G(r) {
|
193
193
|
r();
|
194
194
|
}
|
195
195
|
var de = function(r) {
|
196
196
|
Y(t, r);
|
197
197
|
function t(e) {
|
198
198
|
var i = r.call(this) || this;
|
199
|
-
return i.isStopped = !1, e ? (i.destination = e, he(e) && e.add(i)) : i.destination =
|
199
|
+
return i.isStopped = !1, e ? (i.destination = e, he(e) && e.add(i)) : i.destination = ke, i;
|
200
200
|
}
|
201
201
|
return t.create = function(e, i, s) {
|
202
202
|
return new wt(e, i, s);
|
@@ -223,11 +223,11 @@ var de = function(r) {
|
|
223
223
|
this.unsubscribe();
|
224
224
|
}
|
225
225
|
}, t;
|
226
|
-
}(rt),
|
226
|
+
}(rt), Oe = Function.prototype.bind;
|
227
227
|
function at(r, t) {
|
228
|
-
return
|
228
|
+
return Oe.call(r, t);
|
229
229
|
}
|
230
|
-
var
|
230
|
+
var Ie = function() {
|
231
231
|
function r(t) {
|
232
232
|
this.partialObserver = t;
|
233
233
|
}
|
@@ -278,29 +278,29 @@ var Oe = function() {
|
|
278
278
|
complete: e.complete && at(e.complete, a)
|
279
279
|
}) : o = e;
|
280
280
|
}
|
281
|
-
return n.destination = new
|
281
|
+
return n.destination = new Ie(o), n;
|
282
282
|
}
|
283
283
|
return t;
|
284
284
|
}(de);
|
285
285
|
function Z(r) {
|
286
|
-
|
286
|
+
Pe(r);
|
287
287
|
}
|
288
|
-
function
|
288
|
+
function Te(r) {
|
289
289
|
throw r;
|
290
290
|
}
|
291
|
-
var
|
291
|
+
var ke = {
|
292
292
|
closed: !0,
|
293
293
|
next: Lt,
|
294
|
-
error:
|
294
|
+
error: Te,
|
295
295
|
complete: Lt
|
296
|
-
},
|
296
|
+
}, Re = function() {
|
297
297
|
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
298
298
|
}();
|
299
|
-
function
|
299
|
+
function Me(r) {
|
300
300
|
return r;
|
301
301
|
}
|
302
|
-
function
|
303
|
-
return r.length === 0 ?
|
302
|
+
function Ne(r) {
|
303
|
+
return r.length === 0 ? Me : r.length === 1 ? r[0] : function(e) {
|
304
304
|
return r.reduce(function(i, s) {
|
305
305
|
return s(i);
|
306
306
|
}, e);
|
@@ -314,8 +314,8 @@ 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, n =
|
318
|
-
return
|
317
|
+
var s = this, n = Le(t) ? t : new wt(t, e, i);
|
318
|
+
return G(function() {
|
319
319
|
var o = s, a = o.operator, c = o.source;
|
320
320
|
n.add(a ? a.call(n, c) : c ? s._subscribe(n) : s._trySubscribe(n));
|
321
321
|
}), n;
|
@@ -344,12 +344,12 @@ var jt = function() {
|
|
344
344
|
}, r.prototype._subscribe = function(t) {
|
345
345
|
var e;
|
346
346
|
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
347
|
-
}, r.prototype[
|
347
|
+
}, r.prototype[Re] = function() {
|
348
348
|
return this;
|
349
349
|
}, r.prototype.pipe = function() {
|
350
350
|
for (var t = [], e = 0; e < arguments.length; e++)
|
351
351
|
t[e] = arguments[e];
|
352
|
-
return
|
352
|
+
return Ne(t)(this);
|
353
353
|
}, r.prototype.toPromise = function(t) {
|
354
354
|
var e = this;
|
355
355
|
return t = Ht(t), new t(function(i, s) {
|
@@ -370,13 +370,13 @@ function Ht(r) {
|
|
370
370
|
var t;
|
371
371
|
return (t = r ?? le.Promise) !== null && t !== void 0 ? t : Promise;
|
372
372
|
}
|
373
|
-
function
|
373
|
+
function Ue(r) {
|
374
374
|
return r && _(r.next) && _(r.error) && _(r.complete);
|
375
375
|
}
|
376
|
-
function
|
377
|
-
return r && r instanceof de ||
|
376
|
+
function Le(r) {
|
377
|
+
return r && r instanceof de || Ue(r) && he(r);
|
378
378
|
}
|
379
|
-
var
|
379
|
+
var je = ae(function(r) {
|
380
380
|
return function() {
|
381
381
|
r(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
382
382
|
};
|
@@ -391,10 +391,10 @@ var Le = ae(function(r) {
|
|
391
391
|
return i.operator = e, i;
|
392
392
|
}, t.prototype._throwIfClosed = function() {
|
393
393
|
if (this.closed)
|
394
|
-
throw new
|
394
|
+
throw new je();
|
395
395
|
}, t.prototype.next = function(e) {
|
396
396
|
var i = this;
|
397
|
-
|
397
|
+
G(function() {
|
398
398
|
var s, n;
|
399
399
|
if (i._throwIfClosed(), !i.isStopped) {
|
400
400
|
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
@@ -403,8 +403,8 @@ var Le = ae(function(r) {
|
|
403
403
|
var c = a.value;
|
404
404
|
c.next(e);
|
405
405
|
}
|
406
|
-
} catch (
|
407
|
-
s = { error:
|
406
|
+
} catch (l) {
|
407
|
+
s = { error: l };
|
408
408
|
} finally {
|
409
409
|
try {
|
410
410
|
a && !a.done && (n = o.return) && n.call(o);
|
@@ -416,7 +416,7 @@ var Le = ae(function(r) {
|
|
416
416
|
});
|
417
417
|
}, t.prototype.error = function(e) {
|
418
418
|
var i = this;
|
419
|
-
|
419
|
+
G(function() {
|
420
420
|
if (i._throwIfClosed(), !i.isStopped) {
|
421
421
|
i.hasError = i.isStopped = !0, i.thrownError = e;
|
422
422
|
for (var s = i.observers; s.length; )
|
@@ -425,7 +425,7 @@ var Le = ae(function(r) {
|
|
425
425
|
});
|
426
426
|
}, t.prototype.complete = function() {
|
427
427
|
var e = this;
|
428
|
-
|
428
|
+
G(function() {
|
429
429
|
if (e._throwIfClosed(), !e.isStopped) {
|
430
430
|
e.isStopped = !0;
|
431
431
|
for (var i = e.observers; i.length; )
|
@@ -478,7 +478,7 @@ var Le = 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;
|
@@ -501,10 +501,10 @@ var Le = ae(function(r) {
|
|
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(
|
@@ -527,7 +527,7 @@ class Dt {
|
|
527
527
|
* Copyright 2019 Google LLC
|
528
528
|
* SPDX-License-Identifier: BSD-3-Clause
|
529
529
|
*/
|
530
|
-
const
|
530
|
+
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();
|
531
531
|
let fe = class {
|
532
532
|
constructor(t, e, i) {
|
533
533
|
if (this._$cssResult$ = !0, i !== Ct) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
@@ -546,33 +546,33 @@ let fe = class {
|
|
546
546
|
return this.cssText;
|
547
547
|
}
|
548
548
|
};
|
549
|
-
const
|
549
|
+
const He = (r) => new fe(typeof r == "string" ? r : r + "", void 0, Ct), U = (r, ...t) => {
|
550
550
|
const e = r.length === 1 ? r[0] : t.reduce((i, s, n) => i + ((o) => {
|
551
551
|
if (o._$cssResult$ === !0) return o.cssText;
|
552
552
|
if (typeof o == "number") return o;
|
553
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
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);
|
558
558
|
else for (const e of t) {
|
559
|
-
const i = document.createElement("style"), s =
|
559
|
+
const i = document.createElement("style"), s = J.litNonce;
|
560
560
|
s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i);
|
561
561
|
}
|
562
562
|
}, Ft = xt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
563
563
|
let e = "";
|
564
564
|
for (const i of t.cssRules) e += i.cssText;
|
565
|
-
return
|
565
|
+
return He(e);
|
566
566
|
})(r) : r;
|
567
567
|
/**
|
568
568
|
* @license
|
569
569
|
* Copyright 2017 Google LLC
|
570
570
|
* SPDX-License-Identifier: BSD-3-Clause
|
571
571
|
*/
|
572
|
-
const { is:
|
572
|
+
const { is: De, defineProperty: ze, getOwnPropertyDescriptor: Fe, getOwnPropertyNames: Ve, getOwnPropertySymbols: We, getPrototypeOf: Ye } = Object, C = globalThis, Vt = C.trustedTypes, qe = Vt ? Vt.emptyScript : "", ct = C.reactiveElementPolyfillSupport, H = (r, t) => r, X = { toAttribute(r, t) {
|
573
573
|
switch (t) {
|
574
574
|
case Boolean:
|
575
|
-
r = r ?
|
575
|
+
r = r ? qe : null;
|
576
576
|
break;
|
577
577
|
case Object:
|
578
578
|
case Array:
|
@@ -597,9 +597,9 @@ const { is: Be, defineProperty: De, getOwnPropertyDescriptor: ze, getOwnProperty
|
|
597
597
|
}
|
598
598
|
}
|
599
599
|
return e;
|
600
|
-
} }, St = (r, t) => !
|
600
|
+
} }, St = (r, t) => !De(r, t), Wt = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: St };
|
601
601
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), C.litPropertyMetadata ?? (C.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
602
|
-
let
|
602
|
+
let T = class extends HTMLElement {
|
603
603
|
static addInitializer(t) {
|
604
604
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
605
605
|
}
|
@@ -609,11 +609,11 @@ let I = class extends HTMLElement {
|
|
609
609
|
static createProperty(t, e = Wt) {
|
610
610
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
611
611
|
const i = Symbol(), s = this.getPropertyDescriptor(t, i, e);
|
612
|
-
s !== void 0 &&
|
612
|
+
s !== void 0 && ze(this.prototype, t, s);
|
613
613
|
}
|
614
614
|
}
|
615
615
|
static getPropertyDescriptor(t, e, i) {
|
616
|
-
const { get: s, set: n } =
|
616
|
+
const { get: s, set: n } = Fe(this.prototype, t) ?? { get() {
|
617
617
|
return this[e];
|
618
618
|
}, set(o) {
|
619
619
|
this[e] = o;
|
@@ -629,14 +629,14 @@ let I = class extends HTMLElement {
|
|
629
629
|
return this.elementProperties.get(t) ?? Wt;
|
630
630
|
}
|
631
631
|
static _$Ei() {
|
632
|
-
if (this.hasOwnProperty(
|
633
|
-
const t =
|
632
|
+
if (this.hasOwnProperty(H("elementProperties"))) return;
|
633
|
+
const t = Ye(this);
|
634
634
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
635
635
|
}
|
636
636
|
static finalize() {
|
637
|
-
if (this.hasOwnProperty(
|
638
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
639
|
-
const e = this.properties, i = [...
|
637
|
+
if (this.hasOwnProperty(H("finalized"))) return;
|
638
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(H("properties"))) {
|
639
|
+
const e = this.properties, i = [...Ve(e), ...We(e)];
|
640
640
|
for (const s of i) this.createProperty(s, e[s]);
|
641
641
|
}
|
642
642
|
const t = this[Symbol.metadata];
|
@@ -685,7 +685,7 @@ let I = class extends HTMLElement {
|
|
685
685
|
}
|
686
686
|
createRenderRoot() {
|
687
687
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
688
|
-
return
|
688
|
+
return Be(t, this.constructor.elementStyles), t;
|
689
689
|
}
|
690
690
|
connectedCallback() {
|
691
691
|
var t;
|
@@ -797,28 +797,28 @@ let I = class extends HTMLElement {
|
|
797
797
|
firstUpdated(t) {
|
798
798
|
}
|
799
799
|
};
|
800
|
-
|
800
|
+
T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[H("elementProperties")] = /* @__PURE__ */ new Map(), T[H("finalized")] = /* @__PURE__ */ new Map(), ct == null || ct({ ReactiveElement: T }), (C.reactiveElementVersions ?? (C.reactiveElementVersions = [])).push("2.0.4");
|
801
801
|
/**
|
802
802
|
* @license
|
803
803
|
* Copyright 2017 Google LLC
|
804
804
|
* SPDX-License-Identifier: BSD-3-Clause
|
805
805
|
*/
|
806
|
-
const
|
807
|
-
\f\r]`,
|
808
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Zt = /'/g,
|
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
|
+
\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"), 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, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o =
|
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
|
819
|
-
for (;
|
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
820
|
const f = o === S && r[a + 1].startsWith("/>") ? " " : "";
|
821
|
-
n += o ===
|
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
823
|
return [ye(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
824
824
|
};
|
@@ -827,23 +827,23 @@ let $t = class be {
|
|
827
827
|
let s;
|
828
828
|
this.parts = [];
|
829
829
|
let n = 0, o = 0;
|
830
|
-
const a = t.length - 1, c = this.parts, [
|
831
|
-
if (this.el = be.createElement(
|
830
|
+
const a = t.length - 1, c = this.parts, [l, h] = Je(t, e);
|
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;
|
833
833
|
d.replaceWith(...d.childNodes);
|
834
834
|
}
|
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: n, name: g[2], strings: f, ctor: g[1] === "." ?
|
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
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
849
|
} else if (s.nodeType === 8) if (s.data === me) c.push({ type: 2, index: n });
|
@@ -861,12 +861,12 @@ let $t = class be {
|
|
861
861
|
};
|
862
862
|
function R(r, t, e = r, i) {
|
863
863
|
var o, a;
|
864
|
-
if (t ===
|
864
|
+
if (t === I) return t;
|
865
865
|
let s = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
866
|
-
const n =
|
866
|
+
const n = F(t) ? void 0 : t._$litDirective$;
|
867
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
|
-
class
|
869
|
+
class Xe {
|
870
870
|
constructor(t, e) {
|
871
871
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
872
872
|
}
|
@@ -882,8 +882,8 @@ class Ge {
|
|
882
882
|
let n = P.nextNode(), o = 0, a = 0, c = i[0];
|
883
883
|
for (; c !== void 0; ) {
|
884
884
|
if (o === c.index) {
|
885
|
-
let
|
886
|
-
c.type === 2 ?
|
885
|
+
let l;
|
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
|
}
|
@@ -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),
|
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,26 +923,26 @@ 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
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
931
|
if (((n = this._$AH) == null ? void 0 : n._$AD) === s) this._$AH.p(e);
|
932
932
|
else {
|
933
|
-
const o = new
|
933
|
+
const o = new Xe(s, this), a = o.u(this.options);
|
934
934
|
o.p(e), this.T(a), this._$AH = o;
|
935
935
|
}
|
936
936
|
}
|
937
937
|
_$AC(t) {
|
938
|
-
let e =
|
939
|
-
return e === void 0 &&
|
938
|
+
let e = Jt.get(t.strings);
|
939
|
+
return e === void 0 && Jt.set(t.strings, e = new $t(t)), e;
|
940
940
|
}
|
941
941
|
k(t) {
|
942
942
|
Et(this._$AH) || (this._$AH = [], this._$AR());
|
943
943
|
const e = this._$AH;
|
944
944
|
let i, s = 0;
|
945
|
-
for (const n of t) s === e.length ? e.push(i = new q(this.O(
|
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) {
|
@@ -965,46 +965,46 @@ class nt {
|
|
965
965
|
return this._$AM._$AU;
|
966
966
|
}
|
967
967
|
constructor(t, e, i, s, n) {
|
968
|
-
this.type = 1, this._$AH =
|
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
971
|
const n = this.strings;
|
972
972
|
let o = !1;
|
973
|
-
if (n === void 0) t = R(this, t, e, 0), o = !
|
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
|
-
let c,
|
977
|
-
for (t = n[0], c = 0; c < n.length - 1; c++)
|
976
|
+
let c, l;
|
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
|
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
|
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
|
1001
|
+
class ei extends nt {
|
1002
1002
|
constructor(t, e, i, s, n) {
|
1003
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 ===
|
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
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) {
|
@@ -1012,7 +1012,7 @@ class ti extends nt {
|
|
1012
1012
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
1013
1013
|
}
|
1014
1014
|
}
|
1015
|
-
class
|
1015
|
+
class ii {
|
1016
1016
|
constructor(t, e, i) {
|
1017
1017
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
1018
1018
|
}
|
@@ -1023,14 +1023,14 @@ class ei {
|
|
1023
1023
|
R(this, t);
|
1024
1024
|
}
|
1025
1025
|
}
|
1026
|
-
const lt =
|
1027
|
-
lt == null || lt($t, q), (
|
1028
|
-
const
|
1026
|
+
const lt = B.litHtmlPolyfillSupport;
|
1027
|
+
lt == null || lt($t, q), (B.litHtmlVersions ?? (B.litHtmlVersions = [])).push("3.2.1");
|
1028
|
+
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
1032
|
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
1033
|
-
i._$litPart$ = s = new q(t.insertBefore(
|
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
|
};
|
@@ -1039,7 +1039,7 @@ const ii = (r, t, e) => {
|
|
1039
1039
|
* Copyright 2017 Google LLC
|
1040
1040
|
* SPDX-License-Identifier: BSD-3-Clause
|
1041
1041
|
*/
|
1042
|
-
let A = class extends
|
1042
|
+
let A = class extends T {
|
1043
1043
|
constructor() {
|
1044
1044
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
1045
1045
|
}
|
@@ -1050,7 +1050,7 @@ let A = class extends I {
|
|
1050
1050
|
}
|
1051
1051
|
update(t) {
|
1052
1052
|
const e = this.render();
|
1053
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
1053
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = si(e, this.renderRoot, this.renderOptions);
|
1054
1054
|
}
|
1055
1055
|
connectedCallback() {
|
1056
1056
|
var t;
|
@@ -1061,7 +1061,7 @@ let A = class extends I {
|
|
1061
1061
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
1062
1062
|
}
|
1063
1063
|
render() {
|
1064
|
-
return
|
1064
|
+
return I;
|
1065
1065
|
}
|
1066
1066
|
};
|
1067
1067
|
var oe;
|
@@ -1074,7 +1074,7 @@ dt == null || dt({ LitElement: A });
|
|
1074
1074
|
* Copyright 2017 Google LLC
|
1075
1075
|
* SPDX-License-Identifier: BSD-3-Clause
|
1076
1076
|
*/
|
1077
|
-
const
|
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
1079
|
let n = globalThis.litPropertyMetadata.get(s);
|
1080
1080
|
if (n === void 0 && globalThis.litPropertyMetadata.set(s, n = /* @__PURE__ */ new Map()), n.set(e.name, r), i === "accessor") {
|
@@ -1096,7 +1096,7 @@ const si = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged:
|
|
1096
1096
|
throw Error("Unsupported decorator location: " + i);
|
1097
1097
|
};
|
1098
1098
|
function m(r) {
|
1099
|
-
return (t, e) => typeof e == "object" ?
|
1099
|
+
return (t, e) => typeof e == "object" ? ni(r, t, e) : ((i, s, n) => {
|
1100
1100
|
const o = s.hasOwnProperty(n);
|
1101
1101
|
return s.constructor.createProperty(n, o ? { ...i, wrapped: !0 } : i), o ? Object.getOwnPropertyDescriptor(s, n) : void 0;
|
1102
1102
|
})(r, t, e);
|
@@ -1106,15 +1106,15 @@ function m(r) {
|
|
1106
1106
|
* Copyright 2017 Google LLC
|
1107
1107
|
* SPDX-License-Identifier: BSD-3-Clause
|
1108
1108
|
*/
|
1109
|
-
function
|
1109
|
+
function L(r) {
|
1110
1110
|
return m({ ...r, state: !0, attribute: !1 });
|
1111
1111
|
}
|
1112
|
-
var
|
1112
|
+
var oi = Object.defineProperty, ai = (r, t, e, i) => {
|
1113
1113
|
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
1114
1114
|
(o = r[n]) && (s = o(t, e, s) || s);
|
1115
|
-
return s &&
|
1115
|
+
return s && oi(t, e, s), s;
|
1116
1116
|
};
|
1117
|
-
const
|
1117
|
+
const Tt = class Tt extends A {
|
1118
1118
|
constructor() {
|
1119
1119
|
super(...arguments), this.anchor = "BottomRight";
|
1120
1120
|
}
|
@@ -1123,11 +1123,11 @@ const It = class It 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
|
-
|
1130
|
-
|
1129
|
+
Tt.styles = [
|
1130
|
+
U`
|
1131
1131
|
:host {
|
1132
1132
|
position: fixed;
|
1133
1133
|
display: flex;
|
@@ -1145,10 +1145,10 @@ It.styles = [
|
|
1145
1145
|
}
|
1146
1146
|
`
|
1147
1147
|
];
|
1148
|
-
let
|
1149
|
-
|
1148
|
+
let V = Tt;
|
1149
|
+
ai([
|
1150
1150
|
m({ attribute: !0 })
|
1151
|
-
],
|
1151
|
+
], V.prototype, "anchor");
|
1152
1152
|
/**
|
1153
1153
|
* @license
|
1154
1154
|
* Copyright 2017 Google LLC
|
@@ -1176,17 +1176,17 @@ let we = class {
|
|
1176
1176
|
* Copyright 2020 Google LLC
|
1177
1177
|
* SPDX-License-Identifier: BSD-3-Clause
|
1178
1178
|
*/
|
1179
|
-
const
|
1179
|
+
const ci = (r) => r.strings === void 0;
|
1180
1180
|
/**
|
1181
1181
|
* @license
|
1182
1182
|
* Copyright 2017 Google LLC
|
1183
1183
|
* SPDX-License-Identifier: BSD-3-Clause
|
1184
1184
|
*/
|
1185
|
-
const
|
1185
|
+
const D = (r, t) => {
|
1186
1186
|
var i;
|
1187
1187
|
const e = r._$AN;
|
1188
1188
|
if (e === void 0) return !1;
|
1189
|
-
for (const s of e) (i = s._$AO) == null || i.call(s, t, !1),
|
1189
|
+
for (const s of e) (i = s._$AO) == null || i.call(s, t, !1), D(s, t);
|
1190
1190
|
return !0;
|
1191
1191
|
}, tt = (r) => {
|
1192
1192
|
let t, e;
|
@@ -1199,20 +1199,20 @@ const B = (r, t) => {
|
|
1199
1199
|
let e = t._$AN;
|
1200
1200
|
if (e === void 0) t._$AN = e = /* @__PURE__ */ new Set();
|
1201
1201
|
else if (e.has(r)) break;
|
1202
|
-
e.add(r),
|
1202
|
+
e.add(r), di(t);
|
1203
1203
|
}
|
1204
1204
|
};
|
1205
|
-
function
|
1205
|
+
function hi(r) {
|
1206
1206
|
this._$AN !== void 0 ? (tt(this), this._$AM = r, $e(this)) : this._$AM = r;
|
1207
1207
|
}
|
1208
|
-
function
|
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 n = e; n < i.length; n++)
|
1211
|
-
else i != null && (
|
1212
|
-
else
|
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
|
+
else i != null && (D(i, !1), tt(i));
|
1212
|
+
else D(this, r);
|
1213
1213
|
}
|
1214
|
-
const
|
1215
|
-
r.type == Pt.CHILD && (r._$AP ?? (r._$AP =
|
1214
|
+
const di = (r) => {
|
1215
|
+
r.type == Pt.CHILD && (r._$AP ?? (r._$AP = li), r._$AQ ?? (r._$AQ = hi));
|
1216
1216
|
};
|
1217
1217
|
class _e extends we {
|
1218
1218
|
constructor() {
|
@@ -1223,10 +1223,10 @@ class _e extends we {
|
|
1223
1223
|
}
|
1224
1224
|
_$AO(t, e = !0) {
|
1225
1225
|
var i, s;
|
1226
|
-
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (s = this.disconnected) == null || s.call(this)), e && (
|
1226
|
+
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));
|
1227
1227
|
}
|
1228
1228
|
setValue(t) {
|
1229
|
-
if (
|
1229
|
+
if (ci(this._$Ct)) this._$Ct._$AI(t, this);
|
1230
1230
|
else {
|
1231
1231
|
const e = [...this._$Ct._$AH];
|
1232
1232
|
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
@@ -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) => {
|
@@ -1261,8 +1261,8 @@ const pt = /* @__PURE__ */ new Map(), Qt = /* @__PURE__ */ new WeakSet(), te = (
|
|
1261
1261
|
t === 0 && (t = 1, e = { height: "1px" });
|
1262
1262
|
const i = ie(r, t);
|
1263
1263
|
return { value: i, overrideFrom: e, transform: i == null || isNaN(i) ? void 0 : `scaleY(${i})` };
|
1264
|
-
} },
|
1265
|
-
class
|
1264
|
+
} }, fi = { duration: 333, easing: "ease-in-out" }, gi = ["left", "top", "width", "height", "opacity", "color", "background"], se = /* @__PURE__ */ new WeakMap();
|
1265
|
+
class mi extends _e {
|
1266
1266
|
constructor(t) {
|
1267
1267
|
if (super(t), this.t = !1, this.i = null, this.o = null, this.h = !0, this.shouldLog = !1, t.type === Pt.CHILD) throw Error("The `animate` directive must be used in attribute position.");
|
1268
1268
|
this.createFinished();
|
@@ -1278,10 +1278,10 @@ class gi 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;
|
@@ -1295,12 +1295,12 @@ class gi extends _e {
|
|
1295
1295
|
p(t) {
|
1296
1296
|
t = t ?? {};
|
1297
1297
|
const e = this.getController();
|
1298
|
-
e !== void 0 && ((t = { ...e.defaultOptions, ...t }).keyframeOptions = { ...e.defaultOptions.keyframeOptions, ...t.keyframeOptions }), t.properties ?? (t.properties =
|
1298
|
+
e !== void 0 && ((t = { ...e.defaultOptions, ...t }).keyframeOptions = { ...e.defaultOptions.keyframeOptions, ...t.keyframeOptions }), t.properties ?? (t.properties = gi), this.options = t;
|
1299
1299
|
}
|
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 n = e[s] ?? (
|
1303
|
+
const n = e[s] ?? (pt[s] ? void 0 : i[s]), o = Number(n);
|
1304
1304
|
t[s] = isNaN(o) ? n + "" : o;
|
1305
1305
|
}), t;
|
1306
1306
|
}
|
@@ -1325,9 +1325,9 @@ class gi extends _e {
|
|
1325
1325
|
const { from: n, to: o } = this.N(this.A, s, e);
|
1326
1326
|
this.log("measured", [this.A, s, n, o]), t = this.calculateKeyframes(n, o);
|
1327
1327
|
} else {
|
1328
|
-
const n =
|
1328
|
+
const n = ut.get(this.options.inId);
|
1329
1329
|
if (n) {
|
1330
|
-
|
1330
|
+
ut.delete(this.options.inId);
|
1331
1331
|
const { from: o, to: a } = this.N(n, s, e);
|
1332
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, {}]);
|
@@ -1345,7 +1345,7 @@ class gi 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) {
|
@@ -1384,7 +1384,7 @@ class gi extends _e {
|
|
1384
1384
|
}), t;
|
1385
1385
|
}
|
1386
1386
|
j(t, e = this.O()) {
|
1387
|
-
const i = { ...
|
1387
|
+
const i = { ...fi };
|
1388
1388
|
return e.forEach((s) => Object.assign(i, s.options.keyframeOptions)), Object.assign(i, t), i;
|
1389
1389
|
}
|
1390
1390
|
N(t, e, i) {
|
@@ -1400,13 +1400,13 @@ class gi extends _e {
|
|
1400
1400
|
let o = !1;
|
1401
1401
|
const a = {};
|
1402
1402
|
for (const c in e) {
|
1403
|
-
const
|
1404
|
-
if (c in
|
1405
|
-
const d =
|
1406
|
-
if (
|
1407
|
-
const
|
1408
|
-
|
1409
|
-
} else
|
1403
|
+
const l = t[c], h = e[c];
|
1404
|
+
if (c in pt) {
|
1405
|
+
const d = pt[c];
|
1406
|
+
if (l === void 0 || h === void 0) continue;
|
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
1411
|
return s.transformOrigin = n.transformOrigin = i ? "center center" : "top left", this.animatingProperties = a, o ? [s, n] : void 0;
|
1412
1412
|
}
|
@@ -1433,7 +1433,7 @@ class gi extends _e {
|
|
1433
1433
|
this.shouldLog && !this.isDisabled() && console.log(t, this.options.id, e);
|
1434
1434
|
}
|
1435
1435
|
}
|
1436
|
-
const
|
1436
|
+
const vi = Ot(mi), yi = { name: "question", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 4C16.536 4 4 16.536 4 32C4 47.464 16.536 60 32 60C47.464 60 60 47.464 60 32C59.9827 16.5432 47.4568 4.01731 32 4ZM32 55.6923C18.9151 55.6923 8.30769 45.0849 8.30769 32C8.30769 18.9151 18.9151 8.30769 32 8.30769C45.0849 8.30769 55.6923 18.9151 55.6923 32C55.6775 45.0788 45.0788 55.6775 32 55.6923Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.9423 37.5723L36.311 32.9068L36.7354 32.4448C39.7555 29.1161 40.7645 27.0647 40.7645 24.5087C40.7645 23.1091 40.4251 21.7942 39.7041 20.6491C38.3044 18.3587 35.6323 16.9166 32.2816 16.9166C28.7565 16.9166 25.3125 18.7414 23.2581 21.6772L23.1201 21.8791C22.8232 22.3032 22.696 22.6849 22.696 22.9818C22.696 23.7029 23.926 25.9932 25.2833 25.9932C25.5378 25.9932 25.7922 25.9084 26.0467 25.7388C26.2588 25.5691 26.5981 25.2298 27.0647 24.7208C28.8885 22.6849 30.1185 21.9215 31.7726 21.9215C33.6813 21.9215 35.081 23.1939 35.081 24.8905C35.081 26.375 34.2751 27.7746 32.3664 29.8529L28.2523 34.2216C27.9554 34.6033 27.7857 34.9426 27.7857 35.282C27.7857 35.6213 27.9978 36.1726 28.4219 36.8937C29.0581 37.8692 29.7368 38.3782 30.4578 38.3782C30.9244 38.3782 31.3909 38.1237 31.9423 37.5723ZM30.882 47.4972C29.2278 47.4972 27.6585 44.7403 27.6585 43.6799C27.6585 42.1954 30.0761 40.6261 32.4089 40.6261C33.6389 40.6261 34.2751 41.1775 34.2751 42.3227C34.2751 44.0616 33.4692 45.843 32.4513 46.7761C31.9423 47.2427 31.4334 47.4972 30.882 47.4972Z"/></svg>' };
|
1437
1437
|
/**
|
1438
1438
|
* @license
|
1439
1439
|
* Copyright 2018 Google LLC
|
@@ -1460,12 +1460,12 @@ const re = Ot(class extends we {
|
|
1460
1460
|
const o = !!t[n];
|
1461
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
|
-
return
|
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, n, o, a, c,
|
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",
|
@@ -1491,27 +1491,27 @@ const re = Ot(class extends we {
|
|
1491
1491
|
"--interactive-primary-background",
|
1492
1492
|
t
|
1493
1493
|
), w(
|
1494
|
-
(
|
1494
|
+
(l = r.colors) == null ? void 0 : l.interactiveTextOnPrimaryBackground,
|
1495
1495
|
"--interactive-text-on-primary-background",
|
1496
1496
|
t
|
1497
|
-
), w((
|
1497
|
+
), w((h = r.colors) == null ? void 0 : h.focusColor, "--focus-color", t);
|
1498
1498
|
};
|
1499
1499
|
/**
|
1500
1500
|
* @license
|
1501
1501
|
* Copyright 2020 Google LLC
|
1502
1502
|
* SPDX-License-Identifier: BSD-3-Clause
|
1503
1503
|
*/
|
1504
|
-
const xe = () => new
|
1505
|
-
class
|
1504
|
+
const xe = () => new bi();
|
1505
|
+
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") {
|
@@ -1531,14 +1531,14 @@ const ft = /* @__PURE__ */ new WeakMap(), Ce = Ot(class extends _e {
|
|
1531
1531
|
this.rt(this.ct);
|
1532
1532
|
}
|
1533
1533
|
});
|
1534
|
-
var
|
1534
|
+
var wi = Object.defineProperty, K = (r, t, e, i) => {
|
1535
1535
|
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
1536
1536
|
(o = r[n]) && (s = o(t, e, s) || s);
|
1537
|
-
return s &&
|
1537
|
+
return s && wi(t, e, s), s;
|
1538
1538
|
};
|
1539
|
-
const
|
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();
|
@@ -1576,25 +1576,25 @@ const Tt = class Tt extends A {
|
|
1576
1576
|
(t = this.application) != null && t.settings && Ae(this.application.settings.branding, this);
|
1577
1577
|
}
|
1578
1578
|
async _renderSymbol() {
|
1579
|
-
var a, c,
|
1579
|
+
var a, c, l;
|
1580
1580
|
const t = (a = this.application) == null ? void 0 : a.branding(), e = (c = t == null ? void 0 : t.graphics) == null ? void 0 : c.trigger;
|
1581
1581
|
if (e)
|
1582
|
-
return
|
1583
|
-
const i = (
|
1582
|
+
return k` <img src=${e} class="trigger-icon" alt="" /> `;
|
1583
|
+
const i = (l = this.application) == null ? void 0 : l.triggerIcon;
|
1584
1584
|
if (!i)
|
1585
|
-
return
|
1586
|
-
const s = async (
|
1585
|
+
return p;
|
1586
|
+
const s = async (h) => yi, { type: n, content: o } = i;
|
1587
1587
|
switch (n) {
|
1588
1588
|
case "Telia": {
|
1589
|
-
const
|
1590
|
-
return
|
1589
|
+
const h = await s();
|
1590
|
+
return h ? k`<telia-icon
|
1591
1591
|
class="trigger-icon"
|
1592
|
-
svg=${
|
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() {
|
@@ -1605,19 +1605,19 @@ const Tt = class Tt extends A {
|
|
1605
1605
|
}
|
1606
1606
|
render() {
|
1607
1607
|
var t, e, i, s;
|
1608
|
-
return
|
1608
|
+
return k`<div
|
1609
1609
|
class=${re({
|
1610
1610
|
"trigger-container": !0,
|
1611
1611
|
hidden: !this.triggerVisible
|
1612
1612
|
})}
|
1613
1613
|
${Ce(this.containerRef)}
|
1614
1614
|
>
|
1615
|
-
${!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) ?
|
1615
|
+
${!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) ? k`
|
1616
1616
|
<button
|
1617
1617
|
label="${this.application.settings.branding.other.buttonLabelText ?? "Widget trigger"}"
|
1618
1618
|
class="trigger-label"
|
1619
1619
|
@click=${this.toggleActive}
|
1620
|
-
${
|
1620
|
+
${vi({
|
1621
1621
|
keyframeOptions: {},
|
1622
1622
|
in: pi,
|
1623
1623
|
stabilizeOut: !0,
|
@@ -1626,7 +1626,7 @@ const Tt = class Tt extends A {
|
|
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"
|
@@ -1669,8 +1669,8 @@ const Tt = class Tt extends A {
|
|
1669
1669
|
</div>`;
|
1670
1670
|
}
|
1671
1671
|
};
|
1672
|
-
|
1673
|
-
|
1672
|
+
kt.styles = [
|
1673
|
+
U`
|
1674
1674
|
:host {
|
1675
1675
|
--voca-rem-multiplier: 0.625;
|
1676
1676
|
--trigger-label-bg: #f5e0ff;
|
@@ -1801,28 +1801,28 @@ Tt.styles = [
|
|
1801
1801
|
}
|
1802
1802
|
`
|
1803
1803
|
];
|
1804
|
-
let b =
|
1804
|
+
let b = kt;
|
1805
1805
|
K([
|
1806
1806
|
m({ attribute: !1 })
|
1807
1807
|
], b.prototype, "application");
|
1808
1808
|
K([
|
1809
|
-
|
1809
|
+
L()
|
1810
1810
|
], b.prototype, "active");
|
1811
1811
|
K([
|
1812
|
-
|
1812
|
+
L()
|
1813
1813
|
], b.prototype, "triggerVisible");
|
1814
1814
|
K([
|
1815
|
-
|
1815
|
+
L()
|
1816
1816
|
], b.prototype, "loaded");
|
1817
1817
|
K([
|
1818
|
-
|
1818
|
+
L()
|
1819
1819
|
], b.prototype, "icon");
|
1820
|
-
var
|
1820
|
+
var $i = Object.defineProperty, E = (r, t, e, i) => {
|
1821
1821
|
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
1822
1822
|
(o = r[n]) && (s = o(t, e, s) || s);
|
1823
|
-
return s &&
|
1823
|
+
return s && $i(t, e, s), s;
|
1824
1824
|
};
|
1825
|
-
const
|
1825
|
+
const _i = (r) => {
|
1826
1826
|
const e = class e extends r {
|
1827
1827
|
constructor() {
|
1828
1828
|
super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
|
@@ -1848,7 +1848,7 @@ const $i = (r) => {
|
|
1848
1848
|
};
|
1849
1849
|
e.styles = [
|
1850
1850
|
// (superClass as unknown as typeof LitElement).styles ?? [],
|
1851
|
-
|
1851
|
+
U`
|
1852
1852
|
:host {
|
1853
1853
|
font-family: var(--font-family);
|
1854
1854
|
grid-column: span var(--width);
|
@@ -1878,13 +1878,13 @@ const $i = (r) => {
|
|
1878
1878
|
], t.prototype, "application"), E([
|
1879
1879
|
m({ attribute: !1 })
|
1880
1880
|
], t.prototype, "parent"), t;
|
1881
|
-
}, Rt = class Rt extends
|
1881
|
+
}, Rt = class Rt extends _i(A) {
|
1882
1882
|
render() {
|
1883
|
-
return
|
1883
|
+
return k`Non resolved component`;
|
1884
1884
|
}
|
1885
1885
|
};
|
1886
1886
|
Rt.styles = [
|
1887
|
-
|
1887
|
+
U`
|
1888
1888
|
:host {
|
1889
1889
|
display: block;
|
1890
1890
|
}
|
@@ -1896,7 +1896,7 @@ let et = Rt;
|
|
1896
1896
|
* Copyright 2021 Google LLC
|
1897
1897
|
* SPDX-License-Identifier: BSD-3-Clause
|
1898
1898
|
*/
|
1899
|
-
function*
|
1899
|
+
function* Ai(r, t) {
|
1900
1900
|
if (r !== void 0) {
|
1901
1901
|
let e = 0;
|
1902
1902
|
for (const i of r) yield t(i, e++);
|
@@ -1908,7 +1908,7 @@ var $ = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r))
|
|
1908
1908
|
* Copyright 2021 Google LLC
|
1909
1909
|
* SPDX-License-Identifier: BSD-3-Clause
|
1910
1910
|
*/
|
1911
|
-
let
|
1911
|
+
let xi = class extends Event {
|
1912
1912
|
constructor(t, e, i) {
|
1913
1913
|
super("context-request", { bubbles: !0, composed: !0 }), this.context = t, this.callback = e, this.subscribe = i ?? !1;
|
1914
1914
|
}
|
@@ -1923,7 +1923,7 @@ let Ai = class extends Event {
|
|
1923
1923
|
* Copyright 2021 Google LLC
|
1924
1924
|
* SPDX-License-Identifier: BSD-3-Clause
|
1925
1925
|
*/
|
1926
|
-
class
|
1926
|
+
class Ci {
|
1927
1927
|
get value() {
|
1928
1928
|
return this.o;
|
1929
1929
|
}
|
@@ -1956,12 +1956,12 @@ class xi {
|
|
1956
1956
|
* Copyright 2021 Google LLC
|
1957
1957
|
* SPDX-License-Identifier: BSD-3-Clause
|
1958
1958
|
*/
|
1959
|
-
let
|
1959
|
+
let Si = class extends Event {
|
1960
1960
|
constructor(t) {
|
1961
1961
|
super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
|
1962
1962
|
}
|
1963
1963
|
};
|
1964
|
-
class ne extends
|
1964
|
+
class ne extends Ci {
|
1965
1965
|
constructor(t, e, i) {
|
1966
1966
|
var s, n;
|
1967
1967
|
super(e.context !== void 0 ? e.initialValue : i), this.onContextRequest = (o) => {
|
@@ -1971,7 +1971,7 @@ class ne extends xi {
|
|
1971
1971
|
const a = o.composedPath()[0];
|
1972
1972
|
if (o.context !== this.context || a === this.host) return;
|
1973
1973
|
const c = /* @__PURE__ */ new Set();
|
1974
|
-
for (const [
|
1974
|
+
for (const [l, { consumerHost: h }] of this.subscriptions) c.has(l) || (c.add(l), h.dispatchEvent(new xi(this.context, l, !0)));
|
1975
1975
|
o.stopPropagation();
|
1976
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
|
}
|
@@ -1979,7 +1979,7 @@ class ne extends xi {
|
|
1979
1979
|
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
1980
1980
|
}
|
1981
1981
|
hostConnected() {
|
1982
|
-
this.host.dispatchEvent(new
|
1982
|
+
this.host.dispatchEvent(new Si(this.context));
|
1983
1983
|
}
|
1984
1984
|
}
|
1985
1985
|
/**
|
@@ -1987,7 +1987,7 @@ class ne extends xi {
|
|
1987
1987
|
* Copyright 2017 Google LLC
|
1988
1988
|
* SPDX-License-Identifier: BSD-3-Clause
|
1989
1989
|
*/
|
1990
|
-
function
|
1990
|
+
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() {
|
@@ -2024,14 +2024,14 @@ function Si({ context: r }) {
|
|
2024
2024
|
}
|
2025
2025
|
};
|
2026
2026
|
}
|
2027
|
-
var
|
2027
|
+
var Pi = Object.defineProperty, Se = (r, t, e, i) => {
|
2028
2028
|
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
2029
2029
|
(o = r[n]) && (s = o(t, e, s) || s);
|
2030
|
-
return s &&
|
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();
|
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,12 +2056,12 @@ 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")), window.self !== window.top && this.renderRoot.host.classList.add("embedded"),
|
2060
|
-
${
|
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
|
};
|
2064
|
-
Mt.styles =
|
2064
|
+
Mt.styles = U`
|
2065
2065
|
:host {
|
2066
2066
|
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
2067
2067
|
--spacing-xs: 0.2rem;
|
@@ -2106,6 +2106,18 @@ Mt.styles = N`
|
|
2106
2106
|
position: fixed;
|
2107
2107
|
}
|
2108
2108
|
|
2109
|
+
:host(.fullscreen.floating) {
|
2110
|
+
inset: 0 !important;
|
2111
|
+
height: 100% !important;
|
2112
|
+
width: auto !important;
|
2113
|
+
max-height: none !important;
|
2114
|
+
}
|
2115
|
+
|
2116
|
+
:host(.fullscreen.floating) .widget-container {
|
2117
|
+
box-shadow: none !important;
|
2118
|
+
border-radius: 0 !important;
|
2119
|
+
}
|
2120
|
+
|
2109
2121
|
@media screen and (max-width: 800px) {
|
2110
2122
|
:host(.floating) {
|
2111
2123
|
inset: 0;
|
@@ -2197,12 +2209,15 @@ Mt.styles = N`
|
|
2197
2209
|
pointer-events: none;
|
2198
2210
|
}
|
2199
2211
|
`;
|
2200
|
-
let
|
2201
|
-
|
2212
|
+
let M = Mt;
|
2213
|
+
Se([
|
2214
|
+
m({ attribute: !0 })
|
2215
|
+
], M.prototype, "fullscreen");
|
2216
|
+
Se([
|
2202
2217
|
m({ attribute: !1 }),
|
2203
|
-
|
2204
|
-
],
|
2205
|
-
class
|
2218
|
+
Ei({ context: Oi })
|
2219
|
+
], M.prototype, "application");
|
2220
|
+
class Ii {
|
2206
2221
|
constructor() {
|
2207
2222
|
this.root = this.createRoot();
|
2208
2223
|
}
|
@@ -2210,31 +2225,31 @@ class ki {
|
|
2210
2225
|
this.root.application = e;
|
2211
2226
|
const i = (a) => {
|
2212
2227
|
if (Array.isArray(a)) {
|
2213
|
-
const [c, ...
|
2228
|
+
const [c, ...l] = a;
|
2214
2229
|
return {
|
2215
2230
|
definitionId: c,
|
2216
|
-
overrides:
|
2231
|
+
overrides: l
|
2217
2232
|
};
|
2218
2233
|
}
|
2219
2234
|
return {
|
2220
2235
|
definitionId: a,
|
2221
2236
|
overrides: []
|
2222
2237
|
};
|
2223
|
-
}, s = (a, c,
|
2224
|
-
|
2225
|
-
const
|
2238
|
+
}, s = (a, c, l, h) => {
|
2239
|
+
l.forEach((d) => {
|
2240
|
+
const u = i(d), f = h[u.definitionId];
|
2226
2241
|
if (!f) {
|
2227
2242
|
console.error(
|
2228
|
-
`No definition found for component type '${
|
2243
|
+
`No definition found for component type '${u.definitionId}'.`
|
2229
2244
|
);
|
2230
2245
|
return;
|
2231
2246
|
}
|
2232
2247
|
const g = a.createNode(f.type, f.type);
|
2233
|
-
g && (g.name =
|
2248
|
+
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(
|
2234
2249
|
a,
|
2235
2250
|
g,
|
2236
2251
|
f.children,
|
2237
|
-
|
2252
|
+
h
|
2238
2253
|
// views
|
2239
2254
|
));
|
2240
2255
|
});
|
@@ -2242,7 +2257,7 @@ class ki {
|
|
2242
2257
|
return s(this, this.root, [n], o), this.root;
|
2243
2258
|
}
|
2244
2259
|
createRoot() {
|
2245
|
-
return typeof window < "u" && (window.customElements.get("ace-wrapper") || window.customElements.define("ace-wrapper",
|
2260
|
+
return typeof window < "u" && (window.customElements.get("ace-wrapper") || window.customElements.define("ace-wrapper", M)), document.createElement("ace-wrapper");
|
2246
2261
|
}
|
2247
2262
|
createNode(t, e) {
|
2248
2263
|
if (!this.resolveComponent(e))
|
@@ -2286,7 +2301,7 @@ const it = class it {
|
|
2286
2301
|
it.ResolveWebComponentName = (t) => `ace-${t}`;
|
2287
2302
|
let _t = it;
|
2288
2303
|
var y = /* @__PURE__ */ ((r) => (r.Necessary = "necessary", r.Functional = "functional", r.Analytics = "analytics", r))(y || {});
|
2289
|
-
class
|
2304
|
+
class Ti {
|
2290
2305
|
constructor(t, e, i, s) {
|
2291
2306
|
this.disallowedKeys = [], this.widgetId = t, this.storage = e === "localStorage" ? window.localStorage : window.sessionStorage, this.policy = i, this.storageEntries = s;
|
2292
2307
|
}
|
@@ -2340,7 +2355,7 @@ class Ii {
|
|
2340
2355
|
return `ace_${this.widgetId.substring(0, 7)}-${t}`;
|
2341
2356
|
}
|
2342
2357
|
}
|
2343
|
-
class
|
2358
|
+
class ki {
|
2344
2359
|
constructor() {
|
2345
2360
|
this.texts = /* @__PURE__ */ new Map();
|
2346
2361
|
}
|
@@ -2355,7 +2370,8 @@ class Ti {
|
|
2355
2370
|
return this.texts.get(t) || e;
|
2356
2371
|
}
|
2357
2372
|
}
|
2358
|
-
|
2373
|
+
const Ri = "1.1.82-rc.10";
|
2374
|
+
class Mi {
|
2359
2375
|
constructor(t) {
|
2360
2376
|
this.widget = t, this.name = t.name;
|
2361
2377
|
}
|
@@ -2365,28 +2381,41 @@ class Ri {
|
|
2365
2381
|
close() {
|
2366
2382
|
this.widget.hide();
|
2367
2383
|
}
|
2384
|
+
setFullscreenMode(t) {
|
2385
|
+
this.widget.setFullscreenMode(t);
|
2386
|
+
}
|
2368
2387
|
setZIndex(t) {
|
2369
2388
|
this.widget.setZIndex(t);
|
2370
2389
|
}
|
2390
|
+
version() {
|
2391
|
+
return {
|
2392
|
+
version: Ri
|
2393
|
+
};
|
2394
|
+
}
|
2371
2395
|
}
|
2372
|
-
class
|
2396
|
+
class Ni {
|
2373
2397
|
constructor(t, e, i, s, n) {
|
2374
|
-
this.id = t, this.name = e, this.container = i, this.settings = s, this.options = n, this.platform = new
|
2375
|
-
var
|
2398
|
+
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
|
+
var l;
|
2376
2400
|
const c = a.data;
|
2377
2401
|
switch (c.type) {
|
2378
2402
|
case "set-storage-policies": {
|
2379
|
-
const { policies:
|
2380
|
-
[y.Analytics]:
|
2381
|
-
[y.Necessary]:
|
2382
|
-
[y.Functional]:
|
2403
|
+
const { policies: h } = c.data || [], d = {
|
2404
|
+
[y.Analytics]: h.includes("analytics"),
|
2405
|
+
[y.Necessary]: h.includes("necessary"),
|
2406
|
+
[y.Functional]: h.includes("functional")
|
2383
2407
|
};
|
2384
2408
|
this.storage.updatePolicy(d);
|
2385
2409
|
return;
|
2386
2410
|
}
|
2387
2411
|
case "disallow-storage-key": {
|
2388
|
-
const { storageKey:
|
2389
|
-
|
2412
|
+
const { storageKey: h } = c.data || null;
|
2413
|
+
h && this.storage.disallowKey(h);
|
2414
|
+
return;
|
2415
|
+
}
|
2416
|
+
case "set-fullscreen-mode": {
|
2417
|
+
const { value: h } = c.data;
|
2418
|
+
typeof h == "boolean" && this.setFullscreenMode(h);
|
2390
2419
|
return;
|
2391
2420
|
}
|
2392
2421
|
case "open": {
|
@@ -2398,13 +2427,13 @@ class Mi {
|
|
2398
2427
|
return;
|
2399
2428
|
}
|
2400
2429
|
case "set-z-index": {
|
2401
|
-
const { zIndex:
|
2402
|
-
|
2430
|
+
const { zIndex: h } = c.data || null;
|
2431
|
+
h && this.setZIndex(h);
|
2403
2432
|
return;
|
2404
2433
|
}
|
2405
2434
|
case "deactivate-widget": {
|
2406
|
-
const
|
2407
|
-
this.hide(), (
|
2435
|
+
const h = this.storage.get("open");
|
2436
|
+
this.hide(), (l = this.trigger) == null || l.hideTrigger(), h && this.storage.set("open", !0);
|
2408
2437
|
return;
|
2409
2438
|
}
|
2410
2439
|
default:
|
@@ -2416,7 +2445,7 @@ class Mi {
|
|
2416
2445
|
[y.Functional]: !0,
|
2417
2446
|
[y.Analytics]: !0
|
2418
2447
|
};
|
2419
|
-
this.storage = new
|
2448
|
+
this.storage = new Ti(
|
2420
2449
|
this.id,
|
2421
2450
|
"sessionStorage",
|
2422
2451
|
o,
|
@@ -2424,17 +2453,20 @@ class Mi {
|
|
2424
2453
|
), 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);
|
2425
2454
|
}
|
2426
2455
|
async activate() {
|
2427
|
-
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(
|
2456
|
+
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(pe.Ready), this.autoActivate) {
|
2428
2457
|
const t = this.render();
|
2429
2458
|
t && this._getTargetElement().appendChild(t);
|
2430
2459
|
}
|
2431
|
-
window != null && window.parent
|
2432
|
-
{
|
2433
|
-
|
2434
|
-
|
2435
|
-
|
2436
|
-
|
2437
|
-
|
2460
|
+
if (window != null && window.parent) {
|
2461
|
+
const { version: t } = this.api.version();
|
2462
|
+
window.parent.postMessage(
|
2463
|
+
{
|
2464
|
+
type: "widget-activated",
|
2465
|
+
data: { widgetId: this.id, version: t }
|
2466
|
+
},
|
2467
|
+
"*"
|
2468
|
+
);
|
2469
|
+
}
|
2438
2470
|
}
|
2439
2471
|
async loadPlugins() {
|
2440
2472
|
for await (const t of this.plugins)
|
@@ -2483,13 +2515,16 @@ class Mi {
|
|
2483
2515
|
let e = document.querySelector(
|
2484
2516
|
`ace-trigger-slot.${t}`
|
2485
2517
|
);
|
2486
|
-
return e || (e = new
|
2518
|
+
return e || (e = new V(), e.anchor = this.anchor, document.body.appendChild(e)), e;
|
2487
2519
|
}
|
2488
2520
|
return document.body;
|
2489
2521
|
}
|
2490
2522
|
_isEmbeddedInIFrame() {
|
2491
2523
|
return window.self !== window.top;
|
2492
2524
|
}
|
2525
|
+
setFullscreenMode(t) {
|
2526
|
+
this.fullscreen = t, this.root && (this.root.fullscreen = !0);
|
2527
|
+
}
|
2493
2528
|
render() {
|
2494
2529
|
if (this._isEmbeddedInIFrame())
|
2495
2530
|
return this.root;
|
@@ -2500,7 +2535,7 @@ class Mi {
|
|
2500
2535
|
return this.root;
|
2501
2536
|
}
|
2502
2537
|
}
|
2503
|
-
const
|
2538
|
+
const Yi = (r) => new W(r), st = class st {
|
2504
2539
|
// TODO:
|
2505
2540
|
// private static endpoint = 'http://localhost:5299/api'; // TODO:
|
2506
2541
|
constructor(t = st.endpoint) {
|
@@ -2514,7 +2549,7 @@ const Wi = (r) => new W(r), st = class st {
|
|
2514
2549
|
apps: (i.widgets || []).map((s) => {
|
2515
2550
|
let n = $.Trigger;
|
2516
2551
|
s.renderStrategy.toLowerCase() === "inline" && (n = $.Inline);
|
2517
|
-
const o = s.widgetId ? s.widgetId : s.id, a = typeof s.autoActivate == "boolean" ? s.autoActivate : !1, c = typeof s.anchor == "string" ? s.anchor : "BottomRight",
|
2552
|
+
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";
|
2518
2553
|
return {
|
2519
2554
|
id: o,
|
2520
2555
|
widgetId: o,
|
@@ -2523,7 +2558,7 @@ const Wi = (r) => new W(r), st = class st {
|
|
2523
2558
|
anchor: c,
|
2524
2559
|
triggerIcon: {
|
2525
2560
|
type: "Telia",
|
2526
|
-
content:
|
2561
|
+
content: l
|
2527
2562
|
}
|
2528
2563
|
};
|
2529
2564
|
})
|
@@ -2539,7 +2574,7 @@ const Wi = (r) => new W(r), st = class st {
|
|
2539
2574
|
};
|
2540
2575
|
st.endpoint = "https://widgets.ace.teliacompany.net/api";
|
2541
2576
|
let W = st;
|
2542
|
-
class
|
2577
|
+
class Ui {
|
2543
2578
|
constructor(t) {
|
2544
2579
|
this.site = t;
|
2545
2580
|
}
|
@@ -2563,7 +2598,7 @@ class Ni {
|
|
2563
2598
|
});
|
2564
2599
|
}
|
2565
2600
|
}
|
2566
|
-
class
|
2601
|
+
class Li {
|
2567
2602
|
constructor() {
|
2568
2603
|
this.applications = [], this.container = new Dt("environment", this), this.bootstrapped = !1, this.site = null, this.widgetAPIHandlers = /* @__PURE__ */ new Map(), this.siteConfigurationHandlers = [], setTimeout(() => {
|
2569
2604
|
this.notifyWidgetsOfCreation();
|
@@ -2589,20 +2624,20 @@ class Ui {
|
|
2589
2624
|
i.condition.type === "url" && n.forEach((o) => {
|
2590
2625
|
const a = o.action.type === "render_widget";
|
2591
2626
|
if ((o.value === s || o.value === "*") && a) {
|
2592
|
-
let
|
2627
|
+
let l = { widgetId: "" };
|
2593
2628
|
try {
|
2594
|
-
|
2629
|
+
l = JSON.parse(o.action.data);
|
2595
2630
|
} catch {
|
2596
|
-
|
2631
|
+
l = {
|
2597
2632
|
widgetId: ""
|
2598
2633
|
};
|
2599
2634
|
}
|
2600
|
-
const
|
2601
|
-
(
|
2635
|
+
const h = t.findIndex(
|
2636
|
+
(u) => u.id === l.widgetId
|
2602
2637
|
) > -1, d = this.applications.find(
|
2603
|
-
(
|
2638
|
+
(u) => u.id === l.widgetId
|
2604
2639
|
);
|
2605
|
-
d && !
|
2640
|
+
d && !h && (d.autoActivate = !0, t.push(d));
|
2606
2641
|
}
|
2607
2642
|
});
|
2608
2643
|
});
|
@@ -2639,7 +2674,7 @@ class Ui {
|
|
2639
2674
|
e(i == null ? void 0 : i.api);
|
2640
2675
|
}
|
2641
2676
|
registerApp(t, e, i, s) {
|
2642
|
-
const n = new Dt(e, this), o = new
|
2677
|
+
const n = new Dt(e, this), o = new Ni(t, e, n, i, s);
|
2643
2678
|
this.applications.push(o);
|
2644
2679
|
}
|
2645
2680
|
registerSite(t) {
|
@@ -2651,9 +2686,9 @@ class Ui {
|
|
2651
2686
|
}), this;
|
2652
2687
|
}
|
2653
2688
|
}
|
2654
|
-
class
|
2689
|
+
class ji {
|
2655
2690
|
constructor(t) {
|
2656
|
-
this.configurations = [], this.httpClient = new W(), this.api = new
|
2691
|
+
this.configurations = [], this.httpClient = new W(), this.api = new Ui(this), this.triggers = [], this.httpClient = new W(), typeof t == "string" ? this.url = t : (t.httpClient && (this.httpClient = t.httpClient), this.loadFromConfig(t));
|
2657
2692
|
}
|
2658
2693
|
async load(t) {
|
2659
2694
|
const e = await this.httpClient.getSite(t);
|
@@ -2681,7 +2716,7 @@ class Li {
|
|
2681
2716
|
}
|
2682
2717
|
async bootstrap(t) {
|
2683
2718
|
var e;
|
2684
|
-
this.url && await this.load(this.url), this.environment = new
|
2719
|
+
this.url && await this.load(this.url), this.environment = new Li(), this.addGlobal(this.environment);
|
2685
2720
|
for await (const i of this.configurations) {
|
2686
2721
|
const s = await this.httpClient.getWidget(i.widgetId);
|
2687
2722
|
s && ((e = this.environment) == null || e.registerApp(
|
@@ -2707,10 +2742,10 @@ class Li {
|
|
2707
2742
|
}), globalThis.ace = t;
|
2708
2743
|
}
|
2709
2744
|
}
|
2710
|
-
var
|
2745
|
+
var Hi = Object.defineProperty, It = (r, t, e, i) => {
|
2711
2746
|
for (var s = void 0, n = r.length - 1, o; n >= 0; n--)
|
2712
2747
|
(o = r[n]) && (s = o(t, e, s) || s);
|
2713
|
-
return s &&
|
2748
|
+
return s && Hi(t, e, s), s;
|
2714
2749
|
};
|
2715
2750
|
const Nt = class Nt extends A {
|
2716
2751
|
constructor() {
|
@@ -2736,7 +2771,7 @@ const Nt = class Nt extends A {
|
|
2736
2771
|
}
|
2737
2772
|
render() {
|
2738
2773
|
if (!this.widget || this.status !== "activated")
|
2739
|
-
return
|
2774
|
+
return p;
|
2740
2775
|
if (this.widget.renderStrategy === $.Trigger) {
|
2741
2776
|
const t = new b();
|
2742
2777
|
return t.application = this.widget, t;
|
@@ -2745,43 +2780,43 @@ const Nt = class Nt extends A {
|
|
2745
2780
|
}
|
2746
2781
|
};
|
2747
2782
|
Nt.styles = [
|
2748
|
-
|
2783
|
+
U`
|
2749
2784
|
:host {
|
2750
2785
|
display: block;
|
2751
2786
|
}
|
2752
2787
|
`
|
2753
2788
|
];
|
2754
|
-
let
|
2755
|
-
|
2789
|
+
let N = Nt;
|
2790
|
+
It([
|
2756
2791
|
m({ attribute: !0 })
|
2757
|
-
],
|
2758
|
-
|
2759
|
-
|
2760
|
-
],
|
2761
|
-
|
2762
|
-
|
2763
|
-
],
|
2764
|
-
customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot",
|
2792
|
+
], N.prototype, "name");
|
2793
|
+
It([
|
2794
|
+
L()
|
2795
|
+
], N.prototype, "widget");
|
2796
|
+
It([
|
2797
|
+
L()
|
2798
|
+
], N.prototype, "status");
|
2799
|
+
customElements.get("ace-trigger-slot") || customElements.define("ace-trigger-slot", V);
|
2765
2800
|
customElements.get("ace-trigger") || customElements.define("ace-trigger", b);
|
2766
2801
|
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", et);
|
2767
|
-
customElements.get("ace-wrapper") || customElements.define("ace-wrapper",
|
2768
|
-
customElements.get("ace-widget") || customElements.define("ace-widget",
|
2769
|
-
const
|
2770
|
-
const i = new
|
2802
|
+
customElements.get("ace-wrapper") || customElements.define("ace-wrapper", M);
|
2803
|
+
customElements.get("ace-widget") || customElements.define("ace-widget", N);
|
2804
|
+
const qi = async (r, t, e = {}) => {
|
2805
|
+
const i = new ji(r);
|
2771
2806
|
e.httpClient && i.setHttpClient(e.httpClient), await i.bootstrap(t);
|
2772
2807
|
};
|
2773
2808
|
export {
|
2774
|
-
|
2775
|
-
|
2809
|
+
N as AceWidget,
|
2810
|
+
Ni as Application,
|
2776
2811
|
Dt as Container,
|
2777
|
-
|
2812
|
+
Li as Environment,
|
2778
2813
|
W as HttpClient,
|
2779
|
-
|
2814
|
+
ji as Site,
|
2780
2815
|
y as StorageCategory,
|
2781
|
-
|
2816
|
+
Ti as StorageService,
|
2782
2817
|
b as Trigger,
|
2783
|
-
|
2818
|
+
_i as WidgetComponent,
|
2784
2819
|
Oi as applicationContext,
|
2785
|
-
|
2786
|
-
|
2820
|
+
qi as bootstrap,
|
2821
|
+
Yi as createHttpClient
|
2787
2822
|
};
|