@decidables/decidables-elements 0.4.0 → 0.4.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.
@@ -3,13 +3,13 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const t$1 = window,
6
+ const t$1 = globalThis,
7
7
  e$2 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
8
- s$3 = Symbol(),
9
- n$3 = new WeakMap();
10
- let o$3 = class o {
11
- constructor(t, e, n) {
12
- if (this._$cssResult$ = !0, n !== s$3) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
8
+ s$2 = Symbol(),
9
+ o$3 = new WeakMap();
10
+ let n$2 = class n {
11
+ constructor(t, e, o) {
12
+ if (this._$cssResult$ = !0, o !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
13
13
  this.cssText = t, this.t = e;
14
14
  }
15
15
  get styleSheet() {
@@ -17,7 +17,7 @@ let o$3 = class o {
17
17
  const s = this.t;
18
18
  if (e$2 && void 0 === t) {
19
19
  const e = void 0 !== s && 1 === s.length;
20
- e && (t = n$3.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && n$3.set(s, t));
20
+ e && (t = o$3.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && o$3.set(s, t));
21
21
  }
22
22
  return t;
23
23
  }
@@ -25,26 +25,26 @@ let o$3 = class o {
25
25
  return this.cssText;
26
26
  }
27
27
  };
28
- const r$2 = t => new o$3("string" == typeof t ? t : t + "", void 0, s$3),
29
- i$1 = (t, ...e) => {
30
- const n = 1 === t.length ? t[0] : e.reduce((e, s, n) => e + (t => {
28
+ const r$3 = t => new n$2("string" == typeof t ? t : t + "", void 0, s$2),
29
+ i$2 = (t, ...e) => {
30
+ const o = 1 === t.length ? t[0] : e.reduce((e, s, o) => e + (t => {
31
31
  if (!0 === t._$cssResult$) return t.cssText;
32
32
  if ("number" == typeof t) return t;
33
33
  throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
34
- })(s) + t[n + 1], t[0]);
35
- return new o$3(n, t, s$3);
34
+ })(s) + t[o + 1], t[0]);
35
+ return new n$2(o, t, s$2);
36
36
  },
37
- S$1 = (s, n) => {
38
- e$2 ? s.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(e => {
39
- const n = document.createElement("style"),
40
- o = t$1.litNonce;
41
- void 0 !== o && n.setAttribute("nonce", o), n.textContent = e.cssText, s.appendChild(n);
42
- });
37
+ S$1 = (s, o) => {
38
+ if (e$2) s.adoptedStyleSheets = o.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet);else for (const e of o) {
39
+ const o = document.createElement("style"),
40
+ n = t$1.litNonce;
41
+ void 0 !== n && o.setAttribute("nonce", n), o.textContent = e.cssText, s.appendChild(o);
42
+ }
43
43
  },
44
- c$1 = e$2 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
44
+ c$2 = e$2 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
45
45
  let e = "";
46
46
  for (const s of t.cssRules) e += s.cssText;
47
- return r$2(e);
47
+ return r$3(e);
48
48
  })(t) : t;
49
49
 
50
50
  /**
@@ -52,16 +52,24 @@ const r$2 = t => new o$3("string" == typeof t ? t : t + "", void 0, s$3),
52
52
  * Copyright 2017 Google LLC
53
53
  * SPDX-License-Identifier: BSD-3-Clause
54
54
  */
55
- var s$2;
56
- const e$1 = window,
57
- r$1 = e$1.trustedTypes,
58
- h$1 = r$1 ? r$1.emptyScript : "",
59
- o$2 = e$1.reactiveElementPolyfillSupport,
60
- n$2 = {
61
- toAttribute(t, i) {
62
- switch (i) {
55
+ const {
56
+ is: i$1,
57
+ defineProperty: e$1,
58
+ getOwnPropertyDescriptor: r$2,
59
+ getOwnPropertyNames: h$1,
60
+ getOwnPropertySymbols: o$2,
61
+ getPrototypeOf: n$1
62
+ } = Object,
63
+ a$1 = globalThis,
64
+ c$1 = a$1.trustedTypes,
65
+ l$1 = c$1 ? c$1.emptyScript : "",
66
+ p$1 = a$1.reactiveElementPolyfillSupport,
67
+ d$1 = (t, s) => t,
68
+ u$1 = {
69
+ toAttribute(t, s) {
70
+ switch (s) {
63
71
  case Boolean:
64
- t = t ? h$1 : null;
72
+ t = t ? l$1 : null;
65
73
  break;
66
74
  case Object:
67
75
  case Array:
@@ -69,165 +77,177 @@ const e$1 = window,
69
77
  }
70
78
  return t;
71
79
  },
72
- fromAttribute(t, i) {
73
- let s = t;
74
- switch (i) {
80
+ fromAttribute(t, s) {
81
+ let i = t;
82
+ switch (s) {
75
83
  case Boolean:
76
- s = null !== t;
84
+ i = null !== t;
77
85
  break;
78
86
  case Number:
79
- s = null === t ? null : Number(t);
87
+ i = null === t ? null : Number(t);
80
88
  break;
81
89
  case Object:
82
90
  case Array:
83
91
  try {
84
- s = JSON.parse(t);
92
+ i = JSON.parse(t);
85
93
  } catch (t) {
86
- s = null;
94
+ i = null;
87
95
  }
88
96
  }
89
- return s;
97
+ return i;
90
98
  }
91
99
  },
92
- a$1 = (t, i) => i !== t && (i == i || t == t),
93
- l$3 = {
100
+ f$1 = (t, s) => !i$1(t, s),
101
+ y$1 = {
94
102
  attribute: !0,
95
103
  type: String,
96
- converter: n$2,
104
+ converter: u$1,
97
105
  reflect: !1,
98
- hasChanged: a$1
99
- },
100
- d$1 = "finalized";
101
- let u$1 = class u extends HTMLElement {
102
- constructor() {
103
- super(), this._$Ei = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
104
- }
106
+ hasChanged: f$1
107
+ };
108
+ Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= new WeakMap();
109
+ let b$1 = class b extends HTMLElement {
105
110
  static addInitializer(t) {
106
- var i;
107
- this.finalize(), (null !== (i = this.h) && void 0 !== i ? i : this.h = []).push(t);
111
+ this._$Ei(), (this.l ??= []).push(t);
108
112
  }
109
113
  static get observedAttributes() {
110
- this.finalize();
111
- const t = [];
112
- return this.elementProperties.forEach((i, s) => {
113
- const e = this._$Ep(s, i);
114
- void 0 !== e && (this._$Ev.set(e, s), t.push(e));
115
- }), t;
116
- }
117
- static createProperty(t, i = l$3) {
118
- if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
119
- const s = "symbol" == typeof t ? Symbol() : "__" + t,
120
- e = this.getPropertyDescriptor(t, s, i);
121
- void 0 !== e && Object.defineProperty(this.prototype, t, e);
114
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
115
+ }
116
+ static createProperty(t, s = y$1) {
117
+ if (s.state && (s.attribute = !1), this._$Ei(), this.elementProperties.set(t, s), !s.noAccessor) {
118
+ const i = Symbol(),
119
+ r = this.getPropertyDescriptor(t, i, s);
120
+ void 0 !== r && e$1(this.prototype, t, r);
122
121
  }
123
122
  }
124
- static getPropertyDescriptor(t, i, s) {
123
+ static getPropertyDescriptor(t, s, i) {
124
+ const {
125
+ get: e,
126
+ set: h
127
+ } = r$2(this.prototype, t) ?? {
128
+ get() {
129
+ return this[s];
130
+ },
131
+ set(t) {
132
+ this[s] = t;
133
+ }
134
+ };
125
135
  return {
126
136
  get() {
127
- return this[i];
137
+ return e?.call(this);
128
138
  },
129
- set(e) {
130
- const r = this[t];
131
- this[i] = e, this.requestUpdate(t, r, s);
139
+ set(s) {
140
+ const r = e?.call(this);
141
+ h.call(this, s), this.requestUpdate(t, r, i);
132
142
  },
133
143
  configurable: !0,
134
144
  enumerable: !0
135
145
  };
136
146
  }
137
147
  static getPropertyOptions(t) {
138
- return this.elementProperties.get(t) || l$3;
148
+ return this.elementProperties.get(t) ?? y$1;
149
+ }
150
+ static _$Ei() {
151
+ if (this.hasOwnProperty(d$1("elementProperties"))) return;
152
+ const t = n$1(this);
153
+ t.finalize(), void 0 !== t.l && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
139
154
  }
140
155
  static finalize() {
141
- if (this.hasOwnProperty(d$1)) return !1;
142
- this[d$1] = !0;
143
- const t = Object.getPrototypeOf(this);
144
- if (t.finalize(), void 0 !== t.h && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = new Map(), this.hasOwnProperty("properties")) {
156
+ if (this.hasOwnProperty(d$1("finalized"))) return;
157
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
145
158
  const t = this.properties,
146
- i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
147
- for (const s of i) this.createProperty(s, t[s]);
159
+ s = [...h$1(t), ...o$2(t)];
160
+ for (const i of s) this.createProperty(i, t[i]);
161
+ }
162
+ const t = this[Symbol.metadata];
163
+ if (null !== t) {
164
+ const s = litPropertyMetadata.get(t);
165
+ if (void 0 !== s) for (const [t, i] of s) this.elementProperties.set(t, i);
148
166
  }
149
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
167
+ this._$Eh = new Map();
168
+ for (const [t, s] of this.elementProperties) {
169
+ const i = this._$Eu(t, s);
170
+ void 0 !== i && this._$Eh.set(i, t);
171
+ }
172
+ this.elementStyles = this.finalizeStyles(this.styles);
173
+ }
174
+ static finalizeStyles(s) {
175
+ const i = [];
176
+ if (Array.isArray(s)) {
177
+ const e = new Set(s.flat(1 / 0).reverse());
178
+ for (const s of e) i.unshift(c$2(s));
179
+ } else void 0 !== s && i.push(c$2(s));
180
+ return i;
150
181
  }
151
- static finalizeStyles(i) {
152
- const s = [];
153
- if (Array.isArray(i)) {
154
- const e = new Set(i.flat(1 / 0).reverse());
155
- for (const i of e) s.unshift(c$1(i));
156
- } else void 0 !== i && s.push(c$1(i));
157
- return s;
182
+ static _$Eu(t, s) {
183
+ const i = s.attribute;
184
+ return !1 === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
158
185
  }
159
- static _$Ep(t, i) {
160
- const s = i.attribute;
161
- return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
186
+ constructor() {
187
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
162
188
  }
163
- _$Eu() {
164
- var t;
165
- this._$E_ = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$Eg(), this.requestUpdate(), null === (t = this.constructor.h) || void 0 === t || t.forEach(t => t(this));
189
+ _$Ev() {
190
+ this._$Eg = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$ES(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
166
191
  }
167
192
  addController(t) {
168
- var i, s;
169
- (null !== (i = this._$ES) && void 0 !== i ? i : this._$ES = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
193
+ (this._$E_ ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
170
194
  }
171
195
  removeController(t) {
172
- var i;
173
- null === (i = this._$ES) || void 0 === i || i.splice(this._$ES.indexOf(t) >>> 0, 1);
196
+ this._$E_?.delete(t);
174
197
  }
175
- _$Eg() {
176
- this.constructor.elementProperties.forEach((t, i) => {
177
- this.hasOwnProperty(i) && (this._$Ei.set(i, this[i]), delete this[i]);
178
- });
198
+ _$ES() {
199
+ const t = new Map(),
200
+ s = this.constructor.elementProperties;
201
+ for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
202
+ t.size > 0 && (this._$Ep = t);
179
203
  }
180
204
  createRenderRoot() {
181
- var t;
182
- const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
183
- return S$1(s, this.constructor.elementStyles), s;
205
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
206
+ return S$1(t, this.constructor.elementStyles), t;
184
207
  }
185
208
  connectedCallback() {
186
- var t;
187
- void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
188
- var i;
189
- return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
190
- });
209
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$E_?.forEach(t => t.hostConnected?.());
191
210
  }
192
211
  enableUpdating(t) {}
193
212
  disconnectedCallback() {
194
- var t;
195
- null === (t = this._$ES) || void 0 === t || t.forEach(t => {
196
- var i;
197
- return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
198
- });
213
+ this._$E_?.forEach(t => t.hostDisconnected?.());
199
214
  }
200
- attributeChangedCallback(t, i, s) {
201
- this._$AK(t, s);
215
+ attributeChangedCallback(t, s, i) {
216
+ this._$AK(t, i);
202
217
  }
203
- _$EO(t, i, s = l$3) {
204
- var e;
205
- const r = this.constructor._$Ep(t, s);
206
- if (void 0 !== r && !0 === s.reflect) {
207
- const h = (void 0 !== (null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) ? s.converter : n$2).toAttribute(i, s.type);
208
- this._$El = t, null == h ? this.removeAttribute(r) : this.setAttribute(r, h), this._$El = null;
218
+ _$EO(t, s) {
219
+ const i = this.constructor.elementProperties.get(t),
220
+ e = this.constructor._$Eu(t, i);
221
+ if (void 0 !== e && !0 === i.reflect) {
222
+ const r = (void 0 !== i.converter?.toAttribute ? i.converter : u$1).toAttribute(s, i.type);
223
+ this._$Em = t, null == r ? this.removeAttribute(e) : this.setAttribute(e, r), this._$Em = null;
209
224
  }
210
225
  }
211
- _$AK(t, i) {
212
- var s;
213
- const e = this.constructor,
214
- r = e._$Ev.get(t);
215
- if (void 0 !== r && this._$El !== r) {
216
- const t = e.getPropertyOptions(r),
217
- h = "function" == typeof t.converter ? {
226
+ _$AK(t, s) {
227
+ const i = this.constructor,
228
+ e = i._$Eh.get(t);
229
+ if (void 0 !== e && this._$Em !== e) {
230
+ const t = i.getPropertyOptions(e),
231
+ r = "function" == typeof t.converter ? {
218
232
  fromAttribute: t.converter
219
- } : void 0 !== (null === (s = t.converter) || void 0 === s ? void 0 : s.fromAttribute) ? t.converter : n$2;
220
- this._$El = r, this[r] = h.fromAttribute(i, t.type), this._$El = null;
233
+ } : void 0 !== t.converter?.fromAttribute ? t.converter : u$1;
234
+ this._$Em = e, this[e] = r.fromAttribute(s, t.type), this._$Em = null;
235
+ }
236
+ }
237
+ requestUpdate(t, s, i, e = !1, r) {
238
+ if (void 0 !== t) {
239
+ if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(e ? r : this[t], s)) return;
240
+ this.C(t, s, i);
221
241
  }
242
+ !1 === this.isUpdatePending && (this._$Eg = this._$EP());
222
243
  }
223
- requestUpdate(t, i, s) {
224
- let e = !0;
225
- void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || a$1)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$El !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$E_ = this._$Ej());
244
+ C(t, s, i) {
245
+ this._$AL.has(t) || this._$AL.set(t, s), !0 === i.reflect && this._$Em !== t && (this._$Ej ??= new Set()).add(t);
226
246
  }
227
- async _$Ej() {
247
+ async _$EP() {
228
248
  this.isUpdatePending = !0;
229
249
  try {
230
- await this._$E_;
250
+ await this._$Eg;
231
251
  } catch (t) {
232
252
  Promise.reject(t);
233
253
  }
@@ -238,192 +258,182 @@ let u$1 = class u extends HTMLElement {
238
258
  return this.performUpdate();
239
259
  }
240
260
  performUpdate() {
241
- var t;
242
261
  if (!this.isUpdatePending) return;
243
- this.hasUpdated, this._$Ei && (this._$Ei.forEach((t, i) => this[i] = t), this._$Ei = void 0);
244
- let i = !1;
262
+ if (!this.hasUpdated) {
263
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
264
+ for (const [t, s] of this._$Ep) this[t] = s;
265
+ this._$Ep = void 0;
266
+ }
267
+ const t = this.constructor.elementProperties;
268
+ if (t.size > 0) for (const [s, i] of t) !0 !== i.wrapped || this._$AL.has(s) || void 0 === this[s] || this.C(s, this[s], i);
269
+ }
270
+ let t = !1;
245
271
  const s = this._$AL;
246
272
  try {
247
- i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
248
- var i;
249
- return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
250
- }), this.update(s)) : this._$Ek();
251
- } catch (t) {
252
- throw i = !1, this._$Ek(), t;
273
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$E_?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$ET();
274
+ } catch (s) {
275
+ throw t = !1, this._$ET(), s;
253
276
  }
254
- i && this._$AE(s);
277
+ t && this._$AE(s);
255
278
  }
256
279
  willUpdate(t) {}
257
280
  _$AE(t) {
258
- var i;
259
- null === (i = this._$ES) || void 0 === i || i.forEach(t => {
260
- var i;
261
- return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
262
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
281
+ this._$E_?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
263
282
  }
264
- _$Ek() {
283
+ _$ET() {
265
284
  this._$AL = new Map(), this.isUpdatePending = !1;
266
285
  }
267
286
  get updateComplete() {
268
287
  return this.getUpdateComplete();
269
288
  }
270
289
  getUpdateComplete() {
271
- return this._$E_;
290
+ return this._$Eg;
272
291
  }
273
292
  shouldUpdate(t) {
274
293
  return !0;
275
294
  }
276
295
  update(t) {
277
- void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$EO(i, this[i], t)), this._$EC = void 0), this._$Ek();
296
+ this._$Ej &&= this._$Ej.forEach(t => this._$EO(t, this[t])), this._$ET();
278
297
  }
279
298
  updated(t) {}
280
299
  firstUpdated(t) {}
281
300
  };
282
- u$1[d$1] = !0, u$1.elementProperties = new Map(), u$1.elementStyles = [], u$1.shadowRootOptions = {
301
+ b$1.elementStyles = [], b$1.shadowRootOptions = {
283
302
  mode: "open"
284
- }, null == o$2 || o$2({
285
- ReactiveElement: u$1
286
- }), (null !== (s$2 = e$1.reactiveElementVersions) && void 0 !== s$2 ? s$2 : e$1.reactiveElementVersions = []).push("1.6.3");
303
+ }, b$1[d$1("elementProperties")] = new Map(), b$1[d$1("finalized")] = new Map(), p$1?.({
304
+ ReactiveElement: b$1
305
+ }), (a$1.reactiveElementVersions ??= []).push("2.0.2");
287
306
 
288
307
  /**
289
308
  * @license
290
309
  * Copyright 2017 Google LLC
291
310
  * SPDX-License-Identifier: BSD-3-Clause
292
311
  */
293
- var t;
294
- const i = window,
295
- s$1 = i.trustedTypes,
296
- e = s$1 ? s$1.createPolicy("lit-html", {
312
+ const t = globalThis,
313
+ i = t.trustedTypes,
314
+ s$1 = i ? i.createPolicy("lit-html", {
297
315
  createHTML: t => t
298
316
  }) : void 0,
299
- o$1 = "$lit$",
300
- n$1 = `lit$${(Math.random() + "").slice(9)}$`,
301
- l$2 = "?" + n$1,
302
- h = `<${l$2}>`,
303
- r = document,
304
- u = () => r.createComment(""),
305
- d = t => null === t || "object" != typeof t && "function" != typeof t,
306
- c = Array.isArray,
307
- v = t => c(t) || "function" == typeof (null == t ? void 0 : t[Symbol.iterator]),
308
- a = "[ \t\n\f\r]",
317
+ e = "$lit$",
318
+ h = `lit$${(Math.random() + "").slice(9)}$`,
319
+ o$1 = "?" + h,
320
+ n = `<${o$1}>`,
321
+ r$1 = document,
322
+ l = () => r$1.createComment(""),
323
+ c = t => null === t || "object" != typeof t && "function" != typeof t,
324
+ a = Array.isArray,
325
+ u = t => a(t) || "function" == typeof t?.[Symbol.iterator],
326
+ d = "[ \t\n\f\r]",
309
327
  f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
310
- _ = /-->/g,
311
- m = />/g,
312
- p = RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
313
- g = /'/g,
314
- $ = /"/g,
315
- y = /^(?:script|style|textarea|title)$/i,
316
- w = t => (i, ...s) => ({
328
+ v = /-->/g,
329
+ _ = />/g,
330
+ m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
331
+ p = /'/g,
332
+ g = /"/g,
333
+ $ = /^(?:script|style|textarea|title)$/i,
334
+ y = t => (i, ...s) => ({
317
335
  _$litType$: t,
318
336
  strings: i,
319
337
  values: s
320
338
  }),
321
- x = w(1),
322
- b = w(2),
323
- T = Symbol.for("lit-noChange"),
324
- A = Symbol.for("lit-nothing"),
325
- E = new WeakMap(),
326
- C = r.createTreeWalker(r, 129, null, !1);
327
- function P(t, i) {
339
+ x = y(1),
340
+ b = y(2),
341
+ w = Symbol.for("lit-noChange"),
342
+ T = Symbol.for("lit-nothing"),
343
+ A = new WeakMap(),
344
+ E = r$1.createTreeWalker(r$1, 129);
345
+ function C(t, i) {
328
346
  if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
329
- return void 0 !== e ? e.createHTML(i) : i;
347
+ return void 0 !== s$1 ? s$1.createHTML(i) : i;
330
348
  }
331
- const V = (t, i) => {
349
+ const P = (t, i) => {
332
350
  const s = t.length - 1,
333
- e = [];
334
- let l,
335
- r = 2 === i ? "<svg>" : "",
336
- u = f;
351
+ o = [];
352
+ let r,
353
+ l = 2 === i ? "<svg>" : "",
354
+ c = f;
337
355
  for (let i = 0; i < s; i++) {
338
356
  const s = t[i];
339
- let d,
340
- c,
341
- v = -1,
342
- a = 0;
343
- for (; a < s.length && (u.lastIndex = a, c = u.exec(s), null !== c);) a = u.lastIndex, u === f ? "!--" === c[1] ? u = _ : void 0 !== c[1] ? u = m : void 0 !== c[2] ? (y.test(c[2]) && (l = RegExp("</" + c[2], "g")), u = p) : void 0 !== c[3] && (u = p) : u === p ? ">" === c[0] ? (u = null != l ? l : f, v = -1) : void 0 === c[1] ? v = -2 : (v = u.lastIndex - c[2].length, d = c[1], u = void 0 === c[3] ? p : '"' === c[3] ? $ : g) : u === $ || u === g ? u = p : u === _ || u === m ? u = f : (u = p, l = void 0);
344
- const w = u === p && t[i + 1].startsWith("/>") ? " " : "";
345
- r += u === f ? s + h : v >= 0 ? (e.push(d), s.slice(0, v) + o$1 + s.slice(v) + n$1 + w) : s + n$1 + (-2 === v ? (e.push(void 0), i) : w);
346
- }
347
- return [P(t, r + (t[s] || "<?>") + (2 === i ? "</svg>" : "")), e];
357
+ let a,
358
+ u,
359
+ d = -1,
360
+ y = 0;
361
+ for (; y < s.length && (c.lastIndex = y, u = c.exec(s), null !== u);) y = c.lastIndex, c === f ? "!--" === u[1] ? c = v : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m) : void 0 !== u[3] && (c = m) : c === m ? ">" === u[0] ? (c = r ?? f, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? m : '"' === u[3] ? g : p) : c === g || c === p ? c = m : c === v || c === _ ? c = f : (c = m, r = void 0);
362
+ const x = c === m && t[i + 1].startsWith("/>") ? " " : "";
363
+ l += c === f ? s + n : d >= 0 ? (o.push(a), s.slice(0, d) + e + s.slice(d) + h + x) : s + h + (-2 === d ? i : x);
364
+ }
365
+ return [C(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : "")), o];
348
366
  };
349
- class N {
367
+ class V {
350
368
  constructor({
351
369
  strings: t,
352
- _$litType$: i
353
- }, e) {
354
- let h;
370
+ _$litType$: s
371
+ }, n) {
372
+ let r;
355
373
  this.parts = [];
356
- let r = 0,
357
- d = 0;
358
- const c = t.length - 1,
359
- v = this.parts,
360
- [a, f] = V(t, i);
361
- if (this.el = N.createElement(a, e), C.currentNode = this.el.content, 2 === i) {
362
- const t = this.el.content,
363
- i = t.firstChild;
364
- i.remove(), t.append(...i.childNodes);
374
+ let c = 0,
375
+ a = 0;
376
+ const u = t.length - 1,
377
+ d = this.parts,
378
+ [f, v] = P(t, s);
379
+ if (this.el = V.createElement(f, n), E.currentNode = this.el.content, 2 === s) {
380
+ const t = this.el.content.firstChild;
381
+ t.replaceWith(...t.childNodes);
365
382
  }
366
- for (; null !== (h = C.nextNode()) && v.length < c;) {
367
- if (1 === h.nodeType) {
368
- if (h.hasAttributes()) {
369
- const t = [];
370
- for (const i of h.getAttributeNames()) if (i.endsWith(o$1) || i.startsWith(n$1)) {
371
- const s = f[d++];
372
- if (t.push(i), void 0 !== s) {
373
- const t = h.getAttribute(s.toLowerCase() + o$1).split(n$1),
374
- i = /([.?@])?(.*)/.exec(s);
375
- v.push({
376
- type: 1,
377
- index: r,
378
- name: i[2],
379
- strings: t,
380
- ctor: "." === i[1] ? H : "?" === i[1] ? L : "@" === i[1] ? z : k
381
- });
382
- } else v.push({
383
- type: 6,
384
- index: r
385
- });
386
- }
387
- for (const i of t) h.removeAttribute(i);
388
- }
389
- if (y.test(h.tagName)) {
390
- const t = h.textContent.split(n$1),
391
- i = t.length - 1;
392
- if (i > 0) {
393
- h.textContent = s$1 ? s$1.emptyScript : "";
394
- for (let s = 0; s < i; s++) h.append(t[s], u()), C.nextNode(), v.push({
383
+ for (; null !== (r = E.nextNode()) && d.length < u;) {
384
+ if (1 === r.nodeType) {
385
+ if (r.hasAttributes()) for (const t of r.getAttributeNames()) if (t.endsWith(e)) {
386
+ const i = v[a++],
387
+ s = r.getAttribute(t).split(h),
388
+ e = /([.?@])?(.*)/.exec(i);
389
+ d.push({
390
+ type: 1,
391
+ index: c,
392
+ name: e[2],
393
+ strings: s,
394
+ ctor: "." === e[1] ? k : "?" === e[1] ? H : "@" === e[1] ? I : R
395
+ }), r.removeAttribute(t);
396
+ } else t.startsWith(h) && (d.push({
397
+ type: 6,
398
+ index: c
399
+ }), r.removeAttribute(t));
400
+ if ($.test(r.tagName)) {
401
+ const t = r.textContent.split(h),
402
+ s = t.length - 1;
403
+ if (s > 0) {
404
+ r.textContent = i ? i.emptyScript : "";
405
+ for (let i = 0; i < s; i++) r.append(t[i], l()), E.nextNode(), d.push({
395
406
  type: 2,
396
- index: ++r
407
+ index: ++c
397
408
  });
398
- h.append(t[i], u());
409
+ r.append(t[s], l());
399
410
  }
400
411
  }
401
- } else if (8 === h.nodeType) if (h.data === l$2) v.push({
412
+ } else if (8 === r.nodeType) if (r.data === o$1) d.push({
402
413
  type: 2,
403
- index: r
414
+ index: c
404
415
  });else {
405
416
  let t = -1;
406
- for (; -1 !== (t = h.data.indexOf(n$1, t + 1));) v.push({
417
+ for (; -1 !== (t = r.data.indexOf(h, t + 1));) d.push({
407
418
  type: 7,
408
- index: r
409
- }), t += n$1.length - 1;
419
+ index: c
420
+ }), t += h.length - 1;
410
421
  }
411
- r++;
422
+ c++;
412
423
  }
413
424
  }
414
425
  static createElement(t, i) {
415
- const s = r.createElement("template");
426
+ const s = r$1.createElement("template");
416
427
  return s.innerHTML = t, s;
417
428
  }
418
429
  }
419
- function S(t, i, s = t, e) {
420
- var o, n, l, h;
421
- if (i === T) return i;
422
- let r = void 0 !== e ? null === (o = s._$Co) || void 0 === o ? void 0 : o[e] : s._$Cl;
423
- const u = d(i) ? void 0 : i._$litDirective$;
424
- return (null == r ? void 0 : r.constructor) !== u && (null === (n = null == r ? void 0 : r._$AO) || void 0 === n || n.call(r, !1), void 0 === u ? r = void 0 : (r = new u(t), r._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Co) && void 0 !== l ? l : h._$Co = [])[e] = r : s._$Cl = r), void 0 !== r && (i = S(t, r._$AS(t, i.values), r, e)), i;
430
+ function N(t, i, s = t, e) {
431
+ if (i === w) return i;
432
+ let h = void 0 !== e ? s._$Co?.[e] : s._$Cl;
433
+ const o = c(i) ? void 0 : i._$litDirective$;
434
+ return h?.constructor !== o && (h?._$AO?.(!1), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? (s._$Co ??= [])[e] = h : s._$Cl = h), void 0 !== h && (i = N(t, h._$AS(t, i.values), h, e)), i;
425
435
  }
426
- class M {
436
+ class S {
427
437
  constructor(t, i) {
428
438
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
429
439
  }
@@ -434,46 +444,43 @@ class M {
434
444
  return this._$AM._$AU;
435
445
  }
436
446
  u(t) {
437
- var i;
438
447
  const {
439
448
  el: {
440
- content: s
449
+ content: i
441
450
  },
442
- parts: e
451
+ parts: s
443
452
  } = this._$AD,
444
- o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : r).importNode(s, !0);
445
- C.currentNode = o;
446
- let n = C.nextNode(),
447
- l = 0,
448
- h = 0,
449
- u = e[0];
450
- for (; void 0 !== u;) {
451
- if (l === u.index) {
453
+ e = (t?.creationScope ?? r$1).importNode(i, !0);
454
+ E.currentNode = e;
455
+ let h = E.nextNode(),
456
+ o = 0,
457
+ n = 0,
458
+ l = s[0];
459
+ for (; void 0 !== l;) {
460
+ if (o === l.index) {
452
461
  let i;
453
- 2 === u.type ? i = new R(n, n.nextSibling, this, t) : 1 === u.type ? i = new u.ctor(n, u.name, u.strings, this, t) : 6 === u.type && (i = new Z(n, this, t)), this._$AV.push(i), u = e[++h];
462
+ 2 === l.type ? i = new M(h, h.nextSibling, this, t) : 1 === l.type ? i = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i = new L(h, this, t)), this._$AV.push(i), l = s[++n];
454
463
  }
455
- l !== (null == u ? void 0 : u.index) && (n = C.nextNode(), l++);
464
+ o !== l?.index && (h = E.nextNode(), o++);
456
465
  }
457
- return C.currentNode = r, o;
466
+ return E.currentNode = r$1, e;
458
467
  }
459
- v(t) {
468
+ p(t) {
460
469
  let i = 0;
461
470
  for (const s of this._$AV) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
462
471
  }
463
472
  }
464
- class R {
465
- constructor(t, i, s, e) {
466
- var o;
467
- this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cp = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
468
- }
473
+ class M {
469
474
  get _$AU() {
470
- var t, i;
471
- return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cp;
475
+ return this._$AM?._$AU ?? this._$Cv;
476
+ }
477
+ constructor(t, i, s, e) {
478
+ this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = e?.isConnected ?? !0;
472
479
  }
473
480
  get parentNode() {
474
481
  let t = this._$AA.parentNode;
475
482
  const i = this._$AM;
476
- return void 0 !== i && 11 === (null == t ? void 0 : t.nodeType) && (t = i.parentNode), t;
483
+ return void 0 !== i && 11 === t?.nodeType && (t = i.parentNode), t;
477
484
  }
478
485
  get startNode() {
479
486
  return this._$AA;
@@ -482,7 +489,7 @@ class R {
482
489
  return this._$AB;
483
490
  }
484
491
  _$AI(t, i = this) {
485
- t = S(this, t, i), d(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== T && this._(t) : void 0 !== t._$litType$ ? this.g(t) : void 0 !== t.nodeType ? this.$(t) : v(t) ? this.T(t) : this._(t);
492
+ t = N(this, t, i), c(t) ? t === T || null == t || "" === t ? (this._$AH !== T && this._$AR(), this._$AH = T) : t !== this._$AH && t !== w && this._(t) : void 0 !== t._$litType$ ? this.g(t) : void 0 !== t.nodeType ? this.$(t) : u(t) ? this.T(t) : this._(t);
486
493
  }
487
494
  k(t) {
488
495
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -491,104 +498,98 @@ class R {
491
498
  this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
492
499
  }
493
500
  _(t) {
494
- this._$AH !== A && d(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r.createTextNode(t)), this._$AH = t;
501
+ this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r$1.createTextNode(t)), this._$AH = t;
495
502
  }
496
503
  g(t) {
497
- var i;
498
504
  const {
499
- values: s,
500
- _$litType$: e
505
+ values: i,
506
+ _$litType$: s
501
507
  } = t,
502
- o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = N.createElement(P(e.h, e.h[0]), this.options)), e);
503
- if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.v(s);else {
504
- const t = new M(o, this),
505
- i = t.u(this.options);
506
- t.v(s), this.$(i), this._$AH = t;
508
+ e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = V.createElement(C(s.h, s.h[0]), this.options)), s);
509
+ if (this._$AH?._$AD === e) this._$AH.p(i);else {
510
+ const t = new S(e, this),
511
+ s = t.u(this.options);
512
+ t.p(i), this.$(s), this._$AH = t;
507
513
  }
508
514
  }
509
515
  _$AC(t) {
510
- let i = E.get(t.strings);
511
- return void 0 === i && E.set(t.strings, i = new N(t)), i;
516
+ let i = A.get(t.strings);
517
+ return void 0 === i && A.set(t.strings, i = new V(t)), i;
512
518
  }
513
519
  T(t) {
514
- c(this._$AH) || (this._$AH = [], this._$AR());
520
+ a(this._$AH) || (this._$AH = [], this._$AR());
515
521
  const i = this._$AH;
516
522
  let s,
517
523
  e = 0;
518
- for (const o of t) e === i.length ? i.push(s = new R(this.k(u()), this.k(u()), this, this.options)) : s = i[e], s._$AI(o), e++;
524
+ for (const h of t) e === i.length ? i.push(s = new M(this.k(l()), this.k(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
519
525
  e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
520
526
  }
521
527
  _$AR(t = this._$AA.nextSibling, i) {
522
- var s;
523
- for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
528
+ for (this._$AP?.(!1, !0, i); t && t !== this._$AB;) {
524
529
  const i = t.nextSibling;
525
530
  t.remove(), t = i;
526
531
  }
527
532
  }
528
533
  setConnected(t) {
529
- var i;
530
- void 0 === this._$AM && (this._$Cp = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
534
+ void 0 === this._$AM && (this._$Cv = t, this._$AP?.(t));
531
535
  }
532
536
  }
533
- class k {
534
- constructor(t, i, s, e, o) {
535
- this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = o, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = A;
536
- }
537
+ class R {
537
538
  get tagName() {
538
539
  return this.element.tagName;
539
540
  }
540
541
  get _$AU() {
541
542
  return this._$AM._$AU;
542
543
  }
544
+ constructor(t, i, s, e, h) {
545
+ this.type = 1, this._$AH = T, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = T;
546
+ }
543
547
  _$AI(t, i = this, s, e) {
544
- const o = this.strings;
545
- let n = !1;
546
- if (void 0 === o) t = S(this, t, i, 0), n = !d(t) || t !== this._$AH && t !== T, n && (this._$AH = t);else {
548
+ const h = this.strings;
549
+ let o = !1;
550
+ if (void 0 === h) t = N(this, t, i, 0), o = !c(t) || t !== this._$AH && t !== w, o && (this._$AH = t);else {
547
551
  const e = t;
548
- let l, h;
549
- for (t = o[0], l = 0; l < o.length - 1; l++) h = S(this, e[s + l], i, l), h === T && (h = this._$AH[l]), n || (n = !d(h) || h !== this._$AH[l]), h === A ? t = A : t !== A && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
552
+ let n, r;
553
+ for (t = h[0], n = 0; n < h.length - 1; n++) r = N(this, e[s + n], i, n), r === w && (r = this._$AH[n]), o ||= !c(r) || r !== this._$AH[n], r === T ? t = T : t !== T && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
550
554
  }
551
- n && !e && this.j(t);
555
+ o && !e && this.O(t);
552
556
  }
553
- j(t) {
554
- t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
557
+ O(t) {
558
+ t === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
555
559
  }
556
560
  }
557
- class H extends k {
561
+ class k extends R {
558
562
  constructor() {
559
563
  super(...arguments), this.type = 3;
560
564
  }
561
- j(t) {
562
- this.element[this.name] = t === A ? void 0 : t;
565
+ O(t) {
566
+ this.element[this.name] = t === T ? void 0 : t;
563
567
  }
564
568
  }
565
- const I = s$1 ? s$1.emptyScript : "";
566
- class L extends k {
569
+ class H extends R {
567
570
  constructor() {
568
571
  super(...arguments), this.type = 4;
569
572
  }
570
- j(t) {
571
- t && t !== A ? this.element.setAttribute(this.name, I) : this.element.removeAttribute(this.name);
573
+ O(t) {
574
+ this.element.toggleAttribute(this.name, !!t && t !== T);
572
575
  }
573
576
  }
574
- class z extends k {
575
- constructor(t, i, s, e, o) {
576
- super(t, i, s, e, o), this.type = 5;
577
+ class I extends R {
578
+ constructor(t, i, s, e, h) {
579
+ super(t, i, s, e, h), this.type = 5;
577
580
  }
578
581
  _$AI(t, i = this) {
579
- var s;
580
- if ((t = null !== (s = S(this, t, i, 0)) && void 0 !== s ? s : A) === T) return;
581
- const e = this._$AH,
582
- o = t === A && e !== A || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
583
- n = t !== A && (e === A || o);
584
- o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
582
+ if ((t = N(this, t, i, 0) ?? T) === w) return;
583
+ const s = this._$AH,
584
+ e = t === T && s !== T || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
585
+ h = t !== T && (s === T || e);
586
+ e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
585
587
  }
586
588
  handleEvent(t) {
587
- var i, s;
588
- "function" == typeof this._$AH ? this._$AH.call(null !== (s = null === (i = this.options) || void 0 === i ? void 0 : i.host) && void 0 !== s ? s : this.element, t) : this._$AH.handleEvent(t);
589
+ "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
589
590
  }
590
591
  }
591
- class Z {
592
+ class L {
592
593
  constructor(t, i, s) {
593
594
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
594
595
  }
@@ -596,20 +597,19 @@ class Z {
596
597
  return this._$AM._$AU;
597
598
  }
598
599
  _$AI(t) {
599
- S(this, t);
600
+ N(this, t);
600
601
  }
601
602
  }
602
- const B = i.litHtmlPolyfillSupport;
603
- null == B || B(N, R), (null !== (t = i.litHtmlVersions) && void 0 !== t ? t : i.litHtmlVersions = []).push("2.8.0");
604
- const D = (t, i, s) => {
605
- var e, o;
606
- const n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
607
- let l = n._$litPart$;
608
- if (void 0 === l) {
609
- const t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
610
- n._$litPart$ = l = new R(i.insertBefore(u(), t), t, void 0, null != s ? s : {});
603
+ const Z = t.litHtmlPolyfillSupport;
604
+ Z?.(V, M), (t.litHtmlVersions ??= []).push("3.1.0");
605
+ const j = (t, i, s) => {
606
+ const e = s?.renderBefore ?? i;
607
+ let h = e._$litPart$;
608
+ if (void 0 === h) {
609
+ const t = s?.renderBefore ?? null;
610
+ e._$litPart$ = h = new M(i.insertBefore(l(), t), t, void 0, s ?? {});
611
611
  }
612
- return l._$AI(t), l;
612
+ return h._$AI(t), h;
613
613
  };
614
614
 
615
615
  /**
@@ -617,42 +617,38 @@ const D = (t, i, s) => {
617
617
  * Copyright 2017 Google LLC
618
618
  * SPDX-License-Identifier: BSD-3-Clause
619
619
  */
620
- var l$1, o;
621
- class s extends u$1 {
620
+ class s extends b$1 {
622
621
  constructor() {
623
622
  super(...arguments), this.renderOptions = {
624
623
  host: this
625
624
  }, this._$Do = void 0;
626
625
  }
627
626
  createRenderRoot() {
628
- var t, e;
629
- const i = super.createRenderRoot();
630
- return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;
627
+ const t = super.createRenderRoot();
628
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
631
629
  }
632
630
  update(t) {
633
631
  const i = this.render();
634
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = D(i, this.renderRoot, this.renderOptions);
632
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = j(i, this.renderRoot, this.renderOptions);
635
633
  }
636
634
  connectedCallback() {
637
- var t;
638
- super.connectedCallback(), null === (t = this._$Do) || void 0 === t || t.setConnected(!0);
635
+ super.connectedCallback(), this._$Do?.setConnected(!0);
639
636
  }
640
637
  disconnectedCallback() {
641
- var t;
642
- super.disconnectedCallback(), null === (t = this._$Do) || void 0 === t || t.setConnected(!1);
638
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
643
639
  }
644
640
  render() {
645
- return T;
641
+ return w;
646
642
  }
647
643
  }
648
- s.finalized = !0, s._$litElement$ = !0, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, {
644
+ s._$litElement$ = !0, s[("finalized")] = !0, globalThis.litElementHydrateSupport?.({
649
645
  LitElement: s
650
646
  });
651
- const n = globalThis.litElementPolyfillSupport;
652
- null == n || n({
647
+ const r = globalThis.litElementPolyfillSupport;
648
+ r?.({
653
649
  LitElement: s
654
650
  });
655
- (null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.3.3");
651
+ (globalThis.litElementVersions ??= []).push("4.0.2");
656
652
 
657
653
  var noop = {
658
654
  value: () => {}
@@ -3223,7 +3219,6 @@ class DecidablesElement extends s {
3223
3219
  };
3224
3220
  /* eslint-enable key-spacing, object-curly-newline */
3225
3221
  }
3226
-
3227
3222
  static cssBoxShadow(elevation, rotate = false, inverse = false) {
3228
3223
  const umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
3229
3224
  const penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
@@ -3326,24 +3321,24 @@ class DecidablesElement extends s {
3326
3321
  `;
3327
3322
  }
3328
3323
  static get styles() {
3329
- return i$1`
3324
+ return i$2`
3330
3325
  :host {
3331
- ---shadow-0: var(--shadow-0, ${r$2(this.cssBoxShadow(0))});
3332
- ---shadow-2: var(--shadow-2, ${r$2(this.cssBoxShadow(2))});
3333
- ---shadow-4: var(--shadow-4, ${r$2(this.cssBoxShadow(4))});
3334
- ---shadow-8: var(--shadow-8, ${r$2(this.cssBoxShadow(8))});
3335
-
3336
- ---color-background: var(--color-background, ${r$2(this.greys.white)});
3337
- ---color-border: var(--color-border, ${r$2(this.greys.light75)});
3338
- ---color-text: var(--color-text, ${r$2(this.greys.dark75)});
3339
- ---color-text-inverse: var(--color-text-inverse, ${r$2(this.greys.white)});
3340
- ---color-link: var(--color-link, ${r$2(this.greys.dark25)});
3341
- ---color-element-background: var(--color-element-background, ${r$2(this.greys.light75)});
3342
- ---color-element-disabled: var(--color-element-disabled, ${r$2(this.greys.light50)});
3343
- ---color-element-enabled: var(--color-element-enabled, ${r$2(this.greys.dark25)});
3344
- ---color-element-selected: var(--color-element-selected, ${r$2(this.greys.grey)});
3345
- ---color-element-border: var(--color-element-border, ${r$2(this.greys.dark50)});
3346
- ---color-element-emphasis: var(--color-element-emphasis, ${r$2(this.greys.dark75)});
3326
+ ---shadow-0: var(--shadow-0, ${r$3(this.cssBoxShadow(0))});
3327
+ ---shadow-2: var(--shadow-2, ${r$3(this.cssBoxShadow(2))});
3328
+ ---shadow-4: var(--shadow-4, ${r$3(this.cssBoxShadow(4))});
3329
+ ---shadow-8: var(--shadow-8, ${r$3(this.cssBoxShadow(8))});
3330
+
3331
+ ---color-background: var(--color-background, ${r$3(this.greys.white)});
3332
+ ---color-border: var(--color-border, ${r$3(this.greys.light75)});
3333
+ ---color-text: var(--color-text, ${r$3(this.greys.dark75)});
3334
+ ---color-text-inverse: var(--color-text-inverse, ${r$3(this.greys.white)});
3335
+ ---color-link: var(--color-link, ${r$3(this.greys.dark25)});
3336
+ ---color-element-background: var(--color-element-background, ${r$3(this.greys.light75)});
3337
+ ---color-element-disabled: var(--color-element-disabled, ${r$3(this.greys.light50)});
3338
+ ---color-element-enabled: var(--color-element-enabled, ${r$3(this.greys.dark25)});
3339
+ ---color-element-selected: var(--color-element-selected, ${r$3(this.greys.grey)});
3340
+ ---color-element-border: var(--color-element-border, ${r$3(this.greys.dark50)});
3341
+ ---color-element-emphasis: var(--color-element-emphasis, ${r$3(this.greys.dark75)});
3347
3342
 
3348
3343
  ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
3349
3344
  ---font-family-math: var(--font-family-math, "Source Serif", serif);
@@ -3404,7 +3399,7 @@ class DecidablesButton extends DecidablesElement {
3404
3399
  this.disabled = false;
3405
3400
  }
3406
3401
  static get styles() {
3407
- return [super.styles, i$1`
3402
+ return [super.styles, i$2`
3408
3403
  :host {
3409
3404
  margin: 0.25rem;
3410
3405
  }
@@ -3474,7 +3469,7 @@ customElements.define('decidables-button', DecidablesButton);
3474
3469
  * Copyright 2018 Google LLC
3475
3470
  * SPDX-License-Identifier: BSD-3-Clause
3476
3471
  */
3477
- const l = l => null != l ? l : A;
3472
+ const o = o => o ?? T;
3478
3473
 
3479
3474
  class DecidablesSlider extends DecidablesElement {
3480
3475
  static get properties() {
@@ -3529,11 +3524,11 @@ class DecidablesSlider extends DecidablesElement {
3529
3524
  this.value = event.target.value;
3530
3525
  }
3531
3526
  static get styles() {
3532
- return [super.styles, i$1`
3527
+ return [super.styles, i$2`
3533
3528
  :host {
3534
- ---shadow-2-rotate: var(--shadow-2-rotate, ${r$2(this.cssBoxShadow(2, true, false))});
3535
- ---shadow-4-rotate: var(--shadow-4-rotate, ${r$2(this.cssBoxShadow(4, true, false))});
3536
- ---shadow-8-rotate: var(--shadow-8-rotate, ${r$2(this.cssBoxShadow(8, true, false))});
3529
+ ---shadow-2-rotate: var(--shadow-2-rotate, ${r$3(this.cssBoxShadow(2, true, false))});
3530
+ ---shadow-4-rotate: var(--shadow-4-rotate, ${r$3(this.cssBoxShadow(4, true, false))});
3531
+ ---shadow-8-rotate: var(--shadow-8-rotate, ${r$3(this.cssBoxShadow(8, true, false))});
3537
3532
 
3538
3533
  display: flex;
3539
3534
 
@@ -3787,9 +3782,9 @@ class DecidablesSlider extends DecidablesElement {
3787
3782
  <slot></slot>
3788
3783
  </label>
3789
3784
  <div class="range">
3790
- <input type="range" id="slider" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
3785
+ <input type="range" id="slider" min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
3791
3786
  </div>
3792
- <decidables-spinner min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
3787
+ <decidables-spinner min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
3793
3788
  `;
3794
3789
  }
3795
3790
  }
@@ -3839,7 +3834,7 @@ class DecidablesSpinner extends DecidablesElement {
3839
3834
  this.value = event.target.value;
3840
3835
  }
3841
3836
  static get styles() {
3842
- return [super.styles, i$1`
3837
+ return [super.styles, i$2`
3843
3838
  :host {
3844
3839
  ---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
3845
3840
  ---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
@@ -3939,7 +3934,7 @@ class DecidablesSpinner extends DecidablesElement {
3939
3934
  return x`
3940
3935
  <label>
3941
3936
  <slot></slot>
3942
- <input ?disabled=${this.disabled} type="number" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
3937
+ <input ?disabled=${this.disabled} type="number" min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
3943
3938
  </label>
3944
3939
  `;
3945
3940
  }
@@ -3978,7 +3973,7 @@ class DecidablesSwitch extends DecidablesElement {
3978
3973
  }));
3979
3974
  }
3980
3975
  static get styles() {
3981
- return [super.styles, i$1`
3976
+ return [super.styles, i$2`
3982
3977
  :host {
3983
3978
  display: flex;
3984
3979
 
@@ -4130,7 +4125,7 @@ class DecidablesToggle extends DecidablesElement {
4130
4125
  this.disabled = false;
4131
4126
  }
4132
4127
  static get styles() {
4133
- return [super.styles, i$1`
4128
+ return [super.styles, i$2`
4134
4129
  fieldset {
4135
4130
  display: flex;
4136
4131
 
@@ -4205,7 +4200,7 @@ class DecidablesToggleOption extends DecidablesElement {
4205
4200
  }));
4206
4201
  }
4207
4202
  static get styles() {
4208
- return [super.styles, i$1`
4203
+ return [super.styles, i$2`
4209
4204
  :host {
4210
4205
  display: flex;
4211
4206
  }