beautiful-backgrounds 1.1.0 → 2.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/build/bb.es.js CHANGED
@@ -1,2995 +1,49 @@
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`
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const 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;var i=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,n=this.t;if(t&&e===void 0){let t=n!==void 0&&n.length===1;t&&(e=r.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),t&&r.set(n,e))}return e}toString(){return this.cssText}};const 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=>{if(!0===e._$cssResult$)return e.cssText;if(typeof e==`number`)return e;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.`)})(n)+e[r+1],e[0]),e,n),s=(n,r)=>{if(t)n.adoptedStyleSheets=r.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let t of r){let r=document.createElement(`style`),i=e.litNonce;i!==void 0&&r.setAttribute(`nonce`,i),r.textContent=t.cssText,n.appendChild(r)}},c=t?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t=``;for(let n of e.cssRules)t+=n.cssText;return a(t)})(e):e,{is:l,defineProperty:u,getOwnPropertyDescriptor:d,getOwnPropertyNames:f,getOwnPropertySymbols:p,getPrototypeOf:ee}=Object,m=globalThis,te=m.trustedTypes,ne=te?te.emptyScript:``,re=m.reactiveElementPolyfillSupport,h=(e,t)=>e,g={toAttribute(e,t){
7
+ /**
8
+ * @license
9
+ * Copyright 2017 Google LLC
10
+ * SPDX-License-Identifier: BSD-3-Clause
11
+ */
12
+ switch(t){case Boolean:e=e?ne:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},ie=(e,t)=>!l(e,t),ae={attribute:!0,type:String,converter:g,reflect:!1,useDefault:!1,hasChanged:ie};Symbol.metadata??=Symbol(`metadata`),m.litPropertyMetadata??=/* @__PURE__ */ new WeakMap;var _=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ae){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){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&u(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=d(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ae}static _$Ei(){if(this.hasOwnProperty(h(`elementProperties`)))return;let e=ee(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(h(`finalized`)))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(h(`properties`))){let e=this.properties,t=[...f(e),...p(e)];for(let n of t)this.createProperty(n,e[n])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=/* @__PURE__ */ new Map;for(let[e,t]of this.elementProperties){let n=this._$Eu(e,t);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let e of n)t.unshift(c(e))}else e!==void 0&&t.push(c(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:typeof n==`string`?n:typeof e==`string`?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=/* @__PURE__ */ new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=/* @__PURE__ */ new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=/* @__PURE__ */ new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(r!==void 0&&!0===n.reflect){let i=(n.converter?.toAttribute===void 0?g:n.converter).toAttribute(t,n.type);this._$Em=e,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let e=n.getPropertyOptions(r),i=typeof e.converter==`function`?{fromAttribute:e.converter}:e.converter?.fromAttribute===void 0?g:e.converter;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(e!==void 0){let a=this.constructor;if(!1===r&&(i=this[e]),n??=a.getPropertyOptions(e),!((n.hasChanged??ie)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){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))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||r===void 0||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=/* @__PURE__ */ new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}};_.elementStyles=[],_.shadowRootOptions={mode:`open`},_[h(`elementProperties`)]=/* @__PURE__ */ new Map,_[h(`finalized`)]=/* @__PURE__ */ new Map,re?.({ReactiveElement:_}),(m.reactiveElementVersions??=[]).push(`2.1.2`);
13
+ /**
14
+ * @license
15
+ * Copyright 2017 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
17
+ */
18
+ const oe=globalThis,se=e=>e,v=oe.trustedTypes,ce=v?v.createPolicy(`lit-html`,{createHTML:e=>e}):void 0,le=`$lit$`,y=`lit$${Math.random().toFixed(9).slice(2)}$`,ue=`?`+y,de=`<${ue}>`,b=document,x=()=>b.createComment(``),S=e=>e===null||typeof e!=`object`&&typeof e!=`function`,fe=Array.isArray,pe=e=>fe(e)||typeof e?.[Symbol.iterator]==`function`,me=`[
19
+ \f\r]`,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,he=/-->/g,ge=/>/g,w=RegExp(`>|${me}(?:([^\\s"'>=/]+)(${me}*=${me}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,`g`),_e=/'/g,ve=/"/g,ye=/^(?:script|style|textarea|title)$/i,T=Symbol.for(`lit-noChange`),E=Symbol.for(`lit-nothing`),be=/* @__PURE__ */ new WeakMap,D=b.createTreeWalker(b,129);function xe(e,t){if(!fe(e)||!e.hasOwnProperty(`raw`))throw Error(`invalid template strings array`);return ce===void 0?t:ce.createHTML(t)}const Se=(e,t)=>{let n=e.length-1,r=[],i,a=t===2?`<svg>`:t===3?`<math>`:``,o=C;for(let t=0;t<n;t++){let n=e[t],s,c,l=-1,u=0;for(;u<n.length&&(o.lastIndex=u,c=o.exec(n),c!==null);)u=o.lastIndex,o===C?c[1]===`!--`?o=he:c[1]===void 0?c[2]===void 0?c[3]!==void 0&&(o=w):(ye.test(c[2])&&(i=RegExp(`</`+c[2],`g`)),o=w):o=ge:o===w?c[0]===`>`?(o=i??C,l=-1):c[1]===void 0?l=-2:(l=o.lastIndex-c[2].length,s=c[1],o=c[3]===void 0?w:c[3]===`"`?ve:_e):o===ve||o===_e?o=w:o===he||o===ge?o=C:(o=w,i=void 0);let d=o===w&&e[t+1].startsWith(`/>`)?` `:``;a+=o===C?n+de:l>=0?(r.push(s),n.slice(0,l)+le+n.slice(l)+y+d):n+y+(l===-2?t:d)}return[xe(e,a+(e[n]||`<?>`)+(t===2?`</svg>`:t===3?`</math>`:``)),r]};var Ce=class e{constructor({strings:t,_$litType$:n},r){let i;this.parts=[];let a=0,o=0,s=t.length-1,c=this.parts,[l,u]=Se(t,n);if(this.el=e.createElement(l,r),D.currentNode=this.el.content,n===2||n===3){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;(i=D.nextNode())!==null&&c.length<s;){if(i.nodeType===1){if(i.hasAttributes())for(let e of i.getAttributeNames())if(e.endsWith(le)){let t=u[o++],n=i.getAttribute(e).split(y),r=/([.?@])?(.*)/.exec(t);c.push({type:1,index:a,name:r[2],strings:n,ctor:r[1]===`.`?Ee:r[1]===`?`?De:r[1]===`@`?Oe:k}),i.removeAttribute(e)}else e.startsWith(y)&&(c.push({type:6,index:a}),i.removeAttribute(e));if(ye.test(i.tagName)){let e=i.textContent.split(y),t=e.length-1;if(t>0){i.textContent=v?v.emptyScript:``;for(let n=0;n<t;n++)i.append(e[n],x()),D.nextNode(),c.push({type:2,index:++a});i.append(e[t],x())}}}else if(i.nodeType===8){if(i.data===ue)c.push({type:2,index:a});else{let e=-1;for(;(e=i.data.indexOf(y,e+1))!==-1;)c.push({type:7,index:a}),e+=y.length-1}}a++}}static createElement(e,t){let n=b.createElement(`template`);return n.innerHTML=e,n}};function O(e,t,n=e,r){if(t===T)return t;let i=r===void 0?n._$Cl:n._$Co?.[r],a=S(t)?void 0:t._$litDirective$;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=O(e,i._$AS(e,t.values),i,r)),t}var we=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??b).importNode(t,!0);D.currentNode=r;let i=D.nextNode(),a=0,o=0,s=n[0];for(;s!==void 0;){if(a===s.index){let t;s.type===2?t=new Te(i,i.nextSibling,this,e):s.type===1?t=new s.ctor(i,s.name,s.strings,this,e):s.type===6&&(t=new ke(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=D.nextNode(),a++)}return D.currentNode=b,r}p(e){let t=0;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++}},Te=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=O(this,e,t),S(e)?e===E||e==null||e===``?(this._$AH!==E&&this._$AR(),this._$AH=E):e!==this._$AH&&e!==T&&this._(e):e._$litType$===void 0?e.nodeType===void 0?pe(e)?this.k(e):this._(e):this.T(e):this.$(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==E&&S(this._$AH)?this._$AA.nextSibling.data=e:this.T(b.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n==`number`?this._$AC(e):(n.el===void 0&&(n.el=Ce.createElement(xe(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new we(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=be.get(e.strings);return t===void 0&&be.set(e.strings,t=new Ce(e)),t}k(t){fe(this._$AH)||(this._$AH=[],this._$AR());let n=this._$AH,r,i=0;for(let a of t)i===n.length?n.push(r=new e(this.O(x()),this.O(x()),this,this.options)):r=n[i],r._$AI(a),i++;i<n.length&&(this._$AR(r&&r._$AB.nextSibling,i),n.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=se(e).nextSibling;se(e).remove(),e=t}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},k=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=E,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=E}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(i===void 0)e=O(this,e,t,0),a=!S(e)||e!==this._$AH&&e!==T,a&&(this._$AH=e);else{let r=e,o,s;for(e=i[0],o=0;o<i.length-1;o++)s=O(this,r[n+o],t,o),s===T&&(s=this._$AH[o]),a||=!S(s)||s!==this._$AH[o],s===E?e=E:e!==E&&(e+=(s??``)+i[o+1]),this._$AH[o]=s}a&&!r&&this.j(e)}j(e){e===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??``)}},Ee=class extends k{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===E?void 0:e}},De=class extends k{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==E)}},Oe=class extends k{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}_$AI(e,t=this){if((e=O(this,e,t,0)??E)===T)return;let n=this._$AH,r=e===E&&n!==E||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==E&&(n===E||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH==`function`?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ke=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){O(this,e)}};const Ae=oe.litHtmlPolyfillSupport;Ae?.(Ce,Te),(oe.litHtmlVersions??=[]).push(`3.3.3`);const je=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(i===void 0){let e=n?.renderBefore??null;r._$litPart$=i=new Te(t.insertBefore(x(),e),e,void 0,n??{})}return i._$AI(e),i},Me=globalThis
20
+ /**
21
+ * @license
22
+ * Copyright 2017 Google LLC
23
+ * SPDX-License-Identifier: BSD-3-Clause
24
+ */
25
+ ;var A=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=je(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return T}};A._$litElement$=!0,A.finalized=!0,Me.litElementHydrateSupport?.({LitElement:A});const Ne=Me.litElementPolyfillSupport;Ne?.({LitElement:A}),(Me.litElementVersions??=[]).push(`4.2.2`);
26
+ /**
27
+ * @license
28
+ * Copyright 2017 Google LLC
29
+ * SPDX-License-Identifier: BSD-3-Clause
30
+ */
31
+ const j=e=>(t,n)=>{n===void 0?customElements.define(e,t):n.addInitializer(()=>{customElements.define(e,t)})},Pe={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:ie},Fe=(e=Pe,t,n)=>{
32
+ /**
33
+ * @license
34
+ * Copyright 2017 Google LLC
35
+ * SPDX-License-Identifier: BSD-3-Clause
36
+ */
37
+ let{kind:r,metadata:i}=n,a=globalThis.litPropertyMetadata.get(i);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`){let{name:r}=n;return{set(n){let i=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,i,e,!0,n)},init(t){return t!==void 0&&this.C(r,void 0,e,t),t}}}if(r===`setter`){let{name:r}=n;return function(n){let i=this[r];t.call(this,n),this.requestUpdate(r,i,e,!0,n)}}throw Error(`Unsupported decorator location: `+r)};function M(e){return(t,n)=>typeof n==`object`?Fe(e,t,n):((e,t,n)=>{let r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}
38
+ /**
39
+ * @license
40
+ * Copyright 2017 Google LLC
41
+ * SPDX-License-Identifier: BSD-3-Clause
42
+ */
43
+ function Ie(e,t){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(this,r),t)}}const N={fromAttribute:e=>e?e.split(`,`).map(e=>e.trim()).filter(Boolean):[],toAttribute:e=>e.join(`,`)};function P(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);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);return i>3&&a&&Object.defineProperty(t,n,a),a}var F=class extends A{constructor(){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.cleanTrail=!0,this.fadeMasks=[],this.fadeTurn=0,this.handleVisibilityChange=()=>{document.visibilityState===`hidden`?this.stopAnimation():this.startAnimation()},this.canvas=document.createElement(`canvas`),this.ctx=this.canvas.getContext(`2d`),this.debouncedResize=Ie(this.resizeCanvas.bind(this),100)}firstUpdated(){this.shadowRoot.appendChild(this.canvas),this.resizeCanvas(),this.initialize(),this.startAnimation(),window.addEventListener(`resize`,this.debouncedResize),document.addEventListener(`visibilitychange`,this.handleVisibilityChange)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(`resize`,this.debouncedResize),document.removeEventListener(`visibilitychange`,this.handleVisibilityChange),this.stopAnimation()}updated(e){super.updated(e),this.canvas.style.background=this.cleanTrail?this.cssBackground():``}drawBackground(e){this.cleanTrail?e.clearRect(0,0,this.width,this.height):(e.fillStyle=this.backgroundGradient(e),e.fillRect(0,0,this.width,this.height))}fadeTrail(){this.cleanTrail?this.fadeTrailCleanly():(this.ctx.globalAlpha=this.trailOpacity,this.drawBackground(this.ctx),this.ctx.globalAlpha=1)}fadeTrailCleanly(){if(this.trailOpacity<=0)return;let e=Math.max(this.trailOpacity,.1),t=Math.round(e/this.trailOpacity);this.fadeMasks.length!==t&&(this.fadeMasks=Le(this.ctx,t));let n=this.ctx;n.save(),n.globalCompositeOperation=`destination-out`,n.globalAlpha=Math.min(1,e),n.fillStyle=this.fadeMasks[this.fadeTurn++%t],n.fillRect(0,0,this.width,this.height),n.restore()}cssBackground(){let e=this.bgColors.length>0?this.bgColors:[`#000`];return e.length===1?e[0]:`linear-gradient(${this.bgAngle+90}deg, ${e.join(`, `)})`}backgroundGradient(e){let t=this.bgAngle*Math.PI/180,n=Math.cos(t),r=Math.sin(t),i=(Math.abs(this.width*n)+Math.abs(this.height*r))/2,a=this.width/2,o=this.height/2,s=e.createLinearGradient(a-n*i,o-r*i,a+n*i,o+r*i),c=this.bgColors.length>0?this.bgColors:[`#000`,`#000`];try{c.forEach((e,t)=>{s.addColorStop(t/(c.length-1||1),e)})}catch{s.addColorStop(0,`#000`),s.addColorStop(1,`#000`)}return s}resizeCanvas(){let e=this.getBoundingClientRect(),t=window.devicePixelRatio||1;(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))}initialize(){}startAnimation(){if(this.animationFrameId!==null)return;let e=performance.now(),t=n=>{let r=Math.max(0,n-e)/1e3;e=n,this.loop(r),this.animationFrameId=requestAnimationFrame(t)};this.animationFrameId=requestAnimationFrame(t)}stopAnimation(){this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}static{this.styles=o`
608
44
  :host {
609
45
  border-radius: inherit;
610
46
  display: flex;
611
47
  }
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
-
48
+ `}render(){}};P([M({type:Array,attribute:`bg-colors`,converter:N})],F.prototype,`bgColors`,void 0),P([M({type:Number,attribute:`bg-angle`})],F.prototype,`bgAngle`,void 0),P([M({type:String,attribute:`background-color`})],F.prototype,`backgroundColor`,void 0),P([M({type:Number,attribute:`trail-opacity`})],F.prototype,`trailOpacity`,void 0),P([M({attribute:`clean-trail`,converter:e=>e!==`false`})],F.prototype,`cleanTrail`,void 0);function Le(e,t){let n=Array.from({length:4096},()=>Math.floor(Math.random()*t));return Array.from({length:t},(t,r)=>{let i=new ImageData(64,64);n.forEach((e,t)=>{e===r&&(i.data[t*4+3]=255)});let a=document.createElement(`canvas`);return a.width=a.height=64,a.getContext(`2d`).putImageData(i,0,0),e.createPattern(a,`repeat`)})}function I(e,t){return Math.random()*(t-e)+e}function L(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1)+e)}let R=null;function Re(e=[0,360],t=[0,100],n=[40,60]){return`hsl(${L(e[0],e[1])}, ${L(t[0],t[1])}%, ${L(n[0],n[1])}%)`}function ze(e,t,n,r){return`hsla(${e}, ${t}%, ${n}%, ${r})`}function Be(e){let[t,n,r]=z(e).map(e=>e/255),i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2,s=i-a;if(s===0)return{h:0,s:0,l:o};let c=s/(1-Math.abs(2*o-1)),l;return l=i===t?((n-r)/s+6)%6:i===n?(r-t)/s+2:(t-n)/s+4,{h:l*60,s:c,l:o}}function Ve(e,t){let n=e.map(z);return Array.from({length:t},(e,r)=>{let i=r/(t-1)*(n.length-1),a=Math.floor(i),o=n[a],s=n[a+1]??o;return`rgb(${o.map((e,t)=>Math.round(e+(s[t]-e)*(i-a))).join(`, `)})`})}function z(e){R??=document.createElement(`canvas`).getContext(`2d`),R.fillStyle=`#000`,R.fillStyle=e;let t=String(R.fillStyle);return t.startsWith(`#`)?[1,3,5].map(e=>parseInt(t.slice(e,e+2),16)):t.match(/[\d.]+/g).slice(0,3).map(Number)}function B(e,t){let n=2/e.getTransform().a,r=e.globalAlpha;e.lineWidth=Math.max(t,n),e.globalAlpha=r*Math.min(1,Math.max(0,t)/n),e.stroke(),e.globalAlpha=r}var He=class{constructor(e,t){this.speed=[],this.lines=[],this.angle=[I(0,Math.PI*2),I(0,Math.PI*2),I(0,Math.PI*2),I(0,Math.PI*2)];let n=()=>Math.random()>.5?1:-1;this.speedSeeds=[Math.random(),Math.random(),Math.random(),Math.random()],this.speedSigns=[n(),n(),n(),n()],this.updateSpeeds(e,t)}updateSpeeds(e,t){this.speed=this.speedSeeds.map((n,r)=>this.speedSigns[r]*(e+n*(t-e)))}update(e){this.angle[0]+=this.speed[0],this.angle[1]+=this.speed[1],this.angle[2]+=this.speed[2],this.angle[3]+=this.speed[3];let t=[Math.sin(this.angle[0]),Math.sin(this.angle[1]),Math.sin(this.angle[2]),Math.sin(this.angle[3])];this.lines.push(t),this.lines.length>e&&this.lines.shift()}};let V=class extends F{constructor(...e){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=[]}initialize(){this.ribbons=[];for(let e=0;e<this.ribbonCount;e++)this.ribbons.push(new He(this.ribbonSpeedMin,this.ribbonSpeedMax));for(let e=0;e<this.ribbonCount;e++)for(let t=0;t<this.ribbonWidth;t++)this.ribbons[e].update(this.ribbonWidth)}updated(e){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=>{e.lines.length>this.ribbonWidth&&(e.lines=e.lines.slice(-this.ribbonWidth))})}loop(){this.ctx.clearRect(0,0,this.width,this.height),this.drawBackground(this.ctx),this.ribbons.forEach(e=>{e.update(this.ribbonWidth),e.lines.forEach((t,n)=>{let r=n/(e.lines.length-1||1);this.ctx.strokeStyle=this.lineColor(r),this.drawLine(t)})})}drawLine(e){let t=Math.sqrt(this.width**2+this.height**2)/2,n=this.ribbonRotation*Math.PI/180,r=this.ribbonAmplitude,i=(e,t,n)=>[this.width/2+e*t*Math.cos(n),this.height/2+e*t*Math.sin(n)];this.ctx.beginPath(),this.ctx.moveTo(...i(-1,t,e[0]*r+n)),this.ctx.bezierCurveTo(...i(-1,t/3,e[1]*r*2),...i(1,t/3,e[2]*r*2),...i(1,t,e[3]*r+n)),B(this.ctx,this.ribbonLineWidth)}lineColor(e){let t=(t,n)=>n+(t-n)*e;return ze(t(this.ribbonHueStart,this.ribbonHueEnd),t(this.ribbonSaturationStart,this.ribbonSaturationEnd),t(this.ribbonLightnessStart,this.ribbonLightnessEnd),this.ribbonLineOpacity)}};P([M({type:Number,attribute:`ribbon-count`})],V.prototype,`ribbonCount`,void 0),P([M({type:Number,attribute:`ribbon-width`})],V.prototype,`ribbonWidth`,void 0),P([M({type:Number,attribute:`ribbon-rotation`})],V.prototype,`ribbonRotation`,void 0),P([M({type:Number,attribute:`ribbon-hue-start`})],V.prototype,`ribbonHueStart`,void 0),P([M({type:Number,attribute:`ribbon-hue-end`})],V.prototype,`ribbonHueEnd`,void 0),P([M({type:Number,attribute:`ribbon-saturation-start`})],V.prototype,`ribbonSaturationStart`,void 0),P([M({type:Number,attribute:`ribbon-saturation-end`})],V.prototype,`ribbonSaturationEnd`,void 0),P([M({type:Number,attribute:`ribbon-lightness-start`})],V.prototype,`ribbonLightnessStart`,void 0),P([M({type:Number,attribute:`ribbon-lightness-end`})],V.prototype,`ribbonLightnessEnd`,void 0),P([M({type:Number,attribute:`ribbon-amplitude`})],V.prototype,`ribbonAmplitude`,void 0),P([M({type:Number,attribute:`ribbon-speed-min`})],V.prototype,`ribbonSpeedMin`,void 0),P([M({type:Number,attribute:`ribbon-speed-max`})],V.prototype,`ribbonSpeedMax`,void 0),P([M({type:Number,attribute:`ribbon-line-width`})],V.prototype,`ribbonLineWidth`,void 0),P([M({type:Number,attribute:`ribbon-line-opacity`})],V.prototype,`ribbonLineOpacity`,void 0),V=P([j(`bb-ambient-ribbon`)],V);function Ue(){let e=Float32Array.from({length:65536},()=>Math.random()),t=(t,n)=>e[(n&255)*256+(t&255)],n=(e,n)=>{let r=Math.floor(e),i=Math.floor(n),a=We(e-r),o=We(n-i);return Ge(Ge(t(r,i),t(r+1,i),a),Ge(t(r,i+1),t(r+1,i+1),a),o)};return(e,t)=>{let r=0;for(let i=1;i<=4;i++)r+=n(e*2**(i-1),t*2**(i-1))/2**i;return r}}function We(e){return(1-Math.cos(e*Math.PI))/2}function Ge(e,t,n){return e+(t-e)*n}const Ke=[`#89964e`],qe=.1,Je=3/2.2**2,H=Array.from({length:64},(e,t)=>{let n=t/64*Math.PI*2;return[Math.cos(n)*qe,Math.sin(n)*qe]});let U=class extends F{constructor(...e){super(...e),this.particleAmount=4500,this.particleLife=6,this.pulseStrength=.5,this.pulseSpeed=.1,this.lineOpacity=.08,this.flowSpeed=132,this.terrainSize=3333,this.lineColors=Ke,this.trailOpacity=.005,this.cols=0,this.rows=0,this.flow=/* @__PURE__ */ new Float32Array,this.lowest=0,this.highest=0,this.shades=[],this.time=0,this.particles=[],this.builtFor=``}initialize(){this.cols=Math.ceil((this.width+200)/10),this.rows=Math.ceil((this.height+200)/10),this.terrain=Ue(),this.survey(),this.shades=Ve(this.colors(),128),this.particles=Array.from({length:this.particleAmount},()=>this.spawn()),this.builtFor=this.settings(),this.drawBackground(this.ctx)}loop(e){this.builtFor!==this.settings()&&this.initialize(),this.time+=e,this.fadeTrail();let t=this.flowSpeed*e,n=this.shades.map(()=>new Path2D);for(let r of this.particles)r.age+=e,r.age>r.life&&Object.assign(r,this.spawn()),this.move(r,t,n[this.shadeIndex(r)]);this.stroke(n)}settings(){return[this.width,this.height,this.terrainSize,this.particleAmount,this.lineColors].join(` `)}colors(){return this.lineColors.length>0?this.lineColors:Ke}survey(){let e=10/this.terrainSize;this.flow=new Float32Array(this.cols*this.rows*2),this.lowest=1/0,this.highest=-1/0;for(let t=0;t<this.rows;t++)for(let n=0;n<this.cols;n++){let[r,i]=[n*e,t*e],a=this.terrain(r,i);this.lowest=Math.min(this.lowest,a),this.highest=Math.max(this.highest,a);let o=(t*this.cols+n)*2;this.flow.set(Ye(this.terrain,r,i),o)}}shadeIndex({x:e,y:t}){let n=this.terrain(e/this.terrainSize,t/this.terrainSize),r=this.highest-this.lowest||1,i=Math.floor((n-this.lowest)/r*128);return Math.min(127,Math.max(0,i))}spawn(){return{x:Math.random()*this.cols*10,y:Math.random()*this.rows*10,dx:0,dy:0,age:0,life:this.particleLife*(.5+Math.random())}}pulse(e){let t=e/128,n=this.pulseSpeed*this.time+t*2;return 1+this.pulseStrength*Math.sin(n*2*Math.PI)}move(e,t,n){let r=(Math.floor(e.y/10)*this.cols+Math.floor(e.x/10))*2,i=e.dx+this.flow[r]*Je*t,a=e.dy+this.flow[r+1]*Je*t,o=Math.hypot(i,a)||1;e.dx=i/o,e.dy=a/o,n.moveTo(e.x,e.y),e.x+=e.dx*t,e.y+=e.dy*t,n.lineTo(e.x,e.y),e.x=Xe(e.x,this.cols*10),e.y=Xe(e.y,this.rows*10)}stroke(e){let t=this.ctx;t.save(),t.translate(-100,-100),t.lineWidth=1,e.forEach((e,n)=>{let r=this.lineOpacity*this.pulse(n);t.globalAlpha=Math.min(1,Math.max(0,r)),t.strokeStyle=this.shades[n],t.stroke(e)}),t.restore()}};P([M({type:Number,attribute:`particle-amount`})],U.prototype,`particleAmount`,void 0),P([M({type:Number,attribute:`particle-life`})],U.prototype,`particleLife`,void 0),P([M({type:Number,attribute:`pulse-strength`})],U.prototype,`pulseStrength`,void 0),P([M({type:Number,attribute:`pulse-speed`})],U.prototype,`pulseSpeed`,void 0),P([M({type:Number,attribute:`line-opacity`})],U.prototype,`lineOpacity`,void 0),P([M({type:Number,attribute:`flow-speed`})],U.prototype,`flowSpeed`,void 0),P([M({type:Number,attribute:`terrain-size`})],U.prototype,`terrainSize`,void 0),P([M({type:Array,attribute:`line-colors`,converter:N})],U.prototype,`lineColors`,void 0),U=P([j(`bb-contour-flow`)],U);function Ye(e,t,n){let r=H.map(([r,i])=>e(t+r,n+i)),i=r.indexOf(Math.max(...r)),a=r.indexOf(Math.min(...r)),o=H[a][0]-H[i][0],s=H[a][1]-H[i][1],c=(r[i]-r[a])/(Math.hypot(o,s)||1);return[o*c,s*c]}function Xe(e,t){return(e%t+t)%t}var Ze=class{constructor(e,t){this.x=e,this.y=t}update(e,t,n,r,i){let a=i/30;this.y*n*a>e&&Math.random()>t?this.y=0:this.y+=i*r}draw(e,t,n,r,i){let a=i/30;e.fillStyle=n,e.fillText(t,this.x*r,this.y*r*a)}};let W=class extends F{constructor(){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}initialize(){this.symbols=[],this.createSymbols(),this.drawBackground(this.ctx)}createSymbols(){this.columns=Math.floor(this.width/this.fontSize);for(let e=0;e<this.columns;e++)this.symbols[e]=this.createSymbol(e)}updateSymbols(){let e=Math.floor(this.width/this.fontSize);for(let t=this.symbols.length;t<e;t++)this.symbols[t]=this.createSymbol(t);this.symbols.length>e&&(this.symbols.length=e)}loop(e){this.updateSymbols(),this.fadeTrail(),this.ctx.textAlign=`center`,this.ctx.font=`${this.fontSize}px monospace`;let t=this.speed*3;this.symbols.forEach(n=>{n.draw(this.ctx,this.randomCharacter(),this.symbolColor(),this.fontSize,t),n.update(this.height,this.randomness,this.fontSize,e,t)})}randomCharacter(){return this.characters.charAt(Math.floor(Math.random()*this.characters.length))}symbolColor(){return this.fontColors.length>0?this.fontColors[Math.floor(Math.random()*this.fontColors.length)]:Re([this.fontColorHueStart,this.fontColorHueEnd],[this.fontColorSaturationStart,this.fontColorSaturationEnd],[this.fontColorLightnessStart,this.fontColorLightnessEnd])}createSymbol(e){return new Ze(e,L(0,-this.height/this.fontSize))}};P([M({type:Number,attribute:`speed`})],W.prototype,`speed`,void 0),P([M({type:String,attribute:`characters`})],W.prototype,`characters`,void 0),P([M({type:Number,attribute:`randomness`})],W.prototype,`randomness`,void 0),P([M({type:Number,attribute:`font-size`})],W.prototype,`fontSize`,void 0),P([M({type:Number,attribute:`font-color-hue-start`})],W.prototype,`fontColorHueStart`,void 0),P([M({type:Number,attribute:`font-color-hue-end`})],W.prototype,`fontColorHueEnd`,void 0),P([M({type:Number,attribute:`font-color-saturation-start`})],W.prototype,`fontColorSaturationStart`,void 0),P([M({type:Number,attribute:`font-color-saturation-end`})],W.prototype,`fontColorSaturationEnd`,void 0),P([M({type:Number,attribute:`font-color-lightness-start`})],W.prototype,`fontColorLightnessStart`,void 0),P([M({type:Number,attribute:`font-color-lightness-end`})],W.prototype,`fontColorLightnessEnd`,void 0),P([M({type:Array,attribute:`font-colors`,converter:N})],W.prototype,`fontColors`,void 0),W=P([j(`bb-digital-rain`)],W);const Qe=[`#c41e3a`,`#e0218a`,`#6a2c9e`,`#3b4fa8`,`#f5c800`],$e=[[0,`0, 0, 0`,.5],[.35,`0, 0, 0`,0],[.7,`255, 255, 255`,0],[1,`255, 255, 255`,.85]],et=.45;let G=class extends F{constructor(...e){super(...e),this.washColors=Qe,this.slatAmount=27,this.slatAngle=0,this.speed=1,this.trailOpacity=1,this.cleanTrail=!1,this.time=0}loop(e){this.time+=e*(Math.max(0,this.speed)||0),this.drawWash(),this.drawSlats()}drawWash(){let{ctx:e,width:t,height:n}=this,r=this.washColors.length>0?this.washColors:Qe,i=.5*Math.hypot(t,n);e.fillStyle=r[0],e.fillRect(0,0,t,n),r.forEach((r,a)=>{let o=.05+a%3*.01,s=t*(.5+et*Math.sin(this.time*o+a*2.4)),c=n*(.5+et*Math.cos(this.time*o*1.3+a*1.7)),l=z(r).join(`, `),u=e.createRadialGradient(s,c,0,s,c,i);u.addColorStop(0,`rgba(${l}, 1)`),u.addColorStop(1,`rgba(${l}, 0)`),e.fillStyle=u,e.fillRect(0,0,t,n)})}drawSlats(){let{ctx:e,width:t,height:n}=this,r=(this.slatAngle||0)*Math.PI/180,i=Math.abs(Math.cos(r)),a=Math.abs(Math.sin(r)),o=t*i+n*a,s=t*a+n*i,c=Math.round(this.slatAmount)||2,l=Math.min(Math.max(2,c),Math.max(2,Math.floor(o))),u=o/l;e.save(),e.translate(t/2,n/2),e.rotate(r);for(let t=0;t<l;t++){let n=-o/2+t*u,r=e.createLinearGradient(n,0,n+u,0);for(let[e,t,n]of $e)r.addColorStop(e,`rgba(${t}, ${n})`);e.fillStyle=r,e.fillRect(n,-s/2,u,s)}e.restore()}};P([M({type:Array,attribute:`wash-colors`,converter:N})],G.prototype,`washColors`,void 0),P([M({type:Number,attribute:`slat-amount`})],G.prototype,`slatAmount`,void 0),P([M({type:Number,attribute:`slat-angle`})],G.prototype,`slatAngle`,void 0),P([M({type:Number,attribute:`speed`})],G.prototype,`speed`,void 0),G=P([j(`bb-gradient-slats`)],G);let K=class extends F{constructor(...e){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}updated(e){super.updated(e),e.has(`hexSize`)&&this.initialize()}initialize(){this.grid=[],this.time=0;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;for(let e=-1;e<i;e++)for(let i=-1;i<r;i++){let r=e%2==0?0:t/2;this.grid.push({x:i*t+r,y:e*n,colorIndex:Math.floor(Math.random()*1e3)})}}loop(e){this.time+=e,this.fadeTrail();for(let e of this.grid)this.drawCell(e)}drawCell(e){let t=e.x*this.waveXFactor,n=e.y*this.waveYFactor,r=Math.sin(this.time*this.waveSpeed+t+n),i=Math.sin(this.time+e.x+e.y)*this.shadeAmplitude,a=this.baseLightness+r*this.lightnessRange+i;this.drawHex(e.x,e.y+r*this.waveAmplitude,this.hexSize*this.hexScale,this.cellFill(e,a))}cellFill(e,t){if(this.hexColors.length>0){let{h:n,s:r}=Be(this.hexColors[e.colorIndex%this.hexColors.length]);return`hsl(${n}, ${r*100}%, ${t}%)`}let n=(e.x+e.y)/(this.width+this.height);return`hsl(${this.hexHueStart+(this.hexHueEnd-this.hexHueStart)*n}, ${this.hexSaturation}%, ${t}%)`}drawHex(e,t,n,r){let i=this.ctx;i.beginPath();for(let r=0;r<6;r++){let a=Math.PI*2/6*r-Math.PI/2,o=e+Math.cos(a)*n,s=t+Math.sin(a)*n;i.lineTo(o,s)}i.closePath(),i.fillStyle=r,i.fill()}};P([M({type:Number,attribute:`hex-size`})],K.prototype,`hexSize`,void 0),P([M({type:Number,attribute:`wave-amplitude`})],K.prototype,`waveAmplitude`,void 0),P([M({type:Number,attribute:`wave-speed`})],K.prototype,`waveSpeed`,void 0),P([M({type:Number,attribute:`wave-x-factor`})],K.prototype,`waveXFactor`,void 0),P([M({type:Number,attribute:`wave-y-factor`})],K.prototype,`waveYFactor`,void 0),P([M({type:Number,attribute:`shade-amplitude`})],K.prototype,`shadeAmplitude`,void 0),P([M({type:Number,attribute:`shade-lightness-boost`})],K.prototype,`shadeLightnessBoost`,void 0),P([M({type:Number,attribute:`base-lightness`})],K.prototype,`baseLightness`,void 0),P([M({type:Number,attribute:`lightness-range`})],K.prototype,`lightnessRange`,void 0),P([M({type:Number,attribute:`hex-hue-start`})],K.prototype,`hexHueStart`,void 0),P([M({type:Number,attribute:`hex-hue-end`})],K.prototype,`hexHueEnd`,void 0),P([M({type:Number,attribute:`hex-saturation`})],K.prototype,`hexSaturation`,void 0),P([M({type:Number,attribute:`hex-scale`})],K.prototype,`hexScale`,void 0),P([M({type:Array,attribute:`hex-colors`,converter:N})],K.prototype,`hexColors`,void 0),K=P([j(`bb-hexagon-wave`)],K);const tt=[`#47d1d1`,`#475ed1`,`#a347d1`],nt=[[0,0],[.2,.5],[.5,.8],[.8,.5],[1,0]],rt=[15,2],it=[1,.3],at=[21,4],ot=[.5,.9];let q=class extends F{constructor(...e){super(...e),this.shaftColors=tt,this.shaftAmount=100,this.speed=1,this.trailOpacity=1,this.cleanTrail=!1,this.shafts=[],this.builtFor=``}initialize(){let e=Ve(this.shaftColors.length>0?this.shaftColors:tt,64);this.shafts=Array.from({length:this.shaftAmount},()=>this.shaft(e[Math.floor(Math.random()*64)])),this.builtFor=this.settings()}loop(e){this.builtFor!==this.settings()&&this.initialize();let t=this.ctx,n=e*Math.max(0,this.speed);this.fadeTrail(),t.globalCompositeOperation=`lighter`;for(let e of this.shafts){let r=this.width+e.sprite.width;e.x=(e.x+e.speed*n+e.sprite.width)%r-e.sprite.width,t.drawImage(e.sprite,e.x,e.y,e.sprite.width,e.height)}t.globalCompositeOperation=`source-over`}settings(){let{width:e,height:t,shaftAmount:n,shaftColors:r}=this;return`${e} ${t} ${n} ${r.join(`,`)}`}shaft(e){let t=Math.random(),n=st(rt,t),r=document.createElement(`canvas`);r.width=Math.ceil(n+40),r.height=64;let i=r.getContext(`2d`),[a,o,s]=z(e),c=i.createLinearGradient(0,0,0,64);for(let[e,n]of nt){let r=n*st(it,t);c.addColorStop(e,`rgba(${a}, ${o}, ${s}, ${r})`)}return i.fillStyle=c,i.shadowBlur=10,i.shadowColor=e,i.fillRect(20,0,n,64),{x:I(-r.width,this.width),y:I(0,.5*this.height),height:this.height*I(...ot),speed:st(at,t),sprite:r}}};P([M({type:Array,attribute:`shaft-colors`,converter:N})],q.prototype,`shaftColors`,void 0),P([M({type:Number,attribute:`shaft-amount`})],q.prototype,`shaftAmount`,void 0),P([M({type:Number,attribute:`speed`})],q.prototype,`speed`,void 0),q=P([j(`bb-light-shafts`)],q);function st([e,t],n){return e+(t-e)*n}let J=class extends F{constructor(...e){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}loop(e){this.time+=e,this.fadeTrail();let t=this.height/2-this.lineCount*this.lineSpacing/2;for(let e=0;e<this.lineCount;e++)this.drawLine(e,t+e*this.lineSpacing)}drawLine(e,t){let n=this.ctx,r=this.width/99,i=e*this.lineOffsetStep,a=Math.sin(this.time*this.wiggleSpeed+i+e)*this.wiggleAmplitude,o=e=>t+Math.sin(e*this.lineFrequency+this.time*this.speed+i)*this.lineAmplitude+a;n.beginPath(),n.strokeStyle=this.lineColor(e),n.moveTo(0,o(0));for(let e=0;e<99;e++){let t=e*r,i=(e+1)*r,a=o(t);n.quadraticCurveTo(t,a,(t+i)/2,(a+o(i))/2)}B(n,this.lineWidth)}lineColor(e){let t=40+Math.sin(this.time*.001+e*.5)*10;if(this.lineColors.length>0){let{h:n,s:r}=Be(this.lineColors[e%this.lineColors.length]);return`hsl(${n}, ${r*100}%, ${t}%)`}let n=e/this.lineCount;return`hsl(${this.lineHueStart+(this.lineHueEnd-this.lineHueStart)*n}, ${this.lineSaturation}%, ${t}%)`}};P([M({type:Number,attribute:`line-count`})],J.prototype,`lineCount`,void 0),P([M({type:Number,attribute:`line-amplitude`})],J.prototype,`lineAmplitude`,void 0),P([M({type:Number,attribute:`line-frequency`})],J.prototype,`lineFrequency`,void 0),P([M({type:Number,attribute:`speed`})],J.prototype,`speed`,void 0),P([M({type:Number,attribute:`line-spacing`})],J.prototype,`lineSpacing`,void 0),P([M({type:Number,attribute:`line-width`})],J.prototype,`lineWidth`,void 0),P([M({type:Number,attribute:`line-hue-start`})],J.prototype,`lineHueStart`,void 0),P([M({type:Number,attribute:`line-hue-end`})],J.prototype,`lineHueEnd`,void 0),P([M({type:Number,attribute:`line-saturation`})],J.prototype,`lineSaturation`,void 0),P([M({type:Number,attribute:`line-offset-step`})],J.prototype,`lineOffsetStep`,void 0),P([M({type:Number,attribute:`wiggle-amplitude`})],J.prototype,`wiggleAmplitude`,void 0),P([M({type:Number,attribute:`wiggle-speed`})],J.prototype,`wiggleSpeed`,void 0),P([M({type:Array,attribute:`line-colors`,converter:N})],J.prototype,`lineColors`,void 0),J=P([j(`bb-liquid-lines`)],J);var ct=class{constructor(e){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.gridSides=e.gridSides,this.gridSize=e.gridSize,this.gridAngle=e.gridAngle,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}circularMove(e,t,n){this.angle+=this.speed*n,this.radius+=this.force*n,this.updatePosition(e+Math.cos(this.angle)*this.radius,t+Math.sin(this.angle)*this.radius)}draw(e){e.globalAlpha=this.calculateOpacity(),e.beginPath(),e.lineCap=`round`,e.strokeStyle=this.color,e.moveTo(this.px,this.py),e.lineTo(this.x,this.y),B(e,this.size*2),e.globalAlpha=1}isDead(){return Date.now()-this.born>this.lifespan}railMove(e,t,n){this.initialized||this.enterRail(e,t);let r=Math.abs(this.speed)*20;this.railProgress+=r/this.gridSize*n,this.railProgress>=1&&(--this.railProgress,this.railFromX=this.railToX,this.railFromY=this.railToY,this.pickNextRailTarget()),this.updatePosition(this.railFromX+(this.railToX-this.railFromX)*this.railProgress,this.railFromY+(this.railToY-this.railFromY)*this.railProgress)}enterRail(e,t){let n=this.snapToGrid(this.x,this.y,e,t);this.railFromX=n.x,this.railFromY=n.y,this.railProgress=0,this.pickNextRailTarget(),this.updatePosition(n.x,n.y)}pickNextRailTarget(){let e=Math.PI*2/this.gridSides,t=Math.floor(Math.random()*this.gridSides)*e+this.gridAngle;this.railToX=this.railFromX+Math.cos(t)*this.gridSize,this.railToY=this.railFromY+Math.sin(t)*this.gridSize}snapToGrid(e,t,n,r){let i=lt(e-n,t-r,-this.gridAngle),a=this.nearestNode(i.x,i.y),o=lt(a.x,a.y,this.gridAngle);return{x:o.x+n,y:o.y+r}}nearestNode(e,t){let n=this.gridSize;if(this.gridSides===6||this.gridSides===3){let r=n*Math.sqrt(3)/2,i=Math.round(t/r);return{x:Math.round((e-i*n/2)/n)*n+i*n/2,y:i*r}}return this.gridSides===4?{x:Math.round(e/n)*n,y:Math.round(t/n)*n}:{x:e,y:t}}updatePosition(e,t){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)}calculateOpacity(){let e=Date.now()-this.born;return e<this.fadeInDuration?e/this.fadeInDuration:e>this.lifespan-this.fadeOutDuration?(this.lifespan-e)/this.fadeOutDuration:1}};function lt(e,t,n){let r=Math.cos(n),i=Math.sin(n);return{x:e*r-t*i,y:e*i+t*r}}var Y=class extends F{constructor(...e){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=[]}initialize(){this.particles=[],this.drawBackground(this.ctx),this.replenish()}loop(e){this.fadeTrail(),this.particles=this.particles.filter(e=>!e.isDead()),this.replenish(),this.particles.forEach(t=>{this.move(t,e),t.draw(this.ctx)})}createParticle(){return new ct({size:I(this.particleSizeMin,this.particleSizeMax),speed:I(this.particleSpeedMin,this.particleSpeedMax),lifespan:I(this.particleLifespanMin,this.particleLifespanMax),color:this.particleColor(),gridSides:this.gridSides,gridSize:this.gridSize,gridAngle:this.gridAngle,...this.placement()})}replenish(){for(;this.particles.length<this.particleAmount;)this.particles.push(this.createParticle())}particleColor(){return this.particleColors.length>0?this.particleColors[Math.floor(Math.random()*this.particleColors.length)]:Re([this.particleColorHueStart,this.particleColorHueEnd],[this.particleColorSaturationStart,this.particleColorSaturationEnd],[this.particleColorLightnessStart,this.particleColorLightnessEnd])}};P([M({type:Number,attribute:`particle-size-min`})],Y.prototype,`particleSizeMin`,void 0),P([M({type:Number,attribute:`particle-size-max`})],Y.prototype,`particleSizeMax`,void 0),P([M({type:Number,attribute:`particle-speed-min`})],Y.prototype,`particleSpeedMin`,void 0),P([M({type:Number,attribute:`particle-speed-max`})],Y.prototype,`particleSpeedMax`,void 0),P([M({type:Number,attribute:`particle-color-hue-start`})],Y.prototype,`particleColorHueStart`,void 0),P([M({type:Number,attribute:`particle-color-hue-end`})],Y.prototype,`particleColorHueEnd`,void 0),P([M({type:Number,attribute:`particle-color-saturation-start`})],Y.prototype,`particleColorSaturationStart`,void 0),P([M({type:Number,attribute:`particle-color-saturation-end`})],Y.prototype,`particleColorSaturationEnd`,void 0),P([M({type:Number,attribute:`particle-color-lightness-start`})],Y.prototype,`particleColorLightnessStart`,void 0),P([M({type:Number,attribute:`particle-color-lightness-end`})],Y.prototype,`particleColorLightnessEnd`,void 0),P([M({type:Number,attribute:`particle-lifespan-min`})],Y.prototype,`particleLifespanMin`,void 0),P([M({type:Number,attribute:`particle-lifespan-max`})],Y.prototype,`particleLifespanMax`,void 0),P([M({type:Number,attribute:`particle-amount`})],Y.prototype,`particleAmount`,void 0),P([M({type:Number,attribute:`grid-sides`})],Y.prototype,`gridSides`,void 0),P([M({type:Number,attribute:`grid-size`})],Y.prototype,`gridSize`,void 0),P([M({type:Number,attribute:`grid-angle`})],Y.prototype,`gridAngle`,void 0),P([M({type:Array,attribute:`particle-colors`,converter:N})],Y.prototype,`particleColors`,void 0);let X=class extends Y{constructor(...e){super(...e),this.trailOpacity=.0125}move(e,t){e.railMove(this.width/2,this.height/2,t)}placement(){let e=I(0,this.width),t=I(0,this.height);return{angle:Math.atan2(t-this.height/2,e-this.width/2),x:e,y:t}}};P([M({type:Number,attribute:`trail-opacity`})],X.prototype,`trailOpacity`,void 0),X=P([j(`bb-neon-rails`)],X);const ut=`#005588`,dt=.65,ft=[[1.1,.9,.7,1],[-.7,1.4,1.3,.55],[2.1,.5,.5,.3]],pt=ft.reduce((e,[,,,t])=>e+t,0);let Z=class extends F{constructor(...e){super(...e),this.silkColor=ut,this.swell=.2,this.sheen=.73,this.reach=dt,this.speed=1,this.trailOpacity=1,this.cleanTrail=!1,this.time=0}loop(e){let t=Math.min(e,.06666666666666667)*Math.max(0,this.speed);this.time+=t||0,this.drawSea()}drawSea(){if(!this.width||!this.height)return;let e=Math.max(0,this.swell)||0,t=Math.min(1,Math.max(0,this.sheen))||0,n=this.reach>0?this.reach:dt,{h:r,s:i,l:a}=Be(this.silkColor||ut),o=Math.min(.95,a+.55*t),s=Math.min(.5,Math.max(.01,.06/n)),c=s*s,l=this.ctx;this.fadeTrail();for(let t=0;t<64;t++){let s=c+(1-c)*(t/64);this.paintRow(l,this.curve(s,e,n),r,i,a,o,Math.min(1,s/.22))}l.globalAlpha=1}curve(e,t,n){let{width:r,height:i}=this,a=i*(.2+.8600000000000001*e),o=r*(.55+.45*e),s=t*i*e/n,c=t=>t*3*n/e,l=20*n/e,u={xs:[],ys:[],swells:[]};for(let e=0;e<=48;e++){let t=e/48*2-1,n=mt(c(t),l,this.time);u.xs.push(r/2+t*o),u.ys.push(a-s*n),u.swells.push(n)}return u}paintRow(e,t,n,r,i,a,o){let s=t.xs[0],c=t.xs[48],l=e.createLinearGradient(s,0,c,0);t.swells.forEach((e,o)=>{let u=(t.xs[o]-s)/(c-s),d=i+(a-i)*((e+1)/2);l.addColorStop(u,`hsl(${Math.round(n)}, ${Math.round(r*100)}%, ${(d*100).toFixed(1)}%)`)}),e.beginPath(),t.xs.forEach((n,r)=>{r===0?e.moveTo(n,t.ys[r]):e.lineTo(n,t.ys[r])}),e.lineTo(c,this.height+1),e.lineTo(s,this.height+1),e.closePath(),e.globalAlpha=o,e.fillStyle=l,e.fill()}};P([M({type:String,attribute:`silk-color`})],Z.prototype,`silkColor`,void 0),P([M({type:Number,attribute:`swell`})],Z.prototype,`swell`,void 0),P([M({type:Number,attribute:`sheen`})],Z.prototype,`sheen`,void 0),P([M({type:Number,attribute:`reach`})],Z.prototype,`reach`,void 0),P([M({type:Number,attribute:`speed`})],Z.prototype,`speed`,void 0),Z=P([j(`bb-silk-waves`)],Z);function mt(e,t,n){let r=0;for(let[i,a,o,s]of ft)r+=s*Math.sin(i*e+a*t+o*n);return r/pt}const ht=[`#b24c8b`,`#9f972d`,`#68c44f`,`#15caa8`,`#00abea`,`#156aff`,`#6810ff`,`#9f00d7`],gt=.001,_t=.35,vt=.01,yt=.2;let Q=class extends F{constructor(...e){super(...e),this.ringColors=ht,this.ringSize=.2,this.ringWobble=.03,this.speed=1,this.trailOpacity=.005,this.cleanTrail=!1,this.time=0,this.columns=0,this.rows=0,this.smoke=/* @__PURE__ */ new Float32Array,this.next=/* @__PURE__ */ new Float32Array,this.soft=/* @__PURE__ */ new Float32Array,this.image=new ImageData(1,1),this.buffer=document.createElement(`canvas`),this.builtFor=``}initialize(){let e=Math.min(1,Math.sqrt(15e4/(this.width*this.height)));this.columns=Math.max(1,Math.round(this.width*e)),this.rows=Math.max(1,Math.round(this.height*e)),this.smoke=new Float32Array(this.columns*this.rows*3),this.next=new Float32Array(this.smoke.length),this.soft=new Float32Array(this.smoke.length),this.image=new ImageData(this.columns,this.rows),this.buffer.width=this.columns,this.buffer.height=this.rows,this.builtFor=this.size()}loop(e){this.builtFor!==this.size()&&this.initialize();let t=Math.min(e,.06666666666666667)*Math.max(0,this.speed);this.time+=t,this.drift(60*t),this.shine(60*t),this.soften(),this.show()}size(){return`${this.width} ${this.height}`}drift(e){let{columns:t,rows:n,soft:r}=this,i=.996**e,a=Math.min(1,Math.max(0,this.trailOpacity)),o=(1-a)**e,s=.3*a*e,c=vt*t*e,l=vt*n*e,u=(t-1)/2,d=(n-1)/2,f=gt*t*e*Math.cos(_t*this.time),p=gt*n*e*Math.sin(_t*this.time);this.next.fill(0);for(let e=0;e<n;e++)for(let n=0;n<t;n++){let a=(e*t+n)*3;this.takeSmoke(u+(n-u)*i+f,d+(e-d)*i+p,.6,a),this.takeSmoke(n+(r[a+1]-yt)*c,e-(r[a]-yt)*l,.4,a);for(let e=a;e<a+3;e++)this.next[e]=Math.max(0,this.next[e]-s)*o}[this.smoke,this.next]=[this.next,this.smoke]}takeSmoke(e,t,n,r){let{columns:i,rows:a,smoke:o}=this;e=Math.min(Math.max(e,0),i-1),t=Math.min(Math.max(t,0),a-1);let s=Math.floor(e),c=Math.floor(t),l=Math.min(s+1,i-1),u=Math.min(c+1,a-1),d=e-s,f=t-c,p=(c*i+s)*3,ee=(c*i+l)*3,m=(u*i+s)*3,te=(u*i+l)*3;for(let e=0;e<3;e++){let t=o[p+e]+(o[ee+e]-o[p+e])*d,i=o[m+e]+(o[te+e]-o[m+e])*d;this.next[r+e]+=(t+(i-t)*f)*n}}shine(e){let t=this.ringColor(),n=this.ringSize*Math.min(this.columns,this.rows),r=(this.columns-1)/2,i=(this.rows-1)/2,a=this.ringWobble*Math.sin(1.5*this.time),o=.5*this.time,s=.6-Math.abs(a),c=1+Math.abs(a);for(let l=0;l<this.rows;l++)for(let u=0;u<this.columns;u++){let d=Math.hypot(u-r,l-i)/n;if(!(d>=s&&d<=c))continue;let f=Math.atan2(l-i,u-r),p=a*Math.sin(7*f+o),ee=bt(Math.abs(d+p))*e,m=(l*this.columns+u)*3;for(let e=0;e<3;e++){let n=this.smoke[m+e]+t[e]*ee;this.smoke[m+e]=Math.min(1,n)}}}ringColor(){let e=(this.ringColors.length>0?this.ringColors:ht).map(z),t=this.time/3%1*e.length,n=e[Math.floor(t)],r=e[(Math.floor(t)+1)%e.length],i=t-Math.floor(t);return n.map((e,t)=>(e+(r[t]-e)*i)/255)}soften(){let{columns:e,rows:t,smoke:n}=this;for(let r=0;r<t;r++){let i=Math.max(r-1,0)*e,a=Math.min(r+1,t-1)*e;for(let t=0;t<e;t++){let o=(r*e+t)*3,s=(r*e+Math.max(t-1,0))*3,c=(r*e+Math.min(t+1,e-1))*3,l=(i+t)*3,u=(a+t)*3;for(let e=0;e<3;e++)this.soft[o+e]=(n[o+e]+n[s+e]+n[c+e]+n[l+e]+n[u+e])/5}}}show(){let e=this.image.data;for(let t=0,n=0;t<this.soft.length;t+=3,n+=4)e[n]=this.soft[t]*255,e[n+1]=this.soft[t+1]*255,e[n+2]=this.soft[t+2]*255,e[n+3]=255;this.buffer.getContext(`2d`).putImageData(this.image,0,0);let t=this.ctx;this.drawBackground(t),t.globalCompositeOperation=`lighter`,t.drawImage(this.buffer,0,0,this.width,this.height),t.globalCompositeOperation=`source-over`}};P([M({type:Array,attribute:`ring-colors`,converter:N})],Q.prototype,`ringColors`,void 0),P([M({type:Number,attribute:`ring-size`})],Q.prototype,`ringSize`,void 0),P([M({type:Number,attribute:`ring-wobble`})],Q.prototype,`ringWobble`,void 0),P([M({type:Number,attribute:`speed`})],Q.prototype,`speed`,void 0),Q=P([j(`bb-smoke-ring`)],Q);function bt(e){let t=Math.min(1,Math.max(0,(1-e)/.1));return e**20*t*t*(3-2*t)}let $=class extends Y{constructor(...e){super(...e),this.particleForce=0,this.particleRadiusMin=1,this.particleRadiusMax=100,this.particleSizeMin=.5,this.particleSizeMax=1.5,this.particleSpeedMin=.025,this.particleSpeedMax=.05,this.particleColorHueStart=30,this.particleColorHueEnd=75,this.particleColorLightnessEnd=50,this.particleLifespanMin=1e3,this.particleLifespanMax=1e4,this.particleAmount=1e3,this.gridSides=6,this.gridSize=40,this.gridAngle=0}initialize(){this.particleRadiusMax=this.particleRadiusMax||this.width,super.initialize()}move(e,t){e.circularMove(this.width/2,this.height/2,t)}placement(){let e=I(0,Math.PI*2),t=this.particleRadiusMax-this.particleRadiusMin;return{angle:e,radius:Math.sqrt(Math.random())*t+this.particleRadiusMin,force:this.particleForce}}};P([M({type:Number,attribute:`particle-force`})],$.prototype,`particleForce`,void 0),P([M({type:Number,attribute:`particle-radius-min`})],$.prototype,`particleRadiusMin`,void 0),P([M({type:Number,attribute:`particle-radius-max`})],$.prototype,`particleRadiusMax`,void 0),$=P([j(`bb-star-trail`)],$);export{V as BbAmbientRibbon,U as BbContourFlow,W as BbDigitalRain,G as BbGradientSlats,K as BbHexagonWave,q as BbLightShafts,J as BbLiquidLines,X as BbNeonRails,Z as BbSilkWaves,Q as BbSmokeRing,$ as BbStarTrail,F as BeautifulBackground};
2995
49
  //# sourceMappingURL=bb.es.js.map