@decidables/decidables-elements 0.3.2 → 0.3.3
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.
- package/CHANGELOG.md +8 -0
- package/lib/decidablesElements.esm.js +1089 -919
- package/lib/decidablesElements.esm.js.map +1 -1
- package/lib/decidablesElements.esm.min.js +77 -60
- package/lib/decidablesElements.esm.min.js.map +1 -1
- package/lib/decidablesElements.umd.js +1089 -921
- package/lib/decidablesElements.umd.js.map +1 -1
- package/lib/decidablesElements.umd.min.js +77 -60
- package/lib/decidablesElements.umd.min.js.map +1 -1
- package/package.json +5 -5
|
@@ -3,219 +3,761 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const t$
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const t$3 = window,
|
|
7
|
+
e$5 = t$3.ShadowRoot && (void 0 === t$3.ShadyCSS || t$3.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
8
|
+
s$6 = Symbol(),
|
|
9
|
+
n$6 = new WeakMap();
|
|
10
|
+
let o$6 = class o {
|
|
11
|
+
constructor(t, e, n) {
|
|
12
|
+
if (this._$cssResult$ = !0, n !== s$6) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
13
|
+
this.cssText = t, this.t = e;
|
|
14
|
+
}
|
|
15
|
+
get styleSheet() {
|
|
16
|
+
let t = this.o;
|
|
17
|
+
const s = this.t;
|
|
18
|
+
if (e$5 && void 0 === t) {
|
|
19
|
+
const e = void 0 !== s && 1 === s.length;
|
|
20
|
+
e && (t = n$6.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), e && n$6.set(s, t));
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
}
|
|
24
|
+
toString() {
|
|
25
|
+
return this.cssText;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const r$5 = t => new o$6("string" == typeof t ? t : t + "", void 0, s$6),
|
|
29
|
+
S$3 = (s, n) => {
|
|
30
|
+
e$5 ? s.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(e => {
|
|
31
|
+
const n = document.createElement("style"),
|
|
32
|
+
o = t$3.litNonce;
|
|
33
|
+
void 0 !== o && n.setAttribute("nonce", o), n.textContent = e.cssText, s.appendChild(n);
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
c$2 = e$5 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
37
|
+
let e = "";
|
|
38
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
39
|
+
return r$5(e);
|
|
40
|
+
})(t) : t;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @license
|
|
44
|
+
* Copyright 2017 Google LLC
|
|
45
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
46
|
+
*/
|
|
47
|
+
var s$5;
|
|
48
|
+
const e$4 = window,
|
|
49
|
+
r$4 = e$4.trustedTypes,
|
|
50
|
+
h$3 = r$4 ? r$4.emptyScript : "",
|
|
51
|
+
o$5 = e$4.reactiveElementPolyfillSupport,
|
|
52
|
+
n$5 = {
|
|
53
|
+
toAttribute(t, i) {
|
|
54
|
+
switch (i) {
|
|
55
|
+
case Boolean:
|
|
56
|
+
t = t ? h$3 : null;
|
|
57
|
+
break;
|
|
58
|
+
case Object:
|
|
59
|
+
case Array:
|
|
60
|
+
t = null == t ? t : JSON.stringify(t);
|
|
61
|
+
}
|
|
62
|
+
return t;
|
|
63
|
+
},
|
|
64
|
+
fromAttribute(t, i) {
|
|
65
|
+
let s = t;
|
|
66
|
+
switch (i) {
|
|
67
|
+
case Boolean:
|
|
68
|
+
s = null !== t;
|
|
69
|
+
break;
|
|
70
|
+
case Number:
|
|
71
|
+
s = null === t ? null : Number(t);
|
|
72
|
+
break;
|
|
73
|
+
case Object:
|
|
74
|
+
case Array:
|
|
75
|
+
try {
|
|
76
|
+
s = JSON.parse(t);
|
|
77
|
+
} catch (t) {
|
|
78
|
+
s = null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return s;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
a$3 = (t, i) => i !== t && (i == i || t == t),
|
|
85
|
+
l$5 = {
|
|
86
|
+
attribute: !0,
|
|
87
|
+
type: String,
|
|
88
|
+
converter: n$5,
|
|
89
|
+
reflect: !1,
|
|
90
|
+
hasChanged: a$3
|
|
91
|
+
};
|
|
92
|
+
let d$2 = class d extends HTMLElement {
|
|
93
|
+
constructor() {
|
|
94
|
+
super(), this._$Ei = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
95
|
+
}
|
|
96
|
+
static addInitializer(t) {
|
|
97
|
+
var i;
|
|
98
|
+
this.finalize(), (null !== (i = this.h) && void 0 !== i ? i : this.h = []).push(t);
|
|
99
|
+
}
|
|
100
|
+
static get observedAttributes() {
|
|
101
|
+
this.finalize();
|
|
102
|
+
const t = [];
|
|
103
|
+
return this.elementProperties.forEach((i, s) => {
|
|
104
|
+
const e = this._$Ep(s, i);
|
|
105
|
+
void 0 !== e && (this._$Ev.set(e, s), t.push(e));
|
|
106
|
+
}), t;
|
|
107
|
+
}
|
|
108
|
+
static createProperty(t, i = l$5) {
|
|
109
|
+
if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
110
|
+
const s = "symbol" == typeof t ? Symbol() : "__" + t,
|
|
111
|
+
e = this.getPropertyDescriptor(t, s, i);
|
|
112
|
+
void 0 !== e && Object.defineProperty(this.prototype, t, e);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
static getPropertyDescriptor(t, i, s) {
|
|
116
|
+
return {
|
|
117
|
+
get() {
|
|
118
|
+
return this[i];
|
|
119
|
+
},
|
|
120
|
+
set(e) {
|
|
121
|
+
const r = this[t];
|
|
122
|
+
this[i] = e, this.requestUpdate(t, r, s);
|
|
123
|
+
},
|
|
124
|
+
configurable: !0,
|
|
125
|
+
enumerable: !0
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
static getPropertyOptions(t) {
|
|
129
|
+
return this.elementProperties.get(t) || l$5;
|
|
130
|
+
}
|
|
131
|
+
static finalize() {
|
|
132
|
+
if (this.hasOwnProperty("finalized")) return !1;
|
|
133
|
+
this.finalized = !0;
|
|
134
|
+
const t = Object.getPrototypeOf(this);
|
|
135
|
+
if (t.finalize(), void 0 !== t.h && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = new Map(), this.hasOwnProperty("properties")) {
|
|
136
|
+
const t = this.properties,
|
|
137
|
+
i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
138
|
+
for (const s of i) this.createProperty(s, t[s]);
|
|
139
|
+
}
|
|
140
|
+
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
141
|
+
}
|
|
142
|
+
static finalizeStyles(i) {
|
|
143
|
+
const s = [];
|
|
144
|
+
if (Array.isArray(i)) {
|
|
145
|
+
const e = new Set(i.flat(1 / 0).reverse());
|
|
146
|
+
for (const i of e) s.unshift(c$2(i));
|
|
147
|
+
} else void 0 !== i && s.push(c$2(i));
|
|
148
|
+
return s;
|
|
149
|
+
}
|
|
150
|
+
static _$Ep(t, i) {
|
|
151
|
+
const s = i.attribute;
|
|
152
|
+
return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
153
|
+
}
|
|
154
|
+
u() {
|
|
155
|
+
var t;
|
|
156
|
+
this._$E_ = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$Eg(), this.requestUpdate(), null === (t = this.constructor.h) || void 0 === t || t.forEach(t => t(this));
|
|
157
|
+
}
|
|
158
|
+
addController(t) {
|
|
159
|
+
var i, s;
|
|
160
|
+
(null !== (i = this._$ES) && void 0 !== i ? i : this._$ES = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
|
|
161
|
+
}
|
|
162
|
+
removeController(t) {
|
|
163
|
+
var i;
|
|
164
|
+
null === (i = this._$ES) || void 0 === i || i.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
165
|
+
}
|
|
166
|
+
_$Eg() {
|
|
167
|
+
this.constructor.elementProperties.forEach((t, i) => {
|
|
168
|
+
this.hasOwnProperty(i) && (this._$Ei.set(i, this[i]), delete this[i]);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
createRenderRoot() {
|
|
172
|
+
var t;
|
|
173
|
+
const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
174
|
+
return S$3(s, this.constructor.elementStyles), s;
|
|
175
|
+
}
|
|
176
|
+
connectedCallback() {
|
|
177
|
+
var t;
|
|
178
|
+
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
179
|
+
var i;
|
|
180
|
+
return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
enableUpdating(t) {}
|
|
184
|
+
disconnectedCallback() {
|
|
185
|
+
var t;
|
|
186
|
+
null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
187
|
+
var i;
|
|
188
|
+
return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
attributeChangedCallback(t, i, s) {
|
|
192
|
+
this._$AK(t, s);
|
|
193
|
+
}
|
|
194
|
+
_$EO(t, i, s = l$5) {
|
|
195
|
+
var e;
|
|
196
|
+
const r = this.constructor._$Ep(t, s);
|
|
197
|
+
if (void 0 !== r && !0 === s.reflect) {
|
|
198
|
+
const h = (void 0 !== (null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) ? s.converter : n$5).toAttribute(i, s.type);
|
|
199
|
+
this._$El = t, null == h ? this.removeAttribute(r) : this.setAttribute(r, h), this._$El = null;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
_$AK(t, i) {
|
|
203
|
+
var s;
|
|
204
|
+
const e = this.constructor,
|
|
205
|
+
r = e._$Ev.get(t);
|
|
206
|
+
if (void 0 !== r && this._$El !== r) {
|
|
207
|
+
const t = e.getPropertyOptions(r),
|
|
208
|
+
h = "function" == typeof t.converter ? {
|
|
209
|
+
fromAttribute: t.converter
|
|
210
|
+
} : void 0 !== (null === (s = t.converter) || void 0 === s ? void 0 : s.fromAttribute) ? t.converter : n$5;
|
|
211
|
+
this._$El = r, this[r] = h.fromAttribute(i, t.type), this._$El = null;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
requestUpdate(t, i, s) {
|
|
215
|
+
let e = !0;
|
|
216
|
+
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || a$3)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$El !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$E_ = this._$Ej());
|
|
217
|
+
}
|
|
218
|
+
async _$Ej() {
|
|
219
|
+
this.isUpdatePending = !0;
|
|
220
|
+
try {
|
|
221
|
+
await this._$E_;
|
|
222
|
+
} catch (t) {
|
|
223
|
+
Promise.reject(t);
|
|
224
|
+
}
|
|
225
|
+
const t = this.scheduleUpdate();
|
|
226
|
+
return null != t && (await t), !this.isUpdatePending;
|
|
227
|
+
}
|
|
228
|
+
scheduleUpdate() {
|
|
229
|
+
return this.performUpdate();
|
|
230
|
+
}
|
|
231
|
+
performUpdate() {
|
|
232
|
+
var t;
|
|
233
|
+
if (!this.isUpdatePending) return;
|
|
234
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((t, i) => this[i] = t), this._$Ei = void 0);
|
|
235
|
+
let i = !1;
|
|
236
|
+
const s = this._$AL;
|
|
237
|
+
try {
|
|
238
|
+
i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$ES) || void 0 === t || t.forEach(t => {
|
|
239
|
+
var i;
|
|
240
|
+
return null === (i = t.hostUpdate) || void 0 === i ? void 0 : i.call(t);
|
|
241
|
+
}), this.update(s)) : this._$Ek();
|
|
242
|
+
} catch (t) {
|
|
243
|
+
throw i = !1, this._$Ek(), t;
|
|
244
|
+
}
|
|
245
|
+
i && this._$AE(s);
|
|
246
|
+
}
|
|
247
|
+
willUpdate(t) {}
|
|
248
|
+
_$AE(t) {
|
|
249
|
+
var i;
|
|
250
|
+
null === (i = this._$ES) || void 0 === i || i.forEach(t => {
|
|
251
|
+
var i;
|
|
252
|
+
return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
|
|
253
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
254
|
+
}
|
|
255
|
+
_$Ek() {
|
|
256
|
+
this._$AL = new Map(), this.isUpdatePending = !1;
|
|
257
|
+
}
|
|
258
|
+
get updateComplete() {
|
|
259
|
+
return this.getUpdateComplete();
|
|
260
|
+
}
|
|
261
|
+
getUpdateComplete() {
|
|
262
|
+
return this._$E_;
|
|
263
|
+
}
|
|
264
|
+
shouldUpdate(t) {
|
|
265
|
+
return !0;
|
|
266
|
+
}
|
|
267
|
+
update(t) {
|
|
268
|
+
void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$EO(i, this[i], t)), this._$EC = void 0), this._$Ek();
|
|
269
|
+
}
|
|
270
|
+
updated(t) {}
|
|
271
|
+
firstUpdated(t) {}
|
|
272
|
+
};
|
|
273
|
+
d$2.finalized = !0, d$2.elementProperties = new Map(), d$2.elementStyles = [], d$2.shadowRootOptions = {
|
|
274
|
+
mode: "open"
|
|
275
|
+
}, null == o$5 || o$5({
|
|
276
|
+
ReactiveElement: d$2
|
|
277
|
+
}), (null !== (s$5 = e$4.reactiveElementVersions) && void 0 !== s$5 ? s$5 : e$4.reactiveElementVersions = []).push("1.5.0");
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* @license
|
|
281
|
+
* Copyright 2017 Google LLC
|
|
282
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
283
|
+
*/
|
|
284
|
+
var t$2;
|
|
285
|
+
const i$2 = window,
|
|
286
|
+
s$4 = i$2.trustedTypes,
|
|
287
|
+
e$3 = s$4 ? s$4.createPolicy("lit-html", {
|
|
288
|
+
createHTML: t => t
|
|
289
|
+
}) : void 0,
|
|
290
|
+
o$4 = `lit$${(Math.random() + "").slice(9)}$`,
|
|
291
|
+
n$4 = "?" + o$4,
|
|
292
|
+
l$4 = `<${n$4}>`,
|
|
293
|
+
h$2 = document,
|
|
294
|
+
r$3 = (t = "") => h$2.createComment(t),
|
|
295
|
+
d$1 = t => null === t || "object" != typeof t && "function" != typeof t,
|
|
296
|
+
u$1 = Array.isArray,
|
|
297
|
+
c$1 = t => u$1(t) || "function" == typeof (null == t ? void 0 : t[Symbol.iterator]),
|
|
298
|
+
v$1 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
299
|
+
a$2 = /-->/g,
|
|
300
|
+
f$1 = />/g,
|
|
301
|
+
_$1 = RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)", "g"),
|
|
302
|
+
m$1 = /'/g,
|
|
303
|
+
p$1 = /"/g,
|
|
304
|
+
$$1 = /^(?:script|style|textarea|title)$/i,
|
|
305
|
+
x$1 = Symbol.for("lit-noChange"),
|
|
306
|
+
b$1 = Symbol.for("lit-nothing"),
|
|
307
|
+
T$1 = new WeakMap(),
|
|
308
|
+
A$1 = h$2.createTreeWalker(h$2, 129, null, !1),
|
|
309
|
+
E$1 = (t, i) => {
|
|
310
|
+
const s = t.length - 1,
|
|
311
|
+
n = [];
|
|
312
|
+
let h,
|
|
313
|
+
r = 2 === i ? "<svg>" : "",
|
|
314
|
+
d = v$1;
|
|
315
|
+
for (let i = 0; i < s; i++) {
|
|
316
|
+
const s = t[i];
|
|
317
|
+
let e,
|
|
318
|
+
u,
|
|
319
|
+
c = -1,
|
|
320
|
+
g = 0;
|
|
321
|
+
for (; g < s.length && (d.lastIndex = g, u = d.exec(s), null !== u);) g = d.lastIndex, d === v$1 ? "!--" === u[1] ? d = a$2 : void 0 !== u[1] ? d = f$1 : void 0 !== u[2] ? ($$1.test(u[2]) && (h = RegExp("</" + u[2], "g")), d = _$1) : void 0 !== u[3] && (d = _$1) : d === _$1 ? ">" === u[0] ? (d = null != h ? h : v$1, c = -1) : void 0 === u[1] ? c = -2 : (c = d.lastIndex - u[2].length, e = u[1], d = void 0 === u[3] ? _$1 : '"' === u[3] ? p$1 : m$1) : d === p$1 || d === m$1 ? d = _$1 : d === a$2 || d === f$1 ? d = v$1 : (d = _$1, h = void 0);
|
|
322
|
+
const y = d === _$1 && t[i + 1].startsWith("/>") ? " " : "";
|
|
323
|
+
r += d === v$1 ? s + l$4 : c >= 0 ? (n.push(e), s.slice(0, c) + "$lit$" + s.slice(c) + o$4 + y) : s + o$4 + (-2 === c ? (n.push(void 0), i) : y);
|
|
324
|
+
}
|
|
325
|
+
const u = r + (t[s] || "<?>") + (2 === i ? "</svg>" : "");
|
|
326
|
+
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
327
|
+
return [void 0 !== e$3 ? e$3.createHTML(u) : u, n];
|
|
328
|
+
};
|
|
329
|
+
let C$1 = class C {
|
|
330
|
+
constructor({
|
|
331
|
+
strings: t,
|
|
332
|
+
_$litType$: i
|
|
333
|
+
}, e) {
|
|
334
|
+
let l;
|
|
335
|
+
this.parts = [];
|
|
336
|
+
let h = 0,
|
|
337
|
+
d = 0;
|
|
338
|
+
const u = t.length - 1,
|
|
339
|
+
c = this.parts,
|
|
340
|
+
[v, a] = E$1(t, i);
|
|
341
|
+
if (this.el = C$1.createElement(v, e), A$1.currentNode = this.el.content, 2 === i) {
|
|
342
|
+
const t = this.el.content,
|
|
343
|
+
i = t.firstChild;
|
|
344
|
+
i.remove(), t.append(...i.childNodes);
|
|
345
|
+
}
|
|
346
|
+
for (; null !== (l = A$1.nextNode()) && c.length < u;) {
|
|
347
|
+
if (1 === l.nodeType) {
|
|
348
|
+
if (l.hasAttributes()) {
|
|
349
|
+
const t = [];
|
|
350
|
+
for (const i of l.getAttributeNames()) if (i.endsWith("$lit$") || i.startsWith(o$4)) {
|
|
351
|
+
const s = a[d++];
|
|
352
|
+
if (t.push(i), void 0 !== s) {
|
|
353
|
+
const t = l.getAttribute(s.toLowerCase() + "$lit$").split(o$4),
|
|
354
|
+
i = /([.?@])?(.*)/.exec(s);
|
|
355
|
+
c.push({
|
|
356
|
+
type: 1,
|
|
357
|
+
index: h,
|
|
358
|
+
name: i[2],
|
|
359
|
+
strings: t,
|
|
360
|
+
ctor: "." === i[1] ? M$1 : "?" === i[1] ? k$1 : "@" === i[1] ? H$1 : S$2
|
|
361
|
+
});
|
|
362
|
+
} else c.push({
|
|
363
|
+
type: 6,
|
|
364
|
+
index: h
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
for (const i of t) l.removeAttribute(i);
|
|
368
|
+
}
|
|
369
|
+
if ($$1.test(l.tagName)) {
|
|
370
|
+
const t = l.textContent.split(o$4),
|
|
371
|
+
i = t.length - 1;
|
|
372
|
+
if (i > 0) {
|
|
373
|
+
l.textContent = s$4 ? s$4.emptyScript : "";
|
|
374
|
+
for (let s = 0; s < i; s++) l.append(t[s], r$3()), A$1.nextNode(), c.push({
|
|
375
|
+
type: 2,
|
|
376
|
+
index: ++h
|
|
377
|
+
});
|
|
378
|
+
l.append(t[i], r$3());
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
} else if (8 === l.nodeType) if (l.data === n$4) c.push({
|
|
382
|
+
type: 2,
|
|
383
|
+
index: h
|
|
384
|
+
});else {
|
|
385
|
+
let t = -1;
|
|
386
|
+
for (; -1 !== (t = l.data.indexOf(o$4, t + 1));) c.push({
|
|
387
|
+
type: 7,
|
|
388
|
+
index: h
|
|
389
|
+
}), t += o$4.length - 1;
|
|
390
|
+
}
|
|
391
|
+
h++;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
static createElement(t, i) {
|
|
395
|
+
const s = h$2.createElement("template");
|
|
396
|
+
return s.innerHTML = t, s;
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
function P$1(t, i, s = t, e) {
|
|
400
|
+
var o, n, l, h;
|
|
401
|
+
if (i === x$1) return i;
|
|
402
|
+
let r = void 0 !== e ? null === (o = s._$Co) || void 0 === o ? void 0 : o[e] : s._$Cl;
|
|
403
|
+
const u = d$1(i) ? void 0 : i._$litDirective$;
|
|
404
|
+
return (null == r ? void 0 : r.constructor) !== u && (null === (n = null == r ? void 0 : r._$AO) || void 0 === n || n.call(r, !1), void 0 === u ? r = void 0 : (r = new u(t), r._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Co) && void 0 !== l ? l : h._$Co = [])[e] = r : s._$Cl = r), void 0 !== r && (i = P$1(t, r._$AS(t, i.values), r, e)), i;
|
|
405
|
+
}
|
|
406
|
+
let V$1 = class V {
|
|
407
|
+
constructor(t, i) {
|
|
408
|
+
this.u = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
409
|
+
}
|
|
410
|
+
get parentNode() {
|
|
411
|
+
return this._$AM.parentNode;
|
|
412
|
+
}
|
|
413
|
+
get _$AU() {
|
|
414
|
+
return this._$AM._$AU;
|
|
415
|
+
}
|
|
416
|
+
v(t) {
|
|
417
|
+
var i;
|
|
418
|
+
const {
|
|
419
|
+
el: {
|
|
420
|
+
content: s
|
|
421
|
+
},
|
|
422
|
+
parts: e
|
|
423
|
+
} = this._$AD,
|
|
424
|
+
o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : h$2).importNode(s, !0);
|
|
425
|
+
A$1.currentNode = o;
|
|
426
|
+
let n = A$1.nextNode(),
|
|
427
|
+
l = 0,
|
|
428
|
+
r = 0,
|
|
429
|
+
d = e[0];
|
|
430
|
+
for (; void 0 !== d;) {
|
|
431
|
+
if (l === d.index) {
|
|
432
|
+
let i;
|
|
433
|
+
2 === d.type ? i = new N$1(n, n.nextSibling, this, t) : 1 === d.type ? i = new d.ctor(n, d.name, d.strings, this, t) : 6 === d.type && (i = new I$1(n, this, t)), this.u.push(i), d = e[++r];
|
|
434
|
+
}
|
|
435
|
+
l !== (null == d ? void 0 : d.index) && (n = A$1.nextNode(), l++);
|
|
436
|
+
}
|
|
437
|
+
return o;
|
|
438
|
+
}
|
|
439
|
+
p(t) {
|
|
440
|
+
let i = 0;
|
|
441
|
+
for (const s of this.u) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
let N$1 = class N {
|
|
445
|
+
constructor(t, i, s, e) {
|
|
446
|
+
var o;
|
|
447
|
+
this.type = 2, this._$AH = b$1, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cm = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
|
|
448
|
+
}
|
|
449
|
+
get _$AU() {
|
|
450
|
+
var t, i;
|
|
451
|
+
return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cm;
|
|
452
|
+
}
|
|
453
|
+
get parentNode() {
|
|
454
|
+
let t = this._$AA.parentNode;
|
|
455
|
+
const i = this._$AM;
|
|
456
|
+
return void 0 !== i && 11 === t.nodeType && (t = i.parentNode), t;
|
|
457
|
+
}
|
|
458
|
+
get startNode() {
|
|
459
|
+
return this._$AA;
|
|
460
|
+
}
|
|
461
|
+
get endNode() {
|
|
462
|
+
return this._$AB;
|
|
463
|
+
}
|
|
464
|
+
_$AI(t, i = this) {
|
|
465
|
+
t = P$1(this, t, i), d$1(t) ? t === b$1 || null == t || "" === t ? (this._$AH !== b$1 && this._$AR(), this._$AH = b$1) : t !== this._$AH && t !== x$1 && this.g(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : c$1(t) ? this.k(t) : this.g(t);
|
|
466
|
+
}
|
|
467
|
+
O(t, i = this._$AB) {
|
|
468
|
+
return this._$AA.parentNode.insertBefore(t, i);
|
|
469
|
+
}
|
|
470
|
+
T(t) {
|
|
471
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
472
|
+
}
|
|
473
|
+
g(t) {
|
|
474
|
+
this._$AH !== b$1 && d$1(this._$AH) ? this._$AA.nextSibling.data = t : this.T(h$2.createTextNode(t)), this._$AH = t;
|
|
475
|
+
}
|
|
476
|
+
$(t) {
|
|
477
|
+
var i;
|
|
478
|
+
const {
|
|
479
|
+
values: s,
|
|
480
|
+
_$litType$: e
|
|
481
|
+
} = t,
|
|
482
|
+
o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = C$1.createElement(e.h, this.options)), e);
|
|
483
|
+
if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.p(s);else {
|
|
484
|
+
const t = new V$1(o, this),
|
|
485
|
+
i = t.v(this.options);
|
|
486
|
+
t.p(s), this.T(i), this._$AH = t;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
_$AC(t) {
|
|
490
|
+
let i = T$1.get(t.strings);
|
|
491
|
+
return void 0 === i && T$1.set(t.strings, i = new C$1(t)), i;
|
|
492
|
+
}
|
|
493
|
+
k(t) {
|
|
494
|
+
u$1(this._$AH) || (this._$AH = [], this._$AR());
|
|
495
|
+
const i = this._$AH;
|
|
496
|
+
let s,
|
|
497
|
+
e = 0;
|
|
498
|
+
for (const o of t) e === i.length ? i.push(s = new N$1(this.O(r$3()), this.O(r$3()), this, this.options)) : s = i[e], s._$AI(o), e++;
|
|
499
|
+
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
500
|
+
}
|
|
501
|
+
_$AR(t = this._$AA.nextSibling, i) {
|
|
502
|
+
var s;
|
|
503
|
+
for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
|
|
504
|
+
const i = t.nextSibling;
|
|
505
|
+
t.remove(), t = i;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
setConnected(t) {
|
|
509
|
+
var i;
|
|
510
|
+
void 0 === this._$AM && (this._$Cm = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
let S$2 = class S {
|
|
514
|
+
constructor(t, i, s, e, o) {
|
|
515
|
+
this.type = 1, this._$AH = b$1, 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 = b$1;
|
|
516
|
+
}
|
|
517
|
+
get tagName() {
|
|
518
|
+
return this.element.tagName;
|
|
519
|
+
}
|
|
520
|
+
get _$AU() {
|
|
521
|
+
return this._$AM._$AU;
|
|
522
|
+
}
|
|
523
|
+
_$AI(t, i = this, s, e) {
|
|
524
|
+
const o = this.strings;
|
|
525
|
+
let n = !1;
|
|
526
|
+
if (void 0 === o) t = P$1(this, t, i, 0), n = !d$1(t) || t !== this._$AH && t !== x$1, n && (this._$AH = t);else {
|
|
527
|
+
const e = t;
|
|
528
|
+
let l, h;
|
|
529
|
+
for (t = o[0], l = 0; l < o.length - 1; l++) h = P$1(this, e[s + l], i, l), h === x$1 && (h = this._$AH[l]), n || (n = !d$1(h) || h !== this._$AH[l]), h === b$1 ? t = b$1 : t !== b$1 && (t += (null != h ? h : "") + o[l + 1]), this._$AH[l] = h;
|
|
530
|
+
}
|
|
531
|
+
n && !e && this.j(t);
|
|
532
|
+
}
|
|
533
|
+
j(t) {
|
|
534
|
+
t === b$1 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
let M$1 = class M extends S$2 {
|
|
538
|
+
constructor() {
|
|
539
|
+
super(...arguments), this.type = 3;
|
|
540
|
+
}
|
|
541
|
+
j(t) {
|
|
542
|
+
this.element[this.name] = t === b$1 ? void 0 : t;
|
|
543
|
+
}
|
|
544
|
+
};
|
|
545
|
+
const R = s$4 ? s$4.emptyScript : "";
|
|
546
|
+
let k$1 = class k extends S$2 {
|
|
547
|
+
constructor() {
|
|
548
|
+
super(...arguments), this.type = 4;
|
|
549
|
+
}
|
|
550
|
+
j(t) {
|
|
551
|
+
t && t !== b$1 ? this.element.setAttribute(this.name, R) : this.element.removeAttribute(this.name);
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
let H$1 = class H extends S$2 {
|
|
555
|
+
constructor(t, i, s, e, o) {
|
|
556
|
+
super(t, i, s, e, o), this.type = 5;
|
|
557
|
+
}
|
|
558
|
+
_$AI(t, i = this) {
|
|
559
|
+
var s;
|
|
560
|
+
if ((t = null !== (s = P$1(this, t, i, 0)) && void 0 !== s ? s : b$1) === x$1) return;
|
|
561
|
+
const e = this._$AH,
|
|
562
|
+
o = t === b$1 && e !== b$1 || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
|
|
563
|
+
n = t !== b$1 && (e === b$1 || o);
|
|
564
|
+
o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
565
|
+
}
|
|
566
|
+
handleEvent(t) {
|
|
567
|
+
var i, s;
|
|
568
|
+
"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);
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
let I$1 = class I {
|
|
572
|
+
constructor(t, i, s) {
|
|
573
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
574
|
+
}
|
|
575
|
+
get _$AU() {
|
|
576
|
+
return this._$AM._$AU;
|
|
577
|
+
}
|
|
578
|
+
_$AI(t) {
|
|
579
|
+
P$1(this, t);
|
|
580
|
+
}
|
|
581
|
+
};
|
|
582
|
+
const z$1 = i$2.litHtmlPolyfillSupport;
|
|
583
|
+
null == z$1 || z$1(C$1, N$1), (null !== (t$2 = i$2.litHtmlVersions) && void 0 !== t$2 ? t$2 : i$2.litHtmlVersions = []).push("2.5.0");
|
|
9
584
|
|
|
10
|
-
|
|
585
|
+
/**
|
|
586
|
+
* @license
|
|
587
|
+
* Copyright 2019 Google LLC
|
|
588
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
589
|
+
*/
|
|
590
|
+
const t$1 = window.ShadowRoot && (void 0 === window.ShadyCSS || window.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
591
|
+
e$2 = Symbol(),
|
|
592
|
+
n$3 = new Map();
|
|
593
|
+
let s$3 = class s {
|
|
11
594
|
constructor(t, n) {
|
|
12
595
|
if (this._$cssResult$ = !0, n !== e$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
13
596
|
this.cssText = t;
|
|
14
597
|
}
|
|
15
|
-
|
|
16
598
|
get styleSheet() {
|
|
17
599
|
let e = n$3.get(this.cssText);
|
|
18
600
|
return t$1 && void 0 === e && (n$3.set(this.cssText, e = new CSSStyleSheet()), e.replaceSync(this.cssText)), e;
|
|
19
601
|
}
|
|
20
|
-
|
|
21
602
|
toString() {
|
|
22
603
|
return this.cssText;
|
|
23
604
|
}
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
605
|
+
};
|
|
27
606
|
const o$3 = t => new s$3("string" == typeof t ? t : t + "", e$2),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return o$3(e);
|
|
49
|
-
})(t) : t;
|
|
607
|
+
r$2 = (t, ...n) => {
|
|
608
|
+
const o = 1 === t.length ? t[0] : n.reduce((e, n, s) => e + (t => {
|
|
609
|
+
if (!0 === t._$cssResult$) return t.cssText;
|
|
610
|
+
if ("number" == typeof t) return t;
|
|
611
|
+
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.");
|
|
612
|
+
})(n) + t[s + 1], t[0]);
|
|
613
|
+
return new s$3(o, e$2);
|
|
614
|
+
},
|
|
615
|
+
i$1 = (e, n) => {
|
|
616
|
+
t$1 ? e.adoptedStyleSheets = n.map(t => t instanceof CSSStyleSheet ? t : t.styleSheet) : n.forEach(t => {
|
|
617
|
+
const n = document.createElement("style"),
|
|
618
|
+
s = window.litNonce;
|
|
619
|
+
void 0 !== s && n.setAttribute("nonce", s), n.textContent = t.cssText, e.appendChild(n);
|
|
620
|
+
});
|
|
621
|
+
},
|
|
622
|
+
S$1 = t$1 ? t => t : t => t instanceof CSSStyleSheet ? (t => {
|
|
623
|
+
let e = "";
|
|
624
|
+
for (const n of t.cssRules) e += n.cssText;
|
|
625
|
+
return o$3(e);
|
|
626
|
+
})(t) : t;
|
|
50
627
|
|
|
51
628
|
/**
|
|
52
629
|
* @license
|
|
53
630
|
* Copyright 2017 Google LLC
|
|
54
631
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
632
|
*/
|
|
56
|
-
|
|
57
633
|
var s$2;
|
|
58
|
-
|
|
59
634
|
const e$1 = window.trustedTypes,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
635
|
+
r$1 = e$1 ? e$1.emptyScript : "",
|
|
636
|
+
h$1 = window.reactiveElementPolyfillSupport,
|
|
637
|
+
o$2 = {
|
|
638
|
+
toAttribute(t, i) {
|
|
639
|
+
switch (i) {
|
|
640
|
+
case Boolean:
|
|
641
|
+
t = t ? r$1 : null;
|
|
642
|
+
break;
|
|
643
|
+
case Object:
|
|
644
|
+
case Array:
|
|
645
|
+
t = null == t ? t : JSON.stringify(t);
|
|
646
|
+
}
|
|
647
|
+
return t;
|
|
648
|
+
},
|
|
649
|
+
fromAttribute(t, i) {
|
|
650
|
+
let s = t;
|
|
651
|
+
switch (i) {
|
|
652
|
+
case Boolean:
|
|
653
|
+
s = null !== t;
|
|
654
|
+
break;
|
|
655
|
+
case Number:
|
|
656
|
+
s = null === t ? null : Number(t);
|
|
657
|
+
break;
|
|
658
|
+
case Object:
|
|
659
|
+
case Array:
|
|
660
|
+
try {
|
|
661
|
+
s = JSON.parse(t);
|
|
662
|
+
} catch (t) {
|
|
663
|
+
s = null;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
return s;
|
|
72
667
|
}
|
|
73
|
-
|
|
74
|
-
return t;
|
|
75
668
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
case Number:
|
|
86
|
-
s = null === t ? null : Number(t);
|
|
87
|
-
break;
|
|
88
|
-
|
|
89
|
-
case Object:
|
|
90
|
-
case Array:
|
|
91
|
-
try {
|
|
92
|
-
s = JSON.parse(t);
|
|
93
|
-
} catch (t) {
|
|
94
|
-
s = null;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return s;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
n$2 = (t, i) => i !== t && (i == i || t == t),
|
|
104
|
-
l$3 = {
|
|
105
|
-
attribute: !0,
|
|
106
|
-
type: String,
|
|
107
|
-
converter: o$2,
|
|
108
|
-
reflect: !1,
|
|
109
|
-
hasChanged: n$2
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
class a$1 extends HTMLElement {
|
|
669
|
+
n$2 = (t, i) => i !== t && (i == i || t == t),
|
|
670
|
+
l$3 = {
|
|
671
|
+
attribute: !0,
|
|
672
|
+
type: String,
|
|
673
|
+
converter: o$2,
|
|
674
|
+
reflect: !1,
|
|
675
|
+
hasChanged: n$2
|
|
676
|
+
};
|
|
677
|
+
let a$1 = class a extends HTMLElement {
|
|
113
678
|
constructor() {
|
|
114
679
|
super(), this._$Et = new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$Ei = null, this.o();
|
|
115
680
|
}
|
|
116
|
-
|
|
117
681
|
static addInitializer(t) {
|
|
118
682
|
var i;
|
|
119
683
|
null !== (i = this.l) && void 0 !== i || (this.l = []), this.l.push(t);
|
|
120
684
|
}
|
|
121
|
-
|
|
122
685
|
static get observedAttributes() {
|
|
123
686
|
this.finalize();
|
|
124
687
|
const t = [];
|
|
125
688
|
return this.elementProperties.forEach((i, s) => {
|
|
126
689
|
const e = this._$Eh(s, i);
|
|
127
|
-
|
|
128
690
|
void 0 !== e && (this._$Eu.set(e, s), t.push(e));
|
|
129
691
|
}), t;
|
|
130
692
|
}
|
|
131
|
-
|
|
132
693
|
static createProperty(t, i = l$3) {
|
|
133
694
|
if (i.state && (i.attribute = !1), this.finalize(), this.elementProperties.set(t, i), !i.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
134
695
|
const s = "symbol" == typeof t ? Symbol() : "__" + t,
|
|
135
|
-
|
|
696
|
+
e = this.getPropertyDescriptor(t, s, i);
|
|
136
697
|
void 0 !== e && Object.defineProperty(this.prototype, t, e);
|
|
137
698
|
}
|
|
138
699
|
}
|
|
139
|
-
|
|
140
700
|
static getPropertyDescriptor(t, i, s) {
|
|
141
701
|
return {
|
|
142
702
|
get() {
|
|
143
703
|
return this[i];
|
|
144
704
|
},
|
|
145
|
-
|
|
146
705
|
set(e) {
|
|
147
706
|
const r = this[t];
|
|
148
707
|
this[i] = e, this.requestUpdate(t, r, s);
|
|
149
708
|
},
|
|
150
|
-
|
|
151
709
|
configurable: !0,
|
|
152
710
|
enumerable: !0
|
|
153
711
|
};
|
|
154
712
|
}
|
|
155
|
-
|
|
156
713
|
static getPropertyOptions(t) {
|
|
157
714
|
return this.elementProperties.get(t) || l$3;
|
|
158
715
|
}
|
|
159
|
-
|
|
160
716
|
static finalize() {
|
|
161
717
|
if (this.hasOwnProperty("finalized")) return !1;
|
|
162
718
|
this.finalized = !0;
|
|
163
719
|
const t = Object.getPrototypeOf(this);
|
|
164
|
-
|
|
165
720
|
if (t.finalize(), this.elementProperties = new Map(t.elementProperties), this._$Eu = new Map(), this.hasOwnProperty("properties")) {
|
|
166
721
|
const t = this.properties,
|
|
167
|
-
|
|
168
|
-
|
|
722
|
+
i = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
169
723
|
for (const s of i) this.createProperty(s, t[s]);
|
|
170
724
|
}
|
|
171
|
-
|
|
172
725
|
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
173
726
|
}
|
|
174
|
-
|
|
175
727
|
static finalizeStyles(i) {
|
|
176
728
|
const s = [];
|
|
177
|
-
|
|
178
729
|
if (Array.isArray(i)) {
|
|
179
730
|
const e = new Set(i.flat(1 / 0).reverse());
|
|
180
|
-
|
|
181
731
|
for (const i of e) s.unshift(S$1(i));
|
|
182
732
|
} else void 0 !== i && s.push(S$1(i));
|
|
183
|
-
|
|
184
733
|
return s;
|
|
185
734
|
}
|
|
186
|
-
|
|
187
735
|
static _$Eh(t, i) {
|
|
188
736
|
const s = i.attribute;
|
|
189
737
|
return !1 === s ? void 0 : "string" == typeof s ? s : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
190
738
|
}
|
|
191
|
-
|
|
192
739
|
o() {
|
|
193
740
|
var t;
|
|
194
741
|
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));
|
|
195
742
|
}
|
|
196
|
-
|
|
197
743
|
addController(t) {
|
|
198
744
|
var i, s;
|
|
199
745
|
(null !== (i = this._$Eg) && void 0 !== i ? i : this._$Eg = []).push(t), void 0 !== this.renderRoot && this.isConnected && (null === (s = t.hostConnected) || void 0 === s || s.call(t));
|
|
200
746
|
}
|
|
201
|
-
|
|
202
747
|
removeController(t) {
|
|
203
748
|
var i;
|
|
204
749
|
null === (i = this._$Eg) || void 0 === i || i.splice(this._$Eg.indexOf(t) >>> 0, 1);
|
|
205
750
|
}
|
|
206
|
-
|
|
207
751
|
_$Em() {
|
|
208
752
|
this.constructor.elementProperties.forEach((t, i) => {
|
|
209
753
|
this.hasOwnProperty(i) && (this._$Et.set(i, this[i]), delete this[i]);
|
|
210
754
|
});
|
|
211
755
|
}
|
|
212
|
-
|
|
213
756
|
createRenderRoot() {
|
|
214
757
|
var t;
|
|
215
758
|
const s = null !== (t = this.shadowRoot) && void 0 !== t ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
216
759
|
return i$1(s, this.constructor.elementStyles), s;
|
|
217
760
|
}
|
|
218
|
-
|
|
219
761
|
connectedCallback() {
|
|
220
762
|
var t;
|
|
221
763
|
void 0 === this.renderRoot && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
|
|
@@ -223,9 +765,7 @@ class a$1 extends HTMLElement {
|
|
|
223
765
|
return null === (i = t.hostConnected) || void 0 === i ? void 0 : i.call(t);
|
|
224
766
|
});
|
|
225
767
|
}
|
|
226
|
-
|
|
227
768
|
enableUpdating(t) {}
|
|
228
|
-
|
|
229
769
|
disconnectedCallback() {
|
|
230
770
|
var t;
|
|
231
771
|
null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
|
|
@@ -233,65 +773,51 @@ class a$1 extends HTMLElement {
|
|
|
233
773
|
return null === (i = t.hostDisconnected) || void 0 === i ? void 0 : i.call(t);
|
|
234
774
|
});
|
|
235
775
|
}
|
|
236
|
-
|
|
237
776
|
attributeChangedCallback(t, i, s) {
|
|
238
777
|
this._$AK(t, s);
|
|
239
778
|
}
|
|
240
|
-
|
|
241
779
|
_$ES(t, i, s = l$3) {
|
|
242
780
|
var e, r;
|
|
243
|
-
|
|
244
781
|
const h = this.constructor._$Eh(t, s);
|
|
245
|
-
|
|
246
782
|
if (void 0 !== h && !0 === s.reflect) {
|
|
247
783
|
const n = (null !== (r = null === (e = s.converter) || void 0 === e ? void 0 : e.toAttribute) && void 0 !== r ? r : o$2.toAttribute)(i, s.type);
|
|
248
784
|
this._$Ei = t, null == n ? this.removeAttribute(h) : this.setAttribute(h, n), this._$Ei = null;
|
|
249
785
|
}
|
|
250
786
|
}
|
|
251
|
-
|
|
252
787
|
_$AK(t, i) {
|
|
253
788
|
var s, e, r;
|
|
254
|
-
|
|
255
789
|
const h = this.constructor,
|
|
256
|
-
|
|
257
|
-
|
|
790
|
+
n = h._$Eu.get(t);
|
|
258
791
|
if (void 0 !== n && this._$Ei !== n) {
|
|
259
792
|
const t = h.getPropertyOptions(n),
|
|
260
|
-
|
|
261
|
-
|
|
793
|
+
l = t.converter,
|
|
794
|
+
a = null !== (r = null !== (e = null === (s = l) || void 0 === s ? void 0 : s.fromAttribute) && void 0 !== e ? e : "function" == typeof l ? l : null) && void 0 !== r ? r : o$2.fromAttribute;
|
|
262
795
|
this._$Ei = n, this[n] = a(i, t.type), this._$Ei = null;
|
|
263
796
|
}
|
|
264
797
|
}
|
|
265
|
-
|
|
266
798
|
requestUpdate(t, i, s) {
|
|
267
799
|
let e = !0;
|
|
268
800
|
void 0 !== t && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || n$2)(this[t], i) ? (this._$AL.has(t) || this._$AL.set(t, i), !0 === s.reflect && this._$Ei !== t && (void 0 === this._$EC && (this._$EC = new Map()), this._$EC.set(t, s))) : e = !1), !this.isUpdatePending && e && (this._$Ep = this._$E_());
|
|
269
801
|
}
|
|
270
|
-
|
|
271
802
|
async _$E_() {
|
|
272
803
|
this.isUpdatePending = !0;
|
|
273
|
-
|
|
274
804
|
try {
|
|
275
805
|
await this._$Ep;
|
|
276
806
|
} catch (t) {
|
|
277
807
|
Promise.reject(t);
|
|
278
808
|
}
|
|
279
|
-
|
|
280
809
|
const t = this.scheduleUpdate();
|
|
281
810
|
return null != t && (await t), !this.isUpdatePending;
|
|
282
811
|
}
|
|
283
|
-
|
|
284
812
|
scheduleUpdate() {
|
|
285
813
|
return this.performUpdate();
|
|
286
814
|
}
|
|
287
|
-
|
|
288
815
|
performUpdate() {
|
|
289
816
|
var t;
|
|
290
817
|
if (!this.isUpdatePending) return;
|
|
291
818
|
this.hasUpdated, this._$Et && (this._$Et.forEach((t, i) => this[i] = t), this._$Et = void 0);
|
|
292
819
|
let i = !1;
|
|
293
820
|
const s = this._$AL;
|
|
294
|
-
|
|
295
821
|
try {
|
|
296
822
|
i = this.shouldUpdate(s), i ? (this.willUpdate(s), null === (t = this._$Eg) || void 0 === t || t.forEach(t => {
|
|
297
823
|
var i;
|
|
@@ -300,12 +826,9 @@ class a$1 extends HTMLElement {
|
|
|
300
826
|
} catch (t) {
|
|
301
827
|
throw i = !1, this._$EU(), t;
|
|
302
828
|
}
|
|
303
|
-
|
|
304
829
|
i && this._$AE(s);
|
|
305
830
|
}
|
|
306
|
-
|
|
307
831
|
willUpdate(t) {}
|
|
308
|
-
|
|
309
832
|
_$AE(t) {
|
|
310
833
|
var i;
|
|
311
834
|
null === (i = this._$Eg) || void 0 === i || i.forEach(t => {
|
|
@@ -313,33 +836,24 @@ class a$1 extends HTMLElement {
|
|
|
313
836
|
return null === (i = t.hostUpdated) || void 0 === i ? void 0 : i.call(t);
|
|
314
837
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
315
838
|
}
|
|
316
|
-
|
|
317
839
|
_$EU() {
|
|
318
840
|
this._$AL = new Map(), this.isUpdatePending = !1;
|
|
319
841
|
}
|
|
320
|
-
|
|
321
842
|
get updateComplete() {
|
|
322
843
|
return this.getUpdateComplete();
|
|
323
844
|
}
|
|
324
|
-
|
|
325
845
|
getUpdateComplete() {
|
|
326
846
|
return this._$Ep;
|
|
327
847
|
}
|
|
328
|
-
|
|
329
848
|
shouldUpdate(t) {
|
|
330
849
|
return !0;
|
|
331
850
|
}
|
|
332
|
-
|
|
333
851
|
update(t) {
|
|
334
852
|
void 0 !== this._$EC && (this._$EC.forEach((t, i) => this._$ES(i, this[i], t)), this._$EC = void 0), this._$EU();
|
|
335
853
|
}
|
|
336
|
-
|
|
337
854
|
updated(t) {}
|
|
338
|
-
|
|
339
855
|
firstUpdated(t) {}
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
|
|
856
|
+
};
|
|
343
857
|
a$1.finalized = !0, a$1.elementProperties = new Map(), a$1.elementStyles = [], a$1.shadowRootOptions = {
|
|
344
858
|
mode: "open"
|
|
345
859
|
}, null == h$1 || h$1({
|
|
@@ -352,77 +866,69 @@ a$1.finalized = !0, a$1.elementProperties = new Map(), a$1.elementStyles = [], a
|
|
|
352
866
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
353
867
|
*/
|
|
354
868
|
var t;
|
|
355
|
-
|
|
356
869
|
const i = globalThis.trustedTypes,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}) : void 0,
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
},
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}),
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
l = [];
|
|
404
|
-
let h,
|
|
870
|
+
s$1 = i ? i.createPolicy("lit-html", {
|
|
871
|
+
createHTML: t => t
|
|
872
|
+
}) : void 0,
|
|
873
|
+
e = `lit$${(Math.random() + "").slice(9)}$`,
|
|
874
|
+
o$1 = "?" + e,
|
|
875
|
+
n$1 = `<${o$1}>`,
|
|
876
|
+
l$2 = document,
|
|
877
|
+
h = (t = "") => l$2.createComment(t),
|
|
878
|
+
r = t => null === t || "object" != typeof t && "function" != typeof t,
|
|
879
|
+
d = Array.isArray,
|
|
880
|
+
u = t => {
|
|
881
|
+
var i;
|
|
882
|
+
return d(t) || "function" == typeof (null === (i = t) || void 0 === i ? void 0 : i[Symbol.iterator]);
|
|
883
|
+
},
|
|
884
|
+
c = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
885
|
+
v = /-->/g,
|
|
886
|
+
a = />/g,
|
|
887
|
+
f = />|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,
|
|
888
|
+
_ = /'/g,
|
|
889
|
+
m = /"/g,
|
|
890
|
+
g = /^(?:script|style|textarea|title)$/i,
|
|
891
|
+
p = t => (i, ...s) => ({
|
|
892
|
+
_$litType$: t,
|
|
893
|
+
strings: i,
|
|
894
|
+
values: s
|
|
895
|
+
}),
|
|
896
|
+
$ = p(1),
|
|
897
|
+
y = p(2),
|
|
898
|
+
b = Symbol.for("lit-noChange"),
|
|
899
|
+
w = Symbol.for("lit-nothing"),
|
|
900
|
+
T = new WeakMap(),
|
|
901
|
+
x = (t, i, s) => {
|
|
902
|
+
var e, o;
|
|
903
|
+
const n = null !== (e = null == s ? void 0 : s.renderBefore) && void 0 !== e ? e : i;
|
|
904
|
+
let l = n._$litPart$;
|
|
905
|
+
if (void 0 === l) {
|
|
906
|
+
const t = null !== (o = null == s ? void 0 : s.renderBefore) && void 0 !== o ? o : null;
|
|
907
|
+
n._$litPart$ = l = new N(i.insertBefore(h(), t), t, void 0, null != s ? s : {});
|
|
908
|
+
}
|
|
909
|
+
return l._$AI(t), l;
|
|
910
|
+
},
|
|
911
|
+
A = l$2.createTreeWalker(l$2, 129, null, !1),
|
|
912
|
+
C = (t, i) => {
|
|
913
|
+
const o = t.length - 1,
|
|
914
|
+
l = [];
|
|
915
|
+
let h,
|
|
405
916
|
r = 2 === i ? "<svg>" : "",
|
|
406
917
|
d = c;
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
let o,
|
|
918
|
+
for (let i = 0; i < o; i++) {
|
|
919
|
+
const s = t[i];
|
|
920
|
+
let o,
|
|
411
921
|
u,
|
|
412
922
|
p = -1,
|
|
413
923
|
$ = 0;
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
423
|
-
return [void 0 !== s$1 ? s$1.createHTML(u) : u, l];
|
|
424
|
-
};
|
|
425
|
-
|
|
924
|
+
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 : _) : d === m || d === _ ? d = f : d === v || d === a ? d = c : (d = f, h = void 0);
|
|
925
|
+
const y = d === f && t[i + 1].startsWith("/>") ? " " : "";
|
|
926
|
+
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);
|
|
927
|
+
}
|
|
928
|
+
const u = r + (t[o] || "<?>") + (2 === i ? "</svg>" : "");
|
|
929
|
+
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
930
|
+
return [void 0 !== s$1 ? s$1.createHTML(u) : u, l];
|
|
931
|
+
};
|
|
426
932
|
class E {
|
|
427
933
|
constructor({
|
|
428
934
|
strings: t,
|
|
@@ -431,28 +937,24 @@ class E {
|
|
|
431
937
|
let l;
|
|
432
938
|
this.parts = [];
|
|
433
939
|
let r = 0,
|
|
434
|
-
|
|
940
|
+
d = 0;
|
|
435
941
|
const u = t.length - 1,
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
942
|
+
c = this.parts,
|
|
943
|
+
[v, a] = C(t, s);
|
|
439
944
|
if (this.el = E.createElement(v, n), A.currentNode = this.el.content, 2 === s) {
|
|
440
945
|
const t = this.el.content,
|
|
441
|
-
|
|
946
|
+
i = t.firstChild;
|
|
442
947
|
i.remove(), t.append(...i.childNodes);
|
|
443
948
|
}
|
|
444
|
-
|
|
445
949
|
for (; null !== (l = A.nextNode()) && c.length < u;) {
|
|
446
950
|
if (1 === l.nodeType) {
|
|
447
951
|
if (l.hasAttributes()) {
|
|
448
952
|
const t = [];
|
|
449
|
-
|
|
450
953
|
for (const i of l.getAttributeNames()) if (i.endsWith("$lit$") || i.startsWith(e)) {
|
|
451
954
|
const s = a[d++];
|
|
452
|
-
|
|
453
955
|
if (t.push(i), void 0 !== s) {
|
|
454
956
|
const t = l.getAttribute(s.toLowerCase() + "$lit$").split(e),
|
|
455
|
-
|
|
957
|
+
i = /([.?@])?(.*)/.exec(s);
|
|
456
958
|
c.push({
|
|
457
959
|
type: 1,
|
|
458
960
|
index: r,
|
|
@@ -465,22 +967,17 @@ class E {
|
|
|
465
967
|
index: r
|
|
466
968
|
});
|
|
467
969
|
}
|
|
468
|
-
|
|
469
970
|
for (const i of t) l.removeAttribute(i);
|
|
470
971
|
}
|
|
471
|
-
|
|
472
972
|
if (g.test(l.tagName)) {
|
|
473
973
|
const t = l.textContent.split(e),
|
|
474
|
-
|
|
475
|
-
|
|
974
|
+
s = t.length - 1;
|
|
476
975
|
if (s > 0) {
|
|
477
976
|
l.textContent = i ? i.emptyScript : "";
|
|
478
|
-
|
|
479
977
|
for (let i = 0; i < s; i++) l.append(t[i], h()), A.nextNode(), c.push({
|
|
480
978
|
type: 2,
|
|
481
979
|
index: ++r
|
|
482
980
|
});
|
|
483
|
-
|
|
484
981
|
l.append(t[s], h());
|
|
485
982
|
}
|
|
486
983
|
}
|
|
@@ -489,24 +986,19 @@ class E {
|
|
|
489
986
|
index: r
|
|
490
987
|
});else {
|
|
491
988
|
let t = -1;
|
|
492
|
-
|
|
493
989
|
for (; -1 !== (t = l.data.indexOf(e, t + 1));) c.push({
|
|
494
990
|
type: 7,
|
|
495
991
|
index: r
|
|
496
992
|
}), t += e.length - 1;
|
|
497
993
|
}
|
|
498
|
-
|
|
499
994
|
r++;
|
|
500
995
|
}
|
|
501
996
|
}
|
|
502
|
-
|
|
503
997
|
static createElement(t, i) {
|
|
504
998
|
const s = l$2.createElement("template");
|
|
505
999
|
return s.innerHTML = t, s;
|
|
506
1000
|
}
|
|
507
|
-
|
|
508
1001
|
}
|
|
509
|
-
|
|
510
1002
|
function P(t, i, s = t, e) {
|
|
511
1003
|
var o, n, l, h;
|
|
512
1004
|
if (i === b) return i;
|
|
@@ -514,233 +1006,182 @@ function P(t, i, s = t, e) {
|
|
|
514
1006
|
const u = r(i) ? void 0 : i._$litDirective$;
|
|
515
1007
|
return (null == d ? void 0 : d.constructor) !== u && (null === (n = null == d ? void 0 : d._$AO) || void 0 === n || n.call(d, !1), void 0 === u ? d = void 0 : (d = new u(t), d._$AT(t, s, e)), void 0 !== e ? (null !== (l = (h = s)._$Cl) && void 0 !== l ? l : h._$Cl = [])[e] = d : s._$Cu = d), void 0 !== d && (i = P(t, d._$AS(t, i.values), d, e)), i;
|
|
516
1008
|
}
|
|
517
|
-
|
|
518
1009
|
class V {
|
|
519
1010
|
constructor(t, i) {
|
|
520
1011
|
this.v = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
521
1012
|
}
|
|
522
|
-
|
|
523
1013
|
get parentNode() {
|
|
524
1014
|
return this._$AM.parentNode;
|
|
525
1015
|
}
|
|
526
|
-
|
|
527
1016
|
get _$AU() {
|
|
528
1017
|
return this._$AM._$AU;
|
|
529
1018
|
}
|
|
530
|
-
|
|
531
1019
|
p(t) {
|
|
532
1020
|
var i;
|
|
533
1021
|
const {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
1022
|
+
el: {
|
|
1023
|
+
content: s
|
|
1024
|
+
},
|
|
1025
|
+
parts: e
|
|
1026
|
+
} = this._$AD,
|
|
1027
|
+
o = (null !== (i = null == t ? void 0 : t.creationScope) && void 0 !== i ? i : l$2).importNode(s, !0);
|
|
540
1028
|
A.currentNode = o;
|
|
541
1029
|
let n = A.nextNode(),
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
1030
|
+
h = 0,
|
|
1031
|
+
r = 0,
|
|
1032
|
+
d = e[0];
|
|
546
1033
|
for (; void 0 !== d;) {
|
|
547
1034
|
if (h === d.index) {
|
|
548
1035
|
let i;
|
|
549
1036
|
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];
|
|
550
1037
|
}
|
|
551
|
-
|
|
552
1038
|
h !== (null == d ? void 0 : d.index) && (n = A.nextNode(), h++);
|
|
553
1039
|
}
|
|
554
|
-
|
|
555
1040
|
return o;
|
|
556
1041
|
}
|
|
557
|
-
|
|
558
1042
|
m(t) {
|
|
559
1043
|
let i = 0;
|
|
560
|
-
|
|
561
1044
|
for (const s of this.v) void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
562
1045
|
}
|
|
563
|
-
|
|
564
1046
|
}
|
|
565
|
-
|
|
566
1047
|
class N {
|
|
567
1048
|
constructor(t, i, s, e) {
|
|
568
1049
|
var o;
|
|
569
1050
|
this.type = 2, this._$AH = w, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cg = null === (o = null == e ? void 0 : e.isConnected) || void 0 === o || o;
|
|
570
1051
|
}
|
|
571
|
-
|
|
572
1052
|
get _$AU() {
|
|
573
1053
|
var t, i;
|
|
574
1054
|
return null !== (i = null === (t = this._$AM) || void 0 === t ? void 0 : t._$AU) && void 0 !== i ? i : this._$Cg;
|
|
575
1055
|
}
|
|
576
|
-
|
|
577
1056
|
get parentNode() {
|
|
578
1057
|
let t = this._$AA.parentNode;
|
|
579
1058
|
const i = this._$AM;
|
|
580
1059
|
return void 0 !== i && 11 === t.nodeType && (t = i.parentNode), t;
|
|
581
1060
|
}
|
|
582
|
-
|
|
583
1061
|
get startNode() {
|
|
584
1062
|
return this._$AA;
|
|
585
1063
|
}
|
|
586
|
-
|
|
587
1064
|
get endNode() {
|
|
588
1065
|
return this._$AB;
|
|
589
1066
|
}
|
|
590
|
-
|
|
591
1067
|
_$AI(t, i = this) {
|
|
592
1068
|
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);
|
|
593
1069
|
}
|
|
594
|
-
|
|
595
1070
|
A(t, i = this._$AB) {
|
|
596
1071
|
return this._$AA.parentNode.insertBefore(t, i);
|
|
597
1072
|
}
|
|
598
|
-
|
|
599
1073
|
k(t) {
|
|
600
1074
|
this._$AH !== t && (this._$AR(), this._$AH = this.A(t));
|
|
601
1075
|
}
|
|
602
|
-
|
|
603
1076
|
$(t) {
|
|
604
1077
|
this._$AH !== w && r(this._$AH) ? this._$AA.nextSibling.data = t : this.k(l$2.createTextNode(t)), this._$AH = t;
|
|
605
1078
|
}
|
|
606
|
-
|
|
607
1079
|
T(t) {
|
|
608
1080
|
var i;
|
|
609
1081
|
const {
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
1082
|
+
values: s,
|
|
1083
|
+
_$litType$: e
|
|
1084
|
+
} = t,
|
|
1085
|
+
o = "number" == typeof e ? this._$AC(t) : (void 0 === e.el && (e.el = E.createElement(e.h, this.options)), e);
|
|
614
1086
|
if ((null === (i = this._$AH) || void 0 === i ? void 0 : i._$AD) === o) this._$AH.m(s);else {
|
|
615
1087
|
const t = new V(o, this),
|
|
616
|
-
|
|
1088
|
+
i = t.p(this.options);
|
|
617
1089
|
t.m(s), this.k(i), this._$AH = t;
|
|
618
1090
|
}
|
|
619
1091
|
}
|
|
620
|
-
|
|
621
1092
|
_$AC(t) {
|
|
622
1093
|
let i = T.get(t.strings);
|
|
623
1094
|
return void 0 === i && T.set(t.strings, i = new E(t)), i;
|
|
624
1095
|
}
|
|
625
|
-
|
|
626
1096
|
S(t) {
|
|
627
1097
|
d(this._$AH) || (this._$AH = [], this._$AR());
|
|
628
1098
|
const i = this._$AH;
|
|
629
1099
|
let s,
|
|
630
|
-
|
|
631
|
-
|
|
1100
|
+
e = 0;
|
|
632
1101
|
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++;
|
|
633
|
-
|
|
634
1102
|
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
635
1103
|
}
|
|
636
|
-
|
|
637
1104
|
_$AR(t = this._$AA.nextSibling, i) {
|
|
638
1105
|
var s;
|
|
639
|
-
|
|
640
1106
|
for (null === (s = this._$AP) || void 0 === s || s.call(this, !1, !0, i); t && t !== this._$AB;) {
|
|
641
1107
|
const i = t.nextSibling;
|
|
642
1108
|
t.remove(), t = i;
|
|
643
1109
|
}
|
|
644
1110
|
}
|
|
645
|
-
|
|
646
1111
|
setConnected(t) {
|
|
647
1112
|
var i;
|
|
648
1113
|
void 0 === this._$AM && (this._$Cg = t, null === (i = this._$AP) || void 0 === i || i.call(this, t));
|
|
649
1114
|
}
|
|
650
|
-
|
|
651
1115
|
}
|
|
652
|
-
|
|
653
1116
|
class S {
|
|
654
1117
|
constructor(t, i, s, e, o) {
|
|
655
1118
|
this.type = 1, this._$AH = w, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = o, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = w;
|
|
656
1119
|
}
|
|
657
|
-
|
|
658
1120
|
get tagName() {
|
|
659
1121
|
return this.element.tagName;
|
|
660
1122
|
}
|
|
661
|
-
|
|
662
1123
|
get _$AU() {
|
|
663
1124
|
return this._$AM._$AU;
|
|
664
1125
|
}
|
|
665
|
-
|
|
666
1126
|
_$AI(t, i = this, s, e) {
|
|
667
1127
|
const o = this.strings;
|
|
668
1128
|
let n = !1;
|
|
669
1129
|
if (void 0 === o) t = P(this, t, i, 0), n = !r(t) || t !== this._$AH && t !== b, n && (this._$AH = t);else {
|
|
670
1130
|
const e = t;
|
|
671
1131
|
let l, h;
|
|
672
|
-
|
|
673
1132
|
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;
|
|
674
1133
|
}
|
|
675
1134
|
n && !e && this.C(t);
|
|
676
1135
|
}
|
|
677
|
-
|
|
678
1136
|
C(t) {
|
|
679
1137
|
t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t ? t : "");
|
|
680
1138
|
}
|
|
681
|
-
|
|
682
1139
|
}
|
|
683
|
-
|
|
684
1140
|
class M extends S {
|
|
685
1141
|
constructor() {
|
|
686
1142
|
super(...arguments), this.type = 3;
|
|
687
1143
|
}
|
|
688
|
-
|
|
689
1144
|
C(t) {
|
|
690
1145
|
this.element[this.name] = t === w ? void 0 : t;
|
|
691
1146
|
}
|
|
692
|
-
|
|
693
1147
|
}
|
|
694
|
-
|
|
695
1148
|
const k = i ? i.emptyScript : "";
|
|
696
|
-
|
|
697
1149
|
class H extends S {
|
|
698
1150
|
constructor() {
|
|
699
1151
|
super(...arguments), this.type = 4;
|
|
700
1152
|
}
|
|
701
|
-
|
|
702
1153
|
C(t) {
|
|
703
1154
|
t && t !== w ? this.element.setAttribute(this.name, k) : this.element.removeAttribute(this.name);
|
|
704
1155
|
}
|
|
705
|
-
|
|
706
1156
|
}
|
|
707
|
-
|
|
708
1157
|
class I extends S {
|
|
709
1158
|
constructor(t, i, s, e, o) {
|
|
710
1159
|
super(t, i, s, e, o), this.type = 5;
|
|
711
1160
|
}
|
|
712
|
-
|
|
713
1161
|
_$AI(t, i = this) {
|
|
714
1162
|
var s;
|
|
715
1163
|
if ((t = null !== (s = P(this, t, i, 0)) && void 0 !== s ? s : w) === b) return;
|
|
716
1164
|
const e = this._$AH,
|
|
717
|
-
|
|
718
|
-
|
|
1165
|
+
o = t === w && e !== w || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive,
|
|
1166
|
+
n = t !== w && (e === w || o);
|
|
719
1167
|
o && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
720
1168
|
}
|
|
721
|
-
|
|
722
1169
|
handleEvent(t) {
|
|
723
1170
|
var i, s;
|
|
724
1171
|
"function" == typeof this._$AH ? this._$AH.call(null !== (s = null === (i = this.options) || void 0 === i ? void 0 : i.host) && void 0 !== s ? s : this.element, t) : this._$AH.handleEvent(t);
|
|
725
1172
|
}
|
|
726
|
-
|
|
727
1173
|
}
|
|
728
|
-
|
|
729
1174
|
class L {
|
|
730
1175
|
constructor(t, i, s) {
|
|
731
1176
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
732
1177
|
}
|
|
733
|
-
|
|
734
1178
|
get _$AU() {
|
|
735
1179
|
return this._$AM._$AU;
|
|
736
1180
|
}
|
|
737
|
-
|
|
738
1181
|
_$AI(t) {
|
|
739
1182
|
P(this, t);
|
|
740
1183
|
}
|
|
741
|
-
|
|
742
1184
|
}
|
|
743
|
-
|
|
744
1185
|
const z = window.litHtmlPolyfillSupport;
|
|
745
1186
|
null == z || z(E, N), (null !== (t = globalThis.litHtmlVersions) && void 0 !== t ? t : globalThis.litHtmlVersions = []).push("2.2.1");
|
|
746
1187
|
|
|
@@ -749,43 +1190,34 @@ null == z || z(E, N), (null !== (t = globalThis.litHtmlVersions) && void 0 !== t
|
|
|
749
1190
|
* Copyright 2017 Google LLC
|
|
750
1191
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
751
1192
|
*/
|
|
752
|
-
|
|
753
1193
|
var l$1, o;
|
|
754
|
-
|
|
755
1194
|
class s extends a$1 {
|
|
756
1195
|
constructor() {
|
|
757
1196
|
super(...arguments), this.renderOptions = {
|
|
758
1197
|
host: this
|
|
759
1198
|
}, this._$Dt = void 0;
|
|
760
1199
|
}
|
|
761
|
-
|
|
762
1200
|
createRenderRoot() {
|
|
763
1201
|
var t, e;
|
|
764
1202
|
const i = super.createRenderRoot();
|
|
765
1203
|
return null !== (t = (e = this.renderOptions).renderBefore) && void 0 !== t || (e.renderBefore = i.firstChild), i;
|
|
766
1204
|
}
|
|
767
|
-
|
|
768
1205
|
update(t) {
|
|
769
1206
|
const i = this.render();
|
|
770
1207
|
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Dt = x(i, this.renderRoot, this.renderOptions);
|
|
771
1208
|
}
|
|
772
|
-
|
|
773
1209
|
connectedCallback() {
|
|
774
1210
|
var t;
|
|
775
1211
|
super.connectedCallback(), null === (t = this._$Dt) || void 0 === t || t.setConnected(!0);
|
|
776
1212
|
}
|
|
777
|
-
|
|
778
1213
|
disconnectedCallback() {
|
|
779
1214
|
var t;
|
|
780
1215
|
super.disconnectedCallback(), null === (t = this._$Dt) || void 0 === t || t.setConnected(!1);
|
|
781
1216
|
}
|
|
782
|
-
|
|
783
1217
|
render() {
|
|
784
1218
|
return b;
|
|
785
1219
|
}
|
|
786
|
-
|
|
787
1220
|
}
|
|
788
|
-
|
|
789
1221
|
s.finalized = !0, s._$litElement$ = !0, null === (l$1 = globalThis.litElementHydrateSupport) || void 0 === l$1 || l$1.call(globalThis, {
|
|
790
1222
|
LitElement: s
|
|
791
1223
|
});
|
|
@@ -798,24 +1230,20 @@ null == n || n({
|
|
|
798
1230
|
var noop = {
|
|
799
1231
|
value: () => {}
|
|
800
1232
|
};
|
|
801
|
-
|
|
802
1233
|
function dispatch() {
|
|
803
1234
|
for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
|
|
804
1235
|
if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
|
|
805
1236
|
_[t] = [];
|
|
806
1237
|
}
|
|
807
|
-
|
|
808
1238
|
return new Dispatch(_);
|
|
809
1239
|
}
|
|
810
|
-
|
|
811
1240
|
function Dispatch(_) {
|
|
812
1241
|
this._ = _;
|
|
813
1242
|
}
|
|
814
|
-
|
|
815
1243
|
function parseTypenames$1(typenames, types) {
|
|
816
1244
|
return typenames.trim().split(/^|\s+/).map(function (t) {
|
|
817
1245
|
var name = "",
|
|
818
|
-
|
|
1246
|
+
i = t.indexOf(".");
|
|
819
1247
|
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
820
1248
|
if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
821
1249
|
return {
|
|
@@ -824,53 +1252,45 @@ function parseTypenames$1(typenames, types) {
|
|
|
824
1252
|
};
|
|
825
1253
|
});
|
|
826
1254
|
}
|
|
827
|
-
|
|
828
1255
|
Dispatch.prototype = dispatch.prototype = {
|
|
829
1256
|
constructor: Dispatch,
|
|
830
1257
|
on: function (typename, callback) {
|
|
831
1258
|
var _ = this._,
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
1259
|
+
T = parseTypenames$1(typename + "", _),
|
|
1260
|
+
t,
|
|
1261
|
+
i = -1,
|
|
1262
|
+
n = T.length;
|
|
836
1263
|
|
|
1264
|
+
// If no callback was specified, return the callback of the given type and name.
|
|
837
1265
|
if (arguments.length < 2) {
|
|
838
1266
|
while (++i < n) if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) return t;
|
|
839
|
-
|
|
840
1267
|
return;
|
|
841
|
-
}
|
|
842
|
-
// Otherwise, if a null callback was specified, remove callbacks of the given name.
|
|
843
|
-
|
|
1268
|
+
}
|
|
844
1269
|
|
|
1270
|
+
// If a type was specified, set the callback for the given type and name.
|
|
1271
|
+
// Otherwise, if a null callback was specified, remove callbacks of the given name.
|
|
845
1272
|
if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
|
|
846
|
-
|
|
847
1273
|
while (++i < n) {
|
|
848
1274
|
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);
|
|
849
1275
|
}
|
|
850
|
-
|
|
851
1276
|
return this;
|
|
852
1277
|
},
|
|
853
1278
|
copy: function () {
|
|
854
1279
|
var copy = {},
|
|
855
|
-
|
|
856
|
-
|
|
1280
|
+
_ = this._;
|
|
857
1281
|
for (var t in _) copy[t] = _[t].slice();
|
|
858
|
-
|
|
859
1282
|
return new Dispatch(copy);
|
|
860
1283
|
},
|
|
861
1284
|
call: function (type, that) {
|
|
862
1285
|
if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
|
|
863
1286
|
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
|
864
|
-
|
|
865
1287
|
for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
|
866
1288
|
},
|
|
867
1289
|
apply: function (type, that, args) {
|
|
868
1290
|
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
|
869
|
-
|
|
870
1291
|
for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
|
871
1292
|
}
|
|
872
1293
|
};
|
|
873
|
-
|
|
874
1294
|
function get$1(type, name) {
|
|
875
1295
|
for (var i = 0, n = type.length, c; i < n; ++i) {
|
|
876
1296
|
if ((c = type[i]).name === name) {
|
|
@@ -878,7 +1298,6 @@ function get$1(type, name) {
|
|
|
878
1298
|
}
|
|
879
1299
|
}
|
|
880
1300
|
}
|
|
881
|
-
|
|
882
1301
|
function set$1(type, name, callback) {
|
|
883
1302
|
for (var i = 0, n = type.length; i < n; ++i) {
|
|
884
1303
|
if (type[i].name === name) {
|
|
@@ -886,7 +1305,6 @@ function set$1(type, name, callback) {
|
|
|
886
1305
|
break;
|
|
887
1306
|
}
|
|
888
1307
|
}
|
|
889
|
-
|
|
890
1308
|
if (callback != null) type.push({
|
|
891
1309
|
name: name,
|
|
892
1310
|
value: callback
|
|
@@ -905,7 +1323,7 @@ var namespaces = {
|
|
|
905
1323
|
|
|
906
1324
|
function namespace (name) {
|
|
907
1325
|
var prefix = name += "",
|
|
908
|
-
|
|
1326
|
+
i = prefix.indexOf(":");
|
|
909
1327
|
if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
|
|
910
1328
|
return namespaces.hasOwnProperty(prefix) ? {
|
|
911
1329
|
space: namespaces[prefix],
|
|
@@ -916,24 +1334,21 @@ function namespace (name) {
|
|
|
916
1334
|
function creatorInherit(name) {
|
|
917
1335
|
return function () {
|
|
918
1336
|
var document = this.ownerDocument,
|
|
919
|
-
|
|
1337
|
+
uri = this.namespaceURI;
|
|
920
1338
|
return uri === xhtml && document.documentElement.namespaceURI === xhtml ? document.createElement(name) : document.createElementNS(uri, name);
|
|
921
1339
|
};
|
|
922
1340
|
}
|
|
923
|
-
|
|
924
1341
|
function creatorFixed(fullname) {
|
|
925
1342
|
return function () {
|
|
926
1343
|
return this.ownerDocument.createElementNS(fullname.space, fullname.local);
|
|
927
1344
|
};
|
|
928
1345
|
}
|
|
929
|
-
|
|
930
1346
|
function creator (name) {
|
|
931
1347
|
var fullname = namespace(name);
|
|
932
1348
|
return (fullname.local ? creatorFixed : creatorInherit)(fullname);
|
|
933
1349
|
}
|
|
934
1350
|
|
|
935
1351
|
function none() {}
|
|
936
|
-
|
|
937
1352
|
function selector (selector) {
|
|
938
1353
|
return selector == null ? none : function () {
|
|
939
1354
|
return this.querySelector(selector);
|
|
@@ -942,7 +1357,6 @@ function selector (selector) {
|
|
|
942
1357
|
|
|
943
1358
|
function selection_select (select) {
|
|
944
1359
|
if (typeof select !== "function") select = selector(select);
|
|
945
|
-
|
|
946
1360
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
947
1361
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
948
1362
|
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
@@ -951,7 +1365,6 @@ function selection_select (select) {
|
|
|
951
1365
|
}
|
|
952
1366
|
}
|
|
953
1367
|
}
|
|
954
|
-
|
|
955
1368
|
return new Selection$1(subgroups, this._parents);
|
|
956
1369
|
}
|
|
957
1370
|
|
|
@@ -968,7 +1381,6 @@ function array(x) {
|
|
|
968
1381
|
function empty() {
|
|
969
1382
|
return [];
|
|
970
1383
|
}
|
|
971
|
-
|
|
972
1384
|
function selectorAll (selector) {
|
|
973
1385
|
return selector == null ? empty : function () {
|
|
974
1386
|
return this.querySelectorAll(selector);
|
|
@@ -980,10 +1392,8 @@ function arrayAll(select) {
|
|
|
980
1392
|
return array(select.apply(this, arguments));
|
|
981
1393
|
};
|
|
982
1394
|
}
|
|
983
|
-
|
|
984
1395
|
function selection_selectAll (select) {
|
|
985
1396
|
if (typeof select === "function") select = arrayAll(select);else select = selectorAll(select);
|
|
986
|
-
|
|
987
1397
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
988
1398
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
989
1399
|
if (node = group[i]) {
|
|
@@ -992,7 +1402,6 @@ function selection_selectAll (select) {
|
|
|
992
1402
|
}
|
|
993
1403
|
}
|
|
994
1404
|
}
|
|
995
|
-
|
|
996
1405
|
return new Selection$1(subgroups, parents);
|
|
997
1406
|
}
|
|
998
1407
|
|
|
@@ -1008,40 +1417,33 @@ function childMatcher(selector) {
|
|
|
1008
1417
|
}
|
|
1009
1418
|
|
|
1010
1419
|
var find = Array.prototype.find;
|
|
1011
|
-
|
|
1012
1420
|
function childFind(match) {
|
|
1013
1421
|
return function () {
|
|
1014
1422
|
return find.call(this.children, match);
|
|
1015
1423
|
};
|
|
1016
1424
|
}
|
|
1017
|
-
|
|
1018
1425
|
function childFirst() {
|
|
1019
1426
|
return this.firstElementChild;
|
|
1020
1427
|
}
|
|
1021
|
-
|
|
1022
1428
|
function selection_selectChild (match) {
|
|
1023
1429
|
return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match)));
|
|
1024
1430
|
}
|
|
1025
1431
|
|
|
1026
1432
|
var filter = Array.prototype.filter;
|
|
1027
|
-
|
|
1028
1433
|
function children() {
|
|
1029
1434
|
return Array.from(this.children);
|
|
1030
1435
|
}
|
|
1031
|
-
|
|
1032
1436
|
function childrenFilter(match) {
|
|
1033
1437
|
return function () {
|
|
1034
1438
|
return filter.call(this.children, match);
|
|
1035
1439
|
};
|
|
1036
1440
|
}
|
|
1037
|
-
|
|
1038
1441
|
function selection_selectChildren (match) {
|
|
1039
1442
|
return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match)));
|
|
1040
1443
|
}
|
|
1041
1444
|
|
|
1042
1445
|
function selection_filter (match) {
|
|
1043
1446
|
if (typeof match !== "function") match = matcher(match);
|
|
1044
|
-
|
|
1045
1447
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
1046
1448
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
1047
1449
|
if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
|
|
@@ -1049,7 +1451,6 @@ function selection_filter (match) {
|
|
|
1049
1451
|
}
|
|
1050
1452
|
}
|
|
1051
1453
|
}
|
|
1052
|
-
|
|
1053
1454
|
return new Selection$1(subgroups, this._parents);
|
|
1054
1455
|
}
|
|
1055
1456
|
|
|
@@ -1091,12 +1492,13 @@ function constant$1 (x) {
|
|
|
1091
1492
|
|
|
1092
1493
|
function bindIndex(parent, group, enter, update, exit, data) {
|
|
1093
1494
|
var i = 0,
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1495
|
+
node,
|
|
1496
|
+
groupLength = group.length,
|
|
1497
|
+
dataLength = data.length;
|
|
1498
|
+
|
|
1499
|
+
// Put any non-null nodes that fit into update.
|
|
1097
1500
|
// Put any null nodes into enter.
|
|
1098
1501
|
// Put any remaining data into enter.
|
|
1099
|
-
|
|
1100
1502
|
for (; i < dataLength; ++i) {
|
|
1101
1503
|
if (node = group[i]) {
|
|
1102
1504
|
node.__data__ = data[i];
|
|
@@ -1104,44 +1506,42 @@ function bindIndex(parent, group, enter, update, exit, data) {
|
|
|
1104
1506
|
} else {
|
|
1105
1507
|
enter[i] = new EnterNode(parent, data[i]);
|
|
1106
1508
|
}
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1509
|
+
}
|
|
1109
1510
|
|
|
1511
|
+
// Put any non-null nodes that don’t fit into exit.
|
|
1110
1512
|
for (; i < groupLength; ++i) {
|
|
1111
1513
|
if (node = group[i]) {
|
|
1112
1514
|
exit[i] = node;
|
|
1113
1515
|
}
|
|
1114
1516
|
}
|
|
1115
1517
|
}
|
|
1116
|
-
|
|
1117
1518
|
function bindKey(parent, group, enter, update, exit, data, key) {
|
|
1118
1519
|
var i,
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1520
|
+
node,
|
|
1521
|
+
nodeByKeyValue = new Map(),
|
|
1522
|
+
groupLength = group.length,
|
|
1523
|
+
dataLength = data.length,
|
|
1524
|
+
keyValues = new Array(groupLength),
|
|
1525
|
+
keyValue;
|
|
1526
|
+
|
|
1527
|
+
// Compute the key for each node.
|
|
1125
1528
|
// If multiple nodes have the same key, the duplicates are added to exit.
|
|
1126
|
-
|
|
1127
1529
|
for (i = 0; i < groupLength; ++i) {
|
|
1128
1530
|
if (node = group[i]) {
|
|
1129
1531
|
keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + "";
|
|
1130
|
-
|
|
1131
1532
|
if (nodeByKeyValue.has(keyValue)) {
|
|
1132
1533
|
exit[i] = node;
|
|
1133
1534
|
} else {
|
|
1134
1535
|
nodeByKeyValue.set(keyValue, node);
|
|
1135
1536
|
}
|
|
1136
1537
|
}
|
|
1137
|
-
}
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
// Compute the key for each datum.
|
|
1138
1541
|
// If there a node associated with this key, join and add it to update.
|
|
1139
1542
|
// If there is not (or the key is a duplicate), add it to enter.
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
1543
|
for (i = 0; i < dataLength; ++i) {
|
|
1143
1544
|
keyValue = key.call(parent, data[i], i, data) + "";
|
|
1144
|
-
|
|
1145
1545
|
if (node = nodeByKeyValue.get(keyValue)) {
|
|
1146
1546
|
update[i] = node;
|
|
1147
1547
|
node.__data__ = data[i];
|
|
@@ -1149,62 +1549,58 @@ function bindKey(parent, group, enter, update, exit, data, key) {
|
|
|
1149
1549
|
} else {
|
|
1150
1550
|
enter[i] = new EnterNode(parent, data[i]);
|
|
1151
1551
|
}
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1552
|
+
}
|
|
1154
1553
|
|
|
1554
|
+
// Add any remaining nodes that were not bound to data to exit.
|
|
1155
1555
|
for (i = 0; i < groupLength; ++i) {
|
|
1156
1556
|
if ((node = group[i]) && nodeByKeyValue.get(keyValues[i]) === node) {
|
|
1157
1557
|
exit[i] = node;
|
|
1158
1558
|
}
|
|
1159
1559
|
}
|
|
1160
1560
|
}
|
|
1161
|
-
|
|
1162
1561
|
function datum(node) {
|
|
1163
1562
|
return node.__data__;
|
|
1164
1563
|
}
|
|
1165
|
-
|
|
1166
1564
|
function selection_data (value, key) {
|
|
1167
1565
|
if (!arguments.length) return Array.from(this, datum);
|
|
1168
1566
|
var bind = key ? bindKey : bindIndex,
|
|
1169
|
-
|
|
1170
|
-
|
|
1567
|
+
parents = this._parents,
|
|
1568
|
+
groups = this._groups;
|
|
1171
1569
|
if (typeof value !== "function") value = constant$1(value);
|
|
1172
|
-
|
|
1173
1570
|
for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
|
|
1174
1571
|
var parent = parents[j],
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
|
|
1572
|
+
group = groups[j],
|
|
1573
|
+
groupLength = group.length,
|
|
1574
|
+
data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),
|
|
1575
|
+
dataLength = data.length,
|
|
1576
|
+
enterGroup = enter[j] = new Array(dataLength),
|
|
1577
|
+
updateGroup = update[j] = new Array(dataLength),
|
|
1578
|
+
exitGroup = exit[j] = new Array(groupLength);
|
|
1579
|
+
bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
|
|
1580
|
+
|
|
1581
|
+
// Now connect the enter nodes to their following update node, such that
|
|
1183
1582
|
// appendChild can insert the materialized enter node before this node,
|
|
1184
1583
|
// rather than at the end of the parent node.
|
|
1185
|
-
|
|
1186
1584
|
for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
|
|
1187
1585
|
if (previous = enterGroup[i0]) {
|
|
1188
1586
|
if (i0 >= i1) i1 = i0 + 1;
|
|
1189
|
-
|
|
1190
1587
|
while (!(next = updateGroup[i1]) && ++i1 < dataLength);
|
|
1191
|
-
|
|
1192
1588
|
previous._next = next || null;
|
|
1193
1589
|
}
|
|
1194
1590
|
}
|
|
1195
1591
|
}
|
|
1196
|
-
|
|
1197
1592
|
update = new Selection$1(update, parents);
|
|
1198
1593
|
update._enter = enter;
|
|
1199
1594
|
update._exit = exit;
|
|
1200
1595
|
return update;
|
|
1201
|
-
}
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
// Given some data, this returns an array-like view of it: an object that
|
|
1202
1599
|
// exposes a length property and allows numeric indexing. Note that unlike
|
|
1203
1600
|
// selectAll, this isn’t worried about “live” collections because the resulting
|
|
1204
1601
|
// array will only be used briefly while data is being bound. (It is possible to
|
|
1205
1602
|
// cause the data to change while iterating by using a key function, but please
|
|
1206
1603
|
// don’t; we’d rather avoid a gratuitous copy.)
|
|
1207
|
-
|
|
1208
1604
|
function arraylike(data) {
|
|
1209
1605
|
return typeof data === "object" && "length" in data ? data // Array, TypedArray, NodeList, array-like
|
|
1210
1606
|
: Array.from(data); // Map, Set, iterable, string, or anything else
|
|
@@ -1216,28 +1612,24 @@ function selection_exit () {
|
|
|
1216
1612
|
|
|
1217
1613
|
function selection_join (onenter, onupdate, onexit) {
|
|
1218
1614
|
var enter = this.enter(),
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1615
|
+
update = this,
|
|
1616
|
+
exit = this.exit();
|
|
1222
1617
|
if (typeof onenter === "function") {
|
|
1223
1618
|
enter = onenter(enter);
|
|
1224
1619
|
if (enter) enter = enter.selection();
|
|
1225
1620
|
} else {
|
|
1226
1621
|
enter = enter.append(onenter + "");
|
|
1227
1622
|
}
|
|
1228
|
-
|
|
1229
1623
|
if (onupdate != null) {
|
|
1230
1624
|
update = onupdate(update);
|
|
1231
1625
|
if (update) update = update.selection();
|
|
1232
1626
|
}
|
|
1233
|
-
|
|
1234
1627
|
if (onexit == null) exit.remove();else onexit(exit);
|
|
1235
1628
|
return enter && update ? enter.merge(update).order() : update;
|
|
1236
1629
|
}
|
|
1237
1630
|
|
|
1238
1631
|
function selection_merge (context) {
|
|
1239
1632
|
var selection = context.selection ? context.selection() : context;
|
|
1240
|
-
|
|
1241
1633
|
for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
|
|
1242
1634
|
for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
1243
1635
|
if (node = group0[i] || group1[i]) {
|
|
@@ -1245,11 +1637,9 @@ function selection_merge (context) {
|
|
|
1245
1637
|
}
|
|
1246
1638
|
}
|
|
1247
1639
|
}
|
|
1248
|
-
|
|
1249
1640
|
for (; j < m0; ++j) {
|
|
1250
1641
|
merges[j] = groups0[j];
|
|
1251
1642
|
}
|
|
1252
|
-
|
|
1253
1643
|
return new Selection$1(merges, this._parents);
|
|
1254
1644
|
}
|
|
1255
1645
|
|
|
@@ -1262,30 +1652,24 @@ function selection_order () {
|
|
|
1262
1652
|
}
|
|
1263
1653
|
}
|
|
1264
1654
|
}
|
|
1265
|
-
|
|
1266
1655
|
return this;
|
|
1267
1656
|
}
|
|
1268
1657
|
|
|
1269
1658
|
function selection_sort (compare) {
|
|
1270
1659
|
if (!compare) compare = ascending;
|
|
1271
|
-
|
|
1272
1660
|
function compareNode(a, b) {
|
|
1273
1661
|
return a && b ? compare(a.__data__, b.__data__) : !a - !b;
|
|
1274
1662
|
}
|
|
1275
|
-
|
|
1276
1663
|
for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
|
|
1277
1664
|
for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
1278
1665
|
if (node = group[i]) {
|
|
1279
1666
|
sortgroup[i] = node;
|
|
1280
1667
|
}
|
|
1281
1668
|
}
|
|
1282
|
-
|
|
1283
1669
|
sortgroup.sort(compareNode);
|
|
1284
1670
|
}
|
|
1285
|
-
|
|
1286
1671
|
return new Selection$1(sortgroups, this._parents).order();
|
|
1287
1672
|
}
|
|
1288
|
-
|
|
1289
1673
|
function ascending(a, b) {
|
|
1290
1674
|
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
1291
1675
|
}
|
|
@@ -1308,16 +1692,12 @@ function selection_node () {
|
|
|
1308
1692
|
if (node) return node;
|
|
1309
1693
|
}
|
|
1310
1694
|
}
|
|
1311
|
-
|
|
1312
1695
|
return null;
|
|
1313
1696
|
}
|
|
1314
1697
|
|
|
1315
1698
|
function selection_size () {
|
|
1316
1699
|
let size = 0;
|
|
1317
|
-
|
|
1318
1700
|
for (const node of this) ++size; // eslint-disable-line no-unused-vars
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
1701
|
return size;
|
|
1322
1702
|
}
|
|
1323
1703
|
|
|
@@ -1331,7 +1711,6 @@ function selection_each (callback) {
|
|
|
1331
1711
|
if (node = group[i]) callback.call(node, node.__data__, i, group);
|
|
1332
1712
|
}
|
|
1333
1713
|
}
|
|
1334
|
-
|
|
1335
1714
|
return this;
|
|
1336
1715
|
}
|
|
1337
1716
|
|
|
@@ -1340,47 +1719,39 @@ function attrRemove$1(name) {
|
|
|
1340
1719
|
this.removeAttribute(name);
|
|
1341
1720
|
};
|
|
1342
1721
|
}
|
|
1343
|
-
|
|
1344
1722
|
function attrRemoveNS$1(fullname) {
|
|
1345
1723
|
return function () {
|
|
1346
1724
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
1347
1725
|
};
|
|
1348
1726
|
}
|
|
1349
|
-
|
|
1350
1727
|
function attrConstant$1(name, value) {
|
|
1351
1728
|
return function () {
|
|
1352
1729
|
this.setAttribute(name, value);
|
|
1353
1730
|
};
|
|
1354
1731
|
}
|
|
1355
|
-
|
|
1356
1732
|
function attrConstantNS$1(fullname, value) {
|
|
1357
1733
|
return function () {
|
|
1358
1734
|
this.setAttributeNS(fullname.space, fullname.local, value);
|
|
1359
1735
|
};
|
|
1360
1736
|
}
|
|
1361
|
-
|
|
1362
1737
|
function attrFunction$1(name, value) {
|
|
1363
1738
|
return function () {
|
|
1364
1739
|
var v = value.apply(this, arguments);
|
|
1365
1740
|
if (v == null) this.removeAttribute(name);else this.setAttribute(name, v);
|
|
1366
1741
|
};
|
|
1367
1742
|
}
|
|
1368
|
-
|
|
1369
1743
|
function attrFunctionNS$1(fullname, value) {
|
|
1370
1744
|
return function () {
|
|
1371
1745
|
var v = value.apply(this, arguments);
|
|
1372
1746
|
if (v == null) this.removeAttributeNS(fullname.space, fullname.local);else this.setAttributeNS(fullname.space, fullname.local, v);
|
|
1373
1747
|
};
|
|
1374
1748
|
}
|
|
1375
|
-
|
|
1376
1749
|
function selection_attr (name, value) {
|
|
1377
1750
|
var fullname = namespace(name);
|
|
1378
|
-
|
|
1379
1751
|
if (arguments.length < 2) {
|
|
1380
1752
|
var node = this.node();
|
|
1381
1753
|
return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname);
|
|
1382
1754
|
}
|
|
1383
|
-
|
|
1384
1755
|
return this.each((value == null ? fullname.local ? attrRemoveNS$1 : attrRemove$1 : typeof value === "function" ? fullname.local ? attrFunctionNS$1 : attrFunction$1 : fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, value));
|
|
1385
1756
|
}
|
|
1386
1757
|
|
|
@@ -1395,20 +1766,17 @@ function styleRemove$1(name) {
|
|
|
1395
1766
|
this.style.removeProperty(name);
|
|
1396
1767
|
};
|
|
1397
1768
|
}
|
|
1398
|
-
|
|
1399
1769
|
function styleConstant$1(name, value, priority) {
|
|
1400
1770
|
return function () {
|
|
1401
1771
|
this.style.setProperty(name, value, priority);
|
|
1402
1772
|
};
|
|
1403
1773
|
}
|
|
1404
|
-
|
|
1405
1774
|
function styleFunction$1(name, value, priority) {
|
|
1406
1775
|
return function () {
|
|
1407
1776
|
var v = value.apply(this, arguments);
|
|
1408
1777
|
if (v == null) this.style.removeProperty(name);else this.style.setProperty(name, v, priority);
|
|
1409
1778
|
};
|
|
1410
1779
|
}
|
|
1411
|
-
|
|
1412
1780
|
function selection_style (name, value, priority) {
|
|
1413
1781
|
return arguments.length > 1 ? this.each((value == null ? styleRemove$1 : typeof value === "function" ? styleFunction$1 : styleConstant$1)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name);
|
|
1414
1782
|
}
|
|
@@ -1421,20 +1789,17 @@ function propertyRemove(name) {
|
|
|
1421
1789
|
delete this[name];
|
|
1422
1790
|
};
|
|
1423
1791
|
}
|
|
1424
|
-
|
|
1425
1792
|
function propertyConstant(name, value) {
|
|
1426
1793
|
return function () {
|
|
1427
1794
|
this[name] = value;
|
|
1428
1795
|
};
|
|
1429
1796
|
}
|
|
1430
|
-
|
|
1431
1797
|
function propertyFunction(name, value) {
|
|
1432
1798
|
return function () {
|
|
1433
1799
|
var v = value.apply(this, arguments);
|
|
1434
1800
|
if (v == null) delete this[name];else this[name] = v;
|
|
1435
1801
|
};
|
|
1436
1802
|
}
|
|
1437
|
-
|
|
1438
1803
|
function selection_property (name, value) {
|
|
1439
1804
|
return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name];
|
|
1440
1805
|
}
|
|
@@ -1442,32 +1807,25 @@ function selection_property (name, value) {
|
|
|
1442
1807
|
function classArray(string) {
|
|
1443
1808
|
return string.trim().split(/^|\s+/);
|
|
1444
1809
|
}
|
|
1445
|
-
|
|
1446
1810
|
function classList(node) {
|
|
1447
1811
|
return node.classList || new ClassList(node);
|
|
1448
1812
|
}
|
|
1449
|
-
|
|
1450
1813
|
function ClassList(node) {
|
|
1451
1814
|
this._node = node;
|
|
1452
1815
|
this._names = classArray(node.getAttribute("class") || "");
|
|
1453
1816
|
}
|
|
1454
|
-
|
|
1455
1817
|
ClassList.prototype = {
|
|
1456
1818
|
add: function (name) {
|
|
1457
1819
|
var i = this._names.indexOf(name);
|
|
1458
|
-
|
|
1459
1820
|
if (i < 0) {
|
|
1460
1821
|
this._names.push(name);
|
|
1461
|
-
|
|
1462
1822
|
this._node.setAttribute("class", this._names.join(" "));
|
|
1463
1823
|
}
|
|
1464
1824
|
},
|
|
1465
1825
|
remove: function (name) {
|
|
1466
1826
|
var i = this._names.indexOf(name);
|
|
1467
|
-
|
|
1468
1827
|
if (i >= 0) {
|
|
1469
1828
|
this._names.splice(i, 1);
|
|
1470
|
-
|
|
1471
1829
|
this._node.setAttribute("class", this._names.join(" "));
|
|
1472
1830
|
}
|
|
1473
1831
|
},
|
|
@@ -1475,74 +1833,59 @@ ClassList.prototype = {
|
|
|
1475
1833
|
return this._names.indexOf(name) >= 0;
|
|
1476
1834
|
}
|
|
1477
1835
|
};
|
|
1478
|
-
|
|
1479
1836
|
function classedAdd(node, names) {
|
|
1480
1837
|
var list = classList(node),
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1838
|
+
i = -1,
|
|
1839
|
+
n = names.length;
|
|
1484
1840
|
while (++i < n) list.add(names[i]);
|
|
1485
1841
|
}
|
|
1486
|
-
|
|
1487
1842
|
function classedRemove(node, names) {
|
|
1488
1843
|
var list = classList(node),
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1844
|
+
i = -1,
|
|
1845
|
+
n = names.length;
|
|
1492
1846
|
while (++i < n) list.remove(names[i]);
|
|
1493
1847
|
}
|
|
1494
|
-
|
|
1495
1848
|
function classedTrue(names) {
|
|
1496
1849
|
return function () {
|
|
1497
1850
|
classedAdd(this, names);
|
|
1498
1851
|
};
|
|
1499
1852
|
}
|
|
1500
|
-
|
|
1501
1853
|
function classedFalse(names) {
|
|
1502
1854
|
return function () {
|
|
1503
1855
|
classedRemove(this, names);
|
|
1504
1856
|
};
|
|
1505
1857
|
}
|
|
1506
|
-
|
|
1507
1858
|
function classedFunction(names, value) {
|
|
1508
1859
|
return function () {
|
|
1509
1860
|
(value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
|
|
1510
1861
|
};
|
|
1511
1862
|
}
|
|
1512
|
-
|
|
1513
1863
|
function selection_classed (name, value) {
|
|
1514
1864
|
var names = classArray(name + "");
|
|
1515
|
-
|
|
1516
1865
|
if (arguments.length < 2) {
|
|
1517
1866
|
var list = classList(this.node()),
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1867
|
+
i = -1,
|
|
1868
|
+
n = names.length;
|
|
1521
1869
|
while (++i < n) if (!list.contains(names[i])) return false;
|
|
1522
|
-
|
|
1523
1870
|
return true;
|
|
1524
1871
|
}
|
|
1525
|
-
|
|
1526
1872
|
return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value));
|
|
1527
1873
|
}
|
|
1528
1874
|
|
|
1529
1875
|
function textRemove() {
|
|
1530
1876
|
this.textContent = "";
|
|
1531
1877
|
}
|
|
1532
|
-
|
|
1533
1878
|
function textConstant$1(value) {
|
|
1534
1879
|
return function () {
|
|
1535
1880
|
this.textContent = value;
|
|
1536
1881
|
};
|
|
1537
1882
|
}
|
|
1538
|
-
|
|
1539
1883
|
function textFunction$1(value) {
|
|
1540
1884
|
return function () {
|
|
1541
1885
|
var v = value.apply(this, arguments);
|
|
1542
1886
|
this.textContent = v == null ? "" : v;
|
|
1543
1887
|
};
|
|
1544
1888
|
}
|
|
1545
|
-
|
|
1546
1889
|
function selection_text (value) {
|
|
1547
1890
|
return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction$1 : textConstant$1)(value)) : this.node().textContent;
|
|
1548
1891
|
}
|
|
@@ -1550,20 +1893,17 @@ function selection_text (value) {
|
|
|
1550
1893
|
function htmlRemove() {
|
|
1551
1894
|
this.innerHTML = "";
|
|
1552
1895
|
}
|
|
1553
|
-
|
|
1554
1896
|
function htmlConstant(value) {
|
|
1555
1897
|
return function () {
|
|
1556
1898
|
this.innerHTML = value;
|
|
1557
1899
|
};
|
|
1558
1900
|
}
|
|
1559
|
-
|
|
1560
1901
|
function htmlFunction(value) {
|
|
1561
1902
|
return function () {
|
|
1562
1903
|
var v = value.apply(this, arguments);
|
|
1563
1904
|
this.innerHTML = v == null ? "" : v;
|
|
1564
1905
|
};
|
|
1565
1906
|
}
|
|
1566
|
-
|
|
1567
1907
|
function selection_html (value) {
|
|
1568
1908
|
return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML;
|
|
1569
1909
|
}
|
|
@@ -1571,7 +1911,6 @@ function selection_html (value) {
|
|
|
1571
1911
|
function raise() {
|
|
1572
1912
|
if (this.nextSibling) this.parentNode.appendChild(this);
|
|
1573
1913
|
}
|
|
1574
|
-
|
|
1575
1914
|
function selection_raise () {
|
|
1576
1915
|
return this.each(raise);
|
|
1577
1916
|
}
|
|
@@ -1579,7 +1918,6 @@ function selection_raise () {
|
|
|
1579
1918
|
function lower() {
|
|
1580
1919
|
if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
1581
1920
|
}
|
|
1582
|
-
|
|
1583
1921
|
function selection_lower () {
|
|
1584
1922
|
return this.each(lower);
|
|
1585
1923
|
}
|
|
@@ -1594,10 +1932,9 @@ function selection_append (name) {
|
|
|
1594
1932
|
function constantNull() {
|
|
1595
1933
|
return null;
|
|
1596
1934
|
}
|
|
1597
|
-
|
|
1598
1935
|
function selection_insert (name, before) {
|
|
1599
1936
|
var create = typeof name === "function" ? name : creator(name),
|
|
1600
|
-
|
|
1937
|
+
select = before == null ? constantNull : typeof before === "function" ? before : selector(before);
|
|
1601
1938
|
return this.select(function () {
|
|
1602
1939
|
return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);
|
|
1603
1940
|
});
|
|
@@ -1607,23 +1944,20 @@ function remove() {
|
|
|
1607
1944
|
var parent = this.parentNode;
|
|
1608
1945
|
if (parent) parent.removeChild(this);
|
|
1609
1946
|
}
|
|
1610
|
-
|
|
1611
1947
|
function selection_remove () {
|
|
1612
1948
|
return this.each(remove);
|
|
1613
1949
|
}
|
|
1614
1950
|
|
|
1615
1951
|
function selection_cloneShallow() {
|
|
1616
1952
|
var clone = this.cloneNode(false),
|
|
1617
|
-
|
|
1953
|
+
parent = this.parentNode;
|
|
1618
1954
|
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|
1619
1955
|
}
|
|
1620
|
-
|
|
1621
1956
|
function selection_cloneDeep() {
|
|
1622
1957
|
var clone = this.cloneNode(true),
|
|
1623
|
-
|
|
1958
|
+
parent = this.parentNode;
|
|
1624
1959
|
return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
|
|
1625
1960
|
}
|
|
1626
|
-
|
|
1627
1961
|
function selection_clone (deep) {
|
|
1628
1962
|
return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
|
|
1629
1963
|
}
|
|
@@ -1637,11 +1971,10 @@ function contextListener(listener) {
|
|
|
1637
1971
|
listener.call(this, event, this.__data__);
|
|
1638
1972
|
};
|
|
1639
1973
|
}
|
|
1640
|
-
|
|
1641
1974
|
function parseTypenames(typenames) {
|
|
1642
1975
|
return typenames.trim().split(/^|\s+/).map(function (t) {
|
|
1643
1976
|
var name = "",
|
|
1644
|
-
|
|
1977
|
+
i = t.indexOf(".");
|
|
1645
1978
|
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
1646
1979
|
return {
|
|
1647
1980
|
type: t,
|
|
@@ -1649,12 +1982,10 @@ function parseTypenames(typenames) {
|
|
|
1649
1982
|
};
|
|
1650
1983
|
});
|
|
1651
1984
|
}
|
|
1652
|
-
|
|
1653
1985
|
function onRemove(typename) {
|
|
1654
1986
|
return function () {
|
|
1655
1987
|
var on = this.__on;
|
|
1656
1988
|
if (!on) return;
|
|
1657
|
-
|
|
1658
1989
|
for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
|
|
1659
1990
|
if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
|
|
1660
1991
|
this.removeEventListener(o.type, o.listener, o.options);
|
|
@@ -1662,16 +1993,14 @@ function onRemove(typename) {
|
|
|
1662
1993
|
on[++i] = o;
|
|
1663
1994
|
}
|
|
1664
1995
|
}
|
|
1665
|
-
|
|
1666
1996
|
if (++i) on.length = i;else delete this.__on;
|
|
1667
1997
|
};
|
|
1668
1998
|
}
|
|
1669
|
-
|
|
1670
1999
|
function onAdd(typename, value, options) {
|
|
1671
2000
|
return function () {
|
|
1672
2001
|
var on = this.__on,
|
|
1673
|
-
|
|
1674
|
-
|
|
2002
|
+
o,
|
|
2003
|
+
listener = contextListener(value);
|
|
1675
2004
|
if (on) for (var j = 0, m = on.length; j < m; ++j) {
|
|
1676
2005
|
if ((o = on[j]).type === typename.type && o.name === typename.name) {
|
|
1677
2006
|
this.removeEventListener(o.type, o.listener, o.options);
|
|
@@ -1691,16 +2020,13 @@ function onAdd(typename, value, options) {
|
|
|
1691
2020
|
if (!on) this.__on = [o];else on.push(o);
|
|
1692
2021
|
};
|
|
1693
2022
|
}
|
|
1694
|
-
|
|
1695
2023
|
function selection_on (typename, value, options) {
|
|
1696
2024
|
var typenames = parseTypenames(typename + ""),
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
2025
|
+
i,
|
|
2026
|
+
n = typenames.length,
|
|
2027
|
+
t;
|
|
1701
2028
|
if (arguments.length < 2) {
|
|
1702
2029
|
var on = this.node().__on;
|
|
1703
|
-
|
|
1704
2030
|
if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
|
|
1705
2031
|
for (i = 0, o = on[j]; i < n; ++i) {
|
|
1706
2032
|
if ((t = typenames[i]).type === o.type && t.name === o.name) {
|
|
@@ -1710,40 +2036,32 @@ function selection_on (typename, value, options) {
|
|
|
1710
2036
|
}
|
|
1711
2037
|
return;
|
|
1712
2038
|
}
|
|
1713
|
-
|
|
1714
2039
|
on = value ? onAdd : onRemove;
|
|
1715
|
-
|
|
1716
2040
|
for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
|
|
1717
|
-
|
|
1718
2041
|
return this;
|
|
1719
2042
|
}
|
|
1720
2043
|
|
|
1721
2044
|
function dispatchEvent(node, type, params) {
|
|
1722
2045
|
var window = defaultView(node),
|
|
1723
|
-
|
|
1724
|
-
|
|
2046
|
+
event = window.CustomEvent;
|
|
1725
2047
|
if (typeof event === "function") {
|
|
1726
2048
|
event = new event(type, params);
|
|
1727
2049
|
} else {
|
|
1728
2050
|
event = window.document.createEvent("Event");
|
|
1729
2051
|
if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;else event.initEvent(type, false, false);
|
|
1730
2052
|
}
|
|
1731
|
-
|
|
1732
2053
|
node.dispatchEvent(event);
|
|
1733
2054
|
}
|
|
1734
|
-
|
|
1735
2055
|
function dispatchConstant(type, params) {
|
|
1736
2056
|
return function () {
|
|
1737
2057
|
return dispatchEvent(this, type, params);
|
|
1738
2058
|
};
|
|
1739
2059
|
}
|
|
1740
|
-
|
|
1741
2060
|
function dispatchFunction(type, params) {
|
|
1742
2061
|
return function () {
|
|
1743
2062
|
return dispatchEvent(this, type, params.apply(this, arguments));
|
|
1744
2063
|
};
|
|
1745
2064
|
}
|
|
1746
|
-
|
|
1747
2065
|
function selection_dispatch (type, params) {
|
|
1748
2066
|
return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params));
|
|
1749
2067
|
}
|
|
@@ -1761,15 +2079,12 @@ function Selection$1(groups, parents) {
|
|
|
1761
2079
|
this._groups = groups;
|
|
1762
2080
|
this._parents = parents;
|
|
1763
2081
|
}
|
|
1764
|
-
|
|
1765
2082
|
function selection() {
|
|
1766
2083
|
return new Selection$1([[document.documentElement]], root);
|
|
1767
2084
|
}
|
|
1768
|
-
|
|
1769
2085
|
function selection_selection() {
|
|
1770
2086
|
return this;
|
|
1771
2087
|
}
|
|
1772
|
-
|
|
1773
2088
|
Selection$1.prototype = selection.prototype = {
|
|
1774
2089
|
constructor: Selection$1,
|
|
1775
2090
|
select: selection_select,
|
|
@@ -1819,9 +2134,7 @@ function define (constructor, factory, prototype) {
|
|
|
1819
2134
|
}
|
|
1820
2135
|
function extend(parent, definition) {
|
|
1821
2136
|
var prototype = Object.create(parent.prototype);
|
|
1822
|
-
|
|
1823
2137
|
for (var key in definition) prototype[key] = definition[key];
|
|
1824
|
-
|
|
1825
2138
|
return prototype;
|
|
1826
2139
|
}
|
|
1827
2140
|
|
|
@@ -1829,15 +2142,15 @@ function Color() {}
|
|
|
1829
2142
|
var darker = 0.7;
|
|
1830
2143
|
var brighter = 1 / darker;
|
|
1831
2144
|
var reI = "\\s*([+-]?\\d+)\\s*",
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
2145
|
+
reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
2146
|
+
reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
2147
|
+
reHex = /^#([0-9a-f]{3,8})$/,
|
|
2148
|
+
reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
|
|
2149
|
+
reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
|
|
2150
|
+
reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
|
|
2151
|
+
reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
|
|
2152
|
+
reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
|
|
2153
|
+
reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
|
|
1841
2154
|
var named = {
|
|
1842
2155
|
aliceblue: 0xf0f8ff,
|
|
1843
2156
|
antiquewhite: 0xfaebd7,
|
|
@@ -2002,19 +2315,15 @@ define(Color, color, {
|
|
|
2002
2315
|
formatRgb: color_formatRgb,
|
|
2003
2316
|
toString: color_formatRgb
|
|
2004
2317
|
});
|
|
2005
|
-
|
|
2006
2318
|
function color_formatHex() {
|
|
2007
2319
|
return this.rgb().formatHex();
|
|
2008
2320
|
}
|
|
2009
|
-
|
|
2010
2321
|
function color_formatHsl() {
|
|
2011
2322
|
return hslConvert(this).formatHsl();
|
|
2012
2323
|
}
|
|
2013
|
-
|
|
2014
2324
|
function color_formatRgb() {
|
|
2015
2325
|
return this.rgb().formatRgb();
|
|
2016
2326
|
}
|
|
2017
|
-
|
|
2018
2327
|
function color(format) {
|
|
2019
2328
|
var m, l;
|
|
2020
2329
|
format = (format + "").trim().toLowerCase();
|
|
@@ -2032,16 +2341,13 @@ function color(format) {
|
|
|
2032
2341
|
: named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
|
|
2033
2342
|
: format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
|
|
2034
2343
|
}
|
|
2035
|
-
|
|
2036
2344
|
function rgbn(n) {
|
|
2037
2345
|
return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
2038
2346
|
}
|
|
2039
|
-
|
|
2040
2347
|
function rgba(r, g, b, a) {
|
|
2041
2348
|
if (a <= 0) r = g = b = NaN;
|
|
2042
2349
|
return new Rgb(r, g, b, a);
|
|
2043
2350
|
}
|
|
2044
|
-
|
|
2045
2351
|
function rgbConvert(o) {
|
|
2046
2352
|
if (!(o instanceof Color)) o = color(o);
|
|
2047
2353
|
if (!o) return new Rgb();
|
|
@@ -2078,27 +2384,22 @@ define(Rgb, rgb, extend(Color, {
|
|
|
2078
2384
|
formatRgb: rgb_formatRgb,
|
|
2079
2385
|
toString: rgb_formatRgb
|
|
2080
2386
|
}));
|
|
2081
|
-
|
|
2082
2387
|
function rgb_formatHex() {
|
|
2083
2388
|
return "#" + hex(this.r) + hex(this.g) + hex(this.b);
|
|
2084
2389
|
}
|
|
2085
|
-
|
|
2086
2390
|
function rgb_formatRgb() {
|
|
2087
2391
|
var a = this.opacity;
|
|
2088
2392
|
a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
2089
2393
|
return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")");
|
|
2090
2394
|
}
|
|
2091
|
-
|
|
2092
2395
|
function hex(value) {
|
|
2093
2396
|
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
2094
2397
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
2095
2398
|
}
|
|
2096
|
-
|
|
2097
2399
|
function hsla(h, s, l, a) {
|
|
2098
2400
|
if (a <= 0) h = s = l = NaN;else if (l <= 0 || l >= 1) h = s = NaN;else if (s <= 0) h = NaN;
|
|
2099
2401
|
return new Hsl(h, s, l, a);
|
|
2100
2402
|
}
|
|
2101
|
-
|
|
2102
2403
|
function hslConvert(o) {
|
|
2103
2404
|
if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
|
|
2104
2405
|
if (!(o instanceof Color)) o = color(o);
|
|
@@ -2106,14 +2407,13 @@ function hslConvert(o) {
|
|
|
2106
2407
|
if (o instanceof Hsl) return o;
|
|
2107
2408
|
o = o.rgb();
|
|
2108
2409
|
var r = o.r / 255,
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2410
|
+
g = o.g / 255,
|
|
2411
|
+
b = o.b / 255,
|
|
2412
|
+
min = Math.min(r, g, b),
|
|
2413
|
+
max = Math.max(r, g, b),
|
|
2414
|
+
h = NaN,
|
|
2415
|
+
s = max - min,
|
|
2416
|
+
l = (max + min) / 2;
|
|
2117
2417
|
if (s) {
|
|
2118
2418
|
if (r === max) h = (g - b) / s + (g < b) * 6;else if (g === max) h = (b - r) / s + 2;else h = (r - g) / s + 4;
|
|
2119
2419
|
s /= l < 0.5 ? max + min : 2 - max - min;
|
|
@@ -2121,20 +2421,17 @@ function hslConvert(o) {
|
|
|
2121
2421
|
} else {
|
|
2122
2422
|
s = l > 0 && l < 1 ? 0 : h;
|
|
2123
2423
|
}
|
|
2124
|
-
|
|
2125
2424
|
return new Hsl(h, s, l, o.opacity);
|
|
2126
2425
|
}
|
|
2127
2426
|
function hsl(h, s, l, opacity) {
|
|
2128
2427
|
return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
|
|
2129
2428
|
}
|
|
2130
|
-
|
|
2131
2429
|
function Hsl(h, s, l, opacity) {
|
|
2132
2430
|
this.h = +h;
|
|
2133
2431
|
this.s = +s;
|
|
2134
2432
|
this.l = +l;
|
|
2135
2433
|
this.opacity = +opacity;
|
|
2136
2434
|
}
|
|
2137
|
-
|
|
2138
2435
|
define(Hsl, hsl, extend(Color, {
|
|
2139
2436
|
brighter: function (k) {
|
|
2140
2437
|
k = k == null ? brighter : Math.pow(brighter, k);
|
|
@@ -2146,10 +2443,10 @@ define(Hsl, hsl, extend(Color, {
|
|
|
2146
2443
|
},
|
|
2147
2444
|
rgb: function () {
|
|
2148
2445
|
var h = this.h % 360 + (this.h < 0) * 360,
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2446
|
+
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
2447
|
+
l = this.l,
|
|
2448
|
+
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
2449
|
+
m1 = 2 * l - m2;
|
|
2153
2450
|
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);
|
|
2154
2451
|
},
|
|
2155
2452
|
displayable: function () {
|
|
@@ -2161,8 +2458,8 @@ define(Hsl, hsl, extend(Color, {
|
|
|
2161
2458
|
return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")");
|
|
2162
2459
|
}
|
|
2163
2460
|
}));
|
|
2164
|
-
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
2165
2461
|
|
|
2462
|
+
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
2166
2463
|
function hsl2rgb(h, m1, m2) {
|
|
2167
2464
|
return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
|
|
2168
2465
|
}
|
|
@@ -2174,7 +2471,6 @@ function linear(a, d) {
|
|
|
2174
2471
|
return a + t * d;
|
|
2175
2472
|
};
|
|
2176
2473
|
}
|
|
2177
|
-
|
|
2178
2474
|
function exponential(a, b, y) {
|
|
2179
2475
|
return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function (t) {
|
|
2180
2476
|
return Math.pow(a + t * b, y);
|
|
@@ -2192,12 +2488,11 @@ function nogamma(a, b) {
|
|
|
2192
2488
|
|
|
2193
2489
|
var interpolateRgb = (function rgbGamma(y) {
|
|
2194
2490
|
var color = gamma(y);
|
|
2195
|
-
|
|
2196
2491
|
function rgb$1(start, end) {
|
|
2197
2492
|
var r = color((start = rgb(start)).r, (end = rgb(end)).r),
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2493
|
+
g = color(start.g, end.g),
|
|
2494
|
+
b = color(start.b, end.b),
|
|
2495
|
+
opacity = nogamma(start.opacity, end.opacity);
|
|
2201
2496
|
return function (t) {
|
|
2202
2497
|
start.r = r(t);
|
|
2203
2498
|
start.g = g(t);
|
|
@@ -2206,7 +2501,6 @@ var interpolateRgb = (function rgbGamma(y) {
|
|
|
2206
2501
|
return start + "";
|
|
2207
2502
|
};
|
|
2208
2503
|
}
|
|
2209
|
-
|
|
2210
2504
|
rgb$1.gamma = rgbGamma;
|
|
2211
2505
|
return rgb$1;
|
|
2212
2506
|
})(1);
|
|
@@ -2218,38 +2512,36 @@ function interpolateNumber (a, b) {
|
|
|
2218
2512
|
}
|
|
2219
2513
|
|
|
2220
2514
|
var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
|
|
2221
|
-
|
|
2222
|
-
|
|
2515
|
+
reB = new RegExp(reA.source, "g");
|
|
2223
2516
|
function zero(b) {
|
|
2224
2517
|
return function () {
|
|
2225
2518
|
return b;
|
|
2226
2519
|
};
|
|
2227
2520
|
}
|
|
2228
|
-
|
|
2229
2521
|
function one(b) {
|
|
2230
2522
|
return function (t) {
|
|
2231
2523
|
return b(t) + "";
|
|
2232
2524
|
};
|
|
2233
2525
|
}
|
|
2234
|
-
|
|
2235
2526
|
function interpolateString (a, b) {
|
|
2236
2527
|
var bi = reA.lastIndex = reB.lastIndex = 0,
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
// Coerce inputs to strings.
|
|
2528
|
+
// scan index for next number in b
|
|
2529
|
+
am,
|
|
2530
|
+
// current match in a
|
|
2531
|
+
bm,
|
|
2532
|
+
// current match in b
|
|
2533
|
+
bs,
|
|
2534
|
+
// string preceding current number in b, if any
|
|
2535
|
+
i = -1,
|
|
2536
|
+
// index in s
|
|
2537
|
+
s = [],
|
|
2538
|
+
// string constants and placeholders
|
|
2539
|
+
q = []; // number interpolators
|
|
2250
2540
|
|
|
2251
|
-
|
|
2541
|
+
// Coerce inputs to strings.
|
|
2542
|
+
a = a + "", b = b + "";
|
|
2252
2543
|
|
|
2544
|
+
// Interpolate pairs of numbers in a & b.
|
|
2253
2545
|
while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
|
|
2254
2546
|
if ((bs = bm.index) > bi) {
|
|
2255
2547
|
// a string precedes the next number in b
|
|
@@ -2257,7 +2549,6 @@ function interpolateString (a, b) {
|
|
|
2257
2549
|
if (s[i]) s[i] += bs; // coalesce with previous string
|
|
2258
2550
|
else s[++i] = bs;
|
|
2259
2551
|
}
|
|
2260
|
-
|
|
2261
2552
|
if ((am = am[0]) === (bm = bm[0])) {
|
|
2262
2553
|
// numbers in a & b match
|
|
2263
2554
|
if (s[i]) s[i] += bm; // coalesce with previous string
|
|
@@ -2270,22 +2561,20 @@ function interpolateString (a, b) {
|
|
|
2270
2561
|
x: interpolateNumber(am, bm)
|
|
2271
2562
|
});
|
|
2272
2563
|
}
|
|
2273
|
-
|
|
2274
2564
|
bi = reB.lastIndex;
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2565
|
+
}
|
|
2277
2566
|
|
|
2567
|
+
// Add remains of b.
|
|
2278
2568
|
if (bi < b.length) {
|
|
2279
2569
|
bs = b.slice(bi);
|
|
2280
2570
|
if (s[i]) s[i] += bs; // coalesce with previous string
|
|
2281
2571
|
else s[++i] = bs;
|
|
2282
|
-
}
|
|
2283
|
-
// Otherwise, interpolate each of the numbers and rejoin the string.
|
|
2284
|
-
|
|
2572
|
+
}
|
|
2285
2573
|
|
|
2574
|
+
// Special optimization for only a single match.
|
|
2575
|
+
// Otherwise, interpolate each of the numbers and rejoin the string.
|
|
2286
2576
|
return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) {
|
|
2287
2577
|
for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
|
|
2288
|
-
|
|
2289
2578
|
return s.join("");
|
|
2290
2579
|
});
|
|
2291
2580
|
}
|
|
@@ -2316,8 +2605,8 @@ function decompose (a, b, c, d, e, f) {
|
|
|
2316
2605
|
}
|
|
2317
2606
|
|
|
2318
2607
|
var svgNode;
|
|
2319
|
-
/* eslint-disable no-undef */
|
|
2320
2608
|
|
|
2609
|
+
/* eslint-disable no-undef */
|
|
2321
2610
|
function parseCss(value) {
|
|
2322
2611
|
const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + "");
|
|
2323
2612
|
return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
|
|
@@ -2335,7 +2624,6 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
|
|
|
2335
2624
|
function pop(s) {
|
|
2336
2625
|
return s.length ? s.pop() + " " : "";
|
|
2337
2626
|
}
|
|
2338
|
-
|
|
2339
2627
|
function translate(xa, ya, xb, yb, s, q) {
|
|
2340
2628
|
if (xa !== xb || ya !== yb) {
|
|
2341
2629
|
var i = s.push("translate(", null, pxComma, null, pxParen);
|
|
@@ -2350,11 +2638,9 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
|
|
|
2350
2638
|
s.push("translate(" + xb + pxComma + yb + pxParen);
|
|
2351
2639
|
}
|
|
2352
2640
|
}
|
|
2353
|
-
|
|
2354
2641
|
function rotate(a, b, s, q) {
|
|
2355
2642
|
if (a !== b) {
|
|
2356
2643
|
if (a - b > 180) b += 360;else if (b - a > 180) a += 360; // shortest path
|
|
2357
|
-
|
|
2358
2644
|
q.push({
|
|
2359
2645
|
i: s.push(pop(s) + "rotate(", null, degParen) - 2,
|
|
2360
2646
|
x: interpolateNumber(a, b)
|
|
@@ -2363,7 +2649,6 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
|
|
|
2363
2649
|
s.push(pop(s) + "rotate(" + b + degParen);
|
|
2364
2650
|
}
|
|
2365
2651
|
}
|
|
2366
|
-
|
|
2367
2652
|
function skewX(a, b, s, q) {
|
|
2368
2653
|
if (a !== b) {
|
|
2369
2654
|
q.push({
|
|
@@ -2374,7 +2659,6 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
|
|
|
2374
2659
|
s.push(pop(s) + "skewX(" + b + degParen);
|
|
2375
2660
|
}
|
|
2376
2661
|
}
|
|
2377
|
-
|
|
2378
2662
|
function scale(xa, ya, xb, yb, s, q) {
|
|
2379
2663
|
if (xa !== xb || ya !== yb) {
|
|
2380
2664
|
var i = s.push(pop(s) + "scale(", null, ",", null, ")");
|
|
@@ -2389,59 +2673,51 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
|
|
|
2389
2673
|
s.push(pop(s) + "scale(" + xb + "," + yb + ")");
|
|
2390
2674
|
}
|
|
2391
2675
|
}
|
|
2392
|
-
|
|
2393
2676
|
return function (a, b) {
|
|
2394
2677
|
var s = [],
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2678
|
+
// string constants and placeholders
|
|
2679
|
+
q = []; // number interpolators
|
|
2398
2680
|
a = parse(a), b = parse(b);
|
|
2399
2681
|
translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
|
|
2400
2682
|
rotate(a.rotate, b.rotate, s, q);
|
|
2401
2683
|
skewX(a.skewX, b.skewX, s, q);
|
|
2402
2684
|
scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
|
|
2403
2685
|
a = b = null; // gc
|
|
2404
|
-
|
|
2405
2686
|
return function (t) {
|
|
2406
2687
|
var i = -1,
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2688
|
+
n = q.length,
|
|
2689
|
+
o;
|
|
2410
2690
|
while (++i < n) s[(o = q[i]).i] = o.x(t);
|
|
2411
|
-
|
|
2412
2691
|
return s.join("");
|
|
2413
2692
|
};
|
|
2414
2693
|
};
|
|
2415
2694
|
}
|
|
2416
|
-
|
|
2417
2695
|
var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
|
|
2418
2696
|
var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
|
|
2419
2697
|
|
|
2420
2698
|
var frame = 0,
|
|
2421
|
-
|
|
2422
|
-
timeout$1 = 0,
|
|
2423
|
-
|
|
2424
|
-
interval = 0,
|
|
2425
|
-
|
|
2426
|
-
pokeDelay = 1000,
|
|
2427
|
-
|
|
2428
|
-
taskHead,
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
};
|
|
2699
|
+
// is an animation frame pending?
|
|
2700
|
+
timeout$1 = 0,
|
|
2701
|
+
// is a timeout pending?
|
|
2702
|
+
interval = 0,
|
|
2703
|
+
// are any timers active?
|
|
2704
|
+
pokeDelay = 1000,
|
|
2705
|
+
// how frequently we check for clock skew
|
|
2706
|
+
taskHead,
|
|
2707
|
+
taskTail,
|
|
2708
|
+
clockLast = 0,
|
|
2709
|
+
clockNow = 0,
|
|
2710
|
+
clockSkew = 0,
|
|
2711
|
+
clock = typeof performance === "object" && performance.now ? performance : Date,
|
|
2712
|
+
setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function (f) {
|
|
2713
|
+
setTimeout(f, 17);
|
|
2714
|
+
};
|
|
2437
2715
|
function now() {
|
|
2438
2716
|
return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
|
|
2439
2717
|
}
|
|
2440
|
-
|
|
2441
2718
|
function clearNow() {
|
|
2442
2719
|
clockNow = 0;
|
|
2443
2720
|
}
|
|
2444
|
-
|
|
2445
2721
|
function Timer() {
|
|
2446
2722
|
this._call = this._time = this._next = null;
|
|
2447
2723
|
}
|
|
@@ -2450,12 +2726,10 @@ Timer.prototype = timer.prototype = {
|
|
|
2450
2726
|
restart: function (callback, delay, time) {
|
|
2451
2727
|
if (typeof callback !== "function") throw new TypeError("callback is not a function");
|
|
2452
2728
|
time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
|
|
2453
|
-
|
|
2454
2729
|
if (!this._next && taskTail !== this) {
|
|
2455
2730
|
if (taskTail) taskTail._next = this;else taskHead = this;
|
|
2456
2731
|
taskTail = this;
|
|
2457
2732
|
}
|
|
2458
|
-
|
|
2459
2733
|
this._call = callback;
|
|
2460
2734
|
this._time = time;
|
|
2461
2735
|
sleep();
|
|
@@ -2475,24 +2749,18 @@ function timer(callback, delay, time) {
|
|
|
2475
2749
|
}
|
|
2476
2750
|
function timerFlush() {
|
|
2477
2751
|
now(); // Get the current time, if not already set.
|
|
2478
|
-
|
|
2479
2752
|
++frame; // Pretend we’ve set an alarm, if we haven’t already.
|
|
2480
|
-
|
|
2481
2753
|
var t = taskHead,
|
|
2482
|
-
|
|
2483
|
-
|
|
2754
|
+
e;
|
|
2484
2755
|
while (t) {
|
|
2485
2756
|
if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);
|
|
2486
2757
|
t = t._next;
|
|
2487
2758
|
}
|
|
2488
|
-
|
|
2489
2759
|
--frame;
|
|
2490
2760
|
}
|
|
2491
|
-
|
|
2492
2761
|
function wake() {
|
|
2493
2762
|
clockNow = (clockLast = clock.now()) + clockSkew;
|
|
2494
2763
|
frame = timeout$1 = 0;
|
|
2495
|
-
|
|
2496
2764
|
try {
|
|
2497
2765
|
timerFlush();
|
|
2498
2766
|
} finally {
|
|
@@ -2501,19 +2769,16 @@ function wake() {
|
|
|
2501
2769
|
clockNow = 0;
|
|
2502
2770
|
}
|
|
2503
2771
|
}
|
|
2504
|
-
|
|
2505
2772
|
function poke() {
|
|
2506
2773
|
var now = clock.now(),
|
|
2507
|
-
|
|
2774
|
+
delay = now - clockLast;
|
|
2508
2775
|
if (delay > pokeDelay) clockSkew -= delay, clockLast = now;
|
|
2509
2776
|
}
|
|
2510
|
-
|
|
2511
2777
|
function nap() {
|
|
2512
2778
|
var t0,
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2779
|
+
t1 = taskHead,
|
|
2780
|
+
t2,
|
|
2781
|
+
time = Infinity;
|
|
2517
2782
|
while (t1) {
|
|
2518
2783
|
if (t1._call) {
|
|
2519
2784
|
if (time > t1._time) time = t1._time;
|
|
@@ -2523,17 +2788,13 @@ function nap() {
|
|
|
2523
2788
|
t1 = t0 ? t0._next = t2 : taskHead = t2;
|
|
2524
2789
|
}
|
|
2525
2790
|
}
|
|
2526
|
-
|
|
2527
2791
|
taskTail = t0;
|
|
2528
2792
|
sleep(time);
|
|
2529
2793
|
}
|
|
2530
|
-
|
|
2531
2794
|
function sleep(time) {
|
|
2532
2795
|
if (frame) return; // Soonest alarm already set, or will be.
|
|
2533
|
-
|
|
2534
2796
|
if (timeout$1) timeout$1 = clearTimeout(timeout$1);
|
|
2535
2797
|
var delay = time - clockNow; // Strictly less than if we recomputed clockNow.
|
|
2536
|
-
|
|
2537
2798
|
if (delay > 24) {
|
|
2538
2799
|
if (time < Infinity) timeout$1 = setTimeout(wake, time - clock.now() - clockSkew);
|
|
2539
2800
|
if (interval) interval = clearInterval(interval);
|
|
@@ -2596,129 +2857,122 @@ function get(node, id) {
|
|
|
2596
2857
|
if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
|
|
2597
2858
|
return schedule;
|
|
2598
2859
|
}
|
|
2599
|
-
|
|
2600
2860
|
function create(node, id, self) {
|
|
2601
2861
|
var schedules = node.__transition,
|
|
2602
|
-
|
|
2603
|
-
// Note the actual delay is not known until the first callback!
|
|
2862
|
+
tween;
|
|
2604
2863
|
|
|
2864
|
+
// Initialize the self timer when the transition is created.
|
|
2865
|
+
// Note the actual delay is not known until the first callback!
|
|
2605
2866
|
schedules[id] = self;
|
|
2606
2867
|
self.timer = timer(schedule, 0, self.time);
|
|
2607
|
-
|
|
2608
2868
|
function schedule(elapsed) {
|
|
2609
2869
|
self.state = SCHEDULED;
|
|
2610
|
-
self.timer.restart(start, self.delay, self.time);
|
|
2870
|
+
self.timer.restart(start, self.delay, self.time);
|
|
2611
2871
|
|
|
2872
|
+
// If the elapsed delay is less than our first sleep, start immediately.
|
|
2612
2873
|
if (self.delay <= elapsed) start(elapsed - self.delay);
|
|
2613
2874
|
}
|
|
2614
|
-
|
|
2615
2875
|
function start(elapsed) {
|
|
2616
|
-
var i, j, n, o;
|
|
2876
|
+
var i, j, n, o;
|
|
2617
2877
|
|
|
2878
|
+
// If the state is not SCHEDULED, then we previously errored on start.
|
|
2618
2879
|
if (self.state !== SCHEDULED) return stop();
|
|
2619
|
-
|
|
2620
2880
|
for (i in schedules) {
|
|
2621
2881
|
o = schedules[i];
|
|
2622
|
-
if (o.name !== self.name) continue;
|
|
2882
|
+
if (o.name !== self.name) continue;
|
|
2883
|
+
|
|
2884
|
+
// While this element already has a starting transition during this frame,
|
|
2623
2885
|
// defer starting an interrupting transition until that transition has a
|
|
2624
2886
|
// chance to tick (and possibly end); see d3/d3-transition#54!
|
|
2887
|
+
if (o.state === STARTED) return timeout(start);
|
|
2625
2888
|
|
|
2626
|
-
|
|
2627
|
-
|
|
2889
|
+
// Interrupt the active transition, if any.
|
|
2628
2890
|
if (o.state === RUNNING) {
|
|
2629
2891
|
o.state = ENDED;
|
|
2630
2892
|
o.timer.stop();
|
|
2631
2893
|
o.on.call("interrupt", node, node.__data__, o.index, o.group);
|
|
2632
2894
|
delete schedules[i];
|
|
2633
|
-
}
|
|
2895
|
+
}
|
|
2896
|
+
|
|
2897
|
+
// Cancel any pre-empted transitions.
|
|
2634
2898
|
else if (+i < id) {
|
|
2635
2899
|
o.state = ENDED;
|
|
2636
2900
|
o.timer.stop();
|
|
2637
2901
|
o.on.call("cancel", node, node.__data__, o.index, o.group);
|
|
2638
2902
|
delete schedules[i];
|
|
2639
2903
|
}
|
|
2640
|
-
}
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
// Defer the first tick to end of the current frame; see d3/d3#1576.
|
|
2641
2907
|
// Note the transition may be canceled after start and before the first tick!
|
|
2642
2908
|
// Note this must be scheduled before the start event; see d3/d3-transition#16!
|
|
2643
2909
|
// Assuming this is successful, subsequent callbacks go straight to tick.
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
2910
|
timeout(function () {
|
|
2647
2911
|
if (self.state === STARTED) {
|
|
2648
2912
|
self.state = RUNNING;
|
|
2649
2913
|
self.timer.restart(tick, self.delay, self.time);
|
|
2650
2914
|
tick(elapsed);
|
|
2651
2915
|
}
|
|
2652
|
-
});
|
|
2653
|
-
// Note this must be done before the tween are initialized.
|
|
2916
|
+
});
|
|
2654
2917
|
|
|
2918
|
+
// Dispatch the start event.
|
|
2919
|
+
// Note this must be done before the tween are initialized.
|
|
2655
2920
|
self.state = STARTING;
|
|
2656
2921
|
self.on.call("start", node, node.__data__, self.index, self.group);
|
|
2657
2922
|
if (self.state !== STARTING) return; // interrupted
|
|
2923
|
+
self.state = STARTED;
|
|
2658
2924
|
|
|
2659
|
-
|
|
2660
|
-
|
|
2925
|
+
// Initialize the tween, deleting null tween.
|
|
2661
2926
|
tween = new Array(n = self.tween.length);
|
|
2662
|
-
|
|
2663
2927
|
for (i = 0, j = -1; i < n; ++i) {
|
|
2664
2928
|
if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
|
|
2665
2929
|
tween[++j] = o;
|
|
2666
2930
|
}
|
|
2667
2931
|
}
|
|
2668
|
-
|
|
2669
2932
|
tween.length = j + 1;
|
|
2670
2933
|
}
|
|
2671
|
-
|
|
2672
2934
|
function tick(elapsed) {
|
|
2673
2935
|
var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2936
|
+
i = -1,
|
|
2937
|
+
n = tween.length;
|
|
2677
2938
|
while (++i < n) {
|
|
2678
2939
|
tween[i].call(node, t);
|
|
2679
|
-
}
|
|
2680
|
-
|
|
2940
|
+
}
|
|
2681
2941
|
|
|
2942
|
+
// Dispatch the end event.
|
|
2682
2943
|
if (self.state === ENDING) {
|
|
2683
2944
|
self.on.call("end", node, node.__data__, self.index, self.group);
|
|
2684
2945
|
stop();
|
|
2685
2946
|
}
|
|
2686
2947
|
}
|
|
2687
|
-
|
|
2688
2948
|
function stop() {
|
|
2689
2949
|
self.state = ENDED;
|
|
2690
2950
|
self.timer.stop();
|
|
2691
2951
|
delete schedules[id];
|
|
2692
|
-
|
|
2693
2952
|
for (var i in schedules) return; // eslint-disable-line no-unused-vars
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
2953
|
delete node.__transition;
|
|
2697
2954
|
}
|
|
2698
2955
|
}
|
|
2699
2956
|
|
|
2700
2957
|
function interrupt (node, name) {
|
|
2701
2958
|
var schedules = node.__transition,
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2959
|
+
schedule,
|
|
2960
|
+
active,
|
|
2961
|
+
empty = true,
|
|
2962
|
+
i;
|
|
2706
2963
|
if (!schedules) return;
|
|
2707
2964
|
name = name == null ? null : name + "";
|
|
2708
|
-
|
|
2709
2965
|
for (i in schedules) {
|
|
2710
2966
|
if ((schedule = schedules[i]).name !== name) {
|
|
2711
2967
|
empty = false;
|
|
2712
2968
|
continue;
|
|
2713
2969
|
}
|
|
2714
|
-
|
|
2715
2970
|
active = schedule.state > STARTING && schedule.state < ENDING;
|
|
2716
2971
|
schedule.state = ENDED;
|
|
2717
2972
|
schedule.timer.stop();
|
|
2718
2973
|
schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
|
|
2719
2974
|
delete schedules[i];
|
|
2720
2975
|
}
|
|
2721
|
-
|
|
2722
2976
|
if (empty) delete node.__transition;
|
|
2723
2977
|
}
|
|
2724
2978
|
|
|
@@ -2732,13 +2986,13 @@ function tweenRemove(id, name) {
|
|
|
2732
2986
|
var tween0, tween1;
|
|
2733
2987
|
return function () {
|
|
2734
2988
|
var schedule = set(this, id),
|
|
2735
|
-
|
|
2989
|
+
tween = schedule.tween;
|
|
2990
|
+
|
|
2991
|
+
// If this node shared tween with the previous node,
|
|
2736
2992
|
// just assign the updated shared tween and we’re done!
|
|
2737
2993
|
// Otherwise, copy-on-write.
|
|
2738
|
-
|
|
2739
2994
|
if (tween !== tween0) {
|
|
2740
2995
|
tween1 = tween0 = tween;
|
|
2741
|
-
|
|
2742
2996
|
for (var i = 0, n = tween1.length; i < n; ++i) {
|
|
2743
2997
|
if (tween1[i].name === name) {
|
|
2744
2998
|
tween1 = tween1.slice();
|
|
@@ -2747,56 +3001,47 @@ function tweenRemove(id, name) {
|
|
|
2747
3001
|
}
|
|
2748
3002
|
}
|
|
2749
3003
|
}
|
|
2750
|
-
|
|
2751
3004
|
schedule.tween = tween1;
|
|
2752
3005
|
};
|
|
2753
3006
|
}
|
|
2754
|
-
|
|
2755
3007
|
function tweenFunction(id, name, value) {
|
|
2756
3008
|
var tween0, tween1;
|
|
2757
3009
|
if (typeof value !== "function") throw new Error();
|
|
2758
3010
|
return function () {
|
|
2759
3011
|
var schedule = set(this, id),
|
|
2760
|
-
|
|
3012
|
+
tween = schedule.tween;
|
|
3013
|
+
|
|
3014
|
+
// If this node shared tween with the previous node,
|
|
2761
3015
|
// just assign the updated shared tween and we’re done!
|
|
2762
3016
|
// Otherwise, copy-on-write.
|
|
2763
|
-
|
|
2764
3017
|
if (tween !== tween0) {
|
|
2765
3018
|
tween1 = (tween0 = tween).slice();
|
|
2766
|
-
|
|
2767
3019
|
for (var t = {
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
3020
|
+
name: name,
|
|
3021
|
+
value: value
|
|
3022
|
+
}, i = 0, n = tween1.length; i < n; ++i) {
|
|
2771
3023
|
if (tween1[i].name === name) {
|
|
2772
3024
|
tween1[i] = t;
|
|
2773
3025
|
break;
|
|
2774
3026
|
}
|
|
2775
3027
|
}
|
|
2776
|
-
|
|
2777
3028
|
if (i === n) tween1.push(t);
|
|
2778
3029
|
}
|
|
2779
|
-
|
|
2780
3030
|
schedule.tween = tween1;
|
|
2781
3031
|
};
|
|
2782
3032
|
}
|
|
2783
|
-
|
|
2784
3033
|
function transition_tween (name, value) {
|
|
2785
3034
|
var id = this._id;
|
|
2786
3035
|
name += "";
|
|
2787
|
-
|
|
2788
3036
|
if (arguments.length < 2) {
|
|
2789
3037
|
var tween = get(this.node(), id).tween;
|
|
2790
|
-
|
|
2791
3038
|
for (var i = 0, n = tween.length, t; i < n; ++i) {
|
|
2792
3039
|
if ((t = tween[i]).name === name) {
|
|
2793
3040
|
return t.value;
|
|
2794
3041
|
}
|
|
2795
3042
|
}
|
|
2796
|
-
|
|
2797
3043
|
return null;
|
|
2798
3044
|
}
|
|
2799
|
-
|
|
2800
3045
|
return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));
|
|
2801
3046
|
}
|
|
2802
3047
|
function tweenValue(transition, name, value) {
|
|
@@ -2820,62 +3065,56 @@ function attrRemove(name) {
|
|
|
2820
3065
|
this.removeAttribute(name);
|
|
2821
3066
|
};
|
|
2822
3067
|
}
|
|
2823
|
-
|
|
2824
3068
|
function attrRemoveNS(fullname) {
|
|
2825
3069
|
return function () {
|
|
2826
3070
|
this.removeAttributeNS(fullname.space, fullname.local);
|
|
2827
3071
|
};
|
|
2828
3072
|
}
|
|
2829
|
-
|
|
2830
3073
|
function attrConstant(name, interpolate, value1) {
|
|
2831
3074
|
var string00,
|
|
2832
|
-
|
|
2833
|
-
|
|
3075
|
+
string1 = value1 + "",
|
|
3076
|
+
interpolate0;
|
|
2834
3077
|
return function () {
|
|
2835
3078
|
var string0 = this.getAttribute(name);
|
|
2836
3079
|
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
2837
3080
|
};
|
|
2838
3081
|
}
|
|
2839
|
-
|
|
2840
3082
|
function attrConstantNS(fullname, interpolate, value1) {
|
|
2841
3083
|
var string00,
|
|
2842
|
-
|
|
2843
|
-
|
|
3084
|
+
string1 = value1 + "",
|
|
3085
|
+
interpolate0;
|
|
2844
3086
|
return function () {
|
|
2845
3087
|
var string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2846
3088
|
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
2847
3089
|
};
|
|
2848
3090
|
}
|
|
2849
|
-
|
|
2850
3091
|
function attrFunction(name, interpolate, value) {
|
|
2851
3092
|
var string00, string10, interpolate0;
|
|
2852
3093
|
return function () {
|
|
2853
3094
|
var string0,
|
|
2854
|
-
|
|
2855
|
-
|
|
3095
|
+
value1 = value(this),
|
|
3096
|
+
string1;
|
|
2856
3097
|
if (value1 == null) return void this.removeAttribute(name);
|
|
2857
3098
|
string0 = this.getAttribute(name);
|
|
2858
3099
|
string1 = value1 + "";
|
|
2859
3100
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2860
3101
|
};
|
|
2861
3102
|
}
|
|
2862
|
-
|
|
2863
3103
|
function attrFunctionNS(fullname, interpolate, value) {
|
|
2864
3104
|
var string00, string10, interpolate0;
|
|
2865
3105
|
return function () {
|
|
2866
3106
|
var string0,
|
|
2867
|
-
|
|
2868
|
-
|
|
3107
|
+
value1 = value(this),
|
|
3108
|
+
string1;
|
|
2869
3109
|
if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
|
|
2870
3110
|
string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
2871
3111
|
string1 = value1 + "";
|
|
2872
3112
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
2873
3113
|
};
|
|
2874
3114
|
}
|
|
2875
|
-
|
|
2876
3115
|
function transition_attr (name, value) {
|
|
2877
3116
|
var fullname = namespace(name),
|
|
2878
|
-
|
|
3117
|
+
i = fullname === "transform" ? interpolateTransformSvg : interpolate;
|
|
2879
3118
|
return this.attrTween(name, typeof value === "function" ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value)) : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
|
|
2880
3119
|
}
|
|
2881
3120
|
|
|
@@ -2884,39 +3123,31 @@ function attrInterpolate(name, i) {
|
|
|
2884
3123
|
this.setAttribute(name, i.call(this, t));
|
|
2885
3124
|
};
|
|
2886
3125
|
}
|
|
2887
|
-
|
|
2888
3126
|
function attrInterpolateNS(fullname, i) {
|
|
2889
3127
|
return function (t) {
|
|
2890
3128
|
this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
|
|
2891
3129
|
};
|
|
2892
3130
|
}
|
|
2893
|
-
|
|
2894
3131
|
function attrTweenNS(fullname, value) {
|
|
2895
3132
|
var t0, i0;
|
|
2896
|
-
|
|
2897
3133
|
function tween() {
|
|
2898
3134
|
var i = value.apply(this, arguments);
|
|
2899
3135
|
if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
|
|
2900
3136
|
return t0;
|
|
2901
3137
|
}
|
|
2902
|
-
|
|
2903
3138
|
tween._value = value;
|
|
2904
3139
|
return tween;
|
|
2905
3140
|
}
|
|
2906
|
-
|
|
2907
3141
|
function attrTween(name, value) {
|
|
2908
3142
|
var t0, i0;
|
|
2909
|
-
|
|
2910
3143
|
function tween() {
|
|
2911
3144
|
var i = value.apply(this, arguments);
|
|
2912
3145
|
if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
|
|
2913
3146
|
return t0;
|
|
2914
3147
|
}
|
|
2915
|
-
|
|
2916
3148
|
tween._value = value;
|
|
2917
3149
|
return tween;
|
|
2918
3150
|
}
|
|
2919
|
-
|
|
2920
3151
|
function transition_attrTween (name, value) {
|
|
2921
3152
|
var key = "attr." + name;
|
|
2922
3153
|
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
@@ -2931,13 +3162,11 @@ function delayFunction(id, value) {
|
|
|
2931
3162
|
init(this, id).delay = +value.apply(this, arguments);
|
|
2932
3163
|
};
|
|
2933
3164
|
}
|
|
2934
|
-
|
|
2935
3165
|
function delayConstant(id, value) {
|
|
2936
3166
|
return value = +value, function () {
|
|
2937
3167
|
init(this, id).delay = value;
|
|
2938
3168
|
};
|
|
2939
3169
|
}
|
|
2940
|
-
|
|
2941
3170
|
function transition_delay (value) {
|
|
2942
3171
|
var id = this._id;
|
|
2943
3172
|
return arguments.length ? this.each((typeof value === "function" ? delayFunction : delayConstant)(id, value)) : get(this.node(), id).delay;
|
|
@@ -2948,13 +3177,11 @@ function durationFunction(id, value) {
|
|
|
2948
3177
|
set(this, id).duration = +value.apply(this, arguments);
|
|
2949
3178
|
};
|
|
2950
3179
|
}
|
|
2951
|
-
|
|
2952
3180
|
function durationConstant(id, value) {
|
|
2953
3181
|
return value = +value, function () {
|
|
2954
3182
|
set(this, id).duration = value;
|
|
2955
3183
|
};
|
|
2956
3184
|
}
|
|
2957
|
-
|
|
2958
3185
|
function transition_duration (value) {
|
|
2959
3186
|
var id = this._id;
|
|
2960
3187
|
return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id, value)) : get(this.node(), id).duration;
|
|
@@ -2966,7 +3193,6 @@ function easeConstant(id, value) {
|
|
|
2966
3193
|
set(this, id).ease = value;
|
|
2967
3194
|
};
|
|
2968
3195
|
}
|
|
2969
|
-
|
|
2970
3196
|
function transition_ease (value) {
|
|
2971
3197
|
var id = this._id;
|
|
2972
3198
|
return arguments.length ? this.each(easeConstant(id, value)) : get(this.node(), id).ease;
|
|
@@ -2979,7 +3205,6 @@ function easeVarying(id, value) {
|
|
|
2979
3205
|
set(this, id).ease = v;
|
|
2980
3206
|
};
|
|
2981
3207
|
}
|
|
2982
|
-
|
|
2983
3208
|
function transition_easeVarying (value) {
|
|
2984
3209
|
if (typeof value !== "function") throw new Error();
|
|
2985
3210
|
return this.each(easeVarying(this._id, value));
|
|
@@ -2987,7 +3212,6 @@ function transition_easeVarying (value) {
|
|
|
2987
3212
|
|
|
2988
3213
|
function transition_filter (match) {
|
|
2989
3214
|
if (typeof match !== "function") match = matcher(match);
|
|
2990
|
-
|
|
2991
3215
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
2992
3216
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
|
|
2993
3217
|
if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
|
|
@@ -2995,13 +3219,11 @@ function transition_filter (match) {
|
|
|
2995
3219
|
}
|
|
2996
3220
|
}
|
|
2997
3221
|
}
|
|
2998
|
-
|
|
2999
3222
|
return new Transition(subgroups, this._parents, this._name, this._id);
|
|
3000
3223
|
}
|
|
3001
3224
|
|
|
3002
3225
|
function transition_merge (transition) {
|
|
3003
3226
|
if (transition._id !== this._id) throw new Error();
|
|
3004
|
-
|
|
3005
3227
|
for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
|
|
3006
3228
|
for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
|
|
3007
3229
|
if (node = group0[i] || group1[i]) {
|
|
@@ -3009,11 +3231,9 @@ function transition_merge (transition) {
|
|
|
3009
3231
|
}
|
|
3010
3232
|
}
|
|
3011
3233
|
}
|
|
3012
|
-
|
|
3013
3234
|
for (; j < m0; ++j) {
|
|
3014
3235
|
merges[j] = groups0[j];
|
|
3015
3236
|
}
|
|
3016
|
-
|
|
3017
3237
|
return new Transition(merges, this._parents, this._name, this._id);
|
|
3018
3238
|
}
|
|
3019
3239
|
|
|
@@ -3024,22 +3244,21 @@ function start(name) {
|
|
|
3024
3244
|
return !t || t === "start";
|
|
3025
3245
|
});
|
|
3026
3246
|
}
|
|
3027
|
-
|
|
3028
3247
|
function onFunction(id, name, listener) {
|
|
3029
3248
|
var on0,
|
|
3030
|
-
|
|
3031
|
-
|
|
3249
|
+
on1,
|
|
3250
|
+
sit = start(name) ? init : set;
|
|
3032
3251
|
return function () {
|
|
3033
3252
|
var schedule = sit(this, id),
|
|
3034
|
-
|
|
3253
|
+
on = schedule.on;
|
|
3254
|
+
|
|
3255
|
+
// If this node shared a dispatch with the previous node,
|
|
3035
3256
|
// just assign the updated shared dispatch and we’re done!
|
|
3036
3257
|
// Otherwise, copy-on-write.
|
|
3037
|
-
|
|
3038
3258
|
if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
|
|
3039
3259
|
schedule.on = on1;
|
|
3040
3260
|
};
|
|
3041
3261
|
}
|
|
3042
|
-
|
|
3043
3262
|
function transition_on (name, listener) {
|
|
3044
3263
|
var id = this._id;
|
|
3045
3264
|
return arguments.length < 2 ? get(this.node(), id).on.on(name) : this.each(onFunction(id, name, listener));
|
|
@@ -3048,22 +3267,18 @@ function transition_on (name, listener) {
|
|
|
3048
3267
|
function removeFunction(id) {
|
|
3049
3268
|
return function () {
|
|
3050
3269
|
var parent = this.parentNode;
|
|
3051
|
-
|
|
3052
3270
|
for (var i in this.__transition) if (+i !== id) return;
|
|
3053
|
-
|
|
3054
3271
|
if (parent) parent.removeChild(this);
|
|
3055
3272
|
};
|
|
3056
3273
|
}
|
|
3057
|
-
|
|
3058
3274
|
function transition_remove () {
|
|
3059
3275
|
return this.on("end.remove", removeFunction(this._id));
|
|
3060
3276
|
}
|
|
3061
3277
|
|
|
3062
3278
|
function transition_select (select) {
|
|
3063
3279
|
var name = this._name,
|
|
3064
|
-
|
|
3280
|
+
id = this._id;
|
|
3065
3281
|
if (typeof select !== "function") select = selector(select);
|
|
3066
|
-
|
|
3067
3282
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
3068
3283
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
|
|
3069
3284
|
if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
|
|
@@ -3073,15 +3288,13 @@ function transition_select (select) {
|
|
|
3073
3288
|
}
|
|
3074
3289
|
}
|
|
3075
3290
|
}
|
|
3076
|
-
|
|
3077
3291
|
return new Transition(subgroups, this._parents, name, id);
|
|
3078
3292
|
}
|
|
3079
3293
|
|
|
3080
3294
|
function transition_selectAll (select) {
|
|
3081
3295
|
var name = this._name,
|
|
3082
|
-
|
|
3296
|
+
id = this._id;
|
|
3083
3297
|
if (typeof select !== "function") select = selectorAll(select);
|
|
3084
|
-
|
|
3085
3298
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
3086
3299
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
3087
3300
|
if (node = group[i]) {
|
|
@@ -3090,13 +3303,11 @@ function transition_selectAll (select) {
|
|
|
3090
3303
|
schedule(child, name, id, k, children, inherit);
|
|
3091
3304
|
}
|
|
3092
3305
|
}
|
|
3093
|
-
|
|
3094
3306
|
subgroups.push(children);
|
|
3095
3307
|
parents.push(node);
|
|
3096
3308
|
}
|
|
3097
3309
|
}
|
|
3098
3310
|
}
|
|
3099
|
-
|
|
3100
3311
|
return new Transition(subgroups, parents, name, id);
|
|
3101
3312
|
}
|
|
3102
3313
|
|
|
@@ -3109,57 +3320,53 @@ function styleNull(name, interpolate) {
|
|
|
3109
3320
|
var string00, string10, interpolate0;
|
|
3110
3321
|
return function () {
|
|
3111
3322
|
var string0 = styleValue(this, name),
|
|
3112
|
-
|
|
3323
|
+
string1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
3113
3324
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : interpolate0 = interpolate(string00 = string0, string10 = string1);
|
|
3114
3325
|
};
|
|
3115
3326
|
}
|
|
3116
|
-
|
|
3117
3327
|
function styleRemove(name) {
|
|
3118
3328
|
return function () {
|
|
3119
3329
|
this.style.removeProperty(name);
|
|
3120
3330
|
};
|
|
3121
3331
|
}
|
|
3122
|
-
|
|
3123
3332
|
function styleConstant(name, interpolate, value1) {
|
|
3124
3333
|
var string00,
|
|
3125
|
-
|
|
3126
|
-
|
|
3334
|
+
string1 = value1 + "",
|
|
3335
|
+
interpolate0;
|
|
3127
3336
|
return function () {
|
|
3128
3337
|
var string0 = styleValue(this, name);
|
|
3129
3338
|
return string0 === string1 ? null : string0 === string00 ? interpolate0 : interpolate0 = interpolate(string00 = string0, value1);
|
|
3130
3339
|
};
|
|
3131
3340
|
}
|
|
3132
|
-
|
|
3133
3341
|
function styleFunction(name, interpolate, value) {
|
|
3134
3342
|
var string00, string10, interpolate0;
|
|
3135
3343
|
return function () {
|
|
3136
3344
|
var string0 = styleValue(this, name),
|
|
3137
|
-
|
|
3138
|
-
|
|
3345
|
+
value1 = value(this),
|
|
3346
|
+
string1 = value1 + "";
|
|
3139
3347
|
if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
|
|
3140
3348
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
|
|
3141
3349
|
};
|
|
3142
3350
|
}
|
|
3143
|
-
|
|
3144
3351
|
function styleMaybeRemove(id, name) {
|
|
3145
3352
|
var on0,
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3353
|
+
on1,
|
|
3354
|
+
listener0,
|
|
3355
|
+
key = "style." + name,
|
|
3356
|
+
event = "end." + key,
|
|
3357
|
+
remove;
|
|
3151
3358
|
return function () {
|
|
3152
3359
|
var schedule = set(this, id),
|
|
3153
|
-
|
|
3154
|
-
|
|
3360
|
+
on = schedule.on,
|
|
3361
|
+
listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;
|
|
3362
|
+
|
|
3363
|
+
// If this node shared a dispatch with the previous node,
|
|
3155
3364
|
// just assign the updated shared dispatch and we’re done!
|
|
3156
3365
|
// Otherwise, copy-on-write.
|
|
3157
|
-
|
|
3158
3366
|
if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
|
|
3159
3367
|
schedule.on = on1;
|
|
3160
3368
|
};
|
|
3161
3369
|
}
|
|
3162
|
-
|
|
3163
3370
|
function transition_style (name, value, priority) {
|
|
3164
3371
|
var i = (name += "") === "transform" ? interpolateTransformCss : interpolate;
|
|
3165
3372
|
return value == null ? this.styleTween(name, styleNull(name, i)).on("end.style." + name, styleRemove(name)) : typeof value === "function" ? this.styleTween(name, styleFunction(name, i, tweenValue(this, "style." + name, value))).each(styleMaybeRemove(this._id, name)) : this.styleTween(name, styleConstant(name, i, value), priority).on("end.style." + name, null);
|
|
@@ -3170,20 +3377,16 @@ function styleInterpolate(name, i, priority) {
|
|
|
3170
3377
|
this.style.setProperty(name, i.call(this, t), priority);
|
|
3171
3378
|
};
|
|
3172
3379
|
}
|
|
3173
|
-
|
|
3174
3380
|
function styleTween(name, value, priority) {
|
|
3175
3381
|
var t, i0;
|
|
3176
|
-
|
|
3177
3382
|
function tween() {
|
|
3178
3383
|
var i = value.apply(this, arguments);
|
|
3179
3384
|
if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
|
|
3180
3385
|
return t;
|
|
3181
3386
|
}
|
|
3182
|
-
|
|
3183
3387
|
tween._value = value;
|
|
3184
3388
|
return tween;
|
|
3185
3389
|
}
|
|
3186
|
-
|
|
3187
3390
|
function transition_styleTween (name, value, priority) {
|
|
3188
3391
|
var key = "style." + (name += "");
|
|
3189
3392
|
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
@@ -3197,14 +3400,12 @@ function textConstant(value) {
|
|
|
3197
3400
|
this.textContent = value;
|
|
3198
3401
|
};
|
|
3199
3402
|
}
|
|
3200
|
-
|
|
3201
3403
|
function textFunction(value) {
|
|
3202
3404
|
return function () {
|
|
3203
3405
|
var value1 = value(this);
|
|
3204
3406
|
this.textContent = value1 == null ? "" : value1;
|
|
3205
3407
|
};
|
|
3206
3408
|
}
|
|
3207
|
-
|
|
3208
3409
|
function transition_text (value) {
|
|
3209
3410
|
return this.tween("text", typeof value === "function" ? textFunction(tweenValue(this, "text", value)) : textConstant(value == null ? "" : value + ""));
|
|
3210
3411
|
}
|
|
@@ -3214,20 +3415,16 @@ function textInterpolate(i) {
|
|
|
3214
3415
|
this.textContent = i.call(this, t);
|
|
3215
3416
|
};
|
|
3216
3417
|
}
|
|
3217
|
-
|
|
3218
3418
|
function textTween(value) {
|
|
3219
3419
|
var t0, i0;
|
|
3220
|
-
|
|
3221
3420
|
function tween() {
|
|
3222
3421
|
var i = value.apply(this, arguments);
|
|
3223
3422
|
if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
|
|
3224
3423
|
return t0;
|
|
3225
3424
|
}
|
|
3226
|
-
|
|
3227
3425
|
tween._value = value;
|
|
3228
3426
|
return tween;
|
|
3229
3427
|
}
|
|
3230
|
-
|
|
3231
3428
|
function transition_textTween (value) {
|
|
3232
3429
|
var key = "text";
|
|
3233
3430
|
if (arguments.length < 1) return (key = this.tween(key)) && key._value;
|
|
@@ -3238,9 +3435,8 @@ function transition_textTween (value) {
|
|
|
3238
3435
|
|
|
3239
3436
|
function transition_transition () {
|
|
3240
3437
|
var name = this._name,
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3438
|
+
id0 = this._id,
|
|
3439
|
+
id1 = newId();
|
|
3244
3440
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
3245
3441
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
3246
3442
|
if (node = group[i]) {
|
|
@@ -3254,44 +3450,41 @@ function transition_transition () {
|
|
|
3254
3450
|
}
|
|
3255
3451
|
}
|
|
3256
3452
|
}
|
|
3257
|
-
|
|
3258
3453
|
return new Transition(groups, this._parents, name, id1);
|
|
3259
3454
|
}
|
|
3260
3455
|
|
|
3261
3456
|
function transition_end () {
|
|
3262
3457
|
var on0,
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3458
|
+
on1,
|
|
3459
|
+
that = this,
|
|
3460
|
+
id = that._id,
|
|
3461
|
+
size = that.size();
|
|
3267
3462
|
return new Promise(function (resolve, reject) {
|
|
3268
3463
|
var cancel = {
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3464
|
+
value: reject
|
|
3465
|
+
},
|
|
3466
|
+
end = {
|
|
3467
|
+
value: function () {
|
|
3468
|
+
if (--size === 0) resolve();
|
|
3469
|
+
}
|
|
3470
|
+
};
|
|
3276
3471
|
that.each(function () {
|
|
3277
3472
|
var schedule = set(this, id),
|
|
3278
|
-
|
|
3473
|
+
on = schedule.on;
|
|
3474
|
+
|
|
3475
|
+
// If this node shared a dispatch with the previous node,
|
|
3279
3476
|
// just assign the updated shared dispatch and we’re done!
|
|
3280
3477
|
// Otherwise, copy-on-write.
|
|
3281
|
-
|
|
3282
3478
|
if (on !== on0) {
|
|
3283
3479
|
on1 = (on0 = on).copy();
|
|
3284
|
-
|
|
3285
3480
|
on1._.cancel.push(cancel);
|
|
3286
|
-
|
|
3287
3481
|
on1._.interrupt.push(cancel);
|
|
3288
|
-
|
|
3289
3482
|
on1._.end.push(end);
|
|
3290
3483
|
}
|
|
3291
|
-
|
|
3292
3484
|
schedule.on = on1;
|
|
3293
|
-
});
|
|
3485
|
+
});
|
|
3294
3486
|
|
|
3487
|
+
// The selection was empty, resolve end immediately
|
|
3295
3488
|
if (size === 0) resolve();
|
|
3296
3489
|
});
|
|
3297
3490
|
}
|
|
@@ -3351,28 +3544,22 @@ var defaultTiming = {
|
|
|
3351
3544
|
duration: 250,
|
|
3352
3545
|
ease: cubicInOut
|
|
3353
3546
|
};
|
|
3354
|
-
|
|
3355
3547
|
function inherit(node, id) {
|
|
3356
3548
|
var timing;
|
|
3357
|
-
|
|
3358
3549
|
while (!(timing = node.__transition) || !(timing = timing[id])) {
|
|
3359
3550
|
if (!(node = node.parentNode)) {
|
|
3360
3551
|
throw new Error(`transition ${id} not found`);
|
|
3361
3552
|
}
|
|
3362
3553
|
}
|
|
3363
|
-
|
|
3364
3554
|
return timing;
|
|
3365
3555
|
}
|
|
3366
|
-
|
|
3367
3556
|
function selection_transition (name) {
|
|
3368
3557
|
var id, timing;
|
|
3369
|
-
|
|
3370
3558
|
if (name instanceof Transition) {
|
|
3371
3559
|
id = name._id, name = name._name;
|
|
3372
3560
|
} else {
|
|
3373
3561
|
id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
|
|
3374
3562
|
}
|
|
3375
|
-
|
|
3376
3563
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
3377
3564
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
3378
3565
|
if (node = group[i]) {
|
|
@@ -3380,36 +3567,68 @@ function selection_transition (name) {
|
|
|
3380
3567
|
}
|
|
3381
3568
|
}
|
|
3382
3569
|
}
|
|
3383
|
-
|
|
3384
3570
|
return new Transition(groups, this._parents, name, id);
|
|
3385
3571
|
}
|
|
3386
3572
|
|
|
3387
3573
|
selection.prototype.interrupt = selection_interrupt;
|
|
3388
3574
|
selection.prototype.transition = selection_transition;
|
|
3389
3575
|
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3576
|
+
function Transform(k, x, y) {
|
|
3577
|
+
this.k = k;
|
|
3578
|
+
this.x = x;
|
|
3579
|
+
this.y = y;
|
|
3580
|
+
}
|
|
3581
|
+
Transform.prototype = {
|
|
3582
|
+
constructor: Transform,
|
|
3583
|
+
scale: function (k) {
|
|
3584
|
+
return k === 1 ? this : new Transform(this.k * k, this.x, this.y);
|
|
3585
|
+
},
|
|
3586
|
+
translate: function (x, y) {
|
|
3587
|
+
return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);
|
|
3588
|
+
},
|
|
3589
|
+
apply: function (point) {
|
|
3590
|
+
return [point[0] * this.k + this.x, point[1] * this.k + this.y];
|
|
3591
|
+
},
|
|
3592
|
+
applyX: function (x) {
|
|
3593
|
+
return x * this.k + this.x;
|
|
3594
|
+
},
|
|
3595
|
+
applyY: function (y) {
|
|
3596
|
+
return y * this.k + this.y;
|
|
3597
|
+
},
|
|
3598
|
+
invert: function (location) {
|
|
3599
|
+
return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
|
|
3600
|
+
},
|
|
3601
|
+
invertX: function (x) {
|
|
3602
|
+
return (x - this.x) / this.k;
|
|
3603
|
+
},
|
|
3604
|
+
invertY: function (y) {
|
|
3605
|
+
return (y - this.y) / this.k;
|
|
3606
|
+
},
|
|
3607
|
+
rescaleX: function (x) {
|
|
3608
|
+
return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));
|
|
3609
|
+
},
|
|
3610
|
+
rescaleY: function (y) {
|
|
3611
|
+
return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));
|
|
3612
|
+
},
|
|
3613
|
+
toString: function () {
|
|
3614
|
+
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
3615
|
+
}
|
|
3616
|
+
};
|
|
3617
|
+
new Transform(1, 0, 0);
|
|
3618
|
+
Transform.prototype;
|
|
3619
|
+
|
|
3400
3620
|
/*
|
|
3401
3621
|
DecidablesElement Base Class - Not intended for instantiation!
|
|
3402
3622
|
<decidables-element>
|
|
3403
3623
|
*/
|
|
3404
|
-
|
|
3405
3624
|
class DecidablesElement extends s {
|
|
3406
3625
|
getComputedStyleValue(property) {
|
|
3407
3626
|
return getComputedStyle(this).getPropertyValue(property).trim();
|
|
3408
3627
|
}
|
|
3409
|
-
|
|
3410
3628
|
firstUpdated(changedProperties) {
|
|
3411
|
-
super.firstUpdated(changedProperties);
|
|
3629
|
+
super.firstUpdated(changedProperties);
|
|
3412
3630
|
|
|
3631
|
+
// Use focus highlighting if keyboard is used at all
|
|
3413
3632
|
select(this.renderRoot.host).classed('keyboard', true).on('mousemove.keyboard touchstart.keyboard', event => {
|
|
3414
3633
|
const element = event.currentTarget;
|
|
3415
3634
|
select(element.renderRoot.host).classed('keyboard', false).on('mousemove.keyboard touchstart.keyboard', null);
|
|
@@ -3418,7 +3637,6 @@ class DecidablesElement extends s {
|
|
|
3418
3637
|
select(element.renderRoot.host).classed('keyboard', true).on('keydown.keyboard mousemove.keyboard touchstart.keyboard', null);
|
|
3419
3638
|
});
|
|
3420
3639
|
}
|
|
3421
|
-
|
|
3422
3640
|
static get greys() {
|
|
3423
3641
|
const grey = '#999999';
|
|
3424
3642
|
const greys = {};
|
|
@@ -3433,13 +3651,11 @@ class DecidablesElement extends s {
|
|
|
3433
3651
|
greys.black = '#000000';
|
|
3434
3652
|
return greys;
|
|
3435
3653
|
}
|
|
3436
|
-
|
|
3437
3654
|
static get shadows() {
|
|
3438
3655
|
// Material Design elevation styles
|
|
3439
3656
|
// References:
|
|
3440
3657
|
// https://github.com/material-components/material-components-web/tree/master/packages/mdc-elevation
|
|
3441
3658
|
// https://codepen.io/hanger/pen/yOGvQp
|
|
3442
|
-
|
|
3443
3659
|
/* eslint-disable key-spacing, object-curly-newline */
|
|
3444
3660
|
return {
|
|
3445
3661
|
elevations: [0, 2, 4, 8, 16],
|
|
@@ -3572,29 +3788,27 @@ class DecidablesElement extends s {
|
|
|
3572
3788
|
const ambientS = rotate ? `${-ambientM.y}px ${ambientM.y / 2}px ${ambientM.b}px ${ambientM.s}px` : `${ambientM.y / 2}px ${ambientM.y}px ${ambientM.b}px ${ambientM.s}px`;
|
|
3573
3789
|
return `${umbraS} ${umbraC}, ${penumbraS} ${penumbraC}, ${ambientS} ${ambientC}`;
|
|
3574
3790
|
}
|
|
3575
|
-
|
|
3576
3791
|
static get svgFilters() {
|
|
3577
|
-
const shadows = DecidablesElement.shadows;
|
|
3578
|
-
/* eslint-disable-line prefer-destructuring */
|
|
3792
|
+
const shadows = DecidablesElement.shadows; /* eslint-disable-line prefer-destructuring */
|
|
3579
3793
|
|
|
3580
3794
|
const filters = shadows.elevations.map(z => {
|
|
3581
|
-
return y
|
|
3582
|
-
<filter id=${
|
|
3795
|
+
return y`
|
|
3796
|
+
<filter id=${`shadow-${z}`} x="-250%" y="-250%" width="600%" height="600%">
|
|
3583
3797
|
<feComponentTransfer in="SourceAlpha" result="solid">
|
|
3584
3798
|
<feFuncA type="table" tableValues="0 1 1"/>
|
|
3585
3799
|
</feComponentTransfer>
|
|
3586
|
-
<feOffset in="solid" result="offU" dx=${
|
|
3587
|
-
<feOffset in="solid" result="offP" dx=${
|
|
3588
|
-
<feOffset in="solid" result="offA" dx=${
|
|
3589
|
-
${0}
|
|
3590
|
-
${0}
|
|
3591
|
-
${0}
|
|
3592
|
-
<feGaussianBlur in=${0} result="blurU" stdDeviation=${
|
|
3593
|
-
<feGaussianBlur in=${0} result="blurP" stdDeviation=${
|
|
3594
|
-
<feGaussianBlur in=${0} result="blurA" stdDeviation=${
|
|
3595
|
-
<feFlood in="SourceGraphic" result="opU" flood-color=${
|
|
3596
|
-
<feFlood in="SourceGraphic" result="opP" flood-color=${
|
|
3597
|
-
<feFlood in="SourceGraphic" result="opA" flood-color=${
|
|
3800
|
+
<feOffset in="solid" result="offU" dx=${shadows.mapUmbra[z].y / 2} dy=${shadows.mapUmbra[z].y} />
|
|
3801
|
+
<feOffset in="solid" result="offP" dx=${shadows.mapPenumbra[z].y / 2} dy=${shadows.mapPenumbra[z].y} />
|
|
3802
|
+
<feOffset in="solid" result="offA" dx=${shadows.mapAmbient[z].y / 2} dy=${shadows.mapAmbient[z].y} />
|
|
3803
|
+
${shadows.mapUmbra[z].s === 0 ? y`` : y`<feMorphology in="offU" result="spreadU" operator=${shadows.mapUmbra[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapUmbra[z].s)} />`}
|
|
3804
|
+
${shadows.mapPenumbra[z].s === 0 ? y`` : y`<feMorphology in="offP" result="spreadP" operator=${shadows.mapPenumbra[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapPenumbra[z].s)} />`}
|
|
3805
|
+
${shadows.mapAmbient[z].s === 0 ? y`` : y`<feMorphology in="offA" result="spreadA" operator=${shadows.mapAmbient[z].s > 0 ? 'dilate' : 'erode'} radius=${Math.abs(shadows.mapAmbient[z].s)} />`}
|
|
3806
|
+
<feGaussianBlur in=${shadows.mapUmbra[z].s === 0 ? 'offU' : 'spreadU'} result="blurU" stdDeviation=${shadows.mapUmbra[z].b / 2} />
|
|
3807
|
+
<feGaussianBlur in=${shadows.mapPenumbra[z].s === 0 ? 'offP' : 'spreadP'} result="blurP" stdDeviation=${shadows.mapPenumbra[z].b / 2} />
|
|
3808
|
+
<feGaussianBlur in=${shadows.mapAmbient[z].s === 0 ? 'offA' : 'spreadA'} result="blurA" stdDeviation=${shadows.mapAmbient[z].b / 2} />
|
|
3809
|
+
<feFlood in="SourceGraphic" result="opU" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityUmbra + shadows.opacityBoost} />
|
|
3810
|
+
<feFlood in="SourceGraphic" result="opP" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityPenumbra + shadows.opacityBoost} />
|
|
3811
|
+
<feFlood in="SourceGraphic" result="opA" flood-color=${shadows.baselineColor} flood-opacity=${shadows.opacityAmbient + shadows.opacityBoost} />
|
|
3598
3812
|
<feComposite in="opU" in2="blurU" result="shU" operator="in" />
|
|
3599
3813
|
<feComposite in="opP" in2="blurP" result="shP" operator="in" />
|
|
3600
3814
|
<feComposite in="opA" in2="blurA" result="shA" operator="in" />
|
|
@@ -3608,36 +3822,35 @@ class DecidablesElement extends s {
|
|
|
3608
3822
|
<feMergeNode in="finalA" />
|
|
3609
3823
|
<feMergeNode in="SourceGraphic" />
|
|
3610
3824
|
</feMerge>
|
|
3611
|
-
</filter
|
|
3825
|
+
</filter>`;
|
|
3612
3826
|
});
|
|
3613
|
-
return y
|
|
3827
|
+
return y`
|
|
3614
3828
|
<svg class="defs">
|
|
3615
3829
|
<defs>
|
|
3616
|
-
${
|
|
3830
|
+
${filters}
|
|
3617
3831
|
</defs>
|
|
3618
3832
|
</svg>
|
|
3619
|
-
|
|
3833
|
+
`;
|
|
3620
3834
|
}
|
|
3621
|
-
|
|
3622
3835
|
static get styles() {
|
|
3623
|
-
return r$2
|
|
3836
|
+
return r$2`
|
|
3624
3837
|
:host {
|
|
3625
|
-
---shadow-0: var(--shadow-0, ${0});
|
|
3626
|
-
---shadow-2: var(--shadow-2, ${
|
|
3627
|
-
---shadow-4: var(--shadow-4, ${
|
|
3628
|
-
---shadow-8: var(--shadow-8, ${
|
|
3629
|
-
|
|
3630
|
-
---color-background: var(--color-background, ${
|
|
3631
|
-
---color-border: var(--color-border, ${
|
|
3632
|
-
---color-text: var(--color-text, ${
|
|
3633
|
-
---color-text-inverse: var(--color-text-inverse, ${
|
|
3634
|
-
---color-link: var(--color-link, ${
|
|
3635
|
-
---color-element-background: var(--color-element-background, ${
|
|
3636
|
-
---color-element-disabled: var(--color-element-disabled, ${
|
|
3637
|
-
---color-element-enabled: var(--color-element-enabled, ${
|
|
3638
|
-
---color-element-selected: var(--color-element-selected, ${
|
|
3639
|
-
---color-element-border: var(--color-element-border, ${
|
|
3640
|
-
---color-element-emphasis: var(--color-element-emphasis, ${
|
|
3838
|
+
---shadow-0: var(--shadow-0, ${o$3(this.cssBoxShadow(0))});
|
|
3839
|
+
---shadow-2: var(--shadow-2, ${o$3(this.cssBoxShadow(2))});
|
|
3840
|
+
---shadow-4: var(--shadow-4, ${o$3(this.cssBoxShadow(4))});
|
|
3841
|
+
---shadow-8: var(--shadow-8, ${o$3(this.cssBoxShadow(8))});
|
|
3842
|
+
|
|
3843
|
+
---color-background: var(--color-background, ${o$3(this.greys.white)});
|
|
3844
|
+
---color-border: var(--color-border, ${o$3(this.greys.light75)});
|
|
3845
|
+
---color-text: var(--color-text, ${o$3(this.greys.dark75)});
|
|
3846
|
+
---color-text-inverse: var(--color-text-inverse, ${o$3(this.greys.white)});
|
|
3847
|
+
---color-link: var(--color-link, ${o$3(this.greys.dark25)});
|
|
3848
|
+
---color-element-background: var(--color-element-background, ${o$3(this.greys.light75)});
|
|
3849
|
+
---color-element-disabled: var(--color-element-disabled, ${o$3(this.greys.light50)});
|
|
3850
|
+
---color-element-enabled: var(--color-element-enabled, ${o$3(this.greys.dark25)});
|
|
3851
|
+
---color-element-selected: var(--color-element-selected, ${o$3(this.greys.grey)});
|
|
3852
|
+
---color-element-border: var(--color-element-border, ${o$3(this.greys.dark50)});
|
|
3853
|
+
---color-element-emphasis: var(--color-element-emphasis, ${o$3(this.greys.dark75)});
|
|
3641
3854
|
|
|
3642
3855
|
---font-family-base: var(--font-family-base, "Source Sans", sans-serif);
|
|
3643
3856
|
---font-family-math: var(--font-family-math, "Source Serif", serif);
|
|
@@ -3677,14 +3890,10 @@ class DecidablesElement extends s {
|
|
|
3677
3890
|
width: 0;
|
|
3678
3891
|
height: 0;
|
|
3679
3892
|
}
|
|
3680
|
-
|
|
3893
|
+
`;
|
|
3681
3894
|
}
|
|
3682
|
-
|
|
3683
3895
|
}
|
|
3684
3896
|
|
|
3685
|
-
let _$5 = t => t,
|
|
3686
|
-
_t$5,
|
|
3687
|
-
_t2$5;
|
|
3688
3897
|
class DecidablesButton extends DecidablesElement {
|
|
3689
3898
|
static get properties() {
|
|
3690
3899
|
return {
|
|
@@ -3695,15 +3904,14 @@ class DecidablesButton extends DecidablesElement {
|
|
|
3695
3904
|
}
|
|
3696
3905
|
};
|
|
3697
3906
|
}
|
|
3698
|
-
|
|
3699
3907
|
constructor() {
|
|
3700
|
-
super();
|
|
3908
|
+
super();
|
|
3701
3909
|
|
|
3910
|
+
// Attributes
|
|
3702
3911
|
this.disabled = false;
|
|
3703
3912
|
}
|
|
3704
|
-
|
|
3705
3913
|
static get styles() {
|
|
3706
|
-
return [super.styles, r$2
|
|
3914
|
+
return [super.styles, r$2`
|
|
3707
3915
|
:host {
|
|
3708
3916
|
margin: 0.25rem;
|
|
3709
3917
|
}
|
|
@@ -3756,17 +3964,15 @@ class DecidablesButton extends DecidablesElement {
|
|
|
3756
3964
|
outline: none;
|
|
3757
3965
|
box-shadow: var(---shadow-8);
|
|
3758
3966
|
}
|
|
3759
|
-
`
|
|
3967
|
+
`];
|
|
3760
3968
|
}
|
|
3761
|
-
|
|
3762
3969
|
render() {
|
|
3763
|
-
return
|
|
3764
|
-
<button ?disabled=${
|
|
3970
|
+
return $`
|
|
3971
|
+
<button ?disabled=${this.disabled}>
|
|
3765
3972
|
<slot></slot>
|
|
3766
3973
|
</button>
|
|
3767
|
-
|
|
3974
|
+
`;
|
|
3768
3975
|
}
|
|
3769
|
-
|
|
3770
3976
|
}
|
|
3771
3977
|
customElements.define('decidables-button', DecidablesButton);
|
|
3772
3978
|
|
|
@@ -3775,12 +3981,8 @@ customElements.define('decidables-button', DecidablesButton);
|
|
|
3775
3981
|
* Copyright 2018 Google LLC
|
|
3776
3982
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3777
3983
|
*/
|
|
3984
|
+
const l = l => null != l ? l : b$1;
|
|
3778
3985
|
|
|
3779
|
-
const l = l => null != l ? l : w;
|
|
3780
|
-
|
|
3781
|
-
let _$4 = t => t,
|
|
3782
|
-
_t$4,
|
|
3783
|
-
_t2$4;
|
|
3784
3986
|
class DecidablesSlider extends DecidablesElement {
|
|
3785
3987
|
static get properties() {
|
|
3786
3988
|
return {
|
|
@@ -3811,17 +4013,16 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3811
4013
|
}
|
|
3812
4014
|
};
|
|
3813
4015
|
}
|
|
3814
|
-
|
|
3815
4016
|
constructor() {
|
|
3816
|
-
super();
|
|
4017
|
+
super();
|
|
3817
4018
|
|
|
4019
|
+
// Attributes
|
|
3818
4020
|
this.disabled = false;
|
|
3819
4021
|
this.max = undefined;
|
|
3820
4022
|
this.min = undefined;
|
|
3821
4023
|
this.step = undefined;
|
|
3822
4024
|
this.value = undefined;
|
|
3823
4025
|
}
|
|
3824
|
-
|
|
3825
4026
|
changed(event) {
|
|
3826
4027
|
this.value = event.target.value;
|
|
3827
4028
|
this.dispatchEvent(new CustomEvent('change', {
|
|
@@ -3831,17 +4032,15 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
3831
4032
|
bubbles: true
|
|
3832
4033
|
}));
|
|
3833
4034
|
}
|
|
3834
|
-
|
|
3835
4035
|
inputted(event) {
|
|
3836
4036
|
this.value = event.target.value;
|
|
3837
4037
|
}
|
|
3838
|
-
|
|
3839
4038
|
static get styles() {
|
|
3840
|
-
return [super.styles, r$2
|
|
4039
|
+
return [super.styles, r$2`
|
|
3841
4040
|
:host {
|
|
3842
|
-
---shadow-2-rotate: var(--shadow-2-rotate, ${
|
|
3843
|
-
---shadow-4-rotate: var(--shadow-4-rotate, ${
|
|
3844
|
-
---shadow-8-rotate: var(--shadow-8-rotate, ${
|
|
4041
|
+
---shadow-2-rotate: var(--shadow-2-rotate, ${o$3(this.cssBoxShadow(2, true, false))});
|
|
4042
|
+
---shadow-4-rotate: var(--shadow-4-rotate, ${o$3(this.cssBoxShadow(4, true, false))});
|
|
4043
|
+
---shadow-8-rotate: var(--shadow-8-rotate, ${o$3(this.cssBoxShadow(8, true, false))});
|
|
3845
4044
|
|
|
3846
4045
|
display: flex;
|
|
3847
4046
|
|
|
@@ -4087,27 +4286,22 @@ class DecidablesSlider extends DecidablesElement {
|
|
|
4087
4286
|
:host(.keyboard) input[type=range]:enabled:focus:active::-ms-thumb {
|
|
4088
4287
|
box-shadow: var(---shadow-8-rotate);
|
|
4089
4288
|
}
|
|
4090
|
-
`
|
|
4289
|
+
`];
|
|
4091
4290
|
}
|
|
4092
|
-
|
|
4093
4291
|
render() {
|
|
4094
|
-
return
|
|
4292
|
+
return $`
|
|
4095
4293
|
<label for="slider">
|
|
4096
4294
|
<slot></slot>
|
|
4097
4295
|
</label>
|
|
4098
4296
|
<div class="range">
|
|
4099
|
-
<input type="range" id="slider" min=${
|
|
4297
|
+
<input type="range" id="slider" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
|
|
4100
4298
|
</div>
|
|
4101
|
-
<decidables-spinner min=${
|
|
4102
|
-
|
|
4299
|
+
<decidables-spinner min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
|
|
4300
|
+
`;
|
|
4103
4301
|
}
|
|
4104
|
-
|
|
4105
4302
|
}
|
|
4106
4303
|
customElements.define('decidables-slider', DecidablesSlider);
|
|
4107
4304
|
|
|
4108
|
-
let _$3 = t => t,
|
|
4109
|
-
_t$3,
|
|
4110
|
-
_t2$3;
|
|
4111
4305
|
class DecidablesSpinner extends DecidablesElement {
|
|
4112
4306
|
static get properties() {
|
|
4113
4307
|
return {
|
|
@@ -4138,23 +4332,21 @@ class DecidablesSpinner extends DecidablesElement {
|
|
|
4138
4332
|
}
|
|
4139
4333
|
};
|
|
4140
4334
|
}
|
|
4141
|
-
|
|
4142
4335
|
constructor() {
|
|
4143
|
-
super();
|
|
4336
|
+
super();
|
|
4144
4337
|
|
|
4338
|
+
// Attributes
|
|
4145
4339
|
this.disabled = false;
|
|
4146
4340
|
this.max = undefined;
|
|
4147
4341
|
this.min = undefined;
|
|
4148
4342
|
this.step = undefined;
|
|
4149
4343
|
this.value = undefined;
|
|
4150
4344
|
}
|
|
4151
|
-
|
|
4152
4345
|
inputted(event) {
|
|
4153
4346
|
this.value = event.target.value;
|
|
4154
4347
|
}
|
|
4155
|
-
|
|
4156
4348
|
static get styles() {
|
|
4157
|
-
return [super.styles, r$2
|
|
4349
|
+
return [super.styles, r$2`
|
|
4158
4350
|
:host {
|
|
4159
4351
|
---decidables-spinner-font-size: var(--decidables-spinner-font-size, 1.125rem);
|
|
4160
4352
|
---decidables-spinner-input-width: var(--decidables-spinner-input-width, 4rem);
|
|
@@ -4233,24 +4425,19 @@ class DecidablesSpinner extends DecidablesElement {
|
|
|
4233
4425
|
margin: 0;
|
|
4234
4426
|
-webkit-appearance: none; /* stylelint-disable-line property-no-vendor-prefix */
|
|
4235
4427
|
}
|
|
4236
|
-
`
|
|
4428
|
+
`];
|
|
4237
4429
|
}
|
|
4238
|
-
|
|
4239
4430
|
render() {
|
|
4240
|
-
return
|
|
4431
|
+
return $`
|
|
4241
4432
|
<label>
|
|
4242
4433
|
<slot></slot>
|
|
4243
|
-
<input ?disabled=${
|
|
4434
|
+
<input ?disabled=${this.disabled} type="number" min=${l(this.min)} max=${l(this.max)} step=${l(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}>
|
|
4244
4435
|
</label>
|
|
4245
|
-
|
|
4436
|
+
`;
|
|
4246
4437
|
}
|
|
4247
|
-
|
|
4248
4438
|
}
|
|
4249
4439
|
customElements.define('decidables-spinner', DecidablesSpinner);
|
|
4250
4440
|
|
|
4251
|
-
let _$2 = t => t,
|
|
4252
|
-
_t$2,
|
|
4253
|
-
_t2$2;
|
|
4254
4441
|
class DecidablesSwitch extends DecidablesElement {
|
|
4255
4442
|
static get properties() {
|
|
4256
4443
|
return {
|
|
@@ -4266,14 +4453,13 @@ class DecidablesSwitch extends DecidablesElement {
|
|
|
4266
4453
|
}
|
|
4267
4454
|
};
|
|
4268
4455
|
}
|
|
4269
|
-
|
|
4270
4456
|
constructor() {
|
|
4271
|
-
super();
|
|
4457
|
+
super();
|
|
4272
4458
|
|
|
4459
|
+
// Attributes
|
|
4273
4460
|
this.checked = false;
|
|
4274
4461
|
this.disabled = false;
|
|
4275
4462
|
}
|
|
4276
|
-
|
|
4277
4463
|
changed(event) {
|
|
4278
4464
|
this.checked = event.target.checked;
|
|
4279
4465
|
this.dispatchEvent(new CustomEvent('change', {
|
|
@@ -4283,9 +4469,8 @@ class DecidablesSwitch extends DecidablesElement {
|
|
|
4283
4469
|
bubbles: true
|
|
4284
4470
|
}));
|
|
4285
4471
|
}
|
|
4286
|
-
|
|
4287
4472
|
static get styles() {
|
|
4288
|
-
return [super.styles, r$2
|
|
4473
|
+
return [super.styles, r$2`
|
|
4289
4474
|
:host {
|
|
4290
4475
|
display: flex;
|
|
4291
4476
|
|
|
@@ -4404,27 +4589,22 @@ class DecidablesSwitch extends DecidablesElement {
|
|
|
4404
4589
|
:host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
|
|
4405
4590
|
box-shadow: var(---shadow-8);
|
|
4406
4591
|
}
|
|
4407
|
-
`
|
|
4592
|
+
`];
|
|
4408
4593
|
}
|
|
4409
|
-
|
|
4410
4594
|
render() {
|
|
4411
|
-
return
|
|
4412
|
-
<input type="checkbox" id="switch" ?checked=${
|
|
4595
|
+
return $`
|
|
4596
|
+
<input type="checkbox" id="switch" ?checked=${this.checked} ?disabled=${this.disabled} @change=${this.changed.bind(this)}>
|
|
4413
4597
|
<label for="switch">
|
|
4414
4598
|
<slot name="off-label"></slot>
|
|
4415
4599
|
</label>
|
|
4416
4600
|
<label for="switch">
|
|
4417
4601
|
<slot></slot>
|
|
4418
4602
|
</label>
|
|
4419
|
-
|
|
4603
|
+
`;
|
|
4420
4604
|
}
|
|
4421
|
-
|
|
4422
4605
|
}
|
|
4423
4606
|
customElements.define('decidables-switch', DecidablesSwitch);
|
|
4424
4607
|
|
|
4425
|
-
let _$1 = t => t,
|
|
4426
|
-
_t$1,
|
|
4427
|
-
_t2$1;
|
|
4428
4608
|
class DecidablesToggle extends DecidablesElement {
|
|
4429
4609
|
static get properties() {
|
|
4430
4610
|
return {
|
|
@@ -4435,15 +4615,14 @@ class DecidablesToggle extends DecidablesElement {
|
|
|
4435
4615
|
}
|
|
4436
4616
|
};
|
|
4437
4617
|
}
|
|
4438
|
-
|
|
4439
4618
|
constructor() {
|
|
4440
|
-
super();
|
|
4619
|
+
super();
|
|
4441
4620
|
|
|
4621
|
+
// Attributes
|
|
4442
4622
|
this.disabled = false;
|
|
4443
4623
|
}
|
|
4444
|
-
|
|
4445
4624
|
static get styles() {
|
|
4446
|
-
return [super.styles, r$2
|
|
4625
|
+
return [super.styles, r$2`
|
|
4447
4626
|
fieldset {
|
|
4448
4627
|
display: flex;
|
|
4449
4628
|
|
|
@@ -4460,24 +4639,19 @@ class DecidablesToggle extends DecidablesElement {
|
|
|
4460
4639
|
legend {
|
|
4461
4640
|
text-align: center;
|
|
4462
4641
|
}
|
|
4463
|
-
`
|
|
4642
|
+
`];
|
|
4464
4643
|
}
|
|
4465
|
-
|
|
4466
4644
|
render() {
|
|
4467
|
-
return
|
|
4468
|
-
<fieldset ?disabled=${
|
|
4645
|
+
return $`
|
|
4646
|
+
<fieldset ?disabled=${this.disabled}>
|
|
4469
4647
|
<legend><slot name="label"></slot></legend>
|
|
4470
4648
|
<slot></slot>
|
|
4471
4649
|
</fieldset>
|
|
4472
|
-
|
|
4650
|
+
`;
|
|
4473
4651
|
}
|
|
4474
|
-
|
|
4475
4652
|
}
|
|
4476
4653
|
customElements.define('decidables-toggle', DecidablesToggle);
|
|
4477
4654
|
|
|
4478
|
-
let _ = t => t,
|
|
4479
|
-
_t,
|
|
4480
|
-
_t2;
|
|
4481
4655
|
class DecidablesToggleOption extends DecidablesElement {
|
|
4482
4656
|
static get properties() {
|
|
4483
4657
|
return {
|
|
@@ -4503,16 +4677,15 @@ class DecidablesToggleOption extends DecidablesElement {
|
|
|
4503
4677
|
}
|
|
4504
4678
|
};
|
|
4505
4679
|
}
|
|
4506
|
-
|
|
4507
4680
|
constructor() {
|
|
4508
|
-
super();
|
|
4681
|
+
super();
|
|
4509
4682
|
|
|
4683
|
+
// Attributes
|
|
4510
4684
|
this.checked = false;
|
|
4511
4685
|
this.disabled = false;
|
|
4512
4686
|
this.name = undefined;
|
|
4513
4687
|
this.value = undefined;
|
|
4514
4688
|
}
|
|
4515
|
-
|
|
4516
4689
|
changed(event) {
|
|
4517
4690
|
this.checked = event.target.checked;
|
|
4518
4691
|
this.dispatchEvent(new CustomEvent('change', {
|
|
@@ -4523,9 +4696,8 @@ class DecidablesToggleOption extends DecidablesElement {
|
|
|
4523
4696
|
bubbles: true
|
|
4524
4697
|
}));
|
|
4525
4698
|
}
|
|
4526
|
-
|
|
4527
4699
|
static get styles() {
|
|
4528
|
-
return [super.styles, r$2
|
|
4700
|
+
return [super.styles, r$2`
|
|
4529
4701
|
:host {
|
|
4530
4702
|
display: flex;
|
|
4531
4703
|
}
|
|
@@ -4618,18 +4790,16 @@ class DecidablesToggleOption extends DecidablesElement {
|
|
|
4618
4790
|
outline: none;
|
|
4619
4791
|
box-shadow: var(---shadow-8);
|
|
4620
4792
|
}
|
|
4621
|
-
`
|
|
4793
|
+
`];
|
|
4622
4794
|
}
|
|
4623
|
-
|
|
4624
4795
|
render() {
|
|
4625
|
-
return
|
|
4626
|
-
<input type="radio" id="toggle-option" name=${
|
|
4796
|
+
return $`
|
|
4797
|
+
<input type="radio" id="toggle-option" name=${this.name} value=${this.value} .checked=${this.checked} @change=${this.changed.bind(this)}>
|
|
4627
4798
|
<label for="toggle-option">
|
|
4628
4799
|
<slot></slot>
|
|
4629
4800
|
</label>
|
|
4630
|
-
|
|
4801
|
+
`;
|
|
4631
4802
|
}
|
|
4632
|
-
|
|
4633
4803
|
}
|
|
4634
4804
|
customElements.define('decidables-toggle-option', DecidablesToggleOption);
|
|
4635
4805
|
|