@decidables/decidables-elements 0.0.4 → 0.2.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.
@@ -4,1635 +4,876 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.decidablesElements = {}));
5
5
  })(this, (function (exports) { 'use strict';
6
6
 
7
- function _typeof(obj) {
8
- "@babel/helpers - typeof";
7
+ /**
8
+ * @license
9
+ * Copyright 2019 Google LLC
10
+ * SPDX-License-Identifier: BSD-3-Clause
11
+ */
12
+ const t$1 = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
13
+ e$2 = Symbol(),
14
+ n$3 = new Map();
9
15
 
10
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
11
- return typeof obj;
12
- } : function (obj) {
13
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
14
- }, _typeof(obj);
15
- }
16
+ class s$3 {
17
+ constructor(t, n) {
18
+ if (this._$cssResult$ = !0, n !== e$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
19
+ this.cssText = t;
20
+ }
16
21
 
17
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
18
- try {
19
- var info = gen[key](arg);
20
- var value = info.value;
21
- } catch (error) {
22
- reject(error);
23
- return;
22
+ get styleSheet() {
23
+ let e = n$3.get(this.cssText);
24
+ return t$1 && void 0 === e && (n$3.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;
24
25
  }
25
26
 
26
- if (info.done) {
27
- resolve(value);
28
- } else {
29
- Promise.resolve(value).then(_next, _throw);
27
+ toString() {
28
+ return this.cssText;
30
29
  }
30
+
31
31
  }
32
32
 
33
- function _asyncToGenerator(fn) {
34
- return function () {
35
- var self = this,
36
- args = arguments;
37
- return new Promise(function (resolve, reject) {
38
- var gen = fn.apply(self, args);
33
+ const o$3 = t => new s$3("string" == typeof t ? t : t + "", e$2),
34
+ r$2 = (t, ...n) => {
35
+ const o = 1 === t.length ? t[0] : n.reduce((e, n, s) => e + (t => {
36
+ if (!0 === t._$cssResult$) return t.cssText;
37
+ if ("number" == typeof t) return t;
38
+ 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.");
39
+ })(n) + t[s + 1], t[0]);
40
+ return new s$3(o, e$2);
41
+ },
42
+ i$1 = (e, n) => {
43
+ t$1 ? e.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(t => {
44
+ const n = document.createElement("style"),
45
+ s = window.litNonce;
46
+ void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
47
+ });
48
+ },
49
+ S$1 = t$1 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
50
+ let e = "";
39
51
 
40
- function _next(value) {
41
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
42
- }
52
+ for (const n of t.cssRules) e += n.cssText;
43
53
 
44
- function _throw(err) {
45
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
46
- }
54
+ return o$3(e);
55
+ })(t) : t;
47
56
 
48
- _next(undefined);
49
- });
50
- };
51
- }
57
+ /**
58
+ * @license
59
+ * Copyright 2017 Google LLC
60
+ * SPDX-License-Identifier: BSD-3-Clause
61
+ */
52
62
 
53
- function _classCallCheck(instance, Constructor) {
54
- if (!(instance instanceof Constructor)) {
55
- throw new TypeError("Cannot call a class as a function");
56
- }
57
- }
63
+ var s$2;
58
64
 
59
- function _defineProperties(target, props) {
60
- for (var i = 0; i < props.length; i++) {
61
- var descriptor = props[i];
62
- descriptor.enumerable = descriptor.enumerable || false;
63
- descriptor.configurable = true;
64
- if ("value" in descriptor) descriptor.writable = true;
65
- Object.defineProperty(target, descriptor.key, descriptor);
66
- }
67
- }
65
+ const e$1 = window.trustedTypes,
66
+ r$1 = e$1 ? e$1.emptyScript : "",
67
+ h$1 = window.reactiveElementPolyfillSupport,
68
+ o$2 = {
69
+ toAttribute(t, i) {
70
+ switch (i) {
71
+ case Boolean:
72
+ t = t ? r$1 : null;
73
+ break;
68
74
 
69
- function _createClass(Constructor, protoProps, staticProps) {
70
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
71
- if (staticProps) _defineProperties(Constructor, staticProps);
72
- Object.defineProperty(Constructor, "prototype", {
73
- writable: false
74
- });
75
- return Constructor;
76
- }
75
+ case Object:
76
+ case Array:
77
+ t = null == t ? t : JSON.stringify(t);
78
+ }
77
79
 
78
- function _defineProperty(obj, key, value) {
79
- if (key in obj) {
80
- Object.defineProperty(obj, key, {
81
- value: value,
82
- enumerable: true,
83
- configurable: true,
84
- writable: true
85
- });
86
- } else {
87
- obj[key] = value;
88
- }
80
+ return t;
81
+ },
89
82
 
90
- return obj;
91
- }
83
+ fromAttribute(t, i) {
84
+ let s = t;
92
85
 
93
- function _inherits(subClass, superClass) {
94
- if (typeof superClass !== "function" && superClass !== null) {
95
- throw new TypeError("Super expression must either be null or a function");
96
- }
86
+ switch (i) {
87
+ case Boolean:
88
+ s = null !== t;
89
+ break;
97
90
 
98
- subClass.prototype = Object.create(superClass && superClass.prototype, {
99
- constructor: {
100
- value: subClass,
101
- writable: true,
102
- configurable: true
103
- }
104
- });
105
- Object.defineProperty(subClass, "prototype", {
106
- writable: false
107
- });
108
- if (superClass) _setPrototypeOf(subClass, superClass);
109
- }
91
+ case Number:
92
+ s = null === t ? null : Number(t);
93
+ break;
110
94
 
111
- function _getPrototypeOf(o) {
112
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
113
- return o.__proto__ || Object.getPrototypeOf(o);
114
- };
115
- return _getPrototypeOf(o);
116
- }
95
+ case Object:
96
+ case Array:
97
+ try {
98
+ s = JSON.parse(t);
99
+ } catch (t) {
100
+ s = null;
101
+ }
117
102
 
118
- function _setPrototypeOf(o, p) {
119
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
120
- o.__proto__ = p;
121
- return o;
122
- };
103
+ }
123
104
 
124
- return _setPrototypeOf(o, p);
125
- }
105
+ return s;
106
+ }
126
107
 
127
- function _isNativeReflectConstruct() {
128
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
129
- if (Reflect.construct.sham) return false;
130
- if (typeof Proxy === "function") return true;
108
+ },
109
+ n$2 = (t, i) => i !== t && (i == i || t == t),
110
+ l$3 = {
111
+ attribute: !0,
112
+ type: String,
113
+ converter: o$2,
114
+ reflect: !1,
115
+ hasChanged: n$2
116
+ };
131
117
 
132
- try {
133
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
134
- return true;
135
- } catch (e) {
136
- return false;
118
+ class a$1 extends HTMLElement {
119
+ constructor() {
120
+ super(), this._$Et = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$Ei = null, this.o();
137
121
  }
138
- }
139
122
 
140
- function _construct(Parent, args, Class) {
141
- if (_isNativeReflectConstruct()) {
142
- _construct = Reflect.construct;
143
- } else {
144
- _construct = function _construct(Parent, args, Class) {
145
- var a = [null];
146
- a.push.apply(a, args);
147
- var Constructor = Function.bind.apply(Parent, a);
148
- var instance = new Constructor();
149
- if (Class) _setPrototypeOf(instance, Class.prototype);
150
- return instance;
151
- };
123
+ static addInitializer(t) {
124
+ var i;
125
+ null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);
152
126
  }
153
127
 
154
- return _construct.apply(null, arguments);
155
- }
156
-
157
- function _isNativeFunction(fn) {
158
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
159
- }
160
-
161
- function _wrapNativeSuper(Class) {
162
- var _cache = typeof Map === "function" ? new Map() : undefined;
128
+ static get observedAttributes() {
129
+ this.finalize();
130
+ const t = [];
131
+ return this.elementProperties.forEach((i, s) => {
132
+ const e = this._$Eh(s, i);
163
133
 
164
- _wrapNativeSuper = function _wrapNativeSuper(Class) {
165
- if (Class === null || !_isNativeFunction(Class)) return Class;
134
+ void 0 !== e && (this._$Eu.set(e, s), t.push(e));
135
+ }), t;
136
+ }
166
137
 
167
- if (typeof Class !== "function") {
168
- throw new TypeError("Super expression must either be null or a function");
138
+ static createProperty(t, i = l$3) {
139
+ if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
140
+ const s = "symbol" == typeof t ? Symbol() : "__" + t,
141
+ e = this.getPropertyDescriptor(t, s, i);
142
+ void 0 !== e && Object.defineProperty(this.prototype, t, e);
169
143
  }
144
+ }
170
145
 
171
- if (typeof _cache !== "undefined") {
172
- if (_cache.has(Class)) return _cache.get(Class);
146
+ static getPropertyDescriptor(t, i, s) {
147
+ return {
148
+ get() {
149
+ return this[i];
150
+ },
173
151
 
174
- _cache.set(Class, Wrapper);
175
- }
152
+ set(e) {
153
+ const r = this[t];
154
+ this[i] = e, this.requestUpdate(t, r, s);
155
+ },
176
156
 
177
- function Wrapper() {
178
- return _construct(Class, arguments, _getPrototypeOf(this).constructor);
179
- }
157
+ configurable: !0,
158
+ enumerable: !0
159
+ };
160
+ }
180
161
 
181
- Wrapper.prototype = Object.create(Class.prototype, {
182
- constructor: {
183
- value: Wrapper,
184
- enumerable: false,
185
- writable: true,
186
- configurable: true
187
- }
188
- });
189
- return _setPrototypeOf(Wrapper, Class);
190
- };
162
+ static getPropertyOptions(t) {
163
+ return this.elementProperties.get(t) || l$3;
164
+ }
191
165
 
192
- return _wrapNativeSuper(Class);
193
- }
166
+ static finalize() {
167
+ if (this.hasOwnProperty("finalized")) return !1;
168
+ this.finalized = !0;
169
+ const t = Object.getPrototypeOf(this);
194
170
 
195
- function _assertThisInitialized(self) {
196
- if (self === void 0) {
197
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
198
- }
171
+ if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
172
+ const t = this.properties,
173
+ i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
199
174
 
200
- return self;
201
- }
175
+ for (const s of i) this.createProperty(s, t[s]);
176
+ }
202
177
 
203
- function _possibleConstructorReturn(self, call) {
204
- if (call && (typeof call === "object" || typeof call === "function")) {
205
- return call;
206
- } else if (call !== void 0) {
207
- throw new TypeError("Derived constructors may only return object or undefined");
178
+ return this.elementStyles = this.finalizeStyles(this.styles), !0;
208
179
  }
209
180
 
210
- return _assertThisInitialized(self);
211
- }
212
-
213
- function _createSuper(Derived) {
214
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
181
+ static finalizeStyles(i) {
182
+ const s = [];
215
183
 
216
- return function _createSuperInternal() {
217
- var Super = _getPrototypeOf(Derived),
218
- result;
184
+ if (Array.isArray(i)) {
185
+ const e = new Set(i.flat(1 / 0).reverse());
219
186
 
220
- if (hasNativeReflectConstruct) {
221
- var NewTarget = _getPrototypeOf(this).constructor;
187
+ for (const i of e) s.unshift(S$1(i));
188
+ } else void 0 !== i && s.push(S$1(i));
222
189
 
223
- result = Reflect.construct(Super, arguments, NewTarget);
224
- } else {
225
- result = Super.apply(this, arguments);
226
- }
190
+ return s;
191
+ }
227
192
 
228
- return _possibleConstructorReturn(this, result);
229
- };
230
- }
193
+ static _$Eh(t, i) {
194
+ const s = i.attribute;
195
+ return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
196
+ }
231
197
 
232
- function _superPropBase(object, property) {
233
- while (!Object.prototype.hasOwnProperty.call(object, property)) {
234
- object = _getPrototypeOf(object);
235
- if (object === null) break;
198
+ o() {
199
+ var t;
200
+ 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));
236
201
  }
237
202
 
238
- return object;
239
- }
203
+ addController(t) {
204
+ var i, s;
205
+ (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));
206
+ }
240
207
 
241
- function _get() {
242
- if (typeof Reflect !== "undefined" && Reflect.get) {
243
- _get = Reflect.get;
244
- } else {
245
- _get = function _get(target, property, receiver) {
246
- var base = _superPropBase(target, property);
208
+ removeController(t) {
209
+ var i;
210
+ null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);
211
+ }
247
212
 
248
- if (!base) return;
249
- var desc = Object.getOwnPropertyDescriptor(base, property);
213
+ _$Em() {
214
+ this.constructor.elementProperties.forEach((t, i) => {
215
+ this.hasOwnProperty(i) && (this._$Et.set(i, this[i]), delete this[i]);
216
+ });
217
+ }
250
218
 
251
- if (desc.get) {
252
- return desc.get.call(arguments.length < 3 ? target : receiver);
253
- }
219
+ createRenderRoot() {
220
+ var t;
221
+ const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
222
+ return i$1(s, this.constructor.elementStyles), s;
223
+ }
254
224
 
255
- return desc.value;
256
- };
225
+ connectedCallback() {
226
+ var t;
227
+ void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
228
+ var i;
229
+ return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
230
+ });
257
231
  }
258
232
 
259
- return _get.apply(this, arguments);
260
- }
233
+ enableUpdating(t) {}
261
234
 
262
- function _taggedTemplateLiteral(strings, raw) {
263
- if (!raw) {
264
- raw = strings.slice(0);
235
+ disconnectedCallback() {
236
+ var t;
237
+ null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
238
+ var i;
239
+ return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
240
+ });
265
241
  }
266
242
 
267
- return Object.freeze(Object.defineProperties(strings, {
268
- raw: {
269
- value: Object.freeze(raw)
270
- }
271
- }));
272
- }
273
-
274
- function _slicedToArray(arr, i) {
275
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
276
- }
243
+ attributeChangedCallback(t, i, s) {
244
+ this._$AK(t, s);
245
+ }
277
246
 
278
- function _toConsumableArray(arr) {
279
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
280
- }
247
+ _$ES(t, i, s = l$3) {
248
+ var e, r;
281
249
 
282
- function _arrayWithoutHoles(arr) {
283
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
284
- }
250
+ const h = this.constructor._$Eh(t, s);
285
251
 
286
- function _arrayWithHoles(arr) {
287
- if (Array.isArray(arr)) return arr;
288
- }
252
+ if (void 0 !== h && !0 === s.reflect) {
253
+ const n = (null !== (r = null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) && void 0 !== r ? r : o$2.toAttribute)(i, s.type);
254
+ this._$Ei = t, null == n ? this.removeAttribute(h) : this.setAttribute(h, n), this._$Ei = null;
255
+ }
256
+ }
289
257
 
290
- function _iterableToArray(iter) {
291
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
292
- }
258
+ _$AK(t, i) {
259
+ var s, e, r;
293
260
 
294
- function _iterableToArrayLimit(arr, i) {
295
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
261
+ const h = this.constructor,
262
+ n = h._$Eu.get(t);
296
263
 
297
- if (_i == null) return;
298
- var _arr = [];
299
- var _n = true;
300
- var _d = false;
264
+ if (void 0 !== n && this._$Ei !== n) {
265
+ const t = h.getPropertyOptions(n),
266
+ l = t.converter,
267
+ 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$2.fromAttribute;
268
+ this._$Ei = n, this[n] = a(i, t.type), this._$Ei = null;
269
+ }
270
+ }
301
271
 
302
- var _s, _e;
272
+ requestUpdate(t, i, s) {
273
+ let e = !0;
274
+ void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$2)(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_());
275
+ }
303
276
 
304
- try {
305
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
306
- _arr.push(_s.value);
277
+ async _$E_() {
278
+ this.isUpdatePending = !0;
307
279
 
308
- if (i && _arr.length === i) break;
309
- }
310
- } catch (err) {
311
- _d = true;
312
- _e = err;
313
- } finally {
314
280
  try {
315
- if (!_n && _i["return"] != null) _i["return"]();
316
- } finally {
317
- if (_d) throw _e;
281
+ await this._$Ep;
282
+ } catch (t) {
283
+ Promise.reject(t);
318
284
  }
319
- }
320
285
 
321
- return _arr;
322
- }
286
+ const t = this.scheduleUpdate();
287
+ return null != t && (await t), !this.isUpdatePending;
288
+ }
323
289
 
324
- function _unsupportedIterableToArray(o, minLen) {
325
- if (!o) return;
326
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
327
- var n = Object.prototype.toString.call(o).slice(8, -1);
328
- if (n === "Object" && o.constructor) n = o.constructor.name;
329
- if (n === "Map" || n === "Set") return Array.from(o);
330
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
331
- }
290
+ scheduleUpdate() {
291
+ return this.performUpdate();
292
+ }
332
293
 
333
- function _arrayLikeToArray(arr, len) {
334
- if (len == null || len > arr.length) len = arr.length;
294
+ performUpdate() {
295
+ var t;
296
+ if (!this.isUpdatePending) return;
297
+ this.hasUpdated, this._$Et && (this._$Et.forEach((t, i) => this[i] = t), this._$Et = void 0);
298
+ let i = !1;
299
+ const s = this._$AL;
335
300
 
336
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
301
+ try {
302
+ i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
303
+ var i;
304
+ return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
305
+ }), this.update(s)) : this._$EU();
306
+ } catch (t) {
307
+ throw i = !1, this._$EU(), t;
308
+ }
337
309
 
338
- return arr2;
339
- }
310
+ i && this._$AE(s);
311
+ }
340
312
 
341
- function _nonIterableSpread() {
342
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
343
- }
313
+ willUpdate(t) {}
344
314
 
345
- function _nonIterableRest() {
346
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
347
- }
315
+ _$AE(t) {
316
+ var i;
317
+ null === (i = this._$Eg) || void 0 === i || i.forEach(t => {
318
+ var i;
319
+ return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
320
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
321
+ }
348
322
 
349
- function _createForOfIteratorHelper(o, allowArrayLike) {
350
- var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
323
+ _$EU() {
324
+ this._$AL = new Map(), this.isUpdatePending = !1;
325
+ }
351
326
 
352
- if (!it) {
353
- if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
354
- if (it) o = it;
355
- var i = 0;
327
+ get updateComplete() {
328
+ return this.getUpdateComplete();
329
+ }
356
330
 
357
- var F = function () {};
331
+ getUpdateComplete() {
332
+ return this._$Ep;
333
+ }
358
334
 
359
- return {
360
- s: F,
361
- n: function () {
362
- if (i >= o.length) return {
363
- done: true
364
- };
365
- return {
366
- done: false,
367
- value: o[i++]
368
- };
369
- },
370
- e: function (e) {
371
- throw e;
372
- },
373
- f: F
374
- };
375
- }
335
+ shouldUpdate(t) {
336
+ return !0;
337
+ }
376
338
 
377
- throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
339
+ update(t) {
340
+ void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$ES(i, this[i], t)), this._$EC = void 0), this._$EU();
378
341
  }
379
342
 
380
- var normalCompletion = true,
381
- didErr = false,
382
- err;
383
- return {
384
- s: function () {
385
- it = it.call(o);
386
- },
387
- n: function () {
388
- var step = it.next();
389
- normalCompletion = step.done;
390
- return step;
391
- },
392
- e: function (e) {
393
- didErr = true;
394
- err = e;
395
- },
396
- f: function () {
397
- try {
398
- if (!normalCompletion && it.return != null) it.return();
399
- } finally {
400
- if (didErr) throw err;
401
- }
402
- }
403
- };
343
+ updated(t) {}
344
+
345
+ firstUpdated(t) {}
346
+
404
347
  }
405
348
 
349
+ a$1.finalized = !0, a$1.elementProperties = new Map(), a$1.elementStyles = [], a$1.shadowRootOptions = {
350
+ mode: "open"
351
+ }, null == h$1 || h$1({
352
+ ReactiveElement: a$1
353
+ }), (null !== (s$2 = globalThis.reactiveElementVersions) && void 0 !== s$2 ? s$2 : globalThis.reactiveElementVersions = []).push("1.3.1");
354
+
406
355
  /**
407
356
  * @license
408
- * Copyright 2019 Google LLC
357
+ * Copyright 2017 Google LLC
409
358
  * SPDX-License-Identifier: BSD-3-Clause
410
359
  */
411
- var t$1 = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
412
- e$2 = Symbol(),
413
- n$3 = new Map();
360
+ var t;
414
361
 
