@zuzjs/ui 0.10.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -4
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +4 -4
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';var chunk7SIIMFAD_cjs=require('./chunk-7SIIMFAD.cjs'),react=require('react'),jsxRuntime=require('react/jsx-runtime'),core=require('@zuzjs/core'),hooks=require('@zuzjs/hooks'),dateFns=require('date-fns');/* ZuzJS UI CLI */
|
|
2
|
-
var Po={name:"@zuzjs/ui"};var No=Po.name,Ro=(o,n=[])=>{let e=["as",...n],t={...o};return Object.keys(t).map(r=>{r in chunk7SIIMFAD_cjs.a&&delete t[r];}),"skeleton"in e&&e.skeleton.enabled==true&&delete t.children,e.map(r=>r in t&&delete t[r]),t};var Pt={Circle:"CIRCLE",Square:"SQUARE"},wp={Default:"DEFAULT",Circle:"CIRCLE"},Sp={Light:"light",Dark:"dark",System:"system"},de={Default:"DEFAULT",Switch:"SWITCH"},Nt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},J=Nt,K={Default:"def",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Cp={Asc:"ASC",Desc:"DESC"},Tp={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Pp={Dots:"DOTS"},ge={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},ne={Success:"success",Error:"error",Warning:"warning",Info:"info"},_={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",Bounce:"BOUNCE"},W={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},Np={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},se={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},Ee=se,Rt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Io=Rt,Rp={Bar:"BAR",Ring:"RING"},at={Default:"range",Text:"number"},It={Default:"DEFAULT",Card:"CARD"},it={Gooey:"gooey"},Te={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Eo=Symbol.for("zuz.global.map"),Bo=o=>{globalThis[Eo]=o;},Cs=()=>globalThis[Eo]||{},Et=o=>{let n=Array.isArray(o)?o.join(" "):o;if(!n||typeof n!="string")return "";let e=Cs();return process.env.NODE_ENV==="development"&&Object.keys(e).length===0&&console.warn(`[${No}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),n.split(/\s+/).filter(Boolean).map(t=>e[t]||t).join(" ")},Wp=o=>{let n=Array.isArray(o)?o.join(" "):o;return !n||typeof n!="string"?"":Et(n)},Lo=o=>{let n={};for(let e in o){let t=o[e];if(e.startsWith("--")){n[e]=t;continue}let r=chunk7SIIMFAD_cjs.e[e]?.toString()??e;if(r==="x"||r==="translateX"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(e,t)} ${s[1]??"0px"}`;}else if(r==="y"||r==="translateY"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${s[0]??"0px"} ${chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(e,t)}`;}else chunk7SIIMFAD_cjs.c.includes(r)?n[r]=chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(e,t):n[r]=t;}return n},Gp=o=>{let n={};if(Object.keys(o).length>0)for(let e in o){let t=e,r=o[t];if(t.startsWith("--")){n[t]=r;continue}let s=t in chunk7SIIMFAD_cjs.e?chunk7SIIMFAD_cjs.e[t].toString():t;chunk7SIIMFAD_cjs.c.includes(s)?s==="translateX"||s==="x"?n.translate=`${chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(t,r)} ${n.translate?.split(" ")[1]||"0px"}`:s==="translateY"||s==="y"?n.translate=`${n.translate?.split(" ")[0]||"0px"} ${chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(t,r)}`:n[s.replace("translate","translate")]=chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(t,r):chunk7SIIMFAD_cjs.d.includes(s)?n[s]=chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(t,r):n[s]=r;}return n},Bt=o=>{if(!o)return "linear";switch(o.toUpperCase()){case _.Bounce:return "var(--bounce)";case _.Liquid:return "var(--liquid)";case _.Spring:return "var(--spring)";case _.EaseInOut:return "ease-in-out";default:return "linear"}},Ve=(o,n=0)=>{let e={},t={},r=n||20;switch(o){case W.SlideInLeft:case W.SlideInRight:e={"--fx-x":o===W.SlideInLeft?`-${r}px`:`${r}px`,opacity:0},t={"--fx-x":"0px",opacity:1};break;case W.SlideInTop:case W.SlideInBottom:e={"--fx-y":o===W.SlideInTop?`-${r}px`:`${r}px`,opacity:0},t={"--fx-y":"0px",opacity:1};break;case W.ScaleIn:e={scale:0,opacity:0},t={scale:1,opacity:1};break;case W.FadeIn:e={opacity:0},t={opacity:1};break}return {from:e,to:t}},qp=(o,n,e)=>{let{from:t,to:r}=Ve(o);return n?{...t,...r}:e?t:r};var Ns=(o,n)=>{let e=react.useRef([]);return react.useEffect(()=>{let t=n?.current;if(!t||!o||!o.clearAtEnd)return;let r=s=>{e.current.includes(s.propertyName)&&o.clearAtEnd===true&&(t.style.transform="",t.style.filter="",e.current.forEach(p=>t.style.removeProperty(p)));};return t.addEventListener("transitionend",r),()=>t.removeEventListener("transitionend",r)},[o,n]),react.useEffect(()=>{if(typeof window>"u"||!n?.current)return;let t=n.current;(o?.scroll||o?.mouse)&&(t.style.willChange="transform",t.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",t.style.transition=`translate 0.1s ${o.curve?Bt(o.curve):"var(--spring)"}`);},[o,n]),react.useMemo(()=>{if(!o)return {style:{}};let{transition:t,from:r,to:s,exit:p,when:a,duration:u=.3,delay:c=0,curve:i}=o,f={},{from:l,to:d}=t?Ve(t):{from:r||{},to:s||{}};f=a===void 0?{...l,...d}:a?{...d}:p||l;let x=Bt(i),b=[],y=Lo(f);e.current=Object.keys(y);let C={...y};return Object.keys(y).forEach(v=>{let g=v.startsWith("--")?"all":v;b.includes(g)||b.push(`${g} ${u}s ${x} ${c}s`);}),{style:{...C,transition:b.join(", ")}}},[o])},$e=Ns;var Rs=(o,n)=>{let{as:e,fx:t,transition:r,skeleton:s,className:p,propsToRemove:a,style:u,...c}=o||{},i=r?{transition:r,duration:.3}:t||{},{style:f}=$e(i,n),l=Et(e??"");return {style:{...u,...f},className:[p||"",l||"",s?.enabled?"--skeleton":""].join(" ").trim(),rest:{...Ro(c,a?[...a,"skeleton"]:["skeleton"])}}},P=Rs;var Ls=(o,n={})=>{let{offset:e=8,direction:t="bottom",container:r=null,triggerRef:s=null}=n,p=react.useRef(null),a=react.useCallback(()=>{let u=o.current;if(!u)return;let c=s?.current||u.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=u.getBoundingClientRect(),f=c.getBoundingClientRect(),l,d;r?(l=r.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(u).position==="fixed"?d="fixed":d="absolute",d==="fixed"?l={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:l={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),u.style.position!==d&&(u.style.position=d),p.current=d;let y=0,C=0;switch(t){case "top":y=f.top-i.height-e,C=f.left,y<l.top&&f.bottom+i.height+e<=l.bottom&&(y=f.bottom+e);break;case "bottom":y=f.bottom+e,C=f.left,y+i.height>l.bottom&&f.top-i.height-e>=l.top&&(y=f.top-i.height-e);break;case "left":y=f.top,C=f.left-i.width-e,C<l.left&&f.right+i.width+e<=l.right&&(C=f.right+e);break;case "right":y=f.top,C=f.right+e,C+i.width>l.right&&f.left-i.width-e>=l.left&&(C=f.left-i.width-e);break}if(y=Math.max(l.top,Math.min(y,l.bottom-i.height)),C=Math.max(l.left,Math.min(C,l.right-i.width)),p.current==="fixed")u.style.top=`${y}px`,u.style.left=`${C}px`;else {let v;u.offsetParent?v=u.offsetParent.getBoundingClientRect():v={top:0,left:0};let g=y-v.top+window.scrollY,T=C-v.left+window.scrollX;u.style.top=`${g}px`,u.style.left=`${T}px`;}},[o,s,e,t,r]);return react.useEffect(()=>{let u=o.current;if(!u)return;let c=s?.current||u.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=new ResizeObserver(a);return i.observe(u),c&&i.observe(c),a(),window.addEventListener("resize",a),window.addEventListener("scroll",a,true),()=>{i.disconnect(),c&&i.disconnect(),window.removeEventListener("resize",a),window.removeEventListener("scroll",a,true);}},[o,t,e,r,s]),{postion:p.current,reposition:a}},ze=Ls;var Mo=react.forwardRef((o,n)=>{let{when:e,...t}=o;return jsxRuntime.jsx(m,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:W.FadeIn,when:e},...t})});Mo.displayName="Zuz.Overlay";var Pe=Mo;var Do=({ref:o,...n})=>{let{style:e,...t}=n,{style:r,className:s,rest:p}=P(t);return jsxRuntime.jsx("span",{ref:o,style:e,className:s,...p})};Do.displayName="Zuz.Span";var Q=Do;var Ho=react.forwardRef((o,n)=>{let{name:e,pathCount:t,size:r,color:s,...p}=o,{className:a,style:u,rest:c}=P(p);return jsxRuntime.jsx("div",{style:{color:s,...u},className:`icon-${e} --icon --${r||K.Default} ${a}`.trim(),ref:n,...c,children:Array(t||0).fill(0).map((i,f)=>jsxRuntime.jsx(Q,{className:`path${f+1}`},`${e}-layer-${f}`))})});Ho.displayName="Zuz.Icon";var q=Ho;var he={Simple:"SIMPLE"};var Ao=o=>{let {type:n,variant:e,width:t,speed:r,color:s,background:p,foreground:a,...u}=o,{className:i,style:f,rest:l}=P(u);return jsxRuntime.jsx(m,{className:`${i} --spinner --${(n||he.Simple).toLowerCase()} --${e}`.trim(),style:{...f},...l})};Ao.displayName="Zuz.Spinner";var ce=Ao;var lt={Loading:"loading",Normal:"normal"};var $o=({ref:o,...n})=>{let{reset:e,variant:t=K.Small,icon:r,iconSize:s,children:p,withLabel:a,spinner:u,state:c,disabled:i,...f}=n,{style:l,className:d,rest:x}=P(f);return jsxRuntime.jsxs("button",{className:`--button --${t} flex aic ${e?"":"jcc"} ${r?"ico-btn":""} ${d}`.trim().replace(/\s+/g," "),style:l,ref:o,disabled:c==lt.Loading||n.skeleton?.enabled||i,...x,children:[c==lt.Loading&&jsxRuntime.jsx(ce,{variant:t,type:u||he.Simple}),(!c||c==lt.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r&&jsxRuntime.jsx(q,{size:s,name:r}),a===true?jsxRuntime.jsx(Q,{children:p}):p]})]})};$o.displayName="Zuz.Button";var V=$o;var Vs={colorSchemeLight:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"5"}),jsxRuntime.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),colorSchemeSystem:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsxRuntime.jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark:jsxRuntime.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M17.919 8.18H6.079c-.96 0-1.44 1.16-.76 1.84l5.18 5.18c.83.83 2.18.83 3.01 0l1.97-1.97 3.21-3.21c.67-.68.19-1.84-.77-1.84z"})}),arrowUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M18.68 13.978l-3.21-3.21-1.96-1.97a2.13 2.13 0 00-3.01 0l-5.18 5.18c-.68.68-.19 1.84.76 1.84h11.84c.96 0 1.44-1.16.76-1.84z"})}),search:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children:jsxRuntime.jsx("path",{d:"M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z"})}),close:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),eye:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 20.5c-4.299 0-8.24-3.023-10.544-8.086a1 1 0 010-.828C3.759 6.523 7.701 3.5 12 3.5s8.24 3.023 10.544 8.086a1.001 1.001 0 010 .828 18.14 18.14 0 01-1.391 2.52 1 1 0 11-1.666-1.106A15.87 15.87 0 0020.529 12C18.543 7.92 15.379 5.5 12 5.5S5.457 7.92 3.471 12c1.986 4.08 5.15 6.5 8.529 6.5a7.964 7.964 0 005.036-1.92 1 1 0 111.265 1.55A9.94 9.94 0 0112 20.5z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 16a4.004 4.004 0 01-3.929-4.756 1 1 0 011.965.375A2 2 0 1014 12a2.034 2.034 0 00-2.053-1.999 1.04 1.04 0 01-1.043-.947.963.963 0 01.902-1.05L12 8a4 4 0 010 8z"})]}),eyeSlash:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 15c-4.132 0-7.98-1.214-10.294-3.249a1 1 0 111.32-1.502C4.986 11.972 8.34 13 12 13s7.014-1.028 8.974-2.751a1 1 0 111.32 1.502C19.98 13.786 16.132 15 12 15z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 18a1 1 0 01-1-1v-3a1 1 0 012 0v3a1 1 0 01-1 1zM7.749 17.667a.964.964 0 01-.17-.014 1 1 0 01-.817-1.155l.505-2.935a1 1 0 111.97.339l-.504 2.935a1 1 0 01-.984.83zM3.636 16.306a1.001 1.001 0 01-.942-1.336l.978-2.745a1 1 0 111.884.672l-.978 2.745a1 1 0 01-.942.664zM16.251 17.667a1 1 0 01-.984-.83l-.505-2.935a1 1 0 011.97-.339l.506 2.935a1 1 0 01-.816 1.155.964.964 0 01-.17.014zM20.364 16.306a1 1 0 01-.942-.664l-.978-2.745a1 1 0 111.884-.672l.978 2.745a1.001 1.001 0 01-.942 1.336z"})]}),check:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsxRuntime.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[ne.Info]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[ne.Warning]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[ne.Error]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[ne.Success]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntime.jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),plus:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsxRuntime.jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsxRuntime.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},k=Vs;var $s=({title:o="Alert",onClose:n})=>jsxRuntime.jsxs(m,{as:"--head flex aic rel",children:[jsxRuntime.jsx(m,{as:`--${o?"title":"dot"} flex aic jcc rel`,children:o}),jsxRuntime.jsx(V,{onClick:e=>n(),className:"--closer abs center-v",children:k.close})]}),_o=$s;var _s=({action:o,render:n=true,message:e=""})=>jsxRuntime.jsx(m,{as:`--body flex aic rel ${o?"":"--no-action"}`.trim(),children:n?e:null}),Fo=_s;var Zs=({action:o,actionPosition:n,dialogID:e,variant:t})=>jsxRuntime.jsx(m,{as:`--footer flex aic rel ${n?n==Io.Center?"jcc":"":"jce"}`.trim(),children:o.map((r,s)=>jsxRuntime.jsx(V,{variant:t,onClick:p=>r.handler?r.handler():r.onClick?r.onClick():console.log("onClick Handler missing"),as:"--action",children:r.label},`dialog-${e}-action-${r.key}`))}),Ko=Zs;var Wo=react.forwardRef((o,n)=>{let{h:e,html:t,children:r,lines:s,...p}=o,{style:a,className:u,rest:c}=P(p),i=`h${o.h||1}`;return jsxRuntime.jsx(i,{ref:n,style:a,className:u,...c,children:t?jsxRuntime.jsx(Q,{dangerouslySetInnerHTML:{__html:t}}):r})});Wo.displayName="Zuz.Text";var O=Wo;var qo=react.forwardRef((o,n)=>{let{message:e,spinner:t,spinnerSize:r,color:s,when:p,hideMessage:a,...u}=o,{className:c,style:i,rest:f}=P(u);return "when"in o&&o.when==false?null:jsxRuntime.jsxs(m,{className:`--cover flex aic jcc cols abs fillx nope nous ${c}`.trim(),style:{...i,backgroundColor:"var(--cover-bg)"},...f,children:[jsxRuntime.jsx(ce,{variant:r||K.Small,type:t||he.Simple}),!a&&jsxRuntime.jsx(O,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});qo.displayName="Zuz.Cover";var Ne=qo;var Yo="(prefers-color-scheme: dark)",Xs=typeof window>"u",Qo=react.createContext(void 0),Mt=o=>{let n=react.useContext(Qo);if(!n){if(o===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return n},ct=Mt,Ys=({children:o,storageKey:n="--ucs",forceTheme:e,zuzMap:t,...r})=>(t&&Bo(t),jsxRuntime.jsx(js,{storageKey:n,forceTheme:e,...r,children:o})),js=({children:o,storageKey:n,forceTheme:e,...t})=>{let[r,s]=react.useState(()=>e||jo(n,"system")),[p,a]=react.useState(()=>e||jo(n)),u=l=>(l||(l=window.matchMedia(Yo)),l.matches?"dark":"light"),c=react.useCallback(l=>{let d=l=="system"?u():l,x=document.documentElement;x.setAttribute("color-scheme",d),x.style.colorScheme=d,a(d);},[u]),i=react.useCallback(l=>{s(l),localStorage.setItem(n,l),c(l);},[r]),f=react.useCallback(l=>{let d=u(l);a(d),r==="system"&&c("system");},[r]);return react.useEffect(()=>{r==null&&window.localStorage.getItem(n);},[r]),react.useEffect(()=>{window.matchMedia(Yo).addEventListener("change",f);},[f]),react.useEffect(()=>{let l=d=>{d.key==n&&(d.newValue?i(d.newValue):i("system"));};return window.addEventListener("storage",l),()=>window.removeEventListener("storage",l)},[i]),react.useEffect(()=>{c(e||r||"system");},[r]),jsxRuntime.jsxs(Qo,{value:{colorScheme:r,resolvedScheme:p,setColorScheme:i,...t},children:[e?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
|
|
2
|
+
var Po={name:"@zuzjs/ui"};var No=Po.name,Ro=(o,n=[])=>{let e=["as",...n],t={...o};return Object.keys(t).map(r=>{r in chunk7SIIMFAD_cjs.a&&delete t[r];}),"skeleton"in e&&e.skeleton.enabled==true&&delete t.children,e.map(r=>r in t&&delete t[r]),t};var Pt={Circle:"CIRCLE",Square:"SQUARE"},Tp={Default:"DEFAULT",Circle:"CIRCLE"},Pp={Light:"light",Dark:"dark",System:"system"},de={Default:"DEFAULT",Switch:"SWITCH"},Nt={Auto:"auto",Top:"top",Bottom:"bottom",Left:"left",Right:"right"},J=Nt,K={Default:"def",Small:"sm",Medium:"md",Large:"lg",XLarge:"xl"},Np={Asc:"ASC",Desc:"DESC"},Rp={String:"STRING",Number:"NUMBER",Boolean:"BOOLEAN",Array:"ARRAY",Object:"OBJECT",Date:"DATE",Time:"TIME",DateTime:"DATETIME",File:"FILE"},Ip={Dots:"DOTS"},ge={IPV4:"IPV4",IPV6:"IPV6",Email:"EMAIL",Uri:"URI",Password:"PASSWORD",MatchField:"MATCHFIELD",Pattern:"*",GreaterThan:"GREATER_THAN"},ne={Success:"success",Error:"error",Warning:"warning",Info:"info"},_={Spring:"SPRING",Liquid:"LIQUID",EaseInOut:"EASEINOUT",Bounce:"BOUNCE"},W={FadeIn:"FADE_IN",ScaleIn:"SCALE_IN",SlideInTop:"SLIDE_FROM_TOP",SlideInRight:"SLIDE_FROM_RIGHT",SlideInBottom:"SLIDE_FROM_BOTTOM",SlideInLeft:"SLIDE_FROM_LEFT"},Ep={Success:"success",Error:"error",Idle:"idle",Dead:"dead"},se={Dialog:"DIALOG",Default:"DEFAULT",Error:"ERROR",Success:"SUCCESS",Warn:"WARN",Promise:"PROMISE"},Ee=se,Rt={Left:"LEFT",Right:"RIGHT",Center:"CENTER"},Io=Rt,Bp={Bar:"BAR",Ring:"RING"},at={Default:"range",Text:"number"},It={Default:"DEFAULT",Card:"CARD"},it={Gooey:"gooey"},Te={Left:"LEFT",Right:"RIGHT",Top:"TOP",Bottom:"BOTTOM"};var Eo=Symbol.for("zuz.global.map"),Bo=o=>{globalThis[Eo]=o;},Cs=()=>globalThis[Eo]||{},Et=o=>{let n=Array.isArray(o)?o.join(" "):o;if(!n||typeof n!="string")return "";let e=Cs();return process.env.NODE_ENV==="development"&&Object.keys(e).length===0&&console.warn(`[${No}] No utility map detected. Classes will not be hashed. `,"Ensure you call setZuzMap() or use <ThemeProvider zuzMap={...} />."),n.split(/\s+/).filter(Boolean).map(t=>e[t]||t).join(" ")},Xp=o=>{let n=Array.isArray(o)?o.join(" "):o;return !n||typeof n!="string"?"":Et(n)},Lo=o=>{let n={};for(let e in o){let t=o[e];if(e.startsWith("--")){n[e]=t;continue}let r=chunk7SIIMFAD_cjs.e[e]?.toString()??e;if(r==="x"||r==="translateX"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(e,t)} ${s[1]??"0px"}`;}else if(r==="y"||r==="translateY"){let s=n.translate?.split(" ")??["0px","0px"];n.translate=`${s[0]??"0px"} ${chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(e,t)}`;}else chunk7SIIMFAD_cjs.c.includes(r)?n[r]=chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(e,t):n[r]=t;}return n},Yp=o=>{let n={};if(Object.keys(o).length>0)for(let e in o){let t=e,r=o[t];if(t.startsWith("--")){n[t]=r;continue}let s=t in chunk7SIIMFAD_cjs.e?chunk7SIIMFAD_cjs.e[t].toString():t;chunk7SIIMFAD_cjs.c.includes(s)?s==="translateX"||s==="x"?n.translate=`${chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(t,r)} ${n.translate?.split(" ")[1]||"0px"}`:s==="translateY"||s==="y"?n.translate=`${n.translate?.split(" ")[0]||"0px"} ${chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(t,r)}`:n[s.replace("translate","translate")]=chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(t,r):chunk7SIIMFAD_cjs.d.includes(s)?n[s]=chunk7SIIMFAD_cjs.f.addUnitsToComplexValue(t,r):n[s]=r;}return n},Bt=o=>{if(!o)return "linear";switch(o.toUpperCase()){case _.Bounce:return "var(--bounce)";case _.Liquid:return "var(--liquid)";case _.Spring:return "var(--spring)";case _.EaseInOut:return "ease-in-out";default:return "linear"}},Ve=(o,n=0)=>{let e={},t={},r=n||20;switch(o){case W.SlideInLeft:case W.SlideInRight:e={"--fx-x":o===W.SlideInLeft?`-${r}px`:`${r}px`,opacity:0},t={"--fx-x":"0px",opacity:1};break;case W.SlideInTop:case W.SlideInBottom:e={"--fx-y":o===W.SlideInTop?`-${r}px`:`${r}px`,opacity:0},t={"--fx-y":"0px",opacity:1};break;case W.ScaleIn:e={scale:0,opacity:0},t={scale:1,opacity:1};break;case W.FadeIn:e={opacity:0},t={opacity:1};break}return {from:e,to:t}},jp=(o,n,e)=>{let{from:t,to:r}=Ve(o);return n?{...t,...r}:e?t:r};var Ns=(o,n)=>{let e=react.useRef([]);return react.useEffect(()=>{let t=n?.current;if(!t||!o||!o.clearAtEnd)return;let r=s=>{e.current.includes(s.propertyName)&&o.clearAtEnd===true&&(t.style.transform="",t.style.filter="",e.current.forEach(p=>t.style.removeProperty(p)));};return t.addEventListener("transitionend",r),()=>t.removeEventListener("transitionend",r)},[o,n]),react.useEffect(()=>{if(typeof window>"u"||!n?.current)return;let t=n.current;(o?.scroll||o?.mouse)&&(t.style.willChange="transform",t.style.translate="var(--fx-x, 0px) var(--fx-y, 0px)",t.style.transition=`translate 0.1s ${o.curve?Bt(o.curve):"var(--spring)"}`);},[o,n]),react.useMemo(()=>{if(!o)return {style:{}};let{transition:t,from:r,to:s,exit:p,when:a,duration:u=.3,delay:c=0,curve:i}=o,f={},{from:l,to:d}=t?Ve(t):{from:r||{},to:s||{}};f=a===void 0?{...l,...d}:a?{...d}:p||l;let x=Bt(i),b=[],y=Lo(f);e.current=Object.keys(y);let C={...y};return Object.keys(y).forEach(v=>{let g=v.startsWith("--")?"all":v;b.includes(g)||b.push(`${g} ${u}s ${x} ${c}s`);}),{style:{...C,transition:b.join(", ")}}},[o])},$e=Ns;var Rs=(o,n)=>{let{as:e,fx:t,transition:r,skeleton:s,className:p,propsToRemove:a,style:u,...c}=o||{},i=r?{transition:r,duration:.3}:t||{},{style:f}=$e(i,n),l=Et(e??"");return {style:{...u,...f},className:[p||"",l||"",s?.enabled?"--skeleton":""].join(" ").trim(),rest:{...Ro(c,a?[...a,"skeleton"]:["skeleton"])}}},P=Rs;var Ls=(o,n={})=>{let{offset:e=8,direction:t="bottom",container:r=null,triggerRef:s=null}=n,p=react.useRef(null),a=react.useCallback(()=>{let u=o.current;if(!u)return;let c=s?.current||u.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=u.getBoundingClientRect(),f=c.getBoundingClientRect(),l,d;r?(l=r.getBoundingClientRect(),d="absolute"):(window.getComputedStyle(u).position==="fixed"?d="fixed":d="absolute",d==="fixed"?l={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:l={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}),u.style.position!==d&&(u.style.position=d),p.current=d;let y=0,C=0;switch(t){case "top":y=f.top-i.height-e,C=f.left,y<l.top&&f.bottom+i.height+e<=l.bottom&&(y=f.bottom+e);break;case "bottom":y=f.bottom+e,C=f.left,y+i.height>l.bottom&&f.top-i.height-e>=l.top&&(y=f.top-i.height-e);break;case "left":y=f.top,C=f.left-i.width-e,C<l.left&&f.right+i.width+e<=l.right&&(C=f.right+e);break;case "right":y=f.top,C=f.right+e,C+i.width>l.right&&f.left-i.width-e>=l.left&&(C=f.left-i.width-e);break}if(y=Math.max(l.top,Math.min(y,l.bottom-i.height)),C=Math.max(l.left,Math.min(C,l.right-i.width)),p.current==="fixed")u.style.top=`${y}px`,u.style.left=`${C}px`;else {let v;u.offsetParent?v=u.offsetParent.getBoundingClientRect():v={top:0,left:0};let g=y-v.top+window.scrollY,T=C-v.left+window.scrollX;u.style.top=`${g}px`,u.style.left=`${T}px`;}},[o,s,e,t,r]);return react.useEffect(()=>{let u=o.current;if(!u)return;let c=s?.current||u.parentElement;if(!c){console.warn("usePosition: No trigger element found. Positioning may not work.");return}let i=new ResizeObserver(a);return i.observe(u),c&&i.observe(c),a(),window.addEventListener("resize",a),window.addEventListener("scroll",a,true),()=>{i.disconnect(),c&&i.disconnect(),window.removeEventListener("resize",a),window.removeEventListener("scroll",a,true);}},[o,t,e,r,s]),{postion:p.current,reposition:a}},ze=Ls;var Mo=react.forwardRef((o,n)=>{let{when:e,...t}=o;return jsxRuntime.jsx(m,{ref:n,"aria-hidden":!e,className:"--overlay fixed fill",fx:{transition:W.FadeIn,when:e},...t})});Mo.displayName="Zuz.Overlay";var Pe=Mo;var Do=({ref:o,...n})=>{let{style:e,...t}=n,{style:r,className:s,rest:p}=P(t);return jsxRuntime.jsx("span",{ref:o,style:e,className:s,...p})};Do.displayName="Zuz.Span";var Q=Do;var Ho=react.forwardRef((o,n)=>{let{name:e,pathCount:t,size:r,color:s,...p}=o,{className:a,style:u,rest:c}=P(p);return jsxRuntime.jsx("div",{style:{color:s,...u},className:`icon-${e} --icon --${r||K.Default} ${a}`.trim(),ref:n,...c,children:Array(t||0).fill(0).map((i,f)=>jsxRuntime.jsx(Q,{className:`path${f+1}`},`${e}-layer-${f}`))})});Ho.displayName="Zuz.Icon";var q=Ho;var he={Simple:"SIMPLE"};var Ao=o=>{let {type:n,variant:e,width:t,speed:r,color:s,background:p,foreground:a,...u}=o,{className:i,style:f,rest:l}=P(u);return jsxRuntime.jsx(m,{className:`${i} --spinner --${(n||he.Simple).toLowerCase()} --${e}`.trim(),style:{...f},...l})};Ao.displayName="Zuz.Spinner";var ce=Ao;var lt={Loading:"loading",Normal:"normal"};var $o=({ref:o,...n})=>{let{reset:e,variant:t=K.Small,icon:r,iconSize:s,children:p,withLabel:a,spinner:u,state:c,disabled:i,...f}=n,{style:l,className:d,rest:x}=P(f);return jsxRuntime.jsxs("button",{className:`--button --${t} flex aic ${e?"":"jcc"} ${r?"ico-btn":""} ${d}`.trim().replace(/\s+/g," "),style:l,ref:o,disabled:c==lt.Loading||n.skeleton?.enabled||i,...x,children:[c==lt.Loading&&jsxRuntime.jsx(ce,{variant:t,type:u||he.Simple}),(!c||c==lt.Normal)&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[r&&jsxRuntime.jsx(q,{size:s,name:r}),a===true?jsxRuntime.jsx(Q,{children:p}):p]})]})};$o.displayName="Zuz.Button";var V=$o;var Vs={colorSchemeLight:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"5"}),jsxRuntime.jsx("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"})]}),colorSchemeSystem:jsxRuntime.jsxs("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",ry:"2"}),jsxRuntime.jsx("path",{d:"M8 21h8M12 17v4"})]}),colorSchemeDark:jsxRuntime.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",color:"currentcolor",shapeRendering:"geometricPrecision",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79"})}),arrowDown:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M17.919 8.18H6.079c-.96 0-1.44 1.16-.76 1.84l5.18 5.18c.83.83 2.18.83 3.01 0l1.97-1.97 3.21-3.21c.67-.68.19-1.84-.77-1.84z"})}),arrowUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M18.68 13.978l-3.21-3.21-1.96-1.97a2.13 2.13 0 00-3.01 0l-5.18 5.18c-.68.68-.19 1.84.76 1.84h11.84c.96 0 1.44-1.16.76-1.84z"})}),search:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 34 34",children:jsxRuntime.jsx("path",{d:"M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z"})}),close:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}),eye:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 20.5c-4.299 0-8.24-3.023-10.544-8.086a1 1 0 010-.828C3.759 6.523 7.701 3.5 12 3.5s8.24 3.023 10.544 8.086a1.001 1.001 0 010 .828 18.14 18.14 0 01-1.391 2.52 1 1 0 11-1.666-1.106A15.87 15.87 0 0020.529 12C18.543 7.92 15.379 5.5 12 5.5S5.457 7.92 3.471 12c1.986 4.08 5.15 6.5 8.529 6.5a7.964 7.964 0 005.036-1.92 1 1 0 111.265 1.55A9.94 9.94 0 0112 20.5z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 16a4.004 4.004 0 01-3.929-4.756 1 1 0 011.965.375A2 2 0 1014 12a2.034 2.034 0 00-2.053-1.999 1.04 1.04 0 01-1.043-.947.963.963 0 01.902-1.05L12 8a4 4 0 010 8z"})]}),eyeSlash:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#333",d:"M12 15c-4.132 0-7.98-1.214-10.294-3.249a1 1 0 111.32-1.502C4.986 11.972 8.34 13 12 13s7.014-1.028 8.974-2.751a1 1 0 111.32 1.502C19.98 13.786 16.132 15 12 15z"}),jsxRuntime.jsx("path",{fill:"#333",d:"M12 18a1 1 0 01-1-1v-3a1 1 0 012 0v3a1 1 0 01-1 1zM7.749 17.667a.964.964 0 01-.17-.014 1 1 0 01-.817-1.155l.505-2.935a1 1 0 111.97.339l-.504 2.935a1 1 0 01-.984.83zM3.636 16.306a1.001 1.001 0 01-.942-1.336l.978-2.745a1 1 0 111.884.672l-.978 2.745a1 1 0 01-.942.664zM16.251 17.667a1 1 0 01-.984-.83l-.505-2.935a1 1 0 011.97-.339l.506 2.935a1 1 0 01-.816 1.155.964.964 0 01-.17.014zM20.364 16.306a1 1 0 01-.942-.664l-.978-2.745a1 1 0 111.884-.672l.978 2.745a1.001 1.001 0 01-.942 1.336z"})]}),check:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[" ",jsxRuntime.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})," "]}),[ne.Info]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M21.56 10.738l-1.35-1.58c-.25-.3-.46-.86-.46-1.26v-1.7c0-1.06-.87-1.93-1.93-1.93h-1.7c-.4 0-.97-.21-1.27-.46l-1.58-1.35c-.69-.59-1.82-.59-2.51 0l-1.6 1.35c-.3.25-.86.46-1.26.46H6.17c-1.06 0-1.93.87-1.93 1.93v1.7c0 .39-.2.95-.45 1.25l-1.35 1.59c-.58.7-.58 1.82 0 2.5l1.35 1.59c.25.29.45.86.45 1.25v1.71c0 1.06.87 1.93 1.93 1.93h1.74c.39 0 .96.21 1.26.46l1.58 1.35c.69.59 1.82.59 2.51 0l1.58-1.35c.3-.25.86-.46 1.26-.46h1.7c1.06 0 1.93-.87 1.93-1.93v-1.7c0-.4.21-.96.46-1.26l1.35-1.58c.61-.68.61-1.81.02-2.51zm-10.31-2.61c0-.41.34-.75.75-.75s.75.34.75.75v4.83c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-4.83zm.75 8.74c-.55 0-1-.45-1-1s.44-1 1-1c.55 0 1 .45 1 1s-.44 1-1 1z"})}),[ne.Warning]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.51 5.85l-5.94-3.43c-.97-.56-2.17-.56-3.15 0L4.49 5.85a3.15 3.15 0 00-1.57 2.73v6.84c0 1.12.6 2.16 1.57 2.73l5.94 3.43c.97.56 2.17.56 3.15 0l5.94-3.43a3.15 3.15 0 001.57-2.73V8.58a3.192 3.192 0 00-1.58-2.73zm-8.26 1.9c0-.41.34-.75.75-.75s.75.34.75.75V13c0 .41-.34.75-.75.75s-.75-.34-.75-.75V7.75zm1.67 8.88c-.05.12-.12.23-.21.33a.99.99 0 01-1.09.21c-.13-.05-.23-.12-.33-.21-.09-.1-.16-.21-.22-.33a.986.986 0 01-.07-.38c0-.26.1-.52.29-.71.1-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.09.1.16.2.21.33.05.12.08.25.08.38s-.03.26-.08.38z"})}),[ne.Error]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),[ne.Success]:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})}),layers:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:[jsxRuntime.jsx("path",{d:"M19.3697 4.89109L13.5097 2.28109C12.6497 1.90109 11.3497 1.90109 10.4897 2.28109L4.62969 4.89109C3.14969 5.55109 2.92969 6.45109 2.92969 6.93109C2.92969 7.41109 3.14969 8.31109 4.62969 8.97109L10.4897 11.5811C10.9197 11.7711 11.4597 11.8711 11.9997 11.8711C12.5397 11.8711 13.0797 11.7711 13.5097 11.5811L19.3697 8.97109C20.8497 8.31109 21.0697 7.41109 21.0697 6.93109C21.0697 6.45109 20.8597 5.55109 19.3697 4.89109Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 17.04C11.6203 17.04 11.2403 16.96 10.8903 16.81L4.15031 13.81C3.12031 13.35 2.32031 12.12 2.32031 10.99C2.32031 10.58 2.65031 10.25 3.06031 10.25C3.47031 10.25 3.80031 10.58 3.80031 10.99C3.80031 11.53 4.25031 12.23 4.75031 12.45L11.4903 15.45C11.8103 15.59 12.1803 15.59 12.5003 15.45L19.2403 12.45C19.7403 12.23 20.1903 11.54 20.1903 10.99C20.1903 10.58 20.5203 10.25 20.9303 10.25C21.3403 10.25 21.6703 10.58 21.6703 10.99C21.6703 12.11 20.8703 13.35 19.8403 13.81L13.1003 16.81C12.7603 16.96 12.3803 17.04 12.0003 17.04Z",fill:"#292D32"}),jsxRuntime.jsx("path",{d:"M12.0003 22.0009C11.6203 22.0009 11.2403 21.9209 10.8903 21.7709L4.15031 18.7709C3.04031 18.2809 2.32031 17.1709 2.32031 15.9509C2.32031 15.5409 2.65031 15.2109 3.06031 15.2109C3.47031 15.2109 3.80031 15.5409 3.80031 15.9509C3.80031 16.5809 4.17031 17.1509 4.75031 17.4109L11.4903 20.4109C11.8103 20.5509 12.1803 20.5509 12.5003 20.4109L19.2403 17.4109C19.8103 17.1609 20.1903 16.5809 20.1903 15.9509C20.1903 15.5409 20.5203 15.2109 20.9303 15.2109C21.3403 15.2109 21.6703 15.5409 21.6703 15.9509C21.6703 17.1709 20.9503 18.2709 19.8403 18.7709L13.1003 21.7709C12.7603 21.9209 12.3803 22.0009 12.0003 22.0009Z",fill:"#292D32"})]}),play:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8 5v14l11-7z"})}),pause:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"})}),next:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m6 18 8.5-6L6 6zM16 6v12h2V6z"})}),prev:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"})}),plus:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:jsxRuntime.jsx("path",{d:"M28 14H18V4a2 2 0 0 0-4 0v10H4a2 2 0 0 0 0 4h10v10a2 2 0 0 0 4 0V18h10a2 2 0 0 0 0-4"})}),add:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2m4 10.75h-3.25V16c0 .41-.34.75-.75.75s-.75-.34-.75-.75v-3.25H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h3.25V8c0-.41.34-.75.75-.75s.75.34.75.75v3.25H16c.41 0 .75.34.75.75s-.34.75-.75.75"})}),chevronUp:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 14 5-5 5 5z"})}),chevronBottom:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m7 10 5 5 5-5z"})}),chevronRight:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m10 17 5-5-5-5v10z"})}),chevronLeft:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m14 7-5 5 5 5V7z"})}),chevronRightOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"})}),chevronLeftOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"})}),chevronUpOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"})}),chevronDownOutline:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"})}),bezier:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M19.14 7.72C19.43 8.47 20.15 9 21 9C22.1 9 23 8.1 23 7C23 5.9 22.1 5 21 5C20.15 5 19.43 5.53 19.14 6.28C19.09 6.27 19.05 6.25 19 6.25H15V5.5C15 4.68 14.32 4 13.5 4H10.5C9.68 4 9 4.68 9 5.5V6.25H5C4.95 6.25 4.91 6.27 4.86 6.28C4.57 5.53 3.85 5 3 5C1.9 5 1 5.9 1 7C1 8.1 1.9 9 3 9C3.85 9 4.57 8.47 4.86 7.72C4.91 7.73 4.95 7.75 5 7.75H7.57C5.52 9.27 4.25 11.79 4.25 14.5C4.25 14.67 4.26 14.83 4.28 15H4C3.17 15 2.5 15.67 2.5 16.5V18.5C2.5 19.33 3.17 20 4 20H6C6.22 20 6.42 19.95 6.61 19.86C7.13 19.64 7.5 19.11 7.5 18.5V16.5C7.5 15.67 6.83 15 6 15H5.77C5.77 14.97 5.78 14.94 5.78 14.91C5.76 14.77 5.76 14.64 5.76 14.5C5.76 12.03 7.03 9.77 9.02 8.6C9.06 9.37 9.71 10 10.5 10H13.5C14.29 10 14.94 9.37 14.99 8.6C16.98 9.77 18.25 12.04 18.25 14.5C18.25 14.64 18.24 14.77 18.23 14.91C18.23 14.94 18.24 14.97 18.24 15H18C17.17 15 16.5 15.67 16.5 16.5V18.5C16.5 19.11 16.87 19.64 17.39 19.86C17.58 19.95 17.78 20 18 20H20C20.83 20 21.5 19.33 21.5 18.5V16.5C21.5 15.67 20.83 15 20 15H19.72C19.74 14.83 19.75 14.67 19.75 14.5C19.75 11.79 18.48 9.27 16.43 7.75H19C19.05 7.75 19.09 7.73 19.14 7.72Z",fill:"#292D32"})}),mouse:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M13.2978 2.11468C13.0064 2.06339 12.75 2.29593 12.75 2.59185V5.45262C12.75 5.65098 12.8709 5.82564 13.0359 5.93583C13.5391 6.27202 13.87 6.84597 13.87 7.49906V9.49906C13.87 10.5291 13.03 11.3791 12 11.3791C10.96 11.3791 10.12 10.5291 10.12 9.49906V7.49906C10.12 6.84578 10.4583 6.27168 10.9639 5.93554C11.1291 5.82572 11.25 5.65098 11.25 5.45262V2.59249C11.25 2.29634 10.9935 2.0637 10.7019 2.11513C9.15243 2.38834 7.76579 3.13327 6.7 4.19906C5.34 5.55906 4.5 7.43906 4.5 9.49906V14.4991C4.5 18.6291 7.87 21.9991 12 21.9991C16.13 21.9991 19.5 18.6291 19.5 14.4991V9.49906C19.5 5.80857 16.813 2.73328 13.2978 2.11468Z",fill:"#292D32"})}),addKey:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("path",{d:"M20.9498 14.55L14.5598 20.94C13.1598 22.34 10.8598 22.34 9.44977 20.94L3.05977 14.55C1.65977 13.15 1.65977 10.85 3.05977 9.44L9.44977 3.05C10.8498 1.65 13.1498 1.65 14.5598 3.05L20.9498 9.44C22.3498 10.85 22.3498 13.15 20.9498 14.55Z",fill:"#292D32"})}),calendar:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{fill:"#292D32",d:"M8.25 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75S9 1.59 9 2v3c0 .41-.34.75-.75.75M15.75 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75M12 14.09c.52 0 .9-.31.9-.8 0-.5-.38-.79-.9-.79s-.9.29-.9.79c0 .49.38.8.9.8M12 17c.629 0 1.14-.416 1.14-.93 0-.513-.511-.93-1.14-.93-.63 0-1.14.417-1.14.93s.51.93 1.14.93"}),jsxRuntime.jsx("path",{fill:"#292D32",d:"M19.57 4.5c-.66-.49-1.61-.02-1.61.81v.1c0 1.17-.84 2.25-2.01 2.37-1.35.14-2.49-.92-2.49-2.24V4.5c0-.55-.45-1-1-1h-.92c-.55 0-1 .45-1 1v1.04c0 .79-.41 1.49-1.03 1.88-.09.06-.19.11-.29.16q-.135.075-.3.12c-.12.04-.25.07-.39.08q-.24.03-.48 0c-.14-.01-.27-.04-.39-.08q-.15-.045-.3-.12c-.1-.05-.2-.1-.29-.16-.63-.44-1.03-1.2-1.03-2.01v-.1c0-.77-.82-1.23-1.47-.9-.01.01-.02.01-.03.02-.04.02-.07.04-.11.07-.03.03-.07.05-.1.08-.28.22-.53.47-.74.74-.11.12-.2.25-.28.38a3.498 3.498 0 0 0-.27.46c-.02.02-.03.03-.03.05-.06.12-.12.24-.16.37-.03.05-.04.09-.06.14-.06.15-.1.3-.14.45-.04.14-.07.29-.09.44a5.902 5.902 0 0 0-.06.76v8.76A4.87 4.87 0 0 0 7.37 22h9.26a4.87 4.87 0 0 0 4.87-4.87V8.37c0-1.59-.76-2.98-1.93-3.87M12 18.25c-1.55 0-2.5-.77-2.5-2.01 0-.68.35-1.27.96-1.62-.44-.31-.73-.77-.73-1.4 0-1.3 1.04-1.97 2.27-1.97s2.26.67 2.26 1.97c0 .63-.28 1.09-.73 1.4.62.35.97.94.97 1.62 0 1.24-.96 2.01-2.5 2.01"})]}),done:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z"})}),doneAll:jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:jsxRuntime.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12zM.41 13.41 6 19l1.41-1.41L1.83 12z"})}),pending:jsxRuntime.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[jsxRuntime.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),jsxRuntime.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]})},k=Vs;var $s=({title:o="Alert",onClose:n})=>jsxRuntime.jsxs(m,{as:"--head flex aic rel",children:[jsxRuntime.jsx(m,{as:`--${o?"title":"dot"} flex aic jcc rel`,children:o}),jsxRuntime.jsx(V,{onClick:e=>n(),className:"--closer abs center-v",children:k.close})]}),_o=$s;var _s=({action:o,render:n=true,message:e=""})=>jsxRuntime.jsx(m,{as:`--body flex aic rel ${o?"":"--no-action"}`.trim(),children:n?e:null}),Fo=_s;var Zs=({action:o,actionPosition:n,dialogID:e,variant:t})=>jsxRuntime.jsx(m,{as:`--footer flex aic rel ${n?n==Io.Center?"jcc":"":"jce"}`.trim(),children:o.map((r,s)=>jsxRuntime.jsx(V,{variant:t,onClick:p=>r.handler?r.handler():r.onClick?r.onClick():console.log("onClick Handler missing"),as:"--action",children:r.label},`dialog-${e}-action-${r.key}`))}),Ko=Zs;var Wo=react.forwardRef((o,n)=>{let{h:e,html:t,children:r,lines:s,...p}=o,{style:a,className:u,rest:c}=P(p),i=`h${o.h||1}`;return jsxRuntime.jsx(i,{ref:n,style:a,className:u,...c,children:t?jsxRuntime.jsx(Q,{dangerouslySetInnerHTML:{__html:t}}):r})});Wo.displayName="Zuz.Text";var O=Wo;var qo=react.forwardRef((o,n)=>{let{message:e,spinner:t,spinnerSize:r,color:s,when:p,hideMessage:a,...u}=o,{className:c,style:i,rest:f}=P(u);return "when"in o&&o.when==false?null:jsxRuntime.jsxs(m,{className:`--cover flex aic jcc cols abs fillx nope nous ${c}`.trim(),style:{...i,backgroundColor:"var(--cover-bg)"},...f,children:[jsxRuntime.jsx(ce,{variant:r||K.Small,type:t||he.Simple}),!a&&jsxRuntime.jsx(O,{className:"--label",style:{color:"var(--cover-label)"},children:e||"loading"})]})});qo.displayName="Zuz.Cover";var Ne=qo;var Yo="(prefers-color-scheme: dark)",Xs=typeof window>"u",Qo=react.createContext(void 0),Mt=o=>{let n=react.useContext(Qo);if(!n){if(o===true)return;throw new Error("useColorScheme must be used within a ThemeProvider")}return n},ct=Mt,Ys=({children:o,storageKey:n="--ucs",forceTheme:e,zuzMap:t,...r})=>(t&&Bo(t),jsxRuntime.jsx(js,{storageKey:n,forceTheme:e,...r,children:o})),js=({children:o,storageKey:n,forceTheme:e,...t})=>{let[r,s]=react.useState(()=>e||jo(n,"system")),[p,a]=react.useState(()=>e||jo(n)),u=l=>(l||(l=window.matchMedia(Yo)),l.matches?"dark":"light"),c=react.useCallback(l=>{let d=l=="system"?u():l,x=document.documentElement;x.setAttribute("color-scheme",d),x.style.colorScheme=d,a(d);},[u]),i=react.useCallback(l=>{s(l),localStorage.setItem(n,l),c(l);},[r]),f=react.useCallback(l=>{let d=u(l);a(d),r==="system"&&c("system");},[r]);return react.useEffect(()=>{r==null&&window.localStorage.getItem(n);},[r]),react.useEffect(()=>{window.matchMedia(Yo).addEventListener("change",f);},[f]),react.useEffect(()=>{let l=d=>{d.key==n&&(d.newValue?i(d.newValue):i("system"));};return window.addEventListener("storage",l),()=>window.removeEventListener("storage",l)},[i]),react.useEffect(()=>{c(e||r||"system");},[r]),jsxRuntime.jsxs(Qo,{value:{colorScheme:r,resolvedScheme:p,setColorScheme:i,...t},children:[e?null:jsxRuntime.jsx("script",{suppressHydrationWarning:true,dangerouslySetInnerHTML:{__html:`const el = document.documentElement
|
|
3
3
|
const themes = ['light', 'dark']
|
|
4
4
|
let theme = localStorage.getItem(\`${n}\`) || "system";
|
|
5
5
|
if (theme === "system") {
|
|
6
6
|
theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
7
7
|
}
|
|
8
8
|
document.documentElement.setAttribute("color-scheme", theme);
|
|
9
|
-
document.documentElement.style.colorScheme = theme;`}}),o]})},jo=(o,n)=>{if(Xs)return;let e;try{e=localStorage.getItem(o)||void 0;}catch{}return e||n};var or=({ref:o,...n})=>{let{index:e,id:t,title:r,message:s,transition:p,curve:a,speed:u,type:c,action:i,actionPosition:f,spinner:l,loadingMessage:d,variant:x,onClose:b,onShow:y,onHide:C,...v}=n,g=react.useMemo(()=>core.uuid(12),[]),[T,R]=react.useState(r||""),[N,S]=react.useState(s||""),[I,$]=react.useState(c||Ee.Dialog),[B,F]=react.useState(false),[L,U]=react.useState(true),[M,G]=react.useState(i||null),[w,H]=react.useState(false),{variant:A}=ct(),Z=x||A||K.Small,{style:D,className:z,rest:X}=P(v),ee=react.useRef(null),j=$e({when:B,duration:u||.3,delay:.1,transition:p||W.SlideInBottom,curve:a||_.EaseInOut});return react.useEffect(()=>{$(Ee.Dialog),S(s),R(T),M&&G(M.reduce((re,ae)=>(re.push({...ae,key:ae.key||core.uuid(12)}),re),[])),F(true),setTimeout(()=>y?y():()=>{},1e3);},[]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Pe,{when:B}),jsxRuntime.jsxs(m,{as:`--dialog --${(c??Ee.Default).toLowerCase()} ${B?"--visible":""} ${z} fixed abc`.trim(),style:j.style,...X,ref:ee,children:[jsxRuntime.jsx(Ne,{when:w,spinner:l,message:d}),jsxRuntime.jsx(_o,{title:T,onClose:()=>{F(false),b(t);}}),jsxRuntime.jsx(Fo,{message:N,render:L,action:M}),M&&jsxRuntime.jsx(Ko,{variant:Z,action:M,dialogID:g,actionPosition:f})]})]})};or.displayName="Zuz.Dialog";var Dt=or;var Ht=react.createContext(null),ia=react.forwardRef((o,n)=>{let[e,t]=react.useState([]),r=react.useRef(0),s=()=>++r.current;react.useImperativeHandle(n,()=>({add(a){let u=s(),c={id:u,...a};return t(i=>[c,...i.slice(0,4)]),u},remove(a){t(u=>u.filter(c=>c.id!==a));},clear(){t([]);}}));let p=a=>{setTimeout(()=>t(u=>u.filter(c=>c.id!==a)),1e3);};return jsxRuntime.jsx(m,{as:"--dialog-wrapper rel",children:e.map((a,u)=>jsxRuntime.jsx(Dt,{onClose:p,index:u,...a},`sheet-${a.id}`))})}),la=react.forwardRef(({children:o,fx:n},e)=>{let t=react.useRef(null),r=react.useMemo(()=>({add:s=>t.current?.add(s),remove:s=>t.current?.remove(s),clear:()=>t.current?.clear(),fx:n||{curve:_.EaseInOut,duration:.4}}),[t.current]);return jsxRuntime.jsxs(Ht.Provider,{value:r,children:[o,jsxRuntime.jsx(ia,{ref:t})]})}),ma=la;var ua=()=>{let o=react.useContext(Ht);if(!o)throw new Error("useDialog must be used inside <DialogProvider>");let n=(s,p)=>o.add({...p,type:s});return {clearAll:()=>o.clear(),show:s=>n(Ee.Dialog,s),hide:s=>o.remove(s)}},fa=ua;var At=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(At||{}),sr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var ga=({index:o,id:n,type:e,icon:t,title:r,message:s,duration:p})=>{let a=hooks.useDelayed(),u=hooks.useDelayed(((p||4)-1)*1e3),c=react.useContext(Ze);return jsxRuntime.jsxs(m,{as:`--snack --${e} --snack-${n} ${o>2?"--snacked":""} flex aic`,fx:{from:{left:"50%",x:"-50%",top:-100,scale:1,opacity:.5},to:{left:"50%",x:"-50%",top:25,scale:1,opacity:1},curve:c?.fx.curve,duration:c?.fx.duration,when:a&&!u},children:[jsxRuntime.jsx(m,{as:"--ico flex aic jcc",fx:{transition:W.ScaleIn,curve:_.Spring,delay:.2,when:a&&!u},children:t?jsxRuntime.jsx(q,{name:t,fx:{transition:W.ScaleIn,curve:_.Spring,delay:.4,duration:.5,when:a&&!u}}):jsxRuntime.jsx(m,{as:"--no-icon",fx:{transition:W.ScaleIn,curve:_.Spring,delay:.4,duration:.5,when:a&&!u}})}),jsxRuntime.jsxs(m,{as:"--meta",children:[jsxRuntime.jsx(O,{as:"--tt",fx:{transition:W.SlideInTop,curve:_.Spring,delay:.3,when:a},children:r||sr[e]}),jsxRuntime.jsx(O,{as:"--tm",fx:{transition:W.SlideInTop,curve:_.Spring,delay:.4,duration:.5,when:a},children:s})]})]})},lr=ga;var Ze=react.createContext(null),va=react.forwardRef((o,n)=>{let[e,t]=react.useState([]),r=react.useRef(0),s=()=>++r.current;return react.useImperativeHandle(n,()=>({add(p){let a=s(),u={id:a,...p};return t(c=>[u,...c.slice(0,4)]),p.duration!==1/0&&p.type!="promise"&&setTimeout(()=>this.remove(a),((p.duration??4)+1)*1e3),a},remove(p){t(a=>a.filter(u=>u.id!==p));},clear(){t([]);}})),jsxRuntime.jsx(m,{as:"--toast-wrapper rel",children:e.map((p,a)=>jsxRuntime.jsx(lr,{index:a,...p},`toast-${p.id}`))})}),wa=react.forwardRef(({children:o,fx:n},e)=>{let t=react.useRef(null),r=react.useMemo(()=>({add:s=>t.current?.add(s),remove:s=>t.current?.remove(s),clear:()=>t.current?.clear(),fx:n||{curve:_.EaseInOut,duration:.4}}),[t.current]);return jsxRuntime.jsxs(Ze.Provider,{value:r,children:[o,jsxRuntime.jsx(va,{ref:t})]})}),Sa=wa;var Pa=()=>{let o=react.useContext(Ze);if(!o)throw new Error("useToast must be used inside <ToastProvider>");let n=(c,i)=>o.add({...i,type:c});return {show:(c,i,f,l)=>n("default",{title:c,message:i,icon:f,duration:l}),hide:c=>o.remove(c),success:(c,i,f,l)=>n("success",{title:c,message:i,icon:f,duration:l}),error:(c,i,f,l)=>n("error",{title:c,message:i,icon:f,duration:l}),warn:(c,i,f,l)=>n("warn",{title:c,message:i,icon:f,duration:l}),promise:(c,i,f,l)=>n("promise",{title:c,message:i,icon:f,duration:l}),clearAll:()=>o.clear()}},$t=Pa;var pr=({ref:o,style:n,...e})=>{let t=react.useRef(null),r=react.useMemo(()=>o&&typeof o!="function"&&o.current?o:t,[o]),{style:s,className:p,rest:a}=P(e,r);return jsxRuntime.jsx("div",{ref:o||t,style:{...s,...n||{}},className:p,...a})};pr.displayName="Zuz.Box";var m=pr;var fr=react.forwardRef((o,n)=>{let{title:e,message:t,...r}=o,[s,p]=react.useState(false);return jsxRuntime.jsxs(m,{className:"--accordion flex cols",...r,children:[jsxRuntime.jsxs(V,{onClick:a=>p(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(O,{className:"--label flex",children:e}),jsxRuntime.jsx(m,{className:"--arrow flex",children:s?k.arrowUp:k.arrowDown})]}),s&&jsxRuntime.jsx(m,{className:"--detail",children:t})]})});fr.displayName="Zuz.Accordion";var La=fr;var ka=({label:o,icon:n,onClick:e,idx:t,selected:r})=>jsxRuntime.jsx(V,{onClick:e,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${t}`),className:`--action ${r?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsxRuntime.jsx(q,{name:n}):n}),gr=ka;var hr=react.forwardRef((o,n)=>{let{items:e,name:t,selected:r,position:s,...p}=o,a=react.useRef(null),[u,c]=react.useState(r||e[0].tag||0),i=react.useCallback(({x:y,y:C})=>{if(a.current){let v=a.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${y-v.left}`),document.documentElement.style.setProperty("--tip-y",`${C-v.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=react.useCallback(()=>{a.current&&(a.current.removeEventListener("pointerleave",f),a.current.removeEventListener("pointermove",i),document.documentElement.style.setProperty("--tip-s","0"));},[]),l=react.useCallback(()=>{a.current&&(a.current.addEventListener("pointerleave",f),a.current.addEventListener("pointermove",i));},[]);react.useEffect(()=>{a.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((y,C)=>C.label.length>y.length?C.label:y,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),a.current?.addEventListener("pointerenter",l));},[]);let{className:d,style:x,rest:b}=P(p);return jsxRuntime.jsxs(m,{ref:a,style:x,className:[`--actionbar flex aic ${d}`,`${!s||s==J.Auto?"rel":`--${s}`}`].join(" ").trim(),...b,children:[e.map((y,C)=>jsxRuntime.jsx(gr,{selected:u===y.tag||r==C,...y,idx:C},`actionbar-action-${y.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(m,{className:"--tip abs",children:jsxRuntime.jsx(m,{className:"--track flex aic",children:e.map(({label:y})=>jsxRuntime.jsx(m,{className:"--lb",children:y},`tool-tip-${y.toLowerCase().replace(/\s+/g,"-")}`))})})]})});hr.displayName="Zuz.ActionBar";var Aa=hr;var yr=react.forwardRef((o,n)=>{let{type:e,icon:t,title:r,message:s,iconSize:p,...a}=o,{className:u,style:c,rest:i}=P(a);return jsxRuntime.jsxs(m,{className:`--alert --${e||ne.Info} flex aic ${u}`.trim(),style:c,...i,children:[jsxRuntime.jsx(m,{className:`--icon icon-${t||"auto-matic"}`,style:p?{fontSize:p,width:p,height:p}:{},children:!t&&k[e||ne.Info]}),jsxRuntime.jsxs(m,{className:"--meta flex cols",children:[jsxRuntime.jsx(O,{className:`--title ${s?"--tm":""}`,children:r||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(O,{className:"--message",h:2,children:s})]})]})});yr.displayName="Zuz.Alert";var za=yr;var br=({ref:o,...n})=>{let{variant:e=K.Small,numeric:t,onConfirm:r,...s}=n,{style:p,className:a,rest:u}=P(s),c=i=>{t&&(i.currentTarget.value=i.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e} flex ${a}`.trim(),style:p,onInput:c,onKeyDown:i=>{i.key=="Enter"&&r?.(i.currentTarget.value);},ref:o,...u})};br.displayName="Zuz.Input";var te=br;var Sr=o=>{let{meta:n}=o,e=hooks.useDelayed(),{label:t,icon:r,...s}=react.isValidElement(n)?{}:n,{className:p,style:a,rest:u}=P({...s,...s.animate?{animate:{...s.animate,when:e}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:a,className:p,children:n}):jsxRuntime.jsx("li",{style:a,className:p,...u,children:typeof n=="string"?n:t})};Sr.displayName="Zuz.ListItem";var Cr=Sr;var Pr=react.forwardRef((o,n)=>{let{items:e,variant:t,direction:r,seperator:s,ol:p,...a}=o,{className:u,style:c,rest:i}=P(a),f=p==true?"ol":"ul";return react.createElement(f,{className:`--list --${t||K.Small} flex ${r??"cols"} ${u}`.trim(),style:c,ref:n,...i,children:e.map((l,d,x)=>{let b=`${typeof l=="string"?`li-${String(l)}`:react.isValidElement(l)?`li-${l.key}`||`${d}-${core.MD5(l.toString())}`:l.label}-${d}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(Cr,{meta:l}),s&&x[d+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${b}`):null]},b)})})});Pr.displayName="Zuz.List";var Ke=Pr;var Rr=react.forwardRef((o,n)=>{let{fx:e,action:t,data:r,withStyle:s,onChange:p,...a}=o,{className:u}=P({as:s||""}),{style:c}=P(a),[i,f]=react.useState(false),[l,d]=react.useState(r||[]),x=react.useRef(null),b=react.useRef(null),y=react.useRef(null),C=react.useMemo(()=>a.name||core.uuid(12),[]),[v,g]=react.useState(null),[T,R]=react.useState(null),[N,S]=react.useState([]),$=hooks.useDebounce(w=>{w.target.value==""?(f(false),d([])):t&&w.target.value.trim()!=""&&core.withPost(t,{query:w.target.value}).then(H=>{"items"in H&&core._(H.items).isArray()?(d(H.items),R(w.target.value),S(H.items)):console.error("Action Response should contain items array"),g(null);}).catch(H=>{g(null),d([]);});},250),B=()=>{if(b.current){let w=b.current.getBoundingClientRect(),H=window.innerHeight-w.bottom,A=w.top;if(y.current){let Z=y.current;H<Z.offsetHeight&&A>H?(Z.style.top="auto",Z.style.bottom=`${w.height}px`,Z.style.maxHeight=`${A-150}px`):(Z.style.top=`${w.height+5}px`,Z.style.bottom="auto",Z.style.maxHeight=`${H-150}px`);}}},F=w=>{if(l.length>0){if((w.key==="ArrowDown"||w.key==="ArrowUp")&&(w.preventDefault(),w.stopPropagation()),w.key==="Escape")g(null),f(false),d([]);else if(w.key==="ArrowDown")g(H=>{let A=H===null||H===l.length-1?0:H+1;return U(A),A});else if(w.key==="ArrowUp")g(H=>{let A=H===null||H===0?l.length-1:H-1;return U(A),A});else if(w.key==="Enter"&&v!==null){let H=l[v];x.current&&(x.current.value=H,f(false),d([]));}}},L=w=>{x.current&&(x.current.value=w,f(false),d([]));},U=w=>{let H=l[w];if(H&&x.current&&(x.current.value=H,x.current.setSelectionRange(H.length,H.length)),y.current){let Z=y.current.children[w];Z&&Z.scrollIntoView({block:"nearest"});}},M=w=>{b.current&&!b.current.contains(w.target)&&(f(false),d([]));},G=()=>{x.current&&x.current.value===T&&(d(N),g(null),B());};return react.useEffect(()=>(window.addEventListener("resize",B),window.addEventListener("scroll",B,true),document.addEventListener("mousedown",M),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",B,true),document.removeEventListener("mousedown",M);}),[]),react.useEffect(()=>{B();},[l]),jsxRuntime.jsxs(m,{style:c,ref:b,className:`--autocomplete --${o.size||K.Small} flex aic rel ${u}`.trim(),children:[jsxRuntime.jsx(te,{ref:x,autoComplete:"off",onChange:$,onKeyDown:F,onFocus:G,...a}),jsxRuntime.jsx(m,{className:"--arrow rel flex aic jcc",children:l.length>0?k.arrowUp:k.arrowDown}),l.length>0&&jsxRuntime.jsx(Ke,{id:C,ref:y,className:"--suggestion-list flex cols abs",items:l.map((w,H)=>({label:w,onClick:A=>{A.preventDefault(),A.stopPropagation(),L(w);},className:v===H?"--current":"",animate:{transition:W.SlideInBottom,curve:_.EaseInOut,delay:core.clamp(.02*H,.02,.5)}}))})]})});Rr.displayName="Zuz.AutoComplete";var oi=Rr;var Ir=react.forwardRef((o,n)=>{let e=react.useRef(null),t=react.useMemo(()=>n&&typeof n!="function"&&n.current?n:e,[n]),{style:r,className:s,rest:p}=P(o,t);return !p.src||p.src==""?null:jsxRuntime.jsx("img",{ref:t,style:r,className:`${s} flex`,...p})});Ir.displayName="Zuz.Image";var We=Ir;var Er=react.forwardRef((o,n)=>{let{src:e,variant:t,type:r,crossOrigin:s,referrerPolicy:p,fx:a,as:u,alt:c,color:i,style:f,...l}=o,[d,x,b]=hooks.useImage(e??"",s,p),{className:y,style:C,rest:v}=P({fx:a,as:u});return react.useEffect(()=>{if(r==Pt.Square&&!document.getElementById("squareRadiusClipPath")){let g="http://www.w3.org/2000/svg",T=document.createElementNS(g,"svg");T.setAttribute("width","0"),T.setAttribute("height","0");let R=document.createElementNS(g,"defs"),N=document.createElementNS(g,"clipPath");N.setAttribute("id","squareRadiusClipPath"),N.setAttribute("clipPathUnits","objectBoundingBox");let S=document.createElementNS(g,"path");S.setAttribute("d","M0.986 0.347C0.951 0.11 0.777 -0.002 0.5 0C0.223 -0.002 0.049 0.11 0.014 0.347C0.005 0.404 0 0.452 0 0.5C0 0.548 0.005 0.596 0.014 0.653C0.049 0.89 0.223 1.002 0.5 1C0.777 1.002 0.951 0.89 0.986 0.653C0.995 0.596 1 0.548 1 0.5C1 0.452 0.995 0.404 0.986 0.347Z"),N.appendChild(S),R.appendChild(N),T.appendChild(R),document.body.appendChild(T);}},[e]),jsxRuntime.jsx(m,{className:`--avatar --${t||K.Small} --${(r||Pt.Circle).toLowerCase()} rel flex aic jcc ${y}`.trim(),style:{background:i||"var(--primary)",...f,...C},...v,children:e?jsxRuntime.jsx(We,{src:d,crossOrigin:s,referrerPolicy:p,...l}):jsxRuntime.jsx(O,{className:"--avatar-label",children:(c?c.charAt(0):"A").toUpperCase()})})});Er.displayName="Zuz.Avatar";var pi=Er;var ui=({size:o=6,type:n="idle",label:e="",loading:t=false,...r})=>{let{style:s,className:p,rest:a}=P(r);return jsxRuntime.jsxs(m,{style:{width:`${o+4}px`,height:`${o+4}px`,...s},as:`--badge rel flex aic jcc ${p}`.trim(),children:[jsxRuntime.jsx(m,{fx:{transition:W.FadeIn,curve:_.Liquid,duration:.5,when:t},as:"abs abc",children:jsxRuntime.jsx(ce,{})}),jsxRuntime.jsx(m,{style:{width:`${o}px`,height:`${o}px`},as:`--dot --${n}`})]})},fi=ui;var Ri=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>dateFns.format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>dateFns.format(dateFns.addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>dateFns.addDays(new Date,1),getDateFormat:()=>dateFns.format(dateFns.addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let o=new Date,n=o.getDay();return dateFns.addDays(o,(6-n)%7||6)},getDateFormat:()=>{let o=new Date,n=o.getDay();return dateFns.format(dateFns.addDays(o,(6-n)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,2),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,4),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,4)}],Ii=o=>{let n=new Set;return o.filter(e=>{if(e.label=="Later")return true;let t=e.getDate().toISOString().split("T")[0];return n.has(t)?false:(n.add(t),true)})},Br=react.forwardRef((o,n)=>{let{defaultValue:e,variant:t,onChange:r,...s}=o,{style:p,className:a,rest:u}=P(s),[c,i]=react.useState(e||new Date),f=dateFns.startOfMonth(c),l=dateFns.endOfMonth(c),d=dateFns.startOfWeek(f),x=dateFns.endOfWeek(l),b=react.useMemo(()=>dateFns.eachDayOfInterval({start:d,end:x}),[d,x]),y=g=>{r?.(g),i(g);},C=()=>{i(g=>new Date(g.getFullYear(),g.getMonth()-1));},v=()=>{i(g=>new Date(g.getFullYear(),g.getMonth()+1));};return jsxRuntime.jsxs(m,{as:`--calendar flex --${t||"sm"} ${a}`,style:p,children:[jsxRuntime.jsx(m,{as:"--calendar-quick-select flex cols flex:1",children:Ii(Ri).map(g=>{let T=g.getDate();return jsxRuntime.jsxs(V,{onClick:()=>y(T),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(O,{as:"flex:1",children:g.label}),jsxRuntime.jsx(O,{as:"tar",children:g.getDateFormat()})]},`--dtp-option-label-${g.label}`)})}),jsxRuntime.jsxs(m,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(m,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(O,{as:"flex:1 --calendar-cm bold",children:dateFns.format(c,"MMMM yyyy")}),jsxRuntime.jsx(V,{onClick:C,as:"--calendar-chevron",children:k.chevronUpOutline}),jsxRuntime.jsx(V,{onClick:v,as:"--calendar-chevron",children:k.chevronDownOutline})]}),jsxRuntime.jsxs(m,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>jsxRuntime.jsx(O,{as:"--calendar-day",children:g},`--calendar-hd-${g}`)),b.map((g,T)=>{let R=dateFns.isSameMonth(g,c),N=dateFns.isSameDay(g,c),S=dateFns.isToday(g);return jsxRuntime.jsx(V,{disabled:!R,onClick:()=>y(g),as:["--calendar-day --calendar-dd",`${N?"--calendar-dd-selected":""}`,`${S?"--calendar-dd-current":""}`],children:dateFns.format(g,"d")},`--calendar-day-${T}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});Br.displayName="Zuz.Calendar";var Gt=Br;var Lr=(n=>(n.Line="line",n))(Lr||{});var Dr=react.forwardRef((o,n)=>{let{data:e,width:t,height:r,lineColor:s,strokeWidth:p=2,gradientStartColor:a,gradientEndColor:u,animated:c,animDuration:i=2,animDelay:f=0,padding:l=0,type:d,...x}=o,{className:b,style:y,rest:C}=P(x),v=react.useRef(null),g=hooks.useResizeObserver(v.current?.parentElement||v),T=typeof t=="number"?t:g.width,R=typeof r=="number"?r:g.height,N={width:T,height:R},S=react.useId(),{pathD:I,areaPathD:$}=hooks.useLineChart(e,N,l+(p||2)),B=react.useRef(null),F=react.useRef(null),[L,U]=react.useState(0),[M,G]=react.useState(0);return react.useEffect(()=>{c&&(B.current&&U(B.current.getTotalLength()),F.current&&G(F.current.getTotalLength()));},[c,I,$,T,R]),jsxRuntime.jsx(m,{ref:v,as:`--chart --${d||"line"}-chart ${b}`.trim(),style:{...y,width:t,height:r},...C,children:T>0&&R>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${T} ${R}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:S,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:a}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:u})]})}),jsxRuntime.jsx("path",{ref:F,d:$,fill:`url(#${S})`,stroke:"none",style:c?{strokeDasharray:M,strokeDashoffset:M}:{},children:c&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:M,to:"0",dur:`${i||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:B,d:I,fill:"none",stroke:s,strokeWidth:p,strokeLinecap:"round",strokeLinejoin:"round",style:c?{strokeDasharray:L,strokeDashoffset:L}:{},children:c&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:L,to:"0",dur:`${i||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});Dr.displayName="Zuz.Chart";var Di=Dr;var Or=(r=>(r[r.Sending=0]="Sending",r[r.Sent=1]="Sent",r[r.Delivered=2]="Delivered",r[r.Read=3]="Read",r))(Or||{}),Hr=(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))(Hr||{});var Vr=react.forwardRef((o,n)=>{let{progress:e,type:t,animated:r,...s}=o,p=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:i=>{p.current.style.width=`${i*100}%`;}}),[]),react.useEffect(()=>{e&&p.current&&(r?setTimeout(()=>p.current.style.width=`${e*100}%`,500):p.current.style.width=`${e*100}%`);},[e,p.current]);let{className:a,style:u,rest:c}=P(s);return jsxRuntime.jsx(m,{className:`--progress ${r?"--animated":""} flex rel ${a}`.trim(),style:u,...c,children:jsxRuntime.jsx(m,{ref:p,className:"--bar rel"})})});Vr.displayName="Zuz.ProgressBar";var Xt=Vr;var $r=react.forwardRef((o,n)=>{let{text:e,media:t,side:r="me",status:s=1,timeStamp:p=Date.now(),arrow:a=true,...u}=o,{className:c,style:i,rest:f}=P(u);return jsxRuntime.jsx(m,{className:`--bubble-wrapper flex --bw-${r}`.trim(),children:jsxRuntime.jsxs(m,{className:`--bubble --bubble-${r} ${t?`--with-media --bma-${t.type}`:""} rel flex cols ${a==true?"--b-arrow":""} ${c}`.trim(),style:{...i},...f,children:[e&&jsxRuntime.jsx(O,{className:"--bubble-text",children:e}),t?t.type=="audio"?jsxRuntime.jsxs(m,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(Q,{className:"--bm-action",children:k.play}),jsxRuntime.jsx(Xt,{progress:.7}),jsxRuntime.jsx(O,{className:"--bm-dur",children:t.duration??"00:13"})]}):t.type=="img"?jsxRuntime.jsx(m,{as:"--bubble-image",children:jsxRuntime.jsx(We,{src:t.source})}):null:null,jsxRuntime.jsxs(m,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(O,{className:"--bubble-stamp tar",children:core.timeSince(p)}),r=="me"&&jsxRuntime.jsx(Q,{className:`--bubble-status --bs-${s}`,children:s==0?k.pending:s==1?k.done:s==2?k.doneAll:k.doneAll})]})]})})});$r.displayName="Zuz.Bubble";var _i=$r;var zr=react.forwardRef((o,n)=>{let{style:e,className:t,rest:r}=P(o);return jsxRuntime.jsx("label",{ref:n,style:e,className:t,...r})});zr.displayName="Zuz.Label";var qe=zr;var _r=react.forwardRef((o,n)=>{let{name:e,required:t,type:r,value:s,size:p,variant:a,checked:u,onSwitch:c,...i}=o,[f,l]=react.useState(u||false),d=react.useRef(null);return react.useImperativeHandle(n,()=>({setChecked(x,b=true){l(x),d.current&&(d.current.checked=x),b&&c&&c(x,s||"cb");},toggle(x=true){d.current&&(d.current.checked=!f),x&&c&&c&&c(!f,s||"cb"),l(!f);}})),jsxRuntime.jsxs(qe,{className:`--${(r||de.Default).toLowerCase()} ${!r||r==de.Default?"--checkbox":"--switch"} --${a||p||K.Default} flex aic jcc ${f?"is-checked":""} rel`.trim(),...i,children:[(!r||r==de.Default)&&k.check,jsxRuntime.jsx(te,{ref:d,defaultChecked:f,value:s||"cb",type:"checkbox",className:"abs",name:e,required:t||false,onChange:x=>{c&&c(x.target.checked,s||"cb"),l(x.target.checked);}})]})});_r.displayName="Zuz.CheckBox";var Xe=_r;var ji=({ref:o,...n})=>{let{code:e,lang:t="tsx",showLines:r=false,highlight:s="",as:p,fx:a,...u}=n,c=react.useRef(null),{className:i,style:f,rest:l}=P({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${p}`,fx:a},c),d=react.useMemo(()=>{let b=new Set;return s.split(",").forEach(y=>{if(y.includes("-")){let[C,v]=y.split("-").map(Number);for(let g=C;g<=v;g++)b.add(g);}else y&&b.add(Number(y));}),b},[s]),x=react.useMemo(()=>{let b=e.split(`
|
|
9
|
+
document.documentElement.style.colorScheme = theme;`}}),o]})},jo=(o,n)=>{if(Xs)return;let e;try{e=localStorage.getItem(o)||void 0;}catch{}return e||n};var or=({ref:o,...n})=>{let{index:e,id:t,title:r,message:s,transition:p,curve:a,speed:u,type:c,action:i,actionPosition:f,spinner:l,loadingMessage:d,variant:x,onClose:b,onShow:y,onHide:C,...v}=n,g=react.useMemo(()=>core.uuid(12),[]),[T,R]=react.useState(r||""),[N,S]=react.useState(s||""),[I,$]=react.useState(c||Ee.Dialog),[B,F]=react.useState(false),[L,U]=react.useState(true),[M,G]=react.useState(i||null),[w,H]=react.useState(false),{variant:A}=ct(),Z=x||A||K.Small,{style:D,className:z,rest:X}=P(v),ee=react.useRef(null),j=$e({when:B,duration:u||.3,delay:.1,transition:p||W.SlideInBottom,curve:a||_.EaseInOut});return react.useEffect(()=>{$(Ee.Dialog),S(s),R(T),M&&G(M.reduce((re,ae)=>(re.push({...ae,key:ae.key||core.uuid(12)}),re),[])),F(true),setTimeout(()=>y?y():()=>{},1e3);},[]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Pe,{when:B}),jsxRuntime.jsxs(m,{as:`--dialog --${(c??Ee.Default).toLowerCase()} ${B?"--visible":""} ${z} fixed abc`.trim(),style:j.style,...X,ref:ee,children:[jsxRuntime.jsx(Ne,{when:w,spinner:l,message:d}),jsxRuntime.jsx(_o,{title:T,onClose:()=>{F(false),b(t);}}),jsxRuntime.jsx(Fo,{message:N,render:L,action:M}),M&&jsxRuntime.jsx(Ko,{variant:Z,action:M,dialogID:g,actionPosition:f})]})]})};or.displayName="Zuz.Dialog";var Dt=or;var Ht=react.createContext(null),ia=react.forwardRef((o,n)=>{let[e,t]=react.useState([]),r=react.useRef(0),s=()=>++r.current;react.useImperativeHandle(n,()=>({add(a){let u=s(),c={id:u,...a};return t(i=>[c,...i.slice(0,4)]),u},remove(a){t(u=>u.filter(c=>c.id!==a));},clear(){t([]);}}));let p=a=>{setTimeout(()=>t(u=>u.filter(c=>c.id!==a)),1e3);};return jsxRuntime.jsx(m,{as:"--dialog-wrapper rel",children:e.map((a,u)=>jsxRuntime.jsx(Dt,{onClose:p,index:u,...a},`sheet-${a.id}`))})}),la=react.forwardRef(({children:o,fx:n},e)=>{let t=react.useRef(null),r=react.useMemo(()=>({add:s=>t.current?.add(s),remove:s=>t.current?.remove(s),clear:()=>t.current?.clear(),fx:n||{curve:_.EaseInOut,duration:.4}}),[t.current]);return jsxRuntime.jsxs(Ht.Provider,{value:r,children:[o,jsxRuntime.jsx(ia,{ref:t})]})}),ma=la;var ua=()=>{let o=react.useContext(Ht);if(!o)throw new Error("useDialog must be used inside <DialogProvider>");let n=(s,p)=>o.add({...p,type:s});return {clearAll:()=>o.clear(),show:s=>n(Ee.Dialog,s),hide:s=>o.remove(s)}},fa=ua;var At=(s=>(s.Default="default",s.Success="success",s.Error="error",s.Warn="warn",s.Promise="promise",s))(At||{}),sr={success:"Action Successful",error:"Something Went Wrong",warn:"Heads Up",default:"Notice"};var ga=({index:o,id:n,type:e,icon:t,title:r,message:s,duration:p})=>{let a=hooks.useDelayed(),u=hooks.useDelayed(((p||4)-1)*1e3),c=react.useContext(Ze);return jsxRuntime.jsxs(m,{as:`--snack --${e} --snack-${n} ${o>2?"--snacked":""} flex aic`,fx:{from:{left:"50%",x:"-50%",top:-100,scale:1,opacity:.5},to:{left:"50%",x:"-50%",top:25,scale:1,opacity:1},curve:c?.fx.curve,duration:c?.fx.duration,when:a&&!u},children:[jsxRuntime.jsx(m,{as:"--ico flex aic jcc",fx:{transition:W.ScaleIn,curve:_.Spring,delay:.2,when:a&&!u},children:t?jsxRuntime.jsx(q,{name:t,fx:{transition:W.ScaleIn,curve:_.Spring,delay:.4,duration:.5,when:a&&!u}}):jsxRuntime.jsx(m,{as:"--no-icon",fx:{transition:W.ScaleIn,curve:_.Spring,delay:.4,duration:.5,when:a&&!u}})}),jsxRuntime.jsxs(m,{as:"--meta",children:[jsxRuntime.jsx(O,{as:"--tt",fx:{transition:W.SlideInTop,curve:_.Spring,delay:.3,when:a},children:r||sr[e]}),jsxRuntime.jsx(O,{as:"--tm",fx:{transition:W.SlideInTop,curve:_.Spring,delay:.4,duration:.5,when:a},children:s})]})]})},lr=ga;var Ze=react.createContext(null),va=react.forwardRef((o,n)=>{let[e,t]=react.useState([]),r=react.useRef(0),s=()=>++r.current;return react.useImperativeHandle(n,()=>({add(p){let a=s(),u={id:a,...p};return t(c=>[u,...c.slice(0,4)]),p.duration!==1/0&&p.type!="promise"&&setTimeout(()=>this.remove(a),((p.duration??4)+1)*1e3),a},remove(p){t(a=>a.filter(u=>u.id!==p));},clear(){t([]);}})),jsxRuntime.jsx(m,{as:"--toast-wrapper rel",children:e.map((p,a)=>jsxRuntime.jsx(lr,{index:a,...p},`toast-${p.id}`))})}),wa=react.forwardRef(({children:o,fx:n},e)=>{let t=react.useRef(null),r=react.useMemo(()=>({add:s=>t.current?.add(s),remove:s=>t.current?.remove(s),clear:()=>t.current?.clear(),fx:n||{curve:_.EaseInOut,duration:.4}}),[t.current]);return jsxRuntime.jsxs(Ze.Provider,{value:r,children:[o,jsxRuntime.jsx(va,{ref:t})]})}),Sa=wa;var Pa=()=>{let o=react.useContext(Ze);if(!o)throw new Error("useToast must be used inside <ToastProvider>");let n=(c,i)=>o.add({...i,type:c});return {show:(c,i,f,l)=>n("default",{title:c,message:i,icon:f,duration:l}),hide:c=>o.remove(c),success:(c,i,f,l)=>n("success",{title:c,message:i,icon:f,duration:l}),error:(c,i,f,l)=>n("error",{title:c,message:i,icon:f,duration:l}),warn:(c,i,f,l)=>n("warn",{title:c,message:i,icon:f,duration:l}),promise:(c,i,f,l)=>n("promise",{title:c,message:i,icon:f,duration:l}),clearAll:()=>o.clear()}},$t=Pa;var Ra=o=>{let n=(t,r)=>{t.preventDefault(),t.stopPropagation(),setTimeout(()=>{o.current?.show(t,r);},0);},e=t=>{o.current?.hide(t);};return react.useEffect(()=>(document.addEventListener("click",e),()=>{document.removeEventListener("click",e);}),[o]),{show:n,hide:e}},Ia=Ra;var pr=({ref:o,style:n,...e})=>{let t=react.useRef(null),r=react.useMemo(()=>o&&typeof o!="function"&&o.current?o:t,[o]),{style:s,className:p,rest:a}=P(e,r);return jsxRuntime.jsx("div",{ref:o||t,style:{...s,...n||{}},className:p,...a})};pr.displayName="Zuz.Box";var m=pr;var fr=react.forwardRef((o,n)=>{let{title:e,message:t,...r}=o,[s,p]=react.useState(false);return jsxRuntime.jsxs(m,{className:"--accordion flex cols",...r,children:[jsxRuntime.jsxs(V,{onClick:a=>p(!s),className:`--toggle flex aic ${s?"--open":""}`.trim(),children:[jsxRuntime.jsx(O,{className:"--label flex",children:e}),jsxRuntime.jsx(m,{className:"--arrow flex",children:s?k.arrowUp:k.arrowDown})]}),s&&jsxRuntime.jsx(m,{className:"--detail",children:t})]})});fr.displayName="Zuz.Accordion";var Da=fr;var Oa=({label:o,icon:n,onClick:e,idx:t,selected:r})=>jsxRuntime.jsx(V,{onClick:e,onMouseMove:s=>document.documentElement.style.setProperty("--tip-m",`${t}`),className:`--action ${r?"--selected":""} aic jcc rel`.trim(),children:typeof n=="string"?jsxRuntime.jsx(q,{name:n}):n}),gr=Oa;var hr=react.forwardRef((o,n)=>{let{items:e,name:t,selected:r,position:s,...p}=o,a=react.useRef(null),[u,c]=react.useState(r||e[0].tag||0),i=react.useCallback(({x:y,y:C})=>{if(a.current){let v=a.current.getBoundingClientRect();document.documentElement.style.setProperty("--tip-x",`${y-v.left}`),document.documentElement.style.setProperty("--tip-y",`${C-v.top}`),document.documentElement.style.setProperty("--tip-s","1");}},[]),f=react.useCallback(()=>{a.current&&(a.current.removeEventListener("pointerleave",f),a.current.removeEventListener("pointermove",i),document.documentElement.style.setProperty("--tip-s","0"));},[]),l=react.useCallback(()=>{a.current&&(a.current.addEventListener("pointerleave",f),a.current.addEventListener("pointermove",i));},[]);react.useEffect(()=>{a.current&&(document.documentElement.style.setProperty("--tip-w",e.reduce((y,C)=>C.label.length>y.length?C.label:y,"").length.toString()),document.documentElement.style.setProperty("--tip-s","0"),document.documentElement.style.setProperty("--tip-l",`${e.length}`),a.current?.addEventListener("pointerenter",l));},[]);let{className:d,style:x,rest:b}=P(p);return jsxRuntime.jsxs(m,{ref:a,style:x,className:[`--actionbar flex aic ${d}`,`${!s||s==J.Auto?"rel":`--${s}`}`].join(" ").trim(),...b,children:[e.map((y,C)=>jsxRuntime.jsx(gr,{selected:u===y.tag||r==C,...y,idx:C},`actionbar-action-${y.label.toLowerCase().replace(/\s+/g,"-")}`)),jsxRuntime.jsx(m,{className:"--tip abs",children:jsxRuntime.jsx(m,{className:"--track flex aic",children:e.map(({label:y})=>jsxRuntime.jsx(m,{className:"--lb",children:y},`tool-tip-${y.toLowerCase().replace(/\s+/g,"-")}`))})})]})});hr.displayName="Zuz.ActionBar";var za=hr;var yr=react.forwardRef((o,n)=>{let{type:e,icon:t,title:r,message:s,iconSize:p,...a}=o,{className:u,style:c,rest:i}=P(a);return jsxRuntime.jsxs(m,{className:`--alert --${e||ne.Info} flex aic ${u}`.trim(),style:c,...i,children:[jsxRuntime.jsx(m,{className:`--icon icon-${t||"auto-matic"}`,style:p?{fontSize:p,width:p,height:p}:{},children:!t&&k[e||ne.Info]}),jsxRuntime.jsxs(m,{className:"--meta flex cols",children:[jsxRuntime.jsx(O,{className:`--title ${s?"--tm":""}`,children:r||"Lorem ipsum dolor sit amet, consectetur adipiscing elit."}),s&&jsxRuntime.jsx(O,{className:"--message",h:2,children:s})]})]})});yr.displayName="Zuz.Alert";var Za=yr;var br=({ref:o,...n})=>{let{variant:e=K.Small,numeric:t,onConfirm:r,...s}=n,{style:p,className:a,rest:u}=P(s),c=i=>{t&&(i.currentTarget.value=i.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};return jsxRuntime.jsx("input",{className:`--input --${e} flex ${a}`.trim(),style:p,onInput:c,onKeyDown:i=>{i.key=="Enter"&&r?.(i.currentTarget.value);},ref:o,...u})};br.displayName="Zuz.Input";var te=br;var Sr=o=>{let{meta:n}=o,e=hooks.useDelayed(),{label:t,icon:r,...s}=react.isValidElement(n)?{}:n,{className:p,style:a,rest:u}=P({...s,...s.animate?{animate:{...s.animate,when:e}}:{}});return react.isValidElement(n)?jsxRuntime.jsx("li",{style:a,className:p,children:n}):jsxRuntime.jsx("li",{style:a,className:p,...u,children:typeof n=="string"?n:t})};Sr.displayName="Zuz.ListItem";var Cr=Sr;var Pr=react.forwardRef((o,n)=>{let{items:e,variant:t,direction:r,seperator:s,ol:p,...a}=o,{className:u,style:c,rest:i}=P(a),f=p==true?"ol":"ul";return react.createElement(f,{className:`--list --${t||K.Small} flex ${r??"cols"} ${u}`.trim(),style:c,ref:n,...i,children:e.map((l,d,x)=>{let b=`${typeof l=="string"?`li-${String(l)}`:react.isValidElement(l)?`li-${l.key}`||`${d}-${core.MD5(l.toString())}`:l.label}-${d}`;return jsxRuntime.jsxs(react.Fragment,{children:[jsxRuntime.jsx(Cr,{meta:l}),s&&x[d+1]?jsxRuntime.jsx("li",{className:"--list-seperator",children:s},`spt-${d+1}-${b}`):null]},b)})})});Pr.displayName="Zuz.List";var Ke=Pr;var Rr=react.forwardRef((o,n)=>{let{fx:e,action:t,data:r,withStyle:s,onChange:p,...a}=o,{className:u}=P({as:s||""}),{style:c}=P(a),[i,f]=react.useState(false),[l,d]=react.useState(r||[]),x=react.useRef(null),b=react.useRef(null),y=react.useRef(null),C=react.useMemo(()=>a.name||core.uuid(12),[]),[v,g]=react.useState(null),[T,R]=react.useState(null),[N,S]=react.useState([]),$=hooks.useDebounce(w=>{w.target.value==""?(f(false),d([])):t&&w.target.value.trim()!=""&&core.withPost(t,{query:w.target.value}).then(H=>{"items"in H&&core._(H.items).isArray()?(d(H.items),R(w.target.value),S(H.items)):console.error("Action Response should contain items array"),g(null);}).catch(H=>{g(null),d([]);});},250),B=()=>{if(b.current){let w=b.current.getBoundingClientRect(),H=window.innerHeight-w.bottom,A=w.top;if(y.current){let Z=y.current;H<Z.offsetHeight&&A>H?(Z.style.top="auto",Z.style.bottom=`${w.height}px`,Z.style.maxHeight=`${A-150}px`):(Z.style.top=`${w.height+5}px`,Z.style.bottom="auto",Z.style.maxHeight=`${H-150}px`);}}},F=w=>{if(l.length>0){if((w.key==="ArrowDown"||w.key==="ArrowUp")&&(w.preventDefault(),w.stopPropagation()),w.key==="Escape")g(null),f(false),d([]);else if(w.key==="ArrowDown")g(H=>{let A=H===null||H===l.length-1?0:H+1;return U(A),A});else if(w.key==="ArrowUp")g(H=>{let A=H===null||H===0?l.length-1:H-1;return U(A),A});else if(w.key==="Enter"&&v!==null){let H=l[v];x.current&&(x.current.value=H,f(false),d([]));}}},L=w=>{x.current&&(x.current.value=w,f(false),d([]));},U=w=>{let H=l[w];if(H&&x.current&&(x.current.value=H,x.current.setSelectionRange(H.length,H.length)),y.current){let Z=y.current.children[w];Z&&Z.scrollIntoView({block:"nearest"});}},M=w=>{b.current&&!b.current.contains(w.target)&&(f(false),d([]));},G=()=>{x.current&&x.current.value===T&&(d(N),g(null),B());};return react.useEffect(()=>(window.addEventListener("resize",B),window.addEventListener("scroll",B,true),document.addEventListener("mousedown",M),()=>{window.removeEventListener("resize",B),window.removeEventListener("scroll",B,true),document.removeEventListener("mousedown",M);}),[]),react.useEffect(()=>{B();},[l]),jsxRuntime.jsxs(m,{style:c,ref:b,className:`--autocomplete --${o.size||K.Small} flex aic rel ${u}`.trim(),children:[jsxRuntime.jsx(te,{ref:x,autoComplete:"off",onChange:$,onKeyDown:F,onFocus:G,...a}),jsxRuntime.jsx(m,{className:"--arrow rel flex aic jcc",children:l.length>0?k.arrowUp:k.arrowDown}),l.length>0&&jsxRuntime.jsx(Ke,{id:C,ref:y,className:"--suggestion-list flex cols abs",items:l.map((w,H)=>({label:w,onClick:A=>{A.preventDefault(),A.stopPropagation(),L(w);},className:v===H?"--current":"",animate:{transition:W.SlideInBottom,curve:_.EaseInOut,delay:core.clamp(.02*H,.02,.5)}}))})]})});Rr.displayName="Zuz.AutoComplete";var si=Rr;var Ir=react.forwardRef((o,n)=>{let e=react.useRef(null),t=react.useMemo(()=>n&&typeof n!="function"&&n.current?n:e,[n]),{style:r,className:s,rest:p}=P(o,t);return !p.src||p.src==""?null:jsxRuntime.jsx("img",{ref:t,style:r,className:`${s} flex`,...p})});Ir.displayName="Zuz.Image";var We=Ir;var Er=react.forwardRef((o,n)=>{let{src:e,variant:t,type:r,crossOrigin:s,referrerPolicy:p,fx:a,as:u,alt:c,color:i,style:f,...l}=o,[d,x,b]=hooks.useImage(e??"",s,p),{className:y,style:C,rest:v}=P({fx:a,as:u});return react.useEffect(()=>{if(r==Pt.Square&&!document.getElementById("squareRadiusClipPath")){let g="http://www.w3.org/2000/svg",T=document.createElementNS(g,"svg");T.setAttribute("width","0"),T.setAttribute("height","0");let R=document.createElementNS(g,"defs"),N=document.createElementNS(g,"clipPath");N.setAttribute("id","squareRadiusClipPath"),N.setAttribute("clipPathUnits","objectBoundingBox");let S=document.createElementNS(g,"path");S.setAttribute("d","M0.986 0.347C0.951 0.11 0.777 -0.002 0.5 0C0.223 -0.002 0.049 0.11 0.014 0.347C0.005 0.404 0 0.452 0 0.5C0 0.548 0.005 0.596 0.014 0.653C0.049 0.89 0.223 1.002 0.5 1C0.777 1.002 0.951 0.89 0.986 0.653C0.995 0.596 1 0.548 1 0.5C1 0.452 0.995 0.404 0.986 0.347Z"),N.appendChild(S),R.appendChild(N),T.appendChild(R),document.body.appendChild(T);}},[e]),jsxRuntime.jsx(m,{className:`--avatar --${t||K.Small} --${(r||Pt.Circle).toLowerCase()} rel flex aic jcc ${y}`.trim(),style:{background:i||"var(--primary)",...f,...C},...v,children:e?jsxRuntime.jsx(We,{src:d,crossOrigin:s,referrerPolicy:p,...l}):jsxRuntime.jsx(O,{className:"--avatar-label",children:(c?c.charAt(0):"A").toUpperCase()})})});Er.displayName="Zuz.Avatar";var di=Er;var gi=({size:o=6,type:n="idle",label:e="",loading:t=false,...r})=>{let{style:s,className:p,rest:a}=P(r);return jsxRuntime.jsxs(m,{style:{width:`${o+4}px`,height:`${o+4}px`,...s},as:`--badge rel flex aic jcc ${p}`.trim(),children:[jsxRuntime.jsx(m,{fx:{transition:W.FadeIn,curve:_.Liquid,duration:.5,when:t},as:"abs abc",children:jsxRuntime.jsx(ce,{})}),jsxRuntime.jsx(m,{style:{width:`${o}px`,height:`${o}px`},as:`--dot --${n}`})]})},hi=gi;var Bi=[{label:"Today",getDate:()=>new Date,getDateFormat:()=>dateFns.format(new Date,"EEE")},{label:"Later",getDate:()=>new Date,getDateFormat:()=>dateFns.format(dateFns.addHours(new Date,2),"hh:mm a")},{label:"Tomorrow",getDate:()=>dateFns.addDays(new Date,1),getDateFormat:()=>dateFns.format(dateFns.addDays(new Date,1),"EEE")},{label:"This weekend",getDate:()=>{let o=new Date,n=o.getDay();return dateFns.addDays(o,(6-n)%7||6)},getDateFormat:()=>{let o=new Date,n=o.getDay();return dateFns.format(dateFns.addDays(o,(6-n)%7||6),"EEE, MMM d")}},{label:"Next week",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"EEE, MMM d"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"Next weekend",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,1),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,1)},{label:"2 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,2),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,2)},{label:"4 weeks",getDateFormat:()=>dateFns.format(dateFns.addWeeks(new Date,4),"d MMM"),getDate:()=>dateFns.addWeeks(new Date,4)}],Li=o=>{let n=new Set;return o.filter(e=>{if(e.label=="Later")return true;let t=e.getDate().toISOString().split("T")[0];return n.has(t)?false:(n.add(t),true)})},Br=react.forwardRef((o,n)=>{let{defaultValue:e,variant:t,onChange:r,...s}=o,{style:p,className:a,rest:u}=P(s),[c,i]=react.useState(e||new Date),f=dateFns.startOfMonth(c),l=dateFns.endOfMonth(c),d=dateFns.startOfWeek(f),x=dateFns.endOfWeek(l),b=react.useMemo(()=>dateFns.eachDayOfInterval({start:d,end:x}),[d,x]),y=g=>{r?.(g),i(g);},C=()=>{i(g=>new Date(g.getFullYear(),g.getMonth()-1));},v=()=>{i(g=>new Date(g.getFullYear(),g.getMonth()+1));};return jsxRuntime.jsxs(m,{as:`--calendar flex --${t||"sm"} ${a}`,style:p,children:[jsxRuntime.jsx(m,{as:"--calendar-quick-select flex cols flex:1",children:Li(Bi).map(g=>{let T=g.getDate();return jsxRuntime.jsxs(V,{onClick:()=>y(T),as:["--calendar-quick-option flex aic gap:5"],children:[jsxRuntime.jsx(O,{as:"flex:1",children:g.label}),jsxRuntime.jsx(O,{as:"tar",children:g.getDateFormat()})]},`--dtp-option-label-${g.label}`)})}),jsxRuntime.jsxs(m,{as:"--calendar-selector flex cols flex:1",children:[jsxRuntime.jsxs(m,{as:"--calendar-head flex aic jcc gap:4",children:[jsxRuntime.jsx(O,{as:"flex:1 --calendar-cm bold",children:dateFns.format(c,"MMMM yyyy")}),jsxRuntime.jsx(V,{onClick:C,as:"--calendar-chevron",children:k.chevronUpOutline}),jsxRuntime.jsx(V,{onClick:v,as:"--calendar-chevron",children:k.chevronDownOutline})]}),jsxRuntime.jsxs(m,{as:"--calendar-days gap:4",children:[["Su","Mo","Tu","We","Th","Fr","Sa"].map(g=>jsxRuntime.jsx(O,{as:"--calendar-day",children:g},`--calendar-hd-${g}`)),b.map((g,T)=>{let R=dateFns.isSameMonth(g,c),N=dateFns.isSameDay(g,c),S=dateFns.isToday(g);return jsxRuntime.jsx(V,{disabled:!R,onClick:()=>y(g),as:["--calendar-day --calendar-dd",`${N?"--calendar-dd-selected":""}`,`${S?"--calendar-dd-current":""}`],children:dateFns.format(g,"d")},`--calendar-day-${T}-${g.getFullYear()}-${g.getMonth()}-${g.getDay()}`)})]})]})]})});Br.displayName="Zuz.Calendar";var Gt=Br;var Lr=(n=>(n.Line="line",n))(Lr||{});var Dr=react.forwardRef((o,n)=>{let{data:e,width:t,height:r,lineColor:s,strokeWidth:p=2,gradientStartColor:a,gradientEndColor:u,animated:c,animDuration:i=2,animDelay:f=0,padding:l=0,type:d,...x}=o,{className:b,style:y,rest:C}=P(x),v=react.useRef(null),g=hooks.useResizeObserver(v.current?.parentElement||v),T=typeof t=="number"?t:g.width,R=typeof r=="number"?r:g.height,N={width:T,height:R},S=react.useId(),{pathD:I,areaPathD:$}=hooks.useLineChart(e,N,l+(p||2)),B=react.useRef(null),F=react.useRef(null),[L,U]=react.useState(0),[M,G]=react.useState(0);return react.useEffect(()=>{c&&(B.current&&U(B.current.getTotalLength()),F.current&&G(F.current.getTotalLength()));},[c,I,$,T,R]),jsxRuntime.jsx(m,{ref:v,as:`--chart --${d||"line"}-chart ${b}`.trim(),style:{...y,width:t,height:r},...C,children:T>0&&R>0&&jsxRuntime.jsxs("svg",{viewBox:`0 0 ${T} ${R}`,preserveAspectRatio:"xMidYMid meet",children:[jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:S,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:a}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:u})]})}),jsxRuntime.jsx("path",{ref:F,d:$,fill:`url(#${S})`,stroke:"none",style:c?{strokeDasharray:M,strokeDashoffset:M}:{},children:c&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:M,to:"0",dur:`${i||2}s`,begin:`${f||0}s`,fill:"freeze"})}),jsxRuntime.jsx("path",{ref:B,d:I,fill:"none",stroke:s,strokeWidth:p,strokeLinecap:"round",strokeLinejoin:"round",style:c?{strokeDasharray:L,strokeDashoffset:L}:{},children:c&&jsxRuntime.jsx("animate",{attributeName:"stroke-dashoffset",from:L,to:"0",dur:`${i||2}s`,begin:`${f||0}s`,fill:"freeze"})})]})})});Dr.displayName="Zuz.Chart";var Ai=Dr;var Or=(r=>(r[r.Sending=0]="Sending",r[r.Sent=1]="Sent",r[r.Delivered=2]="Delivered",r[r.Read=3]="Read",r))(Or||{}),Hr=(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))(Hr||{});var Vr=react.forwardRef((o,n)=>{let{progress:e,type:t,animated:r,...s}=o,p=react.useRef(null);react.useImperativeHandle(n,()=>({setProgress:i=>{p.current.style.width=`${i*100}%`;}}),[]),react.useEffect(()=>{e&&p.current&&(r?setTimeout(()=>p.current.style.width=`${e*100}%`,500):p.current.style.width=`${e*100}%`);},[e,p.current]);let{className:a,style:u,rest:c}=P(s);return jsxRuntime.jsx(m,{className:`--progress ${r?"--animated":""} flex rel ${a}`.trim(),style:u,...c,children:jsxRuntime.jsx(m,{ref:p,className:"--bar rel"})})});Vr.displayName="Zuz.ProgressBar";var Xt=Vr;var $r=react.forwardRef((o,n)=>{let{text:e,media:t,side:r="me",status:s=1,timeStamp:p=Date.now(),arrow:a=true,...u}=o,{className:c,style:i,rest:f}=P(u);return jsxRuntime.jsx(m,{className:`--bubble-wrapper flex --bw-${r}`.trim(),children:jsxRuntime.jsxs(m,{className:`--bubble --bubble-${r} ${t?`--with-media --bma-${t.type}`:""} rel flex cols ${a==true?"--b-arrow":""} ${c}`.trim(),style:{...i},...f,children:[e&&jsxRuntime.jsx(O,{className:"--bubble-text",children:e}),t?t.type=="audio"?jsxRuntime.jsxs(m,{as:"flex aic --bubble-audio",children:[jsxRuntime.jsx(Q,{className:"--bm-action",children:k.play}),jsxRuntime.jsx(Xt,{progress:.7}),jsxRuntime.jsx(O,{className:"--bm-dur",children:t.duration??"00:13"})]}):t.type=="img"?jsxRuntime.jsx(m,{as:"--bubble-image",children:jsxRuntime.jsx(We,{src:t.source})}):null:null,jsxRuntime.jsxs(m,{as:"flex aie jce --bubble-stats",children:[jsxRuntime.jsx(O,{className:"--bubble-stamp tar",children:core.timeSince(p)}),r=="me"&&jsxRuntime.jsx(Q,{className:`--bubble-status --bs-${s}`,children:s==0?k.pending:s==1?k.done:s==2?k.doneAll:k.doneAll})]})]})})});$r.displayName="Zuz.Bubble";var Ki=$r;var zr=react.forwardRef((o,n)=>{let{style:e,className:t,rest:r}=P(o);return jsxRuntime.jsx("label",{ref:n,style:e,className:t,...r})});zr.displayName="Zuz.Label";var qe=zr;var _r=react.forwardRef((o,n)=>{let{name:e,required:t,type:r,value:s,size:p,variant:a,checked:u,onSwitch:c,...i}=o,[f,l]=react.useState(u||false),d=react.useRef(null);return react.useImperativeHandle(n,()=>({setChecked(x,b=true){l(x),d.current&&(d.current.checked=x),b&&c&&c(x,s||"cb");},toggle(x=true){d.current&&(d.current.checked=!f),x&&c&&c&&c(!f,s||"cb"),l(!f);}})),jsxRuntime.jsxs(qe,{className:`--${(r||de.Default).toLowerCase()} ${!r||r==de.Default?"--checkbox":"--switch"} --${a||p||K.Default} flex aic jcc ${f?"is-checked":""} rel`.trim(),...i,children:[(!r||r==de.Default)&&k.check,jsxRuntime.jsx(te,{ref:d,defaultChecked:f,value:s||"cb",type:"checkbox",className:"abs",name:e,required:t||false,onChange:x=>{c&&c(x.target.checked,s||"cb"),l(x.target.checked);}})]})});_r.displayName="Zuz.CheckBox";var Xe=_r;var el=({ref:o,...n})=>{let{code:e,lang:t="tsx",showLines:r=false,highlight:s="",as:p,fx:a,...u}=n,c=react.useRef(null),{className:i,style:f,rest:l}=P({as:`rel p:20 br:8 bg:shade-1 overflow:auto font:mono ${p}`,fx:a},c),d=react.useMemo(()=>{let b=new Set;return s.split(",").forEach(y=>{if(y.includes("-")){let[C,v]=y.split("-").map(Number);for(let g=C;g<=v;g++)b.add(g);}else y&&b.add(Number(y));}),b},[s]),x=react.useMemo(()=>{let b=e.split(`
|
|
10
10
|
`);for(;b.length>0&&b[0].trim()==="";)b.shift();for(;b.length>0&&b[b.length-1].trim()==="";)b.pop();let y=b[0]?.match(/^\s*/)?.[0].length||0,C=b.map(g=>{let T=g.match(/^\s*/)?.[0].length||0,R=Math.min(T,y);return g.slice(R)}),v=[{name:"comm",re:/\/\/.*/g},{name:"str",re:/(["'`])(?:(?=(\\?))\2.)*?\1/g},{name:"key",re:/\b(const|let|var|export|default|import|from|return|if|else|switch|case|break|as|type|interface|class|extends|await|async|new|void|typeof)\b/g},{name:"tag",re:/(<\/?[A-Z][\w\.]*|>)/g},{name:"var",re:/(?<!<\/|<)\b[A-Z]\w*\b/g},{name:"fn",re:/\b([a-z_]\w*)(?=\s*\()/gi},{name:"prop",re:/\.([a-z_]\w*)\b/gi},{name:"num",re:/\b\d+\b(?![#|A-Z|a-z|_|ZUZ])/g}];return C.map((g,T)=>{let R=g.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),N=d.has(T+1),S=[];v.forEach(I=>{R=R.replace(I.re,$=>{let B=`ZUZ_ID_${S.length}_ZUZ`;return S.push(`<span class="--token-${I.name}">${$}</span>`),B});});for(let I=S.length-1;I>=0;I--)R=R.replace(`ZUZ_ID_${I}_ZUZ`,S[I]);return `<div class="--code-line ${r==true?"--with-ln":""} ${N?"--is-highlighted":""}">
|
|
11
11
|
${r==true?`<span class="--line-number">${T+1}</span>`:""}
|
|
12
12
|
<span class="--line-content">${R||" "}</span>
|
|
13
|
-
</div>`}).join("")},[e,d]);return jsxRuntime.jsx(m,{as:`--code-block ${i}`,style:f,...u,children:jsxRuntime.jsx("pre",{ref:o,children:jsxRuntime.jsx("code",{className:`--code --lang-${t}`,dangerouslySetInnerHTML:{__html:x}})})})},Qi=ji;var Zr=({onSelect:o,meta:n,selected:e})=>{let t=react.useRef(null),{index:r,icon:s,label:p}=n,[a,u]=react.useState({x:0,width:0}),c=hooks.useDelayed();return react.useLayoutEffect(()=>{if(c&&t.current){let{width:i,x:f}=t.current.getBoundingClientRect();u({x:f,width:i}),e&&o(r,i,f,n,true);}},[c,t.current]),react.useEffect(()=>{e&&o(r,a.width,a.x,n,false);},[e]),jsxRuntime.jsxs(V,{onClick:()=>o(r,a.width,a.x,n,false),ref:t,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[s?typeof s=="string"?jsxRuntime.jsx(q,{name:s,as:"--segment-icon"}):jsxRuntime.jsx(m,{as:"--segment-icon flex aic jcc",children:s}):null,p&&String(p).trim()!=""&&jsxRuntime.jsx(m,{className:"--segment-label",children:p||`Item ${r}`})]})};Zr.displayName="SelectTabItem";var Kr=Zr;var Wr=react.forwardRef((o,n)=>{let{fx:e,items:t,selected:r,variant:s,onSwitch:p,...a}=o,[u,c]=react.useState(r||0),i=react.useRef(false),f=react.useRef(u),{className:l,style:d,rest:x}=P(a),b=react.useRef(null),y=react.useRef(null),C=(v,g,T,R,N)=>{if((N||u!=v&&u!=-2)&&(c(v),f.current=u,i.current&&p?.(R)),b.current){let S=y.current?.getBoundingClientRect();b.current.style.setProperty("--w",`${g}px`),b.current.style.setProperty("--x",`${S?T-S.left:T}px`);}};return react.useImperativeHandle(n,()=>({setSelected:v=>{typeof v=="number"&&v!=u&&c(v);}}),[u]),react.useEffect(()=>{i.current=true;},[]),jsxRuntime.jsxs(m,{ref:y,"data-selected":u,className:`${l} --segmented --${s||K.Small} flex aic rel`,style:d,...x,children:[jsxRuntime.jsx(m,{ref:b,className:"--segment-tab abs"}),t.map((v,g)=>jsxRuntime.jsx(Kr,{onSelect:C,selected:u==g,meta:{...v,index:g}},`segment-${v.label}-${g}`))]})});Wr.displayName="Zuz.SelectTabs";var Ye=Wr;var Xr=react.forwardRef((o,n)=>{let{type:e,...t}=o,r=hooks.useDelayed(),{colorScheme:s,setColorScheme:p}=Mt(),a=react.useCallback(()=>{p(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:u,style:c}=P(t),i=react.useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon:k.colorSchemeLight},{tag:"system",index:1,label:"",icon:k.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:k.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:k.colorSchemeLight},{tag:"dark",index:2,label:"",icon:k.colorSchemeDark}],[]),f=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !r||f==-1?null:e=="system"||e=="switch"?jsxRuntime.jsx(Ye,{className:`--color-scheme --${e}`,onSwitch:({tag:l})=>{p(l);},selected:f,items:i,...t}):jsxRuntime.jsx(V,{onClick:a,style:c,as:`--color-scheme-switch --${t.variant||K.Small} ${u}`.trim(),children:s=="system"?k.colorSchemeSystem:s=="light"?k.colorSchemeLight:k.colorSchemeDark})});Xr.displayName="Zuz.ColorScheme";var fl=Xr;var dl=o=>{let{label:n,labelColor:e,icon:t,iconColor:r,index:s,className:p,onSelect:a}=o;return n=="-"?jsxRuntime.jsx(m,{className:"--line"}):jsxRuntime.jsxs(V,{reset:true,onClick:u=>a(),className:`--item ${p||""}`.trim(),children:[jsxRuntime.jsx(m,{as:"--icon",children:jsxRuntime.jsx(q,{name:t,className:"--ico",style:r?{color:r}:{}})}),jsxRuntime.jsx(O,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},Yr=dl;var Jr=react.forwardRef((o,n)=>{let{as:e,offsetX:t,offsetY:r,parent:s,items:p,header:a,footer:u,...c}=o,{className:i,style:f,rest:l}=P(c),d=react.useRef(void 0),[x,b]=react.useState(false),[y,C]=react.useState(p||[]),{position:v,targetRef:g}=hooks.useAnchorPosition(s,d.current,{offsetX:t,offsetY:r});return react.useImperativeHandle(n,()=>({show:(T,R)=>{s||(d.current=T),R&&C(R),b(true);},hide:T=>b(false)})),jsxRuntime.jsxs(m,{className:`--contextmenu abs flex cols ${i}`.trim(),"aria-hidden":!x,style:{...f,top:v.top,left:v.left},fx:{from:{opacity:0,y:20},to:{opacity:1,y:0},curve:_.EaseInOut,duration:.05,when:x},ref:g,...l,children:[typeof a=="function"?react.createElement(a):a,y.map((T,R)=>jsxRuntime.jsx(Yr,{...T,index:R},`context-${T.label.toLowerCase()}-${R}`)),typeof u=="function"?react.createElement(u):u]})});Jr.displayName="Zuz.ContextMenu";var vl=Jr;var tn=react.forwardRef((o,n)=>{let[e,t]=react.useState("wait"),{title:r,message:s,acceptLabel:p,rejectLabel:a,position:u}=o,c=async i=>{t(i==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(i));};return react.useEffect(()=>{let i=localStorage.getItem("--ccnt");t(i?i=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(m,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:_.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${u||J.Left} flex cols`,children:[jsxRuntime.jsx(O,{as:"--title",children:r||"This site uses cookies"}),jsxRuntime.jsx(O,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(m,{as:"--footer flex aic",children:[jsxRuntime.jsx(V,{onClick:i=>c(1),as:"--accept",children:p||"Accept All"}),jsxRuntime.jsx(V,{onClick:i=>c(0),as:"--reject",children:a||"Cancel"})]})]})});tn.displayName="Zuz.CookiesConsent";var Nl=tn;var nn=react.forwardRef((o,n)=>{let {type:e,value:t,min:r,max:s,step:p,onChange:a,roundValue:u,...c}=o,{className:i,style:f,rest:l}=P(c),d=react.useRef(p||.01).current,x=react.useRef(r||0).current,b=react.useRef(s||1).current,y=react.useRef(t||0).current,C=react.useRef(null),v=react.useRef(null),g=react.useRef(null);react.useRef(null);let R=react.useRef(null),N=react.useRef(null),S=(A,Z,D)=>(A-Z)/(D-Z)*100,I=A=>{if(v.current){let Z=parseFloat(A.currentTarget.value),D=S(Z,parseFloat(A.currentTarget.min),parseFloat(A.currentTarget.max));v.current.style.setProperty("--value",`${D}`),v.current.setAttribute("data-value",`${Z}`),a&&a(u?+Z.toFixed(2):Z);}},[$,B]=react.useState(false),[F,L]=react.useState(0),[U,M]=react.useState(0),G=A=>{B(true),L(A.clientX),M(v.current?parseFloat(v.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},w=A=>{if($){let Z=A.clientX-F,D=Math.max(x,Math.min(U+Z*d,b));v.current&&(v.current.setAttribute("data-value",`${D}`),N.current.textContent=u?D.toFixed(2):D.toString(),a&&a(u?+D.toFixed(2):D));}},H=()=>{B(false),document.body.style.cursor="auto";};return react.useEffect(()=>{v.current&&v.current.style.setProperty("--value",C.current?`${S(parseFloat(C.current.value),parseFloat(C.current.min),parseFloat(C.current.max))}`:y.toString());},[]),react.useEffect(()=>($?(document.addEventListener("mousemove",w),document.addEventListener("mouseup",H)):(document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",H)),()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",H);}),[$]),jsxRuntime.jsx(m,{ref:v,"data-value":y||0,className:`--slider --${e||at.Default} flex rel ${i}`.trim(),style:{...f},children:at.Text===e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(O,{ref:N,onMouseDown:G,className:"--slider-text",children:y||0})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(m,{ref:R,className:"--slider-track abs fill"}),jsxRuntime.jsx(m,{ref:g,className:"--slider-knob abs"}),jsxRuntime.jsx(te,{ref:C,onInput:I,className:"abs fill",tabIndex:0,type:e||at.Default,defaultValue:y||0,step:d,max:b,min:x})]})})});nn.displayName="Zuz.Slider";var eo=nn;var an=react.forwardRef((o,n)=>{let{src:e,shape:t,size:r,...s}=o,{style:p,className:a,rest:u}=P(s),{canvasRef:c,crop:i,setScale:f,handleMouseDown:l,handleMouseUp:d,handleMouseMove:x}=hooks.useImageCropper(e,r||200,t||hooks.CropShape.Circle);return react.useImperativeHandle(n,()=>({getCropped(){return i()},setScale(b){f(b);}})),jsxRuntime.jsxs(m,{as:`--cropper --${t||hooks.CropShape.Circle} ${a}`,style:p,...u,children:[jsxRuntime.jsx("canvas",{ref:c,width:r||200,height:r||200,onMouseDown:l,onMouseUp:d,onMouseLeave:d,onMouseMove:x}),jsxRuntime.jsx(m,{as:"--cropper-slider",children:jsxRuntime.jsx(eo,{onChange:b=>f(b),min:0,max:1,step:.01,value:1})})]})});an.displayName="Zuz.Cropper";var kl=an;var Dl=(e=>(e.Circle="circle",e.Square="square",e))(Dl||{});var mn=react.forwardRef((o,n)=>{let{items:e,maxItems:t}=o,r=react.useMemo(()=>{let a=typeof e=="string",u=a?[]:e;return a&&e.split(",").forEach(c=>{u.push({label:c});}),u},[e]),p=react.useMemo(()=>t&&t>0&&r.length>t-1,[r,t])?[...r.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...r.slice(-t)]:r;return jsxRuntime.jsx(Ke,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(m,{as:"--crumb-chevron",children:k.chevronRightOutline}),items:p.map((a,u,c)=>a.ID=="."?jsxRuntime.jsx(m,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(m,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${u}`))}):jsxRuntime.jsxs(V,{onClick:()=>a.action?.(),className:"--crumb-item",disabled:!c[u+1],children:[a.icon&&jsxRuntime.jsx(q,{as:"--crumb-icon",name:a.icon}),jsxRuntime.jsx(O,{as:"--crumb-label",children:a.label})]},`${a.label.replace(/\s+/g,"-").toLowerCase()}-${u}`))})});mn.displayName="Zuz.Crumb";var Hl=mn;var un=react.forwardRef((o,n)=>{let{icon:e,defaultValue:t,value:r,size:s,variant:p,numeric:a,type:u,onConfirm:c,...i}=o,[f,l]=react.useState(false),[d,x]=react.useState(t||null),{style:b,className:y,rest:C}=P(i),v=react.useRef(null),g=react.useRef(null),{reposition:T}=ze(g,{direction:J.Bottom,offset:2}),R=S=>{a&&(S.currentTarget.value=S.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let S=I=>{let $=I.target,B=v.current?.contains($),F=g.current?.contains($);!B&&!F&&l(false);};return f&&document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S);}},[f]),react.useEffect(()=>{let S=I=>{I.key==="Escape"&&f&&(l(false),v.current?.focus());};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[f]);let N=()=>{l(true);};return react.useEffect(()=>{f&&T();},[f,T]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(m,{as:`--date-picker ${p?`--${p}`:""} rel flex aic ${y}`,"data-value":d?d.toISOString():"",children:[e?typeof e=="string"?jsxRuntime.jsx(q,{as:"mr:10 c:#666",name:e}):e:jsxRuntime.jsx(Q,{as:"--date-picker-icon flex aic jcc",children:k.calendar}),jsxRuntime.jsx("input",{ref:v,value:d?dateFns.format(d,"EEE, MMM d YYY hh:mm a"):r||"",className:`--input ${p?`--${p}`:""} flex`.trim(),style:b,onFocus:N,onInput:R,autoComplete:"new-password",onKeyDown:S=>{S.key=="Enter"&&c?.(S.currentTarget.value);},...C}),jsxRuntime.jsx(m,{"aria-hidden":!f,ref:g,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:f,duration:.05},as:`--date-picker-chooser flex aic ${p?`--${p}`:""}`,children:jsxRuntime.jsx(Gt,{defaultValue:d,onChange:S=>{x(S),l(false);}})})]})})});un.displayName="Zuz.DatePicker";var zl=un;var ro=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(e=>e!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},je=new ro;var xn=react.forwardRef((o,n)=>{let{from:e,speed:t,children:r,margin:s,animation:p,prerender:a,onClose:u,...c}=o,[i,f]=react.useState(a??true),[l,d]=react.useState(false),x=react.useRef(null),[b,y]=react.useState(r),{className:C,style:v,rest:g}=P(c),T=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{je.isTop(R)&&R();}}],[l]);hooks.useShortcuts(T);let R=react.useCallback(()=>{d(false),u?.();},[]);react.useEffect(()=>{y(r);},[r]),react.useEffect(()=>(l?je.push(R):je.pop(R),()=>je.pop(R)),[l]);let N=react.useMemo(()=>{switch(e){case Te.Left:return {from:{x:"-100vh"},to:{x:0}};case Te.Right:return {from:{x:"100vh"},to:{x:0}};case Te.Top:return {from:{y:"-100vh"},to:{y:0}};case Te.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vh"},to:{x:0}}}},[]);return react.useImperativeHandle(n,()=>({open(S){S&&y(S),d(true);},close(){R();}})),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Pe,{onClick:S=>{l&&R();},when:l}),jsxRuntime.jsxs(m,{ref:x,style:{...v,"--m":`${s||0}px`},"aria-hidden":!l,className:`--drawer flex cols ${C} --${e?e.toLowerCase():"left"} fixed`,fx:{from:{...N.from,opacity:0},to:{...N.to,opacity:1},when:l,curve:p||_.EaseInOut,duration:t||.5},...g,children:[e==Te.Top||e==Te.Bottom?jsxRuntime.jsx(m,{className:"--handle"}):null,i||l?b:null]})]})});xn.displayName="Zuz.Drawer";var Xl=xn;var yn=react.forwardRef((o,n)=>{let{icon:e,variant:t,position:r}=o;return jsxRuntime.jsx(V,{className:`--fab fixed --${t||K.Large} --${r||"bottomright"}`,children:e||k.plus})});yn.displayName="Zuz.Fab";var Ql=yn;var bn=o=>{let{names:n,strength:e}=o,t={[it.Gooey]:r=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:r||10,result:"blur"}),jsxRuntime.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsxRuntime.jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${it.Gooey}`)};return react.useEffect(()=>{},[n]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(n||[it.Gooey]).map(r=>t[r](e))})})};bn.displayName="Zuz.Filters";var tm=bn;var we=null,oe=null,wn=react.forwardRef((o,n)=>{let{title:e,message:t,transition:r,curve:s,speed:p,type:a,actionPosition:u,spinner:c,loadingMessage:i,onShow:f,onHide:l,...d}=o,{className:x,style:b,rest:y}=P(d),[C,v]=react.useState(e||""),[g,T]=react.useState(t||""),[R,N]=react.useState(null),[S,I]=react.useState(a||se.Default),$=react.useMemo(()=>core.uuid(12),[]),[B,F]=react.useState(false),L=react.useRef(null),U=react.useRef(null),[M,G]=react.useState(false),[w,H]=react.useState(true),A=react.useRef(null),Z=g;react.useImperativeHandle(n,()=>({setLoading(z){G(z);},showDialog(z,X,ee,j){we&&(clearTimeout(we),oe&&clearTimeout(oe),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),oe=setTimeout(()=>{L.current.classList.remove("--wobble"),oe=null;},500)),I(se.Dialog),X&&T(X),z&&v(z),ee&&N(ee.reduce((re,ae)=>(re.push({...ae,key:ae.key||core.uuid(12)}),re),[])),F(true),setTimeout(()=>j?j():()=>{},1e3);},dialog(z,X,ee,j){we&&(clearTimeout(we),oe&&clearTimeout(oe),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),oe=setTimeout(()=>{L.current.classList.remove("--wobble"),oe=null;},500)),I(se.Dialog),T(X),v(z),ee&&N(ee.reduce((re,ae)=>(re.push({...ae,key:ae.key||core.uuid(12)}),re),[])),F(true),setTimeout(()=>j?j():()=>{},1e3);},error(z,X){this.show(z,X,se.Error);},warn(z,X){this.show(z,X,se.Warn);},success(z,X){this.show(z,X,se.Success);},show(z,X,ee){we&&(clearTimeout(we),oe&&clearTimeout(oe),U.current=L.current.style.transform,L.current.style.transform="",L.current.classList.remove("--wobble"),setTimeout(()=>{L.current.classList.add("--wobble"),L.current.style.transform=`${U.current} scale(.9)`.trim();},50),oe=setTimeout(()=>{L.current.classList.remove("--wobble"),L.current.style.transform=U.current||"",oe=null;},500)),we=setTimeout(()=>{F(false),we=null,oe=null;},(X||4)*1e3),I(ee||se.Default),T(z),F(true),f?.();},hide(){F(false),l?.();}}));let D=react.useMemo(()=>{let z={when:B,duration:p||.3,delay:.1};if(S==se.Dialog){if(r){let{from:X,to:ee}=Ve(r,20);return {from:X,to:ee,curve:s||_.EaseInOut,...z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:_.Spring,...z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:_.Spring,...z}},[B,S]);return react.useEffect(()=>{A.current&&clearTimeout(A.current),B?H(true):A.current=setTimeout(()=>H(false),1e3);},[B]),S==se.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Pe,{when:B}),jsxRuntime.jsxs(m,{className:`--sheet --sheet-${S.toLowerCase()} ${B?"is-visible":""} ${x} fixed`.trim(),style:b,fx:D,...y,ref:L,children:[jsxRuntime.jsx(Ne,{when:M,spinner:c,message:i}),jsxRuntime.jsxs(m,{className:"--head flex aic rel",children:[jsxRuntime.jsx(m,{className:`--${C?"title":"dot"} flex aic rel`,children:C||""}),jsxRuntime.jsx(V,{onClick:z=>F(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(m,{className:`--body flex aic rel ${R?"":"--no-action"}`.trim(),children:w?Z:null}),R&&jsxRuntime.jsx(m,{className:`--footer flex aic rel ${u?u==Rt.Center?"jcc":"":"jce"}`.trim(),children:R.map((z,X)=>jsxRuntime.jsx(V,{onClick:ee=>z.handler?z.handler():z.onClick?z.onClick():console.log("onClick Handler missing"),className:"--action",children:z.label},`sheet-${$}-action-${z.key}`))})]})]}):jsxRuntime.jsx(m,{className:`--sheet --sheet-${S.toLowerCase()} ${x} abs`.trim(),style:b,...y,fx:D,ref:L,children:B?g:null})}),Je=o=>typeof o=="object"&&o!=null&&"setLoading"in o&&"success"in o&&"error"in o;wn.displayName="Zuz.Sheet";var am=wn;var Sn=react.forwardRef((o,n)=>{let{name:e,cover:t,spinner:r,errors:s,action:p,children:a,withData:u,beforeSubmit:c,onSubmit:i,onError:f,onSuccess:l,resetOnSuccess:d,...x}=o,{className:b,style:y,rest:C}=P(x),[v,g]=react.useState(false),T=react.useRef(null),R=react.useRef(null),N=react.useRef(null),S=$t(),I=react.useCallback(w=>T.current?T.current.querySelectorAll(w):[],[T.current]),$=w=>({name:w.name||w.getAttribute("name")||w.getAttribute("data-name"),required:w.required?true:w.getAttribute("data-required")?w.getAttribute("data-required")=="true":false,with:w.with||w.getAttribute("with")}),B=w=>{let H=[];return w.querySelectorAll(".--input").forEach(A=>{H.push(A.value);}),H.join("")},F=react.useCallback(w=>{let{required:A}=$(w);if(A){if(w.type=="checkbox"&&w.checked==false)return false;if(w.classList.contains("--otp")){let D=B(w);if(D==""||D.length<parseInt(w.getAttribute("data-size")))return false}if(w.classList.contains("--select")&&w.querySelector("button.--selected").dataset.value=="-1"||w.value=="")return false}if(w.getAttribute("with")){let D=w.getAttribute("with");switch(D.includes("@")&&(D=D.split("@")[0],D=="match"&&(D=ge.MatchField)),D.toUpperCase()){case ge.IPV4:return core._(w.value).isIPv4();case ge.IPV6:return core._(w.value).isIPv6();case ge.Email:return core._(w.value).isEmail();case ge.Uri:try{return new URL(w.value),!0}catch{return false}case ge.Password:return console.log("Add FORMVALIDATION.Password"),false;case ge.MatchField:let[z,X,ee]=w.getAttribute("with").split("@"),j=document.querySelector(`[name=${X.trim()}]`);if(!j)return false;switch(ee||"direct-match"){case "if-not-empty":if(j&&!core._(j.value).isEmpty()&&j.value!=w.value)return false;break;case "direct-match":if(j&&j.classList.contains("--otp")&&w.classList.contains("--otp")&&B(j)!=B(w))return false;if(j&&j.value!=w.value)return false;break}break;default:return true}}return true},[T.current]),L=react.useCallback(()=>{let w={},H={},A=null,Z=null;if(Array.from(I("[name]")).forEach(D=>{let{name:z,required:X,with:ee}=$(D),j=true;(X||ee)&&(j=F(D)),w[z]={valid:j,value:D.type=="checkbox"?D.checked==true?D.value:false:D.classList.contains("--otp")?B(D):D.classList.contains("--select")?D.querySelector("button.--selected").dataset.value:D.value},H[z]=D.type=="checkbox"?D.checked==true:D.classList.contains("--otp")?B(D):D.classList.contains("--select")?D.querySelector("button.--selected").dataset.value:D.value,j?D.classList.remove("input-with-error"):(A==null&&s&&(A=D,Z=s[z]),D.classList.add("input-with-error"));}),A){let D=A;if(D.classList.contains("--otp"))for(let z of Array.from(D.querySelectorAll(".--input"))){let X=z;if(X.value==""){X.focus();break}}else D.focus();}return {error:A!=null,errorMsg:Z||"Fix errors to continue...",data:w,payload:H}},[T.current]),U=react.useCallback(()=>{let{error:w,errorMsg:H,payload:A}=L();w?S.error(H):p?react.startTransition(async()=>{c&&c(A),Je(t)?t.setLoading(true):g(true),S.clearAll(),core.withPost(p,{...A,...u||{}}).then(Z=>{let D=Z;Je(t)?t.setLoading(false):g(false),d&&Array.from(I("[name]")).forEach(z=>{z instanceof HTMLInputElement&&(z.value="");}),l?l(D):(S.clearAll(),S.success(D.message||"Redirecting..."));}).catch(Z=>{Je(t)?t.setLoading(false):g(false),f?f(Z):S.error(Z.message||"We cannot process your request at this time.");});}):i&&i(A);},[p,R.current,T.current]),M=react.useCallback(()=>{let w=I("[type=submit]");!w||w.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):w.forEach(H=>{H.addEventListener("click",U);});},[T.current]),G=react.useMemo(()=>core.addPropsToChildren(a,w=>w.props.type=="submit",w=>({ref:N})),[a]);return react.useImperativeHandle(n,()=>({setLoading(w){if(w){R.current.hide();try{S.clearAll();}catch{}}g(w);},showError(w){typeof w=="string"?S.error(w):R.current.error(w,4);},hideError(){R.current.hide();try{S.clearAll();}catch{}},init(){M();},submit(){U();}})),react.useEffect(M,[]),jsxRuntime.jsxs(m,{ref:T,style:y,className:`--form flex rel ${b} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!Je(t)&&jsxRuntime.jsx(Ne,{message:t?t.message||void 0:"working",spinner:r,color:t&&"color"in t?t.color:"#ffffff",when:v}),G]})});Sn.displayName="Zuz.Form";var hm=Sn;var Cn=react.forwardRef((o,n)=>{let {children:e,fx:t,fxDelay:r,fxStep:s,classToIgnore:p,...a}=o,u=ct(true),c=hooks.useDelayed(),i=t||u?.group?.fx,f=r||u?.group?.fxDelay,l=s||u?.group?.fxStep;p||u?.group?.classToIgnore;let x=react.useMemo(()=>i?core.addPropsToChildren(e,b=>{if(b.type===react.Fragment)return false;let y=b.props||{},C="fx"in y,v=y.as?Array.isArray(y.as)?y.as.join(" "):y.as:y.className||"",g=typeof v=="string"&&v.includes(p||"--ignore");return !C&&!g},b=>({fx:{...i,delay:(f||0)+b*(l||.1),when:c}})):e,[e,c,i]);return jsxRuntime.jsx(m,{className:"--group",ref:n,...a,children:x})});Cn.displayName="Zuz.Group";var Tm=Cn;var Tn=o=>typeof o=="string"&&o.includes("+"),Pn={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"},Nn={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 In=react.forwardRef(({children:o,keys:n,variant:e},t)=>{let r=react.useMemo(()=>{if(Tn(n)){let s=null;return {keys:String(n).split("+").reduce((a,u,c,i)=>(i[c+1]?a.push(u):s=u.toUpperCase(),a),[]),children:s}}return {keys:n,children:String(o).toUpperCase()}},[n]);return jsxRuntime.jsxs(m,{as:`--keyboard-keys --${e||K.Small} flex aic`,children:[(Array.isArray(r.keys)?r.keys:[r.keys]).map(s=>jsxRuntime.jsx("abbr",{title:Nn[s],children:Pn[s]},s)),jsxRuntime.jsx(Q,{children:r?.children??o})]})});In.displayName="Zuz.KeyboardKeys";var mo=In;var Bn=react.forwardRef((o,n)=>{let e=hooks.useNetworkStatus(),{onlineMessage:t,offlineMessage:r,variant:s}=o;return jsxRuntime.jsxs(m,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:_.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${s||K.Small} fixed flex`,children:[jsxRuntime.jsx(m,{className:"--ico",children:e?k[ne.Success]:k[ne.Error]}),jsxRuntime.jsx(O,{as:"--message",children:e?t||"internet connection restored :)":r||"no internet connection"})]})});Bn.displayName="Zuz.NetWorkManager";var Lm=Bn;var co=(e=>(e.Table="table",e.Gooey="gooey",e))(co||{});var Mn=react.forwardRef((o,n)=>{let{itemCount:e,itemsPerPage:t,startPage:r,pageRange:s,paginationStyle:p,breakLabel:a,prevLabel:u,nextLabel:c,hash:i,loading:f,seperator:l,renderOnZeroPageCount:d,onPageChange:x,...b}=o,y=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),C=react.useCallback(L=>`${core.toHash(L,i||6,y)}${l||""}${y}`,[y]),v=react.useMemo(()=>a||"...",[a]),[g,T]=react.useState({id:i?r?typeof r=="number"?C(r):r:1:r||1,label:r||1}),{style:R,className:N,rest:S}=P(b),I=react.useCallback(L=>typeof L=="number"?L:+L.label,[]);if(!e)throw new Error('"itemCount" prop is required');let $=react.useMemo(()=>Math.ceil(e/t),[e,t]),B=react.useMemo(()=>{let L=[],U=Math.max(I(g)-(s||2),1),M=Math.min(I(g)+(s||2),$);U>1&&L.push({id:i?C(1):1,label:1}),U>2&&L.push({id:-1,label:v});for(let G=U;G<=M;G++)L.push({id:i?C(G):G,label:G});return M<$-1&&L.push({id:-1,label:v}),M<$&&L.push({id:i?C($):$,label:$}),L},[g]),F=react.useCallback(L=>{let U=L;+U.label<1||+U.label>$||(T(U),x?.(U));},[e,t,g]);return B.length<=1&&(d??false)===false?null:jsxRuntime.jsxs(m,{ref:n,as:`--pagination --pgt-${p||"table"} flex aic w:100% jcc ${N}`,children:[jsxRuntime.jsx(m,{as:"flex flex:1 aic --pgt-btns",children:(B.length>1?B:[{id:1,label:1},{id:-1,label:v}]).map((L,U,M)=>jsxRuntime.jsx(V,{disabled:L.id==-1||I(g)==+L.label,className:(typeof L=="string"?L:L.label)==I(g)?"--current-page":"",onClick:G=>F(L),children:typeof L=="string"?L:L.label},`--pg-${U}-${L.id}`))}),jsxRuntime.jsx(m,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(I(g)-1)*t+1} - `,`${Math.min(I(g)*t,e)} of ${e} items`].join(" ")}),jsxRuntime.jsxs(m,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(V,{disabled:I(g)<=1,onClick:L=>F({id:i?C(I(g)-1):I(g)-1,label:I(g)-1}),children:k.chevronLeftOutline}),jsxRuntime.jsx(V,{disabled:B.length<=1||I(g)==I(B[B.length-1]),onClick:L=>F({id:i?C(I(g)+1):I(g)+1,label:I(g)+1}),children:k.chevronRightOutline})]})]})});Mn.displayName="Zuz.Pagination";var uo=Mn;var On=react.forwardRef((o,n)=>{let{strenthMeter:e,onChange:t,...r}=o;"type"in r&&delete r.type;let{style:s,className:p,rest:a}=P(r),[u,c]=react.useState(false),[i,f]=react.useState(""),l=react.useMemo(()=>core.checkPasswordStrength(i),[i]),d=hooks.useDebounce(x=>{e&&f(x.target.value),t&&t(x);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(m,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(m,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(te,{ref:n,type:u?"text":"password",className:p,onChange:d,...a}),jsxRuntime.jsx(V,{tabIndex:-1,onClick:()=>c(x=>!x),className:"--toggle flex aic jcc abs",children:u?k.eye:k.eyeSlash})]}),e&&jsxRuntime.jsxs(m,{as:`flex aic --password-meter --pb-score-${l.score}`,style:s,children:[jsxRuntime.jsxs(m,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(m,{as:`--pbar ${l.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${l.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${l.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${l.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${l.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(O,{as:"--password-meter-label","aria-hidden":true,children:l.result})]})]})});On.displayName="Zuz.Password";var _m=On;var An=react.forwardRef((o,n)=>{let{size:e,length:t,mask:r,...s}=o,p=react.useRef([]),a="pinput",u=false,c={};"with"in s&&(c={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(a=s.name,delete s.name),"required"in s&&(u=true,delete s.required);let{style:i}=P(s),f=l=>{let d=l.currentTarget,x=p.current[parseInt(d.dataset.index)+1],b=p.current[parseInt(d.dataset.index)-1];d.value.length===1&&x?x.focus():d.value.length===0&&b&&b.focus();};return react.useEffect(()=>{p.current=p.current.slice(0,e||t);},[e||t]),jsxRuntime.jsx(m,{name:a,style:i,className:"--otp flex aic rel","data-required":u,"data-size":e||t||4,...c,children:Array(e||t||4).fill(1).map((l,d)=>jsxRuntime.jsx(te,{autoComplete:"new-password","data-index":d,ref:x=>{p.current[d]=x;},numeric:true,onChange:f,maxLength:1,placeholder:r?"\xB7":"0",type:r?"password":"text",...s},`pin-${d}`))})});An.displayName="Zuz.PinInput";var Um=An;var Vn=react.forwardRef((o,n)=>{let{children:e,className:t,name:r,required:s,type:p,value:a,size:u,checked:c,onSwitch:i,...f}=o,[l,d]=react.useState(c||false),x=react.useRef(null);return jsxRuntime.jsxs(qe,{className:`${t} --${(p||It.Default).toLowerCase()} --radio${!p||p==It.Default?"":"card"} --${u||K.Default} flex aic rel`.trim(),...f,children:[jsxRuntime.jsx(te,{ref:x,defaultChecked:l,value:a||"rd",type:"radio",className:"abs",name:r,required:s||false,onChange:b=>{i&&i(b.target.checked,a||"cb"),d(b.target.checked);}}),jsxRuntime.jsx(m,{className:"--dot rel",children:jsxRuntime.jsx(m,{className:"--rod abs abc"})}),jsxRuntime.jsx(m,{className:"--value",children:e})]})});Vn.displayName="Zuz.Radio";var Xm=Vn;var $n=react.forwardRef((o,n)=>{let{speed:e,style:t,...r}=o,{rootRef:s,containerRef:p,thumbY:a,thumbX:u,onScrollY:c,onScrollX:i}=hooks.useScrollbar(e||1),{style:f,className:l,rest:d}=P(r);return jsxRuntime.jsxs(m,{ref:s,className:l.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(m,{as:`--scroll-content ${l}`.trim(),ref:p,style:t||{},children:d.children}),jsxRuntime.jsx(m,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(m,{as:"--scroll-thumb --abs",ref:a,onMouseDown:c})}),jsxRuntime.jsx(m,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(m,{as:"--scroll-thumb --abs",ref:u,onMouseDown:i})})]})});$n.displayName="Zuz.ScrollView";var Jm=$n;var zn=react.forwardRef((o,n)=>{let{fx:e,withStyle:t,as:r,reverse:s=false,searchIcon:p=k.search,hideSearchIcon:a=false,clearIcon:u=k.close,hideClearIcon:c=false,onChange:i,onClear:f,...l}=o,{style:d,className:x}=P({as:o.as}),[b,y]=react.useState(""),C=react.useRef(null),v=react.useMemo(()=>jsxRuntime.jsx(V,{tabIndex:-1,onClick:R=>T(),className:"--send flex aic jcc",variant:o.variant||K.Small,children:b!==""?!c&&(typeof u=="string"?jsxRuntime.jsx(q,{name:u,as:"--search-action"}):u):!a&&(typeof p=="string"?jsxRuntime.jsx(q,{name:p,as:"--search-action"}):p)}),[s,p,c,u,a]);"type"in o&&delete o.type;let g=R=>{y(R.target.value),i?.(R.target.value);},T=R=>{b.trim()!==""&&(y(""),i?.(""),C.current&&(C.current.value="",o.onConfirm?.("")));};return react.useImperativeHandle(n,()=>({focus:()=>C.current?.focus(),value:()=>C.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(m,{style:d,className:`--search ${s?"--search-rev":""} --${o.variant||K.Small} flex aic ${typeof o.as=="string"&&o.as.includes("abs")?"":"rel"} ${x}`.trim(),children:[s&&v,jsxRuntime.jsx(te,{ref:C,onChange:g,className:`--${o.variant||K.Small}`,...l}),o.shortcut&&jsxRuntime.jsx(mo,{keys:o.shortcut,as:"abs"}),!s&&v]})});zn.displayName="Zuz.Search";var ic=zn;var Fn=({value:o,updateValue:n,o:e})=>jsxRuntime.jsxs(V,{onClick:t=>n(e),as:"--select-option-item",className:o&&(typeof e=="string"?e:e.value)==(typeof o=="string"?o:o.value)?"selected":"",children:[e.icon&&jsxRuntime.jsx(q,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsxRuntime.jsx(O,{children:typeof e=="string"?e:e.label})]});Fn.displayName="Option";var Zn=Fn;var Un=react.forwardRef((o,n)=>{let {selected:e,options:t,label:r,name:s,variant:p,search:a,searchPlaceholder:u,maxHeight:c,arrowDownIcon:i=k.arrowDown,arrowUpIcon:f=k.arrowUp,onChange:l,...d}=o,[x,b]=react.useState(e?typeof e=="string"?t.find(M=>M.value===e):e:t[0]),[y,C]=react.useState(false),[v,g]=react.useState(null);react.useRef(null);let R=react.useRef(null),N=react.useRef(null),S=react.useId(),I=react.useMemo(()=>s||S,[]),{reposition:$}=ze(N,{direction:Nt.Bottom,offset:2}),{className:B,style:F,rest:L}=P(d),U=M=>{b(M),l&&l(M);};return react.useImperativeHandle(n,()=>({setSelected:M=>{if(typeof M=="string"){let G=t.find(w=>w.value===M);G&&b(G);}else b(M);},getValue:()=>x||null})),react.useEffect(()=>{document.body.addEventListener("click",M=>{C(false);}),window.dispatchEvent(new Event("resize"));},[]),react.useEffect(()=>{y?R.current&&R.current.focus():(R.current&&(R.current.value=""),g(null)),$();},[y]),jsxRuntime.jsxs(m,{className:`--select ${p?`--${p}`:""} ${s?`--${s}`:""} rel`.trim(),name:I,children:[jsxRuntime.jsxs(V,{"data-value":x?typeof x=="string"?x:x.value:x||"-1",className:`--selected flex aic rel ${B}`.trim(),withLabel:false,style:F,onClick:M=>C(G=>!G),...L,children:[jsxRuntime.jsx(O,{className:"--label",children:x?typeof x=="string"?x:x.label:r||"Choose"}),jsxRuntime.jsx(m,{className:"--svg-arrow rel flex aic jcc",children:y?typeof f=="string"?jsxRuntime.jsx(q,{name:f,as:"--search-action"}):f:typeof i=="string"?jsxRuntime.jsx(q,{name:i,as:"--search-action"}):i})]}),jsxRuntime.jsxs(m,{id:I,className:"--options-list flex cols abs","aria-hidden":!y,style:{maxHeight:c||"auto"},ref:N,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:y,duration:.05},children:[a&&jsxRuntime.jsx(te,{ref:R,onChange:M=>{g(M.target.value==""?null:M.target.value);},className:"--select-search",placeholder:u||"Search..."}),(v==null?t:t.filter(M=>M.label.toLowerCase().includes(v.toLowerCase())||M.value.toLowerCase().includes(v.toLowerCase()))).map(M=>jsxRuntime.jsx(Zn,{updateValue:U,value:x,o:M},`option-${(typeof M=="string"?M:M.label).replace(/\s+/g,"-")}-${typeof M=="string"?M:M.value}`))]})]})});Un.displayName="Zuz.Select";var dc=Un;var Wn=react.forwardRef((o,n)=>jsxRuntime.jsx(Xe,{type:de.Switch,...o,ref:n}));Wn.displayName="Zuz.Switch";var hc=Wn;var qn=o=>{let{idx:n,id:e,as:t,weight:r,style:s,value:p,render:a,resize:u,sortBy:c,sortable:i,onSort:f}=o,[l,d]=react.useState(0),x=()=>{i&&(f?.(String(e),l==1?-1:1),d(b=>b==1?-1:1));};return jsxRuntime.jsxs(m,{style:{flex:r||1,...s},as:`--col flex aic ${t||""} ${i?"--sortable":""}`,onClick:x,children:[jsxRuntime.jsx(m,{children:p}),n==-1&&i&&c==e&&jsxRuntime.jsx(m,{as:"--arrow flex aib",children:l==1?k.arrowUp:k.arrowDown})]})};qn.displayName="Zuz.Column";var vt=qn;var Yn=o=>{let{index:n,pubsub:e,schema:t,data:r,ids:s,styles:p,animate:a,sortBy:u,selectable:c,tableRef:i,loading:f,rowClassName:l,onSort:d,onRowClick:x,onSelect:b,onContextMenu:y}=o,C=hooks.useDelayed(),v=react.useMemo(()=>({transition:W.SlideInBottom,curve:_.EaseInOut,delay:.02*(n+1)}),[]),g=react.useRef(null),T=(N,S)=>{n==-1?e.emit(`ALL_ROWS_${N?"CHECKED":"UNCHECKED"}`,N):(b&&b(r,N),e.emit(`ROW_${N?"CHECKED":"UNCHECKED"}`,N,S));},R=(N,S,I)=>jsxRuntime.jsx(vt,{idx:N,id:S,as:"--selector",pubsub:e,value:jsxRuntime.jsx(Xe,{value:I,ref:g,onSwitch:T,type:de.Default})});return react.useEffect(()=>{let N=(B,F)=>{g.current?.setChecked(B,false);},S=(B,F)=>{let L=false;i?.current&&i.current.querySelectorAll(".--row").forEach(U=>{let M=U;if(!M.classList.contains("--row-head")){let G=M.querySelector(".--selector input[type=checkbox]");G&&G.checked&&!L&&(L=G.checked);}}),g.current.setChecked(L,false);},I=B=>{g.current?.setChecked(B,false),b&&b(r,B);},$=B=>{g.current?.setChecked(B,false),b&&b(r,B);};return n==-1?(e.on("ROW_CHECKED",N),e.on("ROW_UNCHECKED",S),()=>{e.off("ROW_CHECKED",N),e.off("ROW_UNCHECKED",S);}):(e.on("ALL_ROWS_CHECKED",I),e.on("ALL_ROWS_UNCHECKED",$),()=>{e.off("ALL_ROWS_CHECKED",I),e.off("ALL_ROWS_UNCHECKED",$);})},[]),jsxRuntime.jsxs(m,{onContextMenu:N=>y?y(N,r):null,onClick:N=>x?x(N,o.data):()=>{},...a?{fx:{...v,when:C}}:{},as:`--row flex aic ${x?"--row-clickable":""} ${n==-1?"--row-head":""} ${l||""}`,children:[n==-1&&t.map((N,S)=>{let{renderWhenHeader:I,render:$,value:B,...F}=N;return jsxRuntime.jsxs(react.Fragment,{children:[c&&S==0&&R(-1,`--selector-${N.id}`,"all"),jsxRuntime.jsx(vt,{idx:-1,onSort:d,sortBy:u,value:B,...F,pubsub:e,style:p[N.id]})]},`--col-${N.id}`)}),f&&n>-1&&jsxRuntime.jsx(m,{as:"--col",children:jsxRuntime.jsx(O,{as:"opacity:0",children:"..."})}),!f&&n>-1&&s&&r&&t.map((N,S)=>jsxRuntime.jsxs(react.Fragment,{children:[c&&S==0&&R(S,`--selector-${N.id}`,N.id.toString()),s.includes(String(N.id))?jsxRuntime.jsx(vt,{pubsub:e,idx:S,id:String(N.id),style:p[String(N.id)],value:N.render?N.render(r,n):r[String(N.id).includes(".")?String(N.id).split(".").reverse()[0]:N.id]}):null]},`--${String(N.id)}-val-${S}`))]})};Yn.displayName="Zuz.Row";var wt=Yn;var es=(o,n)=>{let{schema:e,rows:t,rowCount:r,rowsPerPage:s,currentPage:p,pagination:a,paginationHash:u,showPaginationOnZeroPageCount:c,animateRows:i,header:f,rowClassName:l,selectableRows:d,hoverable:x,sortBy:b,loading:y,loadingRowCount:C,loadingMessage:v,spinner:g,emptyMessage:T,onSort:R,onRowClick:N,onRowSelectToggle:S,onPageChange:I,onRowContextMenu:$,...B}=o,F=react.useRef(null),L=react.useMemo(()=>e.reduce((ie,Y)=>(ie[Y.id]={flex:Y.weight||1,...Y.w&&{width:Y.w},...Y.maxW&&{maxWidth:Y.maxW},...Y.minW&&{minWidth:Y.minW},...Y.h&&{height:Y.h},...Y.maxH&&{maxHeight:Y.maxH},...Y.minH&&{minHeight:Y.minH}},ie),{}),[e]),U=react.useMemo(()=>Object.keys(L),[e]),M=react.useMemo(()=>f??true,[f]),{style:G,className:w,rest:H}=P(B),A=react.useRef(null),Z=react.useMemo(()=>new core.PubSub,[]),D=react.useRef(t.map(()=>core.uuid(8))),[z,X]=react.useState(b||null),[ee,j]=react.useState(v||"loading"),re=react.useMemo(()=>!y&&t&&t.length==0,[y,t]),ae=react.useCallback(()=>T?typeof T=="function"?jsxRuntime.jsx(T,{}):T:jsxRuntime.jsx(O,{as:"tac s:18 mt:75",children:"No Record Found"}),[y,t]);react.useEffect(()=>{D.current=t.map(()=>core.uuid(8));},[t]);let vs=(ie,Y)=>{X(ie),R?.(ie,Y);},ws=(r||(t?t.length:0))/(s||10),nt=react.useMemo(()=>c||ws>1?jsxRuntime.jsx(uo,{hash:u,ref:F,renderOnZeroPageCount:c,onPageChange:I,paginationStyle:"table",startPage:p,itemCount:r||(t?t.length:0),itemsPerPage:s||10}):null,[p,r]);return react.useImperativeHandle(n,()=>({setLoading(ie){}})),jsxRuntime.jsxs(m,{as:`--table ${x??true?"--hoverable":""} flex cols rel ${w}`,ref:A,children:[M==true&&jsxRuntime.jsx(wt,{sortBy:z,onSort:vs,tableRef:A,pubsub:Z,selectable:d,index:-1,schema:e,loading:true,styles:L}),y&&jsxRuntime.jsxs(m,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(ce,{type:g||he.Simple}),ee&&jsxRuntime.jsx(O,{as:"--table-loading-message",children:ee})]}),y&&Array(C||5).fill({}).map((ie,Y)=>jsxRuntime.jsx(wt,{tableRef:A,index:Y,pubsub:Z,schema:e,styles:L,loading:true,animate:i,onRowClick:N},`--trow-loading-${Y}-${e[0].id}`)),!y&&t&&t.map((ie,Y)=>jsxRuntime.jsx(wt,{tableRef:A,pubsub:Z,loading:false,index:Y,schema:e,ids:U,styles:L,animate:i,data:ie,onRowClick:N,rowClassName:l,selectable:d,onSelect:S,onContextMenu:$},`--trow-${D.current[Y]||Y}-${e[0].id}`)),re&&ae(),jsxRuntime.jsx(m,{"aria-hidden":!a||!nt,...i?{fx:{transition:W.SlideInBottom,curve:_.EaseInOut,delay:.02*(t.length+1),when:!y&&t&&a&&nt!=null}}:{},as:"--row flex aic --row-footer",children:a&&nt?nt:null})]})};es.displayName="Zuz.Table";var Ec=react.forwardRef(es),Bc=Ec;var ts=({isActive:o,transitionType:n,speed:e,width:t,render:r,content:s,onHeightChange:p})=>{let a=react.useRef(null),u=hooks.useResizeObserver(a);react.useEffect(()=>{o&&u.height>0&&p(u.height);},[o,u.height]);let c=react.useMemo(()=>{let i={flexShrink:0,height:"fit-content"};return n==="fade"?{...i,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,visibility:o?"visible":"hidden",transition:`opacity ${e}s ease-in-out`,zIndex:o?1:0}:n==="scale"?{...i,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,transform:`scale(${o?1:.95})`,transition:`all ${e}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:o?1:0}:i},[o,n,t,e]);return jsxRuntime.jsx(m,{ref:a,style:{...c},className:"--content",children:r||o?s:null})};ts.displayName="Zuz.TabBody";var os=ts;var ss=({ref:o,...n})=>{let{tabs:e,speed:t=.3,prerender:r=true,variant:s,tabStyle:p="fixed",onChange:a,transitionType:u="slide",...c}=n,[i,f]=react.useState(0),l=react.useRef(null),d=hooks.useResizeObserver(l),x=react.useMemo(()=>core.uuid(8),[]),[b,y]=react.useState("auto"),C=react.useMemo(()=>d.width>0,[d.width]);react.useImperativeHandle(o,()=>({setTab:S=>f(S)}));let v=react.useMemo(()=>e.map(S=>({...S,key:S.key||core.uuid(8)})),[e]),{style:g,className:T,rest:R}=P({as:`flex cols w-full no-overflow ${c.as||""}`,...c}),N=()=>{if(!C)return {opacity:0};switch(u){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${i*d.width}px, 0, 0)`,transition:`transform ${t}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(m,{ref:l,style:g,className:`--tabview --${p} flex cols ${T}`,children:[jsxRuntime.jsx(Ye,{as:"--tabview-head",onSwitch:S=>{f(S.index);let I=v.find($=>$.tag==S.tag);I&&I.onSelect&&(I.onSelect(I,S.index),a?.(I,S.index));},selected:i,items:v.reduce((S,I,$)=>(S.push({icon:I.icon,index:$,label:I.label,tag:I.tag}),S),[])}),jsxRuntime.jsx(m,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:b,transition:C?`height ${t}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:C?1:0},children:jsxRuntime.jsx(m,{className:"--track",style:{...N()},children:v.map((S,I)=>jsxRuntime.jsx(os,{isActive:I===i,transitionType:u,speed:t,width:d.width,render:r||I===i,onHeightChange:$=>I===i&&y($),content:S.body},`tab-body-${S.key||I}-${x}`))})})]})};ss.displayName="Zuz.TabView";var $c=ss;var _c=({meta:o})=>jsxRuntime.jsxs(V,{as:"flex aic --command-item",children:[o.icon&&jsxRuntime.jsx(q,{name:o.icon,as:"--command-icon"}),jsxRuntime.jsx(O,{children:o.label})]}),Fc=({position:o,onSelect:n,commands:e,visible:t})=>jsxRuntime.jsx(m,{"aria-hidden":!t,fx:{transition:W.SlideInBottom,duration:.1,when:t},className:"--command-box abs grid",style:{...o},children:e.map(r=>jsxRuntime.jsx(_c,{meta:r},`cmd-${r.label.replace(/\s+/,"-")}`))}),as=Fc;var ms=react.forwardRef((o,n)=>{let{autoResize:e,maxHeight:t,variant:r=K.Small,resize:s="none",command:p,commands:a,onInput:u,cmd:c,renderDropdown:i,value:f,defaultValue:l,...d}=o,x=react.useRef(null),b=react.useRef(null),{style:y,className:C,rest:v}=P(d),{showDropdown:g,dropdownPosition:T,handleKeyDown:R,handleInput:N,handleCommandSelect:S}=hooks.useCommandActions({command:p,commands:a,cmd:c,ref:x}),I=react.useCallback(()=>{let B=x.current;!B||!e||(b.current&&cancelAnimationFrame(b.current),b.current=requestAnimationFrame(()=>{B.style.height="auto";let F=B.scrollHeight;if(t){let L=parseInt(t.toString(),10);isNaN(L)||(F=Math.min(F,L));}B.style.height=`${F}px`,B.style.overflowY=t&&F>=parseInt(t.toString(),10)?"auto":"hidden";}));},[e,t]),$=B=>{u?.(B),N(B),I();};return react.useEffect(()=>{I();},[f,l,I]),react.useEffect(()=>{e&&x.current&&I();},[e,I]),react.useEffect(()=>()=>{b.current&&cancelAnimationFrame(b.current);},[]),jsxRuntime.jsxs(m,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${r} flex ${C}`.trim(),style:{...y,resize:s,height:e?"auto":y?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:R,onInput:$,ref:B=>{typeof n=="function"?n(B):n&&(n.current=B),x.current=B;},value:f,defaultValue:l,...v}),i?i({show:g,position:T,commands:a||[],onSelect:S}):a&&a.length>0&&jsxRuntime.jsx(as,{visible:g,commands:a,onSelect:S,position:T})]})});ms.displayName="Zuz.TextArea";var Gc=ms;var ps=react.forwardRef((o,n)=>{let{as:e,value:t,color:r,direction:s,...p}=o,a=react.useRef(null),[u,c]=react.useState(t||0);return react.useImperativeHandle(n,()=>({updateValue(i){u.toString().length!==i.toString().length&&c(i);},setValue(i){if(this.updateValue(i),a.current){let f=i.toString().split("");a.current.querySelectorAll(".--wheel-char").forEach((l,d)=>{let x=f[d];if(l instanceof HTMLElement){l.setAttribute("data-value",x);let b=l.querySelector(".--wheel-char-track");b instanceof HTMLElement&&(b.style.setProperty("--v",x),b.offsetWidth);}});}}})),react.useEffect(()=>{c(t||0);},[t]),jsxRuntime.jsxs(m,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:a,...p,children:[(u||0).toString().split("").map((i,f)=>isNaN(parseInt(i,10))?jsxRuntime.jsx(Q,{className:"--wheel-char wheel-char-symbol grid",children:i},`wheel-char-symbol-${f}`):jsxRuntime.jsx(Q,{"data-value":i,className:`--wheel-char grid ${f>(u||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(Q,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":i},children:[jsxRuntime.jsx(Q,{children:!s||s==="down"?0:9}),(!s||s==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((l,d)=>jsxRuntime.jsx(Q,{children:l},`${f}--${d}`)),jsxRuntime.jsx(Q,{children:!s||s==="down"?9:0})]})},`wheel-char-${f}`)),r&&jsxRuntime.jsx(m,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${r}, transparent, transparent, transparent, ${r})`}})]})});ps.displayName="Zuz.TextWheel";var ep=ps;var gs=react.forwardRef((o,n)=>{let{title:e,position:t,margin:r,children:s,...p}=o,{style:a,className:u,rest:c}=P(p),[i,f]=react.useState(false),l=react.useMemo(()=>t||J.Top,[]),d=react.useRef(null),x=react.useRef(null),b=g=>{},y=typeof ResizeObserver<"u"?new ResizeObserver(b):{observe:()=>{},unobserve:()=>{}},C=hooks.useDimensions(),v=react.useMemo(()=>{if(!x.current)return {left:0,top:0};let g=x.current.previousElementSibling;if(g){let T=g.getBoundingClientRect();switch(y.observe(g),l){case J.Top:return {left:T.left+T.width/2,top:T.top-(r||25)};case J.Bottom:return {left:T.left+T.width/2,top:T.top+(r||25)};case J.Left:return {left:T.left-T.width/2,top:T.top+T.height/2};case J.Right:return {left:T.right,top:T.top+T.height/2};default:return {left:0,top:0}}}},[x.current,C,y]);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(m,{ref:d,className:"--with-tooltip rel",onMouseEnter:g=>f(true),onMouseLeave:g=>f(false),children:[s,jsxRuntime.jsx(m,{ref:x,style:{left:v?.left+"px",top:v?.top+"px"},className:`--tooltip --${t||J.Top} fixed ${u}`.trim(),fx:{from:l==J.Bottom||l==J.Top?{opacity:0,x:"-50%",y:l==J.Top?-5:5}:{opacity:0,y:"-50%",x:l==J.Right?15:-25},to:l==J.Bottom||l==J.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:l==J.Right?10:-20},curve:_.EaseInOut,when:i},children:jsxRuntime.jsx(O,{className:"--text rel",children:e})})]})});gs.displayName="Zuz.ToolTip";var sp=gs;var So=react.forwardRef((o,n)=>{let{as:e,meta:t,nodes:r,icons:s,onSelect:p,treeTag:a,selected:u,roots:c,expanded:i,...f}=o,{tag:l,label:d,icon:x,under:b,isHead:y}=t,C=react.useMemo(()=>c.includes(l),[c]),[v,g]=react.useState(i),T=()=>{localStorage.setItem(`--tn${a}-${l}`,v?"0":"1"),g(!v);};react.useEffect(()=>{i||C&&!localStorage.getItem(`--tn${a}-${l}`)?(localStorage.setItem(`--tn${a}-${l}`,"1"),g(true)):g(localStorage.getItem(`--tn${a}-${l}`)=="1");},[]);let R=react.useMemo(()=>r.filter(N=>N.under==l),[r,l]);return jsxRuntime.jsxs(m,{className:`--treenode ${C?"--is-root":""} --treenode-${l} flex cols`,children:[jsxRuntime.jsxs(m,{className:`--node --node-${l} flex aic ${u==l?" --selected":""}`,children:[jsxRuntime.jsx(V,{skeleton:f.skeleton,onClick:T,className:"--node-aro-btn",disabled:R.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(q,{skeleton:f.skeleton,className:"--node-aro-icon",name:R.length==0?s?.arrowDisabled||s?.arrowClose:v?s?.arrowOpen:s?.arrowClose}):R.length==0?k.chevronBottom:v?k.chevronBottom:k.chevronRight}),jsxRuntime.jsxs(V,{className:"--node-meta flex aic",onClick:N=>p(l),children:[(s?.nodeOpen&&s?.nodeClose||C&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(q,{skeleton:f.skeleton,className:`--node-icon ${C?"--icon-root":""}`,name:x||(v?C&&s?.rootOpen||s.nodeOpen:C&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(O,{className:`--node-label ${C?"--node-label-root":""}`.trim(),skeleton:f.skeleton,children:d})]})]}),v&&R.length>0&&jsxRuntime.jsx(m,{className:`--sub-node tree-sub-node-${l} flex cols`,children:R.map(N=>jsxRuntime.jsx(So,{treeTag:a,selected:u,onSelect:p,icons:s,roots:c,expanded:N.expanded||false,meta:N,nodes:r},`--node-${N.tag}`))})]})});So.displayName="TreeItem";var xs=So;var bs=react.forwardRef((o,n)=>{let{as:e,nodes:t,onNodeSelect:r,tag:s,icons:p,roots:a,selected:u,...c}=o,[i,f]=react.useState(u);react.useImperativeHandle(n,()=>({getSelected:()=>i}),[r]);let l=d=>{f(d),r&&r(d);};return react.useEffect(()=>{i!=u&&f(u);},[u]),jsxRuntime.jsx(m,{className:"--treeview flex cols",children:t.filter(d=>a.includes(d.tag)).map(d=>jsxRuntime.jsx(xs,{treeTag:s?`-${s}`:"",selected:i,onSelect:x=>l(x),icons:p,meta:d,roots:a,expanded:d.expanded||false,skeleton:c.skeleton,nodes:t},`--node-${d.tag}`))})});bs.displayName="Zuz.TreeView";var dp=bs;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
|
|
14
|
-
exports.ALERT=ne;exports.AVATAR=Pt;exports.Accordion=
|
|
13
|
+
</div>`}).join("")},[e,d]);return jsxRuntime.jsx(m,{as:`--code-block ${i}`,style:f,...u,children:jsxRuntime.jsx("pre",{ref:o,children:jsxRuntime.jsx("code",{className:`--code --lang-${t}`,dangerouslySetInnerHTML:{__html:x}})})})},tl=el;var Zr=({onSelect:o,meta:n,selected:e})=>{let t=react.useRef(null),{index:r,icon:s,label:p}=n,[a,u]=react.useState({x:0,width:0}),c=hooks.useDelayed();return react.useLayoutEffect(()=>{if(c&&t.current){let{width:i,x:f}=t.current.getBoundingClientRect();u({x:f,width:i}),e&&o(r,i,f,n,true);}},[c,t.current]),react.useEffect(()=>{e&&o(r,a.width,a.x,n,false);},[e]),jsxRuntime.jsxs(V,{onClick:()=>o(r,a.width,a.x,n,false),ref:t,className:`--segment-item flex aic rel ${e?"--segment-active":""}`.trim(),children:[s?typeof s=="string"?jsxRuntime.jsx(q,{name:s,as:"--segment-icon"}):jsxRuntime.jsx(m,{as:"--segment-icon flex aic jcc",children:s}):null,p&&String(p).trim()!=""&&jsxRuntime.jsx(m,{className:"--segment-label",children:p||`Item ${r}`})]})};Zr.displayName="SelectTabItem";var Kr=Zr;var Wr=react.forwardRef((o,n)=>{let{fx:e,items:t,selected:r,variant:s,onSwitch:p,...a}=o,[u,c]=react.useState(r||0),i=react.useRef(false),f=react.useRef(u),{className:l,style:d,rest:x}=P(a),b=react.useRef(null),y=react.useRef(null),C=(v,g,T,R,N)=>{if((N||u!=v&&u!=-2)&&(c(v),f.current=u,i.current&&p?.(R)),b.current){let S=y.current?.getBoundingClientRect();b.current.style.setProperty("--w",`${g}px`),b.current.style.setProperty("--x",`${S?T-S.left:T}px`);}};return react.useImperativeHandle(n,()=>({setSelected:v=>{typeof v=="number"&&v!=u&&c(v);}}),[u]),react.useEffect(()=>{i.current=true;},[]),jsxRuntime.jsxs(m,{ref:y,"data-selected":u,className:`${l} --segmented --${s||K.Small} flex aic rel`,style:d,...x,children:[jsxRuntime.jsx(m,{ref:b,className:"--segment-tab abs"}),t.map((v,g)=>jsxRuntime.jsx(Kr,{onSelect:C,selected:u==g,meta:{...v,index:g}},`segment-${v.label}-${g}`))]})});Wr.displayName="Zuz.SelectTabs";var Ye=Wr;var Xr=react.forwardRef((o,n)=>{let{type:e,...t}=o,r=hooks.useDelayed(),{colorScheme:s,setColorScheme:p}=Mt(),a=react.useCallback(()=>{p(s=="dark"?"light":s=="light"?"system":"dark");},[s]),{className:u,style:c}=P(t),i=react.useMemo(()=>e=="system"?[{tag:"light",index:0,label:"",icon:k.colorSchemeLight},{tag:"system",index:1,label:"",icon:k.colorSchemeSystem},{tag:"dark",index:2,label:"",icon:k.colorSchemeDark}]:[{tag:"light",index:0,label:"",icon:k.colorSchemeLight},{tag:"dark",index:2,label:"",icon:k.colorSchemeDark}],[]),f=react.useMemo(()=>["light","system","dark"].indexOf(s),[s]);return !r||f==-1?null:e=="system"||e=="switch"?jsxRuntime.jsx(Ye,{className:`--color-scheme --${e}`,onSwitch:({tag:l})=>{p(l);},selected:f,items:i,...t}):jsxRuntime.jsx(V,{onClick:a,style:c,as:`--color-scheme-switch --${t.variant||K.Small} ${u}`.trim(),children:s=="system"?k.colorSchemeSystem:s=="light"?k.colorSchemeLight:k.colorSchemeDark})});Xr.displayName="Zuz.ColorScheme";var hl=Xr;var xl=o=>{let{label:n,labelColor:e,icon:t,iconColor:r,index:s,className:p,onSelect:a}=o;return n=="-"?jsxRuntime.jsx(m,{className:"--line"}):jsxRuntime.jsxs(V,{reset:true,onClick:u=>a(),className:`--item ${p||""}`.trim(),children:[jsxRuntime.jsx(m,{as:"--icon",children:jsxRuntime.jsx(q,{name:t,className:"--ico",style:r?{color:r}:{}})}),jsxRuntime.jsx(O,{className:"--lbl flex aic",style:e?{color:e}:{},children:n})]})},Yr=xl;var Jr=react.forwardRef((o,n)=>{let{as:e,offsetX:t,offsetY:r,parent:s,items:p,header:a,footer:u,...c}=o,{className:i,style:f,rest:l}=P(c),d=react.useRef(void 0),[x,b]=react.useState(false),[y,C]=react.useState(p||[]),{position:v,targetRef:g}=hooks.useAnchorPosition(s,d.current,{offsetX:t,offsetY:r});return react.useImperativeHandle(n,()=>({show:(T,R)=>{s||(d.current=T),R&&C(R),b(true);},hide:T=>b(false)})),jsxRuntime.jsxs(m,{className:`--contextmenu abs flex cols ${i}`.trim(),"aria-hidden":!x,style:{...f,top:v.top,left:v.left},fx:{from:{opacity:0,y:20},to:{opacity:1,y:0},curve:_.EaseInOut,duration:.05,when:x},ref:g,...l,children:[typeof a=="function"?react.createElement(a):a,y.map((T,R)=>jsxRuntime.jsx(Yr,{...T,index:R},`context-${T.label.toLowerCase()}-${R}`)),typeof u=="function"?react.createElement(u):u]})});Jr.displayName="Zuz.ContextMenu";var Cl=Jr;var tn=react.forwardRef((o,n)=>{let[e,t]=react.useState("wait"),{title:r,message:s,acceptLabel:p,rejectLabel:a,position:u}=o,c=async i=>{t(i==1?"accepted":"rejected"),localStorage.setItem("--ccnt",String(i));};return react.useEffect(()=>{let i=localStorage.getItem("--ccnt");t(i?i=="1"?"accepted":"rejected":"pending");},[]),jsxRuntime.jsxs(m,{fx:{from:{x:-1e3},to:{x:0},when:e=="pending",curve:_.EaseInOut,duration:.5,delay:e=="accepted"?0:3},as:`--cookie-consent --${e} --${u||J.Left} flex cols`,children:[jsxRuntime.jsx(O,{as:"--title",children:r||"This site uses cookies"}),jsxRuntime.jsx(O,{as:"--message",children:s||"We and selected third parties use cookies (or similar technologies) for technical purposes, to enhance and analyze site usage, to support our marketing efforts"}),jsxRuntime.jsxs(m,{as:"--footer flex aic",children:[jsxRuntime.jsx(V,{onClick:i=>c(1),as:"--accept",children:p||"Accept All"}),jsxRuntime.jsx(V,{onClick:i=>c(0),as:"--reject",children:a||"Cancel"})]})]})});tn.displayName="Zuz.CookiesConsent";var El=tn;var nn=react.forwardRef((o,n)=>{let {type:e,value:t,min:r,max:s,step:p,onChange:a,roundValue:u,...c}=o,{className:i,style:f,rest:l}=P(c),d=react.useRef(p||.01).current,x=react.useRef(r||0).current,b=react.useRef(s||1).current,y=react.useRef(t||0).current,C=react.useRef(null),v=react.useRef(null),g=react.useRef(null);react.useRef(null);let R=react.useRef(null),N=react.useRef(null),S=(A,Z,D)=>(A-Z)/(D-Z)*100,I=A=>{if(v.current){let Z=parseFloat(A.currentTarget.value),D=S(Z,parseFloat(A.currentTarget.min),parseFloat(A.currentTarget.max));v.current.style.setProperty("--value",`${D}`),v.current.setAttribute("data-value",`${Z}`),a&&a(u?+Z.toFixed(2):Z);}},[$,B]=react.useState(false),[F,L]=react.useState(0),[U,M]=react.useState(0),G=A=>{B(true),L(A.clientX),M(v.current?parseFloat(v.current.getAttribute("data-value")):0),document.body.style.cursor="ew-resize";},w=A=>{if($){let Z=A.clientX-F,D=Math.max(x,Math.min(U+Z*d,b));v.current&&(v.current.setAttribute("data-value",`${D}`),N.current.textContent=u?D.toFixed(2):D.toString(),a&&a(u?+D.toFixed(2):D));}},H=()=>{B(false),document.body.style.cursor="auto";};return react.useEffect(()=>{v.current&&v.current.style.setProperty("--value",C.current?`${S(parseFloat(C.current.value),parseFloat(C.current.min),parseFloat(C.current.max))}`:y.toString());},[]),react.useEffect(()=>($?(document.addEventListener("mousemove",w),document.addEventListener("mouseup",H)):(document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",H)),()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",H);}),[$]),jsxRuntime.jsx(m,{ref:v,"data-value":y||0,className:`--slider --${e||at.Default} flex rel ${i}`.trim(),style:{...f},children:at.Text===e?jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(O,{ref:N,onMouseDown:G,className:"--slider-text",children:y||0})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(m,{ref:R,className:"--slider-track abs fill"}),jsxRuntime.jsx(m,{ref:g,className:"--slider-knob abs"}),jsxRuntime.jsx(te,{ref:C,onInput:I,className:"abs fill",tabIndex:0,type:e||at.Default,defaultValue:y||0,step:d,max:b,min:x})]})})});nn.displayName="Zuz.Slider";var eo=nn;var an=react.forwardRef((o,n)=>{let{src:e,shape:t,size:r,...s}=o,{style:p,className:a,rest:u}=P(s),{canvasRef:c,crop:i,setScale:f,handleMouseDown:l,handleMouseUp:d,handleMouseMove:x}=hooks.useImageCropper(e,r||200,t||hooks.CropShape.Circle);return react.useImperativeHandle(n,()=>({getCropped(){return i()},setScale(b){f(b);}})),jsxRuntime.jsxs(m,{as:`--cropper --${t||hooks.CropShape.Circle} ${a}`,style:p,...u,children:[jsxRuntime.jsx("canvas",{ref:c,width:r||200,height:r||200,onMouseDown:l,onMouseUp:d,onMouseLeave:d,onMouseMove:x}),jsxRuntime.jsx(m,{as:"--cropper-slider",children:jsxRuntime.jsx(eo,{onChange:b=>f(b),min:0,max:1,step:.01,value:1})})]})});an.displayName="Zuz.Cropper";var Ol=an;var Al=(e=>(e.Circle="circle",e.Square="square",e))(Al||{});var mn=react.forwardRef((o,n)=>{let{items:e,maxItems:t}=o,r=react.useMemo(()=>{let a=typeof e=="string",u=a?[]:e;return a&&e.split(",").forEach(c=>{u.push({label:c});}),u},[e]),p=react.useMemo(()=>t&&t>0&&r.length>t-1,[r,t])?[...r.slice(0,2),{ID:".",label:"...",icon:"ellipsis",action:()=>{}},...r.slice(-t)]:r;return jsxRuntime.jsx(Ke,{ref:n,className:"--crumb flex aic",direction:"rows",seperator:jsxRuntime.jsx(m,{as:"--crumb-chevron",children:k.chevronRightOutline}),items:p.map((a,u,c)=>a.ID=="."?jsxRuntime.jsx(m,{as:"flex aic gap:3",children:Array(3).fill(null).map(()=>jsxRuntime.jsx(m,{as:"w:4 h:4 bg:$text r:10"},`--crumb-placeholder-${u}`))}):jsxRuntime.jsxs(V,{onClick:()=>a.action?.(),className:"--crumb-item",disabled:!c[u+1],children:[a.icon&&jsxRuntime.jsx(q,{as:"--crumb-icon",name:a.icon}),jsxRuntime.jsx(O,{as:"--crumb-label",children:a.label})]},`${a.label.replace(/\s+/g,"-").toLowerCase()}-${u}`))})});mn.displayName="Zuz.Crumb";var $l=mn;var un=react.forwardRef((o,n)=>{let{icon:e,defaultValue:t,value:r,size:s,variant:p,numeric:a,type:u,onConfirm:c,...i}=o,[f,l]=react.useState(false),[d,x]=react.useState(t||null),{style:b,className:y,rest:C}=P(i),v=react.useRef(null),g=react.useRef(null),{reposition:T}=ze(g,{direction:J.Bottom,offset:2}),R=S=>{a&&(S.currentTarget.value=S.currentTarget.value.replace(/[^0-9.]/g,"").replace(/(\..*?)\..*/g,"$1"));};react.useEffect(()=>{let S=I=>{let $=I.target,B=v.current?.contains($),F=g.current?.contains($);!B&&!F&&l(false);};return f&&document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S);}},[f]),react.useEffect(()=>{let S=I=>{I.key==="Escape"&&f&&(l(false),v.current?.focus());};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[f]);let N=()=>{l(true);};return react.useEffect(()=>{f&&T();},[f,T]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs(m,{as:`--date-picker ${p?`--${p}`:""} rel flex aic ${y}`,"data-value":d?d.toISOString():"",children:[e?typeof e=="string"?jsxRuntime.jsx(q,{as:"mr:10 c:#666",name:e}):e:jsxRuntime.jsx(Q,{as:"--date-picker-icon flex aic jcc",children:k.calendar}),jsxRuntime.jsx("input",{ref:v,value:d?dateFns.format(d,"EEE, MMM d YYY hh:mm a"):r||"",className:`--input ${p?`--${p}`:""} flex`.trim(),style:b,onFocus:N,onInput:R,autoComplete:"new-password",onKeyDown:S=>{S.key=="Enter"&&c?.(S.currentTarget.value);},...C}),jsxRuntime.jsx(m,{"aria-hidden":!f,ref:g,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:f,duration:.05},as:`--date-picker-chooser flex aic ${p?`--${p}`:""}`,children:jsxRuntime.jsx(Gt,{defaultValue:d,onChange:S=>{x(S),l(false);}})})]})})});un.displayName="Zuz.DatePicker";var Zl=un;var ro=class{stack=[];SCROLL_CLASS="--no-scroll";updateScrollLock(){typeof window>"u"||(this.stack.length>0?document.body.classList.add(this.SCROLL_CLASS):document.body.classList.remove(this.SCROLL_CLASS));}isTop(n){return this.stack[this.stack.length-1]===n}push(n){this.stack.includes(n)||(this.stack.push(n),this.updateScrollLock());}pop(n){this.stack=this.stack.filter(e=>e!==n),this.updateScrollLock();}handleEscape(){let n=this.stack[this.stack.length-1];return n?(n(),true):false}get count(){return this.stack.length}},je=new ro;var xn=react.forwardRef((o,n)=>{let{from:e,speed:t,children:r,margin:s,animation:p,prerender:a,onClose:u,...c}=o,[i,f]=react.useState(a??true),[l,d]=react.useState(false),x=react.useRef(null),[b,y]=react.useState(r),{className:C,style:v,rest:g}=P(c),T=react.useMemo(()=>[{keys:[hooks.KeyCode.Escape],callback:()=>{je.isTop(R)&&R();}}],[l]);hooks.useShortcuts(T);let R=react.useCallback(()=>{d(false),u?.();},[]);react.useEffect(()=>{y(r);},[r]),react.useEffect(()=>(l?je.push(R):je.pop(R),()=>je.pop(R)),[l]);let N=react.useMemo(()=>{switch(e){case Te.Left:return {from:{x:"-100vh"},to:{x:0}};case Te.Right:return {from:{x:"100vh"},to:{x:0}};case Te.Top:return {from:{y:"-100vh"},to:{y:0}};case Te.Bottom:return {from:{y:"100vh"},to:{y:0}};default:return {from:{x:"-100vh"},to:{x:0}}}},[]);return react.useImperativeHandle(n,()=>({open(S){S&&y(S),d(true);},close(){R();}})),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Pe,{onClick:S=>{l&&R();},when:l}),jsxRuntime.jsxs(m,{ref:x,style:{...v,"--m":`${s||0}px`},"aria-hidden":!l,className:`--drawer flex cols ${C} --${e?e.toLowerCase():"left"} fixed`,fx:{from:{...N.from,opacity:0},to:{...N.to,opacity:1},when:l,curve:p||_.EaseInOut,duration:t||.5},...g,children:[e==Te.Top||e==Te.Bottom?jsxRuntime.jsx(m,{className:"--handle"}):null,i||l?b:null]})]})});xn.displayName="Zuz.Drawer";var Ql=xn;var yn=react.forwardRef((o,n)=>{let{icon:e,variant:t,position:r}=o;return jsxRuntime.jsx(V,{className:`--fab fixed --${t||K.Large} --${r||"bottomright"}`,children:e||k.plus})});yn.displayName="Zuz.Fab";var tm=yn;var bn=o=>{let{names:n,strength:e}=o,t={[it.Gooey]:r=>jsxRuntime.jsxs("filter",{id:"gooey",children:[jsxRuntime.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:r||10,result:"blur"}),jsxRuntime.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7",result:"goo"}),jsxRuntime.jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]},`filter-${it.Gooey}`)};return react.useEffect(()=>{},[n]),jsxRuntime.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",children:jsxRuntime.jsx("defs",{children:(n||[it.Gooey]).map(r=>t[r](e))})})};bn.displayName="Zuz.Filters";var nm=bn;var we=null,oe=null,wn=react.forwardRef((o,n)=>{let{title:e,message:t,transition:r,curve:s,speed:p,type:a,actionPosition:u,spinner:c,loadingMessage:i,onShow:f,onHide:l,...d}=o,{className:x,style:b,rest:y}=P(d),[C,v]=react.useState(e||""),[g,T]=react.useState(t||""),[R,N]=react.useState(null),[S,I]=react.useState(a||se.Default),$=react.useMemo(()=>core.uuid(12),[]),[B,F]=react.useState(false),L=react.useRef(null),U=react.useRef(null),[M,G]=react.useState(false),[w,H]=react.useState(true),A=react.useRef(null),Z=g;react.useImperativeHandle(n,()=>({setLoading(z){G(z);},showDialog(z,X,ee,j){we&&(clearTimeout(we),oe&&clearTimeout(oe),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),oe=setTimeout(()=>{L.current.classList.remove("--wobble"),oe=null;},500)),I(se.Dialog),X&&T(X),z&&v(z),ee&&N(ee.reduce((re,ae)=>(re.push({...ae,key:ae.key||core.uuid(12)}),re),[])),F(true),setTimeout(()=>j?j():()=>{},1e3);},dialog(z,X,ee,j){we&&(clearTimeout(we),oe&&clearTimeout(oe),L.current.classList.remove("--wobble"),setTimeout(()=>L.current.classList.add("--wobble"),50),oe=setTimeout(()=>{L.current.classList.remove("--wobble"),oe=null;},500)),I(se.Dialog),T(X),v(z),ee&&N(ee.reduce((re,ae)=>(re.push({...ae,key:ae.key||core.uuid(12)}),re),[])),F(true),setTimeout(()=>j?j():()=>{},1e3);},error(z,X){this.show(z,X,se.Error);},warn(z,X){this.show(z,X,se.Warn);},success(z,X){this.show(z,X,se.Success);},show(z,X,ee){we&&(clearTimeout(we),oe&&clearTimeout(oe),U.current=L.current.style.transform,L.current.style.transform="",L.current.classList.remove("--wobble"),setTimeout(()=>{L.current.classList.add("--wobble"),L.current.style.transform=`${U.current} scale(.9)`.trim();},50),oe=setTimeout(()=>{L.current.classList.remove("--wobble"),L.current.style.transform=U.current||"",oe=null;},500)),we=setTimeout(()=>{F(false),we=null,oe=null;},(X||4)*1e3),I(ee||se.Default),T(z),F(true),f?.();},hide(){F(false),l?.();}}));let D=react.useMemo(()=>{let z={when:B,duration:p||.3,delay:.1};if(S==se.Dialog){if(r){let{from:X,to:ee}=Ve(r,20);return {from:X,to:ee,curve:s||_.EaseInOut,...z}}return {from:{scale:0,x:"-50%",y:"-50%",opacity:0},to:{scale:1,x:"-50%",y:"-50%",opacity:1},curve:_.Spring,...z}}else return {from:{scale:0,x:"-50%",y:"-10vh",opacity:0},to:{scale:1,x:"-50%",y:0,opacity:1},curve:_.Spring,...z}},[B,S]);return react.useEffect(()=>{A.current&&clearTimeout(A.current),B?H(true):A.current=setTimeout(()=>H(false),1e3);},[B]),S==se.Dialog?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Pe,{when:B}),jsxRuntime.jsxs(m,{className:`--sheet --sheet-${S.toLowerCase()} ${B?"is-visible":""} ${x} fixed`.trim(),style:b,fx:D,...y,ref:L,children:[jsxRuntime.jsx(Ne,{when:M,spinner:c,message:i}),jsxRuntime.jsxs(m,{className:"--head flex aic rel",children:[jsxRuntime.jsx(m,{className:`--${C?"title":"dot"} flex aic rel`,children:C||""}),jsxRuntime.jsx(V,{onClick:z=>F(false),className:"--closer abs",children:"\xD7"})]}),jsxRuntime.jsx(m,{className:`--body flex aic rel ${R?"":"--no-action"}`.trim(),children:w?Z:null}),R&&jsxRuntime.jsx(m,{className:`--footer flex aic rel ${u?u==Rt.Center?"jcc":"":"jce"}`.trim(),children:R.map((z,X)=>jsxRuntime.jsx(V,{onClick:ee=>z.handler?z.handler():z.onClick?z.onClick():console.log("onClick Handler missing"),className:"--action",children:z.label},`sheet-${$}-action-${z.key}`))})]})]}):jsxRuntime.jsx(m,{className:`--sheet --sheet-${S.toLowerCase()} ${x} abs`.trim(),style:b,...y,fx:D,ref:L,children:B?g:null})}),Je=o=>typeof o=="object"&&o!=null&&"setLoading"in o&&"success"in o&&"error"in o;wn.displayName="Zuz.Sheet";var mm=wn;var Sn=react.forwardRef((o,n)=>{let{name:e,cover:t,spinner:r,errors:s,action:p,children:a,withData:u,beforeSubmit:c,onSubmit:i,onError:f,onSuccess:l,resetOnSuccess:d,...x}=o,{className:b,style:y,rest:C}=P(x),[v,g]=react.useState(false),T=react.useRef(null),R=react.useRef(null),N=react.useRef(null),S=$t(),I=react.useCallback(w=>T.current?T.current.querySelectorAll(w):[],[T.current]),$=w=>({name:w.name||w.getAttribute("name")||w.getAttribute("data-name"),required:w.required?true:w.getAttribute("data-required")?w.getAttribute("data-required")=="true":false,with:w.with||w.getAttribute("with")}),B=w=>{let H=[];return w.querySelectorAll(".--input").forEach(A=>{H.push(A.value);}),H.join("")},F=react.useCallback(w=>{let{required:A}=$(w);if(A){if(w.type=="checkbox"&&w.checked==false)return false;if(w.classList.contains("--otp")){let D=B(w);if(D==""||D.length<parseInt(w.getAttribute("data-size")))return false}if(w.classList.contains("--select")&&w.querySelector("button.--selected").dataset.value=="-1"||w.value=="")return false}if(w.getAttribute("with")){let D=w.getAttribute("with");switch(D.includes("@")&&(D=D.split("@")[0],D=="match"&&(D=ge.MatchField)),D.toUpperCase()){case ge.IPV4:return core._(w.value).isIPv4();case ge.IPV6:return core._(w.value).isIPv6();case ge.Email:return core._(w.value).isEmail();case ge.Uri:try{return new URL(w.value),!0}catch{return false}case ge.Password:return console.log("Add FORMVALIDATION.Password"),false;case ge.MatchField:let[z,X,ee]=w.getAttribute("with").split("@"),j=document.querySelector(`[name=${X.trim()}]`);if(!j)return false;switch(ee||"direct-match"){case "if-not-empty":if(j&&!core._(j.value).isEmpty()&&j.value!=w.value)return false;break;case "direct-match":if(j&&j.classList.contains("--otp")&&w.classList.contains("--otp")&&B(j)!=B(w))return false;if(j&&j.value!=w.value)return false;break}break;default:return true}}return true},[T.current]),L=react.useCallback(()=>{let w={},H={},A=null,Z=null;if(Array.from(I("[name]")).forEach(D=>{let{name:z,required:X,with:ee}=$(D),j=true;(X||ee)&&(j=F(D)),w[z]={valid:j,value:D.type=="checkbox"?D.checked==true?D.value:false:D.classList.contains("--otp")?B(D):D.classList.contains("--select")?D.querySelector("button.--selected").dataset.value:D.value},H[z]=D.type=="checkbox"?D.checked==true:D.classList.contains("--otp")?B(D):D.classList.contains("--select")?D.querySelector("button.--selected").dataset.value:D.value,j?D.classList.remove("input-with-error"):(A==null&&s&&(A=D,Z=s[z]),D.classList.add("input-with-error"));}),A){let D=A;if(D.classList.contains("--otp"))for(let z of Array.from(D.querySelectorAll(".--input"))){let X=z;if(X.value==""){X.focus();break}}else D.focus();}return {error:A!=null,errorMsg:Z||"Fix errors to continue...",data:w,payload:H}},[T.current]),U=react.useCallback(()=>{let{error:w,errorMsg:H,payload:A}=L();w?S.error(H):p?react.startTransition(async()=>{c&&c(A),Je(t)?t.setLoading(true):g(true),S.clearAll(),core.withPost(p,{...A,...u||{}}).then(Z=>{let D=Z;Je(t)?t.setLoading(false):g(false),d&&Array.from(I("[name]")).forEach(z=>{z instanceof HTMLInputElement&&(z.value="");}),l?l(D):(S.clearAll(),S.success(D.message||"Redirecting..."));}).catch(Z=>{Je(t)?t.setLoading(false):g(false),f?f(Z):S.error(Z.message||"We cannot process your request at this time.");});}):i&&i(A);},[p,R.current,T.current]),M=react.useCallback(()=>{let w=I("[type=submit]");!w||w.length==0?console.warn("You should add at least 1 button with type=`SUBMIT`"):w.forEach(H=>{H.addEventListener("click",U);});},[T.current]),G=react.useMemo(()=>core.addPropsToChildren(a,w=>w.props.type=="submit",w=>({ref:N})),[a]);return react.useImperativeHandle(n,()=>({setLoading(w){if(w){R.current.hide();try{S.clearAll();}catch{}}g(w);},showError(w){typeof w=="string"?S.error(w):R.current.error(w,4);},hideError(){R.current.hide();try{S.clearAll();}catch{}},init(){M();},submit(){U();}})),react.useEffect(M,[]),jsxRuntime.jsxs(m,{ref:T,style:y,className:`--form flex rel ${b} ${e?`--form-${e.replace(/\s+/g,"-")}`:""}`,propsToRemove:["withData","action","onSubmit","onSuccess","onError"],children:[!Je(t)&&jsxRuntime.jsx(Ne,{message:t?t.message||void 0:"working",spinner:r,color:t&&"color"in t?t.color:"#ffffff",when:v}),G]})});Sn.displayName="Zuz.Form";var bm=Sn;var Cn=react.forwardRef((o,n)=>{let {children:e,fx:t,fxDelay:r,fxStep:s,classToIgnore:p,...a}=o,u=ct(true),c=hooks.useDelayed(),i=t||u?.group?.fx,f=r||u?.group?.fxDelay,l=s||u?.group?.fxStep;p||u?.group?.classToIgnore;let x=react.useMemo(()=>i?core.addPropsToChildren(e,b=>{if(b.type===react.Fragment)return false;let y=b.props||{},C="fx"in y,v=y.as?Array.isArray(y.as)?y.as.join(" "):y.as:y.className||"",g=typeof v=="string"&&v.includes(p||"--ignore");return !C&&!g},b=>({fx:{...i,delay:(f||0)+b*(l||.1),when:c}})):e,[e,c,i]);return jsxRuntime.jsx(m,{className:"--group",ref:n,...a,children:x})});Cn.displayName="Zuz.Group";var Rm=Cn;var Tn=o=>typeof o=="string"&&o.includes("+"),Pn={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"},Nn={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 In=react.forwardRef(({children:o,keys:n,variant:e},t)=>{let r=react.useMemo(()=>{if(Tn(n)){let s=null;return {keys:String(n).split("+").reduce((a,u,c,i)=>(i[c+1]?a.push(u):s=u.toUpperCase(),a),[]),children:s}}return {keys:n,children:String(o).toUpperCase()}},[n]);return jsxRuntime.jsxs(m,{as:`--keyboard-keys --${e||K.Small} flex aic`,children:[(Array.isArray(r.keys)?r.keys:[r.keys]).map(s=>jsxRuntime.jsx("abbr",{title:Nn[s],children:Pn[s]},s)),jsxRuntime.jsx(Q,{children:r?.children??o})]})});In.displayName="Zuz.KeyboardKeys";var mo=In;var Bn=react.forwardRef((o,n)=>{let e=hooks.useNetworkStatus(),{onlineMessage:t,offlineMessage:r,variant:s}=o;return jsxRuntime.jsxs(m,{fx:{from:{x:"-50%",y:200,opacity:0},to:{x:"-50%",y:0,opacity:1},when:e==false,curve:_.Spring,duration:.5,delay:2},className:`--network-manager --${e==true?"online":"offline"} --${s||K.Small} fixed flex`,children:[jsxRuntime.jsx(m,{className:"--ico",children:e?k[ne.Success]:k[ne.Error]}),jsxRuntime.jsx(O,{as:"--message",children:e?t||"internet connection restored :)":r||"no internet connection"})]})});Bn.displayName="Zuz.NetWorkManager";var Dm=Bn;var co=(e=>(e.Table="table",e.Gooey="gooey",e))(co||{});var Mn=react.forwardRef((o,n)=>{let{itemCount:e,itemsPerPage:t,startPage:r,pageRange:s,paginationStyle:p,breakLabel:a,prevLabel:u,nextLabel:c,hash:i,loading:f,seperator:l,renderOnZeroPageCount:d,onPageChange:x,...b}=o,y=react.useMemo(()=>core.toHash(core.numberInRange(4,8)),[]),C=react.useCallback(L=>`${core.toHash(L,i||6,y)}${l||""}${y}`,[y]),v=react.useMemo(()=>a||"...",[a]),[g,T]=react.useState({id:i?r?typeof r=="number"?C(r):r:1:r||1,label:r||1}),{style:R,className:N,rest:S}=P(b),I=react.useCallback(L=>typeof L=="number"?L:+L.label,[]);if(!e)throw new Error('"itemCount" prop is required');let $=react.useMemo(()=>Math.ceil(e/t),[e,t]),B=react.useMemo(()=>{let L=[],U=Math.max(I(g)-(s||2),1),M=Math.min(I(g)+(s||2),$);U>1&&L.push({id:i?C(1):1,label:1}),U>2&&L.push({id:-1,label:v});for(let G=U;G<=M;G++)L.push({id:i?C(G):G,label:G});return M<$-1&&L.push({id:-1,label:v}),M<$&&L.push({id:i?C($):$,label:$}),L},[g]),F=react.useCallback(L=>{let U=L;+U.label<1||+U.label>$||(T(U),x?.(U));},[e,t,g]);return B.length<=1&&(d??false)===false?null:jsxRuntime.jsxs(m,{ref:n,as:`--pagination --pgt-${p||"table"} flex aic w:100% jcc ${N}`,children:[jsxRuntime.jsx(m,{as:"flex flex:1 aic --pgt-btns",children:(B.length>1?B:[{id:1,label:1},{id:-1,label:v}]).map((L,U,M)=>jsxRuntime.jsx(V,{disabled:L.id==-1||I(g)==+L.label,className:(typeof L=="string"?L:L.label)==I(g)?"--current-page":"",onClick:G=>F(L),children:typeof L=="string"?L:L.label},`--pg-${U}-${L.id}`))}),jsxRuntime.jsx(m,{as:"flex aic jcc flex:1 --pagination-label",children:[`Showing ${(I(g)-1)*t+1} - `,`${Math.min(I(g)*t,e)} of ${e} items`].join(" ")}),jsxRuntime.jsxs(m,{as:"flex aic jce flex:1 --pgt-btns --pgt-nav",children:[jsxRuntime.jsx(V,{disabled:I(g)<=1,onClick:L=>F({id:i?C(I(g)-1):I(g)-1,label:I(g)-1}),children:k.chevronLeftOutline}),jsxRuntime.jsx(V,{disabled:B.length<=1||I(g)==I(B[B.length-1]),onClick:L=>F({id:i?C(I(g)+1):I(g)+1,label:I(g)+1}),children:k.chevronRightOutline})]})]})});Mn.displayName="Zuz.Pagination";var uo=Mn;var On=react.forwardRef((o,n)=>{let{strenthMeter:e,onChange:t,...r}=o;"type"in r&&delete r.type;let{style:s,className:p,rest:a}=P(r),[u,c]=react.useState(false),[i,f]=react.useState(""),l=react.useMemo(()=>core.checkPasswordStrength(i),[i]),d=hooks.useDebounce(x=>{e&&f(x.target.value),t&&t(x);},100);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(m,{as:"w:100% flex cols",children:[jsxRuntime.jsxs(m,{style:s,className:"--password flex aic rel",children:[jsxRuntime.jsx(te,{ref:n,type:u?"text":"password",className:p,onChange:d,...a}),jsxRuntime.jsx(V,{tabIndex:-1,onClick:()=>c(x=>!x),className:"--toggle flex aic jcc abs",children:u?k.eye:k.eyeSlash})]}),e&&jsxRuntime.jsxs(m,{as:`flex aic --password-meter --pb-score-${l.score}`,style:s,children:[jsxRuntime.jsxs(m,{as:"--password-bars flex aic",children:[jsxRuntime.jsx(m,{as:`--pbar ${l.score>=1?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${l.score>=2?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${l.score>=3?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${l.score>=4?"--pb-on":""}`.trim()}),jsxRuntime.jsx(m,{as:`--pbar ${l.score>=5?"--pb-on":""}`.trim()})]}),jsxRuntime.jsx(O,{as:"--password-meter-label","aria-hidden":true,children:l.result})]})]})});On.displayName="Zuz.Password";var Km=On;var An=react.forwardRef((o,n)=>{let{size:e,length:t,mask:r,...s}=o,p=react.useRef([]),a="pinput",u=false,c={};"with"in s&&(c={with:s.with},delete s.with),"type"in s&&delete s.type,"name"in s&&(a=s.name,delete s.name),"required"in s&&(u=true,delete s.required);let{style:i}=P(s),f=l=>{let d=l.currentTarget,x=p.current[parseInt(d.dataset.index)+1],b=p.current[parseInt(d.dataset.index)-1];d.value.length===1&&x?x.focus():d.value.length===0&&b&&b.focus();};return react.useEffect(()=>{p.current=p.current.slice(0,e||t);},[e||t]),jsxRuntime.jsx(m,{name:a,style:i,className:"--otp flex aic rel","data-required":u,"data-size":e||t||4,...c,children:Array(e||t||4).fill(1).map((l,d)=>jsxRuntime.jsx(te,{autoComplete:"new-password","data-index":d,ref:x=>{p.current[d]=x;},numeric:true,onChange:f,maxLength:1,placeholder:r?"\xB7":"0",type:r?"password":"text",...s},`pin-${d}`))})});An.displayName="Zuz.PinInput";var qm=An;var Vn=react.forwardRef((o,n)=>{let{children:e,className:t,name:r,required:s,type:p,value:a,size:u,checked:c,onSwitch:i,...f}=o,[l,d]=react.useState(c||false),x=react.useRef(null);return jsxRuntime.jsxs(qe,{className:`${t} --${(p||It.Default).toLowerCase()} --radio${!p||p==It.Default?"":"card"} --${u||K.Default} flex aic rel`.trim(),...f,children:[jsxRuntime.jsx(te,{ref:x,defaultChecked:l,value:a||"rd",type:"radio",className:"abs",name:r,required:s||false,onChange:b=>{i&&i(b.target.checked,a||"cb"),d(b.target.checked);}}),jsxRuntime.jsx(m,{className:"--dot rel",children:jsxRuntime.jsx(m,{className:"--rod abs abc"})}),jsxRuntime.jsx(m,{className:"--value",children:e})]})});Vn.displayName="Zuz.Radio";var Qm=Vn;var $n=react.forwardRef((o,n)=>{let{speed:e,style:t,...r}=o,{rootRef:s,containerRef:p,thumbY:a,thumbX:u,onScrollY:c,onScrollX:i}=hooks.useScrollbar(e||1),{style:f,className:l,rest:d}=P(r);return jsxRuntime.jsxs(m,{ref:s,className:l.trim(),as:"--scrollview rel",children:[jsxRuntime.jsx(m,{as:`--scroll-content ${l}`.trim(),ref:p,style:t||{},children:d.children}),jsxRuntime.jsx(m,{as:"--scroll-track --track-y --abs",children:jsxRuntime.jsx(m,{as:"--scroll-thumb --abs",ref:a,onMouseDown:c})}),jsxRuntime.jsx(m,{as:"--scroll-track --track-x --abs",children:jsxRuntime.jsx(m,{as:"--scroll-thumb --abs",ref:u,onMouseDown:i})})]})});$n.displayName="Zuz.ScrollView";var oc=$n;var zn=react.forwardRef((o,n)=>{let{fx:e,withStyle:t,as:r,reverse:s=false,searchIcon:p=k.search,hideSearchIcon:a=false,clearIcon:u=k.close,hideClearIcon:c=false,onChange:i,onClear:f,...l}=o,{style:d,className:x}=P({as:o.as}),[b,y]=react.useState(""),C=react.useRef(null),v=react.useMemo(()=>jsxRuntime.jsx(V,{tabIndex:-1,onClick:R=>T(),className:"--send flex aic jcc",variant:o.variant||K.Small,children:b!==""?!c&&(typeof u=="string"?jsxRuntime.jsx(q,{name:u,as:"--search-action"}):u):!a&&(typeof p=="string"?jsxRuntime.jsx(q,{name:p,as:"--search-action"}):p)}),[s,p,c,u,a]);"type"in o&&delete o.type;let g=R=>{y(R.target.value),i?.(R.target.value);},T=R=>{b.trim()!==""&&(y(""),i?.(""),C.current&&(C.current.value="",o.onConfirm?.("")));};return react.useImperativeHandle(n,()=>({focus:()=>C.current?.focus(),value:()=>C.current?.value})),react.useEffect(()=>{},[]),jsxRuntime.jsxs(m,{style:d,className:`--search ${s?"--search-rev":""} --${o.variant||K.Small} flex aic ${typeof o.as=="string"&&o.as.includes("abs")?"":"rel"} ${x}`.trim(),children:[s&&v,jsxRuntime.jsx(te,{ref:C,onChange:g,className:`--${o.variant||K.Small}`,...l}),o.shortcut&&jsxRuntime.jsx(mo,{keys:o.shortcut,as:"abs"}),!s&&v]})});zn.displayName="Zuz.Search";var cc=zn;var Fn=({value:o,updateValue:n,o:e})=>jsxRuntime.jsxs(V,{onClick:t=>n(e),as:"--select-option-item",className:o&&(typeof e=="string"?e:e.value)==(typeof o=="string"?o:o.value)?"selected":"",children:[e.icon&&jsxRuntime.jsx(q,{name:e.icon,as:`--select-option-icon --icon-${e.value}`,color:e.iconColor||void 0}),jsxRuntime.jsx(O,{children:typeof e=="string"?e:e.label})]});Fn.displayName="Option";var Zn=Fn;var Un=react.forwardRef((o,n)=>{let {selected:e,options:t,label:r,name:s,variant:p,search:a,searchPlaceholder:u,maxHeight:c,arrowDownIcon:i=k.arrowDown,arrowUpIcon:f=k.arrowUp,onChange:l,...d}=o,[x,b]=react.useState(e?typeof e=="string"?t.find(M=>M.value===e):e:t[0]),[y,C]=react.useState(false),[v,g]=react.useState(null);react.useRef(null);let R=react.useRef(null),N=react.useRef(null),S=react.useId(),I=react.useMemo(()=>s||S,[]),{reposition:$}=ze(N,{direction:Nt.Bottom,offset:2}),{className:B,style:F,rest:L}=P(d),U=M=>{b(M),l&&l(M);};return react.useImperativeHandle(n,()=>({setSelected:M=>{if(typeof M=="string"){let G=t.find(w=>w.value===M);G&&b(G);}else b(M);},getValue:()=>x||null})),react.useEffect(()=>{document.body.addEventListener("click",M=>{C(false);}),window.dispatchEvent(new Event("resize"));},[]),react.useEffect(()=>{y?R.current&&R.current.focus():(R.current&&(R.current.value=""),g(null)),$();},[y]),jsxRuntime.jsxs(m,{className:`--select ${p?`--${p}`:""} ${s?`--${s}`:""} rel`.trim(),name:I,children:[jsxRuntime.jsxs(V,{"data-value":x?typeof x=="string"?x:x.value:x||"-1",className:`--selected flex aic rel ${B}`.trim(),withLabel:false,style:F,onClick:M=>C(G=>!G),...L,children:[jsxRuntime.jsx(O,{className:"--label",children:x?typeof x=="string"?x:x.label:r||"Choose"}),jsxRuntime.jsx(m,{className:"--svg-arrow rel flex aic jcc",children:y?typeof f=="string"?jsxRuntime.jsx(q,{name:f,as:"--search-action"}):f:typeof i=="string"?jsxRuntime.jsx(q,{name:i,as:"--search-action"}):i})]}),jsxRuntime.jsxs(m,{id:I,className:"--options-list flex cols abs","aria-hidden":!y,style:{maxHeight:c||"auto"},ref:N,fx:{from:{y:5,opacity:0},to:{y:0,opacity:1},when:y,duration:.05},children:[a&&jsxRuntime.jsx(te,{ref:R,onChange:M=>{g(M.target.value==""?null:M.target.value);},className:"--select-search",placeholder:u||"Search..."}),(v==null?t:t.filter(M=>M.label.toLowerCase().includes(v.toLowerCase())||M.value.toLowerCase().includes(v.toLowerCase()))).map(M=>jsxRuntime.jsx(Zn,{updateValue:U,value:x,o:M},`option-${(typeof M=="string"?M:M.label).replace(/\s+/g,"-")}-${typeof M=="string"?M:M.value}`))]})]})});Un.displayName="Zuz.Select";var xc=Un;var Wn=react.forwardRef((o,n)=>jsxRuntime.jsx(Xe,{type:de.Switch,...o,ref:n}));Wn.displayName="Zuz.Switch";var bc=Wn;var qn=o=>{let{idx:n,id:e,as:t,weight:r,style:s,value:p,render:a,resize:u,sortBy:c,sortable:i,onSort:f}=o,[l,d]=react.useState(0),x=()=>{i&&(f?.(String(e),l==1?-1:1),d(b=>b==1?-1:1));};return jsxRuntime.jsxs(m,{style:{flex:r||1,...s},as:`--col flex aic ${t||""} ${i?"--sortable":""}`,onClick:x,children:[jsxRuntime.jsx(m,{children:p}),n==-1&&i&&c==e&&jsxRuntime.jsx(m,{as:"--arrow flex aib",children:l==1?k.arrowUp:k.arrowDown})]})};qn.displayName="Zuz.Column";var vt=qn;var Yn=o=>{let{index:n,pubsub:e,schema:t,data:r,ids:s,styles:p,animate:a,sortBy:u,selectable:c,tableRef:i,loading:f,rowClassName:l,onSort:d,onRowClick:x,onSelect:b,onContextMenu:y}=o,C=hooks.useDelayed(),v=react.useMemo(()=>({transition:W.SlideInBottom,curve:_.EaseInOut,delay:.02*(n+1)}),[]),g=react.useRef(null),T=(N,S)=>{n==-1?e.emit(`ALL_ROWS_${N?"CHECKED":"UNCHECKED"}`,N):(b&&b(r,N),e.emit(`ROW_${N?"CHECKED":"UNCHECKED"}`,N,S));},R=(N,S,I)=>jsxRuntime.jsx(vt,{idx:N,id:S,as:"--selector",pubsub:e,value:jsxRuntime.jsx(Xe,{value:I,ref:g,onSwitch:T,type:de.Default})});return react.useEffect(()=>{let N=(B,F)=>{g.current?.setChecked(B,false);},S=(B,F)=>{let L=false;i?.current&&i.current.querySelectorAll(".--row").forEach(U=>{let M=U;if(!M.classList.contains("--row-head")){let G=M.querySelector(".--selector input[type=checkbox]");G&&G.checked&&!L&&(L=G.checked);}}),g.current.setChecked(L,false);},I=B=>{g.current?.setChecked(B,false),b&&b(r,B);},$=B=>{g.current?.setChecked(B,false),b&&b(r,B);};return n==-1?(e.on("ROW_CHECKED",N),e.on("ROW_UNCHECKED",S),()=>{e.off("ROW_CHECKED",N),e.off("ROW_UNCHECKED",S);}):(e.on("ALL_ROWS_CHECKED",I),e.on("ALL_ROWS_UNCHECKED",$),()=>{e.off("ALL_ROWS_CHECKED",I),e.off("ALL_ROWS_UNCHECKED",$);})},[]),jsxRuntime.jsxs(m,{onContextMenu:N=>y?y(N,r):null,onClick:N=>x?x(N,o.data):()=>{},...a?{fx:{...v,when:C}}:{},as:`--row flex aic ${x?"--row-clickable":""} ${n==-1?"--row-head":""} ${l||""}`,children:[n==-1&&t.map((N,S)=>{let{renderWhenHeader:I,render:$,value:B,...F}=N;return jsxRuntime.jsxs(react.Fragment,{children:[c&&S==0&&R(-1,`--selector-${N.id}`,"all"),jsxRuntime.jsx(vt,{idx:-1,onSort:d,sortBy:u,value:B,...F,pubsub:e,style:p[N.id]})]},`--col-${N.id}`)}),f&&n>-1&&jsxRuntime.jsx(m,{as:"--col",children:jsxRuntime.jsx(O,{as:"opacity:0",children:"..."})}),!f&&n>-1&&s&&r&&t.map((N,S)=>jsxRuntime.jsxs(react.Fragment,{children:[c&&S==0&&R(S,`--selector-${N.id}`,N.id.toString()),s.includes(String(N.id))?jsxRuntime.jsx(vt,{pubsub:e,idx:S,id:String(N.id),style:p[String(N.id)],value:N.render?N.render(r,n):r[String(N.id).includes(".")?String(N.id).split(".").reverse()[0]:N.id]}):null]},`--${String(N.id)}-val-${S}`))]})};Yn.displayName="Zuz.Row";var wt=Yn;var es=(o,n)=>{let{schema:e,rows:t,rowCount:r,rowsPerPage:s,currentPage:p,pagination:a,paginationHash:u,showPaginationOnZeroPageCount:c,animateRows:i,header:f,rowClassName:l,selectableRows:d,hoverable:x,sortBy:b,loading:y,loadingRowCount:C,loadingMessage:v,spinner:g,emptyMessage:T,onSort:R,onRowClick:N,onRowSelectToggle:S,onPageChange:I,onRowContextMenu:$,...B}=o,F=react.useRef(null),L=react.useMemo(()=>e.reduce((ie,Y)=>(ie[Y.id]={flex:Y.weight||1,...Y.w&&{width:Y.w},...Y.maxW&&{maxWidth:Y.maxW},...Y.minW&&{minWidth:Y.minW},...Y.h&&{height:Y.h},...Y.maxH&&{maxHeight:Y.maxH},...Y.minH&&{minHeight:Y.minH}},ie),{}),[e]),U=react.useMemo(()=>Object.keys(L),[e]),M=react.useMemo(()=>f??true,[f]),{style:G,className:w,rest:H}=P(B),A=react.useRef(null),Z=react.useMemo(()=>new core.PubSub,[]),D=react.useRef(t.map(()=>core.uuid(8))),[z,X]=react.useState(b||null),[ee,j]=react.useState(v||"loading"),re=react.useMemo(()=>!y&&t&&t.length==0,[y,t]),ae=react.useCallback(()=>T?typeof T=="function"?jsxRuntime.jsx(T,{}):T:jsxRuntime.jsx(O,{as:"tac s:18 mt:75",children:"No Record Found"}),[y,t]);react.useEffect(()=>{D.current=t.map(()=>core.uuid(8));},[t]);let vs=(ie,Y)=>{X(ie),R?.(ie,Y);},ws=(r||(t?t.length:0))/(s||10),nt=react.useMemo(()=>c||ws>1?jsxRuntime.jsx(uo,{hash:u,ref:F,renderOnZeroPageCount:c,onPageChange:I,paginationStyle:"table",startPage:p,itemCount:r||(t?t.length:0),itemsPerPage:s||10}):null,[p,r]);return react.useImperativeHandle(n,()=>({setLoading(ie){}})),jsxRuntime.jsxs(m,{as:`--table ${x??true?"--hoverable":""} flex cols rel ${w}`,ref:A,children:[M==true&&jsxRuntime.jsx(wt,{sortBy:z,onSort:vs,tableRef:A,pubsub:Z,selectable:d,index:-1,schema:e,loading:true,styles:L}),y&&jsxRuntime.jsxs(m,{as:"center-x flex aic --table-spinner",children:[jsxRuntime.jsx(ce,{type:g||he.Simple}),ee&&jsxRuntime.jsx(O,{as:"--table-loading-message",children:ee})]}),y&&Array(C||5).fill({}).map((ie,Y)=>jsxRuntime.jsx(wt,{tableRef:A,index:Y,pubsub:Z,schema:e,styles:L,loading:true,animate:i,onRowClick:N},`--trow-loading-${Y}-${e[0].id}`)),!y&&t&&t.map((ie,Y)=>jsxRuntime.jsx(wt,{tableRef:A,pubsub:Z,loading:false,index:Y,schema:e,ids:U,styles:L,animate:i,data:ie,onRowClick:N,rowClassName:l,selectable:d,onSelect:S,onContextMenu:$},`--trow-${D.current[Y]||Y}-${e[0].id}`)),re&&ae(),jsxRuntime.jsx(m,{"aria-hidden":!a||!nt,...i?{fx:{transition:W.SlideInBottom,curve:_.EaseInOut,delay:.02*(t.length+1),when:!y&&t&&a&&nt!=null}}:{},as:"--row flex aic --row-footer",children:a&&nt?nt:null})]})};es.displayName="Zuz.Table";var kc=react.forwardRef(es),Mc=kc;var ts=({isActive:o,transitionType:n,speed:e,width:t,render:r,content:s,onHeightChange:p})=>{let a=react.useRef(null),u=hooks.useResizeObserver(a);react.useEffect(()=>{o&&u.height>0&&p(u.height);},[o,u.height]);let c=react.useMemo(()=>{let i={flexShrink:0,height:"fit-content"};return n==="fade"?{...i,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,visibility:o?"visible":"hidden",transition:`opacity ${e}s ease-in-out`,zIndex:o?1:0}:n==="scale"?{...i,gridArea:"1 / 1 / 2 / 2",opacity:o?1:0,transform:`scale(${o?1:.95})`,transition:`all ${e}s cubic-bezier(0.34, 1.56, 0.64, 1)`,zIndex:o?1:0}:i},[o,n,t,e]);return jsxRuntime.jsx(m,{ref:a,style:{...c},className:"--content",children:r||o?s:null})};ts.displayName="Zuz.TabBody";var os=ts;var ss=({ref:o,...n})=>{let{tabs:e,speed:t=.3,prerender:r=true,variant:s,tabStyle:p="fixed",onChange:a,transitionType:u="slide",...c}=n,[i,f]=react.useState(0),l=react.useRef(null),d=hooks.useResizeObserver(l),x=react.useMemo(()=>core.uuid(8),[]),[b,y]=react.useState("auto"),C=react.useMemo(()=>d.width>0,[d.width]);react.useImperativeHandle(o,()=>({setTab:S=>f(S)}));let v=react.useMemo(()=>e.map(S=>({...S,key:S.key||core.uuid(8)})),[e]),{style:g,className:T,rest:R}=P({as:`flex cols w-full no-overflow ${c.as||""}`,...c}),N=()=>{if(!C)return {opacity:0};switch(u){case "fade":return {display:"grid",gridTemplateColumns:"1fr"};case "scale":return {display:"grid",gridTemplateColumns:"1fr"};default:return {display:"flex",transform:`translate3d(-${i*d.width}px, 0, 0)`,transition:`transform ${t}s cubic-bezier(0.4, 0, 0.2, 1)`}}};return jsxRuntime.jsxs(m,{ref:l,style:g,className:`--tabview --${p} flex cols ${T}`,children:[jsxRuntime.jsx(Ye,{as:"--tabview-head",onSwitch:S=>{f(S.index);let I=v.find($=>$.tag==S.tag);I&&I.onSelect&&(I.onSelect(I,S.index),a?.(I,S.index));},selected:i,items:v.reduce((S,I,$)=>(S.push({icon:I.icon,index:$,label:I.label,tag:I.tag}),S),[])}),jsxRuntime.jsx(m,{className:"--tabview-body",as:"rel no-overflow w-full",style:{height:b,transition:C?`height ${t}s cubic-bezier(0.4, 0, 0.2, 1)`:"none",opacity:C?1:0},children:jsxRuntime.jsx(m,{className:"--track",style:{...N()},children:v.map((S,I)=>jsxRuntime.jsx(os,{isActive:I===i,transitionType:u,speed:t,width:d.width,render:r||I===i,onHeightChange:$=>I===i&&y($),content:S.body},`tab-body-${S.key||I}-${x}`))})})]})};ss.displayName="Zuz.TabView";var Fc=ss;var Kc=({meta:o})=>jsxRuntime.jsxs(V,{as:"flex aic --command-item",children:[o.icon&&jsxRuntime.jsx(q,{name:o.icon,as:"--command-icon"}),jsxRuntime.jsx(O,{children:o.label})]}),Uc=({position:o,onSelect:n,commands:e,visible:t})=>jsxRuntime.jsx(m,{"aria-hidden":!t,fx:{transition:W.SlideInBottom,duration:.1,when:t},className:"--command-box abs grid",style:{...o},children:e.map(r=>jsxRuntime.jsx(Kc,{meta:r},`cmd-${r.label.replace(/\s+/,"-")}`))}),as=Uc;var ms=react.forwardRef((o,n)=>{let{autoResize:e,maxHeight:t,variant:r=K.Small,resize:s="none",command:p,commands:a,onInput:u,cmd:c,renderDropdown:i,value:f,defaultValue:l,...d}=o,x=react.useRef(null),b=react.useRef(null),{style:y,className:C,rest:v}=P(d),{showDropdown:g,dropdownPosition:T,handleKeyDown:R,handleInput:N,handleCommandSelect:S}=hooks.useCommandActions({command:p,commands:a,cmd:c,ref:x}),I=react.useCallback(()=>{let B=x.current;!B||!e||(b.current&&cancelAnimationFrame(b.current),b.current=requestAnimationFrame(()=>{B.style.height="auto";let F=B.scrollHeight;if(t){let L=parseInt(t.toString(),10);isNaN(L)||(F=Math.min(F,L));}B.style.height=`${F}px`,B.style.overflowY=t&&F>=parseInt(t.toString(),10)?"auto":"hidden";}));},[e,t]),$=B=>{u?.(B),N(B),I();};return react.useEffect(()=>{I();},[f,l,I]),react.useEffect(()=>{e&&x.current&&I();},[e,I]),react.useEffect(()=>()=>{b.current&&cancelAnimationFrame(b.current);},[]),jsxRuntime.jsxs(m,{as:"rel",children:[jsxRuntime.jsx("textarea",{className:`--input --textarea --${r} flex ${C}`.trim(),style:{...y,resize:s,height:e?"auto":y?.height,overflow:"hidden",transition:e?"none":void 0},onKeyDown:R,onInput:$,ref:B=>{typeof n=="function"?n(B):n&&(n.current=B),x.current=B;},value:f,defaultValue:l,...v}),i?i({show:g,position:T,commands:a||[],onSelect:S}):a&&a.length>0&&jsxRuntime.jsx(as,{visible:g,commands:a,onSelect:S,position:T})]})});ms.displayName="Zuz.TextArea";var Yc=ms;var ps=react.forwardRef((o,n)=>{let{as:e,value:t,color:r,direction:s,...p}=o,a=react.useRef(null),[u,c]=react.useState(t||0);return react.useImperativeHandle(n,()=>({updateValue(i){u.toString().length!==i.toString().length&&c(i);},setValue(i){if(this.updateValue(i),a.current){let f=i.toString().split("");a.current.querySelectorAll(".--wheel-char").forEach((l,d)=>{let x=f[d];if(l instanceof HTMLElement){l.setAttribute("data-value",x);let b=l.querySelector(".--wheel-char-track");b instanceof HTMLElement&&(b.style.setProperty("--v",x),b.offsetWidth);}});}}})),react.useEffect(()=>{c(t||0);},[t]),jsxRuntime.jsxs(m,{className:"--text-wheel flex aic rel","aria-hidden":true,as:e,ref:a,...p,children:[(u||0).toString().split("").map((i,f)=>isNaN(parseInt(i,10))?jsxRuntime.jsx(Q,{className:"--wheel-char wheel-char-symbol grid",children:i},`wheel-char-symbol-${f}`):jsxRuntime.jsx(Q,{"data-value":i,className:`--wheel-char grid ${f>(u||0).toString().length-3?"--wheel-fraction":""}`.trim(),children:jsxRuntime.jsxs(Q,{className:`--wheel-char-track --wheel-track-${s||"down"} grid`,style:{"--v":i},children:[jsxRuntime.jsx(Q,{children:!s||s==="down"?0:9}),(!s||s==="down"?[9,8,7,6,5,4,3,2,1,0]:[0,1,2,3,4,5,6,7,8,9]).map((l,d)=>jsxRuntime.jsx(Q,{children:l},`${f}--${d}`)),jsxRuntime.jsx(Q,{children:!s||s==="down"?9:0})]})},`wheel-char-${f}`)),r&&jsxRuntime.jsx(m,{className:"abs fillx",style:{zIndex:1,background:`linear-gradient(0deg, ${r}, transparent, transparent, transparent, ${r})`}})]})});ps.displayName="Zuz.TextWheel";var rp=ps;var gs=react.forwardRef((o,n)=>{let{title:e,position:t,margin:r,children:s,...p}=o,{style:a,className:u,rest:c}=P(p),[i,f]=react.useState(false),l=react.useMemo(()=>t||J.Top,[]),d=react.useRef(null),x=react.useRef(null),b=g=>{},y=typeof ResizeObserver<"u"?new ResizeObserver(b):{observe:()=>{},unobserve:()=>{}},C=hooks.useDimensions(),v=react.useMemo(()=>{if(!x.current)return {left:0,top:0};let g=x.current.previousElementSibling;if(g){let T=g.getBoundingClientRect();switch(y.observe(g),l){case J.Top:return {left:T.left+T.width/2,top:T.top-(r||25)};case J.Bottom:return {left:T.left+T.width/2,top:T.top+(r||25)};case J.Left:return {left:T.left-T.width/2,top:T.top+T.height/2};case J.Right:return {left:T.right,top:T.top+T.height/2};default:return {left:0,top:0}}}},[x.current,C,y]);return react.useEffect(()=>{},[]),jsxRuntime.jsxs(m,{ref:d,className:"--with-tooltip rel",onMouseEnter:g=>f(true),onMouseLeave:g=>f(false),children:[s,jsxRuntime.jsx(m,{ref:x,style:{left:v?.left+"px",top:v?.top+"px"},className:`--tooltip --${t||J.Top} fixed ${u}`.trim(),fx:{from:l==J.Bottom||l==J.Top?{opacity:0,x:"-50%",y:l==J.Top?-5:5}:{opacity:0,y:"-50%",x:l==J.Right?15:-25},to:l==J.Bottom||l==J.Top?{opacity:1,x:"-50%",y:0}:{opacity:1,y:"-50%",x:l==J.Right?10:-20},curve:_.EaseInOut,when:i},children:jsxRuntime.jsx(O,{className:"--text rel",children:e})})]})});gs.displayName="Zuz.ToolTip";var lp=gs;var So=react.forwardRef((o,n)=>{let{as:e,meta:t,nodes:r,icons:s,onSelect:p,treeTag:a,selected:u,roots:c,expanded:i,...f}=o,{tag:l,label:d,icon:x,under:b,isHead:y}=t,C=react.useMemo(()=>c.includes(l),[c]),[v,g]=react.useState(i),T=()=>{localStorage.setItem(`--tn${a}-${l}`,v?"0":"1"),g(!v);};react.useEffect(()=>{i||C&&!localStorage.getItem(`--tn${a}-${l}`)?(localStorage.setItem(`--tn${a}-${l}`,"1"),g(true)):g(localStorage.getItem(`--tn${a}-${l}`)=="1");},[]);let R=react.useMemo(()=>r.filter(N=>N.under==l),[r,l]);return jsxRuntime.jsxs(m,{className:`--treenode ${C?"--is-root":""} --treenode-${l} flex cols`,children:[jsxRuntime.jsxs(m,{className:`--node --node-${l} flex aic ${u==l?" --selected":""}`,children:[jsxRuntime.jsx(V,{skeleton:f.skeleton,onClick:T,className:"--node-aro-btn",disabled:R.length==0,children:s?.arrowClose&&s?.arrowOpen?jsxRuntime.jsx(q,{skeleton:f.skeleton,className:"--node-aro-icon",name:R.length==0?s?.arrowDisabled||s?.arrowClose:v?s?.arrowOpen:s?.arrowClose}):R.length==0?k.chevronBottom:v?k.chevronBottom:k.chevronRight}),jsxRuntime.jsxs(V,{className:"--node-meta flex aic",onClick:N=>p(l),children:[(s?.nodeOpen&&s?.nodeClose||C&&s?.rootOpen&&s?.rootClose)&&jsxRuntime.jsx(q,{skeleton:f.skeleton,className:`--node-icon ${C?"--icon-root":""}`,name:x||(v?C&&s?.rootOpen||s.nodeOpen:C&&s?.rootClose||s?.nodeClose)}),jsxRuntime.jsx(O,{className:`--node-label ${C?"--node-label-root":""}`.trim(),skeleton:f.skeleton,children:d})]})]}),v&&R.length>0&&jsxRuntime.jsx(m,{className:`--sub-node tree-sub-node-${l} flex cols`,children:R.map(N=>jsxRuntime.jsx(So,{treeTag:a,selected:u,onSelect:p,icons:s,roots:c,expanded:N.expanded||false,meta:N,nodes:r},`--node-${N.tag}`))})]})});So.displayName="TreeItem";var xs=So;var bs=react.forwardRef((o,n)=>{let{as:e,nodes:t,onNodeSelect:r,tag:s,icons:p,roots:a,selected:u,...c}=o,[i,f]=react.useState(u);react.useImperativeHandle(n,()=>({getSelected:()=>i}),[r]);let l=d=>{f(d),r&&r(d);};return react.useEffect(()=>{i!=u&&f(u);},[u]),jsxRuntime.jsx(m,{className:"--treeview flex cols",children:t.filter(d=>a.includes(d.tag)).map(d=>jsxRuntime.jsx(xs,{treeTag:s?`-${s}`:"",selected:i,onSelect:x=>l(x),icons:p,meta:d,roots:a,expanded:d.expanded||false,skeleton:c.skeleton,nodes:t},`--node-${d.tag}`))})});bs.displayName="Zuz.TreeView";var xp=bs;String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"").replace(/\s+/g," ")};
|
|
14
|
+
exports.ALERT=ne;exports.AVATAR=Pt;exports.Accordion=Da;exports.ActionBar=za;exports.Alert=Za;exports.AutoComplete=si;exports.Avatar=di;exports.Badge=hi;exports.Box=m;exports.Bubble=Ki;exports.BubbleMediaType=Hr;exports.BubbleStatus=Or;exports.Button=V;exports.CHART=Lr;exports.CHECKBOX=de;exports.COLORTHEME=Pp;exports.Calendar=Gt;exports.Chart=Ai;exports.CheckBox=Xe;exports.CodeBlock=tl;exports.ColorScheme=hl;exports.ContextMenu=Cl;exports.CookiesConsent=El;exports.Cover=Ne;exports.CropShape=Al;exports.Cropper=Ol;exports.Crumb=$l;exports.DATATYPE=Rp;exports.DIALOG=Ee;exports.DIALOG_ACTION_POSITION=Io;exports.DRAWER_SIDE=Te;exports.DatePicker=Zl;exports.Dialog=Dt;exports.DialogProvider=ma;exports.Drawer=Ql;exports.FILTER=it;exports.FORMVALIDATION=ge;exports.FORMVALIDATION_STYLE=Ip;exports.Fab=tm;exports.Filters=nm;exports.Form=bm;exports.Group=Rm;exports.Icon=q;exports.Image=We;exports.Input=te;exports.KeyboardKeys=mo;exports.KeysLabelMap=Nn;exports.KeysMap=Pn;exports.Label=qe;exports.List=Ke;exports.NetworkStatus=Dm;exports.Overlay=Pe;exports.PACKAGE_NAME=No;exports.POSITION=Nt;exports.PROGRESS=Bp;exports.Pagination=uo;exports.PaginationStyle=co;exports.Password=Km;exports.PinInput=qm;exports.Position=J;exports.ProgressBar=Xt;exports.RADIO=It;exports.Radio=Qm;exports.SHEET=se;exports.SHEET_ACTION_POSITION=Rt;exports.SKELETON=Tp;exports.SLIDER=at;exports.SORT=Np;exports.ScrollView=oc;exports.Search=cc;exports.Select=xc;exports.SelectTabs=Ye;exports.Sheet=mm;exports.Slider=eo;exports.Span=Q;exports.Spinner=ce;exports.Status=Ep;exports.Switch=bc;exports.TRANSITIONS=W;exports.TRANSITION_CURVES=_;exports.TabView=Fc;exports.Table=Mc;exports.Text=O;exports.TextWheel=rp;exports.Textarea=Yc;exports.ThemeProvider=Ys;exports.ToastDefaultTitle=sr;exports.ToastProvider=Sa;exports.ToastType=At;exports.ToolTip=lp;exports.TreeView=xp;exports.Variant=K;exports._buildWithStyles=Yp;exports.animationTransition=Ve;exports.buildClassString=Et;exports.buildWithStyles=Lo;exports.cleanProps=Ro;exports.css=Xp;exports.getAnimationCurve=Bt;exports.getAnimationTransition=jp;exports.getZuzMap=Cs;exports.isKeyCombination=Tn;exports.setZuzMap=Bo;exports.useBase=P;exports.useContextMenu=Ia;exports.useDialog=fa;exports.useFx=$e;exports.usePosition=ze;exports.useToast=$t;
|