@zuzjs/ui 1.0.58 → 1.0.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import {f,e,g,d,h,c}from'./chunk-PACYGJ55.js';export{e as PACKAGE_NAME,f as cleanProps,g as splitAtoms}from'./chunk-PACYGJ55.js';import {createContext,forwardRef,useMemo,Fragment,useEffect,useRef,useImperativeHandle,useState,useCallback,createElement,isValidElement,useId,useLayoutEffect,useContext,useSyncExternalStore,startTransition}from'react';import {useDelayed,useScrollbar,useDebounce,useImage,useResizeObserver,useLineChart,useImageCropper,CropShape,useNetworkStatus,useIntersectionObserver,useCarousel,useTimer,useMediaPlayer,AnchorType,useAnchorPosition,KeyCode,useShortcuts,useCommandActions}from'@zuzjs/hooks';import {createPortal}from'react-dom';import {MD5,uuid,withPost,_,clamp,timeSince,checkPasswordStrength,removeDuplicateWords,PubSub,toHash,numberInRange,copyToClipboard}from'@zuzjs/core';import {jsx,jsxs,Fragment as Fragment$1}from'react/jsx-runtime';import {addPropsToChildren}from'@zuzjs/core/react';import {startOfMonth,endOfMonth,startOfWeek,endOfWeek,eachDayOfInterval,format,isSameMonth,isSameDay,isToday,addHours,addDays,addWeeks}from'date-fns';var Tr={Circle:"CIRCLE",Square:"SQUARE"},lf={Default:"DEFAULT",Circle:"CIRCLE"},cf={Light:"light",Dark:"dark",System:"system"},Ve={Default:"DEFAULT",Switch:"SWITCH"},ut={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ge=ut,ft=AnchorType,mf=ft,G={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},pf={Asc:"ASC",Desc:"DESC"},uf={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},ff={Dots:"DOTS"},We={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Re={Success:"success",Error:"error",Warning:"warning",Info:"info"},oe={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",EaseOutBack:"EASEOUTBACK",Bounce:"BOUNCE"},Q={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInTopScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInBottomScale:"SLIDE_FROM_BOTTOM_SCALE",SlideInLeft:"SLIDE_FROM_LEFT"},df={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},Ie={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},tt=Ie,co={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Pr=co,gf={Bar:"BAR",Ring:"RING"},mo={Default:"range",Text:"number"},po={Default:"DEFAULT",Card:"CARD"},Lt={Gooey:"gooey"},Se={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Rr=Symbol.for("zuz.global.map"),Ir=e=>{globalThis[Rr]=e;},Oa=()=>globalThis[Rr]||{},uo=e$1=>{let r=Array.isArray(e$1)?e$1.join(" "):e$1;if(!r||typeof r!="string")return "";let t=Oa();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${e}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),g(r).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,i,f]=s;return g(f).map(c=>{let l=`${i}(${c})`;return t[l]||c}).join(" ")}return t[o]||o}).join(" ")},Of=e=>{let r=Array.isArray(e)?e.join(" "):e;return !r||typeof r!="string"?"":uo(r)},Nr=e=>{let r={};for(let t in e){let n=e[t];if(t.startsWith("--")){r[t]=n;continue}let o=d[t]?.toString()??t;if(o==="x"||o==="translateX"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${h.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${s[0]??"0px"} ${h.addUnitsSafely(t,n)}`;}else c.includes(o)?r[o]=h.addUnitsSafely(t,n):r[o]=n;}return r},fo=e=>{if(!e)return "linear";switch(e.toUpperCase()){case oe.Bounce:return "var(--bounce)";case oe.Liquid:return "var(--liquid)";case oe.Spring:return "var(--spring)";case oe.EaseInOut:return "ease-in-out";case oe.EaseOutBack:return "ease-out-back";default:return "linear"}},dt=(e,r=0,t=0)=>{let n={},o={},s=r||20,a=t||0;switch(e){case Q.SlideInLeft:case Q.SlideInRight:n={"--fx-x":e===Q.SlideInLeft?`-${s}px`:`${s}px`,opacity:0},o={"--fx-x":`${a}px`,opacity:1};break;case Q.SlideInTop:case Q.SlideInBottom:n={"--fx-y":e===Q.SlideInTop?`-${s}px`:`${s}px`,opacity:0},o={"--fx-y":`${a}px`,opacity:1};break;case Q.SlideInTopScale:case Q.SlideInBottomScale:n={"--fx-y":e===Q.SlideInTopScale?`-${s}px`:`${s}px`,scale:1.1},o={"--fx-y":`${a}px`,scale:1};break;case Q.ScaleIn:n={scale:0,opacity:0},o={scale:1,opacity:1};break;case Q.FadeIn:n={opacity:0},o={opacity:1};break}return {from:n,to:o}},Vf=(e,r,t)=>{let{from:n,to:o}=dt(e);return r?{...n,...o}:t?n:o};var Da=(e,r)=>{let t=useRef([]),n=useRef(false);return useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),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]),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?fo(e.curve):"var(--spring)"}`);},[e,r]),useMemo(()=>{if(!e)return {style:{}};let{transition:o,from:s,to:a,exit:i,when:f,duration:c=.3,delay:l=0,curve:d,margin:p=0,offset:u=20,watch:y=[]}=e,T=f===false&&!n.current;f===true&&(n.current=true);let x={},{from:P,to:S}=o?dt(o,u,p):{from:s||{},to:a||{}};x=f===void 0?{...P,...S}:f?{...S}:i||P;let R=fo(d),g=[],v=Nr(x);t.current=Object.keys(v);let h={...v};return Object.keys(v).forEach(b=>{let N=b.startsWith("--")?"all":b;g.includes(N)||g.push(`${N} ${c}s ${R} ${l}s`);}),y.forEach(b=>{g.includes(b)||g.push(`${b} 0.1s ${R} 0s`);}),{style:{...h,transition:T?"none":g.join(", "),opacity:T?0:h.opacity,pointerEvents:T?"none":h.pointerEvents}}},[e,e?.when,e?.watch])},he=Da;var Mt=null,Ha=(e,r)=>{let{as:t,fx:n,busy:o=false,stripes:s,transition:a,skeleton:i,className:f$1,propsToRemove:c,draggable:l,dragOptions:d,style:p,...u}=e||{},y=typeof window<"u",T={},x={};if(l&&y&&!Mt&&(import('@zuzjs/hooks').then(v=>{Mt=v.useDrag;}).catch(v=>{console.error("Error loading useDrag:",v);}),Mt)){let v=Mt(d);T={onMouseDown:v.onMouseDown},x={transform:`translate(${v.position.x}px, ${v.position.y}px)`};}let P=[f$1,o===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),S=a?{transition:a,duration:.3}:n||{},{style:R}=he(S,r),g=uo(t??"");return {style:{...p,...R,...x},className:[P,g||"",i?.enabled?"--skeleton":"",l?"--draggable":""].join(" ").trim(),rest:{...T,...f(u,c?[...c,"skeleton"]:["skeleton"])}}},B=Ha;var kr="(prefers-color-scheme: dark)",za=typeof window>"u",Mr=createContext(void 0),xo=e=>{let r=useContext(Mr);if(!r){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return r},J=xo,Fa=({children:e,storageKey:r="--ucs",forceTheme:t,zuzMap:n,...o})=>(n&&Ir(n),jsx(_a,{storageKey:r,forceTheme:t,...o,children:e})),_a=({children:e,storageKey:r,forceTheme:t,...n})=>{let[o,s]=useState(()=>t||Lr(r,"system")),[a,i]=useState(()=>t||Lr(r)),f=p=>(p||(p=window.matchMedia(kr)),p.matches?"dark":"light"),c=useCallback(p=>{let u=p=="system"?f():p,y=document.documentElement;y.setAttribute("color-scheme",u),y.style.colorScheme=u,i(u);},[f]),l=useCallback(p=>{s(p),localStorage.setItem(r,p),c(p);},[o]),d=useCallback(p=>{let u=f(p);i(u),o==="system"&&c("system");},[o]);return useEffect(()=>{o==null&&window.localStorage.getItem(r);},[o]),useEffect(()=>{window.matchMedia(kr).addEventListener("change",d);},[d]),useEffect(()=>{let p=u=>{u.key==r&&(u.newValue?l(u.newValue):l("system"));};return window.addEventListener("storage",p),()=>window.removeEventListener("storage",p)},[l]),useEffect(()=>{c(t||o||"system");},[o]),jsxs(Mr,{value:{colorScheme:o,resolvedScheme:a,setColorScheme:l,...n},children:[t?null:jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
1
+ import {f,e,g,d,h,c}from'./chunk-T2SBRGMT.js';export{e as PACKAGE_NAME,f as cleanProps,g as splitAtoms}from'./chunk-T2SBRGMT.js';import {createContext,forwardRef,useMemo,Fragment,useEffect,useRef,useImperativeHandle,useState,useCallback,createElement,isValidElement,useId,useLayoutEffect,useContext,useSyncExternalStore,startTransition}from'react';import {useDelayed,useScrollbar,useDebounce,useImage,useResizeObserver,useLineChart,useImageCropper,CropShape,useNetworkStatus,useIntersectionObserver,useCarousel,useTimer,useMediaPlayer,AnchorType,useAnchorPosition,KeyCode,useShortcuts,useCommandActions}from'@zuzjs/hooks';import {createPortal}from'react-dom';import {MD5,uuid,withPost,_ as _$1,clamp,timeSince,checkPasswordStrength,removeDuplicateWords,PubSub,toHash,numberInRange,copyToClipboard}from'@zuzjs/core';import {jsx,jsxs,Fragment as Fragment$1}from'react/jsx-runtime';import {addPropsToChildren}from'@zuzjs/core/react';import {startOfMonth,endOfMonth,startOfWeek,endOfWeek,eachDayOfInterval,format,isSameMonth,isSameDay,isToday,addHours,addDays,addWeeks}from'date-fns';var Lr={Circle:"CIRCLE",Square:"SQUARE"},vf={Default:"DEFAULT",Circle:"CIRCLE"},Sf={Light:"light",Dark:"dark",System:"system"},ze={Default:"DEFAULT",Switch:"SWITCH"},bt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},ye=bt,vt=AnchorType,wf=vt,q={XSmall:"xs",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Cf={Asc:"ASC",Desc:"DESC"},Tf={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Pf={Dots:"DOTS"},Ye={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN",NotEmpty:"NOT_EMPTY",NotMinusOne:"NOT_MINUS_ONE"},Ne={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"},Rf={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},Ee={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},at=Ee,bo={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Mr=bo,If={Bar:"BAR",Ring:"RING"},vo={Default:"range",Text:"number"},So={Default:"DEFAULT",Card:"CARD"},$t={Gooey:"gooey"},we={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Or=Symbol.for("zuz.global.map"),Vr=e=>{globalThis[Or]=e;},Xa=()=>globalThis[Or]||{},wo=e$1=>{let r=Array.isArray(e$1)?e$1.join(" "):e$1;if(!r||typeof r!="string")return "";let t=Xa();return process.env.NODE_ENV==="development"&&Object.keys(t).length===0&&console.warn(`[${e}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),g(r).filter(Boolean).map(o=>{let s=o.match(/^([&@][\w-]+)\((.*)\)$/);if(s){let[a,l,f]=s;return g(f).map(c=>{let i=`${l}(${c})`;return t[i]||c}).join(" ")}return t[o]||o}).join(" ")},Gf=e=>{let r=Array.isArray(e)?e.join(" "):e;return !r||typeof r!="string"?"":wo(r)},Dr=e=>{let r={};for(let t in e){let n=e[t];if(t.startsWith("--")){r[t]=n;continue}let o=d[t]?.toString()??t;if(o==="x"||o==="translateX"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${h.addUnitsSafely(t,n)} ${s[1]??"0px"}`;}else if(o==="y"||o==="translateY"){let s=r.translate?.split(" ")??["0px","0px"];r.translate=`${s[0]??"0px"} ${h.addUnitsSafely(t,n)}`;}else c.includes(o)?r[o]=h.addUnitsSafely(t,n):r[o]=n;}return r},Co=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"}},St=(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}},Uf=(e,r,t)=>{let{from:n,to:o}=St(e);return r?{...n,...o}:t?n:o};var ja=(e,r)=>{let t=useRef([]),n=useRef(false);return useEffect(()=>{e?.when||(n.current=false);},[e?.transition]),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(l=>o.style.removeProperty(l)));};return o.addEventListener("transitionend",s),()=>o.removeEventListener("transitionend",s)},[e,r]),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?Co(e.curve):"var(--spring)"}`);},[e,r]),useMemo(()=>{if(!e)return {style:{}};let{transition:o,from:s,to:a,exit:l,when:f,duration:c=.3,delay:i=0,curve:d,margin:u=0,offset:m=20,watch:h=[]}=e,T=f===false&&!n.current;f===true&&(n.current=true);let x={},{from:P,to:S}=o?St(o,m,u):{from:s||{},to:a||{}};x=f===void 0?{...P,...S}:f?{...S}:l||P;let R=Co(d),g=[],v=Dr(x);t.current=Object.keys(v);let y={...v};return Object.keys(v).forEach(b=>{let N=b.startsWith("--")?"all":b;g.includes(N)||g.push(`${N} ${c}s ${R} ${i}s`);}),h.forEach(b=>{g.includes(b)||g.push(`${b} 0.1s ${R} 0s`);}),{style:{...y,transition:T?"none":g.join(", "),opacity:T?0:y.opacity,pointerEvents:T?"none":y.pointerEvents}}},[e,e?.when,e?.watch])},xe=ja;var zt=null,Qa=(e,r)=>{let{as:t,fx:n,busy:o=false,stripes:s,transition:a,skeleton:l,className:f$1,propsToRemove:c,draggable:i,dragOptions:d,style:u,...m}=e||{},h=typeof window<"u",T={},x={};if(i&&h&&!zt&&(import('@zuzjs/hooks').then(v=>{zt=v.useDrag;}).catch(v=>{console.error("Error loading useDrag:",v);}),zt)){let v=zt(d);T={onMouseDown:v.onMouseDown},x={transform:`translate(${v.position.x}px, ${v.position.y}px)`};}let P=[f$1,o===true?"--is-busy":"",s?`--has-stripes --stripes-${s}`:""].filter(Boolean).join(" "),S=a?{transition:a,duration:.3}:n||{},{style:R}=xe(S,r),g=wo(t??"");return {style:{...u,...R,...x},className:[P,g||"",l?.enabled?"--skeleton":"",i?"--draggable":""].join(" ").trim(),rest:{...T,...f(m,c?[...c,"skeleton"]:["skeleton"])}}},B=Qa;var $r="(prefers-color-scheme: dark)",ti=typeof window>"u",Fr=createContext(void 0),Io=e=>{let r=useContext(Fr);if(!r){if(e===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return r},Q=Io,oi=({children:e,storageKey:r="--ucs",forceTheme:t,zuzMap:n,...o})=>(n&&Vr(n),jsx(ri,{storageKey:r,forceTheme:t,...o,children:e})),ri=({children:e,storageKey:r,forceTheme:t,...n})=>{let[o,s]=useState(()=>t||zr(r,"system")),[a,l]=useState(()=>t||zr(r)),f=u=>(u||(u=window.matchMedia($r)),u.matches?"dark":"light"),c=useCallback(u=>{let m=u=="system"?f():u,h=document.documentElement;h.setAttribute("color-scheme",m),h.style.colorScheme=m,l(m);},[f]),i=useCallback(u=>{s(u),localStorage.setItem(r,u),c(u);},[o]),d=useCallback(u=>{let m=f(u);l(m),o==="system"&&c("system");},[o]);return useEffect(()=>{o==null&&window.localStorage.getItem(r);},[o]),useEffect(()=>{window.matchMedia($r).addEventListener("change",d);},[d]),useEffect(()=>{let u=m=>{m.key==r&&(m.newValue?i(m.newValue):i("system"));};return window.addEventListener("storage",u),()=>window.removeEventListener("storage",u)},[i]),useEffect(()=>{c(t||o||"system");},[o]),jsxs(Fr,{value:{colorScheme:o,resolvedScheme:a,setColorScheme:i,...n},children:[t?null:jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
2
2
  const themes = ['light', 'dark']
3
3
  let theme = localStorage.getItem(\`${r}\`) || "system";
4
4
  if (theme === "system") {
5
5
  theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
6
6
  }
7
7
  document.documentElement.setAttribute("color-scheme", theme);
8
- document.documentElement.style.colorScheme = theme;`}}),jsx(bo,{children:e})]})},Lr=(e,r)=>{if(za)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||r};var Or=({ref:e,...r})=>{let{style:t,...n}=r,{style:o,className:s,rest:a}=B(n);return jsx("span",{ref:e,style:t,className:s,...a})};Or.displayName="Zuz.Span";var ie=Or;var Dr=forwardRef((e,r)=>{let{name:t,pathCount:n,variant:o,color:s,size:a,...i}=e,{variant:f}=J(true),{className:c,style:l,rest:d}=B(i);return jsx("div",{style:{color:s,...l,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${o||f||G.Small} ${c}`.trim(),ref:r,...d,children:Array(n||0).fill(0).map((p,u)=>jsx(ie,{className:`path${u+1}`},`${t}-layer-${u}`))})});Dr.displayName="Zuz.Icon";var re=Dr;var ye={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Hr=e=>{let{type:r,variant:t,color:n,...o}=e,{className:s,style:a,rest:i}=B(o),{spinner:f}=J(true),c=()=>{switch(r||f?.type||ye.Simple){case ye.Simple:return null;case ye.Wave:return jsxs(Fragment$1,{children:[jsx(m,{as:"--bar --bar1"}),jsx(m,{as:"--bar --bar2"}),jsx(m,{as:"--bar --bar3"})]});case ye.Roller:return null}};return jsx(m,{className:`${s} --spinner --${(r||f?.type||ye.Simple).toLowerCase()} --${t||f?.variant||G.Small}`.trim(),style:{...a},...i,children:c()})};Hr.displayName="Zuz.Spinner";var we=Hr;var Dt={Loading:"loading",Normal:"normal"};var $r=({ref:e,...r})=>{let{reset:t,kind:n="solid",variant:o,icon:s,iconSize:a,children:i,withLabel:f,spinner:c,state:l,disabled:d,...p}=r,{style:u,className:y,rest:T}=B(p),{variant:x}=J(true);return jsxs("button",{className:removeDuplicateWords(`--button --${n} --${o||x} flex aic ${t?"":"jcc"} ${s?"--with-icon":""} ${y}`).trim().replace(/\s+/g," "),style:u,ref:e,disabled:l==Dt.Loading||r.skeleton?.enabled||d,...T,children:[l==Dt.Loading&&jsx(we,{variant:o||x,type:c||ye.Simple}),(!l||l==Dt.Normal)&&jsxs(Fragment$1,{children:[s&&jsx(re,{variant:a,name:s}),f===true?jsx(ie,{children:i}):i]})]})};$r.displayName="Zuz.Button";var K=$r;var zr=({ref:e,...r})=>{let{h:t,html:n,children:o,lines:s,tfx:a,delay:i=0,duration:f=.5,stagger:c=.05,repeat:l=true,reveal:d=false,hover:p=false,...u}=r,{style:y,className:T,rest:x}=B(u),P=useRef(null),[S,R]=useState(false),[g]=useIntersectionObserver([P],{threshold:[1]}),v=useMemo(()=>{if(y?.opacity!==void 0)return y.opacity;if(typeof r.as=="string"){let A=r.as.match(/opacity:([\d.]+)/);if(A)return A[1]}return 1},[r.as,y?.opacity]),h=useMemo(()=>a?p?S:d?g===1:true:false,[a,p,S,d,g]);useEffect(()=>{e&&(typeof e=="function"?e(P.current):e.current=P.current);},[e]);let b=`h${r.h||1}`,N=useMemo(()=>typeof o=="string"?o:Array.isArray(o)&&o.length===1&&typeof o[0]=="string"?o[0]:null,[o]),F=useMemo(()=>{let A=Array.isArray(r.as)?r.as.join(" "):r.as||"";return typeof A=="string"&&A.includes("text-clip")},[r.as]);useLayoutEffect(()=>{if(!F||!P.current||N===null)return;let A=P.current,L=0,O=0,M=()=>{let E=A.getBoundingClientRect(),U=getComputedStyle(A).backgroundImage,q=E.width;A.querySelectorAll(".--fx-char").forEach($=>{let W=$.getBoundingClientRect().left-E.left;$.style.backgroundImage=U,$.style.backgroundRepeat="no-repeat",$.style.backgroundSize=`${q}px 100%`,$.style.backgroundPosition=`-${W}px 0`,$.style.backgroundClip="text",$.style.webkitBackgroundClip="text",$.style.color="transparent";});},_=()=>{cancelAnimationFrame(L),cancelAnimationFrame(O),L=requestAnimationFrame(()=>{O=requestAnimationFrame(M);});};_();let I=new ResizeObserver(_);return I.observe(A),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(_),window.addEventListener("resize",_),()=>{cancelAnimationFrame(L),cancelAnimationFrame(O),I.disconnect(),window.removeEventListener("resize",_);}},[F,N,a,h]);let k=useMemo(()=>n?jsx(ie,{dangerouslySetInnerHTML:{__html:n}}):a&&N!==null?N.split("").map((A,L)=>{let O=A===" ",_=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":l?"infinite":"1";return jsx(ie,{"data-char":A,className:`--fx-char -fx ${h?`--fx-${a}`:""}`,style:{"--delay":`${i+L*c}s`,"--duration":`${f}s`,"--iteration":_,"--target-opacity":v,display:O?"inline":"inline-block",whiteSpace:"pre",opacity:!h&&a==="typewriter"?0:void 0},children:A},L)}):o,[o,n,a,N,h,i,c,f,l]);return jsx(b,{ref:P,onMouseEnter:()=>p&&R(true),onMouseLeave:()=>p&&R(false),style:a?{...y,display:a?"flex":y?.display,flexWrap:a?"wrap":y?.flexWrap,opacity:a&&!h?0:a?1:y?.opacity,transition:a?"opacity 0.4s ease":void 0}:y,className:`${T} ${a?"--text-fx -fx":""}`.trim(),...x,children:k})};zr.displayName="Zuz.Text";var Z=zr;var ti=e=>{let{label:r,labelColor:t,icon:n,iconColor:o,index:s,className:a,onSelect:i}=e;return r=="-"?jsx(m,{className:"--line"}):jsxs(K,{reset:true,onClick:f=>i?.(e),className:`--item ${a||""}`.trim(),children:[jsx(m,{as:"--icon",children:jsx(re,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsx(Z,{className:"--lbl flex aic",style:t?{color:t}:{},children:r})]})},Fr=ti;var Kr=({ref:e,...r})=>{let{id:t,as:n,fx:o,offsetX:s,offsetY:a,parent:i,event:f,arrow:c,when:l,items:d,header:p,footer:u,origin:y=ft.TopRight,...T}=r,[x,P]=useState(false),[S,R]=useState(d||[]),{position:g,targetRef:v,calculatedAnchor:h}=useAnchorPosition(i?.current,f,{offsetX:s,offsetY:a,preferredAnchor:y}),N=i&&g.top>i.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",F=useMemo(()=>{let _=h.toLowerCase();return _.includes("left")?"--arrow-left":_.includes("right")?"--arrow-right":"--arrow-center"},[h]),k=g.top!==0||g.left!==0;useEffect(()=>{l&&k?P(true):l||P(false);},[l,k]);let{className:A,style:L,rest:O}=B(T),M=he({...o?.transition?{transition:o.transition??Q.SlideInBottom}:{from:{opacity:0,scale:.8,y:-10},to:{opacity:1,scale:1,y:0}},curve:o?.curve??oe.EaseInOut,duration:o?.duration??.05,when:x&&k});return jsxs(m,{ref:v,className:`--contextmenu ${c||i!=null?`--has-arrow ${N} ${F}`:""} abs flex cols ${A}`.trim(),"aria-hidden":!x,style:{...L,...M.style,top:g.top,left:g.left,visibility:k?"visible":"hidden",transformOrigin:h},...O,children:[typeof p=="function"?createElement(p):p,S.map((_,I)=>jsx(Fr,{..._,index:I},`context-${_.label.toLowerCase()}-${I}`)),typeof u=="function"?createElement(u):u]})};Kr.displayName="Zuz.ContextMenu";var wo=Kr;var Wr=forwardRef((e,r)=>{let{children:t,fx:n,when:o,fxDelay:s,fxStep:a,classToIgnore:i,...f}=e,c=J(true),l=useDelayed(),d=n||c?.group?.fx,p=s||c?.group?.fxDelay,u=a||c?.group?.fxStep,y=i||c?.group?.classToIgnore||"-fx",T=useMemo(()=>d?addPropsToChildren(t,x=>{if(x.type===Fragment)return false;let P=x.props||{},S="fx"in P,R="tfx"in P,g=P.as?Array.isArray(P.as)?P.as.join(" "):P.as:P.className||"";return !(typeof g=="string"&&g.includes(y))&&(!S||R)},(x,P)=>{let S=(p??0)+x*(u??.1),R=P.props||{};return "tfx"in R?{delay:(R.delay??0)+S}:{fx:{...d,delay:S,when:o??(n?.when||l)}}}):t,[t,o,l,d,p,u,y,n]);return jsx(m,{className:"--group",ref:r,...f,children:T})});Wr.displayName="Zuz.Group";var Co=Wr;var Ur=forwardRef((e,r)=>{let{message:t,spinner:n,spinnerSize:o,color:s,when:a,hideMessage:i,...f}=e,{className:c,style:l,rest:d}=B(f),{spinner:p}=J(true);return "when"in e&&e.when==false?null:jsxs(Co,{fx:{transition:Q.SlideInBottom,curve:oe.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${c}`.trim(),style:{...l,backgroundColor:"var(--cover-bg)"},...d,children:[jsx(we,{variant:o||p?.variant||G.Small,type:n||p?.type||ye.Simple}),!i&&jsx(Z,{className:"--label",tfx:"fade",style:{color:"var(--cover-label)"},children:t||"loading"})]})});Ur.displayName="Zuz.Cover";var ke=Ur;var To=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}},Ne=new To;var qr=forwardRef((e,r)=>{let{when:t,...n}=e;return jsx(m,{ref:r,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:Q.FadeIn,when:t},...n})});qr.displayName="Zuz.Overlay";var Ge=qr;var xi=({action:e,render:r=true,message:t=""})=>jsx(m,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:r?t:null}),Xr=xi;var vi=({action:e,actionPosition:r,dialogID:t,variant:n})=>jsx(m,{as:`--footer flex aic rel ${r?r==Pr.Center?"jcc":"":"jce"}`.trim(),children:e.map((o,s)=>jsx(K,{variant:n,onClick:a=>o.handler?o.handler():o.onClick?o.onClick():console.log("onClick Handler missing"),as:"--action",children:o.label},`dialog-${t}-action-${o.key}`))}),jr=vi;var Si={colorSchemeLight: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:[jsx("circle",{cx:"12",cy:"12",r:"5"}),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: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:[jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark: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:jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[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"}),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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[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"}),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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[Re.Info]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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"})}),[Re.Warning]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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"})}),[Re.Error]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[Re.Success]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[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"}),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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),volumeHigh:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[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"}),jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},V=Si;var wi=({title:e="Alert",onClose:r})=>jsxs(m,{as:"--head flex aic rel",children:[jsx(m,{as:`--${e?"title":"dot"} flex aic jcc rel`,children:e}),jsx(K,{onClick:t=>r(),className:"--closer abs center-v",children:V.close})]}),Jr=wi;var on=({ref:e,...r})=>{let{index:t,id:n,title:o,message:s,transition:a,curve:i,speed:f,type:c,action:l,actionPosition:d,spinner:p,loadingMessage:u,variant:y,inBackground:T,forceClose:x,forceLoading:P,onClose:S,onShow:R,onHide:g,...v}=r,h=useMemo(()=>uuid(12),[]),[b,N]=useState(o||""),[F,k]=useState(s||""),[A,L]=useState(c||tt.Dialog),[O,M]=useState(false),[_,I]=useState(true),[E,U]=useState(l||null),[q,H]=useState(false),{variant:$,spinner:X,dialog:W}=J(true),ee=y||W?.variant||$||G.Small,{style:te,className:le,rest:pe}=B(v),xe=useRef(null),ae=he({when:O,duration:f||W?.speed||.3,delay:W?.delay||.1,transition:a||W?.transition||Q.SlideInBottom,curve:i||W?.curve||oe.EaseInOut,watch:["scale","filter","transform"]}),ce=()=>{M(false),S(n);},j=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ne.isTop(ce)&&ce();}}],[O]);useShortcuts(j),useEffect(()=>{L(tt.Dialog),k(s),N(b),E&&U(E.reduce((se,fe)=>(se.push({...fe,key:fe.key||uuid(12)}),se),[])),M(true),setTimeout(()=>R?R():()=>{},500);},[]),useEffect(()=>{x&&ce();},[x]),useEffect(()=>{P!=null&&H(P);},[P]),useEffect(()=>(O?Ne.push(ce):Ne.pop(ce),()=>Ne.pop(ce)),[O]);let ne=useMemo(()=>1e4+t*10,[t]);return jsxs(Fragment$1,{children:[jsx(Ge,{style:{zIndex:ne},when:O}),jsxs(m,{as:`--dialog --${(c??tt.Default).toLowerCase()} ${O?"--visible":""} ${le} fixed abc`.trim(),style:{...ae.style,zIndex:ne+1,pointerEvents:T==true?"none":"auto",...T==true?{scale:"0.92",filter:"blur(2px)"}:{}},...pe,ref:xe,children:[jsx(Jr,{title:b,onClose:ce}),jsx(Xr,{message:F,render:_,action:E}),E&&E.length>0&&jsx(jr,{variant:ee,action:E,dialogID:h,actionPosition:d}),jsx(ke,{when:q,spinner:p||W?.spinner||X?.type||ye.Simple,message:u||W?.loadingMessage})]})]})};on.displayName="Zuz.Dialog";var Ro=on;var rn=forwardRef((e,r)=>{let{speed:t,smooth:n=false,breakpoints:o={},style:s,...a}=e,{rootRef:i,containerRef:f,thumbY:c,thumbX:l,onScrollY:d,onScrollX:p}=useScrollbar(t||1,o,n),{style:u,className:y,rest:T}=B(a);return useEffect(()=>{let x=f.current;if(!x)return;let P=()=>{window.dispatchEvent(new Event("resize"));},S=R=>{let g=R.target;if(g.closest(".--allow-scroll")){let h=g.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:N,clientHeight:F}=h,k=R.deltaY<0,A=R.deltaY>0;(k&&b>0||A&&b+F<N)&&R.stopPropagation();}};return x.addEventListener("scroll",P),x.addEventListener("wheel",S,{passive:true}),()=>{x.removeEventListener("scroll",P),x.removeEventListener("wheel",S);}},[f]),jsxs(m,{ref:i,className:y.trim(),as:"--scrollview rel",children:[jsx(m,{as:`--scroll-content ${y}`.trim(),ref:f,style:s||{},children:T.children}),jsx(m,{as:"--scroll-track --track-y --abs",children:jsx(m,{as:"--scroll-thumb --abs",ref:c,onMouseDown:d})}),jsx(m,{as:"--scroll-track --track-x --abs",children:jsx(m,{as:"--scroll-thumb --abs",ref:l,onMouseDown:p})})]})});rn.displayName="Zuz.ScrollView";var Io=rn;var nn=({ref:e,...r})=>{let{id:t,index:n,from:o,speed:s,children:a,margin:i,animation:f,prerender:c,inBackground:l,forceClose:d,forceLoading:p,onClose:u,...y}=r,{drawer:T}=J(true),[x,P]=useState(a),[S,R]=useState(false),[g,v]=useState(c??(T?.prerender||true)),[h,b]=useState(false),N=()=>{R(false),u?.(t??-1);},{className:F,style:k,rest:A}=B(y),L=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Ne.isTop(N)&&N();}}],[S]);useShortcuts(L),useEffect(()=>{P(a);},[a]),useEffect(()=>(S?Ne.push(N):Ne.pop(N),()=>Ne.pop(N)),[S]),useEffect(()=>{R(true);},[]),useEffect(()=>{d&&N();},[d]),useEffect(()=>{p!=null&&b(p);},[p]);let O=o||T?.from||Se.Left,M=useMemo(()=>{switch(O){case Se.Left:return {from:{x:"-100vw"},to:{x:0}};case Se.Right:return {from:{x:"100vw"},to:{x:0}};case Se.Top:return {from:{y:"-100vh"},to:{y:0}};case Se.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,T?.from]),_=he({from:{...M.from,opacity:0},to:{...M.to,opacity:1},when:S,curve:f||T?.animation||oe.EaseInOut,duration:s||T?.speed||.5,watch:["scale","filter"]}),I=useMemo(()=>1e4+(n||1)*10,[n]);return jsxs(Fragment$1,{children:[jsx(Ge,{onClick:E=>{S&&N();},when:S,style:{zIndex:I}}),jsxs(m,{ref:e,"aria-hidden":!S,className:`--drawer flex cols ${F} --${O.toLowerCase()} fixed`,style:{...k,..._.style,"--m":`${i||T?.margin||0}px`,zIndex:I+1,pointerEvents:l==true?"none":"auto",...l==true?{scale:"0.92",filter:"blur(2px)"}:{}},...A,children:[o==Se.Top||o==Se.Bottom?jsx(m,{className:"--handle"}):null,jsx(K,{as:"--close-drawer --abs",onClick:N,children:V.close}),jsxs(Io,{as:"rel",children:[g||S?x:null,jsx(ke,{when:h})]})]})]})};nn.displayName="Zuz.Drawer";var Eo=nn;var an=forwardRef((e,r)=>{let{progress:t,type:n,animated:o,...s}=e,a=useRef(null);useImperativeHandle(r,()=>({setProgress:l=>{a.current.style.width=`${l*100}%`,a.current.setAttribute("data-value",l+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),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:f,rest:c}=B(s);return jsx(m,{className:`--progress ${o?"--animated":""} flex rel ${i}`.trim(),style:f,...c,children:jsx(m,{ref:a,className:"--bar rel"})})});an.displayName="Zuz.ProgressBar";var qe=an;var Ft=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(Ft||{}),_t=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(_t||{}),ln=(t=>(t.Stack="stack",t.Individual="individual",t))(ln||{}),cn={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var $i=e=>{let{index:r,id:t,type:n,icon:o,busy:s,width:a,title:i,message:f,duration:c,sticky:l=false,actions:d=[],position:p,style:u,isHovered:y,total:T,progress:x,progressValue:P,forceClose:S,variant:R,onClick:g,onClose:v}=e,[h,b]=useState(false),[N,F]=useState(false),{toast:k}=J(true),A=typeof P=="number",L=A?Math.max(0,Math.min(1,P)):void 0,O=N||S,M=p??k?.position??"TopCenter",_=n??k?.type??"default",I=u??k?.style??"stack",E=c??k?.duration??4,U=x??k?.progress??false,q=useRef(E*1e3),H=useRef(void 0),$=useRef(void 0),X=useRef(null),W=he({when:h&&!O,duration:.3,transition:k?.transition||(M.includes("Top")?Q.SlideInTop:M.includes("Bottom")?Q.SlideInBottom:M.includes("Left")?Q.SlideInLeft:Q.SlideInRight),curve:k?.curve||oe.EaseInOut,watch:["transform","opacity","scale","filter"]});useEffect(()=>{b(true);let j=ne=>{if($.current!==void 0){let se=ne-$.current;if(!A&&!y&&!l&&!O&&(q.current-=se,X.current)){let fe=Math.max(0,q.current/(E*1e3)*100);X.current?.setProgress?.(fe/100);}}$.current=ne,q.current<=0?F(true):H.current=requestAnimationFrame(j);};return H.current=requestAnimationFrame(j),()=>{H.current&&cancelAnimationFrame(H.current);}},[y,l,O,E]),useEffect(()=>{if(O){let j=setTimeout(()=>{v?.(t);},350);return ()=>clearTimeout(j)}},[O,t]);let ee=I==="stack",te=y?r*65:r*8,le=y?1:Math.max(.85,1-r*.05),pe=y?1:Math.max(.4,1-r*.2),xe=j=>{g?g(j):s!==true&&(!d||d.length===0)&&F(true);},ae=W.style.transform||"translate(0, 0)",ce=O?ae:`${ae} translateY(${M.includes("Top")?te:-te}px) scale(${le})`;return jsxs(m,{onClick:xe,as:`--snack --${O?"hidden":"visible"} --${R||k?.variant||G.Medium} --${_} --${M.toLowerCase()} abs flex aic`,style:{...W.style,zIndex:1e3-r,pointerEvents:O?"none":"auto",opacity:O?W.style.opacity:pe,transform:ce,filter:!O&&ee&&!y&&r>0?"blur(1px)":"none",cursor:!d||d.length===0?"pointer":"default",transition:`${W.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxs(m,{as:"--ico flex aic jcc rel",children:[o?jsx(re,{name:o}):jsx(m,{as:"--no-icon"}),s===true&&jsx(we,{as:"abs abc"})]}),jsxs(m,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsx(Z,{as:"--tt",children:i||cn[n]}),jsx(Z,{as:"--tm",children:f})]}),d&&d.length>0&&jsx(m,{as:"--actions flex gap:5",children:d.map((j,ne)=>jsx(K,{as:"--snack-btn bold",variant:G.XSmall,onClick:se=>{se.stopPropagation(),j.onClick(se);},children:j.label},ne))}),(U||A)&&jsx(qe,{as:"abs",progress:L,ref:X})]})},Lo=$i;var Ce=createContext(null),Wi=({ref:e,...r})=>{let n=useContext(Ce)?.depth??0,[o,s]=useState(null),[a,i]=useState(null),[f,c]=useState(false),[l,d]=useState([]),p=useDelayed(),u=useRef(0),y=()=>++u.current,T=()=>{c(false),setTimeout(()=>i(null),200);};useImperativeHandle(e,()=>({add(g){let v=y(),h={id:v,...g};return d(b=>[...b,h]),v},openMenu(g){c(false),setTimeout(()=>{i({id:y(),type:"menu",props:g}),c(true);},16);},update(g,v){d(h=>h.map(b=>b.id!==g?b:{...b,props:{...b.props,...v}}));},remove(g){d(v=>v.map(h=>h.id===g?{...h,props:{...h.props,forceClose:true}}:h)),a?.id===g&&T();},loading(g,v){d(h=>h.map(b=>b.id===g?{...b,props:{...b.props,forceLoading:v}}:b)),a?.id===g&&T();},clear(g){d(l.filter(v=>v.type!=g));}})),useEffect(()=>{if(a&&f){let g=()=>T();return document.addEventListener("click",g),()=>document.removeEventListener("click",g)}},[a,f,T]);let x=g=>{setTimeout(()=>{d(v=>v.filter(h=>h.id!==g)),a?.id===g&&i(null);},250);},P=useMemo(()=>[...l.filter(g=>g.type!="toast")],[l]);if(!p)return null;let S=l.filter(g=>g.type=="toast").reverse(),R=Object.values(_t);return createPortal(jsxs(m,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[P.map((g,v)=>{let h=v<P.length-1;return g.type==="dialog"?jsx(Ro,{onClose:x,index:v,id:g.id,...g.props,inBackground:h},`layer-${g.type}-${g.id}`):g.type==="drawer"?jsx(Eo,{onClose:x,index:v,id:g.id,...g.props,inBackground:h},`layer-${g.type}-${g.id}`):null}),R.map(g=>{let v=S.filter(h=>(h.props.position||"TopCenter")===g);return v.length===0?null:jsx(m,{onMouseEnter:()=>s(g),onMouseLeave:()=>s(null),as:`--toast-container fixed --${g.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:v.map((h,b)=>jsx(Lo,{index:b,total:v.length,isHovered:o===g,onClose:x,id:h.id,...h.props},h.id))},g)}),a&&jsx(m,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsx(wo,{onClose:T,when:f,...a.props},`menu-${a.id}`)})]}),document.body)},Gi=({children:e})=>{let r=useContext(Ce),t=r?r.depth+1:0,n=useRef(null),o=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 jsxs(Ce.Provider,{value:o,children:[e,jsx(Wi,{ref:n})]})},bo=Gi;var qi=()=>{let e=useContext(Ce);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:f,curve:c,arrow:l,duration:d,header:p,footer:u})=>{e.openMenu({fx:{transition:f,curve:c,duration:d},parent:n,items:o,origin:s||ft.TopCenter,offsetX:a,offsetY:i,arrow:l,header:p,footer:u});},hide:e.clear}},Xi=qi;var ji=()=>{let e=useContext(Ce);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("dialog"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a);return {clearAll:r,show:s=>{let a=e.add({type:"dialog",props:{...s,type:tt.Dialog}});return {id:a,setLoading:i=>n(a,i),hide:()=>t(a)}},hide:t}},Qi=ji;var el=()=>{let e=useContext(Ce);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:Se.Right}),left:s=>o({children:s,from:Se.Left}),top:s=>o({children:s,from:Se.Top}),bottom:s=>o({children:s,from:Se.Bottom}),close:t}},tl=el;var rl=(e,r,t={})=>{let[n,o]=useState(null),[s,a]=useState(false),{duration:i=.25,curve:f=oe.EaseOutBack,borderRadius:c={from:40,to:24},targetWidth:l=320}=t;return useLayoutEffect(()=>{r&&e.current?(o(e.current.getBoundingClientRect()),a(true)):r||a(false);},[r,e]),{style:he({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:c.from},to:{opacity:1,width:l,height:"auto",borderRadius:c.to},curve:f,duration:i,when:s&&r}).style,isMeasured:s,sourceRect:n}},nl=rl;var ll=(e,r={})=>{let{offset:t=8,direction:n="bottom",container:o=null,triggerRef:s=null}=r,a=useRef(null),i=useCallback(()=>{let f=e.current;if(!f)return;let c=s?.current||f.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let l=f.getBoundingClientRect(),d=c.getBoundingClientRect(),p,u;o?(p=o.getBoundingClientRect(),u="absolute"):(window.getComputedStyle(f).position==="fixed"?u="fixed":u="absolute",u==="fixed"?p={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:p={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),f.style.position!==u&&(f.style.position=u),a.current=u;let x=0,P=0;switch(n){case "top":x=d.top-l.height-t,P=d.left,x<p.top&&d.bottom+l.height+t<=p.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,P=d.left,x+l.height>p.bottom&&d.top-l.height-t>=p.top&&(x=d.top-l.height-t);break;case "left":x=d.top,P=d.left-l.width-t,P<p.left&&d.right+l.width+t<=p.right&&(P=d.right+t);break;case "right":x=d.top,P=d.right+t,P+l.width>p.right&&d.left-l.width-t>=p.left&&(P=d.left-l.width-t);break}if(x=Math.max(p.top,Math.min(x,p.bottom-l.height)),P=Math.max(p.left,Math.min(P,p.right-l.width)),a.current==="fixed")f.style.top=`${x}px`,f.style.left=`${P}px`;else {let S;f.offsetParent?S=f.offsetParent.getBoundingClientRect():S={top:0,left:0};let R=x-S.top+window.scrollY,g=P-S.left+window.scrollX;f.style.top=`${R}px`,f.style.left=`${g}px`;}},[e,s,t,n,o]);return useEffect(()=>{let f=e.current;if(!f)return;let c=s?.current||f.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let l=new ResizeObserver(i);return l.observe(f),c&&l.observe(c),i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,true),()=>{l.disconnect(),c&&l.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,true);}},[e,n,t,o,s]),{postion:a.current,reposition:i}},bt=ll;var ml=()=>{let e=useContext(Ce);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(u,y)=>e.add({type:"toast",props:{...y,type:u}}),t=()=>e.clear("toast"),n=u=>e.remove(u),o=(u,y)=>e.update(u,y),s=u=>({id:u,update:y=>o(u,y),setType:y=>o(u,{type:y}),setProgress:y=>o(u,{progress:true,progressValue:y}),setBusy:y=>o(u,{busy:y}),success:()=>o(u,{type:"success"}),error:()=>o(u,{type:"error"}),warn:()=>o(u,{type:"warn"}),promise:()=>o(u,{type:"promise"}),default:()=>o(u,{type:"default"}),hide:()=>n(u)}),a=u=>s(r("default",u)),i=u=>s(r("success",u)),f=u=>s(r("error",u)),c=u=>s(r("warn",u)),l=u=>s(r("promise",u)),d=(u,y,T)=>{let x=r(u,{...y,sticky:y.sticky??false,actions:[{label:T?.label||"Ok",onClick:P=>{T?.onClick?.(P),n(x);}}]});return s(x)},p=(u,y,T,x)=>{let P=r(u,{...y,sticky:true,actions:[{label:T?.label||"Ok",onClick:S=>{T?.onClick?.(S),(T?.hide??false)===true&&n(P);}},{label:x?.label||"Cancel",onClick:S=>{x?.onClick?.(S),(x?.hide??true)===true&&n(P);}}]});return s(P)};return {show:a,hide:n,promise:l,clearAll:t,ok:(u,y)=>d("default",u,y),success:(u,y)=>y?d("success",u,y):i(u),error:(u,y)=>y?d("error",u,y):f(u),confirm:(u,y,T)=>p("default",u,y,T),warn:(u,y)=>y?d("warn",u,y):c(u),succes:(u,y)=>y?d("success",u,y):i(u)}},pl=ml;var fl=()=>{let e=useContext(Ce);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(c,l)=>e.add({type:"toast",props:{...l,type:c}});return {show:(c,l,d,p)=>r("default",{title:c,message:l,icon:d,duration:p}),hide:c=>e.remove(c),success:(c,l,d,p)=>r("success",{title:c,message:l,icon:d,duration:p}),error:(c,l,d,p)=>r("error",{title:c,message:l,icon:d,duration:p}),warn:(c,l,d,p)=>r("warn",{title:c,message:l,icon:d,duration:p}),promise:(c,l,d,p)=>r("promise",{title:c,message:l,icon:d,duration:p}),clearAll:()=>e.clear("toast")}},Mo=fl;var yn=({ref:e,style:r,...t})=>{let n=useRef(null),o=useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:i}=B(t,o);return jsx("div",{ref:e||n,style:{...s,...r||{}},className:a,...i})};yn.displayName="Zuz.Box";var m=yn;var bn=forwardRef((e,r)=>{let{title:t,message:n,...o}=e,[s,a]=useState(false);return jsxs(m,{className:"--accordion flex cols",...o,children:[jsxs(K,{onClick:i=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(Z,{className:"--label flex",children:t}),jsx(m,{className:"--arrow flex",children:s?V.arrowUp:V.arrowDown})]}),s&&jsx(m,{className:"--detail",children:n})]})});bn.displayName="Zuz.Accordion";var bl=bn;var vl=({label:e,icon:r,onClick:t,idx:n,selected:o})=>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"?jsx(re,{name:r}):r}),Sn=vl;var wn=forwardRef((e,r)=>{let{items:t,name:n,selected:o,position:s,...a}=e,i=useRef(null),[f,c]=useState(o||t[0].tag||0),l=useCallback(({x,y:P})=>{if(i.current){let S=i.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-S.left}`),document.documentElement.style.setProperty("--tip-y",`${P-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=useCallback(()=>{i.current&&(i.current.removeEventListener("pointerleave",d),i.current.removeEventListener("pointermove",l),document.documentElement.style.setProperty("--tip-s","0"));},[]),p=useCallback(()=>{i.current&&(i.current.addEventListener("pointerleave",d),i.current.addEventListener("pointermove",l));},[]);useEffect(()=>{i.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,P)=>P.label.length>x.length?P.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),i.current?.addEventListener("pointerenter",p));},[]);let{className:u,style:y,rest:T}=B(a);return jsxs(m,{ref:i,style:y,className:[`--actionbar flex aic ${u}`,`${!s||s==ge.Auto?"rel":`--${s}`}`].join(" ").trim(),...T,children:[t.map((x,P)=>jsx(Sn,{selected:f===x.tag||o==P,...x,idx:P},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsx(m,{className:"--tip abs",children:jsx(m,{className:"--track flex aic",children:t.map(({label:x})=>jsx(m,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});wn.displayName="Zuz.ActionBar";var Pl=wn;var Tn=forwardRef((e,r)=>{let{type:t,icon:n,title:o,message:s,iconSize:a,...i}=e,{className:f,style:c,rest:l}=B(i);return jsxs(m,{className:`--alert --${t||Re.Info} flex aic ${f}`.trim(),style:c,...l,children:[jsx(m,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&V[t||Re.Info]}),jsxs(m,{className:"--meta flex cols",children:[jsx(Z,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(Z,{className:"--message",h:2,children:s})]})]})});Tn.displayName="Zuz.Alert";var Nl=Tn;var Ao=createContext(null),$o=()=>{let e=useContext(Ao);return e?useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},zo=()=>useContext(Ao),He=()=>{let e=zo(),r=$o();return {...e,...r}},In=({children:e,initialValues:r={}})=>{let t=useRef({values:r,errors:{},touched:{}}),n=useRef(new Set(Object.keys(r))),o=useRef(new Set),s=useCallback(()=>t.current,[]),a=useCallback(c=>(o.current.add(c),()=>o.current.delete(c)),[]),i=()=>{o.current.forEach(c=>c());};useEffect(()=>{if(r&&Object.keys(r).length>0){let c=new Set(Object.keys(r)),l=[...n.current].filter(p=>!c.has(p)),d={...t.current.values};l.forEach(p=>delete d[p]),t.current={...t.current,values:{...d,...r}},n.current=c,i();}},[r]);let f=useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(c,l)=>{t.current.values[c]!==l&&(t.current={...t.current,values:{...t.current.values,[c]:l}},i());},deleteFieldValue:c=>{if(!(c in t.current.values))return;let{[c]:l,...d}=t.current.values;t.current={...t.current,values:d},i();},setFieldError:(c,l)=>{t.current={...t.current,errors:{...t.current.errors,[c]:l}},i();},reset:()=>{t.current={values:{},errors:{},touched:{}},i();}}),[]);return jsx(Ao.Provider,{value:f,children:e})};var Bn=({ref:e,...r})=>{let{variant:t,numeric:n,name:o,onConfirm:s,...a}=r,{style:i,className:f,rest:c}=B(a),{variant:l}=J(true),d=useRef(null),p=He(),u=o?p.errors?.[o]:null,y=o&&p.values&&p.setFieldValue,T=y?p.values?.[o]:void 0,x=useDebounce(S=>{y&&p.setFieldValue?.(o,S);},500),P=S=>{let R=S.currentTarget.value;n&&(R=R.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),S.currentTarget.value=R),x(R),r.onInput?.(S);};return useEffect(()=>{d.current&&o&&T!==void 0&&d.current.value!==String(T)&&(d.current.value=String(T));},[T,o]),useEffect(()=>()=>{y&&p.deleteFieldValue?.(o);},[]),jsx("input",{name:o,className:`--input --${t||l} ${u?"--has-error":""} --flex ${f}`.trim(),style:i,defaultValue:T??r.defaultValue??"",onInput:P,onKeyDown:S=>{S.key=="Enter"&&s?.(S.currentTarget.value);},ref:S=>{d.current=S,typeof e=="function"?e(S):e&&(e.current=S);},...c})};Bn.displayName="Zuz.Input";var ue=Bn;var kn=e=>{let{meta:r,children:t}=e,n=useDelayed(),{label:o,icon:s,...a}=isValidElement(r)?{}:r,{className:i,style:f,rest:c}=B({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return isValidElement(r)?jsx("li",{style:f,className:i,children:r}):jsxs("li",{style:f,className:i,...c,children:[t,typeof r=="string"?r:o]})};kn.displayName="Zuz.ListItem";var Ln=kn;var On=forwardRef((e,r)=>{let{items:t,variant:n,direction:o,seperator:s,ol:a,...i}=e,{className:f,style:c,rest:l}=B(i),d=a==true?"ol":"ul";return createElement(d,{className:`--list --${n||G.Small} flex ${o??"cols"} ${f}`.trim(),style:c,ref:r,...l,children:t.map((p,u,y)=>{let T=`${typeof p=="string"?`li-${String(p)}`:isValidElement(p)?`li-${p.key}`||`${u}-${MD5(p.toString())}`:p.label}-${u}`;return jsxs(Fragment,{children:[jsx(Ln,{meta:p}),s&&y[u+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${u+1}-${T}`):null]},T)})})});On.displayName="Zuz.List";var Ye=On;var Dn=forwardRef((e,r)=>{let{fx:t,action:n,data:o,withStyle:s,onChange:a,...i}=e,{className:f}=B({as:s||""}),{style:c}=B(i),[l,d]=useState(false),[p,u]=useState(o||[]),y=useRef(null),T=useRef(null),x=useRef(null),P=useMemo(()=>i.name||uuid(12),[]),[S,R]=useState(null),[g,v]=useState(null),[h,b]=useState([]),F=useDebounce(I=>{I.target.value==""?(d(false),u([])):n&&I.target.value.trim()!=""&&withPost(n,{query:I.target.value}).then(E=>{"items"in E&&_(E.items).isArray()?(u(E.items),v(I.target.value),b(E.items)):console.error("Action Response should contain items array"),R(null);}).catch(E=>{R(null),u([]);});},250),k=()=>{if(T.current){let I=T.current.getBoundingClientRect(),E=window.innerHeight-I.bottom,U=I.top;if(x.current){let q=x.current;E<q.offsetHeight&&U>E?(q.style.top="auto",q.style.bottom=`${I.height}px`,q.style.maxHeight=`${U-150}px`):(q.style.top=`${I.height+5}px`,q.style.bottom="auto",q.style.maxHeight=`${E-150}px`);}}},A=I=>{if(p.length>0){if((I.key==="ArrowDown"||I.key==="ArrowUp")&&(I.preventDefault(),I.stopPropagation()),I.key==="Escape")R(null),d(false),u([]);else if(I.key==="ArrowDown")R(E=>{let U=E===null||E===p.length-1?0:E+1;return O(U),U});else if(I.key==="ArrowUp")R(E=>{let U=E===null||E===0?p.length-1:E-1;return O(U),U});else if(I.key==="Enter"&&S!==null){let E=p[S];y.current&&(y.current.value=E,d(false),u([]));}}},L=I=>{y.current&&(y.current.value=I,d(false),u([]));},O=I=>{let E=p[I];if(E&&y.current&&(y.current.value=E,y.current.setSelectionRange(E.length,E.length)),x.current){let q=x.current.children[I];q&&q.scrollIntoView({block:"nearest"});}},M=I=>{T.current&&!T.current.contains(I.target)&&(d(false),u([]));},_$1=()=>{y.current&&y.current.value===g&&(u(h),R(null),k());};return useEffect(()=>(window.addEventListener("resize",k),window.addEventListener("scroll",k,true),document.addEventListener("mousedown",M),()=>{window.removeEventListener("resize",k),window.removeEventListener("scroll",k,true),document.removeEventListener("mousedown",M);}),[]),useEffect(()=>{k();},[p]),jsxs(m,{style:c,ref:T,className:`--autocomplete --${e.size||G.Small} flex aic rel ${f}`.trim(),children:[jsx(ue,{ref:y,autoComplete:"off",onChange:F,onKeyDown:A,onFocus:_$1,...i}),jsx(m,{className:"--arrow rel flex aic jcc",children:p.length>0?V.arrowUp:V.arrowDown}),p.length>0&&jsx(Ye,{id:P,ref:x,className:"--suggestion-list flex cols abs",items:p.map((I,E)=>({label:I,onClick:U=>{U.preventDefault(),U.stopPropagation(),L(I);},className:S===E?"--current":"",animate:{transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:clamp(.02*E,.02,.5)}}))})]})});Dn.displayName="Zuz.AutoComplete";var Jl=Dn;var Hn=forwardRef((e,r)=>{let t=useRef(null),n=useMemo(()=>r&&typeof r!="function"&&r.current?r:t,[r]),{style:o,className:s,rest:a}=B(e,n);return !a.src||a.src==""?null:jsx("img",{ref:n,style:o,className:`${s} flex`,...a})});Hn.displayName="Zuz.Image";var je=Hn;var An=forwardRef((e,r)=>{let{src:t,variant:n,type:o,crossOrigin:s,referrerPolicy:a,fx:i,as:f,alt:c,color:l,style:d,...p}=e,[u,y,T]=useImage(t??"",s,a),{className:x,style:P,rest:S}=B({fx:i,as:f});return jsx(m,{className:`--avatar --${n||G.Small} --${(o||Tr.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:l||"var(--avatar-bg, var(--primary))",...d,...P},...S,children:t?jsx(je,{src:u,crossOrigin:s,referrerPolicy:a,...p}):jsx(Z,{className:"--avatar-label",children:(c?c.charAt(0):"A").toUpperCase()})})});An.displayName="Zuz.Avatar";var ic=An;var lc=({size:e=5,type:r="dead",label:t="",variant:n=G.Small,loading:o=false,spinner:s,...a})=>{let{style:i,className:f,rest:c}=B(a);return jsxs(m,{style:{..._(t).isEmpty()?{"--badge-size":e}:{},...i},as:`--badge --${n} --${r} rel flex aic jcc ${f}`.trim(),children:[jsx(m,{fx:{transition:Q.FadeIn,curve:oe.Liquid,duration:.5,when:o},as:"abs abc",children:jsx(we,{type:s})}),_(t).isEmpty()?jsx(m,{as:`--dot --${r}`}):jsx(Z,{as:"--label",children:t})]})},cc=lc;var Cc=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>format(addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>addDays(new Date,1),getDateFormat:()=>format(addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let e=new Date,r=e.getDay();return addDays(e,(6-r)%7||6)},getDateFormat:()=>{let e=new Date,r=e.getDay();return format(addDays(e,(6-r)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>format(addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>format(addWeeks(new Date,1),"d MMM"),getDate:()=>addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>format(addWeeks(new Date,2),"d MMM"),getDate:()=>addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>format(addWeeks(new Date,4),"d MMM"),getDate:()=>addWeeks(new Date,4)}],Tc=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)})},zn=forwardRef((e,r)=>{let{defaultValue:t,variant:n,onChange:o,...s}=e,{style:a,className:i,rest:f}=B(s),[c,l]=useState(t||new Date),d=startOfMonth(c),p=endOfMonth(c),u=startOfWeek(d),y=endOfWeek(p),T=useMemo(()=>eachDayOfInterval({start:u,end:y}),[u,y]),x=R=>{o?.(R),l(R);},P=()=>{l(R=>new Date(R.getFullYear(),R.getMonth()-1));},S=()=>{l(R=>new Date(R.getFullYear(),R.getMonth()+1));};return jsxs(m,{as:`--calendar flex --${n||"sm"} ${i}`,style:a,children:[jsx(m,{as:"--calendar-quick-select flex cols flex:1",children:Tc(Cc).map(R=>{let g=R.getDate();return jsxs(K,{onClick:()=>x(g),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(Z,{as:"flex:1",children:R.label}),jsx(Z,{as:"tar",children:R.getDateFormat()})]},`--dtp-option-label-${R.label}`)})}),jsxs(m,{as:"--calendar-selector flex cols flex:1",children:[jsxs(m,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(Z,{as:"flex:1 --calendar-cm bold",children:format(c,"MMMM yyyy")}),jsx(K,{onClick:P,as:"--calendar-chevron",children:V.chevronUpOutline}),jsx(K,{onClick:S,as:"--calendar-chevron",children:V.chevronDownOutline})]}),jsxs(m,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(R=>jsx(Z,{as:"--calendar-day",children:R},`--calendar-hd-${R}`)),T.map((R,g)=>{let v=isSameMonth(R,c),h=isSameDay(R,c),b=isToday(R);return jsx(K,{disabled:!v,onClick:()=>x(R),as:["--calendar-day --calendar-dd",`${h?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:format(R,"d")},`--calendar-day-${g}-${R.getFullYear()}-${R.getMonth()}-${R.getDay()}`)})]})]})]})});zn.displayName="Zuz.Calendar";var Ko=zn;var qt=(t=>(t.Table="table",t.Gooey="gooey",t))(qt||{});var Kn=({ref:e,...r})=>{let{itemCount:t,itemsPerPage:n,startPage:o,pageRange:s,paginationStyle:a,breakLabel:i,prevLabel:f,nextLabel:c,hash:l,loading:d,seperator:p,renderOnZeroPageCount:u,asDots:y,progressBar:T,onPageChange:x,...P}=r,S=useRef(null),R=useMemo(()=>toHash(numberInRange(4,8)),[]),g=useCallback(I=>`${toHash(I,l||6,R)}${p||""}${R}`,[R]),v=useMemo(()=>i||"...",[i]),h=useRef(null),[b,N]=useState({id:l?o?typeof o=="number"?g(o):o:1:o||1,label:o||1});useImperativeHandle(e,()=>({setPage:I=>N(I),getPage:I=>b,setProgress:I=>h.current?.setProgress?.(I),getProgress:()=>h.current?.getProgress?.()??0}),[h.current]);let{style:F,className:k,rest:A}=B(P),L=useCallback(I=>typeof I=="number"?I:+I.label,[]);if(!t)throw new Error('"itemCount" prop is required');let O=useMemo(()=>Math.ceil(t/n),[t,n]),M=useMemo(()=>{let I=[],E=Math.max(L(b)-(s||2),1),U=Math.min(L(b)+(s||2),O);E>1&&I.push({id:l?g(1):1,label:1}),E>2&&I.push({id:-1,label:v});for(let q=E;q<=U;q++)I.push({id:l?g(q):q,label:q});return U<O-1&&I.push({id:-1,label:v}),U<O&&I.push({id:l?g(O):O,label:O}),I},[b]),_=useCallback(I=>{let E=I;+E.label<1||+E.label>O||(N(E),x?.(E));},[t,n,b]);return M.length<=1&&(u??false)===false?null:jsxs(m,{ref:S,as:`--pagination ${y===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${k}`,children:[jsx(m,{as:"flex flex:1 aic --pgt-btns",children:(M.length>1?M:[{id:1,label:1},{id:-1,label:v}]).map((I,E,U)=>{let q=(typeof I=="string"?I:I.label)==L(b);return jsx(K,{disabled:I.id==-1||L(b)==+I.label,className:q?"--current-page":"",onClick:H=>_(I),children:y===true?T===true&&q?jsx(qe,{ref:h}):"":typeof I=="string"?I:I.label},`--pg-${E}-${I.id}`)})}),jsx(m,{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(" ")}),jsxs(m,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsx(K,{disabled:L(b)<=1,onClick:I=>_({id:l?g(L(b)-1):L(b)-1,label:L(b)-1}),children:V.chevronLeftOutline}),jsx(K,{disabled:M.length<=1||L(b)==L(M[M.length-1]),onClick:I=>_({id:l?g(L(b)+1):L(b)+1,label:L(b)+1}),children:V.chevronRightOutline})]})]})};Kn.displayName="Zuz.Pagination";var wt=Kn;function Lc(e,r){let{items:t,renderItem:n,effect:o="slide",loop:s=true,loopMode:a="infinite",startIndex:i=0,useKeys:f=true,useWheel:c=true,spacing:l=160,rotation:d=20,scaleStep:p=.15,blur:u=4,animation:y="power",showDots:T=false,autoPlay:x=false,autoPlaySpeed:P=3,onChange:S,...R}=e,{className:g,style:v}=B(R),h=useRef(null),b=P/(P>=1e3?1e3:1),N=useCarousel({total:t.length,initialIndex:i,loop:s,useKeys:f,useWheel:c,onChange:O=>{h.current?.setPage({id:O+1,label:O+1}),h.current?.setProgress(0),S?.(O);}}),{pause:F,resume:k,reset:A}=useTimer({duration:b,autoStart:x===true,onProgress:O=>{x===true&&h.current?.setProgress(1-O);},onExpired:()=>{x===true&&N.next(),A();}}),L={...v,"--carousel-spacing":`${l}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${u}px`,"--carousel-scale-step":p,"--active-index":N.index,"--carousel-transition":`var(--${y})`};return jsxs(m,{ref:r,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${g}`.trim(),style:L,children:[jsx(m,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((O,M)=>{let _=M-N.index;if(a==="infinite"){let E=t.length;_=((_+E/2)%E+E)%E-E/2;}let I=M===N.index;return jsx(m,{onMouseEnter:()=>I&&F(),onMouseLeave:()=>I&&k(),className:`--carousel-item-wrapper abs ${I?"--is-active":""}`,style:{"--offset":_,zIndex:I?100:100-Math.abs(_),display:Math.abs(_)>5?"none":"flex"},children:n(O,M,N.index)},M)})}),T&&jsx(wt,{ref:h,itemCount:t.length,itemsPerPage:1,startPage:i+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:O=>N.goTo(+O.label-1),asDots:true,progressBar:true})]})}var Mc=forwardRef(Lc),Oc=Mc;var Wn=(r=>(r.Line="line",r))(Wn||{});var qn=forwardRef((e,r)=>{let{data:t,width:n,height:o,lineColor:s,strokeWidth:a=2,gradientStartColor:i,gradientEndColor:f,animated:c,animDuration:l=2,animDelay:d=0,padding:p=0,type:u,...y}=e,{className:T,style:x,rest:P}=B(y),S=useRef(null),R=useResizeObserver(S.current?.parentElement||S),g=typeof n=="number"?n:R.width,v=typeof o=="number"?o:R.height,h={width:g,height:v},b=useId(),{pathD:N,areaPathD:F}=useLineChart(t,h,p+(a||2)),k=useRef(null),A=useRef(null),[L,O]=useState(0),[M,_]=useState(0);return useEffect(()=>{c&&(k.current&&O(k.current.getTotalLength()),A.current&&_(A.current.getTotalLength()));},[c,N,F,g,v]),jsx(m,{ref:S,as:`--chart --${u||"line"}-chart ${T}`.trim(),style:{...x,width:n,height:o},...P,children:g>0&&v>0&&jsxs("svg",{viewBox:`0 0 ${g} ${v}`,preserveAspectRatio:"xMidYMid meet",children:[jsx("defs",{children:jsxs("linearGradient",{id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopColor:i}),jsx("stop",{offset:"100%",stopColor:f})]})}),jsx("path",{ref:A,d:F,fill:`url(#${b})`,stroke:"none",style:c?{strokeDasharray:M,strokeDashoffset:M}:{},children:c&&jsx("animate",{attributeName:"stroke-dashoffset",from:M,to:"0",dur:`${l||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsx("path",{ref:k,d:N,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:c?{strokeDasharray:L,strokeDashoffset:L}:{},children:c&&jsx("animate",{attributeName:"stroke-dashoffset",from:L,to:"0",dur:`${l||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});qn.displayName="Zuz.Chart";var Fc=qn;var Xn=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(Xn||{}),Yn=(c=>(c.Image="img",c.Video="vid",c.Audio="audio",c.Link="link",c.Document="doc",c.Location="loc",c.Contact="contact",c.Event="event",c.Poll="poll",c))(Yn||{});var jn=forwardRef((e,r)=>{let{text:t,media:n,side:o="me",status:s=1,timeStamp:a=Date.now(),arrow:i=true,...f}=e,{className:c,style:l,rest:d}=B(f);return jsx(m,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxs(m,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${i==true?"--b-arrow":""} ${c}`.trim(),style:{...l},...d,children:[t&&jsx(Z,{className:"--bubble-text",children:t}),n?n.type=="audio"?jsxs(m,{as:"flex aic --bubble-audio",children:[jsx(ie,{className:"--bm-action",children:V.play}),jsx(qe,{progress:.7}),jsx(Z,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsx(m,{as:"--bubble-image",children:jsx(je,{src:n.source})}):null:null,jsxs(m,{as:"flex aie jce --bubble-stats",children:[jsx(Z,{className:"--bubble-stamp tar",children:timeSince(a)}),o=="me"&&jsx(ie,{className:`--bubble-status --bs-${s}`,children:s==0?V.pending:s==1?V.done:s==2?V.doneAll:V.doneAll})]})]})})});jn.displayName="Zuz.Bubble";var Kc=jn;var Qn=forwardRef((e,r)=>{let{style:t,className:n,rest:o}=B(e);return jsx("label",{ref:r,style:t,className:n,...o})});Qn.displayName="Zuz.Label";var Ct=Qn;var es=({ref:e,...r})=>{let {name:t,required:n,type:o,value:s,size:a,variant:i,checked:f,disabled:c,onSwitch:l,...d}=r,p=He(),u=!!(t&&p.values);u?p.errors?.[t]:null;let T=u?p.values?.[t]:void 0,[x,P]=useState(f||false),S=useRef(null),{variant:R}=J(true),g=useMemo(()=>u&&T!=null?typeof T=="string"?T.toLowerCase()!=="false"&&T!=="":!!T:x,[T,x,u]);useEffect(()=>{S.current&&S.current.checked!==g&&(S.current.checked=g);},[g]),useEffect(()=>{f!==void 0&&P(f);},[f]);let v=h=>{let b=!!h;u&&p.setFieldValue?.(t,b),P(b),l?.(b,s||"cb");};return useImperativeHandle(e,()=>({setChecked(h,b=true){v(h);},toggle(h=true){v(!g);}})),jsxs(Ct,{"aria-hidden":c,className:[`--${(o||Ve.Default).toLowerCase()}`,`${!o||o===Ve.Default?"--checkbox":"--switch"}`,`--${i||R||G.Small}`,`flex aic jcc ${g?"is-checked":""} rel`,`${c?"--disabled":""}`].join(" ").trim(),...d,children:[(!o||o==Ve.Default)&&V.check,jsx(ue,{ref:h=>{S.current=h,e&&(e.current=h);},defaultChecked:g,type:"checkbox",className:"abs",name:t,required:n||false,onChange:h=>{h.stopPropagation(),v(h.target.checked);},disabled:c})]})};es.displayName="Zuz.CheckBox";var Tt=es;var tm=({ref:e,...r})=>{let{code:t,copy:n,lang:o="tsx",showLines:s=false,highlight:a="",as:i,fx:f,...c}=r,l=useRef(null),{className:d,style:p,rest:u}=B({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${i}`,fx:f},l),y=useMemo(()=>{let x=new Set;return a.split(",").forEach(P=>{if(P.includes("-")){let[S,R]=P.split("-").map(Number);for(let g=S;g<=R;g++)x.add(g);}else P&&x.add(Number(P));}),x},[a]),T=useMemo(()=>{let x=t.split(`
9
- `);for(;x.length>0&&x[0].trim()==="";)x.shift();for(;x.length>0&&x[x.length-1].trim()==="";)x.pop();let P=x[0]?.match(/^\s*/)?.[0].length||0,S=x.map(g=>{let v=g.match(/^\s*/)?.[0].length||0,h=Math.min(v,P);return g.slice(h)}),R=[{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((g,v)=>{let h=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),b=y.has(v+1);if(o!="plain"){let N=[];R.forEach(F=>{h=h.replace(F.re,k=>{let A=`ZUZ_ID_${N.length}_ZUZ`;return N.push(`<span class="--token-${F.name}">${k}</span>`),A});});for(let F=N.length-1;F>=0;F--)h=h.replace(`ZUZ_ID_${F}_ZUZ`,N[F]);}return `<div class="--code-line ${s==true?"--with-ln":""} ${b?"--is-highlighted":""}">
8
+ document.documentElement.style.colorScheme = theme;`}}),jsx(No,{children:e})]})},zr=(e,r)=>{if(ti)return;let t;try{t=localStorage.getItem(e)||void 0;}catch{}return t||r};var _r=({ref:e,...r})=>{let{style:t,...n}=r,{style:o,className:s,rest:a}=B(n);return jsx("span",{ref:e,style:t,className:s,...a})};_r.displayName="Zuz.Span";var me=_r;var Zr=forwardRef((e,r)=>{let{name:t,pathCount:n,variant:o,color:s,size:a,...l}=e,{variant:f}=Q(true),{className:c,style:i,rest:d}=B(l);return jsx("div",{style:{color:s,...i,...a?{fontSize:a}:{}},className:`icon-${t} --icon --${o||f||q.Small} ${c}`.trim(),ref:r,...d,children:Array(n||0).fill(0).map((u,m)=>jsx(me,{className:`path${m+1}`},`${t}-layer-${m}`))})});Zr.displayName="Zuz.Icon";var ee=Zr;var be={Simple:"SIMPLE",Roller:"ROLLER",Wave:"Wave"};var Wr=e=>{let{type:r,variant:t,color:n,...o}=e,{className:s,style:a,rest:l}=B(o),{spinner:f}=Q(true),c=()=>{switch(r||f?.type||be.Simple){case be.Simple:return null;case be.Wave:return jsxs(Fragment$1,{children:[jsx(p,{as:"--bar --bar1"}),jsx(p,{as:"--bar --bar2"}),jsx(p,{as:"--bar --bar3"})]});case be.Roller:return null}};return jsx(p,{className:`${s} --spinner --${(r||f?.type||be.Simple).toLowerCase()} --${t||f?.variant||q.Small}`.trim(),style:{...a},...l,children:c()})};Wr.displayName="Zuz.Spinner";var Ce=Wr;var Kt={Loading:"loading",Normal:"normal"};var Ur=({ref:e,...r})=>{let{reset:t,kind:n="solid",variant:o,icon:s,iconSize:a,children:l,withLabel:f,spinner:c,state:i,disabled:d,...u}=r,{style:m,className:h,rest:T}=B(u),{variant:x}=Q(true);return jsxs("button",{className:removeDuplicateWords(`--button --${n} --${o||x} flex aic ${t?"":"jcc"} ${s?"--with-icon":""} ${h}`).trim().replace(/\s+/g," "),style:m,ref:e,disabled:i==Kt.Loading||r.skeleton?.enabled||d,...T,children:[i==Kt.Loading&&jsx(Ce,{variant:o||x,type:c||be.Simple}),(!i||i==Kt.Normal)&&jsxs(Fragment$1,{children:[s&&jsx(ee,{variant:a,name:s}),f===true?jsx(me,{children:l}):l]})]})};Ur.displayName="Zuz.Button";var _=Ur;var qr=({ref:e,...r})=>{let{h:t,html:n,children:o,lines:s,tfx:a,delay:l=0,duration:f=.5,stagger:c=.05,repeat:i=true,reveal:d=false,hover:u=false,...m}=r,{style:h,className:T,rest:x}=B(m),P=useRef(null),[S,R]=useState(false),[g]=useIntersectionObserver([P],{threshold:[1]}),v=useMemo(()=>{if(h?.opacity!==void 0)return h.opacity;if(typeof r.as=="string"){let $=r.as.match(/opacity:([\d.]+)/);if($)return $[1]}return 1},[r.as,h?.opacity]),y=useMemo(()=>a?u?S:d?g===1:true:false,[a,u,S,d,g]);useEffect(()=>{e&&(typeof e=="function"?e(P.current):e.current=P.current);},[e]);let b=`h${r.h||1}`,N=useMemo(()=>typeof o=="string"?o:Array.isArray(o)&&o.length===1&&typeof o[0]=="string"?o[0]:null,[o]),H=useMemo(()=>{let $=Array.isArray(r.as)?r.as.join(" "):r.as||"";return typeof $=="string"&&$.includes("text-clip")},[r.as]);useLayoutEffect(()=>{if(!H||!P.current||N===null)return;let $=P.current,M=0,O=0,z=()=>{let k=$.getBoundingClientRect(),X=getComputedStyle($).backgroundImage,Y=k.width;$.querySelectorAll(".--fx-char").forEach(F=>{let W=F.getBoundingClientRect().left-k.left;F.style.backgroundImage=X,F.style.backgroundRepeat="no-repeat",F.style.backgroundSize=`${Y}px 100%`,F.style.backgroundPosition=`-${W}px 0`,F.style.backgroundClip="text",F.style.webkitBackgroundClip="text",F.style.color="transparent";});},Z=()=>{cancelAnimationFrame(M),cancelAnimationFrame(O),M=requestAnimationFrame(()=>{O=requestAnimationFrame(z);});};Z();let I=new ResizeObserver(Z);return I.observe($),typeof document<"u"&&"fonts"in document&&document.fonts?.ready.then(Z),window.addEventListener("resize",Z),()=>{cancelAnimationFrame(M),cancelAnimationFrame(O),I.disconnect(),window.removeEventListener("resize",Z);}},[H,N,a,y]);let E=useMemo(()=>n?jsx(me,{dangerouslySetInnerHTML:{__html:n}}):a&&N!==null?N.split("").map(($,M)=>{let O=$===" ",Z=["typewriter","reveal","fog","slide","pop"].includes(a)?"1":i?"infinite":"1";return jsx(me,{"data-char":$,className:`--fx-char -fx ${y?`--fx-${a}`:""}`,style:{"--delay":`${l+M*c}s`,"--duration":`${f}s`,"--iteration":Z,"--target-opacity":v,display:O?"inline":"inline-block",whiteSpace:"pre",opacity:!y&&a==="typewriter"?0:void 0},children:$},M)}):o,[o,n,a,N,y,l,c,f,i]);return jsx(b,{ref:P,onMouseEnter:()=>u&&R(true),onMouseLeave:()=>u&&R(false),style:a?{...h,display:a?"flex":h?.display,flexWrap:a?"wrap":h?.flexWrap,opacity:a&&!y?0:a?1:h?.opacity,transition:a?"opacity 0.4s ease":void 0}:h,className:`${T} ${a?"--text-fx -fx":""}`.trim(),...x,children:E})};qr.displayName="Zuz.Text";var K=qr;var hi=e=>{let{label:r,labelColor:t,icon:n,iconColor:o,index:s,className:a,onSelect:l}=e;return r=="-"?jsx(p,{className:"--line"}):jsxs(_,{reset:true,onClick:f=>l?.(e),className:`--item ${a||""}`.trim(),children:[jsx(p,{as:"--icon",children:jsx(ee,{name:n,className:"--ico",style:o?{color:o}:{}})}),jsx(K,{className:"--lbl flex aic",style:t?{color:t}:{},children:r})]})},Xr=hi;var Qr=({ref:e,...r})=>{let{id:t,as:n,fx:o,offsetX:s,offsetY:a,parent:l,event:f,arrow:c,when:i,items:d,header:u,footer:m,origin:h=vt.TopRight,...T}=r,[x,P]=useState(false),[S,R]=useState(d||[]),{position:g,targetRef:v,calculatedAnchor:y}=useAnchorPosition(l?.current,f,{offsetX:s,offsetY:a,preferredAnchor:h}),N=l&&g.top>l.current.getBoundingClientRect().bottom?"--arrow-top":"--arrow-bottom",H=useMemo(()=>{let Z=y.toLowerCase();return Z.includes("left")?"--arrow-left":Z.includes("right")?"--arrow-right":"--arrow-center"},[y]),E=g.top!==0||g.left!==0;useEffect(()=>{i&&E?P(true):i||P(false);},[i,E]);let{className:$,style:M,rest:O}=B(T),z=xe({...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&&E});return jsxs(p,{ref:v,className:`--contextmenu ${c||l!=null?`--has-arrow ${N} ${H}`:""} abs flex cols ${$}`.trim(),"aria-hidden":!x,style:{...M,...z.style,top:g.top,left:g.left,visibility:E?"visible":"hidden",transformOrigin:y},...O,children:[typeof u=="function"?createElement(u):u,S.map((Z,I)=>jsx(Xr,{...Z,index:I},`context-${Z.label.toLowerCase()}-${I}`)),typeof m=="function"?createElement(m):m]})};Qr.displayName="Zuz.ContextMenu";var ko=Qr;var Jr=forwardRef((e,r)=>{let{children:t,fx:n,when:o,fxDelay:s,fxStep:a,classToIgnore:l,...f}=e,c=Q(true),i=useDelayed(),d=n||c?.group?.fx,u=s||c?.group?.fxDelay,m=a||c?.group?.fxStep,h=l||c?.group?.classToIgnore||"-fx",T=useMemo(()=>d?addPropsToChildren(t,x=>{if(x.type===Fragment)return false;let P=x.props||{},S="fx"in P,R="tfx"in P,g=P.as?Array.isArray(P.as)?P.as.join(" "):P.as:P.className||"";return !(typeof g=="string"&&g.includes(h))&&(!S||R)},(x,P)=>{let S=(u??0)+x*(m??.1),R=P.props||{};return "tfx"in R?{delay:(R.delay??0)+S}:{fx:{...d,delay:S,when:o??(n?.when||i)}}}):t,[t,o,i,d,u,m,h,n]);return jsx(p,{className:"--group",ref:r,...f,children:T})});Jr.displayName="Zuz.Group";var Lo=Jr;var tn=forwardRef((e,r)=>{let{message:t,spinner:n,spinnerSize:o,color:s,when:a,hideMessage:l,...f}=e,{className:c,style:i,rest:d}=B(f),{spinner:u}=Q(true);return "when"in e&&e.when==false?null:jsxs(Lo,{fx:{transition:j.SlideInBottom,curve:te.Liquid,duration:.5},fxDelay:.1,fxStep:.05,className:`--cover flex aic jcc cols abs fill nope nous ${c}`.trim(),style:{...i,backgroundColor:"var(--cover-bg)"},...d,children:[jsx(Ce,{variant:o||u?.variant||q.Small,type:n||u?.type||be.Simple}),!l&&jsx(K,{className:"--label",tfx:"fade",style:{color:"var(--cover-label)"},children:t||"loading"})]})});tn.displayName="Zuz.Cover";var Me=tn;var Mo=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}},Be=new Mo;var on=forwardRef((e,r)=>{let{when:t,...n}=e;return jsx(p,{ref:r,"aria-hidden":!t,className:"--overlay fixed fill",fx:{transition:j.FadeIn,when:t},...n})});on.displayName="Zuz.Overlay";var je=on;var Mi=({action:e,render:r=true,message:t=""})=>jsx(p,{as:`--body flex aic rel ${e?"":"--no-action"}`.trim(),children:r?t:null}),rn=Mi;var Vi=({action:e,actionPosition:r,dialogID:t,variant:n})=>jsx(p,{as:`--footer flex aic rel ${r?r==Mr.Center?"jcc":"":"jce"}`.trim(),children:e.map((o,s)=>jsx(_,{variant:n,onClick:a=>o.handler?o.handler():o.onClick?o.onClick():console.log("onClick Handler missing"),as:"--action",children:o.label},`dialog-${t}-action-${o.key}`))}),sn=Vi;var Di={colorSchemeLight: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:[jsx("circle",{cx:"12",cy:"12",r:"5"}),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: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:[jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark: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:jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[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"}),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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[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"}),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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[Ne.Info]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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"})}),[Ne.Warning]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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"})}),[Ne.Error]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[Ne.Success]:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[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"}),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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),volumeHigh:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[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"}),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:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children: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:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[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"}),jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},V=Di;var Hi=({title:e="Alert",onClose:r})=>jsxs(p,{as:"--head flex aic rel",children:[jsx(p,{as:`--${e?"title":"dot"} flex aic jcc rel`,children:e}),jsx(_,{onClick:t=>r(),className:"--closer abs center-v",children:V.close})]}),ln=Hi;var pn=({ref:e,...r})=>{let{index:t,id:n,title:o,message:s,transition:a,curve:l,speed:f,type:c,action:i,actionPosition:d,spinner:u,loadingMessage:m,variant:h,inBackground:T,forceClose:x,forceLoading:P,onClose:S,onShow:R,onHide:g,...v}=r,y=useMemo(()=>uuid(12),[]),[b,N]=useState(o||""),[H,E]=useState(s||""),[$,M]=useState(c||at.Dialog),[O,z]=useState(false),[Z,I]=useState(true),[k,X]=useState(i||null),[Y,A]=useState(false),{variant:F,spinner:G,dialog:W}=Q(true),ne=h||W?.variant||F||q.Small,{style:J,className:ae,rest:pe}=B(v),he=useRef(null),ie=xe({when:O,duration:f||W?.speed||.3,delay:W?.delay||.1,transition:a||W?.transition||j.SlideInBottom,curve:l||W?.curve||te.EaseInOut,watch:["scale","filter","transform"]}),ce=()=>{z(false),S(n);},U=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Be.isTop(ce)&&ce();}}],[O]);useShortcuts(U),useEffect(()=>{M(at.Dialog),E(s),N(b),k&&X(k.reduce((le,fe)=>(le.push({...fe,key:fe.key||uuid(12)}),le),[])),z(true),setTimeout(()=>R?R():()=>{},500);},[]),useEffect(()=>{x&&ce();},[x]),useEffect(()=>{P!=null&&A(P);},[P]),useEffect(()=>(O?Be.push(ce):Be.pop(ce),()=>Be.pop(ce)),[O]);let oe=useMemo(()=>1e4+t*10,[t]);return jsxs(Fragment$1,{children:[jsx(je,{style:{zIndex:oe},when:O}),jsxs(p,{as:`--dialog --${(c??at.Default).toLowerCase()} ${O?"--visible":""} ${ae} fixed abc`.trim(),style:{...ie.style,zIndex:oe+1,pointerEvents:T==true?"none":"auto",...T==true?{scale:"0.92",filter:"blur(2px)"}:{}},...pe,ref:he,children:[jsx(ln,{title:b,onClose:ce}),jsx(rn,{message:H,render:Z,action:k}),k&&k.length>0&&jsx(sn,{variant:ne,action:k,dialogID:y,actionPosition:d}),jsx(Me,{when:Y,spinner:u||W?.spinner||G?.type||be.Simple,message:m||W?.loadingMessage})]})]})};pn.displayName="Zuz.Dialog";var Vo=pn;var un=forwardRef((e,r)=>{let{speed:t,smooth:n=false,breakpoints:o={},style:s,...a}=e,{rootRef:l,containerRef:f,thumbY:c,thumbX:i,onScrollY:d,onScrollX:u}=useScrollbar(t||1,o,n),{style:m,className:h,rest:T}=B(a);return useEffect(()=>{let x=f.current;if(!x)return;let P=()=>{window.dispatchEvent(new Event("resize"));},S=R=>{let g=R.target;if(g.closest(".--allow-scroll")){let y=g.closest(".--allow-scroll"),{scrollTop:b,scrollHeight:N,clientHeight:H}=y,E=R.deltaY<0,$=R.deltaY>0;(E&&b>0||$&&b+H<N)&&R.stopPropagation();}};return x.addEventListener("scroll",P),x.addEventListener("wheel",S,{passive:true}),()=>{x.removeEventListener("scroll",P),x.removeEventListener("wheel",S);}},[f]),jsxs(p,{ref:l,className:h.trim(),as:"--scrollview rel",children:[jsx(p,{as:`--scroll-content ${h}`.trim(),ref:f,style:s||{},children:T.children}),jsx(p,{as:"--scroll-track --track-y --abs",children:jsx(p,{as:"--scroll-thumb --abs",ref:c,onMouseDown:d})}),jsx(p,{as:"--scroll-track --track-x --abs",children:jsx(p,{as:"--scroll-thumb --abs",ref:i,onMouseDown:u})})]})});un.displayName="Zuz.ScrollView";var Do=un;var fn=({ref:e,...r})=>{let{id:t,index:n,from:o,speed:s,children:a,margin:l,animation:f,prerender:c,inBackground:i,forceClose:d,forceLoading:u,onClose:m,...h}=r,{drawer:T}=Q(true),[x,P]=useState(a),[S,R]=useState(false),[g,v]=useState(c??(T?.prerender||true)),[y,b]=useState(false),N=()=>{R(false),m?.(t??-1);},{className:H,style:E,rest:$}=B(h),M=useMemo(()=>[{keys:[KeyCode.Escape],callback:()=>{Be.isTop(N)&&N();}}],[S]);useShortcuts(M),useEffect(()=>{P(a);},[a]),useEffect(()=>(S?Be.push(N):Be.pop(N),()=>Be.pop(N)),[S]),useEffect(()=>{R(true);},[]),useEffect(()=>{d&&N();},[d]),useEffect(()=>{u!=null&&b(u);},[u]);let O=o||T?.from||we.Left,z=useMemo(()=>{switch(O){case we.Left:return {from:{x:"-100vw"},to:{x:0}};case we.Right:return {from:{x:"100vw"},to:{x:0}};case we.Top:return {from:{y:"-100vh"},to:{y:0}};case we.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vw"},to:{x:0}}}},[o,T?.from]),Z=xe({from:{...z.from,opacity:0},to:{...z.to,opacity:1},when:S,curve:f||T?.animation||te.EaseInOut,duration:s||T?.speed||.5,watch:["scale","filter"]}),I=useMemo(()=>1e4+(n||1)*10,[n]);return jsxs(Fragment$1,{children:[jsx(je,{onClick:k=>{S&&N();},when:S,style:{zIndex:I}}),jsxs(p,{ref:e,"aria-hidden":!S,className:`--drawer flex cols ${H} --${O.toLowerCase()} fixed`,style:{...E,...Z.style,"--m":`${l||T?.margin||0}px`,zIndex:I+1,pointerEvents:i==true?"none":"auto",...i==true?{scale:"0.92",filter:"blur(2px)"}:{}},...$,children:[o==we.Top||o==we.Bottom?jsx(p,{className:"--handle"}):null,jsx(_,{as:"--close-drawer --abs",onClick:N,children:V.close}),jsxs(Do,{as:"rel",children:[g||S?x:null,jsx(Me,{when:y})]})]})]})};fn.displayName="Zuz.Drawer";var $o=fn;var gn=forwardRef((e,r)=>{let{progress:t,type:n,animated:o,...s}=e,a=useRef(null);useImperativeHandle(r,()=>({setProgress:i=>{a.current.style.width=`${i*100}%`,a.current.setAttribute("data-value",i+"");},getProgress:()=>+(a.current.getAttribute("data-value")||0)}),[]),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:l,style:f,rest:c}=B(s);return jsx(p,{className:`--progress ${o?"--animated":""} flex rel ${l}`.trim(),style:f,...c,children:jsx(p,{ref:a,className:"--bar rel"})})});gn.displayName="Zuz.ProgressBar";var Je=gn;var qt=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(qt||{}),Xt=(a=>(a.TopLeft="TopLeft",a.TopCenter="TopCenter",a.TopRight="TopRight",a.BottomLeft="BottomLeft",a.BottomCenter="BottomCenter",a.BottomRight="BottomRight",a))(Xt||{}),hn=(t=>(t.Stack="stack",t.Individual="individual",t))(hn||{}),yn={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var el=e=>{let{index:r,id:t,type:n,icon:o,busy:s,width:a,title:l,message:f,duration:c,sticky:i=false,actions:d=[],position:u,style:m,isHovered:h,total:T,progress:x,progressValue:P,forceClose:S,variant:R,onClick:g,onClose:v}=e,[y,b]=useState(false),[N,H]=useState(false),{toast:E}=Q(true),$=typeof P=="number",M=$?Math.max(0,Math.min(1,P)):void 0,O=N||S,z=u??E?.position??"TopCenter",Z=n??E?.type??"default",I=m??E?.style??"stack",k=c??E?.duration??4,X=x??E?.progress??false,Y=useRef(k*1e3),A=useRef(void 0),F=useRef(void 0),G=useRef(null),W=xe({when:y&&!O,duration:.3,transition:E?.transition||(z.includes("Top")?j.SlideInTop:z.includes("Bottom")?j.SlideInBottom:z.includes("Left")?j.SlideInLeft:j.SlideInRight),curve:E?.curve||te.EaseInOut,watch:["transform","opacity","scale","filter"]});useEffect(()=>{b(true);let U=oe=>{if(F.current!==void 0){let le=oe-F.current;if(!$&&!h&&!i&&!O&&(Y.current-=le,G.current)){let fe=Math.max(0,Y.current/(k*1e3)*100);G.current?.setProgress?.(fe/100);}}F.current=oe,Y.current<=0?H(true):A.current=requestAnimationFrame(U);};return A.current=requestAnimationFrame(U),()=>{A.current&&cancelAnimationFrame(A.current);}},[h,i,O,k]),useEffect(()=>{if(O){let U=setTimeout(()=>{v?.(t);},350);return ()=>clearTimeout(U)}},[O,t]);let ne=I==="stack",J=h?r*65:r*8,ae=h?1:Math.max(.85,1-r*.05),pe=h?1:Math.max(.4,1-r*.2),he=U=>{g?g(U):s!==true&&(!d||d.length===0)&&H(true);},ie=W.style.transform||"translate(0, 0)",ce=O?ie:`${ie} translateY(${z.includes("Top")?J:-J}px) scale(${ae})`;return jsxs(p,{onClick:he,as:`--snack --${O?"hidden":"visible"} --${R||E?.variant||q.Medium} --${Z} --${z.toLowerCase()} abs flex aic`,style:{...W.style,zIndex:1e3-r,pointerEvents:O?"none":"auto",opacity:O?W.style.opacity:pe,transform:ce,filter:!O&&ne&&!h&&r>0?"blur(1px)":"none",cursor:!d||d.length===0?"pointer":"default",transition:`${W.style.transition}, transform 0.3s ease, opacity 0.3s ease`},children:[jsxs(p,{as:"--ico flex aic jcc rel",children:[o?jsx(ee,{name:o}):jsx(p,{as:"--no-icon"}),s===true&&jsx(Ce,{as:"abs abc"})]}),jsxs(p,{as:"--meta flex cols",style:a?{width:a,minWidth:a,maxWidth:a}:void 0,children:[jsx(K,{as:"--tt",children:l||yn[n]}),jsx(K,{as:"--tm",children:f})]}),d&&d.length>0&&jsx(p,{as:"--actions flex gap:5",children:d.map((U,oe)=>jsx(_,{as:"--snack-btn bold",variant:q.XSmall,onClick:le=>{le.stopPropagation(),U.onClick(le);},children:U.label},oe))}),(X||$)&&jsx(Je,{as:"abs",progress:M,ref:G})]})},Fo=el;var Te=createContext(null),al=({ref:e,...r})=>{let n=useContext(Te)?.depth??0,[o,s]=useState(null),[a,l]=useState(null),[f,c]=useState(false),[i,d]=useState([]),u=useDelayed(),m=useRef(0),h=()=>++m.current,T=()=>{c(false),setTimeout(()=>l(null),200);};useImperativeHandle(e,()=>({add(g){let v=h(),y={id:v,...g};return d(b=>[...b,y]),v},openMenu(g){c(false),setTimeout(()=>{l({id:h(),type:"menu",props:g}),c(true);},16);},update(g,v){d(y=>y.map(b=>b.id!==g?b:{...b,props:{...b.props,...v}}));},remove(g){d(v=>v.map(y=>y.id===g?{...y,props:{...y.props,forceClose:true}}:y)),a?.id===g&&T();},loading(g,v){d(y=>y.map(b=>b.id===g?{...b,props:{...b.props,forceLoading:v}}:b)),a?.id===g&&T();},clear(g){d(i.filter(v=>v.type!=g));}})),useEffect(()=>{if(a&&f){let g=()=>T();return document.addEventListener("click",g),()=>document.removeEventListener("click",g)}},[a,f,T]);let x=g=>{setTimeout(()=>{d(v=>v.filter(y=>y.id!==g)),a?.id===g&&l(null);},250);},P=useMemo(()=>[...i.filter(g=>g.type!="toast")],[i]);if(!u)return null;let S=i.filter(g=>g.type=="toast").reverse(),R=Object.values(Xt);return createPortal(jsxs(p,{as:"--zuz-layers-wrapper fixed fill nope",style:{zIndex:9999+n},children:[P.map((g,v)=>{let y=v<P.length-1;return g.type==="dialog"?jsx(Vo,{onClose:x,index:v,id:g.id,...g.props,inBackground:y},`layer-${g.type}-${g.id}`):g.type==="drawer"?jsx($o,{onClose:x,index:v,id:g.id,...g.props,inBackground:y},`layer-${g.type}-${g.id}`):null}),R.map(g=>{let v=S.filter(y=>(y.props.position||"TopCenter")===g);return v.length===0?null:jsx(p,{onMouseEnter:()=>s(g),onMouseLeave:()=>s(null),as:`--toast-container fixed --${g.toLowerCase()} flex cols`,style:{pointerEvents:"auto",zIndex:"var(--max-z-index)"},children:v.map((y,b)=>jsx(Fo,{index:b,total:v.length,isHovered:o===g,onClose:x,id:y.id,...y.props},y.id))},g)}),a&&jsx(p,{as:"--zuz-layer-menus fixed fill nope",style:{zIndex:"var(--max-z-index)"},children:jsx(ko,{onClose:T,when:f,...a.props},`menu-${a.id}`)})]}),document.body)},il=({children:e})=>{let r=useContext(Te),t=r?r.depth+1:0,n=useRef(null),o=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 jsxs(Te.Provider,{value:o,children:[e,jsx(al,{ref:n})]})},No=il;var cl=()=>{let e=useContext(Te);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:l,transition:f,curve:c,arrow:i,duration:d,header:u,footer:m})=>{e.openMenu({fx:{transition:f,curve:c,duration:d},parent:n,items:o,origin:s||vt.TopCenter,offsetX:a,offsetY:l,arrow:i,header:u,footer:m});},hide:e.clear}},ml=cl;var ul=()=>{let e=useContext(Te);if(!e)throw new Error("useDialog must be used inside <LayersProvider>");let r=()=>e.clear("dialog"),t=s=>e.remove(s),n=(s,a)=>e.loading(s,a);return {clearAll:r,show:s=>{let a=e.add({type:"dialog",props:{...s,type:at.Dialog}});return {id:a,setLoading:l=>n(a,l),hide:()=>t(a)}},hide:t}},fl=ul;var gl=()=>{let e=useContext(Te);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:l=>n(a,l),close:()=>t(a)}};return {clearAll:r,open:s=>o({children:s}),right:s=>o({children:s,from:we.Right}),left:s=>o({children:s,from:we.Left}),top:s=>o({children:s,from:we.Top}),bottom:s=>o({children:s,from:we.Bottom}),close:t}},hl=gl;var xl=(e,r,t={})=>{let[n,o]=useState(null),[s,a]=useState(false),{duration:l=.25,curve:f=te.EaseOutBack,borderRadius:c={from:40,to:24},targetWidth:i=320}=t;return useLayoutEffect(()=>{r&&e.current?(o(e.current.getBoundingClientRect()),a(true)):r||a(false);},[r,e]),{style:xe({from:{opacity:0,width:n?.width,height:n?.height,borderRadius:c.from},to:{opacity:1,width:i,height:"auto",borderRadius:c.to},curve:f,duration:l,when:s&&r}).style,isMeasured:s,sourceRect:n}},bl=xl;var Cl=(e,r={})=>{let{offset:t=8,direction:n="bottom",container:o=null,triggerRef:s=null}=r,a=useRef(null),l=useCallback(()=>{let f=e.current;if(!f)return;let c=s?.current||f.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=f.getBoundingClientRect(),d=c.getBoundingClientRect(),u,m;o?(u=o.getBoundingClientRect(),m="absolute"):(window.getComputedStyle(f).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}),f.style.position!==m&&(f.style.position=m),a.current=m;let x=0,P=0;switch(n){case "top":x=d.top-i.height-t,P=d.left,x<u.top&&d.bottom+i.height+t<=u.bottom&&(x=d.bottom+t);break;case "bottom":x=d.bottom+t,P=d.left,x+i.height>u.bottom&&d.top-i.height-t>=u.top&&(x=d.top-i.height-t);break;case "left":x=d.top,P=d.left-i.width-t,P<u.left&&d.right+i.width+t<=u.right&&(P=d.right+t);break;case "right":x=d.top,P=d.right+t,P+i.width>u.right&&d.left-i.width-t>=u.left&&(P=d.left-i.width-t);break}if(x=Math.max(u.top,Math.min(x,u.bottom-i.height)),P=Math.max(u.left,Math.min(P,u.right-i.width)),a.current==="fixed")f.style.top=`${x}px`,f.style.left=`${P}px`;else {let S;f.offsetParent?S=f.offsetParent.getBoundingClientRect():S={top:0,left:0};let R=x-S.top+window.scrollY,g=P-S.left+window.scrollX;f.style.top=`${R}px`,f.style.left=`${g}px`;}},[e,s,t,n,o]);return useEffect(()=>{let f=e.current;if(!f)return;let c=s?.current||f.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=new ResizeObserver(l);return i.observe(f),c&&i.observe(c),l(),window.addEventListener("resize",l),window.addEventListener("scroll",l,true),()=>{i.disconnect(),c&&i.disconnect(),window.removeEventListener("resize",l),window.removeEventListener("scroll",l,true);}},[e,n,t,o,s]),{postion:a.current,reposition:l}},Rt=Cl;var Pl=()=>{let e=useContext(Te);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(m,h)=>e.add({type:"toast",props:{...h,type:m}}),t=()=>e.clear("toast"),n=m=>e.remove(m),o=(m,h)=>e.update(m,h),s=m=>({id:m,update:h=>o(m,h),setType:h=>o(m,{type:h}),setProgress:h=>o(m,{progress:true,progressValue:h}),setBusy:h=>o(m,{busy:h}),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)),l=m=>s(r("success",m)),f=m=>s(r("error",m)),c=m=>s(r("warn",m)),i=m=>s(r("promise",m)),d=(m,h,T)=>{let x=r(m,{...h,sticky:h.sticky??false,actions:[{label:T?.label||"Ok",onClick:P=>{T?.onClick?.(P),n(x);}}]});return s(x)},u=(m,h,T,x)=>{let P=r(m,{...h,sticky:true,actions:[{label:T?.label||"Ok",onClick:S=>{T?.onClick?.(S),(T?.hide??false)===true&&n(P);}},{label:x?.label||"Cancel",onClick:S=>{x?.onClick?.(S),(x?.hide??true)===true&&n(P);}}]});return s(P)};return {show:a,hide:n,promise:i,clearAll:t,ok:(m,h)=>d("default",m,h),success:(m,h)=>h?d("success",m,h):l(m),error:(m,h)=>h?d("error",m,h):f(m),confirm:(m,h,T)=>u("default",m,h,T),warn:(m,h)=>h?d("warn",m,h):c(m),succes:(m,h)=>h?d("success",m,h):l(m)}},Rl=Pl;var Nl=()=>{let e=useContext(Te);if(!e)throw new Error("useToast must be used inside <LayersProvider>");let r=(c,i)=>e.add({type:"toast",props:{...i,type:c}});return {show:(c,i,d,u)=>r("default",{title:c,message:i,icon:d,duration:u}),hide:c=>e.remove(c),success:(c,i,d,u)=>r("success",{title:c,message:i,icon:d,duration:u}),error:(c,i,d,u)=>r("error",{title:c,message:i,icon:d,duration:u}),warn:(c,i,d,u)=>r("warn",{title:c,message:i,icon:d,duration:u}),promise:(c,i,d,u)=>r("promise",{title:c,message:i,icon:d,duration:u}),clearAll:()=>e.clear("toast")}},_o=Nl;var Pn=({ref:e,style:r,...t})=>{let n=useRef(null),o=useMemo(()=>e&&typeof e!="function"&&e.current?e:n,[e]),{style:s,className:a,rest:l}=B(t,o);return jsx("div",{ref:e||n,style:{...s,...r||{}},className:a,...l})};Pn.displayName="Zuz.Box";var p=Pn;var In=forwardRef((e,r)=>{let{title:t,message:n,...o}=e,[s,a]=useState(false);return jsxs(p,{className:"--accordion flex cols",...o,children:[jsxs(_,{onClick:l=>a(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsx(K,{className:"--label flex",children:t}),jsx(p,{className:"--arrow flex",children:s?V.arrowUp:V.arrowDown})]}),s&&jsx(p,{className:"--detail",children:n})]})});In.displayName="Zuz.Accordion";var Ol=In;var Vl=({label:e,icon:r,onClick:t,idx:n,selected:o})=>jsx(_,{onClick:t,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${n}`),className:`--action ${o?"--selected":""} aic jcc rel`.trim(),children:typeof r=="string"?jsx(ee,{name:r}):r}),En=Vl;var Bn=forwardRef((e,r)=>{let{items:t,name:n,selected:o,position:s,...a}=e,l=useRef(null),[f,c]=useState(o||t[0].tag||0),i=useCallback(({x,y:P})=>{if(l.current){let S=l.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${x-S.left}`),document.documentElement.style.setProperty("--tip-y",`${P-S.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),d=useCallback(()=>{l.current&&(l.current.removeEventListener("pointerleave",d),l.current.removeEventListener("pointermove",i),document.documentElement.style.setProperty("--tip-s","0"));},[]),u=useCallback(()=>{l.current&&(l.current.addEventListener("pointerleave",d),l.current.addEventListener("pointermove",i));},[]);useEffect(()=>{l.current&&(document.documentElement.style.setProperty("--tip-w",t.reduce((x,P)=>P.label.length>x.length?P.label:x,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${t.length}`),l.current?.addEventListener("pointerenter",u));},[]);let{className:m,style:h,rest:T}=B(a);return jsxs(p,{ref:l,style:h,className:[`--actionbar flex aic ${m}`,`${!s||s==ye.Auto?"rel":`--${s}`}`].join(" ").trim(),...T,children:[t.map((x,P)=>jsx(En,{selected:f===x.tag||o==P,...x,idx:P},`actionbar-action-${x.label.toLowerCase().replace(/\s+/g,"-")}`)),jsx(p,{className:"--tip abs",children:jsx(p,{className:"--track flex aic",children:t.map(({label:x})=>jsx(p,{className:"--lb",children:x},`tool-tip-${x.toLowerCase().replace(/\s+/g,"-")}`))})})]})});Bn.displayName="Zuz.ActionBar";var zl=Bn;var Ln=forwardRef((e,r)=>{let{type:t,icon:n,title:o,message:s,iconSize:a,...l}=e,{className:f,style:c,rest:i}=B(l);return jsxs(p,{className:`--alert --${t||Ne.Info} flex aic ${f}`.trim(),style:c,...i,children:[jsx(p,{className:`--icon icon-${n||"auto-matic"}`,style:a?{fontSize:a,width:a,height:a}:{},children:!n&&V[t||Ne.Info]}),jsxs(p,{className:"--meta flex cols",children:[jsx(K,{className:`--title ${s?"--tm":""}`,children:o||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsx(K,{className:"--message",h:2,children:s})]})]})});Ln.displayName="Zuz.Alert";var Kl=Ln;var Uo=createContext(null),qo=()=>{let e=useContext(Uo);return e?useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot):null},Xo=()=>useContext(Uo),_e=()=>{let e=Xo(),r=qo();return {...e,...r}},Vn=({children:e,initialValues:r={}})=>{let t=useRef({values:r,errors:{},touched:{}}),n=useRef(new Set(Object.keys(r))),o=useRef(new Set),s=useCallback(()=>t.current,[]),a=useCallback(c=>(o.current.add(c),()=>o.current.delete(c)),[]),l=()=>{o.current.forEach(c=>c());};useEffect(()=>{if(r&&Object.keys(r).length>0){let c=new Set(Object.keys(r)),i=[...n.current].filter(u=>!c.has(u)),d={...t.current.values};i.forEach(u=>delete d[u]),t.current={...t.current,values:{...d,...r}},n.current=c,l();}},[r]);let f=useMemo(()=>({subscribe:a,getSnapshot:s,setFieldValue:(c,i)=>{t.current.values[c]!==i&&(t.current={...t.current,values:{...t.current.values,[c]:i}},l());},deleteFieldValue:c=>{if(!(c in t.current.values))return;let{[c]:i,...d}=t.current.values;t.current={...t.current,values:d},l();},setFieldError:(c,i)=>{t.current={...t.current,errors:{...t.current.errors,[c]:i}},l();},reset:()=>{t.current={values:{},errors:{},touched:{}},l();}}),[]);return jsx(Uo.Provider,{value:f,children:e})};var Hn=({ref:e,...r})=>{let{variant:t,numeric:n,name:o,onConfirm:s,...a}=r,{style:l,className:f,rest:c}=B(a),{variant:i}=Q(true),d=useRef(null),u=_e(),m=o?u.errors?.[o]:null,h=o&&u.values&&u.setFieldValue,T=h?u.values?.[o]:void 0,x=useDebounce(S=>{h&&u.setFieldValue?.(o,S);},500),P=S=>{let R=S.currentTarget.value;n&&(R=R.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"),S.currentTarget.value=R),x(R),r.onInput?.(S);};return useEffect(()=>{d.current&&o&&T!==void 0&&d.current.value!==String(T)&&(d.current.value=String(T));},[T,o]),useEffect(()=>()=>{h&&u.deleteFieldValue?.(o);},[]),jsx("input",{name:o,className:`--input --${t||i} ${m?"--has-error":""} --flex ${f}`.trim(),style:l,defaultValue:T??r.defaultValue??"",onInput:P,onKeyDown:S=>{S.key=="Enter"&&s?.(S.currentTarget.value);},ref:S=>{d.current=S,typeof e=="function"?e(S):e&&(e.current=S);},...c})};Hn.displayName="Zuz.Input";var de=Hn;var $n=e=>{let{meta:r,children:t}=e,n=useDelayed(),{label:o,icon:s,...a}=isValidElement(r)?{}:r,{className:l,style:f,rest:c}=B({...a,...a.animate?{animate:{...a.animate,when:n}}:{}});return isValidElement(r)?jsx("li",{style:f,className:l,children:r}):jsxs("li",{style:f,className:l,...c,children:[t,typeof r=="string"?r:o]})};$n.displayName="Zuz.ListItem";var zn=$n;var _n=forwardRef((e,r)=>{let{items:t,variant:n,direction:o,seperator:s,ol:a,...l}=e,{className:f,style:c,rest:i}=B(l),d=a==true?"ol":"ul";return createElement(d,{className:`--list --${n||q.Small} flex ${o??"cols"} ${f}`.trim(),style:c,ref:r,...i,children:t.map((u,m,h)=>{let T=`${typeof u=="string"?`li-${String(u)}`:isValidElement(u)?`li-${u.key}`||`${m}-${MD5(u.toString())}`:u.label}-${m}`;return jsxs(Fragment,{children:[jsx(zn,{meta:u}),s&&h[m+1]?jsx("li",{className:"--list-seperator",children:s},`spt-${m+1}-${T}`):null]},T)})})});_n.displayName="Zuz.List";var tt=_n;var Zn=forwardRef((e,r)=>{let{fx:t,action:n,data:o,withStyle:s,onChange:a,...l}=e,{className:f}=B({as:s||""}),{style:c}=B(l),[i,d]=useState(false),[u,m]=useState(o||[]),h=useRef(null),T=useRef(null),x=useRef(null),P=useMemo(()=>l.name||uuid(12),[]),[S,R]=useState(null),[g,v]=useState(null),[y,b]=useState([]),H=useDebounce(I=>{I.target.value==""?(d(false),m([])):n&&I.target.value.trim()!=""&&withPost(n,{query:I.target.value}).then(k=>{"items"in k&&_$1(k.items).isArray()?(m(k.items),v(I.target.value),b(k.items)):console.error("Action Response should contain items array"),R(null);}).catch(k=>{R(null),m([]);});},250),E=()=>{if(T.current){let I=T.current.getBoundingClientRect(),k=window.innerHeight-I.bottom,X=I.top;if(x.current){let Y=x.current;k<Y.offsetHeight&&X>k?(Y.style.top="auto",Y.style.bottom=`${I.height}px`,Y.style.maxHeight=`${X-150}px`):(Y.style.top=`${I.height+5}px`,Y.style.bottom="auto",Y.style.maxHeight=`${k-150}px`);}}},$=I=>{if(u.length>0){if((I.key==="ArrowDown"||I.key==="ArrowUp")&&(I.preventDefault(),I.stopPropagation()),I.key==="Escape")R(null),d(false),m([]);else if(I.key==="ArrowDown")R(k=>{let X=k===null||k===u.length-1?0:k+1;return O(X),X});else if(I.key==="ArrowUp")R(k=>{let X=k===null||k===0?u.length-1:k-1;return O(X),X});else if(I.key==="Enter"&&S!==null){let k=u[S];h.current&&(h.current.value=k,d(false),m([]));}}},M=I=>{h.current&&(h.current.value=I,d(false),m([]));},O=I=>{let k=u[I];if(k&&h.current&&(h.current.value=k,h.current.setSelectionRange(k.length,k.length)),x.current){let Y=x.current.children[I];Y&&Y.scrollIntoView({block:"nearest"});}},z=I=>{T.current&&!T.current.contains(I.target)&&(d(false),m([]));},Z=()=>{h.current&&h.current.value===g&&(m(y),R(null),E());};return useEffect(()=>(window.addEventListener("resize",E),window.addEventListener("scroll",E,true),document.addEventListener("mousedown",z),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,true),document.removeEventListener("mousedown",z);}),[]),useEffect(()=>{E();},[u]),jsxs(p,{style:c,ref:T,className:`--autocomplete --${e.size||q.Small} flex aic rel ${f}`.trim(),children:[jsx(de,{ref:h,autoComplete:"off",onChange:H,onKeyDown:$,onFocus:Z,...l}),jsx(p,{className:"--arrow rel flex aic jcc",children:u.length>0?V.arrowUp:V.arrowDown}),u.length>0&&jsx(tt,{id:P,ref:x,className:"--suggestion-list flex cols abs",items:u.map((I,k)=>({label:I,onClick:X=>{X.preventDefault(),X.stopPropagation(),M(I);},className:S===k?"--current":"",animate:{transition:j.SlideInBottom,curve:te.EaseInOut,delay:clamp(.02*k,.02,.5)}}))})]})});Zn.displayName="Zuz.AutoComplete";var dc=Zn;var Wn=forwardRef((e,r)=>{let t=useRef(null),n=useMemo(()=>r&&typeof r!="function"&&r.current?r:t,[r]),{style:o,className:s,rest:a}=B(e,n);return !a.src||a.src==""?null:jsx("img",{ref:n,style:o,className:`${s} flex`,...a})});Wn.displayName="Zuz.Image";var ot=Wn;var Gn=forwardRef((e,r)=>{let{src:t,variant:n,type:o,crossOrigin:s,referrerPolicy:a,fx:l,as:f,alt:c,color:i,style:d,...u}=e,[m,h,T]=useImage(t??"",s,a),{className:x,style:P,rest:S}=B({fx:l,as:f});return jsx(p,{className:`--avatar --${n||q.Small} --${(o||Lr.Circle).toLowerCase()} rel flex aic jcc ${x}`.trim(),style:{background:i||"var(--avatar-bg, var(--primary))",...d,...P},...S,children:t?jsx(ot,{src:m,crossOrigin:s,referrerPolicy:a,...u}):jsx(K,{className:"--avatar-label",children:(c?c.charAt(0):"A").toUpperCase()})})});Gn.displayName="Zuz.Avatar";var wc=Gn;var Cc=({size:e=5,type:r="dead",label:t="",variant:n=q.Small,loading:o=false,spinner:s,...a})=>{let{style:l,className:f,rest:c}=B(a);return jsxs(p,{style:{..._$1(t).isEmpty()?{"--badge-size":e}:{},...l},as:`--badge --${n} --${r} rel flex aic jcc ${f}`.trim(),children:[jsx(p,{fx:{transition:j.FadeIn,curve:te.Liquid,duration:.5,when:o},as:"abs abc",children:jsx(Ce,{type:s})}),_$1(t).isEmpty()?jsx(p,{as:`--dot --${r}`}):jsx(K,{as:"--label",children:t})]})},Tc=Cc;var Ac=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>format(addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>addDays(new Date,1),getDateFormat:()=>format(addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let e=new Date,r=e.getDay();return addDays(e,(6-r)%7||6)},getDateFormat:()=>{let e=new Date,r=e.getDay();return format(addDays(e,(6-r)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>format(addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>format(addWeeks(new Date,1),"d MMM"),getDate:()=>addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>format(addWeeks(new Date,2),"d MMM"),getDate:()=>addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>format(addWeeks(new Date,4),"d MMM"),getDate:()=>addWeeks(new Date,4)}],$c=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)})},qn=forwardRef((e,r)=>{let{defaultValue:t,variant:n,onChange:o,...s}=e,{style:a,className:l,rest:f}=B(s),[c,i]=useState(t||new Date),d=startOfMonth(c),u=endOfMonth(c),m=startOfWeek(d),h=endOfWeek(u),T=useMemo(()=>eachDayOfInterval({start:m,end:h}),[m,h]),x=R=>{o?.(R),i(R);},P=()=>{i(R=>new Date(R.getFullYear(),R.getMonth()-1));},S=()=>{i(R=>new Date(R.getFullYear(),R.getMonth()+1));};return jsxs(p,{as:`--calendar flex --${n||"sm"} ${l}`,style:a,children:[jsx(p,{as:"--calendar-quick-select flex cols flex:1",children:$c(Ac).map(R=>{let g=R.getDate();return jsxs(_,{onClick:()=>x(g),as:["--calendar-quick-option flex aic gap:5"],children:[jsx(K,{as:"flex:1",children:R.label}),jsx(K,{as:"tar",children:R.getDateFormat()})]},`--dtp-option-label-${R.label}`)})}),jsxs(p,{as:"--calendar-selector flex cols flex:1",children:[jsxs(p,{as:"--calendar-head flex aic jcc gap:4",children:[jsx(K,{as:"flex:1 --calendar-cm bold",children:format(c,"MMMM yyyy")}),jsx(_,{onClick:P,as:"--calendar-chevron",children:V.chevronUpOutline}),jsx(_,{onClick:S,as:"--calendar-chevron",children:V.chevronDownOutline})]}),jsxs(p,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(R=>jsx(K,{as:"--calendar-day",children:R},`--calendar-hd-${R}`)),T.map((R,g)=>{let v=isSameMonth(R,c),y=isSameDay(R,c),b=isToday(R);return jsx(_,{disabled:!v,onClick:()=>x(R),as:["--calendar-day --calendar-dd",`${y?"--calendar-dd-selected":""}`,`${b?"--calendar-dd-current":""}`],children:format(R,"d")},`--calendar-day-${g}-${R.getFullYear()}-${R.getMonth()}-${R.getDay()}`)})]})]})]})});qn.displayName="Zuz.Calendar";var Jo=qn;var to=(t=>(t.Table="table",t.Gooey="gooey",t))(to||{});var Qn=({ref:e,...r})=>{let{itemCount:t,itemsPerPage:n,startPage:o,pageRange:s,paginationStyle:a,breakLabel:l,prevLabel:f,nextLabel:c,hash:i,loading:d,seperator:u,renderOnZeroPageCount:m,asDots:h,progressBar:T,onPageChange:x,...P}=r,S=useRef(null),R=useMemo(()=>toHash(numberInRange(4,8)),[]),g=useCallback(I=>`${toHash(I,i||6,R)}${u||""}${R}`,[R]),v=useMemo(()=>l||"...",[l]),y=useRef(null),[b,N]=useState({id:i?o?typeof o=="number"?g(o):o:1:o||1,label:o||1});useImperativeHandle(e,()=>({setPage:I=>N(I),getPage:I=>b,setProgress:I=>y.current?.setProgress?.(I),getProgress:()=>y.current?.getProgress?.()??0}),[y.current]);let{style:H,className:E,rest:$}=B(P),M=useCallback(I=>typeof I=="number"?I:+I.label,[]);if(!t)throw new Error('"itemCount" prop is required');let O=useMemo(()=>Math.ceil(t/n),[t,n]),z=useMemo(()=>{let I=[],k=Math.max(M(b)-(s||2),1),X=Math.min(M(b)+(s||2),O);k>1&&I.push({id:i?g(1):1,label:1}),k>2&&I.push({id:-1,label:v});for(let Y=k;Y<=X;Y++)I.push({id:i?g(Y):Y,label:Y});return X<O-1&&I.push({id:-1,label:v}),X<O&&I.push({id:i?g(O):O,label:O}),I},[b]),Z=useCallback(I=>{let k=I;+k.label<1||+k.label>O||(N(k),x?.(k));},[t,n,b]);return z.length<=1&&(m??false)===false?null:jsxs(p,{ref:S,as:`--pagination ${h===true?"--as-dots":""} --pgt-${a||"table"} flex aic w:100% jcc ${E}`,children:[jsx(p,{as:"flex flex:1 aic --pgt-btns",children:(z.length>1?z:[{id:1,label:1},{id:-1,label:v}]).map((I,k,X)=>{let Y=(typeof I=="string"?I:I.label)==M(b);return jsx(_,{disabled:I.id==-1||M(b)==+I.label,className:Y?"--current-page":"",onClick:A=>Z(I),children:h===true?T===true&&Y?jsx(Je,{ref:y}):"":typeof I=="string"?I:I.label},`--pg-${k}-${I.id}`)})}),jsx(p,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(M(b)-1)*n+1} - `,`${Math.min(M(b)*n,t)} of ${t} items`].join(" ")}),jsxs(p,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsx(_,{disabled:M(b)<=1,onClick:I=>Z({id:i?g(M(b)-1):M(b)-1,label:M(b)-1}),children:V.chevronLeftOutline}),jsx(_,{disabled:z.length<=1||M(b)==M(z[z.length-1]),onClick:I=>Z({id:i?g(M(b)+1):M(b)+1,label:M(b)+1}),children:V.chevronRightOutline})]})]})};Qn.displayName="Zuz.Pagination";var Et=Qn;function Uc(e,r){let{items:t,renderItem:n,effect:o="slide",loop:s=true,loopMode:a="infinite",startIndex:l=0,useKeys:f=true,useWheel:c=true,spacing:i=160,rotation:d=20,scaleStep:u=.15,blur:m=4,animation:h="power",showDots:T=false,autoPlay:x=false,autoPlaySpeed:P=3,onChange:S,...R}=e,{className:g,style:v}=B(R),y=useRef(null),b=P/(P>=1e3?1e3:1),N=useCarousel({total:t.length,initialIndex:l,loop:s,useKeys:f,useWheel:c,onChange:O=>{y.current?.setPage({id:O+1,label:O+1}),y.current?.setProgress(0),S?.(O);}}),{pause:H,resume:E,reset:$}=useTimer({duration:b,autoStart:x===true,onProgress:O=>{x===true&&y.current?.setProgress(1-O);},onExpired:()=>{x===true&&N.next(),$();}}),M={...v,"--carousel-spacing":`${i}px`,"--carousel-rotation":`${d}deg`,"--carousel-blur":`${m}px`,"--carousel-scale-step":u,"--active-index":N.index,"--carousel-transition":`var(--${h})`};return jsxs(p,{ref:r,className:`--carousel --effect-${o} --loop-${a} flex cols aic jcc ${g}`.trim(),style:M,children:[jsx(p,{className:"--carousel-stage rel fill flex aic jcc",children:t.map((O,z)=>{let Z=z-N.index;if(a==="infinite"){let k=t.length;Z=((Z+k/2)%k+k)%k-k/2;}let I=z===N.index;return jsx(p,{onMouseEnter:()=>I&&H(),onMouseLeave:()=>I&&E(),className:`--carousel-item-wrapper abs ${I?"--is-active":""}`,style:{"--offset":Z,zIndex:I?100:100-Math.abs(Z),display:Math.abs(Z)>5?"none":"flex"},children:n(O,z,N.index)},z)})}),T&&jsx(Et,{ref:y,itemCount:t.length,itemsPerPage:1,startPage:l+1,pageRange:t.length,paginationStyle:"gooey",onPageChange:O=>N.goTo(+O.label-1),asDots:true,progressBar:true})]})}var qc=forwardRef(Uc),Xc=qc;var Jn=(r=>(r.Line="line",r))(Jn||{});var os=forwardRef((e,r)=>{let{data:t,width:n,height:o,lineColor:s,strokeWidth:a=2,gradientStartColor:l,gradientEndColor:f,animated:c,animDuration:i=2,animDelay:d=0,padding:u=0,type:m,...h}=e,{className:T,style:x,rest:P}=B(h),S=useRef(null),R=useResizeObserver(S.current?.parentElement||S),g=typeof n=="number"?n:R.width,v=typeof o=="number"?o:R.height,y={width:g,height:v},b=useId(),{pathD:N,areaPathD:H}=useLineChart(t,y,u+(a||2)),E=useRef(null),$=useRef(null),[M,O]=useState(0),[z,Z]=useState(0);return useEffect(()=>{c&&(E.current&&O(E.current.getTotalLength()),$.current&&Z($.current.getTotalLength()));},[c,N,H,g,v]),jsx(p,{ref:S,as:`--chart --${m||"line"}-chart ${T}`.trim(),style:{...x,width:n,height:o},...P,children:g>0&&v>0&&jsxs("svg",{viewBox:`0 0 ${g} ${v}`,preserveAspectRatio:"xMidYMid meet",children:[jsx("defs",{children:jsxs("linearGradient",{id:b,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsx("stop",{offset:"0%",stopColor:l}),jsx("stop",{offset:"100%",stopColor:f})]})}),jsx("path",{ref:$,d:H,fill:`url(#${b})`,stroke:"none",style:c?{strokeDasharray:z,strokeDashoffset:z}:{},children:c&&jsx("animate",{attributeName:"stroke-dashoffset",from:z,to:"0",dur:`${i||2}s`,begin:`${d||0}s`,fill:"freeze"})}),jsx("path",{ref:E,d:N,fill:"none",stroke:s,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",style:c?{strokeDasharray:M,strokeDashoffset:M}:{},children:c&&jsx("animate",{attributeName:"stroke-dashoffset",from:M,to:"0",dur:`${i||2}s`,begin:`${d||0}s`,fill:"freeze"})})]})})});os.displayName="Zuz.Chart";var om=os;var rs=(o=>(o[o.Sending=0]="Sending",o[o.Sent=1]="Sent",o[o.Delivered=2]="Delivered",o[o.Read=3]="Read",o))(rs||{}),ns=(c=>(c.Image="img",c.Video="vid",c.Audio="audio",c.Link="link",c.Document="doc",c.Location="loc",c.Contact="contact",c.Event="event",c.Poll="poll",c))(ns||{});var ss=forwardRef((e,r)=>{let{text:t,media:n,side:o="me",status:s=1,timeStamp:a=Date.now(),arrow:l=true,...f}=e,{className:c,style:i,rest:d}=B(f);return jsx(p,{className:`--bubble-wrapper flex --bw-${o}`.trim(),children:jsxs(p,{className:`--bubble --bubble-${o} ${n?`--with-media --bma-${n.type}`:""} rel flex cols ${l==true?"--b-arrow":""} ${c}`.trim(),style:{...i},...d,children:[t&&jsx(K,{className:"--bubble-text",children:t}),n?n.type=="audio"?jsxs(p,{as:"flex aic --bubble-audio",children:[jsx(me,{className:"--bm-action",children:V.play}),jsx(Je,{progress:.7}),jsx(K,{className:"--bm-dur",children:n.duration??"00:13"})]}):n.type=="img"?jsx(p,{as:"--bubble-image",children:jsx(ot,{src:n.source})}):null:null,jsxs(p,{as:"flex aie jce --bubble-stats",children:[jsx(K,{className:"--bubble-stamp tar",children:timeSince(a)}),o=="me"&&jsx(me,{className:`--bubble-status --bs-${s}`,children:s==0?V.pending:s==1?V.done:s==2?V.doneAll:V.doneAll})]})]})})});ss.displayName="Zuz.Bubble";var sm=ss;var as=forwardRef((e,r)=>{let{style:t,className:n,rest:o}=B(e);return jsx("label",{ref:r,style:t,className:n,...o})});as.displayName="Zuz.Label";var Bt=as;var ls=({ref:e,...r})=>{let {name:t,required:n,type:o,value:s,size:a,variant:l,checked:f,disabled:c,onSwitch:i,...d}=r,u=_e(),m=!!(t&&u.values);m?u.errors?.[t]:null;let T=m?u.values?.[t]:void 0,[x,P]=useState(f||false),S=useRef(null),{variant:R}=Q(true),g=useMemo(()=>m&&T!=null?typeof T=="string"?T.toLowerCase()!=="false"&&T!=="":!!T:x,[T,x,m]);useEffect(()=>{S.current&&S.current.checked!==g&&(S.current.checked=g);},[g]),useEffect(()=>{f!==void 0&&P(f);},[f]);let v=y=>{let b=!!y;m&&u.setFieldValue?.(t,b),P(b),i?.(b,s||"cb");};return useImperativeHandle(e,()=>({setChecked(y,b=true){v(y);},toggle(y=true){v(!g);}})),jsxs(Bt,{"aria-hidden":c,className:[`--${(o||ze.Default).toLowerCase()}`,`${!o||o===ze.Default?"--checkbox":"--switch"}`,`--${l||R||q.Small}`,`flex aic jcc ${g?"is-checked":""} rel`,`${c?"--disabled":""}`].join(" ").trim(),...d,children:[(!o||o==ze.Default)&&V.check,jsx(de,{ref:y=>{S.current=y,e&&(e.current=y);},defaultChecked:g,type:"checkbox",className:"abs",name:t,required:n||false,onChange:y=>{y.stopPropagation(),v(y.target.checked);},disabled:c})]})};ls.displayName="Zuz.CheckBox";var kt=ls;var hm=({ref:e,...r})=>{let{code:t,copy:n,lang:o="tsx",showLines:s=false,highlight:a="",as:l,fx:f,...c}=r,i=useRef(null),{className:d,style:u,rest:m}=B({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${l}`,fx:f},i),h=useMemo(()=>{let x=new Set;return a.split(",").forEach(P=>{if(P.includes("-")){let[S,R]=P.split("-").map(Number);for(let g=S;g<=R;g++)x.add(g);}else P&&x.add(Number(P));}),x},[a]),T=useMemo(()=>{let x=t.split(`
9
+ `);for(;x.length>0&&x[0].trim()==="";)x.shift();for(;x.length>0&&x[x.length-1].trim()==="";)x.pop();let P=x[0]?.match(/^\s*/)?.[0].length||0,S=x.map(g=>{let v=g.match(/^\s*/)?.[0].length||0,y=Math.min(v,P);return g.slice(y)}),R=[{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((g,v)=>{let y=g.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),b=h.has(v+1);if(o!="plain"){let N=[];R.forEach(H=>{y=y.replace(H.re,E=>{let $=`ZUZ_ID_${N.length}_ZUZ`;return N.push(`<span class="--token-${H.name}">${E}</span>`),$});});for(let H=N.length-1;H>=0;H--)y=y.replace(`ZUZ_ID_${H}_ZUZ`,N[H]);}return `<div class="--code-line ${s==true?"--with-ln":""} ${b?"--is-highlighted":""}">
10
10
  ${s==true?`<span class="--line-number">${v+1}</span>`:""}
11
- <span class="--line-content">${h||" "}</span>
12
- </div>`}).join("")},[t,y]);return jsxs(m,{as:`--code-block rel ${d}`,style:p,...c,children:[jsx("pre",{ref:e,children:jsx("code",{className:`--code --lang-${o}`,dangerouslySetInnerHTML:{__html:T}})}),n&&jsx(K,{as:"--copy-code abs",onClick:()=>{copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},om=tm;var os=({onSelect:e,meta:r,selected:t,disabled:n=false})=>{let o=useRef(null),{index:s,icon:a,label:i}=r,[f,c]=useState({x:0,width:0}),l=useDelayed();return useLayoutEffect(()=>{if(l&&o.current){let{width:d,x:p}=o.current.getBoundingClientRect();c({x:p,width:d}),t&&e(s,d,p,r,true);}},[l,o.current]),useEffect(()=>{t&&e(s,f.width,f.x,r,false);},[t]),jsxs(K,{disabled:n,onClick:()=>e(s,f.width,f.x,r,false),ref:o,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsx(re,{name:a,as:"--segment-icon"}):jsx(m,{as:"--segment-icon flex aic jcc",children:a}):null,i&&String(i).trim()!=""&&jsx(m,{className:"--segment-label",children:i||`Item ${s}`})]})};os.displayName="SelectTabItem";var rs=os;var ss=forwardRef((e,r)=>{let{fx:t,items:n,selected:o,variant:s,disabled:a=false,onSwitch:i,...f}=e,[c,l]=useState(o||0),d=useDelayed(50),p=useRef(c),{className:u,style:y,rest:T}=B(f),x=useRef(null),P=useRef(null),{variant:S}=J(true),R=(g,v,h,b,N)=>{if((N||c!=g&&c!=-2)&&(l(g),p.current=c,queueMicrotask(()=>{d&&i?.(b);})),x.current){let F=P.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${v}px`),x.current.style.setProperty("--x",`${F?h-F.left:h}px`);}};return useImperativeHandle(r,()=>({setSelected:g=>{typeof g=="number"&&g!=c&&l(g);}}),[c]),jsxs(m,{ref:P,"data-selected":c,className:`${u} --segmented --${s||S||G.Medium} flex aic rel`,style:y,...T,children:[jsx(m,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((g,v)=>jsx(rs,{disabled:a,onSelect:R,selected:c==v,meta:{...g,index:v}},`segment-${g.label}-${v}`))]})});ss.displayName="Zuz.SelectTabs";var Pt=ss;var ls=forwardRef((e,r)=>{let{type:t,variant:n,...o}=e,s=useDelayed(),{colorScheme:a,setColorScheme:i}=xo(),f=useCallback(()=>{i(a=="dark"?"light":a=="light"?"system":"dark");},[a]),{variant:c}=J(true),{className:l,style:d}=B(o),p=useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"system",index:1,label:"",icon:V.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}],[]),u=useMemo(()=>["light","system","dark"].indexOf(a),[a]);return !s||u==-1?null:t=="system"||t=="switch"?jsx(Pt,{className:`--color-scheme --${t}`,onSwitch:({tag:y})=>{i(y);},selected:u,items:p,...o}):jsx(K,{onClick:f,style:d,variant:n,as:`--color-scheme-switch ${l}`.trim(),children:a=="system"?V.colorSchemeSystem:a=="light"?V.colorSchemeLight:V.colorSchemeDark})});ls.displayName="Zuz.ColorScheme";var xm=ls;var ms=forwardRef((e,r)=>{let[t,n]=useState("wait"),{title:o,message:s,acceptLabel:a,rejectLabel:i,position:f}=e,c=async l=>{n(l==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(l));};return useEffect(()=>{let l=localStorage.getItem("--ccnt");n(l?l=="1"?"accepted":"rejected":"pending");},[]),jsxs(m,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:oe.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${f||ge.Left} flex cols`,children:[jsx(Z,{as:"--title",children:o||"This site uses cookies"}),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"}),jsxs(m,{as:"--footer flex aic",children:[jsx(K,{onClick:l=>c(1),as:"--accept",children:a||"Accept All"}),jsx(K,{onClick:l=>c(0),as:"--reject",children:i||"Cancel"})]})]})});ms.displayName="Zuz.CookiesConsent";var wm=ms;var fs=({ref:e,...r})=>{let {title:t,position:n,margin:o=4,anchorName:s="--tooltip-anchor",children:a,show:i,variant:f,...c}=r,{style:l,className:d,rest:p}=B(c),u=n||ge.Top;useRef(null);let [T,x]=useState(false);useRef(6);let S=i===true||T,g=`--anchor-${useId().replace(/:/g,"")}`,{tooltip:v}=J(true),h=useMemo(()=>{let N=false;return addPropsToChildren(a,F=>{let k=F.props.className?.includes(s);return k&&(N=true),k||!N},(F,k)=>{let A=k.props.className?.includes(s),L=F===0,O={};return (A||L)&&(O.style={...k.props.style,anchorName:g}),L&&(O.onMouseEnter=M=>{x(true),k.props.onMouseEnter?.(M);},O.onMouseLeave=M=>{x(false),k.props.onMouseLeave?.(M);}),O})},[a,s,g]),b=he({transition:u==ge.Top?Q.SlideInTop:u==ge.Bottom?Q.SlideInBottom:u==ge.Left?Q.SlideInLeft:Q.SlideInRight,when:S,duration:.2,offset:o+6,margin:u==ge.Top||u==ge.Left?-o:o,curve:v?.curve||oe.EaseInOut});return useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxs(Fragment$1,{children:[h,jsx(m,{style:{positionAnchor:g,...b.style,...u===ge.Top||u===ge.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${S} --${f||v?.variant||G.Small} --${u} abs ${d}`.trim(),children:typeof t=="string"?jsx(Z,{as:"--text rel",children:t}):t})]})};fs.displayName="Zuz.ToolTip";var Qo=fs;var ds=({ref:e,...r})=>{let {type:t,value:n=0,min:o=0,max:s=1,step:a=.01,onChange:i,showGhostBar:f,showKnobOnHover:c,showToolTip:l,roundValue:d,formatValue:p,...u}=r,{className:y,style:T,rest:x}=B(u),P=useRef(a||.01).current,S=useRef(o||0).current,R=useRef(s||1).current,g=useRef(n||0).current,v=useRef(null),h=useRef(null),b=useRef(null),N=useRef(null);useRef(null);let k=useRef(null),A=useRef(null),L=useRef(null),O=useRef(null),M=(ne,se,fe)=>(ne-se)/(fe-se)*100,_=ne=>{if(h.current){let se=parseFloat(ne.currentTarget.value);ee(se);let fe=M(se,parseFloat(ne.currentTarget.min),parseFloat(ne.currentTarget.max));h.current.style.setProperty("--value",`${fe}`),h.current.setAttribute("data-value",`${se}`),i&&i(d?+se.toFixed(2):se);}},[I,E]=useState(false),[U,q]=useState(0),[H,$]=useState(0),[X,W]=useState(false),ee=async ne=>{let se=p?p(+ne):d?(+ne).toFixed(2):Math.round(+ne);L.current&&(L.current.textContent=String(se));},le=ne=>{if(I){let se=ne.clientX-U,fe=R-S,z=se/200*fe,Y=Math.max(S,Math.min(H+z,R));if(Y=Math.round(Y/P)*P,ee(Y),h.current){let me=M(Y,S,R);h.current.style.setProperty("--value",`${me}`),h.current.setAttribute("data-value",`${Y}`),A.current&&(A.current.textContent=d?Y.toFixed(2):Y.toString()),i&&i(Y);}}},pe=()=>{E(false),document.body.style.cursor="auto";},xe=ne=>(ne-S)/(R-S)*100,ae=ne=>{if(!h.current)return;let se=h.current.getBoundingClientRect(),fe=ne.clientX-se.left,Ee=Math.max(0,Math.min(100,fe/se.width*100));if(l&&L.current){let z=v.current?+v.current.value:n;ee(z*100);}if(f){let z=xe(v.current?+v.current.value:n),Y=Math.min(z,Ee),me=Math.abs(Ee-z);h.current.style.setProperty("--ghost-start",`${Y}`),h.current.style.setProperty("--ghost-width",`${me}`);}};useEffect(()=>{h.current&&h.current.style.setProperty("--value",v.current?`${M(parseFloat(v.current.value),parseFloat(v.current.min),parseFloat(v.current.max))}`:g.toString());},[]),useEffect(()=>(I?(document.addEventListener("mousemove",le),document.addEventListener("mouseup",pe)):(document.removeEventListener("mousemove",le),document.removeEventListener("mouseup",pe)),()=>{document.removeEventListener("mousemove",le),document.removeEventListener("mouseup",pe);}),[I]),useEffect(()=>{let ne=M(n,S,R);h.current?.style.setProperty("--value",`${ne}`),ee(n);},[n,S,R,L.current]);let j=()=>jsxs(m,{ref:h,onMouseEnter:()=>W(true),onMouseLeave:()=>W(false),onMouseMove:ae,className:`--slider --${t||mo.Default} ${c?"--knob-hover":""} flex rel ${y}`.trim(),style:{...T},children:[jsx(m,{ref:k,className:"--slider-track abs fill"}),f&&jsx(m,{ref:N,className:"--slider-ghost abs fill"}),jsx(m,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsx(m,{ref:b,className:"--slider-knob --tooltip-knob abs"}),jsx(ue,{ref:v,onInput:_,className:"abs fill",tabIndex:0,type:t||mo.Default,defaultValue:g||0,step:P,max:R,min:S})]});if(l===true){let ne=p?p(n):d?n.toFixed(2):n;return jsx(Qo,{ref:O,show:I,position:ut.Top,margin:15,anchorName:"--tooltip-knob",title:jsx(ie,{ref:L,children:ne}),children:j()})}return j()};ds.displayName="Zuz.Slider";var rt=ds;var hs=forwardRef((e,r)=>{let{src:t,shape:n,size:o,...s}=e,{style:a,className:i,rest:f}=B(s),{canvasRef:c,crop:l,setScale:d,handleMouseDown:p,handleMouseUp:u,handleMouseMove:y}=useImageCropper(t,o||200,n||CropShape.Circle);return useImperativeHandle(r,()=>({getCropped(){return l()},setScale(T){d(T);}})),jsxs(m,{as:`--cropper --${n||CropShape.Circle} ${i}`,style:a,...f,children:[jsx("canvas",{ref:c,width:o||200,height:o||200,onMouseDown:p,onMouseUp:u,onMouseLeave:u,onMouseMove:y}),jsx(m,{as:"--cropper-slider",children:jsx(rt,{onChange:T=>d(T),min:0,max:1,step:.01,value:1})})]})});hs.displayName="Zuz.Cropper";var Om=hs;var Dm=(t=>(t.Circle="circle",t.Square="square",t))(Dm||{});var xs=forwardRef((e,r)=>{let{items:t,maxItems:n}=e,o=useMemo(()=>{let i=typeof t=="string",f=i?[]:t;return i&&t.split(",").forEach(c=>{f.push({label:c});}),f},[t]),a=useMemo(()=>n&&n>0&&o.length>n-1,[o,n])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-n)]:o;return jsx(Ye,{ref:r,className:"--crumb flex aic",direction:"rows",seperator:jsx(m,{as:"--crumb-chevron",children:V.chevronRightOutline}),items:a.map((i,f,c)=>i.ID=="."?jsx(m,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsx(m,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${f}`))}):jsxs(K,{onClick:()=>i.action?.(),className:"--crumb-item",disabled:!c[f+1],children:[i.icon&&jsx(re,{as:"--crumb-icon",name:i.icon}),jsx(Z,{as:"--crumb-label",children:i.label})]},`${i.label.replace(/\s+/g,"-").toLowerCase()}-${f}`))})});xs.displayName="Zuz.Crumb";var Am=xs;var Ss=forwardRef((e,r)=>{let{icon:t,defaultValue:n,value:o,size:s,variant:a,numeric:i,type:f,onConfirm:c,...l}=e,[d,p]=useState(false),[u,y]=useState(n||null),{style:T,className:x,rest:P}=B(l),S=useRef(null),R=useRef(null),{reposition:g}=bt(R,{direction:ge.Bottom,offset:2}),v=b=>{i&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};useEffect(()=>{let b=N=>{let F=N.target,k=S.current?.contains(F),A=R.current?.contains(F);!k&&!A&&p(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),useEffect(()=>{let b=N=>{N.key==="Escape"&&d&&(p(false),S.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let h=()=>{p(true);};return useEffect(()=>{d&&g();},[d,g]),jsx(Fragment$1,{children:jsxs(m,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${x}`,"data-value":u?u.toISOString():"",children:[t?typeof t=="string"?jsx(re,{as:"mr:10 c:#666",name:t}):t:jsx(ie,{as:"--date-picker-icon flex aic jcc",children:V.calendar}),jsx("input",{ref:S,value:u?format(u,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:T,onFocus:h,onInput:v,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&c?.(b.currentTarget.value);},...P}),jsx(m,{"aria-hidden":!d,ref:R,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:d,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsx(Ko,{defaultValue:u,onChange:b=>{y(b),p(false);}})})]})})});Ss.displayName="Zuz.DatePicker";var _m=Ss;var ws=forwardRef((e,r)=>{let{icon:t,variant:n,position:o}=e;return jsx(K,{className:`--fab fixed --${n||G.Large} --${o||"bottomright"}`,children:t||V.plus})});ws.displayName="Zuz.Fab";var Gm=ws;var Cs=e=>{let{names:r,strength:t}=e,n={[Lt.Gooey]:o=>jsxs("filter",{id:"gooey",children:[jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||10,result:"blur"}),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"}),jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${Lt.Gooey}`)};return useEffect(()=>{},[r]),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsx("defs",{children:(r||[Lt.Gooey]).map(o=>n[o](t))})})};Cs.displayName="Zuz.Filters";var Xm=Cs;var Ts=({cols:e,gap:r,ais:t,aic:n,aie:o,jcs:s,jcc:a,jce:i,className:f="",style:c,...l})=>{let d=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",o?"--aie":"",s?"--jcs":"",a?"--jcc":"",i?"--jce":"",f].filter(Boolean).join(" "),p={...c,gap:typeof r=="number"?`${r}px`:r};return jsx(m,{...l,className:d,style:p})};Ts.displayName="Zuz.FlexBox";var Fe=Ts;var _e=null,Pe=null,Rs=forwardRef((e,r)=>{let{title:t,message:n,transition:o,curve:s,speed:a,type:i,actionPosition:f,spinner:c,loadingMessage:l,onShow:d,onHide:p,...u}=e,{className:y,style:T,rest:x}=B(u),[P,S]=useState(t||""),[R,g]=useState(n||""),[v,h]=useState(null),[b,N]=useState(i||Ie.Default),F=useMemo(()=>uuid(12),[]),[k,A]=useState(false),L=useRef(null),O=useRef(null),[M,_]=useState(false),[I,E]=useState(true),U=useRef(null),q=R;useImperativeHandle(r,()=>({setLoading($){_($);},showDialog($,X,W,ee){_e&&(clearTimeout(_e),Pe&&clearTimeout(Pe),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),Pe=setTimeout(()=>{L.current.classList.remove("--wobble"),Pe=null;},500)),N(Ie.Dialog),X&&g(X),$&&S($),W&&h(W.reduce((te,le)=>(te.push({...le,key:le.key||uuid(12)}),te),[])),A(true),setTimeout(()=>ee?ee():()=>{},1e3);},dialog($,X,W,ee){_e&&(clearTimeout(_e),Pe&&clearTimeout(Pe),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),Pe=setTimeout(()=>{L.current.classList.remove("--wobble"),Pe=null;},500)),N(Ie.Dialog),g(X),S($),W&&h(W.reduce((te,le)=>(te.push({...le,key:le.key||uuid(12)}),te),[])),A(true),setTimeout(()=>ee?ee():()=>{},1e3);},error($,X){this.show($,X,Ie.Error);},warn($,X){this.show($,X,Ie.Warn);},success($,X){this.show($,X,Ie.Success);},show($,X,W){_e&&(clearTimeout(_e),Pe&&clearTimeout(Pe),O.current=L.current.style.transform,L.current.style.transform="",L.current.classList.remove("--wobble"),setTimeout(()=>{L.current.classList.add("--wobble"),L.current.style.transform=`${O.current} scale(.9)`.trim();},50),Pe=setTimeout(()=>{L.current.classList.remove("--wobble"),L.current.style.transform=O.current||"",Pe=null;},500)),_e=setTimeout(()=>{A(false),_e=null,Pe=null;},(X||4)*1e3),N(W||Ie.Default),g($),A(true),d?.();},hide(){A(false),p?.();}}));let H=useMemo(()=>{let $={when:k,duration:a||.3,delay:.1};if(b==Ie.Dialog){if(o){let{from:X,to:W}=dt(o,20);return {from:X,to:W,curve:s||oe.EaseInOut,...$}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:oe.Spring,...$}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:oe.Spring,...$}},[k,b]);return useEffect(()=>{U.current&&clearTimeout(U.current),k?E(true):U.current=setTimeout(()=>E(false),1e3);},[k]),b==Ie.Dialog?jsxs(Fragment$1,{children:[jsx(Ge,{when:k}),jsxs(m,{className:`--sheet --sheet-${b.toLowerCase()} ${k?"is-visible":""} ${y} fixed`.trim(),style:T,fx:H,...x,ref:L,children:[jsx(ke,{when:M,spinner:c,message:l}),jsxs(m,{className:"--head flex aic rel",children:[jsx(m,{className:`--${P?"title":"dot"} flex aic rel`,children:P||""}),jsx(K,{onClick:$=>A(false),className:"--closer abs",children:"\xD7"})]}),jsx(m,{className:`--body flex aic rel ${v?"":"--no-action"}`.trim(),children:I?q:null}),v&&jsx(m,{className:`--footer flex aic rel ${f?f==co.Center?"jcc":"":"jce"}`.trim(),children:v.map(($,X)=>jsx(K,{onClick:W=>$.handler?$.handler():$.onClick?$.onClick():console.log("onClick Handler missing"),className:"--action",children:$.label},`sheet-${F}-action-${$.key}`))})]})]}):jsx(m,{className:`--sheet --sheet-${b.toLowerCase()} ${y} abs`.trim(),style:T,...x,fx:H,ref:L,children:k?R:null})}),Is=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;Rs.displayName="Zuz.Sheet";var tp=Rs;var cp=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},Ns=({ref:e,...r})=>{let {schema:t,name:n,cover:o,spinner:s,errors:a,action:i,children:f,withData:c,beforeSubmit:l,onSubmit:d,onError:p,onSuccess:u,resetOnSuccess:y,...T}=r,{className:x,style:P,rest:S}=B(T),[R,g]=useState(false),v=useRef(null),h=Mo(),b=zo();$o();let F=useRef(null),k=useCallback(H=>v.current?v.current.querySelectorAll(H):[],[v.current]),A=H=>({name:H.name||H.getAttribute("name")||H.getAttribute("data-name"),required:H.required?true:H.getAttribute("data-required")?H.getAttribute("data-required")=="true":false,with:H.with||H.getAttribute("with")}),L=H=>{let $=[];return H.querySelectorAll(".--input").forEach(X=>{$.push(X.value);}),$.join("")},O=H=>H.classList.contains("--otp")?L(H):H.classList.contains("--select")?H.querySelector("button.--selected")?.dataset.value:H.classList.contains("--checkbox")||H.getAttribute("type")==="checkbox"?H.checked:H.value,M=useCallback(H=>{let{name:$,required:X,with:W}=A(H),ee=O(H);if(t&&t[$]&&b?.getSnapshot()){let te=t[$](ee,b.getSnapshot().values);if(te===false||typeof te=="string")return typeof te=="string"&&b?.setFieldError($,te),false}if(X&&(H.type==="checkbox"&&!H.checked||H.classList.contains("--select")&&(ee==="-1"||!ee)||!ee||ee===""))return false;if(W)switch((W.includes("@")?W.split("@")[0]=="match"?We.MatchField:W.split("@")[0]:W).toUpperCase()){case We.IPV4:return _(ee).isIPv4();case We.IPV6:return _(ee).isIPv6();case We.Email:return _(ee).isEmail();case We.Uri:try{return new URL(ee),!0}catch{return false}case We.MatchField:let[le,pe,xe]=W.split("@"),ae=document.querySelector(`[name=${pe.trim()}]`);if(!ae)return false;switch(xe||"direct-match"){case "if-not-empty":if(ae&&!_(ae.value).isEmpty()&&ae.value!=H.value)return false;break;case "direct-match":if(ae&&ae.classList.contains("--otp")&&H.classList.contains("--otp")&&L(ae)!=L(H))return false;if(ae&&ae.value!=H.value)return false;break}break}return true},[t,b]),_$1=useCallback(()=>{let H={},$={...b?.getSnapshot().values||{}},X=null,W=null;if(k("[name]").forEach(te=>{let{name:le,required:pe,with:xe}=A(te),ae=pe||xe?M(te):true,ce=O(te);H[le]={valid:ae,value:ce},$[le]=ce,b?.setFieldError(le,ae?null:a?.[le]||"Invalid"),ae?te.classList.remove("--with-error"):(te.classList.add("--with-error"),X||(X=te),W=a?.[le]);}),X){let te=X;if(te.classList.contains("--otp"))for(let le of Array.from(te.querySelectorAll(".--input"))){let pe=le;if(pe.value==""){pe.focus();break}}else te.focus();}let ee=cp($);return {error:X!=null,errorMsg:W||"Fix errors to continue...",data:H,payload:ee}},[v.current,b]),I=useCallback((H={})=>{let{error:$,errorMsg:X,payload:W,data:ee}=_$1();if($){h.error(X);return}i?startTransition(async()=>{g(true),withPost(i,{...c,...W,...H}).then(te=>{g(false),y&&b?.reset(),u?.(te,{...c,...W,...H}),u||h.success(te.message||"Redirecting...");}).catch(te=>{g(false),p?p(te):h.error(te.message);});}):d?.(W,ee);},[_$1,i,c,u,p,y,d]),E=useCallback(()=>{let H=k("[type=submit]");!H||H.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):H.forEach($=>{$.addEventListener("click",I);});},[v.current]),U=useMemo(()=>addPropsToChildren(f,H=>H.props.type=="submit",H=>({ref:F})),[f]),q=useRef(I);return useImperativeHandle(e,()=>({setLoading:H=>g(H),submit:H=>q.current(H),init:E,hideError:()=>h.clearAll()}),[I,E]),useEffect(E,[]),useEffect(()=>{q.current=I;},[I]),useEffect(()=>{let H=k("[type=submit]"),$=Array.from(H).map(X=>{let W=X;return W.addEventListener("click",I),()=>W.removeEventListener("click",I)});return ()=>$.forEach(X=>X())},[I,k]),jsxs(m,{ref:v,style:P,className:`--form flex rel ${x}`,children:[!Is(o)&&jsx(ke,{when:R,spinner:s,...o}),U]})};Ns.displayName="Zuz.FormInternal";var Bs=e=>jsx(In,{initialValues:e.withData,children:jsx(Ns,{...e})});Bs.displayName="Zuz.Form";var mp=Bs;var Es=e=>{let {ref:r,cols:t,rows:n,gap:o,gapX:s,gapY:a,align:i,justify:f,inline:c,flow:l,autoCols:d,autoRows:p,template:u,...y}=e;useRef(null);let {className:x,style:P,rest:S}=B(y),R=v=>typeof v=="number"?`repeat(${v}, 1fr)`:v,g={display:c?"inline-grid":"grid",gridTemplateColumns:R(t),gridTemplateRows:R(n),gap:o,columnGap:s,rowGap:a,alignItems:i,justifyContent:f==="between"?"space-between":f==="around"?"space-around":f,gridAutoFlow:l,gridAutoColumns:d,gridAutoRows:p,gridTemplateAreas:u,...P};return jsx(m,{ref:r,as:`--grid ${x}`.trim(),style:g,...S})};Es.displayName="Zuz.Grid";var fp=Es;var ks=e=>typeof e=="string"&&e.includes("+"),Ls={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"},Ms={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 Vs=forwardRef(({children:e,keys:r,as:t,className:n,variant:o},s)=>{let{variant:a}=J(true),i=useMemo(()=>{if(ks(r)){let f=null;return {keys:String(r).split("+").reduce((l,d,p,u)=>(u[p+1]?l.push(d):f=d.toUpperCase(),l),[]),children:f}}return {keys:r,children:String(e).toUpperCase()}},[r]);return jsxs(m,{as:`--keyboard-keys --${o||a||G.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(i.keys)?i.keys:[i.keys]).map(f=>jsx("abbr",{title:Ms[f],children:Ls[f]},f)),jsx(ie,{children:i?.children??e})]})});Vs.displayName="Zuz.KeyboardKeys";var lr=Vs;var As=createContext(null),at=()=>{let e=useContext(As);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},Sp=({ref:e,icons:r,children:t,...n})=>{let{playlist:o=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:i="No Track",defaultCover:f,onTrackChange:c,...l}=n,{className:d,style:p,rest:u}=B(l),y=useMediaPlayer(o,o[0]??void 0),T=useMemo(()=>({play:V.play,pause:V.pause,prev:V.prev,next:V.next,volumeHigh:V.volumeHigh,volumeMute:V.volumeMute,...r}),[r]),x=useMemo(()=>({...y,mode:s,icons:T}),[y,T]);return jsx(As.Provider,{value:x,children:jsx(m,{className:`--zuz-media-player ${d}`,style:p,children:t})})},$s=Sp;var zs=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")}`},Jt=e=>typeof e=="string"?jsx(re,{name:e}):e,Fs=()=>{let{mediaRef:e,state:r,controls:t,mode:n}=at();return jsxs(m,{as:`--mediaplayer-stage rel --mode-${n}`,children:[n==="video"?jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsx("audio",{ref:e}),r.isLoading&&jsx(m,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsx(we,{})})]})},_s=()=>{let{state:e,defaultArtist:r,defaultTitle:t,defaultCover:n}=at();return jsxs(m,{as:"--track-info flex aic",children:[jsx(je,{src:e.currentItem?.cover||n||"",as:"--track-cover"}),jsxs(m,{as:"flex cols",children:[jsx(m,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsx(m,{as:"--track-artist",children:e.currentItem?.artist||r||"..."})]})]})},Zs=()=>{let{state:e,controls:r,icons:t}=at();return jsxs(m,{as:"--mediaplayer-controls flex aic",children:[jsx(K,{onClick:r.prev,as:"--prev",children:Jt(t?.prev??V.prev)}),jsx(K,{onClick:r.togglePlay,as:"--play-pause",children:Jt(e.isPlaying?t?.pause??V.pause:t?.play??V.play)}),jsx(K,{onClick:r.next,as:"--next",children:Jt(t?.next??V.next)})]})},Ks=()=>{let{state:e,controls:r,mediaRef:t}=at(),n=e.progress*(e.duration||0);return jsxs(m,{as:"--track-progress flex aic",children:[jsx(m,{as:"--track-current-duration",children:zs(n)}),jsx(rt,{value:e.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;r.seek(a);}}),jsx(m,{as:"--track-total-duration",children:zs(e.duration)})]})},Ws=()=>{let{state:e,controls:r,icons:t}=at();return jsxs(m,{as:"--volume-control flex aic gap:8 w:120",children:[jsx(K,{onClick:()=>r.setIsMuted(),children:Jt(e.isMuted?t?.volumeMute??V.volumeMute:t?.volumeHigh??V.volumeHigh)}),jsx(rt,{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=({ref:e,...r})=>jsx($s,{...r,ref:e}),Cp=Object.assign(wp,{Stage:Fs,TrackInfo:_s,Controls:Zs,Progress:Ks,Volume:Ws}),Tp=Cp;var Us=forwardRef((e,r)=>{let t=useNetworkStatus(),{onlineMessage:n,offlineMessage:o,variant:s}=e;return jsxs(m,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:t==false,curve:oe.Spring,duration:.5,delay:2},className:`--network-manager --${t==true?"online":"offline"} --${s||G.Small} fixed flex`,children:[jsx(m,{className:"--ico",children:t?V[Re.Success]:V[Re.Error]}),jsx(Z,{as:"--message",children:t?n||"internet connection restored :)":o||"no internet connection"})]})});Us.displayName="Zuz.NetWorkManager";var Np=Us;var Xs=forwardRef((e,r)=>{let{strenthMeter:t,onChange:n,...o}=e;"type"in o&&delete o.type;let{style:s,className:a,rest:i}=B(o),[f,c]=useState(false),[l,d]=useState(""),p=useMemo(()=>checkPasswordStrength(l),[l]),u=useDebounce(y=>{t&&d(y.target.value),n&&n(y);},100);return useEffect(()=>{},[]),jsxs(m,{as:"w:100% flex cols",children:[jsxs(m,{style:s,className:"--password flex aic rel",children:[jsx(ue,{ref:r,type:f?"text":"password",className:a,onChange:u,...i}),jsx(K,{tabIndex:-1,onClick:()=>c(y=>!y),className:"--toggle flex aic jcc abs",children:f?V.eye:V.eyeSlash})]}),t&&jsxs(m,{as:`flex aic --password-meter --pb-score-${p.score}`,style:s,children:[jsxs(m,{as:"--password-bars flex aic",children:[jsx(m,{as:`--pbar ${p.score>=1?"--pb-on":""}`.trim()}),jsx(m,{as:`--pbar ${p.score>=2?"--pb-on":""}`.trim()}),jsx(m,{as:`--pbar ${p.score>=3?"--pb-on":""}`.trim()}),jsx(m,{as:`--pbar ${p.score>=4?"--pb-on":""}`.trim()}),jsx(m,{as:`--pbar ${p.score>=5?"--pb-on":""}`.trim()})]}),jsx(Z,{as:"--password-meter-label","aria-hidden":true,children:p.result})]})]})});Xs.displayName="Zuz.Password";var Vp=Xs;var js=forwardRef((e,r)=>{let{size:t,length:n,mask:o,...s}=e,a=useRef([]),i="pinput",f=false,c={};"with"in s&&(c={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(i=s.name,delete s.name),"required"in s&&(f=true,delete s.required);let{style:l}=B(s),d=u=>{let y=u.currentTarget,T=a.current[parseInt(y.dataset.index)+1],x=a.current[parseInt(y.dataset.index)-1];y.value.length===1&&T?T.focus():y.value.length===0&&x&&x.focus();},{variant:p}=J(true);return useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsx(m,{name:i,style:l,className:`--otp --${s.variant??p??G.Medium} flex aic rel`,"data-required":f,"data-size":t||n||4,...c,children:Array(t||n||4).fill(1).map((u,y)=>jsx(ue,{autoComplete:"new-password","data-index":y,ref:T=>{a.current[y]=T;},numeric:true,onChange:d,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${y}`))})});js.displayName="Zuz.PinInput";var $p=js;var Qs=forwardRef((e,r)=>{let{children:t,className:n,name:o,required:s,type:a,value:i,variant:f,checked:c,onSwitch:l,...d}=e,[p,u]=useState(c||false),{variant:y}=J(true),T=useRef(null);return jsxs(Ct,{className:`${n} --${(a||po.Default).toLowerCase()} --radio${!a||a==po.Default?"":"card"} --${f||y||G.Small} flex aic rel`.trim(),...d,children:[jsx(ue,{ref:T,defaultChecked:p,value:i||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:x=>{l&&l(x.target.checked,i||"cb"),u(x.target.checked);}}),jsx(m,{className:"--dot rel",children:jsx(m,{className:"--rod abs abc"})}),jsx(m,{className:"--value",children:t})]})});Qs.displayName="Zuz.Radio";var Zp=Qs;var Js=forwardRef((e,r)=>{let{fx:t,withStyle:n,as:o,reverse:s=false,searchIcon:a=V.search,hideSearchIcon:i=false,clearIcon:f=V.close,hideClearIcon:c=false,onChange:l,onClear:d,...p}=e,{style:u,className:y}=B({as:e.as}),[T,x]=useState(""),{variant:P}=J(true),S=useRef(null);"type"in e&&delete e.type;let R=v=>{x(v.target.value),l?.(v.target.value);},g=v=>{T.trim()!==""&&(x(""),l?.(""),S.current&&(S.current.value="",e.onConfirm?.("")));};return useImperativeHandle(r,()=>({focus:()=>S.current?.focus(),value:()=>S.current?.value})),useEffect(()=>{},[]),jsxs(m,{style:u,className:`--search --no-shrink ${s?"--search-rev":""} --${e.variant||P||G.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${y}`.trim(),children:[jsx(ue,{ref:S,onChange:R,...p}),e.shortcut&&jsx(lr,{keys:e.shortcut,as:"abs"}),jsx(K,{tabIndex:-1,onClick:v=>g(),className:"--send flex aic jcc",variant:e.variant||G.Medium,children:T!==""?!c&&(typeof f=="string"?jsx(re,{name:f,as:"--search-action"}):f):!i&&(typeof a=="string"?jsx(re,{name:a,as:"--search-action"}):a)})]})});Js.displayName="Zuz.Search";var cr=Js;var jp=({label:e,icon:r})=>jsxs(m,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[r&&jsx(re,{name:r}),jsx(Z,{as:"--select-group-label",children:e})]}),ta=jp;var ra=({checkIcon:e,selected:r,updateValue:t,o:n})=>{let o=e?typeof e=="string"?jsx(re,{name:"checkIcon"}):e:V.check,s=n.disabled===true;return jsxs(K,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${r?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxs(Fe,{as:"--option-item-meta --aic",children:[n.icon&&jsx(re,{name:n.icon,as:`--select-option-icon --icon-${n.value}`,color:n.iconColor}),jsx(Z,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),r&&jsx(Fe,{aic:true,jcc:true,as:"--select-option-check --abs",children:o})]})};ra.displayName="Option";var na=ra;var sa=({ref:e,...r})=>{let{selected:t,options:n,label:o,name:s,variant:a,search:i,searchPlaceholder:f,maxHeight:c,arrowDownIcon:l=V.arrowDown,arrowUpIcon:d=V.arrowUp,expanded:p,multiple:u,tokenizer:y,wrapTokens:T,disabled:x,checkIcon:P,closeIcon:S,onChange:R,required:g,with:v,...h}=r,b=He(),N=s&&b.values&&b.setFieldValue,F=N?b.errors?.[s]:null,k=N?b.values?.[s]:void 0,A=z=>!z&&z!==0?null:u||y?(Array.isArray(z)?z:[z]).map(me=>typeof me=="string"||typeof me=="number"?n.find(be=>String(be.value)===String(me)):me).filter(Boolean):typeof z=="string"||typeof z=="number"?n.find(Y=>String(Y.value)===String(z)):z,[L,O]=useState(()=>t?A(t):n.find(Y=>String(Y.value)==="-1")||null),M=useMemo(()=>k?A(k):L,[k,L]),[_$1,I]=useState(false),[E,U]=useState(null),q=useRef(null),H=useRef(null),$=useRef(null),X=useId(),W=useMemo(()=>s||X,[]),{reposition:ee}=bt($,{direction:ut.Bottom,offset:2}),{variant:te}=J(true),le=S?typeof S=="string"?jsx(re,{name:S}):S:V.close,{className:pe,style:xe,rest:ae}=B(h,void 0),ce=z=>Array.isArray(M)?M.some(Y=>Y.value===z.value):M?.value===z.value,j=z=>{if(!(x||z.disabled))if(u||y){let Y=Array.isArray(M)?M:[],be=Y.find(io=>io.value===z.value)?Y.filter(io=>io.value!==z.value):[...Y,z];O(be),R?.(be);}else O(z),I(false),R?.(z);},ne=(z,Y)=>{if(z.stopPropagation(),x)return;let me=M.filter(be=>be.value!==Y.value);N?b.setFieldValue?.(s,me.map(be=>be.value)):O(me),I(false),R?.(me);},se=z=>{let Y=z.currentTarget,me=Y.scrollTop===0&&z.deltaY<0,be=Y.scrollHeight-Y.scrollTop===Y.clientHeight&&z.deltaY>0;!me&&!be||z.preventDefault(),z.stopPropagation();};useImperativeHandle(e,()=>({setSelected:z=>{let Y=A(z);if(N){let me=Array.isArray(Y)?Y.map(be=>be.value):Y?.value;b.setFieldValue?.(s,me);}else O(Y);},getValue:()=>M||null}),[M,n]),useEffect(()=>{if(!_$1)return;let z=()=>{ee();};return window.addEventListener("scroll",z,true),window.addEventListener("resize",ee),()=>{window.removeEventListener("scroll",ee,true),window.removeEventListener("resize",ee);}},[_$1,ee]),useEffect(()=>{if(!_$1){H.current&&(H.current.value=""),U(null);return}H.current?.focus(),ee();let z=me=>{$.current&&!$.current.contains(me.target)&&I(false);},Y=setTimeout(()=>{document.addEventListener("click",z);},0);return ()=>{clearTimeout(Y),document.removeEventListener("click",z);}},[_$1,ee]),useEffect(()=>()=>{N&&b.deleteFieldValue?.(s);},[]);let fe=useDebounce(z=>U(z==""?null:z),300),Ee=useMemo(()=>{if(M)return _(M).isArray()?M.length>0?M[0]:void 0:M},[M]);return console.log(F),jsxs(m,{"data-required":g?"true":void 0,with:v,className:[`--select ${p==true?"--expanded":""}`,`--${a||te}`,`${s?`--${s}`:""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:W,children:[jsxs(K,{ref:q,disabled:x,variant:a||te,"data-value":Ee?.value??"-1",className:`--select-display --selected flex aic rel ${pe}`.trim(),withLabel:false,style:xe,onClick:z=>{z.stopPropagation(),x||I(Y=>!Y);},...ae,children:[Ee?.icon&&jsx(re,{as:"--selected-icon",name:Ee.icon}),jsx(Fe,{aic:true,as:"--label-wrapper",children:y&&Array.isArray(M)&&M.length>0?jsxs(Fe,{as:`--tokens-wrap${T===true?" --wrap":""}`,children:[M?.map(z=>jsxs(Fe,{aic:true,as:"--token",children:[jsx(Z,{as:"--token-label",children:z.label}),jsx(m,{as:"--token-remove",onClick:Y=>ne(Y,z),children:le})]},z.value)),M.length<n.length&&jsx(Z,{as:"--label",children:o||"Choose"})]}):jsx(Z,{as:"--label",children:Array.isArray(M)?M.length>0?`${M.length} selected`:o||"Choose":M?.label||o||"Choose"})}),jsx(m,{className:"--svg-arrow rel flex aic jcc",children:_$1?typeof d=="string"?jsx(re,{name:d,as:"--search-action"}):d:typeof l=="string"?jsx(re,{name:l,as:"--search-action"}):l})]}),jsxs(m,{id:W,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!_$1,onWheel:se,style:{maxHeight:c||"auto"},ref:$,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:_$1,duration:.05},children:[i&&jsx(m,{as:"--select-search --no-shrink flex --sticky",children:jsx(cr,{ref:H,variant:G.Small,placeholder:f||"Search...",onChange:fe})}),o&&jsx(ta,{label:o}),n?.filter(z=>!E||z.label.toLowerCase().includes(E.toLowerCase()))?.map(z=>jsx(na,{updateValue:j,checkIcon:P,selected:ce(z),o:z},`option-${(typeof z=="string"?z:z.label).replace(/\s+/g,"-")}-${typeof z=="string"?z:z.value}`))]})]})};sa.displayName="Zuz.Select";var ru=sa;var aa=({ref:e,...r})=>jsx(Tt,{type:Ve.Switch,...r,ref:e});aa.displayName="Zuz.Switch";var nu=aa;var la=e=>{let{idx:r,id:t,as:n,weight:o,style:s,value:a,render:i,resize:f,sortBy:c,sortable:l,onSort:d}=e,[p,u]=useState(0),y=()=>{l&&(d?.(String(t),p==1?-1:1),u(T=>T==1?-1:1));};return jsxs(m,{style:{flex:o||1,...s},as:`--col flex aic ${n||""} ${l?"--sortable":""}`,onClick:y,children:[jsx(m,{as:"--colv",children:a}),r==-1&&l&&c==t&&jsx(m,{as:"--arrow flex aib",children:p==1?V.arrowUp:V.arrowDown})]})};la.displayName="Zuz.Column";var ro=la;var ma=e=>{let{index:r,pubsub:t,schema:n,data:o,ids:s,styles:a,animate:i,sortBy:f,selectable:c,tableRef:l,loading:d,rowClassName:p,onSort:u,onRowClick:y,onSelect:T,onContextMenu:x}=e,P=useDelayed(),S=useMemo(()=>({transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:.02*(r+1)}),[]),R=useRef(null),g=(h,b)=>{r==-1?t.emit(`ALL_ROWS_${h?"CHECKED":"UNCHECKED"}`,h):(T&&T(o,h),t.emit(`ROW_${h?"CHECKED":"UNCHECKED"}`,h,b));},v=(h,b,N)=>jsx(ro,{idx:h,id:b,as:"--selector",pubsub:t,value:jsx(Tt,{value:N,ref:R,onSwitch:g,type:Ve.Default})});return useEffect(()=>{let h=(k,A)=>{R.current?.setChecked(k,false);},b=(k,A)=>{let L=false;l?.current&&l.current.querySelectorAll(".--row").forEach(O=>{let M=O;if(!M.classList.contains("--row-head")){let _=M.querySelector(".--selector input[type=checkbox]");_&&_.checked&&!L&&(L=_.checked);}}),R.current.setChecked(L,false);},N=k=>{R.current?.setChecked(k,false),T&&T(o,k);},F=k=>{R.current?.setChecked(k,false),T&&T(o,k);};return r==-1?(t.on("ROW_CHECKED",h),t.on("ROW_UNCHECKED",b),()=>{t.off("ROW_CHECKED",h),t.off("ROW_UNCHECKED",b);}):(t.on("ALL_ROWS_CHECKED",N),t.on("ALL_ROWS_UNCHECKED",F),()=>{t.off("ALL_ROWS_CHECKED",N),t.off("ALL_ROWS_UNCHECKED",F);})},[]),jsxs(m,{onContextMenu:h=>x?x(h,o):null,onClick:h=>y?y(h,e.data):()=>{},...i?{fx:{...S,when:P}}:{},as:`--row flex aic ${y?"--row-clickable":""} ${r==-1?"--row-head":""} ${p||""}`,children:[r==-1&&n.map((h,b)=>{let{renderWhenHeader:N,render:F,value:k,...A}=h;return jsxs(Fragment,{children:[c&&b==0&&v(-1,`--selector-${h.id}`,"all"),jsx(ro,{idx:-1,onSort:u,sortBy:f,value:k,...A,pubsub:t,style:a[h.id]})]},`--col-${h.id}`)}),d&&r>-1&&jsx(m,{as:"--col",children:jsx(Z,{as:"opacity:0",children:"..."})}),!d&&r>-1&&s&&o&&n.map((h,b)=>jsxs(Fragment,{children:[c&&b==0&&v(b,`--selector-${h.id}`,h.id.toString()),s.includes(String(h.id))?jsx(ro,{pubsub:t,idx:b,id:String(h.id),style:a[String(h.id)],value:h.render?h.render(o,r):o[String(h.id).includes(".")?String(h.id).split(".").reverse()[0]:h.id]}):null]},`--${String(h.id)}-val-${b}`))]})};ma.displayName="Zuz.Row";var no=ma;var da=(e,r)=>{let{schema:t,rows:n,rowCount:o,rowsPerPage:s,currentPage:a,pagination:i,paginationHash:f,showPaginationOnZeroPageCount:c,animateRows:l,header:d,rowClassName:p,selectableRows:u,hoverable:y,sortBy:T,loading:x,loadingRowCount:P,loadingMessage:S,spinner:R,emptyMessage:g,onSort:v,onRowClick:h,onRowSelectToggle:b,onPageChange:N,onRowContextMenu:F,...k}=e,A=useRef(null),L=useMemo(()=>t.reduce((ce,j)=>(ce[j.id]={flex:j.weight||1,...j.w&&{width:j.w},...j.maxW&&{maxWidth:j.maxW},...j.minW&&{minWidth:j.minW},...j.h&&{height:j.h},...j.maxH&&{maxHeight:j.maxH},...j.minH&&{minHeight:j.minH}},ce),{}),[t]),O=useMemo(()=>Object.keys(L),[t]),M=useMemo(()=>d??true,[d]),{style:_,className:I,rest:E}=B(k),U=useRef(null),q=useMemo(()=>new PubSub,[]),H=useRef(n.map(()=>uuid(8))),[$,X]=useState(T||null),[W,ee]=useState(S||"loading"),te=useMemo(()=>!x&&n&&n.length==0,[x,n]),le=useCallback(()=>g?typeof g=="function"?jsx(g,{}):g:jsx(Z,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);useEffect(()=>{n.length&&!H.current&&(H.current=n.map(()=>uuid(8)));},[n]);let pe=(ce,j)=>{X(ce),v?.(ce,j);},xe=(o||(n?n.length:0))/(s||10),ae=useMemo(()=>c||xe>1?jsx(wt,{hash:f,ref:A,renderOnZeroPageCount:c,onPageChange:N,paginationStyle:"table",startPage:a,itemCount:o||(n?n.length:0),itemsPerPage:s||10}):null,[a,o]);return useImperativeHandle(r,()=>({setLoading(ce){}})),jsxs(m,{as:`--table ${y??true?"--hoverable":""} flex cols rel ${I}`,ref:U,children:[M==true&&jsx(no,{sortBy:$,onSort:pe,tableRef:U,pubsub:q,selectable:u,index:-1,schema:t,loading:true,styles:L}),x&&jsxs(m,{as:"center-x flex aic --table-spinner",children:[jsx(we,{type:R||ye.Simple}),W&&jsx(Z,{as:"--table-loading-message",children:W})]}),x&&Array(P||5).fill({}).map((ce,j)=>jsx(no,{tableRef:U,index:j,pubsub:q,schema:t,styles:L,loading:true,animate:l,onRowClick:h},`--trow-loading-${j}-${t[0].id}`)),!x&&n&&n.map((ce,j)=>jsx(no,{tableRef:U,pubsub:q,loading:false,index:j,schema:t,ids:O,styles:L,animate:l,data:ce,onRowClick:h,rowClassName:p,selectable:u,onSelect:b,onContextMenu:F},`--trow-${H.current[j]||j}-${t[0].id}`)),te&&le(),i&&ae&&jsx(m,{"aria-hidden":!i||!ae,...l?{fx:{transition:Q.SlideInBottom,curve:oe.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&i&&ae!=null}}:{},as:"--row flex aic --row-footer",children:ae})]})};da.displayName="Zuz.Table";var yu=forwardRef(da),xu=yu;var vu=({ref:e,...r})=>{let{title:t,items:n}=r,[o,s]=useState(0),a=(i,f,c)=>{i.preventDefault(),s(f),document.getElementById(c)?.scrollIntoView({behavior:"smooth"});};return jsxs(m,{ref:e,as:"--table-of-contents rel flex cols",children:[jsx(Z,{as:"--toc-title",children:t}),jsx(Ye,{items:n.map((i,f)=>jsx("a",{className:o==f?"--toc-active":"",style:{anchorName:o===f?"--toc-active":"none",color:o==f?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:c=>a(c,f,i.tag),href:`#${i.tag}`,children:i.label}))})]})},Su=vu;var ga=({isActive:e,transitionType:r,speed:t,width:n,render:o,content:s,onHeightChange:a})=>{let i=useRef(null),f=useResizeObserver(i);useEffect(()=>{e&&f.height>0&&a(f.height);},[e,f.height]);let l=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 jsx(m,{ref:i,style:{...l},className:"--content",children:o||e?s:null})};ga.displayName="Zuz.TabBody";var ha=ga;var ba=({ref:e,...r})=>{let{tabs:t,speed:n=.3,prerender:o=true,variant:s,tabStyle:a="fixed",onChange:i,transitionType:f="slide",...c}=r,[l,d]=useState(0),p=useRef(null),u=useResizeObserver(p),y=useMemo(()=>uuid(8),[]),[T,x]=useState("auto"),P=useMemo(()=>u.width>0,[u.width]);useImperativeHandle(e,()=>({setTab:b=>d(b)}));let S=useMemo(()=>t.map(b=>({...b,key:b.key||uuid(8)})),[t]),{style:R,className:g,rest:v}=B({as:`flex cols w-full no-overflow ${c.as||""}`,...c}),h=()=>{if(!P)return {opacity:0};switch(f){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${S.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${l*u.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxs(m,{ref:p,style:R,className:`--tabview --${a} flex cols ${g}`,children:[jsx(Pt,{as:"--tabview-head",onSwitch:b=>{d(b.index);let N=S.find(F=>F.tag==b.tag);N&&N.onSelect&&(N.onSelect(N,b.index),i?.(N,b.index));},selected:l,items:S.reduce((b,N,F)=>(b.push({icon:N.icon,index:F,label:N.label,tag:N.tag}),b),[])}),jsx(m,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:T,transition:P?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:P?1:0},children:jsx(m,{className:"--track",style:{...h()},children:S.map((b,N)=>jsx(ha,{isActive:N===l,transitionType:f,speed:n,width:u.width,render:o||N===l,onHeightChange:F=>N===l&&x(F),content:b.body},`tab-body-${b.key||N}-${y}`))})})]})};ba.displayName="Zuz.TabView";var ku=ba;var Vu=({ref:e,commands:r,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[i,f]=useState([{type:"output",content:n}]),[c,l]=useState(""),d=useRef(null),p=useRef(null),{variant:u}=J(true);useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[i]);let y=g=>{let v=typeof g=="string"?{type:"output",content:g}:g;f(h=>{let b=[...h,v];return b.length>1e3?b.slice(-1e3):b});},T=()=>f([]);useImperativeHandle(e,()=>({write:y,clear:T}));let x=async g=>{let[v,...h]=g.split(" "),b=v.toLowerCase();return r&&r[b]?await r[b](h):t?await t(g):`command not found: ${v}`},P=g=>{let v=/\u001b\[(\d+)m/g,h=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},N=0,F="#d4d4d4",k=false,A;for(;(A=v.exec(g))!==null;){let O=g.slice(N,A.index);O&&h.push({text:O,color:F,bold:k});let M=A[1];M==="0"?(F="#d4d4d4",k=false):M==="1"?k=true:b[M]&&(F=b[M]),N=v.lastIndex;}let L=g.slice(N);return L&&h.push({text:L,color:F,bold:k}),h},S=(g,v)=>g.includes("\x1B")?P(g).map((h,b)=>jsx(ie,{style:{color:h.color||"#d4d4d4",fontWeight:h.bold?"bold":"normal"},children:h.text},`--terminal-msg-${b}-${h.text.replace(/\S+/g,"-")}`)):jsx(ie,{style:{color:v==="error"?"#ff5f56":v==="command"?"#00ff00":"#d4d4d4"},children:g}),R=async g=>{if(g.key==="Enter"&&c.trim()){let v=c.trim(),h=[...i,{type:"command",content:`${o}${v}`}];l(""),f(h);let b=await x(v);f(N=>[...N,{type:"output",content:b}]);}};return jsxs(m,{as:`--zuz-terminal --${s||u||G.Medium} flex cols ${a.className}`,onClick:()=>p.current?.focus(),children:[jsx(m,{ref:d,className:"--terminal-log",children:i.map((g,v)=>jsx(m,{children:jsx(Z,{children:S(g.content,g.type)})},v))}),jsxs(m,{as:"flex aic --terminal-input",children:[jsx(Z,{as:"--terminal-prompt",children:o}),jsx(ue,{ref:p,className:"--zuz-term-input",autoFocus:true,value:c,variant:s||u||G.Medium,onChange:g=>l(g.target.value),onKeyDown:R})]})]})},Du=Vu;var Hu=({meta:e})=>jsxs(K,{as:"flex aic --command-item",children:[e.icon&&jsx(re,{name:e.icon,as:"--command-icon"}),jsx(Z,{children:e.label})]}),Au=({position:e,onSelect:r,commands:t,visible:n})=>jsx(m,{"aria-hidden":!n,fx:{transition:Q.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(o=>jsx(Hu,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),Ca=Au;var Ra=({ref:e,...r})=>{let {autoResize:t,maxHeight:n,variant:o,resize:s="none",command:a,commands:i,name:f,onInput:c,cmd:l,renderDropdown:d,value:p,defaultValue:u,...y}=r,T=useRef(null),x=useRef(null),{variant:P}=J(true),{style:S,className:R,rest:g}=B(y),v=He();f?v.errors?.[f]:null;let b=f&&v.values&&v.setFieldValue,N=b?v.values?.[f]:void 0,F=useDebounce(E=>{b&&v.setFieldValue?.(f,E);},500),{showDropdown:k,dropdownPosition:A,handleKeyDown:L,handleInput:O,handleCommandSelect:M}=useCommandActions({command:a,commands:i,cmd:l,ref:T}),_=useCallback(()=>{let E=T.current;!E||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{E.style.height="auto";let U=E.scrollHeight;if(n){let q=parseInt(n.toString(),10);isNaN(q)||(U=Math.min(U,q));}E.style.height=`${U}px`,E.style.overflowY=n&&U>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),I=E=>{F(E.currentTarget.value),c?.(E),O(E),_();};return useEffect(()=>{T.current&&f&&N!==void 0&&T.current.value!==String(N)&&(T.current.value=String(N));},[N,f]),useEffect(()=>{_();},[p,u,_]),useEffect(()=>{t&&T.current&&_();},[t,_]),useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),useEffect(()=>()=>{b&&v.deleteFieldValue?.(f);},[]),jsxs(m,{as:"rel",children:[jsx("textarea",{name:f,className:`--input --textarea --${o||P||G.Medium} flex ${R}`.trim(),style:{...S,resize:s,height:t?"auto":S?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:L,onInput:I,ref:E=>{T.current=E,typeof e=="function"?e(E):e&&(e.current=E);},value:p,defaultValue:u,...g}),d?d({show:k,position:A,commands:i||[],onSelect:M}):i&&i.length>0&&jsx(Ca,{visible:k,commands:i,onSelect:M,position:A})]})};Ra.displayName="Zuz.TextArea";var Zu=Ra;var Na=forwardRef((e,r)=>{let{as:t,value:n,color:o,direction:s,...a}=e,i=useRef(null),[f,c]=useState(n||0);return useImperativeHandle(r,()=>({updateValue(l){f.toString().length!==l.toString().length&&c(l);},setValue(l){if(this.updateValue(l),i.current){let d=l.toString().split("");i.current.querySelectorAll(".--wheel-char").forEach((p,u)=>{let y=d[u];if(p instanceof HTMLElement){p.setAttribute("data-value",y);let T=p.querySelector(".--wheel-char-track");T instanceof HTMLElement&&(T.style.setProperty("--v",y),T.offsetWidth);}});}}})),useEffect(()=>{c(n||0);},[n]),jsxs(m,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:i,...a,children:[(f||0).toString().split("").map((l,d)=>isNaN(parseInt(l,10))?jsx(ie,{className:"--wheel-char wheel-char-symbol grid",children:l},`wheel-char-symbol-${d}`):jsx(ie,{"data-value":l,className:`--wheel-char grid ${d>(f||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxs(ie,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":l},children:[jsx(ie,{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((p,u)=>jsx(ie,{children:p},`${d}--${u}`)),jsx(ie,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),o&&jsx(m,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});Na.displayName="Zuz.TextWheel";var Yu=Na;var br=forwardRef((e,r)=>{let{as:t,meta:n,nodes:o,icons:s,onSelect:a,treeTag:i,selected:f,roots:c,expanded:l,...d}=e,{tag:p,label:u,icon:y,under:T,isHead:x}=n,P=useMemo(()=>c.includes(p),[c]),[S,R]=useState(l),g=()=>{localStorage.setItem(`--tn${i}-${p}`,S?"0":"1"),R(!S);};useEffect(()=>{l||P&&!localStorage.getItem(`--tn${i}-${p}`)?(localStorage.setItem(`--tn${i}-${p}`,"1"),R(true)):R(localStorage.getItem(`--tn${i}-${p}`)=="1");},[]);let v=useMemo(()=>o.filter(h=>h.under==p),[o,p]);return jsxs(m,{className:`--treenode ${P?"--is-root":""} --treenode-${p} flex cols`,children:[jsxs(m,{className:`--node --node-${p} flex aic ${f==p?" --selected":""}`,children:[jsx(K,{skeleton:d.skeleton,onClick:g,className:"--node-aro-btn",disabled:v.length==0,children:s?.arrowClose&&s?.arrowOpen?jsx(re,{skeleton:d.skeleton,className:"--node-aro-icon",name:v.length==0?s?.arrowDisabled||s?.arrowClose:S?s?.arrowOpen:s?.arrowClose}):v.length==0?V.chevronBottom:S?V.chevronBottom:V.chevronRight}),jsxs(K,{className:"--node-meta flex aic",onClick:h=>a(p),children:[(s?.nodeOpen&&s?.nodeClose||P&&s?.rootOpen&&s?.rootClose)&&jsx(re,{skeleton:d.skeleton,className:`--node-icon ${P?"--icon-root":""}`,name:y||(S?P&&s?.rootOpen||s.nodeOpen:P&&s?.rootClose||s?.nodeClose)}),jsx(Z,{className:`--node-label ${P?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:u})]})]}),S&&v.length>0&&jsx(m,{className:`--sub-node tree-sub-node-${p} flex cols`,children:v.map(h=>jsx(br,{treeTag:i,selected:f,onSelect:a,icons:s,roots:c,expanded:h.expanded||false,meta:h,nodes:o},`--node-${h.tag}`))})]})});br.displayName="TreeItem";var Ea=br;var La=forwardRef((e,r)=>{let{as:t,nodes:n,onNodeSelect:o,tag:s,icons:a,roots:i,selected:f,...c}=e,[l,d]=useState(f);useImperativeHandle(r,()=>({getSelected:()=>l}),[o]);let p=u=>{d(u),o&&o(u);};return useEffect(()=>{l!=f&&d(f);},[f]),jsx(m,{className:"--treeview flex cols",children:n.filter(u=>i.includes(u.tag)).map(u=>jsx(Ea,{treeTag:s?`-${s}`:"",selected:l,onSelect:y=>p(y),icons:a,meta:u,roots:i,expanded:u.expanded||false,skeleton:c.skeleton,nodes:n},`--node-${u.tag}`))})});La.displayName="Zuz.TreeView";var nf=La;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
13
- export{Re as ALERT,Tr as AVATAR,bl as Accordion,Pl as ActionBar,Nl as Alert,Jl as AutoComplete,ic as Avatar,cc as Badge,m as Box,Kc as Bubble,Yn as BubbleMediaType,Xn as BubbleStatus,K as Button,Wn as CHART,Ve as CHECKBOX,cf as COLORTHEME,Ko as Calendar,Oc as Carousel,Fc as Chart,Tt as CheckBox,om as CodeBlock,xm as ColorScheme,wo as ContextMenu,wm as CookiesConsent,ke as Cover,Dm as CropShape,Om as Cropper,Am as Crumb,uf as DATATYPE,tt as DIALOG,Pr as DIALOG_ACTION_POSITION,Se as DRAWER_SIDE,_m as DatePicker,Ro as Dialog,Eo as Drawer,Lt as FILTER,We as FORMVALIDATION,ff as FORMVALIDATION_STYLE,Gm as Fab,Xm as Filters,Fe as Flex,mp as Form,fp as Grid,Co as Group,re as Icon,je as Image,ue as Input,lr as KeyboardKeys,Ms as KeysLabelMap,Ls as KeysMap,Ct as Label,bo as LayersProvider,Ye as List,Tp as MediaPlayer,Np as NetworkStatus,ft as ORIGIN,mf as OriginType,Ge as Overlay,ut as POSITION,gf as PROGRESS,wt as Pagination,qt as PaginationStyle,Vp as Password,$p as PinInput,ge as Position,qe as ProgressBar,po as RADIO,Zp as Radio,Ie as SHEET,co as SHEET_ACTION_POSITION,lf as SKELETON,mo as SLIDER,pf as SORT,ye as SPINNER,Io as ScrollView,cr as Search,ru as Select,Pt as SelectTabs,tp as Sheet,rt as Slider,_t as SnackPosition,ln as SnackStyle,Ft as SnackType,ie as Span,we as Spinner,df as Status,nu as Switch,Q as TRANSITIONS,oe as TRANSITION_CURVES,ku as TabView,xu as Table,Su as TableOfContents,Du as Terminal,Z as Text,Yu as TextWheel,Zu as Textarea,Fa as ThemeProvider,cn as ToastDefaultTitle,_t as ToastPosition,Lo as ToastProvider,ln as ToastStyle,Ft as ToastType,Qo as ToolTip,nf as TreeView,G as Variant,dt as animationTransition,uo as buildClassString,Nr as buildWithStyles,Of as css,fo as getAnimationCurve,Vf as getAnimationTransition,Oa as getZuzMap,ks as isKeyCombination,Ir as setZuzMap,B as useBase,Xi as useContextMenu,Qi as useDialog,tl as useDrawer,he as useFx,nl as useMorph,bt as usePosition,pl as useSnack,Mo as useToast};
11
+ <span class="--line-content">${y||" "}</span>
12
+ </div>`}).join("")},[t,h]);return jsxs(p,{as:`--code-block rel ${d}`,style:u,...c,children:[jsx("pre",{ref:e,children:jsx("code",{className:`--code --lang-${o}`,dangerouslySetInnerHTML:{__html:T}})}),n&&jsx(_,{as:"--copy-code abs",onClick:()=>{copyToClipboard(t),n.onCopy?.();},children:"Copy"})]})},ym=hm;var ms=({onSelect:e,meta:r,selected:t,disabled:n=false})=>{let o=useRef(null),{index:s,icon:a,label:l}=r,[f,c]=useState({x:0,width:0}),i=useDelayed();return useLayoutEffect(()=>{if(i&&o.current){let{width:d,x:u}=o.current.getBoundingClientRect();c({x:u,width:d}),t&&e(s,d,u,r,true);}},[i,o.current]),useEffect(()=>{t&&e(s,f.width,f.x,r,false);},[t]),jsxs(_,{disabled:n,onClick:()=>e(s,f.width,f.x,r,false),ref:o,className:`--segment-item flex aic rel ${t?"--segment-active":""}`.trim(),children:[a?typeof a=="string"?jsx(ee,{name:a,as:"--segment-icon"}):jsx(p,{as:"--segment-icon flex aic jcc",children:a}):null,l&&String(l).trim()!=""&&jsx(p,{className:"--segment-label",children:l||`Item ${s}`})]})};ms.displayName="SelectTabItem";var ps=ms;var fs=forwardRef((e,r)=>{let{fx:t,items:n,selected:o,variant:s,disabled:a=false,onSwitch:l,...f}=e,[c,i]=useState(o||0),d=useDelayed(50),u=useRef(c),{className:m,style:h,rest:T}=B(f),x=useRef(null),P=useRef(null),{variant:S}=Q(true),R=(g,v,y,b,N)=>{if((N||c!=g&&c!=-2)&&(i(g),u.current=c,queueMicrotask(()=>{d&&l?.(b);})),x.current){let H=P.current?.getBoundingClientRect();x.current.style.setProperty("--w",`${v}px`),x.current.style.setProperty("--x",`${H?y-H.left:y}px`);}};return useImperativeHandle(r,()=>({setSelected:g=>{typeof g=="number"&&g!=c&&i(g);}}),[c]),jsxs(p,{ref:P,"data-selected":c,className:`${m} --segmented --${s||S||q.Medium} flex aic rel`,style:h,...T,children:[jsx(p,{ref:x,className:`--segment-tab --${a?"disabled":"abled"} abs`}),n.map((g,v)=>jsx(ps,{disabled:a,onSelect:R,selected:c==v,meta:{...g,index:v}},`segment-${g.label}-${v}`))]})});fs.displayName="Zuz.SelectTabs";var Lt=fs;var hs=forwardRef((e,r)=>{let{type:t,variant:n,...o}=e,s=useDelayed(),{colorScheme:a,setColorScheme:l}=Io(),f=useCallback(()=>{l(a=="dark"?"light":a=="light"?"system":"dark");},[a]),{variant:c}=Q(true),{className:i,style:d}=B(o),u=useMemo(()=>t=="system"?[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"system",index:1,label:"",icon:V.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:V.colorSchemeLight},{tag:"dark",index:2,label:"",icon:V.colorSchemeDark}],[]),m=useMemo(()=>["light","system","dark"].indexOf(a),[a]);return !s||m==-1?null:t=="system"||t=="switch"?jsx(Lt,{className:`--color-scheme --${t}`,onSwitch:({tag:h})=>{l(h);},selected:m,items:u,...o}):jsx(_,{onClick:f,style:d,variant:n,as:`--color-scheme-switch ${i}`.trim(),children:a=="system"?V.colorSchemeSystem:a=="light"?V.colorSchemeLight:V.colorSchemeDark})});hs.displayName="Zuz.ColorScheme";var Mm=hs;var xs=forwardRef((e,r)=>{let[t,n]=useState("wait"),{title:o,message:s,acceptLabel:a,rejectLabel:l,position:f}=e,c=async i=>{n(i==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(i));};return useEffect(()=>{let i=localStorage.getItem("--ccnt");n(i?i=="1"?"accepted":"rejected":"pending");},[]),jsxs(p,{fx:{from:{x:-1e3},to:{x:0},when:t=="pending",curve:te.EaseInOut,duration:.5,delay:t=="accepted"?0:3},as:`--cookie-consent --${t} --${f||ye.Left} flex cols`,children:[jsx(K,{as:"--title",children:o||"This site uses cookies"}),jsx(K,{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"}),jsxs(p,{as:"--footer flex aic",children:[jsx(_,{onClick:i=>c(1),as:"--accept",children:a||"Accept All"}),jsx(_,{onClick:i=>c(0),as:"--reject",children:l||"Cancel"})]})]})});xs.displayName="Zuz.CookiesConsent";var Hm=xs;var Ss=({ref:e,...r})=>{let {title:t,position:n,margin:o=4,anchorName:s="--tooltip-anchor",children:a,show:l,variant:f,...c}=r,{style:i,className:d,rest:u}=B(c),m=n||ye.Top;useRef(null);let [T,x]=useState(false);useRef(6);let S=l===true||T,g=`--anchor-${useId().replace(/:/g,"")}`,{tooltip:v}=Q(true),y=useMemo(()=>{let N=false;return addPropsToChildren(a,H=>{let E=H.props.className?.includes(s);return E&&(N=true),E||!N},(H,E)=>{let $=E.props.className?.includes(s),M=H===0,O={};return ($||M)&&(O.style={...E.props.style,anchorName:g}),M&&(O.onMouseEnter=z=>{x(true),E.props.onMouseEnter?.(z);},O.onMouseLeave=z=>{x(false),E.props.onMouseLeave?.(z);}),O})},[a,s,g]),b=xe({transition:m==ye.Top?j.SlideInTop:m==ye.Bottom?j.SlideInBottom:m==ye.Left?j.SlideInLeft:j.SlideInRight,when:S,duration:.2,offset:o+6,margin:m==ye.Top||m==ye.Left?-o:o,curve:v?.curve||te.EaseInOut});return useImperativeHandle(e,()=>({show:()=>x(true),hide:()=>x(false),setPosition:()=>{}})),jsxs(Fragment$1,{children:[y,jsx(p,{style:{positionAnchor:g,...b.style,...m===ye.Top||m===ye.Bottom?{"--fx-x":"-50%"}:{"--fx-y":"-50%"}},as:`--tooltip --visb-${S} --${f||v?.variant||q.Small} --${m} abs ${d}`.trim(),children:typeof t=="string"?jsx(K,{as:"--text rel",children:t}):t})]})};Ss.displayName="Zuz.ToolTip";var ir=Ss;var ws=({ref:e,...r})=>{let {type:t,value:n=0,min:o=0,max:s=1,step:a=.01,onChange:l,showGhostBar:f,showKnobOnHover:c,showToolTip:i,roundValue:d,formatValue:u,...m}=r,{className:h,style:T,rest:x}=B(m),P=useRef(a||.01).current,S=useRef(o||0).current,R=useRef(s||1).current,g=useRef(n||0).current,v=useRef(null),y=useRef(null),b=useRef(null),N=useRef(null);useRef(null);let E=useRef(null),$=useRef(null),M=useRef(null),O=useRef(null),z=(oe,le,fe)=>(oe-le)/(fe-le)*100,Z=oe=>{if(y.current){let le=parseFloat(oe.currentTarget.value);ne(le);let fe=z(le,parseFloat(oe.currentTarget.min),parseFloat(oe.currentTarget.max));y.current.style.setProperty("--value",`${fe}`),y.current.setAttribute("data-value",`${le}`),l&&l(d?+le.toFixed(2):le);}},[I,k]=useState(false),[X,Y]=useState(0),[A,F]=useState(0),[G,W]=useState(false),ne=async oe=>{let le=u?u(+oe):d?(+oe).toFixed(2):Math.round(+oe);M.current&&(M.current.textContent=String(le));},ae=oe=>{if(I){let le=oe.clientX-X,fe=R-S,Ie=le/200*fe,ve=Math.max(S,Math.min(A+Ie,R));if(ve=Math.round(ve/P)*P,ne(ve),y.current){let $e=z(ve,S,R);y.current.style.setProperty("--value",`${$e}`),y.current.setAttribute("data-value",`${ve}`),$.current&&($.current.textContent=d?ve.toFixed(2):ve.toString()),l&&l(ve);}}},pe=()=>{k(false),document.body.style.cursor="auto";},he=oe=>(oe-S)/(R-S)*100,ie=oe=>{if(!y.current)return;let le=y.current.getBoundingClientRect(),fe=oe.clientX-le.left,Ae=Math.max(0,Math.min(100,fe/le.width*100));if(i&&M.current){let Ie=v.current?+v.current.value:n;ne(Ie*100);}if(f){let Ie=he(v.current?+v.current.value:n),ve=Math.min(Ie,Ae),$e=Math.abs(Ae-Ie);y.current.style.setProperty("--ghost-start",`${ve}`),y.current.style.setProperty("--ghost-width",`${$e}`);}};useEffect(()=>{y.current&&y.current.style.setProperty("--value",v.current?`${z(parseFloat(v.current.value),parseFloat(v.current.min),parseFloat(v.current.max))}`:g.toString());},[]),useEffect(()=>(I?(document.addEventListener("mousemove",ae),document.addEventListener("mouseup",pe)):(document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",pe)),()=>{document.removeEventListener("mousemove",ae),document.removeEventListener("mouseup",pe);}),[I]),useEffect(()=>{let oe=z(n,S,R);y.current?.style.setProperty("--value",`${oe}`),ne(n);},[n,S,R,M.current]);let U=()=>jsxs(p,{ref:y,onMouseEnter:()=>W(true),onMouseLeave:()=>W(false),onMouseMove:ie,className:`--slider --${t||vo.Default} ${c?"--knob-hover":""} flex rel ${h}`.trim(),style:{...T},children:[jsx(p,{ref:E,className:"--slider-track abs fill"}),f&&jsx(p,{ref:N,className:"--slider-ghost abs fill"}),jsx(p,{className:"--slider-track-filled abs fill",style:{width:"calc(var(--value) * 1%)"}}),jsx(p,{ref:b,className:"--slider-knob --tooltip-knob abs"}),jsx(de,{ref:v,onInput:Z,className:"abs fill",tabIndex:0,type:t||vo.Default,defaultValue:g||0,step:P,max:R,min:S})]});if(i===true){let oe=u?u(n):d?n.toFixed(2):n;return jsx(ir,{ref:O,show:I,position:bt.Top,margin:15,anchorName:"--tooltip-knob",title:jsx(me,{ref:M,children:oe}),children:U()})}return U()};ws.displayName="Zuz.Slider";var lt=ws;var Ts=forwardRef((e,r)=>{let{src:t,shape:n,size:o,...s}=e,{style:a,className:l,rest:f}=B(s),{canvasRef:c,crop:i,setScale:d,handleMouseDown:u,handleMouseUp:m,handleMouseMove:h}=useImageCropper(t,o||200,n||CropShape.Circle);return useImperativeHandle(r,()=>({getCropped(){return i()},setScale(T){d(T);}})),jsxs(p,{as:`--cropper --${n||CropShape.Circle} ${l}`,style:a,...f,children:[jsx("canvas",{ref:c,width:o||200,height:o||200,onMouseDown:u,onMouseUp:m,onMouseLeave:m,onMouseMove:h}),jsx(p,{as:"--cropper-slider",children:jsx(lt,{onChange:T=>d(T),min:0,max:1,step:.01,value:1})})]})});Ts.displayName="Zuz.Cropper";var Xm=Ts;var jm=(t=>(t.Circle="circle",t.Square="square",t))(jm||{});var Rs=forwardRef((e,r)=>{let{items:t,maxItems:n}=e,o=useMemo(()=>{let l=typeof t=="string",f=l?[]:t;return l&&t.split(",").forEach(c=>{f.push({label:c});}),f},[t]),a=useMemo(()=>n&&n>0&&o.length>n-1,[o,n])?[...o.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...o.slice(-n)]:o;return jsx(tt,{ref:r,className:"--crumb flex aic",direction:"rows",seperator:jsx(p,{as:"--crumb-chevron",children:V.chevronRightOutline}),items:a.map((l,f,c)=>l.ID=="."?jsx(p,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsx(p,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${f}`))}):jsxs(_,{onClick:()=>l.action?.(),className:"--crumb-item",disabled:!c[f+1],children:[l.icon&&jsx(ee,{as:"--crumb-icon",name:l.icon}),jsx(K,{as:"--crumb-label",children:l.label})]},`${l.label.replace(/\s+/g,"-").toLowerCase()}-${f}`))})});Rs.displayName="Zuz.Crumb";var Jm=Rs;var Es=forwardRef((e,r)=>{let{icon:t,defaultValue:n,value:o,size:s,variant:a,numeric:l,type:f,onConfirm:c,...i}=e,[d,u]=useState(false),[m,h]=useState(n||null),{style:T,className:x,rest:P}=B(i),S=useRef(null),R=useRef(null),{reposition:g}=Rt(R,{direction:ye.Bottom,offset:2}),v=b=>{l&&(b.currentTarget.value=b.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};useEffect(()=>{let b=N=>{let H=N.target,E=S.current?.contains(H),$=R.current?.contains(H);!E&&!$&&u(false);};return d&&document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b);}},[d]),useEffect(()=>{let b=N=>{N.key==="Escape"&&d&&(u(false),S.current?.focus());};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let y=()=>{u(true);};return useEffect(()=>{d&&g();},[d,g]),jsx(Fragment$1,{children:jsxs(p,{as:`--date-picker ${a?`--${a}`:""} rel flex aic ${x}`,"data-value":m?m.toISOString():"",children:[t?typeof t=="string"?jsx(ee,{as:"mr:10 c:#666",name:t}):t:jsx(me,{as:"--date-picker-icon flex aic jcc",children:V.calendar}),jsx("input",{ref:S,value:m?format(m,"EEE, MMM d YYY hh:mm a"):o||"",className:`--input ${a?`--${a}`:""} flex`.trim(),style:T,onFocus:y,onInput:v,autoComplete:"new-password",onKeyDown:b=>{b.key=="Enter"&&c?.(b.currentTarget.value);},...P}),jsx(p,{"aria-hidden":!d,ref:R,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:d,duration:.05},as:`--date-picker-chooser flex aic ${a?`--${a}`:""}`,children:jsx(Jo,{defaultValue:m,onChange:b=>{h(b),u(false);}})})]})})});Es.displayName="Zuz.DatePicker";var rp=Es;var Bs=forwardRef((e,r)=>{let{icon:t,variant:n,position:o}=e;return jsx(_,{className:`--fab fixed --${n||q.Large} --${o||"bottomright"}`,children:t||V.plus})});Bs.displayName="Zuz.Fab";var ip=Bs;var ks=e=>{let{names:r,strength:t}=e,n={[$t.Gooey]:o=>jsxs("filter",{id:"gooey",children:[jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:o||10,result:"blur"}),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"}),jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${$t.Gooey}`)};return useEffect(()=>{},[r]),jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsx("defs",{children:(r||[$t.Gooey]).map(o=>n[o](t))})})};ks.displayName="Zuz.Filters";var mp=ks;var Ls=({cols:e,gap:r,ais:t,aic:n,aie:o,jcs:s,jcc:a,jce:l,className:f="",style:c,...i})=>{let d=["--flex",e?"--cols":"",t?"--ais":"",n?"--aic":"",o?"--aie":"",s?"--jcs":"",a?"--jcc":"",l?"--jce":"",f].filter(Boolean).join(" "),u={...c,gap:typeof r=="number"?`${r}px`:r};return jsx(p,{...i,className:d,style:u})};Ls.displayName="Zuz.FlexBox";var De=Ls;var Ge=null,Re=null,Os=forwardRef((e,r)=>{let{title:t,message:n,transition:o,curve:s,speed:a,type:l,actionPosition:f,spinner:c,loadingMessage:i,onShow:d,onHide:u,...m}=e,{className:h,style:T,rest:x}=B(m),[P,S]=useState(t||""),[R,g]=useState(n||""),[v,y]=useState(null),[b,N]=useState(l||Ee.Default),H=useMemo(()=>uuid(12),[]),[E,$]=useState(false),M=useRef(null),O=useRef(null),[z,Z]=useState(false),[I,k]=useState(true),X=useRef(null),Y=R;useImperativeHandle(r,()=>({setLoading(F){Z(F);},showDialog(F,G,W,ne){Ge&&(clearTimeout(Ge),Re&&clearTimeout(Re),M.current.classList.remove("--wobble"),setTimeout(()=>M.current.classList.add("--wobble"),50),Re=setTimeout(()=>{M.current.classList.remove("--wobble"),Re=null;},500)),N(Ee.Dialog),G&&g(G),F&&S(F),W&&y(W.reduce((J,ae)=>(J.push({...ae,key:ae.key||uuid(12)}),J),[])),$(true),setTimeout(()=>ne?ne():()=>{},1e3);},dialog(F,G,W,ne){Ge&&(clearTimeout(Ge),Re&&clearTimeout(Re),M.current.classList.remove("--wobble"),setTimeout(()=>M.current.classList.add("--wobble"),50),Re=setTimeout(()=>{M.current.classList.remove("--wobble"),Re=null;},500)),N(Ee.Dialog),g(G),S(F),W&&y(W.reduce((J,ae)=>(J.push({...ae,key:ae.key||uuid(12)}),J),[])),$(true),setTimeout(()=>ne?ne():()=>{},1e3);},error(F,G){this.show(F,G,Ee.Error);},warn(F,G){this.show(F,G,Ee.Warn);},success(F,G){this.show(F,G,Ee.Success);},show(F,G,W){Ge&&(clearTimeout(Ge),Re&&clearTimeout(Re),O.current=M.current.style.transform,M.current.style.transform="",M.current.classList.remove("--wobble"),setTimeout(()=>{M.current.classList.add("--wobble"),M.current.style.transform=`${O.current} scale(.9)`.trim();},50),Re=setTimeout(()=>{M.current.classList.remove("--wobble"),M.current.style.transform=O.current||"",Re=null;},500)),Ge=setTimeout(()=>{$(false),Ge=null,Re=null;},(G||4)*1e3),N(W||Ee.Default),g(F),$(true),d?.();},hide(){$(false),u?.();}}));let A=useMemo(()=>{let F={when:E,duration:a||.3,delay:.1};if(b==Ee.Dialog){if(o){let{from:G,to:W}=St(o,20);return {from:G,to:W,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}},[E,b]);return useEffect(()=>{X.current&&clearTimeout(X.current),E?k(true):X.current=setTimeout(()=>k(false),1e3);},[E]),b==Ee.Dialog?jsxs(Fragment$1,{children:[jsx(je,{when:E}),jsxs(p,{className:`--sheet --sheet-${b.toLowerCase()} ${E?"is-visible":""} ${h} fixed`.trim(),style:T,fx:A,...x,ref:M,children:[jsx(Me,{when:z,spinner:c,message:i}),jsxs(p,{className:"--head flex aic rel",children:[jsx(p,{className:`--${P?"title":"dot"} flex aic rel`,children:P||""}),jsx(_,{onClick:F=>$(false),className:"--closer abs",children:"\xD7"})]}),jsx(p,{className:`--body flex aic rel ${v?"":"--no-action"}`.trim(),children:I?Y:null}),v&&jsx(p,{className:`--footer flex aic rel ${f?f==bo.Center?"jcc":"":"jce"}`.trim(),children:v.map((F,G)=>jsx(_,{onClick:W=>F.handler?F.handler():F.onClick?F.onClick():console.log("onClick Handler missing"),className:"--action",children:F.label},`sheet-${H}-action-${F.key}`))})]})]}):jsx(p,{className:`--sheet --sheet-${b.toLowerCase()} ${h} abs`.trim(),style:T,...x,fx:A,ref:M,children:E?R:null})}),Vs=e=>typeof e=="object"&&e!=null&&"setLoading"in e&&"success"in e&&"error"in e;Os.displayName="Zuz.Sheet";var hp=Os;var Tp=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 l=!isNaN(Number(n[a+1]));o[s]=o[s]||(l?[]:{});}return o[s]},r);}return r},Ds=({ref:e,...r})=>{let {schema:t,name:n,cover:o,spinner:s,errors:a,action:l,children:f,withData:c,beforeSubmit:i,onSubmit:d,onError:u,onSuccess:m,resetOnSuccess:h,...T}=r,{className:x,style:P,rest:S}=B(T),[R,g]=useState(false),v=useRef(null),y=_o(),b=Xo();qo();let H=useRef(null),E=useCallback(A=>v.current?v.current.querySelectorAll(A):[],[v.current]),$=A=>({name:A.name||A.getAttribute("name")||A.getAttribute("data-name"),required:A.required?true:A.getAttribute("data-required")?A.getAttribute("data-required")=="true":false,with:A.with||A.getAttribute("with")}),M=A=>{let F=[];return A.querySelectorAll(".--input").forEach(G=>{F.push(G.value);}),F.join("")},O=A=>A.classList.contains("--otp")?M(A):A.classList.contains("--select")?A.querySelector("button.--selected")?.dataset.value:A.classList.contains("--checkbox")||A.getAttribute("type")==="checkbox"?A.checked:A.value,z=useCallback(A=>{let{name:F,required:G,with:W}=$(A),ne=O(A);if(t&&t[F]&&b?.getSnapshot()){let J=t[F](ne,b.getSnapshot().values);if(J===false||typeof J=="string")return typeof J=="string"&&b?.setFieldError(F,J),false}if(G&&(A.type==="checkbox"&&!A.checked||A.classList.contains("--select")&&(ne==="-1"||!ne)||!ne||ne===""))return false;if(W)switch((W.includes("@")?W.split("@")[0]=="match"?Ye.MatchField:W.split("@")[0]:W).toUpperCase()){case Ye.IPV4:return _$1(ne).isIPv4();case Ye.IPV6:return _$1(ne).isIPv6();case Ye.Email:return _$1(ne).isEmail();case Ye.Uri:try{return new URL(ne),!0}catch{return false}case Ye.MatchField:let[ae,pe,he]=W.split("@"),ie=document.querySelector(`[name=${pe.trim()}]`);if(!ie)return false;switch(he||"direct-match"){case "if-not-empty":if(ie&&!_$1(ie.value).isEmpty()&&ie.value!=A.value)return false;break;case "direct-match":if(ie&&ie.classList.contains("--otp")&&A.classList.contains("--otp")&&M(ie)!=M(A))return false;if(ie&&ie.value!=A.value)return false;break}break}return true},[t,b]),Z=useCallback(()=>{let A={},F={...b?.getSnapshot().values||{}},G=null,W=null;if(E("[name]").forEach(J=>{let{name:ae,required:pe,with:he}=$(J),ie=pe||he?z(J):true,ce=O(J);A[ae]={valid:ie,value:ce},F[ae]=ce,b?.setFieldError(ae,ie?null:a?.[ae]||"Invalid"),ie?J.classList.remove("--with-error"):(J.classList.add("--with-error"),G||(G=J),W=a?.[ae]);}),G){let J=G;if(J.classList.contains("--otp"))for(let ae of Array.from(J.querySelectorAll(".--input"))){let pe=ae;if(pe.value==""){pe.focus();break}}else J.focus();}let ne=Tp(F);return {error:G!=null,errorMsg:W||"Fix errors to continue...",data:A,payload:ne}},[v.current,b]),I=useCallback((A={})=>{let{error:F,errorMsg:G,payload:W,data:ne}=Z();if(F){y.error(G);return}l?startTransition(async()=>{g(true),withPost(l,{...c,...W,...A}).then(J=>{g(false),h&&b?.reset(),m?.(J,{...c,...W,...A}),m||y.success(J.message||"Redirecting...");}).catch(J=>{g(false),u?u(J):y.error(J.message);});}):d?.(W,ne);},[Z,l,c,m,u,h,d]),k=useCallback(()=>{let A=E("[type=submit]");!A||A.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):A.forEach(F=>{F.addEventListener("click",I);});},[v.current]),X=useMemo(()=>addPropsToChildren(f,A=>A.props.type=="submit",A=>({ref:H})),[f]),Y=useRef(I);return useImperativeHandle(e,()=>({setLoading:A=>g(A),submit:A=>Y.current(A),init:k,hideError:()=>y.clearAll()}),[I,k]),useEffect(k,[]),useEffect(()=>{Y.current=I;},[I]),useEffect(()=>{let A=E("[type=submit]"),F=Array.from(A).map(G=>{let W=G;return W.addEventListener("click",I),()=>W.removeEventListener("click",I)});return ()=>F.forEach(G=>G())},[I,E]),jsxs(p,{ref:v,style:P,className:`--form flex rel ${x}`,children:[!Vs(o)&&jsx(Me,{when:R,spinner:s,...o}),X]})};Ds.displayName="Zuz.FormInternal";var Hs=e=>jsx(Vn,{initialValues:e.withData,children:jsx(Ds,{...e})});Hs.displayName="Zuz.Form";var Pp=Hs;var As=e=>{let {ref:r,cols:t,rows:n,gap:o,gapX:s,gapY:a,align:l,justify:f,inline:c,flow:i,autoCols:d,autoRows:u,template:m,...h}=e;useRef(null);let {className:x,style:P,rest:S}=B(h),R=v=>typeof v=="number"?`repeat(${v}, 1fr)`:v,g={display:c?"inline-grid":"grid",gridTemplateColumns:R(t),gridTemplateRows:R(n),gap:o,columnGap:s,rowGap:a,alignItems:l,justifyContent:f==="between"?"space-between":f==="around"?"space-around":f,gridAutoFlow:i,gridAutoColumns:d,gridAutoRows:u,gridTemplateAreas:m,...P};return jsx(p,{ref:r,as:`--grid ${x}`.trim(),style:g,...S})};As.displayName="Zuz.Grid";var Np=As;var $s=e=>typeof e=="string"&&e.includes("+"),zs={command:"\u2318",shift:"\u21E7",ctrl:"\u2303",option:"\u2325",enter:"\u21B5",delete:"\u232B",escape:"\u238B",tab:"\u21E5",capslock:"\u21EA",up:"\u2191",right:"\u2192",down:"\u2193",left:"\u2190",pageup:"\u21DE",pagedown:"\u21DF",home:"\u2196",end:"\u2198",help:"?",space:"\u2423",fn:"Fn",win:"\u2318",alt:"\u2325"},Fs={command:"Command",shift:"Shift",ctrl:"Control",option:"Option",enter:"Enter",delete:"Delete",escape:"Escape",tab:"Tab",capslock:"Caps Lock",up:"Up",right:"Right",down:"Down",left:"Left",pageup:"Page Up",pagedown:"Page Down",home:"Home",end:"End",help:"Help",space:"Space",fn:"Fn",win:"Win",alt:"Alt"};var Ks=forwardRef(({children:e,keys:r,as:t,className:n,variant:o},s)=>{let{variant:a}=Q(true),l=useMemo(()=>{if($s(r)){let f=null;return {keys:String(r).split("+").reduce((i,d,u,m)=>(m[u+1]?i.push(d):f=d.toUpperCase(),i),[]),children:f}}return {keys:r,children:String(e).toUpperCase()}},[r]);return jsxs(p,{as:`--keyboard-keys --${o||a||q.Small} flex aic ${t} ${n}`.trim(),children:[(Array.isArray(l.keys)?l.keys:[l.keys]).map(f=>jsx("abbr",{title:Fs[f],children:zs[f]},f)),jsx(me,{children:l?.children??e})]})});Ks.displayName="Zuz.KeyboardKeys";var yr=Ks;var Gs=createContext(null),pt=()=>{let e=useContext(Gs);if(!e)throw new Error("MediaPlayer sub-components must be used within <MediaPlayer />");return e},Dp=({ref:e,icons:r,children:t,...n})=>{let{playlist:o=[],mode:s="audio",defaultArtist:a="Artist",defaultTitle:l="No Track",defaultCover:f,onTrackChange:c,...i}=n,{className:d,style:u,rest:m}=B(i),h=useMediaPlayer(o,o[0]??void 0),T=useMemo(()=>({play:V.play,pause:V.pause,prev:V.prev,next:V.next,volumeHigh:V.volumeHigh,volumeMute:V.volumeMute,...r}),[r]),x=useMemo(()=>({...h,mode:s,icons:T}),[h,T]);return jsx(Gs.Provider,{value:x,children:jsx(p,{className:`--zuz-media-player ${d}`,style:u,children:t})})},Us=Dp;var qs=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")}`},ao=e=>typeof e=="string"?jsx(ee,{name:e}):e,Xs=()=>{let{mediaRef:e,state:r,controls:t,mode:n}=pt();return jsxs(p,{as:`--mediaplayer-stage rel --mode-${n}`,children:[n==="video"?jsx("video",{ref:e,className:"fill",onClick:t.togglePlay}):jsx("audio",{ref:e}),r.isLoading&&jsx(p,{as:"abs fill aic jcc --mediaplayer-spinner",children:jsx(Ce,{})})]})},Ys=()=>{let{state:e,defaultArtist:r,defaultTitle:t,defaultCover:n}=pt();return jsxs(p,{as:"--track-info flex aic",children:[jsx(ot,{src:e.currentItem?.cover||n||"",as:"--track-cover"}),jsxs(p,{as:"flex cols",children:[jsx(p,{as:"--track-title",children:e.currentItem?.title||t||"Choose Track"}),jsx(p,{as:"--track-artist",children:e.currentItem?.artist||r||"..."})]})]})},js=()=>{let{state:e,controls:r,icons:t}=pt();return jsxs(p,{as:"--mediaplayer-controls flex aic",children:[jsx(_,{onClick:r.prev,as:"--prev",children:ao(t?.prev??V.prev)}),jsx(_,{onClick:r.togglePlay,as:"--play-pause",children:ao(e.isPlaying?t?.pause??V.pause:t?.play??V.play)}),jsx(_,{onClick:r.next,as:"--next",children:ao(t?.next??V.next)})]})},Qs=()=>{let{state:e,controls:r,mediaRef:t}=pt(),n=e.progress*(e.duration||0);return jsxs(p,{as:"--track-progress flex aic",children:[jsx(p,{as:"--track-current-duration",children:qs(n)}),jsx(lt,{value:e.progress,onClick:o=>{let s=o.currentTarget.getBoundingClientRect(),a=(o.clientX-s.left)/s.width;r.seek(a);}}),jsx(p,{as:"--track-total-duration",children:qs(e.duration)})]})},Js=()=>{let{state:e,controls:r,icons:t}=pt();return jsxs(p,{as:"--volume-control flex aic gap:8 w:120",children:[jsx(_,{onClick:()=>r.setIsMuted(),children:ao(e.isMuted?t?.volumeMute??V.volumeMute:t?.volumeHigh??V.volumeHigh)}),jsx(lt,{value:e.volume,className:"h:3 flex:1",onClick:n=>{let o=n.currentTarget.getBoundingClientRect();r.setVolume((n.clientX-o.left)/o.width);}})]})};var Hp=Object.assign(Us,{Stage:Xs,TrackInfo:Ys,Controls:js,Progress:Qs,Volume:Js}),Ap=Hp;var ta=forwardRef((e,r)=>{let t=useNetworkStatus(),{onlineMessage:n,offlineMessage:o,variant:s}=e;return jsxs(p,{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||q.Small} fixed flex`,children:[jsx(p,{className:"--ico",children:t?V[Ne.Success]:V[Ne.Error]}),jsx(K,{as:"--message",children:t?n||"internet connection restored :)":o||"no internet connection"})]})});ta.displayName="Zuz.NetWorkManager";var Fp=ta;var ra=forwardRef((e,r)=>{let{strenthMeter:t,onChange:n,...o}=e;"type"in o&&delete o.type;let{style:s,className:a,rest:l}=B(o),[f,c]=useState(false),[i,d]=useState(""),u=useMemo(()=>checkPasswordStrength(i),[i]),m=useDebounce(h=>{t&&d(h.target.value),n&&n(h);},100);return useEffect(()=>{},[]),jsxs(p,{as:"w:100% flex cols",children:[jsxs(p,{style:s,className:"--password flex aic rel",children:[jsx(de,{ref:r,type:f?"text":"password",className:a,onChange:m,...l}),jsx(_,{tabIndex:-1,onClick:()=>c(h=>!h),className:"--toggle flex aic jcc abs",children:f?V.eye:V.eyeSlash})]}),t&&jsxs(p,{as:`flex aic --password-meter --pb-score-${u.score}`,style:s,children:[jsxs(p,{as:"--password-bars flex aic",children:[jsx(p,{as:`--pbar ${u.score>=1?"--pb-on":""}`.trim()}),jsx(p,{as:`--pbar ${u.score>=2?"--pb-on":""}`.trim()}),jsx(p,{as:`--pbar ${u.score>=3?"--pb-on":""}`.trim()}),jsx(p,{as:`--pbar ${u.score>=4?"--pb-on":""}`.trim()}),jsx(p,{as:`--pbar ${u.score>=5?"--pb-on":""}`.trim()})]}),jsx(K,{as:"--password-meter-label","aria-hidden":true,children:u.result})]})]})});ra.displayName="Zuz.Password";var qp=ra;var sa=forwardRef((e,r)=>{let{size:t,length:n,mask:o,...s}=e,a=useRef([]),l="pinput",f=false,c={};"with"in s&&(c={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(l=s.name,delete s.name),"required"in s&&(f=true,delete s.required);let{style:i}=B(s),d=m=>{let h=m.currentTarget,T=a.current[parseInt(h.dataset.index)+1],x=a.current[parseInt(h.dataset.index)-1];h.value.length===1&&T?T.focus():h.value.length===0&&x&&x.focus();},{variant:u}=Q(true);return useEffect(()=>{a.current=a.current.slice(0,t||n);},[t||n]),jsx(p,{name:l,style:i,className:`--otp --${s.variant??u??q.Medium} flex aic rel`,"data-required":f,"data-size":t||n||4,...c,children:Array(t||n||4).fill(1).map((m,h)=>jsx(de,{autoComplete:"new-password","data-index":h,ref:T=>{a.current[h]=T;},numeric:true,onChange:d,maxLength:1,placeholder:o?"\xB7":"0",type:o?"password":"text",...s},`pin-${h}`))})});sa.displayName="Zuz.PinInput";var Qp=sa;var aa=forwardRef((e,r)=>{let{children:t,className:n,name:o,required:s,type:a,value:l,variant:f,checked:c,onSwitch:i,...d}=e,[u,m]=useState(c||false),{variant:h}=Q(true),T=useRef(null);return jsxs(Bt,{className:`${n} --${(a||So.Default).toLowerCase()} --radio${!a||a==So.Default?"":"card"} --${f||h||q.Small} flex aic rel`.trim(),...d,children:[jsx(de,{ref:T,defaultChecked:u,value:l||"rd",type:"radio",className:"abs",name:o,required:s||false,onChange:x=>{i&&i(x.target.checked,l||"cb"),m(x.target.checked);}}),jsx(p,{className:"--dot rel",children:jsx(p,{className:"--rod abs abc"})}),jsx(p,{className:"--value",children:t})]})});aa.displayName="Zuz.Radio";var ou=aa;var ia=forwardRef((e,r)=>{let{fx:t,withStyle:n,as:o,reverse:s=false,searchIcon:a=V.search,hideSearchIcon:l=false,clearIcon:f=V.close,hideClearIcon:c=false,onChange:i,onClear:d,...u}=e,{style:m,className:h}=B({as:e.as}),[T,x]=useState(""),{variant:P}=Q(true),S=useRef(null);"type"in e&&delete e.type;let R=v=>{x(v.target.value),i?.(v.target.value);},g=v=>{T.trim()!==""&&(x(""),i?.(""),S.current&&(S.current.value="",e.onConfirm?.("")));};return useImperativeHandle(r,()=>({focus:()=>S.current?.focus(),value:()=>S.current?.value})),useEffect(()=>{},[]),jsxs(p,{style:m,className:`--search --no-shrink ${s?"--search-rev":""} --${e.variant||P||q.Medium} flex aic ${typeof e.as=="string"&&e.as.includes("abs")?"":"rel"} ${h}`.trim(),children:[jsx(de,{ref:S,onChange:R,...u}),e.shortcut&&jsx(yr,{keys:e.shortcut,as:"abs"}),jsx(_,{tabIndex:-1,onClick:v=>g(),className:"--send flex aic jcc",variant:e.variant||q.Medium,children:T!==""?!c&&(typeof f=="string"?jsx(ee,{name:f,as:"--search-action"}):f):!l&&(typeof a=="string"?jsx(ee,{name:a,as:"--search-action"}):a)})]})});ia.displayName="Zuz.Search";var xr=ia;var mu=({label:e,icon:r})=>jsxs(p,{as:"--select-options-head --no-shrink --disabled".trim(),"aria-hidden":"true",children:[r&&jsx(ee,{name:r}),jsx(K,{as:"--select-group-label",children:e})]}),ca=mu;var pa=({checkIcon:e,selected:r,updateValue:t,o:n})=>{let o=e?typeof e=="string"?jsx(ee,{name:"checkIcon"}):e:V.check,s=n.disabled===true;return jsxs(_,{onClick:a=>{s||(a.stopPropagation(),t(n));},disabled:s,as:`--select-option-item --no-shrink ${r?"--selected":""} ${s?"--disabled":""} rel`.trim(),children:[jsxs(De,{as:"--option-item-meta --aic",children:[n.icon&&jsx(ee,{name:n.icon,as:`--select-option-icon --icon-${n.value}`,color:n.iconColor}),jsx(K,{suppressHydrationWarning:true,children:typeof n=="string"?n:n.label})]}),r&&jsx(De,{aic:true,jcc:true,as:"--select-option-check --abs",children:o})]})};pa.displayName="Option";var ua=pa;var fa=(({ref:e,...r})=>{let{selected:t,options:n,label:o,name:s,variant:a,search:l,searchPlaceholder:f,maxHeight:c,arrowDownIcon:i=V.arrowDown,arrowUpIcon:d=V.arrowUp,expanded:u,multiple:m,tokenizer:h,wrapTokens:T,disabled:x,checkIcon:P,closeIcon:S,editable:R,editablePlaceholder:g,onChange:v,required:y,with:b,...N}=r,H=_e(),E=s&&H.values&&H.setFieldValue,$=E?H.errors?.[s]:null,M=E?H.values?.[s]:void 0,O=R===true&&m!==true&&h!==true,z=L=>typeof L=="string"||typeof L=="number",Z=L=>typeof L=="object"&&L!==null&&!Array.isArray(L)&&"value"in L&&"label"in L,I=L=>n.find(re=>String(re.value)===String(L)),k=L=>{if(L==null)return null;if(O&&L==="")return "";if(m||h)return (Array.isArray(L)?L:[L]).map(Se=>z(Se)?I(Se):Se).filter(Se=>Z(Se));if(z(L)){let re=I(L);return re||(O?String(L):null)}return Z(L)?L:null},X=()=>{if(t!==void 0)return k(t);let L=n.find(re=>String(re.value)==="-1");return L||(O?"":null)},Y=L=>Array.isArray(L)?L.map(re=>re.value):Z(L)?L.value:L,[A,F]=useState(()=>X()),[G,W]=useState(false),[ne,J]=useState(null),ae=useRef(null),pe=useRef(null),he=useRef(null),ie=useId(),ce=useMemo(()=>s||ie,[s,ie]),{reposition:U}=Rt(he,{direction:bt.Bottom,offset:2}),{variant:oe}=Q(true),le=S?typeof S=="string"?jsx(ee,{name:S}):S:V.close,{className:fe,style:Ae,rest:Ie}=B(N,void 0),{onClick:ve,...$e}=Ie||{},se=useMemo(()=>M!==void 0?k(M):A,[M,A,n,O,m,h]),Xe=useMemo(()=>{if(!(!se||Array.isArray(se)||!Z(se)))return se},[se]),Ir=useMemo(()=>O?Z(se)?String(se.value??""):z(se)?String(se):"":"",[O,se]),Fa=L=>Array.isArray(se)?se.some(re=>re.value===L.value):Z(se)?se.value===L.value:O&&z(se)?String(se)===String(L.value):false,xt=L=>{if(E){H.setFieldValue?.(s,Y(L));return}F(L);},Ht=L=>{v?.(L);},_a=L=>{if(!(x||L.disabled)){if(m||h){let re=Array.isArray(se)?se:[],Le=re.find(yo=>yo.value===L.value)?re.filter(yo=>yo.value!==L.value):[...re,L];xt(Le),Ht(Le);return}xt(L),W(false),Ht(L);}},Ka=L=>{let re=L.currentTarget.value,Le=(re===""?null:I(re))??re;xt(Le),Ht(Le);},Za=L=>{L.key==="Enter"&&(L.preventDefault(),O&&W(false));},Wa=(L,re)=>{if(L.stopPropagation(),x)return;let Se=se.filter(Le=>Le.value!==re.value);xt(Se),W(false),Ht(Se);},Ga=L=>{let re=L.currentTarget,Se=re.scrollTop===0&&L.deltaY<0,Le=re.scrollHeight-re.scrollTop===re.clientHeight&&L.deltaY>0;!Se&&!Le||L.preventDefault(),L.stopPropagation();};useImperativeHandle(e,()=>({setSelected:L=>{xt(k(L));},getValue:()=>se??null}),[se,n,O,m,h,E,s]),useEffect(()=>{E||t===void 0||F(k(t));},[t,E,n,O,m,h]),useEffect(()=>{if(!G)return;let L=()=>{U();};return window.addEventListener("scroll",L,true),window.addEventListener("resize",U),()=>{window.removeEventListener("scroll",L,true),window.removeEventListener("resize",U);}},[G,U]),useEffect(()=>{if(!G){pe.current&&(pe.current.value=""),J(null);return}pe.current?.focus(),U();let L=Se=>{ae.current&&!ae.current.contains(Se.target)&&W(false);},re=setTimeout(()=>{document.addEventListener("click",L);},0);return ()=>{clearTimeout(re),document.removeEventListener("click",L);}},[G,U]),useEffect(()=>()=>{E&&H.deleteFieldValue?.(s);},[H,E,s]);let Ua=useDebounce(L=>J(L===""?null:L),300);return jsxs(p,{ref:ae,"data-required":y?"true":void 0,with:b,className:[`--select ${u==true?"--expanded":""}`,`--${a||oe}`,`${s?`--${s}`:""}`,`${$?"--has-error":""}`,`${x?"--disabled":""} rel`].join(" ").trim(),name:ce,children:[O?jsxs(p,{"data-value":Xe?.value??(Ir||"-1"),className:`--select-display --selected --editable flex aic rel ${fe}`.trim(),style:Ae,onClick:L=>L.stopPropagation(),...$e,children:[Xe?.icon&&jsx(ee,{as:"--selected-icon",name:Xe.icon}),jsx(De,{aic:true,as:"--label-wrapper",children:jsx("input",{"aria-expanded":G,className:"--select-input",disabled:x,onChange:Ka,onClick:L=>{L.stopPropagation(),x||W(true);},onKeyDown:Za,placeholder:g||o||"Choose",type:"text",value:Ir})}),jsx(_,{className:"--select-toggle rel flex aic jcc",disabled:x,onClick:L=>{L.stopPropagation(),x||W(re=>!re);},tabIndex:-1,withLabel:false,children:G?typeof d=="string"?jsx(ee,{name:d,as:"--search-action"}):d:typeof i=="string"?jsx(ee,{name:i,as:"--search-action"}):i})]}):jsxs(_,{disabled:x,variant:a||oe,"data-value":Xe?.value??"-1",className:`--select-display --selected flex aic rel ${fe}`.trim(),withLabel:false,style:Ae,onClick:L=>{L.stopPropagation(),x||W(re=>!re);},...$e,children:[Xe?.icon&&jsx(ee,{as:"--selected-icon",name:Xe.icon}),jsx(De,{aic:true,as:"--label-wrapper",children:h&&Array.isArray(se)&&se.length>0?jsxs(De,{as:`--tokens-wrap${T===true?" --wrap":""}`,children:[se.map(L=>jsxs(De,{aic:true,as:"--token",children:[jsx(K,{as:"--token-label",children:L.label}),jsx(p,{as:"--token-remove",onClick:re=>Wa(re,L),children:le})]},L.value)),se.length<n.length&&jsx(K,{as:"--label",children:o||"Choose"})]}):jsx(K,{as:"--label",children:Array.isArray(se)?se.length>0?`${se.length} selected`:o||"Choose":Xe?.label||o||"Choose"})}),jsx(p,{className:"--svg-arrow rel flex aic jcc",children:G?typeof d=="string"?jsx(ee,{name:d,as:"--search-action"}):d:typeof i=="string"?jsx(ee,{name:i,as:"--search-action"}):i})]}),jsxs(p,{id:ce,className:"--options-list --allow-scroll -fx flex cols abs zIndex:var(--max-z-index)","aria-hidden":!G,onWheel:Ga,style:{maxHeight:c||"auto"},ref:he,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:G,duration:.05},children:[l&&jsx(p,{as:"--select-search --no-shrink flex --sticky",children:jsx(xr,{ref:pe,variant:q.Small,placeholder:f||"Search...",onChange:Ua})}),o&&jsx(ca,{label:o}),n?.filter(L=>!ne||L.label.toLowerCase().includes(ne.toLowerCase()))?.map(L=>jsx(ua,{updateValue:_a,checkIcon:P,selected:Fa(L),o:L},`option-${L.label.replace(/\s+/g,"-")}-${L.value}`))]})]})});fa.displayName="Zuz.Select";var gu=fa;var da=({ref:e,...r})=>jsx(kt,{type:ze.Switch,...r,ref:e});da.displayName="Zuz.Switch";var hu=da;var ha=e=>{let{idx:r,id:t,as:n,weight:o,style:s,value:a,render:l,resize:f,sortBy:c,sortable:i,onSort:d}=e,[u,m]=useState(0),h=()=>{i&&(d?.(String(t),u==1?-1:1),m(T=>T==1?-1:1));};return jsxs(p,{style:{flex:o||1,...s},as:`--col flex aic ${n||""} ${i?"--sortable":""}`,onClick:h,children:[jsx(p,{as:"--colv",children:a}),r==-1&&i&&c==t&&jsx(p,{as:"--arrow flex aib",children:u==1?V.arrowUp:V.arrowDown})]})};ha.displayName="Zuz.Column";var uo=ha;var xa=e=>{let{index:r,pubsub:t,schema:n,data:o,ids:s,styles:a,animate:l,sortBy:f,selectable:c,tableRef:i,loading:d,rowClassName:u,onSort:m,onRowClick:h,onSelect:T,onContextMenu:x}=e,P=useDelayed(),S=useMemo(()=>({transition:j.SlideInBottom,curve:te.EaseInOut,delay:.02*(r+1)}),[]),R=useRef(null),g=(y,b)=>{r==-1?t.emit(`ALL_ROWS_${y?"CHECKED":"UNCHECKED"}`,y):(T&&T(o,y),t.emit(`ROW_${y?"CHECKED":"UNCHECKED"}`,y,b));},v=(y,b,N)=>jsx(uo,{idx:y,id:b,as:"--selector",pubsub:t,value:jsx(kt,{value:N,ref:R,onSwitch:g,type:ze.Default})});return useEffect(()=>{let y=(E,$)=>{R.current?.setChecked(E,false);},b=(E,$)=>{let M=false;i?.current&&i.current.querySelectorAll(".--row").forEach(O=>{let z=O;if(!z.classList.contains("--row-head")){let Z=z.querySelector(".--selector input[type=checkbox]");Z&&Z.checked&&!M&&(M=Z.checked);}}),R.current.setChecked(M,false);},N=E=>{R.current?.setChecked(E,false),T&&T(o,E);},H=E=>{R.current?.setChecked(E,false),T&&T(o,E);};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",N),t.on("ALL_ROWS_UNCHECKED",H),()=>{t.off("ALL_ROWS_CHECKED",N),t.off("ALL_ROWS_UNCHECKED",H);})},[]),jsxs(p,{onContextMenu:y=>x?x(y,o):null,onClick:y=>h?h(y,e.data):()=>{},...l?{fx:{...S,when:P}}:{},as:`--row flex aic ${h?"--row-clickable":""} ${r==-1?"--row-head":""} ${u||""}`,children:[r==-1&&n.map((y,b)=>{let{renderWhenHeader:N,render:H,value:E,...$}=y;return jsxs(Fragment,{children:[c&&b==0&&v(-1,`--selector-${y.id}`,"all"),jsx(uo,{idx:-1,onSort:m,sortBy:f,value:E,...$,pubsub:t,style:a[y.id]})]},`--col-${y.id}`)}),d&&r>-1&&jsx(p,{as:"--col",children:jsx(K,{as:"opacity:0",children:"..."})}),!d&&r>-1&&s&&o&&n.map((y,b)=>jsxs(Fragment,{children:[c&&b==0&&v(b,`--selector-${y.id}`,y.id.toString()),s.includes(String(y.id))?jsx(uo,{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}`))]})};xa.displayName="Zuz.Row";var fo=xa;var wa=(e,r)=>{let{schema:t,rows:n,rowCount:o,rowsPerPage:s,currentPage:a,pagination:l,paginationHash:f,showPaginationOnZeroPageCount:c,animateRows:i,header:d,rowClassName:u,selectableRows:m,hoverable:h,sortBy:T,loading:x,loadingRowCount:P,loadingMessage:S,spinner:R,emptyMessage:g,onSort:v,onRowClick:y,onRowSelectToggle:b,onPageChange:N,onRowContextMenu:H,...E}=e,$=useRef(null),M=useMemo(()=>t.reduce((ce,U)=>(ce[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}},ce),{}),[t]),O=useMemo(()=>Object.keys(M),[t]),z=useMemo(()=>d??true,[d]),{style:Z,className:I,rest:k}=B(E),X=useRef(null),Y=useMemo(()=>new PubSub,[]),A=useRef(n.map(()=>uuid(8))),[F,G]=useState(T||null),[W,ne]=useState(S||"loading"),J=useMemo(()=>!x&&n&&n.length==0,[x,n]),ae=useCallback(()=>g?typeof g=="function"?jsx(g,{}):g:jsx(K,{as:"tac s:18 mt:75",children:"No Record Found"}),[x,n]);useEffect(()=>{n.length&&!A.current&&(A.current=n.map(()=>uuid(8)));},[n]);let pe=(ce,U)=>{G(ce),v?.(ce,U);},he=(o||(n?n.length:0))/(s||10),ie=useMemo(()=>c||he>1?jsx(Et,{hash:f,ref:$,renderOnZeroPageCount:c,onPageChange:N,paginationStyle:"table",startPage:a,itemCount:o||(n?n.length:0),itemsPerPage:s||10}):null,[a,o]);return useImperativeHandle(r,()=>({setLoading(ce){}})),jsxs(p,{as:`--table ${h??true?"--hoverable":""} flex cols rel ${I}`,ref:X,children:[z==true&&jsx(fo,{sortBy:F,onSort:pe,tableRef:X,pubsub:Y,selectable:m,index:-1,schema:t,loading:true,styles:M}),x&&jsxs(p,{as:"center-x flex aic --table-spinner",children:[jsx(Ce,{type:R||be.Simple}),W&&jsx(K,{as:"--table-loading-message",children:W})]}),x&&Array(P||5).fill({}).map((ce,U)=>jsx(fo,{tableRef:X,index:U,pubsub:Y,schema:t,styles:M,loading:true,animate:i,onRowClick:y},`--trow-loading-${U}-${t[0].id}`)),!x&&n&&n.map((ce,U)=>jsx(fo,{tableRef:X,pubsub:Y,loading:false,index:U,schema:t,ids:O,styles:M,animate:i,data:ce,onRowClick:y,rowClassName:u,selectable:m,onSelect:b,onContextMenu:H},`--trow-${A.current[U]||U}-${t[0].id}`)),J&&ae(),l&&ie&&jsx(p,{"aria-hidden":!l||!ie,...i?{fx:{transition:j.SlideInBottom,curve:te.EaseInOut,delay:.02*(n.length+1),when:!x&&n&&l&&ie!=null}}:{},as:"--row flex aic --row-footer",children:ie})]})};wa.displayName="Zuz.Table";var Eu=forwardRef(wa),Bu=Eu;var Lu=({ref:e,...r})=>{let{title:t,items:n}=r,[o,s]=useState(0),a=(l,f,c)=>{l.preventDefault(),s(f),document.getElementById(c)?.scrollIntoView({behavior:"smooth"});};return jsxs(p,{ref:e,as:"--table-of-contents rel flex cols",children:[jsx(K,{as:"--toc-title",children:t}),jsx(tt,{items:n.map((l,f)=>jsx("a",{className:o==f?"--toc-active":"",style:{anchorName:o===f?"--toc-active":"none",color:o==f?"var(--table-of-contents-color-active)":"var(--table-of-contents-color)"},onClick:c=>a(c,f,l.tag),href:`#${l.tag}`,children:l.label}))})]})},Mu=Lu;var Ca=({isActive:e,transitionType:r,speed:t,width:n,render:o,content:s,onHeightChange:a})=>{let l=useRef(null),f=useResizeObserver(l);useEffect(()=>{e&&f.height>0&&a(f.height);},[e,f.height]);let i=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 jsx(p,{ref:l,style:{...i},className:"--content",children:o||e?s:null})};Ca.displayName="Zuz.TabBody";var Ta=Ca;var Ia=({ref:e,...r})=>{let{tabs:t,speed:n=.3,prerender:o=true,variant:s,tabStyle:a="fixed",onChange:l,transitionType:f="slide",...c}=r,[i,d]=useState(0),u=useRef(null),m=useResizeObserver(u),h=useMemo(()=>uuid(8),[]),[T,x]=useState("auto"),P=useMemo(()=>m.width>0,[m.width]);useImperativeHandle(e,()=>({setTab:b=>d(b)}));let S=useMemo(()=>t.map(b=>({...b,key:b.key||uuid(8)})),[t]),{style:R,className:g,rest:v}=B({as:`flex cols w-full no-overflow ${c.as||""}`,...c}),y=()=>{if(!P)return {opacity:0};switch(f){case "fade":case "scale":return {display:"grid",gridTemplateColumns:"1fr",width:"100%"};default:return {width:`${S.length*100}%`,alignItems:"flex-start",display:"flex",transform:`translate3d(-${i*m.width}px, 0, 0)`,transition:`transform ${n}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxs(p,{ref:u,style:R,className:`--tabview --${a} flex cols ${g}`,children:[jsx(Lt,{as:"--tabview-head",onSwitch:b=>{d(b.index);let N=S.find(H=>H.tag==b.tag);N&&N.onSelect&&(N.onSelect(N,b.index),l?.(N,b.index));},selected:i,items:S.reduce((b,N,H)=>(b.push({icon:N.icon,index:H,label:N.label,tag:N.tag}),b),[])}),jsx(p,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:T,transition:P?`height ${n}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:P?1:0},children:jsx(p,{className:"--track",style:{...y()},children:S.map((b,N)=>jsx(Ta,{isActive:N===i,transitionType:f,speed:n,width:m.width,render:o||N===i,onHeightChange:H=>N===i&&x(H),content:b.body},`tab-body-${b.key||N}-${h}`))})})]})};Ia.displayName="Zuz.TabView";var Ku=Ia;var Uu=({ref:e,commands:r,onCommand:t,welcomeMessage:n="Welcome to Zuz Terminal v1.0.0",prompt:o="zuz ~ ",variant:s,...a})=>{let[l,f]=useState([{type:"output",content:n}]),[c,i]=useState(""),d=useRef(null),u=useRef(null),{variant:m}=Q(true);useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight);},[l]);let h=g=>{let v=typeof g=="string"?{type:"output",content:g}:g;f(y=>{let b=[...y,v];return b.length>1e3?b.slice(-1e3):b});},T=()=>f([]);useImperativeHandle(e,()=>({write:h,clear:T}));let x=async g=>{let[v,...y]=g.split(" "),b=v.toLowerCase();return r&&r[b]?await r[b](y):t?await t(g):`command not found: ${v}`},P=g=>{let v=/\u001b\[(\d+)m/g,y=[],b={31:"#ff5f56",32:"#27c93f",33:"#ffbd2e",34:"#007aff",35:"#ff79c6",36:"#8be9fd",39:"#d4d4d4"},N=0,H="#d4d4d4",E=false,$;for(;($=v.exec(g))!==null;){let O=g.slice(N,$.index);O&&y.push({text:O,color:H,bold:E});let z=$[1];z==="0"?(H="#d4d4d4",E=false):z==="1"?E=true:b[z]&&(H=b[z]),N=v.lastIndex;}let M=g.slice(N);return M&&y.push({text:M,color:H,bold:E}),y},S=(g,v)=>g.includes("\x1B")?P(g).map((y,b)=>jsx(me,{style:{color:y.color||"#d4d4d4",fontWeight:y.bold?"bold":"normal"},children:y.text},`--terminal-msg-${b}-${y.text.replace(/\S+/g,"-")}`)):jsx(me,{style:{color:v==="error"?"#ff5f56":v==="command"?"#00ff00":"#d4d4d4"},children:g}),R=async g=>{if(g.key==="Enter"&&c.trim()){let v=c.trim(),y=[...l,{type:"command",content:`${o}${v}`}];i(""),f(y);let b=await x(v);f(N=>[...N,{type:"output",content:b}]);}};return jsxs(p,{as:`--zuz-terminal --${s||m||q.Medium} flex cols ${a.className}`,onClick:()=>u.current?.focus(),children:[jsx(p,{ref:d,className:"--terminal-log",children:l.map((g,v)=>jsx(p,{children:jsx(K,{children:S(g.content,g.type)})},v))}),jsxs(p,{as:"flex aic --terminal-input",children:[jsx(K,{as:"--terminal-prompt",children:o}),jsx(de,{ref:u,className:"--zuz-term-input",autoFocus:true,value:c,variant:s||m||q.Medium,onChange:g=>i(g.target.value),onKeyDown:R})]})]})},qu=Uu;var Xu=({meta:e})=>jsxs(_,{as:"flex aic --command-item",children:[e.icon&&jsx(ee,{name:e.icon,as:"--command-icon"}),jsx(K,{children:e.label})]}),Yu=({position:e,onSelect:r,commands:t,visible:n})=>jsx(p,{"aria-hidden":!n,fx:{transition:j.SlideInBottom,duration:.1,when:n},className:"--command-box abs grid",style:{...e},children:t.map(o=>jsx(Xu,{meta:o},`cmd-${o.label.replace(/\s+/,"-")}`))}),ka=Yu;var Oa=({ref:e,...r})=>{let {autoResize:t,maxHeight:n,variant:o,resize:s="none",command:a,commands:l,name:f,onInput:c,cmd:i,renderDropdown:d,value:u,defaultValue:m,...h}=r,T=useRef(null),x=useRef(null),{variant:P}=Q(true),{style:S,className:R,rest:g}=B(h),v=_e();f?v.errors?.[f]:null;let b=f&&v.values&&v.setFieldValue,N=b?v.values?.[f]:void 0,H=useDebounce(k=>{b&&v.setFieldValue?.(f,k);},500),{showDropdown:E,dropdownPosition:$,handleKeyDown:M,handleInput:O,handleCommandSelect:z}=useCommandActions({command:a,commands:l,cmd:i,ref:T}),Z=useCallback(()=>{let k=T.current;!k||!t||(x.current&&cancelAnimationFrame(x.current),x.current=requestAnimationFrame(()=>{k.style.height="auto";let X=k.scrollHeight;if(n){let Y=parseInt(n.toString(),10);isNaN(Y)||(X=Math.min(X,Y));}k.style.height=`${X}px`,k.style.overflowY=n&&X>=parseInt(n.toString(),10)?"auto":"hidden";}));},[t,n]),I=k=>{H(k.currentTarget.value),c?.(k),O(k),Z();};return useEffect(()=>{T.current&&f&&N!==void 0&&T.current.value!==String(N)&&(T.current.value=String(N));},[N,f]),useEffect(()=>{Z();},[u,m,Z]),useEffect(()=>{t&&T.current&&Z();},[t,Z]),useEffect(()=>()=>{x.current&&cancelAnimationFrame(x.current);},[]),useEffect(()=>()=>{b&&v.deleteFieldValue?.(f);},[]),jsxs(p,{as:"rel",children:[jsx("textarea",{name:f,className:`--input --textarea --${o||P||q.Medium} flex ${R}`.trim(),style:{...S,resize:s,height:t?"auto":S?.height,overflow:"hidden",transition:t?"none":void 0},onKeyDown:M,onInput:I,ref:k=>{T.current=k,typeof e=="function"?e(k):e&&(e.current=k);},value:u,defaultValue:m,...g}),d?d({show:E,position:$,commands:l||[],onSelect:z}):l&&l.length>0&&jsx(ka,{visible:E,commands:l,onSelect:z,position:$})]})};Oa.displayName="Zuz.TextArea";var tf=Oa;var Da=forwardRef((e,r)=>{let{as:t,value:n,color:o,direction:s,...a}=e,l=useRef(null),[f,c]=useState(n||0);return useImperativeHandle(r,()=>({updateValue(i){f.toString().length!==i.toString().length&&c(i);},setValue(i){if(this.updateValue(i),l.current){let d=i.toString().split("");l.current.querySelectorAll(".--wheel-char").forEach((u,m)=>{let h=d[m];if(u instanceof HTMLElement){u.setAttribute("data-value",h);let T=u.querySelector(".--wheel-char-track");T instanceof HTMLElement&&(T.style.setProperty("--v",h),T.offsetWidth);}});}}})),useEffect(()=>{c(n||0);},[n]),jsxs(p,{className:"--text-wheel flex aic rel","aria-hidden":true,as:t,ref:l,...a,children:[(f||0).toString().split("").map((i,d)=>isNaN(parseInt(i,10))?jsx(me,{className:"--wheel-char wheel-char-symbol grid",children:i},`wheel-char-symbol-${d}`):jsx(me,{"data-value":i,className:`--wheel-char grid ${d>(f||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxs(me,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":i},children:[jsx(me,{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)=>jsx(me,{children:u},`${d}--${m}`)),jsx(me,{children:!s||s==="down"?9:0})]})},`wheel-char-${d}`)),o&&jsx(p,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${o}, transparent, transparent, transparent, ${o})`}})]})});Da.displayName="Zuz.TextWheel";var cf=Da;var Rr=forwardRef((e,r)=>{let{as:t,meta:n,nodes:o,icons:s,onSelect:a,treeTag:l,selected:f,roots:c,expanded:i,...d}=e,{tag:u,label:m,icon:h,under:T,isHead:x}=n,P=useMemo(()=>c.includes(u),[c]),[S,R]=useState(i),g=()=>{localStorage.setItem(`--tn${l}-${u}`,S?"0":"1"),R(!S);};useEffect(()=>{i||P&&!localStorage.getItem(`--tn${l}-${u}`)?(localStorage.setItem(`--tn${l}-${u}`,"1"),R(true)):R(localStorage.getItem(`--tn${l}-${u}`)=="1");},[]);let v=useMemo(()=>o.filter(y=>y.under==u),[o,u]);return jsxs(p,{className:`--treenode ${P?"--is-root":""} --treenode-${u} flex cols`,children:[jsxs(p,{className:`--node --node-${u} flex aic ${f==u?" --selected":""}`,children:[jsx(_,{skeleton:d.skeleton,onClick:g,className:"--node-aro-btn",disabled:v.length==0,children:s?.arrowClose&&s?.arrowOpen?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?V.chevronBottom:S?V.chevronBottom:V.chevronRight}),jsxs(_,{className:"--node-meta flex aic",onClick:y=>a(u),children:[(s?.nodeOpen&&s?.nodeClose||P&&s?.rootOpen&&s?.rootClose)&&jsx(ee,{skeleton:d.skeleton,className:`--node-icon ${P?"--icon-root":""}`,name:h||(S?P&&s?.rootOpen||s.nodeOpen:P&&s?.rootClose||s?.nodeClose)}),jsx(K,{className:`--node-label ${P?"--node-label-root":""}`.trim(),skeleton:d.skeleton,children:m})]})]}),S&&v.length>0&&jsx(p,{className:`--sub-node tree-sub-node-${u} flex cols`,children:v.map(y=>jsx(Rr,{treeTag:l,selected:f,onSelect:a,icons:s,roots:c,expanded:y.expanded||false,meta:y,nodes:o},`--node-${y.tag}`))})]})});Rr.displayName="TreeItem";var Aa=Rr;var za=forwardRef((e,r)=>{let{as:t,nodes:n,onNodeSelect:o,tag:s,icons:a,roots:l,selected:f,...c}=e,[i,d]=useState(f);useImperativeHandle(r,()=>({getSelected:()=>i}),[o]);let u=m=>{d(m),o&&o(m);};return useEffect(()=>{i!=f&&d(f);},[f]),jsx(p,{className:"--treeview flex cols",children:n.filter(m=>l.includes(m.tag)).map(m=>jsx(Aa,{treeTag:s?`-${s}`:"",selected:i,onSelect:h=>u(h),icons:a,meta:m,roots:l,expanded:m.expanded||false,skeleton:c.skeleton,nodes:n},`--node-${m.tag}`))})});za.displayName="Zuz.TreeView";var yf=za;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
13
+ export{Ne as ALERT,Lr as AVATAR,Ol as Accordion,zl as ActionBar,Kl as Alert,dc as AutoComplete,wc as Avatar,Tc as Badge,p as Box,sm as Bubble,ns as BubbleMediaType,rs as BubbleStatus,_ as Button,Jn as CHART,ze as CHECKBOX,Sf as COLORTHEME,Jo as Calendar,Xc as Carousel,om as Chart,kt as CheckBox,ym as CodeBlock,Mm as ColorScheme,ko as ContextMenu,Hm as CookiesConsent,Me as Cover,jm as CropShape,Xm as Cropper,Jm as Crumb,Tf as DATATYPE,at as DIALOG,Mr as DIALOG_ACTION_POSITION,we as DRAWER_SIDE,rp as DatePicker,Vo as Dialog,$o as Drawer,$t as FILTER,Ye as FORMVALIDATION,Pf as FORMVALIDATION_STYLE,ip as Fab,mp as Filters,De as Flex,Pp as Form,Np as Grid,Lo as Group,ee as Icon,ot as Image,de as Input,yr as KeyboardKeys,Fs as KeysLabelMap,zs as KeysMap,Bt as Label,No as LayersProvider,tt as List,Ap as MediaPlayer,Fp as NetworkStatus,vt as ORIGIN,wf as OriginType,je as Overlay,bt as POSITION,If as PROGRESS,Et as Pagination,to as PaginationStyle,qp as Password,Qp as PinInput,ye as Position,Je as ProgressBar,So as RADIO,ou as Radio,Ee as SHEET,bo as SHEET_ACTION_POSITION,vf as SKELETON,vo as SLIDER,Cf as SORT,be as SPINNER,Do as ScrollView,xr as Search,gu as Select,Lt as SelectTabs,hp as Sheet,lt as Slider,Xt as SnackPosition,hn as SnackStyle,qt as SnackType,me as Span,Ce as Spinner,Rf as Status,hu as Switch,j as TRANSITIONS,te as TRANSITION_CURVES,Ku as TabView,Bu as Table,Mu as TableOfContents,qu as Terminal,K as Text,cf as TextWheel,tf as Textarea,oi as ThemeProvider,yn as ToastDefaultTitle,Xt as ToastPosition,Fo as ToastProvider,hn as ToastStyle,qt as ToastType,ir as ToolTip,yf as TreeView,q as Variant,St as animationTransition,wo as buildClassString,Dr as buildWithStyles,Gf as css,Co as getAnimationCurve,Uf as getAnimationTransition,Xa as getZuzMap,$s as isKeyCombination,Vr as setZuzMap,B as useBase,ml as useContextMenu,fl as useDialog,hl as useDrawer,xe as useFx,bl as useMorph,Rt as usePosition,Rl as useSnack,_o as useToast};