@record-evolution/widget-overlay 1.0.2 → 1.0.4

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.
@@ -1,5 +1,771 @@
1
1
  /* @license Copyright (c) 2023 Record Evolution GmbH. All rights reserved.*/
2
- import { n as n$1, T, E, Z, i as i$2, _ as __decorate, a as i$3, x } from './property-v0slTy4i.js';
2
+ /******************************************************************************
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
15
+ ***************************************************************************** */
16
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
17
+
18
+ function __decorate(decorators, target, key, desc) {
19
+ var c = arguments.length,
20
+ r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
21
+ d;
22
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
23
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
24
+ }
25
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
26
+ var e = new Error(message);
27
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
28
+ };
29
+
30
+ /**
31
+ * @license
32
+ * Copyright 2019 Google LLC
33
+ * SPDX-License-Identifier: BSD-3-Clause
34
+ */
35
+ const t$5 = globalThis,
36
+ e$6 = t$5.ShadowRoot && (void 0 === t$5.ShadyCSS || t$5.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
37
+ s$3 = Symbol(),
38
+ o$6 = new WeakMap();
39
+ let n$4 = class n {
40
+ constructor(t, e, o) {
41
+ if (this._$cssResult$ = !0, o !== s$3) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
42
+ this.cssText = t, this.t = e;
43
+ }
44
+ get styleSheet() {
45
+ let t = this.o;
46
+ const s = this.t;
47
+ if (e$6 && void 0 === t) {
48
+ const e = void 0 !== s && 1 === s.length;
49
+ e && (t = o$6.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$6.set(s, t));
50
+ }
51
+ return t;
52
+ }
53
+ toString() {
54
+ return this.cssText;
55
+ }
56
+ };
57
+ const r$5 = t => new n$4("string" == typeof t ? t : t + "", void 0, s$3),
58
+ i$5 = (t, ...e) => {
59
+ const o = 1 === t.length ? t[0] : e.reduce((e, s, o) => e + (t => {
60
+ if (!0 === t._$cssResult$) return t.cssText;
61
+ if ("number" == typeof t) return t;
62
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
63
+ })(s) + t[o + 1], t[0]);
64
+ return new n$4(o, t, s$3);
65
+ },
66
+ S$1 = (s, o) => {
67
+ if (e$6) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
68
+ const o = document.createElement("style"),
69
+ n = t$5.litNonce;
70
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
71
+ }
72
+ },
73
+ c$3 = e$6 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
74
+ let e = "";
75
+ for (const s of t.cssRules) e += s.cssText;
76
+ return r$5(e);
77
+ })(t) : t;
78
+
79
+ /**
80
+ * @license
81
+ * Copyright 2017 Google LLC
82
+ * SPDX-License-Identifier: BSD-3-Clause
83
+ */
84
+ const {
85
+ is: i$4,
86
+ defineProperty: e$5,
87
+ getOwnPropertyDescriptor: h$1,
88
+ getOwnPropertyNames: r$4,
89
+ getOwnPropertySymbols: o$5,
90
+ getPrototypeOf: n$3
91
+ } = Object,
92
+ a$1 = globalThis,
93
+ c$2 = a$1.trustedTypes,
94
+ l$1 = c$2 ? c$2.emptyScript : "",
95
+ p$2 = a$1.reactiveElementPolyfillSupport,
96
+ d$1 = (t, s) => t,
97
+ u$3 = {
98
+ toAttribute(t, s) {
99
+ switch (s) {
100
+ case Boolean:
101
+ t = t ? l$1 : null;
102
+ break;
103
+ case Object:
104
+ case Array:
105
+ t = null == t ? t : JSON.stringify(t);
106
+ }
107
+ return t;
108
+ },
109
+ fromAttribute(t, s) {
110
+ let i = t;
111
+ switch (s) {
112
+ case Boolean:
113
+ i = null !== t;
114
+ break;
115
+ case Number:
116
+ i = null === t ? null : Number(t);
117
+ break;
118
+ case Object:
119
+ case Array:
120
+ try {
121
+ i = JSON.parse(t);
122
+ } catch (t) {
123
+ i = null;
124
+ }
125
+ }
126
+ return i;
127
+ }
128
+ },
129
+ f$1 = (t, s) => !i$4(t, s),
130
+ b = {
131
+ attribute: !0,
132
+ type: String,
133
+ converter: u$3,
134
+ reflect: !1,
135
+ useDefault: !1,
136
+ hasChanged: f$1
137
+ };
138
+ Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= new WeakMap();
139
+ let y$1 = class y extends HTMLElement {
140
+ static addInitializer(t) {
141
+ this._$Ei(), (this.l ??= []).push(t);
142
+ }
143
+ static get observedAttributes() {
144
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
145
+ }
146
+ static createProperty(t, s = b) {
147
+ if (s.state && (s.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = !0), this.elementProperties.set(t, s), !s.noAccessor) {
148
+ const i = Symbol(),
149
+ h = this.getPropertyDescriptor(t, i, s);
150
+ void 0 !== h && e$5(this.prototype, t, h);
151
+ }
152
+ }
153
+ static getPropertyDescriptor(t, s, i) {
154
+ const {
155
+ get: e,
156
+ set: r
157
+ } = h$1(this.prototype, t) ?? {
158
+ get() {
159
+ return this[s];
160
+ },
161
+ set(t) {
162
+ this[s] = t;
163
+ }
164
+ };
165
+ return {
166
+ get: e,
167
+ set(s) {
168
+ const h = e?.call(this);
169
+ r?.call(this, s), this.requestUpdate(t, h, i);
170
+ },
171
+ configurable: !0,
172
+ enumerable: !0
173
+ };
174
+ }
175
+ static getPropertyOptions(t) {
176
+ return this.elementProperties.get(t) ?? b;
177
+ }
178
+ static _$Ei() {
179
+ if (this.hasOwnProperty(d$1("elementProperties"))) return;
180
+ const t = n$3(this);
181
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
182
+ }
183
+ static finalize() {
184
+ if (this.hasOwnProperty(d$1("finalized"))) return;
185
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
186
+ const t = this.properties,
187
+ s = [...r$4(t), ...o$5(t)];
188
+ for (const i of s) this.createProperty(i, t[i]);
189
+ }
190
+ const t = this[Symbol.metadata];
191
+ if (null !== t) {
192
+ const s = litPropertyMetadata.get(t);
193
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
194
+ }
195
+ this._$Eh = new Map();
196
+ for (const [t, s] of this.elementProperties) {
197
+ const i = this._$Eu(t, s);
198
+ void 0 !== i && this._$Eh.set(i, t);
199
+ }
200
+ this.elementStyles = this.finalizeStyles(this.styles);
201
+ }
202
+ static finalizeStyles(s) {
203
+ const i = [];
204
+ if (Array.isArray(s)) {
205
+ const e = new Set(s.flat(1 / 0).reverse());
206
+ for (const s of e) i.unshift(c$3(s));
207
+ } else void 0 !== s && i.push(c$3(s));
208
+ return i;
209
+ }
210
+ static _$Eu(t, s) {
211
+ const i = s.attribute;
212
+ return !1 === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
213
+ }
214
+ constructor() {
215
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
216
+ }
217
+ _$Ev() {
218
+ this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
219
+ }
220
+ addController(t) {
221
+ (this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
222
+ }
223
+ removeController(t) {
224
+ this._$EO?.delete(t);
225
+ }
226
+ _$E_() {
227
+ const t = new Map(),
228
+ s = this.constructor.elementProperties;
229
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
230
+ t.size > 0 && (this._$Ep = t);
231
+ }
232
+ createRenderRoot() {
233
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
234
+ return S$1(t, this.constructor.elementStyles), t;
235
+ }
236
+ connectedCallback() {
237
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(t => t.hostConnected?.());
238
+ }
239
+ enableUpdating(t) {}
240
+ disconnectedCallback() {
241
+ this._$EO?.forEach(t => t.hostDisconnected?.());
242
+ }
243
+ attributeChangedCallback(t, s, i) {
244
+ this._$AK(t, i);
245
+ }
246
+ _$ET(t, s) {
247
+ const i = this.constructor.elementProperties.get(t),
248
+ e = this.constructor._$Eu(t, i);
249
+ if (void 0 !== e && !0 === i.reflect) {
250
+ const h = (void 0 !== i.converter?.toAttribute ? i.converter : u$3).toAttribute(s, i.type);
251
+ this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
252
+ }
253
+ }
254
+ _$AK(t, s) {
255
+ const i = this.constructor,
256
+ e = i._$Eh.get(t);
257
+ if (void 0 !== e && this._$Em !== e) {
258
+ const t = i.getPropertyOptions(e),
259
+ h = "function" == typeof t.converter ? {
260
+ fromAttribute: t.converter
261
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u$3;
262
+ this._$Em = e, this[e] = h.fromAttribute(s, t.type) ?? this._$Ej?.get(e) ?? null, this._$Em = null;
263
+ }
264
+ }
265
+ requestUpdate(t, s, i) {
266
+ if (void 0 !== t) {
267
+ const e = this.constructor,
268
+ h = this[t];
269
+ if (i ??= e.getPropertyOptions(t), !((i.hasChanged ?? f$1)(h, s) || i.useDefault && i.reflect && h === this._$Ej?.get(t) && !this.hasAttribute(e._$Eu(t, i)))) return;
270
+ this.C(t, s, i);
271
+ }
272
+ !1 === this.isUpdatePending && (this._$ES = this._$EP());
273
+ }
274
+ C(t, s, {
275
+ useDefault: i,
276
+ reflect: e,
277
+ wrapped: h
278
+ }, r) {
279
+ i && !(this._$Ej ??= new Map()).has(t) && (this._$Ej.set(t, r ?? s ?? this[t]), !0 !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), !0 === e && this._$Em !== t && (this._$Eq ??= new Set()).add(t));
280
+ }
281
+ async _$EP() {
282
+ this.isUpdatePending = !0;
283
+ try {
284
+ await this._$ES;
285
+ } catch (t) {
286
+ Promise.reject(t);
287
+ }
288
+ const t = this.scheduleUpdate();
289
+ return null != t && (await t), !this.isUpdatePending;
290
+ }
291
+ scheduleUpdate() {
292
+ return this.performUpdate();
293
+ }
294
+ performUpdate() {
295
+ if (!this.isUpdatePending) return;
296
+ if (!this.hasUpdated) {
297
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
298
+ for (const [t, s] of this._$Ep) this[t] = s;
299
+ this._$Ep = void 0;
300
+ }
301
+ const t = this.constructor.elementProperties;
302
+ if (t.size > 0) for (const [s, i] of t) {
303
+ const {
304
+ wrapped: t
305
+ } = i,
306
+ e = this[s];
307
+ !0 !== t || this._$AL.has(s) || void 0 === e || this.C(s, void 0, i, e);
308
+ }
309
+ }
310
+ let t = !1;
311
+ const s = this._$AL;
312
+ try {
313
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EM();
314
+ } catch (s) {
315
+ throw t = !1, this._$EM(), s;
316
+ }
317
+ t && this._$AE(s);
318
+ }
319
+ willUpdate(t) {}
320
+ _$AE(t) {
321
+ this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
322
+ }
323
+ _$EM() {
324
+ this._$AL = new Map(), this.isUpdatePending = !1;
325
+ }
326
+ get updateComplete() {
327
+ return this.getUpdateComplete();
328
+ }
329
+ getUpdateComplete() {
330
+ return this._$ES;
331
+ }
332
+ shouldUpdate(t) {
333
+ return !0;
334
+ }
335
+ update(t) {
336
+ this._$Eq &&= this._$Eq.forEach(t => this._$ET(t, this[t])), this._$EM();
337
+ }
338
+ updated(t) {}
339
+ firstUpdated(t) {}
340
+ };
341
+ y$1.elementStyles = [], y$1.shadowRootOptions = {
342
+ mode: "open"
343
+ }, y$1[d$1("elementProperties")] = new Map(), y$1[d$1("finalized")] = new Map(), p$2?.({
344
+ ReactiveElement: y$1
345
+ }), (a$1.reactiveElementVersions ??= []).push("2.1.0");
346
+
347
+ /**
348
+ * @license
349
+ * Copyright 2017 Google LLC
350
+ * SPDX-License-Identifier: BSD-3-Clause
351
+ */
352
+ const t$4 = globalThis,
353
+ i$3 = t$4.trustedTypes,
354
+ s$2 = i$3 ? i$3.createPolicy("lit-html", {
355
+ createHTML: t => t
356
+ }) : void 0,
357
+ e$4 = "$lit$",
358
+ h = `lit$${Math.random().toFixed(9).slice(2)}$`,
359
+ o$4 = "?" + h,
360
+ n$2 = `<${o$4}>`,
361
+ r$3 = document,
362
+ l = () => r$3.createComment(""),
363
+ c$1 = t => null === t || "object" != typeof t && "function" != typeof t,
364
+ a = Array.isArray,
365
+ u$2 = t => a(t) || "function" == typeof t?.[Symbol.iterator],
366
+ d = "[ \t\n\f\r]",
367
+ f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
368
+ v$1 = /-->/g,
369
+ _ = />/g,
370
+ m$1 = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
371
+ p$1 = /'/g,
372
+ g = /"/g,
373
+ $ = /^(?:script|style|textarea|title)$/i,
374
+ y = t => (i, ...s) => ({
375
+ _$litType$: t,
376
+ strings: i,
377
+ values: s
378
+ }),
379
+ x = y(1),
380
+ T = Symbol.for("lit-noChange"),
381
+ E = Symbol.for("lit-nothing"),
382
+ A = new WeakMap(),
383
+ C = r$3.createTreeWalker(r$3, 129);
384
+ function P(t, i) {
385
+ if (!a(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
386
+ return void 0 !== s$2 ? s$2.createHTML(i) : i;
387
+ }
388
+ const V = (t, i) => {
389
+ const s = t.length - 1,
390
+ o = [];
391
+ let r,
392
+ l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "",
393
+ c = f;
394
+ for (let i = 0; i < s; i++) {
395
+ const s = t[i];
396
+ let a,
397
+ u,
398
+ d = -1,
399
+ y = 0;
400
+ for (; y < s.length && (c.lastIndex = y, u = c.exec(s), null !== u);) y = c.lastIndex, c === f ? "!--" === u[1] ? c = v$1 : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m$1) : void 0 !== u[3] && (c = m$1) : c === m$1 ? ">" === u[0] ? (c = r ?? f, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? m$1 : '"' === u[3] ? g : p$1) : c === g || c === p$1 ? c = m$1 : c === v$1 || c === _ ? c = f : (c = m$1, r = void 0);
401
+ const x = c === m$1 && t[i + 1].startsWith("/>") ? " " : "";
402
+ l += c === f ? s + n$2 : d >= 0 ? (o.push(a), s.slice(0, d) + e$4 + s.slice(d) + h + x) : s + h + (-2 === d ? i : x);
403
+ }
404
+ return [P(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")), o];
405
+ };
406
+ class N {
407
+ constructor({
408
+ strings: t,
409
+ _$litType$: s
410
+ }, n) {
411
+ let r;
412
+ this.parts = [];
413
+ let c = 0,
414
+ a = 0;
415
+ const u = t.length - 1,
416
+ d = this.parts,
417
+ [f, v] = V(t, s);
418
+ if (this.el = N.createElement(f, n), C.currentNode = this.el.content, 2 === s || 3 === s) {
419
+ const t = this.el.content.firstChild;
420
+ t.replaceWith(...t.childNodes);
421
+ }
422
+ for (; null !== (r = C.nextNode()) && d.length < u;) {
423
+ if (1 === r.nodeType) {
424
+ if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(e$4)) {
425
+ const i = v[a++],
426
+ s = r.getAttribute(t).split(h),
427
+ e = /([.?@])?(.*)/.exec(i);
428
+ d.push({
429
+ type: 1,
430
+ index: c,
431
+ name: e[2],
432
+ strings: s,
433
+ ctor: "." === e[1] ? H : "?" === e[1] ? I : "@" === e[1] ? L : k
434
+ }), r.removeAttribute(t);
435
+ } else t.startsWith(h) && (d.push({
436
+ type: 6,
437
+ index: c
438
+ }), r.removeAttribute(t));
439
+ if ($.test(r.tagName)) {
440
+ const t = r.textContent.split(h),
441
+ s = t.length - 1;
442
+ if (s > 0) {
443
+ r.textContent = i$3 ? i$3.emptyScript : "";
444
+ for (let i = 0; i < s; i++) r.append(t[i], l()), C.nextNode(), d.push({
445
+ type: 2,
446
+ index: ++c
447
+ });
448
+ r.append(t[s], l());
449
+ }
450
+ }
451
+ } else if (8 === r.nodeType) if (r.data === o$4) d.push({
452
+ type: 2,
453
+ index: c
454
+ });else {
455
+ let t = -1;
456
+ for (; -1 !== (t = r.data.indexOf(h, t + 1));) d.push({
457
+ type: 7,
458
+ index: c
459
+ }), t += h.length - 1;
460
+ }
461
+ c++;
462
+ }
463
+ }
464
+ static createElement(t, i) {
465
+ const s = r$3.createElement("template");
466
+ return s.innerHTML = t, s;
467
+ }
468
+ }
469
+ function S(t, i, s = t, e) {
470
+ if (i === T) return i;
471
+ let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
472
+ const o = c$1(i) ? void 0 : i._$litDirective$;
473
+ return h?.constructor !== o && (h?._$AO?.(!1), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = S(t, h._$AS(t, i.values), h, e)), i;
474
+ }
475
+ let M$1 = class M {
476
+ constructor(t, i) {
477
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
478
+ }
479
+ get parentNode() {
480
+ return this._$AM.parentNode;
481
+ }
482
+ get _$AU() {
483
+ return this._$AM._$AU;
484
+ }
485
+ u(t) {
486
+ const {
487
+ el: {
488
+ content: i
489
+ },
490
+ parts: s
491
+ } = this._$AD,
492
+ e = (t?.creationScope ?? r$3).importNode(i, !0);
493
+ C.currentNode = e;
494
+ let h = C.nextNode(),
495
+ o = 0,
496
+ n = 0,
497
+ l = s[0];
498
+ for (; void 0 !== l;) {
499
+ if (o === l.index) {
500
+ let i;
501
+ 2 === l.type ? i = new R(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new z(h, this, t)), this._$AV.push(i), l = s[++n];
502
+ }
503
+ o !== l?.index && (h = C.nextNode(), o++);
504
+ }
505
+ return C.currentNode = r$3, e;
506
+ }
507
+ p(t) {
508
+ let i = 0;
509
+ for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
510
+ }
511
+ };
512
+ class R {
513
+ get _$AU() {
514
+ return this._$AM?._$AU ?? this._$Cv;
515
+ }
516
+ constructor(t, i, s, e) {
517
+ this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? !0;
518
+ }
519
+ get parentNode() {
520
+ let t = this._$AA.parentNode;
521
+ const i = this._$AM;
522
+ return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
523
+ }
524
+ get startNode() {
525
+ return this._$AA;
526
+ }
527
+ get endNode() {
528
+ return this._$AB;
529
+ }
530
+ _$AI(t, i = this) {
531
+ t = S(this, t, i), c$1(t) ? t === E || null == t || "" === t ? (this._$AH !== E && this._$AR(), this._$AH = E) : t !== this._$AH && t !== T && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : u$2(t) ? this.k(t) : this._(t);
532
+ }
533
+ O(t) {
534
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
535
+ }
536
+ T(t) {
537
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
538
+ }
539
+ _(t) {
540
+ this._$AH !== E && c$1(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$3.createTextNode(t)), this._$AH = t;
541
+ }
542
+ $(t) {
543
+ const {
544
+ values: i,
545
+ _$litType$: s
546
+ } = t,
547
+ e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = N.createElement(P(s.h, s.h[0]), this.options)), s);
548
+ if (this._$AH?._$AD === e) this._$AH.p(i);else {
549
+ const t = new M$1(e, this),
550
+ s = t.u(this.options);
551
+ t.p(i), this.T(s), this._$AH = t;
552
+ }
553
+ }
554
+ _$AC(t) {
555
+ let i = A.get(t.strings);
556
+ return void 0 === i && A.set(t.strings, i = new N(t)), i;
557
+ }
558
+ k(t) {
559
+ a(this._$AH) || (this._$AH = [], this._$AR());
560
+ const i = this._$AH;
561
+ let s,
562
+ e = 0;
563
+ for (const h of t) e === i.length ? i.push(s = new R(this.O(l()), this.O(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
564
+ e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
565
+ }
566
+ _$AR(t = this._$AA.nextSibling, i) {
567
+ for (this._$AP?.(!1, !0, i); t && t !== this._$AB;) {
568
+ const i = t.nextSibling;
569
+ t.remove(), t = i;
570
+ }
571
+ }
572
+ setConnected(t) {
573
+ void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
574
+ }
575
+ }
576
+ class k {
577
+ get tagName() {
578
+ return this.element.tagName;
579
+ }
580
+ get _$AU() {
581
+ return this._$AM._$AU;
582
+ }
583
+ constructor(t, i, s, e, h) {
584
+ this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = E;
585
+ }
586
+ _$AI(t, i = this, s, e) {
587
+ const h = this.strings;
588
+ let o = !1;
589
+ if (void 0 === h) t = S(this, t, i, 0), o = !c$1(t) || t !== this._$AH && t !== T, o && (this._$AH = t);else {
590
+ const e = t;
591
+ let n, r;
592
+ for (t = h[0], n = 0; n < h.length - 1; n++) r = S(this, e[s + n], i, n), r === T && (r = this._$AH[n]), o ||= !c$1(r) || r !== this._$AH[n], r === E ? t = E : t !== E && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
593
+ }
594
+ o && !e && this.j(t);
595
+ }
596
+ j(t) {
597
+ t === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
598
+ }
599
+ }
600
+ class H extends k {
601
+ constructor() {
602
+ super(...arguments), this.type = 3;
603
+ }
604
+ j(t) {
605
+ this.element[this.name] = t === E ? void 0 : t;
606
+ }
607
+ }
608
+ class I extends k {
609
+ constructor() {
610
+ super(...arguments), this.type = 4;
611
+ }
612
+ j(t) {
613
+ this.element.toggleAttribute(this.name, !!t && t !== E);
614
+ }
615
+ }
616
+ class L extends k {
617
+ constructor(t, i, s, e, h) {
618
+ super(t, i, s, e, h), this.type = 5;
619
+ }
620
+ _$AI(t, i = this) {
621
+ if ((t = S(this, t, i, 0) ?? E) === T) return;
622
+ const s = this._$AH,
623
+ e = t === E && s !== E || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
624
+ h = t !== E && (s === E || e);
625
+ e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
626
+ }
627
+ handleEvent(t) {
628
+ "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
629
+ }
630
+ }
631
+ class z {
632
+ constructor(t, i, s) {
633
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
634
+ }
635
+ get _$AU() {
636
+ return this._$AM._$AU;
637
+ }
638
+ _$AI(t) {
639
+ S(this, t);
640
+ }
641
+ }
642
+ const Z = {
643
+ M: e$4,
644
+ P: h,
645
+ A: o$4,
646
+ C: 1,
647
+ L: V,
648
+ R: M$1,
649
+ D: u$2,
650
+ V: S,
651
+ I: R,
652
+ H: k,
653
+ N: I,
654
+ U: L,
655
+ B: H,
656
+ F: z
657
+ },
658
+ j = t$4.litHtmlPolyfillSupport;
659
+ j?.(N, R), (t$4.litHtmlVersions ??= []).push("3.3.0");
660
+ const B = (t, i, s) => {
661
+ const e = s?.renderBefore ?? i;
662
+ let h = e._$litPart$;
663
+ if (void 0 === h) {
664
+ const t = s?.renderBefore ?? null;
665
+ e._$litPart$ = h = new R(i.insertBefore(l(), t), t, void 0, s ?? {});
666
+ }
667
+ return h._$AI(t), h;
668
+ };
669
+
670
+ /**
671
+ * @license
672
+ * Copyright 2017 Google LLC
673
+ * SPDX-License-Identifier: BSD-3-Clause
674
+ */
675
+ const s$1 = globalThis;
676
+ let i$2 = class i extends y$1 {
677
+ constructor() {
678
+ super(...arguments), this.renderOptions = {
679
+ host: this
680
+ }, this._$Do = void 0;
681
+ }
682
+ createRenderRoot() {
683
+ const t = super.createRenderRoot();
684
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
685
+ }
686
+ update(t) {
687
+ const r = this.render();
688
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(r, this.renderRoot, this.renderOptions);
689
+ }
690
+ connectedCallback() {
691
+ super.connectedCallback(), this._$Do?.setConnected(!0);
692
+ }
693
+ disconnectedCallback() {
694
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
695
+ }
696
+ render() {
697
+ return T;
698
+ }
699
+ };
700
+ i$2._$litElement$ = !0, i$2["finalized"] = !0, s$1.litElementHydrateSupport?.({
701
+ LitElement: i$2
702
+ });
703
+ const o$3 = s$1.litElementPolyfillSupport;
704
+ o$3?.({
705
+ LitElement: i$2
706
+ });
707
+ (s$1.litElementVersions ??= []).push("4.2.0");
708
+
709
+ /**
710
+ * @license
711
+ * Copyright 2017 Google LLC
712
+ * SPDX-License-Identifier: BSD-3-Clause
713
+ */
714
+ const t$3 = t => (e, o) => {
715
+ void 0 !== o ? o.addInitializer(() => {
716
+ customElements.define(t, e);
717
+ }) : customElements.define(t, e);
718
+ };
719
+
720
+ /**
721
+ * @license
722
+ * Copyright 2017 Google LLC
723
+ * SPDX-License-Identifier: BSD-3-Clause
724
+ */
725
+ const o$2 = {
726
+ attribute: !0,
727
+ type: String,
728
+ converter: u$3,
729
+ reflect: !1,
730
+ hasChanged: f$1
731
+ },
732
+ r$2 = (t = o$2, e, r) => {
733
+ const {
734
+ kind: n,
735
+ metadata: i
736
+ } = r;
737
+ let s = globalThis.litPropertyMetadata.get(i);
738
+ if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = new Map()), "setter" === n && ((t = Object.create(t)).wrapped = !0), s.set(r.name, t), "accessor" === n) {
739
+ const {
740
+ name: o
741
+ } = r;
742
+ return {
743
+ set(r) {
744
+ const n = e.get.call(this);
745
+ e.set.call(this, r), this.requestUpdate(o, n, t);
746
+ },
747
+ init(e) {
748
+ return void 0 !== e && this.C(o, void 0, t, e), e;
749
+ }
750
+ };
751
+ }
752
+ if ("setter" === n) {
753
+ const {
754
+ name: o
755
+ } = r;
756
+ return function (r) {
757
+ const n = this[o];
758
+ e.call(this, r), this.requestUpdate(o, n, t);
759
+ };
760
+ }
761
+ throw Error("Unsupported decorator location: " + n);
762
+ };
763
+ function n$1(t) {
764
+ return (e, o) => "object" == typeof o ? r$2(t, e, o) : ((t, e, o) => {
765
+ const r = e.hasOwnProperty(o);
766
+ return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
767
+ })(t, e, o);
768
+ }
3
769
 
4
770
  /**
5
771
  * @license
@@ -254,10 +1020,68 @@ const u = (e, s, t) => {
254
1020
  }
255
1021
  });
256
1022
 
257
- class WidgetImage extends i$3 {
1023
+ let LinearProgress = class LinearProgress extends i$2 {
1024
+ render() {
1025
+ return x `
1026
+ ${this.value !== undefined
1027
+ ? x `<div class="bar" style="width: ${this.value * 100}%;"></div>`
1028
+ : x `<div class="indeterminate"></div>`}
1029
+ `;
1030
+ }
1031
+ };
1032
+ LinearProgress.styles = i$5 `
1033
+ :host {
1034
+ display: inline-block;
1035
+ width: var(--progress-width, 200px);
1036
+ height: var(--progress-height, 8px);
1037
+ background-color: var(--progress-background, #e0e0e0);
1038
+ border-radius: var(--progress-radius, 4px);
1039
+ overflow: hidden;
1040
+ position: absolute;
1041
+ border: 0.5px solid var(--progress-border-color, #ccc);
1042
+ }
1043
+
1044
+ .bar {
1045
+ height: 100%;
1046
+ background-color: var(--progress-color, #3b82f6);
1047
+ transition: width 0.3s ease;
1048
+ }
1049
+
1050
+ /* Indeterminate animation */
1051
+ .indeterminate {
1052
+ position: absolute;
1053
+ width: 30%;
1054
+ height: 100%;
1055
+ background-color: var(--progress-color, #3b82f6);
1056
+ animation: indeterminate-slide 1.2s infinite ease-in-out;
1057
+ }
1058
+
1059
+ @keyframes indeterminate-slide {
1060
+ 0% {
1061
+ left: -30%;
1062
+ width: 30%;
1063
+ }
1064
+ 50% {
1065
+ left: 35%;
1066
+ width: 30%;
1067
+ }
1068
+ 100% {
1069
+ left: 100%;
1070
+ width: 30%;
1071
+ }
1072
+ }
1073
+ `;
1074
+ __decorate([
1075
+ n$1({ type: Number })
1076
+ ], LinearProgress.prototype, "value", void 0);
1077
+ LinearProgress = __decorate([
1078
+ t$3('linear-progress')
1079
+ ], LinearProgress);
1080
+
1081
+ class WidgetImage extends i$2 {
258
1082
  constructor() {
259
1083
  super();
260
- this.version = '1.0.2';
1084
+ this.version = '1.0.4';
261
1085
  this.getModifier = this.getModifier.bind(this);
262
1086
  }
263
1087
  update(changedProperties) {
@@ -302,7 +1126,7 @@ class WidgetImage extends i$3 {
302
1126
  }));
303
1127
  }
304
1128
  transform() {
305
- var _a, _b, _c;
1129
+ var _a;
306
1130
  this.inlineSvg = undefined;
307
1131
  if (!((_a = this.inputData) === null || _a === void 0 ? void 0 : _a.image)) {
308
1132
  this.previewUrl = undefined;
@@ -310,9 +1134,9 @@ class WidgetImage extends i$3 {
310
1134
  }
311
1135
  const raw = this.inputData.image.trim();
312
1136
  // Dynamically load progress bar element if needed
313
- if ((_c = (_b = this.inputData) === null || _b === void 0 ? void 0 : _b.overlays) === null || _c === void 0 ? void 0 : _c.some((o) => o.layerType === 'progress')) {
314
- import('./linear-progress.js');
315
- }
1137
+ // if (this.inputData?.overlays?.some((o) => o.layerType === 'progress')) {
1138
+ // import('./linear-progress.js')
1139
+ // }
316
1140
  // Inline SVG markup (optionally starting with an XML declaration or other preamble)
317
1141
  const trimmed = raw.replace(/^\uFEFF/, '').trimStart();
318
1142
  // Find the actual <svg ...>...</svg> block even if preceded by <?xml ...?> or <!DOCTYPE ...>
@@ -343,7 +1167,7 @@ class WidgetImage extends i$3 {
343
1167
  this.previewUrl = raw;
344
1168
  return;
345
1169
  }
346
- catch (_d) {
1170
+ catch (_b) {
347
1171
  // Relative path
348
1172
  if (/^([./]|\/)/.test(raw)) {
349
1173
  this.previewUrl = raw;
@@ -541,7 +1365,7 @@ class WidgetImage extends i$3 {
541
1365
  `;
542
1366
  }
543
1367
  }
544
- WidgetImage.styles = i$2 `
1368
+ WidgetImage.styles = i$5 `
545
1369
  :host {
546
1370
  display: block;
547
1371
  font-family: sans-serif;
@@ -652,7 +1476,7 @@ __decorate([
652
1476
  __decorate([
653
1477
  e$2('#base-layer')
654
1478
  ], WidgetImage.prototype, "baseLayer", void 0);
655
- window.customElements.define('widget-overlay-1.0.2', WidgetImage);
1479
+ window.customElements.define('widget-overlay-1.0.4', WidgetImage);
656
1480
 
657
1481
  export { WidgetImage };
658
1482
  //# sourceMappingURL=widget-overlay.js.map