@zuzjs/ui 1.0.39 → 1.0.41
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/bin.cjs +4 -4
- package/dist/bin.js +1 -1
- package/dist/css/styles.css +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +7 -7
- package/package.json +2 -2
- /package/dist/{chunk-INXULMNL.cjs → chunk-J2S2ZRXO.cjs} +0 -0
- /package/dist/{chunk-HEX5DKPA.js → chunk-UR6Q6HED.js} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
var cr={Circle:"CIRCLE",Square:"SQUARE"},
|
|
1
|
+
'use strict';var chunkJ2S2ZRXO_cjs=require('./chunk-J2S2ZRXO.cjs'),react=require('react'),hooks=require('@zuzjs/hooks'),reactDom=require('react-dom'),core=require('@zuzjs/core'),jsxRuntime=require('react/jsx-runtime'),react$1=require('@zuzjs/core/react'),dateFns=require('date-fns');/* ZuzJS UI CLI */
|
|
2
|
+
var cr={Circle:"CIRCLE",Square:"SQUARE"},Eu={Default:"DEFAULT",Circle:"CIRCLE"},ku={Light:"light",Dark:"dark",System:"system"},ke={Default:"DEFAULT",Switch:"SWITCH"},ct={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},me=ct,mt=hooks.AnchorType,Lu=mt,U={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Mu={Asc:"ASC",Desc:"DESC"},Ou={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Du={Dots:"DOTS"},Le={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},we={Success:"success",Error:"error",Warning:"warning",Info:"info"},X={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},q={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},Hu={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},Se={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},Ye=Se,no={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},mr=no,Au={Bar:"BAR",Ring:"RING"},so={Default:"range",Text:"number"},ao={Default:"DEFAULT",Card:"CARD"},Nt={Gooey:"gooey"},ge={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var pr=Symbol.for("zuz.global.map"),ur=e=>{globalThis[pr]=e;},da=()=>globalThis[pr]||{},io=e=>{let n=Array.isArray(e)?e.join(" "):e;if(!n||typeof n!="string")return "";let t=da();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${chunkJ2S2ZRXO_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunkJ2S2ZRXO_cjs.h(n).filter(Boolean).map(r=>{let s=r.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,u,f]=s;return chunkJ2S2ZRXO_cjs.h(f).map(c=>{let p=`${u}(${c})`;return t[p]||c}).join(" ")}return t[r]||r}).join(" ")},of=e=>{let n=Array.isArray(e)?e.join(" "):e;return !n||typeof n!="string"?"":io(n)},fr=e=>{let n={};for(let t in e){let o=e[t];if(t.startsWith("--")){n[t]=o;continue}let r=chunkJ2S2ZRXO_cjs.e[t]?.toString()??t;if(r==="x"||r==="translateX"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${chunkJ2S2ZRXO_cjs.i.addUnitsSafely(t,o)} ${s[1]??"0px"}`;}else if(r==="y"||r==="translateY"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${s[0]??"0px"} ${chunkJ2S2ZRXO_cjs.i.addUnitsSafely(t,o)}`;}else chunkJ2S2ZRXO_cjs.d.includes(r)?n[r]=chunkJ2S2ZRXO_cjs.i.addUnitsSafely(t,o):n[r]=o;}return n},lo=e=>{if(!e)return "linear";switch(e.toUpperCase()){case X.Bounce:return "var(--bounce)";case X.Liquid:return "var(--liquid)";case X.Spring:return "var(--spring)";case X.EaseInOut:return "ease-in-out";case X.EaseOutBack:return "ease-out-back";default:return "linear"}},pt=(e,n=0,t=0)=>{let o={},r={},s=n||20,a=t||0;switch(e){case q.SlideInLeft:case q.SlideInRight:o={"--fx-x":e===q.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},r={"--fx-x":`${a}px`,opacity:1};break;case q.SlideInTop:case q.SlideInBottom:o={"--fx-y":e===q.SlideInTop?`-${s}px`:`${s}px`,opacity:0},r={"--fx-y":`${a}px`,opacity:1};break;case q.ScaleIn:o={scale:0,opacity:0},r={scale:1,opacity:1};break;case q.FadeIn:o={opacity:0},r={opacity:1};break}return {from:o,to:r}},rf=(e,n,t)=>{let{from:o,to:r}=pt(e);return n?{...o,...r}:t?o:r};var ha=(e,n)=>{let t=react.useRef([]),o=react.useRef(false);return react.useEffect(()=>{e?.when||(o.current=false);},[e?.transition]),react.useEffect(()=>{let r=n?.current;if(!r||!e||!e.clearAtEnd)return;let s=a=>{t.current.includes(a.propertyName)&&e.clearAtEnd===true&&(r.style.transform="",r.style.filter="",t.current.forEach(u=>r.style.removeProperty(u)));};return r.addEventListener("transitionend",s),()=>r.removeEventListener("transitionend",s)},[e,n]),react.useEffect(()=>{if(typeof window>"u"||!n?.current)return;let r=n.current;(e?.scroll||e?.mouse)&&(r.style.willChange="transform",r.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",r.style.transition=`translate 0.1s ${e.curve?lo(e.curve):"var(--spring)"}`);},[e,n]),react.useMemo(()=>{if(!e)return {style:{}};let{transition:r,from:s,to:a,exit:u,when:f,duration:c=.3,delay:p=0,curve:i,margin:l=0,offset:g=20,watch:C=[]}=e,S=f===false&&!o.current;f===true&&(o.current=true);let b={},{from:I,to:P}=r?pt(r,g,l):{from:s||{},to:a||{}};b=f===void 0?{...I,...P}:f?{...P}:u||I;let T=lo(i),d=[],v=fr(b);t.current=Object.keys(v);let h={...v};return Object.keys(v).forEach(y=>{let R=y.startsWith("--")?"all":y;d.includes(R)||d.push(`${R} ${c}s ${T} ${p}s`);}),C.forEach(y=>{d.includes(y)||d.push(`${y} 0.1s ${T} 0s`);}),{style:{...h,transition:S?"none":d.join(", "),opacity:S?0:h.opacity,pointerEvents:S?"none":h.pointerEvents}}},[e,e?.when,e?.watch])},pe=ha;var Bt=null,ya=(e,n)=>{let{as:t,fx:o,busy:r=false,transition:s,skeleton:a,className:u,propsToRemove:f,draggable:c,dragOptions:p,style:i,...l}=e||{},g=typeof window<"u",C={},S={};if(c&&g&&!Bt&&(import('@zuzjs/hooks').then(d=>{Bt=d.useDrag;}).catch(d=>{console.error("Error loading useDrag:",d);}),Bt)){let d=Bt(p);C={onMouseDown:d.onMouseDown},S={transform:`translate(${d.position.x}px, ${d.position.y}px)`};}let b=[u,r===true?"--is-busy":""].filter(Boolean).join(" "),I=s?{transition:s,duration:.3}:o||{},{style:P}=pe(I,n),T=io(t??"");return {style:{...i,...P,...S},className:[b,T||"",a?.enabled?"--skeleton":"",c?"--draggable":""].join(" ").trim(),rest:{...C,...chunkJ2S2ZRXO_cjs.g(l,f?[...f,"skeleton"]:["skeleton"])}}},N=ya;var hr="(prefers-color-scheme: dark)",va=typeof window>"u",xr=react.createContext(void 0),uo=e=>{let n=react.useContext(xr);if(!n){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return n},Y=uo,wa=({children:e,storageKey:n="--ucs",forceTheme:t,zuzMap:o,...r})=>(o&&ur(o),jsxRuntime.jsx(Sa,{storageKey:n,forceTheme:t,...r,children:e})),Sa=({children:e,storageKey:n,forceTheme:t,...o})=>{let[r,s]=react.useState(()=>t||yr(n,"system")),[a,u]=react.useState(()=>t||yr(n)),f=l=>(l||(l=window.matchMedia(hr)),l.matches?"dark":"light"),c=react.useCallback(l=>{let g=l=="system"?f():l,C=document.documentElement;C.setAttribute("color-scheme",g),C.style.colorScheme=g,u(g);},[f]),p=react.useCallback(l=>{s(l),localStorage.setItem(n,l),c(l);},[r]),i=react.useCallback(l=>{let g=f(l);u(g),r==="system"&&c("system");},[r]);return react.useEffect(()=>{r==null&&window.localStorage.getItem(n);},[r]),react.useEffect(()=>{window.matchMedia(hr).addEventListener("change",i);},[i]),react.useEffect(()=>{let l=g=>{g.key==n&&(g.newValue?p(g.newValue):p("system"));};return window.addEventListener("storage",l),()=>window.removeEventListener("storage",l)},[p]),react.useEffect(()=>{c(t||r||"system");},[r]),jsxRuntime.jsxs(xr,{value:{colorScheme:r,resolvedScheme:a,setColorScheme:p,...o},children:[t?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
|
|
3
3
|
const themes = ['light', 'dark']
|
|
4
4
|
let theme = localStorage.getItem(\`${n}\`) || "system";
|
|
5
5
|
if (theme === "system") {
|
|
6
6
|
theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
7
7
|
}
|
|
8
8
|
document.documentElement.setAttribute("color-scheme", theme);
|
|
9
|
-
document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx(uo,{children:e})]})},yr=(e,n)=>{if(va)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||n};var br=({ref:e,...n})=>{let{style:t,...o}=n,{style:r,className:s,rest:a}=N(o);return jsxRuntime.jsx("span",{ref:e,style:t,className:s,...a})};br.displayName="Zuz.Span";var ne=br;var wr=react.forwardRef((e,n)=>{let{name:t,pathCount:o,variant:r,color:s,size:a,...u}=e,{variant:f}=Y(true),{className:m,style:p,rest:i}=N(u);return jsxRuntime.jsx("div",{style:{color:s,...p,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${r||f||U.Small} ${m}`.trim(),ref:n,...i,children:Array(o||0).fill(0).map((l,d)=>jsxRuntime.jsx(ne,{className:`path${d+1}`},`${t}-layer-${d}`))})});wr.displayName="Zuz.Icon";var J=wr;var ue={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Sr=e=>{let{type:n,variant:t,color:o,...r}=e,{className:s,style:a,rest:u}=N(r),{spinner:f}=Y(true),m=()=>{switch(n||f?.type||ue.Simple){case ue.Simple:return null;case ue.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(c,{as:"--bar --bar1"}),jsxRuntime.jsx(c,{as:"--bar --bar2"}),jsxRuntime.jsx(c,{as:"--bar --bar3"})]});case ue.Roller:return null}};return jsxRuntime.jsx(c,{className:`${s} --spinner --${(n||f?.type||ue.Simple).toLowerCase()} --${t||f?.variant||U.Small}`.trim(),style:{...a},...u,children:m()})};Sr.displayName="Zuz.Spinner";var Ce=Sr;var kt={Loading:"loading",Normal:"normal"};var Tr=({ref:e,...n})=>{let{reset:t,kind:o="solid",variant:r,icon:s,iconSize:a,children:u,withLabel:f,spinner:m,state:p,disabled:i,...l}=n,{style:d,className:C,rest:w}=N(l),{variant:S}=Y(true);return jsxRuntime.jsxs("button",{className:core.removeDuplicateWords(`--button --${o} --${r||S} flex aic ${t?"":"jcc"} ${s?"--with-icon":""} ${C}`).trim().replace(/\s+/g," "),style:d,ref:e,disabled:p==kt.Loading||n.skeleton?.enabled||i,...w,children:[p==kt.Loading&&jsxRuntime.jsx(Ce,{variant:r||S,type:m||ue.Simple}),(!p||p==kt.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(J,{variant:a,name:s}),f===true?jsxRuntime.jsx(ne,{children:u}):u]})]})};Tr.displayName="Zuz.Button";var z=Tr;var Ir=react.forwardRef((e,n)=>{let{h:t,html:o,children:r,lines:s,...a}=e,{style:u,className:f,rest:m}=N(a),p=`h${e.h||1}`;return jsxRuntime.jsx(p,{ref:n,style:u,className:f,...m,children:o?jsxRuntime.jsx(ne,{dangerouslySetInnerHTML:{__html:o}}):r})});Ir.displayName="Zuz.Text";var V=Ir;var La=e=>{let{label:n,labelColor:t,icon:o,iconColor:r,index:s,className:a,onSelect:u}=e;return n=="-"?jsxRuntime.jsx(c,{className:"--line"}):jsxRuntime.jsxs(z,{reset:true,onClick:f=>u?.(e),className:`--item ${a||""}`.trim(),children:[jsxRuntime.jsx(c,{as:"--icon",children:jsxRuntime.jsx(J,{name:o,className:"--ico",style:r?{color:r}:{}})}),jsxRuntime.jsx(V,{className:"--lbl flex aic",style:t?{color:t}:{},children:n})]})},Rr=La;var Er=({ref:e,...n})=>{let{id:t,as:o,fx:r,offsetX:s,offsetY:a,parent:u,event:f,arrow:m,when:p,items:i,header:l,footer:d,origin:C=mt.TopRight,...w}=n,[S,I]=react.useState(false),[P,T]=react.useState(i||[]),{position:g,targetRef:b,calculatedAnchor:h}=hooks.useAnchorPosition(u?.current,f,{offsetX:s,offsetY:a,preferredAnchor:C}),R=u&&g.top>u.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",O=react.useMemo(()=>{let W=h.toLowerCase();return W.includes("left")?"--arrow-left":W.includes("right")?"--arrow-right":"--arrow-center"},[h]),k=g.top!==0||g.left!==0;react.useEffect(()=>{p&&k?I(true):p||I(false);},[p,k]);let{className:$,style:B,rest:D}=N(w),A=pe({...r?.transition?{transition:r.transition??q.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:r?.curve??X.EaseInOut,duration:r?.duration??.05,when:S&&k});return jsxRuntime.jsxs(c,{ref:b,className:`--contextmenu ${m||u!=null?`--has-arrow ${R} ${O}`:""} abs flex cols ${$}`.trim(),"aria-hidden":!S,style:{...B,...A.style,top:g.top,left:g.left,visibility:k?"visible":"hidden",transformOrigin:h},...D,children:[typeof l=="function"?react.createElement(l):l,P.map((W,x)=>jsxRuntime.jsx(Rr,{...W,index:x},`context-${W.label.toLowerCase()}-${x}`)),typeof d=="function"?react.createElement(d):d]})};Er.displayName="Zuz.ContextMenu";var go=Er;var Lr=react.forwardRef((e,n)=>{let{children:t,fx:o,when:r,fxDelay:s,fxStep:a,classToIgnore:u,...f}=e,m=Y(true),p=hooks.useDelayed(),i=o||m?.group?.fx,l=s||m?.group?.fxDelay,d=a||m?.group?.fxStep,C=u||m?.group?.classToIgnore||"-fx",w=react.useMemo(()=>i?react$1.addPropsToChildren(t,S=>{if(S.type===react.Fragment)return false;let I=S.props||{},P="fx"in I,T=I.as?Array.isArray(I.as)?I.as.join(" "):I.as:I.className||"",g=typeof T=="string"&&T.includes(C);return !P&&!g},S=>({fx:{...i,delay:(l||0)+S*(d||.1),when:r??(o?.when||p)}})):t,[t,r,p,i]);return jsxRuntime.jsx(c,{className:"--group",ref:n,...f,children:w})});Lr.displayName="Zuz.Group";var ho=Lr;var Mr=react.forwardRef((e,n)=>{let{message:t,spinner:o,spinnerSize:r,color:s,when:a,hideMessage:u,...f}=e,{className:m,style:p,rest:i}=N(f),{spinner:l}=Y(true);return "when"in e&&e.when==false?null:jsxRuntime.jsxs(ho,{fx:{transition:q.SlideInBottom,curve:X.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${m}`.trim(),style:{...p,backgroundColor:"var(--cover-bg)"},...i,children:[jsxRuntime.jsx(Ce,{variant:r||l?.variant||U.Small,type:o||l?.type||ue.Simple}),!u&&jsxRuntime.jsx(V,{className:"--label",style:{color:"var(--cover-label)"},children:t||"loading"})]})});Mr.displayName="Zuz.Cover";var Ie=Mr;var yo=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(t=>t!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},ze=new yo;var Or=react.forwardRef((e,n)=>{let{when:t,...o}=e;return jsxRuntime.jsx(c,{ref:n,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:q.FadeIn,when:t},...o})});Or.displayName="Zuz.Overlay";var _e=Or;var qa=({action:e,render:n=true,message:t=""})=>jsxRuntime.jsx(c,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:n?t:null}),Dr=qa;var Ya=({action:e,actionPosition:n,dialogID:t,variant:o})=>jsxRuntime.jsx(c,{as:`--footer flex aic rel ${n?n==mr.Center?"jcc":"":"jce"}`.trim(),children:e.map((r,s)=>jsxRuntime.jsx(z,{variant:o,onClick:a=>r.handler?r.handler():r.onClick?r.onClick():console.log("onClick Handler missing"),as:"--action",children:r.label},`dialog-${t}-action-${r.key}`))}),Ar=Ya;var Qa={colorSchemeLight:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"5"}),jsxRuntime.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),colorSchemeSystem:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsxRuntime.jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark:jsxRuntime.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M17.919 8.18H6.079c-.96 0-1.44 1.16-.76 1.84l5.18 5.18c.83.83 2.18.83 3.01 0l1.97-1.97 3.21-3.21c.67-.68.19-1.84-.77-1.84z"})}),arrowUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M18.68 13.978l-3.21-3.21-1.96-1.97a2.13 2.13 0 00-3.01 0l-5.18 5.18c-.68.68-.19 1.84.76 1.84h11.84c.96 0 1.44-1.16.76-1.84z"})}),search:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children:jsxRuntime.jsx("path",{d:"M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z"})}),close:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),eye:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 20.5c-4.299 0-8.24-3.023-10.544-8.086a1 1 0 010-.828C3.759 6.523 7.701 3.5 12 3.5s8.24 3.023 10.544 8.086a1.001 1.001 0 010 .828 18.14 18.14 0 01-1.391 2.52 1 1 0 11-1.666-1.106A15.87 15.87 0 0020.529 12C18.543 7.92 15.379 5.5 12 5.5S5.457 7.92 3.471 12c1.986 4.08 5.15 6.5 8.529 6.5a7.964 7.964 0 005.036-1.92 1 1 0 111.265 1.55A9.94 9.94 0 0112 20.5z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 16a4.004 4.004 0 01-3.929-4.756 1 1 0 011.965.375A2 2 0 1014 12a2.034 2.034 0 00-2.053-1.999 1.04 1.04 0 01-1.043-.947.963.963 0 01.902-1.05L12 8a4 4 0 010 8z"})]}),eyeSlash:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 15c-4.132 0-7.98-1.214-10.294-3.249a1 1 0 111.32-1.502C4.986 11.972 8.34 13 12 13s7.014-1.028 8.974-2.751a1 1 0 111.32 1.502C19.98 13.786 16.132 15 12 15z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 18a1 1 0 01-1-1v-3a1 1 0 012 0v3a1 1 0 01-1 1zM7.749 17.667a.964.964 0 01-.17-.014 1 1 0 01-.817-1.155l.505-2.935a1 1 0 111.97.339l-.504 2.935a1 1 0 01-.984.83zM3.636 16.306a1.001 1.001 0 01-.942-1.336l.978-2.745a1 1 0 111.884.672l-.978 2.745a1 1 0 01-.942.664zM16.251 17.667a1 1 0 01-.984-.83l-.505-2.935a1 1 0 011.97-.339l.506 2.935a1 1 0 01-.816 1.155.964.964 0 01-.17.014zM20.364 16.306a1 1 0 01-.942-.664l-.978-2.745a1 1 0 111.884-.672l.978 2.745a1.001 1.001 0 01-.942 1.336z"})]}),check:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsxRuntime.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[we.Info]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[we.Warning]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[we.Error]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[we.Success]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntime.jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),volumeHigh:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M22 11.25h-1.25V10c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.25H18c-.41 0-.75.34-.75.75s.34.75.75.75h1.25V14c0 .41.34.75.75.75s.75-.34.75-.75v-1.25H22c.41 0 .75-.34.75-.75s-.34-.75-.75-.75M14.02 3.782c-1.12-.62-2.55-.46-4.01.45l-2.92 1.83c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h1.4300000000000002c.23 0 .46.07.66.19l2.92 1.83c.88.55 1.74.82 2.54.82a3 3 0 0 0 1.47-.37c1.11-.62 1.73-1.91 1.73-3.63v-9.18c0-1.72-.62-3.01-1.73-3.63"})}),volumeMute:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M18 16.75a.75.75 0 0 1-.6-1.2 5.93 5.93 0 0 0 .72-5.84.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.02 2.42.67 5.23-.9 7.33-.15.19-.37.29-.6.29"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.828 19.25a.75.75 0 0 1-.6-1.2c2.14-2.85 2.61-6.67 1.23-9.96a.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.59 3.78 1.05 8.16-1.41 11.44-.14.2-.37.3-.6.3M14.04 12.958c.63-.63 1.71-.18 1.71.71v2.93c0 1.72-.62 3.01-1.73 3.63a3 3 0 0 1-1.47.37c-.8 0-1.66-.27-2.54-.82l-.64-.4c-.54-.34-.63-1.1-.18-1.55zM21.77 2.229c-.3-.3-.79-.3-1.09 0l-4.95 4.95c-.06-1.6-.66-2.8-1.72-3.39-1.12-.62-2.55-.46-4.01.45l-2.91 1.82c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h.16l-2.94 2.94c-.3.3-.3.79 0 1.09.16.14.35.22.55.22s.39-.08.54-.23l18.46-18.46c.31-.3.31-.78 0-1.08"})]}),plus:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsxRuntime.jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsxRuntime.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},L=Qa;var ja=({title:e="Alert",onClose:n})=>jsxRuntime.jsxs(c,{as:"--head flex aic rel",children:[jsxRuntime.jsx(c,{as:`--${e?"title":"dot"} flex aic jcc rel`,children:e}),jsxRuntime.jsx(z,{onClick:t=>n(),className:"--closer abs center-v",children:L.close})]}),$r=ja;var Fr=({ref:e,...n})=>{let{index:t,id:o,title:r,message:s,transition:a,curve:u,speed:f,type:m,action:p,actionPosition:i,spinner:l,loadingMessage:d,variant:C,inBackground:w,forceClose:S,forceLoading:I,onClose:P,onShow:T,onHide:g,...b}=n,h=react.useMemo(()=>core.uuid(12),[]),[y,R]=react.useState(r||""),[O,k]=react.useState(s||""),[$,B]=react.useState(m||Ye.Dialog),[D,A]=react.useState(false),[W,x]=react.useState(true),[E,F]=react.useState(p||null),[G,_]=react.useState(false),{variant:Z,spinner:ee,dialog:j}=Y(true),Q=C||j?.variant||Z||U.Small,{style:H,className:K,rest:oe}=N(b),ie=react.useRef(null),fe=pe({when:D,duration:f||j?.speed||.3,delay:j?.delay||.1,transition:a||j?.transition||q.SlideInBottom,curve:u||j?.curve||X.EaseInOut,watch:["scale","filter","transform"]}),le=()=>{A(false),P(o);},te=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{ze.isTop(le)&&le();}}],[D]);hooks.useShortcuts(te),react.useEffect(()=>{B(Ye.Dialog),k(s),R(y),E&&F(E.reduce((se,be)=>(se.push({...be,key:be.key||core.uuid(12)}),se),[])),A(true),setTimeout(()=>T?T():()=>{},500);},[]),react.useEffect(()=>{S&&le();},[S]),react.useEffect(()=>{I!=null&&_(I);},[I]);let re=react.useMemo(()=>1e4+t*10,[t]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(_e,{style:{zIndex:re},when:D}),jsxRuntime.jsxs(c,{as:`--dialog --${(m??Ye.Default).toLowerCase()} ${D?"--visible":""} ${K} fixed abc`.trim(),style:{...fe.style,zIndex:re+1,pointerEvents:w==true?"none":"auto",...w==true?{scale:"0.92",filter:"blur(2px)"}:{}},...oe,ref:ie,children:[jsxRuntime.jsx($r,{title:y,onClose:le}),jsxRuntime.jsx(Dr,{message:O,render:W,action:E}),E&&E.length>0&&jsxRuntime.jsx(Ar,{variant:Q,action:E,dialogID:h,actionPosition:i}),jsxRuntime.jsx(Ie,{when:G,spinner:l||j?.spinner||ee?.type||ue.Simple,message:d||j?.loadingMessage})]})]})};Fr.displayName="Zuz.Dialog";var vo=Fr;var Zr=react.forwardRef((e,n)=>{let{speed:t,style:o,...r}=e,{rootRef:s,containerRef:a,thumbY:u,thumbX:f,onScrollY:m,onScrollX:p}=hooks.useScrollbar(t||1),{style:i,className:l,rest:d}=N(r);return react.useEffect(()=>{let C=a.current;if(!C)return;let w=()=>{window.dispatchEvent(new Event("resize"));};return C.addEventListener("scroll",w),()=>C.removeEventListener("scroll",w)},[]),jsxRuntime.jsxs(c,{ref:s,className:l.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(c,{as:`--scroll-content ${l}`.trim(),ref:a,style:o||{},children:d.children}),jsxRuntime.jsx(c,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:u,onMouseDown:m})}),jsxRuntime.jsx(c,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(c,{as:"--scroll-thumb --abs",ref:f,onMouseDown:p})})]})});Zr.displayName="Zuz.ScrollView";var wo=Zr;var Kr=({ref:e,...n})=>{let{id:t,index:o,from:r,speed:s,children:a,margin:u,animation:f,prerender:m,inBackground:p,forceClose:i,forceLoading:l,onClose:d,...C}=n,{drawer:w}=Y(true),[S,I]=react.useState(a),[P,T]=react.useState(false),[g,b]=react.useState(m??(w?.prerender||true)),[h,y]=react.useState(false),R=()=>{T(false),d?.(t??-1);},{className:O,style:k,rest:$}=N(C),B=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{ze.isTop(R)&&R();}}],[P]);hooks.useShortcuts(B),react.useEffect(()=>{I(a);},[a]),react.useEffect(()=>(P?ze.push(R):ze.pop(R),()=>ze.pop(R)),[P]),react.useEffect(()=>{T(true);},[]),react.useEffect(()=>{i&&R();},[i]),react.useEffect(()=>{l!=null&&y(l);},[l]);let D=r||w?.from||ge.Left,A=react.useMemo(()=>{switch(D){case ge.Left:return {from:{x:"-100vw"},to:{x:0}};case ge.Right:return {from:{x:"100vw"},to:{x:0}};case ge.Top:return {from:{y:"-100vh"},to:{y:0}};case ge.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[r,w?.from]),W=pe({from:{...A.from,opacity:0},to:{...A.to,opacity:1},when:P,curve:f||w?.animation||X.EaseInOut,duration:s||w?.speed||.5,watch:["scale","filter"]}),x=react.useMemo(()=>1e4+(o||1)*10,[o]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(_e,{onClick:E=>{P&&R();},when:P,style:{zIndex:x}}),jsxRuntime.jsxs(c,{ref:e,"aria-hidden":!P,className:`--drawer flex cols ${O} --${D.toLowerCase()} fixed`,style:{...k,...W.style,"--m":`${u||w?.margin||0}px`,zIndex:x+1,pointerEvents:p==true?"none":"auto",...p==true?{scale:"0.92",filter:"blur(2px)"}:{}},...$,children:[r==ge.Top||r==ge.Bottom?jsxRuntime.jsx(c,{className:"--handle"}):null,jsxRuntime.jsx(z,{as:"--close-drawer --abs",onClick:R,children:L.close}),jsxRuntime.jsxs(wo,{as:"rel",children:[g||P?S:null,jsxRuntime.jsx(Ie,{when:h})]})]})]})};Kr.displayName="Zuz.Drawer";var To=Kr;var Gr=react.forwardRef((e,n)=>{let{progress:t,type:o,animated:r,...s}=e,a=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:p=>{a.current.style.width=`${p*100}%`,a.current.setAttribute("data-value",p+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),react.useEffect(()=>{t&&a.current&&(r?setTimeout(()=>a.current.style.width=`${t*100}%`,500):a.current.style.width=`${t*100}%`,a.current.setAttribute("data-value",t+""));},[t,a.current]);let{className:u,style:f,rest:m}=N(s);return jsxRuntime.jsx(c,{className:`--progress ${r?"--animated":""} flex rel ${u}`.trim(),style:f,...m,children:jsxRuntime.jsx(c,{ref:a,className:"--bar rel"})})});Gr.displayName="Zuz.ProgressBar";var Ze=Gr;var Ht=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Ht||{}),At=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(At||{}),Ur=(t=>(t.Stack="stack",t.Individual="individual",t))(Ur||{}),qr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var gi=e=>{let{index:n,id:t,type:o,icon:r,title:s,message:a,duration:u,sticky:f=false,actions:m=[],position:p,style:i,isHovered:l,total:d,progress:C,forceClose:w,variant:S,onClick:I,onClose:P}=e,[T,g]=react.useState(false),[b,h]=react.useState(false),{toast:y}=Y(true),R=b||w,O=p||y?.position||"TopCenter",k=o||y?.type||"default",$=i||y?.style||"stack",B=u||y?.duration||4,D=C||y?.progress||false,A=react.useRef(B*1e3),W=react.useRef(void 0),x=react.useRef(void 0),E=react.useRef(null),F=pe({when:T&&!R,duration:.3,transition:y?.transition||(O.includes("Top")?q.SlideInTop:O.includes("Bottom")?q.SlideInBottom:O.includes("Left")?q.SlideInLeft:q.SlideInRight),curve:y?.curve||X.EaseInOut,watch:["transform","opacity","scale","filter"]});react.useEffect(()=>{g(true);let K=oe=>{if(x.current!==void 0){let ie=oe-x.current;if(!l&&!f&&!R&&(A.current-=ie,E.current)){let fe=Math.max(0,A.current/(B*1e3)*100);E.current?.setProgress?.(fe/100);}}x.current=oe,A.current<=0?h(true):W.current=requestAnimationFrame(K);};return W.current=requestAnimationFrame(K),()=>{W.current&&cancelAnimationFrame(W.current);}},[l,f,R,B]),react.useEffect(()=>{if(R){let K=setTimeout(()=>{P?.(t);},350);return ()=>clearTimeout(K)}},[R,t]);let G=$==="stack",_=l?n*65:n*8,Z=l?1:Math.max(.85,1-n*.05),ee=l?1:Math.max(.4,1-n*.2),j=()=>{I?I():(!m||m.length===0)&&h(true);},Q=F.style.transform||"translate(0, 0)",H=R?Q:`${Q} translateY(${O.includes("Top")?_:-_}px) scale(${Z})`;return jsxRuntime.jsxs(c,{onClick:j,as:`--snack --${R?"hidden":"visible"} --${S||y?.variant||U.Medium} --${k} --${O.toLowerCase()} abs flex aic`,style:{...F.style,zIndex:1e3-n,pointerEvents:R?"none":"auto",opacity:R?F.style.opacity:ee,transform:H,filter:!R&&G&&!l&&n>0?"blur(1px)":"none",cursor:!m||m.length===0?"pointer":"default",transition:`${F.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxRuntime.jsx(c,{as:"--ico flex aic jcc",children:r?jsxRuntime.jsx(J,{name:r}):jsxRuntime.jsx(c,{as:"--no-icon"})}),jsxRuntime.jsxs(c,{as:"--meta flex cols",children:[jsxRuntime.jsx(V,{as:"--tt",children:s||qr[o]}),jsxRuntime.jsx(V,{as:"--tm",children:a})]}),m&&m.length>0&&jsxRuntime.jsx(c,{as:"--actions flex gap:5",children:m.map((K,oe)=>jsxRuntime.jsx(z,{as:"--snack-btn bold",onClick:ie=>{ie.stopPropagation(),K.onClick();},children:K.label},oe))}),D&&jsxRuntime.jsx(Ze,{as:"abs",ref:E})]})},Po=gi;var he=react.createContext(null),wi=({ref:e,...n})=>{let o=react.useContext(he)?.depth??0,[r,s]=react.useState(null),[a,u]=react.useState(null),[f,m]=react.useState(false),[p,i]=react.useState([]),l=hooks.useDelayed(),d=react.useRef(0),C=()=>++d.current,w=()=>{m(false),setTimeout(()=>u(null),200);};react.useImperativeHandle(e,()=>({add(g){let b=C(),h={id:b,...g};return i(y=>[...y,h]),b},openMenu(g){m(false),setTimeout(()=>{u({id:C(),type:"menu",props:g}),m(true);},16);},remove(g){i(b=>b.map(h=>h.id===g?{...h,props:{...h.props,forceClose:true}}:h)),a?.id===g&&w();},loading(g,b){i(h=>h.map(y=>y.id===g?{...y,props:{...y.props,forceLoading:b}}:y)),a?.id===g&&w();},clear(g){i(p.filter(b=>b.type!=g));}})),react.useEffect(()=>{if(a&&f){let g=()=>w();return document.addEventListener("click",g),()=>document.removeEventListener("click",g)}},[a,f,w]);let S=g=>{setTimeout(()=>{i(b=>b.filter(h=>h.id!==g)),a?.id===g&&u(null);},250);},I=react.useMemo(()=>[...p.filter(g=>g.type!="toast")],[p]);if(!l)return null;let P=p.filter(g=>g.type=="toast").reverse(),T=Object.values(At);return reactDom.createPortal(jsxRuntime.jsxs(c,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+o},children:[I.map((g,b)=>{let h=b<I.length-1;return g.type==="dialog"?jsxRuntime.jsx(vo,{onClose:S,index:b,id:g.id,...g.props,inBackground:h},`layer-${g.type}-${g.id}`):g.type==="drawer"?jsxRuntime.jsx(To,{onClose:S,index:b,id:g.id,...g.props,inBackground:h},`layer-${g.type}-${g.id}`):null}),T.map(g=>{let b=P.filter(h=>(h.props.position||"TopCenter")===g);return b.length===0?null:jsxRuntime.jsx(c,{onMouseEnter:()=>s(g),onMouseLeave:()=>s(null),as:`--toast-container fixed --${g.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:b.map((h,y)=>jsxRuntime.jsx(Po,{index:y,total:b.length,isHovered:r===g,onClose:S,id:h.id,...h.props},h.id))},g)}),a&&jsxRuntime.jsx(c,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(go,{onClose:w,when:f,...a.props},`menu-${a.id}`)})]}),document.body)},Si=({children:e})=>{let n=react.useContext(he),t=n?n.depth+1:0,o=react.useRef(null),r=react.useMemo(()=>({add:s=>o.current?.add(s),openMenu:s=>o.current?.openMenu(s),remove:s=>o.current?.remove(s),loading:(s,a)=>o.current?.loading(s,a),clear:s=>o.current?.clear(s),depth:t,isSubLayer:!!n}),[n]);return jsxRuntime.jsxs(he.Provider,{value:r,children:[e,jsxRuntime.jsx(wi,{ref:o})]})},uo=Si;var Ti=()=>{let e=react.useContext(he);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(o,r,s)=>{o.preventDefault(),e.openMenu({event:o,items:r,origin:s});},showMenu:(o,{items:r,origin:s,offsetX:a,offsetY:u,transition:f,curve:m,arrow:p,duration:i,header:l,footer:d})=>{e.openMenu({fx:{transition:f,curve:m,duration:i},parent:o,items:r,origin:s||mt.TopCenter,offsetX:a,offsetY:u,arrow:p,header:l,footer:d});},hide:e.clear}},Pi=Ti;var Ri=()=>{let e=react.useContext(he);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>e.clear("dialog"),t=s=>e.remove(s),o=(s,a)=>e.loading(s,a);return {clearAll:n,show:s=>{let a=e.add({type:"dialog",props:{...s,type:Ye.Dialog}});return {id:a,setLoading:u=>o(a,u),hide:()=>t(a)}},hide:t}},Ni=Ri;var Ei=()=>{let e=react.useContext(he);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>e.clear("drawer"),t=s=>e.remove(s),o=(s,a)=>e.loading(s,a),r=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:u=>o(a,u),close:()=>t(a)}};return {clearAll:n,open:s=>r({children:s}),right:s=>r({children:s,from:ge.Right}),left:s=>r({children:s,from:ge.Left}),top:s=>r({children:s,from:ge.Top}),bottom:s=>r({children:s,from:ge.Bottom}),close:t}},Li=Ei;var Mi=(e,n,t={})=>{let[o,r]=react.useState(null),[s,a]=react.useState(false),{duration:u=.25,curve:f=X.EaseOutBack,borderRadius:m={from:40,to:24},targetWidth:p=320}=t;return react.useLayoutEffect(()=>{n&&e.current?(r(e.current.getBoundingClientRect()),a(true)):n||a(false);},[n,e]),{style:pe({from:{opacity:0,width:o?.width,height:o?.height,borderRadius:m.from},to:{opacity:1,width:p,height:"auto",borderRadius:m.to},curve:f,duration:u,when:s&&n}).style,isMeasured:s,sourceRect:o}},Oi=Mi;var Vi=(e,n={})=>{let{offset:t=8,direction:o="bottom",container:r=null,triggerRef:s=null}=n,a=react.useRef(null),u=react.useCallback(()=>{let f=e.current;if(!f)return;let m=s?.current||f.parentElement;if(!m){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let p=f.getBoundingClientRect(),i=m.getBoundingClientRect(),l,d;r?(l=r.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(f).position==="fixed"?d="fixed":d="absolute",d==="fixed"?l={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:l={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),f.style.position!==d&&(f.style.position=d),a.current=d;let S=0,I=0;switch(o){case "top":S=i.top-p.height-t,I=i.left,S<l.top&&i.bottom+p.height+t<=l.bottom&&(S=i.bottom+t);break;case "bottom":S=i.bottom+t,I=i.left,S+p.height>l.bottom&&i.top-p.height-t>=l.top&&(S=i.top-p.height-t);break;case "left":S=i.top,I=i.left-p.width-t,I<l.left&&i.right+p.width+t<=l.right&&(I=i.right+t);break;case "right":S=i.top,I=i.right+t,I+p.width>l.right&&i.left-p.width-t>=l.left&&(I=i.left-p.width-t);break}if(S=Math.max(l.top,Math.min(S,l.bottom-p.height)),I=Math.max(l.left,Math.min(I,l.right-p.width)),a.current==="fixed")f.style.top=`${S}px`,f.style.left=`${I}px`;else {let P;f.offsetParent?P=f.offsetParent.getBoundingClientRect():P={top:0,left:0};let T=S-P.top+window.scrollY,g=I-P.left+window.scrollX;f.style.top=`${T}px`,f.style.left=`${g}px`;}},[e,s,t,o,r]);return react.useEffect(()=>{let f=e.current;if(!f)return;let m=s?.current||f.parentElement;if(!m){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let p=new ResizeObserver(u);return p.observe(f),m&&p.observe(m),u(),window.addEventListener("resize",u),window.addEventListener("scroll",u,true),()=>{p.disconnect(),m&&p.disconnect(),window.removeEventListener("resize",u),window.removeEventListener("scroll",u,true);}},[e,o,t,r,s]),{postion:a.current,reposition:u}},gt=Vi;var zi=()=>{let e=react.useContext(he);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let n=(i,l)=>e.add({type:"toast",props:{...l,type:i}}),o=i=>e.remove(i),m=(i,l,d)=>{let C=n(i,{...l,sticky:l.sticky??false,actions:[{label:d?.label||"Ok",onClick:()=>{d?.onClick?.(),o(C);}}]});return C},p=(i,l,d,C)=>{let w=n(i,{...l,sticky:true,actions:[{label:C?.label||"Cancel",onClick:()=>{C?.onClick?.(),o(w);}},{label:d?.label||"Ok",onClick:()=>{d?.onClick?.(),o(w);}}]});return w};return {ok:(i,l)=>m("default",i,l),success:(i,l)=>m("success",i,l),error:(i,l)=>m("error",i,l),confirm:(i,l,d)=>p("default",i,l,d),warn:(i,l)=>m("warn",i,l)}},_i=zi;var Zi=()=>{let e=react.useContext(he);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let n=(m,p)=>e.add({type:"toast",props:{...p,type:m}});return {show:(m,p,i,l)=>n("default",{title:m,message:p,icon:i,duration:l}),hide:m=>e.remove(m),success:(m,p,i,l)=>n("success",{title:m,message:p,icon:i,duration:l}),error:(m,p,i,l)=>n("error",{title:m,message:p,icon:i,duration:l}),warn:(m,p,i,l)=>n("warn",{title:m,message:p,icon:i,duration:l}),promise:(m,p,i,l)=>n("promise",{title:m,message:p,icon:i,duration:l}),clearAll:()=>e.clear("toast")}},Io=Zi;var rn=({ref:e,style:n,...t})=>{let o=react.useRef(null),r=react.useMemo(()=>e&&typeof e!="function"&&e.current?e:o,[e]),{style:s,className:a,rest:u}=N(t,r);return jsxRuntime.jsx("div",{ref:e||o,style:{...s,...n||{}},className:a,...u})};rn.displayName="Zuz.Box";var c=rn;var sn=react.forwardRef((e,n)=>{let{title:t,message:o,...r}=e,[s,a]=react.useState(false);return jsxRuntime.jsxs(c,{className:"--accordion flex cols",...r,children:[jsxRuntime.jsxs(z,{onClick:u=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(V,{className:"--label flex",children:t}),jsxRuntime.jsx(c,{className:"--arrow flex",children:s?L.arrowUp:L.arrowDown})]}),s&&jsxRuntime.jsx(c,{className:"--detail",children:o})]})});sn.displayName="Zuz.Accordion";var Xi=sn;var Yi=({label:e,icon:n,onClick:t,idx:o,selected:r})=>jsxRuntime.jsx(z,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${o}`),className:`--action ${r?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsxRuntime.jsx(J,{name:n}):n}),ln=Yi;var cn=react.forwardRef((e,n)=>{let{items:t,name:o,selected:r,position:s,...a}=e,u=react.useRef(null),[f,m]=react.useState(r||t[0].tag||0),p=react.useCallback(({x:S,y:I})=>{if(u.current){let P=u.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${S-P.left}`),document.documentElement.style.setProperty("--tip-y",`${I-P.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),i=react.useCallback(()=>{u.current&&(u.current.removeEventListener("pointerleave",i),u.current.removeEventListener("pointermove",p),document.documentElement.style.setProperty("--tip-s","0"));},[]),l=react.useCallback(()=>{u.current&&(u.current.addEventListener("pointerleave",i),u.current.addEventListener("pointermove",p));},[]);react.useEffect(()=>{u.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((S,I)=>I.label.length>S.length?I.label:S,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),u.current?.addEventListener("pointerenter",l));},[]);let{className:d,style:C,rest:w}=N(a);return jsxRuntime.jsxs(c,{ref:u,style:C,className:[`--actionbar flex aic ${d}`,`${!s||s==me.Auto?"rel":`--${s}`}`].join(" ").trim(),...w,children:[t.map((S,I)=>jsxRuntime.jsx(ln,{selected:f===S.tag||r==I,...S,idx:I},`actionbar-action-${S.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(c,{className:"--tip abs",children:jsxRuntime.jsx(c,{className:"--track flex aic",children:t.map(({label:S})=>jsxRuntime.jsx(c,{className:"--lb",children:S},`tool-tip-${S.toLowerCase().replace(/\s+/g,"-")}`))})})]})});cn.displayName="Zuz.ActionBar";var tl=cn;var pn=react.forwardRef((e,n)=>{let{type:t,icon:o,title:r,message:s,iconSize:a,...u}=e,{className:f,style:m,rest:p}=N(u);return jsxRuntime.jsxs(c,{className:`--alert --${t||we.Info} flex aic ${f}`.trim(),style:m,...p,children:[jsxRuntime.jsx(c,{className:`--icon icon-${o||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!o&&L[t||we.Info]}),jsxRuntime.jsxs(c,{className:"--meta flex cols",children:[jsxRuntime.jsx(V,{className:`--title ${s?"--tm":""}`,children:r||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(V,{className:"--message",h:2,children:s})]})]})});pn.displayName="Zuz.Alert";var nl=pn;var un=({ref:e,...n})=>{let{variant:t,numeric:o,onConfirm:r,...s}=n,{style:a,className:u,rest:f}=N(s),{variant:m}=Y(true),p=i=>{o&&(i.currentTarget.value=i.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${t||m} flex ${u}`.trim(),style:a,onInput:p,onKeyDown:i=>{i.key=="Enter"&&r?.(i.currentTarget.value);},ref:e,...f})};un.displayName="Zuz.Input";var ae=un;var dn=e=>{let{meta:n,children:t}=e,o=hooks.useDelayed(),{label:r,icon:s,...a}=react.isValidElement(n)?{}:n,{className:u,style:f,rest:m}=N({...a,...a.animate?{animate:{...a.animate,when:o}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:f,className:u,children:n}):jsxRuntime.jsxs("li",{style:f,className:u,...m,children:[t,typeof n=="string"?n:r]})};dn.displayName="Zuz.ListItem";var gn=dn;var yn=react.forwardRef((e,n)=>{let{items:t,variant:o,direction:r,seperator:s,ol:a,...u}=e,{className:f,style:m,rest:p}=N(u),i=a==true?"ol":"ul";return react.createElement(i,{className:`--list --${o||U.Small} flex ${r??"cols"} ${f}`.trim(),style:m,ref:n,...p,children:t.map((l,d,C)=>{let w=`${typeof l=="string"?`li-${String(l)}`:react.isValidElement(l)?`li-${l.key}`||`${d}-${core.MD5(l.toString())}`:l.label}-${d}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(gn,{meta:l}),s&&C[d+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${w}`):null]},w)})})});yn.displayName="Zuz.List";var We=yn;var bn=react.forwardRef((e,n)=>{let{fx:t,action:o,data:r,withStyle:s,onChange:a,...u}=e,{className:f}=N({as:s||""}),{style:m}=N(u),[p,i]=react.useState(false),[l,d]=react.useState(r||[]),C=react.useRef(null),w=react.useRef(null),S=react.useRef(null),I=react.useMemo(()=>u.name||core.uuid(12),[]),[P,T]=react.useState(null),[g,b]=react.useState(null),[h,y]=react.useState([]),O=hooks.useDebounce(x=>{x.target.value==""?(i(false),d([])):o&&x.target.value.trim()!=""&&core.withPost(o,{query:x.target.value}).then(E=>{"items"in E&&core._(E.items).isArray()?(d(E.items),b(x.target.value),y(E.items)):console.error("Action Response should contain items array"),T(null);}).catch(E=>{T(null),d([]);});},250),k=()=>{if(w.current){let x=w.current.getBoundingClientRect(),E=window.innerHeight-x.bottom,F=x.top;if(S.current){let G=S.current;E<G.offsetHeight&&F>E?(G.style.top="auto",G.style.bottom=`${x.height}px`,G.style.maxHeight=`${F-150}px`):(G.style.top=`${x.height+5}px`,G.style.bottom="auto",G.style.maxHeight=`${E-150}px`);}}},$=x=>{if(l.length>0){if((x.key==="ArrowDown"||x.key==="ArrowUp")&&(x.preventDefault(),x.stopPropagation()),x.key==="Escape")T(null),i(false),d([]);else if(x.key==="ArrowDown")T(E=>{let F=E===null||E===l.length-1?0:E+1;return D(F),F});else if(x.key==="ArrowUp")T(E=>{let F=E===null||E===0?l.length-1:E-1;return D(F),F});else if(x.key==="Enter"&&P!==null){let E=l[P];C.current&&(C.current.value=E,i(false),d([]));}}},B=x=>{C.current&&(C.current.value=x,i(false),d([]));},D=x=>{let E=l[x];if(E&&C.current&&(C.current.value=E,C.current.setSelectionRange(E.length,E.length)),S.current){let G=S.current.children[x];G&&G.scrollIntoView({block:"nearest"});}},A=x=>{w.current&&!w.current.contains(x.target)&&(i(false),d([]));},W=()=>{C.current&&C.current.value===g&&(d(h),T(null),k());};return react.useEffect(()=>(window.addEventListener("resize",k),window.addEventListener("scroll",k,true),document.addEventListener("mousedown",A),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k,true),document.removeEventListener("mousedown",A);}),[]),react.useEffect(()=>{k();},[l]),jsxRuntime.jsxs(c,{style:m,ref:w,className:`--autocomplete --${e.size||U.Small} flex aic rel ${f}`.trim(),children:[jsxRuntime.jsx(ae,{ref:C,autoComplete:"off",onChange:O,onKeyDown:$,onFocus:W,...u}),jsxRuntime.jsx(c,{className:"--arrow rel flex aic jcc",children:l.length>0?L.arrowUp:L.arrowDown}),l.length>0&&jsxRuntime.jsx(We,{id:I,ref:S,className:"--suggestion-list flex cols abs",items:l.map((x,E)=>({label:x,onClick:F=>{F.preventDefault(),F.stopPropagation(),B(x);},className:P===E?"--current":"",animate:{transition:q.SlideInBottom,curve:X.EaseInOut,delay:core.clamp(.02*E,.02,.5)}}))})]})});bn.displayName="Zuz.AutoComplete";var Sl=bn;var vn=react.forwardRef((e,n)=>{let t=react.useRef(null),o=react.useMemo(()=>n&&typeof n!="function"&&n.current?n:t,[n]),{style:r,className:s,rest:a}=N(e,o);return !a.src||a.src==""?null:jsxRuntime.jsx("img",{ref:o,style:r,className:`${s} flex`,...a})});vn.displayName="Zuz.Image";var Ge=vn;var wn=react.forwardRef((e,n)=>{let{src:t,variant:o,type:r,crossOrigin:s,referrerPolicy:a,fx:u,as:f,alt:m,color:p,style:i,...l}=e,[d,C,w]=hooks.useImage(t??"",s,a),{className:S,style:I,rest:P}=N({fx:u,as:f});return jsxRuntime.jsx(c,{className:`--avatar --${o||U.Small} --${(r||cr.Circle).toLowerCase()} rel flex aic jcc ${S}`.trim(),style:{background:p||"var(--primary)",...i,...I},...P,children:t?jsxRuntime.jsx(Ge,{src:d,crossOrigin:s,referrerPolicy:a,...l}):jsxRuntime.jsx(V,{className:"--avatar-label",children:(m?m.charAt(0):"A").toUpperCase()})})});wn.displayName="Zuz.Avatar";var El=wn;var Ll=({size:e=5,type:n="dead",label:t="",variant:o=U.Small,loading:r=false,spinner:s,...a})=>{let{style:u,className:f,rest:m}=N(a);return jsxRuntime.jsxs(c,{style:{...core._(t).isEmpty()?{"--badge-size":e}:{},...u},as:`--badge --${o} --${n} rel flex aic jcc ${f}`.trim(),children:[jsxRuntime.jsx(c,{fx:{transition:q.FadeIn,curve:X.Liquid,duration:.5,when:r},as:"abs abc",children:jsxRuntime.jsx(Ce,{type:s})}),core._(t).isEmpty()?jsxRuntime.jsx(c,{as:`--dot --${n}`}):jsxRuntime.jsx(V,{as:"--label",children:t})]})},kl=Ll;var Gl=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>dateFns.format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>dateFns.format(dateFns.addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>dateFns.addDays(new Date,1),getDateFormat:()=>dateFns.format(dateFns.addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let e=new Date,n=e.getDay();return dateFns.addDays(e,(6-n)%7||6)},getDateFormat:()=>{let e=new Date,n=e.getDay();return dateFns.format(dateFns.addDays(e,(6-n)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,2),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,4),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,4)}],Ul=e=>{let n=new Set;return e.filter(t=>{if(t.label=="Later")return true;let o=t.getDate().toISOString().split("T")[0];return n.has(o)?false:(n.add(o),true)})},Cn=react.forwardRef((e,n)=>{let{defaultValue:t,variant:o,onChange:r,...s}=e,{style:a,className:u,rest:f}=N(s),[m,p]=react.useState(t||new Date),i=dateFns.startOfMonth(m),l=dateFns.endOfMonth(m),d=dateFns.startOfWeek(i),C=dateFns.endOfWeek(l),w=react.useMemo(()=>dateFns.eachDayOfInterval({start:d,end:C}),[d,C]),S=T=>{r?.(T),p(T);},I=()=>{p(T=>new Date(T.getFullYear(),T.getMonth()-1));},P=()=>{p(T=>new Date(T.getFullYear(),T.getMonth()+1));};return jsxRuntime.jsxs(c,{as:`--calendar flex --${o||"sm"} ${u}`,style:a,children:[jsxRuntime.jsx(c,{as:"--calendar-quick-select flex cols flex:1",children:Ul(Gl).map(T=>{let g=T.getDate();return jsxRuntime.jsxs(z,{onClick:()=>S(g),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(V,{as:"flex:1",children:T.label}),jsxRuntime.jsx(V,{as:"tar",children:T.getDateFormat()})]},`--dtp-option-label-${T.label}`)})}),jsxRuntime.jsxs(c,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(c,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(V,{as:"flex:1 --calendar-cm bold",children:dateFns.format(m,"MMMM yyyy")}),jsxRuntime.jsx(z,{onClick:I,as:"--calendar-chevron",children:L.chevronUpOutline}),jsxRuntime.jsx(z,{onClick:P,as:"--calendar-chevron",children:L.chevronDownOutline})]}),jsxRuntime.jsxs(c,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(T=>jsxRuntime.jsx(V,{as:"--calendar-day",children:T},`--calendar-hd-${T}`)),w.map((T,g)=>{let b=dateFns.isSameMonth(T,m),h=dateFns.isSameDay(T,m),y=dateFns.isToday(T);return jsxRuntime.jsx(z,{disabled:!b,onClick:()=>S(T),as:["--calendar-day --calendar-dd",`${h?"--calendar-dd-selected":""}`,`${y?"--calendar-dd-current":""}`],children:dateFns.format(T,"d")},`--calendar-day-${g}-${T.getFullYear()}-${T.getMonth()}-${T.getDay()}`)})]})]})]})});Cn.displayName="Zuz.Calendar";var Mo=Cn;var Zt=(t=>(t.Table="table",t.Gooey="gooey",t))(Zt||{});var Rn=({ref:e,...n})=>{let{itemCount:t,itemsPerPage:o,startPage:r,pageRange:s,paginationStyle:a,breakLabel:u,prevLabel:f,nextLabel:m,hash:p,loading:i,seperator:l,renderOnZeroPageCount:d,asDots:C,progressBar:w,onPageChange:S,...I}=n,P=react.useRef(null),T=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),g=react.useCallback(x=>`${core.toHash(x,p||6,T)}${l||""}${T}`,[T]),b=react.useMemo(()=>u||"...",[u]),h=react.useRef(null),[y,R]=react.useState({id:p?r?typeof r=="number"?g(r):r:1:r||1,label:r||1});react.useImperativeHandle(e,()=>({setPage:x=>R(x),getPage:x=>y,setProgress:x=>h.current?.setProgress?.(x),getProgress:()=>h.current?.getProgress?.()??0}),[h.current]);let{style:O,className:k,rest:$}=N(I),B=react.useCallback(x=>typeof x=="number"?x:+x.label,[]);if(!t)throw new Error('"itemCount" prop is required');let D=react.useMemo(()=>Math.ceil(t/o),[t,o]),A=react.useMemo(()=>{let x=[],E=Math.max(B(y)-(s||2),1),F=Math.min(B(y)+(s||2),D);E>1&&x.push({id:p?g(1):1,label:1}),E>2&&x.push({id:-1,label:b});for(let G=E;G<=F;G++)x.push({id:p?g(G):G,label:G});return F<D-1&&x.push({id:-1,label:b}),F<D&&x.push({id:p?g(D):D,label:D}),x},[y]),W=react.useCallback(x=>{let E=x;+E.label<1||+E.label>D||(R(E),S?.(E));},[t,o,y]);return A.length<=1&&(d??false)===false?null:jsxRuntime.jsxs(c,{ref:P,as:`--pagination ${C===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${k}`,children:[jsxRuntime.jsx(c,{as:"flex flex:1 aic --pgt-btns",children:(A.length>1?A:[{id:1,label:1},{id:-1,label:b}]).map((x,E,F)=>{let G=(typeof x=="string"?x:x.label)==B(y);return jsxRuntime.jsx(z,{disabled:x.id==-1||B(y)==+x.label,className:G?"--current-page":"",onClick:_=>W(x),children:C===true?w===true&&G?jsxRuntime.jsx(Ze,{ref:h}):"":typeof x=="string"?x:x.label},`--pg-${E}-${x.id}`)})}),jsxRuntime.jsx(c,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(B(y)-1)*o+1} - `,`${Math.min(B(y)*o,t)} of ${t} items`].join(" ")}),jsxRuntime.jsxs(c,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(z,{disabled:B(y)<=1,onClick:x=>W({id:p?g(B(y)-1):B(y)-1,label:B(y)-1}),children:L.chevronLeftOutline}),jsxRuntime.jsx(z,{disabled:A.length<=1||B(y)==B(A[A.length-1]),onClick:x=>W({id:p?g(B(y)+1):B(y)+1,label:B(y)+1}),children:L.chevronRightOutline})]})]})};Rn.displayName="Zuz.Pagination";var xt=Rn;function tc(e,n){let{items:t,renderItem:o,effect:r="slide",loop:s=true,loopMode:a="infinite",startIndex:u=0,useKeys:f=true,useWheel:m=true,spacing:p=160,rotation:i=20,scaleStep:l=.15,blur:d=4,animation:C="power",showDots:w=false,autoPlay:S=false,autoPlaySpeed:I=3,onChange:P,...T}=e,{className:g,style:b}=N(T),h=react.useRef(null),y=I/(I>=1e3?1e3:1),R=hooks.useCarousel({total:t.length,initialIndex:u,loop:s,useKeys:f,useWheel:m,onChange:D=>{h.current?.setPage({id:D+1,label:D+1}),h.current?.setProgress(0),P?.(D);}}),{pause:O,resume:k,reset:$}=hooks.useTimer({duration:y,autoStart:S===true,onProgress:D=>{S===true&&h.current?.setProgress(1-D);},onExpired:()=>{S===true&&R.next(),$();}}),B={...b,"--carousel-spacing":`${p}px`,"--carousel-rotation":`${i}deg`,"--carousel-blur":`${d}px`,"--carousel-scale-step":l,"--active-index":R.index,"--carousel-transition":`var(--${C})`};return jsxRuntime.jsxs(c,{ref:n,className:`--carousel --effect-${r} --loop-${a} flex cols aic jcc ${g}`.trim(),style:B,children:[jsxRuntime.jsx(c,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((D,A)=>{let W=A-R.index;if(a==="infinite"){let E=t.length;W=((W+E/2)%E+E)%E-E/2;}let x=A===R.index;return jsxRuntime.jsx(c,{onMouseEnter:()=>x&&O(),onMouseLeave:()=>x&&k(),className:`--carousel-item-wrapper abs ${x?"--is-active":""}`,style:{"--offset":W,zIndex:x?100:100-Math.abs(W),display:Math.abs(W)>5?"none":"flex"},children:o(D,A,R.index)},A)})}),w&&jsxRuntime.jsx(xt,{ref:h,itemCount:t.length,itemsPerPage:1,startPage:u+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:D=>R.goTo(+D.label-1),asDots:true,progressBar:true})]})}var oc=react.forwardRef(tc),rc=oc;var Nn=(n=>(n.Line="line",n))(Nn||{});var Ln=react.forwardRef((e,n)=>{let{data:t,width:o,height:r,lineColor:s,strokeWidth:a=2,gradientStartColor:u,gradientEndColor:f,animated:m,animDuration:p=2,animDelay:i=0,padding:l=0,type:d,...C}=e,{className:w,style:S,rest:I}=N(C),P=react.useRef(null),T=hooks.useResizeObserver(P.current?.parentElement||P),g=typeof o=="number"?o:T.width,b=typeof r=="number"?r:T.height,h={width:g,height:b},y=react.useId(),{pathD:R,areaPathD:O}=hooks.useLineChart(t,h,l+(a||2)),k=react.useRef(null),$=react.useRef(null),[B,D]=react.useState(0),[A,W]=react.useState(0);return react.useEffect(()=>{m&&(k.current&&D(k.current.getTotalLength()),$.current&&W($.current.getTotalLength()));},[m,R,O,g,b]),jsxRuntime.jsx(c,{ref:P,as:`--chart --${d||"line"}-chart ${w}`.trim(),style:{...S,width:o,height:r},...I,children:g>0&&b>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${g} ${b}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:y,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:u}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:f})]})}),jsxRuntime.jsx("path",{ref:$,d:O,fill:`url(#${y})`,stroke:"none",style:m?{strokeDasharray:A,strokeDashoffset:A}:{},children:m&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:A,to:"0",dur:`${p||2}s`,begin:`${i||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:k,d:R,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:m?{strokeDasharray:B,strokeDashoffset:B}:{},children:m&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:B,to:"0",dur:`${p||2}s`,begin:`${i||0}s`,fill:"freeze"})})]})})});Ln.displayName="Zuz.Chart";var mc=Ln;var kn=(r=>(r[r.Sending=0]="Sending",r[r.Sent=1]="Sent",r[r.Delivered=2]="Delivered",r[r.Read=3]="Read",r))(kn||{}),Mn=(m=>(m.Image="img",m.Video="vid",m.Audio="audio",m.Link="link",m.Document="doc",m.Location="loc",m.Contact="contact",m.Event="event",m.Poll="poll",m))(Mn||{});var On=react.forwardRef((e,n)=>{let{text:t,media:o,side:r="me",status:s=1,timeStamp:a=Date.now(),arrow:u=true,...f}=e,{className:m,style:p,rest:i}=N(f);return jsxRuntime.jsx(c,{className:`--bubble-wrapper flex --bw-${r}`.trim(),children:jsxRuntime.jsxs(c,{className:`--bubble --bubble-${r} ${o?`--with-media --bma-${o.type}`:""} rel flex cols ${u==true?"--b-arrow":""} ${m}`.trim(),style:{...p},...i,children:[t&&jsxRuntime.jsx(V,{className:"--bubble-text",children:t}),o?o.type=="audio"?jsxRuntime.jsxs(c,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(ne,{className:"--bm-action",children:L.play}),jsxRuntime.jsx(Ze,{progress:.7}),jsxRuntime.jsx(V,{className:"--bm-dur",children:o.duration??"00:13"})]}):o.type=="img"?jsxRuntime.jsx(c,{as:"--bubble-image",children:jsxRuntime.jsx(Ge,{src:o.source})}):null:null,jsxRuntime.jsxs(c,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(V,{className:"--bubble-stamp tar",children:core.timeSince(a)}),r=="me"&&jsxRuntime.jsx(ne,{className:`--bubble-status --bs-${s}`,children:s==0?L.pending:s==1?L.done:s==2?L.doneAll:L.doneAll})]})]})})});On.displayName="Zuz.Bubble";var fc=On;var Dn=react.forwardRef((e,n)=>{let{style:t,className:o,rest:r}=N(e);return jsxRuntime.jsx("label",{ref:n,style:t,className:o,...r})});Dn.displayName="Zuz.Label";var bt=Dn;var Hn=react.forwardRef((e,n)=>{let{name:t,required:o,type:r,value:s,size:a,variant:u,checked:f,onSwitch:m,...p}=e,[i,l]=react.useState(f||false),d=react.useRef(null),{variant:C}=Y(true);return react.useImperativeHandle(n,()=>({setChecked(w,S=true){l(w),d.current&&(d.current.checked=w),S&&m&&m(w,s||"cb");},toggle(w=true){d.current&&(d.current.checked=!i),w&&m&&m&&m(!i,s||"cb"),l(!i);}})),jsxRuntime.jsxs(bt,{className:`--${(r||Ee.Default).toLowerCase()} ${!r||r==Ee.Default?"--checkbox":"--switch"} --${u||C||U.Small} flex aic jcc ${i?"is-checked":""} rel`.trim(),...p,children:[(!r||r==Ee.Default)&&L.check,jsxRuntime.jsx(ae,{ref:d,defaultChecked:i,value:s||"cb",type:"checkbox",className:"abs",name:t,required:o||false,onChange:w=>{m&&m(w.target.checked,s||"cb"),l(w.target.checked);}})]})});Hn.displayName="Zuz.CheckBox";var vt=Hn;var Cc=({ref:e,...n})=>{let{code:t,lang:o="tsx",showLines:r=false,highlight:s="",as:a,fx:u,...f}=n,m=react.useRef(null),{className:p,style:i,rest:l}=N({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${a}`,fx:u},m),d=react.useMemo(()=>{let w=new Set;return s.split(",").forEach(S=>{if(S.includes("-")){let[I,P]=S.split("-").map(Number);for(let T=I;T<=P;T++)w.add(T);}else S&&w.add(Number(S));}),w},[s]),C=react.useMemo(()=>{let w=t.split(`
|
|
10
|
-
`);for(;
|
|
11
|
-
${
|
|
12
|
-
<span class="--line-content">${
|
|
13
|
-
</div>`}).join("")},[t,d]);return jsxRuntime.jsx(c,{as:`--code-block ${p}`,style:i,...f,children:jsxRuntime.jsx("pre",{ref:e,children:jsxRuntime.jsx("code",{className:`--code --lang-${o}`,dangerouslySetInnerHTML:{__html:C}})})})},Tc=Cc;var Vn=({onSelect:e,meta:n,selected:t,disabled:o=false})=>{let r=react.useRef(null),{index:s,icon:a,label:u}=n,[f,m]=react.useState({x:0,width:0}),p=hooks.useDelayed();return react.useLayoutEffect(()=>{if(p&&r.current){let{width:i,x:l}=r.current.getBoundingClientRect();m({x:l,width:i}),t&&e(s,i,l,n,true);}},[p,r.current]),react.useEffect(()=>{t&&e(s,f.width,f.x,n,false);},[t]),jsxRuntime.jsxs(z,{disabled:o,onClick:()=>e(s,f.width,f.x,n,false),ref:r,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsxRuntime.jsx(J,{name:a,as:"--segment-icon"}):jsxRuntime.jsx(c,{as:"--segment-icon flex aic jcc",children:a}):null,u&&String(u).trim()!=""&&jsxRuntime.jsx(c,{className:"--segment-label",children:u||`Item ${s}`})]})};Vn.displayName="SelectTabItem";var $n=Vn;var _n=react.forwardRef((e,n)=>{let{fx:t,items:o,selected:r,variant:s,disabled:a=false,onSwitch:u,...f}=e,[m,p]=react.useState(r||0),i=hooks.useDelayed(50),l=react.useRef(m),{className:d,style:C,rest:w}=N(f),S=react.useRef(null),I=react.useRef(null),{variant:P}=Y(true),T=(g,b,h,y,R)=>{if((R||m!=g&&m!=-2)&&(p(g),l.current=m,queueMicrotask(()=>{i&&u?.(y);})),S.current){let O=I.current?.getBoundingClientRect();S.current.style.setProperty("--w",`${b}px`),S.current.style.setProperty("--x",`${O?h-O.left:h}px`);}};return react.useImperativeHandle(n,()=>({setSelected:g=>{typeof g=="number"&&g!=m&&p(g);}}),[m]),jsxRuntime.jsxs(c,{ref:I,"data-selected":m,className:`${d} --segmented --${s||P||U.Medium} flex aic rel`,style:C,...w,children:[jsxRuntime.jsx(c,{ref:S,className:`--segment-tab --${a?"disabled":"abled"} abs`}),o.map((g,b)=>jsxRuntime.jsx($n,{disabled:a,onSelect:T,selected:m==b,meta:{...g,index:b}},`segment-${g.label}-${b}`))]})});_n.displayName="Zuz.SelectTabs";var wt=_n;var Kn=react.forwardRef((e,n)=>{let{type:t,...o}=e,r=hooks.useDelayed(),{colorScheme:s,setColorScheme:a}=po(),u=react.useCallback(()=>{a(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:f,style:m}=N(o),p=react.useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:L.colorSchemeLight},{tag:"system",index:1,label:"",icon:L.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:L.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:L.colorSchemeLight},{tag:"dark",index:2,label:"",icon:L.colorSchemeDark}],[]),i=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !r||i==-1?null:t=="system"||t=="switch"?jsxRuntime.jsx(wt,{className:`--color-scheme --${t}`,onSwitch:({tag:l})=>{a(l);},selected:i,items:p,...o}):jsxRuntime.jsx(z,{onClick:u,style:m,as:`--color-scheme-switch --${o.variant||U.Small} ${f}`.trim(),children:s=="system"?L.colorSchemeSystem:s=="light"?L.colorSchemeLight:L.colorSchemeDark})});Kn.displayName="Zuz.ColorScheme";var $c=Kn;var Gn=react.forwardRef((e,n)=>{let[t,o]=react.useState("wait"),{title:r,message:s,acceptLabel:a,rejectLabel:u,position:f}=e,m=async p=>{o(p==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(p));};return react.useEffect(()=>{let p=localStorage.getItem("--ccnt");o(p?p=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(c,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:X.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${f||me.Left} flex cols`,children:[jsxRuntime.jsx(V,{as:"--title",children:r||"This site uses cookies"}),jsxRuntime.jsx(V,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(c,{as:"--footer flex aic",children:[jsxRuntime.jsx(z,{onClick:p=>m(1),as:"--accept",children:a||"Accept All"}),jsxRuntime.jsx(z,{onClick:p=>m(0),as:"--reject",children:u||"Cancel"})]})]})});Gn.displayName="Zuz.CookiesConsent";var Zc=Gn;var Xn=({ref:e,...n})=>{let {title:t,position:o,margin:r=4,anchorName:s="--tooltip-anchor",children:a,show:u,variant:f,...m}=n,{style:p,className:i,rest:l}=N(m),d=o||me.Top;react.useRef(null);let [w,S]=react.useState(false);react.useRef(6);let P=u===true||w,g=`--anchor-${react.useId().replace(/:/g,"")}`,{tooltip:b}=Y(true),h=react.useMemo(()=>{let R=false;return react$1.addPropsToChildren(a,O=>{let k=O.props.className?.includes(s);return k&&(R=true),k||!R},(O,k)=>{let $=k.props.className?.includes(s),B=O===0,D={};return ($||B)&&(D.style={...k.props.style,anchorName:g}),B&&(D.onMouseEnter=A=>{S(true),k.props.onMouseEnter?.(A);},D.onMouseLeave=A=>{S(false),k.props.onMouseLeave?.(A);}),D})},[a,s,g]),y=pe({transition:d==me.Top?q.SlideInTop:d==me.Bottom?q.SlideInBottom:d==me.Left?q.SlideInLeft:q.SlideInRight,when:P,duration:.2,offset:r+6,margin:d==me.Top||d==me.Left?-r:r,curve:b?.curve||X.EaseInOut});return react.useImperativeHandle(e,()=>({show:()=>S(true),hide:()=>S(false),setPosition:()=>{}})),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[h,jsxRuntime.jsx(c,{style:{positionAnchor:g,...y.style,...d===me.Top||d===me.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${P} --${f||b?.variant||U.Small} --${d} abs ${i}`.trim(),children:typeof t=="string"?jsxRuntime.jsx(V,{as:"--text rel",children:t}):t})]})};Xn.displayName="Zuz.ToolTip";var _o=Xn;var Yn=({ref:e,...n})=>{let {type:t,value:o=0,min:r=0,max:s=1,step:a=.01,onChange:u,showGhostBar:f,showKnobOnHover:m,showToolTip:p,roundValue:i,formatValue:l,...d}=n,{className:C,style:w,rest:S}=N(d),I=react.useRef(a||.01).current,P=react.useRef(r||0).current,T=react.useRef(s||1).current,g=react.useRef(o||0).current,b=react.useRef(null),h=react.useRef(null),y=react.useRef(null),R=react.useRef(null);react.useRef(null);let k=react.useRef(null),$=react.useRef(null),B=react.useRef(null),D=react.useRef(null),A=(re,se,be)=>(re-se)/(be-se)*100,W=re=>{if(h.current){let se=parseFloat(re.currentTarget.value);Q(se);let be=A(se,parseFloat(re.currentTarget.min),parseFloat(re.currentTarget.max));h.current.style.setProperty("--value",`${be}`),h.current.setAttribute("data-value",`${se}`),u&&u(i?+se.toFixed(2):se);}},[x,E]=react.useState(false),[F,G]=react.useState(0),[_,Z]=react.useState(0),[ee,j]=react.useState(false),Q=async re=>{let se=l?l(+re):i?(+re).toFixed(2):Math.round(+re);B.current&&(B.current.textContent=String(se));},K=re=>{if(x){let se=re.clientX-F,be=T-P,Pe=se/200*be,de=Math.max(P,Math.min(_+Pe,T));if(de=Math.round(de/I)*I,Q(de),h.current){let lt=A(de,P,T);h.current.style.setProperty("--value",`${lt}`),h.current.setAttribute("data-value",`${de}`),$.current&&($.current.textContent=i?de.toFixed(2):de.toString()),u&&u(de);}}},oe=()=>{E(false),document.body.style.cursor="auto";},ie=re=>(re-P)/(T-P)*100,fe=re=>{if(!h.current)return;let se=h.current.getBoundingClientRect(),be=re.clientX-se.left,it=Math.max(0,Math.min(100,be/se.width*100));if(p&&B.current){let Pe=b.current?+b.current.value:o;Q(Pe*100);}if(f){let Pe=ie(b.current?+b.current.value:o),de=Math.min(Pe,it),lt=Math.abs(it-Pe);h.current.style.setProperty("--ghost-start",`${de}`),h.current.style.setProperty("--ghost-width",`${lt}`);}};react.useEffect(()=>{h.current&&h.current.style.setProperty("--value",b.current?`${A(parseFloat(b.current.value),parseFloat(b.current.min),parseFloat(b.current.max))}`:g.toString());},[]),react.useEffect(()=>(x?(document.addEventListener("mousemove",K),document.addEventListener("mouseup",oe)):(document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",oe)),()=>{document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",oe);}),[x]),react.useEffect(()=>{let re=A(o,P,T);h.current?.style.setProperty("--value",`${re}`),Q(o);},[o,P,T,B.current]);let te=()=>jsxRuntime.jsxs(c,{ref:h,onMouseEnter:()=>j(true),onMouseLeave:()=>j(false),onMouseMove:fe,className:`--slider --${t||no.Default} ${m?"--knob-hover":""} flex rel ${C}`.trim(),style:{...w},children:[jsxRuntime.jsx(c,{ref:k,className:"--slider-track abs fill"}),f&&jsxRuntime.jsx(c,{ref:R,className:"--slider-ghost abs fill"}),jsxRuntime.jsx(c,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsxRuntime.jsx(c,{ref:y,className:"--slider-knob --tooltip-knob abs"}),jsxRuntime.jsx(ae,{ref:b,onInput:W,className:"abs fill",tabIndex:0,type:t||no.Default,defaultValue:g||0,step:I,max:T,min:P})]});if(p===true){let re=l?l(o):i?o.toFixed(2):o;return jsxRuntime.jsx(_o,{ref:D,show:x,position:ct.Top,margin:15,anchorName:"--tooltip-knob",title:jsxRuntime.jsx(ne,{ref:B,children:re}),children:te()})}return te()};Yn.displayName="Zuz.Slider";var je=Yn;var jn=react.forwardRef((e,n)=>{let{src:t,shape:o,size:r,...s}=e,{style:a,className:u,rest:f}=N(s),{canvasRef:m,crop:p,setScale:i,handleMouseDown:l,handleMouseUp:d,handleMouseMove:C}=hooks.useImageCropper(t,r||200,o||hooks.CropShape.Circle);return react.useImperativeHandle(n,()=>({getCropped(){return p()},setScale(w){i(w);}})),jsxRuntime.jsxs(c,{as:`--cropper --${o||hooks.CropShape.Circle} ${u}`,style:a,...f,children:[jsxRuntime.jsx("canvas",{ref:m,width:r||200,height:r||200,onMouseDown:l,onMouseUp:d,onMouseLeave:d,onMouseMove:C}),jsxRuntime.jsx(c,{as:"--cropper-slider",children:jsxRuntime.jsx(je,{onChange:w=>i(w),min:0,max:1,step:.01,value:1})})]})});jn.displayName="Zuz.Cropper";var tm=jn;var rm=(t=>(t.Circle="circle",t.Square="square",t))(rm||{});var es=react.forwardRef((e,n)=>{let{items:t,maxItems:o}=e,r=react.useMemo(()=>{let u=typeof t=="string",f=u?[]:t;return u&&t.split(",").forEach(m=>{f.push({label:m});}),f},[t]),a=react.useMemo(()=>o&&o>0&&r.length>o-1,[r,o])?[...r.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...r.slice(-o)]:r;return jsxRuntime.jsx(We,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(c,{as:"--crumb-chevron",children:L.chevronRightOutline}),items:a.map((u,f,m)=>u.ID=="."?jsxRuntime.jsx(c,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(c,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${f}`))}):jsxRuntime.jsxs(z,{onClick:()=>u.action?.(),className:"--crumb-item",disabled:!m[f+1],children:[u.icon&&jsxRuntime.jsx(J,{as:"--crumb-icon",name:u.icon}),jsxRuntime.jsx(V,{as:"--crumb-label",children:u.label})]},`${u.label.replace(/\s+/g,"-").toLowerCase()}-${f}`))})});es.displayName="Zuz.Crumb";var sm=es;var rs=react.forwardRef((e,n)=>{let{icon:t,defaultValue:o,value:r,size:s,variant:a,numeric:u,type:f,onConfirm:m,...p}=e,[i,l]=react.useState(false),[d,C]=react.useState(o||null),{style:w,className:S,rest:I}=N(p),P=react.useRef(null),T=react.useRef(null),{reposition:g}=gt(T,{direction:me.Bottom,offset:2}),b=y=>{u&&(y.currentTarget.value=y.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let y=R=>{let O=R.target,k=P.current?.contains(O),$=T.current?.contains(O);!k&&!$&&l(false);};return i&&document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y);}},[i]),react.useEffect(()=>{let y=R=>{R.key==="Escape"&&i&&(l(false),P.current?.focus());};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[i]);let h=()=>{l(true);};return react.useEffect(()=>{i&&g();},[i,g]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(c,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${S}`,"data-value":d?d.toISOString():"",children:[t?typeof t=="string"?jsxRuntime.jsx(J,{as:"mr:10 c:#666",name:t}):t:jsxRuntime.jsx(ne,{as:"--date-picker-icon flex aic jcc",children:L.calendar}),jsxRuntime.jsx("input",{ref:P,value:d?dateFns.format(d,"EEE, MMM d YYY hh:mm a"):r||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:w,onFocus:h,onInput:b,autoComplete:"new-password",onKeyDown:y=>{y.key=="Enter"&&m?.(y.currentTarget.value);},...I}),jsxRuntime.jsx(c,{"aria-hidden":!i,ref:T,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:i,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsxRuntime.jsx(Mo,{defaultValue:d,onChange:y=>{C(y),l(false);}})})]})})});rs.displayName="Zuz.DatePicker";var cm=rs;var ns=react.forwardRef((e,n)=>{let{icon:t,variant:o,position:r}=e;return jsxRuntime.jsx(z,{className:`--fab fixed --${o||U.Large} --${r||"bottomright"}`,children:t||L.plus})});ns.displayName="Zuz.Fab";var fm=ns;var ss=e=>{let{names:n,strength:t}=e,o={[Nt.Gooey]:r=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:r||10,result:"blur"}),jsxRuntime.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsxRuntime.jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${Nt.Gooey}`)};return react.useEffect(()=>{},[n]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(n||[Nt.Gooey]).map(r=>o[r](t))})})};ss.displayName="Zuz.Filters";var hm=ss;var as=({cols:e,gap:n,aic:t,jcc:o,className:r="",style:s,...a})=>{let u=["--flex",e?"--cols":"",t?"--aic":"",o?"--jcc":"",r].filter(Boolean).join(" "),f={...s,gap:typeof n=="number"?`${n}px`:n};return jsxRuntime.jsx(c,{...a,className:u,style:f})};as.displayName="Zuz.FlexBox";var He=as;var Ae=null,xe=null,ls=react.forwardRef((e,n)=>{let{title:t,message:o,transition:r,curve:s,speed:a,type:u,actionPosition:f,spinner:m,loadingMessage:p,onShow:i,onHide:l,...d}=e,{className:C,style:w,rest:S}=N(d),[I,P]=react.useState(t||""),[T,g]=react.useState(o||""),[b,h]=react.useState(null),[y,R]=react.useState(u||Se.Default),O=react.useMemo(()=>core.uuid(12),[]),[k,$]=react.useState(false),B=react.useRef(null),D=react.useRef(null),[A,W]=react.useState(false),[x,E]=react.useState(true),F=react.useRef(null),G=T;react.useImperativeHandle(n,()=>({setLoading(Z){W(Z);},showDialog(Z,ee,j,Q){Ae&&(clearTimeout(Ae),xe&&clearTimeout(xe),B.current.classList.remove("--wobble"),setTimeout(()=>B.current.classList.add("--wobble"),50),xe=setTimeout(()=>{B.current.classList.remove("--wobble"),xe=null;},500)),R(Se.Dialog),ee&&g(ee),Z&&P(Z),j&&h(j.reduce((H,K)=>(H.push({...K,key:K.key||core.uuid(12)}),H),[])),$(true),setTimeout(()=>Q?Q():()=>{},1e3);},dialog(Z,ee,j,Q){Ae&&(clearTimeout(Ae),xe&&clearTimeout(xe),B.current.classList.remove("--wobble"),setTimeout(()=>B.current.classList.add("--wobble"),50),xe=setTimeout(()=>{B.current.classList.remove("--wobble"),xe=null;},500)),R(Se.Dialog),g(ee),P(Z),j&&h(j.reduce((H,K)=>(H.push({...K,key:K.key||core.uuid(12)}),H),[])),$(true),setTimeout(()=>Q?Q():()=>{},1e3);},error(Z,ee){this.show(Z,ee,Se.Error);},warn(Z,ee){this.show(Z,ee,Se.Warn);},success(Z,ee){this.show(Z,ee,Se.Success);},show(Z,ee,j){Ae&&(clearTimeout(Ae),xe&&clearTimeout(xe),D.current=B.current.style.transform,B.current.style.transform="",B.current.classList.remove("--wobble"),setTimeout(()=>{B.current.classList.add("--wobble"),B.current.style.transform=`${D.current} scale(.9)`.trim();},50),xe=setTimeout(()=>{B.current.classList.remove("--wobble"),B.current.style.transform=D.current||"",xe=null;},500)),Ae=setTimeout(()=>{$(false),Ae=null,xe=null;},(ee||4)*1e3),R(j||Se.Default),g(Z),$(true),i?.();},hide(){$(false),l?.();}}));let _=react.useMemo(()=>{let Z={when:k,duration:a||.3,delay:.1};if(y==Se.Dialog){if(r){let{from:ee,to:j}=pt(r,20);return {from:ee,to:j,curve:s||X.EaseInOut,...Z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:X.Spring,...Z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:X.Spring,...Z}},[k,y]);return react.useEffect(()=>{F.current&&clearTimeout(F.current),k?E(true):F.current=setTimeout(()=>E(false),1e3);},[k]),y==Se.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(_e,{when:k}),jsxRuntime.jsxs(c,{className:`--sheet --sheet-${y.toLowerCase()} ${k?"is-visible":""} ${C} fixed`.trim(),style:w,fx:_,...S,ref:B,children:[jsxRuntime.jsx(Ie,{when:A,spinner:m,message:p}),jsxRuntime.jsxs(c,{className:"--head flex aic rel",children:[jsxRuntime.jsx(c,{className:`--${I?"title":"dot"} flex aic rel`,children:I||""}),jsxRuntime.jsx(z,{onClick:Z=>$(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(c,{className:`--body flex aic rel ${b?"":"--no-action"}`.trim(),children:x?G:null}),b&&jsxRuntime.jsx(c,{className:`--footer flex aic rel ${f?f==ro.Center?"jcc":"":"jce"}`.trim(),children:b.map((Z,ee)=>jsxRuntime.jsx(z,{onClick:j=>Z.handler?Z.handler():Z.onClick?Z.onClick():console.log("onClick Handler missing"),className:"--action",children:Z.label},`sheet-${O}-action-${Z.key}`))})]})]}):jsxRuntime.jsx(c,{className:`--sheet --sheet-${y.toLowerCase()} ${C} abs`.trim(),style:w,...S,fx:_,ref:B,children:k?T:null})}),Ct=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;ls.displayName="Zuz.Sheet";var Sm=ls;var cs=({ref:e,...n})=>{let{name:t,cover:o,spinner:r,errors:s,action:a,children:u,withData:f,beforeSubmit:m,onSubmit:p,onError:i,onSuccess:l,resetOnSuccess:d,...C}=n,{className:w,style:S,rest:I}=N(C),[P,T]=react.useState(false),g=react.useRef(null),b=react.useRef(null),h=react.useRef(null),y=Io(),R=react.useCallback(x=>g.current?g.current.querySelectorAll(x):[],[g.current]),O=x=>({name:x.name||x.getAttribute("name")||x.getAttribute("data-name"),required:x.required?true:x.getAttribute("data-required")?x.getAttribute("data-required")=="true":false,with:x.with||x.getAttribute("with")}),k=x=>{let E=[];return x.querySelectorAll(".--input").forEach(F=>{E.push(F.value);}),E.join("")},$=react.useCallback(x=>{let{required:F}=O(x);if(F){if(x.type=="checkbox"&&x.checked==false)return false;if(x.classList.contains("--otp")){let _=k(x);if(_==""||_.length<parseInt(x.getAttribute("data-size")))return false}if(x.classList.contains("--select")&&x.querySelector("button.--selected").dataset.value=="-1"||x.value=="")return false}if(x.getAttribute("with")){let _=x.getAttribute("with");switch(_.includes("@")&&(_=_.split("@")[0],_=="match"&&(_=Le.MatchField)),_.toUpperCase()){case Le.IPV4:return core._(x.value).isIPv4();case Le.IPV6:return core._(x.value).isIPv6();case Le.Email:return core._(x.value).isEmail();case Le.Uri:try{return new URL(x.value),!0}catch{return false}case Le.Password:return console.log("Add FORMVALIDATION.Password"),false;case Le.MatchField:let[Z,ee,j]=x.getAttribute("with").split("@"),Q=document.querySelector(`[name=${ee.trim()}]`);if(!Q)return false;switch(j||"direct-match"){case "if-not-empty":if(Q&&!core._(Q.value).isEmpty()&&Q.value!=x.value)return false;break;case "direct-match":if(Q&&Q.classList.contains("--otp")&&x.classList.contains("--otp")&&k(Q)!=k(x))return false;if(Q&&Q.value!=x.value)return false;break}break;default:return true}}return true},[g.current]),B=react.useCallback(()=>{let x={},E={},F=null,G=null;if(Array.from(R("[name]")).forEach(_=>{let{name:Z,required:ee,with:j}=O(_),Q=true;(ee||j)&&(Q=$(_)),x[Z]={valid:Q,value:_.type=="checkbox"?_.checked==true?_.value:false:_.classList.contains("--otp")?k(_):_.classList.contains("--select")?_.querySelector("button.--selected").dataset.value:_.value},E[Z]=_.type=="checkbox"?_.checked==true:_.classList.contains("--otp")?k(_):_.classList.contains("--select")?_.querySelector("button.--selected").dataset.value:_.value,Q?_.classList.remove("input-with-error"):(F==null&&s&&(F=_,G=s[Z]),_.classList.add("input-with-error"));}),F){let _=F;if(_.classList.contains("--otp"))for(let Z of Array.from(_.querySelectorAll(".--input"))){let ee=Z;if(ee.value==""){ee.focus();break}}else _.focus();}return {error:F!=null,errorMsg:G||"Fix errors to continue...",data:x,payload:E}},[g.current]),D=react.useCallback(()=>{let{error:x,errorMsg:E,payload:F}=B();x?y.error(E):a?react.startTransition(async()=>{m&&m(F),Ct(o)?o.setLoading(true):T(true),y.clearAll(),core.withPost(a,{...F,...f||{}}).then(G=>{let _=G;Ct(o)?o.setLoading(false):T(false),d&&Array.from(R("[name]")).forEach(Z=>{Z instanceof HTMLInputElement&&(Z.value="");}),l?l(_):(y.clearAll(),y.success(_.message||"Redirecting..."));}).catch(G=>{Ct(o)?o.setLoading(false):T(false),i?i(G):y.error(G.message||"We cannot process your request at this time.");});}):p&&p(F);},[a,b.current,g.current]),A=react.useCallback(()=>{let x=R("[type=submit]");!x||x.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):x.forEach(E=>{E.addEventListener("click",D);});},[g.current]),W=react.useMemo(()=>react$1.addPropsToChildren(u,x=>x.props.type=="submit",x=>({ref:h})),[u]);return react.useImperativeHandle(e,()=>({setLoading(x){if(x){b.current?.hide();try{y.clearAll();}catch{}}T(x);},showError(x){typeof x=="string"?y.error(x):b.current.error(x,4);},hideError(){b.current.hide();try{y.clearAll();}catch{}},init(){A();},submit(){D();}})),react.useEffect(A,[]),jsxRuntime.jsxs(c,{ref:g,style:S,className:`--form flex rel ${w} ${t?`--form-${t.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!Ct(o)&&jsxRuntime.jsx(Ie,{message:o?o.message||void 0:"working",spinner:r,color:o&&"color"in o?o.color:"#ffffff",when:P}),W]})};cs.displayName="Zuz.Form";var Lm=cs;var ms=e=>{let {ref:n,cols:t,rows:o,gap:r,gapX:s,gapY:a,align:u,justify:f,inline:m,flow:p,autoCols:i,autoRows:l,template:d,...C}=e;react.useRef(null);let {className:S,style:I,rest:P}=N(C),T=b=>typeof b=="number"?`repeat(${b}, 1fr)`:b,g={display:m?"inline-grid":"grid",gridTemplateColumns:T(t),gridTemplateRows:T(o),gap:r,columnGap:s,rowGap:a,alignItems:u,justifyContent:f==="between"?"space-between":f==="around"?"space-around":f,gridAutoFlow:p,gridAutoColumns:i,gridAutoRows:l,gridTemplateAreas:d,...I};return jsxRuntime.jsx(c,{ref:n,as:`--grid ${S}`.trim(),style:g,...P})};ms.displayName="Zuz.Grid";var Dm=ms;var ps=e=>typeof e=="string"&&e.includes("+"),us={command:"\u2318",shift:"\u21E7",ctrl:"\u2303",option:"\u2325",enter:"\u21B5",delete:"\u232B",escape:"\u238B",tab:"\u21E5",capslock:"\u21EA",up:"\u2191",right:"\u2192",down:"\u2193",left:"\u2190",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2196",end:"\u2198",help:"?",space:"\u2423",fn:"Fn",win:"\u2318",alt:"\u2325"},fs={command:"Command",shift:"Shift",ctrl:"Control",option:"Option",enter:"Enter",delete:"Delete",escape:"Escape",tab:"Tab",capslock:"Caps Lock",up:"Up",right:"Right",down:"Down",left:"Left",pageup:"Page Up",pagedown:"Page Down",home:"Home",end:"End",help:"Help",space:"Space",fn:"Fn",win:"Win",alt:"Alt"};var gs=react.forwardRef(({children:e,keys:n,as:t,className:o,variant:r},s)=>{let{variant:a}=Y(true),u=react.useMemo(()=>{if(ps(n)){let f=null;return {keys:String(n).split("+").reduce((p,i,l,d)=>(d[l+1]?p.push(i):f=i.toUpperCase(),p),[]),children:f}}return {keys:n,children:String(e).toUpperCase()}},[n]);return jsxRuntime.jsxs(c,{as:`--keyboard-keys --${r||a||U.Small} flex aic ${t} ${o}`.trim(),children:[(Array.isArray(u.keys)?u.keys:[u.keys]).map(f=>jsxRuntime.jsx("abbr",{title:fs[f],children:us[f]},f)),jsxRuntime.jsx(ne,{children:u?.children??e})]})});gs.displayName="Zuz.KeyboardKeys";var Xo=gs;var xs=react.createContext(null),tt=()=>{let e=react.useContext(xs);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},Zm=({ref:e,icons:n,children:t,...o})=>{let{playlist:r=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:u="No Track",defaultCover:f,onTrackChange:m,...p}=o,{className:i,style:l,rest:d}=N(p),C=hooks.useMediaPlayer(r,r[0]??void 0),w=react.useMemo(()=>({play:L.play,pause:L.pause,prev:L.prev,next:L.next,volumeHigh:L.volumeHigh,volumeMute:L.volumeMute,...n}),[n]),S=react.useMemo(()=>({...C,mode:s,icons:w}),[C,w]);return jsxRuntime.jsx(xs.Provider,{value:S,children:jsxRuntime.jsx(c,{className:`--zuz-media-player ${i}`,style:l,children:t})})},bs=Zm;var vs=e=>{if(!e||isNaN(e))return "0:00";let n=Math.floor(e/60),t=Math.floor(e%60);return `${n}:${t.toString().padStart(2,"0")}`},qt=e=>typeof e=="string"?jsxRuntime.jsx(J,{name:e}):e,ws=()=>{let{mediaRef:e,state:n,controls:t,mode:o}=tt();return jsxRuntime.jsxs(c,{as:`--mediaplayer-stage rel --mode-${o}`,children:[o==="video"?jsxRuntime.jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsxRuntime.jsx("audio",{ref:e}),n.isLoading&&jsxRuntime.jsx(c,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsxRuntime.jsx(Ce,{})})]})},Ss=()=>{let{state:e,defaultArtist:n,defaultTitle:t,defaultCover:o}=tt();return jsxRuntime.jsxs(c,{as:"--track-info flex aic",children:[jsxRuntime.jsx(Ge,{src:e.currentItem?.cover||o||"",as:"--track-cover"}),jsxRuntime.jsxs(c,{as:"flex cols",children:[jsxRuntime.jsx(c,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsxRuntime.jsx(c,{as:"--track-artist",children:e.currentItem?.artist||n||"..."})]})]})},Cs=()=>{let{state:e,controls:n,icons:t}=tt();return jsxRuntime.jsxs(c,{as:"--mediaplayer-controls flex aic",children:[jsxRuntime.jsx(z,{onClick:n.prev,as:"--prev",children:qt(t?.prev??L.prev)}),jsxRuntime.jsx(z,{onClick:n.togglePlay,as:"--play-pause",children:qt(e.isPlaying?t?.pause??L.pause:t?.play??L.play)}),jsxRuntime.jsx(z,{onClick:n.next,as:"--next",children:qt(t?.next??L.next)})]})},Ts=()=>{let{state:e,controls:n,mediaRef:t}=tt(),o=e.progress*(e.duration||0);return jsxRuntime.jsxs(c,{as:"--track-progress flex aic",children:[jsxRuntime.jsx(c,{as:"--track-current-duration",children:vs(o)}),jsxRuntime.jsx(je,{value:e.progress,onClick:r=>{let s=r.currentTarget.getBoundingClientRect(),a=(r.clientX-s.left)/s.width;n.seek(a);}}),jsxRuntime.jsx(c,{as:"--track-total-duration",children:vs(e.duration)})]})},Ps=()=>{let{state:e,controls:n,icons:t}=tt();return jsxRuntime.jsxs(c,{as:"--volume-control flex aic gap:8 w:120",children:[jsxRuntime.jsx(z,{onClick:()=>n.setIsMuted(),children:qt(e.isMuted?t?.volumeMute??L.volumeMute:t?.volumeHigh??L.volumeHigh)}),jsxRuntime.jsx(je,{value:e.volume,className:"h:3 flex:1",onClick:o=>{let r=o.currentTarget.getBoundingClientRect();n.setVolume((o.clientX-r.left)/r.width);}})]})};var Km=({ref:e,...n})=>jsxRuntime.jsx(bs,{...n,ref:e}),Wm=Object.assign(Km,{Stage:ws,TrackInfo:Ss,Controls:Cs,Progress:Ts,Volume:Ps}),Gm=Wm;var Rs=react.forwardRef((e,n)=>{let t=hooks.useNetworkStatus(),{onlineMessage:o,offlineMessage:r,variant:s}=e;return jsxRuntime.jsxs(c,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:t==false,curve:X.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||U.Small} fixed flex`,children:[jsxRuntime.jsx(c,{className:"--ico",children:t?L[we.Success]:L[we.Error]}),jsxRuntime.jsx(V,{as:"--message",children:t?o||"internet connection restored :)":r||"no internet connection"})]})});Rs.displayName="Zuz.NetWorkManager";var Ym=Rs;var Bs=react.forwardRef((e,n)=>{let{strenthMeter:t,onChange:o,...r}=e;"type"in r&&delete r.type;let{style:s,className:a,rest:u}=N(r),[f,m]=react.useState(false),[p,i]=react.useState(""),l=react.useMemo(()=>core.checkPasswordStrength(p),[p]),d=hooks.useDebounce(C=>{t&&i(C.target.value),o&&o(C);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(c,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(ae,{ref:n,type:f?"text":"password",className:a,onChange:d,...u}),jsxRuntime.jsx(z,{tabIndex:-1,onClick:()=>m(C=>!C),className:"--toggle flex aic jcc abs",children:f?L.eye:L.eyeSlash})]}),t&&jsxRuntime.jsxs(c,{as:`flex aic --password-meter --pb-score-${l.score}`,style:s,children:[jsxRuntime.jsxs(c,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(c,{as:`--pbar ${l.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${l.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${l.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${l.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(c,{as:`--pbar ${l.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(V,{as:"--password-meter-label","aria-hidden":true,children:l.result})]})]})});Bs.displayName="Zuz.Password";var rp=Bs;var Ls=react.forwardRef((e,n)=>{let{size:t,length:o,mask:r,...s}=e,a=react.useRef([]),u="pinput",f=false,m={};"with"in s&&(m={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(u=s.name,delete s.name),"required"in s&&(f=true,delete s.required);let{style:p}=N(s),i=l=>{let d=l.currentTarget,C=a.current[parseInt(d.dataset.index)+1],w=a.current[parseInt(d.dataset.index)-1];d.value.length===1&&C?C.focus():d.value.length===0&&w&&w.focus();};return react.useEffect(()=>{a.current=a.current.slice(0,t||o);},[t||o]),jsxRuntime.jsx(c,{name:u,style:p,className:"--otp flex aic rel","data-required":f,"data-size":t||o||4,...m,children:Array(t||o||4).fill(1).map((l,d)=>jsxRuntime.jsx(ae,{autoComplete:"new-password","data-index":d,ref:C=>{a.current[d]=C;},numeric:true,onChange:i,maxLength:1,placeholder:r?"\xB7":"0",type:r?"password":"text",...s},`pin-${d}`))})});Ls.displayName="Zuz.PinInput";var ip=Ls;var ks=react.forwardRef((e,n)=>{let{children:t,className:o,name:r,required:s,type:a,value:u,variant:f,checked:m,onSwitch:p,...i}=e,[l,d]=react.useState(m||false),{variant:C}=Y(true),w=react.useRef(null);return jsxRuntime.jsxs(bt,{className:`${o} --${(a||so.Default).toLowerCase()} --radio${!a||a==so.Default?"":"card"} --${f||C||U.Small} flex aic rel`.trim(),...i,children:[jsxRuntime.jsx(ae,{ref:w,defaultChecked:l,value:u||"rd",type:"radio",className:"abs",name:r,required:s||false,onChange:S=>{p&&p(S.target.checked,u||"cb"),d(S.target.checked);}}),jsxRuntime.jsx(c,{className:"--dot rel",children:jsxRuntime.jsx(c,{className:"--rod abs abc"})}),jsxRuntime.jsx(c,{className:"--value",children:t})]})});ks.displayName="Zuz.Radio";var pp=ks;var Ms=react.forwardRef((e,n)=>{let{fx:t,withStyle:o,as:r,reverse:s=false,searchIcon:a=L.search,hideSearchIcon:u=false,clearIcon:f=L.close,hideClearIcon:m=false,onChange:p,onClear:i,...l}=e,{style:d,className:C}=N({as:e.as}),[w,S]=react.useState(""),{variant:I}=Y(true),P=react.useRef(null);"type"in e&&delete e.type;let T=b=>{S(b.target.value),p?.(b.target.value);},g=b=>{w.trim()!==""&&(S(""),p?.(""),P.current&&(P.current.value="",e.onConfirm?.("")));};return react.useImperativeHandle(n,()=>({focus:()=>P.current?.focus(),value:()=>P.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(c,{style:d,className:`--search ${s?"--search-rev":""} --${e.variant||I||U.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${C}`.trim(),children:[jsxRuntime.jsx(ae,{ref:P,onChange:T,...l}),e.shortcut&&jsxRuntime.jsx(Xo,{keys:e.shortcut,as:"abs"}),jsxRuntime.jsx(z,{tabIndex:-1,onClick:b=>g(),className:"--send flex aic jcc",variant:e.variant||U.Medium,children:w!==""?!m&&(typeof f=="string"?jsxRuntime.jsx(J,{name:f,as:"--search-action"}):f):!u&&(typeof a=="string"?jsxRuntime.jsx(J,{name:a,as:"--search-action"}):a)})]})});Ms.displayName="Zuz.Search";var xp=Ms;var Ds=({checkIcon:e,selected:n,updateValue:t,o})=>{let r=e?typeof e=="string"?jsxRuntime.jsx(J,{name:"checkIcon"}):e:L.check,s=o.disabled===true;return jsxRuntime.jsxs(z,{onClick:a=>{s||(a.stopPropagation(),t(o));},disabled:s,as:`--select-option-item ${n?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxRuntime.jsxs(He,{children:[o.icon&&jsxRuntime.jsx(J,{name:o.icon,as:`--select-option-icon --icon-${o.value}`,color:o.iconColor}),jsxRuntime.jsx(V,{suppressHydrationWarning:true,children:typeof o=="string"?o:o.label})]}),n&&jsxRuntime.jsx(He,{aic:true,jcc:true,as:"--select-option-check --abs",children:r})]})};Ds.displayName="Option";var Hs=Ds;var Vs=({ref:e,...n})=>{let{selected:t,options:o,label:r,name:s,variant:a,search:u,searchPlaceholder:f,maxHeight:m,arrowDownIcon:p=L.arrowDown,arrowUpIcon:i=L.arrowUp,expanded:l,multiple:d,tokenizer:C,wrapTokens:w,disabled:S,checkIcon:I,closeIcon:P,onChange:T,...g}=n,[b,h]=react.useState(()=>d||C?t?(Array.isArray(t)?t:[t]).map(K=>typeof K=="string"?o.find(oe=>oe.value===K):K):[]:t?typeof t=="string"?o.find(H=>H.value===t):t:o[0]),[y,R]=react.useState(false),[O,k]=react.useState(null),$=react.useRef(null),B=react.useRef(null),D=react.useRef(null),A=react.useId(),W=react.useMemo(()=>s||A,[]),{reposition:x}=gt(D,{direction:ct.Bottom,offset:2}),{variant:E}=Y(true),F=P?typeof P=="string"?jsxRuntime.jsx(J,{name:P}):P:L.close,{className:G,style:_,rest:Z}=N(g,void 0),ee=H=>Array.isArray(b)?b.some(K=>K.value===H.value):b?.value===H.value,j=H=>{if(!(S||H.disabled))if(d||C){let K=Array.isArray(b)?b:[],ie=K.find(fe=>fe.value===H.value)?K.filter(fe=>fe.value!==H.value):[...K,H];h(ie),T?.(ie);}else h(H),R(false),T?.(H);},Q=(H,K)=>{if(H.stopPropagation(),S)return;let oe=b.filter(ie=>ie.value!==K.value);h(oe),R(false),T?.(oe);};return react.useImperativeHandle(e,()=>({setSelected:H=>{if(Array.isArray(H)){let K=H.map(oe=>typeof oe=="string"?o.find(ie=>ie.value===oe):oe).filter(Boolean);h(K);}else if(typeof H=="string"){let K=o.find(oe=>oe.value===H);K&&h(K);}else h(H);},getValue:()=>b||null}),[b,o]),react.useEffect(()=>{if(!y)return;let H=()=>{x();};return window.addEventListener("scroll",H,true),window.addEventListener("resize",x),()=>{window.removeEventListener("scroll",x,true),window.removeEventListener("resize",x);}},[y,x]),react.useEffect(()=>{if(!y){B.current&&(B.current.value=""),k(null);return}B.current?.focus(),x();let H=oe=>{D.current&&!D.current.contains(oe.target)&&R(false);},K=setTimeout(()=>{document.addEventListener("click",H);},0);return ()=>{clearTimeout(K),document.removeEventListener("click",H);}},[y,x]),jsxRuntime.jsxs(c,{className:`--select ${l==true?"--expanded":""} --${a||E} ${s?`--${s}`:""} ${S?"--disabled":""} rel`.trim(),name:W,children:[jsxRuntime.jsxs(z,{ref:$,disabled:S,className:`--select-display --selected flex aic rel ${G}`.trim(),withLabel:false,style:_,onClick:H=>{H.stopPropagation(),S||R(K=>!K);},...Z,children:[jsxRuntime.jsx(He,{aic:true,as:"--label-wrapper",children:C&&Array.isArray(b)&&b.length>0?jsxRuntime.jsxs(He,{as:`--tokens-wrap${w===true?" --wrap":""}`,children:[b.map(H=>jsxRuntime.jsxs(He,{aic:true,as:"--token",children:[jsxRuntime.jsx(V,{as:"--token-label",children:H.label}),jsxRuntime.jsx(c,{as:"--token-remove",onClick:K=>Q(K,H),children:F})]},H.value)),b.length<o.length&&jsxRuntime.jsx(V,{as:"--label",children:r||"Choose"})]}):jsxRuntime.jsx(V,{as:"--label",children:Array.isArray(b)?b.length>0?`${b.length} selected`:r||"Choose":b?.label||r||"Choose"})}),jsxRuntime.jsx(c,{className:"--svg-arrow rel flex aic jcc",children:y?typeof i=="string"?jsxRuntime.jsx(J,{name:i,as:"--search-action"}):i:typeof p=="string"?jsxRuntime.jsx(J,{name:p,as:"--search-action"}):p})]}),jsxRuntime.jsxs(c,{id:W,className:"--options-list -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!y,style:{maxHeight:m||"auto"},ref:D,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:y,duration:.05},children:[u&&jsxRuntime.jsx(c,{as:"--select-search --sticky",children:jsxRuntime.jsx(ae,{ref:B,onChange:H=>{k(H.target.value==""?null:H.target.value);},className:"--search-input",placeholder:f||"Search..."})}),o.filter(H=>!O||H.label.toLowerCase().includes(O.toLowerCase())).map(H=>jsxRuntime.jsx(Hs,{updateValue:j,checkIcon:I,selected:ee(H),o:H},`option-${(typeof H=="string"?H:H.label).replace(/\s+/g,"-")}-${typeof H=="string"?H:H.value}`))]})]})};Vs.displayName="Zuz.Select";var Cp=Vs;var $s=react.forwardRef((e,n)=>jsxRuntime.jsx(vt,{type:Ee.Switch,...e,ref:n}));$s.displayName="Zuz.Switch";var Pp=$s;var _s=e=>{let{idx:n,id:t,as:o,weight:r,style:s,value:a,render:u,resize:f,sortBy:m,sortable:p,onSort:i}=e,[l,d]=react.useState(0),C=()=>{p&&(i?.(String(t),l==1?-1:1),d(w=>w==1?-1:1));};return jsxRuntime.jsxs(c,{style:{flex:r||1,...s},as:`--col flex aic ${o||""} ${p?"--sortable":""}`,onClick:C,children:[jsxRuntime.jsx(c,{children:a}),n==-1&&p&&m==t&&jsxRuntime.jsx(c,{as:"--arrow flex aib",children:l==1?L.arrowUp:L.arrowDown})]})};_s.displayName="Zuz.Column";var jt=_s;var Zs=e=>{let{index:n,pubsub:t,schema:o,data:r,ids:s,styles:a,animate:u,sortBy:f,selectable:m,tableRef:p,loading:i,rowClassName:l,onSort:d,onRowClick:C,onSelect:w,onContextMenu:S}=e,I=hooks.useDelayed(),P=react.useMemo(()=>({transition:q.SlideInBottom,curve:X.EaseInOut,delay:.02*(n+1)}),[]),T=react.useRef(null),g=(h,y)=>{n==-1?t.emit(`ALL_ROWS_${h?"CHECKED":"UNCHECKED"}`,h):(w&&w(r,h),t.emit(`ROW_${h?"CHECKED":"UNCHECKED"}`,h,y));},b=(h,y,R)=>jsxRuntime.jsx(jt,{idx:h,id:y,as:"--selector",pubsub:t,value:jsxRuntime.jsx(vt,{value:R,ref:T,onSwitch:g,type:Ee.Default})});return react.useEffect(()=>{let h=(k,$)=>{T.current?.setChecked(k,false);},y=(k,$)=>{let B=false;p?.current&&p.current.querySelectorAll(".--row").forEach(D=>{let A=D;if(!A.classList.contains("--row-head")){let W=A.querySelector(".--selector input[type=checkbox]");W&&W.checked&&!B&&(B=W.checked);}}),T.current.setChecked(B,false);},R=k=>{T.current?.setChecked(k,false),w&&w(r,k);},O=k=>{T.current?.setChecked(k,false),w&&w(r,k);};return n==-1?(t.on("ROW_CHECKED",h),t.on("ROW_UNCHECKED",y),()=>{t.off("ROW_CHECKED",h),t.off("ROW_UNCHECKED",y);}):(t.on("ALL_ROWS_CHECKED",R),t.on("ALL_ROWS_UNCHECKED",O),()=>{t.off("ALL_ROWS_CHECKED",R),t.off("ALL_ROWS_UNCHECKED",O);})},[]),jsxRuntime.jsxs(c,{onContextMenu:h=>S?S(h,r):null,onClick:h=>C?C(h,e.data):()=>{},...u?{fx:{...P,when:I}}:{},as:`--row flex aic ${C?"--row-clickable":""} ${n==-1?"--row-head":""} ${l||""}`,children:[n==-1&&o.map((h,y)=>{let{renderWhenHeader:R,render:O,value:k,...$}=h;return jsxRuntime.jsxs(react.Fragment,{children:[m&&y==0&&b(-1,`--selector-${h.id}`,"all"),jsxRuntime.jsx(jt,{idx:-1,onSort:d,sortBy:f,value:k,...$,pubsub:t,style:a[h.id]})]},`--col-${h.id}`)}),i&&n>-1&&jsxRuntime.jsx(c,{as:"--col",children:jsxRuntime.jsx(V,{as:"opacity:0",children:"..."})}),!i&&n>-1&&s&&r&&o.map((h,y)=>jsxRuntime.jsxs(react.Fragment,{children:[m&&y==0&&b(y,`--selector-${h.id}`,h.id.toString()),s.includes(String(h.id))?jsxRuntime.jsx(jt,{pubsub:t,idx:y,id:String(h.id),style:a[String(h.id)],value:h.render?h.render(r,n):r[String(h.id).includes(".")?String(h.id).split(".").reverse()[0]:h.id]}):null]},`--${String(h.id)}-val-${y}`))]})};Zs.displayName="Zuz.Row";var Jt=Zs;var Us=(e,n)=>{let{schema:t,rows:o,rowCount:r,rowsPerPage:s,currentPage:a,pagination:u,paginationHash:f,showPaginationOnZeroPageCount:m,animateRows:p,header:i,rowClassName:l,selectableRows:d,hoverable:C,sortBy:w,loading:S,loadingRowCount:I,loadingMessage:P,spinner:T,emptyMessage:g,onSort:b,onRowClick:h,onRowSelectToggle:y,onPageChange:R,onRowContextMenu:O,...k}=e,$=react.useRef(null),B=react.useMemo(()=>t.reduce((le,te)=>(le[te.id]={flex:te.weight||1,...te.w&&{width:te.w},...te.maxW&&{maxWidth:te.maxW},...te.minW&&{minWidth:te.minW},...te.h&&{height:te.h},...te.maxH&&{maxHeight:te.maxH},...te.minH&&{minHeight:te.minH}},le),{}),[t]),D=react.useMemo(()=>Object.keys(B),[t]),A=react.useMemo(()=>i??true,[i]),{style:W,className:x,rest:E}=N(k),F=react.useRef(null),G=react.useMemo(()=>new core.PubSub,[]),_=react.useRef(o.map(()=>core.uuid(8))),[Z,ee]=react.useState(w||null),[j,Q]=react.useState(P||"loading"),H=react.useMemo(()=>!S&&o&&o.length==0,[S,o]),K=react.useCallback(()=>g?typeof g=="function"?jsxRuntime.jsx(g,{}):g:jsxRuntime.jsx(V,{as:"tac s:18 mt:75",children:"No Record Found"}),[S,o]);react.useEffect(()=>{_.current=o.map(()=>core.uuid(8));},[o]);let oe=(le,te)=>{ee(le),b?.(le,te);},ie=(r||(o?o.length:0))/(s||10),fe=react.useMemo(()=>m||ie>1?jsxRuntime.jsx(xt,{hash:f,ref:$,renderOnZeroPageCount:m,onPageChange:R,paginationStyle:"table",startPage:a,itemCount:r||(o?o.length:0),itemsPerPage:s||10}):null,[a,r]);return react.useImperativeHandle(n,()=>({setLoading(le){}})),jsxRuntime.jsxs(c,{as:`--table ${C??true?"--hoverable":""} flex cols rel ${x}`,ref:F,children:[A==true&&jsxRuntime.jsx(Jt,{sortBy:Z,onSort:oe,tableRef:F,pubsub:G,selectable:d,index:-1,schema:t,loading:true,styles:B}),S&&jsxRuntime.jsxs(c,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(Ce,{type:T||ue.Simple}),j&&jsxRuntime.jsx(V,{as:"--table-loading-message",children:j})]}),S&&Array(I||5).fill({}).map((le,te)=>jsxRuntime.jsx(Jt,{tableRef:F,index:te,pubsub:G,schema:t,styles:B,loading:true,animate:p,onRowClick:h},`--trow-loading-${te}-${t[0].id}`)),!S&&o&&o.map((le,te)=>jsxRuntime.jsx(Jt,{tableRef:F,pubsub:G,loading:false,index:te,schema:t,ids:D,styles:B,animate:p,data:le,onRowClick:h,rowClassName:l,selectable:d,onSelect:y,onContextMenu:O},`--trow-${_.current[te]||te}-${t[0].id}`)),H&&K(),u&&fe&&jsxRuntime.jsx(c,{"aria-hidden":!u||!fe,...p?{fx:{transition:q.SlideInBottom,curve:X.EaseInOut,delay:.02*(o.length+1),when:!S&&o&&u&&fe!=null}}:{},as:"--row flex aic --row-footer",children:fe})]})};Us.displayName="Zuz.Table";var Vp=react.forwardRef(Us),$p=Vp;var _p=({ref:e,...n})=>{let{title:t,items:o}=n,[r,s]=react.useState(0),a=(u,f,m)=>{u.preventDefault(),s(f),document.getElementById(m)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(c,{ref:e,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(V,{as:"--toc-title",children:t}),jsxRuntime.jsx(We,{items:o.map((u,f)=>jsxRuntime.jsx("a",{className:r==f?"--toc-active":"",style:{anchorName:r===f?"--toc-active":"none",color:r==f?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:m=>a(m,f,u.tag),href:`#${u.tag}`,children:u.label}))})]})},Fp=_p;var qs=({isActive:e,transitionType:n,speed:t,width:o,render:r,content:s,onHeightChange:a})=>{let u=react.useRef(null),f=hooks.useResizeObserver(u);react.useEffect(()=>{e&&f.height>0&&a(f.height);},[e,f.height]);let p=react.useMemo(()=>{let i={width:o>0?`${o}px`:"100%",minWidth:o>0?`${o}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return n==="fade"?{...i,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,visibility:e?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:e?1:0}:n==="scale"?{...i,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,transform:`scale(${e?1:.95})`,transition:`all ${t}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:e?1:0}:i},[e,n,o,t]);return jsxRuntime.jsx(c,{ref:u,style:{...p},className:"--content",children:r||e?s:null})};qs.displayName="Zuz.TabBody";var Xs=qs;var js=({ref:e,...n})=>{let{tabs:t,speed:o=.3,prerender:r=true,variant:s,tabStyle:a="fixed",onChange:u,transitionType:f="slide",...m}=n,[p,i]=react.useState(0),l=react.useRef(null),d=hooks.useResizeObserver(l),C=react.useMemo(()=>core.uuid(8),[]),[w,S]=react.useState("auto"),I=react.useMemo(()=>d.width>0,[d.width]);react.useImperativeHandle(e,()=>({setTab:y=>i(y)}));let P=react.useMemo(()=>t.map(y=>({...y,key:y.key||core.uuid(8)})),[t]),{style:T,className:g,rest:b}=N({as:`flex cols w-full no-overflow ${m.as||""}`,...m}),h=()=>{if(!I)return {opacity:0};switch(f){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${P.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${p*d.width}px, 0, 0)`,transition:`transform ${o}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(c,{ref:l,style:T,className:`--tabview --${a} flex cols ${g}`,children:[jsxRuntime.jsx(wt,{as:"--tabview-head",onSwitch:y=>{i(y.index);let R=P.find(O=>O.tag==y.tag);R&&R.onSelect&&(R.onSelect(R,y.index),u?.(R,y.index));},selected:p,items:P.reduce((y,R,O)=>(y.push({icon:R.icon,index:O,label:R.label,tag:R.tag}),y),[])}),jsxRuntime.jsx(c,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:w,transition:I?`height ${o}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:I?1:0},children:jsxRuntime.jsx(c,{className:"--track",style:{...h()},children:P.map((y,R)=>jsxRuntime.jsx(Xs,{isActive:R===p,transitionType:f,speed:o,width:d.width,render:r||R===p,onHeightChange:O=>R===p&&S(O),content:y.body},`tab-body-${y.key||R}-${C}`))})})]})};js.displayName="Zuz.TabView";var jp=js;var ou=({ref:e,commands:n,onCommand:t,welcomeMessage:o="Welcome to Zuz Terminal v1.0.0",prompt:r="zuz ~ ",variant:s,...a})=>{let[u,f]=react.useState([{type:"output",content:o}]),[m,p]=react.useState(""),i=react.useRef(null),l=react.useRef(null),{variant:d}=Y(true);react.useEffect(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight);},[u]);let C=g=>{let b=typeof g=="string"?{type:"output",content:g}:g;f(h=>{let y=[...h,b];return y.length>1e3?y.slice(-1e3):y});},w=()=>f([]);react.useImperativeHandle(e,()=>({write:C,clear:w}));let S=async g=>{let[b,...h]=g.split(" "),y=b.toLowerCase();return n&&n[y]?await n[y](h):t?await t(g):`command not found: ${b}`},I=g=>{let b=/\u001b\[(\d+)m/g,h=[],y={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},R=0,O="#d4d4d4",k=false,$;for(;($=b.exec(g))!==null;){let D=g.slice(R,$.index);D&&h.push({text:D,color:O,bold:k});let A=$[1];A==="0"?(O="#d4d4d4",k=false):A==="1"?k=true:y[A]&&(O=y[A]),R=b.lastIndex;}let B=g.slice(R);return B&&h.push({text:B,color:O,bold:k}),h},P=(g,b)=>g.includes("\x1B")?I(g).map((h,y)=>jsxRuntime.jsx(ne,{style:{color:h.color||"#d4d4d4",fontWeight:h.bold?"bold":"normal"},children:h.text},`--terminal-msg-${y}-${h.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(ne,{style:{color:b==="error"?"#ff5f56":b==="command"?"#00ff00":"#d4d4d4"},children:g}),T=async g=>{if(g.key==="Enter"&&m.trim()){let b=m.trim(),h=[...u,{type:"command",content:`${r}${b}`}];p(""),f(h);let y=await S(b);f(R=>[...R,{type:"output",content:y}]);}};return jsxRuntime.jsxs(c,{as:`--zuz-terminal --${s||d||U.Medium} flex cols ${a.className}`,onClick:()=>l.current?.focus(),children:[jsxRuntime.jsx(c,{ref:i,className:"--terminal-log",children:u.map((g,b)=>jsxRuntime.jsx(c,{children:jsxRuntime.jsx(V,{children:P(g.content,g.type)})},b))}),jsxRuntime.jsxs(c,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(V,{as:"--terminal-prompt",children:r}),jsxRuntime.jsx(ae,{ref:l,className:"--zuz-term-input",autoFocus:true,value:m,variant:s||d||U.Medium,onChange:g=>p(g.target.value),onKeyDown:T})]})]})},ru=ou;var nu=({meta:e})=>jsxRuntime.jsxs(z,{as:"flex aic --command-item",children:[e.icon&&jsxRuntime.jsx(J,{name:e.icon,as:"--command-icon"}),jsxRuntime.jsx(V,{children:e.label})]}),su=({position:e,onSelect:n,commands:t,visible:o})=>jsxRuntime.jsx(c,{"aria-hidden":!o,fx:{transition:q.SlideInBottom,duration:.1,when:o},className:"--command-box abs grid",style:{...e},children:t.map(r=>jsxRuntime.jsx(nu,{meta:r},`cmd-${r.label.replace(/\s+/,"-")}`))}),oa=su;var sa=react.forwardRef((e,n)=>{let{autoResize:t,maxHeight:o,variant:r,resize:s="none",command:a,commands:u,onInput:f,cmd:m,renderDropdown:p,value:i,defaultValue:l,...d}=e,C=react.useRef(null),w=react.useRef(null),{variant:S}=Y(true),{style:I,className:P,rest:T}=N(d),{showDropdown:g,dropdownPosition:b,handleKeyDown:h,handleInput:y,handleCommandSelect:R}=hooks.useCommandActions({command:a,commands:u,cmd:m,ref:C}),O=react.useCallback(()=>{let $=C.current;!$||!t||(w.current&&cancelAnimationFrame(w.current),w.current=requestAnimationFrame(()=>{$.style.height="auto";let B=$.scrollHeight;if(o){let D=parseInt(o.toString(),10);isNaN(D)||(B=Math.min(B,D));}$.style.height=`${B}px`,$.style.overflowY=o&&B>=parseInt(o.toString(),10)?"auto":"hidden";}));},[t,o]),k=$=>{f?.($),y($),O();};return react.useEffect(()=>{O();},[i,l,O]),react.useEffect(()=>{t&&C.current&&O();},[t,O]),react.useEffect(()=>()=>{w.current&&cancelAnimationFrame(w.current);},[]),jsxRuntime.jsxs(c,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${r||S||U.Medium} flex ${P}`.trim(),style:{...I,resize:s,height:t?"auto":I?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:h,onInput:k,ref:$=>{typeof n=="function"?n($):n&&(n.current=$),C.current=$;},value:i,defaultValue:l,...T}),p?p({show:g,position:b,commands:u||[],onSelect:R}):u&&u.length>0&&jsxRuntime.jsx(oa,{visible:g,commands:u,onSelect:R,position:b})]})});sa.displayName="Zuz.TextArea";var mu=sa;var ia=react.forwardRef((e,n)=>{let{as:t,value:o,color:r,direction:s,...a}=e,u=react.useRef(null),[f,m]=react.useState(o||0);return react.useImperativeHandle(n,()=>({updateValue(p){f.toString().length!==p.toString().length&&m(p);},setValue(p){if(this.updateValue(p),u.current){let i=p.toString().split("");u.current.querySelectorAll(".--wheel-char").forEach((l,d)=>{let C=i[d];if(l instanceof HTMLElement){l.setAttribute("data-value",C);let w=l.querySelector(".--wheel-char-track");w instanceof HTMLElement&&(w.style.setProperty("--v",C),w.offsetWidth);}});}}})),react.useEffect(()=>{m(o||0);},[o]),jsxRuntime.jsxs(c,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:u,...a,children:[(f||0).toString().split("").map((p,i)=>isNaN(parseInt(p,10))?jsxRuntime.jsx(ne,{className:"--wheel-char wheel-char-symbol grid",children:p},`wheel-char-symbol-${i}`):jsxRuntime.jsx(ne,{"data-value":p,className:`--wheel-char grid ${i>(f||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(ne,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":p},children:[jsxRuntime.jsx(ne,{children:!s||s==="down"?0:9}),(!s||s==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((l,d)=>jsxRuntime.jsx(ne,{children:l},`${i}--${d}`)),jsxRuntime.jsx(ne,{children:!s||s==="down"?9:0})]})},`wheel-char-${i}`)),r&&jsxRuntime.jsx(c,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${r}, transparent, transparent, transparent, ${r})`}})]})});ia.displayName="Zuz.TextWheel";var yu=ia;var nr=react.forwardRef((e,n)=>{let{as:t,meta:o,nodes:r,icons:s,onSelect:a,treeTag:u,selected:f,roots:m,expanded:p,...i}=e,{tag:l,label:d,icon:C,under:w,isHead:S}=o,I=react.useMemo(()=>m.includes(l),[m]),[P,T]=react.useState(p),g=()=>{localStorage.setItem(`--tn${u}-${l}`,P?"0":"1"),T(!P);};react.useEffect(()=>{p||I&&!localStorage.getItem(`--tn${u}-${l}`)?(localStorage.setItem(`--tn${u}-${l}`,"1"),T(true)):T(localStorage.getItem(`--tn${u}-${l}`)=="1");},[]);let b=react.useMemo(()=>r.filter(h=>h.under==l),[r,l]);return jsxRuntime.jsxs(c,{className:`--treenode ${I?"--is-root":""} --treenode-${l} flex cols`,children:[jsxRuntime.jsxs(c,{className:`--node --node-${l} flex aic ${f==l?" --selected":""}`,children:[jsxRuntime.jsx(z,{skeleton:i.skeleton,onClick:g,className:"--node-aro-btn",disabled:b.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(J,{skeleton:i.skeleton,className:"--node-aro-icon",name:b.length==0?s?.arrowDisabled||s?.arrowClose:P?s?.arrowOpen:s?.arrowClose}):b.length==0?L.chevronBottom:P?L.chevronBottom:L.chevronRight}),jsxRuntime.jsxs(z,{className:"--node-meta flex aic",onClick:h=>a(l),children:[(s?.nodeOpen&&s?.nodeClose||I&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(J,{skeleton:i.skeleton,className:`--node-icon ${I?"--icon-root":""}`,name:C||(P?I&&s?.rootOpen||s.nodeOpen:I&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(V,{className:`--node-label ${I?"--node-label-root":""}`.trim(),skeleton:i.skeleton,children:d})]})]}),P&&b.length>0&&jsxRuntime.jsx(c,{className:`--sub-node tree-sub-node-${l} flex cols`,children:b.map(h=>jsxRuntime.jsx(nr,{treeTag:u,selected:f,onSelect:a,icons:s,roots:m,expanded:h.expanded||false,meta:h,nodes:r},`--node-${h.tag}`))})]})});nr.displayName="TreeItem";var ca=nr;var pa=react.forwardRef((e,n)=>{let{as:t,nodes:o,onNodeSelect:r,tag:s,icons:a,roots:u,selected:f,...m}=e,[p,i]=react.useState(f);react.useImperativeHandle(n,()=>({getSelected:()=>p}),[r]);let l=d=>{i(d),r&&r(d);};return react.useEffect(()=>{p!=f&&i(f);},[f]),jsxRuntime.jsx(c,{className:"--treeview flex cols",children:o.filter(d=>u.includes(d.tag)).map(d=>jsxRuntime.jsx(ca,{treeTag:s?`-${s}`:"",selected:p,onSelect:C=>l(C),icons:a,meta:d,roots:u,expanded:d.expanded||false,skeleton:m.skeleton,nodes:o},`--node-${d.tag}`))})});pa.displayName="Zuz.TreeView";var Pu=pa;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
|
|
14
|
-
Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return
|
|
9
|
+
document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx(fo,{children:e})]})},yr=(e,n)=>{if(va)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||n};var br=({ref:e,...n})=>{let{style:t,...o}=n,{style:r,className:s,rest:a}=N(o);return jsxRuntime.jsx("span",{ref:e,style:t,className:s,...a})};br.displayName="Zuz.Span";var ne=br;var wr=react.forwardRef((e,n)=>{let{name:t,pathCount:o,variant:r,color:s,size:a,...u}=e,{variant:f}=Y(true),{className:c,style:p,rest:i}=N(u);return jsxRuntime.jsx("div",{style:{color:s,...p,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${r||f||U.Small} ${c}`.trim(),ref:n,...i,children:Array(o||0).fill(0).map((l,g)=>jsxRuntime.jsx(ne,{className:`path${g+1}`},`${t}-layer-${g}`))})});wr.displayName="Zuz.Icon";var J=wr;var ue={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Sr=e=>{let{type:n,variant:t,color:o,...r}=e,{className:s,style:a,rest:u}=N(r),{spinner:f}=Y(true),c=()=>{switch(n||f?.type||ue.Simple){case ue.Simple:return null;case ue.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(m,{as:"--bar --bar1"}),jsxRuntime.jsx(m,{as:"--bar --bar2"}),jsxRuntime.jsx(m,{as:"--bar --bar3"})]});case ue.Roller:return null}};return jsxRuntime.jsx(m,{className:`${s} --spinner --${(n||f?.type||ue.Simple).toLowerCase()} --${t||f?.variant||U.Small}`.trim(),style:{...a},...u,children:c()})};Sr.displayName="Zuz.Spinner";var Ce=Sr;var Lt={Loading:"loading",Normal:"normal"};var Tr=({ref:e,...n})=>{let{reset:t,kind:o="solid",variant:r,icon:s,iconSize:a,children:u,withLabel:f,spinner:c,state:p,disabled:i,...l}=n,{style:g,className:C,rest:S}=N(l),{variant:b}=Y(true);return jsxRuntime.jsxs("button",{className:core.removeDuplicateWords(`--button --${o} --${r||b} flex aic ${t?"":"jcc"} ${s?"--with-icon":""} ${C}`).trim().replace(/\s+/g," "),style:g,ref:e,disabled:p==Lt.Loading||n.skeleton?.enabled||i,...S,children:[p==Lt.Loading&&jsxRuntime.jsx(Ce,{variant:r||b,type:c||ue.Simple}),(!p||p==Lt.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[s&&jsxRuntime.jsx(J,{variant:a,name:s}),f===true?jsxRuntime.jsx(ne,{children:u}):u]})]})};Tr.displayName="Zuz.Button";var V=Tr;var Ir=react.forwardRef((e,n)=>{let{h:t,html:o,children:r,lines:s,...a}=e,{style:u,className:f,rest:c}=N(a),p=`h${e.h||1}`;return jsxRuntime.jsx(p,{ref:n,style:u,className:f,...c,children:o?jsxRuntime.jsx(ne,{dangerouslySetInnerHTML:{__html:o}}):r})});Ir.displayName="Zuz.Text";var z=Ir;var ka=e=>{let{label:n,labelColor:t,icon:o,iconColor:r,index:s,className:a,onSelect:u}=e;return n=="-"?jsxRuntime.jsx(m,{className:"--line"}):jsxRuntime.jsxs(V,{reset:true,onClick:f=>u?.(e),className:`--item ${a||""}`.trim(),children:[jsxRuntime.jsx(m,{as:"--icon",children:jsxRuntime.jsx(J,{name:o,className:"--ico",style:r?{color:r}:{}})}),jsxRuntime.jsx(z,{className:"--lbl flex aic",style:t?{color:t}:{},children:n})]})},Rr=ka;var Er=({ref:e,...n})=>{let{id:t,as:o,fx:r,offsetX:s,offsetY:a,parent:u,event:f,arrow:c,when:p,items:i,header:l,footer:g,origin:C=mt.TopRight,...S}=n,[b,I]=react.useState(false),[P,T]=react.useState(i||[]),{position:d,targetRef:v,calculatedAnchor:h}=hooks.useAnchorPosition(u?.current,f,{offsetX:s,offsetY:a,preferredAnchor:C}),R=u&&d.top>u.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",O=react.useMemo(()=>{let W=h.toLowerCase();return W.includes("left")?"--arrow-left":W.includes("right")?"--arrow-right":"--arrow-center"},[h]),L=d.top!==0||d.left!==0;react.useEffect(()=>{p&&L?I(true):p||I(false);},[p,L]);let{className:H,style:B,rest:D}=N(S),$=pe({...r?.transition?{transition:r.transition??q.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:r?.curve??X.EaseInOut,duration:r?.duration??.05,when:b&&L});return jsxRuntime.jsxs(m,{ref:v,className:`--contextmenu ${c||u!=null?`--has-arrow ${R} ${O}`:""} abs flex cols ${H}`.trim(),"aria-hidden":!b,style:{...B,...$.style,top:d.top,left:d.left,visibility:L?"visible":"hidden",transformOrigin:h},...D,children:[typeof l=="function"?react.createElement(l):l,P.map((W,x)=>jsxRuntime.jsx(Rr,{...W,index:x},`context-${W.label.toLowerCase()}-${x}`)),typeof g=="function"?react.createElement(g):g]})};Er.displayName="Zuz.ContextMenu";var ho=Er;var kr=react.forwardRef((e,n)=>{let{children:t,fx:o,when:r,fxDelay:s,fxStep:a,classToIgnore:u,...f}=e,c=Y(true),p=hooks.useDelayed(),i=o||c?.group?.fx,l=s||c?.group?.fxDelay,g=a||c?.group?.fxStep,C=u||c?.group?.classToIgnore||"-fx",S=react.useMemo(()=>i?react$1.addPropsToChildren(t,b=>{if(b.type===react.Fragment)return false;let I=b.props||{},P="fx"in I,T=I.as?Array.isArray(I.as)?I.as.join(" "):I.as:I.className||"",d=typeof T=="string"&&T.includes(C);return !P&&!d},b=>({fx:{...i,delay:(l||0)+b*(g||.1),when:r??(o?.when||p)}})):t,[t,r,p,i]);return jsxRuntime.jsx(m,{className:"--group",ref:n,...f,children:S})});kr.displayName="Zuz.Group";var yo=kr;var Mr=react.forwardRef((e,n)=>{let{message:t,spinner:o,spinnerSize:r,color:s,when:a,hideMessage:u,...f}=e,{className:c,style:p,rest:i}=N(f),{spinner:l}=Y(true);return "when"in e&&e.when==false?null:jsxRuntime.jsxs(yo,{fx:{transition:q.SlideInBottom,curve:X.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${c}`.trim(),style:{...p,backgroundColor:"var(--cover-bg)"},...i,children:[jsxRuntime.jsx(Ce,{variant:r||l?.variant||U.Small,type:o||l?.type||ue.Simple}),!u&&jsxRuntime.jsx(z,{className:"--label",style:{color:"var(--cover-label)"},children:t||"loading"})]})});Mr.displayName="Zuz.Cover";var Re=Mr;var xo=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(t=>t!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},Te=new xo;var Or=react.forwardRef((e,n)=>{let{when:t,...o}=e;return jsxRuntime.jsx(m,{ref:n,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:q.FadeIn,when:t},...o})});Or.displayName="Zuz.Overlay";var _e=Or;var qa=({action:e,render:n=true,message:t=""})=>jsxRuntime.jsx(m,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:n?t:null}),Dr=qa;var Ya=({action:e,actionPosition:n,dialogID:t,variant:o})=>jsxRuntime.jsx(m,{as:`--footer flex aic rel ${n?n==mr.Center?"jcc":"":"jce"}`.trim(),children:e.map((r,s)=>jsxRuntime.jsx(V,{variant:o,onClick:a=>r.handler?r.handler():r.onClick?r.onClick():console.log("onClick Handler missing"),as:"--action",children:r.label},`dialog-${t}-action-${r.key}`))}),Ar=Ya;var Qa={colorSchemeLight:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"5"}),jsxRuntime.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),colorSchemeSystem:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsxRuntime.jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark:jsxRuntime.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M17.919 8.18H6.079c-.96 0-1.44 1.16-.76 1.84l5.18 5.18c.83.83 2.18.83 3.01 0l1.97-1.97 3.21-3.21c.67-.68.19-1.84-.77-1.84z"})}),arrowUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M18.68 13.978l-3.21-3.21-1.96-1.97a2.13 2.13 0 00-3.01 0l-5.18 5.18c-.68.68-.19 1.84.76 1.84h11.84c.96 0 1.44-1.16.76-1.84z"})}),search:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children:jsxRuntime.jsx("path",{d:"M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z"})}),close:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),eye:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 20.5c-4.299 0-8.24-3.023-10.544-8.086a1 1 0 010-.828C3.759 6.523 7.701 3.5 12 3.5s8.24 3.023 10.544 8.086a1.001 1.001 0 010 .828 18.14 18.14 0 01-1.391 2.52 1 1 0 11-1.666-1.106A15.87 15.87 0 0020.529 12C18.543 7.92 15.379 5.5 12 5.5S5.457 7.92 3.471 12c1.986 4.08 5.15 6.5 8.529 6.5a7.964 7.964 0 005.036-1.92 1 1 0 111.265 1.55A9.94 9.94 0 0112 20.5z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 16a4.004 4.004 0 01-3.929-4.756 1 1 0 011.965.375A2 2 0 1014 12a2.034 2.034 0 00-2.053-1.999 1.04 1.04 0 01-1.043-.947.963.963 0 01.902-1.05L12 8a4 4 0 010 8z"})]}),eyeSlash:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 15c-4.132 0-7.98-1.214-10.294-3.249a1 1 0 111.32-1.502C4.986 11.972 8.34 13 12 13s7.014-1.028 8.974-2.751a1 1 0 111.32 1.502C19.98 13.786 16.132 15 12 15z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 18a1 1 0 01-1-1v-3a1 1 0 012 0v3a1 1 0 01-1 1zM7.749 17.667a.964.964 0 01-.17-.014 1 1 0 01-.817-1.155l.505-2.935a1 1 0 111.97.339l-.504 2.935a1 1 0 01-.984.83zM3.636 16.306a1.001 1.001 0 01-.942-1.336l.978-2.745a1 1 0 111.884.672l-.978 2.745a1 1 0 01-.942.664zM16.251 17.667a1 1 0 01-.984-.83l-.505-2.935a1 1 0 011.97-.339l.506 2.935a1 1 0 01-.816 1.155.964.964 0 01-.17.014zM20.364 16.306a1 1 0 01-.942-.664l-.978-2.745a1 1 0 111.884-.672l.978 2.745a1.001 1.001 0 01-.942 1.336z"})]}),check:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsxRuntime.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[we.Info]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[we.Warning]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[we.Error]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[we.Success]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntime.jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),volumeHigh:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M22 11.25h-1.25V10c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.25H18c-.41 0-.75.34-.75.75s.34.75.75.75h1.25V14c0 .41.34.75.75.75s.75-.34.75-.75v-1.25H22c.41 0 .75-.34.75-.75s-.34-.75-.75-.75M14.02 3.782c-1.12-.62-2.55-.46-4.01.45l-2.92 1.83c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h1.4300000000000002c.23 0 .46.07.66.19l2.92 1.83c.88.55 1.74.82 2.54.82a3 3 0 0 0 1.47-.37c1.11-.62 1.73-1.91 1.73-3.63v-9.18c0-1.72-.62-3.01-1.73-3.63"})}),volumeMute:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M18 16.75a.75.75 0 0 1-.6-1.2 5.93 5.93 0 0 0 .72-5.84.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.02 2.42.67 5.23-.9 7.33-.15.19-.37.29-.6.29"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.828 19.25a.75.75 0 0 1-.6-1.2c2.14-2.85 2.61-6.67 1.23-9.96a.75.75 0 0 1 .4-.98c.38-.16.82.02.98.4 1.59 3.78 1.05 8.16-1.41 11.44-.14.2-.37.3-.6.3M14.04 12.958c.63-.63 1.71-.18 1.71.71v2.93c0 1.72-.62 3.01-1.73 3.63a3 3 0 0 1-1.47.37c-.8 0-1.66-.27-2.54-.82l-.64-.4c-.54-.34-.63-1.1-.18-1.55zM21.77 2.229c-.3-.3-.79-.3-1.09 0l-4.95 4.95c-.06-1.6-.66-2.8-1.72-3.39-1.12-.62-2.55-.46-4.01.45l-2.91 1.82c-.2.12-.43.19-.66.19H5c-2.42 0-3.75 1.33-3.75 3.75v4c0 2.42 1.33 3.75 3.75 3.75h.16l-2.94 2.94c-.3.3-.3.79 0 1.09.16.14.35.22.55.22s.39-.08.54-.23l18.46-18.46c.31-.3.31-.78 0-1.08"})]}),plus:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsxRuntime.jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsxRuntime.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},k=Qa;var ja=({title:e="Alert",onClose:n})=>jsxRuntime.jsxs(m,{as:"--head flex aic rel",children:[jsxRuntime.jsx(m,{as:`--${e?"title":"dot"} flex aic jcc rel`,children:e}),jsxRuntime.jsx(V,{onClick:t=>n(),className:"--closer abs center-v",children:k.close})]}),$r=ja;var Fr=({ref:e,...n})=>{let{index:t,id:o,title:r,message:s,transition:a,curve:u,speed:f,type:c,action:p,actionPosition:i,spinner:l,loadingMessage:g,variant:C,inBackground:S,forceClose:b,forceLoading:I,onClose:P,onShow:T,onHide:d,...v}=n,h=react.useMemo(()=>core.uuid(12),[]),[y,R]=react.useState(r||""),[O,L]=react.useState(s||""),[H,B]=react.useState(c||Ye.Dialog),[D,$]=react.useState(false),[W,x]=react.useState(true),[E,F]=react.useState(p||null),[G,_]=react.useState(false),{variant:Z,spinner:ee,dialog:j}=Y(true),Q=C||j?.variant||Z||U.Small,{style:A,className:K,rest:oe}=N(v),le=react.useRef(null),fe=pe({when:D,duration:f||j?.speed||.3,delay:j?.delay||.1,transition:a||j?.transition||q.SlideInBottom,curve:u||j?.curve||X.EaseInOut,watch:["scale","filter","transform"]}),ae=()=>{$(false),P(o);},te=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{Te.isTop(ae)&&ae();}}],[D]);hooks.useShortcuts(te),react.useEffect(()=>{B(Ye.Dialog),L(s),R(y),E&&F(E.reduce((se,be)=>(se.push({...be,key:be.key||core.uuid(12)}),se),[])),$(true),setTimeout(()=>T?T():()=>{},500);},[]),react.useEffect(()=>{b&&ae();},[b]),react.useEffect(()=>{I!=null&&_(I);},[I]),react.useEffect(()=>(D?Te.push(ae):Te.pop(ae),()=>Te.pop(ae)),[D]);let re=react.useMemo(()=>1e4+t*10,[t]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(_e,{style:{zIndex:re},when:D}),jsxRuntime.jsxs(m,{as:`--dialog --${(c??Ye.Default).toLowerCase()} ${D?"--visible":""} ${K} fixed abc`.trim(),style:{...fe.style,zIndex:re+1,pointerEvents:S==true?"none":"auto",...S==true?{scale:"0.92",filter:"blur(2px)"}:{}},...oe,ref:le,children:[jsxRuntime.jsx($r,{title:y,onClose:ae}),jsxRuntime.jsx(Dr,{message:O,render:W,action:E}),E&&E.length>0&&jsxRuntime.jsx(Ar,{variant:Q,action:E,dialogID:h,actionPosition:i}),jsxRuntime.jsx(Re,{when:G,spinner:l||j?.spinner||ee?.type||ue.Simple,message:g||j?.loadingMessage})]})]})};Fr.displayName="Zuz.Dialog";var vo=Fr;var Zr=react.forwardRef((e,n)=>{let{speed:t,style:o,...r}=e,{rootRef:s,containerRef:a,thumbY:u,thumbX:f,onScrollY:c,onScrollX:p}=hooks.useScrollbar(t||1),{style:i,className:l,rest:g}=N(r);return react.useEffect(()=>{let C=a.current;if(!C)return;let S=()=>{window.dispatchEvent(new Event("resize"));};return C.addEventListener("scroll",S),()=>C.removeEventListener("scroll",S)},[]),jsxRuntime.jsxs(m,{ref:s,className:l.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(m,{as:`--scroll-content ${l}`.trim(),ref:a,style:o||{},children:g.children}),jsxRuntime.jsx(m,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(m,{as:"--scroll-thumb --abs",ref:u,onMouseDown:c})}),jsxRuntime.jsx(m,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(m,{as:"--scroll-thumb --abs",ref:f,onMouseDown:p})})]})});Zr.displayName="Zuz.ScrollView";var wo=Zr;var Kr=({ref:e,...n})=>{let{id:t,index:o,from:r,speed:s,children:a,margin:u,animation:f,prerender:c,inBackground:p,forceClose:i,forceLoading:l,onClose:g,...C}=n,{drawer:S}=Y(true),[b,I]=react.useState(a),[P,T]=react.useState(false),[d,v]=react.useState(c??(S?.prerender||true)),[h,y]=react.useState(false),R=()=>{T(false),g?.(t??-1);},{className:O,style:L,rest:H}=N(C),B=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{Te.isTop(R)&&R();}}],[P]);hooks.useShortcuts(B),react.useEffect(()=>{I(a);},[a]),react.useEffect(()=>(P?Te.push(R):Te.pop(R),()=>Te.pop(R)),[P]),react.useEffect(()=>{T(true);},[]),react.useEffect(()=>{i&&R();},[i]),react.useEffect(()=>{l!=null&&y(l);},[l]);let D=r||S?.from||ge.Left,$=react.useMemo(()=>{switch(D){case ge.Left:return {from:{x:"-100vw"},to:{x:0}};case ge.Right:return {from:{x:"100vw"},to:{x:0}};case ge.Top:return {from:{y:"-100vh"},to:{y:0}};case ge.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[r,S?.from]),W=pe({from:{...$.from,opacity:0},to:{...$.to,opacity:1},when:P,curve:f||S?.animation||X.EaseInOut,duration:s||S?.speed||.5,watch:["scale","filter"]}),x=react.useMemo(()=>1e4+(o||1)*10,[o]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(_e,{onClick:E=>{P&&R();},when:P,style:{zIndex:x}}),jsxRuntime.jsxs(m,{ref:e,"aria-hidden":!P,className:`--drawer flex cols ${O} --${D.toLowerCase()} fixed`,style:{...L,...W.style,"--m":`${u||S?.margin||0}px`,zIndex:x+1,pointerEvents:p==true?"none":"auto",...p==true?{scale:"0.92",filter:"blur(2px)"}:{}},...H,children:[r==ge.Top||r==ge.Bottom?jsxRuntime.jsx(m,{className:"--handle"}):null,jsxRuntime.jsx(V,{as:"--close-drawer --abs",onClick:R,children:k.close}),jsxRuntime.jsxs(wo,{as:"rel",children:[d||P?b:null,jsxRuntime.jsx(Re,{when:h})]})]})]})};Kr.displayName="Zuz.Drawer";var To=Kr;var Gr=react.forwardRef((e,n)=>{let{progress:t,type:o,animated:r,...s}=e,a=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:p=>{a.current.style.width=`${p*100}%`,a.current.setAttribute("data-value",p+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),react.useEffect(()=>{t&&a.current&&(r?setTimeout(()=>a.current.style.width=`${t*100}%`,500):a.current.style.width=`${t*100}%`,a.current.setAttribute("data-value",t+""));},[t,a.current]);let{className:u,style:f,rest:c}=N(s);return jsxRuntime.jsx(m,{className:`--progress ${r?"--animated":""} flex rel ${u}`.trim(),style:f,...c,children:jsxRuntime.jsx(m,{ref:a,className:"--bar rel"})})});Gr.displayName="Zuz.ProgressBar";var Ze=Gr;var At=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(At||{}),Vt=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(Vt||{}),Ur=(t=>(t.Stack="stack",t.Individual="individual",t))(Ur||{}),qr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var gi=e=>{let{index:n,id:t,type:o,icon:r,title:s,message:a,duration:u,sticky:f=false,actions:c=[],position:p,style:i,isHovered:l,total:g,progress:C,forceClose:S,variant:b,onClick:I,onClose:P}=e,[T,d]=react.useState(false),[v,h]=react.useState(false),{toast:y}=Y(true),R=v||S,O=p||y?.position||"TopCenter",L=o||y?.type||"default",H=i||y?.style||"stack",B=u||y?.duration||4,D=C||y?.progress||false,$=react.useRef(B*1e3),W=react.useRef(void 0),x=react.useRef(void 0),E=react.useRef(null),F=pe({when:T&&!R,duration:.3,transition:y?.transition||(O.includes("Top")?q.SlideInTop:O.includes("Bottom")?q.SlideInBottom:O.includes("Left")?q.SlideInLeft:q.SlideInRight),curve:y?.curve||X.EaseInOut,watch:["transform","opacity","scale","filter"]});react.useEffect(()=>{d(true);let K=oe=>{if(x.current!==void 0){let le=oe-x.current;if(!l&&!f&&!R&&($.current-=le,E.current)){let fe=Math.max(0,$.current/(B*1e3)*100);E.current?.setProgress?.(fe/100);}}x.current=oe,$.current<=0?h(true):W.current=requestAnimationFrame(K);};return W.current=requestAnimationFrame(K),()=>{W.current&&cancelAnimationFrame(W.current);}},[l,f,R,B]),react.useEffect(()=>{if(R){let K=setTimeout(()=>{P?.(t);},350);return ()=>clearTimeout(K)}},[R,t]);let G=H==="stack",_=l?n*65:n*8,Z=l?1:Math.max(.85,1-n*.05),ee=l?1:Math.max(.4,1-n*.2),j=()=>{I?I():(!c||c.length===0)&&h(true);},Q=F.style.transform||"translate(0, 0)",A=R?Q:`${Q} translateY(${O.includes("Top")?_:-_}px) scale(${Z})`;return jsxRuntime.jsxs(m,{onClick:j,as:`--snack --${R?"hidden":"visible"} --${b||y?.variant||U.Medium} --${L} --${O.toLowerCase()} abs flex aic`,style:{...F.style,zIndex:1e3-n,pointerEvents:R?"none":"auto",opacity:R?F.style.opacity:ee,transform:A,filter:!R&&G&&!l&&n>0?"blur(1px)":"none",cursor:!c||c.length===0?"pointer":"default",transition:`${F.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxRuntime.jsx(m,{as:"--ico flex aic jcc",children:r?jsxRuntime.jsx(J,{name:r}):jsxRuntime.jsx(m,{as:"--no-icon"})}),jsxRuntime.jsxs(m,{as:"--meta flex cols",children:[jsxRuntime.jsx(z,{as:"--tt",children:s||qr[o]}),jsxRuntime.jsx(z,{as:"--tm",children:a})]}),c&&c.length>0&&jsxRuntime.jsx(m,{as:"--actions flex gap:5",children:c.map((K,oe)=>jsxRuntime.jsx(V,{as:"--snack-btn bold",onClick:le=>{le.stopPropagation(),K.onClick();},children:K.label},oe))}),D&&jsxRuntime.jsx(Ze,{as:"abs",ref:E})]})},Po=gi;var he=react.createContext(null),wi=({ref:e,...n})=>{let o=react.useContext(he)?.depth??0,[r,s]=react.useState(null),[a,u]=react.useState(null),[f,c]=react.useState(false),[p,i]=react.useState([]),l=hooks.useDelayed(),g=react.useRef(0),C=()=>++g.current,S=()=>{c(false),setTimeout(()=>u(null),200);};react.useImperativeHandle(e,()=>({add(d){let v=C(),h={id:v,...d};return i(y=>[...y,h]),v},openMenu(d){c(false),setTimeout(()=>{u({id:C(),type:"menu",props:d}),c(true);},16);},remove(d){i(v=>v.map(h=>h.id===d?{...h,props:{...h.props,forceClose:true}}:h)),a?.id===d&&S();},loading(d,v){i(h=>h.map(y=>y.id===d?{...y,props:{...y.props,forceLoading:v}}:y)),a?.id===d&&S();},clear(d){i(p.filter(v=>v.type!=d));}})),react.useEffect(()=>{if(a&&f){let d=()=>S();return document.addEventListener("click",d),()=>document.removeEventListener("click",d)}},[a,f,S]);let b=d=>{setTimeout(()=>{i(v=>v.filter(h=>h.id!==d)),a?.id===d&&u(null);},250);},I=react.useMemo(()=>[...p.filter(d=>d.type!="toast")],[p]);if(!l)return null;let P=p.filter(d=>d.type=="toast").reverse(),T=Object.values(Vt);return reactDom.createPortal(jsxRuntime.jsxs(m,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+o},children:[I.map((d,v)=>{let h=v<I.length-1;return d.type==="dialog"?jsxRuntime.jsx(vo,{onClose:b,index:v,id:d.id,...d.props,inBackground:h},`layer-${d.type}-${d.id}`):d.type==="drawer"?jsxRuntime.jsx(To,{onClose:b,index:v,id:d.id,...d.props,inBackground:h},`layer-${d.type}-${d.id}`):null}),T.map(d=>{let v=P.filter(h=>(h.props.position||"TopCenter")===d);return v.length===0?null:jsxRuntime.jsx(m,{onMouseEnter:()=>s(d),onMouseLeave:()=>s(null),as:`--toast-container fixed --${d.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:v.map((h,y)=>jsxRuntime.jsx(Po,{index:y,total:v.length,isHovered:r===d,onClose:b,id:h.id,...h.props},h.id))},d)}),a&&jsxRuntime.jsx(m,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(ho,{onClose:S,when:f,...a.props},`menu-${a.id}`)})]}),document.body)},Si=({children:e})=>{let n=react.useContext(he),t=n?n.depth+1:0,o=react.useRef(null),r=react.useMemo(()=>({add:s=>o.current?.add(s),openMenu:s=>o.current?.openMenu(s),remove:s=>o.current?.remove(s),loading:(s,a)=>o.current?.loading(s,a),clear:s=>o.current?.clear(s),depth:t,isSubLayer:!!n}),[n]);return jsxRuntime.jsxs(he.Provider,{value:r,children:[e,jsxRuntime.jsx(wi,{ref:o})]})},fo=Si;var Ti=()=>{let e=react.useContext(he);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(o,r,s)=>{o.preventDefault(),e.openMenu({event:o,items:r,origin:s});},showMenu:(o,{items:r,origin:s,offsetX:a,offsetY:u,transition:f,curve:c,arrow:p,duration:i,header:l,footer:g})=>{e.openMenu({fx:{transition:f,curve:c,duration:i},parent:o,items:r,origin:s||mt.TopCenter,offsetX:a,offsetY:u,arrow:p,header:l,footer:g});},hide:e.clear}},Pi=Ti;var Ri=()=>{let e=react.useContext(he);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>e.clear("dialog"),t=s=>e.remove(s),o=(s,a)=>e.loading(s,a);return {clearAll:n,show:s=>{let a=e.add({type:"dialog",props:{...s,type:Ye.Dialog}});return {id:a,setLoading:u=>o(a,u),hide:()=>t(a)}},hide:t}},Ni=Ri;var Ei=()=>{let e=react.useContext(he);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let n=()=>e.clear("drawer"),t=s=>e.remove(s),o=(s,a)=>e.loading(s,a),r=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:u=>o(a,u),close:()=>t(a)}};return {clearAll:n,open:s=>r({children:s}),right:s=>r({children:s,from:ge.Right}),left:s=>r({children:s,from:ge.Left}),top:s=>r({children:s,from:ge.Top}),bottom:s=>r({children:s,from:ge.Bottom}),close:t}},ki=Ei;var Mi=(e,n,t={})=>{let[o,r]=react.useState(null),[s,a]=react.useState(false),{duration:u=.25,curve:f=X.EaseOutBack,borderRadius:c={from:40,to:24},targetWidth:p=320}=t;return react.useLayoutEffect(()=>{n&&e.current?(r(e.current.getBoundingClientRect()),a(true)):n||a(false);},[n,e]),{style:pe({from:{opacity:0,width:o?.width,height:o?.height,borderRadius:c.from},to:{opacity:1,width:p,height:"auto",borderRadius:c.to},curve:f,duration:u,when:s&&n}).style,isMeasured:s,sourceRect:o}},Oi=Mi;var Vi=(e,n={})=>{let{offset:t=8,direction:o="bottom",container:r=null,triggerRef:s=null}=n,a=react.useRef(null),u=react.useCallback(()=>{let f=e.current;if(!f)return;let c=s?.current||f.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let p=f.getBoundingClientRect(),i=c.getBoundingClientRect(),l,g;r?(l=r.getBoundingClientRect(),g="absolute"):(window.getComputedStyle(f).position==="fixed"?g="fixed":g="absolute",g==="fixed"?l={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:l={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),f.style.position!==g&&(f.style.position=g),a.current=g;let b=0,I=0;switch(o){case "top":b=i.top-p.height-t,I=i.left,b<l.top&&i.bottom+p.height+t<=l.bottom&&(b=i.bottom+t);break;case "bottom":b=i.bottom+t,I=i.left,b+p.height>l.bottom&&i.top-p.height-t>=l.top&&(b=i.top-p.height-t);break;case "left":b=i.top,I=i.left-p.width-t,I<l.left&&i.right+p.width+t<=l.right&&(I=i.right+t);break;case "right":b=i.top,I=i.right+t,I+p.width>l.right&&i.left-p.width-t>=l.left&&(I=i.left-p.width-t);break}if(b=Math.max(l.top,Math.min(b,l.bottom-p.height)),I=Math.max(l.left,Math.min(I,l.right-p.width)),a.current==="fixed")f.style.top=`${b}px`,f.style.left=`${I}px`;else {let P;f.offsetParent?P=f.offsetParent.getBoundingClientRect():P={top:0,left:0};let T=b-P.top+window.scrollY,d=I-P.left+window.scrollX;f.style.top=`${T}px`,f.style.left=`${d}px`;}},[e,s,t,o,r]);return react.useEffect(()=>{let f=e.current;if(!f)return;let c=s?.current||f.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let p=new ResizeObserver(u);return p.observe(f),c&&p.observe(c),u(),window.addEventListener("resize",u),window.addEventListener("scroll",u,true),()=>{p.disconnect(),c&&p.disconnect(),window.removeEventListener("resize",u),window.removeEventListener("scroll",u,true);}},[e,o,t,r,s]),{postion:a.current,reposition:u}},gt=Vi;var zi=()=>{let e=react.useContext(he);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let n=(i,l)=>e.add({type:"toast",props:{...l,type:i}}),o=i=>e.remove(i),c=(i,l,g)=>{let C=n(i,{...l,sticky:l.sticky??false,actions:[{label:g?.label||"Ok",onClick:()=>{g?.onClick?.(),o(C);}}]});return C},p=(i,l,g,C)=>{let S=n(i,{...l,sticky:true,actions:[{label:C?.label||"Cancel",onClick:()=>{C?.onClick?.(),o(S);}},{label:g?.label||"Ok",onClick:()=>{g?.onClick?.(),o(S);}}]});return S};return {ok:(i,l)=>c("default",i,l),success:(i,l)=>c("success",i,l),error:(i,l)=>c("error",i,l),confirm:(i,l,g)=>p("default",i,l,g),warn:(i,l)=>c("warn",i,l)}},_i=zi;var Zi=()=>{let e=react.useContext(he);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let n=(c,p)=>e.add({type:"toast",props:{...p,type:c}});return {show:(c,p,i,l)=>n("default",{title:c,message:p,icon:i,duration:l}),hide:c=>e.remove(c),success:(c,p,i,l)=>n("success",{title:c,message:p,icon:i,duration:l}),error:(c,p,i,l)=>n("error",{title:c,message:p,icon:i,duration:l}),warn:(c,p,i,l)=>n("warn",{title:c,message:p,icon:i,duration:l}),promise:(c,p,i,l)=>n("promise",{title:c,message:p,icon:i,duration:l}),clearAll:()=>e.clear("toast")}},Io=Zi;var rn=({ref:e,style:n,...t})=>{let o=react.useRef(null),r=react.useMemo(()=>e&&typeof e!="function"&&e.current?e:o,[e]),{style:s,className:a,rest:u}=N(t,r);return jsxRuntime.jsx("div",{ref:e||o,style:{...s,...n||{}},className:a,...u})};rn.displayName="Zuz.Box";var m=rn;var sn=react.forwardRef((e,n)=>{let{title:t,message:o,...r}=e,[s,a]=react.useState(false);return jsxRuntime.jsxs(m,{className:"--accordion flex cols",...r,children:[jsxRuntime.jsxs(V,{onClick:u=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(z,{className:"--label flex",children:t}),jsxRuntime.jsx(m,{className:"--arrow flex",children:s?k.arrowUp:k.arrowDown})]}),s&&jsxRuntime.jsx(m,{className:"--detail",children:o})]})});sn.displayName="Zuz.Accordion";var Xi=sn;var Yi=({label:e,icon:n,onClick:t,idx:o,selected:r})=>jsxRuntime.jsx(V,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${o}`),className:`--action ${r?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsxRuntime.jsx(J,{name:n}):n}),ln=Yi;var cn=react.forwardRef((e,n)=>{let{items:t,name:o,selected:r,position:s,...a}=e,u=react.useRef(null),[f,c]=react.useState(r||t[0].tag||0),p=react.useCallback(({x:b,y:I})=>{if(u.current){let P=u.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${b-P.left}`),document.documentElement.style.setProperty("--tip-y",`${I-P.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),i=react.useCallback(()=>{u.current&&(u.current.removeEventListener("pointerleave",i),u.current.removeEventListener("pointermove",p),document.documentElement.style.setProperty("--tip-s","0"));},[]),l=react.useCallback(()=>{u.current&&(u.current.addEventListener("pointerleave",i),u.current.addEventListener("pointermove",p));},[]);react.useEffect(()=>{u.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((b,I)=>I.label.length>b.length?I.label:b,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),u.current?.addEventListener("pointerenter",l));},[]);let{className:g,style:C,rest:S}=N(a);return jsxRuntime.jsxs(m,{ref:u,style:C,className:[`--actionbar flex aic ${g}`,`${!s||s==me.Auto?"rel":`--${s}`}`].join(" ").trim(),...S,children:[t.map((b,I)=>jsxRuntime.jsx(ln,{selected:f===b.tag||r==I,...b,idx:I},`actionbar-action-${b.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(m,{className:"--tip abs",children:jsxRuntime.jsx(m,{className:"--track flex aic",children:t.map(({label:b})=>jsxRuntime.jsx(m,{className:"--lb",children:b},`tool-tip-${b.toLowerCase().replace(/\s+/g,"-")}`))})})]})});cn.displayName="Zuz.ActionBar";var tl=cn;var pn=react.forwardRef((e,n)=>{let{type:t,icon:o,title:r,message:s,iconSize:a,...u}=e,{className:f,style:c,rest:p}=N(u);return jsxRuntime.jsxs(m,{className:`--alert --${t||we.Info} flex aic ${f}`.trim(),style:c,...p,children:[jsxRuntime.jsx(m,{className:`--icon icon-${o||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!o&&k[t||we.Info]}),jsxRuntime.jsxs(m,{className:"--meta flex cols",children:[jsxRuntime.jsx(z,{className:`--title ${s?"--tm":""}`,children:r||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(z,{className:"--message",h:2,children:s})]})]})});pn.displayName="Zuz.Alert";var nl=pn;var un=({ref:e,...n})=>{let{variant:t,numeric:o,onConfirm:r,...s}=n,{style:a,className:u,rest:f}=N(s),{variant:c}=Y(true),p=i=>{o&&(i.currentTarget.value=i.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${t||c} flex ${u}`.trim(),style:a,onInput:p,onKeyDown:i=>{i.key=="Enter"&&r?.(i.currentTarget.value);},ref:e,...f})};un.displayName="Zuz.Input";var ie=un;var dn=e=>{let{meta:n,children:t}=e,o=hooks.useDelayed(),{label:r,icon:s,...a}=react.isValidElement(n)?{}:n,{className:u,style:f,rest:c}=N({...a,...a.animate?{animate:{...a.animate,when:o}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:f,className:u,children:n}):jsxRuntime.jsxs("li",{style:f,className:u,...c,children:[t,typeof n=="string"?n:r]})};dn.displayName="Zuz.ListItem";var gn=dn;var yn=react.forwardRef((e,n)=>{let{items:t,variant:o,direction:r,seperator:s,ol:a,...u}=e,{className:f,style:c,rest:p}=N(u),i=a==true?"ol":"ul";return react.createElement(i,{className:`--list --${o||U.Small} flex ${r??"cols"} ${f}`.trim(),style:c,ref:n,...p,children:t.map((l,g,C)=>{let S=`${typeof l=="string"?`li-${String(l)}`:react.isValidElement(l)?`li-${l.key}`||`${g}-${core.MD5(l.toString())}`:l.label}-${g}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(gn,{meta:l}),s&&C[g+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${g+1}-${S}`):null]},S)})})});yn.displayName="Zuz.List";var We=yn;var bn=react.forwardRef((e,n)=>{let{fx:t,action:o,data:r,withStyle:s,onChange:a,...u}=e,{className:f}=N({as:s||""}),{style:c}=N(u),[p,i]=react.useState(false),[l,g]=react.useState(r||[]),C=react.useRef(null),S=react.useRef(null),b=react.useRef(null),I=react.useMemo(()=>u.name||core.uuid(12),[]),[P,T]=react.useState(null),[d,v]=react.useState(null),[h,y]=react.useState([]),O=hooks.useDebounce(x=>{x.target.value==""?(i(false),g([])):o&&x.target.value.trim()!=""&&core.withPost(o,{query:x.target.value}).then(E=>{"items"in E&&core._(E.items).isArray()?(g(E.items),v(x.target.value),y(E.items)):console.error("Action Response should contain items array"),T(null);}).catch(E=>{T(null),g([]);});},250),L=()=>{if(S.current){let x=S.current.getBoundingClientRect(),E=window.innerHeight-x.bottom,F=x.top;if(b.current){let G=b.current;E<G.offsetHeight&&F>E?(G.style.top="auto",G.style.bottom=`${x.height}px`,G.style.maxHeight=`${F-150}px`):(G.style.top=`${x.height+5}px`,G.style.bottom="auto",G.style.maxHeight=`${E-150}px`);}}},H=x=>{if(l.length>0){if((x.key==="ArrowDown"||x.key==="ArrowUp")&&(x.preventDefault(),x.stopPropagation()),x.key==="Escape")T(null),i(false),g([]);else if(x.key==="ArrowDown")T(E=>{let F=E===null||E===l.length-1?0:E+1;return D(F),F});else if(x.key==="ArrowUp")T(E=>{let F=E===null||E===0?l.length-1:E-1;return D(F),F});else if(x.key==="Enter"&&P!==null){let E=l[P];C.current&&(C.current.value=E,i(false),g([]));}}},B=x=>{C.current&&(C.current.value=x,i(false),g([]));},D=x=>{let E=l[x];if(E&&C.current&&(C.current.value=E,C.current.setSelectionRange(E.length,E.length)),b.current){let G=b.current.children[x];G&&G.scrollIntoView({block:"nearest"});}},$=x=>{S.current&&!S.current.contains(x.target)&&(i(false),g([]));},W=()=>{C.current&&C.current.value===d&&(g(h),T(null),L());};return react.useEffect(()=>(window.addEventListener("resize",L),window.addEventListener("scroll",L,true),document.addEventListener("mousedown",$),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,true),document.removeEventListener("mousedown",$);}),[]),react.useEffect(()=>{L();},[l]),jsxRuntime.jsxs(m,{style:c,ref:S,className:`--autocomplete --${e.size||U.Small} flex aic rel ${f}`.trim(),children:[jsxRuntime.jsx(ie,{ref:C,autoComplete:"off",onChange:O,onKeyDown:H,onFocus:W,...u}),jsxRuntime.jsx(m,{className:"--arrow rel flex aic jcc",children:l.length>0?k.arrowUp:k.arrowDown}),l.length>0&&jsxRuntime.jsx(We,{id:I,ref:b,className:"--suggestion-list flex cols abs",items:l.map((x,E)=>({label:x,onClick:F=>{F.preventDefault(),F.stopPropagation(),B(x);},className:P===E?"--current":"",animate:{transition:q.SlideInBottom,curve:X.EaseInOut,delay:core.clamp(.02*E,.02,.5)}}))})]})});bn.displayName="Zuz.AutoComplete";var Sl=bn;var vn=react.forwardRef((e,n)=>{let t=react.useRef(null),o=react.useMemo(()=>n&&typeof n!="function"&&n.current?n:t,[n]),{style:r,className:s,rest:a}=N(e,o);return !a.src||a.src==""?null:jsxRuntime.jsx("img",{ref:o,style:r,className:`${s} flex`,...a})});vn.displayName="Zuz.Image";var Ge=vn;var wn=react.forwardRef((e,n)=>{let{src:t,variant:o,type:r,crossOrigin:s,referrerPolicy:a,fx:u,as:f,alt:c,color:p,style:i,...l}=e,[g,C,S]=hooks.useImage(t??"",s,a),{className:b,style:I,rest:P}=N({fx:u,as:f});return jsxRuntime.jsx(m,{className:`--avatar --${o||U.Small} --${(r||cr.Circle).toLowerCase()} rel flex aic jcc ${b}`.trim(),style:{background:p||"var(--primary)",...i,...I},...P,children:t?jsxRuntime.jsx(Ge,{src:g,crossOrigin:s,referrerPolicy:a,...l}):jsxRuntime.jsx(z,{className:"--avatar-label",children:(c?c.charAt(0):"A").toUpperCase()})})});wn.displayName="Zuz.Avatar";var El=wn;var kl=({size:e=5,type:n="dead",label:t="",variant:o=U.Small,loading:r=false,spinner:s,...a})=>{let{style:u,className:f,rest:c}=N(a);return jsxRuntime.jsxs(m,{style:{...core._(t).isEmpty()?{"--badge-size":e}:{},...u},as:`--badge --${o} --${n} rel flex aic jcc ${f}`.trim(),children:[jsxRuntime.jsx(m,{fx:{transition:q.FadeIn,curve:X.Liquid,duration:.5,when:r},as:"abs abc",children:jsxRuntime.jsx(Ce,{type:s})}),core._(t).isEmpty()?jsxRuntime.jsx(m,{as:`--dot --${n}`}):jsxRuntime.jsx(z,{as:"--label",children:t})]})},Ll=kl;var Gl=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>dateFns.format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>dateFns.format(dateFns.addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>dateFns.addDays(new Date,1),getDateFormat:()=>dateFns.format(dateFns.addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let e=new Date,n=e.getDay();return dateFns.addDays(e,(6-n)%7||6)},getDateFormat:()=>{let e=new Date,n=e.getDay();return dateFns.format(dateFns.addDays(e,(6-n)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,2),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,4),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,4)}],Ul=e=>{let n=new Set;return e.filter(t=>{if(t.label=="Later")return true;let o=t.getDate().toISOString().split("T")[0];return n.has(o)?false:(n.add(o),true)})},Cn=react.forwardRef((e,n)=>{let{defaultValue:t,variant:o,onChange:r,...s}=e,{style:a,className:u,rest:f}=N(s),[c,p]=react.useState(t||new Date),i=dateFns.startOfMonth(c),l=dateFns.endOfMonth(c),g=dateFns.startOfWeek(i),C=dateFns.endOfWeek(l),S=react.useMemo(()=>dateFns.eachDayOfInterval({start:g,end:C}),[g,C]),b=T=>{r?.(T),p(T);},I=()=>{p(T=>new Date(T.getFullYear(),T.getMonth()-1));},P=()=>{p(T=>new Date(T.getFullYear(),T.getMonth()+1));};return jsxRuntime.jsxs(m,{as:`--calendar flex --${o||"sm"} ${u}`,style:a,children:[jsxRuntime.jsx(m,{as:"--calendar-quick-select flex cols flex:1",children:Ul(Gl).map(T=>{let d=T.getDate();return jsxRuntime.jsxs(V,{onClick:()=>b(d),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(z,{as:"flex:1",children:T.label}),jsxRuntime.jsx(z,{as:"tar",children:T.getDateFormat()})]},`--dtp-option-label-${T.label}`)})}),jsxRuntime.jsxs(m,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(m,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(z,{as:"flex:1 --calendar-cm bold",children:dateFns.format(c,"MMMM yyyy")}),jsxRuntime.jsx(V,{onClick:I,as:"--calendar-chevron",children:k.chevronUpOutline}),jsxRuntime.jsx(V,{onClick:P,as:"--calendar-chevron",children:k.chevronDownOutline})]}),jsxRuntime.jsxs(m,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(T=>jsxRuntime.jsx(z,{as:"--calendar-day",children:T},`--calendar-hd-${T}`)),S.map((T,d)=>{let v=dateFns.isSameMonth(T,c),h=dateFns.isSameDay(T,c),y=dateFns.isToday(T);return jsxRuntime.jsx(V,{disabled:!v,onClick:()=>b(T),as:["--calendar-day --calendar-dd",`${h?"--calendar-dd-selected":""}`,`${y?"--calendar-dd-current":""}`],children:dateFns.format(T,"d")},`--calendar-day-${d}-${T.getFullYear()}-${T.getMonth()}-${T.getDay()}`)})]})]})]})});Cn.displayName="Zuz.Calendar";var Mo=Cn;var Kt=(t=>(t.Table="table",t.Gooey="gooey",t))(Kt||{});var Rn=({ref:e,...n})=>{let{itemCount:t,itemsPerPage:o,startPage:r,pageRange:s,paginationStyle:a,breakLabel:u,prevLabel:f,nextLabel:c,hash:p,loading:i,seperator:l,renderOnZeroPageCount:g,asDots:C,progressBar:S,onPageChange:b,...I}=n,P=react.useRef(null),T=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),d=react.useCallback(x=>`${core.toHash(x,p||6,T)}${l||""}${T}`,[T]),v=react.useMemo(()=>u||"...",[u]),h=react.useRef(null),[y,R]=react.useState({id:p?r?typeof r=="number"?d(r):r:1:r||1,label:r||1});react.useImperativeHandle(e,()=>({setPage:x=>R(x),getPage:x=>y,setProgress:x=>h.current?.setProgress?.(x),getProgress:()=>h.current?.getProgress?.()??0}),[h.current]);let{style:O,className:L,rest:H}=N(I),B=react.useCallback(x=>typeof x=="number"?x:+x.label,[]);if(!t)throw new Error('"itemCount" prop is required');let D=react.useMemo(()=>Math.ceil(t/o),[t,o]),$=react.useMemo(()=>{let x=[],E=Math.max(B(y)-(s||2),1),F=Math.min(B(y)+(s||2),D);E>1&&x.push({id:p?d(1):1,label:1}),E>2&&x.push({id:-1,label:v});for(let G=E;G<=F;G++)x.push({id:p?d(G):G,label:G});return F<D-1&&x.push({id:-1,label:v}),F<D&&x.push({id:p?d(D):D,label:D}),x},[y]),W=react.useCallback(x=>{let E=x;+E.label<1||+E.label>D||(R(E),b?.(E));},[t,o,y]);return $.length<=1&&(g??false)===false?null:jsxRuntime.jsxs(m,{ref:P,as:`--pagination ${C===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${L}`,children:[jsxRuntime.jsx(m,{as:"flex flex:1 aic --pgt-btns",children:($.length>1?$:[{id:1,label:1},{id:-1,label:v}]).map((x,E,F)=>{let G=(typeof x=="string"?x:x.label)==B(y);return jsxRuntime.jsx(V,{disabled:x.id==-1||B(y)==+x.label,className:G?"--current-page":"",onClick:_=>W(x),children:C===true?S===true&&G?jsxRuntime.jsx(Ze,{ref:h}):"":typeof x=="string"?x:x.label},`--pg-${E}-${x.id}`)})}),jsxRuntime.jsx(m,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(B(y)-1)*o+1} - `,`${Math.min(B(y)*o,t)} of ${t} items`].join(" ")}),jsxRuntime.jsxs(m,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(V,{disabled:B(y)<=1,onClick:x=>W({id:p?d(B(y)-1):B(y)-1,label:B(y)-1}),children:k.chevronLeftOutline}),jsxRuntime.jsx(V,{disabled:$.length<=1||B(y)==B($[$.length-1]),onClick:x=>W({id:p?d(B(y)+1):B(y)+1,label:B(y)+1}),children:k.chevronRightOutline})]})]})};Rn.displayName="Zuz.Pagination";var xt=Rn;function tc(e,n){let{items:t,renderItem:o,effect:r="slide",loop:s=true,loopMode:a="infinite",startIndex:u=0,useKeys:f=true,useWheel:c=true,spacing:p=160,rotation:i=20,scaleStep:l=.15,blur:g=4,animation:C="power",showDots:S=false,autoPlay:b=false,autoPlaySpeed:I=3,onChange:P,...T}=e,{className:d,style:v}=N(T),h=react.useRef(null),y=I/(I>=1e3?1e3:1),R=hooks.useCarousel({total:t.length,initialIndex:u,loop:s,useKeys:f,useWheel:c,onChange:D=>{h.current?.setPage({id:D+1,label:D+1}),h.current?.setProgress(0),P?.(D);}}),{pause:O,resume:L,reset:H}=hooks.useTimer({duration:y,autoStart:b===true,onProgress:D=>{b===true&&h.current?.setProgress(1-D);},onExpired:()=>{b===true&&R.next(),H();}}),B={...v,"--carousel-spacing":`${p}px`,"--carousel-rotation":`${i}deg`,"--carousel-blur":`${g}px`,"--carousel-scale-step":l,"--active-index":R.index,"--carousel-transition":`var(--${C})`};return jsxRuntime.jsxs(m,{ref:n,className:`--carousel --effect-${r} --loop-${a} flex cols aic jcc ${d}`.trim(),style:B,children:[jsxRuntime.jsx(m,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((D,$)=>{let W=$-R.index;if(a==="infinite"){let E=t.length;W=((W+E/2)%E+E)%E-E/2;}let x=$===R.index;return jsxRuntime.jsx(m,{onMouseEnter:()=>x&&O(),onMouseLeave:()=>x&&L(),className:`--carousel-item-wrapper abs ${x?"--is-active":""}`,style:{"--offset":W,zIndex:x?100:100-Math.abs(W),display:Math.abs(W)>5?"none":"flex"},children:o(D,$,R.index)},$)})}),S&&jsxRuntime.jsx(xt,{ref:h,itemCount:t.length,itemsPerPage:1,startPage:u+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:D=>R.goTo(+D.label-1),asDots:true,progressBar:true})]})}var oc=react.forwardRef(tc),rc=oc;var Nn=(n=>(n.Line="line",n))(Nn||{});var kn=react.forwardRef((e,n)=>{let{data:t,width:o,height:r,lineColor:s,strokeWidth:a=2,gradientStartColor:u,gradientEndColor:f,animated:c,animDuration:p=2,animDelay:i=0,padding:l=0,type:g,...C}=e,{className:S,style:b,rest:I}=N(C),P=react.useRef(null),T=hooks.useResizeObserver(P.current?.parentElement||P),d=typeof o=="number"?o:T.width,v=typeof r=="number"?r:T.height,h={width:d,height:v},y=react.useId(),{pathD:R,areaPathD:O}=hooks.useLineChart(t,h,l+(a||2)),L=react.useRef(null),H=react.useRef(null),[B,D]=react.useState(0),[$,W]=react.useState(0);return react.useEffect(()=>{c&&(L.current&&D(L.current.getTotalLength()),H.current&&W(H.current.getTotalLength()));},[c,R,O,d,v]),jsxRuntime.jsx(m,{ref:P,as:`--chart --${g||"line"}-chart ${S}`.trim(),style:{...b,width:o,height:r},...I,children:d>0&&v>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${d} ${v}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:y,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:u}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:f})]})}),jsxRuntime.jsx("path",{ref:H,d:O,fill:`url(#${y})`,stroke:"none",style:c?{strokeDasharray:$,strokeDashoffset:$}:{},children:c&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:$,to:"0",dur:`${p||2}s`,begin:`${i||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:L,d:R,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:c?{strokeDasharray:B,strokeDashoffset:B}:{},children:c&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:B,to:"0",dur:`${p||2}s`,begin:`${i||0}s`,fill:"freeze"})})]})})});kn.displayName="Zuz.Chart";var mc=kn;var Ln=(r=>(r[r.Sending=0]="Sending",r[r.Sent=1]="Sent",r[r.Delivered=2]="Delivered",r[r.Read=3]="Read",r))(Ln||{}),Mn=(c=>(c.Image="img",c.Video="vid",c.Audio="audio",c.Link="link",c.Document="doc",c.Location="loc",c.Contact="contact",c.Event="event",c.Poll="poll",c))(Mn||{});var On=react.forwardRef((e,n)=>{let{text:t,media:o,side:r="me",status:s=1,timeStamp:a=Date.now(),arrow:u=true,...f}=e,{className:c,style:p,rest:i}=N(f);return jsxRuntime.jsx(m,{className:`--bubble-wrapper flex --bw-${r}`.trim(),children:jsxRuntime.jsxs(m,{className:`--bubble --bubble-${r} ${o?`--with-media --bma-${o.type}`:""} rel flex cols ${u==true?"--b-arrow":""} ${c}`.trim(),style:{...p},...i,children:[t&&jsxRuntime.jsx(z,{className:"--bubble-text",children:t}),o?o.type=="audio"?jsxRuntime.jsxs(m,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(ne,{className:"--bm-action",children:k.play}),jsxRuntime.jsx(Ze,{progress:.7}),jsxRuntime.jsx(z,{className:"--bm-dur",children:o.duration??"00:13"})]}):o.type=="img"?jsxRuntime.jsx(m,{as:"--bubble-image",children:jsxRuntime.jsx(Ge,{src:o.source})}):null:null,jsxRuntime.jsxs(m,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(z,{className:"--bubble-stamp tar",children:core.timeSince(a)}),r=="me"&&jsxRuntime.jsx(ne,{className:`--bubble-status --bs-${s}`,children:s==0?k.pending:s==1?k.done:s==2?k.doneAll:k.doneAll})]})]})})});On.displayName="Zuz.Bubble";var fc=On;var Dn=react.forwardRef((e,n)=>{let{style:t,className:o,rest:r}=N(e);return jsxRuntime.jsx("label",{ref:n,style:t,className:o,...r})});Dn.displayName="Zuz.Label";var bt=Dn;var Hn=react.forwardRef((e,n)=>{let{name:t,required:o,type:r,value:s,size:a,variant:u,checked:f,onSwitch:c,...p}=e,[i,l]=react.useState(f||false),g=react.useRef(null),{variant:C}=Y(true);return react.useImperativeHandle(n,()=>({setChecked(S,b=true){l(S),g.current&&(g.current.checked=S),b&&c&&c(S,s||"cb");},toggle(S=true){g.current&&(g.current.checked=!i),S&&c&&c&&c(!i,s||"cb"),l(!i);}})),jsxRuntime.jsxs(bt,{className:`--${(r||ke.Default).toLowerCase()} ${!r||r==ke.Default?"--checkbox":"--switch"} --${u||C||U.Small} flex aic jcc ${i?"is-checked":""} rel`.trim(),...p,children:[(!r||r==ke.Default)&&k.check,jsxRuntime.jsx(ie,{ref:g,defaultChecked:i,value:s||"cb",type:"checkbox",className:"abs",name:t,required:o||false,onChange:S=>{c&&c(S.target.checked,s||"cb"),l(S.target.checked);}})]})});Hn.displayName="Zuz.CheckBox";var vt=Hn;var Tc=({ref:e,...n})=>{let{code:t,copy:o,lang:r="tsx",showLines:s=false,highlight:a="",as:u,fx:f,...c}=n,p=react.useRef(null),{className:i,style:l,rest:g}=N({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${u}`,fx:f},p),C=react.useMemo(()=>{let b=new Set;return a.split(",").forEach(I=>{if(I.includes("-")){let[P,T]=I.split("-").map(Number);for(let d=P;d<=T;d++)b.add(d);}else I&&b.add(Number(I));}),b},[a]),S=react.useMemo(()=>{let b=t.split(`
|
|
10
|
+
`);for(;b.length>0&&b[0].trim()==="";)b.shift();for(;b.length>0&&b[b.length-1].trim()==="";)b.pop();let I=b[0]?.match(/^\s*/)?.[0].length||0,P=b.map(d=>{let v=d.match(/^\s*/)?.[0].length||0,h=Math.min(v,I);return d.slice(h)}),T=[{name:"comm",re:/\/\/.*/g},{name:"str",re:/(["'`])(?:(?=(\\?))\2.)*?\1/g},{name:"key",re:/\b(const|let|var|export|default|import|from|return|if|else|switch|case|break|as|type|interface|class|extends|await|async|new|void|typeof)\b/g},{name:"tag",re:/(<\/?[A-Z][\w\.]*|>)/g},{name:"var",re:/(?<!<\/|<)\b[A-Z]\w*\b/g},{name:"fn",re:/\b([a-z_]\w*)(?=\s*\()/gi},{name:"prop",re:/\.([a-z_]\w*)\b/gi},{name:"num",re:/\b\d+\b(?![#|A-Z|a-z|_|ZUZ])/g}];return P.map((d,v)=>{let h=d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),y=C.has(v+1);if(r!="plain"){let R=[];T.forEach(O=>{h=h.replace(O.re,L=>{let H=`ZUZ_ID_${R.length}_ZUZ`;return R.push(`<span class="--token-${O.name}">${L}</span>`),H});});for(let O=R.length-1;O>=0;O--)h=h.replace(`ZUZ_ID_${O}_ZUZ`,R[O]);}return `<div class="--code-line ${s==true?"--with-ln":""} ${y?"--is-highlighted":""}">
|
|
11
|
+
${s==true?`<span class="--line-number">${v+1}</span>`:""}
|
|
12
|
+
<span class="--line-content">${h||" "}</span>
|
|
13
|
+
</div>`}).join("")},[t,C]);return jsxRuntime.jsxs(m,{as:`--code-block rel ${i}`,style:l,...c,children:[jsxRuntime.jsx("pre",{ref:e,children:jsxRuntime.jsx("code",{className:`--code --lang-${r}`,dangerouslySetInnerHTML:{__html:S}})}),o&&jsxRuntime.jsx(V,{as:"--copy-code abs",onClick:()=>{core.copyToClipboard(t),o.onCopy?.();},children:"Copy"})]})},Pc=Tc;var Vn=({onSelect:e,meta:n,selected:t,disabled:o=false})=>{let r=react.useRef(null),{index:s,icon:a,label:u}=n,[f,c]=react.useState({x:0,width:0}),p=hooks.useDelayed();return react.useLayoutEffect(()=>{if(p&&r.current){let{width:i,x:l}=r.current.getBoundingClientRect();c({x:l,width:i}),t&&e(s,i,l,n,true);}},[p,r.current]),react.useEffect(()=>{t&&e(s,f.width,f.x,n,false);},[t]),jsxRuntime.jsxs(V,{disabled:o,onClick:()=>e(s,f.width,f.x,n,false),ref:r,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsxRuntime.jsx(J,{name:a,as:"--segment-icon"}):jsxRuntime.jsx(m,{as:"--segment-icon flex aic jcc",children:a}):null,u&&String(u).trim()!=""&&jsxRuntime.jsx(m,{className:"--segment-label",children:u||`Item ${s}`})]})};Vn.displayName="SelectTabItem";var $n=Vn;var _n=react.forwardRef((e,n)=>{let{fx:t,items:o,selected:r,variant:s,disabled:a=false,onSwitch:u,...f}=e,[c,p]=react.useState(r||0),i=hooks.useDelayed(50),l=react.useRef(c),{className:g,style:C,rest:S}=N(f),b=react.useRef(null),I=react.useRef(null),{variant:P}=Y(true),T=(d,v,h,y,R)=>{if((R||c!=d&&c!=-2)&&(p(d),l.current=c,queueMicrotask(()=>{i&&u?.(y);})),b.current){let O=I.current?.getBoundingClientRect();b.current.style.setProperty("--w",`${v}px`),b.current.style.setProperty("--x",`${O?h-O.left:h}px`);}};return react.useImperativeHandle(n,()=>({setSelected:d=>{typeof d=="number"&&d!=c&&p(d);}}),[c]),jsxRuntime.jsxs(m,{ref:I,"data-selected":c,className:`${g} --segmented --${s||P||U.Medium} flex aic rel`,style:C,...S,children:[jsxRuntime.jsx(m,{ref:b,className:`--segment-tab --${a?"disabled":"abled"} abs`}),o.map((d,v)=>jsxRuntime.jsx($n,{disabled:a,onSelect:T,selected:c==v,meta:{...d,index:v}},`segment-${d.label}-${v}`))]})});_n.displayName="Zuz.SelectTabs";var wt=_n;var Kn=react.forwardRef((e,n)=>{let{type:t,...o}=e,r=hooks.useDelayed(),{colorScheme:s,setColorScheme:a}=uo(),u=react.useCallback(()=>{a(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:f,style:c}=N(o),p=react.useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:k.colorSchemeLight},{tag:"system",index:1,label:"",icon:k.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:k.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:k.colorSchemeLight},{tag:"dark",index:2,label:"",icon:k.colorSchemeDark}],[]),i=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !r||i==-1?null:t=="system"||t=="switch"?jsxRuntime.jsx(wt,{className:`--color-scheme --${t}`,onSwitch:({tag:l})=>{a(l);},selected:i,items:p,...o}):jsxRuntime.jsx(V,{onClick:u,style:c,as:`--color-scheme-switch --${o.variant||U.Small} ${f}`.trim(),children:s=="system"?k.colorSchemeSystem:s=="light"?k.colorSchemeLight:k.colorSchemeDark})});Kn.displayName="Zuz.ColorScheme";var _c=Kn;var Gn=react.forwardRef((e,n)=>{let[t,o]=react.useState("wait"),{title:r,message:s,acceptLabel:a,rejectLabel:u,position:f}=e,c=async p=>{o(p==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(p));};return react.useEffect(()=>{let p=localStorage.getItem("--ccnt");o(p?p=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(m,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:X.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${f||me.Left} flex cols`,children:[jsxRuntime.jsx(z,{as:"--title",children:r||"This site uses cookies"}),jsxRuntime.jsx(z,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(m,{as:"--footer flex aic",children:[jsxRuntime.jsx(V,{onClick:p=>c(1),as:"--accept",children:a||"Accept All"}),jsxRuntime.jsx(V,{onClick:p=>c(0),as:"--reject",children:u||"Cancel"})]})]})});Gn.displayName="Zuz.CookiesConsent";var Wc=Gn;var Xn=({ref:e,...n})=>{let {title:t,position:o,margin:r=4,anchorName:s="--tooltip-anchor",children:a,show:u,variant:f,...c}=n,{style:p,className:i,rest:l}=N(c),g=o||me.Top;react.useRef(null);let [S,b]=react.useState(false);react.useRef(6);let P=u===true||S,d=`--anchor-${react.useId().replace(/:/g,"")}`,{tooltip:v}=Y(true),h=react.useMemo(()=>{let R=false;return react$1.addPropsToChildren(a,O=>{let L=O.props.className?.includes(s);return L&&(R=true),L||!R},(O,L)=>{let H=L.props.className?.includes(s),B=O===0,D={};return (H||B)&&(D.style={...L.props.style,anchorName:d}),B&&(D.onMouseEnter=$=>{b(true),L.props.onMouseEnter?.($);},D.onMouseLeave=$=>{b(false),L.props.onMouseLeave?.($);}),D})},[a,s,d]),y=pe({transition:g==me.Top?q.SlideInTop:g==me.Bottom?q.SlideInBottom:g==me.Left?q.SlideInLeft:q.SlideInRight,when:P,duration:.2,offset:r+6,margin:g==me.Top||g==me.Left?-r:r,curve:v?.curve||X.EaseInOut});return react.useImperativeHandle(e,()=>({show:()=>b(true),hide:()=>b(false),setPosition:()=>{}})),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[h,jsxRuntime.jsx(m,{style:{positionAnchor:d,...y.style,...g===me.Top||g===me.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${P} --${f||v?.variant||U.Small} --${g} abs ${i}`.trim(),children:typeof t=="string"?jsxRuntime.jsx(z,{as:"--text rel",children:t}):t})]})};Xn.displayName="Zuz.ToolTip";var _o=Xn;var Yn=({ref:e,...n})=>{let {type:t,value:o=0,min:r=0,max:s=1,step:a=.01,onChange:u,showGhostBar:f,showKnobOnHover:c,showToolTip:p,roundValue:i,formatValue:l,...g}=n,{className:C,style:S,rest:b}=N(g),I=react.useRef(a||.01).current,P=react.useRef(r||0).current,T=react.useRef(s||1).current,d=react.useRef(o||0).current,v=react.useRef(null),h=react.useRef(null),y=react.useRef(null),R=react.useRef(null);react.useRef(null);let L=react.useRef(null),H=react.useRef(null),B=react.useRef(null),D=react.useRef(null),$=(re,se,be)=>(re-se)/(be-se)*100,W=re=>{if(h.current){let se=parseFloat(re.currentTarget.value);Q(se);let be=$(se,parseFloat(re.currentTarget.min),parseFloat(re.currentTarget.max));h.current.style.setProperty("--value",`${be}`),h.current.setAttribute("data-value",`${se}`),u&&u(i?+se.toFixed(2):se);}},[x,E]=react.useState(false),[F,G]=react.useState(0),[_,Z]=react.useState(0),[ee,j]=react.useState(false),Q=async re=>{let se=l?l(+re):i?(+re).toFixed(2):Math.round(+re);B.current&&(B.current.textContent=String(se));},K=re=>{if(x){let se=re.clientX-F,be=T-P,Ie=se/200*be,de=Math.max(P,Math.min(_+Ie,T));if(de=Math.round(de/I)*I,Q(de),h.current){let lt=$(de,P,T);h.current.style.setProperty("--value",`${lt}`),h.current.setAttribute("data-value",`${de}`),H.current&&(H.current.textContent=i?de.toFixed(2):de.toString()),u&&u(de);}}},oe=()=>{E(false),document.body.style.cursor="auto";},le=re=>(re-P)/(T-P)*100,fe=re=>{if(!h.current)return;let se=h.current.getBoundingClientRect(),be=re.clientX-se.left,it=Math.max(0,Math.min(100,be/se.width*100));if(p&&B.current){let Ie=v.current?+v.current.value:o;Q(Ie*100);}if(f){let Ie=le(v.current?+v.current.value:o),de=Math.min(Ie,it),lt=Math.abs(it-Ie);h.current.style.setProperty("--ghost-start",`${de}`),h.current.style.setProperty("--ghost-width",`${lt}`);}};react.useEffect(()=>{h.current&&h.current.style.setProperty("--value",v.current?`${$(parseFloat(v.current.value),parseFloat(v.current.min),parseFloat(v.current.max))}`:d.toString());},[]),react.useEffect(()=>(x?(document.addEventListener("mousemove",K),document.addEventListener("mouseup",oe)):(document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",oe)),()=>{document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",oe);}),[x]),react.useEffect(()=>{let re=$(o,P,T);h.current?.style.setProperty("--value",`${re}`),Q(o);},[o,P,T,B.current]);let te=()=>jsxRuntime.jsxs(m,{ref:h,onMouseEnter:()=>j(true),onMouseLeave:()=>j(false),onMouseMove:fe,className:`--slider --${t||so.Default} ${c?"--knob-hover":""} flex rel ${C}`.trim(),style:{...S},children:[jsxRuntime.jsx(m,{ref:L,className:"--slider-track abs fill"}),f&&jsxRuntime.jsx(m,{ref:R,className:"--slider-ghost abs fill"}),jsxRuntime.jsx(m,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsxRuntime.jsx(m,{ref:y,className:"--slider-knob --tooltip-knob abs"}),jsxRuntime.jsx(ie,{ref:v,onInput:W,className:"abs fill",tabIndex:0,type:t||so.Default,defaultValue:d||0,step:I,max:T,min:P})]});if(p===true){let re=l?l(o):i?o.toFixed(2):o;return jsxRuntime.jsx(_o,{ref:D,show:x,position:ct.Top,margin:15,anchorName:"--tooltip-knob",title:jsxRuntime.jsx(ne,{ref:B,children:re}),children:te()})}return te()};Yn.displayName="Zuz.Slider";var je=Yn;var jn=react.forwardRef((e,n)=>{let{src:t,shape:o,size:r,...s}=e,{style:a,className:u,rest:f}=N(s),{canvasRef:c,crop:p,setScale:i,handleMouseDown:l,handleMouseUp:g,handleMouseMove:C}=hooks.useImageCropper(t,r||200,o||hooks.CropShape.Circle);return react.useImperativeHandle(n,()=>({getCropped(){return p()},setScale(S){i(S);}})),jsxRuntime.jsxs(m,{as:`--cropper --${o||hooks.CropShape.Circle} ${u}`,style:a,...f,children:[jsxRuntime.jsx("canvas",{ref:c,width:r||200,height:r||200,onMouseDown:l,onMouseUp:g,onMouseLeave:g,onMouseMove:C}),jsxRuntime.jsx(m,{as:"--cropper-slider",children:jsxRuntime.jsx(je,{onChange:S=>i(S),min:0,max:1,step:.01,value:1})})]})});jn.displayName="Zuz.Cropper";var rm=jn;var sm=(t=>(t.Circle="circle",t.Square="square",t))(sm||{});var es=react.forwardRef((e,n)=>{let{items:t,maxItems:o}=e,r=react.useMemo(()=>{let u=typeof t=="string",f=u?[]:t;return u&&t.split(",").forEach(c=>{f.push({label:c});}),f},[t]),a=react.useMemo(()=>o&&o>0&&r.length>o-1,[r,o])?[...r.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...r.slice(-o)]:r;return jsxRuntime.jsx(We,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(m,{as:"--crumb-chevron",children:k.chevronRightOutline}),items:a.map((u,f,c)=>u.ID=="."?jsxRuntime.jsx(m,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(m,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${f}`))}):jsxRuntime.jsxs(V,{onClick:()=>u.action?.(),className:"--crumb-item",disabled:!c[f+1],children:[u.icon&&jsxRuntime.jsx(J,{as:"--crumb-icon",name:u.icon}),jsxRuntime.jsx(z,{as:"--crumb-label",children:u.label})]},`${u.label.replace(/\s+/g,"-").toLowerCase()}-${f}`))})});es.displayName="Zuz.Crumb";var im=es;var rs=react.forwardRef((e,n)=>{let{icon:t,defaultValue:o,value:r,size:s,variant:a,numeric:u,type:f,onConfirm:c,...p}=e,[i,l]=react.useState(false),[g,C]=react.useState(o||null),{style:S,className:b,rest:I}=N(p),P=react.useRef(null),T=react.useRef(null),{reposition:d}=gt(T,{direction:me.Bottom,offset:2}),v=y=>{u&&(y.currentTarget.value=y.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let y=R=>{let O=R.target,L=P.current?.contains(O),H=T.current?.contains(O);!L&&!H&&l(false);};return i&&document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y);}},[i]),react.useEffect(()=>{let y=R=>{R.key==="Escape"&&i&&(l(false),P.current?.focus());};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[i]);let h=()=>{l(true);};return react.useEffect(()=>{i&&d();},[i,d]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(m,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${b}`,"data-value":g?g.toISOString():"",children:[t?typeof t=="string"?jsxRuntime.jsx(J,{as:"mr:10 c:#666",name:t}):t:jsxRuntime.jsx(ne,{as:"--date-picker-icon flex aic jcc",children:k.calendar}),jsxRuntime.jsx("input",{ref:P,value:g?dateFns.format(g,"EEE, MMM d YYY hh:mm a"):r||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:S,onFocus:h,onInput:v,autoComplete:"new-password",onKeyDown:y=>{y.key=="Enter"&&c?.(y.currentTarget.value);},...I}),jsxRuntime.jsx(m,{"aria-hidden":!i,ref:T,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:i,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsxRuntime.jsx(Mo,{defaultValue:g,onChange:y=>{C(y),l(false);}})})]})})});rs.displayName="Zuz.DatePicker";var pm=rs;var ns=react.forwardRef((e,n)=>{let{icon:t,variant:o,position:r}=e;return jsxRuntime.jsx(V,{className:`--fab fixed --${o||U.Large} --${r||"bottomright"}`,children:t||k.plus})});ns.displayName="Zuz.Fab";var gm=ns;var ss=e=>{let{names:n,strength:t}=e,o={[Nt.Gooey]:r=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:r||10,result:"blur"}),jsxRuntime.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsxRuntime.jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${Nt.Gooey}`)};return react.useEffect(()=>{},[n]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(n||[Nt.Gooey]).map(r=>o[r](t))})})};ss.displayName="Zuz.Filters";var xm=ss;var as=({cols:e,gap:n,aic:t,jcc:o,className:r="",style:s,...a})=>{let u=["--flex",e?"--cols":"",t?"--aic":"",o?"--jcc":"",r].filter(Boolean).join(" "),f={...s,gap:typeof n=="number"?`${n}px`:n};return jsxRuntime.jsx(m,{...a,className:u,style:f})};as.displayName="Zuz.FlexBox";var Ae=as;var Ve=null,xe=null,ls=react.forwardRef((e,n)=>{let{title:t,message:o,transition:r,curve:s,speed:a,type:u,actionPosition:f,spinner:c,loadingMessage:p,onShow:i,onHide:l,...g}=e,{className:C,style:S,rest:b}=N(g),[I,P]=react.useState(t||""),[T,d]=react.useState(o||""),[v,h]=react.useState(null),[y,R]=react.useState(u||Se.Default),O=react.useMemo(()=>core.uuid(12),[]),[L,H]=react.useState(false),B=react.useRef(null),D=react.useRef(null),[$,W]=react.useState(false),[x,E]=react.useState(true),F=react.useRef(null),G=T;react.useImperativeHandle(n,()=>({setLoading(Z){W(Z);},showDialog(Z,ee,j,Q){Ve&&(clearTimeout(Ve),xe&&clearTimeout(xe),B.current.classList.remove("--wobble"),setTimeout(()=>B.current.classList.add("--wobble"),50),xe=setTimeout(()=>{B.current.classList.remove("--wobble"),xe=null;},500)),R(Se.Dialog),ee&&d(ee),Z&&P(Z),j&&h(j.reduce((A,K)=>(A.push({...K,key:K.key||core.uuid(12)}),A),[])),H(true),setTimeout(()=>Q?Q():()=>{},1e3);},dialog(Z,ee,j,Q){Ve&&(clearTimeout(Ve),xe&&clearTimeout(xe),B.current.classList.remove("--wobble"),setTimeout(()=>B.current.classList.add("--wobble"),50),xe=setTimeout(()=>{B.current.classList.remove("--wobble"),xe=null;},500)),R(Se.Dialog),d(ee),P(Z),j&&h(j.reduce((A,K)=>(A.push({...K,key:K.key||core.uuid(12)}),A),[])),H(true),setTimeout(()=>Q?Q():()=>{},1e3);},error(Z,ee){this.show(Z,ee,Se.Error);},warn(Z,ee){this.show(Z,ee,Se.Warn);},success(Z,ee){this.show(Z,ee,Se.Success);},show(Z,ee,j){Ve&&(clearTimeout(Ve),xe&&clearTimeout(xe),D.current=B.current.style.transform,B.current.style.transform="",B.current.classList.remove("--wobble"),setTimeout(()=>{B.current.classList.add("--wobble"),B.current.style.transform=`${D.current} scale(.9)`.trim();},50),xe=setTimeout(()=>{B.current.classList.remove("--wobble"),B.current.style.transform=D.current||"",xe=null;},500)),Ve=setTimeout(()=>{H(false),Ve=null,xe=null;},(ee||4)*1e3),R(j||Se.Default),d(Z),H(true),i?.();},hide(){H(false),l?.();}}));let _=react.useMemo(()=>{let Z={when:L,duration:a||.3,delay:.1};if(y==Se.Dialog){if(r){let{from:ee,to:j}=pt(r,20);return {from:ee,to:j,curve:s||X.EaseInOut,...Z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:X.Spring,...Z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:X.Spring,...Z}},[L,y]);return react.useEffect(()=>{F.current&&clearTimeout(F.current),L?E(true):F.current=setTimeout(()=>E(false),1e3);},[L]),y==Se.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(_e,{when:L}),jsxRuntime.jsxs(m,{className:`--sheet --sheet-${y.toLowerCase()} ${L?"is-visible":""} ${C} fixed`.trim(),style:S,fx:_,...b,ref:B,children:[jsxRuntime.jsx(Re,{when:$,spinner:c,message:p}),jsxRuntime.jsxs(m,{className:"--head flex aic rel",children:[jsxRuntime.jsx(m,{className:`--${I?"title":"dot"} flex aic rel`,children:I||""}),jsxRuntime.jsx(V,{onClick:Z=>H(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(m,{className:`--body flex aic rel ${v?"":"--no-action"}`.trim(),children:x?G:null}),v&&jsxRuntime.jsx(m,{className:`--footer flex aic rel ${f?f==no.Center?"jcc":"":"jce"}`.trim(),children:v.map((Z,ee)=>jsxRuntime.jsx(V,{onClick:j=>Z.handler?Z.handler():Z.onClick?Z.onClick():console.log("onClick Handler missing"),className:"--action",children:Z.label},`sheet-${O}-action-${Z.key}`))})]})]}):jsxRuntime.jsx(m,{className:`--sheet --sheet-${y.toLowerCase()} ${C} abs`.trim(),style:S,...b,fx:_,ref:B,children:L?T:null})}),Ct=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;ls.displayName="Zuz.Sheet";var Tm=ls;var cs=({ref:e,...n})=>{let{name:t,cover:o,spinner:r,errors:s,action:a,children:u,withData:f,beforeSubmit:c,onSubmit:p,onError:i,onSuccess:l,resetOnSuccess:g,...C}=n,{className:S,style:b,rest:I}=N(C),[P,T]=react.useState(false),d=react.useRef(null),v=react.useRef(null),h=react.useRef(null),y=Io(),R=react.useCallback(x=>d.current?d.current.querySelectorAll(x):[],[d.current]),O=x=>({name:x.name||x.getAttribute("name")||x.getAttribute("data-name"),required:x.required?true:x.getAttribute("data-required")?x.getAttribute("data-required")=="true":false,with:x.with||x.getAttribute("with")}),L=x=>{let E=[];return x.querySelectorAll(".--input").forEach(F=>{E.push(F.value);}),E.join("")},H=react.useCallback(x=>{let{required:F}=O(x);if(F){if(x.type=="checkbox"&&x.checked==false)return false;if(x.classList.contains("--otp")){let _=L(x);if(_==""||_.length<parseInt(x.getAttribute("data-size")))return false}if(x.classList.contains("--select")&&x.querySelector("button.--selected").dataset.value=="-1"||x.value=="")return false}if(x.getAttribute("with")){let _=x.getAttribute("with");switch(_.includes("@")&&(_=_.split("@")[0],_=="match"&&(_=Le.MatchField)),_.toUpperCase()){case Le.IPV4:return core._(x.value).isIPv4();case Le.IPV6:return core._(x.value).isIPv6();case Le.Email:return core._(x.value).isEmail();case Le.Uri:try{return new URL(x.value),!0}catch{return false}case Le.Password:return console.log("Add FORMVALIDATION.Password"),false;case Le.MatchField:let[Z,ee,j]=x.getAttribute("with").split("@"),Q=document.querySelector(`[name=${ee.trim()}]`);if(!Q)return false;switch(j||"direct-match"){case "if-not-empty":if(Q&&!core._(Q.value).isEmpty()&&Q.value!=x.value)return false;break;case "direct-match":if(Q&&Q.classList.contains("--otp")&&x.classList.contains("--otp")&&L(Q)!=L(x))return false;if(Q&&Q.value!=x.value)return false;break}break;default:return true}}return true},[d.current]),B=react.useCallback(()=>{let x={},E={},F=null,G=null;if(Array.from(R("[name]")).forEach(_=>{let{name:Z,required:ee,with:j}=O(_),Q=true;(ee||j)&&(Q=H(_)),x[Z]={valid:Q,value:_.type=="checkbox"?_.checked==true?_.value:false:_.classList.contains("--otp")?L(_):_.classList.contains("--select")?_.querySelector("button.--selected").dataset.value:_.value},E[Z]=_.type=="checkbox"?_.checked==true:_.classList.contains("--otp")?L(_):_.classList.contains("--select")?_.querySelector("button.--selected").dataset.value:_.value,Q?_.classList.remove("input-with-error"):(F==null&&s&&(F=_,G=s[Z]),_.classList.add("input-with-error"));}),F){let _=F;if(_.classList.contains("--otp"))for(let Z of Array.from(_.querySelectorAll(".--input"))){let ee=Z;if(ee.value==""){ee.focus();break}}else _.focus();}return {error:F!=null,errorMsg:G||"Fix errors to continue...",data:x,payload:E}},[d.current]),D=react.useCallback(()=>{let{error:x,errorMsg:E,payload:F}=B();x?y.error(E):a?react.startTransition(async()=>{c&&c(F),Ct(o)?o.setLoading(true):T(true),y.clearAll(),core.withPost(a,{...F,...f||{}}).then(G=>{let _=G;Ct(o)?o.setLoading(false):T(false),g&&Array.from(R("[name]")).forEach(Z=>{Z instanceof HTMLInputElement&&(Z.value="");}),l?l(_):(y.clearAll(),y.success(_.message||"Redirecting..."));}).catch(G=>{Ct(o)?o.setLoading(false):T(false),i?i(G):y.error(G.message||"We cannot process your request at this time.");});}):p&&p(F);},[a,v.current,d.current]),$=react.useCallback(()=>{let x=R("[type=submit]");!x||x.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):x.forEach(E=>{E.addEventListener("click",D);});},[d.current]),W=react.useMemo(()=>react$1.addPropsToChildren(u,x=>x.props.type=="submit",x=>({ref:h})),[u]);return react.useImperativeHandle(e,()=>({setLoading(x){if(x){v.current?.hide();try{y.clearAll();}catch{}}T(x);},showError(x){typeof x=="string"?y.error(x):v.current.error(x,4);},hideError(){v.current.hide();try{y.clearAll();}catch{}},init(){$();},submit(){D();}})),react.useEffect($,[]),jsxRuntime.jsxs(m,{ref:d,style:b,className:`--form flex rel ${S} ${t?`--form-${t.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!Ct(o)&&jsxRuntime.jsx(Re,{message:o?o.message||void 0:"working",spinner:r,color:o&&"color"in o?o.color:"#ffffff",when:P}),W]})};cs.displayName="Zuz.Form";var Mm=cs;var ms=e=>{let {ref:n,cols:t,rows:o,gap:r,gapX:s,gapY:a,align:u,justify:f,inline:c,flow:p,autoCols:i,autoRows:l,template:g,...C}=e;react.useRef(null);let {className:b,style:I,rest:P}=N(C),T=v=>typeof v=="number"?`repeat(${v}, 1fr)`:v,d={display:c?"inline-grid":"grid",gridTemplateColumns:T(t),gridTemplateRows:T(o),gap:r,columnGap:s,rowGap:a,alignItems:u,justifyContent:f==="between"?"space-between":f==="around"?"space-around":f,gridAutoFlow:p,gridAutoColumns:i,gridAutoRows:l,gridTemplateAreas:g,...I};return jsxRuntime.jsx(m,{ref:n,as:`--grid ${b}`.trim(),style:d,...P})};ms.displayName="Zuz.Grid";var Am=ms;var ps=e=>typeof e=="string"&&e.includes("+"),us={command:"\u2318",shift:"\u21E7",ctrl:"\u2303",option:"\u2325",enter:"\u21B5",delete:"\u232B",escape:"\u238B",tab:"\u21E5",capslock:"\u21EA",up:"\u2191",right:"\u2192",down:"\u2193",left:"\u2190",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2196",end:"\u2198",help:"?",space:"\u2423",fn:"Fn",win:"\u2318",alt:"\u2325"},fs={command:"Command",shift:"Shift",ctrl:"Control",option:"Option",enter:"Enter",delete:"Delete",escape:"Escape",tab:"Tab",capslock:"Caps Lock",up:"Up",right:"Right",down:"Down",left:"Left",pageup:"Page Up",pagedown:"Page Down",home:"Home",end:"End",help:"Help",space:"Space",fn:"Fn",win:"Win",alt:"Alt"};var gs=react.forwardRef(({children:e,keys:n,as:t,className:o,variant:r},s)=>{let{variant:a}=Y(true),u=react.useMemo(()=>{if(ps(n)){let f=null;return {keys:String(n).split("+").reduce((p,i,l,g)=>(g[l+1]?p.push(i):f=i.toUpperCase(),p),[]),children:f}}return {keys:n,children:String(e).toUpperCase()}},[n]);return jsxRuntime.jsxs(m,{as:`--keyboard-keys --${r||a||U.Small} flex aic ${t} ${o}`.trim(),children:[(Array.isArray(u.keys)?u.keys:[u.keys]).map(f=>jsxRuntime.jsx("abbr",{title:fs[f],children:us[f]},f)),jsxRuntime.jsx(ne,{children:u?.children??e})]})});gs.displayName="Zuz.KeyboardKeys";var Xo=gs;var xs=react.createContext(null),tt=()=>{let e=react.useContext(xs);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},Wm=({ref:e,icons:n,children:t,...o})=>{let{playlist:r=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:u="No Track",defaultCover:f,onTrackChange:c,...p}=o,{className:i,style:l,rest:g}=N(p),C=hooks.useMediaPlayer(r,r[0]??void 0),S=react.useMemo(()=>({play:k.play,pause:k.pause,prev:k.prev,next:k.next,volumeHigh:k.volumeHigh,volumeMute:k.volumeMute,...n}),[n]),b=react.useMemo(()=>({...C,mode:s,icons:S}),[C,S]);return jsxRuntime.jsx(xs.Provider,{value:b,children:jsxRuntime.jsx(m,{className:`--zuz-media-player ${i}`,style:l,children:t})})},bs=Wm;var vs=e=>{if(!e||isNaN(e))return "0:00";let n=Math.floor(e/60),t=Math.floor(e%60);return `${n}:${t.toString().padStart(2,"0")}`},Xt=e=>typeof e=="string"?jsxRuntime.jsx(J,{name:e}):e,ws=()=>{let{mediaRef:e,state:n,controls:t,mode:o}=tt();return jsxRuntime.jsxs(m,{as:`--mediaplayer-stage rel --mode-${o}`,children:[o==="video"?jsxRuntime.jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsxRuntime.jsx("audio",{ref:e}),n.isLoading&&jsxRuntime.jsx(m,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsxRuntime.jsx(Ce,{})})]})},Ss=()=>{let{state:e,defaultArtist:n,defaultTitle:t,defaultCover:o}=tt();return jsxRuntime.jsxs(m,{as:"--track-info flex aic",children:[jsxRuntime.jsx(Ge,{src:e.currentItem?.cover||o||"",as:"--track-cover"}),jsxRuntime.jsxs(m,{as:"flex cols",children:[jsxRuntime.jsx(m,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsxRuntime.jsx(m,{as:"--track-artist",children:e.currentItem?.artist||n||"..."})]})]})},Cs=()=>{let{state:e,controls:n,icons:t}=tt();return jsxRuntime.jsxs(m,{as:"--mediaplayer-controls flex aic",children:[jsxRuntime.jsx(V,{onClick:n.prev,as:"--prev",children:Xt(t?.prev??k.prev)}),jsxRuntime.jsx(V,{onClick:n.togglePlay,as:"--play-pause",children:Xt(e.isPlaying?t?.pause??k.pause:t?.play??k.play)}),jsxRuntime.jsx(V,{onClick:n.next,as:"--next",children:Xt(t?.next??k.next)})]})},Ts=()=>{let{state:e,controls:n,mediaRef:t}=tt(),o=e.progress*(e.duration||0);return jsxRuntime.jsxs(m,{as:"--track-progress flex aic",children:[jsxRuntime.jsx(m,{as:"--track-current-duration",children:vs(o)}),jsxRuntime.jsx(je,{value:e.progress,onClick:r=>{let s=r.currentTarget.getBoundingClientRect(),a=(r.clientX-s.left)/s.width;n.seek(a);}}),jsxRuntime.jsx(m,{as:"--track-total-duration",children:vs(e.duration)})]})},Ps=()=>{let{state:e,controls:n,icons:t}=tt();return jsxRuntime.jsxs(m,{as:"--volume-control flex aic gap:8 w:120",children:[jsxRuntime.jsx(V,{onClick:()=>n.setIsMuted(),children:Xt(e.isMuted?t?.volumeMute??k.volumeMute:t?.volumeHigh??k.volumeHigh)}),jsxRuntime.jsx(je,{value:e.volume,className:"h:3 flex:1",onClick:o=>{let r=o.currentTarget.getBoundingClientRect();n.setVolume((o.clientX-r.left)/r.width);}})]})};var Gm=({ref:e,...n})=>jsxRuntime.jsx(bs,{...n,ref:e}),Um=Object.assign(Gm,{Stage:ws,TrackInfo:Ss,Controls:Cs,Progress:Ts,Volume:Ps}),qm=Um;var Rs=react.forwardRef((e,n)=>{let t=hooks.useNetworkStatus(),{onlineMessage:o,offlineMessage:r,variant:s}=e;return jsxRuntime.jsxs(m,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:t==false,curve:X.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||U.Small} fixed flex`,children:[jsxRuntime.jsx(m,{className:"--ico",children:t?k[we.Success]:k[we.Error]}),jsxRuntime.jsx(z,{as:"--message",children:t?o||"internet connection restored :)":r||"no internet connection"})]})});Rs.displayName="Zuz.NetWorkManager";var jm=Rs;var Bs=react.forwardRef((e,n)=>{let{strenthMeter:t,onChange:o,...r}=e;"type"in r&&delete r.type;let{style:s,className:a,rest:u}=N(r),[f,c]=react.useState(false),[p,i]=react.useState(""),l=react.useMemo(()=>core.checkPasswordStrength(p),[p]),g=hooks.useDebounce(C=>{t&&i(C.target.value),o&&o(C);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(m,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(m,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(ie,{ref:n,type:f?"text":"password",className:a,onChange:g,...u}),jsxRuntime.jsx(V,{tabIndex:-1,onClick:()=>c(C=>!C),className:"--toggle flex aic jcc abs",children:f?k.eye:k.eyeSlash})]}),t&&jsxRuntime.jsxs(m,{as:`flex aic --password-meter --pb-score-${l.score}`,style:s,children:[jsxRuntime.jsxs(m,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(m,{as:`--pbar ${l.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${l.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${l.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${l.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${l.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(z,{as:"--password-meter-label","aria-hidden":true,children:l.result})]})]})});Bs.displayName="Zuz.Password";var sp=Bs;var ks=react.forwardRef((e,n)=>{let{size:t,length:o,mask:r,...s}=e,a=react.useRef([]),u="pinput",f=false,c={};"with"in s&&(c={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(u=s.name,delete s.name),"required"in s&&(f=true,delete s.required);let{style:p}=N(s),i=l=>{let g=l.currentTarget,C=a.current[parseInt(g.dataset.index)+1],S=a.current[parseInt(g.dataset.index)-1];g.value.length===1&&C?C.focus():g.value.length===0&&S&&S.focus();};return react.useEffect(()=>{a.current=a.current.slice(0,t||o);},[t||o]),jsxRuntime.jsx(m,{name:u,style:p,className:"--otp flex aic rel","data-required":f,"data-size":t||o||4,...c,children:Array(t||o||4).fill(1).map((l,g)=>jsxRuntime.jsx(ie,{autoComplete:"new-password","data-index":g,ref:C=>{a.current[g]=C;},numeric:true,onChange:i,maxLength:1,placeholder:r?"\xB7":"0",type:r?"password":"text",...s},`pin-${g}`))})});ks.displayName="Zuz.PinInput";var cp=ks;var Ls=react.forwardRef((e,n)=>{let{children:t,className:o,name:r,required:s,type:a,value:u,variant:f,checked:c,onSwitch:p,...i}=e,[l,g]=react.useState(c||false),{variant:C}=Y(true),S=react.useRef(null);return jsxRuntime.jsxs(bt,{className:`${o} --${(a||ao.Default).toLowerCase()} --radio${!a||a==ao.Default?"":"card"} --${f||C||U.Small} flex aic rel`.trim(),...i,children:[jsxRuntime.jsx(ie,{ref:S,defaultChecked:l,value:u||"rd",type:"radio",className:"abs",name:r,required:s||false,onChange:b=>{p&&p(b.target.checked,u||"cb"),g(b.target.checked);}}),jsxRuntime.jsx(m,{className:"--dot rel",children:jsxRuntime.jsx(m,{className:"--rod abs abc"})}),jsxRuntime.jsx(m,{className:"--value",children:t})]})});Ls.displayName="Zuz.Radio";var fp=Ls;var Ms=react.forwardRef((e,n)=>{let{fx:t,withStyle:o,as:r,reverse:s=false,searchIcon:a=k.search,hideSearchIcon:u=false,clearIcon:f=k.close,hideClearIcon:c=false,onChange:p,onClear:i,...l}=e,{style:g,className:C}=N({as:e.as}),[S,b]=react.useState(""),{variant:I}=Y(true),P=react.useRef(null);"type"in e&&delete e.type;let T=v=>{b(v.target.value),p?.(v.target.value);},d=v=>{S.trim()!==""&&(b(""),p?.(""),P.current&&(P.current.value="",e.onConfirm?.("")));};return react.useImperativeHandle(n,()=>({focus:()=>P.current?.focus(),value:()=>P.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(m,{style:g,className:`--search ${s?"--search-rev":""} --${e.variant||I||U.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${C}`.trim(),children:[jsxRuntime.jsx(ie,{ref:P,onChange:T,...l}),e.shortcut&&jsxRuntime.jsx(Xo,{keys:e.shortcut,as:"abs"}),jsxRuntime.jsx(V,{tabIndex:-1,onClick:v=>d(),className:"--send flex aic jcc",variant:e.variant||U.Medium,children:S!==""?!c&&(typeof f=="string"?jsxRuntime.jsx(J,{name:f,as:"--search-action"}):f):!u&&(typeof a=="string"?jsxRuntime.jsx(J,{name:a,as:"--search-action"}):a)})]})});Ms.displayName="Zuz.Search";var vp=Ms;var Ds=({checkIcon:e,selected:n,updateValue:t,o})=>{let r=e?typeof e=="string"?jsxRuntime.jsx(J,{name:"checkIcon"}):e:k.check,s=o.disabled===true;return jsxRuntime.jsxs(V,{onClick:a=>{s||(a.stopPropagation(),t(o));},disabled:s,as:`--select-option-item --no-shrink ${n?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxRuntime.jsxs(Ae,{as:"--option-item-meta --aic",children:[o.icon&&jsxRuntime.jsx(J,{name:o.icon,as:`--select-option-icon --icon-${o.value}`,color:o.iconColor}),jsxRuntime.jsx(z,{suppressHydrationWarning:true,children:typeof o=="string"?o:o.label})]}),n&&jsxRuntime.jsx(Ae,{aic:true,jcc:true,as:"--select-option-check --abs",children:r})]})};Ds.displayName="Option";var Hs=Ds;var Vs=({ref:e,...n})=>{let{selected:t,options:o,label:r,name:s,variant:a,search:u,searchPlaceholder:f,maxHeight:c,arrowDownIcon:p=k.arrowDown,arrowUpIcon:i=k.arrowUp,expanded:l,multiple:g,tokenizer:C,wrapTokens:S,disabled:b,checkIcon:I,closeIcon:P,onChange:T,...d}=n,[v,h]=react.useState(()=>g||C?t?(Array.isArray(t)?t:[t]).map(K=>typeof K=="string"?o.find(oe=>oe.value===K):K):[]:t?typeof t=="string"?o.find(A=>A.value===t):t:o[0]),[y,R]=react.useState(false),[O,L]=react.useState(null),H=react.useRef(null),B=react.useRef(null),D=react.useRef(null),$=react.useId(),W=react.useMemo(()=>s||$,[]),{reposition:x}=gt(D,{direction:ct.Bottom,offset:2}),{variant:E}=Y(true),F=P?typeof P=="string"?jsxRuntime.jsx(J,{name:P}):P:k.close,{className:G,style:_,rest:Z}=N(d,void 0),ee=A=>Array.isArray(v)?v.some(K=>K.value===A.value):v?.value===A.value,j=A=>{if(!(b||A.disabled))if(g||C){let K=Array.isArray(v)?v:[],le=K.find(fe=>fe.value===A.value)?K.filter(fe=>fe.value!==A.value):[...K,A];h(le),T?.(le);}else h(A),R(false),T?.(A);},Q=(A,K)=>{if(A.stopPropagation(),b)return;let oe=v.filter(le=>le.value!==K.value);h(oe),R(false),T?.(oe);};return react.useImperativeHandle(e,()=>({setSelected:A=>{if(Array.isArray(A)){let K=A.map(oe=>typeof oe=="string"?o.find(le=>le.value===oe):oe).filter(Boolean);h(K);}else if(typeof A=="string"){let K=o.find(oe=>oe.value===A);K&&h(K);}else h(A);},getValue:()=>v||null}),[v,o]),react.useEffect(()=>{if(!y)return;let A=()=>{x();};return window.addEventListener("scroll",A,true),window.addEventListener("resize",x),()=>{window.removeEventListener("scroll",x,true),window.removeEventListener("resize",x);}},[y,x]),react.useEffect(()=>{if(!y){B.current&&(B.current.value=""),L(null);return}B.current?.focus(),x();let A=oe=>{D.current&&!D.current.contains(oe.target)&&R(false);},K=setTimeout(()=>{document.addEventListener("click",A);},0);return ()=>{clearTimeout(K),document.removeEventListener("click",A);}},[y,x]),jsxRuntime.jsxs(m,{className:`--select ${l==true?"--expanded":""} --${a||E} ${s?`--${s}`:""} ${b?"--disabled":""} rel`.trim(),name:W,children:[jsxRuntime.jsxs(V,{ref:H,disabled:b,className:`--select-display --selected flex aic rel ${G}`.trim(),withLabel:false,style:_,onClick:A=>{A.stopPropagation(),b||R(K=>!K);},...Z,children:[jsxRuntime.jsx(Ae,{aic:true,as:"--label-wrapper",children:C&&Array.isArray(v)&&v.length>0?jsxRuntime.jsxs(Ae,{as:`--tokens-wrap${S===true?" --wrap":""}`,children:[v.map(A=>jsxRuntime.jsxs(Ae,{aic:true,as:"--token",children:[jsxRuntime.jsx(z,{as:"--token-label",children:A.label}),jsxRuntime.jsx(m,{as:"--token-remove",onClick:K=>Q(K,A),children:F})]},A.value)),v.length<o.length&&jsxRuntime.jsx(z,{as:"--label",children:r||"Choose"})]}):jsxRuntime.jsx(z,{as:"--label",children:Array.isArray(v)?v.length>0?`${v.length} selected`:r||"Choose":v?.label||r||"Choose"})}),jsxRuntime.jsx(m,{className:"--svg-arrow rel flex aic jcc",children:y?typeof i=="string"?jsxRuntime.jsx(J,{name:i,as:"--search-action"}):i:typeof p=="string"?jsxRuntime.jsx(J,{name:p,as:"--search-action"}):p})]}),jsxRuntime.jsxs(m,{id:W,className:"--options-list -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!y,style:{maxHeight:c||"auto"},ref:D,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:y,duration:.05},children:[u&&jsxRuntime.jsx(m,{as:"--select-search --sticky",children:jsxRuntime.jsx(ie,{ref:B,onChange:A=>{L(A.target.value==""?null:A.target.value);},className:"--search-input",placeholder:f||"Search..."})}),o.filter(A=>!O||A.label.toLowerCase().includes(O.toLowerCase())).map(A=>jsxRuntime.jsx(Hs,{updateValue:j,checkIcon:I,selected:ee(A),o:A},`option-${(typeof A=="string"?A:A.label).replace(/\s+/g,"-")}-${typeof A=="string"?A:A.value}`))]})]})};Vs.displayName="Zuz.Select";var Pp=Vs;var $s=react.forwardRef((e,n)=>jsxRuntime.jsx(vt,{type:ke.Switch,...e,ref:n}));$s.displayName="Zuz.Switch";var Rp=$s;var _s=e=>{let{idx:n,id:t,as:o,weight:r,style:s,value:a,render:u,resize:f,sortBy:c,sortable:p,onSort:i}=e,[l,g]=react.useState(0),C=()=>{p&&(i?.(String(t),l==1?-1:1),g(S=>S==1?-1:1));};return jsxRuntime.jsxs(m,{style:{flex:r||1,...s},as:`--col flex aic ${o||""} ${p?"--sortable":""}`,onClick:C,children:[jsxRuntime.jsx(m,{children:a}),n==-1&&p&&c==t&&jsxRuntime.jsx(m,{as:"--arrow flex aib",children:l==1?k.arrowUp:k.arrowDown})]})};_s.displayName="Zuz.Column";var Jt=_s;var Zs=e=>{let{index:n,pubsub:t,schema:o,data:r,ids:s,styles:a,animate:u,sortBy:f,selectable:c,tableRef:p,loading:i,rowClassName:l,onSort:g,onRowClick:C,onSelect:S,onContextMenu:b}=e,I=hooks.useDelayed(),P=react.useMemo(()=>({transition:q.SlideInBottom,curve:X.EaseInOut,delay:.02*(n+1)}),[]),T=react.useRef(null),d=(h,y)=>{n==-1?t.emit(`ALL_ROWS_${h?"CHECKED":"UNCHECKED"}`,h):(S&&S(r,h),t.emit(`ROW_${h?"CHECKED":"UNCHECKED"}`,h,y));},v=(h,y,R)=>jsxRuntime.jsx(Jt,{idx:h,id:y,as:"--selector",pubsub:t,value:jsxRuntime.jsx(vt,{value:R,ref:T,onSwitch:d,type:ke.Default})});return react.useEffect(()=>{let h=(L,H)=>{T.current?.setChecked(L,false);},y=(L,H)=>{let B=false;p?.current&&p.current.querySelectorAll(".--row").forEach(D=>{let $=D;if(!$.classList.contains("--row-head")){let W=$.querySelector(".--selector input[type=checkbox]");W&&W.checked&&!B&&(B=W.checked);}}),T.current.setChecked(B,false);},R=L=>{T.current?.setChecked(L,false),S&&S(r,L);},O=L=>{T.current?.setChecked(L,false),S&&S(r,L);};return n==-1?(t.on("ROW_CHECKED",h),t.on("ROW_UNCHECKED",y),()=>{t.off("ROW_CHECKED",h),t.off("ROW_UNCHECKED",y);}):(t.on("ALL_ROWS_CHECKED",R),t.on("ALL_ROWS_UNCHECKED",O),()=>{t.off("ALL_ROWS_CHECKED",R),t.off("ALL_ROWS_UNCHECKED",O);})},[]),jsxRuntime.jsxs(m,{onContextMenu:h=>b?b(h,r):null,onClick:h=>C?C(h,e.data):()=>{},...u?{fx:{...P,when:I}}:{},as:`--row flex aic ${C?"--row-clickable":""} ${n==-1?"--row-head":""} ${l||""}`,children:[n==-1&&o.map((h,y)=>{let{renderWhenHeader:R,render:O,value:L,...H}=h;return jsxRuntime.jsxs(react.Fragment,{children:[c&&y==0&&v(-1,`--selector-${h.id}`,"all"),jsxRuntime.jsx(Jt,{idx:-1,onSort:g,sortBy:f,value:L,...H,pubsub:t,style:a[h.id]})]},`--col-${h.id}`)}),i&&n>-1&&jsxRuntime.jsx(m,{as:"--col",children:jsxRuntime.jsx(z,{as:"opacity:0",children:"..."})}),!i&&n>-1&&s&&r&&o.map((h,y)=>jsxRuntime.jsxs(react.Fragment,{children:[c&&y==0&&v(y,`--selector-${h.id}`,h.id.toString()),s.includes(String(h.id))?jsxRuntime.jsx(Jt,{pubsub:t,idx:y,id:String(h.id),style:a[String(h.id)],value:h.render?h.render(r,n):r[String(h.id).includes(".")?String(h.id).split(".").reverse()[0]:h.id]}):null]},`--${String(h.id)}-val-${y}`))]})};Zs.displayName="Zuz.Row";var eo=Zs;var Us=(e,n)=>{let{schema:t,rows:o,rowCount:r,rowsPerPage:s,currentPage:a,pagination:u,paginationHash:f,showPaginationOnZeroPageCount:c,animateRows:p,header:i,rowClassName:l,selectableRows:g,hoverable:C,sortBy:S,loading:b,loadingRowCount:I,loadingMessage:P,spinner:T,emptyMessage:d,onSort:v,onRowClick:h,onRowSelectToggle:y,onPageChange:R,onRowContextMenu:O,...L}=e,H=react.useRef(null),B=react.useMemo(()=>t.reduce((ae,te)=>(ae[te.id]={flex:te.weight||1,...te.w&&{width:te.w},...te.maxW&&{maxWidth:te.maxW},...te.minW&&{minWidth:te.minW},...te.h&&{height:te.h},...te.maxH&&{maxHeight:te.maxH},...te.minH&&{minHeight:te.minH}},ae),{}),[t]),D=react.useMemo(()=>Object.keys(B),[t]),$=react.useMemo(()=>i??true,[i]),{style:W,className:x,rest:E}=N(L),F=react.useRef(null),G=react.useMemo(()=>new core.PubSub,[]),_=react.useRef(o.map(()=>core.uuid(8))),[Z,ee]=react.useState(S||null),[j,Q]=react.useState(P||"loading"),A=react.useMemo(()=>!b&&o&&o.length==0,[b,o]),K=react.useCallback(()=>d?typeof d=="function"?jsxRuntime.jsx(d,{}):d:jsxRuntime.jsx(z,{as:"tac s:18 mt:75",children:"No Record Found"}),[b,o]);react.useEffect(()=>{_.current=o.map(()=>core.uuid(8));},[o]);let oe=(ae,te)=>{ee(ae),v?.(ae,te);},le=(r||(o?o.length:0))/(s||10),fe=react.useMemo(()=>c||le>1?jsxRuntime.jsx(xt,{hash:f,ref:H,renderOnZeroPageCount:c,onPageChange:R,paginationStyle:"table",startPage:a,itemCount:r||(o?o.length:0),itemsPerPage:s||10}):null,[a,r]);return react.useImperativeHandle(n,()=>({setLoading(ae){}})),jsxRuntime.jsxs(m,{as:`--table ${C??true?"--hoverable":""} flex cols rel ${x}`,ref:F,children:[$==true&&jsxRuntime.jsx(eo,{sortBy:Z,onSort:oe,tableRef:F,pubsub:G,selectable:g,index:-1,schema:t,loading:true,styles:B}),b&&jsxRuntime.jsxs(m,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(Ce,{type:T||ue.Simple}),j&&jsxRuntime.jsx(z,{as:"--table-loading-message",children:j})]}),b&&Array(I||5).fill({}).map((ae,te)=>jsxRuntime.jsx(eo,{tableRef:F,index:te,pubsub:G,schema:t,styles:B,loading:true,animate:p,onRowClick:h},`--trow-loading-${te}-${t[0].id}`)),!b&&o&&o.map((ae,te)=>jsxRuntime.jsx(eo,{tableRef:F,pubsub:G,loading:false,index:te,schema:t,ids:D,styles:B,animate:p,data:ae,onRowClick:h,rowClassName:l,selectable:g,onSelect:y,onContextMenu:O},`--trow-${_.current[te]||te}-${t[0].id}`)),A&&K(),u&&fe&&jsxRuntime.jsx(m,{"aria-hidden":!u||!fe,...p?{fx:{transition:q.SlideInBottom,curve:X.EaseInOut,delay:.02*(o.length+1),when:!b&&o&&u&&fe!=null}}:{},as:"--row flex aic --row-footer",children:fe})]})};Us.displayName="Zuz.Table";var zp=react.forwardRef(Us),_p=zp;var Zp=({ref:e,...n})=>{let{title:t,items:o}=n,[r,s]=react.useState(0),a=(u,f,c)=>{u.preventDefault(),s(f),document.getElementById(c)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(m,{ref:e,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(z,{as:"--toc-title",children:t}),jsxRuntime.jsx(We,{items:o.map((u,f)=>jsxRuntime.jsx("a",{className:r==f?"--toc-active":"",style:{anchorName:r===f?"--toc-active":"none",color:r==f?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:c=>a(c,f,u.tag),href:`#${u.tag}`,children:u.label}))})]})},Kp=Zp;var qs=({isActive:e,transitionType:n,speed:t,width:o,render:r,content:s,onHeightChange:a})=>{let u=react.useRef(null),f=hooks.useResizeObserver(u);react.useEffect(()=>{e&&f.height>0&&a(f.height);},[e,f.height]);let p=react.useMemo(()=>{let i={width:o>0?`${o}px`:"100%",minWidth:o>0?`${o}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return n==="fade"?{...i,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,visibility:e?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:e?1:0}:n==="scale"?{...i,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,transform:`scale(${e?1:.95})`,transition:`all ${t}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:e?1:0}:i},[e,n,o,t]);return jsxRuntime.jsx(m,{ref:u,style:{...p},className:"--content",children:r||e?s:null})};qs.displayName="Zuz.TabBody";var Xs=qs;var js=({ref:e,...n})=>{let{tabs:t,speed:o=.3,prerender:r=true,variant:s,tabStyle:a="fixed",onChange:u,transitionType:f="slide",...c}=n,[p,i]=react.useState(0),l=react.useRef(null),g=hooks.useResizeObserver(l),C=react.useMemo(()=>core.uuid(8),[]),[S,b]=react.useState("auto"),I=react.useMemo(()=>g.width>0,[g.width]);react.useImperativeHandle(e,()=>({setTab:y=>i(y)}));let P=react.useMemo(()=>t.map(y=>({...y,key:y.key||core.uuid(8)})),[t]),{style:T,className:d,rest:v}=N({as:`flex cols w-full no-overflow ${c.as||""}`,...c}),h=()=>{if(!I)return {opacity:0};switch(f){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${P.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${p*g.width}px, 0, 0)`,transition:`transform ${o}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(m,{ref:l,style:T,className:`--tabview --${a} flex cols ${d}`,children:[jsxRuntime.jsx(wt,{as:"--tabview-head",onSwitch:y=>{i(y.index);let R=P.find(O=>O.tag==y.tag);R&&R.onSelect&&(R.onSelect(R,y.index),u?.(R,y.index));},selected:p,items:P.reduce((y,R,O)=>(y.push({icon:R.icon,index:O,label:R.label,tag:R.tag}),y),[])}),jsxRuntime.jsx(m,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:S,transition:I?`height ${o}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:I?1:0},children:jsxRuntime.jsx(m,{className:"--track",style:{...h()},children:P.map((y,R)=>jsxRuntime.jsx(Xs,{isActive:R===p,transitionType:f,speed:o,width:g.width,render:r||R===p,onHeightChange:O=>R===p&&b(O),content:y.body},`tab-body-${y.key||R}-${C}`))})})]})};js.displayName="Zuz.TabView";var eu=js;var nu=({ref:e,commands:n,onCommand:t,welcomeMessage:o="Welcome to Zuz Terminal v1.0.0",prompt:r="zuz ~ ",variant:s,...a})=>{let[u,f]=react.useState([{type:"output",content:o}]),[c,p]=react.useState(""),i=react.useRef(null),l=react.useRef(null),{variant:g}=Y(true);react.useEffect(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight);},[u]);let C=d=>{let v=typeof d=="string"?{type:"output",content:d}:d;f(h=>{let y=[...h,v];return y.length>1e3?y.slice(-1e3):y});},S=()=>f([]);react.useImperativeHandle(e,()=>({write:C,clear:S}));let b=async d=>{let[v,...h]=d.split(" "),y=v.toLowerCase();return n&&n[y]?await n[y](h):t?await t(d):`command not found: ${v}`},I=d=>{let v=/\u001b\[(\d+)m/g,h=[],y={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},R=0,O="#d4d4d4",L=false,H;for(;(H=v.exec(d))!==null;){let D=d.slice(R,H.index);D&&h.push({text:D,color:O,bold:L});let $=H[1];$==="0"?(O="#d4d4d4",L=false):$==="1"?L=true:y[$]&&(O=y[$]),R=v.lastIndex;}let B=d.slice(R);return B&&h.push({text:B,color:O,bold:L}),h},P=(d,v)=>d.includes("\x1B")?I(d).map((h,y)=>jsxRuntime.jsx(ne,{style:{color:h.color||"#d4d4d4",fontWeight:h.bold?"bold":"normal"},children:h.text},`--terminal-msg-${y}-${h.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(ne,{style:{color:v==="error"?"#ff5f56":v==="command"?"#00ff00":"#d4d4d4"},children:d}),T=async d=>{if(d.key==="Enter"&&c.trim()){let v=c.trim(),h=[...u,{type:"command",content:`${r}${v}`}];p(""),f(h);let y=await b(v);f(R=>[...R,{type:"output",content:y}]);}};return jsxRuntime.jsxs(m,{as:`--zuz-terminal --${s||g||U.Medium} flex cols ${a.className}`,onClick:()=>l.current?.focus(),children:[jsxRuntime.jsx(m,{ref:i,className:"--terminal-log",children:u.map((d,v)=>jsxRuntime.jsx(m,{children:jsxRuntime.jsx(z,{children:P(d.content,d.type)})},v))}),jsxRuntime.jsxs(m,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(z,{as:"--terminal-prompt",children:r}),jsxRuntime.jsx(ie,{ref:l,className:"--zuz-term-input",autoFocus:true,value:c,variant:s||g||U.Medium,onChange:d=>p(d.target.value),onKeyDown:T})]})]})},su=nu;var au=({meta:e})=>jsxRuntime.jsxs(V,{as:"flex aic --command-item",children:[e.icon&&jsxRuntime.jsx(J,{name:e.icon,as:"--command-icon"}),jsxRuntime.jsx(z,{children:e.label})]}),iu=({position:e,onSelect:n,commands:t,visible:o})=>jsxRuntime.jsx(m,{"aria-hidden":!o,fx:{transition:q.SlideInBottom,duration:.1,when:o},className:"--command-box abs grid",style:{...e},children:t.map(r=>jsxRuntime.jsx(au,{meta:r},`cmd-${r.label.replace(/\s+/,"-")}`))}),oa=iu;var sa=react.forwardRef((e,n)=>{let{autoResize:t,maxHeight:o,variant:r,resize:s="none",command:a,commands:u,onInput:f,cmd:c,renderDropdown:p,value:i,defaultValue:l,...g}=e,C=react.useRef(null),S=react.useRef(null),{variant:b}=Y(true),{style:I,className:P,rest:T}=N(g),{showDropdown:d,dropdownPosition:v,handleKeyDown:h,handleInput:y,handleCommandSelect:R}=hooks.useCommandActions({command:a,commands:u,cmd:c,ref:C}),O=react.useCallback(()=>{let H=C.current;!H||!t||(S.current&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{H.style.height="auto";let B=H.scrollHeight;if(o){let D=parseInt(o.toString(),10);isNaN(D)||(B=Math.min(B,D));}H.style.height=`${B}px`,H.style.overflowY=o&&B>=parseInt(o.toString(),10)?"auto":"hidden";}));},[t,o]),L=H=>{f?.(H),y(H),O();};return react.useEffect(()=>{O();},[i,l,O]),react.useEffect(()=>{t&&C.current&&O();},[t,O]),react.useEffect(()=>()=>{S.current&&cancelAnimationFrame(S.current);},[]),jsxRuntime.jsxs(m,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${r||b||U.Medium} flex ${P}`.trim(),style:{...I,resize:s,height:t?"auto":I?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:h,onInput:L,ref:H=>{typeof n=="function"?n(H):n&&(n.current=H),C.current=H;},value:i,defaultValue:l,...T}),p?p({show:d,position:v,commands:u||[],onSelect:R}):u&&u.length>0&&jsxRuntime.jsx(oa,{visible:d,commands:u,onSelect:R,position:v})]})});sa.displayName="Zuz.TextArea";var uu=sa;var ia=react.forwardRef((e,n)=>{let{as:t,value:o,color:r,direction:s,...a}=e,u=react.useRef(null),[f,c]=react.useState(o||0);return react.useImperativeHandle(n,()=>({updateValue(p){f.toString().length!==p.toString().length&&c(p);},setValue(p){if(this.updateValue(p),u.current){let i=p.toString().split("");u.current.querySelectorAll(".--wheel-char").forEach((l,g)=>{let C=i[g];if(l instanceof HTMLElement){l.setAttribute("data-value",C);let S=l.querySelector(".--wheel-char-track");S instanceof HTMLElement&&(S.style.setProperty("--v",C),S.offsetWidth);}});}}})),react.useEffect(()=>{c(o||0);},[o]),jsxRuntime.jsxs(m,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:u,...a,children:[(f||0).toString().split("").map((p,i)=>isNaN(parseInt(p,10))?jsxRuntime.jsx(ne,{className:"--wheel-char wheel-char-symbol grid",children:p},`wheel-char-symbol-${i}`):jsxRuntime.jsx(ne,{"data-value":p,className:`--wheel-char grid ${i>(f||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(ne,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":p},children:[jsxRuntime.jsx(ne,{children:!s||s==="down"?0:9}),(!s||s==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((l,g)=>jsxRuntime.jsx(ne,{children:l},`${i}--${g}`)),jsxRuntime.jsx(ne,{children:!s||s==="down"?9:0})]})},`wheel-char-${i}`)),r&&jsxRuntime.jsx(m,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${r}, transparent, transparent, transparent, ${r})`}})]})});ia.displayName="Zuz.TextWheel";var bu=ia;var nr=react.forwardRef((e,n)=>{let{as:t,meta:o,nodes:r,icons:s,onSelect:a,treeTag:u,selected:f,roots:c,expanded:p,...i}=e,{tag:l,label:g,icon:C,under:S,isHead:b}=o,I=react.useMemo(()=>c.includes(l),[c]),[P,T]=react.useState(p),d=()=>{localStorage.setItem(`--tn${u}-${l}`,P?"0":"1"),T(!P);};react.useEffect(()=>{p||I&&!localStorage.getItem(`--tn${u}-${l}`)?(localStorage.setItem(`--tn${u}-${l}`,"1"),T(true)):T(localStorage.getItem(`--tn${u}-${l}`)=="1");},[]);let v=react.useMemo(()=>r.filter(h=>h.under==l),[r,l]);return jsxRuntime.jsxs(m,{className:`--treenode ${I?"--is-root":""} --treenode-${l} flex cols`,children:[jsxRuntime.jsxs(m,{className:`--node --node-${l} flex aic ${f==l?" --selected":""}`,children:[jsxRuntime.jsx(V,{skeleton:i.skeleton,onClick:d,className:"--node-aro-btn",disabled:v.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(J,{skeleton:i.skeleton,className:"--node-aro-icon",name:v.length==0?s?.arrowDisabled||s?.arrowClose:P?s?.arrowOpen:s?.arrowClose}):v.length==0?k.chevronBottom:P?k.chevronBottom:k.chevronRight}),jsxRuntime.jsxs(V,{className:"--node-meta flex aic",onClick:h=>a(l),children:[(s?.nodeOpen&&s?.nodeClose||I&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(J,{skeleton:i.skeleton,className:`--node-icon ${I?"--icon-root":""}`,name:C||(P?I&&s?.rootOpen||s.nodeOpen:I&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(z,{className:`--node-label ${I?"--node-label-root":""}`.trim(),skeleton:i.skeleton,children:g})]})]}),P&&v.length>0&&jsxRuntime.jsx(m,{className:`--sub-node tree-sub-node-${l} flex cols`,children:v.map(h=>jsxRuntime.jsx(nr,{treeTag:u,selected:f,onSelect:a,icons:s,roots:c,expanded:h.expanded||false,meta:h,nodes:r},`--node-${h.tag}`))})]})});nr.displayName="TreeItem";var ca=nr;var pa=react.forwardRef((e,n)=>{let{as:t,nodes:o,onNodeSelect:r,tag:s,icons:a,roots:u,selected:f,...c}=e,[p,i]=react.useState(f);react.useImperativeHandle(n,()=>({getSelected:()=>p}),[r]);let l=g=>{i(g),r&&r(g);};return react.useEffect(()=>{p!=f&&i(f);},[f]),jsxRuntime.jsx(m,{className:"--treeview flex cols",children:o.filter(g=>u.includes(g.tag)).map(g=>jsxRuntime.jsx(ca,{treeTag:s?`-${s}`:"",selected:p,onSelect:C=>l(C),icons:a,meta:g,roots:u,expanded:g.expanded||false,skeleton:c.skeleton,nodes:o},`--node-${g.tag}`))})});pa.displayName="Zuz.TreeView";var Ru=pa;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
|
|
14
|
+
Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunkJ2S2ZRXO_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunkJ2S2ZRXO_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunkJ2S2ZRXO_cjs.h}});exports.ALERT=we;exports.AVATAR=cr;exports.Accordion=Xi;exports.ActionBar=tl;exports.Alert=nl;exports.AutoComplete=Sl;exports.Avatar=El;exports.Badge=Ll;exports.Box=m;exports.Bubble=fc;exports.BubbleMediaType=Mn;exports.BubbleStatus=Ln;exports.Button=V;exports.CHART=Nn;exports.CHECKBOX=ke;exports.COLORTHEME=ku;exports.Calendar=Mo;exports.Carousel=rc;exports.Chart=mc;exports.CheckBox=vt;exports.CodeBlock=Pc;exports.ColorScheme=_c;exports.ContextMenu=ho;exports.CookiesConsent=Wc;exports.Cover=Re;exports.CropShape=sm;exports.Cropper=rm;exports.Crumb=im;exports.DATATYPE=Ou;exports.DIALOG=Ye;exports.DIALOG_ACTION_POSITION=mr;exports.DRAWER_SIDE=ge;exports.DatePicker=pm;exports.Dialog=vo;exports.Drawer=To;exports.FILTER=Nt;exports.FORMVALIDATION=Le;exports.FORMVALIDATION_STYLE=Du;exports.Fab=gm;exports.Filters=xm;exports.Flex=Ae;exports.Form=Mm;exports.Grid=Am;exports.Group=yo;exports.Icon=J;exports.Image=Ge;exports.Input=ie;exports.KeyboardKeys=Xo;exports.KeysLabelMap=fs;exports.KeysMap=us;exports.Label=bt;exports.LayersProvider=fo;exports.List=We;exports.MediaPlayer=qm;exports.NetworkStatus=jm;exports.ORIGIN=mt;exports.OriginType=Lu;exports.Overlay=_e;exports.POSITION=ct;exports.PROGRESS=Au;exports.Pagination=xt;exports.PaginationStyle=Kt;exports.Password=sp;exports.PinInput=cp;exports.Position=me;exports.ProgressBar=Ze;exports.RADIO=ao;exports.Radio=fp;exports.SHEET=Se;exports.SHEET_ACTION_POSITION=no;exports.SKELETON=Eu;exports.SLIDER=so;exports.SORT=Mu;exports.SPINNER=ue;exports.ScrollView=wo;exports.Search=vp;exports.Select=Pp;exports.SelectTabs=wt;exports.Sheet=Tm;exports.Slider=je;exports.SnackPosition=Vt;exports.SnackStyle=Ur;exports.SnackType=At;exports.Span=ne;exports.Spinner=Ce;exports.Status=Hu;exports.Switch=Rp;exports.TRANSITIONS=q;exports.TRANSITION_CURVES=X;exports.TabView=eu;exports.Table=_p;exports.TableOfContents=Kp;exports.Terminal=su;exports.Text=z;exports.TextWheel=bu;exports.Textarea=uu;exports.ThemeProvider=wa;exports.ToastDefaultTitle=qr;exports.ToastPosition=Vt;exports.ToastProvider=Po;exports.ToastStyle=Ur;exports.ToastType=At;exports.ToolTip=_o;exports.TreeView=Ru;exports.Variant=U;exports.animationTransition=pt;exports.buildClassString=io;exports.buildWithStyles=fr;exports.css=of;exports.getAnimationCurve=lo;exports.getAnimationTransition=rf;exports.getZuzMap=da;exports.isKeyCombination=ps;exports.setZuzMap=ur;exports.useBase=N;exports.useContextMenu=Pi;exports.useDialog=Ni;exports.useDrawer=ki;exports.useFx=pe;exports.useMorph=Oi;exports.usePosition=gt;exports.useSnack=_i;exports.useToast=Io;
|