@vanelsas/baredom 3.11.0 → 3.12.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/CHANGELOG.md +15 -0
- package/custom-elements.json +10694 -10660
- package/dist/baredom.d.ts +93 -93
- package/dist/base.js +598 -598
- package/dist/integrity.json +111 -111
- package/dist/x-alert.js +16 -16
- package/dist/x-avatar-group.js +9 -9
- package/dist/x-avatar.js +14 -14
- package/dist/x-badge.js +8 -8
- package/dist/x-bento-grid.js +5 -5
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.js +13 -13
- package/dist/x-button.js +1 -1
- package/dist/x-calendar.js +34 -34
- package/dist/x-cancel-dialogue.js +12 -12
- package/dist/x-card.js +7 -7
- package/dist/x-carousel.js +31 -31
- package/dist/x-chart.js +44 -44
- package/dist/x-checkbox.js +1 -1
- package/dist/x-chip.js +1 -1
- package/dist/x-code.js +27 -27
- package/dist/x-collapse.js +8 -8
- package/dist/x-color-picker.js +34 -34
- package/dist/x-combobox.js +31 -31
- package/dist/x-command-palette.js +27 -27
- package/dist/x-confetti.js +23 -23
- package/dist/x-container.js +4 -4
- package/dist/x-context-menu.js +19 -19
- package/dist/x-copy.js +1 -1
- package/dist/x-currency-field.js +21 -21
- package/dist/x-date-picker.js +34 -34
- package/dist/x-divider.js +9 -9
- package/dist/x-drag-panel.js +31 -31
- package/dist/x-drawer.js +9 -9
- package/dist/x-drop-zone.js +11 -11
- package/dist/x-dropdown.js +12 -12
- package/dist/x-fieldset.js +5 -5
- package/dist/x-file-download.d.ts +4 -0
- package/dist/x-file-download.js +14 -6
- package/dist/x-file-upload.js +23 -23
- package/dist/x-floating-panel.js +21 -21
- package/dist/x-form-field.js +14 -14
- package/dist/x-form.js +10 -10
- package/dist/x-gaussian-blur.js +11 -11
- package/dist/x-grid.js +6 -6
- package/dist/x-i18n-provider.js +7 -7
- package/dist/x-i18n.js +4 -4
- package/dist/x-icon.js +7 -7
- package/dist/x-image.js +16 -16
- package/dist/x-kbd.js +11 -11
- package/dist/x-kinetic-canvas.js +24 -24
- package/dist/x-kinetic-font.js +22 -22
- package/dist/x-kinetic-typography.js +29 -29
- package/dist/x-liquid-dock.js +29 -29
- package/dist/x-liquid-fill.js +38 -38
- package/dist/x-liquid-glass.js +25 -25
- package/dist/x-menu-item.js +8 -8
- package/dist/x-menu.js +8 -8
- package/dist/x-metaball-cursor.js +18 -18
- package/dist/x-modal.js +10 -10
- package/dist/x-morph-stack.js +37 -37
- package/dist/x-multi-combobox.js +37 -37
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +21 -21
- package/dist/x-notification-center.js +9 -9
- package/dist/x-organic-divider.js +15 -15
- package/dist/x-organic-progress.js +32 -32
- package/dist/x-organic-shape.js +7 -7
- package/dist/x-otp-input.js +20 -20
- package/dist/x-pagination.js +11 -11
- package/dist/x-particle-button.js +39 -39
- package/dist/x-popover.js +24 -24
- package/dist/x-progress-circle.js +6 -6
- package/dist/x-progress.js +6 -6
- package/dist/x-proximity-list.js +20 -20
- package/dist/x-radio.js +12 -12
- package/dist/x-range-slider.js +27 -27
- package/dist/x-rating.js +22 -22
- package/dist/x-ripple-effect.js +8 -8
- package/dist/x-scroll-parallax.js +17 -17
- package/dist/x-scroll-stack.js +15 -15
- package/dist/x-scroll-story.js +30 -30
- package/dist/x-scroll-timeline.js +45 -45
- package/dist/x-scroll.js +34 -34
- package/dist/x-search-field.js +1 -1
- package/dist/x-select.js +1 -1
- package/dist/x-sidebar.js +15 -15
- package/dist/x-skeleton-group.js +12 -12
- package/dist/x-skeleton.js +1 -1
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +16 -16
- package/dist/x-spacer.js +4 -4
- package/dist/x-spinner.js +4 -4
- package/dist/x-splash.js +11 -11
- package/dist/x-split-pane.js +14 -14
- package/dist/x-spotlight-card.js +11 -11
- package/dist/x-stat.js +8 -8
- package/dist/x-stepper.js +13 -13
- package/dist/x-switch.js +11 -11
- package/dist/x-tab.js +6 -6
- package/dist/x-table-cell.js +17 -17
- package/dist/x-table-row.js +8 -8
- package/dist/x-table.js +12 -12
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +18 -18
- package/dist/x-theme.js +24 -24
- package/dist/x-timeline-item.js +18 -18
- package/dist/x-timeline.js +8 -8
- package/dist/x-toast.js +20 -20
- package/dist/x-toaster.js +6 -6
- package/dist/x-tooltip.js +11 -11
- package/dist/x-trace-history.js +112 -112
- package/dist/x-typography.js +5 -5
- package/dist/x-welcome-tour.js +57 -57
- package/package.json +1 -1
package/dist/x-liquid-dock.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
function(a){return typeof a==="string"&&a.trim().length>0?a.trim():null},
|
|
4
|
-
3,[$APP.
|
|
5
|
-
default:return-e}}(),$APP.
|
|
6
|
-
|
|
2
|
+
var oA=function(a){return typeof a==="string"?(a=a.trim().toLowerCase(),$APP.dd(baa,a)?a:"bottom"):"bottom"},pA=function(a,b,c,d){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?b:Math.min(d,Math.max(c,a))):b},qA=function(a){return pA(a,8,0,40)},rA=function(a){return pA(a,10,2,30)},sA=function(a){return typeof a==="string"&&a.trim().length>0?a.trim():"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7"},tA=function(a){return pA(a,8,0,40)},uA=function(a){return pA(a,.03,.005,.15)},vA=
|
|
3
|
+
function(a){return typeof a==="string"&&a.trim().length>0?a.trim():null},wA=function(a){return pA(a,150,40,400)},xA=function(a){return pA(a,.6,0,2)},yA=function(a){return pA(a,1,0,2)},zA=function(a,b){return a+(b-a)*.1},caa=function(a,b,c,d,e,f,h){a=c-a;b=d-b;d=Math.sqrt(a*a+b*b);e=Math.max(0,1-d/e);c=e*e;f=c*f*20;d=d>.001?1/d:0;return new $APP.M(null,4,[AA,e,$APP.lr,1+c*(h-1),BA,a*d*f*.3,CA,b*d*f*.3],null)},daa=function(a,b){var c=a*a;a=c*28;c=.6+c*.9;switch(b){case "bottom":return new $APP.M(null,
|
|
4
|
+
3,[$APP.Ws,0,$APP.Vs,-a,$APP.lr,c],null);case "top":return new $APP.M(null,3,[$APP.Ws,0,$APP.Vs,a,$APP.lr,c],null);case "left":return new $APP.M(null,3,[$APP.Ws,a,$APP.Vs,0,$APP.lr,c],null);case "right":return new $APP.M(null,3,[$APP.Ws,-a,$APP.Vs,0,$APP.lr,c],null);default:return new $APP.M(null,3,[$APP.Ws,0,$APP.Vs,-a,$APP.lr,c],null)}},eaa=function(a,b,c,d){a*=a;var e=12*d*a;return new $APP.M(null,3,[$APP.ev,function(){switch(c){case "bottom":return-e;case "top":return e;case "left":return e;case "right":return-e;
|
|
5
|
+
default:return-e}}(),$APP.Nu,5*d*a*b,$APP.lr,1+.12*d*a],null)},haa=function(a){if(!$APP.n($APP.l(a,"__xLiquidDockRefs"))){var b=$APP.l(a,"__xLiquidDockModel"),c=DA[0];DA[0]=c+1;var d="goo-"+$APP.P.i(c),e=a.attachShadow({mode:"open"}),f=document.createElement("style"),h=document.createElement("nav"),k=document.createElementNS("http://www.w3.org/2000/svg","svg"),m=document.createElement("div"),r=document.createElement("div"),u=document.createElement("slot");$APP.Q(a,"__xLiquidDockUid",c);f.textContent=
|
|
6
|
+
faa;$APP.S(h,"part","dock");$APP.S(h,"role","navigation");$APP.S(h,"aria-label","Navigation dock");$APP.S(k,"part","filter-svg");$APP.S(k,"aria-hidden","true");$APP.S(k,"role","presentation");$APP.S(m,"part","liquid-layer");m.style.filter="url(#"+$APP.P.i(d)+")";$APP.S(r,"part","items");r.appendChild(u);var x=$APP.G(b);b=$APP.C(x,$APP.sq);c=$APP.C(x,$APP.Fu);x=$APP.C(x,EA);var y=document.createElementNS("http://www.w3.org/2000/svg","defs"),B=document.createElementNS("http://www.w3.org/2000/svg","filter"),
|
|
7
7
|
E=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),H=document.createElementNS("http://www.w3.org/2000/svg","feColorMatrix"),O=document.createElementNS("http://www.w3.org/2000/svg","feTurbulence"),T=document.createElementNS("http://www.w3.org/2000/svg","feDisplacementMap");$APP.S(B,"id",d);$APP.S(B,"x","-20%");$APP.S(B,"y","-20%");$APP.S(B,"width","140%");$APP.S(B,"height","140%");$APP.S(E,"in","SourceGraphic");$APP.S(E,"stdDeviation",""+$APP.P.i(b));$APP.S(E,"result","blur");
|
|
8
8
|
$APP.S(H,"in","blur");$APP.S(H,"type","matrix");$APP.S(H,"values",c);$APP.S(H,"result","goo");$APP.S(O,"type","fractalNoise");$APP.S(O,"baseFrequency","0.015");$APP.S(O,"numOctaves","2");$APP.S(O,"seed","0");$APP.S(O,"result","noise");$APP.S(T,"in","goo");$APP.S(T,"in2","noise");$APP.S(T,"scale",""+$APP.P.i(x));$APP.S(T,"xChannelSelector","R");$APP.S(T,"yChannelSelector","G");B.appendChild(E);B.appendChild(H);B.appendChild(O);B.appendChild(T);y.appendChild(B);k.appendChild(y);d=new $APP.M(null,5,
|
|
9
|
-
[$APP.
|
|
10
|
-
a.getAttribute("color"),a.getAttribute("ripple-scale"),a.getAttribute("gap"),a.getAttribute("bob-intensity"),a.getAttribute("disabled"),a.getAttribute("magnet-radius")]);var b=$APP.G(a);a=$APP.C(b,$APP.
|
|
11
|
-
|
|
12
|
-
document.createElement("div"),m=$APP.
|
|
13
|
-
"__xLiquidDockRefs")),c=$APP.C(b,$APP.
|
|
14
|
-
""+$APP.P.i(c)+"px")},
|
|
15
|
-
"",c+=1;else break},
|
|
16
|
-
c))return b.preventDefault(),b=k<1?e-1:k-1,$APP.Q(a,"__xLiquidDockFocus",b),d[b].focus();if($APP.z.j(f,h))return b.preventDefault(),b=k>=e-1?0:k+1,$APP.Q(a,"__xLiquidDockFocus",b),d[b].focus();if(($APP.z.j(f,"Enter")||$APP.z.j(f," "))&&k>=0)return b.preventDefault(),
|
|
17
|
-
|
|
18
|
-
var r=$APP.l(a,"__xLiquidDockMouse");r.x=k.clientX-m.left;r.y=k.clientY-m.top;r.active=!0;k=void 0}else k=null;return k}var h=$APP.G($APP.l(a,"__xLiquidDockRefs"));h=$APP.C(h,$APP.
|
|
19
|
-
"__xLiquidDockHdl");if($APP.n(b)){a.removeEventListener("pointermove",$APP.
|
|
20
|
-
|
|
21
|
-
[]);$APP.Q(a,"__xLiquidDockItemsR",[]);$APP.Q(a,"__xLiquidDockFocus",-1);$APP.Q(a,"__xLiquidDockBurst",0);
|
|
22
|
-
$APP.Q(a,"__xLiquidDockRO",null)):null},
|
|
23
|
-
"__xLiquidDockRaf"))||
|
|
24
|
-
"items-div","items-div",-555506089),
|
|
25
|
-
"ripple-speed-raw",-1426902422),
|
|
26
|
-
$APP.
|
|
27
|
-
$APP.X],null)]);var
|
|
9
|
+
[$APP.Tt,B,$APP.Er,E,$APP.Nv,H,$APP.yu,O,$APP.bs,T],null);h.appendChild(k);h.appendChild(m);h.appendChild(r);e.appendChild(f);e.appendChild(h);$APP.Q(a,"__xLiquidDockRefs",$APP.Og($APP.Ec([d,new $APP.M(null,6,[$APP.Tk,e,$APP.Iq,h,$APP.Ds,k,FA,m,gaa,r,$APP.fo,u],null)])))}},PA=function(a){a=$APP.wg([$APP.ms,$APP.fv,GA,HA,$APP.hq,$APP.dw,IA,$APP.hr,JA,$APP.rr,KA],[a.getAttribute("position"),a.getAttribute("blur"),a.getAttribute("magnet-strength"),a.getAttribute("ripple-speed"),a.getAttribute("threshold"),
|
|
10
|
+
a.getAttribute("color"),a.getAttribute("ripple-scale"),a.getAttribute("gap"),a.getAttribute("bob-intensity"),a.getAttribute("disabled"),a.getAttribute("magnet-radius")]);var b=$APP.G(a);a=$APP.C(b,$APP.rr);var c=$APP.C(b,KA),d=$APP.C(b,$APP.ms),e=$APP.C(b,$APP.fv),f=$APP.C(b,GA),h=$APP.C(b,HA),k=$APP.C(b,$APP.hq),m=$APP.C(b,$APP.dw),r=$APP.C(b,IA),u=$APP.C(b,$APP.hr);b=$APP.C(b,JA);d=oA(d);return $APP.wg([$APP.fs,LA,MA,$APP.Fu,EA,$APP.sq,$APP.os,$APP.ns,NA,$APP.Xv,OA,$APP.Xj],[vA(m),uA(h),yA(b),sA(k),
|
|
11
|
+
tA(r),rA(e),$APP.z.j(d,"left")||$APP.z.j(d,"right"),qA(u),wA(c),d,xA(f),a!=null])},QA=function(a){a=$APP.fo.i($APP.l(a,"__xLiquidDockRefs"));return $APP.n(a)?a.assignedElements():null},RA=function(a){var b=$APP.G($APP.l(a,"__xLiquidDockRefs")),c=$APP.C(b,FA);b=function(){var u=QA(a);return $APP.n(u)?u:[]}().length*2;for(var d=function(){var u=$APP.l(a,"__xLiquidDockBlobs");return $APP.n(u)?u:[]}(),e=function(){var u=$APP.l(a,"__xLiquidDockBlobSt");return $APP.n(u)?u:[]}(),f=d.length,h=f;;)if(h<b){var k=
|
|
12
|
+
document.createElement("div"),m=$APP.qe(h);k.className=m?"blob blob-rest":"blob blob-phantom";var r=m?52:44;k.style.width=""+$APP.P.i(r)+"px";k.style.height=""+$APP.P.i(r)+"px";c.appendChild(k);d.push(k);e.push(m?{type:"rest"}:{type:"phantom",cpDx:0,cpDy:0,cpScale:.6,cLift:0,cRot:0,cScale:1});h+=1}else break;for(c=f;;)if(c>b)f=d.pop(),e.pop(),$APP.n(f.parentNode)&&f.parentNode.removeChild(f),--c;else break;$APP.Q(a,"__xLiquidDockBlobs",d);$APP.Q(a,"__xLiquidDockBlobSt",e)},SA=function(a){var b=$APP.G($APP.l(a,
|
|
13
|
+
"__xLiquidDockRefs")),c=$APP.C(b,$APP.Iq);b=QA(a);b=$APP.n(b)?b:[];var d=b.length,e=[];if($APP.n($APP.n(c)?d>0:c)){c=c.getBoundingClientRect();for(var f=0;;)if(f<d){var h=b[f].getBoundingClientRect();e.push({cx:h.left+h.width/2-c.left,cy:h.top+h.height/2-c.top});f+=1}else break}return $APP.Q(a,"__xLiquidDockItemsR",e)},TA=function(a,b){var c=$APP.G(b);b=$APP.C(c,$APP.fs);c=$APP.C(c,$APP.ns);$APP.n(b)?a.style.setProperty("--x-liquid-dock-color",b):a.style.removeProperty("--x-liquid-dock-color");a.style.setProperty("--x-liquid-dock-gap",
|
|
14
|
+
""+$APP.P.i(c)+"px")},VA=function(a){if($APP.D(window.matchMedia("(prefers-reduced-motion:reduce)").matches)||$APP.n($APP.Xj.i($APP.l(a,"__xLiquidDockModel"))))return null;$APP.Q(a,"__xLiquidDockSeed",0);return $APP.$i(a,"__xLiquidDockRaf",requestAnimationFrame(function(){return UA(a)}))},WA=function(a){var b=$APP.l(a,"__xLiquidDockRaf");$APP.n(b)&&(cancelAnimationFrame(b),$APP.$i(a,"__xLiquidDockRaf",null))},XA=function(a){a=QA(a);if($APP.n(a))for(var b=a.length,c=0;;)if(c<b)a[c].style.transform=
|
|
15
|
+
"",c+=1;else break},YA=function(a,b,c,d){$APP.Q(a,"__xLiquidDockBurst",Date.now());return $APP.hj(a,"x-liquid-dock-select",$APP.an(new $APP.M(null,3,["index",b,"item",c,"source",d],null)))},iaa=function(a,b){var c=$APP.l(a,"__xLiquidDockModel");if($APP.n($APP.Xj.i(c)))return null;var d=QA(a),e=$APP.n(d)?d.length:null,f=b.key,h=$APP.os.i(c);c=$APP.n(h)?"ArrowUp":"ArrowLeft";h=$APP.n(h)?"ArrowDown":"ArrowRight";var k=$APP.l(a,"__xLiquidDockFocus");k=$APP.n(k)?k:-1;if($APP.n($APP.n(e)?e>0:e)){if($APP.z.j(f,
|
|
16
|
+
c))return b.preventDefault(),b=k<1?e-1:k-1,$APP.Q(a,"__xLiquidDockFocus",b),d[b].focus();if($APP.z.j(f,h))return b.preventDefault(),b=k>=e-1?0:k+1,$APP.Q(a,"__xLiquidDockFocus",b),d[b].focus();if(($APP.z.j(f,"Enter")||$APP.z.j(f," "))&&k>=0)return b.preventDefault(),YA(a,k,d[k],"keyboard")}return null},jaa=function(a){RA(a);var b=QA(a);if($APP.n(b))for(var c=b.length,d=0;;)if(d<c){var e=b[d];e.getAttribute("tabindex")==null&&$APP.S(e,"tabindex","0");d+=1}else break;return requestAnimationFrame(function(){return SA(a)})},
|
|
17
|
+
kaa=function(a){function b(){return jaa(a)}function c(k){return iaa(a,k)}function d(k){if($APP.n($APP.Xj.i($APP.l(a,"__xLiquidDockModel"))))var m=null;else if(m=QA(a),$APP.n(m)){b:{k=k.target;for(var r=m.length,u=0;;)if(u<r){if($APP.z.j(k,m[u])){k=u;break b}u+=1}else{k=null;break b}k=void 0}m=$APP.n(k)?YA(a,k,m[k],"pointer"):null}else m=null;return m}function e(){$APP.l(a,"__xLiquidDockMouse").active=!1}function f(k){var m=$APP.G($APP.l(a,"__xLiquidDockRefs"));m=$APP.C(m,$APP.Iq);if($APP.n(m)){m=
|
|
18
|
+
m.getBoundingClientRect();var r=$APP.l(a,"__xLiquidDockMouse");r.x=k.clientX-m.left;r.y=k.clientY-m.top;r.active=!0;k=void 0}else k=null;return k}var h=$APP.G($APP.l(a,"__xLiquidDockRefs"));h=$APP.C(h,$APP.fo);a.addEventListener("pointermove",f);a.addEventListener("pointerleave",e);a.addEventListener("click",d);a.addEventListener("keydown",c);$APP.n(h)&&h.addEventListener("slotchange",b);$APP.Q(a,"__xLiquidDockHdl",new $APP.M(null,5,[$APP.Us,f,$APP.ds,e,$APP.et,d,$APP.Cs,c,$APP.fo,b],null))},ZA=function(a){var b=
|
|
19
|
+
$APP.l(a,"__xLiquidDockHdl");if($APP.n(b)){a.removeEventListener("pointermove",$APP.Us.i(b));a.removeEventListener("pointerleave",$APP.ds.i(b));a.removeEventListener("click",$APP.et.i(b));a.removeEventListener("keydown",$APP.Cs.i(b));var c=$APP.l(a,"__xLiquidDockRefs");$APP.n(c)&&(c=$APP.G(c),c=$APP.C(c,$APP.fo),$APP.n(c)&&c.removeEventListener("slotchange",$APP.fo.i(b)));$APP.Q(a,"__xLiquidDockHdl",null)}},laa=function(a){$APP.qj(a,"position","position",oA);$APP.qj(a,"gap","gap",qA);$APP.qj(a,"blur",
|
|
20
|
+
"blur",rA);$APP.qj(a,"threshold","threshold",sA);$APP.qj(a,"rippleScale","ripple-scale",tA);$APP.qj(a,"rippleSpeed","ripple-speed",uA);$APP.qj(a,"color","color",vA);$APP.qj(a,"magnetRadius","magnet-radius",wA);$APP.qj(a,"magnetStrength","magnet-strength",xA);$APP.qj(a,"bobIntensity","bob-intensity",yA);return $APP.kj(a,"disabled","disabled")},maa=function(a){var b=PA(a);$APP.Q(a,"__xLiquidDockModel",b);$APP.Q(a,"__xLiquidDockMouse",{x:0,y:0,active:!1});$APP.Q(a,"__xLiquidDockBlobs",[]);$APP.Q(a,"__xLiquidDockBlobSt",
|
|
21
|
+
[]);$APP.Q(a,"__xLiquidDockItemsR",[]);$APP.Q(a,"__xLiquidDockFocus",-1);$APP.Q(a,"__xLiquidDockBurst",0);haa(a);TA(a,b);$APP.n(a.hasAttribute("role"))||$APP.S(a,"role","navigation");ZA(a);kaa(a);b=$APP.l(a,"__xLiquidDockRO");$APP.n(b)&&b.disconnect();b=new ResizeObserver(function(){return SA(a)});$APP.Q(a,"__xLiquidDockRO",b);b.observe(a);return requestAnimationFrame(function(){RA(a);SA(a);return VA(a)})},naa=function(a){WA(a);ZA(a);XA(a);var b=$APP.l(a,"__xLiquidDockRO");return $APP.n(b)?(b.disconnect(),
|
|
22
|
+
$APP.Q(a,"__xLiquidDockRO",null)):null},oaa=function(a,b,c,d){if($APP.I(c,d))if(b=PA(a),$APP.I(b,$APP.l(a,"__xLiquidDockModel"))){if($APP.n($APP.l(a,"__xLiquidDockRefs"))){d=$APP.G(b);var e=$APP.C(d,$APP.sq);c=$APP.C(d,$APP.Fu);d=$APP.C(d,EA);var f=$APP.l(a,"__xLiquidDockRefs"),h=$APP.Er.i(f);$APP.n(h)&&$APP.S(h,"stdDeviation",""+$APP.P.i(e));e=$APP.Nv.i(f);$APP.n(e)&&$APP.S(e,"values",c);c=$APP.bs.i(f);$APP.n(c)&&$APP.S(c,"scale",""+$APP.P.i(d));TA(a,b);SA(a);$APP.n($APP.Xj.i(b))?(WA(a),XA(a)):$APP.n($APP.l(a,
|
|
23
|
+
"__xLiquidDockRaf"))||VA(a)}a=$APP.Q(a,"__xLiquidDockModel",b)}else a=null;else a=null;return a},$A=function(){return $APP.si("x-liquid-dock",new $APP.M(null,5,[$APP.ji,paa,$APP.hi,maa,$APP.ei,naa,$APP.di,oaa,$APP.ii,laa],null))},LA=new $APP.F(null,"ripple-speed","ripple-speed",229709223),EA=new $APP.F(null,"ripple-scale","ripple-scale",-1874116111),KA=new $APP.F(null,"magnet-radius-raw","magnet-radius-raw",1386161852),qaa=new $APP.F(null,"bobIntensity","bobIntensity",-531647277),gaa=new $APP.F(null,
|
|
24
|
+
"items-div","items-div",-555506089),raa=new $APP.F(null,"magnetStrength","magnetStrength",331224709),saa=new $APP.F(null,"rippleScale","rippleScale",-1633180735),NA=new $APP.F(null,"magnet-radius","magnet-radius",1447549494),FA=new $APP.F(null,"liquid","liquid",1322031275),AA=new $APP.F(null,"influence","influence",1453493017),JA=new $APP.F(null,"bob-intensity-raw","bob-intensity-raw",-669810474),GA=new $APP.F(null,"magnet-strength-raw","magnet-strength-raw",535053898),HA=new $APP.F(null,"ripple-speed-raw",
|
|
25
|
+
"ripple-speed-raw",-1426902422),taa=new $APP.F(null,"rippleSpeed","rippleSpeed",-1816718091),CA=new $APP.F(null,"ty","ty",158290825),BA=new $APP.F(null,"tx","tx",466630418),MA=new $APP.F(null,"bob-intensity","bob-intensity",-981181657),uaa=new $APP.F(null,"magnetRadius","magnetRadius",1616130031),OA=new $APP.F(null,"magnet-strength","magnet-strength",-1089389895),IA=new $APP.F(null,"ripple-scale-raw","ripple-scale-raw",1254964336);var paa="position gap blur threshold ripple-scale ripple-speed color magnet-radius magnet-strength disabled bob-intensity".split(" ");$APP.je(["x-liquid-dock-select",new $APP.M(null,4,[$APP.V,new $APP.M(null,3,[$APP.Vl,$APP.Y,$APP.Ks,$APP.dq,$APP.cu,$APP.X],null),$APP.pv,!0,$APP.Lv,!0,$APP.$u,!0],null)]);
|
|
26
|
+
$APP.wg([saa,$APP.fs,raa,$APP.un,$APP.Fu,uaa,qaa,$APP.sq,taa,$APP.ns,$APP.Xv],[new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.X],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.sj],null),new $APP.M(null,1,[$APP.N,$APP.X],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,
|
|
27
|
+
$APP.X],null)]);var baa=new $APP.ch(null,new $APP.M(null,4,["right",null,"top",null,"bottom",null,"left",null],null),null);var DA=[0],faa=":host{display:block;position:fixed;z-index:var("+$APP.P.i("--x-liquid-dock-z-index")+",50);pointer-events:auto;"+$APP.P.i("--x-liquid-dock-color")+':var(--x-color-primary,#6366f1);}:host(:not([position])),:host([position\x3d"bottom"]){bottom:12px;left:50%;transform:translateX(-50%);}:host([position\x3d"top"]){top:12px;left:50%;transform:translateX(-50%);}:host([position\x3d"left"]){left:12px;top:50%;transform:translateY(-50%);}:host([position\x3d"right"]){right:12px;top:50%;transform:translateY(-50%);}[part\x3ddock]{display:flex;align-items:center;gap:var('+
|
|
28
28
|
$APP.P.i("--x-liquid-dock-gap")+",8px);padding:var("+$APP.P.i("--x-liquid-dock-padding")+",8px);border-radius:var("+$APP.P.i("--x-liquid-dock-radius")+",20px);background:var("+$APP.P.i("--x-liquid-dock-bg")+",rgba(255,255,255,0.88));border:1px solid var("+$APP.P.i("--x-liquid-dock-border")+",rgba(148,163,184,0.22));box-shadow:var("+$APP.P.i("--x-liquid-dock-shadow")+',0 8px 24px rgba(15,23,42,0.12));backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);position:relative;outline:none;}:host([position\x3d"left"]) [part\x3ddock],:host([position\x3d"right"]) [part\x3ddock]{flex-direction:column;}[part\x3dfilter-svg]{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;}[part\x3dliquid-layer]{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none;}.blob{position:absolute;border-radius:50%;will-change:transform;pointer-events:none;background:var('+
|
|
29
29
|
$APP.P.i("--x-liquid-dock-color")+',#6366f1);top:0;left:0;}.blob-rest{opacity:0.65;}.blob-phantom{opacity:0.5;}[part\x3ditems]{display:flex;align-items:center;gap:inherit;position:relative;z-index:1;}:host([position\x3d"left"]) [part\x3ditems],:host([position\x3d"right"]) [part\x3ditems]{flex-direction:column;}::slotted(*){width:var('+$APP.P.i("--x-liquid-dock-item-size")+",48px);height:var("+$APP.P.i("--x-liquid-dock-item-size")+",48px);display:flex;align-items:center;justify-content:center;cursor:pointer;will-change:transform;position:relative;z-index:1;border:none;background:transparent;color:inherit;font-size:1.4em;transition:none;border-radius:50%;}::slotted(:hover){background:color-mix(in srgb,var("+
|
|
30
30
|
$APP.P.i("--x-liquid-dock-color")+",#6366f1) 12%,transparent);}::slotted(:focus-visible){outline:2px solid var("+$APP.P.i("--x-liquid-dock-color")+",#6366f1);outline-offset:2px;}@media(prefers-color-scheme:dark){:host{--x-liquid-dock-bg:rgba(15,23,42,0.84);--x-liquid-dock-border:rgba(51,65,85,0.9);--x-liquid-dock-shadow:var(--x-shadow-lg,0 14px 36px rgba(0,0,0,0.35));--x-liquid-dock-color:var(--x-color-primary,#818cf8);}}@media(prefers-reduced-motion:reduce){.blob{transition:none!important;}::slotted(*){transition:none!important;}}",
|
|
31
|
-
|
|
32
|
-
$APP.l(a,"__xLiquidDockBurst");return $APP.n(yc)?yc:0}();var aa=R-d<300;if(aa){R=(1-(R-d)/300)*20;var ma=
|
|
33
|
-
|
|
34
|
-
ia.cLift=fb;ia.cRot=Na;ia.cScale=Oa;Kb=T+R*2.39996;
|
|
35
|
-
"__xLiquidDockRefs");e=.012+.006*Math.sin(f);$APP.Q(a,"__xLiquidDockSeed",f);f=$APP.
|
|
31
|
+
UA=function UA(a){if($APP.n(a.isConnected)){var c=$APP.l(a,"__xLiquidDockModel"),d=$APP.l(a,"__xLiquidDockMouse"),e=$APP.l(a,"__xLiquidDockBlobs"),f=$APP.l(a,"__xLiquidDockBlobSt"),h=$APP.l(a,"__xLiquidDockItemsR"),k=function(){var yc=QA(a);return $APP.n(yc)?yc:[]}(),m=$APP.Sl.j(h.length,k.length),r=$APP.l(d,"x"),u=$APP.l(d,"y"),x=$APP.l(d,"active"),y=NA.i(c),B=OA.i(c),E=MA.i(c),H=$APP.Xv.i(c),O=1+B*.8,T=function(){var yc=$APP.l(a,"__xLiquidDockSeed");return $APP.n(yc)?yc:0}(),R=Date.now();d=function(){var yc=
|
|
32
|
+
$APP.l(a,"__xLiquidDockBurst");return $APP.n(yc)?yc:0}();var aa=R-d<300;if(aa){R=(1-(R-d)/300)*20;var ma=EA.i(c),ia=$APP.bs.i($APP.l(a,"__xLiquidDockRefs"));$APP.n(ia)&&$APP.Zi(ia,"scale",""+$APP.P.i(ma+R))}for(R=0;;)if(R<m){ma=h[R];var na=$APP.l(ma,"cx"),Na=$APP.l(ma,"cy");ia=R*2;var Oa=ia+1;if(Oa<e.length){ma=AA.i($APP.n(x)?caa(na,Na,r,u,y,B,O):new $APP.M(null,4,[AA,0,$APP.lr,1,BA,0,CA,0],null));ia=e[ia];var fb="translate("+$APP.P.i(na-26)+"px,"+$APP.P.i(Na-26)+"px)";ia.style.transform=fb;var rb=
|
|
33
|
+
daa(ma,H);ia=f[Oa];fb=$APP.Ws.i(rb);var Kb=$APP.Vs.i(rb);rb=$APP.lr.i(rb);fb=zA($APP.l(ia,"cpDx"),fb);Kb=zA($APP.l(ia,"cpDy"),Kb);rb=zA($APP.l(ia,"cpScale"),rb);ia.cpDx=fb;ia.cpDy=Kb;ia.cpScale=rb;Oa=e[Oa];Na="translate("+$APP.P.i(na-22+fb)+"px,"+$APP.P.i(Na-22+Kb)+"px) scale("+$APP.P.i(rb)+")";Oa.style.transform=Na;Oa=eaa(ma,$APP.n(x)?function(){var yc=r-na;return yc>1?1:yc<-1?-1:0}():0,H,E);fb=zA($APP.l(ia,"cLift"),$APP.ev.i(Oa));Na=zA($APP.l(ia,"cRot"),$APP.Nu.i(Oa));Oa=zA($APP.l(ia,"cScale"),
|
|
34
|
+
$APP.lr.i(Oa));ia.cLift=fb;ia.cRot=Na;ia.cScale=Oa;Kb=T+R*2.39996;rb=1-ma*.7;ma=Math.sin(Kb)*1.8*rb*E;ia=Math.cos(Kb*.7)*.8*rb*E;var Vb=Math.sin(Kb*1.3)*1.2*rb*E;Kb=k[R];rb=$APP.os.i(c);fb+=$APP.n(rb)?ia:ma;Na+=Vb;ma=$APP.n(rb)?"translate("+$APP.P.i(fb)+"px,"+$APP.P.i(ma)+"px) rotate("+$APP.P.i(Na)+"deg) scale("+$APP.P.i(Oa)+")":"translate("+$APP.P.i(ia)+"px,"+$APP.P.i(fb)+"px) rotate("+$APP.P.i(Na)+"deg) scale("+$APP.P.i(Oa)+")";Kb.style.transform=ma}R+=1}else break;f=$APP.l(a,"__xLiquidDockSeed")+
|
|
35
|
+
LA.i(c);h=$APP.l(a,"__xLiquidDockRefs");e=.012+.006*Math.sin(f);$APP.Q(a,"__xLiquidDockSeed",f);f=$APP.yu.i(h);$APP.n(f)&&$APP.Zi(f,"baseFrequency",""+$APP.P.i(e));!aa&&d>0&&(d=$APP.bs.i($APP.l(a,"__xLiquidDockRefs")),$APP.n(d)&&$APP.Zi(d,"scale",""+$APP.P.i(EA.i(c))),$APP.Q(a,"__xLiquidDockBurst",0));return $APP.$i(a,"__xLiquidDockRaf",requestAnimationFrame(function(){return UA.i?UA.i(a):UA.call(null,a)}))}return null};$APP.ha("baredom.exports.x_liquid_dock.init",$A);export const init=$A;
|
package/dist/x-liquid-fill.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var l$=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.
|
|
3
|
-
.7)},r$=function(a){if(typeof a==="string"){a=a.trim();if($APP.z.j(a,""))return 3;a=parseInt(a,10);return $APP.n(isNaN(a))?3:Math.min(5,Math.max(2,a))}return 3},u$=function(a,b){b=b>1?a/(b-1):1;return new $APP.M(null,6,[
|
|
4
|
-
3+b+d)+.3*Math.sin(a*6.283185307179586*5+b*1.3+d*1.7)+.2*Math.sin(a*6.283185307179586*7+b*.7+d*2.3))},
|
|
5
|
-
b=c.getPropertyValue("overflow-y");c=c.getPropertyValue("overflow-x");if($APP.z.j(b,"auto")||$APP.z.j(b,"scroll")||$APP.z.j(c,"auto")||$APP.z.j(c,"scroll"))break a;a=a.parentElement}else{a=null;break a}a=void 0}return a},
|
|
6
|
-
a.scrollHeight,a.clientHeight]},
|
|
7
|
-
"stop"),x=document.createElementNS("http://www.w3.org/2000/svg","filter"),y=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),B=document.createElementNS("http://www.w3.org/2000/svg","feSpecularLighting"),E=document.createElementNS("http://www.w3.org/2000/svg","fePointLight"),H=document.createElementNS("http://www.w3.org/2000/svg","feComposite"),O=document.createElementNS("http://www.w3.org/2000/svg","feComposite"),T=$APP.Ba(function(){return function Oa(Na){return new $APP.
|
|
8
|
-
function(){for(;;){var fb=$APP.q(Na);if(fb){if($APP
|
|
9
|
-
aa=document.createElement("slot"),ma=""+$APP.P.i("xlf-grad-")+$APP.P.i(b),ia=""+$APP.P.i("xlf-spec-")+$APP.P.i(b);d.textContent=
|
|
2
|
+
var l$=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.dd(sxa,a)?a:"vertical"},m$=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.dd(txa,a)?a:"fill"},n$=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.dd(uxa,a)?a:"gold"},o$=function(a,b){if(typeof a==="string"){a=a.trim();if($APP.z.j(a,""))return b;a=parseFloat(a);return $APP.n(isNaN(a))?b:Math.min(1,Math.max(0,a))}return b},p$=function(a){return o$(a,.5)},q$=function(a){return o$(a,
|
|
3
|
+
.7)},r$=function(a){if(typeof a==="string"){a=a.trim();if($APP.z.j(a,""))return 3;a=parseInt(a,10);return $APP.n(isNaN(a))?3:Math.min(5,Math.max(2,a))}return 3},u$=function(a,b){b=b>1?a/(b-1):1;return new $APP.M(null,6,[vxa,a*2.39996,s$,.7+.6*b,t$,.6+.8*b,$APP.Cu,200-a*30,$APP.nt,10+a*3,$APP.tq,1],null)},wxa=function(a,b,c){b-=c;return b<=0?0:Math.min(1,Math.max(0,a/b))},xxa=function(a,b,c){return c<=.001?0:Math.min(1,Math.abs(a-b)/c/2E3)},v$=function(a,b,c,d){return c*(.5*Math.sin(a*6.283185307179586*
|
|
4
|
+
3+b+d)+.3*Math.sin(a*6.283185307179586*5+b*1.3+d*1.7)+.2*Math.sin(a*6.283185307179586*7+b*.7+d*2.3))},yxa=function(a,b,c,d,e,f){b=c+(e*(b-a)-f*c)*d;return[a+b*d,b]},zxa=function(a,b,c){return a+(b-a)*c},Axa=function(){var a=w$+1;return w$=a},x$=function(){return $APP.D(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},y$=function(a,b){if(typeof b==="string"&&$APP.I(b.trim(),""))a=document.querySelector(b);else a:{for(a=a.parentElement;;)if($APP.n(a)){var c=window.getComputedStyle(a);
|
|
5
|
+
b=c.getPropertyValue("overflow-y");c=c.getPropertyValue("overflow-x");if($APP.z.j(b,"auto")||$APP.z.j(b,"scroll")||$APP.z.j(c,"auto")||$APP.z.j(c,"scroll"))break a;a=a.parentElement}else{a=null;break a}a=void 0}return a},Bxa=function(a,b){return a==null?$APP.z.j(b,"horizontal")?[window.scrollX,document.documentElement.scrollWidth,window.innerWidth]:[window.scrollY,document.documentElement.scrollHeight,window.innerHeight]:$APP.z.j(b,"horizontal")?[a.scrollLeft,a.scrollWidth,a.clientWidth]:[a.scrollTop,
|
|
6
|
+
a.scrollHeight,a.clientHeight]},Exa=function(a){var b=Axa(),c=a.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),f=document.createElementNS("http://www.w3.org/2000/svg","svg"),h=document.createElementNS("http://www.w3.org/2000/svg","defs"),k=document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),m=document.createElementNS("http://www.w3.org/2000/svg","stop"),r=document.createElementNS("http://www.w3.org/2000/svg","stop"),u=document.createElementNS("http://www.w3.org/2000/svg",
|
|
7
|
+
"stop"),x=document.createElementNS("http://www.w3.org/2000/svg","filter"),y=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),B=document.createElementNS("http://www.w3.org/2000/svg","feSpecularLighting"),E=document.createElementNS("http://www.w3.org/2000/svg","fePointLight"),H=document.createElementNS("http://www.w3.org/2000/svg","feComposite"),O=document.createElementNS("http://www.w3.org/2000/svg","feComposite"),T=$APP.Ba(function(){return function Oa(Na){return new $APP.Id(null,
|
|
8
|
+
function(){for(;;){var fb=$APP.q(Na);if(fb){if($APP.$c(fb)){var rb=$APP.Fb(fb),Kb=$APP.w(rb),Vb=$APP.Ld(Kb);a:{for(var yc=0;;)if(yc<Kb){$APP.Jc(rb,yc);var kg=Vb,Pg=document.createElementNS("http://www.w3.org/2000/svg","path");kg.add(Pg);yc+=1}else{rb=!0;break a}rb=void 0}return rb?$APP.Od(Vb.ea(),Oa($APP.Gb(fb))):$APP.Od(Vb.ea(),null)}$APP.t(fb);return $APP.Fd(document.createElementNS("http://www.w3.org/2000/svg","path"),Oa($APP.gc(fb)))}return null}},null)}($APP.qh(0,5))}()),R=document.createElement("div"),
|
|
9
|
+
aa=document.createElement("slot"),ma=""+$APP.P.i("xlf-grad-")+$APP.P.i(b),ia=""+$APP.P.i("xlf-spec-")+$APP.P.i(b);d.textContent=Cxa;$APP.S(e,"part","container");$APP.S(f,"part","svg");$APP.S(f,"viewBox","0 0 300 200");$APP.S(f,"preserveAspectRatio","none");$APP.S(f,"aria-hidden","true");$APP.S(k,"id",ma);$APP.S(k,"gradientUnits","userSpaceOnUse");$APP.S(k,"cx","150");$APP.S(k,"cy","200");$APP.S(k,"r","200");$APP.S(k,"fx","150");$APP.S(k,"fy","200");$APP.S(m,"offset","0%");$APP.S(m,"stop-color","var("+
|
|
10
10
|
$APP.P.i("--x-liquid-fill-color-1")+",#B8860B)");$APP.S(r,"offset","50%");$APP.S(r,"stop-color","var("+$APP.P.i("--x-liquid-fill-color-2")+",#D4AF37)");$APP.S(u,"offset","100%");$APP.S(u,"stop-color","var("+$APP.P.i("--x-liquid-fill-color-3")+",#F9F295)");k.appendChild(m);k.appendChild(r);k.appendChild(u);$APP.S(x,"id",ia);$APP.S(x,"x","-10%");$APP.S(x,"y","-10%");$APP.S(x,"width","120%");$APP.S(x,"height","120%");$APP.S(y,"in","SourceAlpha");$APP.S(y,"stdDeviation","3");$APP.S(y,"result","blur");
|
|
11
11
|
$APP.S(B,"in","blur");$APP.S(B,"surfaceScale","5");$APP.S(B,"specularConstant","0.75");$APP.S(B,"specularExponent","20");$APP.S(B,"lighting-color","var("+$APP.P.i("--x-liquid-fill-specular-color")+",rgba(255,255,240,0.6))");$APP.S(B,"result","specular");B.appendChild(E);$APP.S(E,"x","90");$APP.S(E,"y","-50");$APP.S(E,"z","200");$APP.S(H,"in","specular");$APP.S(H,"in2","SourceAlpha");$APP.S(H,"operator","in");$APP.S(H,"result","specClip");$APP.S(O,"in","SourceGraphic");$APP.S(O,"in2","specClip");$APP.S(O,
|
|
12
12
|
"operator","arithmetic");$APP.S(O,"k1","0");$APP.S(O,"k2","1");$APP.S(O,"k3","1");$APP.S(O,"k4","0");x.appendChild(y);x.appendChild(B);x.appendChild(H);x.appendChild(O);h.appendChild(k);h.appendChild(x);f.appendChild(h);for(h=0;;)if(h<5)m=T[h],$APP.S(m,"class","wave-layer"),$APP.S(m,"data-layer",""+$APP.P.i(h)),$APP.S(m,"fill","url(#"+$APP.P.i(ma)+")"),m.style.display="none",f.appendChild(m),h+=1;else break;$APP.S(R,"part","content");R.appendChild(aa);e.appendChild(f);e.appendChild(R);c.appendChild(d);
|
|
13
|
-
c.appendChild(e);$APP.Q(a,"__xLiquidFillUid",b);$APP.Q(a,"__xLiquidFillRefs",new $APP.M(null,8,[$APP.
|
|
14
|
-
var c=$APP.C(b,$APP.
|
|
15
|
-
"__xLiquidFillRefs"));a=$APP.C(c,z$);c=$APP.C(c,C$);for(var d=0;;)if(d<5){var e=a[d];if(d<b){var f=u$(d,b),h=$APP.z.j(d,b-1);e.style.display="";$APP.S(e,"opacity",""+$APP.P.i($APP.
|
|
16
|
-
"__xLiquidFillTime"),f=$APP.l(a,"__xLiquidFillProg"),h=$APP.
|
|
17
|
-
","+$APP.P.i(ia.toFixed(2))+" "+$APP.P.i(na.toFixed(2))+","+$APP.P.i(ma.toFixed(2)));R+=1}else break;T.push("L"+$APP.P.i(E.toFixed(2))+","+$APP.P.i(H.toFixed(2)));T.push("L0,"+$APP.P.i(H.toFixed(2)));T.push("Z");$APP.
|
|
18
|
-
","+$APP.P.i(ia.toFixed(2))),T+=1;else break;y.push("L0,"+$APP.P.i(E.toFixed(2)));y.push("L0,0");y.push("Z");$APP.
|
|
19
|
-
"d","M0,"+$APP.P.i(m.toFixed(2))+"L"+$APP.P.i(c.toFixed(2))+","+$APP.P.i(m.toFixed(2))+"L"+$APP.P.i(c.toFixed(2))+","+$APP.P.i(d.toFixed(2))+"L0,"+$APP.P.i(d.toFixed(2))+"Z")}else m=c*e,$APP.S(k,"d","M"+$APP.P.i(m.toFixed(2))+",0L"+$APP.P.i(m.toFixed(2))+","+$APP.P.i(d.toFixed(2))+"L0,"+$APP.P.i(d.toFixed(2))+"L0,0Z");h+=1}else return null;else return null},R$=function(a){if($APP.n($APP.l(a,"__xLiquidFillRaf")))return null;$APP
|
|
20
|
-
requestAnimationFrame(function(){return Q$(a)}))},S$=function(a){var b=$APP.l(a,"__xLiquidFillRaf");return $APP.n(b)?(cancelAnimationFrame(b),$APP
|
|
21
|
-
a),$APP.Q(a,"__xLiquidFillST",b),U$.i?U$.i(a):U$.call(null,a)));var c=$APP.l(a,"__xLiquidFillModel");b=$APP.l(a,"__xLiquidFillST");var d=$APP.
|
|
22
|
-
h:0}(),d));$APP.Q(a,"__xLiquidFillLS",e);$APP.Q(a,"__xLiquidFillLST",f);$APP.n(function(){var h=$APP.
|
|
23
|
-
"__xLiquidFillST");$APP.n(a)?a.addEventListener("scroll",c,{passive:!0}):window.addEventListener("scroll",c,{passive:!0});b.scrollAttached=!0}else return null},T$=function(a){var b=$APP.l(a,"__xLiquidFillHdl");if($APP.n($APP.n(b)?$APP.l(b,"scrollAttached"):b)){var c=$APP.l(b,"scroll");a=$APP.l(a,"__xLiquidFillST");$APP.n(a)?a.removeEventListener("scroll",c):window.removeEventListener("scroll",c);b.scrollAttached=!1}else return null},W$=function(a){var b=$APP.
|
|
24
|
-
y$(a,b);$APP.Q(a,"__xLiquidFillST",c);U$(a);V$(a);return b!=null&&c==null?requestAnimationFrame(function(){a:{if($APP.n(a.isConnected)){var d=$APP.
|
|
25
|
-
new IntersectionObserver(function(c){c=c[0].isIntersecting;$APP.Q(a,"__xLiquidFillVis",c);$APP.n(c)?(c=$APP.
|
|
26
|
-
A$);e=$APP.C(e,B$);var k=Math.max(c,d);$APP.S(f,"viewBox","0 0 "+$APP.P.i(c)+" "+$APP.P.i(d));$APP.S(h,"x",""+$APP.P.i(c*.3));$APP.S(e,"cx",""+$APP.P.i(c*.5));$APP.S(e,"cy",""+$APP.P.i(d));$APP.S(e,"r",""+$APP.P.i(k));$APP.S(e,"fx",""+$APP.P.i(c*.5));$APP.S(e,"fy",""+$APP.P.i(d));c=$APP.
|
|
27
|
-
(a=a.style,a.setProperty("--x-liquid-fill-color-1",$APP.
|
|
28
|
-
l$);$APP.
|
|
29
|
-
"__xLiquidFillSV",0);$APP
|
|
30
|
-
|
|
31
|
-
(S$(a),a=P$(a)):(O$(a),a=R$(a))):a=null}else a=null;else a=null;else a=null;return a},$$=function(){return $APP.
|
|
32
|
-
new $APP.F(null,"paths","paths",-1807389588),D$=new $APP.F(null,"theme-raw","theme-raw",1068228849),C$=new $APP.F(null,"filt-id","filt-id",-672558408),I$=new $APP.F(null,"wave-intensity","wave-intensity",-915557489),B$=new $APP.F(null,"grad","grad",1125187229),H$=new $APP.F(null,"theme","theme",-1247880880),Y$=new $APP.F(null,"color-3","color-3",265727868),E$=new $APP.F(null,"wave-intensity-raw","wave-intensity-raw",1563162777),
|
|
33
|
-
"splash-intensity","splash-intensity",-619909243),F$=new $APP.F(null,"splash-intensity-raw","splash-intensity-raw",1573376927);var
|
|
34
|
-
$APP.
|
|
35
|
-
new $APP.M(null,2,[$APP.N,$APP.Y,$APP.
|
|
36
|
-
var
|
|
37
|
-
null),"lava",new $APP.M(null,4,[$APP.
|
|
13
|
+
c.appendChild(e);$APP.Q(a,"__xLiquidFillUid",b);$APP.Q(a,"__xLiquidFillRefs",new $APP.M(null,8,[$APP.Tk,c,$APP.Ds,f,z$,T,$APP.Gq,R,A$,E,B$,k,C$,ia,Dxa,ma],null))},K$=function(a){a=new $APP.M(null,8,[$APP.fu,a.getAttribute("target"),$APP.Ku,a.getAttribute("orientation"),$APP.Gm,a.getAttribute("mode"),D$,a.getAttribute("theme"),E$,a.getAttribute("wave-intensity"),F$,a.getAttribute("splash-intensity"),G$,a.getAttribute("layers"),$APP.rr,a.getAttribute("disabled")],null);var b=$APP.G(a);a=$APP.C(b,$APP.fu);
|
|
14
|
+
var c=$APP.C(b,$APP.Ku),d=$APP.C(b,$APP.Gm),e=$APP.C(b,D$),f=$APP.C(b,E$),h=$APP.C(b,F$),k=$APP.C(b,G$);b=$APP.C(b,$APP.rr);return new $APP.M(null,8,[$APP.ew,typeof a==="string"&&$APP.I(a.trim(),"")?a.trim():null,$APP.au,l$(c),$APP.Mm,m$(d),H$,n$(e),I$,p$(f),J$,q$(h),$APP.sr,r$(k),$APP.Xj,b!=null],null)},L$=function(a,b){$APP.Q(a,"__xLiquidFillWA",new Float64Array(b));$APP.Q(a,"__xLiquidFillWV",new Float64Array(b));$APP.Q(a,"__xLiquidFillWP",new Float64Array(b))},M$=function(a,b){var c=$APP.G($APP.l(a,
|
|
15
|
+
"__xLiquidFillRefs"));a=$APP.C(c,z$);c=$APP.C(c,C$);for(var d=0;;)if(d<5){var e=a[d];if(d<b){var f=u$(d,b),h=$APP.z.j(d,b-1);e.style.display="";$APP.S(e,"opacity",""+$APP.P.i($APP.tq.i(f)));h?$APP.S(e,"filter","url(#"+$APP.P.i(c)+")"):$APP.U(e,"filter")}else e.style.display="none";d+=1}else break},N$=function(a){return $APP.z.j("vertical",$APP.au.i(a))&&$APP.I("bar",$APP.Mm.i(a))},O$=function(a){var b=$APP.l(a,"__xLiquidFillModel"),c=$APP.l(a,"__xLiquidFillW"),d=$APP.l(a,"__xLiquidFillH"),e=$APP.l(a,
|
|
16
|
+
"__xLiquidFillTime"),f=$APP.l(a,"__xLiquidFillProg"),h=$APP.sr.i(b);b=N$(b);var k=$APP.l(a,"__xLiquidFillWA"),m=$APP.l(a,"__xLiquidFillWP");a=$APP.G($APP.l(a,"__xLiquidFillRefs"));a=$APP.C(a,z$);if($APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c))for(var r=0;;)if(r<h){var u=a[r],x=k[r],y=m[r];if(b){var B=d*(1-f),E=c,H=d,O=e,T=[];T.push("M0,"+$APP.P.i((B+v$(0,O,x,y)).toFixed(2)));for(var R=0;;)if(R<10){var aa=(R+.5)/10,ma=(R+1)/10,ia=B+v$(aa,O,x,y),na=ma*E;ma=B+v$(ma,O,x,y);T.push("Q"+$APP.P.i((aa*E).toFixed(2))+
|
|
17
|
+
","+$APP.P.i(ia.toFixed(2))+" "+$APP.P.i(na.toFixed(2))+","+$APP.P.i(ma.toFixed(2)));R+=1}else break;T.push("L"+$APP.P.i(E.toFixed(2))+","+$APP.P.i(H.toFixed(2)));T.push("L0,"+$APP.P.i(H.toFixed(2)));T.push("Z");$APP.Zi(u,"d",T.join(""))}else{B=c*f;E=d;H=e;O=x;x=y;y=[];y.push("M"+$APP.P.i((B+v$(0,H,O,x)).toFixed(2))+",0");for(T=0;;)if(T<10)R=(T+.5)/10,na=(T+1)/10,aa=R*E,ia=na*E,na=B+v$(na,H,O,x),y.push("Q"+$APP.P.i((B+v$(R,H,O,x)).toFixed(2))+","+$APP.P.i(aa.toFixed(2))+" "+$APP.P.i(na.toFixed(2))+
|
|
18
|
+
","+$APP.P.i(ia.toFixed(2))),T+=1;else break;y.push("L0,"+$APP.P.i(E.toFixed(2)));y.push("L0,0");y.push("Z");$APP.Zi(u,"d",y.join(""))}r+=1}else break},P$=function(a){var b=$APP.l(a,"__xLiquidFillModel"),c=$APP.l(a,"__xLiquidFillW"),d=$APP.l(a,"__xLiquidFillH");var e=$APP.l(a,"__xLiquidFillProg");e=$APP.n(e)?e:0;var f=$APP.sr.i(b);b=N$(b);a=$APP.G($APP.l(a,"__xLiquidFillRefs"));a=$APP.C(a,z$);if($APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c))for(var h=0;;)if(h<f){var k=a[h];if(b){var m=d*(1-e);$APP.S(k,
|
|
19
|
+
"d","M0,"+$APP.P.i(m.toFixed(2))+"L"+$APP.P.i(c.toFixed(2))+","+$APP.P.i(m.toFixed(2))+"L"+$APP.P.i(c.toFixed(2))+","+$APP.P.i(d.toFixed(2))+"L0,"+$APP.P.i(d.toFixed(2))+"Z")}else m=c*e,$APP.S(k,"d","M"+$APP.P.i(m.toFixed(2))+",0L"+$APP.P.i(m.toFixed(2))+","+$APP.P.i(d.toFixed(2))+"L0,"+$APP.P.i(d.toFixed(2))+"L0,0Z");h+=1}else return null;else return null},R$=function(a){if($APP.n($APP.l(a,"__xLiquidFillRaf")))return null;$APP.$i(a,"__xLiquidFillLF",performance.now());return $APP.$i(a,"__xLiquidFillRaf",
|
|
20
|
+
requestAnimationFrame(function(){return Q$(a)}))},S$=function(a){var b=$APP.l(a,"__xLiquidFillRaf");return $APP.n(b)?(cancelAnimationFrame(b),$APP.$i(a,"__xLiquidFillRaf",null)):null},V$=function(a){if($APP.n(function(){var h=a.isConnected;return $APP.n(h)?(h=$APP.l(a,"__xLiquidFillVis"),$APP.n(h)?$APP.p($APP.Xj.i($APP.l(a,"__xLiquidFillModel"))):h):h}())){var b=$APP.l(a,"__xLiquidFillModel");$APP.l(a,"__xLiquidFillST")==null&&$APP.ew.i(b)!=null&&(b=y$(a,$APP.ew.i(b)),$APP.n(b)&&(T$.i?T$.i(a):T$.call(null,
|
|
21
|
+
a),$APP.Q(a,"__xLiquidFillST",b),U$.i?U$.i(a):U$.call(null,a)));var c=$APP.l(a,"__xLiquidFillModel");b=$APP.l(a,"__xLiquidFillST");var d=$APP.au.i(c);d=Bxa(b,d);var e=d[0];b=d[1];d=d[2];var f=performance.now();b=wxa(e,b,d);d=xxa(e,function(){var h=$APP.l(a,"__xLiquidFillLS");return $APP.n(h)?h:e}(),(f-function(){var h=$APP.l(a,"__xLiquidFillLST");return $APP.n(h)?h:f}())/1E3);$APP.Q(a,"__xLiquidFillTP",b);$APP.Q(a,"__xLiquidFillSV",Math.max(function(){var h=$APP.l(a,"__xLiquidFillSV");return $APP.n(h)?
|
|
22
|
+
h:0}(),d));$APP.Q(a,"__xLiquidFillLS",e);$APP.Q(a,"__xLiquidFillLST",f);$APP.n(function(){var h=$APP.Xj.i(c);return $APP.n(h)?h:x$()}())||R$(a);if($APP.n(function(){var h=$APP.Xj.i(c);return $APP.n(h)?h:x$()}()))return $APP.Q(a,"__xLiquidFillProg",b),P$(a),$APP.fj(a,"x-liquid-fill-progress",$APP.an(new $APP.M(null,2,[$APP.Qu,b,$APP.Bu,d],null)))}return null},U$=function(a){var b=$APP.l(a,"__xLiquidFillHdl");if($APP.n($APP.n(b)?$APP.p($APP.l(b,"scrollAttached")):b)){var c=$APP.l(b,"scroll");a=$APP.l(a,
|
|
23
|
+
"__xLiquidFillST");$APP.n(a)?a.addEventListener("scroll",c,{passive:!0}):window.addEventListener("scroll",c,{passive:!0});b.scrollAttached=!0}else return null},T$=function(a){var b=$APP.l(a,"__xLiquidFillHdl");if($APP.n($APP.n(b)?$APP.l(b,"scrollAttached"):b)){var c=$APP.l(b,"scroll");a=$APP.l(a,"__xLiquidFillST");$APP.n(a)?a.removeEventListener("scroll",c):window.removeEventListener("scroll",c);b.scrollAttached=!1}else return null},W$=function(a){var b=$APP.ew.i($APP.l(a,"__xLiquidFillModel")),c=
|
|
24
|
+
y$(a,b);$APP.Q(a,"__xLiquidFillST",c);U$(a);V$(a);return b!=null&&c==null?requestAnimationFrame(function(){a:{if($APP.n(a.isConnected)){var d=$APP.ew.i($APP.l(a,"__xLiquidFillModel"));if(d!=null&&$APP.l(a,"__xLiquidFillST")==null&&(d=y$(a,d),$APP.n(d))){T$(a);$APP.Q(a,"__xLiquidFillST",d);U$(a);d=V$(a);break a}}d=null}return d}):null},Fxa=function(a){$APP.Q(a,"__xLiquidFillHdl",{scroll:function(){return V$(a)},scrollAttached:!1})},X$=function(a){T$(a);$APP.Q(a,"__xLiquidFillHdl",null)},Gxa=function(a){var b=
|
|
25
|
+
new IntersectionObserver(function(c){c=c[0].isIntersecting;$APP.Q(a,"__xLiquidFillVis",c);$APP.n(c)?(c=$APP.Xj.i($APP.l(a,"__xLiquidFillModel")),c=$APP.n(c)?c:x$(),c=$APP.n(c)?null:R$(a)):c=S$(a);return c},{threshold:[0]});b.observe(a);$APP.Q(a,"__xLiquidFillIO",b);b=new ResizeObserver(function(c){a:{if(c.length>0){var d=c[0].contentRect;c=d.width;d=d.height;if(c>0&&d>0){$APP.Q(a,"__xLiquidFillW",c);$APP.Q(a,"__xLiquidFillH",d);var e=$APP.G($APP.l(a,"__xLiquidFillRefs")),f=$APP.C(e,$APP.Ds),h=$APP.C(e,
|
|
26
|
+
A$);e=$APP.C(e,B$);var k=Math.max(c,d);$APP.S(f,"viewBox","0 0 "+$APP.P.i(c)+" "+$APP.P.i(d));$APP.S(h,"x",""+$APP.P.i(c*.3));$APP.S(e,"cx",""+$APP.P.i(c*.5));$APP.S(e,"cy",""+$APP.P.i(d));$APP.S(e,"r",""+$APP.P.i(k));$APP.S(e,"fx",""+$APP.P.i(c*.5));$APP.S(e,"fy",""+$APP.P.i(d));c=$APP.Xj.i($APP.l(a,"__xLiquidFillModel"));c=$APP.n(c)?c:x$();if($APP.n(c)){c=P$(a);break a}O$(a);c=R$(a);break a}}c=null}return c});b.observe(a);$APP.Q(a,"__xLiquidFillRO",b)},Z$=function(a,b){b=$APP.C(Hxa,b);$APP.n(b)?
|
|
27
|
+
(a=a.style,a.setProperty("--x-liquid-fill-color-1",$APP.Pt.i(b)),a.setProperty("--x-liquid-fill-color-2",$APP.Qt.i(b)),a.setProperty("--x-liquid-fill-color-3",Y$.i(b)),a.setProperty("--x-liquid-fill-specular-color",$APP.$t.i(b))):(a=a.style,a.removeProperty("--x-liquid-fill-color-1"),a.removeProperty("--x-liquid-fill-color-2"),a.removeProperty("--x-liquid-fill-color-3"),a.removeProperty("--x-liquid-fill-specular-color"))},Ixa=function(a){$APP.oj(a,"target","target");$APP.qj(a,"orientation","orientation",
|
|
28
|
+
l$);$APP.qj(a,"mode","mode",m$);$APP.qj(a,"theme","theme",n$);$APP.qj(a,"waveIntensity","wave-intensity",p$);$APP.qj(a,"splashIntensity","splash-intensity",q$);$APP.qj(a,"layers","layers",r$);$APP.kj(a,"disabled","disabled");return Object.defineProperty(a,"progress",{get:function(){var b=$APP.l(this,"__xLiquidFillProg");return $APP.n(b)?b:0},enumerable:!0,configurable:!0})},Jxa=function(a){var b=K$(a);$APP.Q(a,"__xLiquidFillModel",b);$APP.Q(a,"__xLiquidFillProg",0);$APP.Q(a,"__xLiquidFillTP",0);$APP.Q(a,
|
|
29
|
+
"__xLiquidFillSV",0);$APP.$i(a,"__xLiquidFillTime",0);$APP.Q(a,"__xLiquidFillLD",-1);$APP.Q(a,"__xLiquidFillVis",!0);$APP.n($APP.l(a,"__xLiquidFillRefs"))||Exa(a);Z$(a,H$.i(b));L$(a,$APP.sr.i(b));M$(a,$APP.sr.i(b));X$(a);Fxa(a);Gxa(a);return W$(a)},Kxa=function(a){S$(a);X$(a);var b=$APP.l(a,"__xLiquidFillIO");$APP.n(b)&&(b.disconnect(),$APP.Q(a,"__xLiquidFillIO",null));b=$APP.l(a,"__xLiquidFillRO");$APP.n(b)&&(b.disconnect(),$APP.Q(a,"__xLiquidFillRO",null));return $APP.Q(a,"__xLiquidFillVis",!1)},
|
|
30
|
+
Lxa=function(a,b,c,d){if($APP.I(c,d))if($APP.n($APP.l(a,"__xLiquidFillRefs")))if(b=K$(a),c=$APP.l(a,"__xLiquidFillModel"),$APP.I(b,c)){$APP.Q(a,"__xLiquidFillModel",b);if(c==null||$APP.I($APP.sr.i(b),$APP.sr.i(c)))L$(a,$APP.sr.i(b)),M$(a,$APP.sr.i(b));(c==null||$APP.I(H$.i(b),H$.i(c)))&&Z$(a,H$.i(b));if(c==null||$APP.I($APP.ew.i(b),$APP.ew.i(c)))T$(a),W$(a);c=$APP.l(a,"__xLiquidFillW");d=$APP.l(a,"__xLiquidFillH");$APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c)?(b=$APP.Xj.i(b),b=$APP.n(b)?b:x$(),$APP.n(b)?
|
|
31
|
+
(S$(a),a=P$(a)):(O$(a),a=R$(a))):a=null}else a=null;else a=null;else a=null;return a},$$=function(){return $APP.si("x-liquid-fill",new $APP.M(null,5,[$APP.ji,Mxa,$APP.hi,Jxa,$APP.ei,Kxa,$APP.di,Lxa,$APP.ii,Ixa],null))},t$=new $APP.F(null,"amp-mult","amp-mult",698045242),A$=new $APP.F(null,"feLight","feLight",-1941454484),s$=new $APP.F(null,"speed-mult","speed-mult",-353631814),G$=new $APP.F(null,"layers-raw","layers-raw",-233899391),vxa=new $APP.F(null,"phase-offset","phase-offset",-1013192067),z$=
|
|
32
|
+
new $APP.F(null,"paths","paths",-1807389588),D$=new $APP.F(null,"theme-raw","theme-raw",1068228849),C$=new $APP.F(null,"filt-id","filt-id",-672558408),I$=new $APP.F(null,"wave-intensity","wave-intensity",-915557489),B$=new $APP.F(null,"grad","grad",1125187229),H$=new $APP.F(null,"theme","theme",-1247880880),Y$=new $APP.F(null,"color-3","color-3",265727868),E$=new $APP.F(null,"wave-intensity-raw","wave-intensity-raw",1563162777),Dxa=new $APP.F(null,"grad-id","grad-id",1430109665),J$=new $APP.F(null,
|
|
33
|
+
"splash-intensity","splash-intensity",-619909243),F$=new $APP.F(null,"splash-intensity-raw","splash-intensity-raw",1573376927);var Mxa="target orientation mode theme wave-intensity splash-intensity layers disabled".split(" ");
|
|
34
|
+
$APP.wg([new $APP.F(null,"waveIntensity","waveIntensity",695633410),$APP.un,new $APP.F(null,"splashIntensity","splashIntensity",1275664841),$APP.Mm,$APP.au,H$,$APP.sr,$APP.ew,$APP.Qu],[new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.sj],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.X],null),new $APP.M(null,1,[$APP.N,$APP.X],null),new $APP.M(null,1,[$APP.N,$APP.X],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.X],null),
|
|
35
|
+
new $APP.M(null,2,[$APP.N,$APP.Y,$APP.Ps,!0],null)]);$APP.je(["x-liquid-fill-progress",new $APP.M(null,2,[$APP.V,new $APP.M(null,2,[$APP.Qu,$APP.Y,$APP.Bu,$APP.Y],null),$APP.$u,!1],null)]);
|
|
36
|
+
var sxa=new $APP.ch(null,new $APP.M(null,2,["vertical",null,"horizontal",null],null),null),txa=new $APP.ch(null,new $APP.M(null,2,["bar",null,"fill",null],null),null),uxa=new $APP.ch(null,new $APP.M(null,4,["custom",null,"gold",null,"lava",null,"water",null],null),null),Hxa=new $APP.M(null,3,["gold",new $APP.M(null,4,[$APP.Pt,"#B8860B",$APP.Qt,"#D4AF37",Y$,"#F9F295",$APP.$t,"rgba(255,255,240,0.6)"],null),"water",new $APP.M(null,4,[$APP.Pt,"#0077B6",$APP.Qt,"#00B4D8",Y$,"#90E0EF",$APP.$t,"rgba(255,255,255,0.5)"],
|
|
37
|
+
null),"lava",new $APP.M(null,4,[$APP.Pt,"#8B0000",$APP.Qt,"#FF4500",Y$,"#FF8C00",$APP.$t,"rgba(255,255,200,0.7)"],null)],null);var w$=0,Cxa=":host{display:block;position:relative;overflow:hidden;"+$APP.P.i("--x-liquid-fill-bg")+":transparent;"+$APP.P.i("--x-liquid-fill-border")+":none;"+$APP.P.i("--x-liquid-fill-radius")+":0;"+$APP.P.i("--x-liquid-fill-opacity")+":1;"+$APP.P.i("--x-liquid-fill-wave-speed")+":1;"+$APP.P.i("--x-liquid-fill-color-1")+":#B8860B;"+$APP.P.i("--x-liquid-fill-color-2")+":#D4AF37;"+$APP.P.i("--x-liquid-fill-color-3")+":#F9F295;"+$APP.P.i("--x-liquid-fill-specular-color")+":rgba(255,255,240,0.6);}:host{background:var("+
|
|
38
38
|
$APP.P.i("--x-liquid-fill-bg")+",transparent);border:var("+$APP.P.i("--x-liquid-fill-border")+",none);border-radius:var("+$APP.P.i("--x-liquid-fill-radius")+",0);}:host([mode\x3dbar]){"+$APP.P.i("--x-liquid-fill-bar-height")+":14px;height:var("+$APP.P.i("--x-liquid-fill-bar-height")+",14px);}[part\x3dcontainer]{position:relative;width:100%;height:100%;overflow:hidden;border-radius:inherit;}[part\x3dsvg]{display:block;width:100%;height:100%;position:absolute;inset:0;pointer-events:none;opacity:var("+
|
|
39
|
-
$APP.P.i("--x-liquid-fill-opacity")+",1);}[part\x3dcontent]{position:relative;z-index:1;}."+$APP.P.i("wave-layer")+"{transition:none;}@media(prefers-color-scheme:dark){:host{"+$APP.P.i("--x-liquid-fill-bg")+":transparent;"+$APP.P.i("--x-liquid-fill-specular-color")+":rgba(255,255,200,0.4);}}@media(prefers-reduced-motion:reduce){."+$APP.P.i("wave-layer")+"{transition:none!important;}}",Q$=function Q$(a){if($APP.p(a.isConnected))return null;if($APP.n(function(){var O=$APP.
|
|
40
|
-
return $APP.n(O)?O:x$()}()))return $APP
|
|
41
|
-
r=$APP.l(a,"__xLiquidFillWA"),u=$APP.l(a,"__xLiquidFillWV"),x=$APP.l(a,"__xLiquidFillWP");$APP
|
|
42
|
-
$APP.
|
|
43
|
-
"__xLiquidFillTP");return $APP.n(O)?O:0}());return $APP.n(function(){var O=y[0];return $APP.n(O)?O:m>.01||H>.001}())?$APP
|
|
39
|
+
$APP.P.i("--x-liquid-fill-opacity")+",1);}[part\x3dcontent]{position:relative;z-index:1;}."+$APP.P.i("wave-layer")+"{transition:none;}@media(prefers-color-scheme:dark){:host{"+$APP.P.i("--x-liquid-fill-bg")+":transparent;"+$APP.P.i("--x-liquid-fill-specular-color")+":rgba(255,255,200,0.4);}}@media(prefers-reduced-motion:reduce){."+$APP.P.i("wave-layer")+"{transition:none!important;}}",Q$=function Q$(a){if($APP.p(a.isConnected))return null;if($APP.n(function(){var O=$APP.Xj.i($APP.l(a,"__xLiquidFillModel"));
|
|
40
|
+
return $APP.n(O)?O:x$()}()))return $APP.$i(a,"__xLiquidFillRaf",null);var c=$APP.l(a,"__xLiquidFillModel"),d=performance.now(),e=Math.min(d-$APP.l(a,"__xLiquidFillLF"),100)/1E3,f=function(){var O=window.getComputedStyle(a).getPropertyValue("--x-liquid-fill-wave-speed");O=typeof O==="string"?parseFloat(O.trim()):null;var T=O==null;T||(T=isNaN(O),T=$APP.n(T)?T:O<=0);return $APP.n(T)?1:O}(),h=$APP.sr.i(c),k=I$.i(c);c=J$.i(c);var m=function(){var O=$APP.l(a,"__xLiquidFillSV");return $APP.n(O)?O:0}(),
|
|
41
|
+
r=$APP.l(a,"__xLiquidFillWA"),u=$APP.l(a,"__xLiquidFillWV"),x=$APP.l(a,"__xLiquidFillWP");$APP.$i(a,"__xLiquidFillLF",d);$APP.$i(a,"__xLiquidFillTime",function(){var O=$APP.l(a,"__xLiquidFillTime");return $APP.n(O)?O:0}()+e*f);$APP.Q(a,"__xLiquidFillProg",zxa(function(){var O=$APP.l(a,"__xLiquidFillProg");return $APP.n(O)?O:0}(),function(){var O=$APP.l(a,"__xLiquidFillTP");return $APP.n(O)?O:0}(),5*e));var y=[!1];for(d=0;;)if(d<h){var B=u$(d,h),E=m*k*c*t$.i(B)*30+2*k*t$.i(B);E=yxa(r[d],E,u[d],e,$APP.Cu.i(B),
|
|
42
|
+
$APP.nt.i(B));r[d]=E[0];u[d]=E[1];x[d]+=e*f*s$.i(B);Math.abs(u[d])>.05&&(y[0]=!0);d+=1}else break;$APP.Q(a,"__xLiquidFillSV",m*Math.max(0,1-3*e));O$(a);e=$APP.l(a,"__xLiquidFillProg");Math.abs(e-function(){var O=$APP.l(a,"__xLiquidFillLD");return $APP.n(O)?O:-1}())>.005&&($APP.Q(a,"__xLiquidFillLD",e),$APP.fj(a,"x-liquid-fill-progress",$APP.an(new $APP.M(null,2,[$APP.Qu,e,$APP.Bu,m],null))));var H=Math.abs(function(){var O=$APP.l(a,"__xLiquidFillProg");return $APP.n(O)?O:0}()-function(){var O=$APP.l(a,
|
|
43
|
+
"__xLiquidFillTP");return $APP.n(O)?O:0}());return $APP.n(function(){var O=y[0];return $APP.n(O)?O:m>.01||H>.001}())?$APP.$i(a,"__xLiquidFillRaf",requestAnimationFrame(function(){return Q$.i?Q$.i(a):Q$.call(null,a)})):$APP.$i(a,"__xLiquidFillRaf",null)};$APP.ha("baredom.exports.x_liquid_fill.init",$$);export const init=$$;
|
package/dist/x-liquid-glass.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var Y2=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.z.j(a,""))return b;a=parseFloat(a);return $APP.n(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},Z2=function(a){if(typeof a==="string"){a=a.trim();if($APP.z.j(a,""))return 5;a=parseInt(a,10);return $APP.n(isNaN(a))?5:Math.min(8,Math.max(3,a))}return 5},
|
|
3
|
-
d3=function(a){return Y2(a,.5,0,1)},e3=function(a){return Y2(a,.4,.1,1)},f3=function(a){return Y2(a,.3,0,1)},
|
|
4
|
-
l3),k=$APP.C(b,$APP.
|
|
5
|
-
2.3+c*.5)*.5+Math.sin(a*3.1-c*.7)*Math.cos(b*1.3+c*.2)*.25+Math.sin(a*5.3+c*.4)*Math.cos(b*4.7-c*.6)*.125},
|
|
2
|
+
var Y2=function(a,b,c,d){if(typeof a==="string"){a=a.trim();if($APP.z.j(a,""))return b;a=parseFloat(a);return $APP.n(isNaN(a))?b:Math.min(d,Math.max(c,a))}return b},Z2=function(a){if(typeof a==="string"){a=a.trim();if($APP.z.j(a,""))return 5;a=parseInt(a,10);return $APP.n(isNaN(a))?5:Math.min(8,Math.max(3,a))}return 5},Asa=function(a){return Z2(a)},$2=function(a){return Y2(a,.3,.05,2)},a3=function(a){return Y2(a,.15,.05,.4)},b3=function(a){return Y2(a,12,0,40)},c3=function(a){return Y2(a,10,4,20)},
|
|
3
|
+
d3=function(a){return Y2(a,.5,0,1)},e3=function(a){return Y2(a,.4,.1,1)},f3=function(a){return Y2(a,.3,0,1)},Bsa=function(a){return typeof a==="string"?(a=a.trim(),$APP.I(a,"")?a:null):null},g3=function(a){return typeof a==="string"?(a=a.trim(),$APP.I(a,"")?a:null):null},Dsa=function(a){a=$APP.C(Csa,typeof a==="string"?a.trim().toLowerCase():null);return $APP.n(a)?a:h3},Esa=function(a){var b=$APP.G(a);a=$APP.C(b,$APP.rr);var c=$APP.C(b,i3),d=$APP.C(b,j3),e=$APP.C(b,$APP.fv),f=$APP.C(b,k3),h=$APP.C(b,
|
|
4
|
+
l3),k=$APP.C(b,$APP.Gm),m=$APP.C(b,m3),r=$APP.C(b,$APP.Mt),u=$APP.C(b,n3),x=$APP.C(b,o3),y=$APP.C(b,p3),B=$APP.C(b,q3);b=$APP.C(b,r3);return $APP.wg([s3,t3,u3,$APP.Wr,$APP.Mm,v3,w3,x3,$APP.Qt,$APP.sq,$APP.Pt,$APP.Dv,y3,$APP.Xj],[d3(u),c3(B),a3(h),$2(r),Dsa(k),Bsa(d),e3(c),b!=null,function(){var E=g3(x);return $APP.n(E)?E:"rgba(244,114,182,0.35)"}(),b3(e),function(){var E=g3(y);return $APP.n(E)?E:"rgba(99,102,241,0.4)"}(),Z2(f),f3(m),a!=null])},z3=function(a,b,c){return Math.sin(a*1.7+c*.3)*Math.cos(b*
|
|
5
|
+
2.3+c*.5)*.5+Math.sin(a*3.1-c*.7)*Math.cos(b*1.3+c*.2)*.25+Math.sin(a*5.3+c*.4)*Math.cos(b*4.7-c*.6)*.125},Fsa=function(){var a=$APP.l(A3,"v");A3.v=a+1;return a},B3=function(){return $APP.D(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},Hsa=function(a){var b=Fsa(),c=a.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElementNS("http://www.w3.org/2000/svg","svg"),f=document.createElementNS("http://www.w3.org/2000/svg","defs"),h=document.createElementNS("http://www.w3.org/2000/svg",
|
|
6
6
|
"filter"),k=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),m=document.createElementNS("http://www.w3.org/2000/svg","feColorMatrix"),r=document.createElementNS("http://www.w3.org/2000/svg","g"),u=document.createElementNS("http://www.w3.org/2000/svg","ellipse"),x=document.createElement("div"),y=document.createElement("div"),B=document.createElement("div"),E=document.createElement("div"),H=document.createElement("div"),O=document.createElement("slot"),T="lg-goo-"+$APP.P.i(b);
|
|
7
7
|
$APP.Q(a,"__xLiquidGlassUID",b);d.textContent=":host{display:block;position:relative;isolation:isolate;min-width:120px;min-height:80px;"+$APP.P.i("--x-liquid-glass-padding")+":1.5rem;"+$APP.P.i("--x-liquid-glass-specular-color")+":rgba(255,255,255,0.6);"+$APP.P.i("--x-liquid-glass-spring")+":"+$APP.P.i("linear(0, 0.006, 0.025, 0.058, 0.104, 0.163, 0.234, 0.315, 0.403, 0.496, 0.591, 0.685, 0.774, 0.856, 0.926, 0.983, 1.025, 1.052, 1.065, 1.063, 1.049, 1.025, 0.995, 0.961, 0.927, 0.896, 0.870, 0.850, 0.837, 0.831, 0.832, 0.839, 0.851, 0.867, 0.885, 0.903, 0.921, 0.937, 0.951, 0.962, 0.970, 0.976, 0.979, 0.981, 0.981, 0.980, 0.979, 0.977, 0.976, 0.975, 0.975, 0.976, 0.977, 0.979, 0.981, 0.983, 0.986, 0.989, 0.992, 0.995, 0.998, 1)")+
|
|
8
8
|
";"+$APP.P.i("--x-liquid-glass-spring-duration")+":"+$APP.P.i("600ms")+";}[part\x3dsvg]{display:block;width:100%;height:100%;position:absolute;inset:0;overflow:visible;pointer-events:none;z-index:1;}[part\x3dglass]{position:absolute;inset:0;backdrop-filter:blur(var("+$APP.P.i("--x-liquid-glass-blur")+",12px)) saturate(180%);-webkit-backdrop-filter:blur(var("+$APP.P.i("--x-liquid-glass-blur")+",12px)) saturate(180%);z-index:0;}[part\x3dgrain]{position:absolute;inset:0;z-index:2;opacity:0.4;pointer-events:none;}[part\x3dgradient]{position:absolute;inset:0;z-index:1;pointer-events:none;}[part\x3dspecular]{position:absolute;inset:0;z-index:1;opacity:0;pointer-events:none;transition:background var("+
|
|
@@ -17,26 +17,26 @@ $APP.Q(a,"__xLiquidGlassBorderG",m);$APP.Q(a,"__xLiquidGlassBorderCore",R);m=doc
|
|
|
17
17
|
"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0");m.appendChild(aa);m.appendChild(ma);f.appendChild(m);$APP.Q(a,"__xLiquidGlassGrainId",R);m=document.createElementNS("http://www.w3.org/2000/svg","mask");b="lg-mask-"+$APP.P.i(b);R=document.createElementNS("http://www.w3.org/2000/svg","g");aa=document.createElementNS("http://www.w3.org/2000/svg","ellipse");$APP.S(m,"id",b);$APP.S(m,"maskUnits","userSpaceOnUse");$APP.S(m,"maskContentUnits","userSpaceOnUse");$APP.S(R,"filter","url(#"+$APP.P.i(T)+")");
|
|
18
18
|
$APP.S(aa,"fill","white");R.appendChild(aa);m.appendChild(R);f.appendChild(m);$APP.Q(a,"__xLiquidGlassMaskG",R);$APP.Q(a,"__xLiquidGlassMaskCore",aa);$APP.Q(a,"__xLiquidGlassMaskSats",[]);$APP.Q(a,"__xLiquidGlassMaskId",b);$APP.S(x,"part","glass");f="url(#"+$APP.P.i($APP.l(a,"__xLiquidGlassMaskId"))+")";x.style.mask=f;x.style.webkitMask=f;$APP.S(y,"part","grain");y.style.filter="url(#"+$APP.P.i($APP.l(a,"__xLiquidGlassGrainId"))+")";f="url(#"+$APP.P.i($APP.l(a,"__xLiquidGlassMaskId"))+")";y.style.mask=
|
|
19
19
|
f;y.style.webkitMask=f;$APP.S(B,"part","gradient");f="url(#"+$APP.P.i($APP.l(a,"__xLiquidGlassMaskId"))+")";B.style.mask=f;B.style.webkitMask=f;$APP.S(E,"part","specular");f="url(#"+$APP.P.i($APP.l(a,"__xLiquidGlassMaskId"))+")";E.style.mask=f;E.style.webkitMask=f;$APP.S(H,"part","content");H.appendChild(O);c.appendChild(d);c.appendChild(x);c.appendChild(e);c.appendChild(y);c.appendChild(B);c.appendChild(E);c.appendChild(H);$APP.S(a,"data-entering","");setTimeout(function(){return $APP.U(a,"data-entering")},
|
|
20
|
-
700);$APP.Q(a,"__xLiquidGlassRefs",$APP.
|
|
21
|
-
$APP.S(x,"cy",""+$APP.P.i(f));$APP.S(x,"rx",""+$APP.P.i(h));$APP.S(x,"ry",""+$APP.P.i(k));x=$APP.l(a,"__xLiquidGlassMaskCore");$APP.n(x)&&($APP.S(x,"cx",""+$APP.P.i(e)),$APP.S(x,"cy",""+$APP.P.i(f)),$APP.S(x,"rx",""+$APP.P.i(h)),$APP.S(x,"ry",""+$APP.P.i(k)));b*=.44;c*=.44;h=$APP.l(a,"__xLiquidGlassBorderCore");$APP.n(h)&&($APP.S(h,"cx",""+$APP.P.i(e)),$APP.S(h,"cy",""+$APP.P.i(f)),$APP.S(h,"rx",""+$APP.P.i(b)),$APP.S(h,"ry",""+$APP.P.i(c)));f=$APP.l(a,"__xLiquidGlassRefs");e=$APP.
|
|
20
|
+
700);$APP.Q(a,"__xLiquidGlassRefs",$APP.wg([$APP.Gq,$APP.$t,C3,$APP.zu,Gsa,D3,$APP.sq,$APP.Tk,E3,$APP.Ds,F3,G3],[H,E,x,r,h,[],k,c,B,e,u,y]))},H3=function(a,b,c){var d=$APP.Dv.i($APP.l(a,"__xLiquidGlassModel")),e=b/2,f=c/2,h=b*.32,k=c*.32,m=h*.55,r=k*.55;var u=h*.9;for(var x=k*.9,y=new Float64Array(d),B=new Float64Array(d),E=0;;)if(E<d){var H=2*Math.PI*(E/d);y[E]=e+u*Math.cos(H);B[E]=f+x*Math.sin(H);E+=1}else break;u=[y,B];x=$APP.G($APP.l(a,"__xLiquidGlassRefs"));x=$APP.C(x,F3);$APP.S(x,"cx",""+$APP.P.i(e));
|
|
21
|
+
$APP.S(x,"cy",""+$APP.P.i(f));$APP.S(x,"rx",""+$APP.P.i(h));$APP.S(x,"ry",""+$APP.P.i(k));x=$APP.l(a,"__xLiquidGlassMaskCore");$APP.n(x)&&($APP.S(x,"cx",""+$APP.P.i(e)),$APP.S(x,"cy",""+$APP.P.i(f)),$APP.S(x,"rx",""+$APP.P.i(h)),$APP.S(x,"ry",""+$APP.P.i(k)));b*=.44;c*=.44;h=$APP.l(a,"__xLiquidGlassBorderCore");$APP.n(h)&&($APP.S(h,"cx",""+$APP.P.i(e)),$APP.S(h,"cy",""+$APP.P.i(f)),$APP.S(h,"rx",""+$APP.P.i(b)),$APP.S(h,"ry",""+$APP.P.i(c)));f=$APP.l(a,"__xLiquidGlassRefs");e=$APP.zu.i(f);f=D3.i(f);
|
|
22
22
|
c=$APP.l(a,"__xLiquidGlassMaskG");b=$APP.l(a,"__xLiquidGlassMaskSats");for(h=f.length-1;;)if(h>=d)e.removeChild(f[h]),$APP.n(c)&&c.removeChild(b[h]),--h;else break;f.length>d&&(f.length=d,$APP.n(b)&&(b.length=d));for(h=f.length;;)if(h<d)k=document.createElementNS("http://www.w3.org/2000/svg","ellipse"),$APP.S(k,"class","blob-sat-"+$APP.P.i(h)),$APP.S(k,"fill","#ffffff"),e.appendChild(k),f.push(k),$APP.n(c)&&(k=document.createElementNS("http://www.w3.org/2000/svg","ellipse"),$APP.S(k,"fill","white"),
|
|
23
|
-
c.appendChild(k),b.push(k)),h+=1;else break;e=$APP.G($APP.l(a,"__xLiquidGlassRefs"));e=$APP.C(e,D3);f=$APP.l(a,"__xLiquidGlassMaskSats");for(c=0;;)if(c<d)b=e[c],$APP.S(b,"rx",""+$APP.P.i(m)),$APP.S(b,"ry",""+$APP.P.i(r)),$APP.n($APP.n(f)?c<f.length:f)&&(b=f[c],$APP.S(b,"rx",""+$APP.P.i(m)),$APP.S(b,"ry",""+$APP.P.i(r))),c+=1;else break;$APP.Q(a,"__xLiquidGlassRX",u[0]);$APP.Q(a,"__xLiquidGlassRY",u[1])},J3=function(a,b){var c=$APP.l(a,"__xLiquidGlassRefs"),d=$APP.
|
|
24
|
-
h=F3.i(c),k=$APP.
|
|
25
|
-
"px)";d.style.opacity=""+$APP.P.i(m.toFixed(2));d.style.mask=e;d.style.webkitMask=e;$APP.S(k,"opacity",r.toFixed(2));$APP.n(c)&&(c.style.opacity=u.toFixed(2));a.style.contain="layout style"}else d.style.position="relative",d.style.zIndex="3",d.style.filter="",d.style.opacity="",d.style.mask="",d.style.webkitMask="",$APP.S(k,"opacity","0.35"),$APP.n(c)&&(c.style.opacity="0.4"),a.style.contain="";$APP.n(x3.i(b))||(f.style.opacity="0")},K3=function(a,b){var c=$APP.l(a,"__xLiquidGlassModel"),d=$APP.
|
|
26
|
-
e=$APP.
|
|
27
|
-
m+=1}else break},
|
|
28
|
-
"px "+$APP.P.i(h)+"px at "+$APP.P.i(e.toFixed(1))+"px "+$APP.P.i(f.toFixed(1))+"px,"+$APP.P.i(a)+" 0%,transparent 100%)"):c.style.opacity="0"}},
|
|
29
|
-
$APP.P.i(f.toFixed(1))+"% "+$APP.P.i(h.toFixed(1))+"%,"+$APP.P.i(c)+" 0%,transparent 70%)"},M3=function(a){if($APP.n($APP.l(a,"__xLiquidGlassRaf")))return null;$APP
|
|
30
|
-
d=$APP.l(a,"__xLiquidGlassRY"),e=$APP.G($APP.l(a,"__xLiquidGlassRefs"));e=$APP.C(e,D3);a=$APP.l(a,"__xLiquidGlassMaskSats");for(var f=0;;)if(f<b){var h=c[f].toFixed(2),k=d[f].toFixed(2);if(f<e.length){var m=e[f];$APP.S(m,"cx",h);$APP.S(m,"cy",k)}$APP.n($APP.n(a)?f<a.length:a)&&(m=a[f],$APP.S(m,"cx",h),$APP.S(m,"cy",k));f+=1}else return null},
|
|
31
|
-
"__xLiquidGlassRefs"));d=$APP.C(d,$APP.
|
|
32
|
-
|
|
33
|
-
$APP.n(b)&&(a.removeEventListener("pointermove",$APP.l(b,"move")),a.removeEventListener("pointerenter",$APP.l(b,"enter")),a.removeEventListener("pointerleave",$APP.l(b,"leave")),$APP.Q(a,"__xLiquidGlassHdl",null))},Q3=function(a){return
|
|
34
|
-
a.getAttribute("color-1"),a.getAttribute("goo"),a.getAttribute("specular"),a.getAttribute("disabled"),a.getAttribute("specular-size"),a.getAttribute("tint")]))},
|
|
35
|
-
e:0}()),M3(a)));return $APP.Q(a,"__xLiquidGlassModel",b)}return null},
|
|
36
|
-
"mode","mode",
|
|
37
|
-
|
|
38
|
-
"specular-intensity",437849876),l3=new $APP.F(null,"amplitude-raw","amplitude-raw",-673525115),t3=new $APP.F(null,"goo","goo",-1253057564),C3=new $APP.F(null,"glass","glass",1652756718),
|
|
23
|
+
c.appendChild(k),b.push(k)),h+=1;else break;e=$APP.G($APP.l(a,"__xLiquidGlassRefs"));e=$APP.C(e,D3);f=$APP.l(a,"__xLiquidGlassMaskSats");for(c=0;;)if(c<d)b=e[c],$APP.S(b,"rx",""+$APP.P.i(m)),$APP.S(b,"ry",""+$APP.P.i(r)),$APP.n($APP.n(f)?c<f.length:f)&&(b=f[c],$APP.S(b,"rx",""+$APP.P.i(m)),$APP.S(b,"ry",""+$APP.P.i(r))),c+=1;else break;$APP.Q(a,"__xLiquidGlassRX",u[0]);$APP.Q(a,"__xLiquidGlassRY",u[1])},J3=function(a,b){var c=$APP.l(a,"__xLiquidGlassRefs"),d=$APP.sq.i(c),e=C3.i(c),f=$APP.$t.i(c),
|
|
24
|
+
h=F3.i(c),k=$APP.zu.i(c);$APP.S(d,"stdDeviation",""+$APP.P.i(t3.i(b)));e.style.setProperty("--x-liquid-glass-blur",""+$APP.P.i($APP.sq.i(b))+"px");$APP.S(h,"fill","#ffffff");d=D3.i(c);e=d.length;for(h=0;;)if(h<e)$APP.S(d[h],"fill","#ffffff"),h+=1;else break;h=$APP.z.j(I3,$APP.Mm.i(b));d=$APP.Gq.i(c);c=G3.i(c);e="url(#"+$APP.P.i($APP.l(a,"__xLiquidGlassMaskId"))+")";if(h){d.style.position="relative";d.style.zIndex="0";h=s3.i(b);var m=1-h*.5,r=h*.35,u=h*.2;d.style.filter="blur("+$APP.P.i((h*2).toFixed(1))+
|
|
25
|
+
"px)";d.style.opacity=""+$APP.P.i(m.toFixed(2));d.style.mask=e;d.style.webkitMask=e;$APP.S(k,"opacity",r.toFixed(2));$APP.n(c)&&(c.style.opacity=u.toFixed(2));a.style.contain="layout style"}else d.style.position="relative",d.style.zIndex="3",d.style.filter="",d.style.opacity="",d.style.mask="",d.style.webkitMask="",$APP.S(k,"opacity","0.35"),$APP.n(c)&&(c.style.opacity="0.4"),a.style.contain="";$APP.n(x3.i(b))||(f.style.opacity="0")},K3=function(a,b){var c=$APP.l(a,"__xLiquidGlassModel"),d=$APP.Dv.i(c),
|
|
26
|
+
e=$APP.Wr.i(c);c=u3.i(c)*(Math.min($APP.l(a,"__xLiquidGlassW"),$APP.l(a,"__xLiquidGlassH"))*.32)*.6;var f=$APP.l(a,"__xLiquidGlassRX"),h=$APP.l(a,"__xLiquidGlassRY"),k=$APP.G($APP.l(a,"__xLiquidGlassRefs"));k=$APP.C(k,D3);a=$APP.l(a,"__xLiquidGlassMaskSats");for(var m=0;;)if(m<d){var r=m*2.39996;var u=[f[m]+c*z3(r,0,b*e),h[m]+c*z3(0,r,b*e)];r=u[0].toFixed(2);u=u[1].toFixed(2);var x=k[m];$APP.Zi(x,"cx",r);$APP.Zi(x,"cy",u);$APP.n($APP.n(a)?m<a.length:a)&&(x=a[m],$APP.Zi(x,"cx",r),$APP.Zi(x,"cy",u));
|
|
27
|
+
m+=1}else break},Isa=function(a){var b=$APP.l(a,"__xLiquidGlassModel"),c=$APP.$t.i($APP.l(a,"__xLiquidGlassRefs"));if($APP.n(x3.i(b))){var d=$APP.l(a,"__xLiquidGlassPA"),e=$APP.l(a,"__xLiquidGlassPX"),f=$APP.l(a,"__xLiquidGlassPY"),h=$APP.l(a,"__xLiquidGlassW");a=$APP.l(a,"__xLiquidGlassH");h=w3.i(b)*Math.min(h,a);a="var("+$APP.P.i("--x-liquid-glass-specular-color")+",rgba(255,255,255,0.6))";$APP.n(d)?(c.style.opacity=""+$APP.P.i(y3.i(b)),c.style.background="radial-gradient(ellipse "+$APP.P.i(h)+
|
|
28
|
+
"px "+$APP.P.i(h)+"px at "+$APP.P.i(e.toFixed(1))+"px "+$APP.P.i(f.toFixed(1))+"px,"+$APP.P.i(a)+" 0%,transparent 100%)"):c.style.opacity="0"}},Jsa=function(a,b){var c=$APP.l(a,"__xLiquidGlassModel");a=E3.i($APP.l(a,"__xLiquidGlassRefs"));var d=$APP.Pt.i(c);c=$APP.Qt.i(c);var e=20+8*Math.cos(b*.09),f=70+12*Math.cos(b*.05),h=80+10*Math.sin(b*.06);a.style.background="radial-gradient(ellipse at "+$APP.P.i((30+10*Math.sin(b*.07)).toFixed(1))+"% "+$APP.P.i(e.toFixed(1))+"%,"+$APP.P.i(d)+" 0%,transparent 70%),radial-gradient(ellipse at "+
|
|
29
|
+
$APP.P.i(f.toFixed(1))+"% "+$APP.P.i(h.toFixed(1))+"%,"+$APP.P.i(c)+" 0%,transparent 70%)"},M3=function(a){if($APP.n($APP.l(a,"__xLiquidGlassRaf")))return null;$APP.$i(a,"__xLiquidGlassLF",performance.now());return $APP.$i(a,"__xLiquidGlassRaf",requestAnimationFrame(function(){return L3(a)}))},N3=function(a){var b=$APP.l(a,"__xLiquidGlassRaf");$APP.n(b)&&(cancelAnimationFrame(b),$APP.$i(a,"__xLiquidGlassRaf",null))},O3=function(a){var b=$APP.Dv.i($APP.l(a,"__xLiquidGlassModel")),c=$APP.l(a,"__xLiquidGlassRX"),
|
|
30
|
+
d=$APP.l(a,"__xLiquidGlassRY"),e=$APP.G($APP.l(a,"__xLiquidGlassRefs"));e=$APP.C(e,D3);a=$APP.l(a,"__xLiquidGlassMaskSats");for(var f=0;;)if(f<b){var h=c[f].toFixed(2),k=d[f].toFixed(2);if(f<e.length){var m=e[f];$APP.S(m,"cx",h);$APP.S(m,"cy",k)}$APP.n($APP.n(a)?f<a.length:a)&&(m=a[f],$APP.S(m,"cx",h),$APP.S(m,"cy",k));f+=1}else return null},Ksa=function(a,b){if(b.length>0){var c=b[0].contentRect;b=c.width;c=c.height;if(b>0&&c>0){$APP.Q(a,"__xLiquidGlassW",b);$APP.Q(a,"__xLiquidGlassH",c);var d=$APP.G($APP.l(a,
|
|
31
|
+
"__xLiquidGlassRefs"));d=$APP.C(d,$APP.Ds);$APP.S(d,"viewBox","0 0 "+$APP.P.i(b)+" "+$APP.P.i(c));d=d.querySelector("#"+$APP.P.i($APP.l(a,"__xLiquidGlassMaskId")));$APP.n(d)&&($APP.S(d,"x","0"),$APP.S(d,"y","0"),$APP.S(d,"width",""+$APP.P.i(b)),$APP.S(d,"height",""+$APP.P.i(c)));H3(a,b,c);var e=$APP.l(a,"__xLiquidGlassModel");J3(a,e);if($APP.n(function(){var f=$APP.Xj.i(e);return $APP.n(f)?f:B3()}()))return O3(a);K3(a,function(){var f=$APP.l(a,"__xLiquidGlassTime");return $APP.n(f)?f:0}());return M3(a)}}return null},
|
|
32
|
+
Lsa=function(a){function b(){return $APP.Q(a,"__xLiquidGlassPA",!1)}function c(){return $APP.Q(a,"__xLiquidGlassPA",!0)}function d(e){var f=a.getBoundingClientRect();$APP.Q(a,"__xLiquidGlassPX",e.clientX-f.left);return $APP.Q(a,"__xLiquidGlassPY",e.clientY-f.top)}$APP.Q(a,"__xLiquidGlassHdl",{move:d,enter:c,leave:b});a.addEventListener("pointermove",d,{passive:!0});a.addEventListener("pointerenter",c);return a.addEventListener("pointerleave",b)},P3=function(a){var b=$APP.l(a,"__xLiquidGlassHdl");
|
|
33
|
+
$APP.n(b)&&(a.removeEventListener("pointermove",$APP.l(b,"move")),a.removeEventListener("pointerenter",$APP.l(b,"enter")),a.removeEventListener("pointerleave",$APP.l(b,"leave")),$APP.Q(a,"__xLiquidGlassHdl",null))},Q3=function(a){return Esa($APP.wg([$APP.fv,k3,l3,$APP.Gm,m3,$APP.Mt,n3,o3,p3,q3,r3,$APP.rr,i3,j3],[a.getAttribute("blur"),a.getAttribute("blobs"),a.getAttribute("amplitude"),a.getAttribute("mode"),a.getAttribute("specular-intensity"),a.getAttribute("speed"),a.getAttribute("frost"),a.getAttribute("color-2"),
|
|
34
|
+
a.getAttribute("color-1"),a.getAttribute("goo"),a.getAttribute("specular"),a.getAttribute("disabled"),a.getAttribute("specular-size"),a.getAttribute("tint")]))},Msa=function(a){var b=Q3(a);if($APP.I(b,$APP.l(a,"__xLiquidGlassModel"))){var c=$APP.l(a,"__xLiquidGlassW"),d=$APP.l(a,"__xLiquidGlassH");$APP.n($APP.n(c)?$APP.n(d)?c>0&&d>0:d:c)&&(H3(a,c,d),J3(a,b),$APP.n(function(){var e=$APP.Xj.i(b);return $APP.n(e)?e:B3()}())?(N3(a),O3(a)):(K3(a,function(){var e=$APP.l(a,"__xLiquidGlassTime");return $APP.n(e)?
|
|
35
|
+
e:0}()),M3(a)));return $APP.Q(a,"__xLiquidGlassModel",b)}return null},Nsa=function(a){return $APP.z.j(a,"submerged")?"submerged":"surface"},Osa=function(a){$APP.qj(a,"blobs","blobs",Asa);$APP.qj(a,"speed","speed",$2);$APP.qj(a,"amplitude","amplitude",a3);$APP.qj(a,"blur","blur",b3);$APP.qj(a,"goo","goo",c3);$APP.oj(a,"tint","tint");$APP.kj(a,"specular","specular");$APP.qj(a,"specularSize","specular-size",e3);$APP.qj(a,"specularIntensity","specular-intensity",f3);$APP.kj(a,"disabled","disabled");$APP.qj(a,
|
|
36
|
+
"mode","mode",Nsa);$APP.qj(a,"frost","frost",d3);$APP.oj(a,"color1","color-1");return $APP.oj(a,"color2","color-2")},Psa=function(a){var b=Q3(a);$APP.Q(a,"__xLiquidGlassModel",b);$APP.$i(a,"__xLiquidGlassTime",0);$APP.Q(a,"__xLiquidGlassPA",!1);$APP.Q(a,"__xLiquidGlassPX",0);$APP.Q(a,"__xLiquidGlassPY",0);$APP.Q(a,"__xLiquidGlassGT",0);$APP.n($APP.l(a,"__xLiquidGlassRefs"))||Hsa(a);J3(a,b);b=new ResizeObserver(function(c){return Ksa(a,c)});$APP.Q(a,"__xLiquidGlassRO",b);b.observe(a);P3(a);return Lsa(a)},
|
|
37
|
+
Qsa=function(a){N3(a);P3(a);var b=$APP.l(a,"__xLiquidGlassRO");return $APP.n(b)?(b.disconnect(),$APP.Q(a,"__xLiquidGlassRO",null)):null},Rsa=function(a,b,c,d){return $APP.I(c,d)?$APP.n($APP.l(a,"__xLiquidGlassRefs"))?Msa(a):null:null},R3=function(){return $APP.si("x-liquid-glass",new $APP.M(null,5,[$APP.ji,Ssa,$APP.hi,Psa,$APP.ei,Qsa,$APP.di,Rsa,$APP.ii,Osa],null))},h3=new $APP.F(null,"surface","surface",699915646),F3=new $APP.F(null,"core","core",-86019209),y3=new $APP.F(null,"specular-intensity",
|
|
38
|
+
"specular-intensity",437849876),l3=new $APP.F(null,"amplitude-raw","amplitude-raw",-673525115),t3=new $APP.F(null,"goo","goo",-1253057564),C3=new $APP.F(null,"glass","glass",1652756718),Gsa=new $APP.F(null,"filter","filter",-948537934),s3=new $APP.F(null,"frost","frost",-3478780),w3=new $APP.F(null,"specular-size","specular-size",757318993),I3=new $APP.F(null,"submerged","submerged",1636004473),v3=new $APP.F(null,"tint","tint",-1286736913),G3=new $APP.F(null,"grain","grain",2007662171),j3=new $APP.F(null,
|
|
39
39
|
"tint-raw","tint-raw",-653441954),o3=new $APP.F(null,"color-2-raw","color-2-raw",-1440423537),r3=new $APP.F(null,"specular-attr","specular-attr",-716021610),m3=new $APP.F(null,"specular-intensity-raw","specular-intensity-raw",109079177),q3=new $APP.F(null,"goo-raw","goo-raw",59658675),i3=new $APP.F(null,"specular-size-raw","specular-size-raw",592980345),p3=new $APP.F(null,"color-1-raw","color-1-raw",-1322552111),u3=new $APP.F(null,"amplitude","amplitude",-1387734203),E3=new $APP.F(null,"gradient",
|
|
40
|
-
"gradient",-1983908971),n3=new $APP.F(null,"frost-raw","frost-raw",1383732749),x3=new $APP.F(null,"specular?","specular?",964138290),k3=new $APP.F(null,"blobs-raw","blobs-raw",1729393761),D3=new $APP.F(null,"satellites","satellites",644765266);var
|
|
41
|
-
$APP.
|
|
42
|
-
1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.X],null),new $APP.M(null,1,[$APP.N,$APP.
|
|
40
|
+
"gradient",-1983908971),n3=new $APP.F(null,"frost-raw","frost-raw",1383732749),x3=new $APP.F(null,"specular?","specular?",964138290),k3=new $APP.F(null,"blobs-raw","blobs-raw",1729393761),D3=new $APP.F(null,"satellites","satellites",644765266);var Ssa="blobs speed amplitude blur goo tint specular specular-size specular-intensity disabled mode frost color-1 color-2".split(" ");
|
|
41
|
+
$APP.wg([s3,t3,u3,new $APP.F(null,"specularSize","specularSize",-1757715579),$APP.un,$APP.Wr,$APP.Mm,$APP.$t,v3,new $APP.F(null,"color2","color2",1248091856),$APP.sq,$APP.Dv,new $APP.F(null,"color1","color1",306558619),new $APP.F(null,"specularIntensity","specularIntensity",138075)],[new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.sj],null),new $APP.M(null,
|
|
42
|
+
1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.X],null),new $APP.M(null,1,[$APP.N,$APP.sj],null),new $APP.M(null,1,[$APP.N,$APP.X],null),new $APP.M(null,1,[$APP.N,$APP.X],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.Y],null),new $APP.M(null,1,[$APP.N,$APP.X],null),new $APP.M(null,1,[$APP.N,$APP.Y],null)]);var Csa=new $APP.M(null,2,["surface",h3,"submerged",I3],null);var A3={v:0},L3=function L3(a){if($APP.n(a.isConnected)){var c=performance.now(),d=$APP.l(a,"__xLiquidGlassTime")+Math.min(c-$APP.l(a,"__xLiquidGlassLF"),100)/1E3;$APP.$i(a,"__xLiquidGlassLF",c);$APP.$i(a,"__xLiquidGlassTime",d);K3(a,d);Isa(a);Jsa(a,d);return $APP.$i(a,"__xLiquidGlassRaf",requestAnimationFrame(function(){return L3.i?L3.i(a):L3.call(null,a)}))}return null};$APP.ha("baredom.exports.x_liquid_glass.init",R3);export const init=R3;
|
package/dist/x-menu-item.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var J1=function(a){a=new $APP.M(null,4,[$APP.
|
|
3
|
-
return $APP.
|
|
4
|
-
$APP.S(a,"tabindex","-1");$APP.S(c,"data-type","");$APP.S(c,"data-variant",e);$APP.S(c,"data-disabled",$APP.n(d)?"true":"false");$APP.n(d)?$APP.S(a,"aria-disabled","true"):$APP.U(a,"aria-disabled")}a=$APP.Q(a,"__xMenuItemModel",b)}else a=null;return a},M1=function(a){function b(){return e.assignedNodes().length>0?$APP.S(a,"has-icon",""):$APP.U(a,"has-icon")}function c(h){var k=h.key,m=J1(a);($APP.z.j(k,"Enter")||$APP.z.j(k," "))&&$APP.p($APP.
|
|
5
|
-
h=K1(a)):h=null;return h}function d(h){var k=J1(a);var m=$APP.
|
|
6
|
-
L1(a);if(!$APP.
|
|
7
|
-
$APP.S(d,"part","base");d.className="base";$APP.S(e,"part","icon");e.className="icon-span";$APP.S(f,"name","icon");e.appendChild(f);h.className="label-span";h.appendChild(k);m.className="divider-hr";d.appendChild(e);d.appendChild(h);d.appendChild(m);b.appendChild(c);b.appendChild(d);r.base=d;r["icon-span"]=e;r["icon-slot"]=f;$APP.Q(a,"__xMenuItemRefs",r);M1(a);$APP.
|
|
8
|
-
$APP.l(b,"keydown"),e=$APP.l(b,"icon-slotchange");c=$APP.n(c)?$APP.l(c,"icon-slot"):null;a.removeEventListener("click",$APP.l(b,"click"));a.removeEventListener("keydown",d);a=$APP.n(c)?c.removeEventListener("slotchange",e):null}else a=null;return a},
|
|
9
|
-
$APP.
|
|
2
|
+
var J1=function(a){a=new $APP.M(null,4,[$APP.Ui,a.getAttribute("value"),$APP.un,a.hasAttribute("disabled"),$APP.An,a.getAttribute("variant"),$APP.N,a.getAttribute("type")],null);var b=$APP.G(a);a=$APP.C(b,$APP.Ui);var c=$APP.C(b,$APP.un),d=$APP.C(b,$APP.An);b=$APP.C(b,$APP.N);a=$APP.n(a)?a:"";c=$APP.D(c);d=$APP.n(d)?d:"";d=$APP.dd(rra,d)?d:"";b=$APP.n(b)?b:"";b=$APP.dd(sra,b)?b:"";return new $APP.M(null,4,[$APP.Ui,a,$APP.un,c,$APP.An,d,$APP.N,b],null)},K1=function(a){var b=a.getAttribute("value");
|
|
3
|
+
return $APP.fj(a,"x-menu-item-select",{value:$APP.n(b)?b:""})},L1=function(a){var b=J1(a);if($APP.I(b,$APP.l(a,"__xMenuItemModel"))){var c=$APP.l(a,"__xMenuItemRefs");c=$APP.n(c)?$APP.l(c,"base"):null;if($APP.n(c))if($APP.z.j($APP.N.i(b),"divider"))$APP.S(a,"role","separator"),$APP.U(a,"tabindex"),$APP.U(a,"aria-disabled"),$APP.S(c,"data-type","divider"),$APP.S(c,"data-variant",""),$APP.S(c,"data-disabled","false");else{var d=$APP.G(b),e=$APP.C(d,$APP.An);d=$APP.C(d,$APP.un);$APP.S(a,"role","menuitem");
|
|
4
|
+
$APP.S(a,"tabindex","-1");$APP.S(c,"data-type","");$APP.S(c,"data-variant",e);$APP.S(c,"data-disabled",$APP.n(d)?"true":"false");$APP.n(d)?$APP.S(a,"aria-disabled","true"):$APP.U(a,"aria-disabled")}a=$APP.Q(a,"__xMenuItemModel",b)}else a=null;return a},M1=function(a){function b(){return e.assignedNodes().length>0?$APP.S(a,"has-icon",""):$APP.U(a,"has-icon")}function c(h){var k=h.key,m=J1(a);($APP.z.j(k,"Enter")||$APP.z.j(k," "))&&$APP.p($APP.un.i(m))&&$APP.I($APP.N.i(m),"divider")?(h.preventDefault(),
|
|
5
|
+
h=K1(a)):h=null;return h}function d(h){var k=J1(a);var m=$APP.un.i(k);m=$APP.n(m)?m:$APP.z.j($APP.N.i(k),"divider");$APP.n(m)&&h.preventDefault();return $APP.p($APP.un.i(k))&&$APP.I($APP.N.i(k),"divider")?K1(a):null}var e=$APP.l($APP.l(a,"__xMenuItemRefs"),"icon-slot"),f={};a.addEventListener("click",d);a.addEventListener("keydown",c);e.addEventListener("slotchange",b);f.click=d;f.keydown=c;f["icon-slotchange"]=b;$APP.Q(a,"__xMenuItemHandlers",f)},tra=function(a){if($APP.Vi(a,"__xMenuItemInit"))return M1(a),
|
|
6
|
+
L1(a);if(!$APP.Vi(a,"__xMenuItemInit")){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("span"),f=document.createElement("slot"),h=document.createElement("span"),k=document.createElement("slot"),m=document.createElement("hr"),r={};c.textContent=":host{display:block;outline:none;color-scheme:light dark;--x-menu-item-color:var(--x-color-text,#111827);--x-menu-item-hover-bg:var(--x-color-surface-hover,#f3f4f6);--x-menu-item-focus-bg:var(--x-color-surface-hover,#eff6ff);--x-menu-item-focus-color:var(--x-color-primary-hover,#1d4ed8);--x-menu-item-disabled-opacity:0.45;--x-menu-item-danger-color:var(--x-color-danger,#dc2626);--x-menu-item-danger-hover-bg:#fef2f2;--x-menu-item-padding:8px 12px;--x-menu-item-border-radius:var(--x-radius-sm,4px);--x-menu-item-font-size:0.9375rem;--x-menu-item-icon-gap:8px;--x-menu-item-divider-color:var(--x-color-border,#e5e7eb);}:host([disabled]){pointer-events:none;}@media (prefers-color-scheme:dark){:host{--x-menu-item-color:var(--x-color-text,#f9fafb);--x-menu-item-hover-bg:var(--x-color-surface-hover,#1f2937);--x-menu-item-focus-bg:var(--x-color-surface-hover,#1e3a5f);--x-menu-item-focus-color:var(--x-color-focus-ring,#60a5fa);--x-menu-item-danger-color:var(--x-color-danger,#f87171);--x-menu-item-danger-hover-bg:#2d1515;--x-menu-item-divider-color:var(--x-color-border,#374151);}}.base{display:flex;align-items:center;gap:var(--x-menu-item-icon-gap);padding:var(--x-menu-item-padding);border-radius:var(--x-menu-item-border-radius);font-size:var(--x-menu-item-font-size);color:var(--x-menu-item-color);cursor:pointer;user-select:none;transition:background 100ms ease,color 100ms ease;}.base:hover{background:var(--x-menu-item-hover-bg);}:host(:focus) .base{background:var(--x-menu-item-focus-bg);color:var(--x-menu-item-focus-color);}.base[data-variant\x3d'danger']{color:var(--x-menu-item-danger-color);}.base[data-variant\x3d'danger']:hover{background:var(--x-menu-item-danger-hover-bg);}:host(:focus) .base[data-variant\x3d'danger']{background:var(--x-menu-item-danger-hover-bg);}.base[data-disabled\x3d'true']{opacity:var(--x-menu-item-disabled-opacity);cursor:default;pointer-events:none;}.base[data-type\x3d'divider']{padding:0;cursor:default;pointer-events:none;}.icon-span{display:none;flex-shrink:0;align-items:center;}:host([has-icon]) .icon-span{display:flex;}.divider-hr{display:none;}.base[data-type\x3d'divider'] .icon-span,.base[data-type\x3d'divider'] .label-span{display:none;}.base[data-type\x3d'divider'] .divider-hr{display:block;width:100%;border:none;border-top:1px solid var(--x-menu-item-divider-color);margin:4px 0;}@media (prefers-reduced-motion:reduce){.base{transition:none;}}";
|
|
7
|
+
$APP.S(d,"part","base");d.className="base";$APP.S(e,"part","icon");e.className="icon-span";$APP.S(f,"name","icon");e.appendChild(f);h.className="label-span";h.appendChild(k);m.className="divider-hr";d.appendChild(e);d.appendChild(h);d.appendChild(m);b.appendChild(c);b.appendChild(d);r.base=d;r["icon-span"]=e;r["icon-slot"]=f;$APP.Q(a,"__xMenuItemRefs",r);M1(a);$APP.Wi(a,"__xMenuItemInit")}L1(a);return a},ura=function(a){var b=$APP.l(a,"__xMenuItemHandlers"),c=$APP.l(a,"__xMenuItemRefs");if($APP.n(b)){var d=
|
|
8
|
+
$APP.l(b,"keydown"),e=$APP.l(b,"icon-slotchange");c=$APP.n(c)?$APP.l(c,"icon-slot"):null;a.removeEventListener("click",$APP.l(b,"click"));a.removeEventListener("keydown",d);a=$APP.n(c)?c.removeEventListener("slotchange",e):null}else a=null;return a},vra=function(a,b,c,d){return $APP.I(c,d)&&$APP.Vi(a,"__xMenuItemInit")?L1(a):null},xra=function(a){return $APP.uj(a,wra)},N1=function(){return $APP.si("x-menu-item",new $APP.M(null,5,[$APP.ji,yra,$APP.hi,tra,$APP.ei,ura,$APP.di,vra,$APP.ii,xra],null))};var yra=["value","disabled","variant","type"],rra=new $APP.ch(null,new $APP.M(null,2,["",null,"danger",null],null),null),sra=new $APP.ch(null,new $APP.M(null,2,["",null,"divider",null],null),null),wra=new $APP.M(null,4,[$APP.Ui,new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"value"],null),$APP.un,new $APP.M(null,2,[$APP.N,$APP.sj,$APP.W,"disabled"],null),$APP.An,new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"variant"],null),$APP.N,new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"type"],null)],null);
|
|
9
|
+
$APP.je(["x-menu-item-select",new $APP.M(null,1,[$APP.V,new $APP.M(null,1,[$APP.Ui,$APP.X],null)],null)]);$APP.ha("baredom.exports.x_menu_item.init",N1);export const init=N1;
|
package/dist/x-menu.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var zX=function(a){a=a.querySelectorAll("x-menu-item");for(var b=[],c=a.length,d=0;;)if(d<c){var e=a[d];$APP.p(e.hasAttribute("disabled"))&&$APP.I(e.getAttribute("type"),"divider")&&b.push(e);d+=1}else break;return b},AX=function(a){$APP.n(a.hasAttribute("open"))||($APP.S(a,"open",""),$APP.
|
|
3
|
-
($APP.U(a,"open"),$APP.
|
|
2
|
+
var zX=function(a){a=a.querySelectorAll("x-menu-item");for(var b=[],c=a.length,d=0;;)if(d<c){var e=a[d];$APP.p(e.hasAttribute("disabled"))&&$APP.I(e.getAttribute("type"),"divider")&&b.push(e);d+=1}else break;return b},AX=function(a){$APP.n(a.hasAttribute("open"))||($APP.S(a,"open",""),$APP.fj(a,"x-menu-open",{}));if($APP.n(null)){a=zX(a);var b=a.length;return b>0?$APP.z.j(null,Ana)?a[0].focus():$APP.z.j(null,Bna)?a[b-1].focus():null:null}return null},BX=function(a,b){$APP.n(a.hasAttribute("open"))&&
|
|
3
|
+
($APP.U(a,"open"),$APP.fj(a,"x-menu-close",{}));return $APP.n(b)?(a=$APP.l(a,"__xMenuRefs"),a=$APP.n(a)?$APP.l(a,"trigger-slot"):null,a=$APP.n(a)?a.assignedElements():null,a=$APP.n($APP.n(a)?a.length>0:a)?a[0]:null,$APP.n(a)?a.focus():null):null},Cna=function(a,b){var c=b.composedPath();a=$APP.Fc(a.assignedElements());return $APP.D($APP.pe(function(d){return c.indexOf(d)>-1},a))},Dna=function(a,b){var c=b.key,d=a.hasAttribute("open");if($APP.z.j(c,"Escape"))return $APP.n(d)?(b.preventDefault(),BX(a,
|
|
4
4
|
!0)):null;if($APP.z.j(c,"Tab"))return $APP.n(d)?BX(a,!1):null;if($APP.z.j(c,"ArrowDown")||$APP.z.j(c,"ArrowUp")){var e=zX(a),f=e.length;if(f>0){b.preventDefault();if($APP.n(d))return a=e.indexOf(document.activeElement),c=$APP.z.j(c,"ArrowDown")?a>=f-1?0:a<0?0:a+1:a<=0?f-1:a-1,e[c].focus();AX(a);return e[$APP.z.j(c,"ArrowDown")?0:f-1].focus()}}else if($APP.z.j(c,"Home")){if($APP.n(d)&&(e=zX(a),e.length>0))return b.preventDefault(),e[0].focus()}else if($APP.z.j(c,"End")&&$APP.n(d)&&(e=zX(a),e.length>
|
|
5
|
-
0))return b.preventDefault(),e[e.length-1].focus();return null},CX=function(a){var b=new $APP.M(null,3,[$APP.
|
|
6
|
-
null,$APP.n(d)&&($APP.S(d,"data-placement",$APP.
|
|
7
|
-
$APP.l(a,"__xMenuRefs");k=$APP.n(k)?$APP.l(k,"trigger-slot"):null;return $APP.n($APP.n(k)?
|
|
5
|
+
0))return b.preventDefault(),e[e.length-1].focus();return null},CX=function(a){var b=new $APP.M(null,3,[$APP.Wu,a.hasAttribute("open"),$APP.gs,a.getAttribute("placement"),$APP.Z,a.getAttribute("label")],null);b=$APP.G(b);var c=$APP.C(b,$APP.Wu),d=$APP.C(b,$APP.gs);b=$APP.C(b,$APP.Z);c=$APP.D(c);d=$APP.n(d)?d:"";d=$APP.dd(Ena,d)?d:"bottom-start";b=new $APP.M(null,3,[$APP.Wu,c,$APP.gs,d,$APP.Z,$APP.n(b)?b:""],null);$APP.I(b,$APP.l(a,"__xMenuModel"))?(d=$APP.l(a,"__xMenuRefs"),d=$APP.n(d)?$APP.l(d,"popup"):
|
|
6
|
+
null,$APP.n(d)&&($APP.S(d,"data-placement",$APP.gs.i(b)),c=$APP.Z.i(b),$APP.n($APP.n(c)?$APP.I(c,""):c)?$APP.S(d,"aria-label",c):$APP.U(d,"aria-label")),a=$APP.Q(a,"__xMenuModel",b)):a=null;return a},DX=function(a){function b(h){h.stopPropagation();h=h.detail.value;BX(a,!1);return $APP.fj(a,"x-menu-select",{value:$APP.n(h)?h:""})}function c(h){return Dna(a,h)}function d(h){$APP.n(a.hasAttribute("open"))?(h=h.composedPath(),h=$APP.z.j(-1,h.indexOf(a))?BX(a,!1):null):h=null;return h}function e(h){var k=
|
|
7
|
+
$APP.l(a,"__xMenuRefs");k=$APP.n(k)?$APP.l(k,"trigger-slot"):null;return $APP.n($APP.n(k)?Cna(k,h):k)?$APP.n(a.hasAttribute("open"))?BX(a,!0):AX(a):null}var f={};a.addEventListener("click",e);document.addEventListener("click",d,!0);a.addEventListener("keydown",c);a.addEventListener("x-menu-item-select",b);f.click=e;f["doc-click"]=d;f.keydown=c;f["item-select"]=b;$APP.Q(a,"__xMenuHandlers",f)},Fna=function(a){if($APP.Vi(a,"__xMenuInit"))return DX(a),CX(a);if(!$APP.Vi(a,"__xMenuInit")){var b=a.attachShadow({mode:"open"}),
|
|
8
8
|
c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot"),f=document.createElement("div"),h=document.createElement("slot"),k={};c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-menu-bg:var(--x-color-bg,#ffffff);--x-menu-border:1px solid var(--x-color-border,#e5e7eb);--x-menu-border-radius:var(--x-radius-md,8px);--x-menu-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12));--x-menu-min-width:160px;--x-menu-padding:4px;--x-menu-z-index:1000;}@media (prefers-color-scheme:dark){:host{--x-menu-bg:var(--x-color-bg,#1f2937);--x-menu-border:1px solid var(--x-color-border,#374151);--x-menu-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.4));}}.base{position:relative;display:inline-block;}.popup{display:none;position:absolute;background:var(--x-menu-bg);border:var(--x-menu-border);border-radius:var(--x-menu-border-radius);box-shadow:var(--x-menu-shadow);min-width:var(--x-menu-min-width);max-width:calc(100vw - 1rem);padding:var(--x-menu-padding);z-index:var(--x-menu-z-index);box-sizing:border-box;}:host([open]) .popup{display:block;}.popup[data-placement\x3d'bottom-start']{top:100%;left:0;margin-top:4px;}.popup[data-placement\x3d'bottom-end']{top:100%;right:0;margin-top:4px;}.popup[data-placement\x3d'top-start']{bottom:100%;left:0;margin-bottom:4px;}.popup[data-placement\x3d'top-end']{bottom:100%;right:0;margin-bottom:4px;}";
|
|
9
|
-
$APP.S(d,"part","base");d.className="base";$APP.S(e,"name","trigger");$APP.S(f,"part","popup");f.className="popup";$APP.S(f,"role","menu");f.appendChild(h);d.appendChild(e);d.appendChild(f);b.appendChild(c);b.appendChild(d);k.base=d;k.popup=f;k["trigger-slot"]=e;k["item-slot"]=h;$APP.Q(a,"__xMenuRefs",k);DX(a);$APP.
|
|
10
|
-
$APP.l(b,"click"));document.removeEventListener("click",c,!0);a.removeEventListener("keydown",d);a=a.removeEventListener("x-menu-item-select",e)}else a=null;return a},
|
|
11
|
-
$APP.
|
|
9
|
+
$APP.S(d,"part","base");d.className="base";$APP.S(e,"name","trigger");$APP.S(f,"part","popup");f.className="popup";$APP.S(f,"role","menu");f.appendChild(h);d.appendChild(e);d.appendChild(f);b.appendChild(c);b.appendChild(d);k.base=d;k.popup=f;k["trigger-slot"]=e;k["item-slot"]=h;$APP.Q(a,"__xMenuRefs",k);DX(a);$APP.Wi(a,"__xMenuInit")}CX(a);return a},Gna=function(a){var b=$APP.l(a,"__xMenuHandlers");if($APP.n(b)){var c=$APP.l(b,"doc-click"),d=$APP.l(b,"keydown"),e=$APP.l(b,"item-select");a.removeEventListener("click",
|
|
10
|
+
$APP.l(b,"click"));document.removeEventListener("click",c,!0);a.removeEventListener("keydown",d);a=a.removeEventListener("x-menu-item-select",e)}else a=null;return a},Hna=function(a,b,c,d){return $APP.I(c,d)&&$APP.Vi(a,"__xMenuInit")?CX(a):null},Jna=function(a){return $APP.uj(a,Ina)},EX=function(){return $APP.si("x-menu",new $APP.M(null,5,[$APP.ji,Kna,$APP.hi,Fna,$APP.ei,Gna,$APP.di,Hna,$APP.ii,Jna],null))},Bna=new $APP.F(null,"last","last",1105735132),Ana=new $APP.F(null,"first","first",-644103046);var Kna=["open","placement","label"],Ena=new $APP.ch(null,new $APP.M(null,4,["bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null],null),null),Ina=new $APP.M(null,3,[$APP.Wu,new $APP.M(null,2,[$APP.N,$APP.sj,$APP.W,"open"],null),$APP.gs,new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"placement"],null),$APP.Z,new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"label"],null)],null);
|
|
11
|
+
$APP.je(["x-menu-open",new $APP.M(null,1,[$APP.V,$APP.ke],null),"x-menu-close",new $APP.M(null,1,[$APP.V,$APP.ke],null),"x-menu-select",new $APP.M(null,1,[$APP.V,new $APP.M(null,1,[$APP.Ui,$APP.X],null)],null)]);$APP.ha("baredom.exports.x_menu.init",EX);export const init=EX;
|