415
- var s$3 = /*#__PURE__*/function () {
416
- function s(t, n) {
417
- _classCallCheck(this, s);
362
+ const i = globalThis.trustedTypes,
363
+ s$1 = i ? i.createPolicy("lit-html", {
364
+ createHTML: t => t
365
+ }) : void 0,
366
+ e = `lit$${(Math.random() + "").slice(9)}$`,
367
+ o$1 = "?" + e,
368
+ n$1 = `<${o$1}>`,
369
+ l$2 = document,
370
+ h = (t = "") => l$2.createComment(t),
371
+ r = t => null === t || "object" != typeof t && "function" != typeof t,
372
+ d = Array.isArray,
373
+ u = t => {
374
+ var i;
375
+ return d(t) || "function" == typeof (null === (i = t) || void 0 === i ? void 0 : i[Symbol.iterator]);
376
+ },
377
+ c = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
378
+ v = /-->/g,
379
+ a = />/g,
380
+ f = />|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,
381
+ _$7 = /'/g,
382
+ m = /"/g,
383
+ g = /^(?:script|style|textarea|title)$/i,
384
+ p = t => (i, ...s) => ({
385
+ _$litType$: t,
386
+ strings: i,
387
+ values: s
388
+ }),
389
+ $ = p(1),
390
+ y = p(2),
391
+ b = Symbol.for("lit-noChange"),
392
+ w = Symbol.for("lit-nothing"),
393
+ T = new WeakMap(),
394
+ x = (t, i, s) => {
395
+ var e, o;
396
+ const n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
397
+ let l = n._$litPart$;
418
398
 
419
- if (this._$cssResult$ = !0, n !== e$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
420
- this.cssText = t;
399
+ if (void 0 === l) {
400
+ const t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
401
+ n._$litPart$ = l = new N(i.insertBefore(h(), t), t, void 0, null != s ? s : {});
421
402
  }
422
403
 
423
- _createClass(s, [{
424
- key: "styleSheet",
425
- get: function get() {
426
- var e = n$3.get(this.cssText);
427
- return t$1 && void 0 === e && (n$3.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;
428
- }
429
- }, {
430
- key: "toString",
431
- value: function toString() {
432
- return this.cssText;
433
- }
434
- }]);
435
-
436
- return s;
437
- }();
438
-
439
- var o$3 = function o(t) {
440
- return new s$3("string" == typeof t ? t : t + "", e$2);
441
- },
442
- r$2 = function r(t) {
443
- for (var _len = arguments.length, n = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
444
- n[_key - 1] = arguments[_key];
445
- }
446
-
447
- var o = 1 === t.length ? t[0] : n.reduce(function (e, n, s) {
448
- return e + function (t) {
449
- if (!0 === t._$cssResult$) return t.cssText;
450
- if ("number" == typeof t) return t;
451
- 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.");
452
- }(n) + t[s + 1];
453
- }, t[0]);
454
- return new s$3(o, e$2);
455
- },
456
- i$1 = function i(e, n) {
457
- t$1 ? e.adoptedStyleSheets = n.map(function (t) {
458
- return t instanceof CSSStyleSheet ? t : t.styleSheet;
459
- }) : n.forEach(function (t) {
460
- var n = document.createElement("style"),
461
- s = window.litNonce;
462
- void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
463
- });
404
+ return l._$AI(t), l;
464
405
  },
465
- S$1 = t$1 ? function (t) {
466
- return t;
467
- } : function (t) {
468
- return t instanceof CSSStyleSheet ? function (t) {
469
- var e = "";
406
+ A = l$2.createTreeWalker(l$2, 129, null, !1),
407
+ C = (t, i) => {
408
+ const o = t.length - 1,
409
+ l = [];
410
+ let h,
411
+ r = 2 === i ? "<svg>" : "",
412
+ d = c;
470
413
 
471
- var _iterator = _createForOfIteratorHelper(t.cssRules),
472
- _step;
414
+ for (let i = 0; i < o; i++) {
415
+ const s = t[i];
416
+ let o,
417
+ u,
418
+ p = -1,
419
+ $ = 0;
473
420
 
474
- try {
475
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
476
- var _n = _step.value;
477
- e += _n.cssText;
478
- }
479
- } catch (err) {
480
- _iterator.e(err);
481
- } finally {
482
- _iterator.f();
483
- }
421
+ for (; $ < s.length && (d.lastIndex = $, u = d.exec(s), null !== u);) $ = d.lastIndex, d === c ? "!--" === u[1] ? d = v : void 0 !== u[1] ? d = a : void 0 !== u[2] ? (g.test(u[2]) && (h = RegExp("</" + u[2], "g")), d = f) : void 0 !== u[3] && (d = f) : d === f ? ">" === u[0] ? (d = null != h ? h : c, p = -1) : void 0 === u[1] ? p = -2 : (p = d.lastIndex - u[2].length, o = u[1], d = void 0 === u[3] ? f : '"' === u[3] ? m : _$7) : d === m || d === _$7 ? d = f : d === v || d === a ? d = c : (d = f, h = void 0);
484
422
 
485
- return o$3(e);
486
- }(t) : t;
423
+ const y = d === f && t[i + 1].startsWith("/>") ? " " : "";
424
+ r += d === c ? s + n$1 : p >= 0 ? (l.push(o), s.slice(0, p) + "$lit$" + s.slice(p) + e + y) : s + e + (-2 === p ? (l.push(void 0), i) : y);
425
+ }
426
+
427
+ const u = r + (t[o] || "<?>") + (2 === i ? "</svg>" : "");
428
+ if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
429
+ return [void 0 !== s$1 ? s$1.createHTML(u) : u, l];
487
430
  };
488
431
 
489
- /**
490
- * @license
491
- * Copyright 2017 Google LLC
492
- * SPDX-License-Identifier: BSD-3-Clause
493
- */
432
+ class E {
433
+ constructor({
434
+ strings: t,
435
+ _$litType$: s
436
+ }, n) {
437
+ let l;
438
+ this.parts = [];
439
+ let r = 0,
440
+ d = 0;
441
+ const u = t.length - 1,
442
+ c = this.parts,
443
+ [v, a] = C(t, s);
494
444
 
495
- var s$2;
445
+ if (this.el = E.createElement(v, n), A.currentNode = this.el.content, 2 === s) {
446
+ const t = this.el.content,
447
+ i = t.firstChild;
448
+ i.remove(), t.append(...i.childNodes);
449
+ }
496
450
 
497
- var e$1 = window.trustedTypes,
498
- r$1 = e$1 ? e$1.emptyScript : "",
499
- h$1 = window.reactiveElementPolyfillSupport,
500
- o$2 = {
501
- toAttribute: function toAttribute(t, i) {
502
- switch (i) {
503
- case Boolean:
504
- t = t ? r$1 : null;
505
- break;
451
+ for (; null !== (l = A.nextNode()) && c.length < u;) {
452
+ if (1 === l.nodeType) {
453
+ if (l.hasAttributes()) {
454
+ const t = [];
455
+
456
+ for (const i of l.getAttributeNames()) if (i.endsWith("$lit$") || i.startsWith(e)) {
457
+ const s = a[d++];
458
+
459
+ if (t.push(i), void 0 !== s) {
460
+ const t = l.getAttribute(s.toLowerCase() + "$lit$").split(e),
461
+ i = /([.?@])?(.*)/.exec(s);
462
+ c.push({
463
+ type: 1,
464
+ index: r,
465
+ name: i[2],
466
+ strings: t,
467
+ ctor: "." === i[1] ? M : "?" === i[1] ? H : "@" === i[1] ? I : S
468
+ });
469
+ } else c.push({
470
+ type: 6,
471
+ index: r
472
+ });
473
+ }
506
474
 
507
- case Object:
508
- case Array:
509
- t = null == t ? t : JSON.stringify(t);
510
- }
475
+ for (const i of t) l.removeAttribute(i);
476
+ }
511
477
 
512
- return t;
513
- },
514
- fromAttribute: function fromAttribute(t, i) {
515
- var s = t;
478
+ if (g.test(l.tagName)) {
479
+ const t = l.textContent.split(e),
480
+ s = t.length - 1;
516
481
 
517
- switch (i) {
518
- case Boolean:
519
- s = null !== t;
520
- break;
482
+ if (s > 0) {
483
+ l.textContent = i ? i.emptyScript : "";
521
484
 
522
- case Number:
523
- s = null === t ? null : Number(t);
524
- break;
485
+ for (let i = 0; i < s; i++) l.append(t[i], h()), A.nextNode(), c.push({
486
+ type: 2,
487
+ index: ++r
488
+ });
525
489
 
526
- case Object:
527
- case Array:
528
- try {
529
- s = JSON.parse(t);
530
- } catch (t) {
531
- s = null;
490
+ l.append(t[s], h());
491
+ }
532
492
  }
493
+ } else if (8 === l.nodeType) if (l.data === o$1) c.push({
494
+ type: 2,
495
+ index: r
496
+ });else {
497
+ let t = -1;
498
+
499
+ for (; -1 !== (t = l.data.indexOf(e, t + 1));) c.push({
500
+ type: 7,
501
+ index: r
502
+ }), t += e.length - 1;
503
+ }
533
504
 
505
+ r++;
534
506
  }
507
+ }
535
508
 
536
- return s;
509
+ static createElement(t, i) {
510
+ const s = l$2.createElement("template");
511
+ return s.innerHTML = t, s;
537
512
  }
538
- },
539
- n$2 = function n(t, i) {
540
- return i !== t && (i == i || t == t);
541
- },
542
- l$3 = {
543
- attribute: !0,
544
- type: String,
545
- converter: o$2,
546
- reflect: !1,
547
- hasChanged: n$2
548
- };
549
513
 
550
- var a$1 = /*#__PURE__*/function (_HTMLElement) {
551
- _inherits(a, _HTMLElement);
514
+ }
552
515
 
553
- var _super = _createSuper(a);
516
+ function P(t, i, s = t, e) {
517
+ var o, n, l, h;
518
+ if (i === b) return i;
519
+ let d = void 0 !== e ? null === (o = s._$Cl) || void 0 === o ? void 0 : o[e] : s._$Cu;
520
+ const u = r(i) ? void 0 : i._$litDirective$;
521
+ return (null == d ? void 0 : d.constructor) !== u && (null === (n = null == d ? void 0 : d._$AO) || void 0 === n || n.call(d, !1), void 0 === u ? d = void 0 : (d = new u(t), d._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Cl) && void 0 !== l ? l : h._$Cl = [])[e] = d : s._$Cu = d), void 0 !== d && (i = P(t, d._$AS(t, i.values), d, e)), i;
522
+ }
554
523
 
555
- function a() {
556
- var _this;
524
+ class V {
525
+ constructor(t, i) {
526
+ this.v = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
527
+ }
557
528
 
558
- _classCallCheck(this, a);
529
+ get parentNode() {
530
+ return this._$AM.parentNode;
531
+ }
559
532
 
560
- _this = _super.call(this), _this._$Et = new Map(), _this.isUpdatePending = !1, _this.hasUpdated = !1, _this._$Ei = null, _this.o();
561
- return _this;
533
+ get _$AU() {
534
+ return this._$AM._$AU;
562
535
  }
563
536
 
564
- _createClass(a, [{
565
- key: "o",
566
- value: function o() {
567
- var _this2 = this;
537
+ p(t) {
538
+ var i;
539
+ const {
540
+ el: {
541
+ content: s
542
+ },
543
+ parts: e
544
+ } = this._$AD,
545
+ o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : l$2).importNode(s, !0);
546
+ A.currentNode = o;
547
+ let n = A.nextNode(),
548
+ h = 0,
549
+ r = 0,
550
+ d = e[0];
551
+
552
+ for (; void 0 !== d;) {
553
+ if (h === d.index) {
554
+ let i;
555
+ 2 === d.type ? i = new N(n, n.nextSibling, this, t) : 1 === d.type ? i = new d.ctor(n, d.name, d.strings, this, t) : 6 === d.type && (i = new L(n, this, t)), this.v.push(i), d = e[++r];
556
+ }
568
557
 
569
- var t;
570
- this._$Ep = new Promise(function (t) {
571
- return _this2.enableUpdating = t;
572
- }), this._$AL = new Map(), this._$Em(), this.requestUpdate(), null === (t = this.constructor.l) || void 0 === t || t.forEach(function (t) {
573
- return t(_this2);
574
- });
575
- }
576
- }, {
577
- key: "addController",
578
- value: function addController(t) {
579
- var i, s;
580
- (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));
581
- }
582
- }, {
583
- key: "removeController",
584
- value: function removeController(t) {
585
- var i;
586
- null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);
558
+ h !== (null == d ? void 0 : d.index) && (n = A.nextNode(), h++);
587
559
  }
588
- }, {
589
- key: "_$Em",
590
- value: function _$Em() {
591
- var _this3 = this;
592
560
 
593
- this.constructor.elementProperties.forEach(function (t, i) {
594
- _this3.hasOwnProperty(i) && (_this3._$Et.set(i, _this3[i]), delete _this3[i]);
595
- });
596
- }
597
- }, {
598
- key: "createRenderRoot",
599
- value: function createRenderRoot() {
600
- var t;
601
- var s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
602
- return i$1(s, this.constructor.elementStyles), s;
603
- }
604
- }, {
605
- key: "connectedCallback",
606
- value: function connectedCallback() {
607
- var t;
608
- void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(function (t) {
609
- var i;
610
- return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
611
- });
612
- }
613
- }, {
614
- key: "enableUpdating",
615
- value: function enableUpdating(t) {}
616
- }, {
617
- key: "disconnectedCallback",
618
- value: function disconnectedCallback() {
619
- var t;
620
- null === (t = this._$Eg) || void 0 === t || t.forEach(function (t) {
621
- var i;
622
- return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
623
- });
624
- }
625
- }, {
626
- key: "attributeChangedCallback",
627
- value: function attributeChangedCallback(t, i, s) {
628
- this._$AK(t, s);
629
- }
630
- }, {
631
- key: "_$ES",
632
- value: function _$ES(t, i) {
633
- var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : l$3;
634
- var e, r;
561
+ return o;
562
+ }
635
563
 
636
- var h = this.constructor._$Eh(t, s);
564
+ m(t) {
565
+ let i = 0;
637
566
 
638
- if (void 0 !== h && !0 === s.reflect) {
639
- var _n = (null !== (r = null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) && void 0 !== r ? r : o$2.toAttribute)(i, s.type);
567
+ for (const s of this.v) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
568
+ }
640
569
 
641
- this._$Ei = t, null == _n ? this.removeAttribute(h) : this.setAttribute(h, _n), this._$Ei = null;
642
- }
643
- }
644
- }, {
645
- key: "_$AK",
646
- value: function _$AK(t, i) {
647
- var s, e, r;
570
+ }
648
571
 
649
- var h = this.constructor,
650
- n = h._$Eu.get(t);
572
+ class N {
573
+ constructor(t, i, s, e) {
574
+ var o;
575
+ this.type = 2, this._$AH = w, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cg = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
576
+ }
651
577
 
652
- if (void 0 !== n && this._$Ei !== n) {
653
- var _t = h.getPropertyOptions(n),
654
- _l = _t.converter,
655
- _a2 = 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$2.fromAttribute;
578
+ get _$AU() {
579
+ var t, i;
580
+ return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cg;
581
+ }
656
582
 
657
- this._$Ei = n, this[n] = _a2(i, _t.type), this._$Ei = null;
658
- }
659
- }
660
- }, {
661
- key: "requestUpdate",
662
- value: function requestUpdate(t, i, s) {
663
- var e = !0;
664
- void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$2)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$Ei !== t && (void 0 === this._$E_ && (this._$E_ = new Map()), this._$E_.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$Ep = this._$EC());
665
- }
666
- }, {
667
- key: "_$EC",
668
- value: function () {
669
- var _$EC2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
670
- var t;
671
- return regeneratorRuntime.wrap(function _callee$(_context) {
672
- while (1) {
673
- switch (_context.prev = _context.next) {
674
- case 0:
675
- this.isUpdatePending = !0;
676
- _context.prev = 1;
677
- _context.next = 4;
678
- return this._$Ep;
679
-
680
- case 4:
681
- _context.next = 9;
682
- break;
683
-
684
- case 6:
685
- _context.prev = 6;
686
- _context.t0 = _context["catch"](1);
687
- Promise.reject(_context.t0);
688
-
689
- case 9:
690
- t = this.scheduleUpdate();
691
- _context.t1 = null != t;
692
-
693
- if (!_context.t1) {
694
- _context.next = 14;
695
- break;
696
- }
697
-
698
- _context.next = 14;
699
- return t;
700
-
701
- case 14:
702
- return _context.abrupt("return", !this.isUpdatePending);
703
-
704
- case 15:
705
- case "end":
706
- return _context.stop();
707
- }
708
- }
709
- }, _callee, this, [[1, 6]]);
710
- }));
583
+ get parentNode() {
584
+ let t = this._$AA.parentNode;
585
+ const i = this._$AM;
586
+ return void 0 !== i && 11 === t.nodeType && (t = i.parentNode), t;
587
+ }
711
588
 
712
- function _$EC() {
713
- return _$EC2.apply(this, arguments);
714
- }
589
+ get startNode() {
590
+ return this._$AA;
591
+ }
715
592
 
716
- return _$EC;
717
- }()
718
- }, {
719
- key: "scheduleUpdate",
720
- value: function scheduleUpdate() {
721
- return this.performUpdate();
722
- }
723
- }, {
724
- key: "performUpdate",
725
- value: function performUpdate() {
726
- var _this4 = this;
727
-
728
- var t;
729
- if (!this.isUpdatePending) return;
730
- this.hasUpdated, this._$Et && (this._$Et.forEach(function (t, i) {
731
- return _this4[i] = t;
732
- }), this._$Et = void 0);
733
- var i = !1;
734
- var s = this._$AL;
735
-
736
- try {
737
- i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(function (t) {
738
- var i;
739
- return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
740
- }), this.update(s)) : this._$EU();
741
- } catch (t) {
742
- throw i = !1, this._$EU(), t;
743
- }
593
+ get endNode() {
594
+ return this._$AB;
595
+ }
744
596
 
745
- i && this._$AE(s);
746
- }
747
- }, {
748
- key: "willUpdate",
749
- value: function willUpdate(t) {}
750
- }, {
751
- key: "_$AE",
752
- value: function _$AE(t) {
753
- var i;
754
- null === (i = this._$Eg) || void 0 === i || i.forEach(function (t) {
755
- var i;
756
- return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
757
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
758
- }
759
- }, {
760
- key: "_$EU",
761
- value: function _$EU() {
762
- this._$AL = new Map(), this.isUpdatePending = !1;
763
- }
764
- }, {
765
- key: "updateComplete",
766
- get: function get() {
767
- return this.getUpdateComplete();
768
- }
769
- }, {
770
- key: "getUpdateComplete",
771
- value: function getUpdateComplete() {
772
- return this._$Ep;
773
- }
774
- }, {
775
- key: "shouldUpdate",
776
- value: function shouldUpdate(t) {
777
- return !0;
778
- }
779
- }, {
780
- key: "update",
781
- value: function update(t) {
782
- var _this5 = this;
783
-
784
- void 0 !== this._$E_ && (this._$E_.forEach(function (t, i) {
785
- return _this5._$ES(i, _this5[i], t);
786
- }), this._$E_ = void 0), this._$EU();
787
- }
788
- }, {
789
- key: "updated",
790
- value: function updated(t) {}
791
- }, {
792
- key: "firstUpdated",
793
- value: function firstUpdated(t) {}
794
- }], [{
795
- key: "addInitializer",
796
- value: function addInitializer(t) {
797
- var i;
798
- null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);
799
- }
800
- }, {
801
- key: "observedAttributes",
802
- get: function get() {
803
- var _this6 = this;
804
-
805
- this.finalize();
806
- var t = [];
807
- return this.elementProperties.forEach(function (i, s) {
808
- var e = _this6._$Eh(s, i);
809
-
810
- void 0 !== e && (_this6._$Eu.set(e, s), t.push(e));
811
- }), t;
812
- }
813
- }, {
814
- key: "createProperty",
815
- value: function createProperty(t) {
816
- var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : l$3;
597
+ _$AI(t, i = this) {
598
+ t = P(this, t, i), r(t) ? t === w || null == t || "" === t ? (this._$AH !== w && this._$AR(), this._$AH = w) : t !== this._$AH && t !== b && this.$(t) : void 0 !== t._$litType$ ? this.T(t) : void 0 !== t.nodeType ? this.k(t) : u(t) ? this.S(t) : this.$(t);
599
+ }
817
600
 
818
- if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
819
- var _s = "symbol" == _typeof(t) ? Symbol() : "__" + t,
820
- _e = this.getPropertyDescriptor(t, _s, i);
601
+ A(t, i = this._$AB) {
602
+ return this._$AA.parentNode.insertBefore(t, i);
603
+ }
821
604
 
822
- void 0 !== _e && Object.defineProperty(this.prototype, t, _e);
823
- }
824
- }
825
- }, {
826
- key: "getPropertyDescriptor",
827
- value: function getPropertyDescriptor(t, i, s) {
828
- return {
829
- get: function get() {
830
- return this[i];
831
- },
832
- set: function set(e) {
833
- var r = this[t];
834
- this[i] = e, this.requestUpdate(t, r, s);
835
- },
836
- configurable: !0,
837
- enumerable: !0
838
- };
839
- }
840
- }, {
841
- key: "getPropertyOptions",
842
- value: function getPropertyOptions(t) {
843
- return this.elementProperties.get(t) || l$3;
844
- }
845
- }, {
846
- key: "finalize",
847
- value: function finalize() {
848
- if (this.hasOwnProperty("finalized")) return !1;
849
- this.finalized = !0;
850
- var t = Object.getPrototypeOf(this);
605
+ k(t) {
606
+ this._$AH !== t && (this._$AR(), this._$AH = this.A(t));
607
+ }
851
608
 
852
- if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
853
- var _t2 = this.properties,
854
- _i = [].concat(_toConsumableArray(Object.getOwnPropertyNames(_t2)), _toConsumableArray(Object.getOwnPropertySymbols(_t2)));
609
+ $(t) {
610
+ this._$AH !== w && r(this._$AH) ? this._$AA.nextSibling.data = t : this.k(l$2.createTextNode(t)), this._$AH = t;
611
+ }
855
612
 
856
- var _iterator = _createForOfIteratorHelper(_i),
857
- _step;
613
+ T(t) {
614
+ var i;
615
+ const {
616
+ values: s,
617
+ _$litType$: e
618
+ } = t,
619
+ o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = E.createElement(e.h, this.options)), e);
620
+ if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.m(s);else {
621
+ const t = new V(o, this),
622
+ i = t.p(this.options);
623
+ t.m(s), this.k(i), this._$AH = t;
624
+ }
625
+ }
858
626
 
859
- try {
860
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
861
- var _s2 = _step.value;
862
- this.createProperty(_s2, _t2[_s2]);
863
- }
864
- } catch (err) {
865
- _iterator.e(err);
866
- } finally {
867
- _iterator.f();
868
- }
869
- }
627
+ _$AC(t) {
628
+ let i = T.get(t.strings);
629
+ return void 0 === i && T.set(t.strings, i = new E(t)), i;
630
+ }
870
631
 
871
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
872
- }
873
- }, {
874
- key: "finalizeStyles",
875
- value: function finalizeStyles(i) {
876
- var s = [];
632
+ S(t) {
633
+ d(this._$AH) || (this._$AH = [], this._$AR());
634
+ const i = this._$AH;
635
+ let s,
636
+ e = 0;
877
637
 
878
- if (Array.isArray(i)) {
879
- var _e2 = new Set(i.flat(1 / 0).reverse());
638
+ for (const o of t) e === i.length ? i.push(s = new N(this.A(h()), this.A(h()), this, this.options)) : s = i[e], s._$AI(o), e++;
880
639
 
881
- var _iterator2 = _createForOfIteratorHelper(_e2),
882
- _step2;
640
+ e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
641
+ }
883
642
 
884
- try {
885
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
886
- var _i2 = _step2.value;
887
- s.unshift(S$1(_i2));
888
- }
889
- } catch (err) {
890
- _iterator2.e(err);
891
- } finally {
892
- _iterator2.f();
893
- }
894
- } else void 0 !== i && s.push(S$1(i));
643
+ _$AR(t = this._$AA.nextSibling, i) {
644
+ var s;
895
645
 
896
- return s;
897
- }
898
- }, {
899
- key: "_$Eh",
900
- value: function _$Eh(t, i) {
901
- var s = i.attribute;
902
- return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
646
+ for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
647
+ const i = t.nextSibling;
648
+ t.remove(), t = i;
903
649
  }
904
- }]);
650
+ }
905
651
 
