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