@record-evolution/widget-gauge 1.5.34 → 1.6.3

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.
@@ -13,7 +13,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
15
  ***************************************************************************** */
16
- /* global Reflect, Promise, SuppressedError, Symbol */
16
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
17
17
 
18
18
  function __decorate(decorators, target, key, desc) {
19
19
  var c = arguments.length,
@@ -32,21 +32,21 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
32
32
  * Copyright 2019 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
34
  */
35
- const t$3 = globalThis,
36
- e$3 = t$3.ShadowRoot && (void 0 === t$3.ShadyCSS || t$3.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
37
- s$3 = Symbol(),
38
- o$3 = new WeakMap();
35
+ const t = globalThis,
36
+ e$1 = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
37
+ s = Symbol(),
38
+ o$2 = new WeakMap();
39
39
  let n$3 = class n {
40
40
  constructor(t, e, o) {
41
- if (this._$cssResult$ = !0, o !== s$3) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
41
+ if (this._$cssResult$ = !0, o !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
42
42
  this.cssText = t, this.t = e;
43
43
  }
44
44
  get styleSheet() {
45
45
  let t = this.o;
46
46
  const s = this.t;
47
- if (e$3 && void 0 === t) {
47
+ if (e$1 && void 0 === t) {
48
48
  const e = void 0 !== s && 1 === s.length;
49
- e && (t = o$3.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$3.set(s, t));
49
+ e && (t = o$2.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$2.set(s, t));
50
50
  }
51
51
  return t;
52
52
  }
@@ -54,26 +54,26 @@ let n$3 = class n {
54
54
  return this.cssText;
55
55
  }
56
56
  };
57
- const r$6 = t => new n$3("string" == typeof t ? t : t + "", void 0, s$3),
58
- i$3 = (t, ...e) => {
57
+ const r$3 = t => new n$3("string" == typeof t ? t : t + "", void 0, s),
58
+ i$1 = (t, ...e) => {
59
59
  const o = 1 === t.length ? t[0] : e.reduce((e, s, o) => e + (t => {
60
60
  if (!0 === t._$cssResult$) return t.cssText;
61
61
  if ("number" == typeof t) return t;
62
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
63
  })(s) + t[o + 1], t[0]);
64
- return new n$3(o, t, s$3);
64
+ return new n$3(o, t, s);
65
65
  },
66
66
  S$1 = (s, o) => {
67
- if (e$3) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
67
+ if (e$1) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
68
68
  const o = document.createElement("style"),
69
- n = t$3.litNonce;
69
+ n = t.litNonce;
70
70
  void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
71
71
  }
72
72
  },
73
- c$3 = e$3 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
73
+ c$2 = e$1 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
74
74
  let e = "";
75
75
  for (const s of t.cssRules) e += s.cssText;
76
- return r$6(e);
76
+ return r$3(e);
77
77
  })(t) : t;
78
78
 
79
79
  /**
@@ -82,23 +82,23 @@ const r$6 = t => new n$3("string" == typeof t ? t : t + "", void 0, s$3),
82
82
  * SPDX-License-Identifier: BSD-3-Clause
83
83
  */
84
84
  const {
85
- is: i$2,
86
- defineProperty: e$2,
87
- getOwnPropertyDescriptor: r$5,
85
+ is: i,
86
+ defineProperty: e,
87
+ getOwnPropertyDescriptor: r$2,
88
88
  getOwnPropertyNames: h$2,
89
- getOwnPropertySymbols: o$2,
89
+ getOwnPropertySymbols: o$1,
90
90
  getPrototypeOf: n$2
91
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 = {
92
+ a = globalThis,
93
+ c$1 = a.trustedTypes,
94
+ l = c$1 ? c$1.emptyScript : "",
95
+ p = a.reactiveElementPolyfillSupport,
96
+ d = (t, s) => t,
97
+ u = {
98
98
  toAttribute(t, s) {
99
99
  switch (s) {
100
100
  case Boolean:
101
- t = t ? l$1 : null;
101
+ t = t ? l : null;
102
102
  break;
103
103
  case Object:
104
104
  case Array:
@@ -126,15 +126,15 @@ const {
126
126
  return i;
127
127
  }
128
128
  },
129
- f$1 = (t, s) => !i$2(t, s),
130
- y$1 = {
129
+ f$2 = (t, s) => !i(t, s),
130
+ y = {
131
131
  attribute: !0,
132
132
  type: String,
133
- converter: u$3,
133
+ converter: u,
134
134
  reflect: !1,
135
- hasChanged: f$1
135
+ hasChanged: f$2
136
136
  };
137
- Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= new WeakMap();
137
+ Symbol.metadata ??= Symbol("metadata"), a.litPropertyMetadata ??= new WeakMap();
138
138
  class b extends HTMLElement {
139
139
  static addInitializer(t) {
140
140
  this._$Ei(), (this.l ??= []).push(t);
@@ -142,18 +142,18 @@ class b extends HTMLElement {
142
142
  static get observedAttributes() {
143
143
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
144
144
  }
145
- static createProperty(t, s = y$1) {
145
+ static createProperty(t, s = y) {
146
146
  if (s.state && (s.attribute = !1), this._$Ei(), this.elementProperties.set(t, s), !s.noAccessor) {
147
147
  const i = Symbol(),
148
148
  r = this.getPropertyDescriptor(t, i, s);
149
- void 0 !== r && e$2(this.prototype, t, r);
149
+ void 0 !== r && e(this.prototype, t, r);
150
150
  }
151
151
  }
152
152
  static getPropertyDescriptor(t, s, i) {
153
153
  const {
154
154
  get: e,
155
155
  set: h
156
- } = r$5(this.prototype, t) ?? {
156
+ } = r$2(this.prototype, t) ?? {
157
157
  get() {
158
158
  return this[s];
159
159
  },
@@ -174,18 +174,18 @@ class b extends HTMLElement {
174
174
  };
175
175
  }
176
176
  static getPropertyOptions(t) {
177
- return this.elementProperties.get(t) ?? y$1;
177
+ return this.elementProperties.get(t) ?? y;
178
178
  }
179
179
  static _$Ei() {
180
- if (this.hasOwnProperty(d$1("elementProperties"))) return;
180
+ if (this.hasOwnProperty(d("elementProperties"))) return;
181
181
  const t = n$2(this);
182
182
  t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
183
183
  }
184
184
  static finalize() {
185
- if (this.hasOwnProperty(d$1("finalized"))) return;
186
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
185
+ if (this.hasOwnProperty(d("finalized"))) return;
186
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d("properties"))) {
187
187
  const t = this.properties,
188
- s = [...h$2(t), ...o$2(t)];
188
+ s = [...h$2(t), ...o$1(t)];
189
189
  for (const i of s) this.createProperty(i, t[i]);
190
190
  }
191
191
  const t = this[Symbol.metadata];
@@ -204,8 +204,8 @@ class b extends HTMLElement {
204
204
  const i = [];
205
205
  if (Array.isArray(s)) {
206
206
  const e = new Set(s.flat(1 / 0).reverse());
207
- for (const s of e) i.unshift(c$3(s));
208
- } else void 0 !== s && i.push(c$3(s));
207
+ for (const s of e) i.unshift(c$2(s));
208
+ } else void 0 !== s && i.push(c$2(s));
209
209
  return i;
210
210
  }
211
211
  static _$Eu(t, s) {
@@ -216,15 +216,15 @@ class b extends HTMLElement {
216
216
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
217
217
  }
218
218
  _$Ev() {
219
- this._$Eg = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$ES(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
219
+ this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
220
220
  }
221
221
  addController(t) {
222
- (this._$E_ ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
222
+ (this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
223
223
  }
224
224
  removeController(t) {
225
- this._$E_?.delete(t);
225
+ this._$EO?.delete(t);
226
226
  }
227
- _$ES() {
227
+ _$E_() {
228
228
  const t = new Map(),
229
229
  s = this.constructor.elementProperties;
230
230
  for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
@@ -235,20 +235,20 @@ class b extends HTMLElement {
235
235
  return S$1(t, this.constructor.elementStyles), t;
236
236
  }
237
237
  connectedCallback() {
238
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$E_?.forEach(t => t.hostConnected?.());
238
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(t => t.hostConnected?.());
239
239
  }
240
240
  enableUpdating(t) {}
241
241
  disconnectedCallback() {
242
- this._$E_?.forEach(t => t.hostDisconnected?.());
242
+ this._$EO?.forEach(t => t.hostDisconnected?.());
243
243
  }
244
244
  attributeChangedCallback(t, s, i) {
245
245
  this._$AK(t, i);
246
246
  }
247
- _$EO(t, s) {
247
+ _$EC(t, s) {
248
248
  const i = this.constructor.elementProperties.get(t),
249
249
  e = this.constructor._$Eu(t, i);
250
250
  if (void 0 !== e && !0 === i.reflect) {
251
- const r = (void 0 !== i.converter?.toAttribute ? i.converter : u$3).toAttribute(s, i.type);
251
+ const r = (void 0 !== i.converter?.toAttribute ? i.converter : u).toAttribute(s, i.type);
252
252
  this._$Em = t, null == r ? this.removeAttribute(e) : this.setAttribute(e, r), this._$Em = null;
253
253
  }
254
254
  }
@@ -259,24 +259,24 @@ class b extends HTMLElement {
259
259
  const t = i.getPropertyOptions(e),
260
260
  r = "function" == typeof t.converter ? {
261
261
  fromAttribute: t.converter
262
- } : void 0 !== t.converter?.fromAttribute ? t.converter : u$3;
262
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u;
263
263
  this._$Em = e, this[e] = r.fromAttribute(s, t.type), this._$Em = null;
264
264
  }
265
265
  }
266
- requestUpdate(t, s, i, e = !1, r) {
266
+ requestUpdate(t, s, i) {
267
267
  if (void 0 !== t) {
268
- if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(e ? r : this[t], s)) return;
269
- this.C(t, s, i);
268
+ if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$2)(this[t], s)) return;
269
+ this.P(t, s, i);
270
270
  }
271
- !1 === this.isUpdatePending && (this._$Eg = this._$EP());
271
+ !1 === this.isUpdatePending && (this._$ES = this._$ET());
272
272
  }
273
- C(t, s, i) {
273
+ P(t, s, i) {
274
274
  this._$AL.has(t) || this._$AL.set(t, s), !0 === i.reflect && this._$Em !== t && (this._$Ej ??= new Set()).add(t);
275
275
  }
276
- async _$EP() {
276
+ async _$ET() {
277
277
  this.isUpdatePending = !0;
278
278
  try {
279
- await this._$Eg;
279
+ await this._$ES;
280
280
  } catch (t) {
281
281
  Promise.reject(t);
282
282
  }
@@ -294,174 +294,174 @@ class b extends HTMLElement {
294
294
  this._$Ep = void 0;
295
295
  }
296
296
  const t = this.constructor.elementProperties;
297
- if (t.size > 0) for (const [s, i] of t) !0 !== i.wrapped || this._$AL.has(s) || void 0 === this[s] || this.C(s, this[s], i);
297
+ if (t.size > 0) for (const [s, i] of t) !0 !== i.wrapped || this._$AL.has(s) || void 0 === this[s] || this.P(s, this[s], i);
298
298
  }
299
299
  let t = !1;
300
300
  const s = this._$AL;
301
301
  try {
302
- t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$E_?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$ET();
302
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EU();
303
303
  } catch (s) {
304
- throw t = !1, this._$ET(), s;
304
+ throw t = !1, this._$EU(), s;
305
305
  }
306
306
  t && this._$AE(s);
307
307
  }
308
308
  willUpdate(t) {}
309
309
  _$AE(t) {
310
- this._$E_?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
310
+ this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
311
311
  }
312
- _$ET() {
312
+ _$EU() {
313
313
  this._$AL = new Map(), this.isUpdatePending = !1;
314
314
  }
315
315
  get updateComplete() {
316
316
  return this.getUpdateComplete();
317
317
  }
318
318
  getUpdateComplete() {
319
- return this._$Eg;
319
+ return this._$ES;
320
320
  }
321
321
  shouldUpdate(t) {
322
322
  return !0;
323
323
  }
324
324
  update(t) {
325
- this._$Ej &&= this._$Ej.forEach(t => this._$EO(t, this[t])), this._$ET();
325
+ this._$Ej &&= this._$Ej.forEach(t => this._$EC(t, this[t])), this._$EU();
326
326
  }
327
327
  updated(t) {}
328
328
  firstUpdated(t) {}
329
329
  }
330
330
  b.elementStyles = [], b.shadowRootOptions = {
331
331
  mode: "open"
332
- }, b[d$1("elementProperties")] = new Map(), b[d$1("finalized")] = new Map(), p$2?.({
332
+ }, b[d("elementProperties")] = new Map(), b[d("finalized")] = new Map(), p?.({
333
333
  ReactiveElement: b
334
- }), (a$1.reactiveElementVersions ??= []).push("2.0.2");
334
+ }), (a.reactiveElementVersions ??= []).push("2.0.4");
335
335
 
336
336
  /**
337
337
  * @license
338
338
  * Copyright 2017 Google LLC
339
339
  * SPDX-License-Identifier: BSD-3-Clause
340
340
  */
341
- const t$2 = globalThis,
342
- i$1 = t$2.trustedTypes,
343
- s$2 = i$1 ? i$1.createPolicy("lit-html", {
341
+ const n$1 = globalThis,
342
+ c = n$1.trustedTypes,
343
+ h$1 = c ? c.createPolicy("lit-html", {
344
344
  createHTML: t => t
345
345
  }) : void 0,
346
- e$1 = "$lit$",
347
- h$1 = `lit$${(Math.random() + "").slice(9)}$`,
348
- o$1 = "?" + h$1,
349
- n$1 = `<${o$1}>`,
350
- r$4 = document,
351
- l = () => r$4.createComment(""),
352
- c$1 = t => null === t || "object" != typeof t && "function" != typeof t,
353
- a = Array.isArray,
354
- u$2 = t => a(t) || "function" == typeof t?.[Symbol.iterator],
355
- d = "[ \t\n\f\r]",
356
- f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
357
- v$1 = /-->/g,
358
- _ = />/g,
359
- m$1 = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
360
- p$1 = /'/g,
361
- g = /"/g,
362
- $ = /^(?:script|style|textarea|title)$/i,
363
- y = t => (i, ...s) => ({
346
+ f$1 = "$lit$",
347
+ v = `lit$${Math.random().toFixed(9).slice(2)}$`,
348
+ m = "?" + v,
349
+ _ = `<${m}>`,
350
+ w = document,
351
+ lt = () => w.createComment(""),
352
+ st = t => null === t || "object" != typeof t && "function" != typeof t,
353
+ g = Array.isArray,
354
+ $ = t => g(t) || "function" == typeof t?.[Symbol.iterator],
355
+ x = "[ \t\n\f\r]",
356
+ T = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
357
+ E = /-->/g,
358
+ k = />/g,
359
+ O = RegExp(`>|${x}(?:([^\\s"'>=/]+)(${x}*=${x}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
360
+ S = /'/g,
361
+ j = /"/g,
362
+ M = /^(?:script|style|textarea|title)$/i,
363
+ P = t => (i, ...s) => ({
364
364
  _$litType$: t,
365
365
  strings: i,
366
366
  values: s
367
367
  }),
368
- x = y(1),
369
- w = Symbol.for("lit-noChange"),
370
- T = Symbol.for("lit-nothing"),
371
- A = new WeakMap(),
372
- E = r$4.createTreeWalker(r$4, 129);
373
- function C(t, i) {
374
- if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
375
- return void 0 !== s$2 ? s$2.createHTML(i) : i;
368
+ ke = P(1),
369
+ R = Symbol.for("lit-noChange"),
370
+ D = Symbol.for("lit-nothing"),
371
+ V = new WeakMap(),
372
+ I = w.createTreeWalker(w, 129);
373
+ function N(t, i) {
374
+ if (!g(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
375
+ return void 0 !== h$1 ? h$1.createHTML(i) : i;
376
376
  }
377
- const P = (t, i) => {
377
+ const U = (t, i) => {
378
378
  const s = t.length - 1,
379
- o = [];
380
- let r,
381
- l = 2 === i ? "<svg>" : "",
382
- c = f;
379
+ e = [];
380
+ let h,
381
+ o = 2 === i ? "<svg>" : 3 === i ? "<math>" : "",
382
+ n = T;
383
383
  for (let i = 0; i < s; i++) {
384
384
  const s = t[i];
385
- let a,
386
- u,
387
- d = -1,
388
- y = 0;
389
- 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);
390
- const x = c === m$1 && t[i + 1].startsWith("/>") ? " " : "";
391
- l += c === f ? s + n$1 : d >= 0 ? (o.push(a), s.slice(0, d) + e$1 + s.slice(d) + h$1 + x) : s + h$1 + (-2 === d ? i : x);
392
- }
393
- return [C(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : "")), o];
385
+ let r,
386
+ l,
387
+ c = -1,
388
+ a = 0;
389
+ for (; a < s.length && (n.lastIndex = a, l = n.exec(s), null !== l);) a = n.lastIndex, n === T ? "!--" === l[1] ? n = E : void 0 !== l[1] ? n = k : void 0 !== l[2] ? (M.test(l[2]) && (h = RegExp("</" + l[2], "g")), n = O) : void 0 !== l[3] && (n = O) : n === O ? ">" === l[0] ? (n = h ?? T, c = -1) : void 0 === l[1] ? c = -2 : (c = n.lastIndex - l[2].length, r = l[1], n = void 0 === l[3] ? O : '"' === l[3] ? j : S) : n === j || n === S ? n = O : n === E || n === k ? n = T : (n = O, h = void 0);
390
+ const u = n === O && t[i + 1].startsWith("/>") ? " " : "";
391
+ o += n === T ? s + _ : c >= 0 ? (e.push(r), s.slice(0, c) + f$1 + s.slice(c) + v + u) : s + v + (-2 === c ? i : u);
392
+ }
393
+ return [N(t, o + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")), e];
394
394
  };
395
- class V {
395
+ class B {
396
396
  constructor({
397
397
  strings: t,
398
- _$litType$: s
399
- }, n) {
400
- let r;
398
+ _$litType$: i
399
+ }, s) {
400
+ let e;
401
401
  this.parts = [];
402
- let c = 0,
403
- a = 0;
404
- const u = t.length - 1,
405
- d = this.parts,
406
- [f, v] = P(t, s);
407
- if (this.el = V.createElement(f, n), E.currentNode = this.el.content, 2 === s) {
402
+ let h = 0,
403
+ o = 0;
404
+ const n = t.length - 1,
405
+ r = this.parts,
406
+ [l, a] = U(t, i);
407
+ if (this.el = B.createElement(l, s), I.currentNode = this.el.content, 2 === i || 3 === i) {
408
408
  const t = this.el.content.firstChild;
409
409
  t.replaceWith(...t.childNodes);
410
410
  }
411
- for (; null !== (r = E.nextNode()) && d.length < u;) {
412
- if (1 === r.nodeType) {
413
- if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(e$1)) {
414
- const i = v[a++],
415
- s = r.getAttribute(t).split(h$1),
416
- e = /([.?@])?(.*)/.exec(i);
417
- d.push({
411
+ for (; null !== (e = I.nextNode()) && r.length < n;) {
412
+ if (1 === e.nodeType) {
413
+ if (e.hasAttributes()) for (const t of e.getAttributeNames()) if (t.endsWith(f$1)) {
414
+ const i = a[o++],
415
+ s = e.getAttribute(t).split(v),
416
+ n = /([.?@])?(.*)/.exec(i);
417
+ r.push({
418
418
  type: 1,
419
- index: c,
420
- name: e[2],
419
+ index: h,
420
+ name: n[2],
421
421
  strings: s,
422
- ctor: "." === e[1] ? k : "?" === e[1] ? H : "@" === e[1] ? I : R
423
- }), r.removeAttribute(t);
424
- } else t.startsWith(h$1) && (d.push({
422
+ ctor: "." === n[1] ? Y : "?" === n[1] ? Z : "@" === n[1] ? q : G
423
+ }), e.removeAttribute(t);
424
+ } else t.startsWith(v) && (r.push({
425
425
  type: 6,
426
- index: c
427
- }), r.removeAttribute(t));
428
- if ($.test(r.tagName)) {
429
- const t = r.textContent.split(h$1),
430
- s = t.length - 1;
431
- if (s > 0) {
432
- r.textContent = i$1 ? i$1.emptyScript : "";
433
- for (let i = 0; i < s; i++) r.append(t[i], l()), E.nextNode(), d.push({
426
+ index: h
427
+ }), e.removeAttribute(t));
428
+ if (M.test(e.tagName)) {
429
+ const t = e.textContent.split(v),
430
+ i = t.length - 1;
431
+ if (i > 0) {
432
+ e.textContent = c ? c.emptyScript : "";
433
+ for (let s = 0; s < i; s++) e.append(t[s], lt()), I.nextNode(), r.push({
434
434
  type: 2,
435
- index: ++c
435
+ index: ++h
436
436
  });
437
- r.append(t[s], l());
437
+ e.append(t[i], lt());
438
438
  }
439
439
  }
440
- } else if (8 === r.nodeType) if (r.data === o$1) d.push({
440
+ } else if (8 === e.nodeType) if (e.data === m) r.push({
441
441
  type: 2,
442
- index: c
442
+ index: h
443
443
  });else {
444
444
  let t = -1;
445
- for (; -1 !== (t = r.data.indexOf(h$1, t + 1));) d.push({
445
+ for (; -1 !== (t = e.data.indexOf(v, t + 1));) r.push({
446
446
  type: 7,
447
- index: c
448
- }), t += h$1.length - 1;
447
+ index: h
448
+ }), t += v.length - 1;
449
449
  }
450
- c++;
450
+ h++;
451
451
  }
452
452
  }
453
453
  static createElement(t, i) {
454
- const s = r$4.createElement("template");
454
+ const s = w.createElement("template");
455
455
  return s.innerHTML = t, s;
456
456
  }
457
457
  }
458
- function N(t, i, s = t, e) {
459
- if (i === w) return i;
460
- let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
461
- const o = c$1(i) ? void 0 : i._$litDirective$;
462
- 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 = N(t, h._$AS(t, i.values), h, e)), i;
458
+ function z(t, i, s = t, e) {
459
+ if (i === R) return i;
460
+ let h = void 0 !== e ? s.o?.[e] : s.l;
461
+ const o = st(i) ? void 0 : i._$litDirective$;
462
+ 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.o ??= [])[e] = h : s.l = h), void 0 !== h && (i = z(t, h._$AS(t, i.values), h, e)), i;
463
463
  }
464
- class S {
464
+ class F {
465
465
  constructor(t, i) {
466
466
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
467
467
  }
@@ -478,32 +478,32 @@ class S {
478
478
  },
479
479
  parts: s
480
480
  } = this._$AD,
481
- e = (t?.creationScope ?? r$4).importNode(i, !0);
482
- E.currentNode = e;
483
- let h = E.nextNode(),
481
+ e = (t?.creationScope ?? w).importNode(i, !0);
482
+ I.currentNode = e;
483
+ let h = I.nextNode(),
484
484
  o = 0,
485
485
  n = 0,
486
- l = s[0];
487
- for (; void 0 !== l;) {
488
- if (o === l.index) {
486
+ r = s[0];
487
+ for (; void 0 !== r;) {
488
+ if (o === r.index) {
489
489
  let i;
490
- 2 === l.type ? i = new M(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new L(h, this, t)), this._$AV.push(i), l = s[++n];
490
+ 2 === r.type ? i = new et(h, h.nextSibling, this, t) : 1 === r.type ? i = new r.ctor(h, r.name, r.strings, this, t) : 6 === r.type && (i = new K(h, this, t)), this._$AV.push(i), r = s[++n];
491
491
  }
492
- o !== l?.index && (h = E.nextNode(), o++);
492
+ o !== r?.index && (h = I.nextNode(), o++);
493
493
  }
494
- return E.currentNode = r$4, e;
494
+ return I.currentNode = w, e;
495
495
  }
496
496
  p(t) {
497
497
  let i = 0;
498
498
  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++;
499
499
  }
500
500
  }
501
- class M {
501
+ class et {
502
502
  get _$AU() {
503
- return this._$AM?._$AU ?? this._$Cv;
503
+ return this._$AM?._$AU ?? this.v;
504
504
  }
505
505
  constructor(t, i, s, e) {
506
- this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? !0;
506
+ this.type = 2, this._$AH = D, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this.v = e?.isConnected ?? !0;
507
507
  }
508
508
  get parentNode() {
509
509
  let t = this._$AA.parentNode;
@@ -517,39 +517,39 @@ class M {
517
517
  return this._$AB;
518
518
  }
519
519
  _$AI(t, i = this) {
520
- t = N(this, t, i), c$1(t) ? t === T || null == t || "" === t ? (this._$AH !== T && this._$AR(), this._$AH = T) : t !== this._$AH && t !== w && this._(t) : void 0 !== t._$litType$ ? this.g(t) : void 0 !== t.nodeType ? this.$(t) : u$2(t) ? this.T(t) : this._(t);
520
+ t = z(this, t, i), st(t) ? t === D || null == t || "" === t ? (this._$AH !== D && this._$AR(), this._$AH = D) : t !== this._$AH && t !== R && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : $(t) ? this.k(t) : this._(t);
521
521
  }
522
- k(t) {
522
+ O(t) {
523
523
  return this._$AA.parentNode.insertBefore(t, this._$AB);
524
524
  }
525
- $(t) {
526
- this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
525
+ T(t) {
526
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
527
527
  }
528
528
  _(t) {
529
- this._$AH !== T && c$1(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r$4.createTextNode(t)), this._$AH = t;
529
+ this._$AH !== D && st(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
530
530
  }
531
- g(t) {
531
+ $(t) {
532
532
  const {
533
533
  values: i,
534
534
  _$litType$: s
535
535
  } = t,
536
- e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = V.createElement(C(s.h, s.h[0]), this.options)), s);
536
+ e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = B.createElement(N(s.h, s.h[0]), this.options)), s);
537
537
  if (this._$AH?._$AD === e) this._$AH.p(i);else {
538
- const t = new S(e, this),
538
+ const t = new F(e, this),
539
539
  s = t.u(this.options);
540
- t.p(i), this.$(s), this._$AH = t;
540
+ t.p(i), this.T(s), this._$AH = t;
541
541
  }
542
542
  }
543
543
  _$AC(t) {
544
- let i = A.get(t.strings);
545
- return void 0 === i && A.set(t.strings, i = new V(t)), i;
544
+ let i = V.get(t.strings);
545
+ return void 0 === i && V.set(t.strings, i = new B(t)), i;
546
546
  }
547
- T(t) {
548
- a(this._$AH) || (this._$AH = [], this._$AR());
547
+ k(t) {
548
+ g(this._$AH) || (this._$AH = [], this._$AR());
549
549
  const i = this._$AH;
550
550
  let s,
551
551
  e = 0;
552
- for (const h of t) e === i.length ? i.push(s = new M(this.k(l()), this.k(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
552
+ for (const h of t) e === i.length ? i.push(s = new et(this.O(lt()), this.O(lt()), this, this.options)) : s = i[e], s._$AI(h), e++;
553
553
  e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
554
554
  }
555
555
  _$AR(t = this._$AA.nextSibling, i) {
@@ -559,10 +559,10 @@ class M {
559
559
  }
560
560
  }
561
561
  setConnected(t) {
562
- void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
562
+ void 0 === this._$AM && (this.v = t, this._$AP?.(t));
563
563
  }
564
564
  }
565
- class R {
565
+ class G {
566
566
  get tagName() {
567
567
  return this.element.tagName;
568
568
  }
@@ -570,54 +570,54 @@ class R {
570
570
  return this._$AM._$AU;
571
571
  }
572
572
  constructor(t, i, s, e, h) {
573
- this.type = 1, this._$AH = T, 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 = T;
573
+ this.type = 1, this._$AH = D, 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 = D;
574
574
  }
575
575
  _$AI(t, i = this, s, e) {
576
576
  const h = this.strings;
577
577
  let o = !1;
578
- if (void 0 === h) t = N(this, t, i, 0), o = !c$1(t) || t !== this._$AH && t !== w, o && (this._$AH = t);else {
578
+ if (void 0 === h) t = z(this, t, i, 0), o = !st(t) || t !== this._$AH && t !== R, o && (this._$AH = t);else {
579
579
  const e = t;
580
580
  let n, r;
581
- for (t = h[0], n = 0; n < h.length - 1; n++) r = N(this, e[s + n], i, n), r === w && (r = this._$AH[n]), o ||= !c$1(r) || r !== this._$AH[n], r === T ? t = T : t !== T && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
581
+ for (t = h[0], n = 0; n < h.length - 1; n++) r = z(this, e[s + n], i, n), r === R && (r = this._$AH[n]), o ||= !st(r) || r !== this._$AH[n], r === D ? t = D : t !== D && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
582
582
  }
583
- o && !e && this.O(t);
583
+ o && !e && this.j(t);
584
584
  }
585
- O(t) {
586
- t === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
585
+ j(t) {
586
+ t === D ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
587
587
  }
588
588
  }
589
- class k extends R {
589
+ class Y extends G {
590
590
  constructor() {
591
591
  super(...arguments), this.type = 3;
592
592
  }
593
- O(t) {
594
- this.element[this.name] = t === T ? void 0 : t;
593
+ j(t) {
594
+ this.element[this.name] = t === D ? void 0 : t;
595
595
  }
596
596
  }
597
- class H extends R {
597
+ class Z extends G {
598
598
  constructor() {
599
599
  super(...arguments), this.type = 4;
600
600
  }
601
- O(t) {
602
- this.element.toggleAttribute(this.name, !!t && t !== T);
601
+ j(t) {
602
+ this.element.toggleAttribute(this.name, !!t && t !== D);
603
603
  }
604
604
  }
605
- class I extends R {
605
+ class q extends G {
606
606
  constructor(t, i, s, e, h) {
607
607
  super(t, i, s, e, h), this.type = 5;
608
608
  }
609
609
  _$AI(t, i = this) {
610
- if ((t = N(this, t, i, 0) ?? T) === w) return;
610
+ if ((t = z(this, t, i, 0) ?? D) === R) return;
611
611
  const s = this._$AH,
612
- e = t === T && s !== T || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
613
- h = t !== T && (s === T || e);
612
+ e = t === D && s !== D || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
613
+ h = t !== D && (s === D || e);
614
614
  e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
615
615
  }
616
616
  handleEvent(t) {
617
617
  "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
618
618
  }
619
619
  }
620
- class L {
620
+ class K {
621
621
  constructor(t, i, s) {
622
622
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
623
623
  }
@@ -625,33 +625,17 @@ class L {
625
625
  return this._$AM._$AU;
626
626
  }
627
627
  _$AI(t) {
628
- N(this, t);
628
+ z(this, t);
629
629
  }
630
630
  }
631
- const z = {
632
- j: e$1,
633
- P: h$1,
634
- A: o$1,
635
- C: 1,
636
- M: P,
637
- L: S,
638
- R: u$2,
639
- V: N,
640
- D: M,
641
- I: R,
642
- H,
643
- N: I,
644
- U: k,
645
- B: L
646
- },
647
- Z = t$2.litHtmlPolyfillSupport;
648
- Z?.(V, M), (t$2.litHtmlVersions ??= []).push("3.1.0");
649
- const j = (t, i, s) => {
631
+ const Re = n$1.litHtmlPolyfillSupport;
632
+ Re?.(B, et), (n$1.litHtmlVersions ??= []).push("3.2.0");
633
+ const Q = (t, i, s) => {
650
634
  const e = s?.renderBefore ?? i;
651
635
  let h = e._$litPart$;
652
636
  if (void 0 === h) {
653
637
  const t = s?.renderBefore ?? null;
654
- e._$litPart$ = h = new M(i.insertBefore(l(), t), t, void 0, s ?? {});
638
+ e._$litPart$ = h = new et(i.insertBefore(lt(), t), t, void 0, s ?? {});
655
639
  }
656
640
  return h._$AI(t), h;
657
641
  };
@@ -661,186 +645,38 @@ const j = (t, i, s) => {
661
645
  * Copyright 2017 Google LLC
662
646
  * SPDX-License-Identifier: BSD-3-Clause
663
647
  */
664
- let s$1 = class s extends b {
648
+ class h extends b {
665
649
  constructor() {
666
650
  super(...arguments), this.renderOptions = {
667
651
  host: this
668
- }, this._$Do = void 0;
652
+ }, this.o = void 0;
669
653
  }
670
654
  createRenderRoot() {
671
655
  const t = super.createRenderRoot();
672
656
  return this.renderOptions.renderBefore ??= t.firstChild, t;
673
657
  }
674
658
  update(t) {
675
- const i = this.render();
676
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = j(i, this.renderRoot, this.renderOptions);
659
+ const e = this.render();
660
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this.o = Q(e, this.renderRoot, this.renderOptions);
677
661
  }
678
662
  connectedCallback() {
679
- super.connectedCallback(), this._$Do?.setConnected(!0);
663
+ super.connectedCallback(), this.o?.setConnected(!0);
680
664
  }
681
665
  disconnectedCallback() {
682
- super.disconnectedCallback(), this._$Do?.setConnected(!1);
666
+ super.disconnectedCallback(), this.o?.setConnected(!1);
683
667
  }
684
668
  render() {
685
- return w;
669
+ return R;
686
670
  }
687
- };
688
- s$1._$litElement$ = !0, s$1[("finalized")] = !0, globalThis.litElementHydrateSupport?.({
689
- LitElement: s$1
671
+ }
672
+ h._$litElement$ = !0, h["finalized"] = !0, globalThis.litElementHydrateSupport?.({
673
+ LitElement: h
690
674
  });
691
- const r$3 = globalThis.litElementPolyfillSupport;
692
- r$3?.({
693
- LitElement: s$1
675
+ const f = globalThis.litElementPolyfillSupport;
676
+ f?.({
677
+ LitElement: h
694
678
  });
695
- (globalThis.litElementVersions ??= []).push("4.0.2");
696
-
697
- /**
698
- * @license
699
- * Copyright 2017 Google LLC
700
- * SPDX-License-Identifier: BSD-3-Clause
701
- */
702
- const t$1 = {
703
- ATTRIBUTE: 1,
704
- CHILD: 2,
705
- PROPERTY: 3,
706
- BOOLEAN_ATTRIBUTE: 4,
707
- EVENT: 5,
708
- ELEMENT: 6
709
- },
710
- e = t => (...e) => ({
711
- _$litDirective$: t,
712
- values: e
713
- });
714
- class i {
715
- constructor(t) {}
716
- get _$AU() {
717
- return this._$AM._$AU;
718
- }
719
- _$AT(t, e, i) {
720
- this._$Ct = t, this._$AM = e, this._$Ci = i;
721
- }
722
- _$AS(t, e) {
723
- return this.update(t, e);
724
- }
725
- update(t, e) {
726
- return this.render(...e);
727
- }
728
- }
729
-
730
- /**
731
- * @license
732
- * Copyright 2020 Google LLC
733
- * SPDX-License-Identifier: BSD-3-Clause
734
- */
735
- const {
736
- D: t
737
- } = z,
738
- s = () => document.createComment(""),
739
- r$2 = (o, i, n) => {
740
- const e = o._$AA.parentNode,
741
- l = void 0 === i ? o._$AB : i._$AA;
742
- if (void 0 === n) {
743
- const i = e.insertBefore(s(), l),
744
- c = e.insertBefore(s(), l);
745
- n = new t(i, c, o, o.options);
746
- } else {
747
- const t = n._$AB.nextSibling,
748
- i = n._$AM,
749
- c = i !== o;
750
- if (c) {
751
- let t;
752
- n._$AQ?.(o), n._$AM = o, void 0 !== n._$AP && (t = o._$AU) !== i._$AU && n._$AP(t);
753
- }
754
- if (t !== l || c) {
755
- let o = n._$AA;
756
- for (; o !== t;) {
757
- const t = o.nextSibling;
758
- e.insertBefore(o, l), o = t;
759
- }
760
- }
761
- }
762
- return n;
763
- },
764
- v = (o, t, i = o) => (o._$AI(t, i), o),
765
- u$1 = {},
766
- m = (o, t = u$1) => o._$AH = t,
767
- p = o => o._$AH,
768
- h = o => {
769
- o._$AP?.(!1, !0);
770
- let t = o._$AA;
771
- const i = o._$AB.nextSibling;
772
- for (; t !== i;) {
773
- const o = t.nextSibling;
774
- t.remove(), t = o;
775
- }
776
- };
777
-
778
- /**
779
- * @license
780
- * Copyright 2017 Google LLC
781
- * SPDX-License-Identifier: BSD-3-Clause
782
- */
783
- const u = (e, s, t) => {
784
- const r = new Map();
785
- for (let l = s; l <= t; l++) r.set(e[l], l);
786
- return r;
787
- },
788
- c = e(class extends i {
789
- constructor(e) {
790
- if (super(e), e.type !== t$1.CHILD) throw Error("repeat() can only be used in text expressions");
791
- }
792
- ht(e, s, t) {
793
- let r;
794
- void 0 === t ? t = s : void 0 !== s && (r = s);
795
- const l = [],
796
- o = [];
797
- let i = 0;
798
- for (const s of e) l[i] = r ? r(s, i) : i, o[i] = t(s, i), i++;
799
- return {
800
- values: o,
801
- keys: l
802
- };
803
- }
804
- render(e, s, t) {
805
- return this.ht(e, s, t).values;
806
- }
807
- update(s, [t, r, c]) {
808
- const d = p(s),
809
- {
810
- values: p$1,
811
- keys: a
812
- } = this.ht(t, r, c);
813
- if (!Array.isArray(d)) return this.dt = a, p$1;
814
- const h$1 = this.dt ??= [],
815
- v$1 = [];
816
- let m$1,
817
- y,
818
- x = 0,
819
- j = d.length - 1,
820
- k = 0,
821
- w$1 = p$1.length - 1;
822
- for (; x <= j && k <= w$1;) if (null === d[x]) x++;else if (null === d[j]) j--;else if (h$1[x] === a[k]) v$1[k] = v(d[x], p$1[k]), x++, k++;else if (h$1[j] === a[w$1]) v$1[w$1] = v(d[j], p$1[w$1]), j--, w$1--;else if (h$1[x] === a[w$1]) v$1[w$1] = v(d[x], p$1[w$1]), r$2(s, v$1[w$1 + 1], d[x]), x++, w$1--;else if (h$1[j] === a[k]) v$1[k] = v(d[j], p$1[k]), r$2(s, d[x], d[j]), j--, k++;else if (void 0 === m$1 && (m$1 = u(a, k, w$1), y = u(h$1, x, j)), m$1.has(h$1[x])) {
823
- if (m$1.has(h$1[j])) {
824
- const e = y.get(a[k]),
825
- t = void 0 !== e ? d[e] : null;
826
- if (null === t) {
827
- const e = r$2(s, d[x]);
828
- v(e, p$1[k]), v$1[k] = e;
829
- } else v$1[k] = v(t, p$1[k]), r$2(s, d[x], t), d[e] = null;
830
- k++;
831
- } else h(d[j]), j--;
832
- } else h(d[x]), x++;
833
- for (; k <= w$1;) {
834
- const e = r$2(s, v$1[w$1 + 1]);
835
- v(e, p$1[k]), v$1[k++] = e;
836
- }
837
- for (; x <= j;) {
838
- const e = d[x++];
839
- null !== e && h(e);
840
- }
841
- return this.dt = a, m(s, v$1), w;
842
- }
843
- });
679
+ (globalThis.litElementVersions ??= []).push("4.1.0");
844
680
 
845
681
  /**
846
682
  * @license
@@ -850,9 +686,9 @@ const u = (e, s, t) => {
850
686
  const o = {
851
687
  attribute: !0,
852
688
  type: String,
853
- converter: u$3,
689
+ converter: u,
854
690
  reflect: !1,
855
- hasChanged: f$1
691
+ hasChanged: f$2
856
692
  },
857
693
  r$1 = (t = o, e, r) => {
858
694
  const {
@@ -870,7 +706,7 @@ const o = {
870
706
  e.set.call(this, r), this.requestUpdate(o, n, t);
871
707
  },
872
708
  init(e) {
873
- return void 0 !== e && this.C(o, void 0, t), e;
709
+ return void 0 !== e && this.P(o, void 0, t), e;
874
710
  }
875
711
  };
876
712
  }
@@ -908,7 +744,7 @@ function r(r) {
908
744
  });
909
745
  }
910
746
 
911
- class WidgetGauge extends s$1 {
747
+ class WidgetGauge extends h {
912
748
  constructor() {
913
749
  super();
914
750
  this.dataSets = [];
@@ -916,7 +752,7 @@ class WidgetGauge extends s$1 {
916
752
  this.origWidth = 0;
917
753
  this.origHeight = 0;
918
754
  this.modifier = 1;
919
- this.version = '1.5.34';
755
+ this.version = '1.6.3';
920
756
  this.resizeObserver = new ResizeObserver(this.adjustSizes.bind(this));
921
757
  this.template = {
922
758
  title: {
@@ -1003,9 +839,15 @@ class WidgetGauge extends s$1 {
1003
839
  ]
1004
840
  };
1005
841
  }
842
+ disconnectedCallback() {
843
+ super.disconnectedCallback();
844
+ if (this.resizeObserver) {
845
+ this.resizeObserver.disconnect();
846
+ }
847
+ }
1006
848
  update(changedProperties) {
1007
849
  changedProperties.forEach((oldValue, propName) => {
1008
- if (propName === 'inputData') {
850
+ if (propName === 'inputData' && this.gaugeContainer) {
1009
851
  this.transformData();
1010
852
  this.adjustSizes();
1011
853
  }
@@ -1013,8 +855,10 @@ class WidgetGauge extends s$1 {
1013
855
  super.update(changedProperties);
1014
856
  }
1015
857
  firstUpdated(_changedProperties) {
1016
- var _a;
858
+ var _a, _b;
1017
859
  this.resizeObserver.observe((_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.wrapper'));
860
+ this.gaugeContainer = (_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.gauge-container');
861
+ console.log('First Updated', this.gaugeContainer);
1018
862
  this.sizingSetup();
1019
863
  this.transformData();
1020
864
  this.adjustSizes();
@@ -1033,13 +877,12 @@ class WidgetGauge extends s$1 {
1033
877
  console.log('OrigWidth', this.origWidth, this.origHeight);
1034
878
  }
1035
879
  adjustSizes() {
1036
- var _a, _b, _c, _d;
880
+ var _a, _b, _c;
1037
881
  // if (!this.origHeight) return
1038
- const container = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.gauge-container');
1039
- if (!container)
882
+ if (!this.gaugeContainer)
1040
883
  return;
1041
- const userWidth = container.getBoundingClientRect().width;
1042
- const userHeight = container.getBoundingClientRect().height;
884
+ const userWidth = this.gaugeContainer.getBoundingClientRect().width;
885
+ const userHeight = this.gaugeContainer.getBoundingClientRect().height;
1043
886
  const count = this.dataSets.length;
1044
887
  const width = this.origWidth;
1045
888
  const height = this.origHeight;
@@ -1066,7 +909,7 @@ class WidgetGauge extends s$1 {
1066
909
  }
1067
910
  const maxSize = fits.reduce((p, c) => (c.size < p ? p : c.size), 0);
1068
911
  const fit = fits.find((f) => f.size === maxSize);
1069
- const modifier = (_b = fit === null || fit === void 0 ? void 0 : fit.m) !== null && _b !== void 0 ? _b : 0;
912
+ const modifier = (_a = fit === null || fit === void 0 ? void 0 : fit.m) !== null && _a !== void 0 ? _a : 0;
1070
913
  // console.log(
1071
914
  // 'FITS count',
1072
915
  // userWidth,
@@ -1079,8 +922,8 @@ class WidgetGauge extends s$1 {
1079
922
  // (userWidth * userHeight).toFixed(0),
1080
923
  // this.boxes
1081
924
  // )
1082
- this.boxes = Array.from((_c = this === null || this === void 0 ? void 0 : this.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelectorAll('.chart'));
1083
- (_d = this.boxes) === null || _d === void 0 ? void 0 : _d.forEach((box) => box.setAttribute('style', `width:${modifier * width}px; height:${modifier * height}px`));
925
+ this.boxes = Array.from((_b = this === null || this === void 0 ? void 0 : this.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelectorAll('.chart'));
926
+ (_c = this.boxes) === null || _c === void 0 ? void 0 : _c.forEach((box) => box.setAttribute('style', `width:${modifier * width}px; height:${modifier * height}px`));
1084
927
  this.modifier = modifier;
1085
928
  for (const canvas in this.canvasList) {
1086
929
  this.canvasList[canvas].resize();
@@ -1102,21 +945,21 @@ class WidgetGauge extends s$1 {
1102
945
  const pds = {
1103
946
  label: prefix + `${(_a = ds.label) !== null && _a !== void 0 ? _a : ''}`,
1104
947
  unit: ds.unit,
1105
- averageLatest: ds.averageLatest,
948
+ advanced: ds.advanced,
1106
949
  valueColor: ds.valueColor,
1107
950
  sections: ds.sections,
1108
- backgroundColors: ds.backgroundColors,
1109
951
  data: distincts.length === 1 ? ds.data : (_b = ds === null || ds === void 0 ? void 0 : ds.data) === null || _b === void 0 ? void 0 : _b.filter((d) => d.pivot === piv)
1110
952
  };
1111
953
  this.dataSets.push(pds);
1112
954
  });
1113
955
  });
1114
- // console.log('Gauge Datasets', this.dataSets)
956
+ this.setupCharts();
957
+ console.log('Gauge Datasets', this.dataSets);
1115
958
  }
1116
959
  applyData() {
1117
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
960
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26;
961
+ console.log('Apply Data', this.dataSets.map((d) => d.label));
1118
962
  const modifier = this.modifier;
1119
- this.setupCharts();
1120
963
  this.dataSets.forEach((d) => {
1121
964
  var _a;
1122
965
  (_a = d.label) !== null && _a !== void 0 ? _a : (d.label = '');
@@ -1126,16 +969,19 @@ class WidgetGauge extends s$1 {
1126
969
  for (const ds of this.dataSets) {
1127
970
  // compute derivative values
1128
971
  // filter latest values and calculate average
1129
- if (typeof ds.averageLatest !== 'number' || !isNaN(ds.averageLatest))
1130
- ds.averageLatest = 1;
1131
- const data = (_c = (_a = ds === null || ds === void 0 ? void 0 : ds.data) === null || _a === void 0 ? void 0 : _a.slice(0, (_b = ds.averageLatest) !== null && _b !== void 0 ? _b : 1)) !== null && _c !== void 0 ? _c : [];
1132
- const values = ((_e = (_d = data === null || data === void 0 ? void 0 : data.map((d) => d.value)) === null || _d === void 0 ? void 0 : _d.filter((p) => p !== undefined)) !== null && _e !== void 0 ? _e : []);
972
+ (_a = ds.advanced) !== null && _a !== void 0 ? _a : (ds.advanced = {});
973
+ if (typeof ((_b = ds.advanced) === null || _b === void 0 ? void 0 : _b.averageLatest) !== 'number' || isNaN((_c = ds.advanced) === null || _c === void 0 ? void 0 : _c.averageLatest))
974
+ ds.advanced.averageLatest = 1;
975
+ const data = (_f = (_d = ds === null || ds === void 0 ? void 0 : ds.data) === null || _d === void 0 ? void 0 : _d.slice(0, ((_e = ds.advanced) === null || _e === void 0 ? void 0 : _e.averageLatest) || 1)) !== null && _f !== void 0 ? _f : [];
976
+ const values = ((_h = (_g = data === null || data === void 0 ? void 0 : data.map((d) => d.value)) === null || _g === void 0 ? void 0 : _g.filter((p) => p !== undefined)) !== null && _h !== void 0 ? _h : []);
1133
977
  const average = values.reduce((p, c) => p + c, 0) / values.length;
1134
- ds.needleValue = isNaN(average) ? (_f = ds.sections) === null || _f === void 0 ? void 0 : _f[0] : average;
1135
- ds.range = ((_j = (_g = ds.sections) === null || _g === void 0 ? void 0 : _g[((_h = ds.sections) === null || _h === void 0 ? void 0 : _h.length) - 1]) !== null && _j !== void 0 ? _j : 100) - ((_l = (_k = ds.sections) === null || _k === void 0 ? void 0 : _k[0]) !== null && _l !== void 0 ? _l : 0);
978
+ ds.needleValue = isNaN(average) ? (_k = (_j = ds.sections) === null || _j === void 0 ? void 0 : _j.sectionLimits) === null || _k === void 0 ? void 0 : _k[0] : average;
979
+ ds.range =
980
+ ((_q = (_m = (_l = ds.sections) === null || _l === void 0 ? void 0 : _l.sectionLimits) === null || _m === void 0 ? void 0 : _m[((_p = (_o = ds.sections) === null || _o === void 0 ? void 0 : _o.sectionLimits) === null || _p === void 0 ? void 0 : _p.length) - 1]) !== null && _q !== void 0 ? _q : 100) -
981
+ ((_t = (_s = (_r = ds.sections) === null || _r === void 0 ? void 0 : _r.sectionLimits) === null || _s === void 0 ? void 0 : _s[0]) !== null && _t !== void 0 ? _t : 0);
1136
982
  if (isNaN(ds.range))
1137
983
  ds.range = 100;
1138
- ds.ranges = (_o = (_m = ds.sections) === null || _m === void 0 ? void 0 : _m.map((v, i, a) => { var _a; return v - ((_a = a === null || a === void 0 ? void 0 : a[i - 1]) !== null && _a !== void 0 ? _a : 0); }).slice(1)) !== null && _o !== void 0 ? _o : [];
984
+ ds.ranges = (_w = (_v = (_u = ds.sections) === null || _u === void 0 ? void 0 : _u.sectionLimits) === null || _v === void 0 ? void 0 : _v.map((v, i, a) => { var _a; return v - ((_a = a === null || a === void 0 ? void 0 : a[i - 1]) !== null && _a !== void 0 ? _a : 0); }).slice(1)) !== null && _w !== void 0 ? _w : [];
1139
985
  // const option = this.canvasList[ds.label].getOption()
1140
986
  const option = structuredClone(this.template);
1141
987
  const ga = option.series[0], ga2 = option.series[1];
@@ -1144,27 +990,33 @@ class WidgetGauge extends s$1 {
1144
990
  option.title.textStyle.fontSize = 32 * modifier;
1145
991
  // Needle
1146
992
  // Check age of data Latency
1147
- const tsp = Date.parse((_r = (_q = (_p = ds === null || ds === void 0 ? void 0 : ds.data) === null || _p === void 0 ? void 0 : _p[0]) === null || _q === void 0 ? void 0 : _q.tsp) !== null && _r !== void 0 ? _r : '');
993
+ const tsp = Date.parse((_z = (_y = (_x = ds === null || ds === void 0 ? void 0 : ds.data) === null || _x === void 0 ? void 0 : _x[0]) === null || _y === void 0 ? void 0 : _y.tsp) !== null && _z !== void 0 ? _z : '');
1148
994
  if (isNaN(tsp)) {
1149
995
  const now = new Date().getTime();
1150
- if (now - tsp > ((_s = ds.maxLatency) !== null && _s !== void 0 ? _s : Infinity) * 1000)
996
+ if (now - tsp > ((_1 = (_0 = ds.advanced) === null || _0 === void 0 ? void 0 : _0.maxLatency) !== null && _1 !== void 0 ? _1 : Infinity) * 1000)
1151
997
  ds.needleValue = undefined;
1152
998
  }
1153
999
  ga.data[0].value = ds.needleValue;
1154
1000
  ga.data[0].name = ds.unit;
1155
1001
  ga.title.fontSize = 32 * modifier;
1156
- ga.title.color = (_t = ds.valueColor) !== null && _t !== void 0 ? _t : 'black';
1157
- ga.detail.color = (_u = ds.valueColor) !== null && _u !== void 0 ? _u : 'black';
1002
+ ga.title.color = (_2 = ds.valueColor) !== null && _2 !== void 0 ? _2 : 'black';
1003
+ ga.detail.color = (_3 = ds.valueColor) !== null && _3 !== void 0 ? _3 : 'black';
1158
1004
  ga.detail.fontSize = 60 * modifier;
1159
1005
  ga.detail.formatter = (val) => (isNaN(val) ? '-' : val.toFixed(0));
1160
1006
  // ga.anchor.itemStyle.color = ds.valueColor
1161
1007
  // ga.pointer.itemStyle.color = ds.valueColor
1162
1008
  // Axis
1163
- ga2.min = ((_v = ds.sections) === null || _v === void 0 ? void 0 : _v.length) ? Math.min(...ds.sections) : 0;
1164
- ga2.max = ((_w = ds.sections) === null || _w === void 0 ? void 0 : _w.length) ? Math.max(...ds.sections) : 100;
1009
+ ga2.min = ((_5 = (_4 = ds.sections) === null || _4 === void 0 ? void 0 : _4.sectionLimits) === null || _5 === void 0 ? void 0 : _5.length) ? Math.min(...(_6 = ds.sections) === null || _6 === void 0 ? void 0 : _6.sectionLimits) : 0;
1010
+ ga2.max = ((_8 = (_7 = ds.sections) === null || _7 === void 0 ? void 0 : _7.sectionLimits) === null || _8 === void 0 ? void 0 : _8.length) ? Math.max(...(_9 = ds.sections) === null || _9 === void 0 ? void 0 : _9.sectionLimits) : 100;
1165
1011
  ga.min = ga2.min;
1166
1012
  ga.max = ga2.max;
1167
- const colorSections = (_x = ds.backgroundColors) === null || _x === void 0 ? void 0 : _x.map((b, i) => { var _a, _b; return [(((_b = (_a = ds.sections) === null || _a === void 0 ? void 0 : _a[i + 1]) !== null && _b !== void 0 ? _b : ga.min) - ga.min) / ds.range, b]; }).filter(([s]) => !isNaN(s));
1013
+ const colorSections = (_11 = (_10 = ds.sections) === null || _10 === void 0 ? void 0 : _10.backgroundColors) === null || _11 === void 0 ? void 0 : _11.map((b, i) => {
1014
+ var _a, _b, _c;
1015
+ return [
1016
+ (((_c = (_b = (_a = ds.sections) === null || _a === void 0 ? void 0 : _a.sectionLimits) === null || _b === void 0 ? void 0 : _b[i + 1]) !== null && _c !== void 0 ? _c : ga.min) - ga.min) / ds.range,
1017
+ b
1018
+ ];
1019
+ }).filter(([s]) => !isNaN(s));
1168
1020
  ga2.axisLine.lineStyle.width = 8 * modifier;
1169
1021
  ga2.axisLine.lineStyle.color = (colorSections === null || colorSections === void 0 ? void 0 : colorSections.length)
1170
1022
  ? colorSections
@@ -1175,70 +1027,63 @@ class WidgetGauge extends s$1 {
1175
1027
  ga2.splitLine.length = 16 * modifier;
1176
1028
  ga2.splitLine.distance = -16 * modifier;
1177
1029
  // Progress
1178
- let progressColor = (_z = (_y = ds.backgroundColors) === null || _y === void 0 ? void 0 : _y[ds.backgroundColors.length - 1]) !== null && _z !== void 0 ? _z : 'green';
1179
- for (const [i, s] of (_1 = (_0 = ds.sections) === null || _0 === void 0 ? void 0 : _0.entries()) !== null && _1 !== void 0 ? _1 : []) {
1030
+ let progressColor = (_15 = (_13 = (_12 = ds.sections) === null || _12 === void 0 ? void 0 : _12.backgroundColors) === null || _13 === void 0 ? void 0 : _13[((_14 = ds.sections) === null || _14 === void 0 ? void 0 : _14.backgroundColors.length) - 1]) !== null && _15 !== void 0 ? _15 : 'green';
1031
+ for (const [i, s] of (_18 = (_17 = (_16 = ds.sections) === null || _16 === void 0 ? void 0 : _16.sectionLimits) === null || _17 === void 0 ? void 0 : _17.entries()) !== null && _18 !== void 0 ? _18 : []) {
1180
1032
  if (s > ds.needleValue) {
1181
- progressColor = (_5 = (_3 = (_2 = ds.backgroundColors) === null || _2 === void 0 ? void 0 : _2[i - 1]) !== null && _3 !== void 0 ? _3 : (_4 = ds.backgroundColors) === null || _4 === void 0 ? void 0 : _4[0]) !== null && _5 !== void 0 ? _5 : 'green';
1033
+ progressColor =
1034
+ (_24 = (_21 = (_20 = (_19 = ds.sections) === null || _19 === void 0 ? void 0 : _19.backgroundColors) === null || _20 === void 0 ? void 0 : _20[i - 1]) !== null && _21 !== void 0 ? _21 : (_23 = (_22 = ds.sections) === null || _22 === void 0 ? void 0 : _22.backgroundColors) === null || _23 === void 0 ? void 0 : _23[0]) !== null && _24 !== void 0 ? _24 : 'green';
1182
1035
  break;
1183
1036
  }
1184
1037
  }
1185
1038
  ga.progress.itemStyle.color = progressColor;
1186
1039
  ga.progress.width = 80 * modifier;
1187
1040
  // Apply
1188
- (_7 = this.canvasList[(_6 = ds.label) !== null && _6 !== void 0 ? _6 : '']) === null || _7 === void 0 ? void 0 : _7.setOption(option);
1041
+ console.log('Set Option', ds.label, option);
1042
+ (_26 = this.canvasList[(_25 = ds.label) !== null && _25 !== void 0 ? _25 : '']) === null || _26 === void 0 ? void 0 : _26.setOption(option);
1189
1043
  }
1190
1044
  }
1191
1045
  setupCharts() {
1046
+ var _a;
1192
1047
  // remove the gauge canvases of non provided data series
1048
+ console.log('Setup Charts', this.canvasList, this.dataSets);
1193
1049
  for (const label in this.canvasList) {
1194
1050
  const ex = this.dataSets.find((ds) => ds.label === label);
1195
- if (!ex)
1051
+ if (!ex) {
1196
1052
  delete this.canvasList[label];
1053
+ const containerDiv = (_a = this.gaugeContainer) === null || _a === void 0 ? void 0 : _a.querySelector(`[name="${label}"]`);
1054
+ containerDiv === null || containerDiv === void 0 ? void 0 : containerDiv.remove();
1055
+ }
1197
1056
  }
1198
1057
  this.dataSets.forEach((ds) => {
1199
1058
  var _a, _b, _c, _d;
1200
1059
  if (this.canvasList[(_a = ds.label) !== null && _a !== void 0 ? _a : ''])
1201
1060
  return;
1202
- const canvas = (_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(`[name="${ds.label}"]`);
1203
- if (!canvas)
1204
- return;
1061
+ const newCanvas = document.createElement('div');
1062
+ newCanvas.setAttribute('name', (_b = ds.label) !== null && _b !== void 0 ? _b : '');
1063
+ newCanvas.setAttribute('class', 'chart');
1064
+ newCanvas.setAttribute('style', `min-width: 600px; min-height: 400px; width: 600px; height: 400px;`);
1065
+ this.gaugeContainer.appendChild(newCanvas);
1066
+ console.log('Create Chart', ds.label);
1205
1067
  // @ts-ignore
1206
- this.canvasList[(_c = ds.label) !== null && _c !== void 0 ? _c : ''] = echarts.init(canvas);
1068
+ this.canvasList[(_c = ds.label) !== null && _c !== void 0 ? _c : ''] = echarts.init(newCanvas);
1207
1069
  this.canvasList[(_d = ds.label) !== null && _d !== void 0 ? _d : ''].setOption(structuredClone(this.template));
1208
1070
  });
1071
+ this.sizingSetup();
1209
1072
  }
1210
1073
  render() {
1211
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1212
- return x `
1074
+ var _a, _b, _c, _d, _e, _f;
1075
+ return ke `
1213
1076
  <div class="wrapper">
1214
- <header
1215
- class="paging"
1216
- ?active=${((_b = (_a = this.inputData) === null || _a === void 0 ? void 0 : _a.settings) === null || _b === void 0 ? void 0 : _b.title) || ((_d = (_c = this.inputData) === null || _c === void 0 ? void 0 : _c.settings) === null || _d === void 0 ? void 0 : _d.subTitle)}
1217
- >
1218
- <h3 class="paging" ?active=${(_f = (_e = this.inputData) === null || _e === void 0 ? void 0 : _e.settings) === null || _f === void 0 ? void 0 : _f.title}>
1219
- ${(_h = (_g = this.inputData) === null || _g === void 0 ? void 0 : _g.settings) === null || _h === void 0 ? void 0 : _h.title}
1220
- </h3>
1221
- <p class="paging" ?active=${(_k = (_j = this.inputData) === null || _j === void 0 ? void 0 : _j.settings) === null || _k === void 0 ? void 0 : _k.subTitle}>
1222
- ${(_m = (_l = this.inputData) === null || _l === void 0 ? void 0 : _l.settings) === null || _m === void 0 ? void 0 : _m.subTitle}
1223
- </p>
1077
+ <header class="paging" ?active=${((_a = this.inputData) === null || _a === void 0 ? void 0 : _a.title) || ((_b = this.inputData) === null || _b === void 0 ? void 0 : _b.subTitle)}>
1078
+ <h3 class="paging" ?active=${(_c = this.inputData) === null || _c === void 0 ? void 0 : _c.title}>${(_d = this.inputData) === null || _d === void 0 ? void 0 : _d.title}</h3>
1079
+ <p class="paging" ?active=${(_e = this.inputData) === null || _e === void 0 ? void 0 : _e.subTitle}>${(_f = this.inputData) === null || _f === void 0 ? void 0 : _f.subTitle}</p>
1224
1080
  </header>
1225
- <div class="gauge-container">
1226
- ${c(this.dataSets, (ds) => ds.label, (ds) => {
1227
- var _a;
1228
- return x `
1229
- <div
1230
- name="${(_a = ds.label) !== null && _a !== void 0 ? _a : ''}"
1231
- class="chart"
1232
- style="min-width: 600px; min-height: 400px; width: 600px; height: 400px;"
1233
- ></div>
1234
- `;
1235
- })}
1236
- </div>
1081
+ <div class="gauge-container"></div>
1237
1082
  </div>
1238
1083
  `;
1239
1084
  }
1240
1085
  }
1241
- WidgetGauge.styles = i$3 `
1086
+ WidgetGauge.styles = i$1 `
1242
1087
  :host {
1243
1088
  display: block;
1244
1089
  color: var(--re-text-color, #000);
@@ -1309,7 +1154,7 @@ __decorate([
1309
1154
  __decorate([
1310
1155
  r()
1311
1156
  ], WidgetGauge.prototype, "canvasList", void 0);
1312
- window.customElements.define('widget-gauge-1.5.34', WidgetGauge);
1157
+ window.customElements.define('widget-gauge-1.6.3', WidgetGauge);
1313
1158
 
1314
1159
  export { WidgetGauge };
1315
1160
  //# sourceMappingURL=widget-gauge.js.map