@decidables/decidables-elements 0.3.4 → 0.4.0

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,21 +9,21 @@
9
9
  * Copyright 2019 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
11
  */
12
- const t$2 = window,
13
- e$4 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
14
- s$5 = Symbol(),
15
- n$5 = new WeakMap();
16
- let o$5 = class o {
12
+ const t$1 = window,
13
+ e$2 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
14
+ s$3 = Symbol(),
15
+ n$3 = new WeakMap();
16
+ let o$3 = class o {
17
17
  constructor(t, e, n) {
18
- if (this._$cssResult$ = !0, n !== s$5) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
18
+ if (this._$cssResult$ = !0, n !== s$3) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
19
19
  this.cssText = t, this.t = e;
20
20
  }
21
21
  get styleSheet() {
22
22
  let t = this.o;
23
23
  const s = this.t;
24
- if (e$4 && void 0 === t) {
24
+ if (e$2 && void 0 === t) {
25
25
  const e = void 0 !== s && 1 === s.length;
26
- e && (t = n$5.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && n$5.set(s, t));
26
+ e && (t = n$3.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && n$3.set(s, t));
27
27
  }
28
28
  return t;
29
29
  }
@@ -31,18 +31,26 @@
31
31
  return this.cssText;
32
32
  }
33
33
  };
34
- const r$4 = t => new o$5("string" == typeof t ? t : t + "", void 0, s$5),
35
- S$2 = (s, n) => {
36
- e$4 ? s.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(e => {
34
+ const r$2 = t => new o$3("string" == typeof t ? t : t + "", void 0, s$3),
35
+ i$1 = (t, ...e) => {
36
+ const n = 1 === t.length ? t[0] : e.reduce((e, s, n) => e + (t => {
37
+ if (!0 === t._$cssResult$) return t.cssText;
38
+ if ("number" == typeof t) return t;
39
+ 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.");
40
+ })(s) + t[n + 1], t[0]);
41
+ return new o$3(n, t, s$3);
42
+ },
43
+ S$1 = (s, n) => {
44
+ e$2 ? s.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(e => {
37
45
  const n = document.createElement("style"),
38
- o = t$2.litNonce;
46
+ o = t$1.litNonce;
39
47
  void 0 !== o && n.setAttribute("nonce", o), n.textContent = e.cssText, s.appendChild(n);
40
48
  });
41
49
  },
42
- c$1 = e$4 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
50
+ c$1 = e$2 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
43
51
  let e = "";
44
52
  for (const s of t.cssRules) e += s.cssText;
45
- return r$4(e);
53
+ return r$2(e);
46
54
  })(t) : t;
47
55
 
48
56
  /**
@@ -50,16 +58,16 @@
50
58
  * Copyright 2017 Google LLC
51
59
  * SPDX-License-Identifier: BSD-3-Clause
52
60
  */
53
- var s$4;
54
- const e$3 = window,
55
- r$3 = e$3.trustedTypes,
56
- h$2 = r$3 ? r$3.emptyScript : "",
57
- o$4 = e$3.reactiveElementPolyfillSupport,
58
- n$4 = {
61
+ var s$2;
62
+ const e$1 = window,
63
+ r$1 = e$1.trustedTypes,
64
+ h$1 = r$1 ? r$1.emptyScript : "",
65
+ o$2 = e$1.reactiveElementPolyfillSupport,
66
+ n$2 = {
59
67
  toAttribute(t, i) {
60
68
  switch (i) {
61
69
  case Boolean:
62
- t = t ? h$2 : null;
70
+ t = t ? h$1 : null;
63
71
  break;
64
72
  case Object:
65
73
  case Array:
@@ -87,17 +95,18 @@
87
95
  return s;
88
96
  }
89
97
  },
90
- a$2 = (t, i) => i !== t && (i == i || t == t),
91
- l$4 = {
98
+ a$1 = (t, i) => i !== t && (i == i || t == t),
99
+ l$3 = {
92
100
  attribute: !0,
93
101
  type: String,
94
- converter: n$4,
102
+ converter: n$2,
95
103
  reflect: !1,
96
- hasChanged: a$2
97
- };
98
- let d$1 = class d extends HTMLElement {
104
+ hasChanged: a$1
105
+ },
106
+ d$1 = "finalized";
107
+ let u$1 = class u extends HTMLElement {
99
108
  constructor() {
100
- super(), this._$Ei = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
109
+ super(), this._$Ei = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
101
110
  }
102
111
  static addInitializer(t) {
103
112
  var i;
@@ -111,7 +120,7 @@
111
120
  void 0 !== e && (this._$Ev.set(e, s), t.push(e));
112
121
  }), t;
113
122
  }
114
- static createProperty(t, i = l$4) {
123
+ static createProperty(t, i = l$3) {
115
124
  if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
116
125
  const s = "symbol" == typeof t ? Symbol() : "__" + t,
117
126
  e = this.getPropertyDescriptor(t, s, i);
@@ -132,11 +141,11 @@
132
141
  };
133
142
  }
134
143
  static getPropertyOptions(t) {
135
- return this.elementProperties.get(t) || l$4;
144
+ return this.elementProperties.get(t) || l$3;
136
145
  }
137
146
  static finalize() {
138
- if (this.hasOwnProperty("finalized")) return !1;
139
- this.finalized = !0;
147
+ if (this.hasOwnProperty(d$1)) return !1;
148
+ this[d$1] = !0;
140
149
  const t = Object.getPrototypeOf(this);
141
150
  if (t.finalize(), void 0 !== t.h && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = new Map(), this.hasOwnProperty("properties")) {
142
151
  const t = this.properties,
@@ -157,7 +166,7 @@
157
166
  const s = i.attribute;
158
167
  return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
159
168
  }
160
- u() {
169
+ _$Eu() {
161
170
  var t;
162
171
  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));
163
172
  }
@@ -177,7 +186,7 @@
177
186
  createRenderRoot() {
178
187
  var t;
179
188
  const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
180
- return S$2(s, this.constructor.elementStyles), s;
189
+ return S$1(s, this.constructor.elementStyles), s;
181
190
  }
182
191
  connectedCallback() {
183
192
  var t;
@@ -197,11 +206,11 @@
197
206
  attributeChangedCallback(t, i, s) {
198
207
  this._$AK(t, s);
199
208
  }
200
- _$EO(t, i, s = l$4) {
209
+ _$EO(t, i, s = l$3) {
201
210
  var e;
202
211
  const r = this.constructor._$Ep(t, s);
203
212
  if (void 0 !== r && !0 === s.reflect) {
204
- const h = (void 0 !== (null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) ? s.converter : n$4).toAttribute(i, s.type);
213
+ const h = (void 0 !== (null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) ? s.converter : n$2).toAttribute(i, s.type);
205
214
  this._$El = t, null == h ? this.removeAttribute(r) : this.setAttribute(r, h), this._$El = null;
206
215
  }
207
216
  }
@@ -213,13 +222,13 @@
213
222
  const t = e.getPropertyOptions(r),
214
223
  h = "function" == typeof t.converter ? {
215
224
  fromAttribute: t.converter
216
- } : void 0 !== (null === (s = t.converter) || void 0 === s ? void 0 : s.fromAttribute) ? t.converter : n$4;
225
+ } : void 0 !== (null === (s = t.converter) || void 0 === s ? void 0 : s.fromAttribute) ? t.converter : n$2;
217
226
  this._$El = r, this[r] = h.fromAttribute(i, t.type), this._$El = null;
218
227
  }
219
228
  }
220
229
  requestUpdate(t, i, s) {
221
230
  let e = !0;
222
- void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || a$2)(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());
231
+ 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());
223
232
  }
224
233
  async _$Ej() {
225
234
  this.isUpdatePending = !0;
@@ -276,37 +285,37 @@
276
285
  updated(t) {}
277
286
  firstUpdated(t) {}
278
287
  };
279
- d$1.finalized = !0, d$1.elementProperties = new Map(), d$1.elementStyles = [], d$1.shadowRootOptions = {
288
+ u$1[d$1] = !0, u$1.elementProperties = new Map(), u$1.elementStyles = [], u$1.shadowRootOptions = {
280
289
  mode: "open"
281
- }, null == o$4 || o$4({
282
- ReactiveElement: d$1
283
- }), (null !== (s$4 = e$3.reactiveElementVersions) && void 0 !== s$4 ? s$4 : e$3.reactiveElementVersions = []).push("1.6.1");
290
+ }, null == o$2 || o$2({
291
+ ReactiveElement: u$1
292
+ }), (null !== (s$2 = e$1.reactiveElementVersions) && void 0 !== s$2 ? s$2 : e$1.reactiveElementVersions = []).push("1.6.3");
284
293
 
285
294
  /**
286
295
  * @license
287
296
  * Copyright 2017 Google LLC
288
297
  * SPDX-License-Identifier: BSD-3-Clause
289
298
  */
290
- var t$1;
291
- const i$1 = window,
292
- s$3 = i$1.trustedTypes,
293
- e$2 = s$3 ? s$3.createPolicy("lit-html", {
299
+ var t;
300
+ const i = window,
301
+ s$1 = i.trustedTypes,
302
+ e = s$1 ? s$1.createPolicy("lit-html", {
294
303
  createHTML: t => t
295
304
  }) : void 0,
296
- o$3 = "$lit$",
297
- n$3 = `lit$${(Math.random() + "").slice(9)}$`,
298
- l$3 = "?" + n$3,
299
- h$1 = `<${l$3}>`,
300
- r$2 = document,
301
- d = () => r$2.createComment(""),
302
- u = t => null === t || "object" != typeof t && "function" != typeof t,
305
+ o$1 = "$lit$",
306
+ n$1 = `lit$${(Math.random() + "").slice(9)}$`,
307
+ l$2 = "?" + n$1,
308
+ h = `<${l$2}>`,
309
+ r = document,
310
+ u = () => r.createComment(""),
311
+ d = t => null === t || "object" != typeof t && "function" != typeof t,
303
312
  c = Array.isArray,
304
313
  v = t => c(t) || "function" == typeof (null == t ? void 0 : t[Symbol.iterator]),
305
- a$1 = "[ \t\n\f\r]",
314
+ a = "[ \t\n\f\r]",
306
315
  f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
307
316
  _ = /-->/g,
308
317
  m = />/g,
309
- p = RegExp(`>|${a$1}(?:([^\\s"'>=/]+)(${a$1}*=${a$1}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
318
+ p = RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"),
310
319
  g = /'/g,
311
320
  $ = /"/g,
312
321
  y = /^(?:script|style|textarea|title)$/i,
@@ -320,28 +329,30 @@
320
329
  T = Symbol.for("lit-noChange"),
321
330
  A = Symbol.for("lit-nothing"),
322
331
  E = new WeakMap(),
323
- C = r$2.createTreeWalker(r$2, 129, null, !1),
324
- P = (t, i) => {
325
- const s = t.length - 1,
326
- l = [];
327
- let r,
328
- d = 2 === i ? "<svg>" : "",
329
- u = f;
330
- for (let i = 0; i < s; i++) {
331
- const s = t[i];
332
- let e,
333
- c,
334
- v = -1,
335
- a = 0;
336
- 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]) && (r = RegExp("</" + c[2], "g")), u = p) : void 0 !== c[3] && (u = p) : u === p ? ">" === c[0] ? (u = null != r ? r : f, v = -1) : void 0 === c[1] ? v = -2 : (v = u.lastIndex - c[2].length, e = c[1], u = void 0 === c[3] ? p : '"' === c[3] ? $ : g) : u === $ || u === g ? u = p : u === _ || u === m ? u = f : (u = p, r = void 0);
337
- const w = u === p && t[i + 1].startsWith("/>") ? " " : "";
338
- d += u === f ? s + h$1 : v >= 0 ? (l.push(e), s.slice(0, v) + o$3 + s.slice(v) + n$3 + w) : s + n$3 + (-2 === v ? (l.push(void 0), i) : w);
339
- }
340
- const c = d + (t[s] || "<?>") + (2 === i ? "</svg>" : "");
341
- if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
342
- return [void 0 !== e$2 ? e$2.createHTML(c) : c, l];
343
- };
344
- class V {
332
+ C = r.createTreeWalker(r, 129, null, !1);
333
+ function P(t, i) {
334
+ if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
335
+ return void 0 !== e ? e.createHTML(i) : i;
336
+ }
337
+ const V = (t, i) => {
338
+ const s = t.length - 1,
339
+ e = [];
340
+ let l,
341
+ r = 2 === i ? "<svg>" : "",
342
+ u = f;
343
+ for (let i = 0; i < s; i++) {
344
+ const s = t[i];
345
+ let d,
346
+ c,
347
+ v = -1,
348
+ a = 0;
349
+ 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);
350
+ const w = u === p && t[i + 1].startsWith("/>") ? " " : "";
351
+ 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);
352
+ }
353
+ return [P(t, r + (t[s] || "<?>") + (2 === i ? "</svg>" : "")), e];
354
+ };
355
+ class N {
345
356
  constructor({
346
357
  strings: t,
347
358
  _$litType$: i
@@ -349,11 +360,11 @@
349
360
  let h;
350
361
  this.parts = [];
351
362
  let r = 0,
352
- u = 0;
363
+ d = 0;
353
364
  const c = t.length - 1,
354
365
  v = this.parts,
355
- [a, f] = P(t, i);
356
- if (this.el = V.createElement(a, e), C.currentNode = this.el.content, 2 === i) {
366
+ [a, f] = V(t, i);
367
+ if (this.el = N.createElement(a, e), C.currentNode = this.el.content, 2 === i) {
357
368
  const t = this.el.content,
358
369
  i = t.firstChild;
359
370
  i.remove(), t.append(...i.childNodes);
@@ -362,17 +373,17 @@
362
373
  if (1 === h.nodeType) {
363
374
  if (h.hasAttributes()) {
364
375
  const t = [];
365
- for (const i of h.getAttributeNames()) if (i.endsWith(o$3) || i.startsWith(n$3)) {
366
- const s = f[u++];
376
+ for (const i of h.getAttributeNames()) if (i.endsWith(o$1) || i.startsWith(n$1)) {
377
+ const s = f[d++];
367
378
  if (t.push(i), void 0 !== s) {
368
- const t = h.getAttribute(s.toLowerCase() + o$3).split(n$3),
379
+ const t = h.getAttribute(s.toLowerCase() + o$1).split(n$1),
369
380
  i = /([.?@])?(.*)/.exec(s);
370
381
  v.push({
371
382
  type: 1,
372
383
  index: r,
373
384
  name: i[2],
374
385
  strings: t,
375
- ctor: "." === i[1] ? k : "?" === i[1] ? I : "@" === i[1] ? L : R
386
+ ctor: "." === i[1] ? H : "?" === i[1] ? L : "@" === i[1] ? z : k
376
387
  });
377
388
  } else v.push({
378
389
  type: 6,
@@ -382,45 +393,45 @@
382
393
  for (const i of t) h.removeAttribute(i);
383
394
  }
384
395
  if (y.test(h.tagName)) {
385
- const t = h.textContent.split(n$3),
396
+ const t = h.textContent.split(n$1),
386
397
  i = t.length - 1;
387
398
  if (i > 0) {
388
- h.textContent = s$3 ? s$3.emptyScript : "";
389
- for (let s = 0; s < i; s++) h.append(t[s], d()), C.nextNode(), v.push({
399
+ h.textContent = s$1 ? s$1.emptyScript : "";
400
+ for (let s = 0; s < i; s++) h.append(t[s], u()), C.nextNode(), v.push({
390
401
  type: 2,
391
402
  index: ++r
392
403
  });
393
- h.append(t[i], d());
404
+ h.append(t[i], u());
394
405
  }
395
406
  }
396
- } else if (8 === h.nodeType) if (h.data === l$3) v.push({
407
+ } else if (8 === h.nodeType) if (h.data === l$2) v.push({
397
408
  type: 2,
398
409
  index: r
399
410
  });else {
400
411
  let t = -1;
401
- for (; -1 !== (t = h.data.indexOf(n$3, t + 1));) v.push({
412
+ for (; -1 !== (t = h.data.indexOf(n$1, t + 1));) v.push({
402
413
  type: 7,
403
414
  index: r
404
- }), t += n$3.length - 1;
415
+ }), t += n$1.length - 1;
405
416
  }
406
417
  r++;
407
418
  }
408
419
  }
409
420
  static createElement(t, i) {
410
- const s = r$2.createElement("template");
421
+ const s = r.createElement("template");
411
422
  return s.innerHTML = t, s;
412
423
  }
413
424
  }
414
- function N(t, i, s = t, e) {
425
+ function S(t, i, s = t, e) {
415
426
  var o, n, l, h;
416
427
  if (i === T) return i;
417
428
  let r = void 0 !== e ? null === (o = s._$Co) || void 0 === o ? void 0 : o[e] : s._$Cl;
418
- const d = u(i) ? void 0 : i._$litDirective$;
419
- return (null == r ? void 0 : r.constructor) !== d && (null === (n = null == r ? void 0 : r._$AO) || void 0 === n || n.call(r, !1), void 0 === d ? r = void 0 : (r = new d(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 = N(t, r._$AS(t, i.values), r, e)), i;
429
+ const u = d(i) ? void 0 : i._$litDirective$;
430
+ 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;
420
431
  }
421
- let S$1 = class S {
432
+ class M {
422
433
  constructor(t, i) {
423
- this.u = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
434
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
424
435
  }
425
436
  get parentNode() {
426
437
  return this._$AM.parentNode;
@@ -428,7 +439,7 @@
428
439
  get _$AU() {
429
440
  return this._$AM._$AU;
430
441
  }
431
- v(t) {
442
+ u(t) {
432
443
  var i;
433
444
  const {
434
445
  el: {
@@ -436,34 +447,34 @@
436
447
  },
437
448
  parts: e
438
449
  } = this._$AD,
439
- o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : r$2).importNode(s, !0);
450
+ o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : r).importNode(s, !0);
440
451
  C.currentNode = o;
441
452
  let n = C.nextNode(),
442
453
  l = 0,
443
454
  h = 0,
444
- d = e[0];
445
- for (; void 0 !== d;) {
446
- if (l === d.index) {
455
+ u = e[0];
456
+ for (; void 0 !== u;) {
457
+ if (l === u.index) {
447
458
  let i;
448
- 2 === d.type ? i = new M(n, n.nextSibling, this, t) : 1 === d.type ? i = new d.ctor(n, d.name, d.strings, this, t) : 6 === d.type && (i = new z(n, this, t)), this.u.push(i), d = e[++h];
459
+ 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];
449
460
  }
450
- l !== (null == d ? void 0 : d.index) && (n = C.nextNode(), l++);
461
+ l !== (null == u ? void 0 : u.index) && (n = C.nextNode(), l++);
451
462
  }
452
- return o;
463
+ return C.currentNode = r, o;
453
464
  }
454
- p(t) {
465
+ v(t) {
455
466
  let i = 0;
456
- for (const s of this.u) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
467
+ 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++;
457
468
  }
458
- };
459
- class M {
469
+ }
470
+ class R {
460
471
  constructor(t, i, s, e) {
461
472
  var o;
462
- this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cm = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
473
+ 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;
463
474
  }
464
475
  get _$AU() {
465
476
  var t, i;
466
- return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cm;
477
+ return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cp;
467
478
  }
468
479
  get parentNode() {
469
480
  let t = this._$AA.parentNode;
@@ -477,40 +488,40 @@
477
488
  return this._$AB;
478
489
  }
479
490
  _$AI(t, i = this) {
480
- t = N(this, t, i), u(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== T && this.g(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : v(t) ? this.k(t) : this.g(t);
491
+ 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);
481
492
  }
482
- S(t) {
493
+ k(t) {
483
494
  return this._$AA.parentNode.insertBefore(t, this._$AB);
484
495
  }
485
- T(t) {
486
- this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
496
+ $(t) {
497
+ this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
487
498
  }
488
- g(t) {
489
- this._$AH !== A && u(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$2.createTextNode(t)), this._$AH = t;
499
+ _(t) {
500
+ this._$AH !== A && d(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r.createTextNode(t)), this._$AH = t;
490
501
  }
491
- $(t) {
502
+ g(t) {
492
503
  var i;
493
504
  const {
494
505
  values: s,
495
506
  _$litType$: e
496
507
  } = t,
497
- o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = V.createElement(e.h, this.options)), e);
498
- if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.p(s);else {
499
- const t = new S$1(o, this),
500
- i = t.v(this.options);
501
- t.p(s), this.T(i), this._$AH = t;
508
+ o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = N.createElement(P(e.h, e.h[0]), this.options)), e);
509
+ if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.v(s);else {
510
+ const t = new M(o, this),
511
+ i = t.u(this.options);
512
+ t.v(s), this.$(i), this._$AH = t;
502
513
  }
503
514
  }
504
515
  _$AC(t) {
505
516
  let i = E.get(t.strings);
506
- return void 0 === i && E.set(t.strings, i = new V(t)), i;
517
+ return void 0 === i && E.set(t.strings, i = new N(t)), i;
507
518
  }
508
- k(t) {
519
+ T(t) {
509
520
  c(this._$AH) || (this._$AH = [], this._$AR());
510
521
  const i = this._$AH;
511
522
  let s,
512
523
  e = 0;
513
- for (const o of t) e === i.length ? i.push(s = new M(this.S(d()), this.S(d()), this, this.options)) : s = i[e], s._$AI(o), e++;
524
+ 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++;
514
525
  e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
515
526
  }
516
527
  _$AR(t = this._$AA.nextSibling, i) {
@@ -522,10 +533,10 @@
522
533
  }
523
534
  setConnected(t) {
524
535
  var i;
525
- void 0 === this._$AM && (this._$Cm = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
536
+ void 0 === this._$AM && (this._$Cp = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
526
537
  }
527
538
  }
528
- class R {
539
+ class k {
529
540
  constructor(t, i, s, e, o) {
530
541
  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;
531
542
  }
@@ -538,10 +549,10 @@
538
549
  _$AI(t, i = this, s, e) {
539
550
  const o = this.strings;
540
551
  let n = !1;
541
- if (void 0 === o) t = N(this, t, i, 0), n = !u(t) || t !== this._$AH && t !== T, n && (this._$AH = t);else {
552
+ if (void 0 === o) t = S(this, t, i, 0), n = !d(t) || t !== this._$AH && t !== T, n && (this._$AH = t);else {
542
553
  const e = t;
543
554
  let l, h;
544
- for (t = o[0], l = 0; l < o.length - 1; l++) h = N(this, e[s + l], i, l), h === T && (h = this._$AH[l]), n || (n = !u(h) || h !== this._$AH[l]), h === A ? t = A : t !== A && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
555
+ 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;
545
556
  }
546
557
  n && !e && this.j(t);
547
558
  }
@@ -549,7 +560,7 @@
549
560
  t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
550
561
  }
551
562
  }
552
- class k extends R {
563
+ class H extends k {
553
564
  constructor() {
554
565
  super(...arguments), this.type = 3;
555
566
  }
@@ -557,22 +568,22 @@
557
568
  this.element[this.name] = t === A ? void 0 : t;
558
569
  }
559
570
  }
560
- const H = s$3 ? s$3.emptyScript : "";
561
- class I extends R {
571
+ const I = s$1 ? s$1.emptyScript : "";
572
+ class L extends k {
562
573
  constructor() {
563
574
  super(...arguments), this.type = 4;
564
575
  }
565
576
  j(t) {
566
- t && t !== A ? this.element.setAttribute(this.name, H) : this.element.removeAttribute(this.name);
577
+ t && t !== A ? this.element.setAttribute(this.name, I) : this.element.removeAttribute(this.name);
567
578
  }
568
579
  }
569
- class L extends R {
580
+ class z extends k {
570
581
  constructor(t, i, s, e, o) {
571
582
  super(t, i, s, e, o), this.type = 5;
572
583
  }
573
584
  _$AI(t, i = this) {
574
585
  var s;
575
- if ((t = null !== (s = N(this, t, i, 0)) && void 0 !== s ? s : A) === T) return;
586
+ if ((t = null !== (s = S(this, t, i, 0)) && void 0 !== s ? s : A) === T) return;
576
587
  const e = this._$AH,
577
588
  o = t === A && e !== A || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
578
589
  n = t !== A && (e === A || o);
@@ -583,7 +594,7 @@
583
594
  "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);
584
595
  }
585
596
  }
586
- class z {
597
+ class Z {
587
598
  constructor(t, i, s) {
588
599
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
589
600
  }
@@ -591,307 +602,29 @@
591
602
  return this._$AM._$AU;
592
603
  }
593
604
  _$AI(t) {
594
- N(this, t);
605
+ S(this, t);
595
606
  }
596
607
  }
597
- const j = i$1.litHtmlPolyfillSupport;
598
- null == j || j(V, M), (null !== (t$1 = i$1.litHtmlVersions) && void 0 !== t$1 ? t$1 : i$1.litHtmlVersions = []).push("2.7.0");
599
- const B = (t, i, s) => {
608
+ const B = i.litHtmlPolyfillSupport;
609
+ null == B || B(N, R), (null !== (t = i.litHtmlVersions) && void 0 !== t ? t : i.litHtmlVersions = []).push("2.8.0");
610
+ const D = (t, i, s) => {
600
611
  var e, o;
601
612
  const n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
602
613
  let l = n._$litPart$;
603
614
  if (void 0 === l) {
604
615
  const t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
605
- n._$litPart$ = l = new M(i.insertBefore(d(), t), t, void 0, null != s ? s : {});
616
+ n._$litPart$ = l = new R(i.insertBefore(u(), t), t, void 0, null != s ? s : {});
606
617
  }
607
618
  return l._$AI(t), l;
608
619
  };
609
620
 
610
- /**
611
- * @license
612
- * Copyright 2019 Google LLC
613
- * SPDX-License-Identifier: BSD-3-Clause
614
- */
615
- const t = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
616
- e$1 = Symbol(),
617
- n$2 = new Map();
618
- let s$2 = class s {
619
- constructor(t, n) {
620
- if (this._$cssResult$ = !0, n !== e$1) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
621
- this.cssText = t;
622
- }
623
- get styleSheet() {
624
- let e = n$2.get(this.cssText);
625
- return t && void 0 === e && (n$2.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;
626
- }
627
- toString() {
628
- return this.cssText;
629
- }
630
- };
631
- const o$2 = t => new s$2("string" == typeof t ? t : t + "", e$1),
632
- r$1 = (t, ...n) => {
633
- const o = 1 === t.length ? t[0] : n.reduce((e, n, s) => e + (t => {
634
- if (!0 === t._$cssResult$) return t.cssText;
635
- if ("number" == typeof t) return t;
636
- 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.");
637
- })(n) + t[s + 1], t[0]);
638
- return new s$2(o, e$1);
639
- },
640
- i = (e, n) => {
641
- t ? e.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(t => {
642
- const n = document.createElement("style"),
643
- s = window.litNonce;
644
- void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
645
- });
646
- },
647
- S = t ? t => t : t => t instanceof CSSStyleSheet ? (t => {
648
- let e = "";
649
- for (const n of t.cssRules) e += n.cssText;
650
- return o$2(e);
651
- })(t) : t;
652
-
653
- /**
654
- * @license
655
- * Copyright 2017 Google LLC
656
- * SPDX-License-Identifier: BSD-3-Clause
657
- */
658
- var s$1;
659
- const e = window.trustedTypes,
660
- r = e ? e.emptyScript : "",
661
- h = window.reactiveElementPolyfillSupport,
662
- o$1 = {
663
- toAttribute(t, i) {
664
- switch (i) {
665
- case Boolean:
666
- t = t ? r : null;
667
- break;
668
- case Object:
669
- case Array:
670
- t = null == t ? t : JSON.stringify(t);
671
- }
672
- return t;
673
- },
674
- fromAttribute(t, i) {
675
- let s = t;
676
- switch (i) {
677
- case Boolean:
678
- s = null !== t;
679
- break;
680
- case Number:
681
- s = null === t ? null : Number(t);
682
- break;
683
- case Object:
684
- case Array:
685
- try {
686
- s = JSON.parse(t);
687
- } catch (t) {
688
- s = null;
689
- }
690
- }
691
- return s;
692
- }
693
- },
694
- n$1 = (t, i) => i !== t && (i == i || t == t),
695
- l$2 = {
696
- attribute: !0,
697
- type: String,
698
- converter: o$1,
699
- reflect: !1,
700
- hasChanged: n$1
701
- };
702
- class a extends HTMLElement {
703
- constructor() {
704
- super(), this._$Et = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$Ei = null, this.o();
705
- }
706
- static addInitializer(t) {
707
- var i;
708
- null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);
709
- }
710
- static get observedAttributes() {
711
- this.finalize();
712
- const t = [];
713
- return this.elementProperties.forEach((i, s) => {
714
- const e = this._$Eh(s, i);
715
- void 0 !== e && (this._$Eu.set(e, s), t.push(e));
716
- }), t;
717
- }
718
- static createProperty(t, i = l$2) {
719
- if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
720
- const s = "symbol" == typeof t ? Symbol() : "__" + t,
721
- e = this.getPropertyDescriptor(t, s, i);
722
- void 0 !== e && Object.defineProperty(this.prototype, t, e);
723
- }
724
- }
725
- static getPropertyDescriptor(t, i, s) {
726
- return {
727
- get() {
728
- return this[i];
729
- },
730
- set(e) {
731
- const r = this[t];
732
- this[i] = e, this.requestUpdate(t, r, s);
733
- },
734
- configurable: !0,
735
- enumerable: !0
736
- };
737
- }
738
- static getPropertyOptions(t) {
739
- return this.elementProperties.get(t) || l$2;
740
- }
741
- static finalize() {
742
- if (this.hasOwnProperty("finalized")) return !1;
743
- this.finalized = !0;
744
- const t = Object.getPrototypeOf(this);
745
- if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
746
- const t = this.properties,
747
- i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
748
- for (const s of i) this.createProperty(s, t[s]);
749
- }
750
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
751
- }
752
- static finalizeStyles(i) {
753
- const s = [];
754
- if (Array.isArray(i)) {
755
- const e = new Set(i.flat(1 / 0).reverse());
756
- for (const i of e) s.unshift(S(i));
757
- } else void 0 !== i && s.push(S(i));
758
- return s;
759
- }
760
- static _$Eh(t, i) {
761
- const s = i.attribute;
762
- return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
763
- }
764
- o() {
765
- var t;
766
- this._$Ep = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$Em(), this.requestUpdate(), null === (t = this.constructor.l) || void 0 === t || t.forEach(t => t(this));
767
- }
768
- addController(t) {
769
- var i, s;
770
- (null !== (i = this._$Eg) && void 0 !== i ? i : this._$Eg = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
771
- }
772
- removeController(t) {
773
- var i;
774
- null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);
775
- }
776
- _$Em() {
777
- this.constructor.elementProperties.forEach((t, i) => {
778
- this.hasOwnProperty(i) && (this._$Et.set(i, this[i]), delete this[i]);
779
- });
780
- }
781
- createRenderRoot() {
782
- var t;
783
- const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
784
- return i(s, this.constructor.elementStyles), s;
785
- }
786
- connectedCallback() {
787
- var t;
788
- void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
789
- var i;
790
- return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
791
- });
792
- }
793
- enableUpdating(t) {}
794
- disconnectedCallback() {
795
- var t;
796
- null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
797
- var i;
798
- return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
799
- });
800
- }
801
- attributeChangedCallback(t, i, s) {
802
- this._$AK(t, s);
803
- }
804
- _$ES(t, i, s = l$2) {
805
- var e, r;
806
- const h = this.constructor._$Eh(t, s);
807
- if (void 0 !== h && !0 === s.reflect) {
808
- const n = (null !== (r = null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) && void 0 !== r ? r : o$1.toAttribute)(i, s.type);
809
- this._$Ei = t, null == n ? this.removeAttribute(h) : this.setAttribute(h, n), this._$Ei = null;
810
- }
811
- }
812
- _$AK(t, i) {
813
- var s, e, r;
814
- const h = this.constructor,
815
- n = h._$Eu.get(t);
816
- if (void 0 !== n && this._$Ei !== n) {
817
- const t = h.getPropertyOptions(n),
818
- l = t.converter,
819
- a = null !== (r = null !== (e = null === (s = l) || void 0 === s ? void 0 : s.fromAttribute) && void 0 !== e ? e : "function" == typeof l ? l : null) && void 0 !== r ? r : o$1.fromAttribute;
820
- this._$Ei = n, this[n] = a(i, t.type), this._$Ei = null;
821
- }
822
- }
823
- requestUpdate(t, i, s) {
824
- let e = !0;
825
- void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$1)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$Ei !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$Ep = this._$E_());
826
- }
827
- async _$E_() {
828
- this.isUpdatePending = !0;
829
- try {
830
- await this._$Ep;
831
- } catch (t) {
832
- Promise.reject(t);
833
- }
834
- const t = this.scheduleUpdate();
835
- return null != t && (await t), !this.isUpdatePending;
836
- }
837
- scheduleUpdate() {
838
- return this.performUpdate();
839
- }
840
- performUpdate() {
841
- var t;
842
- if (!this.isUpdatePending) return;
843
- this.hasUpdated, this._$Et && (this._$Et.forEach((t, i) => this[i] = t), this._$Et = void 0);
844
- let i = !1;
845
- const s = this._$AL;
846
- try {
847
- i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
848
- var i;
849
- return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
850
- }), this.update(s)) : this._$EU();
851
- } catch (t) {
852
- throw i = !1, this._$EU(), t;
853
- }
854
- i && this._$AE(s);
855
- }
856
- willUpdate(t) {}
857
- _$AE(t) {
858
- var i;
859
- null === (i = this._$Eg) || void 0 === i || i.forEach(t => {
860
- var i;
861
- return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
862
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
863
- }
864
- _$EU() {
865
- this._$AL = new Map(), this.isUpdatePending = !1;
866
- }
867
- get updateComplete() {
868
- return this.getUpdateComplete();
869
- }
870
- getUpdateComplete() {
871
- return this._$Ep;
872
- }
873
- shouldUpdate(t) {
874
- return !0;
875
- }
876
- update(t) {
877
- void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$ES(i, this[i], t)), this._$EC = void 0), this._$EU();
878
- }
879
- updated(t) {}
880
- firstUpdated(t) {}
881
- }
882
- a.finalized = !0, a.elementProperties = new Map(), a.elementStyles = [], a.shadowRootOptions = {
883
- mode: "open"
884
- }, null == h || h({
885
- ReactiveElement: a
886
- }), (null !== (s$1 = globalThis.reactiveElementVersions) && void 0 !== s$1 ? s$1 : globalThis.reactiveElementVersions = []).push("1.3.1");
887
-
888
621
  /**
889
622
  * @license
890
623
  * Copyright 2017 Google LLC
891
624
  * SPDX-License-Identifier: BSD-3-Clause
892
625
  */
893
626
  var l$1, o;
894
- class s extends a {
627
+ class s extends u$1 {
895
628
  constructor() {
896
629
  super(...arguments), this.renderOptions = {
897
630
  host: this
@@ -904,7 +637,7 @@
904
637
  }
905
638
  update(t) {
906
639
  const i = this.render();
907
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = B(i, this.renderRoot, this.renderOptions);
640
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = D(i, this.renderRoot, this.renderOptions);
908
641
  }
909
642
  connectedCallback() {
910
643
  var t;
@@ -925,7 +658,7 @@
925
658
  null == n || n({
926
659
  LitElement: s
927
660
  });
928
- (null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.3.0");
661
+ (null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.3.3");
929
662
 
930
663
  var noop = {
931
664
  value: () => {}
@@ -1842,15 +1575,15 @@
1842
1575
  var darker = 0.7;
1843
1576
  var brighter = 1 / darker;
1844
1577
  var reI = "\\s*([+-]?\\d+)\\s*",
1845
- reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
1846
- reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
1578
+ reN = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",
1579
+ reP = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
1847
1580
  reHex = /^#([0-9a-f]{3,8})$/,
1848
- reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
1849
- reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
1850
- reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
1851
- reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
1852
- reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
1853
- reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
1581
+ reRgbInteger = new RegExp(`^rgb\\(${reI},${reI},${reI}\\)$`),
1582
+ reRgbPercent = new RegExp(`^rgb\\(${reP},${reP},${reP}\\)$`),
1583
+ reRgbaInteger = new RegExp(`^rgba\\(${reI},${reI},${reI},${reN}\\)$`),
1584
+ reRgbaPercent = new RegExp(`^rgba\\(${reP},${reP},${reP},${reN}\\)$`),
1585
+ reHslPercent = new RegExp(`^hsl\\(${reN},${reP},${reP}\\)$`),
1586
+ reHslaPercent = new RegExp(`^hsla\\(${reN},${reP},${reP},${reN}\\)$`);
1854
1587
  var named = {
1855
1588
  aliceblue: 0xf0f8ff,
1856
1589
  antiquewhite: 0xfaebd7,
@@ -2002,15 +1735,16 @@
2002
1735
  yellowgreen: 0x9acd32
2003
1736
  };
2004
1737
  define(Color, color, {
2005
- copy: function (channels) {
1738
+ copy(channels) {
2006
1739
  return Object.assign(new this.constructor(), this, channels);
2007
1740
  },
2008
- displayable: function () {
1741
+ displayable() {
2009
1742
  return this.rgb().displayable();
2010
1743
  },
2011
1744
  hex: color_formatHex,
2012
1745
  // Deprecated! Use color.formatHex.
2013
1746
  formatHex: color_formatHex,
1747
+ formatHex8: color_formatHex8,
2014
1748
  formatHsl: color_formatHsl,
2015
1749
  formatRgb: color_formatRgb,
2016
1750
  toString: color_formatRgb
@@ -2018,6 +1752,9 @@
2018
1752
  function color_formatHex() {
2019
1753
  return this.rgb().formatHex();
2020
1754
  }
1755
+ function color_formatHex8() {
1756
+ return this.rgb().formatHex8();
1757
+ }
2021
1758
  function color_formatHsl() {
2022
1759
  return hslConvert(this).formatHsl();
2023
1760
  }
@@ -2064,36 +1801,48 @@
2064
1801
  this.opacity = +opacity;
2065
1802
  }
2066
1803
  define(Rgb, rgb, extend(Color, {
2067
- brighter: function (k) {
1804
+ brighter(k) {
2068
1805
  k = k == null ? brighter : Math.pow(brighter, k);
2069
1806
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2070
1807
  },
2071
- darker: function (k) {
1808
+ darker(k) {
2072
1809
  k = k == null ? darker : Math.pow(darker, k);
2073
1810
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2074
1811
  },
2075
- rgb: function () {
1812
+ rgb() {
2076
1813
  return this;
2077
1814
  },
2078
- displayable: function () {
1815
+ clamp() {
1816
+ return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));
1817
+ },
1818
+ displayable() {
2079
1819
  return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
2080
1820
  },
2081
1821
  hex: rgb_formatHex,
2082
1822
  // Deprecated! Use color.formatHex.
2083
1823
  formatHex: rgb_formatHex,
1824
+ formatHex8: rgb_formatHex8,
2084
1825
  formatRgb: rgb_formatRgb,
2085
1826
  toString: rgb_formatRgb
2086
1827
  }));
2087
1828
  function rgb_formatHex() {
2088
- return "#" + hex(this.r) + hex(this.g) + hex(this.b);
1829
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;
1830
+ }
1831
+ function rgb_formatHex8() {
1832
+ return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
2089
1833
  }
2090
1834
  function rgb_formatRgb() {
2091
- var a = this.opacity;
2092
- a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
2093
- return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")");
1835
+ const a = clampa(this.opacity);
1836
+ return `${a === 1 ? "rgb(" : "rgba("}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? ")" : `, ${a})`}`;
1837
+ }
1838
+ function clampa(opacity) {
1839
+ return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));
1840
+ }
1841
+ function clampi(value) {
1842
+ return Math.max(0, Math.min(255, Math.round(value) || 0));
2094
1843
  }
2095
1844
  function hex(value) {
2096
- value = Math.max(0, Math.min(255, Math.round(value) || 0));
1845
+ value = clampi(value);
2097
1846
  return (value < 16 ? "0" : "") + value.toString(16);
2098
1847
  }
2099
1848
  function hsla(h, s, l, a) {
@@ -2133,15 +1882,15 @@
2133
1882
  this.opacity = +opacity;
2134
1883
  }
2135
1884
  define(Hsl, hsl, extend(Color, {
2136
- brighter: function (k) {
1885
+ brighter(k) {
2137
1886
  k = k == null ? brighter : Math.pow(brighter, k);
2138
1887
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
2139
1888
  },
2140
- darker: function (k) {
1889
+ darker(k) {
2141
1890
  k = k == null ? darker : Math.pow(darker, k);
2142
1891
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
2143
1892
  },
2144
- rgb: function () {
1893
+ rgb() {
2145
1894
  var h = this.h % 360 + (this.h < 0) * 360,
2146
1895
  s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
2147
1896
  l = this.l,
@@ -2149,15 +1898,24 @@
2149
1898
  m1 = 2 * l - m2;
2150
1899
  return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity);
2151
1900
  },
2152
- displayable: function () {
1901
+ clamp() {
1902
+ return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));
1903
+ },
1904
+ displayable() {
2153
1905
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
2154
1906
  },
2155
- formatHsl: function () {
2156
- var a = this.opacity;
2157
- a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
2158
- return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
1907
+ formatHsl() {
1908
+ const a = clampa(this.opacity);
1909
+ return `${a === 1 ? "hsl(" : "hsla("}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? ")" : `, ${a})`}`;
2159
1910
  }
2160
1911
  }));
1912
+ function clamph(value) {
1913
+ value = (value || 0) % 360;
1914
+ return value < 0 ? value + 360 : value;
1915
+ }
1916
+ function clampt(value) {
1917
+ return Math.max(0, Math.min(1, value || 0));
1918
+ }
2161
1919
 
2162
1920
  /* From FvD 13.37, CSS Color Module Level 3 */
2163
1921
  function hsl2rgb(h, m1, m2) {
@@ -3487,6 +3245,48 @@
3487
3245
  const ambientS = rotate ? `${-ambientM.y}px ${ambientM.y / 2}px ${ambientM.b}px ${ambientM.s}px` : `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
3488
3246
  return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
3489
3247
  }
3248
+ static get svgDefs() {
3249
+ const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
3250
+
3251
+ const filters = shadows.elevations.map(z => {
3252
+ return `
3253
+ <filter id=${`shadow-${z}`} filterUnits="userSpaceOnUse" x="-100%" y="-100%" width="200%" height="200%">
3254
+ <feComponentTransfer in="SourceAlpha" result="solid">
3255
+ <feFuncA type="table" tableValues="0 1 1"/>
3256
+ </feComponentTransfer>
3257
+ <feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
3258
+ <feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
3259
+ <feOffset in="solid" result="offA" dx=${shadows.mapAmbient[z].y / 2} dy=${shadows.mapAmbient[z].y} />
3260
+ ${shadows.mapUmbra[z].s === 0 ? '' : `<feMorphology in="offU" result="spreadU" operator=${shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapUmbra[z].s)} />`}
3261
+ ${shadows.mapPenumbra[z].s === 0 ? '' : `<feMorphology in="offP" result="spreadP" operator=${shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapPenumbra[z].s)} />`}
3262
+ ${shadows.mapAmbient[z].s === 0 ? '' : `<feMorphology in="offA" result="spreadA" operator=${shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapAmbient[z].s)} />`}
3263
+ <feGaussianBlur in=${shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU'} result="blurU" stdDeviation=${shadows.mapUmbra[z].b / 2} />
3264
+ <feGaussianBlur in=${shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP'} result="blurP" stdDeviation=${shadows.mapPenumbra[z].b / 2} />
3265
+ <feGaussianBlur in=${shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA'} result="blurA" stdDeviation=${shadows.mapAmbient[z].b / 2} />
3266
+ <feFlood in="SourceGraphic" result="opU" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityUmbra + shadows.opacityBoost} />
3267
+ <feFlood in="SourceGraphic" result="opP" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityPenumbra + shadows.opacityBoost} />
3268
+ <feFlood in="SourceGraphic" result="opA" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityAmbient + shadows.opacityBoost} />
3269
+ <feComposite in="opU" in2="blurU" result="shU" operator="in" />
3270
+ <feComposite in="opP" in2="blurP" result="shP" operator="in" />
3271
+ <feComposite in="opA" in2="blurA" result="shA" operator="in" />
3272
+ <feMorphology in="solid" result="smaller" operator="erode" radius="1" />
3273
+ <feComposite in="shU" in2="smaller" result="finalU" operator="out" />
3274
+ <feComposite in="shP" in2="smaller" result="finalP" operator="out" />
3275
+ <feComposite in="shA" in2="smaller" result="finalA" operator="out" />
3276
+ <feMerge>
3277
+ <feMergeNode in="finalU" />
3278
+ <feMergeNode in="finalP" />
3279
+ <feMergeNode in="finalA" />
3280
+ <feMergeNode in="SourceGraphic" />
3281
+ </feMerge>
3282
+ </filter>`;
3283
+ });
3284
+ return `
3285
+ <defs>
3286
+ ${filters}
3287
+ </defs>
3288
+ `;
3289
+ }
3490
3290
  static get svgFilters() {
3491
3291
  const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
3492
3292
 
@@ -3494,7 +3294,7 @@
3494
3294
  return b`
3495
3295
  <filter id=${`shadow-${z}`} x="-250%" y="-250%" width="600%" height="600%">
3496
3296
  <feComponentTransfer in="SourceAlpha" result="solid">
3497
- <feFuncA type="table" tableValues="0 1 1"/>
3297
+ <feFuncA type="table" tableValues="0 1 1"/>
3498
3298
  </feComponentTransfer>
3499
3299
  <feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
3500
3300
  <feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
@@ -3532,24 +3332,24 @@
3532
3332
  `;
3533
3333
  }
