lizaui 3.0.51 → 3.0.53

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