beautiful-backgrounds 0.0.7 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +61 -76
- package/build/bb.es.js +2995 -0
- package/build/bb.es.js.map +1 -0
- package/build/bb.js +8 -0
- package/build/bb.js.map +1 -0
- package/build/index.d.ts +8 -0
- package/build/src/BeautifulBackground.d.ts +25 -0
- package/build/src/Particle.d.ts +53 -0
- package/build/src/Symbol.d.ts +7 -0
- package/build/src/components/ambientRibbon.d.ts +25 -0
- package/build/src/components/concentricPulse.d.ts +19 -0
- package/{dist/components/DigitalRain.d.ts → build/src/components/digitalRain.d.ts} +13 -11
- package/build/src/components/hexagonWave.d.ts +29 -0
- package/build/src/components/liquidLines.d.ts +24 -0
- package/build/src/components/neonRails.d.ts +31 -0
- package/build/src/components/startTrail.d.ts +33 -0
- package/build/src/stories/AmbientRibbon.stories.d.ts +16 -0
- package/build/src/stories/ConcentricPulse.stories.d.ts +15 -0
- package/build/src/stories/DigitalRain.stories.d.ts +13 -0
- package/build/src/stories/HexagonWave.stories.d.ts +19 -0
- package/build/src/stories/LiquidLines.stories.d.ts +17 -0
- package/build/src/stories/NeonRails.stories.d.ts +20 -0
- package/build/src/stories/StartTrail.stories.d.ts +20 -0
- package/build/src/utils/color.d.ts +2 -0
- package/build/src/utils/function.d.ts +1 -0
- package/build/src/utils/lit.d.ts +2 -0
- package/{dist → build/src}/utils/number.d.ts +0 -1
- package/build/vite.svg +1 -0
- package/package.json +58 -27
- package/dist/beautiful-backgrounds.min.js +0 -1
- package/dist/components/BeautifulBackground.d.ts +0 -28
- package/dist/components/BeautifulBackground.js +0 -110
- package/dist/components/DigitalRain.js +0 -85
- package/dist/components/Particle.d.ts +0 -18
- package/dist/components/Particle.js +0 -44
- package/dist/components/StarTrail.d.ts +0 -30
- package/dist/components/StarTrail.js +0 -95
- package/dist/components/Symbol.d.ts +0 -7
- package/dist/components/Symbol.js +0 -18
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/utils/color.d.ts +0 -1
- package/dist/utils/color.js +0 -7
- package/dist/utils/number.js +0 -20
- package/dist/utils/object.js +0 -9
- /package/{dist → build/src}/utils/object.d.ts +0 -0
package/build/bb.es.js
ADDED
|
@@ -0,0 +1,2995 @@
|
|
|
1
|
+
// node_modules/@lit/reactive-element/css-tag.js
|
|
2
|
+
var e = globalThis, t = e.ShadowRoot && (e.ShadyCSS === void 0 || e.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, n = Symbol(), r = /* @__PURE__ */ new WeakMap(), i = class {
|
|
3
|
+
constructor(e, t, r) {
|
|
4
|
+
if (this._$cssResult$ = !0, r !== n) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
5
|
+
this.cssText = e, this.t = t;
|
|
6
|
+
}
|
|
7
|
+
get styleSheet() {
|
|
8
|
+
let e = this.o, n = this.t;
|
|
9
|
+
if (t && e === void 0) {
|
|
10
|
+
let t = n !== void 0 && n.length === 1;
|
|
11
|
+
t && (e = r.get(n)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), t && r.set(n, e));
|
|
12
|
+
}
|
|
13
|
+
return e;
|
|
14
|
+
}
|
|
15
|
+
toString() {
|
|
16
|
+
return this.cssText;
|
|
17
|
+
}
|
|
18
|
+
}, a = (e) => new i(typeof e == "string" ? e : e + "", void 0, n), o = (e, ...t) => new i(e.length === 1 ? e[0] : t.reduce((t, n, r) => t + ((e) => {
|
|
19
|
+
if (!0 === e._$cssResult$) return e.cssText;
|
|
20
|
+
if (typeof e == "number") return e;
|
|
21
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + e + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
22
|
+
})(n) + e[r + 1], e[0]), e, n), s = (n, r) => {
|
|
23
|
+
if (t) n.adoptedStyleSheets = r.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
24
|
+
else for (let t of r) {
|
|
25
|
+
let r = document.createElement("style"), i = e.litNonce;
|
|
26
|
+
i !== void 0 && r.setAttribute("nonce", i), r.textContent = t.cssText, n.appendChild(r);
|
|
27
|
+
}
|
|
28
|
+
}, c = t ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((e) => {
|
|
29
|
+
let t = "";
|
|
30
|
+
for (let n of e.cssRules) t += n.cssText;
|
|
31
|
+
return a(t);
|
|
32
|
+
})(e) : e, { is: l, defineProperty: u, getOwnPropertyDescriptor: d, getOwnPropertyNames: f, getOwnPropertySymbols: p, getPrototypeOf: m } = Object, h = globalThis, g = h.trustedTypes, _ = g ? g.emptyScript : "", ee = h.reactiveElementPolyfillSupport, v = (e, t) => e, y = {
|
|
33
|
+
toAttribute(e, t) {
|
|
34
|
+
switch (t) {
|
|
35
|
+
case Boolean:
|
|
36
|
+
e = e ? _ : null;
|
|
37
|
+
break;
|
|
38
|
+
case Object:
|
|
39
|
+
case Array: e = e == null ? e : JSON.stringify(e);
|
|
40
|
+
}
|
|
41
|
+
return e;
|
|
42
|
+
},
|
|
43
|
+
fromAttribute(e, t) {
|
|
44
|
+
let n = e;
|
|
45
|
+
switch (t) {
|
|
46
|
+
case Boolean:
|
|
47
|
+
n = e !== null;
|
|
48
|
+
break;
|
|
49
|
+
case Number:
|
|
50
|
+
n = e === null ? null : Number(e);
|
|
51
|
+
break;
|
|
52
|
+
case Object:
|
|
53
|
+
case Array: try {
|
|
54
|
+
n = JSON.parse(e);
|
|
55
|
+
} catch {
|
|
56
|
+
n = null;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return n;
|
|
60
|
+
}
|
|
61
|
+
}, te = (e, t) => !l(e, t), ne = {
|
|
62
|
+
attribute: !0,
|
|
63
|
+
type: String,
|
|
64
|
+
converter: y,
|
|
65
|
+
reflect: !1,
|
|
66
|
+
useDefault: !1,
|
|
67
|
+
hasChanged: te
|
|
68
|
+
};
|
|
69
|
+
Symbol.metadata ??= Symbol("metadata"), h.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
70
|
+
var b = class extends HTMLElement {
|
|
71
|
+
static addInitializer(e) {
|
|
72
|
+
this._$Ei(), (this.l ??= []).push(e);
|
|
73
|
+
}
|
|
74
|
+
static get observedAttributes() {
|
|
75
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
76
|
+
}
|
|
77
|
+
static createProperty(e, t = ne) {
|
|
78
|
+
if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
79
|
+
let n = Symbol(), r = this.getPropertyDescriptor(e, n, t);
|
|
80
|
+
r !== void 0 && u(this.prototype, e, r);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
static getPropertyDescriptor(e, t, n) {
|
|
84
|
+
let { get: r, set: i } = d(this.prototype, e) ?? {
|
|
85
|
+
get() {
|
|
86
|
+
return this[t];
|
|
87
|
+
},
|
|
88
|
+
set(e) {
|
|
89
|
+
this[t] = e;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
return {
|
|
93
|
+
get: r,
|
|
94
|
+
set(t) {
|
|
95
|
+
let a = r?.call(this);
|
|
96
|
+
i?.call(this, t), this.requestUpdate(e, a, n);
|
|
97
|
+
},
|
|
98
|
+
configurable: !0,
|
|
99
|
+
enumerable: !0
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
static getPropertyOptions(e) {
|
|
103
|
+
return this.elementProperties.get(e) ?? ne;
|
|
104
|
+
}
|
|
105
|
+
static _$Ei() {
|
|
106
|
+
if (this.hasOwnProperty(v("elementProperties"))) return;
|
|
107
|
+
let e = m(this);
|
|
108
|
+
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
109
|
+
}
|
|
110
|
+
static finalize() {
|
|
111
|
+
if (this.hasOwnProperty(v("finalized"))) return;
|
|
112
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(v("properties"))) {
|
|
113
|
+
let e = this.properties, t = [...f(e), ...p(e)];
|
|
114
|
+
for (let n of t) this.createProperty(n, e[n]);
|
|
115
|
+
}
|
|
116
|
+
let e = this[Symbol.metadata];
|
|
117
|
+
if (e !== null) {
|
|
118
|
+
let t = litPropertyMetadata.get(e);
|
|
119
|
+
if (t !== void 0) for (let [e, n] of t) this.elementProperties.set(e, n);
|
|
120
|
+
}
|
|
121
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
122
|
+
for (let [e, t] of this.elementProperties) {
|
|
123
|
+
let n = this._$Eu(e, t);
|
|
124
|
+
n !== void 0 && this._$Eh.set(n, e);
|
|
125
|
+
}
|
|
126
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
127
|
+
}
|
|
128
|
+
static finalizeStyles(e) {
|
|
129
|
+
let t = [];
|
|
130
|
+
if (Array.isArray(e)) {
|
|
131
|
+
let n = new Set(e.flat(1 / 0).reverse());
|
|
132
|
+
for (let e of n) t.unshift(c(e));
|
|
133
|
+
} else e !== void 0 && t.push(c(e));
|
|
134
|
+
return t;
|
|
135
|
+
}
|
|
136
|
+
static _$Eu(e, t) {
|
|
137
|
+
let n = t.attribute;
|
|
138
|
+
return !1 === n ? void 0 : typeof n == "string" ? n : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
139
|
+
}
|
|
140
|
+
constructor() {
|
|
141
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
142
|
+
}
|
|
143
|
+
_$Ev() {
|
|
144
|
+
this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((e) => e(this));
|
|
145
|
+
}
|
|
146
|
+
addController(e) {
|
|
147
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
|
|
148
|
+
}
|
|
149
|
+
removeController(e) {
|
|
150
|
+
this._$EO?.delete(e);
|
|
151
|
+
}
|
|
152
|
+
_$E_() {
|
|
153
|
+
let e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
|
|
154
|
+
for (let n of t.keys()) this.hasOwnProperty(n) && (e.set(n, this[n]), delete this[n]);
|
|
155
|
+
e.size > 0 && (this._$Ep = e);
|
|
156
|
+
}
|
|
157
|
+
createRenderRoot() {
|
|
158
|
+
let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
159
|
+
return s(e, this.constructor.elementStyles), e;
|
|
160
|
+
}
|
|
161
|
+
connectedCallback() {
|
|
162
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
|
|
163
|
+
}
|
|
164
|
+
enableUpdating(e) {}
|
|
165
|
+
disconnectedCallback() {
|
|
166
|
+
this._$EO?.forEach((e) => e.hostDisconnected?.());
|
|
167
|
+
}
|
|
168
|
+
attributeChangedCallback(e, t, n) {
|
|
169
|
+
this._$AK(e, n);
|
|
170
|
+
}
|
|
171
|
+
_$ET(e, t) {
|
|
172
|
+
let n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
|
|
173
|
+
if (r !== void 0 && !0 === n.reflect) {
|
|
174
|
+
let i = (n.converter?.toAttribute === void 0 ? y : n.converter).toAttribute(t, n.type);
|
|
175
|
+
this._$Em = e, i == null ? this.removeAttribute(r) : this.setAttribute(r, i), this._$Em = null;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
_$AK(e, t) {
|
|
179
|
+
let n = this.constructor, r = n._$Eh.get(e);
|
|
180
|
+
if (r !== void 0 && this._$Em !== r) {
|
|
181
|
+
let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ? y : e.converter;
|
|
182
|
+
this._$Em = r;
|
|
183
|
+
let a = i.fromAttribute(t, e.type);
|
|
184
|
+
this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
requestUpdate(e, t, n, r = !1, i) {
|
|
188
|
+
if (e !== void 0) {
|
|
189
|
+
let a = this.constructor;
|
|
190
|
+
if (!1 === r && (i = this[e]), n ??= a.getPropertyOptions(e), !((n.hasChanged ?? te)(i, t) || n.useDefault && n.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(a._$Eu(e, n)))) return;
|
|
191
|
+
this.C(e, t, n);
|
|
192
|
+
}
|
|
193
|
+
!1 === this.isUpdatePending && (this._$ES = this._$EP());
|
|
194
|
+
}
|
|
195
|
+
C(e, t, { useDefault: n, reflect: r, wrapped: i }, a) {
|
|
196
|
+
n && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, a ?? t ?? this[e]), !0 !== i || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || n || (t = void 0), this._$AL.set(e, t)), !0 === r && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
|
|
197
|
+
}
|
|
198
|
+
async _$EP() {
|
|
199
|
+
this.isUpdatePending = !0;
|
|
200
|
+
try {
|
|
201
|
+
await this._$ES;
|
|
202
|
+
} catch (e) {
|
|
203
|
+
Promise.reject(e);
|
|
204
|
+
}
|
|
205
|
+
let e = this.scheduleUpdate();
|
|
206
|
+
return e != null && await e, !this.isUpdatePending;
|
|
207
|
+
}
|
|
208
|
+
scheduleUpdate() {
|
|
209
|
+
return this.performUpdate();
|
|
210
|
+
}
|
|
211
|
+
performUpdate() {
|
|
212
|
+
if (!this.isUpdatePending) return;
|
|
213
|
+
if (!this.hasUpdated) {
|
|
214
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
215
|
+
for (let [e, t] of this._$Ep) this[e] = t;
|
|
216
|
+
this._$Ep = void 0;
|
|
217
|
+
}
|
|
218
|
+
let e = this.constructor.elementProperties;
|
|
219
|
+
if (e.size > 0) for (let [t, n] of e) {
|
|
220
|
+
let { wrapped: e } = n, r = this[t];
|
|
221
|
+
!0 !== e || this._$AL.has(t) || r === void 0 || this.C(t, void 0, n, r);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
let e = !1, t = this._$AL;
|
|
225
|
+
try {
|
|
226
|
+
e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach((e) => e.hostUpdate?.()), this.update(t)) : this._$EM();
|
|
227
|
+
} catch (t) {
|
|
228
|
+
throw e = !1, this._$EM(), t;
|
|
229
|
+
}
|
|
230
|
+
e && this._$AE(t);
|
|
231
|
+
}
|
|
232
|
+
willUpdate(e) {}
|
|
233
|
+
_$AE(e) {
|
|
234
|
+
this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
235
|
+
}
|
|
236
|
+
_$EM() {
|
|
237
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
238
|
+
}
|
|
239
|
+
get updateComplete() {
|
|
240
|
+
return this.getUpdateComplete();
|
|
241
|
+
}
|
|
242
|
+
getUpdateComplete() {
|
|
243
|
+
return this._$ES;
|
|
244
|
+
}
|
|
245
|
+
shouldUpdate(e) {
|
|
246
|
+
return !0;
|
|
247
|
+
}
|
|
248
|
+
update(e) {
|
|
249
|
+
this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM();
|
|
250
|
+
}
|
|
251
|
+
updated(e) {}
|
|
252
|
+
firstUpdated(e) {}
|
|
253
|
+
};
|
|
254
|
+
b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[v("elementProperties")] = /* @__PURE__ */ new Map(), b[v("finalized")] = /* @__PURE__ */ new Map(), ee?.({ ReactiveElement: b }), (h.reactiveElementVersions ??= []).push("2.1.2");
|
|
255
|
+
// node_modules/lit-html/lit-html.js
|
|
256
|
+
var re = globalThis, ie = (e) => e, ae = re.trustedTypes, oe = ae ? ae.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, se = "$lit$", x = `lit$${Math.random().toFixed(9).slice(2)}$`, ce = "?" + x, le = `<${ce}>`, S = document, ue = () => S.createComment(""), de = (e) => e === null || typeof e != "object" && typeof e != "function", fe = Array.isArray, pe = (e) => fe(e) || typeof e?.[Symbol.iterator] == "function", me = "[ \n\f\r]", he = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ge = /-->/g, _e = />/g, C = RegExp(`>|${me}(?:([^\\s"'>=/]+)(${me}*=${me}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), ve = /'/g, ye = /"/g, be = /^(?:script|style|textarea|title)$/i, w = Symbol.for("lit-noChange"), T = Symbol.for("lit-nothing"), xe = /* @__PURE__ */ new WeakMap(), E = S.createTreeWalker(S, 129);
|
|
257
|
+
function Se(e, t) {
|
|
258
|
+
if (!fe(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
259
|
+
return oe === void 0 ? t : oe.createHTML(t);
|
|
260
|
+
}
|
|
261
|
+
var Ce = (e, t) => {
|
|
262
|
+
let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = he;
|
|
263
|
+
for (let t = 0; t < n; t++) {
|
|
264
|
+
let n = e[t], s, c, l = -1, u = 0;
|
|
265
|
+
for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === he ? c[1] === "!--" ? o = ge : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = C) : (be.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = C) : o = _e : o === C ? c[0] === ">" ? (o = i ?? he, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? C : c[3] === "\"" ? ye : ve) : o === ye || o === ve ? o = C : o === ge || o === _e ? o = he : (o = C, i = void 0);
|
|
266
|
+
let d = o === C && e[t + 1].startsWith("/>") ? " " : "";
|
|
267
|
+
a += o === he ? n + le : l >= 0 ? (r.push(s), n.slice(0, l) + se + n.slice(l) + x + d) : n + x + (l === -2 ? t : d);
|
|
268
|
+
}
|
|
269
|
+
return [Se(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
270
|
+
}, we = class e {
|
|
271
|
+
constructor({ strings: t, _$litType$: n }, r) {
|
|
272
|
+
let i;
|
|
273
|
+
this.parts = [];
|
|
274
|
+
let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = Ce(t, n);
|
|
275
|
+
if (this.el = e.createElement(l, r), E.currentNode = this.el.content, n === 2 || n === 3) {
|
|
276
|
+
let e = this.el.content.firstChild;
|
|
277
|
+
e.replaceWith(...e.childNodes);
|
|
278
|
+
}
|
|
279
|
+
for (; (i = E.nextNode()) !== null && c.length < s;) {
|
|
280
|
+
if (i.nodeType === 1) {
|
|
281
|
+
if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith(se)) {
|
|
282
|
+
let t = u[o++], n = i.getAttribute(e).split(x), r = /([.?@])?(.*)/.exec(t);
|
|
283
|
+
c.push({
|
|
284
|
+
type: 1,
|
|
285
|
+
index: a,
|
|
286
|
+
name: r[2],
|
|
287
|
+
strings: n,
|
|
288
|
+
ctor: r[1] === "." ? ke : r[1] === "?" ? Ae : r[1] === "@" ? je : Oe
|
|
289
|
+
}), i.removeAttribute(e);
|
|
290
|
+
} else e.startsWith(x) && (c.push({
|
|
291
|
+
type: 6,
|
|
292
|
+
index: a
|
|
293
|
+
}), i.removeAttribute(e));
|
|
294
|
+
if (be.test(i.tagName)) {
|
|
295
|
+
let e = i.textContent.split(x), t = e.length - 1;
|
|
296
|
+
if (t > 0) {
|
|
297
|
+
i.textContent = ae ? ae.emptyScript : "";
|
|
298
|
+
for (let n = 0; n < t; n++) i.append(e[n], ue()), E.nextNode(), c.push({
|
|
299
|
+
type: 2,
|
|
300
|
+
index: ++a
|
|
301
|
+
});
|
|
302
|
+
i.append(e[t], ue());
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
} else if (i.nodeType === 8) {
|
|
306
|
+
if (i.data === ce) c.push({
|
|
307
|
+
type: 2,
|
|
308
|
+
index: a
|
|
309
|
+
});
|
|
310
|
+
else {
|
|
311
|
+
let e = -1;
|
|
312
|
+
for (; (e = i.data.indexOf(x, e + 1)) !== -1;) c.push({
|
|
313
|
+
type: 7,
|
|
314
|
+
index: a
|
|
315
|
+
}), e += x.length - 1;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
a++;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
static createElement(e, t) {
|
|
322
|
+
let n = S.createElement("template");
|
|
323
|
+
return n.innerHTML = e, n;
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
function Te(e, t, n = e, r) {
|
|
327
|
+
if (t === w) return t;
|
|
328
|
+
let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = de(t) ? void 0 : t._$litDirective$;
|
|
329
|
+
return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = Te(e, i._$AS(e, t.values), i, r)), t;
|
|
330
|
+
}
|
|
331
|
+
var Ee = class {
|
|
332
|
+
constructor(e, t) {
|
|
333
|
+
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
334
|
+
}
|
|
335
|
+
get parentNode() {
|
|
336
|
+
return this._$AM.parentNode;
|
|
337
|
+
}
|
|
338
|
+
get _$AU() {
|
|
339
|
+
return this._$AM._$AU;
|
|
340
|
+
}
|
|
341
|
+
u(e) {
|
|
342
|
+
let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? S).importNode(t, !0);
|
|
343
|
+
E.currentNode = r;
|
|
344
|
+
let i = E.nextNode(), a = 0, o = 0, s = n[0];
|
|
345
|
+
for (; s !== void 0;) {
|
|
346
|
+
if (a === s.index) {
|
|
347
|
+
let t;
|
|
348
|
+
s.type === 2 ? t = new De(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new Me(i, this, e)), this._$AV.push(t), s = n[++o];
|
|
349
|
+
}
|
|
350
|
+
a !== s?.index && (i = E.nextNode(), a++);
|
|
351
|
+
}
|
|
352
|
+
return E.currentNode = S, r;
|
|
353
|
+
}
|
|
354
|
+
p(e) {
|
|
355
|
+
let t = 0;
|
|
356
|
+
for (let n of this._$AV) n !== void 0 && (n.strings === void 0 ? n._$AI(e[t]) : (n._$AI(e, n, t), t += n.strings.length - 2)), t++;
|
|
357
|
+
}
|
|
358
|
+
}, De = class e {
|
|
359
|
+
get _$AU() {
|
|
360
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
361
|
+
}
|
|
362
|
+
constructor(e, t, n, r) {
|
|
363
|
+
this.type = 2, this._$AH = T, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
|
|
364
|
+
}
|
|
365
|
+
get parentNode() {
|
|
366
|
+
let e = this._$AA.parentNode, t = this._$AM;
|
|
367
|
+
return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
|
|
368
|
+
}
|
|
369
|
+
get startNode() {
|
|
370
|
+
return this._$AA;
|
|
371
|
+
}
|
|
372
|
+
get endNode() {
|
|
373
|
+
return this._$AB;
|
|
374
|
+
}
|
|
375
|
+
_$AI(e, t = this) {
|
|
376
|
+
e = Te(this, e, t), de(e) ? e === T || e == null || e === "" ? (this._$AH !== T && this._$AR(), this._$AH = T) : e !== this._$AH && e !== w && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? pe(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
|
|
377
|
+
}
|
|
378
|
+
O(e) {
|
|
379
|
+
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
380
|
+
}
|
|
381
|
+
T(e) {
|
|
382
|
+
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
383
|
+
}
|
|
384
|
+
_(e) {
|
|
385
|
+
this._$AH !== T && de(this._$AH) ? this._$AA.nextSibling.data = e : this.T(S.createTextNode(e)), this._$AH = e;
|
|
386
|
+
}
|
|
387
|
+
$(e) {
|
|
388
|
+
let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = we.createElement(Se(n.h, n.h[0]), this.options)), n);
|
|
389
|
+
if (this._$AH?._$AD === r) this._$AH.p(t);
|
|
390
|
+
else {
|
|
391
|
+
let e = new Ee(r, this), n = e.u(this.options);
|
|
392
|
+
e.p(t), this.T(n), this._$AH = e;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
_$AC(e) {
|
|
396
|
+
let t = xe.get(e.strings);
|
|
397
|
+
return t === void 0 && xe.set(e.strings, t = new we(e)), t;
|
|
398
|
+
}
|
|
399
|
+
k(t) {
|
|
400
|
+
fe(this._$AH) || (this._$AH = [], this._$AR());
|
|
401
|
+
let n = this._$AH, r, i = 0;
|
|
402
|
+
for (let a of t) i === n.length ? n.push(r = new e(this.O(ue()), this.O(ue()), this, this.options)) : r = n[i], r._$AI(a), i++;
|
|
403
|
+
i < n.length && (this._$AR(r && r._$AB.nextSibling, i), n.length = i);
|
|
404
|
+
}
|
|
405
|
+
_$AR(e = this._$AA.nextSibling, t) {
|
|
406
|
+
for (this._$AP?.(!1, !0, t); e !== this._$AB;) {
|
|
407
|
+
let t = ie(e).nextSibling;
|
|
408
|
+
ie(e).remove(), e = t;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
setConnected(e) {
|
|
412
|
+
this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
|
|
413
|
+
}
|
|
414
|
+
}, Oe = class {
|
|
415
|
+
get tagName() {
|
|
416
|
+
return this.element.tagName;
|
|
417
|
+
}
|
|
418
|
+
get _$AU() {
|
|
419
|
+
return this._$AM._$AU;
|
|
420
|
+
}
|
|
421
|
+
constructor(e, t, n, r, i) {
|
|
422
|
+
this.type = 1, this._$AH = T, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = T;
|
|
423
|
+
}
|
|
424
|
+
_$AI(e, t = this, n, r) {
|
|
425
|
+
let i = this.strings, a = !1;
|
|
426
|
+
if (i === void 0) e = Te(this, e, t, 0), a = !de(e) || e !== this._$AH && e !== w, a && (this._$AH = e);
|
|
427
|
+
else {
|
|
428
|
+
let r = e, o, s;
|
|
429
|
+
for (e = i[0], o = 0; o < i.length - 1; o++) s = Te(this, r[n + o], t, o), s === w && (s = this._$AH[o]), a ||= !de(s) || s !== this._$AH[o], s === T ? e = T : e !== T && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
|
|
430
|
+
}
|
|
431
|
+
a && !r && this.j(e);
|
|
432
|
+
}
|
|
433
|
+
j(e) {
|
|
434
|
+
e === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
435
|
+
}
|
|
436
|
+
}, ke = class extends Oe {
|
|
437
|
+
constructor() {
|
|
438
|
+
super(...arguments), this.type = 3;
|
|
439
|
+
}
|
|
440
|
+
j(e) {
|
|
441
|
+
this.element[this.name] = e === T ? void 0 : e;
|
|
442
|
+
}
|
|
443
|
+
}, Ae = class extends Oe {
|
|
444
|
+
constructor() {
|
|
445
|
+
super(...arguments), this.type = 4;
|
|
446
|
+
}
|
|
447
|
+
j(e) {
|
|
448
|
+
this.element.toggleAttribute(this.name, !!e && e !== T);
|
|
449
|
+
}
|
|
450
|
+
}, je = class extends Oe {
|
|
451
|
+
constructor(e, t, n, r, i) {
|
|
452
|
+
super(e, t, n, r, i), this.type = 5;
|
|
453
|
+
}
|
|
454
|
+
_$AI(e, t = this) {
|
|
455
|
+
if ((e = Te(this, e, t, 0) ?? T) === w) return;
|
|
456
|
+
let n = this._$AH, r = e === T && n !== T || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== T && (n === T || r);
|
|
457
|
+
r && this.element.removeEventListener(this.name, this, n), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
458
|
+
}
|
|
459
|
+
handleEvent(e) {
|
|
460
|
+
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
|
|
461
|
+
}
|
|
462
|
+
}, Me = class {
|
|
463
|
+
constructor(e, t, n) {
|
|
464
|
+
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
|
|
465
|
+
}
|
|
466
|
+
get _$AU() {
|
|
467
|
+
return this._$AM._$AU;
|
|
468
|
+
}
|
|
469
|
+
_$AI(e) {
|
|
470
|
+
Te(this, e);
|
|
471
|
+
}
|
|
472
|
+
}, Ne = re.litHtmlPolyfillSupport;
|
|
473
|
+
Ne?.(we, De), (re.litHtmlVersions ??= []).push("3.3.3");
|
|
474
|
+
var Pe = (e, t, n) => {
|
|
475
|
+
let r = n?.renderBefore ?? t, i = r._$litPart$;
|
|
476
|
+
if (i === void 0) {
|
|
477
|
+
let e = n?.renderBefore ?? null;
|
|
478
|
+
r._$litPart$ = i = new De(t.insertBefore(ue(), e), e, void 0, n ?? {});
|
|
479
|
+
}
|
|
480
|
+
return i._$AI(e), i;
|
|
481
|
+
}, Fe = globalThis, Ie = class extends b {
|
|
482
|
+
constructor() {
|
|
483
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
484
|
+
}
|
|
485
|
+
createRenderRoot() {
|
|
486
|
+
let e = super.createRenderRoot();
|
|
487
|
+
return this.renderOptions.renderBefore ??= e.firstChild, e;
|
|
488
|
+
}
|
|
489
|
+
update(e) {
|
|
490
|
+
let t = this.render();
|
|
491
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = Pe(t, this.renderRoot, this.renderOptions);
|
|
492
|
+
}
|
|
493
|
+
connectedCallback() {
|
|
494
|
+
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
495
|
+
}
|
|
496
|
+
disconnectedCallback() {
|
|
497
|
+
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
498
|
+
}
|
|
499
|
+
render() {
|
|
500
|
+
return w;
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
Ie._$litElement$ = !0, Ie.finalized = !0, Fe.litElementHydrateSupport?.({ LitElement: Ie });
|
|
504
|
+
var Le = Fe.litElementPolyfillSupport;
|
|
505
|
+
Le?.({ LitElement: Ie }), (Fe.litElementVersions ??= []).push("4.2.2");
|
|
506
|
+
// node_modules/@lit/reactive-element/decorators/custom-element.js
|
|
507
|
+
var D = (e) => (t, n) => {
|
|
508
|
+
n === void 0 ? customElements.define(e, t) : n.addInitializer(() => {
|
|
509
|
+
customElements.define(e, t);
|
|
510
|
+
});
|
|
511
|
+
}, Re = {
|
|
512
|
+
attribute: !0,
|
|
513
|
+
type: String,
|
|
514
|
+
converter: y,
|
|
515
|
+
reflect: !1,
|
|
516
|
+
hasChanged: te
|
|
517
|
+
}, ze = (e = Re, t, n) => {
|
|
518
|
+
let { kind: r, metadata: i } = n, a = globalThis.litPropertyMetadata.get(i);
|
|
519
|
+
if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), a.set(n.name, e), r === "accessor") {
|
|
520
|
+
let { name: r } = n;
|
|
521
|
+
return {
|
|
522
|
+
set(n) {
|
|
523
|
+
let i = t.get.call(this);
|
|
524
|
+
t.set.call(this, n), this.requestUpdate(r, i, e, !0, n);
|
|
525
|
+
},
|
|
526
|
+
init(t) {
|
|
527
|
+
return t !== void 0 && this.C(r, void 0, e, t), t;
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
if (r === "setter") {
|
|
532
|
+
let { name: r } = n;
|
|
533
|
+
return function(n) {
|
|
534
|
+
let i = this[r];
|
|
535
|
+
t.call(this, n), this.requestUpdate(r, i, e, !0, n);
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
throw Error("Unsupported decorator location: " + r);
|
|
539
|
+
};
|
|
540
|
+
function O(e) {
|
|
541
|
+
return (t, n) => typeof n == "object" ? ze(e, t, n) : ((e, t, n) => {
|
|
542
|
+
let r = t.hasOwnProperty(n);
|
|
543
|
+
return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
|
|
544
|
+
})(e, t, n);
|
|
545
|
+
}
|
|
546
|
+
// src/utils/function.ts
|
|
547
|
+
function Be(e, t) {
|
|
548
|
+
let n;
|
|
549
|
+
return function(...r) {
|
|
550
|
+
clearTimeout(n), n = setTimeout(() => e.apply(this, r), t);
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
// src/utils/lit.ts
|
|
554
|
+
var k = {
|
|
555
|
+
fromAttribute: (e) => e ? e.split(",").map((e) => e.trim()).filter(Boolean) : [],
|
|
556
|
+
toAttribute: (e) => e.join(",")
|
|
557
|
+
};
|
|
558
|
+
// \0@oxc-project+runtime@0.155.0/helpers/esm/decorate.js
|
|
559
|
+
function A(e, t, n, r) {
|
|
560
|
+
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
561
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
562
|
+
else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
|
|
563
|
+
return i > 3 && a && Object.defineProperty(t, n, a), a;
|
|
564
|
+
}
|
|
565
|
+
// src/BeautifulBackground.ts
|
|
566
|
+
var j = class extends Ie {
|
|
567
|
+
constructor() {
|
|
568
|
+
super(), this.bgColors = ["#000", "#000"], this.bgAngle = 0, this.backgroundColor = "0, 0, 0", this.width = 0, this.height = 0, this.animationFrameId = null, this.trailOpacity = .1, this.handleVisibilityChange = () => {
|
|
569
|
+
document.visibilityState === "hidden" ? this.stopAnimation() : this.startAnimation();
|
|
570
|
+
}, this.canvas = document.createElement("canvas"), this.ctx = this.canvas.getContext("2d"), this.debouncedResize = Be(this.resizeCanvas.bind(this), 100);
|
|
571
|
+
}
|
|
572
|
+
firstUpdated() {
|
|
573
|
+
this.shadowRoot || this.attachShadow({ mode: "open" }), this.shadowRoot.appendChild(this.canvas), this.resizeCanvas(), this.initialize(), this.startAnimation(), window.addEventListener("resize", this.debouncedResize), document.addEventListener("visibilitychange", this.handleVisibilityChange);
|
|
574
|
+
}
|
|
575
|
+
disconnectedCallback() {
|
|
576
|
+
super.disconnectedCallback(), window.removeEventListener("resize", this.debouncedResize), document.removeEventListener("visibilitychange", this.handleVisibilityChange), this.stopAnimation();
|
|
577
|
+
}
|
|
578
|
+
drawBackground(e) {
|
|
579
|
+
let t = this.bgAngle * Math.PI / 180, n = (Math.abs(this.width * Math.cos(t)) + Math.abs(this.height * Math.sin(t))) / 2, r = this.width / 2, i = this.height / 2, a = r - Math.cos(t) * n, o = i - Math.sin(t) * n, s = r + Math.cos(t) * n, c = i + Math.sin(t) * n, l = e.createLinearGradient(a, o, s, c), u = this.bgColors.length > 0 ? this.bgColors : ["#000", "#000"];
|
|
580
|
+
try {
|
|
581
|
+
u.forEach((e, t) => {
|
|
582
|
+
let n = t / (u.length - 1 || 1);
|
|
583
|
+
l.addColorStop(n, e);
|
|
584
|
+
});
|
|
585
|
+
} catch {
|
|
586
|
+
l.addColorStop(0, "#000"), l.addColorStop(1, "#000");
|
|
587
|
+
}
|
|
588
|
+
e.fillStyle = l, e.fillRect(0, 0, this.width, this.height);
|
|
589
|
+
}
|
|
590
|
+
resizeCanvas() {
|
|
591
|
+
let e = this.getBoundingClientRect(), t = window.devicePixelRatio || 1;
|
|
592
|
+
(e.width !== this.width || e.height !== this.height) && (this.width = e.width, this.height = e.height, this.canvas.width = Math.floor(this.width * t), this.canvas.height = Math.floor(this.height * t), this.canvas.style.width = `${this.width}px`, this.canvas.style.height = `${this.height}px`, this.canvas.style.borderRadius = "inherit", this.ctx.scale(t, t), this.drawBackground(this.ctx));
|
|
593
|
+
}
|
|
594
|
+
initialize() {}
|
|
595
|
+
startAnimation() {
|
|
596
|
+
if (this.animationFrameId !== null) return;
|
|
597
|
+
let e = performance.now(), t = (n) => {
|
|
598
|
+
let r = (n - e) / 1e3;
|
|
599
|
+
e = n, this.loop(r), this.animationFrameId = requestAnimationFrame(t);
|
|
600
|
+
};
|
|
601
|
+
this.animationFrameId = requestAnimationFrame(t);
|
|
602
|
+
}
|
|
603
|
+
stopAnimation() {
|
|
604
|
+
this.animationFrameId !== null && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = null);
|
|
605
|
+
}
|
|
606
|
+
static {
|
|
607
|
+
this.styles = o`
|
|
608
|
+
:host {
|
|
609
|
+
border-radius: inherit;
|
|
610
|
+
display: flex;
|
|
611
|
+
}
|
|
612
|
+
`;
|
|
613
|
+
}
|
|
614
|
+
render() {}
|
|
615
|
+
};
|
|
616
|
+
A([O({
|
|
617
|
+
type: Array,
|
|
618
|
+
attribute: "bg-colors",
|
|
619
|
+
converter: k
|
|
620
|
+
})], j.prototype, "bgColors", void 0), A([O({
|
|
621
|
+
type: Number,
|
|
622
|
+
attribute: "bg-angle"
|
|
623
|
+
})], j.prototype, "bgAngle", void 0), A([O({
|
|
624
|
+
type: String,
|
|
625
|
+
attribute: "background-color"
|
|
626
|
+
})], j.prototype, "backgroundColor", void 0), A([O({
|
|
627
|
+
type: Number,
|
|
628
|
+
attribute: "trail-opacity"
|
|
629
|
+
})], j.prototype, "trailOpacity", void 0);
|
|
630
|
+
// src/utils/number.ts
|
|
631
|
+
function M(e, t) {
|
|
632
|
+
return Math.random() * (t - e) + e;
|
|
633
|
+
}
|
|
634
|
+
function Ve(e, t) {
|
|
635
|
+
return e = Math.ceil(e), t = Math.floor(t), Math.floor(Math.random() * (t - e + 1) + e);
|
|
636
|
+
}
|
|
637
|
+
// src/utils/color.ts
|
|
638
|
+
function He(e = [0, 360], t = [0, 100], n = [40, 60]) {
|
|
639
|
+
return `hsl(${Ve(e[0], e[1])}, ${Ve(t[0], t[1])}%, ${Ve(n[0], n[1])}%)`;
|
|
640
|
+
}
|
|
641
|
+
function Ue(e, t, n, r) {
|
|
642
|
+
return `hsla(${e}, ${t}%, ${n}%, ${r})`;
|
|
643
|
+
}
|
|
644
|
+
// src/components/ambientRibbon.ts
|
|
645
|
+
var We = class {
|
|
646
|
+
constructor(e, t) {
|
|
647
|
+
this.angle = e, this.color = t;
|
|
648
|
+
}
|
|
649
|
+
}, Ge = class {
|
|
650
|
+
constructor(e, t) {
|
|
651
|
+
this.speed = [], this.lines = [], this.angle = [
|
|
652
|
+
M(0, Math.PI * 2),
|
|
653
|
+
M(0, Math.PI * 2),
|
|
654
|
+
M(0, Math.PI * 2),
|
|
655
|
+
M(0, Math.PI * 2)
|
|
656
|
+
];
|
|
657
|
+
let n = () => Math.random() > .5 ? 1 : -1;
|
|
658
|
+
this.speedSeeds = [
|
|
659
|
+
Math.random(),
|
|
660
|
+
Math.random(),
|
|
661
|
+
Math.random(),
|
|
662
|
+
Math.random()
|
|
663
|
+
], this.speedSigns = [
|
|
664
|
+
n(),
|
|
665
|
+
n(),
|
|
666
|
+
n(),
|
|
667
|
+
n()
|
|
668
|
+
], this.updateSpeeds(e, t);
|
|
669
|
+
}
|
|
670
|
+
updateSpeeds(e, t) {
|
|
671
|
+
this.speed = this.speedSeeds.map((n, r) => this.speedSigns[r] * (e + n * (t - e)));
|
|
672
|
+
}
|
|
673
|
+
update(e) {
|
|
674
|
+
this.angle[0] += this.speed[0], this.angle[1] += this.speed[1], this.angle[2] += this.speed[2], this.angle[3] += this.speed[3];
|
|
675
|
+
let t = [
|
|
676
|
+
Math.sin(this.angle[0]),
|
|
677
|
+
Math.sin(this.angle[1]),
|
|
678
|
+
Math.sin(this.angle[2]),
|
|
679
|
+
Math.sin(this.angle[3])
|
|
680
|
+
];
|
|
681
|
+
this.lines.push(new We(t, "")), this.lines.length > e && this.lines.shift();
|
|
682
|
+
}
|
|
683
|
+
}, N = class extends j {
|
|
684
|
+
constructor(...e) {
|
|
685
|
+
super(...e), this.ribbonCount = 5, this.ribbonWidth = 100, this.ribbonRotation = 45, this.ribbonHueStart = 11, this.ribbonHueEnd = 14, this.ribbonSaturationStart = 100, this.ribbonSaturationEnd = 100, this.ribbonLightnessStart = 50, this.ribbonLightnessEnd = 50, this.ribbonAmplitude = .5, this.ribbonSpeedMin = .004, this.ribbonSpeedMax = .008, this.ribbonLineWidth = 2, this.ribbonLineOpacity = .2, this.ribbons = [], this.hue = 11, this.hueForward = !0;
|
|
686
|
+
}
|
|
687
|
+
initialize() {
|
|
688
|
+
this.hue = this.ribbonHueStart, this.ribbons = [];
|
|
689
|
+
for (let e = 0; e < this.ribbonCount; e++) this.ribbons.push(new Ge(this.ribbonSpeedMin, this.ribbonSpeedMax));
|
|
690
|
+
for (let e = 0; e < this.ribbonCount; e++) for (let t = 0; t < this.ribbonWidth; t++) this.updateColor(), this.ribbons[e].update(this.ribbonWidth);
|
|
691
|
+
}
|
|
692
|
+
updated(e) {
|
|
693
|
+
super.updated(e), (e.has("ribbonSpeedMin") || e.has("ribbonSpeedMax")) && this.ribbons.forEach((e) => e.updateSpeeds(this.ribbonSpeedMin, this.ribbonSpeedMax)), e.has("ribbonCount") && this.initialize(), e.has("ribbonWidth") && this.ribbons.forEach((e) => {
|
|
694
|
+
e.lines.length > this.ribbonWidth && (e.lines = e.lines.slice(-this.ribbonWidth));
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
updateColor() {
|
|
698
|
+
this.hue += this.hueForward ? .05 : -.05, this.hue > this.ribbonHueEnd && this.hueForward ? (this.hue = this.ribbonHueEnd, this.hueForward = !1) : this.hue < this.ribbonHueStart && !this.hueForward && (this.hue = this.ribbonHueStart, this.hueForward = !0);
|
|
699
|
+
}
|
|
700
|
+
loop() {
|
|
701
|
+
this.updateColor(), this.ctx.clearRect(0, 0, this.width, this.height), this.drawBackground(this.ctx);
|
|
702
|
+
let e = Math.sqrt(this.width ** 2 + this.height ** 2), t = this.width / 2, n = this.height / 2, r = e / 2, i = r / 3, a = this.ribbonRotation * Math.PI / 180;
|
|
703
|
+
this.ctx.lineWidth = this.ribbonLineWidth, this.ribbons.forEach((e) => {
|
|
704
|
+
e.update(this.ribbonWidth), e.lines.forEach((o, s) => {
|
|
705
|
+
let c = o.angle, l = t - r * Math.cos(c[0] * this.ribbonAmplitude + a), u = n - r * Math.sin(c[0] * this.ribbonAmplitude + a), d = t + r * Math.cos(c[3] * this.ribbonAmplitude + a), f = n + r * Math.sin(c[3] * this.ribbonAmplitude + a), p = t - i * Math.cos(c[1] * this.ribbonAmplitude * 2), m = n - i * Math.sin(c[1] * this.ribbonAmplitude * 2), h = t + i * Math.cos(c[2] * this.ribbonAmplitude * 2), g = n + i * Math.sin(c[2] * this.ribbonAmplitude * 2), _ = s / (e.lines.length - 1 || 1), ee = this.ribbonHueEnd + (this.ribbonHueStart - this.ribbonHueEnd) * _, v = this.ribbonSaturationEnd + (this.ribbonSaturationStart - this.ribbonSaturationEnd) * _, y = this.ribbonLightnessEnd + (this.ribbonLightnessStart - this.ribbonLightnessEnd) * _;
|
|
706
|
+
this.ctx.strokeStyle = Ue(ee, v, y, this.ribbonLineOpacity), this.ctx.beginPath(), this.ctx.moveTo(l, u), this.ctx.bezierCurveTo(p, m, h, g, d, f), this.ctx.stroke();
|
|
707
|
+
});
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
A([O({
|
|
712
|
+
type: Number,
|
|
713
|
+
attribute: "ribbon-count"
|
|
714
|
+
})], N.prototype, "ribbonCount", void 0), A([O({
|
|
715
|
+
type: Number,
|
|
716
|
+
attribute: "ribbon-width"
|
|
717
|
+
})], N.prototype, "ribbonWidth", void 0), A([O({
|
|
718
|
+
type: Number,
|
|
719
|
+
attribute: "ribbon-rotation"
|
|
720
|
+
})], N.prototype, "ribbonRotation", void 0), A([O({
|
|
721
|
+
type: Number,
|
|
722
|
+
attribute: "ribbon-hue-start"
|
|
723
|
+
})], N.prototype, "ribbonHueStart", void 0), A([O({
|
|
724
|
+
type: Number,
|
|
725
|
+
attribute: "ribbon-hue-end"
|
|
726
|
+
})], N.prototype, "ribbonHueEnd", void 0), A([O({
|
|
727
|
+
type: Number,
|
|
728
|
+
attribute: "ribbon-saturation-start"
|
|
729
|
+
})], N.prototype, "ribbonSaturationStart", void 0), A([O({
|
|
730
|
+
type: Number,
|
|
731
|
+
attribute: "ribbon-saturation-end"
|
|
732
|
+
})], N.prototype, "ribbonSaturationEnd", void 0), A([O({
|
|
733
|
+
type: Number,
|
|
734
|
+
attribute: "ribbon-lightness-start"
|
|
735
|
+
})], N.prototype, "ribbonLightnessStart", void 0), A([O({
|
|
736
|
+
type: Number,
|
|
737
|
+
attribute: "ribbon-lightness-end"
|
|
738
|
+
})], N.prototype, "ribbonLightnessEnd", void 0), A([O({
|
|
739
|
+
type: Number,
|
|
740
|
+
attribute: "ribbon-amplitude"
|
|
741
|
+
})], N.prototype, "ribbonAmplitude", void 0), A([O({
|
|
742
|
+
type: Number,
|
|
743
|
+
attribute: "ribbon-speed-min"
|
|
744
|
+
})], N.prototype, "ribbonSpeedMin", void 0), A([O({
|
|
745
|
+
type: Number,
|
|
746
|
+
attribute: "ribbon-speed-max"
|
|
747
|
+
})], N.prototype, "ribbonSpeedMax", void 0), A([O({
|
|
748
|
+
type: Number,
|
|
749
|
+
attribute: "ribbon-line-width"
|
|
750
|
+
})], N.prototype, "ribbonLineWidth", void 0), A([O({
|
|
751
|
+
type: Number,
|
|
752
|
+
attribute: "ribbon-line-opacity"
|
|
753
|
+
})], N.prototype, "ribbonLineOpacity", void 0), N = A([D("bb-ambient-ribbon")], N);
|
|
754
|
+
// src/components/concentricPulse.ts
|
|
755
|
+
var P = class extends j {
|
|
756
|
+
constructor(...e) {
|
|
757
|
+
super(...e), this.ringCount = 20, this.pulseSpeed = .5, this.ringColors = ["#78c8ff", "#0064ff"], this.ringAmplitude = 15, this.ringSpacing = 40;
|
|
758
|
+
}
|
|
759
|
+
firstUpdated() {
|
|
760
|
+
super.firstUpdated();
|
|
761
|
+
}
|
|
762
|
+
disconnectedCallback() {
|
|
763
|
+
super.disconnectedCallback();
|
|
764
|
+
}
|
|
765
|
+
parseRGB(e) {
|
|
766
|
+
let t = e.startsWith("#") ? e.slice(1) : e;
|
|
767
|
+
return t.includes(",") ? t.split(",").map((e) => parseInt(e.trim())) : [
|
|
768
|
+
parseInt(t.substring(0, 2), 16),
|
|
769
|
+
parseInt(t.substring(2, 4), 16),
|
|
770
|
+
parseInt(t.substring(4, 6), 16)
|
|
771
|
+
];
|
|
772
|
+
}
|
|
773
|
+
lerpColor(e, t, n) {
|
|
774
|
+
return `${Math.round(e[0] + (t[0] - e[0]) * n)}, ${Math.round(e[1] + (t[1] - e[1]) * n)}, ${Math.round(e[2] + (t[2] - e[2]) * n)}`;
|
|
775
|
+
}
|
|
776
|
+
loop() {
|
|
777
|
+
let e = performance.now();
|
|
778
|
+
this.ctx.globalAlpha = this.trailOpacity, this.drawBackground(this.ctx), this.ctx.globalAlpha = 1;
|
|
779
|
+
let t = e * .001, n = this.width / 2, r = this.height / 2;
|
|
780
|
+
for (let e = 0; e < this.ringCount; e++) {
|
|
781
|
+
let i = t * 2 * this.pulseSpeed, a = 50 + e * this.ringSpacing + Math.sin(i + e * .4) * this.ringAmplitude, o = .08 + e / this.ringCount * .15, s = (e / (this.ringCount - 1 || 1) + t * .2) % 1, c = this.ringColors.length, l = 1 / (c - 1 || 1), u = Math.min(Math.floor(s / l), c - 2), d = (s - u * l) / l, f = this.parseRGB(this.ringColors[u]), p = this.parseRGB(this.ringColors[u + 1] || this.ringColors[u]), m = this.lerpColor(f, p, d);
|
|
782
|
+
this.drawCircle(n, r, a, m, o, 1.2);
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
drawCircle(e, t, n, r, i, a = 1.5) {
|
|
786
|
+
n < 0 || (this.ctx.beginPath(), this.ctx.arc(e, t, n, 0, Math.PI * 2), this.ctx.strokeStyle = `rgba(${r}, ${i})`, this.ctx.lineWidth = a, this.ctx.stroke());
|
|
787
|
+
}
|
|
788
|
+
};
|
|
789
|
+
A([O({
|
|
790
|
+
type: Number,
|
|
791
|
+
attribute: "ring-count"
|
|
792
|
+
})], P.prototype, "ringCount", void 0), A([O({
|
|
793
|
+
type: Number,
|
|
794
|
+
attribute: "pulse-speed"
|
|
795
|
+
})], P.prototype, "pulseSpeed", void 0), A([O({
|
|
796
|
+
type: Array,
|
|
797
|
+
attribute: "ring-colors",
|
|
798
|
+
converter: k
|
|
799
|
+
})], P.prototype, "ringColors", void 0), A([O({
|
|
800
|
+
type: Number,
|
|
801
|
+
attribute: "ring-amplitude"
|
|
802
|
+
})], P.prototype, "ringAmplitude", void 0), A([O({
|
|
803
|
+
type: Number,
|
|
804
|
+
attribute: "ring-spacing"
|
|
805
|
+
})], P.prototype, "ringSpacing", void 0), P = A([D("bb-concentric-pulse")], P);
|
|
806
|
+
// src/Symbol.ts
|
|
807
|
+
var Ke = class {
|
|
808
|
+
constructor(e, t) {
|
|
809
|
+
this.x = e, this.y = t;
|
|
810
|
+
}
|
|
811
|
+
update(e, t, n, r, i, a = 30) {
|
|
812
|
+
let o = i / a;
|
|
813
|
+
this.y * n * o > e && Math.random() > t ? this.y = 0 : this.y += i * r;
|
|
814
|
+
}
|
|
815
|
+
draw(e, t, n, r, i, a = 30) {
|
|
816
|
+
let o = i / a;
|
|
817
|
+
e.fillStyle = n, e.fillText(t, this.x * r, this.y * r * o);
|
|
818
|
+
}
|
|
819
|
+
}, F = class extends j {
|
|
820
|
+
constructor() {
|
|
821
|
+
super(), this.speed = 10, this.characters = "ヲアウエオカキケコサシスセソタツテナニヌネハヒホマミムメモヤユラリワ", this.randomness = .975, this.fontSize = 24, this.fontColorHueStart = 60, this.fontColorHueEnd = 150, this.fontColorSaturationStart = 90, this.fontColorSaturationEnd = 100, this.fontColorLightnessStart = 50, this.fontColorLightnessEnd = 50, this.fontColors = [], this.columns = 0, this.symbols = [], this.fontColorHueEnd = this.fontColorHueStart + 90;
|
|
822
|
+
}
|
|
823
|
+
initialize() {
|
|
824
|
+
this.symbols = [], this.createSymbols(), this.drawBackground(this.ctx);
|
|
825
|
+
}
|
|
826
|
+
createSymbols() {
|
|
827
|
+
this.columns = Math.floor(this.width / this.fontSize);
|
|
828
|
+
for (let e = 0; e < this.columns; e++) this.symbols[e] = this.createSymbol(e);
|
|
829
|
+
}
|
|
830
|
+
updateSymbols() {
|
|
831
|
+
let e = Math.floor(this.width / this.fontSize);
|
|
832
|
+
for (let t = this.symbols.length; t < e; t++) this.symbols[t] = this.createSymbol(t);
|
|
833
|
+
this.symbols.length > e && (this.symbols.length = e);
|
|
834
|
+
}
|
|
835
|
+
loop(e) {
|
|
836
|
+
this.updateSymbols(), this.ctx.globalAlpha = this.trailOpacity, this.drawBackground(this.ctx), this.ctx.globalAlpha = 1, this.ctx.textAlign = "center", this.ctx.font = `${this.fontSize}px monospace`, this.symbols.forEach((t) => {
|
|
837
|
+
t.draw(this.ctx, this.characters.charAt(Math.floor(Math.random() * this.characters.length)), this.fontColors && this.fontColors.length > 0 ? this.fontColors[Math.floor(Math.random() * this.fontColors.length)] : He([this.fontColorHueStart, this.fontColorHueEnd], [this.fontColorSaturationStart, this.fontColorSaturationEnd], [this.fontColorLightnessStart, this.fontColorLightnessEnd]), this.fontSize, this.speed * 3), t.update(this.height, this.randomness, this.fontSize, e, this.speed * 3);
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
createSymbol(e) {
|
|
841
|
+
return new Ke(e, Ve(0, -this.height / this.fontSize));
|
|
842
|
+
}
|
|
843
|
+
};
|
|
844
|
+
A([O({
|
|
845
|
+
type: Number,
|
|
846
|
+
attribute: "speed"
|
|
847
|
+
})], F.prototype, "speed", void 0), A([O({
|
|
848
|
+
type: String,
|
|
849
|
+
attribute: "characters"
|
|
850
|
+
})], F.prototype, "characters", void 0), A([O({
|
|
851
|
+
type: Number,
|
|
852
|
+
attribute: "randomness"
|
|
853
|
+
})], F.prototype, "randomness", void 0), A([O({
|
|
854
|
+
type: Number,
|
|
855
|
+
attribute: "font-size"
|
|
856
|
+
})], F.prototype, "fontSize", void 0), A([O({
|
|
857
|
+
type: Number,
|
|
858
|
+
attribute: "font-color-hue-start"
|
|
859
|
+
})], F.prototype, "fontColorHueStart", void 0), A([O({
|
|
860
|
+
type: Number,
|
|
861
|
+
attribute: "font-color-hue-end"
|
|
862
|
+
})], F.prototype, "fontColorHueEnd", void 0), A([O({
|
|
863
|
+
type: Number,
|
|
864
|
+
attribute: "font-color-saturation-start"
|
|
865
|
+
})], F.prototype, "fontColorSaturationStart", void 0), A([O({
|
|
866
|
+
type: Number,
|
|
867
|
+
attribute: "font-color-saturation-end"
|
|
868
|
+
})], F.prototype, "fontColorSaturationEnd", void 0), A([O({
|
|
869
|
+
type: Number,
|
|
870
|
+
attribute: "font-color-lightness-start"
|
|
871
|
+
})], F.prototype, "fontColorLightnessStart", void 0), A([O({
|
|
872
|
+
type: Number,
|
|
873
|
+
attribute: "font-color-lightness-end"
|
|
874
|
+
})], F.prototype, "fontColorLightnessEnd", void 0), A([O({
|
|
875
|
+
type: Array,
|
|
876
|
+
attribute: "font-colors",
|
|
877
|
+
converter: k
|
|
878
|
+
})], F.prototype, "fontColors", void 0), F = A([D("bb-digital-rain")], F);
|
|
879
|
+
// node_modules/d3-dispatch/src/dispatch.js
|
|
880
|
+
var qe = { value: () => {} };
|
|
881
|
+
function Je() {
|
|
882
|
+
for (var e = 0, t = arguments.length, n = {}, r; e < t; ++e) {
|
|
883
|
+
if (!(r = arguments[e] + "") || r in n || /[\s.]/.test(r)) throw Error("illegal type: " + r);
|
|
884
|
+
n[r] = [];
|
|
885
|
+
}
|
|
886
|
+
return new Ye(n);
|
|
887
|
+
}
|
|
888
|
+
function Ye(e) {
|
|
889
|
+
this._ = e;
|
|
890
|
+
}
|
|
891
|
+
function Xe(e, t) {
|
|
892
|
+
return e.trim().split(/^|\s+/).map(function(e) {
|
|
893
|
+
var n = "", r = e.indexOf(".");
|
|
894
|
+
if (r >= 0 && (n = e.slice(r + 1), e = e.slice(0, r)), e && !t.hasOwnProperty(e)) throw Error("unknown type: " + e);
|
|
895
|
+
return {
|
|
896
|
+
type: e,
|
|
897
|
+
name: n
|
|
898
|
+
};
|
|
899
|
+
});
|
|
900
|
+
}
|
|
901
|
+
Ye.prototype = Je.prototype = {
|
|
902
|
+
constructor: Ye,
|
|
903
|
+
on: function(e, t) {
|
|
904
|
+
var n = this._, r = Xe(e + "", n), i, a = -1, o = r.length;
|
|
905
|
+
if (arguments.length < 2) {
|
|
906
|
+
for (; ++a < o;) if ((i = (e = r[a]).type) && (i = Ze(n[i], e.name))) return i;
|
|
907
|
+
} else {
|
|
908
|
+
if (t != null && typeof t != "function") throw Error("invalid callback: " + t);
|
|
909
|
+
for (; ++a < o;) if (i = (e = r[a]).type) n[i] = Qe(n[i], e.name, t);
|
|
910
|
+
else if (t == null) for (i in n) n[i] = Qe(n[i], e.name, null);
|
|
911
|
+
return this;
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
copy: function() {
|
|
915
|
+
var e = {}, t = this._;
|
|
916
|
+
for (var n in t) e[n] = t[n].slice();
|
|
917
|
+
return new Ye(e);
|
|
918
|
+
},
|
|
919
|
+
call: function(e, t) {
|
|
920
|
+
if ((i = arguments.length - 2) > 0) for (var n = Array(i), r = 0, i, a; r < i; ++r) n[r] = arguments[r + 2];
|
|
921
|
+
if (!this._.hasOwnProperty(e)) throw Error("unknown type: " + e);
|
|
922
|
+
for (a = this._[e], r = 0, i = a.length; r < i; ++r) a[r].value.apply(t, n);
|
|
923
|
+
},
|
|
924
|
+
apply: function(e, t, n) {
|
|
925
|
+
if (!this._.hasOwnProperty(e)) throw Error("unknown type: " + e);
|
|
926
|
+
for (var r = this._[e], i = 0, a = r.length; i < a; ++i) r[i].value.apply(t, n);
|
|
927
|
+
}
|
|
928
|
+
};
|
|
929
|
+
function Ze(e, t) {
|
|
930
|
+
for (var n = 0, r = e.length, i; n < r; ++n) if ((i = e[n]).name === t) return i.value;
|
|
931
|
+
}
|
|
932
|
+
function Qe(e, t, n) {
|
|
933
|
+
for (var r = 0, i = e.length; r < i; ++r) if (e[r].name === t) {
|
|
934
|
+
e[r] = qe, e = e.slice(0, r).concat(e.slice(r + 1));
|
|
935
|
+
break;
|
|
936
|
+
}
|
|
937
|
+
return n != null && e.push({
|
|
938
|
+
name: t,
|
|
939
|
+
value: n
|
|
940
|
+
}), e;
|
|
941
|
+
}
|
|
942
|
+
var $e = {
|
|
943
|
+
svg: "http://www.w3.org/2000/svg",
|
|
944
|
+
xhtml: "http://www.w3.org/1999/xhtml",
|
|
945
|
+
xlink: "http://www.w3.org/1999/xlink",
|
|
946
|
+
xml: "http://www.w3.org/XML/1998/namespace",
|
|
947
|
+
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
948
|
+
};
|
|
949
|
+
// node_modules/d3-selection/src/namespace.js
|
|
950
|
+
function et(e) {
|
|
951
|
+
var t = e += "", n = t.indexOf(":");
|
|
952
|
+
return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), $e.hasOwnProperty(t) ? {
|
|
953
|
+
space: $e[t],
|
|
954
|
+
local: e
|
|
955
|
+
} : e;
|
|
956
|
+
}
|
|
957
|
+
// node_modules/d3-selection/src/creator.js
|
|
958
|
+
function tt(e) {
|
|
959
|
+
return function() {
|
|
960
|
+
var t = this.ownerDocument, n = this.namespaceURI;
|
|
961
|
+
return n === "http://www.w3.org/1999/xhtml" && t.documentElement.namespaceURI === "http://www.w3.org/1999/xhtml" ? t.createElement(e) : t.createElementNS(n, e);
|
|
962
|
+
};
|
|
963
|
+
}
|
|
964
|
+
function nt(e) {
|
|
965
|
+
return function() {
|
|
966
|
+
return this.ownerDocument.createElementNS(e.space, e.local);
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
function rt(e) {
|
|
970
|
+
var t = et(e);
|
|
971
|
+
return (t.local ? nt : tt)(t);
|
|
972
|
+
}
|
|
973
|
+
// node_modules/d3-selection/src/selector.js
|
|
974
|
+
function it() {}
|
|
975
|
+
function at(e) {
|
|
976
|
+
return e == null ? it : function() {
|
|
977
|
+
return this.querySelector(e);
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
// node_modules/d3-selection/src/selection/select.js
|
|
981
|
+
function ot(e) {
|
|
982
|
+
typeof e != "function" && (e = at(e));
|
|
983
|
+
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = Array(o), c, l, u = 0; u < o; ++u) (c = a[u]) && (l = e.call(c, c.__data__, u, a)) && ("__data__" in c && (l.__data__ = c.__data__), s[u] = l);
|
|
984
|
+
return new L(r, this._parents);
|
|
985
|
+
}
|
|
986
|
+
// node_modules/d3-selection/src/array.js
|
|
987
|
+
function st(e) {
|
|
988
|
+
return e == null ? [] : Array.isArray(e) ? e : Array.from(e);
|
|
989
|
+
}
|
|
990
|
+
// node_modules/d3-selection/src/selectorAll.js
|
|
991
|
+
function ct() {
|
|
992
|
+
return [];
|
|
993
|
+
}
|
|
994
|
+
function lt(e) {
|
|
995
|
+
return e == null ? ct : function() {
|
|
996
|
+
return this.querySelectorAll(e);
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
// node_modules/d3-selection/src/selection/selectAll.js
|
|
1000
|
+
function ut(e) {
|
|
1001
|
+
return function() {
|
|
1002
|
+
return st(e.apply(this, arguments));
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
function dt(e) {
|
|
1006
|
+
e = typeof e == "function" ? ut(e) : lt(e);
|
|
1007
|
+
for (var t = this._groups, n = t.length, r = [], i = [], a = 0; a < n; ++a) for (var o = t[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && (r.push(e.call(c, c.__data__, l, o)), i.push(c));
|
|
1008
|
+
return new L(r, i);
|
|
1009
|
+
}
|
|
1010
|
+
// node_modules/d3-selection/src/matcher.js
|
|
1011
|
+
function ft(e) {
|
|
1012
|
+
return function() {
|
|
1013
|
+
return this.matches(e);
|
|
1014
|
+
};
|
|
1015
|
+
}
|
|
1016
|
+
function pt(e) {
|
|
1017
|
+
return function(t) {
|
|
1018
|
+
return t.matches(e);
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
// node_modules/d3-selection/src/selection/selectChild.js
|
|
1022
|
+
var mt = Array.prototype.find;
|
|
1023
|
+
function ht(e) {
|
|
1024
|
+
return function() {
|
|
1025
|
+
return mt.call(this.children, e);
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
function gt() {
|
|
1029
|
+
return this.firstElementChild;
|
|
1030
|
+
}
|
|
1031
|
+
function _t(e) {
|
|
1032
|
+
return this.select(e == null ? gt : ht(typeof e == "function" ? e : pt(e)));
|
|
1033
|
+
}
|
|
1034
|
+
// node_modules/d3-selection/src/selection/selectChildren.js
|
|
1035
|
+
var vt = Array.prototype.filter;
|
|
1036
|
+
function yt() {
|
|
1037
|
+
return Array.from(this.children);
|
|
1038
|
+
}
|
|
1039
|
+
function bt(e) {
|
|
1040
|
+
return function() {
|
|
1041
|
+
return vt.call(this.children, e);
|
|
1042
|
+
};
|
|
1043
|
+
}
|
|
1044
|
+
function xt(e) {
|
|
1045
|
+
return this.selectAll(e == null ? yt : bt(typeof e == "function" ? e : pt(e)));
|
|
1046
|
+
}
|
|
1047
|
+
// node_modules/d3-selection/src/selection/filter.js
|
|
1048
|
+
function St(e) {
|
|
1049
|
+
typeof e != "function" && (e = ft(e));
|
|
1050
|
+
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = [], c, l = 0; l < o; ++l) (c = a[l]) && e.call(c, c.__data__, l, a) && s.push(c);
|
|
1051
|
+
return new L(r, this._parents);
|
|
1052
|
+
}
|
|
1053
|
+
// node_modules/d3-selection/src/selection/sparse.js
|
|
1054
|
+
function Ct(e) {
|
|
1055
|
+
return Array(e.length);
|
|
1056
|
+
}
|
|
1057
|
+
// node_modules/d3-selection/src/selection/enter.js
|
|
1058
|
+
function wt() {
|
|
1059
|
+
return new L(this._enter || this._groups.map(Ct), this._parents);
|
|
1060
|
+
}
|
|
1061
|
+
function Tt(e, t) {
|
|
1062
|
+
this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;
|
|
1063
|
+
}
|
|
1064
|
+
Tt.prototype = {
|
|
1065
|
+
constructor: Tt,
|
|
1066
|
+
appendChild: function(e) {
|
|
1067
|
+
return this._parent.insertBefore(e, this._next);
|
|
1068
|
+
},
|
|
1069
|
+
insertBefore: function(e, t) {
|
|
1070
|
+
return this._parent.insertBefore(e, t);
|
|
1071
|
+
},
|
|
1072
|
+
querySelector: function(e) {
|
|
1073
|
+
return this._parent.querySelector(e);
|
|
1074
|
+
},
|
|
1075
|
+
querySelectorAll: function(e) {
|
|
1076
|
+
return this._parent.querySelectorAll(e);
|
|
1077
|
+
}
|
|
1078
|
+
};
|
|
1079
|
+
// node_modules/d3-selection/src/constant.js
|
|
1080
|
+
function Et(e) {
|
|
1081
|
+
return function() {
|
|
1082
|
+
return e;
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
// node_modules/d3-selection/src/selection/data.js
|
|
1086
|
+
function Dt(e, t, n, r, i, a) {
|
|
1087
|
+
for (var o = 0, s, c = t.length, l = a.length; o < l; ++o) (s = t[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new Tt(e, a[o]);
|
|
1088
|
+
for (; o < c; ++o) (s = t[o]) && (i[o] = s);
|
|
1089
|
+
}
|
|
1090
|
+
function Ot(e, t, n, r, i, a, o) {
|
|
1091
|
+
var s, c, l = /* @__PURE__ */ new Map(), u = t.length, d = a.length, f = Array(u), p;
|
|
1092
|
+
for (s = 0; s < u; ++s) (c = t[s]) && (f[s] = p = o.call(c, c.__data__, s, t) + "", l.has(p) ? i[s] = c : l.set(p, c));
|
|
1093
|
+
for (s = 0; s < d; ++s) p = o.call(e, a[s], s, a) + "", (c = l.get(p)) ? (r[s] = c, c.__data__ = a[s], l.delete(p)) : n[s] = new Tt(e, a[s]);
|
|
1094
|
+
for (s = 0; s < u; ++s) (c = t[s]) && l.get(f[s]) === c && (i[s] = c);
|
|
1095
|
+
}
|
|
1096
|
+
function kt(e) {
|
|
1097
|
+
return e.__data__;
|
|
1098
|
+
}
|
|
1099
|
+
function At(e, t) {
|
|
1100
|
+
if (!arguments.length) return Array.from(this, kt);
|
|
1101
|
+
var n = t ? Ot : Dt, r = this._parents, i = this._groups;
|
|
1102
|
+
typeof e != "function" && (e = Et(e));
|
|
1103
|
+
for (var a = i.length, o = Array(a), s = Array(a), c = Array(a), l = 0; l < a; ++l) {
|
|
1104
|
+
var u = r[l], d = i[l], f = d.length, p = jt(e.call(u, u && u.__data__, l, r)), m = p.length, h = s[l] = Array(m), g = o[l] = Array(m);
|
|
1105
|
+
n(u, d, h, g, c[l] = Array(f), p, t);
|
|
1106
|
+
for (var _ = 0, ee = 0, v, y; _ < m; ++_) if (v = h[_]) {
|
|
1107
|
+
for (_ >= ee && (ee = _ + 1); !(y = g[ee]) && ++ee < m;);
|
|
1108
|
+
v._next = y || null;
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
return o = new L(o, r), o._enter = s, o._exit = c, o;
|
|
1112
|
+
}
|
|
1113
|
+
function jt(e) {
|
|
1114
|
+
return typeof e == "object" && "length" in e ? e : Array.from(e);
|
|
1115
|
+
}
|
|
1116
|
+
// node_modules/d3-selection/src/selection/exit.js
|
|
1117
|
+
function Mt() {
|
|
1118
|
+
return new L(this._exit || this._groups.map(Ct), this._parents);
|
|
1119
|
+
}
|
|
1120
|
+
// node_modules/d3-selection/src/selection/join.js
|
|
1121
|
+
function Nt(e, t, n) {
|
|
1122
|
+
var r = this.enter(), i = this, a = this.exit();
|
|
1123
|
+
return typeof e == "function" ? (r = e(r), r &&= r.selection()) : r = r.append(e + ""), t != null && (i = t(i), i &&= i.selection()), n == null ? a.remove() : n(a), r && i ? r.merge(i).order() : i;
|
|
1124
|
+
}
|
|
1125
|
+
// node_modules/d3-selection/src/selection/merge.js
|
|
1126
|
+
function Pt(e) {
|
|
1127
|
+
for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, i = n.length, a = r.length, o = Math.min(i, a), s = Array(i), c = 0; c < o; ++c) for (var l = n[c], u = r[c], d = l.length, f = s[c] = Array(d), p, m = 0; m < d; ++m) (p = l[m] || u[m]) && (f[m] = p);
|
|
1128
|
+
for (; c < i; ++c) s[c] = n[c];
|
|
1129
|
+
return new L(s, this._parents);
|
|
1130
|
+
}
|
|
1131
|
+
// node_modules/d3-selection/src/selection/order.js
|
|
1132
|
+
function Ft() {
|
|
1133
|
+
for (var e = this._groups, t = -1, n = e.length; ++t < n;) for (var r = e[t], i = r.length - 1, a = r[i], o; --i >= 0;) (o = r[i]) && (a && o.compareDocumentPosition(a) ^ 4 && a.parentNode.insertBefore(o, a), a = o);
|
|
1134
|
+
return this;
|
|
1135
|
+
}
|
|
1136
|
+
// node_modules/d3-selection/src/selection/sort.js
|
|
1137
|
+
function It(e) {
|
|
1138
|
+
e ||= Lt;
|
|
1139
|
+
function t(t, n) {
|
|
1140
|
+
return t && n ? e(t.__data__, n.__data__) : !t - !n;
|
|
1141
|
+
}
|
|
1142
|
+
for (var n = this._groups, r = n.length, i = Array(r), a = 0; a < r; ++a) {
|
|
1143
|
+
for (var o = n[a], s = o.length, c = i[a] = Array(s), l, u = 0; u < s; ++u) (l = o[u]) && (c[u] = l);
|
|
1144
|
+
c.sort(t);
|
|
1145
|
+
}
|
|
1146
|
+
return new L(i, this._parents).order();
|
|
1147
|
+
}
|
|
1148
|
+
function Lt(e, t) {
|
|
1149
|
+
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
|
|
1150
|
+
}
|
|
1151
|
+
// node_modules/d3-selection/src/selection/call.js
|
|
1152
|
+
function Rt() {
|
|
1153
|
+
var e = arguments[0];
|
|
1154
|
+
return arguments[0] = this, e.apply(null, arguments), this;
|
|
1155
|
+
}
|
|
1156
|
+
// node_modules/d3-selection/src/selection/nodes.js
|
|
1157
|
+
function zt() {
|
|
1158
|
+
return Array.from(this);
|
|
1159
|
+
}
|
|
1160
|
+
// node_modules/d3-selection/src/selection/node.js
|
|
1161
|
+
function Bt() {
|
|
1162
|
+
for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, a = r.length; i < a; ++i) {
|
|
1163
|
+
var o = r[i];
|
|
1164
|
+
if (o) return o;
|
|
1165
|
+
}
|
|
1166
|
+
return null;
|
|
1167
|
+
}
|
|
1168
|
+
// node_modules/d3-selection/src/selection/size.js
|
|
1169
|
+
function Vt() {
|
|
1170
|
+
let e = 0;
|
|
1171
|
+
for (let t of this) ++e;
|
|
1172
|
+
return e;
|
|
1173
|
+
}
|
|
1174
|
+
// node_modules/d3-selection/src/selection/empty.js
|
|
1175
|
+
function Ht() {
|
|
1176
|
+
return !this.node();
|
|
1177
|
+
}
|
|
1178
|
+
// node_modules/d3-selection/src/selection/each.js
|
|
1179
|
+
function Ut(e) {
|
|
1180
|
+
for (var t = this._groups, n = 0, r = t.length; n < r; ++n) for (var i = t[n], a = 0, o = i.length, s; a < o; ++a) (s = i[a]) && e.call(s, s.__data__, a, i);
|
|
1181
|
+
return this;
|
|
1182
|
+
}
|
|
1183
|
+
// node_modules/d3-selection/src/selection/attr.js
|
|
1184
|
+
function Wt(e) {
|
|
1185
|
+
return function() {
|
|
1186
|
+
this.removeAttribute(e);
|
|
1187
|
+
};
|
|
1188
|
+
}
|
|
1189
|
+
function Gt(e) {
|
|
1190
|
+
return function() {
|
|
1191
|
+
this.removeAttributeNS(e.space, e.local);
|
|
1192
|
+
};
|
|
1193
|
+
}
|
|
1194
|
+
function Kt(e, t) {
|
|
1195
|
+
return function() {
|
|
1196
|
+
this.setAttribute(e, t);
|
|
1197
|
+
};
|
|
1198
|
+
}
|
|
1199
|
+
function qt(e, t) {
|
|
1200
|
+
return function() {
|
|
1201
|
+
this.setAttributeNS(e.space, e.local, t);
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
function Jt(e, t) {
|
|
1205
|
+
return function() {
|
|
1206
|
+
var n = t.apply(this, arguments);
|
|
1207
|
+
n == null ? this.removeAttribute(e) : this.setAttribute(e, n);
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1210
|
+
function Yt(e, t) {
|
|
1211
|
+
return function() {
|
|
1212
|
+
var n = t.apply(this, arguments);
|
|
1213
|
+
n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1216
|
+
function Xt(e, t) {
|
|
1217
|
+
var n = et(e);
|
|
1218
|
+
if (arguments.length < 2) {
|
|
1219
|
+
var r = this.node();
|
|
1220
|
+
return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
|
|
1221
|
+
}
|
|
1222
|
+
return this.each((t == null ? n.local ? Gt : Wt : typeof t == "function" ? n.local ? Yt : Jt : n.local ? qt : Kt)(n, t));
|
|
1223
|
+
}
|
|
1224
|
+
// node_modules/d3-selection/src/window.js
|
|
1225
|
+
function Zt(e) {
|
|
1226
|
+
return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;
|
|
1227
|
+
}
|
|
1228
|
+
// node_modules/d3-selection/src/selection/style.js
|
|
1229
|
+
function Qt(e) {
|
|
1230
|
+
return function() {
|
|
1231
|
+
this.style.removeProperty(e);
|
|
1232
|
+
};
|
|
1233
|
+
}
|
|
1234
|
+
function $t(e, t, n) {
|
|
1235
|
+
return function() {
|
|
1236
|
+
this.style.setProperty(e, t, n);
|
|
1237
|
+
};
|
|
1238
|
+
}
|
|
1239
|
+
function en(e, t, n) {
|
|
1240
|
+
return function() {
|
|
1241
|
+
var r = t.apply(this, arguments);
|
|
1242
|
+
r == null ? this.style.removeProperty(e) : this.style.setProperty(e, r, n);
|
|
1243
|
+
};
|
|
1244
|
+
}
|
|
1245
|
+
function tn(e, t, n) {
|
|
1246
|
+
return arguments.length > 1 ? this.each((t == null ? Qt : typeof t == "function" ? en : $t)(e, t, n ?? "")) : I(this.node(), e);
|
|
1247
|
+
}
|
|
1248
|
+
function I(e, t) {
|
|
1249
|
+
return e.style.getPropertyValue(t) || Zt(e).getComputedStyle(e, null).getPropertyValue(t);
|
|
1250
|
+
}
|
|
1251
|
+
// node_modules/d3-selection/src/selection/property.js
|
|
1252
|
+
function nn(e) {
|
|
1253
|
+
return function() {
|
|
1254
|
+
delete this[e];
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
function rn(e, t) {
|
|
1258
|
+
return function() {
|
|
1259
|
+
this[e] = t;
|
|
1260
|
+
};
|
|
1261
|
+
}
|
|
1262
|
+
function an(e, t) {
|
|
1263
|
+
return function() {
|
|
1264
|
+
var n = t.apply(this, arguments);
|
|
1265
|
+
n == null ? delete this[e] : this[e] = n;
|
|
1266
|
+
};
|
|
1267
|
+
}
|
|
1268
|
+
function on(e, t) {
|
|
1269
|
+
return arguments.length > 1 ? this.each((t == null ? nn : typeof t == "function" ? an : rn)(e, t)) : this.node()[e];
|
|
1270
|
+
}
|
|
1271
|
+
// node_modules/d3-selection/src/selection/classed.js
|
|
1272
|
+
function sn(e) {
|
|
1273
|
+
return e.trim().split(/^|\s+/);
|
|
1274
|
+
}
|
|
1275
|
+
function cn(e) {
|
|
1276
|
+
return e.classList || new ln(e);
|
|
1277
|
+
}
|
|
1278
|
+
function ln(e) {
|
|
1279
|
+
this._node = e, this._names = sn(e.getAttribute("class") || "");
|
|
1280
|
+
}
|
|
1281
|
+
ln.prototype = {
|
|
1282
|
+
add: function(e) {
|
|
1283
|
+
this._names.indexOf(e) < 0 && (this._names.push(e), this._node.setAttribute("class", this._names.join(" ")));
|
|
1284
|
+
},
|
|
1285
|
+
remove: function(e) {
|
|
1286
|
+
var t = this._names.indexOf(e);
|
|
1287
|
+
t >= 0 && (this._names.splice(t, 1), this._node.setAttribute("class", this._names.join(" ")));
|
|
1288
|
+
},
|
|
1289
|
+
contains: function(e) {
|
|
1290
|
+
return this._names.indexOf(e) >= 0;
|
|
1291
|
+
}
|
|
1292
|
+
};
|
|
1293
|
+
function un(e, t) {
|
|
1294
|
+
for (var n = cn(e), r = -1, i = t.length; ++r < i;) n.add(t[r]);
|
|
1295
|
+
}
|
|
1296
|
+
function dn(e, t) {
|
|
1297
|
+
for (var n = cn(e), r = -1, i = t.length; ++r < i;) n.remove(t[r]);
|
|
1298
|
+
}
|
|
1299
|
+
function fn(e) {
|
|
1300
|
+
return function() {
|
|
1301
|
+
un(this, e);
|
|
1302
|
+
};
|
|
1303
|
+
}
|
|
1304
|
+
function pn(e) {
|
|
1305
|
+
return function() {
|
|
1306
|
+
dn(this, e);
|
|
1307
|
+
};
|
|
1308
|
+
}
|
|
1309
|
+
function mn(e, t) {
|
|
1310
|
+
return function() {
|
|
1311
|
+
(t.apply(this, arguments) ? un : dn)(this, e);
|
|
1312
|
+
};
|
|
1313
|
+
}
|
|
1314
|
+
function hn(e, t) {
|
|
1315
|
+
var n = sn(e + "");
|
|
1316
|
+
if (arguments.length < 2) {
|
|
1317
|
+
for (var r = cn(this.node()), i = -1, a = n.length; ++i < a;) if (!r.contains(n[i])) return !1;
|
|
1318
|
+
return !0;
|
|
1319
|
+
}
|
|
1320
|
+
return this.each((typeof t == "function" ? mn : t ? fn : pn)(n, t));
|
|
1321
|
+
}
|
|
1322
|
+
// node_modules/d3-selection/src/selection/text.js
|
|
1323
|
+
function gn() {
|
|
1324
|
+
this.textContent = "";
|
|
1325
|
+
}
|
|
1326
|
+
function _n(e) {
|
|
1327
|
+
return function() {
|
|
1328
|
+
this.textContent = e;
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
function vn(e) {
|
|
1332
|
+
return function() {
|
|
1333
|
+
var t = e.apply(this, arguments);
|
|
1334
|
+
this.textContent = t ?? "";
|
|
1335
|
+
};
|
|
1336
|
+
}
|
|
1337
|
+
function yn(e) {
|
|
1338
|
+
return arguments.length ? this.each(e == null ? gn : (typeof e == "function" ? vn : _n)(e)) : this.node().textContent;
|
|
1339
|
+
}
|
|
1340
|
+
// node_modules/d3-selection/src/selection/html.js
|
|
1341
|
+
function bn() {
|
|
1342
|
+
this.innerHTML = "";
|
|
1343
|
+
}
|
|
1344
|
+
function xn(e) {
|
|
1345
|
+
return function() {
|
|
1346
|
+
this.innerHTML = e;
|
|
1347
|
+
};
|
|
1348
|
+
}
|
|
1349
|
+
function Sn(e) {
|
|
1350
|
+
return function() {
|
|
1351
|
+
var t = e.apply(this, arguments);
|
|
1352
|
+
this.innerHTML = t ?? "";
|
|
1353
|
+
};
|
|
1354
|
+
}
|
|
1355
|
+
function Cn(e) {
|
|
1356
|
+
return arguments.length ? this.each(e == null ? bn : (typeof e == "function" ? Sn : xn)(e)) : this.node().innerHTML;
|
|
1357
|
+
}
|
|
1358
|
+
// node_modules/d3-selection/src/selection/raise.js
|
|
1359
|
+
function wn() {
|
|
1360
|
+
this.nextSibling && this.parentNode.appendChild(this);
|
|
1361
|
+
}
|
|
1362
|
+
function Tn() {
|
|
1363
|
+
return this.each(wn);
|
|
1364
|
+
}
|
|
1365
|
+
// node_modules/d3-selection/src/selection/lower.js
|
|
1366
|
+
function En() {
|
|
1367
|
+
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
1368
|
+
}
|
|
1369
|
+
function Dn() {
|
|
1370
|
+
return this.each(En);
|
|
1371
|
+
}
|
|
1372
|
+
// node_modules/d3-selection/src/selection/append.js
|
|
1373
|
+
function On(e) {
|
|
1374
|
+
var t = typeof e == "function" ? e : rt(e);
|
|
1375
|
+
return this.select(function() {
|
|
1376
|
+
return this.appendChild(t.apply(this, arguments));
|
|
1377
|
+
});
|
|
1378
|
+
}
|
|
1379
|
+
// node_modules/d3-selection/src/selection/insert.js
|
|
1380
|
+
function kn() {
|
|
1381
|
+
return null;
|
|
1382
|
+
}
|
|
1383
|
+
function An(e, t) {
|
|
1384
|
+
var n = typeof e == "function" ? e : rt(e), r = t == null ? kn : typeof t == "function" ? t : at(t);
|
|
1385
|
+
return this.select(function() {
|
|
1386
|
+
return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
// node_modules/d3-selection/src/selection/remove.js
|
|
1390
|
+
function jn() {
|
|
1391
|
+
var e = this.parentNode;
|
|
1392
|
+
e && e.removeChild(this);
|
|
1393
|
+
}
|
|
1394
|
+
function Mn() {
|
|
1395
|
+
return this.each(jn);
|
|
1396
|
+
}
|
|
1397
|
+
// node_modules/d3-selection/src/selection/clone.js
|
|
1398
|
+
function Nn() {
|
|
1399
|
+
var e = this.cloneNode(!1), t = this.parentNode;
|
|
1400
|
+
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
1401
|
+
}
|
|
1402
|
+
function Pn() {
|
|
1403
|
+
var e = this.cloneNode(!0), t = this.parentNode;
|
|
1404
|
+
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
1405
|
+
}
|
|
1406
|
+
function Fn(e) {
|
|
1407
|
+
return this.select(e ? Pn : Nn);
|
|
1408
|
+
}
|
|
1409
|
+
// node_modules/d3-selection/src/selection/datum.js
|
|
1410
|
+
function In(e) {
|
|
1411
|
+
return arguments.length ? this.property("__data__", e) : this.node().__data__;
|
|
1412
|
+
}
|
|
1413
|
+
// node_modules/d3-selection/src/selection/on.js
|
|
1414
|
+
function Ln(e) {
|
|
1415
|
+
return function(t) {
|
|
1416
|
+
e.call(this, t, this.__data__);
|
|
1417
|
+
};
|
|
1418
|
+
}
|
|
1419
|
+
function Rn(e) {
|
|
1420
|
+
return e.trim().split(/^|\s+/).map(function(e) {
|
|
1421
|
+
var t = "", n = e.indexOf(".");
|
|
1422
|
+
return n >= 0 && (t = e.slice(n + 1), e = e.slice(0, n)), {
|
|
1423
|
+
type: e,
|
|
1424
|
+
name: t
|
|
1425
|
+
};
|
|
1426
|
+
});
|
|
1427
|
+
}
|
|
1428
|
+
function zn(e) {
|
|
1429
|
+
return function() {
|
|
1430
|
+
var t = this.__on;
|
|
1431
|
+
if (t) {
|
|
1432
|
+
for (var n = 0, r = -1, i = t.length, a; n < i; ++n) a = t[n], (!e.type || a.type === e.type) && a.name === e.name ? this.removeEventListener(a.type, a.listener, a.options) : t[++r] = a;
|
|
1433
|
+
++r ? t.length = r : delete this.__on;
|
|
1434
|
+
}
|
|
1435
|
+
};
|
|
1436
|
+
}
|
|
1437
|
+
function Bn(e, t, n) {
|
|
1438
|
+
return function() {
|
|
1439
|
+
var r = this.__on, i, a = Ln(t);
|
|
1440
|
+
if (r) {
|
|
1441
|
+
for (var o = 0, s = r.length; o < s; ++o) if ((i = r[o]).type === e.type && i.name === e.name) {
|
|
1442
|
+
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = a, i.options = n), i.value = t;
|
|
1443
|
+
return;
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
this.addEventListener(e.type, a, n), i = {
|
|
1447
|
+
type: e.type,
|
|
1448
|
+
name: e.name,
|
|
1449
|
+
value: t,
|
|
1450
|
+
listener: a,
|
|
1451
|
+
options: n
|
|
1452
|
+
}, r ? r.push(i) : this.__on = [i];
|
|
1453
|
+
};
|
|
1454
|
+
}
|
|
1455
|
+
function Vn(e, t, n) {
|
|
1456
|
+
var r = Rn(e + ""), i, a = r.length, o;
|
|
1457
|
+
if (arguments.length < 2) {
|
|
1458
|
+
var s = this.node().__on;
|
|
1459
|
+
if (s) {
|
|
1460
|
+
for (var c = 0, l = s.length, u; c < l; ++c) for (i = 0, u = s[c]; i < a; ++i) if ((o = r[i]).type === u.type && o.name === u.name) return u.value;
|
|
1461
|
+
}
|
|
1462
|
+
} else {
|
|
1463
|
+
for (s = t ? Bn : zn, i = 0; i < a; ++i) this.each(s(r[i], t, n));
|
|
1464
|
+
return this;
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
// node_modules/d3-selection/src/selection/dispatch.js
|
|
1468
|
+
function Hn(e, t, n) {
|
|
1469
|
+
var r = Zt(e), i = r.CustomEvent;
|
|
1470
|
+
typeof i == "function" ? i = new i(t, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);
|
|
1471
|
+
}
|
|
1472
|
+
function Un(e, t) {
|
|
1473
|
+
return function() {
|
|
1474
|
+
return Hn(this, e, t);
|
|
1475
|
+
};
|
|
1476
|
+
}
|
|
1477
|
+
function Wn(e, t) {
|
|
1478
|
+
return function() {
|
|
1479
|
+
return Hn(this, e, t.apply(this, arguments));
|
|
1480
|
+
};
|
|
1481
|
+
}
|
|
1482
|
+
function Gn(e, t) {
|
|
1483
|
+
return this.each((typeof t == "function" ? Wn : Un)(e, t));
|
|
1484
|
+
}
|
|
1485
|
+
// node_modules/d3-selection/src/selection/iterator.js
|
|
1486
|
+
function* Kn() {
|
|
1487
|
+
for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, a = r.length, o; i < a; ++i) (o = r[i]) && (yield o);
|
|
1488
|
+
}
|
|
1489
|
+
// node_modules/d3-selection/src/selection/index.js
|
|
1490
|
+
var qn = [null];
|
|
1491
|
+
function L(e, t) {
|
|
1492
|
+
this._groups = e, this._parents = t;
|
|
1493
|
+
}
|
|
1494
|
+
function Jn() {
|
|
1495
|
+
return new L([[document.documentElement]], qn);
|
|
1496
|
+
}
|
|
1497
|
+
function Yn() {
|
|
1498
|
+
return this;
|
|
1499
|
+
}
|
|
1500
|
+
L.prototype = Jn.prototype = {
|
|
1501
|
+
constructor: L,
|
|
1502
|
+
select: ot,
|
|
1503
|
+
selectAll: dt,
|
|
1504
|
+
selectChild: _t,
|
|
1505
|
+
selectChildren: xt,
|
|
1506
|
+
filter: St,
|
|
1507
|
+
data: At,
|
|
1508
|
+
enter: wt,
|
|
1509
|
+
exit: Mt,
|
|
1510
|
+
join: Nt,
|
|
1511
|
+
merge: Pt,
|
|
1512
|
+
selection: Yn,
|
|
1513
|
+
order: Ft,
|
|
1514
|
+
sort: It,
|
|
1515
|
+
call: Rt,
|
|
1516
|
+
nodes: zt,
|
|
1517
|
+
node: Bt,
|
|
1518
|
+
size: Vt,
|
|
1519
|
+
empty: Ht,
|
|
1520
|
+
each: Ut,
|
|
1521
|
+
attr: Xt,
|
|
1522
|
+
style: tn,
|
|
1523
|
+
property: on,
|
|
1524
|
+
classed: hn,
|
|
1525
|
+
text: yn,
|
|
1526
|
+
html: Cn,
|
|
1527
|
+
raise: Tn,
|
|
1528
|
+
lower: Dn,
|
|
1529
|
+
append: On,
|
|
1530
|
+
insert: An,
|
|
1531
|
+
remove: Mn,
|
|
1532
|
+
clone: Fn,
|
|
1533
|
+
datum: In,
|
|
1534
|
+
on: Vn,
|
|
1535
|
+
dispatch: Gn,
|
|
1536
|
+
[Symbol.iterator]: Kn
|
|
1537
|
+
};
|
|
1538
|
+
// node_modules/d3-color/src/define.js
|
|
1539
|
+
function Xn(e, t, n) {
|
|
1540
|
+
e.prototype = t.prototype = n, n.constructor = e;
|
|
1541
|
+
}
|
|
1542
|
+
function Zn(e, t) {
|
|
1543
|
+
var n = Object.create(e.prototype);
|
|
1544
|
+
for (var r in t) n[r] = t[r];
|
|
1545
|
+
return n;
|
|
1546
|
+
}
|
|
1547
|
+
// node_modules/d3-color/src/color.js
|
|
1548
|
+
function Qn() {}
|
|
1549
|
+
var $n = .7, er = 1 / $n, R = "\\s*([+-]?\\d+)\\s*", tr = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", z = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", nr = /^#([0-9a-f]{3,8})$/, rr = RegExp(`^rgb\\(${R},${R},${R}\\)$`), ir = RegExp(`^rgb\\(${z},${z},${z}\\)$`), ar = RegExp(`^rgba\\(${R},${R},${R},${tr}\\)$`), or = RegExp(`^rgba\\(${z},${z},${z},${tr}\\)$`), sr = RegExp(`^hsl\\(${tr},${z},${z}\\)$`), cr = RegExp(`^hsla\\(${tr},${z},${z},${tr}\\)$`), lr = {
|
|
1550
|
+
aliceblue: 15792383,
|
|
1551
|
+
antiquewhite: 16444375,
|
|
1552
|
+
aqua: 65535,
|
|
1553
|
+
aquamarine: 8388564,
|
|
1554
|
+
azure: 15794175,
|
|
1555
|
+
beige: 16119260,
|
|
1556
|
+
bisque: 16770244,
|
|
1557
|
+
black: 0,
|
|
1558
|
+
blanchedalmond: 16772045,
|
|
1559
|
+
blue: 255,
|
|
1560
|
+
blueviolet: 9055202,
|
|
1561
|
+
brown: 10824234,
|
|
1562
|
+
burlywood: 14596231,
|
|
1563
|
+
cadetblue: 6266528,
|
|
1564
|
+
chartreuse: 8388352,
|
|
1565
|
+
chocolate: 13789470,
|
|
1566
|
+
coral: 16744272,
|
|
1567
|
+
cornflowerblue: 6591981,
|
|
1568
|
+
cornsilk: 16775388,
|
|
1569
|
+
crimson: 14423100,
|
|
1570
|
+
cyan: 65535,
|
|
1571
|
+
darkblue: 139,
|
|
1572
|
+
darkcyan: 35723,
|
|
1573
|
+
darkgoldenrod: 12092939,
|
|
1574
|
+
darkgray: 11119017,
|
|
1575
|
+
darkgreen: 25600,
|
|
1576
|
+
darkgrey: 11119017,
|
|
1577
|
+
darkkhaki: 12433259,
|
|
1578
|
+
darkmagenta: 9109643,
|
|
1579
|
+
darkolivegreen: 5597999,
|
|
1580
|
+
darkorange: 16747520,
|
|
1581
|
+
darkorchid: 10040012,
|
|
1582
|
+
darkred: 9109504,
|
|
1583
|
+
darksalmon: 15308410,
|
|
1584
|
+
darkseagreen: 9419919,
|
|
1585
|
+
darkslateblue: 4734347,
|
|
1586
|
+
darkslategray: 3100495,
|
|
1587
|
+
darkslategrey: 3100495,
|
|
1588
|
+
darkturquoise: 52945,
|
|
1589
|
+
darkviolet: 9699539,
|
|
1590
|
+
deeppink: 16716947,
|
|
1591
|
+
deepskyblue: 49151,
|
|
1592
|
+
dimgray: 6908265,
|
|
1593
|
+
dimgrey: 6908265,
|
|
1594
|
+
dodgerblue: 2003199,
|
|
1595
|
+
firebrick: 11674146,
|
|
1596
|
+
floralwhite: 16775920,
|
|
1597
|
+
forestgreen: 2263842,
|
|
1598
|
+
fuchsia: 16711935,
|
|
1599
|
+
gainsboro: 14474460,
|
|
1600
|
+
ghostwhite: 16316671,
|
|
1601
|
+
gold: 16766720,
|
|
1602
|
+
goldenrod: 14329120,
|
|
1603
|
+
gray: 8421504,
|
|
1604
|
+
green: 32768,
|
|
1605
|
+
greenyellow: 11403055,
|
|
1606
|
+
grey: 8421504,
|
|
1607
|
+
honeydew: 15794160,
|
|
1608
|
+
hotpink: 16738740,
|
|
1609
|
+
indianred: 13458524,
|
|
1610
|
+
indigo: 4915330,
|
|
1611
|
+
ivory: 16777200,
|
|
1612
|
+
khaki: 15787660,
|
|
1613
|
+
lavender: 15132410,
|
|
1614
|
+
lavenderblush: 16773365,
|
|
1615
|
+
lawngreen: 8190976,
|
|
1616
|
+
lemonchiffon: 16775885,
|
|
1617
|
+
lightblue: 11393254,
|
|
1618
|
+
lightcoral: 15761536,
|
|
1619
|
+
lightcyan: 14745599,
|
|
1620
|
+
lightgoldenrodyellow: 16448210,
|
|
1621
|
+
lightgray: 13882323,
|
|
1622
|
+
lightgreen: 9498256,
|
|
1623
|
+
lightgrey: 13882323,
|
|
1624
|
+
lightpink: 16758465,
|
|
1625
|
+
lightsalmon: 16752762,
|
|
1626
|
+
lightseagreen: 2142890,
|
|
1627
|
+
lightskyblue: 8900346,
|
|
1628
|
+
lightslategray: 7833753,
|
|
1629
|
+
lightslategrey: 7833753,
|
|
1630
|
+
lightsteelblue: 11584734,
|
|
1631
|
+
lightyellow: 16777184,
|
|
1632
|
+
lime: 65280,
|
|
1633
|
+
limegreen: 3329330,
|
|
1634
|
+
linen: 16445670,
|
|
1635
|
+
magenta: 16711935,
|
|
1636
|
+
maroon: 8388608,
|
|
1637
|
+
mediumaquamarine: 6737322,
|
|
1638
|
+
mediumblue: 205,
|
|
1639
|
+
mediumorchid: 12211667,
|
|
1640
|
+
mediumpurple: 9662683,
|
|
1641
|
+
mediumseagreen: 3978097,
|
|
1642
|
+
mediumslateblue: 8087790,
|
|
1643
|
+
mediumspringgreen: 64154,
|
|
1644
|
+
mediumturquoise: 4772300,
|
|
1645
|
+
mediumvioletred: 13047173,
|
|
1646
|
+
midnightblue: 1644912,
|
|
1647
|
+
mintcream: 16121850,
|
|
1648
|
+
mistyrose: 16770273,
|
|
1649
|
+
moccasin: 16770229,
|
|
1650
|
+
navajowhite: 16768685,
|
|
1651
|
+
navy: 128,
|
|
1652
|
+
oldlace: 16643558,
|
|
1653
|
+
olive: 8421376,
|
|
1654
|
+
olivedrab: 7048739,
|
|
1655
|
+
orange: 16753920,
|
|
1656
|
+
orangered: 16729344,
|
|
1657
|
+
orchid: 14315734,
|
|
1658
|
+
palegoldenrod: 15657130,
|
|
1659
|
+
palegreen: 10025880,
|
|
1660
|
+
paleturquoise: 11529966,
|
|
1661
|
+
palevioletred: 14381203,
|
|
1662
|
+
papayawhip: 16773077,
|
|
1663
|
+
peachpuff: 16767673,
|
|
1664
|
+
peru: 13468991,
|
|
1665
|
+
pink: 16761035,
|
|
1666
|
+
plum: 14524637,
|
|
1667
|
+
powderblue: 11591910,
|
|
1668
|
+
purple: 8388736,
|
|
1669
|
+
rebeccapurple: 6697881,
|
|
1670
|
+
red: 16711680,
|
|
1671
|
+
rosybrown: 12357519,
|
|
1672
|
+
royalblue: 4286945,
|
|
1673
|
+
saddlebrown: 9127187,
|
|
1674
|
+
salmon: 16416882,
|
|
1675
|
+
sandybrown: 16032864,
|
|
1676
|
+
seagreen: 3050327,
|
|
1677
|
+
seashell: 16774638,
|
|
1678
|
+
sienna: 10506797,
|
|
1679
|
+
silver: 12632256,
|
|
1680
|
+
skyblue: 8900331,
|
|
1681
|
+
slateblue: 6970061,
|
|
1682
|
+
slategray: 7372944,
|
|
1683
|
+
slategrey: 7372944,
|
|
1684
|
+
snow: 16775930,
|
|
1685
|
+
springgreen: 65407,
|
|
1686
|
+
steelblue: 4620980,
|
|
1687
|
+
tan: 13808780,
|
|
1688
|
+
teal: 32896,
|
|
1689
|
+
thistle: 14204888,
|
|
1690
|
+
tomato: 16737095,
|
|
1691
|
+
turquoise: 4251856,
|
|
1692
|
+
violet: 15631086,
|
|
1693
|
+
wheat: 16113331,
|
|
1694
|
+
white: 16777215,
|
|
1695
|
+
whitesmoke: 16119285,
|
|
1696
|
+
yellow: 16776960,
|
|
1697
|
+
yellowgreen: 10145074
|
|
1698
|
+
};
|
|
1699
|
+
Xn(Qn, mr, {
|
|
1700
|
+
copy(e) {
|
|
1701
|
+
return Object.assign(new this.constructor(), this, e);
|
|
1702
|
+
},
|
|
1703
|
+
displayable() {
|
|
1704
|
+
return this.rgb().displayable();
|
|
1705
|
+
},
|
|
1706
|
+
hex: ur,
|
|
1707
|
+
formatHex: ur,
|
|
1708
|
+
formatHex8: dr,
|
|
1709
|
+
formatHsl: fr,
|
|
1710
|
+
formatRgb: pr,
|
|
1711
|
+
toString: pr
|
|
1712
|
+
});
|
|
1713
|
+
function ur() {
|
|
1714
|
+
return this.rgb().formatHex();
|
|
1715
|
+
}
|
|
1716
|
+
function dr() {
|
|
1717
|
+
return this.rgb().formatHex8();
|
|
1718
|
+
}
|
|
1719
|
+
function fr() {
|
|
1720
|
+
return wr(this).formatHsl();
|
|
1721
|
+
}
|
|
1722
|
+
function pr() {
|
|
1723
|
+
return this.rgb().formatRgb();
|
|
1724
|
+
}
|
|
1725
|
+
function mr(e) {
|
|
1726
|
+
var t, n;
|
|
1727
|
+
return e = (e + "").trim().toLowerCase(), (t = nr.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? hr(t) : n === 3 ? new B(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? gr(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? gr(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = rr.exec(e)) ? new B(t[1], t[2], t[3], 1) : (t = ir.exec(e)) ? new B(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = ar.exec(e)) ? gr(t[1], t[2], t[3], t[4]) : (t = or.exec(e)) ? gr(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = sr.exec(e)) ? Cr(t[1], t[2] / 100, t[3] / 100, 1) : (t = cr.exec(e)) ? Cr(t[1], t[2] / 100, t[3] / 100, t[4]) : lr.hasOwnProperty(e) ? hr(lr[e]) : e === "transparent" ? new B(NaN, NaN, NaN, 0) : null;
|
|
1728
|
+
}
|
|
1729
|
+
function hr(e) {
|
|
1730
|
+
return new B(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
|
|
1731
|
+
}
|
|
1732
|
+
function gr(e, t, n, r) {
|
|
1733
|
+
return r <= 0 && (e = t = n = NaN), new B(e, t, n, r);
|
|
1734
|
+
}
|
|
1735
|
+
function _r(e) {
|
|
1736
|
+
return e instanceof Qn || (e = mr(e)), e ? (e = e.rgb(), new B(e.r, e.g, e.b, e.opacity)) : new B();
|
|
1737
|
+
}
|
|
1738
|
+
function vr(e, t, n, r) {
|
|
1739
|
+
return arguments.length === 1 ? _r(e) : new B(e, t, n, r ?? 1);
|
|
1740
|
+
}
|
|
1741
|
+
function B(e, t, n, r) {
|
|
1742
|
+
this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
|
|
1743
|
+
}
|
|
1744
|
+
Xn(B, vr, Zn(Qn, {
|
|
1745
|
+
brighter(e) {
|
|
1746
|
+
return e = e == null ? er : er ** +e, new B(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
1747
|
+
},
|
|
1748
|
+
darker(e) {
|
|
1749
|
+
return e = e == null ? $n : $n ** +e, new B(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
1750
|
+
},
|
|
1751
|
+
rgb() {
|
|
1752
|
+
return this;
|
|
1753
|
+
},
|
|
1754
|
+
clamp() {
|
|
1755
|
+
return new B(V(this.r), V(this.g), V(this.b), Sr(this.opacity));
|
|
1756
|
+
},
|
|
1757
|
+
displayable() {
|
|
1758
|
+
return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
1759
|
+
},
|
|
1760
|
+
hex: yr,
|
|
1761
|
+
formatHex: yr,
|
|
1762
|
+
formatHex8: br,
|
|
1763
|
+
formatRgb: xr,
|
|
1764
|
+
toString: xr
|
|
1765
|
+
}));
|
|
1766
|
+
function yr() {
|
|
1767
|
+
return `#${H(this.r)}${H(this.g)}${H(this.b)}`;
|
|
1768
|
+
}
|
|
1769
|
+
function br() {
|
|
1770
|
+
return `#${H(this.r)}${H(this.g)}${H(this.b)}${H((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
1771
|
+
}
|
|
1772
|
+
function xr() {
|
|
1773
|
+
let e = Sr(this.opacity);
|
|
1774
|
+
return `${e === 1 ? "rgb(" : "rgba("}${V(this.r)}, ${V(this.g)}, ${V(this.b)}${e === 1 ? ")" : `, ${e})`}`;
|
|
1775
|
+
}
|
|
1776
|
+
function Sr(e) {
|
|
1777
|
+
return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
|
|
1778
|
+
}
|
|
1779
|
+
function V(e) {
|
|
1780
|
+
return Math.max(0, Math.min(255, Math.round(e) || 0));
|
|
1781
|
+
}
|
|
1782
|
+
function H(e) {
|
|
1783
|
+
return e = V(e), (e < 16 ? "0" : "") + e.toString(16);
|
|
1784
|
+
}
|
|
1785
|
+
function Cr(e, t, n, r) {
|
|
1786
|
+
return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new U(e, t, n, r);
|
|
1787
|
+
}
|
|
1788
|
+
function wr(e) {
|
|
1789
|
+
if (e instanceof U) return new U(e.h, e.s, e.l, e.opacity);
|
|
1790
|
+
if (e instanceof Qn || (e = mr(e)), !e) return new U();
|
|
1791
|
+
if (e instanceof U) return e;
|
|
1792
|
+
e = e.rgb();
|
|
1793
|
+
var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, s = a - i, c = (a + i) / 2;
|
|
1794
|
+
return s ? (o = t === a ? (n - r) / s + (n < r) * 6 : n === a ? (r - t) / s + 2 : (t - n) / s + 4, s /= c < .5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new U(o, s, c, e.opacity);
|
|
1795
|
+
}
|
|
1796
|
+
function Tr(e, t, n, r) {
|
|
1797
|
+
return arguments.length === 1 ? wr(e) : new U(e, t, n, r ?? 1);
|
|
1798
|
+
}
|
|
1799
|
+
function U(e, t, n, r) {
|
|
1800
|
+
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
|
|
1801
|
+
}
|
|
1802
|
+
Xn(U, Tr, Zn(Qn, {
|
|
1803
|
+
brighter(e) {
|
|
1804
|
+
return e = e == null ? er : er ** +e, new U(this.h, this.s, this.l * e, this.opacity);
|
|
1805
|
+
},
|
|
1806
|
+
darker(e) {
|
|
1807
|
+
return e = e == null ? $n : $n ** +e, new U(this.h, this.s, this.l * e, this.opacity);
|
|
1808
|
+
},
|
|
1809
|
+
rgb() {
|
|
1810
|
+
var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < .5 ? n : 1 - n) * t, i = 2 * n - r;
|
|
1811
|
+
return new B(Or(e >= 240 ? e - 240 : e + 120, i, r), Or(e, i, r), Or(e < 120 ? e + 240 : e - 120, i, r), this.opacity);
|
|
1812
|
+
},
|
|
1813
|
+
clamp() {
|
|
1814
|
+
return new U(Er(this.h), Dr(this.s), Dr(this.l), Sr(this.opacity));
|
|
1815
|
+
},
|
|
1816
|
+
displayable() {
|
|
1817
|
+
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
1818
|
+
},
|
|
1819
|
+
formatHsl() {
|
|
1820
|
+
let e = Sr(this.opacity);
|
|
1821
|
+
return `${e === 1 ? "hsl(" : "hsla("}${Er(this.h)}, ${Dr(this.s) * 100}%, ${Dr(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
|
|
1822
|
+
}
|
|
1823
|
+
}));
|
|
1824
|
+
function Er(e) {
|
|
1825
|
+
return e = (e || 0) % 360, e < 0 ? e + 360 : e;
|
|
1826
|
+
}
|
|
1827
|
+
function Dr(e) {
|
|
1828
|
+
return Math.max(0, Math.min(1, e || 0));
|
|
1829
|
+
}
|
|
1830
|
+
function Or(e, t, n) {
|
|
1831
|
+
return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
|
|
1832
|
+
}
|
|
1833
|
+
// node_modules/d3-interpolate/src/constant.js
|
|
1834
|
+
var kr = (e) => () => e;
|
|
1835
|
+
// node_modules/d3-interpolate/src/color.js
|
|
1836
|
+
function Ar(e, t) {
|
|
1837
|
+
return function(n) {
|
|
1838
|
+
return e + n * t;
|
|
1839
|
+
};
|
|
1840
|
+
}
|
|
1841
|
+
function jr(e, t, n) {
|
|
1842
|
+
return e **= +n, t = t ** +n - e, n = 1 / n, function(r) {
|
|
1843
|
+
return (e + r * t) ** +n;
|
|
1844
|
+
};
|
|
1845
|
+
}
|
|
1846
|
+
function Mr(e) {
|
|
1847
|
+
return (e = +e) == 1 ? Nr : function(t, n) {
|
|
1848
|
+
return n - t ? jr(t, n, e) : kr(isNaN(t) ? n : t);
|
|
1849
|
+
};
|
|
1850
|
+
}
|
|
1851
|
+
function Nr(e, t) {
|
|
1852
|
+
var n = t - e;
|
|
1853
|
+
return n ? Ar(e, n) : kr(isNaN(e) ? t : e);
|
|
1854
|
+
}
|
|
1855
|
+
// node_modules/d3-interpolate/src/rgb.js
|
|
1856
|
+
var Pr = (function e(t) {
|
|
1857
|
+
var n = Mr(t);
|
|
1858
|
+
function r(e, t) {
|
|
1859
|
+
var r = n((e = vr(e)).r, (t = vr(t)).r), i = n(e.g, t.g), a = n(e.b, t.b), o = Nr(e.opacity, t.opacity);
|
|
1860
|
+
return function(t) {
|
|
1861
|
+
return e.r = r(t), e.g = i(t), e.b = a(t), e.opacity = o(t), e + "";
|
|
1862
|
+
};
|
|
1863
|
+
}
|
|
1864
|
+
return r.gamma = e, r;
|
|
1865
|
+
})(1);
|
|
1866
|
+
// node_modules/d3-interpolate/src/number.js
|
|
1867
|
+
function W(e, t) {
|
|
1868
|
+
return e = +e, t = +t, function(n) {
|
|
1869
|
+
return e * (1 - n) + t * n;
|
|
1870
|
+
};
|
|
1871
|
+
}
|
|
1872
|
+
// node_modules/d3-interpolate/src/string.js
|
|
1873
|
+
var Fr = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Ir = new RegExp(Fr.source, "g");
|
|
1874
|
+
function Lr(e) {
|
|
1875
|
+
return function() {
|
|
1876
|
+
return e;
|
|
1877
|
+
};
|
|
1878
|
+
}
|
|
1879
|
+
function Rr(e) {
|
|
1880
|
+
return function(t) {
|
|
1881
|
+
return e(t) + "";
|
|
1882
|
+
};
|
|
1883
|
+
}
|
|
1884
|
+
function zr(e, t) {
|
|
1885
|
+
var n = Fr.lastIndex = Ir.lastIndex = 0, r, i, a, o = -1, s = [], c = [];
|
|
1886
|
+
for (e += "", t += ""; (r = Fr.exec(e)) && (i = Ir.exec(t));) (a = i.index) > n && (a = t.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({
|
|
1887
|
+
i: o,
|
|
1888
|
+
x: W(r, i)
|
|
1889
|
+
})), n = Ir.lastIndex;
|
|
1890
|
+
return n < t.length && (a = t.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? Rr(c[0].x) : Lr(t) : (t = c.length, function(e) {
|
|
1891
|
+
for (var n = 0, r; n < t; ++n) s[(r = c[n]).i] = r.x(e);
|
|
1892
|
+
return s.join("");
|
|
1893
|
+
});
|
|
1894
|
+
}
|
|
1895
|
+
// node_modules/d3-interpolate/src/transform/decompose.js
|
|
1896
|
+
var Br = 180 / Math.PI, Vr = {
|
|
1897
|
+
translateX: 0,
|
|
1898
|
+
translateY: 0,
|
|
1899
|
+
rotate: 0,
|
|
1900
|
+
skewX: 0,
|
|
1901
|
+
scaleX: 1,
|
|
1902
|
+
scaleY: 1
|
|
1903
|
+
};
|
|
1904
|
+
function Hr(e, t, n, r, i, a) {
|
|
1905
|
+
var o, s, c;
|
|
1906
|
+
return (o = Math.sqrt(e * e + t * t)) && (e /= o, t /= o), (c = e * n + t * r) && (n -= e * c, r -= t * c), (s = Math.sqrt(n * n + r * r)) && (n /= s, r /= s, c /= s), e * r < t * n && (e = -e, t = -t, c = -c, o = -o), {
|
|
1907
|
+
translateX: i,
|
|
1908
|
+
translateY: a,
|
|
1909
|
+
rotate: Math.atan2(t, e) * Br,
|
|
1910
|
+
skewX: Math.atan(c) * Br,
|
|
1911
|
+
scaleX: o,
|
|
1912
|
+
scaleY: s
|
|
1913
|
+
};
|
|
1914
|
+
}
|
|
1915
|
+
// node_modules/d3-interpolate/src/transform/parse.js
|
|
1916
|
+
var Ur;
|
|
1917
|
+
function Wr(e) {
|
|
1918
|
+
let t = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(e + "");
|
|
1919
|
+
return t.isIdentity ? Vr : Hr(t.a, t.b, t.c, t.d, t.e, t.f);
|
|
1920
|
+
}
|
|
1921
|
+
function Gr(e) {
|
|
1922
|
+
return e == null || (Ur ||= document.createElementNS("http://www.w3.org/2000/svg", "g"), Ur.setAttribute("transform", e), !(e = Ur.transform.baseVal.consolidate())) ? Vr : (e = e.matrix, Hr(e.a, e.b, e.c, e.d, e.e, e.f));
|
|
1923
|
+
}
|
|
1924
|
+
// node_modules/d3-interpolate/src/transform/index.js
|
|
1925
|
+
function Kr(e, t, n, r) {
|
|
1926
|
+
function i(e) {
|
|
1927
|
+
return e.length ? e.pop() + " " : "";
|
|
1928
|
+
}
|
|
1929
|
+
function a(e, r, i, a, o, s) {
|
|
1930
|
+
if (e !== i || r !== a) {
|
|
1931
|
+
var c = o.push("translate(", null, t, null, n);
|
|
1932
|
+
s.push({
|
|
1933
|
+
i: c - 4,
|
|
1934
|
+
x: W(e, i)
|
|
1935
|
+
}, {
|
|
1936
|
+
i: c - 2,
|
|
1937
|
+
x: W(r, a)
|
|
1938
|
+
});
|
|
1939
|
+
} else (i || a) && o.push("translate(" + i + t + a + n);
|
|
1940
|
+
}
|
|
1941
|
+
function o(e, t, n, a) {
|
|
1942
|
+
e === t ? t && n.push(i(n) + "rotate(" + t + r) : (e - t > 180 ? t += 360 : t - e > 180 && (e += 360), a.push({
|
|
1943
|
+
i: n.push(i(n) + "rotate(", null, r) - 2,
|
|
1944
|
+
x: W(e, t)
|
|
1945
|
+
}));
|
|
1946
|
+
}
|
|
1947
|
+
function s(e, t, n, a) {
|
|
1948
|
+
e === t ? t && n.push(i(n) + "skewX(" + t + r) : a.push({
|
|
1949
|
+
i: n.push(i(n) + "skewX(", null, r) - 2,
|
|
1950
|
+
x: W(e, t)
|
|
1951
|
+
});
|
|
1952
|
+
}
|
|
1953
|
+
function c(e, t, n, r, a, o) {
|
|
1954
|
+
if (e !== n || t !== r) {
|
|
1955
|
+
var s = a.push(i(a) + "scale(", null, ",", null, ")");
|
|
1956
|
+
o.push({
|
|
1957
|
+
i: s - 4,
|
|
1958
|
+
x: W(e, n)
|
|
1959
|
+
}, {
|
|
1960
|
+
i: s - 2,
|
|
1961
|
+
x: W(t, r)
|
|
1962
|
+
});
|
|
1963
|
+
} else (n !== 1 || r !== 1) && a.push(i(a) + "scale(" + n + "," + r + ")");
|
|
1964
|
+
}
|
|
1965
|
+
return function(t, n) {
|
|
1966
|
+
var r = [], i = [];
|
|
1967
|
+
return t = e(t), n = e(n), a(t.translateX, t.translateY, n.translateX, n.translateY, r, i), o(t.rotate, n.rotate, r, i), s(t.skewX, n.skewX, r, i), c(t.scaleX, t.scaleY, n.scaleX, n.scaleY, r, i), t = n = null, function(e) {
|
|
1968
|
+
for (var t = -1, n = i.length, a; ++t < n;) r[(a = i[t]).i] = a.x(e);
|
|
1969
|
+
return r.join("");
|
|
1970
|
+
};
|
|
1971
|
+
};
|
|
1972
|
+
}
|
|
1973
|
+
var qr = Kr(Wr, "px, ", "px)", "deg)"), Jr = Kr(Gr, ", ", ")", ")"), G = 0, Yr = 0, Xr = 0, Zr = 1e3, Qr, $r, ei = 0, ti = 0, ni = 0, ri = typeof performance == "object" && performance.now ? performance : Date, ii = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
|
|
1974
|
+
setTimeout(e, 17);
|
|
1975
|
+
};
|
|
1976
|
+
function ai() {
|
|
1977
|
+
return ti ||= (ii(oi), ri.now() + ni);
|
|
1978
|
+
}
|
|
1979
|
+
function oi() {
|
|
1980
|
+
ti = 0;
|
|
1981
|
+
}
|
|
1982
|
+
function si() {
|
|
1983
|
+
this._call = this._time = this._next = null;
|
|
1984
|
+
}
|
|
1985
|
+
si.prototype = ci.prototype = {
|
|
1986
|
+
constructor: si,
|
|
1987
|
+
restart: function(e, t, n) {
|
|
1988
|
+
if (typeof e != "function") throw TypeError("callback is not a function");
|
|
1989
|
+
n = (n == null ? ai() : +n) + (t == null ? 0 : +t), !this._next && $r !== this && ($r ? $r._next = this : Qr = this, $r = this), this._call = e, this._time = n, pi();
|
|
1990
|
+
},
|
|
1991
|
+
stop: function() {
|
|
1992
|
+
this._call && (this._call = null, this._time = Infinity, pi());
|
|
1993
|
+
}
|
|
1994
|
+
};
|
|
1995
|
+
function ci(e, t, n) {
|
|
1996
|
+
var r = new si();
|
|
1997
|
+
return r.restart(e, t, n), r;
|
|
1998
|
+
}
|
|
1999
|
+
function li() {
|
|
2000
|
+
ai(), ++G;
|
|
2001
|
+
for (var e = Qr, t; e;) (t = ti - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
|
|
2002
|
+
--G;
|
|
2003
|
+
}
|
|
2004
|
+
function ui() {
|
|
2005
|
+
ti = (ei = ri.now()) + ni, G = Yr = 0;
|
|
2006
|
+
try {
|
|
2007
|
+
li();
|
|
2008
|
+
} finally {
|
|
2009
|
+
G = 0, fi(), ti = 0;
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
function di() {
|
|
2013
|
+
var e = ri.now(), t = e - ei;
|
|
2014
|
+
t > Zr && (ni -= t, ei = e);
|
|
2015
|
+
}
|
|
2016
|
+
function fi() {
|
|
2017
|
+
for (var e, t = Qr, n, r = Infinity; t;) t._call ? (r > t._time && (r = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : Qr = n);
|
|
2018
|
+
$r = e, pi(r);
|
|
2019
|
+
}
|
|
2020
|
+
function pi(e) {
|
|
2021
|
+
G || (Yr &&= clearTimeout(Yr), e - ti > 24 ? (e < Infinity && (Yr = setTimeout(ui, e - ri.now() - ni)), Xr &&= clearInterval(Xr)) : (Xr ||= (ei = ri.now(), setInterval(di, Zr)), G = 1, ii(ui)));
|
|
2022
|
+
}
|
|
2023
|
+
// node_modules/d3-timer/src/timeout.js
|
|
2024
|
+
function mi(e, t, n) {
|
|
2025
|
+
var r = new si();
|
|
2026
|
+
return t = t == null ? 0 : +t, r.restart((n) => {
|
|
2027
|
+
r.stop(), e(n + t);
|
|
2028
|
+
}, t, n), r;
|
|
2029
|
+
}
|
|
2030
|
+
// node_modules/d3-transition/src/transition/schedule.js
|
|
2031
|
+
var hi = Je("start", "end", "cancel", "interrupt"), gi = [];
|
|
2032
|
+
function _i(e, t, n, r, i, a) {
|
|
2033
|
+
var o = e.__transition;
|
|
2034
|
+
if (!o) e.__transition = {};
|
|
2035
|
+
else if (n in o) return;
|
|
2036
|
+
yi(e, n, {
|
|
2037
|
+
name: t,
|
|
2038
|
+
index: r,
|
|
2039
|
+
group: i,
|
|
2040
|
+
on: hi,
|
|
2041
|
+
tween: gi,
|
|
2042
|
+
time: a.time,
|
|
2043
|
+
delay: a.delay,
|
|
2044
|
+
duration: a.duration,
|
|
2045
|
+
ease: a.ease,
|
|
2046
|
+
timer: null,
|
|
2047
|
+
state: 0
|
|
2048
|
+
});
|
|
2049
|
+
}
|
|
2050
|
+
function vi(e, t) {
|
|
2051
|
+
var n = q(e, t);
|
|
2052
|
+
if (n.state > 0) throw Error("too late; already scheduled");
|
|
2053
|
+
return n;
|
|
2054
|
+
}
|
|
2055
|
+
function K(e, t) {
|
|
2056
|
+
var n = q(e, t);
|
|
2057
|
+
if (n.state > 3) throw Error("too late; already running");
|
|
2058
|
+
return n;
|
|
2059
|
+
}
|
|
2060
|
+
function q(e, t) {
|
|
2061
|
+
var n = e.__transition;
|
|
2062
|
+
if (!n || !(n = n[t])) throw Error("transition not found");
|
|
2063
|
+
return n;
|
|
2064
|
+
}
|
|
2065
|
+
function yi(e, t, n) {
|
|
2066
|
+
var r = e.__transition, i;
|
|
2067
|
+
r[t] = n, n.timer = ci(a, 0, n.time);
|
|
2068
|
+
function a(e) {
|
|
2069
|
+
n.state = 1, n.timer.restart(o, n.delay, n.time), n.delay <= e && o(e - n.delay);
|
|
2070
|
+
}
|
|
2071
|
+
function o(a) {
|
|
2072
|
+
var l, u, d, f;
|
|
2073
|
+
if (n.state !== 1) return c();
|
|
2074
|
+
for (l in r) if (f = r[l], f.name === n.name) {
|
|
2075
|
+
if (f.state === 3) return mi(o);
|
|
2076
|
+
f.state === 4 ? (f.state = 6, f.timer.stop(), f.on.call("interrupt", e, e.__data__, f.index, f.group), delete r[l]) : +l < t && (f.state = 6, f.timer.stop(), f.on.call("cancel", e, e.__data__, f.index, f.group), delete r[l]);
|
|
2077
|
+
}
|
|
2078
|
+
if (mi(function() {
|
|
2079
|
+
n.state === 3 && (n.state = 4, n.timer.restart(s, n.delay, n.time), s(a));
|
|
2080
|
+
}), n.state = 2, n.on.call("start", e, e.__data__, n.index, n.group), n.state === 2) {
|
|
2081
|
+
for (n.state = 3, i = Array(d = n.tween.length), l = 0, u = -1; l < d; ++l) (f = n.tween[l].value.call(e, e.__data__, n.index, n.group)) && (i[++u] = f);
|
|
2082
|
+
i.length = u + 1;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
function s(t) {
|
|
2086
|
+
for (var r = t < n.duration ? n.ease.call(null, t / n.duration) : (n.timer.restart(c), n.state = 5, 1), a = -1, o = i.length; ++a < o;) i[a].call(e, r);
|
|
2087
|
+
n.state === 5 && (n.on.call("end", e, e.__data__, n.index, n.group), c());
|
|
2088
|
+
}
|
|
2089
|
+
function c() {
|
|
2090
|
+
for (var i in n.state = 6, n.timer.stop(), delete r[t], r) return;
|
|
2091
|
+
delete e.__transition;
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
// node_modules/d3-transition/src/interrupt.js
|
|
2095
|
+
function bi(e, t) {
|
|
2096
|
+
var n = e.__transition, r, i, a = !0, o;
|
|
2097
|
+
if (n) {
|
|
2098
|
+
for (o in t = t == null ? null : t + "", n) (r = n[o]).name === t ? (i = r.state > 2 && r.state < 5, r.state = 6, r.timer.stop(), r.on.call(i ? "interrupt" : "cancel", e, e.__data__, r.index, r.group), delete n[o]) : a = !1;
|
|
2099
|
+
a && delete e.__transition;
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
// node_modules/d3-transition/src/selection/interrupt.js
|
|
2103
|
+
function xi(e) {
|
|
2104
|
+
return this.each(function() {
|
|
2105
|
+
bi(this, e);
|
|
2106
|
+
});
|
|
2107
|
+
}
|
|
2108
|
+
// node_modules/d3-transition/src/transition/tween.js
|
|
2109
|
+
function Si(e, t) {
|
|
2110
|
+
var n, r;
|
|
2111
|
+
return function() {
|
|
2112
|
+
var i = K(this, e), a = i.tween;
|
|
2113
|
+
if (a !== n) {
|
|
2114
|
+
r = n = a;
|
|
2115
|
+
for (var o = 0, s = r.length; o < s; ++o) if (r[o].name === t) {
|
|
2116
|
+
r = r.slice(), r.splice(o, 1);
|
|
2117
|
+
break;
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
i.tween = r;
|
|
2121
|
+
};
|
|
2122
|
+
}
|
|
2123
|
+
function Ci(e, t, n) {
|
|
2124
|
+
var r, i;
|
|
2125
|
+
if (typeof n != "function") throw Error();
|
|
2126
|
+
return function() {
|
|
2127
|
+
var a = K(this, e), o = a.tween;
|
|
2128
|
+
if (o !== r) {
|
|
2129
|
+
i = (r = o).slice();
|
|
2130
|
+
for (var s = {
|
|
2131
|
+
name: t,
|
|
2132
|
+
value: n
|
|
2133
|
+
}, c = 0, l = i.length; c < l; ++c) if (i[c].name === t) {
|
|
2134
|
+
i[c] = s;
|
|
2135
|
+
break;
|
|
2136
|
+
}
|
|
2137
|
+
c === l && i.push(s);
|
|
2138
|
+
}
|
|
2139
|
+
a.tween = i;
|
|
2140
|
+
};
|
|
2141
|
+
}
|
|
2142
|
+
function wi(e, t) {
|
|
2143
|
+
var n = this._id;
|
|
2144
|
+
if (e += "", arguments.length < 2) {
|
|
2145
|
+
for (var r = q(this.node(), n).tween, i = 0, a = r.length, o; i < a; ++i) if ((o = r[i]).name === e) return o.value;
|
|
2146
|
+
return null;
|
|
2147
|
+
}
|
|
2148
|
+
return this.each((t == null ? Si : Ci)(n, e, t));
|
|
2149
|
+
}
|
|
2150
|
+
function Ti(e, t, n) {
|
|
2151
|
+
var r = e._id;
|
|
2152
|
+
return e.each(function() {
|
|
2153
|
+
var e = K(this, r);
|
|
2154
|
+
(e.value ||= {})[t] = n.apply(this, arguments);
|
|
2155
|
+
}), function(e) {
|
|
2156
|
+
return q(e, r).value[t];
|
|
2157
|
+
};
|
|
2158
|
+
}
|
|
2159
|
+
// node_modules/d3-transition/src/transition/interpolate.js
|
|
2160
|
+
function Ei(e, t) {
|
|
2161
|
+
var n;
|
|
2162
|
+
return (typeof t == "number" ? W : t instanceof mr ? Pr : (n = mr(t)) ? (t = n, Pr) : zr)(e, t);
|
|
2163
|
+
}
|
|
2164
|
+
// node_modules/d3-transition/src/transition/attr.js
|
|
2165
|
+
function Di(e) {
|
|
2166
|
+
return function() {
|
|
2167
|
+
this.removeAttribute(e);
|
|
2168
|
+
};
|
|
2169
|
+
}
|
|
2170
|
+
function Oi(e) {
|
|
2171
|
+
return function() {
|
|
2172
|
+
this.removeAttributeNS(e.space, e.local);
|
|
2173
|
+
};
|
|
2174
|
+
}
|
|
2175
|
+
function ki(e, t, n) {
|
|
2176
|
+
var r, i = n + "", a;
|
|
2177
|
+
return function() {
|
|
2178
|
+
var o = this.getAttribute(e);
|
|
2179
|
+
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
2180
|
+
};
|
|
2181
|
+
}
|
|
2182
|
+
function Ai(e, t, n) {
|
|
2183
|
+
var r, i = n + "", a;
|
|
2184
|
+
return function() {
|
|
2185
|
+
var o = this.getAttributeNS(e.space, e.local);
|
|
2186
|
+
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
2187
|
+
};
|
|
2188
|
+
}
|
|
2189
|
+
function ji(e, t, n) {
|
|
2190
|
+
var r, i, a;
|
|
2191
|
+
return function() {
|
|
2192
|
+
var o, s = n(this), c;
|
|
2193
|
+
return s == null ? void this.removeAttribute(e) : (o = this.getAttribute(e), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
|
|
2194
|
+
};
|
|
2195
|
+
}
|
|
2196
|
+
function Mi(e, t, n) {
|
|
2197
|
+
var r, i, a;
|
|
2198
|
+
return function() {
|
|
2199
|
+
var o, s = n(this), c;
|
|
2200
|
+
return s == null ? void this.removeAttributeNS(e.space, e.local) : (o = this.getAttributeNS(e.space, e.local), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
|
|
2201
|
+
};
|
|
2202
|
+
}
|
|
2203
|
+
function Ni(e, t) {
|
|
2204
|
+
var n = et(e), r = n === "transform" ? Jr : Ei;
|
|
2205
|
+
return this.attrTween(e, typeof t == "function" ? (n.local ? Mi : ji)(n, r, Ti(this, "attr." + e, t)) : t == null ? (n.local ? Oi : Di)(n) : (n.local ? Ai : ki)(n, r, t));
|
|
2206
|
+
}
|
|
2207
|
+
// node_modules/d3-transition/src/transition/attrTween.js
|
|
2208
|
+
function Pi(e, t) {
|
|
2209
|
+
return function(n) {
|
|
2210
|
+
this.setAttribute(e, t.call(this, n));
|
|
2211
|
+
};
|
|
2212
|
+
}
|
|
2213
|
+
function Fi(e, t) {
|
|
2214
|
+
return function(n) {
|
|
2215
|
+
this.setAttributeNS(e.space, e.local, t.call(this, n));
|
|
2216
|
+
};
|
|
2217
|
+
}
|
|
2218
|
+
function Ii(e, t) {
|
|
2219
|
+
var n, r;
|
|
2220
|
+
function i() {
|
|
2221
|
+
var i = t.apply(this, arguments);
|
|
2222
|
+
return i !== r && (n = (r = i) && Fi(e, i)), n;
|
|
2223
|
+
}
|
|
2224
|
+
return i._value = t, i;
|
|
2225
|
+
}
|
|
2226
|
+
function Li(e, t) {
|
|
2227
|
+
var n, r;
|
|
2228
|
+
function i() {
|
|
2229
|
+
var i = t.apply(this, arguments);
|
|
2230
|
+
return i !== r && (n = (r = i) && Pi(e, i)), n;
|
|
2231
|
+
}
|
|
2232
|
+
return i._value = t, i;
|
|
2233
|
+
}
|
|
2234
|
+
function Ri(e, t) {
|
|
2235
|
+
var n = "attr." + e;
|
|
2236
|
+
if (arguments.length < 2) return (n = this.tween(n)) && n._value;
|
|
2237
|
+
if (t == null) return this.tween(n, null);
|
|
2238
|
+
if (typeof t != "function") throw Error();
|
|
2239
|
+
var r = et(e);
|
|
2240
|
+
return this.tween(n, (r.local ? Ii : Li)(r, t));
|
|
2241
|
+
}
|
|
2242
|
+
// node_modules/d3-transition/src/transition/delay.js
|
|
2243
|
+
function zi(e, t) {
|
|
2244
|
+
return function() {
|
|
2245
|
+
vi(this, e).delay = +t.apply(this, arguments);
|
|
2246
|
+
};
|
|
2247
|
+
}
|
|
2248
|
+
function Bi(e, t) {
|
|
2249
|
+
return t = +t, function() {
|
|
2250
|
+
vi(this, e).delay = t;
|
|
2251
|
+
};
|
|
2252
|
+
}
|
|
2253
|
+
function Vi(e) {
|
|
2254
|
+
var t = this._id;
|
|
2255
|
+
return arguments.length ? this.each((typeof e == "function" ? zi : Bi)(t, e)) : q(this.node(), t).delay;
|
|
2256
|
+
}
|
|
2257
|
+
// node_modules/d3-transition/src/transition/duration.js
|
|
2258
|
+
function Hi(e, t) {
|
|
2259
|
+
return function() {
|
|
2260
|
+
K(this, e).duration = +t.apply(this, arguments);
|
|
2261
|
+
};
|
|
2262
|
+
}
|
|
2263
|
+
function Ui(e, t) {
|
|
2264
|
+
return t = +t, function() {
|
|
2265
|
+
K(this, e).duration = t;
|
|
2266
|
+
};
|
|
2267
|
+
}
|
|
2268
|
+
function Wi(e) {
|
|
2269
|
+
var t = this._id;
|
|
2270
|
+
return arguments.length ? this.each((typeof e == "function" ? Hi : Ui)(t, e)) : q(this.node(), t).duration;
|
|
2271
|
+
}
|
|
2272
|
+
// node_modules/d3-transition/src/transition/ease.js
|
|
2273
|
+
function Gi(e, t) {
|
|
2274
|
+
if (typeof t != "function") throw Error();
|
|
2275
|
+
return function() {
|
|
2276
|
+
K(this, e).ease = t;
|
|
2277
|
+
};
|
|
2278
|
+
}
|
|
2279
|
+
function Ki(e) {
|
|
2280
|
+
var t = this._id;
|
|
2281
|
+
return arguments.length ? this.each(Gi(t, e)) : q(this.node(), t).ease;
|
|
2282
|
+
}
|
|
2283
|
+
// node_modules/d3-transition/src/transition/easeVarying.js
|
|
2284
|
+
function qi(e, t) {
|
|
2285
|
+
return function() {
|
|
2286
|
+
var n = t.apply(this, arguments);
|
|
2287
|
+
if (typeof n != "function") throw Error();
|
|
2288
|
+
K(this, e).ease = n;
|
|
2289
|
+
};
|
|
2290
|
+
}
|
|
2291
|
+
function Ji(e) {
|
|
2292
|
+
if (typeof e != "function") throw Error();
|
|
2293
|
+
return this.each(qi(this._id, e));
|
|
2294
|
+
}
|
|
2295
|
+
// node_modules/d3-transition/src/transition/filter.js
|
|
2296
|
+
function Yi(e) {
|
|
2297
|
+
typeof e != "function" && (e = ft(e));
|
|
2298
|
+
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = [], c, l = 0; l < o; ++l) (c = a[l]) && e.call(c, c.__data__, l, a) && s.push(c);
|
|
2299
|
+
return new J(r, this._parents, this._name, this._id);
|
|
2300
|
+
}
|
|
2301
|
+
// node_modules/d3-transition/src/transition/merge.js
|
|
2302
|
+
function Xi(e) {
|
|
2303
|
+
if (e._id !== this._id) throw Error();
|
|
2304
|
+
for (var t = this._groups, n = e._groups, r = t.length, i = n.length, a = Math.min(r, i), o = Array(r), s = 0; s < a; ++s) for (var c = t[s], l = n[s], u = c.length, d = o[s] = Array(u), f, p = 0; p < u; ++p) (f = c[p] || l[p]) && (d[p] = f);
|
|
2305
|
+
for (; s < r; ++s) o[s] = t[s];
|
|
2306
|
+
return new J(o, this._parents, this._name, this._id);
|
|
2307
|
+
}
|
|
2308
|
+
// node_modules/d3-transition/src/transition/on.js
|
|
2309
|
+
function Zi(e) {
|
|
2310
|
+
return (e + "").trim().split(/^|\s+/).every(function(e) {
|
|
2311
|
+
var t = e.indexOf(".");
|
|
2312
|
+
return t >= 0 && (e = e.slice(0, t)), !e || e === "start";
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
function Qi(e, t, n) {
|
|
2316
|
+
var r, i, a = Zi(t) ? vi : K;
|
|
2317
|
+
return function() {
|
|
2318
|
+
var o = a(this, e), s = o.on;
|
|
2319
|
+
s !== r && (i = (r = s).copy()).on(t, n), o.on = i;
|
|
2320
|
+
};
|
|
2321
|
+
}
|
|
2322
|
+
function $i(e, t) {
|
|
2323
|
+
var n = this._id;
|
|
2324
|
+
return arguments.length < 2 ? q(this.node(), n).on.on(e) : this.each(Qi(n, e, t));
|
|
2325
|
+
}
|
|
2326
|
+
// node_modules/d3-transition/src/transition/remove.js
|
|
2327
|
+
function ea(e) {
|
|
2328
|
+
return function() {
|
|
2329
|
+
var t = this.parentNode;
|
|
2330
|
+
for (var n in this.__transition) if (+n !== e) return;
|
|
2331
|
+
t && t.removeChild(this);
|
|
2332
|
+
};
|
|
2333
|
+
}
|
|
2334
|
+
function ta() {
|
|
2335
|
+
return this.on("end.remove", ea(this._id));
|
|
2336
|
+
}
|
|
2337
|
+
// node_modules/d3-transition/src/transition/select.js
|
|
2338
|
+
function na(e) {
|
|
2339
|
+
var t = this._name, n = this._id;
|
|
2340
|
+
typeof e != "function" && (e = at(e));
|
|
2341
|
+
for (var r = this._groups, i = r.length, a = Array(i), o = 0; o < i; ++o) for (var s = r[o], c = s.length, l = a[o] = Array(c), u, d, f = 0; f < c; ++f) (u = s[f]) && (d = e.call(u, u.__data__, f, s)) && ("__data__" in u && (d.__data__ = u.__data__), l[f] = d, _i(l[f], t, n, f, l, q(u, n)));
|
|
2342
|
+
return new J(a, this._parents, t, n);
|
|
2343
|
+
}
|
|
2344
|
+
// node_modules/d3-transition/src/transition/selectAll.js
|
|
2345
|
+
function ra(e) {
|
|
2346
|
+
var t = this._name, n = this._id;
|
|
2347
|
+
typeof e != "function" && (e = lt(e));
|
|
2348
|
+
for (var r = this._groups, i = r.length, a = [], o = [], s = 0; s < i; ++s) for (var c = r[s], l = c.length, u, d = 0; d < l; ++d) if (u = c[d]) {
|
|
2349
|
+
for (var f = e.call(u, u.__data__, d, c), p, m = q(u, n), h = 0, g = f.length; h < g; ++h) (p = f[h]) && _i(p, t, n, h, f, m);
|
|
2350
|
+
a.push(f), o.push(u);
|
|
2351
|
+
}
|
|
2352
|
+
return new J(a, o, t, n);
|
|
2353
|
+
}
|
|
2354
|
+
// node_modules/d3-transition/src/transition/selection.js
|
|
2355
|
+
var ia = Jn.prototype.constructor;
|
|
2356
|
+
function aa() {
|
|
2357
|
+
return new ia(this._groups, this._parents);
|
|
2358
|
+
}
|
|
2359
|
+
// node_modules/d3-transition/src/transition/style.js
|
|
2360
|
+
function oa(e, t) {
|
|
2361
|
+
var n, r, i;
|
|
2362
|
+
return function() {
|
|
2363
|
+
var a = I(this, e), o = (this.style.removeProperty(e), I(this, e));
|
|
2364
|
+
return a === o ? null : a === n && o === r ? i : i = t(n = a, r = o);
|
|
2365
|
+
};
|
|
2366
|
+
}
|
|
2367
|
+
function sa(e) {
|
|
2368
|
+
return function() {
|
|
2369
|
+
this.style.removeProperty(e);
|
|
2370
|
+
};
|
|
2371
|
+
}
|
|
2372
|
+
function ca(e, t, n) {
|
|
2373
|
+
var r, i = n + "", a;
|
|
2374
|
+
return function() {
|
|
2375
|
+
var o = I(this, e);
|
|
2376
|
+
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
2377
|
+
};
|
|
2378
|
+
}
|
|
2379
|
+
function la(e, t, n) {
|
|
2380
|
+
var r, i, a;
|
|
2381
|
+
return function() {
|
|
2382
|
+
var o = I(this, e), s = n(this), c = s + "";
|
|
2383
|
+
return s ?? (c = s = (this.style.removeProperty(e), I(this, e))), o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s));
|
|
2384
|
+
};
|
|
2385
|
+
}
|
|
2386
|
+
function ua(e, t) {
|
|
2387
|
+
var n, r, i, a = "style." + t, o = "end." + a, s;
|
|
2388
|
+
return function() {
|
|
2389
|
+
var c = K(this, e), l = c.on, u = c.value[a] == null ? s ||= sa(t) : void 0;
|
|
2390
|
+
(l !== n || i !== u) && (r = (n = l).copy()).on(o, i = u), c.on = r;
|
|
2391
|
+
};
|
|
2392
|
+
}
|
|
2393
|
+
function da(e, t, n) {
|
|
2394
|
+
var r = (e += "") == "transform" ? qr : Ei;
|
|
2395
|
+
return t == null ? this.styleTween(e, oa(e, r)).on("end.style." + e, sa(e)) : typeof t == "function" ? this.styleTween(e, la(e, r, Ti(this, "style." + e, t))).each(ua(this._id, e)) : this.styleTween(e, ca(e, r, t), n).on("end.style." + e, null);
|
|
2396
|
+
}
|
|
2397
|
+
// node_modules/d3-transition/src/transition/styleTween.js
|
|
2398
|
+
function fa(e, t, n) {
|
|
2399
|
+
return function(r) {
|
|
2400
|
+
this.style.setProperty(e, t.call(this, r), n);
|
|
2401
|
+
};
|
|
2402
|
+
}
|
|
2403
|
+
function pa(e, t, n) {
|
|
2404
|
+
var r, i;
|
|
2405
|
+
function a() {
|
|
2406
|
+
var a = t.apply(this, arguments);
|
|
2407
|
+
return a !== i && (r = (i = a) && fa(e, a, n)), r;
|
|
2408
|
+
}
|
|
2409
|
+
return a._value = t, a;
|
|
2410
|
+
}
|
|
2411
|
+
function ma(e, t, n) {
|
|
2412
|
+
var r = "style." + (e += "");
|
|
2413
|
+
if (arguments.length < 2) return (r = this.tween(r)) && r._value;
|
|
2414
|
+
if (t == null) return this.tween(r, null);
|
|
2415
|
+
if (typeof t != "function") throw Error();
|
|
2416
|
+
return this.tween(r, pa(e, t, n ?? ""));
|
|
2417
|
+
}
|
|
2418
|
+
// node_modules/d3-transition/src/transition/text.js
|
|
2419
|
+
function ha(e) {
|
|
2420
|
+
return function() {
|
|
2421
|
+
this.textContent = e;
|
|
2422
|
+
};
|
|
2423
|
+
}
|
|
2424
|
+
function ga(e) {
|
|
2425
|
+
return function() {
|
|
2426
|
+
var t = e(this);
|
|
2427
|
+
this.textContent = t ?? "";
|
|
2428
|
+
};
|
|
2429
|
+
}
|
|
2430
|
+
function _a(e) {
|
|
2431
|
+
return this.tween("text", typeof e == "function" ? ga(Ti(this, "text", e)) : ha(e == null ? "" : e + ""));
|
|
2432
|
+
}
|
|
2433
|
+
// node_modules/d3-transition/src/transition/textTween.js
|
|
2434
|
+
function va(e) {
|
|
2435
|
+
return function(t) {
|
|
2436
|
+
this.textContent = e.call(this, t);
|
|
2437
|
+
};
|
|
2438
|
+
}
|
|
2439
|
+
function ya(e) {
|
|
2440
|
+
var t, n;
|
|
2441
|
+
function r() {
|
|
2442
|
+
var r = e.apply(this, arguments);
|
|
2443
|
+
return r !== n && (t = (n = r) && va(r)), t;
|
|
2444
|
+
}
|
|
2445
|
+
return r._value = e, r;
|
|
2446
|
+
}
|
|
2447
|
+
function ba(e) {
|
|
2448
|
+
var t = "text";
|
|
2449
|
+
if (arguments.length < 1) return (t = this.tween(t)) && t._value;
|
|
2450
|
+
if (e == null) return this.tween(t, null);
|
|
2451
|
+
if (typeof e != "function") throw Error();
|
|
2452
|
+
return this.tween(t, ya(e));
|
|
2453
|
+
}
|
|
2454
|
+
// node_modules/d3-transition/src/transition/transition.js
|
|
2455
|
+
function xa() {
|
|
2456
|
+
for (var e = this._name, t = this._id, n = wa(), r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) if (c = o[l]) {
|
|
2457
|
+
var u = q(c, t);
|
|
2458
|
+
_i(c, e, n, l, o, {
|
|
2459
|
+
time: u.time + u.delay + u.duration,
|
|
2460
|
+
delay: 0,
|
|
2461
|
+
duration: u.duration,
|
|
2462
|
+
ease: u.ease
|
|
2463
|
+
});
|
|
2464
|
+
}
|
|
2465
|
+
return new J(r, this._parents, e, n);
|
|
2466
|
+
}
|
|
2467
|
+
// node_modules/d3-transition/src/transition/end.js
|
|
2468
|
+
function Sa() {
|
|
2469
|
+
var e, t, n = this, r = n._id, i = n.size();
|
|
2470
|
+
return new Promise(function(a, o) {
|
|
2471
|
+
var s = { value: o }, c = { value: function() {
|
|
2472
|
+
--i === 0 && a();
|
|
2473
|
+
} };
|
|
2474
|
+
n.each(function() {
|
|
2475
|
+
var n = K(this, r), i = n.on;
|
|
2476
|
+
i !== e && (t = (e = i).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(c)), n.on = t;
|
|
2477
|
+
}), i === 0 && a();
|
|
2478
|
+
});
|
|
2479
|
+
}
|
|
2480
|
+
// node_modules/d3-transition/src/transition/index.js
|
|
2481
|
+
var Ca = 0;
|
|
2482
|
+
function J(e, t, n, r) {
|
|
2483
|
+
this._groups = e, this._parents = t, this._name = n, this._id = r;
|
|
2484
|
+
}
|
|
2485
|
+
function wa() {
|
|
2486
|
+
return ++Ca;
|
|
2487
|
+
}
|
|
2488
|
+
var Y = Jn.prototype;
|
|
2489
|
+
J.prototype = {
|
|
2490
|
+
constructor: J,
|
|
2491
|
+
select: na,
|
|
2492
|
+
selectAll: ra,
|
|
2493
|
+
selectChild: Y.selectChild,
|
|
2494
|
+
selectChildren: Y.selectChildren,
|
|
2495
|
+
filter: Yi,
|
|
2496
|
+
merge: Xi,
|
|
2497
|
+
selection: aa,
|
|
2498
|
+
transition: xa,
|
|
2499
|
+
call: Y.call,
|
|
2500
|
+
nodes: Y.nodes,
|
|
2501
|
+
node: Y.node,
|
|
2502
|
+
size: Y.size,
|
|
2503
|
+
empty: Y.empty,
|
|
2504
|
+
each: Y.each,
|
|
2505
|
+
on: $i,
|
|
2506
|
+
attr: Ni,
|
|
2507
|
+
attrTween: Ri,
|
|
2508
|
+
style: da,
|
|
2509
|
+
styleTween: ma,
|
|
2510
|
+
text: _a,
|
|
2511
|
+
textTween: ba,
|
|
2512
|
+
remove: ta,
|
|
2513
|
+
tween: wi,
|
|
2514
|
+
delay: Vi,
|
|
2515
|
+
duration: Wi,
|
|
2516
|
+
ease: Ki,
|
|
2517
|
+
easeVarying: Ji,
|
|
2518
|
+
end: Sa,
|
|
2519
|
+
[Symbol.iterator]: Y[Symbol.iterator]
|
|
2520
|
+
};
|
|
2521
|
+
// node_modules/d3-ease/src/cubic.js
|
|
2522
|
+
function Ta(e) {
|
|
2523
|
+
return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2;
|
|
2524
|
+
}
|
|
2525
|
+
// node_modules/d3-transition/src/selection/transition.js
|
|
2526
|
+
var Ea = {
|
|
2527
|
+
time: null,
|
|
2528
|
+
delay: 0,
|
|
2529
|
+
duration: 250,
|
|
2530
|
+
ease: Ta
|
|
2531
|
+
};
|
|
2532
|
+
function Da(e, t) {
|
|
2533
|
+
for (var n; !(n = e.__transition) || !(n = n[t]);) if (!(e = e.parentNode)) throw Error(`transition ${t} not found`);
|
|
2534
|
+
return n;
|
|
2535
|
+
}
|
|
2536
|
+
function Oa(e) {
|
|
2537
|
+
var t, n;
|
|
2538
|
+
e instanceof J ? (t = e._id, e = e._name) : (t = wa(), (n = Ea).time = ai(), e = e == null ? null : e + "");
|
|
2539
|
+
for (var r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && _i(c, e, t, l, o, n || Da(c, t));
|
|
2540
|
+
return new J(r, this._parents, e, t);
|
|
2541
|
+
}
|
|
2542
|
+
Jn.prototype.interrupt = xi, Jn.prototype.transition = Oa;
|
|
2543
|
+
// node_modules/d3-brush/src/brush.js
|
|
2544
|
+
var { abs: ka, max: Aa, min: ja } = Math;
|
|
2545
|
+
["w", "e"].map(Ma), ["n", "s"].map(Ma), [
|
|
2546
|
+
"n",
|
|
2547
|
+
"w",
|
|
2548
|
+
"e",
|
|
2549
|
+
"s",
|
|
2550
|
+
"nw",
|
|
2551
|
+
"ne",
|
|
2552
|
+
"sw",
|
|
2553
|
+
"se"
|
|
2554
|
+
].map(Ma);
|
|
2555
|
+
function Ma(e) {
|
|
2556
|
+
return { type: e };
|
|
2557
|
+
}
|
|
2558
|
+
// node_modules/d3-zoom/src/transform.js
|
|
2559
|
+
function Na(e, t, n) {
|
|
2560
|
+
this.k = e, this.x = t, this.y = n;
|
|
2561
|
+
}
|
|
2562
|
+
Na.prototype = {
|
|
2563
|
+
constructor: Na,
|
|
2564
|
+
scale: function(e) {
|
|
2565
|
+
return e === 1 ? this : new Na(this.k * e, this.x, this.y);
|
|
2566
|
+
},
|
|
2567
|
+
translate: function(e, t) {
|
|
2568
|
+
return e === 0 & t === 0 ? this : new Na(this.k, this.x + this.k * e, this.y + this.k * t);
|
|
2569
|
+
},
|
|
2570
|
+
apply: function(e) {
|
|
2571
|
+
return [e[0] * this.k + this.x, e[1] * this.k + this.y];
|
|
2572
|
+
},
|
|
2573
|
+
applyX: function(e) {
|
|
2574
|
+
return e * this.k + this.x;
|
|
2575
|
+
},
|
|
2576
|
+
applyY: function(e) {
|
|
2577
|
+
return e * this.k + this.y;
|
|
2578
|
+
},
|
|
2579
|
+
invert: function(e) {
|
|
2580
|
+
return [(e[0] - this.x) / this.k, (e[1] - this.y) / this.k];
|
|
2581
|
+
},
|
|
2582
|
+
invertX: function(e) {
|
|
2583
|
+
return (e - this.x) / this.k;
|
|
2584
|
+
},
|
|
2585
|
+
invertY: function(e) {
|
|
2586
|
+
return (e - this.y) / this.k;
|
|
2587
|
+
},
|
|
2588
|
+
rescaleX: function(e) {
|
|
2589
|
+
return e.copy().domain(e.range().map(this.invertX, this).map(e.invert, e));
|
|
2590
|
+
},
|
|
2591
|
+
rescaleY: function(e) {
|
|
2592
|
+
return e.copy().domain(e.range().map(this.invertY, this).map(e.invert, e));
|
|
2593
|
+
},
|
|
2594
|
+
toString: function() {
|
|
2595
|
+
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
2596
|
+
}
|
|
2597
|
+
};
|
|
2598
|
+
var Pa = new Na(1, 0, 0);
|
|
2599
|
+
Fa.prototype = Na.prototype;
|
|
2600
|
+
function Fa(e) {
|
|
2601
|
+
for (; !e.__zoom;) if (!(e = e.parentNode)) return Pa;
|
|
2602
|
+
return e.__zoom;
|
|
2603
|
+
}
|
|
2604
|
+
// src/components/hexagonWave.ts
|
|
2605
|
+
var X = class extends j {
|
|
2606
|
+
constructor(...e) {
|
|
2607
|
+
super(...e), this.hexSize = 50, this.waveAmplitude = 5.5, this.waveSpeed = 1, this.waveXFactor = -.005, this.waveYFactor = -.005, this.shadeAmplitude = .5, this.shadeLightnessBoost = 15, this.baseLightness = 10, this.lightnessRange = 25, this.hexHueStart = 310, this.hexHueEnd = 200, this.hexSaturation = 100, this.hexScale = 1, this.hexColors = [], this.grid = [], this.time = 0;
|
|
2608
|
+
}
|
|
2609
|
+
updated(e) {
|
|
2610
|
+
super.updated(e), e.has("hexSize") && this.initialize();
|
|
2611
|
+
}
|
|
2612
|
+
initialize() {
|
|
2613
|
+
this.grid = [], this.time = 0;
|
|
2614
|
+
let e = this.hexSize, t = Math.sqrt(3) * e, n = e * 1.5, r = Math.ceil(this.width / t) + 2, i = Math.ceil(this.height / n) + 2;
|
|
2615
|
+
for (let e = -1; e < i; e++) for (let i = -1; i < r; i++) {
|
|
2616
|
+
let r = e % 2 == 0 ? 0 : t / 2;
|
|
2617
|
+
this.grid.push({
|
|
2618
|
+
x: i * t + r,
|
|
2619
|
+
y: e * n,
|
|
2620
|
+
phase: Math.random() * Math.PI * 2,
|
|
2621
|
+
colorIndex: Math.floor(Math.random() * 1e3)
|
|
2622
|
+
});
|
|
2623
|
+
}
|
|
2624
|
+
}
|
|
2625
|
+
loop(e) {
|
|
2626
|
+
this.time += e, this.ctx.globalAlpha = this.trailOpacity, this.drawBackground(this.ctx), this.ctx.globalAlpha = 1;
|
|
2627
|
+
for (let e of this.grid) {
|
|
2628
|
+
let t = e.x * this.waveXFactor, n = e.y * this.waveYFactor, r = Math.sin(this.time * this.waveSpeed + t + n), i = r * this.waveAmplitude, a = e.x + e.y, o = Math.sin(this.time + a) * this.shadeAmplitude, s = this.baseLightness + r * this.lightnessRange + o, c;
|
|
2629
|
+
if (this.hexColors && this.hexColors.length > 0) {
|
|
2630
|
+
let t = this.hexColors[(e.colorIndex || 0) % this.hexColors.length], n = Tr(t);
|
|
2631
|
+
c = `hsl(${n.h}, ${n.s * 100}%, ${s}%)`;
|
|
2632
|
+
} else {
|
|
2633
|
+
let t = this.width + this.height, n = (e.x + e.y) / t;
|
|
2634
|
+
c = `hsl(${this.hexHueStart + (this.hexHueEnd - this.hexHueStart) * n}, ${this.hexSaturation}%, ${s}%)`;
|
|
2635
|
+
}
|
|
2636
|
+
this.drawHex(e.x, e.y + i, this.hexSize * this.hexScale, c);
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
drawHex(e, t, n, r) {
|
|
2640
|
+
let i = this.ctx;
|
|
2641
|
+
i.beginPath();
|
|
2642
|
+
for (let r = 0; r < 6; r++) {
|
|
2643
|
+
let a = Math.PI * 2 / 6 * r - Math.PI / 2, o = e + Math.cos(a) * n, s = t + Math.sin(a) * n;
|
|
2644
|
+
r === 0 ? i.moveTo(o, s) : i.lineTo(o, s);
|
|
2645
|
+
}
|
|
2646
|
+
i.closePath(), i.fillStyle = r, i.fill();
|
|
2647
|
+
}
|
|
2648
|
+
};
|
|
2649
|
+
A([O({
|
|
2650
|
+
type: Number,
|
|
2651
|
+
attribute: "hex-size"
|
|
2652
|
+
})], X.prototype, "hexSize", void 0), A([O({
|
|
2653
|
+
type: Number,
|
|
2654
|
+
attribute: "wave-amplitude"
|
|
2655
|
+
})], X.prototype, "waveAmplitude", void 0), A([O({
|
|
2656
|
+
type: Number,
|
|
2657
|
+
attribute: "wave-speed"
|
|
2658
|
+
})], X.prototype, "waveSpeed", void 0), A([O({
|
|
2659
|
+
type: Number,
|
|
2660
|
+
attribute: "wave-x-factor"
|
|
2661
|
+
})], X.prototype, "waveXFactor", void 0), A([O({
|
|
2662
|
+
type: Number,
|
|
2663
|
+
attribute: "wave-y-factor"
|
|
2664
|
+
})], X.prototype, "waveYFactor", void 0), A([O({
|
|
2665
|
+
type: Number,
|
|
2666
|
+
attribute: "shade-amplitude"
|
|
2667
|
+
})], X.prototype, "shadeAmplitude", void 0), A([O({
|
|
2668
|
+
type: Number,
|
|
2669
|
+
attribute: "shade-lightness-boost"
|
|
2670
|
+
})], X.prototype, "shadeLightnessBoost", void 0), A([O({
|
|
2671
|
+
type: Number,
|
|
2672
|
+
attribute: "base-lightness"
|
|
2673
|
+
})], X.prototype, "baseLightness", void 0), A([O({
|
|
2674
|
+
type: Number,
|
|
2675
|
+
attribute: "lightness-range"
|
|
2676
|
+
})], X.prototype, "lightnessRange", void 0), A([O({
|
|
2677
|
+
type: Number,
|
|
2678
|
+
attribute: "hex-hue-start"
|
|
2679
|
+
})], X.prototype, "hexHueStart", void 0), A([O({
|
|
2680
|
+
type: Number,
|
|
2681
|
+
attribute: "hex-hue-end"
|
|
2682
|
+
})], X.prototype, "hexHueEnd", void 0), A([O({
|
|
2683
|
+
type: Number,
|
|
2684
|
+
attribute: "hex-saturation"
|
|
2685
|
+
})], X.prototype, "hexSaturation", void 0), A([O({
|
|
2686
|
+
type: Number,
|
|
2687
|
+
attribute: "hex-scale"
|
|
2688
|
+
})], X.prototype, "hexScale", void 0), A([O({
|
|
2689
|
+
type: Array,
|
|
2690
|
+
attribute: "hex-colors",
|
|
2691
|
+
converter: k
|
|
2692
|
+
})], X.prototype, "hexColors", void 0), X = A([D("bb-hexagon-wave")], X);
|
|
2693
|
+
// src/components/liquidLines.ts
|
|
2694
|
+
var Z = class extends j {
|
|
2695
|
+
constructor(...e) {
|
|
2696
|
+
super(...e), this.lineCount = 20, this.lineAmplitude = 30, this.lineFrequency = .005, this.speed = .5, this.lineSpacing = 40, this.lineWidth = 2, this.lineHueStart = 200, this.lineHueEnd = 280, this.lineSaturation = 80, this.lineOffsetStep = .2, this.wiggleAmplitude = 20, this.wiggleSpeed = .3, this.lineColors = [], this.time = 0;
|
|
2697
|
+
}
|
|
2698
|
+
loop(e) {
|
|
2699
|
+
this.time += e, this.ctx.globalAlpha = this.trailOpacity, this.drawBackground(this.ctx), this.ctx.globalAlpha = 1;
|
|
2700
|
+
let t = this.height / 2 - this.lineCount * this.lineSpacing / 2;
|
|
2701
|
+
for (let e = 0; e < this.lineCount; e++) this.drawLine(e, t + e * this.lineSpacing);
|
|
2702
|
+
}
|
|
2703
|
+
drawLine(e, t) {
|
|
2704
|
+
let n = this.ctx, r = this.width / 99, i = e * this.lineOffsetStep;
|
|
2705
|
+
n.beginPath(), n.lineWidth = this.lineWidth;
|
|
2706
|
+
let a = e / this.lineCount, o = this.lineHueStart + (this.lineHueEnd - this.lineHueStart) * a, s = 40 + Math.sin(this.time * .001 + e * .5) * 10, c = this.lineColors && this.lineColors.length > 0 ? Tr(this.lineColors[e % this.lineColors.length]) : Tr(o, this.lineSaturation / 100, s / 100);
|
|
2707
|
+
this.lineColors && this.lineColors.length > 0 && (c.l = s / 100), n.strokeStyle = c.toString();
|
|
2708
|
+
for (let a = 0; a < 99; a++) {
|
|
2709
|
+
let o = a * r, s = Math.sin(o * this.lineFrequency + this.time * this.speed + i) * this.lineAmplitude, c = Math.sin(this.time * this.wiggleSpeed + i + e) * this.wiggleAmplitude, l = t + s + c, u = (a + 1) * r, d = Math.sin(u * this.lineFrequency + this.time * this.speed + i) * this.lineAmplitude, f = Math.sin(this.time * this.wiggleSpeed + i + e) * this.wiggleAmplitude, p = t + d + f, m = (o + u) / 2, h = (l + p) / 2;
|
|
2710
|
+
a === 0 && n.moveTo(o, l), n.quadraticCurveTo(o, l, m, h);
|
|
2711
|
+
}
|
|
2712
|
+
n.stroke();
|
|
2713
|
+
}
|
|
2714
|
+
};
|
|
2715
|
+
A([O({
|
|
2716
|
+
type: Number,
|
|
2717
|
+
attribute: "line-count"
|
|
2718
|
+
})], Z.prototype, "lineCount", void 0), A([O({
|
|
2719
|
+
type: Number,
|
|
2720
|
+
attribute: "line-amplitude"
|
|
2721
|
+
})], Z.prototype, "lineAmplitude", void 0), A([O({
|
|
2722
|
+
type: Number,
|
|
2723
|
+
attribute: "line-frequency"
|
|
2724
|
+
})], Z.prototype, "lineFrequency", void 0), A([O({
|
|
2725
|
+
type: Number,
|
|
2726
|
+
attribute: "speed"
|
|
2727
|
+
})], Z.prototype, "speed", void 0), A([O({
|
|
2728
|
+
type: Number,
|
|
2729
|
+
attribute: "line-spacing"
|
|
2730
|
+
})], Z.prototype, "lineSpacing", void 0), A([O({
|
|
2731
|
+
type: Number,
|
|
2732
|
+
attribute: "line-width"
|
|
2733
|
+
})], Z.prototype, "lineWidth", void 0), A([O({
|
|
2734
|
+
type: Number,
|
|
2735
|
+
attribute: "line-hue-start"
|
|
2736
|
+
})], Z.prototype, "lineHueStart", void 0), A([O({
|
|
2737
|
+
type: Number,
|
|
2738
|
+
attribute: "line-hue-end"
|
|
2739
|
+
})], Z.prototype, "lineHueEnd", void 0), A([O({
|
|
2740
|
+
type: Number,
|
|
2741
|
+
attribute: "line-saturation"
|
|
2742
|
+
})], Z.prototype, "lineSaturation", void 0), A([O({
|
|
2743
|
+
type: Number,
|
|
2744
|
+
attribute: "line-offset-step"
|
|
2745
|
+
})], Z.prototype, "lineOffsetStep", void 0), A([O({
|
|
2746
|
+
type: Number,
|
|
2747
|
+
attribute: "wiggle-amplitude"
|
|
2748
|
+
})], Z.prototype, "wiggleAmplitude", void 0), A([O({
|
|
2749
|
+
type: Number,
|
|
2750
|
+
attribute: "wiggle-speed"
|
|
2751
|
+
})], Z.prototype, "wiggleSpeed", void 0), A([O({
|
|
2752
|
+
type: Array,
|
|
2753
|
+
attribute: "line-colors",
|
|
2754
|
+
converter: k
|
|
2755
|
+
})], Z.prototype, "lineColors", void 0), Z = A([D("bb-liquid-lines")], Z);
|
|
2756
|
+
// src/Particle.ts
|
|
2757
|
+
var Ia = class {
|
|
2758
|
+
constructor(e) {
|
|
2759
|
+
this.initialized = !1, this.railFromX = 0, this.railFromY = 0, this.railToX = 0, this.railToY = 0, this.railProgress = 0, this.size = e.size, this.speed = e.speed, this.color = e.color, this.radius = e.radius ?? 1, this.angle = e.angle, this.lifespan = e.lifespan, this.force = e.force ?? 1, this.frequencyX = e.frequencyX ?? 1, this.frequencyY = e.frequencyY ?? 1, this.gridSides = e.gridSides ?? 6, this.gridSize = e.gridSize ?? 40, this.gridAngle = e.gridAngle ?? Math.PI / 2, this.x = e.x ?? 0, this.y = e.y ?? 0, this.px = this.x, this.py = this.y, this.born = Date.now(), this.fadeInDuration = this.lifespan * .25, this.fadeOutDuration = this.lifespan * .5;
|
|
2760
|
+
}
|
|
2761
|
+
circularMove(e, t, n) {
|
|
2762
|
+
this.angle += this.speed * n, this.radius += this.force * n;
|
|
2763
|
+
let r = e + Math.cos(this.angle * this.frequencyX) * this.radius, i = t + Math.sin(this.angle * this.frequencyY) * this.radius;
|
|
2764
|
+
this.initialized ? (this.px = this.x, this.py = this.y, this.x = r, this.y = i) : (this.x = r, this.y = i, this.px = r, this.py = i, this.initialized = !0);
|
|
2765
|
+
}
|
|
2766
|
+
sinusMove(e, t, n) {
|
|
2767
|
+
this.angle += this.speed * n;
|
|
2768
|
+
let r = e + this.angle * 100, i = t + Math.sin(this.angle * this.frequencyY) * this.radius;
|
|
2769
|
+
this.initialized ? (this.px = this.x, this.py = this.y, this.x = r, this.y = i) : (this.x = r, this.y = i, this.px = r, this.py = i, this.initialized = !0);
|
|
2770
|
+
}
|
|
2771
|
+
draw(e) {
|
|
2772
|
+
e.globalAlpha = this.calculateOpacity(), e.beginPath(), e.lineCap = "round", e.lineWidth = this.size * 2, e.strokeStyle = this.color, e.moveTo(this.px, this.py), e.lineTo(this.x, this.y), e.stroke(), e.globalAlpha = 1;
|
|
2773
|
+
}
|
|
2774
|
+
isDead() {
|
|
2775
|
+
return Date.now() - this.born > this.lifespan;
|
|
2776
|
+
}
|
|
2777
|
+
railMove(e, t, n) {
|
|
2778
|
+
if (!this.initialized) {
|
|
2779
|
+
let n = this.x, r = this.y, i = this.snapToGrid(n, r, e, t);
|
|
2780
|
+
this.railFromX = i.x, this.railFromY = i.y, this.pickNextRailTarget(), this.x = this.railFromX, this.y = this.railFromY, this.px = this.x, this.py = this.y, this.initialized = !0, this.railProgress = 0;
|
|
2781
|
+
}
|
|
2782
|
+
let r = Math.abs(this.speed) * 20;
|
|
2783
|
+
this.railProgress += r / this.gridSize * n, this.railProgress >= 1 && (--this.railProgress, this.railFromX = this.railToX, this.railFromY = this.railToY, this.pickNextRailTarget());
|
|
2784
|
+
let i = this.railToX - this.railFromX, a = this.railToY - this.railFromY, o = this.railFromX + i * this.railProgress, s = this.railFromY + a * this.railProgress;
|
|
2785
|
+
this.updatePosition(o, s);
|
|
2786
|
+
}
|
|
2787
|
+
pickNextRailTarget() {
|
|
2788
|
+
let e = Math.PI * 2 / this.gridSides, t = Math.floor(Math.random() * this.gridSides) * e + this.gridAngle;
|
|
2789
|
+
this.railToX = this.railFromX + Math.cos(t) * this.gridSize, this.railToY = this.railFromY + Math.sin(t) * this.gridSize;
|
|
2790
|
+
}
|
|
2791
|
+
snapToGrid(e, t, n, r) {
|
|
2792
|
+
let i = e - n, a = t - r, o = Math.cos(-this.gridAngle), s = Math.sin(-this.gridAngle), c = i * o - a * s, l = i * s + a * o, u = c, d = l, f = this.gridSize;
|
|
2793
|
+
if (this.gridSides === 6 || this.gridSides === 3) {
|
|
2794
|
+
let e = f * Math.sqrt(3) / 2, t = Math.round(l / e);
|
|
2795
|
+
u = Math.round((c - t * f / 2) / f) * f + t * f / 2, d = t * e;
|
|
2796
|
+
} else this.gridSides === 4 && (u = Math.round(c / f) * f, d = Math.round(l / f) * f);
|
|
2797
|
+
let p = u * Math.cos(this.gridAngle) - d * Math.sin(this.gridAngle), m = u * Math.sin(this.gridAngle) + d * Math.cos(this.gridAngle);
|
|
2798
|
+
return {
|
|
2799
|
+
x: p + n,
|
|
2800
|
+
y: m + r
|
|
2801
|
+
};
|
|
2802
|
+
}
|
|
2803
|
+
updatePosition(e, t) {
|
|
2804
|
+
this.initialized ? (this.px = this.x, this.py = this.y, this.x = e, this.y = t) : (this.x = e, this.y = t, this.px = e, this.py = t, this.initialized = !0);
|
|
2805
|
+
}
|
|
2806
|
+
calculateOpacity() {
|
|
2807
|
+
let e = Date.now() - this.born;
|
|
2808
|
+
return e < this.fadeInDuration ? e / this.fadeInDuration : e > this.lifespan - this.fadeOutDuration ? (this.lifespan - e) / this.fadeOutDuration : 1;
|
|
2809
|
+
}
|
|
2810
|
+
}, Q = class extends j {
|
|
2811
|
+
constructor(...e) {
|
|
2812
|
+
super(...e), this.particleSizeMin = 1, this.particleSizeMax = 1, this.particleSpeedMin = -30, this.particleSpeedMax = 30, this.particleColorHueStart = 130, this.particleColorHueEnd = 300, this.particleColorSaturationStart = 100, this.particleColorSaturationEnd = 100, this.particleColorLightnessStart = 50, this.particleColorLightnessEnd = 0, this.particleLifespanMin = 100, this.particleLifespanMax = 5e4, this.particleAmount = 2e3, this.gridSides = 3, this.gridSize = 60, this.gridAngle = Math.PI / 2, this.particleColors = [], this.particles = [], this.trailOpacity = .0125;
|
|
2813
|
+
}
|
|
2814
|
+
initialize() {
|
|
2815
|
+
this.particles = [], this.drawBackground(this.ctx);
|
|
2816
|
+
for (let e = 0; e < this.particleAmount; e++) this.particles.push(this.createParticle());
|
|
2817
|
+
}
|
|
2818
|
+
loop(e) {
|
|
2819
|
+
for (this.ctx.globalAlpha = this.trailOpacity, this.drawBackground(this.ctx), this.ctx.globalAlpha = 1, this.particles = this.particles.filter((e) => !e.isDead()); this.particles.length < this.particleAmount;) this.particles.push(this.createParticle());
|
|
2820
|
+
this.particles.forEach((t) => {
|
|
2821
|
+
t.railMove(this.width / 2, this.height / 2, e), t.draw(this.ctx);
|
|
2822
|
+
});
|
|
2823
|
+
}
|
|
2824
|
+
createParticle() {
|
|
2825
|
+
let e = M(this.particleSizeMin, this.particleSizeMax), t = M(this.particleSpeedMin, this.particleSpeedMax), n = M(this.particleLifespanMin, this.particleLifespanMax), r;
|
|
2826
|
+
r = this.particleColors && this.particleColors.length > 0 ? this.particleColors[Math.floor(Math.random() * this.particleColors.length)] : He([this.particleColorHueStart, this.particleColorHueEnd], [this.particleColorSaturationStart, this.particleColorSaturationEnd], [this.particleColorLightnessStart, this.particleColorLightnessEnd]);
|
|
2827
|
+
let i = M(0, this.width), a = M(0, this.height), o = i - this.width / 2, s = a - this.height / 2;
|
|
2828
|
+
return new Ia({
|
|
2829
|
+
size: e,
|
|
2830
|
+
speed: t,
|
|
2831
|
+
color: r,
|
|
2832
|
+
angle: Math.atan2(s, o),
|
|
2833
|
+
lifespan: n,
|
|
2834
|
+
gridSides: this.gridSides,
|
|
2835
|
+
gridSize: this.gridSize,
|
|
2836
|
+
gridAngle: this.gridAngle,
|
|
2837
|
+
x: i,
|
|
2838
|
+
y: a
|
|
2839
|
+
});
|
|
2840
|
+
}
|
|
2841
|
+
};
|
|
2842
|
+
A([O({
|
|
2843
|
+
type: Number,
|
|
2844
|
+
attribute: "particle-size-min"
|
|
2845
|
+
})], Q.prototype, "particleSizeMin", void 0), A([O({
|
|
2846
|
+
type: Number,
|
|
2847
|
+
attribute: "particle-size-max"
|
|
2848
|
+
})], Q.prototype, "particleSizeMax", void 0), A([O({
|
|
2849
|
+
type: Number,
|
|
2850
|
+
attribute: "particle-speed-min"
|
|
2851
|
+
})], Q.prototype, "particleSpeedMin", void 0), A([O({
|
|
2852
|
+
type: Number,
|
|
2853
|
+
attribute: "particle-speed-max"
|
|
2854
|
+
})], Q.prototype, "particleSpeedMax", void 0), A([O({
|
|
2855
|
+
type: Number,
|
|
2856
|
+
attribute: "particle-color-hue-start"
|
|
2857
|
+
})], Q.prototype, "particleColorHueStart", void 0), A([O({
|
|
2858
|
+
type: Number,
|
|
2859
|
+
attribute: "particle-color-hue-end"
|
|
2860
|
+
})], Q.prototype, "particleColorHueEnd", void 0), A([O({
|
|
2861
|
+
type: Number,
|
|
2862
|
+
attribute: "particle-color-saturation-start"
|
|
2863
|
+
})], Q.prototype, "particleColorSaturationStart", void 0), A([O({
|
|
2864
|
+
type: Number,
|
|
2865
|
+
attribute: "particle-color-saturation-end"
|
|
2866
|
+
})], Q.prototype, "particleColorSaturationEnd", void 0), A([O({
|
|
2867
|
+
type: Number,
|
|
2868
|
+
attribute: "particle-color-lightness-start"
|
|
2869
|
+
})], Q.prototype, "particleColorLightnessStart", void 0), A([O({
|
|
2870
|
+
type: Number,
|
|
2871
|
+
attribute: "particle-color-lightness-end"
|
|
2872
|
+
})], Q.prototype, "particleColorLightnessEnd", void 0), A([O({
|
|
2873
|
+
type: Number,
|
|
2874
|
+
attribute: "particle-lifespan-min"
|
|
2875
|
+
})], Q.prototype, "particleLifespanMin", void 0), A([O({
|
|
2876
|
+
type: Number,
|
|
2877
|
+
attribute: "particle-lifespan-max"
|
|
2878
|
+
})], Q.prototype, "particleLifespanMax", void 0), A([O({
|
|
2879
|
+
type: Number,
|
|
2880
|
+
attribute: "particle-amount"
|
|
2881
|
+
})], Q.prototype, "particleAmount", void 0), A([O({
|
|
2882
|
+
type: Number,
|
|
2883
|
+
attribute: "grid-sides"
|
|
2884
|
+
})], Q.prototype, "gridSides", void 0), A([O({
|
|
2885
|
+
type: Number,
|
|
2886
|
+
attribute: "grid-size"
|
|
2887
|
+
})], Q.prototype, "gridSize", void 0), A([O({
|
|
2888
|
+
type: Number,
|
|
2889
|
+
attribute: "grid-angle"
|
|
2890
|
+
})], Q.prototype, "gridAngle", void 0), A([O({
|
|
2891
|
+
type: Array,
|
|
2892
|
+
attribute: "particle-colors",
|
|
2893
|
+
converter: k
|
|
2894
|
+
})], Q.prototype, "particleColors", void 0), A([O({
|
|
2895
|
+
type: Number,
|
|
2896
|
+
attribute: "trail-opacity"
|
|
2897
|
+
})], Q.prototype, "trailOpacity", void 0), Q = A([D("bb-neon-rails")], Q);
|
|
2898
|
+
// src/components/startTrail.ts
|
|
2899
|
+
var $ = class extends j {
|
|
2900
|
+
constructor(...e) {
|
|
2901
|
+
super(...e), this.particleForce = 0, this.particleSizeMin = .5, this.particleSizeMax = 1.5, this.particleSpeedMin = .025, this.particleSpeedMax = .05, this.particleColorHueStart = 30, this.particleColorHueEnd = 75, this.particleColorSaturationStart = 100, this.particleColorSaturationEnd = 100, this.particleColorLightnessStart = 50, this.particleColorLightnessEnd = 50, this.particleRadiusMin = 1, this.particleRadiusMax = 100, this.particleLifespanMin = 1e3, this.particleLifespanMax = 1e4, this.particleAmount = 1e3, this.gridSides = 6, this.gridSize = 40, this.gridAngle = 0, this.particleColors = [], this.particles = [];
|
|
2902
|
+
}
|
|
2903
|
+
initialize() {
|
|
2904
|
+
this.particles = [], this.drawBackground(this.ctx), this.particleRadiusMax = this.particleRadiusMax || this.width;
|
|
2905
|
+
for (let e = 0; e < this.particleAmount; e++) this.particles.push(this.createParticle());
|
|
2906
|
+
}
|
|
2907
|
+
loop(e) {
|
|
2908
|
+
for (this.ctx.globalAlpha = this.trailOpacity, this.drawBackground(this.ctx), this.ctx.globalAlpha = 1, this.particles = this.particles.filter((e) => !e.isDead()); this.particles.length < this.particleAmount;) this.particles.push(this.createParticle());
|
|
2909
|
+
this.particles.forEach((t) => {
|
|
2910
|
+
t.circularMove(this.width / 2, this.height / 2, e), t.draw(this.ctx);
|
|
2911
|
+
});
|
|
2912
|
+
}
|
|
2913
|
+
createParticle() {
|
|
2914
|
+
let e = M(this.particleSizeMin, this.particleSizeMax), t = M(this.particleSpeedMin, this.particleSpeedMax), n = M(this.particleLifespanMin, this.particleLifespanMax), r;
|
|
2915
|
+
r = this.particleColors && this.particleColors.length > 0 ? this.particleColors[Math.floor(Math.random() * this.particleColors.length)] : He([this.particleColorHueStart, this.particleColorHueEnd], [this.particleColorSaturationStart, this.particleColorSaturationEnd], [this.particleColorLightnessStart, this.particleColorLightnessEnd]);
|
|
2916
|
+
let i = M(0, Math.PI * 2), a = this.particleRadiusMax - this.particleRadiusMin, o = Math.sqrt(Math.random()) * a + this.particleRadiusMin;
|
|
2917
|
+
return new Ia({
|
|
2918
|
+
size: e,
|
|
2919
|
+
speed: t,
|
|
2920
|
+
color: r,
|
|
2921
|
+
radius: o,
|
|
2922
|
+
angle: i,
|
|
2923
|
+
lifespan: n,
|
|
2924
|
+
gridSides: this.gridSides,
|
|
2925
|
+
gridSize: this.gridSize,
|
|
2926
|
+
gridAngle: this.gridAngle,
|
|
2927
|
+
force: this.particleForce
|
|
2928
|
+
});
|
|
2929
|
+
}
|
|
2930
|
+
};
|
|
2931
|
+
A([O({
|
|
2932
|
+
type: Number,
|
|
2933
|
+
attribute: "particle-force"
|
|
2934
|
+
})], $.prototype, "particleForce", void 0), A([O({
|
|
2935
|
+
type: Number,
|
|
2936
|
+
attribute: "particle-size-min"
|
|
2937
|
+
})], $.prototype, "particleSizeMin", void 0), A([O({
|
|
2938
|
+
type: Number,
|
|
2939
|
+
attribute: "particle-size-max"
|
|
2940
|
+
})], $.prototype, "particleSizeMax", void 0), A([O({
|
|
2941
|
+
type: Number,
|
|
2942
|
+
attribute: "particle-speed-min"
|
|
2943
|
+
})], $.prototype, "particleSpeedMin", void 0), A([O({
|
|
2944
|
+
type: Number,
|
|
2945
|
+
attribute: "particle-speed-max"
|
|
2946
|
+
})], $.prototype, "particleSpeedMax", void 0), A([O({
|
|
2947
|
+
type: Number,
|
|
2948
|
+
attribute: "particle-color-hue-start"
|
|
2949
|
+
})], $.prototype, "particleColorHueStart", void 0), A([O({
|
|
2950
|
+
type: Number,
|
|
2951
|
+
attribute: "particle-color-hue-end"
|
|
2952
|
+
})], $.prototype, "particleColorHueEnd", void 0), A([O({
|
|
2953
|
+
type: Number,
|
|
2954
|
+
attribute: "particle-color-saturation-start"
|
|
2955
|
+
})], $.prototype, "particleColorSaturationStart", void 0), A([O({
|
|
2956
|
+
type: Number,
|
|
2957
|
+
attribute: "particle-color-saturation-end"
|
|
2958
|
+
})], $.prototype, "particleColorSaturationEnd", void 0), A([O({
|
|
2959
|
+
type: Number,
|
|
2960
|
+
attribute: "particle-color-lightness-start"
|
|
2961
|
+
})], $.prototype, "particleColorLightnessStart", void 0), A([O({
|
|
2962
|
+
type: Number,
|
|
2963
|
+
attribute: "particle-color-lightness-end"
|
|
2964
|
+
})], $.prototype, "particleColorLightnessEnd", void 0), A([O({
|
|
2965
|
+
type: Number,
|
|
2966
|
+
attribute: "particle-radius-min"
|
|
2967
|
+
})], $.prototype, "particleRadiusMin", void 0), A([O({
|
|
2968
|
+
type: Number,
|
|
2969
|
+
attribute: "particle-radius-max"
|
|
2970
|
+
})], $.prototype, "particleRadiusMax", void 0), A([O({
|
|
2971
|
+
type: Number,
|
|
2972
|
+
attribute: "particle-lifespan-min"
|
|
2973
|
+
})], $.prototype, "particleLifespanMin", void 0), A([O({
|
|
2974
|
+
type: Number,
|
|
2975
|
+
attribute: "particle-lifespan-max"
|
|
2976
|
+
})], $.prototype, "particleLifespanMax", void 0), A([O({
|
|
2977
|
+
type: Number,
|
|
2978
|
+
attribute: "particle-amount"
|
|
2979
|
+
})], $.prototype, "particleAmount", void 0), A([O({
|
|
2980
|
+
type: Number,
|
|
2981
|
+
attribute: "grid-sides"
|
|
2982
|
+
})], $.prototype, "gridSides", void 0), A([O({
|
|
2983
|
+
type: Number,
|
|
2984
|
+
attribute: "grid-size"
|
|
2985
|
+
})], $.prototype, "gridSize", void 0), A([O({
|
|
2986
|
+
type: Number,
|
|
2987
|
+
attribute: "grid-angle"
|
|
2988
|
+
})], $.prototype, "gridAngle", void 0), A([O({
|
|
2989
|
+
type: Array,
|
|
2990
|
+
attribute: "particle-colors",
|
|
2991
|
+
converter: k
|
|
2992
|
+
})], $.prototype, "particleColors", void 0), $ = A([D("bb-star-trail")], $);
|
|
2993
|
+
export { N as BbAmbientRibbon, P as BbConcentricPulse, F as BbDigitalRain, X as BbHexagonWave, Z as BbLiquidLines, Q as BbNeonRails, $ as BbStarTrail, j as BeautifulBackground };
|
|
2994
|
+
|
|
2995
|
+
//# sourceMappingURL=bb.es.js.map
|