906
- return a;
907
- }( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
652
+ setConnected(t) {
653
+ var i;
654
+ void 0 === this._$AM && (this._$Cg = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
655
+ }
908
656
 
909
- a$1.finalized = !0, a$1.elementProperties = new Map(), a$1.elementStyles = [], a$1.shadowRootOptions = {
910
- mode: "open"
911
- }, null == h$1 || h$1({
912
- ReactiveElement: a$1
913
- }), (null !== (s$2 = globalThis.reactiveElementVersions) && void 0 !== s$2 ? s$2 : globalThis.reactiveElementVersions = []).push("1.1.2");
657
+ }
914
658
 
915
- /**
916
- * @license
917
- * Copyright 2017 Google LLC
918
- * SPDX-License-Identifier: BSD-3-Clause
919
- */
920
- var t;
659
+ class S {
660
+ constructor(t, i, s, e, o) {
661
+ this.type = 1, this._$AH = w, 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 = w;
662
+ }
921
663
 
922
- var i = globalThis.trustedTypes,
923
- s$1 = i ? i.createPolicy("lit-html", {
924
- createHTML: function createHTML(t) {
925
- return t;
664
+ get tagName() {
665
+ return this.element.tagName;
926
666
  }
927
- }) : void 0,
928
- e = "lit$".concat((Math.random() + "").slice(9), "$"),
929
- o$1 = "?" + e,
930
- n$1 = "<".concat(o$1, ">"),
931
- l$2 = document,
932
- h = function h() {
933
- var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
934
- return l$2.createComment(t);
935
- },
936
- r = function r(t) {
937
- return null === t || "object" != _typeof(t) && "function" != typeof t;
938
- },
939
- d = Array.isArray,
940
- u = function u(t) {
941
- var i;
942
- return d(t) || "function" == typeof (null === (i = t) || void 0 === i ? void 0 : i[Symbol.iterator]);
943
- },
944
- c = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
945
- v = /-->/g,
946
- a = />/g,
947
- f = />|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,
948
- _ = /'/g,
949
- m = /"/g,
950
- g = /^(?:script|style|textarea)$/i,
951
- p = function p(t) {
952
- return function (i) {
953
- for (var _len = arguments.length, s = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
954
- s[_key - 1] = arguments[_key];
667
+
668
+ get _$AU() {
669
+ return this._$AM._$AU;
670
+ }
671
+
672
+ _$AI(t, i = this, s, e) {
673
+ const o = this.strings;
674
+ let n = !1;
675
+ if (void 0 === o) t = P(this, t, i, 0), n = !r(t) || t !== this._$AH && t !== b, n && (this._$AH = t);else {
676
+ const e = t;
677
+ let l, h;
678
+
679
+ for (t = o[0], l = 0; l < o.length - 1; l++) h = P(this, e[s + l], i, l), h === b && (h = this._$AH[l]), n || (n = !r(h) || h !== this._$AH[l]), h === w ? t = w : t !== w && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
955
680
  }
681
+ n && !e && this.C(t);
682
+ }
956
683
 
957
- return {
958
- _$litType$: t,
959
- strings: i,
960
- values: s
961
- };
962
- };
963
- },
964
- $ = p(1),
965
- y = p(2),
966
- b = Symbol.for("lit-noChange"),
967
- w = Symbol.for("lit-nothing"),
968
- T = new WeakMap(),
969
- x = function x(t, i, s) {
970
- var e, o;
971
- var n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
972
- var l = n._$litPart$;
684
+ C(t) {
685
+ t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
686
+ }
973
687
 
974
- if (void 0 === l) {
975
- var _t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
688
+ }
976
689
 
977
- n._$litPart$ = l = new N(i.insertBefore(h(), _t), _t, void 0, null != s ? s : {});
690
+ class M extends S {
691
+ constructor() {
692
+ super(...arguments), this.type = 3;
978
693
  }
979
694
 
980
- return l._$AI(t), l;
981
- },
982
- A = l$2.createTreeWalker(l$2, 129, null, !1),
983
- C = function C(t, i) {
984
- var o = t.length - 1,
985
- l = [];
986
- var h,
987
- r = 2 === i ? "<svg>" : "",
988
- d = c;
695
+ C(t) {
696
+ this.element[this.name] = t === w ? void 0 : t;
697
+ }
989
698
 
990
- for (var _i = 0; _i < o; _i++) {
991
- var _s = t[_i];
699
+ }
992
700
 
993
- var _o = void 0,
994
- _u = void 0,
995
- _p = -1,
996
- _$ = 0;
701
+ const k = i ? i.emptyScript : "";
997
702
 
998
- for (; _$ < _s.length && (d.lastIndex = _$, _u = d.exec(_s), null !== _u);) {
999
- _$ = d.lastIndex, d === c ? "!--" === _u[1] ? d = v : void 0 !== _u[1] ? d = a : void 0 !== _u[2] ? (g.test(_u[2]) && (h = RegExp("</" + _u[2], "g")), d = f) : void 0 !== _u[3] && (d = f) : d === f ? ">" === _u[0] ? (d = null != h ? h : c, _p = -1) : void 0 === _u[1] ? _p = -2 : (_p = d.lastIndex - _u[2].length, _o = _u[1], d = void 0 === _u[3] ? f : '"' === _u[3] ? m : _) : d === m || d === _ ? d = f : d === v || d === a ? d = c : (d = f, h = void 0);
1000
- }
703
+ class H extends S {
704
+ constructor() {
705
+ super(...arguments), this.type = 4;
706
+ }
707
+
708
+ C(t) {
709
+ t && t !== w ? this.element.setAttribute(this.name, k) : this.element.removeAttribute(this.name);
710
+ }
1001
711
 
1002
- var _y = d === f && t[_i + 1].startsWith("/>") ? " " : "";
712
+ }
1003
713
 
1004
- r += d === c ? _s + n$1 : _p >= 0 ? (l.push(_o), _s.slice(0, _p) + "$lit$" + _s.slice(_p) + e + _y) : _s + e + (-2 === _p ? (l.push(void 0), _i) : _y);
714
+ class I extends S {
715
+ constructor(t, i, s, e, o) {
716
+ super(t, i, s, e, o), this.type = 5;
1005
717
  }
1006
718
 
1007
- var u = r + (t[o] || "<?>") + (2 === i ? "</svg>" : "");
1008
- if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
1009
- return [void 0 !== s$1 ? s$1.createHTML(u) : u, l];
1010
- };
719
+ _$AI(t, i = this) {
720
+ var s;
721
+ if ((t = null !== (s = P(this, t, i, 0)) && void 0 !== s ? s : w) === b) return;
722
+ const e = this._$AH,
723
+ o = t === w && e !== w || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
724
+ n = t !== w && (e === w || o);
725
+ o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
726
+ }
1011
727
 
1012
- var E = /*#__PURE__*/function () {
1013
- function E(_ref, n) {
1014
- var t = _ref.strings,
1015
- s = _ref._$litType$;
728
+ handleEvent(t) {
729
+ var i, s;
730
+ "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);
731
+ }
1016
732
 
1017
- _classCallCheck(this, E);
733
+ }
1018
734
 
1019
- var l;
1020
- this.parts = [];
1021
- var r = 0,
1022
- d = 0;
735
+ class L {
736
+ constructor(t, i, s) {
737
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
738
+ }
1023
739
 
1024
- var u = t.length - 1,
1025
- c = this.parts,
1026
- _C = C(t, s),
1027
- _C2 = _slicedToArray(_C, 2),
1028
- v = _C2[0],
1029
- a = _C2[1];
740
+ get _$AU() {
741
+ return this._$AM._$AU;
742
+ }
1030
743
 
1031
- if (this.el = E.createElement(v, n), A.currentNode = this.el.content, 2 === s) {
1032
- var _t2 = this.el.content,
1033
- _i2 = _t2.firstChild;
1034
- _i2.remove(), _t2.append.apply(_t2, _toConsumableArray(_i2.childNodes));
1035
- }
744
+ _$AI(t) {
745
+ P(this, t);
746
+ }
1036
747
 
1037
- for (; null !== (l = A.nextNode()) && c.length < u;) {
1038
- if (1 === l.nodeType) {
1039
- if (l.hasAttributes()) {
1040
- var _t3 = [];
1041
-
1042
- var _iterator = _createForOfIteratorHelper(l.getAttributeNames()),
1043
- _step;
1044
-
1045
- try {
1046
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
1047
- var _i5 = _step.value;
1048
-
1049
- if (_i5.endsWith("$lit$") || _i5.startsWith(e)) {
1050
- var _s2 = a[d++];
1051
-
1052
- if (_t3.push(_i5), void 0 !== _s2) {
1053
- var _t5 = l.getAttribute(_s2.toLowerCase() + "$lit$").split(e),
1054
- _i6 = /([.?@])?(.*)/.exec(_s2);
1055
-
1056
- c.push({
1057
- type: 1,
1058
- index: r,
1059
- name: _i6[2],
1060
- strings: _t5,
1061
- ctor: "." === _i6[1] ? M : "?" === _i6[1] ? H : "@" === _i6[1] ? I : S
1062
- });
1063
- } else c.push({
1064
- type: 6,
1065
- index: r
1066
- });
1067
- }
1068
- }
1069
- } catch (err) {
1070
- _iterator.e(err);
1071
- } finally {
1072
- _iterator.f();
1073
- }
748
+ }
1074
749
 
1075
- for (var _i3 = 0, _t4 = _t3; _i3 < _t4.length; _i3++) {
1076
- var _i4 = _t4[_i3];
1077
- l.removeAttribute(_i4);
1078
- }
1079
- }
750
+ const z = window.litHtmlPolyfillSupport;
751
+ null == z || z(E, N), (null !== (t = globalThis.litHtmlVersions) && void 0 !== t ? t : globalThis.litHtmlVersions = []).push("2.2.1");
1080
752
 
1081
- if (g.test(l.tagName)) {
1082
- var _t6 = l.textContent.split(e),
1083
- _s3 = _t6.length - 1;
753
+ /**
754
+ * @license
755
+ * Copyright 2017 Google LLC
756
+ * SPDX-License-Identifier: BSD-3-Clause
757
+ */
1084
758
 
1085
- if (_s3 > 0) {
1086
- l.textContent = i ? i.emptyScript : "";
759
+ var l$1, o;
1087
760
 
1088
- for (var _i7 = 0; _i7 < _s3; _i7++) {
1089
- l.append(_t6[_i7], h()), A.nextNode(), c.push({
1090
- type: 2,
1091
- index: ++r
1092
- });
1093
- }
761
+ class s extends a$1 {
762
+ constructor() {
763
+ super(...arguments), this.renderOptions = {
764
+ host: this
765
+ }, this._$Dt = void 0;
766
+ }
1094
767
 
1095
- l.append(_t6[_s3], h());
1096
- }
1097
- }
1098
- } else if (8 === l.nodeType) if (l.data === o$1) c.push({
1099
- type: 2,
1100
- index: r
1101
- });else {
1102
- var _t7 = -1;
768
+ createRenderRoot() {
769
+ var t, e;
770
+ const i = super.createRenderRoot();
771
+ return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;
772
+ }
1103
773
 
1104
- for (; -1 !== (_t7 = l.data.indexOf(e, _t7 + 1));) {
1105
- c.push({
1106
- type: 7,
1107
- index: r
1108
- }), _t7 += e.length - 1;
1109
- }
1110
- }
774
+ update(t) {
775
+ const i = this.render();
776
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Dt = x(i, this.renderRoot, this.renderOptions);
777
+ }
1111
778
 
1112
- r++;
1113
- }
779
+ connectedCallback() {
780
+ var t;
781
+ super.connectedCallback(), null === (t = this._$Dt) || void 0 === t || t.setConnected(!0);
1114
782
  }
1115
783
 
1116
- _createClass(E, null, [{
1117
- key: "createElement",
1118
- value: function createElement(t, i) {
1119
- var s = l$2.createElement("template");
1120
- return s.innerHTML = t, s;
1121
- }
1122
- }]);
784
+ disconnectedCallback() {
785
+ var t;
786
+ super.disconnectedCallback(), null === (t = this._$Dt) || void 0 === t || t.setConnected(!1);
787
+ }
1123
788
 
1124
- return E;
1125
- }();
789
+ render() {
790
+ return b;
791
+ }
1126
792
 
1127
- function P(t, i) {
1128
- var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : t;
1129
- var e = arguments.length > 3 ? arguments[3] : undefined;
1130
- var o, n, l, h;
1131
- if (i === b) return i;
1132
- var d = void 0 !== e ? null === (o = s._$Cl) || void 0 === o ? void 0 : o[e] : s._$Cu;
1133
- var u = r(i) ? void 0 : i._$litDirective$;
1134
- return (null == d ? void 0 : d.constructor) !== u && (null === (n = null == d ? void 0 : d._$AO) || void 0 === n || n.call(d, !1), void 0 === u ? d = void 0 : (d = new u(t), d._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Cl) && void 0 !== l ? l : h._$Cl = [])[e] = d : s._$Cu = d), void 0 !== d && (i = P(t, d._$AS(t, i.values), d, e)), i;
1135
793
  }
1136
794
 
1137
- var V = /*#__PURE__*/function () {
1138
- function V(t, i) {
1139
- _classCallCheck(this, V);
795
+ s.finalized = !0, s._$litElement$ = !0, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, {
796
+ LitElement: s
797
+ });
798
+ const n = globalThis.litElementPolyfillSupport;
799
+ null == n || n({
800
+ LitElement: s
801
+ });
802
+ (null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.2.0");
803
+
804
+ var noop = {
805
+ value: () => {}
806
+ };
1140
807
 
1141
- this.v = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
808
+ function dispatch() {
809
+ for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
810
+ if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
811
+ _[t] = [];
1142
812
  }
1143
813
 
1144
- _createClass(V, [{
1145
- key: "parentNode",
1146
- get: function get() {
1147
- return this._$AM.parentNode;
1148
- }
1149
- }, {
1150
- key: "_$AU",
1151
- get: function get() {
1152
- return this._$AM._$AU;
1153
- }
1154
- }, {
1155
- key: "p",
1156
- value: function p(t) {
1157
- var i;
1158
- var _this$_$AD = this._$AD,
1159
- s = _this$_$AD.el.content,
1160
- e = _this$_$AD.parts,
1161
- o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : l$2).importNode(s, !0);
1162
- A.currentNode = o;
1163
- var n = A.nextNode(),
1164
- h = 0,
1165
- r = 0,
1166
- d = e[0];
814
+ return new Dispatch(_);
815
+ }
1167
816
 
1168
- for (; void 0 !== d;) {
1169
- if (h === d.index) {
1170
- var _i8 = void 0;
817
+ function Dispatch(_) {
818
+ this._ = _;
819
+ }
1171
820
 
1172
- 2 === d.type ? _i8 = new N(n, n.nextSibling, this, t) : 1 === d.type ? _i8 = new d.ctor(n, d.name, d.strings, this, t) : 6 === d.type && (_i8 = new L(n, this, t)), this.v.push(_i8), d = e[++r];
1173
- }
821
+ function parseTypenames$1(typenames, types) {
822
+ return typenames.trim().split(/^|\s+/).map(function (t) {
823
+ var name = "",
824
+ i = t.indexOf(".");
825
+ if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
826
+ if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
827
+ return {
828
+ type: t,
829
+ name: name
830
+ };
831
+ });
832
+ }
1174
833
 
1175
- h !== (null == d ? void 0 : d.index) && (n = A.nextNode(), h++);
1176
- }
834
+ Dispatch.prototype = dispatch.prototype = {
835
+ constructor: Dispatch,
836
+ on: function (typename, callback) {
837
+ var _ = this._,
838
+ T = parseTypenames$1(typename + "", _),
839
+ t,
840
+ i = -1,
841
+ n = T.length; // If no callback was specified, return the callback of the given type and name.
1177
842
 
1178
- return o;
1179
- }
1180
- }, {
1181
- key: "m",
1182
- value: function m(t) {
1183
- var i = 0;
1184
-
1185
- var _iterator2 = _createForOfIteratorHelper(this.v),
1186
- _step2;
1187
-
1188
- try {
1189
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1190
- var _s4 = _step2.value;
1191
- void 0 !== _s4 && (void 0 !== _s4.strings ? (_s4._$AI(t, _s4, i), i += _s4.strings.length - 2) : _s4._$AI(t[i])), i++;
1192
- }
1193
- } catch (err) {
1194
- _iterator2.e(err);
1195
- } finally {
1196
- _iterator2.f();
1197
- }
1198
- }
1199
- }]);
843
+ if (arguments.length < 2) {
844
+ while (++i < n) if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) return t;
1200
845
 
1201
- return V;
1202
- }();
846
+ return;
847
+ } // If a type was specified, set the callback for the given type and name.
848
+ // Otherwise, if a null callback was specified, remove callbacks of the given name.
1203
849
 
1204
- var N = /*#__PURE__*/function () {
1205
- function N(t, i, s, e) {
1206
- _classCallCheck(this, N);
1207
850
 
1208
- var o;
1209
- this.type = 2, this._$AH = w, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cg = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
1210
- }
851
+ if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
1211
852
 
1212
- _createClass(N, [{
1213
- key: "_$AU",
1214
- get: function get() {
1215
- var t, i;
1216
- return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cg;
1217
- }
1218
- }, {
1219
- key: "parentNode",
1220
- get: function get() {
1221
- var t = this._$AA.parentNode;
1222
- var i = this._$AM;
1223
- return void 0 !== i && 11 === t.nodeType && (t = i.parentNode), t;
1224
- }
1225
- }, {
1226
- key: "startNode",
1227
- get: function get() {
1228
- return this._$AA;
1229
- }
1230
- }, {
1231
- key: "endNode",
1232
- get: function get() {
1233
- return this._$AB;
1234
- }
1235
- }, {
1236
- key: "_$AI",
1237
- value: function _$AI(t) {
1238
- var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
1239
- t = P(this, t, i), r(t) ? t === w || null == t || "" === t ? (this._$AH !== w && this._$AR(), this._$AH = w) : t !== this._$AH && t !== b && this.$(t) : void 0 !== t._$litType$ ? this.T(t) : void 0 !== t.nodeType ? this.S(t) : u(t) ? this.A(t) : this.$(t);
1240
- }
1241
- }, {
1242
- key: "M",
1243
- value: function M(t) {
1244
- var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._$AB;
1245
- return this._$AA.parentNode.insertBefore(t, i);
1246
- }
1247
- }, {
1248
- key: "S",
1249
- value: function S(t) {
1250
- this._$AH !== t && (this._$AR(), this._$AH = this.M(t));
1251
- }
1252
- }, {
1253
- key: "$",
1254
- value: function $(t) {
1255
- this._$AH !== w && r(this._$AH) ? this._$AA.nextSibling.data = t : this.S(l$2.createTextNode(t)), this._$AH = t;
1256
- }
1257
- }, {
1258
- key: "T",
1259
- value: function T(t) {
1260
- var i;
1261
- var s = t.values,
1262
- e = t._$litType$,
1263
- o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = E.createElement(e.h, this.options)), e);
1264
- if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.m(s);else {
1265
- var _t8 = new V(o, this),
1266
- _i9 = _t8.p(this.options);
1267
-
1268
- _t8.m(s), this.S(_i9), this._$AH = _t8;
1269
- }
1270
- }
1271
- }, {
1272
- key: "_$AC",
1273
- value: function _$AC(t) {
1274
- var i = T.get(t.strings);
1275
- return void 0 === i && T.set(t.strings, i = new E(t)), i;
1276
- }
1277
- }, {
1278
- key: "A",
1279
- value: function A(t) {
1280
- d(this._$AH) || (this._$AH = [], this._$AR());
1281
- var i = this._$AH;
1282
- var s,
1283
- e = 0;
1284
-
1285
- var _iterator3 = _createForOfIteratorHelper(t),
1286
- _step3;
1287
-
1288
- try {
1289
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
1290
- var _o2 = _step3.value;
1291
- e === i.length ? i.push(s = new N(this.M(h()), this.M(h()), this, this.options)) : s = i[e], s._$AI(_o2), e++;
1292
- }
1293
- } catch (err) {
1294
- _iterator3.e(err);
1295
- } finally {
1296
- _iterator3.f();
1297
- }
1298
-
1299
- e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
1300
- }
1301
- }, {
1302
- key: "_$AR",
1303
- value: function _$AR() {
1304
- var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this._$AA.nextSibling;
1305
- var i = arguments.length > 1 ? arguments[1] : undefined;
1306
- var s;
1307
-
1308
- for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
1309
- var _i10 = t.nextSibling;
1310
- t.remove(), t = _i10;
1311
- }
1312
- }
1313
- }, {
1314
- key: "setConnected",
1315
- value: function setConnected(t) {
1316
- var i;
1317
- void 0 === this._$AM && (this._$Cg = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
1318
- }
1319
- }]);
1320
-
1321
- return N;
1322
- }();
1323
-
1324
- var S = /*#__PURE__*/function () {
1325
- function S(t, i, s, e, o) {
1326
- _classCallCheck(this, S);
1327
-
1328
- this.type = 1, this._$AH = w, 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 = w;
1329
- }
1330
-
1331
- _createClass(S, [{
1332
- key: "tagName",
1333
- get: function get() {
1334
- return this.element.tagName;
1335
- }
1336
- }, {
1337
- key: "_$AU",
1338
- get: function get() {
1339
- return this._$AM._$AU;
1340
- }
1341
- }, {
1342
- key: "_$AI",
1343
- value: function _$AI(t) {
1344
- var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
1345
- var s = arguments.length > 2 ? arguments[2] : undefined;
1346
- var e = arguments.length > 3 ? arguments[3] : undefined;
1347
- var o = this.strings;
1348
- var n = !1;
1349
- if (void 0 === o) t = P(this, t, i, 0), n = !r(t) || t !== this._$AH && t !== b, n && (this._$AH = t);else {
1350
- var _e = t;
1351
-
1352
- var _l, _h;
1353
-
1354
- for (t = o[0], _l = 0; _l < o.length - 1; _l++) {
1355
- _h = P(this, _e[s + _l], i, _l), _h === b && (_h = this._$AH[_l]), n || (n = !r(_h) || _h !== this._$AH[_l]), _h === w ? t = w : t !== w && (t += (null != _h ? _h : "") + o[_l + 1]), this._$AH[_l] = _h;
1356
- }
1357
- }
1358
- n && !e && this.k(t);
1359
- }
1360
- }, {
1361
- key: "k",
1362
- value: function k(t) {
1363
- t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
1364
- }
1365
- }]);
1366
-
1367
- return S;
1368
- }();
1369
-
1370
- var M = /*#__PURE__*/function (_S) {
1371
- _inherits(M, _S);
1372
-
1373
- var _super = _createSuper(M);
1374
-
1375
- function M() {
1376
- var _this;
1377
-
1378
- _classCallCheck(this, M);
1379
-
1380
- _this = _super.apply(this, arguments), _this.type = 3;
1381
- return _this;
1382
- }
1383
-
1384
- _createClass(M, [{
1385
- key: "k",
1386
- value: function k(t) {
1387
- this.element[this.name] = t === w ? void 0 : t;
1388
- }
1389
- }]);
1390
-
1391
- return M;
1392
- }(S);
1393
-
1394
- var _k = i ? i.emptyScript : "";
1395
-
1396
- var H = /*#__PURE__*/function (_S2) {
1397
- _inherits(H, _S2);
1398
-
1399
- var _super2 = _createSuper(H);
1400
-
1401
- function H() {
1402
- var _this2;
1403
-
1404
- _classCallCheck(this, H);
1405
-
1406
- _this2 = _super2.apply(this, arguments), _this2.type = 4;
1407
- return _this2;
1408
- }
1409
-
1410
- _createClass(H, [{
1411
- key: "k",
1412
- value: function k(t) {
1413
- t && t !== w ? this.element.setAttribute(this.name, _k) : this.element.removeAttribute(this.name);
1414
- }
1415
- }]);
1416
-
1417
- return H;
1418
- }(S);
1419
-
1420
- var I = /*#__PURE__*/function (_S3) {
1421
- _inherits(I, _S3);
1422
-
1423
- var _super3 = _createSuper(I);
1424
-
1425
- function I(t, i, s, e, o) {
1426
- var _this3;
1427
-
1428
- _classCallCheck(this, I);
1429
-
1430
- _this3 = _super3.call(this, t, i, s, e, o), _this3.type = 5;
1431
- return _this3;
1432
- }
1433
-
1434
- _createClass(I, [{
1435
- key: "_$AI",
1436
- value: function _$AI(t) {
1437
- var i = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this;
1438
- var s;
1439
- if ((t = null !== (s = P(this, t, i, 0)) && void 0 !== s ? s : w) === b) return;
1440
- var e = this._$AH,
1441
- o = t === w && e !== w || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
1442
- n = t !== w && (e === w || o);
1443
- o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
1444
- }
1445
- }, {
1446
- key: "handleEvent",
1447
- value: function handleEvent(t) {
1448
- var i, s;
1449
- "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);
1450
- }
1451
- }]);
1452
-
1453
- return I;
1454
- }(S);
1455
-
1456
- var L = /*#__PURE__*/function () {
1457
- function L(t, i, s) {
1458
- _classCallCheck(this, L);
1459
-
1460
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
1461
- }
1462
-
1463
- _createClass(L, [{
1464
- key: "_$AU",
1465
- get: function get() {
1466
- return this._$AM._$AU;
1467
- }
1468
- }, {
1469
- key: "_$AI",
1470
- value: function _$AI(t) {
1471
- P(this, t);
1472
- }
1473
- }]);
1474
-
1475
- return L;
1476
- }();
1477
-
1478
- var z = window.litHtmlPolyfillSupport;
1479
- null == z || z(E, N), (null !== (t = globalThis.litHtmlVersions) && void 0 !== t ? t : globalThis.litHtmlVersions = []).push("2.1.1");
1480
-
1481
- /**
1482
- * @license
1483
- * Copyright 2017 Google LLC
1484
- * SPDX-License-Identifier: BSD-3-Clause
1485
- */
1486
-
1487
- var l$1, o;
1488
-
1489
- var s = /*#__PURE__*/function (_t) {
1490
- _inherits(s, _t);
1491
-
1492
- var _super = _createSuper(s);
1493
-
1494
- function s() {
1495
- var _this;
1496
-
1497
- _classCallCheck(this, s);
1498
-
1499
- _this = _super.apply(this, arguments), _this.renderOptions = {
1500
- host: _assertThisInitialized(_this)
1501
- }, _this._$Dt = void 0;
1502
- return _this;
1503
- }
1504
-
1505
- _createClass(s, [{
1506
- key: "createRenderRoot",
1507
- value: function createRenderRoot() {
1508
- var t, e;
1509
-
1510
- var i = _get(_getPrototypeOf(s.prototype), "createRenderRoot", this).call(this);
1511
-
1512
- return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;
1513
- }
1514
- }, {
1515
- key: "update",
1516
- value: function update(t) {
1517
- var i = this.render();
1518
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), _get(_getPrototypeOf(s.prototype), "update", this).call(this, t), this._$Dt = x(i, this.renderRoot, this.renderOptions);
1519
- }
1520
- }, {
1521
- key: "connectedCallback",
1522
- value: function connectedCallback() {
1523
- var t;
1524
- _get(_getPrototypeOf(s.prototype), "connectedCallback", this).call(this), null === (t = this._$Dt) || void 0 === t || t.setConnected(!0);
1525
- }
1526
- }, {
1527
- key: "disconnectedCallback",
1528
- value: function disconnectedCallback() {
1529
- var t;
1530
- _get(_getPrototypeOf(s.prototype), "disconnectedCallback", this).call(this), null === (t = this._$Dt) || void 0 === t || t.setConnected(!1);
1531
- }
1532
- }, {
1533
- key: "render",
1534
- value: function render() {
1535
- return b;
1536
- }
1537
- }]);
1538
-
1539
- return s;
1540
- }(a$1);
1541
-
1542
- s.finalized = !0, s._$litElement$ = !0, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, {
1543
- LitElement: s
1544
- });
1545
- var n = globalThis.litElementPolyfillSupport;
1546
- null == n || n({
1547
- LitElement: s
1548
- });
1549
- (null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.1.1");
1550
-
1551
- var noop = {
1552
- value: function value() {}
1553
- };
1554
-
1555
- function dispatch() {
1556
- for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
1557
- if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
1558
- _[t] = [];
1559
- }
1560
-
1561
- return new Dispatch(_);
1562
- }
1563
-
1564
- function Dispatch(_) {
1565
- this._ = _;
1566
- }
1567
-
1568
- function parseTypenames$1(typenames, types) {
1569
- return typenames.trim().split(/^|\s+/).map(function (t) {
1570
- var name = "",
1571
- i = t.indexOf(".");
1572
- if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
1573
- if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
1574
- return {
1575
- type: t,
1576
- name: name
1577
- };
1578
- });
1579
- }
1580
-
1581
- Dispatch.prototype = dispatch.prototype = {
1582
- constructor: Dispatch,
1583
- on: function on(typename, callback) {
1584
- var _ = this._,
1585
- T = parseTypenames$1(typename + "", _),
1586
- t,
1587
- i = -1,
1588
- n = T.length; // If no callback was specified, return the callback of the given type and name.
1589
-
1590
- if (arguments.length < 2) {
1591
- while (++i < n) {
1592
- if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) return t;
1593
- }
1594
-
1595
- return;
1596
- } // If a type was specified, set the callback for the given type and name.
1597
- // Otherwise, if a null callback was specified, remove callbacks of the given name.
1598
-
1599
-
1600
- if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
1601
-
1602
- while (++i < n) {
1603
- if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback);else if (callback == null) for (t in _) {
1604
- _[t] = set$1(_[t], typename.name, null);
1605
- }
853
+ while (++i < n) {
854
+ if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback);else if (callback == null) for (t in _) _[t] = set$1(_[t], typename.name, null);
1606
855
  }
