@pathscale/ui 0.0.57 → 0.0.58
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/dist/index.js +236 -377
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4462,15 +4462,15 @@ class jt extends _t {
|
|
|
4462
4462
|
}
|
|
4463
4463
|
class le extends _t {
|
|
4464
4464
|
}
|
|
4465
|
-
const
|
|
4465
|
+
const x = "Custom", ue = null, fe = {
|
|
4466
4466
|
true: 1,
|
|
4467
4467
|
"": 1,
|
|
4468
4468
|
1: 1
|
|
4469
4469
|
};
|
|
4470
4470
|
function de(e, t, n, s, r) {
|
|
4471
|
-
const { type: o, reflect: a, event: u, value: i, attr: l = he(t) } = n?.name !=
|
|
4471
|
+
const { type: o, reflect: a, event: u, value: i, attr: l = he(t) } = n?.name != x && R(n) && n != ue ? n : {
|
|
4472
4472
|
type: n
|
|
4473
|
-
}, c = o?.name ===
|
|
4473
|
+
}, c = o?.name === x && o.map, d = null != i ? o != Function && T(i) ? i : ()=>i : null;
|
|
4474
4474
|
Object.defineProperty(e, t, {
|
|
4475
4475
|
configurable: !0,
|
|
4476
4476
|
set (f) {
|
|
@@ -4490,7 +4490,7 @@ function de(e, t, n, s, r) {
|
|
|
4490
4490
|
type: o
|
|
4491
4491
|
};
|
|
4492
4492
|
}
|
|
4493
|
-
const Yt = (e, { type: t, base: n = CustomEvent, ...s })=>e.dispatchEvent(new n(t, s)), he = (e)=>e.replace(/([A-Z])/g, "-$1").toLowerCase(), me = (e, t, n, s)=>null != s && (t != Boolean || s) ? e.setAttribute(n, t?.name ===
|
|
4493
|
+
const Yt = (e, { type: t, base: n = CustomEvent, ...s })=>e.dispatchEvent(new n(t, s)), he = (e)=>e.replace(/([A-Z])/g, "-$1").toLowerCase(), me = (e, t, n, s)=>null != s && (t != Boolean || s) ? e.setAttribute(n, t?.name === x && t?.serialize ? t?.serialize(s) : R(s) ? JSON.stringify(s) : t == Boolean ? "" : s) : e.removeAttribute(n), ye = (e, t)=>e == Boolean ? !!fe[t] : e == Number ? Number(t) : e == String ? t : e == Array || e == Object ? JSON.parse(t) : e.name == x ? t : new e(t), pe = ({ map: e }, t)=>{
|
|
4494
4494
|
try {
|
|
4495
4495
|
return {
|
|
4496
4496
|
value: e(t),
|
|
@@ -4525,7 +4525,7 @@ let ge = 0;
|
|
|
4525
4525
|
const ve = (e)=>{
|
|
4526
4526
|
const t = (e?.dataset || {})?.hydrate || "";
|
|
4527
4527
|
return t || "c" + ge++;
|
|
4528
|
-
},
|
|
4528
|
+
}, j = (e, t = HTMLElement)=>{
|
|
4529
4529
|
const n = {}, s = {}, r = "prototype" in t && t.prototype instanceof Element, o = r ? t : "base" in t ? t.base : HTMLElement, { props: a, styles: u } = r ? e : t;
|
|
4530
4530
|
class i extends o {
|
|
4531
4531
|
constructor(){
|
|
@@ -4860,7 +4860,7 @@ const Re = Ht("host", {
|
|
|
4860
4860
|
t
|
|
4861
4861
|
]), (t || e).value;
|
|
4862
4862
|
}, Le = (e)=>{
|
|
4863
|
-
const t =
|
|
4863
|
+
const t = j(()=>($e(t, cally_().current), Re), {
|
|
4864
4864
|
props: {
|
|
4865
4865
|
value: {
|
|
4866
4866
|
type: Object,
|
|
@@ -5152,7 +5152,7 @@ const tt = lt(), ft = Le({
|
|
|
5152
5152
|
}
|
|
5153
5153
|
});
|
|
5154
5154
|
customElements.define("calendar-ctx", ft);
|
|
5155
|
-
const We = (e, t)=>(t + e) % 7, Je =
|
|
5155
|
+
const We = (e, t)=>(t + e) % 7, Je = j((e)=>{
|
|
5156
5156
|
const t = Ue(ft), n = ae(), s = Ke({
|
|
5157
5157
|
props: e,
|
|
5158
5158
|
context: t
|
|
@@ -5424,7 +5424,7 @@ function yt({ months: e, pageBy: t, locale: n, focusedDate: s, setFocusedDate: r
|
|
|
5424
5424
|
focus: y
|
|
5425
5425
|
};
|
|
5426
5426
|
}
|
|
5427
|
-
const Qe =
|
|
5427
|
+
const Qe = j((e)=>{
|
|
5428
5428
|
const [t, n] = N("value"), [s = t, r] = N("focusedDate"), o = yt({
|
|
5429
5429
|
...e,
|
|
5430
5430
|
focusedDate: s,
|
|
@@ -5455,7 +5455,7 @@ const Mt = (e, t)=>v.compare(e, t) < 0 ? [
|
|
|
5455
5455
|
] : [
|
|
5456
5456
|
t,
|
|
5457
5457
|
e
|
|
5458
|
-
], Ve =
|
|
5458
|
+
], Ve = j((e)=>{
|
|
5459
5459
|
const [t, n] = Be("value"), [s = t[0], r] = N("focusedDate"), o = yt({
|
|
5460
5460
|
...e,
|
|
5461
5461
|
focusedDate: s,
|
|
@@ -5499,7 +5499,7 @@ const Mt = (e, t)=>v.compare(e, t) < 0 ? [
|
|
|
5499
5499
|
styles: mt
|
|
5500
5500
|
});
|
|
5501
5501
|
customElements.define("calendar-range", Ve);
|
|
5502
|
-
const tn =
|
|
5502
|
+
const tn = j((e)=>{
|
|
5503
5503
|
const [t, n] = qe("value"), [s = t[0], r] = N("focusedDate"), o = yt({
|
|
5504
5504
|
...e,
|
|
5505
5505
|
focusedDate: s,
|
|
@@ -7242,7 +7242,6 @@ function ValidatedForm_ValidatedForm(props) {
|
|
|
7242
7242
|
],
|
|
7243
7243
|
onSubmit: local.onSubmit
|
|
7244
7244
|
});
|
|
7245
|
-
const resolvedChildren = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.children)(()=>local.children);
|
|
7246
7245
|
const contextValue = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>({
|
|
7247
7246
|
errors,
|
|
7248
7247
|
touched,
|
|
@@ -7258,7 +7257,7 @@ function ValidatedForm_ValidatedForm(props) {
|
|
|
7258
7257
|
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.createComponent)(form_Form, (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.mergeProps)(others, {
|
|
7259
7258
|
ref: form,
|
|
7260
7259
|
get children () {
|
|
7261
|
-
return
|
|
7260
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>"function" == typeof local.children)() ? local.children() : local.children;
|
|
7262
7261
|
}
|
|
7263
7262
|
}));
|
|
7264
7263
|
}
|
|
@@ -9484,392 +9483,252 @@ const steps_Steps = Object.assign(Steps, {
|
|
|
9484
9483
|
Step: Step
|
|
9485
9484
|
});
|
|
9486
9485
|
const steps = steps_Steps;
|
|
9487
|
-
var SvgBackground_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)(
|
|
9488
|
-
function
|
|
9489
|
-
hex = hex.replace(
|
|
9490
|
-
const
|
|
9491
|
-
const
|
|
9492
|
-
const
|
|
9493
|
-
const
|
|
9486
|
+
var SvgBackground_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div><svg class="absolute inset-0 w-full h-full z-0"viewBox="0 0 400 400"preserveAspectRatio="xMidYMid slice"xmlns=http://www.w3.org/2000/svg><defs><linearGradient gradientTransform="rotate(63, 0.5, 0.5)"x1=50% y1=0% x2=50% y2=100%><stop stop-opacity=1 offset=0%></stop><stop stop-opacity=1 offset=100%></stop></linearGradient></defs><rect width=400 height=400></rect></svg><div class="relative z-10 h-full w-full">'), SvgBackground_tmpl$2 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><filter x=-20% y=-20% width=140% height=140% filterUnits=objectBoundingBox primitiveUnits=userSpaceOnUse color-interpolation-filters=sRGB></svg>", false, true, false), SvgBackground_tmpl$3 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><feGaussianBlur in=SourceGraphic result=blur></svg>", false, true, false), SvgBackground_tmpl$4 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><feTurbulence type=fractalNoise numOctaves=2 seed=10 stitchTiles=stitch result=turbulence></svg>", false, true, false), _tmpl$5 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><feGaussianBlur in=turbulence result=blur></svg>", false, true, false), _tmpl$6 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<svg><feBlend in=SourceGraphic in2=blur result=blend></svg>", false, true, false), _tmpl$7 = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)('<div class="absolute inset-0 z-5">');
|
|
9487
|
+
function hexToHsl(hex) {
|
|
9488
|
+
hex = hex.replace('#', '');
|
|
9489
|
+
const r = parseInt(hex.substr(0, 2), 16) / 255;
|
|
9490
|
+
const g = parseInt(hex.substr(2, 2), 16) / 255;
|
|
9491
|
+
const b = parseInt(hex.substr(4, 2), 16) / 255;
|
|
9492
|
+
const max = Math.max(r, g, b);
|
|
9493
|
+
const min = Math.min(r, g, b);
|
|
9494
|
+
let h = 0;
|
|
9495
|
+
let s = 0;
|
|
9496
|
+
const l = (max + min) / 2;
|
|
9497
|
+
if (max !== min) {
|
|
9498
|
+
const d = max - min;
|
|
9499
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
9500
|
+
switch(max){
|
|
9501
|
+
case r:
|
|
9502
|
+
h = (g - b) / d + (g < b ? 6 : 0);
|
|
9503
|
+
break;
|
|
9504
|
+
case g:
|
|
9505
|
+
h = (b - r) / d + 2;
|
|
9506
|
+
break;
|
|
9507
|
+
case b:
|
|
9508
|
+
h = (r - g) / d + 4;
|
|
9509
|
+
break;
|
|
9510
|
+
}
|
|
9511
|
+
h /= 6;
|
|
9512
|
+
}
|
|
9494
9513
|
return {
|
|
9495
|
-
|
|
9496
|
-
|
|
9497
|
-
|
|
9514
|
+
h: Math.round(360 * h),
|
|
9515
|
+
s: Math.round(100 * s),
|
|
9516
|
+
l: Math.round(100 * l)
|
|
9498
9517
|
};
|
|
9499
9518
|
}
|
|
9500
|
-
function
|
|
9501
|
-
const
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
const getIntermediateColor = (t)=>{
|
|
9507
|
-
const start = hexToRgb(colorStart);
|
|
9508
|
-
const end = hexToRgb(colorEnd);
|
|
9509
|
-
const r = Math.round(start.r + (end.r - start.r) * t);
|
|
9510
|
-
const g = Math.round(start.g + (end.g - start.g) * t);
|
|
9511
|
-
const b = Math.round(start.b + (end.b - start.b) * t);
|
|
9512
|
-
return `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`;
|
|
9519
|
+
function parseColor(colorString) {
|
|
9520
|
+
const hslMatch = colorString.match(/hsl\((\d+),\s*(\d+)%,\s*(\d+)%\)/);
|
|
9521
|
+
if (hslMatch) return {
|
|
9522
|
+
h: parseInt(hslMatch[1]),
|
|
9523
|
+
s: parseInt(hslMatch[2]),
|
|
9524
|
+
l: parseInt(hslMatch[3])
|
|
9513
9525
|
};
|
|
9514
|
-
const
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
coveredGrid[i][j] = true;
|
|
9542
|
-
const randomOffsetMultiplier = isLeftSide ? 1.5 : 1;
|
|
9543
|
-
const randomOffset = 0.4 * Math.min(cellWidth, cellHeight) * (1 - Math.min(1, normalizedDensity / 50)) * randomOffsetMultiplier;
|
|
9544
|
-
const cx = i * cellWidth + cellWidth / 2 + (2 * random(200 * i + j) - 1) * randomOffset;
|
|
9545
|
-
const cy = j * cellHeight + cellHeight / 2 + (2 * random(300 * i + j) - 1) * randomOffset;
|
|
9546
|
-
const sizeRatioBase = Math.max(0.6, 1.2 - 0.15 * Math.log10(normalizedDensity + 1));
|
|
9547
|
-
const sizeRatio = isLeftSide ? 0.8 * sizeRatioBase : sizeRatioBase;
|
|
9548
|
-
const baseRadius = Math.min(cellWidth, cellHeight) * sizeRatio;
|
|
9549
|
-
const sizeVariationBase = Math.max(0.2, 0.5 - normalizedDensity / 200);
|
|
9550
|
-
const sizeVariation = isLeftSide ? 1.5 * sizeVariationBase : sizeVariationBase;
|
|
9551
|
-
const radius = Math.max(minRadius, baseRadius * (0.8 + random(400 * i + j) * sizeVariation));
|
|
9552
|
-
const colorIndexBase = Math.floor(random(500 * i + j) * colors.length);
|
|
9553
|
-
const colorIndex = isLeftSide ? Math.floor((colorIndexBase + random(600 * i + j) * colors.length) / 2) : colorIndexBase;
|
|
9554
|
-
const color = colors[colorIndex];
|
|
9555
|
-
const opacity = isLeftSide && random(700 * i + j) > 0.6 ? 0.7 + 0.3 * random(800 * i + j) : 1;
|
|
9556
|
-
const ellipseChance = isLeftSide ? 0.6 : 0.4;
|
|
9557
|
-
if (random(600 * i + j) > 1 - ellipseChance) {
|
|
9558
|
-
const rx = radius;
|
|
9559
|
-
const ry = Math.max(minRadius, radius * (0.6 + 0.8 * random(700 * i + j)));
|
|
9560
|
-
const rotation = 360 * random(800 * i + j);
|
|
9561
|
-
baseShapes.push((()=>{
|
|
9562
|
-
var _el$ = SvgBackground_tmpl$();
|
|
9563
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "fill", color);
|
|
9564
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "transform", `rotate(${rotation} ${cx} ${cy})`);
|
|
9565
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
9566
|
-
var _v$ = cx.toString(), _v$2 = cy.toString(), _v$3 = rx.toString(), _v$4 = ry.toString(), _v$5 = opacity.toString();
|
|
9567
|
-
_v$ !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "cx", _p$.e = _v$);
|
|
9568
|
-
_v$2 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "cy", _p$.t = _v$2);
|
|
9569
|
-
_v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "rx", _p$.a = _v$3);
|
|
9570
|
-
_v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "ry", _p$.o = _v$4);
|
|
9571
|
-
_v$5 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$, "opacity", _p$.i = _v$5);
|
|
9572
|
-
return _p$;
|
|
9573
|
-
}, {
|
|
9574
|
-
e: void 0,
|
|
9575
|
-
t: void 0,
|
|
9576
|
-
a: void 0,
|
|
9577
|
-
o: void 0,
|
|
9578
|
-
i: void 0
|
|
9579
|
-
});
|
|
9580
|
-
return _el$;
|
|
9581
|
-
})());
|
|
9582
|
-
} else baseShapes.push((()=>{
|
|
9583
|
-
var _el$2 = SvgBackground_tmpl$2();
|
|
9584
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "fill", color);
|
|
9585
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
9586
|
-
var _v$6 = cx.toString(), _v$7 = cy.toString(), _v$8 = radius.toString(), _v$9 = opacity.toString();
|
|
9587
|
-
_v$6 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "cx", _p$.e = _v$6);
|
|
9588
|
-
_v$7 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "cy", _p$.t = _v$7);
|
|
9589
|
-
_v$8 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "r", _p$.a = _v$8);
|
|
9590
|
-
_v$9 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$2, "opacity", _p$.o = _v$9);
|
|
9591
|
-
return _p$;
|
|
9592
|
-
}, {
|
|
9593
|
-
e: void 0,
|
|
9594
|
-
t: void 0,
|
|
9595
|
-
a: void 0,
|
|
9596
|
-
o: void 0
|
|
9597
|
-
});
|
|
9598
|
-
return _el$2;
|
|
9599
|
-
})());
|
|
9600
|
-
}
|
|
9601
|
-
for(let i = 0; i < gridSize; i++)for(let j = 0; j < gridSize; j++)if (!coveredGrid[i][j]) {
|
|
9602
|
-
const isLeftSide = i < gridSize / 3;
|
|
9603
|
-
if (isLeftSide && random(900 * i + j) < 0.3) continue;
|
|
9604
|
-
const cx = i * cellWidth + cellWidth / 2;
|
|
9605
|
-
const cy = j * cellHeight + cellHeight / 2;
|
|
9606
|
-
const radiusBase = 0.7 * Math.min(cellWidth, cellHeight);
|
|
9607
|
-
const radius = Math.max(minRadius, isLeftSide ? 0.8 * radiusBase : radiusBase);
|
|
9608
|
-
const colorIndex = Math.floor(random(900 * i + j) * colors.length);
|
|
9609
|
-
const opacity = isLeftSide ? 0.7 + 0.3 * random(950 * i + j) : 1;
|
|
9610
|
-
baseShapes.push((()=>{
|
|
9611
|
-
var _el$3 = SvgBackground_tmpl$2();
|
|
9612
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
9613
|
-
var _v$0 = cx.toString(), _v$1 = cy.toString(), _v$10 = radius.toString(), _v$11 = colors[colorIndex], _v$12 = opacity.toString();
|
|
9614
|
-
_v$0 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$3, "cx", _p$.e = _v$0);
|
|
9615
|
-
_v$1 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$3, "cy", _p$.t = _v$1);
|
|
9616
|
-
_v$10 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$3, "r", _p$.a = _v$10);
|
|
9617
|
-
_v$11 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$3, "fill", _p$.o = _v$11);
|
|
9618
|
-
_v$12 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$3, "opacity", _p$.i = _v$12);
|
|
9619
|
-
return _p$;
|
|
9620
|
-
}, {
|
|
9621
|
-
e: void 0,
|
|
9622
|
-
t: void 0,
|
|
9623
|
-
a: void 0,
|
|
9624
|
-
o: void 0,
|
|
9625
|
-
i: void 0
|
|
9626
|
-
});
|
|
9627
|
-
return _el$3;
|
|
9628
|
-
})());
|
|
9629
|
-
}
|
|
9630
|
-
const edgeShapes = [
|
|
9631
|
-
(()=>{
|
|
9632
|
-
var _el$4 = SvgBackground_tmpl$3();
|
|
9633
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$4, "fill", colorStart);
|
|
9634
|
-
return _el$4;
|
|
9635
|
-
})(),
|
|
9636
|
-
(()=>{
|
|
9637
|
-
var _el$5 = SvgBackground_tmpl$4();
|
|
9638
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$5, "fill", getIntermediateColor(0.25)));
|
|
9639
|
-
return _el$5;
|
|
9640
|
-
})(),
|
|
9641
|
-
(()=>{
|
|
9642
|
-
var _el$6 = _tmpl$5();
|
|
9643
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$6, "fill", getIntermediateColor(0.75)));
|
|
9644
|
-
return _el$6;
|
|
9645
|
-
})(),
|
|
9646
|
-
(()=>{
|
|
9647
|
-
var _el$7 = _tmpl$6();
|
|
9648
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$7, "fill", colorEnd);
|
|
9649
|
-
return _el$7;
|
|
9650
|
-
})(),
|
|
9651
|
-
(()=>{
|
|
9652
|
-
var _el$8 = _tmpl$7();
|
|
9653
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$8, "fill", getIntermediateColor(0.65)));
|
|
9654
|
-
return _el$8;
|
|
9655
|
-
})(),
|
|
9656
|
-
(()=>{
|
|
9657
|
-
var _el$9 = _tmpl$8();
|
|
9658
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$9, "fill", getIntermediateColor(0.15)));
|
|
9659
|
-
return _el$9;
|
|
9660
|
-
})(),
|
|
9661
|
-
(()=>{
|
|
9662
|
-
var _el$0 = _tmpl$9();
|
|
9663
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$0, "fill", getIntermediateColor(0.4)));
|
|
9664
|
-
return _el$0;
|
|
9665
|
-
})(),
|
|
9666
|
-
(()=>{
|
|
9667
|
-
var _el$1 = _tmpl$0();
|
|
9668
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$1, "fill", getIntermediateColor(0.85)));
|
|
9669
|
-
return _el$1;
|
|
9670
|
-
})()
|
|
9671
|
-
];
|
|
9672
|
-
const accentShapes = [];
|
|
9673
|
-
const accentCount = Math.max(0, maxShapes - baseShapes.length - edgeShapes.length);
|
|
9674
|
-
const leftSideAccentCount = Math.floor(0.6 * accentCount);
|
|
9675
|
-
const rightSideAccentCount = accentCount - leftSideAccentCount;
|
|
9676
|
-
for(let i = 0; i < leftSideAccentCount; i++){
|
|
9677
|
-
const cx = 20 + 120 * random(1000 + i);
|
|
9678
|
-
const cy = 20 + 360 * random(2000 + i);
|
|
9679
|
-
const radius = minRadius * (0.5 + 0.6 * random(3000 + i));
|
|
9680
|
-
const colorIndex = Math.floor(random(4000 + i) * colors.length);
|
|
9681
|
-
const opacity = 0.6 + 0.4 * random(5500 + i);
|
|
9682
|
-
if (random(5000 + i) > 0.4) accentShapes.push((()=>{
|
|
9683
|
-
var _el$10 = SvgBackground_tmpl$2();
|
|
9684
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
9685
|
-
var _v$13 = cx.toString(), _v$14 = cy.toString(), _v$15 = radius.toString(), _v$16 = colors[colorIndex], _v$17 = opacity.toString();
|
|
9686
|
-
_v$13 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$10, "cx", _p$.e = _v$13);
|
|
9687
|
-
_v$14 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$10, "cy", _p$.t = _v$14);
|
|
9688
|
-
_v$15 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$10, "r", _p$.a = _v$15);
|
|
9689
|
-
_v$16 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$10, "fill", _p$.o = _v$16);
|
|
9690
|
-
_v$17 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$10, "opacity", _p$.i = _v$17);
|
|
9691
|
-
return _p$;
|
|
9692
|
-
}, {
|
|
9693
|
-
e: void 0,
|
|
9694
|
-
t: void 0,
|
|
9695
|
-
a: void 0,
|
|
9696
|
-
o: void 0,
|
|
9697
|
-
i: void 0
|
|
9698
|
-
});
|
|
9699
|
-
return _el$10;
|
|
9700
|
-
})());
|
|
9701
|
-
else {
|
|
9702
|
-
const rx = radius;
|
|
9703
|
-
const ry = radius * (0.4 + 0.6 * random(6000 + i));
|
|
9704
|
-
const rotation = 360 * random(7000 + i);
|
|
9705
|
-
accentShapes.push((()=>{
|
|
9706
|
-
var _el$11 = SvgBackground_tmpl$();
|
|
9707
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "transform", `rotate(${rotation} ${cx} ${cy})`);
|
|
9708
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
9709
|
-
var _v$18 = cx.toString(), _v$19 = cy.toString(), _v$20 = rx.toString(), _v$21 = ry.toString(), _v$22 = colors[colorIndex], _v$23 = opacity.toString();
|
|
9710
|
-
_v$18 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "cx", _p$.e = _v$18);
|
|
9711
|
-
_v$19 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "cy", _p$.t = _v$19);
|
|
9712
|
-
_v$20 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "rx", _p$.a = _v$20);
|
|
9713
|
-
_v$21 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "ry", _p$.o = _v$21);
|
|
9714
|
-
_v$22 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "fill", _p$.i = _v$22);
|
|
9715
|
-
_v$23 !== _p$.n && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "opacity", _p$.n = _v$23);
|
|
9716
|
-
return _p$;
|
|
9717
|
-
}, {
|
|
9718
|
-
e: void 0,
|
|
9719
|
-
t: void 0,
|
|
9720
|
-
a: void 0,
|
|
9721
|
-
o: void 0,
|
|
9722
|
-
i: void 0,
|
|
9723
|
-
n: void 0
|
|
9724
|
-
});
|
|
9725
|
-
return _el$11;
|
|
9726
|
-
})());
|
|
9727
|
-
}
|
|
9728
|
-
}
|
|
9729
|
-
for(let i = 0; i < rightSideAccentCount; i++){
|
|
9730
|
-
const cx = 140 + 260 * random(8000 + i);
|
|
9731
|
-
const cy = 20 + 360 * random(9000 + i);
|
|
9732
|
-
const radius = minRadius * (0.7 + 0.8 * random(10000 + i));
|
|
9733
|
-
const colorIndex = Math.floor(random(11000 + i) * colors.length);
|
|
9734
|
-
if (random(12000 + i) > 0.3) accentShapes.push((()=>{
|
|
9735
|
-
var _el$12 = SvgBackground_tmpl$2();
|
|
9736
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
9737
|
-
var _v$24 = cx.toString(), _v$25 = cy.toString(), _v$26 = radius.toString(), _v$27 = colors[colorIndex];
|
|
9738
|
-
_v$24 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$12, "cx", _p$.e = _v$24);
|
|
9739
|
-
_v$25 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$12, "cy", _p$.t = _v$25);
|
|
9740
|
-
_v$26 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$12, "r", _p$.a = _v$26);
|
|
9741
|
-
_v$27 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$12, "fill", _p$.o = _v$27);
|
|
9742
|
-
return _p$;
|
|
9743
|
-
}, {
|
|
9744
|
-
e: void 0,
|
|
9745
|
-
t: void 0,
|
|
9746
|
-
a: void 0,
|
|
9747
|
-
o: void 0
|
|
9748
|
-
});
|
|
9749
|
-
return _el$12;
|
|
9750
|
-
})());
|
|
9751
|
-
else {
|
|
9752
|
-
const rx = radius;
|
|
9753
|
-
const ry = radius * (0.5 + 0.8 * random(13000 + i));
|
|
9754
|
-
const rotation = 360 * random(14000 + i);
|
|
9755
|
-
accentShapes.push((()=>{
|
|
9756
|
-
var _el$13 = SvgBackground_tmpl$();
|
|
9757
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$13, "transform", `rotate(${rotation} ${cx} ${cy})`);
|
|
9758
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
9759
|
-
var _v$28 = cx.toString(), _v$29 = cy.toString(), _v$30 = rx.toString(), _v$31 = ry.toString(), _v$32 = colors[colorIndex];
|
|
9760
|
-
_v$28 !== _p$.e && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$13, "cx", _p$.e = _v$28);
|
|
9761
|
-
_v$29 !== _p$.t && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$13, "cy", _p$.t = _v$29);
|
|
9762
|
-
_v$30 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$13, "rx", _p$.a = _v$30);
|
|
9763
|
-
_v$31 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$13, "ry", _p$.o = _v$31);
|
|
9764
|
-
_v$32 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$13, "fill", _p$.i = _v$32);
|
|
9765
|
-
return _p$;
|
|
9766
|
-
}, {
|
|
9767
|
-
e: void 0,
|
|
9768
|
-
t: void 0,
|
|
9769
|
-
a: void 0,
|
|
9770
|
-
o: void 0,
|
|
9771
|
-
i: void 0
|
|
9772
|
-
});
|
|
9773
|
-
return _el$13;
|
|
9774
|
-
})());
|
|
9775
|
-
}
|
|
9526
|
+
const hexMatch = colorString.match(/^#?([a-fA-F0-9]{6})$/);
|
|
9527
|
+
if (hexMatch) return hexToHsl(colorString);
|
|
9528
|
+
const rgbMatch = colorString.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
|
|
9529
|
+
if (rgbMatch) {
|
|
9530
|
+
const r = parseInt(rgbMatch[1]) / 255;
|
|
9531
|
+
const g = parseInt(rgbMatch[2]) / 255;
|
|
9532
|
+
const b = parseInt(rgbMatch[3]) / 255;
|
|
9533
|
+
const max = Math.max(r, g, b);
|
|
9534
|
+
const min = Math.min(r, g, b);
|
|
9535
|
+
let h = 0;
|
|
9536
|
+
let s = 0;
|
|
9537
|
+
const l = (max + min) / 2;
|
|
9538
|
+
if (max !== min) {
|
|
9539
|
+
const d = max - min;
|
|
9540
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
9541
|
+
switch(max){
|
|
9542
|
+
case r:
|
|
9543
|
+
h = (g - b) / d + (g < b ? 6 : 0);
|
|
9544
|
+
break;
|
|
9545
|
+
case g:
|
|
9546
|
+
h = (b - r) / d + 2;
|
|
9547
|
+
break;
|
|
9548
|
+
case b:
|
|
9549
|
+
h = (r - g) / d + 4;
|
|
9550
|
+
break;
|
|
9551
|
+
}
|
|
9552
|
+
h /= 6;
|
|
9776
9553
|
}
|
|
9777
|
-
return
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
];
|
|
9782
|
-
};
|
|
9783
|
-
const renderSvgToCanvas = ()=>{
|
|
9784
|
-
if (!svgRef || !canvasRef) return;
|
|
9785
|
-
const svgData = new XMLSerializer().serializeToString(svgRef);
|
|
9786
|
-
const svgBlob = new Blob([
|
|
9787
|
-
svgData
|
|
9788
|
-
], {
|
|
9789
|
-
type: 'image/svg+xml'
|
|
9790
|
-
});
|
|
9791
|
-
const svgUrl = URL.createObjectURL(svgBlob);
|
|
9792
|
-
const img = new Image();
|
|
9793
|
-
img.src = svgUrl;
|
|
9794
|
-
img.onload = ()=>{
|
|
9795
|
-
if (!canvasRef) return;
|
|
9796
|
-
if (containerRef) {
|
|
9797
|
-
const rect = containerRef.getBoundingClientRect();
|
|
9798
|
-
const blurPadding = Math.ceil(2 * blurIntensity);
|
|
9799
|
-
canvasRef.width = rect.width + 2 * blurPadding;
|
|
9800
|
-
canvasRef.height = rect.height + 2 * blurPadding;
|
|
9801
|
-
}
|
|
9802
|
-
const ctx = canvasRef.getContext('2d');
|
|
9803
|
-
if (!ctx) return;
|
|
9804
|
-
ctx.clearRect(0, 0, canvasRef.width, canvasRef.height);
|
|
9805
|
-
ctx.fillStyle = backgroundColor;
|
|
9806
|
-
ctx.fillRect(0, 0, canvasRef.width, canvasRef.height);
|
|
9807
|
-
ctx.drawImage(img, 2 * -blurIntensity, 2 * -blurIntensity, canvasRef.width + 4 * blurIntensity, canvasRef.height + 4 * blurIntensity);
|
|
9808
|
-
URL.revokeObjectURL(svgUrl);
|
|
9809
|
-
setBackgroundReady(true);
|
|
9554
|
+
return {
|
|
9555
|
+
h: Math.round(360 * h),
|
|
9556
|
+
s: Math.round(100 * s),
|
|
9557
|
+
l: Math.round(100 * l)
|
|
9810
9558
|
};
|
|
9559
|
+
}
|
|
9560
|
+
return {
|
|
9561
|
+
h: 0,
|
|
9562
|
+
s: 0,
|
|
9563
|
+
l: 0
|
|
9811
9564
|
};
|
|
9565
|
+
}
|
|
9566
|
+
function interpolateHue(h1, h2, t) {
|
|
9567
|
+
const diff = h2 - h1;
|
|
9568
|
+
if (Math.abs(diff) > 180) if (diff > 0) h1 += 360;
|
|
9569
|
+
else h2 += 360;
|
|
9570
|
+
return (h1 + (h2 - h1) * t + 360) % 360;
|
|
9571
|
+
}
|
|
9572
|
+
let instanceCounter = 0;
|
|
9573
|
+
function generateStableId() {
|
|
9574
|
+
return `svg-bg-${++instanceCounter}-${Date.now()}`;
|
|
9575
|
+
}
|
|
9576
|
+
function SvgBackground(props) {
|
|
9577
|
+
const { colorStart = '#000000', colorEnd = '#333333', opacity = 1, blurIntensity = 36, turbulenceFrequency = 0.007, animated = false, animationSpeed = 1, class: className = '', style = {}, children, darkness = 0 } = props;
|
|
9578
|
+
const [animationTime, setAnimationTime] = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createSignal)(0);
|
|
9579
|
+
let animationFrame = null;
|
|
9580
|
+
let gradientStop1Ref;
|
|
9581
|
+
let gradientStop2Ref;
|
|
9582
|
+
let turbulenceRef;
|
|
9583
|
+
const gradientId = `gradient-${generateStableId()}`;
|
|
9584
|
+
const filterId = `filter-${generateStableId()}`;
|
|
9585
|
+
const shouldUseFilters = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>blurIntensity > 0 && turbulenceFrequency > 0.001);
|
|
9586
|
+
const isGrayscaleColors = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>{
|
|
9587
|
+
const startHSL = parseColor(colorStart);
|
|
9588
|
+
const endHSL = parseColor(colorEnd);
|
|
9589
|
+
return startHSL.s < 15 && endHSL.s < 15;
|
|
9590
|
+
});
|
|
9812
9591
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onMount)(()=>{
|
|
9813
|
-
if (
|
|
9814
|
-
const
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
if (containerRef) observer.observe(containerRef);
|
|
9818
|
-
return ()=>{
|
|
9819
|
-
if (containerRef) observer.unobserve(containerRef);
|
|
9592
|
+
if (animated) {
|
|
9593
|
+
const animate = ()=>{
|
|
9594
|
+
setAnimationTime((prev)=>prev + 0.008 * animationSpeed);
|
|
9595
|
+
animationFrame = requestAnimationFrame(animate);
|
|
9820
9596
|
};
|
|
9597
|
+
animate();
|
|
9821
9598
|
}
|
|
9822
|
-
|
|
9599
|
+
});
|
|
9600
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.onCleanup)(()=>{
|
|
9601
|
+
if (animationFrame) cancelAnimationFrame(animationFrame);
|
|
9602
|
+
});
|
|
9603
|
+
const startHSL = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>parseColor(colorStart));
|
|
9604
|
+
const endHSL = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>parseColor(colorEnd));
|
|
9605
|
+
const animatedColors = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>{
|
|
9606
|
+
if (!animated) return {
|
|
9607
|
+
color1: colorStart,
|
|
9608
|
+
color2: colorEnd,
|
|
9609
|
+
turbFreq1: turbulenceFrequency,
|
|
9610
|
+
turbFreq2: 0.4 * turbulenceFrequency
|
|
9611
|
+
};
|
|
9612
|
+
const time = animationTime();
|
|
9613
|
+
const baseSpeed = 0.001 * animationSpeed;
|
|
9614
|
+
const freq1 = time * baseSpeed * 7;
|
|
9615
|
+
const freq2 = time * baseSpeed * 11;
|
|
9616
|
+
const freq3 = time * baseSpeed * 13;
|
|
9617
|
+
const freq4 = time * baseSpeed * 17;
|
|
9618
|
+
const freq5 = time * baseSpeed * 19;
|
|
9619
|
+
const wave1 = 0.3 * Math.sin(freq1);
|
|
9620
|
+
const wave2 = 0.25 * Math.sin(freq2);
|
|
9621
|
+
const wave3 = 0.2 * Math.sin(freq3);
|
|
9622
|
+
const wave4 = 0.15 * Math.sin(freq4);
|
|
9623
|
+
const wave5 = 0.1 * Math.sin(freq5);
|
|
9624
|
+
const combinedWave = wave1 + wave2 + wave3 + wave4 + wave5;
|
|
9625
|
+
const colorMix = (combinedWave + 1) / 2;
|
|
9626
|
+
const wave1b = 0.3 * Math.cos(freq2);
|
|
9627
|
+
const wave2b = 0.25 * Math.cos(freq3);
|
|
9628
|
+
const wave3b = 0.2 * Math.cos(freq4);
|
|
9629
|
+
const wave4b = 0.15 * Math.cos(freq5);
|
|
9630
|
+
const wave5b = 0.1 * Math.cos(freq1);
|
|
9631
|
+
const combinedWave2 = wave1b + wave2b + wave3b + wave4b + wave5b;
|
|
9632
|
+
const colorMix2 = (combinedWave2 + 1) / 2;
|
|
9633
|
+
const turbMix1 = (0.5 * Math.sin(0.3 * freq1) + 0.5 * Math.cos(0.2 * freq2) + 1) / 2;
|
|
9634
|
+
const turbMix2 = (0.5 * Math.cos(0.2 * freq3) + 0.5 * Math.sin(0.3 * freq4) + 1) / 2;
|
|
9635
|
+
let color1 = colorStart;
|
|
9636
|
+
let color2 = colorEnd;
|
|
9637
|
+
const start = startHSL();
|
|
9638
|
+
const end = endHSL();
|
|
9639
|
+
const h1 = interpolateHue(start.h, end.h, colorMix);
|
|
9640
|
+
const s1 = start.s + (end.s - start.s) * colorMix;
|
|
9641
|
+
const l1 = start.l + (end.l - start.l) * colorMix;
|
|
9642
|
+
const h2 = interpolateHue(start.h, end.h, colorMix2);
|
|
9643
|
+
const s2 = start.s + (end.s - start.s) * colorMix2;
|
|
9644
|
+
const l2 = start.l + (end.l - start.l) * colorMix2;
|
|
9645
|
+
color1 = `hsl(${Math.round(h1)}, ${Math.round(s1)}%, ${Math.round(l1)}%)`;
|
|
9646
|
+
color2 = `hsl(${Math.round(h2)}, ${Math.round(s2)}%, ${Math.round(l2)}%)`;
|
|
9647
|
+
const turbFreq1 = turbulenceFrequency + 0.01 * turbulenceFrequency * turbMix1;
|
|
9648
|
+
const turbFreq2 = 0.4 * turbulenceFrequency + 0.01 * turbulenceFrequency * turbMix2;
|
|
9649
|
+
return {
|
|
9650
|
+
color1,
|
|
9651
|
+
color2,
|
|
9652
|
+
turbFreq1,
|
|
9653
|
+
turbFreq2
|
|
9654
|
+
};
|
|
9823
9655
|
});
|
|
9824
9656
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9657
|
+
const colors = animatedColors();
|
|
9658
|
+
if (gradientStop1Ref) gradientStop1Ref.setAttribute('stop-color', colors.color1);
|
|
9659
|
+
if (gradientStop2Ref) gradientStop2Ref.setAttribute('stop-color', colors.color2);
|
|
9660
|
+
if (turbulenceRef) turbulenceRef.setAttribute('baseFrequency', `${colors.turbFreq1} ${colors.turbFreq2}`);
|
|
9828
9661
|
});
|
|
9829
|
-
const backgroundStyle = ()=>({
|
|
9662
|
+
const backgroundStyle = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createMemo)(()=>({
|
|
9830
9663
|
position: 'relative',
|
|
9831
|
-
overflow: 'hidden',
|
|
9832
9664
|
...style
|
|
9833
|
-
});
|
|
9834
|
-
const canvasStyle = ()=>({
|
|
9835
|
-
position: 'absolute',
|
|
9836
|
-
top: `-${2 * blurIntensity}px`,
|
|
9837
|
-
left: `-${2 * blurIntensity}px`,
|
|
9838
|
-
width: `calc(100% + ${4 * blurIntensity}px)`,
|
|
9839
|
-
height: `calc(100% + ${4 * blurIntensity}px)`,
|
|
9840
|
-
'z-index': '0',
|
|
9841
|
-
opacity: opacity.toString(),
|
|
9842
|
-
filter: `blur(${blurIntensity}px)`
|
|
9843
|
-
});
|
|
9665
|
+
}));
|
|
9844
9666
|
return (()=>{
|
|
9845
|
-
var _el$
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
|
|
9850
|
-
var _ref$2 =
|
|
9851
|
-
"function" == typeof _ref$2 ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$2, _el$
|
|
9852
|
-
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
|
|
9862
|
-
|
|
9667
|
+
var _el$ = SvgBackground_tmpl$(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$3.nextSibling, _el$8 = _el$2.nextSibling;
|
|
9668
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.className)(_el$, `relative ${className}`);
|
|
9669
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$4, "id", gradientId);
|
|
9670
|
+
var _ref$ = gradientStop1Ref;
|
|
9671
|
+
"function" == typeof _ref$ ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$, _el$5) : gradientStop1Ref = _el$5;
|
|
9672
|
+
var _ref$2 = gradientStop2Ref;
|
|
9673
|
+
"function" == typeof _ref$2 ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$2, _el$6) : gradientStop2Ref = _el$6;
|
|
9674
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$3, (()=>{
|
|
9675
|
+
var _c$ = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!shouldUseFilters());
|
|
9676
|
+
return ()=>_c$() && (()=>{
|
|
9677
|
+
var _el$9 = SvgBackground_tmpl$2();
|
|
9678
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$9, "id", filterId);
|
|
9679
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$9, (()=>{
|
|
9680
|
+
var _c$2 = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.memo)(()=>!!isGrayscaleColors());
|
|
9681
|
+
return ()=>_c$2() ? (()=>{
|
|
9682
|
+
var _el$0 = SvgBackground_tmpl$3();
|
|
9683
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$0, "stdDeviation", `${0.3 * blurIntensity} ${0.3 * blurIntensity}`);
|
|
9684
|
+
return _el$0;
|
|
9685
|
+
})() : [
|
|
9686
|
+
(()=>{
|
|
9687
|
+
var _el$1 = SvgBackground_tmpl$4();
|
|
9688
|
+
var _ref$3 = turbulenceRef;
|
|
9689
|
+
"function" == typeof _ref$3 ? (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.use)(_ref$3, _el$1) : turbulenceRef = _el$1;
|
|
9690
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)(()=>(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$1, "baseFrequency", `${animatedColors().turbFreq1} ${animatedColors().turbFreq2}`));
|
|
9691
|
+
return _el$1;
|
|
9692
|
+
})(),
|
|
9693
|
+
(()=>{
|
|
9694
|
+
var _el$10 = _tmpl$5();
|
|
9695
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$10, "stdDeviation", `${blurIntensity} ${blurIntensity}`);
|
|
9696
|
+
return _el$10;
|
|
9697
|
+
})(),
|
|
9698
|
+
(()=>{
|
|
9699
|
+
var _el$11 = _tmpl$6();
|
|
9700
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$11, "mode", "color-dodge");
|
|
9701
|
+
return _el$11;
|
|
9702
|
+
})()
|
|
9703
|
+
];
|
|
9704
|
+
})());
|
|
9705
|
+
return _el$9;
|
|
9706
|
+
})();
|
|
9707
|
+
})(), null);
|
|
9708
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$7, "fill", `url(#${gradientId})`);
|
|
9709
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$, darkness > 0 && (()=>{
|
|
9710
|
+
var _el$12 = _tmpl$7();
|
|
9711
|
+
_el$12.style.setProperty("background-color", `rgba(0, 0, 0, ${darkness})`);
|
|
9712
|
+
_el$12.style.setProperty("pointer-events", "none");
|
|
9713
|
+
return _el$12;
|
|
9714
|
+
})(), _el$8);
|
|
9715
|
+
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.insert)(_el$8, children);
|
|
9863
9716
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.effect)((_p$)=>{
|
|
9864
|
-
var _v$
|
|
9865
|
-
_p$.e = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.style)(_el
|
|
9866
|
-
_p$.t
|
|
9717
|
+
var _v$ = backgroundStyle(), _v$2 = opacity.toString(), _v$3 = animatedColors().color1, _v$4 = animatedColors().color2, _v$5 = shouldUseFilters() ? `url(#${filterId})` : 'none';
|
|
9718
|
+
_p$.e = (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.style)(_el$, _v$, _p$.e);
|
|
9719
|
+
_v$2 !== _p$.t && (null != (_p$.t = _v$2) ? _el$2.style.setProperty("opacity", _v$2) : _el$2.style.removeProperty("opacity"));
|
|
9720
|
+
_v$3 !== _p$.a && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$5, "stop-color", _p$.a = _v$3);
|
|
9721
|
+
_v$4 !== _p$.o && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$6, "stop-color", _p$.o = _v$4);
|
|
9722
|
+
_v$5 !== _p$.i && (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.setAttribute)(_el$7, "filter", _p$.i = _v$5);
|
|
9867
9723
|
return _p$;
|
|
9868
9724
|
}, {
|
|
9869
9725
|
e: void 0,
|
|
9870
|
-
t: void 0
|
|
9726
|
+
t: void 0,
|
|
9727
|
+
a: void 0,
|
|
9728
|
+
o: void 0,
|
|
9729
|
+
i: void 0
|
|
9871
9730
|
});
|
|
9872
|
-
return _el
|
|
9731
|
+
return _el$;
|
|
9873
9732
|
})();
|
|
9874
9733
|
}
|
|
9875
9734
|
var Swap_tmpl$ = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_solid_js_web_35d951b7__.template)("<label><input type=checkbox>");
|