@telia-ace/widget-components-widget-header-flamingo 1.0.14 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index-0ac5d882.mjs +2569 -0
- package/index-18d19996.js +148 -0
- package/{dist/index-9688347a-02584d39.js → index-5087564d.mjs} +126 -127
- package/index-6dd00f59.js +1 -0
- package/{dist/index.d.ts → index.d.ts} +0 -1
- package/index.js +1 -0
- package/index.mjs +4 -0
- package/package.json +6 -39
- package/widget-header-6b3ce33d.mjs +347 -0
- package/widget-header-816ab6a0.js +72 -0
- package/{dist/widget-header-component.d.ts → widget-header-component.d.ts} +0 -1
- package/{dist/widget-header.d.ts → widget-header.d.ts} +1 -2
- package/dist/index-77a55bb1.js +0 -2860
- package/dist/index-77a55bb1.js.map +0 -1
- package/dist/index-9688347a-02584d39.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -5
- package/dist/index.js.map +0 -1
- package/dist/widget-header-component.d.ts.map +0 -1
- package/dist/widget-header-ef22461a.js +0 -648
- package/dist/widget-header-ef22461a.js.map +0 -1
- package/dist/widget-header.d.ts.map +0 -1
package/dist/index-77a55bb1.js
DELETED
|
@@ -1,2860 +0,0 @@
|
|
|
1
|
-
var Ze = Object.defineProperty, Xe = Object.defineProperties, Ye = Object.getOwnPropertyDescriptors, re = Object.getOwnPropertySymbols, Qe = Object.getPrototypeOf, ts = Object.prototype.hasOwnProperty, es = Object.prototype.propertyIsEnumerable, ss = Reflect.get, oe = (s, t, e) => t in s ? Ze(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, Bt = (s, t) => {
|
|
2
|
-
for (var e in t || (t = {}))
|
|
3
|
-
ts.call(t, e) && oe(s, e, t[e]);
|
|
4
|
-
if (re)
|
|
5
|
-
for (var e of re(t))
|
|
6
|
-
es.call(t, e) && oe(s, e, t[e]);
|
|
7
|
-
return s;
|
|
8
|
-
}, Jt = (s, t) => Xe(s, Ye(t)), ns = (s, t, e) => ss(Qe(s), e, t), M = (s, t, e) => new Promise((n, i) => {
|
|
9
|
-
var r = (c) => {
|
|
10
|
-
try {
|
|
11
|
-
a(e.next(c));
|
|
12
|
-
} catch (l) {
|
|
13
|
-
i(l);
|
|
14
|
-
}
|
|
15
|
-
}, o = (c) => {
|
|
16
|
-
try {
|
|
17
|
-
a(e.throw(c));
|
|
18
|
-
} catch (l) {
|
|
19
|
-
i(l);
|
|
20
|
-
}
|
|
21
|
-
}, a = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(r, o);
|
|
22
|
-
a((e = e.apply(s, t)).next());
|
|
23
|
-
}), is = Object.defineProperty, rs = Object.defineProperties, os = Object.getOwnPropertyDescriptors, ae = Object.getOwnPropertySymbols, as = Object.prototype.hasOwnProperty, cs = Object.prototype.propertyIsEnumerable, ce = (s, t, e) => t in s ? is(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, hs = (s, t) => {
|
|
24
|
-
for (var e in t || (t = {}))
|
|
25
|
-
as.call(t, e) && ce(s, e, t[e]);
|
|
26
|
-
if (ae)
|
|
27
|
-
for (var e of ae(t))
|
|
28
|
-
cs.call(t, e) && ce(s, e, t[e]);
|
|
29
|
-
return s;
|
|
30
|
-
}, ls = (s, t) => rs(s, os(t));
|
|
31
|
-
const _t = (s, t, e, ...n) => {
|
|
32
|
-
const i = `[${s.get("$environment").name || "webprovisions"}] ${e}`;
|
|
33
|
-
switch (t) {
|
|
34
|
-
case "info":
|
|
35
|
-
console.info(i, ...n);
|
|
36
|
-
break;
|
|
37
|
-
case "warning":
|
|
38
|
-
console.warn(i, ...n);
|
|
39
|
-
break;
|
|
40
|
-
case "error":
|
|
41
|
-
console.error(i, ...n);
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
}, ds = (s) => {
|
|
45
|
-
const t = s.container || s;
|
|
46
|
-
return {
|
|
47
|
-
info: (e, ...n) => _t(t, "info", e, ...n),
|
|
48
|
-
warn: (e, ...n) => _t(t, "warning", e, ...n),
|
|
49
|
-
error: (e, ...n) => _t(t, "error", e, ...n)
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
var Z = /* @__PURE__ */ ((s) => (s.Implementation = "implementation", s.Widget = "widget", s))(Z || {}), O = /* @__PURE__ */ ((s) => (s.Pre = "pre", s.Post = "post", s))(O || {});
|
|
53
|
-
const ps = (s, t, e, n) => {
|
|
54
|
-
try {
|
|
55
|
-
const i = new t(e, n);
|
|
56
|
-
return {
|
|
57
|
-
name: s,
|
|
58
|
-
invoke: (r, o) => {
|
|
59
|
-
let a;
|
|
60
|
-
return i[r] && (a = i[r].call(i, o)), Promise.resolve(a);
|
|
61
|
-
},
|
|
62
|
-
getInstance: () => i
|
|
63
|
-
};
|
|
64
|
-
} catch (i) {
|
|
65
|
-
if (i.message && i.message.indexOf("is not a constructor") >= 0)
|
|
66
|
-
return {
|
|
67
|
-
name: s,
|
|
68
|
-
invoke: (r) => {
|
|
69
|
-
let o;
|
|
70
|
-
return r === "initialize" && (o = t(e, n)), Promise.resolve(o);
|
|
71
|
-
},
|
|
72
|
-
getInstance: () => t
|
|
73
|
-
};
|
|
74
|
-
throw i;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
function he(s, t) {
|
|
78
|
-
return typeof s == "undefined" ? t : s;
|
|
79
|
-
}
|
|
80
|
-
let us = class {
|
|
81
|
-
constructor(s = {}) {
|
|
82
|
-
this.part = s;
|
|
83
|
-
}
|
|
84
|
-
createCommand(s, t, e) {
|
|
85
|
-
let n;
|
|
86
|
-
typeof t == "function" ? n = {
|
|
87
|
-
scope: Z.Widget,
|
|
88
|
-
stage: O.Post,
|
|
89
|
-
defaultArgs: void 0,
|
|
90
|
-
handlerResolver: t
|
|
91
|
-
} : n = {
|
|
92
|
-
scope: he(t.scope, Z.Widget),
|
|
93
|
-
stage: he(t.stage, O.Post),
|
|
94
|
-
defaultArgs: t.defaultArgs,
|
|
95
|
-
handlerResolver: e
|
|
96
|
-
};
|
|
97
|
-
let i = this.part;
|
|
98
|
-
const r = s.split(".");
|
|
99
|
-
return r.forEach((o, a) => {
|
|
100
|
-
a === r.length - 1 ? i[o] || (i[o] = () => n) : i = this.part[o] = this.part[o] || {};
|
|
101
|
-
}), this;
|
|
102
|
-
}
|
|
103
|
-
get() {
|
|
104
|
-
return this.part;
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
const Te = (s) => {
|
|
108
|
-
const t = new us({});
|
|
109
|
-
return s(t), t.get();
|
|
110
|
-
};
|
|
111
|
-
Te((s) => {
|
|
112
|
-
s.createCommand(
|
|
113
|
-
"types.register",
|
|
114
|
-
{ scope: Z.Implementation, stage: O.Pre },
|
|
115
|
-
(t) => (e, n) => {
|
|
116
|
-
t.container.get("$types")[e] = n;
|
|
117
|
-
}
|
|
118
|
-
).createCommand(
|
|
119
|
-
"type",
|
|
120
|
-
{ stage: O.Pre },
|
|
121
|
-
(t) => (e) => {
|
|
122
|
-
t.container.register("$type", e);
|
|
123
|
-
}
|
|
124
|
-
).createCommand(
|
|
125
|
-
"settings",
|
|
126
|
-
{ stage: O.Pre, defaultArgs: [null] },
|
|
127
|
-
(t) => (e) => {
|
|
128
|
-
t.events.dispatch(
|
|
129
|
-
"settings:change",
|
|
130
|
-
e,
|
|
131
|
-
{ bubbles: !0 }
|
|
132
|
-
), t.container.register("$settings", e);
|
|
133
|
-
}
|
|
134
|
-
).createCommand(
|
|
135
|
-
"plugin",
|
|
136
|
-
{ stage: O.Pre },
|
|
137
|
-
(t) => (e, n, i) => {
|
|
138
|
-
const { container: r } = t;
|
|
139
|
-
let o = null, a = e, c = n;
|
|
140
|
-
typeof e == "string" && (o = e, a = n, c = i);
|
|
141
|
-
const l = (h) => {
|
|
142
|
-
const { transformPluginSettings: d } = t.container.get("$environmentOptions"), u = d ? d(
|
|
143
|
-
c || {},
|
|
144
|
-
o,
|
|
145
|
-
t.container,
|
|
146
|
-
a
|
|
147
|
-
) : n;
|
|
148
|
-
try {
|
|
149
|
-
const p = ps(
|
|
150
|
-
o,
|
|
151
|
-
a,
|
|
152
|
-
r,
|
|
153
|
-
u
|
|
154
|
-
);
|
|
155
|
-
r.get("$plugins").push(p), h && p.invoke("initialize", null);
|
|
156
|
-
} catch (p) {
|
|
157
|
-
ds(t).warn("Error when initializing plugin", p);
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
t.container.get("$instance") ? l(!0) : t.events.subscribeOnce("widget:instance-created", () => l(!1));
|
|
161
|
-
}
|
|
162
|
-
).createCommand(
|
|
163
|
-
"container.register",
|
|
164
|
-
(t) => (e, n) => {
|
|
165
|
-
t.container.register(e, n);
|
|
166
|
-
}
|
|
167
|
-
).createCommand(
|
|
168
|
-
"container.registerAsync",
|
|
169
|
-
(t) => (e, n) => {
|
|
170
|
-
t.container.registerAsync(e, n);
|
|
171
|
-
}
|
|
172
|
-
).createCommand(
|
|
173
|
-
"container.registerFactory",
|
|
174
|
-
(t) => (e, n) => {
|
|
175
|
-
t.container.registerFactory(e, n);
|
|
176
|
-
}
|
|
177
|
-
).createCommand(
|
|
178
|
-
"container.touch",
|
|
179
|
-
(t) => (e, n) => {
|
|
180
|
-
t.container.touch(e, n);
|
|
181
|
-
}
|
|
182
|
-
).createCommand(
|
|
183
|
-
"csp",
|
|
184
|
-
{},
|
|
185
|
-
(t) => (e) => {
|
|
186
|
-
t.container.register("csp", e);
|
|
187
|
-
}
|
|
188
|
-
);
|
|
189
|
-
});
|
|
190
|
-
Te((s) => {
|
|
191
|
-
s.createCommand(
|
|
192
|
-
"ready",
|
|
193
|
-
{ scope: Z.Implementation, stage: O.Pre },
|
|
194
|
-
(t) => (e) => {
|
|
195
|
-
const { container: n } = t, i = n.owner;
|
|
196
|
-
n.get("bootstrapping").ready ? e(i) : i.events.subscribeOnce("bootstrap:ready", () => {
|
|
197
|
-
e(i);
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
);
|
|
201
|
-
});
|
|
202
|
-
const xt = (s, t, e, ...n) => {
|
|
203
|
-
const i = `[${s.get("$environment").name || "webprovisions"}] ${e}`;
|
|
204
|
-
switch (t) {
|
|
205
|
-
case "info":
|
|
206
|
-
console.info(i, ...n);
|
|
207
|
-
break;
|
|
208
|
-
case "warning":
|
|
209
|
-
console.warn(i, ...n);
|
|
210
|
-
break;
|
|
211
|
-
case "error":
|
|
212
|
-
console.error(i, ...n);
|
|
213
|
-
break;
|
|
214
|
-
}
|
|
215
|
-
}, gs = (s) => {
|
|
216
|
-
const t = s.container || s;
|
|
217
|
-
return {
|
|
218
|
-
info: (e, ...n) => xt(t, "info", e, ...n),
|
|
219
|
-
warn: (e, ...n) => xt(t, "warning", e, ...n),
|
|
220
|
-
error: (e, ...n) => xt(t, "error", e, ...n)
|
|
221
|
-
};
|
|
222
|
-
};
|
|
223
|
-
var ot = /* @__PURE__ */ ((s) => (s.Implementation = "implementation", s.Widget = "widget", s))(ot || {}), T = /* @__PURE__ */ ((s) => (s.Pre = "pre", s.Post = "post", s))(T || {});
|
|
224
|
-
const ms = (s, t, e, n) => {
|
|
225
|
-
try {
|
|
226
|
-
const i = new t(e, n);
|
|
227
|
-
return {
|
|
228
|
-
name: s,
|
|
229
|
-
invoke: (r, o) => {
|
|
230
|
-
let a;
|
|
231
|
-
return i[r] && (a = i[r].call(i, o)), Promise.resolve(a);
|
|
232
|
-
},
|
|
233
|
-
getInstance: () => i
|
|
234
|
-
};
|
|
235
|
-
} catch (i) {
|
|
236
|
-
if (i.message && i.message.indexOf("is not a constructor") >= 0)
|
|
237
|
-
return {
|
|
238
|
-
name: s,
|
|
239
|
-
invoke: (r) => {
|
|
240
|
-
let o;
|
|
241
|
-
return r === "initialize" && (o = t(e, n)), Promise.resolve(o);
|
|
242
|
-
},
|
|
243
|
-
getInstance: () => t
|
|
244
|
-
};
|
|
245
|
-
throw i;
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
function le(s, t) {
|
|
249
|
-
return typeof s == "undefined" ? t : s;
|
|
250
|
-
}
|
|
251
|
-
class fs {
|
|
252
|
-
constructor(t = {}) {
|
|
253
|
-
this.part = t;
|
|
254
|
-
}
|
|
255
|
-
createCommand(t, e, n) {
|
|
256
|
-
let i;
|
|
257
|
-
typeof e == "function" ? i = {
|
|
258
|
-
scope: ot.Widget,
|
|
259
|
-
stage: T.Post,
|
|
260
|
-
defaultArgs: void 0,
|
|
261
|
-
handlerResolver: e
|
|
262
|
-
} : i = {
|
|
263
|
-
scope: le(e.scope, ot.Widget),
|
|
264
|
-
stage: le(e.stage, T.Post),
|
|
265
|
-
defaultArgs: e.defaultArgs,
|
|
266
|
-
handlerResolver: n
|
|
267
|
-
};
|
|
268
|
-
let r = this.part;
|
|
269
|
-
const o = t.split(".");
|
|
270
|
-
return o.forEach((a, c) => {
|
|
271
|
-
c === o.length - 1 ? r[a] || (r[a] = () => i) : r = this.part[a] = this.part[a] || {};
|
|
272
|
-
}), this;
|
|
273
|
-
}
|
|
274
|
-
get() {
|
|
275
|
-
return this.part;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
const je = (s) => {
|
|
279
|
-
const t = new fs({});
|
|
280
|
-
return s(t), t.get();
|
|
281
|
-
};
|
|
282
|
-
je((s) => {
|
|
283
|
-
s.createCommand(
|
|
284
|
-
"types.register",
|
|
285
|
-
{ scope: ot.Implementation, stage: T.Pre },
|
|
286
|
-
(t) => (e, n) => {
|
|
287
|
-
t.container.get("$types")[e] = n;
|
|
288
|
-
}
|
|
289
|
-
).createCommand(
|
|
290
|
-
"type",
|
|
291
|
-
{ stage: T.Pre },
|
|
292
|
-
(t) => (e) => {
|
|
293
|
-
t.container.register("$type", e);
|
|
294
|
-
}
|
|
295
|
-
).createCommand(
|
|
296
|
-
"settings",
|
|
297
|
-
{ stage: T.Pre, defaultArgs: [null] },
|
|
298
|
-
(t) => (e) => {
|
|
299
|
-
t.events.dispatch(
|
|
300
|
-
"settings:change",
|
|
301
|
-
e,
|
|
302
|
-
{ bubbles: !0 }
|
|
303
|
-
), t.container.register("$settings", e);
|
|
304
|
-
}
|
|
305
|
-
).createCommand(
|
|
306
|
-
"plugin",
|
|
307
|
-
{ stage: T.Pre },
|
|
308
|
-
(t) => (e, n, i) => {
|
|
309
|
-
const { container: r } = t;
|
|
310
|
-
let o = null, a = e, c = n;
|
|
311
|
-
typeof e == "string" && (o = e, a = n, c = i);
|
|
312
|
-
const l = (h) => {
|
|
313
|
-
const { transformPluginSettings: d } = t.container.get("$environmentOptions"), u = d ? d(
|
|
314
|
-
c || {},
|
|
315
|
-
o,
|
|
316
|
-
t.container,
|
|
317
|
-
a
|
|
318
|
-
) : n;
|
|
319
|
-
try {
|
|
320
|
-
const p = ms(
|
|
321
|
-
o,
|
|
322
|
-
a,
|
|
323
|
-
r,
|
|
324
|
-
u
|
|
325
|
-
);
|
|
326
|
-
r.get("$plugins").push(p), h && p.invoke("initialize", null);
|
|
327
|
-
} catch (p) {
|
|
328
|
-
gs(t).warn("Error when initializing plugin", p);
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
t.container.get("$instance") ? l(!0) : t.events.subscribeOnce("widget:instance-created", () => l(!1));
|
|
332
|
-
}
|
|
333
|
-
).createCommand(
|
|
334
|
-
"container.register",
|
|
335
|
-
(t) => (e, n) => {
|
|
336
|
-
t.container.register(e, n);
|
|
337
|
-
}
|
|
338
|
-
).createCommand(
|
|
339
|
-
"container.registerAsync",
|
|
340
|
-
(t) => (e, n) => {
|
|
341
|
-
t.container.registerAsync(e, n);
|
|
342
|
-
}
|
|
343
|
-
).createCommand(
|
|
344
|
-
"container.registerFactory",
|
|
345
|
-
(t) => (e, n) => {
|
|
346
|
-
t.container.registerFactory(e, n);
|
|
347
|
-
}
|
|
348
|
-
).createCommand(
|
|
349
|
-
"container.touch",
|
|
350
|
-
(t) => (e, n) => {
|
|
351
|
-
t.container.touch(e, n);
|
|
352
|
-
}
|
|
353
|
-
).createCommand(
|
|
354
|
-
"csp",
|
|
355
|
-
{},
|
|
356
|
-
(t) => (e) => {
|
|
357
|
-
t.container.register("csp", e);
|
|
358
|
-
}
|
|
359
|
-
);
|
|
360
|
-
});
|
|
361
|
-
const vs = (s) => {
|
|
362
|
-
const t = [];
|
|
363
|
-
return [
|
|
364
|
-
(e, n) => {
|
|
365
|
-
t.push(s.subscribe(e, n));
|
|
366
|
-
},
|
|
367
|
-
() => {
|
|
368
|
-
t.forEach((e) => {
|
|
369
|
-
e();
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
];
|
|
373
|
-
};
|
|
374
|
-
let ut = class {
|
|
375
|
-
constructor(s, t = []) {
|
|
376
|
-
this.platform = s, this.rules = t;
|
|
377
|
-
}
|
|
378
|
-
match(s) {
|
|
379
|
-
return this.rules.every((t) => !(t.id && t.id !== s.id || t.type && t.type !== s.type));
|
|
380
|
-
}
|
|
381
|
-
ofType(s) {
|
|
382
|
-
return this.rules.push({ type: s }), this;
|
|
383
|
-
}
|
|
384
|
-
withId(s) {
|
|
385
|
-
return this.rules.push({ id: s }), this;
|
|
386
|
-
}
|
|
387
|
-
select() {
|
|
388
|
-
return new ys(this.platform, this);
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
class Ie {
|
|
392
|
-
constructor(t, e, n) {
|
|
393
|
-
this.platform = t, this.node = e, this.actions = new Ft(
|
|
394
|
-
t,
|
|
395
|
-
new ut(t).withId(e.id),
|
|
396
|
-
n
|
|
397
|
-
);
|
|
398
|
-
const [i, r] = vs(
|
|
399
|
-
this.platform.events
|
|
400
|
-
);
|
|
401
|
-
this.subscribe = i, this.unsubscribe = r;
|
|
402
|
-
}
|
|
403
|
-
properties(t) {
|
|
404
|
-
return t && this.node.touchProperties((e) => t(e)), this.node.attributes.properties;
|
|
405
|
-
}
|
|
406
|
-
context(t) {
|
|
407
|
-
return t && this.subscribe("components:context-changed", (e, { node: n }) => {
|
|
408
|
-
n === this.node && t(this.node.attributes.context);
|
|
409
|
-
}), this.node.attributes.context;
|
|
410
|
-
}
|
|
411
|
-
layout(t) {
|
|
412
|
-
return t && this.subscribe("components:layout-changed", (e, { node: n }) => {
|
|
413
|
-
n === this.node && t(this.node.attributes.layout);
|
|
414
|
-
}), this.node.attributes.layout;
|
|
415
|
-
}
|
|
416
|
-
writeProperties(t, e) {
|
|
417
|
-
this.node.writeProperties(t, e);
|
|
418
|
-
}
|
|
419
|
-
writeContext(t, e) {
|
|
420
|
-
this.node.writeProperties(t, e);
|
|
421
|
-
}
|
|
422
|
-
writeLayout(t, e) {
|
|
423
|
-
this.node.writeLayout(t, e);
|
|
424
|
-
}
|
|
425
|
-
dispose() {
|
|
426
|
-
this.unsubscribe(), this.actions.dispose();
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
class ys {
|
|
430
|
-
constructor(t, e, n = !0) {
|
|
431
|
-
this.platform = t, this.target = e, this.clearOnDispose = n, this.removes = [], this.actions = new Ft(this.platform, this.target);
|
|
432
|
-
}
|
|
433
|
-
writeProperties(t, e) {
|
|
434
|
-
this.removes.push(
|
|
435
|
-
this.platform.write({
|
|
436
|
-
options: e,
|
|
437
|
-
attributes: { properties: t },
|
|
438
|
-
target: this.target,
|
|
439
|
-
removable: this.clearOnDispose
|
|
440
|
-
})
|
|
441
|
-
);
|
|
442
|
-
}
|
|
443
|
-
writeContext(t, e) {
|
|
444
|
-
this.removes.push(
|
|
445
|
-
this.platform.write({
|
|
446
|
-
options: e,
|
|
447
|
-
attributes: { context: t },
|
|
448
|
-
target: this.target,
|
|
449
|
-
removable: this.clearOnDispose
|
|
450
|
-
})
|
|
451
|
-
);
|
|
452
|
-
}
|
|
453
|
-
writeLayout(t, e) {
|
|
454
|
-
this.removes.push(
|
|
455
|
-
this.platform.write({
|
|
456
|
-
options: e,
|
|
457
|
-
attributes: { layout: t },
|
|
458
|
-
target: this.target,
|
|
459
|
-
removable: this.clearOnDispose
|
|
460
|
-
})
|
|
461
|
-
);
|
|
462
|
-
}
|
|
463
|
-
dispose() {
|
|
464
|
-
this.removes.forEach((t) => {
|
|
465
|
-
t();
|
|
466
|
-
}), this.actions.dispose();
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
const bs = (s, t, e) => {
|
|
470
|
-
const n = s.concat(), i = (r, o, a) => {
|
|
471
|
-
let c = !0;
|
|
472
|
-
if (n.length) {
|
|
473
|
-
const l = n.shift(), h = (d, u) => (c = !1, i(d, Object.assign({}, o, u), a));
|
|
474
|
-
return Promise.resolve(l(r, h, a)).then((d) => ls(hs({}, d), {
|
|
475
|
-
cancelled: c
|
|
476
|
-
}));
|
|
477
|
-
}
|
|
478
|
-
return Promise.resolve({ data: r, cancelled: !1, options: o });
|
|
479
|
-
};
|
|
480
|
-
return i(t, {}, e);
|
|
481
|
-
};
|
|
482
|
-
class Ft {
|
|
483
|
-
constructor(t, e, n) {
|
|
484
|
-
this.platform = t, this.target = e, this.ns = n, this.subscriptions = [], this.create = this.create.bind(this);
|
|
485
|
-
}
|
|
486
|
-
create(t, e = () => {
|
|
487
|
-
}) {
|
|
488
|
-
const n = {
|
|
489
|
-
key: t,
|
|
490
|
-
fn: e,
|
|
491
|
-
target: this.target,
|
|
492
|
-
ns: this.ns
|
|
493
|
-
};
|
|
494
|
-
this.platform.actionsState.handlers.push(n);
|
|
495
|
-
const i = () => {
|
|
496
|
-
const r = this.platform.actionsState.handlers.indexOf(n);
|
|
497
|
-
r > -1 && this.platform.actionsState.handlers.splice(r, 1);
|
|
498
|
-
};
|
|
499
|
-
return this.subscriptions.push(i), i;
|
|
500
|
-
}
|
|
501
|
-
dispatch(t, e) {
|
|
502
|
-
const n = this.platform.nodes.all.concat(
|
|
503
|
-
this.platform.nodes.detached
|
|
504
|
-
), i = {}, r = this.platform.actionsState.handlers.filter(
|
|
505
|
-
(o) => o.key === t && (!o.ns || !this.ns || o.ns === this.ns)
|
|
506
|
-
);
|
|
507
|
-
return Promise.all(
|
|
508
|
-
r.map((o) => {
|
|
509
|
-
const a = n.filter(
|
|
510
|
-
(l) => o.target.match(l) && this.target.match(l)
|
|
511
|
-
), c = this.platform.actionsState.watchers.filter((l) => l.key === t && (!l.ns || !this.ns || l.ns === this.ns) && a.some((h) => l.target.match(h))).map((l) => l.fn);
|
|
512
|
-
return Promise.all(
|
|
513
|
-
a.map((l) => {
|
|
514
|
-
const h = new Ie(
|
|
515
|
-
this.platform,
|
|
516
|
-
l,
|
|
517
|
-
this.ns
|
|
518
|
-
);
|
|
519
|
-
return bs(c, e, h).then((d) => {
|
|
520
|
-
const { data: u = {}, options: p, cancelled: $ } = d;
|
|
521
|
-
return Promise.resolve(
|
|
522
|
-
$ ? {} : o.fn(u, p, h)
|
|
523
|
-
).then((b) => {
|
|
524
|
-
i[l.id] = b;
|
|
525
|
-
});
|
|
526
|
-
});
|
|
527
|
-
})
|
|
528
|
-
);
|
|
529
|
-
})
|
|
530
|
-
).then(() => i);
|
|
531
|
-
}
|
|
532
|
-
watch(t, e) {
|
|
533
|
-
let n = t, i = this.ns;
|
|
534
|
-
const r = t.split(".");
|
|
535
|
-
r.length > 1 && (i = r[0], n = r.splice(1).join("."));
|
|
536
|
-
const o = {
|
|
537
|
-
fn: e,
|
|
538
|
-
target: this.target,
|
|
539
|
-
key: n,
|
|
540
|
-
ns: i
|
|
541
|
-
};
|
|
542
|
-
this.platform.actionsState.watchers.push(o);
|
|
543
|
-
const a = () => {
|
|
544
|
-
const c = this.platform.actionsState.watchers.indexOf(o);
|
|
545
|
-
c > -1 && this.platform.actionsState.watchers.splice(c, 1);
|
|
546
|
-
};
|
|
547
|
-
return this.subscriptions.push(a), a;
|
|
548
|
-
}
|
|
549
|
-
dispose() {
|
|
550
|
-
this.subscriptions.forEach((t) => t());
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
je((s) => {
|
|
554
|
-
s.createCommand("components", (t) => (e) => {
|
|
555
|
-
t.events.subscribeOnce(
|
|
556
|
-
"components:platform-created",
|
|
557
|
-
(n, { platform: i }) => {
|
|
558
|
-
e.handlers && e.handlers.forEach(([r, o]) => {
|
|
559
|
-
i.addComponentHandler(r, o);
|
|
560
|
-
});
|
|
561
|
-
}
|
|
562
|
-
);
|
|
563
|
-
});
|
|
564
|
-
});
|
|
565
|
-
const gt = (s, t, ...e) => typeof t == "string" ? s(`[humany] ${t}`, ...e) : s(t, ...e), q = class {
|
|
566
|
-
constructor() {
|
|
567
|
-
this.keys = [], this.log = (s, ...t) => this.lookup(s, () => q.log(...t)), this.warn = (s, ...t) => this.lookup(s, () => q.warn(...t)), this.error = (s, ...t) => this.lookup(s, () => q.error(...t)), this.info = (s, ...t) => this.lookup(s, () => q.info(...t));
|
|
568
|
-
}
|
|
569
|
-
lookup(s, t) {
|
|
570
|
-
this.keys.indexOf(s) === -1 && (this.keys.push(s), t());
|
|
571
|
-
}
|
|
572
|
-
};
|
|
573
|
-
let et = q;
|
|
574
|
-
et.log = (...s) => gt(console.log, ...s);
|
|
575
|
-
et.warn = (...s) => gt(console.warn, ...s);
|
|
576
|
-
et.error = (...s) => gt(console.error, ...s);
|
|
577
|
-
et.info = (...s) => gt(console.info, ...s);
|
|
578
|
-
const C = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
579
|
-
function qt() {
|
|
580
|
-
return C() + C() + "-" + C() + "-" + C() + "-" + C() + "-" + C() + C() + C();
|
|
581
|
-
}
|
|
582
|
-
class de {
|
|
583
|
-
constructor(t, e) {
|
|
584
|
-
this.events = t, this.tags = [], this.children = {}, this.changesets = [], this.mountCount = 0, this.id = qt(), this.type = e, this.attributes = {
|
|
585
|
-
context: {},
|
|
586
|
-
properties: {},
|
|
587
|
-
layout: {},
|
|
588
|
-
tags: []
|
|
589
|
-
}, this.writeLayout({ size: "full", indent: 0 });
|
|
590
|
-
}
|
|
591
|
-
mount(t, e) {
|
|
592
|
-
let n = t.get("mounted-nodes");
|
|
593
|
-
return n || (n = /* @__PURE__ */ new Map(), t.register("mounted-nodes", n)), n.has(this) ? (process.env.NODE_ENV !== "production" && et.error(
|
|
594
|
-
"Trying to mount an already mounted component node.",
|
|
595
|
-
this
|
|
596
|
-
), () => {
|
|
597
|
-
}) : (this.events.dispatch("components:node-mounted", { node: this }), this.mountCount === 0 && (this.mountCount = this.mountCount + 1, this.events.dispatch("components:node-enter", { node: this })), () => {
|
|
598
|
-
n.delete(this), this.events.dispatch("components:node-unmounted", { node: this }), this.mountCount = this.mountCount - 1, this.mountCount === 0 && this.events.dispatch("components:node-exit", { node: this });
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
appendChild(t, e = "default") {
|
|
602
|
-
if (t.parent) {
|
|
603
|
-
if (t.parent === this)
|
|
604
|
-
return;
|
|
605
|
-
t.parent.removeChild(t);
|
|
606
|
-
}
|
|
607
|
-
t.parent = this, this.children[e] || (this.children[e] = []), this.children[e].push(t), this.events.dispatch("components:node-appended", { node: t });
|
|
608
|
-
}
|
|
609
|
-
prependChild(t, e = "default") {
|
|
610
|
-
if (t.parent) {
|
|
611
|
-
if (t.parent === this)
|
|
612
|
-
return;
|
|
613
|
-
t.parent.removeChild(t);
|
|
614
|
-
}
|
|
615
|
-
t.parent = this, this.children[e] || (this.children[e] = []), this.children[e].unshift(t), this.events.dispatch("components:node-appended", { node: t });
|
|
616
|
-
}
|
|
617
|
-
touchProperties(t, e = {}, n) {
|
|
618
|
-
const i = [{ properties: t }, e];
|
|
619
|
-
return this.changesets.push(i), this.events.dispatch("components:set-properties", { node: this }), () => {
|
|
620
|
-
if (n) {
|
|
621
|
-
const r = this.changesets.indexOf(i);
|
|
622
|
-
r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-properties", { node: this }));
|
|
623
|
-
}
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
writeProperties(t, e = {}, n) {
|
|
627
|
-
const i = [{ properties: t }, e];
|
|
628
|
-
return this.changesets.push(i), this.events.dispatch("components:set-properties", { node: this }), () => {
|
|
629
|
-
if (n) {
|
|
630
|
-
const r = this.changesets.indexOf(i);
|
|
631
|
-
r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-properties", { node: this }));
|
|
632
|
-
}
|
|
633
|
-
};
|
|
634
|
-
}
|
|
635
|
-
writeLayout(t, e = {}, n) {
|
|
636
|
-
const i = [{ layout: t }, e];
|
|
637
|
-
return this.changesets.push(i), this.events.dispatch("components:set-layout", { node: this }), () => {
|
|
638
|
-
if (!n)
|
|
639
|
-
return;
|
|
640
|
-
const r = this.changesets.indexOf(i);
|
|
641
|
-
r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-layout", { node: this }));
|
|
642
|
-
};
|
|
643
|
-
}
|
|
644
|
-
writeContext(t, e = {}, n) {
|
|
645
|
-
const i = [{ context: t }, e];
|
|
646
|
-
return this.changesets.push(i), this.events.dispatch("components:set-context", { node: this }), () => {
|
|
647
|
-
if (!n)
|
|
648
|
-
return;
|
|
649
|
-
const r = this.changesets.indexOf(i);
|
|
650
|
-
r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-context", { node: this }));
|
|
651
|
-
};
|
|
652
|
-
}
|
|
653
|
-
getChildren(t = "default") {
|
|
654
|
-
const e = this.children[t] || [];
|
|
655
|
-
return e.reduce((n, i, r) => {
|
|
656
|
-
const { order: o = r } = i.attributes.layout;
|
|
657
|
-
return n[o] ? n.splice(o, 0, i) : n[o] = i, n;
|
|
658
|
-
}, Array(e.length));
|
|
659
|
-
}
|
|
660
|
-
remove() {
|
|
661
|
-
this.parent && this.parent.removeChild(this);
|
|
662
|
-
}
|
|
663
|
-
removeChild(t) {
|
|
664
|
-
Object.keys(this.children).forEach((e) => {
|
|
665
|
-
const n = this.children[e], i = n.indexOf(t);
|
|
666
|
-
i > -1 && (n.splice(i, 1), this.events.dispatch("components:node-removed", {
|
|
667
|
-
node: t,
|
|
668
|
-
parentNode: this
|
|
669
|
-
}));
|
|
670
|
-
}), delete t.parent;
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
const Re = (s, t, e) => {
|
|
674
|
-
for (let n = 0, i = s.length; n < i && e(s[n]) !== !0; n++) {
|
|
675
|
-
const r = t[s[n].id] || "default", o = s[n].getChildren(r);
|
|
676
|
-
Re(o, t, e);
|
|
677
|
-
}
|
|
678
|
-
}, Kt = (s, t, e) => {
|
|
679
|
-
if (e(s) !== !0) {
|
|
680
|
-
const n = t[s.id] || "default", i = s.children[n];
|
|
681
|
-
Re(i, t, e);
|
|
682
|
-
}
|
|
683
|
-
}, Ct = (s, t) => {
|
|
684
|
-
const e = [];
|
|
685
|
-
return Kt(s, t, (n) => {
|
|
686
|
-
e.push(n);
|
|
687
|
-
}), e;
|
|
688
|
-
}, $s = (s, t, e) => {
|
|
689
|
-
let n;
|
|
690
|
-
return Kt(s, t, (i) => {
|
|
691
|
-
if (e(i))
|
|
692
|
-
return n = i, !0;
|
|
693
|
-
}), n;
|
|
694
|
-
};
|
|
695
|
-
class ws {
|
|
696
|
-
constructor(t, e, n) {
|
|
697
|
-
this.root = t, this.switches = e, this.all = [], this.visible = [], this.detached = [], n.subscribe(
|
|
698
|
-
"components:node-appended",
|
|
699
|
-
(i, r) => {
|
|
700
|
-
this.all.push(r.node), this.visible = Ct(t, e);
|
|
701
|
-
}
|
|
702
|
-
), n.subscribe(
|
|
703
|
-
"components:node-removed",
|
|
704
|
-
(i, r) => {
|
|
705
|
-
let o = this.all.indexOf(r.node);
|
|
706
|
-
o > -1 && this.all.splice(o, 1), o = this.visible.indexOf(r.node), o > -1 && this.visible.splice(o, 1), this.visible = Ct(t, e);
|
|
707
|
-
}
|
|
708
|
-
), n.subscribe(
|
|
709
|
-
"components:node-switched",
|
|
710
|
-
(i, r) => {
|
|
711
|
-
this.visible = Ct(t, e);
|
|
712
|
-
}
|
|
713
|
-
);
|
|
714
|
-
}
|
|
715
|
-
query(t = {}) {
|
|
716
|
-
const e = [];
|
|
717
|
-
return Kt(this.root, this.switches, (n) => {
|
|
718
|
-
Object.keys(t).every((i) => t[i] === n[i]) && e.push(n);
|
|
719
|
-
}), e;
|
|
720
|
-
}
|
|
721
|
-
get(t) {
|
|
722
|
-
return $s(this.root, this.switches, (e) => e.id === t) || this.detached.find((e) => e.id === t);
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
class _s {
|
|
726
|
-
constructor() {
|
|
727
|
-
this.handlers = /* @__PURE__ */ new Map();
|
|
728
|
-
}
|
|
729
|
-
add(t, e) {
|
|
730
|
-
this.handlers.set(t, e);
|
|
731
|
-
}
|
|
732
|
-
get(t) {
|
|
733
|
-
return this.handlers.get(t);
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
const xs = (s) => {
|
|
737
|
-
let t = s, e = 0;
|
|
738
|
-
for (; t.parent; )
|
|
739
|
-
e = e + 1, t = t.parent;
|
|
740
|
-
return e;
|
|
741
|
-
}, Cs = (s) => s.map(([t, e]) => [xs(t), t, e]).sort(([t], [e]) => t - e).map(([, t, e]) => [t, e]), At = (s) => s instanceof Date ? !1 : s && typeof s == "object" && !Array.isArray(s), _ = (s, ...t) => {
|
|
742
|
-
if (!t.length)
|
|
743
|
-
return s;
|
|
744
|
-
const e = t.shift();
|
|
745
|
-
if (At(s) && At(e))
|
|
746
|
-
for (const n in e)
|
|
747
|
-
At(e[n]) ? (s[n] || Object.assign(s, { [n]: {} }), _(s[n], e[n])) : Object.assign(s, { [n]: e[n] });
|
|
748
|
-
return _(s, ...t);
|
|
749
|
-
}, As = (s, t) => !s || s === "all" ? !0 : s.some((e) => t.indexOf(e) > -1), Ps = (s, t) => {
|
|
750
|
-
let e = [], n = [], i;
|
|
751
|
-
const r = () => {
|
|
752
|
-
process.env.NODE_ENV !== "production" && console.time("state-processor.flush");
|
|
753
|
-
const a = /* @__PURE__ */ new Map(), c = Cs(e.map((h, d) => [h, n[d]])), l = (h, d) => {
|
|
754
|
-
var u;
|
|
755
|
-
const p = a.get(h) || {}, $ = d.context && !p.context, b = d.properties && !p.properties, $t = d.layout && !p.layout;
|
|
756
|
-
a.set(h, {
|
|
757
|
-
context: p.context || $,
|
|
758
|
-
properties: p.properties || b,
|
|
759
|
-
layout: p.layout || $t
|
|
760
|
-
}), b && (h.attributes.properties = {}), $t && (h.attributes.layout = {}), $ && (h.attributes.context = _({}, (u = h.parent) == null ? void 0 : u.attributes.context));
|
|
761
|
-
const se = [], ne = [], ie = [];
|
|
762
|
-
if (h.changesets.forEach((w) => {
|
|
763
|
-
const [v, wt] = w;
|
|
764
|
-
As(wt.breakpoints, s.breakpoints) && (b && (typeof v.properties == "function" ? se.push(
|
|
765
|
-
v.properties
|
|
766
|
-
) : _(h.attributes.properties, v.properties)), $t && (typeof v.layout == "function" ? ne.push(v.layout) : _(h.attributes.layout, v.layout)), $ && (typeof v.context == "function" ? ie.push(v.context) : _(h.attributes.context, v.context)));
|
|
767
|
-
}), se.forEach((w) => {
|
|
768
|
-
_(h.attributes.properties, w(h.attributes.properties));
|
|
769
|
-
}), ne.forEach((w) => {
|
|
770
|
-
_(h.attributes.layout, w(h.attributes.layout));
|
|
771
|
-
}), ie.forEach((w) => {
|
|
772
|
-
_(h.attributes.context, w(h.attributes.context));
|
|
773
|
-
}), $ || d.recursive) {
|
|
774
|
-
const w = s.getBranch(h), v = d.recursive ? d : {
|
|
775
|
-
context: !!$
|
|
776
|
-
};
|
|
777
|
-
h.getChildren(w).forEach((wt) => {
|
|
778
|
-
l(wt, v);
|
|
779
|
-
});
|
|
780
|
-
}
|
|
781
|
-
};
|
|
782
|
-
process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"), c.forEach(([h, d]) => {
|
|
783
|
-
l(h, d);
|
|
784
|
-
}), e = [], n = [], t(a);
|
|
785
|
-
}, o = () => {
|
|
786
|
-
clearTimeout(i), i = setTimeout(r, 0);
|
|
787
|
-
};
|
|
788
|
-
return (a, c) => {
|
|
789
|
-
const l = e.indexOf(a);
|
|
790
|
-
if (l > -1) {
|
|
791
|
-
const h = n[l];
|
|
792
|
-
return c.context && (h.context = !0), c.properties && (h.properties = !0), c.layout && (h.layout = !0), c.recursive && (h.recursive = !0), o();
|
|
793
|
-
}
|
|
794
|
-
return e.push(a), n.push(c), o();
|
|
795
|
-
};
|
|
796
|
-
};
|
|
797
|
-
class Gt {
|
|
798
|
-
constructor(t, e = {}) {
|
|
799
|
-
this.providers = e, this.breakpoints = [], this.actionsState = { handlers: [], watchers: [] }, this.switches = {}, this.changesets = [], this.subscriptions = [], this.customComponentHandler = new _s(), this.events = t.events.createChild(this);
|
|
800
|
-
const n = new de(this.events, "root");
|
|
801
|
-
n.name = `root-${t.name}`, this.nodes = new ws(n, this.switches, this.events);
|
|
802
|
-
const i = this.processNode = Ps(
|
|
803
|
-
this,
|
|
804
|
-
(r) => {
|
|
805
|
-
const o = Array.from(r.keys());
|
|
806
|
-
process.env.NODE_ENV !== "production" && console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
|
|
807
|
-
${o.map(
|
|
808
|
-
(a) => `${a.name || "<no name>"} (${a.id})
|
|
809
|
-
`
|
|
810
|
-
)}`), o.forEach((a) => {
|
|
811
|
-
const c = r.get(a);
|
|
812
|
-
a.parent && a.parent.type === "root" && this.events.dispatch("components:root-children-changed", { node: a }), c != null && c.context && this.events.dispatch("components:context-changed", { node: a }), c != null && c.properties && this.events.dispatch("components:properties-changed", { node: a }), c != null && c.layout && this.events.dispatch("components:layout-changed", { node: a });
|
|
813
|
-
}), this.events.dispatch(
|
|
814
|
-
"components:component-model-initialized",
|
|
815
|
-
{},
|
|
816
|
-
{ bubbles: !0 }
|
|
817
|
-
);
|
|
818
|
-
}
|
|
819
|
-
);
|
|
820
|
-
Promise.all(
|
|
821
|
-
Object.keys(e).map((r) => e[r].load(this))
|
|
822
|
-
), this.subscriptions.push(
|
|
823
|
-
this.events.subscribe(
|
|
824
|
-
"components:node-appended",
|
|
825
|
-
(r, o) => {
|
|
826
|
-
const { node: a } = o;
|
|
827
|
-
this.changesets.forEach((c) => {
|
|
828
|
-
const { changeset: l, target: h, removes: d } = c, [u, p] = l;
|
|
829
|
-
h.match(o.node) && (u.properties && d.push(a.writeProperties(u.properties, p)), u.context && d.push(a.writeContext(u.context, p)), u.layout && d.push(a.writeLayout(u.layout, p)));
|
|
830
|
-
});
|
|
831
|
-
}
|
|
832
|
-
)
|
|
833
|
-
), this.subscriptions.push(
|
|
834
|
-
this.events.subscribe(
|
|
835
|
-
"components:node-appended",
|
|
836
|
-
(r, o) => {
|
|
837
|
-
i(o.node, { properties: !0, context: !0 });
|
|
838
|
-
}
|
|
839
|
-
)
|
|
840
|
-
), this.subscriptions.push(
|
|
841
|
-
this.events.subscribe(
|
|
842
|
-
"components:set-properties",
|
|
843
|
-
(r, o) => {
|
|
844
|
-
i(o.node, { properties: !0 });
|
|
845
|
-
}
|
|
846
|
-
)
|
|
847
|
-
), this.subscriptions.push(
|
|
848
|
-
this.events.subscribe(
|
|
849
|
-
"components:set-context",
|
|
850
|
-
(r, o) => {
|
|
851
|
-
i(o.node, { properties: !0, context: !0 });
|
|
852
|
-
}
|
|
853
|
-
)
|
|
854
|
-
), this.subscriptions.push(
|
|
855
|
-
this.events.subscribe(
|
|
856
|
-
"components:set-indent",
|
|
857
|
-
(r, o) => {
|
|
858
|
-
i(o.node, { layout: !0 });
|
|
859
|
-
}
|
|
860
|
-
)
|
|
861
|
-
), this.subscriptions.push(
|
|
862
|
-
this.events.subscribe(
|
|
863
|
-
"components:set-layout",
|
|
864
|
-
(r, o) => {
|
|
865
|
-
i(o.node, { layout: !0 });
|
|
866
|
-
}
|
|
867
|
-
)
|
|
868
|
-
), this.subscriptions.push(
|
|
869
|
-
this.events.subscribe(
|
|
870
|
-
"components:node-switched",
|
|
871
|
-
(r, { node: o, branch: a }) => {
|
|
872
|
-
i(o, {
|
|
873
|
-
layout: !0,
|
|
874
|
-
recursive: !0,
|
|
875
|
-
properties: !0,
|
|
876
|
-
context: !0
|
|
877
|
-
});
|
|
878
|
-
}
|
|
879
|
-
)
|
|
880
|
-
), this.subscriptions.push(
|
|
881
|
-
this.events.subscribe(
|
|
882
|
-
"components:node-removed",
|
|
883
|
-
(r, { parentNode: o }) => {
|
|
884
|
-
i(o, { properties: !0 });
|
|
885
|
-
}
|
|
886
|
-
)
|
|
887
|
-
), this.events.parent && this.events.parent.dispatch("components:platform-created", {
|
|
888
|
-
platform: this
|
|
889
|
-
});
|
|
890
|
-
}
|
|
891
|
-
static getInstance(t) {
|
|
892
|
-
return t.getAsync("components");
|
|
893
|
-
}
|
|
894
|
-
addBreakpoint(t) {
|
|
895
|
-
this.breakpoints.indexOf(t) === -1 && (this.breakpoints.push(t), this.processNode(this.nodes.root, {
|
|
896
|
-
context: !0,
|
|
897
|
-
properties: !0,
|
|
898
|
-
layout: !0,
|
|
899
|
-
recursive: !0
|
|
900
|
-
}));
|
|
901
|
-
}
|
|
902
|
-
removeBreakpoint(t) {
|
|
903
|
-
const e = this.breakpoints.indexOf(t);
|
|
904
|
-
e > -1 && (this.breakpoints.splice(e, 1), this.processNode(this.nodes.root, {
|
|
905
|
-
context: !0,
|
|
906
|
-
properties: !0,
|
|
907
|
-
layout: !0,
|
|
908
|
-
recursive: !0
|
|
909
|
-
}));
|
|
910
|
-
}
|
|
911
|
-
setSwitch(t, e) {
|
|
912
|
-
this.switches[t.id] = e, this.events.dispatch("components:node-switched", { node: t, branch: e });
|
|
913
|
-
}
|
|
914
|
-
getBranch(t) {
|
|
915
|
-
return this.switches[t.id];
|
|
916
|
-
}
|
|
917
|
-
/**
|
|
918
|
-
* Creates a `ComponentNode` of the specified type.
|
|
919
|
-
* @param type Type of node.
|
|
920
|
-
*/
|
|
921
|
-
createNode(t, e = {}) {
|
|
922
|
-
const n = new de(this.events, t);
|
|
923
|
-
return e.detached && this.nodes.detached.push(n), n;
|
|
924
|
-
}
|
|
925
|
-
components() {
|
|
926
|
-
return new ut(this);
|
|
927
|
-
}
|
|
928
|
-
actions(t, e) {
|
|
929
|
-
return new Ft(this, t, e);
|
|
930
|
-
}
|
|
931
|
-
write(t) {
|
|
932
|
-
const {
|
|
933
|
-
provider: e,
|
|
934
|
-
target: n,
|
|
935
|
-
attributes: i,
|
|
936
|
-
options: r = {},
|
|
937
|
-
removable: o
|
|
938
|
-
} = t, a = t.key || qt(), c = { changeset: [i, r], target: n, removes: [] };
|
|
939
|
-
if (e) {
|
|
940
|
-
const l = this.providers[e];
|
|
941
|
-
l.write(a, n, i, r), c.removes.push(() => {
|
|
942
|
-
l.remove(a);
|
|
943
|
-
});
|
|
944
|
-
}
|
|
945
|
-
return this.changesets.push(c), this.nodes.all.forEach((l) => {
|
|
946
|
-
if (n.match(l)) {
|
|
947
|
-
let h = () => {
|
|
948
|
-
};
|
|
949
|
-
i.properties && (h = l.writeProperties(
|
|
950
|
-
i.properties,
|
|
951
|
-
r,
|
|
952
|
-
o
|
|
953
|
-
)), i.context && (h = l.writeContext(i.context, r, o)), i.layout && (h = l.writeContext(i.layout, r, o)), c.removes.push(h);
|
|
954
|
-
}
|
|
955
|
-
}), () => {
|
|
956
|
-
if (o) {
|
|
957
|
-
c.removes.forEach((h) => h());
|
|
958
|
-
const l = this.changesets.indexOf(c);
|
|
959
|
-
l > -1 && this.changesets.splice(l, 1);
|
|
960
|
-
}
|
|
961
|
-
};
|
|
962
|
-
}
|
|
963
|
-
addComponentHandler(t, e) {
|
|
964
|
-
this.customComponentHandler.add(t, e);
|
|
965
|
-
}
|
|
966
|
-
getComponentHandler(t) {
|
|
967
|
-
return this.customComponentHandler.get(t);
|
|
968
|
-
}
|
|
969
|
-
dispose() {
|
|
970
|
-
this.subscriptions.forEach((t) => t());
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
const pe = (s, t) => ({
|
|
974
|
-
id: s.id,
|
|
975
|
-
type: s.type,
|
|
976
|
-
name: s.name,
|
|
977
|
-
branch: t || "default"
|
|
978
|
-
}), Es = (s, t, e, n = qt(), i = {}) => s.getAsync("components").then((r) => {
|
|
979
|
-
let o;
|
|
980
|
-
if (typeof t == "string") {
|
|
981
|
-
const l = new ut(r);
|
|
982
|
-
l.ofType(t), o = l;
|
|
983
|
-
} else
|
|
984
|
-
o = t;
|
|
985
|
-
const a = {}, c = (l) => {
|
|
986
|
-
const h = a[l.id];
|
|
987
|
-
return h ? Promise.resolve(h.controller) : Gt.getInstance(s).then((d) => new Ie(d, l, n));
|
|
988
|
-
};
|
|
989
|
-
r.events.subscribe(
|
|
990
|
-
"components:node-enter",
|
|
991
|
-
(l, { node: h }) => {
|
|
992
|
-
o.match(h) && c(h).then((d) => {
|
|
993
|
-
Promise.resolve(e(d)).then((u) => {
|
|
994
|
-
a[h.id] = {
|
|
995
|
-
dispose: u,
|
|
996
|
-
controller: d
|
|
997
|
-
};
|
|
998
|
-
});
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
), r.events.subscribe(
|
|
1002
|
-
"components:node-exit",
|
|
1003
|
-
(l, { node: h }) => {
|
|
1004
|
-
const d = a[h.id];
|
|
1005
|
-
d && (d.dispose && d.dispose(), i.reuseController || (d.controller.dispose(), delete a[h.id]));
|
|
1006
|
-
}
|
|
1007
|
-
);
|
|
1008
|
-
}), mt = (s, t, ...e) => typeof t == "string" ? s(`[humany] ${t}`, ...e) : s(t, ...e), K = class {
|
|
1009
|
-
constructor() {
|
|
1010
|
-
this.keys = [], this.log = (s, ...t) => this.lookup(s, () => K.log(...t)), this.warn = (s, ...t) => this.lookup(s, () => K.warn(...t)), this.error = (s, ...t) => this.lookup(s, () => K.error(...t)), this.info = (s, ...t) => this.lookup(s, () => K.info(...t));
|
|
1011
|
-
}
|
|
1012
|
-
lookup(s, t) {
|
|
1013
|
-
this.keys.indexOf(s) === -1 && (this.keys.push(s), t());
|
|
1014
|
-
}
|
|
1015
|
-
};
|
|
1016
|
-
let y = K;
|
|
1017
|
-
y.log = (...s) => mt(console.log, ...s);
|
|
1018
|
-
y.warn = (...s) => mt(console.warn, ...s);
|
|
1019
|
-
y.error = (...s) => mt(console.error, ...s);
|
|
1020
|
-
y.info = (...s) => mt(console.info, ...s);
|
|
1021
|
-
const Ue = (s) => {
|
|
1022
|
-
let t = {}, e, n;
|
|
1023
|
-
if (typeof s != "object" || s === null)
|
|
1024
|
-
return s;
|
|
1025
|
-
t = Array.isArray(s) ? [] : {};
|
|
1026
|
-
for (n in s)
|
|
1027
|
-
e = s[n], t[n] = typeof e == "object" && e !== null ? Ue(e) : e;
|
|
1028
|
-
return t;
|
|
1029
|
-
}, Os = Ue;
|
|
1030
|
-
function ue(s) {
|
|
1031
|
-
let t = 0;
|
|
1032
|
-
if (s.length === 0)
|
|
1033
|
-
return t.toString();
|
|
1034
|
-
for (let e = 0; e < s.length; e++) {
|
|
1035
|
-
const n = s.charCodeAt(e);
|
|
1036
|
-
t = (t << 5) - t + n, t = t & t;
|
|
1037
|
-
}
|
|
1038
|
-
return t.toString();
|
|
1039
|
-
}
|
|
1040
|
-
let ks = class {
|
|
1041
|
-
constructor(s, t) {
|
|
1042
|
-
this.lockWarningTime = s, this.lockErrorTime = t, this.tasks = [], this.current = Promise.resolve(), this.next = this.next.bind(this);
|
|
1043
|
-
}
|
|
1044
|
-
add(s, t, e, n) {
|
|
1045
|
-
this.tasks.push({ task: s, resolve: t, reject: e, done: n }), this.next();
|
|
1046
|
-
}
|
|
1047
|
-
next() {
|
|
1048
|
-
this.current = this.current.then(() => {
|
|
1049
|
-
const s = this.tasks.shift();
|
|
1050
|
-
if (s) {
|
|
1051
|
-
let t;
|
|
1052
|
-
const e = setTimeout(() => {
|
|
1053
|
-
process.env.NODE_ENV !== "production" && y.warn(
|
|
1054
|
-
`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,
|
|
1055
|
-
s
|
|
1056
|
-
), t = setTimeout(() => {
|
|
1057
|
-
s.reject("lock timeout exceeded");
|
|
1058
|
-
}, this.lockErrorTime);
|
|
1059
|
-
}, this.lockWarningTime), n = Promise.resolve(s.task()).then((i) => (clearTimeout(e), clearTimeout(t), i));
|
|
1060
|
-
return Promise.resolve(n).then(this.next).then(
|
|
1061
|
-
() => n.then((i) => {
|
|
1062
|
-
s.done(), s.resolve(i);
|
|
1063
|
-
})
|
|
1064
|
-
).catch((i) => (s.done(), s.reject(i), this.next()));
|
|
1065
|
-
}
|
|
1066
|
-
return Promise.resolve();
|
|
1067
|
-
});
|
|
1068
|
-
}
|
|
1069
|
-
};
|
|
1070
|
-
const nt = /* @__PURE__ */ new WeakMap();
|
|
1071
|
-
function ft(s, t = 5e3, e = 1e3) {
|
|
1072
|
-
return nt.has(s) || nt.set(s, new ks(t, e)), (n) => new Promise((i, r) => {
|
|
1073
|
-
const o = nt.get(s);
|
|
1074
|
-
o.add(n, i, r, () => {
|
|
1075
|
-
o.tasks.length || nt.delete(s);
|
|
1076
|
-
});
|
|
1077
|
-
});
|
|
1078
|
-
}
|
|
1079
|
-
const A = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
1080
|
-
function Ss() {
|
|
1081
|
-
return A() + A() + "-" + A() + "-" + A() + "-" + A() + "-" + A() + A() + A();
|
|
1082
|
-
}
|
|
1083
|
-
var Ns = Object.defineProperty, ge = Object.getOwnPropertySymbols, Ts = Object.prototype.hasOwnProperty, js = Object.prototype.propertyIsEnumerable, me = (s, t, e) => t in s ? Ns(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, H = (s, t) => {
|
|
1084
|
-
for (var e in t || (t = {}))
|
|
1085
|
-
Ts.call(t, e) && me(s, e, t[e]);
|
|
1086
|
-
if (ge)
|
|
1087
|
-
for (var e of ge(t))
|
|
1088
|
-
js.call(t, e) && me(s, e, t[e]);
|
|
1089
|
-
return s;
|
|
1090
|
-
}, x = /* @__PURE__ */ ((s) => (s.Cookie = "cookie", s.Local = "local", s.Session = "session", s))(x || {}), Zt = /* @__PURE__ */ ((s) => (s.Tenant = "tenant", s.Implementation = "implementation", s.Widget = "widget", s))(Zt || {}), f = /* @__PURE__ */ ((s) => (s.Necessary = "necessary", s.Functional = "functional", s.Analytical = "analytical", s.Marketing = "marketing", s))(f || {});
|
|
1091
|
-
const Is = (s, t, e, n = {}) => fe(s, e).then((i) => (process.env.NODE_ENV !== "production" && i && y.warn(
|
|
1092
|
-
`createStorageWriter: Attempted to create storage writer using unallowed category.
|
|
1093
|
-
Key: ${t}
|
|
1094
|
-
Category: ${JSON.stringify(e)}
|
|
1095
|
-
Options: ${JSON.stringify(n)}`
|
|
1096
|
-
), (r) => (Yt(s), fe(s, e).then((o) => {
|
|
1097
|
-
if (o) {
|
|
1098
|
-
process.env.NODE_ENV !== "production" && y.warn(
|
|
1099
|
-
`storageWriter: Attempted to write to storage using unallowed category.
|
|
1100
|
-
Key: ${t}
|
|
1101
|
-
Category: ${JSON.stringify(e)}
|
|
1102
|
-
Value: ${JSON.stringify(r)}
|
|
1103
|
-
Options: ${JSON.stringify(n)}`
|
|
1104
|
-
);
|
|
1105
|
-
return;
|
|
1106
|
-
}
|
|
1107
|
-
const {
|
|
1108
|
-
scope: a = Zt.Widget,
|
|
1109
|
-
medium: c = x.Session,
|
|
1110
|
-
duration: l
|
|
1111
|
-
} = n, h = Ls();
|
|
1112
|
-
return h[a][t] = He(r, e, l), c === x.Cookie ? Ws(s, h) : Bs(s, c, h);
|
|
1113
|
-
})))), Rs = (s, t, e = x.Session) => (Yt(s), typeof t == "undefined" ? (process.env.NODE_ENV !== "production" && y.warn("readStorage: Undefined key passed when reading storage. ", t, e), Promise.resolve(void 0)) : e === x.Cookie ? Ms(s).then((n) => zt(n, t)) : Vs(s, e).then((n) => zt(n, t))), W = (s) => !!Object.entries(s).filter(([t, e]) => typeof e != "undefined").length, Pt = (s) => Object.entries(s).filter(([t, e]) => typeof e != "undefined").forEach(([t, { value: e }]) => {
|
|
1114
|
-
typeof e == "undefined" && delete s[t];
|
|
1115
|
-
}), Le = (s, t) => {
|
|
1116
|
-
const e = {
|
|
1117
|
-
tenant: H(H({}, s.tenant), t.tenant),
|
|
1118
|
-
implementation: H(H({}, s.implementation), t.implementation),
|
|
1119
|
-
widget: H(H({}, s.widget), t.widget)
|
|
1120
|
-
};
|
|
1121
|
-
return Pt(e.tenant), Pt(e.implementation), Pt(e.widget), e;
|
|
1122
|
-
}, Us = (s) => Object.entries(s).reduce((t, e) => {
|
|
1123
|
-
const [n, i] = e;
|
|
1124
|
-
return Object.entries(i).forEach((r) => {
|
|
1125
|
-
const [o, { expiration: a }] = r;
|
|
1126
|
-
a && t.push(a);
|
|
1127
|
-
}), t;
|
|
1128
|
-
}, []).slice().sort((t, e) => new Date(e).valueOf() - new Date(t).valueOf()).shift() || Qt(), vt = (s) => {
|
|
1129
|
-
const {
|
|
1130
|
-
name: t,
|
|
1131
|
-
implementation: { name: e, tenant: n }
|
|
1132
|
-
} = s.get("$widget");
|
|
1133
|
-
return [
|
|
1134
|
-
`humany_${n}`,
|
|
1135
|
-
`humany_${ue(n + e)}`,
|
|
1136
|
-
`humany_${ue(n + e + t)}`
|
|
1137
|
-
];
|
|
1138
|
-
}, Et = (s) => {
|
|
1139
|
-
const t = new RegExp(`(?:^|;)\\s?${s}=(.*?)(?:;|$)`, "i"), e = document.cookie.match(t);
|
|
1140
|
-
return e && e[1] && JSON.parse(e[1]) || void 0;
|
|
1141
|
-
}, Ot = (s, t, e) => {
|
|
1142
|
-
const n = `${s}=${JSON.stringify(t).trim()}`, i = `expires=${new Date(e).toUTCString()}`, r = "path=/", o = "SameSite=None;Secure";
|
|
1143
|
-
return document.cookie = `${n}; ${i}; ${r}; ${o}`;
|
|
1144
|
-
}, Xt = (s) => {
|
|
1145
|
-
const [t, e, n] = vt(s), i = Et(t) || {}, r = Et(e) || {}, o = Et(n) || {};
|
|
1146
|
-
return {
|
|
1147
|
-
tenant: i,
|
|
1148
|
-
implementation: r,
|
|
1149
|
-
widget: o
|
|
1150
|
-
};
|
|
1151
|
-
}, De = (s, t) => {
|
|
1152
|
-
const e = Xt(s), n = Le(e, t), [i, r, o] = vt(s), { tenant: a, implementation: c, widget: l } = n, h = Us(t), d = Qt({ days: -1 });
|
|
1153
|
-
Ot(i, a, W(a) ? h : d), Ot(
|
|
1154
|
-
r,
|
|
1155
|
-
c,
|
|
1156
|
-
W(c) ? h : d
|
|
1157
|
-
), Ot(o, l, W(l) ? h : d);
|
|
1158
|
-
}, at = (s, t) => {
|
|
1159
|
-
const [e, n, i] = vt(s), r = t.getItem(e) || "{}", o = t.getItem(n) || "{}", a = t.getItem(i) || "{}";
|
|
1160
|
-
return {
|
|
1161
|
-
tenant: JSON.parse(r),
|
|
1162
|
-
implementation: JSON.parse(o),
|
|
1163
|
-
widget: JSON.parse(a)
|
|
1164
|
-
};
|
|
1165
|
-
}, Ht = (s, t, e) => {
|
|
1166
|
-
const n = at(s, t), i = Le(n, e), [r, o, a] = vt(s), { tenant: c, implementation: l, widget: h } = i;
|
|
1167
|
-
W(c) ? t.setItem(r, JSON.stringify(c)) : t.removeItem(r), W(l) ? t.setItem(o, JSON.stringify(l)) : t.removeItem(o), W(h) ? t.setItem(a, JSON.stringify(h)) : t.removeItem(a);
|
|
1168
|
-
}, Ls = () => ({ tenant: {}, implementation: {}, widget: {} }), Ds = (s) => s ? !!s && /* @__PURE__ */ new Date() > new Date(s) : !1, zt = (s, t) => {
|
|
1169
|
-
const e = s.widget[t] || s.implementation[t] || s.tenant[t];
|
|
1170
|
-
return e == null ? void 0 : e.value;
|
|
1171
|
-
}, He = (s, t, e) => e ? {
|
|
1172
|
-
value: s,
|
|
1173
|
-
category: t,
|
|
1174
|
-
expiration: typeof e == "object" ? Qt(e) : e
|
|
1175
|
-
} : {
|
|
1176
|
-
value: s,
|
|
1177
|
-
category: t
|
|
1178
|
-
}, Hs = (s, t) => {
|
|
1179
|
-
const e = Os(s);
|
|
1180
|
-
return Object.entries(e).forEach(([n, i]) => {
|
|
1181
|
-
Object.entries(i).forEach(([r, o]) => {
|
|
1182
|
-
const { expiration: a, category: c } = o;
|
|
1183
|
-
(Ds(a) || zs(t, c)) && (i[r] = He(void 0, c, a));
|
|
1184
|
-
});
|
|
1185
|
-
}), e;
|
|
1186
|
-
}, fe = (s, t) => Rs(s, "storagePolicy", x.Cookie).then(
|
|
1187
|
-
(e = [f.Necessary]) => !!t && e.indexOf(t) === -1
|
|
1188
|
-
), zs = (s = [f.Necessary], t) => !!t && s.indexOf(t) === -1, Yt = (s) => {
|
|
1189
|
-
const t = Xt(s), e = at(s, window.localStorage), n = at(s, sessionStorage), i = zt(t, "storagePolicy"), [r, o, a] = [
|
|
1190
|
-
t,
|
|
1191
|
-
e,
|
|
1192
|
-
n
|
|
1193
|
-
].map((c) => Hs(c, i));
|
|
1194
|
-
De(s, r), Ht(s, window.localStorage, o), Ht(s, window.sessionStorage, a);
|
|
1195
|
-
}, Qt = (s = { days: 30 }) => {
|
|
1196
|
-
const { days: t = 0, hours: e = 0, minutes: n = 0, seconds: i = 0 } = s, r = /* @__PURE__ */ new Date();
|
|
1197
|
-
return r.setTime(r.getTime() + e * 60 * 60 * 1e3), r.setTime(r.getTime() + t * 24 * 60 * 60 * 1e3), r.setTime(r.getTime() + n * 60 * 1e3), r.setTime(r.getTime() + i * 1e3), r.toISOString();
|
|
1198
|
-
}, Ms = (s) => ft(document)(() => Xt(s)), Ws = (s, t) => ft(document)(() => De(s, t)), Vs = (s, t) => {
|
|
1199
|
-
const e = t === x.Local ? window.localStorage : window.sessionStorage;
|
|
1200
|
-
return ft(e)(() => at(s, e));
|
|
1201
|
-
}, Bs = (s, t, e) => {
|
|
1202
|
-
const n = t === x.Local ? window.localStorage : window.sessionStorage;
|
|
1203
|
-
return ft(n)(() => Ht(s, n, e));
|
|
1204
|
-
}, kt = (s, t, e, ...n) => {
|
|
1205
|
-
const i = `[${s.get("$environment").name || "webprovisions"}] ${e}`;
|
|
1206
|
-
switch (t) {
|
|
1207
|
-
case "info":
|
|
1208
|
-
console.info(i, ...n);
|
|
1209
|
-
break;
|
|
1210
|
-
case "warning":
|
|
1211
|
-
console.warn(i, ...n);
|
|
1212
|
-
break;
|
|
1213
|
-
case "error":
|
|
1214
|
-
console.error(i, ...n);
|
|
1215
|
-
break;
|
|
1216
|
-
}
|
|
1217
|
-
}, Js = (s) => {
|
|
1218
|
-
const t = s.container || s;
|
|
1219
|
-
return {
|
|
1220
|
-
info: (e, ...n) => kt(t, "info", e, ...n),
|
|
1221
|
-
warn: (e, ...n) => kt(t, "warning", e, ...n),
|
|
1222
|
-
error: (e, ...n) => kt(t, "error", e, ...n)
|
|
1223
|
-
};
|
|
1224
|
-
};
|
|
1225
|
-
var ct = /* @__PURE__ */ ((s) => (s.Implementation = "implementation", s.Widget = "widget", s))(ct || {}), j = /* @__PURE__ */ ((s) => (s.Pre = "pre", s.Post = "post", s))(j || {});
|
|
1226
|
-
const Fs = (s, t, e, n) => {
|
|
1227
|
-
try {
|
|
1228
|
-
const i = new t(e, n);
|
|
1229
|
-
return {
|
|
1230
|
-
name: s,
|
|
1231
|
-
invoke: (r, o) => {
|
|
1232
|
-
let a;
|
|
1233
|
-
return i[r] && (a = i[r].call(i, o)), Promise.resolve(a);
|
|
1234
|
-
},
|
|
1235
|
-
getInstance: () => i
|
|
1236
|
-
};
|
|
1237
|
-
} catch (i) {
|
|
1238
|
-
if (i.message && i.message.indexOf("is not a constructor") >= 0)
|
|
1239
|
-
return {
|
|
1240
|
-
name: s,
|
|
1241
|
-
invoke: (r) => {
|
|
1242
|
-
let o;
|
|
1243
|
-
return r === "initialize" && (o = t(e, n)), Promise.resolve(o);
|
|
1244
|
-
},
|
|
1245
|
-
getInstance: () => t
|
|
1246
|
-
};
|
|
1247
|
-
throw i;
|
|
1248
|
-
}
|
|
1249
|
-
};
|
|
1250
|
-
function ve(s, t) {
|
|
1251
|
-
return typeof s == "undefined" ? t : s;
|
|
1252
|
-
}
|
|
1253
|
-
class qs {
|
|
1254
|
-
constructor(t = {}) {
|
|
1255
|
-
this.part = t;
|
|
1256
|
-
}
|
|
1257
|
-
createCommand(t, e, n) {
|
|
1258
|
-
let i;
|
|
1259
|
-
typeof e == "function" ? i = {
|
|
1260
|
-
scope: ct.Widget,
|
|
1261
|
-
stage: j.Post,
|
|
1262
|
-
defaultArgs: void 0,
|
|
1263
|
-
handlerResolver: e
|
|
1264
|
-
} : i = {
|
|
1265
|
-
scope: ve(e.scope, ct.Widget),
|
|
1266
|
-
stage: ve(e.stage, j.Post),
|
|
1267
|
-
defaultArgs: e.defaultArgs,
|
|
1268
|
-
handlerResolver: n
|
|
1269
|
-
};
|
|
1270
|
-
let r = this.part;
|
|
1271
|
-
const o = t.split(".");
|
|
1272
|
-
return o.forEach((a, c) => {
|
|
1273
|
-
c === o.length - 1 ? r[a] || (r[a] = () => i) : r = this.part[a] = this.part[a] || {};
|
|
1274
|
-
}), this;
|
|
1275
|
-
}
|
|
1276
|
-
get() {
|
|
1277
|
-
return this.part;
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
const ze = (s) => {
|
|
1281
|
-
const t = new qs({});
|
|
1282
|
-
return s(t), t.get();
|
|
1283
|
-
};
|
|
1284
|
-
ze((s) => {
|
|
1285
|
-
s.createCommand(
|
|
1286
|
-
"types.register",
|
|
1287
|
-
{ scope: ct.Implementation, stage: j.Pre },
|
|
1288
|
-
(t) => (e, n) => {
|
|
1289
|
-
t.container.get("$types")[e] = n;
|
|
1290
|
-
}
|
|
1291
|
-
).createCommand(
|
|
1292
|
-
"type",
|
|
1293
|
-
{ stage: j.Pre },
|
|
1294
|
-
(t) => (e) => {
|
|
1295
|
-
t.container.register("$type", e);
|
|
1296
|
-
}
|
|
1297
|
-
).createCommand(
|
|
1298
|
-
"settings",
|
|
1299
|
-
{ stage: j.Pre, defaultArgs: [null] },
|
|
1300
|
-
(t) => (e) => {
|
|
1301
|
-
t.events.dispatch(
|
|
1302
|
-
"settings:change",
|
|
1303
|
-
e,
|
|
1304
|
-
{ bubbles: !0 }
|
|
1305
|
-
), t.container.register("$settings", e);
|
|
1306
|
-
}
|
|
1307
|
-
).createCommand(
|
|
1308
|
-
"plugin",
|
|
1309
|
-
{ stage: j.Pre },
|
|
1310
|
-
(t) => (e, n, i) => {
|
|
1311
|
-
const { container: r } = t;
|
|
1312
|
-
let o = null, a = e, c = n;
|
|
1313
|
-
typeof e == "string" && (o = e, a = n, c = i);
|
|
1314
|
-
const l = (h) => {
|
|
1315
|
-
const { transformPluginSettings: d } = t.container.get("$environmentOptions"), u = d ? d(
|
|
1316
|
-
c || {},
|
|
1317
|
-
o,
|
|
1318
|
-
t.container,
|
|
1319
|
-
a
|
|
1320
|
-
) : n;
|
|
1321
|
-
try {
|
|
1322
|
-
const p = Fs(
|
|
1323
|
-
o,
|
|
1324
|
-
a,
|
|
1325
|
-
r,
|
|
1326
|
-
u
|
|
1327
|
-
);
|
|
1328
|
-
r.get("$plugins").push(p), h && p.invoke("initialize", null);
|
|
1329
|
-
} catch (p) {
|
|
1330
|
-
Js(t).warn("Error when initializing plugin", p);
|
|
1331
|
-
}
|
|
1332
|
-
};
|
|
1333
|
-
t.container.get("$instance") ? l(!0) : t.events.subscribeOnce("widget:instance-created", () => l(!1));
|
|
1334
|
-
}
|
|
1335
|
-
).createCommand(
|
|
1336
|
-
"container.register",
|
|
1337
|
-
(t) => (e, n) => {
|
|
1338
|
-
t.container.register(e, n);
|
|
1339
|
-
}
|
|
1340
|
-
).createCommand(
|
|
1341
|
-
"container.registerAsync",
|
|
1342
|
-
(t) => (e, n) => {
|
|
1343
|
-
t.container.registerAsync(e, n);
|
|
1344
|
-
}
|
|
1345
|
-
).createCommand(
|
|
1346
|
-
"container.registerFactory",
|
|
1347
|
-
(t) => (e, n) => {
|
|
1348
|
-
t.container.registerFactory(e, n);
|
|
1349
|
-
}
|
|
1350
|
-
).createCommand(
|
|
1351
|
-
"container.touch",
|
|
1352
|
-
(t) => (e, n) => {
|
|
1353
|
-
t.container.touch(e, n);
|
|
1354
|
-
}
|
|
1355
|
-
).createCommand(
|
|
1356
|
-
"csp",
|
|
1357
|
-
{},
|
|
1358
|
-
(t) => (e) => {
|
|
1359
|
-
t.container.register("csp", e);
|
|
1360
|
-
}
|
|
1361
|
-
);
|
|
1362
|
-
});
|
|
1363
|
-
ze((s) => {
|
|
1364
|
-
s.createCommand("storage", (t) => (e = {}) => {
|
|
1365
|
-
const { consent: n } = e;
|
|
1366
|
-
if (typeof n != "undefined") {
|
|
1367
|
-
if (typeof n != "number" && typeof n != "string" && !Array.isArray(n)) {
|
|
1368
|
-
process.env.NODE_ENV !== "production" && y.warn(
|
|
1369
|
-
`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
|
|
1370
|
-
Passed consent: ${JSON.stringify(n)}`
|
|
1371
|
-
);
|
|
1372
|
-
return;
|
|
1373
|
-
}
|
|
1374
|
-
if (Array.isArray(n) && !n.every(
|
|
1375
|
-
(r) => typeof r == "number" || typeof r == "string"
|
|
1376
|
-
)) {
|
|
1377
|
-
process.env.NODE_ENV !== "production" && y.warn(
|
|
1378
|
-
`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
|
|
1379
|
-
Passed consent: ${JSON.stringify(n)}`
|
|
1380
|
-
);
|
|
1381
|
-
return;
|
|
1382
|
-
}
|
|
1383
|
-
const i = [
|
|
1384
|
-
f.Necessary,
|
|
1385
|
-
f.Functional,
|
|
1386
|
-
f.Analytical,
|
|
1387
|
-
f.Marketing
|
|
1388
|
-
].filter((r, o, a) => typeof n == "number" ? n > o : typeof n == "string" ? a.indexOf(n) + 1 > o : Array.isArray(n) ? n.findIndex((c) => c === o + 1 || c === r) > -1 : !0);
|
|
1389
|
-
return i.indexOf(f.Necessary) === -1 && (process.env.NODE_ENV !== "production" && y.warn(
|
|
1390
|
-
`storagePolicyConfigurationApi: passed consent does not include category: '${f.Necessary}'. Consent has to atleast include the '${f.Necessary}' category.
|
|
1391
|
-
Passed consent: ${JSON.stringify(n)}`
|
|
1392
|
-
), i.unshift(f.Necessary)), Is(
|
|
1393
|
-
t.container,
|
|
1394
|
-
"storagePolicy",
|
|
1395
|
-
f.Necessary,
|
|
1396
|
-
{
|
|
1397
|
-
medium: x.Cookie,
|
|
1398
|
-
scope: Zt.Tenant,
|
|
1399
|
-
duration: { days: 365 }
|
|
1400
|
-
}
|
|
1401
|
-
).then((r) => r(i)).then(() => {
|
|
1402
|
-
Yt(t.container), t.events.dispatch("storage:policy-changed", i);
|
|
1403
|
-
});
|
|
1404
|
-
}
|
|
1405
|
-
});
|
|
1406
|
-
});
|
|
1407
|
-
const St = (s, t, e, ...n) => {
|
|
1408
|
-
const i = `[${s.get("$environment").name || "webprovisions"}] ${e}`;
|
|
1409
|
-
switch (t) {
|
|
1410
|
-
case "info":
|
|
1411
|
-
console.info(i, ...n);
|
|
1412
|
-
break;
|
|
1413
|
-
case "warning":
|
|
1414
|
-
console.warn(i, ...n);
|
|
1415
|
-
break;
|
|
1416
|
-
case "error":
|
|
1417
|
-
console.error(i, ...n);
|
|
1418
|
-
break;
|
|
1419
|
-
}
|
|
1420
|
-
}, Ks = (s) => {
|
|
1421
|
-
const t = s.container || s;
|
|
1422
|
-
return {
|
|
1423
|
-
info: (e, ...n) => St(t, "info", e, ...n),
|
|
1424
|
-
warn: (e, ...n) => St(t, "warning", e, ...n),
|
|
1425
|
-
error: (e, ...n) => St(t, "error", e, ...n)
|
|
1426
|
-
};
|
|
1427
|
-
};
|
|
1428
|
-
var X = /* @__PURE__ */ ((s) => (s.Implementation = "implementation", s.Widget = "widget", s))(X || {}), k = /* @__PURE__ */ ((s) => (s.Pre = "pre", s.Post = "post", s))(k || {});
|
|
1429
|
-
const Gs = (s, t, e, n) => {
|
|
1430
|
-
try {
|
|
1431
|
-
const i = new t(e, n);
|
|
1432
|
-
return {
|
|
1433
|
-
name: s,
|
|
1434
|
-
invoke: (r, o) => {
|
|
1435
|
-
let a;
|
|
1436
|
-
return i[r] && (a = i[r].call(i, o)), Promise.resolve(a);
|
|
1437
|
-
},
|
|
1438
|
-
getInstance: () => i
|
|
1439
|
-
};
|
|
1440
|
-
} catch (i) {
|
|
1441
|
-
if (i.message && i.message.indexOf("is not a constructor") >= 0)
|
|
1442
|
-
return {
|
|
1443
|
-
name: s,
|
|
1444
|
-
invoke: (r) => {
|
|
1445
|
-
let o;
|
|
1446
|
-
return r === "initialize" && (o = t(e, n)), Promise.resolve(o);
|
|
1447
|
-
},
|
|
1448
|
-
getInstance: () => t
|
|
1449
|
-
};
|
|
1450
|
-
throw i;
|
|
1451
|
-
}
|
|
1452
|
-
};
|
|
1453
|
-
function ye(s, t) {
|
|
1454
|
-
return typeof s == "undefined" ? t : s;
|
|
1455
|
-
}
|
|
1456
|
-
class Zs {
|
|
1457
|
-
constructor(t = {}) {
|
|
1458
|
-
this.part = t;
|
|
1459
|
-
}
|
|
1460
|
-
createCommand(t, e, n) {
|
|
1461
|
-
let i;
|
|
1462
|
-
typeof e == "function" ? i = {
|
|
1463
|
-
scope: X.Widget,
|
|
1464
|
-
stage: k.Post,
|
|
1465
|
-
defaultArgs: void 0,
|
|
1466
|
-
handlerResolver: e
|
|
1467
|
-
} : i = {
|
|
1468
|
-
scope: ye(e.scope, X.Widget),
|
|
1469
|
-
stage: ye(e.stage, k.Post),
|
|
1470
|
-
defaultArgs: e.defaultArgs,
|
|
1471
|
-
handlerResolver: n
|
|
1472
|
-
};
|
|
1473
|
-
let r = this.part;
|
|
1474
|
-
const o = t.split(".");
|
|
1475
|
-
return o.forEach((a, c) => {
|
|
1476
|
-
c === o.length - 1 ? r[a] || (r[a] = () => i) : r = this.part[a] = this.part[a] || {};
|
|
1477
|
-
}), this;
|
|
1478
|
-
}
|
|
1479
|
-
get() {
|
|
1480
|
-
return this.part;
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
const Me = (s) => {
|
|
1484
|
-
const t = new Zs({});
|
|
1485
|
-
return s(t), t.get();
|
|
1486
|
-
};
|
|
1487
|
-
Me((s) => {
|
|
1488
|
-
s.createCommand(
|
|
1489
|
-
"types.register",
|
|
1490
|
-
{ scope: X.Implementation, stage: k.Pre },
|
|
1491
|
-
(t) => (e, n) => {
|
|
1492
|
-
t.container.get("$types")[e] = n;
|
|
1493
|
-
}
|
|
1494
|
-
).createCommand(
|
|
1495
|
-
"type",
|
|
1496
|
-
{ stage: k.Pre },
|
|
1497
|
-
(t) => (e) => {
|
|
1498
|
-
t.container.register("$type", e);
|
|
1499
|
-
}
|
|
1500
|
-
).createCommand(
|
|
1501
|
-
"settings",
|
|
1502
|
-
{ stage: k.Pre, defaultArgs: [null] },
|
|
1503
|
-
(t) => (e) => {
|
|
1504
|
-
t.events.dispatch(
|
|
1505
|
-
"settings:change",
|
|
1506
|
-
e,
|
|
1507
|
-
{ bubbles: !0 }
|
|
1508
|
-
), t.container.register("$settings", e);
|
|
1509
|
-
}
|
|
1510
|
-
).createCommand(
|
|
1511
|
-
"plugin",
|
|
1512
|
-
{ stage: k.Pre },
|
|
1513
|
-
(t) => (e, n, i) => {
|
|
1514
|
-
const { container: r } = t;
|
|
1515
|
-
let o = null, a = e, c = n;
|
|
1516
|
-
typeof e == "string" && (o = e, a = n, c = i);
|
|
1517
|
-
const l = (h) => {
|
|
1518
|
-
const { transformPluginSettings: d } = t.container.get("$environmentOptions"), u = d ? d(
|
|
1519
|
-
c || {},
|
|
1520
|
-
o,
|
|
1521
|
-
t.container,
|
|
1522
|
-
a
|
|
1523
|
-
) : n;
|
|
1524
|
-
try {
|
|
1525
|
-
const p = Gs(
|
|
1526
|
-
o,
|
|
1527
|
-
a,
|
|
1528
|
-
r,
|
|
1529
|
-
u
|
|
1530
|
-
);
|
|
1531
|
-
r.get("$plugins").push(p), h && p.invoke("initialize", null);
|
|
1532
|
-
} catch (p) {
|
|
1533
|
-
Ks(t).warn("Error when initializing plugin", p);
|
|
1534
|
-
}
|
|
1535
|
-
};
|
|
1536
|
-
t.container.get("$instance") ? l(!0) : t.events.subscribeOnce("widget:instance-created", () => l(!1));
|
|
1537
|
-
}
|
|
1538
|
-
).createCommand(
|
|
1539
|
-
"container.register",
|
|
1540
|
-
(t) => (e, n) => {
|
|
1541
|
-
t.container.register(e, n);
|
|
1542
|
-
}
|
|
1543
|
-
).createCommand(
|
|
1544
|
-
"container.registerAsync",
|
|
1545
|
-
(t) => (e, n) => {
|
|
1546
|
-
t.container.registerAsync(e, n);
|
|
1547
|
-
}
|
|
1548
|
-
).createCommand(
|
|
1549
|
-
"container.registerFactory",
|
|
1550
|
-
(t) => (e, n) => {
|
|
1551
|
-
t.container.registerFactory(e, n);
|
|
1552
|
-
}
|
|
1553
|
-
).createCommand(
|
|
1554
|
-
"container.touch",
|
|
1555
|
-
(t) => (e, n) => {
|
|
1556
|
-
t.container.touch(e, n);
|
|
1557
|
-
}
|
|
1558
|
-
).createCommand(
|
|
1559
|
-
"csp",
|
|
1560
|
-
{},
|
|
1561
|
-
(t) => (e) => {
|
|
1562
|
-
t.container.register("csp", e);
|
|
1563
|
-
}
|
|
1564
|
-
);
|
|
1565
|
-
});
|
|
1566
|
-
Me((s) => {
|
|
1567
|
-
s.createCommand(
|
|
1568
|
-
"ready",
|
|
1569
|
-
{ scope: X.Implementation, stage: k.Pre },
|
|
1570
|
-
(t) => (e) => {
|
|
1571
|
-
const { container: n } = t, i = n.owner;
|
|
1572
|
-
n.get("bootstrapping").ready ? e(i) : i.events.subscribeOnce("bootstrap:ready", () => {
|
|
1573
|
-
e(i);
|
|
1574
|
-
});
|
|
1575
|
-
}
|
|
1576
|
-
);
|
|
1577
|
-
});
|
|
1578
|
-
const Nt = (s, t, e, ...n) => {
|
|
1579
|
-
const i = `[${s.get("$environment").name || "webprovisions"}] ${e}`;
|
|
1580
|
-
switch (t) {
|
|
1581
|
-
case "info":
|
|
1582
|
-
console.info(i, ...n);
|
|
1583
|
-
break;
|
|
1584
|
-
case "warning":
|
|
1585
|
-
console.warn(i, ...n);
|
|
1586
|
-
break;
|
|
1587
|
-
case "error":
|
|
1588
|
-
console.error(i, ...n);
|
|
1589
|
-
break;
|
|
1590
|
-
}
|
|
1591
|
-
}, Xs = (s) => {
|
|
1592
|
-
const t = s.container || s;
|
|
1593
|
-
return {
|
|
1594
|
-
info: (e, ...n) => Nt(t, "info", e, ...n),
|
|
1595
|
-
warn: (e, ...n) => Nt(t, "warning", e, ...n),
|
|
1596
|
-
error: (e, ...n) => Nt(t, "error", e, ...n)
|
|
1597
|
-
};
|
|
1598
|
-
};
|
|
1599
|
-
var ht = /* @__PURE__ */ ((s) => (s.Implementation = "implementation", s.Widget = "widget", s))(ht || {}), I = /* @__PURE__ */ ((s) => (s.Pre = "pre", s.Post = "post", s))(I || {});
|
|
1600
|
-
const Ys = (s, t, e, n) => {
|
|
1601
|
-
try {
|
|
1602
|
-
const i = new t(e, n);
|
|
1603
|
-
return {
|
|
1604
|
-
name: s,
|
|
1605
|
-
invoke: (r, o) => {
|
|
1606
|
-
let a;
|
|
1607
|
-
return i[r] && (a = i[r].call(i, o)), Promise.resolve(a);
|
|
1608
|
-
},
|
|
1609
|
-
getInstance: () => i
|
|
1610
|
-
};
|
|
1611
|
-
} catch (i) {
|
|
1612
|
-
if (i.message && i.message.indexOf("is not a constructor") >= 0)
|
|
1613
|
-
return {
|
|
1614
|
-
name: s,
|
|
1615
|
-
invoke: (r) => {
|
|
1616
|
-
let o;
|
|
1617
|
-
return r === "initialize" && (o = t(e, n)), Promise.resolve(o);
|
|
1618
|
-
},
|
|
1619
|
-
getInstance: () => t
|
|
1620
|
-
};
|
|
1621
|
-
throw i;
|
|
1622
|
-
}
|
|
1623
|
-
};
|
|
1624
|
-
function be(s, t) {
|
|
1625
|
-
return typeof s == "undefined" ? t : s;
|
|
1626
|
-
}
|
|
1627
|
-
class Qs {
|
|
1628
|
-
constructor(t = {}) {
|
|
1629
|
-
this.part = t;
|
|
1630
|
-
}
|
|
1631
|
-
createCommand(t, e, n) {
|
|
1632
|
-
let i;
|
|
1633
|
-
typeof e == "function" ? i = {
|
|
1634
|
-
scope: ht.Widget,
|
|
1635
|
-
stage: I.Post,
|
|
1636
|
-
defaultArgs: void 0,
|
|
1637
|
-
handlerResolver: e
|
|
1638
|
-
} : i = {
|
|
1639
|
-
scope: be(e.scope, ht.Widget),
|
|
1640
|
-
stage: be(e.stage, I.Post),
|
|
1641
|
-
defaultArgs: e.defaultArgs,
|
|
1642
|
-
handlerResolver: n
|
|
1643
|
-
};
|
|
1644
|
-
let r = this.part;
|
|
1645
|
-
const o = t.split(".");
|
|
1646
|
-
return o.forEach((a, c) => {
|
|
1647
|
-
c === o.length - 1 ? r[a] || (r[a] = () => i) : r = this.part[a] = this.part[a] || {};
|
|
1648
|
-
}), this;
|
|
1649
|
-
}
|
|
1650
|
-
get() {
|
|
1651
|
-
return this.part;
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
const tn = (s) => {
|
|
1655
|
-
const t = new Qs({});
|
|
1656
|
-
return s(t), t.get();
|
|
1657
|
-
};
|
|
1658
|
-
tn((s) => {
|
|
1659
|
-
s.createCommand(
|
|
1660
|
-
"types.register",
|
|
1661
|
-
{ scope: ht.Implementation, stage: I.Pre },
|
|
1662
|
-
(t) => (e, n) => {
|
|
1663
|
-
t.container.get("$types")[e] = n;
|
|
1664
|
-
}
|
|
1665
|
-
).createCommand(
|
|
1666
|
-
"type",
|
|
1667
|
-
{ stage: I.Pre },
|
|
1668
|
-
(t) => (e) => {
|
|
1669
|
-
t.container.register("$type", e);
|
|
1670
|
-
}
|
|
1671
|
-
).createCommand(
|
|
1672
|
-
"settings",
|
|
1673
|
-
{ stage: I.Pre, defaultArgs: [null] },
|
|
1674
|
-
(t) => (e) => {
|
|
1675
|
-
t.events.dispatch(
|
|
1676
|
-
"settings:change",
|
|
1677
|
-
e,
|
|
1678
|
-
{ bubbles: !0 }
|
|
1679
|
-
), t.container.register("$settings", e);
|
|
1680
|
-
}
|
|
1681
|
-
).createCommand(
|
|
1682
|
-
"plugin",
|
|
1683
|
-
{ stage: I.Pre },
|
|
1684
|
-
(t) => (e, n, i) => {
|
|
1685
|
-
const { container: r } = t;
|
|
1686
|
-
let o = null, a = e, c = n;
|
|
1687
|
-
typeof e == "string" && (o = e, a = n, c = i);
|
|
1688
|
-
const l = (h) => {
|
|
1689
|
-
const { transformPluginSettings: d } = t.container.get("$environmentOptions"), u = d ? d(
|
|
1690
|
-
c || {},
|
|
1691
|
-
o,
|
|
1692
|
-
t.container,
|
|
1693
|
-
a
|
|
1694
|
-
) : n;
|
|
1695
|
-
try {
|
|
1696
|
-
const p = Ys(
|
|
1697
|
-
o,
|
|
1698
|
-
a,
|
|
1699
|
-
r,
|
|
1700
|
-
u
|
|
1701
|
-
);
|
|
1702
|
-
r.get("$plugins").push(p), h && p.invoke("initialize", null);
|
|
1703
|
-
} catch (p) {
|
|
1704
|
-
Xs(t).warn("Error when initializing plugin", p);
|
|
1705
|
-
}
|
|
1706
|
-
};
|
|
1707
|
-
t.container.get("$instance") ? l(!0) : t.events.subscribeOnce("widget:instance-created", () => l(!1));
|
|
1708
|
-
}
|
|
1709
|
-
).createCommand(
|
|
1710
|
-
"container.register",
|
|
1711
|
-
(t) => (e, n) => {
|
|
1712
|
-
t.container.register(e, n);
|
|
1713
|
-
}
|
|
1714
|
-
).createCommand(
|
|
1715
|
-
"container.registerAsync",
|
|
1716
|
-
(t) => (e, n) => {
|
|
1717
|
-
t.container.registerAsync(e, n);
|
|
1718
|
-
}
|
|
1719
|
-
).createCommand(
|
|
1720
|
-
"container.registerFactory",
|
|
1721
|
-
(t) => (e, n) => {
|
|
1722
|
-
t.container.registerFactory(e, n);
|
|
1723
|
-
}
|
|
1724
|
-
).createCommand(
|
|
1725
|
-
"container.touch",
|
|
1726
|
-
(t) => (e, n) => {
|
|
1727
|
-
t.container.touch(e, n);
|
|
1728
|
-
}
|
|
1729
|
-
).createCommand(
|
|
1730
|
-
"csp",
|
|
1731
|
-
{},
|
|
1732
|
-
(t) => (e) => {
|
|
1733
|
-
t.container.register("csp", e);
|
|
1734
|
-
}
|
|
1735
|
-
);
|
|
1736
|
-
});
|
|
1737
|
-
/**
|
|
1738
|
-
* @license
|
|
1739
|
-
* Copyright 2019 Google LLC
|
|
1740
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1741
|
-
*/
|
|
1742
|
-
const rt = window, te = rt.ShadowRoot && (rt.ShadyCSS === void 0 || rt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ee = Symbol(), $e = /* @__PURE__ */ new WeakMap();
|
|
1743
|
-
let We = class {
|
|
1744
|
-
constructor(s, t, e) {
|
|
1745
|
-
if (this._$cssResult$ = !0, e !== ee)
|
|
1746
|
-
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
1747
|
-
this.cssText = s, this.t = t;
|
|
1748
|
-
}
|
|
1749
|
-
get styleSheet() {
|
|
1750
|
-
let s = this.o;
|
|
1751
|
-
const t = this.t;
|
|
1752
|
-
if (te && s === void 0) {
|
|
1753
|
-
const e = t !== void 0 && t.length === 1;
|
|
1754
|
-
e && (s = $e.get(t)), s === void 0 && ((this.o = s = new CSSStyleSheet()).replaceSync(this.cssText), e && $e.set(t, s));
|
|
1755
|
-
}
|
|
1756
|
-
return s;
|
|
1757
|
-
}
|
|
1758
|
-
toString() {
|
|
1759
|
-
return this.cssText;
|
|
1760
|
-
}
|
|
1761
|
-
};
|
|
1762
|
-
const en = (s) => new We(typeof s == "string" ? s : s + "", void 0, ee), Ve = (s, ...t) => {
|
|
1763
|
-
const e = s.length === 1 ? s[0] : t.reduce((n, i, r) => n + ((o) => {
|
|
1764
|
-
if (o._$cssResult$ === !0)
|
|
1765
|
-
return o.cssText;
|
|
1766
|
-
if (typeof o == "number")
|
|
1767
|
-
return o;
|
|
1768
|
-
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.");
|
|
1769
|
-
})(i) + s[r + 1], s[0]);
|
|
1770
|
-
return new We(e, s, ee);
|
|
1771
|
-
}, sn = (s, t) => {
|
|
1772
|
-
te ? s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
|
|
1773
|
-
const n = document.createElement("style"), i = rt.litNonce;
|
|
1774
|
-
i !== void 0 && n.setAttribute("nonce", i), n.textContent = e.cssText, s.appendChild(n);
|
|
1775
|
-
});
|
|
1776
|
-
}, we = te ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
|
1777
|
-
let e = "";
|
|
1778
|
-
for (const n of t.cssRules)
|
|
1779
|
-
e += n.cssText;
|
|
1780
|
-
return en(e);
|
|
1781
|
-
})(s) : s;
|
|
1782
|
-
/**
|
|
1783
|
-
* @license
|
|
1784
|
-
* Copyright 2017 Google LLC
|
|
1785
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1786
|
-
*/
|
|
1787
|
-
var Tt;
|
|
1788
|
-
const lt = window, _e = lt.trustedTypes, nn = _e ? _e.emptyScript : "", xe = lt.reactiveElementPolyfillSupport, Mt = { toAttribute(s, t) {
|
|
1789
|
-
switch (t) {
|
|
1790
|
-
case Boolean:
|
|
1791
|
-
s = s ? nn : null;
|
|
1792
|
-
break;
|
|
1793
|
-
case Object:
|
|
1794
|
-
case Array:
|
|
1795
|
-
s = s == null ? s : JSON.stringify(s);
|
|
1796
|
-
}
|
|
1797
|
-
return s;
|
|
1798
|
-
}, fromAttribute(s, t) {
|
|
1799
|
-
let e = s;
|
|
1800
|
-
switch (t) {
|
|
1801
|
-
case Boolean:
|
|
1802
|
-
e = s !== null;
|
|
1803
|
-
break;
|
|
1804
|
-
case Number:
|
|
1805
|
-
e = s === null ? null : Number(s);
|
|
1806
|
-
break;
|
|
1807
|
-
case Object:
|
|
1808
|
-
case Array:
|
|
1809
|
-
try {
|
|
1810
|
-
e = JSON.parse(s);
|
|
1811
|
-
} catch (n) {
|
|
1812
|
-
e = null;
|
|
1813
|
-
}
|
|
1814
|
-
}
|
|
1815
|
-
return e;
|
|
1816
|
-
} }, Be = (s, t) => t !== s && (t == t || s == s), jt = { attribute: !0, type: String, converter: Mt, reflect: !1, hasChanged: Be }, Wt = "finalized";
|
|
1817
|
-
let z = class extends HTMLElement {
|
|
1818
|
-
constructor() {
|
|
1819
|
-
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
|
1820
|
-
}
|
|
1821
|
-
static addInitializer(s) {
|
|
1822
|
-
var t;
|
|
1823
|
-
this.finalize(), ((t = this.h) !== null && t !== void 0 ? t : this.h = []).push(s);
|
|
1824
|
-
}
|
|
1825
|
-
static get observedAttributes() {
|
|
1826
|
-
this.finalize();
|
|
1827
|
-
const s = [];
|
|
1828
|
-
return this.elementProperties.forEach((t, e) => {
|
|
1829
|
-
const n = this._$Ep(e, t);
|
|
1830
|
-
n !== void 0 && (this._$Ev.set(n, e), s.push(n));
|
|
1831
|
-
}), s;
|
|
1832
|
-
}
|
|
1833
|
-
static createProperty(s, t = jt) {
|
|
1834
|
-
if (t.state && (t.attribute = !1), this.finalize(), this.elementProperties.set(s, t), !t.noAccessor && !this.prototype.hasOwnProperty(s)) {
|
|
1835
|
-
const e = typeof s == "symbol" ? Symbol() : "__" + s, n = this.getPropertyDescriptor(s, e, t);
|
|
1836
|
-
n !== void 0 && Object.defineProperty(this.prototype, s, n);
|
|
1837
|
-
}
|
|
1838
|
-
}
|
|
1839
|
-
static getPropertyDescriptor(s, t, e) {
|
|
1840
|
-
return { get() {
|
|
1841
|
-
return this[t];
|
|
1842
|
-
}, set(n) {
|
|
1843
|
-
const i = this[s];
|
|
1844
|
-
this[t] = n, this.requestUpdate(s, i, e);
|
|
1845
|
-
}, configurable: !0, enumerable: !0 };
|
|
1846
|
-
}
|
|
1847
|
-
static getPropertyOptions(s) {
|
|
1848
|
-
return this.elementProperties.get(s) || jt;
|
|
1849
|
-
}
|
|
1850
|
-
static finalize() {
|
|
1851
|
-
if (this.hasOwnProperty(Wt))
|
|
1852
|
-
return !1;
|
|
1853
|
-
this[Wt] = !0;
|
|
1854
|
-
const s = Object.getPrototypeOf(this);
|
|
1855
|
-
if (s.finalize(), s.h !== void 0 && (this.h = [...s.h]), this.elementProperties = new Map(s.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
1856
|
-
const t = this.properties, e = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
1857
|
-
for (const n of e)
|
|
1858
|
-
this.createProperty(n, t[n]);
|
|
1859
|
-
}
|
|
1860
|
-
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
1861
|
-
}
|
|
1862
|
-
static finalizeStyles(s) {
|
|
1863
|
-
const t = [];
|
|
1864
|
-
if (Array.isArray(s)) {
|
|
1865
|
-
const e = new Set(s.flat(1 / 0).reverse());
|
|
1866
|
-
for (const n of e)
|
|
1867
|
-
t.unshift(we(n));
|
|
1868
|
-
} else
|
|
1869
|
-
s !== void 0 && t.push(we(s));
|
|
1870
|
-
return t;
|
|
1871
|
-
}
|
|
1872
|
-
static _$Ep(s, t) {
|
|
1873
|
-
const e = t.attribute;
|
|
1874
|
-
return e === !1 ? void 0 : typeof e == "string" ? e : typeof s == "string" ? s.toLowerCase() : void 0;
|
|
1875
|
-
}
|
|
1876
|
-
_$Eu() {
|
|
1877
|
-
var s;
|
|
1878
|
-
this._$E_ = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (s = this.constructor.h) === null || s === void 0 || s.forEach((t) => t(this));
|
|
1879
|
-
}
|
|
1880
|
-
addController(s) {
|
|
1881
|
-
var t, e;
|
|
1882
|
-
((t = this._$ES) !== null && t !== void 0 ? t : this._$ES = []).push(s), this.renderRoot !== void 0 && this.isConnected && ((e = s.hostConnected) === null || e === void 0 || e.call(s));
|
|
1883
|
-
}
|
|
1884
|
-
removeController(s) {
|
|
1885
|
-
var t;
|
|
1886
|
-
(t = this._$ES) === null || t === void 0 || t.splice(this._$ES.indexOf(s) >>> 0, 1);
|
|
1887
|
-
}
|
|
1888
|
-
_$Eg() {
|
|
1889
|
-
this.constructor.elementProperties.forEach((s, t) => {
|
|
1890
|
-
this.hasOwnProperty(t) && (this._$Ei.set(t, this[t]), delete this[t]);
|
|
1891
|
-
});
|
|
1892
|
-
}
|
|
1893
|
-
createRenderRoot() {
|
|
1894
|
-
var s;
|
|
1895
|
-
const t = (s = this.shadowRoot) !== null && s !== void 0 ? s : this.attachShadow(this.constructor.shadowRootOptions);
|
|
1896
|
-
return sn(t, this.constructor.elementStyles), t;
|
|
1897
|
-
}
|
|
1898
|
-
connectedCallback() {
|
|
1899
|
-
var s;
|
|
1900
|
-
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (s = this._$ES) === null || s === void 0 || s.forEach((t) => {
|
|
1901
|
-
var e;
|
|
1902
|
-
return (e = t.hostConnected) === null || e === void 0 ? void 0 : e.call(t);
|
|
1903
|
-
});
|
|
1904
|
-
}
|
|
1905
|
-
enableUpdating(s) {
|
|
1906
|
-
}
|
|
1907
|
-
disconnectedCallback() {
|
|
1908
|
-
var s;
|
|
1909
|
-
(s = this._$ES) === null || s === void 0 || s.forEach((t) => {
|
|
1910
|
-
var e;
|
|
1911
|
-
return (e = t.hostDisconnected) === null || e === void 0 ? void 0 : e.call(t);
|
|
1912
|
-
});
|
|
1913
|
-
}
|
|
1914
|
-
attributeChangedCallback(s, t, e) {
|
|
1915
|
-
this._$AK(s, e);
|
|
1916
|
-
}
|
|
1917
|
-
_$EO(s, t, e = jt) {
|
|
1918
|
-
var n;
|
|
1919
|
-
const i = this.constructor._$Ep(s, e);
|
|
1920
|
-
if (i !== void 0 && e.reflect === !0) {
|
|
1921
|
-
const r = (((n = e.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? e.converter : Mt).toAttribute(t, e.type);
|
|
1922
|
-
this._$El = s, r == null ? this.removeAttribute(i) : this.setAttribute(i, r), this._$El = null;
|
|
1923
|
-
}
|
|
1924
|
-
}
|
|
1925
|
-
_$AK(s, t) {
|
|
1926
|
-
var e;
|
|
1927
|
-
const n = this.constructor, i = n._$Ev.get(s);
|
|
1928
|
-
if (i !== void 0 && this._$El !== i) {
|
|
1929
|
-
const r = n.getPropertyOptions(i), o = typeof r.converter == "function" ? { fromAttribute: r.converter } : ((e = r.converter) === null || e === void 0 ? void 0 : e.fromAttribute) !== void 0 ? r.converter : Mt;
|
|
1930
|
-
this._$El = i, this[i] = o.fromAttribute(t, r.type), this._$El = null;
|
|
1931
|
-
}
|
|
1932
|
-
}
|
|
1933
|
-
requestUpdate(s, t, e) {
|
|
1934
|
-
let n = !0;
|
|
1935
|
-
s !== void 0 && (((e = e || this.constructor.getPropertyOptions(s)).hasChanged || Be)(this[s], t) ? (this._$AL.has(s) || this._$AL.set(s, t), e.reflect === !0 && this._$El !== s && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(s, e))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
|
|
1936
|
-
}
|
|
1937
|
-
_$Ej() {
|
|
1938
|
-
return M(this, null, function* () {
|
|
1939
|
-
this.isUpdatePending = !0;
|
|
1940
|
-
try {
|
|
1941
|
-
yield this._$E_;
|
|
1942
|
-
} catch (t) {
|
|
1943
|
-
Promise.reject(t);
|
|
1944
|
-
}
|
|
1945
|
-
const s = this.scheduleUpdate();
|
|
1946
|
-
return s != null && (yield s), !this.isUpdatePending;
|
|
1947
|
-
});
|
|
1948
|
-
}
|
|
1949
|
-
scheduleUpdate() {
|
|
1950
|
-
return this.performUpdate();
|
|
1951
|
-
}
|
|
1952
|
-
performUpdate() {
|
|
1953
|
-
var s;
|
|
1954
|
-
if (!this.isUpdatePending)
|
|
1955
|
-
return;
|
|
1956
|
-
this.hasUpdated, this._$Ei && (this._$Ei.forEach((n, i) => this[i] = n), this._$Ei = void 0);
|
|
1957
|
-
let t = !1;
|
|
1958
|
-
const e = this._$AL;
|
|
1959
|
-
try {
|
|
1960
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$ES) === null || s === void 0 || s.forEach((n) => {
|
|
1961
|
-
var i;
|
|
1962
|
-
return (i = n.hostUpdate) === null || i === void 0 ? void 0 : i.call(n);
|
|
1963
|
-
}), this.update(e)) : this._$Ek();
|
|
1964
|
-
} catch (n) {
|
|
1965
|
-
throw t = !1, this._$Ek(), n;
|
|
1966
|
-
}
|
|
1967
|
-
t && this._$AE(e);
|
|
1968
|
-
}
|
|
1969
|
-
willUpdate(s) {
|
|
1970
|
-
}
|
|
1971
|
-
_$AE(s) {
|
|
1972
|
-
var t;
|
|
1973
|
-
(t = this._$ES) === null || t === void 0 || t.forEach((e) => {
|
|
1974
|
-
var n;
|
|
1975
|
-
return (n = e.hostUpdated) === null || n === void 0 ? void 0 : n.call(e);
|
|
1976
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(s)), this.updated(s);
|
|
1977
|
-
}
|
|
1978
|
-
_$Ek() {
|
|
1979
|
-
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
1980
|
-
}
|
|
1981
|
-
get updateComplete() {
|
|
1982
|
-
return this.getUpdateComplete();
|
|
1983
|
-
}
|
|
1984
|
-
getUpdateComplete() {
|
|
1985
|
-
return this._$E_;
|
|
1986
|
-
}
|
|
1987
|
-
shouldUpdate(s) {
|
|
1988
|
-
return !0;
|
|
1989
|
-
}
|
|
1990
|
-
update(s) {
|
|
1991
|
-
this._$EC !== void 0 && (this._$EC.forEach((t, e) => this._$EO(e, this[e], t)), this._$EC = void 0), this._$Ek();
|
|
1992
|
-
}
|
|
1993
|
-
updated(s) {
|
|
1994
|
-
}
|
|
1995
|
-
firstUpdated(s) {
|
|
1996
|
-
}
|
|
1997
|
-
};
|
|
1998
|
-
z[Wt] = !0, z.elementProperties = /* @__PURE__ */ new Map(), z.elementStyles = [], z.shadowRootOptions = { mode: "open" }, xe == null || xe({ ReactiveElement: z }), ((Tt = lt.reactiveElementVersions) !== null && Tt !== void 0 ? Tt : lt.reactiveElementVersions = []).push("1.6.3");
|
|
1999
|
-
/**
|
|
2000
|
-
* @license
|
|
2001
|
-
* Copyright 2017 Google LLC
|
|
2002
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2003
|
-
*/
|
|
2004
|
-
var It;
|
|
2005
|
-
const dt = window, V = dt.trustedTypes, Ce = V ? V.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Vt = "$lit$", P = `lit$${(Math.random() + "").slice(9)}$`, Je = "?" + P, rn = `<${Je}>`, U = document, Y = () => U.createComment(""), Q = (s) => s === null || typeof s != "object" && typeof s != "function", Fe = Array.isArray, on = (s) => Fe(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", Rt = `[
|
|
2006
|
-
\f\r]`, J = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ae = /-->/g, Pe = />/g, S = RegExp(`>|${Rt}(?:([^\\s"'>=/]+)(${Rt}*=${Rt}*(?:[^
|
|
2007
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Ee = /'/g, Oe = /"/g, qe = /^(?:script|style|textarea|title)$/i, an = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), it = an(1), L = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), ke = /* @__PURE__ */ new WeakMap(), R = U.createTreeWalker(U, 129, null, !1);
|
|
2008
|
-
function Ke(s, t) {
|
|
2009
|
-
if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
|
|
2010
|
-
throw Error("invalid template strings array");
|
|
2011
|
-
return Ce !== void 0 ? Ce.createHTML(t) : t;
|
|
2012
|
-
}
|
|
2013
|
-
const cn = (s, t) => {
|
|
2014
|
-
const e = s.length - 1, n = [];
|
|
2015
|
-
let i, r = t === 2 ? "<svg>" : "", o = J;
|
|
2016
|
-
for (let a = 0; a < e; a++) {
|
|
2017
|
-
const c = s[a];
|
|
2018
|
-
let l, h, d = -1, u = 0;
|
|
2019
|
-
for (; u < c.length && (o.lastIndex = u, h = o.exec(c), h !== null); )
|
|
2020
|
-
u = o.lastIndex, o === J ? h[1] === "!--" ? o = Ae : h[1] !== void 0 ? o = Pe : h[2] !== void 0 ? (qe.test(h[2]) && (i = RegExp("</" + h[2], "g")), o = S) : h[3] !== void 0 && (o = S) : o === S ? h[0] === ">" ? (o = i != null ? i : 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] === '"' ? Oe : Ee) : o === Oe || o === Ee ? o = S : o === Ae || o === Pe ? o = J : (o = S, i = void 0);
|
|
2021
|
-
const p = o === S && s[a + 1].startsWith("/>") ? " " : "";
|
|
2022
|
-
r += o === J ? c + rn : d >= 0 ? (n.push(l), c.slice(0, d) + Vt + c.slice(d) + P + p) : c + P + (d === -2 ? (n.push(void 0), a) : p);
|
|
2023
|
-
}
|
|
2024
|
-
return [Ke(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), n];
|
|
2025
|
-
};
|
|
2026
|
-
class tt {
|
|
2027
|
-
constructor({ strings: t, _$litType$: e }, n) {
|
|
2028
|
-
let i;
|
|
2029
|
-
this.parts = [];
|
|
2030
|
-
let r = 0, o = 0;
|
|
2031
|
-
const a = t.length - 1, c = this.parts, [l, h] = cn(t, e);
|
|
2032
|
-
if (this.el = tt.createElement(l, n), R.currentNode = this.el.content, e === 2) {
|
|
2033
|
-
const d = this.el.content, u = d.firstChild;
|
|
2034
|
-
u.remove(), d.append(...u.childNodes);
|
|
2035
|
-
}
|
|
2036
|
-
for (; (i = R.nextNode()) !== null && c.length < a; ) {
|
|
2037
|
-
if (i.nodeType === 1) {
|
|
2038
|
-
if (i.hasAttributes()) {
|
|
2039
|
-
const d = [];
|
|
2040
|
-
for (const u of i.getAttributeNames())
|
|
2041
|
-
if (u.endsWith(Vt) || u.startsWith(P)) {
|
|
2042
|
-
const p = h[o++];
|
|
2043
|
-
if (d.push(u), p !== void 0) {
|
|
2044
|
-
const $ = i.getAttribute(p.toLowerCase() + Vt).split(P), b = /([.?@])?(.*)/.exec(p);
|
|
2045
|
-
c.push({ type: 1, index: r, name: b[2], strings: $, ctor: b[1] === "." ? ln : b[1] === "?" ? pn : b[1] === "@" ? un : yt });
|
|
2046
|
-
} else
|
|
2047
|
-
c.push({ type: 6, index: r });
|
|
2048
|
-
}
|
|
2049
|
-
for (const u of d)
|
|
2050
|
-
i.removeAttribute(u);
|
|
2051
|
-
}
|
|
2052
|
-
if (qe.test(i.tagName)) {
|
|
2053
|
-
const d = i.textContent.split(P), u = d.length - 1;
|
|
2054
|
-
if (u > 0) {
|
|
2055
|
-
i.textContent = V ? V.emptyScript : "";
|
|
2056
|
-
for (let p = 0; p < u; p++)
|
|
2057
|
-
i.append(d[p], Y()), R.nextNode(), c.push({ type: 2, index: ++r });
|
|
2058
|
-
i.append(d[u], Y());
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
} else if (i.nodeType === 8)
|
|
2062
|
-
if (i.data === Je)
|
|
2063
|
-
c.push({ type: 2, index: r });
|
|
2064
|
-
else {
|
|
2065
|
-
let d = -1;
|
|
2066
|
-
for (; (d = i.data.indexOf(P, d + 1)) !== -1; )
|
|
2067
|
-
c.push({ type: 7, index: r }), d += P.length - 1;
|
|
2068
|
-
}
|
|
2069
|
-
r++;
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
static createElement(t, e) {
|
|
2073
|
-
const n = U.createElement("template");
|
|
2074
|
-
return n.innerHTML = t, n;
|
|
2075
|
-
}
|
|
2076
|
-
}
|
|
2077
|
-
function B(s, t, e = s, n) {
|
|
2078
|
-
var i, r, o, a;
|
|
2079
|
-
if (t === L)
|
|
2080
|
-
return t;
|
|
2081
|
-
let c = n !== void 0 ? (i = e._$Co) === null || i === void 0 ? void 0 : i[n] : e._$Cl;
|
|
2082
|
-
const l = Q(t) ? void 0 : t._$litDirective$;
|
|
2083
|
-
return (c == null ? void 0 : c.constructor) !== l && ((r = c == null ? void 0 : c._$AO) === null || r === void 0 || r.call(c, !1), l === void 0 ? c = void 0 : (c = new l(s), c._$AT(s, e, n)), n !== void 0 ? ((o = (a = e)._$Co) !== null && o !== void 0 ? o : a._$Co = [])[n] = c : e._$Cl = c), c !== void 0 && (t = B(s, c._$AS(s, t.values), c, n)), t;
|
|
2084
|
-
}
|
|
2085
|
-
class hn {
|
|
2086
|
-
constructor(t, e) {
|
|
2087
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
2088
|
-
}
|
|
2089
|
-
get parentNode() {
|
|
2090
|
-
return this._$AM.parentNode;
|
|
2091
|
-
}
|
|
2092
|
-
get _$AU() {
|
|
2093
|
-
return this._$AM._$AU;
|
|
2094
|
-
}
|
|
2095
|
-
u(t) {
|
|
2096
|
-
var e;
|
|
2097
|
-
const { el: { content: n }, parts: i } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : U).importNode(n, !0);
|
|
2098
|
-
R.currentNode = r;
|
|
2099
|
-
let o = R.nextNode(), a = 0, c = 0, l = i[0];
|
|
2100
|
-
for (; l !== void 0; ) {
|
|
2101
|
-
if (a === l.index) {
|
|
2102
|
-
let h;
|
|
2103
|
-
l.type === 2 ? h = new st(o, o.nextSibling, this, t) : l.type === 1 ? h = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (h = new gn(o, this, t)), this._$AV.push(h), l = i[++c];
|
|
2104
|
-
}
|
|
2105
|
-
a !== (l == null ? void 0 : l.index) && (o = R.nextNode(), a++);
|
|
2106
|
-
}
|
|
2107
|
-
return R.currentNode = U, r;
|
|
2108
|
-
}
|
|
2109
|
-
v(t) {
|
|
2110
|
-
let e = 0;
|
|
2111
|
-
for (const n of this._$AV)
|
|
2112
|
-
n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, e), e += n.strings.length - 2) : n._$AI(t[e])), e++;
|
|
2113
|
-
}
|
|
2114
|
-
}
|
|
2115
|
-
class st {
|
|
2116
|
-
constructor(t, e, n, i) {
|
|
2117
|
-
var r;
|
|
2118
|
-
this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = n, this.options = i, this._$Cp = (r = i == null ? void 0 : i.isConnected) === null || r === void 0 || r;
|
|
2119
|
-
}
|
|
2120
|
-
get _$AU() {
|
|
2121
|
-
var t, e;
|
|
2122
|
-
return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cp;
|
|
2123
|
-
}
|
|
2124
|
-
get parentNode() {
|
|
2125
|
-
let t = this._$AA.parentNode;
|
|
2126
|
-
const e = this._$AM;
|
|
2127
|
-
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
|
2128
|
-
}
|
|
2129
|
-
get startNode() {
|
|
2130
|
-
return this._$AA;
|
|
2131
|
-
}
|
|
2132
|
-
get endNode() {
|
|
2133
|
-
return this._$AB;
|
|
2134
|
-
}
|
|
2135
|
-
_$AI(t, e = this) {
|
|
2136
|
-
t = B(this, t, e), Q(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== L && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : on(t) ? this.T(t) : this._(t);
|
|
2137
|
-
}
|
|
2138
|
-
k(t) {
|
|
2139
|
-
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
2140
|
-
}
|
|
2141
|
-
$(t) {
|
|
2142
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
2143
|
-
}
|
|
2144
|
-
_(t) {
|
|
2145
|
-
this._$AH !== g && Q(this._$AH) ? this._$AA.nextSibling.data = t : this.$(U.createTextNode(t)), this._$AH = t;
|
|
2146
|
-
}
|
|
2147
|
-
g(t) {
|
|
2148
|
-
var e;
|
|
2149
|
-
const { values: n, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = tt.createElement(Ke(i.h, i.h[0]), this.options)), i);
|
|
2150
|
-
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r)
|
|
2151
|
-
this._$AH.v(n);
|
|
2152
|
-
else {
|
|
2153
|
-
const o = new hn(r, this), a = o.u(this.options);
|
|
2154
|
-
o.v(n), this.$(a), this._$AH = o;
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
_$AC(t) {
|
|
2158
|
-
let e = ke.get(t.strings);
|
|
2159
|
-
return e === void 0 && ke.set(t.strings, e = new tt(t)), e;
|
|
2160
|
-
}
|
|
2161
|
-
T(t) {
|
|
2162
|
-
Fe(this._$AH) || (this._$AH = [], this._$AR());
|
|
2163
|
-
const e = this._$AH;
|
|
2164
|
-
let n, i = 0;
|
|
2165
|
-
for (const r of t)
|
|
2166
|
-
i === e.length ? e.push(n = new st(this.k(Y()), this.k(Y()), this, this.options)) : n = e[i], n._$AI(r), i++;
|
|
2167
|
-
i < e.length && (this._$AR(n && n._$AB.nextSibling, i), e.length = i);
|
|
2168
|
-
}
|
|
2169
|
-
_$AR(t = this._$AA.nextSibling, e) {
|
|
2170
|
-
var n;
|
|
2171
|
-
for ((n = this._$AP) === null || n === void 0 || n.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
2172
|
-
const i = t.nextSibling;
|
|
2173
|
-
t.remove(), t = i;
|
|
2174
|
-
}
|
|
2175
|
-
}
|
|
2176
|
-
setConnected(t) {
|
|
2177
|
-
var e;
|
|
2178
|
-
this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
|
2179
|
-
}
|
|
2180
|
-
}
|
|
2181
|
-
class yt {
|
|
2182
|
-
constructor(t, e, n, i, r) {
|
|
2183
|
-
this.type = 1, this._$AH = g, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = r, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = g;
|
|
2184
|
-
}
|
|
2185
|
-
get tagName() {
|
|
2186
|
-
return this.element.tagName;
|
|
2187
|
-
}
|
|
2188
|
-
get _$AU() {
|
|
2189
|
-
return this._$AM._$AU;
|
|
2190
|
-
}
|
|
2191
|
-
_$AI(t, e = this, n, i) {
|
|
2192
|
-
const r = this.strings;
|
|
2193
|
-
let o = !1;
|
|
2194
|
-
if (r === void 0)
|
|
2195
|
-
t = B(this, t, e, 0), o = !Q(t) || t !== this._$AH && t !== L, o && (this._$AH = t);
|
|
2196
|
-
else {
|
|
2197
|
-
const a = t;
|
|
2198
|
-
let c, l;
|
|
2199
|
-
for (t = r[0], c = 0; c < r.length - 1; c++)
|
|
2200
|
-
l = B(this, a[n + c], e, c), l === L && (l = this._$AH[c]), o || (o = !Q(l) || l !== this._$AH[c]), l === g ? t = g : t !== g && (t += (l != null ? l : "") + r[c + 1]), this._$AH[c] = l;
|
|
2201
|
-
}
|
|
2202
|
-
o && !i && this.j(t);
|
|
2203
|
-
}
|
|
2204
|
-
j(t) {
|
|
2205
|
-
t === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t != null ? t : "");
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
class ln extends yt {
|
|
2209
|
-
constructor() {
|
|
2210
|
-
super(...arguments), this.type = 3;
|
|
2211
|
-
}
|
|
2212
|
-
j(t) {
|
|
2213
|
-
this.element[this.name] = t === g ? void 0 : t;
|
|
2214
|
-
}
|
|
2215
|
-
}
|
|
2216
|
-
const dn = V ? V.emptyScript : "";
|
|
2217
|
-
class pn extends yt {
|
|
2218
|
-
constructor() {
|
|
2219
|
-
super(...arguments), this.type = 4;
|
|
2220
|
-
}
|
|
2221
|
-
j(t) {
|
|
2222
|
-
t && t !== g ? this.element.setAttribute(this.name, dn) : this.element.removeAttribute(this.name);
|
|
2223
|
-
}
|
|
2224
|
-
}
|
|
2225
|
-
class un extends yt {
|
|
2226
|
-
constructor(t, e, n, i, r) {
|
|
2227
|
-
super(t, e, n, i, r), this.type = 5;
|
|
2228
|
-
}
|
|
2229
|
-
_$AI(t, e = this) {
|
|
2230
|
-
var n;
|
|
2231
|
-
if ((t = (n = B(this, t, e, 0)) !== null && n !== void 0 ? n : g) === L)
|
|
2232
|
-
return;
|
|
2233
|
-
const i = this._$AH, r = t === g && i !== g || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, o = t !== g && (i === g || r);
|
|
2234
|
-
r && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
2235
|
-
}
|
|
2236
|
-
handleEvent(t) {
|
|
2237
|
-
var e, n;
|
|
2238
|
-
typeof this._$AH == "function" ? this._$AH.call((n = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && n !== void 0 ? n : this.element, t) : this._$AH.handleEvent(t);
|
|
2239
|
-
}
|
|
2240
|
-
}
|
|
2241
|
-
class gn {
|
|
2242
|
-
constructor(t, e, n) {
|
|
2243
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = n;
|
|
2244
|
-
}
|
|
2245
|
-
get _$AU() {
|
|
2246
|
-
return this._$AM._$AU;
|
|
2247
|
-
}
|
|
2248
|
-
_$AI(t) {
|
|
2249
|
-
B(this, t);
|
|
2250
|
-
}
|
|
2251
|
-
}
|
|
2252
|
-
const Se = dt.litHtmlPolyfillSupport;
|
|
2253
|
-
Se == null || Se(tt, st), ((It = dt.litHtmlVersions) !== null && It !== void 0 ? It : dt.litHtmlVersions = []).push("2.8.0");
|
|
2254
|
-
const mn = (s, t, e) => {
|
|
2255
|
-
var n, i;
|
|
2256
|
-
const r = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : t;
|
|
2257
|
-
let o = r._$litPart$;
|
|
2258
|
-
if (o === void 0) {
|
|
2259
|
-
const a = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : null;
|
|
2260
|
-
r._$litPart$ = o = new st(t.insertBefore(Y(), a), a, void 0, e != null ? e : {});
|
|
2261
|
-
}
|
|
2262
|
-
return o._$AI(s), o;
|
|
2263
|
-
};
|
|
2264
|
-
/**
|
|
2265
|
-
* @license
|
|
2266
|
-
* Copyright 2017 Google LLC
|
|
2267
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2268
|
-
*/
|
|
2269
|
-
var Ut, Lt;
|
|
2270
|
-
let G = class extends z {
|
|
2271
|
-
constructor() {
|
|
2272
|
-
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
2273
|
-
}
|
|
2274
|
-
createRenderRoot() {
|
|
2275
|
-
var s, t;
|
|
2276
|
-
const e = super.createRenderRoot();
|
|
2277
|
-
return (s = (t = this.renderOptions).renderBefore) !== null && s !== void 0 || (t.renderBefore = e.firstChild), e;
|
|
2278
|
-
}
|
|
2279
|
-
update(s) {
|
|
2280
|
-
const t = this.render();
|
|
2281
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(s), this._$Do = mn(t, this.renderRoot, this.renderOptions);
|
|
2282
|
-
}
|
|
2283
|
-
connectedCallback() {
|
|
2284
|
-
var s;
|
|
2285
|
-
super.connectedCallback(), (s = this._$Do) === null || s === void 0 || s.setConnected(!0);
|
|
2286
|
-
}
|
|
2287
|
-
disconnectedCallback() {
|
|
2288
|
-
var s;
|
|
2289
|
-
super.disconnectedCallback(), (s = this._$Do) === null || s === void 0 || s.setConnected(!1);
|
|
2290
|
-
}
|
|
2291
|
-
render() {
|
|
2292
|
-
return L;
|
|
2293
|
-
}
|
|
2294
|
-
};
|
|
2295
|
-
G.finalized = !0, G._$litElement$ = !0, (Ut = globalThis.litElementHydrateSupport) === null || Ut === void 0 || Ut.call(globalThis, { LitElement: G });
|
|
2296
|
-
const Ne = globalThis.litElementPolyfillSupport;
|
|
2297
|
-
Ne == null || Ne({ LitElement: G });
|
|
2298
|
-
((Lt = globalThis.litElementVersions) !== null && Lt !== void 0 ? Lt : globalThis.litElementVersions = []).push("3.3.3");
|
|
2299
|
-
/**
|
|
2300
|
-
* @license
|
|
2301
|
-
* Copyright 2017 Google LLC
|
|
2302
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2303
|
-
*/
|
|
2304
|
-
const fn = (s, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? Jt(Bt({}, t), { finisher(e) {
|
|
2305
|
-
e.createProperty(t.key, s);
|
|
2306
|
-
} }) : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
2307
|
-
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
2308
|
-
}, finisher(e) {
|
|
2309
|
-
e.createProperty(t.key, s);
|
|
2310
|
-
} }, vn = (s, t, e) => {
|
|
2311
|
-
t.constructor.createProperty(e, s);
|
|
2312
|
-
};
|
|
2313
|
-
function pt(s) {
|
|
2314
|
-
return (t, e) => e !== void 0 ? vn(s, t, e) : fn(s, t);
|
|
2315
|
-
}
|
|
2316
|
-
/**
|
|
2317
|
-
* @license
|
|
2318
|
-
* Copyright 2017 Google LLC
|
|
2319
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2320
|
-
*/
|
|
2321
|
-
function E(s) {
|
|
2322
|
-
return pt(Jt(Bt({}, s), { state: !0 }));
|
|
2323
|
-
}
|
|
2324
|
-
/**
|
|
2325
|
-
* @license
|
|
2326
|
-
* Copyright 2017 Google LLC
|
|
2327
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2328
|
-
*/
|
|
2329
|
-
const yn = ({ finisher: s, descriptor: t }) => (e, n) => {
|
|
2330
|
-
var i;
|
|
2331
|
-
if (n === void 0) {
|
|
2332
|
-
const r = (i = e.originalKey) !== null && i !== void 0 ? i : e.key, o = t != null ? { kind: "method", placement: "prototype", key: r, descriptor: t(e.key) } : Jt(Bt({}, e), { key: r });
|
|
2333
|
-
return s != null && (o.finisher = function(a) {
|
|
2334
|
-
s(a, r);
|
|
2335
|
-
}), o;
|
|
2336
|
-
}
|
|
2337
|
-
{
|
|
2338
|
-
const r = e.constructor;
|
|
2339
|
-
t !== void 0 && Object.defineProperty(e, n, t(n)), s == null || s(r, n);
|
|
2340
|
-
}
|
|
2341
|
-
};
|
|
2342
|
-
/**
|
|
2343
|
-
* @license
|
|
2344
|
-
* Copyright 2021 Google LLC
|
|
2345
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2346
|
-
*/
|
|
2347
|
-
var Dt;
|
|
2348
|
-
((Dt = window.HTMLSlotElement) === null || Dt === void 0 ? void 0 : Dt.prototype.assignedElements) != null;
|
|
2349
|
-
/**
|
|
2350
|
-
* @license
|
|
2351
|
-
* Copyright 2017 Google LLC
|
|
2352
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2353
|
-
*/
|
|
2354
|
-
const bn = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, $n = (s) => (...t) => ({ _$litDirective$: s, values: t });
|
|
2355
|
-
let wn = class {
|
|
2356
|
-
constructor(s) {
|
|
2357
|
-
}
|
|
2358
|
-
get _$AU() {
|
|
2359
|
-
return this._$AM._$AU;
|
|
2360
|
-
}
|
|
2361
|
-
_$AT(s, t, e) {
|
|
2362
|
-
this._$Ct = s, this._$AM = t, this._$Ci = e;
|
|
2363
|
-
}
|
|
2364
|
-
_$AS(s, t) {
|
|
2365
|
-
return this.update(s, t);
|
|
2366
|
-
}
|
|
2367
|
-
update(s, t) {
|
|
2368
|
-
return this.render(...t);
|
|
2369
|
-
}
|
|
2370
|
-
};
|
|
2371
|
-
/**
|
|
2372
|
-
* @license
|
|
2373
|
-
* Copyright 2018 Google LLC
|
|
2374
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2375
|
-
*/
|
|
2376
|
-
const _n = $n(class extends wn {
|
|
2377
|
-
constructor(s) {
|
|
2378
|
-
var t;
|
|
2379
|
-
if (super(s), s.type !== bn.ATTRIBUTE || s.name !== "class" || ((t = s.strings) === null || t === void 0 ? void 0 : t.length) > 2)
|
|
2380
|
-
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
2381
|
-
}
|
|
2382
|
-
render(s) {
|
|
2383
|
-
return " " + Object.keys(s).filter((t) => s[t]).join(" ") + " ";
|
|
2384
|
-
}
|
|
2385
|
-
update(s, [t]) {
|
|
2386
|
-
var e, n;
|
|
2387
|
-
if (this.it === void 0) {
|
|
2388
|
-
this.it = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((r) => r !== "")));
|
|
2389
|
-
for (const r in t)
|
|
2390
|
-
t[r] && !(!((e = this.nt) === null || e === void 0) && e.has(r)) && this.it.add(r);
|
|
2391
|
-
return this.render(t);
|
|
2392
|
-
}
|
|
2393
|
-
const i = s.element.classList;
|
|
2394
|
-
this.it.forEach((r) => {
|
|
2395
|
-
r in t || (i.remove(r), this.it.delete(r));
|
|
2396
|
-
});
|
|
2397
|
-
for (const r in t) {
|
|
2398
|
-
const o = !!t[r];
|
|
2399
|
-
o === this.it.has(r) || !((n = this.nt) === null || n === void 0) && n.has(r) || (o ? (i.add(r), this.it.add(r)) : (i.remove(r), this.it.delete(r)));
|
|
2400
|
-
}
|
|
2401
|
-
return L;
|
|
2402
|
-
}
|
|
2403
|
-
});
|
|
2404
|
-
var xn = Object.defineProperty, Cn = Object.getOwnPropertyDescriptor, bt = (s, t, e, n) => {
|
|
2405
|
-
for (var i = n > 1 ? void 0 : n ? Cn(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
2406
|
-
(o = s[r]) && (i = (n ? o(t, e, i) : o(i)) || i);
|
|
2407
|
-
return n && i && xn(t, e, i), i;
|
|
2408
|
-
};
|
|
2409
|
-
class D extends G {
|
|
2410
|
-
constructor() {
|
|
2411
|
-
super(...arguments), this.active = !1, this.loaded = !1;
|
|
2412
|
-
}
|
|
2413
|
-
connectedCallback() {
|
|
2414
|
-
return M(this, null, function* () {
|
|
2415
|
-
ns(D.prototype, this, "connectedCallback").call(this), this.icon = yield this._renderSymbol(this.symbol), this.loaded = !0;
|
|
2416
|
-
});
|
|
2417
|
-
}
|
|
2418
|
-
_toggleActive() {
|
|
2419
|
-
this.active = !this.active;
|
|
2420
|
-
}
|
|
2421
|
-
_renderSymbol(t) {
|
|
2422
|
-
return M(this, null, function* () {
|
|
2423
|
-
const e = (n) => M(this, null, function* () {
|
|
2424
|
-
return yield import("./index-9688347a-02584d39.js").then((i) => i[n]);
|
|
2425
|
-
});
|
|
2426
|
-
if (t) {
|
|
2427
|
-
const { type: n, content: i } = t;
|
|
2428
|
-
switch (n) {
|
|
2429
|
-
case "Telia": {
|
|
2430
|
-
const r = yield e(i);
|
|
2431
|
-
return r ? it`<telia-icon
|
|
2432
|
-
class="trigger-icon"
|
|
2433
|
-
svg=${r.svg}
|
|
2434
|
-
size="lg"
|
|
2435
|
-
></telia-icon>` : g;
|
|
2436
|
-
}
|
|
2437
|
-
case "FontAwesome":
|
|
2438
|
-
return it`<i class="trigger-fa-icon fa fa-${i}"></i>`;
|
|
2439
|
-
case "Uri":
|
|
2440
|
-
return it`<i
|
|
2441
|
-
class="trigger-custom-icon"
|
|
2442
|
-
style="background: url(${i}) no-repeat center center;background-size: contain;"
|
|
2443
|
-
></i>`;
|
|
2444
|
-
default:
|
|
2445
|
-
return g;
|
|
2446
|
-
}
|
|
2447
|
-
}
|
|
2448
|
-
});
|
|
2449
|
-
}
|
|
2450
|
-
render() {
|
|
2451
|
-
return it`<button
|
|
2452
|
-
class=${_n({
|
|
2453
|
-
trigger: !0,
|
|
2454
|
-
active: this.active,
|
|
2455
|
-
rendered: this.loaded
|
|
2456
|
-
})}
|
|
2457
|
-
@click=${this._toggleActive}
|
|
2458
|
-
>
|
|
2459
|
-
${this.icon}
|
|
2460
|
-
<span class="trigger-close">
|
|
2461
|
-
<svg
|
|
2462
|
-
width="18"
|
|
2463
|
-
height="9"
|
|
2464
|
-
viewBox="0 0 18 9"
|
|
2465
|
-
fill="none"
|
|
2466
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
2467
|
-
>
|
|
2468
|
-
<path
|
|
2469
|
-
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"
|
|
2470
|
-
fill="white"
|
|
2471
|
-
/>
|
|
2472
|
-
</svg>
|
|
2473
|
-
</span>
|
|
2474
|
-
<span class="trigger-loader">
|
|
2475
|
-
<svg viewBox="25 25 50 50">
|
|
2476
|
-
<circle
|
|
2477
|
-
cx="50"
|
|
2478
|
-
cy="50"
|
|
2479
|
-
r="20"
|
|
2480
|
-
fill="none"
|
|
2481
|
-
stroke="#000"
|
|
2482
|
-
stroke-width="2"
|
|
2483
|
-
stroke-miterlimit="10"
|
|
2484
|
-
/>
|
|
2485
|
-
</svg>
|
|
2486
|
-
</span>
|
|
2487
|
-
</button>`;
|
|
2488
|
-
}
|
|
2489
|
-
}
|
|
2490
|
-
D.styles = [
|
|
2491
|
-
Ve`
|
|
2492
|
-
:host {
|
|
2493
|
-
--voca-rem-multiplier: 0.625;
|
|
2494
|
-
display: block;
|
|
2495
|
-
box-sizing: border-box;
|
|
2496
|
-
}
|
|
2497
|
-
|
|
2498
|
-
.trigger {
|
|
2499
|
-
position: fixed;
|
|
2500
|
-
transform: scale(0);
|
|
2501
|
-
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
|
2502
|
-
bottom: 20px;
|
|
2503
|
-
right: 20px;
|
|
2504
|
-
z-index: 5;
|
|
2505
|
-
display: flex;
|
|
2506
|
-
align-items: center;
|
|
2507
|
-
justify-content: center;
|
|
2508
|
-
border: none;
|
|
2509
|
-
line-height: 55px;
|
|
2510
|
-
height: 55px;
|
|
2511
|
-
width: 55px;
|
|
2512
|
-
border-radius: 55px;
|
|
2513
|
-
cursor: pointer;
|
|
2514
|
-
background-color: #990ae3;
|
|
2515
|
-
font-family: Lato;
|
|
2516
|
-
text-decoration: none;
|
|
2517
|
-
border: 3px dashed transparent;
|
|
2518
|
-
box-sizing: border-box;
|
|
2519
|
-
transition: transform 200ms ease-out;
|
|
2520
|
-
}
|
|
2521
|
-
.trigger:hover {
|
|
2522
|
-
transform: scale(1.1) !important;
|
|
2523
|
-
}
|
|
2524
|
-
.trigger.rendered {
|
|
2525
|
-
transform: scale(1);
|
|
2526
|
-
}
|
|
2527
|
-
.trigger.active .trigger-icon {
|
|
2528
|
-
opacity: 0;
|
|
2529
|
-
transform: rotate(-180deg) scale(0);
|
|
2530
|
-
}
|
|
2531
|
-
.trigger.active .trigger-close {
|
|
2532
|
-
opacity: 1;
|
|
2533
|
-
transform: rotate(0deg) scale(1);
|
|
2534
|
-
}
|
|
2535
|
-
|
|
2536
|
-
.trigger-icon {
|
|
2537
|
-
display: inline-block;
|
|
2538
|
-
line-height: inherit;
|
|
2539
|
-
text-align: center;
|
|
2540
|
-
opacity: 1;
|
|
2541
|
-
transform: rotate(0deg) scale(1);
|
|
2542
|
-
transition:
|
|
2543
|
-
opacity 200ms ease-out,
|
|
2544
|
-
transform 200ms ease-out;
|
|
2545
|
-
color: #ffffff;
|
|
2546
|
-
}
|
|
2547
|
-
.trigger-close {
|
|
2548
|
-
opacity: 0;
|
|
2549
|
-
transition: transform 200ms ease-out;
|
|
2550
|
-
transform: rotate(180deg) scale(0);
|
|
2551
|
-
position: absolute;
|
|
2552
|
-
top: 0;
|
|
2553
|
-
bottom: 0;
|
|
2554
|
-
left: 0;
|
|
2555
|
-
right: 0;
|
|
2556
|
-
display: flex;
|
|
2557
|
-
justify-content: center;
|
|
2558
|
-
align-items: center;
|
|
2559
|
-
fill: #ffffff;
|
|
2560
|
-
}
|
|
2561
|
-
`
|
|
2562
|
-
];
|
|
2563
|
-
bt([
|
|
2564
|
-
pt({ attribute: !1 })
|
|
2565
|
-
], D.prototype, "symbol", 2);
|
|
2566
|
-
bt([
|
|
2567
|
-
E()
|
|
2568
|
-
], D.prototype, "active", 2);
|
|
2569
|
-
bt([
|
|
2570
|
-
E()
|
|
2571
|
-
], D.prototype, "loaded", 2);
|
|
2572
|
-
bt([
|
|
2573
|
-
E()
|
|
2574
|
-
], D.prototype, "icon", 2);
|
|
2575
|
-
/**
|
|
2576
|
-
* @license
|
|
2577
|
-
* Copyright 2021 Google LLC
|
|
2578
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2579
|
-
*/
|
|
2580
|
-
let Ge = class extends Event {
|
|
2581
|
-
constructor(s, t, e) {
|
|
2582
|
-
super("context-request", { bubbles: !0, composed: !0 }), this.context = s, this.callback = t, this.subscribe = e != null && e;
|
|
2583
|
-
}
|
|
2584
|
-
};
|
|
2585
|
-
/**
|
|
2586
|
-
* @license
|
|
2587
|
-
* Copyright 2021 Google LLC
|
|
2588
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2589
|
-
*/
|
|
2590
|
-
/**
|
|
2591
|
-
* @license
|
|
2592
|
-
* Copyright 2021 Google LLC
|
|
2593
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2594
|
-
*/
|
|
2595
|
-
let An = class {
|
|
2596
|
-
constructor(s, t, e, n) {
|
|
2597
|
-
var i;
|
|
2598
|
-
if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (r, o) => {
|
|
2599
|
-
this.unsubscribe && (this.unsubscribe !== o && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = r, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(r, o)), this.unsubscribe = o;
|
|
2600
|
-
}, this.host = s, t.context !== void 0) {
|
|
2601
|
-
const r = t;
|
|
2602
|
-
this.context = r.context, this.callback = r.callback, this.subscribe = (i = r.subscribe) !== null && i !== void 0 && i;
|
|
2603
|
-
} else
|
|
2604
|
-
this.context = t, this.callback = e, this.subscribe = n != null && n;
|
|
2605
|
-
this.host.addController(this);
|
|
2606
|
-
}
|
|
2607
|
-
hostConnected() {
|
|
2608
|
-
this.dispatchRequest();
|
|
2609
|
-
}
|
|
2610
|
-
hostDisconnected() {
|
|
2611
|
-
this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0);
|
|
2612
|
-
}
|
|
2613
|
-
dispatchRequest() {
|
|
2614
|
-
this.host.dispatchEvent(new Ge(this.context, this.t, this.subscribe));
|
|
2615
|
-
}
|
|
2616
|
-
};
|
|
2617
|
-
/**
|
|
2618
|
-
* @license
|
|
2619
|
-
* Copyright 2021 Google LLC
|
|
2620
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2621
|
-
*/
|
|
2622
|
-
class Pn {
|
|
2623
|
-
constructor(t) {
|
|
2624
|
-
this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
|
|
2625
|
-
for (const [e, { disposer: n }] of this.subscriptions)
|
|
2626
|
-
e(this.o, n);
|
|
2627
|
-
}, t !== void 0 && (this.value = t);
|
|
2628
|
-
}
|
|
2629
|
-
get value() {
|
|
2630
|
-
return this.o;
|
|
2631
|
-
}
|
|
2632
|
-
set value(t) {
|
|
2633
|
-
this.setValue(t);
|
|
2634
|
-
}
|
|
2635
|
-
setValue(t, e = !1) {
|
|
2636
|
-
const n = e || !Object.is(t, this.o);
|
|
2637
|
-
this.o = t, n && this.updateObservers();
|
|
2638
|
-
}
|
|
2639
|
-
addCallback(t, e, n) {
|
|
2640
|
-
if (!n)
|
|
2641
|
-
return void t(this.value);
|
|
2642
|
-
this.subscriptions.has(t) || this.subscriptions.set(t, { disposer: () => {
|
|
2643
|
-
this.subscriptions.delete(t);
|
|
2644
|
-
}, consumerHost: e });
|
|
2645
|
-
const { disposer: i } = this.subscriptions.get(t);
|
|
2646
|
-
t(this.value, i);
|
|
2647
|
-
}
|
|
2648
|
-
clearCallbacks() {
|
|
2649
|
-
this.subscriptions.clear();
|
|
2650
|
-
}
|
|
2651
|
-
}
|
|
2652
|
-
/**
|
|
2653
|
-
* @license
|
|
2654
|
-
* Copyright 2021 Google LLC
|
|
2655
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2656
|
-
*/
|
|
2657
|
-
class En extends Event {
|
|
2658
|
-
constructor(t) {
|
|
2659
|
-
super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
|
|
2660
|
-
}
|
|
2661
|
-
}
|
|
2662
|
-
class F extends Pn {
|
|
2663
|
-
constructor(t, e, n) {
|
|
2664
|
-
super(e.context !== void 0 ? e.initialValue : n), this.onContextRequest = (i) => {
|
|
2665
|
-
const r = i.composedPath()[0];
|
|
2666
|
-
i.context === this.context && r !== this.host && (i.stopPropagation(), this.addCallback(i.callback, r, i.subscribe));
|
|
2667
|
-
}, this.onProviderRequest = (i) => {
|
|
2668
|
-
const r = i.composedPath()[0];
|
|
2669
|
-
if (i.context === this.context && r !== this.host) {
|
|
2670
|
-
for (const [o, { consumerHost: a }] of this.subscriptions)
|
|
2671
|
-
a.dispatchEvent(new Ge(this.context, o, !0));
|
|
2672
|
-
i.stopPropagation();
|
|
2673
|
-
}
|
|
2674
|
-
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), this.host.addController(this);
|
|
2675
|
-
}
|
|
2676
|
-
attachListeners() {
|
|
2677
|
-
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
|
2678
|
-
}
|
|
2679
|
-
hostConnected() {
|
|
2680
|
-
this.host.dispatchEvent(new En(this.context));
|
|
2681
|
-
}
|
|
2682
|
-
}
|
|
2683
|
-
/**
|
|
2684
|
-
* @license
|
|
2685
|
-
* Copyright 2022 Google LLC
|
|
2686
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
2687
|
-
*/
|
|
2688
|
-
function On({ context: s, subscribe: t }) {
|
|
2689
|
-
return yn({ finisher: (e, n) => {
|
|
2690
|
-
e.addInitializer((i) => {
|
|
2691
|
-
new An(i, { context: s, callback: (r) => {
|
|
2692
|
-
i[n] = r;
|
|
2693
|
-
}, subscribe: t });
|
|
2694
|
-
});
|
|
2695
|
-
} });
|
|
2696
|
-
}
|
|
2697
|
-
const kn = "children", Sn = "descriptor", Nn = "container", Tn = "context", jn = "layout", In = "properties";
|
|
2698
|
-
class Rn {
|
|
2699
|
-
constructor(t) {
|
|
2700
|
-
(this.host = t).addController(this);
|
|
2701
|
-
}
|
|
2702
|
-
hostConnected() {
|
|
2703
|
-
}
|
|
2704
|
-
hostDisconnected() {
|
|
2705
|
-
}
|
|
2706
|
-
setDescriptor(t) {
|
|
2707
|
-
this._descriptor = t;
|
|
2708
|
-
}
|
|
2709
|
-
setContainer(t) {
|
|
2710
|
-
this._container = t;
|
|
2711
|
-
}
|
|
2712
|
-
dispatch(t, e) {
|
|
2713
|
-
return M(this, null, function* () {
|
|
2714
|
-
if (!this._container || !this._descriptor)
|
|
2715
|
-
return;
|
|
2716
|
-
const n = yield Gt.getInstance(
|
|
2717
|
-
this._container
|
|
2718
|
-
), i = new ut(n).withId(
|
|
2719
|
-
this._descriptor.id
|
|
2720
|
-
);
|
|
2721
|
-
yield n.actions(
|
|
2722
|
-
i,
|
|
2723
|
-
this._descriptor.type || Ss()
|
|
2724
|
-
).dispatch(t, e);
|
|
2725
|
-
});
|
|
2726
|
-
}
|
|
2727
|
-
}
|
|
2728
|
-
const Un = (s, t, e, n, i) => s.getAsync("componentResolver").then((r) => (r.registerComponent(t, e), Es(s, t, n || (() => {
|
|
2729
|
-
}), t, i))), m = (s, t, e) => {
|
|
2730
|
-
s && e.style.setProperty(t, s);
|
|
2731
|
-
}, Ln = (s, t) => {
|
|
2732
|
-
var e, n, i, r, o, a, c, l, h, d, u;
|
|
2733
|
-
m((e = s.colors) == null ? void 0 : e.primary, "--primary-color", t), m((n = s.colors) == null ? void 0 : n.secondary, "--secondary-color", t), m((i = s.colors) == null ? void 0 : i.text, "--text-color", t), m((r = s.colors) == null ? void 0 : r.link, "--link-color", t), m((o = s.colors) == null ? void 0 : o.gray, "--gray-color", t), m((a = s.colors) == null ? void 0 : a.grayDark, "--gray-dark-color", t), m((c = s.spacing) == null ? void 0 : c.xs, "--spacing-xs", t), m((l = s.spacing) == null ? void 0 : l.sm, "--spacing-sm", t), m((h = s.spacing) == null ? void 0 : h.md, "--spacing-md", t), m((d = s.spacing) == null ? void 0 : d.lg, "--spacing-lg", t), m((u = s.spacing) == null ? void 0 : u.xl, "--spacing-xl", t), m(s.boxShadow, "--box-shadow", t), m(s.borderRadius, "--border-radius", t), m(s.borderRadiusSm, "--border-radius-sm", t), m(s.fontFamily, "--font-family", t);
|
|
2734
|
-
}, Dn = (s) => {
|
|
2735
|
-
const t = {};
|
|
2736
|
-
return Object.keys(s).forEach((e) => {
|
|
2737
|
-
e.indexOf("css-") > -1 && (t[e] = s[e]);
|
|
2738
|
-
}), t;
|
|
2739
|
-
}, Hn = (s, t) => {
|
|
2740
|
-
const e = Dn(t);
|
|
2741
|
-
Object.entries(e).forEach(([n, i]) => {
|
|
2742
|
-
s.style.setProperty(n.replace("css-", ""), i);
|
|
2743
|
-
});
|
|
2744
|
-
};
|
|
2745
|
-
var zn = Object.defineProperty, Mn = Object.getOwnPropertyDescriptor, N = (s, t, e, n) => {
|
|
2746
|
-
for (var i = n > 1 ? void 0 : n ? Mn(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
2747
|
-
(o = s[r]) && (i = (n ? o(t, e, i) : o(i)) || i);
|
|
2748
|
-
return n && i && zn(t, e, i), i;
|
|
2749
|
-
};
|
|
2750
|
-
const Wn = (s) => {
|
|
2751
|
-
var t;
|
|
2752
|
-
class e extends s {
|
|
2753
|
-
constructor() {
|
|
2754
|
-
super(...arguments), this.entry = "", this._descriptorProvider = new F(
|
|
2755
|
-
this,
|
|
2756
|
-
Sn,
|
|
2757
|
-
void 0
|
|
2758
|
-
), this._childrenProvider = new F(this, kn, []), this._propertiesProvider = new F(this, In, {}), this._contextProvider = new F(this, Tn, {}), this._layoutProvider = new F(this, jn, {}), this.actions = new Rn(this), this.context = {}, this.layout = {}, this.properties = {};
|
|
2759
|
-
}
|
|
2760
|
-
connectedCallback() {
|
|
2761
|
-
super.connectedCallback(), this.container && (this.actions.setContainer(this.container), Gt.getInstance(this.container).then(
|
|
2762
|
-
(i) => M(this, null, function* () {
|
|
2763
|
-
var r;
|
|
2764
|
-
const o = i.nodes.get(this.entry);
|
|
2765
|
-
if (o) {
|
|
2766
|
-
this._propertyChangeListener = i.events.subscribe(
|
|
2767
|
-
"components:properties-changed",
|
|
2768
|
-
(h, d) => {
|
|
2769
|
-
o.id === d.node.id && this._setProperties(d.node.attributes.properties);
|
|
2770
|
-
}
|
|
2771
|
-
), this._contextChangeListener = i.events.subscribe(
|
|
2772
|
-
"components:context-changed",
|
|
2773
|
-
(h, d) => {
|
|
2774
|
-
o.id === d.node.id && this._setContext(d.node.attributes.context);
|
|
2775
|
-
}
|
|
2776
|
-
), this._layoutChangeListener = i.events.subscribe(
|
|
2777
|
-
"components:layout-changed",
|
|
2778
|
-
(h, d) => {
|
|
2779
|
-
o.id === d.node.id && this._setLayout(d.node.attributes.layout);
|
|
2780
|
-
}
|
|
2781
|
-
);
|
|
2782
|
-
const a = "default";
|
|
2783
|
-
this._unmountNode = o.mount(this.container), this._setDescriptor(pe(o, a)), this._setProperties(o.attributes.properties), this._setContext(o.attributes.context), this._setLayout(this.layout);
|
|
2784
|
-
const c = o.getChildren(a).map((h) => pe(h));
|
|
2785
|
-
this._childrenProvider.setValue(c);
|
|
2786
|
-
const l = (yield this.container.getAsync("componentResolver")).getComponent(
|
|
2787
|
-
((r = this.descriptor) == null ? void 0 : r.type) || ""
|
|
2788
|
-
);
|
|
2789
|
-
l.then && l.then((h) => {
|
|
2790
|
-
this.component = h.default;
|
|
2791
|
-
});
|
|
2792
|
-
}
|
|
2793
|
-
})
|
|
2794
|
-
));
|
|
2795
|
-
}
|
|
2796
|
-
disconnectedCallback() {
|
|
2797
|
-
super.disconnectedCallback(), this._propertyChangeListener && this._propertyChangeListener(), this._contextChangeListener && this._contextChangeListener(), this._layoutChangeListener && this._layoutChangeListener(), this._unmountNode && this._unmountNode();
|
|
2798
|
-
}
|
|
2799
|
-
updated() {
|
|
2800
|
-
this.container && this.actions.setContainer(this.container), Ln(this.context, this.renderRoot.host), this.renderRoot.host.style.setProperty(
|
|
2801
|
-
"--width",
|
|
2802
|
-
this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
|
|
2803
|
-
), Hn(this.renderRoot.host, this.properties);
|
|
2804
|
-
}
|
|
2805
|
-
_setProperties(i) {
|
|
2806
|
-
this._propertiesProvider.setValue(i), this.properties = i;
|
|
2807
|
-
}
|
|
2808
|
-
_setContext(i) {
|
|
2809
|
-
this._contextProvider.setValue(i), this.context = i;
|
|
2810
|
-
}
|
|
2811
|
-
_setLayout(i) {
|
|
2812
|
-
this._layoutProvider.setValue(i), this.layout = i;
|
|
2813
|
-
}
|
|
2814
|
-
_setDescriptor(i) {
|
|
2815
|
-
this.descriptor = i, this._descriptorProvider.setValue(i), this.actions.setDescriptor(i);
|
|
2816
|
-
}
|
|
2817
|
-
}
|
|
2818
|
-
return e.styles = [
|
|
2819
|
-
(t = s.styles) != null ? t : [],
|
|
2820
|
-
Ve`
|
|
2821
|
-
:host {
|
|
2822
|
-
font-family: var(--font-family);
|
|
2823
|
-
grid-column: span var(--width);
|
|
2824
|
-
max-width: 100%;
|
|
2825
|
-
overflow: hidden;
|
|
2826
|
-
box-sizing: border-box;
|
|
2827
|
-
display: block;
|
|
2828
|
-
}
|
|
2829
|
-
* {
|
|
2830
|
-
box-sizing: border-box;
|
|
2831
|
-
}
|
|
2832
|
-
`
|
|
2833
|
-
], N([
|
|
2834
|
-
On({ context: Nn }),
|
|
2835
|
-
pt({ attribute: !1 })
|
|
2836
|
-
], e.prototype, "container", 2), N([
|
|
2837
|
-
pt()
|
|
2838
|
-
], e.prototype, "entry", 2), N([
|
|
2839
|
-
E()
|
|
2840
|
-
], e.prototype, "descriptor", 2), N([
|
|
2841
|
-
E()
|
|
2842
|
-
], e.prototype, "component", 2), N([
|
|
2843
|
-
E()
|
|
2844
|
-
], e.prototype, "context", 2), N([
|
|
2845
|
-
E()
|
|
2846
|
-
], e.prototype, "layout", 2), N([
|
|
2847
|
-
E()
|
|
2848
|
-
], e.prototype, "properties", 2), e;
|
|
2849
|
-
}, Vn = (s) => Un(
|
|
2850
|
-
s,
|
|
2851
|
-
"widget-header",
|
|
2852
|
-
import("./widget-header-ef22461a.js"),
|
|
2853
|
-
(t) => {
|
|
2854
|
-
}
|
|
2855
|
-
);
|
|
2856
|
-
export {
|
|
2857
|
-
Wn as G,
|
|
2858
|
-
Vn as W
|
|
2859
|
-
};
|
|
2860
|
-
//# sourceMappingURL=index-77a55bb1.js.map
|