1607
856
 
1608
857
  return this;
1609
858
  },
1610
- copy: function copy() {
859
+ copy: function () {
1611
860
  var copy = {},
1612
861
  _ = this._;
1613
862
 
1614
- for (var t in _) {
1615
- copy[t] = _[t].slice();
1616
- }
863
+ for (var t in _) copy[t] = _[t].slice();
1617
864
 
1618
865
  return new Dispatch(copy);
1619
866
  },
1620
- call: function call(type, that) {
1621
- if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) {
1622
- args[i] = arguments[i + 2];
1623
- }
867
+ call: function (type, that) {
868
+ if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
1624
869
  if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
1625
870
 
1626
- for (t = this._[type], i = 0, n = t.length; i < n; ++i) {
1627
- t[i].value.apply(that, args);
1628
- }
871
+ for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
1629
872
  },
1630
- apply: function apply(type, that, args) {
873
+ apply: function (type, that, args) {
1631
874
  if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
1632
875
 
1633
- for (var t = this._[type], i = 0, n = t.length; i < n; ++i) {
1634
- t[i].value.apply(that, args);
1635
- }
876
+ for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
1636
877
  }
1637
878
  };
1638
879
 
@@ -1834,16 +1075,16 @@
1834
1075
  }
1835
1076
  EnterNode.prototype = {
1836
1077
  constructor: EnterNode,
1837
- appendChild: function appendChild(child) {
1078
+ appendChild: function (child) {
1838
1079
  return this._parent.insertBefore(child, this._next);
1839
1080
  },
1840
- insertBefore: function insertBefore(child, next) {
1081
+ insertBefore: function (child, next) {
1841
1082
  return this._parent.insertBefore(child, next);
1842
1083
  },
1843
- querySelector: function querySelector(selector) {
1084
+ querySelector: function (selector) {
1844
1085
  return this._parent.querySelector(selector);
1845
1086
  },
1846
- querySelectorAll: function querySelectorAll(selector) {
1087
+ querySelectorAll: function (selector) {
1847
1088
  return this._parent.querySelectorAll(selector);
1848
1089
  }
1849
1090
  };
@@ -1952,8 +1193,7 @@
1952
1193
  if (previous = enterGroup[i0]) {
1953
1194
  if (i0 >= i1) i1 = i0 + 1;
1954
1195
 
1955
- while (!(next = updateGroup[i1]) && ++i1 < dataLength) {
1956
- }
1196
+ while (!(next = updateGroup[i1]) && ++i1 < dataLength);
1957
1197
 
1958
1198
  previous._next = next || null;
1959
1199
  }
@@ -1972,7 +1212,7 @@
1972
1212
  // don’t; we’d rather avoid a gratuitous copy.)
1973
1213
 
1974
1214
  function arraylike(data) {
1975
- return _typeof(data) === "object" && "length" in data ? data // Array, TypedArray, NodeList, array-like
1215
+ return typeof data === "object" && "length" in data ? data // Array, TypedArray, NodeList, array-like
1976
1216
  : Array.from(data); // Map, Set, iterable, string, or anything else
1977
1217
  }
1978
1218
 
@@ -2079,22 +1319,10 @@
2079
1319
  }
2080
1320
 
2081
1321
  function selection_size () {
2082
- var size = 0;
2083
-
2084
- var _iterator = _createForOfIteratorHelper(this),
2085
- _step;
1322
+ let size = 0;
2086
1323
 
2087
- try {
2088
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
2089
- var node = _step.value;
2090
- ++size;
2091
- } // eslint-disable-line no-unused-vars
1324
+ for (const node of this) ++size; // eslint-disable-line no-unused-vars
2092
1325
 
2093
- } catch (err) {
2094
- _iterator.e(err);
2095
- } finally {
2096
- _iterator.f();
2097
- }
2098
1326
 
2099
1327
  return size;
2100
1328
  }
@@ -2231,7 +1459,7 @@
2231
1459
  }
2232
1460
 
2233
1461
  ClassList.prototype = {
2234
- add: function add(name) {
1462
+ add: function (name) {
2235
1463
  var i = this._names.indexOf(name);
2236
1464
 
2237
1465
  if (i < 0) {
@@ -2240,7 +1468,7 @@
2240
1468
  this._node.setAttribute("class", this._names.join(" "));
2241
1469
  }
2242
1470
  },
2243
- remove: function remove(name) {
1471
+ remove: function (name) {
2244
1472
  var i = this._names.indexOf(name);
2245
1473
 
2246
1474
  if (i >= 0) {
@@ -2249,7 +1477,7 @@
2249
1477
  this._node.setAttribute("class", this._names.join(" "));
2250
1478
  }
2251
1479
  },
2252
- contains: function contains(name) {
1480
+ contains: function (name) {
2253
1481
  return this._names.indexOf(name) >= 0;
2254
1482
  }
2255
1483
  };
@@ -2259,9 +1487,7 @@
2259
1487
  i = -1,
2260
1488
  n = names.length;
2261
1489
 
2262
- while (++i < n) {
2263
- list.add(names[i]);
2264
- }
1490
+ while (++i < n) list.add(names[i]);
2265
1491
  }
2266
1492
 
2267
1493
  function classedRemove(node, names) {
@@ -2269,9 +1495,7 @@
2269
1495
  i = -1,
2270
1496
  n = names.length;
2271
1497
 
2272
- while (++i < n) {
2273
- list.remove(names[i]);
2274
- }
1498
+ while (++i < n) list.remove(names[i]);
2275
1499
  }
2276
1500
 
2277
1501
  function classedTrue(names) {
@@ -2300,9 +1524,7 @@
2300
1524
  i = -1,
2301
1525
  n = names.length;
2302
1526
 
2303
- while (++i < n) {
2304
- if (!list.contains(names[i])) return false;
2305
- }
1527
+ while (++i < n) if (!list.contains(names[i])) return false;
2306
1528
 
2307
1529
  return true;
2308
1530
  }
@@ -2497,9 +1719,7 @@
2497
1719
 
2498
1720
  on = value ? onAdd : onRemove;
2499
1721
 
2500
- for (i = 0; i < n; ++i) {
2501
- this.each(on(typenames[i], value, options));
2502
- }
1722
+ for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
2503
1723
 
2504
1724
  return this;
2505
1725
  }
@@ -2534,54 +1754,12 @@
2534
1754
  return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params));
2535
1755
  }
2536
1756
 
2537
- var _marked = /*#__PURE__*/regeneratorRuntime.mark(_callee);
2538
-
2539
- function _callee() {
2540
- var groups, j, m, group, i, n, node;
2541
- return regeneratorRuntime.wrap(function _callee$(_context) {
2542
- while (1) {
2543
- switch (_context.prev = _context.next) {
2544
- case 0:
2545
- groups = this._groups, j = 0, m = groups.length;
2546
-
2547
- case 1:
2548
- if (!(j < m)) {
2549
- _context.next = 13;
2550
- break;
2551
- }
2552
-
2553
- group = groups[j], i = 0, n = group.length;
2554
-
2555
- case 3:
2556
- if (!(i < n)) {
2557
- _context.next = 10;
2558
- break;
2559
- }
2560
-
2561
- if (!(node = group[i])) {
2562
- _context.next = 7;
2563
- break;
2564
- }
2565
-
2566
- _context.next = 7;
2567
- return node;
2568
-
2569
- case 7:
2570
- ++i;
2571
- _context.next = 3;
2572
- break;
2573
-
2574
- case 10:
2575
- ++j;
2576
- _context.next = 1;
2577
- break;
2578
-
2579
- case 13:
2580
- case "end":
2581
- return _context.stop();
2582
- }
1757
+ function* selection_iterator () {
1758
+ for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
1759
+ for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
1760
+ if (node = group[i]) yield node;
2583
1761
  }
2584
- }, _marked, this);
1762
+ }
2585
1763
  }
2586
1764
 
2587
1765
  var root = [null];
@@ -2598,7 +1776,7 @@
2598
1776
  return this;
2599
1777
  }
2600
1778
 
2601
- Selection$1.prototype = selection.prototype = _defineProperty({
1779
+ Selection$1.prototype = selection.prototype = {
2602
1780
  constructor: Selection$1,
2603
1781
  select: selection_select,
2604
1782
  selectAll: selection_selectAll,
@@ -2633,8 +1811,9 @@
2633
1811
  clone: selection_clone,
2634
1812
  datum: selection_datum,
2635
1813
  on: selection_on,
2636
- dispatch: selection_dispatch
2637
- }, Symbol.iterator, _callee);
1814
+ dispatch: selection_dispatch,
1815
+ [Symbol.iterator]: selection_iterator
1816
+ };
2638
1817
 
2639
1818
  function select (selector) {
2640
1819
  return typeof selector === "string" ? new Selection$1([[document.querySelector(selector)]], [document.documentElement]) : new Selection$1([[selector]], root);
@@ -2647,17 +1826,14 @@
2647
1826
  function extend(parent, definition) {
2648
1827
  var prototype = Object.create(parent.prototype);
2649
1828
 
2650
- for (var key in definition) {
2651
- prototype[key] = definition[key];
2652
- }
1829
+ for (var key in definition) prototype[key] = definition[key];
2653
1830
 
2654
1831
  return prototype;
2655
1832
  }
2656
1833
 
2657
1834
  function Color() {}
2658
- var _darker = 0.7;
2659
-
2660
- var _brighter = 1 / _darker;
1835
+ var darker = 0.7;
1836
+ var brighter = 1 / darker;
2661
1837
  var reI = "\\s*([+-]?\\d+)\\s*",
2662
1838
  reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
2663
1839
  reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
@@ -2819,10 +1995,10 @@
2819
1995
  yellowgreen: 0x9acd32
2820
1996
  };
