UNPKG

@vctrl/viewer

Version:

vctrl/viewer is a React component library for rendering and interacting with 3D models. It's part of the vectreal ecosystem and is designed to work seamlessly with the vctrl/hooks package for model loading and management.

1 lines 307 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),S=require("react"),kr=require("@react-three/fiber"),Lr=require("react-dom"),Me=require("three"),eo=require("@react-three/drei");function nc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=nc(S),oc=nc(Lr);function Zp(e,t){const n=f.createContext(t),o=s=>{const{children:i,...a}=s,c=f.useMemo(()=>a,Object.values(a));return h.jsx(n.Provider,{value:c,children:i})};o.displayName=e+"Provider";function r(s){const i=f.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function re(e,t=[]){let n=[];function o(s,i){const a=f.createContext(i),c=n.length;n=[...n,i];const l=d=>{var x;const{scope:p,children:m,...v}=d,g=((x=p==null?void 0:p[e])==null?void 0:x[c])||a,y=f.useMemo(()=>v,Object.values(v));return h.jsx(g.Provider,{value:y,children:m})};l.displayName=s+"Provider";function u(d,p){var g;const m=((g=p==null?void 0:p[e])==null?void 0:g[c])||a,v=f.useContext(m);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,u]}const r=()=>{const s=n.map(i=>f.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return f.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return r.scopeName=e,[o,Qp(r,...t)]}function Qp(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const i=o.reduce((a,{useScope:c,scopeName:l})=>{const d=c(s)[`__scope${l}`];return{...a,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function ci(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function cn(...e){return t=>{let n=!1;const o=e.map(r=>{const s=ci(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():ci(e[r],null)}}}}function U(...e){return f.useCallback(cn(...e),e)}var ze=f.forwardRef((e,t)=>{const{children:n,...o}=e,r=f.Children.toArray(n),s=r.find(Jp);if(s){const i=s.props.children,a=r.map(c=>c===s?f.Children.count(i)>1?f.Children.only(null):f.isValidElement(i)?i.props.children:null:c);return h.jsx(tr,{...o,ref:t,children:f.isValidElement(i)?f.cloneElement(i,void 0,a):null})}return h.jsx(tr,{...o,ref:t,children:n})});ze.displayName="Slot";var tr=f.forwardRef((e,t)=>{const{children:n,...o}=e;if(f.isValidElement(n)){const r=th(n),s=eh(o,n.props);return n.type!==f.Fragment&&(s.ref=t?cn(t,r):r),f.cloneElement(n,s)}return f.Children.count(n)>1?f.Children.only(null):null});tr.displayName="SlotClone";var rc=({children:e})=>h.jsx(h.Fragment,{children:e});function Jp(e){return f.isValidElement(e)&&e.type===rc}function eh(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...a)=>{s(...a),r(...a)}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function th(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function St(e){const t=e+"CollectionProvider",[n,o]=re(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:v,children:g}=m,y=S.useRef(null),x=S.useRef(new Map).current;return h.jsx(r,{scope:v,itemMap:x,collectionRef:y,children:g})};i.displayName=t;const a=e+"CollectionSlot",c=S.forwardRef((m,v)=>{const{scope:g,children:y}=m,x=s(a,g),b=U(v,x.collectionRef);return h.jsx(ze,{ref:b,children:y})});c.displayName=a;const l=e+"CollectionItemSlot",u="data-radix-collection-item",d=S.forwardRef((m,v)=>{const{scope:g,children:y,...x}=m,b=S.useRef(null),w=U(v,b),M=s(l,g);return S.useEffect(()=>(M.itemMap.set(b,{ref:b,...x}),()=>void M.itemMap.delete(b))),h.jsx(ze,{[u]:"",ref:w,children:y})});d.displayName=l;function p(m){const v=s(e+"CollectionConsumer",m);return S.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const x=Array.from(y.querySelectorAll(`[${u}]`));return Array.from(v.itemMap.values()).sort((M,C)=>x.indexOf(M.ref.current)-x.indexOf(C.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:c,ItemSlot:d},p,o]}function T(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Q(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function st({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=nh({defaultProp:t,onChange:n}),s=e!==void 0,i=s?e:o,a=Q(n),c=f.useCallback(l=>{if(s){const d=typeof l=="function"?l(e):l;d!==e&&a(d)}else r(l)},[s,e,r,a]);return[i,c]}function nh({defaultProp:e,onChange:t}){const n=f.useState(e),[o]=n,r=f.useRef(o),s=Q(t);return f.useEffect(()=>{r.current!==o&&(s(o),r.current=o)},[o,r,s]),n}var oh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],k=oh.reduce((e,t)=>{const n=f.forwardRef((o,r)=>{const{asChild:s,...i}=o,a=s?ze:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(a,{...i,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function kn(e,t){e&&oc.flushSync(()=>e.dispatchEvent(t))}var le=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{};function rh(e,t){return f.useReducer((n,o)=>t[n][o]??n,e)}var ne=e=>{const{present:t,children:n}=e,o=sh(t),r=typeof n=="function"?n({present:o.isPresent}):f.Children.only(n),s=U(o.ref,ih(r));return typeof n=="function"||o.isPresent?f.cloneElement(r,{ref:s}):null};ne.displayName="Presence";function sh(e){const[t,n]=f.useState(),o=f.useRef({}),r=f.useRef(e),s=f.useRef("none"),i=e?"mounted":"unmounted",[a,c]=rh(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const l=bn(o.current);s.current=a==="mounted"?l:"none"},[a]),le(()=>{const l=o.current,u=r.current;if(u!==e){const p=s.current,m=bn(l);e?c("MOUNT"):m==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,c]),le(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=m=>{const g=bn(o.current).includes(m.animationName);if(m.target===t&&g&&(c("ANIMATION_END"),!r.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=m=>{m.target===t&&(s.current=bn(o.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:f.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function bn(e){return(e==null?void 0:e.animationName)||"none"}function ih(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ah=f.useId||(()=>{}),ch=0;function ln(e){const[t,n]=f.useState(ah());return le(()=>{n(o=>o??String(ch++))},[e]),t?`radix-${t}`:""}var Vr="Collapsible",[lh,sc]=re(Vr),[uh,Fr]=lh(Vr),ic=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:s,onOpenChange:i,...a}=e,[c=!1,l]=st({prop:o,defaultProp:r,onChange:i});return h.jsx(uh,{scope:n,disabled:s,contentId:ln(),open:c,onOpenToggle:f.useCallback(()=>l(u=>!u),[l]),children:h.jsx(k.div,{"data-state":Br(c),"data-disabled":s?"":void 0,...a,ref:t})})});ic.displayName=Vr;var ac="CollapsibleTrigger",cc=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=Fr(ac,n);return h.jsx(k.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":Br(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:T(e.onClick,r.onOpenToggle)})});cc.displayName=ac;var $r="CollapsibleContent",lc=f.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=Fr($r,e.__scopeCollapsible);return h.jsx(ne,{present:n||r.open,children:({present:s})=>h.jsx(dh,{...o,ref:t,present:s})})});lc.displayName=$r;var dh=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...s}=e,i=Fr($r,n),[a,c]=f.useState(o),l=f.useRef(null),u=U(t,l),d=f.useRef(0),p=d.current,m=f.useRef(0),v=m.current,g=i.open||a,y=f.useRef(g),x=f.useRef(void 0);return f.useEffect(()=>{const b=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(b)},[]),le(()=>{const b=l.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();d.current=w.height,m.current=w.width,y.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),c(o)}},[i.open,o]),h.jsx(k.div,{"data-state":Br(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...s,ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:g&&r})});function Br(e){return e?"open":"closed"}var fh=ic,ph=cc,hh=lc,mh=f.createContext(void 0);function to(e){const t=f.useContext(mh);return e||t||"ltr"}var Le="Accordion",gh=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[zr,vh,yh]=St(Le),[no,WM]=re(Le,[yh,sc]),Gr=sc(),xh=S.forwardRef((e,t)=>{const{type:n,...o}=e,r=o,s=o;return h.jsx(zr.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?h.jsx(Mh,{...s,ref:t}):h.jsx(Ch,{...r,ref:t})})});xh.displayName=Le;var[uc,bh]=no(Le),[dc,wh]=no(Le,{collapsible:!1}),Ch=S.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},collapsible:s=!1,...i}=e,[a,c]=st({prop:n,defaultProp:o,onChange:r});return h.jsx(uc,{scope:e.__scopeAccordion,value:a?[a]:[],onItemOpen:c,onItemClose:S.useCallback(()=>s&&c(""),[s,c]),children:h.jsx(dc,{scope:e.__scopeAccordion,collapsible:s,children:h.jsx(fc,{...i,ref:t})})})}),Mh=S.forwardRef((e,t)=>{const{value:n,defaultValue:o,onValueChange:r=()=>{},...s}=e,[i=[],a]=st({prop:n,defaultProp:o,onChange:r}),c=S.useCallback(u=>a((d=[])=>[...d,u]),[a]),l=S.useCallback(u=>a((d=[])=>d.filter(p=>p!==u)),[a]);return h.jsx(uc,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:l,children:h.jsx(dc,{scope:e.__scopeAccordion,collapsible:!0,children:h.jsx(fc,{...s,ref:t})})})}),[Ph,oo]=no(Le),fc=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:o,dir:r,orientation:s="vertical",...i}=e,a=S.useRef(null),c=U(a,t),l=vh(n),d=to(r)==="ltr",p=T(e.onKeyDown,m=>{var R;if(!gh.includes(m.key))return;const v=m.target,g=l().filter(E=>{var I;return!((I=E.ref.current)!=null&&I.disabled)}),y=g.findIndex(E=>E.ref.current===v),x=g.length;if(y===-1)return;m.preventDefault();let b=y;const w=0,M=x-1,C=()=>{b=y+1,b>M&&(b=w)},P=()=>{b=y-1,b<w&&(b=M)};switch(m.key){case"Home":b=w;break;case"End":b=M;break;case"ArrowRight":s==="horizontal"&&(d?C():P());break;case"ArrowDown":s==="vertical"&&C();break;case"ArrowLeft":s==="horizontal"&&(d?P():C());break;case"ArrowUp":s==="vertical"&&P();break}const A=b%x;(R=g[A].ref.current)==null||R.focus()});return h.jsx(Ph,{scope:n,disabled:o,direction:r,orientation:s,children:h.jsx(zr.Slot,{scope:n,children:h.jsx(k.div,{...i,"data-orientation":s,ref:c,onKeyDown:o?void 0:p})})})}),Ln="AccordionItem",[Rh,Ur]=no(Ln),pc=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:o,...r}=e,s=oo(Ln,n),i=bh(Ln,n),a=Gr(n),c=ln(),l=o&&i.value.includes(o)||!1,u=s.disabled||e.disabled;return h.jsx(Rh,{scope:n,open:l,disabled:u,triggerId:c,children:h.jsx(fh,{"data-orientation":s.orientation,"data-state":xc(l),...a,...r,ref:t,disabled:u,open:l,onOpenChange:d=>{d?i.onItemOpen(o):i.onItemClose(o)}})})});pc.displayName=Ln;var hc="AccordionHeader",mc=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=oo(Le,n),s=Ur(hc,n);return h.jsx(k.h3,{"data-orientation":r.orientation,"data-state":xc(s.open),"data-disabled":s.disabled?"":void 0,...o,ref:t})});mc.displayName=hc;var nr="AccordionTrigger",gc=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=oo(Le,n),s=Ur(nr,n),i=wh(nr,n),a=Gr(n);return h.jsx(zr.ItemSlot,{scope:n,children:h.jsx(ph,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":r.orientation,id:s.triggerId,...a,...o,ref:t})})});gc.displayName=nr;var vc="AccordionContent",yc=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...o}=e,r=oo(Le,n),s=Ur(vc,n),i=Gr(n);return h.jsx(hh,{role:"region","aria-labelledby":s.triggerId,"data-orientation":r.orientation,...i,...o,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});yc.displayName=vc;function xc(e){return e?"open":"closed"}var Ah=pc,Sh=mc,bc=gc,wc=yc;function un(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,s;for(s=0;s<o.length;s++)r=o[s],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}var Th=["color"],Cc=S.forwardRef(function(e,t){var n=e.color,o=n===void 0?"currentColor":n,r=un(e,Th);return S.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),S.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Eh=["color"],Mc=S.forwardRef(function(e,t){var n=e.color,o=n===void 0?"currentColor":n,r=un(e,Eh);return S.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),S.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Nh=["color"],Pc=S.forwardRef(function(e,t){var n=e.color,o=n===void 0?"currentColor":n,r=un(e,Nh);return S.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),S.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Dh=["color"],Rc=S.forwardRef(function(e,t){var n=e.color,o=n===void 0?"currentColor":n,r=un(e,Dh);return S.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),S.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),Ih=["color"],Ac=S.forwardRef(function(e,t){var n=e.color,o=n===void 0?"currentColor":n,r=un(e,Ih);return S.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),S.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:o}))});function Sc(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Sc(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function _h(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Sc(e))&&(o&&(o+=" "),o+=t);return o}const Kr="-",jh=e=>{const t=kh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{const a=i.split(Kr);return a[0]===""&&a.length!==1&&a.shift(),Tc(a,t)||Oh(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&o[i]?[...c,...o[i]]:c}}},Tc=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?Tc(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const s=e.join(Kr);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},li=/^\[(.+)\]$/,Oh=e=>{if(li.test(e)){const t=li.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},kh=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return Vh(Object.entries(e.classGroups),n).forEach(([s,i])=>{or(i,o,s,t)}),o},or=(e,t,n,o)=>{e.forEach(r=>{if(typeof r=="string"){const s=r===""?t:ui(t,r);s.classGroupId=n;return}if(typeof r=="function"){if(Lh(r)){or(r(o),t,n,o);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,i])=>{or(i,ui(t,s),n,o)})})},ui=(e,t)=>{let n=e;return t.split(Kr).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},Lh=e=>e.isThemeGetter,Vh=(e,t)=>t?e.map(([n,o])=>{const r=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,r]}):e,Fh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,o=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=o.get(s))!==void 0)return r(s,i),i},set(s,i){n.has(s)?n.set(s,i):r(s,i)}}},Ec="!",$h=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,r=t[0],s=t.length,i=a=>{const c=[];let l=0,u=0,d;for(let y=0;y<a.length;y++){let x=a[y];if(l===0){if(x===r&&(o||a.slice(y,y+s)===t)){c.push(a.slice(u,y)),u=y+s;continue}if(x==="/"){d=y;continue}}x==="["?l++:x==="]"&&l--}const p=c.length===0?a:a.substring(u),m=p.startsWith(Ec),v=m?p.substring(1):p,g=d&&d>u?d-u:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:v,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:i}):i},Bh=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},zh=e=>({cache:Fh(e.cacheSize),parseClassName:$h(e),...jh(e)}),Gh=/\s+/,Uh=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r}=t,s=[],i=e.trim().split(Gh);let a="";for(let c=i.length-1;c>=0;c-=1){const l=i[c],{modifiers:u,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}=n(l);let v=!!m,g=o(v?p.substring(0,m):p);if(!g){if(!v){a=l+(a.length>0?" "+a:a);continue}if(g=o(p),!g){a=l+(a.length>0?" "+a:a);continue}v=!1}const y=Bh(u).join(":"),x=d?y+Ec:y,b=x+g;if(s.includes(b))continue;s.push(b);const w=r(g,v);for(let M=0;M<w.length;++M){const C=w[M];s.push(x+C)}a=l+(a.length>0?" "+a:a)}return a};function Kh(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Nc(t))&&(o&&(o+=" "),o+=n);return o}const Nc=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=Nc(e[o]))&&(n&&(n+=" "),n+=t);return n};function Wh(e,...t){let n,o,r,s=i;function i(c){const l=t.reduce((u,d)=>d(u),e());return n=zh(l),o=n.cache.get,r=n.cache.set,s=a,a(c)}function a(c){const l=o(c);if(l)return l;const u=Uh(c,n);return r(c,u),u}return function(){return s(Kh.apply(null,arguments))}}const W=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Dc=/^\[(?:([a-z-]+):)?(.+)\]$/i,Hh=/^\d+\/\d+$/,Yh=new Set(["px","full","screen"]),Xh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zh=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Qh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ie=e=>vt(e)||Yh.has(e)||Hh.test(e),Ve=e=>Tt(e,"length",am),vt=e=>!!e&&!Number.isNaN(Number(e)),Io=e=>Tt(e,"number",vt),Bt=e=>!!e&&Number.isInteger(Number(e)),em=e=>e.endsWith("%")&&vt(e.slice(0,-1)),L=e=>Dc.test(e),Fe=e=>Xh.test(e),tm=new Set(["length","size","percentage"]),nm=e=>Tt(e,tm,Ic),om=e=>Tt(e,"position",Ic),rm=new Set(["image","url"]),sm=e=>Tt(e,rm,lm),im=e=>Tt(e,"",cm),zt=()=>!0,Tt=(e,t,n)=>{const o=Dc.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},am=e=>qh.test(e)&&!Zh.test(e),Ic=()=>!1,cm=e=>Qh.test(e),lm=e=>Jh.test(e),um=()=>{const e=W("colors"),t=W("spacing"),n=W("blur"),o=W("brightness"),r=W("borderColor"),s=W("borderRadius"),i=W("borderSpacing"),a=W("borderWidth"),c=W("contrast"),l=W("grayscale"),u=W("hueRotate"),d=W("invert"),p=W("gap"),m=W("gradientColorStops"),v=W("gradientColorStopPositions"),g=W("inset"),y=W("margin"),x=W("opacity"),b=W("padding"),w=W("saturate"),M=W("scale"),C=W("sepia"),P=W("skew"),A=W("space"),R=W("translate"),E=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",L,t],j=()=>[L,t],G=()=>["",Ie,Ve],B=()=>["auto",vt,L],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>["start","end","center","between","around","evenly","stretch"],N=()=>["","0",L],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>[vt,L];return{cacheSize:500,separator:":",theme:{colors:[zt],spacing:[Ie,Ve],blur:["none","",Fe,L],brightness:K(),borderColor:[e],borderRadius:["none","","full",Fe,L],borderSpacing:j(),borderWidth:G(),contrast:K(),grayscale:N(),hueRotate:K(),invert:N(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[em,Ve],inset:F(),margin:F(),opacity:K(),padding:j(),saturate:K(),scale:K(),sepia:N(),skew:K(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",L]}],container:["container"],columns:[{columns:[Fe]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),L]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Bt,L]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",L]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",Bt,L]}],"grid-cols":[{"grid-cols":[zt]}],"col-start-end":[{col:["auto",{span:["full",Bt,L]},L]}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":[zt]}],"row-start-end":[{row:["auto",{span:[Bt,L]},L]}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",L]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",L]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",..._()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",..._(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[..._(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",L,t]}],"min-w":[{"min-w":[L,t,"min","max","fit"]}],"max-w":[{"max-w":[L,t,"none","full","min","max","fit","prose",{screen:[Fe]},Fe]}],h:[{h:[L,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[L,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[L,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[L,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Fe,Ve]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Io]}],"font-family":[{font:[zt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",L]}],"line-clamp":[{"line-clamp":["none",vt,Io]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ie,L]}],"list-image":[{"list-image":["none",L]}],"list-style-type":[{list:["none","disc","decimal",L]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ie,Ve]}],"underline-offset":[{"underline-offset":["auto",Ie,L]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",L]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",L]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),om]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sm]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:$()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[Ie,L]}],"outline-w":[{outline:[Ie,Ve]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Ie,Ve]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Fe,im]}],"shadow-color":[{shadow:[zt]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Fe,L]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",L]}],duration:[{duration:K()}],ease:[{ease:["linear","in","out","in-out",L]}],delay:[{delay:K()}],animate:[{animate:["none","spin","ping","pulse","bounce",L]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Bt,L]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",L]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",L]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",L]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ie,Ve,Io]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},dm=Wh(um);function D(...e){return dm(_h(e))}const fm=f.forwardRef(({className:e,...t},n)=>h.jsx(Ah,{ref:n,className:D("border-b",e),...t}));fm.displayName="AccordionItem";const pm=f.forwardRef(({className:e,children:t,...n},o)=>h.jsx(Sh,{className:"flex",children:h.jsxs(bc,{ref:o,className:D("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,h.jsx(Mc,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));pm.displayName=bc.displayName;const hm=f.forwardRef(({className:e,children:t,...n},o)=>h.jsx(wc,{ref:o,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:h.jsx("div",{className:D("pb-4 pt-0",e),children:t})}));hm.displayName=wc.displayName;var Wr="Avatar",[mm,HM]=re(Wr),[gm,_c]=mm(Wr),jc=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...o}=e,[r,s]=f.useState("idle");return h.jsx(gm,{scope:n,imageLoadingStatus:r,onImageLoadingStatusChange:s,children:h.jsx(k.span,{...o,ref:t})})});jc.displayName=Wr;var Oc="AvatarImage",kc=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:o,onLoadingStatusChange:r=()=>{},...s}=e,i=_c(Oc,n),a=vm(o,s.referrerPolicy),c=Q(l=>{r(l),i.onImageLoadingStatusChange(l)});return le(()=>{a!=="idle"&&c(a)},[a,c]),a==="loaded"?h.jsx(k.img,{...s,ref:t,src:o}):null});kc.displayName=Oc;var Lc="AvatarFallback",Vc=f.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:o,...r}=e,s=_c(Lc,n),[i,a]=f.useState(o===void 0);return f.useEffect(()=>{if(o!==void 0){const c=window.setTimeout(()=>a(!0),o);return()=>window.clearTimeout(c)}},[o]),i&&s.imageLoadingStatus!=="loaded"?h.jsx(k.span,{...r,ref:t}):null});Vc.displayName=Lc;function vm(e,t){const[n,o]=f.useState("idle");return le(()=>{if(!e){o("error");return}let r=!0;const s=new window.Image,i=a=>()=>{r&&o(a)};return o("loading"),s.onload=i("loaded"),s.onerror=i("error"),s.src=e,t&&(s.referrerPolicy=t),()=>{r=!1}},[e,t]),n}var Fc=jc,$c=kc,Bc=Vc;const ym=f.forwardRef(({className:e,...t},n)=>h.jsx(Fc,{ref:n,className:D("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ym.displayName=Fc.displayName;const xm=f.forwardRef(({className:e,...t},n)=>h.jsx($c,{ref:n,className:D("aspect-square h-full w-full",e),...t}));xm.displayName=$c.displayName;const bm=f.forwardRef(({className:e,...t},n)=>h.jsx(Bc,{ref:n,className:D("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));bm.displayName=Bc.displayName;const di=new Set;function ro(e,t,n){e||di.has(t)||(console.warn(t),di.add(t))}function wm(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&ro(!1,"motion() is deprecated. Use motion.create() instead."),e(...o));return new Proxy(n,{get:(o,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function so(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const rr=e=>Array.isArray(e);function zc(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}function Qt(e){return typeof e=="string"||Array.isArray(e)}function fi(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Hr(e,t,n,o){if(typeof t=="function"){const[r,s]=fi(o);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=fi(o);t=t(n!==void 0?n:e.custom,r,s)}return t}function io(e,t,n){const o=e.getProps();return Hr(o,t,n!==void 0?n:o.custom,e)}const Yr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xr=["initial",...Yr],dn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],it=new Set(dn),Re=e=>e*1e3,_e=e=>e/1e3,Cm={type:"spring",stiffness:500,damping:25,restSpeed:10},Mm=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Pm={type:"keyframes",duration:.8},Rm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Am=(e,{keyframes:t})=>t.length>2?Pm:it.has(e)?e.startsWith("scale")?Mm(t[1]):Cm:Rm;function qr(e,t){return e?e[t]||e.default||e:void 0}const Sm={useManualTiming:!1},Tm=e=>e!==null;function ao(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(Tm),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const oe=e=>e;let Et=oe,Ge=oe;process.env.NODE_ENV!=="production"&&(Et=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ge=(e,t)=>{if(!e)throw new Error(t)});function Em(e){let t=new Set,n=new Set,o=!1,r=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(l){s.has(l)&&(c.schedule(l),e()),l(i)}const c={schedule:(l,u=!1,d=!1)=>{const m=d&&o?t:n;return u&&s.add(l),m.has(l)||m.add(l),l},cancel:l=>{n.delete(l),s.delete(l)},process:l=>{if(i=l,o){r=!0;return}o=!0,[t,n]=[n,t],n.clear(),t.forEach(a),o=!1,r&&(r=!1,c.process(l))}};return c}const wn=["read","resolveKeyframes","update","preRender","render","postRender"],Nm=40;function Gc(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=wn.reduce((x,b)=>(x[b]=Em(s),x),{}),{read:a,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:p}=i,m=()=>{const x=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(x-r.timestamp,Nm),1),r.timestamp=x,r.isProcessing=!0,a.process(r),c.process(r),l.process(r),u.process(r),d.process(r),p.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(m))},v=()=>{n=!0,o=!0,r.isProcessing||e(m)};return{schedule:wn.reduce((x,b)=>{const w=i[b];return x[b]=(M,C=!1,P=!1)=>(n||v(),w.schedule(M,C,P)),x},{}),cancel:x=>{for(let b=0;b<wn.length;b++)i[wn[b]].cancel(x)},state:r,steps:i}}const{schedule:H,cancel:Ue,state:J,steps:_o}=Gc(typeof requestAnimationFrame<"u"?requestAnimationFrame:oe,!0),Uc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Dm=1e-7,Im=12;function _m(e,t,n,o,r){let s,i,a=0;do i=t+(n-t)/2,s=Uc(i,o,r)-e,s>0?n=i:t=i;while(Math.abs(s)>Dm&&++a<Im);return i}function fn(e,t,n,o){if(e===t&&n===o)return oe;const r=s=>_m(s,0,1,e,n);return s=>s===0||s===1?s:Uc(r(s),t,o)}const Kc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Wc=e=>t=>1-e(1-t),Hc=fn(.33,1.53,.69,.99),Zr=Wc(Hc),Yc=Kc(Zr),Xc=e=>(e*=2)<1?.5*Zr(e):.5*(2-Math.pow(2,-10*(e-1))),Qr=e=>1-Math.sin(Math.acos(e)),qc=Wc(Qr),Zc=Kc(Qr),Qc=e=>/^0[^.\s]+$/u.test(e);function jm(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Qc(e):!0}const Jc=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),el=e=>t=>typeof t=="string"&&t.startsWith(e),tl=el("--"),Om=el("var(--"),Jr=e=>Om(e)?km.test(e.split("/*")[0].trim()):!1,km=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Lm=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Vm(e){const t=Lm.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const Fm=4;function nl(e,t,n=1){Ge(n<=Fm,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=Vm(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const i=s.trim();return Jc(i)?parseFloat(i):i}return Jr(r)?nl(r,t,n+1):r}const je=(e,t,n)=>n>t?t:n<e?e:n,Nt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Jt={...Nt,transform:e=>je(0,1,e)},Cn={...Nt,default:1},pn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$e=pn("deg"),Ae=pn("%"),O=pn("px"),$m=pn("vh"),Bm=pn("vw"),pi={...Ae,parse:e=>Ae.parse(e)/100,transform:e=>Ae.transform(e*100)},zm=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),hi=e=>e===Nt||e===O,mi=(e,t)=>parseFloat(e.split(", ")[t]),gi=(e,t)=>(n,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return mi(r[1],t);{const s=o.match(/^matrix\((.+)\)$/u);return s?mi(s[1],e):0}},Gm=new Set(["x","y","z"]),Um=dn.filter(e=>!Gm.has(e));function Km(e){const t=[];return Um.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const bt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:gi(4,13),y:gi(5,14)};bt.translateX=bt.x;bt.translateY=bt.y;const ol=e=>t=>t.test(e),Wm={test:e=>e==="auto",parse:e=>e},rl=[Nt,O,Ae,$e,Bm,$m,Wm],vi=e=>rl.find(ol(e)),nt=new Set;let sr=!1,ir=!1;function sl(){if(ir){const e=Array.from(nt).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=Km(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([s,i])=>{var a;(a=o.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}ir=!1,sr=!1,nt.forEach(e=>e.complete()),nt.clear()}function il(){nt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ir=!0)})}function Hm(){il(),sl()}class es{constructor(t,n,o,r,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(nt.add(this),sr||(sr=!0,H.read(il),H.resolveKeyframes(sl))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=r==null?void 0:r.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(o&&n){const c=o.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),r&&i===void 0&&r.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),nt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,nt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Yt=e=>Math.round(e*1e5)/1e5,ts=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ym(e){return e==null}const Xm=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ns=(e,t)=>n=>!!(typeof n=="string"&&Xm.test(n)&&n.startsWith(e)||t&&!Ym(n)&&Object.prototype.hasOwnProperty.call(n,t)),al=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,i,a]=o.match(ts);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},qm=e=>je(0,255,e),jo={...Nt,transform:e=>Math.round(qm(e))},tt={test:ns("rgb","red"),parse:al("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+jo.transform(e)+", "+jo.transform(t)+", "+jo.transform(n)+", "+Yt(Jt.transform(o))+")"};function Zm(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const ar={test:ns("#"),parse:Zm,transform:tt.transform},ft={test:ns("hsl","hue"),parse:al("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Ae.transform(Yt(t))+", "+Ae.transform(Yt(n))+", "+Yt(Jt.transform(o))+")"},ee={test:e=>tt.test(e)||ar.test(e)||ft.test(e),parse:e=>tt.test(e)?tt.parse(e):ft.test(e)?ft.parse(e):ar.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?tt.transform(e):ft.transform(e)},Qm=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Jm(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ts))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Qm))===null||n===void 0?void 0:n.length)||0)>0}const cl="number",ll="color",eg="var",tg="var(",yi="${}",ng=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function en(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const a=t.replace(ng,c=>(ee.test(c)?(o.color.push(s),r.push(ll),n.