@telia-ace/widget-core-flamingo 1.0.14 → 1.1.12-rc.5
Sign up to get free protection for your applications and to get access to all the features.
- package/bootstrap.d.ts +3 -0
- package/components/ace-widget.component.d.ts +21 -0
- package/components/trigger.component.d.ts +14 -0
- package/components/unresolved.component.d.ts +7 -0
- package/components/widget.component.d.ts +18 -0
- package/components/wrapper.component.d.ts +13 -0
- package/index-5087564d.mjs +335 -0
- package/index-6dd00f59.js +1 -0
- package/index.d.ts +9 -0
- package/index.js +261 -0
- package/index.mjs +2021 -0
- package/models/application.d.ts +27 -0
- package/models/container.d.ts +16 -0
- package/models/environment.d.ts +12 -0
- package/models/site.d.ts +12 -0
- package/package.json +7 -43
- package/services/component-platform.d.ts +13 -0
- package/services/component-resolver.d.ts +8 -0
- package/services/http-client.service.d.ts +11 -0
- package/types.d.ts +47 -0
- package/utils/map-branding.d.ts +1 -0
- package/LICENSE.txt +0 -6
- package/README.md +0 -3
- package/dist/action-resolver.d.ts +0 -9
- package/dist/action-resolver.d.ts.map +0 -1
- package/dist/bootstrap.d.ts +0 -16
- package/dist/bootstrap.d.ts.map +0 -1
- package/dist/component-platform/actions-controller.d.ts +0 -41
- package/dist/component-platform/actions-controller.d.ts.map +0 -1
- package/dist/component-platform/changeset-provider.d.ts +0 -9
- package/dist/component-platform/changeset-provider.d.ts.map +0 -1
- package/dist/component-platform/component-configuration-api.d.ts +0 -3
- package/dist/component-platform/component-configuration-api.d.ts.map +0 -1
- package/dist/component-platform/component-controller.d.ts +0 -39
- package/dist/component-platform/component-controller.d.ts.map +0 -1
- package/dist/component-platform/component-node-collection.d.ts +0 -19
- package/dist/component-platform/component-node-collection.d.ts.map +0 -1
- package/dist/component-platform/component-node.d.ts +0 -64
- package/dist/component-platform/component-node.d.ts.map +0 -1
- package/dist/component-platform/component-platform.d.ts +0 -55
- package/dist/component-platform/component-platform.d.ts.map +0 -1
- package/dist/component-platform/component-query.d.ts +0 -17
- package/dist/component-platform/component-query.d.ts.map +0 -1
- package/dist/component-platform/create-component-model.d.ts +0 -37
- package/dist/component-platform/create-component-model.d.ts.map +0 -1
- package/dist/component-platform/custom-component-handler.d.ts +0 -22
- package/dist/component-platform/custom-component-handler.d.ts.map +0 -1
- package/dist/component-platform/descriptor.d.ts +0 -9
- package/dist/component-platform/descriptor.d.ts.map +0 -1
- package/dist/component-platform/extend-component.d.ts +0 -9
- package/dist/component-platform/extend-component.d.ts.map +0 -1
- package/dist/component-platform/index.d.ts +0 -19
- package/dist/component-platform/index.d.ts.map +0 -1
- package/dist/component-platform/queries.d.ts +0 -7
- package/dist/component-platform/queries.d.ts.map +0 -1
- package/dist/component-platform/state-processor.d.ts +0 -13
- package/dist/component-platform/state-processor.d.ts.map +0 -1
- package/dist/component-resolver.d.ts +0 -15
- package/dist/component-resolver.d.ts.map +0 -1
- package/dist/environment.d.ts +0 -49
- package/dist/environment.d.ts.map +0 -1
- package/dist/event-subscriber.d.ts +0 -8
- package/dist/event-subscriber.d.ts.map +0 -1
- package/dist/implementation.d.ts +0 -8
- package/dist/implementation.d.ts.map +0 -1
- package/dist/index.d.ts +0 -15
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -2076
- package/dist/index.js.map +0 -1
- package/dist/plugin.d.ts +0 -8
- package/dist/plugin.d.ts.map +0 -1
- package/dist/types/configuration.d.ts +0 -87
- package/dist/types/configuration.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/ui.d.ts +0 -49
- package/dist/types/ui.d.ts.map +0 -1
- package/dist/version.d.ts +0 -3
- package/dist/version.d.ts.map +0 -1
- package/dist/widget-type.d.ts +0 -8
- package/dist/widget-type.d.ts.map +0 -1
package/index.mjs
ADDED
@@ -0,0 +1,2021 @@
|
|
1
|
+
var dt = function(r, t) {
|
2
|
+
return dt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, i) {
|
3
|
+
e.__proto__ = i;
|
4
|
+
} || function(e, i) {
|
5
|
+
for (var n in i)
|
6
|
+
Object.prototype.hasOwnProperty.call(i, n) && (e[n] = i[n]);
|
7
|
+
}, dt(r, t);
|
8
|
+
};
|
9
|
+
function L(r, t) {
|
10
|
+
if (typeof t != "function" && t !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
12
|
+
dt(r, t);
|
13
|
+
function e() {
|
14
|
+
this.constructor = r;
|
15
|
+
}
|
16
|
+
r.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
17
|
+
}
|
18
|
+
function ft(r) {
|
19
|
+
var t = typeof Symbol == "function" && Symbol.iterator, e = t && r[t], i = 0;
|
20
|
+
if (e)
|
21
|
+
return e.call(r);
|
22
|
+
if (r && typeof r.length == "number")
|
23
|
+
return {
|
24
|
+
next: function() {
|
25
|
+
return r && i >= r.length && (r = void 0), { value: r && r[i++], done: !r };
|
26
|
+
}
|
27
|
+
};
|
28
|
+
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
29
|
+
}
|
30
|
+
function J(r, t) {
|
31
|
+
var e = typeof Symbol == "function" && r[Symbol.iterator];
|
32
|
+
if (!e)
|
33
|
+
return r;
|
34
|
+
var i = e.call(r), n, s = [], o;
|
35
|
+
try {
|
36
|
+
for (; (t === void 0 || t-- > 0) && !(n = i.next()).done; )
|
37
|
+
s.push(n.value);
|
38
|
+
} catch (a) {
|
39
|
+
o = { error: a };
|
40
|
+
} finally {
|
41
|
+
try {
|
42
|
+
n && !n.done && (e = i.return) && e.call(i);
|
43
|
+
} finally {
|
44
|
+
if (o)
|
45
|
+
throw o.error;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
return s;
|
49
|
+
}
|
50
|
+
function K(r, t, e) {
|
51
|
+
if (e || arguments.length === 2)
|
52
|
+
for (var i = 0, n = t.length, s; i < n; i++)
|
53
|
+
(s || !(i in t)) && (s || (s = Array.prototype.slice.call(t, 0, i)), s[i] = t[i]);
|
54
|
+
return r.concat(s || Array.prototype.slice.call(t));
|
55
|
+
}
|
56
|
+
function m(r) {
|
57
|
+
return typeof r == "function";
|
58
|
+
}
|
59
|
+
function Dt(r) {
|
60
|
+
var t = function(i) {
|
61
|
+
Error.call(i), i.stack = new Error().stack;
|
62
|
+
}, e = r(t);
|
63
|
+
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
64
|
+
}
|
65
|
+
var ot = Dt(function(r) {
|
66
|
+
return function(e) {
|
67
|
+
r(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
68
|
+
` + e.map(function(i, n) {
|
69
|
+
return n + 1 + ") " + i.toString();
|
70
|
+
}).join(`
|
71
|
+
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
72
|
+
};
|
73
|
+
});
|
74
|
+
function gt(r, t) {
|
75
|
+
if (r) {
|
76
|
+
var e = r.indexOf(t);
|
77
|
+
0 <= e && r.splice(e, 1);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
var rt = function() {
|
81
|
+
function r(t) {
|
82
|
+
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
83
|
+
}
|
84
|
+
return r.prototype.unsubscribe = function() {
|
85
|
+
var t, e, i, n, s;
|
86
|
+
if (!this.closed) {
|
87
|
+
this.closed = !0;
|
88
|
+
var o = this._parentage;
|
89
|
+
if (o)
|
90
|
+
if (this._parentage = null, Array.isArray(o))
|
91
|
+
try {
|
92
|
+
for (var a = ft(o), c = a.next(); !c.done; c = a.next()) {
|
93
|
+
var h = c.value;
|
94
|
+
h.remove(this);
|
95
|
+
}
|
96
|
+
} catch (v) {
|
97
|
+
t = { error: v };
|
98
|
+
} finally {
|
99
|
+
try {
|
100
|
+
c && !c.done && (e = a.return) && e.call(a);
|
101
|
+
} finally {
|
102
|
+
if (t)
|
103
|
+
throw t.error;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
else
|
107
|
+
o.remove(this);
|
108
|
+
var d = this.initialTeardown;
|
109
|
+
if (m(d))
|
110
|
+
try {
|
111
|
+
d();
|
112
|
+
} catch (v) {
|
113
|
+
s = v instanceof ot ? v.errors : [v];
|
114
|
+
}
|
115
|
+
var l = this._finalizers;
|
116
|
+
if (l) {
|
117
|
+
this._finalizers = null;
|
118
|
+
try {
|
119
|
+
for (var f = ft(l), p = f.next(); !p.done; p = f.next()) {
|
120
|
+
var g = p.value;
|
121
|
+
try {
|
122
|
+
wt(g);
|
123
|
+
} catch (v) {
|
124
|
+
s = s ?? [], v instanceof ot ? s = K(K([], J(s)), J(v.errors)) : s.push(v);
|
125
|
+
}
|
126
|
+
}
|
127
|
+
} catch (v) {
|
128
|
+
i = { error: v };
|
129
|
+
} finally {
|
130
|
+
try {
|
131
|
+
p && !p.done && (n = f.return) && n.call(f);
|
132
|
+
} finally {
|
133
|
+
if (i)
|
134
|
+
throw i.error;
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
if (s)
|
139
|
+
throw new ot(s);
|
140
|
+
}
|
141
|
+
}, r.prototype.add = function(t) {
|
142
|
+
var e;
|
143
|
+
if (t && t !== this)
|
144
|
+
if (this.closed)
|
145
|
+
wt(t);
|
146
|
+
else {
|
147
|
+
if (t instanceof r) {
|
148
|
+
if (t.closed || t._hasParent(this))
|
149
|
+
return;
|
150
|
+
t._addParent(this);
|
151
|
+
}
|
152
|
+
(this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
|
153
|
+
}
|
154
|
+
}, r.prototype._hasParent = function(t) {
|
155
|
+
var e = this._parentage;
|
156
|
+
return e === t || Array.isArray(e) && e.includes(t);
|
157
|
+
}, r.prototype._addParent = function(t) {
|
158
|
+
var e = this._parentage;
|
159
|
+
this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
|
160
|
+
}, r.prototype._removeParent = function(t) {
|
161
|
+
var e = this._parentage;
|
162
|
+
e === t ? this._parentage = null : Array.isArray(e) && gt(e, t);
|
163
|
+
}, r.prototype.remove = function(t) {
|
164
|
+
var e = this._finalizers;
|
165
|
+
e && gt(e, t), t instanceof r && t._removeParent(this);
|
166
|
+
}, r.EMPTY = function() {
|
167
|
+
var t = new r();
|
168
|
+
return t.closed = !0, t;
|
169
|
+
}(), r;
|
170
|
+
}(), Lt = rt.EMPTY;
|
171
|
+
function Bt(r) {
|
172
|
+
return r instanceof rt || r && "closed" in r && m(r.remove) && m(r.add) && m(r.unsubscribe);
|
173
|
+
}
|
174
|
+
function wt(r) {
|
175
|
+
m(r) ? r() : r.unsubscribe();
|
176
|
+
}
|
177
|
+
var zt = {
|
178
|
+
onUnhandledError: null,
|
179
|
+
onStoppedNotification: null,
|
180
|
+
Promise: void 0,
|
181
|
+
useDeprecatedSynchronousErrorHandling: !1,
|
182
|
+
useDeprecatedNextContext: !1
|
183
|
+
}, vt = {
|
184
|
+
setTimeout: function(r, t) {
|
185
|
+
for (var e = [], i = 2; i < arguments.length; i++)
|
186
|
+
e[i - 2] = arguments[i];
|
187
|
+
var n = vt.delegate;
|
188
|
+
return n != null && n.setTimeout ? n.setTimeout.apply(n, K([r, t], J(e))) : setTimeout.apply(void 0, K([r, t], J(e)));
|
189
|
+
},
|
190
|
+
clearTimeout: function(r) {
|
191
|
+
var t = vt.delegate;
|
192
|
+
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(r);
|
193
|
+
},
|
194
|
+
delegate: void 0
|
195
|
+
};
|
196
|
+
function ae(r) {
|
197
|
+
vt.setTimeout(function() {
|
198
|
+
throw r;
|
199
|
+
});
|
200
|
+
}
|
201
|
+
function At() {
|
202
|
+
}
|
203
|
+
function Y(r) {
|
204
|
+
r();
|
205
|
+
}
|
206
|
+
var Wt = function(r) {
|
207
|
+
L(t, r);
|
208
|
+
function t(e) {
|
209
|
+
var i = r.call(this) || this;
|
210
|
+
return i.isStopped = !1, e ? (i.destination = e, Bt(e) && e.add(i)) : i.destination = pe, i;
|
211
|
+
}
|
212
|
+
return t.create = function(e, i, n) {
|
213
|
+
return new yt(e, i, n);
|
214
|
+
}, t.prototype.next = function(e) {
|
215
|
+
this.isStopped || this._next(e);
|
216
|
+
}, t.prototype.error = function(e) {
|
217
|
+
this.isStopped || (this.isStopped = !0, this._error(e));
|
218
|
+
}, t.prototype.complete = function() {
|
219
|
+
this.isStopped || (this.isStopped = !0, this._complete());
|
220
|
+
}, t.prototype.unsubscribe = function() {
|
221
|
+
this.closed || (this.isStopped = !0, r.prototype.unsubscribe.call(this), this.destination = null);
|
222
|
+
}, t.prototype._next = function(e) {
|
223
|
+
this.destination.next(e);
|
224
|
+
}, t.prototype._error = function(e) {
|
225
|
+
try {
|
226
|
+
this.destination.error(e);
|
227
|
+
} finally {
|
228
|
+
this.unsubscribe();
|
229
|
+
}
|
230
|
+
}, t.prototype._complete = function() {
|
231
|
+
try {
|
232
|
+
this.destination.complete();
|
233
|
+
} finally {
|
234
|
+
this.unsubscribe();
|
235
|
+
}
|
236
|
+
}, t;
|
237
|
+
}(rt), ce = Function.prototype.bind;
|
238
|
+
function at(r, t) {
|
239
|
+
return ce.call(r, t);
|
240
|
+
}
|
241
|
+
var le = function() {
|
242
|
+
function r(t) {
|
243
|
+
this.partialObserver = t;
|
244
|
+
}
|
245
|
+
return r.prototype.next = function(t) {
|
246
|
+
var e = this.partialObserver;
|
247
|
+
if (e.next)
|
248
|
+
try {
|
249
|
+
e.next(t);
|
250
|
+
} catch (i) {
|
251
|
+
V(i);
|
252
|
+
}
|
253
|
+
}, r.prototype.error = function(t) {
|
254
|
+
var e = this.partialObserver;
|
255
|
+
if (e.error)
|
256
|
+
try {
|
257
|
+
e.error(t);
|
258
|
+
} catch (i) {
|
259
|
+
V(i);
|
260
|
+
}
|
261
|
+
else
|
262
|
+
V(t);
|
263
|
+
}, r.prototype.complete = function() {
|
264
|
+
var t = this.partialObserver;
|
265
|
+
if (t.complete)
|
266
|
+
try {
|
267
|
+
t.complete();
|
268
|
+
} catch (e) {
|
269
|
+
V(e);
|
270
|
+
}
|
271
|
+
}, r;
|
272
|
+
}(), yt = function(r) {
|
273
|
+
L(t, r);
|
274
|
+
function t(e, i, n) {
|
275
|
+
var s = r.call(this) || this, o;
|
276
|
+
if (m(e) || !e)
|
277
|
+
o = {
|
278
|
+
next: e ?? void 0,
|
279
|
+
error: i ?? void 0,
|
280
|
+
complete: n ?? void 0
|
281
|
+
};
|
282
|
+
else {
|
283
|
+
var a;
|
284
|
+
s && zt.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
|
285
|
+
return s.unsubscribe();
|
286
|
+
}, o = {
|
287
|
+
next: e.next && at(e.next, a),
|
288
|
+
error: e.error && at(e.error, a),
|
289
|
+
complete: e.complete && at(e.complete, a)
|
290
|
+
}) : o = e;
|
291
|
+
}
|
292
|
+
return s.destination = new le(o), s;
|
293
|
+
}
|
294
|
+
return t;
|
295
|
+
}(Wt);
|
296
|
+
function V(r) {
|
297
|
+
ae(r);
|
298
|
+
}
|
299
|
+
function he(r) {
|
300
|
+
throw r;
|
301
|
+
}
|
302
|
+
var pe = {
|
303
|
+
closed: !0,
|
304
|
+
next: At,
|
305
|
+
error: he,
|
306
|
+
complete: At
|
307
|
+
}, ue = function() {
|
308
|
+
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
309
|
+
}();
|
310
|
+
function de(r) {
|
311
|
+
return r;
|
312
|
+
}
|
313
|
+
function fe(r) {
|
314
|
+
return r.length === 0 ? de : r.length === 1 ? r[0] : function(e) {
|
315
|
+
return r.reduce(function(i, n) {
|
316
|
+
return n(i);
|
317
|
+
}, e);
|
318
|
+
};
|
319
|
+
}
|
320
|
+
var St = function() {
|
321
|
+
function r(t) {
|
322
|
+
t && (this._subscribe = t);
|
323
|
+
}
|
324
|
+
return r.prototype.lift = function(t) {
|
325
|
+
var e = new r();
|
326
|
+
return e.source = this, e.operator = t, e;
|
327
|
+
}, r.prototype.subscribe = function(t, e, i) {
|
328
|
+
var n = this, s = ve(t) ? t : new yt(t, e, i);
|
329
|
+
return Y(function() {
|
330
|
+
var o = n, a = o.operator, c = o.source;
|
331
|
+
s.add(a ? a.call(s, c) : c ? n._subscribe(s) : n._trySubscribe(s));
|
332
|
+
}), s;
|
333
|
+
}, r.prototype._trySubscribe = function(t) {
|
334
|
+
try {
|
335
|
+
return this._subscribe(t);
|
336
|
+
} catch (e) {
|
337
|
+
t.error(e);
|
338
|
+
}
|
339
|
+
}, r.prototype.forEach = function(t, e) {
|
340
|
+
var i = this;
|
341
|
+
return e = Et(e), new e(function(n, s) {
|
342
|
+
var o = new yt({
|
343
|
+
next: function(a) {
|
344
|
+
try {
|
345
|
+
t(a);
|
346
|
+
} catch (c) {
|
347
|
+
s(c), o.unsubscribe();
|
348
|
+
}
|
349
|
+
},
|
350
|
+
error: s,
|
351
|
+
complete: n
|
352
|
+
});
|
353
|
+
i.subscribe(o);
|
354
|
+
});
|
355
|
+
}, r.prototype._subscribe = function(t) {
|
356
|
+
var e;
|
357
|
+
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
358
|
+
}, r.prototype[ue] = function() {
|
359
|
+
return this;
|
360
|
+
}, r.prototype.pipe = function() {
|
361
|
+
for (var t = [], e = 0; e < arguments.length; e++)
|
362
|
+
t[e] = arguments[e];
|
363
|
+
return fe(t)(this);
|
364
|
+
}, r.prototype.toPromise = function(t) {
|
365
|
+
var e = this;
|
366
|
+
return t = Et(t), new t(function(i, n) {
|
367
|
+
var s;
|
368
|
+
e.subscribe(function(o) {
|
369
|
+
return s = o;
|
370
|
+
}, function(o) {
|
371
|
+
return n(o);
|
372
|
+
}, function() {
|
373
|
+
return i(s);
|
374
|
+
});
|
375
|
+
});
|
376
|
+
}, r.create = function(t) {
|
377
|
+
return new r(t);
|
378
|
+
}, r;
|
379
|
+
}();
|
380
|
+
function Et(r) {
|
381
|
+
var t;
|
382
|
+
return (t = r ?? zt.Promise) !== null && t !== void 0 ? t : Promise;
|
383
|
+
}
|
384
|
+
function ge(r) {
|
385
|
+
return r && m(r.next) && m(r.error) && m(r.complete);
|
386
|
+
}
|
387
|
+
function ve(r) {
|
388
|
+
return r && r instanceof Wt || ge(r) && Bt(r);
|
389
|
+
}
|
390
|
+
var ye = Dt(function(r) {
|
391
|
+
return function() {
|
392
|
+
r(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
393
|
+
};
|
394
|
+
}), Gt = function(r) {
|
395
|
+
L(t, r);
|
396
|
+
function t() {
|
397
|
+
var e = r.call(this) || this;
|
398
|
+
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
399
|
+
}
|
400
|
+
return t.prototype.lift = function(e) {
|
401
|
+
var i = new Ct(this, this);
|
402
|
+
return i.operator = e, i;
|
403
|
+
}, t.prototype._throwIfClosed = function() {
|
404
|
+
if (this.closed)
|
405
|
+
throw new ye();
|
406
|
+
}, t.prototype.next = function(e) {
|
407
|
+
var i = this;
|
408
|
+
Y(function() {
|
409
|
+
var n, s;
|
410
|
+
if (i._throwIfClosed(), !i.isStopped) {
|
411
|
+
i.currentObservers || (i.currentObservers = Array.from(i.observers));
|
412
|
+
try {
|
413
|
+
for (var o = ft(i.currentObservers), a = o.next(); !a.done; a = o.next()) {
|
414
|
+
var c = a.value;
|
415
|
+
c.next(e);
|
416
|
+
}
|
417
|
+
} catch (h) {
|
418
|
+
n = { error: h };
|
419
|
+
} finally {
|
420
|
+
try {
|
421
|
+
a && !a.done && (s = o.return) && s.call(o);
|
422
|
+
} finally {
|
423
|
+
if (n)
|
424
|
+
throw n.error;
|
425
|
+
}
|
426
|
+
}
|
427
|
+
}
|
428
|
+
});
|
429
|
+
}, t.prototype.error = function(e) {
|
430
|
+
var i = this;
|
431
|
+
Y(function() {
|
432
|
+
if (i._throwIfClosed(), !i.isStopped) {
|
433
|
+
i.hasError = i.isStopped = !0, i.thrownError = e;
|
434
|
+
for (var n = i.observers; n.length; )
|
435
|
+
n.shift().error(e);
|
436
|
+
}
|
437
|
+
});
|
438
|
+
}, t.prototype.complete = function() {
|
439
|
+
var e = this;
|
440
|
+
Y(function() {
|
441
|
+
if (e._throwIfClosed(), !e.isStopped) {
|
442
|
+
e.isStopped = !0;
|
443
|
+
for (var i = e.observers; i.length; )
|
444
|
+
i.shift().complete();
|
445
|
+
}
|
446
|
+
});
|
447
|
+
}, t.prototype.unsubscribe = function() {
|
448
|
+
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
|
449
|
+
}, Object.defineProperty(t.prototype, "observed", {
|
450
|
+
get: function() {
|
451
|
+
var e;
|
452
|
+
return ((e = this.observers) === null || e === void 0 ? void 0 : e.length) > 0;
|
453
|
+
},
|
454
|
+
enumerable: !1,
|
455
|
+
configurable: !0
|
456
|
+
}), t.prototype._trySubscribe = function(e) {
|
457
|
+
return this._throwIfClosed(), r.prototype._trySubscribe.call(this, e);
|
458
|
+
}, t.prototype._subscribe = function(e) {
|
459
|
+
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
460
|
+
}, t.prototype._innerSubscribe = function(e) {
|
461
|
+
var i = this, n = this, s = n.hasError, o = n.isStopped, a = n.observers;
|
462
|
+
return s || o ? Lt : (this.currentObservers = null, a.push(e), new rt(function() {
|
463
|
+
i.currentObservers = null, gt(a, e);
|
464
|
+
}));
|
465
|
+
}, t.prototype._checkFinalizedStatuses = function(e) {
|
466
|
+
var i = this, n = i.hasError, s = i.thrownError, o = i.isStopped;
|
467
|
+
n ? e.error(s) : o && e.complete();
|
468
|
+
}, t.prototype.asObservable = function() {
|
469
|
+
var e = new St();
|
470
|
+
return e.source = this, e;
|
471
|
+
}, t.create = function(e, i) {
|
472
|
+
return new Ct(e, i);
|
473
|
+
}, t;
|
474
|
+
}(St), Ct = function(r) {
|
475
|
+
L(t, r);
|
476
|
+
function t(e, i) {
|
477
|
+
var n = r.call(this) || this;
|
478
|
+
return n.destination = e, n.source = i, n;
|
479
|
+
}
|
480
|
+
return t.prototype.next = function(e) {
|
481
|
+
var i, n;
|
482
|
+
(n = (i = this.destination) === null || i === void 0 ? void 0 : i.next) === null || n === void 0 || n.call(i, e);
|
483
|
+
}, t.prototype.error = function(e) {
|
484
|
+
var i, n;
|
485
|
+
(n = (i = this.destination) === null || i === void 0 ? void 0 : i.error) === null || n === void 0 || n.call(i, e);
|
486
|
+
}, t.prototype.complete = function() {
|
487
|
+
var e, i;
|
488
|
+
(i = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || i === void 0 || i.call(e);
|
489
|
+
}, t.prototype._subscribe = function(e) {
|
490
|
+
var i, n;
|
491
|
+
return (n = (i = this.source) === null || i === void 0 ? void 0 : i.subscribe(e)) !== null && n !== void 0 ? n : Lt;
|
492
|
+
}, t;
|
493
|
+
}(Gt), me = function(r) {
|
494
|
+
L(t, r);
|
495
|
+
function t(e) {
|
496
|
+
var i = r.call(this) || this;
|
497
|
+
return i._value = e, i;
|
498
|
+
}
|
499
|
+
return Object.defineProperty(t.prototype, "value", {
|
500
|
+
get: function() {
|
501
|
+
return this.getValue();
|
502
|
+
},
|
503
|
+
enumerable: !1,
|
504
|
+
configurable: !0
|
505
|
+
}), t.prototype._subscribe = function(e) {
|
506
|
+
var i = r.prototype._subscribe.call(this, e);
|
507
|
+
return !i.closed && e.next(this._value), i;
|
508
|
+
}, t.prototype.getValue = function() {
|
509
|
+
var e = this, i = e.hasError, n = e.thrownError, s = e._value;
|
510
|
+
if (i)
|
511
|
+
throw n;
|
512
|
+
return this._throwIfClosed(), s;
|
513
|
+
}, t.prototype.next = function(e) {
|
514
|
+
r.prototype.next.call(this, this._value = e);
|
515
|
+
}, t;
|
516
|
+
}(Gt), Vt = /* @__PURE__ */ ((r) => (r.Loading = "loading", r.Ready = "ready", r))(Vt || {});
|
517
|
+
class xt {
|
518
|
+
constructor(t, e) {
|
519
|
+
this.state = new me(
|
520
|
+
"loading"
|
521
|
+
/* Loading */
|
522
|
+
), this.resolvers = /* @__PURE__ */ new Map(), this.name = t, this.environment = e, this.state.next(
|
523
|
+
"ready"
|
524
|
+
/* Ready */
|
525
|
+
);
|
526
|
+
}
|
527
|
+
setState(t) {
|
528
|
+
this.state.next(t);
|
529
|
+
}
|
530
|
+
async register(t, e) {
|
531
|
+
this.resolvers.set(t, e);
|
532
|
+
}
|
533
|
+
async get(t) {
|
534
|
+
return this.resolvers.get(t);
|
535
|
+
}
|
536
|
+
}
|
537
|
+
/**
|
538
|
+
* @license
|
539
|
+
* Copyright 2019 Google LLC
|
540
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
541
|
+
*/
|
542
|
+
const q = globalThis, bt = q.ShadowRoot && (q.ShadyCSS === void 0 || q.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), Pt = /* @__PURE__ */ new WeakMap();
|
543
|
+
let Ft = class {
|
544
|
+
constructor(t, e, i) {
|
545
|
+
if (this._$cssResult$ = !0, i !== _t)
|
546
|
+
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
547
|
+
this.cssText = t, this.t = e;
|
548
|
+
}
|
549
|
+
get styleSheet() {
|
550
|
+
let t = this.o;
|
551
|
+
const e = this.t;
|
552
|
+
if (bt && t === void 0) {
|
553
|
+
const i = e !== void 0 && e.length === 1;
|
554
|
+
i && (t = Pt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Pt.set(e, t));
|
555
|
+
}
|
556
|
+
return t;
|
557
|
+
}
|
558
|
+
toString() {
|
559
|
+
return this.cssText;
|
560
|
+
}
|
561
|
+
};
|
562
|
+
const be = (r) => new Ft(typeof r == "string" ? r : r + "", void 0, _t), B = (r, ...t) => {
|
563
|
+
const e = r.length === 1 ? r[0] : t.reduce((i, n, s) => i + ((o) => {
|
564
|
+
if (o._$cssResult$ === !0)
|
565
|
+
return o.cssText;
|
566
|
+
if (typeof o == "number")
|
567
|
+
return o;
|
568
|
+
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.");
|
569
|
+
})(n) + r[s + 1], r[0]);
|
570
|
+
return new Ft(e, r, _t);
|
571
|
+
}, _e = (r, t) => {
|
572
|
+
if (bt)
|
573
|
+
r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
574
|
+
else
|
575
|
+
for (const e of t) {
|
576
|
+
const i = document.createElement("style"), n = q.litNonce;
|
577
|
+
n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, r.appendChild(i);
|
578
|
+
}
|
579
|
+
}, Ot = bt ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
580
|
+
let e = "";
|
581
|
+
for (const i of t.cssRules)
|
582
|
+
e += i.cssText;
|
583
|
+
return be(e);
|
584
|
+
})(r) : r;
|
585
|
+
/**
|
586
|
+
* @license
|
587
|
+
* Copyright 2017 Google LLC
|
588
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
589
|
+
*/
|
590
|
+
const { is: $e, defineProperty: we, getOwnPropertyDescriptor: Ae, getOwnPropertyNames: Se, getOwnPropertySymbols: Ee, getPrototypeOf: Ce } = Object, $ = globalThis, Tt = $.trustedTypes, xe = Tt ? Tt.emptyScript : "", ct = $.reactiveElementPolyfillSupport, I = (r, t) => r, Z = { toAttribute(r, t) {
|
591
|
+
switch (t) {
|
592
|
+
case Boolean:
|
593
|
+
r = r ? xe : null;
|
594
|
+
break;
|
595
|
+
case Object:
|
596
|
+
case Array:
|
597
|
+
r = r == null ? r : JSON.stringify(r);
|
598
|
+
}
|
599
|
+
return r;
|
600
|
+
}, fromAttribute(r, t) {
|
601
|
+
let e = r;
|
602
|
+
switch (t) {
|
603
|
+
case Boolean:
|
604
|
+
e = r !== null;
|
605
|
+
break;
|
606
|
+
case Number:
|
607
|
+
e = r === null ? null : Number(r);
|
608
|
+
break;
|
609
|
+
case Object:
|
610
|
+
case Array:
|
611
|
+
try {
|
612
|
+
e = JSON.parse(r);
|
613
|
+
} catch {
|
614
|
+
e = null;
|
615
|
+
}
|
616
|
+
}
|
617
|
+
return e;
|
618
|
+
} }, $t = (r, t) => !$e(r, t), Ut = { attribute: !0, type: String, converter: Z, reflect: !1, hasChanged: $t };
|
619
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), $.litPropertyMetadata ?? ($.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
620
|
+
class O extends HTMLElement {
|
621
|
+
static addInitializer(t) {
|
622
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
623
|
+
}
|
624
|
+
static get observedAttributes() {
|
625
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
626
|
+
}
|
627
|
+
static createProperty(t, e = Ut) {
|
628
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
629
|
+
const i = Symbol(), n = this.getPropertyDescriptor(t, i, e);
|
630
|
+
n !== void 0 && we(this.prototype, t, n);
|
631
|
+
}
|
632
|
+
}
|
633
|
+
static getPropertyDescriptor(t, e, i) {
|
634
|
+
const { get: n, set: s } = Ae(this.prototype, t) ?? { get() {
|
635
|
+
return this[e];
|
636
|
+
}, set(o) {
|
637
|
+
this[e] = o;
|
638
|
+
} };
|
639
|
+
return { get() {
|
640
|
+
return n == null ? void 0 : n.call(this);
|
641
|
+
}, set(o) {
|
642
|
+
const a = n == null ? void 0 : n.call(this);
|
643
|
+
s.call(this, o), this.requestUpdate(t, a, i);
|
644
|
+
}, configurable: !0, enumerable: !0 };
|
645
|
+
}
|
646
|
+
static getPropertyOptions(t) {
|
647
|
+
return this.elementProperties.get(t) ?? Ut;
|
648
|
+
}
|
649
|
+
static _$Ei() {
|
650
|
+
if (this.hasOwnProperty(I("elementProperties")))
|
651
|
+
return;
|
652
|
+
const t = Ce(this);
|
653
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
654
|
+
}
|
655
|
+
static finalize() {
|
656
|
+
if (this.hasOwnProperty(I("finalized")))
|
657
|
+
return;
|
658
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(I("properties"))) {
|
659
|
+
const e = this.properties, i = [...Se(e), ...Ee(e)];
|
660
|
+
for (const n of i)
|
661
|
+
this.createProperty(n, e[n]);
|
662
|
+
}
|
663
|
+
const t = this[Symbol.metadata];
|
664
|
+
if (t !== null) {
|
665
|
+
const e = litPropertyMetadata.get(t);
|
666
|
+
if (e !== void 0)
|
667
|
+
for (const [i, n] of e)
|
668
|
+
this.elementProperties.set(i, n);
|
669
|
+
}
|
670
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
671
|
+
for (const [e, i] of this.elementProperties) {
|
672
|
+
const n = this._$Eu(e, i);
|
673
|
+
n !== void 0 && this._$Eh.set(n, e);
|
674
|
+
}
|
675
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
676
|
+
}
|
677
|
+
static finalizeStyles(t) {
|
678
|
+
const e = [];
|
679
|
+
if (Array.isArray(t)) {
|
680
|
+
const i = new Set(t.flat(1 / 0).reverse());
|
681
|
+
for (const n of i)
|
682
|
+
e.unshift(Ot(n));
|
683
|
+
} else
|
684
|
+
t !== void 0 && e.push(Ot(t));
|
685
|
+
return e;
|
686
|
+
}
|
687
|
+
static _$Eu(t, e) {
|
688
|
+
const i = e.attribute;
|
689
|
+
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
690
|
+
}
|
691
|
+
constructor() {
|
692
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
693
|
+
}
|
694
|
+
_$Ev() {
|
695
|
+
var t;
|
696
|
+
this._$Eg = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
697
|
+
}
|
698
|
+
addController(t) {
|
699
|
+
var e;
|
700
|
+
(this._$ES ?? (this._$ES = [])).push(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
701
|
+
}
|
702
|
+
removeController(t) {
|
703
|
+
var e;
|
704
|
+
(e = this._$ES) == null || e.splice(this._$ES.indexOf(t) >>> 0, 1);
|
705
|
+
}
|
706
|
+
_$E_() {
|
707
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
708
|
+
for (const i of e.keys())
|
709
|
+
this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
710
|
+
t.size > 0 && (this._$Ep = t);
|
711
|
+
}
|
712
|
+
createRenderRoot() {
|
713
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
714
|
+
return _e(t, this.constructor.elementStyles), t;
|
715
|
+
}
|
716
|
+
connectedCallback() {
|
717
|
+
var t;
|
718
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) == null || t.forEach((e) => {
|
719
|
+
var i;
|
720
|
+
return (i = e.hostConnected) == null ? void 0 : i.call(e);
|
721
|
+
});
|
722
|
+
}
|
723
|
+
enableUpdating(t) {
|
724
|
+
}
|
725
|
+
disconnectedCallback() {
|
726
|
+
var t;
|
727
|
+
(t = this._$ES) == null || t.forEach((e) => {
|
728
|
+
var i;
|
729
|
+
return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
|
730
|
+
});
|
731
|
+
}
|
732
|
+
attributeChangedCallback(t, e, i) {
|
733
|
+
this._$AK(t, i);
|
734
|
+
}
|
735
|
+
_$EO(t, e) {
|
736
|
+
var s;
|
737
|
+
const i = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, i);
|
738
|
+
if (n !== void 0 && i.reflect === !0) {
|
739
|
+
const o = (((s = i.converter) == null ? void 0 : s.toAttribute) !== void 0 ? i.converter : Z).toAttribute(e, i.type);
|
740
|
+
this._$Em = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$Em = null;
|
741
|
+
}
|
742
|
+
}
|
743
|
+
_$AK(t, e) {
|
744
|
+
var s;
|
745
|
+
const i = this.constructor, n = i._$Eh.get(t);
|
746
|
+
if (n !== void 0 && this._$Em !== n) {
|
747
|
+
const o = i.getPropertyOptions(n), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? o.converter : Z;
|
748
|
+
this._$Em = n, this[n] = a.fromAttribute(e, o.type), this._$Em = null;
|
749
|
+
}
|
750
|
+
}
|
751
|
+
requestUpdate(t, e, i, n = !1, s) {
|
752
|
+
if (t !== void 0) {
|
753
|
+
if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? $t)(n ? s : this[t], e))
|
754
|
+
return;
|
755
|
+
this.C(t, e, i);
|
756
|
+
}
|
757
|
+
this.isUpdatePending === !1 && (this._$Eg = this._$EP());
|
758
|
+
}
|
759
|
+
C(t, e, i) {
|
760
|
+
this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
761
|
+
}
|
762
|
+
async _$EP() {
|
763
|
+
this.isUpdatePending = !0;
|
764
|
+
try {
|
765
|
+
await this._$Eg;
|
766
|
+
} catch (e) {
|
767
|
+
Promise.reject(e);
|
768
|
+
}
|
769
|
+
const t = this.scheduleUpdate();
|
770
|
+
return t != null && await t, !this.isUpdatePending;
|
771
|
+
}
|
772
|
+
scheduleUpdate() {
|
773
|
+
return this.performUpdate();
|
774
|
+
}
|
775
|
+
performUpdate() {
|
776
|
+
var i;
|
777
|
+
if (!this.isUpdatePending)
|
778
|
+
return;
|
779
|
+
if (!this.hasUpdated) {
|
780
|
+
if (this._$Ep) {
|
781
|
+
for (const [s, o] of this._$Ep)
|
782
|
+
this[s] = o;
|
783
|
+
this._$Ep = void 0;
|
784
|
+
}
|
785
|
+
const n = this.constructor.elementProperties;
|
786
|
+
if (n.size > 0)
|
787
|
+
for (const [s, o] of n)
|
788
|
+
o.wrapped !== !0 || this._$AL.has(s) || this[s] === void 0 || this.C(s, this[s], o);
|
789
|
+
}
|
790
|
+
let t = !1;
|
791
|
+
const e = this._$AL;
|
792
|
+
try {
|
793
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$ES) == null || i.forEach((n) => {
|
794
|
+
var s;
|
795
|
+
return (s = n.hostUpdate) == null ? void 0 : s.call(n);
|
796
|
+
}), this.update(e)) : this._$ET();
|
797
|
+
} catch (n) {
|
798
|
+
throw t = !1, this._$ET(), n;
|
799
|
+
}
|
800
|
+
t && this._$AE(e);
|
801
|
+
}
|
802
|
+
willUpdate(t) {
|
803
|
+
}
|
804
|
+
_$AE(t) {
|
805
|
+
var e;
|
806
|
+
(e = this._$ES) == null || e.forEach((i) => {
|
807
|
+
var n;
|
808
|
+
return (n = i.hostUpdated) == null ? void 0 : n.call(i);
|
809
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
810
|
+
}
|
811
|
+
_$ET() {
|
812
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
813
|
+
}
|
814
|
+
get updateComplete() {
|
815
|
+
return this.getUpdateComplete();
|
816
|
+
}
|
817
|
+
getUpdateComplete() {
|
818
|
+
return this._$Eg;
|
819
|
+
}
|
820
|
+
shouldUpdate(t) {
|
821
|
+
return !0;
|
822
|
+
}
|
823
|
+
update(t) {
|
824
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
|
825
|
+
}
|
826
|
+
updated(t) {
|
827
|
+
}
|
828
|
+
firstUpdated(t) {
|
829
|
+
}
|
830
|
+
}
|
831
|
+
O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, O[I("elementProperties")] = /* @__PURE__ */ new Map(), O[I("finalized")] = /* @__PURE__ */ new Map(), ct == null || ct({ ReactiveElement: O }), ($.reactiveElementVersions ?? ($.reactiveElementVersions = [])).push("2.0.1");
|
832
|
+
/**
|
833
|
+
* @license
|
834
|
+
* Copyright 2017 Google LLC
|
835
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
836
|
+
*/
|
837
|
+
const M = globalThis, Q = M.trustedTypes, Rt = Q ? Q.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Yt = "$lit$", _ = `lit$${(Math.random() + "").slice(9)}$`, qt = "?" + _, Pe = `<${qt}>`, x = document, H = () => x.createComment(""), k = (r) => r === null || typeof r != "object" && typeof r != "function", Jt = Array.isArray, Oe = (r) => Jt(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", lt = `[
|
838
|
+
\f\r]`, R = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, It = /-->/g, Mt = />/g, S = RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^
|
839
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), jt = /'/g, Ht = /"/g, Kt = /^(?:script|style|textarea|title)$/i, Te = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), X = Te(1), P = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), kt = /* @__PURE__ */ new WeakMap(), C = x.createTreeWalker(x, 129);
|
840
|
+
function Zt(r, t) {
|
841
|
+
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
842
|
+
throw Error("invalid template strings array");
|
843
|
+
return Rt !== void 0 ? Rt.createHTML(t) : t;
|
844
|
+
}
|
845
|
+
const Ue = (r, t) => {
|
846
|
+
const e = r.length - 1, i = [];
|
847
|
+
let n, s = t === 2 ? "<svg>" : "", o = R;
|
848
|
+
for (let a = 0; a < e; a++) {
|
849
|
+
const c = r[a];
|
850
|
+
let h, d, l = -1, f = 0;
|
851
|
+
for (; f < c.length && (o.lastIndex = f, d = o.exec(c), d !== null); )
|
852
|
+
f = o.lastIndex, o === R ? d[1] === "!--" ? o = It : d[1] !== void 0 ? o = Mt : d[2] !== void 0 ? (Kt.test(d[2]) && (n = RegExp("</" + d[2], "g")), o = S) : d[3] !== void 0 && (o = S) : o === S ? d[0] === ">" ? (o = n ?? R, l = -1) : d[1] === void 0 ? l = -2 : (l = o.lastIndex - d[2].length, h = d[1], o = d[3] === void 0 ? S : d[3] === '"' ? Ht : jt) : o === Ht || o === jt ? o = S : o === It || o === Mt ? o = R : (o = S, n = void 0);
|
853
|
+
const p = o === S && r[a + 1].startsWith("/>") ? " " : "";
|
854
|
+
s += o === R ? c + Pe : l >= 0 ? (i.push(h), c.slice(0, l) + Yt + c.slice(l) + _ + p) : c + _ + (l === -2 ? a : p);
|
855
|
+
}
|
856
|
+
return [Zt(r, s + (r[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
857
|
+
};
|
858
|
+
class N {
|
859
|
+
constructor({ strings: t, _$litType$: e }, i) {
|
860
|
+
let n;
|
861
|
+
this.parts = [];
|
862
|
+
let s = 0, o = 0;
|
863
|
+
const a = t.length - 1, c = this.parts, [h, d] = Ue(t, e);
|
864
|
+
if (this.el = N.createElement(h, i), C.currentNode = this.el.content, e === 2) {
|
865
|
+
const l = this.el.content.firstChild;
|
866
|
+
l.replaceWith(...l.childNodes);
|
867
|
+
}
|
868
|
+
for (; (n = C.nextNode()) !== null && c.length < a; ) {
|
869
|
+
if (n.nodeType === 1) {
|
870
|
+
if (n.hasAttributes())
|
871
|
+
for (const l of n.getAttributeNames())
|
872
|
+
if (l.endsWith(Yt)) {
|
873
|
+
const f = d[o++], p = n.getAttribute(l).split(_), g = /([.?@])?(.*)/.exec(f);
|
874
|
+
c.push({ type: 1, index: s, name: g[2], strings: p, ctor: g[1] === "." ? Ie : g[1] === "?" ? Me : g[1] === "@" ? je : it }), n.removeAttribute(l);
|
875
|
+
} else
|
876
|
+
l.startsWith(_) && (c.push({ type: 6, index: s }), n.removeAttribute(l));
|
877
|
+
if (Kt.test(n.tagName)) {
|
878
|
+
const l = n.textContent.split(_), f = l.length - 1;
|
879
|
+
if (f > 0) {
|
880
|
+
n.textContent = Q ? Q.emptyScript : "";
|
881
|
+
for (let p = 0; p < f; p++)
|
882
|
+
n.append(l[p], H()), C.nextNode(), c.push({ type: 2, index: ++s });
|
883
|
+
n.append(l[f], H());
|
884
|
+
}
|
885
|
+
}
|
886
|
+
} else if (n.nodeType === 8)
|
887
|
+
if (n.data === qt)
|
888
|
+
c.push({ type: 2, index: s });
|
889
|
+
else {
|
890
|
+
let l = -1;
|
891
|
+
for (; (l = n.data.indexOf(_, l + 1)) !== -1; )
|
892
|
+
c.push({ type: 7, index: s }), l += _.length - 1;
|
893
|
+
}
|
894
|
+
s++;
|
895
|
+
}
|
896
|
+
}
|
897
|
+
static createElement(t, e) {
|
898
|
+
const i = x.createElement("template");
|
899
|
+
return i.innerHTML = t, i;
|
900
|
+
}
|
901
|
+
}
|
902
|
+
function T(r, t, e = r, i) {
|
903
|
+
var o, a;
|
904
|
+
if (t === P)
|
905
|
+
return t;
|
906
|
+
let n = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
907
|
+
const s = k(t) ? void 0 : t._$litDirective$;
|
908
|
+
return (n == null ? void 0 : n.constructor) !== s && ((a = n == null ? void 0 : n._$AO) == null || a.call(n, !1), s === void 0 ? n = void 0 : (n = new s(r), n._$AT(r, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t = T(r, n._$AS(r, t.values), n, i)), t;
|
909
|
+
}
|
910
|
+
class Re {
|
911
|
+
constructor(t, e) {
|
912
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
913
|
+
}
|
914
|
+
get parentNode() {
|
915
|
+
return this._$AM.parentNode;
|
916
|
+
}
|
917
|
+
get _$AU() {
|
918
|
+
return this._$AM._$AU;
|
919
|
+
}
|
920
|
+
u(t) {
|
921
|
+
const { el: { content: e }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? x).importNode(e, !0);
|
922
|
+
C.currentNode = n;
|
923
|
+
let s = C.nextNode(), o = 0, a = 0, c = i[0];
|
924
|
+
for (; c !== void 0; ) {
|
925
|
+
if (o === c.index) {
|
926
|
+
let h;
|
927
|
+
c.type === 2 ? h = new z(s, s.nextSibling, this, t) : c.type === 1 ? h = new c.ctor(s, c.name, c.strings, this, t) : c.type === 6 && (h = new He(s, this, t)), this._$AV.push(h), c = i[++a];
|
928
|
+
}
|
929
|
+
o !== (c == null ? void 0 : c.index) && (s = C.nextNode(), o++);
|
930
|
+
}
|
931
|
+
return C.currentNode = x, n;
|
932
|
+
}
|
933
|
+
p(t) {
|
934
|
+
let e = 0;
|
935
|
+
for (const i of this._$AV)
|
936
|
+
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
937
|
+
}
|
938
|
+
}
|
939
|
+
class z {
|
940
|
+
get _$AU() {
|
941
|
+
var t;
|
942
|
+
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
943
|
+
}
|
944
|
+
constructor(t, e, i, n) {
|
945
|
+
this.type = 2, this._$AH = u, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
|
946
|
+
}
|
947
|
+
get parentNode() {
|
948
|
+
let t = this._$AA.parentNode;
|
949
|
+
const e = this._$AM;
|
950
|
+
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
951
|
+
}
|
952
|
+
get startNode() {
|
953
|
+
return this._$AA;
|
954
|
+
}
|
955
|
+
get endNode() {
|
956
|
+
return this._$AB;
|
957
|
+
}
|
958
|
+
_$AI(t, e = this) {
|
959
|
+
t = T(this, t, e), k(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Oe(t) ? this.T(t) : this._(t);
|
960
|
+
}
|
961
|
+
k(t) {
|
962
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
963
|
+
}
|
964
|
+
$(t) {
|
965
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
966
|
+
}
|
967
|
+
_(t) {
|
968
|
+
this._$AH !== u && k(this._$AH) ? this._$AA.nextSibling.data = t : this.$(x.createTextNode(t)), this._$AH = t;
|
969
|
+
}
|
970
|
+
g(t) {
|
971
|
+
var s;
|
972
|
+
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = N.createElement(Zt(i.h, i.h[0]), this.options)), i);
|
973
|
+
if (((s = this._$AH) == null ? void 0 : s._$AD) === n)
|
974
|
+
this._$AH.p(e);
|
975
|
+
else {
|
976
|
+
const o = new Re(n, this), a = o.u(this.options);
|
977
|
+
o.p(e), this.$(a), this._$AH = o;
|
978
|
+
}
|
979
|
+
}
|
980
|
+
_$AC(t) {
|
981
|
+
let e = kt.get(t.strings);
|
982
|
+
return e === void 0 && kt.set(t.strings, e = new N(t)), e;
|
983
|
+
}
|
984
|
+
T(t) {
|
985
|
+
Jt(this._$AH) || (this._$AH = [], this._$AR());
|
986
|
+
const e = this._$AH;
|
987
|
+
let i, n = 0;
|
988
|
+
for (const s of t)
|
989
|
+
n === e.length ? e.push(i = new z(this.k(H()), this.k(H()), this, this.options)) : i = e[n], i._$AI(s), n++;
|
990
|
+
n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
|
991
|
+
}
|
992
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
993
|
+
var i;
|
994
|
+
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
995
|
+
const n = t.nextSibling;
|
996
|
+
t.remove(), t = n;
|
997
|
+
}
|
998
|
+
}
|
999
|
+
setConnected(t) {
|
1000
|
+
var e;
|
1001
|
+
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
1002
|
+
}
|
1003
|
+
}
|
1004
|
+
class it {
|
1005
|
+
get tagName() {
|
1006
|
+
return this.element.tagName;
|
1007
|
+
}
|
1008
|
+
get _$AU() {
|
1009
|
+
return this._$AM._$AU;
|
1010
|
+
}
|
1011
|
+
constructor(t, e, i, n, s) {
|
1012
|
+
this.type = 1, this._$AH = u, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = s, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = u;
|
1013
|
+
}
|
1014
|
+
_$AI(t, e = this, i, n) {
|
1015
|
+
const s = this.strings;
|
1016
|
+
let o = !1;
|
1017
|
+
if (s === void 0)
|
1018
|
+
t = T(this, t, e, 0), o = !k(t) || t !== this._$AH && t !== P, o && (this._$AH = t);
|
1019
|
+
else {
|
1020
|
+
const a = t;
|
1021
|
+
let c, h;
|
1022
|
+
for (t = s[0], c = 0; c < s.length - 1; c++)
|
1023
|
+
h = T(this, a[i + c], e, c), h === P && (h = this._$AH[c]), o || (o = !k(h) || h !== this._$AH[c]), h === u ? t = u : t !== u && (t += (h ?? "") + s[c + 1]), this._$AH[c] = h;
|
1024
|
+
}
|
1025
|
+
o && !n && this.O(t);
|
1026
|
+
}
|
1027
|
+
O(t) {
|
1028
|
+
t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
1029
|
+
}
|
1030
|
+
}
|
1031
|
+
class Ie extends it {
|
1032
|
+
constructor() {
|
1033
|
+
super(...arguments), this.type = 3;
|
1034
|
+
}
|
1035
|
+
O(t) {
|
1036
|
+
this.element[this.name] = t === u ? void 0 : t;
|
1037
|
+
}
|
1038
|
+
}
|
1039
|
+
class Me extends it {
|
1040
|
+
constructor() {
|
1041
|
+
super(...arguments), this.type = 4;
|
1042
|
+
}
|
1043
|
+
O(t) {
|
1044
|
+
this.element.toggleAttribute(this.name, !!t && t !== u);
|
1045
|
+
}
|
1046
|
+
}
|
1047
|
+
class je extends it {
|
1048
|
+
constructor(t, e, i, n, s) {
|
1049
|
+
super(t, e, i, n, s), this.type = 5;
|
1050
|
+
}
|
1051
|
+
_$AI(t, e = this) {
|
1052
|
+
if ((t = T(this, t, e, 0) ?? u) === P)
|
1053
|
+
return;
|
1054
|
+
const i = this._$AH, n = t === u && i !== u || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, s = t !== u && (i === u || n);
|
1055
|
+
n && this.element.removeEventListener(this.name, this, i), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
1056
|
+
}
|
1057
|
+
handleEvent(t) {
|
1058
|
+
var e;
|
1059
|
+
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
1060
|
+
}
|
1061
|
+
}
|
1062
|
+
class He {
|
1063
|
+
constructor(t, e, i) {
|
1064
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
1065
|
+
}
|
1066
|
+
get _$AU() {
|
1067
|
+
return this._$AM._$AU;
|
1068
|
+
}
|
1069
|
+
_$AI(t) {
|
1070
|
+
T(this, t);
|
1071
|
+
}
|
1072
|
+
}
|
1073
|
+
const ht = M.litHtmlPolyfillSupport;
|
1074
|
+
ht == null || ht(N, z), (M.litHtmlVersions ?? (M.litHtmlVersions = [])).push("3.0.2");
|
1075
|
+
const ke = (r, t, e) => {
|
1076
|
+
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
1077
|
+
let n = i._$litPart$;
|
1078
|
+
if (n === void 0) {
|
1079
|
+
const s = (e == null ? void 0 : e.renderBefore) ?? null;
|
1080
|
+
i._$litPart$ = n = new z(t.insertBefore(H(), s), s, void 0, e ?? {});
|
1081
|
+
}
|
1082
|
+
return n._$AI(r), n;
|
1083
|
+
};
|
1084
|
+
/**
|
1085
|
+
* @license
|
1086
|
+
* Copyright 2017 Google LLC
|
1087
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1088
|
+
*/
|
1089
|
+
let w = class extends O {
|
1090
|
+
constructor() {
|
1091
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
1092
|
+
}
|
1093
|
+
createRenderRoot() {
|
1094
|
+
var e;
|
1095
|
+
const t = super.createRenderRoot();
|
1096
|
+
return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
|
1097
|
+
}
|
1098
|
+
update(t) {
|
1099
|
+
const e = this.render();
|
1100
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ke(e, this.renderRoot, this.renderOptions);
|
1101
|
+
}
|
1102
|
+
connectedCallback() {
|
1103
|
+
var t;
|
1104
|
+
super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
|
1105
|
+
}
|
1106
|
+
disconnectedCallback() {
|
1107
|
+
var t;
|
1108
|
+
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
1109
|
+
}
|
1110
|
+
render() {
|
1111
|
+
return P;
|
1112
|
+
}
|
1113
|
+
};
|
1114
|
+
var Nt;
|
1115
|
+
w._$litElement$ = !0, w.finalized = !0, (Nt = globalThis.litElementHydrateSupport) == null || Nt.call(globalThis, { LitElement: w });
|
1116
|
+
const pt = globalThis.litElementPolyfillSupport;
|
1117
|
+
pt == null || pt({ LitElement: w });
|
1118
|
+
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
|
1119
|
+
/**
|
1120
|
+
* @license
|
1121
|
+
* Copyright 2017 Google LLC
|
1122
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1123
|
+
*/
|
1124
|
+
const nt = (r) => (t, e) => {
|
1125
|
+
e !== void 0 ? e.addInitializer(() => {
|
1126
|
+
customElements.define(r, t);
|
1127
|
+
}) : customElements.define(r, t);
|
1128
|
+
};
|
1129
|
+
/**
|
1130
|
+
* @license
|
1131
|
+
* Copyright 2017 Google LLC
|
1132
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1133
|
+
*/
|
1134
|
+
const Ne = { attribute: !0, type: String, converter: Z, reflect: !1, hasChanged: $t }, De = (r = Ne, t, e) => {
|
1135
|
+
const { kind: i, metadata: n } = e;
|
1136
|
+
let s = globalThis.litPropertyMetadata.get(n);
|
1137
|
+
if (s === void 0 && globalThis.litPropertyMetadata.set(n, s = /* @__PURE__ */ new Map()), s.set(e.name, r), i === "accessor") {
|
1138
|
+
const { name: o } = e;
|
1139
|
+
return { set(a) {
|
1140
|
+
const c = t.get.call(this);
|
1141
|
+
t.set.call(this, a), this.requestUpdate(o, c, r);
|
1142
|
+
}, init(a) {
|
1143
|
+
return a !== void 0 && this.C(o, void 0, r), a;
|
1144
|
+
} };
|
1145
|
+
}
|
1146
|
+
if (i === "setter") {
|
1147
|
+
const { name: o } = e;
|
1148
|
+
return function(a) {
|
1149
|
+
const c = this[o];
|
1150
|
+
t.call(this, a), this.requestUpdate(o, c, r);
|
1151
|
+
};
|
1152
|
+
}
|
1153
|
+
throw Error("Unsupported decorator location: " + i);
|
1154
|
+
};
|
1155
|
+
function y(r) {
|
1156
|
+
return (t, e) => typeof e == "object" ? De(r, t, e) : ((i, n, s) => {
|
1157
|
+
const o = n.hasOwnProperty(s);
|
1158
|
+
return n.constructor.createProperty(s, o ? { ...i, wrapped: !0 } : i), o ? Object.getOwnPropertyDescriptor(n, s) : void 0;
|
1159
|
+
})(r, t, e);
|
1160
|
+
}
|
1161
|
+
/**
|
1162
|
+
* @license
|
1163
|
+
* Copyright 2017 Google LLC
|
1164
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1165
|
+
*/
|
1166
|
+
function W(r) {
|
1167
|
+
return y({ ...r, state: !0, attribute: !1 });
|
1168
|
+
}
|
1169
|
+
/**
|
1170
|
+
* @license
|
1171
|
+
* Copyright 2017 Google LLC
|
1172
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1173
|
+
*/
|
1174
|
+
const Qt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Xt = (r) => (...t) => ({ _$litDirective$: r, values: t });
|
1175
|
+
class te {
|
1176
|
+
constructor(t) {
|
1177
|
+
}
|
1178
|
+
get _$AU() {
|
1179
|
+
return this._$AM._$AU;
|
1180
|
+
}
|
1181
|
+
_$AT(t, e, i) {
|
1182
|
+
this._$Ct = t, this._$AM = e, this._$Ci = i;
|
1183
|
+
}
|
1184
|
+
_$AS(t, e) {
|
1185
|
+
return this.update(t, e);
|
1186
|
+
}
|
1187
|
+
update(t, e) {
|
1188
|
+
return this.render(...e);
|
1189
|
+
}
|
1190
|
+
}
|
1191
|
+
/**
|
1192
|
+
* @license
|
1193
|
+
* Copyright 2018 Google LLC
|
1194
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1195
|
+
*/
|
1196
|
+
const Le = Xt(class extends te {
|
1197
|
+
constructor(r) {
|
1198
|
+
var t;
|
1199
|
+
if (super(r), r.type !== Qt.ATTRIBUTE || r.name !== "class" || ((t = r.strings) == null ? void 0 : t.length) > 2)
|
1200
|
+
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
1201
|
+
}
|
1202
|
+
render(r) {
|
1203
|
+
return " " + Object.keys(r).filter((t) => r[t]).join(" ") + " ";
|
1204
|
+
}
|
1205
|
+
update(r, [t]) {
|
1206
|
+
var i, n;
|
1207
|
+
if (this.it === void 0) {
|
1208
|
+
this.it = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.st = new Set(r.strings.join(" ").split(/\s/).filter((s) => s !== "")));
|
1209
|
+
for (const s in t)
|
1210
|
+
t[s] && !((i = this.st) != null && i.has(s)) && this.it.add(s);
|
1211
|
+
return this.render(t);
|
1212
|
+
}
|
1213
|
+
const e = r.element.classList;
|
1214
|
+
for (const s of this.it)
|
1215
|
+
s in t || (e.remove(s), this.it.delete(s));
|
1216
|
+
for (const s in t) {
|
1217
|
+
const o = !!t[s];
|
1218
|
+
o === this.it.has(s) || (n = this.st) != null && n.has(s) || (o ? (e.add(s), this.it.add(s)) : (e.remove(s), this.it.delete(s)));
|
1219
|
+
}
|
1220
|
+
return P;
|
1221
|
+
}
|
1222
|
+
}), F = (r, t, e) => {
|
1223
|
+
r && e.style.setProperty(t, r);
|
1224
|
+
}, ee = (r, t) => {
|
1225
|
+
var e, i, n, s;
|
1226
|
+
F((e = r.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), F(
|
1227
|
+
(i = r.colors) == null ? void 0 : i.textOnPrimaryBackground,
|
1228
|
+
"--text-on-primary-background",
|
1229
|
+
t
|
1230
|
+
), F(
|
1231
|
+
(n = r.colors) == null ? void 0 : n.secondaryBackground,
|
1232
|
+
"--secondary-background",
|
1233
|
+
t
|
1234
|
+
), F(
|
1235
|
+
(s = r.colors) == null ? void 0 : s.textOnSecondaryBackground,
|
1236
|
+
"--text-on-secondary-background",
|
1237
|
+
t
|
1238
|
+
);
|
1239
|
+
};
|
1240
|
+
var Be = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, G = (r, t, e, i) => {
|
1241
|
+
for (var n = i > 1 ? void 0 : i ? ze(t, e) : t, s = r.length - 1, o; s >= 0; s--)
|
1242
|
+
(o = r[s]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
1243
|
+
return i && n && Be(t, e, n), n;
|
1244
|
+
};
|
1245
|
+
let b = class extends w {
|
1246
|
+
constructor() {
|
1247
|
+
super(...arguments), this.active = !1, this.loaded = !1;
|
1248
|
+
}
|
1249
|
+
async connectedCallback() {
|
1250
|
+
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
|
1251
|
+
}
|
1252
|
+
_toggleActive() {
|
1253
|
+
var r;
|
1254
|
+
if (!((r = this.application) != null && r.root)) {
|
1255
|
+
console.warn(
|
1256
|
+
"Could not activate widget. No root element assigned to widget."
|
1257
|
+
);
|
1258
|
+
return;
|
1259
|
+
}
|
1260
|
+
this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.removeFromDOM();
|
1261
|
+
}
|
1262
|
+
_applyBranding() {
|
1263
|
+
var r;
|
1264
|
+
(r = this.application) != null && r.settings && ee(this.application.settings.branding, this);
|
1265
|
+
}
|
1266
|
+
async _renderSymbol() {
|
1267
|
+
var n;
|
1268
|
+
const r = (n = this.application) == null ? void 0 : n.triggerIcon;
|
1269
|
+
if (!r)
|
1270
|
+
return u;
|
1271
|
+
const t = async (s) => await import("./index-5087564d.mjs").then(
|
1272
|
+
(a) => a[s]
|
1273
|
+
), { type: e, content: i } = r;
|
1274
|
+
switch (e) {
|
1275
|
+
case "Telia": {
|
1276
|
+
const s = await t(i);
|
1277
|
+
return s ? X`<telia-icon
|
1278
|
+
class="trigger-icon"
|
1279
|
+
svg=${s.svg}
|
1280
|
+
size="lg"
|
1281
|
+
></telia-icon>` : u;
|
1282
|
+
}
|
1283
|
+
default:
|
1284
|
+
return u;
|
1285
|
+
}
|
1286
|
+
}
|
1287
|
+
render() {
|
1288
|
+
return X`<button
|
1289
|
+
class=${Le({
|
1290
|
+
trigger: !0,
|
1291
|
+
active: this.active,
|
1292
|
+
rendered: this.loaded
|
1293
|
+
})}
|
1294
|
+
@click=${this._toggleActive}
|
1295
|
+
>
|
1296
|
+
${this.icon}
|
1297
|
+
<span class="trigger-close">
|
1298
|
+
<svg
|
1299
|
+
width="18"
|
1300
|
+
height="9"
|
1301
|
+
viewBox="0 0 18 9"
|
1302
|
+
fill="none"
|
1303
|
+
xmlns="http://www.w3.org/2000/svg"
|
1304
|
+
>
|
1305
|
+
<path
|
1306
|
+
d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
|
1307
|
+
fill="white"
|
1308
|
+
/>
|
1309
|
+
</svg>
|
1310
|
+
</span>
|
1311
|
+
<span class="trigger-loader">
|
1312
|
+
<svg viewBox="25 25 50 50">
|
1313
|
+
<circle
|
1314
|
+
cx="50"
|
1315
|
+
cy="50"
|
1316
|
+
r="20"
|
1317
|
+
fill="none"
|
1318
|
+
stroke="#000"
|
1319
|
+
stroke-width="2"
|
1320
|
+
stroke-miterlimit="10"
|
1321
|
+
/>
|
1322
|
+
</svg>
|
1323
|
+
</span>
|
1324
|
+
</button>`;
|
1325
|
+
}
|
1326
|
+
};
|
1327
|
+
b.styles = [
|
1328
|
+
B`
|
1329
|
+
:host {
|
1330
|
+
--voca-rem-multiplier: 0.625;
|
1331
|
+
display: block;
|
1332
|
+
box-sizing: border-box;
|
1333
|
+
}
|
1334
|
+
|
1335
|
+
.trigger {
|
1336
|
+
position: fixed;
|
1337
|
+
transform: scale(0);
|
1338
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
1339
|
+
bottom: 20px;
|
1340
|
+
right: 20px;
|
1341
|
+
z-index: 5;
|
1342
|
+
display: flex;
|
1343
|
+
align-items: center;
|
1344
|
+
justify-content: center;
|
1345
|
+
border: none;
|
1346
|
+
line-height: 55px;
|
1347
|
+
height: 55px;
|
1348
|
+
width: 55px;
|
1349
|
+
border-radius: 55px;
|
1350
|
+
cursor: pointer;
|
1351
|
+
background-color: var(--trigger-bg, var(--primary-background));
|
1352
|
+
font-family: Lato;
|
1353
|
+
text-decoration: none;
|
1354
|
+
border: 3px dashed transparent;
|
1355
|
+
box-sizing: border-box;
|
1356
|
+
transition: transform 200ms ease-out;
|
1357
|
+
}
|
1358
|
+
.trigger:hover {
|
1359
|
+
transform: scale(1.1) !important;
|
1360
|
+
}
|
1361
|
+
.trigger.rendered {
|
1362
|
+
transform: scale(1);
|
1363
|
+
}
|
1364
|
+
.trigger.active .trigger-icon {
|
1365
|
+
opacity: 0;
|
1366
|
+
transform: rotate(-180deg) scale(0);
|
1367
|
+
}
|
1368
|
+
.trigger.active .trigger-close {
|
1369
|
+
opacity: 1;
|
1370
|
+
transform: rotate(0deg) scale(1);
|
1371
|
+
}
|
1372
|
+
|
1373
|
+
.trigger-icon {
|
1374
|
+
display: inline-block;
|
1375
|
+
line-height: inherit;
|
1376
|
+
text-align: center;
|
1377
|
+
opacity: 1;
|
1378
|
+
transform: rotate(0deg) scale(1);
|
1379
|
+
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
1380
|
+
color: var(--trigger-text-color, var(--text-on-primary-background));
|
1381
|
+
}
|
1382
|
+
.trigger-close {
|
1383
|
+
opacity: 0;
|
1384
|
+
transition: transform 200ms ease-out;
|
1385
|
+
transform: rotate(180deg) scale(0);
|
1386
|
+
position: absolute;
|
1387
|
+
top: 0;
|
1388
|
+
bottom: 0;
|
1389
|
+
left: 0;
|
1390
|
+
right: 0;
|
1391
|
+
display: flex;
|
1392
|
+
justify-content: center;
|
1393
|
+
align-items: center;
|
1394
|
+
fill: var(--trigger-text-color, var(--text-on-primary-background));
|
1395
|
+
}
|
1396
|
+
`
|
1397
|
+
];
|
1398
|
+
G([
|
1399
|
+
y({ attribute: !1 })
|
1400
|
+
], b.prototype, "application", 2);
|
1401
|
+
G([
|
1402
|
+
W()
|
1403
|
+
], b.prototype, "active", 2);
|
1404
|
+
G([
|
1405
|
+
W()
|
1406
|
+
], b.prototype, "loaded", 2);
|
1407
|
+
G([
|
1408
|
+
W()
|
1409
|
+
], b.prototype, "icon", 2);
|
1410
|
+
b = G([
|
1411
|
+
nt("ace-trigger")
|
1412
|
+
], b);
|
1413
|
+
var We = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, E = (r, t, e, i) => {
|
1414
|
+
for (var n = i > 1 ? void 0 : i ? Ge(t, e) : t, s = r.length - 1, o; s >= 0; s--)
|
1415
|
+
(o = r[s]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
1416
|
+
return i && n && We(t, e, n), n;
|
1417
|
+
};
|
1418
|
+
const Ve = (r) => {
|
1419
|
+
class t extends r {
|
1420
|
+
constructor() {
|
1421
|
+
super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
|
1422
|
+
}
|
1423
|
+
writeProperties(i) {
|
1424
|
+
this.properties = i;
|
1425
|
+
}
|
1426
|
+
writeLayout(i) {
|
1427
|
+
this.layout = i;
|
1428
|
+
}
|
1429
|
+
writeContext(i) {
|
1430
|
+
this.context = i;
|
1431
|
+
}
|
1432
|
+
addChild(i) {
|
1433
|
+
i.parent = this, this.nodes.push(i);
|
1434
|
+
}
|
1435
|
+
connectedCallback() {
|
1436
|
+
super.connectedCallback(), this.renderRoot.host.style.setProperty(
|
1437
|
+
"--width",
|
1438
|
+
this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
|
1439
|
+
);
|
1440
|
+
}
|
1441
|
+
}
|
1442
|
+
return t.styles = [
|
1443
|
+
// (superClass as unknown as typeof LitElement).styles ?? [],
|
1444
|
+
B`
|
1445
|
+
:host {
|
1446
|
+
font-family: var(--font-family);
|
1447
|
+
grid-column: span var(--width);
|
1448
|
+
max-width: 100%;
|
1449
|
+
overflow: hidden;
|
1450
|
+
box-sizing: border-box;
|
1451
|
+
display: block;
|
1452
|
+
}
|
1453
|
+
* {
|
1454
|
+
box-sizing: border-box;
|
1455
|
+
}
|
1456
|
+
`
|
1457
|
+
], E([
|
1458
|
+
y()
|
1459
|
+
], t.prototype, "properties", 2), E([
|
1460
|
+
y()
|
1461
|
+
], t.prototype, "context", 2), E([
|
1462
|
+
y()
|
1463
|
+
], t.prototype, "layout", 2), E([
|
1464
|
+
y()
|
1465
|
+
], t.prototype, "name", 2), E([
|
1466
|
+
y()
|
1467
|
+
], t.prototype, "type", 2), E([
|
1468
|
+
y({ attribute: !1 })
|
1469
|
+
], t.prototype, "application", 2), E([
|
1470
|
+
y({ attribute: !1 })
|
1471
|
+
], t.prototype, "parent", 2), t;
|
1472
|
+
};
|
1473
|
+
var Fe = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, qe = (r, t, e, i) => {
|
1474
|
+
for (var n = i > 1 ? void 0 : i ? Ye(t, e) : t, s = r.length - 1, o; s >= 0; s--)
|
1475
|
+
(o = r[s]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
1476
|
+
return i && n && Fe(t, e, n), n;
|
1477
|
+
};
|
1478
|
+
let tt = class extends Ve(w) {
|
1479
|
+
render() {
|
1480
|
+
return X`Non resolved component`;
|
1481
|
+
}
|
1482
|
+
};
|
1483
|
+
tt.styles = [
|
1484
|
+
B`
|
1485
|
+
:host {
|
1486
|
+
display: block;
|
1487
|
+
}
|
1488
|
+
`
|
1489
|
+
];
|
1490
|
+
tt = qe([
|
1491
|
+
nt("ace-unresolved-component")
|
1492
|
+
], tt);
|
1493
|
+
/**
|
1494
|
+
* @license
|
1495
|
+
* Copyright 2020 Google LLC
|
1496
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1497
|
+
*/
|
1498
|
+
const Je = (r) => r.strings === void 0;
|
1499
|
+
/**
|
1500
|
+
* @license
|
1501
|
+
* Copyright 2017 Google LLC
|
1502
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1503
|
+
*/
|
1504
|
+
const j = (r, t) => {
|
1505
|
+
var i;
|
1506
|
+
const e = r._$AN;
|
1507
|
+
if (e === void 0)
|
1508
|
+
return !1;
|
1509
|
+
for (const n of e)
|
1510
|
+
(i = n._$AO) == null || i.call(n, t, !1), j(n, t);
|
1511
|
+
return !0;
|
1512
|
+
}, et = (r) => {
|
1513
|
+
let t, e;
|
1514
|
+
do {
|
1515
|
+
if ((t = r._$AM) === void 0)
|
1516
|
+
break;
|
1517
|
+
e = t._$AN, e.delete(r), r = t;
|
1518
|
+
} while ((e == null ? void 0 : e.size) === 0);
|
1519
|
+
}, re = (r) => {
|
1520
|
+
for (let t; t = r._$AM; r = t) {
|
1521
|
+
let e = t._$AN;
|
1522
|
+
if (e === void 0)
|
1523
|
+
t._$AN = e = /* @__PURE__ */ new Set();
|
1524
|
+
else if (e.has(r))
|
1525
|
+
break;
|
1526
|
+
e.add(r), Qe(t);
|
1527
|
+
}
|
1528
|
+
};
|
1529
|
+
function Ke(r) {
|
1530
|
+
this._$AN !== void 0 ? (et(this), this._$AM = r, re(this)) : this._$AM = r;
|
1531
|
+
}
|
1532
|
+
function Ze(r, t = !1, e = 0) {
|
1533
|
+
const i = this._$AH, n = this._$AN;
|
1534
|
+
if (n !== void 0 && n.size !== 0)
|
1535
|
+
if (t)
|
1536
|
+
if (Array.isArray(i))
|
1537
|
+
for (let s = e; s < i.length; s++)
|
1538
|
+
j(i[s], !1), et(i[s]);
|
1539
|
+
else
|
1540
|
+
i != null && (j(i, !1), et(i));
|
1541
|
+
else
|
1542
|
+
j(this, r);
|
1543
|
+
}
|
1544
|
+
const Qe = (r) => {
|
1545
|
+
r.type == Qt.CHILD && (r._$AP ?? (r._$AP = Ze), r._$AQ ?? (r._$AQ = Ke));
|
1546
|
+
};
|
1547
|
+
class Xe extends te {
|
1548
|
+
constructor() {
|
1549
|
+
super(...arguments), this._$AN = void 0;
|
1550
|
+
}
|
1551
|
+
_$AT(t, e, i) {
|
1552
|
+
super._$AT(t, e, i), re(this), this.isConnected = t._$AU;
|
1553
|
+
}
|
1554
|
+
_$AO(t, e = !0) {
|
1555
|
+
var i, n;
|
1556
|
+
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), e && (j(this, t), et(this));
|
1557
|
+
}
|
1558
|
+
setValue(t) {
|
1559
|
+
if (Je(this._$Ct))
|
1560
|
+
this._$Ct._$AI(t, this);
|
1561
|
+
else {
|
1562
|
+
const e = [...this._$Ct._$AH];
|
1563
|
+
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
1564
|
+
}
|
1565
|
+
}
|
1566
|
+
disconnected() {
|
1567
|
+
}
|
1568
|
+
reconnected() {
|
1569
|
+
}
|
1570
|
+
}
|
1571
|
+
/**
|
1572
|
+
* @license
|
1573
|
+
* Copyright 2020 Google LLC
|
1574
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1575
|
+
*/
|
1576
|
+
const tr = () => new er();
|
1577
|
+
class er {
|
1578
|
+
}
|
1579
|
+
const ut = /* @__PURE__ */ new WeakMap(), rr = Xt(class extends Xe {
|
1580
|
+
render(r) {
|
1581
|
+
return u;
|
1582
|
+
}
|
1583
|
+
update(r, [t]) {
|
1584
|
+
var i;
|
1585
|
+
const e = t !== this.G;
|
1586
|
+
return e && this.G !== void 0 && this.ot(void 0), (e || this.rt !== this.lt) && (this.G = t, this.ct = (i = r.options) == null ? void 0 : i.host, this.ot(this.lt = r.element)), u;
|
1587
|
+
}
|
1588
|
+
ot(r) {
|
1589
|
+
if (typeof this.G == "function") {
|
1590
|
+
const t = this.ct ?? globalThis;
|
1591
|
+
let e = ut.get(t);
|
1592
|
+
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), ut.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ct, void 0), e.set(this.G, r), r !== void 0 && this.G.call(this.ct, r);
|
1593
|
+
} else
|
1594
|
+
this.G.value = r;
|
1595
|
+
}
|
1596
|
+
get rt() {
|
1597
|
+
var r, t;
|
1598
|
+
return typeof this.G == "function" ? (r = ut.get(this.ct ?? globalThis)) == null ? void 0 : r.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
1599
|
+
}
|
1600
|
+
disconnected() {
|
1601
|
+
this.rt === this.lt && this.ot(void 0);
|
1602
|
+
}
|
1603
|
+
reconnected() {
|
1604
|
+
this.ot(this.lt);
|
1605
|
+
}
|
1606
|
+
});
|
1607
|
+
/**
|
1608
|
+
* @license
|
1609
|
+
* Copyright 2021 Google LLC
|
1610
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1611
|
+
*/
|
1612
|
+
function* ir(r, t) {
|
1613
|
+
if (r !== void 0) {
|
1614
|
+
let e = 0;
|
1615
|
+
for (const i of r)
|
1616
|
+
yield t(i, e++);
|
1617
|
+
}
|
1618
|
+
}
|
1619
|
+
var A = /* @__PURE__ */ ((r) => (r.Inline = "inline", r.Trigger = "trigger", r))(A || {}), nr = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, ie = (r, t, e, i) => {
|
1620
|
+
for (var n = i > 1 ? void 0 : i ? sr(t, e) : t, s = r.length - 1, o; s >= 0; s--)
|
1621
|
+
(o = r[s]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
1622
|
+
return i && n && nr(t, e, n), n;
|
1623
|
+
};
|
1624
|
+
let D = class extends w {
|
1625
|
+
constructor() {
|
1626
|
+
super(...arguments), this.nodes = [], this.wrapperRef = tr();
|
1627
|
+
}
|
1628
|
+
addChild(r) {
|
1629
|
+
r.parent = this, this.nodes.push(r);
|
1630
|
+
}
|
1631
|
+
applyBranding() {
|
1632
|
+
if (this.wrapperRef.value) {
|
1633
|
+
const r = this.application.settings;
|
1634
|
+
r != null && r.branding && ee(r.branding, this.wrapperRef.value);
|
1635
|
+
}
|
1636
|
+
}
|
1637
|
+
firstUpdated(r) {
|
1638
|
+
this.applyBranding();
|
1639
|
+
}
|
1640
|
+
render() {
|
1641
|
+
return this.application.renderStrategy === A.Trigger && this.renderRoot.host.classList.add("floating"), X`<div class="widget-container" ${rr(this.wrapperRef)}>
|
1642
|
+
${ir(this.nodes, (r) => r)}
|
1643
|
+
</div>`;
|
1644
|
+
}
|
1645
|
+
};
|
1646
|
+
D.styles = B`
|
1647
|
+
:host {
|
1648
|
+
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
1649
|
+
--spacing-xs: 0.2rem;
|
1650
|
+
--spacing-sm: 0.5rem;
|
1651
|
+
--spacing-md: 1rem;
|
1652
|
+
--spacing-lg: 1.2rem;
|
1653
|
+
--spacing-xl: 1.8rem;
|
1654
|
+
|
1655
|
+
--text-color: #222222;
|
1656
|
+
--link-color: #990ae3;
|
1657
|
+
--gray-color: #f3f3f8;
|
1658
|
+
--gray-dark-color: #a6a6a6;
|
1659
|
+
|
1660
|
+
--box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
1661
|
+
--border-radius: var(--spacing-sm);
|
1662
|
+
--border-radius-sm: var(--spacing-sm);
|
1663
|
+
}
|
1664
|
+
:host {
|
1665
|
+
--voca-rem-multiplier: 0.625;
|
1666
|
+
box-sizing: border-box;
|
1667
|
+
display: block;
|
1668
|
+
}
|
1669
|
+
|
1670
|
+
:host(.floating) {
|
1671
|
+
position: fixed;
|
1672
|
+
z-index: 6;
|
1673
|
+
inset: auto 20px 95px auto;
|
1674
|
+
max-height: calc(100vh - 120px);
|
1675
|
+
width: 400px;
|
1676
|
+
height: 700px;
|
1677
|
+
}
|
1678
|
+
:host(.floating) .widget-container {
|
1679
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
1680
|
+
border-radius: 0.7rem;
|
1681
|
+
}
|
1682
|
+
:host(.inline) {
|
1683
|
+
height: 100%;
|
1684
|
+
position: fixed;
|
1685
|
+
inset: 0 0 0 0;
|
1686
|
+
}
|
1687
|
+
|
1688
|
+
* {
|
1689
|
+
box-sizing: border-box;
|
1690
|
+
}
|
1691
|
+
.widget-container {
|
1692
|
+
height: 100%;
|
1693
|
+
background-color: var(--primary-background);
|
1694
|
+
padding: 0 var(--spacing-sm);
|
1695
|
+
}
|
1696
|
+
.widget-container.expanded {
|
1697
|
+
opacity: 1;
|
1698
|
+
animation: slideUp 0.5s;
|
1699
|
+
}
|
1700
|
+
.widget-container.hidden {
|
1701
|
+
opacity: 0;
|
1702
|
+
animation: slideDown 0.5s;
|
1703
|
+
}
|
1704
|
+
@keyframes slideDown {
|
1705
|
+
from {
|
1706
|
+
transform: translateY(0);
|
1707
|
+
opacity: 1;
|
1708
|
+
}
|
1709
|
+
to {
|
1710
|
+
transform: translateY(100%);
|
1711
|
+
opacity: 0;
|
1712
|
+
}
|
1713
|
+
}
|
1714
|
+
@keyframes slideUp {
|
1715
|
+
from {
|
1716
|
+
transform: translateY(100%);
|
1717
|
+
opacity: 0;
|
1718
|
+
}
|
1719
|
+
to {
|
1720
|
+
transform: translateY(0);
|
1721
|
+
opacity: 1;
|
1722
|
+
}
|
1723
|
+
}
|
1724
|
+
`;
|
1725
|
+
ie([
|
1726
|
+
y({ attribute: !1 })
|
1727
|
+
], D.prototype, "application", 2);
|
1728
|
+
D = ie([
|
1729
|
+
nt("ace-wrapper")
|
1730
|
+
], D);
|
1731
|
+
class or {
|
1732
|
+
constructor() {
|
1733
|
+
this.root = this.createRoot();
|
1734
|
+
}
|
1735
|
+
createComponentModel(t, e) {
|
1736
|
+
this.root.application = e;
|
1737
|
+
const i = (a) => {
|
1738
|
+
if (Array.isArray(a)) {
|
1739
|
+
const [c, ...h] = a;
|
1740
|
+
return {
|
1741
|
+
definitionId: c,
|
1742
|
+
overrides: h
|
1743
|
+
};
|
1744
|
+
}
|
1745
|
+
return {
|
1746
|
+
definitionId: a,
|
1747
|
+
overrides: []
|
1748
|
+
};
|
1749
|
+
}, n = (a, c, h, d) => {
|
1750
|
+
h.forEach((l) => {
|
1751
|
+
const f = i(l), p = d[f.definitionId];
|
1752
|
+
if (!p) {
|
1753
|
+
console.error(
|
1754
|
+
`No definition found for component type '${f.definitionId}'.`
|
1755
|
+
);
|
1756
|
+
return;
|
1757
|
+
}
|
1758
|
+
const g = a.createNode(p.type, p.type);
|
1759
|
+
g && (g.name = f.definitionId, g.application = e, p.properties && g.writeProperties(p.properties), p.context && g.writeContext(p.context), p.layout && g.writeLayout(p.layout), c.addChild(g), p.children && n(
|
1760
|
+
a,
|
1761
|
+
g,
|
1762
|
+
p.children,
|
1763
|
+
d
|
1764
|
+
// views
|
1765
|
+
));
|
1766
|
+
});
|
1767
|
+
}, { entry: s, components: o } = t;
|
1768
|
+
return n(this, this.root, [s], o), this.root;
|
1769
|
+
}
|
1770
|
+
createRoot() {
|
1771
|
+
return new D();
|
1772
|
+
}
|
1773
|
+
createNode(t, e) {
|
1774
|
+
const i = this.resolveComponent(e);
|
1775
|
+
if (!i)
|
1776
|
+
return console.warn(`Unable to resolve component: ${e}`), new tt();
|
1777
|
+
const n = new i();
|
1778
|
+
return n.type = e, n.name = t, n;
|
1779
|
+
}
|
1780
|
+
resolveComponent(t) {
|
1781
|
+
return customElements.get(`ace-${t}`);
|
1782
|
+
}
|
1783
|
+
getRoot() {
|
1784
|
+
return this.root;
|
1785
|
+
}
|
1786
|
+
}
|
1787
|
+
const ne = class {
|
1788
|
+
constructor() {
|
1789
|
+
this.components = /* @__PURE__ */ new Map();
|
1790
|
+
}
|
1791
|
+
getComponent(r) {
|
1792
|
+
const t = this.components.get(r);
|
1793
|
+
return t || console.warn(
|
1794
|
+
`Unable to resolve component: ${r}. You most likely forgot to register the required plugin.`
|
1795
|
+
), t;
|
1796
|
+
}
|
1797
|
+
registerComponent(r, t) {
|
1798
|
+
this.components.set(r, t);
|
1799
|
+
}
|
1800
|
+
async loadComponents() {
|
1801
|
+
const r = [...this.components.entries()].map(([t, e]) => e.then((i) => {
|
1802
|
+
this.defineAsWebComponent(t, i.default);
|
1803
|
+
}));
|
1804
|
+
await Promise.all(r);
|
1805
|
+
}
|
1806
|
+
defineAsWebComponent(r, t) {
|
1807
|
+
const e = ne.ResolveWebComponentName(r);
|
1808
|
+
customElements.get(e) || customElements.define(e, t);
|
1809
|
+
}
|
1810
|
+
};
|
1811
|
+
let se = ne;
|
1812
|
+
se.ResolveWebComponentName = (r) => `ace-${r}`;
|
1813
|
+
class ar {
|
1814
|
+
constructor(t, e, i, n) {
|
1815
|
+
this.name = t, this.container = e, this.settings = i, this.options = n, this.platform = new or(), this.renderStrategy = A.Inline, this.autoActivate = !1, this.plugins = [], this.componentResolver = new se(), this.renderStrategy = this.options.renderStrategy || A.Inline, this.triggerIcon = this.options.triggerIcon, typeof n.autoActivate == "boolean" && (this.autoActivate = n.autoActivate), this.container.register("$settings", i);
|
1816
|
+
}
|
1817
|
+
async activate() {
|
1818
|
+
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(Vt.Ready), this.autoActivate) {
|
1819
|
+
const t = this.render();
|
1820
|
+
t && document.body.appendChild(t);
|
1821
|
+
}
|
1822
|
+
}
|
1823
|
+
async loadPlugins() {
|
1824
|
+
for await (const t of this.plugins)
|
1825
|
+
await t(this);
|
1826
|
+
}
|
1827
|
+
plugin(t) {
|
1828
|
+
return this.plugins.push(t), this;
|
1829
|
+
}
|
1830
|
+
appendToDOM() {
|
1831
|
+
this.root && document.body.appendChild(this.root);
|
1832
|
+
}
|
1833
|
+
removeFromDOM() {
|
1834
|
+
this.root && document.body.removeChild(this.root);
|
1835
|
+
}
|
1836
|
+
registerComponent(t, e) {
|
1837
|
+
this.componentResolver.registerComponent(t, e);
|
1838
|
+
}
|
1839
|
+
resolveComponent(t) {
|
1840
|
+
return this.componentResolver.getComponent(t);
|
1841
|
+
}
|
1842
|
+
render() {
|
1843
|
+
if (this.renderStrategy === A.Trigger) {
|
1844
|
+
const t = new b();
|
1845
|
+
return t.application = this, t;
|
1846
|
+
}
|
1847
|
+
return this.root;
|
1848
|
+
}
|
1849
|
+
}
|
1850
|
+
const oe = class {
|
1851
|
+
// TODO:
|
1852
|
+
// private static endpoint = 'http://localhost:5299/api'; // TODO:
|
1853
|
+
static async getSite(r) {
|
1854
|
+
const e = await (await fetch(r)).json();
|
1855
|
+
return e ? {
|
1856
|
+
id: e.id,
|
1857
|
+
apps: e.widgets.map((i) => {
|
1858
|
+
let n = A.Inline;
|
1859
|
+
return i.renderStrategy === "Trigger" && (n = A.Trigger), {
|
1860
|
+
id: i.id,
|
1861
|
+
widgetId: i.widgetId,
|
1862
|
+
renderStrategy: n,
|
1863
|
+
triggerIcon: {
|
1864
|
+
type: "Telia",
|
1865
|
+
content: i.triggerIcon
|
1866
|
+
}
|
1867
|
+
};
|
1868
|
+
})
|
1869
|
+
} : null;
|
1870
|
+
}
|
1871
|
+
static async getWidget(r) {
|
1872
|
+
const e = await (await fetch(`${oe.endpoint}/widget/${r}`)).json();
|
1873
|
+
return e ? {
|
1874
|
+
name: e.name,
|
1875
|
+
config: JSON.parse(e.configuration)
|
1876
|
+
} : null;
|
1877
|
+
}
|
1878
|
+
};
|
1879
|
+
let mt = oe;
|
1880
|
+
mt.endpoint = "https://widgets.ace.teliacompany.net/api";
|
1881
|
+
class cr {
|
1882
|
+
constructor() {
|
1883
|
+
this.applications = [], this.container = new xt("environment", this), setTimeout(() => {
|
1884
|
+
this.notifyWidgetsOfCreation();
|
1885
|
+
}, 1e3);
|
1886
|
+
}
|
1887
|
+
async bootstrap() {
|
1888
|
+
await this.activate();
|
1889
|
+
}
|
1890
|
+
async activate() {
|
1891
|
+
const t = this.applications.filter(
|
1892
|
+
(e) => e.autoActivate
|
1893
|
+
);
|
1894
|
+
for await (const e of t)
|
1895
|
+
await e.activate();
|
1896
|
+
}
|
1897
|
+
notifyWidgetsOfCreation() {
|
1898
|
+
document.querySelectorAll("ace-widget").forEach((e) => {
|
1899
|
+
const i = this.applications.find((n) => n.name === e.name);
|
1900
|
+
i && e.dispatchEvent(
|
1901
|
+
new CustomEvent("environment-created", {
|
1902
|
+
detail: { widget: i }
|
1903
|
+
})
|
1904
|
+
);
|
1905
|
+
});
|
1906
|
+
}
|
1907
|
+
registerApp(t, e, i) {
|
1908
|
+
const n = new xt(t, this), s = new ar(t, n, e, i);
|
1909
|
+
this.applications.push(s);
|
1910
|
+
}
|
1911
|
+
}
|
1912
|
+
class lr {
|
1913
|
+
constructor(t) {
|
1914
|
+
this.configurations = [], typeof t == "string" ? this.url = t : this.loadFromConfig(t);
|
1915
|
+
}
|
1916
|
+
async load(t) {
|
1917
|
+
const e = await mt.getSite(t);
|
1918
|
+
if (!e) {
|
1919
|
+
console.warn(`Unable to load site from the url provided: ${t}`);
|
1920
|
+
return;
|
1921
|
+
}
|
1922
|
+
this.configurations = e.apps;
|
1923
|
+
}
|
1924
|
+
loadFromConfig(t) {
|
1925
|
+
this.configurations = t.apps.map((e) => ({
|
1926
|
+
id: "",
|
1927
|
+
renderStrategy: e.renderStrategy,
|
1928
|
+
widgetId: e.widgetId,
|
1929
|
+
autoActivate: e.autoActivate,
|
1930
|
+
triggerIcon: {
|
1931
|
+
type: "Telia",
|
1932
|
+
content: e.triggerIcon || "question"
|
1933
|
+
}
|
1934
|
+
}));
|
1935
|
+
}
|
1936
|
+
async bootstrap(t) {
|
1937
|
+
var e;
|
1938
|
+
this.url && await this.load(this.url), this.environment = new cr(), this.addGlobal(this.environment);
|
1939
|
+
for await (const i of this.configurations) {
|
1940
|
+
const n = await mt.getWidget(i.widgetId);
|
1941
|
+
n && ((e = this.environment) == null || e.registerApp(n.name, n.config, {
|
1942
|
+
renderStrategy: i.renderStrategy,
|
1943
|
+
triggerIcon: i.triggerIcon,
|
1944
|
+
autoActivate: i.autoActivate
|
1945
|
+
}));
|
1946
|
+
}
|
1947
|
+
t(this.environment), await this.environment.bootstrap();
|
1948
|
+
}
|
1949
|
+
addGlobal(t) {
|
1950
|
+
globalThis.widgets = t;
|
1951
|
+
}
|
1952
|
+
}
|
1953
|
+
var hr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, st = (r, t, e, i) => {
|
1954
|
+
for (var n = i > 1 ? void 0 : i ? pr(t, e) : t, s = r.length - 1, o; s >= 0; s--)
|
1955
|
+
(o = r[s]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
1956
|
+
return i && n && hr(t, e, n), n;
|
1957
|
+
};
|
1958
|
+
let U = class extends w {
|
1959
|
+
constructor() {
|
1960
|
+
super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
|
1961
|
+
}
|
1962
|
+
async connectedCallback() {
|
1963
|
+
super.connectedCallback(), await this.getGlobalEnvironment();
|
1964
|
+
}
|
1965
|
+
disconnectedCallback() {
|
1966
|
+
super.disconnectedCallback(), this.removeEventListener("environment-created", this.onEnvironmentCreated);
|
1967
|
+
}
|
1968
|
+
async onEnvironmentCreated(r) {
|
1969
|
+
this.widget = r.detail.widget, await this.activate(), this.requestUpdate();
|
1970
|
+
}
|
1971
|
+
async activate() {
|
1972
|
+
this.widget && (await this.widget.activate(), this.status = "activated");
|
1973
|
+
}
|
1974
|
+
async getGlobalEnvironment() {
|
1975
|
+
const r = globalThis.widgets;
|
1976
|
+
r && (this.widget = r.applications.find(
|
1977
|
+
(t) => t.name === this.name
|
1978
|
+
), await this.activate());
|
1979
|
+
}
|
1980
|
+
render() {
|
1981
|
+
if (!this.widget || this.status !== "activated")
|
1982
|
+
return u;
|
1983
|
+
if (this.widget.renderStrategy === A.Trigger) {
|
1984
|
+
const r = new b();
|
1985
|
+
return r.application = this.widget, r;
|
1986
|
+
}
|
1987
|
+
return this.widget.render();
|
1988
|
+
}
|
1989
|
+
};
|
1990
|
+
U.styles = [
|
1991
|
+
B`
|
1992
|
+
:host {
|
1993
|
+
display: block;
|
1994
|
+
}
|
1995
|
+
`
|
1996
|
+
];
|
1997
|
+
st([
|
1998
|
+
y({ attribute: !0 })
|
1999
|
+
], U.prototype, "name", 2);
|
2000
|
+
st([
|
2001
|
+
W()
|
2002
|
+
], U.prototype, "widget", 2);
|
2003
|
+
st([
|
2004
|
+
W()
|
2005
|
+
], U.prototype, "status", 2);
|
2006
|
+
U = st([
|
2007
|
+
nt("ace-widget")
|
2008
|
+
], U);
|
2009
|
+
const fr = async (r, t) => {
|
2010
|
+
await new lr(r).bootstrap(t);
|
2011
|
+
};
|
2012
|
+
export {
|
2013
|
+
U as AceWidget,
|
2014
|
+
ar as Application,
|
2015
|
+
xt as Container,
|
2016
|
+
cr as Environment,
|
2017
|
+
lr as Site,
|
2018
|
+
b as Trigger,
|
2019
|
+
Ve as WidgetComponent,
|
2020
|
+
fr as bootstrap
|
2021
|
+
};
|