2821
1997
  define(Color, color, {
2822
- copy: function copy(channels) {
1998
+ copy: function (channels) {
2823
1999
  return Object.assign(new this.constructor(), this, channels);
2824
2000
  },
2825
- displayable: function displayable() {
2001
+ displayable: function () {
2826
2002
  return this.rgb().displayable();
2827
2003
  },
2828
2004
  hex: color_formatHex,
@@ -2888,18 +2064,18 @@
2888
2064
  this.opacity = +opacity;
2889
2065
  }
2890
2066
  define(Rgb, rgb, extend(Color, {
2891
- brighter: function brighter(k) {
2892
- k = k == null ? _brighter : Math.pow(_brighter, k);
2067
+ brighter: function (k) {
2068
+ k = k == null ? brighter : Math.pow(brighter, k);
2893
2069
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2894
2070
  },
2895
- darker: function darker(k) {
2896
- k = k == null ? _darker : Math.pow(_darker, k);
2071
+ darker: function (k) {
2072
+ k = k == null ? darker : Math.pow(darker, k);
2897
2073
  return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
2898
2074
  },
2899
- rgb: function rgb() {
2075
+ rgb: function () {
2900
2076
  return this;
2901
2077
  },
2902
- displayable: function displayable() {
2078
+ displayable: function () {
2903
2079
  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;
2904
2080
  },
2905
2081
  hex: rgb_formatHex,
@@ -2966,15 +2142,15 @@
2966
2142
  }
2967
2143
 
2968
2144
  define(Hsl, hsl, extend(Color, {
2969
- brighter: function brighter(k) {
2970
- k = k == null ? _brighter : Math.pow(_brighter, k);
2145
+ brighter: function (k) {
2146
+ k = k == null ? brighter : Math.pow(brighter, k);
2971
2147
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
2972
2148
  },
2973
- darker: function darker(k) {
2974
- k = k == null ? _darker : Math.pow(_darker, k);
2149
+ darker: function (k) {
2150
+ k = k == null ? darker : Math.pow(darker, k);
2975
2151
  return new Hsl(this.h, this.s, this.l * k, this.opacity);
2976
2152
  },
2977
- rgb: function rgb() {
2153
+ rgb: function () {
2978
2154
  var h = this.h % 360 + (this.h < 0) * 360,
2979
2155
  s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
2980
2156
  l = this.l,
@@ -2982,10 +2158,10 @@
2982
2158
  m1 = 2 * l - m2;
2983
2159
  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);
2984
2160
  },
2985
- displayable: function displayable() {
2161
+ displayable: function () {
2986
2162
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
2987
2163
  },
2988
- formatHsl: function formatHsl() {
2164
+ formatHsl: function () {
2989
2165
  var a = this.opacity;
2990
2166
  a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
2991
2167
  return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
@@ -2997,11 +2173,7 @@
2997
2173
  return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
2998
2174
  }
2999
2175
 
3000
- var constant = (function (x) {
3001
- return function () {
3002
- return x;
3003
- };
3004
- });
2176
+ var constant = (x => () => x);
3005
2177
 
3006
2178
  function linear(a, d) {
3007
2179
  return function (t) {
@@ -3118,9 +2290,7 @@
3118
2290
 
3119
2291
 
3120
2292
  return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) {
3121
- for (var i = 0, o; i < b; ++i) {
3122
- s[(o = q[i]).i] = o.x(t);
3123
- }
2293
+ for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
3124
2294
 
3125
2295
  return s.join("");
3126
2296
  });
@@ -3155,7 +2325,7 @@
3155
2325
  /* eslint-disable no-undef */
3156
2326
 
3157
2327
  function parseCss(value) {
3158
- var m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
2328
+ const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
3159
2329
  return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
3160
2330
  }
3161
2331
  function parseSvg(value) {
@@ -3243,9 +2413,7 @@
3243
2413
  n = q.length,
3244
2414
  o;
3245
2415
 
3246
- while (++i < n) {
3247
- s[(o = q[i]).i] = o.x(t);
3248
- }
2416
+ while (++i < n) s[(o = q[i]).i] = o.x(t);
3249
2417
 
3250
2418
  return s.join("");
3251
2419
  };
@@ -3268,8 +2436,8 @@
3268
2436
  clockLast = 0,
3269
2437
  clockNow = 0,
3270
2438
  clockSkew = 0,
3271
- clock = (typeof performance === "undefined" ? "undefined" : _typeof(performance)) === "object" && performance.now ? performance : Date,
3272
- setFrame = (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {
2439
+ clock = typeof performance === "object" && performance.now ? performance : Date,
2440
+ setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {
3273
2441
  setTimeout(f, 17);
3274
2442
  };
3275
2443
  function now() {
@@ -3285,7 +2453,7 @@
3285
2453
  }
3286
2454
  Timer.prototype = timer.prototype = {
3287
2455
  constructor: Timer,
3288
- restart: function restart(callback, delay, time) {
2456
+ restart: function (callback, delay, time) {
3289
2457
  if (typeof callback !== "function") throw new TypeError("callback is not a function");
3290
2458
  time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
3291
2459
 
@@ -3298,7 +2466,7 @@
3298
2466
  this._time = time;
3299
2467
  sleep();
3300
2468
  },
3301
- stop: function stop() {
2469
+ stop: function () {
3302
2470
  if (this._call) {
3303
2471
  this._call = null;
3304
2472
  this._time = Infinity;
@@ -3384,7 +2552,7 @@
3384
2552
  function timeout (callback, delay, time) {
3385
2553
  var t = new Timer();
3386
2554
  delay = delay == null ? 0 : +delay;
3387
- t.restart(function (elapsed) {
2555
+ t.restart(elapsed => {
3388
2556
  t.stop();
3389
2557
  callback(elapsed + delay);
3390
2558
  }, delay, time);
@@ -3528,9 +2696,7 @@
3528
2696
  self.timer.stop();
3529
2697
  delete schedules[id];
3530
2698
 
3531
- for (var i in schedules) {
3532
- return;
3533
- } // eslint-disable-line no-unused-vars
2699
+ for (var i in schedules) return; // eslint-disable-line no-unused-vars
3534
2700
 
3535
2701
 
3536
2702
  delete node.__transition;
@@ -3889,9 +3055,7 @@
3889
3055
  return function () {
3890
3056
  var parent = this.parentNode;
3891
3057
 
3892
- for (var i in this.__transition) {
3893
- if (+i !== id) return;
3894
- }
3058
+ for (var i in this.__transition) if (+i !== id) return;
3895
3059
 
3896
3060
  if (parent) parent.removeChild(this);
3897
3061
  };
@@ -4097,782 +3261,1393 @@
4097
3261
  }
4098
3262
  }
4099
3263
 
4100
- return new Transition(groups, this._parents, name, id1);
4101
- }
3264
+ return new Transition(groups, this._parents, name, id1);
3265
+ }
3266
+
3267
+ function transition_end () {
3268
+ var on0,
3269
+ on1,
3270
+ that = this,
3271
+ id = that._id,
3272
+ size = that.size();
3273
+ return new Promise(function (resolve, reject) {
3274
+ var cancel = {
3275
+ value: reject
3276
+ },
3277
+ end = {
3278
+ value: function () {
3279
+ if (--size === 0) resolve();
3280
+ }
3281
+ };
3282
+ that.each(function () {
3283
+ var schedule = set(this, id),
3284
+ on = schedule.on; // If this node shared a dispatch with the previous node,
3285
+ // just assign the updated shared dispatch and we’re done!
3286
+ // Otherwise, copy-on-write.
3287
+
3288
+ if (on !== on0) {
3289
+ on1 = (on0 = on).copy();
3290
+
3291
+ on1._.cancel.push(cancel);
3292
+
3293
+ on1._.interrupt.push(cancel);
3294
+
3295
+ on1._.end.push(end);
3296
+ }
3297
+
3298
+ schedule.on = on1;
3299
+ }); // The selection was empty, resolve end immediately
3300
+
3301
+ if (size === 0) resolve();
3302
+ });
3303
+ }
3304
+
3305
+ var id = 0;
3306
+ function Transition(groups, parents, name, id) {
3307
+ this._groups = groups;
3308
+ this._parents = parents;
3309
+ this._name = name;
3310
+ this._id = id;
3311
+ }
3312
+ function newId() {
3313
+ return ++id;
3314
+ }
3315
+ var selection_prototype = selection.prototype;
3316
+ Transition.prototype = {
3317
+ constructor: Transition,
3318
+ select: transition_select,
3319
+ selectAll: transition_selectAll,
3320
+ selectChild: selection_prototype.selectChild,
3321
+ selectChildren: selection_prototype.selectChildren,
3322
+ filter: transition_filter,
3323
+ merge: transition_merge,
3324
+ selection: transition_selection,
3325
+ transition: transition_transition,
3326
+ call: selection_prototype.call,
3327
+ nodes: selection_prototype.nodes,
3328
+ node: selection_prototype.node,
3329
+ size: selection_prototype.size,
3330
+ empty: selection_prototype.empty,
3331
+ each: selection_prototype.each,
3332
+ on: transition_on,
3333
+ attr: transition_attr,
3334
+ attrTween: transition_attrTween,
3335
+ style: transition_style,
3336
+ styleTween: transition_styleTween,
3337
+ text: transition_text,
3338
+ textTween: transition_textTween,
3339
+ remove: transition_remove,
3340
+ tween: transition_tween,
3341
+ delay: transition_delay,
3342
+ duration: transition_duration,
3343
+ ease: transition_ease,
3344
+ easeVarying: transition_easeVarying,
3345
+ end: transition_end,
3346
+ [Symbol.iterator]: selection_prototype[Symbol.iterator]
3347
+ };
3348
+
3349
+ function cubicInOut(t) {
3350
+ return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
3351
+ }
3352
+
3353
+ var defaultTiming = {
3354
+ time: null,
3355
+ // Set on use.
3356
+ delay: 0,
3357
+ duration: 250,
3358
+ ease: cubicInOut
3359
+ };
3360
+
3361
+ function inherit(node, id) {
3362
+ var timing;
3363
+
3364
+ while (!(timing = node.__transition) || !(timing = timing[id])) {
3365
+ if (!(node = node.parentNode)) {
3366
+ throw new Error(`transition ${id} not found`);
3367
+ }
3368
+ }
3369
+
3370
+ return timing;
3371
+ }
3372
+
3373
+ function selection_transition (name) {
3374
+ var id, timing;
3375
+
3376
+ if (name instanceof Transition) {
3377
+ id = name._id, name = name._name;
3378
+ } else {
3379
+ id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
3380
+ }
3381
+
3382
+ for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
3383
+ for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
3384
+ if (node = group[i]) {
3385
+ schedule(node, name, id, i, group, timing || inherit(node, id));
3386
+ }
3387
+ }
3388
+ }
3389
+
3390
+ return new Transition(groups, this._parents, name, id);
3391
+ }
3392
+
3393
+ selection.prototype.interrupt = selection_interrupt;
3394
+ selection.prototype.transition = selection_transition;
3395
+
3396
+ let _$6 = t => t,
3397
+ _t$6,
3398
+ _t2$6,
3399
+ _t3,
3400
+ _t4,
3401
+ _t5,
3402
+ _t6,
3403
+ _t7,
3404
+ _t8,
3405
+ _t9;
3406
+ /*
3407
+ DecidablesElement Base Class - Not intended for instantiation!
3408
+ <decidables-element>
3409
+ */
3410
+
3411
+ class DecidablesElement extends s {
3412
+ getComputedStyleValue(property) {
3413
+ return getComputedStyle(this).getPropertyValue(property).trim();
3414
+ }
3415
+
3416
+ firstUpdated(changedProperties) {
3417
+ super.firstUpdated(changedProperties); // Use focus highlighting if keyboard is used at all
3418
+
3419
+ select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', event => {
3420
+ const element = event.currentTarget;
3421
+ select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
3422
+ }).on('keydown.keyboard', event => {
3423
+ const element = event.currentTarget;
3424
+ select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
3425
+ });
3426
+ }
3427
+
3428
+ static get greys() {
3429
+ const grey = '#999999';
3430
+ const greys = {};
3431
+ greys.white = '#ffffff';
3432
+ greys.light75 = interpolateRgb(grey, '#ffffff')(0.75);
3433
+ greys.light50 = interpolateRgb(grey, '#ffffff')(0.5);
3434
+ greys.light25 = interpolateRgb(grey, '#ffffff')(0.25);
3435
+ greys.grey = grey;
3436
+ greys.dark25 = interpolateRgb(grey, '#000000')(0.25);
3437
+ greys.dark50 = interpolateRgb(grey, '#000000')(0.5);
3438
+ greys.dark75 = interpolateRgb(grey, '#000000')(0.75);
3439
+ greys.black = '#000000';
3440
+ return greys;
3441
+ }
3442
+
3443
+ static get shadows() {
3444
+ // Material Design elevation styles
3445
+ // References:
3446
+ // https://github.com/material-components/material-components-web/tree/master/packages/mdc-elevation
3447
+ // https://codepen.io/hanger/pen/yOGvQp
3448
+
3449
+ /* eslint-disable key-spacing, object-curly-newline */
3450
+ return {
3451
+ elevations: [0, 2, 4, 8, 16],
3452
+ baselineColor: '#000000',
3453
+ baselineColorString: '0, 0, 0',
3454
+ inverseBaselineColor: '#FFFFFF',
3455
+ inverseBaselineColorString: '255, 255, 255',
3456
+ opacityUmbra: 0.2,
3457
+ opacityPenumbra: 0.14,
3458
+ opacityAmbient: 0.12,
3459
+ opacityBoost: 0.2,
3460
+ mapUmbra: {
3461
+ // $mdc-elevation-umbra-map
3462
+ 0: {
3463
+ x: 0,
3464
+ y: 0,
3465
+ b: 0,
3466
+ s: 0
3467
+ },
3468
+ // offset-x, offset-y, blur-radius, spread-radius
3469
+ 2: {
3470
+ x: 0,
3471
+ y: 3,
3472
+ b: 1,
3473
+ s: -2
3474
+ },
3475
+ 4: {
3476
+ x: 0,
3477
+ y: 2,
3478
+ b: 4,
3479
+ s: -1
3480
+ },
3481
+ 8: {
3482
+ x: 0,
3483
+ y: 5,
3484
+ b: 5,
3485
+ s: -3
3486
+ },
3487
+ 16: {
3488
+ x: 0,
3489
+ y: 8,
3490
+ b: 10,
3491
+ s: -5
3492
+ }
3493
+ },
3494
+ mapPenumbra: {
3495
+ // $mdc-elevation-penumbra-map
3496
+ 0: {
3497
+ x: 0,
3498
+ y: 0,
3499
+ b: 0,
3500
+ s: 0
3501
+ },
3502
+ // offset-x, offset-y, blur-radius, spread-radius
3503
+ 2: {
3504
+ x: 0,
3505
+ y: 2,
3506
+ b: 2,
3507
+ s: 0
3508
+ },
3509
+ 4: {
3510
+ x: 0,
3511
+ y: 4,
3512
+ b: 5,
3513
+ s: 0
3514
+ },
3515
+ 8: {
3516
+ x: 0,
3517
+ y: 8,
3518
+ b: 10,
3519
+ s: 1
3520
+ },
3521
+ 16: {
3522
+ x: 0,
3523
+ y: 16,
3524
+ b: 24,
3525
+ s: 2
3526
+ }
3527
+ },
3528
+ mapAmbient: {
3529
+ // $mdc-elevation-ambient-map
3530
+ 0: {
3531
+ x: 0,
3532
+ y: 0,
3533
+ b: 0,
3534
+ s: 0
3535
+ },
3536
+ // offset-x, offset-y, blur-radius, spread-radius
3537
+ 2: {
3538
+ x: 0,
3539
+ y: 1,
3540
+ b: 5,
3541
+ s: 0
3542
+ },
3543
+ 4: {
3544
+ x: 0,
3545
+ y: 1,
3546
+ b: 10,
3547
+ s: 0
3548
+ },
3549
+ 8: {
3550
+ x: 0,
3551
+ y: 3,
3552
+ b: 14,
3553
+ s: 2
3554
+ },
3555
+ 16: {
3556
+ x: 0,
3557
+ y: 6,
3558
+ b: 30,
3559
+ s: 5
3560
+ }
3561
+ }
3562
+ };
3563
+ /* eslint-enable key-spacing, object-curly-newline */
3564
+ }
3565
+
3566
+ static cssBoxShadow(elevation, rotate = false, inverse = false) {
3567
+ const umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
3568
+ const penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
3569
+ const ambientO = this.shadows.opacityAmbient + this.shadows.opacityBoost;
3570
+ const umbraC = inverse ? `rgba(${this.shadows.inverseBaselineColorString}, ${umbraO})` : `rgba(${this.shadows.baselineColorString}, ${umbraO})`;
3571
+ const penumbraC = inverse ? `rgba(${this.shadows.inverseBaselineColorString}, ${penumbraO})` : `rgba(${this.shadows.baselineColorString}, ${penumbraO})`;
3572
+ const ambientC = inverse ? `rgba(${this.shadows.inverseBaselineColorString}, ${ambientO})` : `rgba(${this.shadows.baselineColorString}, ${ambientO})`;
3573
+ const umbraM = this.shadows.mapUmbra[elevation];
3574
+ const penumbraM = this.shadows.mapPenumbra[elevation];
3575
+ const ambientM = this.shadows.mapAmbient[elevation];
3576
+ const umbraS = rotate ? `${-umbraM.y}px ${umbraM.y / 2}px ${umbraM.b}px ${umbraM.s}px` : `${umbraM.y / 2}px ${umbraM.y}px ${umbraM.b}px ${umbraM.s}px`;
3577
+ const penumbraS = rotate ? `${-penumbraM.y}px ${penumbraM.y / 2}px ${penumbraM.b}px ${penumbraM.s}px` : `${penumbraM.y / 2}px ${penumbraM.y}px ${penumbraM.b}px ${penumbraM.s}px`;
3578
+ 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`;
3579
+ return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
3580
+ }
3581
+
3582
+ static get svgFilters() {
3583
+ const shadows = DecidablesElement.shadows; // eslint-disable-line prefer-destructuring
3584
+
3585
+ const filters = shadows.elevations.map(z => {
3586
+ return y(_t$6 || (_t$6 = _$6`
3587
+ <filter id=${0} x="-250%" y="-250%" width="600%" height="600%">
3588
+ <feComponentTransfer in="SourceAlpha" result="solid">
3589
+ <feFuncA type="table" tableValues="0 1 1"/>
3590
+ </feComponentTransfer>
3591
+ <feOffset in="solid" result="offU" dx=${0} dy=${0} />
3592
+ <feOffset in="solid" result="offP" dx=${0} dy=${0} />
3593
+ <feOffset in="solid" result="offA" dx=${0} dy=${0} />
3594
+ ${0}
3595
+ ${0}
3596
+ ${0}
3597
+ <feGaussianBlur in=${0} result="blurU" stdDeviation=${0} />
3598
+ <feGaussianBlur in=${0} result="blurP" stdDeviation=${0} />
3599
+ <feGaussianBlur in=${0} result="blurA" stdDeviation=${0} />
3600
+ <feFlood in="SourceGraphic" result="opU" flood-color=${0} flood-opacity=${0} />
3601
+ <feFlood in="SourceGraphic" result="opP" flood-color=${0} flood-opacity=${0} />
3602
+ <feFlood in="SourceGraphic" result="opA" flood-color=${0} flood-opacity=${0} />
3603
+ <feComposite in="opU" in2="blurU" result="shU" operator="in" />
3604
+ <feComposite in="opP" in2="blurP" result="shP" operator="in" />
3605
+ <feComposite in="opA" in2="blurA" result="shA" operator="in" />
3606
+ <feMorphology in="solid" result="smaller" operator="erode" radius="1" />
3607
+ <feComposite in="shU" in2="smaller" result="finalU" operator="out" />
3608
+ <feComposite in="shP" in2="smaller" result="finalP" operator="out" />
3609
+ <feComposite in="shA" in2="smaller" result="finalA" operator="out" />
3610
+ <feMerge>
3611
+ <feMergeNode in="finalU" />
3612
+ <feMergeNode in="finalP" />
3613
+ <feMergeNode in="finalA" />
3614
+ <feMergeNode in="SourceGraphic" />
3615
+ </feMerge>
3616
+ </filter>`), `shadow-${z}`, shadows.mapUmbra[z].y / 2, shadows.mapUmbra[z].y, shadows.mapPenumbra[z].y / 2, shadows.mapPenumbra[z].y, shadows.mapAmbient[z].y / 2, shadows.mapAmbient[z].y, shadows.mapUmbra[z].s === 0 ? y(_t2$6 || (_t2$6 = _$6``)) : y(_t3 || (_t3 = _$6`<feMorphology in="offU" result="spreadU" operator=${0} radius=${0} />`), shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapUmbra[z].s)), shadows.mapPenumbra[z].s === 0 ? y(_t4 || (_t4 = _$6``)) : y(_t5 || (_t5 = _$6`<feMorphology in="offP" result="spreadP" operator=${0} radius=${0} />`), shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapPenumbra[z].s)), shadows.mapAmbient[z].s === 0 ? y(_t6 || (_t6 = _$6``)) : y(_t7 || (_t7 = _$6`<feMorphology in="offA" result="spreadA" operator=${0} radius=${0} />`), shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapAmbient[z].s)), shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU', shadows.mapUmbra[z].b / 2, shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP', shadows.mapPenumbra[z].b / 2, shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA', shadows.mapAmbient[z].b / 2, shadows.baselineColor, shadows.opacityUmbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityPenumbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityAmbient + shadows.opacityBoost);
3617
+ });
3618
+ return y(_t8 || (_t8 = _$6`
3619
+ <svg class="defs">
3620
+ <defs>
3621
+ ${0}
3622
+ </defs>
3623
+ </svg>
3624
+ `), filters);
3625
+ }
3626
+
3627
+ static get styles() {
3628
+ return r$2(_t9 || (_t9 = _$6`
3629
+ :host {
3630
+ ---shadow-0: var(--shadow-0, ${0});
3631
+ ---shadow-2: var(--shadow-2, ${0});
3632
+ ---shadow-4: var(--shadow-4, ${0});
3633
+ ---shadow-8: var(--shadow-8, ${0});
3634
+
3635
+ ---color-background: var(--color-background, ${0});
3636
+ ---color-border: var(--color-border, ${0});
3637
+ ---color-text: var(--color-text, ${0});
3638
+ ---color-text-inverse: var(--color-text-inverse, ${0});
3639
+ ---color-link: var(--color-link, ${0});
3640
+ ---color-element-background: var(--color-element-background, ${0});
3641
+ ---color-element-disabled: var(--color-element-disabled, ${0});
3642
+ ---color-element-enabled: var(--color-element-enabled, ${0});
3643
+ ---color-element-selected: var(--color-element-selected, ${0});
3644
+ ---color-element-border: var(--color-element-border, ${0});
3645
+ ---color-element-emphasis: var(--color-element-emphasis, ${0});
3646
+
3647
+ ---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
3648
+ ---font-family-math: var(--font-family-math, "Source Serif", serif);
3649
+
3650
+ ---transition-duration: var(--transition-duration, 500ms);
3651
+
3652
+ font-family: var(---font-family-base);
3653
+ }
3654
+
3655
+ :host,
3656
+ :host *,
3657
+ :host *::before,
3658
+ :host *::after {
3659
+ box-sizing: border-box;
3660
+ }
3661
+
3662
+ .math-greek {
3663
+ font-family: var(---font-family-math);
3664
+ font-style: normal;
3665
+ }
3666
+
3667
+ .math-num {
3668
+ font-family: var(---font-family-base);
3669
+ font-style: normal;
3670
+ }
3671
+
3672
+ .math-var {
3673
+ font-family: var(---font-family-math);
3674
+ font-style: italic;
3675
+ }
3676
+
3677
+ .defs {
3678
+ display: block;
3679
+
3680
+ width: 0;
3681
+ height: 0;
3682
+ }
3683
+ `), o$3(this.cssBoxShadow(0)), o$3(this.cssBoxShadow(2)), o$3(this.cssBoxShadow(4)), o$3(this.cssBoxShadow(8)), o$3(this.greys.white), o$3(this.greys.light75), o$3(this.greys.dark75), o$3(this.greys.white), o$3(this.greys.dark25), o$3(this.greys.light75), o$3(this.greys.light50), o$3(this.greys.grey), o$3(this.greys.dark25), o$3(this.greys.dark50), o$3(this.greys.dark75));
3684
+ }
3685
+
3686
+ }
3687
+
3688
+ let _$5 = t => t,
3689
+ _t$5,
3690
+ _t2$5;
3691
+ class DecidablesButton extends DecidablesElement {
3692
+ static get properties() {
3693
+ return {
3694
+ disabled: {
3695
+ attribute: 'disabled',
3696
+ type: Boolean,
3697
+ reflect: true
3698
+ }
3699
+ };
3700
+ }
3701
+
3702
+ constructor() {
3703
+ super(); // Attributes
3704
+
3705
+ this.disabled = false;
3706
+ }
3707
+
3708
+ static get styles() {
3709
+ return [super.styles, r$2(_t$5 || (_t$5 = _$5`
3710
+ :host {
3711
+ margin: 0.25rem;
3712
+ }
3713
+
3714
+ button {
3715
+ width: 100%;
3716
+ height: 100%;
3717
+ padding: 0.375rem 0.75rem;
3718
+
3719
+ font-family: var(---font-family-base);
3720
+ font-size: 1.125rem;
3721
+ line-height: 1.5;
3722
+ color: var(---color-text-inverse);
3723
+
3724
+ border: 0;
3725
+ border-radius: 0.25rem;
3726
+ outline: none;
3727
+ }
3728
+
3729
+ button:disabled {
3730
+ background-color: var(--decidables-button-background-color, var(---color-element-disabled));
3731
+ outline: none;
3732
+ box-shadow: none;
3733
+ }
3734
+
3735
+ button:enabled {
3736
+ cursor: pointer;
3737
+
3738
+ background-color: var(--decidables-button-background-color, var(---color-element-enabled));
3739
+ outline: none;
3740
+ box-shadow: var(---shadow-2);
3741
+ }
3742
+
3743
+ button:enabled:hover {
3744
+ outline: none;
3745
+ box-shadow: var(---shadow-4);
3746
+ }
3747
+
3748
+ button:enabled:active {
3749
+ outline: none;
3750
+ box-shadow: var(---shadow-8);
3751
+ }
3752
+
3753
+ :host(.keyboard) button:enabled:focus {
3754
+ outline: none;
3755
+ box-shadow: var(---shadow-4);
3756
+ }
3757
+
3758
+ :host(.keyboard) button:enabled:focus:active {
3759
+ outline: none;
3760
+ box-shadow: var(---shadow-8);
3761
+ }
3762
+ `))];
3763
+ }
3764
+
3765
+ render() {
3766
+ return $(_t2$5 || (_t2$5 = _$5`
3767
+ <button ?disabled=${0}>
3768
+ <slot></slot>
3769
+ </button>
3770
+ `), this.disabled);
3771
+ }
3772
+
3773
+ }
3774
+ customElements.define('decidables-button', DecidablesButton);
3775
+
3776
+ /**
3777
+ * @license
3778
+ * Copyright 2018 Google LLC
3779
+ * SPDX-License-Identifier: BSD-3-Clause
3780
+ */
3781
+
3782
+ const l = l => null != l ? l : w;
3783
+
3784
+ let _$4 = t => t,
3785
+ _t$4,
3786
+ _t2$4;
3787
+ class DecidablesSlider extends DecidablesElement {
3788
+ static get properties() {
3789
+ return {
3790
+ disabled: {
3791
+ attribute: 'disabled',
3792
+ type: Boolean,
3793
+ reflect: true
3794
+ },
3795
+ max: {
3796
+ attribute: 'max',
3797
+ type: Number,
3798
+ reflect: true
3799
+ },
3800
+ min: {
3801
+ attribute: 'min',
3802
+ type: Number,
3803
+ reflect: true
3804
+ },
3805
+ step: {
3806
+ attribute: 'step',
3807
+ type: Number,
3808
+ reflect: true
3809
+ },
3810
+ value: {
3811
+ attribute: 'value',
3812
+ type: Number,
3813
+ reflect: true
3814
+ }
3815
+ };
3816
+ }
3817
+
3818
+ constructor() {
3819
+ super(); // Attributes
3820
+
3821
+ this.disabled = false;
3822
+ this.max = undefined;
3823
+ this.min = undefined;
3824
+ this.step = undefined;
3825
+ this.value = undefined;
3826
+ }
3827
+
3828
+ changed(event) {
3829
+ this.value = event.target.value;
3830
+ this.dispatchEvent(new CustomEvent('change', {
3831
+ detail: {
3832
+ value: this.value
3833
+ },
3834
+ bubbles: true
3835
+ }));
3836
+ }
3837
+
3838
+ inputted(event) {
3839
+ this.value = event.target.value;
3840
+ }
3841
+
3842
+ static get styles() {
3843
+ return [super.styles, r$2(_t$4 || (_t$4 = _$4`
3844
+ :host {
3845
+ ---shadow-2-rotate: var(--shadow-2-rotate, ${0});
3846
+ ---shadow-4-rotate: var(--shadow-4-rotate, ${0});
3847
+ ---shadow-8-rotate: var(--shadow-8-rotate, ${0});
3848
+
3849
+ display: flex;
3850
+
3851
+ flex-direction: column;
3852
+
3853
+ align-items: center;
3854
+ justify-content: center;
3855
+ }
3856
+
3857
+ label {
3858
+ margin: 0.25rem 0.25rem 0;
3859
+ }
3860
+
3861
+ .range {
3862
+ display: inline-block;
3863
+
3864
+ width: 3.5rem;
3865
+ height: 4.75rem;
3866
+ margin: 0 0.25rem 0.25rem;
3867
+ }
3868
+
3869
+ decidables-spinner {
3870
+ --decidables-spinner-input-width: 3.5rem;
3871
+
3872
+ margin: 0 0.25rem 0.25rem;
3873
+ }
3874
+
3875
+ /* Adapted from http://danielstern.ca/range.css/#/ */
3876
+ /* Overall */
3877
+ input[type=range] {
3878
+ width: 4.75rem;
3879
+ height: 3.5rem;
3880
+ padding: 0;
3881
+ margin: 0;
3882
+
3883
+ background-color: unset;
3884
+
3885
+ transform: rotate(-90deg);
3886
+ transform-origin: 2.375rem 2.375rem;
3887
+
3888
+ /* stylelint-disable-next-line property-no-vendor-prefix */
3889
+ -webkit-appearance: none;
3890
+ }
3891
+
3892
+ input[type=range]:enabled {
3893
+ cursor: ns-resize;
3894
+ }
3895
+
3896
+ input[type=range]:focus {
3897
+ outline: none;
3898
+ }
3899
+
3900
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3901
+ input[type=range]::-ms-tooltip {
3902
+ display: none;
3903
+ }
3904
+
3905
+ /* Track */
3906
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3907
+ input[type=range]::-webkit-slider-runnable-track {
3908
+ width: 100%;
3909
+ height: 4px;
3910
+
3911
+ background: var(---color-element-disabled);
3912
+ border: 0;
3913
+ border-radius: 2px;
3914
+ box-shadow: none;
3915
+ }
3916
+
3917
+ input[type=range]:focus::-webkit-slider-runnable-track {
3918
+ background: var(---color-element-disabled);
3919
+ }
3920
+
3921
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3922
+ input[type=range]::-moz-range-track {
3923
+ width: 100%;
3924
+ height: 4px;
3925
+
3926
+ background: var(---color-element-disabled);
3927
+ border: 0;
3928
+ border-radius: 2px;
3929
+ box-shadow: none;
3930
+ }
3931
+
3932
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3933
+ input[type=range]::-ms-track {
3934
+ width: 100%;
3935
+ height: 4px;
3936
+
3937
+ color: transparent;
3938
+
3939
+ background: transparent;
3940
+ border-color: transparent;
3941
+ }
3942
+
3943
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3944
+ input[type=range]::-ms-fill-lower {
3945
+ background: #cccccc;
3946
+ /* background: var(---color-element-disabled); */
3947
+ border: 0;
3948
+ border-radius: 2px;
3949
+ box-shadow: none;
3950
+ }
3951
+
3952
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3953
+ input[type=range]::-ms-fill-upper {
3954
+ background: #cccccc;
3955
+ /* background: var(---color-element-disabled); */
3956
+ border: 0;
3957
+ border-radius: 2px;
3958
+ box-shadow: none;
3959
+ }
3960
+
3961
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3962
+ input[type=range]:focus::-ms-fill-lower {
3963
+ background: var(---color-element-disabled);
3964
+ }
3965
+
3966
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3967
+ input[type=range]:focus::-ms-fill-upper {
3968
+ background: var(---color-element-disabled);
3969
+ }
3970
+
3971
+ /* Thumb */
3972
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
3973
+ input[type=range]::-webkit-slider-thumb {
3974
+ width: 10px;
3975
+ height: 20px;
3976
+ margin-top: -8px;
3977
+
3978
+ border: 0;
3979
+ border-radius: 4px;
3980
+
3981
+ /* stylelint-disable-next-line property-no-vendor-prefix */
3982
+ -webkit-appearance: none;
3983
+ }
3984
+
3985
+ input[type=range]:disabled::-webkit-slider-thumb {
3986
+ background: var(---color-element-disabled);
3987
+ box-shadow: none;
3988
+ }
3989
+
3990
+ input[type=range]:enabled::-webkit-slider-thumb {
3991
+ background: var(---color-element-enabled);
3992
+ box-shadow: var(---shadow-2-rotate);
3993
+ }
3994
+
3995
+ input[type=range]:enabled:hover::-webkit-slider-thumb {
3996
+ box-shadow: var(---shadow-4-rotate);
3997
+ }
3998
+
3999
+ input[type=range]:enabled:active::-webkit-slider-thumb {
4000
+ box-shadow: var(---shadow-8-rotate);
4001
+ }
4002
+
4003
+ :host(.keyboard) input[type=range]:enabled:focus::-webkit-slider-thumb {
4004
+ box-shadow: var(---shadow-4-rotate);
4005
+ }
4006
+
4007
+ :host(.keyboard) input[type=range]:focus:active::-webkit-slider-thumb {
4008
+ box-shadow: var(---shadow-8-rotate);
4009
+ }
4010
+
4011
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
4012
+ input[type=range]::-moz-range-thumb {
4013
+ width: 10px;
4014
+ height: 20px;
4015
+
4016
+ border: 0;
4017
+ border-radius: 4px;
4018
+ }
4019
+
4020
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
4021
+ input[type=range]:disabled::-moz-range-thumb {
4022
+ background: var(---color-element-disabled);
4023
+ box-shadow: none;
4024
+ }
4025
+
4026
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
4027
+ input[type=range]:enabled::-moz-range-thumb {
4028
+ background: var(---color-element-enabled);
4029
+ box-shadow: var(---shadow-2-rotate);
4030
+ }
4031
+
4032
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
4033
+ input[type=range]:enabled:hover::-moz-range-thumb {
4034
+ box-shadow: var(---shadow-4-rotate);
4035
+ }
4036
+
4037
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
4038
+ input[type=range]:enabled:active::-moz-range-thumb {
4039
+ box-shadow: var(---shadow-8-rotate);
4040
+ }
4041
+
4042
+ :host(.keyboard) input[type=range]:enabled:focus::-moz-range-thumb {
4043
+ box-shadow: var(---shadow-4-rotate);
4044
+ }
4045
+
4046
+ :host(.keyboard) input[type=range]:enabled:focus:active::-moz-range-thumb {
4047
+ box-shadow: var(---shadow-8-rotate);
4048
+ }
4049
+
4050
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
4051
+ input[type=range]::-ms-thumb {
4052
+ width: 10px;
4053
+ height: 20px;
4054
+ margin-top: 0;
4055
+
4056
+ background: #999999;
4057
+ /* background: var(---color-element-enabled); */
4058
+ border: 0;
4059
+ border-radius: 4px;
4060
+ box-shadow: var(---shadow-2-rotate);
4061
+ }
4062
+
4063
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
4064
+ input[type=range]:disabled::-ms-thumb {
4065
+ background: var(---color-element-disabled);
4066
+ box-shadow: none;
4067
+ }
4068
+
4069
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
4070
+ input[type=range]:enabled::-ms-thumb {
4071
+ background: var(---color-element-enabled);
4072
+ box-shadow: var(---shadow-2-rotate);
4073
+ }
4074
+
4075
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
4076
+ input[type=range]:enabled:hover::-ms-thumb {
4077
+ box-shadow: var(---shadow-4-rotate);
4078
+ }
4079
+
4080
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
4081
+ input[type=range]:enabled:active::-ms-thumb {
4082
+ box-shadow: var(---shadow-8-rotate);
4083
+ }
4084
+
4085
+ /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */
4086
+ :host(.keyboard) input[type=range]:enabled:focus::-ms-thumb {
4087
+ box-shadow: var(---shadow-4-rotate);
4088
+ }
4089
+
4090
+ :host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {
4091
+ box-shadow: var(---shadow-8-rotate);
4092
+ }
4093
+ `), o$3(this.cssBoxShadow(2, true, false)), o$3(this.cssBoxShadow(4, true, false)), o$3(this.cssBoxShadow(8, true, false)))];
4094
+ }
4095
+
4096
+ render() {
4097
+ return $(_t2$4 || (_t2$4 = _$4`
4098
+ <label for="slider">
4099
+ <slot></slot>
4100
+ </label>
4101
+ <div class="range">
4102
+ <input type="range" id="slider" min=${0} max=${0} step=${0} .value=${0} @change=${0} @input=${0}>
4103
+ </div>
4104
+ <decidables-spinner min=${0} max=${0} step=${0} .value=${0} @input=${0}></decidables-spinner>
4105
+ `), l(this.min), l(this.max), l(this.step), this.value, this.changed.bind(this), this.inputted.bind(this), l(this.min), l(this.max), l(this.step), this.value, this.inputted.bind(this));
4106
+ }
4107
+
4108
+ }
4109
+ customElements.define('decidables-slider', DecidablesSlider);
4110
+
4111
+ let _$3 = t => t,
4112
+ _t$3,
4113
+ _t2$3;
4114
+ class DecidablesSpinner extends DecidablesElement {
4115
+ static get properties() {
4116
+ return {
4117
+ disabled: {
4118
+ attribute: 'disabled',
4119
+ type: Boolean,
4120
+ reflect: true
4121
+ },
4122
+ max: {
4123
+ attribute: 'max',
4124
+ type: Number,
4125
+ reflect: true
4126
+ },
4127
+ min: {
4128
+ attribute: 'min',
4129
+ type: Number,
4130
+ reflect: true
4131
+ },
4132
+ step: {
4133
+ attribute: 'step',
4134
+ type: Number,
4135
+ reflect: true
4136
+ },
4137
+ value: {
4138
+ attribute: 'value',
4139
+ type: Number,
4140
+ reflect: true
4141
+ }
4142
+ };
4143
+ }
4144
+
4145
+ constructor() {
4146
+ super(); // Attributes
4147
+
4148
+ this.disabled = false;
4149
+ this.max = undefined;
4150
+ this.min = undefined;
4151
+ this.step = undefined;
4152
+ this.value = undefined;
4153
+ }
4154
+
4155
+ inputted(event) {
4156
+ this.value = event.target.value;
4157
+ }
4102
4158
 
4103
- function transition_end () {
4104
- var on0,
4105
- on1,
4106
- that = this,
4107
- id = that._id,
4108
- size = that.size();
4109
- return new Promise(function (resolve, reject) {
4110
- var cancel = {
4111
- value: reject
4112
- },
4113
- end = {
4114
- value: function value() {
4115
- if (--size === 0) resolve();
4159
+ static get styles() {
4160
+ return [super.styles, r$2(_t$3 || (_t$3 = _$3`
4161
+ :host {
4162
+ ---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
4163
+ ---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
4164
+ ---decidables-spinner-prefix: var(--decidables-spinner-prefix, "");
4165
+
4166
+ display: block;
4116
4167
  }
4117
- };
4118
- that.each(function () {
4119
- var schedule = set(this, id),
4120
- on = schedule.on; // If this node shared a dispatch with the previous node,
4121
- // just assign the updated shared dispatch and we’re done!
4122
- // Otherwise, copy-on-write.
4123
4168
 
4124
- if (on !== on0) {
4125
- on1 = (on0 = on).copy();
4169
+ label {
4170
+ position: relative;
4171
+ display: flex;
4126
4172
 
4127
- on1._.cancel.push(cancel);
4173
+ flex-direction: column;
4128
4174
 
4129
- on1._.interrupt.push(cancel);
4175
+ align-items: center;
4130
4176
 
4131
- on1._.end.push(end);
4177
+ margin: 0;
4178
+
4179
+ font-size: 0.75rem;
4132
4180
  }
4133
4181
 
4134
- schedule.on = on1;
4135
- }); // The selection was empty, resolve end immediately
4182
+ label::before {
4183
+ position: absolute;
4184
+ bottom: 1px;
4185
+ left: calc(50% - var(---decidables-spinner-input-width) / 2 + 0.25rem);
4136
4186
 
4137
- if (size === 0) resolve();
4138
- });
4139
- }
4187
+ font-size: var(---decidables-spinner-font-size);
4188
+ line-height: normal;
4140
4189
 
4141
- var id = 0;
4142
- function Transition(groups, parents, name, id) {
4143
- this._groups = groups;
4144
- this._parents = parents;
4145
- this._name = name;
4146
- this._id = id;
4147
- }
4148
- function newId() {
4149
- return ++id;
4150
- }
4151
- var selection_prototype = selection.prototype;
4152
- Transition.prototype = _defineProperty({
4153
- constructor: Transition,
4154
- select: transition_select,
4155
- selectAll: transition_selectAll,
4156
- selectChild: selection_prototype.selectChild,
4157
- selectChildren: selection_prototype.selectChildren,
4158
- filter: transition_filter,
4159
- merge: transition_merge,
4160
- selection: transition_selection,
4161
- transition: transition_transition,
4162
- call: selection_prototype.call,
4163
- nodes: selection_prototype.nodes,
4164
- node: selection_prototype.node,
4165
- size: selection_prototype.size,
4166
- empty: selection_prototype.empty,
4167
- each: selection_prototype.each,
4168
- on: transition_on,
4169
- attr: transition_attr,
4170
- attrTween: transition_attrTween,
4171
- style: transition_style,
4172
- styleTween: transition_styleTween,
4173
- text: transition_text,
4174
- textTween: transition_textTween,
4175
- remove: transition_remove,
4176
- tween: transition_tween,
4177
- delay: transition_delay,
4178
- duration: transition_duration,
4179
- ease: transition_ease,
4180
- easeVarying: transition_easeVarying,
4181
- end: transition_end
4182
- }, Symbol.iterator, selection_prototype[Symbol.iterator]);
4190
+ content: var(---decidables-spinner-prefix);
4191
+ }
4183
4192
 
4184
- function cubicInOut(t) {
4185
- return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
4186
- }
4193
+ input[type=number] {
4194
+ width: var(---decidables-spinner-input-width);
4187
4195
 
4188
- var defaultTiming = {
4189
- time: null,
4190
- // Set on use.
4191
- delay: 0,
4192
- duration: 250,
4193
- ease: cubicInOut
4194
- };
4196
+ font-family: var(---font-family-base);
4197
+ font-size: var(---decidables-spinner-font-size);
4198
+ color: inherit;
4199
+ text-align: right;
4195
4200
 
4196
- function inherit(node, id) {
4197
- var timing;
4201
+ background: none;
4202
+ border: 0;
4203
+ border-radius: 0;
4204
+ outline: none;
4205
+ box-shadow: var(---shadow-2);
4198
4206
 
4199
- while (!(timing = node.__transition) || !(timing = timing[id])) {
4200
- if (!(node = node.parentNode)) {
4201
- throw new Error("transition ".concat(id, " not found"));
4202
- }
4207
+ -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
4208
+ }
4209
+
4210
+ input[type=number]:hover {
4211
+ box-shadow: var(---shadow-4);
4212
+ }
4213
+
4214
+ input[type=number]:focus,
4215
+ input[type=number]:active {
4216
+ box-shadow: var(---shadow-8);
4217
+ }
4218
+
4219
+ input[type=number]:disabled {
4220
+ color: var(---color-text);
4221
+
4222
+ border: 0;
4223
+ box-shadow: none;
4224
+
4225
+ /* HACK: Use correct text color in Safari */
4226
+ -webkit-opacity: 1;
4227
+ /* HACK: Hide spinners in disabled input for Firefox and Safari */
4228
+ -moz-appearance: textfield; /* stylelint-disable-line property-no-vendor-prefix */
4229
+ /* HACK: Use correct text color in Safari */
4230
+ -webkit-text-fill-color: var(---color-text);
4231
+ }
4232
+
4233
+ /* HACK: Hide spinners in disabled input for Firefox and Safari */
4234
+ input[type=number]:disabled::-webkit-outer-spin-button,
4235
+ input[type=number]:disabled::-webkit-inner-spin-button {
4236
+ margin: 0;
4237
+ -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
4238
+ }
4239
+ `))];
4240
+ }
4241
+
4242
+ render() {
4243
+ return $(_t2$3 || (_t2$3 = _$3`
4244
+ <label>
4245
+ <slot></slot>
4246
+ <input ?disabled=${0} type="number" min=${0} max=${0} step=${0} .value=${0} @input=${0}>
4247
+ </label>
4248
+ `), this.disabled, l(this.min), l(this.max), l(this.step), this.value, this.inputted.bind(this));
4203
4249
  }
4204
4250
 
4205
- return timing;
4206
4251
  }
4252
+ customElements.define('decidables-spinner', DecidablesSpinner);
4207
4253
 
4208
- function selection_transition (name) {
4209
- var id, timing;
4254
+ let _$2 = t => t,
4255
+ _t$2,
4256
+ _t2$2;
4257
+ class DecidablesSwitch extends DecidablesElement {
4258
+ static get properties() {
4259
+ return {
4260
+ checked: {
4261
+ attribute: 'checked',
4262
+ type: Boolean,
4263
+ reflect: true
4264
+ },
4265
+ disabled: {
4266
+ attribute: 'disabled',
4267
+ type: Boolean,
4268
+ reflect: true
4269
+ }
4270
+ };
4271
+ }
4210
4272
 
4211
- if (name instanceof Transition) {
4212
- id = name._id, name = name._name;
4213
- } else {
4214
- id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
4273
+ constructor() {
4274
+ super(); // Attributes
4275
+
4276
+ this.checked = false;
4277
+ this.disabled = false;
4215
4278
  }
4216
4279
 
4217
- for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
4218
- for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
4219
- if (node = group[i]) {
4220
- schedule(node, name, id, i, group, timing || inherit(node, id));
4221
- }
4222
- }
4280
+ changed(event) {
4281
+ this.checked = event.target.checked;
4282
+ this.dispatchEvent(new CustomEvent('change', {
4283
+ detail: {
4284
+ checked: this.checked
4285
+ },
4286
+ bubbles: true
4287
+ }));
4223
4288
  }
4224
4289
 
4225
- return new Transition(groups, this._parents, name, id);
4226
- }
4290
+ static get styles() {
4291
+ return [super.styles, r$2(_t$2 || (_t$2 = _$2`
4292
+ :host {
4293
+ display: flex;
4227
4294
 
4228
- selection.prototype.interrupt = selection_interrupt;
4229
- selection.prototype.transition = selection_transition;
4295
+ flex-direction: column;
4230
4296
 
4231
- var _templateObject$6, _templateObject2$6, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
4232
- /*
4233
- DecidablesElement Base Class - Not intended for instantiation!
4234
- <decidables-element>
4235
- */
4297
+ align-items: center;
4298
+ justify-content: center;
4299
+ }
4300
+
4301
+ /* Adapted from https://codepen.io/guuslieben/pen/YyPRVP */
4302
+ input[type=checkbox] {
4303
+ /* visuallyhidden: https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/css.md */
4304
+ position: absolute;
4236
4305
 
4237
- var DecidablesElement = /*#__PURE__*/function (_LitElement) {
4238
- _inherits(DecidablesElement, _LitElement);
4306
+ width: 1px;
4307
+ height: 1px;
4308
+ padding: 0;
4309
+ margin: -1px;
4310
+ overflow: hidden;
4311
+ clip: rect(0 0 0 0);
4239
4312
 
4240
- var _super = _createSuper(DecidablesElement);
4313
+ white-space: nowrap;
4241
4314
 
4242
- function DecidablesElement() {
4243
- var _this;
4315
+ border: 0;
4316
+ clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
4317
+ }
4244
4318
 
4245
- _classCallCheck(this, DecidablesElement);
4319
+ input[type=checkbox] + label {
4320
+ order: 1;
4246
4321
 
4247
- _this = _super.call(this);
4248
- _this.uniqueId = "decidables-".concat(DecidablesElement.uniqueId);
4249
- return _this;
4250
- }
4322
+ margin: 0 0.25rem 0.25rem;
4251
4323
 
4252
- _createClass(DecidablesElement, [{
4253
- key: "getComputedStyleValue",
4254
- value: function getComputedStyleValue(property) {
4255
- // HACK: IE11 requires use of polyfill interface to get custom property value in Javascript
4256
- if (window.ShadyCSS) {
4257
- return window.ShadyCSS.getComputedStyleValue(this, property);
4324
+ font-weight: 400;
4258
4325
  }
4259
4326
 
4260
- return getComputedStyle(this).getPropertyValue(property);
4261
- }
4262
- }, {
4263
- key: "firstUpdated",
4264
- value: function firstUpdated(changedProperties) {
4265
- _get(_getPrototypeOf(DecidablesElement.prototype), "firstUpdated", this).call(this, changedProperties); // Use focus highlighting if keyboard is used at all
4266
-
4267
-
4268
- select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', function (event) {
4269
- var element = event.currentTarget;
4270
- select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
4271
- }).on('keydown.keyboard', function (event) {
4272
- var element = event.currentTarget;
4273
- select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
4274
- });
4275
- }
4276
- }], [{
4277
- key: "uniqueId",
4278
- get: // HACK: Create a unique ID for each DecidablesElement
4279
- // This is needed because Edge/IE11 don't have real Shadow DOM, so IDs leak
4280
- // out of elements and collide if there is more than one of an element on a
4281
- // page. Known issue for checkbox/switches and the id/for pattern on <input>
4282
- // and <label>
4283
- function get() {
4284
- DecidablesElement.ID += 1;
4285
- return DecidablesElement.ID;
4286
- }
4287
- }, {
4288
- key: "greys",
4289
- get: function get() {
4290
- var grey = '#999999';
4291
- var greys = {};
4292
- greys.white = '#ffffff';
4293
- greys.light75 = interpolateRgb(grey, '#ffffff')(0.75);
4294
- greys.light50 = interpolateRgb(grey, '#ffffff')(0.5);
4295
- greys.light25 = interpolateRgb(grey, '#ffffff')(0.25);
4296
- greys.grey = grey;
4297
- greys.dark25 = interpolateRgb(grey, '#000000')(0.25);
4298
- greys.dark50 = interpolateRgb(grey, '#000000')(0.5);
4299
- greys.dark75 = interpolateRgb(grey, '#000000')(0.75);
4300
- greys.black = '#000000';
4301
- return greys;
4302
- }
4303
- }, {
4304
- key: "shadows",
4305
- get: function get() {
4306
- // Material Design elevation styles
4307
- // References:
4308
- // https://github.com/material-components/material-components-web/tree/master/packages/mdc-elevation
4309
- // https://codepen.io/hanger/pen/yOGvQp
4310
-
4311
- /* eslint-disable key-spacing, object-curly-newline */
4312
- return {
4313
- elevations: [0, 2, 4, 8, 16],
4314
- baselineColor: '#000000',
4315
- baselineColorString: '0, 0, 0',
4316
- inverseBaselineColor: '#FFFFFF',
4317
- inverseBaselineColorString: '255, 255, 255',
4318
- opacityUmbra: 0.2,
4319
- opacityPenumbra: 0.14,
4320
- opacityAmbient: 0.12,
4321
- opacityBoost: 0.2,
4322
- mapUmbra: {
4323
- // $mdc-elevation-umbra-map
4324
- 0: {
4325
- x: 0,
4326
- y: 0,
4327
- b: 0,
4328
- s: 0
4329
- },
4330
- // offset-x, offset-y, blur-radius, spread-radius
4331
- 2: {
4332
- x: 0,
4333
- y: 3,
4334
- b: 1,
4335
- s: -2
4336
- },
4337
- 4: {
4338
- x: 0,
4339
- y: 2,
4340
- b: 4,
4341
- s: -1
4342
- },
4343
- 8: {
4344
- x: 0,
4345
- y: 5,
4346
- b: 5,
4347
- s: -3
4348
- },
4349
- 16: {
4350
- x: 0,
4351
- y: 8,
4352
- b: 10,
4353
- s: -5
4354
- }
4355
- },
4356
- mapPenumbra: {
4357
- // $mdc-elevation-penumbra-map
4358
- 0: {
4359
- x: 0,
4360
- y: 0,
4361
- b: 0,
4362
- s: 0
4363
- },
4364
- // offset-x, offset-y, blur-radius, spread-radius
4365
- 2: {
4366
- x: 0,
4367
- y: 2,
4368
- b: 2,
4369
- s: 0
4370
- },
4371
- 4: {
4372
- x: 0,
4373
- y: 4,
4374
- b: 5,
4375
- s: 0
4376
- },
4377
- 8: {
4378
- x: 0,
4379
- y: 8,
4380
- b: 10,
4381
- s: 1
4382
- },
4383
- 16: {
4384
- x: 0,
4385
- y: 16,
4386
- b: 24,
4387
- s: 2
4388
- }
4389
- },
4390
- mapAmbient: {
4391
- // $mdc-elevation-ambient-map
4392
- 0: {
4393
- x: 0,
4394
- y: 0,
4395
- b: 0,
4396
- s: 0
4397
- },
4398
- // offset-x, offset-y, blur-radius, spread-radius
4399
- 2: {
4400
- x: 0,
4401
- y: 1,
4402
- b: 5,
4403
- s: 0
4404
- },
4405
- 4: {
4406
- x: 0,
4407
- y: 1,
4408
- b: 10,
4409
- s: 0
4410
- },
4411
- 8: {
4412
- x: 0,
4413
- y: 3,
4414
- b: 14,
4415
- s: 2
4416
- },
4417
- 16: {
4418
- x: 0,
4419
- y: 6,
4420
- b: 30,
4421
- s: 5
4422
- }
4423
- }
4424
- };
4425
- /* eslint-enable key-spacing, object-curly-newline */
4426
- }
4427
- }, {
4428
- key: "cssBoxShadow",
4429
- value: function cssBoxShadow(elevation) {
4430
- var rotate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
4431
- var inverse = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
4432
- var umbraO = this.shadows.opacityUmbra + this.shadows.opacityBoost;
4433
- var penumbraO = this.shadows.opacityPenumbra + this.shadows.opacityBoost;
4434
- var ambientO = this.shadows.opacityAmbient + this.shadows.opacityBoost;
4435
- var umbraC = inverse ? "rgba(".concat(this.shadows.inverseBaselineColorString, ", ").concat(umbraO, ")") : "rgba(".concat(this.shadows.baselineColorString, ", ").concat(umbraO, ")");
4436
- var penumbraC = inverse ? "rgba(".concat(this.shadows.inverseBaselineColorString, ", ").concat(penumbraO, ")") : "rgba(".concat(this.shadows.baselineColorString, ", ").concat(penumbraO, ")");
4437
- var ambientC = inverse ? "rgba(".concat(this.shadows.inverseBaselineColorString, ", ").concat(ambientO, ")") : "rgba(".concat(this.shadows.baselineColorString, ", ").concat(ambientO, ")");
4438
- var umbraM = this.shadows.mapUmbra[elevation];
4439
- var penumbraM = this.shadows.mapPenumbra[elevation];
4440
- var ambientM = this.shadows.mapAmbient[elevation];
4441
- var umbraS = rotate ? "".concat(-umbraM.y, "px ").concat(umbraM.y / 2, "px ").concat(umbraM.b, "px ").concat(umbraM.s, "px") : "".concat(umbraM.y / 2, "px ").concat(umbraM.y, "px ").concat(umbraM.b, "px ").concat(umbraM.s, "px");
4442
- var penumbraS = rotate ? "".concat(-penumbraM.y, "px ").concat(penumbraM.y / 2, "px ").concat(penumbraM.b, "px ").concat(penumbraM.s, "px") : "".concat(penumbraM.y / 2, "px ").concat(penumbraM.y, "px ").concat(penumbraM.b, "px ").concat(penumbraM.s, "px");
4443
- var ambientS = rotate ? "".concat(-ambientM.y, "px ").concat(ambientM.y / 2, "px ").concat(ambientM.b, "px ").concat(ambientM.s, "px") : "".concat(ambientM.y / 2, "px ").concat(ambientM.y, "px ").concat(ambientM.b, "px ").concat(ambientM.s, "px");
4444
- return "".concat(umbraS, " ").concat(umbraC, ", ").concat(penumbraS, " ").concat(penumbraC, ", ").concat(ambientS, " ").concat(ambientC);
4445
- }
4446
- }, {
4447
- key: "svgFilters",
4448
- get: function get() {
4449
- var shadows = DecidablesElement.shadows; // eslint-disable-line prefer-destructuring
4450
-
4451
- var erodeRadius = 1;
4452
- var filters = shadows.elevations.map(function (z) {
4453
- return y(_templateObject$6 || (_templateObject$6 = _taggedTemplateLiteral(["\n <filter id=", " x=\"-250%\" y=\"-250%\" width=\"600%\" height=\"600%\">\n <feComponentTransfer in=\"SourceAlpha\" result=\"solid\">\n <feFuncA type=\"table\" tableValues=\"0 1 1\"/>\n </feComponentTransfer>\n <feOffset in=\"solid\" result=\"offU\" dx=", " dy=", " />\n <feOffset in=\"solid\" result=\"offP\" dx=", " dy=", " />\n <feOffset in=\"solid\" result=\"offA\" dx=", " dy=", " />\n ", "\n ", "\n ", "\n <feGaussianBlur in=", " result=\"blurU\" stdDeviation=", " />\n <feGaussianBlur in=", " result=\"blurP\" stdDeviation=", " />\n <feGaussianBlur in=", " result=\"blurA\" stdDeviation=", " />\n <feFlood in=\"SourceGraphic\" result=\"opU\" flood-color=", " flood-opacity=", " />\n <feFlood in=\"SourceGraphic\" result=\"opP\" flood-color=", " flood-opacity=", " />\n <feFlood in=\"SourceGraphic\" result=\"opA\" flood-color=", " flood-opacity=", " />\n <feComposite in=\"opU\" in2=\"blurU\" result=\"shU\" operator=\"in\" />\n <feComposite in=\"opP\" in2=\"blurP\" result=\"shP\" operator=\"in\" />\n <feComposite in=\"opA\" in2=\"blurA\" result=\"shA\" operator=\"in\" />\n <!-- HACK Edge: Using a dynamic value for erode radius stops Edge from corrupting the \"radius\" value! -->\n <feMorphology in=\"solid\" result=\"smaller\" operator=\"erode\" radius=", " />\n <feComposite in=\"shU\" in2=\"smaller\" result=\"finalU\" operator=\"out\" />\n <feComposite in=\"shP\" in2=\"smaller\" result=\"finalP\" operator=\"out\" />\n <feComposite in=\"shA\" in2=\"smaller\" result=\"finalA\" operator=\"out\" />\n <feMerge>\n <feMergeNode in=\"finalU\" />\n <feMergeNode in=\"finalP\" />\n <feMergeNode in=\"finalA\" />\n <feMergeNode in=\"SourceGraphic\" />\n </feMerge>\n </filter>"])), "shadow-".concat(z), shadows.mapUmbra[z].y / 2, shadows.mapUmbra[z].y, shadows.mapPenumbra[z].y / 2, shadows.mapPenumbra[z].y, shadows.mapAmbient[z].y / 2, shadows.mapAmbient[z].y, shadows.mapUmbra[z].s === 0 ? y(_templateObject2$6 || (_templateObject2$6 = _taggedTemplateLiteral([""]))) : y(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["<feMorphology in=\"offU\" result=\"spreadU\" operator=", " radius=", " />"])), shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapUmbra[z].s)), shadows.mapPenumbra[z].s === 0 ? y(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral([""]))) : y(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["<feMorphology in=\"offP\" result=\"spreadP\" operator=", " radius=", " />"])), shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapPenumbra[z].s)), shadows.mapAmbient[z].s === 0 ? y(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral([""]))) : y(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["<feMorphology in=\"offA\" result=\"spreadA\" operator=", " radius=", " />"])), shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode', Math.abs(shadows.mapAmbient[z].s)), shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU', shadows.mapUmbra[z].b / 2, shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP', shadows.mapPenumbra[z].b / 2, shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA', shadows.mapAmbient[z].b / 2, shadows.baselineColor, shadows.opacityUmbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityPenumbra + shadows.opacityBoost, shadows.baselineColor, shadows.opacityAmbient + shadows.opacityBoost, erodeRadius);
4454
- });
4455
- return y(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n <svg class=\"defs\">\n <defs>\n ", "\n </defs>\n </svg>\n "])), filters);
4456
- }
4457
- }, {
4458
- key: "styles",
4459
- get: function get() {
4460
- return r$2(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n :host {\n ---shadow-0: var(--shadow-0, ", ");\n ---shadow-2: var(--shadow-2, ", ");\n ---shadow-4: var(--shadow-4, ", ");\n ---shadow-8: var(--shadow-8, ", ");\n\n ---color-background: var(--color-background, ", ");\n ---color-border: var(--color-border, ", ");\n ---color-text: var(--color-text, ", ");\n ---color-text-inverse: var(--color-text-inverse, ", ");\n ---color-link: var(--color-link, ", ");\n ---color-element-background: var(--color-element-background, ", ");\n ---color-element-disabled: var(--color-element-disabled, ", ");\n ---color-element-enabled: var(--color-element-enabled, ", ");\n ---color-element-selected: var(--color-element-selected, ", ");\n ---color-element-border: var(--color-element-border, ", ");\n ---color-element-emphasis: var(--color-element-emphasis, ", ");\n\n ---font-family-base: var(--font-family-base, \"Source Sans\", sans-serif);\n ---font-family-math: var(--font-family-math, \"Source Serif\", serif);\n\n ---transition-duration: var(--transition-duration, 500ms);\n\n font-family: var(---font-family-base);\n }\n\n :host,\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: border-box;\n }\n\n .math-greek {\n font-family: var(---font-family-math);\n font-style: normal;\n }\n\n .math-num {\n font-family: var(---font-family-base);\n font-style: normal;\n }\n\n .math-var {\n font-family: var(---font-family-math);\n font-style: italic;\n }\n\n .defs {\n display: block;\n\n width: 0;\n height: 0;\n }\n "])), o$3(this.cssBoxShadow(0)), o$3(this.cssBoxShadow(2)), o$3(this.cssBoxShadow(4)), o$3(this.cssBoxShadow(8)), o$3(this.greys.white), o$3(this.greys.light75), o$3(this.greys.dark75), o$3(this.greys.white), o$3(this.greys.dark25), o$3(this.greys.light75), o$3(this.greys.light50), o$3(this.greys.grey), o$3(this.greys.dark25), o$3(this.greys.dark50), o$3(this.greys.dark75));
4461
- }
4462
- }]);
4327
+ input[type=checkbox] + label + label {
4328
+ position: relative;
4463
4329
 
4464
- return DecidablesElement;
4465
- }(s); // Static property of DecidablesElement!
4466
- DecidablesElement.ID = 0;
4330
+ min-width: 24px;
4331
+ padding: 0 0 36px;
4332
+ margin: 0.25rem 0.25rem 0;
4467
4333
 
4468
- var _templateObject$5, _templateObject2$5;
4334
+ font-weight: 400;
4469
4335
 
4470
- var DecidablesButton = /*#__PURE__*/function (_DecidablesElement) {
4471
- _inherits(DecidablesButton, _DecidablesElement);
4336
+ outline: none;
4337
+ }
4472
4338
 
4473
- var _super = _createSuper(DecidablesButton);
4339
+ input[type=checkbox] + label + label::before,
4340
+ input[type=checkbox] + label + label::after {
4341
+ position: absolute;
4474
4342
 
4475
- function DecidablesButton() {
4476
- var _this;
4343
+ left: 50%;
4477
4344
 
4478
- _classCallCheck(this, DecidablesButton);
4345
+ margin: 0;
4479
4346
 
4480
- _this = _super.call(this); // Attributes
4347
+ content: "";
4481
4348
 
4482
- _this.disabled = false;
4483
- return _this;
4484
- }
4349
+ outline: 0;
4485
4350
 
4486
- _createClass(DecidablesButton, [{
4487
- key: "render",
4488
- value: function render() {
4489
- return $(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n <button ?disabled=", ">\n <slot></slot>\n </button>\n "])), this.disabled);
4490
- }
4491
- }], [{
4492
- key: "properties",
4493
- get: function get() {
4494
- return {
4495
- disabled: {
4496
- attribute: 'disabled',
4497
- type: Boolean,
4498
- reflect: true
4499
- }
4500
- };
4501
- }
4502
- }, {
4503
- key: "styles",
4504
- get: function get() {
4505
- return [_get(_getPrototypeOf(DecidablesButton), "styles", this), r$2(_templateObject2$5 || (_templateObject2$5 = _taggedTemplateLiteral(["\n :host {\n margin: 0.25rem;\n }\n\n button {\n width: 100%;\n height: 100%;\n padding: 0.375rem 0.75rem;\n\n font-family: var(---font-family-base);\n font-size: 1.125rem;\n line-height: 1.5;\n color: var(---color-text-inverse);\n\n border: 0;\n border-radius: 0.25rem;\n outline: none;\n }\n\n button:disabled {\n background-color: var(--decidables-button-background-color, var(---color-element-disabled));\n outline: none;\n box-shadow: none;\n }\n\n button:enabled {\n cursor: pointer;\n\n background-color: var(--decidables-button-background-color, var(---color-element-enabled));\n outline: none;\n box-shadow: var(---shadow-2);\n }\n\n button:enabled:hover {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n button:enabled:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n\n :host(.keyboard) button:enabled:focus {\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) button:enabled:focus:active {\n outline: none;\n box-shadow: var(---shadow-8);\n }\n "])))];
4506
- }
4507
- }]);
4351
+ transition: all var(---transition-duration) ease;
4352
+ transform: translate(-50%, 0);
4353
+ }
4508
4354
 
4509
- return DecidablesButton;
4510
- }(DecidablesElement);
4511
- customElements.define('decidables-button', DecidablesButton);
4355
+ input[type=checkbox] + label + label::before {
4356
+ bottom: 1px;
4512
4357
 
4513
- /**
4514
- * @license
4515
- * Copyright 2018 Google LLC
4516
- * SPDX-License-Identifier: BSD-3-Clause
4517
- */
4358
+ width: 8px;
4359
+ height: 34px;
4518
4360
 
4519
- var l = function l(_l) {
4520
- return null != _l ? _l : w;
4521
- };
4361
+ background-color: var(---color-element-disabled);
4362
+ border-radius: 4px;
4363
+ }
4364
+
4365
+ input[type=checkbox] + label + label::after {
4366
+ bottom: 0;
4522
4367
 
4523
- var _templateObject$4, _templateObject2$4;
4368
+ width: 18px;
4369
+ height: 18px;
4370
+
4371
+ background-color: var(---color-element-enabled);
4372
+ border-radius: 50%;
4373
+ box-shadow: var(---shadow-2);
4374
+ }
4375
+
4376
+ input[type=checkbox]:checked + label + label::after {
4377
+ transform: translate(-50%, -100%);
4378
+ }
4524
4379
 
4525
- var DecidablesSlider = /*#__PURE__*/function (_DecidablesElement) {
4526
- _inherits(DecidablesSlider, _DecidablesElement);
4380
+ input[type=checkbox]:disabled + label + label::after {
4381
+ background-color: var(---color-element-disabled);
4382
+ box-shadow: none;
4383
+ }
4527
4384
 
4528
- var _super = _createSuper(DecidablesSlider);
4385
+ input[type=checkbox]:enabled + label,
4386
+ input[type=checkbox]:enabled + label + label {
4387
+ cursor: pointer;
4388
+ }
4529
4389
 
4530
- function DecidablesSlider() {
4531
- var _this;
4390
+ input[type=checkbox]:enabled + label:hover + label::after,
4391
+ input[type=checkbox]:enabled + label + label:hover::after {
4392
+ box-shadow: var(---shadow-4);
4393
+ }
4532
4394
 
4533
- _classCallCheck(this, DecidablesSlider);
4395
+ input[type=checkbox]:enabled + label:active + label::after,
4396
+ input[type=checkbox]:enabled + label + label:active::after {
4397
+ box-shadow: var(---shadow-8);
4398
+ }
4534
4399
 
4535
- _this = _super.call(this); // Attributes
4400
+ /* stylelint-disable-next-line selector-max-compound-selectors */
4401
+ :host(.keyboard) input[type=checkbox]:enabled:focus + label + label::after {
4402
+ box-shadow: var(---shadow-4);
4403
+ }
4536
4404
 
4537
- _this.disabled = false;
4538
- _this.max = undefined;
4539
- _this.min = undefined;
4540
- _this.step = undefined;
4541
- _this.value = undefined;
4542
- return _this;
4405
+ /* stylelint-disable-next-line selector-max-compound-selectors */
4406
+ :host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,
4407
+ :host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
4408
+ box-shadow: var(---shadow-8);
4409
+ }
4410
+ `))];
4543
4411
  }
4544
4412
 
4545
- _createClass(DecidablesSlider, [{
4546
- key: "changed",
4547
- value: function changed(event) {
4548
- this.value = event.target.value;
4549
- this.dispatchEvent(new CustomEvent('change', {
4550
- detail: {
4551
- value: this.value
4552
- },
4553
- bubbles: true
4554
- }));
4555
- }
4556
- }, {
4557
- key: "inputted",
4558
- value: function inputted(event) {
4559
- this.value = event.target.value;
4560
- }
4561
- }, {
4562
- key: "render",
4563
- value: function render() {
4564
- return $(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n <label for=", ">\n <slot></slot>\n </label>\n <div class=\"range\">\n <input type=\"range\" id=", " min=", " max=", " step=", " .value=", " @change=", " @input=", ">\n </div>\n <decidables-spinner min=", " max=", " step=", " .value=", " @input=", "></decidables-spinner>\n "])), "".concat(this.uniqueId, "-slider"), "".concat(this.uniqueId, "-slider"), l(this.min), l(this.max), l(this.step), this.value, this.changed.bind(this), this.inputted.bind(this), l(this.min), l(this.max), l(this.step), this.value, this.inputted.bind(this));
4565
- }
4566
- }], [{
4567
- key: "properties",
4568
- get: function get() {
4569
- return {
4570
- disabled: {
4571
- attribute: 'disabled',
4572
- type: Boolean,
4573
- reflect: true
4574
- },
4575
- max: {
4576
- attribute: 'max',
4577
- type: Number,
4578
- reflect: true
4579
- },
4580
- min: {
4581
- attribute: 'min',
4582
- type: Number,
4583
- reflect: true
4584
- },
4585
- step: {
4586
- attribute: 'step',
4587
- type: Number,
4588
- reflect: true
4589
- },
4590
- value: {
4591
- attribute: 'value',
4592
- type: Number,
4593
- reflect: true
4594
- }
4595
- };
4596
- }
4597
- }, {
4598
- key: "styles",
4599
- get: function get() {
4600
- return [_get(_getPrototypeOf(DecidablesSlider), "styles", this), r$2(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteral(["\n :host {\n ---shadow-2-rotate: var(--shadow-2-rotate, ", ");\n ---shadow-4-rotate: var(--shadow-4-rotate, ", ");\n ---shadow-8-rotate: var(--shadow-8-rotate, ", ");\n\n display: flex;\n\n flex-direction: column;\n\n align-items: center;\n justify-content: center;\n }\n\n label {\n margin: 0.25rem 0.25rem 0;\n }\n\n .range {\n display: inline-block;\n\n width: 3.5rem;\n height: 4.75rem;\n margin: 0 0.25rem 0.25rem;\n }\n\n decidables-spinner {\n --decidables-spinner-input-width: 3.5rem;\n\n margin: 0 0.25rem 0.25rem;\n }\n\n /* Adapted from http://danielstern.ca/range.css/#/ */\n /* Overall */\n input[type=range] {\n width: 4.75rem;\n height: 3.5rem;\n padding: 0;\n margin: 0;\n\n background-color: unset;\n\n transform: rotate(-90deg);\n transform-origin: 2.375rem 2.375rem;\n\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -webkit-appearance: none;\n }\n\n input[type=range]:enabled {\n cursor: ns-resize;\n }\n\n input[type=range]:focus {\n outline: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-tooltip {\n display: none;\n }\n\n /* Track */\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-webkit-slider-runnable-track {\n width: 100%;\n height: 4px;\n\n background: var(---color-element-disabled);\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n input[type=range]:focus::-webkit-slider-runnable-track {\n background: var(---color-element-disabled);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-moz-range-track {\n width: 100%;\n height: 4px;\n\n background: var(---color-element-disabled);\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-track {\n width: 100%;\n height: 4px;\n\n color: transparent;\n\n background: transparent;\n border-color: transparent;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-fill-lower {\n background: #cccccc;\n /* background: var(---color-element-disabled); */\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-fill-upper {\n background: #cccccc;\n /* background: var(---color-element-disabled); */\n border: 0;\n border-radius: 2px;\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:focus::-ms-fill-lower {\n background: var(---color-element-disabled);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:focus::-ms-fill-upper {\n background: var(---color-element-disabled);\n }\n\n /* Thumb */\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-webkit-slider-thumb {\n width: 10px;\n height: 20px;\n margin-top: -8px;\n\n border: 0;\n border-radius: 4px;\n\n /* stylelint-disable-next-line property-no-vendor-prefix */\n -webkit-appearance: none;\n }\n\n input[type=range]:disabled::-webkit-slider-thumb {\n background: var(---color-element-disabled);\n box-shadow: none;\n }\n\n input[type=range]:enabled::-webkit-slider-thumb {\n background: var(---color-element-enabled);\n box-shadow: var(---shadow-2-rotate);\n }\n\n input[type=range]:enabled:hover::-webkit-slider-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n input[type=range]:enabled:active::-webkit-slider-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus::-webkit-slider-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n :host(.keyboard) input[type=range]:focus:active::-webkit-slider-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-moz-range-thumb {\n width: 10px;\n height: 20px;\n\n border: 0;\n border-radius: 4px;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:disabled::-moz-range-thumb {\n background: var(---color-element-disabled);\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled::-moz-range-thumb {\n background: var(---color-element-enabled);\n box-shadow: var(---shadow-2-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:hover::-moz-range-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:active::-moz-range-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus::-moz-range-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus:active::-moz-range-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]::-ms-thumb {\n width: 10px;\n height: 20px;\n margin-top: 0;\n\n background: #999999;\n /* background: var(---color-element-enabled); */\n border: 0;\n border-radius: 4px;\n box-shadow: var(---shadow-2-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:disabled::-ms-thumb {\n background: var(---color-element-disabled);\n box-shadow: none;\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled::-ms-thumb {\n background: var(---color-element-enabled);\n box-shadow: var(---shadow-2-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:hover::-ms-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n input[type=range]:enabled:active::-ms-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n\n /* stylelint-disable-next-line no-descending-specificity */ /* stylelint ERROR */\n :host(.keyboard) input[type=range]:enabled:focus::-ms-thumb {\n box-shadow: var(---shadow-4-rotate);\n }\n\n :host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {\n box-shadow: var(---shadow-8-rotate);\n }\n "])), o$3(this.cssBoxShadow(2, true, false)), o$3(this.cssBoxShadow(4, true, false)), o$3(this.cssBoxShadow(8, true, false)))];
4601
- }
4602
- }]);
4413
+ render() {
4414
+ return $(_t2$2 || (_t2$2 = _$2`
4415
+ <input type="checkbox" id="switch" ?checked=${0} ?disabled=${0} @change=${0}>
4416
+ <label for="switch">
4417
+ <slot name="off-label"></slot>
4418
+ </label>
4419
+ <label for="switch">
4420
+ <slot></slot>
4421
+ </label>
4422
+ `), this.checked, this.disabled, this.changed.bind(this));
4423
+ }
4603
4424
 
4604
- return DecidablesSlider;
4605
- }(DecidablesElement);
4606
- customElements.define('decidables-slider', DecidablesSlider);
4425
+ }
4426
+ customElements.define('decidables-switch', DecidablesSwitch);
4427
+
4428
+ let _$1 = t => t,
4429
+ _t$1,
4430
+ _t2$1;
4431
+ class DecidablesToggle extends DecidablesElement {
4432
+ static get properties() {
4433
+ return {
4434
+ disabled: {
4435
+ attribute: 'disabled',
4436
+ type: Boolean,
4437
+ reflect: true
4438
+ }
4439
+ };
4440
+ }
4607
4441
 
4608
- var _templateObject$3, _templateObject2$3;
4442
+ constructor() {
4443
+ super(); // Attributes
4444
+
4445
+ this.disabled = false;
4446
+ }
4609
4447
 
4610
- var DecidablesSpinner = /*#__PURE__*/function (_DecidablesElement) {
4611
- _inherits(DecidablesSpinner, _DecidablesElement);
4448
+ static get styles() {
4449
+ return [super.styles, r$2(_t$1 || (_t$1 = _$1`
4450
+ fieldset {
4451
+ display: flex;
4612
4452
 
4613
- var _super = _createSuper(DecidablesSpinner);
4453
+ flex-direction: column;
4614
4454
 
4615
- function DecidablesSpinner() {
4616
- var _this;
4455
+ align-items: stretch;
4456
+ justify-content: center;
4617
4457
 
4618
- _classCallCheck(this, DecidablesSpinner);
4458
+ margin: 0.25rem;
4619
4459
 
4620
- _this = _super.call(this); // Attributes
4460
+ border: 0;
4461
+ }
4621
4462
 
4622
- _this.disabled = false;
4623
- _this.max = undefined;
4624
- _this.min = undefined;
4625
- _this.step = undefined;
4626
- _this.value = undefined;
4627
- return _this;
4463
+ legend {
4464
+ text-align: center;
4465
+ }
4466
+ `))];
4628
4467
  }
4629
4468
 
4630
- _createClass(DecidablesSpinner, [{
4631
- key: "inputted",
4632
- value: function inputted(event) {
4633
- this.value = event.target.value;
4634
- }
4635
- }, {
4636
- key: "render",
4637
- value: function render() {
4638
- return $(_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n <label>\n <slot></slot>\n <input ?disabled=", " type=\"number\" min=", " max=", " step=", " .value=", " @input=", ">\n </label>\n "])), this.disabled, l(this.min), l(this.max), l(this.step), this.value, this.inputted.bind(this));
4639
- }
4640
- }], [{
4641
- key: "properties",
4642
- get: function get() {
4643
- return {
4644
- disabled: {
4645
- attribute: 'disabled',
4646
- type: Boolean,
4647
- reflect: true
4648
- },
4649
- max: {
4650
- attribute: 'max',
4651
- type: Number,
4652
- reflect: true
4653
- },
4654
- min: {
4655
- attribute: 'min',
4656
- type: Number,
4657
- reflect: true
4658
- },
4659
- step: {
4660
- attribute: 'step',
4661
- type: Number,
4662
- reflect: true
4663
- },
4664
- value: {
4665
- attribute: 'value',
4666
- type: Number,
4667
- reflect: true
4668
- }
4669
- };
4670
- }
4671
- }, {
4672
- key: "styles",
4673
- get: function get() {
4674
- return [_get(_getPrototypeOf(DecidablesSpinner), "styles", this), r$2(_templateObject2$3 || (_templateObject2$3 = _taggedTemplateLiteral(["\n :host {\n ---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);\n ---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);\n ---decidables-spinner-prefix: var(--decidables-spinner-prefix, \"\");\n\n display: block;\n }\n\n label {\n position: relative;\n display: flex;\n\n flex-direction: column;\n\n align-items: center;\n\n margin: 0;\n\n font-size: 0.75rem;\n }\n\n label::before {\n position: absolute;\n bottom: 1px;\n left: calc(50% - var(---decidables-spinner-input-width) / 2 + 0.25rem);\n\n font-size: var(---decidables-spinner-font-size);\n line-height: normal;\n\n content: var(---decidables-spinner-prefix);\n }\n\n input[type=number] {\n width: var(---decidables-spinner-input-width);\n\n font-family: var(---font-family-base);\n font-size: var(---decidables-spinner-font-size);\n color: inherit;\n text-align: right;\n\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n box-shadow: var(---shadow-2);\n\n -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */\n }\n\n input[type=number]:hover {\n box-shadow: var(---shadow-4);\n }\n\n input[type=number]:focus,\n input[type=number]:active {\n box-shadow: var(---shadow-8);\n }\n\n input[type=number]:disabled {\n color: var(---color-text);\n\n border: 0;\n box-shadow: none;\n\n /* HACK: Use correct text color in Safari */\n -webkit-opacity: 1;\n /* HACK: Hide spinners in disabled input for Firefox and Safari */\n -moz-appearance: textfield; /* stylelint-disable-line property-no-vendor-prefix */\n /* HACK: Use correct text color in Safari */\n -webkit-text-fill-color: var(---color-text);\n }\n\n /* HACK: Hide spinners in disabled input for Firefox and Safari */\n input[type=number]:disabled::-webkit-outer-spin-button,\n input[type=number]:disabled::-webkit-inner-spin-button {\n margin: 0;\n -webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */\n }\n "])))];
4675
- }
4676
- }]);
4469
+ render() {
4470
+ return $(_t2$1 || (_t2$1 = _$1`
4471
+ <fieldset ?disabled=${0}>
4472
+ <legend><slot name="label"></slot></legend>
4473
+ <slot></slot>
4474
+ </fieldset>
4475
+ `), this.disabled);
4476
+ }
4677
4477
 
4678
- return DecidablesSpinner;
4679
- }(DecidablesElement);
4680
- customElements.define('decidables-spinner', DecidablesSpinner);
4478
+ }
4479
+ customElements.define('decidables-toggle', DecidablesToggle);
4681
4480
 
4682
- var _templateObject$2, _templateObject2$2;
4481
+ let _ = t => t,
4482
+ _t,
4483
+ _t2;
4484
+ class DecidablesToggleOption extends DecidablesElement {
4485
+ static get properties() {
4486
+ return {
4487
+ checked: {
4488
+ attribute: 'checked',
4489
+ type: Boolean,
4490
+ reflect: true
4491
+ },
4492
+ disabled: {
4493
+ attribute: 'disabled',
4494
+ type: Boolean,
4495
+ reflect: true
4496
+ },
4497
+ name: {
4498
+ attribute: 'name',
4499
+ type: String,
4500
+ reflect: true
4501
+ },
4502
+ value: {
4503
+ attribute: 'value',
4504
+ type: String,
4505
+ reflect: true
4506
+ }
4507
+ };
4508
+ }
4683
4509
 
4684
- var DecidablesSwitch = /*#__PURE__*/function (_DecidablesElement) {
4685
- _inherits(DecidablesSwitch, _DecidablesElement);
4510
+ constructor() {
4511
+ super(); // Attributes
4686
4512
 
4687
- var _super = _createSuper(DecidablesSwitch);
4513
+ this.checked = false;
4514
+ this.disabled = false;
4515
+ this.name = undefined;
4516
+ this.value = undefined;
4517
+ }
4688
4518
 
4689
- function DecidablesSwitch() {
4690
- var _this;
4519
+ changed(event) {
4520
+ this.checked = event.target.checked;
4521
+ this.dispatchEvent(new CustomEvent('change', {
4522
+ detail: {
4523
+ checked: this.checked,
4524
+ value: this.value
4525
+ },
4526
+ bubbles: true
4527
+ }));
4528
+ }
4691
4529
 
4692
- _classCallCheck(this, DecidablesSwitch);
4530
+ static get styles() {
4531
+ return [super.styles, r$2(_t || (_t = _`
4532
+ :host {
4533
+ display: flex;
4534
+ }
4693
4535
 
4694
- _this = _super.call(this); // Attributes
4536
+ input[type=radio] {
4537
+ /* visuallyhidden: https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/css.md */
4538
+ position: absolute;
4695
4539
 
4696
- _this.checked = false;
4697
- _this.disabled = false;
4698
- return _this;
4699
- }
4540
+ width: 1px;
4541
+ height: 1px;
4542
+ padding: 0;
4543
+ margin: -1px;
4544
+ overflow: hidden;
4545
+ clip: rect(0 0 0 0);
4700
4546
 
4701
- _createClass(DecidablesSwitch, [{
4702
- key: "changed",
4703
- value: function changed(event) {
4704
- this.checked = event.target.checked;
4705
- this.dispatchEvent(new CustomEvent('change', {
4706
- detail: {
4707
- checked: this.checked
4708
- },
4709
- bubbles: true
4710
- }));
4711
- }
4712
- }, {
4713
- key: "render",
4714
- value: function render() {
4715
- return $(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n <input type=\"checkbox\" id=", " ?checked=", " ?disabled=", " @change=", ">\n <label for=", ">\n <slot name=\"off-label\"></slot>\n </label>\n <label for=", ">\n <slot></slot>\n </label>\n "])), "".concat(this.uniqueId, "-checkbox"), this.checked, this.disabled, this.changed.bind(this), "".concat(this.uniqueId, "-checkbox"), "".concat(this.uniqueId, "-checkbox"));
4716
- }
4717
- }], [{
4718
- key: "properties",
4719
- get: function get() {
4720
- return {
4721
- checked: {
4722
- attribute: 'checked',
4723
- type: Boolean,
4724
- reflect: true
4725
- },
4726
- disabled: {
4727
- attribute: 'disabled',
4728
- type: Boolean,
4729
- reflect: true
4730
- }
4731
- };
4732
- }
4733
- }, {
4734
- key: "styles",
4735
- get: function get() {
4736
- return [_get(_getPrototypeOf(DecidablesSwitch), "styles", this), r$2(_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n :host {\n display: flex;\n\n flex-direction: column;\n\n align-items: center;\n justify-content: center;\n }\n\n /* Adapted from https://codepen.io/guuslieben/pen/YyPRVP */\n input[type=checkbox] {\n /* visuallyhidden: https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/css.md */\n position: absolute;\n\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n\n white-space: nowrap;\n\n border: 0;\n clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */\n }\n\n input[type=checkbox] + label {\n order: 1;\n\n margin: 0 0.25rem 0.25rem;\n\n font-weight: 400;\n }\n\n input[type=checkbox] + label + label {\n position: relative;\n\n min-width: 24px;\n padding: 0 0 36px;\n margin: 0.25rem 0.25rem 0;\n\n font-weight: 400;\n\n outline: none;\n }\n\n input[type=checkbox] + label + label::before,\n input[type=checkbox] + label + label::after {\n position: absolute;\n\n left: 50%;\n\n margin: 0;\n\n content: \"\";\n\n outline: 0;\n\n transition: all var(---transition-duration) ease;\n transform: translate(-50%, 0);\n }\n\n input[type=checkbox] + label + label::before {\n bottom: 1px;\n\n width: 8px;\n height: 34px;\n\n background-color: var(---color-element-disabled);\n border-radius: 4px;\n }\n\n input[type=checkbox] + label + label::after {\n bottom: 0;\n\n width: 18px;\n height: 18px;\n\n background-color: var(---color-element-enabled);\n border-radius: 50%;\n box-shadow: var(---shadow-2);\n }\n\n input[type=checkbox]:checked + label + label::after {\n transform: translate(-50%, -100%);\n }\n\n input[type=checkbox]:disabled + label + label::after {\n background-color: var(---color-element-disabled);\n box-shadow: none;\n }\n\n input[type=checkbox]:enabled + label,\n input[type=checkbox]:enabled + label + label {\n cursor: pointer;\n }\n\n input[type=checkbox]:enabled + label:hover + label::after,\n input[type=checkbox]:enabled + label + label:hover::after {\n box-shadow: var(---shadow-4);\n }\n\n input[type=checkbox]:enabled + label:active + label::after,\n input[type=checkbox]:enabled + label + label:active::after {\n box-shadow: var(---shadow-8);\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n :host(.keyboard) input[type=checkbox]:enabled:focus + label + label::after {\n box-shadow: var(---shadow-4);\n }\n\n /* stylelint-disable-next-line selector-max-compound-selectors */\n :host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,\n :host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {\n box-shadow: var(---shadow-8);\n }\n "])))];
4737
- }
4738
- }]);
4547
+ white-space: nowrap;
4739
4548
 
4740
- return DecidablesSwitch;
4741
- }(DecidablesElement);
4742
- customElements.define('decidables-switch', DecidablesSwitch);
4549
+ border: 0;
4550
+ clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */
4551
+ }
4743
4552
 
4744
- var _templateObject$1, _templateObject2$1;
4553
+ input[type=radio] + label {
4554
+ width: 100%;
4555
+ padding: 0.375rem 0.75rem;
4745
4556
 
4746
- var DecidablesToggle = /*#__PURE__*/function (_DecidablesElement) {
4747
- _inherits(DecidablesToggle, _DecidablesElement);
4557
+ font-family: var(---font-family-base);
4558
+ font-size: 1.125rem;
4559
+ line-height: 1.5;
4560
+ color: var(---color-text-inverse);
4561
+ text-align: center;
4748
4562
 
4749
- var _super = _createSuper(DecidablesToggle);
4563
+ cursor: pointer;
4750
4564
 
4751
- function DecidablesToggle() {
4752
- var _this;
4565
+ background-color: var(---color-element-enabled);
4566
+ border: 0;
4567
+ border-radius: 0;
4568
+ outline: none;
4753
4569
 
4754
- _classCallCheck(this, DecidablesToggle);
4570
+ box-shadow: var(---shadow-2);
4571
+ }
4755
4572
 
4756
- _this = _super.call(this); // Attributes
4573
+ input[type=radio]:checked + label {
4574
+ background-color: var(---color-element-selected);
4575
+ outline: none;
4576
+ box-shadow: var(---shadow-2);
4577
+ }
4757
4578
 
4758
- _this.disabled = false;
4759
- return _this;
4760
- }
4579
+ input[type=radio] + label:hover {
4580
+ z-index: 1;
4761
4581
 
4762
- _createClass(DecidablesToggle, [{
4763
- key: "render",
4764
- value: function render() {
4765
- return $(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n <fieldset ?disabled=", ">\n <legend><slot name=\"label\"></slot></legend>\n <slot></slot>\n </fieldset>\n "])), this.disabled);
4766
- }
4767
- }], [{
4768
- key: "properties",
4769
- get: function get() {
4770
- return {
4771
- disabled: {
4772
- attribute: 'disabled',
4773
- type: Boolean,
4774
- reflect: true
4775
- }
4776
- };
4777
- }
4778
- }, {
4779
- key: "styles",
4780
- get: function get() {
4781
- return [_get(_getPrototypeOf(DecidablesToggle), "styles", this), r$2(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n fieldset {\n display: flex;\n\n flex-direction: column;\n\n align-items: stretch;\n justify-content: center;\n\n margin: 0.25rem;\n\n border: 0;\n }\n\n legend {\n text-align: center;\n }\n "])))];
4782
- }
4783
- }]);
4582
+ outline: none;
4583
+ box-shadow: var(---shadow-4);
4584
+ }
4784
4585
 
4785
- return DecidablesToggle;
4786
- }(DecidablesElement);
4787
- customElements.define('decidables-toggle', DecidablesToggle);
4586
+ input[type=radio] + label:active {
4587
+ z-index: 2;
4588
+
4589
+ outline: none;
4590
+ box-shadow: var(---shadow-8);
4591
+ }
4592
+
4593
+ :host(:first-of-type) input[type=radio] + label {
4594
+ border-top-left-radius: 0.25rem;
4595
+ border-top-right-radius: 0.25rem;
4596
+ }
4788
4597
 
