@zuzjs/ui 1.0.65 → 1.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,14 +1,14 @@
1
- 'use strict';var chunk7VYMG5ZY_cjs=require('./chunk-7VYMG5ZY.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 Hr={Circle:"CIRCLE",Square:"SQUARE"},If={Default:"DEFAULT",Circle:"CIRCLE"},Ef={Light:"light",Dark:"dark",System:"system"},_e={Default:"DEFAULT",Switch:"SWITCH"},vt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},xe=vt,St=hooks.AnchorType,Nf=St,Bf={Top:"top",TopStart:"top-start",TopCenter:"top-center",TopEnd:"top-end",Bottom:"bottom",BottomStart:"bottom-start",BottomCenter:"bottom-center",BottomEnd:"bottom-end",Left:"left",LeftStart:"left-start",LeftCenter:"left-center",LeftEnd:"left-end",Right:"right",RightStart:"right-start",RightCenter:"right-center",RightEnd:"right-end"},G={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},kf={Asc:"ASC",Desc:"DESC"},Lf={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Mf={Dots:"DOTS"},je={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Be={Success:"success",Error:"error",Warning:"warning",Info:"info"},te={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},j={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInTopScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInBottomScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInLeft:"SLIDE_FROM_LEFT"},Of={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},ke={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE",Confirm:"CONFIRM"},Qe=ke,Po={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Ar=Po,Vf={Bar:"BAR",Ring:"RING"},Ro={Default:"range",Text:"number"},Io={Default:"DEFAULT",Card:"CARD"},Kt={Gooey:"gooey"},Te={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var $r=Symbol.for("zuz.global.map"),Fr=e=>{globalThis[$r]=e;},ri=()=>globalThis[$r]||{},Eo=e=>{let r=Array.isArray(e)?e.join(" "):e;if(!r||typeof r!="string")return "";let t=ri();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${chunk7VYMG5ZY_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunk7VYMG5ZY_cjs.h(r).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,i,m]=s;return chunk7VYMG5ZY_cjs.h(m).map(l=>{let c=`${i}(${l})`;return t[c]||l}).join(" ")}return t[o]||o}).join(" ")},ed=e=>{let r=Array.isArray(e)?e.join(" "):e;return !r||typeof r!="string"?"":Eo(r)},zr=e=>{let r={};for(let t in e){let n=e[t];if(t.startsWith("--")){r[t]=n;continue}let o=chunk7VYMG5ZY_cjs.e[t]?.toString()??t;if(o==="x"||o==="translateX"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${chunk7VYMG5ZY_cjs.i.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${s[0]??"0px"} ${chunk7VYMG5ZY_cjs.i.addUnitsSafely(t,n)}`;}else chunk7VYMG5ZY_cjs.d.includes(o)?r[o]=chunk7VYMG5ZY_cjs.i.addUnitsSafely(t,n):r[o]=n;}return r},No=e=>{if(!e)return "linear";switch(e.toUpperCase()){case te.Bounce:return "var(--bounce)";case te.Liquid:return "var(--liquid)";case te.Spring:return "var(--spring)";case te.EaseInOut:return "ease-in-out";case te.EaseOutBack:return "ease-out-back";default:return "linear"}},wt=(e,r=0,t=0)=>{let n={},o={},s=r||20,a=t||0;switch(e){case j.SlideInLeft:case j.SlideInRight:n={"--fx-x":e===j.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},o={"--fx-x":`${a}px`,opacity:1};break;case j.SlideInTop:case j.SlideInBottom:n={"--fx-y":e===j.SlideInTop?`-${s}px`:`${s}px`,opacity:0},o={"--fx-y":`${a}px`,opacity:1};break;case j.SlideInTopScale:case j.SlideInBottomScale:n={"--fx-y":e===j.SlideInTopScale?`-${s}px`:`${s}px`,scale:1.1},o={"--fx-y":`${a}px`,scale:1};break;case j.ScaleIn:n={scale:0,opacity:0},o={scale:1,opacity:1};break;case j.FadeIn:n={opacity:0},o={opacity:1};break}return {from:n,to:o}},td=(e,r,t)=>{let{from:n,to:o}=wt(e);return r?{...n,...o}:t?n:o};var si=(e,r)=>{let t=react.useRef([]),n=react.useRef(false);return react.useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),react.useEffect(()=>{let o=r?.current;if(!o||!e||!e.clearAtEnd)return;let s=a=>{t.current.includes(a.propertyName)&&e.clearAtEnd===true&&(o.style.transform="",o.style.filter="",t.current.forEach(i=>o.style.removeProperty(i)));};return o.addEventListener("transitionend",s),()=>o.removeEventListener("transitionend",s)},[e,r]),react.useEffect(()=>{if(typeof window>"u"||!r?.current)return;let o=r.current;(e?.scroll||e?.mouse)&&(o.style.willChange="transform",o.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",o.style.transition=`translate 0.1s ${e.curve?No(e.curve):"var(--spring)"}`);},[e,r]),react.useMemo(()=>{if(!e)return {style:{}};let{transition:o,from:s,to:a,exit:i,when:m,duration:l=.3,delay:c=0,curve:d,margin:u=0,offset:p=20,watch:g=[]}=e,C=m===false&&!n.current;m===true&&(n.current=true);let x={},{from:T,to:S}=o?wt(o,p,u):{from:s||{},to:a||{}};x=m===void 0?{...T,...S}:m?{...S}:i||T;let P=No(d),h=[],v=zr(x);t.current=Object.keys(v);let y={...v};return Object.keys(v).forEach(b=>{let I=b.startsWith("--")?"all":b;h.includes(I)||h.push(`${I} ${l}s ${P} ${c}s`);}),g.forEach(b=>{h.includes(b)||h.push(`${b} 0.1s ${P} 0s`);}),{style:{...y,transition:C?"none":h.join(", "),opacity:C?0:y.opacity,pointerEvents:C?"none":y.pointerEvents}}},[e,e?.when,e?.watch])},be=si;var Zt=null,ai=(e,r)=>{let{as:t,fx:n,busy:o=false,stripes:s,transition:a,skeleton:i,className:m,propsToRemove:l,draggable:c,dragOptions:d,style:u,...p}=e||{},g=typeof window<"u",C={},x={};if(c&&g&&!Zt&&(import('@zuzjs/hooks').then(v=>{Zt=v.useDrag;}).catch(v=>{console.error("Error loading useDrag:",v);}),Zt)){let v=Zt(d);C={onMouseDown:v.onMouseDown},x={transform:`translate(${v.position.x}px, ${v.position.y}px)`};}let T=[m,o===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),S=a?{transition:a,duration:.3}:n||{},{style:P}=be(S,r),h=Eo(t??"");return {style:{...u,...P,...x},className:[T,h||"",i?.enabled?"--skeleton":"",c?"--draggable":""].join(" ").trim(),rest:{...C,...chunk7VYMG5ZY_cjs.g(p,l?[...l,"skeleton"]:["skeleton"])}}},N=ai;var Zr="(prefers-color-scheme: dark)",ci=typeof window>"u",Gr=react.createContext(void 0),Mo=e=>{let r=react.useContext(Gr);if(!r){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return r},Y=Mo,mi=({children:e,storageKey:r="--ucs",forceTheme:t,zuzMap:n,...o})=>(n&&Fr(n),jsxRuntime.jsx(pi,{storageKey:r,forceTheme:t,...o,children:e})),pi=({children:e,storageKey:r,forceTheme:t,...n})=>{let[o,s]=react.useState(()=>t||Wr(r,"system")),[a,i]=react.useState(()=>t||Wr(r)),m=u=>(u||(u=window.matchMedia(Zr)),u.matches?"dark":"light"),l=react.useCallback(u=>{let p=u=="system"?m():u,g=document.documentElement;g.setAttribute("color-scheme",p),g.style.colorScheme=p,i(p);},[m]),c=react.useCallback(u=>{s(u),localStorage.setItem(r,u),l(u);},[o]),d=react.useCallback(u=>{let p=m(u);i(p),o==="system"&&l("system");},[o]);return react.useEffect(()=>{o==null&&window.localStorage.getItem(r);},[o]),react.useEffect(()=>{window.matchMedia(Zr).addEventListener("change",d);},[d]),react.useEffect(()=>{let u=p=>{p.key==r&&(p.newValue?c(p.newValue):c("system"));};return window.addEventListener("storage",u),()=>window.removeEventListener("storage",u)},[c]),react.useEffect(()=>{l(t||o||"system");},[o]),jsxRuntime.jsxs(Gr,{value:{colorScheme:o,resolvedScheme:a,setColorScheme:c,...n},children:[t?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
1
+ 'use strict';var chunkEYJJ7YVO_cjs=require('./chunk-EYJJ7YVO.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 Hr={Circle:"CIRCLE",Square:"SQUARE"},Ef={Default:"DEFAULT",Circle:"CIRCLE"},Nf={Light:"light",Dark:"dark",System:"system"},_e={Default:"DEFAULT",Switch:"SWITCH"},vt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},xe=vt,St=hooks.AnchorType,Bf=St,kf={Top:"top",TopStart:"top-start",TopCenter:"top-center",TopEnd:"top-end",Bottom:"bottom",BottomStart:"bottom-start",BottomCenter:"bottom-center",BottomEnd:"bottom-end",Left:"left",LeftStart:"left-start",LeftCenter:"left-center",LeftEnd:"left-end",Right:"right",RightStart:"right-start",RightCenter:"right-center",RightEnd:"right-end"},G={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Lf={Asc:"ASC",Desc:"DESC"},Mf={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Of={Dots:"DOTS"},je={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Be={Success:"success",Error:"error",Warning:"warning",Info:"info"},te={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},j={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInTopScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInBottomScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInLeft:"SLIDE_FROM_LEFT"},Vf={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},ke={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE",Confirm:"CONFIRM"},Qe=ke,Po={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Ar=Po,Df={Bar:"BAR",Ring:"RING"},Ro={Default:"range",Text:"number"},Io={Default:"DEFAULT",Card:"CARD"},Kt={Gooey:"gooey"},Te={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var $r=Symbol.for("zuz.global.map"),Fr=e=>{globalThis[$r]=e;},ni=()=>globalThis[$r]||{},Eo=e=>{let r=Array.isArray(e)?e.join(" "):e;if(!r||typeof r!="string")return "";let t=ni();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${chunkEYJJ7YVO_cjs.f}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),chunkEYJJ7YVO_cjs.h(r).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,i,p]=s;return chunkEYJJ7YVO_cjs.h(p).map(l=>{let c=`${i}(${l})`;return t[c]||l}).join(" ")}return t[o]||o}).join(" ")},td=e=>{let r=Array.isArray(e)?e.join(" "):e;return !r||typeof r!="string"?"":Eo(r)},zr=e=>{let r={};for(let t in e){let n=e[t];if(t.startsWith("--")){r[t]=n;continue}let o=chunkEYJJ7YVO_cjs.e[t]?.toString()??t;if(o==="x"||o==="translateX"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${chunkEYJJ7YVO_cjs.i.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${s[0]??"0px"} ${chunkEYJJ7YVO_cjs.i.addUnitsSafely(t,n)}`;}else chunkEYJJ7YVO_cjs.d.includes(o)?r[o]=chunkEYJJ7YVO_cjs.i.addUnitsSafely(t,n):r[o]=n;}return r},No=e=>{if(!e)return "linear";switch(e.toUpperCase()){case te.Bounce:return "var(--bounce)";case te.Liquid:return "var(--liquid)";case te.Spring:return "var(--spring)";case te.EaseInOut:return "ease-in-out";case te.EaseOutBack:return "ease-out-back";default:return "linear"}},wt=(e,r=0,t=0)=>{let n={},o={},s=r||20,a=t||0;switch(e){case j.SlideInLeft:case j.SlideInRight:n={"--fx-x":e===j.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},o={"--fx-x":`${a}px`,opacity:1};break;case j.SlideInTop:case j.SlideInBottom:n={"--fx-y":e===j.SlideInTop?`-${s}px`:`${s}px`,opacity:0},o={"--fx-y":`${a}px`,opacity:1};break;case j.SlideInTopScale:case j.SlideInBottomScale:n={"--fx-y":e===j.SlideInTopScale?`-${s}px`:`${s}px`,scale:1.1},o={"--fx-y":`${a}px`,scale:1};break;case j.ScaleIn:n={scale:0,opacity:0},o={scale:1,opacity:1};break;case j.FadeIn:n={opacity:0},o={opacity:1};break}return {from:n,to:o}},od=(e,r,t)=>{let{from:n,to:o}=wt(e);return r?{...n,...o}:t?n:o};var ai=(e,r)=>{let t=react.useRef([]),n=react.useRef(false);return react.useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),react.useEffect(()=>{let o=r?.current;if(!o||!e||!e.clearAtEnd)return;let s=a=>{t.current.includes(a.propertyName)&&e.clearAtEnd===true&&(o.style.transform="",o.style.filter="",t.current.forEach(i=>o.style.removeProperty(i)));};return o.addEventListener("transitionend",s),()=>o.removeEventListener("transitionend",s)},[e,r]),react.useEffect(()=>{if(typeof window>"u"||!r?.current)return;let o=r.current;(e?.scroll||e?.mouse)&&(o.style.willChange="transform",o.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",o.style.transition=`translate 0.1s ${e.curve?No(e.curve):"var(--spring)"}`);},[e,r]),react.useMemo(()=>{if(!e)return {style:{}};let{transition:o,from:s,to:a,exit:i,when:p,duration:l=.3,delay:c=0,curve:d,margin:u=0,offset:m=20,watch:g=[]}=e,C=p===false&&!n.current;p===true&&(n.current=true);let x={},{from:T,to:S}=o?wt(o,m,u):{from:s||{},to:a||{}};x=p===void 0?{...T,...S}:p?{...S}:i||T;let P=No(d),h=[],v=zr(x);t.current=Object.keys(v);let y={...v};return Object.keys(v).forEach(b=>{let I=b.startsWith("--")?"all":b;h.includes(I)||h.push(`${I} ${l}s ${P} ${c}s`);}),g.forEach(b=>{h.includes(b)||h.push(`${b} 0.1s ${P} 0s`);}),{style:{...y,transition:C?"none":h.join(", "),opacity:C?0:y.opacity,pointerEvents:C?"none":y.pointerEvents}}},[e,e?.when,e?.watch])},be=ai;var Zt=null,ii=(e,r)=>{let{as:t,fx:n,busy:o=false,stripes:s,transition:a,skeleton:i,className:p,propsToRemove:l,draggable:c,dragOptions:d,style:u,...m}=e||{},g=typeof window<"u",C={},x={};if(c&&g&&!Zt&&(import('@zuzjs/hooks').then(v=>{Zt=v.useDrag;}).catch(v=>{console.error("Error loading useDrag:",v);}),Zt)){let v=Zt(d);C={onMouseDown:v.onMouseDown},x={transform:`translate(${v.position.x}px, ${v.position.y}px)`};}let T=[p,o===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),S=a?{transition:a,duration:.3}:n||{},{style:P}=be(S,r),h=Eo(t??"");return {style:{...u,...P,...x},className:[T,h||"",i?.enabled?"--skeleton":"",c?"--draggable":""].join(" ").trim(),rest:{...C,...chunkEYJJ7YVO_cjs.g(m,l?[...l,"skeleton"]:["skeleton"])}}},N=ii;var Zr="(prefers-color-scheme: dark)",mi=typeof window>"u",Gr=react.createContext(void 0),Mo=e=>{let r=react.useContext(Gr);if(!r){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return r},Y=Mo,pi=({children:e,storageKey:r="--ucs",forceTheme:t,zuzMap:n,...o})=>(n&&Fr(n),jsxRuntime.jsx(ui,{storageKey:r,forceTheme:t,...o,children:e})),ui=({children:e,storageKey:r,forceTheme:t,...n})=>{let[o,s]=react.useState(()=>t||Wr(r,"system")),[a,i]=react.useState(()=>t||Wr(r)),p=u=>(u||(u=window.matchMedia(Zr)),u.matches?"dark":"light"),l=react.useCallback(u=>{let m=u=="system"?p():u,g=document.documentElement;g.setAttribute("color-scheme",m),g.style.colorScheme=m,i(m);},[p]),c=react.useCallback(u=>{s(u),localStorage.setItem(r,u),l(u);},[o]),d=react.useCallback(u=>{let m=p(u);i(m),o==="system"&&l("system");},[o]);return react.useEffect(()=>{o==null&&window.localStorage.getItem(r);},[o]),react.useEffect(()=>{window.matchMedia(Zr).addEventListener("change",d);},[d]),react.useEffect(()=>{let u=m=>{m.key==r&&(m.newValue?c(m.newValue):c("system"));};return window.addEventListener("storage",u),()=>window.removeEventListener("storage",u)},[c]),react.useEffect(()=>{l(t||o||"system");},[o]),jsxRuntime.jsxs(Gr,{value:{colorScheme:o,resolvedScheme:a,setColorScheme:c,...n},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(\`${r}\`) || "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(Oo,{children:e})]})},Wr=(e,r)=>{if(ci)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||r};var Ur=({ref:e,...r})=>{let{style:t,...n}=r,{style:o,className:s,rest:a}=N(n);return jsxRuntime.jsx("span",{ref:e,style:t,className:s,...a})};Ur.displayName="Zuz.Span";var le=Ur;var Xr=react.forwardRef((e,r)=>{let{name:t,pathCount:n,variant:o,color:s,size:a,...i}=e,{variant:m}=Y(true),{className:l,style:c,rest:d}=N(i);return jsxRuntime.jsx("div",{style:{color:s,...c,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${o||m||G.Small} ${l}`.trim(),ref:r,...d,children:Array(n||0).fill(0).map((u,p)=>jsxRuntime.jsx(le,{className:`path${p+1}`},`${t}-layer-${p}`))})});Xr.displayName="Zuz.Icon";var ee=Xr;var ve={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Yr=e=>{let{type:r,variant:t,color:n,...o}=e,{className:s,style:a,rest:i}=N(o),{spinner:m}=Y(true),l=()=>{switch(r||m?.type||ve.Simple){case ve.Simple:return null;case ve.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(f,{as:"--bar --bar1"}),jsxRuntime.jsx(f,{as:"--bar --bar2"}),jsxRuntime.jsx(f,{as:"--bar --bar3"})]});case ve.Roller:return null}};return jsxRuntime.jsx(f,{className:`${s} --spinner --${(r||m?.type||ve.Simple).toLowerCase()} --${t||m?.variant||G.Small}`.trim(),style:{...a},...i,children:l()})};Yr.displayName="Zuz.Spinner";var Pe=Yr;var jr=({ref:e,...r})=>{let{h:t,html:n,children:o,lines:s,tfx:a,delay:i=0,duration:m=.5,stagger:l=.05,repeat:c=true,reveal:d=false,hover:u=false,...p}=r,{style:g,className:C,rest:x}=N(p),T=react.useRef(null),[S,P]=react.useState(false),[h]=hooks.useIntersectionObserver([T],{threshold:[1]}),v=react.useMemo(()=>{if(g?.opacity!==void 0)return g.opacity;if(typeof r.as=="string"){let H=r.as.match(/opacity:([\d.]+)/);if(H)return H[1]}return 1},[r.as,g?.opacity]),y=react.useMemo(()=>a?u?S:d?h===1:true:false,[a,u,S,d,h]);react.useEffect(()=>{e&&(typeof e=="function"?e(T.current):e.current=T.current);},[e]);let b=`h${r.h||1}`,I=react.useMemo(()=>typeof o=="string"?o:Array.isArray(o)&&o.length===1&&typeof o[0]=="string"?o[0]:null,[o]),A=react.useMemo(()=>{let H=Array.isArray(r.as)?r.as.join(" "):r.as||"";return typeof H=="string"&&H.includes("text-clip")},[r.as]);react.useLayoutEffect(()=>{if(!A||!T.current||I===null)return;let H=T.current,L=0,M=0,$=()=>{let k=H.getBoundingClientRect(),q=getComputedStyle(H).backgroundImage,X=k.width;H.querySelectorAll(".--fx-char").forEach(F=>{let Z=F.getBoundingClientRect().left-k.left;F.style.backgroundImage=q,F.style.backgroundRepeat="no-repeat",F.style.backgroundSize=`${X}px 100%`,F.style.backgroundPosition=`-${Z}px 0`,F.style.backgroundClip="text",F.style.webkitBackgroundClip="text",F.style.color="transparent";});},_=()=>{cancelAnimationFrame(L),cancelAnimationFrame(M),L=requestAnimationFrame(()=>{M=requestAnimationFrame($);});};_();let R=new ResizeObserver(_);return R.observe(H),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(_),window.addEventListener("resize",_),()=>{cancelAnimationFrame(L),cancelAnimationFrame(M),R.disconnect(),window.removeEventListener("resize",_);}},[A,I,a,y]);let B=react.useMemo(()=>n?jsxRuntime.jsx(le,{dangerouslySetInnerHTML:{__html:n}}):a&&I!==null?I.split("").map((H,L)=>{let M=H===" ",_=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":c?"infinite":"1";return jsxRuntime.jsx(le,{"data-char":H,className:`--fx-char -fx ${y?`--fx-${a}`:""}`,style:{"--delay":`${i+L*l}s`,"--duration":`${m}s`,"--iteration":_,"--target-opacity":v,display:M?"inline":"inline-block",whiteSpace:"pre",opacity:!y&&a==="typewriter"?0:void 0},children:H},L)}):o,[o,n,a,I,y,i,l,m,c]);return jsxRuntime.jsx(b,{ref:T,onMouseEnter:()=>u&&P(true),onMouseLeave:()=>u&&P(false),style:a?{...g,display:a?"flex":g?.display,flexWrap:a?"wrap":g?.flexWrap,opacity:a&&!y?0:a?1:g?.opacity,transition:a?"opacity 0.4s ease":void 0}:g,className:`${C} ${a?"--text-fx -fx":""}`.trim(),...x,children:B})};jr.displayName="Zuz.Text";var z=jr;var en=({ref:e,...r})=>{let {title:t,position:n,margin:o=4,anchorName:s="--tooltip-anchor",children:a,show:i,variant:m,...l}=r,{style:c,className:d,rest:u}=N(l),p=n||xe.Top;react.useRef(null);let [C,x]=react.useState(false);react.useRef(6);let S=i===true||C,h=`--anchor-${react.useId().replace(/:/g,"")}`,{tooltip:v}=Y(true),y=react.useMemo(()=>{let I=false;return react$1.addPropsToChildren(a,A=>{let B=A.props.className?.includes(s);return B&&(I=true),B||!I},(A,B)=>{let H=B.props.className?.includes(s),L=A===0,M={};return (H||L)&&(M.style={...B.props.style,anchorName:h}),L&&(M.onMouseEnter=$=>{x(true),B.props.onMouseEnter?.($);},M.onMouseLeave=$=>{x(false),B.props.onMouseLeave?.($);}),M})},[a,s,h]),b=be({transition:p==xe.Top?j.SlideInTop:p==xe.Bottom?j.SlideInBottom:p==xe.Left?j.SlideInLeft:j.SlideInRight,when:S,duration:.2,offset:o+6,margin:p==xe.Top||p==xe.Left?-o:o,curve:v?.curve||te.EaseInOut});return react.useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[y,jsxRuntime.jsx(f,{style:{positionAnchor:h,...b.style,...p===xe.Top||p===xe.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${S} --${m||v?.variant||G.Small} --${p} abs ${d}`.trim(),children:typeof t=="string"?jsxRuntime.jsx(z,{as:"--text rel",children:t}):t})]})};en.displayName="Zuz.ToolTip";var Tt=en;var Ut={Loading:"loading",Normal:"normal"};var on=({ref:e,...r})=>{let{reset:t,kind:n="solid",variant:o,tooltip:s,tooltipProps:a,icon:i,iconSize:m,children:l,withLabel:c,spinner:d,state:u,disabled:p,...g}=r,{style:C,className:x,rest:T}=N(g),{variant:S}=Y(true),P=jsxRuntime.jsxs("button",{className:core.removeDuplicateWords(`--button ${s?"--tooltip-anchor":""} --${n} --${o||S} flex aic ${t?"":"jcc"} ${i?"--with-icon":""} ${x}`).trim().replace(/\s+/g," "),style:C,ref:e,disabled:u==Ut.Loading||r.skeleton?.enabled||p,...T,children:[u==Ut.Loading&&jsxRuntime.jsx(Pe,{variant:o||S,type:d||ve.Simple}),(!u||u==Ut.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i&&jsxRuntime.jsx(ee,{variant:m,name:i}),c===true?jsxRuntime.jsx(le,{children:l}):l]})]});return s?jsxRuntime.jsx(Tt,{title:s,...a,children:P}):P};on.displayName="Zuz.Button";var K=on;var ki=e=>{let{label:r,labelColor:t,icon:n,iconColor:o,index:s,className:a,onSelect:i}=e;return r=="-"?jsxRuntime.jsx(f,{className:"--line"}):jsxRuntime.jsxs(K,{reset:true,onClick:m=>i?.(e),className:`--item ${a||""}`.trim(),children:[jsxRuntime.jsx(f,{as:"--icon",children:jsxRuntime.jsx(ee,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsxRuntime.jsx(z,{className:"--lbl flex aic",style:t?{color:t}:{},children:r})]})},rn=ki;var an=({ref:e,...r})=>{let{id:t,as:n,fx:o,offsetX:s,offsetY:a,parent:i,event:m,arrow:l,when:c,items:d,header:u,footer:p,origin:g=St.TopRight,...C}=r,[x,T]=react.useState(false),[S,P]=react.useState(d||[]),{position:h,targetRef:v,calculatedAnchor:y}=hooks.useAnchorPosition(i?.current,m,{offsetX:s,offsetY:a,preferredAnchor:g}),I=i&&h.top>i.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",A=react.useMemo(()=>{let _=y.toLowerCase();return _.includes("left")?"--arrow-left":_.includes("right")?"--arrow-right":"--arrow-center"},[y]),B=h.top!==0||h.left!==0;react.useEffect(()=>{c&&B?T(true):c||T(false);},[c,B]);let{className:H,style:L,rest:M}=N(C),$=be({...o?.transition?{transition:o.transition??j.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??te.EaseInOut,duration:o?.duration??.05,when:x&&B});return jsxRuntime.jsxs(f,{ref:v,className:`--contextmenu ${l||i!=null?`--has-arrow ${I} ${A}`:""} abs flex cols ${H}`.trim(),"aria-hidden":!x,style:{...L,...$.style,top:h.top,left:h.left,visibility:B?"visible":"hidden",transformOrigin:y},...M,children:[typeof u=="function"?react.createElement(u):u,S.map((_,R)=>jsxRuntime.jsx(rn,{..._,index:R},`context-${_.label.toLowerCase()}-${R}`)),typeof p=="function"?react.createElement(p):p]})};an.displayName="Zuz.ContextMenu";var Do=an;var ln=react.forwardRef((e,r)=>{let{children:t,fx:n,when:o,fxDelay:s,fxStep:a,classToIgnore:i,...m}=e,l=Y(true),c=hooks.useDelayed(),d=n||l?.group?.fx,u=s||l?.group?.fxDelay,p=a||l?.group?.fxStep,g=i||l?.group?.classToIgnore||"-fx",C=react.useMemo(()=>d?react$1.addPropsToChildren(t,x=>{if(x.type===react.Fragment)return false;let T=x.props||{},S="fx"in T,P="tfx"in T,h=T.as?Array.isArray(T.as)?T.as.join(" "):T.as:T.className||"";return !(typeof h=="string"&&h.includes(g))&&(!S||P)},(x,T)=>{let S=(u??0)+x*(p??.1),P=T.props||{};return "tfx"in P?{delay:(P.delay??0)+S}:{fx:{...d,delay:S,when:o??(n?.when||c)}}}):t,[t,o,c,d,u,p,g,n]);return jsxRuntime.jsx(f,{className:"--group",ref:r,...m,children:C})});ln.displayName="Zuz.Group";var Ho=ln;var mn=react.forwardRef((e,r)=>{let{message:t,spinner:n,spinnerSize:o,color:s,when:a,hideMessage:i,...m}=e,{className:l,style:c,rest:d}=N(m),{spinner:u}=Y(true);return "when"in e&&e.when==false?null:jsxRuntime.jsxs(Ho,{fx:{transition:j.SlideInBottom,curve:te.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${l}`.trim(),style:{...c,backgroundColor:"var(--cover-bg)"},...d,children:[jsxRuntime.jsx(Pe,{variant:o||u?.variant||G.Small,type:n||u?.type||ve.Simple}),!i&&jsxRuntime.jsx(z,{className:"--label",tfx:"fade",style:{color:"var(--cover-label)"},children:t||"loading"})]})});mn.displayName="Zuz.Cover";var Ae=mn;var Yt=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Yt||{}),jt=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(jt||{}),pn=(t=>(t.Stack="stack",t.Individual="individual",t))(pn||{}),un={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var Ui=()=>{let e=react.useContext(Re);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(l,c)=>e.add({type:"toast",props:{...c,type:l}});return {show:(l,c,d,u)=>r("default",{title:l,message:c,icon:d,duration:u}),hide:l=>e.remove(l),success:(l,c,d,u)=>r("success",{title:l,message:c,icon:d,duration:u}),error:(l,c,d,u)=>r("error",{title:l,message:c,icon:d,duration:u}),warn:(l,c,d,u)=>r("warn",{title:l,message:c,icon:d,duration:u}),promise:(l,c,d,u)=>r("promise",{title:l,message:c,icon:d,duration:u}),clearAll:()=>e.clear("toast")}},Ao=Ui;var fn=react.forwardRef((e,r)=>{let{when:t,...n}=e;return jsxRuntime.jsx(f,{ref:r,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:j.FadeIn,when:t},...n})});fn.displayName="Zuz.Overlay";var Je=fn;var Ke=null,Ie=null,gn=react.forwardRef((e,r)=>{let{title:t,message:n,transition:o,curve:s,speed:a,type:i,actionPosition:m,spinner:l,loadingMessage:c,onShow:d,onHide:u,...p}=e,{className:g,style:C,rest:x}=N(p),[T,S]=react.useState(t||""),[P,h]=react.useState(n||""),[v,y]=react.useState(null),[b,I]=react.useState(i||ke.Default),A=react.useMemo(()=>core.uuid(12),[]),[B,H]=react.useState(false),L=react.useRef(null),M=react.useRef(null),[$,_]=react.useState(false),[R,k]=react.useState(true),q=react.useRef(null),X=P;react.useImperativeHandle(r,()=>({setLoading(F){_(F);},showDialog(F,W,Z,oe){Ke&&(clearTimeout(Ke),Ie&&clearTimeout(Ie),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),Ie=setTimeout(()=>{L.current.classList.remove("--wobble"),Ie=null;},500)),I(ke.Dialog),W&&h(W),F&&S(F),Z&&y(Z.reduce((Q,ie)=>(Q.push({...ie,key:ie.key||core.uuid(12)}),Q),[])),H(true),setTimeout(()=>oe?oe():()=>{},1e3);},dialog(F,W,Z,oe){Ke&&(clearTimeout(Ke),Ie&&clearTimeout(Ie),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),Ie=setTimeout(()=>{L.current.classList.remove("--wobble"),Ie=null;},500)),I(ke.Dialog),h(W),S(F),Z&&y(Z.reduce((Q,ie)=>(Q.push({...ie,key:ie.key||core.uuid(12)}),Q),[])),H(true),setTimeout(()=>oe?oe():()=>{},1e3);},error(F,W){this.show(F,W,ke.Error);},warn(F,W){this.show(F,W,ke.Warn);},success(F,W){this.show(F,W,ke.Success);},show(F,W,Z){Ke&&(clearTimeout(Ke),Ie&&clearTimeout(Ie),M.current=L.current.style.transform,L.current.style.transform="",L.current.classList.remove("--wobble"),setTimeout(()=>{L.current.classList.add("--wobble"),L.current.style.transform=`${M.current} scale(.9)`.trim();},50),Ie=setTimeout(()=>{L.current.classList.remove("--wobble"),L.current.style.transform=M.current||"",Ie=null;},500)),Ke=setTimeout(()=>{H(false),Ke=null,Ie=null;},(W||4)*1e3),I(Z||ke.Default),h(F),H(true),d?.();},hide(){H(false),u?.();}}));let D=react.useMemo(()=>{let F={when:B,duration:a||.3,delay:.1};if(b==ke.Dialog){if(o){let{from:W,to:Z}=wt(o,20);return {from:W,to:Z,curve:s||te.EaseInOut,...F}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:te.Spring,...F}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:te.Spring,...F}},[B,b]);return react.useEffect(()=>{q.current&&clearTimeout(q.current),B?k(true):q.current=setTimeout(()=>k(false),1e3);},[B]),b==ke.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Je,{when:B}),jsxRuntime.jsxs(f,{className:`--sheet --sheet-${b.toLowerCase()} ${B?"is-visible":""} ${g} fixed`.trim(),style:C,fx:D,...x,ref:L,children:[jsxRuntime.jsx(Ae,{when:$,spinner:l,message:c}),jsxRuntime.jsxs(f,{className:"--head flex aic rel",children:[jsxRuntime.jsx(f,{className:`--${T?"title":"dot"} flex aic rel`,children:T||""}),jsxRuntime.jsx(K,{onClick:F=>H(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(f,{className:`--body flex aic rel ${v?"":"--no-action"}`.trim(),children:R?X:null}),v&&jsxRuntime.jsx(f,{className:`--footer flex aic rel ${m?m==Po.Center?"jcc":"":"jce"}`.trim(),children:v.map((F,W)=>jsxRuntime.jsx(K,{onClick:Z=>F.handler?F.handler():F.onClick?F.onClick():console.log("onClick Handler missing"),className:"--action",children:F.label},`sheet-${A}-action-${F.key}`))})]})]}):jsxRuntime.jsx(f,{className:`--sheet --sheet-${b.toLowerCase()} ${g} abs`.trim(),style:C,...x,fx:D,ref:L,children:B?P:null})}),hn=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;gn.displayName="Zuz.Sheet";var Ji=gn;var Pt=react.createContext(null),Zo=()=>{let e=react.useContext(Pt);return e?react.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},Rt=()=>react.useContext(Pt),xn=()=>()=>{},bn=e=>{let r=react.useContext(Pt);return react.useSyncExternalStore(r?.subscribe??xn,()=>{if(!(!r||!e))return r.getSnapshot().values?.[e]},()=>{})},vn=e=>{let r=react.useContext(Pt);return react.useSyncExternalStore(r?.subscribe??xn,()=>!r||!e?null:r.getSnapshot().errors?.[e]??null,()=>null)},it=()=>{let e=Rt(),r=Zo();return {...e,...r}},Sn=({children:e,initialValues:r={}})=>{let t=react.useRef({values:r,errors:{},touched:{}}),n=react.useRef(new Set(Object.keys(r))),o=react.useRef(new Set),s=react.useCallback(()=>t.current,[]),a=react.useCallback(l=>(o.current.add(l),()=>o.current.delete(l)),[]),i=()=>{o.current.forEach(l=>l());};react.useEffect(()=>{if(!r||Object.keys(r).length===0)return;let l=new Set(Object.keys(r)),c=[...n.current].filter(T=>!l.has(T)),d={...t.current.values};c.forEach(T=>delete d[T]);let u={...d,...r},p=t.current.values||{},g=Object.entries(u),C=Object.entries(p),x=g.length!==C.length||g.some(([T,S])=>p[T]!==S);n.current=l,x&&(t.current={...t.current,values:u},i());},[r]);let m=react.useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(l,c)=>{t.current.values[l]!==c&&(t.current={...t.current,values:{...t.current.values,[l]:c}},i());},deleteFieldValue:l=>{if(!(l in t.current.values))return;let{[l]:c,...d}=t.current.values;t.current={...t.current,values:d},i();},setFieldError:(l,c)=>{t.current={...t.current,errors:{...t.current.errors,[l]:c}},i();},reset:()=>{t.current={values:{},errors:{},touched:{}},i();}}),[]);return jsxRuntime.jsx(Pt.Provider,{value:m,children:e})};var pl=e=>{let r={};for(let t in e){let n=t.split(/[\[\]]+/).filter(Boolean);n.reduce((o,s,a)=>{if(a===n.length-1)o[s]=e[t];else {let i=!isNaN(Number(n[a+1]));o[s]=o[s]||(i?[]:{});}return o[s]},r);}return r},wn=({ref:e,...r})=>{let {schema:t,name:n,cover:o,spinner:s,errors:a,action:i,children:m,withData:l,beforeSubmit:c,onSubmit:d,onError:u,onSuccess:p,resetOnSuccess:g,...C}=r,{className:x,style:T,rest:S}=N(C),[P,h]=react.useState(false),v=react.useRef(null),y=Ao(),b=Rt();Zo();let A=react.useRef(null),B=react.useCallback(D=>v.current?v.current.querySelectorAll(D):[],[v.current]),H=D=>({name:D.name||D.getAttribute("name")||D.getAttribute("data-name"),required:D.required?true:D.getAttribute("data-required")?D.getAttribute("data-required")=="true":false,with:D.with||D.getAttribute("with")}),L=D=>{let F=[];return D.querySelectorAll(".--input").forEach(W=>{F.push(W.value);}),F.join("")},M=D=>D.classList.contains("--otp")?L(D):D.classList.contains("--select")?D.querySelector("button.--selected")?.dataset.value:D.classList.contains("--checkbox")||D.getAttribute("type")==="checkbox"?D.checked:D.value,$=react.useCallback(D=>{let{name:F,required:W,with:Z}=H(D),oe=M(D);if(t&&t[F]&&b?.getSnapshot()){let Q=t[F](oe,b.getSnapshot().values);if(Q===false||typeof Q=="string")return typeof Q=="string"&&b?.setFieldError(F,Q),false}if(W&&(D.type==="checkbox"&&!D.checked||D.classList.contains("--select")&&(oe==="-1"||!oe)||!oe||oe===""))return false;if(Z)switch((Z.includes("@")?Z.split("@")[0]=="match"?je.MatchField:Z.split("@")[0]:Z).toUpperCase()){case je.IPV4:return core._(oe).isIPv4();case je.IPV6:return core._(oe).isIPv6();case je.Email:return core._(oe).isEmail();case je.Uri:try{return new URL(oe),!0}catch{return false}case je.MatchField:let[ie,ce,Se]=Z.split("@"),ae=document.querySelector(`[name=${ce.trim()}]`);if(!ae)return false;switch(Se||"direct-match"){case "if-not-empty":if(ae&&!core._(ae.value).isEmpty()&&ae.value!=D.value)return false;break;case "direct-match":if(ae&&ae.classList.contains("--otp")&&D.classList.contains("--otp")&&L(ae)!=L(D))return false;if(ae&&ae.value!=D.value)return false;break}break}return true},[t,b]),_=react.useCallback(()=>{let D={},F={...b?.getSnapshot().values||{}},W=null,Z=null;if(B("[name]").forEach(Q=>{let{name:ie,required:ce,with:Se}=H(Q),ae=ce||Se?$(Q):true,me=M(Q);D[ie]={valid:ae,value:me},F[ie]=me,b?.setFieldError(ie,ae?null:a?.[ie]||"Invalid"),ae?Q.classList.remove("--with-error"):(Q.classList.add("--with-error"),W||(W=Q),Z=a?.[ie]);}),W){let Q=W;if(Q.classList.contains("--otp"))for(let ie of Array.from(Q.querySelectorAll(".--input"))){let ce=ie;if(ce.value==""){ce.focus();break}}else Q.focus();}let oe=pl(F);return {error:W!=null,errorMsg:Z||"Fix errors to continue...",data:D,payload:oe}},[v.current,b]),R=react.useCallback((D={})=>{let{error:F,errorMsg:W,payload:Z,data:oe}=_();if(F){y.error(W);return}i?react.startTransition(async()=>{h(true),core.withPost(i,{...l,...Z,...D}).then(Q=>{h(false),g&&b?.reset(),p?.(Q,{...l,...Z,...D}),p||y.success(Q.message||"Redirecting...");}).catch(Q=>{h(false),u?u(Q):y.error(Q.message);});}):d?.(Z,oe);},[_,i,l,p,u,g,d]),k=react.useCallback(()=>{let D=B("[type=submit]");!D||D.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):D.forEach(F=>{F.addEventListener("click",R);});},[v.current]),q=react.useMemo(()=>react$1.addPropsToChildren(m,D=>D.props.type=="submit",D=>({ref:A})),[m]),X=react.useRef(R);return react.useImperativeHandle(e,()=>({setLoading:D=>h(D),submit:D=>X.current(D),init:k,hideError:()=>y.clearAll()}),[R,k]),react.useEffect(k,[]),react.useEffect(()=>{X.current=R;},[R]),react.useEffect(()=>{let D=B("[type=submit]"),F=Array.from(D).map(W=>{let Z=W;return Z.addEventListener("click",R),()=>Z.removeEventListener("click",R)});return ()=>F.forEach(W=>W())},[R,B]),jsxRuntime.jsxs(f,{ref:v,style:T,className:`--form flex rel ${x}`,children:[!hn(o)&&jsxRuntime.jsx(Ae,{when:P,spinner:s,...o}),q]})};wn.displayName="Zuz.FormInternal";var Cn=e=>jsxRuntime.jsx(Sn,{initialValues:e.withData,children:jsxRuntime.jsx(wn,{...e})});Cn.displayName="Zuz.Form";var qo=Cn;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(r){return this.stack[this.stack.length-1]===r}push(r){this.stack.includes(r)||(this.stack.push(r),this.updateScrollLock());}pop(r){this.stack=this.stack.filter(t=>t!==r),this.updateScrollLock();}handleEscape(){let r=this.stack[this.stack.length-1];return r?(r(),true):false}get count(){return this.stack.length}},Oe=new Xo;var fl=({action:e,render:r=true,message:t=""})=>jsxRuntime.jsx(f,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:r?t:null}),Tn=fl;var Pn=({cols:e,gap:r,ais:t,aic:n,aie:o,jcs:s,jcc:a,jce:i,className:m="",style:l,...c})=>{let d=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",o?"--aie":"",s?"--jcs":"",a?"--jcc":"",i?"--jce":"",m].filter(Boolean).join(" "),u={...l,gap:typeof r=="number"?`${r}px`:r};return jsxRuntime.jsx(f,{...c,className:d,style:u})};Pn.displayName="Zuz.FlexBox";var we=Pn;var hl=({useForm:e,action:r,actionPosition:t,dialogID:n,variant:o})=>jsxRuntime.jsx(we,{aic:true,as:`--footer rel ${t?t==Ar.Center?"--jcc":"":"--jce"}`.trim(),children:r.map((s,a)=>jsxRuntime.jsx(K,{variant:o,kind:s.kind,type:s.type||"button",onClick:()=>{if(!(e===true&&s.type==="submit")){if(s.handler)return s.handler();if(s.onClick)return s.onClick();console.log("onClick Handler missing");}},as:"--action",children:s.label},`dialog-${n}-action-${s.key||a}`))}),In=hl;var yl={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"})," "]}),[Be.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"})}),[Be.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"})}),[Be.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"})}),[Be.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"})]})},O=yl;var xl=({title:e="Alert",description:r,titlePosition:t="center",onClose:n})=>jsxRuntime.jsxs(we,{as:"--head rel",children:[jsxRuntime.jsxs(we,{cols:true,as:[`--${e?"title":"dot"} rel`,`--position-${t}`],children:[jsxRuntime.jsx(z,{children:e}),r&&jsxRuntime.jsx(z,{as:"--description",children:r})]}),jsxRuntime.jsx(K,{onClick:o=>n(),className:`--closer abs ${t=="center"?"center-v":""}`,children:O.close})]}),Nn=xl;var Ln=({ref:e,...r})=>{let{index:t,id:n,title:o,description:s,titleAlignment:a,message:i,content:m,transition:l,curve:c,speed:d,type:u,width:p,action:g,actionPosition:C,spinner:x,loadingMessage:T,variant:S,inBackground:P,forceClose:h,forceLoading:v,useForm:y,formProps:b,onConfirm:I,onCancel:A,onClose:B,onShow:H,onHide:L,...M}=r,$=react.useMemo(()=>core.uuid(12),[]),[_,R]=react.useState(o||""),[k,q]=react.useState(s||""),[X,D]=react.useState(m||i||""),[F,W]=react.useState(u||Qe.Dialog),[Z,oe]=react.useState(false),[Q,ie]=react.useState(true),[ce,Se]=react.useState(()=>g?g.map(Me=>({...Me,key:Me.key||core.uuid(12)})):null),[ae,me]=react.useState(false),{variant:U,spinner:ne,dialog:re}=Y(true),de=S||re?.variant||U||G.Small,{style:De,className:Ce,rest:ge}=N(M),Le=react.useRef(null),se=be({when:Z,duration:d||re?.speed||.3,delay:re?.delay||.1,transition:l||re?.transition||j.SlideInBottom,curve:c||re?.curve||te.EaseInOut,watch:["scale","filter","transform"]}),ye=()=>{oe(false),B(n);},Ft=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{Oe.isTop(ye)&&ye();}}],[Z]);hooks.useShortcuts(Ft),react.useEffect(()=>{W(Qe.Dialog),D(m||i),R(_),q(k),oe(true),setTimeout(()=>H?H():()=>{},500);},[]),react.useEffect(()=>{h&&ye();},[h]),react.useEffect(()=>{v!=null&&me(v);},[v]),react.useEffect(()=>(Z?Oe.push(ye):Oe.pop(ye),()=>Oe.pop(ye)),[Z]);let zt=react.useMemo(()=>1e4+t*10,[t]),He=jsxRuntime.jsxs(f,{as:`--dialog --${(u??Qe.Default).toLowerCase()} ${Z?"--visible":""} ${Ce} fixed abc`.trim(),style:{...se.style,zIndex:zt+1,pointerEvents:P==true?"none":"auto",width:p||"auto",...P==true?{scale:"0.92",filter:"blur(2px)"}:{}},...ge,ref:Le,children:[jsxRuntime.jsx(Nn,{title:_,description:s,titlePosition:a||re?.titleAlignment||"center",onClose:ye}),jsxRuntime.jsx(Tn,{message:X,render:Q,action:ce}),ce&&ce.length>0&&jsxRuntime.jsx(In,{variant:de,action:ce,dialogID:$,useForm:y,actionPosition:C}),jsxRuntime.jsx(Ae,{when:ae,spinner:x||re?.spinner||ne?.type||ve.Simple,message:T||re?.loadingMessage})]});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Je,{style:{zIndex:zt},when:Z}),y?jsxRuntime.jsx(qo,{onSubmit:((Me,wo)=>{I?.(Me,wo);}),...b,children:He}):He]})};Ln.displayName="Zuz.Dialog";var Qo=Ln;var Mn=react.forwardRef((e,r)=>{let{speed:t,smooth:n=false,breakpoints:o={},style:s,...a}=e,{rootRef:i,containerRef:m,thumbY:l,thumbX:c,onScrollY:d,onScrollX:u}=hooks.useScrollbar(t||1,o,n),{style:p,className:g,rest:C}=N(a);return react.useEffect(()=>{let x=m.current;if(!x)return;let T=()=>{window.dispatchEvent(new Event("resize"));},S=P=>{let h=P.target;if(h.closest(".--allow-scroll")){let y=h.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:I,clientHeight:A}=y,B=P.deltaY<0,H=P.deltaY>0;(B&&b>0||H&&b+A<I)&&P.stopPropagation();}};return x.addEventListener("scroll",T),x.addEventListener("wheel",S,{passive:true}),()=>{x.removeEventListener("scroll",T),x.removeEventListener("wheel",S);}},[m]),jsxRuntime.jsxs(f,{ref:i,className:g.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(f,{as:`--scroll-content ${g}`.trim(),ref:m,style:s||{},children:C.children}),jsxRuntime.jsx(f,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(f,{as:"--scroll-thumb --abs --round",ref:l,onMouseDown:d})}),jsxRuntime.jsx(f,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(f,{as:"--scroll-thumb --abs --round",ref:c,onMouseDown:u})})]})});Mn.displayName="Zuz.ScrollView";var Jo=Mn;var On=({ref:e,...r})=>{let{id:t,index:n,from:o,speed:s,children:a,margin:i,animation:m,prerender:l,inBackground:c,forceClose:d,forceLoading:u,onClose:p,...g}=r,{drawer:C}=Y(true),[x,T]=react.useState(a),[S,P]=react.useState(false),[h,v]=react.useState(l??(C?.prerender||true)),[y,b]=react.useState(false),I=()=>{P(false),p?.(t??-1);},{className:A,style:B,rest:H}=N(g),L=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{Oe.isTop(I)&&I();}}],[S]);hooks.useShortcuts(L),react.useEffect(()=>{T(a);},[a]),react.useEffect(()=>(S?Oe.push(I):Oe.pop(I),()=>Oe.pop(I)),[S]),react.useEffect(()=>{P(true);},[]),react.useEffect(()=>{d&&I();},[d]),react.useEffect(()=>{u!=null&&b(u);},[u]);let M=o||C?.from||Te.Left,$=react.useMemo(()=>{switch(M){case Te.Left:return {from:{x:"-100vw"},to:{x:0}};case Te.Right:return {from:{x:"100vw"},to:{x:0}};case Te.Top:return {from:{y:"-100vh"},to:{y:0}};case Te.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,C?.from]),_=be({from:{...$.from,opacity:0},to:{...$.to,opacity:1},when:S,curve:m||C?.animation||te.EaseInOut,duration:s||C?.speed||.5,watch:["scale","filter"]}),R=react.useMemo(()=>1e4+(n||1)*10,[n]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Je,{onClick:k=>{S&&I();},when:S,style:{zIndex:R}}),jsxRuntime.jsxs(f,{ref:e,"aria-hidden":!S,className:`--drawer flex cols ${A} --${M.toLowerCase()} fixed`,style:{...B,..._.style,"--m":`${i||C?.margin||0}px`,zIndex:R+1,pointerEvents:c==true?"none":"auto",...c==true?{scale:"0.92",filter:"blur(2px)"}:{}},...H,children:[o==Te.Top||o==Te.Bottom?jsxRuntime.jsx(f,{className:"--handle"}):null,jsxRuntime.jsx(K,{as:"--close-drawer --abs",onClick:I,children:O.close}),jsxRuntime.jsxs(Jo,{as:"rel",children:[h||S?x:null,jsxRuntime.jsx(Ae,{when:y})]})]})]})};On.displayName="Zuz.Drawer";var or=On;var Dn=react.forwardRef((e,r)=>{let{progress:t,type:n,animated:o,...s}=e,a=react.useRef(null);react.useImperativeHandle(r,()=>({setProgress:c=>{a.current.style.width=`${c*100}%`,a.current.setAttribute("data-value",c+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),react.useEffect(()=>{t&&a.current&&(o?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:i,style:m,rest:l}=N(s);return jsxRuntime.jsx(f,{className:`--progress ${o?"--animated":""} flex rel ${i}`.trim(),style:m,...l,children:jsxRuntime.jsx(f,{ref:a,className:"--bar rel"})})});Dn.displayName="Zuz.ProgressBar";var tt=Dn;var Ol=e=>{let{index:r,id:t,type:n,icon:o,busy:s,width:a,title:i,message:m,duration:l,sticky:c=false,actions:d=[],position:u,style:p,isHovered:g,total:C,progress:x,progressValue:T,forceClose:S,variant:P,onClick:h,onClose:v}=e,[y,b]=react.useState(false),[I,A]=react.useState(false),{toast:B}=Y(true),H=typeof T=="number",L=H?Math.max(0,Math.min(1,T)):void 0,M=I||S,$=u??B?.position??"TopCenter",_=n??B?.type??"default",R=p??B?.style??"stack",k=l??B?.duration??4,q=x??B?.progress??false,X=react.useRef(k*1e3),D=react.useRef(void 0),F=react.useRef(void 0),W=react.useRef(null),Z=be({when:y&&!M,duration:.3,transition:B?.transition||($.includes("Top")?j.SlideInTop:$.includes("Bottom")?j.SlideInBottom:$.includes("Left")?j.SlideInLeft:j.SlideInRight),curve:B?.curve||te.EaseInOut,watch:["transform","opacity","scale","filter"]});react.useEffect(()=>{b(true);let U=ne=>{if(F.current!==void 0){let re=ne-F.current;if(!H&&!g&&!c&&!M&&(X.current-=re,W.current)){let de=Math.max(0,X.current/(k*1e3)*100);W.current?.setProgress?.(de/100);}}F.current=ne,X.current<=0?A(true):D.current=requestAnimationFrame(U);};return D.current=requestAnimationFrame(U),()=>{D.current&&cancelAnimationFrame(D.current);}},[g,c,M,k]),react.useEffect(()=>{if(M){let U=setTimeout(()=>{v?.(t);},350);return ()=>clearTimeout(U)}},[M,t]);let oe=R==="stack",Q=g?r*65:r*8,ie=g?1:Math.max(.85,1-r*.05),ce=g?1:Math.max(.4,1-r*.2),Se=U=>{h?h(U):s!==true&&(!d||d.length===0)&&A(true);},ae=Z.style.transform||"translate(0, 0)",me=M?ae:`${ae} translateY(${$.includes("Top")?Q:-Q}px) scale(${ie})`;return jsxRuntime.jsxs(f,{onClick:Se,as:`--snack --${M?"hidden":"visible"} --${P||B?.variant||G.Medium} --${_} --${$.toLowerCase()} abs flex aic`,style:{...Z.style,zIndex:1e3-r,pointerEvents:M?"none":"auto",opacity:M?Z.style.opacity:ce,transform:me,filter:!M&&oe&&!g&&r>0?"blur(1px)":"none",cursor:!d||d.length===0?"pointer":"default",transition:`${Z.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxRuntime.jsxs(f,{as:"--ico flex aic jcc rel",children:[o?jsxRuntime.jsx(ee,{name:o}):jsxRuntime.jsx(f,{as:"--no-icon"}),s===true&&jsxRuntime.jsx(Pe,{as:"abs abc"})]}),jsxRuntime.jsxs(f,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsxRuntime.jsx(z,{as:"--tt",children:i||un[n]}),jsxRuntime.jsx(z,{as:"--tm",children:m})]}),d&&d.length>0&&jsxRuntime.jsx(f,{as:"--actions flex gap:5",children:d.map((U,ne)=>jsxRuntime.jsx(K,{as:"--snack-btn bold",variant:G.XSmall,onClick:re=>{re.stopPropagation(),U.onClick(re);},children:U.label},ne))}),(q||H)&&jsxRuntime.jsx(tt,{as:"abs",progress:L,ref:W})]})},nr=Ol;var Re=react.createContext(null),Fl=({ref:e,...r})=>{let n=react.useContext(Re)?.depth??0,[o,s]=react.useState(null),[a,i]=react.useState(null),[m,l]=react.useState(false),[c,d]=react.useState([]),u=hooks.useDelayed(),p=react.useRef(0),g=()=>++p.current,C=()=>{l(false),setTimeout(()=>i(null),200);};react.useImperativeHandle(e,()=>({add(h){let v=g(),y={id:v,...h};return d(b=>[...b,y]),v},openMenu(h){l(false),setTimeout(()=>{i({id:g(),type:"menu",props:h}),l(true);},16);},update(h,v){d(y=>y.map(b=>b.id!==h?b:{...b,props:{...b.props,...v}}));},remove(h){d(v=>v.map(y=>y.id===h?{...y,props:{...y.props,forceClose:true}}:y)),a?.id===h&&C();},loading(h,v){d(y=>y.map(b=>b.id===h?{...b,props:{...b.props,forceLoading:v}}:b)),a?.id===h&&C();},clear(h){d(c.filter(v=>v.type!=h));}})),react.useEffect(()=>{if(a&&m){let h=()=>C();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[a,m,C]);let x=h=>{setTimeout(()=>{d(v=>v.filter(y=>y.id!==h)),a?.id===h&&i(null);},250);},T=react.useMemo(()=>[...c.filter(h=>h.type!="toast")],[c]);if(!u)return null;let S=c.filter(h=>h.type=="toast").reverse(),P=Object.values(jt);return reactDom.createPortal(jsxRuntime.jsxs(f,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[T.map((h,v)=>{let y=v<T.length-1;return h.type==="dialog"?jsxRuntime.jsx(Qo,{onClose:x,index:v,id:h.id,...h.props,inBackground:y},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsxRuntime.jsx(or,{onClose:x,index:v,id:h.id,...h.props,inBackground:y},`layer-${h.type}-${h.id}`):null}),P.map(h=>{let v=S.filter(y=>(y.props.position||"TopCenter")===h);return v.length===0?null:jsxRuntime.jsx(f,{onMouseEnter:()=>s(h),onMouseLeave:()=>s(null),as:`--toast-container fixed --${h.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:v.map((y,b)=>jsxRuntime.jsx(nr,{index:b,total:v.length,isHovered:o===h,onClose:x,id:y.id,...y.props},y.id))},h)}),a&&jsxRuntime.jsx(f,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(Do,{onClose:C,when:m,...a.props},`menu-${a.id}`)})]}),document.body)},zl=({children:e})=>{let r=react.useContext(Re),t=r?r.depth+1:0,n=react.useRef(null),o=react.useMemo(()=>({add:s=>n.current?.add(s),openMenu:s=>n.current?.openMenu(s),update:(s,a)=>n.current?.update(s,a),remove:s=>n.current?.remove(s),loading:(s,a)=>n.current?.loading(s,a),clear:s=>n.current?.clear(s),depth:t,isSubLayer:!!r}),[r]);return jsxRuntime.jsxs(Re.Provider,{value:o,children:[e,jsxRuntime.jsx(Fl,{ref:n})]})},Oo=zl;var Kl=()=>{let e=react.useContext(Re);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,o,s)=>{n.preventDefault(),e.openMenu({event:n,items:o,origin:s});},showMenu:(n,{items:o,origin:s,offsetX:a,offsetY:i,transition:m,curve:l,arrow:c,duration:d,header:u,footer:p})=>{e.openMenu({fx:{transition:m,curve:l,duration:d},parent:n,items:o,origin:s||St.TopCenter,offsetX:a,offsetY:i,arrow:c,header:u,footer:p});},hide:e.clear}},Zl=Kl;var Gl=()=>{let e=react.useContext(Re);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("dialog"),t=a=>e.remove(a),n=(a,i)=>e.loading(a,i);return {clearAll:r,show:a=>{let i=e.add({type:"dialog",props:{...a,type:Qe.Dialog}});return {id:i,setLoading:m=>n(i,m),hide:()=>t(i)}},confirm:a=>{let i=e.add({type:"dialog",props:{...a,type:Qe.Confirm,action:a.action??[{label:a.cancelLabel??"Cancel",kind:"ghost",onClick:()=>{a.onCancel?.(),t(i);}},{label:a.confirmLabel??"Confirm",kind:"solid",type:"submit",onClick:m=>{a.onConfirm?.(m);}}]}});return {id:i,setLoading:m=>n(i,m),hide:()=>t(i)}},hide:t}},Ul=Gl;var Xl=()=>{let e=react.useContext(Re);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("drawer"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a),o=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:i=>n(a,i),close:()=>t(a)}};return {clearAll:r,open:s=>o({children:s}),right:s=>o({children:s,from:Te.Right}),left:s=>o({children:s,from:Te.Left}),top:s=>o({children:s,from:Te.Top}),bottom:s=>o({children:s,from:Te.Bottom}),close:t}},Yl=Xl;var Ql=(e,r,t={})=>{let[n,o]=react.useState(null),[s,a]=react.useState(false),{duration:i=.25,curve:m=te.EaseOutBack,borderRadius:l={from:40,to:24},targetWidth:c=320}=t;return react.useLayoutEffect(()=>{r&&e.current?(o(e.current.getBoundingClientRect()),a(true)):r||a(false);},[r,e]),{style:be({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:l.from},to:{opacity:1,width:c,height:"auto",borderRadius:l.to},curve:m,duration:i,when:s&&r}).style,isMeasured:s,sourceRect:n}},Jl=Ql;var rc=(e,r={})=>{let{offset:t=8,direction:n="bottom",container:o=null,triggerRef:s=null}=r,a=react.useRef(null),i=react.useCallback(()=>{let m=e.current;if(!m)return;let l=s?.current||m.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=m.getBoundingClientRect(),d=l.getBoundingClientRect(),u,p;o?(u=o.getBoundingClientRect(),p="absolute"):(window.getComputedStyle(m).position==="fixed"?p="fixed":p="absolute",p==="fixed"?u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),m.style.position!==p&&(m.style.position=p),a.current=p;let x=0,T=0;switch(n){case "top":x=d.top-c.height-t,T=d.left,x<u.top&&d.bottom+c.height+t<=u.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,T=d.left,x+c.height>u.bottom&&d.top-c.height-t>=u.top&&(x=d.top-c.height-t);break;case "left":x=d.top,T=d.left-c.width-t,T<u.left&&d.right+c.width+t<=u.right&&(T=d.right+t);break;case "right":x=d.top,T=d.right+t,T+c.width>u.right&&d.left-c.width-t>=u.left&&(T=d.left-c.width-t);break}if(x=Math.max(u.top,Math.min(x,u.bottom-c.height)),T=Math.max(u.left,Math.min(T,u.right-c.width)),a.current==="fixed")m.style.top=`${x}px`,m.style.left=`${T}px`;else {let S;m.offsetParent?S=m.offsetParent.getBoundingClientRect():S={top:0,left:0};let P=x-S.top+window.scrollY,h=T-S.left+window.scrollX;m.style.top=`${P}px`,m.style.left=`${h}px`;}},[e,s,t,n,o]);return react.useEffect(()=>{let m=e.current;if(!m)return;let l=s?.current||m.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=new ResizeObserver(i);return c.observe(m),l&&c.observe(l),i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,true),()=>{c.disconnect(),l&&c.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,true);}},[e,n,t,o,s]),{postion:a.current,reposition:i}},Bt=rc;var sc=()=>{let e=react.useContext(Re);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(p,g)=>e.add({type:"toast",props:{...g,type:p}}),t=()=>e.clear("toast"),n=p=>e.remove(p),o=(p,g)=>e.update(p,g),s=p=>({id:p,update:g=>o(p,g),setType:g=>o(p,{type:g}),setProgress:g=>o(p,{progress:true,progressValue:g}),setBusy:g=>o(p,{busy:g}),success:()=>o(p,{type:"success"}),error:()=>o(p,{type:"error"}),warn:()=>o(p,{type:"warn"}),promise:()=>o(p,{type:"promise"}),default:()=>o(p,{type:"default"}),hide:()=>n(p)}),a=p=>s(r("default",p)),i=p=>s(r("success",p)),m=p=>s(r("error",p)),l=p=>s(r("warn",p)),c=p=>s(r("promise",p)),d=(p,g,C)=>{let x=r(p,{...g,sticky:g.sticky??false,actions:[{label:C?.label||"Ok",onClick:T=>{C?.onClick?.(T),n(x);}}]});return s(x)},u=(p,g,C,x)=>{let T=r(p,{...g,sticky:true,actions:[{label:C?.label||"Ok",onClick:S=>{C?.onClick?.(S),(C?.hide??false)===true&&n(T);}},{label:x?.label||"Cancel",onClick:S=>{x?.onClick?.(S),(x?.hide??true)===true&&n(T);}}]});return s(T)};return {show:a,hide:n,promise:c,clearAll:t,ok:(p,g)=>d("default",p,g),success:(p,g)=>g?d("success",p,g):i(p),error:(p,g)=>g?d("error",p,g):m(p),confirm:(p,g,C)=>u("default",p,g,C),warn:(p,g)=>g?d("warn",p,g):l(p),succes:(p,g)=>g?d("success",p,g):i(p)}},ac=sc;var Zn=({ref:e,style:r,...t})=>{let n=react.useRef(null),o=react.useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:i}=N(t,o);return jsxRuntime.jsx("div",{ref:e||n,style:{...s,...r||{}},className:a,...i})};Zn.displayName="Zuz.Box";var f=Zn;var Gn=react.forwardRef((e,r)=>{let{title:t,message:n,...o}=e,[s,a]=react.useState(false);return jsxRuntime.jsxs(f,{className:"--accordion flex cols",...o,children:[jsxRuntime.jsxs(K,{onClick:i=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(z,{className:"--label flex",children:t}),jsxRuntime.jsx(f,{className:"--arrow flex",children:s?O.arrowUp:O.arrowDown})]}),s&&jsxRuntime.jsx(f,{className:"--detail",children:n})]})});Gn.displayName="Zuz.Accordion";var uc=Gn;var fc=({label:e,icon:r,onClick:t,idx:n,selected:o})=>jsxRuntime.jsx(K,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof r=="string"?jsxRuntime.jsx(ee,{name:r}):r}),qn=fc;var Xn=react.forwardRef((e,r)=>{let{items:t,name:n,selected:o,position:s,...a}=e,i=react.useRef(null),[m,l]=react.useState(o||t[0].tag||0),c=react.useCallback(({x,y:T})=>{if(i.current){let S=i.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-S.left}`),document.documentElement.style.setProperty("--tip-y",`${T-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=react.useCallback(()=>{i.current&&(i.current.removeEventListener("pointerleave",d),i.current.removeEventListener("pointermove",c),document.documentElement.style.setProperty("--tip-s","0"));},[]),u=react.useCallback(()=>{i.current&&(i.current.addEventListener("pointerleave",d),i.current.addEventListener("pointermove",c));},[]);react.useEffect(()=>{i.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,T)=>T.label.length>x.length?T.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),i.current?.addEventListener("pointerenter",u));},[]);let{className:p,style:g,rest:C}=N(a);return jsxRuntime.jsxs(f,{ref:i,style:g,className:[`--actionbar flex aic ${p}`,`${!s||s==xe.Auto?"rel":`--${s}`}`].join(" ").trim(),...C,children:[t.map((x,T)=>jsxRuntime.jsx(qn,{selected:m===x.tag||o==T,...x,idx:T},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(f,{className:"--tip abs",children:jsxRuntime.jsx(f,{className:"--track flex aic",children:t.map(({label:x})=>jsxRuntime.jsx(f,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Xn.displayName="Zuz.ActionBar";var xc=Xn;var jn=react.forwardRef((e,r)=>{let{type:t,icon:n,title:o,message:s,iconSize:a,...i}=e,{className:m,style:l,rest:c}=N(i);return jsxRuntime.jsxs(f,{className:`--alert --${t||Be.Info} flex aic ${m}`.trim(),style:l,...c,children:[jsxRuntime.jsx(f,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&O[t||Be.Info]}),jsxRuntime.jsxs(f,{className:"--meta flex cols",children:[jsxRuntime.jsx(z,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(z,{className:"--message",h:2,children:s})]})]})});jn.displayName="Zuz.Alert";var Sc=jn;var Jn=({ref:e,...r})=>{let{variant:t,numeric:n,name:o,onConfirm:s,...a}=r,{style:i,className:m,rest:l}=N(a),{variant:c}=Y(true),d=react.useRef(null),u=it(),p=o?u.errors?.[o]:null,g=o&&u.values&&u.setFieldValue,C=g?u.values?.[o]:void 0,x=hooks.useDebounce(S=>{g&&u.setFieldValue?.(o,S);},500),T=S=>{let P=S.currentTarget.value;n&&(P=P.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),S.currentTarget.value=P),x(P),r.onInput?.(S);};return react.useEffect(()=>{d.current&&o&&C!==void 0&&d.current.value!==String(C)&&(d.current.value=String(C));},[C,o]),react.useEffect(()=>()=>{g&&u.deleteFieldValue?.(o);},[]),jsxRuntime.jsx("input",{name:o,className:`--input --${t||c} ${p?"--has-error":""} --flex ${m}`.trim(),style:i,defaultValue:C??r.defaultValue??"",onInput:T,onKeyDown:S=>{S.key=="Enter"&&s?.(S.currentTarget.value);},ref:S=>{d.current=S,typeof e=="function"?e(S):e&&(e.current=S);},...l})};Jn.displayName="Zuz.Input";var ue=Jn;var ts=e=>{let{meta:r,children:t}=e,n=hooks.useDelayed(),{label:o,icon:s,...a}=react.isValidElement(r)?{}:r,{className:i,style:m,rest:l}=N({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return react.isValidElement(r)?jsxRuntime.jsx("li",{style:m,className:i,children:r}):jsxRuntime.jsxs("li",{style:m,className:i,...l,children:[t,typeof r=="string"?r:o]})};ts.displayName="Zuz.ListItem";var os=ts;var ns=react.forwardRef((e,r)=>{let{items:t,variant:n,direction:o,seperator:s,ol:a,...i}=e,{className:m,style:l,rest:c}=N(i),d=a==true?"ol":"ul";return react.createElement(d,{className:`--list --${n||G.Small} flex ${o??"cols"} ${m}`.trim(),style:l,ref:r,...c,children:t.map((u,p,g)=>{let C=`${typeof u=="string"?`li-${String(u)}`:react.isValidElement(u)?`li-${u.key}`||`${p}-${core.MD5(u.toString())}`:u.label}-${p}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(os,{meta:u}),s&&g[p+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${p+1}-${C}`):null]},C)})})});ns.displayName="Zuz.List";var rt=ns;var as=react.forwardRef((e,r)=>{let{fx:t,action:n,data:o,withStyle:s,onChange:a,...i}=e,{className:m}=N({as:s||""}),{style:l}=N(i),[c,d]=react.useState(false),[u,p]=react.useState(o||[]),g=react.useRef(null),C=react.useRef(null),x=react.useRef(null),T=react.useMemo(()=>i.name||core.uuid(12),[]),[S,P]=react.useState(null),[h,v]=react.useState(null),[y,b]=react.useState([]),A=hooks.useDebounce(R=>{R.target.value==""?(d(false),p([])):n&&R.target.value.trim()!=""&&core.withPost(n,{query:R.target.value}).then(k=>{"items"in k&&core._(k.items).isArray()?(p(k.items),v(R.target.value),b(k.items)):console.error("Action Response should contain items array"),P(null);}).catch(k=>{P(null),p([]);});},250),B=()=>{if(C.current){let R=C.current.getBoundingClientRect(),k=window.innerHeight-R.bottom,q=R.top;if(x.current){let X=x.current;k<X.offsetHeight&&q>k?(X.style.top="auto",X.style.bottom=`${R.height}px`,X.style.maxHeight=`${q-150}px`):(X.style.top=`${R.height+5}px`,X.style.bottom="auto",X.style.maxHeight=`${k-150}px`);}}},H=R=>{if(u.length>0){if((R.key==="ArrowDown"||R.key==="ArrowUp")&&(R.preventDefault(),R.stopPropagation()),R.key==="Escape")P(null),d(false),p([]);else if(R.key==="ArrowDown")P(k=>{let q=k===null||k===u.length-1?0:k+1;return M(q),q});else if(R.key==="ArrowUp")P(k=>{let q=k===null||k===0?u.length-1:k-1;return M(q),q});else if(R.key==="Enter"&&S!==null){let k=u[S];g.current&&(g.current.value=k,d(false),p([]));}}},L=R=>{g.current&&(g.current.value=R,d(false),p([]));},M=R=>{let k=u[R];if(k&&g.current&&(g.current.value=k,g.current.setSelectionRange(k.length,k.length)),x.current){let X=x.current.children[R];X&&X.scrollIntoView({block:"nearest"});}},$=R=>{C.current&&!C.current.contains(R.target)&&(d(false),p([]));},_=()=>{g.current&&g.current.value===h&&(p(y),P(null),B());};return react.useEffect(()=>(window.addEventListener("resize",B),window.addEventListener("scroll",B,true),document.addEventListener("mousedown",$),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",B,true),document.removeEventListener("mousedown",$);}),[]),react.useEffect(()=>{B();},[u]),jsxRuntime.jsxs(f,{style:l,ref:C,className:`--autocomplete --${e.size||G.Small} flex aic rel ${m}`.trim(),children:[jsxRuntime.jsx(ue,{ref:g,autoComplete:"off",onChange:A,onKeyDown:H,onFocus:_,...i}),jsxRuntime.jsx(f,{className:"--arrow rel flex aic jcc",children:u.length>0?O.arrowUp:O.arrowDown}),u.length>0&&jsxRuntime.jsx(rt,{id:T,ref:x,className:"--suggestion-list flex cols abs",items:u.map((R,k)=>({label:R,onClick:q=>{q.preventDefault(),q.stopPropagation(),L(R);},className:S===k?"--current":"",animate:{transition:j.SlideInBottom,curve:te.EaseInOut,delay:core.clamp(.02*k,.02,.5)}}))})]})});as.displayName="Zuz.AutoComplete";var zc=as;var is=react.forwardRef((e,r)=>{let t=react.useRef(null),n=react.useMemo(()=>r&&typeof r!="function"&&r.current?r:t,[r]),{style:o,className:s,rest:a}=N(e,n);return !a.src||a.src==""?null:jsxRuntime.jsx("img",{ref:n,style:o,className:`${s} flex`,...a})});is.displayName="Zuz.Image";var nt=is;var ls=react.forwardRef((e,r)=>{let{src:t,variant:n,type:o,crossOrigin:s,referrerPolicy:a,fx:i,as:m,alt:l,color:c,style:d,...u}=e,[p,g,C]=hooks.useImage(t??"",s,a),{className:x,style:T,rest:S}=N({fx:i,as:m});return jsxRuntime.jsx(f,{className:`--avatar --${n||G.Small} --${(o||Hr.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:c||"var(--avatar-bg, var(--primary))",...d,...T},...S,children:t?jsxRuntime.jsx(nt,{src:p,crossOrigin:s,referrerPolicy:a,...u}):jsxRuntime.jsx(z,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});ls.displayName="Zuz.Avatar";var Xc=ls;var Yc=({size:e=5,type:r="dead",label:t="",variant:n=G.Small,loading:o=false,spinner:s,...a})=>{let{style:i,className:m,rest:l}=N(a);return jsxRuntime.jsxs(f,{style:{...core._(t).isEmpty()?{"--badge-size":e}:{},...i},as:`--badge --${n} --${r} rel flex aic jcc ${m}`.trim(),children:[jsxRuntime.jsx(f,{fx:{transition:j.FadeIn,curve:te.Liquid,duration:.5,when:o},as:"abs abc",children:jsxRuntime.jsx(Pe,{type:s})}),core._(t).isEmpty()?jsxRuntime.jsx(f,{as:`--dot --${r}`}):jsxRuntime.jsx(z,{as:"--label",children:t})]})},jc=Yc;var pm=[{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,r=e.getDay();return dateFns.addDays(e,(6-r)%7||6)},getDateFormat:()=>{let e=new Date,r=e.getDay();return dateFns.format(dateFns.addDays(e,(6-r)%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)}],um=e=>{let r=new Set;return e.filter(t=>{if(t.label=="Later")return true;let n=t.getDate().toISOString().split("T")[0];return r.has(n)?false:(r.add(n),true)})},ms=react.forwardRef((e,r)=>{let{defaultValue:t,variant:n,onChange:o,...s}=e,{style:a,className:i,rest:m}=N(s),[l,c]=react.useState(t||new Date),d=dateFns.startOfMonth(l),u=dateFns.endOfMonth(l),p=dateFns.startOfWeek(d),g=dateFns.endOfWeek(u),C=react.useMemo(()=>dateFns.eachDayOfInterval({start:p,end:g}),[p,g]),x=P=>{o?.(P),c(P);},T=()=>{c(P=>new Date(P.getFullYear(),P.getMonth()-1));},S=()=>{c(P=>new Date(P.getFullYear(),P.getMonth()+1));};return jsxRuntime.jsxs(f,{as:`--calendar flex --${n||"sm"} ${i}`,style:a,children:[jsxRuntime.jsx(f,{as:"--calendar-quick-select flex cols flex:1",children:um(pm).map(P=>{let h=P.getDate();return jsxRuntime.jsxs(K,{onClick:()=>x(h),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(z,{as:"flex:1",children:P.label}),jsxRuntime.jsx(z,{as:"tar",children:P.getDateFormat()})]},`--dtp-option-label-${P.label}`)})}),jsxRuntime.jsxs(f,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(f,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(z,{as:"flex:1 --calendar-cm bold",children:dateFns.format(l,"MMMM yyyy")}),jsxRuntime.jsx(K,{onClick:T,as:"--calendar-chevron",children:O.chevronUpOutline}),jsxRuntime.jsx(K,{onClick:S,as:"--calendar-chevron",children:O.chevronDownOutline})]}),jsxRuntime.jsxs(f,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(P=>jsxRuntime.jsx(z,{as:"--calendar-day",children:P},`--calendar-hd-${P}`)),C.map((P,h)=>{let v=dateFns.isSameMonth(P,l),y=dateFns.isSameDay(P,l),b=dateFns.isToday(P);return jsxRuntime.jsx(K,{disabled:!v,onClick:()=>x(P),as:["--calendar-day --calendar-dd",`${y?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:dateFns.format(P,"d")},`--calendar-day-${h}-${P.getFullYear()}-${P.getMonth()}-${P.getDay()}`)})]})]})]})});ms.displayName="Zuz.Calendar";var pr=ms;var lo=(t=>(t.Table="table",t.Gooey="gooey",t))(lo||{});var ds=({ref:e,...r})=>{let{itemCount:t,itemsPerPage:n,startPage:o,pageRange:s,paginationStyle:a,breakLabel:i,prevLabel:m,nextLabel:l,hash:c,loading:d,seperator:u,renderOnZeroPageCount:p,asDots:g,progressBar:C,onPageChange:x,...T}=r,S=react.useRef(null),P=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),h=react.useCallback(R=>`${core.toHash(R,c||6,P)}${u||""}${P}`,[P]),v=react.useMemo(()=>i||"...",[i]),y=react.useRef(null),[b,I]=react.useState({id:c?o?typeof o=="number"?h(o):o:1:o||1,label:o||1});react.useImperativeHandle(e,()=>({setPage:R=>I(R),getPage:R=>b,setProgress:R=>y.current?.setProgress?.(R),getProgress:()=>y.current?.getProgress?.()??0}),[y.current]);let{style:A,className:B,rest:H}=N(T),L=react.useCallback(R=>typeof R=="number"?R:+R.label,[]);if(!t)throw new Error('"itemCount" prop is required');let M=react.useMemo(()=>Math.ceil(t/n),[t,n]),$=react.useMemo(()=>{let R=[],k=Math.max(L(b)-(s||2),1),q=Math.min(L(b)+(s||2),M);k>1&&R.push({id:c?h(1):1,label:1}),k>2&&R.push({id:-1,label:v});for(let X=k;X<=q;X++)R.push({id:c?h(X):X,label:X});return q<M-1&&R.push({id:-1,label:v}),q<M&&R.push({id:c?h(M):M,label:M}),R},[b]),_=react.useCallback(R=>{let k=R;+k.label<1||+k.label>M||(I(k),x?.(k));},[t,n,b]);return $.length<=1&&(p??false)===false?null:jsxRuntime.jsxs(f,{ref:S,as:`--pagination ${g===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${B}`,children:[jsxRuntime.jsx(f,{as:"flex flex:1 aic --pgt-btns",children:($.length>1?$:[{id:1,label:1},{id:-1,label:v}]).map((R,k,q)=>{let X=(typeof R=="string"?R:R.label)==L(b);return jsxRuntime.jsx(K,{disabled:R.id==-1||L(b)==+R.label,className:X?"--current-page":"",onClick:D=>_(R),children:g===true?C===true&&X?jsxRuntime.jsx(tt,{ref:y}):"":typeof R=="string"?R:R.label},`--pg-${k}-${R.id}`)})}),jsxRuntime.jsx(f,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(L(b)-1)*n+1} - `,`${Math.min(L(b)*n,t)} of ${t} items`].join(" ")}),jsxRuntime.jsxs(f,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(K,{disabled:L(b)<=1,onClick:R=>_({id:c?h(L(b)-1):L(b)-1,label:L(b)-1}),children:O.chevronLeftOutline}),jsxRuntime.jsx(K,{disabled:$.length<=1||L(b)==L($[$.length-1]),onClick:R=>_({id:c?h(L(b)+1):L(b)+1,label:L(b)+1}),children:O.chevronRightOutline})]})]})};ds.displayName="Zuz.Pagination";var Mt=ds;function vm(e,r){let{items:t,renderItem:n,effect:o="slide",loop:s=true,loopMode:a="infinite",startIndex:i=0,useKeys:m=true,useWheel:l=true,spacing:c=160,rotation:d=20,scaleStep:u=.15,blur:p=4,animation:g="power",showDots:C=false,autoPlay:x=false,autoPlaySpeed:T=3,onChange:S,...P}=e,{className:h,style:v}=N(P),y=react.useRef(null),b=T/(T>=1e3?1e3:1),I=hooks.useCarousel({total:t.length,initialIndex:i,loop:s,useKeys:m,useWheel:l,onChange:M=>{y.current?.setPage({id:M+1,label:M+1}),y.current?.setProgress(0),S?.(M);}}),{pause:A,resume:B,reset:H}=hooks.useTimer({duration:b,autoStart:x===true,onProgress:M=>{x===true&&y.current?.setProgress(1-M);},onExpired:()=>{x===true&&I.next(),H();}}),L={...v,"--carousel-spacing":`${c}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${p}px`,"--carousel-scale-step":u,"--active-index":I.index,"--carousel-transition":`var(--${g})`};return jsxRuntime.jsxs(f,{ref:r,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${h}`.trim(),style:L,children:[jsxRuntime.jsx(f,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((M,$)=>{let _=$-I.index;if(a==="infinite"){let k=t.length;_=((_+k/2)%k+k)%k-k/2;}let R=$===I.index;return jsxRuntime.jsx(f,{onMouseEnter:()=>R&&A(),onMouseLeave:()=>R&&B(),className:`--carousel-item-wrapper abs ${R?"--is-active":""}`,style:{"--offset":_,zIndex:R?100:100-Math.abs(_),display:Math.abs(_)>5?"none":"flex"},children:n(M,$,I.index)},$)})}),C&&jsxRuntime.jsx(Mt,{ref:y,itemCount:t.length,itemsPerPage:1,startPage:i+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:M=>I.goTo(+M.label-1),asDots:true,progressBar:true})]})}var Sm=react.forwardRef(vm),wm=Sm;var gs=(r=>(r.Line="line",r))(gs||{});var xs=react.forwardRef((e,r)=>{let{data:t,width:n,height:o,lineColor:s,strokeWidth:a=2,gradientStartColor:i,gradientEndColor:m,animated:l,animDuration:c=2,animDelay:d=0,padding:u=0,type:p,...g}=e,{className:C,style:x,rest:T}=N(g),S=react.useRef(null),P=hooks.useResizeObserver(S.current?.parentElement||S),h=typeof n=="number"?n:P.width,v=typeof o=="number"?o:P.height,y={width:h,height:v},b=react.useId(),{pathD:I,areaPathD:A}=hooks.useLineChart(t,y,u+(a||2)),B=react.useRef(null),H=react.useRef(null),[L,M]=react.useState(0),[$,_]=react.useState(0);return react.useEffect(()=>{l&&(B.current&&M(B.current.getTotalLength()),H.current&&_(H.current.getTotalLength()));},[l,I,A,h,v]),jsxRuntime.jsx(f,{ref:S,as:`--chart --${p||"line"}-chart ${C}`.trim(),style:{...x,width:n,height:o},...T,children:h>0&&v>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${h} ${v}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:i}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:m})]})}),jsxRuntime.jsx("path",{ref:H,d:A,fill:`url(#${b})`,stroke:"none",style:l?{strokeDasharray:$,strokeDashoffset:$}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:$,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:B,d:I,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:l?{strokeDasharray:L,strokeDashoffset:L}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:L,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});xs.displayName="Zuz.Chart";var Nm=xs;var bs=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(bs||{}),vs=(l=>(l.Image="img",l.Video="vid",l.Audio="audio",l.Link="link",l.Document="doc",l.Location="loc",l.Contact="contact",l.Event="event",l.Poll="poll",l))(vs||{});var Ss=react.forwardRef((e,r)=>{let{text:t,media:n,side:o="me",status:s=1,timeStamp:a=Date.now(),arrow:i=true,...m}=e,{className:l,style:c,rest:d}=N(m);return jsxRuntime.jsx(f,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxRuntime.jsxs(f,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${i==true?"--b-arrow":""} ${l}`.trim(),style:{...c},...d,children:[t&&jsxRuntime.jsx(z,{className:"--bubble-text",children:t}),n?n.type=="audio"?jsxRuntime.jsxs(f,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(le,{className:"--bm-action",children:O.play}),jsxRuntime.jsx(tt,{progress:.7}),jsxRuntime.jsx(z,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsxRuntime.jsx(f,{as:"--bubble-image",children:jsxRuntime.jsx(nt,{src:n.source})}):null:null,jsxRuntime.jsxs(f,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(z,{className:"--bubble-stamp tar",children:core.timeSince(a)}),o=="me"&&jsxRuntime.jsx(le,{className:`--bubble-status --bs-${s}`,children:s==0?O.pending:s==1?O.done:s==2?O.doneAll:O.doneAll})]})]})})});Ss.displayName="Zuz.Bubble";var Lm=Ss;var ws=react.forwardRef((e,r)=>{let{style:t,className:n,rest:o}=N(e);return jsxRuntime.jsx("label",{ref:r,style:t,className:n,...o})});ws.displayName="Zuz.Label";var Ot=ws;var Ts=({ref:e,...r})=>{let {name:t,required:n,type:o,value:s,size:a,variant:i,checked:m,disabled:l,onSwitch:c,...d}=r,u=it(),p=!!(t&&u.values);p?u.errors?.[t]:null;let C=p?u.values?.[t]:void 0,[x,T]=react.useState(m||false),S=react.useRef(null),{variant:P}=Y(true),h=react.useMemo(()=>p&&C!=null?typeof C=="string"?C.toLowerCase()!=="false"&&C!=="":!!C:x,[C,x,p]);react.useEffect(()=>{S.current&&S.current.checked!==h&&(S.current.checked=h);},[h]),react.useEffect(()=>{m!==void 0&&T(m);},[m]);let v=y=>{let b=!!y;p&&u.setFieldValue?.(t,b),T(b),c?.(b,s||"cb");};return react.useImperativeHandle(e,()=>({setChecked(y,b=true){v(y);},toggle(y=true){v(!h);}})),jsxRuntime.jsxs(Ot,{"aria-hidden":l,className:[`--${(o||_e.Default).toLowerCase()}`,`${!o||o===_e.Default?"--checkbox":"--switch"}`,`--${i||P||G.Small}`,`flex aic jcc ${h?"is-checked":""} rel`,`${l?"--disabled":""}`].join(" ").trim(),...d,children:[(!o||o==_e.Default)&&O.check,jsxRuntime.jsx(ue,{ref:y=>{S.current=y,e&&(e.current=y);},defaultChecked:h,type:"checkbox",className:"abs",name:t,required:n||false,onChange:y=>{y.stopPropagation(),v(y.target.checked);},disabled:l})]})};Ts.displayName="Zuz.CheckBox";var Vt=Ts;var Km=({ref:e,...r})=>{let{code:t,copy:n,lang:o="tsx",showLines:s=false,highlight:a="",as:i,fx:m,...l}=r,c=react.useRef(null),{className:d,style:u,rest:p}=N({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${i}`,fx:m},c),g=react.useMemo(()=>{let x=new Set;return a.split(",").forEach(T=>{if(T.includes("-")){let[S,P]=T.split("-").map(Number);for(let h=S;h<=P;h++)x.add(h);}else T&&x.add(Number(T));}),x},[a]),C=react.useMemo(()=>{let x=t.split(`
9
+ document.documentElement.style.colorScheme = theme;`}}),jsxRuntime.jsx(Oo,{children:e})]})},Wr=(e,r)=>{if(mi)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||r};var Ur=({ref:e,...r})=>{let{style:t,...n}=r,{style:o,className:s,rest:a}=N(n);return jsxRuntime.jsx("span",{ref:e,style:t,className:s,...a})};Ur.displayName="Zuz.Span";var le=Ur;var Xr=react.forwardRef((e,r)=>{let{name:t,pathCount:n,variant:o,color:s,size:a,...i}=e,{variant:p}=Y(true),{className:l,style:c,rest:d}=N(i);return jsxRuntime.jsx("div",{style:{color:s,...c,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${o||p||G.Small} ${l}`.trim(),ref:r,...d,children:Array(n||0).fill(0).map((u,m)=>jsxRuntime.jsx(le,{className:`path${m+1}`},`${t}-layer-${m}`))})});Xr.displayName="Zuz.Icon";var ee=Xr;var ve={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Yr=e=>{let{type:r,variant:t,color:n,...o}=e,{className:s,style:a,rest:i}=N(o),{spinner:p}=Y(true),l=()=>{switch(r||p?.type||ve.Simple){case ve.Simple:return null;case ve.Wave:return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(f,{as:"--bar --bar1"}),jsxRuntime.jsx(f,{as:"--bar --bar2"}),jsxRuntime.jsx(f,{as:"--bar --bar3"})]});case ve.Roller:return null}};return jsxRuntime.jsx(f,{className:`${s} --spinner --${(r||p?.type||ve.Simple).toLowerCase()} --${t||p?.variant||G.Small}`.trim(),style:{...a},...i,children:l()})};Yr.displayName="Zuz.Spinner";var Pe=Yr;var jr=({ref:e,...r})=>{let{h:t,html:n,children:o,lines:s,tfx:a,delay:i=0,duration:p=.5,stagger:l=.05,repeat:c=true,reveal:d=false,hover:u=false,...m}=r,{style:g,className:C,rest:x}=N(m),T=react.useRef(null),[S,P]=react.useState(false),[h]=hooks.useIntersectionObserver([T],{threshold:[1]}),v=react.useMemo(()=>{if(g?.opacity!==void 0)return g.opacity;if(typeof r.as=="string"){let H=r.as.match(/opacity:([\d.]+)/);if(H)return H[1]}return 1},[r.as,g?.opacity]),y=react.useMemo(()=>a?u?S:d?h===1:true:false,[a,u,S,d,h]);react.useEffect(()=>{e&&(typeof e=="function"?e(T.current):e.current=T.current);},[e]);let b=`h${r.h||1}`,I=react.useMemo(()=>typeof o=="string"?o:Array.isArray(o)&&o.length===1&&typeof o[0]=="string"?o[0]:null,[o]),A=react.useMemo(()=>{let H=Array.isArray(r.as)?r.as.join(" "):r.as||"";return typeof H=="string"&&H.includes("text-clip")},[r.as]);react.useLayoutEffect(()=>{if(!A||!T.current||I===null)return;let H=T.current,L=0,M=0,$=()=>{let k=H.getBoundingClientRect(),U=getComputedStyle(H).backgroundImage,q=k.width;H.querySelectorAll(".--fx-char").forEach(F=>{let Z=F.getBoundingClientRect().left-k.left;F.style.backgroundImage=U,F.style.backgroundRepeat="no-repeat",F.style.backgroundSize=`${q}px 100%`,F.style.backgroundPosition=`-${Z}px 0`,F.style.backgroundClip="text",F.style.webkitBackgroundClip="text",F.style.color="transparent";});},_=()=>{cancelAnimationFrame(L),cancelAnimationFrame(M),L=requestAnimationFrame(()=>{M=requestAnimationFrame($);});};_();let R=new ResizeObserver(_);return R.observe(H),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(_),window.addEventListener("resize",_),()=>{cancelAnimationFrame(L),cancelAnimationFrame(M),R.disconnect(),window.removeEventListener("resize",_);}},[A,I,a,y]);let B=react.useMemo(()=>n?jsxRuntime.jsx(le,{dangerouslySetInnerHTML:{__html:n}}):a&&I!==null?I.split("").map((H,L)=>{let M=H===" ",_=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":c?"infinite":"1";return jsxRuntime.jsx(le,{"data-char":H,className:`--fx-char -fx ${y?`--fx-${a}`:""}`,style:{"--delay":`${i+L*l}s`,"--duration":`${p}s`,"--iteration":_,"--target-opacity":v,display:M?"inline":"inline-block",whiteSpace:"pre",opacity:!y&&a==="typewriter"?0:void 0},children:H},L)}):o,[o,n,a,I,y,i,l,p,c]);return jsxRuntime.jsx(b,{ref:T,onMouseEnter:()=>u&&P(true),onMouseLeave:()=>u&&P(false),style:a?{...g,display:a?"flex":g?.display,flexWrap:a?"wrap":g?.flexWrap,opacity:a&&!y?0:a?1:g?.opacity,transition:a?"opacity 0.4s ease":void 0}:g,className:`${C} ${a?"--text-fx -fx":""}`.trim(),...x,children:B})};jr.displayName="Zuz.Text";var z=jr;var en=({ref:e,...r})=>{let {title:t,position:n,margin:o=4,anchorName:s="--tooltip-anchor",children:a,show:i,variant:p,...l}=r,{style:c,className:d,rest:u}=N(l),m=n||xe.Top;react.useRef(null);let [C,x]=react.useState(false);react.useRef(6);let S=i===true||C,h=`--anchor-${react.useId().replace(/:/g,"")}`,{tooltip:v}=Y(true),y=react.useMemo(()=>{let I=false;return react$1.addPropsToChildren(a,A=>{let B=A.props.className?.includes(s);return B&&(I=true),B||!I},(A,B)=>{let H=B.props.className?.includes(s),L=A===0,M={};return (H||L)&&(M.style={...B.props.style,anchorName:h}),L&&(M.onMouseEnter=$=>{x(true),B.props.onMouseEnter?.($);},M.onMouseLeave=$=>{x(false),B.props.onMouseLeave?.($);}),M})},[a,s,h]),b=be({transition:m==xe.Top?j.SlideInTop:m==xe.Bottom?j.SlideInBottom:m==xe.Left?j.SlideInLeft:j.SlideInRight,when:S,duration:.2,offset:o+6,margin:m==xe.Top||m==xe.Left?-o:o,curve:v?.curve||te.EaseInOut});return react.useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[y,jsxRuntime.jsx(f,{style:{positionAnchor:h,...b.style,...m===xe.Top||m===xe.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${S} --${p||v?.variant||G.Small} --${m} abs ${d}`.trim(),children:typeof t=="string"?jsxRuntime.jsx(z,{as:"--text rel",children:t}):t})]})};en.displayName="Zuz.ToolTip";var Tt=en;var Ut={Loading:"loading",Normal:"normal"};var on=({ref:e,...r})=>{let{reset:t,kind:n="solid",variant:o,tooltip:s,tooltipProps:a,icon:i,iconSize:p,children:l,withLabel:c,spinner:d,state:u,disabled:m,...g}=r,{style:C,className:x,rest:T}=N(g),{variant:S}=Y(true),P=jsxRuntime.jsxs("button",{className:core.removeDuplicateWords(`--button ${s?"--tooltip-anchor":""} --${n} --${o||S} flex aic ${t?"":"jcc"} ${i?"--with-icon":""} ${x}`).trim().replace(/\s+/g," "),style:C,ref:e,disabled:u==Ut.Loading||r.skeleton?.enabled||m,...T,children:[u==Ut.Loading&&jsxRuntime.jsx(Pe,{variant:o||S,type:d||ve.Simple}),(!u||u==Ut.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[i&&jsxRuntime.jsx(ee,{variant:p,name:i}),c===true?jsxRuntime.jsx(le,{children:l}):l]})]});return s?jsxRuntime.jsx(Tt,{title:s,...a,children:P}):P};on.displayName="Zuz.Button";var K=on;var Li=e=>{let{label:r,labelColor:t,icon:n,iconColor:o,index:s,className:a,onSelect:i}=e;return r=="-"?jsxRuntime.jsx(f,{className:"--line"}):jsxRuntime.jsxs(K,{reset:true,onClick:p=>i?.(e),className:`--item ${a||""}`.trim(),children:[jsxRuntime.jsx(f,{as:"--icon",children:jsxRuntime.jsx(ee,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsxRuntime.jsx(z,{className:"--lbl flex aic",style:t?{color:t}:{},children:r})]})},rn=Li;var an=({ref:e,...r})=>{let{id:t,as:n,fx:o,offsetX:s,offsetY:a,parent:i,event:p,arrow:l,when:c,items:d,header:u,footer:m,origin:g=St.TopRight,...C}=r,[x,T]=react.useState(false),[S,P]=react.useState(d||[]),{position:h,targetRef:v,calculatedAnchor:y}=hooks.useAnchorPosition(i?.current,p,{offsetX:s,offsetY:a,preferredAnchor:g}),I=i&&h.top>i.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",A=react.useMemo(()=>{let _=y.toLowerCase();return _.includes("left")?"--arrow-left":_.includes("right")?"--arrow-right":"--arrow-center"},[y]),B=h.top!==0||h.left!==0;react.useEffect(()=>{c&&B?T(true):c||T(false);},[c,B]);let{className:H,style:L,rest:M}=N(C),$=be({...o?.transition?{transition:o.transition??j.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??te.EaseInOut,duration:o?.duration??.05,when:x&&B});return jsxRuntime.jsxs(f,{ref:v,className:`--contextmenu ${l||i!=null?`--has-arrow ${I} ${A}`:""} abs flex cols ${H}`.trim(),"aria-hidden":!x,style:{...L,...$.style,top:h.top,left:h.left,visibility:B?"visible":"hidden",transformOrigin:y},...M,children:[typeof u=="function"?react.createElement(u):u,S.map((_,R)=>jsxRuntime.jsx(rn,{..._,index:R},`context-${_.label.toLowerCase()}-${R}`)),typeof m=="function"?react.createElement(m):m]})};an.displayName="Zuz.ContextMenu";var Do=an;var ln=react.forwardRef((e,r)=>{let{children:t,fx:n,when:o,fxDelay:s,fxStep:a,classToIgnore:i,...p}=e,l=Y(true),c=hooks.useDelayed(),d=n||l?.group?.fx,u=s||l?.group?.fxDelay,m=a||l?.group?.fxStep,g=i||l?.group?.classToIgnore||"-fx",C=react.useMemo(()=>d?react$1.addPropsToChildren(t,x=>{if(x.type===react.Fragment)return false;let T=x.props||{},S="fx"in T,P="tfx"in T,h=T.as?Array.isArray(T.as)?T.as.join(" "):T.as:T.className||"";return !(typeof h=="string"&&h.includes(g))&&(!S||P)},(x,T)=>{let S=(u??0)+x*(m??.1),P=T.props||{};return "tfx"in P?{delay:(P.delay??0)+S}:{fx:{...d,delay:S,when:o??(n?.when||c)}}}):t,[t,o,c,d,u,m,g,n]);return jsxRuntime.jsx(f,{className:"--group",ref:r,...p,children:C})});ln.displayName="Zuz.Group";var Ho=ln;var mn=react.forwardRef((e,r)=>{let{message:t,spinner:n,spinnerSize:o,color:s,when:a,hideMessage:i,...p}=e,{className:l,style:c,rest:d}=N(p),{spinner:u}=Y(true);return "when"in e&&e.when==false?null:jsxRuntime.jsxs(Ho,{fx:{transition:j.SlideInBottom,curve:te.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${l}`.trim(),style:{...c,backgroundColor:"var(--cover-bg)"},...d,children:[jsxRuntime.jsx(Pe,{variant:o||u?.variant||G.Small,type:n||u?.type||ve.Simple}),!i&&jsxRuntime.jsx(z,{className:"--label",tfx:"fade",style:{color:"var(--cover-label)"},children:t||"loading"})]})});mn.displayName="Zuz.Cover";var Ae=mn;var Yt=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Yt||{}),jt=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(jt||{}),pn=(t=>(t.Stack="stack",t.Individual="individual",t))(pn||{}),un={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var qi=()=>{let e=react.useContext(Re);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(l,c)=>e.add({type:"toast",props:{...c,type:l}});return {show:(l,c,d,u)=>r("default",{title:l,message:c,icon:d,duration:u}),hide:l=>e.remove(l),success:(l,c,d,u)=>r("success",{title:l,message:c,icon:d,duration:u}),error:(l,c,d,u)=>r("error",{title:l,message:c,icon:d,duration:u}),warn:(l,c,d,u)=>r("warn",{title:l,message:c,icon:d,duration:u}),promise:(l,c,d,u)=>r("promise",{title:l,message:c,icon:d,duration:u}),clearAll:()=>e.clear("toast")}},Ao=qi;var fn=react.forwardRef((e,r)=>{let{when:t,...n}=e;return jsxRuntime.jsx(f,{ref:r,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:j.FadeIn,when:t},...n})});fn.displayName="Zuz.Overlay";var Je=fn;var Ke=null,Ie=null,gn=react.forwardRef((e,r)=>{let{title:t,message:n,transition:o,curve:s,speed:a,type:i,actionPosition:p,spinner:l,loadingMessage:c,onShow:d,onHide:u,...m}=e,{className:g,style:C,rest:x}=N(m),[T,S]=react.useState(t||""),[P,h]=react.useState(n||""),[v,y]=react.useState(null),[b,I]=react.useState(i||ke.Default),A=react.useMemo(()=>core.uuid(12),[]),[B,H]=react.useState(false),L=react.useRef(null),M=react.useRef(null),[$,_]=react.useState(false),[R,k]=react.useState(true),U=react.useRef(null),q=P;react.useImperativeHandle(r,()=>({setLoading(F){_(F);},showDialog(F,W,Z,oe){Ke&&(clearTimeout(Ke),Ie&&clearTimeout(Ie),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),Ie=setTimeout(()=>{L.current.classList.remove("--wobble"),Ie=null;},500)),I(ke.Dialog),W&&h(W),F&&S(F),Z&&y(Z.reduce((Q,ie)=>(Q.push({...ie,key:ie.key||core.uuid(12)}),Q),[])),H(true),setTimeout(()=>oe?oe():()=>{},1e3);},dialog(F,W,Z,oe){Ke&&(clearTimeout(Ke),Ie&&clearTimeout(Ie),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),Ie=setTimeout(()=>{L.current.classList.remove("--wobble"),Ie=null;},500)),I(ke.Dialog),h(W),S(F),Z&&y(Z.reduce((Q,ie)=>(Q.push({...ie,key:ie.key||core.uuid(12)}),Q),[])),H(true),setTimeout(()=>oe?oe():()=>{},1e3);},error(F,W){this.show(F,W,ke.Error);},warn(F,W){this.show(F,W,ke.Warn);},success(F,W){this.show(F,W,ke.Success);},show(F,W,Z){Ke&&(clearTimeout(Ke),Ie&&clearTimeout(Ie),M.current=L.current.style.transform,L.current.style.transform="",L.current.classList.remove("--wobble"),setTimeout(()=>{L.current.classList.add("--wobble"),L.current.style.transform=`${M.current} scale(.9)`.trim();},50),Ie=setTimeout(()=>{L.current.classList.remove("--wobble"),L.current.style.transform=M.current||"",Ie=null;},500)),Ke=setTimeout(()=>{H(false),Ke=null,Ie=null;},(W||4)*1e3),I(Z||ke.Default),h(F),H(true),d?.();},hide(){H(false),u?.();}}));let D=react.useMemo(()=>{let F={when:B,duration:a||.3,delay:.1};if(b==ke.Dialog){if(o){let{from:W,to:Z}=wt(o,20);return {from:W,to:Z,curve:s||te.EaseInOut,...F}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:te.Spring,...F}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:te.Spring,...F}},[B,b]);return react.useEffect(()=>{U.current&&clearTimeout(U.current),B?k(true):U.current=setTimeout(()=>k(false),1e3);},[B]),b==ke.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Je,{when:B}),jsxRuntime.jsxs(f,{className:`--sheet --sheet-${b.toLowerCase()} ${B?"is-visible":""} ${g} fixed`.trim(),style:C,fx:D,...x,ref:L,children:[jsxRuntime.jsx(Ae,{when:$,spinner:l,message:c}),jsxRuntime.jsxs(f,{className:"--head flex aic rel",children:[jsxRuntime.jsx(f,{className:`--${T?"title":"dot"} flex aic rel`,children:T||""}),jsxRuntime.jsx(K,{onClick:F=>H(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(f,{className:`--body flex aic rel ${v?"":"--no-action"}`.trim(),children:R?q:null}),v&&jsxRuntime.jsx(f,{className:`--footer flex aic rel ${p?p==Po.Center?"jcc":"":"jce"}`.trim(),children:v.map((F,W)=>jsxRuntime.jsx(K,{onClick:Z=>F.handler?F.handler():F.onClick?F.onClick():console.log("onClick Handler missing"),className:"--action",children:F.label},`sheet-${A}-action-${F.key}`))})]})]}):jsxRuntime.jsx(f,{className:`--sheet --sheet-${b.toLowerCase()} ${g} abs`.trim(),style:C,...x,fx:D,ref:L,children:B?P:null})}),hn=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;gn.displayName="Zuz.Sheet";var el=gn;var Pt=react.createContext(null),Zo=()=>{let e=react.useContext(Pt);return e?react.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},Rt=()=>react.useContext(Pt),xn=()=>()=>{},bn=e=>{let r=react.useContext(Pt);return react.useSyncExternalStore(r?.subscribe??xn,()=>{if(!(!r||!e))return r.getSnapshot().values?.[e]},()=>{})},vn=e=>{let r=react.useContext(Pt);return react.useSyncExternalStore(r?.subscribe??xn,()=>!r||!e?null:r.getSnapshot().errors?.[e]??null,()=>null)},it=()=>{let e=Rt(),r=Zo();return {...e,...r}},Sn=({children:e,initialValues:r={}})=>{let t=react.useRef({values:r,errors:{},touched:{}}),n=react.useRef(new Set(Object.keys(r))),o=react.useRef(new Set),s=react.useCallback(()=>t.current,[]),a=react.useCallback(l=>(o.current.add(l),()=>o.current.delete(l)),[]),i=()=>{o.current.forEach(l=>l());};react.useEffect(()=>{if(!r||Object.keys(r).length===0)return;let l=new Set(Object.keys(r)),c=[...n.current].filter(T=>!l.has(T)),d={...t.current.values};c.forEach(T=>delete d[T]);let u={...d,...r},m=t.current.values||{},g=Object.entries(u),C=Object.entries(m),x=g.length!==C.length||g.some(([T,S])=>m[T]!==S);n.current=l,x&&(t.current={...t.current,values:u},i());},[r]);let p=react.useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(l,c)=>{t.current.values[l]!==c&&(t.current={...t.current,values:{...t.current.values,[l]:c}},i());},deleteFieldValue:l=>{if(!(l in t.current.values))return;let{[l]:c,...d}=t.current.values;t.current={...t.current,values:d},i();},setFieldError:(l,c)=>{t.current={...t.current,errors:{...t.current.errors,[l]:c}},i();},reset:()=>{t.current={values:{},errors:{},touched:{}},i();}}),[]);return jsxRuntime.jsx(Pt.Provider,{value:p,children:e})};var ul=e=>{let r={};for(let t in e){let n=t.split(/[\[\]]+/).filter(Boolean);n.reduce((o,s,a)=>{if(a===n.length-1)o[s]=e[t];else {let i=!isNaN(Number(n[a+1]));o[s]=o[s]||(i?[]:{});}return o[s]},r);}return r},wn=({ref:e,...r})=>{let {schema:t,name:n,cover:o,spinner:s,errors:a,action:i,children:p,withData:l,beforeSubmit:c,onSubmit:d,onError:u,onSuccess:m,resetOnSuccess:g,...C}=r,{className:x,style:T,rest:S}=N(C),[P,h]=react.useState(false),v=react.useRef(null),y=Ao(),b=Rt();Zo();let A=react.useRef(null),B=react.useCallback(D=>v.current?v.current.querySelectorAll(D):[],[v.current]),H=D=>({name:D.name||D.getAttribute("name")||D.getAttribute("data-name"),required:D.required?true:D.getAttribute("data-required")?D.getAttribute("data-required")=="true":false,with:D.with||D.getAttribute("with")}),L=D=>{let F=[];return D.querySelectorAll(".--input").forEach(W=>{F.push(W.value);}),F.join("")},M=D=>D.classList.contains("--otp")?L(D):D.classList.contains("--select")?D.querySelector("button.--selected")?.dataset.value:D.classList.contains("--checkbox")||D.getAttribute("type")==="checkbox"?D.checked:D.value,$=react.useCallback(D=>{let{name:F,required:W,with:Z}=H(D),oe=M(D);if(t&&t[F]&&b?.getSnapshot()){let Q=t[F](oe,b.getSnapshot().values);if(Q===false||typeof Q=="string")return typeof Q=="string"&&b?.setFieldError(F,Q),false}if(W&&(D.type==="checkbox"&&!D.checked||D.classList.contains("--select")&&(oe==="-1"||!oe)||!oe||oe===""))return false;if(Z)switch((Z.includes("@")?Z.split("@")[0]=="match"?je.MatchField:Z.split("@")[0]:Z).toUpperCase()){case je.IPV4:return core._(oe).isIPv4();case je.IPV6:return core._(oe).isIPv6();case je.Email:return core._(oe).isEmail();case je.Uri:try{return new URL(oe),!0}catch{return false}case je.MatchField:let[ie,ce,Se]=Z.split("@"),ae=document.querySelector(`[name=${ce.trim()}]`);if(!ae)return false;switch(Se||"direct-match"){case "if-not-empty":if(ae&&!core._(ae.value).isEmpty()&&ae.value!=D.value)return false;break;case "direct-match":if(ae&&ae.classList.contains("--otp")&&D.classList.contains("--otp")&&L(ae)!=L(D))return false;if(ae&&ae.value!=D.value)return false;break}break}return true},[t,b]),_=react.useCallback(()=>{let D={},F={...b?.getSnapshot().values||{}},W=null,Z=null;if(B("[name]").forEach(Q=>{let{name:ie,required:ce,with:Se}=H(Q),ae=ce||Se?$(Q):true,me=M(Q);D[ie]={valid:ae,value:me},F[ie]=me,b?.setFieldError(ie,ae?null:a?.[ie]||"Invalid"),ae?Q.classList.remove("--with-error"):(Q.classList.add("--with-error"),W||(W=Q),Z=a?.[ie]);}),W){let Q=W;if(Q.classList.contains("--otp"))for(let ie of Array.from(Q.querySelectorAll(".--input"))){let ce=ie;if(ce.value==""){ce.focus();break}}else Q.focus();}let oe=ul(F);return {error:W!=null,errorMsg:Z||"Fix errors to continue...",data:D,payload:oe}},[v.current,b]),R=react.useCallback((D={})=>{let{error:F,errorMsg:W,payload:Z,data:oe}=_();if(F){y.error(W);return}i?react.startTransition(async()=>{h(true),core.withPost(i,{...l,...Z,...D}).then(Q=>{h(false),g&&b?.reset(),m?.(Q,{...l,...Z,...D}),m||y.success(Q.message||"Redirecting...");}).catch(Q=>{h(false),u?u(Q):y.error(Q.message);});}):d?.(Z,oe);},[_,i,l,m,u,g,d]),k=react.useCallback(()=>{let D=B("[type=submit]");!D||D.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):D.forEach(F=>{F.addEventListener("click",R);});},[v.current]),U=react.useMemo(()=>react$1.addPropsToChildren(p,D=>D.props.type=="submit",D=>({ref:A})),[p]),q=react.useRef(R);return react.useImperativeHandle(e,()=>({setLoading:D=>h(D),submit:D=>q.current(D),init:k,hideError:()=>y.clearAll()}),[R,k]),react.useEffect(k,[]),react.useEffect(()=>{q.current=R;},[R]),react.useEffect(()=>{let D=B("[type=submit]"),F=Array.from(D).map(W=>{let Z=W;return Z.addEventListener("click",R),()=>Z.removeEventListener("click",R)});return ()=>F.forEach(W=>W())},[R,B]),jsxRuntime.jsxs(f,{ref:v,style:T,className:`--form flex rel ${x}`,children:[!hn(o)&&jsxRuntime.jsx(Ae,{when:P,spinner:s,...o}),U]})};wn.displayName="Zuz.FormInternal";var Cn=e=>jsxRuntime.jsx(Sn,{initialValues:e.withData,children:jsxRuntime.jsx(wn,{...e})});Cn.displayName="Zuz.Form";var qo=Cn;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(r){return this.stack[this.stack.length-1]===r}push(r){this.stack.includes(r)||(this.stack.push(r),this.updateScrollLock());}pop(r){this.stack=this.stack.filter(t=>t!==r),this.updateScrollLock();}handleEscape(){let r=this.stack[this.stack.length-1];return r?(r(),true):false}get count(){return this.stack.length}},Oe=new Xo;var dl=({action:e,render:r=true,message:t=""})=>jsxRuntime.jsx(f,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:r?t:null}),Tn=dl;var Pn=({cols:e,gap:r,ais:t,aic:n,aie:o,jcs:s,jcc:a,jce:i,className:p="",style:l,...c})=>{let d=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",o?"--aie":"",s?"--jcs":"",a?"--jcc":"",i?"--jce":"",p].filter(Boolean).join(" "),u={...l,gap:typeof r=="number"?`${r}px`:r};return jsxRuntime.jsx(f,{...c,className:d,style:u})};Pn.displayName="Zuz.FlexBox";var we=Pn;var yl=({useForm:e,action:r,actionPosition:t,dialogID:n,variant:o})=>jsxRuntime.jsx(we,{aic:true,as:`--footer rel ${t?t==Ar.Center?"--jcc":"":"--jce"}`.trim(),children:r.map((s,a)=>jsxRuntime.jsx(K,{variant:o,kind:s.kind,type:s.type||"button",onClick:()=>{if(!(e===true&&s.type==="submit")){if(s.handler)return s.handler();if(s.onClick)return s.onClick();console.log("onClick Handler missing");}},as:"--action",children:s.label},`dialog-${n}-action-${s.key||a}`))}),In=yl;var xl={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"})," "]}),[Be.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"})}),[Be.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"})}),[Be.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"})}),[Be.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"})]})},O=xl;var bl=({title:e="Alert",description:r,titlePosition:t="center",onClose:n})=>jsxRuntime.jsxs(we,{as:"--head rel",children:[jsxRuntime.jsxs(we,{cols:true,as:[`--${e?"title":"dot"} rel`,`--position-${t}`],children:[jsxRuntime.jsx(z,{children:e}),r&&jsxRuntime.jsx(z,{as:"--description",children:r})]}),jsxRuntime.jsx(K,{onClick:o=>n(),className:`--closer abs ${t=="center"?"center-v":""}`,children:O.close})]}),Nn=bl;var Ln=({ref:e,...r})=>{let{index:t,id:n,title:o,description:s,titleAlignment:a,message:i,content:p,transition:l,curve:c,speed:d,type:u,width:m,action:g,actionPosition:C,spinner:x,loadingMessage:T,variant:S,inBackground:P,forceClose:h,forceLoading:v,useForm:y,formProps:b,onConfirm:I,onCancel:A,onClose:B,onShow:H,onHide:L,...M}=r,$=react.useMemo(()=>core.uuid(12),[]),[_,R]=react.useState(o||""),[k,U]=react.useState(s||""),[q,D]=react.useState(p||i||""),[F,W]=react.useState(u||Qe.Dialog),[Z,oe]=react.useState(false),[Q,ie]=react.useState(true),[ce,Se]=react.useState(()=>g?g.map(Me=>({...Me,key:Me.key||core.uuid(12)})):null),[ae,me]=react.useState(false),{variant:X,spinner:ne,dialog:re}=Y(true),de=S||re?.variant||X||G.Small,{style:De,className:Ce,rest:ge}=N(M),Le=react.useRef(null),se=be({when:Z,duration:d||re?.speed||.3,delay:re?.delay||.1,transition:l||re?.transition||j.SlideInBottom,curve:c||re?.curve||te.EaseInOut,watch:["scale","filter","transform"]}),ye=()=>{oe(false),B(n);},Ft=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{Oe.isTop(ye)&&ye();}}],[Z]);hooks.useShortcuts(Ft),react.useEffect(()=>{W(Qe.Dialog),D(p||i),R(_),U(k),oe(true),setTimeout(()=>H?H():()=>{},500);},[]),react.useEffect(()=>{h&&ye();},[h]),react.useEffect(()=>{v!=null&&me(v);},[v]),react.useEffect(()=>(Z?Oe.push(ye):Oe.pop(ye),()=>Oe.pop(ye)),[Z]);let zt=react.useMemo(()=>1e4+t*10,[t]),He=jsxRuntime.jsxs(f,{as:`--dialog --${(u??Qe.Default).toLowerCase()} ${Z?"--visible":""} ${Ce} fixed abc`.trim(),style:{...se.style,zIndex:zt+1,pointerEvents:P==true?"none":"auto",width:m||"auto",...P==true?{scale:"0.92",filter:"blur(2px)"}:{}},...ge,ref:Le,children:[jsxRuntime.jsx(Nn,{title:_,description:s,titlePosition:a||re?.titleAlignment||"center",onClose:ye}),jsxRuntime.jsx(Tn,{message:q,render:Q,action:ce}),ce&&ce.length>0&&jsxRuntime.jsx(In,{variant:de,action:ce,dialogID:$,useForm:y,actionPosition:C}),jsxRuntime.jsx(Ae,{when:ae,spinner:x||re?.spinner||ne?.type||ve.Simple,message:T||re?.loadingMessage})]});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Je,{style:{zIndex:zt},when:Z}),y?jsxRuntime.jsx(qo,{onSubmit:((Me,wo)=>{I?.(Me,wo);}),...b,children:He}):He]})};Ln.displayName="Zuz.Dialog";var Qo=Ln;var Mn=react.forwardRef((e,r)=>{let{speed:t,smooth:n=false,breakpoints:o={},style:s,...a}=e,{rootRef:i,containerRef:p,thumbY:l,thumbX:c,onScrollY:d,onScrollX:u}=hooks.useScrollbar(t||1,o,n),{style:m,className:g,rest:C}=N(a);return react.useEffect(()=>{let x=p.current;if(!x)return;let T=()=>{window.dispatchEvent(new Event("resize"));},S=P=>{let h=P.target;if(h.closest(".--allow-scroll")){let y=h.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:I,clientHeight:A}=y,B=P.deltaY<0,H=P.deltaY>0;(B&&b>0||H&&b+A<I)&&P.stopPropagation();}};return x.addEventListener("scroll",T),x.addEventListener("wheel",S,{passive:true}),()=>{x.removeEventListener("scroll",T),x.removeEventListener("wheel",S);}},[p]),jsxRuntime.jsxs(f,{ref:i,className:g.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(f,{as:`--scroll-content ${g}`.trim(),ref:p,style:s||{},children:C.children}),jsxRuntime.jsx(f,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(f,{as:"--scroll-thumb --abs --round",ref:l,onMouseDown:d})}),jsxRuntime.jsx(f,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(f,{as:"--scroll-thumb --abs --round",ref:c,onMouseDown:u})})]})});Mn.displayName="Zuz.ScrollView";var Jo=Mn;var On=({ref:e,...r})=>{let{id:t,index:n,from:o,speed:s,children:a,margin:i,animation:p,prerender:l,inBackground:c,forceClose:d,forceLoading:u,onClose:m,...g}=r,{drawer:C}=Y(true),[x,T]=react.useState(a),[S,P]=react.useState(false),[h,v]=react.useState(l??(C?.prerender||true)),[y,b]=react.useState(false),I=()=>{P(false),m?.(t??-1);},{className:A,style:B,rest:H}=N(g),L=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{Oe.isTop(I)&&I();}}],[S]);hooks.useShortcuts(L),react.useEffect(()=>{T(a);},[a]),react.useEffect(()=>(S?Oe.push(I):Oe.pop(I),()=>Oe.pop(I)),[S]),react.useEffect(()=>{P(true);},[]),react.useEffect(()=>{d&&I();},[d]),react.useEffect(()=>{u!=null&&b(u);},[u]);let M=o||C?.from||Te.Left,$=react.useMemo(()=>{switch(M){case Te.Left:return {from:{x:"-100vw"},to:{x:0}};case Te.Right:return {from:{x:"100vw"},to:{x:0}};case Te.Top:return {from:{y:"-100vh"},to:{y:0}};case Te.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,C?.from]),_=be({from:{...$.from,opacity:0},to:{...$.to,opacity:1},when:S,curve:p||C?.animation||te.EaseInOut,duration:s||C?.speed||.5,watch:["scale","filter"]}),R=react.useMemo(()=>1e4+(n||1)*10,[n]);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Je,{onClick:k=>{S&&I();},when:S,style:{zIndex:R}}),jsxRuntime.jsxs(f,{ref:e,"aria-hidden":!S,className:`--drawer flex cols ${A} --${M.toLowerCase()} fixed`,style:{...B,..._.style,"--m":`${i||C?.margin||0}px`,zIndex:R+1,pointerEvents:c==true?"none":"auto",...c==true?{scale:"0.92",filter:"blur(2px)"}:{}},...H,children:[o==Te.Top||o==Te.Bottom?jsxRuntime.jsx(f,{className:"--handle"}):null,jsxRuntime.jsx(K,{as:"--close-drawer --abs",onClick:I,children:O.close}),jsxRuntime.jsxs(Jo,{as:"rel",children:[h||S?x:null,jsxRuntime.jsx(Ae,{when:y})]})]})]})};On.displayName="Zuz.Drawer";var or=On;var Dn=react.forwardRef((e,r)=>{let{progress:t,type:n,animated:o,...s}=e,a=react.useRef(null);react.useImperativeHandle(r,()=>({setProgress:c=>{a.current.style.width=`${c*100}%`,a.current.setAttribute("data-value",c+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),react.useEffect(()=>{t&&a.current&&(o?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:i,style:p,rest:l}=N(s);return jsxRuntime.jsx(f,{className:`--progress ${o?"--animated":""} flex rel ${i}`.trim(),style:p,...l,children:jsxRuntime.jsx(f,{ref:a,className:"--bar rel"})})});Dn.displayName="Zuz.ProgressBar";var tt=Dn;var Vl=e=>{let{index:r,id:t,type:n,icon:o,busy:s,width:a,title:i,message:p,duration:l,sticky:c=false,actions:d=[],position:u,style:m,isHovered:g,total:C,progress:x,progressValue:T,forceClose:S,variant:P,onClick:h,onClose:v}=e,[y,b]=react.useState(false),[I,A]=react.useState(false),{toast:B}=Y(true),H=typeof T=="number",L=H?Math.max(0,Math.min(1,T)):void 0,M=I||S,$=u??B?.position??"TopCenter",_=n??B?.type??"default",R=m??B?.style??"stack",k=l??B?.duration??4,U=x??B?.progress??false,q=react.useRef(k*1e3),D=react.useRef(void 0),F=react.useRef(void 0),W=react.useRef(null),Z=be({when:y&&!M,duration:.3,transition:B?.transition||($.includes("Top")?j.SlideInTop:$.includes("Bottom")?j.SlideInBottom:$.includes("Left")?j.SlideInLeft:j.SlideInRight),curve:B?.curve||te.EaseInOut,watch:["transform","opacity","scale","filter"]});react.useEffect(()=>{b(true);let X=ne=>{if(F.current!==void 0){let re=ne-F.current;if(!H&&!g&&!c&&!M&&(q.current-=re,W.current)){let de=Math.max(0,q.current/(k*1e3)*100);W.current?.setProgress?.(de/100);}}F.current=ne,q.current<=0?A(true):D.current=requestAnimationFrame(X);};return D.current=requestAnimationFrame(X),()=>{D.current&&cancelAnimationFrame(D.current);}},[g,c,M,k]),react.useEffect(()=>{if(M){let X=setTimeout(()=>{v?.(t);},350);return ()=>clearTimeout(X)}},[M,t]);let oe=R==="stack",Q=g?r*65:r*8,ie=g?1:Math.max(.85,1-r*.05),ce=g?1:Math.max(.4,1-r*.2),Se=X=>{h?h(X):s!==true&&(!d||d.length===0)&&A(true);},ae=Z.style.transform||"translate(0, 0)",me=M?ae:`${ae} translateY(${$.includes("Top")?Q:-Q}px) scale(${ie})`;return jsxRuntime.jsxs(f,{onClick:Se,as:`--snack --${M?"hidden":"visible"} --${P||B?.variant||G.Medium} --${_} --${$.toLowerCase()} abs flex aic`,style:{...Z.style,zIndex:1e3-r,pointerEvents:M?"none":"auto",opacity:M?Z.style.opacity:ce,transform:me,filter:!M&&oe&&!g&&r>0?"blur(1px)":"none",cursor:!d||d.length===0?"pointer":"default",transition:`${Z.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxRuntime.jsxs(f,{as:"--ico flex aic jcc rel",children:[o?jsxRuntime.jsx(ee,{name:o}):jsxRuntime.jsx(f,{as:"--no-icon"}),s===true&&jsxRuntime.jsx(Pe,{as:"abs abc"})]}),jsxRuntime.jsxs(f,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsxRuntime.jsx(z,{as:"--tt",children:i||un[n]}),jsxRuntime.jsx(z,{as:"--tm",children:p})]}),d&&d.length>0&&jsxRuntime.jsx(f,{as:"--actions flex gap:5",children:d.map((X,ne)=>jsxRuntime.jsx(K,{as:"--snack-btn bold",variant:G.XSmall,onClick:re=>{re.stopPropagation(),X.onClick(re);},children:X.label},ne))}),(U||H)&&jsxRuntime.jsx(tt,{as:"abs",progress:L,ref:W})]})},nr=Vl;var Re=react.createContext(null),zl=({ref:e,...r})=>{let n=react.useContext(Re)?.depth??0,[o,s]=react.useState(null),[a,i]=react.useState(null),[p,l]=react.useState(false),[c,d]=react.useState([]),u=hooks.useDelayed(),m=react.useRef(0),g=()=>++m.current,C=()=>{l(false),setTimeout(()=>i(null),200);};react.useImperativeHandle(e,()=>({add(h){let v=g(),y={id:v,...h};return d(b=>[...b,y]),v},openMenu(h){l(false),setTimeout(()=>{i({id:g(),type:"menu",props:h}),l(true);},16);},update(h,v){d(y=>y.map(b=>b.id!==h?b:{...b,props:{...b.props,...v}}));},remove(h){d(v=>v.map(y=>y.id===h?{...y,props:{...y.props,forceClose:true}}:y)),a?.id===h&&C();},loading(h,v){d(y=>y.map(b=>b.id===h?{...b,props:{...b.props,forceLoading:v}}:b)),a?.id===h&&C();},clear(h){d(c.filter(v=>v.type!=h));}})),react.useEffect(()=>{if(a&&p){let h=()=>C();return document.addEventListener("click",h),()=>document.removeEventListener("click",h)}},[a,p,C]);let x=h=>{setTimeout(()=>{d(v=>v.filter(y=>y.id!==h)),a?.id===h&&i(null);},250);},T=react.useMemo(()=>[...c.filter(h=>h.type!="toast")],[c]);if(!u)return null;let S=c.filter(h=>h.type=="toast").reverse(),P=Object.values(jt);return reactDom.createPortal(jsxRuntime.jsxs(f,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[T.map((h,v)=>{let y=v<T.length-1;return h.type==="dialog"?jsxRuntime.jsx(Qo,{onClose:x,index:v,id:h.id,...h.props,inBackground:y},`layer-${h.type}-${h.id}`):h.type==="drawer"?jsxRuntime.jsx(or,{onClose:x,index:v,id:h.id,...h.props,inBackground:y},`layer-${h.type}-${h.id}`):null}),P.map(h=>{let v=S.filter(y=>(y.props.position||"TopCenter")===h);return v.length===0?null:jsxRuntime.jsx(f,{onMouseEnter:()=>s(h),onMouseLeave:()=>s(null),as:`--toast-container fixed --${h.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:v.map((y,b)=>jsxRuntime.jsx(nr,{index:b,total:v.length,isHovered:o===h,onClose:x,id:y.id,...y.props},y.id))},h)}),a&&jsxRuntime.jsx(f,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsxRuntime.jsx(Do,{onClose:C,when:p,...a.props},`menu-${a.id}`)})]}),document.body)},_l=({children:e})=>{let r=react.useContext(Re),t=r?r.depth+1:0,n=react.useRef(null),o=react.useMemo(()=>({add:s=>n.current?.add(s),openMenu:s=>n.current?.openMenu(s),update:(s,a)=>n.current?.update(s,a),remove:s=>n.current?.remove(s),loading:(s,a)=>n.current?.loading(s,a),clear:s=>n.current?.clear(s),depth:t,isSubLayer:!!r}),[r]);return jsxRuntime.jsxs(Re.Provider,{value:o,children:[e,jsxRuntime.jsx(zl,{ref:n})]})},Oo=_l;var Zl=()=>{let e=react.useContext(Re);if(!e)throw new Error("useContextMenu must be used inside <LayersProvider>");return {showContextMenu:(n,o,s)=>{n.preventDefault(),e.openMenu({event:n,items:o,origin:s});},showMenu:(n,{items:o,origin:s,offsetX:a,offsetY:i,transition:p,curve:l,arrow:c,duration:d,header:u,footer:m})=>{e.openMenu({fx:{transition:p,curve:l,duration:d},parent:n,items:o,origin:s||St.TopCenter,offsetX:a,offsetY:i,arrow:c,header:u,footer:m});},hide:e.clear}},Wl=Zl;var Ul=()=>{let e=react.useContext(Re);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("dialog"),t=a=>e.remove(a),n=(a,i)=>e.loading(a,i);return {clearAll:r,show:a=>{let i=e.add({type:"dialog",props:{...a,type:Qe.Dialog}});return {id:i,setLoading:p=>n(i,p),hide:()=>t(i)}},confirm:a=>{let i=e.add({type:"dialog",props:{...a,type:Qe.Confirm,action:a.action??[{label:a.cancelLabel??"Cancel",kind:"ghost",onClick:()=>{a.onCancel?.(),t(i);}},{label:a.confirmLabel??"Confirm",kind:"solid",type:"submit",onClick:p=>{a.onConfirm?.(p);}}]}});return {id:i,setLoading:p=>n(i,p),hide:()=>t(i)}},hide:t}},ql=Ul;var Yl=()=>{let e=react.useContext(Re);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("drawer"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a),o=s=>{let a=e.add({type:"drawer",props:s});return {id:a,setLoading:i=>n(a,i),close:()=>t(a)}};return {clearAll:r,open:s=>o({children:s}),right:s=>o({children:s,from:Te.Right}),left:s=>o({children:s,from:Te.Left}),top:s=>o({children:s,from:Te.Top}),bottom:s=>o({children:s,from:Te.Bottom}),close:t}},jl=Yl;var Jl=(e,r,t={})=>{let[n,o]=react.useState(null),[s,a]=react.useState(false),{duration:i=.25,curve:p=te.EaseOutBack,borderRadius:l={from:40,to:24},targetWidth:c=320}=t;return react.useLayoutEffect(()=>{r&&e.current?(o(e.current.getBoundingClientRect()),a(true)):r||a(false);},[r,e]),{style:be({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:l.from},to:{opacity:1,width:c,height:"auto",borderRadius:l.to},curve:p,duration:i,when:s&&r}).style,isMeasured:s,sourceRect:n}},ec=Jl;var nc=(e,r={})=>{let{offset:t=8,direction:n="bottom",container:o=null,triggerRef:s=null}=r,a=react.useRef(null),i=react.useCallback(()=>{let p=e.current;if(!p)return;let l=s?.current||p.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=p.getBoundingClientRect(),d=l.getBoundingClientRect(),u,m;o?(u=o.getBoundingClientRect(),m="absolute"):(window.getComputedStyle(p).position==="fixed"?m="fixed":m="absolute",m==="fixed"?u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:u={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),p.style.position!==m&&(p.style.position=m),a.current=m;let x=0,T=0;switch(n){case "top":x=d.top-c.height-t,T=d.left,x<u.top&&d.bottom+c.height+t<=u.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,T=d.left,x+c.height>u.bottom&&d.top-c.height-t>=u.top&&(x=d.top-c.height-t);break;case "left":x=d.top,T=d.left-c.width-t,T<u.left&&d.right+c.width+t<=u.right&&(T=d.right+t);break;case "right":x=d.top,T=d.right+t,T+c.width>u.right&&d.left-c.width-t>=u.left&&(T=d.left-c.width-t);break}if(x=Math.max(u.top,Math.min(x,u.bottom-c.height)),T=Math.max(u.left,Math.min(T,u.right-c.width)),a.current==="fixed")p.style.top=`${x}px`,p.style.left=`${T}px`;else {let S;p.offsetParent?S=p.offsetParent.getBoundingClientRect():S={top:0,left:0};let P=x-S.top+window.scrollY,h=T-S.left+window.scrollX;p.style.top=`${P}px`,p.style.left=`${h}px`;}},[e,s,t,n,o]);return react.useEffect(()=>{let p=e.current;if(!p)return;let l=s?.current||p.parentElement;if(!l){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let c=new ResizeObserver(i);return c.observe(p),l&&c.observe(l),i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,true),()=>{c.disconnect(),l&&c.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,true);}},[e,n,t,o,s]),{postion:a.current,reposition:i}},Bt=nc;var ac=()=>{let e=react.useContext(Re);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(m,g)=>e.add({type:"toast",props:{...g,type:m}}),t=()=>e.clear("toast"),n=m=>e.remove(m),o=(m,g)=>e.update(m,g),s=m=>({id:m,update:g=>o(m,g),setType:g=>o(m,{type:g}),setProgress:g=>o(m,{progress:true,progressValue:g}),setBusy:g=>o(m,{busy:g}),success:()=>o(m,{type:"success"}),error:()=>o(m,{type:"error"}),warn:()=>o(m,{type:"warn"}),promise:()=>o(m,{type:"promise"}),default:()=>o(m,{type:"default"}),hide:()=>n(m)}),a=m=>s(r("default",m)),i=m=>s(r("success",m)),p=m=>s(r("error",m)),l=m=>s(r("warn",m)),c=m=>s(r("promise",m)),d=(m,g,C)=>{let x=r(m,{...g,sticky:g.sticky??false,actions:[{label:C?.label||"Ok",onClick:T=>{C?.onClick?.(T),n(x);}}]});return s(x)},u=(m,g,C,x)=>{let T=r(m,{...g,sticky:true,actions:[{label:C?.label||"Ok",onClick:S=>{C?.onClick?.(S),(C?.hide??false)===true&&n(T);}},{label:x?.label||"Cancel",onClick:S=>{x?.onClick?.(S),(x?.hide??true)===true&&n(T);}}]});return s(T)};return {show:a,hide:n,promise:c,clearAll:t,ok:(m,g)=>d("default",m,g),success:(m,g)=>g?d("success",m,g):i(m),error:(m,g)=>g?d("error",m,g):p(m),confirm:(m,g,C)=>u("default",m,g,C),warn:(m,g)=>g?d("warn",m,g):l(m),succes:(m,g)=>g?d("success",m,g):i(m)}},ic=ac;var Zn=({ref:e,style:r,...t})=>{let n=react.useRef(null),o=react.useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:i}=N(t,o);return jsxRuntime.jsx("div",{ref:e||n,style:{...s,...r||{}},className:a,...i})};Zn.displayName="Zuz.Box";var f=Zn;var Gn=react.forwardRef((e,r)=>{let{title:t,message:n,...o}=e,[s,a]=react.useState(false);return jsxRuntime.jsxs(f,{className:"--accordion flex cols",...o,children:[jsxRuntime.jsxs(K,{onClick:i=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(z,{className:"--label flex",children:t}),jsxRuntime.jsx(f,{className:"--arrow flex",children:s?O.arrowUp:O.arrowDown})]}),s&&jsxRuntime.jsx(f,{className:"--detail",children:n})]})});Gn.displayName="Zuz.Accordion";var fc=Gn;var dc=({label:e,icon:r,onClick:t,idx:n,selected:o})=>jsxRuntime.jsx(K,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof r=="string"?jsxRuntime.jsx(ee,{name:r}):r}),qn=dc;var Xn=react.forwardRef((e,r)=>{let{items:t,name:n,selected:o,position:s,...a}=e,i=react.useRef(null),[p,l]=react.useState(o||t[0].tag||0),c=react.useCallback(({x,y:T})=>{if(i.current){let S=i.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-S.left}`),document.documentElement.style.setProperty("--tip-y",`${T-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=react.useCallback(()=>{i.current&&(i.current.removeEventListener("pointerleave",d),i.current.removeEventListener("pointermove",c),document.documentElement.style.setProperty("--tip-s","0"));},[]),u=react.useCallback(()=>{i.current&&(i.current.addEventListener("pointerleave",d),i.current.addEventListener("pointermove",c));},[]);react.useEffect(()=>{i.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,T)=>T.label.length>x.length?T.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),i.current?.addEventListener("pointerenter",u));},[]);let{className:m,style:g,rest:C}=N(a);return jsxRuntime.jsxs(f,{ref:i,style:g,className:[`--actionbar flex aic ${m}`,`${!s||s==xe.Auto?"rel":`--${s}`}`].join(" ").trim(),...C,children:[t.map((x,T)=>jsxRuntime.jsx(qn,{selected:p===x.tag||o==T,...x,idx:T},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(f,{className:"--tip abs",children:jsxRuntime.jsx(f,{className:"--track flex aic",children:t.map(({label:x})=>jsxRuntime.jsx(f,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Xn.displayName="Zuz.ActionBar";var bc=Xn;var jn=react.forwardRef((e,r)=>{let{type:t,icon:n,title:o,message:s,iconSize:a,...i}=e,{className:p,style:l,rest:c}=N(i);return jsxRuntime.jsxs(f,{className:`--alert --${t||Be.Info} flex aic ${p}`.trim(),style:l,...c,children:[jsxRuntime.jsx(f,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&O[t||Be.Info]}),jsxRuntime.jsxs(f,{className:"--meta flex cols",children:[jsxRuntime.jsx(z,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(z,{className:"--message",h:2,children:s})]})]})});jn.displayName="Zuz.Alert";var wc=jn;var Jn=({ref:e,...r})=>{let{variant:t,numeric:n,name:o,onConfirm:s,...a}=r,{style:i,className:p,rest:l}=N(a),{variant:c}=Y(true),d=react.useRef(null),u=it(),m=o?u.errors?.[o]:null,g=o&&u.values&&u.setFieldValue,C=g?u.values?.[o]:void 0,x=hooks.useDebounce(S=>{g&&u.setFieldValue?.(o,S);},500),T=S=>{let P=S.currentTarget.value;n&&(P=P.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),S.currentTarget.value=P),x(P),r.onInput?.(S);};return react.useEffect(()=>{d.current&&o&&C!==void 0&&d.current.value!==String(C)&&(d.current.value=String(C));},[C,o]),react.useEffect(()=>()=>{g&&u.deleteFieldValue?.(o);},[]),jsxRuntime.jsx("input",{name:o,className:`--input --${t||c} ${m?"--has-error":""} --flex ${p}`.trim(),style:i,defaultValue:C??r.defaultValue??"",onInput:T,onKeyDown:S=>{S.key=="Enter"&&s?.(S.currentTarget.value);},ref:S=>{d.current=S,typeof e=="function"?e(S):e&&(e.current=S);},...l})};Jn.displayName="Zuz.Input";var ue=Jn;var ts=e=>{let{meta:r,children:t}=e,n=hooks.useDelayed(),{label:o,icon:s,...a}=react.isValidElement(r)?{}:r,{className:i,style:p,rest:l}=N({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return react.isValidElement(r)?jsxRuntime.jsx("li",{style:p,className:i,children:r}):jsxRuntime.jsxs("li",{style:p,className:i,...l,children:[t,typeof r=="string"?r:o]})};ts.displayName="Zuz.ListItem";var os=ts;var ns=react.forwardRef((e,r)=>{let{items:t,variant:n,direction:o,seperator:s,ol:a,...i}=e,{className:p,style:l,rest:c}=N(i),d=a==true?"ol":"ul";return react.createElement(d,{className:`--list --${n||G.Small} flex ${o??"cols"} ${p}`.trim(),style:l,ref:r,...c,children:t.map((u,m,g)=>{let C=`${typeof u=="string"?`li-${String(u)}`:react.isValidElement(u)?`li-${u.key}`||`${m}-${core.MD5(u.toString())}`:u.label}-${m}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(os,{meta:u}),s&&g[m+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${m+1}-${C}`):null]},C)})})});ns.displayName="Zuz.List";var rt=ns;var as=react.forwardRef((e,r)=>{let{fx:t,action:n,data:o,withStyle:s,onChange:a,...i}=e,{className:p}=N({as:s||""}),{style:l}=N(i),[c,d]=react.useState(false),[u,m]=react.useState(o||[]),g=react.useRef(null),C=react.useRef(null),x=react.useRef(null),T=react.useMemo(()=>i.name||core.uuid(12),[]),[S,P]=react.useState(null),[h,v]=react.useState(null),[y,b]=react.useState([]),A=hooks.useDebounce(R=>{R.target.value==""?(d(false),m([])):n&&R.target.value.trim()!=""&&core.withPost(n,{query:R.target.value}).then(k=>{"items"in k&&core._(k.items).isArray()?(m(k.items),v(R.target.value),b(k.items)):console.error("Action Response should contain items array"),P(null);}).catch(k=>{P(null),m([]);});},250),B=()=>{if(C.current){let R=C.current.getBoundingClientRect(),k=window.innerHeight-R.bottom,U=R.top;if(x.current){let q=x.current;k<q.offsetHeight&&U>k?(q.style.top="auto",q.style.bottom=`${R.height}px`,q.style.maxHeight=`${U-150}px`):(q.style.top=`${R.height+5}px`,q.style.bottom="auto",q.style.maxHeight=`${k-150}px`);}}},H=R=>{if(u.length>0){if((R.key==="ArrowDown"||R.key==="ArrowUp")&&(R.preventDefault(),R.stopPropagation()),R.key==="Escape")P(null),d(false),m([]);else if(R.key==="ArrowDown")P(k=>{let U=k===null||k===u.length-1?0:k+1;return M(U),U});else if(R.key==="ArrowUp")P(k=>{let U=k===null||k===0?u.length-1:k-1;return M(U),U});else if(R.key==="Enter"&&S!==null){let k=u[S];g.current&&(g.current.value=k,d(false),m([]));}}},L=R=>{g.current&&(g.current.value=R,d(false),m([]));},M=R=>{let k=u[R];if(k&&g.current&&(g.current.value=k,g.current.setSelectionRange(k.length,k.length)),x.current){let q=x.current.children[R];q&&q.scrollIntoView({block:"nearest"});}},$=R=>{C.current&&!C.current.contains(R.target)&&(d(false),m([]));},_=()=>{g.current&&g.current.value===h&&(m(y),P(null),B());};return react.useEffect(()=>(window.addEventListener("resize",B),window.addEventListener("scroll",B,true),document.addEventListener("mousedown",$),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",B,true),document.removeEventListener("mousedown",$);}),[]),react.useEffect(()=>{B();},[u]),jsxRuntime.jsxs(f,{style:l,ref:C,className:`--autocomplete --${e.size||G.Small} flex aic rel ${p}`.trim(),children:[jsxRuntime.jsx(ue,{ref:g,autoComplete:"off",onChange:A,onKeyDown:H,onFocus:_,...i}),jsxRuntime.jsx(f,{className:"--arrow rel flex aic jcc",children:u.length>0?O.arrowUp:O.arrowDown}),u.length>0&&jsxRuntime.jsx(rt,{id:T,ref:x,className:"--suggestion-list flex cols abs",items:u.map((R,k)=>({label:R,onClick:U=>{U.preventDefault(),U.stopPropagation(),L(R);},className:S===k?"--current":"",animate:{transition:j.SlideInBottom,curve:te.EaseInOut,delay:core.clamp(.02*k,.02,.5)}}))})]})});as.displayName="Zuz.AutoComplete";var _c=as;var is=react.forwardRef((e,r)=>{let t=react.useRef(null),n=react.useMemo(()=>r&&typeof r!="function"&&r.current?r:t,[r]),{style:o,className:s,rest:a}=N(e,n);return !a.src||a.src==""?null:jsxRuntime.jsx("img",{ref:n,style:o,className:`${s} flex`,...a})});is.displayName="Zuz.Image";var nt=is;var ls=react.forwardRef((e,r)=>{let{src:t,variant:n,type:o,crossOrigin:s,referrerPolicy:a,fx:i,as:p,alt:l,color:c,style:d,...u}=e,[m,g,C]=hooks.useImage(t??"",s,a),{className:x,style:T,rest:S}=N({fx:i,as:p});return jsxRuntime.jsx(f,{className:`--avatar --${n||G.Small} --${(o||Hr.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:c||"var(--avatar-bg, var(--primary))",...d,...T},...S,children:t?jsxRuntime.jsx(nt,{src:m,crossOrigin:s,referrerPolicy:a,...u}):jsxRuntime.jsx(z,{className:"--avatar-label",children:(l?l.charAt(0):"A").toUpperCase()})})});ls.displayName="Zuz.Avatar";var Yc=ls;var jc=({size:e=5,type:r="dead",label:t="",variant:n=G.Small,loading:o=false,spinner:s,...a})=>{let{style:i,className:p,rest:l}=N(a);return jsxRuntime.jsxs(f,{style:{...core._(t).isEmpty()?{"--badge-size":e}:{},...i},as:`--badge --${n} --${r} rel flex aic jcc ${p}`.trim(),children:[jsxRuntime.jsx(f,{fx:{transition:j.FadeIn,curve:te.Liquid,duration:.5,when:o},as:"abs abc",children:jsxRuntime.jsx(Pe,{type:s})}),core._(t).isEmpty()?jsxRuntime.jsx(f,{as:`--dot --${r}`}):jsxRuntime.jsx(z,{as:"--label",children:t})]})},Qc=jc;var um=[{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,r=e.getDay();return dateFns.addDays(e,(6-r)%7||6)},getDateFormat:()=>{let e=new Date,r=e.getDay();return dateFns.format(dateFns.addDays(e,(6-r)%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)}],fm=e=>{let r=new Set;return e.filter(t=>{if(t.label=="Later")return true;let n=t.getDate().toISOString().split("T")[0];return r.has(n)?false:(r.add(n),true)})},ms=react.forwardRef((e,r)=>{let{defaultValue:t,variant:n,onChange:o,...s}=e,{style:a,className:i,rest:p}=N(s),[l,c]=react.useState(t||new Date),d=dateFns.startOfMonth(l),u=dateFns.endOfMonth(l),m=dateFns.startOfWeek(d),g=dateFns.endOfWeek(u),C=react.useMemo(()=>dateFns.eachDayOfInterval({start:m,end:g}),[m,g]),x=P=>{o?.(P),c(P);},T=()=>{c(P=>new Date(P.getFullYear(),P.getMonth()-1));},S=()=>{c(P=>new Date(P.getFullYear(),P.getMonth()+1));};return jsxRuntime.jsxs(f,{as:`--calendar flex --${n||"sm"} ${i}`,style:a,children:[jsxRuntime.jsx(f,{as:"--calendar-quick-select flex cols flex:1",children:fm(um).map(P=>{let h=P.getDate();return jsxRuntime.jsxs(K,{onClick:()=>x(h),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(z,{as:"flex:1",children:P.label}),jsxRuntime.jsx(z,{as:"tar",children:P.getDateFormat()})]},`--dtp-option-label-${P.label}`)})}),jsxRuntime.jsxs(f,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(f,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(z,{as:"flex:1 --calendar-cm bold",children:dateFns.format(l,"MMMM yyyy")}),jsxRuntime.jsx(K,{onClick:T,as:"--calendar-chevron",children:O.chevronUpOutline}),jsxRuntime.jsx(K,{onClick:S,as:"--calendar-chevron",children:O.chevronDownOutline})]}),jsxRuntime.jsxs(f,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(P=>jsxRuntime.jsx(z,{as:"--calendar-day",children:P},`--calendar-hd-${P}`)),C.map((P,h)=>{let v=dateFns.isSameMonth(P,l),y=dateFns.isSameDay(P,l),b=dateFns.isToday(P);return jsxRuntime.jsx(K,{disabled:!v,onClick:()=>x(P),as:["--calendar-day --calendar-dd",`${y?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:dateFns.format(P,"d")},`--calendar-day-${h}-${P.getFullYear()}-${P.getMonth()}-${P.getDay()}`)})]})]})]})});ms.displayName="Zuz.Calendar";var pr=ms;var lo=(t=>(t.Table="table",t.Gooey="gooey",t))(lo||{});var ds=({ref:e,...r})=>{let{itemCount:t,itemsPerPage:n,startPage:o,pageRange:s,paginationStyle:a,breakLabel:i,prevLabel:p,nextLabel:l,hash:c,loading:d,seperator:u,renderOnZeroPageCount:m,asDots:g,progressBar:C,onPageChange:x,...T}=r,S=react.useRef(null),P=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),h=react.useCallback(R=>`${core.toHash(R,c||6,P)}${u||""}${P}`,[P]),v=react.useMemo(()=>i||"...",[i]),y=react.useRef(null),[b,I]=react.useState({id:c?o?typeof o=="number"?h(o):o:1:o||1,label:o||1});react.useImperativeHandle(e,()=>({setPage:R=>I(R),getPage:R=>b,setProgress:R=>y.current?.setProgress?.(R),getProgress:()=>y.current?.getProgress?.()??0}),[y.current]);let{style:A,className:B,rest:H}=N(T),L=react.useCallback(R=>typeof R=="number"?R:+R.label,[]);if(!t)throw new Error('"itemCount" prop is required');let M=react.useMemo(()=>Math.ceil(t/n),[t,n]),$=react.useMemo(()=>{let R=[],k=Math.max(L(b)-(s||2),1),U=Math.min(L(b)+(s||2),M);k>1&&R.push({id:c?h(1):1,label:1}),k>2&&R.push({id:-1,label:v});for(let q=k;q<=U;q++)R.push({id:c?h(q):q,label:q});return U<M-1&&R.push({id:-1,label:v}),U<M&&R.push({id:c?h(M):M,label:M}),R},[b]),_=react.useCallback(R=>{let k=R;+k.label<1||+k.label>M||(I(k),x?.(k));},[t,n,b]);return $.length<=1&&(m??false)===false?null:jsxRuntime.jsxs(f,{ref:S,as:`--pagination ${g===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${B}`,children:[jsxRuntime.jsx(f,{as:"flex flex:1 aic --pgt-btns",children:($.length>1?$:[{id:1,label:1},{id:-1,label:v}]).map((R,k,U)=>{let q=(typeof R=="string"?R:R.label)==L(b);return jsxRuntime.jsx(K,{disabled:R.id==-1||L(b)==+R.label,className:q?"--current-page":"",onClick:D=>_(R),children:g===true?C===true&&q?jsxRuntime.jsx(tt,{ref:y}):"":typeof R=="string"?R:R.label},`--pg-${k}-${R.id}`)})}),jsxRuntime.jsx(f,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(L(b)-1)*n+1} - `,`${Math.min(L(b)*n,t)} of ${t} items`].join(" ")}),jsxRuntime.jsxs(f,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(K,{disabled:L(b)<=1,onClick:R=>_({id:c?h(L(b)-1):L(b)-1,label:L(b)-1}),children:O.chevronLeftOutline}),jsxRuntime.jsx(K,{disabled:$.length<=1||L(b)==L($[$.length-1]),onClick:R=>_({id:c?h(L(b)+1):L(b)+1,label:L(b)+1}),children:O.chevronRightOutline})]})]})};ds.displayName="Zuz.Pagination";var Mt=ds;function Sm(e,r){let{items:t,renderItem:n,effect:o="slide",loop:s=true,loopMode:a="infinite",startIndex:i=0,useKeys:p=true,useWheel:l=true,spacing:c=160,rotation:d=20,scaleStep:u=.15,blur:m=4,animation:g="power",showDots:C=false,autoPlay:x=false,autoPlaySpeed:T=3,onChange:S,...P}=e,{className:h,style:v}=N(P),y=react.useRef(null),b=T/(T>=1e3?1e3:1),I=hooks.useCarousel({total:t.length,initialIndex:i,loop:s,useKeys:p,useWheel:l,onChange:M=>{y.current?.setPage({id:M+1,label:M+1}),y.current?.setProgress(0),S?.(M);}}),{pause:A,resume:B,reset:H}=hooks.useTimer({duration:b,autoStart:x===true,onProgress:M=>{x===true&&y.current?.setProgress(1-M);},onExpired:()=>{x===true&&I.next(),H();}}),L={...v,"--carousel-spacing":`${c}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${m}px`,"--carousel-scale-step":u,"--active-index":I.index,"--carousel-transition":`var(--${g})`};return jsxRuntime.jsxs(f,{ref:r,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${h}`.trim(),style:L,children:[jsxRuntime.jsx(f,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((M,$)=>{let _=$-I.index;if(a==="infinite"){let k=t.length;_=((_+k/2)%k+k)%k-k/2;}let R=$===I.index;return jsxRuntime.jsx(f,{onMouseEnter:()=>R&&A(),onMouseLeave:()=>R&&B(),className:`--carousel-item-wrapper abs ${R?"--is-active":""}`,style:{"--offset":_,zIndex:R?100:100-Math.abs(_),display:Math.abs(_)>5?"none":"flex"},children:n(M,$,I.index)},$)})}),C&&jsxRuntime.jsx(Mt,{ref:y,itemCount:t.length,itemsPerPage:1,startPage:i+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:M=>I.goTo(+M.label-1),asDots:true,progressBar:true})]})}var wm=react.forwardRef(Sm),Cm=wm;var gs=(r=>(r.Line="line",r))(gs||{});var xs=react.forwardRef((e,r)=>{let{data:t,width:n,height:o,lineColor:s,strokeWidth:a=2,gradientStartColor:i,gradientEndColor:p,animated:l,animDuration:c=2,animDelay:d=0,padding:u=0,type:m,...g}=e,{className:C,style:x,rest:T}=N(g),S=react.useRef(null),P=hooks.useResizeObserver(S.current?.parentElement||S),h=typeof n=="number"?n:P.width,v=typeof o=="number"?o:P.height,y={width:h,height:v},b=react.useId(),{pathD:I,areaPathD:A}=hooks.useLineChart(t,y,u+(a||2)),B=react.useRef(null),H=react.useRef(null),[L,M]=react.useState(0),[$,_]=react.useState(0);return react.useEffect(()=>{l&&(B.current&&M(B.current.getTotalLength()),H.current&&_(H.current.getTotalLength()));},[l,I,A,h,v]),jsxRuntime.jsx(f,{ref:S,as:`--chart --${m||"line"}-chart ${C}`.trim(),style:{...x,width:n,height:o},...T,children:h>0&&v>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${h} ${v}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:i}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:p})]})}),jsxRuntime.jsx("path",{ref:H,d:A,fill:`url(#${b})`,stroke:"none",style:l?{strokeDasharray:$,strokeDashoffset:$}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:$,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:B,d:I,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:l?{strokeDasharray:L,strokeDashoffset:L}:{},children:l&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:L,to:"0",dur:`${c||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});xs.displayName="Zuz.Chart";var Bm=xs;var bs=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(bs||{}),vs=(l=>(l.Image="img",l.Video="vid",l.Audio="audio",l.Link="link",l.Document="doc",l.Location="loc",l.Contact="contact",l.Event="event",l.Poll="poll",l))(vs||{});var Ss=react.forwardRef((e,r)=>{let{text:t,media:n,side:o="me",status:s=1,timeStamp:a=Date.now(),arrow:i=true,...p}=e,{className:l,style:c,rest:d}=N(p);return jsxRuntime.jsx(f,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxRuntime.jsxs(f,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${i==true?"--b-arrow":""} ${l}`.trim(),style:{...c},...d,children:[t&&jsxRuntime.jsx(z,{className:"--bubble-text",children:t}),n?n.type=="audio"?jsxRuntime.jsxs(f,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(le,{className:"--bm-action",children:O.play}),jsxRuntime.jsx(tt,{progress:.7}),jsxRuntime.jsx(z,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsxRuntime.jsx(f,{as:"--bubble-image",children:jsxRuntime.jsx(nt,{src:n.source})}):null:null,jsxRuntime.jsxs(f,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(z,{className:"--bubble-stamp tar",children:core.timeSince(a)}),o=="me"&&jsxRuntime.jsx(le,{className:`--bubble-status --bs-${s}`,children:s==0?O.pending:s==1?O.done:s==2?O.doneAll:O.doneAll})]})]})})});Ss.displayName="Zuz.Bubble";var Mm=Ss;var ws=react.forwardRef((e,r)=>{let{style:t,className:n,rest:o}=N(e);return jsxRuntime.jsx("label",{ref:r,style:t,className:n,...o})});ws.displayName="Zuz.Label";var Ot=ws;var Ts=({ref:e,...r})=>{let {name:t,required:n,type:o,value:s,size:a,variant:i,checked:p,disabled:l,onSwitch:c,...d}=r,u=it(),m=!!(t&&u.values);m?u.errors?.[t]:null;let C=m?u.values?.[t]:void 0,[x,T]=react.useState(p||false),S=react.useRef(null),{variant:P}=Y(true),h=react.useMemo(()=>m&&C!=null?typeof C=="string"?C.toLowerCase()!=="false"&&C!=="":!!C:x,[C,x,m]);react.useEffect(()=>{S.current&&S.current.checked!==h&&(S.current.checked=h);},[h]),react.useEffect(()=>{p!==void 0&&T(p);},[p]);let v=y=>{let b=!!y;m&&u.setFieldValue?.(t,b),T(b),c?.(b,s||"cb");};return react.useImperativeHandle(e,()=>({setChecked(y,b=true){v(y);},toggle(y=true){v(!h);}})),jsxRuntime.jsxs(Ot,{"aria-hidden":l,className:[`--${(o||_e.Default).toLowerCase()}`,`${!o||o===_e.Default?"--checkbox":"--switch"}`,`--${i||P||G.Small}`,`flex aic jcc ${h?"is-checked":""} rel`,`${l?"--disabled":""}`].join(" ").trim(),...d,children:[(!o||o==_e.Default)&&O.check,jsxRuntime.jsx(ue,{ref:y=>{S.current=y,e&&(e.current=y);},defaultChecked:h,type:"checkbox",className:"abs",name:t,required:n||false,onChange:y=>{y.stopPropagation(),v(y.target.checked);},disabled:l})]})};Ts.displayName="Zuz.CheckBox";var Vt=Ts;var Zm=({ref:e,...r})=>{let{code:t,copy:n,lang:o="tsx",showLines:s=false,highlight:a="",as:i,fx:p,...l}=r,c=react.useRef(null),{className:d,style:u,rest:m}=N({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${i}`,fx:p},c),g=react.useMemo(()=>{let x=new Set;return a.split(",").forEach(T=>{if(T.includes("-")){let[S,P]=T.split("-").map(Number);for(let h=S;h<=P;h++)x.add(h);}else T&&x.add(Number(T));}),x},[a]),C=react.useMemo(()=>{let x=t.split(`
10
10
  `);for(;x.length>0&&x[0].trim()==="";)x.shift();for(;x.length>0&&x[x.length-1].trim()==="";)x.pop();let T=x[0]?.match(/^\s*/)?.[0].length||0,S=x.map(h=>{let v=h.match(/^\s*/)?.[0].length||0,y=Math.min(v,T);return h.slice(y)}),P=[{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:/(&lt;\/?[A-Z][\w\.]*|&gt;)/g},{name:"var",re:/(?<!&lt;\/|&lt;)\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 S.map((h,v)=>{let y=h.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),b=g.has(v+1);if(o!="plain"){let I=[];P.forEach(A=>{y=y.replace(A.re,B=>{let H=`ZUZ_ID_${I.length}_ZUZ`;return I.push(`<span class="--token-${A.name}">${B}</span>`),H});});for(let A=I.length-1;A>=0;A--)y=y.replace(`ZUZ_ID_${A}_ZUZ`,I[A]);}return `<div class="--code-line ${s==true?"--with-ln":""} ${b?"--is-highlighted":""}">
11
11
  ${s==true?`<span class="--line-number">${v+1}</span>`:""}
12
12
  <span class="--line-content">${y||" "}</span>
13
- </div>`}).join("")},[t,g]);return jsxRuntime.jsxs(f,{as:`--code-block rel ${d}`,style:u,...l,children:[jsxRuntime.jsx("pre",{ref:e,children:jsxRuntime.jsx("code",{className:`--code --lang-${o}`,dangerouslySetInnerHTML:{__html:C}})}),n&&jsxRuntime.jsx(K,{as:"--copy-code abs",onClick:()=>{core.copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},Zm=Km;var Rs=({onSelect:e,meta:r,selected:t,disabled:n=false})=>{let o=react.useRef(null),{index:s,icon:a,label:i}=r,[m,l]=react.useState({x:0,width:0}),c=hooks.useDelayed();return react.useLayoutEffect(()=>{if(c&&o.current){let{width:d,x:u}=o.current.getBoundingClientRect();l({x:u,width:d}),t&&e(s,d,u,r,true);}},[c,o.current]),react.useEffect(()=>{t&&e(s,m.width,m.x,r,false);},[t]),jsxRuntime.jsxs(K,{disabled:n,onClick:()=>e(s,m.width,m.x,r,false),ref:o,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsxRuntime.jsx(ee,{name:a,as:"--segment-icon"}):jsxRuntime.jsx(f,{as:"--segment-icon flex aic jcc",children:a}):null,i&&String(i).trim()!=""&&jsxRuntime.jsx(f,{className:"--segment-label",children:i||`Item ${s}`})]})};Rs.displayName="SelectTabItem";var Is=Rs;var Ns=react.forwardRef((e,r)=>{let{fx:t,items:n,selected:o,variant:s,disabled:a=false,onSwitch:i,...m}=e,[l,c]=react.useState(o||0),d=hooks.useDelayed(50),u=react.useRef(l),{className:p,style:g,rest:C}=N(m),x=react.useRef(null),T=react.useRef(null),{variant:S}=Y(true),P=(h,v,y,b,I)=>{if((I||l!=h&&l!=-2)&&(c(h),u.current=l,queueMicrotask(()=>{d&&i?.(b);})),x.current){let A=T.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${v}px`),x.current.style.setProperty("--x",`${A?y-A.left:y}px`);}};return react.useImperativeHandle(r,()=>({setSelected:h=>{typeof h=="number"&&h!=l&&c(h);}}),[l]),jsxRuntime.jsxs(f,{ref:T,"data-selected":l,className:`${p} --segmented --${s||S||G.Medium} flex aic rel`,style:g,...C,children:[jsxRuntime.jsx(f,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((h,v)=>jsxRuntime.jsx(Is,{disabled:a,onSelect:P,selected:l==v,meta:{...h,index:v}},`segment-${h.label}-${v}`))]})});Ns.displayName="Zuz.SelectTabs";var Dt=Ns;var Ls=react.forwardRef((e,r)=>{let{type:t,variant:n,...o}=e,s=hooks.useDelayed(),{colorScheme:a,setColorScheme:i}=Mo(),m=react.useCallback(()=>{i(a=="dark"?"light":a=="light"?"system":"dark");},[a]),{variant:l}=Y(true),{className:c,style:d}=N(o),u=react.useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"system",index:1,label:"",icon:O.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}],[]),p=react.useMemo(()=>["light","system","dark"].indexOf(a),[a]);return !s||p==-1?null:t=="system"||t=="switch"?jsxRuntime.jsx(Dt,{className:`--color-scheme --${t}`,onSwitch:({tag:g})=>{i(g);},selected:p,items:u,...o}):jsxRuntime.jsx(K,{onClick:m,style:d,variant:n,as:`--color-scheme-switch ${c}`.trim(),children:a=="system"?O.colorSchemeSystem:a=="light"?O.colorSchemeLight:O.colorSchemeDark})});Ls.displayName="Zuz.ColorScheme";var ap=Ls;var Os=react.forwardRef((e,r)=>{let[t,n]=react.useState("wait"),{title:o,message:s,acceptLabel:a,rejectLabel:i,position:m}=e,l=async c=>{n(c==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(c));};return react.useEffect(()=>{let c=localStorage.getItem("--ccnt");n(c?c=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(f,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:te.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${m||xe.Left} flex cols`,children:[jsxRuntime.jsx(z,{as:"--title",children:o||"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(f,{as:"--footer flex aic",children:[jsxRuntime.jsx(K,{onClick:c=>l(1),as:"--accept",children:a||"Accept All"}),jsxRuntime.jsx(K,{onClick:c=>l(0),as:"--reject",children:i||"Cancel"})]})]})});Os.displayName="Zuz.CookiesConsent";var mp=Os;var Vs=({ref:e,...r})=>{let {type:t,value:n=0,min:o=0,max:s=1,step:a=.01,onChange:i,showGhostBar:m,showKnobOnHover:l,showToolTip:c,roundValue:d,formatValue:u,...p}=r,{className:g,style:C,rest:x}=N(p),T=react.useRef(a||.01).current,S=react.useRef(o||0).current,P=react.useRef(s||1).current,h=react.useRef(n||0).current,v=react.useRef(null),y=react.useRef(null),b=react.useRef(null),I=react.useRef(null);react.useRef(null);let B=react.useRef(null),H=react.useRef(null),L=react.useRef(null),M=react.useRef(null),$=(ne,re,de)=>(ne-re)/(de-re)*100,_=ne=>{if(y.current){let re=parseFloat(ne.currentTarget.value);oe(re);let de=$(re,parseFloat(ne.currentTarget.min),parseFloat(ne.currentTarget.max));y.current.style.setProperty("--value",`${de}`),y.current.setAttribute("data-value",`${re}`),i&&i(d?+re.toFixed(2):re);}},[R,k]=react.useState(false),[q,X]=react.useState(0),[D,F]=react.useState(0),[W,Z]=react.useState(false),oe=async ne=>{let re=u?u(+ne):d?(+ne).toFixed(2):Math.round(+ne);L.current&&(L.current.textContent=String(re));},ie=ne=>{if(R){let re=ne.clientX-q,de=P-S,Ce=re/200*de,ge=Math.max(S,Math.min(D+Ce,P));if(ge=Math.round(ge/T)*T,oe(ge),y.current){let Le=$(ge,S,P);y.current.style.setProperty("--value",`${Le}`),y.current.setAttribute("data-value",`${ge}`),H.current&&(H.current.textContent=d?ge.toFixed(2):ge.toString()),i&&i(ge);}}},ce=()=>{k(false),document.body.style.cursor="auto";},Se=ne=>(ne-S)/(P-S)*100,ae=ne=>{if(!y.current)return;let re=y.current.getBoundingClientRect(),de=ne.clientX-re.left,De=Math.max(0,Math.min(100,de/re.width*100));if(c&&L.current){let Ce=v.current?+v.current.value:n;oe(Ce*100);}if(m){let Ce=Se(v.current?+v.current.value:n),ge=Math.min(Ce,De),Le=Math.abs(De-Ce);y.current.style.setProperty("--ghost-start",`${ge}`),y.current.style.setProperty("--ghost-width",`${Le}`);}};react.useEffect(()=>{y.current&&y.current.style.setProperty("--value",v.current?`${$(parseFloat(v.current.value),parseFloat(v.current.min),parseFloat(v.current.max))}`:h.toString());},[]),react.useEffect(()=>(R?(document.addEventListener("mousemove",ie),document.addEventListener("mouseup",ce)):(document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",ce)),()=>{document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",ce);}),[R]),react.useEffect(()=>{let ne=$(n,S,P);y.current?.style.setProperty("--value",`${ne}`),oe(n);},[n,S,P,L.current]);let U=()=>jsxRuntime.jsxs(f,{ref:y,onMouseEnter:()=>Z(true),onMouseLeave:()=>Z(false),onMouseMove:ae,className:`--slider --${t||Ro.Default} ${l?"--knob-hover":""} flex rel ${g}`.trim(),style:{...C},children:[jsxRuntime.jsx(f,{ref:B,className:"--slider-track abs fill"}),m&&jsxRuntime.jsx(f,{ref:I,className:"--slider-ghost abs fill"}),jsxRuntime.jsx(f,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsxRuntime.jsx(f,{ref:b,className:"--slider-knob --tooltip-knob abs"}),jsxRuntime.jsx(ue,{ref:v,onInput:_,className:"abs fill",tabIndex:0,type:t||Ro.Default,defaultValue:h||0,step:T,max:P,min:S})]});if(c===true){let ne=u?u(n):d?n.toFixed(2):n;return jsxRuntime.jsx(Tt,{ref:M,show:R,position:vt.Top,margin:15,anchorName:"--tooltip-knob",title:jsxRuntime.jsx(le,{ref:L,children:ne}),children:U()})}return U()};Vs.displayName="Zuz.Slider";var mt=Vs;var Hs=react.forwardRef((e,r)=>{let{src:t,shape:n,size:o,...s}=e,{style:a,className:i,rest:m}=N(s),{canvasRef:l,crop:c,setScale:d,handleMouseDown:u,handleMouseUp:p,handleMouseMove:g}=hooks.useImageCropper(t,o||200,n||hooks.CropShape.Circle);return react.useImperativeHandle(r,()=>({getCropped(){return c()},setScale(C){d(C);}})),jsxRuntime.jsxs(f,{as:`--cropper --${n||hooks.CropShape.Circle} ${i}`,style:a,...m,children:[jsxRuntime.jsx("canvas",{ref:l,width:o||200,height:o||200,onMouseDown:u,onMouseUp:p,onMouseLeave:p,onMouseMove:g}),jsxRuntime.jsx(f,{as:"--cropper-slider",children:jsxRuntime.jsx(mt,{onChange:C=>d(C),min:0,max:1,step:.01,value:1})})]})});Hs.displayName="Zuz.Cropper";var gp=Hs;var yp=(t=>(t.Circle="circle",t.Square="square",t))(yp||{});var $s=react.forwardRef((e,r)=>{let{items:t,maxItems:n}=e,o=react.useMemo(()=>{let i=typeof t=="string",m=i?[]:t;return i&&t.split(",").forEach(l=>{m.push({label:l});}),m},[t]),a=react.useMemo(()=>n&&n>0&&o.length>n-1,[o,n])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-n)]:o;return jsxRuntime.jsx(rt,{ref:r,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(f,{as:"--crumb-chevron",children:O.chevronRightOutline}),items:a.map((i,m,l)=>i.ID=="."?jsxRuntime.jsx(f,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(f,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${m}`))}):jsxRuntime.jsxs(K,{onClick:()=>i.action?.(),className:"--crumb-item",disabled:!l[m+1],children:[i.icon&&jsxRuntime.jsx(ee,{as:"--crumb-icon",name:i.icon}),jsxRuntime.jsx(z,{as:"--crumb-label",children:i.label})]},`${i.label.replace(/\s+/g,"-").toLowerCase()}-${m}`))})});$s.displayName="Zuz.Crumb";var bp=$s;var _s=react.forwardRef((e,r)=>{let{icon:t,defaultValue:n,value:o,size:s,variant:a,numeric:i,type:m,onConfirm:l,...c}=e,[d,u]=react.useState(false),[p,g]=react.useState(n||null),{style:C,className:x,rest:T}=N(c),S=react.useRef(null),P=react.useRef(null),{reposition:h}=Bt(P,{direction:xe.Bottom,offset:2}),v=b=>{i&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let b=I=>{let A=I.target,B=S.current?.contains(A),H=P.current?.contains(A);!B&&!H&&u(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),react.useEffect(()=>{let b=I=>{I.key==="Escape"&&d&&(u(false),S.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let y=()=>{u(true);};return react.useEffect(()=>{d&&h();},[d,h]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(f,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${x}`,"data-value":p?p.toISOString():"",children:[t?typeof t=="string"?jsxRuntime.jsx(ee,{as:"mr:10 c:#666",name:t}):t:jsxRuntime.jsx(le,{as:"--date-picker-icon flex aic jcc",children:O.calendar}),jsxRuntime.jsx("input",{ref:S,value:p?dateFns.format(p,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:C,onFocus:y,onInput:v,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&l?.(b.currentTarget.value);},...T}),jsxRuntime.jsx(f,{"aria-hidden":!d,ref:P,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:d,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsxRuntime.jsx(pr,{defaultValue:p,onChange:b=>{g(b),u(false);}})})]})})});_s.displayName="Zuz.DatePicker";var Cp=_s;var Ks=react.forwardRef((e,r)=>{let{icon:t,variant:n,position:o}=e;return jsxRuntime.jsx(K,{className:`--fab fixed --${n||G.Large} --${o||"bottomright"}`,children:t||O.plus})});Ks.displayName="Zuz.Fab";var Ip=Ks;var Np=({ref:e,children:r,...t})=>{let{legend:n,legendPlacement:o,variant:s,...a}=t,{variant:i}=Y(true),{className:m,style:l,rest:c}=N(a);return jsxRuntime.jsxs(f,{as:`--fieldset --rel --flex --${s||i||G.Medium} ${m}`.trim(),style:l,children:[jsxRuntime.jsx(f,{as:`--legend --abs --${o||"top-start"}`,children:n&&typeof n=="string"?jsxRuntime.jsx("legend",{children:n}):n}),r]})},Bp=Np;var Ws=e=>{let{names:r,strength:t}=e,n={[Kt.Gooey]:o=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||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-${Kt.Gooey}`)};return react.useEffect(()=>{},[r]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(r||[Kt.Gooey]).map(o=>n[o](t))})})};Ws.displayName="Zuz.Filters";var Mp=Ws;var Gs=e=>{let {ref:r,cols:t,rows:n,gap:o,gapX:s,gapY:a,align:i,justify:m,inline:l,flow:c,autoCols:d,autoRows:u,template:p,...g}=e;react.useRef(null);let {className:x,style:T,rest:S}=N(g),P=v=>typeof v=="number"?`repeat(${v}, 1fr)`:v,h={display:l?"inline-grid":"grid",gridTemplateColumns:P(t),gridTemplateRows:P(n),gap:o,columnGap:s,rowGap:a,alignItems:i,justifyContent:m==="between"?"space-between":m==="around"?"space-around":m,gridAutoFlow:c,gridAutoColumns:d,gridAutoRows:u,gridTemplateAreas:p,...T};return jsxRuntime.jsx(f,{ref:r,as:`--grid ${x}`.trim(),style:h,...S})};Gs.displayName="Zuz.Grid";var Dp=Gs;var Us=e=>typeof e=="string"&&e.includes("+"),qs={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"},Xs={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 js=react.forwardRef(({children:e,keys:r,as:t,className:n,variant:o},s)=>{let{variant:a}=Y(true),i=react.useMemo(()=>{if(Us(r)){let m=null;return {keys:String(r).split("+").reduce((c,d,u,p)=>(p[u+1]?c.push(d):m=d.toUpperCase(),c),[]),children:m}}return {keys:r,children:String(e).toUpperCase()}},[r]);return jsxRuntime.jsxs(f,{as:`--keyboard-keys --${o||a||G.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(i.keys)?i.keys:[i.keys]).map(m=>jsxRuntime.jsx("abbr",{title:Xs[m],children:qs[m]},m)),jsxRuntime.jsx(le,{children:i?.children??e})]})});js.displayName="Zuz.KeyboardKeys";var wr=js;var ea=react.createContext(null),ft=()=>{let e=react.useContext(ea);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},Zp=({ref:e,icons:r,children:t,...n})=>{let{playlist:o=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:i="No Track",defaultCover:m,onTrackChange:l,...c}=n,{className:d,style:u,rest:p}=N(c),g=hooks.useMediaPlayer(o,o[0]??void 0),C=react.useMemo(()=>({play:O.play,pause:O.pause,prev:O.prev,next:O.next,volumeHigh:O.volumeHigh,volumeMute:O.volumeMute,...r}),[r]),x=react.useMemo(()=>({...g,mode:s,icons:C}),[g,C]);return jsxRuntime.jsx(ea.Provider,{value:x,children:jsxRuntime.jsx(f,{className:`--zuz-media-player ${d}`,style:u,children:t})})},ta=Zp;var oa=e=>{if(!e||isNaN(e))return "0:00";let r=Math.floor(e/60),t=Math.floor(e%60);return `${r}:${t.toString().padStart(2,"0")}`},uo=e=>typeof e=="string"?jsxRuntime.jsx(ee,{name:e}):e,ra=()=>{let{mediaRef:e,state:r,controls:t,mode:n}=ft();return jsxRuntime.jsxs(f,{as:`--mediaplayer-stage rel --mode-${n}`,children:[n==="video"?jsxRuntime.jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsxRuntime.jsx("audio",{ref:e}),r.isLoading&&jsxRuntime.jsx(f,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsxRuntime.jsx(Pe,{})})]})},na=()=>{let{state:e,defaultArtist:r,defaultTitle:t,defaultCover:n}=ft();return jsxRuntime.jsxs(f,{as:"--track-info flex aic",children:[jsxRuntime.jsx(nt,{src:e.currentItem?.cover||n||"",as:"--track-cover"}),jsxRuntime.jsxs(f,{as:"flex cols",children:[jsxRuntime.jsx(f,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsxRuntime.jsx(f,{as:"--track-artist",children:e.currentItem?.artist||r||"..."})]})]})},sa=()=>{let{state:e,controls:r,icons:t}=ft();return jsxRuntime.jsxs(f,{as:"--mediaplayer-controls flex aic",children:[jsxRuntime.jsx(K,{onClick:r.prev,as:"--prev",children:uo(t?.prev??O.prev)}),jsxRuntime.jsx(K,{onClick:r.togglePlay,as:"--play-pause",children:uo(e.isPlaying?t?.pause??O.pause:t?.play??O.play)}),jsxRuntime.jsx(K,{onClick:r.next,as:"--next",children:uo(t?.next??O.next)})]})},aa=()=>{let{state:e,controls:r,mediaRef:t}=ft(),n=e.progress*(e.duration||0);return jsxRuntime.jsxs(f,{as:"--track-progress flex aic",children:[jsxRuntime.jsx(f,{as:"--track-current-duration",children:oa(n)}),jsxRuntime.jsx(mt,{value:e.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;r.seek(a);}}),jsxRuntime.jsx(f,{as:"--track-total-duration",children:oa(e.duration)})]})},ia=()=>{let{state:e,controls:r,icons:t}=ft();return jsxRuntime.jsxs(f,{as:"--volume-control flex aic gap:8 w:120",children:[jsxRuntime.jsx(K,{onClick:()=>r.setIsMuted(),children:uo(e.isMuted?t?.volumeMute??O.volumeMute:t?.volumeHigh??O.volumeHigh)}),jsxRuntime.jsx(mt,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let o=n.currentTarget.getBoundingClientRect();r.setVolume((n.clientX-o.left)/o.width);}})]})};var Wp=Object.assign(ta,{Stage:ra,TrackInfo:na,Controls:sa,Progress:aa,Volume:ia}),Gp=Wp;var ca=react.forwardRef((e,r)=>{let t=hooks.useNetworkStatus(),{onlineMessage:n,offlineMessage:o,variant:s}=e;return jsxRuntime.jsxs(f,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:t==false,curve:te.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||G.Small} fixed flex`,children:[jsxRuntime.jsx(f,{className:"--ico",children:t?O[Be.Success]:O[Be.Error]}),jsxRuntime.jsx(z,{as:"--message",children:t?n||"internet connection restored :)":o||"no internet connection"})]})});ca.displayName="Zuz.NetWorkManager";var Xp=ca;var pa=react.forwardRef((e,r)=>{let{strenthMeter:t,onChange:n,...o}=e;"type"in o&&delete o.type;let{style:s,className:a,rest:i}=N(o),[m,l]=react.useState(false),[c,d]=react.useState(""),u=react.useMemo(()=>core.checkPasswordStrength(c),[c]),p=hooks.useDebounce(g=>{t&&d(g.target.value),n&&n(g);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(f,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(f,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(ue,{ref:r,type:m?"text":"password",className:a,onChange:p,...i}),jsxRuntime.jsx(K,{tabIndex:-1,onClick:()=>l(g=>!g),className:"--toggle flex aic jcc abs",children:m?O.eye:O.eyeSlash})]}),t&&jsxRuntime.jsxs(f,{as:`flex aic --password-meter --pb-score-${u.score}`,style:s,children:[jsxRuntime.jsxs(f,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(f,{as:`--pbar ${u.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(f,{as:`--pbar ${u.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(f,{as:`--pbar ${u.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(f,{as:`--pbar ${u.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(f,{as:`--pbar ${u.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(z,{as:"--password-meter-label","aria-hidden":true,children:u.result})]})]})});pa.displayName="Zuz.Password";var ou=pa;var fa=react.forwardRef((e,r)=>{let{size:t,length:n,mask:o,...s}=e,a=react.useRef([]),i="pinput",m=false,l={};"with"in s&&(l={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(i=s.name,delete s.name),"required"in s&&(m=true,delete s.required);let{style:c}=N(s),d=p=>{let g=p.currentTarget,C=a.current[parseInt(g.dataset.index)+1],x=a.current[parseInt(g.dataset.index)-1];g.value.length===1&&C?C.focus():g.value.length===0&&x&&x.focus();},{variant:u}=Y(true);return react.useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsxRuntime.jsx(f,{name:i,style:c,className:`--otp --${s.variant??u??G.Medium} flex aic rel`,"data-required":m,"data-size":t||n||4,...l,children:Array(t||n||4).fill(1).map((p,g)=>jsxRuntime.jsx(ue,{autoComplete:"new-password","data-index":g,ref:C=>{a.current[g]=C;},numeric:true,onChange:d,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${g}`))})});fa.displayName="Zuz.PinInput";var au=fa;var da=react.forwardRef((e,r)=>{let{children:t,className:n,name:o,required:s,type:a,value:i,variant:m,checked:l,onSwitch:c,...d}=e,[u,p]=react.useState(l||false),{variant:g}=Y(true),C=react.useRef(null);return jsxRuntime.jsxs(Ot,{className:`${n} --${(a||Io.Default).toLowerCase()} --radio${!a||a==Io.Default?"":"card"} --${m||g||G.Small} flex aic rel`.trim(),...d,children:[jsxRuntime.jsx(ue,{ref:C,defaultChecked:u,value:i||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:x=>{c&&c(x.target.checked,i||"cb"),p(x.target.checked);}}),jsxRuntime.jsx(f,{className:"--dot rel",children:jsxRuntime.jsx(f,{className:"--rod abs abc"})}),jsxRuntime.jsx(f,{className:"--value",children:t})]})});da.displayName="Zuz.Radio";var mu=da;var ga=react.forwardRef((e,r)=>{let{fx:t,withStyle:n,as:o,reverse:s=false,searchIcon:a=O.search,hideSearchIcon:i=false,clearIcon:m=O.close,hideClearIcon:l=false,onChange:c,onClear:d,...u}=e,{style:p,className:g}=N({as:e.as}),[C,x]=react.useState(""),{variant:T}=Y(true),S=react.useRef(null);"type"in e&&delete e.type;let P=v=>{x(v.target.value),c?.(v.target.value);},h=v=>{C.trim()!==""&&(x(""),c?.(""),S.current&&(S.current.value="",e.onConfirm?.("")));};return react.useImperativeHandle(r,()=>({focus:()=>S.current?.focus(),value:()=>S.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(f,{style:p,className:`--search --no-shrink ${s?"--search-rev":""} --${e.variant||T||G.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${g}`.trim(),children:[jsxRuntime.jsx(ue,{ref:S,onChange:P,...u}),e.shortcut&&jsxRuntime.jsx(wr,{keys:e.shortcut,as:"abs"}),jsxRuntime.jsx(K,{tabIndex:-1,onClick:v=>h(),className:"--send flex aic jcc",variant:e.variant||G.Medium,children:C!==""?!l&&(typeof m=="string"?jsxRuntime.jsx(ee,{name:m,as:"--search-action"}):m):!i&&(typeof a=="string"?jsxRuntime.jsx(ee,{name:a,as:"--search-action"}):a)})]})});ga.displayName="Zuz.Search";var Cr=ga;var xu=({label:e,icon:r})=>jsxRuntime.jsxs(f,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[r&&jsxRuntime.jsx(ee,{name:r}),jsxRuntime.jsx(z,{as:"--select-group-label",children:e})]}),ya=xu;var ba=({checkIcon:e,selected:r,updateValue:t,o:n})=>{let o=e?typeof e=="string"?jsxRuntime.jsx(ee,{name:"checkIcon"}):e:O.check,s=n.disabled===true;return jsxRuntime.jsxs(K,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${r?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxRuntime.jsxs(we,{as:"--option-item-meta --aic",children:[n.icon&&jsxRuntime.jsx(ee,{name:n.icon,as:`--select-option-icon --icon-${n.value}`,color:n.iconColor}),jsxRuntime.jsx(z,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),r&&jsxRuntime.jsx(we,{aic:true,jcc:true,as:"--select-option-check --abs",children:o})]})};ba.displayName="Option";var va=ba;var wa=(({ref:e,...r})=>{let{selected:t,options:n,label:o,name:s,variant:a,search:i,searchPlaceholder:m,maxHeight:l,arrowDownIcon:c=O.arrowDown,arrowUpIcon:d=O.arrowUp,expanded:u,multiple:p,tokenizer:g,wrapTokens:C,disabled:x,checkIcon:T,closeIcon:S,editable:P,editablePlaceholder:h,onChange:v,required:y,with:b,...I}=r,A=Rt(),B=!!(s&&A?.setFieldValue),H=vn(s),L=bn(s),M=P===true&&p!==true&&g!==true,$=E=>typeof E=="string"||typeof E=="number",_=E=>typeof E=="object"&&E!==null&&!Array.isArray(E)&&"value"in E&&"label"in E,R=E=>n.find(J=>String(J.value)===String(E)),k=E=>{if(E==null)return null;if(M&&E==="")return "";if(p||g)return (Array.isArray(E)?E:[E]).map(fe=>$(fe)?R(fe):fe).filter(fe=>_(fe));if($(E)){let J=R(E);return J||(M?String(E):null)}return _(E)?E:null},q=()=>{if(t!==void 0)return k(t);let E=n.find(J=>String(J.value)==="-1");return E||(M?"":null)},X=E=>Array.isArray(E)?E.map(J=>J.value):_(E)?E.value:E,[D,F]=react.useState(()=>q()),[W,Z]=react.useState(false),[oe,Q]=react.useState(null),ie=react.useRef(null),ce=react.useRef(null),Se=react.useRef(null),ae=react.useId(),me=react.useMemo(()=>s||ae,[s,ae]),{reposition:U}=Bt(Se,{direction:vt.Bottom,offset:2}),{variant:ne}=Y(true),re=S?typeof S=="string"?jsxRuntime.jsx(ee,{name:S}):S:O.close,{className:de,style:De,rest:Ce}=N(I,void 0),{onClick:ge,...Le}=Ce||{},se=react.useMemo(()=>L!==void 0?k(L):D,[L,D,n,M,p,g]),ye=react.useMemo(()=>{if(!(!se||Array.isArray(se)||!_(se)))return se},[se]),Ft=react.useMemo(()=>M?_(se)?String(se.value??""):$(se)?String(se):"":"",[M,se]),zt=E=>Array.isArray(se)?se.some(J=>J.value===E.value):_(se)?se.value===E.value:M&&$(se)?String(se)===String(E.value):false,He=E=>{if(B&&A?.setFieldValue&&s){A.setFieldValue(s,X(E));return}F(E);},Me=E=>{v?.(P===true&&E instanceof Option?String(E.value):E);},wo=E=>{if(!(x||E.disabled)){if(p||g){let J=Array.isArray(se)?se:[],Ne=J.find(Co=>Co.value===E.value)?J.filter(Co=>Co.value!==E.value):[...J,E];He(Ne),Me(Ne);return}He(E),Z(false),Me(E);}},Ya=E=>{let J=E.target.value,fe=J===""?null:R(J),Ne=fe?fe.value:J;He(Ne),Me(Ne);},ja=E=>{if(E.key==="Enter"&&(E.preventDefault(),M)){let J=E.currentTarget.value.trim();if(!J){Z(false);return}let Ne=R(J)??J;He(Ne),Me(Ne),Z(false);}},Qa=(E,J)=>{if(E.stopPropagation(),x)return;let fe=se.filter(Ne=>Ne.value!==J.value);He(fe),Z(false),Me(fe);},Ja=E=>{let J=E.currentTarget,fe=J.scrollTop===0&&E.deltaY<0,Ne=J.scrollHeight-J.scrollTop===J.clientHeight&&E.deltaY>0;!fe&&!Ne||E.preventDefault(),E.stopPropagation();};react.useImperativeHandle(e,()=>({setSelected:E=>{He(k(E));},getValue:()=>se??null}),[se,n,M,p,g,B,s]),react.useEffect(()=>{B||t===void 0||F(k(t));},[t,B,n,M,p,g]),react.useEffect(()=>{if(!W)return;let E=()=>{U();};return window.addEventListener("scroll",E,true),window.addEventListener("resize",U),()=>{window.removeEventListener("scroll",E,true),window.removeEventListener("resize",U);}},[W,U]),react.useEffect(()=>{if(!W){ce.current&&(ce.current.value=""),Q(null);return}ce.current?.focus(),U();let E=fe=>{ie.current&&!ie.current.contains(fe.target)&&Z(false);},J=setTimeout(()=>{document.addEventListener("click",E);},0);return ()=>{clearTimeout(J),document.removeEventListener("click",E);}},[W,U]);let ei=hooks.useDebounce(E=>Q(E===""?null:E),300),ti=hooks.useDebounce(Ya,300);return jsxRuntime.jsxs(f,{ref:ie,"data-required":y?"true":void 0,with:b,className:[`--select ${u==true?"--expanded":""}`,`--${a||ne}`,`${s?`--${s}`:""}`,`${H?"--has-error":""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:me,children:[M?jsxRuntime.jsxs(f,{"data-value":ye?.value??(Ft||"-1"),className:`--select-display --selected --editable flex aic rel ${de}`.trim(),style:De,onClick:E=>E.stopPropagation(),...Le,children:[ye?.icon&&jsxRuntime.jsx(ee,{as:"--selected-icon",name:ye.icon}),jsxRuntime.jsx(we,{aic:true,as:"--label-wrapper",children:jsxRuntime.jsx(ue,{"aria-expanded":W,className:"--select-input",disabled:x,onChange:ti,onClick:E=>{E.stopPropagation(),x||Z(true);},onKeyDown:ja,placeholder:h||o||"Choose",type:"text",defaultValue:Ft})}),jsxRuntime.jsx(K,{className:"--select-toggle rel flex aic jcc",disabled:x,onClick:E=>{E.stopPropagation(),x||Z(J=>!J);},tabIndex:-1,withLabel:false,children:W?typeof d=="string"?jsxRuntime.jsx(ee,{name:d,as:"--search-action"}):d:typeof c=="string"?jsxRuntime.jsx(ee,{name:c,as:"--search-action"}):c})]}):jsxRuntime.jsxs(K,{disabled:x,variant:a||ne,"data-value":ye?.value??"-1",className:`--select-display --selected flex aic rel ${de}`.trim(),withLabel:false,style:De,onClick:E=>{E.stopPropagation(),x||Z(J=>!J);},...Le,children:[ye?.icon&&jsxRuntime.jsx(ee,{as:"--selected-icon",name:ye.icon}),jsxRuntime.jsx(we,{aic:true,as:"--label-wrapper",children:g&&Array.isArray(se)&&se.length>0?jsxRuntime.jsxs(we,{as:`--tokens-wrap${C===true?" --wrap":""}`,children:[se.map(E=>jsxRuntime.jsxs(we,{aic:true,as:"--token",children:[jsxRuntime.jsx(z,{as:"--token-label",children:E.label}),jsxRuntime.jsx(f,{as:"--token-remove",onClick:J=>Qa(J,E),children:re})]},E.value)),se.length<n.length&&jsxRuntime.jsx(z,{as:"--label",children:o||"Choose"})]}):jsxRuntime.jsx(z,{as:"--label",children:Array.isArray(se)?se.length>0?`${se.length} selected`:o||"Choose":ye?.label||o||"Choose"})}),jsxRuntime.jsx(f,{className:"--svg-arrow rel flex aic jcc",children:W?typeof d=="string"?jsxRuntime.jsx(ee,{name:d,as:"--search-action"}):d:typeof c=="string"?jsxRuntime.jsx(ee,{name:c,as:"--search-action"}):c})]}),jsxRuntime.jsxs(f,{id:me,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!W,onWheel:Ja,style:{maxHeight:l||"auto"},ref:Se,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:W,duration:.05},children:[i&&jsxRuntime.jsx(f,{as:"--select-search --no-shrink flex --sticky",children:jsxRuntime.jsx(Cr,{ref:ce,variant:G.Small,placeholder:m||"Search...",onChange:ei})}),o&&jsxRuntime.jsx(ya,{label:o}),n?.filter(E=>!oe||E.label.toLowerCase().includes(oe.toLowerCase()))?.map(E=>jsxRuntime.jsx(va,{updateValue:wo,checkIcon:T,selected:zt(E),o:E},`option-${E.label.replace(/\s+/g,"-")}-${E.value}`))]})]})});wa.displayName="Zuz.Select";var wu=wa;var Ca=({ref:e,...r})=>jsxRuntime.jsx(Vt,{type:_e.Switch,...r,ref:e});Ca.displayName="Zuz.Switch";var Cu=Ca;var Pa=e=>{let{idx:r,id:t,as:n,weight:o,style:s,value:a,render:i,resize:m,sortBy:l,sortable:c,onSort:d}=e,[u,p]=react.useState(0),g=()=>{c&&(d?.(String(t),u==1?-1:1),p(C=>C==1?-1:1));};return jsxRuntime.jsxs(f,{style:{flex:o||1,...s},as:`--col flex aic ${n||""} ${c?"--sortable":""}`,onClick:g,children:[jsxRuntime.jsx(f,{as:"--colv",children:a}),r==-1&&c&&l==t&&jsxRuntime.jsx(f,{as:"--arrow flex aib",children:u==1?O.arrowUp:O.arrowDown})]})};Pa.displayName="Zuz.Column";var xo=Pa;var Ia=e=>{let{index:r,pubsub:t,schema:n,data:o,ids:s,styles:a,animate:i,sortBy:m,selectable:l,tableRef:c,loading:d,rowClassName:u,onSort:p,onRowClick:g,onSelect:C,onContextMenu:x}=e,T=hooks.useDelayed(),S=react.useMemo(()=>({transition:j.SlideInBottom,curve:te.EaseInOut,delay:.02*(r+1)}),[]),P=react.useRef(null),h=(y,b)=>{r==-1?t.emit(`ALL_ROWS_${y?"CHECKED":"UNCHECKED"}`,y):(C&&C(o,y),t.emit(`ROW_${y?"CHECKED":"UNCHECKED"}`,y,b));},v=(y,b,I)=>jsxRuntime.jsx(xo,{idx:y,id:b,as:"--selector",pubsub:t,value:jsxRuntime.jsx(Vt,{value:I,ref:P,onSwitch:h,type:_e.Default})});return react.useEffect(()=>{let y=(B,H)=>{P.current?.setChecked(B,false);},b=(B,H)=>{let L=false;c?.current&&c.current.querySelectorAll(".--row").forEach(M=>{let $=M;if(!$.classList.contains("--row-head")){let _=$.querySelector(".--selector input[type=checkbox]");_&&_.checked&&!L&&(L=_.checked);}}),P.current.setChecked(L,false);},I=B=>{P.current?.setChecked(B,false),C&&C(o,B);},A=B=>{P.current?.setChecked(B,false),C&&C(o,B);};return r==-1?(t.on("ROW_CHECKED",y),t.on("ROW_UNCHECKED",b),()=>{t.off("ROW_CHECKED",y),t.off("ROW_UNCHECKED",b);}):(t.on("ALL_ROWS_CHECKED",I),t.on("ALL_ROWS_UNCHECKED",A),()=>{t.off("ALL_ROWS_CHECKED",I),t.off("ALL_ROWS_UNCHECKED",A);})},[]),jsxRuntime.jsxs(f,{onContextMenu:y=>x?x(y,o):null,onClick:y=>g?g(y,e.data):()=>{},...i?{fx:{...S,when:T}}:{},as:`--row flex aic ${g?"--row-clickable":""} ${r==-1?"--row-head":""} ${u||""}`,children:[r==-1&&n.map((y,b)=>{let{renderWhenHeader:I,render:A,value:B,...H}=y;return jsxRuntime.jsxs(react.Fragment,{children:[l&&b==0&&v(-1,`--selector-${y.id}`,"all"),jsxRuntime.jsx(xo,{idx:-1,onSort:p,sortBy:m,value:B,...H,pubsub:t,style:a[y.id]})]},`--col-${y.id}`)}),d&&r>-1&&jsxRuntime.jsx(f,{as:"--col",children:jsxRuntime.jsx(z,{as:"opacity:0",children:"..."})}),!d&&r>-1&&s&&o&&n.map((y,b)=>jsxRuntime.jsxs(react.Fragment,{children:[l&&b==0&&v(b,`--selector-${y.id}`,y.id.toString()),s.includes(String(y.id))?jsxRuntime.jsx(xo,{pubsub:t,idx:b,id:String(y.id),style:a[String(y.id)],value:y.render?y.render(o,r):o[String(y.id).includes(".")?String(y.id).split(".").reverse()[0]:y.id]}):null]},`--${String(y.id)}-val-${b}`))]})};Ia.displayName="Zuz.Row";var bo=Ia;var ka=(e,r)=>{let{schema:t,rows:n,rowCount:o,rowsPerPage:s,currentPage:a,pagination:i,paginationHash:m,showPaginationOnZeroPageCount:l,animateRows:c,header:d,rowClassName:u,selectableRows:p,hoverable:g,sortBy:C,loading:x,loadingRowCount:T,loadingMessage:S,spinner:P,emptyMessage:h,onSort:v,onRowClick:y,onRowSelectToggle:b,onPageChange:I,onRowContextMenu:A,...B}=e,H=react.useRef(null),L=react.useMemo(()=>t.reduce((me,U)=>(me[U.id]={flex:U.weight||1,...U.w&&{width:U.w},...U.maxW&&{maxWidth:U.maxW},...U.minW&&{minWidth:U.minW},...U.h&&{height:U.h},...U.maxH&&{maxHeight:U.maxH},...U.minH&&{minHeight:U.minH}},me),{}),[t]),M=react.useMemo(()=>Object.keys(L),[t]),$=react.useMemo(()=>d??true,[d]),{style:_,className:R,rest:k}=N(B),q=react.useRef(null),X=react.useMemo(()=>new core.PubSub,[]),D=react.useRef(n.map(()=>core.uuid(8))),[F,W]=react.useState(C||null),[Z,oe]=react.useState(S||"loading"),Q=react.useMemo(()=>!x&&n&&n.length==0,[x,n]),ie=react.useCallback(()=>h?typeof h=="function"?jsxRuntime.jsx(h,{}):h:jsxRuntime.jsx(z,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);react.useEffect(()=>{n.length&&!D.current&&(D.current=n.map(()=>core.uuid(8)));},[n]);let ce=(me,U)=>{W(me),v?.(me,U);},Se=(o||(n?n.length:0))/(s||10),ae=react.useMemo(()=>l||Se>1?jsxRuntime.jsx(Mt,{hash:m,ref:H,renderOnZeroPageCount:l,onPageChange:I,paginationStyle:"table",startPage:a,itemCount:o||(n?n.length:0),itemsPerPage:s||10}):null,[a,o]);return react.useImperativeHandle(r,()=>({setLoading(me){}})),jsxRuntime.jsxs(f,{as:`--table ${g??true?"--hoverable":""} flex cols rel ${R}`,ref:q,children:[$==true&&jsxRuntime.jsx(bo,{sortBy:F,onSort:ce,tableRef:q,pubsub:X,selectable:p,index:-1,schema:t,loading:true,styles:L}),x&&jsxRuntime.jsxs(f,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(Pe,{type:P||ve.Simple}),Z&&jsxRuntime.jsx(z,{as:"--table-loading-message",children:Z})]}),x&&Array(T||5).fill({}).map((me,U)=>jsxRuntime.jsx(bo,{tableRef:q,index:U,pubsub:X,schema:t,styles:L,loading:true,animate:c,onRowClick:y},`--trow-loading-${U}-${t[0].id}`)),!x&&n&&n.map((me,U)=>jsxRuntime.jsx(bo,{tableRef:q,pubsub:X,loading:false,index:U,schema:t,ids:M,styles:L,animate:c,data:me,onRowClick:y,rowClassName:u,selectable:p,onSelect:b,onContextMenu:A},`--trow-${D.current[U]||U}-${t[0].id}`)),Q&&ie(),i&&ae&&jsxRuntime.jsx(f,{"aria-hidden":!i||!ae,...c?{fx:{transition:j.SlideInBottom,curve:te.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&i&&ae!=null}}:{},as:"--row flex aic --row-footer",children:ae})]})};ka.displayName="Zuz.Table";var Du=react.forwardRef(ka),Hu=Du;var $u=({ref:e,...r})=>{let{title:t,items:n}=r,[o,s]=react.useState(0),a=(i,m,l)=>{i.preventDefault(),s(m),document.getElementById(l)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(f,{ref:e,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(z,{as:"--toc-title",children:t}),jsxRuntime.jsx(rt,{items:n.map((i,m)=>jsxRuntime.jsx("a",{className:o==m?"--toc-active":"",style:{anchorName:o===m?"--toc-active":"none",color:o==m?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:l=>a(l,m,i.tag),href:`#${i.tag}`,children:i.label}))})]})},Fu=$u;var La=({isActive:e,transitionType:r,speed:t,width:n,render:o,content:s,onHeightChange:a})=>{let i=react.useRef(null),m=hooks.useResizeObserver(i);react.useEffect(()=>{e&&m.height>0&&a(m.height);},[e,m.height]);let c=react.useMemo(()=>{let d={width:n>0?`${n}px`:"100%",minWidth:n>0?`${n}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return r==="fade"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,visibility:e?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:e?1:0}:r==="scale"?{...d,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}:d},[e,r,n,t]);return jsxRuntime.jsx(f,{ref:i,style:{...c},className:"--content",children:o||e?s:null})};La.displayName="Zuz.TabBody";var Ma=La;var Da=({ref:e,...r})=>{let{tabs:t,speed:n=.3,prerender:o=true,variant:s,tabStyle:a="fixed",onChange:i,transitionType:m="slide",...l}=r,[c,d]=react.useState(0),u=react.useRef(null),p=hooks.useResizeObserver(u),g=react.useMemo(()=>core.uuid(8),[]),[C,x]=react.useState("auto"),T=react.useMemo(()=>p.width>0,[p.width]);react.useImperativeHandle(e,()=>({setTab:b=>d(b)}));let S=react.useMemo(()=>t.map(b=>({...b,key:b.key||core.uuid(8)})),[t]),{style:P,className:h,rest:v}=N({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),y=()=>{if(!T)return {opacity:0};switch(m){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${S.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${c*p.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(f,{ref:u,style:P,className:`--tabview --${a} flex cols ${h}`,children:[jsxRuntime.jsx(Dt,{as:"--tabview-head",onSwitch:b=>{d(b.index);let I=S.find(A=>A.tag==b.tag);I&&I.onSelect&&(I.onSelect(I,b.index),i?.(I,b.index));},selected:c,items:S.reduce((b,I,A)=>(b.push({icon:I.icon,index:A,label:I.label,tag:I.tag}),b),[])}),jsxRuntime.jsx(f,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:C,transition:T?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:T?1:0},children:jsxRuntime.jsx(f,{className:"--track",style:{...y()},children:S.map((b,I)=>jsxRuntime.jsx(Ma,{isActive:I===c,transitionType:m,speed:n,width:p.width,render:o||I===c,onHeightChange:A=>I===c&&x(A),content:b.body},`tab-body-${b.key||I}-${g}`))})})]})};Da.displayName="Zuz.TabView";var Yu=Da;var ef=({ref:e,commands:r,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[i,m]=react.useState([{type:"output",content:n}]),[l,c]=react.useState(""),d=react.useRef(null),u=react.useRef(null),{variant:p}=Y(true);react.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[i]);let g=h=>{let v=typeof h=="string"?{type:"output",content:h}:h;m(y=>{let b=[...y,v];return b.length>1e3?b.slice(-1e3):b});},C=()=>m([]);react.useImperativeHandle(e,()=>({write:g,clear:C}));let x=async h=>{let[v,...y]=h.split(" "),b=v.toLowerCase();return r&&r[b]?await r[b](y):t?await t(h):`command not found: ${v}`},T=h=>{let v=/\u001b\[(\d+)m/g,y=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,A="#d4d4d4",B=false,H;for(;(H=v.exec(h))!==null;){let M=h.slice(I,H.index);M&&y.push({text:M,color:A,bold:B});let $=H[1];$==="0"?(A="#d4d4d4",B=false):$==="1"?B=true:b[$]&&(A=b[$]),I=v.lastIndex;}let L=h.slice(I);return L&&y.push({text:L,color:A,bold:B}),y},S=(h,v)=>h.includes("\x1B")?T(h).map((y,b)=>jsxRuntime.jsx(le,{style:{color:y.color||"#d4d4d4",fontWeight:y.bold?"bold":"normal"},children:y.text},`--terminal-msg-${b}-${y.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(le,{style:{color:v==="error"?"#ff5f56":v==="command"?"#00ff00":"#d4d4d4"},children:h}),P=async h=>{if(h.key==="Enter"&&l.trim()){let v=l.trim(),y=[...i,{type:"command",content:`${o}${v}`}];c(""),m(y);let b=await x(v);m(I=>[...I,{type:"output",content:b}]);}};return jsxRuntime.jsxs(f,{as:`--zuz-terminal --${s||p||G.Medium} flex cols ${a.className}`,onClick:()=>u.current?.focus(),children:[jsxRuntime.jsx(f,{ref:d,className:"--terminal-log",children:i.map((h,v)=>jsxRuntime.jsx(f,{children:jsxRuntime.jsx(z,{children:S(h.content,h.type)})},v))}),jsxRuntime.jsxs(f,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(z,{as:"--terminal-prompt",children:o}),jsxRuntime.jsx(ue,{ref:u,className:"--zuz-term-input",autoFocus:true,value:l,variant:s||p||G.Medium,onChange:h=>c(h.target.value),onKeyDown:P})]})]})},tf=ef;var of=({meta:e})=>jsxRuntime.jsxs(K,{as:"flex aic --command-item",children:[e.icon&&jsxRuntime.jsx(ee,{name:e.icon,as:"--command-icon"}),jsxRuntime.jsx(z,{children:e.label})]}),rf=({position:e,onSelect:r,commands:t,visible:n})=>jsxRuntime.jsx(f,{"aria-hidden":!n,fx:{transition:j.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(o=>jsxRuntime.jsx(of,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),Fa=rf;var Ka=({ref:e,...r})=>{let {autoResize:t,maxHeight:n,variant:o,resize:s="none",command:a,commands:i,name:m,onInput:l,cmd:c,renderDropdown:d,value:u,defaultValue:p,...g}=r,C=react.useRef(null),x=react.useRef(null),{variant:T}=Y(true),{style:S,className:P,rest:h}=N(g),v=it();m?v.errors?.[m]:null;let b=m&&v.values&&v.setFieldValue,I=b?v.values?.[m]:void 0,A=hooks.useDebounce(k=>{b&&v.setFieldValue?.(m,k);},500),{showDropdown:B,dropdownPosition:H,handleKeyDown:L,handleInput:M,handleCommandSelect:$}=hooks.useCommandActions({command:a,commands:i,cmd:c,ref:C}),_=react.useCallback(()=>{let k=C.current;!k||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{k.style.height="auto";let q=k.scrollHeight;if(n){let X=parseInt(n.toString(),10);isNaN(X)||(q=Math.min(q,X));}k.style.height=`${q}px`,k.style.overflowY=n&&q>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),R=k=>{A(k.currentTarget.value),l?.(k),M(k),_();};return react.useEffect(()=>{C.current&&m&&I!==void 0&&C.current.value!==String(I)&&(C.current.value=String(I));},[I,m]),react.useEffect(()=>{_();},[u,p,_]),react.useEffect(()=>{t&&C.current&&_();},[t,_]),react.useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),react.useEffect(()=>()=>{b&&v.deleteFieldValue?.(m);},[]),jsxRuntime.jsxs(f,{as:"rel",children:[jsxRuntime.jsx("textarea",{name:m,className:`--input --textarea --${o||T||G.Medium} flex ${P}`.trim(),style:{...S,resize:s,height:t?"auto":S?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:L,onInput:R,ref:k=>{C.current=k,typeof e=="function"?e(k):e&&(e.current=k);},value:u,defaultValue:p,...h}),d?d({show:B,position:H,commands:i||[],onSelect:$}):i&&i.length>0&&jsxRuntime.jsx(Fa,{visible:B,commands:i,onSelect:$,position:H})]})};Ka.displayName="Zuz.TextArea";var cf=Ka;var Wa=react.forwardRef((e,r)=>{let{as:t,value:n,color:o,direction:s,...a}=e,i=react.useRef(null),[m,l]=react.useState(n||0);return react.useImperativeHandle(r,()=>({updateValue(c){m.toString().length!==c.toString().length&&l(c);},setValue(c){if(this.updateValue(c),i.current){let d=c.toString().split("");i.current.querySelectorAll(".--wheel-char").forEach((u,p)=>{let g=d[p];if(u instanceof HTMLElement){u.setAttribute("data-value",g);let C=u.querySelector(".--wheel-char-track");C instanceof HTMLElement&&(C.style.setProperty("--v",g),C.offsetWidth);}});}}})),react.useEffect(()=>{l(n||0);},[n]),jsxRuntime.jsxs(f,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:i,...a,children:[(m||0).toString().split("").map((c,d)=>isNaN(parseInt(c,10))?jsxRuntime.jsx(le,{className:"--wheel-char wheel-char-symbol grid",children:c},`wheel-char-symbol-${d}`):jsxRuntime.jsx(le,{"data-value":c,className:`--wheel-char grid ${d>(m||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(le,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":c},children:[jsxRuntime.jsx(le,{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((u,p)=>jsxRuntime.jsx(le,{children:u},`${d}--${p}`)),jsxRuntime.jsx(le,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),o&&jsxRuntime.jsx(f,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});Wa.displayName="Zuz.TextWheel";var hf=Wa;var Lr=react.forwardRef((e,r)=>{let{as:t,meta:n,nodes:o,icons:s,onSelect:a,treeTag:i,selected:m,roots:l,expanded:c,...d}=e,{tag:u,label:p,icon:g,under:C,isHead:x}=n,T=react.useMemo(()=>l.includes(u),[l]),[S,P]=react.useState(c),h=()=>{localStorage.setItem(`--tn${i}-${u}`,S?"0":"1"),P(!S);};react.useEffect(()=>{c||T&&!localStorage.getItem(`--tn${i}-${u}`)?(localStorage.setItem(`--tn${i}-${u}`,"1"),P(true)):P(localStorage.getItem(`--tn${i}-${u}`)=="1");},[]);let v=react.useMemo(()=>o.filter(y=>y.under==u),[o,u]);return jsxRuntime.jsxs(f,{className:`--treenode ${T?"--is-root":""} --treenode-${u} flex cols`,children:[jsxRuntime.jsxs(f,{className:`--node --node-${u} flex aic ${m==u?" --selected":""}`,children:[jsxRuntime.jsx(K,{skeleton:d.skeleton,onClick:h,className:"--node-aro-btn",disabled:v.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(ee,{skeleton:d.skeleton,className:"--node-aro-icon",name:v.length==0?s?.arrowDisabled||s?.arrowClose:S?s?.arrowOpen:s?.arrowClose}):v.length==0?O.chevronBottom:S?O.chevronBottom:O.chevronRight}),jsxRuntime.jsxs(K,{className:"--node-meta flex aic",onClick:y=>a(u),children:[(s?.nodeOpen&&s?.nodeClose||T&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(ee,{skeleton:d.skeleton,className:`--node-icon ${T?"--icon-root":""}`,name:g||(S?T&&s?.rootOpen||s.nodeOpen:T&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(z,{className:`--node-label ${T?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:p})]})]}),S&&v.length>0&&jsxRuntime.jsx(f,{className:`--sub-node tree-sub-node-${u} flex cols`,children:v.map(y=>jsxRuntime.jsx(Lr,{treeTag:i,selected:m,onSelect:a,icons:s,roots:l,expanded:y.expanded||false,meta:y,nodes:o},`--node-${y.tag}`))})]})});Lr.displayName="TreeItem";var Ua=Lr;var Xa=react.forwardRef((e,r)=>{let{as:t,nodes:n,onNodeSelect:o,tag:s,icons:a,roots:i,selected:m,...l}=e,[c,d]=react.useState(m);react.useImperativeHandle(r,()=>({getSelected:()=>c}),[o]);let u=p=>{d(p),o&&o(p);};return react.useEffect(()=>{c!=m&&d(m);},[m]),jsxRuntime.jsx(f,{className:"--treeview flex cols",children:n.filter(p=>i.includes(p.tag)).map(p=>jsxRuntime.jsx(Ua,{treeTag:s?`-${s}`:"",selected:c,onSelect:g=>u(g),icons:a,meta:p,roots:i,expanded:p.expanded||false,skeleton:l.skeleton,nodes:n},`--node-${p.tag}`))})});Xa.displayName="Zuz.TreeView";var Tf=Xa;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
14
- Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunk7VYMG5ZY_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunk7VYMG5ZY_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunk7VYMG5ZY_cjs.h}});exports.ALERT=Be;exports.AVATAR=Hr;exports.Accordion=uc;exports.ActionBar=xc;exports.Alert=Sc;exports.AutoComplete=zc;exports.Avatar=Xc;exports.Badge=jc;exports.Box=f;exports.Bubble=Lm;exports.BubbleMediaType=vs;exports.BubbleStatus=bs;exports.Button=K;exports.CHART=gs;exports.CHECKBOX=_e;exports.COLORTHEME=Ef;exports.Calendar=pr;exports.Carousel=wm;exports.Chart=Nm;exports.CheckBox=Vt;exports.CodeBlock=Zm;exports.ColorScheme=ap;exports.ContextMenu=Do;exports.CookiesConsent=mp;exports.Cover=Ae;exports.CropShape=yp;exports.Cropper=gp;exports.Crumb=bp;exports.DATATYPE=Lf;exports.DIALOG=Qe;exports.DIALOG_ACTION_POSITION=Ar;exports.DRAWER_SIDE=Te;exports.DatePicker=Cp;exports.Dialog=Qo;exports.Drawer=or;exports.FILTER=Kt;exports.FORMVALIDATION=je;exports.FORMVALIDATION_STYLE=Mf;exports.Fab=Ip;exports.Fieldset=Bp;exports.Filters=Mp;exports.Flex=we;exports.Form=qo;exports.Grid=Dp;exports.Group=Ho;exports.Icon=ee;exports.Image=nt;exports.Input=ue;exports.KeyboardKeys=wr;exports.KeysLabelMap=Xs;exports.KeysMap=qs;exports.Label=Ot;exports.LayersProvider=Oo;exports.List=rt;exports.MediaPlayer=Gp;exports.NetworkStatus=Xp;exports.ORIGIN=St;exports.OriginType=Nf;exports.Overlay=Je;exports.PLACEMENTS=Bf;exports.POSITION=vt;exports.PROGRESS=Vf;exports.Pagination=Mt;exports.PaginationStyle=lo;exports.Password=ou;exports.PinInput=au;exports.Position=xe;exports.ProgressBar=tt;exports.RADIO=Io;exports.Radio=mu;exports.SHEET=ke;exports.SHEET_ACTION_POSITION=Po;exports.SKELETON=If;exports.SLIDER=Ro;exports.SORT=kf;exports.SPINNER=ve;exports.ScrollView=Jo;exports.Search=Cr;exports.Select=wu;exports.SelectTabs=Dt;exports.Sheet=Ji;exports.Slider=mt;exports.SnackPosition=jt;exports.SnackStyle=pn;exports.SnackType=Yt;exports.Span=le;exports.Spinner=Pe;exports.Status=Of;exports.Switch=Cu;exports.TRANSITIONS=j;exports.TRANSITION_CURVES=te;exports.TabView=Yu;exports.Table=Hu;exports.TableOfContents=Fu;exports.Terminal=tf;exports.Text=z;exports.TextWheel=hf;exports.Textarea=cf;exports.ThemeProvider=mi;exports.ToastDefaultTitle=un;exports.ToastPosition=jt;exports.ToastProvider=nr;exports.ToastStyle=pn;exports.ToastType=Yt;exports.ToolTip=Tt;exports.TreeView=Tf;exports.Variant=G;exports.animationTransition=wt;exports.buildClassString=Eo;exports.buildWithStyles=zr;exports.css=ed;exports.getAnimationCurve=No;exports.getAnimationTransition=td;exports.getZuzMap=ri;exports.isKeyCombination=Us;exports.setZuzMap=Fr;exports.useBase=N;exports.useContextMenu=Zl;exports.useDialog=Ul;exports.useDrawer=Yl;exports.useFx=be;exports.useMorph=Jl;exports.usePosition=Bt;exports.useSnack=ac;exports.useToast=Ao;
13
+ </div>`}).join("")},[t,g]);return jsxRuntime.jsxs(f,{as:`--code-block rel ${d}`,style:u,...l,children:[jsxRuntime.jsx("pre",{ref:e,children:jsxRuntime.jsx("code",{className:`--code --lang-${o}`,dangerouslySetInnerHTML:{__html:C}})}),n&&jsxRuntime.jsx(K,{as:"--copy-code abs",onClick:()=>{core.copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},Wm=Zm;var Rs=({onSelect:e,meta:r,selected:t,disabled:n=false})=>{let o=react.useRef(null),{index:s,icon:a,label:i}=r,[p,l]=react.useState({x:0,width:0}),c=hooks.useDelayed();return react.useLayoutEffect(()=>{if(c&&o.current){let{width:d,x:u}=o.current.getBoundingClientRect();l({x:u,width:d}),t&&e(s,d,u,r,true);}},[c,o.current]),react.useEffect(()=>{t&&e(s,p.width,p.x,r,false);},[t]),jsxRuntime.jsxs(K,{disabled:n,onClick:()=>e(s,p.width,p.x,r,false),ref:o,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsxRuntime.jsx(ee,{name:a,as:"--segment-icon"}):jsxRuntime.jsx(f,{as:"--segment-icon flex aic jcc",children:a}):null,i&&String(i).trim()!=""&&jsxRuntime.jsx(f,{className:"--segment-label",children:i||`Item ${s}`})]})};Rs.displayName="SelectTabItem";var Is=Rs;var Ns=react.forwardRef((e,r)=>{let{fx:t,items:n,selected:o,variant:s,disabled:a=false,onSwitch:i,...p}=e,[l,c]=react.useState(o||0),d=hooks.useDelayed(50),u=react.useRef(l),{className:m,style:g,rest:C}=N(p),x=react.useRef(null),T=react.useRef(null),{variant:S}=Y(true),P=(h,v,y,b,I)=>{if((I||l!=h&&l!=-2)&&(c(h),u.current=l,queueMicrotask(()=>{d&&i?.(b);})),x.current){let A=T.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${v}px`),x.current.style.setProperty("--x",`${A?y-A.left:y}px`);}};return react.useImperativeHandle(r,()=>({setSelected:h=>{typeof h=="number"&&h!=l&&c(h);}}),[l]),jsxRuntime.jsxs(f,{ref:T,"data-selected":l,className:`${m} --segmented --${s||S||G.Medium} flex aic rel`,style:g,...C,children:[jsxRuntime.jsx(f,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((h,v)=>jsxRuntime.jsx(Is,{disabled:a,onSelect:P,selected:l==v,meta:{...h,index:v}},`segment-${h.label}-${v}`))]})});Ns.displayName="Zuz.SelectTabs";var Dt=Ns;var Ls=react.forwardRef((e,r)=>{let{type:t,variant:n,...o}=e,s=hooks.useDelayed(),{colorScheme:a,setColorScheme:i}=Mo(),p=react.useCallback(()=>{i(a=="dark"?"light":a=="light"?"system":"dark");},[a]),{variant:l}=Y(true),{className:c,style:d}=N(o),u=react.useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"system",index:1,label:"",icon:O.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:O.colorSchemeLight},{tag:"dark",index:2,label:"",icon:O.colorSchemeDark}],[]),m=react.useMemo(()=>["light","system","dark"].indexOf(a),[a]);return !s||m==-1?null:t=="system"||t=="switch"?jsxRuntime.jsx(Dt,{className:`--color-scheme --${t}`,onSwitch:({tag:g})=>{i(g);},selected:m,items:u,...o}):jsxRuntime.jsx(K,{onClick:p,style:d,variant:n,as:`--color-scheme-switch ${c}`.trim(),children:a=="system"?O.colorSchemeSystem:a=="light"?O.colorSchemeLight:O.colorSchemeDark})});Ls.displayName="Zuz.ColorScheme";var ip=Ls;var Os=react.forwardRef((e,r)=>{let[t,n]=react.useState("wait"),{title:o,message:s,acceptLabel:a,rejectLabel:i,position:p}=e,l=async c=>{n(c==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(c));};return react.useEffect(()=>{let c=localStorage.getItem("--ccnt");n(c?c=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(f,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:te.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${p||xe.Left} flex cols`,children:[jsxRuntime.jsx(z,{as:"--title",children:o||"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(f,{as:"--footer flex aic",children:[jsxRuntime.jsx(K,{onClick:c=>l(1),as:"--accept",children:a||"Accept All"}),jsxRuntime.jsx(K,{onClick:c=>l(0),as:"--reject",children:i||"Cancel"})]})]})});Os.displayName="Zuz.CookiesConsent";var pp=Os;var Vs=({ref:e,...r})=>{let {type:t,value:n=0,min:o=0,max:s=1,step:a=.01,onChange:i,showGhostBar:p,showKnobOnHover:l,showToolTip:c,roundValue:d,formatValue:u,...m}=r,{className:g,style:C,rest:x}=N(m),T=react.useRef(a||.01).current,S=react.useRef(o||0).current,P=react.useRef(s||1).current,h=react.useRef(n||0).current,v=react.useRef(null),y=react.useRef(null),b=react.useRef(null),I=react.useRef(null);react.useRef(null);let B=react.useRef(null),H=react.useRef(null),L=react.useRef(null),M=react.useRef(null),$=(ne,re,de)=>(ne-re)/(de-re)*100,_=ne=>{if(y.current){let re=parseFloat(ne.currentTarget.value);oe(re);let de=$(re,parseFloat(ne.currentTarget.min),parseFloat(ne.currentTarget.max));y.current.style.setProperty("--value",`${de}`),y.current.setAttribute("data-value",`${re}`),i&&i(d?+re.toFixed(2):re);}},[R,k]=react.useState(false),[U,q]=react.useState(0),[D,F]=react.useState(0),[W,Z]=react.useState(false),oe=async ne=>{let re=u?u(+ne):d?(+ne).toFixed(2):Math.round(+ne);L.current&&(L.current.textContent=String(re));},ie=ne=>{if(R){let re=ne.clientX-U,de=P-S,Ce=re/200*de,ge=Math.max(S,Math.min(D+Ce,P));if(ge=Math.round(ge/T)*T,oe(ge),y.current){let Le=$(ge,S,P);y.current.style.setProperty("--value",`${Le}`),y.current.setAttribute("data-value",`${ge}`),H.current&&(H.current.textContent=d?ge.toFixed(2):ge.toString()),i&&i(ge);}}},ce=()=>{k(false),document.body.style.cursor="auto";},Se=ne=>(ne-S)/(P-S)*100,ae=ne=>{if(!y.current)return;let re=y.current.getBoundingClientRect(),de=ne.clientX-re.left,De=Math.max(0,Math.min(100,de/re.width*100));if(c&&L.current){let Ce=v.current?+v.current.value:n;oe(Ce*100);}if(p){let Ce=Se(v.current?+v.current.value:n),ge=Math.min(Ce,De),Le=Math.abs(De-Ce);y.current.style.setProperty("--ghost-start",`${ge}`),y.current.style.setProperty("--ghost-width",`${Le}`);}};react.useEffect(()=>{y.current&&y.current.style.setProperty("--value",v.current?`${$(parseFloat(v.current.value),parseFloat(v.current.min),parseFloat(v.current.max))}`:h.toString());},[]),react.useEffect(()=>(R?(document.addEventListener("mousemove",ie),document.addEventListener("mouseup",ce)):(document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",ce)),()=>{document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",ce);}),[R]),react.useEffect(()=>{let ne=$(n,S,P);y.current?.style.setProperty("--value",`${ne}`),oe(n);},[n,S,P,L.current]);let X=()=>jsxRuntime.jsxs(f,{ref:y,onMouseEnter:()=>Z(true),onMouseLeave:()=>Z(false),onMouseMove:ae,className:`--slider --${t||Ro.Default} ${l?"--knob-hover":""} flex rel ${g}`.trim(),style:{...C},children:[jsxRuntime.jsx(f,{ref:B,className:"--slider-track abs fill"}),p&&jsxRuntime.jsx(f,{ref:I,className:"--slider-ghost abs fill"}),jsxRuntime.jsx(f,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsxRuntime.jsx(f,{ref:b,className:"--slider-knob --tooltip-knob abs"}),jsxRuntime.jsx(ue,{ref:v,onInput:_,className:"abs fill",tabIndex:0,type:t||Ro.Default,defaultValue:h||0,step:T,max:P,min:S})]});if(c===true){let ne=u?u(n):d?n.toFixed(2):n;return jsxRuntime.jsx(Tt,{ref:M,show:R,position:vt.Top,margin:15,anchorName:"--tooltip-knob",title:jsxRuntime.jsx(le,{ref:L,children:ne}),children:X()})}return X()};Vs.displayName="Zuz.Slider";var mt=Vs;var Hs=react.forwardRef((e,r)=>{let{src:t,shape:n,size:o,...s}=e,{style:a,className:i,rest:p}=N(s),{canvasRef:l,crop:c,setScale:d,handleMouseDown:u,handleMouseUp:m,handleMouseMove:g}=hooks.useImageCropper(t,o||200,n||hooks.CropShape.Circle);return react.useImperativeHandle(r,()=>({getCropped(){return c()},setScale(C){d(C);}})),jsxRuntime.jsxs(f,{as:`--cropper --${n||hooks.CropShape.Circle} ${i}`,style:a,...p,children:[jsxRuntime.jsx("canvas",{ref:l,width:o||200,height:o||200,onMouseDown:u,onMouseUp:m,onMouseLeave:m,onMouseMove:g}),jsxRuntime.jsx(f,{as:"--cropper-slider",children:jsxRuntime.jsx(mt,{onChange:C=>d(C),min:0,max:1,step:.01,value:1})})]})});Hs.displayName="Zuz.Cropper";var hp=Hs;var xp=(t=>(t.Circle="circle",t.Square="square",t))(xp||{});var $s=react.forwardRef((e,r)=>{let{items:t,maxItems:n}=e,o=react.useMemo(()=>{let i=typeof t=="string",p=i?[]:t;return i&&t.split(",").forEach(l=>{p.push({label:l});}),p},[t]),a=react.useMemo(()=>n&&n>0&&o.length>n-1,[o,n])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-n)]:o;return jsxRuntime.jsx(rt,{ref:r,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(f,{as:"--crumb-chevron",children:O.chevronRightOutline}),items:a.map((i,p,l)=>i.ID=="."?jsxRuntime.jsx(f,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(f,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${p}`))}):jsxRuntime.jsxs(K,{onClick:()=>i.action?.(),className:"--crumb-item",disabled:!l[p+1],children:[i.icon&&jsxRuntime.jsx(ee,{as:"--crumb-icon",name:i.icon}),jsxRuntime.jsx(z,{as:"--crumb-label",children:i.label})]},`${i.label.replace(/\s+/g,"-").toLowerCase()}-${p}`))})});$s.displayName="Zuz.Crumb";var vp=$s;var _s=react.forwardRef((e,r)=>{let{icon:t,defaultValue:n,value:o,size:s,variant:a,numeric:i,type:p,onConfirm:l,...c}=e,[d,u]=react.useState(false),[m,g]=react.useState(n||null),{style:C,className:x,rest:T}=N(c),S=react.useRef(null),P=react.useRef(null),{reposition:h}=Bt(P,{direction:xe.Bottom,offset:2}),v=b=>{i&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let b=I=>{let A=I.target,B=S.current?.contains(A),H=P.current?.contains(A);!B&&!H&&u(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),react.useEffect(()=>{let b=I=>{I.key==="Escape"&&d&&(u(false),S.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let y=()=>{u(true);};return react.useEffect(()=>{d&&h();},[d,h]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(f,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${x}`,"data-value":m?m.toISOString():"",children:[t?typeof t=="string"?jsxRuntime.jsx(ee,{as:"mr:10 c:#666",name:t}):t:jsxRuntime.jsx(le,{as:"--date-picker-icon flex aic jcc",children:O.calendar}),jsxRuntime.jsx("input",{ref:S,value:m?dateFns.format(m,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:C,onFocus:y,onInput:v,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&l?.(b.currentTarget.value);},...T}),jsxRuntime.jsx(f,{"aria-hidden":!d,ref:P,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:d,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsxRuntime.jsx(pr,{defaultValue:m,onChange:b=>{g(b),u(false);}})})]})})});_s.displayName="Zuz.DatePicker";var Tp=_s;var Ks=react.forwardRef((e,r)=>{let{icon:t,variant:n,position:o}=e;return jsxRuntime.jsx(K,{className:`--fab fixed --${n||G.Large} --${o||"bottomright"}`,children:t||O.plus})});Ks.displayName="Zuz.Fab";var Ep=Ks;var Bp=({ref:e,children:r,...t})=>{let{legend:n,legendPlacement:o,variant:s,...a}=t,{variant:i}=Y(true),{className:p,style:l,rest:c}=N(a);return jsxRuntime.jsxs(f,{as:`--fieldset --rel --flex --${s||i||G.Medium} ${p}`.trim(),style:l,children:[jsxRuntime.jsx(f,{as:`--legend --abs --${o||"top-start"}`,children:n&&typeof n=="string"?jsxRuntime.jsx("legend",{children:n}):n}),r]})},kp=Bp;var Ws=e=>{let{names:r,strength:t}=e,n={[Kt.Gooey]:o=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||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-${Kt.Gooey}`)};return react.useEffect(()=>{},[r]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(r||[Kt.Gooey]).map(o=>n[o](t))})})};Ws.displayName="Zuz.Filters";var Op=Ws;var Gs=e=>typeof e=="number"?`repeat(${e}, 1fr)`:e,Dp=e=>e==="between"?"space-between":e==="around"?"space-around":e,Us=e=>{let{ref:r,cols:t,rows:n,columns:o,gap:s,gapX:a,gapY:i,columnGap:p,rowGap:l,align:c,alignItems:d,justify:u,justifyContent:m,inline:g,flow:C,autoFlow:x,autoCols:T,autoRows:S,autoColumns:P,autoRow:h,template:v,areas:y,...b}=e,{className:I,style:A,rest:B}=N(b),H=o??t,L=p??a,M=l??i,$=d??c,_=m??u,R=x??C,k=P??T,U=h??S,q=y??v,D={display:g?"inline-grid":"grid",gridTemplateColumns:Gs(H),gridTemplateRows:Gs(n),gap:s,columnGap:L,rowGap:M,alignItems:$,justifyContent:Dp(_),gridAutoFlow:R,gridAutoColumns:k,gridAutoRows:U,gridTemplateAreas:q,...A};return jsxRuntime.jsx(f,{ref:r,className:["--grid",I].filter(Boolean).join(" "),style:D,...B})};Us.displayName="Zuz.Grid";var Hp=Us;var qs=e=>typeof e=="string"&&e.includes("+"),Xs={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"},Ys={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 Qs=react.forwardRef(({children:e,keys:r,as:t,className:n,variant:o},s)=>{let{variant:a}=Y(true),i=react.useMemo(()=>{if(qs(r)){let p=null;return {keys:String(r).split("+").reduce((c,d,u,m)=>(m[u+1]?c.push(d):p=d.toUpperCase(),c),[]),children:p}}return {keys:r,children:String(e).toUpperCase()}},[r]);return jsxRuntime.jsxs(f,{as:`--keyboard-keys --${o||a||G.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(i.keys)?i.keys:[i.keys]).map(p=>jsxRuntime.jsx("abbr",{title:Ys[p],children:Xs[p]},p)),jsxRuntime.jsx(le,{children:i?.children??e})]})});Qs.displayName="Zuz.KeyboardKeys";var wr=Qs;var ta=react.createContext(null),ft=()=>{let e=react.useContext(ta);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},Wp=({ref:e,icons:r,children:t,...n})=>{let{playlist:o=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:i="No Track",defaultCover:p,onTrackChange:l,...c}=n,{className:d,style:u,rest:m}=N(c),g=hooks.useMediaPlayer(o,o[0]??void 0),C=react.useMemo(()=>({play:O.play,pause:O.pause,prev:O.prev,next:O.next,volumeHigh:O.volumeHigh,volumeMute:O.volumeMute,...r}),[r]),x=react.useMemo(()=>({...g,mode:s,icons:C}),[g,C]);return jsxRuntime.jsx(ta.Provider,{value:x,children:jsxRuntime.jsx(f,{className:`--zuz-media-player ${d}`,style:u,children:t})})},oa=Wp;var ra=e=>{if(!e||isNaN(e))return "0:00";let r=Math.floor(e/60),t=Math.floor(e%60);return `${r}:${t.toString().padStart(2,"0")}`},uo=e=>typeof e=="string"?jsxRuntime.jsx(ee,{name:e}):e,na=()=>{let{mediaRef:e,state:r,controls:t,mode:n}=ft();return jsxRuntime.jsxs(f,{as:`--mediaplayer-stage rel --mode-${n}`,children:[n==="video"?jsxRuntime.jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsxRuntime.jsx("audio",{ref:e}),r.isLoading&&jsxRuntime.jsx(f,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsxRuntime.jsx(Pe,{})})]})},sa=()=>{let{state:e,defaultArtist:r,defaultTitle:t,defaultCover:n}=ft();return jsxRuntime.jsxs(f,{as:"--track-info flex aic",children:[jsxRuntime.jsx(nt,{src:e.currentItem?.cover||n||"",as:"--track-cover"}),jsxRuntime.jsxs(f,{as:"flex cols",children:[jsxRuntime.jsx(f,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsxRuntime.jsx(f,{as:"--track-artist",children:e.currentItem?.artist||r||"..."})]})]})},aa=()=>{let{state:e,controls:r,icons:t}=ft();return jsxRuntime.jsxs(f,{as:"--mediaplayer-controls flex aic",children:[jsxRuntime.jsx(K,{onClick:r.prev,as:"--prev",children:uo(t?.prev??O.prev)}),jsxRuntime.jsx(K,{onClick:r.togglePlay,as:"--play-pause",children:uo(e.isPlaying?t?.pause??O.pause:t?.play??O.play)}),jsxRuntime.jsx(K,{onClick:r.next,as:"--next",children:uo(t?.next??O.next)})]})},ia=()=>{let{state:e,controls:r,mediaRef:t}=ft(),n=e.progress*(e.duration||0);return jsxRuntime.jsxs(f,{as:"--track-progress flex aic",children:[jsxRuntime.jsx(f,{as:"--track-current-duration",children:ra(n)}),jsxRuntime.jsx(mt,{value:e.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;r.seek(a);}}),jsxRuntime.jsx(f,{as:"--track-total-duration",children:ra(e.duration)})]})},la=()=>{let{state:e,controls:r,icons:t}=ft();return jsxRuntime.jsxs(f,{as:"--volume-control flex aic gap:8 w:120",children:[jsxRuntime.jsx(K,{onClick:()=>r.setIsMuted(),children:uo(e.isMuted?t?.volumeMute??O.volumeMute:t?.volumeHigh??O.volumeHigh)}),jsxRuntime.jsx(mt,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let o=n.currentTarget.getBoundingClientRect();r.setVolume((n.clientX-o.left)/o.width);}})]})};var Gp=Object.assign(oa,{Stage:na,TrackInfo:sa,Controls:aa,Progress:ia,Volume:la}),Up=Gp;var ma=react.forwardRef((e,r)=>{let t=hooks.useNetworkStatus(),{onlineMessage:n,offlineMessage:o,variant:s}=e;return jsxRuntime.jsxs(f,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:t==false,curve:te.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||G.Small} fixed flex`,children:[jsxRuntime.jsx(f,{className:"--ico",children:t?O[Be.Success]:O[Be.Error]}),jsxRuntime.jsx(z,{as:"--message",children:t?n||"internet connection restored :)":o||"no internet connection"})]})});ma.displayName="Zuz.NetWorkManager";var Yp=ma;var ua=react.forwardRef((e,r)=>{let{strenthMeter:t,onChange:n,...o}=e;"type"in o&&delete o.type;let{style:s,className:a,rest:i}=N(o),[p,l]=react.useState(false),[c,d]=react.useState(""),u=react.useMemo(()=>core.checkPasswordStrength(c),[c]),m=hooks.useDebounce(g=>{t&&d(g.target.value),n&&n(g);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(f,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(f,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(ue,{ref:r,type:p?"text":"password",className:a,onChange:m,...i}),jsxRuntime.jsx(K,{tabIndex:-1,onClick:()=>l(g=>!g),className:"--toggle flex aic jcc abs",children:p?O.eye:O.eyeSlash})]}),t&&jsxRuntime.jsxs(f,{as:`flex aic --password-meter --pb-score-${u.score}`,style:s,children:[jsxRuntime.jsxs(f,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(f,{as:`--pbar ${u.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(f,{as:`--pbar ${u.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(f,{as:`--pbar ${u.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(f,{as:`--pbar ${u.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(f,{as:`--pbar ${u.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(z,{as:"--password-meter-label","aria-hidden":true,children:u.result})]})]})});ua.displayName="Zuz.Password";var ru=ua;var da=react.forwardRef((e,r)=>{let{size:t,length:n,mask:o,...s}=e,a=react.useRef([]),i="pinput",p=false,l={};"with"in s&&(l={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(i=s.name,delete s.name),"required"in s&&(p=true,delete s.required);let{style:c}=N(s),d=m=>{let g=m.currentTarget,C=a.current[parseInt(g.dataset.index)+1],x=a.current[parseInt(g.dataset.index)-1];g.value.length===1&&C?C.focus():g.value.length===0&&x&&x.focus();},{variant:u}=Y(true);return react.useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsxRuntime.jsx(f,{name:i,style:c,className:`--otp --${s.variant??u??G.Medium} flex aic rel`,"data-required":p,"data-size":t||n||4,...l,children:Array(t||n||4).fill(1).map((m,g)=>jsxRuntime.jsx(ue,{autoComplete:"new-password","data-index":g,ref:C=>{a.current[g]=C;},numeric:true,onChange:d,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${g}`))})});da.displayName="Zuz.PinInput";var iu=da;var ga=react.forwardRef((e,r)=>{let{children:t,className:n,name:o,required:s,type:a,value:i,variant:p,checked:l,onSwitch:c,...d}=e,[u,m]=react.useState(l||false),{variant:g}=Y(true),C=react.useRef(null);return jsxRuntime.jsxs(Ot,{className:`${n} --${(a||Io.Default).toLowerCase()} --radio${!a||a==Io.Default?"":"card"} --${p||g||G.Small} flex aic rel`.trim(),...d,children:[jsxRuntime.jsx(ue,{ref:C,defaultChecked:u,value:i||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:x=>{c&&c(x.target.checked,i||"cb"),m(x.target.checked);}}),jsxRuntime.jsx(f,{className:"--dot rel",children:jsxRuntime.jsx(f,{className:"--rod abs abc"})}),jsxRuntime.jsx(f,{className:"--value",children:t})]})});ga.displayName="Zuz.Radio";var pu=ga;var ha=react.forwardRef((e,r)=>{let{fx:t,withStyle:n,as:o,reverse:s=false,searchIcon:a=O.search,hideSearchIcon:i=false,clearIcon:p=O.close,hideClearIcon:l=false,onChange:c,onClear:d,...u}=e,{style:m,className:g}=N({as:e.as}),[C,x]=react.useState(""),{variant:T}=Y(true),S=react.useRef(null);"type"in e&&delete e.type;let P=v=>{x(v.target.value),c?.(v.target.value);},h=v=>{C.trim()!==""&&(x(""),c?.(""),S.current&&(S.current.value="",e.onConfirm?.("")));};return react.useImperativeHandle(r,()=>({focus:()=>S.current?.focus(),value:()=>S.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(f,{style:m,className:`--search --no-shrink ${s?"--search-rev":""} --${e.variant||T||G.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${g}`.trim(),children:[jsxRuntime.jsx(ue,{ref:S,onChange:P,...u}),e.shortcut&&jsxRuntime.jsx(wr,{keys:e.shortcut,as:"abs"}),jsxRuntime.jsx(K,{tabIndex:-1,onClick:v=>h(),className:"--send flex aic jcc",variant:e.variant||G.Medium,children:C!==""?!l&&(typeof p=="string"?jsxRuntime.jsx(ee,{name:p,as:"--search-action"}):p):!i&&(typeof a=="string"?jsxRuntime.jsx(ee,{name:a,as:"--search-action"}):a)})]})});ha.displayName="Zuz.Search";var Cr=ha;var bu=({label:e,icon:r})=>jsxRuntime.jsxs(f,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[r&&jsxRuntime.jsx(ee,{name:r}),jsxRuntime.jsx(z,{as:"--select-group-label",children:e})]}),xa=bu;var va=({checkIcon:e,selected:r,updateValue:t,o:n})=>{let o=e?typeof e=="string"?jsxRuntime.jsx(ee,{name:"checkIcon"}):e:O.check,s=n.disabled===true;return jsxRuntime.jsxs(K,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${r?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxRuntime.jsxs(we,{as:"--option-item-meta --aic",children:[n.icon&&jsxRuntime.jsx(ee,{name:n.icon,as:`--select-option-icon --icon-${n.value}`,color:n.iconColor}),jsxRuntime.jsx(z,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),r&&jsxRuntime.jsx(we,{aic:true,jcc:true,as:"--select-option-check --abs",children:o})]})};va.displayName="Option";var Sa=va;var Ca=(({ref:e,...r})=>{let{selected:t,options:n,label:o,name:s,variant:a,search:i,searchPlaceholder:p,maxHeight:l,arrowDownIcon:c=O.arrowDown,arrowUpIcon:d=O.arrowUp,expanded:u,multiple:m,tokenizer:g,wrapTokens:C,disabled:x,checkIcon:T,closeIcon:S,editable:P,editablePlaceholder:h,onChange:v,required:y,with:b,...I}=r,A=Rt(),B=!!(s&&A?.setFieldValue),H=vn(s),L=bn(s),M=P===true&&m!==true&&g!==true,$=E=>typeof E=="string"||typeof E=="number",_=E=>typeof E=="object"&&E!==null&&!Array.isArray(E)&&"value"in E&&"label"in E,R=E=>n.find(J=>String(J.value)===String(E)),k=E=>{if(E==null)return null;if(M&&E==="")return "";if(m||g)return (Array.isArray(E)?E:[E]).map(fe=>$(fe)?R(fe):fe).filter(fe=>_(fe));if($(E)){let J=R(E);return J||(M?String(E):null)}return _(E)?E:null},U=()=>{if(t!==void 0)return k(t);let E=n.find(J=>String(J.value)==="-1");return E||(M?"":null)},q=E=>Array.isArray(E)?E.map(J=>J.value):_(E)?E.value:E,[D,F]=react.useState(()=>U()),[W,Z]=react.useState(false),[oe,Q]=react.useState(null),ie=react.useRef(null),ce=react.useRef(null),Se=react.useRef(null),ae=react.useId(),me=react.useMemo(()=>s||ae,[s,ae]),{reposition:X}=Bt(Se,{direction:vt.Bottom,offset:2}),{variant:ne}=Y(true),re=S?typeof S=="string"?jsxRuntime.jsx(ee,{name:S}):S:O.close,{className:de,style:De,rest:Ce}=N(I,void 0),{onClick:ge,...Le}=Ce||{},se=react.useMemo(()=>L!==void 0?k(L):D,[L,D,n,M,m,g]),ye=react.useMemo(()=>{if(!(!se||Array.isArray(se)||!_(se)))return se},[se]),Ft=react.useMemo(()=>M?_(se)?String(se.value??""):$(se)?String(se):"":"",[M,se]),zt=E=>Array.isArray(se)?se.some(J=>J.value===E.value):_(se)?se.value===E.value:M&&$(se)?String(se)===String(E.value):false,He=E=>{if(B&&A?.setFieldValue&&s){A.setFieldValue(s,q(E));return}F(E);},Me=E=>{v?.(P===true&&E instanceof Option?String(E.value):E);},wo=E=>{if(!(x||E.disabled)){if(m||g){let J=Array.isArray(se)?se:[],Ne=J.find(Co=>Co.value===E.value)?J.filter(Co=>Co.value!==E.value):[...J,E];He(Ne),Me(Ne);return}He(E),Z(false),Me(E);}},ja=E=>{let J=E.target.value,fe=J===""?null:R(J),Ne=fe?fe.value:J;He(Ne),Me(Ne);},Qa=E=>{if(E.key==="Enter"&&(E.preventDefault(),M)){let J=E.currentTarget.value.trim();if(!J){Z(false);return}let Ne=R(J)??J;He(Ne),Me(Ne),Z(false);}},Ja=(E,J)=>{if(E.stopPropagation(),x)return;let fe=se.filter(Ne=>Ne.value!==J.value);He(fe),Z(false),Me(fe);},ei=E=>{let J=E.currentTarget,fe=J.scrollTop===0&&E.deltaY<0,Ne=J.scrollHeight-J.scrollTop===J.clientHeight&&E.deltaY>0;!fe&&!Ne||E.preventDefault(),E.stopPropagation();};react.useImperativeHandle(e,()=>({setSelected:E=>{He(k(E));},getValue:()=>se??null}),[se,n,M,m,g,B,s]),react.useEffect(()=>{B||t===void 0||F(k(t));},[t,B,n,M,m,g]),react.useEffect(()=>{if(!W)return;let E=()=>{X();};return window.addEventListener("scroll",E,true),window.addEventListener("resize",X),()=>{window.removeEventListener("scroll",E,true),window.removeEventListener("resize",X);}},[W,X]),react.useEffect(()=>{if(!W){ce.current&&(ce.current.value=""),Q(null);return}ce.current?.focus(),X();let E=fe=>{ie.current&&!ie.current.contains(fe.target)&&Z(false);},J=setTimeout(()=>{document.addEventListener("click",E);},0);return ()=>{clearTimeout(J),document.removeEventListener("click",E);}},[W,X]);let ti=hooks.useDebounce(E=>Q(E===""?null:E),300),oi=hooks.useDebounce(ja,300);return jsxRuntime.jsxs(f,{ref:ie,"data-required":y?"true":void 0,with:b,className:[`--select ${u==true?"--expanded":""}`,`--${a||ne}`,`${s?`--${s}`:""}`,`${H?"--has-error":""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:me,children:[M?jsxRuntime.jsxs(f,{"data-value":ye?.value??(Ft||"-1"),className:`--select-display --selected --editable flex aic rel ${de}`.trim(),style:De,onClick:E=>E.stopPropagation(),...Le,children:[ye?.icon&&jsxRuntime.jsx(ee,{as:"--selected-icon",name:ye.icon}),jsxRuntime.jsx(we,{aic:true,as:"--label-wrapper",children:jsxRuntime.jsx(ue,{"aria-expanded":W,className:"--select-input",disabled:x,onChange:oi,onClick:E=>{E.stopPropagation(),x||Z(true);},onKeyDown:Qa,placeholder:h||o||"Choose",type:"text",defaultValue:Ft})}),jsxRuntime.jsx(K,{className:"--select-toggle rel flex aic jcc",disabled:x,onClick:E=>{E.stopPropagation(),x||Z(J=>!J);},tabIndex:-1,withLabel:false,children:W?typeof d=="string"?jsxRuntime.jsx(ee,{name:d,as:"--search-action"}):d:typeof c=="string"?jsxRuntime.jsx(ee,{name:c,as:"--search-action"}):c})]}):jsxRuntime.jsxs(K,{disabled:x,variant:a||ne,"data-value":ye?.value??"-1",className:`--select-display --selected flex aic rel ${de}`.trim(),withLabel:false,style:De,onClick:E=>{E.stopPropagation(),x||Z(J=>!J);},...Le,children:[ye?.icon&&jsxRuntime.jsx(ee,{as:"--selected-icon",name:ye.icon}),jsxRuntime.jsx(we,{aic:true,as:"--label-wrapper",children:g&&Array.isArray(se)&&se.length>0?jsxRuntime.jsxs(we,{as:`--tokens-wrap${C===true?" --wrap":""}`,children:[se.map(E=>jsxRuntime.jsxs(we,{aic:true,as:"--token",children:[jsxRuntime.jsx(z,{as:"--token-label",children:E.label}),jsxRuntime.jsx(f,{as:"--token-remove",onClick:J=>Ja(J,E),children:re})]},E.value)),se.length<n.length&&jsxRuntime.jsx(z,{as:"--label",children:o||"Choose"})]}):jsxRuntime.jsx(z,{as:"--label",children:Array.isArray(se)?se.length>0?`${se.length} selected`:o||"Choose":ye?.label||o||"Choose"})}),jsxRuntime.jsx(f,{className:"--svg-arrow rel flex aic jcc",children:W?typeof d=="string"?jsxRuntime.jsx(ee,{name:d,as:"--search-action"}):d:typeof c=="string"?jsxRuntime.jsx(ee,{name:c,as:"--search-action"}):c})]}),jsxRuntime.jsxs(f,{id:me,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!W,onWheel:ei,style:{maxHeight:l||"auto"},ref:Se,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:W,duration:.05},children:[i&&jsxRuntime.jsx(f,{as:"--select-search --no-shrink flex --sticky",children:jsxRuntime.jsx(Cr,{ref:ce,variant:G.Small,placeholder:p||"Search...",onChange:ti})}),o&&jsxRuntime.jsx(xa,{label:o}),n?.filter(E=>!oe||E.label.toLowerCase().includes(oe.toLowerCase()))?.map(E=>jsxRuntime.jsx(Sa,{updateValue:wo,checkIcon:T,selected:zt(E),o:E},`option-${E.label.replace(/\s+/g,"-")}-${E.value}`))]})]})});Ca.displayName="Zuz.Select";var Cu=Ca;var Ta=({ref:e,...r})=>jsxRuntime.jsx(Vt,{type:_e.Switch,...r,ref:e});Ta.displayName="Zuz.Switch";var Tu=Ta;var Ra=e=>{let{idx:r,id:t,as:n,weight:o,style:s,value:a,render:i,resize:p,sortBy:l,sortable:c,onSort:d}=e,[u,m]=react.useState(0),g=()=>{c&&(d?.(String(t),u==1?-1:1),m(C=>C==1?-1:1));};return jsxRuntime.jsxs(f,{style:{flex:o||1,...s},as:`--col flex aic ${n||""} ${c?"--sortable":""}`,onClick:g,children:[jsxRuntime.jsx(f,{as:"--colv",children:a}),r==-1&&c&&l==t&&jsxRuntime.jsx(f,{as:"--arrow flex aib",children:u==1?O.arrowUp:O.arrowDown})]})};Ra.displayName="Zuz.Column";var xo=Ra;var Ea=e=>{let{index:r,pubsub:t,schema:n,data:o,ids:s,styles:a,animate:i,sortBy:p,selectable:l,tableRef:c,loading:d,rowClassName:u,onSort:m,onRowClick:g,onSelect:C,onContextMenu:x}=e,T=hooks.useDelayed(),S=react.useMemo(()=>({transition:j.SlideInBottom,curve:te.EaseInOut,delay:.02*(r+1)}),[]),P=react.useRef(null),h=(y,b)=>{r==-1?t.emit(`ALL_ROWS_${y?"CHECKED":"UNCHECKED"}`,y):(C&&C(o,y),t.emit(`ROW_${y?"CHECKED":"UNCHECKED"}`,y,b));},v=(y,b,I)=>jsxRuntime.jsx(xo,{idx:y,id:b,as:"--selector",pubsub:t,value:jsxRuntime.jsx(Vt,{value:I,ref:P,onSwitch:h,type:_e.Default})});return react.useEffect(()=>{let y=(B,H)=>{P.current?.setChecked(B,false);},b=(B,H)=>{let L=false;c?.current&&c.current.querySelectorAll(".--row").forEach(M=>{let $=M;if(!$.classList.contains("--row-head")){let _=$.querySelector(".--selector input[type=checkbox]");_&&_.checked&&!L&&(L=_.checked);}}),P.current.setChecked(L,false);},I=B=>{P.current?.setChecked(B,false),C&&C(o,B);},A=B=>{P.current?.setChecked(B,false),C&&C(o,B);};return r==-1?(t.on("ROW_CHECKED",y),t.on("ROW_UNCHECKED",b),()=>{t.off("ROW_CHECKED",y),t.off("ROW_UNCHECKED",b);}):(t.on("ALL_ROWS_CHECKED",I),t.on("ALL_ROWS_UNCHECKED",A),()=>{t.off("ALL_ROWS_CHECKED",I),t.off("ALL_ROWS_UNCHECKED",A);})},[]),jsxRuntime.jsxs(f,{onContextMenu:y=>x?x(y,o):null,onClick:y=>g?g(y,e.data):()=>{},...i?{fx:{...S,when:T}}:{},as:`--row flex aic ${g?"--row-clickable":""} ${r==-1?"--row-head":""} ${u||""}`,children:[r==-1&&n.map((y,b)=>{let{renderWhenHeader:I,render:A,value:B,...H}=y;return jsxRuntime.jsxs(react.Fragment,{children:[l&&b==0&&v(-1,`--selector-${y.id}`,"all"),jsxRuntime.jsx(xo,{idx:-1,onSort:m,sortBy:p,value:B,...H,pubsub:t,style:a[y.id]})]},`--col-${y.id}`)}),d&&r>-1&&jsxRuntime.jsx(f,{as:"--col",children:jsxRuntime.jsx(z,{as:"opacity:0",children:"..."})}),!d&&r>-1&&s&&o&&n.map((y,b)=>jsxRuntime.jsxs(react.Fragment,{children:[l&&b==0&&v(b,`--selector-${y.id}`,y.id.toString()),s.includes(String(y.id))?jsxRuntime.jsx(xo,{pubsub:t,idx:b,id:String(y.id),style:a[String(y.id)],value:y.render?y.render(o,r):o[String(y.id).includes(".")?String(y.id).split(".").reverse()[0]:y.id]}):null]},`--${String(y.id)}-val-${b}`))]})};Ea.displayName="Zuz.Row";var bo=Ea;var La=(e,r)=>{let{schema:t,rows:n,rowCount:o,rowsPerPage:s,currentPage:a,pagination:i,paginationHash:p,showPaginationOnZeroPageCount:l,animateRows:c,header:d,rowClassName:u,selectableRows:m,hoverable:g,sortBy:C,loading:x,loadingRowCount:T,loadingMessage:S,spinner:P,emptyMessage:h,onSort:v,onRowClick:y,onRowSelectToggle:b,onPageChange:I,onRowContextMenu:A,...B}=e,H=react.useRef(null),L=react.useMemo(()=>t.reduce((me,X)=>(me[X.id]={flex:X.weight||1,...X.w&&{width:X.w},...X.maxW&&{maxWidth:X.maxW},...X.minW&&{minWidth:X.minW},...X.h&&{height:X.h},...X.maxH&&{maxHeight:X.maxH},...X.minH&&{minHeight:X.minH}},me),{}),[t]),M=react.useMemo(()=>Object.keys(L),[t]),$=react.useMemo(()=>d??true,[d]),{style:_,className:R,rest:k}=N(B),U=react.useRef(null),q=react.useMemo(()=>new core.PubSub,[]),D=react.useRef(n.map(()=>core.uuid(8))),[F,W]=react.useState(C||null),[Z,oe]=react.useState(S||"loading"),Q=react.useMemo(()=>!x&&n&&n.length==0,[x,n]),ie=react.useCallback(()=>h?typeof h=="function"?jsxRuntime.jsx(h,{}):h:jsxRuntime.jsx(z,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);react.useEffect(()=>{n.length&&!D.current&&(D.current=n.map(()=>core.uuid(8)));},[n]);let ce=(me,X)=>{W(me),v?.(me,X);},Se=(o||(n?n.length:0))/(s||10),ae=react.useMemo(()=>l||Se>1?jsxRuntime.jsx(Mt,{hash:p,ref:H,renderOnZeroPageCount:l,onPageChange:I,paginationStyle:"table",startPage:a,itemCount:o||(n?n.length:0),itemsPerPage:s||10}):null,[a,o]);return react.useImperativeHandle(r,()=>({setLoading(me){}})),jsxRuntime.jsxs(f,{as:`--table ${g??true?"--hoverable":""} flex cols rel ${R}`,ref:U,children:[$==true&&jsxRuntime.jsx(bo,{sortBy:F,onSort:ce,tableRef:U,pubsub:q,selectable:m,index:-1,schema:t,loading:true,styles:L}),x&&jsxRuntime.jsxs(f,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(Pe,{type:P||ve.Simple}),Z&&jsxRuntime.jsx(z,{as:"--table-loading-message",children:Z})]}),x&&Array(T||5).fill({}).map((me,X)=>jsxRuntime.jsx(bo,{tableRef:U,index:X,pubsub:q,schema:t,styles:L,loading:true,animate:c,onRowClick:y},`--trow-loading-${X}-${t[0].id}`)),!x&&n&&n.map((me,X)=>jsxRuntime.jsx(bo,{tableRef:U,pubsub:q,loading:false,index:X,schema:t,ids:M,styles:L,animate:c,data:me,onRowClick:y,rowClassName:u,selectable:m,onSelect:b,onContextMenu:A},`--trow-${D.current[X]||X}-${t[0].id}`)),Q&&ie(),i&&ae&&jsxRuntime.jsx(f,{"aria-hidden":!i||!ae,...c?{fx:{transition:j.SlideInBottom,curve:te.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&i&&ae!=null}}:{},as:"--row flex aic --row-footer",children:ae})]})};La.displayName="Zuz.Table";var Hu=react.forwardRef(La),Au=Hu;var Fu=({ref:e,...r})=>{let{title:t,items:n}=r,[o,s]=react.useState(0),a=(i,p,l)=>{i.preventDefault(),s(p),document.getElementById(l)?.scrollIntoView({behavior:"smooth"});};return jsxRuntime.jsxs(f,{ref:e,as:"--table-of-contents rel flex cols",children:[jsxRuntime.jsx(z,{as:"--toc-title",children:t}),jsxRuntime.jsx(rt,{items:n.map((i,p)=>jsxRuntime.jsx("a",{className:o==p?"--toc-active":"",style:{anchorName:o===p?"--toc-active":"none",color:o==p?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:l=>a(l,p,i.tag),href:`#${i.tag}`,children:i.label}))})]})},zu=Fu;var Ma=({isActive:e,transitionType:r,speed:t,width:n,render:o,content:s,onHeightChange:a})=>{let i=react.useRef(null),p=hooks.useResizeObserver(i);react.useEffect(()=>{e&&p.height>0&&a(p.height);},[e,p.height]);let c=react.useMemo(()=>{let d={width:n>0?`${n}px`:"100%",minWidth:n>0?`${n}px`:"100%",flexShrink:0,height:"fit-content",boxSizing:"border-box"};return r==="fade"?{...d,gridArea:"1 / 1 / 2 / 2",opacity:e?1:0,visibility:e?"visible":"hidden",transition:`opacity ${t}s ease-in-out`,zIndex:e?1:0}:r==="scale"?{...d,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}:d},[e,r,n,t]);return jsxRuntime.jsx(f,{ref:i,style:{...c},className:"--content",children:o||e?s:null})};Ma.displayName="Zuz.TabBody";var Oa=Ma;var Ha=({ref:e,...r})=>{let{tabs:t,speed:n=.3,prerender:o=true,variant:s,tabStyle:a="fixed",onChange:i,transitionType:p="slide",...l}=r,[c,d]=react.useState(0),u=react.useRef(null),m=hooks.useResizeObserver(u),g=react.useMemo(()=>core.uuid(8),[]),[C,x]=react.useState("auto"),T=react.useMemo(()=>m.width>0,[m.width]);react.useImperativeHandle(e,()=>({setTab:b=>d(b)}));let S=react.useMemo(()=>t.map(b=>({...b,key:b.key||core.uuid(8)})),[t]),{style:P,className:h,rest:v}=N({as:`flex cols w-full no-overflow ${l.as||""}`,...l}),y=()=>{if(!T)return {opacity:0};switch(p){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${S.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${c*m.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(f,{ref:u,style:P,className:`--tabview --${a} flex cols ${h}`,children:[jsxRuntime.jsx(Dt,{as:"--tabview-head",onSwitch:b=>{d(b.index);let I=S.find(A=>A.tag==b.tag);I&&I.onSelect&&(I.onSelect(I,b.index),i?.(I,b.index));},selected:c,items:S.reduce((b,I,A)=>(b.push({icon:I.icon,index:A,label:I.label,tag:I.tag}),b),[])}),jsxRuntime.jsx(f,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:C,transition:T?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:T?1:0},children:jsxRuntime.jsx(f,{className:"--track",style:{...y()},children:S.map((b,I)=>jsxRuntime.jsx(Oa,{isActive:I===c,transitionType:p,speed:n,width:m.width,render:o||I===c,onHeightChange:A=>I===c&&x(A),content:b.body},`tab-body-${b.key||I}-${g}`))})})]})};Ha.displayName="Zuz.TabView";var ju=Ha;var tf=({ref:e,commands:r,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[i,p]=react.useState([{type:"output",content:n}]),[l,c]=react.useState(""),d=react.useRef(null),u=react.useRef(null),{variant:m}=Y(true);react.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[i]);let g=h=>{let v=typeof h=="string"?{type:"output",content:h}:h;p(y=>{let b=[...y,v];return b.length>1e3?b.slice(-1e3):b});},C=()=>p([]);react.useImperativeHandle(e,()=>({write:g,clear:C}));let x=async h=>{let[v,...y]=h.split(" "),b=v.toLowerCase();return r&&r[b]?await r[b](y):t?await t(h):`command not found: ${v}`},T=h=>{let v=/\u001b\[(\d+)m/g,y=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},I=0,A="#d4d4d4",B=false,H;for(;(H=v.exec(h))!==null;){let M=h.slice(I,H.index);M&&y.push({text:M,color:A,bold:B});let $=H[1];$==="0"?(A="#d4d4d4",B=false):$==="1"?B=true:b[$]&&(A=b[$]),I=v.lastIndex;}let L=h.slice(I);return L&&y.push({text:L,color:A,bold:B}),y},S=(h,v)=>h.includes("\x1B")?T(h).map((y,b)=>jsxRuntime.jsx(le,{style:{color:y.color||"#d4d4d4",fontWeight:y.bold?"bold":"normal"},children:y.text},`--terminal-msg-${b}-${y.text.replace(/\S+/g,"-")}`)):jsxRuntime.jsx(le,{style:{color:v==="error"?"#ff5f56":v==="command"?"#00ff00":"#d4d4d4"},children:h}),P=async h=>{if(h.key==="Enter"&&l.trim()){let v=l.trim(),y=[...i,{type:"command",content:`${o}${v}`}];c(""),p(y);let b=await x(v);p(I=>[...I,{type:"output",content:b}]);}};return jsxRuntime.jsxs(f,{as:`--zuz-terminal --${s||m||G.Medium} flex cols ${a.className}`,onClick:()=>u.current?.focus(),children:[jsxRuntime.jsx(f,{ref:d,className:"--terminal-log",children:i.map((h,v)=>jsxRuntime.jsx(f,{children:jsxRuntime.jsx(z,{children:S(h.content,h.type)})},v))}),jsxRuntime.jsxs(f,{as:"flex aic --terminal-input",children:[jsxRuntime.jsx(z,{as:"--terminal-prompt",children:o}),jsxRuntime.jsx(ue,{ref:u,className:"--zuz-term-input",autoFocus:true,value:l,variant:s||m||G.Medium,onChange:h=>c(h.target.value),onKeyDown:P})]})]})},of=tf;var rf=({meta:e})=>jsxRuntime.jsxs(K,{as:"flex aic --command-item",children:[e.icon&&jsxRuntime.jsx(ee,{name:e.icon,as:"--command-icon"}),jsxRuntime.jsx(z,{children:e.label})]}),nf=({position:e,onSelect:r,commands:t,visible:n})=>jsxRuntime.jsx(f,{"aria-hidden":!n,fx:{transition:j.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(o=>jsxRuntime.jsx(rf,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),za=nf;var Za=({ref:e,...r})=>{let {autoResize:t,maxHeight:n,variant:o,resize:s="none",command:a,commands:i,name:p,onInput:l,cmd:c,renderDropdown:d,value:u,defaultValue:m,...g}=r,C=react.useRef(null),x=react.useRef(null),{variant:T}=Y(true),{style:S,className:P,rest:h}=N(g),v=it();p?v.errors?.[p]:null;let b=p&&v.values&&v.setFieldValue,I=b?v.values?.[p]:void 0,A=hooks.useDebounce(k=>{b&&v.setFieldValue?.(p,k);},500),{showDropdown:B,dropdownPosition:H,handleKeyDown:L,handleInput:M,handleCommandSelect:$}=hooks.useCommandActions({command:a,commands:i,cmd:c,ref:C}),_=react.useCallback(()=>{let k=C.current;!k||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{k.style.height="auto";let U=k.scrollHeight;if(n){let q=parseInt(n.toString(),10);isNaN(q)||(U=Math.min(U,q));}k.style.height=`${U}px`,k.style.overflowY=n&&U>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),R=k=>{A(k.currentTarget.value),l?.(k),M(k),_();};return react.useEffect(()=>{C.current&&p&&I!==void 0&&C.current.value!==String(I)&&(C.current.value=String(I));},[I,p]),react.useEffect(()=>{_();},[u,m,_]),react.useEffect(()=>{t&&C.current&&_();},[t,_]),react.useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),react.useEffect(()=>()=>{b&&v.deleteFieldValue?.(p);},[]),jsxRuntime.jsxs(f,{as:"rel",children:[jsxRuntime.jsx("textarea",{name:p,className:`--input --textarea --${o||T||G.Medium} flex ${P}`.trim(),style:{...S,resize:s,height:t?"auto":S?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:L,onInput:R,ref:k=>{C.current=k,typeof e=="function"?e(k):e&&(e.current=k);},value:u,defaultValue:m,...h}),d?d({show:B,position:H,commands:i||[],onSelect:$}):i&&i.length>0&&jsxRuntime.jsx(za,{visible:B,commands:i,onSelect:$,position:H})]})};Za.displayName="Zuz.TextArea";var mf=Za;var Ga=react.forwardRef((e,r)=>{let{as:t,value:n,color:o,direction:s,...a}=e,i=react.useRef(null),[p,l]=react.useState(n||0);return react.useImperativeHandle(r,()=>({updateValue(c){p.toString().length!==c.toString().length&&l(c);},setValue(c){if(this.updateValue(c),i.current){let d=c.toString().split("");i.current.querySelectorAll(".--wheel-char").forEach((u,m)=>{let g=d[m];if(u instanceof HTMLElement){u.setAttribute("data-value",g);let C=u.querySelector(".--wheel-char-track");C instanceof HTMLElement&&(C.style.setProperty("--v",g),C.offsetWidth);}});}}})),react.useEffect(()=>{l(n||0);},[n]),jsxRuntime.jsxs(f,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:i,...a,children:[(p||0).toString().split("").map((c,d)=>isNaN(parseInt(c,10))?jsxRuntime.jsx(le,{className:"--wheel-char wheel-char-symbol grid",children:c},`wheel-char-symbol-${d}`):jsxRuntime.jsx(le,{"data-value":c,className:`--wheel-char grid ${d>(p||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(le,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":c},children:[jsxRuntime.jsx(le,{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((u,m)=>jsxRuntime.jsx(le,{children:u},`${d}--${m}`)),jsxRuntime.jsx(le,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),o&&jsxRuntime.jsx(f,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});Ga.displayName="Zuz.TextWheel";var yf=Ga;var Lr=react.forwardRef((e,r)=>{let{as:t,meta:n,nodes:o,icons:s,onSelect:a,treeTag:i,selected:p,roots:l,expanded:c,...d}=e,{tag:u,label:m,icon:g,under:C,isHead:x}=n,T=react.useMemo(()=>l.includes(u),[l]),[S,P]=react.useState(c),h=()=>{localStorage.setItem(`--tn${i}-${u}`,S?"0":"1"),P(!S);};react.useEffect(()=>{c||T&&!localStorage.getItem(`--tn${i}-${u}`)?(localStorage.setItem(`--tn${i}-${u}`,"1"),P(true)):P(localStorage.getItem(`--tn${i}-${u}`)=="1");},[]);let v=react.useMemo(()=>o.filter(y=>y.under==u),[o,u]);return jsxRuntime.jsxs(f,{className:`--treenode ${T?"--is-root":""} --treenode-${u} flex cols`,children:[jsxRuntime.jsxs(f,{className:`--node --node-${u} flex aic ${p==u?" --selected":""}`,children:[jsxRuntime.jsx(K,{skeleton:d.skeleton,onClick:h,className:"--node-aro-btn",disabled:v.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(ee,{skeleton:d.skeleton,className:"--node-aro-icon",name:v.length==0?s?.arrowDisabled||s?.arrowClose:S?s?.arrowOpen:s?.arrowClose}):v.length==0?O.chevronBottom:S?O.chevronBottom:O.chevronRight}),jsxRuntime.jsxs(K,{className:"--node-meta flex aic",onClick:y=>a(u),children:[(s?.nodeOpen&&s?.nodeClose||T&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(ee,{skeleton:d.skeleton,className:`--node-icon ${T?"--icon-root":""}`,name:g||(S?T&&s?.rootOpen||s.nodeOpen:T&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(z,{className:`--node-label ${T?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:m})]})]}),S&&v.length>0&&jsxRuntime.jsx(f,{className:`--sub-node tree-sub-node-${u} flex cols`,children:v.map(y=>jsxRuntime.jsx(Lr,{treeTag:i,selected:p,onSelect:a,icons:s,roots:l,expanded:y.expanded||false,meta:y,nodes:o},`--node-${y.tag}`))})]})});Lr.displayName="TreeItem";var qa=Lr;var Ya=react.forwardRef((e,r)=>{let{as:t,nodes:n,onNodeSelect:o,tag:s,icons:a,roots:i,selected:p,...l}=e,[c,d]=react.useState(p);react.useImperativeHandle(r,()=>({getSelected:()=>c}),[o]);let u=m=>{d(m),o&&o(m);};return react.useEffect(()=>{c!=p&&d(p);},[p]),jsxRuntime.jsx(f,{className:"--treeview flex cols",children:n.filter(m=>i.includes(m.tag)).map(m=>jsxRuntime.jsx(qa,{treeTag:s?`-${s}`:"",selected:c,onSelect:g=>u(g),icons:a,meta:m,roots:i,expanded:m.expanded||false,skeleton:l.skeleton,nodes:n},`--node-${m.tag}`))})});Ya.displayName="Zuz.TreeView";var Pf=Ya;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
14
+ Object.defineProperty(exports,"PACKAGE_NAME",{enumerable:true,get:function(){return chunkEYJJ7YVO_cjs.f}});Object.defineProperty(exports,"cleanProps",{enumerable:true,get:function(){return chunkEYJJ7YVO_cjs.g}});Object.defineProperty(exports,"splitAtoms",{enumerable:true,get:function(){return chunkEYJJ7YVO_cjs.h}});exports.ALERT=Be;exports.AVATAR=Hr;exports.Accordion=fc;exports.ActionBar=bc;exports.Alert=wc;exports.AutoComplete=_c;exports.Avatar=Yc;exports.Badge=Qc;exports.Box=f;exports.Bubble=Mm;exports.BubbleMediaType=vs;exports.BubbleStatus=bs;exports.Button=K;exports.CHART=gs;exports.CHECKBOX=_e;exports.COLORTHEME=Nf;exports.Calendar=pr;exports.Carousel=Cm;exports.Chart=Bm;exports.CheckBox=Vt;exports.CodeBlock=Wm;exports.ColorScheme=ip;exports.ContextMenu=Do;exports.CookiesConsent=pp;exports.Cover=Ae;exports.CropShape=xp;exports.Cropper=hp;exports.Crumb=vp;exports.DATATYPE=Mf;exports.DIALOG=Qe;exports.DIALOG_ACTION_POSITION=Ar;exports.DRAWER_SIDE=Te;exports.DatePicker=Tp;exports.Dialog=Qo;exports.Drawer=or;exports.FILTER=Kt;exports.FORMVALIDATION=je;exports.FORMVALIDATION_STYLE=Of;exports.Fab=Ep;exports.Fieldset=kp;exports.Filters=Op;exports.Flex=we;exports.Form=qo;exports.Grid=Hp;exports.Group=Ho;exports.Icon=ee;exports.Image=nt;exports.Input=ue;exports.KeyboardKeys=wr;exports.KeysLabelMap=Ys;exports.KeysMap=Xs;exports.Label=Ot;exports.LayersProvider=Oo;exports.List=rt;exports.MediaPlayer=Up;exports.NetworkStatus=Yp;exports.ORIGIN=St;exports.OriginType=Bf;exports.Overlay=Je;exports.PLACEMENTS=kf;exports.POSITION=vt;exports.PROGRESS=Df;exports.Pagination=Mt;exports.PaginationStyle=lo;exports.Password=ru;exports.PinInput=iu;exports.Position=xe;exports.ProgressBar=tt;exports.RADIO=Io;exports.Radio=pu;exports.SHEET=ke;exports.SHEET_ACTION_POSITION=Po;exports.SKELETON=Ef;exports.SLIDER=Ro;exports.SORT=Lf;exports.SPINNER=ve;exports.ScrollView=Jo;exports.Search=Cr;exports.Select=Cu;exports.SelectTabs=Dt;exports.Sheet=el;exports.Slider=mt;exports.SnackPosition=jt;exports.SnackStyle=pn;exports.SnackType=Yt;exports.Span=le;exports.Spinner=Pe;exports.Status=Vf;exports.Switch=Tu;exports.TRANSITIONS=j;exports.TRANSITION_CURVES=te;exports.TabView=ju;exports.Table=Au;exports.TableOfContents=zu;exports.Terminal=of;exports.Text=z;exports.TextWheel=yf;exports.Textarea=mf;exports.ThemeProvider=pi;exports.ToastDefaultTitle=un;exports.ToastPosition=jt;exports.ToastProvider=nr;exports.ToastStyle=pn;exports.ToastType=Yt;exports.ToolTip=Tt;exports.TreeView=Pf;exports.Variant=G;exports.animationTransition=wt;exports.buildClassString=Eo;exports.buildWithStyles=zr;exports.css=td;exports.getAnimationCurve=No;exports.getAnimationTransition=od;exports.getZuzMap=ni;exports.isKeyCombination=qs;exports.setZuzMap=Fr;exports.useBase=N;exports.useContextMenu=Wl;exports.useDialog=ql;exports.useDrawer=jl;exports.useFx=be;exports.useMorph=ec;exports.usePosition=Bt;exports.useSnack=ic;exports.useToast=Ao;