3534
3334
  static get styles() {
3535
- return r$1`
3335
+ return i$1`
3536
3336
  :host {
3537
- ---shadow-0: var(--shadow-0, ${o$2(this.cssBoxShadow(0))});
3538
- ---shadow-2: var(--shadow-2, ${o$2(this.cssBoxShadow(2))});
3539
- ---shadow-4: var(--shadow-4, ${o$2(this.cssBoxShadow(4))});
3540
- ---shadow-8: var(--shadow-8, ${o$2(this.cssBoxShadow(8))});
3541
-
3542
- ---color-background: var(--color-background, ${o$2(this.greys.white)});
3543
- ---color-border: var(--color-border, ${o$2(this.greys.light75)});
3544
- ---color-text: var(--color-text, ${o$2(this.greys.dark75)});
3545
- ---color-text-inverse: var(--color-text-inverse, ${o$2(this.greys.white)});
3546
- ---color-link: var(--color-link, ${o$2(this.greys.dark25)});
3547
- ---color-element-background: var(--color-element-background, ${o$2(this.greys.light75)});
3548
- ---color-element-disabled: var(--color-element-disabled, ${o$2(this.greys.light50)});
3549
- ---color-element-enabled: var(--color-element-enabled, ${o$2(this.greys.dark25)});
3550
- ---color-element-selected: var(--color-element-selected, ${o$2(this.greys.grey)});
3551
- ---color-element-border: var(--color-element-border, ${o$2(this.greys.dark50)});
3552
- ---color-element-emphasis: var(--color-element-emphasis, ${o$2(this.greys.dark75)});
3337
+ ---shadow-0: var(--shadow-0, ${r$2(this.cssBoxShadow(0))});
3338
+ ---shadow-2: var(--shadow-2, ${r$2(this.cssBoxShadow(2))});
3339
+ ---shadow-4: var(--shadow-4, ${r$2(this.cssBoxShadow(4))});
3340
+ ---shadow-8: var(--shadow-8, ${r$2(this.cssBoxShadow(8))});
3341
+
3342
+ ---color-background: var(--color-background, ${r$2(this.greys.white)});
3343
+ ---color-border: var(--color-border, ${r$2(this.greys.light75)});
3344
+ ---color-text: var(--color-text, ${r$2(this.greys.dark75)});
3345
+ ---color-text-inverse: var(--color-text-inverse, ${r$2(this.greys.white)});
3346
+ ---color-link: var(--color-link, ${r$2(this.greys.dark25)});
3347
+ ---color-element-background: var(--color-element-background, ${r$2(this.greys.light75)});
3348
+ ---color-element-disabled: var(--color-element-disabled, ${r$2(this.greys.light50)});
3349
+ ---color-element-enabled: var(--color-element-enabled, ${r$2(this.greys.dark25)});
3350
+ ---color-element-selected: var(--color-element-selected, ${r$2(this.greys.grey)});
3351
+ ---color-element-border: var(--color-element-border, ${r$2(this.greys.dark50)});
3352
+ ---color-element-emphasis: var(--color-element-emphasis, ${r$2(this.greys.dark75)});
3553
3353
 
3554
3354
  ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
3555
3355
  ---font-family-math: var(--font-family-math, "Source Serif", serif);
@@ -3610,7 +3410,7 @@
3610
3410
  this.disabled = false;
3611
3411
  }
3612
3412
  static get styles() {
3613
- return [super.styles, r$1`
3413
+ return [super.styles, i$1`
3614
3414
  :host {
3615
3415
  margin: 0.25rem;
3616
3416
  }
@@ -3735,11 +3535,11 @@
3735
3535
  this.value = event.target.value;
3736
3536
  }
3737
3537
  static get styles() {
3738
- return [super.styles, r$1`
3538
+ return [super.styles, i$1`
3739
3539
  :host {
3740
- ---shadow-2-rotate: var(--shadow-2-rotate, ${o$2(this.cssBoxShadow(2, true, false))});
3741
- ---shadow-4-rotate: var(--shadow-4-rotate, ${o$2(this.cssBoxShadow(4, true, false))});
3742
- ---shadow-8-rotate: var(--shadow-8-rotate, ${o$2(this.cssBoxShadow(8, true, false))});
3540
+ ---shadow-2-rotate: var(--shadow-2-rotate, ${r$2(this.cssBoxShadow(2, true, false))});
3541
+ ---shadow-4-rotate: var(--shadow-4-rotate, ${r$2(this.cssBoxShadow(4, true, false))});
3542
+ ---shadow-8-rotate: var(--shadow-8-rotate, ${r$2(this.cssBoxShadow(8, true, false))});
3743
3543
 
3744
3544
  display: flex;
3745
3545
 
@@ -4045,12 +3845,15 @@
4045
3845
  this.value = event.target.value;
4046
3846
  }
4047
3847
  static get styles() {
4048
- return [super.styles, r$1`
3848
+ return [super.styles, i$1`
4049
3849
  :host {
4050
3850
  ---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
4051
3851
  ---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
4052
3852
  ---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");
4053
3853
 
3854
+ ---decidables-spinner-postfix: var(--decidables-spinner-postfix, "");
3855
+ ---decidables-spinner-postfix-padding: var(--decidables-spinner-postfix-padding, 0);
3856
+
4054
3857
  display: block;
4055
3858
  }
4056
3859
 
@@ -4078,8 +3881,20 @@
4078
3881
  content: var(---decidables-spinner-prefix);
4079
3882
  }
4080
3883
 
3884
+ label::after {
3885
+ position: absolute;
3886
+ right: 0.25rem;
3887
+ bottom: 1px;
3888
+
3889
+ font-size: var(---decidables-spinner-font-size);
3890
+ line-height: normal;
3891
+
3892
+ content: var(---decidables-spinner-postfix);
3893
+ }
3894
+
4081
3895
  input[type=number] {
4082
3896
  width: var(---decidables-spinner-input-width);
3897
+ padding-right: var(---decidables-spinner-postfix-padding);
4083
3898
 
4084
3899
  font-family: var(---font-family-base);
4085
3900
  font-size: var(---decidables-spinner-font-size);
@@ -4169,7 +3984,7 @@
4169
3984
  }));
4170
3985
  }
4171
3986
  static get styles() {
4172
- return [super.styles, r$1`
3987
+ return [super.styles, i$1`
4173
3988
  :host {
4174
3989
  display: flex;
4175
3990
 
@@ -4321,7 +4136,7 @@
4321
4136
  this.disabled = false;
4322
4137
  }
4323
4138
  static get styles() {
4324
- return [super.styles, r$1`
4139
+ return [super.styles, i$1`
4325
4140
  fieldset {
4326
4141
  display: flex;
4327
4142
 
@@ -4396,7 +4211,7 @@
4396
4211
  }));
4397
4212
  }
4398
4213
  static get styles() {
4399
- return [super.styles, r$1`
4214
+ return [super.styles, i$1`
4400
4215
  :host {
4401
4216
  display: flex;
4402
4217
  }
@@ -4532,10 +4347,55 @@
4532
4347
  }
4533
4348
  };
4534
4349
 
4350
+ function DecidablesMixinResizeable(superClass) {
4351
+ return class extends superClass {
4352
+ static get properties() {
4353
+ return {
4354
+ width: {
4355
+ attribute: false,
4356
+ type: Number,
4357
+ reflect: false
4358
+ },
4359
+ height: {
4360
+ attribute: false,
4361
+ type: Number,
4362
+ reflect: false
4363
+ },
4364
+ rem: {
4365
+ attribute: false,
4366
+ type: Number,
4367
+ reflect: false
4368
+ }
4369
+ };
4370
+ }
4371
+ constructor() {
4372
+ super();
4373
+ this.width = NaN;
4374
+ this.height = NaN;
4375
+ this.rem = NaN;
4376
+ }
4377
+ getDimensions() {
4378
+ this.width = parseFloat(this.getComputedStyleValue('width'), 10);
4379
+ this.height = parseFloat(this.getComputedStyleValue('height'), 10);
4380
+ this.rem = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('font-size'), 10);
4381
+ }
4382
+ connectedCallback() {
4383
+ super.connectedCallback();
4384
+ this.resizeObserver = new ResizeObserver(this.getDimensions.bind(this));
4385
+ this.resizeObserver.observe(this);
4386
+ }
4387
+ disconnectedCallback() {
4388
+ this.resizeObserver.unobserve(this);
4389
+ super.disconnectedCallback();
4390
+ }
4391
+ };
4392
+ }
4393
+
4535
4394
  exports.DecidablesButton = DecidablesButton;
4536
4395
  exports.DecidablesConverterArray = DecidablesConverterArray;
4537
4396
  exports.DecidablesConverterSet = DecidablesConverterSet;
4538
4397
  exports.DecidablesElement = DecidablesElement;
4398
+ exports.DecidablesMixinResizeable = DecidablesMixinResizeable;
4539
4399
  exports.DecidablesSlider = DecidablesSlider;
4540
4400
  exports.DecidablesSpinner = DecidablesSpinner;
4541
4401
  exports.DecidablesSwitch = DecidablesSwitch;