@record-evolution/widget-form 1.0.32 → 1.0.34

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.
@@ -9,200 +9,200 @@ import "@material/web/checkbox/checkbox.js";
9
9
  import "@material/web/select/outlined-select.js";
10
10
  import "@material/web/select/select-option.js";
11
11
  const R = globalThis, W = R.ShadowRoot && (R.ShadyCSS === void 0 || R.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, K = /* @__PURE__ */ Symbol(), Y = /* @__PURE__ */ new WeakMap();
12
- let dt = class {
13
- constructor(t, i, r) {
14
- if (this._$cssResult$ = !0, r !== K) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
15
- this.cssText = t, this.t = i;
12
+ let me = class {
13
+ constructor(e, r, i) {
14
+ if (this._$cssResult$ = !0, i !== K) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
15
+ this.cssText = e, this.t = r;
16
16
  }
17
17
  get styleSheet() {
18
- let t = this.o;
19
- const i = this.t;
20
- if (W && t === void 0) {
21
- const r = i !== void 0 && i.length === 1;
22
- r && (t = Y.get(i)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && Y.set(i, t));
18
+ let e = this.o;
19
+ const r = this.t;
20
+ if (W && e === void 0) {
21
+ const i = r !== void 0 && r.length === 1;
22
+ i && (e = Y.get(r)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && Y.set(r, e));
23
23
  }
24
- return t;
24
+ return e;
25
25
  }
26
26
  toString() {
27
27
  return this.cssText;
28
28
  }
29
29
  };
30
- const _t = (e) => new dt(typeof e == "string" ? e : e + "", void 0, K), vt = (e, ...t) => {
31
- const i = e.length === 1 ? e[0] : t.reduce(((r, s, o) => r + ((n) => {
30
+ const Ae = (t) => new me(typeof t == "string" ? t : t + "", void 0, K), xe = (t, ...e) => {
31
+ const r = t.length === 1 ? t[0] : e.reduce(((i, s, o) => i + ((n) => {
32
32
  if (n._$cssResult$ === !0) return n.cssText;
33
33
  if (typeof n == "number") return n;
34
34
  throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
35
- })(s) + e[o + 1]), e[0]);
36
- return new dt(i, e, K);
37
- }, At = (e, t) => {
38
- if (W) e.adoptedStyleSheets = t.map(((i) => i instanceof CSSStyleSheet ? i : i.styleSheet));
39
- else for (const i of t) {
40
- const r = document.createElement("style"), s = R.litNonce;
41
- s !== void 0 && r.setAttribute("nonce", s), r.textContent = i.cssText, e.appendChild(r);
42
- }
43
- }, tt = W ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
44
- let i = "";
45
- for (const r of t.cssRules) i += r.cssText;
46
- return _t(i);
47
- })(e) : e;
48
- const { is: xt, defineProperty: wt, getOwnPropertyDescriptor: St, getOwnPropertyNames: Et, getOwnPropertySymbols: Ct, getPrototypeOf: kt } = Object, N = globalThis, et = N.trustedTypes, Dt = et ? et.emptyScript : "", Pt = N.reactiveElementPolyfillSupport, V = (e, t) => e, H = { toAttribute(e, t) {
49
- switch (t) {
35
+ })(s) + t[o + 1]), t[0]);
36
+ return new me(r, t, K);
37
+ }, we = (t, e) => {
38
+ if (W) t.adoptedStyleSheets = e.map(((r) => r instanceof CSSStyleSheet ? r : r.styleSheet));
39
+ else for (const r of e) {
40
+ const i = document.createElement("style"), s = R.litNonce;
41
+ s !== void 0 && i.setAttribute("nonce", s), i.textContent = r.cssText, t.appendChild(i);
42
+ }
43
+ }, ee = W ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
44
+ let r = "";
45
+ for (const i of e.cssRules) r += i.cssText;
46
+ return Ae(r);
47
+ })(t) : t;
48
+ const { is: Se, defineProperty: Ee, getOwnPropertyDescriptor: Ce, getOwnPropertyNames: ke, getOwnPropertySymbols: De, getPrototypeOf: Pe } = Object, N = globalThis, te = N.trustedTypes, Ve = te ? te.emptyScript : "", Fe = N.reactiveElementPolyfillSupport, V = (t, e) => t, H = { toAttribute(t, e) {
49
+ switch (e) {
50
50
  case Boolean:
51
- e = e ? Dt : null;
51
+ t = t ? Ve : null;
52
52
  break;
53
53
  case Object:
54
54
  case Array:
55
- e = e == null ? e : JSON.stringify(e);
55
+ t = t == null ? t : JSON.stringify(t);
56
56
  }
57
- return e;
58
- }, fromAttribute(e, t) {
59
- let i = e;
60
- switch (t) {
57
+ return t;
58
+ }, fromAttribute(t, e) {
59
+ let r = t;
60
+ switch (e) {
61
61
  case Boolean:
62
- i = e !== null;
62
+ r = t !== null;
63
63
  break;
64
64
  case Number:
65
- i = e === null ? null : Number(e);
65
+ r = t === null ? null : Number(t);
66
66
  break;
67
67
  case Object:
68
68
  case Array:
69
69
  try {
70
- i = JSON.parse(e);
70
+ r = JSON.parse(t);
71
71
  } catch {
72
- i = null;
72
+ r = null;
73
73
  }
74
74
  }
75
- return i;
76
- } }, Z = (e, t) => !xt(e, t), it = { attribute: !0, type: String, converter: H, reflect: !1, useDefault: !1, hasChanged: Z };
75
+ return r;
76
+ } }, Z = (t, e) => !Se(t, e), re = { attribute: !0, type: String, converter: H, reflect: !1, useDefault: !1, hasChanged: Z };
77
77
  Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), N.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
78
  let E = class extends HTMLElement {
79
- static addInitializer(t) {
80
- this._$Ei(), (this.l ??= []).push(t);
79
+ static addInitializer(e) {
80
+ this._$Ei(), (this.l ??= []).push(e);
81
81
  }
82
82
  static get observedAttributes() {
83
83
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
84
84
  }
85
- static createProperty(t, i = it) {
86
- if (i.state && (i.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((i = Object.create(i)).wrapped = !0), this.elementProperties.set(t, i), !i.noAccessor) {
87
- const r = /* @__PURE__ */ Symbol(), s = this.getPropertyDescriptor(t, r, i);
88
- s !== void 0 && wt(this.prototype, t, s);
85
+ static createProperty(e, r = re) {
86
+ if (r.state && (r.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((r = Object.create(r)).wrapped = !0), this.elementProperties.set(e, r), !r.noAccessor) {
87
+ const i = /* @__PURE__ */ Symbol(), s = this.getPropertyDescriptor(e, i, r);
88
+ s !== void 0 && Ee(this.prototype, e, s);
89
89
  }
90
90
  }
91
- static getPropertyDescriptor(t, i, r) {
92
- const { get: s, set: o } = St(this.prototype, t) ?? { get() {
93
- return this[i];
91
+ static getPropertyDescriptor(e, r, i) {
92
+ const { get: s, set: o } = Ce(this.prototype, e) ?? { get() {
93
+ return this[r];
94
94
  }, set(n) {
95
- this[i] = n;
95
+ this[r] = n;
96
96
  } };
97
97
  return { get: s, set(n) {
98
98
  const h = s?.call(this);
99
- o?.call(this, n), this.requestUpdate(t, h, r);
99
+ o?.call(this, n), this.requestUpdate(e, h, i);
100
100
  }, configurable: !0, enumerable: !0 };
101
101
  }
102
- static getPropertyOptions(t) {
103
- return this.elementProperties.get(t) ?? it;
102
+ static getPropertyOptions(e) {
103
+ return this.elementProperties.get(e) ?? re;
104
104
  }
105
105
  static _$Ei() {
106
106
  if (this.hasOwnProperty(V("elementProperties"))) return;
107
- const t = kt(this);
108
- t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
107
+ const e = Pe(this);
108
+ e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
109
109
  }
110
110
  static finalize() {
111
111
  if (this.hasOwnProperty(V("finalized"))) return;
112
112
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(V("properties"))) {
113
- const i = this.properties, r = [...Et(i), ...Ct(i)];
114
- for (const s of r) this.createProperty(s, i[s]);
113
+ const r = this.properties, i = [...ke(r), ...De(r)];
114
+ for (const s of i) this.createProperty(s, r[s]);
115
115
  }
116
- const t = this[Symbol.metadata];
117
- if (t !== null) {
118
- const i = litPropertyMetadata.get(t);
119
- if (i !== void 0) for (const [r, s] of i) this.elementProperties.set(r, s);
116
+ const e = this[Symbol.metadata];
117
+ if (e !== null) {
118
+ const r = litPropertyMetadata.get(e);
119
+ if (r !== void 0) for (const [i, s] of r) this.elementProperties.set(i, s);
120
120
  }
121
121
  this._$Eh = /* @__PURE__ */ new Map();
122
- for (const [i, r] of this.elementProperties) {
123
- const s = this._$Eu(i, r);
124
- s !== void 0 && this._$Eh.set(s, i);
122
+ for (const [r, i] of this.elementProperties) {
123
+ const s = this._$Eu(r, i);
124
+ s !== void 0 && this._$Eh.set(s, r);
125
125
  }
126
126
  this.elementStyles = this.finalizeStyles(this.styles);
127
127
  }
128
- static finalizeStyles(t) {
129
- const i = [];
130
- if (Array.isArray(t)) {
131
- const r = new Set(t.flat(1 / 0).reverse());
132
- for (const s of r) i.unshift(tt(s));
133
- } else t !== void 0 && i.push(tt(t));
134
- return i;
128
+ static finalizeStyles(e) {
129
+ const r = [];
130
+ if (Array.isArray(e)) {
131
+ const i = new Set(e.flat(1 / 0).reverse());
132
+ for (const s of i) r.unshift(ee(s));
133
+ } else e !== void 0 && r.push(ee(e));
134
+ return r;
135
135
  }
136
- static _$Eu(t, i) {
137
- const r = i.attribute;
138
- return r === !1 ? void 0 : typeof r == "string" ? r : typeof t == "string" ? t.toLowerCase() : void 0;
136
+ static _$Eu(e, r) {
137
+ const i = r.attribute;
138
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof e == "string" ? e.toLowerCase() : void 0;
139
139
  }
140
140
  constructor() {
141
141
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
142
142
  }
143
143
  _$Ev() {
144
- this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
144
+ this._$ES = new Promise(((e) => this.enableUpdating = e)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((e) => e(this)));
145
145
  }
146
- addController(t) {
147
- (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
146
+ addController(e) {
147
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
148
148
  }
149
- removeController(t) {
150
- this._$EO?.delete(t);
149
+ removeController(e) {
150
+ this._$EO?.delete(e);
151
151
  }
152
152
  _$E_() {
153
- const t = /* @__PURE__ */ new Map(), i = this.constructor.elementProperties;
154
- for (const r of i.keys()) this.hasOwnProperty(r) && (t.set(r, this[r]), delete this[r]);
155
- t.size > 0 && (this._$Ep = t);
153
+ const e = /* @__PURE__ */ new Map(), r = this.constructor.elementProperties;
154
+ for (const i of r.keys()) this.hasOwnProperty(i) && (e.set(i, this[i]), delete this[i]);
155
+ e.size > 0 && (this._$Ep = e);
156
156
  }
157
157
  createRenderRoot() {
158
- const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
159
- return At(t, this.constructor.elementStyles), t;
158
+ const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
159
+ return we(e, this.constructor.elementStyles), e;
160
160
  }
161
161
  connectedCallback() {
162
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
162
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((e) => e.hostConnected?.()));
163
163
  }
164
- enableUpdating(t) {
164
+ enableUpdating(e) {
165
165
  }
166
166
  disconnectedCallback() {
167
- this._$EO?.forEach(((t) => t.hostDisconnected?.()));
167
+ this._$EO?.forEach(((e) => e.hostDisconnected?.()));
168
168
  }
169
- attributeChangedCallback(t, i, r) {
170
- this._$AK(t, r);
169
+ attributeChangedCallback(e, r, i) {
170
+ this._$AK(e, i);
171
171
  }
172
- _$ET(t, i) {
173
- const r = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, r);
174
- if (s !== void 0 && r.reflect === !0) {
175
- const o = (r.converter?.toAttribute !== void 0 ? r.converter : H).toAttribute(i, r.type);
176
- this._$Em = t, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
172
+ _$ET(e, r) {
173
+ const i = this.constructor.elementProperties.get(e), s = this.constructor._$Eu(e, i);
174
+ if (s !== void 0 && i.reflect === !0) {
175
+ const o = (i.converter?.toAttribute !== void 0 ? i.converter : H).toAttribute(r, i.type);
176
+ this._$Em = e, o == null ? this.removeAttribute(s) : this.setAttribute(s, o), this._$Em = null;
177
177
  }
178
178
  }
179
- _$AK(t, i) {
180
- const r = this.constructor, s = r._$Eh.get(t);
179
+ _$AK(e, r) {
180
+ const i = this.constructor, s = i._$Eh.get(e);
181
181
  if (s !== void 0 && this._$Em !== s) {
182
- const o = r.getPropertyOptions(s), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : H;
183
- this._$Em = s, this[s] = n.fromAttribute(i, o.type) ?? this._$Ej?.get(s) ?? null, this._$Em = null;
182
+ const o = i.getPropertyOptions(s), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : H;
183
+ this._$Em = s, this[s] = n.fromAttribute(r, o.type) ?? this._$Ej?.get(s) ?? null, this._$Em = null;
184
184
  }
185
185
  }
186
- requestUpdate(t, i, r) {
187
- if (t !== void 0) {
188
- const s = this.constructor, o = this[t];
189
- if (r ??= s.getPropertyOptions(t), !((r.hasChanged ?? Z)(o, i) || r.useDefault && r.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(s._$Eu(t, r)))) return;
190
- this.C(t, i, r);
186
+ requestUpdate(e, r, i) {
187
+ if (e !== void 0) {
188
+ const s = this.constructor, o = this[e];
189
+ if (i ??= s.getPropertyOptions(e), !((i.hasChanged ?? Z)(o, r) || i.useDefault && i.reflect && o === this._$Ej?.get(e) && !this.hasAttribute(s._$Eu(e, i)))) return;
190
+ this.C(e, r, i);
191
191
  }
192
192
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
193
193
  }
194
- C(t, i, { useDefault: r, reflect: s, wrapped: o }, n) {
195
- r && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? i ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || r || (i = void 0), this._$AL.set(t, i)), s === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
194
+ C(e, r, { useDefault: i, reflect: s, wrapped: o }, n) {
195
+ i && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, n ?? r ?? this[e]), o !== !0 || n !== void 0) || (this._$AL.has(e) || (this.hasUpdated || i || (r = void 0), this._$AL.set(e, r)), s === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
196
196
  }
197
197
  async _$EP() {
198
198
  this.isUpdatePending = !0;
199
199
  try {
200
200
  await this._$ES;
201
- } catch (i) {
202
- Promise.reject(i);
201
+ } catch (r) {
202
+ Promise.reject(r);
203
203
  }
204
- const t = this.scheduleUpdate();
205
- return t != null && await t, !this.isUpdatePending;
204
+ const e = this.scheduleUpdate();
205
+ return e != null && await e, !this.isUpdatePending;
206
206
  }
207
207
  scheduleUpdate() {
208
208
  return this.performUpdate();
@@ -214,25 +214,25 @@ let E = class extends HTMLElement {
214
214
  for (const [s, o] of this._$Ep) this[s] = o;
215
215
  this._$Ep = void 0;
216
216
  }
217
- const r = this.constructor.elementProperties;
218
- if (r.size > 0) for (const [s, o] of r) {
217
+ const i = this.constructor.elementProperties;
218
+ if (i.size > 0) for (const [s, o] of i) {
219
219
  const { wrapped: n } = o, h = this[s];
220
220
  n !== !0 || this._$AL.has(s) || h === void 0 || this.C(s, void 0, o, h);
221
221
  }
222
222
  }
223
- let t = !1;
224
- const i = this._$AL;
223
+ let e = !1;
224
+ const r = this._$AL;
225
225
  try {
226
- t = this.shouldUpdate(i), t ? (this.willUpdate(i), this._$EO?.forEach(((r) => r.hostUpdate?.())), this.update(i)) : this._$EM();
227
- } catch (r) {
228
- throw t = !1, this._$EM(), r;
226
+ e = this.shouldUpdate(r), e ? (this.willUpdate(r), this._$EO?.forEach(((i) => i.hostUpdate?.())), this.update(r)) : this._$EM();
227
+ } catch (i) {
228
+ throw e = !1, this._$EM(), i;
229
229
  }
230
- t && this._$AE(i);
230
+ e && this._$AE(r);
231
231
  }
232
- willUpdate(t) {
232
+ willUpdate(e) {
233
233
  }
234
- _$AE(t) {
235
- this._$EO?.forEach(((i) => i.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
234
+ _$AE(e) {
235
+ this._$EO?.forEach(((r) => r.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
236
236
  }
237
237
  _$EM() {
238
238
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
@@ -243,83 +243,83 @@ let E = class extends HTMLElement {
243
243
  getUpdateComplete() {
244
244
  return this._$ES;
245
245
  }
246
- shouldUpdate(t) {
246
+ shouldUpdate(e) {
247
247
  return !0;
248
248
  }
249
- update(t) {
250
- this._$Eq &&= this._$Eq.forEach(((i) => this._$ET(i, this[i]))), this._$EM();
249
+ update(e) {
250
+ this._$Eq &&= this._$Eq.forEach(((r) => this._$ET(r, this[r]))), this._$EM();
251
251
  }
252
- updated(t) {
252
+ updated(e) {
253
253
  }
254
- firstUpdated(t) {
254
+ firstUpdated(e) {
255
255
  }
256
256
  };
257
- E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[V("elementProperties")] = /* @__PURE__ */ new Map(), E[V("finalized")] = /* @__PURE__ */ new Map(), Pt?.({ ReactiveElement: E }), (N.reactiveElementVersions ??= []).push("2.1.0");
258
- const J = globalThis, B = J.trustedTypes, rt = B ? B.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, pt = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, mt = "?" + _, Vt = `<${mt}>`, w = document, O = () => w.createComment(""), T = (e) => e === null || typeof e != "object" && typeof e != "function", Q = Array.isArray, Ft = (e) => Q(e) || typeof e?.[Symbol.iterator] == "function", I = `[
259
- \f\r]`, D = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, st = /-->/g, ot = />/g, v = RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
260
- \f\r"'\`<>=]|("|')|))|$)`, "g"), nt = /'/g, lt = /"/g, ft = /^(?:script|style|textarea|title)$/i, Ot = (e) => (t, ...i) => ({ _$litType$: e, strings: t, values: i }), $ = Ot(1), S = /* @__PURE__ */ Symbol.for("lit-noChange"), d = /* @__PURE__ */ Symbol.for("lit-nothing"), at = /* @__PURE__ */ new WeakMap(), x = w.createTreeWalker(w, 129);
261
- function $t(e, t) {
262
- if (!Q(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
263
- return rt !== void 0 ? rt.createHTML(t) : t;
257
+ E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[V("elementProperties")] = /* @__PURE__ */ new Map(), E[V("finalized")] = /* @__PURE__ */ new Map(), Fe?.({ ReactiveElement: E }), (N.reactiveElementVersions ??= []).push("2.1.0");
258
+ const J = globalThis, B = J.trustedTypes, ie = B ? B.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, fe = "$lit$", y = `lit$${Math.random().toFixed(9).slice(2)}$`, $e = "?" + y, Oe = `<${$e}>`, w = document, O = () => w.createComment(""), T = (t) => t === null || typeof t != "object" && typeof t != "function", Q = Array.isArray, Te = (t) => Q(t) || typeof t?.[Symbol.iterator] == "function", I = `[
259
+ \f\r]`, D = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, se = /-->/g, oe = />/g, v = RegExp(`>|${I}(?:([^\\s"'>=/]+)(${I}*=${I}*(?:[^
260
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ne = /'/g, ae = /"/g, be = /^(?:script|style|textarea|title)$/i, Ue = (t) => (e, ...r) => ({ _$litType$: t, strings: e, values: r }), $ = Ue(1), S = /* @__PURE__ */ Symbol.for("lit-noChange"), d = /* @__PURE__ */ Symbol.for("lit-nothing"), le = /* @__PURE__ */ new WeakMap(), x = w.createTreeWalker(w, 129);
261
+ function ge(t, e) {
262
+ if (!Q(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
263
+ return ie !== void 0 ? ie.createHTML(e) : e;
264
264
  }
265
- const Tt = (e, t) => {
266
- const i = e.length - 1, r = [];
267
- let s, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = D;
268
- for (let h = 0; h < i; h++) {
269
- const l = e[h];
270
- let u, m, a = -1, p = 0;
271
- for (; p < l.length && (n.lastIndex = p, m = n.exec(l), m !== null); ) p = n.lastIndex, n === D ? m[1] === "!--" ? n = st : m[1] !== void 0 ? n = ot : m[2] !== void 0 ? (ft.test(m[2]) && (s = RegExp("</" + m[2], "g")), n = v) : m[3] !== void 0 && (n = v) : n === v ? m[0] === ">" ? (n = s ?? D, a = -1) : m[1] === void 0 ? a = -2 : (a = n.lastIndex - m[2].length, u = m[1], n = m[3] === void 0 ? v : m[3] === '"' ? lt : nt) : n === lt || n === nt ? n = v : n === st || n === ot ? n = D : (n = v, s = void 0);
272
- const c = n === v && e[h + 1].startsWith("/>") ? " " : "";
273
- o += n === D ? l + Vt : a >= 0 ? (r.push(u), l.slice(0, a) + pt + l.slice(a) + _ + c) : l + _ + (a === -2 ? h : c);
274
- }
275
- return [$t(e, o + (e[i] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
265
+ const Me = (t, e) => {
266
+ const r = t.length - 1, i = [];
267
+ let s, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = D;
268
+ for (let h = 0; h < r; h++) {
269
+ const a = t[h];
270
+ let u, m, l = -1, p = 0;
271
+ for (; p < a.length && (n.lastIndex = p, m = n.exec(a), m !== null); ) p = n.lastIndex, n === D ? m[1] === "!--" ? n = se : m[1] !== void 0 ? n = oe : m[2] !== void 0 ? (be.test(m[2]) && (s = RegExp("</" + m[2], "g")), n = v) : m[3] !== void 0 && (n = v) : n === v ? m[0] === ">" ? (n = s ?? D, l = -1) : m[1] === void 0 ? l = -2 : (l = n.lastIndex - m[2].length, u = m[1], n = m[3] === void 0 ? v : m[3] === '"' ? ae : ne) : n === ae || n === ne ? n = v : n === se || n === oe ? n = D : (n = v, s = void 0);
272
+ const c = n === v && t[h + 1].startsWith("/>") ? " " : "";
273
+ o += n === D ? a + Oe : l >= 0 ? (i.push(u), a.slice(0, l) + fe + a.slice(l) + y + c) : a + y + (l === -2 ? h : c);
274
+ }
275
+ return [ge(t, o + (t[r] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
276
276
  };
277
277
  class U {
278
- constructor({ strings: t, _$litType$: i }, r) {
278
+ constructor({ strings: e, _$litType$: r }, i) {
279
279
  let s;
280
280
  this.parts = [];
281
281
  let o = 0, n = 0;
282
- const h = t.length - 1, l = this.parts, [u, m] = Tt(t, i);
283
- if (this.el = U.createElement(u, r), x.currentNode = this.el.content, i === 2 || i === 3) {
284
- const a = this.el.content.firstChild;
285
- a.replaceWith(...a.childNodes);
282
+ const h = e.length - 1, a = this.parts, [u, m] = Me(e, r);
283
+ if (this.el = U.createElement(u, i), x.currentNode = this.el.content, r === 2 || r === 3) {
284
+ const l = this.el.content.firstChild;
285
+ l.replaceWith(...l.childNodes);
286
286
  }
287
- for (; (s = x.nextNode()) !== null && l.length < h; ) {
287
+ for (; (s = x.nextNode()) !== null && a.length < h; ) {
288
288
  if (s.nodeType === 1) {
289
- if (s.hasAttributes()) for (const a of s.getAttributeNames()) if (a.endsWith(pt)) {
290
- const p = m[n++], c = s.getAttribute(a).split(_), f = /([.?@])?(.*)/.exec(p);
291
- l.push({ type: 1, index: o, name: f[2], strings: c, ctor: f[1] === "." ? Mt : f[1] === "?" ? Rt : f[1] === "@" ? Ht : j }), s.removeAttribute(a);
292
- } else a.startsWith(_) && (l.push({ type: 6, index: o }), s.removeAttribute(a));
293
- if (ft.test(s.tagName)) {
294
- const a = s.textContent.split(_), p = a.length - 1;
289
+ if (s.hasAttributes()) for (const l of s.getAttributeNames()) if (l.endsWith(fe)) {
290
+ const p = m[n++], c = s.getAttribute(l).split(y), f = /([.?@])?(.*)/.exec(p);
291
+ a.push({ type: 1, index: o, name: f[2], strings: c, ctor: f[1] === "." ? He : f[1] === "?" ? Be : f[1] === "@" ? Ne : j }), s.removeAttribute(l);
292
+ } else l.startsWith(y) && (a.push({ type: 6, index: o }), s.removeAttribute(l));
293
+ if (be.test(s.tagName)) {
294
+ const l = s.textContent.split(y), p = l.length - 1;
295
295
  if (p > 0) {
296
296
  s.textContent = B ? B.emptyScript : "";
297
- for (let c = 0; c < p; c++) s.append(a[c], O()), x.nextNode(), l.push({ type: 2, index: ++o });
298
- s.append(a[p], O());
297
+ for (let c = 0; c < p; c++) s.append(l[c], O()), x.nextNode(), a.push({ type: 2, index: ++o });
298
+ s.append(l[p], O());
299
299
  }
300
300
  }
301
- } else if (s.nodeType === 8) if (s.data === mt) l.push({ type: 2, index: o });
301
+ } else if (s.nodeType === 8) if (s.data === $e) a.push({ type: 2, index: o });
302
302
  else {
303
- let a = -1;
304
- for (; (a = s.data.indexOf(_, a + 1)) !== -1; ) l.push({ type: 7, index: o }), a += _.length - 1;
303
+ let l = -1;
304
+ for (; (l = s.data.indexOf(y, l + 1)) !== -1; ) a.push({ type: 7, index: o }), l += y.length - 1;
305
305
  }
306
306
  o++;
307
307
  }
308
308
  }
309
- static createElement(t, i) {
310
- const r = w.createElement("template");
311
- return r.innerHTML = t, r;
309
+ static createElement(e, r) {
310
+ const i = w.createElement("template");
311
+ return i.innerHTML = e, i;
312
312
  }
313
313
  }
314
- function C(e, t, i = e, r) {
315
- if (t === S) return t;
316
- let s = r !== void 0 ? i._$Co?.[r] : i._$Cl;
317
- const o = T(t) ? void 0 : t._$litDirective$;
318
- return s?.constructor !== o && (s?._$AO?.(!1), o === void 0 ? s = void 0 : (s = new o(e), s._$AT(e, i, r)), r !== void 0 ? (i._$Co ??= [])[r] = s : i._$Cl = s), s !== void 0 && (t = C(e, s._$AS(e, t.values), s, r)), t;
314
+ function C(t, e, r = t, i) {
315
+ if (e === S) return e;
316
+ let s = i !== void 0 ? r._$Co?.[i] : r._$Cl;
317
+ const o = T(e) ? void 0 : e._$litDirective$;
318
+ return s?.constructor !== o && (s?._$AO?.(!1), o === void 0 ? s = void 0 : (s = new o(t), s._$AT(t, r, i)), i !== void 0 ? (r._$Co ??= [])[i] = s : r._$Cl = s), s !== void 0 && (e = C(t, s._$AS(t, e.values), s, i)), e;
319
319
  }
320
- let Ut = class {
321
- constructor(t, i) {
322
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
320
+ let Re = class {
321
+ constructor(e, r) {
322
+ this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = r;
323
323
  }
324
324
  get parentNode() {
325
325
  return this._$AM.parentNode;
@@ -327,35 +327,35 @@ let Ut = class {
327
327
  get _$AU() {
328
328
  return this._$AM._$AU;
329
329
  }
330
- u(t) {
331
- const { el: { content: i }, parts: r } = this._$AD, s = (t?.creationScope ?? w).importNode(i, !0);
330
+ u(e) {
331
+ const { el: { content: r }, parts: i } = this._$AD, s = (e?.creationScope ?? w).importNode(r, !0);
332
332
  x.currentNode = s;
333
- let o = x.nextNode(), n = 0, h = 0, l = r[0];
334
- for (; l !== void 0; ) {
335
- if (n === l.index) {
333
+ let o = x.nextNode(), n = 0, h = 0, a = i[0];
334
+ for (; a !== void 0; ) {
335
+ if (n === a.index) {
336
336
  let u;
337
- l.type === 2 ? u = new k(o, o.nextSibling, this, t) : l.type === 1 ? u = new l.ctor(o, l.name, l.strings, this, t) : l.type === 6 && (u = new Bt(o, this, t)), this._$AV.push(u), l = r[++h];
337
+ a.type === 2 ? u = new k(o, o.nextSibling, this, e) : a.type === 1 ? u = new a.ctor(o, a.name, a.strings, this, e) : a.type === 6 && (u = new je(o, this, e)), this._$AV.push(u), a = i[++h];
338
338
  }
339
- n !== l?.index && (o = x.nextNode(), n++);
339
+ n !== a?.index && (o = x.nextNode(), n++);
340
340
  }
341
341
  return x.currentNode = w, s;
342
342
  }
343
- p(t) {
344
- let i = 0;
345
- for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, i), i += r.strings.length - 2) : r._$AI(t[i])), i++;
343
+ p(e) {
344
+ let r = 0;
345
+ for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(e, i, r), r += i.strings.length - 2) : i._$AI(e[r])), r++;
346
346
  }
347
347
  };
348
348
  class k {
349
349
  get _$AU() {
350
350
  return this._$AM?._$AU ?? this._$Cv;
351
351
  }
352
- constructor(t, i, r, s) {
353
- this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = r, this.options = s, this._$Cv = s?.isConnected ?? !0;
352
+ constructor(e, r, i, s) {
353
+ this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = e, this._$AB = r, this._$AM = i, this.options = s, this._$Cv = s?.isConnected ?? !0;
354
354
  }
355
355
  get parentNode() {
356
- let t = this._$AA.parentNode;
357
- const i = this._$AM;
358
- return i !== void 0 && t?.nodeType === 11 && (t = i.parentNode), t;
356
+ let e = this._$AA.parentNode;
357
+ const r = this._$AM;
358
+ return r !== void 0 && e?.nodeType === 11 && (e = r.parentNode), e;
359
359
  }
360
360
  get startNode() {
361
361
  return this._$AA;
@@ -363,45 +363,45 @@ class k {
363
363
  get endNode() {
364
364
  return this._$AB;
365
365
  }
366
- _$AI(t, i = this) {
367
- t = C(this, t, i), T(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ft(t) ? this.k(t) : this._(t);
366
+ _$AI(e, r = this) {
367
+ e = C(this, e, r), T(e) ? e === d || e == null || e === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : e !== this._$AH && e !== S && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Te(e) ? this.k(e) : this._(e);
368
368
  }
369
- O(t) {
370
- return this._$AA.parentNode.insertBefore(t, this._$AB);
369
+ O(e) {
370
+ return this._$AA.parentNode.insertBefore(e, this._$AB);
371
371
  }
372
- T(t) {
373
- this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
372
+ T(e) {
373
+ this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
374
374
  }
375
- _(t) {
376
- this._$AH !== d && T(this._$AH) ? this._$AA.nextSibling.data = t : this.T(w.createTextNode(t)), this._$AH = t;
375
+ _(e) {
376
+ this._$AH !== d && T(this._$AH) ? this._$AA.nextSibling.data = e : this.T(w.createTextNode(e)), this._$AH = e;
377
377
  }
378
- $(t) {
379
- const { values: i, _$litType$: r } = t, s = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = U.createElement($t(r.h, r.h[0]), this.options)), r);
380
- if (this._$AH?._$AD === s) this._$AH.p(i);
378
+ $(e) {
379
+ const { values: r, _$litType$: i } = e, s = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = U.createElement(ge(i.h, i.h[0]), this.options)), i);
380
+ if (this._$AH?._$AD === s) this._$AH.p(r);
381
381
  else {
382
- const o = new Ut(s, this), n = o.u(this.options);
383
- o.p(i), this.T(n), this._$AH = o;
382
+ const o = new Re(s, this), n = o.u(this.options);
383
+ o.p(r), this.T(n), this._$AH = o;
384
384
  }
385
385
  }
386
- _$AC(t) {
387
- let i = at.get(t.strings);
388
- return i === void 0 && at.set(t.strings, i = new U(t)), i;
386
+ _$AC(e) {
387
+ let r = le.get(e.strings);
388
+ return r === void 0 && le.set(e.strings, r = new U(e)), r;
389
389
  }
390
- k(t) {
390
+ k(e) {
391
391
  Q(this._$AH) || (this._$AH = [], this._$AR());
392
- const i = this._$AH;
393
- let r, s = 0;
394
- for (const o of t) s === i.length ? i.push(r = new k(this.O(O()), this.O(O()), this, this.options)) : r = i[s], r._$AI(o), s++;
395
- s < i.length && (this._$AR(r && r._$AB.nextSibling, s), i.length = s);
396
- }
397
- _$AR(t = this._$AA.nextSibling, i) {
398
- for (this._$AP?.(!1, !0, i); t && t !== this._$AB; ) {
399
- const r = t.nextSibling;
400
- t.remove(), t = r;
392
+ const r = this._$AH;
393
+ let i, s = 0;
394
+ for (const o of e) s === r.length ? r.push(i = new k(this.O(O()), this.O(O()), this, this.options)) : i = r[s], i._$AI(o), s++;
395
+ s < r.length && (this._$AR(i && i._$AB.nextSibling, s), r.length = s);
396
+ }
397
+ _$AR(e = this._$AA.nextSibling, r) {
398
+ for (this._$AP?.(!1, !0, r); e && e !== this._$AB; ) {
399
+ const i = e.nextSibling;
400
+ e.remove(), e = i;
401
401
  }
402
402
  }
403
- setConnected(t) {
404
- this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
403
+ setConnected(e) {
404
+ this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
405
405
  }
406
406
  }
407
407
  class j {
@@ -411,74 +411,74 @@ class j {
411
411
  get _$AU() {
412
412
  return this._$AM._$AU;
413
413
  }
414
- constructor(t, i, r, s, o) {
415
- this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = i, this._$AM = s, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = d;
414
+ constructor(e, r, i, s, o) {
415
+ this.type = 1, this._$AH = d, this._$AN = void 0, this.element = e, this.name = r, this._$AM = s, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = d;
416
416
  }
417
- _$AI(t, i = this, r, s) {
417
+ _$AI(e, r = this, i, s) {
418
418
  const o = this.strings;
419
419
  let n = !1;
420
- if (o === void 0) t = C(this, t, i, 0), n = !T(t) || t !== this._$AH && t !== S, n && (this._$AH = t);
420
+ if (o === void 0) e = C(this, e, r, 0), n = !T(e) || e !== this._$AH && e !== S, n && (this._$AH = e);
421
421
  else {
422
- const h = t;
423
- let l, u;
424
- for (t = o[0], l = 0; l < o.length - 1; l++) u = C(this, h[r + l], i, l), u === S && (u = this._$AH[l]), n ||= !T(u) || u !== this._$AH[l], u === d ? t = d : t !== d && (t += (u ?? "") + o[l + 1]), this._$AH[l] = u;
422
+ const h = e;
423
+ let a, u;
424
+ for (e = o[0], a = 0; a < o.length - 1; a++) u = C(this, h[i + a], r, a), u === S && (u = this._$AH[a]), n ||= !T(u) || u !== this._$AH[a], u === d ? e = d : e !== d && (e += (u ?? "") + o[a + 1]), this._$AH[a] = u;
425
425
  }
426
- n && !s && this.j(t);
426
+ n && !s && this.j(e);
427
427
  }
428
- j(t) {
429
- t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
428
+ j(e) {
429
+ e === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
430
430
  }
431
431
  }
432
- class Mt extends j {
432
+ class He extends j {
433
433
  constructor() {
434
434
  super(...arguments), this.type = 3;
435
435
  }
436
- j(t) {
437
- this.element[this.name] = t === d ? void 0 : t;
436
+ j(e) {
437
+ this.element[this.name] = e === d ? void 0 : e;
438
438
  }
439
439
  }
440
- class Rt extends j {
440
+ class Be extends j {
441
441
  constructor() {
442
442
  super(...arguments), this.type = 4;
443
443
  }
444
- j(t) {
445
- this.element.toggleAttribute(this.name, !!t && t !== d);
444
+ j(e) {
445
+ this.element.toggleAttribute(this.name, !!e && e !== d);
446
446
  }
447
447
  }
448
- class Ht extends j {
449
- constructor(t, i, r, s, o) {
450
- super(t, i, r, s, o), this.type = 5;
448
+ class Ne extends j {
449
+ constructor(e, r, i, s, o) {
450
+ super(e, r, i, s, o), this.type = 5;
451
451
  }
452
- _$AI(t, i = this) {
453
- if ((t = C(this, t, i, 0) ?? d) === S) return;
454
- const r = this._$AH, s = t === d && r !== d || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, o = t !== d && (r === d || s);
455
- s && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
452
+ _$AI(e, r = this) {
453
+ if ((e = C(this, e, r, 0) ?? d) === S) return;
454
+ const i = this._$AH, s = e === d && i !== d || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, o = e !== d && (i === d || s);
455
+ s && this.element.removeEventListener(this.name, this, i), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
456
456
  }
457
- handleEvent(t) {
458
- typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
457
+ handleEvent(e) {
458
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
459
459
  }
460
460
  }
461
- class Bt {
462
- constructor(t, i, r) {
463
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = r;
461
+ class je {
462
+ constructor(e, r, i) {
463
+ this.element = e, this.type = 6, this._$AN = void 0, this._$AM = r, this.options = i;
464
464
  }
465
465
  get _$AU() {
466
466
  return this._$AM._$AU;
467
467
  }
468
- _$AI(t) {
469
- C(this, t);
468
+ _$AI(e) {
469
+ C(this, e);
470
470
  }
471
471
  }
472
- const Nt = { I: k }, jt = J.litHtmlPolyfillSupport;
473
- jt?.(U, k), (J.litHtmlVersions ??= []).push("3.3.0");
474
- const zt = (e, t, i) => {
475
- const r = i?.renderBefore ?? t;
476
- let s = r._$litPart$;
472
+ const qe = { I: k }, ze = J.litHtmlPolyfillSupport;
473
+ ze?.(U, k), (J.litHtmlVersions ??= []).push("3.3.0");
474
+ const Ie = (t, e, r) => {
475
+ const i = r?.renderBefore ?? e;
476
+ let s = i._$litPart$;
477
477
  if (s === void 0) {
478
- const o = i?.renderBefore ?? null;
479
- r._$litPart$ = s = new k(t.insertBefore(O(), o), o, void 0, i ?? {});
478
+ const o = r?.renderBefore ?? null;
479
+ i._$litPart$ = s = new k(e.insertBefore(O(), o), o, void 0, r ?? {});
480
480
  }
481
- return s._$AI(e), s;
481
+ return s._$AI(t), s;
482
482
  };
483
483
  const G = globalThis;
484
484
  let F = class extends E {
@@ -486,12 +486,12 @@ let F = class extends E {
486
486
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
487
487
  }
488
488
  createRenderRoot() {
489
- const t = super.createRenderRoot();
490
- return this.renderOptions.renderBefore ??= t.firstChild, t;
489
+ const e = super.createRenderRoot();
490
+ return this.renderOptions.renderBefore ??= e.firstChild, e;
491
491
  }
492
- update(t) {
493
- const i = this.render();
494
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = zt(i, this.renderRoot, this.renderOptions);
492
+ update(e) {
493
+ const r = this.render();
494
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Ie(r, this.renderRoot, this.renderOptions);
495
495
  }
496
496
  connectedCallback() {
497
497
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -504,176 +504,215 @@ let F = class extends E {
504
504
  }
505
505
  };
506
506
  F._$litElement$ = !0, F.finalized = !0, G.litElementHydrateSupport?.({ LitElement: F });
507
- const qt = G.litElementPolyfillSupport;
508
- qt?.({ LitElement: F });
507
+ const Le = G.litElementPolyfillSupport;
508
+ Le?.({ LitElement: F });
509
509
  (G.litElementVersions ??= []).push("4.2.0");
510
- const It = { CHILD: 2 }, bt = (e) => (...t) => ({ _$litDirective$: e, values: t });
511
- let gt = class {
512
- constructor(t) {
510
+ const We = { CHILD: 2 }, _e = (t) => (...e) => ({ _$litDirective$: t, values: e });
511
+ let ye = class {
512
+ constructor(e) {
513
513
  }
514
514
  get _$AU() {
515
515
  return this._$AM._$AU;
516
516
  }
517
- _$AT(t, i, r) {
518
- this._$Ct = t, this._$AM = i, this._$Ci = r;
517
+ _$AT(e, r, i) {
518
+ this._$Ct = e, this._$AM = r, this._$Ci = i;
519
519
  }
520
- _$AS(t, i) {
521
- return this.update(t, i);
520
+ _$AS(e, r) {
521
+ return this.update(e, r);
522
522
  }
523
- update(t, i) {
524
- return this.render(...i);
523
+ update(e, r) {
524
+ return this.render(...r);
525
525
  }
526
526
  };
527
- const { I: Lt } = Nt, ht = () => document.createComment(""), P = (e, t, i) => {
528
- const r = e._$AA.parentNode, s = t === void 0 ? e._$AB : t._$AA;
529
- if (i === void 0) {
530
- const o = r.insertBefore(ht(), s), n = r.insertBefore(ht(), s);
531
- i = new Lt(o, n, e, e.options);
527
+ const { I: Ke } = qe, he = () => document.createComment(""), P = (t, e, r) => {
528
+ const i = t._$AA.parentNode, s = e === void 0 ? t._$AB : e._$AA;
529
+ if (r === void 0) {
530
+ const o = i.insertBefore(he(), s), n = i.insertBefore(he(), s);
531
+ r = new Ke(o, n, t, t.options);
532
532
  } else {
533
- const o = i._$AB.nextSibling, n = i._$AM, h = n !== e;
533
+ const o = r._$AB.nextSibling, n = r._$AM, h = n !== t;
534
534
  if (h) {
535
- let l;
536
- i._$AQ?.(e), i._$AM = e, i._$AP !== void 0 && (l = e._$AU) !== n._$AU && i._$AP(l);
535
+ let a;
536
+ r._$AQ?.(t), r._$AM = t, r._$AP !== void 0 && (a = t._$AU) !== n._$AU && r._$AP(a);
537
537
  }
538
538
  if (o !== s || h) {
539
- let l = i._$AA;
540
- for (; l !== o; ) {
541
- const u = l.nextSibling;
542
- r.insertBefore(l, s), l = u;
539
+ let a = r._$AA;
540
+ for (; a !== o; ) {
541
+ const u = a.nextSibling;
542
+ i.insertBefore(a, s), a = u;
543
543
  }
544
544
  }
545
545
  }
546
- return i;
547
- }, A = (e, t, i = e) => (e._$AI(t, i), e), Wt = {}, yt = (e, t = Wt) => e._$AH = t, Kt = (e) => e._$AH, L = (e) => {
548
- e._$AP?.(!1, !0);
549
- let t = e._$AA;
550
- const i = e._$AB.nextSibling;
551
- for (; t !== i; ) {
552
- const r = t.nextSibling;
553
- t.remove(), t = r;
546
+ return r;
547
+ }, A = (t, e, r = t) => (t._$AI(e, r), t), Ze = {}, ve = (t, e = Ze) => t._$AH = e, Je = (t) => t._$AH, L = (t) => {
548
+ t._$AP?.(!1, !0);
549
+ let e = t._$AA;
550
+ const r = t._$AB.nextSibling;
551
+ for (; e !== r; ) {
552
+ const i = e.nextSibling;
553
+ e.remove(), e = i;
554
554
  }
555
555
  };
556
- const ct = (e, t, i) => {
557
- const r = /* @__PURE__ */ new Map();
558
- for (let s = t; s <= i; s++) r.set(e[s], s);
559
- return r;
560
- }, ut = bt(class extends gt {
561
- constructor(e) {
562
- if (super(e), e.type !== It.CHILD) throw Error("repeat() can only be used in text expressions");
556
+ const ce = (t, e, r) => {
557
+ const i = /* @__PURE__ */ new Map();
558
+ for (let s = e; s <= r; s++) i.set(t[s], s);
559
+ return i;
560
+ }, ue = _e(class extends ye {
561
+ constructor(t) {
562
+ if (super(t), t.type !== We.CHILD) throw Error("repeat() can only be used in text expressions");
563
563
  }
564
- dt(e, t, i) {
565
- let r;
566
- i === void 0 ? i = t : t !== void 0 && (r = t);
564
+ dt(t, e, r) {
565
+ let i;
566
+ r === void 0 ? r = e : e !== void 0 && (i = e);
567
567
  const s = [], o = [];
568
568
  let n = 0;
569
- for (const h of e) s[n] = r ? r(h, n) : n, o[n] = i(h, n), n++;
569
+ for (const h of t) s[n] = i ? i(h, n) : n, o[n] = r(h, n), n++;
570
570
  return { values: o, keys: s };
571
571
  }
572
- render(e, t, i) {
573
- return this.dt(e, t, i).values;
572
+ render(t, e, r) {
573
+ return this.dt(t, e, r).values;
574
574
  }
575
- update(e, [t, i, r]) {
576
- const s = Kt(e), { values: o, keys: n } = this.dt(t, i, r);
575
+ update(t, [e, r, i]) {
576
+ const s = Je(t), { values: o, keys: n } = this.dt(e, r, i);
577
577
  if (!Array.isArray(s)) return this.ut = n, o;
578
- const h = this.ut ??= [], l = [];
579
- let u, m, a = 0, p = s.length - 1, c = 0, f = o.length - 1;
580
- for (; a <= p && c <= f; ) if (s[a] === null) a++;
578
+ const h = this.ut ??= [], a = [];
579
+ let u, m, l = 0, p = s.length - 1, c = 0, f = o.length - 1;
580
+ for (; l <= p && c <= f; ) if (s[l] === null) l++;
581
581
  else if (s[p] === null) p--;
582
- else if (h[a] === n[c]) l[c] = A(s[a], o[c]), a++, c++;
583
- else if (h[p] === n[f]) l[f] = A(s[p], o[f]), p--, f--;
584
- else if (h[a] === n[f]) l[f] = A(s[a], o[f]), P(e, l[f + 1], s[a]), a++, f--;
585
- else if (h[p] === n[c]) l[c] = A(s[p], o[c]), P(e, s[a], s[p]), p--, c++;
586
- else if (u === void 0 && (u = ct(n, c, f), m = ct(h, a, p)), u.has(h[a])) if (u.has(h[p])) {
587
- const y = m.get(n[c]), q = y !== void 0 ? s[y] : null;
588
- if (q === null) {
589
- const X = P(e, s[a]);
590
- A(X, o[c]), l[c] = X;
591
- } else l[c] = A(q, o[c]), P(e, s[a], q), s[y] = null;
582
+ else if (h[l] === n[c]) a[c] = A(s[l], o[c]), l++, c++;
583
+ else if (h[p] === n[f]) a[f] = A(s[p], o[f]), p--, f--;
584
+ else if (h[l] === n[f]) a[f] = A(s[l], o[f]), P(t, a[f + 1], s[l]), l++, f--;
585
+ else if (h[p] === n[c]) a[c] = A(s[p], o[c]), P(t, s[l], s[p]), p--, c++;
586
+ else if (u === void 0 && (u = ce(n, c, f), m = ce(h, l, p)), u.has(h[l])) if (u.has(h[p])) {
587
+ const _ = m.get(n[c]), z = _ !== void 0 ? s[_] : null;
588
+ if (z === null) {
589
+ const X = P(t, s[l]);
590
+ A(X, o[c]), a[c] = X;
591
+ } else a[c] = A(z, o[c]), P(t, s[l], z), s[_] = null;
592
592
  c++;
593
593
  } else L(s[p]), p--;
594
- else L(s[a]), a++;
594
+ else L(s[l]), l++;
595
595
  for (; c <= f; ) {
596
- const y = P(e, l[f + 1]);
597
- A(y, o[c]), l[c++] = y;
596
+ const _ = P(t, a[f + 1]);
597
+ A(_, o[c]), a[c++] = _;
598
598
  }
599
- for (; a <= p; ) {
600
- const y = s[a++];
601
- y !== null && L(y);
599
+ for (; l <= p; ) {
600
+ const _ = s[l++];
601
+ _ !== null && L(_);
602
602
  }
603
- return this.ut = n, yt(e, l), S;
603
+ return this.ut = n, ve(t, a), S;
604
604
  }
605
605
  });
606
- const Zt = bt(class extends gt {
606
+ const Qe = _e(class extends ye {
607
607
  constructor() {
608
608
  super(...arguments), this.key = d;
609
609
  }
610
- render(e, t) {
611
- return this.key = e, t;
610
+ render(t, e) {
611
+ return this.key = t, e;
612
612
  }
613
- update(e, [t, i]) {
614
- return t !== this.key && (yt(e), this.key = t), i;
613
+ update(t, [e, r]) {
614
+ return e !== this.key && (ve(t), this.key = e), r;
615
615
  }
616
616
  });
617
- const Jt = (e) => (t, i) => {
618
- i !== void 0 ? i.addInitializer((() => {
619
- customElements.define(e, t);
620
- })) : customElements.define(e, t);
617
+ const Ge = (t) => (e, r) => {
618
+ r !== void 0 ? r.addInitializer((() => {
619
+ customElements.define(t, e);
620
+ })) : customElements.define(t, e);
621
621
  };
622
- const Qt = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: Z }, Gt = (e = Qt, t, i) => {
623
- const { kind: r, metadata: s } = i;
622
+ const Xe = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: Z }, Ye = (t = Xe, e, r) => {
623
+ const { kind: i, metadata: s } = r;
624
624
  let o = globalThis.litPropertyMetadata.get(s);
625
- if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), o.set(i.name, e), r === "accessor") {
626
- const { name: n } = i;
625
+ if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), i === "setter" && ((t = Object.create(t)).wrapped = !0), o.set(r.name, t), i === "accessor") {
626
+ const { name: n } = r;
627
627
  return { set(h) {
628
- const l = t.get.call(this);
629
- t.set.call(this, h), this.requestUpdate(n, l, e);
628
+ const a = e.get.call(this);
629
+ e.set.call(this, h), this.requestUpdate(n, a, t);
630
630
  }, init(h) {
631
- return h !== void 0 && this.C(n, void 0, e, h), h;
631
+ return h !== void 0 && this.C(n, void 0, t, h), h;
632
632
  } };
633
633
  }
634
- if (r === "setter") {
635
- const { name: n } = i;
634
+ if (i === "setter") {
635
+ const { name: n } = r;
636
636
  return function(h) {
637
- const l = this[n];
638
- t.call(this, h), this.requestUpdate(n, l, e);
637
+ const a = this[n];
638
+ e.call(this, h), this.requestUpdate(n, a, t);
639
639
  };
640
640
  }
641
- throw Error("Unsupported decorator location: " + r);
641
+ throw Error("Unsupported decorator location: " + i);
642
642
  };
643
- function z(e) {
644
- return (t, i) => typeof i == "object" ? Gt(e, t, i) : ((r, s, o) => {
643
+ function q(t) {
644
+ return (e, r) => typeof r == "object" ? Ye(t, e, r) : ((i, s, o) => {
645
645
  const n = s.hasOwnProperty(o);
646
- return s.constructor.createProperty(o, r), n ? Object.getOwnPropertyDescriptor(s, o) : void 0;
647
- })(e, t, i);
646
+ return s.constructor.createProperty(o, i), n ? Object.getOwnPropertyDescriptor(s, o) : void 0;
647
+ })(t, e, r);
648
648
  }
649
- function M(e) {
650
- return z({ ...e, state: !0, attribute: !1 });
649
+ function M(t) {
650
+ return q({ ...t, state: !0, attribute: !1 });
651
651
  }
652
- const Xt = (e, t, i) => (i.configurable = !0, i.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, i), i);
653
- function Yt(e, t) {
654
- return (i, r, s) => {
655
- const o = (n) => n.renderRoot?.querySelector(e) ?? null;
656
- return Xt(i, r, { get() {
652
+ const et = (t, e, r) => (r.configurable = !0, r.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, r), r);
653
+ function tt(t, e) {
654
+ return (r, i, s) => {
655
+ const o = (n) => n.renderRoot?.querySelector(t) ?? null;
656
+ return et(r, i, { get() {
657
657
  return o(this);
658
658
  } });
659
659
  };
660
660
  }
661
- var te = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, g = (e, t, i, r) => {
662
- for (var s = r > 1 ? void 0 : r ? ee(t, i) : t, o = e.length - 1, n; o >= 0; o--)
663
- (n = e[o]) && (s = (r ? n(t, i, s) : n(s)) || s);
664
- return r && s && te(t, i, s), s;
661
+ var rt = Object.defineProperty, it = Object.getOwnPropertyDescriptor, g = (t, e, r, i) => {
662
+ for (var s = i > 1 ? void 0 : i ? it(e, r) : e, o = t.length - 1, n; o >= 0; o--)
663
+ (n = t[o]) && (s = (i ? n(e, r, s) : n(s)) || s);
664
+ return i && s && rt(e, r, s), s;
665
+ };
666
+ const st = /* @__PURE__ */ new Set(["(", ")", "[", "{", "}", "/", "|"]), ot = (t) => {
667
+ let e = "", r = !1, i = 0;
668
+ for (let s = 0; s < t.length; s++) {
669
+ const o = t[s];
670
+ if (o === "\\")
671
+ e += o + (t[s + 1] ?? ""), s++;
672
+ else if (!r)
673
+ o === "[" && (r = !0, i = t[s + 1] === "^" ? s + 2 : s + 1), e += o;
674
+ else if (o === "]")
675
+ r = !1, e += o;
676
+ else if (o === "-") {
677
+ const n = s > i && s < t.length - 1 && t[s + 1] !== "]";
678
+ e += n ? o : "\\-";
679
+ } else
680
+ e += st.has(o) ? "\\" + o : o;
681
+ }
682
+ return e;
683
+ }, de = (t) => {
684
+ try {
685
+ return new RegExp("^(?:" + t + ")$", "v"), !0;
686
+ } catch {
687
+ return !1;
688
+ }
689
+ }, pe = /* @__PURE__ */ new Map(), nt = (t) => {
690
+ const e = t?.trim();
691
+ if (!e) return "";
692
+ const r = pe.get(e);
693
+ if (r !== void 0) return r;
694
+ let i = "";
695
+ if (de(e))
696
+ i = e;
697
+ else {
698
+ const s = ot(e);
699
+ de(s) ? i = s : console.warn(
700
+ `widget-form: ignoring validation regex "${e}" — it is not a valid regular expression under the "v" flag the HTML pattern attribute uses.`
701
+ );
702
+ }
703
+ return pe.set(e, i), i;
665
704
  };
666
705
  let b = class extends F {
667
706
  constructor() {
668
- super(...arguments), this.dialogOpen = !1, this.formKey = 0, this.fieldValues = {}, this.version = "1.0.32", this.dialogScrimPatched = !1;
707
+ super(...arguments), this.dialogOpen = !1, this.formKey = 0, this.fieldValues = {}, this.version = "1.0.34", this.dialogScrimPatched = !1;
669
708
  }
670
- update(e) {
671
- e.has("theme") && this.registerTheme(this.theme), super.update(e);
709
+ update(t) {
710
+ t.has("theme") && this.registerTheme(this.theme), super.update(t);
672
711
  }
673
- firstUpdated(e) {
712
+ firstUpdated(t) {
674
713
  this.registerTheme(this.theme);
675
714
  }
676
- updated(e) {
715
+ updated(t) {
677
716
  this.patchDialogScrim(), this.toggleAttribute("fab-mode", !!this.inputData?.formButton);
678
717
  }
679
718
  /**
@@ -689,10 +728,10 @@ let b = class extends F {
689
728
  */
690
729
  patchDialogScrim() {
691
730
  if (this.dialogScrimPatched) return;
692
- const e = this.dialog?.shadowRoot;
693
- if (!e) return;
694
- const t = new CSSStyleSheet();
695
- t.replaceSync(`
731
+ const t = this.dialog?.shadowRoot;
732
+ if (!t) return;
733
+ const e = new CSSStyleSheet();
734
+ e.replaceSync(`
696
735
  dialog::backdrop {
697
736
  background: var(--md-sys-color-scrim, #000);
698
737
  opacity: 0.32;
@@ -700,40 +739,39 @@ let b = class extends F {
700
739
  .scrim {
701
740
  display: none !important;
702
741
  }
703
- `), e.adoptedStyleSheets = [...e.adoptedStyleSheets, t], this.dialogScrimPatched = !0;
742
+ `), t.adoptedStyleSheets = [...t.adoptedStyleSheets, e], this.dialogScrimPatched = !0;
704
743
  }
705
- registerTheme(e) {
706
- const t = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), i = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
707
- this.themeBgColor = i || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = t || this.theme?.theme_object?.title?.textStyle?.color;
744
+ registerTheme(t) {
745
+ this.themeBgColor = `var(--re-tile-background-color, ${this.theme?.theme_object?.backgroundColor || "transparent"})`, this.themeTitleColor = `var(--re-text-color, ${this.theme?.theme_object?.title?.textStyle?.color || "inherit"})`;
708
746
  }
709
747
  openFormDialog() {
710
748
  this.dialogOpen = !0;
711
749
  }
712
- handleFormSubmit(e) {
713
- e.preventDefault();
714
- const i = e.submitter?.getAttribute("value") ?? "submit", r = e.target, s = new FormData(r), o = this.inputData?.formFields?.map((n, h) => {
715
- const l = {
750
+ handleFormSubmit(t) {
751
+ t.preventDefault();
752
+ const r = t.submitter?.getAttribute("value") ?? "submit", i = t.target, s = new FormData(i), o = this.inputData?.formFields?.map((n, h) => {
753
+ const a = {
716
754
  swarm_app_databackend_key: n.targetColumn?.swarm_app_databackend_key,
717
755
  table_name: n.targetColumn?.tablename,
718
756
  column_name: n.targetColumn?.column
719
757
  };
720
758
  if (!n.hiddenField && !this.isFieldVisible(n))
721
- return { ...l, value: null };
759
+ return { ...a, value: null };
722
760
  const u = this.currentRawValue(n, h, s);
723
- return { ...l, value: this.formatValue(u, n.type ?? "textfield") };
761
+ return { ...a, value: this.formatValue(u, n.type ?? "textfield") };
724
762
  });
725
763
  if (this.inputData?.deleteFlagColumn && o?.push({
726
764
  swarm_app_databackend_key: this.inputData?.deleteFlagColumn?.swarm_app_databackend_key,
727
765
  table_name: this.inputData?.deleteFlagColumn?.tablename,
728
766
  column_name: this.inputData?.deleteFlagColumn?.column,
729
- value: i === "delete"
767
+ value: r === "delete"
730
768
  }), this.dispatchEvent(
731
769
  new CustomEvent("data-submit", {
732
770
  detail: o,
733
771
  bubbles: !1,
734
772
  composed: !1
735
773
  })
736
- ), i === "delete") {
774
+ ), r === "delete") {
737
775
  const n = this.resolveRoute({
738
776
  route: this.inputData?.deleteNavigationRoute,
739
777
  variables: this.inputData?.variables
@@ -755,23 +793,23 @@ let b = class extends F {
755
793
  // and fall back to the single-line key so fields configured before the split
756
794
  // keep their values. A value lingering in a hidden twin key after a type
757
795
  // switch is ignored.
758
- effectivePreFilledValue(e) {
759
- return e.type === "textarea" ? e.preFilledValueMultiline ?? e.preFilledValue : e.type === "checkbox" && e.preFilledValueBoolean != null ? String(e.preFilledValueBoolean) : e.preFilledValue;
796
+ effectivePreFilledValue(t) {
797
+ return t.type === "textarea" ? t.preFilledValueMultiline ?? t.preFilledValue : t.type === "checkbox" && t.preFilledValueBoolean != null ? String(t.preFilledValueBoolean) : t.preFilledValue;
760
798
  }
761
- effectiveDefaultValue(e) {
762
- return e.type === "textarea" ? e.defaultValueMultiline ?? e.defaultValue : e.type === "checkbox" && e.defaultValueBoolean != null ? String(e.defaultValueBoolean) : e.defaultValue;
799
+ effectiveDefaultValue(t) {
800
+ return t.type === "textarea" ? t.defaultValueMultiline ?? t.defaultValue : t.type === "checkbox" && t.defaultValueBoolean != null ? String(t.defaultValueBoolean) : t.defaultValue;
763
801
  }
764
- formatValue(e, t) {
765
- switch (t) {
802
+ formatValue(t, e) {
803
+ switch (e) {
766
804
  case "numberfield": {
767
- if (e === "" || e === null || e === void 0) return null;
768
- const i = parseFloat(e);
769
- return Number.isNaN(i) ? null : i;
805
+ if (t === "" || t === null || t === void 0) return null;
806
+ const r = parseFloat(t);
807
+ return Number.isNaN(r) ? null : r;
770
808
  }
771
809
  case "checkbox":
772
- return e === "on" || e === "true";
810
+ return t === "on" || t === "true";
773
811
  default:
774
- return e;
812
+ return t;
775
813
  }
776
814
  }
777
815
  // Resolve a field's current raw (string) value, applying the same
@@ -779,119 +817,119 @@ let b = class extends F {
779
817
  // submission agree. Checkbox is normalized to 'true'/'false' (matching the
780
818
  // literals designers use in a condition list); a field absent from the DOM
781
819
  // (hidden by its own condition) yields its effective default value.
782
- currentRawValue(e, t, i) {
783
- const r = `column-${t}`;
784
- if (e.hiddenField)
785
- return this.effectivePreFilledValue(e) ?? this.effectiveDefaultValue(e) ?? "";
786
- if (e.type === "checkbox") return i.has(r) ? "true" : "false";
787
- const s = i.get(r);
788
- return s === null || s === "" ? this.effectiveDefaultValue(e) ?? "" : String(s);
820
+ currentRawValue(t, e, r) {
821
+ const i = `column-${e}`;
822
+ if (t.hiddenField)
823
+ return this.effectivePreFilledValue(t) ?? this.effectiveDefaultValue(t) ?? "";
824
+ if (t.type === "checkbox") return r.has(i) ? "true" : "false";
825
+ const s = r.get(i);
826
+ return s === null || s === "" ? this.effectiveDefaultValue(t) ?? "" : String(s);
789
827
  }
790
828
  // Rebuild the label→value map on every input/change so conditional-display
791
829
  // rules re-evaluate live. A single delegated listener on the <form> catches
792
830
  // all field types (Material components bubble input/change within this root).
793
- handleFieldChange(e) {
794
- const t = e.currentTarget;
795
- if (!t) return;
796
- const i = new FormData(t), r = {};
831
+ handleFieldChange(t) {
832
+ const e = t.currentTarget;
833
+ if (!e) return;
834
+ const r = new FormData(e), i = {};
797
835
  this.inputData?.formFields?.forEach((s, o) => {
798
- s.label && (r[s.label] = this.currentRawValue(s, o, i));
799
- }), this.fieldValues = r;
836
+ s.label && (i[s.label] = this.currentRawValue(s, o, r));
837
+ }), this.fieldValues = i;
800
838
  }
801
839
  // A field is visible unless it declares a conditional-display rule whose
802
840
  // controlling field (referenced by label) does not currently hold one of the
803
841
  // listed values. Fail-open on misconfiguration (unknown field / empty list)
804
842
  // so a half-configured rule never silently hides a field and its data.
805
- isFieldVisible(e) {
806
- const t = e.conditionalDisplay?.conditionField?.trim();
807
- if (!t) return !0;
808
- const i = (e.conditionalDisplay?.conditionValues ?? "").split(",").map((o) => o.trim()).filter((o) => o !== "");
809
- if (i.length === 0) return !0;
810
- const r = this.inputData?.formFields?.find((o) => o.label === t);
811
- if (!r) return !0;
812
- const s = this.fieldValues[t] ?? this.effectivePreFilledValue(r) ?? this.effectiveDefaultValue(r) ?? "";
813
- return i.includes(String(s));
814
- }
815
- renderTextField(e, t) {
843
+ isFieldVisible(t) {
844
+ const e = t.conditionalDisplay?.conditionField?.trim();
845
+ if (!e) return !0;
846
+ const r = (t.conditionalDisplay?.conditionValues ?? "").split(",").map((o) => o.trim()).filter((o) => o !== "");
847
+ if (r.length === 0) return !0;
848
+ const i = this.inputData?.formFields?.find((o) => o.label === e);
849
+ if (!i) return !0;
850
+ const s = this.fieldValues[e] ?? this.effectivePreFilledValue(i) ?? this.effectiveDefaultValue(i) ?? "";
851
+ return r.includes(String(s));
852
+ }
853
+ renderTextField(t, e) {
816
854
  return $`
817
855
  <md-outlined-text-field
818
- .name="column-${t}"
819
- .label="${e.label ?? ""}"
820
- .type="${e.type === "numberfield" ? "number" : "text"}"
821
- .value="${e.preFilledValue ?? ""}"
822
- .placeholder="${e.defaultValue ?? ""}"
823
- .pattern="${e.validation ?? ""}"
824
- supporting-text=${e.description ?? ""}
825
- validation-message="${e.validationMessage ?? "Invalid input"}"
826
- ?required=${e.required && !e.defaultValue && !e.preFilledValue}
856
+ .name="column-${e}"
857
+ .label="${t.label ?? ""}"
858
+ .type="${t.type === "numberfield" ? "number" : "text"}"
859
+ .value="${t.preFilledValue ?? ""}"
860
+ .placeholder="${t.defaultValue ?? ""}"
861
+ .pattern="${nt(t.validation)}"
862
+ supporting-text=${t.description ?? ""}
863
+ validation-message="${t.validationMessage ?? "Invalid input"}"
864
+ ?required=${t.required && !t.defaultValue && !t.preFilledValue}
827
865
  ></md-outlined-text-field>
828
866
  `;
829
867
  }
830
- renderNumberField(e, t) {
868
+ renderNumberField(t, e) {
831
869
  return $`
832
870
  <md-outlined-text-field
833
- .name="column-${t}"
834
- .label="${e.label ?? ""}"
871
+ .name="column-${e}"
872
+ .label="${t.label ?? ""}"
835
873
  style="width: 200px;"
836
874
  type="number"
837
- .value="${e.preFilledValue ?? ""}"
838
- .placeholder="${e.defaultValue ?? ""}"
875
+ .value="${t.preFilledValue ?? ""}"
876
+ .placeholder="${t.defaultValue ?? ""}"
839
877
  step="any"
840
- min=${e.min ?? ""}
841
- max=${e.max ?? ""}
842
- supporting-text=${e.description ?? ""}
843
- ?required=${e.required && !e.defaultValue && !e.preFilledValue}
878
+ min=${t.min ?? ""}
879
+ max=${t.max ?? ""}
880
+ supporting-text=${t.description ?? ""}
881
+ ?required=${t.required && !t.defaultValue && !t.preFilledValue}
844
882
  ></md-outlined-text-field>
845
883
  `;
846
884
  }
847
- renderCheckbox(e, t) {
848
- const i = this.effectivePreFilledValue(e), r = this.effectiveDefaultValue(e);
885
+ renderCheckbox(t, e) {
886
+ const r = this.effectivePreFilledValue(t), i = this.effectiveDefaultValue(t);
849
887
  return $`
850
888
  <div class="checkbox-container">
851
889
  <md-checkbox
852
- name="column-${t}"
853
- aria-label=${e.label ?? ""}
854
- ?checked=${String(i ?? r) === "true"}
855
- ?required=${e.required && !r && !i}
890
+ name="column-${e}"
891
+ aria-label=${t.label ?? ""}
892
+ ?checked=${String(r ?? i) === "true"}
893
+ ?required=${t.required && !i && !r}
856
894
  ></md-checkbox>
857
895
  <label class="label">
858
- ${e.label}
859
- ${e.description ? $`<span class="supporting-text">${e.description}</span>` : d}
896
+ ${t.label}
897
+ ${t.description ? $`<span class="supporting-text">${t.description}</span>` : d}
860
898
  </label>
861
899
  </div>
862
900
  `;
863
901
  }
864
- renderTextArea(e, t) {
865
- const i = this.effectivePreFilledValue(e), r = this.effectiveDefaultValue(e);
902
+ renderTextArea(t, e) {
903
+ const r = this.effectivePreFilledValue(t), i = this.effectiveDefaultValue(t);
866
904
  return $`
867
905
  <md-outlined-text-field
868
- .name="column-${t}"
869
- .label="${e.label ?? ""}"
906
+ .name="column-${e}"
907
+ .label="${t.label ?? ""}"
870
908
  type="textarea"
871
- .value="${i ?? ""}"
872
- .placeholder="${r ?? ""}"
909
+ .value="${r ?? ""}"
910
+ .placeholder="${i ?? ""}"
873
911
  rows="3"
874
- ?required=${e.required && !r && !i}
875
- supporting-text=${e.description ?? ""}
912
+ ?required=${t.required && !i && !r}
913
+ supporting-text=${t.description ?? ""}
876
914
  ></md-outlined-text-field>
877
915
  `;
878
916
  }
879
- renderDropdown(e, t) {
917
+ renderDropdown(t, e) {
880
918
  return $`
881
919
  <label class="label">
882
- ${e.label}
920
+ ${t.label}
883
921
  <md-outlined-select
884
- name="column-${t}"
885
- .value=${e.preFilledValue ?? e.defaultValue ?? ""}
886
- supporting-text=${e.description ?? ""}
887
- ?required=${e.required && !e.defaultValue && !e.preFilledValue}
922
+ name="column-${e}"
923
+ .value=${t.preFilledValue ?? t.defaultValue ?? ""}
924
+ supporting-text=${t.description ?? ""}
925
+ ?required=${t.required && !t.defaultValue && !t.preFilledValue}
888
926
  >
889
- ${ut(
890
- e.values ?? [],
891
- (i) => i.value,
892
- (i) => $`
893
- <md-select-option .value="${i.value ?? ""}">
894
- ${i.displayLabel}
927
+ ${ue(
928
+ t.values ?? [],
929
+ (r) => r.value,
930
+ (r) => $`
931
+ <md-select-option .value="${r.value ?? ""}">
932
+ ${r.displayLabel}
895
933
  </md-select-option>
896
934
  `
897
935
  )}
@@ -899,57 +937,70 @@ let b = class extends F {
899
937
  </label>
900
938
  `;
901
939
  }
902
- renderDateTimeField(e, t) {
940
+ renderDateTimeField(t, e) {
903
941
  return $`
904
942
  <md-outlined-text-field
905
- .name="column-${t}"
943
+ .name="column-${e}"
906
944
  style="width: 200px;"
907
- .label="${e.label ?? ""}"
945
+ .label="${t.label ?? ""}"
908
946
  type="datetime-local"
909
- .value="${e.preFilledValue ?? e.defaultValue ?? ""}"
910
- supporting-text=${e.description ?? ""}
911
- ?required=${e.required && !e.defaultValue && !e.preFilledValue}
947
+ .value="${t.preFilledValue ?? t.defaultValue ?? ""}"
948
+ supporting-text=${t.description ?? ""}
949
+ ?required=${t.required && !t.defaultValue && !t.preFilledValue}
912
950
  ></md-outlined-text-field>
913
951
  `;
914
952
  }
915
953
  resetForm() {
916
954
  this.formKey++, this.fieldValues = {};
917
955
  }
918
- resolveRoute(e) {
919
- let t = e?.route ?? "";
920
- if (t) {
921
- if (e?.variables)
922
- for (const i of e.variables)
923
- i.label && (t = t.split(`{{${i.label}}}`).join(encodeURIComponent(String(i.value ?? ""))));
924
- if (t.includes("*")) {
925
- const i = (this.route || "").split("/").filter(Boolean), r = t.split("/").filter(Boolean);
926
- for (let s = 0; s < r.length; s++)
927
- r[s] === "*" && (r[s] = i[s] ?? "");
928
- t = (t.startsWith("/") ? "/" : "") + r.filter(Boolean).join("/");
956
+ resolveRoute(t) {
957
+ let e = t?.route ?? "";
958
+ if (e) {
959
+ if (t?.variables)
960
+ for (const r of t.variables)
961
+ r.label && (e = e.split(`{{${r.label}}}`).join(encodeURIComponent(String(r.value ?? ""))));
962
+ if (e.includes("*")) {
963
+ const r = (this.route || "").split("/").filter(Boolean), i = e.split("/").filter(Boolean);
964
+ for (let s = 0; s < i.length; s++)
965
+ i[s] === "*" && (i[s] = r[s] ?? "");
966
+ e = (e.startsWith("/") ? "/" : "") + i.filter(Boolean).join("/");
929
967
  }
930
- return t;
968
+ return e;
931
969
  }
932
970
  }
933
- cancelEdit(e) {
971
+ cancelEdit(t) {
934
972
  this.resetForm(), this.dialogOpen = !1;
935
973
  }
974
+ /**
975
+ * Resolved background colour, for the alpha-stripping below.
976
+ *
977
+ * themeBgColor holds a var() chain so the tile tracks the host's
978
+ * --re-tile-background-color live, but a chain cannot be picked apart in
979
+ * JS. The opaque variant therefore resolves the colour here, at render
980
+ * time, instead of reading a value cached at the last theme change.
981
+ */
982
+ resolvedBgColor() {
983
+ return getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim() || this.theme?.theme_object?.backgroundColor;
984
+ }
936
985
  render() {
937
- const e = this.themeTitleColor, t = this.themeBgColor, i = t?.startsWith("rgba") ? t.replace(/rgba\(([^)]+),\s*[\d.]+\)/, "rgb($1)") : t?.startsWith("#") && t.length === 9 ? t.substring(0, 7) : t?.startsWith("#") && t.length === 5 ? t.substring(0, 4) : t;
986
+ const t = this.themeTitleColor;
987
+ this.themeBgColor;
988
+ const e = this.resolvedBgColor(), r = e?.startsWith("rgba") ? e.replace(/rgba\(([^)]+),\s*[\d.]+\)/, "rgb($1)") : e?.startsWith("#") && e.length === 9 ? e.substring(0, 7) : e?.startsWith("#") && e.length === 5 ? e.substring(0, 4) : e;
938
989
  return $`
939
990
  <style>
940
991
  :host {
941
- --md-sys-color-on-surface: ${e};
942
- --md-sys-color-on-surface-variant: ${e};
943
- --md-sys-color-outline: ${e};
944
- --md-sys-color-surface-container: ${i};
992
+ --md-sys-color-on-surface: ${t};
993
+ --md-sys-color-on-surface-variant: ${t};
994
+ --md-sys-color-outline: ${t};
995
+ --md-sys-color-surface-container: ${r};
945
996
  /* Dialog container and select dropdown panel always use the
946
997
  alpha-stripped color so they stay fully opaque regardless of
947
998
  the theme's (possibly translucent) background. */
948
- --md-dialog-container-color: ${i};
949
- --md-menu-container-color: ${i};
950
- --md-menu-item-selected-container-color: ${i};
951
- --md-menu-item-selected-label-text-color: ${e};
952
- color: ${e};
999
+ --md-dialog-container-color: ${r};
1000
+ --md-menu-container-color: ${r};
1001
+ --md-menu-item-selected-container-color: ${r};
1002
+ --md-menu-item-selected-label-text-color: ${t};
1003
+ color: ${t};
953
1004
  }
954
1005
  </style>
955
1006
  <div class="header">
@@ -980,11 +1031,11 @@ let b = class extends F {
980
1031
  class="form"
981
1032
  quick
982
1033
  ?open=${this.dialogOpen}
983
- @cancel=${(r) => {
984
- r.preventDefault();
1034
+ @cancel=${(i) => {
1035
+ i.preventDefault();
985
1036
  }}
986
- @keydown=${(r) => {
987
- r.key === "Escape" && r.preventDefault();
1037
+ @keydown=${(i) => {
1038
+ i.key === "Escape" && i.preventDefault();
988
1039
  }}
989
1040
  @closed=${() => this.dialogOpen = !1}
990
1041
  >
@@ -1026,7 +1077,7 @@ let b = class extends F {
1026
1077
  `;
1027
1078
  }
1028
1079
  renderForm() {
1029
- return Zt(
1080
+ return Qe(
1030
1081
  this.formKey,
1031
1082
  $`
1032
1083
  <form
@@ -1038,24 +1089,24 @@ let b = class extends F {
1038
1089
  @input=${this.handleFieldChange}
1039
1090
  @change=${this.handleFieldChange}
1040
1091
  >
1041
- ${ut(
1092
+ ${ue(
1042
1093
  this.inputData?.formFields ?? [],
1043
- (e, t) => t,
1044
- (e, t) => {
1045
- if (e.hiddenField || !this.isFieldVisible(e)) return d;
1046
- switch (e.type) {
1094
+ (t, e) => e,
1095
+ (t, e) => {
1096
+ if (t.hiddenField || !this.isFieldVisible(t)) return d;
1097
+ switch (t.type) {
1047
1098
  case "textfield":
1048
- return this.renderTextField(e, t);
1099
+ return this.renderTextField(t, e);
1049
1100
  case "numberfield":
1050
- return this.renderNumberField(e, t);
1101
+ return this.renderNumberField(t, e);
1051
1102
  case "datetime":
1052
- return this.renderDateTimeField(e, t);
1103
+ return this.renderDateTimeField(t, e);
1053
1104
  case "textarea":
1054
- return this.renderTextArea(e, t);
1105
+ return this.renderTextArea(t, e);
1055
1106
  case "dropdown":
1056
- return this.renderDropdown(e, t);
1107
+ return this.renderDropdown(t, e);
1057
1108
  case "checkbox":
1058
- return this.renderCheckbox(e, t);
1109
+ return this.renderCheckbox(t, e);
1059
1110
  }
1060
1111
  }
1061
1112
  )}
@@ -1064,7 +1115,7 @@ let b = class extends F {
1064
1115
  );
1065
1116
  }
1066
1117
  };
1067
- b.styles = vt`
1118
+ b.styles = xe`
1068
1119
  :host {
1069
1120
  display: flex;
1070
1121
  flex-direction: column;
@@ -1231,13 +1282,13 @@ b.styles = vt`
1231
1282
  }
1232
1283
  `;
1233
1284
  g([
1234
- z({ type: Object })
1285
+ q({ type: Object })
1235
1286
  ], b.prototype, "inputData", 2);
1236
1287
  g([
1237
- z({ type: Object })
1288
+ q({ type: Object })
1238
1289
  ], b.prototype, "theme", 2);
1239
1290
  g([
1240
- z({ type: String })
1291
+ q({ type: String })
1241
1292
  ], b.prototype, "route", 2);
1242
1293
  g([
1243
1294
  M()
@@ -1249,7 +1300,7 @@ g([
1249
1300
  M()
1250
1301
  ], b.prototype, "dialogOpen", 2);
1251
1302
  g([
1252
- Yt("md-dialog")
1303
+ tt("md-dialog")
1253
1304
  ], b.prototype, "dialog", 2);
1254
1305
  g([
1255
1306
  M()
@@ -1258,7 +1309,7 @@ g([
1258
1309
  M()
1259
1310
  ], b.prototype, "fieldValues", 2);
1260
1311
  b = g([
1261
- Jt("widget-form-1.0.32")
1312
+ Ge("widget-form-1.0.34")
1262
1313
  ], b);
1263
1314
  export {
1264
1315
  b as WidgetForm