4789
- var _templateObject, _templateObject2;
4598
+ :host(:last-of-type) input[type=radio] + label {
4599
+ border-bottom-right-radius: 0.25rem;
4600
+ border-bottom-left-radius: 0.25rem;
4601
+ }
4790
4602
 
4791
- var DecidablesToggleOption = /*#__PURE__*/function (_DecidablesElement) {
4792
- _inherits(DecidablesToggleOption, _DecidablesElement);
4603
+ :host(.keyboard) input[type=radio]:focus + label {
4604
+ z-index: 1;
4793
4605
 
4794
- var _super = _createSuper(DecidablesToggleOption);
4606
+ outline: none;
4607
+ box-shadow: var(---shadow-4);
4608
+ }
4795
4609
 
4796
- function DecidablesToggleOption() {
4797
- var _this;
4610
+ :host(.keyboard) input[type=radio]:focus:checked + label {
4611
+ z-index: 1;
4798
4612
 
4799
- _classCallCheck(this, DecidablesToggleOption);
4613
+ background-color: var(---color-element-selected);
4614
+ outline: none;
4615
+ box-shadow: var(---shadow-4);
4616
+ }
4800
4617
 
4801
- _this = _super.call(this); // Attributes
4618
+ :host(.keyboard) input[type=radio]:focus + label:active {
4619
+ z-index: 2;
4802
4620
 
4803
- _this.checked = false;
4804
- _this.disabled = false;
4805
- _this.name = undefined;
4806
- _this.value = undefined;
4807
- return _this;
4621
+ outline: none;
4622
+ box-shadow: var(---shadow-8);
4623
+ }
4624
+ `))];
4808
4625
  }
4809
4626
 
4810
- _createClass(DecidablesToggleOption, [{
4811
- key: "changed",
4812
- value: function changed(event) {
4813
- this.checked = event.target.checked;
4814
- this.dispatchEvent(new CustomEvent('change', {
4815
- detail: {
4816
- checked: this.checked,
4817
- value: this.value
4818
- },
4819
- bubbles: true
4820
- }));
4821
- }
4822
- }, {
4823
- key: "render",
4824
- value: function render() {
4825
- return $(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <input type=\"radio\" id=", " name=", " value=", " .checked=", " @change=", ">\n <label for=", ">\n <slot></slot>\n </label>\n "])), "".concat(this.uniqueId, "-radio"), this.name, this.value, this.checked, this.changed.bind(this), "".concat(this.uniqueId, "-radio"));
4826
- }
4827
- }], [{
4828
- key: "properties",
4829
- get: function get() {
4830
- return {
4831
- checked: {
4832
- attribute: 'checked',
4833
- type: Boolean,
4834
- reflect: true
4835
- },
4836
- disabled: {
4837
- attribute: 'disabled',
4838
- type: Boolean,
4839
- reflect: true
4840
- },
4841
- name: {
4842
- attribute: 'name',
4843
- type: String,
4844
- reflect: true
4845
- },
4846
- value: {
4847
- attribute: 'value',
4848
- type: String,
4849
- reflect: true
4850
- }
4851
- };
4852
- }
4853
- }, {
4854
- key: "styles",
4855
- get: function get() {
4856
- return [_get(_getPrototypeOf(DecidablesToggleOption), "styles", this), r$2(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n :host {\n display: flex;\n }\n\n input[type=radio] {\n /* visuallyhidden: https://github.com/h5bp/html5-boilerplate/blob/master/dist/doc/css.md */\n position: absolute;\n\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n\n white-space: nowrap;\n\n border: 0;\n clip-path: inset(100%); /* May cause a performance issue: https://github.com/h5bp/html5-boilerplate/issues/2021 */\n }\n\n input[type=radio] + label {\n width: 100%;\n padding: 0.375rem 0.75rem;\n\n font-family: var(---font-family-base);\n font-size: 1.125rem;\n line-height: 1.5;\n color: var(---color-text-inverse);\n text-align: center;\n\n cursor: pointer;\n\n background-color: var(---color-element-enabled);\n border: 0;\n border-radius: 0;\n outline: none;\n\n box-shadow: var(---shadow-2);\n }\n\n input[type=radio]:checked + label {\n background-color: var(---color-element-selected);\n outline: none;\n box-shadow: var(---shadow-2);\n }\n\n input[type=radio] + label:hover {\n z-index: 1;\n\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n input[type=radio] + label:active {\n z-index: 2;\n\n outline: none;\n box-shadow: var(---shadow-8);\n }\n\n :host(:first-of-type) input[type=radio] + label {\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem;\n }\n\n :host(:last-of-type) input[type=radio] + label {\n border-bottom-right-radius: 0.25rem;\n border-bottom-left-radius: 0.25rem;\n }\n\n :host(.keyboard) input[type=radio]:focus + label {\n z-index: 1;\n\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) input[type=radio]:focus:checked + label {\n z-index: 1;\n\n background-color: var(---color-element-selected);\n outline: none;\n box-shadow: var(---shadow-4);\n }\n\n :host(.keyboard) input[type=radio]:focus + label:active {\n z-index: 2;\n\n outline: none;\n box-shadow: var(---shadow-8);\n }\n "])))];
4857
- }
4858
- }]);
4627
+ render() {
4628
+ return $(_t2 || (_t2 = _`
4629
+ <input type="radio" id="toggle-option" name=${0} value=${0} .checked=${0} @change=${0}>
4630
+ <label for="toggle-option">
4631
+ <slot></slot>
4632
+ </label>
4633
+ `), this.name, this.value, this.checked, this.changed.bind(this));
4634
+ }
4859
4635
 
4860
- return DecidablesToggleOption;
4861
- }(DecidablesElement);
4636
+ }
4862
4637
  customElements.define('decidables-toggle-option', DecidablesToggleOption);
4863
4638
 
4864
4639
  /*
4865
4640
  Attribute: Space-separated sequence of numbers
4866
4641
  Property: Array of numbers
4867
4642
  */
4868
- var DecidablesConverterArray = {
4869
- fromAttribute: function fromAttribute(value) {
4870
- return value.split(/\s+/).map(function (item) {
4643
+ const DecidablesConverterArray = {
4644
+ fromAttribute: value => {
4645
+ return value.split(/\s+/).map(item => {
4871
4646
  return Number.parseFloat(item);
4872
4647
  });
4873
4648
  },
4874
- toAttribute: function toAttribute(value) {
4875
- return value.length ? value.map(function (item) {
4649
+ toAttribute: value => {
4650
+ return value.length ? value.map(item => {
4876
4651
  return item.toFixed(3);
4877
4652
  }).join(' ') : null;
4878
4653
  }
@@ -4882,12 +4657,12 @@
4882
4657
  Attribute: Space-separated sequence of strings
4883
4658
  Property: Set of strings
4884
4659
  */
4885
- var DecidablesConverterSet = {
4886
- fromAttribute: function fromAttribute(value) {
4660
+ const DecidablesConverterSet = {
4661
+ fromAttribute: value => {
4887
4662
  return new Set(value.split(/\s+/));
4888
4663
  },
4889
- toAttribute: function toAttribute(value) {
4890
- return value.size ? _toConsumableArray(value).join(' ') : null;
4664
+ toAttribute: value => {
4665
+ return value.size ? [...value].join(' ') : null;
4891
4666
  }
4892
4667
  };
4893
4668