@record-evolution/widget-linechart 1.6.34 → 1.7.2

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,21 +1,21 @@
1
- import * as Y from "echarts/core";
2
- import { GridComponent as xt, TitleComponent as vt, ToolboxComponent as At, TooltipComponent as _t, LegendComponent as bt, DataZoomComponent as wt } from "echarts/components";
3
- import { LineChart as Ct, BarChart as St, ScatterChart as Et } from "echarts/charts";
4
- import { UniversalTransition as Tt, LegacyGridContainLabel as Dt } from "echarts/features";
5
- import { CanvasRenderer as Ot } from "echarts/renderers";
6
- import et from "tinycolor2";
7
- const I = globalThis, G = I.ShadowRoot && (I.ShadyCSS === void 0 || I.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, J = /* @__PURE__ */ Symbol(), st = /* @__PURE__ */ new WeakMap();
8
- let ut = class {
9
- constructor(t, e, i) {
10
- if (this._$cssResult$ = !0, i !== J) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
1
+ import * as nt from "echarts/core";
2
+ import { GridComponent as Pt, TitleComponent as Mt, ToolboxComponent as Nt, TooltipComponent as Ut, LegendComponent as zt, DataZoomComponent as Rt } from "echarts/components";
3
+ import { LineChart as It, BarChart as Ht, ScatterChart as jt } from "echarts/charts";
4
+ import { UniversalTransition as kt, LegacyGridContainLabel as Bt } from "echarts/features";
5
+ import { CanvasRenderer as Wt } from "echarts/renderers";
6
+ import ft from "tinycolor2";
7
+ const G = globalThis, at = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, rt = /* @__PURE__ */ Symbol(), yt = /* @__PURE__ */ new WeakMap();
8
+ let Tt = class {
9
+ constructor(t, e, s) {
10
+ if (this._$cssResult$ = !0, s !== rt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
11
11
  this.cssText = t, this.t = e;
12
12
  }
13
13
  get styleSheet() {
14
14
  let t = this.o;
15
15
  const e = this.t;
16
- if (G && t === void 0) {
17
- const i = e !== void 0 && e.length === 1;
18
- i && (t = st.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && st.set(e, t));
16
+ if (at && t === void 0) {
17
+ const s = e !== void 0 && e.length === 1;
18
+ s && (t = yt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && yt.set(e, t));
19
19
  }
20
20
  return t;
21
21
  }
@@ -23,115 +23,115 @@ let ut = class {
23
23
  return this.cssText;
24
24
  }
25
25
  };
26
- const Lt = (s) => new ut(typeof s == "string" ? s : s + "", void 0, J), Pt = (s, ...t) => {
27
- const e = s.length === 1 ? s[0] : t.reduce((i, r, n) => i + ((o) => {
28
- if (o._$cssResult$ === !0) return o.cssText;
29
- if (typeof o == "number") return o;
30
- 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.");
31
- })(r) + s[n + 1], s[0]);
32
- return new ut(e, s, J);
33
- }, Mt = (s, t) => {
34
- if (G) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
26
+ const Zt = (o) => new Tt(typeof o == "string" ? o : o + "", void 0, rt), Vt = (o, ...t) => {
27
+ const e = o.length === 1 ? o[0] : t.reduce((s, i, n) => s + ((a) => {
28
+ if (a._$cssResult$ === !0) return a.cssText;
29
+ if (typeof a == "number") return a;
30
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
31
+ })(i) + o[n + 1], o[0]);
32
+ return new Tt(e, o, rt);
33
+ }, qt = (o, t) => {
34
+ if (at) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
35
35
  else for (const e of t) {
36
- const i = document.createElement("style"), r = I.litNonce;
37
- r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i);
36
+ const s = document.createElement("style"), i = G.litNonce;
37
+ i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, o.appendChild(s);
38
38
  }
39
- }, it = G ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
39
+ }, gt = at ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
40
40
  let e = "";
41
- for (const i of t.cssRules) e += i.cssText;
42
- return Lt(e);
43
- })(s) : s;
44
- const { is: Ut, defineProperty: Nt, getOwnPropertyDescriptor: zt, getOwnPropertyNames: Ht, getOwnPropertySymbols: Rt, getPrototypeOf: jt } = Object, W = globalThis, rt = W.trustedTypes, It = rt ? rt.emptyScript : "", kt = W.reactiveElementPolyfillSupport, M = (s, t) => s, k = { toAttribute(s, t) {
41
+ for (const s of t.cssRules) e += s.cssText;
42
+ return Zt(e);
43
+ })(o) : o;
44
+ const { is: Xt, defineProperty: Yt, getOwnPropertyDescriptor: Gt, getOwnPropertyNames: Kt, getOwnPropertySymbols: Ft, getPrototypeOf: Jt } = Object, J = globalThis, xt = J.trustedTypes, Qt = xt ? xt.emptyScript : "", te = J.reactiveElementPolyfillSupport, j = (o, t) => o, K = { toAttribute(o, t) {
45
45
  switch (t) {
46
46
  case Boolean:
47
- s = s ? It : null;
47
+ o = o ? Qt : null;
48
48
  break;
49
49
  case Object:
50
50
  case Array:
51
- s = s == null ? s : JSON.stringify(s);
51
+ o = o == null ? o : JSON.stringify(o);
52
52
  }
53
- return s;
54
- }, fromAttribute(s, t) {
55
- let e = s;
53
+ return o;
54
+ }, fromAttribute(o, t) {
55
+ let e = o;
56
56
  switch (t) {
57
57
  case Boolean:
58
- e = s !== null;
58
+ e = o !== null;
59
59
  break;
60
60
  case Number:
61
- e = s === null ? null : Number(s);
61
+ e = o === null ? null : Number(o);
62
62
  break;
63
63
  case Object:
64
64
  case Array:
65
65
  try {
66
- e = JSON.parse(s);
66
+ e = JSON.parse(o);
67
67
  } catch {
68
68
  e = null;
69
69
  }
70
70
  }
71
71
  return e;
72
- } }, K = (s, t) => !Ut(s, t), nt = { attribute: !0, type: String, converter: k, reflect: !1, useDefault: !1, hasChanged: K };
73
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), W.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
74
- let S = class extends HTMLElement {
72
+ } }, ht = (o, t) => !Xt(o, t), $t = { attribute: !0, type: String, converter: K, reflect: !1, useDefault: !1, hasChanged: ht };
73
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), J.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
74
+ let O = class extends HTMLElement {
75
75
  static addInitializer(t) {
76
76
  this._$Ei(), (this.l ??= []).push(t);
77
77
  }
78
78
  static get observedAttributes() {
79
79
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
80
80
  }
81
- static createProperty(t, e = nt) {
81
+ static createProperty(t, e = $t) {
82
82
  if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
83
- const i = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(t, i, e);
84
- r !== void 0 && Nt(this.prototype, t, r);
83
+ const s = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(t, s, e);
84
+ i !== void 0 && Yt(this.prototype, t, i);
85
85
  }
86
86
  }
87
- static getPropertyDescriptor(t, e, i) {
88
- const { get: r, set: n } = zt(this.prototype, t) ?? { get() {
87
+ static getPropertyDescriptor(t, e, s) {
88
+ const { get: i, set: n } = Gt(this.prototype, t) ?? { get() {
89
89
  return this[e];
90
- }, set(o) {
91
- this[e] = o;
90
+ }, set(a) {
91
+ this[e] = a;
92
92
  } };
93
- return { get: r, set(o) {
94
- const l = r?.call(this);
95
- n?.call(this, o), this.requestUpdate(t, l, i);
93
+ return { get: i, set(a) {
94
+ const l = i?.call(this);
95
+ n?.call(this, a), this.requestUpdate(t, l, s);
96
96
  }, configurable: !0, enumerable: !0 };
97
97
  }
98
98
  static getPropertyOptions(t) {
99
- return this.elementProperties.get(t) ?? nt;
99
+ return this.elementProperties.get(t) ?? $t;
100
100
  }
101
101
  static _$Ei() {
102
- if (this.hasOwnProperty(M("elementProperties"))) return;
103
- const t = jt(this);
102
+ if (this.hasOwnProperty(j("elementProperties"))) return;
103
+ const t = Jt(this);
104
104
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
105
105
  }
106
106
  static finalize() {
107
- if (this.hasOwnProperty(M("finalized"))) return;
108
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
109
- const e = this.properties, i = [...Ht(e), ...Rt(e)];
110
- for (const r of i) this.createProperty(r, e[r]);
107
+ if (this.hasOwnProperty(j("finalized"))) return;
108
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(j("properties"))) {
109
+ const e = this.properties, s = [...Kt(e), ...Ft(e)];
110
+ for (const i of s) this.createProperty(i, e[i]);
111
111
  }
112
112
  const t = this[Symbol.metadata];
113
113
  if (t !== null) {
114
114
  const e = litPropertyMetadata.get(t);
115
- if (e !== void 0) for (const [i, r] of e) this.elementProperties.set(i, r);
115
+ if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
116
116
  }
117
117
  this._$Eh = /* @__PURE__ */ new Map();
118
- for (const [e, i] of this.elementProperties) {
119
- const r = this._$Eu(e, i);
120
- r !== void 0 && this._$Eh.set(r, e);
118
+ for (const [e, s] of this.elementProperties) {
119
+ const i = this._$Eu(e, s);
120
+ i !== void 0 && this._$Eh.set(i, e);
121
121
  }
122
122
  this.elementStyles = this.finalizeStyles(this.styles);
123
123
  }
124
124
  static finalizeStyles(t) {
125
125
  const e = [];
126
126
  if (Array.isArray(t)) {
127
- const i = new Set(t.flat(1 / 0).reverse());
128
- for (const r of i) e.unshift(it(r));
129
- } else t !== void 0 && e.push(it(t));
127
+ const s = new Set(t.flat(1 / 0).reverse());
128
+ for (const i of s) e.unshift(gt(i));
129
+ } else t !== void 0 && e.push(gt(t));
130
130
  return e;
131
131
  }
132
132
  static _$Eu(t, e) {
133
- const i = e.attribute;
134
- return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
133
+ const s = e.attribute;
134
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
135
135
  }
136
136
  constructor() {
137
137
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
@@ -147,12 +147,12 @@ let S = class extends HTMLElement {
147
147
  }
148
148
  _$E_() {
149
149
  const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
150
- for (const i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
150
+ for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
151
151
  t.size > 0 && (this._$Ep = t);
152
152
  }
153
153
  createRenderRoot() {
154
154
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
155
- return Mt(t, this.constructor.elementStyles), t;
155
+ return qt(t, this.constructor.elementStyles), t;
156
156
  }
157
157
  connectedCallback() {
158
158
  this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
@@ -162,35 +162,35 @@ let S = class extends HTMLElement {
162
162
  disconnectedCallback() {
163
163
  this._$EO?.forEach((t) => t.hostDisconnected?.());
164
164
  }
165
- attributeChangedCallback(t, e, i) {
166
- this._$AK(t, i);
165
+ attributeChangedCallback(t, e, s) {
166
+ this._$AK(t, s);
167
167
  }
168
168
  _$ET(t, e) {
169
- const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
170
- if (r !== void 0 && i.reflect === !0) {
171
- const n = (i.converter?.toAttribute !== void 0 ? i.converter : k).toAttribute(e, i.type);
172
- this._$Em = t, n == null ? this.removeAttribute(r) : this.setAttribute(r, n), this._$Em = null;
169
+ const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
170
+ if (i !== void 0 && s.reflect === !0) {
171
+ const n = (s.converter?.toAttribute !== void 0 ? s.converter : K).toAttribute(e, s.type);
172
+ this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
173
173
  }
174
174
  }
175
175
  _$AK(t, e) {
176
- const i = this.constructor, r = i._$Eh.get(t);
177
- if (r !== void 0 && this._$Em !== r) {
178
- const n = i.getPropertyOptions(r), o = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : k;
179
- this._$Em = r;
180
- const l = o.fromAttribute(e, n.type);
181
- this[r] = l ?? this._$Ej?.get(r) ?? l, this._$Em = null;
176
+ const s = this.constructor, i = s._$Eh.get(t);
177
+ if (i !== void 0 && this._$Em !== i) {
178
+ const n = s.getPropertyOptions(i), a = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : K;
179
+ this._$Em = i;
180
+ const l = a.fromAttribute(e, n.type);
181
+ this[i] = l ?? this._$Ej?.get(i) ?? l, this._$Em = null;
182
182
  }
183
183
  }
184
- requestUpdate(t, e, i, r = !1, n) {
184
+ requestUpdate(t, e, s, i = !1, n) {
185
185
  if (t !== void 0) {
186
- const o = this.constructor;
187
- if (r === !1 && (n = this[t]), i ??= o.getPropertyOptions(t), !((i.hasChanged ?? K)(n, e) || i.useDefault && i.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(o._$Eu(t, i)))) return;
188
- this.C(t, e, i);
186
+ const a = this.constructor;
187
+ if (i === !1 && (n = this[t]), s ??= a.getPropertyOptions(t), !((s.hasChanged ?? ht)(n, e) || s.useDefault && s.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(a._$Eu(t, s)))) return;
188
+ this.C(t, e, s);
189
189
  }
190
190
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
191
191
  }
192
- C(t, e, { useDefault: i, reflect: r, wrapped: n }, o) {
193
- i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
192
+ C(t, e, { useDefault: s, reflect: i, wrapped: n }, a) {
193
+ s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, a ?? e ?? this[t]), n !== !0 || a !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
194
194
  }
195
195
  async _$EP() {
196
196
  this.isUpdatePending = !0;
@@ -209,21 +209,21 @@ let S = class extends HTMLElement {
209
209
  if (!this.isUpdatePending) return;
210
210
  if (!this.hasUpdated) {
211
211
  if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
212
- for (const [r, n] of this._$Ep) this[r] = n;
212
+ for (const [i, n] of this._$Ep) this[i] = n;
213
213
  this._$Ep = void 0;
214
214
  }
215
- const i = this.constructor.elementProperties;
216
- if (i.size > 0) for (const [r, n] of i) {
217
- const { wrapped: o } = n, l = this[r];
218
- o !== !0 || this._$AL.has(r) || l === void 0 || this.C(r, void 0, n, l);
215
+ const s = this.constructor.elementProperties;
216
+ if (s.size > 0) for (const [i, n] of s) {
217
+ const { wrapped: a } = n, l = this[i];
218
+ a !== !0 || this._$AL.has(i) || l === void 0 || this.C(i, void 0, n, l);
219
219
  }
220
220
  }
221
221
  let t = !1;
222
222
  const e = this._$AL;
223
223
  try {
224
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((i) => i.hostUpdate?.()), this.update(e)) : this._$EM();
225
- } catch (i) {
226
- throw t = !1, this._$EM(), i;
224
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((s) => s.hostUpdate?.()), this.update(e)) : this._$EM();
225
+ } catch (s) {
226
+ throw t = !1, this._$EM(), s;
227
227
  }
228
228
  t && this._$AE(e);
229
229
  }
@@ -252,70 +252,70 @@ let S = class extends HTMLElement {
252
252
  firstUpdated(t) {
253
253
  }
254
254
  };
255
- S.elementStyles = [], S.shadowRootOptions = { mode: "open" }, S[M("elementProperties")] = /* @__PURE__ */ new Map(), S[M("finalized")] = /* @__PURE__ */ new Map(), kt?.({ ReactiveElement: S }), (W.reactiveElementVersions ??= []).push("2.1.2");
256
- const F = globalThis, ot = (s) => s, B = F.trustedTypes, at = B ? B.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, mt = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, ft = "?" + v, Bt = `<${ft}>`, b = document, N = () => b.createComment(""), z = (s) => s === null || typeof s != "object" && typeof s != "function", Q = Array.isArray, Wt = (s) => Q(s) || typeof s?.[Symbol.iterator] == "function", Z = `[
257
- \f\r]`, P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ht = /-->/g, lt = />/g, A = RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^
258
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ct = /'/g, dt = /"/g, yt = /^(?:script|style|textarea|title)$/i, qt = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), Vt = qt(1), E = /* @__PURE__ */ Symbol.for("lit-noChange"), u = /* @__PURE__ */ Symbol.for("lit-nothing"), pt = /* @__PURE__ */ new WeakMap(), _ = b.createTreeWalker(b, 129);
259
- function gt(s, t) {
260
- if (!Q(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
261
- return at !== void 0 ? at.createHTML(t) : t;
255
+ O.elementStyles = [], O.shadowRootOptions = { mode: "open" }, O[j("elementProperties")] = /* @__PURE__ */ new Map(), O[j("finalized")] = /* @__PURE__ */ new Map(), te?.({ ReactiveElement: O }), (J.reactiveElementVersions ??= []).push("2.1.2");
256
+ const lt = globalThis, vt = (o) => o, F = lt.trustedTypes, At = F ? F.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, Et = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, Lt = "?" + A, ee = `<${Lt}>`, L = document, B = () => L.createComment(""), W = (o) => o === null || typeof o != "object" && typeof o != "function", ct = Array.isArray, ie = (o) => ct(o) || typeof o?.[Symbol.iterator] == "function", ot = `[
257
+ \f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, _t = />/g, T = RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^
258
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), wt = /'/g, St = /"/g, Dt = /^(?:script|style|textarea|title)$/i, se = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), oe = se(1), P = /* @__PURE__ */ Symbol.for("lit-noChange"), f = /* @__PURE__ */ Symbol.for("lit-nothing"), Ct = /* @__PURE__ */ new WeakMap(), E = L.createTreeWalker(L, 129);
259
+ function Ot(o, t) {
260
+ if (!ct(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
261
+ return At !== void 0 ? At.createHTML(t) : t;
262
262
  }
263
- const Xt = (s, t) => {
264
- const e = s.length - 1, i = [];
265
- let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = P;
263
+ const ne = (o, t) => {
264
+ const e = o.length - 1, s = [];
265
+ let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = H;
266
266
  for (let l = 0; l < e; l++) {
267
- const h = s[l];
268
- let a, d, c = -1, y = 0;
269
- for (; y < h.length && (o.lastIndex = y, d = o.exec(h), d !== null); ) y = o.lastIndex, o === P ? d[1] === "!--" ? o = ht : d[1] !== void 0 ? o = lt : d[2] !== void 0 ? (yt.test(d[2]) && (r = RegExp("</" + d[2], "g")), o = A) : d[3] !== void 0 && (o = A) : o === A ? d[0] === ">" ? (o = r ?? P, c = -1) : d[1] === void 0 ? c = -2 : (c = o.lastIndex - d[2].length, a = d[1], o = d[3] === void 0 ? A : d[3] === '"' ? dt : ct) : o === dt || o === ct ? o = A : o === ht || o === lt ? o = P : (o = A, r = void 0);
270
- const m = o === A && s[l + 1].startsWith("/>") ? " " : "";
271
- n += o === P ? h + Bt : c >= 0 ? (i.push(a), h.slice(0, c) + mt + h.slice(c) + v + m) : h + v + (c === -2 ? l : m);
267
+ const r = o[l];
268
+ let d, h, c = -1, p = 0;
269
+ for (; p < r.length && (a.lastIndex = p, h = a.exec(r), h !== null); ) p = a.lastIndex, a === H ? h[1] === "!--" ? a = bt : h[1] !== void 0 ? a = _t : h[2] !== void 0 ? (Dt.test(h[2]) && (i = RegExp("</" + h[2], "g")), a = T) : h[3] !== void 0 && (a = T) : a === T ? h[0] === ">" ? (a = i ?? H, c = -1) : h[1] === void 0 ? c = -2 : (c = a.lastIndex - h[2].length, d = h[1], a = h[3] === void 0 ? T : h[3] === '"' ? St : wt) : a === St || a === wt ? a = T : a === bt || a === _t ? a = H : (a = T, i = void 0);
270
+ const y = a === T && o[l + 1].startsWith("/>") ? " " : "";
271
+ n += a === H ? r + ee : c >= 0 ? (s.push(d), r.slice(0, c) + Et + r.slice(c) + A + y) : r + A + (c === -2 ? l : y);
272
272
  }
273
- return [gt(s, n + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
273
+ return [Ot(o, n + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
274
274
  };
275
- class H {
276
- constructor({ strings: t, _$litType$: e }, i) {
277
- let r;
275
+ class Z {
276
+ constructor({ strings: t, _$litType$: e }, s) {
277
+ let i;
278
278
  this.parts = [];
279
- let n = 0, o = 0;
280
- const l = t.length - 1, h = this.parts, [a, d] = Xt(t, e);
281
- if (this.el = H.createElement(a, i), _.currentNode = this.el.content, e === 2 || e === 3) {
279
+ let n = 0, a = 0;
280
+ const l = t.length - 1, r = this.parts, [d, h] = ne(t, e);
281
+ if (this.el = Z.createElement(d, s), E.currentNode = this.el.content, e === 2 || e === 3) {
282
282
  const c = this.el.content.firstChild;
283
283
  c.replaceWith(...c.childNodes);
284
284
  }
285
- for (; (r = _.nextNode()) !== null && h.length < l; ) {
286
- if (r.nodeType === 1) {
287
- if (r.hasAttributes()) for (const c of r.getAttributeNames()) if (c.endsWith(mt)) {
288
- const y = d[o++], m = r.getAttribute(c).split(v), f = /([.?@])?(.*)/.exec(y);
289
- h.push({ type: 1, index: n, name: f[2], strings: m, ctor: f[1] === "." ? Yt : f[1] === "?" ? Gt : f[1] === "@" ? Jt : q }), r.removeAttribute(c);
290
- } else c.startsWith(v) && (h.push({ type: 6, index: n }), r.removeAttribute(c));
291
- if (yt.test(r.tagName)) {
292
- const c = r.textContent.split(v), y = c.length - 1;
293
- if (y > 0) {
294
- r.textContent = B ? B.emptyScript : "";
295
- for (let m = 0; m < y; m++) r.append(c[m], N()), _.nextNode(), h.push({ type: 2, index: ++n });
296
- r.append(c[y], N());
285
+ for (; (i = E.nextNode()) !== null && r.length < l; ) {
286
+ if (i.nodeType === 1) {
287
+ if (i.hasAttributes()) for (const c of i.getAttributeNames()) if (c.endsWith(Et)) {
288
+ const p = h[a++], y = i.getAttribute(c).split(A), x = /([.?@])?(.*)/.exec(p);
289
+ r.push({ type: 1, index: n, name: x[2], strings: y, ctor: x[1] === "." ? re : x[1] === "?" ? he : x[1] === "@" ? le : Q }), i.removeAttribute(c);
290
+ } else c.startsWith(A) && (r.push({ type: 6, index: n }), i.removeAttribute(c));
291
+ if (Dt.test(i.tagName)) {
292
+ const c = i.textContent.split(A), p = c.length - 1;
293
+ if (p > 0) {
294
+ i.textContent = F ? F.emptyScript : "";
295
+ for (let y = 0; y < p; y++) i.append(c[y], B()), E.nextNode(), r.push({ type: 2, index: ++n });
296
+ i.append(c[p], B());
297
297
  }
298
298
  }
299
- } else if (r.nodeType === 8) if (r.data === ft) h.push({ type: 2, index: n });
299
+ } else if (i.nodeType === 8) if (i.data === Lt) r.push({ type: 2, index: n });
300
300
  else {
301
301
  let c = -1;
302
- for (; (c = r.data.indexOf(v, c + 1)) !== -1; ) h.push({ type: 7, index: n }), c += v.length - 1;
302
+ for (; (c = i.data.indexOf(A, c + 1)) !== -1; ) r.push({ type: 7, index: n }), c += A.length - 1;
303
303
  }
304
304
  n++;
305
305
  }
306
306
  }
307
307
  static createElement(t, e) {
308
- const i = b.createElement("template");
309
- return i.innerHTML = t, i;
308
+ const s = L.createElement("template");
309
+ return s.innerHTML = t, s;
310
310
  }
311
311
  }
312
- function T(s, t, e = s, i) {
313
- if (t === E) return t;
314
- let r = i !== void 0 ? e._$Co?.[i] : e._$Cl;
315
- const n = z(t) ? void 0 : t._$litDirective$;
316
- return r?.constructor !== n && (r?._$AO?.(!1), n === void 0 ? r = void 0 : (r = new n(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ??= [])[i] = r : e._$Cl = r), r !== void 0 && (t = T(s, r._$AS(s, t.values), r, i)), t;
312
+ function M(o, t, e = o, s) {
313
+ if (t === P) return t;
314
+ let i = s !== void 0 ? e._$Co?.[s] : e._$Cl;
315
+ const n = W(t) ? void 0 : t._$litDirective$;
316
+ return i?.constructor !== n && (i?._$AO?.(!1), n === void 0 ? i = void 0 : (i = new n(o), i._$AT(o, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = M(o, i._$AS(o, t.values), i, s)), t;
317
317
  }
318
- class Zt {
318
+ class ae {
319
319
  constructor(t, e) {
320
320
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
321
321
  }
@@ -326,29 +326,29 @@ class Zt {
326
326
  return this._$AM._$AU;
327
327
  }
328
328
  u(t) {
329
- const { el: { content: e }, parts: i } = this._$AD, r = (t?.creationScope ?? b).importNode(e, !0);
330
- _.currentNode = r;
331
- let n = _.nextNode(), o = 0, l = 0, h = i[0];
332
- for (; h !== void 0; ) {
333
- if (o === h.index) {
334
- let a;
335
- h.type === 2 ? a = new R(n, n.nextSibling, this, t) : h.type === 1 ? a = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (a = new Kt(n, this, t)), this._$AV.push(a), h = i[++l];
329
+ const { el: { content: e }, parts: s } = this._$AD, i = (t?.creationScope ?? L).importNode(e, !0);
330
+ E.currentNode = i;
331
+ let n = E.nextNode(), a = 0, l = 0, r = s[0];
332
+ for (; r !== void 0; ) {
333
+ if (a === r.index) {
334
+ let d;
335
+ r.type === 2 ? d = new V(n, n.nextSibling, this, t) : r.type === 1 ? d = new r.ctor(n, r.name, r.strings, this, t) : r.type === 6 && (d = new ce(n, this, t)), this._$AV.push(d), r = s[++l];
336
336
  }
337
- o !== h?.index && (n = _.nextNode(), o++);
337
+ a !== r?.index && (n = E.nextNode(), a++);
338
338
  }
339
- return _.currentNode = b, r;
339
+ return E.currentNode = L, i;
340
340
  }
341
341
  p(t) {
342
342
  let e = 0;
343
- for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
343
+ for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
344
344
  }
345
345
  }
346
- class R {
346
+ class V {
347
347
  get _$AU() {
348
348
  return this._$AM?._$AU ?? this._$Cv;
349
349
  }
350
- constructor(t, e, i, r) {
351
- this.type = 2, this._$AH = u, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = r?.isConnected ?? !0;
350
+ constructor(t, e, s, i) {
351
+ this.type = 2, this._$AH = f, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = i?.isConnected ?? !0;
352
352
  }
353
353
  get parentNode() {
354
354
  let t = this._$AA.parentNode;
@@ -362,7 +362,7 @@ class R {
362
362
  return this._$AB;
363
363
  }
364
364
  _$AI(t, e = this) {
365
- t = T(this, t, e), z(t) ? t === u || t == null || t === "" ? (this._$AH !== u && this._$AR(), this._$AH = u) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Wt(t) ? this.k(t) : this._(t);
365
+ t = M(this, t, e), W(t) ? t === f || t == null || t === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ie(t) ? this.k(t) : this._(t);
366
366
  }
367
367
  O(t) {
368
368
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -371,115 +371,115 @@ class R {
371
371
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
372
372
  }
373
373
  _(t) {
374
- this._$AH !== u && z(this._$AH) ? this._$AA.nextSibling.data = t : this.T(b.createTextNode(t)), this._$AH = t;
374
+ this._$AH !== f && W(this._$AH) ? this._$AA.nextSibling.data = t : this.T(L.createTextNode(t)), this._$AH = t;
375
375
  }
376
376
  $(t) {
377
- const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = H.createElement(gt(i.h, i.h[0]), this.options)), i);
378
- if (this._$AH?._$AD === r) this._$AH.p(e);
377
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = Z.createElement(Ot(s.h, s.h[0]), this.options)), s);
378
+ if (this._$AH?._$AD === i) this._$AH.p(e);
379
379
  else {
380
- const n = new Zt(r, this), o = n.u(this.options);
381
- n.p(e), this.T(o), this._$AH = n;
380
+ const n = new ae(i, this), a = n.u(this.options);
381
+ n.p(e), this.T(a), this._$AH = n;
382
382
  }
383
383
  }
384
384
  _$AC(t) {
385
- let e = pt.get(t.strings);
386
- return e === void 0 && pt.set(t.strings, e = new H(t)), e;
385
+ let e = Ct.get(t.strings);
386
+ return e === void 0 && Ct.set(t.strings, e = new Z(t)), e;
387
387
  }
388
388
  k(t) {
389
- Q(this._$AH) || (this._$AH = [], this._$AR());
389
+ ct(this._$AH) || (this._$AH = [], this._$AR());
390
390
  const e = this._$AH;
391
- let i, r = 0;
392
- for (const n of t) r === e.length ? e.push(i = new R(this.O(N()), this.O(N()), this, this.options)) : i = e[r], i._$AI(n), r++;
393
- r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r);
391
+ let s, i = 0;
392
+ for (const n of t) i === e.length ? e.push(s = new V(this.O(B()), this.O(B()), this, this.options)) : s = e[i], s._$AI(n), i++;
393
+ i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
394
394
  }
395
395
  _$AR(t = this._$AA.nextSibling, e) {
396
396
  for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
397
- const i = ot(t).nextSibling;
398
- ot(t).remove(), t = i;
397
+ const s = vt(t).nextSibling;
398
+ vt(t).remove(), t = s;
399
399
  }
400
400
  }
401
401
  setConnected(t) {
402
402
  this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
403
403
  }
404
404
  }
405
- class q {
405
+ class Q {
406
406
  get tagName() {
407
407
  return this.element.tagName;
408
408
  }
409
409
  get _$AU() {
410
410
  return this._$AM._$AU;
411
411
  }
412
- constructor(t, e, i, r, n) {
413
- this.type = 1, this._$AH = u, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = u;
412
+ constructor(t, e, s, i, n) {
413
+ this.type = 1, this._$AH = f, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = f;
414
414
  }
415
- _$AI(t, e = this, i, r) {
415
+ _$AI(t, e = this, s, i) {
416
416
  const n = this.strings;
417
- let o = !1;
418
- if (n === void 0) t = T(this, t, e, 0), o = !z(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
417
+ let a = !1;
418
+ if (n === void 0) t = M(this, t, e, 0), a = !W(t) || t !== this._$AH && t !== P, a && (this._$AH = t);
419
419
  else {
420
420
  const l = t;
421
- let h, a;
422
- for (t = n[0], h = 0; h < n.length - 1; h++) a = T(this, l[i + h], e, h), a === E && (a = this._$AH[h]), o ||= !z(a) || a !== this._$AH[h], a === u ? t = u : t !== u && (t += (a ?? "") + n[h + 1]), this._$AH[h] = a;
421
+ let r, d;
422
+ for (t = n[0], r = 0; r < n.length - 1; r++) d = M(this, l[s + r], e, r), d === P && (d = this._$AH[r]), a ||= !W(d) || d !== this._$AH[r], d === f ? t = f : t !== f && (t += (d ?? "") + n[r + 1]), this._$AH[r] = d;
423
423
  }
424
- o && !r && this.j(t);
424
+ a && !i && this.j(t);
425
425
  }
426
426
  j(t) {
427
- t === u ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
427
+ t === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
428
428
  }
429
429
  }
430
- class Yt extends q {
430
+ class re extends Q {
431
431
  constructor() {
432
432
  super(...arguments), this.type = 3;
433
433
  }
434
434
  j(t) {
435
- this.element[this.name] = t === u ? void 0 : t;
435
+ this.element[this.name] = t === f ? void 0 : t;
436
436
  }
437
437
  }
438
- class Gt extends q {
438
+ class he extends Q {
439
439
  constructor() {
440
440
  super(...arguments), this.type = 4;
441
441
  }
442
442
  j(t) {
443
- this.element.toggleAttribute(this.name, !!t && t !== u);
443
+ this.element.toggleAttribute(this.name, !!t && t !== f);
444
444
  }
445
445
  }
446
- class Jt extends q {
447
- constructor(t, e, i, r, n) {
448
- super(t, e, i, r, n), this.type = 5;
446
+ class le extends Q {
447
+ constructor(t, e, s, i, n) {
448
+ super(t, e, s, i, n), this.type = 5;
449
449
  }
450
450
  _$AI(t, e = this) {
451
- if ((t = T(this, t, e, 0) ?? u) === E) return;
452
- const i = this._$AH, r = t === u && i !== u || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== u && (i === u || r);
453
- r && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
451
+ if ((t = M(this, t, e, 0) ?? f) === P) return;
452
+ const s = this._$AH, i = t === f && s !== f || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== f && (s === f || i);
453
+ i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
454
454
  }
455
455
  handleEvent(t) {
456
456
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
457
457
  }
458
458
  }
459
- class Kt {
460
- constructor(t, e, i) {
461
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
459
+ class ce {
460
+ constructor(t, e, s) {
461
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
462
462
  }
463
463
  get _$AU() {
464
464
  return this._$AM._$AU;
465
465
  }
466
466
  _$AI(t) {
467
- T(this, t);
467
+ M(this, t);
468
468
  }
469
469
  }
470
- const Ft = F.litHtmlPolyfillSupport;
471
- Ft?.(H, R), (F.litHtmlVersions ??= []).push("3.3.2");
472
- const Qt = (s, t, e) => {
473
- const i = e?.renderBefore ?? t;
474
- let r = i._$litPart$;
475
- if (r === void 0) {
470
+ const de = lt.litHtmlPolyfillSupport;
471
+ de?.(Z, V), (lt.litHtmlVersions ??= []).push("3.3.2");
472
+ const pe = (o, t, e) => {
473
+ const s = e?.renderBefore ?? t;
474
+ let i = s._$litPart$;
475
+ if (i === void 0) {
476
476
  const n = e?.renderBefore ?? null;
477
- i._$litPart$ = r = new R(t.insertBefore(N(), n), n, void 0, e ?? {});
477
+ s._$litPart$ = i = new V(t.insertBefore(B(), n), n, void 0, e ?? {});
478
478
  }
479
- return r._$AI(s), r;
479
+ return i._$AI(o), i;
480
480
  };
481
- const tt = globalThis;
482
- class U extends S {
481
+ const dt = globalThis;
482
+ class k extends O {
483
483
  constructor() {
484
484
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
485
485
  }
@@ -489,7 +489,7 @@ class U extends S {
489
489
  }
490
490
  update(t) {
491
491
  const e = this.render();
492
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Qt(e, this.renderRoot, this.renderOptions);
492
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = pe(e, this.renderRoot, this.renderOptions);
493
493
  }
494
494
  connectedCallback() {
495
495
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -498,79 +498,79 @@ class U extends S {
498
498
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
499
499
  }
500
500
  render() {
501
- return E;
501
+ return P;
502
502
  }
503
503
  }
504
- U._$litElement$ = !0, U.finalized = !0, tt.litElementHydrateSupport?.({ LitElement: U });
505
- const te = tt.litElementPolyfillSupport;
506
- te?.({ LitElement: U });
507
- (tt.litElementVersions ??= []).push("4.2.2");
508
- const ee = (s) => (t, e) => {
504
+ k._$litElement$ = !0, k.finalized = !0, dt.litElementHydrateSupport?.({ LitElement: k });
505
+ const ue = dt.litElementPolyfillSupport;
506
+ ue?.({ LitElement: k });
507
+ (dt.litElementVersions ??= []).push("4.2.2");
508
+ const me = (o) => (t, e) => {
509
509
  e !== void 0 ? e.addInitializer(() => {
510
- customElements.define(s, t);
511
- }) : customElements.define(s, t);
510
+ customElements.define(o, t);
511
+ }) : customElements.define(o, t);
512
512
  };
513
- const se = { attribute: !0, type: String, converter: k, reflect: !1, hasChanged: K }, ie = (s = se, t, e) => {
514
- const { kind: i, metadata: r } = e;
515
- let n = globalThis.litPropertyMetadata.get(r);
516
- if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), n.set(e.name, s), i === "accessor") {
517
- const { name: o } = e;
513
+ const fe = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: ht }, ye = (o = fe, t, e) => {
514
+ const { kind: s, metadata: i } = e;
515
+ let n = globalThis.litPropertyMetadata.get(i);
516
+ if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), s === "setter" && ((o = Object.create(o)).wrapped = !0), n.set(e.name, o), s === "accessor") {
517
+ const { name: a } = e;
518
518
  return { set(l) {
519
- const h = t.get.call(this);
520
- t.set.call(this, l), this.requestUpdate(o, h, s, !0, l);
519
+ const r = t.get.call(this);
520
+ t.set.call(this, l), this.requestUpdate(a, r, o, !0, l);
521
521
  }, init(l) {
522
- return l !== void 0 && this.C(o, void 0, s, l), l;
522
+ return l !== void 0 && this.C(a, void 0, o, l), l;
523
523
  } };
524
524
  }
525
- if (i === "setter") {
526
- const { name: o } = e;
525
+ if (s === "setter") {
526
+ const { name: a } = e;
527
527
  return function(l) {
528
- const h = this[o];
529
- t.call(this, l), this.requestUpdate(o, h, s, !0, l);
528
+ const r = this[a];
529
+ t.call(this, l), this.requestUpdate(a, r, o, !0, l);
530
530
  };
531
531
  }
532
- throw Error("Unsupported decorator location: " + i);
532
+ throw Error("Unsupported decorator location: " + s);
533
533
  };
534
- function V(s) {
535
- return (t, e) => typeof e == "object" ? ie(s, t, e) : ((i, r, n) => {
536
- const o = r.hasOwnProperty(n);
537
- return r.constructor.createProperty(n, i), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
538
- })(s, t, e);
534
+ function tt(o) {
535
+ return (t, e) => typeof e == "object" ? ye(o, t, e) : ((s, i, n) => {
536
+ const a = i.hasOwnProperty(n);
537
+ return i.constructor.createProperty(n, s), a ? Object.getOwnPropertyDescriptor(i, n) : void 0;
538
+ })(o, t, e);
539
539
  }
540
- function X(s) {
541
- return V({ ...s, state: !0, attribute: !1 });
540
+ function et(o) {
541
+ return tt({ ...o, state: !0, attribute: !1 });
542
542
  }
543
- const re = (s, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(s, t, e), e);
544
- function ne(s, t) {
545
- return (e, i, r) => {
546
- const n = (o) => o.renderRoot?.querySelector(s) ?? null;
547
- return re(e, i, { get() {
543
+ const ge = (o, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(o, t, e), e);
544
+ function xe(o, t) {
545
+ return (e, s, i) => {
546
+ const n = (a) => a.renderRoot?.querySelector(o) ?? null;
547
+ return ge(e, s, { get() {
548
548
  return n(this);
549
549
  } });
550
550
  };
551
551
  }
552
- var oe = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, x = (s, t, e, i) => {
553
- for (var r = i > 1 ? void 0 : i ? ae(t, e) : t, n = s.length - 1, o; n >= 0; n--)
554
- (o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
555
- return i && r && oe(t, e, r), r;
552
+ var $e = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, $ = (o, t, e, s) => {
553
+ for (var i = s > 1 ? void 0 : s ? ve(t, e) : t, n = o.length - 1, a; n >= 0; n--)
554
+ (a = o[n]) && (i = (s ? a(t, e, i) : a(i)) || i);
555
+ return s && i && $e(t, e, i), i;
556
556
  };
557
- Y.use([
558
- xt,
559
- vt,
560
- At,
561
- _t,
562
- bt,
563
- wt,
564
- Ct,
565
- St,
566
- Et,
567
- Ot,
568
- Tt,
569
- Dt
557
+ nt.use([
558
+ Pt,
559
+ Mt,
560
+ Nt,
561
+ Ut,
562
+ zt,
563
+ Rt,
564
+ It,
565
+ Ht,
566
+ jt,
567
+ Wt,
568
+ kt,
569
+ Bt
570
570
  ]);
571
- let $ = class extends U {
571
+ let g = class extends k {
572
572
  constructor() {
573
- super(), this.canvasList = /* @__PURE__ */ new Map(), this.origWidth = 0, this.origHeight = 0, this.modifier = 1, this.version = "1.6.34", this.updateThresholdMs = 300, this.maxIntervalSamples = 3, this.template = {
573
+ super(), this.canvasList = /* @__PURE__ */ new Map(), this.origWidth = 0, this.origHeight = 0, this.modifier = 1, this.version = "1.7.2", this.updateThresholdMs = 300, this.maxIntervalSamples = 3, this.template = {
574
574
  title: {
575
575
  text: "Temperature Change in the Coming Week",
576
576
  left: "center",
@@ -629,21 +629,45 @@ let $ = class extends U {
629
629
  fontSize: 14
630
630
  }
631
631
  },
632
- yAxis: {
633
- type: "value",
634
- nameLocation: "middle",
635
- name: "Temperature (°C)",
636
- nameGap: 30,
637
- axisLabel: {
638
- fontSize: 14
639
- },
640
- axisLine: {
641
- lineStyle: {
642
- width: void 0
643
- }
632
+ // index 0 = left (primary) axis, index 1 = right (secondary) axis.
633
+ // Must stay function-free: the template is copied via structuredClone.
634
+ yAxis: [
635
+ {
636
+ type: "value",
637
+ nameLocation: "middle",
638
+ name: "Temperature (°C)",
639
+ nameGap: 30,
640
+ position: "left",
641
+ axisLabel: {
642
+ fontSize: 14
643
+ },
644
+ axisLine: {
645
+ lineStyle: {
646
+ width: void 0
647
+ }
648
+ },
649
+ scale: !1
644
650
  },
645
- scale: !1
646
- },
651
+ {
652
+ type: "value",
653
+ position: "right",
654
+ show: !1,
655
+ name: "",
656
+ nameGap: 30,
657
+ axisLabel: {
658
+ fontSize: 14
659
+ },
660
+ axisLine: {
661
+ lineStyle: {
662
+ width: void 0
663
+ }
664
+ },
665
+ splitLine: {
666
+ show: !1
667
+ },
668
+ scale: !1
669
+ }
670
+ ],
647
671
  series: [
648
672
  {
649
673
  name: "Highest",
@@ -669,81 +693,130 @@ let $ = class extends U {
669
693
  ]
670
694
  };
671
695
  }
672
- update(s) {
673
- s.has("inputData") && (this.cachedXAxisType = void 0, this.cachedYAxisType = void 0), s.has("inputData") && this.chartContainer && (this.transformData(), this.applyData()), s.has("theme") && (this.registerTheme(this.theme), this.deleteCharts(), this.transformData(), this.applyData()), super.update(s);
696
+ update(o) {
697
+ o.has("inputData") && (this.cachedXAxisType = void 0, this.cachedYAxisType = void 0), o.has("inputData") && this.chartContainer && (this.transformData(), this.applyData()), o.has("theme") && (this.registerTheme(this.theme), this.deleteCharts(), this.transformData(), this.applyData()), super.update(o);
674
698
  }
675
- firstUpdated(s) {
699
+ firstUpdated(o) {
676
700
  this.registerTheme(this.theme), this.transformData(), this.applyData(), this.chartContainer && (this.resizeObserver = new ResizeObserver(() => {
677
701
  this.canvasList.forEach((t) => {
678
702
  t.echart?.resize();
679
703
  });
680
704
  }), this.resizeObserver.observe(this.chartContainer));
681
705
  }
682
- registerTheme(s) {
706
+ registerTheme(o) {
683
707
  const t = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), e = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
684
- if (this.themeBgColor = e || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = t || this.theme?.theme_object?.title?.textStyle?.color, this.themeSubtitleColor = t || this.theme?.theme_object?.title?.subtextStyle?.color || this.themeTitleColor, !s || !s.theme_object || !s.theme_name) return;
685
- const i = ["parallel", "geo", "timeline", "visualMap", "markPoint"], r = Object.fromEntries(
686
- Object.entries(s.theme_object).filter(([n]) => !i.includes(n))
708
+ if (this.themeBgColor = e || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = t || this.theme?.theme_object?.title?.textStyle?.color, this.themeSubtitleColor = t || this.theme?.theme_object?.title?.subtextStyle?.color || this.themeTitleColor, !o || !o.theme_object || !o.theme_name) return;
709
+ const s = ["parallel", "geo", "timeline", "visualMap", "markPoint"], i = Object.fromEntries(
710
+ Object.entries(o.theme_object).filter(([n]) => !s.includes(n))
687
711
  );
688
- Y.registerTheme(s.theme_name, r);
712
+ nt.registerTheme(o.theme_name, i);
713
+ }
714
+ /** True when bars grow to the right instead of upwards (axis.orientation). */
715
+ isHorizontal() {
716
+ return this.inputData?.axis?.orientation === "horizontal";
717
+ }
718
+ /**
719
+ * Index of the measured y-value inside a data point's `value` tuple.
720
+ *
721
+ * A point is stored as `[x, y, r]` for a vertical chart. A horizontal chart
722
+ * swaps the first two entries to `[y, x, r]`, because ECharts always maps
723
+ * tuple index 0 to the x axis and index 1 to the y axis — and in a
724
+ * horizontal chart the measured value is what belongs on the x axis.
725
+ */
726
+ valueIndex() {
727
+ return this.isHorizontal() ? 0 : 1;
728
+ }
729
+ /** Index of the x-value (category/timestamp) inside a data point's `value` tuple. */
730
+ categoryIndex() {
731
+ return this.isHorizontal() ? 1 : 0;
732
+ }
733
+ /**
734
+ * Formatter for the on-chart value labels (styling.showValueLabels).
735
+ * Rounds to two decimals to match the numeric axis labels, and leaves
736
+ * categorical y-values untouched.
737
+ */
738
+ valueLabelFormatter(o) {
739
+ return (t) => {
740
+ const e = Array.isArray(t?.value) ? t.value[o] : t?.value;
741
+ if (e == null || e === "") return "";
742
+ const s = Number(e);
743
+ return isNaN(s) ? String(e) : String(Math.round(s * 100) / 100);
744
+ };
689
745
  }
690
746
  transformData() {
691
747
  if (!this?.inputData?.dataseries?.length) return;
692
- this.canvasList.forEach((t) => {
693
- t.series = [], t.doomed = !0;
694
- }), this.inputData.dataseries.sort((t, e) => (t.advanced?.drawOrder ?? 0) - (e.advanced?.drawOrder ?? 0)), this.inputData.dataseries.forEach((t) => {
695
- t.advanced ??= {}, t.advanced.chartName ??= "", t.data ??= [];
696
- const e = [...new Set(t.data.map((n) => n.pivot ?? ""))].sort(), i = et(t.backgroundColor).monochromatic(e.length).map((n) => n.toHexString()), r = et(t.borderColor).monochromatic(e.length).map((n) => n.toHexString());
697
- e.forEach((n, o) => {
698
- const l = n ?? "", h = t.label ?? "", a = l + (l && h ? " - " : "") + h, d = t.borderColor ? t.advanced?.chartName?.includes("#split#") ? t.borderColor : r[o] : void 0, c = t.backgroundColor ? t.advanced?.chartName?.includes("#split#") ? t.backgroundColor : i[o] : void 0, y = e.length === 1 ? t.data : t.data?.filter((p) => p.pivot === n);
699
- let m = this.inputData?.axis?.timeseries ? y?.map((p) => ({ name: p.x, value: [new Date(p.x ?? "").getTime(), p.y, p.r] })) ?? [] : y?.map((p) => ({ name: p.x, value: [p.x, p.y, p.r] })) ?? [], f = 0, w = 0;
700
- if (this.xAxisType() === "time" && m) {
701
- const p = m.map(($t) => $t.value[0]);
702
- f = Math.min(...p), w = Math.max(...p);
748
+ const o = this.isHorizontal(), t = this.valueIndex(), e = this.categoryIndex();
749
+ this.canvasList.forEach((i) => {
750
+ i.series = [], i.doomed = !0;
751
+ }), this.inputData.dataseries.sort((i, n) => (i.advanced?.drawOrder ?? 0) - (n.advanced?.drawOrder ?? 0)), this.inputData.dataseries.forEach((i) => {
752
+ i.advanced ??= {}, i.advanced.chartName ??= "", i.data ??= [];
753
+ const n = [...new Set(i.data.map((r) => r.pivot ?? ""))].sort(), a = ft(i.backgroundColor).monochromatic(n.length).map((r) => r.toHexString()), l = ft(i.borderColor).monochromatic(n.length).map((r) => r.toHexString());
754
+ n.forEach((r, d) => {
755
+ const h = r ?? "", c = i.label ?? "", p = h + (h && c ? " - " : "") + c, y = i.borderColor ? i.advanced?.chartName?.includes("#split#") ? i.borderColor : l[d] : void 0, x = i.backgroundColor ? i.advanced?.chartName?.includes("#split#") ? i.backgroundColor : a[d] : void 0, q = n.length === 1 ? i.data : i.data?.filter((u) => u.pivot === r), b = (u, S, m) => o ? [S, u, m] : [u, S, m];
756
+ let v = this.inputData?.axis?.timeseries ? q?.map((u) => ({
757
+ name: u.x,
758
+ value: b(new Date(u.x ?? "").getTime(), u.y, u.r)
759
+ })) ?? [] : q?.map((u) => ({ name: u.x, value: b(u.x, u.y, u.r) })) ?? [], N = 0, U = 0;
760
+ if (this.xAxisType() === "time" && v) {
761
+ const u = v.map((S) => S.value[e]);
762
+ N = Math.min(...u), U = Math.max(...u);
703
763
  }
704
- const D = {
705
- id: a,
706
- name: a,
707
- minDate: f,
708
- maxDate: w,
709
- type: t.type ?? "line",
764
+ const z = i.yAxis === "right" ? 1 : 0, R = {
765
+ id: p,
766
+ name: p,
767
+ minDate: N,
768
+ maxDate: U,
769
+ type: i.type ?? "line",
710
770
  lineStyle: {
711
- color: d,
712
- width: t.styling?.borderWidth ?? 2,
713
- type: t.styling?.borderDash ?? "solid"
771
+ color: y,
772
+ width: i.styling?.borderWidth ?? 2,
773
+ type: i.styling?.borderDash ?? "solid"
714
774
  },
715
775
  smooth: !1,
716
776
  itemStyle: {
717
- color: c,
718
- borderColor: d,
719
- borderWidth: t.styling?.borderWidth ?? 2
777
+ color: x,
778
+ borderColor: y,
779
+ borderWidth: i.styling?.borderWidth ?? 2
720
780
  },
721
- areaStyle: t.styling?.fill ? { color: c } : void 0,
722
- symbol: t.styling?.pointStyle ?? "circle",
723
- symbolSize: (p) => p[2] ?? 0,
724
- showSymbol: t.styling?.pointStyle !== "none",
725
- data: m ?? [],
726
- drawOrder: t.advanced?.drawOrder ?? 0
781
+ areaStyle: i.styling?.fill ? { color: x } : void 0,
782
+ symbol: i.styling?.pointStyle ?? "circle",
783
+ symbolSize: (u) => u[2] ?? 0,
784
+ showSymbol: i.styling?.pointStyle !== "none",
785
+ label: {
786
+ show: i.styling?.showValueLabels ?? !1,
787
+ // Bars grow upwards when vertical and rightwards when
788
+ // horizontal, so the label sits past the growing end.
789
+ position: o ? "right" : "top",
790
+ fontSize: 12,
791
+ formatter: this.valueLabelFormatter(t)
792
+ },
793
+ data: v ?? [],
794
+ drawOrder: i.advanced?.drawOrder ?? 0,
795
+ valueAxisIndex: z,
796
+ // The secondary value axis is the right y axis when vertical
797
+ // and the top x axis when horizontal.
798
+ xAxisIndex: o ? z : 0,
799
+ yAxisIndex: o ? 0 : z
727
800
  };
728
- let C = t.advanced?.chartName ?? "";
729
- C = C.replace("#split#", l);
730
- const O = this.setupChart(C), j = O?.series.map((p) => p.id) ?? [];
731
- let g = a, L = 2;
732
- for (; j.includes(g); )
733
- g = `${a}_${L++}`;
734
- D.id = g, O?.series.push(D);
801
+ let _ = i.advanced?.chartName ?? "";
802
+ _ = _.replace("#split#", h);
803
+ const w = this.setupChart(_), X = w?.series.map((u) => u.id) ?? [];
804
+ let D = p, it = 2;
805
+ for (; X.includes(D); )
806
+ D = `${p}_${it++}`;
807
+ R.id = D, w?.series.push(R);
735
808
  });
736
809
  });
737
810
  const s = [];
738
- this.canvasList.forEach((t, e) => {
739
- t.doomed && (t.echart?.dispose(), t.element?.remove(), s.push(e));
740
- }), s.forEach((t) => this.canvasList.delete(t)), this.canvasList = new Map(
741
- [...this.canvasList.entries()].sort(([t, e], [i, r]) => {
742
- const n = e.series?.[0].drawOrder ?? 0, o = r.series?.[0].drawOrder ?? 0;
743
- return n !== o ? n - o : t.localeCompare(i);
811
+ this.canvasList.forEach((i, n) => {
812
+ i.doomed && (i.echart?.dispose(), i.element?.remove(), s.push(n));
813
+ }), s.forEach((i) => this.canvasList.delete(i)), this.canvasList = new Map(
814
+ [...this.canvasList.entries()].sort(([i, n], [a, l]) => {
815
+ const r = n.series?.[0].drawOrder ?? 0, d = l.series?.[0].drawOrder ?? 0;
816
+ return r !== d ? r - d : i.localeCompare(a);
744
817
  })
745
- ), s.length > 0 && this.canvasList.forEach((t) => {
746
- t.echart?.resize();
818
+ ), s.length > 0 && this.canvasList.forEach((i) => {
819
+ i.echart?.resize();
747
820
  });
748
821
  }
749
822
  xAxisType() {
@@ -751,8 +824,8 @@ let $ = class extends U {
751
824
  if (this.inputData?.axis?.timeseries)
752
825
  return this.cachedXAxisType = "time", this.cachedXAxisType;
753
826
  this.cachedXAxisType = "value";
754
- for (const s of this.inputData?.dataseries ?? []) {
755
- const t = s.data?.find((e) => e.x !== void 0 && e.x !== null);
827
+ for (const o of this.inputData?.dataseries ?? []) {
828
+ const t = o.data?.find((e) => e.x !== void 0 && e.x !== null);
756
829
  if (t) {
757
830
  this.cachedXAxisType = isNaN(Number(t.x)) ? "category" : "value";
758
831
  break;
@@ -763,8 +836,8 @@ let $ = class extends U {
763
836
  yAxisType() {
764
837
  if (this.cachedYAxisType) return this.cachedYAxisType;
765
838
  this.cachedYAxisType = "value";
766
- for (const s of this.inputData?.dataseries ?? []) {
767
- const t = s.data?.find((e) => e.y !== void 0 && e.y !== null);
839
+ for (const o of this.inputData?.dataseries ?? []) {
840
+ const t = o.data?.find((e) => e.y !== void 0 && e.y !== null);
768
841
  if (t) {
769
842
  this.cachedYAxisType = isNaN(Number(t.y)) ? "category" : "value";
770
843
  break;
@@ -772,100 +845,165 @@ let $ = class extends U {
772
845
  }
773
846
  return this.cachedYAxisType;
774
847
  }
775
- calculateAnimationDuration(s, t) {
848
+ calculateAnimationDuration(o, t) {
776
849
  const e = Date.now();
777
- if (!(s.series.length === 1) || !this.inputData?.axis?.timeseries)
850
+ if (!(o.series.length === 1) || !this.inputData?.axis?.timeseries)
778
851
  return this.updateThresholdMs;
779
- let r = 0;
852
+ let i = 0;
780
853
  if (this.xAxisType() === "time")
781
- for (const l of s.series) {
782
- const h = l.data;
783
- for (const a of h || []) {
784
- const d = a.value?.[0] || 0;
785
- d > r && (r = d);
854
+ for (const l of o.series) {
855
+ const r = l.data;
856
+ for (const d of r || []) {
857
+ const h = d.value?.[0] || 0;
858
+ h > i && (i = h);
786
859
  }
787
860
  }
788
861
  else
789
- r = e;
790
- if (s.lastMaxTimestamp = s.lastMaxTimestamp ?? 0, r > s.lastMaxTimestamp) {
791
- if (s.updateIntervals ??= [], s.lastUpdateTime > 0) {
792
- const l = e - s.lastUpdateTime;
793
- s.updateIntervals.push(l), s.updateIntervals.length > this.maxIntervalSamples && s.updateIntervals.shift();
862
+ i = e;
863
+ if (o.lastMaxTimestamp = o.lastMaxTimestamp ?? 0, i > o.lastMaxTimestamp) {
864
+ if (o.updateIntervals ??= [], o.lastUpdateTime > 0) {
865
+ const l = e - o.lastUpdateTime;
866
+ o.updateIntervals.push(l), o.updateIntervals.length > this.maxIntervalSamples && o.updateIntervals.shift();
794
867
  }
795
- s.lastUpdateTime = e, s.lastMaxTimestamp = r;
868
+ o.lastUpdateTime = e, o.lastMaxTimestamp = i;
796
869
  }
797
- return s.updateIntervals && s.updateIntervals.length > 0 ? s.updateIntervals.reduce((l, h) => l + h, 0) / s.updateIntervals.length : this.updateThresholdMs;
870
+ return o.updateIntervals && o.updateIntervals.length > 0 ? o.updateIntervals.reduce((l, r) => l + r, 0) / o.updateIntervals.length : this.updateThresholdMs;
798
871
  }
799
872
  applyData() {
800
- if (this.chartContainer) {
801
- for (const s of this.canvasList.values())
802
- s.element && this.chartContainer.appendChild(s.element);
803
- this.canvasList.forEach((s, t) => {
804
- s.series.sort((f, w) => f.name > w.name ? 1 : -1);
805
- const e = this.inputData?.axis?.showLegend ?? !0, i = this.inputData?.axis?.showTitle ?? !0, r = this.inputData?.axis?.showXAxis ?? !0, n = this.inputData?.axis?.showYAxis ?? !0, o = this.inputData?.axis?.showBox ?? !1, l = JSON.stringify({
806
- showLegend: e,
807
- showTitle: i,
808
- showXAxis: r,
809
- showYAxis: n,
810
- showBox: o,
811
- xAxisLabel: this.inputData?.axis?.xAxisLabel,
812
- yAxisLabel: this.inputData?.axis?.yAxisLabel,
813
- xAxisZoom: this.inputData?.axis?.xAxisZoom,
814
- yAxisScaling: this.inputData?.axis?.yAxisScaling,
815
- xAxisType: this.xAxisType(),
816
- yAxisType: this.yAxisType(),
817
- seriesCount: s.series.length,
818
- seriesNames: s.series.map((f) => f.name).join(",")
819
- }), h = s.lastConfig !== l;
820
- s.lastConfig = l;
821
- const a = h ? window.structuredClone(this.template) : s.echart?.getOption() ?? window.structuredClone(this.template);
822
- if (a.title.text = t, a.title.show = i, a.xAxis.name = this.inputData?.axis?.xAxisLabel ?? "", a.xAxis.type = this.xAxisType(), a.xAxis.show = r, this.xAxisType() === "time") {
823
- const f = s.series.map((g) => g.minDate ?? 1 / 0).reduce((g, L) => Math.min(g, L), 1 / 0), w = s.series.map((g) => g.maxDate ?? 0).reduce((g, L) => Math.max(g, L), 0), D = Number(this.timeRange?.start), C = Number(this.timeRange?.end), O = isNaN(D) ? f : D, j = isNaN(C) ? w : C;
824
- a.xAxis = {
825
- ...a.xAxis,
826
- min: O !== 1 / 0 ? O : (/* @__PURE__ */ new Date()).getTime() - 1440 * 60 * 1e3,
827
- max: j !== 0 ? j : (/* @__PURE__ */ new Date()).getTime()
828
- };
829
- }
830
- a.dataZoom[0].show = this.inputData?.axis?.xAxisZoom ?? !1, a.toolbox.show = this.inputData?.axis?.xAxisZoom ?? !1;
831
- const d = this.inputData?.axis?.yAxisLabel ?? "", c = n && !!d;
832
- a.yAxis.type = this.yAxisType(), a.yAxis.name = d, a.yAxis.scale = this.inputData?.axis?.yAxisScaling ?? !1, a.yAxis.show = n, a.yAxis.nameLocation = "end", a.yAxis.nameGap = 10, a.yAxis.nameTextStyle = { align: "left" }, a.yAxis.axisLine = { show: !0 }, ["value", "log"].includes(a.yAxis.type) && (a.yAxis.axisLabel = {
833
- "font-size": 14,
834
- formatter: (f) => Math.round(f * 100) / 100
835
- }), a.series = s.series, a.legend.show = e;
836
- const y = i || c ? 30 : 0;
837
- a.grid = {
838
- ...a.grid,
839
- show: o,
840
- backgroundColor: "transparent",
841
- borderWidth: o ? 1 : 0,
842
- borderColor: this.themeTitleColor ?? "#ccc",
843
- top: y,
844
- bottom: r ? 20 : 0,
845
- left: n ? 20 : 0,
846
- right: 0,
847
- containLabel: r || n
873
+ if (!this.chartContainer) return;
874
+ const o = this.isHorizontal();
875
+ for (const t of this.canvasList.values())
876
+ t.element && this.chartContainer.appendChild(t.element);
877
+ this.canvasList.forEach((t, e) => {
878
+ t.series.sort((m, I) => m.name > I.name ? 1 : -1);
879
+ const s = this.inputData?.axis?.showLegend ?? !0, i = this.inputData?.axis?.showTitle ?? !0, n = this.inputData?.axis?.showXAxis ?? !0, a = this.inputData?.axis?.showYAxis ?? !0, l = this.inputData?.axis?.showBox ?? !1, r = JSON.stringify({
880
+ showLegend: s,
881
+ showTitle: i,
882
+ showXAxis: n,
883
+ showYAxis: a,
884
+ showBox: l,
885
+ xAxisLabel: this.inputData?.axis?.xAxisLabel,
886
+ yAxisLabel: this.inputData?.axis?.yAxisLabel,
887
+ xAxisZoom: this.inputData?.axis?.xAxisZoom,
888
+ yAxisScaling: this.inputData?.axis?.yAxisScaling,
889
+ yAxisLabelRight: this.inputData?.axis?.yAxisLabelRight,
890
+ yAxisScalingRight: this.inputData?.axis?.yAxisScalingRight,
891
+ xAxisType: this.xAxisType(),
892
+ yAxisType: this.yAxisType(),
893
+ // Flipping the orientation swaps which option key holds the
894
+ // single category axis and which holds the value-axis array,
895
+ // so it must force a notMerge rebuild rather than a merge.
896
+ orientation: this.inputData?.axis?.orientation ?? "vertical",
897
+ seriesCount: t.series.length,
898
+ seriesNames: t.series.map((m) => m.name).join(","),
899
+ seriesAxes: t.series.map((m) => m.valueAxisIndex ?? 0).join(","),
900
+ seriesLabels: t.series.map((m) => m.label?.show ? 1 : 0).join(",")
901
+ }), d = t.lastConfig !== r;
902
+ t.lastConfig = r;
903
+ const h = d ? window.structuredClone(this.template) : t.echart?.getOption() ?? window.structuredClone(this.template);
904
+ if (h.title.text = e, h.title.show = i, h.xAxis.name = this.inputData?.axis?.xAxisLabel ?? "", h.xAxis.type = this.xAxisType(), h.xAxis.show = n, this.xAxisType() === "time") {
905
+ const m = t.series.map((C) => C.minDate ?? 1 / 0).reduce((C, st) => Math.min(C, st), 1 / 0), I = t.series.map((C) => C.maxDate ?? 0).reduce((C, st) => Math.max(C, st), 0), Y = Number(this.timeRange?.start), pt = Number(this.timeRange?.end), ut = isNaN(Y) ? m : Y, mt = isNaN(pt) ? I : pt;
906
+ h.xAxis = {
907
+ ...h.xAxis,
908
+ min: ut !== 1 / 0 ? ut : (/* @__PURE__ */ new Date()).getTime() - 1440 * 60 * 1e3,
909
+ max: mt !== 0 ? mt : (/* @__PURE__ */ new Date()).getTime()
848
910
  };
849
- const m = this.updateThresholdMs;
850
- a.animation = !0, a.animationEasing = "linear", a.animationDuration = m, a.animationDurationUpdate = m, s.echart?.on("finished", () => s.drawing = !1), s.drawing = !0, s.echart?.setOption(a, { notMerge: h, lazyUpdate: !0 });
851
- });
852
- }
911
+ }
912
+ const c = this.inputData?.axis?.xAxisZoom ?? !1;
913
+ h.dataZoom[0].show = c, h.toolbox.show = c;
914
+ const p = Array.isArray(h.yAxis) ? h.yAxis : [h.yAxis ?? {}];
915
+ for (; p.length < 2; ) p.push({});
916
+ h.yAxis = p;
917
+ const y = t.series.some((m) => !!m.label?.show), x = t.series.some((m) => (m.valueAxisIndex ?? 0) === 1), q = t.series.length === 0 || t.series.some((m) => (m.valueAxisIndex ?? 0) === 0), b = a && q, v = a && x, N = this.inputData?.axis?.yAxisLabel ?? "", U = this.inputData?.axis?.yAxisLabelRight ?? "", z = b && !!N, R = v && !!U, _ = this.yAxisType(), w = ["value", "log"].includes(_ ?? "") ? { fontSize: 14, formatter: (m) => Math.round(m * 100) / 100 } : void 0;
918
+ if (Object.assign(p[0], {
919
+ type: _,
920
+ name: N,
921
+ scale: this.inputData?.axis?.yAxisScaling ?? !1,
922
+ show: b,
923
+ position: "left",
924
+ nameLocation: "end",
925
+ nameGap: 10,
926
+ nameTextStyle: { align: "left" },
927
+ axisLine: { show: !0 }
928
+ }), w && (p[0].axisLabel = w), Object.assign(p[1], {
929
+ type: _,
930
+ name: v ? U : "",
931
+ scale: this.inputData?.axis?.yAxisScalingRight ?? !1,
932
+ show: v,
933
+ position: "right",
934
+ nameLocation: "end",
935
+ nameGap: 10,
936
+ nameTextStyle: { align: "right" },
937
+ axisLine: { show: !0 },
938
+ splitLine: { show: !1 }
939
+ }), w && (p[1].axisLabel = w), o) {
940
+ const m = Array.isArray(h.xAxis) ? h.xAxis[0] : h.xAxis;
941
+ h.yAxis = {
942
+ ...m,
943
+ position: "left",
944
+ // Read top-to-bottom, so the first data point is the top
945
+ // bar — the convention for ranked horizontal bar charts.
946
+ inverse: !0,
947
+ // 'start' is the top of an inverted axis, which keeps the
948
+ // axis name clear of the value axis running along the bottom.
949
+ // When a secondary value axis is in use it is drawn along
950
+ // the top, so the name has to clear its tick labels too.
951
+ nameLocation: "start",
952
+ nameGap: v ? 30 : 10,
953
+ nameTextStyle: { align: "left" }
954
+ }, h.xAxis = p.map((I, Y) => ({
955
+ ...I,
956
+ position: Y === 0 ? "bottom" : "top",
957
+ nameLocation: "middle",
958
+ nameGap: 27,
959
+ nameTextStyle: { align: "center" }
960
+ })), h.dataZoom = [
961
+ { ...h.dataZoom?.[0] ?? {}, xAxisIndex: void 0, yAxisIndex: [0] }
962
+ ];
963
+ }
964
+ h.series = t.series, h.legend.show = s;
965
+ const X = (i || z || R ? 30 : 0) + (s && R ? 25 : 0), D = 40, it = c && !o ? D : 0, u = c && o ? D : 0;
966
+ h.grid = {
967
+ ...h.grid,
968
+ show: l,
969
+ backgroundColor: "transparent",
970
+ borderWidth: l ? 1 : 0,
971
+ borderColor: this.themeTitleColor ?? "#ccc",
972
+ top: X,
973
+ // The category axis sits at the bottom when vertical and on the
974
+ // left when horizontal; the value axis is the other way round.
975
+ // The zoom slider is not accounted for by `containLabel`, so its
976
+ // thickness has to be reserved here as well — see ZOOM_THICKNESS.
977
+ bottom: ((o ? b : n) ? 20 : 0) + it,
978
+ left: (o ? n : b) ? 20 : 0,
979
+ // A horizontal chart grows towards the right edge, so the last
980
+ // axis tick and any value label printed past the end of a bar
981
+ // need room that `containLabel` does not reserve for them.
982
+ right: (o ? y ? 45 : 15 : 0) + u,
983
+ containLabel: n || a
984
+ }, c && Object.assign(
985
+ h.dataZoom[0],
986
+ o ? { right: 0, top: X, bottom: 20, left: void 0 } : { bottom: 0, left: void 0, right: void 0, top: void 0 }
987
+ );
988
+ const S = this.updateThresholdMs;
989
+ h.animation = !0, h.animationEasing = "linear", h.animationDuration = S, h.animationDurationUpdate = S, t.echart?.on("finished", () => t.drawing = !1), t.drawing = !0, t.echart?.setOption(h, { notMerge: d, lazyUpdate: !0 });
990
+ });
853
991
  }
854
992
  deleteCharts() {
855
- this.canvasList.forEach((s, t) => {
856
- s.echart?.dispose(), s.element?.remove(), this.canvasList.delete(t);
993
+ this.canvasList.forEach((o, t) => {
994
+ o.echart?.dispose(), o.element?.remove(), this.canvasList.delete(t);
857
995
  });
858
996
  }
859
- setupChart(s) {
860
- const t = this.canvasList.get(s);
997
+ setupChart(o) {
998
+ const t = this.canvasList.get(o);
861
999
  if (t)
862
1000
  return delete t.doomed, t;
863
1001
  if (!this.chartContainer)
864
1002
  return;
865
1003
  const e = document.createElement("div");
866
- e.setAttribute("name", s), e.setAttribute("class", "sizer"), this.chartContainer.appendChild(e);
867
- const r = {
868
- echart: Y.init(e, this.theme?.theme_name),
1004
+ e.setAttribute("name", o), e.setAttribute("class", "sizer"), this.chartContainer.appendChild(e);
1005
+ const i = {
1006
+ echart: nt.init(e, this.theme?.theme_name),
869
1007
  series: [],
870
1008
  element: e,
871
1009
  drawing: !1,
@@ -873,13 +1011,13 @@ let $ = class extends U {
873
1011
  updateIntervals: [],
874
1012
  lastMaxTimestamp: 0
875
1013
  };
876
- return this.canvasList.set(s, r), r;
1014
+ return this.canvasList.set(o, i), i;
877
1015
  }
878
1016
  disconnectedCallback() {
879
1017
  this.resizeObserver && this.chartContainer && (this.resizeObserver.unobserve(this.chartContainer), this.resizeObserver.disconnect()), super.disconnectedCallback();
880
1018
  }
881
1019
  render() {
882
- return Vt`
1020
+ return oe`
883
1021
  <div
884
1022
  class="wrapper"
885
1023
  style="background-color: ${this.themeBgColor}; color: ${this.themeTitleColor}"
@@ -902,7 +1040,7 @@ let $ = class extends U {
902
1040
  `;
903
1041
  }
904
1042
  };
905
- $.styles = Pt`
1043
+ g.styles = Vt`
906
1044
  :host {
907
1045
  display: block;
908
1046
  font-family: sans-serif;
@@ -979,34 +1117,34 @@ $.styles = Pt`
979
1117
  justify-content: center;
980
1118
  }
981
1119
  `;
982
- x([
983
- V({ type: Object })
984
- ], $.prototype, "inputData", 2);
985
- x([
986
- V({ type: Object })
987
- ], $.prototype, "theme", 2);
988
- x([
989
- V({ type: Object })
990
- ], $.prototype, "timeRange", 2);
991
- x([
992
- X()
993
- ], $.prototype, "canvasList", 2);
994
- x([
995
- X()
996
- ], $.prototype, "themeBgColor", 2);
997
- x([
998
- X()
999
- ], $.prototype, "themeTitleColor", 2);
1000
- x([
1001
- X()
1002
- ], $.prototype, "themeSubtitleColor", 2);
1003
- x([
1004
- ne(".chart-container")
1005
- ], $.prototype, "chartContainer", 2);
1006
- $ = x([
1007
- ee("widget-linechart-1.6.34")
1008
- ], $);
1120
+ $([
1121
+ tt({ type: Object })
1122
+ ], g.prototype, "inputData", 2);
1123
+ $([
1124
+ tt({ type: Object })
1125
+ ], g.prototype, "theme", 2);
1126
+ $([
1127
+ tt({ type: Object })
1128
+ ], g.prototype, "timeRange", 2);
1129
+ $([
1130
+ et()
1131
+ ], g.prototype, "canvasList", 2);
1132
+ $([
1133
+ et()
1134
+ ], g.prototype, "themeBgColor", 2);
1135
+ $([
1136
+ et()
1137
+ ], g.prototype, "themeTitleColor", 2);
1138
+ $([
1139
+ et()
1140
+ ], g.prototype, "themeSubtitleColor", 2);
1141
+ $([
1142
+ xe(".chart-container")
1143
+ ], g.prototype, "chartContainer", 2);
1144
+ g = $([
1145
+ me("widget-linechart-1.7.2")
1146
+ ], g);
1009
1147
  export {
1010
- $ as WidgetLinechart
1148
+ g as WidgetLinechart
1011
1149
  };
1012
1150
  //# sourceMappingURL=widget-linechart.js.map