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