lizaui 5.0.4 → 5.0.6

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.
Files changed (42) hide show
  1. package/dist/button/index.es.js +1 -1
  2. package/dist/calendar/index.es.js +1 -1
  3. package/dist/checkbox/index.es.js +1 -1
  4. package/dist/chunks/{button-DaCTNWTs.js → button-wlPPnoey.js} +2 -2
  5. package/dist/chunks/{button-DaCTNWTs.js.map → button-wlPPnoey.js.map} +1 -1
  6. package/dist/chunks/{checkbox-CJAWo52b.js → checkbox-DoMayXNj.js} +2 -2
  7. package/dist/chunks/{checkbox-CJAWo52b.js.map → checkbox-DoMayXNj.js.map} +1 -1
  8. package/dist/chunks/{index-Db2rLomN.js → index-Do-g2tEs.js} +3 -3
  9. package/dist/chunks/{index-Db2rLomN.js.map → index-Do-g2tEs.js.map} +1 -1
  10. package/dist/chunks/select-C25qmFpo.js +1321 -0
  11. package/dist/chunks/select-C25qmFpo.js.map +1 -0
  12. package/dist/chunks/select-DW1tRhcQ.js +2 -0
  13. package/dist/chunks/select-DW1tRhcQ.js.map +1 -0
  14. package/dist/chunks/textarea-ClUh9LtQ.js +3793 -0
  15. package/dist/chunks/textarea-ClUh9LtQ.js.map +1 -0
  16. package/dist/chunks/textarea-ZUAx_MBk.js +65 -0
  17. package/dist/chunks/textarea-ZUAx_MBk.js.map +1 -0
  18. package/dist/components/time-input/time-picker-input.d.ts +9 -1
  19. package/dist/components/time-input/time-picker-input.d.ts.map +1 -1
  20. package/dist/components/time-input/time-picker.styled.d.ts +3 -1
  21. package/dist/components/time-input/time-picker.styled.d.ts.map +1 -1
  22. package/dist/divider/index.es.js +1 -1
  23. package/dist/modal/index.es.js +1 -1
  24. package/dist/pagination/index.cjs.js +1 -1
  25. package/dist/pagination/index.cjs.js.map +1 -1
  26. package/dist/pagination/index.es.js +7 -6
  27. package/dist/pagination/index.es.js.map +1 -1
  28. package/dist/select-input/index.es.js +1 -1
  29. package/dist/table/index.es.js +1 -1
  30. package/dist/time-input/index.cjs.js +23 -18
  31. package/dist/time-input/index.cjs.js.map +1 -1
  32. package/dist/time-input/index.es.js +401 -357
  33. package/dist/time-input/index.es.js.map +1 -1
  34. package/dist/ui/index.cjs.js +4 -4
  35. package/dist/ui/index.cjs.js.map +1 -1
  36. package/dist/ui/index.es.js +344 -342
  37. package/dist/ui/index.es.js.map +1 -1
  38. package/package.json +1 -1
  39. package/dist/chunks/textarea-ELiVeST1.js +0 -5102
  40. package/dist/chunks/textarea-ELiVeST1.js.map +0 -1
  41. package/dist/chunks/textarea-xD71CEWT.js +0 -65
  42. package/dist/chunks/textarea-xD71CEWT.js.map +0 -1
@@ -1,65 +0,0 @@
1
- "use strict";const f=require("./jsx-runtime-BjzqJBtL.js"),C=require("react"),se=require("./variants-BUTPDD09.js"),fs=require("./tv-BfH_ZY7e.js"),Gn=require("./index-nwdlcB7h.js"),he=require("./bundle-mjs-eyqxolf6.js"),ce=require("./utils-BRdagWxe.js"),De=require("./clsx-C11secjj.js"),ps=require("./pattern-F8jUniwt.js");require("./assertion-C7nbUE-q.js");const Kn=require("./label-error-01rbhr3C.js"),Lt=require("./proxy-BwQyOw8U.js"),re=require("./index-6ER8bShj.js"),ms=require("./button-CuSv0p75.js"),gs=require("./index-lrI_r1ww.js"),qn=require("react-dom"),je=require("./floating-ui.react-dom-fLHuukRa.js"),hs=require("./floating-ui.dom-CJ93ksva.js");function Xn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=Xn(C),an=Xn(qn),vs=fs.tv({slots:{base:["relative","inline-flex","shrink-0"],badge:["flex","z-10","flex-wrap","absolute","box-border","rounded-full","whitespace-nowrap","place-content-center","origin-center","items-center","text-inherit","select-none","font-regular","scale-100","opacity-100","subpixel-antialiased","data-[invisible=true]:scale-0","data-[invisible=true]:opacity-0"]},variants:{variant:{solid:{},flat:{},faded:{badge:"border-medium"},shadow:{}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{badge:"px-1 text-xs"},md:{badge:"px-1 text-sm"},lg:{badge:"px-1 text-sm"}},placement:{"top-right":{},"top-left":{},"bottom-right":{},"bottom-left":{}},shape:{circle:{},rectangle:{}},isInvisible:{true:{}},isOneChar:{true:{badge:"px-0"}},isDot:{true:{}},disableAnimation:{true:{badge:"transition-none"},false:{badge:"transition-transform-opacity !ease-soft-spring !duration-300"}},showOutline:{true:{badge:"border-2 border-background"},false:{badge:"border-transparent border-0"}}},defaultVariants:{variant:"solid",color:"default",size:"md",shape:"rectangle",placement:"top-right",showOutline:!0,isInvisible:!1},compoundVariants:[{variant:"solid",color:"default",class:{badge:se.colorVariants.solid.default}},{variant:"solid",color:"primary",class:{badge:se.colorVariants.solid.primary}},{variant:"solid",color:"secondary",class:{badge:se.colorVariants.solid.secondary}},{variant:"solid",color:"success",class:{badge:se.colorVariants.solid.success}},{variant:"solid",color:"warning",class:{badge:se.colorVariants.solid.warning}},{variant:"solid",color:"danger",class:{badge:se.colorVariants.solid.danger}},{variant:"shadow",color:"default",class:{badge:se.colorVariants.shadow.default}},{variant:"shadow",color:"primary",class:{badge:se.colorVariants.shadow.primary}},{variant:"shadow",color:"secondary",class:{badge:se.colorVariants.shadow.secondary}},{variant:"shadow",color:"success",class:{badge:se.colorVariants.shadow.success}},{variant:"shadow",color:"warning",class:{badge:se.colorVariants.shadow.warning}},{variant:"shadow",color:"danger",class:{badge:se.colorVariants.shadow.danger}},{variant:"flat",color:"default",class:{badge:se.colorVariants.flat.default}},{variant:"flat",color:"primary",class:{badge:se.colorVariants.flat.primary}},{variant:"flat",color:"secondary",class:{badge:se.colorVariants.flat.secondary}},{variant:"flat",color:"success",class:{badge:se.colorVariants.flat.success}},{variant:"flat",color:"warning",class:{badge:se.colorVariants.flat.warning}},{variant:"flat",color:"danger",class:{badge:se.colorVariants.flat.danger}},{variant:"faded",color:"default",class:{badge:se.colorVariants.faded.default}},{variant:"faded",color:"primary",class:{badge:se.colorVariants.faded.primary}},{variant:"faded",color:"secondary",class:{badge:se.colorVariants.faded.secondary}},{variant:"faded",color:"success",class:{badge:se.colorVariants.faded.success}},{variant:"faded",color:"warning",class:{badge:se.colorVariants.faded.warning}},{variant:"faded",color:"danger",class:{badge:se.colorVariants.faded.danger}},{isOneChar:!0,size:"sm",class:{badge:"w-4 h-4 min-w-4 min-h-4"}},{isOneChar:!0,size:"md",class:{badge:"w-5 h-5 min-w-5 min-h-5"}},{isOneChar:!0,size:"lg",class:{badge:"w-6 h-6 min-w-6 min-h-6"}},{isDot:!0,size:"sm",class:{badge:"w-3 h-3 min-w-3 min-h-3"}},{isDot:!0,size:"md",class:{badge:"w-3.5 h-3.5 min-w-3.5 min-h-3.5"}},{isDot:!0,size:"lg",class:{badge:"w-4 h-4 min-w-4 min-h-4"}},{placement:"top-right",shape:"rectangle",class:{badge:"top-[5%] right-[5%] translate-x-1/2 -translate-y-1/2"}},{placement:"top-left",shape:"rectangle",class:{badge:"top-[5%] left-[5%] -translate-x-1/2 -translate-y-1/2"}},{placement:"bottom-right",shape:"rectangle",class:{badge:"bottom-[5%] right-[5%] translate-x-1/2 translate-y-1/2"}},{placement:"bottom-left",shape:"rectangle",class:{badge:"bottom-[5%] left-[5%] -translate-x-1/2 translate-y-1/2"}},{placement:"top-right",shape:"circle",class:{badge:"top-[10%] right-[10%] translate-x-1/2 -translate-y-1/2"}},{placement:"top-left",shape:"circle",class:{badge:"top-[10%] left-[10%] -translate-x-1/2 -translate-y-1/2"}},{placement:"bottom-right",shape:"circle",class:{badge:"bottom-[10%] right-[10%] translate-x-1/2 translate-y-1/2"}},{placement:"bottom-left",shape:"circle",class:{badge:"bottom-[10%] left-[10%] -translate-x-1/2 translate-y-1/2"}}]}),xs=l.forwardRef(({className:e,variant:t,size:n,color:r,children:o,content:s,shape:i,placement:a,...c},d)=>{const{base:g,badge:m}=vs({variant:t,size:n,color:r,shape:i,placement:a});return f.jsxRuntimeExports.jsxs("div",{className:g(),children:[o,f.jsxRuntimeExports.jsx("span",{ref:d,className:m({class:e}),...c,children:s})]})}),ys=Gn.cva(["bg-white","transition duration-250 ease appearance-none file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 border px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-primary focus-visible:ring-primary/20 focus-visible:ring-[3px] aria-invalid:ring-danger/20 dark:aria-invalid:ring-danger/40 font-normal aria-invalid:border-danger"],{variants:{size:{sm:"h-9 text-sm",md:"h-input-default text-sm",lg:"h-10 text-base"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{size:"md",radius:"md"}}),Yn=l.forwardRef((e,t)=>{const{id:n,type:r="text",value:o,defaultValue:s,className:i,classNameContainer:a,startClassName:c,endClassName:d,size:g,radius:m,startContent:p,endContent:x,disabled:y,error:u,touched:h,pattern:v,isErrorText:b=!0,label:w,required:R=!1,isClearable:A=!1,onChange:N,onClear:S,...H}=e,T=l.useId(),F=n||T,V=o!==void 0,_=!y&&!!u&&h,$=De.clsx("absolute top-0 h-full flex items-center cursor-pointer px-1.5 z-[1]",{"text-red-700":_,"text-gray-400":y,"text-green-700":!u&&h,"text-gray-500":!_}),X=De.clsx(p&&"pl-8",!p&&"pl-2.5",x&&"pr-8",!x&&"pr-2.5"),U=ce.cn(ys({size:g,radius:m}),X,i),W=ce.cn("form-control-label block font-normal text-sm text-foreground mb-1",{"text-danger":_}),ee=Y=>{const fe=Y.target.value;v&&!ps.validatePatternInput(v,fe)||N?.(Y)},Z=Y=>{Y.preventDefault(),S?.()};return f.jsxRuntimeExports.jsxs("div",{className:he.twMerge("w-full relative flex flex-col",a),children:[w&&f.jsxRuntimeExports.jsxs("label",{htmlFor:F,className:W,children:[w," ",R&&f.jsxRuntimeExports.jsx("span",{className:"text-danger",children:"*"})]}),f.jsxRuntimeExports.jsxs("div",{className:"w-full relative",children:[p&&f.jsxRuntimeExports.jsx("div",{className:he.twMerge("left-1",$,c),children:p}),f.jsxRuntimeExports.jsx("input",{ref:t,id:F,...y?{}:{"aria-invalid":_},type:r,autoComplete:"off",autoCapitalize:"off",disabled:y,onChange:ee,className:U,...V?{value:o}:{defaultValue:s},...H}),A&&!y&&o?f.jsxRuntimeExports.jsx("div",{className:he.twMerge("absolute top-0 h-full flex items-center px-1.5 z-[1] opacity-70 hover:opacity-100 cursor-pointer rounded-full","right-1"),onClick:Z,children:f.jsxRuntimeExports.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"18",viewBox:"0 0 24 24",width:"18",children:f.jsxRuntimeExports.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})})}):null,x&&f.jsxRuntimeExports.jsx("div",{className:he.twMerge("right-1",$,d),children:x})]}),!y&&u&&h&&b&&f.jsxRuntimeExports.jsx(Kn.LabelError,{text:u})]})});Yn.displayName="Input";var bs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Q=bs.reduce((e,t)=>{const n=re.createSlot(`Primitive.${t}`),r=l.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsxRuntimeExports.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Zn(e,t){e&&an.flushSync(()=>e.dispatchEvent(t))}const Es=Gn.cva(["flex items-center cursor-pointer relative rounded-full p-0.5 px-1 relative overflow-hidden"],{variants:{color:{primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",danger:"bg-danger",default:"bg-default"},size:{sm:"w-10 h-6",md:"w-12 h-7",lg:"w-14 h-8"}},defaultVariants:{color:"primary",size:"md"}}),Jn=({id:e=null,color:t,size:n="md",className:r,disabled:o=!1,label:s,description:i,positionLabel:a="end",required:c,error:d,touched:g,value:m,leftIcon:p,rightIcon:x,thumbIcon:y,onChange:u,...h})=>{const v=C.useId(),b=e||v,[w,R]=C.useState(!1);C.useEffect(()=>{R(m)},[m]);const A=V=>{u(V.target.checked)},N=()=>{o||u(!w)},S=he.twMerge("transition transform bg-white rounded-full shadow-sm flex justify-center items-center",De.clsx(n==="sm"&&"w-4 h-4",n==="md"&&"w-5 h-5",n==="lg"&&"w-6 h-6",n==="sm"&&w&&"translate-x-4",n==="md"&&w&&"translate-x-5",n==="lg"&&w&&"translate-x-6")),H=he.twMerge(De.clsx(!w&&"bg-default-200",o&&"bg-default-100 hover:bg-default-100")),T=he.twMerge("text-gray-500 leading-none",De.clsx({"text-sm":n==="sm"||n==="md","after:content-['*'] after:ml-0.5 after:text-green-500":c,"after:text-gray-400 text-gray-400":o})),F=he.twMerge("text-xs text-gray-500 mt-1",o&&"text-gray-400");return f.jsxRuntimeExports.jsxs("div",{className:he.twMerge(r),children:[f.jsxRuntimeExports.jsxs("div",{className:De.clsx("flex gap-2",i&&s?"items-start":"items-center"),children:[a==="start"&&(s||i)&&f.jsxRuntimeExports.jsxs("div",{onClick:N,className:"cursor-pointer",children:[s&&f.jsxRuntimeExports.jsx("p",{className:T,children:s}),i&&f.jsxRuntimeExports.jsx("p",{className:F,children:i})]}),f.jsxRuntimeExports.jsxs("label",{htmlFor:b,className:ce.cn(Es({size:n,color:t}),H),children:[f.jsxRuntimeExports.jsx("input",{type:"checkbox",id:b,className:"sr-only peer",onChange:A,disabled:o,checked:w,"data-state":w?"checked":"unchecked",...h}),p&&f.jsxRuntimeExports.jsx(Lt.motion.div,{initial:!1,animate:w?{scale:1,opacity:1}:{scale:0,opacity:0},transition:{type:"spring",bounce:0},className:"absolute left-1 top-1/2 -translate-y-1/2 text-neutral-400",children:p}),x&&f.jsxRuntimeExports.jsx(Lt.motion.div,{initial:!1,animate:w?{scale:0,opacity:0}:{scale:1,opacity:1},transition:{type:"spring",bounce:0},className:"absolute right-1 top-1/2 -translate-y-1/2 text-neutral-400",children:x}),f.jsxRuntimeExports.jsx("span",{className:S,children:y&&f.jsxRuntimeExports.jsx(Lt.motion.div,{initial:!1,animate:{scale:1},className:"flex items-center justify-center",children:y})})]}),a==="end"&&(s||i)&&f.jsxRuntimeExports.jsxs("div",{onClick:N,className:"cursor-pointer",children:[s&&f.jsxRuntimeExports.jsx("p",{className:T,children:s}),i&&f.jsxRuntimeExports.jsx("p",{className:F,children:i})]})]}),!o&&d&&g&&f.jsxRuntimeExports.jsx(Kn.LabelError,{text:d})]})};Jn.displayName="Switch";function ne(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function ws(e,t){const n=l.createContext(t),r=s=>{const{children:i,...a}=s,c=l.useMemo(()=>a,Object.values(a));return f.jsxRuntimeExports.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(s){const i=l.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function st(e,t=[]){let n=[];function r(s,i){const a=l.createContext(i),c=n.length;n=[...n,i];const d=m=>{const{scope:p,children:x,...y}=m,u=p?.[e]?.[c]||a,h=l.useMemo(()=>y,Object.values(y));return f.jsxRuntimeExports.jsx(u.Provider,{value:h,children:x})};d.displayName=s+"Provider";function g(m,p){const x=p?.[e]?.[c]||a,y=l.useContext(x);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${s}\``)}return[d,g]}const o=()=>{const s=n.map(i=>l.createContext(i));return function(a){const c=a?.[e]||s;return l.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,Ss(o,...t)]}function Ss(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:c,scopeName:d})=>{const m=c(s)[`__scope${d}`];return{...a,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var de=globalThis?.document?l.useLayoutEffect:()=>{},Cs=l[" useInsertionEffect ".trim().toString()]||de;function ht({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Rs({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const g=l.useRef(e!==void 0);l.useEffect(()=>{const m=g.current;if(m!==a){const p=m?"controlled":"uncontrolled",x=a?"controlled":"uncontrolled"}g.current=a},[a,r])}const d=l.useCallback(g=>{if(a){const m=Ps(g)?g(e):g;m!==e&&i.current?.(m)}else s(g)},[a,e,s,i]);return[c,d]}function Rs({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),s=l.useRef(t);return Cs(()=>{s.current=t},[t]),l.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Ps(e){return typeof e=="function"}function Qn(e){const t=e+"CollectionProvider",[n,r]=st(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=u=>{const{scope:h,children:v}=u,b=C.useRef(null),w=C.useRef(new Map).current;return f.jsxRuntimeExports.jsx(o,{scope:h,itemMap:w,collectionRef:b,children:v})};i.displayName=t;const a=e+"CollectionSlot",c=re.createSlot(a),d=C.forwardRef((u,h)=>{const{scope:v,children:b}=u,w=s(a,v),R=re.useComposedRefs(h,w.collectionRef);return f.jsxRuntimeExports.jsx(c,{ref:R,children:b})});d.displayName=a;const g=e+"CollectionItemSlot",m="data-radix-collection-item",p=re.createSlot(g),x=C.forwardRef((u,h)=>{const{scope:v,children:b,...w}=u,R=C.useRef(null),A=re.useComposedRefs(h,R),N=s(g,v);return C.useEffect(()=>(N.itemMap.set(R,{ref:R,...w}),()=>void N.itemMap.delete(R))),f.jsxRuntimeExports.jsx(p,{[m]:"",ref:A,children:b})});x.displayName=g;function y(u){const h=s(e+"CollectionConsumer",u);return C.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${m}]`));return Array.from(h.itemMap.values()).sort((N,S)=>w.indexOf(N.ref.current)-w.indexOf(S.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:d,ItemSlot:x},y,r]}var js=l.createContext(void 0);function er(e){const t=l.useContext(js);return e||t||"ltr"}function Me(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>t.current?.(...n),[])}function Is(e,t=globalThis?.document){const n=Me(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ns="DismissableLayer",Zt="dismissableLayer.update",As="dismissableLayer.pointerDownOutside",Ds="dismissableLayer.focusOutside",Cn,tr=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wt=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,d=l.useContext(tr),[g,m]=l.useState(null),p=g?.ownerDocument??globalThis?.document,[,x]=l.useState({}),y=re.useComposedRefs(t,S=>m(S)),u=Array.from(d.layers),[h]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=u.indexOf(h),b=g?u.indexOf(g):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,R=b>=v,A=zs(S=>{const H=S.target,T=[...d.branches].some(F=>F.contains(H));!R||T||(o?.(S),i?.(S),S.defaultPrevented||a?.())},p),N=_s(S=>{const H=S.target;[...d.branches].some(F=>F.contains(H))||(s?.(S),i?.(S),S.defaultPrevented||a?.())},p);return Is(S=>{b===d.layers.size-1&&(r?.(S),!S.defaultPrevented&&a&&(S.preventDefault(),a()))},p),l.useEffect(()=>{if(g)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Cn=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(g)),d.layers.add(g),Rn(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Cn)}},[g,p,n,d]),l.useEffect(()=>()=>{g&&(d.layers.delete(g),d.layersWithOutsidePointerEventsDisabled.delete(g),Rn())},[g,d]),l.useEffect(()=>{const S=()=>x({});return document.addEventListener(Zt,S),()=>document.removeEventListener(Zt,S)},[]),f.jsxRuntimeExports.jsx(Q.div,{...c,ref:y,style:{pointerEvents:w?R?"auto":"none":void 0,...e.style},onFocusCapture:ne(e.onFocusCapture,N.onFocusCapture),onBlurCapture:ne(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:ne(e.onPointerDownCapture,A.onPointerDownCapture)})});wt.displayName=Ns;var Ms="DismissableLayerBranch",Ts=l.forwardRef((e,t)=>{const n=l.useContext(tr),r=l.useRef(null),o=re.useComposedRefs(t,r);return l.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),f.jsxRuntimeExports.jsx(Q.div,{...e,ref:o})});Ts.displayName=Ms;function zs(e,t=globalThis?.document){const n=Me(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){nr(As,n,d,{discrete:!0})};const d={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function _s(e,t=globalThis?.document){const n=Me(e),r=l.useRef(!1);return l.useEffect(()=>{const o=s=>{s.target&&!r.current&&nr(Ds,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Rn(){const e=new CustomEvent(Zt);document.dispatchEvent(e)}function nr(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Zn(o,s):o.dispatchEvent(s)}var $t=0;function ln(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Pn()),document.body.insertAdjacentElement("beforeend",e[1]??Pn()),$t++,()=>{$t===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),$t--}},[])}function Pn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ht="focusScope.autoFocusOnMount",Ft="focusScope.autoFocusOnUnmount",jn={bubbles:!1,cancelable:!0},Os="FocusScope",St=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=l.useState(null),d=Me(o),g=Me(s),m=l.useRef(null),p=re.useComposedRefs(t,u=>c(u)),x=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let u=function(w){if(x.paused||!a)return;const R=w.target;a.contains(R)?m.current=R:Ie(m.current,{select:!0})},h=function(w){if(x.paused||!a)return;const R=w.relatedTarget;R!==null&&(a.contains(R)||Ie(m.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const A of w)A.removedNodes.length>0&&Ie(a)};document.addEventListener("focusin",u),document.addEventListener("focusout",h);const b=new MutationObserver(v);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",h),b.disconnect()}}},[r,a,x.paused]),l.useEffect(()=>{if(a){Nn.add(x);const u=document.activeElement;if(!a.contains(u)){const v=new CustomEvent(Ht,jn);a.addEventListener(Ht,d),a.dispatchEvent(v),v.defaultPrevented||(ks(Bs(rr(a)),{select:!0}),document.activeElement===u&&Ie(a))}return()=>{a.removeEventListener(Ht,d),setTimeout(()=>{const v=new CustomEvent(Ft,jn);a.addEventListener(Ft,g),a.dispatchEvent(v),v.defaultPrevented||Ie(u??document.body,{select:!0}),a.removeEventListener(Ft,g),Nn.remove(x)},0)}}},[a,d,g,x]);const y=l.useCallback(u=>{if(!n&&!r||x.paused)return;const h=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,v=document.activeElement;if(h&&v){const b=u.currentTarget,[w,R]=Ls(b);w&&R?!u.shiftKey&&v===R?(u.preventDefault(),n&&Ie(w,{select:!0})):u.shiftKey&&v===w&&(u.preventDefault(),n&&Ie(R,{select:!0})):v===b&&u.preventDefault()}},[n,r,x.paused]);return f.jsxRuntimeExports.jsx(Q.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});St.displayName=Os;function ks(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ie(r,{select:t}),document.activeElement!==n)return}function Ls(e){const t=rr(e),n=In(t,e),r=In(t.reverse(),e);return[n,r]}function rr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function In(e,t){for(const n of e)if(!$s(n,{upTo:t}))return n}function $s(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Hs(e){return e instanceof HTMLInputElement&&"select"in e}function Ie(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Hs(e)&&t&&e.select()}}var Nn=Fs();function Fs(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=An(e,t),e.unshift(t)},remove(t){e=An(e,t),e[0]?.resume()}}}function An(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Bs(e){return e.filter(t=>t.tagName!=="A")}var Ws=l[" useId ".trim().toString()]||(()=>{}),Vs=0;function Le(e){const[t,n]=l.useState(Ws());return de(()=>{n(r=>r??String(Vs++))},[e]),e||(t?`radix-${t}`:"")}var Us="Arrow",or=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return f.jsxRuntimeExports.jsx(Q.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsxRuntimeExports.jsx("polygon",{points:"0,0 30,0 15,10"})})});or.displayName=Us;var Gs=or;function sr(e){const[t,n]=l.useState(void 0);return de(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,d=Array.isArray(c)?c[0]:c;i=d.inlineSize,a=d.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var cn="Popper",[ar,un]=st(cn),[Ks,ir]=ar(cn),lr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return f.jsxRuntimeExports.jsx(Ks,{scope:t,anchor:r,onAnchorChange:o,children:n})};lr.displayName=cn;var cr="PopperAnchor",ur=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=ir(cr,n),i=l.useRef(null),a=re.useComposedRefs(t,i),c=l.useRef(null);return l.useEffect(()=>{const d=c.current;c.current=r?.current||i.current,d!==c.current&&s.onAnchorChange(c.current)}),r?null:f.jsxRuntimeExports.jsx(Q.div,{...o,ref:a})});ur.displayName=cr;var dn="PopperContent",[qs,Xs]=ar(dn),dr=l.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:g=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:x="optimized",onPlaced:y,...u}=e,h=ir(dn,n),[v,b]=l.useState(null),w=re.useComposedRefs(t,E=>b(E)),[R,A]=l.useState(null),N=sr(R),S=N?.width??0,H=N?.height??0,T=r+(s!=="center"?"-"+s:""),F=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},V=Array.isArray(d)?d:[d],_=V.length>0,$={padding:F,boundary:V.filter(Zs),altBoundary:_},{refs:X,floatingStyles:U,placement:W,isPositioned:ee,middlewareData:Z}=je.useFloating({strategy:"fixed",placement:T,whileElementsMounted:(...E)=>hs.autoUpdate(...E,{animationFrame:x==="always"}),elements:{reference:h.anchor},middleware:[je.offset({mainAxis:o+H,alignmentAxis:i}),c&&je.shift({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?je.limitShift():void 0,...$}),c&&je.flip({...$}),je.size({...$,apply:({elements:E,rects:j,availableWidth:L,availableHeight:O})=>{const{width:G,height:q}=j.reference,K=E.floating.style;K.setProperty("--radix-popper-available-width",`${L}px`),K.setProperty("--radix-popper-available-height",`${O}px`),K.setProperty("--radix-popper-anchor-width",`${G}px`),K.setProperty("--radix-popper-anchor-height",`${q}px`)}}),R&&je.arrow({element:R,padding:a}),Js({arrowWidth:S,arrowHeight:H}),p&&je.hide({strategy:"referenceHidden",...$})]}),[Y,fe]=mr(W),ae=Me(y);de(()=>{ee&&ae?.()},[ee,ae]);const ue=Z.arrow?.x,P=Z.arrow?.y,D=Z.arrow?.centerOffset!==0,[z,M]=l.useState();return de(()=>{v&&M(window.getComputedStyle(v).zIndex)},[v]),f.jsxRuntimeExports.jsx("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:ee?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[Z.transformOrigin?.x,Z.transformOrigin?.y].join(" "),...Z.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsxRuntimeExports.jsx(qs,{scope:n,placedSide:Y,onArrowChange:A,arrowX:ue,arrowY:P,shouldHideArrow:D,children:f.jsxRuntimeExports.jsx(Q.div,{"data-side":Y,"data-align":fe,...u,ref:w,style:{...u.style,animation:ee?void 0:"none"}})})})});dr.displayName=dn;var fr="PopperArrow",Ys={top:"bottom",right:"left",bottom:"top",left:"right"},pr=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Xs(fr,r),i=Ys[s.placedSide];return f.jsxRuntimeExports.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:f.jsxRuntimeExports.jsx(Gs,{...o,ref:n,style:{...o.style,display:"block"}})})});pr.displayName=fr;function Zs(e){return e!==null}var Js=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[d,g]=mr(n),m={start:"0%",center:"50%",end:"100%"}[g],p=(o.arrow?.x??0)+a/2,x=(o.arrow?.y??0)+c/2;let y="",u="";return d==="bottom"?(y=i?m:`${p}px`,u=`${-c}px`):d==="top"?(y=i?m:`${p}px`,u=`${r.floating.height+c}px`):d==="right"?(y=`${-c}px`,u=i?m:`${x}px`):d==="left"&&(y=`${r.floating.width+c}px`,u=i?m:`${x}px`),{data:{x:y,y:u}}}});function mr(e){const[t,n="center"]=e.split("-");return[t,n]}var gr=lr,hr=ur,vr=dr,xr=pr,Qs="Portal",Ct=l.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=l.useState(!1);de(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?qn.createPortal(f.jsxRuntimeExports.jsx(Q.div,{...r,ref:t}),i):null});Ct.displayName=Qs;function ea(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var at=e=>{const{present:t,children:n}=e,r=ta(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),s=re.useComposedRefs(r.ref,na(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:s}):null};at.displayName="Presence";function ta(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),s=l.useRef("none"),i=e?"mounted":"unmounted",[a,c]=ea(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=it(r.current);s.current=a==="mounted"?d:"none"},[a]),de(()=>{const d=r.current,g=o.current;if(g!==e){const p=s.current,x=it(d);e?c("MOUNT"):x==="none"||d?.display==="none"?c("UNMOUNT"):c(g&&p!==x?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let d;const g=t.ownerDocument.defaultView??window,m=x=>{const u=it(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&u&&(c("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",d=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=x=>{x.target===t&&(s.current=it(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{g.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:l.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function it(e){return e?.animationName||"none"}function na(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ra=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ve=new WeakMap,lt=new WeakMap,ct={},Bt=0,yr=function(e){return e&&(e.host||yr(e.parentNode))},oa=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=yr(n);return r&&e.contains(r)?r:null}).filter(function(n){return!!n})},sa=function(e,t,n,r){var o=oa(t,Array.isArray(e)?e:[e]);ct[n]||(ct[n]=new WeakMap);var s=ct[n],i=[],a=new Set,c=new Set(o),d=function(m){!m||a.has(m)||(a.add(m),d(m.parentNode))};o.forEach(d);var g=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(p){if(a.has(p))g(p);else try{var x=p.getAttribute(r),y=x!==null&&x!=="false",u=(Ve.get(p)||0)+1,h=(s.get(p)||0)+1;Ve.set(p,u),s.set(p,h),i.push(p),u===1&&y&&lt.set(p,!0),h===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch{}})};return g(t),a.clear(),Bt++,function(){i.forEach(function(m){var p=Ve.get(m)-1,x=s.get(m)-1;Ve.set(m,p),s.set(m,x),p||(lt.has(m)||m.removeAttribute(r),lt.delete(m)),x||m.removeAttribute(n)}),Bt--,Bt||(Ve=new WeakMap,Ve=new WeakMap,lt=new WeakMap,ct={})}},fn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=ra(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),sa(r,o,n,"aria-hidden")):function(){return null}},Ee=function(){return Ee=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ee.apply(this,arguments)};function br(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function aa(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var pt="right-scroll-bar-position",mt="width-before-scroll-bar",ia="with-scroll-bars-hidden",la="--removed-body-scroll-bar-size";function Wt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ca(e,t){var n=C.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var ua=typeof window<"u"?l.useLayoutEffect:l.useEffect,Dn=new WeakMap;function da(e,t){var n=ca(null,function(r){return e.forEach(function(o){return Wt(o,r)})});return ua(function(){var r=Dn.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Wt(a,null)}),s.forEach(function(a){o.has(a)||Wt(a,i)})}Dn.set(n,e)},[e]),n}function fa(e){return e}function pa(e,t){t===void 0&&(t=fa);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var g=i;i=[],g.forEach(s)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(g){i.push(g),d()},filter:function(g){return i=i.filter(g),n}}}};return o}function ma(e){e===void 0&&(e={});var t=pa(null);return t.options=Ee({async:!0,ssr:!1},e),t}var Er=function(e){var t=e.sideCar,n=br(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,Ee({},n))};Er.isSideCarExport=!0;function ga(e,t){return e.useMedium(t),Er}var wr=ma(),Vt=function(){},Rt=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Vt,onWheelCapture:Vt,onTouchMoveCapture:Vt}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,d=e.removeScrollBar,g=e.enabled,m=e.shards,p=e.sideCar,x=e.noRelative,y=e.noIsolation,u=e.inert,h=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,w=e.gapMode,R=br(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=p,N=da([n,t]),S=Ee(Ee({},R),o);return l.createElement(l.Fragment,null,g&&l.createElement(A,{sideCar:wr,removeScrollBar:d,shards:m,noRelative:x,noIsolation:y,inert:u,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:w}),i?l.cloneElement(l.Children.only(a),Ee(Ee({},S),{ref:N})):l.createElement(b,Ee({},S,{className:c,ref:N}),a))});Rt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rt.classNames={fullWidth:mt,zeroRight:pt};var ha=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function va(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ha();return t&&e.setAttribute("nonce",t),e}function xa(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ya(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ba=function(){var e=0,t=null;return{add:function(n){e==0&&(t=va())&&(xa(t,n),ya(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ea=function(){var e=ba();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Sr=function(){var e=Ea(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},wa={left:0,top:0,right:0,gap:0},Ut=function(e){return parseInt(e||"",10)||0},Sa=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ut(n),Ut(r),Ut(o)]},Ca=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wa;var t=Sa(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ra=Sr(),Ye="data-scroll-locked",Pa=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
2
- .`.concat(ia,` {
3
- overflow: hidden `).concat(r,`;
4
- padding-right: `).concat(a,"px ").concat(r,`;
5
- }
6
- body[`).concat(Ye,`] {
7
- overflow: hidden `).concat(r,`;
8
- overscroll-behavior: contain;
9
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
10
- padding-left: `.concat(o,`px;
11
- padding-top: `).concat(s,`px;
12
- padding-right: `).concat(i,`px;
13
- margin-left:0;
14
- margin-top:0;
15
- margin-right: `).concat(a,"px ").concat(r,`;
16
- `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
17
- }
18
-
19
- .`).concat(pt,` {
20
- right: `).concat(a,"px ").concat(r,`;
21
- }
22
-
23
- .`).concat(mt,` {
24
- margin-right: `).concat(a,"px ").concat(r,`;
25
- }
26
-
27
- .`).concat(pt," .").concat(pt,` {
28
- right: 0 `).concat(r,`;
29
- }
30
-
31
- .`).concat(mt," .").concat(mt,` {
32
- margin-right: 0 `).concat(r,`;
33
- }
34
-
35
- body[`).concat(Ye,`] {
36
- `).concat(la,": ").concat(a,`px;
37
- }
38
- `)},Mn=function(){var e=parseInt(document.body.getAttribute(Ye)||"0",10);return isFinite(e)?e:0},ja=function(){l.useEffect(function(){return document.body.setAttribute(Ye,(Mn()+1).toString()),function(){var e=Mn()-1;e<=0?document.body.removeAttribute(Ye):document.body.setAttribute(Ye,e.toString())}},[])},Ia=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ja();var s=l.useMemo(function(){return Ca(o)},[o]);return l.createElement(Ra,{styles:Pa(s,!t,o,n?"":"!important")})},Jt=!1;if(typeof window<"u")try{var ut=Object.defineProperty({},"passive",{get:function(){return Jt=!0,!0}});window.addEventListener("test",ut,ut),window.removeEventListener("test",ut,ut)}catch{Jt=!1}var Ue=Jt?{passive:!1}:!1,Na=function(e){return e.tagName==="TEXTAREA"},Cr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Na(e)&&n[t]==="visible")},Aa=function(e){return Cr(e,"overflowY")},Da=function(e){return Cr(e,"overflowX")},Tn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Rr(e,r);if(o){var s=Pr(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ma=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ta=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Rr=function(e,t){return e==="v"?Aa(t):Da(t)},Pr=function(e,t){return e==="v"?Ma(t):Ta(t)},za=function(e,t){return e==="h"&&t==="rtl"?-1:1},_a=function(e,t,n,r,o){var s=za(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),d=!1,g=i>0,m=0,p=0;do{if(!a)break;var x=Pr(e,a),y=x[0],u=x[1],h=x[2],v=u-h-s*y;(y||v)&&Rr(e,a)&&(m+=v,p+=y);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(g&&Math.abs(m)<1||!g&&Math.abs(p)<1)&&(d=!0),d},dt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},zn=function(e){return[e.deltaX,e.deltaY]},_n=function(e){return e&&"current"in e?e.current:e},Oa=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ka=function(e){return`
39
- .block-interactivity-`.concat(e,` {pointer-events: none;}
40
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},La=0,Ge=[];function $a(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(La++)[0],s=l.useState(Sr)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var u=aa([e.lockRef.current],(e.shards||[]).map(_n),!0).filter(Boolean);return u.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),u.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=l.useCallback(function(u,h){if("touches"in u&&u.touches.length===2||u.type==="wheel"&&u.ctrlKey)return!i.current.allowPinchZoom;var v=dt(u),b=n.current,w="deltaX"in u?u.deltaX:b[0]-v[0],R="deltaY"in u?u.deltaY:b[1]-v[1],A,N=u.target,S=Math.abs(w)>Math.abs(R)?"h":"v";if("touches"in u&&S==="h"&&N.type==="range")return!1;var H=Tn(S,N);if(!H)return!0;if(H?A=S:(A=S==="v"?"h":"v",H=Tn(S,N)),!H)return!1;if(!r.current&&"changedTouches"in u&&(w||R)&&(r.current=A),!A)return!0;var T=r.current||A;return _a(T,h,u,T==="h"?w:R)},[]),c=l.useCallback(function(u){var h=u;if(!(!Ge.length||Ge[Ge.length-1]!==s)){var v="deltaY"in h?zn(h):dt(h),b=t.current.filter(function(A){return A.name===h.type&&(A.target===h.target||h.target===A.shadowParent)&&Oa(A.delta,v)})[0];if(b&&b.should){h.cancelable&&h.preventDefault();return}if(!b){var w=(i.current.shards||[]).map(_n).filter(Boolean).filter(function(A){return A.contains(h.target)}),R=w.length>0?a(h,w[0]):!i.current.noIsolation;R&&h.cancelable&&h.preventDefault()}}},[]),d=l.useCallback(function(u,h,v,b){var w={name:u,delta:h,target:v,should:b,shadowParent:Ha(v)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(R){return R!==w})},1)},[]),g=l.useCallback(function(u){n.current=dt(u),r.current=void 0},[]),m=l.useCallback(function(u){d(u.type,zn(u),u.target,a(u,e.lockRef.current))},[]),p=l.useCallback(function(u){d(u.type,dt(u),u.target,a(u,e.lockRef.current))},[]);l.useEffect(function(){return Ge.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ue),document.addEventListener("touchmove",c,Ue),document.addEventListener("touchstart",g,Ue),function(){Ge=Ge.filter(function(u){return u!==s}),document.removeEventListener("wheel",c,Ue),document.removeEventListener("touchmove",c,Ue),document.removeEventListener("touchstart",g,Ue)}},[]);var x=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(s,{styles:ka(o)}):null,x?l.createElement(Ia,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ha(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Fa=ga(wr,$a);var Pt=l.forwardRef(function(e,t){return l.createElement(Rt,Ee({},e,{ref:t,sideCar:Fa}))});Pt.classNames=Rt.classNames;const Ba=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wa=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),On=e=>{const t=Wa(e);return t.charAt(0).toUpperCase()+t.slice(1)},jr=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Va=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Ua={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ga=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>C.createElement("svg",{ref:c,...Ua,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:jr("lucide",o),...!s&&!Va(a)&&{"aria-hidden":"true"},...a},[...i.map(([d,g])=>C.createElement(d,g)),...Array.isArray(s)?s:[s]]));const jt=(e,t)=>{const n=C.forwardRef(({className:r,...o},s)=>C.createElement(Ga,{ref:s,iconNode:t,className:jr(`lucide-${Ba(On(e))}`,`lucide-${e}`,r),...o}));return n.displayName=On(e),n};const Ka=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ir=jt("check",Ka);const qa=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pn=jt("chevron-down",qa);const Xa=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ya=jt("chevron-up",Xa),It=C.createContext(null);It.displayName="PanelGroupContext";const ie={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},mn=10,$e=C.useLayoutEffect,kn=l.useId,Za=typeof kn=="function"?kn:()=>null;let Ja=0;function gn(e=null){const t=Za(),n=C.useRef(e||t||null);return n.current===null&&(n.current=""+Ja++),e??n.current}function Nr({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:o,forwardedRef:s,id:i,maxSize:a,minSize:c,onCollapse:d,onExpand:g,onResize:m,order:p,style:x,tagName:y="div",...u}){const h=C.useContext(It);if(h===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:v,expandPanel:b,getPanelSize:w,getPanelStyle:R,groupId:A,isPanelCollapsed:N,reevaluatePanelConstraints:S,registerPanel:H,resizePanel:T,unregisterPanel:F}=h,V=gn(i),_=C.useRef({callbacks:{onCollapse:d,onExpand:g,onResize:m},constraints:{collapsedSize:n,collapsible:r,defaultSize:o,maxSize:a,minSize:c},id:V,idIsFromProps:i!==void 0,order:p});C.useRef({didLogMissingDefaultSizeWarning:!1}),$e(()=>{const{callbacks:X,constraints:U}=_.current,W={...U};_.current.id=V,_.current.idIsFromProps=i!==void 0,_.current.order=p,X.onCollapse=d,X.onExpand=g,X.onResize=m,U.collapsedSize=n,U.collapsible=r,U.defaultSize=o,U.maxSize=a,U.minSize=c,(W.collapsedSize!==U.collapsedSize||W.collapsible!==U.collapsible||W.maxSize!==U.maxSize||W.minSize!==U.minSize)&&S(_.current,W)}),$e(()=>{const X=_.current;return H(X),()=>{F(X)}},[p,V,H,F]),C.useImperativeHandle(s,()=>({collapse:()=>{v(_.current)},expand:X=>{b(_.current,X)},getId(){return V},getSize(){return w(_.current)},isCollapsed(){return N(_.current)},isExpanded(){return!N(_.current)},resize:X=>{T(_.current,X)}}),[v,b,w,N,V,T]);const $=R(_.current,o);return C.createElement(y,{...u,children:e,className:t,id:V,style:{...$,...x},[ie.groupId]:A,[ie.panel]:"",[ie.panelCollapsible]:r||void 0,[ie.panelId]:V,[ie.panelSize]:parseFloat(""+$.flexGrow).toFixed(1)})}const Ar=C.forwardRef((e,t)=>C.createElement(Nr,{...e,forwardedRef:t}));Nr.displayName="Panel";Ar.displayName="forwardRef(Panel)";let Qt=null,gt=-1,Ne=null;function Qa(e,t,n){const r=(t&_r)!==0,o=(t&Or)!==0,s=(t&kr)!==0,i=(t&Lr)!==0;if(t){if(r)return s?"se-resize":i?"ne-resize":"e-resize";if(o)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function ei(){Ne!==null&&(document.head.removeChild(Ne),Qt=null,Ne=null,gt=-1)}function Gt(e,t,n){var r,o;const s=Qa(e,t);if(Qt!==s){if(Qt=s,Ne===null&&(Ne=document.createElement("style"),document.head.appendChild(Ne)),gt>=0){var i;(i=Ne.sheet)===null||i===void 0||i.removeRule(gt)}gt=(r=(o=Ne.sheet)===null||o===void 0?void 0:o.insertRule(`*{cursor: ${s} !important;}`))!==null&&r!==void 0?r:-1}}function Dr(e){return e.type==="keydown"}function Mr(e){return e.type.startsWith("pointer")}function Tr(e){return e.type.startsWith("mouse")}function Nt(e){if(Mr(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(Tr(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function ti(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function ni(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function ri(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Hn(e),b:Hn(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;B(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:$n(Ln(n.a)),b:$n(Ln(n.b))};if(o.a===o.b){const s=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)};let a=s.length;for(;a--;){const c=s[a];if(c===i.a)return 1;if(c===i.b)return-1}}return Math.sign(o.a-o.b)}const oi=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function si(e){var t;const n=getComputedStyle((t=zr(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function ai(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||si(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||oi.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Ln(e){let t=e.length;for(;t--;){const n=e[t];if(B(n,"Missing node"),ai(n))return n}return null}function $n(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Hn(e){const t=[];for(;e;)t.push(e),e=zr(e);return t}function zr(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const _r=1,Or=2,kr=4,Lr=8,ii=ti()==="coarse";let xe=[],Ze=!1,Ae=new Map,At=new Map;const rt=new Set;function li(e,t,n,r,o){var s;const{ownerDocument:i}=t,a={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:o},c=(s=Ae.get(i))!==null&&s!==void 0?s:0;return Ae.set(i,c+1),rt.add(a),vt(),function(){var g;At.delete(e),rt.delete(a);const m=(g=Ae.get(i))!==null&&g!==void 0?g:1;if(Ae.set(i,m-1),vt(),m===1&&Ae.delete(i),xe.includes(a)){const p=xe.indexOf(a);p>=0&&xe.splice(p,1),Dt(),o("up",!0,null)}}}function ci(e){const{target:t}=e,{x:n,y:r}=Nt(e);Ze=!0,hn({target:t,x:n,y:r}),vt(),xe.length>0&&(xt("down",e),Dt(),e.preventDefault(),$r(t)||e.stopImmediatePropagation())}function Kt(e){const{x:t,y:n}=Nt(e);if(Ze&&e.buttons===0&&(Ze=!1,xt("up",e)),!Ze){const{target:r}=e;hn({target:r,x:t,y:n})}xt("move",e),Dt(),xe.length>0&&e.preventDefault()}function qt(e){const{target:t}=e,{x:n,y:r}=Nt(e);At.clear(),Ze=!1,xe.length>0&&(e.preventDefault(),$r(t)||e.stopImmediatePropagation()),xt("up",e),hn({target:t,x:n,y:r}),Dt(),vt()}function $r(e){let t=e;for(;t;){if(t.hasAttribute(ie.resizeHandle))return!0;t=t.parentElement}return!1}function hn({target:e,x:t,y:n}){xe.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),rt.forEach(o=>{const{element:s,hitAreaMargins:i}=o,a=s.getBoundingClientRect(),{bottom:c,left:d,right:g,top:m}=a,p=ii?i.coarse:i.fine;if(t>=d-p&&t<=g+p&&n>=m-p&&n<=c+p){if(r!==null&&document.contains(r)&&s!==r&&!s.contains(r)&&!r.contains(s)&&ri(r,s)>0){let y=r,u=!1;for(;y&&!y.contains(s);){if(ni(y.getBoundingClientRect(),a)){u=!0;break}y=y.parentElement}if(u)return}xe.push(o)}})}function Xt(e,t){At.set(e,t)}function Dt(){let e=!1,t=!1;xe.forEach(r=>{const{direction:o}=r;o==="horizontal"?e=!0:t=!0});let n=0;At.forEach(r=>{n|=r}),e&&t?Gt("intersection",n):e?Gt("horizontal",n):t?Gt("vertical",n):ei()}let Yt;function vt(){var e;(e=Yt)===null||e===void 0||e.abort(),Yt=new AbortController;const t={capture:!0,signal:Yt.signal};rt.size&&(Ze?(xe.length>0&&Ae.forEach((n,r)=>{const{body:o}=r;n>0&&(o.addEventListener("contextmenu",qt,t),o.addEventListener("pointerleave",Kt,t),o.addEventListener("pointermove",Kt,t))}),Ae.forEach((n,r)=>{const{body:o}=r;o.addEventListener("pointerup",qt,t),o.addEventListener("pointercancel",qt,t)})):Ae.forEach((n,r)=>{const{body:o}=r;n>0&&(o.addEventListener("pointerdown",ci,t),o.addEventListener("pointermove",Kt,t))}))}function xt(e,t){rt.forEach(n=>{const{setResizeHandlerState:r}=n,o=xe.includes(n);r(e,o,t)})}function ui(){const[e,t]=C.useState(0);return C.useCallback(()=>t(n=>n+1),[])}function B(e,t){if(!e)throw Error(t)}function He(e,t,n=mn){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Ce(e,t,n=mn){return He(e,t,n)===0}function ge(e,t,n){return He(e,t,n)===0}function di(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){const o=e[r],s=t[r];if(!ge(o,s,n))return!1}return!0}function Xe({panelConstraints:e,panelIndex:t,size:n}){const r=e[t];B(r!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:o=0,collapsible:s,maxSize:i=100,minSize:a=0}=r;if(He(n,a)<0)if(s){const c=(o+a)/2;He(n,c)<0?n=o:n=a}else n=a;return n=Math.min(i,n),n=parseFloat(n.toFixed(mn)),n}function et({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:s}){if(ge(e,0))return t;const i=[...t],[a,c]=r;B(a!=null,"Invalid first pivot index"),B(c!=null,"Invalid second pivot index");let d=0;if(s==="keyboard"){{const m=e<0?c:a,p=n[m];B(p,`Panel constraints not found for index ${m}`);const{collapsedSize:x=0,collapsible:y,minSize:u=0}=p;if(y){const h=t[m];if(B(h!=null,`Previous layout not found for panel index ${m}`),ge(h,x)){const v=u-h;He(v,Math.abs(e))>0&&(e=e<0?0-v:v)}}}{const m=e<0?a:c,p=n[m];B(p,`No panel constraints found for index ${m}`);const{collapsedSize:x=0,collapsible:y,minSize:u=0}=p;if(y){const h=t[m];if(B(h!=null,`Previous layout not found for panel index ${m}`),ge(h,u)){const v=h-x;He(v,Math.abs(e))>0&&(e=e<0?0-v:v)}}}}{const m=e<0?1:-1;let p=e<0?c:a,x=0;for(;;){const u=t[p];B(u!=null,`Previous layout not found for panel index ${p}`);const v=Xe({panelConstraints:n,panelIndex:p,size:100})-u;if(x+=v,p+=m,p<0||p>=n.length)break}const y=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-y:y}{let p=e<0?a:c;for(;p>=0&&p<n.length;){const x=Math.abs(e)-Math.abs(d),y=t[p];B(y!=null,`Previous layout not found for panel index ${p}`);const u=y-x,h=Xe({panelConstraints:n,panelIndex:p,size:u});if(!ge(y,h)&&(d+=y-h,i[p]=h,d.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?p--:p++}}if(di(o,i))return o;{const m=e<0?c:a,p=t[m];B(p!=null,`Previous layout not found for panel index ${m}`);const x=p+d,y=Xe({panelConstraints:n,panelIndex:m,size:x});if(i[m]=y,!ge(y,x)){let u=x-y,v=e<0?c:a;for(;v>=0&&v<n.length;){const b=i[v];B(b!=null,`Previous layout not found for panel index ${v}`);const w=b+u,R=Xe({panelConstraints:n,panelIndex:v,size:w});if(ge(b,R)||(u-=R-b,i[v]=R),ge(u,0))break;e>0?v--:v++}}}const g=i.reduce((m,p)=>p+m,0);return ge(g,100)?i:o}function fi({layout:e,panelsArray:t,pivotIndices:n}){let r=0,o=100,s=0,i=0;const a=n[0];B(a!=null,"No pivot index found"),t.forEach((m,p)=>{const{constraints:x}=m,{maxSize:y=100,minSize:u=0}=x;p===a?(r=u,o=y):(s+=u,i+=y)});const c=Math.min(o,100-s),d=Math.max(r,100-i),g=e[a];return{valueMax:c,valueMin:d,valueNow:g}}function ot(e,t=document){return Array.from(t.querySelectorAll(`[${ie.resizeHandleId}][data-panel-group-id="${e}"]`))}function Hr(e,t,n=document){const o=ot(e,n).findIndex(s=>s.getAttribute(ie.resizeHandleId)===t);return o??null}function Fr(e,t,n){const r=Hr(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function pi(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function Br(e,t=document){if(pi(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function Mt(e,t=document){const n=t.querySelector(`[${ie.resizeHandleId}="${e}"]`);return n||null}function mi(e,t,n,r=document){var o,s,i,a;const c=Mt(t,r),d=ot(e,r),g=c?d.indexOf(c):-1,m=(o=(s=n[g])===null||s===void 0?void 0:s.id)!==null&&o!==void 0?o:null,p=(i=(a=n[g+1])===null||a===void 0?void 0:a.id)!==null&&i!==void 0?i:null;return[m,p]}function gi({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:o,panelGroupElement:s,setLayout:i}){C.useRef({didWarnAboutMissingResizeHandle:!1}),$e(()=>{if(!s)return;const a=ot(n,s);for(let c=0;c<o.length-1;c++){const{valueMax:d,valueMin:g,valueNow:m}=fi({layout:r,panelsArray:o,pivotIndices:[c,c+1]}),p=a[c];if(p!=null){const x=o[c];B(x,`No panel data found for index "${c}"`),p.setAttribute("aria-controls",x.id),p.setAttribute("aria-valuemax",""+Math.round(d)),p.setAttribute("aria-valuemin",""+Math.round(g)),p.setAttribute("aria-valuenow",m!=null?""+Math.round(m):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,o,s]),C.useEffect(()=>{if(!s)return;const a=t.current;B(a,"Eager values not found");const{panelDataArray:c}=a,d=Br(n,s);B(d!=null,`No group found for id "${n}"`);const g=ot(n,s);B(g,`No resize handles found for group id "${n}"`);const m=g.map(p=>{const x=p.getAttribute(ie.resizeHandleId);B(x,"Resize handle element has no handle id attribute");const[y,u]=mi(n,x,c,s);if(y==null||u==null)return()=>{};const h=v=>{if(!v.defaultPrevented)switch(v.key){case"Enter":{v.preventDefault();const b=c.findIndex(w=>w.id===y);if(b>=0){const w=c[b];B(w,`No panel data found for index ${b}`);const R=r[b],{collapsedSize:A=0,collapsible:N,minSize:S=0}=w.constraints;if(R!=null&&N){const H=et({delta:ge(R,A)?S-A:A-R,initialLayout:r,panelConstraints:c.map(T=>T.constraints),pivotIndices:Fr(n,x,s),prevLayout:r,trigger:"keyboard"});r!==H&&i(H)}}break}}};return p.addEventListener("keydown",h),()=>{p.removeEventListener("keydown",h)}});return()=>{m.forEach(p=>p())}},[s,e,t,n,r,o,i])}function Fn(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Wr(e,t){const n=e==="horizontal",{x:r,y:o}=Nt(t);return n?r:o}function hi(e,t,n,r,o){const s=n==="horizontal",i=Mt(t,o);B(i,`No resize handle element found for id "${t}"`);const a=i.getAttribute(ie.groupId);B(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const d=Wr(n,e),g=Br(a,o);B(g,`No group element found for id "${a}"`);const m=g.getBoundingClientRect(),p=s?m.width:m.height;return(d-c)/p*100}function vi(e,t,n,r,o,s){if(Dr(e)){const i=n==="horizontal";let a=0;e.shiftKey?a=100:o!=null?a=o:a=10;let c=0;switch(e.key){case"ArrowDown":c=i?0:a;break;case"ArrowLeft":c=i?-a:0;break;case"ArrowRight":c=i?a:0;break;case"ArrowUp":c=i?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return r==null?0:hi(e,t,n,r,s)}function xi({panelDataArray:e}){const t=Array(e.length),n=e.map(s=>s.constraints);let r=0,o=100;for(let s=0;s<e.length;s++){const i=n[s];B(i,`Panel constraints not found for index ${s}`);const{defaultSize:a}=i;a!=null&&(r++,t[s]=a,o-=a)}for(let s=0;s<e.length;s++){const i=n[s];B(i,`Panel constraints not found for index ${s}`);const{defaultSize:a}=i;if(a!=null)continue;const c=e.length-r,d=o/c;r++,t[s]=d,o-=d}return t}function Ke(e,t,n){t.forEach((r,o)=>{const s=e[o];B(s,`Panel data not found for index ${o}`);const{callbacks:i,constraints:a,id:c}=s,{collapsedSize:d=0,collapsible:g}=a,m=n[c];if(m==null||r!==m){n[c]=r;const{onCollapse:p,onExpand:x,onResize:y}=i;y&&y(r,m),g&&(p||x)&&(x&&(m==null||Ce(m,d))&&!Ce(r,d)&&x(),p&&(m==null||!Ce(m,d))&&Ce(r,d)&&p())}})}function ft(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function yi({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:o,precision:s=3}){const i=n[o];let a;return i==null?a=e!=null?e.toPrecision(s):"1":r.length===1?a="1":a=i.toPrecision(s),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function bi(e,t=10){let n=null;return(...o)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...o)},t)}}function Bn(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch{e.getItem=()=>null,e.setItem=()=>{}}}function Vr(e){return`react-resizable-panels:${e}`}function Ur(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:o,order:s}=t;return o?r:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function Gr(e,t){try{const n=Vr(e),r=t.getItem(n);if(r){const o=JSON.parse(r);if(typeof o=="object"&&o!=null)return o}}catch{}return null}function Ei(e,t,n){var r,o;const s=(r=Gr(e,n))!==null&&r!==void 0?r:{},i=Ur(t);return(o=s[i])!==null&&o!==void 0?o:null}function wi(e,t,n,r,o){var s;const i=Vr(e),a=Ur(t),c=(s=Gr(e,o))!==null&&s!==void 0?s:{};c[a]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{o.setItem(i,JSON.stringify(c))}catch{}}function Wn({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((s,i)=>s+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!ge(r,100)&&n.length>0)for(let s=0;s<t.length;s++){const i=n[s];B(i!=null,`No layout data found for index ${s}`);const a=100/r*i;n[s]=a}let o=0;for(let s=0;s<t.length;s++){const i=n[s];B(i!=null,`No layout data found for index ${s}`);const a=Xe({panelConstraints:t,panelIndex:s,size:i});i!=a&&(o+=i-a,n[s]=a)}if(!ge(o,0))for(let s=0;s<t.length;s++){const i=n[s];B(i!=null,`No layout data found for index ${s}`);const a=i+o,c=Xe({panelConstraints:t,panelIndex:s,size:a});if(i!==c&&(o-=c-i,n[s]=c,ge(o,0)))break}return n}const Si=100,tt={getItem:e=>(Bn(tt),tt.getItem(e)),setItem:(e,t)=>{Bn(tt),tt.setItem(e,t)}},Vn={};function Kr({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:o,id:s=null,onLayout:i=null,keyboardResizeBy:a=null,storage:c=tt,style:d,tagName:g="div",...m}){const p=gn(s),x=C.useRef(null),[y,u]=C.useState(null),[h,v]=C.useState([]),b=ui(),w=C.useRef({}),R=C.useRef(new Map),A=C.useRef(0),N=C.useRef({autoSaveId:e,direction:r,dragState:y,id:p,keyboardResizeBy:a,onLayout:i,storage:c}),S=C.useRef({layout:h,panelDataArray:[],panelDataArrayChanged:!1});C.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),C.useImperativeHandle(o,()=>({getId:()=>N.current.id,getLayout:()=>{const{layout:P}=S.current;return P},setLayout:P=>{const{onLayout:D}=N.current,{layout:z,panelDataArray:M}=S.current,E=Wn({layout:P,panelConstraints:M.map(j=>j.constraints)});Fn(z,E)||(v(E),S.current.layout=E,D&&D(E),Ke(M,E,w.current))}}),[]),$e(()=>{N.current.autoSaveId=e,N.current.direction=r,N.current.dragState=y,N.current.id=p,N.current.onLayout=i,N.current.storage=c}),gi({committedValuesRef:N,eagerValuesRef:S,groupId:p,layout:h,panelDataArray:S.current.panelDataArray,setLayout:v,panelGroupElement:x.current}),C.useEffect(()=>{const{panelDataArray:P}=S.current;if(e){if(h.length===0||h.length!==P.length)return;let D=Vn[e];D==null&&(D=bi(wi,Si),Vn[e]=D);const z=[...P],M=new Map(R.current);D(e,z,M,h,c)}},[e,h,c]),C.useEffect(()=>{});const H=C.useCallback(P=>{const{onLayout:D}=N.current,{layout:z,panelDataArray:M}=S.current;if(P.constraints.collapsible){const E=M.map(G=>G.constraints),{collapsedSize:j=0,panelSize:L,pivotIndices:O}=ke(M,P,z);if(B(L!=null,`Panel size not found for panel "${P.id}"`),!Ce(L,j)){R.current.set(P.id,L);const q=qe(M,P)===M.length-1?L-j:j-L,K=et({delta:q,initialLayout:z,panelConstraints:E,pivotIndices:O,prevLayout:z,trigger:"imperative-api"});ft(z,K)||(v(K),S.current.layout=K,D&&D(K),Ke(M,K,w.current))}}},[]),T=C.useCallback((P,D)=>{const{onLayout:z}=N.current,{layout:M,panelDataArray:E}=S.current;if(P.constraints.collapsible){const j=E.map(I=>I.constraints),{collapsedSize:L=0,panelSize:O=0,minSize:G=0,pivotIndices:q}=ke(E,P,M),K=D??G;if(Ce(O,L)){const I=R.current.get(P.id),k=I!=null&&I>=K?I:K,le=qe(E,P)===E.length-1?O-k:k-O,J=et({delta:le,initialLayout:M,panelConstraints:j,pivotIndices:q,prevLayout:M,trigger:"imperative-api"});ft(M,J)||(v(J),S.current.layout=J,z&&z(J),Ke(E,J,w.current))}}},[]),F=C.useCallback(P=>{const{layout:D,panelDataArray:z}=S.current,{panelSize:M}=ke(z,P,D);return B(M!=null,`Panel size not found for panel "${P.id}"`),M},[]),V=C.useCallback((P,D)=>{const{panelDataArray:z}=S.current,M=qe(z,P);return yi({defaultSize:D,dragState:y,layout:h,panelData:z,panelIndex:M})},[y,h]),_=C.useCallback(P=>{const{layout:D,panelDataArray:z}=S.current,{collapsedSize:M=0,collapsible:E,panelSize:j}=ke(z,P,D);return B(j!=null,`Panel size not found for panel "${P.id}"`),E===!0&&Ce(j,M)},[]),$=C.useCallback(P=>{const{layout:D,panelDataArray:z}=S.current,{collapsedSize:M=0,collapsible:E,panelSize:j}=ke(z,P,D);return B(j!=null,`Panel size not found for panel "${P.id}"`),!E||He(j,M)>0},[]),X=C.useCallback(P=>{const{panelDataArray:D}=S.current;D.push(P),D.sort((z,M)=>{const E=z.order,j=M.order;return E==null&&j==null?0:E==null?-1:j==null?1:E-j}),S.current.panelDataArrayChanged=!0,b()},[b]);$e(()=>{if(S.current.panelDataArrayChanged){S.current.panelDataArrayChanged=!1;const{autoSaveId:P,onLayout:D,storage:z}=N.current,{layout:M,panelDataArray:E}=S.current;let j=null;if(P){const O=Ei(P,E,z);O&&(R.current=new Map(Object.entries(O.expandToSizes)),j=O.layout)}j==null&&(j=xi({panelDataArray:E}));const L=Wn({layout:j,panelConstraints:E.map(O=>O.constraints)});Fn(M,L)||(v(L),S.current.layout=L,D&&D(L),Ke(E,L,w.current))}}),$e(()=>{const P=S.current;return()=>{P.layout=[]}},[]);const U=C.useCallback(P=>{let D=!1;const z=x.current;return z&&window.getComputedStyle(z,null).getPropertyValue("direction")==="rtl"&&(D=!0),function(E){E.preventDefault();const j=x.current;if(!j)return()=>null;const{direction:L,dragState:O,id:G,keyboardResizeBy:q,onLayout:K}=N.current,{layout:I,panelDataArray:k}=S.current,{initialLayout:oe}=O??{},le=Fr(G,P,j);let J=vi(E,P,L,O,q,j);const te=L==="horizontal";te&&D&&(J=-J);const pe=k.map(we=>we.constraints),be=et({delta:J,initialLayout:oe??I,panelConstraints:pe,pivotIndices:le,prevLayout:I,trigger:Dr(E)?"keyboard":"mouse-or-touch"}),me=!ft(I,be);(Mr(E)||Tr(E))&&A.current!=J&&(A.current=J,!me&&J!==0?te?Xt(P,J<0?_r:Or):Xt(P,J<0?kr:Lr):Xt(P,0)),me&&(v(be),S.current.layout=be,K&&K(be),Ke(k,be,w.current))}},[]),W=C.useCallback((P,D)=>{const{onLayout:z}=N.current,{layout:M,panelDataArray:E}=S.current,j=E.map(I=>I.constraints),{panelSize:L,pivotIndices:O}=ke(E,P,M);B(L!=null,`Panel size not found for panel "${P.id}"`);const q=qe(E,P)===E.length-1?L-D:D-L,K=et({delta:q,initialLayout:M,panelConstraints:j,pivotIndices:O,prevLayout:M,trigger:"imperative-api"});ft(M,K)||(v(K),S.current.layout=K,z&&z(K),Ke(E,K,w.current))},[]),ee=C.useCallback((P,D)=>{const{layout:z,panelDataArray:M}=S.current,{collapsedSize:E=0,collapsible:j}=D,{collapsedSize:L=0,collapsible:O,maxSize:G=100,minSize:q=0}=P.constraints,{panelSize:K}=ke(M,P,z);K!=null&&(j&&O&&Ce(K,E)?Ce(E,L)||W(P,L):K<q?W(P,q):K>G&&W(P,G))},[W]),Z=C.useCallback((P,D)=>{const{direction:z}=N.current,{layout:M}=S.current;if(!x.current)return;const E=Mt(P,x.current);B(E,`Drag handle element not found for id "${P}"`);const j=Wr(z,D);u({dragHandleId:P,dragHandleRect:E.getBoundingClientRect(),initialCursorPosition:j,initialLayout:M})},[]),Y=C.useCallback(()=>{u(null)},[]),fe=C.useCallback(P=>{const{panelDataArray:D}=S.current,z=qe(D,P);z>=0&&(D.splice(z,1),delete w.current[P.id],S.current.panelDataArrayChanged=!0,b())},[b]),ae=C.useMemo(()=>({collapsePanel:H,direction:r,dragState:y,expandPanel:T,getPanelSize:F,getPanelStyle:V,groupId:p,isPanelCollapsed:_,isPanelExpanded:$,reevaluatePanelConstraints:ee,registerPanel:X,registerResizeHandle:U,resizePanel:W,startDragging:Z,stopDragging:Y,unregisterPanel:fe,panelGroupElement:x.current}),[H,y,r,T,F,V,p,_,$,ee,X,U,W,Z,Y,fe]),ue={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return C.createElement(It.Provider,{value:ae},C.createElement(g,{...m,children:t,className:n,id:s,ref:x,style:{...ue,...d},[ie.group]:"",[ie.groupDirection]:r,[ie.groupId]:p}))}const qr=C.forwardRef((e,t)=>C.createElement(Kr,{...e,forwardedRef:t}));Kr.displayName="PanelGroup";qr.displayName="forwardRef(PanelGroup)";function qe(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function ke(e,t,n){const r=qe(e,t),s=r===e.length-1?[r-1,r]:[r,r+1],i=n[r];return{...t.constraints,panelSize:i,pivotIndices:s}}function Ci({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){C.useEffect(()=>{if(e||n==null||r==null)return;const o=Mt(t,r);if(o==null)return;const s=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{i.preventDefault(),n(i);break}case"F6":{i.preventDefault();const a=o.getAttribute(ie.groupId);B(a,`No group element found for id "${a}"`);const c=ot(a,r),d=Hr(a,t,r);B(d!==null,`No resize element found for id "${t}"`);const g=i.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[g].focus();break}}};return o.addEventListener("keydown",s),()=>{o.removeEventListener("keydown",s)}},[r,e,t,n])}function Xr({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:o,onBlur:s,onClick:i,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:g,style:m={},tabIndex:p=0,tagName:x="div",...y}){var u,h;const v=C.useRef(null),b=C.useRef({onClick:i,onDragging:a,onPointerDown:d,onPointerUp:g});C.useEffect(()=>{b.current.onClick=i,b.current.onDragging=a,b.current.onPointerDown=d,b.current.onPointerUp=g});const w=C.useContext(It);if(w===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:R,groupId:A,registerResizeHandle:N,startDragging:S,stopDragging:H,panelGroupElement:T}=w,F=gn(o),[V,_]=C.useState("inactive"),[$,X]=C.useState(!1),[U,W]=C.useState(null),ee=C.useRef({state:V});$e(()=>{ee.current.state=V}),C.useEffect(()=>{if(n)W(null);else{const ae=N(F);W(()=>ae)}},[n,F,N]);const Z=(u=r?.coarse)!==null&&u!==void 0?u:15,Y=(h=r?.fine)!==null&&h!==void 0?h:5;C.useEffect(()=>{if(n||U==null)return;const ae=v.current;B(ae,"Element ref not attached");let ue=!1;return li(F,ae,R,{coarse:Z,fine:Y},(D,z,M)=>{if(!z){_("inactive");return}switch(D){case"down":{_("drag"),ue=!1,B(M,'Expected event to be defined for "down" action'),S(F,M);const{onDragging:E,onPointerDown:j}=b.current;E?.(!0),j?.();break}case"move":{const{state:E}=ee.current;ue=!0,E!=="drag"&&_("hover"),B(M,'Expected event to be defined for "move" action'),U(M);break}case"up":{_("hover"),H();const{onClick:E,onDragging:j,onPointerUp:L}=b.current;j?.(!1),L?.(),ue||E?.();break}}})},[Z,R,n,Y,N,F,U,S,H]),Ci({disabled:n,handleId:F,resizeHandler:U,panelGroupElement:T});const fe={touchAction:"none",userSelect:"none"};return C.createElement(x,{...y,children:e,className:t,id:o,onBlur:()=>{X(!1),s?.()},onFocus:()=>{X(!0),c?.()},ref:v,role:"separator",style:{...fe,...m},tabIndex:p,[ie.groupDirection]:R,[ie.groupId]:A,[ie.resizeHandle]:"",[ie.resizeHandleActive]:V==="drag"?"pointer":$?"keyboard":void 0,[ie.resizeHandleEnabled]:!n,[ie.resizeHandleId]:F,[ie.resizeHandleState]:V})}Xr.displayName="PanelResizeHandle";var Tt="Dialog",[Yr,Ri]=st(Tt),[Pi,ye]=Yr(Tt),Zr=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=l.useRef(null),c=l.useRef(null),[d,g]=ht({prop:r,defaultProp:o??!1,onChange:s,caller:Tt});return f.jsxRuntimeExports.jsx(Pi,{scope:t,triggerRef:a,contentRef:c,contentId:Le(),titleId:Le(),descriptionId:Le(),open:d,onOpenChange:g,onOpenToggle:l.useCallback(()=>g(m=>!m),[g]),modal:i,children:n})};Zr.displayName=Tt;var Jr="DialogTrigger",Qr=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(Jr,n),s=re.useComposedRefs(t,o.triggerRef);return f.jsxRuntimeExports.jsx(Q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":yn(o.open),...r,ref:s,onClick:ne(e.onClick,o.onOpenToggle)})});Qr.displayName=Jr;var vn="DialogPortal",[ji,eo]=Yr(vn,{forceMount:void 0}),to=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=ye(vn,t);return f.jsxRuntimeExports.jsx(ji,{scope:t,forceMount:n,children:l.Children.map(r,i=>f.jsxRuntimeExports.jsx(at,{present:n||s.open,children:f.jsxRuntimeExports.jsx(Ct,{asChild:!0,container:o,children:i})}))})};to.displayName=vn;var yt="DialogOverlay",no=l.forwardRef((e,t)=>{const n=eo(yt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ye(yt,e.__scopeDialog);return s.modal?f.jsxRuntimeExports.jsx(at,{present:r||s.open,children:f.jsxRuntimeExports.jsx(Ni,{...o,ref:t})}):null});no.displayName=yt;var Ii=re.createSlot("DialogOverlay.RemoveScroll"),Ni=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(yt,n);return f.jsxRuntimeExports.jsx(Pt,{as:Ii,allowPinchZoom:!0,shards:[o.contentRef],children:f.jsxRuntimeExports.jsx(Q.div,{"data-state":yn(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Fe="DialogContent",ro=l.forwardRef((e,t)=>{const n=eo(Fe,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ye(Fe,e.__scopeDialog);return f.jsxRuntimeExports.jsx(at,{present:r||s.open,children:s.modal?f.jsxRuntimeExports.jsx(Ai,{...o,ref:t}):f.jsxRuntimeExports.jsx(Di,{...o,ref:t})})});ro.displayName=Fe;var Ai=l.forwardRef((e,t)=>{const n=ye(Fe,e.__scopeDialog),r=l.useRef(null),o=re.useComposedRefs(t,n.contentRef,r);return l.useEffect(()=>{const s=r.current;if(s)return fn(s)},[]),f.jsxRuntimeExports.jsx(oo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ne(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:ne(e.onFocusOutside,s=>s.preventDefault())})}),Di=l.forwardRef((e,t)=>{const n=ye(Fe,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return f.jsxRuntimeExports.jsx(oo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),oo=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=ye(Fe,n),c=l.useRef(null),d=re.useComposedRefs(t,c);return ln(),f.jsxRuntimeExports.jsxs(f.jsxRuntimeExports.Fragment,{children:[f.jsxRuntimeExports.jsx(St,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:f.jsxRuntimeExports.jsx(wt,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":yn(a.open),...i,ref:d,onDismiss:()=>a.onOpenChange(!1)})}),f.jsxRuntimeExports.jsxs(f.jsxRuntimeExports.Fragment,{children:[f.jsxRuntimeExports.jsx(Ti,{titleId:a.titleId}),f.jsxRuntimeExports.jsx(_i,{contentRef:c,descriptionId:a.descriptionId})]})]})}),xn="DialogTitle",so=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(xn,n);return f.jsxRuntimeExports.jsx(Q.h2,{id:o.titleId,...r,ref:t})});so.displayName=xn;var ao="DialogDescription",io=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(ao,n);return f.jsxRuntimeExports.jsx(Q.p,{id:o.descriptionId,...r,ref:t})});io.displayName=ao;var lo="DialogClose",co=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ye(lo,n);return f.jsxRuntimeExports.jsx(Q.button,{type:"button",...r,ref:t,onClick:ne(e.onClick,()=>o.onOpenChange(!1))})});co.displayName=lo;function yn(e){return e?"open":"closed"}var uo="DialogTitleWarning",[Mi,fo]=ws(uo,{contentName:Fe,titleName:xn,docsSlug:"dialog"}),Ti=({titleId:e})=>{const t=fo(uo),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
-
43
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
-
45
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{if(e){const r=document.getElementById(e)}},[n,e]),null},zi="DialogDescriptionWarning",_i=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fo(zi).contentName}}.`;return l.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");if(t&&o){const s=document.getElementById(t)}},[r,e,t]),null},po=Zr,mo=Qr,go=to,ho=no,vo=ro,xo=so,yo=io,bn=co;function Oi({...e}){return f.jsxRuntimeExports.jsx(po,{"data-slot":"dialog",...e})}function ki({...e}){return f.jsxRuntimeExports.jsx(mo,{"data-slot":"dialog-trigger",...e})}function bo({...e}){return f.jsxRuntimeExports.jsx(go,{"data-slot":"dialog-portal",...e})}function Li({...e}){return f.jsxRuntimeExports.jsx(bn,{"data-slot":"dialog-close",...e})}function Eo({className:e,backdrop:t,...n}){let r="";switch(t){case"transparent":r="bg-transparent";break;case"opaque":r="bg-black/50";break;case"blur":r="backdrop-blur-md backdrop-saturate-150 bg-overlay/30";break}return f.jsxRuntimeExports.jsx(ho,{"data-slot":"dialog-overlay",className:ce.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",r,e),...n})}const $i=l.forwardRef(({className:e,children:t,showCloseButton:n=!0,disabled:r=!1,backdrop:o="opaque",...s},i)=>f.jsxRuntimeExports.jsx(gs.AnimatePresence,{children:f.jsxRuntimeExports.jsxs(bo,{"data-slot":"dialog-portal",children:[f.jsxRuntimeExports.jsx(Eo,{backdrop:o}),f.jsxRuntimeExports.jsxs(vo,{"data-slot":"dialog-content",ref:i,className:ce.cn("bg-content1 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg p-6 shadow-lg duration-200 sm:max-w-lg",e),...s,children:[t,n&&f.jsxRuntimeExports.jsx(bn,{"data-slot":"dialog-close",asChild:!0,className:"absolute top-3 right-4 disabled:pointer-events-none",children:f.jsxRuntimeExports.jsx("div",{children:f.jsxRuntimeExports.jsxs(ms.Button,{isIconOnly:!0,variant:"light",radius:"full","aria-label":"Close",disabled:r,className:"p-0 w-[36px] h-[36px] min-w-auto bg-default-100 hover:bg-default-200 text-default-500 hover:text-default-600 dark:bg-default-100 dark:hover:bg-default-200 dark:text-default-500 dark:hover:text-default-600 disabled:opacity-50 disabled:pointer-events-none",children:[f.jsxRuntimeExports.jsxs("svg",{width:"20",height:"20",fill:"currentColor",role:"img","aria-hidden":"true",children:[f.jsxRuntimeExports.jsx("path",{fill:"none",d:"M0 0h21v21H0z"}),f.jsxRuntimeExports.jsx("path",{d:"m12.12 10 4.07-4.06a1.5 1.5 0 1 0-2.11-2.12L10 7.88 5.94 3.81a1.5 1.5 0 1 0-2.12 2.12L7.88 10l-4.07 4.06a1.5 1.5 0 0 0 0 2.12 1.51 1.51 0 0 0 2.13 0L10 12.12l4.06 4.07a1.45 1.45 0 0 0 1.06.44 1.5 1.5 0 0 0 1.06-2.56Z"})]}),f.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})})})]})]})}));function Hi({className:e,...t}){return f.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-header",className:ce.cn("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Fi({className:e,...t}){return f.jsxRuntimeExports.jsx("div",{"data-slot":"dialog-footer",className:ce.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Bi({className:e,...t}){return f.jsxRuntimeExports.jsx(xo,{"data-slot":"dialog-title",className:ce.cn("text-lg leading-none font-semibold",e),...t})}function Wi({className:e,...t}){return f.jsxRuntimeExports.jsx(yo,{"data-slot":"dialog-description",className:ce.cn("text-muted-foreground text-sm",e),...t})}function wo(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var So=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Vi="VisuallyHidden",Co=l.forwardRef((e,t)=>f.jsxRuntimeExports.jsx(Q.span,{...e,ref:t,style:{...So,...e.style}}));Co.displayName=Vi;var Ui=Co;function en(e,[t,n]){return Math.min(n,Math.max(t,e))}var Gi=[" ","Enter","ArrowUp","ArrowDown"],Ki=[" ","Enter"],Be="Select",[zt,_t,qi]=Qn(Be),[Je,ql]=st(Be,[qi,un]),Ot=un(),[Xi,Te]=Je(Be),[Yi,Zi]=Je(Be),Ro=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:d,name:g,autoComplete:m,disabled:p,required:x,form:y}=e,u=Ot(t),[h,v]=l.useState(null),[b,w]=l.useState(null),[R,A]=l.useState(!1),N=er(d),[S,H]=ht({prop:r,defaultProp:o??!1,onChange:s,caller:Be}),[T,F]=ht({prop:i,defaultProp:a,onChange:c,caller:Be}),V=l.useRef(null),_=h?y||!!h.closest("form"):!0,[$,X]=l.useState(new Set),U=Array.from($).map(W=>W.props.value).join(";");return f.jsxRuntimeExports.jsx(gr,{...u,children:f.jsxRuntimeExports.jsxs(Xi,{required:x,scope:t,trigger:h,onTriggerChange:v,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:R,onValueNodeHasChildrenChange:A,contentId:Le(),value:T,onValueChange:F,open:S,onOpenChange:H,dir:N,triggerPointerDownPosRef:V,disabled:p,children:[f.jsxRuntimeExports.jsx(zt.Provider,{scope:t,children:f.jsxRuntimeExports.jsx(Yi,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(W=>{X(ee=>new Set(ee).add(W))},[]),onNativeOptionRemove:l.useCallback(W=>{X(ee=>{const Z=new Set(ee);return Z.delete(W),Z})},[]),children:n})}),_?f.jsxRuntimeExports.jsxs(Yo,{"aria-hidden":!0,required:x,tabIndex:-1,name:g,autoComplete:m,value:T,onChange:W=>F(W.target.value),disabled:p,form:y,children:[T===void 0?f.jsxRuntimeExports.jsx("option",{value:""}):null,Array.from($)]},U):null]})})};Ro.displayName=Be;var Po="SelectTrigger",jo=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=Ot(n),i=Te(Po,n),a=i.disabled||r,c=re.useComposedRefs(t,i.onTriggerChange),d=_t(n),g=l.useRef("touch"),[m,p,x]=Jo(u=>{const h=d().filter(w=>!w.disabled),v=h.find(w=>w.value===i.value),b=Qo(h,u,v);b!==void 0&&i.onValueChange(b.value)}),y=u=>{a||(i.onOpenChange(!0),x()),u&&(i.triggerPointerDownPosRef.current={x:Math.round(u.pageX),y:Math.round(u.pageY)})};return f.jsxRuntimeExports.jsx(hr,{asChild:!0,...s,children:f.jsxRuntimeExports.jsx(Q.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Zo(i.value)?"":void 0,...o,ref:c,onClick:ne(o.onClick,u=>{u.currentTarget.focus(),g.current!=="mouse"&&y(u)}),onPointerDown:ne(o.onPointerDown,u=>{g.current=u.pointerType;const h=u.target;h.hasPointerCapture(u.pointerId)&&h.releasePointerCapture(u.pointerId),u.button===0&&u.ctrlKey===!1&&u.pointerType==="mouse"&&(y(u),u.preventDefault())}),onKeyDown:ne(o.onKeyDown,u=>{const h=m.current!=="";!(u.ctrlKey||u.altKey||u.metaKey)&&u.key.length===1&&p(u.key),!(h&&u.key===" ")&&Gi.includes(u.key)&&(y(),u.preventDefault())})})})});jo.displayName=Po;var Io="SelectValue",No=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=Te(Io,n),{onValueNodeHasChildrenChange:d}=c,g=s!==void 0,m=re.useComposedRefs(t,c.onValueNodeChange);return de(()=>{d(g)},[d,g]),f.jsxRuntimeExports.jsx(Q.span,{...a,ref:m,style:{pointerEvents:"none"},children:Zo(c.value)?f.jsxRuntimeExports.jsx(f.jsxRuntimeExports.Fragment,{children:i}):s})});No.displayName=Io;var Ji="SelectIcon",Ao=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return f.jsxRuntimeExports.jsx(Q.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Ao.displayName=Ji;var Qi="SelectPortal",Do=e=>f.jsxRuntimeExports.jsx(Ct,{asChild:!0,...e});Do.displayName=Qi;var We="SelectContent",Mo=l.forwardRef((e,t)=>{const n=Te(We,e.__scopeSelect),[r,o]=l.useState();if(de(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?an.createPortal(f.jsxRuntimeExports.jsx(To,{scope:e.__scopeSelect,children:f.jsxRuntimeExports.jsx(zt.Slot,{scope:e.__scopeSelect,children:f.jsxRuntimeExports.jsx("div",{children:e.children})})}),s):null}return f.jsxRuntimeExports.jsx(zo,{...e,ref:t})});Mo.displayName=We;var ve=10,[To,ze]=Je(We),el="SelectContentImpl",tl=re.createSlot("SelectContent.RemoveScroll"),zo=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:d,alignOffset:g,arrowPadding:m,collisionBoundary:p,collisionPadding:x,sticky:y,hideWhenDetached:u,avoidCollisions:h,...v}=e,b=Te(We,n),[w,R]=l.useState(null),[A,N]=l.useState(null),S=re.useComposedRefs(t,E=>R(E)),[H,T]=l.useState(null),[F,V]=l.useState(null),_=_t(n),[$,X]=l.useState(!1),U=l.useRef(!1);l.useEffect(()=>{if(w)return fn(w)},[w]),ln();const W=l.useCallback(E=>{const[j,...L]=_().map(q=>q.ref.current),[O]=L.slice(-1),G=document.activeElement;for(const q of E)if(q===G||(q?.scrollIntoView({block:"nearest"}),q===j&&A&&(A.scrollTop=0),q===O&&A&&(A.scrollTop=A.scrollHeight),q?.focus(),document.activeElement!==G))return},[_,A]),ee=l.useCallback(()=>W([H,w]),[W,H,w]);l.useEffect(()=>{$&&ee()},[$,ee]);const{onOpenChange:Z,triggerPointerDownPosRef:Y}=b;l.useEffect(()=>{if(w){let E={x:0,y:0};const j=O=>{E={x:Math.abs(Math.round(O.pageX)-(Y.current?.x??0)),y:Math.abs(Math.round(O.pageY)-(Y.current?.y??0))}},L=O=>{E.x<=10&&E.y<=10?O.preventDefault():w.contains(O.target)||Z(!1),document.removeEventListener("pointermove",j),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",j),document.addEventListener("pointerup",L,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",j),document.removeEventListener("pointerup",L,{capture:!0})}}},[w,Z,Y]),l.useEffect(()=>{const E=()=>Z(!1);return window.addEventListener("blur",E),window.addEventListener("resize",E),()=>{window.removeEventListener("blur",E),window.removeEventListener("resize",E)}},[Z]);const[fe,ae]=Jo(E=>{const j=_().filter(G=>!G.disabled),L=j.find(G=>G.ref.current===document.activeElement),O=Qo(j,E,L);O&&setTimeout(()=>O.ref.current.focus())}),ue=l.useCallback((E,j,L)=>{const O=!U.current&&!L;(b.value!==void 0&&b.value===j||O)&&(T(E),O&&(U.current=!0))},[b.value]),P=l.useCallback(()=>w?.focus(),[w]),D=l.useCallback((E,j,L)=>{const O=!U.current&&!L;(b.value!==void 0&&b.value===j||O)&&V(E)},[b.value]),z=r==="popper"?tn:_o,M=z===tn?{side:a,sideOffset:c,align:d,alignOffset:g,arrowPadding:m,collisionBoundary:p,collisionPadding:x,sticky:y,hideWhenDetached:u,avoidCollisions:h}:{};return f.jsxRuntimeExports.jsx(To,{scope:n,content:w,viewport:A,onViewportChange:N,itemRefCallback:ue,selectedItem:H,onItemLeave:P,itemTextRefCallback:D,focusSelectedItem:ee,selectedItemText:F,position:r,isPositioned:$,searchRef:fe,children:f.jsxRuntimeExports.jsx(Pt,{as:tl,allowPinchZoom:!0,children:f.jsxRuntimeExports.jsx(St,{asChild:!0,trapped:b.open,onMountAutoFocus:E=>{E.preventDefault()},onUnmountAutoFocus:ne(o,E=>{b.trigger?.focus({preventScroll:!0}),E.preventDefault()}),children:f.jsxRuntimeExports.jsx(wt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:E=>E.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:f.jsxRuntimeExports.jsx(z,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:E=>E.preventDefault(),...v,...M,onPlaced:()=>X(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ne(v.onKeyDown,E=>{const j=E.ctrlKey||E.altKey||E.metaKey;if(E.key==="Tab"&&E.preventDefault(),!j&&E.key.length===1&&ae(E.key),["ArrowUp","ArrowDown","Home","End"].includes(E.key)){let O=_().filter(G=>!G.disabled).map(G=>G.ref.current);if(["ArrowUp","End"].includes(E.key)&&(O=O.slice().reverse()),["ArrowUp","ArrowDown"].includes(E.key)){const G=E.target,q=O.indexOf(G);O=O.slice(q+1)}setTimeout(()=>W(O)),E.preventDefault()}})})})})})})});zo.displayName=el;var nl="SelectItemAlignedPosition",_o=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Te(We,n),i=ze(We,n),[a,c]=l.useState(null),[d,g]=l.useState(null),m=re.useComposedRefs(t,S=>g(S)),p=_t(n),x=l.useRef(!1),y=l.useRef(!0),{viewport:u,selectedItem:h,selectedItemText:v,focusSelectedItem:b}=i,w=l.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&d&&u&&h&&v){const S=s.trigger.getBoundingClientRect(),H=d.getBoundingClientRect(),T=s.valueNode.getBoundingClientRect(),F=v.getBoundingClientRect();if(s.dir!=="rtl"){const G=F.left-H.left,q=T.left-G,K=S.left-q,I=S.width+K,k=Math.max(I,H.width),oe=window.innerWidth-ve,le=en(q,[ve,Math.max(ve,oe-k)]);a.style.minWidth=I+"px",a.style.left=le+"px"}else{const G=H.right-F.right,q=window.innerWidth-T.right-G,K=window.innerWidth-S.right-q,I=S.width+K,k=Math.max(I,H.width),oe=window.innerWidth-ve,le=en(q,[ve,Math.max(ve,oe-k)]);a.style.minWidth=I+"px",a.style.right=le+"px"}const V=p(),_=window.innerHeight-ve*2,$=u.scrollHeight,X=window.getComputedStyle(d),U=parseInt(X.borderTopWidth,10),W=parseInt(X.paddingTop,10),ee=parseInt(X.borderBottomWidth,10),Z=parseInt(X.paddingBottom,10),Y=U+W+$+Z+ee,fe=Math.min(h.offsetHeight*5,Y),ae=window.getComputedStyle(u),ue=parseInt(ae.paddingTop,10),P=parseInt(ae.paddingBottom,10),D=S.top+S.height/2-ve,z=_-D,M=h.offsetHeight/2,E=h.offsetTop+M,j=U+W+E,L=Y-j;if(j<=D){const G=V.length>0&&h===V[V.length-1].ref.current;a.style.bottom="0px";const q=d.clientHeight-u.offsetTop-u.offsetHeight,K=Math.max(z,M+(G?P:0)+q+ee),I=j+K;a.style.height=I+"px"}else{const G=V.length>0&&h===V[0].ref.current;a.style.top="0px";const K=Math.max(D,U+u.offsetTop+(G?ue:0)+M)+L;a.style.height=K+"px",u.scrollTop=j-D+u.offsetTop}a.style.margin=`${ve}px 0`,a.style.minHeight=fe+"px",a.style.maxHeight=_+"px",r?.(),requestAnimationFrame(()=>x.current=!0)}},[p,s.trigger,s.valueNode,a,d,u,h,v,s.dir,r]);de(()=>w(),[w]);const[R,A]=l.useState();de(()=>{d&&A(window.getComputedStyle(d).zIndex)},[d]);const N=l.useCallback(S=>{S&&y.current===!0&&(w(),b?.(),y.current=!1)},[w,b]);return f.jsxRuntimeExports.jsx(ol,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:x,onScrollButtonChange:N,children:f.jsxRuntimeExports.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:f.jsxRuntimeExports.jsx(Q.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});_o.displayName=nl;var rl="SelectPopperPosition",tn=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ve,...s}=e,i=Ot(n);return f.jsxRuntimeExports.jsx(vr,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});tn.displayName=rl;var[ol,En]=Je(We,{}),nn="SelectViewport",Oo=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=ze(nn,n),i=En(nn,n),a=re.useComposedRefs(t,s.onViewportChange),c=l.useRef(0);return f.jsxRuntimeExports.jsxs(f.jsxRuntimeExports.Fragment,{children:[f.jsxRuntimeExports.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),f.jsxRuntimeExports.jsx(zt.Slot,{scope:n,children:f.jsxRuntimeExports.jsx(Q.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ne(o.onScroll,d=>{const g=d.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:p}=i;if(p?.current&&m){const x=Math.abs(c.current-g.scrollTop);if(x>0){const y=window.innerHeight-ve*2,u=parseFloat(m.style.minHeight),h=parseFloat(m.style.height),v=Math.max(u,h);if(v<y){const b=v+x,w=Math.min(y,b),R=b-w;m.style.height=w+"px",m.style.bottom==="0px"&&(g.scrollTop=R>0?R:0,m.style.justifyContent="flex-end")}}}c.current=g.scrollTop})})})]})});Oo.displayName=nn;var ko="SelectGroup",[sl,al]=Je(ko),Lo=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Le();return f.jsxRuntimeExports.jsx(sl,{scope:n,id:o,children:f.jsxRuntimeExports.jsx(Q.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Lo.displayName=ko;var $o="SelectLabel",Ho=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=al($o,n);return f.jsxRuntimeExports.jsx(Q.div,{id:o.id,...r,ref:t})});Ho.displayName=$o;var bt="SelectItem",[il,Fo]=Je(bt),Bo=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=Te(bt,n),c=ze(bt,n),d=a.value===r,[g,m]=l.useState(s??""),[p,x]=l.useState(!1),y=re.useComposedRefs(t,b=>c.itemRefCallback?.(b,r,o)),u=Le(),h=l.useRef("touch"),v=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return f.jsxRuntimeExports.jsx(il,{scope:n,value:r,disabled:o,textId:u,isSelected:d,onItemTextChange:l.useCallback(b=>{m(w=>w||(b?.textContent??"").trim())},[]),children:f.jsxRuntimeExports.jsx(zt.ItemSlot,{scope:n,value:r,disabled:o,textValue:g,children:f.jsxRuntimeExports.jsx(Q.div,{role:"option","aria-labelledby":u,"data-highlighted":p?"":void 0,"aria-selected":d&&p,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:y,onFocus:ne(i.onFocus,()=>x(!0)),onBlur:ne(i.onBlur,()=>x(!1)),onClick:ne(i.onClick,()=>{h.current!=="mouse"&&v()}),onPointerUp:ne(i.onPointerUp,()=>{h.current==="mouse"&&v()}),onPointerDown:ne(i.onPointerDown,b=>{h.current=b.pointerType}),onPointerMove:ne(i.onPointerMove,b=>{h.current=b.pointerType,o?c.onItemLeave?.():h.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ne(i.onPointerLeave,b=>{b.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:ne(i.onKeyDown,b=>{c.searchRef?.current!==""&&b.key===" "||(Ki.includes(b.key)&&v(),b.key===" "&&b.preventDefault())})})})})});Bo.displayName=bt;var nt="SelectItemText",Wo=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Te(nt,n),a=ze(nt,n),c=Fo(nt,n),d=Zi(nt,n),[g,m]=l.useState(null),p=re.useComposedRefs(t,v=>m(v),c.onItemTextChange,v=>a.itemTextRefCallback?.(v,c.value,c.disabled)),x=g?.textContent,y=l.useMemo(()=>f.jsxRuntimeExports.jsx("option",{value:c.value,disabled:c.disabled,children:x},c.value),[c.disabled,c.value,x]),{onNativeOptionAdd:u,onNativeOptionRemove:h}=d;return de(()=>(u(y),()=>h(y)),[u,h,y]),f.jsxRuntimeExports.jsxs(f.jsxRuntimeExports.Fragment,{children:[f.jsxRuntimeExports.jsx(Q.span,{id:c.textId,...s,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?an.createPortal(s.children,i.valueNode):null]})});Wo.displayName=nt;var Vo="SelectItemIndicator",Uo=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Fo(Vo,n).isSelected?f.jsxRuntimeExports.jsx(Q.span,{"aria-hidden":!0,...r,ref:t}):null});Uo.displayName=Vo;var rn="SelectScrollUpButton",Go=l.forwardRef((e,t)=>{const n=ze(rn,e.__scopeSelect),r=En(rn,e.__scopeSelect),[o,s]=l.useState(!1),i=re.useComposedRefs(t,r.onScrollButtonChange);return de(()=>{if(n.viewport&&n.isPositioned){let a=function(){const d=c.scrollTop>0;s(d)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?f.jsxRuntimeExports.jsx(qo,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});Go.displayName=rn;var on="SelectScrollDownButton",Ko=l.forwardRef((e,t)=>{const n=ze(on,e.__scopeSelect),r=En(on,e.__scopeSelect),[o,s]=l.useState(!1),i=re.useComposedRefs(t,r.onScrollButtonChange);return de(()=>{if(n.viewport&&n.isPositioned){let a=function(){const d=c.scrollHeight-c.clientHeight,g=Math.ceil(c.scrollTop)<d;s(g)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?f.jsxRuntimeExports.jsx(qo,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});Ko.displayName=on;var qo=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=ze("SelectScrollButton",n),i=l.useRef(null),a=_t(n),c=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),de(()=>{a().find(g=>g.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[a]),f.jsxRuntimeExports.jsx(Q.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ne(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:ne(o.onPointerMove,()=>{s.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:ne(o.onPointerLeave,()=>{c()})})}),ll="SelectSeparator",Xo=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return f.jsxRuntimeExports.jsx(Q.div,{"aria-hidden":!0,...r,ref:t})});Xo.displayName=ll;var sn="SelectArrow",cl=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ot(n),s=Te(sn,n),i=ze(sn,n);return s.open&&i.position==="popper"?f.jsxRuntimeExports.jsx(xr,{...o,...r,ref:t}):null});cl.displayName=sn;var ul="SelectBubbleInput",Yo=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),s=re.useComposedRefs(r,o),i=wo(t);return l.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&g){const m=new Event("change",{bubbles:!0});g.call(a,t),a.dispatchEvent(m)}},[i,t]),f.jsxRuntimeExports.jsx(Q.select,{...n,style:{...So,...n.style},ref:s,defaultValue:t})});Yo.displayName=ul;function Zo(e){return e===""||e===void 0}function Jo(e){const t=Me(e),n=l.useRef(""),r=l.useRef(0),o=l.useCallback(i=>{const a=n.current+i;t(a),(function c(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(a)},[t]),s=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Qo(e,t,n){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=dl(e,Math.max(s,0));o.length===1&&(i=i.filter(d=>d!==n));const c=i.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function dl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var fl=Ro,pl=jo,ml=No,gl=Ao,hl=Do,vl=Mo,xl=Oo,yl=Lo,bl=Ho,El=Bo,wl=Wo,Sl=Uo,Cl=Go,Rl=Ko,Pl=Xo;function jl({...e}){return f.jsxRuntimeExports.jsx(fl,{"data-slot":"select",...e})}function Il({...e}){return f.jsxRuntimeExports.jsx(yl,{"data-slot":"select-group",...e})}function Nl({...e}){return f.jsxRuntimeExports.jsx(ml,{"data-slot":"select-value",...e})}function Al({className:e,size:t="default",children:n,...r}){return f.jsxRuntimeExports.jsxs(pl,{"data-slot":"select-trigger","data-size":t,className:ce.cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,f.jsxRuntimeExports.jsx(gl,{asChild:!0,children:f.jsxRuntimeExports.jsx(pn,{className:"size-4 opacity-50"})})]})}function Dl({className:e,children:t,position:n="popper",...r}){return f.jsxRuntimeExports.jsx(hl,{children:f.jsxRuntimeExports.jsxs(vl,{"data-slot":"select-content",className:ce.cn("bg-content1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-medium",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[f.jsxRuntimeExports.jsx(es,{}),f.jsxRuntimeExports.jsx(xl,{className:ce.cn("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),f.jsxRuntimeExports.jsx(ts,{})]})})}function Ml({className:e,...t}){return f.jsxRuntimeExports.jsx(bl,{"data-slot":"select-label",className:ce.cn("text-muted-foreground px-2 py-1.5 text-xs",e),...t})}function Tl({className:e,children:t,...n}){return f.jsxRuntimeExports.jsxs(El,{"data-slot":"select-item",className:ce.cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[f.jsxRuntimeExports.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:f.jsxRuntimeExports.jsx(Sl,{children:f.jsxRuntimeExports.jsx(Ir,{className:"size-4"})})}),f.jsxRuntimeExports.jsx(wl,{children:t})]})}function zl({className:e,...t}){return f.jsxRuntimeExports.jsx(Pl,{"data-slot":"select-separator",className:ce.cn("bg-border pointer-events-none -mx-1 my-1 h-px",e),...t})}function es({className:e,...t}){return f.jsxRuntimeExports.jsx(Cl,{"data-slot":"select-scroll-up-button",className:ce.cn("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsxRuntimeExports.jsx(Ya,{className:"size-4"})})}function ts({className:e,...t}){return f.jsxRuntimeExports.jsx(Rl,{"data-slot":"select-scroll-down-button",className:ce.cn("flex cursor-default items-center justify-center py-1",e),...t,children:f.jsxRuntimeExports.jsx(pn,{className:"size-4"})})}var _l=Object.defineProperty,Ol=Object.defineProperties,kl=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,ns=Object.prototype.hasOwnProperty,rs=Object.prototype.propertyIsEnumerable,Un=(e,t,n)=>t in e?_l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ll=(e,t)=>{for(var n in t||(t={}))ns.call(t,n)&&Un(e,n,t[n]);if(Et)for(var n of Et(t))rs.call(t,n)&&Un(e,n,t[n]);return e},$l=(e,t)=>Ol(e,kl(t)),Hl=(e,t)=>{var n={};for(var r in e)ns.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Et)for(var r of Et(e))t.indexOf(r)<0&&rs.call(e,r)&&(n[r]=e[r]);return n};function Fl(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function Bl(e){let t=l.useRef();return l.useEffect(()=>{t.current=e}),t.current}var Wl=18,os=40,Vl=`${os}px`,Ul=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Gl({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[o,s]=l.useState(!1),[i,a]=l.useState(!1),[c,d]=l.useState(!1),g=l.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&o&&i,[o,i,n]),m=l.useCallback(()=>{let p=e.current,x=t.current;if(!p||!x||c||n==="none")return;let y=p,u=y.getBoundingClientRect().left+y.offsetWidth,h=y.getBoundingClientRect().top+y.offsetHeight/2,v=u-Wl,b=h;document.querySelectorAll(Ul).length===0&&document.elementFromPoint(v,b)===p||(s(!0),d(!0))},[e,t,c,n]);return l.useEffect(()=>{let p=e.current;if(!p||n==="none")return;function x(){let u=window.innerWidth-p.getBoundingClientRect().right;a(u>=os)}x();let y=setInterval(x,1e3);return()=>{clearInterval(y)}},[e,n]),l.useEffect(()=>{let p=r||document.activeElement===t.current;if(n==="none"||!p)return;let x=setTimeout(m,0),y=setTimeout(m,2e3),u=setTimeout(m,5e3),h=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(x),clearTimeout(y),clearTimeout(u),clearTimeout(h)}},[t,r,n,m]),{hasPWMBadge:o,willPushPWMBadge:g,PWM_BADGE_SPACE_WIDTH:Vl}}var ss=l.createContext({}),as=l.forwardRef((e,t)=>{var n=e,{value:r,onChange:o,maxLength:s,textAlign:i="left",pattern:a,placeholder:c,inputMode:d="numeric",onComplete:g,pushPasswordManagerStrategy:m="increase-width",pasteTransformer:p,containerClassName:x,noScriptCSSFallback:y=Kl,render:u,children:h}=n,v=Hl(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),b,w,R,A,N;let[S,H]=l.useState(typeof v.defaultValue=="string"?v.defaultValue:""),T=r??S,F=Bl(T),V=l.useCallback(I=>{o?.(I),H(I)},[o]),_=l.useMemo(()=>a?typeof a=="string"?new RegExp(a):a:null,[a]),$=l.useRef(null),X=l.useRef(null),U=l.useRef({value:T,onChange:V,isIOS:typeof window<"u"&&((w=(b=window?.CSS)==null?void 0:b.supports)==null?void 0:w.call(b,"-webkit-touch-callout","none"))}),W=l.useRef({prev:[(R=$.current)==null?void 0:R.selectionStart,(A=$.current)==null?void 0:A.selectionEnd,(N=$.current)==null?void 0:N.selectionDirection]});l.useImperativeHandle(t,()=>$.current,[]),l.useEffect(()=>{let I=$.current,k=X.current;if(!I||!k)return;U.current.value!==I.value&&U.current.onChange(I.value),W.current.prev=[I.selectionStart,I.selectionEnd,I.selectionDirection];function oe(){if(document.activeElement!==I){ue(null),D(null);return}let te=I.selectionStart,pe=I.selectionEnd,be=I.selectionDirection,me=I.maxLength,we=I.value,Se=W.current.prev,Re=-1,Pe=-1,_e;if(we.length!==0&&te!==null&&pe!==null){let cs=te===pe,us=te===we.length&&we.length<me;if(cs&&!us){let Oe=te;if(Oe===0)Re=0,Pe=1,_e="forward";else if(Oe===me)Re=Oe-1,Pe=Oe,_e="backward";else if(me>1&&we.length>1){let kt=0;if(Se[0]!==null&&Se[1]!==null){_e=Oe<Se[1]?"backward":"forward";let ds=Se[0]===Se[1]&&Se[0]<me;_e==="backward"&&!ds&&(kt=-1)}Re=kt+Oe,Pe=kt+Oe+1}}Re!==-1&&Pe!==-1&&Re!==Pe&&$.current.setSelectionRange(Re,Pe,_e)}let wn=Re!==-1?Re:te,Sn=Pe!==-1?Pe:pe,ls=_e??be;ue(wn),D(Sn),W.current.prev=[wn,Sn,ls]}if(document.addEventListener("selectionchange",oe,{capture:!0}),oe(),document.activeElement===I&&fe(!0),!document.getElementById("input-otp-style")){let te=document.createElement("style");if(te.id="input-otp-style",document.head.appendChild(te),te.sheet){let pe="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Qe(te.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Qe(te.sheet,`[data-input-otp]:autofill { ${pe} }`),Qe(te.sheet,`[data-input-otp]:-webkit-autofill { ${pe} }`),Qe(te.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Qe(te.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let le=()=>{k&&k.style.setProperty("--root-height",`${I.clientHeight}px`)};le();let J=new ResizeObserver(le);return J.observe(I),()=>{document.removeEventListener("selectionchange",oe,{capture:!0}),J.disconnect()}},[]);let[ee,Z]=l.useState(!1),[Y,fe]=l.useState(!1),[ae,ue]=l.useState(null),[P,D]=l.useState(null);l.useEffect(()=>{Fl(()=>{var I,k,oe,le;(I=$.current)==null||I.dispatchEvent(new Event("input"));let J=(k=$.current)==null?void 0:k.selectionStart,te=(oe=$.current)==null?void 0:oe.selectionEnd,pe=(le=$.current)==null?void 0:le.selectionDirection;J!==null&&te!==null&&(ue(J),D(te),W.current.prev=[J,te,pe])})},[T,Y]),l.useEffect(()=>{F!==void 0&&T!==F&&F.length<s&&T.length===s&&g?.(T)},[s,g,F,T]);let z=Gl({containerRef:X,inputRef:$,pushPasswordManagerStrategy:m,isFocused:Y}),M=l.useCallback(I=>{let k=I.currentTarget.value.slice(0,s);if(k.length>0&&_&&!_.test(k)){I.preventDefault();return}typeof F=="string"&&k.length<F.length&&document.dispatchEvent(new Event("selectionchange")),V(k)},[s,V,F,_]),E=l.useCallback(()=>{var I;if($.current){let k=Math.min($.current.value.length,s-1),oe=$.current.value.length;(I=$.current)==null||I.setSelectionRange(k,oe),ue(k),D(oe)}fe(!0)},[s]),j=l.useCallback(I=>{var k,oe;let le=$.current;if(!p&&(!U.current.isIOS||!I.clipboardData||!le))return;let J=I.clipboardData.getData("text/plain"),te=p?p(J):J;I.preventDefault();let pe=(k=$.current)==null?void 0:k.selectionStart,be=(oe=$.current)==null?void 0:oe.selectionEnd,me=(pe!==be?T.slice(0,pe)+te+T.slice(be):T.slice(0,pe)+te+T.slice(pe)).slice(0,s);if(me.length>0&&_&&!_.test(me))return;le.value=me,V(me);let we=Math.min(me.length,s-1),Se=me.length;le.setSelectionRange(we,Se),ue(we),D(Se)},[s,V,_,T]),L=l.useMemo(()=>({position:"relative",cursor:v.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[v.disabled]),O=l.useMemo(()=>({position:"absolute",inset:0,width:z.willPushPWMBadge?`calc(100% + ${z.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:z.willPushPWMBadge?`inset(0 ${z.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[z.PWM_BADGE_SPACE_WIDTH,z.willPushPWMBadge,i]),G=l.useMemo(()=>l.createElement("input",$l(Ll({autoComplete:v.autoComplete||"one-time-code"},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":T.length===0||void 0,"data-input-otp-mss":ae,"data-input-otp-mse":P,inputMode:d,pattern:_?.source,"aria-placeholder":c,style:O,maxLength:s,value:T,ref:$,onPaste:I=>{var k;j(I),(k=v.onPaste)==null||k.call(v,I)},onChange:M,onMouseOver:I=>{var k;Z(!0),(k=v.onMouseOver)==null||k.call(v,I)},onMouseLeave:I=>{var k;Z(!1),(k=v.onMouseLeave)==null||k.call(v,I)},onFocus:I=>{var k;E(),(k=v.onFocus)==null||k.call(v,I)},onBlur:I=>{var k;fe(!1),(k=v.onBlur)==null||k.call(v,I)}})),[M,E,j,d,O,s,P,ae,v,_?.source,T]),q=l.useMemo(()=>({slots:Array.from({length:s}).map((I,k)=>{var oe;let le=Y&&ae!==null&&P!==null&&(ae===P&&k===ae||k>=ae&&k<P),J=T[k]!==void 0?T[k]:null,te=T[0]!==void 0?null:(oe=c?.[k])!=null?oe:null;return{char:J,placeholderChar:te,isActive:le,hasFakeCaret:le&&J===null}}),isFocused:Y,isHovering:!v.disabled&&ee}),[Y,ee,s,P,ae,v.disabled,T]),K=l.useMemo(()=>u?u(q):l.createElement(ss.Provider,{value:q},h),[h,q,u]);return l.createElement(l.Fragment,null,y!==null&&l.createElement("noscript",null,l.createElement("style",null,y)),l.createElement("div",{ref:X,"data-input-otp-container":!0,style:L,className:x},K,l.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},G)))});as.displayName="Input";function Qe(e,t){try{e.insertRule(t)}catch{}}var Kl=`
46
- [data-input-otp] {
47
- --nojs-bg: white !important;
48
- --nojs-fg: black !important;
49
-
50
- background-color: var(--nojs-bg) !important;
51
- color: var(--nojs-fg) !important;
52
- caret-color: var(--nojs-fg) !important;
53
- letter-spacing: .25em !important;
54
- text-align: center !important;
55
- border: 1px solid var(--nojs-fg) !important;
56
- border-radius: 4px !important;
57
- width: 100% !important;
58
- }
59
- @media (prefers-color-scheme: dark) {
60
- [data-input-otp] {
61
- --nojs-bg: black !important;
62
- --nojs-fg: white !important;
63
- }
64
- }`;const is=l.forwardRef(({className:e,classNameContainer:t,label:n,id:r,disabled:o,error:s,touched:i,startContent:a,endContent:c,startClassName:d,endClassName:g,onClear:m,required:p=!1,isClearable:x=!1,value:y,defaultValue:u,...h},v)=>{const b=l.useId(),w=r||b,R=y!==void 0,A=!o&&!!s&&i,N=ce.cn("block font-normal text-sm text-foreground mb-1",{"text-danger":A}),S=De.clsx("absolute top-0 h-full flex items-center cursor-pointer px-1.5 z-[1]",{"text-red-700":A,"text-gray-400":o,"text-green-700":!s&&i,"text-gray-500":!A}),H=De.clsx(a&&"pl-8",!a&&"pl-2.5",c&&"pr-8",!c&&"pr-2.5"),T=F=>{o||(F.preventDefault(),m?.())};return f.jsxRuntimeExports.jsxs("div",{className:he.twMerge("w-full relative flex flex-col",t),children:[n&&f.jsxRuntimeExports.jsxs("label",{htmlFor:w,className:N,children:[n," ",p&&f.jsxRuntimeExports.jsx("span",{className:"text-danger",children:"*"})]}),f.jsxRuntimeExports.jsxs("div",{className:"w-full relative",children:[a&&f.jsxRuntimeExports.jsx("div",{className:he.twMerge("left-1",S,d),children:a}),f.jsxRuntimeExports.jsx("textarea",{"data-slot":"textarea",id:w,ref:v,...R?{value:y}:{defaultValue:u},className:ce.cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",H,e),...h}),x&&!o&&y?f.jsxRuntimeExports.jsx("div",{className:he.twMerge("absolute top-0 h-full flex items-center px-1.5 z-[1] opacity-70 hover:opacity-100 cursor-pointer rounded-full","right-1",o?"opacity-50 cursor-not-allowed":"opacity-70 hover:opacity-100 cursor-pointer"),onClick:T,children:f.jsxRuntimeExports.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"18",viewBox:"0 0 24 24",width:"18",children:f.jsxRuntimeExports.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})})}):null,c&&f.jsxRuntimeExports.jsx("div",{className:he.twMerge("right-1",S,g),children:c})]})]})});is.displayName="Textarea";exports.Anchor=hr;exports.Arrow=xr;exports.Badge=xs;exports.Check=Ir;exports.ChevronDown=pn;exports.Close=bn;exports.Content=vr;exports.Content$1=vo;exports.Description=yo;exports.Dialog=Oi;exports.DialogClose=Li;exports.DialogContent=$i;exports.DialogDescription=Wi;exports.DialogFooter=Fi;exports.DialogHeader=Hi;exports.DialogOverlay=Eo;exports.DialogPortal=bo;exports.DialogTitle=Bi;exports.DialogTrigger=ki;exports.DismissableLayer=wt;exports.FocusScope=St;exports.Input=Yn;exports.Lt=as;exports.Overlay=ho;exports.Panel=Ar;exports.PanelGroup=qr;exports.PanelResizeHandle=Xr;exports.Portal=Ct;exports.Portal$1=go;exports.Presence=at;exports.Primitive=Q;exports.ReactRemoveScroll=Pt;exports.Root=po;exports.Root$1=Ui;exports.Root2=gr;exports.Select=jl;exports.SelectContent=Dl;exports.SelectGroup=Il;exports.SelectItem=Tl;exports.SelectLabel=Ml;exports.SelectScrollDownButton=ts;exports.SelectScrollUpButton=es;exports.SelectSeparator=zl;exports.SelectTrigger=Al;exports.SelectValue=Nl;exports.Switch=Jn;exports.Textarea=is;exports.Title=xo;exports.Trigger=mo;exports.WarningProvider=Mi;exports.clamp=en;exports.composeEventHandlers=ne;exports.createCollection=Qn;exports.createContextScope=st;exports.createDialogScope=Ri;exports.createLucideIcon=jt;exports.createPopperScope=un;exports.dispatchDiscreteCustomEvent=Zn;exports.hideOthers=fn;exports.jt=ss;exports.useCallbackRef=Me;exports.useControllableState=ht;exports.useDirection=er;exports.useFocusGuards=ln;exports.useId=Le;exports.useLayoutEffect2=de;exports.usePrevious=wo;exports.useSize=sr;
65
- //# sourceMappingURL=textarea-xD71CEWT.js.map