docthub-core-components 1.0.24 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),x=require("react"),ka=require("react-dom");function ji(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 f=ji(x),Zr=ji(ka);function Ns(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Mt(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Ns(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Ns(e[o],null)}}}}function he(...e){return f.useCallback(Mt(...e),e)}function It(e){const t=qm(e),n=f.forwardRef((r,o)=>{const{children:a,...s}=r,i=f.Children.toArray(a),l=i.find(Km);if(l){const u=l.props.children,m=i.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,m):null})}return d.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Um=It("Slot");function qm(e){const t=f.forwardRef((n,r)=>{const{children:o,...a}=n;if(f.isValidElement(o)){const s=Zm(o),i=Xm(a,o.props);return o.type!==f.Fragment&&(i.ref=r?Mt(r,s):s),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $i=Symbol("radix.slottable");function Vm(e){const t=({children:n})=>d.jsx(d.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=$i,t}function Km(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$i}function Xm(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Zm(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Li(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Li(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Fi(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Li(e))&&(r&&(r+=" "),r+=t);return r}const Rs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ts=Fi,Qr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ts(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const m=n==null?void 0:n[u],c=a==null?void 0:a[u];if(m===null)return null;const p=Rs(m)||Rs(c);return o[u][p]}),i=n&&Object.entries(n).reduce((u,m)=>{let[c,p]=m;return p===void 0||(u[c]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,m)=>{let{class:c,className:p,...h}=m;return Object.entries(h).every(y=>{let[v,g]=y;return Array.isArray(g)?g.includes({...a,...i}[v]):{...a,...i}[v]===g})?[...u,c,p]:u},[]);return Ts(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ea="-",Qm=e=>{const t=ep(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(Ea);return i[0]===""&&i.length!==1&&i.shift(),Wi(i,t)||Jm(s)},getConflictingClassGroupIds:(s,i)=>{const l=n[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},Wi=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Wi(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Ea);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},_s=/^\[(.+)\]$/,Jm=e=>{if(_s.test(e)){const t=_s.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ep=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Jo(n[o],r,o,t);return r},Jo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Os(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(tp(o)){Jo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{Jo(s,Os(t,a),n,r)})})},Os=(e,t)=>{let n=e;return t.split(Ea).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},tp=e=>e.isThemeGetter,np=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},ea="!",ta=":",rp=ta.length,op=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let s=0,i=0,l=0,u;for(let y=0;y<o.length;y++){let v=o[y];if(s===0&&i===0){if(v===ta){a.push(o.slice(l,y)),l=y+rp;continue}if(v==="/"){u=y;continue}}v==="["?s++:v==="]"?s--:v==="("?i++:v===")"&&i--}const m=a.length===0?o:o.substring(l),c=ap(m),p=c!==m,h=u&&u>l?u-l:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:c,maybePostfixModifierPosition:h}};if(t){const o=t+ta,a=r;r=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},ap=e=>e.endsWith(ea)?e.substring(0,e.length-1):e.startsWith(ea)?e.substring(1):e,sp=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let a=[];return r.forEach(s=>{s[0]==="["||t[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},ip=e=>({cache:np(e.cacheSize),parseClassName:op(e),sortModifiers:sp(e),...Qm(e)}),cp=/\s+/,lp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],i=e.trim().split(cp);let l="";for(let u=i.length-1;u>=0;u-=1){const m=i[u],{isExternal:c,modifiers:p,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:v}=n(m);if(c){l=m+(l.length>0?" "+l:l);continue}let g=!!v,b=r(g?y.substring(0,v):y);if(!b){if(!g){l=m+(l.length>0?" "+l:l);continue}if(b=r(y),!b){l=m+(l.length>0?" "+l:l);continue}g=!1}const w=a(p).join(":"),S=h?w+ea:w,D=S+b;if(s.includes(D))continue;s.push(D);const C=o(b,g);for(let R=0;R<C.length;++R){const M=C[R];s.push(S+M)}l=m+(l.length>0?" "+l:l)}return l};function up(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Bi(t))&&(r&&(r+=" "),r+=n);return r}const Bi=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Bi(e[r]))&&(n&&(n+=" "),n+=t);return n};function dp(e,...t){let n,r,o,a=s;function s(l){const u=t.reduce((m,c)=>c(m),e());return n=ip(u),r=n.cache.get,o=n.cache.set,a=i,i(l)}function i(l){const u=r(l);if(u)return u;const m=lp(l,n);return o(l,m),m}return function(){return a(up.apply(null,arguments))}}const _e=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Yi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Hi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fp=/^\d+\/\d+$/,mp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,hp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,un=e=>fp.test(e),pe=e=>!!e&&!Number.isNaN(Number(e)),_t=e=>!!e&&Number.isInteger(Number(e)),Eo=e=>e.endsWith("%")&&pe(e.slice(0,-1)),wt=e=>mp.test(e),yp=()=>!0,bp=e=>pp.test(e)&&!hp.test(e),zi=()=>!1,wp=e=>gp.test(e),xp=e=>vp.test(e),Sp=e=>!te(e)&&!ne(e),Cp=e=>Mn(e,qi,zi),te=e=>Yi.test(e),Vt=e=>Mn(e,Vi,bp),No=e=>Mn(e,Np,pe),Ps=e=>Mn(e,Gi,zi),Mp=e=>Mn(e,Ui,xp),br=e=>Mn(e,Ki,wp),ne=e=>Hi.test(e),jn=e=>Dn(e,Vi),Dp=e=>Dn(e,Rp),As=e=>Dn(e,Gi),kp=e=>Dn(e,qi),Ep=e=>Dn(e,Ui),wr=e=>Dn(e,Ki,!0),Mn=(e,t,n)=>{const r=Yi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Dn=(e,t,n=!1)=>{const r=Hi.exec(e);return r?r[1]?t(r[1]):n:!1},Gi=e=>e==="position"||e==="percentage",Ui=e=>e==="image"||e==="url",qi=e=>e==="length"||e==="size"||e==="bg-size",Vi=e=>e==="length",Np=e=>e==="number",Rp=e=>e==="family-name",Ki=e=>e==="shadow",Tp=()=>{const e=_e("color"),t=_e("font"),n=_e("text"),r=_e("font-weight"),o=_e("tracking"),a=_e("leading"),s=_e("breakpoint"),i=_e("container"),l=_e("spacing"),u=_e("radius"),m=_e("shadow"),c=_e("inset-shadow"),p=_e("text-shadow"),h=_e("drop-shadow"),y=_e("blur"),v=_e("perspective"),g=_e("aspect"),b=_e("ease"),w=_e("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...D(),ne,te],R=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],E=()=>[ne,te,l],$=()=>[un,"full","auto",...E()],B=()=>[_t,"none","subgrid",ne,te],L=()=>["auto",{span:["full",_t,ne,te]},_t,ne,te],q=()=>[_t,"auto",ne,te],A=()=>["auto","min","max","fr",ne,te],T=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...E()],I=()=>[un,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],k=()=>[e,ne,te],P=()=>[...D(),As,Ps,{position:[ne,te]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",kp,Cp,{size:[ne,te]}],O=()=>[Eo,jn,Vt],j=()=>["","none","full",u,ne,te],Y=()=>["",pe,jn,Vt],G=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>[pe,Eo,As,Ps],Z=()=>["","none",y,ne,te],X=()=>["none",pe,ne,te],Q=()=>["none",pe,ne,te],se=()=>[pe,ne,te],ue=()=>[un,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wt],breakpoint:[wt],color:[yp],container:[wt],"drop-shadow":[wt],ease:["in","out","in-out"],font:[Sp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wt],shadow:[wt],spacing:["px",pe],text:[wt],"text-shadow":[wt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",un,te,ne,g]}],container:["container"],columns:[{columns:[pe,te,ne,i]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[_t,"auto",ne,te]}],basis:[{basis:[un,"full","auto",i,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pe,un,"auto","initial","none",te]}],grow:[{grow:["",pe,ne,te]}],shrink:[{shrink:["",pe,ne,te]}],order:[{order:[_t,"first","last","none",ne,te]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...T(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...T()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[i,"screen",...I()]}],"min-w":[{"min-w":[i,"screen","none",...I()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",n,jn,Vt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ne,No]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Eo,te]}],"font-family":[{font:[Dp,te,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ne,te]}],"line-clamp":[{"line-clamp":[pe,"none",ne,No]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",ne,te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[pe,"from-font","auto",ne,Vt]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[pe,"auto",ne,te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne,te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_t,ne,te],radial:["",ne,te],conic:[_t,ne,te]},Ep,Mp]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:O()}],"gradient-via-pos":[{via:O()}],"gradient-to-pos":[{to:O()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[pe,ne,te]}],"outline-w":[{outline:["",pe,jn,Vt]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",m,wr,br]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",c,wr,br]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[pe,Vt]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",p,wr,br]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[pe,ne,te]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":F()}],"mask-image-linear-to-pos":[{"mask-linear-to":F()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":F()}],"mask-image-t-to-pos":[{"mask-t-to":F()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":F()}],"mask-image-r-to-pos":[{"mask-r-to":F()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":F()}],"mask-image-b-to-pos":[{"mask-b-to":F()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":F()}],"mask-image-l-to-pos":[{"mask-l-to":F()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":F()}],"mask-image-x-to-pos":[{"mask-x-to":F()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":F()}],"mask-image-y-to-pos":[{"mask-y-to":F()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[ne,te]}],"mask-image-radial-from-pos":[{"mask-radial-from":F()}],"mask-image-radial-to-pos":[{"mask-radial-to":F()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":F()}],"mask-image-conic-to-pos":[{"mask-conic-to":F()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,te]}],filter:[{filter:["","none",ne,te]}],blur:[{blur:Z()}],brightness:[{brightness:[pe,ne,te]}],contrast:[{contrast:[pe,ne,te]}],"drop-shadow":[{"drop-shadow":["","none",h,wr,br]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",pe,ne,te]}],"hue-rotate":[{"hue-rotate":[pe,ne,te]}],invert:[{invert:["",pe,ne,te]}],saturate:[{saturate:[pe,ne,te]}],sepia:[{sepia:["",pe,ne,te]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,te]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[pe,ne,te]}],"backdrop-contrast":[{"backdrop-contrast":[pe,ne,te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pe,ne,te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pe,ne,te]}],"backdrop-invert":[{"backdrop-invert":["",pe,ne,te]}],"backdrop-opacity":[{"backdrop-opacity":[pe,ne,te]}],"backdrop-saturate":[{"backdrop-saturate":[pe,ne,te]}],"backdrop-sepia":[{"backdrop-sepia":["",pe,ne,te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ne,te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pe,"initial",ne,te]}],ease:[{ease:["linear","initial",b,ne,te]}],delay:[{delay:[pe,ne,te]}],animate:[{animate:["none",w,ne,te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,ne,te]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[ne,te,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ne,te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ne,te]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[pe,jn,Vt,No]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},_p=dp(Tp);function W(...e){return _p(Fi(e))}const na=Qr("inline-flex items-center justify-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-black text-white hover:bg-black/90",outline:"border border-gray-300 bg-white text-gray-700 hover:bg-gray-100",ghost:"text-gray-700 hover:bg-gray-100",error:"bg-red-500 text-white hover:bg-red-600",success:"bg-green-500 text-white hover:bg-green-600",warning:"bg-yellow-500 text-white hover:bg-yellow-600",blue:"bg-blue-500 text-white hover:bg-blue-600",disabled:"bg-gray-200 text-gray-400 cursor-not-allowed hover:bg-gray-200",brandBlue:"bg-brandBlue text-white hover:bg-brandBlue/90",primary:"bg-primary text-white hover:bg-primary/90"},size:{large:"rounded-xl text-base py-2.5 px-5 leading-snug font-semibold gap-2",medium:"rounded-xl text-sm py-2 px-4 leading-tight font-semibold gap-2",small:"rounded-full text-xs py-2 px-3 leading-4 font-semibold gap-1","icon.large":"rounded-[12px] p-2.5","icon.medium":"rounded-[10px] p-2","icon.small":"rounded-[14px] p-1.5"},iconSize:{large:"[&_svg]:w-6 [&_svg]:h-6",medium:"[&_svg]:w-5 [&_svg]:h-5",small:"[&_svg]:w-4 [&_svg]:h-4"},iconPosition:{left:"flex-row",right:"flex-row-reverse"},fullWidth:{true:"w-full",false:"w-auto"}},defaultVariants:{variant:"default",size:"medium",iconPosition:"left",fullWidth:!1}}),Dt=x.forwardRef(({className:e,variant:t,size:n,iconSize:r,iconPosition:o,fullWidth:a,asChild:s=!1,icon:i,iconOnly:l,children:u,...m},c)=>{const p=s?Um:"button";let h=n;if(l&&n)switch(n){case"large":h="icon.large";break;case"medium":h="icon.medium";break;case"small":h="icon.small";break}const y=r||(n==="large"?"large":n==="small"?"small":"medium");return d.jsxs(p,{className:W(na({variant:t,size:h,iconSize:y,iconPosition:o,fullWidth:a,className:e})),ref:c,"aria-label":l&&!m["aria-label"]?"Icon button":m["aria-label"],...m,children:[i&&d.jsx("span",{"data-testid":"button-icon",children:i}),!l&&u]})});Dt.displayName="DoctButton";const Op={h1:{fontSize:"3.5rem",tag:"h1"},h2:{fontSize:"2.875rem",tag:"h2"},h3:{fontSize:"2.25rem",tag:"h3"},h4:{fontSize:"2rem",tag:"h4"},h5:{fontSize:"1.75rem",tag:"h5"},h6:{fontSize:"1.5rem",tag:"h6"},h7:{fontSize:"1.25rem",tag:"p"},h8:{fontSize:"1.125rem",tag:"p"},title1:{fontSize:"1.375rem",tag:"p"},title2:{fontSize:"1.125rem",tag:"p"},title3:{fontSize:"0.875rem",tag:"p"},title4:{fontSize:"0.75rem",tag:"p"},body1:{fontSize:"1rem",tag:"p"},body2:{fontSize:"0.875rem",tag:"p"},body3:{fontSize:"0.75rem",tag:"p"},body4:{fontSize:"0.625rem",tag:"p"},textLabel1:{fontSize:"1rem",tag:"span"},textLabel2:{fontSize:"0.875rem",tag:"span"},textLabel3:{fontSize:"0.75rem",tag:"span"},textLabel4:{fontSize:"0.6875rem",tag:"span"}},Pp={regular:"400",medium:"500",semiBold:"600",bold:"700",extraBold:"800",light:"300"},Ap=({variant:e,weight:t="regular",children:n,color:r="#000",align:o="inherit",className:a=""})=>{const s=Op[e]??{fontSize:"16px",tag:"p"},{fontSize:i,tag:l}=s;return d.jsx(l,{className:a,style:{fontSize:i,fontWeight:Pp[t]??"400",color:r,textAlign:o},children:n})};function Ip(){return d.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-full bg-white",children:d.jsx("img",{src:"/logoAnimation.gif",alt:"Loading animation",className:"w-32 h-32 object-contain"})})}const Xi=f.forwardRef(({size:e=48,strokeWidth:t=4,className:n,colorClassName:r="text-current",...o},a)=>{const s=Math.max((e-t)/2,0),i=2*Math.PI*s;return d.jsxs("svg",{ref:a,width:e,height:e,viewBox:`0 0 ${e} ${e}`,className:W("animate-spin text-muted-foreground",n),role:"progressbar","aria-label":"Loading","aria-valuemin":0,"aria-valuemax":100,...o,children:[d.jsx("circle",{className:"opacity-25",cx:e/2,cy:e/2,r:s,stroke:"currentColor",strokeWidth:t,fill:"none"}),d.jsx("circle",{className:W(r),cx:e/2,cy:e/2,r:s,stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:i*.75,fill:"none"})]})});Xi.displayName="CircularProgress";const nn=f.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:W("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));nn.displayName="Input";var jp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=jp.reduce((e,t)=>{const n=It(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Zi(e,t){e&&Zr.flushSync(()=>e.dispatchEvent(t))}var $p="Label",Qi=f.forwardRef((e,t)=>d.jsx(ee.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Qi.displayName=$p;var Ji=Qi;const Lp=Qr("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),rn=f.forwardRef(({className:e,...t},n)=>d.jsx(Ji,{ref:n,className:W(Lp(),e),...t}));rn.displayName=Ji.displayName;const Qe=({label:e,placeholder:t,helperText:n,error:r,required:o,type:a="text",leftIcon:s,rightIcon:i,className:l,inputClassName:u,onChange:m,showCharCount:c,maxLength:p,value:h,disabled:y,fridged:v})=>{const[g,b]=x.useState((h==null?void 0:h.length)||0),w=C=>{m&&m(C),b(C.target.value.length)},S=c&&typeof p=="number",D=v||y;return d.jsxs("div",{className:W("space-y-1",l),children:[e&&d.jsxs(rn,{className:"text-sm font-medium text-foreground",children:[e,o&&d.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),d.jsxs("div",{className:"relative",children:[s&&d.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:s}),i&&d.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:i}),d.jsx(nn,{type:a,placeholder:t,disabled:y,value:h,maxLength:p,onChange:w,className:W(s&&"pl-10",i&&"pr-10",r&&"border-destructive focus-visible:ring-destructive",D&&"cursor-not-allowed bg-muted text-muted-foreground opacity-70",u)}),S&&d.jsxs("span",{className:"absolute bottom-[-1.25rem] right-0 text-xs text-muted-foreground",children:[g," / ",p]})]}),(n||r)&&d.jsx("p",{className:W("text-xs",r?"text-destructive":"text-muted-foreground"),children:r||n})]})},Fp=({length:e=6,label:t,value:n,onChange:r,onComplete:o,className:a,error:s,inputClassName:i="h-8 w-8"})=>{const l=x.useRef([]),u=(c,p)=>{var y;if(p.length>1)return;const h=[...n];h[c]=p,r(h),p&&c<e-1&&((y=l.current[c+1])==null||y.focus()),h.every(v=>v!=="")&&o&&o(h.join(""))},m=(c,p)=>{var h;p.key==="Backspace"&&!n[c]&&c>0&&((h=l.current[c-1])==null||h.focus())};return d.jsxs("div",{className:W("space-y-2",a),children:[t&&d.jsx(rn,{className:"text-sm font-medium text-gray-700",children:t}),d.jsx("div",{className:"flex gap-1",children:n.map((c,p)=>d.jsx(nn,{ref:h=>l.current[p]=h,type:"text",inputMode:"numeric",maxLength:1,value:c,onChange:h=>u(p,h.target.value),onKeyDown:h=>m(p,h),className:W("text-center p-0 text-lg font-semibold",s&&"border-red-500 focus-visible:ring-red-500",i)},p))}),s&&d.jsx("p",{className:"text-xs text-red-500 mt-1",children:s})]})};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),x=require("react"),ka=require("react-dom");function ji(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 f=ji(x),Zr=ji(ka);function Ns(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Mt(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Ns(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Ns(e[o],null)}}}}function he(...e){return f.useCallback(Mt(...e),e)}function It(e){const t=qm(e),n=f.forwardRef((r,o)=>{const{children:a,...s}=r,i=f.Children.toArray(a),l=i.find(Km);if(l){const u=l.props.children,m=i.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,m):null})}return d.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Um=It("Slot");function qm(e){const t=f.forwardRef((n,r)=>{const{children:o,...a}=n;if(f.isValidElement(o)){const s=Zm(o),i=Xm(a,o.props);return o.type!==f.Fragment&&(i.ref=r?Mt(r,s):s),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $i=Symbol("radix.slottable");function Vm(e){const t=({children:n})=>d.jsx(d.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=$i,t}function Km(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$i}function Xm(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Zm(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Li(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Li(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Fi(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Li(e))&&(r&&(r+=" "),r+=t);return r}const Rs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ts=Fi,Qr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ts(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const m=n==null?void 0:n[u],c=a==null?void 0:a[u];if(m===null)return null;const p=Rs(m)||Rs(c);return o[u][p]}),i=n&&Object.entries(n).reduce((u,m)=>{let[c,p]=m;return p===void 0||(u[c]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,m)=>{let{class:c,className:p,...h}=m;return Object.entries(h).every(y=>{let[v,g]=y;return Array.isArray(g)?g.includes({...a,...i}[v]):{...a,...i}[v]===g})?[...u,c,p]:u},[]);return Ts(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ea="-",Qm=e=>{const t=ep(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(Ea);return i[0]===""&&i.length!==1&&i.shift(),Wi(i,t)||Jm(s)},getConflictingClassGroupIds:(s,i)=>{const l=n[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},Wi=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Wi(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Ea);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},_s=/^\[(.+)\]$/,Jm=e=>{if(_s.test(e)){const t=_s.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ep=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Jo(n[o],r,o,t);return r},Jo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Os(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(tp(o)){Jo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{Jo(s,Os(t,a),n,r)})})},Os=(e,t)=>{let n=e;return t.split(Ea).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},tp=e=>e.isThemeGetter,np=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},ea="!",ta=":",rp=ta.length,op=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let s=0,i=0,l=0,u;for(let y=0;y<o.length;y++){let v=o[y];if(s===0&&i===0){if(v===ta){a.push(o.slice(l,y)),l=y+rp;continue}if(v==="/"){u=y;continue}}v==="["?s++:v==="]"?s--:v==="("?i++:v===")"&&i--}const m=a.length===0?o:o.substring(l),c=ap(m),p=c!==m,h=u&&u>l?u-l:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:c,maybePostfixModifierPosition:h}};if(t){const o=t+ta,a=r;r=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},ap=e=>e.endsWith(ea)?e.substring(0,e.length-1):e.startsWith(ea)?e.substring(1):e,sp=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let a=[];return r.forEach(s=>{s[0]==="["||t[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},ip=e=>({cache:np(e.cacheSize),parseClassName:op(e),sortModifiers:sp(e),...Qm(e)}),cp=/\s+/,lp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],i=e.trim().split(cp);let l="";for(let u=i.length-1;u>=0;u-=1){const m=i[u],{isExternal:c,modifiers:p,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:v}=n(m);if(c){l=m+(l.length>0?" "+l:l);continue}let g=!!v,b=r(g?y.substring(0,v):y);if(!b){if(!g){l=m+(l.length>0?" "+l:l);continue}if(b=r(y),!b){l=m+(l.length>0?" "+l:l);continue}g=!1}const w=a(p).join(":"),S=h?w+ea:w,D=S+b;if(s.includes(D))continue;s.push(D);const C=o(b,g);for(let N=0;N<C.length;++N){const M=C[N];s.push(S+M)}l=m+(l.length>0?" "+l:l)}return l};function up(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Bi(t))&&(r&&(r+=" "),r+=n);return r}const Bi=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Bi(e[r]))&&(n&&(n+=" "),n+=t);return n};function dp(e,...t){let n,r,o,a=s;function s(l){const u=t.reduce((m,c)=>c(m),e());return n=ip(u),r=n.cache.get,o=n.cache.set,a=i,i(l)}function i(l){const u=r(l);if(u)return u;const m=lp(l,n);return o(l,m),m}return function(){return a(up.apply(null,arguments))}}const _e=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Yi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Hi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fp=/^\d+\/\d+$/,mp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,hp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,un=e=>fp.test(e),pe=e=>!!e&&!Number.isNaN(Number(e)),_t=e=>!!e&&Number.isInteger(Number(e)),Eo=e=>e.endsWith("%")&&pe(e.slice(0,-1)),wt=e=>mp.test(e),yp=()=>!0,bp=e=>pp.test(e)&&!hp.test(e),zi=()=>!1,wp=e=>gp.test(e),xp=e=>vp.test(e),Sp=e=>!te(e)&&!ne(e),Cp=e=>Mn(e,qi,zi),te=e=>Yi.test(e),Vt=e=>Mn(e,Vi,bp),No=e=>Mn(e,Np,pe),Ps=e=>Mn(e,Gi,zi),Mp=e=>Mn(e,Ui,xp),br=e=>Mn(e,Ki,wp),ne=e=>Hi.test(e),jn=e=>Dn(e,Vi),Dp=e=>Dn(e,Rp),As=e=>Dn(e,Gi),kp=e=>Dn(e,qi),Ep=e=>Dn(e,Ui),wr=e=>Dn(e,Ki,!0),Mn=(e,t,n)=>{const r=Yi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Dn=(e,t,n=!1)=>{const r=Hi.exec(e);return r?r[1]?t(r[1]):n:!1},Gi=e=>e==="position"||e==="percentage",Ui=e=>e==="image"||e==="url",qi=e=>e==="length"||e==="size"||e==="bg-size",Vi=e=>e==="length",Np=e=>e==="number",Rp=e=>e==="family-name",Ki=e=>e==="shadow",Tp=()=>{const e=_e("color"),t=_e("font"),n=_e("text"),r=_e("font-weight"),o=_e("tracking"),a=_e("leading"),s=_e("breakpoint"),i=_e("container"),l=_e("spacing"),u=_e("radius"),m=_e("shadow"),c=_e("inset-shadow"),p=_e("text-shadow"),h=_e("drop-shadow"),y=_e("blur"),v=_e("perspective"),g=_e("aspect"),b=_e("ease"),w=_e("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...D(),ne,te],N=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],E=()=>[ne,te,l],$=()=>[un,"full","auto",...E()],B=()=>[_t,"none","subgrid",ne,te],L=()=>["auto",{span:["full",_t,ne,te]},_t,ne,te],q=()=>[_t,"auto",ne,te],A=()=>["auto","min","max","fr",ne,te],T=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...E()],I=()=>[un,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],k=()=>[e,ne,te],P=()=>[...D(),As,Ps,{position:[ne,te]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",kp,Cp,{size:[ne,te]}],O=()=>[Eo,jn,Vt],j=()=>["","none","full",u,ne,te],Y=()=>["",pe,jn,Vt],G=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>[pe,Eo,As,Ps],Z=()=>["","none",y,ne,te],X=()=>["none",pe,ne,te],Q=()=>["none",pe,ne,te],se=()=>[pe,ne,te],ue=()=>[un,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wt],breakpoint:[wt],color:[yp],container:[wt],"drop-shadow":[wt],ease:["in","out","in-out"],font:[Sp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wt],shadow:[wt],spacing:["px",pe],text:[wt],"text-shadow":[wt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",un,te,ne,g]}],container:["container"],columns:[{columns:[pe,te,ne,i]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[_t,"auto",ne,te]}],basis:[{basis:[un,"full","auto",i,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pe,un,"auto","initial","none",te]}],grow:[{grow:["",pe,ne,te]}],shrink:[{shrink:["",pe,ne,te]}],order:[{order:[_t,"first","last","none",ne,te]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...T(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...T()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[i,"screen",...I()]}],"min-w":[{"min-w":[i,"screen","none",...I()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",n,jn,Vt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ne,No]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Eo,te]}],"font-family":[{font:[Dp,te,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ne,te]}],"line-clamp":[{"line-clamp":[pe,"none",ne,No]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",ne,te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[pe,"from-font","auto",ne,Vt]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[pe,"auto",ne,te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne,te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_t,ne,te],radial:["",ne,te],conic:[_t,ne,te]},Ep,Mp]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:O()}],"gradient-via-pos":[{via:O()}],"gradient-to-pos":[{to:O()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[pe,ne,te]}],"outline-w":[{outline:["",pe,jn,Vt]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",m,wr,br]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",c,wr,br]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[pe,Vt]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",p,wr,br]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[pe,ne,te]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":F()}],"mask-image-linear-to-pos":[{"mask-linear-to":F()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":F()}],"mask-image-t-to-pos":[{"mask-t-to":F()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":F()}],"mask-image-r-to-pos":[{"mask-r-to":F()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":F()}],"mask-image-b-to-pos":[{"mask-b-to":F()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":F()}],"mask-image-l-to-pos":[{"mask-l-to":F()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":F()}],"mask-image-x-to-pos":[{"mask-x-to":F()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":F()}],"mask-image-y-to-pos":[{"mask-y-to":F()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[ne,te]}],"mask-image-radial-from-pos":[{"mask-radial-from":F()}],"mask-image-radial-to-pos":[{"mask-radial-to":F()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":F()}],"mask-image-conic-to-pos":[{"mask-conic-to":F()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,te]}],filter:[{filter:["","none",ne,te]}],blur:[{blur:Z()}],brightness:[{brightness:[pe,ne,te]}],contrast:[{contrast:[pe,ne,te]}],"drop-shadow":[{"drop-shadow":["","none",h,wr,br]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",pe,ne,te]}],"hue-rotate":[{"hue-rotate":[pe,ne,te]}],invert:[{invert:["",pe,ne,te]}],saturate:[{saturate:[pe,ne,te]}],sepia:[{sepia:["",pe,ne,te]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,te]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[pe,ne,te]}],"backdrop-contrast":[{"backdrop-contrast":[pe,ne,te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pe,ne,te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pe,ne,te]}],"backdrop-invert":[{"backdrop-invert":["",pe,ne,te]}],"backdrop-opacity":[{"backdrop-opacity":[pe,ne,te]}],"backdrop-saturate":[{"backdrop-saturate":[pe,ne,te]}],"backdrop-sepia":[{"backdrop-sepia":["",pe,ne,te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ne,te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pe,"initial",ne,te]}],ease:[{ease:["linear","initial",b,ne,te]}],delay:[{delay:[pe,ne,te]}],animate:[{animate:["none",w,ne,te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,ne,te]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[ne,te,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ne,te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ne,te]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[pe,jn,Vt,No]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},_p=dp(Tp);function W(...e){return _p(Fi(e))}const na=Qr("inline-flex items-center justify-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-black text-white hover:bg-black/90",outline:"border border-gray-300 bg-white text-gray-700 hover:bg-gray-100",ghost:"text-gray-700 hover:bg-gray-100",error:"bg-red-500 text-white hover:bg-red-600",success:"bg-green-500 text-white hover:bg-green-600",warning:"bg-yellow-500 text-white hover:bg-yellow-600",blue:"bg-blue-500 text-white hover:bg-blue-600",disabled:"bg-gray-200 text-gray-400 cursor-not-allowed hover:bg-gray-200",brandBlue:"bg-brandBlue text-white hover:bg-brandBlue/90",primary:"bg-primary text-white hover:bg-primary/90"},size:{large:"rounded-xl text-base py-2.5 px-5 leading-snug font-semibold gap-2",medium:"rounded-xl text-sm py-2 px-4 leading-tight font-semibold gap-2",small:"rounded-full text-xs py-2 px-3 leading-4 font-semibold gap-1","icon.large":"rounded-[12px] p-2.5","icon.medium":"rounded-[10px] p-2","icon.small":"rounded-[14px] p-1.5"},iconSize:{large:"[&_svg]:w-6 [&_svg]:h-6",medium:"[&_svg]:w-5 [&_svg]:h-5",small:"[&_svg]:w-4 [&_svg]:h-4"},iconPosition:{left:"flex-row",right:"flex-row-reverse"},fullWidth:{true:"w-full",false:"w-auto"}},defaultVariants:{variant:"default",size:"medium",iconPosition:"left",fullWidth:!1}}),Dt=x.forwardRef(({className:e,variant:t,size:n,iconSize:r,iconPosition:o,fullWidth:a,asChild:s=!1,icon:i,iconOnly:l,children:u,...m},c)=>{const p=s?Um:"button";let h=n;if(l&&n)switch(n){case"large":h="icon.large";break;case"medium":h="icon.medium";break;case"small":h="icon.small";break}const y=r||(n==="large"?"large":n==="small"?"small":"medium");return d.jsxs(p,{className:W(na({variant:t,size:h,iconSize:y,iconPosition:o,fullWidth:a,className:e})),ref:c,"aria-label":l&&!m["aria-label"]?"Icon button":m["aria-label"],...m,children:[i&&d.jsx("span",{"data-testid":"button-icon",children:i}),!l&&u]})});Dt.displayName="DoctButton";const Op={h1:{fontSize:"3.5rem",tag:"h1"},h2:{fontSize:"2.875rem",tag:"h2"},h3:{fontSize:"2.25rem",tag:"h3"},h4:{fontSize:"2rem",tag:"h4"},h5:{fontSize:"1.75rem",tag:"h5"},h6:{fontSize:"1.5rem",tag:"h6"},h7:{fontSize:"1.25rem",tag:"p"},h8:{fontSize:"1.125rem",tag:"p"},title1:{fontSize:"1.375rem",tag:"p"},title2:{fontSize:"1.125rem",tag:"p"},title3:{fontSize:"0.875rem",tag:"p"},title4:{fontSize:"0.75rem",tag:"p"},body1:{fontSize:"1rem",tag:"p"},body2:{fontSize:"0.875rem",tag:"p"},body3:{fontSize:"0.75rem",tag:"p"},body4:{fontSize:"0.625rem",tag:"p"},textLabel1:{fontSize:"1rem",tag:"span"},textLabel2:{fontSize:"0.875rem",tag:"span"},textLabel3:{fontSize:"0.75rem",tag:"span"},textLabel4:{fontSize:"0.6875rem",tag:"span"}},Pp={regular:"400",medium:"500",semiBold:"600",bold:"700",extraBold:"800",light:"300"},Ap=({variant:e,weight:t="regular",children:n,color:r="#000",align:o="inherit",className:a=""})=>{const s=Op[e]??{fontSize:"16px",tag:"p"},{fontSize:i,tag:l}=s;return d.jsx(l,{className:a,style:{fontSize:i,fontWeight:Pp[t]??"400",color:r,textAlign:o},children:n})};function Ip(){return d.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-full bg-white",children:d.jsx("img",{src:"/logoAnimation.gif",alt:"Loading animation",className:"w-32 h-32 object-contain"})})}const Xi=f.forwardRef(({size:e=48,strokeWidth:t=4,className:n,colorClassName:r="text-current",...o},a)=>{const s=Math.max((e-t)/2,0),i=2*Math.PI*s;return d.jsxs("svg",{ref:a,width:e,height:e,viewBox:`0 0 ${e} ${e}`,className:W("animate-spin text-muted-foreground",n),role:"progressbar","aria-label":"Loading","aria-valuemin":0,"aria-valuemax":100,...o,children:[d.jsx("circle",{className:"opacity-25",cx:e/2,cy:e/2,r:s,stroke:"currentColor",strokeWidth:t,fill:"none"}),d.jsx("circle",{className:W(r),cx:e/2,cy:e/2,r:s,stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:i*.75,fill:"none"})]})});Xi.displayName="CircularProgress";const nn=f.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:W("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));nn.displayName="Input";var jp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=jp.reduce((e,t)=>{const n=It(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Zi(e,t){e&&Zr.flushSync(()=>e.dispatchEvent(t))}var $p="Label",Qi=f.forwardRef((e,t)=>d.jsx(ee.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Qi.displayName=$p;var Ji=Qi;const Lp=Qr("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),rn=f.forwardRef(({className:e,...t},n)=>d.jsx(Ji,{ref:n,className:W(Lp(),e),...t}));rn.displayName=Ji.displayName;const Qe=({label:e,placeholder:t,helperText:n,error:r,required:o,type:a="text",leftIcon:s,rightIcon:i,className:l,inputClassName:u,onChange:m,showCharCount:c,maxLength:p,value:h,disabled:y,fridged:v,...g})=>{const[b,w]=x.useState((h==null?void 0:h.length)||0),S=N=>{m&&m(N),w(N.target.value.length)},D=c&&typeof p=="number",C=v||y;return d.jsxs("div",{className:W("space-y-1",l),children:[e&&d.jsxs(rn,{className:"text-sm font-medium text-foreground",children:[e,o&&d.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),d.jsxs("div",{className:"relative",children:[s&&d.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:s}),i&&d.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:i}),d.jsx(nn,{type:a,placeholder:t,disabled:y,value:h,maxLength:p,onChange:S,className:W(s&&"pl-10",i&&"pr-10",r&&"border-destructive focus-visible:ring-destructive",C&&"cursor-not-allowed bg-muted text-muted-foreground opacity-70",u),...g}),D&&d.jsxs("span",{className:"absolute bottom-[-1.25rem] right-0 text-xs text-muted-foreground",children:[b," / ",p]})]}),(n||r)&&d.jsx("p",{className:W("text-xs",r?"text-destructive":"text-muted-foreground"),children:r||n})]})},Fp=({length:e=6,label:t,value:n,onChange:r,onComplete:o,className:a,error:s,inputClassName:i="h-8 w-8"})=>{const l=x.useRef([]),u=(c,p)=>{var y;if(p.length>1)return;const h=[...n];h[c]=p,r(h),p&&c<e-1&&((y=l.current[c+1])==null||y.focus()),h.every(v=>v!=="")&&o&&o(h.join(""))},m=(c,p)=>{var h;p.key==="Backspace"&&!n[c]&&c>0&&((h=l.current[c-1])==null||h.focus())};return d.jsxs("div",{className:W("space-y-2",a),children:[t&&d.jsx(rn,{className:"text-sm font-medium text-gray-700",children:t}),d.jsx("div",{className:"flex gap-1",children:n.map((c,p)=>d.jsx(nn,{ref:h=>l.current[p]=h,type:"text",inputMode:"numeric",maxLength:1,value:c,onChange:h=>u(p,h.target.value),onKeyDown:h=>m(p,h),className:W("text-center p-0 text-lg font-semibold",s&&"border-red-500 focus-visible:ring-red-500",i)},p))}),s&&d.jsx("p",{className:"text-xs text-red-500 mt-1",children:s})]})};/**
2
2
  * @license lucide-react v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -108,7 +108,7 @@
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const hh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],kn=je("X",hh);function ra({label:e,placeholder:t="Enter password",helperText:n,error:r,required:o,className:a,showPassword:s=!1,onShowPasswordChange:i,value:l,onChange:u}){return d.jsxs("div",{className:W("space-y-1",a),children:[e&&d.jsxs(rn,{className:"text-sm font-medium text-gray-700",children:[e,o&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs("div",{className:"relative",children:[d.jsx(nn,{type:s?"text":"password",placeholder:t,className:W("pr-10",r&&"border-red-500 focus-visible:ring-red-500"),value:l,onChange:m=>u==null?void 0:u(m.target.value)}),d.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground cursor-pointer",onClick:()=>i==null?void 0:i(!s),"aria-label":s?"Hide password":"Show password",children:s?d.jsx(eh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"}):d.jsx(nh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"})})]}),r&&d.jsx("p",{className:"text-xs text-red-500",children:r}),n&&!r&&d.jsx("p",{className:"text-xs text-gray-500",children:n})]})}const Ra=f.forwardRef(({label:e,helperText:t,errorText:n,required:r,className:o,placeholder:a="Write here...",rows:s=4,...i},l)=>{const u=!!n;return d.jsxs("div",{className:W("space-y-1",o),children:[e&&d.jsxs("label",{className:"block text-sm font-medium text-foreground",children:[e,r&&d.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),d.jsx("textarea",{ref:l,placeholder:a,rows:s,className:W("flex min-h-[80px] w-full rounded-md border bg-background px-3 py-2 text-base placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",u?"border-destructive focus:ring-destructive":"border-input focus:ring-ring"),...i}),(t||n)&&d.jsx("p",{className:W("text-xs",u?"text-destructive":"text-muted-foreground"),children:n||t})]})});Ra.displayName="Textarea";function K(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function gh(e,t){const n=f.createContext(t),r=a=>{const{children:s,...i}=a,l=f.useMemo(()=>i,Object.values(i));return d.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(a){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Be(e,t=[]){let n=[];function r(a,s){const i=f.createContext(s),l=n.length;n=[...n,s];const u=c=>{var b;const{scope:p,children:h,...y}=c,v=((b=p==null?void 0:p[e])==null?void 0:b[l])||i,g=f.useMemo(()=>y,Object.values(y));return d.jsx(v.Provider,{value:g,children:h})};u.displayName=a+"Provider";function m(c,p){var v;const h=((v=p==null?void 0:p[e])==null?void 0:v[l])||i,y=f.useContext(h);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,m]}const o=()=>{const a=n.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,vh(o,...t)]}function vh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function et(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function yh(e,t=globalThis==null?void 0:globalThis.document){const n=et(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var bh="DismissableLayer",oa="dismissableLayer.update",wh="dismissableLayer.pointerDownOutside",xh="dismissableLayer.focusOutside",Is,sc=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),En=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(sc),[m,c]=f.useState(null),p=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=f.useState({}),y=he(t,M=>c(M)),v=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(g),w=m?v.indexOf(m):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=b,C=Mh(M=>{const E=M.target,$=[...u.branches].some(B=>B.contains(E));!D||$||(o==null||o(M),s==null||s(M),M.defaultPrevented||i==null||i())},p),R=Dh(M=>{const E=M.target;[...u.branches].some(B=>B.contains(E))||(a==null||a(M),s==null||s(M),M.defaultPrevented||i==null||i())},p);return yh(M=>{w===u.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&i&&(M.preventDefault(),i()))},p),f.useEffect(()=>{if(m)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Is=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),js(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Is)}},[m,p,n,u]),f.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),js())},[m,u]),f.useEffect(()=>{const M=()=>h({});return document.addEventListener(oa,M),()=>document.removeEventListener(oa,M)},[]),d.jsx(ee.div,{...l,ref:y,style:{pointerEvents:S?D?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,R.onFocusCapture),onBlurCapture:K(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,C.onPointerDownCapture)})});En.displayName=bh;var Sh="DismissableLayerBranch",Ch=f.forwardRef((e,t)=>{const n=f.useContext(sc),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(ee.div,{...e,ref:o})});Ch.displayName=Sh;function Mh(e,t=globalThis==null?void 0:globalThis.document){const n=et(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){ic(wh,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Dh(e,t=globalThis==null?void 0:globalThis.document){const n=et(e),r=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!r.current&&ic(xh,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function js(){const e=new CustomEvent(oa);document.dispatchEvent(e)}function ic(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Zi(o,a):o.dispatchEvent(a)}var Ro=0;function Jr(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$s()),document.body.insertAdjacentElement("beforeend",e[1]??$s()),Ro++,()=>{Ro===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ro--}},[])}function $s(){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 To="focusScope.autoFocusOnMount",_o="focusScope.autoFocusOnUnmount",Ls={bubbles:!1,cancelable:!0},kh="FocusScope",nr=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=et(o),m=et(a),c=f.useRef(null),p=he(t,v=>l(v)),h=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let v=function(S){if(h.paused||!i)return;const D=S.target;i.contains(D)?c.current=D:Pt(c.current,{select:!0})},g=function(S){if(h.paused||!i)return;const D=S.relatedTarget;D!==null&&(i.contains(D)||Pt(c.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const C of S)C.removedNodes.length>0&&Pt(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",g);const w=new MutationObserver(b);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",g),w.disconnect()}}},[r,i,h.paused]),f.useEffect(()=>{if(i){Ws.add(h);const v=document.activeElement;if(!i.contains(v)){const b=new CustomEvent(To,Ls);i.addEventListener(To,u),i.dispatchEvent(b),b.defaultPrevented||(Eh(Oh(cc(i)),{select:!0}),document.activeElement===v&&Pt(i))}return()=>{i.removeEventListener(To,u),setTimeout(()=>{const b=new CustomEvent(_o,Ls);i.addEventListener(_o,m),i.dispatchEvent(b),b.defaultPrevented||Pt(v??document.body,{select:!0}),i.removeEventListener(_o,m),Ws.remove(h)},0)}}},[i,u,m,h]);const y=f.useCallback(v=>{if(!n&&!r||h.paused)return;const g=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(g&&b){const w=v.currentTarget,[S,D]=Nh(w);S&&D?!v.shiftKey&&b===D?(v.preventDefault(),n&&Pt(S,{select:!0})):v.shiftKey&&b===S&&(v.preventDefault(),n&&Pt(D,{select:!0})):b===w&&v.preventDefault()}},[n,r,h.paused]);return d.jsx(ee.div,{tabIndex:-1,...s,ref:p,onKeyDown:y})});nr.displayName=kh;function Eh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Pt(r,{select:t}),document.activeElement!==n)return}function Nh(e){const t=cc(e),n=Fs(t,e),r=Fs(t.reverse(),e);return[n,r]}function cc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Fs(e,t){for(const n of e)if(!Rh(n,{upTo:t}))return n}function Rh(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 Th(e){return e instanceof HTMLInputElement&&"select"in e}function Pt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Th(e)&&t&&e.select()}}var Ws=_h();function _h(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Bs(e,t),e.unshift(t)},remove(t){var n;e=Bs(e,t),(n=e[0])==null||n.resume()}}}function Bs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Oh(e){return e.filter(t=>t.tagName!=="A")}var Ne=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Ph=f[" useId ".trim().toString()]||(()=>{}),Ah=0;function ke(e){const[t,n]=f.useState(Ph());return Ne(()=>{n(r=>r??String(Ah++))},[e]),e||(t?`radix-${t}`:"")}const Ih=["top","right","bottom","left"],jt=Math.min,Xe=Math.max,Lr=Math.round,xr=Math.floor,ht=e=>({x:e,y:e}),jh={left:"right",right:"left",bottom:"top",top:"bottom"},$h={start:"end",end:"start"};function aa(e,t,n){return Xe(e,jt(t,n))}function kt(e,t){return typeof e=="function"?e(t):e}function Et(e){return e.split("-")[0]}function Nn(e){return e.split("-")[1]}function Ta(e){return e==="x"?"y":"x"}function _a(e){return e==="y"?"height":"width"}const Lh=new Set(["top","bottom"]);function mt(e){return Lh.has(Et(e))?"y":"x"}function Oa(e){return Ta(mt(e))}function Fh(e,t,n){n===void 0&&(n=!1);const r=Nn(e),o=Oa(e),a=_a(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Fr(s)),[s,Fr(s)]}function Wh(e){const t=Fr(e);return[sa(e),t,sa(t)]}function sa(e){return e.replace(/start|end/g,t=>$h[t])}const Ys=["left","right"],Hs=["right","left"],Bh=["top","bottom"],Yh=["bottom","top"];function Hh(e,t,n){switch(e){case"top":case"bottom":return n?t?Hs:Ys:t?Ys:Hs;case"left":case"right":return t?Bh:Yh;default:return[]}}function zh(e,t,n,r){const o=Nn(e);let a=Hh(Et(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(sa)))),a}function Fr(e){return e.replace(/left|right|bottom|top/g,t=>jh[t])}function Gh(e){return{top:0,right:0,bottom:0,left:0,...e}}function lc(e){return typeof e!="number"?Gh(e):{top:e,right:e,bottom:e,left:e}}function Wr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function zs(e,t,n){let{reference:r,floating:o}=e;const a=mt(t),s=Oa(t),i=_a(s),l=Et(t),u=a==="y",m=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,p=r[i]/2-o[i]/2;let h;switch(l){case"top":h={x:m,y:r.y-o.height};break;case"bottom":h={x:m,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-o.width,y:c};break;default:h={x:r.x,y:r.y}}switch(Nn(t)){case"start":h[s]-=p*(n&&u?-1:1);break;case"end":h[s]+=p*(n&&u?-1:1);break}return h}const Uh=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:c}=zs(u,r,l),p=r,h={},y=0;for(let v=0;v<i.length;v++){const{name:g,fn:b}=i[v],{x:w,y:S,data:D,reset:C}=await b({x:m,y:c,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});m=w??m,c=S??c,h={...h,[g]:{...h[g],...D}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:m,y:c}=zs(u,p,l)),v=-1)}return{x:m,y:c,placement:p,strategy:o,middlewareData:h}};async function qn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:c="floating",altBoundary:p=!1,padding:h=0}=kt(t,e),y=lc(h),g=i[p?c==="floating"?"reference":"floating":c],b=Wr(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:m,strategy:l})),w=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),D=await(a.isElement==null?void 0:a.isElement(S))?await(a.getScale==null?void 0:a.getScale(S))||{x:1,y:1}:{x:1,y:1},C=Wr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:S,strategy:l}):w);return{top:(b.top-C.top+y.top)/D.y,bottom:(C.bottom-b.bottom+y.bottom)/D.y,left:(b.left-C.left+y.left)/D.x,right:(C.right-b.right+y.right)/D.x}}const qh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:m=0}=kt(e,t)||{};if(u==null)return{};const c=lc(m),p={x:n,y:r},h=Oa(o),y=_a(h),v=await s.getDimensions(u),g=h==="y",b=g?"top":"left",w=g?"bottom":"right",S=g?"clientHeight":"clientWidth",D=a.reference[y]+a.reference[h]-p[h]-a.floating[y],C=p[h]-a.reference[h],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let M=R?R[S]:0;(!M||!await(s.isElement==null?void 0:s.isElement(R)))&&(M=i.floating[S]||a.floating[y]);const E=D/2-C/2,$=M/2-v[y]/2-1,B=jt(c[b],$),L=jt(c[w],$),q=B,A=M-v[y]-L,T=M/2-v[y]/2+E,_=aa(q,T,A),N=!l.arrow&&Nn(o)!=null&&T!==_&&a.reference[y]/2-(T<q?B:L)-v[y]/2<0,I=N?T<q?T-q:T-A:0;return{[h]:p[h]+I,data:{[h]:_,centerOffset:T-_-I,...N&&{alignmentOffset:I}},reset:N}}}),Vh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:m=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...g}=kt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=Et(o),w=mt(i),S=Et(i)===i,D=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=p||(S||!v?[Fr(i)]:Wh(i)),R=y!=="none";!p&&R&&C.push(...zh(i,v,y,D));const M=[i,...C],E=await qn(t,g),$=[];let B=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&$.push(E[b]),c){const T=Fh(o,s,D);$.push(E[T[0]],E[T[1]])}if(B=[...B,{placement:o,overflows:$}],!$.every(T=>T<=0)){var L,q;const T=(((L=a.flip)==null?void 0:L.index)||0)+1,_=M[T];if(_&&(!(c==="alignment"?w!==mt(_):!1)||B.every(k=>k.overflows[0]>0&&mt(k.placement)===w)))return{data:{index:T,overflows:B},reset:{placement:_}};let N=(q=B.filter(I=>I.overflows[0]<=0).sort((I,k)=>I.overflows[1]-k.overflows[1])[0])==null?void 0:q.placement;if(!N)switch(h){case"bestFit":{var A;const I=(A=B.filter(k=>{if(R){const P=mt(k.placement);return P===w||P==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(P=>P>0).reduce((P,H)=>P+H,0)]).sort((k,P)=>k[1]-P[1])[0])==null?void 0:A[0];I&&(N=I);break}case"initialPlacement":N=i;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function Gs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Us(e){return Ih.some(t=>e[t]>=0)}const Kh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=kt(e,t);switch(r){case"referenceHidden":{const a=await qn(t,{...o,elementContext:"reference"}),s=Gs(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Us(s)}}}case"escaped":{const a=await qn(t,{...o,altBoundary:!0}),s=Gs(a,n.floating);return{data:{escapedOffsets:s,escaped:Us(s)}}}default:return{}}}}},uc=new Set(["left","top"]);async function Xh(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Et(n),i=Nn(n),l=mt(n)==="y",u=uc.has(s)?-1:1,m=a&&l?-1:1,c=kt(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:y}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof y=="number"&&(h=i==="end"?y*-1:y),l?{x:h*m,y:p*u}:{x:p*u,y:h*m}}const Zh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await Xh(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Qh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...l}=kt(e,t),u={x:n,y:r},m=await qn(t,l),c=mt(Et(o)),p=Ta(c);let h=u[p],y=u[c];if(a){const g=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=h+m[g],S=h-m[b];h=aa(w,h,S)}if(s){const g=c==="y"?"top":"left",b=c==="y"?"bottom":"right",w=y+m[g],S=y-m[b];y=aa(w,y,S)}const v=i.fn({...t,[p]:h,[c]:y});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:a,[c]:s}}}}}},Jh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=kt(e,t),m={x:n,y:r},c=mt(o),p=Ta(c);let h=m[p],y=m[c];const v=kt(i,t),g=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const S=p==="y"?"height":"width",D=a.reference[p]-a.floating[S]+g.mainAxis,C=a.reference[p]+a.reference[S]-g.mainAxis;h<D?h=D:h>C&&(h=C)}if(u){var b,w;const S=p==="y"?"width":"height",D=uc.has(Et(o)),C=a.reference[c]-a.floating[S]+(D&&((b=s.offset)==null?void 0:b[c])||0)+(D?0:g.crossAxis),R=a.reference[c]+a.reference[S]+(D?0:((w=s.offset)==null?void 0:w[c])||0)-(D?g.crossAxis:0);y<C?y=C:y>R&&(y=R)}return{[p]:h,[c]:y}}}},eg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=kt(e,t),m=await qn(t,u),c=Et(o),p=Nn(o),h=mt(o)==="y",{width:y,height:v}=a.floating;let g,b;c==="top"||c==="bottom"?(g=c,b=p===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=c,g=p==="end"?"top":"bottom");const w=v-m.top-m.bottom,S=y-m.left-m.right,D=jt(v-m[g],w),C=jt(y-m[b],S),R=!t.middlewareData.shift;let M=D,E=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=w),R&&!p){const B=Xe(m.left,0),L=Xe(m.right,0),q=Xe(m.top,0),A=Xe(m.bottom,0);h?E=y-2*(B!==0||L!==0?B+L:Xe(m.left,m.right)):M=v-2*(q!==0||A!==0?q+A:Xe(m.top,m.bottom))}await l({...t,availableWidth:E,availableHeight:M});const $=await s.getDimensions(i.floating);return y!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function eo(){return typeof window<"u"}function Rn(e){return dc(e)?(e.nodeName||"").toLowerCase():"#document"}function Ze(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vt(e){var t;return(t=(dc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dc(e){return eo()?e instanceof Node||e instanceof Ze(e).Node:!1}function st(e){return eo()?e instanceof Element||e instanceof Ze(e).Element:!1}function gt(e){return eo()?e instanceof HTMLElement||e instanceof Ze(e).HTMLElement:!1}function qs(e){return!eo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ze(e).ShadowRoot}const tg=new Set(["inline","contents"]);function rr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!tg.has(o)}const ng=new Set(["table","td","th"]);function rg(e){return ng.has(Rn(e))}const og=[":popover-open",":modal"];function to(e){return og.some(t=>{try{return e.matches(t)}catch{return!1}})}const ag=["transform","translate","scale","rotate","perspective"],sg=["transform","translate","scale","rotate","perspective","filter"],ig=["paint","layout","strict","content"];function Pa(e){const t=Aa(),n=st(e)?it(e):e;return ag.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||sg.some(r=>(n.willChange||"").includes(r))||ig.some(r=>(n.contain||"").includes(r))}function cg(e){let t=$t(e);for(;gt(t)&&!bn(t);){if(Pa(t))return t;if(to(t))return null;t=$t(t)}return null}function Aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lg=new Set(["html","body","#document"]);function bn(e){return lg.has(Rn(e))}function it(e){return Ze(e).getComputedStyle(e)}function no(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $t(e){if(Rn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qs(e)&&e.host||vt(e);return qs(t)?t.host:t}function fc(e){const t=$t(e);return bn(t)?e.ownerDocument?e.ownerDocument.body:e.body:gt(t)&&rr(t)?t:fc(t)}function Vn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=fc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ze(o);if(a){const i=ia(s);return t.concat(s,s.visualViewport||[],rr(o)?o:[],i&&n?Vn(i):[])}return t.concat(o,Vn(o,[],n))}function ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mc(e){const t=it(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=gt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Lr(n)!==a||Lr(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Ia(e){return st(e)?e:e.contextElement}function vn(e){const t=Ia(e);if(!gt(t))return ht(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mc(t);let s=(a?Lr(n.width):n.width)/r,i=(a?Lr(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const ug=ht(0);function pc(e){const t=Ze(e);return!Aa()||!t.visualViewport?ug:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ze(e)?!1:t}function Zt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ia(e);let s=ht(1);t&&(r?st(r)&&(s=vn(r)):s=vn(e));const i=dg(a,n,r)?pc(a):ht(0);let l=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,m=o.width/s.x,c=o.height/s.y;if(a){const p=Ze(a),h=r&&st(r)?Ze(r):r;let y=p,v=ia(y);for(;v&&r&&h!==y;){const g=vn(v),b=v.getBoundingClientRect(),w=it(v),S=b.left+(v.clientLeft+parseFloat(w.paddingLeft))*g.x,D=b.top+(v.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,u*=g.y,m*=g.x,c*=g.y,l+=S,u+=D,y=Ze(v),v=ia(y)}}return Wr({width:m,height:c,x:l,y:u})}function ja(e,t){const n=no(e).scrollLeft;return t?t.left+n:Zt(vt(e)).left+n}function hc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ja(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function fg(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=vt(r),i=t?to(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},u=ht(1);const m=ht(0),c=gt(r);if((c||!c&&!a)&&((Rn(r)!=="body"||rr(s))&&(l=no(r)),gt(r))){const h=Zt(r);u=vn(r),m.x=h.x+r.clientLeft,m.y=h.y+r.clientTop}const p=s&&!c&&!a?hc(s,l,!0):ht(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+m.x+p.x,y:n.y*u.y-l.scrollTop*u.y+m.y+p.y}}function mg(e){return Array.from(e.getClientRects())}function pg(e){const t=vt(e),n=no(e),r=e.ownerDocument.body,o=Xe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Xe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ja(e);const i=-n.scrollTop;return it(r).direction==="rtl"&&(s+=Xe(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function hg(e,t){const n=Ze(e),r=vt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const u=Aa();(!u||u&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}const gg=new Set(["absolute","fixed"]);function vg(e,t){const n=Zt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=gt(e)?vn(e):ht(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,u=r*a.y;return{width:s,height:i,x:l,y:u}}function Vs(e,t,n){let r;if(t==="viewport")r=hg(e,n);else if(t==="document")r=pg(vt(e));else if(st(t))r=vg(t,n);else{const o=pc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Wr(r)}function gc(e,t){const n=$t(e);return n===t||!st(n)||bn(n)?!1:it(n).position==="fixed"||gc(n,t)}function yg(e,t){const n=t.get(e);if(n)return n;let r=Vn(e,[],!1).filter(i=>st(i)&&Rn(i)!=="body"),o=null;const a=it(e).position==="fixed";let s=a?$t(e):e;for(;st(s)&&!bn(s);){const i=it(s),l=Pa(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&gg.has(o.position)||rr(s)&&!l&&gc(e,s))?r=r.filter(m=>m!==s):o=i,s=$t(s)}return t.set(e,r),r}function bg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?to(t)?[]:yg(t,this._c):[].concat(n),r],i=s[0],l=s.reduce((u,m)=>{const c=Vs(t,m,o);return u.top=Xe(c.top,u.top),u.right=jt(c.right,u.right),u.bottom=jt(c.bottom,u.bottom),u.left=Xe(c.left,u.left),u},Vs(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function wg(e){const{width:t,height:n}=mc(e);return{width:t,height:n}}function xg(e,t,n){const r=gt(t),o=vt(t),a=n==="fixed",s=Zt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=ht(0);function u(){l.x=ja(o)}if(r||!r&&!a)if((Rn(t)!=="body"||rr(o))&&(i=no(t)),r){const h=Zt(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&u();a&&!r&&o&&u();const m=o&&!r&&!a?hc(o,i):ht(0),c=s.left+i.scrollLeft-l.x-m.x,p=s.top+i.scrollTop-l.y-m.y;return{x:c,y:p,width:s.width,height:s.height}}function Oo(e){return it(e).position==="static"}function Ks(e,t){if(!gt(e)||it(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return vt(e)===n&&(n=n.ownerDocument.body),n}function vc(e,t){const n=Ze(e);if(to(e))return n;if(!gt(e)){let o=$t(e);for(;o&&!bn(o);){if(st(o)&&!Oo(o))return o;o=$t(o)}return n}let r=Ks(e,t);for(;r&&rg(r)&&Oo(r);)r=Ks(r,t);return r&&bn(r)&&Oo(r)&&!Pa(r)?n:r||cg(e)||n}const Sg=async function(e){const t=this.getOffsetParent||vc,n=this.getDimensions,r=await n(e.floating);return{reference:xg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cg(e){return it(e).direction==="rtl"}const Mg={convertOffsetParentRelativeRectToViewportRelativeRect:fg,getDocumentElement:vt,getClippingRect:bg,getOffsetParent:vc,getElementRects:Sg,getClientRects:mg,getDimensions:wg,getScale:vn,isElement:st,isRTL:Cg};function yc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dg(e,t){let n=null,r;const o=vt(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:m,top:c,width:p,height:h}=u;if(i||t(),!p||!h)return;const y=xr(c),v=xr(o.clientWidth-(m+p)),g=xr(o.clientHeight-(c+h)),b=xr(m),S={rootMargin:-y+"px "+-v+"px "+-g+"px "+-b+"px",threshold:Xe(0,jt(1,l))||1};let D=!0;function C(R){const M=R[0].intersectionRatio;if(M!==l){if(!D)return s();M?s(!1,M):r=setTimeout(()=>{s(!1,1e-7)},1e3)}M===1&&!yc(u,e.getBoundingClientRect())&&s(),D=!1}try{n=new IntersectionObserver(C,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(e)}return s(!0),a}function kg(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ia(e),m=o||a?[...u?Vn(u):[],...Vn(t)]:[];m.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const c=u&&i?Dg(u,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let y,v=l?Zt(e):null;l&&g();function g(){const b=Zt(e);v&&!yc(v,b)&&n(),v=b,y=requestAnimationFrame(g)}return n(),()=>{var b;m.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),c==null||c(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const Eg=Zh,Ng=Qh,Rg=Vh,Tg=eg,_g=Kh,Xs=qh,Og=Jh,Pg=(e,t,n)=>{const r=new Map,o={platform:Mg,...n},a={...o.platform,_c:r};return Uh(e,t,{...o,platform:a})};var Ag=typeof document<"u",Ig=function(){},_r=Ag?x.useLayoutEffect:Ig;function Br(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Br(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Br(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function bc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zs(e,t){const n=bc(e);return Math.round(t*n)/n}function Po(e){const t=f.useRef(e);return _r(()=>{t.current=e}),t}function jg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[m,c]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=f.useState(r);Br(p,r)||h(r);const[y,v]=f.useState(null),[g,b]=f.useState(null),w=f.useCallback(k=>{k!==R.current&&(R.current=k,v(k))},[]),S=f.useCallback(k=>{k!==M.current&&(M.current=k,b(k))},[]),D=a||y,C=s||g,R=f.useRef(null),M=f.useRef(null),E=f.useRef(m),$=l!=null,B=Po(l),L=Po(o),q=Po(u),A=f.useCallback(()=>{if(!R.current||!M.current)return;const k={placement:t,strategy:n,middleware:p};L.current&&(k.platform=L.current),Pg(R.current,M.current,k).then(P=>{const H={...P,isPositioned:q.current!==!1};T.current&&!Br(E.current,H)&&(E.current=H,Zr.flushSync(()=>{c(H)}))})},[p,t,n,L,q]);_r(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,c(k=>({...k,isPositioned:!1})))},[u]);const T=f.useRef(!1);_r(()=>(T.current=!0,()=>{T.current=!1}),[]),_r(()=>{if(D&&(R.current=D),C&&(M.current=C),D&&C){if(B.current)return B.current(D,C,A);A()}},[D,C,A,B,$]);const _=f.useMemo(()=>({reference:R,floating:M,setReference:w,setFloating:S}),[w,S]),N=f.useMemo(()=>({reference:D,floating:C}),[D,C]),I=f.useMemo(()=>{const k={position:n,left:0,top:0};if(!N.floating)return k;const P=Zs(N.floating,m.x),H=Zs(N.floating,m.y);return i?{...k,transform:"translate("+P+"px, "+H+"px)",...bc(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:H}},[n,i,N.floating,m.x,m.y]);return f.useMemo(()=>({...m,update:A,refs:_,elements:N,floatingStyles:I}),[m,A,_,N,I])}const $g=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Xs({element:r.current,padding:o}).fn(n):{}:r?Xs({element:r,padding:o}).fn(n):{}}}},Lg=(e,t)=>({...Eg(e),options:[e,t]}),Fg=(e,t)=>({...Ng(e),options:[e,t]}),Wg=(e,t)=>({...Og(e),options:[e,t]}),Bg=(e,t)=>({...Rg(e),options:[e,t]}),Yg=(e,t)=>({...Tg(e),options:[e,t]}),Hg=(e,t)=>({..._g(e),options:[e,t]}),zg=(e,t)=>({...$g(e),options:[e,t]});var Gg="Arrow",wc=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(ee.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});wc.displayName=Gg;var Ug=wc;function $a(e){const[t,n]=f.useState(void 0);return Ne(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var La="Popper",[xc,Ft]=Be(La),[qg,Sc]=xc(La),Cc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return d.jsx(qg,{scope:t,anchor:r,onAnchorChange:o,children:n})};Cc.displayName=La;var Mc="PopperAnchor",Dc=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Sc(Mc,n),s=f.useRef(null),i=he(t,s);return f.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:d.jsx(ee.div,{...o,ref:i})});Dc.displayName=Mc;var Fa="PopperContent",[Vg,Kg]=xc(Fa),kc=f.forwardRef((e,t)=>{var F,Z,X,Q,se,ue;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:m=0,sticky:c="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...v}=e,g=Sc(Fa,n),[b,w]=f.useState(null),S=he(t,ye=>w(ye)),[D,C]=f.useState(null),R=$a(D),M=(R==null?void 0:R.width)??0,E=(R==null?void 0:R.height)??0,$=r+(a!=="center"?"-"+a:""),B=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},L=Array.isArray(u)?u:[u],q=L.length>0,A={padding:B,boundary:L.filter(Zg),altBoundary:q},{refs:T,floatingStyles:_,placement:N,isPositioned:I,middlewareData:k}=jg({strategy:"fixed",placement:$,whileElementsMounted:(...ye)=>kg(...ye,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[Lg({mainAxis:o+E,alignmentAxis:s}),l&&Fg({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Wg():void 0,...A}),l&&Bg({...A}),Yg({...A,apply:({elements:ye,rects:J,availableWidth:Re,availableHeight:Te})=>{const{width:oe,height:me}=J.reference,be=ye.floating.style;be.setProperty("--radix-popper-available-width",`${Re}px`),be.setProperty("--radix-popper-available-height",`${Te}px`),be.setProperty("--radix-popper-anchor-width",`${oe}px`),be.setProperty("--radix-popper-anchor-height",`${me}px`)}}),D&&zg({element:D,padding:i}),Qg({arrowWidth:M,arrowHeight:E}),p&&Hg({strategy:"referenceHidden",...A})]}),[P,H]=Rc(N),z=et(y);Ne(()=>{I&&(z==null||z())},[I,z]);const O=(F=k.arrow)==null?void 0:F.x,j=(Z=k.arrow)==null?void 0:Z.y,Y=((X=k.arrow)==null?void 0:X.centerOffset)!==0,[G,V]=f.useState();return Ne(()=>{b&&V(window.getComputedStyle(b).zIndex)},[b]),d.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:I?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(Q=k.transformOrigin)==null?void 0:Q.x,(se=k.transformOrigin)==null?void 0:se.y].join(" "),...((ue=k.hide)==null?void 0:ue.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Vg,{scope:n,placedSide:P,onArrowChange:C,arrowX:O,arrowY:j,shouldHideArrow:Y,children:d.jsx(ee.div,{"data-side":P,"data-align":H,...v,ref:S,style:{...v.style,animation:I?void 0:"none"}})})})});kc.displayName=Fa;var Ec="PopperArrow",Xg={top:"bottom",right:"left",bottom:"top",left:"right"},Nc=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Kg(Ec,r),s=Xg[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(Ug,{...o,ref:n,style:{...o.style,display:"block"}})})});Nc.displayName=Ec;function Zg(e){return e!==null}var Qg=e=>({name:"transformOrigin",options:e,fn(t){var g,b,w;const{placement:n,rects:r,middlewareData:o}=t,s=((g=o.arrow)==null?void 0:g.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,m]=Rc(n),c={start:"0%",center:"50%",end:"100%"}[m],p=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,h=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let y="",v="";return u==="bottom"?(y=s?c:`${p}px`,v=`${-l}px`):u==="top"?(y=s?c:`${p}px`,v=`${r.floating.height+l}px`):u==="right"?(y=`${-l}px`,v=s?c:`${h}px`):u==="left"&&(y=`${r.floating.width+l}px`,v=s?c:`${h}px`),{data:{x:y,y:v}}}});function Rc(e){const[t,n="center"]=e.split("-");return[t,n]}var or=Cc,ar=Dc,ro=kc,oo=Nc,Jg="Portal",sr=f.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=f.useState(!1);Ne(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?ka.createPortal(d.jsx(ee.div,{...r,ref:t}),s):null});sr.displayName=Jg;function ev(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var ze=e=>{const{present:t,children:n}=e,r=tv(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,nv(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};ze.displayName="Presence";function tv(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=ev(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Sr(r.current);a.current=i==="mounted"?u:"none"},[i]),Ne(()=>{const u=r.current,m=o.current;if(m!==e){const p=a.current,h=Sr(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(m&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ne(()=>{if(t){let u;const m=t.ownerDocument.defaultView??window,c=h=>{const v=Sr(r.current).includes(h.animationName);if(h.target===t&&v&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=h=>{h.target===t&&(a.current=Sr(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{m.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Sr(e){return(e==null?void 0:e.animationName)||"none"}function nv(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rv=f[" useInsertionEffect ".trim().toString()]||Ne;function tt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=ov({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const m=f.useRef(e!==void 0);f.useEffect(()=>{const c=m.current;c!==i&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=i},[i,r])}const u=f.useCallback(m=>{var c;if(i){const p=av(m)?m(e):m;p!==e&&((c=s.current)==null||c.call(s,p))}else a(m)},[i,e,a,s]);return[l,u]}function ov({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return rv(()=>{a.current=t},[t]),f.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function av(e){return typeof e=="function"}var sv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dn=new WeakMap,Cr=new WeakMap,Mr={},Ao=0,Tc=function(e){return e&&(e.host||Tc(e.parentNode))},iv=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Tc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},cv=function(e,t,n,r){var o=iv(t,Array.isArray(e)?e:[e]);Mr[n]||(Mr[n]=new WeakMap);var a=Mr[n],s=[],i=new Set,l=new Set(o),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};o.forEach(u);var m=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(i.has(p))m(p);else try{var h=p.getAttribute(r),y=h!==null&&h!=="false",v=(dn.get(p)||0)+1,g=(a.get(p)||0)+1;dn.set(p,v),a.set(p,g),s.push(p),v===1&&y&&Cr.set(p,!0),g===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return m(t),i.clear(),Ao++,function(){s.forEach(function(c){var p=dn.get(c)-1,h=a.get(c)-1;dn.set(c,p),a.set(c,h),p||(Cr.has(c)||c.removeAttribute(r),Cr.delete(c)),h||c.removeAttribute(n)}),Ao--,Ao||(dn=new WeakMap,dn=new WeakMap,Cr=new WeakMap,Mr={})}},ao=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=sv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),cv(r,o,n,"aria-hidden")):function(){return null}},ft=function(){return ft=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ft.apply(this,arguments)};function _c(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function lv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Or="right-scroll-bar-position",Pr="width-before-scroll-bar",uv="with-scroll-bars-hidden",dv="--removed-body-scroll-bar-size";function Io(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fv(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var mv=typeof window<"u"?f.useLayoutEffect:f.useEffect,Qs=new WeakMap;function pv(e,t){var n=fv(null,function(r){return e.forEach(function(o){return Io(o,r)})});return mv(function(){var r=Qs.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Io(i,null)}),a.forEach(function(i){o.has(i)||Io(i,s)})}Qs.set(n,e)},[e]),n}function hv(e){return e}function gv(e,t){t===void 0&&(t=hv);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var m=s;s=[],m.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(m){s.push(m),u()},filter:function(m){return s=s.filter(m),n}}}};return o}function vv(e){e===void 0&&(e={});var t=gv(null);return t.options=ft({async:!0,ssr:!1},e),t}var Oc=function(e){var t=e.sideCar,n=_c(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 f.createElement(r,ft({},n))};Oc.isSideCarExport=!0;function yv(e,t){return e.useMedium(t),Oc}var Pc=vv(),jo=function(){},so=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:jo,onWheelCapture:jo,onTouchMoveCapture:jo}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,m=e.enabled,c=e.shards,p=e.sideCar,h=e.noRelative,y=e.noIsolation,v=e.inert,g=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,S=e.gapMode,D=_c(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,R=pv([n,t]),M=ft(ft({},D),o);return f.createElement(f.Fragment,null,m&&f.createElement(C,{sideCar:Pc,removeScrollBar:u,shards:c,noRelative:h,noIsolation:y,inert:v,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:S}),s?f.cloneElement(f.Children.only(i),ft(ft({},M),{ref:R})):f.createElement(w,ft({},M,{className:l,ref:R}),i))});so.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};so.classNames={fullWidth:Pr,zeroRight:Or};var bv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bv();return t&&e.setAttribute("nonce",t),e}function xv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Sv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Cv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wv())&&(xv(t,n),Sv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mv=function(){var e=Cv();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ac=function(){var e=Mv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Dv={left:0,top:0,right:0,gap:0},$o=function(e){return parseInt(e||"",10)||0},kv=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[$o(n),$o(r),$o(o)]},Ev=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dv;var t=kv(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])}},Nv=Ac(),yn="data-scroll-locked",Rv=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
111
+ */const hh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],kn=je("X",hh);function ra({label:e,placeholder:t="Enter password",helperText:n,error:r,required:o,className:a,showPassword:s=!1,onShowPasswordChange:i,value:l,onChange:u,...m}){return d.jsxs("div",{className:W("space-y-1",a),children:[e&&d.jsxs(rn,{className:"text-sm font-medium text-gray-700",children:[e,o&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs("div",{className:"relative",children:[d.jsx(nn,{type:s?"text":"password",placeholder:t,className:W("pr-10",r&&"border-red-500 focus-visible:ring-red-500"),value:l,onChange:c=>u==null?void 0:u(c.target.value),...m}),d.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground cursor-pointer",onClick:()=>i==null?void 0:i(!s),"aria-label":s?"Hide password":"Show password",children:s?d.jsx(eh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"}):d.jsx(nh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"})})]}),r&&d.jsx("p",{className:"text-xs text-red-500",children:r}),n&&!r&&d.jsx("p",{className:"text-xs text-gray-500",children:n})]})}const Ra=f.forwardRef(({label:e,helperText:t,errorText:n,required:r,className:o,placeholder:a="Write here...",rows:s=4,...i},l)=>{const u=!!n;return d.jsxs("div",{className:W("space-y-1",o),children:[e&&d.jsxs("label",{className:"block text-sm font-medium text-foreground",children:[e,r&&d.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),d.jsx("textarea",{ref:l,placeholder:a,rows:s,className:W("flex min-h-[80px] w-full rounded-md border bg-background px-3 py-2 text-base placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",u?"border-destructive focus:ring-destructive":"border-input focus:ring-ring"),...i}),(t||n)&&d.jsx("p",{className:W("text-xs",u?"text-destructive":"text-muted-foreground"),children:n||t})]})});Ra.displayName="Textarea";function K(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function gh(e,t){const n=f.createContext(t),r=a=>{const{children:s,...i}=a,l=f.useMemo(()=>i,Object.values(i));return d.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(a){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Be(e,t=[]){let n=[];function r(a,s){const i=f.createContext(s),l=n.length;n=[...n,s];const u=c=>{var b;const{scope:p,children:h,...y}=c,v=((b=p==null?void 0:p[e])==null?void 0:b[l])||i,g=f.useMemo(()=>y,Object.values(y));return d.jsx(v.Provider,{value:g,children:h})};u.displayName=a+"Provider";function m(c,p){var v;const h=((v=p==null?void 0:p[e])==null?void 0:v[l])||i,y=f.useContext(h);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,m]}const o=()=>{const a=n.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,vh(o,...t)]}function vh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function et(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function yh(e,t=globalThis==null?void 0:globalThis.document){const n=et(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var bh="DismissableLayer",oa="dismissableLayer.update",wh="dismissableLayer.pointerDownOutside",xh="dismissableLayer.focusOutside",Is,sc=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),En=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(sc),[m,c]=f.useState(null),p=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=f.useState({}),y=he(t,M=>c(M)),v=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(g),w=m?v.indexOf(m):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=b,C=Mh(M=>{const E=M.target,$=[...u.branches].some(B=>B.contains(E));!D||$||(o==null||o(M),s==null||s(M),M.defaultPrevented||i==null||i())},p),N=Dh(M=>{const E=M.target;[...u.branches].some(B=>B.contains(E))||(a==null||a(M),s==null||s(M),M.defaultPrevented||i==null||i())},p);return yh(M=>{w===u.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&i&&(M.preventDefault(),i()))},p),f.useEffect(()=>{if(m)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Is=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),js(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Is)}},[m,p,n,u]),f.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),js())},[m,u]),f.useEffect(()=>{const M=()=>h({});return document.addEventListener(oa,M),()=>document.removeEventListener(oa,M)},[]),d.jsx(ee.div,{...l,ref:y,style:{pointerEvents:S?D?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,N.onFocusCapture),onBlurCapture:K(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,C.onPointerDownCapture)})});En.displayName=bh;var Sh="DismissableLayerBranch",Ch=f.forwardRef((e,t)=>{const n=f.useContext(sc),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(ee.div,{...e,ref:o})});Ch.displayName=Sh;function Mh(e,t=globalThis==null?void 0:globalThis.document){const n=et(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){ic(wh,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Dh(e,t=globalThis==null?void 0:globalThis.document){const n=et(e),r=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!r.current&&ic(xh,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function js(){const e=new CustomEvent(oa);document.dispatchEvent(e)}function ic(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Zi(o,a):o.dispatchEvent(a)}var Ro=0;function Jr(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$s()),document.body.insertAdjacentElement("beforeend",e[1]??$s()),Ro++,()=>{Ro===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ro--}},[])}function $s(){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 To="focusScope.autoFocusOnMount",_o="focusScope.autoFocusOnUnmount",Ls={bubbles:!1,cancelable:!0},kh="FocusScope",nr=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=et(o),m=et(a),c=f.useRef(null),p=he(t,v=>l(v)),h=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let v=function(S){if(h.paused||!i)return;const D=S.target;i.contains(D)?c.current=D:Pt(c.current,{select:!0})},g=function(S){if(h.paused||!i)return;const D=S.relatedTarget;D!==null&&(i.contains(D)||Pt(c.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const C of S)C.removedNodes.length>0&&Pt(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",g);const w=new MutationObserver(b);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",g),w.disconnect()}}},[r,i,h.paused]),f.useEffect(()=>{if(i){Ws.add(h);const v=document.activeElement;if(!i.contains(v)){const b=new CustomEvent(To,Ls);i.addEventListener(To,u),i.dispatchEvent(b),b.defaultPrevented||(Eh(Oh(cc(i)),{select:!0}),document.activeElement===v&&Pt(i))}return()=>{i.removeEventListener(To,u),setTimeout(()=>{const b=new CustomEvent(_o,Ls);i.addEventListener(_o,m),i.dispatchEvent(b),b.defaultPrevented||Pt(v??document.body,{select:!0}),i.removeEventListener(_o,m),Ws.remove(h)},0)}}},[i,u,m,h]);const y=f.useCallback(v=>{if(!n&&!r||h.paused)return;const g=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(g&&b){const w=v.currentTarget,[S,D]=Nh(w);S&&D?!v.shiftKey&&b===D?(v.preventDefault(),n&&Pt(S,{select:!0})):v.shiftKey&&b===S&&(v.preventDefault(),n&&Pt(D,{select:!0})):b===w&&v.preventDefault()}},[n,r,h.paused]);return d.jsx(ee.div,{tabIndex:-1,...s,ref:p,onKeyDown:y})});nr.displayName=kh;function Eh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Pt(r,{select:t}),document.activeElement!==n)return}function Nh(e){const t=cc(e),n=Fs(t,e),r=Fs(t.reverse(),e);return[n,r]}function cc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Fs(e,t){for(const n of e)if(!Rh(n,{upTo:t}))return n}function Rh(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 Th(e){return e instanceof HTMLInputElement&&"select"in e}function Pt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Th(e)&&t&&e.select()}}var Ws=_h();function _h(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Bs(e,t),e.unshift(t)},remove(t){var n;e=Bs(e,t),(n=e[0])==null||n.resume()}}}function Bs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Oh(e){return e.filter(t=>t.tagName!=="A")}var Ne=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Ph=f[" useId ".trim().toString()]||(()=>{}),Ah=0;function ke(e){const[t,n]=f.useState(Ph());return Ne(()=>{n(r=>r??String(Ah++))},[e]),e||(t?`radix-${t}`:"")}const Ih=["top","right","bottom","left"],jt=Math.min,Xe=Math.max,Lr=Math.round,xr=Math.floor,ht=e=>({x:e,y:e}),jh={left:"right",right:"left",bottom:"top",top:"bottom"},$h={start:"end",end:"start"};function aa(e,t,n){return Xe(e,jt(t,n))}function kt(e,t){return typeof e=="function"?e(t):e}function Et(e){return e.split("-")[0]}function Nn(e){return e.split("-")[1]}function Ta(e){return e==="x"?"y":"x"}function _a(e){return e==="y"?"height":"width"}const Lh=new Set(["top","bottom"]);function mt(e){return Lh.has(Et(e))?"y":"x"}function Oa(e){return Ta(mt(e))}function Fh(e,t,n){n===void 0&&(n=!1);const r=Nn(e),o=Oa(e),a=_a(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Fr(s)),[s,Fr(s)]}function Wh(e){const t=Fr(e);return[sa(e),t,sa(t)]}function sa(e){return e.replace(/start|end/g,t=>$h[t])}const Ys=["left","right"],Hs=["right","left"],Bh=["top","bottom"],Yh=["bottom","top"];function Hh(e,t,n){switch(e){case"top":case"bottom":return n?t?Hs:Ys:t?Ys:Hs;case"left":case"right":return t?Bh:Yh;default:return[]}}function zh(e,t,n,r){const o=Nn(e);let a=Hh(Et(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(sa)))),a}function Fr(e){return e.replace(/left|right|bottom|top/g,t=>jh[t])}function Gh(e){return{top:0,right:0,bottom:0,left:0,...e}}function lc(e){return typeof e!="number"?Gh(e):{top:e,right:e,bottom:e,left:e}}function Wr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function zs(e,t,n){let{reference:r,floating:o}=e;const a=mt(t),s=Oa(t),i=_a(s),l=Et(t),u=a==="y",m=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,p=r[i]/2-o[i]/2;let h;switch(l){case"top":h={x:m,y:r.y-o.height};break;case"bottom":h={x:m,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-o.width,y:c};break;default:h={x:r.x,y:r.y}}switch(Nn(t)){case"start":h[s]-=p*(n&&u?-1:1);break;case"end":h[s]+=p*(n&&u?-1:1);break}return h}const Uh=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:c}=zs(u,r,l),p=r,h={},y=0;for(let v=0;v<i.length;v++){const{name:g,fn:b}=i[v],{x:w,y:S,data:D,reset:C}=await b({x:m,y:c,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});m=w??m,c=S??c,h={...h,[g]:{...h[g],...D}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:m,y:c}=zs(u,p,l)),v=-1)}return{x:m,y:c,placement:p,strategy:o,middlewareData:h}};async function qn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:c="floating",altBoundary:p=!1,padding:h=0}=kt(t,e),y=lc(h),g=i[p?c==="floating"?"reference":"floating":c],b=Wr(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:m,strategy:l})),w=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),D=await(a.isElement==null?void 0:a.isElement(S))?await(a.getScale==null?void 0:a.getScale(S))||{x:1,y:1}:{x:1,y:1},C=Wr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:S,strategy:l}):w);return{top:(b.top-C.top+y.top)/D.y,bottom:(C.bottom-b.bottom+y.bottom)/D.y,left:(b.left-C.left+y.left)/D.x,right:(C.right-b.right+y.right)/D.x}}const qh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:m=0}=kt(e,t)||{};if(u==null)return{};const c=lc(m),p={x:n,y:r},h=Oa(o),y=_a(h),v=await s.getDimensions(u),g=h==="y",b=g?"top":"left",w=g?"bottom":"right",S=g?"clientHeight":"clientWidth",D=a.reference[y]+a.reference[h]-p[h]-a.floating[y],C=p[h]-a.reference[h],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let M=N?N[S]:0;(!M||!await(s.isElement==null?void 0:s.isElement(N)))&&(M=i.floating[S]||a.floating[y]);const E=D/2-C/2,$=M/2-v[y]/2-1,B=jt(c[b],$),L=jt(c[w],$),q=B,A=M-v[y]-L,T=M/2-v[y]/2+E,_=aa(q,T,A),R=!l.arrow&&Nn(o)!=null&&T!==_&&a.reference[y]/2-(T<q?B:L)-v[y]/2<0,I=R?T<q?T-q:T-A:0;return{[h]:p[h]+I,data:{[h]:_,centerOffset:T-_-I,...R&&{alignmentOffset:I}},reset:R}}}),Vh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:m=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...g}=kt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=Et(o),w=mt(i),S=Et(i)===i,D=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=p||(S||!v?[Fr(i)]:Wh(i)),N=y!=="none";!p&&N&&C.push(...zh(i,v,y,D));const M=[i,...C],E=await qn(t,g),$=[];let B=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&$.push(E[b]),c){const T=Fh(o,s,D);$.push(E[T[0]],E[T[1]])}if(B=[...B,{placement:o,overflows:$}],!$.every(T=>T<=0)){var L,q;const T=(((L=a.flip)==null?void 0:L.index)||0)+1,_=M[T];if(_&&(!(c==="alignment"?w!==mt(_):!1)||B.every(k=>k.overflows[0]>0&&mt(k.placement)===w)))return{data:{index:T,overflows:B},reset:{placement:_}};let R=(q=B.filter(I=>I.overflows[0]<=0).sort((I,k)=>I.overflows[1]-k.overflows[1])[0])==null?void 0:q.placement;if(!R)switch(h){case"bestFit":{var A;const I=(A=B.filter(k=>{if(N){const P=mt(k.placement);return P===w||P==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(P=>P>0).reduce((P,H)=>P+H,0)]).sort((k,P)=>k[1]-P[1])[0])==null?void 0:A[0];I&&(R=I);break}case"initialPlacement":R=i;break}if(o!==R)return{reset:{placement:R}}}return{}}}};function Gs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Us(e){return Ih.some(t=>e[t]>=0)}const Kh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=kt(e,t);switch(r){case"referenceHidden":{const a=await qn(t,{...o,elementContext:"reference"}),s=Gs(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Us(s)}}}case"escaped":{const a=await qn(t,{...o,altBoundary:!0}),s=Gs(a,n.floating);return{data:{escapedOffsets:s,escaped:Us(s)}}}default:return{}}}}},uc=new Set(["left","top"]);async function Xh(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Et(n),i=Nn(n),l=mt(n)==="y",u=uc.has(s)?-1:1,m=a&&l?-1:1,c=kt(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:y}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof y=="number"&&(h=i==="end"?y*-1:y),l?{x:h*m,y:p*u}:{x:p*u,y:h*m}}const Zh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await Xh(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Qh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...l}=kt(e,t),u={x:n,y:r},m=await qn(t,l),c=mt(Et(o)),p=Ta(c);let h=u[p],y=u[c];if(a){const g=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=h+m[g],S=h-m[b];h=aa(w,h,S)}if(s){const g=c==="y"?"top":"left",b=c==="y"?"bottom":"right",w=y+m[g],S=y-m[b];y=aa(w,y,S)}const v=i.fn({...t,[p]:h,[c]:y});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:a,[c]:s}}}}}},Jh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=kt(e,t),m={x:n,y:r},c=mt(o),p=Ta(c);let h=m[p],y=m[c];const v=kt(i,t),g=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const S=p==="y"?"height":"width",D=a.reference[p]-a.floating[S]+g.mainAxis,C=a.reference[p]+a.reference[S]-g.mainAxis;h<D?h=D:h>C&&(h=C)}if(u){var b,w;const S=p==="y"?"width":"height",D=uc.has(Et(o)),C=a.reference[c]-a.floating[S]+(D&&((b=s.offset)==null?void 0:b[c])||0)+(D?0:g.crossAxis),N=a.reference[c]+a.reference[S]+(D?0:((w=s.offset)==null?void 0:w[c])||0)-(D?g.crossAxis:0);y<C?y=C:y>N&&(y=N)}return{[p]:h,[c]:y}}}},eg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=kt(e,t),m=await qn(t,u),c=Et(o),p=Nn(o),h=mt(o)==="y",{width:y,height:v}=a.floating;let g,b;c==="top"||c==="bottom"?(g=c,b=p===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=c,g=p==="end"?"top":"bottom");const w=v-m.top-m.bottom,S=y-m.left-m.right,D=jt(v-m[g],w),C=jt(y-m[b],S),N=!t.middlewareData.shift;let M=D,E=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=w),N&&!p){const B=Xe(m.left,0),L=Xe(m.right,0),q=Xe(m.top,0),A=Xe(m.bottom,0);h?E=y-2*(B!==0||L!==0?B+L:Xe(m.left,m.right)):M=v-2*(q!==0||A!==0?q+A:Xe(m.top,m.bottom))}await l({...t,availableWidth:E,availableHeight:M});const $=await s.getDimensions(i.floating);return y!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function eo(){return typeof window<"u"}function Rn(e){return dc(e)?(e.nodeName||"").toLowerCase():"#document"}function Ze(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vt(e){var t;return(t=(dc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dc(e){return eo()?e instanceof Node||e instanceof Ze(e).Node:!1}function st(e){return eo()?e instanceof Element||e instanceof Ze(e).Element:!1}function gt(e){return eo()?e instanceof HTMLElement||e instanceof Ze(e).HTMLElement:!1}function qs(e){return!eo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ze(e).ShadowRoot}const tg=new Set(["inline","contents"]);function rr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!tg.has(o)}const ng=new Set(["table","td","th"]);function rg(e){return ng.has(Rn(e))}const og=[":popover-open",":modal"];function to(e){return og.some(t=>{try{return e.matches(t)}catch{return!1}})}const ag=["transform","translate","scale","rotate","perspective"],sg=["transform","translate","scale","rotate","perspective","filter"],ig=["paint","layout","strict","content"];function Pa(e){const t=Aa(),n=st(e)?it(e):e;return ag.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||sg.some(r=>(n.willChange||"").includes(r))||ig.some(r=>(n.contain||"").includes(r))}function cg(e){let t=$t(e);for(;gt(t)&&!bn(t);){if(Pa(t))return t;if(to(t))return null;t=$t(t)}return null}function Aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lg=new Set(["html","body","#document"]);function bn(e){return lg.has(Rn(e))}function it(e){return Ze(e).getComputedStyle(e)}function no(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $t(e){if(Rn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qs(e)&&e.host||vt(e);return qs(t)?t.host:t}function fc(e){const t=$t(e);return bn(t)?e.ownerDocument?e.ownerDocument.body:e.body:gt(t)&&rr(t)?t:fc(t)}function Vn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=fc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ze(o);if(a){const i=ia(s);return t.concat(s,s.visualViewport||[],rr(o)?o:[],i&&n?Vn(i):[])}return t.concat(o,Vn(o,[],n))}function ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mc(e){const t=it(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=gt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Lr(n)!==a||Lr(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Ia(e){return st(e)?e:e.contextElement}function vn(e){const t=Ia(e);if(!gt(t))return ht(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mc(t);let s=(a?Lr(n.width):n.width)/r,i=(a?Lr(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const ug=ht(0);function pc(e){const t=Ze(e);return!Aa()||!t.visualViewport?ug:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ze(e)?!1:t}function Zt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ia(e);let s=ht(1);t&&(r?st(r)&&(s=vn(r)):s=vn(e));const i=dg(a,n,r)?pc(a):ht(0);let l=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,m=o.width/s.x,c=o.height/s.y;if(a){const p=Ze(a),h=r&&st(r)?Ze(r):r;let y=p,v=ia(y);for(;v&&r&&h!==y;){const g=vn(v),b=v.getBoundingClientRect(),w=it(v),S=b.left+(v.clientLeft+parseFloat(w.paddingLeft))*g.x,D=b.top+(v.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,u*=g.y,m*=g.x,c*=g.y,l+=S,u+=D,y=Ze(v),v=ia(y)}}return Wr({width:m,height:c,x:l,y:u})}function ja(e,t){const n=no(e).scrollLeft;return t?t.left+n:Zt(vt(e)).left+n}function hc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ja(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function fg(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=vt(r),i=t?to(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},u=ht(1);const m=ht(0),c=gt(r);if((c||!c&&!a)&&((Rn(r)!=="body"||rr(s))&&(l=no(r)),gt(r))){const h=Zt(r);u=vn(r),m.x=h.x+r.clientLeft,m.y=h.y+r.clientTop}const p=s&&!c&&!a?hc(s,l,!0):ht(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+m.x+p.x,y:n.y*u.y-l.scrollTop*u.y+m.y+p.y}}function mg(e){return Array.from(e.getClientRects())}function pg(e){const t=vt(e),n=no(e),r=e.ownerDocument.body,o=Xe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Xe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ja(e);const i=-n.scrollTop;return it(r).direction==="rtl"&&(s+=Xe(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function hg(e,t){const n=Ze(e),r=vt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const u=Aa();(!u||u&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}const gg=new Set(["absolute","fixed"]);function vg(e,t){const n=Zt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=gt(e)?vn(e):ht(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,u=r*a.y;return{width:s,height:i,x:l,y:u}}function Vs(e,t,n){let r;if(t==="viewport")r=hg(e,n);else if(t==="document")r=pg(vt(e));else if(st(t))r=vg(t,n);else{const o=pc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Wr(r)}function gc(e,t){const n=$t(e);return n===t||!st(n)||bn(n)?!1:it(n).position==="fixed"||gc(n,t)}function yg(e,t){const n=t.get(e);if(n)return n;let r=Vn(e,[],!1).filter(i=>st(i)&&Rn(i)!=="body"),o=null;const a=it(e).position==="fixed";let s=a?$t(e):e;for(;st(s)&&!bn(s);){const i=it(s),l=Pa(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&gg.has(o.position)||rr(s)&&!l&&gc(e,s))?r=r.filter(m=>m!==s):o=i,s=$t(s)}return t.set(e,r),r}function bg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?to(t)?[]:yg(t,this._c):[].concat(n),r],i=s[0],l=s.reduce((u,m)=>{const c=Vs(t,m,o);return u.top=Xe(c.top,u.top),u.right=jt(c.right,u.right),u.bottom=jt(c.bottom,u.bottom),u.left=Xe(c.left,u.left),u},Vs(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function wg(e){const{width:t,height:n}=mc(e);return{width:t,height:n}}function xg(e,t,n){const r=gt(t),o=vt(t),a=n==="fixed",s=Zt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=ht(0);function u(){l.x=ja(o)}if(r||!r&&!a)if((Rn(t)!=="body"||rr(o))&&(i=no(t)),r){const h=Zt(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&u();a&&!r&&o&&u();const m=o&&!r&&!a?hc(o,i):ht(0),c=s.left+i.scrollLeft-l.x-m.x,p=s.top+i.scrollTop-l.y-m.y;return{x:c,y:p,width:s.width,height:s.height}}function Oo(e){return it(e).position==="static"}function Ks(e,t){if(!gt(e)||it(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return vt(e)===n&&(n=n.ownerDocument.body),n}function vc(e,t){const n=Ze(e);if(to(e))return n;if(!gt(e)){let o=$t(e);for(;o&&!bn(o);){if(st(o)&&!Oo(o))return o;o=$t(o)}return n}let r=Ks(e,t);for(;r&&rg(r)&&Oo(r);)r=Ks(r,t);return r&&bn(r)&&Oo(r)&&!Pa(r)?n:r||cg(e)||n}const Sg=async function(e){const t=this.getOffsetParent||vc,n=this.getDimensions,r=await n(e.floating);return{reference:xg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Cg(e){return it(e).direction==="rtl"}const Mg={convertOffsetParentRelativeRectToViewportRelativeRect:fg,getDocumentElement:vt,getClippingRect:bg,getOffsetParent:vc,getElementRects:Sg,getClientRects:mg,getDimensions:wg,getScale:vn,isElement:st,isRTL:Cg};function yc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Dg(e,t){let n=null,r;const o=vt(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:m,top:c,width:p,height:h}=u;if(i||t(),!p||!h)return;const y=xr(c),v=xr(o.clientWidth-(m+p)),g=xr(o.clientHeight-(c+h)),b=xr(m),S={rootMargin:-y+"px "+-v+"px "+-g+"px "+-b+"px",threshold:Xe(0,jt(1,l))||1};let D=!0;function C(N){const M=N[0].intersectionRatio;if(M!==l){if(!D)return s();M?s(!1,M):r=setTimeout(()=>{s(!1,1e-7)},1e3)}M===1&&!yc(u,e.getBoundingClientRect())&&s(),D=!1}try{n=new IntersectionObserver(C,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(e)}return s(!0),a}function kg(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ia(e),m=o||a?[...u?Vn(u):[],...Vn(t)]:[];m.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const c=u&&i?Dg(u,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let y,v=l?Zt(e):null;l&&g();function g(){const b=Zt(e);v&&!yc(v,b)&&n(),v=b,y=requestAnimationFrame(g)}return n(),()=>{var b;m.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),c==null||c(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const Eg=Zh,Ng=Qh,Rg=Vh,Tg=eg,_g=Kh,Xs=qh,Og=Jh,Pg=(e,t,n)=>{const r=new Map,o={platform:Mg,...n},a={...o.platform,_c:r};return Uh(e,t,{...o,platform:a})};var Ag=typeof document<"u",Ig=function(){},_r=Ag?x.useLayoutEffect:Ig;function Br(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Br(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Br(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function bc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zs(e,t){const n=bc(e);return Math.round(t*n)/n}function Po(e){const t=f.useRef(e);return _r(()=>{t.current=e}),t}function jg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[m,c]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=f.useState(r);Br(p,r)||h(r);const[y,v]=f.useState(null),[g,b]=f.useState(null),w=f.useCallback(k=>{k!==N.current&&(N.current=k,v(k))},[]),S=f.useCallback(k=>{k!==M.current&&(M.current=k,b(k))},[]),D=a||y,C=s||g,N=f.useRef(null),M=f.useRef(null),E=f.useRef(m),$=l!=null,B=Po(l),L=Po(o),q=Po(u),A=f.useCallback(()=>{if(!N.current||!M.current)return;const k={placement:t,strategy:n,middleware:p};L.current&&(k.platform=L.current),Pg(N.current,M.current,k).then(P=>{const H={...P,isPositioned:q.current!==!1};T.current&&!Br(E.current,H)&&(E.current=H,Zr.flushSync(()=>{c(H)}))})},[p,t,n,L,q]);_r(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,c(k=>({...k,isPositioned:!1})))},[u]);const T=f.useRef(!1);_r(()=>(T.current=!0,()=>{T.current=!1}),[]),_r(()=>{if(D&&(N.current=D),C&&(M.current=C),D&&C){if(B.current)return B.current(D,C,A);A()}},[D,C,A,B,$]);const _=f.useMemo(()=>({reference:N,floating:M,setReference:w,setFloating:S}),[w,S]),R=f.useMemo(()=>({reference:D,floating:C}),[D,C]),I=f.useMemo(()=>{const k={position:n,left:0,top:0};if(!R.floating)return k;const P=Zs(R.floating,m.x),H=Zs(R.floating,m.y);return i?{...k,transform:"translate("+P+"px, "+H+"px)",...bc(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:H}},[n,i,R.floating,m.x,m.y]);return f.useMemo(()=>({...m,update:A,refs:_,elements:R,floatingStyles:I}),[m,A,_,R,I])}const $g=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Xs({element:r.current,padding:o}).fn(n):{}:r?Xs({element:r,padding:o}).fn(n):{}}}},Lg=(e,t)=>({...Eg(e),options:[e,t]}),Fg=(e,t)=>({...Ng(e),options:[e,t]}),Wg=(e,t)=>({...Og(e),options:[e,t]}),Bg=(e,t)=>({...Rg(e),options:[e,t]}),Yg=(e,t)=>({...Tg(e),options:[e,t]}),Hg=(e,t)=>({..._g(e),options:[e,t]}),zg=(e,t)=>({...$g(e),options:[e,t]});var Gg="Arrow",wc=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(ee.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});wc.displayName=Gg;var Ug=wc;function $a(e){const[t,n]=f.useState(void 0);return Ne(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var La="Popper",[xc,Ft]=Be(La),[qg,Sc]=xc(La),Cc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return d.jsx(qg,{scope:t,anchor:r,onAnchorChange:o,children:n})};Cc.displayName=La;var Mc="PopperAnchor",Dc=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Sc(Mc,n),s=f.useRef(null),i=he(t,s);return f.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:d.jsx(ee.div,{...o,ref:i})});Dc.displayName=Mc;var Fa="PopperContent",[Vg,Kg]=xc(Fa),kc=f.forwardRef((e,t)=>{var F,Z,X,Q,se,ue;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:m=0,sticky:c="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...v}=e,g=Sc(Fa,n),[b,w]=f.useState(null),S=he(t,ye=>w(ye)),[D,C]=f.useState(null),N=$a(D),M=(N==null?void 0:N.width)??0,E=(N==null?void 0:N.height)??0,$=r+(a!=="center"?"-"+a:""),B=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},L=Array.isArray(u)?u:[u],q=L.length>0,A={padding:B,boundary:L.filter(Zg),altBoundary:q},{refs:T,floatingStyles:_,placement:R,isPositioned:I,middlewareData:k}=jg({strategy:"fixed",placement:$,whileElementsMounted:(...ye)=>kg(...ye,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[Lg({mainAxis:o+E,alignmentAxis:s}),l&&Fg({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Wg():void 0,...A}),l&&Bg({...A}),Yg({...A,apply:({elements:ye,rects:J,availableWidth:Re,availableHeight:Te})=>{const{width:oe,height:me}=J.reference,be=ye.floating.style;be.setProperty("--radix-popper-available-width",`${Re}px`),be.setProperty("--radix-popper-available-height",`${Te}px`),be.setProperty("--radix-popper-anchor-width",`${oe}px`),be.setProperty("--radix-popper-anchor-height",`${me}px`)}}),D&&zg({element:D,padding:i}),Qg({arrowWidth:M,arrowHeight:E}),p&&Hg({strategy:"referenceHidden",...A})]}),[P,H]=Rc(R),z=et(y);Ne(()=>{I&&(z==null||z())},[I,z]);const O=(F=k.arrow)==null?void 0:F.x,j=(Z=k.arrow)==null?void 0:Z.y,Y=((X=k.arrow)==null?void 0:X.centerOffset)!==0,[G,V]=f.useState();return Ne(()=>{b&&V(window.getComputedStyle(b).zIndex)},[b]),d.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:I?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(Q=k.transformOrigin)==null?void 0:Q.x,(se=k.transformOrigin)==null?void 0:se.y].join(" "),...((ue=k.hide)==null?void 0:ue.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Vg,{scope:n,placedSide:P,onArrowChange:C,arrowX:O,arrowY:j,shouldHideArrow:Y,children:d.jsx(ee.div,{"data-side":P,"data-align":H,...v,ref:S,style:{...v.style,animation:I?void 0:"none"}})})})});kc.displayName=Fa;var Ec="PopperArrow",Xg={top:"bottom",right:"left",bottom:"top",left:"right"},Nc=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Kg(Ec,r),s=Xg[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(Ug,{...o,ref:n,style:{...o.style,display:"block"}})})});Nc.displayName=Ec;function Zg(e){return e!==null}var Qg=e=>({name:"transformOrigin",options:e,fn(t){var g,b,w;const{placement:n,rects:r,middlewareData:o}=t,s=((g=o.arrow)==null?void 0:g.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,m]=Rc(n),c={start:"0%",center:"50%",end:"100%"}[m],p=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,h=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let y="",v="";return u==="bottom"?(y=s?c:`${p}px`,v=`${-l}px`):u==="top"?(y=s?c:`${p}px`,v=`${r.floating.height+l}px`):u==="right"?(y=`${-l}px`,v=s?c:`${h}px`):u==="left"&&(y=`${r.floating.width+l}px`,v=s?c:`${h}px`),{data:{x:y,y:v}}}});function Rc(e){const[t,n="center"]=e.split("-");return[t,n]}var or=Cc,ar=Dc,ro=kc,oo=Nc,Jg="Portal",sr=f.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=f.useState(!1);Ne(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?ka.createPortal(d.jsx(ee.div,{...r,ref:t}),s):null});sr.displayName=Jg;function ev(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var ze=e=>{const{present:t,children:n}=e,r=tv(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,nv(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};ze.displayName="Presence";function tv(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=ev(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Sr(r.current);a.current=i==="mounted"?u:"none"},[i]),Ne(()=>{const u=r.current,m=o.current;if(m!==e){const p=a.current,h=Sr(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(m&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ne(()=>{if(t){let u;const m=t.ownerDocument.defaultView??window,c=h=>{const v=Sr(r.current).includes(h.animationName);if(h.target===t&&v&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=h=>{h.target===t&&(a.current=Sr(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{m.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Sr(e){return(e==null?void 0:e.animationName)||"none"}function nv(e){var r,o;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=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rv=f[" useInsertionEffect ".trim().toString()]||Ne;function tt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=ov({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const m=f.useRef(e!==void 0);f.useEffect(()=>{const c=m.current;c!==i&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=i},[i,r])}const u=f.useCallback(m=>{var c;if(i){const p=av(m)?m(e):m;p!==e&&((c=s.current)==null||c.call(s,p))}else a(m)},[i,e,a,s]);return[l,u]}function ov({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return rv(()=>{a.current=t},[t]),f.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function av(e){return typeof e=="function"}var sv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dn=new WeakMap,Cr=new WeakMap,Mr={},Ao=0,Tc=function(e){return e&&(e.host||Tc(e.parentNode))},iv=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Tc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},cv=function(e,t,n,r){var o=iv(t,Array.isArray(e)?e:[e]);Mr[n]||(Mr[n]=new WeakMap);var a=Mr[n],s=[],i=new Set,l=new Set(o),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};o.forEach(u);var m=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(i.has(p))m(p);else try{var h=p.getAttribute(r),y=h!==null&&h!=="false",v=(dn.get(p)||0)+1,g=(a.get(p)||0)+1;dn.set(p,v),a.set(p,g),s.push(p),v===1&&y&&Cr.set(p,!0),g===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return m(t),i.clear(),Ao++,function(){s.forEach(function(c){var p=dn.get(c)-1,h=a.get(c)-1;dn.set(c,p),a.set(c,h),p||(Cr.has(c)||c.removeAttribute(r),Cr.delete(c)),h||c.removeAttribute(n)}),Ao--,Ao||(dn=new WeakMap,dn=new WeakMap,Cr=new WeakMap,Mr={})}},ao=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=sv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),cv(r,o,n,"aria-hidden")):function(){return null}},ft=function(){return ft=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ft.apply(this,arguments)};function _c(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function lv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Or="right-scroll-bar-position",Pr="width-before-scroll-bar",uv="with-scroll-bars-hidden",dv="--removed-body-scroll-bar-size";function Io(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fv(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var mv=typeof window<"u"?f.useLayoutEffect:f.useEffect,Qs=new WeakMap;function pv(e,t){var n=fv(null,function(r){return e.forEach(function(o){return Io(o,r)})});return mv(function(){var r=Qs.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Io(i,null)}),a.forEach(function(i){o.has(i)||Io(i,s)})}Qs.set(n,e)},[e]),n}function hv(e){return e}function gv(e,t){t===void 0&&(t=hv);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var m=s;s=[],m.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(m){s.push(m),u()},filter:function(m){return s=s.filter(m),n}}}};return o}function vv(e){e===void 0&&(e={});var t=gv(null);return t.options=ft({async:!0,ssr:!1},e),t}var Oc=function(e){var t=e.sideCar,n=_c(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 f.createElement(r,ft({},n))};Oc.isSideCarExport=!0;function yv(e,t){return e.useMedium(t),Oc}var Pc=vv(),jo=function(){},so=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:jo,onWheelCapture:jo,onTouchMoveCapture:jo}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,m=e.enabled,c=e.shards,p=e.sideCar,h=e.noRelative,y=e.noIsolation,v=e.inert,g=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,S=e.gapMode,D=_c(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,N=pv([n,t]),M=ft(ft({},D),o);return f.createElement(f.Fragment,null,m&&f.createElement(C,{sideCar:Pc,removeScrollBar:u,shards:c,noRelative:h,noIsolation:y,inert:v,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:S}),s?f.cloneElement(f.Children.only(i),ft(ft({},M),{ref:N})):f.createElement(w,ft({},M,{className:l,ref:N}),i))});so.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};so.classNames={fullWidth:Pr,zeroRight:Or};var bv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bv();return t&&e.setAttribute("nonce",t),e}function xv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Sv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Cv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wv())&&(xv(t,n),Sv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mv=function(){var e=Cv();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ac=function(){var e=Mv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Dv={left:0,top:0,right:0,gap:0},$o=function(e){return parseInt(e||"",10)||0},kv=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[$o(n),$o(r),$o(o)]},Ev=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dv;var t=kv(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])}},Nv=Ac(),yn="data-scroll-locked",Rv=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
112
112
  .`.concat(uv,` {
113
113
  overflow: hidden `).concat(r,`;
114
114
  padding-right: `).concat(i,"px ").concat(r,`;
@@ -148,24 +148,24 @@
148
148
  `)},Js=function(){var e=parseInt(document.body.getAttribute(yn)||"0",10);return isFinite(e)?e:0},Tv=function(){f.useEffect(function(){return document.body.setAttribute(yn,(Js()+1).toString()),function(){var e=Js()-1;e<=0?document.body.removeAttribute(yn):document.body.setAttribute(yn,e.toString())}},[])},_v=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Tv();var a=f.useMemo(function(){return Ev(o)},[o]);return f.createElement(Nv,{styles:Rv(a,!t,o,n?"":"!important")})},ca=!1;if(typeof window<"u")try{var Dr=Object.defineProperty({},"passive",{get:function(){return ca=!0,!0}});window.addEventListener("test",Dr,Dr),window.removeEventListener("test",Dr,Dr)}catch{ca=!1}var fn=ca?{passive:!1}:!1,Ov=function(e){return e.tagName==="TEXTAREA"},Ic=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ov(e)&&n[t]==="visible")},Pv=function(e){return Ic(e,"overflowY")},Av=function(e){return Ic(e,"overflowX")},ei=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=jc(e,r);if(o){var a=$c(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Iv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},jv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},jc=function(e,t){return e==="v"?Pv(t):Av(t)},$c=function(e,t){return e==="v"?Iv(t):jv(t)},$v=function(e,t){return e==="h"&&t==="rtl"?-1:1},Lv=function(e,t,n,r,o){var a=$v(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,l=t.contains(i),u=!1,m=s>0,c=0,p=0;do{if(!i)break;var h=$c(e,i),y=h[0],v=h[1],g=h[2],b=v-g-a*y;(y||b)&&jc(e,i)&&(c+=b,p+=y);var w=i.parentNode;i=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(m&&Math.abs(c)<1||!m&&Math.abs(p)<1)&&(u=!0),u},kr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ti=function(e){return[e.deltaX,e.deltaY]},ni=function(e){return e&&"current"in e?e.current:e},Fv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Wv=function(e){return`
149
149
  .block-interactivity-`.concat(e,` {pointer-events: none;}
150
150
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
151
- `)},Bv=0,mn=[];function Yv(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Bv++)[0],a=f.useState(Ac)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=lv([e.lockRef.current],(e.shards||[]).map(ni),!0).filter(Boolean);return v.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(v,g){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!s.current.allowPinchZoom;var b=kr(v),w=n.current,S="deltaX"in v?v.deltaX:w[0]-b[0],D="deltaY"in v?v.deltaY:w[1]-b[1],C,R=v.target,M=Math.abs(S)>Math.abs(D)?"h":"v";if("touches"in v&&M==="h"&&R.type==="range")return!1;var E=ei(M,R);if(!E)return!0;if(E?C=M:(C=M==="v"?"h":"v",E=ei(M,R)),!E)return!1;if(!r.current&&"changedTouches"in v&&(S||D)&&(r.current=C),!C)return!0;var $=r.current||C;return Lv($,g,v,$==="h"?S:D)},[]),l=f.useCallback(function(v){var g=v;if(!(!mn.length||mn[mn.length-1]!==a)){var b="deltaY"in g?ti(g):kr(g),w=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&Fv(C.delta,b)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var S=(s.current.shards||[]).map(ni).filter(Boolean).filter(function(C){return C.contains(g.target)}),D=S.length>0?i(g,S[0]):!s.current.noIsolation;D&&g.cancelable&&g.preventDefault()}}},[]),u=f.useCallback(function(v,g,b,w){var S={name:v,delta:g,target:b,should:w,shadowParent:Hv(b)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(D){return D!==S})},1)},[]),m=f.useCallback(function(v){n.current=kr(v),r.current=void 0},[]),c=f.useCallback(function(v){u(v.type,ti(v),v.target,i(v,e.lockRef.current))},[]),p=f.useCallback(function(v){u(v.type,kr(v),v.target,i(v,e.lockRef.current))},[]);f.useEffect(function(){return mn.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,fn),document.addEventListener("touchmove",l,fn),document.addEventListener("touchstart",m,fn),function(){mn=mn.filter(function(v){return v!==a}),document.removeEventListener("wheel",l,fn),document.removeEventListener("touchmove",l,fn),document.removeEventListener("touchstart",m,fn)}},[]);var h=e.removeScrollBar,y=e.inert;return f.createElement(f.Fragment,null,y?f.createElement(a,{styles:Wv(o)}):null,h?f.createElement(_v,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Hv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const zv=yv(Pc,Yv);var ir=f.forwardRef(function(e,t){return f.createElement(so,ft({},e,{ref:t,sideCar:zv}))});ir.classNames=so.classNames;var io="Popover",[Lc,nD]=Be(io,[Ft]),cr=Ft(),[Gv,Wt]=Lc(io),Fc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=cr(t),l=f.useRef(null),[u,m]=f.useState(!1),[c,p]=tt({prop:r,defaultProp:o??!1,onChange:a,caller:io});return d.jsx(or,{...i,children:d.jsx(Gv,{scope:t,contentId:ke(),triggerRef:l,open:c,onOpenChange:p,onOpenToggle:f.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:f.useCallback(()=>m(!0),[]),onCustomAnchorRemove:f.useCallback(()=>m(!1),[]),modal:s,children:n})})};Fc.displayName=io;var Wc="PopoverAnchor",Uv=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Wt(Wc,n),a=cr(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),d.jsx(ar,{...a,...r,ref:t})});Uv.displayName=Wc;var Bc="PopoverTrigger",Yc=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Wt(Bc,n),a=cr(n),s=he(t,o.triggerRef),i=d.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":qc(o.open),...r,ref:s,onClick:K(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:d.jsx(ar,{asChild:!0,...a,children:i})});Yc.displayName=Bc;var Wa="PopoverPortal",[qv,Vv]=Lc(Wa,{forceMount:void 0}),Hc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Wt(Wa,t);return d.jsx(qv,{scope:t,forceMount:n,children:d.jsx(ze,{present:n||a.open,children:d.jsx(sr,{asChild:!0,container:o,children:r})})})};Hc.displayName=Wa;var wn="PopoverContent",zc=f.forwardRef((e,t)=>{const n=Vv(wn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Wt(wn,e.__scopePopover);return d.jsx(ze,{present:r||a.open,children:a.modal?d.jsx(Xv,{...o,ref:t}):d.jsx(Zv,{...o,ref:t})})});zc.displayName=wn;var Kv=It("PopoverContent.RemoveScroll"),Xv=f.forwardRef((e,t)=>{const n=Wt(wn,e.__scopePopover),r=f.useRef(null),o=he(t,r),a=f.useRef(!1);return f.useEffect(()=>{const s=r.current;if(s)return ao(s)},[]),d.jsx(ir,{as:Kv,allowPinchZoom:!0,children:d.jsx(Gc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,u=i.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Zv=f.forwardRef((e,t)=>{const n=Wt(wn,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(Gc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Gc=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:m,...c}=e,p=Wt(wn,n),h=cr(n);return Jr(),d.jsx(nr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(En,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:m,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:d.jsx(ro,{"data-state":qc(p.open),role:"dialog",id:p.contentId,...h,...c,ref:t,style:{...c.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Uc="PopoverClose",Qv=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Wt(Uc,n);return d.jsx(ee.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});Qv.displayName=Uc;var Jv="PopoverArrow",ey=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=cr(n);return d.jsx(oo,{...o,...r,ref:t})});ey.displayName=Jv;function qc(e){return e?"open":"closed"}var ty=Fc,ny=Yc,ry=Hc,Vc=zc;const Ba=ty,Ya=ny,co=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(ry,{children:d.jsx(Vc,{ref:r,sideOffset:t,className:W("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n})}));co.displayName=Vc.displayName;function ri(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ha(e){const t=e+"CollectionProvider",[n,r]=Be(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:g,children:b}=v,w=x.useRef(null),S=x.useRef(new Map).current;return d.jsx(o,{scope:g,itemMap:S,collectionRef:w,children:b})};s.displayName=t;const i=e+"CollectionSlot",l=It(i),u=x.forwardRef((v,g)=>{const{scope:b,children:w}=v,S=a(i,b),D=he(g,S.collectionRef);return d.jsx(l,{ref:D,children:w})});u.displayName=i;const m=e+"CollectionItemSlot",c="data-radix-collection-item",p=It(m),h=x.forwardRef((v,g)=>{const{scope:b,children:w,...S}=v,D=x.useRef(null),C=he(g,D),R=a(m,b);return x.useEffect(()=>(R.itemMap.set(D,{ref:D,...S}),()=>void R.itemMap.delete(D))),d.jsx(p,{[c]:"",ref:C,children:w})});h.displayName=m;function y(v){const g=a(e+"CollectionConsumer",v);return x.useCallback(()=>{const w=g.collectionRef.current;if(!w)return[];const S=Array.from(w.querySelectorAll(`[${c}]`));return Array.from(g.itemMap.values()).sort((R,M)=>S.indexOf(R.ref.current)-S.indexOf(M.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},y,r]}var oy=f.createContext(void 0);function lr(e){const t=f.useContext(oy);return e||t||"ltr"}function za(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Kc=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"}),ay="VisuallyHidden",Xc=f.forwardRef((e,t)=>d.jsx(ee.span,{...e,ref:t,style:{...Kc,...e.style}}));Xc.displayName=ay;var sy=Xc,iy=[" ","Enter","ArrowUp","ArrowDown"],cy=[" ","Enter"],Qt="Select",[lo,uo,ly]=Ha(Qt),[Tn,rD]=Be(Qt,[ly,Ft]),fo=Ft(),[uy,Bt]=Tn(Qt),[dy,fy]=Tn(Qt),Zc=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:m,autoComplete:c,disabled:p,required:h,form:y}=e,v=fo(t),[g,b]=f.useState(null),[w,S]=f.useState(null),[D,C]=f.useState(!1),R=lr(u),[M,E]=tt({prop:r,defaultProp:o??!1,onChange:a,caller:Qt}),[$,B]=tt({prop:s,defaultProp:i,onChange:l,caller:Qt}),L=f.useRef(null),q=g?y||!!g.closest("form"):!0,[A,T]=f.useState(new Set),_=Array.from(A).map(N=>N.props.value).join(";");return d.jsx(or,{...v,children:d.jsxs(uy,{required:h,scope:t,trigger:g,onTriggerChange:b,valueNode:w,onValueNodeChange:S,valueNodeHasChildren:D,onValueNodeHasChildrenChange:C,contentId:ke(),value:$,onValueChange:B,open:M,onOpenChange:E,dir:R,triggerPointerDownPosRef:L,disabled:p,children:[d.jsx(lo.Provider,{scope:t,children:d.jsx(dy,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(N=>{T(I=>new Set(I).add(N))},[]),onNativeOptionRemove:f.useCallback(N=>{T(I=>{const k=new Set(I);return k.delete(N),k})},[]),children:n})}),q?d.jsxs(xl,{"aria-hidden":!0,required:h,tabIndex:-1,name:m,autoComplete:c,value:$,onChange:N=>B(N.target.value),disabled:p,form:y,children:[$===void 0?d.jsx("option",{value:""}):null,Array.from(A)]},_):null]})})};Zc.displayName=Qt;var Qc="SelectTrigger",Jc=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=fo(n),s=Bt(Qc,n),i=s.disabled||r,l=he(t,s.onTriggerChange),u=uo(n),m=f.useRef("touch"),[c,p,h]=Cl(v=>{const g=u().filter(S=>!S.disabled),b=g.find(S=>S.value===s.value),w=Ml(g,v,b);w!==void 0&&s.onValueChange(w.value)}),y=v=>{i||(s.onOpenChange(!0),h()),v&&(s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return d.jsx(ar,{asChild:!0,...a,children:d.jsx(ee.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Sl(s.value)?"":void 0,...o,ref:l,onClick:K(o.onClick,v=>{v.currentTarget.focus(),m.current!=="mouse"&&y(v)}),onPointerDown:K(o.onPointerDown,v=>{m.current=v.pointerType;const g=v.target;g.hasPointerCapture(v.pointerId)&&g.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(y(v),v.preventDefault())}),onKeyDown:K(o.onKeyDown,v=>{const g=c.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&p(v.key),!(g&&v.key===" ")&&iy.includes(v.key)&&(y(),v.preventDefault())})})})});Jc.displayName=Qc;var el="SelectValue",tl=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Bt(el,n),{onValueNodeHasChildrenChange:u}=l,m=a!==void 0,c=he(t,l.onValueNodeChange);return Ne(()=>{u(m)},[u,m]),d.jsx(ee.span,{...i,ref:c,style:{pointerEvents:"none"},children:Sl(l.value)?d.jsx(d.Fragment,{children:s}):a})});tl.displayName=el;var my="SelectIcon",nl=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return d.jsx(ee.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});nl.displayName=my;var py="SelectPortal",rl=e=>d.jsx(sr,{asChild:!0,...e});rl.displayName=py;var Jt="SelectContent",ol=f.forwardRef((e,t)=>{const n=Bt(Jt,e.__scopeSelect),[r,o]=f.useState();if(Ne(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Zr.createPortal(d.jsx(al,{scope:e.__scopeSelect,children:d.jsx(lo.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(sl,{...e,ref:t})});ol.displayName=Jt;var ot=10,[al,Yt]=Tn(Jt),hy="SelectContentImpl",gy=It("SelectContent.RemoveScroll"),sl=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:m,arrowPadding:c,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:v,avoidCollisions:g,...b}=e,w=Bt(Jt,n),[S,D]=f.useState(null),[C,R]=f.useState(null),M=he(t,F=>D(F)),[E,$]=f.useState(null),[B,L]=f.useState(null),q=uo(n),[A,T]=f.useState(!1),_=f.useRef(!1);f.useEffect(()=>{if(S)return ao(S)},[S]),Jr();const N=f.useCallback(F=>{const[Z,...X]=q().map(ue=>ue.ref.current),[Q]=X.slice(-1),se=document.activeElement;for(const ue of F)if(ue===se||(ue==null||ue.scrollIntoView({block:"nearest"}),ue===Z&&C&&(C.scrollTop=0),ue===Q&&C&&(C.scrollTop=C.scrollHeight),ue==null||ue.focus(),document.activeElement!==se))return},[q,C]),I=f.useCallback(()=>N([E,S]),[N,E,S]);f.useEffect(()=>{A&&I()},[A,I]);const{onOpenChange:k,triggerPointerDownPosRef:P}=w;f.useEffect(()=>{if(S){let F={x:0,y:0};const Z=Q=>{var se,ue;F={x:Math.abs(Math.round(Q.pageX)-(((se=P.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((ue=P.current)==null?void 0:ue.y)??0))}},X=Q=>{F.x<=10&&F.y<=10?Q.preventDefault():S.contains(Q.target)||k(!1),document.removeEventListener("pointermove",Z),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",X,{capture:!0})}}},[S,k,P]),f.useEffect(()=>{const F=()=>k(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[k]);const[H,z]=Cl(F=>{const Z=q().filter(se=>!se.disabled),X=Z.find(se=>se.ref.current===document.activeElement),Q=Ml(Z,F,X);Q&&setTimeout(()=>Q.ref.current.focus())}),O=f.useCallback((F,Z,X)=>{const Q=!_.current&&!X;(w.value!==void 0&&w.value===Z||Q)&&($(F),Q&&(_.current=!0))},[w.value]),j=f.useCallback(()=>S==null?void 0:S.focus(),[S]),Y=f.useCallback((F,Z,X)=>{const Q=!_.current&&!X;(w.value!==void 0&&w.value===Z||Q)&&L(F)},[w.value]),G=r==="popper"?la:il,V=G===la?{side:i,sideOffset:l,align:u,alignOffset:m,arrowPadding:c,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:v,avoidCollisions:g}:{};return d.jsx(al,{scope:n,content:S,viewport:C,onViewportChange:R,itemRefCallback:O,selectedItem:E,onItemLeave:j,itemTextRefCallback:Y,focusSelectedItem:I,selectedItemText:B,position:r,isPositioned:A,searchRef:H,children:d.jsx(ir,{as:gy,allowPinchZoom:!0,children:d.jsx(nr,{asChild:!0,trapped:w.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:K(o,F=>{var Z;(Z=w.trigger)==null||Z.focus({preventScroll:!0}),F.preventDefault()}),children:d.jsx(En,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:d.jsx(G,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:F=>F.preventDefault(),...b,...V,onPlaced:()=>T(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:K(b.onKeyDown,F=>{const Z=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!Z&&F.key.length===1&&z(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let Q=q().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(F.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const se=F.target,ue=Q.indexOf(se);Q=Q.slice(ue+1)}setTimeout(()=>N(Q)),F.preventDefault()}})})})})})})});sl.displayName=hy;var vy="SelectItemAlignedPosition",il=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Bt(Jt,n),s=Yt(Jt,n),[i,l]=f.useState(null),[u,m]=f.useState(null),c=he(t,M=>m(M)),p=uo(n),h=f.useRef(!1),y=f.useRef(!0),{viewport:v,selectedItem:g,selectedItemText:b,focusSelectedItem:w}=s,S=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&v&&g&&b){const M=a.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),$=a.valueNode.getBoundingClientRect(),B=b.getBoundingClientRect();if(a.dir!=="rtl"){const se=B.left-E.left,ue=$.left-se,ye=M.left-ue,J=M.width+ye,Re=Math.max(J,E.width),Te=window.innerWidth-ot,oe=ri(ue,[ot,Math.max(ot,Te-Re)]);i.style.minWidth=J+"px",i.style.left=oe+"px"}else{const se=E.right-B.right,ue=window.innerWidth-$.right-se,ye=window.innerWidth-M.right-ue,J=M.width+ye,Re=Math.max(J,E.width),Te=window.innerWidth-ot,oe=ri(ue,[ot,Math.max(ot,Te-Re)]);i.style.minWidth=J+"px",i.style.right=oe+"px"}const L=p(),q=window.innerHeight-ot*2,A=v.scrollHeight,T=window.getComputedStyle(u),_=parseInt(T.borderTopWidth,10),N=parseInt(T.paddingTop,10),I=parseInt(T.borderBottomWidth,10),k=parseInt(T.paddingBottom,10),P=_+N+A+k+I,H=Math.min(g.offsetHeight*5,P),z=window.getComputedStyle(v),O=parseInt(z.paddingTop,10),j=parseInt(z.paddingBottom,10),Y=M.top+M.height/2-ot,G=q-Y,V=g.offsetHeight/2,F=g.offsetTop+V,Z=_+N+F,X=P-Z;if(Z<=Y){const se=L.length>0&&g===L[L.length-1].ref.current;i.style.bottom="0px";const ue=u.clientHeight-v.offsetTop-v.offsetHeight,ye=Math.max(G,V+(se?j:0)+ue+I),J=Z+ye;i.style.height=J+"px"}else{const se=L.length>0&&g===L[0].ref.current;i.style.top="0px";const ye=Math.max(Y,_+v.offsetTop+(se?O:0)+V)+X;i.style.height=ye+"px",v.scrollTop=Z-Y+v.offsetTop}i.style.margin=`${ot}px 0`,i.style.minHeight=H+"px",i.style.maxHeight=q+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,i,u,v,g,b,a.dir,r]);Ne(()=>S(),[S]);const[D,C]=f.useState();Ne(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const R=f.useCallback(M=>{M&&y.current===!0&&(S(),w==null||w(),y.current=!1)},[S,w]);return d.jsx(by,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:h,onScrollButtonChange:R,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:d.jsx(ee.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});il.displayName=vy;var yy="SelectPopperPosition",la=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ot,...a}=e,s=fo(n);return d.jsx(ro,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});la.displayName=yy;var[by,Ga]=Tn(Jt,{}),ua="SelectViewport",cl=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Yt(ua,n),s=Ga(ua,n),i=he(t,a.onViewportChange),l=f.useRef(0);return d.jsxs(d.Fragment,{children:[d.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}),d.jsx(lo.Slot,{scope:n,children:d.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:K(o.onScroll,u=>{const m=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&c){const h=Math.abs(l.current-m.scrollTop);if(h>0){const y=window.innerHeight-ot*2,v=parseFloat(c.style.minHeight),g=parseFloat(c.style.height),b=Math.max(v,g);if(b<y){const w=b+h,S=Math.min(y,w),D=w-S;c.style.height=S+"px",c.style.bottom==="0px"&&(m.scrollTop=D>0?D:0,c.style.justifyContent="flex-end")}}}l.current=m.scrollTop})})})]})});cl.displayName=ua;var ll="SelectGroup",[wy,xy]=Tn(ll),Sy=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ke();return d.jsx(wy,{scope:n,id:o,children:d.jsx(ee.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Sy.displayName=ll;var ul="SelectLabel",dl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=xy(ul,n);return d.jsx(ee.div,{id:o.id,...r,ref:t})});dl.displayName=ul;var Yr="SelectItem",[Cy,fl]=Tn(Yr),ml=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Bt(Yr,n),l=Yt(Yr,n),u=i.value===r,[m,c]=f.useState(a??""),[p,h]=f.useState(!1),y=he(t,w=>{var S;return(S=l.itemRefCallback)==null?void 0:S.call(l,w,r,o)}),v=ke(),g=f.useRef("touch"),b=()=>{o||(i.onValueChange(r),i.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 d.jsx(Cy,{scope:n,value:r,disabled:o,textId:v,isSelected:u,onItemTextChange:f.useCallback(w=>{c(S=>S||((w==null?void 0:w.textContent)??"").trim())},[]),children:d.jsx(lo.ItemSlot,{scope:n,value:r,disabled:o,textValue:m,children:d.jsx(ee.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:y,onFocus:K(s.onFocus,()=>h(!0)),onBlur:K(s.onBlur,()=>h(!1)),onClick:K(s.onClick,()=>{g.current!=="mouse"&&b()}),onPointerUp:K(s.onPointerUp,()=>{g.current==="mouse"&&b()}),onPointerDown:K(s.onPointerDown,w=>{g.current=w.pointerType}),onPointerMove:K(s.onPointerMove,w=>{var S;g.current=w.pointerType,o?(S=l.onItemLeave)==null||S.call(l):g.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(s.onPointerLeave,w=>{var S;w.currentTarget===document.activeElement&&((S=l.onItemLeave)==null||S.call(l))}),onKeyDown:K(s.onKeyDown,w=>{var D;((D=l.searchRef)==null?void 0:D.current)!==""&&w.key===" "||(cy.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});ml.displayName=Yr;var Hn="SelectItemText",pl=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Bt(Hn,n),i=Yt(Hn,n),l=fl(Hn,n),u=fy(Hn,n),[m,c]=f.useState(null),p=he(t,b=>c(b),l.onItemTextChange,b=>{var w;return(w=i.itemTextRefCallback)==null?void 0:w.call(i,b,l.value,l.disabled)}),h=m==null?void 0:m.textContent,y=f.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:g}=u;return Ne(()=>(v(y),()=>g(y)),[v,g,y]),d.jsxs(d.Fragment,{children:[d.jsx(ee.span,{id:l.textId,...a,ref:p}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Zr.createPortal(a.children,s.valueNode):null]})});pl.displayName=Hn;var hl="SelectItemIndicator",gl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return fl(hl,n).isSelected?d.jsx(ee.span,{"aria-hidden":!0,...r,ref:t}):null});gl.displayName=hl;var da="SelectScrollUpButton",vl=f.forwardRef((e,t)=>{const n=Yt(da,e.__scopeSelect),r=Ga(da,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Ne(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?d.jsx(bl,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});vl.displayName=da;var fa="SelectScrollDownButton",yl=f.forwardRef((e,t)=>{const n=Yt(fa,e.__scopeSelect),r=Ga(fa,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Ne(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,m=Math.ceil(l.scrollTop)<u;a(m)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?d.jsx(bl,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});yl.displayName=fa;var bl=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Yt("SelectScrollButton",n),s=f.useRef(null),i=uo(n),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),Ne(()=>{var m;const u=i().find(c=>c.ref.current===document.activeElement);(m=u==null?void 0:u.ref.current)==null||m.scrollIntoView({block:"nearest"})},[i]),d.jsx(ee.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:K(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:K(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:K(o.onPointerLeave,()=>{l()})})}),My="SelectSeparator",wl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(ee.div,{"aria-hidden":!0,...r,ref:t})});wl.displayName=My;var ma="SelectArrow",Dy=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=fo(n),a=Bt(ma,n),s=Yt(ma,n);return a.open&&s.position==="popper"?d.jsx(oo,{...o,...r,ref:t}):null});Dy.displayName=ma;var ky="SelectBubbleInput",xl=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),s=za(t);return f.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&m){const c=new Event("change",{bubbles:!0});m.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(ee.select,{...n,style:{...Kc,...n.style},ref:a,defaultValue:t})});xl.displayName=ky;function Sl(e){return e===""||e===void 0}function Cl(e){const t=et(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(s=>{const i=n.current+s;t(i),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(i)},[t]),a=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Ml(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Ey(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Ey(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ny=Zc,Dl=Jc,Ry=tl,Ty=nl,_y=rl,kl=ol,Oy=cl,El=dl,Nl=ml,Py=pl,Ay=gl,Rl=vl,Tl=yl,_l=wl;const pa=Ny,ha=Ry,Hr=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Dl,{ref:r,className:W("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,d.jsx(Ty,{asChild:!0,children:d.jsx(tr,{strokeWidth:1.5,className:"h-4 w-4 text-foreground"})})]}));Hr.displayName=Dl.displayName;const Ol=f.forwardRef(({className:e,...t},n)=>d.jsx(Rl,{ref:n,className:W("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Zp,{className:"h-4 w-4"})}));Ol.displayName=Rl.displayName;const Pl=f.forwardRef(({className:e,...t},n)=>d.jsx(Tl,{ref:n,className:W("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(tr,{className:"h-4 w-4"})}));Pl.displayName=Tl.displayName;const zr=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>d.jsx(_y,{children:d.jsxs(kl,{ref:o,className:W("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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 origin-[--radix-select-content-transform-origin]",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:[d.jsx(Ol,{}),d.jsx(Oy,{className:W("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d.jsx(Pl,{})]})}));zr.displayName=kl.displayName;const Iy=f.forwardRef(({className:e,...t},n)=>d.jsx(El,{ref:n,className:W("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Iy.displayName=El.displayName;const Gr=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Nl,{ref:r,className:W("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Ay,{children:d.jsx(er,{className:"h-4 w-4"})})}),d.jsx(Py,{children:t})]}));Gr.displayName=Nl.displayName;const jy=f.forwardRef(({className:e,...t},n)=>d.jsx(_l,{ref:n,className:W("-mx-1 my-1 h-px bg-muted",e),...t}));jy.displayName=_l.displayName;const Lo={},zn={};function Un(e,t){try{const r=(Lo[e]||(Lo[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in zn?zn[r]:oi(r,r.split(":"))}catch{if(e in zn)return zn[e];const n=e==null?void 0:e.match($y);return n?oi(e,n.slice(1)):NaN}}const $y=/([+-]\d\d):?(\d\d)?/;function oi(e,t){const n=+t[0],r=+(t[1]||0);return zn[e]=n>0?n*60+r:n*60-r}class pt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Un(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Al(this),ga(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new pt(...n,t):new pt(Date.now(),t)}withTimeZone(t){return new pt(+this,t)}getTimezoneOffset(){return-Un(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ga(this),+this}[Symbol.for("constructDateFrom")](t){return new pt(+new Date(t),this.timeZone)}}const ai=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ai.test(e))return;const t=e.replace(ai,"$1UTC");pt.prototype[t]&&(e.startsWith("get")?pt.prototype[e]=function(){return this.internal[t]()}:(pt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Ly(this),+this},pt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ga(this),+this}))});function ga(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Ly(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Al(e)}function Al(e){const t=Un(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),a=r-o,s=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&s&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const i=r-t;i&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+i);const l=Un(e.timeZone,e),m=-new Date(+e).getTimezoneOffset()-l,c=l!==t,p=m-i;if(c&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=Un(e.timeZone,e),y=l-h;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class We extends pt{static tz(t,...n){return n.length?new We(...n,t):new We(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${Fy(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new We(+this,t)}[Symbol.for("constructDateFrom")](t){return new We(+new Date(t),this.timeZone)}}function Fy(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var ce;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(ce||(ce={}));var De;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(De||(De={}));var at;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(at||(at={}));var Ke;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Ke||(Ke={}));const Il=6048e5,Wy=864e5,si=Symbol.for("constructDateFrom");function Pe(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&si in e?e[si](t):e instanceof Date?new e.constructor(t):new Date(t)}function Se(e,t){return Pe(t||e,e)}function jl(e,t,n){const r=Se(e,n==null?void 0:n.in);return isNaN(t)?Pe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function $l(e,t,n){const r=Se(e,n==null?void 0:n.in);if(isNaN(t))return Pe(e,NaN);if(!t)return r;const o=r.getDate(),a=Pe(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let By={};function ur(){return By}function xn(e,t){var i,l,u,m;const n=ur(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.weekStartsOn)??0,o=Se(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Kn(e,t){return xn(e,{...t,weekStartsOn:1})}function Ll(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=Pe(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Kn(o),s=Pe(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Kn(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function ii(e){const t=Se(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function _n(e,...t){const n=Pe.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Xn(e,t){const n=Se(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Fl(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t),a=Xn(r),s=Xn(o),i=+a-ii(a),l=+s-ii(s);return Math.round((i-l)/Wy)}function Yy(e,t){const n=Ll(e,t),r=Pe(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Kn(r)}function Hy(e,t,n){return jl(e,t*7,n)}function zy(e,t,n){return $l(e,t*12,n)}function Gy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Pe.bind(null,o));const a=Se(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Pe(r,n||NaN)}function Uy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Pe.bind(null,o));const a=Se(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Pe(r,n||NaN)}function qy(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return+Xn(r)==+Xn(o)}function Wl(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Vy(e){return!(!Wl(e)&&typeof e!="number"||isNaN(+Se(e)))}function Ky(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function Xy(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Zy(e,t){const[n,r]=_n(e,t.start,t.end);return{start:n,end:r}}function Qy(e,t){const{start:n,end:r}=Zy(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const l=[];for(;+s<=a;)l.push(Pe(n,s)),s.setMonth(s.getMonth()+i);return o?l.reverse():l}function Jy(e,t){const n=Se(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function eb(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Bl(e,t){const n=Se(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Yl(e,t){var i,l,u,m;const n=ur(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.weekStartsOn)??0,o=Se(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function tb(e,t){return Yl(e,{...t,weekStartsOn:1})}const nb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rb=(e,t,n)=>{let r;const o=nb[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Fo(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const ob={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ab={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},sb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ib={date:Fo({formats:ob,defaultWidth:"full"}),time:Fo({formats:ab,defaultWidth:"full"}),dateTime:Fo({formats:sb,defaultWidth:"full"})},cb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},lb=(e,t,n,r)=>cb[e];function $n(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const ub={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},db={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},fb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},mb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},pb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},hb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},gb=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},vb={ordinalNumber:gb,era:$n({values:ub,defaultWidth:"wide"}),quarter:$n({values:db,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$n({values:fb,defaultWidth:"wide"}),day:$n({values:mb,defaultWidth:"wide"}),dayPeriod:$n({values:pb,defaultWidth:"wide",formattingValues:hb,defaultFormattingWidth:"wide"})};function Ln(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?bb(i,c=>c.test(s)):yb(i,c=>c.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const m=t.slice(s.length);return{value:u,rest:m}}}function yb(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function bb(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function wb(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const xb=/^(\d+)(th|st|nd|rd)?/i,Sb=/\d+/i,Cb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Mb={any:[/^b/i,/^(a|c)/i]},Db={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kb={any:[/1/i,/2/i,/3/i,/4/i]},Eb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Nb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Rb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Tb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_b={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ob={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Pb={ordinalNumber:wb({matchPattern:xb,parsePattern:Sb,valueCallback:e=>parseInt(e,10)}),era:Ln({matchPatterns:Cb,defaultMatchWidth:"wide",parsePatterns:Mb,defaultParseWidth:"any"}),quarter:Ln({matchPatterns:Db,defaultMatchWidth:"wide",parsePatterns:kb,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ln({matchPatterns:Eb,defaultMatchWidth:"wide",parsePatterns:Nb,defaultParseWidth:"any"}),day:Ln({matchPatterns:Rb,defaultMatchWidth:"wide",parsePatterns:Tb,defaultParseWidth:"any"}),dayPeriod:Ln({matchPatterns:_b,defaultMatchWidth:"any",parsePatterns:Ob,defaultParseWidth:"any"})},Ua={code:"en-US",formatDistance:rb,formatLong:ib,formatRelative:lb,localize:vb,match:Pb,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ab(e,t){const n=Se(e,t==null?void 0:t.in);return Fl(n,Bl(n))+1}function Hl(e,t){const n=Se(e,t==null?void 0:t.in),r=+Kn(n)-+Yy(n);return Math.round(r/Il)+1}function zl(e,t){var m,c,p,h;const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=ur(),a=(t==null?void 0:t.firstWeekContainsDate)??((c=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:c.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,s=Pe((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=xn(s,t),l=Pe((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=xn(l,t);return+n>=+i?r+1:+n>=+u?r:r-1}function Ib(e,t){var i,l,u,m;const n=ur(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??1,o=zl(e,t),a=Pe((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),xn(a,t)}function Gl(e,t){const n=Se(e,t==null?void 0:t.in),r=+xn(n,t)-+Ib(n,t);return Math.round(r/Il)+1}function we(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ot={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return we(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):we(n+1,2)},d(e,t){return we(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return we(e.getHours()%12||12,t.length)},H(e,t){return we(e.getHours(),t.length)},m(e,t){return we(e.getMinutes(),t.length)},s(e,t){return we(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return we(o,t.length)}},pn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ci={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Ot.y(e,t)},Y:function(e,t,n,r){const o=zl(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return we(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):we(a,t.length)},R:function(e,t){const n=Ll(e);return we(n,t.length)},u:function(e,t){const n=e.getFullYear();return we(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return we(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return we(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ot.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return we(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Gl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):we(o,t.length)},I:function(e,t,n){const r=Hl(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):we(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ot.d(e,t)},D:function(e,t,n){const r=Ab(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):we(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return we(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return we(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return we(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=pn.noon:r===0?o=pn.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=pn.evening:r>=12?o=pn.afternoon:r>=4?o=pn.morning:o=pn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ot.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ot.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):we(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):we(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ot.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ot.s(e,t)},S:function(e,t){return Ot.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ui(r);case"XXXX":case"XX":return Xt(r);case"XXXXX":case"XXX":default:return Xt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ui(r);case"xxxx":case"xx":return Xt(r);case"xxxxx":case"xxx":default:return Xt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+li(r,":");case"OOOO":default:return"GMT"+Xt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+li(r,":");case"zzzz":default:return"GMT"+Xt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return we(r,t.length)},T:function(e,t,n){return we(+e,t.length)}};function li(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+we(a,2)}function ui(e,t){return e%60===0?(e>0?"-":"+")+we(Math.abs(e)/60,2):Xt(e,t)}function Xt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=we(Math.trunc(r/60),2),a=we(r%60,2);return n+o+t+a}const di=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ul=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},jb=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return di(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",di(r,t)).replace("{{time}}",Ul(o,t))},$b={p:Ul,P:jb},Lb=/^D+$/,Fb=/^Y+$/,Wb=["D","DD","YY","YYYY"];function Bb(e){return Lb.test(e)}function Yb(e){return Fb.test(e)}function Hb(e,t,n){const r=zb(e,t,n);if(console.warn(r),Wb.includes(e))throw new RangeError(r)}function zb(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Gb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ub=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qb=/^'([^]*?)'?$/,Vb=/''/g,Kb=/[a-zA-Z]/;function Xb(e,t,n){var m,c,p,h,y,v,g,b;const r=ur(),o=(n==null?void 0:n.locale)??r.locale??Ua,a=(n==null?void 0:n.firstWeekContainsDate)??((c=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((v=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:v.weekStartsOn)??r.weekStartsOn??((b=(g=r.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0,i=Se(e,n==null?void 0:n.in);if(!Vy(i))throw new RangeError("Invalid time value");let l=t.match(Ub).map(w=>{const S=w[0];if(S==="p"||S==="P"){const D=$b[S];return D(w,o.formatLong)}return w}).join("").match(Gb).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const S=w[0];if(S==="'")return{isToken:!1,value:Zb(w)};if(ci[S])return{isToken:!0,value:w};if(S.match(Kb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(w=>{if(!w.isToken)return w.value;const S=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Yb(S)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Bb(S))&&Hb(S,t,String(e));const D=ci[S[0]];return D(i,S,o.localize,u)}).join("")}function Zb(e){const t=e.match(qb);return t?t[1].replace(Vb,"'"):e}function Qb(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Pe(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Jb(e,t){return Se(e,t==null?void 0:t.in).getMonth()}function ew(e,t){return Se(e,t==null?void 0:t.in).getFullYear()}function tw(e,t){return+Se(e)>+Se(t)}function nw(e,t){return+Se(e)<+Se(t)}function rw(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function ow(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function aw(e,t,n){const r=Se(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=Pe(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=Qb(s);return r.setMonth(t,Math.min(a,i)),r}function sw(e,t,n){const r=Se(e,n==null?void 0:n.in);return isNaN(+r)?Pe(e,NaN):(r.setFullYear(t),r)}const fi=5,iw=4;function cw(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,fi*7-1);return t.getMonth(e)===t.getMonth(a)?fi:iw}function ql(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function lw(e,t){const n=ql(e,t),r=cw(e,t);return t.addDays(n,r*7-1)}class Nt{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?We.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new We(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):jl(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):$l(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):Hy(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):zy(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Fl(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Ky(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Qy(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):lw(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):tb(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Xy(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):Yl(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):eb(r)},this.format=(r,o,a)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):Xb(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Hl(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):Jb(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):ew(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):Gl(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):tw(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):nw(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Wl(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):qy(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):rw(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):ow(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Gy(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Uy(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):aw(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):sw(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):ql(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Xn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Kn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):Jy(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):xn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Bl(r)},this.options={locale:Ua,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const yt=new Nt;class Vl{constructor(t,n,r=yt){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class uw{constructor(t,n){this.date=t,this.weeks=n}}class dw{constructor(t,n){this.days=n,this.weekNumber=t}}function xt(e,t,n=!1,r=yt){let{from:o,to:a}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return o&&a?(s(a,o)<0&&([o,a]=[a,o]),s(t,o)>=(n?1:0)&&s(a,t)>=(n?1:0)):!n&&a?i(a,t):!n&&o?i(o,t):!1}function Kl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function qa(e){return!!(e&&typeof e=="object"&&"from"in e)}function Xl(e){return!!(e&&typeof e=="object"&&"after"in e)}function Zl(e){return!!(e&&typeof e=="object"&&"before"in e)}function Ql(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Jl(e,t){return Array.isArray(e)&&e.every(t.isDate)}function St(e,t,n=yt){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(Jl(i,n))return i.includes(e);if(qa(i))return xt(i,e,!1,n);if(Ql(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Kl(i)){const l=a(i.before,e),u=a(i.after,e),m=l>0,c=u<0;return s(i.before,i.after)?c&&m:m||c}return Xl(i)?a(e,i.after)>0:Zl(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function fw(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:i,showOutsideDays:l,broadcastCalendar:u,today:m}=t,{isSameDay:c,isSameMonth:p,startOfMonth:h,isBefore:y,endOfMonth:v,isAfter:g}=o,b=n&&h(n),w=r&&v(r),S={[De.focused]:[],[De.outside]:[],[De.disabled]:[],[De.hidden]:[],[De.today]:[]},D={};for(const C of e){const{date:R,displayMonth:M}=C,E=!!(M&&!p(R,M)),$=!!(b&&y(R,b)),B=!!(w&&g(R,w)),L=!!(a&&St(R,a,o)),q=!!(s&&St(R,s,o))||$||B||!u&&!l&&E||u&&l===!1&&E,A=c(R,m??o.today());E&&S.outside.push(C),L&&S.disabled.push(C),q&&S.hidden.push(C),A&&S.today.push(C),i&&Object.keys(i).forEach(T=>{const _=i==null?void 0:i[T];_&&St(R,_,o)&&(D[T]?D[T].push(C):D[T]=[C])})}return C=>{const R={[De.focused]:!1,[De.disabled]:!1,[De.hidden]:!1,[De.outside]:!1,[De.today]:!1},M={};for(const E in S){const $=S[E];R[E]=$.some(B=>B===C)}for(const E in D)M[E]=D[E].some($=>$===C);return{...R,...M}}}function mw(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[De[a]]?o.push(t[De[a]]):t[at[a]]&&o.push(t[at[a]]),o),[t[ce.Day]])}function pw(e){return x.createElement("button",{...e})}function hw(e){return x.createElement("span",{...e})}function gw(e){const{size:t=24,orientation:n="left",className:r}=e;return x.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&x.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&x.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&x.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&x.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function vw(e){const{day:t,modifiers:n,...r}=e;return x.createElement("td",{...r})}function yw(e){const{day:t,modifiers:n,...r}=e,o=x.useRef(null);return x.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),x.createElement("button",{ref:o,...r})}function bw(e){const{options:t,className:n,components:r,classNames:o,...a}=e,s=[o[ce.Dropdown],n].join(" "),i=t==null?void 0:t.find(({value:l})=>l===a.value);return x.createElement("span",{"data-disabled":a.disabled,className:o[ce.DropdownRoot]},x.createElement(r.Select,{className:s,...a},t==null?void 0:t.map(({value:l,label:u,disabled:m})=>x.createElement(r.Option,{key:l,value:l,disabled:m},u))),x.createElement("span",{className:o[ce.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,x.createElement(r.Chevron,{orientation:"down",size:18,className:o[ce.Chevron]})))}function ww(e){return x.createElement("div",{...e})}function xw(e){return x.createElement("div",{...e})}function Sw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r},e.children)}function Cw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r})}function Mw(e){return x.createElement("table",{...e})}function Dw(e){return x.createElement("div",{...e})}const eu=x.createContext(void 0);function dr(){const e=x.useContext(eu);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function kw(e){const{components:t}=dr();return x.createElement(t.Dropdown,{...e})}function Ew(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:l,labelNext:u}}=dr(),m=x.useCallback(p=>{o&&(n==null||n(p))},[o,n]),c=x.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return x.createElement("nav",{...a},x.createElement(s.PreviousMonthButton,{type:"button",className:i[ce.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:c},x.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[ce.Chevron],orientation:"left"})),x.createElement(s.NextMonthButton,{type:"button",className:i[ce.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:m},x.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[ce.Chevron]})))}function Nw(e){const{components:t}=dr();return x.createElement(t.Button,{...e})}function Rw(e){return x.createElement("option",{...e})}function Tw(e){const{components:t}=dr();return x.createElement(t.Button,{...e})}function _w(e){const{rootRef:t,...n}=e;return x.createElement("div",{...n,ref:t})}function Ow(e){return x.createElement("select",{...e})}function Pw(e){const{week:t,...n}=e;return x.createElement("tr",{...n})}function Aw(e){return x.createElement("th",{...e})}function Iw(e){return x.createElement("thead",{"aria-hidden":!0},x.createElement("tr",{...e}))}function jw(e){const{week:t,...n}=e;return x.createElement("th",{...n})}function $w(e){return x.createElement("th",{...e})}function Lw(e){return x.createElement("tbody",{...e})}function Fw(e){const{components:t}=dr();return x.createElement(t.Dropdown,{...e})}const Ww=Object.freeze(Object.defineProperty({__proto__:null,Button:pw,CaptionLabel:hw,Chevron:gw,Day:vw,DayButton:yw,Dropdown:bw,DropdownNav:ww,Footer:xw,Month:Sw,MonthCaption:Cw,MonthGrid:Mw,Months:Dw,MonthsDropdown:kw,Nav:Ew,NextMonthButton:Nw,Option:Rw,PreviousMonthButton:Tw,Root:_w,Select:Ow,Week:Pw,WeekNumber:jw,WeekNumberHeader:$w,Weekday:Aw,Weekdays:Iw,Weeks:Lw,YearsDropdown:Fw},Symbol.toStringTag,{value:"Module"}));function Bw(e){return{...Ww,...e}}function Yw(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Va(){const e={};for(const t in ce)e[ce[t]]=`rdp-${ce[t]}`;for(const t in De)e[De[t]]=`rdp-${De[t]}`;for(const t in at)e[at[t]]=`rdp-${at[t]}`;for(const t in Ke)e[Ke[t]]=`rdp-${Ke[t]}`;return e}function tu(e,t,n){return(n??new Nt(t)).format(e,"LLLL y")}const Hw=tu;function zw(e,t,n){return(n??new Nt(t)).format(e,"d")}function Gw(e,t=yt){return t.format(e,"LLLL")}function Uw(e,t=yt){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function qw(){return""}function Vw(e,t,n){return(n??new Nt(t)).format(e,"cccccc")}function nu(e,t=yt){return t.format(e,"yyyy")}const Kw=nu,Xw=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:tu,formatDay:zw,formatMonthCaption:Hw,formatMonthDropdown:Gw,formatWeekNumber:Uw,formatWeekNumberHeader:qw,formatWeekdayName:Vw,formatYearCaption:Kw,formatYearDropdown:nu},Symbol.toStringTag,{value:"Module"}));function Zw(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Xw,...e}}function Qw(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:l,getMonth:u}=o;return l({start:s(e),end:i(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),y=u(p),v=t&&p<a(t)||n&&p>a(n)||!1;return{value:y,label:h,disabled:v}})}function Jw(e,t={},n={}){let r={...t==null?void 0:t[ce.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function ex(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let s=0;s<7;s++){const i=e.addDays(o,s);a.push(i)}return a}function tx(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:s,getYear:i,isBefore:l,isSameYear:u}=r,m=o(e),c=a(t),p=[];let h=m;for(;l(h,c)||u(h,c);)p.push(h),h=s(h,1);return p.map(y=>{const v=n.formatYearDropdown(y,r);return{value:i(y),label:v,disabled:!1}})}function ru(e,t,n){return(n??new Nt(t)).format(e,"LLLL y")}const nx=ru;function rx(e,t,n,r){let o=(r??new Nt(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function ou(e,t,n,r){let o=(r??new Nt(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const ox=ou;function ax(){return""}function sx(e){return"Choose the Month"}function ix(e){return"Go to the Next Month"}function cx(e){return"Go to the Previous Month"}function lx(e,t,n){return(n??new Nt(t)).format(e,"cccc")}function ux(e,t){return`Week ${e}`}function dx(e){return"Week Number"}function fx(e){return"Choose the Year"}const mx=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:nx,labelDay:ox,labelDayButton:ou,labelGrid:ru,labelGridcell:rx,labelMonthDropdown:sx,labelNav:ax,labelNext:ix,labelPrevious:cx,labelWeekNumber:ux,labelWeekNumberHeader:dx,labelWeekday:lx,labelYearDropdown:fx},Symbol.toStringTag,{value:"Module"})),fr=e=>e instanceof HTMLElement?e:null,Wo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],px=e=>fr(e.querySelector("[data-animated-month]")),Bo=e=>fr(e.querySelector("[data-animated-caption]")),Yo=e=>fr(e.querySelector("[data-animated-weeks]")),hx=e=>fr(e.querySelector("[data-animated-nav]")),gx=e=>fr(e.querySelector("[data-animated-weekdays]"));function vx(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const s=x.useRef(null),i=x.useRef(r),l=x.useRef(!1);x.useLayoutEffect(()=>{const u=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const m=a.isSameMonth(r[0].date,u[0].date),c=a.isAfter(r[0].date,u[0].date),p=c?n[Ke.caption_after_enter]:n[Ke.caption_before_enter],h=c?n[Ke.weeks_after_enter]:n[Ke.weeks_before_enter],y=s.current,v=e.current.cloneNode(!0);if(v instanceof HTMLElement?(Wo(v).forEach(S=>{if(!(S instanceof HTMLElement))return;const D=px(S);D&&S.contains(D)&&S.removeChild(D);const C=Bo(S);C&&C.classList.remove(p);const R=Yo(S);R&&R.classList.remove(h)}),s.current=v):s.current=null,l.current||m||o)return;const g=y instanceof HTMLElement?Wo(y):[],b=Wo(e.current);if(b&&b.every(w=>w instanceof HTMLElement)&&g&&g.every(w=>w instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const w=hx(e.current);w&&(w.style.zIndex="1"),b.forEach((S,D)=>{const C=g[D];if(!C)return;S.style.position="relative",S.style.overflow="hidden";const R=Bo(S);R&&R.classList.add(p);const M=Yo(S);M&&M.classList.add(h);const E=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),w&&(w.style.zIndex=""),R&&R.classList.remove(p),M&&M.classList.remove(h),S.style.position="",S.style.overflow="",S.contains(C)&&S.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const $=gx(C);$&&($.style.opacity="0");const B=Bo(C);B&&(B.classList.add(c?n[Ke.caption_before_exit]:n[Ke.caption_after_exit]),B.addEventListener("animationend",E));const L=Yo(C);L&&L.classList.add(c?n[Ke.weeks_before_exit]:n[Ke.weeks_after_exit]),S.insertBefore(C,S.firstChild)})}})}function yx(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:l}=n??{},{addDays:u,differenceInCalendarDays:m,differenceInCalendarMonths:c,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:v,isAfter:g,startOfBroadcastWeek:b,startOfISOWeek:w,startOfWeek:S}=r,D=l?b(o,r):s?w(o):S(o),C=l?p(a):s?h(y(a)):v(y(a)),R=m(C,D),M=c(a,o)+1,E=[];for(let L=0;L<=R;L++){const q=u(D,L);if(t&&g(q,t))break;E.push(q)}const B=(l?35:42)*M;if(i&&E.length<B){const L=B-E.length;for(let q=0;q<L;q++){const A=u(E[E.length-1],1);E.push(A)}}return E}function bx(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,s)=>[...a,...s.days],t);return[...n,...o]},t)}function wx(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let s=0;s<o;s++){const i=r.addMonths(e,s);if(t&&i>t)break;a.push(i)}return a}function mi(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:i=1}=e;let l=o||a||s;const{differenceInCalendarMonths:u,addMonths:m,startOfMonth:c}=r;if(n&&u(n,l)<i-1){const p=-1*(i-1);l=m(n,p)}return t&&u(l,t)<0&&(l=t),c(l)}function xx(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:l,getISOWeek:u,getWeek:m,startOfBroadcastWeek:c,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((v,g)=>{const b=n.broadcastCalendar?c(g,r):n.ISOWeek?p(g):h(g),w=n.broadcastCalendar?a(g):n.ISOWeek?s(i(g)):l(i(g)),S=t.filter(M=>M>=b&&M<=w),D=n.broadcastCalendar?35:42;if(n.fixedWeeks&&S.length<D){const M=t.filter(E=>{const $=D-S.length;return E>w&&E<=o(w,$)});S.push(...M)}const C=S.reduce((M,E)=>{const $=n.ISOWeek?u(E):m(E),B=M.find(q=>q.weekNumber===$),L=new Vl(E,g,r);return B?B.days.push(L):M.push(new dw($,[L])),M},[]),R=new uw(g,C);return v.push(R),v},[]);return n.reverseMonths?y.reverse():y}function Sx(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:l,endOfYear:u,newDate:m,today:c}=t,{fromYear:p,toYear:h,fromMonth:y,toMonth:v}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&v&&(r=v),!r&&h&&(r=m(h,11,31));const g=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):p?n=m(p,0,1):!n&&g&&(n=o(l(e.today??c(),-100))),r?r=i(r):h?r=m(h,11,31):!r&&g&&(r=u(e.today??c())),[n&&a(n),r&&a(r)]}function Cx(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a:1,m=s(e);if(!t)return i(m,u);if(!(l(t,e)<a))return i(m,u)}function Mx(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a??1:1,m=s(e);if(!t)return i(m,-u);if(!(l(m,t)<=0))return i(m,-u)}function Dx(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function mo(e,t){const[n,r]=x.useState(e);return[t===void 0?n:t,r]}function kx(e,t){const[n,r]=Sx(e,t),{startOfMonth:o,endOfMonth:a}=t,s=mi(e,n,r,t),[i,l]=mo(s,e.month?s:void 0);x.useEffect(()=>{const R=mi(e,n,r,t);l(R)},[e.timeZone]);const u=wx(i,r,e,t),m=yx(u,e.endMonth?a(e.endMonth):void 0,e,t),c=xx(u,m,e,t),p=Dx(c),h=bx(c),y=Mx(i,n,e,t),v=Cx(i,r,e,t),{disableNavigation:g,onMonthChange:b}=e,w=R=>p.some(M=>M.days.some(E=>E.isEqualTo(R))),S=R=>{if(g)return;let M=o(R);n&&M<o(n)&&(M=o(n)),r&&M>o(r)&&(M=o(r)),l(M),b==null||b(M)};return{months:c,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:v,goToMonth:S,goToDay:R=>{w(R)||S(R.date)}}}var dt;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(dt||(dt={}));function pi(e){return!e[De.disabled]&&!e[De.hidden]&&!e[De.outside]}function Ex(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);pi(i)&&(i[De.focused]&&a<dt.FocusedModifier?(o=s,a=dt.FocusedModifier):r!=null&&r.isEqualTo(s)&&a<dt.LastFocused?(o=s,a=dt.LastFocused):n(s.date)&&a<dt.Selected?(o=s,a=dt.Selected):i[De.today]&&a<dt.Today&&(o=s,a=dt.Today))}return o||(o=e.find(s=>pi(t(s)))),o}function Nx(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:l}=a,{addDays:u,addMonths:m,addWeeks:c,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:v,max:g,min:b,startOfBroadcastWeek:w,startOfISOWeek:S,startOfWeek:D}=s;let R={day:u,week:c,month:m,year:p,startOfWeek:M=>l?w(M,s):i?S(M):D(M),endOfWeek:M=>l?h(M):i?y(M):v(M)}[e](n,t==="after"?1:-1);return t==="before"&&r?R=g([r,R]):t==="after"&&o&&(R=b([o,R])),R}function au(e,t,n,r,o,a,s,i=0){if(i>365)return;const l=Nx(e,t,n.date,r,o,a,s),u=!!(a.disabled&&St(l,a.disabled,s)),m=!!(a.hidden&&St(l,a.hidden,s)),c=l,p=new Vl(l,c,s);return!u&&!m?p:au(e,t,p,r,o,a,s,i+1)}function Rx(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=x.useState(),l=Ex(t.days,n,r||(()=>!1),s),[u,m]=x.useState(a?l:void 0);return{isFocusTarget:v=>!!(l!=null&&l.isEqualTo(v)),setFocused:m,focused:u,blur:()=>{i(u),m(void 0)},moveFocus:(v,g)=>{if(!u)return;const b=au(v,g,u,t.navStart,t.navEnd,e,o);b&&(t.goToDay(b),m(b))}}}function Tx(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=mo(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t,u=h=>(i==null?void 0:i.some(y=>l(y,h)))??!1,{min:m,max:c}=e;return{selected:i,select:(h,y,v)=>{let g=[...i??[]];if(u(h)){if((i==null?void 0:i.length)===m||r&&(i==null?void 0:i.length)===1)return;g=i==null?void 0:i.filter(b=>!l(b,h))}else(i==null?void 0:i.length)===c?g=[h]:g=[...g,h];return o||s(g),o==null||o(g,h,y,v),g},isSelected:u}}function _x(e,t,n=0,r=0,o=!1,a=yt){const{from:s,to:i}=t||{},{isSameDay:l,isAfter:u,isBefore:m}=a;let c;if(!s&&!i)c={from:e,to:n>0?void 0:e};else if(s&&!i)l(s,e)?o?c={from:s,to:void 0}:c=void 0:m(e,s)?c={from:e,to:s}:c={from:s,to:e};else if(s&&i)if(l(s,e)&&l(i,e))o?c={from:s,to:i}:c=void 0;else if(l(s,e))c={from:s,to:n>0?void 0:e};else if(l(i,e))c={from:e,to:n>0?void 0:e};else if(m(e,s))c={from:e,to:i};else if(u(e,s))c={from:s,to:e};else if(u(e,i))c={from:s,to:e};else throw new Error("Invalid range");if(c!=null&&c.from&&(c!=null&&c.to)){const p=a.differenceInCalendarDays(c.to,c.from);r>0&&p>r?c={from:e,to:void 0}:n>1&&p<n&&(c={from:e,to:void 0})}return c}function Ox(e,t,n=yt){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),s=Math.min(a,6);for(let i=0;i<=s;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function hi(e,t,n=yt){return xt(e,t.from,!1,n)||xt(e,t.to,!1,n)||xt(t,e.from,!1,n)||xt(t,e.to,!1,n)}function Px(e,t,n=yt){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?xt(e,i,!1,n):Jl(i,n)?i.some(l=>xt(e,l,!1,n)):qa(i)?i.from&&i.to?hi(e,{from:i.from,to:i.to},n):!1:Ql(i)?Ox(e,i.dayOfWeek,n):Kl(i)?n.isAfter(i.before,i.after)?hi(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):St(e.from,i,n)||St(e.to,i,n):Xl(i)||Zl(i)?St(e.from,i,n)||St(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=l;u++){if(s.some(m=>m(i)))return!0;i=n.addDays(i,1)}}return!1}function Ax(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:s}=e,[i,l]=mo(o,s?o:void 0),u=s?o:i;return{selected:u,select:(p,h,y)=>{const{min:v,max:g}=e,b=p?_x(p,u,v,g,a,t):void 0;return r&&n&&(b!=null&&b.from)&&b.to&&Px({from:b.from,to:b.to},n,t)&&(b.from=p,b.to=void 0),s||l(b),s==null||s(b,p,h,y),b},isSelected:p=>u&&xt(u,p,!1,t)}}function Ix(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=mo(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t;return{selected:i,select:(c,p,h)=>{let y=c;return!r&&i&&i&&l(c,i)&&(y=void 0),o||s(y),o==null||o(y,c,p,h),y},isSelected:c=>i?l(i,c):!1}}function jx(e,t){const n=Ix(e,t),r=Tx(e,t),o=Ax(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function su(e){var Tt;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new We(t.today,t.timeZone)),t.month&&(t.month=new We(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new We(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new We(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new We(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new We(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Tt=t.selected)==null?void 0:Tt.map(U=>new We(U,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new We(t.selected.from,t.timeZone):void 0,to:t.selected.to?new We(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:s,classNames:i}=x.useMemo(()=>{const U={...Ua,...t.locale};return{dateLib:new Nt({locale:U,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:Bw(t.components),formatters:Zw(t.formatters),labels:{...mx,...t.labels},locale:U,classNames:{...Va(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:l,mode:u,navLayout:m,numberOfMonths:c=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:v,onDayMouseEnter:g,onDayMouseLeave:b,onNextClick:w,onPrevClick:S,showWeekNumber:D,styles:C}=t,{formatCaption:R,formatDay:M,formatMonthDropdown:E,formatWeekNumber:$,formatWeekNumberHeader:B,formatWeekdayName:L,formatYearDropdown:q}=r,A=kx(t,a),{days:T,months:_,navStart:N,navEnd:I,previousMonth:k,nextMonth:P,goToMonth:H}=A,z=fw(T,t,N,I,a),{isSelected:O,select:j,selected:Y}=jx(t,a)??{},{blur:G,focused:V,isFocusTarget:F,moveFocus:Z,setFocused:X}=Rx(t,A,z,O??(()=>!1),a),{labelDayButton:Q,labelGridcell:se,labelGrid:ue,labelMonthDropdown:ye,labelNav:J,labelPrevious:Re,labelNext:Te,labelWeekday:oe,labelWeekNumber:me,labelWeekNumberHeader:be,labelYearDropdown:$e}=o,He=x.useMemo(()=>ex(a,t.ISOWeek),[a,t.ISOWeek]),Ae=u!==void 0||h!==void 0,Fe=x.useCallback(()=>{k&&(H(k),S==null||S(k))},[k,H,S]),zt=x.useCallback(()=>{P&&(H(P),w==null||w(P))},[H,P,w]),an=x.useCallback((U,ie)=>ae=>{ae.preventDefault(),ae.stopPropagation(),X(U),j==null||j(U.date,ie,ae),h==null||h(U.date,ie,ae)},[j,h,X]),Rt=x.useCallback((U,ie)=>ae=>{X(U),y==null||y(U.date,ie,ae)},[y,X]),Pn=x.useCallback((U,ie)=>ae=>{G(),p==null||p(U.date,ie,ae)},[G,p]),bt=x.useCallback((U,ie)=>ae=>{const fe={ArrowLeft:[ae.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[ae.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[ae.shiftKey?"year":"week","after"],ArrowUp:[ae.shiftKey?"year":"week","before"],PageUp:[ae.shiftKey?"year":"month","before"],PageDown:[ae.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(fe[ae.key]){ae.preventDefault(),ae.stopPropagation();const[ge,re]=fe[ae.key];Z(ge,re)}v==null||v(U.date,ie,ae)},[Z,v,t.dir]),Gt=x.useCallback((U,ie)=>ae=>{g==null||g(U.date,ie,ae)},[g]),nt=x.useCallback((U,ie)=>ae=>{b==null||b(U.date,ie,ae)},[b]),sn=x.useCallback(U=>ie=>{const ae=Number(ie.target.value),fe=a.setMonth(a.startOfMonth(U),ae);H(fe)},[a,H]),Ge=x.useCallback(U=>ie=>{const ae=Number(ie.target.value),fe=a.setYear(a.startOfMonth(U),ae);H(fe)},[a,H]),{className:cn,style:An}=x.useMemo(()=>({className:[i[ce.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[ce.Root],...t.style}}),[i,t.className,t.style,C]),ln=Yw(t),Ut=x.useRef(null);vx(Ut,!!t.animate,{classNames:i,months:_,focused:V,dateLib:a});const In={dayPickerProps:t,selected:Y,select:j,isSelected:O,months:_,nextMonth:P,previousMonth:k,goToMonth:H,getModifiers:z,components:n,classNames:i,styles:C,labels:o,formatters:r};return x.createElement(eu.Provider,{value:In},x.createElement(n.Root,{rootRef:t.animate?Ut:void 0,className:cn,style:An,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...ln},x.createElement(n.Months,{className:i[ce.Months],style:C==null?void 0:C[ce.Months]},!t.hideNavigation&&!m&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:i[ce.Nav],style:C==null?void 0:C[ce.Nav],"aria-label":J(),onPreviousClick:Fe,onNextClick:zt,previousMonth:k,nextMonth:P}),_.map((U,ie)=>{const ae=Qw(U.date,N,I,r,a),fe=tx(N,I,r,a);return x.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:i[ce.Month],style:C==null?void 0:C[ce.Month],key:ie,displayIndex:ie,calendarMonth:U},m==="around"&&!t.hideNavigation&&ie===0&&x.createElement(n.PreviousMonthButton,{type:"button",className:i[ce.PreviousMonthButton],tabIndex:k?void 0:-1,"aria-disabled":k?void 0:!0,"aria-label":Re(k),onClick:Fe,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:k?void 0:!0,className:i[ce.Chevron],orientation:t.dir==="rtl"?"right":"left"})),x.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:i[ce.MonthCaption],style:C==null?void 0:C[ce.MonthCaption],calendarMonth:U,displayIndex:ie},l!=null&&l.startsWith("dropdown")?x.createElement(n.DropdownNav,{className:i[ce.Dropdowns],style:C==null?void 0:C[ce.Dropdowns]},l==="dropdown"||l==="dropdown-months"?x.createElement(n.MonthsDropdown,{className:i[ce.MonthsDropdown],"aria-label":ye(),classNames:i,components:n,disabled:!!t.disableNavigation,onChange:sn(U.date),options:ae,style:C==null?void 0:C[ce.Dropdown],value:a.getMonth(U.date)}):x.createElement("span",null,E(U.date,a)),l==="dropdown"||l==="dropdown-years"?x.createElement(n.YearsDropdown,{className:i[ce.YearsDropdown],"aria-label":$e(a.options),classNames:i,components:n,disabled:!!t.disableNavigation,onChange:Ge(U.date),options:fe,style:C==null?void 0:C[ce.Dropdown],value:a.getYear(U.date)}):x.createElement("span",null,q(U.date,a)),x.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},R(U.date,a.options,a))):x.createElement(n.CaptionLabel,{className:i[ce.CaptionLabel],role:"status","aria-live":"polite"},R(U.date,a.options,a))),m==="around"&&!t.hideNavigation&&ie===c-1&&x.createElement(n.NextMonthButton,{type:"button",className:i[ce.NextMonthButton],tabIndex:P?void 0:-1,"aria-disabled":P?void 0:!0,"aria-label":Te(P),onClick:zt,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:P?void 0:!0,className:i[ce.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ie===c-1&&m==="after"&&!t.hideNavigation&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:i[ce.Nav],style:C==null?void 0:C[ce.Nav],"aria-label":J(),onPreviousClick:Fe,onNextClick:zt,previousMonth:k,nextMonth:P}),x.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":ue(U.date,a.options,a)||void 0,className:i[ce.MonthGrid],style:C==null?void 0:C[ce.MonthGrid]},!t.hideWeekdays&&x.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:i[ce.Weekdays],style:C==null?void 0:C[ce.Weekdays]},D&&x.createElement(n.WeekNumberHeader,{"aria-label":be(a.options),className:i[ce.WeekNumberHeader],style:C==null?void 0:C[ce.WeekNumberHeader],scope:"col"},B()),He.map((ge,re)=>x.createElement(n.Weekday,{"aria-label":oe(ge,a.options,a),className:i[ce.Weekday],key:re,style:C==null?void 0:C[ce.Weekday],scope:"col"},L(ge,a.options,a)))),x.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:i[ce.Weeks],style:C==null?void 0:C[ce.Weeks]},U.weeks.map((ge,re)=>x.createElement(n.Week,{className:i[ce.Week],key:ge.weekNumber,style:C==null?void 0:C[ce.Week],week:ge},D&&x.createElement(n.WeekNumber,{week:ge,style:C==null?void 0:C[ce.WeekNumber],"aria-label":me(ge.weekNumber,{locale:s}),className:i[ce.WeekNumber],scope:"row",role:"rowheader"},$(ge.weekNumber,a)),ge.days.map(de=>{const{date:ve}=de,le=z(de);if(le[De.focused]=!le.hidden&&!!(V!=null&&V.isEqualTo(de)),le[at.selected]=(O==null?void 0:O(ve))||le.selected,qa(Y)){const{from:Ve,to:Ie}=Y;le[at.range_start]=!!(Ve&&Ie&&a.isSameDay(ve,Ve)),le[at.range_end]=!!(Ve&&Ie&&a.isSameDay(ve,Ie)),le[at.range_middle]=xt(Y,ve,!0,a)}const Ue=Jw(le,C,t.modifiersStyles),xe=mw(le,i,t.modifiersClassNames),Ce=!Ae&&!le.hidden?se(ve,le,a.options,a):void 0;return x.createElement(n.Day,{key:`${a.format(ve,"yyyy-MM-dd")}_${a.format(de.displayMonth,"yyyy-MM")}`,day:de,modifiers:le,className:xe.join(" "),style:Ue,role:"gridcell","aria-selected":le.selected||void 0,"aria-label":Ce,"data-day":a.format(ve,"yyyy-MM-dd"),"data-month":de.outside?a.format(ve,"yyyy-MM"):void 0,"data-selected":le.selected||void 0,"data-disabled":le.disabled||void 0,"data-hidden":le.hidden||void 0,"data-outside":de.outside||void 0,"data-focused":le.focused||void 0,"data-today":le.today||void 0},!le.hidden&&Ae?x.createElement(n.DayButton,{className:i[ce.DayButton],style:C==null?void 0:C[ce.DayButton],type:"button",day:de,modifiers:le,disabled:le.disabled||void 0,tabIndex:F(de)?0:-1,"aria-label":Q(ve,le,a.options,a),onClick:an(de,le),onBlur:Pn(de,le),onFocus:Rt(de,le),onKeyDown:bt(de,le),onMouseEnter:Gt(de,le),onMouseLeave:nt(de,le)},M(ve,a.options,a)):!le.hidden&&M(de.date,a.options,a))}))))))})),t.footer&&x.createElement(n.Footer,{className:i[ce.Footer],style:C==null?void 0:C[ce.Footer],role:"status","aria-live":"polite"},t.footer)))}function Ka(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ar={exports:{}},$x=Ar.exports,gi;function iu(){return gi||(gi=1,function(e,t){(function(n,r){e.exports=r()})($x,function(){var n=1e3,r=6e4,o=36e5,a="millisecond",s="second",i="minute",l="hour",u="day",m="week",c="month",p="quarter",h="year",y="date",v="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var _=["th","st","nd","rd"],N=T%100;return"["+T+(_[(N-20)%10]||_[N]||_[0])+"]"}},S=function(T,_,N){var I=String(T);return!I||I.length>=_?T:""+Array(_+1-I.length).join(N)+T},D={s:S,z:function(T){var _=-T.utcOffset(),N=Math.abs(_),I=Math.floor(N/60),k=N%60;return(_<=0?"+":"-")+S(I,2,"0")+":"+S(k,2,"0")},m:function T(_,N){if(_.date()<N.date())return-T(N,_);var I=12*(N.year()-_.year())+(N.month()-_.month()),k=_.clone().add(I,c),P=N-k<0,H=_.clone().add(I+(P?-1:1),c);return+(-(I+(N-k)/(P?k-H:H-k))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:c,y:h,w:m,d:u,D:y,h:l,m:i,s,ms:a,Q:p}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},C="en",R={};R[C]=w;var M="$isDayjsObject",E=function(T){return T instanceof q||!(!T||!T[M])},$=function T(_,N,I){var k;if(!_)return C;if(typeof _=="string"){var P=_.toLowerCase();R[P]&&(k=P),N&&(R[P]=N,k=P);var H=_.split("-");if(!k&&H.length>1)return T(H[0])}else{var z=_.name;R[z]=_,k=z}return!I&&k&&(C=k),k||!I&&C},B=function(T,_){if(E(T))return T.clone();var N=typeof _=="object"?_:{};return N.date=T,N.args=arguments,new q(N)},L=D;L.l=$,L.i=E,L.w=function(T,_){return B(T,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var q=function(){function T(N){this.$L=$(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[M]=!0}var _=T.prototype;return _.parse=function(N){this.$d=function(I){var k=I.date,P=I.utc;if(k===null)return new Date(NaN);if(L.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var H=k.match(g);if(H){var z=H[2]-1||0,O=(H[7]||"0").substring(0,3);return P?new Date(Date.UTC(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,O)):new Date(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,O)}}return new Date(k)}(N),this.init()},_.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},_.$utils=function(){return L},_.isValid=function(){return this.$d.toString()!==v},_.isSame=function(N,I){var k=B(N);return this.startOf(I)<=k&&k<=this.endOf(I)},_.isAfter=function(N,I){return B(N)<this.startOf(I)},_.isBefore=function(N,I){return this.endOf(I)<B(N)},_.$g=function(N,I,k){return L.u(N)?this[I]:this.set(k,N)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(N,I){var k=this,P=!!L.u(I)||I,H=L.p(N),z=function(X,Q){var se=L.w(k.$u?Date.UTC(k.$y,Q,X):new Date(k.$y,Q,X),k);return P?se:se.endOf(u)},O=function(X,Q){return L.w(k.toDate()[X].apply(k.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Q)),k)},j=this.$W,Y=this.$M,G=this.$D,V="set"+(this.$u?"UTC":"");switch(H){case h:return P?z(1,0):z(31,11);case c:return P?z(1,Y):z(0,Y+1);case m:var F=this.$locale().weekStart||0,Z=(j<F?j+7:j)-F;return z(P?G-Z:G+(6-Z),Y);case u:case y:return O(V+"Hours",0);case l:return O(V+"Minutes",1);case i:return O(V+"Seconds",2);case s:return O(V+"Milliseconds",3);default:return this.clone()}},_.endOf=function(N){return this.startOf(N,!1)},_.$set=function(N,I){var k,P=L.p(N),H="set"+(this.$u?"UTC":""),z=(k={},k[u]=H+"Date",k[y]=H+"Date",k[c]=H+"Month",k[h]=H+"FullYear",k[l]=H+"Hours",k[i]=H+"Minutes",k[s]=H+"Seconds",k[a]=H+"Milliseconds",k)[P],O=P===u?this.$D+(I-this.$W):I;if(P===c||P===h){var j=this.clone().set(y,1);j.$d[z](O),j.init(),this.$d=j.set(y,Math.min(this.$D,j.daysInMonth())).$d}else z&&this.$d[z](O);return this.init(),this},_.set=function(N,I){return this.clone().$set(N,I)},_.get=function(N){return this[L.p(N)]()},_.add=function(N,I){var k,P=this;N=Number(N);var H=L.p(I),z=function(Y){var G=B(P);return L.w(G.date(G.date()+Math.round(Y*N)),P)};if(H===c)return this.set(c,this.$M+N);if(H===h)return this.set(h,this.$y+N);if(H===u)return z(1);if(H===m)return z(7);var O=(k={},k[i]=r,k[l]=o,k[s]=n,k)[H]||1,j=this.$d.getTime()+N*O;return L.w(j,this)},_.subtract=function(N,I){return this.add(-1*N,I)},_.format=function(N){var I=this,k=this.$locale();if(!this.isValid())return k.invalidDate||v;var P=N||"YYYY-MM-DDTHH:mm:ssZ",H=L.z(this),z=this.$H,O=this.$m,j=this.$M,Y=k.weekdays,G=k.months,V=k.meridiem,F=function(Q,se,ue,ye){return Q&&(Q[se]||Q(I,P))||ue[se].slice(0,ye)},Z=function(Q){return L.s(z%12||12,Q,"0")},X=V||function(Q,se,ue){var ye=Q<12?"AM":"PM";return ue?ye.toLowerCase():ye};return P.replace(b,function(Q,se){return se||function(ue){switch(ue){case"YY":return String(I.$y).slice(-2);case"YYYY":return L.s(I.$y,4,"0");case"M":return j+1;case"MM":return L.s(j+1,2,"0");case"MMM":return F(k.monthsShort,j,G,3);case"MMMM":return F(G,j);case"D":return I.$D;case"DD":return L.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return F(k.weekdaysMin,I.$W,Y,2);case"ddd":return F(k.weekdaysShort,I.$W,Y,3);case"dddd":return Y[I.$W];case"H":return String(z);case"HH":return L.s(z,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return X(z,O,!0);case"A":return X(z,O,!1);case"m":return String(O);case"mm":return L.s(O,2,"0");case"s":return String(I.$s);case"ss":return L.s(I.$s,2,"0");case"SSS":return L.s(I.$ms,3,"0");case"Z":return H}return null}(Q)||H.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(N,I,k){var P,H=this,z=L.p(I),O=B(N),j=(O.utcOffset()-this.utcOffset())*r,Y=this-O,G=function(){return L.m(H,O)};switch(z){case h:P=G()/12;break;case c:P=G();break;case p:P=G()/3;break;case m:P=(Y-j)/6048e5;break;case u:P=(Y-j)/864e5;break;case l:P=Y/o;break;case i:P=Y/r;break;case s:P=Y/n;break;default:P=Y}return k?P:L.a(P)},_.daysInMonth=function(){return this.endOf(c).$D},_.$locale=function(){return R[this.$L]},_.locale=function(N,I){if(!N)return this.$L;var k=this.clone(),P=$(N,I,!0);return P&&(k.$L=P),k},_.clone=function(){return L.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},T}(),A=q.prototype;return B.prototype=A,[["$ms",a],["$s",s],["$m",i],["$H",l],["$W",u],["$M",c],["$y",h],["$D",y]].forEach(function(T){A[T[1]]=function(_){return this.$g(_,T[0],T[1])}}),B.extend=function(T,_){return T.$i||(T(_,q,B),T.$i=!0),B},B.locale=$,B.isDayjs=E,B.unix=function(T){return B(1e3*T)},B.en=R[C],B.Ls=R,B.p={},B})}(Ar)),Ar.exports}var Lx=iu();const Ct=Ka(Lx);var Ir={exports:{}},Fx=Ir.exports,vi;function Wx(){return vi||(vi=1,function(e,t){(function(n,r){e.exports=r()})(Fx,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,a){var s=o.prototype,i=s.format;a.en.formats=n,s.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,m=function(c,p){return c.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(h,y,v){var g=v&&v.toUpperCase();return y||p[v]||n[v]||p[g].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(b,w,S){return w||S.slice(1)})})}(l,u===void 0?{}:u);return i.call(this,m)}}})}(Ir)),Ir.exports}var Bx=Wx();const cu=Ka(Bx);var jr={exports:{}},Yx=jr.exports,yi;function Hx(){return yi||(yi=1,function(e,t){(function(n,r){e.exports=r(iu())})(Yx,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var o=r(n),a={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(s){return""+s+(s===1?"er":"")}};return o.default.locale(a,null,!0),a})}(jr)),jr.exports}Hx();function zx({month:e,onMonthChange:t}){const n=e.getFullYear(),r=e.getMonth(),o=["January","February","March","April","May","June","July","August","September","October","November","December"],a=new Date().getFullYear(),s=Array.from({length:201},(c,p)=>a-100+p),i=c=>{const p=new Date(e);p.setMonth(Number.parseInt(c)),t(p)},l=c=>{const p=new Date(e);p.setFullYear(Number.parseInt(c)),t(p)},u=()=>{const c=new Date(e);c.setMonth(c.getMonth()-1),t(c)},m=()=>{const c=new Date(e);c.setMonth(c.getMonth()+1),t(c)};return d.jsxs("div",{className:"flex items-center justify-between p-2 border-b bg-muted",children:[d.jsx(Dt,{variant:"outline",size:"small",onClick:u,className:"h-7 w-7 p-0",children:d.jsx(nc,{className:"h-4 w-4"})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(pa,{value:r.toString(),onValueChange:i,children:[d.jsx(Hr,{className:"w-32 h-8 text-sm",children:d.jsx(ha,{})}),d.jsx(zr,{children:o.map((c,p)=>d.jsx(Gr,{value:p.toString(),children:c},c))})]}),d.jsxs(pa,{value:n.toString(),onValueChange:l,children:[d.jsx(Hr,{className:"w-20 h-8 text-sm",children:d.jsx(ha,{})}),d.jsx(zr,{className:"max-h-[200px]",children:s.map(c=>d.jsx(Gr,{value:c.toString(),children:c},c))})]})]}),d.jsx(Dt,{variant:"outline",size:"small",onClick:m,className:"h-7 w-7 p-0",children:d.jsx(Na,{className:"h-4 w-4"})})]})}Ct.extend(cu);const Ur=({label:e,placeholder:t="Pick a date",helperText:n,error:r,required:o,value:a,onSelect:s,className:i,minDate:l,maxDate:u,disabled:m,readOnly:c,locale:p="en",showOutsideDays:h,dayPickerProps:y,month:v,onMonthChange:g,open:b,onOpenChange:w,...S})=>{const[D,C]=x.useState(!1),R=b!==void 0?b:D,M=w||C,E=v??a??new Date,$=B=>{B&&(!a||B.getTime()!==a.getTime())&&(s==null||s(B),M(!1))};return Ct.locale(p),d.jsxs("div",{className:W("space-y-1",i),...S,children:[e&&d.jsxs(rn,{className:"text-sm font-medium text-gray-700",children:[e,o&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(Ba,{open:R,onOpenChange:M,children:[d.jsx(Ya,{asChild:!0,children:d.jsxs(Dt,{variant:"outline",className:W("w-full flex justify-between items-center font-normal",!a&&"text-muted-foreground",r&&"border border-red-500 focus:ring-red-500"),disabled:m,"aria-readonly":c,children:[d.jsx("span",{className:W("text-left",!a&&"text-muted-foreground"),children:a?Ct(a).locale(p).format("LL"):t}),d.jsx(tc,{strokeWidth:1.2,className:"ml-6 h-6 w-6 shrink-0 text-foreground"})]})}),d.jsx(co,{className:"w-auto p-0",align:"start",children:d.jsxs("div",{className:"bg-white rounded-md border shadow-md",children:[d.jsx(zx,{month:E,onMonthChange:g??(()=>{})}),d.jsx("div",{className:"p-3",children:d.jsx(su,{mode:"single",selected:a,onSelect:$,month:E,onMonthChange:g,fromDate:l,toDate:u,showOutsideDays:h,className:"p-0",classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"hidden",caption_label:"text-sm font-medium",nav:"hidden",nav_button:"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",nav_button_previous:"absolute left-1 top-1",nav_button_next:"absolute right-1 top-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:"h-9 w-9 p-0 font-normal aria-selected:opacity-100 hover:bg-accent hover:text-accent-foreground rounded-md transition-colors",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible"},...y})})]})})]}),(n||r)&&d.jsx("p",{className:W("text-xs",r?"text-red-500":"text-gray-500"),children:r||n})]})};function Gx({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:s,...i}){const l=Va();return d.jsx(su,{showOutsideDays:n,className:W("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...a},classNames:{root:W("w-fit",l.root),months:W("relative flex flex-col gap-4 md:flex-row",l.months),month:W("flex w-full flex-col gap-4",l.month),nav:W("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",l.nav),button_previous:W(na({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_previous),button_next:W(na({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_next),month_caption:W("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",l.month_caption),dropdowns:W("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",l.dropdowns),dropdown_root:W("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",l.dropdown_root),dropdown:W("absolute inset-0 opacity-0",l.dropdown),caption_label:W("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",l.caption_label),table:"w-full border-collapse",weekdays:W("flex",l.weekdays),weekday:W("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",l.weekday),week:W("mt-2 flex w-full",l.week),week_number_header:W("w-[--cell-size] select-none",l.week_number_header),week_number:W("text-muted-foreground select-none text-[0.8rem]",l.week_number),day:W("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",l.day),range_start:W("bg-accent rounded-l-md",l.range_start),range_middle:W("rounded-none",l.range_middle),range_end:W("bg-accent rounded-r-md",l.range_end),today:W("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",l.today),outside:W("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:W("text-muted-foreground opacity-50",l.disabled),hidden:W("invisible",l.hidden),...t},components:{Root:({className:u,rootRef:m,...c})=>d.jsx("div",{"data-slot":"calendar",ref:m,className:W(u),...c}),Chevron:({className:u,orientation:m,...c})=>m==="left"?d.jsx(nc,{className:W("size-4",u),...c}):m==="right"?d.jsx(Na,{className:W("size-4",u),...c}):d.jsx(tr,{className:W("size-4",u),...c}),DayButton:Ux,WeekNumber:({children:u,...m})=>d.jsx("td",{...m,children:d.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:u})}),...s},...i})}function Ux({className:e,day:t,modifiers:n,...r}){const o=Va(),a=f.useRef(null);return f.useEffect(()=>{var p;n.focused&&((p=a.current)==null||p.focus())},[n.focused]),d.jsx(Dt,{ref:a,variant:"ghost",size:"icon.small","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:W("flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none","data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground","data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground","data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md","group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 group-data-[focused=true]/day:ring-[3px]","[&>span]:text-xs [&>span]:opacity-70",o.day,e),...r})}var $r={exports:{}},qx=$r.exports,bi;function Vx(){return bi||(bi=1,function(e,t){(function(n,r){e.exports=r()})(qx,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,a=/\d\d/,s=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,l={},u=function(g){return(g=+g)+(g>68?1900:2e3)},m=function(g){return function(b){this[g]=+b}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var w=b.match(/([+-]|\d\d)/g),S=60*w[1]+(+w[2]||0);return S===0?0:w[0]==="+"?-S:S}(g)}],p=function(g){var b=l[g];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(g,b){var w,S=l.meridiem;if(S){for(var D=1;D<=24;D+=1)if(g.indexOf(S(D,0,b))>-1){w=D>12;break}}else w=g===(b?"pm":"PM");return w},y={A:[i,function(g){this.afternoon=h(g,!1)}],a:[i,function(g){this.afternoon=h(g,!0)}],Q:[o,function(g){this.month=3*(g-1)+1}],S:[o,function(g){this.milliseconds=100*+g}],SS:[a,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[s,m("seconds")],ss:[s,m("seconds")],m:[s,m("minutes")],mm:[s,m("minutes")],H:[s,m("hours")],h:[s,m("hours")],HH:[s,m("hours")],hh:[s,m("hours")],D:[s,m("day")],DD:[a,m("day")],Do:[i,function(g){var b=l.ordinal,w=g.match(/\d+/);if(this.day=w[0],b)for(var S=1;S<=31;S+=1)b(S).replace(/\[|\]/g,"")===g&&(this.day=S)}],w:[s,m("week")],ww:[a,m("week")],M:[s,m("month")],MM:[a,m("month")],MMM:[i,function(g){var b=p("months"),w=(p("monthsShort")||b.map(function(S){return S.slice(0,3)})).indexOf(g)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[i,function(g){var b=p("months").indexOf(g)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,m("year")],YY:[a,function(g){this.year=u(g)}],YYYY:[/\d{4}/,m("year")],Z:c,ZZ:c};function v(g){var b,w;b=g,w=l&&l.formats;for(var S=(g=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(B,L,q){var A=q&&q.toUpperCase();return L||w[q]||n[q]||w[A].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(T,_,N){return _||N.slice(1)})})).match(r),D=S.length,C=0;C<D;C+=1){var R=S[C],M=y[R],E=M&&M[0],$=M&&M[1];S[C]=$?{regex:E,parser:$}:R.replace(/^\[|\]$/g,"")}return function(B){for(var L={},q=0,A=0;q<D;q+=1){var T=S[q];if(typeof T=="string")A+=T.length;else{var _=T.regex,N=T.parser,I=B.slice(A),k=_.exec(I)[0];N.call(L,k),B=B.replace(k,"")}}return function(P){var H=P.afternoon;if(H!==void 0){var z=P.hours;H?z<12&&(P.hours+=12):z===12&&(P.hours=0),delete P.afternoon}}(L),L}}return function(g,b,w){w.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(u=g.parseTwoDigitYear);var S=b.prototype,D=S.parse;S.parse=function(C){var R=C.date,M=C.utc,E=C.args;this.$u=M;var $=E[1];if(typeof $=="string"){var B=E[2]===!0,L=E[3]===!0,q=B||L,A=E[2];L&&(A=E[2]),l=this.$locale(),!B&&A&&(l=w.Ls[A]),this.$d=function(I,k,P,H){try{if(["x","X"].indexOf(k)>-1)return new Date((k==="X"?1e3:1)*I);var z=v(k)(I),O=z.year,j=z.month,Y=z.day,G=z.hours,V=z.minutes,F=z.seconds,Z=z.milliseconds,X=z.zone,Q=z.week,se=new Date,ue=Y||(O||j?1:se.getDate()),ye=O||se.getFullYear(),J=0;O&&!j||(J=j>0?j-1:se.getMonth());var Re,Te=G||0,oe=V||0,me=F||0,be=Z||0;return X?new Date(Date.UTC(ye,J,ue,Te,oe,me,be+60*X.offset*1e3)):P?new Date(Date.UTC(ye,J,ue,Te,oe,me,be)):(Re=new Date(ye,J,ue,Te,oe,me,be),Q&&(Re=H(Re).week(Q).toDate()),Re)}catch{return new Date("")}}(R,$,M,w),this.init(),A&&A!==!0&&(this.$L=this.locale(A).$L),q&&R!=this.format($)&&(this.$d=new Date("")),l={}}else if($ instanceof Array)for(var T=$.length,_=1;_<=T;_+=1){E[1]=$[_-1];var N=w.apply(this,E);if(N.isValid()){this.$d=N.$d,this.$L=N.$L,this.init();break}_===T&&(this.$d=new Date(""))}else D.call(this,C)}}})}($r)),$r.exports}var Kx=Vx();const Xx=Ka(Kx);Ct.extend(Xx);Ct.extend(cu);const Zx={"MM/DD/YYYY":{separator:"/",pattern:/^[0-9/]$/},"DD/MM/YYYY":{separator:"/",pattern:/^[0-9/]$/},"YYYY-MM-DD":{separator:"-",pattern:/^[0-9-]$/},"DD-MM-YYYY":{separator:"-",pattern:/^[0-9-]$/}},Qx=({label:e,placeholder:t,helperText:n,required:r,value:o,onSelect:a,className:s,minDate:i,maxDate:l,disabled:u,readOnly:m,locale:c="en",dateFormat:p="DD/MM/YYYY"})=>{const[h,y]=f.useState(!1),[v,g]=f.useState(""),[b,w]=f.useState(o),S=f.useMemo(()=>p,[p]),D=f.useMemo(()=>Zx[S],[S]),C=f.useMemo(()=>t||S.toLowerCase(),[t,S]),R=f.useCallback(A=>{const T=A.replace(/\D/g,""),{separator:_}=D;if(T.length<=2)return T;switch(S){case"MM/DD/YYYY":case"DD/MM/YYYY":return T.length<=4?`${T.substring(0,2)}${_}${T.substring(2)}`:`${T.substring(0,2)}${_}${T.substring(2,4)}${_}${T.substring(4,8)}`;case"YYYY-MM-DD":return T.length<=4?T:T.length<=6?`${T.substring(0,4)}${_}${T.substring(4)}`:`${T.substring(0,4)}${_}${T.substring(4,6)}${_}${T.substring(6,8)}`;case"DD-MM-YYYY":return T.length<=4?`${T.substring(0,2)}${_}${T.substring(2)}`:`${T.substring(0,2)}${_}${T.substring(2,4)}${_}${T.substring(4,8)}`;default:return A}},[S,D]),M=f.useMemo(()=>A=>{const T=A.trim();return T&&Ct(T,S,!0).isValid()?Ct(T,S):null},[S]),E=f.useCallback(A=>Ct(A).format(S),[S]);f.useEffect(()=>{g(o?E(o):""),w(o),Ct.locale(c)},[o,c,E]);const $=f.useCallback(A=>{let T=A.target.value;if(g(T),!T.trim()){w(void 0),a==null||a(void 0);return}const _=R(T);_!==T&&T.replace(/\D/g,"").length>1&&(g(_),T=_);const N=M(T);if(N!=null&&N.isValid()){const I=N.toDate();(!i||I>=i)&&(!l||I<=l)&&(w(I),a==null||a(I))}},[R,M,a,i,l]),B=f.useCallback(()=>{b&&g(E(b))},[b,E]),L=f.useCallback(A=>{A&&(g(E(A)),w(A),a==null||a(A),y(!1))},[a,E]),q=f.useCallback(A=>{if(!["Backspace","Delete","Tab","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(A.key)&&!D.pattern.test(A.key)&&!A.ctrlKey&&!A.metaKey){A.preventDefault();return}A.key==="Enter"&&(A.preventDefault(),B())},[D.pattern,B]);return d.jsxs("div",{className:W("space-y-1",s),children:[e&&d.jsxs(rn,{className:"text-sm font-medium text-gray-700",children:[e,r&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(Ba,{open:h,onOpenChange:y,children:[d.jsxs("div",{className:"w-60 relative",children:[d.jsx(nn,{type:"text",value:v,onChange:$,onBlur:B,onKeyDown:q,placeholder:C,disabled:u,readOnly:m,className:"w-full pr-12"}),d.jsx(Ya,{asChild:!0,children:d.jsx("button",{type:"button",className:"absolute right-1 top-1/2 -translate-y-1/2 bg-transparent border-0 outline-none text-black hover:text-black focus:ring-2 focus:ring-ring",style:{height:"1.75rem",width:"1.75rem"},onClick:()=>y(A=>!A),disabled:u||m,"aria-label":"Open calendar",children:d.jsx(tc,{strokeWidth:1,className:"h-5 w-5"})})})]}),d.jsx(co,{className:"w-auto p-0",align:"start",children:d.jsx(Gx,{mode:"single",selected:b,onSelect:L,fromDate:i,toDate:l})})]}),n&&d.jsx("p",{className:"text-xs text-gray-500",children:n})]})};function Sn({label:e,placeholder:t="Select option",options:n,leadingIcon:r,helperText:o,error:a,required:s,onValueChange:i,className:l,variant:u="default",disabled:m=!1}){return d.jsxs("div",{className:W("space-y-1",l),children:[e&&d.jsxs(rn,{className:W("text-sm font-medium",m?"text-gray-400":"text-gray-700"),children:[e,s&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(pa,{onValueChange:i,disabled:m,children:[d.jsx(Hr,{className:W("border-input focus-within:ring-primary",a&&"border-red-500 focus-within:ring-red-500",u==="gray"&&"bg-gray-100 border-gray-300 text-gray-700",m&&"opacity-50 cursor-not-allowed"),children:d.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&d.jsx("div",{className:"text-gray-400",children:r}),d.jsx(ha,{placeholder:t})]})}),d.jsx(zr,{children:n.map(c=>d.jsx(Gr,{value:c.value,children:c.label},c.value))})]}),(o||a)&&d.jsx("p",{className:W("text-xs",a?"text-red-500":m?"text-gray-400":"text-gray-500"),children:a||o})]})}const Jx=({label:e,variant:t="filled",color:n="default",size:r="medium",deletable:o=!1,onDelete:a,onClick:s,icon:i,avatar:l,disabled:u=!1,className:m="",...c})=>{const p="inline-flex items-center gap-1 font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",h={small:"px-2 py-0.5 text-xs rounded-full",medium:"px-3 py-1 text-sm rounded-full",large:"px-4 py-1.5 text-base rounded-full"},y={default:{filled:"bg-gray-200 text-gray-800 hover:bg-gray-300",outlined:"border border-gray-300 text-gray-700 hover:bg-gray-50"},primary:{filled:"bg-blue-500 text-white hover:bg-blue-600",outlined:"border border-blue-500 text-blue-600 hover:bg-blue-50"},secondary:{filled:"bg-purple-500 text-white hover:bg-purple-600",outlined:"border border-purple-500 text-purple-600 hover:bg-purple-50"},success:{filled:"bg-green-500 text-white hover:bg-green-600",outlined:"border border-green-500 text-green-600 hover:bg-green-50"},warning:{filled:"bg-yellow-500 text-white hover:bg-yellow-600",outlined:"border border-yellow-500 text-yellow-600 hover:bg-yellow-50"},error:{filled:"bg-red-500 text-white hover:bg-red-600",outlined:"border border-red-500 text-red-600 hover:bg-red-50"}},v=u?"opacity-50 cursor-not-allowed":"cursor-pointer",g=s&&!u?"hover:shadow-md":"",b=`
151
+ `)},Bv=0,mn=[];function Yv(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Bv++)[0],a=f.useState(Ac)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=lv([e.lockRef.current],(e.shards||[]).map(ni),!0).filter(Boolean);return v.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(v,g){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!s.current.allowPinchZoom;var b=kr(v),w=n.current,S="deltaX"in v?v.deltaX:w[0]-b[0],D="deltaY"in v?v.deltaY:w[1]-b[1],C,N=v.target,M=Math.abs(S)>Math.abs(D)?"h":"v";if("touches"in v&&M==="h"&&N.type==="range")return!1;var E=ei(M,N);if(!E)return!0;if(E?C=M:(C=M==="v"?"h":"v",E=ei(M,N)),!E)return!1;if(!r.current&&"changedTouches"in v&&(S||D)&&(r.current=C),!C)return!0;var $=r.current||C;return Lv($,g,v,$==="h"?S:D)},[]),l=f.useCallback(function(v){var g=v;if(!(!mn.length||mn[mn.length-1]!==a)){var b="deltaY"in g?ti(g):kr(g),w=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&Fv(C.delta,b)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var S=(s.current.shards||[]).map(ni).filter(Boolean).filter(function(C){return C.contains(g.target)}),D=S.length>0?i(g,S[0]):!s.current.noIsolation;D&&g.cancelable&&g.preventDefault()}}},[]),u=f.useCallback(function(v,g,b,w){var S={name:v,delta:g,target:b,should:w,shadowParent:Hv(b)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(D){return D!==S})},1)},[]),m=f.useCallback(function(v){n.current=kr(v),r.current=void 0},[]),c=f.useCallback(function(v){u(v.type,ti(v),v.target,i(v,e.lockRef.current))},[]),p=f.useCallback(function(v){u(v.type,kr(v),v.target,i(v,e.lockRef.current))},[]);f.useEffect(function(){return mn.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,fn),document.addEventListener("touchmove",l,fn),document.addEventListener("touchstart",m,fn),function(){mn=mn.filter(function(v){return v!==a}),document.removeEventListener("wheel",l,fn),document.removeEventListener("touchmove",l,fn),document.removeEventListener("touchstart",m,fn)}},[]);var h=e.removeScrollBar,y=e.inert;return f.createElement(f.Fragment,null,y?f.createElement(a,{styles:Wv(o)}):null,h?f.createElement(_v,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Hv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const zv=yv(Pc,Yv);var ir=f.forwardRef(function(e,t){return f.createElement(so,ft({},e,{ref:t,sideCar:zv}))});ir.classNames=so.classNames;var io="Popover",[Lc,nD]=Be(io,[Ft]),cr=Ft(),[Gv,Wt]=Lc(io),Fc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=cr(t),l=f.useRef(null),[u,m]=f.useState(!1),[c,p]=tt({prop:r,defaultProp:o??!1,onChange:a,caller:io});return d.jsx(or,{...i,children:d.jsx(Gv,{scope:t,contentId:ke(),triggerRef:l,open:c,onOpenChange:p,onOpenToggle:f.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:f.useCallback(()=>m(!0),[]),onCustomAnchorRemove:f.useCallback(()=>m(!1),[]),modal:s,children:n})})};Fc.displayName=io;var Wc="PopoverAnchor",Uv=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Wt(Wc,n),a=cr(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),d.jsx(ar,{...a,...r,ref:t})});Uv.displayName=Wc;var Bc="PopoverTrigger",Yc=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Wt(Bc,n),a=cr(n),s=he(t,o.triggerRef),i=d.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":qc(o.open),...r,ref:s,onClick:K(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:d.jsx(ar,{asChild:!0,...a,children:i})});Yc.displayName=Bc;var Wa="PopoverPortal",[qv,Vv]=Lc(Wa,{forceMount:void 0}),Hc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Wt(Wa,t);return d.jsx(qv,{scope:t,forceMount:n,children:d.jsx(ze,{present:n||a.open,children:d.jsx(sr,{asChild:!0,container:o,children:r})})})};Hc.displayName=Wa;var wn="PopoverContent",zc=f.forwardRef((e,t)=>{const n=Vv(wn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Wt(wn,e.__scopePopover);return d.jsx(ze,{present:r||a.open,children:a.modal?d.jsx(Xv,{...o,ref:t}):d.jsx(Zv,{...o,ref:t})})});zc.displayName=wn;var Kv=It("PopoverContent.RemoveScroll"),Xv=f.forwardRef((e,t)=>{const n=Wt(wn,e.__scopePopover),r=f.useRef(null),o=he(t,r),a=f.useRef(!1);return f.useEffect(()=>{const s=r.current;if(s)return ao(s)},[]),d.jsx(ir,{as:Kv,allowPinchZoom:!0,children:d.jsx(Gc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,u=i.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Zv=f.forwardRef((e,t)=>{const n=Wt(wn,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(Gc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Gc=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:m,...c}=e,p=Wt(wn,n),h=cr(n);return Jr(),d.jsx(nr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(En,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:m,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:d.jsx(ro,{"data-state":qc(p.open),role:"dialog",id:p.contentId,...h,...c,ref:t,style:{...c.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Uc="PopoverClose",Qv=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Wt(Uc,n);return d.jsx(ee.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});Qv.displayName=Uc;var Jv="PopoverArrow",ey=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=cr(n);return d.jsx(oo,{...o,...r,ref:t})});ey.displayName=Jv;function qc(e){return e?"open":"closed"}var ty=Fc,ny=Yc,ry=Hc,Vc=zc;const Ba=ty,Ya=ny,co=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(ry,{children:d.jsx(Vc,{ref:r,sideOffset:t,className:W("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n})}));co.displayName=Vc.displayName;function ri(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ha(e){const t=e+"CollectionProvider",[n,r]=Be(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:g,children:b}=v,w=x.useRef(null),S=x.useRef(new Map).current;return d.jsx(o,{scope:g,itemMap:S,collectionRef:w,children:b})};s.displayName=t;const i=e+"CollectionSlot",l=It(i),u=x.forwardRef((v,g)=>{const{scope:b,children:w}=v,S=a(i,b),D=he(g,S.collectionRef);return d.jsx(l,{ref:D,children:w})});u.displayName=i;const m=e+"CollectionItemSlot",c="data-radix-collection-item",p=It(m),h=x.forwardRef((v,g)=>{const{scope:b,children:w,...S}=v,D=x.useRef(null),C=he(g,D),N=a(m,b);return x.useEffect(()=>(N.itemMap.set(D,{ref:D,...S}),()=>void N.itemMap.delete(D))),d.jsx(p,{[c]:"",ref:C,children:w})});h.displayName=m;function y(v){const g=a(e+"CollectionConsumer",v);return x.useCallback(()=>{const w=g.collectionRef.current;if(!w)return[];const S=Array.from(w.querySelectorAll(`[${c}]`));return Array.from(g.itemMap.values()).sort((N,M)=>S.indexOf(N.ref.current)-S.indexOf(M.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},y,r]}var oy=f.createContext(void 0);function lr(e){const t=f.useContext(oy);return e||t||"ltr"}function za(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Kc=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"}),ay="VisuallyHidden",Xc=f.forwardRef((e,t)=>d.jsx(ee.span,{...e,ref:t,style:{...Kc,...e.style}}));Xc.displayName=ay;var sy=Xc,iy=[" ","Enter","ArrowUp","ArrowDown"],cy=[" ","Enter"],Qt="Select",[lo,uo,ly]=Ha(Qt),[Tn,rD]=Be(Qt,[ly,Ft]),fo=Ft(),[uy,Bt]=Tn(Qt),[dy,fy]=Tn(Qt),Zc=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:m,autoComplete:c,disabled:p,required:h,form:y}=e,v=fo(t),[g,b]=f.useState(null),[w,S]=f.useState(null),[D,C]=f.useState(!1),N=lr(u),[M,E]=tt({prop:r,defaultProp:o??!1,onChange:a,caller:Qt}),[$,B]=tt({prop:s,defaultProp:i,onChange:l,caller:Qt}),L=f.useRef(null),q=g?y||!!g.closest("form"):!0,[A,T]=f.useState(new Set),_=Array.from(A).map(R=>R.props.value).join(";");return d.jsx(or,{...v,children:d.jsxs(uy,{required:h,scope:t,trigger:g,onTriggerChange:b,valueNode:w,onValueNodeChange:S,valueNodeHasChildren:D,onValueNodeHasChildrenChange:C,contentId:ke(),value:$,onValueChange:B,open:M,onOpenChange:E,dir:N,triggerPointerDownPosRef:L,disabled:p,children:[d.jsx(lo.Provider,{scope:t,children:d.jsx(dy,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(R=>{T(I=>new Set(I).add(R))},[]),onNativeOptionRemove:f.useCallback(R=>{T(I=>{const k=new Set(I);return k.delete(R),k})},[]),children:n})}),q?d.jsxs(xl,{"aria-hidden":!0,required:h,tabIndex:-1,name:m,autoComplete:c,value:$,onChange:R=>B(R.target.value),disabled:p,form:y,children:[$===void 0?d.jsx("option",{value:""}):null,Array.from(A)]},_):null]})})};Zc.displayName=Qt;var Qc="SelectTrigger",Jc=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=fo(n),s=Bt(Qc,n),i=s.disabled||r,l=he(t,s.onTriggerChange),u=uo(n),m=f.useRef("touch"),[c,p,h]=Cl(v=>{const g=u().filter(S=>!S.disabled),b=g.find(S=>S.value===s.value),w=Ml(g,v,b);w!==void 0&&s.onValueChange(w.value)}),y=v=>{i||(s.onOpenChange(!0),h()),v&&(s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return d.jsx(ar,{asChild:!0,...a,children:d.jsx(ee.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Sl(s.value)?"":void 0,...o,ref:l,onClick:K(o.onClick,v=>{v.currentTarget.focus(),m.current!=="mouse"&&y(v)}),onPointerDown:K(o.onPointerDown,v=>{m.current=v.pointerType;const g=v.target;g.hasPointerCapture(v.pointerId)&&g.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(y(v),v.preventDefault())}),onKeyDown:K(o.onKeyDown,v=>{const g=c.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&p(v.key),!(g&&v.key===" ")&&iy.includes(v.key)&&(y(),v.preventDefault())})})})});Jc.displayName=Qc;var el="SelectValue",tl=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Bt(el,n),{onValueNodeHasChildrenChange:u}=l,m=a!==void 0,c=he(t,l.onValueNodeChange);return Ne(()=>{u(m)},[u,m]),d.jsx(ee.span,{...i,ref:c,style:{pointerEvents:"none"},children:Sl(l.value)?d.jsx(d.Fragment,{children:s}):a})});tl.displayName=el;var my="SelectIcon",nl=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return d.jsx(ee.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});nl.displayName=my;var py="SelectPortal",rl=e=>d.jsx(sr,{asChild:!0,...e});rl.displayName=py;var Jt="SelectContent",ol=f.forwardRef((e,t)=>{const n=Bt(Jt,e.__scopeSelect),[r,o]=f.useState();if(Ne(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Zr.createPortal(d.jsx(al,{scope:e.__scopeSelect,children:d.jsx(lo.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(sl,{...e,ref:t})});ol.displayName=Jt;var ot=10,[al,Yt]=Tn(Jt),hy="SelectContentImpl",gy=It("SelectContent.RemoveScroll"),sl=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:m,arrowPadding:c,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:v,avoidCollisions:g,...b}=e,w=Bt(Jt,n),[S,D]=f.useState(null),[C,N]=f.useState(null),M=he(t,F=>D(F)),[E,$]=f.useState(null),[B,L]=f.useState(null),q=uo(n),[A,T]=f.useState(!1),_=f.useRef(!1);f.useEffect(()=>{if(S)return ao(S)},[S]),Jr();const R=f.useCallback(F=>{const[Z,...X]=q().map(ue=>ue.ref.current),[Q]=X.slice(-1),se=document.activeElement;for(const ue of F)if(ue===se||(ue==null||ue.scrollIntoView({block:"nearest"}),ue===Z&&C&&(C.scrollTop=0),ue===Q&&C&&(C.scrollTop=C.scrollHeight),ue==null||ue.focus(),document.activeElement!==se))return},[q,C]),I=f.useCallback(()=>R([E,S]),[R,E,S]);f.useEffect(()=>{A&&I()},[A,I]);const{onOpenChange:k,triggerPointerDownPosRef:P}=w;f.useEffect(()=>{if(S){let F={x:0,y:0};const Z=Q=>{var se,ue;F={x:Math.abs(Math.round(Q.pageX)-(((se=P.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((ue=P.current)==null?void 0:ue.y)??0))}},X=Q=>{F.x<=10&&F.y<=10?Q.preventDefault():S.contains(Q.target)||k(!1),document.removeEventListener("pointermove",Z),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",X,{capture:!0})}}},[S,k,P]),f.useEffect(()=>{const F=()=>k(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[k]);const[H,z]=Cl(F=>{const Z=q().filter(se=>!se.disabled),X=Z.find(se=>se.ref.current===document.activeElement),Q=Ml(Z,F,X);Q&&setTimeout(()=>Q.ref.current.focus())}),O=f.useCallback((F,Z,X)=>{const Q=!_.current&&!X;(w.value!==void 0&&w.value===Z||Q)&&($(F),Q&&(_.current=!0))},[w.value]),j=f.useCallback(()=>S==null?void 0:S.focus(),[S]),Y=f.useCallback((F,Z,X)=>{const Q=!_.current&&!X;(w.value!==void 0&&w.value===Z||Q)&&L(F)},[w.value]),G=r==="popper"?la:il,V=G===la?{side:i,sideOffset:l,align:u,alignOffset:m,arrowPadding:c,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:v,avoidCollisions:g}:{};return d.jsx(al,{scope:n,content:S,viewport:C,onViewportChange:N,itemRefCallback:O,selectedItem:E,onItemLeave:j,itemTextRefCallback:Y,focusSelectedItem:I,selectedItemText:B,position:r,isPositioned:A,searchRef:H,children:d.jsx(ir,{as:gy,allowPinchZoom:!0,children:d.jsx(nr,{asChild:!0,trapped:w.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:K(o,F=>{var Z;(Z=w.trigger)==null||Z.focus({preventScroll:!0}),F.preventDefault()}),children:d.jsx(En,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:d.jsx(G,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:F=>F.preventDefault(),...b,...V,onPlaced:()=>T(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:K(b.onKeyDown,F=>{const Z=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!Z&&F.key.length===1&&z(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let Q=q().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(F.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const se=F.target,ue=Q.indexOf(se);Q=Q.slice(ue+1)}setTimeout(()=>R(Q)),F.preventDefault()}})})})})})})});sl.displayName=hy;var vy="SelectItemAlignedPosition",il=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Bt(Jt,n),s=Yt(Jt,n),[i,l]=f.useState(null),[u,m]=f.useState(null),c=he(t,M=>m(M)),p=uo(n),h=f.useRef(!1),y=f.useRef(!0),{viewport:v,selectedItem:g,selectedItemText:b,focusSelectedItem:w}=s,S=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&v&&g&&b){const M=a.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),$=a.valueNode.getBoundingClientRect(),B=b.getBoundingClientRect();if(a.dir!=="rtl"){const se=B.left-E.left,ue=$.left-se,ye=M.left-ue,J=M.width+ye,Re=Math.max(J,E.width),Te=window.innerWidth-ot,oe=ri(ue,[ot,Math.max(ot,Te-Re)]);i.style.minWidth=J+"px",i.style.left=oe+"px"}else{const se=E.right-B.right,ue=window.innerWidth-$.right-se,ye=window.innerWidth-M.right-ue,J=M.width+ye,Re=Math.max(J,E.width),Te=window.innerWidth-ot,oe=ri(ue,[ot,Math.max(ot,Te-Re)]);i.style.minWidth=J+"px",i.style.right=oe+"px"}const L=p(),q=window.innerHeight-ot*2,A=v.scrollHeight,T=window.getComputedStyle(u),_=parseInt(T.borderTopWidth,10),R=parseInt(T.paddingTop,10),I=parseInt(T.borderBottomWidth,10),k=parseInt(T.paddingBottom,10),P=_+R+A+k+I,H=Math.min(g.offsetHeight*5,P),z=window.getComputedStyle(v),O=parseInt(z.paddingTop,10),j=parseInt(z.paddingBottom,10),Y=M.top+M.height/2-ot,G=q-Y,V=g.offsetHeight/2,F=g.offsetTop+V,Z=_+R+F,X=P-Z;if(Z<=Y){const se=L.length>0&&g===L[L.length-1].ref.current;i.style.bottom="0px";const ue=u.clientHeight-v.offsetTop-v.offsetHeight,ye=Math.max(G,V+(se?j:0)+ue+I),J=Z+ye;i.style.height=J+"px"}else{const se=L.length>0&&g===L[0].ref.current;i.style.top="0px";const ye=Math.max(Y,_+v.offsetTop+(se?O:0)+V)+X;i.style.height=ye+"px",v.scrollTop=Z-Y+v.offsetTop}i.style.margin=`${ot}px 0`,i.style.minHeight=H+"px",i.style.maxHeight=q+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,i,u,v,g,b,a.dir,r]);Ne(()=>S(),[S]);const[D,C]=f.useState();Ne(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const N=f.useCallback(M=>{M&&y.current===!0&&(S(),w==null||w(),y.current=!1)},[S,w]);return d.jsx(by,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:h,onScrollButtonChange:N,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:d.jsx(ee.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});il.displayName=vy;var yy="SelectPopperPosition",la=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ot,...a}=e,s=fo(n);return d.jsx(ro,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.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)"}})});la.displayName=yy;var[by,Ga]=Tn(Jt,{}),ua="SelectViewport",cl=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Yt(ua,n),s=Ga(ua,n),i=he(t,a.onViewportChange),l=f.useRef(0);return d.jsxs(d.Fragment,{children:[d.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}),d.jsx(lo.Slot,{scope:n,children:d.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:K(o.onScroll,u=>{const m=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&c){const h=Math.abs(l.current-m.scrollTop);if(h>0){const y=window.innerHeight-ot*2,v=parseFloat(c.style.minHeight),g=parseFloat(c.style.height),b=Math.max(v,g);if(b<y){const w=b+h,S=Math.min(y,w),D=w-S;c.style.height=S+"px",c.style.bottom==="0px"&&(m.scrollTop=D>0?D:0,c.style.justifyContent="flex-end")}}}l.current=m.scrollTop})})})]})});cl.displayName=ua;var ll="SelectGroup",[wy,xy]=Tn(ll),Sy=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ke();return d.jsx(wy,{scope:n,id:o,children:d.jsx(ee.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Sy.displayName=ll;var ul="SelectLabel",dl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=xy(ul,n);return d.jsx(ee.div,{id:o.id,...r,ref:t})});dl.displayName=ul;var Yr="SelectItem",[Cy,fl]=Tn(Yr),ml=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Bt(Yr,n),l=Yt(Yr,n),u=i.value===r,[m,c]=f.useState(a??""),[p,h]=f.useState(!1),y=he(t,w=>{var S;return(S=l.itemRefCallback)==null?void 0:S.call(l,w,r,o)}),v=ke(),g=f.useRef("touch"),b=()=>{o||(i.onValueChange(r),i.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 d.jsx(Cy,{scope:n,value:r,disabled:o,textId:v,isSelected:u,onItemTextChange:f.useCallback(w=>{c(S=>S||((w==null?void 0:w.textContent)??"").trim())},[]),children:d.jsx(lo.ItemSlot,{scope:n,value:r,disabled:o,textValue:m,children:d.jsx(ee.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:y,onFocus:K(s.onFocus,()=>h(!0)),onBlur:K(s.onBlur,()=>h(!1)),onClick:K(s.onClick,()=>{g.current!=="mouse"&&b()}),onPointerUp:K(s.onPointerUp,()=>{g.current==="mouse"&&b()}),onPointerDown:K(s.onPointerDown,w=>{g.current=w.pointerType}),onPointerMove:K(s.onPointerMove,w=>{var S;g.current=w.pointerType,o?(S=l.onItemLeave)==null||S.call(l):g.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(s.onPointerLeave,w=>{var S;w.currentTarget===document.activeElement&&((S=l.onItemLeave)==null||S.call(l))}),onKeyDown:K(s.onKeyDown,w=>{var D;((D=l.searchRef)==null?void 0:D.current)!==""&&w.key===" "||(cy.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});ml.displayName=Yr;var Hn="SelectItemText",pl=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Bt(Hn,n),i=Yt(Hn,n),l=fl(Hn,n),u=fy(Hn,n),[m,c]=f.useState(null),p=he(t,b=>c(b),l.onItemTextChange,b=>{var w;return(w=i.itemTextRefCallback)==null?void 0:w.call(i,b,l.value,l.disabled)}),h=m==null?void 0:m.textContent,y=f.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:g}=u;return Ne(()=>(v(y),()=>g(y)),[v,g,y]),d.jsxs(d.Fragment,{children:[d.jsx(ee.span,{id:l.textId,...a,ref:p}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Zr.createPortal(a.children,s.valueNode):null]})});pl.displayName=Hn;var hl="SelectItemIndicator",gl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return fl(hl,n).isSelected?d.jsx(ee.span,{"aria-hidden":!0,...r,ref:t}):null});gl.displayName=hl;var da="SelectScrollUpButton",vl=f.forwardRef((e,t)=>{const n=Yt(da,e.__scopeSelect),r=Ga(da,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Ne(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?d.jsx(bl,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});vl.displayName=da;var fa="SelectScrollDownButton",yl=f.forwardRef((e,t)=>{const n=Yt(fa,e.__scopeSelect),r=Ga(fa,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Ne(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,m=Math.ceil(l.scrollTop)<u;a(m)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?d.jsx(bl,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});yl.displayName=fa;var bl=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Yt("SelectScrollButton",n),s=f.useRef(null),i=uo(n),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),Ne(()=>{var m;const u=i().find(c=>c.ref.current===document.activeElement);(m=u==null?void 0:u.ref.current)==null||m.scrollIntoView({block:"nearest"})},[i]),d.jsx(ee.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:K(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:K(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:K(o.onPointerLeave,()=>{l()})})}),My="SelectSeparator",wl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(ee.div,{"aria-hidden":!0,...r,ref:t})});wl.displayName=My;var ma="SelectArrow",Dy=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=fo(n),a=Bt(ma,n),s=Yt(ma,n);return a.open&&s.position==="popper"?d.jsx(oo,{...o,...r,ref:t}):null});Dy.displayName=ma;var ky="SelectBubbleInput",xl=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),s=za(t);return f.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&m){const c=new Event("change",{bubbles:!0});m.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(ee.select,{...n,style:{...Kc,...n.style},ref:a,defaultValue:t})});xl.displayName=ky;function Sl(e){return e===""||e===void 0}function Cl(e){const t=et(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(s=>{const i=n.current+s;t(i),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(i)},[t]),a=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Ml(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Ey(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Ey(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ny=Zc,Dl=Jc,Ry=tl,Ty=nl,_y=rl,kl=ol,Oy=cl,El=dl,Nl=ml,Py=pl,Ay=gl,Rl=vl,Tl=yl,_l=wl;const pa=Ny,ha=Ry,Hr=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Dl,{ref:r,className:W("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,d.jsx(Ty,{asChild:!0,children:d.jsx(tr,{strokeWidth:1.5,className:"h-4 w-4 text-foreground"})})]}));Hr.displayName=Dl.displayName;const Ol=f.forwardRef(({className:e,...t},n)=>d.jsx(Rl,{ref:n,className:W("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Zp,{className:"h-4 w-4"})}));Ol.displayName=Rl.displayName;const Pl=f.forwardRef(({className:e,...t},n)=>d.jsx(Tl,{ref:n,className:W("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(tr,{className:"h-4 w-4"})}));Pl.displayName=Tl.displayName;const zr=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>d.jsx(_y,{children:d.jsxs(kl,{ref:o,className:W("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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 origin-[--radix-select-content-transform-origin]",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:[d.jsx(Ol,{}),d.jsx(Oy,{className:W("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d.jsx(Pl,{})]})}));zr.displayName=kl.displayName;const Iy=f.forwardRef(({className:e,...t},n)=>d.jsx(El,{ref:n,className:W("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Iy.displayName=El.displayName;const Gr=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Nl,{ref:r,className:W("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Ay,{children:d.jsx(er,{className:"h-4 w-4"})})}),d.jsx(Py,{children:t})]}));Gr.displayName=Nl.displayName;const jy=f.forwardRef(({className:e,...t},n)=>d.jsx(_l,{ref:n,className:W("-mx-1 my-1 h-px bg-muted",e),...t}));jy.displayName=_l.displayName;const Lo={},zn={};function Un(e,t){try{const r=(Lo[e]||(Lo[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in zn?zn[r]:oi(r,r.split(":"))}catch{if(e in zn)return zn[e];const n=e==null?void 0:e.match($y);return n?oi(e,n.slice(1)):NaN}}const $y=/([+-]\d\d):?(\d\d)?/;function oi(e,t){const n=+t[0],r=+(t[1]||0);return zn[e]=n>0?n*60+r:n*60-r}class pt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Un(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),Al(this),ga(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new pt(...n,t):new pt(Date.now(),t)}withTimeZone(t){return new pt(+this,t)}getTimezoneOffset(){return-Un(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ga(this),+this}[Symbol.for("constructDateFrom")](t){return new pt(+new Date(t),this.timeZone)}}const ai=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ai.test(e))return;const t=e.replace(ai,"$1UTC");pt.prototype[t]&&(e.startsWith("get")?pt.prototype[e]=function(){return this.internal[t]()}:(pt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Ly(this),+this},pt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ga(this),+this}))});function ga(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Ly(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),Al(e)}function Al(e){const t=Un(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),a=r-o,s=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&s&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const i=r-t;i&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+i);const l=Un(e.timeZone,e),m=-new Date(+e).getTimezoneOffset()-l,c=l!==t,p=m-i;if(c&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=Un(e.timeZone,e),y=l-h;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class We extends pt{static tz(t,...n){return n.length?new We(...n,t):new We(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${Fy(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new We(+this,t)}[Symbol.for("constructDateFrom")](t){return new We(+new Date(t),this.timeZone)}}function Fy(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var ce;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(ce||(ce={}));var De;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(De||(De={}));var at;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(at||(at={}));var Ke;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Ke||(Ke={}));const Il=6048e5,Wy=864e5,si=Symbol.for("constructDateFrom");function Pe(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&si in e?e[si](t):e instanceof Date?new e.constructor(t):new Date(t)}function Se(e,t){return Pe(t||e,e)}function jl(e,t,n){const r=Se(e,n==null?void 0:n.in);return isNaN(t)?Pe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function $l(e,t,n){const r=Se(e,n==null?void 0:n.in);if(isNaN(t))return Pe(e,NaN);if(!t)return r;const o=r.getDate(),a=Pe(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let By={};function ur(){return By}function xn(e,t){var i,l,u,m;const n=ur(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.weekStartsOn)??0,o=Se(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Kn(e,t){return xn(e,{...t,weekStartsOn:1})}function Ll(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=Pe(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Kn(o),s=Pe(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Kn(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function ii(e){const t=Se(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function _n(e,...t){const n=Pe.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Xn(e,t){const n=Se(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Fl(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t),a=Xn(r),s=Xn(o),i=+a-ii(a),l=+s-ii(s);return Math.round((i-l)/Wy)}function Yy(e,t){const n=Ll(e,t),r=Pe(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Kn(r)}function Hy(e,t,n){return jl(e,t*7,n)}function zy(e,t,n){return $l(e,t*12,n)}function Gy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Pe.bind(null,o));const a=Se(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Pe(r,n||NaN)}function Uy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Pe.bind(null,o));const a=Se(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Pe(r,n||NaN)}function qy(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return+Xn(r)==+Xn(o)}function Wl(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Vy(e){return!(!Wl(e)&&typeof e!="number"||isNaN(+Se(e)))}function Ky(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function Xy(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Zy(e,t){const[n,r]=_n(e,t.start,t.end);return{start:n,end:r}}function Qy(e,t){const{start:n,end:r}=Zy(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const l=[];for(;+s<=a;)l.push(Pe(n,s)),s.setMonth(s.getMonth()+i);return o?l.reverse():l}function Jy(e,t){const n=Se(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function eb(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Bl(e,t){const n=Se(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Yl(e,t){var i,l,u,m;const n=ur(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.weekStartsOn)??0,o=Se(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function tb(e,t){return Yl(e,{...t,weekStartsOn:1})}const nb={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rb=(e,t,n)=>{let r;const o=nb[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Fo(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const ob={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ab={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},sb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ib={date:Fo({formats:ob,defaultWidth:"full"}),time:Fo({formats:ab,defaultWidth:"full"}),dateTime:Fo({formats:sb,defaultWidth:"full"})},cb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},lb=(e,t,n,r)=>cb[e];function $n(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const ub={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},db={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},fb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},mb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},pb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},hb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},gb=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},vb={ordinalNumber:gb,era:$n({values:ub,defaultWidth:"wide"}),quarter:$n({values:db,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$n({values:fb,defaultWidth:"wide"}),day:$n({values:mb,defaultWidth:"wide"}),dayPeriod:$n({values:pb,defaultWidth:"wide",formattingValues:hb,defaultFormattingWidth:"wide"})};function Ln(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?bb(i,c=>c.test(s)):yb(i,c=>c.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const m=t.slice(s.length);return{value:u,rest:m}}}function yb(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function bb(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function wb(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const xb=/^(\d+)(th|st|nd|rd)?/i,Sb=/\d+/i,Cb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Mb={any:[/^b/i,/^(a|c)/i]},Db={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kb={any:[/1/i,/2/i,/3/i,/4/i]},Eb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Nb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Rb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Tb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_b={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ob={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Pb={ordinalNumber:wb({matchPattern:xb,parsePattern:Sb,valueCallback:e=>parseInt(e,10)}),era:Ln({matchPatterns:Cb,defaultMatchWidth:"wide",parsePatterns:Mb,defaultParseWidth:"any"}),quarter:Ln({matchPatterns:Db,defaultMatchWidth:"wide",parsePatterns:kb,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ln({matchPatterns:Eb,defaultMatchWidth:"wide",parsePatterns:Nb,defaultParseWidth:"any"}),day:Ln({matchPatterns:Rb,defaultMatchWidth:"wide",parsePatterns:Tb,defaultParseWidth:"any"}),dayPeriod:Ln({matchPatterns:_b,defaultMatchWidth:"any",parsePatterns:Ob,defaultParseWidth:"any"})},Ua={code:"en-US",formatDistance:rb,formatLong:ib,formatRelative:lb,localize:vb,match:Pb,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ab(e,t){const n=Se(e,t==null?void 0:t.in);return Fl(n,Bl(n))+1}function Hl(e,t){const n=Se(e,t==null?void 0:t.in),r=+Kn(n)-+Yy(n);return Math.round(r/Il)+1}function zl(e,t){var m,c,p,h;const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=ur(),a=(t==null?void 0:t.firstWeekContainsDate)??((c=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:c.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,s=Pe((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=xn(s,t),l=Pe((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=xn(l,t);return+n>=+i?r+1:+n>=+u?r:r-1}function Ib(e,t){var i,l,u,m;const n=ur(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??1,o=zl(e,t),a=Pe((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),xn(a,t)}function Gl(e,t){const n=Se(e,t==null?void 0:t.in),r=+xn(n,t)-+Ib(n,t);return Math.round(r/Il)+1}function we(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ot={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return we(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):we(n+1,2)},d(e,t){return we(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return we(e.getHours()%12||12,t.length)},H(e,t){return we(e.getHours(),t.length)},m(e,t){return we(e.getMinutes(),t.length)},s(e,t){return we(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return we(o,t.length)}},pn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ci={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Ot.y(e,t)},Y:function(e,t,n,r){const o=zl(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return we(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):we(a,t.length)},R:function(e,t){const n=Ll(e);return we(n,t.length)},u:function(e,t){const n=e.getFullYear();return we(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return we(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return we(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ot.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return we(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Gl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):we(o,t.length)},I:function(e,t,n){const r=Hl(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):we(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ot.d(e,t)},D:function(e,t,n){const r=Ab(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):we(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return we(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return we(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return we(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=pn.noon:r===0?o=pn.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=pn.evening:r>=12?o=pn.afternoon:r>=4?o=pn.morning:o=pn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ot.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ot.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):we(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):we(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ot.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ot.s(e,t)},S:function(e,t){return Ot.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ui(r);case"XXXX":case"XX":return Xt(r);case"XXXXX":case"XXX":default:return Xt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ui(r);case"xxxx":case"xx":return Xt(r);case"xxxxx":case"xxx":default:return Xt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+li(r,":");case"OOOO":default:return"GMT"+Xt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+li(r,":");case"zzzz":default:return"GMT"+Xt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return we(r,t.length)},T:function(e,t,n){return we(+e,t.length)}};function li(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+we(a,2)}function ui(e,t){return e%60===0?(e>0?"-":"+")+we(Math.abs(e)/60,2):Xt(e,t)}function Xt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=we(Math.trunc(r/60),2),a=we(r%60,2);return n+o+t+a}const di=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Ul=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},jb=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return di(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",di(r,t)).replace("{{time}}",Ul(o,t))},$b={p:Ul,P:jb},Lb=/^D+$/,Fb=/^Y+$/,Wb=["D","DD","YY","YYYY"];function Bb(e){return Lb.test(e)}function Yb(e){return Fb.test(e)}function Hb(e,t,n){const r=zb(e,t,n);if(console.warn(r),Wb.includes(e))throw new RangeError(r)}function zb(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Gb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ub=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qb=/^'([^]*?)'?$/,Vb=/''/g,Kb=/[a-zA-Z]/;function Xb(e,t,n){var m,c,p,h,y,v,g,b;const r=ur(),o=(n==null?void 0:n.locale)??r.locale??Ua,a=(n==null?void 0:n.firstWeekContainsDate)??((c=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((v=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:v.weekStartsOn)??r.weekStartsOn??((b=(g=r.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0,i=Se(e,n==null?void 0:n.in);if(!Vy(i))throw new RangeError("Invalid time value");let l=t.match(Ub).map(w=>{const S=w[0];if(S==="p"||S==="P"){const D=$b[S];return D(w,o.formatLong)}return w}).join("").match(Gb).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const S=w[0];if(S==="'")return{isToken:!1,value:Zb(w)};if(ci[S])return{isToken:!0,value:w};if(S.match(Kb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(w=>{if(!w.isToken)return w.value;const S=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Yb(S)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Bb(S))&&Hb(S,t,String(e));const D=ci[S[0]];return D(i,S,o.localize,u)}).join("")}function Zb(e){const t=e.match(qb);return t?t[1].replace(Vb,"'"):e}function Qb(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Pe(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Jb(e,t){return Se(e,t==null?void 0:t.in).getMonth()}function ew(e,t){return Se(e,t==null?void 0:t.in).getFullYear()}function tw(e,t){return+Se(e)>+Se(t)}function nw(e,t){return+Se(e)<+Se(t)}function rw(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function ow(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function aw(e,t,n){const r=Se(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=Pe(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=Qb(s);return r.setMonth(t,Math.min(a,i)),r}function sw(e,t,n){const r=Se(e,n==null?void 0:n.in);return isNaN(+r)?Pe(e,NaN):(r.setFullYear(t),r)}const fi=5,iw=4;function cw(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,fi*7-1);return t.getMonth(e)===t.getMonth(a)?fi:iw}function ql(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function lw(e,t){const n=ql(e,t),r=cw(e,t);return t.addDays(n,r*7-1)}class Nt{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?We.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new We(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):jl(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):$l(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):Hy(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):zy(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Fl(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Ky(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Qy(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):lw(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):tb(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Xy(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):Yl(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):eb(r)},this.format=(r,o,a)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):Xb(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Hl(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):Jb(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):ew(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):Gl(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):tw(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):nw(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Wl(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):qy(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):rw(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):ow(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Gy(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Uy(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):aw(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):sw(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):ql(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Xn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Kn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):Jy(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):xn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Bl(r)},this.options={locale:Ua,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const yt=new Nt;class Vl{constructor(t,n,r=yt){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class uw{constructor(t,n){this.date=t,this.weeks=n}}class dw{constructor(t,n){this.days=n,this.weekNumber=t}}function xt(e,t,n=!1,r=yt){let{from:o,to:a}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return o&&a?(s(a,o)<0&&([o,a]=[a,o]),s(t,o)>=(n?1:0)&&s(a,t)>=(n?1:0)):!n&&a?i(a,t):!n&&o?i(o,t):!1}function Kl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function qa(e){return!!(e&&typeof e=="object"&&"from"in e)}function Xl(e){return!!(e&&typeof e=="object"&&"after"in e)}function Zl(e){return!!(e&&typeof e=="object"&&"before"in e)}function Ql(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Jl(e,t){return Array.isArray(e)&&e.every(t.isDate)}function St(e,t,n=yt){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(Jl(i,n))return i.includes(e);if(qa(i))return xt(i,e,!1,n);if(Ql(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Kl(i)){const l=a(i.before,e),u=a(i.after,e),m=l>0,c=u<0;return s(i.before,i.after)?c&&m:m||c}return Xl(i)?a(e,i.after)>0:Zl(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function fw(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:i,showOutsideDays:l,broadcastCalendar:u,today:m}=t,{isSameDay:c,isSameMonth:p,startOfMonth:h,isBefore:y,endOfMonth:v,isAfter:g}=o,b=n&&h(n),w=r&&v(r),S={[De.focused]:[],[De.outside]:[],[De.disabled]:[],[De.hidden]:[],[De.today]:[]},D={};for(const C of e){const{date:N,displayMonth:M}=C,E=!!(M&&!p(N,M)),$=!!(b&&y(N,b)),B=!!(w&&g(N,w)),L=!!(a&&St(N,a,o)),q=!!(s&&St(N,s,o))||$||B||!u&&!l&&E||u&&l===!1&&E,A=c(N,m??o.today());E&&S.outside.push(C),L&&S.disabled.push(C),q&&S.hidden.push(C),A&&S.today.push(C),i&&Object.keys(i).forEach(T=>{const _=i==null?void 0:i[T];_&&St(N,_,o)&&(D[T]?D[T].push(C):D[T]=[C])})}return C=>{const N={[De.focused]:!1,[De.disabled]:!1,[De.hidden]:!1,[De.outside]:!1,[De.today]:!1},M={};for(const E in S){const $=S[E];N[E]=$.some(B=>B===C)}for(const E in D)M[E]=D[E].some($=>$===C);return{...N,...M}}}function mw(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[De[a]]?o.push(t[De[a]]):t[at[a]]&&o.push(t[at[a]]),o),[t[ce.Day]])}function pw(e){return x.createElement("button",{...e})}function hw(e){return x.createElement("span",{...e})}function gw(e){const{size:t=24,orientation:n="left",className:r}=e;return x.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&x.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&x.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&x.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&x.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function vw(e){const{day:t,modifiers:n,...r}=e;return x.createElement("td",{...r})}function yw(e){const{day:t,modifiers:n,...r}=e,o=x.useRef(null);return x.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),x.createElement("button",{ref:o,...r})}function bw(e){const{options:t,className:n,components:r,classNames:o,...a}=e,s=[o[ce.Dropdown],n].join(" "),i=t==null?void 0:t.find(({value:l})=>l===a.value);return x.createElement("span",{"data-disabled":a.disabled,className:o[ce.DropdownRoot]},x.createElement(r.Select,{className:s,...a},t==null?void 0:t.map(({value:l,label:u,disabled:m})=>x.createElement(r.Option,{key:l,value:l,disabled:m},u))),x.createElement("span",{className:o[ce.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,x.createElement(r.Chevron,{orientation:"down",size:18,className:o[ce.Chevron]})))}function ww(e){return x.createElement("div",{...e})}function xw(e){return x.createElement("div",{...e})}function Sw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r},e.children)}function Cw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r})}function Mw(e){return x.createElement("table",{...e})}function Dw(e){return x.createElement("div",{...e})}const eu=x.createContext(void 0);function dr(){const e=x.useContext(eu);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function kw(e){const{components:t}=dr();return x.createElement(t.Dropdown,{...e})}function Ew(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:l,labelNext:u}}=dr(),m=x.useCallback(p=>{o&&(n==null||n(p))},[o,n]),c=x.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return x.createElement("nav",{...a},x.createElement(s.PreviousMonthButton,{type:"button",className:i[ce.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:c},x.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[ce.Chevron],orientation:"left"})),x.createElement(s.NextMonthButton,{type:"button",className:i[ce.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:m},x.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[ce.Chevron]})))}function Nw(e){const{components:t}=dr();return x.createElement(t.Button,{...e})}function Rw(e){return x.createElement("option",{...e})}function Tw(e){const{components:t}=dr();return x.createElement(t.Button,{...e})}function _w(e){const{rootRef:t,...n}=e;return x.createElement("div",{...n,ref:t})}function Ow(e){return x.createElement("select",{...e})}function Pw(e){const{week:t,...n}=e;return x.createElement("tr",{...n})}function Aw(e){return x.createElement("th",{...e})}function Iw(e){return x.createElement("thead",{"aria-hidden":!0},x.createElement("tr",{...e}))}function jw(e){const{week:t,...n}=e;return x.createElement("th",{...n})}function $w(e){return x.createElement("th",{...e})}function Lw(e){return x.createElement("tbody",{...e})}function Fw(e){const{components:t}=dr();return x.createElement(t.Dropdown,{...e})}const Ww=Object.freeze(Object.defineProperty({__proto__:null,Button:pw,CaptionLabel:hw,Chevron:gw,Day:vw,DayButton:yw,Dropdown:bw,DropdownNav:ww,Footer:xw,Month:Sw,MonthCaption:Cw,MonthGrid:Mw,Months:Dw,MonthsDropdown:kw,Nav:Ew,NextMonthButton:Nw,Option:Rw,PreviousMonthButton:Tw,Root:_w,Select:Ow,Week:Pw,WeekNumber:jw,WeekNumberHeader:$w,Weekday:Aw,Weekdays:Iw,Weeks:Lw,YearsDropdown:Fw},Symbol.toStringTag,{value:"Module"}));function Bw(e){return{...Ww,...e}}function Yw(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Va(){const e={};for(const t in ce)e[ce[t]]=`rdp-${ce[t]}`;for(const t in De)e[De[t]]=`rdp-${De[t]}`;for(const t in at)e[at[t]]=`rdp-${at[t]}`;for(const t in Ke)e[Ke[t]]=`rdp-${Ke[t]}`;return e}function tu(e,t,n){return(n??new Nt(t)).format(e,"LLLL y")}const Hw=tu;function zw(e,t,n){return(n??new Nt(t)).format(e,"d")}function Gw(e,t=yt){return t.format(e,"LLLL")}function Uw(e,t=yt){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function qw(){return""}function Vw(e,t,n){return(n??new Nt(t)).format(e,"cccccc")}function nu(e,t=yt){return t.format(e,"yyyy")}const Kw=nu,Xw=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:tu,formatDay:zw,formatMonthCaption:Hw,formatMonthDropdown:Gw,formatWeekNumber:Uw,formatWeekNumberHeader:qw,formatWeekdayName:Vw,formatYearCaption:Kw,formatYearDropdown:nu},Symbol.toStringTag,{value:"Module"}));function Zw(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Xw,...e}}function Qw(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:l,getMonth:u}=o;return l({start:s(e),end:i(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),y=u(p),v=t&&p<a(t)||n&&p>a(n)||!1;return{value:y,label:h,disabled:v}})}function Jw(e,t={},n={}){let r={...t==null?void 0:t[ce.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function ex(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let s=0;s<7;s++){const i=e.addDays(o,s);a.push(i)}return a}function tx(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:s,getYear:i,isBefore:l,isSameYear:u}=r,m=o(e),c=a(t),p=[];let h=m;for(;l(h,c)||u(h,c);)p.push(h),h=s(h,1);return p.map(y=>{const v=n.formatYearDropdown(y,r);return{value:i(y),label:v,disabled:!1}})}function ru(e,t,n){return(n??new Nt(t)).format(e,"LLLL y")}const nx=ru;function rx(e,t,n,r){let o=(r??new Nt(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function ou(e,t,n,r){let o=(r??new Nt(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const ox=ou;function ax(){return""}function sx(e){return"Choose the Month"}function ix(e){return"Go to the Next Month"}function cx(e){return"Go to the Previous Month"}function lx(e,t,n){return(n??new Nt(t)).format(e,"cccc")}function ux(e,t){return`Week ${e}`}function dx(e){return"Week Number"}function fx(e){return"Choose the Year"}const mx=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:nx,labelDay:ox,labelDayButton:ou,labelGrid:ru,labelGridcell:rx,labelMonthDropdown:sx,labelNav:ax,labelNext:ix,labelPrevious:cx,labelWeekNumber:ux,labelWeekNumberHeader:dx,labelWeekday:lx,labelYearDropdown:fx},Symbol.toStringTag,{value:"Module"})),fr=e=>e instanceof HTMLElement?e:null,Wo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],px=e=>fr(e.querySelector("[data-animated-month]")),Bo=e=>fr(e.querySelector("[data-animated-caption]")),Yo=e=>fr(e.querySelector("[data-animated-weeks]")),hx=e=>fr(e.querySelector("[data-animated-nav]")),gx=e=>fr(e.querySelector("[data-animated-weekdays]"));function vx(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const s=x.useRef(null),i=x.useRef(r),l=x.useRef(!1);x.useLayoutEffect(()=>{const u=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const m=a.isSameMonth(r[0].date,u[0].date),c=a.isAfter(r[0].date,u[0].date),p=c?n[Ke.caption_after_enter]:n[Ke.caption_before_enter],h=c?n[Ke.weeks_after_enter]:n[Ke.weeks_before_enter],y=s.current,v=e.current.cloneNode(!0);if(v instanceof HTMLElement?(Wo(v).forEach(S=>{if(!(S instanceof HTMLElement))return;const D=px(S);D&&S.contains(D)&&S.removeChild(D);const C=Bo(S);C&&C.classList.remove(p);const N=Yo(S);N&&N.classList.remove(h)}),s.current=v):s.current=null,l.current||m||o)return;const g=y instanceof HTMLElement?Wo(y):[],b=Wo(e.current);if(b&&b.every(w=>w instanceof HTMLElement)&&g&&g.every(w=>w instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const w=hx(e.current);w&&(w.style.zIndex="1"),b.forEach((S,D)=>{const C=g[D];if(!C)return;S.style.position="relative",S.style.overflow="hidden";const N=Bo(S);N&&N.classList.add(p);const M=Yo(S);M&&M.classList.add(h);const E=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),w&&(w.style.zIndex=""),N&&N.classList.remove(p),M&&M.classList.remove(h),S.style.position="",S.style.overflow="",S.contains(C)&&S.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const $=gx(C);$&&($.style.opacity="0");const B=Bo(C);B&&(B.classList.add(c?n[Ke.caption_before_exit]:n[Ke.caption_after_exit]),B.addEventListener("animationend",E));const L=Yo(C);L&&L.classList.add(c?n[Ke.weeks_before_exit]:n[Ke.weeks_after_exit]),S.insertBefore(C,S.firstChild)})}})}function yx(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:l}=n??{},{addDays:u,differenceInCalendarDays:m,differenceInCalendarMonths:c,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:v,isAfter:g,startOfBroadcastWeek:b,startOfISOWeek:w,startOfWeek:S}=r,D=l?b(o,r):s?w(o):S(o),C=l?p(a):s?h(y(a)):v(y(a)),N=m(C,D),M=c(a,o)+1,E=[];for(let L=0;L<=N;L++){const q=u(D,L);if(t&&g(q,t))break;E.push(q)}const B=(l?35:42)*M;if(i&&E.length<B){const L=B-E.length;for(let q=0;q<L;q++){const A=u(E[E.length-1],1);E.push(A)}}return E}function bx(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,s)=>[...a,...s.days],t);return[...n,...o]},t)}function wx(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let s=0;s<o;s++){const i=r.addMonths(e,s);if(t&&i>t)break;a.push(i)}return a}function mi(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:i=1}=e;let l=o||a||s;const{differenceInCalendarMonths:u,addMonths:m,startOfMonth:c}=r;if(n&&u(n,l)<i-1){const p=-1*(i-1);l=m(n,p)}return t&&u(l,t)<0&&(l=t),c(l)}function xx(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:l,getISOWeek:u,getWeek:m,startOfBroadcastWeek:c,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((v,g)=>{const b=n.broadcastCalendar?c(g,r):n.ISOWeek?p(g):h(g),w=n.broadcastCalendar?a(g):n.ISOWeek?s(i(g)):l(i(g)),S=t.filter(M=>M>=b&&M<=w),D=n.broadcastCalendar?35:42;if(n.fixedWeeks&&S.length<D){const M=t.filter(E=>{const $=D-S.length;return E>w&&E<=o(w,$)});S.push(...M)}const C=S.reduce((M,E)=>{const $=n.ISOWeek?u(E):m(E),B=M.find(q=>q.weekNumber===$),L=new Vl(E,g,r);return B?B.days.push(L):M.push(new dw($,[L])),M},[]),N=new uw(g,C);return v.push(N),v},[]);return n.reverseMonths?y.reverse():y}function Sx(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:l,endOfYear:u,newDate:m,today:c}=t,{fromYear:p,toYear:h,fromMonth:y,toMonth:v}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&v&&(r=v),!r&&h&&(r=m(h,11,31));const g=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):p?n=m(p,0,1):!n&&g&&(n=o(l(e.today??c(),-100))),r?r=i(r):h?r=m(h,11,31):!r&&g&&(r=u(e.today??c())),[n&&a(n),r&&a(r)]}function Cx(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a:1,m=s(e);if(!t)return i(m,u);if(!(l(t,e)<a))return i(m,u)}function Mx(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a??1:1,m=s(e);if(!t)return i(m,-u);if(!(l(m,t)<=0))return i(m,-u)}function Dx(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function mo(e,t){const[n,r]=x.useState(e);return[t===void 0?n:t,r]}function kx(e,t){const[n,r]=Sx(e,t),{startOfMonth:o,endOfMonth:a}=t,s=mi(e,n,r,t),[i,l]=mo(s,e.month?s:void 0);x.useEffect(()=>{const N=mi(e,n,r,t);l(N)},[e.timeZone]);const u=wx(i,r,e,t),m=yx(u,e.endMonth?a(e.endMonth):void 0,e,t),c=xx(u,m,e,t),p=Dx(c),h=bx(c),y=Mx(i,n,e,t),v=Cx(i,r,e,t),{disableNavigation:g,onMonthChange:b}=e,w=N=>p.some(M=>M.days.some(E=>E.isEqualTo(N))),S=N=>{if(g)return;let M=o(N);n&&M<o(n)&&(M=o(n)),r&&M>o(r)&&(M=o(r)),l(M),b==null||b(M)};return{months:c,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:v,goToMonth:S,goToDay:N=>{w(N)||S(N.date)}}}var dt;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(dt||(dt={}));function pi(e){return!e[De.disabled]&&!e[De.hidden]&&!e[De.outside]}function Ex(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);pi(i)&&(i[De.focused]&&a<dt.FocusedModifier?(o=s,a=dt.FocusedModifier):r!=null&&r.isEqualTo(s)&&a<dt.LastFocused?(o=s,a=dt.LastFocused):n(s.date)&&a<dt.Selected?(o=s,a=dt.Selected):i[De.today]&&a<dt.Today&&(o=s,a=dt.Today))}return o||(o=e.find(s=>pi(t(s)))),o}function Nx(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:l}=a,{addDays:u,addMonths:m,addWeeks:c,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:v,max:g,min:b,startOfBroadcastWeek:w,startOfISOWeek:S,startOfWeek:D}=s;let N={day:u,week:c,month:m,year:p,startOfWeek:M=>l?w(M,s):i?S(M):D(M),endOfWeek:M=>l?h(M):i?y(M):v(M)}[e](n,t==="after"?1:-1);return t==="before"&&r?N=g([r,N]):t==="after"&&o&&(N=b([o,N])),N}function au(e,t,n,r,o,a,s,i=0){if(i>365)return;const l=Nx(e,t,n.date,r,o,a,s),u=!!(a.disabled&&St(l,a.disabled,s)),m=!!(a.hidden&&St(l,a.hidden,s)),c=l,p=new Vl(l,c,s);return!u&&!m?p:au(e,t,p,r,o,a,s,i+1)}function Rx(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=x.useState(),l=Ex(t.days,n,r||(()=>!1),s),[u,m]=x.useState(a?l:void 0);return{isFocusTarget:v=>!!(l!=null&&l.isEqualTo(v)),setFocused:m,focused:u,blur:()=>{i(u),m(void 0)},moveFocus:(v,g)=>{if(!u)return;const b=au(v,g,u,t.navStart,t.navEnd,e,o);b&&(t.goToDay(b),m(b))}}}function Tx(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=mo(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t,u=h=>(i==null?void 0:i.some(y=>l(y,h)))??!1,{min:m,max:c}=e;return{selected:i,select:(h,y,v)=>{let g=[...i??[]];if(u(h)){if((i==null?void 0:i.length)===m||r&&(i==null?void 0:i.length)===1)return;g=i==null?void 0:i.filter(b=>!l(b,h))}else(i==null?void 0:i.length)===c?g=[h]:g=[...g,h];return o||s(g),o==null||o(g,h,y,v),g},isSelected:u}}function _x(e,t,n=0,r=0,o=!1,a=yt){const{from:s,to:i}=t||{},{isSameDay:l,isAfter:u,isBefore:m}=a;let c;if(!s&&!i)c={from:e,to:n>0?void 0:e};else if(s&&!i)l(s,e)?o?c={from:s,to:void 0}:c=void 0:m(e,s)?c={from:e,to:s}:c={from:s,to:e};else if(s&&i)if(l(s,e)&&l(i,e))o?c={from:s,to:i}:c=void 0;else if(l(s,e))c={from:s,to:n>0?void 0:e};else if(l(i,e))c={from:e,to:n>0?void 0:e};else if(m(e,s))c={from:e,to:i};else if(u(e,s))c={from:s,to:e};else if(u(e,i))c={from:s,to:e};else throw new Error("Invalid range");if(c!=null&&c.from&&(c!=null&&c.to)){const p=a.differenceInCalendarDays(c.to,c.from);r>0&&p>r?c={from:e,to:void 0}:n>1&&p<n&&(c={from:e,to:void 0})}return c}function Ox(e,t,n=yt){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),s=Math.min(a,6);for(let i=0;i<=s;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function hi(e,t,n=yt){return xt(e,t.from,!1,n)||xt(e,t.to,!1,n)||xt(t,e.from,!1,n)||xt(t,e.to,!1,n)}function Px(e,t,n=yt){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?xt(e,i,!1,n):Jl(i,n)?i.some(l=>xt(e,l,!1,n)):qa(i)?i.from&&i.to?hi(e,{from:i.from,to:i.to},n):!1:Ql(i)?Ox(e,i.dayOfWeek,n):Kl(i)?n.isAfter(i.before,i.after)?hi(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):St(e.from,i,n)||St(e.to,i,n):Xl(i)||Zl(i)?St(e.from,i,n)||St(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=l;u++){if(s.some(m=>m(i)))return!0;i=n.addDays(i,1)}}return!1}function Ax(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:s}=e,[i,l]=mo(o,s?o:void 0),u=s?o:i;return{selected:u,select:(p,h,y)=>{const{min:v,max:g}=e,b=p?_x(p,u,v,g,a,t):void 0;return r&&n&&(b!=null&&b.from)&&b.to&&Px({from:b.from,to:b.to},n,t)&&(b.from=p,b.to=void 0),s||l(b),s==null||s(b,p,h,y),b},isSelected:p=>u&&xt(u,p,!1,t)}}function Ix(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=mo(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t;return{selected:i,select:(c,p,h)=>{let y=c;return!r&&i&&i&&l(c,i)&&(y=void 0),o||s(y),o==null||o(y,c,p,h),y},isSelected:c=>i?l(i,c):!1}}function jx(e,t){const n=Ix(e,t),r=Tx(e,t),o=Ax(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function su(e){var Tt;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new We(t.today,t.timeZone)),t.month&&(t.month=new We(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new We(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new We(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new We(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new We(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Tt=t.selected)==null?void 0:Tt.map(U=>new We(U,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new We(t.selected.from,t.timeZone):void 0,to:t.selected.to?new We(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:s,classNames:i}=x.useMemo(()=>{const U={...Ua,...t.locale};return{dateLib:new Nt({locale:U,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:Bw(t.components),formatters:Zw(t.formatters),labels:{...mx,...t.labels},locale:U,classNames:{...Va(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:l,mode:u,navLayout:m,numberOfMonths:c=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:v,onDayMouseEnter:g,onDayMouseLeave:b,onNextClick:w,onPrevClick:S,showWeekNumber:D,styles:C}=t,{formatCaption:N,formatDay:M,formatMonthDropdown:E,formatWeekNumber:$,formatWeekNumberHeader:B,formatWeekdayName:L,formatYearDropdown:q}=r,A=kx(t,a),{days:T,months:_,navStart:R,navEnd:I,previousMonth:k,nextMonth:P,goToMonth:H}=A,z=fw(T,t,R,I,a),{isSelected:O,select:j,selected:Y}=jx(t,a)??{},{blur:G,focused:V,isFocusTarget:F,moveFocus:Z,setFocused:X}=Rx(t,A,z,O??(()=>!1),a),{labelDayButton:Q,labelGridcell:se,labelGrid:ue,labelMonthDropdown:ye,labelNav:J,labelPrevious:Re,labelNext:Te,labelWeekday:oe,labelWeekNumber:me,labelWeekNumberHeader:be,labelYearDropdown:$e}=o,He=x.useMemo(()=>ex(a,t.ISOWeek),[a,t.ISOWeek]),Ae=u!==void 0||h!==void 0,Fe=x.useCallback(()=>{k&&(H(k),S==null||S(k))},[k,H,S]),zt=x.useCallback(()=>{P&&(H(P),w==null||w(P))},[H,P,w]),an=x.useCallback((U,ie)=>ae=>{ae.preventDefault(),ae.stopPropagation(),X(U),j==null||j(U.date,ie,ae),h==null||h(U.date,ie,ae)},[j,h,X]),Rt=x.useCallback((U,ie)=>ae=>{X(U),y==null||y(U.date,ie,ae)},[y,X]),Pn=x.useCallback((U,ie)=>ae=>{G(),p==null||p(U.date,ie,ae)},[G,p]),bt=x.useCallback((U,ie)=>ae=>{const fe={ArrowLeft:[ae.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[ae.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[ae.shiftKey?"year":"week","after"],ArrowUp:[ae.shiftKey?"year":"week","before"],PageUp:[ae.shiftKey?"year":"month","before"],PageDown:[ae.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(fe[ae.key]){ae.preventDefault(),ae.stopPropagation();const[ge,re]=fe[ae.key];Z(ge,re)}v==null||v(U.date,ie,ae)},[Z,v,t.dir]),Gt=x.useCallback((U,ie)=>ae=>{g==null||g(U.date,ie,ae)},[g]),nt=x.useCallback((U,ie)=>ae=>{b==null||b(U.date,ie,ae)},[b]),sn=x.useCallback(U=>ie=>{const ae=Number(ie.target.value),fe=a.setMonth(a.startOfMonth(U),ae);H(fe)},[a,H]),Ge=x.useCallback(U=>ie=>{const ae=Number(ie.target.value),fe=a.setYear(a.startOfMonth(U),ae);H(fe)},[a,H]),{className:cn,style:An}=x.useMemo(()=>({className:[i[ce.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[ce.Root],...t.style}}),[i,t.className,t.style,C]),ln=Yw(t),Ut=x.useRef(null);vx(Ut,!!t.animate,{classNames:i,months:_,focused:V,dateLib:a});const In={dayPickerProps:t,selected:Y,select:j,isSelected:O,months:_,nextMonth:P,previousMonth:k,goToMonth:H,getModifiers:z,components:n,classNames:i,styles:C,labels:o,formatters:r};return x.createElement(eu.Provider,{value:In},x.createElement(n.Root,{rootRef:t.animate?Ut:void 0,className:cn,style:An,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...ln},x.createElement(n.Months,{className:i[ce.Months],style:C==null?void 0:C[ce.Months]},!t.hideNavigation&&!m&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:i[ce.Nav],style:C==null?void 0:C[ce.Nav],"aria-label":J(),onPreviousClick:Fe,onNextClick:zt,previousMonth:k,nextMonth:P}),_.map((U,ie)=>{const ae=Qw(U.date,R,I,r,a),fe=tx(R,I,r,a);return x.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:i[ce.Month],style:C==null?void 0:C[ce.Month],key:ie,displayIndex:ie,calendarMonth:U},m==="around"&&!t.hideNavigation&&ie===0&&x.createElement(n.PreviousMonthButton,{type:"button",className:i[ce.PreviousMonthButton],tabIndex:k?void 0:-1,"aria-disabled":k?void 0:!0,"aria-label":Re(k),onClick:Fe,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:k?void 0:!0,className:i[ce.Chevron],orientation:t.dir==="rtl"?"right":"left"})),x.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:i[ce.MonthCaption],style:C==null?void 0:C[ce.MonthCaption],calendarMonth:U,displayIndex:ie},l!=null&&l.startsWith("dropdown")?x.createElement(n.DropdownNav,{className:i[ce.Dropdowns],style:C==null?void 0:C[ce.Dropdowns]},l==="dropdown"||l==="dropdown-months"?x.createElement(n.MonthsDropdown,{className:i[ce.MonthsDropdown],"aria-label":ye(),classNames:i,components:n,disabled:!!t.disableNavigation,onChange:sn(U.date),options:ae,style:C==null?void 0:C[ce.Dropdown],value:a.getMonth(U.date)}):x.createElement("span",null,E(U.date,a)),l==="dropdown"||l==="dropdown-years"?x.createElement(n.YearsDropdown,{className:i[ce.YearsDropdown],"aria-label":$e(a.options),classNames:i,components:n,disabled:!!t.disableNavigation,onChange:Ge(U.date),options:fe,style:C==null?void 0:C[ce.Dropdown],value:a.getYear(U.date)}):x.createElement("span",null,q(U.date,a)),x.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},N(U.date,a.options,a))):x.createElement(n.CaptionLabel,{className:i[ce.CaptionLabel],role:"status","aria-live":"polite"},N(U.date,a.options,a))),m==="around"&&!t.hideNavigation&&ie===c-1&&x.createElement(n.NextMonthButton,{type:"button",className:i[ce.NextMonthButton],tabIndex:P?void 0:-1,"aria-disabled":P?void 0:!0,"aria-label":Te(P),onClick:zt,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:P?void 0:!0,className:i[ce.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ie===c-1&&m==="after"&&!t.hideNavigation&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:i[ce.Nav],style:C==null?void 0:C[ce.Nav],"aria-label":J(),onPreviousClick:Fe,onNextClick:zt,previousMonth:k,nextMonth:P}),x.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":ue(U.date,a.options,a)||void 0,className:i[ce.MonthGrid],style:C==null?void 0:C[ce.MonthGrid]},!t.hideWeekdays&&x.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:i[ce.Weekdays],style:C==null?void 0:C[ce.Weekdays]},D&&x.createElement(n.WeekNumberHeader,{"aria-label":be(a.options),className:i[ce.WeekNumberHeader],style:C==null?void 0:C[ce.WeekNumberHeader],scope:"col"},B()),He.map((ge,re)=>x.createElement(n.Weekday,{"aria-label":oe(ge,a.options,a),className:i[ce.Weekday],key:re,style:C==null?void 0:C[ce.Weekday],scope:"col"},L(ge,a.options,a)))),x.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:i[ce.Weeks],style:C==null?void 0:C[ce.Weeks]},U.weeks.map((ge,re)=>x.createElement(n.Week,{className:i[ce.Week],key:ge.weekNumber,style:C==null?void 0:C[ce.Week],week:ge},D&&x.createElement(n.WeekNumber,{week:ge,style:C==null?void 0:C[ce.WeekNumber],"aria-label":me(ge.weekNumber,{locale:s}),className:i[ce.WeekNumber],scope:"row",role:"rowheader"},$(ge.weekNumber,a)),ge.days.map(de=>{const{date:ve}=de,le=z(de);if(le[De.focused]=!le.hidden&&!!(V!=null&&V.isEqualTo(de)),le[at.selected]=(O==null?void 0:O(ve))||le.selected,qa(Y)){const{from:Ve,to:Ie}=Y;le[at.range_start]=!!(Ve&&Ie&&a.isSameDay(ve,Ve)),le[at.range_end]=!!(Ve&&Ie&&a.isSameDay(ve,Ie)),le[at.range_middle]=xt(Y,ve,!0,a)}const Ue=Jw(le,C,t.modifiersStyles),xe=mw(le,i,t.modifiersClassNames),Ce=!Ae&&!le.hidden?se(ve,le,a.options,a):void 0;return x.createElement(n.Day,{key:`${a.format(ve,"yyyy-MM-dd")}_${a.format(de.displayMonth,"yyyy-MM")}`,day:de,modifiers:le,className:xe.join(" "),style:Ue,role:"gridcell","aria-selected":le.selected||void 0,"aria-label":Ce,"data-day":a.format(ve,"yyyy-MM-dd"),"data-month":de.outside?a.format(ve,"yyyy-MM"):void 0,"data-selected":le.selected||void 0,"data-disabled":le.disabled||void 0,"data-hidden":le.hidden||void 0,"data-outside":de.outside||void 0,"data-focused":le.focused||void 0,"data-today":le.today||void 0},!le.hidden&&Ae?x.createElement(n.DayButton,{className:i[ce.DayButton],style:C==null?void 0:C[ce.DayButton],type:"button",day:de,modifiers:le,disabled:le.disabled||void 0,tabIndex:F(de)?0:-1,"aria-label":Q(ve,le,a.options,a),onClick:an(de,le),onBlur:Pn(de,le),onFocus:Rt(de,le),onKeyDown:bt(de,le),onMouseEnter:Gt(de,le),onMouseLeave:nt(de,le)},M(ve,a.options,a)):!le.hidden&&M(de.date,a.options,a))}))))))})),t.footer&&x.createElement(n.Footer,{className:i[ce.Footer],style:C==null?void 0:C[ce.Footer],role:"status","aria-live":"polite"},t.footer)))}function Ka(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ar={exports:{}},$x=Ar.exports,gi;function iu(){return gi||(gi=1,function(e,t){(function(n,r){e.exports=r()})($x,function(){var n=1e3,r=6e4,o=36e5,a="millisecond",s="second",i="minute",l="hour",u="day",m="week",c="month",p="quarter",h="year",y="date",v="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var _=["th","st","nd","rd"],R=T%100;return"["+T+(_[(R-20)%10]||_[R]||_[0])+"]"}},S=function(T,_,R){var I=String(T);return!I||I.length>=_?T:""+Array(_+1-I.length).join(R)+T},D={s:S,z:function(T){var _=-T.utcOffset(),R=Math.abs(_),I=Math.floor(R/60),k=R%60;return(_<=0?"+":"-")+S(I,2,"0")+":"+S(k,2,"0")},m:function T(_,R){if(_.date()<R.date())return-T(R,_);var I=12*(R.year()-_.year())+(R.month()-_.month()),k=_.clone().add(I,c),P=R-k<0,H=_.clone().add(I+(P?-1:1),c);return+(-(I+(R-k)/(P?k-H:H-k))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:c,y:h,w:m,d:u,D:y,h:l,m:i,s,ms:a,Q:p}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},C="en",N={};N[C]=w;var M="$isDayjsObject",E=function(T){return T instanceof q||!(!T||!T[M])},$=function T(_,R,I){var k;if(!_)return C;if(typeof _=="string"){var P=_.toLowerCase();N[P]&&(k=P),R&&(N[P]=R,k=P);var H=_.split("-");if(!k&&H.length>1)return T(H[0])}else{var z=_.name;N[z]=_,k=z}return!I&&k&&(C=k),k||!I&&C},B=function(T,_){if(E(T))return T.clone();var R=typeof _=="object"?_:{};return R.date=T,R.args=arguments,new q(R)},L=D;L.l=$,L.i=E,L.w=function(T,_){return B(T,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var q=function(){function T(R){this.$L=$(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[M]=!0}var _=T.prototype;return _.parse=function(R){this.$d=function(I){var k=I.date,P=I.utc;if(k===null)return new Date(NaN);if(L.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var H=k.match(g);if(H){var z=H[2]-1||0,O=(H[7]||"0").substring(0,3);return P?new Date(Date.UTC(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,O)):new Date(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,O)}}return new Date(k)}(R),this.init()},_.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},_.$utils=function(){return L},_.isValid=function(){return this.$d.toString()!==v},_.isSame=function(R,I){var k=B(R);return this.startOf(I)<=k&&k<=this.endOf(I)},_.isAfter=function(R,I){return B(R)<this.startOf(I)},_.isBefore=function(R,I){return this.endOf(I)<B(R)},_.$g=function(R,I,k){return L.u(R)?this[I]:this.set(k,R)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(R,I){var k=this,P=!!L.u(I)||I,H=L.p(R),z=function(X,Q){var se=L.w(k.$u?Date.UTC(k.$y,Q,X):new Date(k.$y,Q,X),k);return P?se:se.endOf(u)},O=function(X,Q){return L.w(k.toDate()[X].apply(k.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Q)),k)},j=this.$W,Y=this.$M,G=this.$D,V="set"+(this.$u?"UTC":"");switch(H){case h:return P?z(1,0):z(31,11);case c:return P?z(1,Y):z(0,Y+1);case m:var F=this.$locale().weekStart||0,Z=(j<F?j+7:j)-F;return z(P?G-Z:G+(6-Z),Y);case u:case y:return O(V+"Hours",0);case l:return O(V+"Minutes",1);case i:return O(V+"Seconds",2);case s:return O(V+"Milliseconds",3);default:return this.clone()}},_.endOf=function(R){return this.startOf(R,!1)},_.$set=function(R,I){var k,P=L.p(R),H="set"+(this.$u?"UTC":""),z=(k={},k[u]=H+"Date",k[y]=H+"Date",k[c]=H+"Month",k[h]=H+"FullYear",k[l]=H+"Hours",k[i]=H+"Minutes",k[s]=H+"Seconds",k[a]=H+"Milliseconds",k)[P],O=P===u?this.$D+(I-this.$W):I;if(P===c||P===h){var j=this.clone().set(y,1);j.$d[z](O),j.init(),this.$d=j.set(y,Math.min(this.$D,j.daysInMonth())).$d}else z&&this.$d[z](O);return this.init(),this},_.set=function(R,I){return this.clone().$set(R,I)},_.get=function(R){return this[L.p(R)]()},_.add=function(R,I){var k,P=this;R=Number(R);var H=L.p(I),z=function(Y){var G=B(P);return L.w(G.date(G.date()+Math.round(Y*R)),P)};if(H===c)return this.set(c,this.$M+R);if(H===h)return this.set(h,this.$y+R);if(H===u)return z(1);if(H===m)return z(7);var O=(k={},k[i]=r,k[l]=o,k[s]=n,k)[H]||1,j=this.$d.getTime()+R*O;return L.w(j,this)},_.subtract=function(R,I){return this.add(-1*R,I)},_.format=function(R){var I=this,k=this.$locale();if(!this.isValid())return k.invalidDate||v;var P=R||"YYYY-MM-DDTHH:mm:ssZ",H=L.z(this),z=this.$H,O=this.$m,j=this.$M,Y=k.weekdays,G=k.months,V=k.meridiem,F=function(Q,se,ue,ye){return Q&&(Q[se]||Q(I,P))||ue[se].slice(0,ye)},Z=function(Q){return L.s(z%12||12,Q,"0")},X=V||function(Q,se,ue){var ye=Q<12?"AM":"PM";return ue?ye.toLowerCase():ye};return P.replace(b,function(Q,se){return se||function(ue){switch(ue){case"YY":return String(I.$y).slice(-2);case"YYYY":return L.s(I.$y,4,"0");case"M":return j+1;case"MM":return L.s(j+1,2,"0");case"MMM":return F(k.monthsShort,j,G,3);case"MMMM":return F(G,j);case"D":return I.$D;case"DD":return L.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return F(k.weekdaysMin,I.$W,Y,2);case"ddd":return F(k.weekdaysShort,I.$W,Y,3);case"dddd":return Y[I.$W];case"H":return String(z);case"HH":return L.s(z,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return X(z,O,!0);case"A":return X(z,O,!1);case"m":return String(O);case"mm":return L.s(O,2,"0");case"s":return String(I.$s);case"ss":return L.s(I.$s,2,"0");case"SSS":return L.s(I.$ms,3,"0");case"Z":return H}return null}(Q)||H.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(R,I,k){var P,H=this,z=L.p(I),O=B(R),j=(O.utcOffset()-this.utcOffset())*r,Y=this-O,G=function(){return L.m(H,O)};switch(z){case h:P=G()/12;break;case c:P=G();break;case p:P=G()/3;break;case m:P=(Y-j)/6048e5;break;case u:P=(Y-j)/864e5;break;case l:P=Y/o;break;case i:P=Y/r;break;case s:P=Y/n;break;default:P=Y}return k?P:L.a(P)},_.daysInMonth=function(){return this.endOf(c).$D},_.$locale=function(){return N[this.$L]},_.locale=function(R,I){if(!R)return this.$L;var k=this.clone(),P=$(R,I,!0);return P&&(k.$L=P),k},_.clone=function(){return L.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},T}(),A=q.prototype;return B.prototype=A,[["$ms",a],["$s",s],["$m",i],["$H",l],["$W",u],["$M",c],["$y",h],["$D",y]].forEach(function(T){A[T[1]]=function(_){return this.$g(_,T[0],T[1])}}),B.extend=function(T,_){return T.$i||(T(_,q,B),T.$i=!0),B},B.locale=$,B.isDayjs=E,B.unix=function(T){return B(1e3*T)},B.en=N[C],B.Ls=N,B.p={},B})}(Ar)),Ar.exports}var Lx=iu();const Ct=Ka(Lx);var Ir={exports:{}},Fx=Ir.exports,vi;function Wx(){return vi||(vi=1,function(e,t){(function(n,r){e.exports=r()})(Fx,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,a){var s=o.prototype,i=s.format;a.en.formats=n,s.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,m=function(c,p){return c.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(h,y,v){var g=v&&v.toUpperCase();return y||p[v]||n[v]||p[g].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(b,w,S){return w||S.slice(1)})})}(l,u===void 0?{}:u);return i.call(this,m)}}})}(Ir)),Ir.exports}var Bx=Wx();const cu=Ka(Bx);var jr={exports:{}},Yx=jr.exports,yi;function Hx(){return yi||(yi=1,function(e,t){(function(n,r){e.exports=r(iu())})(Yx,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var o=r(n),a={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(s){return""+s+(s===1?"er":"")}};return o.default.locale(a,null,!0),a})}(jr)),jr.exports}Hx();function zx({month:e,onMonthChange:t}){const n=e.getFullYear(),r=e.getMonth(),o=["January","February","March","April","May","June","July","August","September","October","November","December"],a=new Date().getFullYear(),s=Array.from({length:201},(c,p)=>a-100+p),i=c=>{const p=new Date(e);p.setMonth(Number.parseInt(c)),t(p)},l=c=>{const p=new Date(e);p.setFullYear(Number.parseInt(c)),t(p)},u=()=>{const c=new Date(e);c.setMonth(c.getMonth()-1),t(c)},m=()=>{const c=new Date(e);c.setMonth(c.getMonth()+1),t(c)};return d.jsxs("div",{className:"flex items-center justify-between p-2 border-b bg-muted",children:[d.jsx(Dt,{variant:"outline",size:"small",onClick:u,className:"h-7 w-7 p-0",children:d.jsx(nc,{className:"h-4 w-4"})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(pa,{value:r.toString(),onValueChange:i,children:[d.jsx(Hr,{className:"w-32 h-8 text-sm",children:d.jsx(ha,{})}),d.jsx(zr,{children:o.map((c,p)=>d.jsx(Gr,{value:p.toString(),children:c},c))})]}),d.jsxs(pa,{value:n.toString(),onValueChange:l,children:[d.jsx(Hr,{className:"w-20 h-8 text-sm",children:d.jsx(ha,{})}),d.jsx(zr,{className:"max-h-[200px]",children:s.map(c=>d.jsx(Gr,{value:c.toString(),children:c},c))})]})]}),d.jsx(Dt,{variant:"outline",size:"small",onClick:m,className:"h-7 w-7 p-0",children:d.jsx(Na,{className:"h-4 w-4"})})]})}Ct.extend(cu);const Ur=({label:e,placeholder:t="Pick a date",helperText:n,error:r,required:o,value:a,onSelect:s,className:i,minDate:l,maxDate:u,disabled:m,readOnly:c,locale:p="en",showOutsideDays:h,dayPickerProps:y,month:v,onMonthChange:g,open:b,onOpenChange:w,...S})=>{const[D,C]=x.useState(!1),N=b!==void 0?b:D,M=w||C,E=v??a??new Date,$=B=>{B&&(!a||B.getTime()!==a.getTime())&&(s==null||s(B),M(!1))};return Ct.locale(p),d.jsxs("div",{className:W("space-y-1",i),...S,children:[e&&d.jsxs(rn,{className:"text-sm font-medium text-gray-700",children:[e,o&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(Ba,{open:N,onOpenChange:M,children:[d.jsx(Ya,{asChild:!0,children:d.jsxs(Dt,{variant:"outline",className:W("w-full flex justify-between items-center font-normal",!a&&"text-muted-foreground",r&&"border border-red-500 focus:ring-red-500"),disabled:m,"aria-readonly":c,children:[d.jsx("span",{className:W("text-left",!a&&"text-muted-foreground"),children:a?Ct(a).locale(p).format("LL"):t}),d.jsx(tc,{strokeWidth:1.2,className:"ml-6 h-6 w-6 shrink-0 text-foreground"})]})}),d.jsx(co,{className:"w-auto p-0",align:"start",children:d.jsxs("div",{className:"bg-white rounded-md border shadow-md",children:[d.jsx(zx,{month:E,onMonthChange:g??(()=>{})}),d.jsx("div",{className:"p-3",children:d.jsx(su,{mode:"single",selected:a,onSelect:$,month:E,onMonthChange:g,fromDate:l,toDate:u,showOutsideDays:h,className:"p-0",classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"hidden",caption_label:"text-sm font-medium",nav:"hidden",nav_button:"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",nav_button_previous:"absolute left-1 top-1",nav_button_next:"absolute right-1 top-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:"h-9 w-9 p-0 font-normal aria-selected:opacity-100 hover:bg-accent hover:text-accent-foreground rounded-md transition-colors",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible"},...y})})]})})]}),(n||r)&&d.jsx("p",{className:W("text-xs",r?"text-red-500":"text-gray-500"),children:r||n})]})};function Gx({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:s,...i}){const l=Va();return d.jsx(su,{showOutsideDays:n,className:W("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...a},classNames:{root:W("w-fit",l.root),months:W("relative flex flex-col gap-4 md:flex-row",l.months),month:W("flex w-full flex-col gap-4",l.month),nav:W("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",l.nav),button_previous:W(na({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_previous),button_next:W(na({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_next),month_caption:W("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",l.month_caption),dropdowns:W("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",l.dropdowns),dropdown_root:W("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",l.dropdown_root),dropdown:W("absolute inset-0 opacity-0",l.dropdown),caption_label:W("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",l.caption_label),table:"w-full border-collapse",weekdays:W("flex",l.weekdays),weekday:W("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",l.weekday),week:W("mt-2 flex w-full",l.week),week_number_header:W("w-[--cell-size] select-none",l.week_number_header),week_number:W("text-muted-foreground select-none text-[0.8rem]",l.week_number),day:W("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",l.day),range_start:W("bg-accent rounded-l-md",l.range_start),range_middle:W("rounded-none",l.range_middle),range_end:W("bg-accent rounded-r-md",l.range_end),today:W("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",l.today),outside:W("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:W("text-muted-foreground opacity-50",l.disabled),hidden:W("invisible",l.hidden),...t},components:{Root:({className:u,rootRef:m,...c})=>d.jsx("div",{"data-slot":"calendar",ref:m,className:W(u),...c}),Chevron:({className:u,orientation:m,...c})=>m==="left"?d.jsx(nc,{className:W("size-4",u),...c}):m==="right"?d.jsx(Na,{className:W("size-4",u),...c}):d.jsx(tr,{className:W("size-4",u),...c}),DayButton:Ux,WeekNumber:({children:u,...m})=>d.jsx("td",{...m,children:d.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:u})}),...s},...i})}function Ux({className:e,day:t,modifiers:n,...r}){const o=Va(),a=f.useRef(null);return f.useEffect(()=>{var p;n.focused&&((p=a.current)==null||p.focus())},[n.focused]),d.jsx(Dt,{ref:a,variant:"ghost",size:"icon.small","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:W("flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none","data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground","data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground","data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md","group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 group-data-[focused=true]/day:ring-[3px]","[&>span]:text-xs [&>span]:opacity-70",o.day,e),...r})}var $r={exports:{}},qx=$r.exports,bi;function Vx(){return bi||(bi=1,function(e,t){(function(n,r){e.exports=r()})(qx,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,a=/\d\d/,s=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,l={},u=function(g){return(g=+g)+(g>68?1900:2e3)},m=function(g){return function(b){this[g]=+b}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var w=b.match(/([+-]|\d\d)/g),S=60*w[1]+(+w[2]||0);return S===0?0:w[0]==="+"?-S:S}(g)}],p=function(g){var b=l[g];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(g,b){var w,S=l.meridiem;if(S){for(var D=1;D<=24;D+=1)if(g.indexOf(S(D,0,b))>-1){w=D>12;break}}else w=g===(b?"pm":"PM");return w},y={A:[i,function(g){this.afternoon=h(g,!1)}],a:[i,function(g){this.afternoon=h(g,!0)}],Q:[o,function(g){this.month=3*(g-1)+1}],S:[o,function(g){this.milliseconds=100*+g}],SS:[a,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[s,m("seconds")],ss:[s,m("seconds")],m:[s,m("minutes")],mm:[s,m("minutes")],H:[s,m("hours")],h:[s,m("hours")],HH:[s,m("hours")],hh:[s,m("hours")],D:[s,m("day")],DD:[a,m("day")],Do:[i,function(g){var b=l.ordinal,w=g.match(/\d+/);if(this.day=w[0],b)for(var S=1;S<=31;S+=1)b(S).replace(/\[|\]/g,"")===g&&(this.day=S)}],w:[s,m("week")],ww:[a,m("week")],M:[s,m("month")],MM:[a,m("month")],MMM:[i,function(g){var b=p("months"),w=(p("monthsShort")||b.map(function(S){return S.slice(0,3)})).indexOf(g)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[i,function(g){var b=p("months").indexOf(g)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,m("year")],YY:[a,function(g){this.year=u(g)}],YYYY:[/\d{4}/,m("year")],Z:c,ZZ:c};function v(g){var b,w;b=g,w=l&&l.formats;for(var S=(g=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(B,L,q){var A=q&&q.toUpperCase();return L||w[q]||n[q]||w[A].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(T,_,R){return _||R.slice(1)})})).match(r),D=S.length,C=0;C<D;C+=1){var N=S[C],M=y[N],E=M&&M[0],$=M&&M[1];S[C]=$?{regex:E,parser:$}:N.replace(/^\[|\]$/g,"")}return function(B){for(var L={},q=0,A=0;q<D;q+=1){var T=S[q];if(typeof T=="string")A+=T.length;else{var _=T.regex,R=T.parser,I=B.slice(A),k=_.exec(I)[0];R.call(L,k),B=B.replace(k,"")}}return function(P){var H=P.afternoon;if(H!==void 0){var z=P.hours;H?z<12&&(P.hours+=12):z===12&&(P.hours=0),delete P.afternoon}}(L),L}}return function(g,b,w){w.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(u=g.parseTwoDigitYear);var S=b.prototype,D=S.parse;S.parse=function(C){var N=C.date,M=C.utc,E=C.args;this.$u=M;var $=E[1];if(typeof $=="string"){var B=E[2]===!0,L=E[3]===!0,q=B||L,A=E[2];L&&(A=E[2]),l=this.$locale(),!B&&A&&(l=w.Ls[A]),this.$d=function(I,k,P,H){try{if(["x","X"].indexOf(k)>-1)return new Date((k==="X"?1e3:1)*I);var z=v(k)(I),O=z.year,j=z.month,Y=z.day,G=z.hours,V=z.minutes,F=z.seconds,Z=z.milliseconds,X=z.zone,Q=z.week,se=new Date,ue=Y||(O||j?1:se.getDate()),ye=O||se.getFullYear(),J=0;O&&!j||(J=j>0?j-1:se.getMonth());var Re,Te=G||0,oe=V||0,me=F||0,be=Z||0;return X?new Date(Date.UTC(ye,J,ue,Te,oe,me,be+60*X.offset*1e3)):P?new Date(Date.UTC(ye,J,ue,Te,oe,me,be)):(Re=new Date(ye,J,ue,Te,oe,me,be),Q&&(Re=H(Re).week(Q).toDate()),Re)}catch{return new Date("")}}(N,$,M,w),this.init(),A&&A!==!0&&(this.$L=this.locale(A).$L),q&&N!=this.format($)&&(this.$d=new Date("")),l={}}else if($ instanceof Array)for(var T=$.length,_=1;_<=T;_+=1){E[1]=$[_-1];var R=w.apply(this,E);if(R.isValid()){this.$d=R.$d,this.$L=R.$L,this.init();break}_===T&&(this.$d=new Date(""))}else D.call(this,C)}}})}($r)),$r.exports}var Kx=Vx();const Xx=Ka(Kx);Ct.extend(Xx);Ct.extend(cu);const Zx={"MM/DD/YYYY":{separator:"/",pattern:/^[0-9/]$/},"DD/MM/YYYY":{separator:"/",pattern:/^[0-9/]$/},"YYYY-MM-DD":{separator:"-",pattern:/^[0-9-]$/},"DD-MM-YYYY":{separator:"-",pattern:/^[0-9-]$/}},Qx=({label:e,placeholder:t,helperText:n,required:r,value:o,onSelect:a,className:s,minDate:i,maxDate:l,disabled:u,readOnly:m,locale:c="en",dateFormat:p="DD/MM/YYYY"})=>{const[h,y]=f.useState(!1),[v,g]=f.useState(""),[b,w]=f.useState(o),S=f.useMemo(()=>p,[p]),D=f.useMemo(()=>Zx[S],[S]),C=f.useMemo(()=>t||S.toLowerCase(),[t,S]),N=f.useCallback(A=>{const T=A.replace(/\D/g,""),{separator:_}=D;if(T.length<=2)return T;switch(S){case"MM/DD/YYYY":case"DD/MM/YYYY":return T.length<=4?`${T.substring(0,2)}${_}${T.substring(2)}`:`${T.substring(0,2)}${_}${T.substring(2,4)}${_}${T.substring(4,8)}`;case"YYYY-MM-DD":return T.length<=4?T:T.length<=6?`${T.substring(0,4)}${_}${T.substring(4)}`:`${T.substring(0,4)}${_}${T.substring(4,6)}${_}${T.substring(6,8)}`;case"DD-MM-YYYY":return T.length<=4?`${T.substring(0,2)}${_}${T.substring(2)}`:`${T.substring(0,2)}${_}${T.substring(2,4)}${_}${T.substring(4,8)}`;default:return A}},[S,D]),M=f.useMemo(()=>A=>{const T=A.trim();return T&&Ct(T,S,!0).isValid()?Ct(T,S):null},[S]),E=f.useCallback(A=>Ct(A).format(S),[S]);f.useEffect(()=>{g(o?E(o):""),w(o),Ct.locale(c)},[o,c,E]);const $=f.useCallback(A=>{let T=A.target.value;if(g(T),!T.trim()){w(void 0),a==null||a(void 0);return}const _=N(T);_!==T&&T.replace(/\D/g,"").length>1&&(g(_),T=_);const R=M(T);if(R!=null&&R.isValid()){const I=R.toDate();(!i||I>=i)&&(!l||I<=l)&&(w(I),a==null||a(I))}},[N,M,a,i,l]),B=f.useCallback(()=>{b&&g(E(b))},[b,E]),L=f.useCallback(A=>{A&&(g(E(A)),w(A),a==null||a(A),y(!1))},[a,E]),q=f.useCallback(A=>{if(!["Backspace","Delete","Tab","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(A.key)&&!D.pattern.test(A.key)&&!A.ctrlKey&&!A.metaKey){A.preventDefault();return}A.key==="Enter"&&(A.preventDefault(),B())},[D.pattern,B]);return d.jsxs("div",{className:W("space-y-1",s),children:[e&&d.jsxs(rn,{className:"text-sm font-medium text-gray-700",children:[e,r&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(Ba,{open:h,onOpenChange:y,children:[d.jsxs("div",{className:"w-60 relative",children:[d.jsx(nn,{type:"text",value:v,onChange:$,onBlur:B,onKeyDown:q,placeholder:C,disabled:u,readOnly:m,className:"w-full pr-12"}),d.jsx(Ya,{asChild:!0,children:d.jsx("button",{type:"button",className:"absolute right-1 top-1/2 -translate-y-1/2 bg-transparent border-0 outline-none text-black hover:text-black focus:ring-2 focus:ring-ring",style:{height:"1.75rem",width:"1.75rem"},onClick:()=>y(A=>!A),disabled:u||m,"aria-label":"Open calendar",children:d.jsx(tc,{strokeWidth:1,className:"h-5 w-5"})})})]}),d.jsx(co,{className:"w-auto p-0",align:"start",children:d.jsx(Gx,{mode:"single",selected:b,onSelect:L,fromDate:i,toDate:l})})]}),n&&d.jsx("p",{className:"text-xs text-gray-500",children:n})]})};function Sn({label:e,placeholder:t="Select option",options:n,leadingIcon:r,helperText:o,error:a,required:s,onValueChange:i,className:l,variant:u="default",disabled:m=!1}){return d.jsxs("div",{className:W("space-y-1",l),children:[e&&d.jsxs(rn,{className:W("text-sm font-medium",m?"text-gray-400":"text-gray-700"),children:[e,s&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(pa,{onValueChange:i,disabled:m,children:[d.jsx(Hr,{className:W("border-input focus-within:ring-primary",a&&"border-red-500 focus-within:ring-red-500",u==="gray"&&"bg-gray-100 border-gray-300 text-gray-700",m&&"opacity-50 cursor-not-allowed"),children:d.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&d.jsx("div",{className:"text-gray-400",children:r}),d.jsx(ha,{placeholder:t})]})}),d.jsx(zr,{children:n.map(c=>d.jsx(Gr,{value:c.value,children:c.label},c.value))})]}),(o||a)&&d.jsx("p",{className:W("text-xs",a?"text-red-500":m?"text-gray-400":"text-gray-500"),children:a||o})]})}const Jx=({label:e,variant:t="filled",color:n="default",size:r="medium",deletable:o=!1,onDelete:a,onClick:s,icon:i,avatar:l,disabled:u=!1,className:m="",...c})=>{const p="inline-flex items-center gap-1 font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",h={small:"px-2 py-0.5 text-xs rounded-full",medium:"px-3 py-1 text-sm rounded-full",large:"px-4 py-1.5 text-base rounded-full"},y={default:{filled:"bg-gray-200 text-gray-800 hover:bg-gray-300",outlined:"border border-gray-300 text-gray-700 hover:bg-gray-50"},primary:{filled:"bg-blue-500 text-white hover:bg-blue-600",outlined:"border border-blue-500 text-blue-600 hover:bg-blue-50"},secondary:{filled:"bg-purple-500 text-white hover:bg-purple-600",outlined:"border border-purple-500 text-purple-600 hover:bg-purple-50"},success:{filled:"bg-green-500 text-white hover:bg-green-600",outlined:"border border-green-500 text-green-600 hover:bg-green-50"},warning:{filled:"bg-yellow-500 text-white hover:bg-yellow-600",outlined:"border border-yellow-500 text-yellow-600 hover:bg-yellow-50"},error:{filled:"bg-red-500 text-white hover:bg-red-600",outlined:"border border-red-500 text-red-600 hover:bg-red-50"}},v=u?"opacity-50 cursor-not-allowed":"cursor-pointer",g=s&&!u?"hover:shadow-md":"",b=`
152
152
  ${p}
153
153
  ${h[r]}
154
154
  ${y[n][t]}
155
155
  ${v}
156
156
  ${g}
157
157
  ${m}
158
- `.trim(),w=C=>{!u&&s&&s(C)},S=C=>{C.stopPropagation(),!u&&a&&a(C)},D=r==="small"?12:r==="large"?18:14;return d.jsxs("div",{className:b,onClick:w,...c,children:[l&&d.jsx("div",{className:`rounded-full overflow-hidden ${r==="small"?"w-4 h-4":r==="large"?"w-6 h-6":"w-5 h-5"}`,children:typeof l=="string"?d.jsx("img",{src:l,alt:`Avatar for ${e}`,className:"w-full h-full object-cover"}):l}),i&&!l&&d.jsx("div",{className:"flex items-center",children:x.isValidElement(i)?x.cloneElement(i,{size:D}):i}),d.jsx("span",{children:e}),o&&d.jsx("button",{onClick:S,className:`ml-1 rounded-full p-0.5 hover:bg-black hover:bg-opacity-10 transition-colors ${u?"cursor-not-allowed":"cursor-pointer"}`,disabled:u,children:d.jsx(kn,{size:D})})]})},e0={small:"h-8 text-sm",medium:"h-10",large:"h-12 text-base"},t0={white:"bg-white border-gray-300",grey:"bg-gray-100 border-gray-300"},lu=({size:e="medium",variant:t="white",placeholder:n="Search here",className:r,onChange:o,query:a=""})=>d.jsxs("div",{className:"relative",children:[d.jsx(ac,{strokeWidth:1.1,className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-900 h-5 w-5"}),d.jsx(nn,{placeholder:n,className:W("pl-12 rounded-full",e0[e],t0[t],r),onChange:o,value:a})]}),n0=[{value:"all",label:"All Categories"},{value:"electronics",label:"Electronics"},{value:"clothing",label:"Clothing"},{value:"books",label:"Books"}],r0=[{value:"newest",label:"Newest First"},{value:"oldest",label:"Oldest First"},{value:"name-asc",label:"Name A-Z"},{value:"name-desc",label:"Name Z-A"}],o0=({className:e,searchPlaceholder:t="Search...",categories:n=n0,sortOptions:r=r0,showDateFilter:o=!1,onSearch:a,onFilter:s,onClear:i,defaultFilters:l})=>{const[u,m]=x.useState({category:(l==null?void 0:l.category)??"",sort:(l==null?void 0:l.sort)??"",dateFrom:l==null?void 0:l.dateFrom,dateTo:l==null?void 0:l.dateTo}),[c,p]=x.useState(!1),[h,y]=x.useState(!1),[v,g]=x.useState(u.dateFrom??new Date),[b,w]=x.useState(u.dateTo??new Date),S=(R,M)=>{const E={...u,[R]:M};m(E),s==null||s(E)},D=()=>{m({category:"",sort:"",dateFrom:void 0,dateTo:void 0}),i==null||i()},C=Object.values(u).some(R=>R!==""&&R!==void 0);return d.jsxs("div",{className:W("space-y-4",e),children:[d.jsx(lu,{size:"medium",placeholder:t,onChange:R=>a==null?void 0:a(R.target.value)}),d.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(oh,{className:"h-4 w-4 text-gray-500"}),d.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Filters:"})]}),d.jsx(Sn,{placeholder:"Category",options:n,onValueChange:R=>S("category",R),className:"min-w-[140px]"}),d.jsx(Sn,{placeholder:"Sort by",options:r,onValueChange:R=>S("sort",R),className:"min-w-[140px]"}),o&&d.jsxs(d.Fragment,{children:[d.jsx(Ur,{placeholder:"From date",value:u.dateFrom,onSelect:R=>{S("dateFrom",R),g(R??v)},className:"min-w-[140px]",open:c,onOpenChange:p,month:v,onMonthChange:g}),d.jsx(Ur,{placeholder:"To date",value:u.dateTo,onSelect:R=>{S("dateTo",R),w(R??b)},className:"min-w-[140px]",open:h,onOpenChange:y,month:b,onMonthChange:w})]}),C&&d.jsxs(Dt,{variant:"outline",size:"small",onClick:D,className:"flex items-center gap-1",children:[d.jsx(kn,{className:"h-3 w-3"}),"Clear"]})]})]})},a0=[{value:"personal",label:"Personal Account"},{value:"business",label:"Business Account"},{value:"developer",label:"Developer Account"}];function s0({className:e,showDateOfBirth:t=!0,accountTypes:n=a0,onValueChange:r}){const[o,a]=x.useState(),[s,i]=x.useState(!1),[l,u]=x.useState(!1),[m,c]=x.useState(!1),[p,h]=x.useState(o??new Date),[y,v]=x.useState(""),[g,b]=x.useState("");return d.jsxs("div",{className:W("space-y-4",e),children:[d.jsx(Qe,{label:"Username",placeholder:"Choose a username",helperText:"Must be at least 3 characters long",required:!0,onChange:w=>r==null?void 0:r("username",w.target.value)}),d.jsx(Qe,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:d.jsx(oc,{className:"h-4 w-4"}),required:!0,onChange:w=>r==null?void 0:r("email",w.target.value)}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsx(ra,{label:"Password",helperText:"Must be at least 8 characters",required:!0,value:y,onChange:w=>{v(w),r==null||r("password",w)},showPassword:s,onShowPasswordChange:i}),d.jsx(ra,{label:"Confirm Password",placeholder:"Confirm your password",required:!0,value:g,onChange:w=>{b(w),r==null||r("confirmPassword",w)},showPassword:l,onShowPasswordChange:u})]}),d.jsx(Sn,{label:"Account Type",placeholder:"Select account type",options:n,leadingIcon:d.jsx(ph,{className:"h-4 w-4"}),required:!0,onValueChange:w=>r==null?void 0:r("accountType",w)}),t&&d.jsx(Ur,{label:"Date of Birth",placeholder:"Select your birth date",helperText:"Must be 18 or older",value:o,maxDate:new Date,onSelect:w=>{a(w),h(w??p),w&&(r==null||r("dateOfBirth",w))},open:m,onOpenChange:c,month:p,onMonthChange:h})]})}const i0=[{value:"us",label:"United States"},{value:"ca",label:"Canada"},{value:"uk",label:"United Kingdom"},{value:"au",label:"Australia"},{value:"de",label:"Germany"},{value:"fr",label:"France"}];function c0({className:e,countries:t=i0,onValueChange:n}){return d.jsxs("div",{className:W("space-y-4",e),children:[d.jsx(Qe,{label:"Street Address",placeholder:"Enter street address",required:!0,onChange:r=>n==null?void 0:n("streetAddress",r.target.value)}),d.jsx(Qe,{label:"Apartment, suite, etc.",placeholder:"Apartment, suite, etc. (optional)",onChange:r=>n==null?void 0:n("addressLine2",r.target.value)}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[d.jsx(Qe,{label:"City",placeholder:"Enter city",required:!0,onChange:r=>n==null?void 0:n("city",r.target.value)}),d.jsx(Qe,{label:"State/Province",placeholder:"Enter state",required:!0,onChange:r=>n==null?void 0:n("state",r.target.value)}),d.jsx(Qe,{label:"ZIP/Postal Code",placeholder:"Enter ZIP code",required:!0,onChange:r=>n==null?void 0:n("zipCode",r.target.value)})]}),d.jsx(Sn,{label:"Country",placeholder:"Select country",options:t,leadingIcon:d.jsx(ih,{className:"h-4 w-4"}),required:!0,onValueChange:r=>n==null?void 0:n("country",r)})]})}const l0=[{value:"sales",label:"Sales"},{value:"support",label:"Support"},{value:"general",label:"General Inquiry"}];function u0({className:e,showDepartment:t=!0,departmentOptions:n=l0,onValueChange:r}){return d.jsxs("div",{className:W("space-y-4",e),children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsx(Qe,{label:"First Name",placeholder:"Enter first name",required:!0,onChange:o=>r==null?void 0:r("firstName",o.target.value)}),d.jsx(Qe,{label:"Last Name",placeholder:"Enter last name",required:!0,onChange:o=>r==null?void 0:r("lastName",o.target.value)})]}),d.jsx(Qe,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:d.jsx(oc,{className:"h-4 w-4"}),required:!0,onChange:o=>r==null?void 0:r("email",o.target.value)}),d.jsx(Qe,{label:"Phone Number",type:"tel",placeholder:"+1 (555) 000-0000",icon:d.jsx(dh,{className:"h-4 w-4"}),onChange:o=>r==null?void 0:r("phone",o.target.value)}),t&&d.jsx(Sn,{label:"Department",placeholder:"Select department",options:n,leadingIcon:d.jsx(zp,{className:"h-4 w-4"}),onValueChange:o=>r==null?void 0:r("department",o)}),d.jsx(Ra,{label:"Message",placeholder:"How can we help you?",required:!0,onChange:o=>r==null?void 0:r("message",o.target.value)})]})}var wi=1,d0=.9,f0=.8,m0=.17,Ho=.1,zo=.999,p0=.9999,h0=.99,g0=/[\\\/_+.#"@\[\(\{&]/,v0=/[\\\/_+.#"@\[\(\{&]/g,y0=/[\s-]/,uu=/[\s-]/g;function va(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?wi:h0;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),u=n.indexOf(l,o),m=0,c,p,h,y;u>=0;)c=va(e,t,n,r,u+1,a+1,s),c>m&&(u===o?c*=wi:g0.test(e.charAt(u-1))?(c*=f0,h=e.slice(o,u-1).match(v0),h&&o>0&&(c*=Math.pow(zo,h.length))):y0.test(e.charAt(u-1))?(c*=d0,y=e.slice(o,u-1).match(uu),y&&o>0&&(c*=Math.pow(zo,y.length))):(c*=m0,o>0&&(c*=Math.pow(zo,u-o))),e.charAt(u)!==t.charAt(a)&&(c*=p0)),(c<Ho&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=va(e,t,n,r,u+1,a+2,s),p*Ho>c&&(c=p*Ho)),c>m&&(m=c),u=n.indexOf(l,u+1);return s[i]=m,m}function xi(e){return e.toLowerCase().replace(uu," ")}function b0(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,va(e,t,xi(e),xi(t),0,0,{})}var po="Dialog",[du,oD]=Be(po),[w0,ct]=du(po),fu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),l=f.useRef(null),[u,m]=tt({prop:r,defaultProp:o??!1,onChange:a,caller:po});return d.jsx(w0,{scope:t,triggerRef:i,contentRef:l,contentId:ke(),titleId:ke(),descriptionId:ke(),open:u,onOpenChange:m,onOpenToggle:f.useCallback(()=>m(c=>!c),[m]),modal:s,children:n})};fu.displayName=po;var mu="DialogTrigger",pu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(mu,n),a=he(t,o.triggerRef);return d.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Qa(o.open),...r,ref:a,onClick:K(e.onClick,o.onOpenToggle)})});pu.displayName=mu;var Xa="DialogPortal",[x0,hu]=du(Xa,{forceMount:void 0}),gu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ct(Xa,t);return d.jsx(x0,{scope:t,forceMount:n,children:f.Children.map(r,s=>d.jsx(ze,{present:n||a.open,children:d.jsx(sr,{asChild:!0,container:o,children:s})}))})};gu.displayName=Xa;var qr="DialogOverlay",vu=f.forwardRef((e,t)=>{const n=hu(qr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ct(qr,e.__scopeDialog);return a.modal?d.jsx(ze,{present:r||a.open,children:d.jsx(C0,{...o,ref:t})}):null});vu.displayName=qr;var S0=It("DialogOverlay.RemoveScroll"),C0=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(qr,n);return d.jsx(ir,{as:S0,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(ee.div,{"data-state":Qa(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),en="DialogContent",yu=f.forwardRef((e,t)=>{const n=hu(en,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ct(en,e.__scopeDialog);return d.jsx(ze,{present:r||a.open,children:a.modal?d.jsx(M0,{...o,ref:t}):d.jsx(D0,{...o,ref:t})})});yu.displayName=en;var M0=f.forwardRef((e,t)=>{const n=ct(en,e.__scopeDialog),r=f.useRef(null),o=he(t,n.contentRef,r);return f.useEffect(()=>{const a=r.current;if(a)return ao(a)},[]),d.jsx(bu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:K(e.onFocusOutside,a=>a.preventDefault())})}),D0=f.forwardRef((e,t)=>{const n=ct(en,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(bu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),bu=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=ct(en,n),l=f.useRef(null),u=he(t,l);return Jr(),d.jsxs(d.Fragment,{children:[d.jsx(nr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(En,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Qa(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(k0,{titleId:i.titleId}),d.jsx(N0,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Za="DialogTitle",wu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(Za,n);return d.jsx(ee.h2,{id:o.titleId,...r,ref:t})});wu.displayName=Za;var xu="DialogDescription",Su=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(xu,n);return d.jsx(ee.p,{id:o.descriptionId,...r,ref:t})});Su.displayName=xu;var Cu="DialogClose",Mu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(Cu,n);return d.jsx(ee.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});Mu.displayName=Cu;function Qa(e){return e?"open":"closed"}var Du="DialogTitleWarning",[aD,ku]=gh(Du,{contentName:en,titleName:Za,docsSlug:"dialog"}),k0=({titleId:e})=>{const t=ku(Du),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
158
+ `.trim(),w=C=>{!u&&s&&s(C)},S=C=>{C.stopPropagation(),!u&&a&&a(C)},D=r==="small"?12:r==="large"?18:14;return d.jsxs("div",{className:b,onClick:w,...c,children:[l&&d.jsx("div",{className:`rounded-full overflow-hidden ${r==="small"?"w-4 h-4":r==="large"?"w-6 h-6":"w-5 h-5"}`,children:typeof l=="string"?d.jsx("img",{src:l,alt:`Avatar for ${e}`,className:"w-full h-full object-cover"}):l}),i&&!l&&d.jsx("div",{className:"flex items-center",children:x.isValidElement(i)?x.cloneElement(i,{size:D}):i}),d.jsx("span",{children:e}),o&&d.jsx("button",{onClick:S,className:`ml-1 rounded-full p-0.5 hover:bg-black hover:bg-opacity-10 transition-colors ${u?"cursor-not-allowed":"cursor-pointer"}`,disabled:u,children:d.jsx(kn,{size:D})})]})},e0={small:"h-8 text-sm",medium:"h-10",large:"h-12 text-base"},t0={white:"bg-white border-gray-300",grey:"bg-gray-100 border-gray-300"},lu=({size:e="medium",variant:t="white",placeholder:n="Search here",className:r,onChange:o,query:a=""})=>d.jsxs("div",{className:"relative",children:[d.jsx(ac,{strokeWidth:1.1,className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-900 h-5 w-5"}),d.jsx(nn,{placeholder:n,className:W("pl-12 rounded-full",e0[e],t0[t],r),onChange:o,value:a})]}),n0=[{value:"all",label:"All Categories"},{value:"electronics",label:"Electronics"},{value:"clothing",label:"Clothing"},{value:"books",label:"Books"}],r0=[{value:"newest",label:"Newest First"},{value:"oldest",label:"Oldest First"},{value:"name-asc",label:"Name A-Z"},{value:"name-desc",label:"Name Z-A"}],o0=({className:e,searchPlaceholder:t="Search...",categories:n=n0,sortOptions:r=r0,showDateFilter:o=!1,onSearch:a,onFilter:s,onClear:i,defaultFilters:l})=>{const[u,m]=x.useState({category:(l==null?void 0:l.category)??"",sort:(l==null?void 0:l.sort)??"",dateFrom:l==null?void 0:l.dateFrom,dateTo:l==null?void 0:l.dateTo}),[c,p]=x.useState(!1),[h,y]=x.useState(!1),[v,g]=x.useState(u.dateFrom??new Date),[b,w]=x.useState(u.dateTo??new Date),S=(N,M)=>{const E={...u,[N]:M};m(E),s==null||s(E)},D=()=>{m({category:"",sort:"",dateFrom:void 0,dateTo:void 0}),i==null||i()},C=Object.values(u).some(N=>N!==""&&N!==void 0);return d.jsxs("div",{className:W("space-y-4",e),children:[d.jsx(lu,{size:"medium",placeholder:t,onChange:N=>a==null?void 0:a(N.target.value)}),d.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(oh,{className:"h-4 w-4 text-gray-500"}),d.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Filters:"})]}),d.jsx(Sn,{placeholder:"Category",options:n,onValueChange:N=>S("category",N),className:"min-w-[140px]"}),d.jsx(Sn,{placeholder:"Sort by",options:r,onValueChange:N=>S("sort",N),className:"min-w-[140px]"}),o&&d.jsxs(d.Fragment,{children:[d.jsx(Ur,{placeholder:"From date",value:u.dateFrom,onSelect:N=>{S("dateFrom",N),g(N??v)},className:"min-w-[140px]",open:c,onOpenChange:p,month:v,onMonthChange:g}),d.jsx(Ur,{placeholder:"To date",value:u.dateTo,onSelect:N=>{S("dateTo",N),w(N??b)},className:"min-w-[140px]",open:h,onOpenChange:y,month:b,onMonthChange:w})]}),C&&d.jsxs(Dt,{variant:"outline",size:"small",onClick:D,className:"flex items-center gap-1",children:[d.jsx(kn,{className:"h-3 w-3"}),"Clear"]})]})]})},a0=[{value:"personal",label:"Personal Account"},{value:"business",label:"Business Account"},{value:"developer",label:"Developer Account"}];function s0({className:e,showDateOfBirth:t=!0,accountTypes:n=a0,onValueChange:r}){const[o,a]=x.useState(),[s,i]=x.useState(!1),[l,u]=x.useState(!1),[m,c]=x.useState(!1),[p,h]=x.useState(o??new Date),[y,v]=x.useState(""),[g,b]=x.useState("");return d.jsxs("div",{className:W("space-y-4",e),children:[d.jsx(Qe,{label:"Username",placeholder:"Choose a username",helperText:"Must be at least 3 characters long",required:!0,onChange:w=>r==null?void 0:r("username",w.target.value)}),d.jsx(Qe,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:d.jsx(oc,{className:"h-4 w-4"}),required:!0,onChange:w=>r==null?void 0:r("email",w.target.value)}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsx(ra,{label:"Password",helperText:"Must be at least 8 characters",required:!0,value:y,onChange:w=>{v(w),r==null||r("password",w)},showPassword:s,onShowPasswordChange:i}),d.jsx(ra,{label:"Confirm Password",placeholder:"Confirm your password",required:!0,value:g,onChange:w=>{b(w),r==null||r("confirmPassword",w)},showPassword:l,onShowPasswordChange:u})]}),d.jsx(Sn,{label:"Account Type",placeholder:"Select account type",options:n,leadingIcon:d.jsx(ph,{className:"h-4 w-4"}),required:!0,onValueChange:w=>r==null?void 0:r("accountType",w)}),t&&d.jsx(Ur,{label:"Date of Birth",placeholder:"Select your birth date",helperText:"Must be 18 or older",value:o,maxDate:new Date,onSelect:w=>{a(w),h(w??p),w&&(r==null||r("dateOfBirth",w))},open:m,onOpenChange:c,month:p,onMonthChange:h})]})}const i0=[{value:"us",label:"United States"},{value:"ca",label:"Canada"},{value:"uk",label:"United Kingdom"},{value:"au",label:"Australia"},{value:"de",label:"Germany"},{value:"fr",label:"France"}];function c0({className:e,countries:t=i0,onValueChange:n}){return d.jsxs("div",{className:W("space-y-4",e),children:[d.jsx(Qe,{label:"Street Address",placeholder:"Enter street address",required:!0,onChange:r=>n==null?void 0:n("streetAddress",r.target.value)}),d.jsx(Qe,{label:"Apartment, suite, etc.",placeholder:"Apartment, suite, etc. (optional)",onChange:r=>n==null?void 0:n("addressLine2",r.target.value)}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[d.jsx(Qe,{label:"City",placeholder:"Enter city",required:!0,onChange:r=>n==null?void 0:n("city",r.target.value)}),d.jsx(Qe,{label:"State/Province",placeholder:"Enter state",required:!0,onChange:r=>n==null?void 0:n("state",r.target.value)}),d.jsx(Qe,{label:"ZIP/Postal Code",placeholder:"Enter ZIP code",required:!0,onChange:r=>n==null?void 0:n("zipCode",r.target.value)})]}),d.jsx(Sn,{label:"Country",placeholder:"Select country",options:t,leadingIcon:d.jsx(ih,{className:"h-4 w-4"}),required:!0,onValueChange:r=>n==null?void 0:n("country",r)})]})}const l0=[{value:"sales",label:"Sales"},{value:"support",label:"Support"},{value:"general",label:"General Inquiry"}];function u0({className:e,showDepartment:t=!0,departmentOptions:n=l0,onValueChange:r}){return d.jsxs("div",{className:W("space-y-4",e),children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsx(Qe,{label:"First Name",placeholder:"Enter first name",required:!0,onChange:o=>r==null?void 0:r("firstName",o.target.value)}),d.jsx(Qe,{label:"Last Name",placeholder:"Enter last name",required:!0,onChange:o=>r==null?void 0:r("lastName",o.target.value)})]}),d.jsx(Qe,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:d.jsx(oc,{className:"h-4 w-4"}),required:!0,onChange:o=>r==null?void 0:r("email",o.target.value)}),d.jsx(Qe,{label:"Phone Number",type:"tel",placeholder:"+1 (555) 000-0000",icon:d.jsx(dh,{className:"h-4 w-4"}),onChange:o=>r==null?void 0:r("phone",o.target.value)}),t&&d.jsx(Sn,{label:"Department",placeholder:"Select department",options:n,leadingIcon:d.jsx(zp,{className:"h-4 w-4"}),onValueChange:o=>r==null?void 0:r("department",o)}),d.jsx(Ra,{label:"Message",placeholder:"How can we help you?",required:!0,onChange:o=>r==null?void 0:r("message",o.target.value)})]})}var wi=1,d0=.9,f0=.8,m0=.17,Ho=.1,zo=.999,p0=.9999,h0=.99,g0=/[\\\/_+.#"@\[\(\{&]/,v0=/[\\\/_+.#"@\[\(\{&]/g,y0=/[\s-]/,uu=/[\s-]/g;function va(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?wi:h0;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),u=n.indexOf(l,o),m=0,c,p,h,y;u>=0;)c=va(e,t,n,r,u+1,a+1,s),c>m&&(u===o?c*=wi:g0.test(e.charAt(u-1))?(c*=f0,h=e.slice(o,u-1).match(v0),h&&o>0&&(c*=Math.pow(zo,h.length))):y0.test(e.charAt(u-1))?(c*=d0,y=e.slice(o,u-1).match(uu),y&&o>0&&(c*=Math.pow(zo,y.length))):(c*=m0,o>0&&(c*=Math.pow(zo,u-o))),e.charAt(u)!==t.charAt(a)&&(c*=p0)),(c<Ho&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=va(e,t,n,r,u+1,a+2,s),p*Ho>c&&(c=p*Ho)),c>m&&(m=c),u=n.indexOf(l,u+1);return s[i]=m,m}function xi(e){return e.toLowerCase().replace(uu," ")}function b0(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,va(e,t,xi(e),xi(t),0,0,{})}var po="Dialog",[du,oD]=Be(po),[w0,ct]=du(po),fu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),l=f.useRef(null),[u,m]=tt({prop:r,defaultProp:o??!1,onChange:a,caller:po});return d.jsx(w0,{scope:t,triggerRef:i,contentRef:l,contentId:ke(),titleId:ke(),descriptionId:ke(),open:u,onOpenChange:m,onOpenToggle:f.useCallback(()=>m(c=>!c),[m]),modal:s,children:n})};fu.displayName=po;var mu="DialogTrigger",pu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(mu,n),a=he(t,o.triggerRef);return d.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Qa(o.open),...r,ref:a,onClick:K(e.onClick,o.onOpenToggle)})});pu.displayName=mu;var Xa="DialogPortal",[x0,hu]=du(Xa,{forceMount:void 0}),gu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ct(Xa,t);return d.jsx(x0,{scope:t,forceMount:n,children:f.Children.map(r,s=>d.jsx(ze,{present:n||a.open,children:d.jsx(sr,{asChild:!0,container:o,children:s})}))})};gu.displayName=Xa;var qr="DialogOverlay",vu=f.forwardRef((e,t)=>{const n=hu(qr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ct(qr,e.__scopeDialog);return a.modal?d.jsx(ze,{present:r||a.open,children:d.jsx(C0,{...o,ref:t})}):null});vu.displayName=qr;var S0=It("DialogOverlay.RemoveScroll"),C0=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(qr,n);return d.jsx(ir,{as:S0,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(ee.div,{"data-state":Qa(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),en="DialogContent",yu=f.forwardRef((e,t)=>{const n=hu(en,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ct(en,e.__scopeDialog);return d.jsx(ze,{present:r||a.open,children:a.modal?d.jsx(M0,{...o,ref:t}):d.jsx(D0,{...o,ref:t})})});yu.displayName=en;var M0=f.forwardRef((e,t)=>{const n=ct(en,e.__scopeDialog),r=f.useRef(null),o=he(t,n.contentRef,r);return f.useEffect(()=>{const a=r.current;if(a)return ao(a)},[]),d.jsx(bu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:K(e.onFocusOutside,a=>a.preventDefault())})}),D0=f.forwardRef((e,t)=>{const n=ct(en,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(bu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),bu=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=ct(en,n),l=f.useRef(null),u=he(t,l);return Jr(),d.jsxs(d.Fragment,{children:[d.jsx(nr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(En,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Qa(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(k0,{titleId:i.titleId}),d.jsx(N0,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Za="DialogTitle",wu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(Za,n);return d.jsx(ee.h2,{id:o.titleId,...r,ref:t})});wu.displayName=Za;var xu="DialogDescription",Su=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(xu,n);return d.jsx(ee.p,{id:o.descriptionId,...r,ref:t})});Su.displayName=xu;var Cu="DialogClose",Mu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(Cu,n);return d.jsx(ee.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});Mu.displayName=Cu;function Qa(e){return e?"open":"closed"}var Du="DialogTitleWarning",[aD,ku]=gh(Du,{contentName:en,titleName:Za,docsSlug:"dialog"}),k0=({titleId:e})=>{const t=ku(Du),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
159
159
 
160
160
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
161
161
 
162
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},E0="DialogDescriptionWarning",N0=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ku(E0).contentName}}.`;return f.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ja=fu,Eu=pu,es=gu,ho=vu,go=yu,ts=wu,ns=Su,rs=Mu,Fn='[cmdk-group=""]',Go='[cmdk-group-items=""]',R0='[cmdk-group-heading=""]',Nu='[cmdk-item=""]',Si=`${Nu}:not([aria-disabled="true"])`,ya="cmdk-item-select",hn="data-value",T0=(e,t,n)=>b0(e,t,n),Ru=f.createContext(void 0),mr=()=>f.useContext(Ru),Tu=f.createContext(void 0),os=()=>f.useContext(Tu),_u=f.createContext(void 0),Ou=f.forwardRef((e,t)=>{let n=gn(()=>{var O,j;return{search:"",value:(j=(O=e.value)!=null?O:e.defaultValue)!=null?j:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=gn(()=>new Set),o=gn(()=>new Map),a=gn(()=>new Map),s=gn(()=>new Set),i=Pu(e),{label:l,children:u,value:m,onValueChange:c,filter:p,shouldFilter:h,loop:y,disablePointerSelection:v=!1,vimBindings:g=!0,...b}=e,w=ke(),S=ke(),D=ke(),C=f.useRef(null),R=B0();tn(()=>{if(m!==void 0){let O=m.trim();n.current.value=O,M.emit()}},[m]),tn(()=>{R(6,A)},[]);let M=f.useMemo(()=>({subscribe:O=>(s.current.add(O),()=>s.current.delete(O)),snapshot:()=>n.current,setState:(O,j,Y)=>{var G,V,F,Z;if(!Object.is(n.current[O],j)){if(n.current[O]=j,O==="search")q(),B(),R(1,L);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(D);X?X.focus():(G=document.getElementById(w))==null||G.focus()}if(R(7,()=>{var X;n.current.selectedItemId=(X=T())==null?void 0:X.id,M.emit()}),Y||R(5,A),((V=i.current)==null?void 0:V.value)!==void 0){let X=j??"";(Z=(F=i.current).onValueChange)==null||Z.call(F,X);return}}M.emit()}},emit:()=>{s.current.forEach(O=>O())}}),[]),E=f.useMemo(()=>({value:(O,j,Y)=>{var G;j!==((G=a.current.get(O))==null?void 0:G.value)&&(a.current.set(O,{value:j,keywords:Y}),n.current.filtered.items.set(O,$(j,Y)),R(2,()=>{B(),M.emit()}))},item:(O,j)=>(r.current.add(O),j&&(o.current.has(j)?o.current.get(j).add(O):o.current.set(j,new Set([O]))),R(3,()=>{q(),B(),n.current.value||L(),M.emit()}),()=>{a.current.delete(O),r.current.delete(O),n.current.filtered.items.delete(O);let Y=T();R(4,()=>{q(),(Y==null?void 0:Y.getAttribute("id"))===O&&L(),M.emit()})}),group:O=>(o.current.has(O)||o.current.set(O,new Set),()=>{a.current.delete(O),o.current.delete(O)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:w,inputId:D,labelId:S,listInnerRef:C}),[]);function $(O,j){var Y,G;let V=(G=(Y=i.current)==null?void 0:Y.filter)!=null?G:T0;return O?V(O,n.current.search,j):0}function B(){if(!n.current.search||i.current.shouldFilter===!1)return;let O=n.current.filtered.items,j=[];n.current.filtered.groups.forEach(G=>{let V=o.current.get(G),F=0;V.forEach(Z=>{let X=O.get(Z);F=Math.max(X,F)}),j.push([G,F])});let Y=C.current;_().sort((G,V)=>{var F,Z;let X=G.getAttribute("id"),Q=V.getAttribute("id");return((F=O.get(Q))!=null?F:0)-((Z=O.get(X))!=null?Z:0)}).forEach(G=>{let V=G.closest(Go);V?V.appendChild(G.parentElement===V?G:G.closest(`${Go} > *`)):Y.appendChild(G.parentElement===Y?G:G.closest(`${Go} > *`))}),j.sort((G,V)=>V[1]-G[1]).forEach(G=>{var V;let F=(V=C.current)==null?void 0:V.querySelector(`${Fn}[${hn}="${encodeURIComponent(G[0])}"]`);F==null||F.parentElement.appendChild(F)})}function L(){let O=_().find(Y=>Y.getAttribute("aria-disabled")!=="true"),j=O==null?void 0:O.getAttribute(hn);M.setState("value",j||void 0)}function q(){var O,j,Y,G;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let V=0;for(let F of r.current){let Z=(j=(O=a.current.get(F))==null?void 0:O.value)!=null?j:"",X=(G=(Y=a.current.get(F))==null?void 0:Y.keywords)!=null?G:[],Q=$(Z,X);n.current.filtered.items.set(F,Q),Q>0&&V++}for(let[F,Z]of o.current)for(let X of Z)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(F);break}n.current.filtered.count=V}function A(){var O,j,Y;let G=T();G&&(((O=G.parentElement)==null?void 0:O.firstChild)===G&&((Y=(j=G.closest(Fn))==null?void 0:j.querySelector(R0))==null||Y.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function T(){var O;return(O=C.current)==null?void 0:O.querySelector(`${Nu}[aria-selected="true"]`)}function _(){var O;return Array.from(((O=C.current)==null?void 0:O.querySelectorAll(Si))||[])}function N(O){let j=_()[O];j&&M.setState("value",j.getAttribute(hn))}function I(O){var j;let Y=T(),G=_(),V=G.findIndex(Z=>Z===Y),F=G[V+O];(j=i.current)!=null&&j.loop&&(F=V+O<0?G[G.length-1]:V+O===G.length?G[0]:G[V+O]),F&&M.setState("value",F.getAttribute(hn))}function k(O){let j=T(),Y=j==null?void 0:j.closest(Fn),G;for(;Y&&!G;)Y=O>0?F0(Y,Fn):W0(Y,Fn),G=Y==null?void 0:Y.querySelector(Si);G?M.setState("value",G.getAttribute(hn)):I(O)}let P=()=>N(_().length-1),H=O=>{O.preventDefault(),O.metaKey?P():O.altKey?k(1):I(1)},z=O=>{O.preventDefault(),O.metaKey?N(0):O.altKey?k(-1):I(-1)};return f.createElement(ee.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:O=>{var j;(j=b.onKeyDown)==null||j.call(b,O);let Y=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||Y))switch(O.key){case"n":case"j":{g&&O.ctrlKey&&H(O);break}case"ArrowDown":{H(O);break}case"p":case"k":{g&&O.ctrlKey&&z(O);break}case"ArrowUp":{z(O);break}case"Home":{O.preventDefault(),N(0);break}case"End":{O.preventDefault(),P();break}case"Enter":{O.preventDefault();let G=T();if(G){let V=new Event(ya);G.dispatchEvent(V)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:H0},l),vo(e,O=>f.createElement(Tu.Provider,{value:M},f.createElement(Ru.Provider,{value:E},O))))}),_0=f.forwardRef((e,t)=>{var n,r;let o=ke(),a=f.useRef(null),s=f.useContext(_u),i=mr(),l=Pu(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;tn(()=>{if(!u)return i.item(o,s==null?void 0:s.id)},[u]);let m=Au(o,a,[e.value,e.children,a],e.keywords),c=os(),p=Lt(R=>R.value&&R.value===m.current),h=Lt(R=>u||i.filter()===!1?!0:R.search?R.filtered.items.get(o)>0:!0);f.useEffect(()=>{let R=a.current;if(!(!R||e.disabled))return R.addEventListener(ya,y),()=>R.removeEventListener(ya,y)},[h,e.onSelect,e.disabled]);function y(){var R,M;v(),(M=(R=l.current).onSelect)==null||M.call(R,m.current)}function v(){c.setState("value",m.current,!0)}if(!h)return null;let{disabled:g,value:b,onSelect:w,forceMount:S,keywords:D,...C}=e;return f.createElement(ee.div,{ref:Mt(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!p,"data-disabled":!!g,"data-selected":!!p,onPointerMove:g||i.getDisablePointerSelection()?void 0:v,onClick:g?void 0:y},e.children)}),O0=f.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=ke(),i=f.useRef(null),l=f.useRef(null),u=ke(),m=mr(),c=Lt(h=>o||m.filter()===!1?!0:h.search?h.filtered.groups.has(s):!0);tn(()=>m.group(s),[]),Au(s,i,[e.value,e.heading,l]);let p=f.useMemo(()=>({id:s,forceMount:o}),[o]);return f.createElement(ee.div,{ref:Mt(i,t),...a,"cmdk-group":"",role:"presentation",hidden:c?void 0:!0},n&&f.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),vo(e,h=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},f.createElement(_u.Provider,{value:p},h))))}),P0=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=Lt(s=>!s.search);return!n&&!a?null:f.createElement(ee.div,{ref:Mt(o,t),...r,"cmdk-separator":"",role:"separator"})}),A0=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=os(),s=Lt(u=>u.search),i=Lt(u=>u.selectedItemId),l=mr();return f.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),f.createElement(ee.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),I0=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),s=f.useRef(null),i=Lt(u=>u.selectedItemId),l=mr();return f.useEffect(()=>{if(s.current&&a.current){let u=s.current,m=a.current,c,p=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let h=u.offsetHeight;m.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(c),p.unobserve(u)}}},[]),f.createElement(ee.div,{ref:Mt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},vo(e,u=>f.createElement("div",{ref:Mt(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),j0=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return f.createElement(Ja,{open:n,onOpenChange:r},f.createElement(es,{container:s},f.createElement(ho,{"cmdk-overlay":"",className:o}),f.createElement(go,{"aria-label":e.label,"cmdk-dialog":"",className:a},f.createElement(Ou,{ref:t,...i}))))}),$0=f.forwardRef((e,t)=>Lt(n=>n.filtered.count===0)?f.createElement(ee.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),L0=f.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return f.createElement(ee.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},vo(e,s=>f.createElement("div",{"aria-hidden":!0},s)))}),Le=Object.assign(Ou,{List:I0,Item:_0,Input:A0,Group:O0,Separator:P0,Dialog:j0,Empty:$0,Loading:L0});function F0(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function W0(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Pu(e){let t=f.useRef(e);return tn(()=>{t.current=e}),t}var tn=typeof window>"u"?f.useEffect:f.useLayoutEffect;function gn(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function Lt(e){let t=os(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function Au(e,t,n,r=[]){let o=f.useRef(),a=mr();return tn(()=>{var s;let i=(()=>{var u;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(u=m.current.textContent)==null?void 0:u.trim():o.current}})(),l=r.map(u=>u.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(hn,i),o.current=i}),o}var B0=()=>{let[e,t]=f.useState(),n=gn(()=>new Map);return tn(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Y0(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function vo({asChild:e,children:t},n){return e&&f.isValidElement(t)?f.cloneElement(Y0(t),{ref:t.ref},n(t.props.children)):n(t)}var H0={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const z0=Ja,G0=Eu,U0=es,q0=rs,Iu=f.forwardRef(({className:e,...t},n)=>d.jsx(ho,{ref:n,className:W("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Iu.displayName=ho.displayName;const ju=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(U0,{children:[d.jsx(Iu,{}),d.jsxs(go,{ref:r,className:W("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,d.jsxs(rs,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(kn,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ju.displayName=go.displayName;const $u=({className:e,...t})=>d.jsx("div",{className:W("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});$u.displayName="DialogHeader";const Lu=({className:e,...t})=>d.jsx("div",{className:W("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Lu.displayName="DialogFooter";const Fu=f.forwardRef(({className:e,...t},n)=>d.jsx(ts,{ref:n,className:W("text-lg font-semibold leading-none tracking-tight",e),...t}));Fu.displayName=ts.displayName;const Wu=f.forwardRef(({className:e,...t},n)=>d.jsx(ns,{ref:n,className:W("text-sm text-muted-foreground",e),...t}));Wu.displayName=ns.displayName;const V0=f.forwardRef(({className:e,...t},n)=>d.jsx(Le,{ref:n,className:W("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));V0.displayName=Le.displayName;const Bu=f.forwardRef(({className:e,...t},n)=>d.jsxs("div",{className:"flex items-center h-auto px-3","cmdk-input-wrapper":"",children:[d.jsx(ac,{strokeWidth:1.25,className:"mr-2 h-4 w-4 shrink-0"}),d.jsx(Le.Input,{ref:n,className:W("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-gray-400 disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Bu.displayName=Le.Input.displayName;const Yu=f.forwardRef(({className:e,...t},n)=>d.jsx(Le.List,{ref:n,className:W("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Yu.displayName=Le.List.displayName;const K0=f.forwardRef((e,t)=>d.jsx(Le.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));K0.displayName=Le.Empty.displayName;const Hu=f.forwardRef(({className:e,...t},n)=>d.jsx(Le.Group,{ref:n,className:W("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Hu.displayName=Le.Group.displayName;const X0=f.forwardRef(({className:e,...t},n)=>d.jsx(Le.Separator,{ref:n,className:W("-mx-1 h-px bg-border",e),...t}));X0.displayName=Le.Separator.displayName;const zu=f.forwardRef(({className:e,...t},n)=>d.jsx(Le.Item,{ref:n,className:W("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));zu.displayName=Le.Item.displayName;function Z0({className:e,...t}){return d.jsx("div",{className:W("animate-pulse rounded-md bg-muted",e),...t})}function Q0(e="medium",t="white"){const n={small:"text-sm py-1 px-2 h-8",medium:"text-base py-2 px-3 h-10",large:"text-lg py-3 px-4 h-12"},r={white:"bg-background text-foreground border-border",grey:"bg-muted text-muted-foreground border-border"};return{sizeClasses:n[e],variantClasses:r[t],combined:`${n[e]} ${r[t]}`}}const J0=({options:e,placeholder:t,emptyMessage:n,value:r,onValueChange:o,disabled:a,isLoading:s=!1,className:i,size:l,variant:u})=>{const{variantClasses:m,combined:c}=Q0(l,u),p=x.useRef(null),[h,y]=x.useState(!1),[v,g]=x.useState(r),[b,w]=x.useState((r==null?void 0:r.label)||""),S=x.useCallback(R=>{const M=p.current;if(M){if(h||y(!0),R.key==="Enter"&&M.value!==""){const E=e.find($=>$.label===M.value);E&&(g(E),o==null||o(E))}R.key==="Escape"&&M.blur()}},[h,e,o]),D=x.useCallback(()=>{y(!1),w((v==null?void 0:v.label)||"")},[v]),C=x.useCallback(R=>{w(R.label),g(R),o==null||o(R),setTimeout(()=>{var M;(M=p==null?void 0:p.current)==null||M.blur()},0)},[o]);return d.jsxs(Le,{onKeyDown:S,children:[d.jsxs("div",{className:W("rounded-full border bg-gray-100",m,i),children:[" ",d.jsx(Bu,{ref:p,value:b,onValueChange:s?void 0:w,onBlur:D,onFocus:()=>y(!0),placeholder:t,disabled:a,className:c})]}),d.jsx("div",{className:"relative mt-1",children:d.jsx("div",{className:W("animate-in fade-in-0 zoom-in-95 absolute top-0 z-10 w-full rounded-xl bg-white dark:bg-gray-800 outline-none",h?"block":"hidden",i),children:d.jsxs(Yu,{className:"rounded-lg ring-1 ring-slate-200 dark:ring-gray-700",children:[s?d.jsx(Le.Loading,{children:d.jsx("div",{className:"p-1",children:d.jsx(Z0,{className:"h-8 w-full"})})}):null,e.length>0&&!s?d.jsx(Hu,{children:e.map(R=>{const M=(v==null?void 0:v.value)===R.value;return d.jsxs(zu,{value:R.label,onMouseDown:E=>{E.preventDefault(),E.stopPropagation()},onSelect:()=>C(R),className:W("flex w-full items-center gap-2 dark:text-white",M?null:"pl-8"),children:[M?d.jsx(er,{className:"w-4"}):null,R.label]},R.value)})}):null,s?null:d.jsx(Le.Empty,{className:"select-none rounded-sm px-2 py-3 text-center text-sm dark:text-gray-400",children:n})]})})})]})},e1=Qr("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function t1({className:e,variant:t,...n}){return d.jsx("div",{className:W(e1({variant:t}),e),...n})}function n1({title:e,children:t,className:n}){return d.jsxs("section",{className:W("space-y-6",n),children:[d.jsx("div",{className:"border-b border-gray-200 pb-3",children:d.jsx("h2",{className:"text-sm font-semibold text-gray-900 tracking-wide uppercase",children:e})}),t]})}function r1({title:e,variant:t="primary",children:n,className:r}){return d.jsxs("div",{className:W("space-y-4",r),children:[d.jsx(t1,{variant:t==="primary"?"default":"secondary",className:W(t==="primary"&&"bg-black text-white hover:bg-black/90"),children:e}),n]})}const Gu=x.forwardRef(({className:e,label:t,helperText:n,error:r,startAdornment:o,endAdornment:a,required:s,id:i,onInput:l,...u},m)=>{const c=!!r,p=i||`currency-input-${Math.random().toString(36).substr(2,9)}`,h=y=>{var w;const v=y.currentTarget;let g=v.value;g=g.replace(/[^0-9.]/g,"");const b=g.split(".");b.length>2&&(g=b[0]+"."+b.slice(1).join("")),((w=b[1])==null?void 0:w.length)>2&&(g=b[0]+"."+b[1].substring(0,2)),v.value=g,l&&l(y)};return d.jsxs("div",{className:"flex flex-col space-y-1",children:[t&&d.jsxs("label",{htmlFor:p,className:"text-sm font-medium text-gray-700",children:[t,s&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs("div",{className:W("flex items-center h-10 w-full rounded-md border bg-background text-sm ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",c?"border-red-500 focus-within:ring-red-500":"border-input focus-within:ring-primary",e),children:[o&&d.jsx("span",{className:"px-3 text-sm text-muted-foreground",children:o}),d.jsx("input",{id:p,type:"text",inputMode:"decimal",pattern:"^\\d+(\\.\\d{0,2})?$",className:W("flex-1 px-3 py-2 rounded-md placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50",c?"focus:ring-red-500":"focus:ring-primary"),ref:m,onInput:h,...u}),a&&d.jsx("span",{className:"px-3 text-sm text-muted-foreground",children:a})]}),(n||r)&&d.jsx("span",{className:W("text-xs",c?"text-red-500":"text-muted-foreground"),children:r||n})]})});Gu.displayName="CurrencyInput";const Uu=x.memo(({className:e="",variant:t="default",children:n,...r})=>{const o={default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border-border bg-background hover:bg-accent hover:text-accent-foreground"};return d.jsx("div",{className:`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 ${o[t]} ${e}`,...r,children:n})});Uu.displayName="Badge";const o1={small:"h-8 text-xs px-2",medium:"h-10 text-sm px-3",large:"h-12 text-base px-4"},a1={outlined:"border border-input",filled:"border-0 bg-accent",standard:"border-0 border-b border-input rounded-none"},s1=e=>typeof e=="string"?e:(e==null?void 0:e.label)||"",i1=e=>typeof e=="string"?e:(e==null?void 0:e.value)||e,c1=(e,t,n)=>n(e)===n(t),l1=(e,t,n)=>{if(!t)return e;const r=t.toLowerCase();return e.filter(o=>n(o).toLowerCase().includes(r))},qu=e=>{const{option:t,index:n,isSelected:r,isHighlighted:o,onSelect:a,getOptionLabel:s,renderOption:i}=e,l=x.useCallback(()=>{a(t)},[t,a]);return d.jsx("div",{onClick:l,className:`
162
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},E0="DialogDescriptionWarning",N0=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ku(E0).contentName}}.`;return f.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ja=fu,Eu=pu,es=gu,ho=vu,go=yu,ts=wu,ns=Su,rs=Mu,Fn='[cmdk-group=""]',Go='[cmdk-group-items=""]',R0='[cmdk-group-heading=""]',Nu='[cmdk-item=""]',Si=`${Nu}:not([aria-disabled="true"])`,ya="cmdk-item-select",hn="data-value",T0=(e,t,n)=>b0(e,t,n),Ru=f.createContext(void 0),mr=()=>f.useContext(Ru),Tu=f.createContext(void 0),os=()=>f.useContext(Tu),_u=f.createContext(void 0),Ou=f.forwardRef((e,t)=>{let n=gn(()=>{var O,j;return{search:"",value:(j=(O=e.value)!=null?O:e.defaultValue)!=null?j:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=gn(()=>new Set),o=gn(()=>new Map),a=gn(()=>new Map),s=gn(()=>new Set),i=Pu(e),{label:l,children:u,value:m,onValueChange:c,filter:p,shouldFilter:h,loop:y,disablePointerSelection:v=!1,vimBindings:g=!0,...b}=e,w=ke(),S=ke(),D=ke(),C=f.useRef(null),N=B0();tn(()=>{if(m!==void 0){let O=m.trim();n.current.value=O,M.emit()}},[m]),tn(()=>{N(6,A)},[]);let M=f.useMemo(()=>({subscribe:O=>(s.current.add(O),()=>s.current.delete(O)),snapshot:()=>n.current,setState:(O,j,Y)=>{var G,V,F,Z;if(!Object.is(n.current[O],j)){if(n.current[O]=j,O==="search")q(),B(),N(1,L);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(D);X?X.focus():(G=document.getElementById(w))==null||G.focus()}if(N(7,()=>{var X;n.current.selectedItemId=(X=T())==null?void 0:X.id,M.emit()}),Y||N(5,A),((V=i.current)==null?void 0:V.value)!==void 0){let X=j??"";(Z=(F=i.current).onValueChange)==null||Z.call(F,X);return}}M.emit()}},emit:()=>{s.current.forEach(O=>O())}}),[]),E=f.useMemo(()=>({value:(O,j,Y)=>{var G;j!==((G=a.current.get(O))==null?void 0:G.value)&&(a.current.set(O,{value:j,keywords:Y}),n.current.filtered.items.set(O,$(j,Y)),N(2,()=>{B(),M.emit()}))},item:(O,j)=>(r.current.add(O),j&&(o.current.has(j)?o.current.get(j).add(O):o.current.set(j,new Set([O]))),N(3,()=>{q(),B(),n.current.value||L(),M.emit()}),()=>{a.current.delete(O),r.current.delete(O),n.current.filtered.items.delete(O);let Y=T();N(4,()=>{q(),(Y==null?void 0:Y.getAttribute("id"))===O&&L(),M.emit()})}),group:O=>(o.current.has(O)||o.current.set(O,new Set),()=>{a.current.delete(O),o.current.delete(O)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:w,inputId:D,labelId:S,listInnerRef:C}),[]);function $(O,j){var Y,G;let V=(G=(Y=i.current)==null?void 0:Y.filter)!=null?G:T0;return O?V(O,n.current.search,j):0}function B(){if(!n.current.search||i.current.shouldFilter===!1)return;let O=n.current.filtered.items,j=[];n.current.filtered.groups.forEach(G=>{let V=o.current.get(G),F=0;V.forEach(Z=>{let X=O.get(Z);F=Math.max(X,F)}),j.push([G,F])});let Y=C.current;_().sort((G,V)=>{var F,Z;let X=G.getAttribute("id"),Q=V.getAttribute("id");return((F=O.get(Q))!=null?F:0)-((Z=O.get(X))!=null?Z:0)}).forEach(G=>{let V=G.closest(Go);V?V.appendChild(G.parentElement===V?G:G.closest(`${Go} > *`)):Y.appendChild(G.parentElement===Y?G:G.closest(`${Go} > *`))}),j.sort((G,V)=>V[1]-G[1]).forEach(G=>{var V;let F=(V=C.current)==null?void 0:V.querySelector(`${Fn}[${hn}="${encodeURIComponent(G[0])}"]`);F==null||F.parentElement.appendChild(F)})}function L(){let O=_().find(Y=>Y.getAttribute("aria-disabled")!=="true"),j=O==null?void 0:O.getAttribute(hn);M.setState("value",j||void 0)}function q(){var O,j,Y,G;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let V=0;for(let F of r.current){let Z=(j=(O=a.current.get(F))==null?void 0:O.value)!=null?j:"",X=(G=(Y=a.current.get(F))==null?void 0:Y.keywords)!=null?G:[],Q=$(Z,X);n.current.filtered.items.set(F,Q),Q>0&&V++}for(let[F,Z]of o.current)for(let X of Z)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(F);break}n.current.filtered.count=V}function A(){var O,j,Y;let G=T();G&&(((O=G.parentElement)==null?void 0:O.firstChild)===G&&((Y=(j=G.closest(Fn))==null?void 0:j.querySelector(R0))==null||Y.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function T(){var O;return(O=C.current)==null?void 0:O.querySelector(`${Nu}[aria-selected="true"]`)}function _(){var O;return Array.from(((O=C.current)==null?void 0:O.querySelectorAll(Si))||[])}function R(O){let j=_()[O];j&&M.setState("value",j.getAttribute(hn))}function I(O){var j;let Y=T(),G=_(),V=G.findIndex(Z=>Z===Y),F=G[V+O];(j=i.current)!=null&&j.loop&&(F=V+O<0?G[G.length-1]:V+O===G.length?G[0]:G[V+O]),F&&M.setState("value",F.getAttribute(hn))}function k(O){let j=T(),Y=j==null?void 0:j.closest(Fn),G;for(;Y&&!G;)Y=O>0?F0(Y,Fn):W0(Y,Fn),G=Y==null?void 0:Y.querySelector(Si);G?M.setState("value",G.getAttribute(hn)):I(O)}let P=()=>R(_().length-1),H=O=>{O.preventDefault(),O.metaKey?P():O.altKey?k(1):I(1)},z=O=>{O.preventDefault(),O.metaKey?R(0):O.altKey?k(-1):I(-1)};return f.createElement(ee.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:O=>{var j;(j=b.onKeyDown)==null||j.call(b,O);let Y=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||Y))switch(O.key){case"n":case"j":{g&&O.ctrlKey&&H(O);break}case"ArrowDown":{H(O);break}case"p":case"k":{g&&O.ctrlKey&&z(O);break}case"ArrowUp":{z(O);break}case"Home":{O.preventDefault(),R(0);break}case"End":{O.preventDefault(),P();break}case"Enter":{O.preventDefault();let G=T();if(G){let V=new Event(ya);G.dispatchEvent(V)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:H0},l),vo(e,O=>f.createElement(Tu.Provider,{value:M},f.createElement(Ru.Provider,{value:E},O))))}),_0=f.forwardRef((e,t)=>{var n,r;let o=ke(),a=f.useRef(null),s=f.useContext(_u),i=mr(),l=Pu(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;tn(()=>{if(!u)return i.item(o,s==null?void 0:s.id)},[u]);let m=Au(o,a,[e.value,e.children,a],e.keywords),c=os(),p=Lt(N=>N.value&&N.value===m.current),h=Lt(N=>u||i.filter()===!1?!0:N.search?N.filtered.items.get(o)>0:!0);f.useEffect(()=>{let N=a.current;if(!(!N||e.disabled))return N.addEventListener(ya,y),()=>N.removeEventListener(ya,y)},[h,e.onSelect,e.disabled]);function y(){var N,M;v(),(M=(N=l.current).onSelect)==null||M.call(N,m.current)}function v(){c.setState("value",m.current,!0)}if(!h)return null;let{disabled:g,value:b,onSelect:w,forceMount:S,keywords:D,...C}=e;return f.createElement(ee.div,{ref:Mt(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!p,"data-disabled":!!g,"data-selected":!!p,onPointerMove:g||i.getDisablePointerSelection()?void 0:v,onClick:g?void 0:y},e.children)}),O0=f.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=ke(),i=f.useRef(null),l=f.useRef(null),u=ke(),m=mr(),c=Lt(h=>o||m.filter()===!1?!0:h.search?h.filtered.groups.has(s):!0);tn(()=>m.group(s),[]),Au(s,i,[e.value,e.heading,l]);let p=f.useMemo(()=>({id:s,forceMount:o}),[o]);return f.createElement(ee.div,{ref:Mt(i,t),...a,"cmdk-group":"",role:"presentation",hidden:c?void 0:!0},n&&f.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),vo(e,h=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},f.createElement(_u.Provider,{value:p},h))))}),P0=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=Lt(s=>!s.search);return!n&&!a?null:f.createElement(ee.div,{ref:Mt(o,t),...r,"cmdk-separator":"",role:"separator"})}),A0=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=os(),s=Lt(u=>u.search),i=Lt(u=>u.selectedItemId),l=mr();return f.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),f.createElement(ee.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),I0=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),s=f.useRef(null),i=Lt(u=>u.selectedItemId),l=mr();return f.useEffect(()=>{if(s.current&&a.current){let u=s.current,m=a.current,c,p=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let h=u.offsetHeight;m.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(c),p.unobserve(u)}}},[]),f.createElement(ee.div,{ref:Mt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},vo(e,u=>f.createElement("div",{ref:Mt(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),j0=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return f.createElement(Ja,{open:n,onOpenChange:r},f.createElement(es,{container:s},f.createElement(ho,{"cmdk-overlay":"",className:o}),f.createElement(go,{"aria-label":e.label,"cmdk-dialog":"",className:a},f.createElement(Ou,{ref:t,...i}))))}),$0=f.forwardRef((e,t)=>Lt(n=>n.filtered.count===0)?f.createElement(ee.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),L0=f.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return f.createElement(ee.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},vo(e,s=>f.createElement("div",{"aria-hidden":!0},s)))}),Le=Object.assign(Ou,{List:I0,Item:_0,Input:A0,Group:O0,Separator:P0,Dialog:j0,Empty:$0,Loading:L0});function F0(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function W0(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Pu(e){let t=f.useRef(e);return tn(()=>{t.current=e}),t}var tn=typeof window>"u"?f.useEffect:f.useLayoutEffect;function gn(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function Lt(e){let t=os(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function Au(e,t,n,r=[]){let o=f.useRef(),a=mr();return tn(()=>{var s;let i=(()=>{var u;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(u=m.current.textContent)==null?void 0:u.trim():o.current}})(),l=r.map(u=>u.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(hn,i),o.current=i}),o}var B0=()=>{let[e,t]=f.useState(),n=gn(()=>new Map);return tn(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Y0(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function vo({asChild:e,children:t},n){return e&&f.isValidElement(t)?f.cloneElement(Y0(t),{ref:t.ref},n(t.props.children)):n(t)}var H0={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const z0=Ja,G0=Eu,U0=es,q0=rs,Iu=f.forwardRef(({className:e,...t},n)=>d.jsx(ho,{ref:n,className:W("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Iu.displayName=ho.displayName;const ju=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(U0,{children:[d.jsx(Iu,{}),d.jsxs(go,{ref:r,className:W("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,d.jsxs(rs,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(kn,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ju.displayName=go.displayName;const $u=({className:e,...t})=>d.jsx("div",{className:W("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});$u.displayName="DialogHeader";const Lu=({className:e,...t})=>d.jsx("div",{className:W("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Lu.displayName="DialogFooter";const Fu=f.forwardRef(({className:e,...t},n)=>d.jsx(ts,{ref:n,className:W("text-lg font-semibold leading-none tracking-tight",e),...t}));Fu.displayName=ts.displayName;const Wu=f.forwardRef(({className:e,...t},n)=>d.jsx(ns,{ref:n,className:W("text-sm text-muted-foreground",e),...t}));Wu.displayName=ns.displayName;const V0=f.forwardRef(({className:e,...t},n)=>d.jsx(Le,{ref:n,className:W("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));V0.displayName=Le.displayName;const Bu=f.forwardRef(({className:e,...t},n)=>d.jsxs("div",{className:"flex items-center h-auto px-3","cmdk-input-wrapper":"",children:[d.jsx(ac,{strokeWidth:1.25,className:"mr-2 h-4 w-4 shrink-0"}),d.jsx(Le.Input,{ref:n,className:W("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-gray-400 disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Bu.displayName=Le.Input.displayName;const Yu=f.forwardRef(({className:e,...t},n)=>d.jsx(Le.List,{ref:n,className:W("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Yu.displayName=Le.List.displayName;const K0=f.forwardRef((e,t)=>d.jsx(Le.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));K0.displayName=Le.Empty.displayName;const Hu=f.forwardRef(({className:e,...t},n)=>d.jsx(Le.Group,{ref:n,className:W("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Hu.displayName=Le.Group.displayName;const X0=f.forwardRef(({className:e,...t},n)=>d.jsx(Le.Separator,{ref:n,className:W("-mx-1 h-px bg-border",e),...t}));X0.displayName=Le.Separator.displayName;const zu=f.forwardRef(({className:e,...t},n)=>d.jsx(Le.Item,{ref:n,className:W("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));zu.displayName=Le.Item.displayName;function Z0({className:e,...t}){return d.jsx("div",{className:W("animate-pulse rounded-md bg-muted",e),...t})}function Q0(e="medium",t="white"){const n={small:"text-sm py-1 px-2 h-8",medium:"text-base py-2 px-3 h-10",large:"text-lg py-3 px-4 h-12"},r={white:"bg-background text-foreground border-border",grey:"bg-muted text-muted-foreground border-border"};return{sizeClasses:n[e],variantClasses:r[t],combined:`${n[e]} ${r[t]}`}}const J0=({options:e,placeholder:t,emptyMessage:n,value:r,onValueChange:o,disabled:a,isLoading:s=!1,className:i,size:l,variant:u})=>{const{variantClasses:m,combined:c}=Q0(l,u),p=x.useRef(null),[h,y]=x.useState(!1),[v,g]=x.useState(r),[b,w]=x.useState((r==null?void 0:r.label)||""),S=x.useCallback(N=>{const M=p.current;if(M){if(h||y(!0),N.key==="Enter"&&M.value!==""){const E=e.find($=>$.label===M.value);E&&(g(E),o==null||o(E))}N.key==="Escape"&&M.blur()}},[h,e,o]),D=x.useCallback(()=>{y(!1),w((v==null?void 0:v.label)||"")},[v]),C=x.useCallback(N=>{w(N.label),g(N),o==null||o(N),setTimeout(()=>{var M;(M=p==null?void 0:p.current)==null||M.blur()},0)},[o]);return d.jsxs(Le,{onKeyDown:S,children:[d.jsxs("div",{className:W("rounded-full border bg-gray-100",m,i),children:[" ",d.jsx(Bu,{ref:p,value:b,onValueChange:s?void 0:w,onBlur:D,onFocus:()=>y(!0),placeholder:t,disabled:a,className:c})]}),d.jsx("div",{className:"relative mt-1",children:d.jsx("div",{className:W("animate-in fade-in-0 zoom-in-95 absolute top-0 z-10 w-full rounded-xl bg-white dark:bg-gray-800 outline-none",h?"block":"hidden",i),children:d.jsxs(Yu,{className:"rounded-lg ring-1 ring-slate-200 dark:ring-gray-700",children:[s?d.jsx(Le.Loading,{children:d.jsx("div",{className:"p-1",children:d.jsx(Z0,{className:"h-8 w-full"})})}):null,e.length>0&&!s?d.jsx(Hu,{children:e.map(N=>{const M=(v==null?void 0:v.value)===N.value;return d.jsxs(zu,{value:N.label,onMouseDown:E=>{E.preventDefault(),E.stopPropagation()},onSelect:()=>C(N),className:W("flex w-full items-center gap-2 dark:text-white",M?null:"pl-8"),children:[M?d.jsx(er,{className:"w-4"}):null,N.label]},N.value)})}):null,s?null:d.jsx(Le.Empty,{className:"select-none rounded-sm px-2 py-3 text-center text-sm dark:text-gray-400",children:n})]})})})]})},e1=Qr("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function t1({className:e,variant:t,...n}){return d.jsx("div",{className:W(e1({variant:t}),e),...n})}function n1({title:e,children:t,className:n}){return d.jsxs("section",{className:W("space-y-6",n),children:[d.jsx("div",{className:"border-b border-gray-200 pb-3",children:d.jsx("h2",{className:"text-sm font-semibold text-gray-900 tracking-wide uppercase",children:e})}),t]})}function r1({title:e,variant:t="primary",children:n,className:r}){return d.jsxs("div",{className:W("space-y-4",r),children:[d.jsx(t1,{variant:t==="primary"?"default":"secondary",className:W(t==="primary"&&"bg-black text-white hover:bg-black/90"),children:e}),n]})}const Gu=x.forwardRef(({className:e,label:t,helperText:n,error:r,startAdornment:o,endAdornment:a,required:s,id:i,onInput:l,...u},m)=>{const c=!!r,p=i||`currency-input-${Math.random().toString(36).substr(2,9)}`,h=y=>{var w;const v=y.currentTarget;let g=v.value;g=g.replace(/[^0-9.]/g,"");const b=g.split(".");b.length>2&&(g=b[0]+"."+b.slice(1).join("")),((w=b[1])==null?void 0:w.length)>2&&(g=b[0]+"."+b[1].substring(0,2)),v.value=g,l&&l(y)};return d.jsxs("div",{className:"flex flex-col space-y-1",children:[t&&d.jsxs("label",{htmlFor:p,className:"text-sm font-medium text-gray-700",children:[t,s&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs("div",{className:W("flex items-center h-10 w-full rounded-md border bg-background text-sm ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",c?"border-red-500 focus-within:ring-red-500":"border-input focus-within:ring-primary",e),children:[o&&d.jsx("span",{className:"px-3 text-sm text-muted-foreground",children:o}),d.jsx("input",{id:p,type:"text",inputMode:"decimal",pattern:"^\\d+(\\.\\d{0,2})?$",className:W("flex-1 px-3 py-2 rounded-md placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50",c?"focus:ring-red-500":"focus:ring-primary"),ref:m,onInput:h,...u}),a&&d.jsx("span",{className:"px-3 text-sm text-muted-foreground",children:a})]}),(n||r)&&d.jsx("span",{className:W("text-xs",c?"text-red-500":"text-muted-foreground"),children:r||n})]})});Gu.displayName="CurrencyInput";const Uu=x.memo(({className:e="",variant:t="default",children:n,...r})=>{const o={default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border-border bg-background hover:bg-accent hover:text-accent-foreground"};return d.jsx("div",{className:`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 ${o[t]} ${e}`,...r,children:n})});Uu.displayName="Badge";const o1={small:"h-8 text-xs px-2",medium:"h-10 text-sm px-3",large:"h-12 text-base px-4"},a1={outlined:"border border-input",filled:"border-0 bg-accent",standard:"border-0 border-b border-input rounded-none"},s1=e=>typeof e=="string"?e:(e==null?void 0:e.label)||"",i1=e=>typeof e=="string"?e:(e==null?void 0:e.value)||e,c1=(e,t,n)=>n(e)===n(t),l1=(e,t,n)=>{if(!t)return e;const r=t.toLowerCase();return e.filter(o=>n(o).toLowerCase().includes(r))},qu=e=>{const{option:t,index:n,isSelected:r,isHighlighted:o,onSelect:a,getOptionLabel:s,renderOption:i}=e,l=x.useCallback(()=>{a(t)},[t,a]);return d.jsx("div",{onClick:l,className:`
163
163
  px-3 py-2 cursor-pointer flex items-center justify-between
164
164
  text-sm transition-colors mb-[0.4vh]
165
165
  ${o?"bg-accent text-accent-foreground":""}
166
166
  ${r?"bg-primary/10":""}
167
167
  hover:bg-accent hover:text-accent-foreground
168
- `,children:i?i(t,n):d.jsxs(d.Fragment,{children:[d.jsx("span",{children:s(t)}),r&&d.jsx(er,{className:"h-4 w-4 text-primary"})]})})};qu.displayName="AutocompleteOption";const Vu=e=>{const{tag:t,index:n,getOptionLabel:r,onRemove:o}=e,a=x.useCallback(()=>{o(t)},[t,o]);return d.jsxs(Uu,{variant:"secondary",className:"text-xs",children:[r(t),d.jsx("button",{type:"button",onClick:a,className:"ml-1 hover:bg-secondary-foreground/20 rounded-full p-0.5",children:d.jsx(kn,{className:"h-3 w-3"})})]},n)};Vu.displayName="AutocompleteTag";const u1=({options:e=[],value:t=null,onChange:n,onInputChange:r,placeholder:o="Search...",multiple:a=!1,freeSolo:s=!1,disabled:i=!1,loading:l=!1,size:u="medium",variant:m="outlined",label:c="",helperText:p="",error:h,required:y=!1,fullWidth:v=!0,clearable:g=!0,disableCloseOnSelect:b=!1,filterOptions:w,getOptionLabel:S=s1,getOptionValue:D=i1,isOptionEqualToValue:C,renderOption:R,renderTags:M,noOptionsText:E="No options",emptyMessage:$,className:B="",popupClassName:L="",...q})=>{const[A,T]=x.useState(!1),[_,N]=x.useState(""),[I,k]=x.useState(-1),P=x.useRef(null),H=x.useRef(null),z=x.useRef(null),O=x.useId(),j=x.useMemo(()=>C||((oe,me)=>c1(oe,me,D)),[C,D]),Y=x.useMemo(()=>{let oe=e;return a&&Array.isArray(t)&&(oe=e.filter(me=>!t.some(be=>j(me,be)))),w?w(oe,{inputValue:_}):l1(oe,_,S)},[e,t,_,w,S,a,j]),G=x.useCallback(oe=>{const me=oe.target.value;N(me),r==null||r(oe,me),!A&&me&&T(!0)},[A,r]),V=x.useCallback(oe=>{if(a){const me=Array.isArray(t)?t:[],be=me.some(He=>j(oe,He));let $e;be?$e=me.filter(He=>!j(oe,He)):$e=[...me,oe],n==null||n(null,$e),N(""),setTimeout(()=>{var He;(He=P.current)==null||He.focus(),T(!0)},0)}else n==null||n(null,oe),N(S(oe)),T(!1);k(-1)},[a,t,j,n,b,S]),F=x.useCallback(oe=>{if(a&&Array.isArray(t)){const me=t.filter(be=>!j(oe,be));n==null||n(null,me)}},[a,t,j,n]),Z=x.useCallback(oe=>{oe.stopPropagation(),n==null||n(null,a?[]:null),N(""),setTimeout(()=>{P.current&&(P.current.value="",P.current.focus())},0),T(!1)},[n,a]),X=x.useCallback(oe=>{if(!A&&(oe.key==="ArrowDown"||oe.key==="ArrowUp")){T(!0);return}if(A)switch(oe.key){case"ArrowDown":oe.preventDefault(),k(me=>me<Y.length-1?me+1:0);break;case"ArrowUp":oe.preventDefault(),k(me=>me>0?me-1:Y.length-1);break;case"Enter":oe.preventDefault(),I>=0&&Y[I]?V(Y[I]):s&&_&&V(_);break;case"Escape":T(!1),k(-1);break;case"Tab":T(!1);break}},[A,Y,I,V,s,_]),Q=x.useCallback(()=>{T(!A)},[A]),se=x.useCallback(()=>{T(!0)},[]);x.useEffect(()=>{const oe=me=>{z.current&&!z.current.contains(me.target)&&T(!1)};return document.addEventListener("mousedown",oe),()=>document.removeEventListener("mousedown",oe)},[]),x.useEffect(()=>{if(A&&I>=0&&H.current){const oe=H.current.children[I];oe&&oe.scrollIntoView({block:"nearest"})}},[I,A]);const ue=x.useMemo(()=>!a||!Array.isArray(t)||t.length===0?null:M?M(t,F):d.jsx("div",{className:"flex flex-wrap gap-1 mb-1",children:t.map((oe,me)=>d.jsx(Vu,{tag:oe,index:me,getOptionLabel:S,onRemove:F},me))}),[a,t,M,F,S]),ye=x.useMemo(()=>a?Array.isArray(t)&&t.length>0:t!=null,[a,t]),J=g&&ye&&!i,Re=x.useMemo(()=>`
168
+ `,children:i?i(t,n):d.jsxs(d.Fragment,{children:[d.jsx("span",{children:s(t)}),r&&d.jsx(er,{className:"h-4 w-4 text-primary"})]})})};qu.displayName="AutocompleteOption";const Vu=e=>{const{tag:t,index:n,getOptionLabel:r,onRemove:o}=e,a=x.useCallback(()=>{o(t)},[t,o]);return d.jsxs(Uu,{variant:"secondary",className:"text-xs",children:[r(t),d.jsx("button",{type:"button",onClick:a,className:"ml-1 hover:bg-secondary-foreground/20 rounded-full p-0.5",children:d.jsx(kn,{className:"h-3 w-3"})})]},n)};Vu.displayName="AutocompleteTag";const u1=({options:e=[],value:t=null,onChange:n,onInputChange:r,placeholder:o="Search...",multiple:a=!1,freeSolo:s=!1,disabled:i=!1,loading:l=!1,size:u="medium",variant:m="outlined",label:c="",helperText:p="",error:h,required:y=!1,fullWidth:v=!0,clearable:g=!0,disableCloseOnSelect:b=!1,filterOptions:w,getOptionLabel:S=s1,getOptionValue:D=i1,isOptionEqualToValue:C,renderOption:N,renderTags:M,noOptionsText:E="No options",emptyMessage:$,className:B="",popupClassName:L="",...q})=>{const[A,T]=x.useState(!1),[_,R]=x.useState(""),[I,k]=x.useState(-1),P=x.useRef(null),H=x.useRef(null),z=x.useRef(null),O=x.useId(),j=x.useMemo(()=>C||((oe,me)=>c1(oe,me,D)),[C,D]),Y=x.useMemo(()=>{let oe=e;return a&&Array.isArray(t)&&(oe=e.filter(me=>!t.some(be=>j(me,be)))),w?w(oe,{inputValue:_}):l1(oe,_,S)},[e,t,_,w,S,a,j]),G=x.useCallback(oe=>{const me=oe.target.value;R(me),r==null||r(oe,me),!A&&me&&T(!0)},[A,r]),V=x.useCallback(oe=>{if(a){const me=Array.isArray(t)?t:[],be=me.some(He=>j(oe,He));let $e;be?$e=me.filter(He=>!j(oe,He)):$e=[...me,oe],n==null||n(null,$e),R(""),setTimeout(()=>{var He;(He=P.current)==null||He.focus(),T(!0)},0)}else n==null||n(null,oe),R(S(oe)),T(!1);k(-1)},[a,t,j,n,b,S]),F=x.useCallback(oe=>{if(a&&Array.isArray(t)){const me=t.filter(be=>!j(oe,be));n==null||n(null,me)}},[a,t,j,n]),Z=x.useCallback(oe=>{oe.stopPropagation(),n==null||n(null,a?[]:null),R(""),setTimeout(()=>{P.current&&(P.current.value="",P.current.focus())},0),T(!1)},[n,a]),X=x.useCallback(oe=>{if(!A&&(oe.key==="ArrowDown"||oe.key==="ArrowUp")){T(!0);return}if(A)switch(oe.key){case"ArrowDown":oe.preventDefault(),k(me=>me<Y.length-1?me+1:0);break;case"ArrowUp":oe.preventDefault(),k(me=>me>0?me-1:Y.length-1);break;case"Enter":oe.preventDefault(),I>=0&&Y[I]?V(Y[I]):s&&_&&V(_);break;case"Escape":T(!1),k(-1);break;case"Tab":T(!1);break}},[A,Y,I,V,s,_]),Q=x.useCallback(()=>{T(!A)},[A]),se=x.useCallback(()=>{T(!0)},[]);x.useEffect(()=>{const oe=me=>{z.current&&!z.current.contains(me.target)&&T(!1)};return document.addEventListener("mousedown",oe),()=>document.removeEventListener("mousedown",oe)},[]),x.useEffect(()=>{if(A&&I>=0&&H.current){const oe=H.current.children[I];oe&&oe.scrollIntoView({block:"nearest"})}},[I,A]);const ue=x.useMemo(()=>!a||!Array.isArray(t)||t.length===0?null:M?M(t,F):d.jsx("div",{className:"flex flex-wrap gap-1 mb-1",children:t.map((oe,me)=>d.jsx(Vu,{tag:oe,index:me,getOptionLabel:S,onRemove:F},me))}),[a,t,M,F,S]),ye=x.useMemo(()=>a?Array.isArray(t)&&t.length>0:t!=null,[a,t]),J=g&&ye&&!i,Re=x.useMemo(()=>`
169
169
  relative flex items-center rounded-md
170
170
  ${a1[m]}
171
171
  ${o1[u]}
@@ -178,7 +178,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
178
178
  bg-popover border border-border rounded-md shadow-lg
179
179
  max-h-60 overflow-auto
180
180
  ${L}
181
- `,ref:H,children:Y.length===0?d.jsx("div",{className:"p-3 text-sm text-muted-foreground text-center",children:Te}):Y.map((oe,me)=>{const be=a?Array.isArray(t)&&t.some(He=>j(oe,He)):j(oe,t),$e=me===I;return d.jsx(qu,{option:oe,index:me,isSelected:be,isHighlighted:$e,onSelect:V,getOptionLabel:S,renderOption:R},me)})})]}),(p||h)&&d.jsx("p",{className:`mt-1 text-xs ${h?"text-destructive":"text-muted-foreground"}`,children:h||p})]})};var yo="Collapsible",[d1,sD]=Be(yo),[f1,as]=d1(yo),Ku=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,u]=tt({prop:r,defaultProp:o??!1,onChange:s,caller:yo});return d.jsx(f1,{scope:n,disabled:a,contentId:ke(),open:l,onOpenToggle:f.useCallback(()=>u(m=>!m),[u]),children:d.jsx(ee.div,{"data-state":is(l),"data-disabled":a?"":void 0,...i,ref:t})})});Ku.displayName=yo;var Xu="CollapsibleTrigger",Zu=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=as(Xu,n);return d.jsx(ee.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":is(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:K(e.onClick,o.onOpenToggle)})});Zu.displayName=Xu;var ss="CollapsibleContent",Qu=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=as(ss,e.__scopeCollapsible);return d.jsx(ze,{present:n||o.open,children:({present:a})=>d.jsx(m1,{...r,ref:t,present:a})})});Qu.displayName=ss;var m1=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=as(ss,n),[i,l]=f.useState(r),u=f.useRef(null),m=he(t,u),c=f.useRef(0),p=c.current,h=f.useRef(0),y=h.current,v=s.open||i,g=f.useRef(v),b=f.useRef(void 0);return f.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),Ne(()=>{const w=u.current;if(w){b.current=b.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const S=w.getBoundingClientRect();c.current=S.height,h.current=S.width,g.current||(w.style.transitionDuration=b.current.transitionDuration,w.style.animationName=b.current.animationName),l(r)}},[s.open,r]),d.jsx(ee.div,{"data-state":is(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v,...a,ref:m,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:v&&o})});function is(e){return e?"open":"closed"}var p1=Ku,h1=Zu,g1=Qu;function v1({title:e,content:t,defaultOpen:n=!1}){const[r,o]=f.useState(n),a=()=>o(s=>!s);return d.jsxs(p1,{open:r,onOpenChange:o,className:"rounded-md border p-4 shadow-sm w-full min-w-[40vw] max-w-lg cursor-pointer",onClick:a,children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h3",{className:"text-lg font-medium",children:e}),d.jsx(h1,{asChild:!0,children:d.jsx("button",{onClick:s=>s.stopPropagation(),className:W("transition-transform duration-200",r?"rotate-180":"rotate-0"),children:d.jsx(tr,{className:"h-5 w-5"})})})]}),d.jsx(g1,{className:"mt-4 CollapsibleContent data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",children:d.jsx("div",{className:"text-sm text-muted-foreground",children:t})})]})}const y1=Qr("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Ju=f.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("div",{ref:r,role:"alert",className:W(y1({variant:t}),e),...n}));Ju.displayName="Alert";const ed=f.forwardRef(({className:e,...t},n)=>d.jsx("h5",{ref:n,className:W("mb-1 font-medium leading-none tracking-tight",e),...t}));ed.displayName="AlertTitle";const td=f.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:W("text-sm [&_p]:leading-relaxed",e),...t}));td.displayName="AlertDescription";var Er={exports:{}},Uo={};/**
181
+ `,ref:H,children:Y.length===0?d.jsx("div",{className:"p-3 text-sm text-muted-foreground text-center",children:Te}):Y.map((oe,me)=>{const be=a?Array.isArray(t)&&t.some(He=>j(oe,He)):j(oe,t),$e=me===I;return d.jsx(qu,{option:oe,index:me,isSelected:be,isHighlighted:$e,onSelect:V,getOptionLabel:S,renderOption:N},me)})})]}),(p||h)&&d.jsx("p",{className:`mt-1 text-xs ${h?"text-destructive":"text-muted-foreground"}`,children:h||p})]})};var yo="Collapsible",[d1,sD]=Be(yo),[f1,as]=d1(yo),Ku=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,u]=tt({prop:r,defaultProp:o??!1,onChange:s,caller:yo});return d.jsx(f1,{scope:n,disabled:a,contentId:ke(),open:l,onOpenToggle:f.useCallback(()=>u(m=>!m),[u]),children:d.jsx(ee.div,{"data-state":is(l),"data-disabled":a?"":void 0,...i,ref:t})})});Ku.displayName=yo;var Xu="CollapsibleTrigger",Zu=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=as(Xu,n);return d.jsx(ee.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":is(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:K(e.onClick,o.onOpenToggle)})});Zu.displayName=Xu;var ss="CollapsibleContent",Qu=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=as(ss,e.__scopeCollapsible);return d.jsx(ze,{present:n||o.open,children:({present:a})=>d.jsx(m1,{...r,ref:t,present:a})})});Qu.displayName=ss;var m1=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=as(ss,n),[i,l]=f.useState(r),u=f.useRef(null),m=he(t,u),c=f.useRef(0),p=c.current,h=f.useRef(0),y=h.current,v=s.open||i,g=f.useRef(v),b=f.useRef(void 0);return f.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),Ne(()=>{const w=u.current;if(w){b.current=b.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const S=w.getBoundingClientRect();c.current=S.height,h.current=S.width,g.current||(w.style.transitionDuration=b.current.transitionDuration,w.style.animationName=b.current.animationName),l(r)}},[s.open,r]),d.jsx(ee.div,{"data-state":is(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v,...a,ref:m,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:v&&o})});function is(e){return e?"open":"closed"}var p1=Ku,h1=Zu,g1=Qu;function v1({title:e,content:t,defaultOpen:n=!1}){const[r,o]=f.useState(n),a=()=>o(s=>!s);return d.jsxs(p1,{open:r,onOpenChange:o,className:"rounded-md border p-4 shadow-sm w-full min-w-[40vw] max-w-lg cursor-pointer",onClick:a,children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h3",{className:"text-lg font-medium",children:e}),d.jsx(h1,{asChild:!0,children:d.jsx("button",{onClick:s=>s.stopPropagation(),className:W("transition-transform duration-200",r?"rotate-180":"rotate-0"),children:d.jsx(tr,{className:"h-5 w-5"})})})]}),d.jsx(g1,{className:"mt-4 CollapsibleContent data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",children:d.jsx("div",{className:"text-sm text-muted-foreground",children:t})})]})}const y1=Qr("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Ju=f.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("div",{ref:r,role:"alert",className:W(y1({variant:t}),e),...n}));Ju.displayName="Alert";const ed=f.forwardRef(({className:e,...t},n)=>d.jsx("h5",{ref:n,className:W("mb-1 font-medium leading-none tracking-tight",e),...t}));ed.displayName="AlertTitle";const td=f.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:W("text-sm [&_p]:leading-relaxed",e),...t}));td.displayName="AlertDescription";var Er={exports:{}},Uo={};/**
182
182
  * @license React
183
183
  * use-sync-external-store-shim.production.js
184
184
  *
@@ -194,9 +194,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
194
194
  *
195
195
  * This source code is licensed under the MIT license found in the
196
196
  * LICENSE file in the root directory of this source tree.
197
- */var Mi;function w1(){return Mi||(Mi=1,process.env.NODE_ENV!=="production"&&function(){function e(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}function t(h,y){m||o.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var v=y();if(!c){var g=y();a(v,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}g=s({inst:{value:v,getSnapshot:y}});var b=g[0].inst,w=g[1];return l(function(){b.value=v,b.getSnapshot=y,n(b)&&w({inst:b})},[h,v,y]),i(function(){return n(b)&&w({inst:b}),h(function(){n(b)&&w({inst:b})})},[h]),u(v),v}function n(h){var y=h.getSnapshot;h=h.value;try{var v=y();return!a(h,v)}catch{return!0}}function r(h,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=x,a=typeof Object.is=="function"?Object.is:e,s=o.useState,i=o.useEffect,l=o.useLayoutEffect,u=o.useDebugValue,m=!1,c=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;qo.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),qo}var Di;function x1(){return Di||(Di=1,process.env.NODE_ENV==="production"?Er.exports=b1():Er.exports=w1()),Er.exports}var S1=x1();function C1(){return S1.useSyncExternalStore(M1,()=>!0,()=>!1)}function M1(){return()=>{}}var cs="Avatar",[D1,iD]=Be(cs),[k1,nd]=D1(cs),rd=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=f.useState("idle");return d.jsx(k1,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:d.jsx(ee.span,{...r,ref:t})})});rd.displayName=cs;var od="AvatarImage",ad=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=nd(od,n),i=E1(r,a),l=et(u=>{o(u),s.onImageLoadingStatusChange(u)});return Ne(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(ee.img,{...a,ref:t,src:r}):null});ad.displayName=od;var sd="AvatarFallback",id=f.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=nd(sd,n),[s,i]=f.useState(r===void 0);return f.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(ee.span,{...o,ref:t}):null});id.displayName=sd;function ki(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function E1(e,{referrerPolicy:t,crossOrigin:n}){const r=C1(),o=f.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,i]=f.useState(()=>ki(a,e));return Ne(()=>{i(ki(a,e))},[a,e]),Ne(()=>{const l=c=>()=>{i(c)};if(!a)return;const u=l("loaded"),m=l("error");return a.addEventListener("load",u),a.addEventListener("error",m),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",u),a.removeEventListener("error",m)}},[a,n,t]),s}var cd=rd,ld=ad,ud=id;const dd=f.forwardRef(({className:e,...t},n)=>d.jsx(cd,{ref:n,className:W("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));dd.displayName=cd.displayName;const fd=f.forwardRef(({className:e,...t},n)=>d.jsx(ld,{ref:n,className:W("aspect-square h-full w-full",e),...t}));fd.displayName=ld.displayName;const md=f.forwardRef(({className:e,...t},n)=>d.jsx(ud,{ref:n,className:W("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));md.displayName=ud.displayName;var bo="Checkbox",[N1,cD]=Be(bo),[R1,ls]=N1(bo);function T1(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:l,required:u,value:m="on",internal_do_not_use_render:c}=e,[p,h]=tt({prop:n,defaultProp:o??!1,onChange:l,caller:bo}),[y,v]=f.useState(null),[g,b]=f.useState(null),w=f.useRef(!1),S=y?!!s||!!y.closest("form"):!0,D={checked:p,disabled:a,setChecked:h,control:y,setControl:v,name:i,form:s,value:m,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:At(o)?!1:o,isFormControl:S,bubbleInput:g,setBubbleInput:b};return d.jsx(R1,{scope:t,...D,children:_1(c)?c(D):r})}var pd="CheckboxTrigger",hd=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:m,setChecked:c,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:y}=ls(pd,e),v=he(o,m),g=f.useRef(l);return f.useEffect(()=>{const b=a==null?void 0:a.form;if(b){const w=()=>c(g.current);return b.addEventListener("reset",w),()=>b.removeEventListener("reset",w)}},[a,c]),d.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":At(l)?"mixed":l,"aria-required":u,"data-state":wd(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:v,onKeyDown:K(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:K(n,b=>{c(w=>At(w)?!0:!w),y&&h&&(p.current=b.isPropagationStopped(),p.current||b.stopPropagation())})})});hd.displayName=pd;var us=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:m,...c}=e;return d.jsx(T1,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:m,value:l,internal_do_not_use_render:({isFormControl:p})=>d.jsxs(d.Fragment,{children:[d.jsx(hd,{...c,ref:t,__scopeCheckbox:n}),p&&d.jsx(bd,{__scopeCheckbox:n})]})})});us.displayName=bo;var gd="CheckboxIndicator",vd=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=ls(gd,n);return d.jsx(ze,{present:r||At(a.checked)||a.checked===!0,children:d.jsx(ee.span,{"data-state":wd(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});vd.displayName=gd;var yd="CheckboxBubbleInput",bd=f.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:m,form:c,bubbleInput:p,setBubbleInput:h}=ls(yd,e),y=he(n,h),v=za(a),g=$a(r);f.useEffect(()=>{const w=p;if(!w)return;const S=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(S,"checked").set,R=!o.current;if(v!==a&&C){const M=new Event("click",{bubbles:R});w.indeterminate=At(a),C.call(w,At(a)?!1:a),w.dispatchEvent(M)}},[p,v,a,o]);const b=f.useRef(At(a)?!1:a);return d.jsx(ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??b.current,required:i,disabled:l,name:u,value:m,form:c,...t,tabIndex:-1,ref:y,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});bd.displayName=yd;function _1(e){return typeof e=="function"}function At(e){return e==="indeterminate"}function wd(e){return At(e)?"indeterminate":e?"checked":"unchecked"}const xd=f.forwardRef(({className:e,color:t="#029cfd",...n},r)=>d.jsx(us,{ref:r,className:W("peer h-4 w-4 shrink-0 rounded-sm border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:text-white",e),style:{borderColor:t,backgroundColor:n.checked?t:"transparent"},...n,children:d.jsx(vd,{className:"flex items-center justify-center text-current",children:n.checked==="indeterminate"?d.jsx(lh,{className:"h-4 w-4 text-white"}):d.jsx(er,{className:"h-4 w-4"})})}));xd.displayName=us.displayName;function O1(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Sd=x.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),pr=()=>{const e=x.useContext(Sd);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};O1(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
197
+ */var Mi;function w1(){return Mi||(Mi=1,process.env.NODE_ENV!=="production"&&function(){function e(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}function t(h,y){m||o.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var v=y();if(!c){var g=y();a(v,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}g=s({inst:{value:v,getSnapshot:y}});var b=g[0].inst,w=g[1];return l(function(){b.value=v,b.getSnapshot=y,n(b)&&w({inst:b})},[h,v,y]),i(function(){return n(b)&&w({inst:b}),h(function(){n(b)&&w({inst:b})})},[h]),u(v),v}function n(h){var y=h.getSnapshot;h=h.value;try{var v=y();return!a(h,v)}catch{return!0}}function r(h,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=x,a=typeof Object.is=="function"?Object.is:e,s=o.useState,i=o.useEffect,l=o.useLayoutEffect,u=o.useDebugValue,m=!1,c=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;qo.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),qo}var Di;function x1(){return Di||(Di=1,process.env.NODE_ENV==="production"?Er.exports=b1():Er.exports=w1()),Er.exports}var S1=x1();function C1(){return S1.useSyncExternalStore(M1,()=>!0,()=>!1)}function M1(){return()=>{}}var cs="Avatar",[D1,iD]=Be(cs),[k1,nd]=D1(cs),rd=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=f.useState("idle");return d.jsx(k1,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:d.jsx(ee.span,{...r,ref:t})})});rd.displayName=cs;var od="AvatarImage",ad=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=nd(od,n),i=E1(r,a),l=et(u=>{o(u),s.onImageLoadingStatusChange(u)});return Ne(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(ee.img,{...a,ref:t,src:r}):null});ad.displayName=od;var sd="AvatarFallback",id=f.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=nd(sd,n),[s,i]=f.useState(r===void 0);return f.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(ee.span,{...o,ref:t}):null});id.displayName=sd;function ki(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function E1(e,{referrerPolicy:t,crossOrigin:n}){const r=C1(),o=f.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,i]=f.useState(()=>ki(a,e));return Ne(()=>{i(ki(a,e))},[a,e]),Ne(()=>{const l=c=>()=>{i(c)};if(!a)return;const u=l("loaded"),m=l("error");return a.addEventListener("load",u),a.addEventListener("error",m),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",u),a.removeEventListener("error",m)}},[a,n,t]),s}var cd=rd,ld=ad,ud=id;const dd=f.forwardRef(({className:e,...t},n)=>d.jsx(cd,{ref:n,className:W("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));dd.displayName=cd.displayName;const fd=f.forwardRef(({className:e,...t},n)=>d.jsx(ld,{ref:n,className:W("aspect-square h-full w-full",e),...t}));fd.displayName=ld.displayName;const md=f.forwardRef(({className:e,...t},n)=>d.jsx(ud,{ref:n,className:W("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));md.displayName=ud.displayName;var bo="Checkbox",[N1,cD]=Be(bo),[R1,ls]=N1(bo);function T1(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:l,required:u,value:m="on",internal_do_not_use_render:c}=e,[p,h]=tt({prop:n,defaultProp:o??!1,onChange:l,caller:bo}),[y,v]=f.useState(null),[g,b]=f.useState(null),w=f.useRef(!1),S=y?!!s||!!y.closest("form"):!0,D={checked:p,disabled:a,setChecked:h,control:y,setControl:v,name:i,form:s,value:m,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:At(o)?!1:o,isFormControl:S,bubbleInput:g,setBubbleInput:b};return d.jsx(R1,{scope:t,...D,children:_1(c)?c(D):r})}var pd="CheckboxTrigger",hd=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:m,setChecked:c,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:y}=ls(pd,e),v=he(o,m),g=f.useRef(l);return f.useEffect(()=>{const b=a==null?void 0:a.form;if(b){const w=()=>c(g.current);return b.addEventListener("reset",w),()=>b.removeEventListener("reset",w)}},[a,c]),d.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":At(l)?"mixed":l,"aria-required":u,"data-state":wd(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:v,onKeyDown:K(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:K(n,b=>{c(w=>At(w)?!0:!w),y&&h&&(p.current=b.isPropagationStopped(),p.current||b.stopPropagation())})})});hd.displayName=pd;var us=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:m,...c}=e;return d.jsx(T1,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:m,value:l,internal_do_not_use_render:({isFormControl:p})=>d.jsxs(d.Fragment,{children:[d.jsx(hd,{...c,ref:t,__scopeCheckbox:n}),p&&d.jsx(bd,{__scopeCheckbox:n})]})})});us.displayName=bo;var gd="CheckboxIndicator",vd=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=ls(gd,n);return d.jsx(ze,{present:r||At(a.checked)||a.checked===!0,children:d.jsx(ee.span,{"data-state":wd(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});vd.displayName=gd;var yd="CheckboxBubbleInput",bd=f.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:m,form:c,bubbleInput:p,setBubbleInput:h}=ls(yd,e),y=he(n,h),v=za(a),g=$a(r);f.useEffect(()=>{const w=p;if(!w)return;const S=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(S,"checked").set,N=!o.current;if(v!==a&&C){const M=new Event("click",{bubbles:N});w.indeterminate=At(a),C.call(w,At(a)?!1:a),w.dispatchEvent(M)}},[p,v,a,o]);const b=f.useRef(At(a)?!1:a);return d.jsx(ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??b.current,required:i,disabled:l,name:u,value:m,form:c,...t,tabIndex:-1,ref:y,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});bd.displayName=yd;function _1(e){return typeof e=="function"}function At(e){return e==="indeterminate"}function wd(e){return At(e)?"indeterminate":e?"checked":"unchecked"}const xd=f.forwardRef(({className:e,color:t="#029cfd",...n},r)=>d.jsx(us,{ref:r,className:W("peer h-4 w-4 shrink-0 rounded-sm border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:text-white",e),style:{borderColor:t,backgroundColor:n.checked?t:"transparent"},...n,children:d.jsx(vd,{className:"flex items-center justify-center text-current",children:n.checked==="indeterminate"?d.jsx(lh,{className:"h-4 w-4 text-white"}):d.jsx(er,{className:"h-4 w-4"})})}));xd.displayName=us.displayName;function O1(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Sd=x.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),pr=()=>{const e=x.useContext(Sd);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};O1(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
198
198
  [data-state=closed]
199
- ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function P1(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function A1(){return ds(/^Mac/)}function I1(){return ds(/^iPhone/)}function Ei(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function j1(){return ds(/^iPad/)||A1()&&navigator.maxTouchPoints>1}function Cd(){return I1()||j1()}function ds(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const $1=24,L1=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Ni(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Vo=typeof document<"u"&&window.visualViewport;function Ri(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Md(e){for(Ri(e)&&(e=e.parentElement);e&&!Ri(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const F1=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Nr=0,Ko;function W1(e={}){let{isDisabled:t}=e;L1(()=>{if(!t)return Nr++,Nr===1&&Cd()&&(Ko=B1()),()=>{Nr--,Nr===0&&(Ko==null||Ko())}},[t])}function B1(){let e,t=0,n=c=>{e=Md(c.target),!(e===document.documentElement&&e===document.body)&&(t=c.changedTouches[0].pageY)},r=c=>{if(!e||e===document.documentElement||e===document.body){c.preventDefault();return}let p=c.changedTouches[0].pageY,h=e.scrollTop,y=e.scrollHeight-e.clientHeight;y!==0&&((h<=0&&p>t||h>=y&&p<t)&&c.preventDefault(),t=p)},o=c=>{let p=c.target;ba(p)&&p!==document.activeElement&&(c.preventDefault(),p.style.transform="translateY(-2000px)",p.focus(),requestAnimationFrame(()=>{p.style.transform=""}))},a=c=>{let p=c.target;ba(p)&&(p.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{p.style.transform="",Vo&&(Vo.height<window.innerHeight?requestAnimationFrame(()=>{Ti(p)}):Vo.addEventListener("resize",()=>Ti(p),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},i=window.pageXOffset,l=window.pageYOffset,u=Ni(Y1(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=Ni(Wn(document,"touchstart",n,{passive:!1,capture:!0}),Wn(document,"touchmove",r,{passive:!1,capture:!0}),Wn(document,"touchend",o,{passive:!1,capture:!0}),Wn(document,"focus",a,!0),Wn(window,"scroll",s));return()=>{u(),m(),window.scrollTo(i,l)}}function Y1(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Wn(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ti(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Md(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,a=e.getBoundingClientRect().bottom;const s=n.getBoundingClientRect().bottom+$1;a>s&&(n.scrollTop+=o-r)}e=n.parentElement}}function ba(e){return e instanceof HTMLInputElement&&!F1.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function H1(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function z1(...e){return t=>e.forEach(n=>H1(n,t))}function Dd(...e){return f.useCallback(z1(...e),e)}const kd=new WeakMap;function Oe(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,a])=>{if(o.startsWith("--")){e.style.setProperty(o,a);return}r[o]=e.style[o],e.style[o]=a}),!n&&kd.set(e,r)}function G1(e,t){if(!e||!(e instanceof HTMLElement))return;let n=kd.get(e);n&&(e.style[t]=n[t])}const Ee=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Rr(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Ee(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Ee(t)?5:4]):null)}function U1(e){return 8*(Math.log(e+1)-2)}function Xo(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function q1(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Me={DURATION:.5,EASE:[.32,.72,0,1]},Ed=.4,V1=.25,K1=100,Nd=8,Kt=16,wa=26,Zo="vaul-dragging";function Rd(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function X1({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,o=x.useRef(r),a=Rd(t);return x.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function Td({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=X1({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=Rd(n),l=x.useCallback(u=>{if(a){const c=typeof u=="function"?u(e):u;c!==e&&i(c)}else o(u)},[a,e,o,i]);return[s,l]}function Z1({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:s,direction:i="bottom",container:l,snapToSequentialPoint:u}){const[m,c]=Td({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[p,h]=x.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);x.useEffect(()=>{function M(){h({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",M),()=>window.removeEventListener("resize",M)},[]);const y=x.useMemo(()=>m===(n==null?void 0:n[n.length-1])||null,[n,m]),v=x.useMemo(()=>{var M;return(M=n==null?void 0:n.findIndex(E=>E===m))!=null?M:null},[n,m]),g=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===m||!n,b=x.useMemo(()=>{const M=l?{width:l.getBoundingClientRect().width,height:l.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var E;return(E=n==null?void 0:n.map($=>{const B=typeof $=="string";let L=0;if(B&&(L=parseInt($,10)),Ee(i)){const A=B?L:p?$*M.height:0;return p?i==="bottom"?M.height-A:-M.height+A:A}const q=B?L:p?$*M.width:0;return p?i==="right"?M.width-q:-M.width+q:q}))!=null?E:[]},[n,p,l]),w=x.useMemo(()=>v!==null?b==null?void 0:b[v]:null,[b,v]),S=x.useCallback(M=>{var E;const $=(E=b==null?void 0:b.findIndex(B=>B===M))!=null?E:null;s($),Oe(r.current,{transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,transform:Ee(i)?`translate3d(0, ${M}px, 0)`:`translate3d(${M}px, 0, 0)`}),b&&$!==b.length-1&&a!==void 0&&$!==a&&$<a?Oe(o.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,opacity:"0"}):Oe(o.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,opacity:"1"}),c(n==null?void 0:n[Math.max($,0)])},[r.current,n,b,a,o,c]);x.useEffect(()=>{if(m||e){var M;const E=(M=n==null?void 0:n.findIndex($=>$===e||$===m))!=null?M:-1;b&&E!==-1&&typeof b[E]=="number"&&S(b[E])}},[m,e,n,b,S]);function D({draggedDistance:M,closeDrawer:E,velocity:$,dismissible:B}){if(a===void 0)return;const L=i==="bottom"||i==="right"?(w??0)-M:(w??0)+M,q=v===a-1,A=v===0,T=M>0;if(q&&Oe(o.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`}),!u&&$>2&&!T){B?E():S(b[0]);return}if(!u&&$>2&&T&&b&&n){S(b[n.length-1]);return}const _=b==null?void 0:b.reduce((I,k)=>typeof I!="number"||typeof k!="number"?I:Math.abs(k-L)<Math.abs(I-L)?k:I),N=Ee(i)?window.innerHeight:window.innerWidth;if($>Ed&&Math.abs(M)<N*.4){const I=T?1:-1;if(I>0&&y&&n){S(b[n.length-1]);return}if(A&&I<0&&B&&E(),v===null)return;S(b[v+I]);return}S(_)}function C({draggedDistance:M}){if(w===null)return;const E=i==="bottom"||i==="right"?w-M:w+M;(i==="bottom"||i==="right")&&E<b[b.length-1]||(i==="top"||i==="left")&&E>b[b.length-1]||Oe(r.current,{transform:Ee(i)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`})}function R(M,E){if(!n||typeof v!="number"||!b||a===void 0)return null;const $=v===a-1;if(v>=a&&E)return 0;if($&&!E)return 1;if(!g&&!$)return null;const L=$?v+1:v-1,q=$?b[L]-b[L-1]:b[L+1]-b[L],A=M/Math.abs(q);return $?1-A:A}return{isLastSnapPoint:y,activeSnapPoint:m,shouldFade:g,getPercentageDragged:R,setActiveSnapPoint:c,activeSnapPointIndex:v,onRelease:D,onDrag:C,snapPointsOffset:b}}const Q1=()=>()=>{};function J1(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=pr(),a=x.useRef(null),s=x.useMemo(()=>document.body.style.backgroundColor,[]);function i(){return(window.innerWidth-wa)/window.innerWidth}x.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);const l=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!l)return;q1(r&&!o?Xo(document.body,{background:"black"}):Q1,Xo(l,{transformOrigin:Ee(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Me.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Me.EASE.join(",")})`}));const u=Xo(l,{borderRadius:`${Nd}px`,overflow:"hidden",...Ee(e)?{transform:`scale(${i()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${i()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),a.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},Me.DURATION*1e3)}}},[t,n,s])}let Bn=null;function eS({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[s,i]=x.useState(()=>typeof window<"u"?window.location.href:""),l=x.useRef(0),u=x.useCallback(()=>{if(Ei()&&Bn===null&&e&&!a){Bn={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:c,innerHeight:p}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-l.current}px`,left:`${-c}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const h=p-window.innerHeight;h&&l.current>=p&&(document.body.style.top=`${-(l.current+h)}px`)}),300)}},[e]),m=x.useCallback(()=>{if(Ei()&&Bn!==null&&!a){const c=-parseInt(document.body.style.top,10),p=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Bn),window.requestAnimationFrame(()=>{if(o&&s!==window.location.href){i(window.location.href);return}window.scrollTo(p,c)}),Bn=null}},[s]);return x.useEffect(()=>{function c(){l.current=window.scrollY}return c(),window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}},[]),x.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),x.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{m()},500)):m())},[e,r,s,t,n,u,m]),{restorePositionSetting:m}}function tS({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:s=!1,setBackgroundColorOnScale:i=!0,closeThreshold:l=V1,scrollLockTimeout:u=K1,dismissible:m=!0,handleOnly:c=!1,fadeFromIndex:p=a&&a.length-1,activeSnapPoint:h,setActiveSnapPoint:y,fixed:v,modal:g=!0,onClose:b,nested:w,noBodyStyles:S=!1,direction:D="bottom",defaultOpen:C=!1,disablePreventScroll:R=!0,snapToSequentialPoint:M=!1,preventScrollRestoration:E=!1,repositionInputs:$=!0,onAnimationEnd:B,container:L,autoFocus:q=!1}){var A,T;const[_=!1,N]=Td({defaultProp:C,prop:e,onChange:U=>{t==null||t(U),!U&&!w&&Pn(),setTimeout(()=>{B==null||B(U)},Me.DURATION*1e3),U&&!g&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),U||(document.body.style.pointerEvents="auto")}}),[I,k]=x.useState(!1),[P,H]=x.useState(!1),[z,O]=x.useState(!1),j=x.useRef(null),Y=x.useRef(null),G=x.useRef(null),V=x.useRef(null),F=x.useRef(null),Z=x.useRef(!1),X=x.useRef(null),Q=x.useRef(0),se=x.useRef(!1),ue=x.useRef(!C),ye=x.useRef(0),J=x.useRef(null),Re=x.useRef(((A=J.current)==null?void 0:A.getBoundingClientRect().height)||0),Te=x.useRef(((T=J.current)==null?void 0:T.getBoundingClientRect().width)||0),oe=x.useRef(0),me=x.useCallback(U=>{a&&U===Fe.length-1&&(Y.current=new Date)},[]),{activeSnapPoint:be,activeSnapPointIndex:$e,setActiveSnapPoint:He,onRelease:Ae,snapPointsOffset:Fe,onDrag:zt,shouldFade:an,getPercentageDragged:Rt}=Z1({snapPoints:a,activeSnapPointProp:h,setActiveSnapPointProp:y,drawerRef:J,fadeFromIndex:p,overlayRef:j,onSnapPointChange:me,direction:D,container:L,snapToSequentialPoint:M});W1({isDisabled:!_||P||!g||z||!I||!$||!R});const{restorePositionSetting:Pn}=eS({isOpen:_,modal:g,nested:w??!1,hasBeenOpened:I,preventScrollRestoration:E,noBodyStyles:S});function bt(){return(window.innerWidth-wa)/window.innerWidth}function Gt(U){var ie,ae;!m&&!a||J.current&&!J.current.contains(U.target)||(Re.current=((ie=J.current)==null?void 0:ie.getBoundingClientRect().height)||0,Te.current=((ae=J.current)==null?void 0:ae.getBoundingClientRect().width)||0,H(!0),G.current=new Date,Cd()&&window.addEventListener("touchend",()=>Z.current=!1,{once:!0}),U.target.setPointerCapture(U.pointerId),Q.current=Ee(D)?U.pageY:U.pageX)}function nt(U,ie){var ae;let fe=U;const ge=(ae=window.getSelection())==null?void 0:ae.toString(),re=J.current?Rr(J.current,D):null,de=new Date;if(fe.tagName==="SELECT"||fe.hasAttribute("data-vaul-no-drag")||fe.closest("[data-vaul-no-drag]"))return!1;if(D==="right"||D==="left")return!0;if(Y.current&&de.getTime()-Y.current.getTime()<500)return!1;if(re!==null&&(D==="bottom"?re>0:re<0))return!0;if(ge&&ge.length>0)return!1;if(F.current&&de.getTime()-F.current.getTime()<u&&re===0||ie)return F.current=de,!1;for(;fe;){if(fe.scrollHeight>fe.clientHeight){if(fe.scrollTop!==0)return F.current=new Date,!1;if(fe.getAttribute("role")==="dialog")return!0}fe=fe.parentNode}return!0}function sn(U){if(J.current&&P){const ie=D==="bottom"||D==="right"?1:-1,ae=(Q.current-(Ee(D)?U.pageY:U.pageX))*ie,fe=ae>0,ge=a&&!m&&!fe;if(ge&&$e===0)return;const re=Math.abs(ae),de=document.querySelector("[data-vaul-drawer-wrapper]"),ve=D==="bottom"||D==="top"?Re.current:Te.current;let le=re/ve;const Ue=Rt(re,fe);if(Ue!==null&&(le=Ue),ge&&le>=1||!Z.current&&!nt(U.target,fe))return;if(J.current.classList.add(Zo),Z.current=!0,Oe(J.current,{transition:"none"}),Oe(j.current,{transition:"none"}),a&&zt({draggedDistance:ae}),fe&&!a){const Ce=U1(ae),Ve=Math.min(Ce*-1,0)*ie;Oe(J.current,{transform:Ee(D)?`translate3d(0, ${Ve}px, 0)`:`translate3d(${Ve}px, 0, 0)`});return}const xe=1-le;if((an||p&&$e===p-1)&&(r==null||r(U,le),Oe(j.current,{opacity:`${xe}`,transition:"none"},!0)),de&&j.current&&s){const Ce=Math.min(bt()+le*(1-bt()),1),Ve=8-le*8,Ie=Math.max(0,14-le*14);Oe(de,{borderRadius:`${Ve}px`,transform:Ee(D)?`scale(${Ce}) translate3d(0, ${Ie}px, 0)`:`scale(${Ce}) translate3d(${Ie}px, 0, 0)`,transition:"none"},!0)}if(!a){const Ce=re*ie;Oe(J.current,{transform:Ee(D)?`translate3d(0, ${Ce}px, 0)`:`translate3d(${Ce}px, 0, 0)`})}}}x.useEffect(()=>{window.requestAnimationFrame(()=>{ue.current=!0})},[]),x.useEffect(()=>{var U;function ie(){if(!J.current||!$)return;const ae=document.activeElement;if(ba(ae)||se.current){var fe;const ge=((fe=window.visualViewport)==null?void 0:fe.height)||0,re=window.innerHeight;let de=re-ge;const ve=J.current.getBoundingClientRect().height||0,le=ve>re*.8;oe.current||(oe.current=ve);const Ue=J.current.getBoundingClientRect().top;if(Math.abs(ye.current-de)>60&&(se.current=!se.current),a&&a.length>0&&Fe&&$e){const xe=Fe[$e]||0;de+=xe}if(ye.current=de,ve>ge||se.current){const xe=J.current.getBoundingClientRect().height;let Ce=xe;xe>ge&&(Ce=ge-(le?Ue:wa)),v?J.current.style.height=`${xe-Math.max(de,0)}px`:J.current.style.height=`${Math.max(Ce,ge-Ue)}px`}else P1()||(J.current.style.height=`${oe.current}px`);a&&a.length>0&&!se.current?J.current.style.bottom="0px":J.current.style.bottom=`${Math.max(de,0)}px`}}return(U=window.visualViewport)==null||U.addEventListener("resize",ie),()=>{var ae;return(ae=window.visualViewport)==null?void 0:ae.removeEventListener("resize",ie)}},[$e,a,Fe]);function Ge(U){An(),b==null||b(),U||N(!1),setTimeout(()=>{a&&He(a[0])},Me.DURATION*1e3)}function cn(){if(!J.current)return;const U=document.querySelector("[data-vaul-drawer-wrapper]"),ie=Rr(J.current,D);Oe(J.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`}),Oe(j.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,opacity:"1"}),s&&ie&&ie>0&&_&&Oe(U,{borderRadius:`${Nd}px`,overflow:"hidden",...Ee(D)?{transform:`scale(${bt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${bt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Me.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Me.EASE.join(",")})`},!0)}function An(){!P||!J.current||(J.current.classList.remove(Zo),Z.current=!1,H(!1),V.current=new Date)}function ln(U){if(!P||!J.current)return;J.current.classList.remove(Zo),Z.current=!1,H(!1),V.current=new Date;const ie=Rr(J.current,D);if(!U||!nt(U.target,!1)||!ie||Number.isNaN(ie)||G.current===null)return;const ae=V.current.getTime()-G.current.getTime(),fe=Q.current-(Ee(D)?U.pageY:U.pageX),ge=Math.abs(fe)/ae;if(ge>.05&&(O(!0),setTimeout(()=>{O(!1)},200)),a){Ae({draggedDistance:fe*(D==="bottom"||D==="right"?1:-1),closeDrawer:Ge,velocity:ge,dismissible:m}),o==null||o(U,!0);return}if(D==="bottom"||D==="right"?fe>0:fe<0){cn(),o==null||o(U,!0);return}if(ge>Ed){Ge(),o==null||o(U,!1);return}var re;const de=Math.min((re=J.current.getBoundingClientRect().height)!=null?re:0,window.innerHeight);var ve;const le=Math.min((ve=J.current.getBoundingClientRect().width)!=null?ve:0,window.innerWidth),Ue=D==="left"||D==="right";if(Math.abs(ie)>=(Ue?le:de)*l){Ge(),o==null||o(U,!1);return}o==null||o(U,!0),cn()}x.useEffect(()=>(_&&(Oe(document.documentElement,{scrollBehavior:"auto"}),Y.current=new Date),()=>{G1(document.documentElement,"scrollBehavior")}),[_]);function Ut(U){const ie=U?(window.innerWidth-Kt)/window.innerWidth:1,ae=U?-Kt:0;X.current&&window.clearTimeout(X.current),Oe(J.current,{transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,transform:Ee(D)?`scale(${ie}) translate3d(0, ${ae}px, 0)`:`scale(${ie}) translate3d(${ae}px, 0, 0)`}),!U&&J.current&&(X.current=setTimeout(()=>{const fe=Rr(J.current,D);Oe(J.current,{transition:"none",transform:Ee(D)?`translate3d(0, ${fe}px, 0)`:`translate3d(${fe}px, 0, 0)`})},500))}function In(U,ie){if(ie<0)return;const ae=(window.innerWidth-Kt)/window.innerWidth,fe=ae+ie*(1-ae),ge=-Kt+ie*Kt;Oe(J.current,{transform:Ee(D)?`scale(${fe}) translate3d(0, ${ge}px, 0)`:`scale(${fe}) translate3d(${ge}px, 0, 0)`,transition:"none"})}function Tt(U,ie){const ae=Ee(D)?window.innerHeight:window.innerWidth,fe=ie?(ae-Kt)/ae:1,ge=ie?-Kt:0;ie&&Oe(J.current,{transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,transform:Ee(D)?`scale(${fe}) translate3d(0, ${ge}px, 0)`:`scale(${fe}) translate3d(${ge}px, 0, 0)`})}return x.useEffect(()=>{g||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[g]),x.createElement(Ja,{defaultOpen:C,onOpenChange:U=>{!m&&!U||(U?k(!0):Ge(!0),N(U))},open:_},x.createElement(Sd.Provider,{value:{activeSnapPoint:be,snapPoints:a,setActiveSnapPoint:He,drawerRef:J,overlayRef:j,onOpenChange:t,onPress:Gt,onRelease:ln,onDrag:sn,dismissible:m,shouldAnimate:ue,handleOnly:c,isOpen:_,isDragging:P,shouldFade:an,closeDrawer:Ge,onNestedDrag:In,onNestedOpenChange:Ut,onNestedRelease:Tt,keyboardIsOpen:se,modal:g,snapPointsOffset:Fe,activeSnapPointIndex:$e,direction:D,shouldScaleBackground:s,setBackgroundColorOnScale:i,noBodyStyles:S,container:L,autoFocus:q}},n))}const _d=x.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:s,modal:i,shouldAnimate:l}=pr(),u=Dd(t,n),m=r&&r.length>0;if(!i)return null;const c=x.useCallback(p=>o(p),[o]);return x.createElement(ho,{onMouseUp:c,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":s&&m?"true":"false","data-vaul-snap-points-overlay":s&&a?"true":"false","data-vaul-animate":l!=null&&l.current?"true":"false",...e})});_d.displayName="Drawer.Overlay";const Od=x.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:s,onRelease:i,onDrag:l,keyboardIsOpen:u,snapPointsOffset:m,activeSnapPointIndex:c,modal:p,isOpen:h,direction:y,snapPoints:v,container:g,handleOnly:b,shouldAnimate:w,autoFocus:S}=pr(),[D,C]=x.useState(!1),R=Dd(o,a),M=x.useRef(null),E=x.useRef(null),$=x.useRef(!1),B=v&&v.length>0;J1();const L=(A,T,_=0)=>{if($.current)return!0;const N=Math.abs(A.y),I=Math.abs(A.x),k=I>N,P=["bottom","right"].includes(T)?1:-1;if(T==="left"||T==="right"){if(!(A.x*P<0)&&I>=0&&I<=_)return k}else if(!(A.y*P<0)&&N>=0&&N<=_)return!k;return $.current=!0,!0};x.useEffect(()=>{B&&window.requestAnimationFrame(()=>{C(!0)})},[]);function q(A){M.current=null,$.current=!1,i(A)}return x.createElement(go,{"data-vaul-drawer-direction":y,"data-vaul-drawer":"","data-vaul-delayed-snap-points":D?"true":"false","data-vaul-snap-points":h&&B?"true":"false","data-vaul-custom-container":g?"true":"false","data-vaul-animate":w!=null&&w.current?"true":"false",...r,ref:R,style:m&&m.length>0?{"--snap-point-height":`${m[c??0]}px`,...t}:t,onPointerDown:A=>{b||(r.onPointerDown==null||r.onPointerDown.call(r,A),M.current={x:A.pageX,y:A.pageY},s(A))},onOpenAutoFocus:A=>{n==null||n(A),S||A.preventDefault()},onPointerDownOutside:A=>{if(e==null||e(A),!p||A.defaultPrevented){A.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:A=>{if(!p){A.preventDefault();return}},onPointerMove:A=>{if(E.current=A,b||(r.onPointerMove==null||r.onPointerMove.call(r,A),!M.current))return;const T=A.pageY-M.current.y,_=A.pageX-M.current.x,N=A.pointerType==="touch"?10:2;L({x:_,y:T},y,N)?l(A):(Math.abs(_)>N||Math.abs(T)>N)&&(M.current=null)},onPointerUp:A=>{r.onPointerUp==null||r.onPointerUp.call(r,A),M.current=null,$.current=!1,i(A)},onPointerOut:A=>{r.onPointerOut==null||r.onPointerOut.call(r,A),q(E.current)},onContextMenu:A=>{r.onContextMenu==null||r.onContextMenu.call(r,A),E.current&&q(E.current)}})});Od.displayName="Drawer.Content";const nS=250,rS=120,oS=x.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:s,activeSnapPoint:i,setActiveSnapPoint:l,dismissible:u,handleOnly:m,isOpen:c,onPress:p,onDrag:h}=pr(),y=x.useRef(null),v=x.useRef(!1);function g(){if(v.current){S();return}window.setTimeout(()=>{b()},rS)}function b(){if(a||e||v.current){S();return}if(S(),!s||s.length===0){u||o();return}if(i===s[s.length-1]&&u){o();return}const C=s.findIndex(M=>M===i);if(C===-1)return;const R=s[C+1];l(R)}function w(){y.current=window.setTimeout(()=>{v.current=!0},nS)}function S(){y.current&&window.clearTimeout(y.current),v.current=!1}return x.createElement("div",{onClick:g,onPointerCancel:S,onPointerDown:D=>{m&&p(D),w()},onPointerMove:D=>{m&&h(D)},ref:r,"data-vaul-drawer-visible":c?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},x.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});oS.displayName="Drawer.Handle";function aS(e){const t=pr(),{container:n=t.container,...r}=e;return x.createElement(es,{container:n,...r})}const lt={Root:tS,Content:Od,Overlay:_d,Trigger:Eu,Portal:aS,Close:rs,Title:ts,Description:ns},Pd=({shouldScaleBackground:e=!0,...t})=>d.jsx(lt.Root,{shouldScaleBackground:e,...t});Pd.displayName="Drawer";const sS=lt.Trigger,iS=lt.Portal,cS=lt.Close,Ad=f.forwardRef(({className:e,...t},n)=>d.jsx(lt.Overlay,{ref:n,className:W("fixed inset-0 z-50 bg-black/80",e),...t}));Ad.displayName=lt.Overlay.displayName;const Id=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(iS,{children:[d.jsx(Ad,{}),d.jsxs(lt.Content,{ref:r,className:W("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[d.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));Id.displayName="DrawerContent";const jd=({className:e,...t})=>d.jsx("div",{className:W("grid gap-1.5 p-4 text-center sm:text-left",e),...t});jd.displayName="DrawerHeader";const $d=({className:e,...t})=>d.jsx("div",{className:W("mt-auto flex flex-col gap-2 p-4",e),...t});$d.displayName="DrawerFooter";const Ld=f.forwardRef(({className:e,...t},n)=>d.jsx(lt.Title,{ref:n,className:W("text-lg font-semibold leading-none tracking-tight",e),...t}));Ld.displayName=lt.Title.displayName;const Fd=f.forwardRef(({className:e,...t},n)=>d.jsx(lt.Description,{ref:n,className:W("text-sm text-muted-foreground",e),...t}));Fd.displayName=lt.Description.displayName;var Qo="rovingFocusGroup.onEntryFocus",lS={bubbles:!1,cancelable:!0},hr="RovingFocusGroup",[xa,Wd,uS]=Ha(hr),[dS,On]=Be(hr,[uS]),[fS,mS]=dS(hr),Bd=f.forwardRef((e,t)=>d.jsx(xa.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(xa.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(pS,{...e,ref:t})})}));Bd.displayName=hr;var pS=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...c}=e,p=f.useRef(null),h=he(t,p),y=lr(a),[v,g]=tt({prop:s,defaultProp:i??null,onChange:l,caller:hr}),[b,w]=f.useState(!1),S=et(u),D=Wd(n),C=f.useRef(!1),[R,M]=f.useState(0);return f.useEffect(()=>{const E=p.current;if(E)return E.addEventListener(Qo,S),()=>E.removeEventListener(Qo,S)},[S]),d.jsx(fS,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:v,onItemFocus:f.useCallback(E=>g(E),[g]),onItemShiftTab:f.useCallback(()=>w(!0),[]),onFocusableItemAdd:f.useCallback(()=>M(E=>E+1),[]),onFocusableItemRemove:f.useCallback(()=>M(E=>E-1),[]),children:d.jsx(ee.div,{tabIndex:b||R===0?-1:0,"data-orientation":r,...c,ref:h,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{C.current=!0}),onFocus:K(e.onFocus,E=>{const $=!C.current;if(E.target===E.currentTarget&&$&&!b){const B=new CustomEvent(Qo,lS);if(E.currentTarget.dispatchEvent(B),!B.defaultPrevented){const L=D().filter(N=>N.focusable),q=L.find(N=>N.active),A=L.find(N=>N.id===v),_=[q,A,...L].filter(Boolean).map(N=>N.ref.current);zd(_,m)}}C.current=!1}),onBlur:K(e.onBlur,()=>w(!1))})})}),Yd="RovingFocusGroupItem",Hd=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=ke(),u=a||l,m=mS(Yd,n),c=m.currentTabStopId===u,p=Wd(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:v}=m;return f.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),d.jsx(xa.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:d.jsx(ee.span,{tabIndex:c?0:-1,"data-orientation":m.orientation,...i,ref:t,onMouseDown:K(e.onMouseDown,g=>{r?m.onItemFocus(u):g.preventDefault()}),onFocus:K(e.onFocus,()=>m.onItemFocus(u)),onKeyDown:K(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){m.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const b=vS(g,m.orientation,m.dir);if(b!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let S=p().filter(D=>D.focusable).map(D=>D.ref.current);if(b==="last")S.reverse();else if(b==="prev"||b==="next"){b==="prev"&&S.reverse();const D=S.indexOf(g.currentTarget);S=m.loop?yS(S,D+1):S.slice(D+1)}setTimeout(()=>zd(S))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:v!=null}):s})})});Hd.displayName=Yd;var hS={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function vS(e,t,n){const r=gS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return hS[r]}function zd(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function yS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var fs=Bd,ms=Hd,Sa=["Enter"," "],bS=["ArrowDown","PageUp","Home"],Gd=["ArrowUp","PageDown","End"],wS=[...bS,...Gd],xS={ltr:[...Sa,"ArrowRight"],rtl:[...Sa,"ArrowLeft"]},SS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gr="Menu",[Zn,CS,MS]=Ha(gr),[on,Ud]=Be(gr,[MS,Ft,On]),vr=Ft(),qd=On(),[Vd,Ht]=on(gr),[DS,yr]=on(gr),Kd=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=vr(t),[l,u]=f.useState(null),m=f.useRef(!1),c=et(a),p=lr(o);return f.useEffect(()=>{const h=()=>{m.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>m.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),d.jsx(or,{...i,children:d.jsx(Vd,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:d.jsx(DS,{scope:t,onClose:f.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:m,dir:p,modal:s,children:r})})})};Kd.displayName=gr;var kS="MenuAnchor",ps=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=vr(n);return d.jsx(ar,{...o,...r,ref:t})});ps.displayName=kS;var hs="MenuPortal",[ES,Xd]=on(hs,{forceMount:void 0}),Zd=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Ht(hs,t);return d.jsx(ES,{scope:t,forceMount:n,children:d.jsx(ze,{present:n||a.open,children:d.jsx(sr,{asChild:!0,container:o,children:r})})})};Zd.displayName=hs;var Je="MenuContent",[NS,gs]=on(Je),Qd=f.forwardRef((e,t)=>{const n=Xd(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Ht(Je,e.__scopeMenu),s=yr(Je,e.__scopeMenu);return d.jsx(Zn.Provider,{scope:e.__scopeMenu,children:d.jsx(ze,{present:r||a.open,children:d.jsx(Zn.Slot,{scope:e.__scopeMenu,children:s.modal?d.jsx(RS,{...o,ref:t}):d.jsx(TS,{...o,ref:t})})})})}),RS=f.forwardRef((e,t)=>{const n=Ht(Je,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return ao(a)},[]),d.jsx(vs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),TS=f.forwardRef((e,t)=>{const n=Ht(Je,e.__scopeMenu);return d.jsx(vs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_S=It("MenuContent.ScrollLock"),vs=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:c,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...v}=e,g=Ht(Je,n),b=yr(Je,n),w=vr(n),S=qd(n),D=CS(n),[C,R]=f.useState(null),M=f.useRef(null),E=he(t,M,g.onContentChange),$=f.useRef(0),B=f.useRef(""),L=f.useRef(0),q=f.useRef(null),A=f.useRef("right"),T=f.useRef(0),_=y?ir:f.Fragment,N=y?{as:_S,allowPinchZoom:!0}:void 0,I=P=>{var F,Z;const H=B.current+P,z=D().filter(X=>!X.disabled),O=document.activeElement,j=(F=z.find(X=>X.ref.current===O))==null?void 0:F.textValue,Y=z.map(X=>X.textValue),G=HS(Y,H,j),V=(Z=z.find(X=>X.textValue===G))==null?void 0:Z.ref.current;(function X(Q){B.current=Q,window.clearTimeout($.current),Q!==""&&($.current=window.setTimeout(()=>X(""),1e3))})(H),V&&setTimeout(()=>V.focus())};f.useEffect(()=>()=>window.clearTimeout($.current),[]),Jr();const k=f.useCallback(P=>{var z,O;return A.current===((z=q.current)==null?void 0:z.side)&&GS(P,(O=q.current)==null?void 0:O.area)},[]);return d.jsx(NS,{scope:n,searchRef:B,onItemEnter:f.useCallback(P=>{k(P)&&P.preventDefault()},[k]),onItemLeave:f.useCallback(P=>{var H;k(P)||((H=M.current)==null||H.focus(),R(null))},[k]),onTriggerLeave:f.useCallback(P=>{k(P)&&P.preventDefault()},[k]),pointerGraceTimerRef:L,onPointerGraceIntentChange:f.useCallback(P=>{q.current=P},[]),children:d.jsx(_,{...N,children:d.jsx(nr,{asChild:!0,trapped:o,onMountAutoFocus:K(a,P=>{var H;P.preventDefault(),(H=M.current)==null||H.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:d.jsx(En,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:c,onInteractOutside:p,onDismiss:h,children:d.jsx(fs,{asChild:!0,...S,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:R,onEntryFocus:K(l,P=>{b.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(ro,{role:"menu","aria-orientation":"vertical","data-state":gf(g.open),"data-radix-menu-content":"",dir:b.dir,...w,...v,ref:E,style:{outline:"none",...v.style},onKeyDown:K(v.onKeyDown,P=>{const z=P.target.closest("[data-radix-menu-content]")===P.currentTarget,O=P.ctrlKey||P.altKey||P.metaKey,j=P.key.length===1;z&&(P.key==="Tab"&&P.preventDefault(),!O&&j&&I(P.key));const Y=M.current;if(P.target!==Y||!wS.includes(P.key))return;P.preventDefault();const V=D().filter(F=>!F.disabled).map(F=>F.ref.current);Gd.includes(P.key)&&V.reverse(),BS(V)}),onBlur:K(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout($.current),B.current="")}),onPointerMove:K(e.onPointerMove,Qn(P=>{const H=P.target,z=T.current!==P.clientX;if(P.currentTarget.contains(H)&&z){const O=P.clientX>T.current?"right":"left";A.current=O,T.current=P.clientX}}))})})})})})})});Qd.displayName=Je;var OS="MenuGroup",ys=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ee.div,{role:"group",...r,ref:t})});ys.displayName=OS;var PS="MenuLabel",Jd=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ee.div,{...r,ref:t})});Jd.displayName=PS;var Vr="MenuItem",_i="menu.itemSelect",wo=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=yr(Vr,e.__scopeMenu),i=gs(Vr,e.__scopeMenu),l=he(t,a),u=f.useRef(!1),m=()=>{const c=a.current;if(!n&&c){const p=new CustomEvent(_i,{bubbles:!0,cancelable:!0});c.addEventListener(_i,h=>r==null?void 0:r(h),{once:!0}),Zi(c,p),p.defaultPrevented?u.current=!1:s.onClose()}};return d.jsx(ef,{...o,ref:l,disabled:n,onClick:K(e.onClick,m),onPointerDown:c=>{var p;(p=e.onPointerDown)==null||p.call(e,c),u.current=!0},onPointerUp:K(e.onPointerUp,c=>{var p;u.current||(p=c.currentTarget)==null||p.click()}),onKeyDown:K(e.onKeyDown,c=>{const p=i.searchRef.current!=="";n||p&&c.key===" "||Sa.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});wo.displayName=Vr;var ef=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=gs(Vr,n),i=qd(n),l=f.useRef(null),u=he(t,l),[m,c]=f.useState(!1),[p,h]=f.useState("");return f.useEffect(()=>{const y=l.current;y&&h((y.textContent??"").trim())},[a.children]),d.jsx(Zn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:d.jsx(ms,{asChild:!0,...i,focusable:!r,children:d.jsx(ee.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:K(e.onPointerMove,Qn(y=>{r?s.onItemLeave(y):(s.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Qn(y=>s.onItemLeave(y))),onFocus:K(e.onFocus,()=>c(!0)),onBlur:K(e.onBlur,()=>c(!1))})})})}),AS="MenuCheckboxItem",tf=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return d.jsx(sf,{scope:e.__scopeMenu,checked:n,children:d.jsx(wo,{role:"menuitemcheckbox","aria-checked":Kr(n)?"mixed":n,...o,ref:t,"data-state":xs(n),onSelect:K(o.onSelect,()=>r==null?void 0:r(Kr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});tf.displayName=AS;var nf="MenuRadioGroup",[IS,jS]=on(nf,{value:void 0,onValueChange:()=>{}}),rf=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=et(r);return d.jsx(IS,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(ys,{...o,ref:t})})});rf.displayName=nf;var of="MenuRadioItem",af=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=jS(of,e.__scopeMenu),a=n===o.value;return d.jsx(sf,{scope:e.__scopeMenu,checked:a,children:d.jsx(wo,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":xs(a),onSelect:K(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});af.displayName=of;var bs="MenuItemIndicator",[sf,$S]=on(bs,{checked:!1}),cf=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=$S(bs,n);return d.jsx(ze,{present:r||Kr(a.checked)||a.checked===!0,children:d.jsx(ee.span,{...o,ref:t,"data-state":xs(a.checked)})})});cf.displayName=bs;var LS="MenuSeparator",lf=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ee.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});lf.displayName=LS;var FS="MenuArrow",uf=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=vr(n);return d.jsx(oo,{...o,...r,ref:t})});uf.displayName=FS;var ws="MenuSub",[WS,df]=on(ws),ff=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Ht(ws,t),s=vr(t),[i,l]=f.useState(null),[u,m]=f.useState(null),c=et(o);return f.useEffect(()=>(a.open===!1&&c(!1),()=>c(!1)),[a.open,c]),d.jsx(or,{...s,children:d.jsx(Vd,{scope:t,open:r,onOpenChange:c,content:u,onContentChange:m,children:d.jsx(WS,{scope:t,contentId:ke(),triggerId:ke(),trigger:i,onTriggerChange:l,children:n})})})};ff.displayName=ws;var Gn="MenuSubTrigger",mf=f.forwardRef((e,t)=>{const n=Ht(Gn,e.__scopeMenu),r=yr(Gn,e.__scopeMenu),o=df(Gn,e.__scopeMenu),a=gs(Gn,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},m=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>m,[m]),f.useEffect(()=>{const c=i.current;return()=>{window.clearTimeout(c),l(null)}},[i,l]),d.jsx(ps,{asChild:!0,...u,children:d.jsx(ef,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":gf(n.open),...e,ref:Mt(t,o.onTriggerChange),onClick:c=>{var p;(p=e.onClick)==null||p.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Qn(c=>{a.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:K(e.onPointerLeave,Qn(c=>{var h,y;m();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const v=(y=n.content)==null?void 0:y.dataset.side,g=v==="right",b=g?-5:5,w=p[g?"left":"right"],S=p[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:c.clientX+b,y:c.clientY},{x:w,y:p.top},{x:S,y:p.top},{x:S,y:p.bottom},{x:w,y:p.bottom}],side:v}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(c),c.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,c=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&c.key===" "||xS[r.dir].includes(c.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),c.preventDefault())})})})});mf.displayName=Gn;var pf="MenuSubContent",hf=f.forwardRef((e,t)=>{const n=Xd(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Ht(Je,e.__scopeMenu),s=yr(Je,e.__scopeMenu),i=df(pf,e.__scopeMenu),l=f.useRef(null),u=he(t,l);return d.jsx(Zn.Provider,{scope:e.__scopeMenu,children:d.jsx(ze,{present:r||a.open,children:d.jsx(Zn.Slot,{scope:e.__scopeMenu,children:d.jsx(vs,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var c;s.isUsingKeyboardRef.current&&((c=l.current)==null||c.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:K(e.onFocusOutside,m=>{m.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,m=>{s.onClose(),m.preventDefault()}),onKeyDown:K(e.onKeyDown,m=>{var h;const c=m.currentTarget.contains(m.target),p=SS[s.dir].includes(m.key);c&&p&&(a.onOpenChange(!1),(h=i.trigger)==null||h.focus(),m.preventDefault())})})})})})});hf.displayName=pf;function gf(e){return e?"open":"closed"}function Kr(e){return e==="indeterminate"}function xs(e){return Kr(e)?"indeterminate":e?"checked":"unchecked"}function BS(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function YS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function HS(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=YS(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function zS(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,m=i.y,c=l.x,p=l.y;m>r!=p>r&&n<(c-u)*(r-m)/(p-m)+u&&(o=!o)}return o}function GS(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return zS(n,t)}function Qn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var US=Kd,qS=ps,VS=Zd,KS=Qd,XS=ys,ZS=Jd,QS=wo,JS=tf,eC=rf,tC=af,nC=cf,rC=lf,oC=uf,aC=ff,sC=mf,iC=hf,xo="DropdownMenu",[cC,lD]=Be(xo,[Ud]),Ye=Ud(),[lC,vf]=cC(xo),yf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,l=Ye(t),u=f.useRef(null),[m,c]=tt({prop:o,defaultProp:a??!1,onChange:s,caller:xo});return d.jsx(lC,{scope:t,triggerId:ke(),triggerRef:u,contentId:ke(),open:m,onOpenChange:c,onOpenToggle:f.useCallback(()=>c(p=>!p),[c]),modal:i,children:d.jsx(US,{...l,open:m,onOpenChange:c,dir:r,modal:i,children:n})})};yf.displayName=xo;var bf="DropdownMenuTrigger",wf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=vf(bf,n),s=Ye(n);return d.jsx(qS,{asChild:!0,...s,children:d.jsx(ee.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Mt(t,a.triggerRef),onPointerDown:K(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:K(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});wf.displayName=bf;var uC="DropdownMenuPortal",xf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ye(t);return d.jsx(VS,{...r,...n})};xf.displayName=uC;var Sf="DropdownMenuContent",Cf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vf(Sf,n),a=Ye(n),s=f.useRef(!1);return d.jsx(KS,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,i=>{var l;s.current||(l=o.triggerRef.current)==null||l.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:K(e.onInteractOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,m=l.button===2||u;(!o.modal||m)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cf.displayName=Sf;var dC="DropdownMenuGroup",Mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(XS,{...o,...r,ref:t})});Mf.displayName=dC;var fC="DropdownMenuLabel",Df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(ZS,{...o,...r,ref:t})});Df.displayName=fC;var mC="DropdownMenuItem",kf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(QS,{...o,...r,ref:t})});kf.displayName=mC;var pC="DropdownMenuCheckboxItem",Ef=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(JS,{...o,...r,ref:t})});Ef.displayName=pC;var hC="DropdownMenuRadioGroup",Nf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(eC,{...o,...r,ref:t})});Nf.displayName=hC;var gC="DropdownMenuRadioItem",Rf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(tC,{...o,...r,ref:t})});Rf.displayName=gC;var vC="DropdownMenuItemIndicator",Tf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(nC,{...o,...r,ref:t})});Tf.displayName=vC;var yC="DropdownMenuSeparator",_f=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(rC,{...o,...r,ref:t})});_f.displayName=yC;var bC="DropdownMenuArrow",wC=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(oC,{...o,...r,ref:t})});wC.displayName=bC;var xC=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Ye(t),[i,l]=tt({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return d.jsx(aC,{...s,open:i,onOpenChange:l,children:n})},SC="DropdownMenuSubTrigger",Of=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(sC,{...o,...r,ref:t})});Of.displayName=SC;var CC="DropdownMenuSubContent",Pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(iC,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Pf.displayName=CC;var MC=yf,DC=wf,kC=xf,Af=Cf,EC=Mf,If=Df,jf=kf,$f=Ef,NC=Nf,Lf=Rf,Ff=Tf,Wf=_f,RC=xC,Bf=Of,Yf=Pf;const TC=MC,_C=DC,OC=EC,PC=RC,AC=NC,Hf=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>d.jsxs(Bf,{ref:o,className:W("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,d.jsx(Na,{className:"ml-auto"})]}));Hf.displayName=Bf.displayName;const zf=f.forwardRef(({className:e,...t},n)=>d.jsx(Yf,{ref:n,className:W("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));zf.displayName=Yf.displayName;const Gf=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(kC,{children:d.jsx(Af,{ref:r,sideOffset:t,className:W("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));Gf.displayName=Af.displayName;const Uf=f.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(jf,{ref:r,className:W("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n}));Uf.displayName=jf.displayName;const qf=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>d.jsxs($f,{ref:o,className:W("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Ff,{children:d.jsx(er,{className:"h-4 w-4"})})}),t]}));qf.displayName=$f.displayName;const Vf=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Lf,{ref:r,className:W("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Ff,{children:d.jsx(rc,{className:"h-2 w-2 fill-current"})})}),t]}));Vf.displayName=Lf.displayName;const Kf=f.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(If,{ref:r,className:W("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Kf.displayName=If.displayName;const Xf=f.forwardRef(({className:e,...t},n)=>d.jsx(Wf,{ref:n,className:W("-mx-1 my-1 h-px bg-muted",e),...t}));Xf.displayName=Wf.displayName;const Zf=({className:e,...t})=>d.jsx("span",{className:W("ml-auto text-xs tracking-widest opacity-60",e),...t});Zf.displayName="DropdownMenuShortcut";var Ss="Radio",[IC,Qf]=Be(Ss),[jC,$C]=IC(Ss),Jf=f.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...m}=e,[c,p]=f.useState(null),h=he(t,g=>p(g)),y=f.useRef(!1),v=c?u||!!c.closest("form"):!0;return d.jsxs(jC,{scope:n,checked:o,disabled:s,children:[d.jsx(ee.button,{type:"button",role:"radio","aria-checked":o,"data-state":rm(o),"data-disabled":s?"":void 0,disabled:s,value:i,...m,ref:h,onClick:K(e.onClick,g=>{o||l==null||l(),v&&(y.current=g.isPropagationStopped(),y.current||g.stopPropagation())})}),v&&d.jsx(nm,{control:c,bubbles:!y.current,name:r,value:i,checked:o,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Jf.displayName=Ss;var em="RadioIndicator",tm=f.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=$C(em,n);return d.jsx(ze,{present:r||a.checked,children:d.jsx(ee.span,{"data-state":rm(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});tm.displayName=em;var LC="RadioBubbleInput",nm=f.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=f.useRef(null),i=he(s,a),l=za(n),u=$a(t);return f.useEffect(()=>{const m=s.current;if(!m)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&h){const y=new Event("click",{bubbles:r});h.call(m,n),m.dispatchEvent(y)}},[l,n,r]),d.jsx(ee.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});nm.displayName=LC;function rm(e){return e?"checked":"unchecked"}var FC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],So="RadioGroup",[WC,uD]=Be(So,[On,Qf]),om=On(),am=Qf(),[BC,YC]=WC(So),sm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:m=!0,onValueChange:c,...p}=e,h=om(n),y=lr(u),[v,g]=tt({prop:a,defaultProp:o??null,onChange:c,caller:So});return d.jsx(BC,{scope:n,name:r,required:s,disabled:i,value:v,onValueChange:g,children:d.jsx(fs,{asChild:!0,...h,orientation:l,dir:y,loop:m,children:d.jsx(ee.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:y,...p,ref:t})})})});sm.displayName=So;var im="RadioGroupItem",cm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=YC(im,n),s=a.disabled||r,i=om(n),l=am(n),u=f.useRef(null),m=he(t,u),c=a.value===o.value,p=f.useRef(!1);return f.useEffect(()=>{const h=v=>{FC.includes(v.key)&&(p.current=!0)},y=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),d.jsx(ms,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(Jf,{disabled:s,required:a.required,checked:c,...l,...o,name:a.name,ref:m,onCheck:()=>a.onValueChange(o.value),onKeyDown:K(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:K(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});cm.displayName=im;var HC="RadioGroupIndicator",lm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=am(n);return d.jsx(tm,{...o,...r,ref:t})});lm.displayName=HC;var um=sm,dm=cm,zC=lm;const fm=f.forwardRef(({className:e,...t},n)=>d.jsx(um,{ref:n,className:W("grid gap-2",e),...t}));fm.displayName=um.displayName;const mm=f.forwardRef(({className:e,...t},n)=>d.jsx(dm,{ref:n,className:W(`
199
+ ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function P1(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function A1(){return ds(/^Mac/)}function I1(){return ds(/^iPhone/)}function Ei(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function j1(){return ds(/^iPad/)||A1()&&navigator.maxTouchPoints>1}function Cd(){return I1()||j1()}function ds(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const $1=24,L1=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Ni(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Vo=typeof document<"u"&&window.visualViewport;function Ri(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Md(e){for(Ri(e)&&(e=e.parentElement);e&&!Ri(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const F1=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Nr=0,Ko;function W1(e={}){let{isDisabled:t}=e;L1(()=>{if(!t)return Nr++,Nr===1&&Cd()&&(Ko=B1()),()=>{Nr--,Nr===0&&(Ko==null||Ko())}},[t])}function B1(){let e,t=0,n=c=>{e=Md(c.target),!(e===document.documentElement&&e===document.body)&&(t=c.changedTouches[0].pageY)},r=c=>{if(!e||e===document.documentElement||e===document.body){c.preventDefault();return}let p=c.changedTouches[0].pageY,h=e.scrollTop,y=e.scrollHeight-e.clientHeight;y!==0&&((h<=0&&p>t||h>=y&&p<t)&&c.preventDefault(),t=p)},o=c=>{let p=c.target;ba(p)&&p!==document.activeElement&&(c.preventDefault(),p.style.transform="translateY(-2000px)",p.focus(),requestAnimationFrame(()=>{p.style.transform=""}))},a=c=>{let p=c.target;ba(p)&&(p.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{p.style.transform="",Vo&&(Vo.height<window.innerHeight?requestAnimationFrame(()=>{Ti(p)}):Vo.addEventListener("resize",()=>Ti(p),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},i=window.pageXOffset,l=window.pageYOffset,u=Ni(Y1(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=Ni(Wn(document,"touchstart",n,{passive:!1,capture:!0}),Wn(document,"touchmove",r,{passive:!1,capture:!0}),Wn(document,"touchend",o,{passive:!1,capture:!0}),Wn(document,"focus",a,!0),Wn(window,"scroll",s));return()=>{u(),m(),window.scrollTo(i,l)}}function Y1(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Wn(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ti(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Md(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,a=e.getBoundingClientRect().bottom;const s=n.getBoundingClientRect().bottom+$1;a>s&&(n.scrollTop+=o-r)}e=n.parentElement}}function ba(e){return e instanceof HTMLInputElement&&!F1.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function H1(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function z1(...e){return t=>e.forEach(n=>H1(n,t))}function Dd(...e){return f.useCallback(z1(...e),e)}const kd=new WeakMap;function Oe(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,a])=>{if(o.startsWith("--")){e.style.setProperty(o,a);return}r[o]=e.style[o],e.style[o]=a}),!n&&kd.set(e,r)}function G1(e,t){if(!e||!(e instanceof HTMLElement))return;let n=kd.get(e);n&&(e.style[t]=n[t])}const Ee=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Rr(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Ee(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Ee(t)?5:4]):null)}function U1(e){return 8*(Math.log(e+1)-2)}function Xo(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function q1(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Me={DURATION:.5,EASE:[.32,.72,0,1]},Ed=.4,V1=.25,K1=100,Nd=8,Kt=16,wa=26,Zo="vaul-dragging";function Rd(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function X1({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,o=x.useRef(r),a=Rd(t);return x.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function Td({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=X1({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=Rd(n),l=x.useCallback(u=>{if(a){const c=typeof u=="function"?u(e):u;c!==e&&i(c)}else o(u)},[a,e,o,i]);return[s,l]}function Z1({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:s,direction:i="bottom",container:l,snapToSequentialPoint:u}){const[m,c]=Td({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[p,h]=x.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);x.useEffect(()=>{function M(){h({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",M),()=>window.removeEventListener("resize",M)},[]);const y=x.useMemo(()=>m===(n==null?void 0:n[n.length-1])||null,[n,m]),v=x.useMemo(()=>{var M;return(M=n==null?void 0:n.findIndex(E=>E===m))!=null?M:null},[n,m]),g=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===m||!n,b=x.useMemo(()=>{const M=l?{width:l.getBoundingClientRect().width,height:l.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var E;return(E=n==null?void 0:n.map($=>{const B=typeof $=="string";let L=0;if(B&&(L=parseInt($,10)),Ee(i)){const A=B?L:p?$*M.height:0;return p?i==="bottom"?M.height-A:-M.height+A:A}const q=B?L:p?$*M.width:0;return p?i==="right"?M.width-q:-M.width+q:q}))!=null?E:[]},[n,p,l]),w=x.useMemo(()=>v!==null?b==null?void 0:b[v]:null,[b,v]),S=x.useCallback(M=>{var E;const $=(E=b==null?void 0:b.findIndex(B=>B===M))!=null?E:null;s($),Oe(r.current,{transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,transform:Ee(i)?`translate3d(0, ${M}px, 0)`:`translate3d(${M}px, 0, 0)`}),b&&$!==b.length-1&&a!==void 0&&$!==a&&$<a?Oe(o.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,opacity:"0"}):Oe(o.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,opacity:"1"}),c(n==null?void 0:n[Math.max($,0)])},[r.current,n,b,a,o,c]);x.useEffect(()=>{if(m||e){var M;const E=(M=n==null?void 0:n.findIndex($=>$===e||$===m))!=null?M:-1;b&&E!==-1&&typeof b[E]=="number"&&S(b[E])}},[m,e,n,b,S]);function D({draggedDistance:M,closeDrawer:E,velocity:$,dismissible:B}){if(a===void 0)return;const L=i==="bottom"||i==="right"?(w??0)-M:(w??0)+M,q=v===a-1,A=v===0,T=M>0;if(q&&Oe(o.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`}),!u&&$>2&&!T){B?E():S(b[0]);return}if(!u&&$>2&&T&&b&&n){S(b[n.length-1]);return}const _=b==null?void 0:b.reduce((I,k)=>typeof I!="number"||typeof k!="number"?I:Math.abs(k-L)<Math.abs(I-L)?k:I),R=Ee(i)?window.innerHeight:window.innerWidth;if($>Ed&&Math.abs(M)<R*.4){const I=T?1:-1;if(I>0&&y&&n){S(b[n.length-1]);return}if(A&&I<0&&B&&E(),v===null)return;S(b[v+I]);return}S(_)}function C({draggedDistance:M}){if(w===null)return;const E=i==="bottom"||i==="right"?w-M:w+M;(i==="bottom"||i==="right")&&E<b[b.length-1]||(i==="top"||i==="left")&&E>b[b.length-1]||Oe(r.current,{transform:Ee(i)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`})}function N(M,E){if(!n||typeof v!="number"||!b||a===void 0)return null;const $=v===a-1;if(v>=a&&E)return 0;if($&&!E)return 1;if(!g&&!$)return null;const L=$?v+1:v-1,q=$?b[L]-b[L-1]:b[L+1]-b[L],A=M/Math.abs(q);return $?1-A:A}return{isLastSnapPoint:y,activeSnapPoint:m,shouldFade:g,getPercentageDragged:N,setActiveSnapPoint:c,activeSnapPointIndex:v,onRelease:D,onDrag:C,snapPointsOffset:b}}const Q1=()=>()=>{};function J1(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=pr(),a=x.useRef(null),s=x.useMemo(()=>document.body.style.backgroundColor,[]);function i(){return(window.innerWidth-wa)/window.innerWidth}x.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);const l=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!l)return;q1(r&&!o?Xo(document.body,{background:"black"}):Q1,Xo(l,{transformOrigin:Ee(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Me.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Me.EASE.join(",")})`}));const u=Xo(l,{borderRadius:`${Nd}px`,overflow:"hidden",...Ee(e)?{transform:`scale(${i()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${i()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),a.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},Me.DURATION*1e3)}}},[t,n,s])}let Bn=null;function eS({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[s,i]=x.useState(()=>typeof window<"u"?window.location.href:""),l=x.useRef(0),u=x.useCallback(()=>{if(Ei()&&Bn===null&&e&&!a){Bn={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:c,innerHeight:p}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-l.current}px`,left:`${-c}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const h=p-window.innerHeight;h&&l.current>=p&&(document.body.style.top=`${-(l.current+h)}px`)}),300)}},[e]),m=x.useCallback(()=>{if(Ei()&&Bn!==null&&!a){const c=-parseInt(document.body.style.top,10),p=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Bn),window.requestAnimationFrame(()=>{if(o&&s!==window.location.href){i(window.location.href);return}window.scrollTo(p,c)}),Bn=null}},[s]);return x.useEffect(()=>{function c(){l.current=window.scrollY}return c(),window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}},[]),x.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),x.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{m()},500)):m())},[e,r,s,t,n,u,m]),{restorePositionSetting:m}}function tS({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:s=!1,setBackgroundColorOnScale:i=!0,closeThreshold:l=V1,scrollLockTimeout:u=K1,dismissible:m=!0,handleOnly:c=!1,fadeFromIndex:p=a&&a.length-1,activeSnapPoint:h,setActiveSnapPoint:y,fixed:v,modal:g=!0,onClose:b,nested:w,noBodyStyles:S=!1,direction:D="bottom",defaultOpen:C=!1,disablePreventScroll:N=!0,snapToSequentialPoint:M=!1,preventScrollRestoration:E=!1,repositionInputs:$=!0,onAnimationEnd:B,container:L,autoFocus:q=!1}){var A,T;const[_=!1,R]=Td({defaultProp:C,prop:e,onChange:U=>{t==null||t(U),!U&&!w&&Pn(),setTimeout(()=>{B==null||B(U)},Me.DURATION*1e3),U&&!g&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),U||(document.body.style.pointerEvents="auto")}}),[I,k]=x.useState(!1),[P,H]=x.useState(!1),[z,O]=x.useState(!1),j=x.useRef(null),Y=x.useRef(null),G=x.useRef(null),V=x.useRef(null),F=x.useRef(null),Z=x.useRef(!1),X=x.useRef(null),Q=x.useRef(0),se=x.useRef(!1),ue=x.useRef(!C),ye=x.useRef(0),J=x.useRef(null),Re=x.useRef(((A=J.current)==null?void 0:A.getBoundingClientRect().height)||0),Te=x.useRef(((T=J.current)==null?void 0:T.getBoundingClientRect().width)||0),oe=x.useRef(0),me=x.useCallback(U=>{a&&U===Fe.length-1&&(Y.current=new Date)},[]),{activeSnapPoint:be,activeSnapPointIndex:$e,setActiveSnapPoint:He,onRelease:Ae,snapPointsOffset:Fe,onDrag:zt,shouldFade:an,getPercentageDragged:Rt}=Z1({snapPoints:a,activeSnapPointProp:h,setActiveSnapPointProp:y,drawerRef:J,fadeFromIndex:p,overlayRef:j,onSnapPointChange:me,direction:D,container:L,snapToSequentialPoint:M});W1({isDisabled:!_||P||!g||z||!I||!$||!N});const{restorePositionSetting:Pn}=eS({isOpen:_,modal:g,nested:w??!1,hasBeenOpened:I,preventScrollRestoration:E,noBodyStyles:S});function bt(){return(window.innerWidth-wa)/window.innerWidth}function Gt(U){var ie,ae;!m&&!a||J.current&&!J.current.contains(U.target)||(Re.current=((ie=J.current)==null?void 0:ie.getBoundingClientRect().height)||0,Te.current=((ae=J.current)==null?void 0:ae.getBoundingClientRect().width)||0,H(!0),G.current=new Date,Cd()&&window.addEventListener("touchend",()=>Z.current=!1,{once:!0}),U.target.setPointerCapture(U.pointerId),Q.current=Ee(D)?U.pageY:U.pageX)}function nt(U,ie){var ae;let fe=U;const ge=(ae=window.getSelection())==null?void 0:ae.toString(),re=J.current?Rr(J.current,D):null,de=new Date;if(fe.tagName==="SELECT"||fe.hasAttribute("data-vaul-no-drag")||fe.closest("[data-vaul-no-drag]"))return!1;if(D==="right"||D==="left")return!0;if(Y.current&&de.getTime()-Y.current.getTime()<500)return!1;if(re!==null&&(D==="bottom"?re>0:re<0))return!0;if(ge&&ge.length>0)return!1;if(F.current&&de.getTime()-F.current.getTime()<u&&re===0||ie)return F.current=de,!1;for(;fe;){if(fe.scrollHeight>fe.clientHeight){if(fe.scrollTop!==0)return F.current=new Date,!1;if(fe.getAttribute("role")==="dialog")return!0}fe=fe.parentNode}return!0}function sn(U){if(J.current&&P){const ie=D==="bottom"||D==="right"?1:-1,ae=(Q.current-(Ee(D)?U.pageY:U.pageX))*ie,fe=ae>0,ge=a&&!m&&!fe;if(ge&&$e===0)return;const re=Math.abs(ae),de=document.querySelector("[data-vaul-drawer-wrapper]"),ve=D==="bottom"||D==="top"?Re.current:Te.current;let le=re/ve;const Ue=Rt(re,fe);if(Ue!==null&&(le=Ue),ge&&le>=1||!Z.current&&!nt(U.target,fe))return;if(J.current.classList.add(Zo),Z.current=!0,Oe(J.current,{transition:"none"}),Oe(j.current,{transition:"none"}),a&&zt({draggedDistance:ae}),fe&&!a){const Ce=U1(ae),Ve=Math.min(Ce*-1,0)*ie;Oe(J.current,{transform:Ee(D)?`translate3d(0, ${Ve}px, 0)`:`translate3d(${Ve}px, 0, 0)`});return}const xe=1-le;if((an||p&&$e===p-1)&&(r==null||r(U,le),Oe(j.current,{opacity:`${xe}`,transition:"none"},!0)),de&&j.current&&s){const Ce=Math.min(bt()+le*(1-bt()),1),Ve=8-le*8,Ie=Math.max(0,14-le*14);Oe(de,{borderRadius:`${Ve}px`,transform:Ee(D)?`scale(${Ce}) translate3d(0, ${Ie}px, 0)`:`scale(${Ce}) translate3d(${Ie}px, 0, 0)`,transition:"none"},!0)}if(!a){const Ce=re*ie;Oe(J.current,{transform:Ee(D)?`translate3d(0, ${Ce}px, 0)`:`translate3d(${Ce}px, 0, 0)`})}}}x.useEffect(()=>{window.requestAnimationFrame(()=>{ue.current=!0})},[]),x.useEffect(()=>{var U;function ie(){if(!J.current||!$)return;const ae=document.activeElement;if(ba(ae)||se.current){var fe;const ge=((fe=window.visualViewport)==null?void 0:fe.height)||0,re=window.innerHeight;let de=re-ge;const ve=J.current.getBoundingClientRect().height||0,le=ve>re*.8;oe.current||(oe.current=ve);const Ue=J.current.getBoundingClientRect().top;if(Math.abs(ye.current-de)>60&&(se.current=!se.current),a&&a.length>0&&Fe&&$e){const xe=Fe[$e]||0;de+=xe}if(ye.current=de,ve>ge||se.current){const xe=J.current.getBoundingClientRect().height;let Ce=xe;xe>ge&&(Ce=ge-(le?Ue:wa)),v?J.current.style.height=`${xe-Math.max(de,0)}px`:J.current.style.height=`${Math.max(Ce,ge-Ue)}px`}else P1()||(J.current.style.height=`${oe.current}px`);a&&a.length>0&&!se.current?J.current.style.bottom="0px":J.current.style.bottom=`${Math.max(de,0)}px`}}return(U=window.visualViewport)==null||U.addEventListener("resize",ie),()=>{var ae;return(ae=window.visualViewport)==null?void 0:ae.removeEventListener("resize",ie)}},[$e,a,Fe]);function Ge(U){An(),b==null||b(),U||R(!1),setTimeout(()=>{a&&He(a[0])},Me.DURATION*1e3)}function cn(){if(!J.current)return;const U=document.querySelector("[data-vaul-drawer-wrapper]"),ie=Rr(J.current,D);Oe(J.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`}),Oe(j.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,opacity:"1"}),s&&ie&&ie>0&&_&&Oe(U,{borderRadius:`${Nd}px`,overflow:"hidden",...Ee(D)?{transform:`scale(${bt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${bt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Me.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Me.EASE.join(",")})`},!0)}function An(){!P||!J.current||(J.current.classList.remove(Zo),Z.current=!1,H(!1),V.current=new Date)}function ln(U){if(!P||!J.current)return;J.current.classList.remove(Zo),Z.current=!1,H(!1),V.current=new Date;const ie=Rr(J.current,D);if(!U||!nt(U.target,!1)||!ie||Number.isNaN(ie)||G.current===null)return;const ae=V.current.getTime()-G.current.getTime(),fe=Q.current-(Ee(D)?U.pageY:U.pageX),ge=Math.abs(fe)/ae;if(ge>.05&&(O(!0),setTimeout(()=>{O(!1)},200)),a){Ae({draggedDistance:fe*(D==="bottom"||D==="right"?1:-1),closeDrawer:Ge,velocity:ge,dismissible:m}),o==null||o(U,!0);return}if(D==="bottom"||D==="right"?fe>0:fe<0){cn(),o==null||o(U,!0);return}if(ge>Ed){Ge(),o==null||o(U,!1);return}var re;const de=Math.min((re=J.current.getBoundingClientRect().height)!=null?re:0,window.innerHeight);var ve;const le=Math.min((ve=J.current.getBoundingClientRect().width)!=null?ve:0,window.innerWidth),Ue=D==="left"||D==="right";if(Math.abs(ie)>=(Ue?le:de)*l){Ge(),o==null||o(U,!1);return}o==null||o(U,!0),cn()}x.useEffect(()=>(_&&(Oe(document.documentElement,{scrollBehavior:"auto"}),Y.current=new Date),()=>{G1(document.documentElement,"scrollBehavior")}),[_]);function Ut(U){const ie=U?(window.innerWidth-Kt)/window.innerWidth:1,ae=U?-Kt:0;X.current&&window.clearTimeout(X.current),Oe(J.current,{transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,transform:Ee(D)?`scale(${ie}) translate3d(0, ${ae}px, 0)`:`scale(${ie}) translate3d(${ae}px, 0, 0)`}),!U&&J.current&&(X.current=setTimeout(()=>{const fe=Rr(J.current,D);Oe(J.current,{transition:"none",transform:Ee(D)?`translate3d(0, ${fe}px, 0)`:`translate3d(${fe}px, 0, 0)`})},500))}function In(U,ie){if(ie<0)return;const ae=(window.innerWidth-Kt)/window.innerWidth,fe=ae+ie*(1-ae),ge=-Kt+ie*Kt;Oe(J.current,{transform:Ee(D)?`scale(${fe}) translate3d(0, ${ge}px, 0)`:`scale(${fe}) translate3d(${ge}px, 0, 0)`,transition:"none"})}function Tt(U,ie){const ae=Ee(D)?window.innerHeight:window.innerWidth,fe=ie?(ae-Kt)/ae:1,ge=ie?-Kt:0;ie&&Oe(J.current,{transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,transform:Ee(D)?`scale(${fe}) translate3d(0, ${ge}px, 0)`:`scale(${fe}) translate3d(${ge}px, 0, 0)`})}return x.useEffect(()=>{g||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[g]),x.createElement(Ja,{defaultOpen:C,onOpenChange:U=>{!m&&!U||(U?k(!0):Ge(!0),R(U))},open:_},x.createElement(Sd.Provider,{value:{activeSnapPoint:be,snapPoints:a,setActiveSnapPoint:He,drawerRef:J,overlayRef:j,onOpenChange:t,onPress:Gt,onRelease:ln,onDrag:sn,dismissible:m,shouldAnimate:ue,handleOnly:c,isOpen:_,isDragging:P,shouldFade:an,closeDrawer:Ge,onNestedDrag:In,onNestedOpenChange:Ut,onNestedRelease:Tt,keyboardIsOpen:se,modal:g,snapPointsOffset:Fe,activeSnapPointIndex:$e,direction:D,shouldScaleBackground:s,setBackgroundColorOnScale:i,noBodyStyles:S,container:L,autoFocus:q}},n))}const _d=x.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:s,modal:i,shouldAnimate:l}=pr(),u=Dd(t,n),m=r&&r.length>0;if(!i)return null;const c=x.useCallback(p=>o(p),[o]);return x.createElement(ho,{onMouseUp:c,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":s&&m?"true":"false","data-vaul-snap-points-overlay":s&&a?"true":"false","data-vaul-animate":l!=null&&l.current?"true":"false",...e})});_d.displayName="Drawer.Overlay";const Od=x.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:s,onRelease:i,onDrag:l,keyboardIsOpen:u,snapPointsOffset:m,activeSnapPointIndex:c,modal:p,isOpen:h,direction:y,snapPoints:v,container:g,handleOnly:b,shouldAnimate:w,autoFocus:S}=pr(),[D,C]=x.useState(!1),N=Dd(o,a),M=x.useRef(null),E=x.useRef(null),$=x.useRef(!1),B=v&&v.length>0;J1();const L=(A,T,_=0)=>{if($.current)return!0;const R=Math.abs(A.y),I=Math.abs(A.x),k=I>R,P=["bottom","right"].includes(T)?1:-1;if(T==="left"||T==="right"){if(!(A.x*P<0)&&I>=0&&I<=_)return k}else if(!(A.y*P<0)&&R>=0&&R<=_)return!k;return $.current=!0,!0};x.useEffect(()=>{B&&window.requestAnimationFrame(()=>{C(!0)})},[]);function q(A){M.current=null,$.current=!1,i(A)}return x.createElement(go,{"data-vaul-drawer-direction":y,"data-vaul-drawer":"","data-vaul-delayed-snap-points":D?"true":"false","data-vaul-snap-points":h&&B?"true":"false","data-vaul-custom-container":g?"true":"false","data-vaul-animate":w!=null&&w.current?"true":"false",...r,ref:N,style:m&&m.length>0?{"--snap-point-height":`${m[c??0]}px`,...t}:t,onPointerDown:A=>{b||(r.onPointerDown==null||r.onPointerDown.call(r,A),M.current={x:A.pageX,y:A.pageY},s(A))},onOpenAutoFocus:A=>{n==null||n(A),S||A.preventDefault()},onPointerDownOutside:A=>{if(e==null||e(A),!p||A.defaultPrevented){A.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:A=>{if(!p){A.preventDefault();return}},onPointerMove:A=>{if(E.current=A,b||(r.onPointerMove==null||r.onPointerMove.call(r,A),!M.current))return;const T=A.pageY-M.current.y,_=A.pageX-M.current.x,R=A.pointerType==="touch"?10:2;L({x:_,y:T},y,R)?l(A):(Math.abs(_)>R||Math.abs(T)>R)&&(M.current=null)},onPointerUp:A=>{r.onPointerUp==null||r.onPointerUp.call(r,A),M.current=null,$.current=!1,i(A)},onPointerOut:A=>{r.onPointerOut==null||r.onPointerOut.call(r,A),q(E.current)},onContextMenu:A=>{r.onContextMenu==null||r.onContextMenu.call(r,A),E.current&&q(E.current)}})});Od.displayName="Drawer.Content";const nS=250,rS=120,oS=x.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:s,activeSnapPoint:i,setActiveSnapPoint:l,dismissible:u,handleOnly:m,isOpen:c,onPress:p,onDrag:h}=pr(),y=x.useRef(null),v=x.useRef(!1);function g(){if(v.current){S();return}window.setTimeout(()=>{b()},rS)}function b(){if(a||e||v.current){S();return}if(S(),!s||s.length===0){u||o();return}if(i===s[s.length-1]&&u){o();return}const C=s.findIndex(M=>M===i);if(C===-1)return;const N=s[C+1];l(N)}function w(){y.current=window.setTimeout(()=>{v.current=!0},nS)}function S(){y.current&&window.clearTimeout(y.current),v.current=!1}return x.createElement("div",{onClick:g,onPointerCancel:S,onPointerDown:D=>{m&&p(D),w()},onPointerMove:D=>{m&&h(D)},ref:r,"data-vaul-drawer-visible":c?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},x.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});oS.displayName="Drawer.Handle";function aS(e){const t=pr(),{container:n=t.container,...r}=e;return x.createElement(es,{container:n,...r})}const lt={Root:tS,Content:Od,Overlay:_d,Trigger:Eu,Portal:aS,Close:rs,Title:ts,Description:ns},Pd=({shouldScaleBackground:e=!0,...t})=>d.jsx(lt.Root,{shouldScaleBackground:e,...t});Pd.displayName="Drawer";const sS=lt.Trigger,iS=lt.Portal,cS=lt.Close,Ad=f.forwardRef(({className:e,...t},n)=>d.jsx(lt.Overlay,{ref:n,className:W("fixed inset-0 z-50 bg-black/80",e),...t}));Ad.displayName=lt.Overlay.displayName;const Id=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(iS,{children:[d.jsx(Ad,{}),d.jsxs(lt.Content,{ref:r,className:W("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[d.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));Id.displayName="DrawerContent";const jd=({className:e,...t})=>d.jsx("div",{className:W("grid gap-1.5 p-4 text-center sm:text-left",e),...t});jd.displayName="DrawerHeader";const $d=({className:e,...t})=>d.jsx("div",{className:W("mt-auto flex flex-col gap-2 p-4",e),...t});$d.displayName="DrawerFooter";const Ld=f.forwardRef(({className:e,...t},n)=>d.jsx(lt.Title,{ref:n,className:W("text-lg font-semibold leading-none tracking-tight",e),...t}));Ld.displayName=lt.Title.displayName;const Fd=f.forwardRef(({className:e,...t},n)=>d.jsx(lt.Description,{ref:n,className:W("text-sm text-muted-foreground",e),...t}));Fd.displayName=lt.Description.displayName;var Qo="rovingFocusGroup.onEntryFocus",lS={bubbles:!1,cancelable:!0},hr="RovingFocusGroup",[xa,Wd,uS]=Ha(hr),[dS,On]=Be(hr,[uS]),[fS,mS]=dS(hr),Bd=f.forwardRef((e,t)=>d.jsx(xa.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(xa.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(pS,{...e,ref:t})})}));Bd.displayName=hr;var pS=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...c}=e,p=f.useRef(null),h=he(t,p),y=lr(a),[v,g]=tt({prop:s,defaultProp:i??null,onChange:l,caller:hr}),[b,w]=f.useState(!1),S=et(u),D=Wd(n),C=f.useRef(!1),[N,M]=f.useState(0);return f.useEffect(()=>{const E=p.current;if(E)return E.addEventListener(Qo,S),()=>E.removeEventListener(Qo,S)},[S]),d.jsx(fS,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:v,onItemFocus:f.useCallback(E=>g(E),[g]),onItemShiftTab:f.useCallback(()=>w(!0),[]),onFocusableItemAdd:f.useCallback(()=>M(E=>E+1),[]),onFocusableItemRemove:f.useCallback(()=>M(E=>E-1),[]),children:d.jsx(ee.div,{tabIndex:b||N===0?-1:0,"data-orientation":r,...c,ref:h,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{C.current=!0}),onFocus:K(e.onFocus,E=>{const $=!C.current;if(E.target===E.currentTarget&&$&&!b){const B=new CustomEvent(Qo,lS);if(E.currentTarget.dispatchEvent(B),!B.defaultPrevented){const L=D().filter(R=>R.focusable),q=L.find(R=>R.active),A=L.find(R=>R.id===v),_=[q,A,...L].filter(Boolean).map(R=>R.ref.current);zd(_,m)}}C.current=!1}),onBlur:K(e.onBlur,()=>w(!1))})})}),Yd="RovingFocusGroupItem",Hd=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=ke(),u=a||l,m=mS(Yd,n),c=m.currentTabStopId===u,p=Wd(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:v}=m;return f.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),d.jsx(xa.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:d.jsx(ee.span,{tabIndex:c?0:-1,"data-orientation":m.orientation,...i,ref:t,onMouseDown:K(e.onMouseDown,g=>{r?m.onItemFocus(u):g.preventDefault()}),onFocus:K(e.onFocus,()=>m.onItemFocus(u)),onKeyDown:K(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){m.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const b=vS(g,m.orientation,m.dir);if(b!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let S=p().filter(D=>D.focusable).map(D=>D.ref.current);if(b==="last")S.reverse();else if(b==="prev"||b==="next"){b==="prev"&&S.reverse();const D=S.indexOf(g.currentTarget);S=m.loop?yS(S,D+1):S.slice(D+1)}setTimeout(()=>zd(S))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:v!=null}):s})})});Hd.displayName=Yd;var hS={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function vS(e,t,n){const r=gS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return hS[r]}function zd(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function yS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var fs=Bd,ms=Hd,Sa=["Enter"," "],bS=["ArrowDown","PageUp","Home"],Gd=["ArrowUp","PageDown","End"],wS=[...bS,...Gd],xS={ltr:[...Sa,"ArrowRight"],rtl:[...Sa,"ArrowLeft"]},SS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gr="Menu",[Zn,CS,MS]=Ha(gr),[on,Ud]=Be(gr,[MS,Ft,On]),vr=Ft(),qd=On(),[Vd,Ht]=on(gr),[DS,yr]=on(gr),Kd=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=vr(t),[l,u]=f.useState(null),m=f.useRef(!1),c=et(a),p=lr(o);return f.useEffect(()=>{const h=()=>{m.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>m.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),d.jsx(or,{...i,children:d.jsx(Vd,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:d.jsx(DS,{scope:t,onClose:f.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:m,dir:p,modal:s,children:r})})})};Kd.displayName=gr;var kS="MenuAnchor",ps=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=vr(n);return d.jsx(ar,{...o,...r,ref:t})});ps.displayName=kS;var hs="MenuPortal",[ES,Xd]=on(hs,{forceMount:void 0}),Zd=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Ht(hs,t);return d.jsx(ES,{scope:t,forceMount:n,children:d.jsx(ze,{present:n||a.open,children:d.jsx(sr,{asChild:!0,container:o,children:r})})})};Zd.displayName=hs;var Je="MenuContent",[NS,gs]=on(Je),Qd=f.forwardRef((e,t)=>{const n=Xd(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Ht(Je,e.__scopeMenu),s=yr(Je,e.__scopeMenu);return d.jsx(Zn.Provider,{scope:e.__scopeMenu,children:d.jsx(ze,{present:r||a.open,children:d.jsx(Zn.Slot,{scope:e.__scopeMenu,children:s.modal?d.jsx(RS,{...o,ref:t}):d.jsx(TS,{...o,ref:t})})})})}),RS=f.forwardRef((e,t)=>{const n=Ht(Je,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return ao(a)},[]),d.jsx(vs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),TS=f.forwardRef((e,t)=>{const n=Ht(Je,e.__scopeMenu);return d.jsx(vs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_S=It("MenuContent.ScrollLock"),vs=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:c,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...v}=e,g=Ht(Je,n),b=yr(Je,n),w=vr(n),S=qd(n),D=CS(n),[C,N]=f.useState(null),M=f.useRef(null),E=he(t,M,g.onContentChange),$=f.useRef(0),B=f.useRef(""),L=f.useRef(0),q=f.useRef(null),A=f.useRef("right"),T=f.useRef(0),_=y?ir:f.Fragment,R=y?{as:_S,allowPinchZoom:!0}:void 0,I=P=>{var F,Z;const H=B.current+P,z=D().filter(X=>!X.disabled),O=document.activeElement,j=(F=z.find(X=>X.ref.current===O))==null?void 0:F.textValue,Y=z.map(X=>X.textValue),G=HS(Y,H,j),V=(Z=z.find(X=>X.textValue===G))==null?void 0:Z.ref.current;(function X(Q){B.current=Q,window.clearTimeout($.current),Q!==""&&($.current=window.setTimeout(()=>X(""),1e3))})(H),V&&setTimeout(()=>V.focus())};f.useEffect(()=>()=>window.clearTimeout($.current),[]),Jr();const k=f.useCallback(P=>{var z,O;return A.current===((z=q.current)==null?void 0:z.side)&&GS(P,(O=q.current)==null?void 0:O.area)},[]);return d.jsx(NS,{scope:n,searchRef:B,onItemEnter:f.useCallback(P=>{k(P)&&P.preventDefault()},[k]),onItemLeave:f.useCallback(P=>{var H;k(P)||((H=M.current)==null||H.focus(),N(null))},[k]),onTriggerLeave:f.useCallback(P=>{k(P)&&P.preventDefault()},[k]),pointerGraceTimerRef:L,onPointerGraceIntentChange:f.useCallback(P=>{q.current=P},[]),children:d.jsx(_,{...R,children:d.jsx(nr,{asChild:!0,trapped:o,onMountAutoFocus:K(a,P=>{var H;P.preventDefault(),(H=M.current)==null||H.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:d.jsx(En,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:c,onInteractOutside:p,onDismiss:h,children:d.jsx(fs,{asChild:!0,...S,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:N,onEntryFocus:K(l,P=>{b.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(ro,{role:"menu","aria-orientation":"vertical","data-state":gf(g.open),"data-radix-menu-content":"",dir:b.dir,...w,...v,ref:E,style:{outline:"none",...v.style},onKeyDown:K(v.onKeyDown,P=>{const z=P.target.closest("[data-radix-menu-content]")===P.currentTarget,O=P.ctrlKey||P.altKey||P.metaKey,j=P.key.length===1;z&&(P.key==="Tab"&&P.preventDefault(),!O&&j&&I(P.key));const Y=M.current;if(P.target!==Y||!wS.includes(P.key))return;P.preventDefault();const V=D().filter(F=>!F.disabled).map(F=>F.ref.current);Gd.includes(P.key)&&V.reverse(),BS(V)}),onBlur:K(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout($.current),B.current="")}),onPointerMove:K(e.onPointerMove,Qn(P=>{const H=P.target,z=T.current!==P.clientX;if(P.currentTarget.contains(H)&&z){const O=P.clientX>T.current?"right":"left";A.current=O,T.current=P.clientX}}))})})})})})})});Qd.displayName=Je;var OS="MenuGroup",ys=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ee.div,{role:"group",...r,ref:t})});ys.displayName=OS;var PS="MenuLabel",Jd=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ee.div,{...r,ref:t})});Jd.displayName=PS;var Vr="MenuItem",_i="menu.itemSelect",wo=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=yr(Vr,e.__scopeMenu),i=gs(Vr,e.__scopeMenu),l=he(t,a),u=f.useRef(!1),m=()=>{const c=a.current;if(!n&&c){const p=new CustomEvent(_i,{bubbles:!0,cancelable:!0});c.addEventListener(_i,h=>r==null?void 0:r(h),{once:!0}),Zi(c,p),p.defaultPrevented?u.current=!1:s.onClose()}};return d.jsx(ef,{...o,ref:l,disabled:n,onClick:K(e.onClick,m),onPointerDown:c=>{var p;(p=e.onPointerDown)==null||p.call(e,c),u.current=!0},onPointerUp:K(e.onPointerUp,c=>{var p;u.current||(p=c.currentTarget)==null||p.click()}),onKeyDown:K(e.onKeyDown,c=>{const p=i.searchRef.current!=="";n||p&&c.key===" "||Sa.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});wo.displayName=Vr;var ef=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=gs(Vr,n),i=qd(n),l=f.useRef(null),u=he(t,l),[m,c]=f.useState(!1),[p,h]=f.useState("");return f.useEffect(()=>{const y=l.current;y&&h((y.textContent??"").trim())},[a.children]),d.jsx(Zn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:d.jsx(ms,{asChild:!0,...i,focusable:!r,children:d.jsx(ee.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:K(e.onPointerMove,Qn(y=>{r?s.onItemLeave(y):(s.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Qn(y=>s.onItemLeave(y))),onFocus:K(e.onFocus,()=>c(!0)),onBlur:K(e.onBlur,()=>c(!1))})})})}),AS="MenuCheckboxItem",tf=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return d.jsx(sf,{scope:e.__scopeMenu,checked:n,children:d.jsx(wo,{role:"menuitemcheckbox","aria-checked":Kr(n)?"mixed":n,...o,ref:t,"data-state":xs(n),onSelect:K(o.onSelect,()=>r==null?void 0:r(Kr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});tf.displayName=AS;var nf="MenuRadioGroup",[IS,jS]=on(nf,{value:void 0,onValueChange:()=>{}}),rf=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=et(r);return d.jsx(IS,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(ys,{...o,ref:t})})});rf.displayName=nf;var of="MenuRadioItem",af=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=jS(of,e.__scopeMenu),a=n===o.value;return d.jsx(sf,{scope:e.__scopeMenu,checked:a,children:d.jsx(wo,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":xs(a),onSelect:K(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});af.displayName=of;var bs="MenuItemIndicator",[sf,$S]=on(bs,{checked:!1}),cf=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=$S(bs,n);return d.jsx(ze,{present:r||Kr(a.checked)||a.checked===!0,children:d.jsx(ee.span,{...o,ref:t,"data-state":xs(a.checked)})})});cf.displayName=bs;var LS="MenuSeparator",lf=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ee.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});lf.displayName=LS;var FS="MenuArrow",uf=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=vr(n);return d.jsx(oo,{...o,...r,ref:t})});uf.displayName=FS;var ws="MenuSub",[WS,df]=on(ws),ff=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Ht(ws,t),s=vr(t),[i,l]=f.useState(null),[u,m]=f.useState(null),c=et(o);return f.useEffect(()=>(a.open===!1&&c(!1),()=>c(!1)),[a.open,c]),d.jsx(or,{...s,children:d.jsx(Vd,{scope:t,open:r,onOpenChange:c,content:u,onContentChange:m,children:d.jsx(WS,{scope:t,contentId:ke(),triggerId:ke(),trigger:i,onTriggerChange:l,children:n})})})};ff.displayName=ws;var Gn="MenuSubTrigger",mf=f.forwardRef((e,t)=>{const n=Ht(Gn,e.__scopeMenu),r=yr(Gn,e.__scopeMenu),o=df(Gn,e.__scopeMenu),a=gs(Gn,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},m=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>m,[m]),f.useEffect(()=>{const c=i.current;return()=>{window.clearTimeout(c),l(null)}},[i,l]),d.jsx(ps,{asChild:!0,...u,children:d.jsx(ef,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":gf(n.open),...e,ref:Mt(t,o.onTriggerChange),onClick:c=>{var p;(p=e.onClick)==null||p.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Qn(c=>{a.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:K(e.onPointerLeave,Qn(c=>{var h,y;m();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const v=(y=n.content)==null?void 0:y.dataset.side,g=v==="right",b=g?-5:5,w=p[g?"left":"right"],S=p[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:c.clientX+b,y:c.clientY},{x:w,y:p.top},{x:S,y:p.top},{x:S,y:p.bottom},{x:w,y:p.bottom}],side:v}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(c),c.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,c=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&c.key===" "||xS[r.dir].includes(c.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),c.preventDefault())})})})});mf.displayName=Gn;var pf="MenuSubContent",hf=f.forwardRef((e,t)=>{const n=Xd(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Ht(Je,e.__scopeMenu),s=yr(Je,e.__scopeMenu),i=df(pf,e.__scopeMenu),l=f.useRef(null),u=he(t,l);return d.jsx(Zn.Provider,{scope:e.__scopeMenu,children:d.jsx(ze,{present:r||a.open,children:d.jsx(Zn.Slot,{scope:e.__scopeMenu,children:d.jsx(vs,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var c;s.isUsingKeyboardRef.current&&((c=l.current)==null||c.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:K(e.onFocusOutside,m=>{m.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,m=>{s.onClose(),m.preventDefault()}),onKeyDown:K(e.onKeyDown,m=>{var h;const c=m.currentTarget.contains(m.target),p=SS[s.dir].includes(m.key);c&&p&&(a.onOpenChange(!1),(h=i.trigger)==null||h.focus(),m.preventDefault())})})})})})});hf.displayName=pf;function gf(e){return e?"open":"closed"}function Kr(e){return e==="indeterminate"}function xs(e){return Kr(e)?"indeterminate":e?"checked":"unchecked"}function BS(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function YS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function HS(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=YS(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function zS(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,m=i.y,c=l.x,p=l.y;m>r!=p>r&&n<(c-u)*(r-m)/(p-m)+u&&(o=!o)}return o}function GS(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return zS(n,t)}function Qn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var US=Kd,qS=ps,VS=Zd,KS=Qd,XS=ys,ZS=Jd,QS=wo,JS=tf,eC=rf,tC=af,nC=cf,rC=lf,oC=uf,aC=ff,sC=mf,iC=hf,xo="DropdownMenu",[cC,lD]=Be(xo,[Ud]),Ye=Ud(),[lC,vf]=cC(xo),yf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,l=Ye(t),u=f.useRef(null),[m,c]=tt({prop:o,defaultProp:a??!1,onChange:s,caller:xo});return d.jsx(lC,{scope:t,triggerId:ke(),triggerRef:u,contentId:ke(),open:m,onOpenChange:c,onOpenToggle:f.useCallback(()=>c(p=>!p),[c]),modal:i,children:d.jsx(US,{...l,open:m,onOpenChange:c,dir:r,modal:i,children:n})})};yf.displayName=xo;var bf="DropdownMenuTrigger",wf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=vf(bf,n),s=Ye(n);return d.jsx(qS,{asChild:!0,...s,children:d.jsx(ee.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Mt(t,a.triggerRef),onPointerDown:K(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:K(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});wf.displayName=bf;var uC="DropdownMenuPortal",xf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ye(t);return d.jsx(VS,{...r,...n})};xf.displayName=uC;var Sf="DropdownMenuContent",Cf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vf(Sf,n),a=Ye(n),s=f.useRef(!1);return d.jsx(KS,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,i=>{var l;s.current||(l=o.triggerRef.current)==null||l.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:K(e.onInteractOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,m=l.button===2||u;(!o.modal||m)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cf.displayName=Sf;var dC="DropdownMenuGroup",Mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(XS,{...o,...r,ref:t})});Mf.displayName=dC;var fC="DropdownMenuLabel",Df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(ZS,{...o,...r,ref:t})});Df.displayName=fC;var mC="DropdownMenuItem",kf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(QS,{...o,...r,ref:t})});kf.displayName=mC;var pC="DropdownMenuCheckboxItem",Ef=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(JS,{...o,...r,ref:t})});Ef.displayName=pC;var hC="DropdownMenuRadioGroup",Nf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(eC,{...o,...r,ref:t})});Nf.displayName=hC;var gC="DropdownMenuRadioItem",Rf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(tC,{...o,...r,ref:t})});Rf.displayName=gC;var vC="DropdownMenuItemIndicator",Tf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(nC,{...o,...r,ref:t})});Tf.displayName=vC;var yC="DropdownMenuSeparator",_f=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(rC,{...o,...r,ref:t})});_f.displayName=yC;var bC="DropdownMenuArrow",wC=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(oC,{...o,...r,ref:t})});wC.displayName=bC;var xC=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Ye(t),[i,l]=tt({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return d.jsx(aC,{...s,open:i,onOpenChange:l,children:n})},SC="DropdownMenuSubTrigger",Of=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(sC,{...o,...r,ref:t})});Of.displayName=SC;var CC="DropdownMenuSubContent",Pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(iC,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Pf.displayName=CC;var MC=yf,DC=wf,kC=xf,Af=Cf,EC=Mf,If=Df,jf=kf,$f=Ef,NC=Nf,Lf=Rf,Ff=Tf,Wf=_f,RC=xC,Bf=Of,Yf=Pf;const TC=MC,_C=DC,OC=EC,PC=RC,AC=NC,Hf=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>d.jsxs(Bf,{ref:o,className:W("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,d.jsx(Na,{className:"ml-auto"})]}));Hf.displayName=Bf.displayName;const zf=f.forwardRef(({className:e,...t},n)=>d.jsx(Yf,{ref:n,className:W("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));zf.displayName=Yf.displayName;const Gf=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(kC,{children:d.jsx(Af,{ref:r,sideOffset:t,className:W("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));Gf.displayName=Af.displayName;const Uf=f.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(jf,{ref:r,className:W("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n}));Uf.displayName=jf.displayName;const qf=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>d.jsxs($f,{ref:o,className:W("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Ff,{children:d.jsx(er,{className:"h-4 w-4"})})}),t]}));qf.displayName=$f.displayName;const Vf=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Lf,{ref:r,className:W("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Ff,{children:d.jsx(rc,{className:"h-2 w-2 fill-current"})})}),t]}));Vf.displayName=Lf.displayName;const Kf=f.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(If,{ref:r,className:W("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Kf.displayName=If.displayName;const Xf=f.forwardRef(({className:e,...t},n)=>d.jsx(Wf,{ref:n,className:W("-mx-1 my-1 h-px bg-muted",e),...t}));Xf.displayName=Wf.displayName;const Zf=({className:e,...t})=>d.jsx("span",{className:W("ml-auto text-xs tracking-widest opacity-60",e),...t});Zf.displayName="DropdownMenuShortcut";var Ss="Radio",[IC,Qf]=Be(Ss),[jC,$C]=IC(Ss),Jf=f.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...m}=e,[c,p]=f.useState(null),h=he(t,g=>p(g)),y=f.useRef(!1),v=c?u||!!c.closest("form"):!0;return d.jsxs(jC,{scope:n,checked:o,disabled:s,children:[d.jsx(ee.button,{type:"button",role:"radio","aria-checked":o,"data-state":rm(o),"data-disabled":s?"":void 0,disabled:s,value:i,...m,ref:h,onClick:K(e.onClick,g=>{o||l==null||l(),v&&(y.current=g.isPropagationStopped(),y.current||g.stopPropagation())})}),v&&d.jsx(nm,{control:c,bubbles:!y.current,name:r,value:i,checked:o,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Jf.displayName=Ss;var em="RadioIndicator",tm=f.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=$C(em,n);return d.jsx(ze,{present:r||a.checked,children:d.jsx(ee.span,{"data-state":rm(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});tm.displayName=em;var LC="RadioBubbleInput",nm=f.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=f.useRef(null),i=he(s,a),l=za(n),u=$a(t);return f.useEffect(()=>{const m=s.current;if(!m)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&h){const y=new Event("click",{bubbles:r});h.call(m,n),m.dispatchEvent(y)}},[l,n,r]),d.jsx(ee.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});nm.displayName=LC;function rm(e){return e?"checked":"unchecked"}var FC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],So="RadioGroup",[WC,uD]=Be(So,[On,Qf]),om=On(),am=Qf(),[BC,YC]=WC(So),sm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:m=!0,onValueChange:c,...p}=e,h=om(n),y=lr(u),[v,g]=tt({prop:a,defaultProp:o??null,onChange:c,caller:So});return d.jsx(BC,{scope:n,name:r,required:s,disabled:i,value:v,onValueChange:g,children:d.jsx(fs,{asChild:!0,...h,orientation:l,dir:y,loop:m,children:d.jsx(ee.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:y,...p,ref:t})})})});sm.displayName=So;var im="RadioGroupItem",cm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=YC(im,n),s=a.disabled||r,i=om(n),l=am(n),u=f.useRef(null),m=he(t,u),c=a.value===o.value,p=f.useRef(!1);return f.useEffect(()=>{const h=v=>{FC.includes(v.key)&&(p.current=!0)},y=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),d.jsx(ms,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(Jf,{disabled:s,required:a.required,checked:c,...l,...o,name:a.name,ref:m,onCheck:()=>a.onValueChange(o.value),onKeyDown:K(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:K(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});cm.displayName=im;var HC="RadioGroupIndicator",lm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=am(n);return d.jsx(tm,{...o,...r,ref:t})});lm.displayName=HC;var um=sm,dm=cm,zC=lm;const fm=f.forwardRef(({className:e,...t},n)=>d.jsx(um,{ref:n,className:W("grid gap-2",e),...t}));fm.displayName=um.displayName;const mm=f.forwardRef(({className:e,...t},n)=>d.jsx(dm,{ref:n,className:W(`
200
200
  aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background
201
201
  focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
202
202
  disabled:cursor-not-allowed disabled:opacity-50
@@ -205,4 +205,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
205
205
  - less than the value passed to \`max\` (or ${Ds} if no \`max\` prop is set)
206
206
  - \`null\` or \`undefined\` if the progress is indeterminate.
207
207
 
208
- Defaulting to \`null\`.`}var Am=Tm,tM=Om;const Im=f.forwardRef(({className:e,value:t,...n},r)=>d.jsx(Am,{ref:r,className:W("relative h-1.5 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:d.jsx(tM,{className:"h-full w-full flex-1 bg-brandBlue transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Im.displayName=Am.displayName;function nM(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const rM=e=>{switch(e){case"success":return sM;case"info":return cM;case"warning":return iM;case"error":return lM;default:return null}},oM=Array(12).fill(0),aM=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},oM.map((n,r)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),sM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),iM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),lM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),uM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},x.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),dM=()=>{const[e,t]=x.useState(document.hidden);return x.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ca=1;class fM{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Ca++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...o,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async u=>{if(s=["resolve",u],x.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(pM(u)&&!u.ok){a=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,y=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...y})}else if(u instanceof Error){a=!1;const c=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,y=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...y})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,y=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:p,...y})}}).catch(async u=>{if(s=["reject",u],n.error!==void 0){a=!1;const m=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,h=typeof m=="object"&&!x.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:c,...h})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,m)=>i.then(()=>s[0]==="reject"?m(s[1]):u(s[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Ca++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const qe=new fM,mM=(e,t)=>{const n=(t==null?void 0:t.id)||Ca++;return qe.addToast({title:e,...t,id:n}),n},pM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",hM=mM,gM=()=>qe.toasts,vM=()=>qe.getActiveToasts(),Yn=Object.assign(hM,{success:qe.success,info:qe.info,warning:qe.warning,error:qe.error,custom:qe.custom,message:qe.message,promise:qe.promise,dismiss:qe.dismiss,loading:qe.loading},{getHistory:gM,getToasts:vM});nM("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Tr(e){return e.label!==void 0}const yM=3,bM="24px",wM="16px",Ai=4e3,xM=356,SM=14,CM=45,MM=200;function ut(...e){return e.filter(Boolean).join(" ")}function DM(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const kM=e=>{var t,n,r,o,a,s,i,l,u;const{invert:m,toast:c,unstyled:p,interacting:h,setHeights:y,visibleToasts:v,heights:g,index:b,toasts:w,expanded:S,removeToast:D,defaultRichColors:C,closeButton:R,style:M,cancelButtonStyle:E,actionButtonStyle:$,className:B="",descriptionClassName:L="",duration:q,position:A,gap:T,expandByDefault:_,classNames:N,icons:I,closeButtonAriaLabel:k="Close toast"}=e,[P,H]=x.useState(null),[z,O]=x.useState(null),[j,Y]=x.useState(!1),[G,V]=x.useState(!1),[F,Z]=x.useState(!1),[X,Q]=x.useState(!1),[se,ue]=x.useState(!1),[ye,J]=x.useState(0),[Re,Te]=x.useState(0),oe=x.useRef(c.duration||q||Ai),me=x.useRef(null),be=x.useRef(null),$e=b===0,He=b+1<=v,Ae=c.type,Fe=c.dismissible!==!1,zt=c.className||"",an=c.descriptionClassName||"",Rt=x.useMemo(()=>g.findIndex(re=>re.toastId===c.id)||0,[g,c.id]),Pn=x.useMemo(()=>{var re;return(re=c.closeButton)!=null?re:R},[c.closeButton,R]),bt=x.useMemo(()=>c.duration||q||Ai,[c.duration,q]),Gt=x.useRef(0),nt=x.useRef(0),sn=x.useRef(0),Ge=x.useRef(null),[cn,An]=A.split("-"),ln=x.useMemo(()=>g.reduce((re,de,ve)=>ve>=Rt?re:re+de.height,0),[g,Rt]),Ut=dM(),In=c.invert||m,Tt=Ae==="loading";nt.current=x.useMemo(()=>Rt*T+ln,[Rt,ln]),x.useEffect(()=>{oe.current=bt},[bt]),x.useEffect(()=>{Y(!0)},[]),x.useEffect(()=>{const re=be.current;if(re){const de=re.getBoundingClientRect().height;return Te(de),y(ve=>[{toastId:c.id,height:de,position:c.position},...ve]),()=>y(ve=>ve.filter(le=>le.toastId!==c.id))}},[y,c.id]),x.useLayoutEffect(()=>{if(!j)return;const re=be.current,de=re.style.height;re.style.height="auto";const ve=re.getBoundingClientRect().height;re.style.height=de,Te(ve),y(le=>le.find(xe=>xe.toastId===c.id)?le.map(xe=>xe.toastId===c.id?{...xe,height:ve}:xe):[{toastId:c.id,height:ve,position:c.position},...le])},[j,c.title,c.description,y,c.id,c.jsx,c.action,c.cancel]);const U=x.useCallback(()=>{V(!0),J(nt.current),y(re=>re.filter(de=>de.toastId!==c.id)),setTimeout(()=>{D(c)},MM)},[c,D,y,nt]);x.useEffect(()=>{if(c.promise&&Ae==="loading"||c.duration===1/0||c.type==="loading")return;let re;return S||h||Ut?(()=>{if(sn.current<Gt.current){const le=new Date().getTime()-Gt.current;oe.current=oe.current-le}sn.current=new Date().getTime()})():(()=>{oe.current!==1/0&&(Gt.current=new Date().getTime(),re=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),U()},oe.current))})(),()=>clearTimeout(re)},[S,h,c,Ae,Ut,U]),x.useEffect(()=>{c.delete&&(U(),c.onDismiss==null||c.onDismiss.call(c,c))},[U,c.delete]);function ie(){var re;if(I!=null&&I.loading){var de;return x.createElement("div",{className:ut(N==null?void 0:N.loader,c==null||(de=c.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":Ae==="loading"},I.loading)}return x.createElement(aM,{className:ut(N==null?void 0:N.loader,c==null||(re=c.classNames)==null?void 0:re.loader),visible:Ae==="loading"})}const ae=c.icon||(I==null?void 0:I[Ae])||rM(Ae);var fe,ge;return x.createElement("li",{tabIndex:0,ref:be,className:ut(B,zt,N==null?void 0:N.toast,c==null||(t=c.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[Ae],c==null||(n=c.classNames)==null?void 0:n[Ae]),"data-sonner-toast":"","data-rich-colors":(fe=c.richColors)!=null?fe:C,"data-styled":!(c.jsx||c.unstyled||p),"data-mounted":j,"data-promise":!!c.promise,"data-swiped":se,"data-removed":G,"data-visible":He,"data-y-position":cn,"data-x-position":An,"data-index":b,"data-front":$e,"data-swiping":F,"data-dismissible":Fe,"data-type":Ae,"data-invert":In,"data-swipe-out":X,"data-swipe-direction":z,"data-expanded":!!(S||_&&j),style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${G?ye:nt.current}px`,"--initial-height":_?"auto":`${Re}px`,...M,...c.style},onDragEnd:()=>{Z(!1),H(null),Ge.current=null},onPointerDown:re=>{re.button!==2&&(Tt||!Fe||(me.current=new Date,J(nt.current),re.target.setPointerCapture(re.pointerId),re.target.tagName!=="BUTTON"&&(Z(!0),Ge.current={x:re.clientX,y:re.clientY})))},onPointerUp:()=>{var re,de,ve;if(X||!Fe)return;Ge.current=null;const le=Number(((re=be.current)==null?void 0:re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ue=Number(((de=be.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xe=new Date().getTime()-((ve=me.current)==null?void 0:ve.getTime()),Ce=P==="x"?le:Ue,Ve=Math.abs(Ce)/xe;if(Math.abs(Ce)>=CM||Ve>.11){J(nt.current),c.onDismiss==null||c.onDismiss.call(c,c),O(P==="x"?le>0?"right":"left":Ue>0?"down":"up"),U(),Q(!0);return}else{var Ie,rt;(Ie=be.current)==null||Ie.style.setProperty("--swipe-amount-x","0px"),(rt=be.current)==null||rt.style.setProperty("--swipe-amount-y","0px")}ue(!1),Z(!1),H(null)},onPointerMove:re=>{var de,ve,le;if(!Ge.current||!Fe||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const xe=re.clientY-Ge.current.y,Ce=re.clientX-Ge.current.x;var Ve;const Ie=(Ve=e.swipeDirections)!=null?Ve:DM(A);!P&&(Math.abs(Ce)>1||Math.abs(xe)>1)&&H(Math.abs(Ce)>Math.abs(xe)?"x":"y");let rt={x:0,y:0};const Es=qt=>1/(1.5+Math.abs(qt)/20);if(P==="y"){if(Ie.includes("top")||Ie.includes("bottom"))if(Ie.includes("top")&&xe<0||Ie.includes("bottom")&&xe>0)rt.y=xe;else{const qt=xe*Es(xe);rt.y=Math.abs(qt)<Math.abs(xe)?qt:xe}}else if(P==="x"&&(Ie.includes("left")||Ie.includes("right")))if(Ie.includes("left")&&Ce<0||Ie.includes("right")&&Ce>0)rt.x=Ce;else{const qt=Ce*Es(Ce);rt.x=Math.abs(qt)<Math.abs(Ce)?qt:Ce}(Math.abs(rt.x)>0||Math.abs(rt.y)>0)&&ue(!0),(ve=be.current)==null||ve.style.setProperty("--swipe-amount-x",`${rt.x}px`),(le=be.current)==null||le.style.setProperty("--swipe-amount-y",`${rt.y}px`)}},Pn&&!c.jsx&&Ae!=="loading"?x.createElement("button",{"aria-label":k,"data-disabled":Tt,"data-close-button":!0,onClick:Tt||!Fe?()=>{}:()=>{U(),c.onDismiss==null||c.onDismiss.call(c,c)},className:ut(N==null?void 0:N.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(ge=I==null?void 0:I.close)!=null?ge:uM):null,(Ae||c.icon||c.promise)&&c.icon!==null&&((I==null?void 0:I[Ae])!==null||c.icon)?x.createElement("div",{"data-icon":"",className:ut(N==null?void 0:N.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||ie():null,c.type!=="loading"?ae:null):null,x.createElement("div",{"data-content":"",className:ut(N==null?void 0:N.content,c==null||(a=c.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:ut(N==null?void 0:N.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?x.createElement("div",{"data-description":"",className:ut(L,an,N==null?void 0:N.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),x.isValidElement(c.cancel)?c.cancel:c.cancel&&Tr(c.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||E,onClick:re=>{Tr(c.cancel)&&Fe&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,re),U())},className:ut(N==null?void 0:N.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,x.isValidElement(c.action)?c.action:c.action&&Tr(c.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||$,onClick:re=>{Tr(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,re),!re.defaultPrevented&&U())},className:ut(N==null?void 0:N.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Ii(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function EM(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?wM:bM;function l(u){["top","right","bottom","left"].forEach(m=>{n[`${s}-${m}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=i:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),n}const NM=x.forwardRef(function(t,n){const{invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:s,closeButton:i,className:l,offset:u,mobileOffset:m,theme:c="light",richColors:p,duration:h,style:y,visibleToasts:v=yM,toastOptions:g,dir:b=Ii(),gap:w=SM,icons:S,containerAriaLabel:D="Notifications"}=t,[C,R]=x.useState([]),M=x.useMemo(()=>Array.from(new Set([o].concat(C.filter(z=>z.position).map(z=>z.position)))),[C,o]),[E,$]=x.useState([]),[B,L]=x.useState(!1),[q,A]=x.useState(!1),[T,_]=x.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=x.useRef(null),I=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=x.useRef(null),P=x.useRef(!1),H=x.useCallback(z=>{R(O=>{var j;return(j=O.find(Y=>Y.id===z.id))!=null&&j.delete||qe.dismiss(z.id),O.filter(({id:Y})=>Y!==z.id)})},[]);return x.useEffect(()=>qe.subscribe(z=>{if(z.dismiss){requestAnimationFrame(()=>{R(O=>O.map(j=>j.id===z.id?{...j,delete:!0}:j))});return}setTimeout(()=>{ka.flushSync(()=>{R(O=>{const j=O.findIndex(Y=>Y.id===z.id);return j!==-1?[...O.slice(0,j),{...O[j],...z},...O.slice(j+1)]:[z,...O]})})})}),[C]),x.useEffect(()=>{if(c!=="system"){_(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?_("dark"):_("light")),typeof window>"u")return;const z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:O})=>{_(O?"dark":"light")})}catch{z.addListener(({matches:j})=>{try{_(j?"dark":"light")}catch(Y){console.error(Y)}})}},[c]),x.useEffect(()=>{C.length<=1&&L(!1)},[C]),x.useEffect(()=>{const z=O=>{var j;if(a.every(V=>O[V]||O.code===V)){var G;L(!0),(G=N.current)==null||G.focus()}O.code==="Escape"&&(document.activeElement===N.current||(j=N.current)!=null&&j.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[a]),x.useEffect(()=>{if(N.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,P.current=!1)}},[N.current]),x.createElement("section",{ref:n,"aria-label":`${D} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((z,O)=>{var j;const[Y,G]=z.split("-");return C.length?x.createElement("ol",{key:z,dir:b==="auto"?Ii():b,tabIndex:-1,ref:N,className:l,"data-sonner-toaster":!0,"data-sonner-theme":T,"data-y-position":Y,"data-x-position":G,style:{"--front-toast-height":`${((j=E[0])==null?void 0:j.height)||0}px`,"--width":`${xM}px`,"--gap":`${w}px`,...y,...EM(u,m)},onBlur:V=>{P.current&&!V.currentTarget.contains(V.relatedTarget)&&(P.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||P.current||(P.current=!0,k.current=V.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{q||L(!1)},onDragEnd:()=>L(!1),onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||A(!0)},onPointerUp:()=>A(!1)},C.filter(V=>!V.position&&O===0||V.position===z).map((V,F)=>{var Z,X;return x.createElement(kM,{key:V.id,icons:S,index:F,toast:V,defaultRichColors:p,duration:(Z=g==null?void 0:g.duration)!=null?Z:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:v,closeButton:(X=g==null?void 0:g.closeButton)!=null?X:i,interacting:q,position:z,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,closeButtonAriaLabel:g==null?void 0:g.closeButtonAriaLabel,removeToast:H,toasts:C.filter(Q=>Q.position==V.position),heights:E.filter(Q=>Q.position==V.position),setHeights:$,expandByDefault:s,gap:w,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),RM={error:"bg-red-500 text-white",info:"bg-blue-500 text-white",warning:"bg-amber-500 text-white",success:"bg-green-500 text-white"},TM={error:5e3,info:4e3,warning:5e3,success:4e3},_M=(e,t)=>{const n=(t==null?void 0:t.variant)||"info",r=RM[n],o=d.jsxs("div",{className:`flex items-center w-full p-3 rounded-md shadow-md ${r}`,children:[(t==null?void 0:t.icon)&&t.iconPosition!=="right"&&d.jsx("div",{className:"mr-3",children:t.icon}),d.jsxs("div",{className:"flex-1",children:[d.jsx("p",{className:"text-sm font-semibold",children:e}),(t==null?void 0:t.description)&&d.jsx("p",{className:"text-sm text-white/90",children:t.description})]}),(t==null?void 0:t.icon)&&t.iconPosition==="right"&&d.jsx("div",{className:"ml-3",children:t.icon}),d.jsx("div",{className:"ml-4",children:t!=null&&t.action?d.jsx(Dt,{variant:"ghost",size:"large",className:"text-white",onClick:t.action.onClick,children:t.action.label}):d.jsx(Dt,{variant:"ghost",size:"icon.large",className:"text-white",onClick:()=>Yn.dismiss(),children:d.jsx(kn,{className:"w-4 h-4",strokeWidth:2.5})})})]}),a={unstyled:!0,duration:(t==null?void 0:t.duration)||TM[n],icon:t==null?void 0:t.icon,iconPosition:t==null?void 0:t.iconPosition,action:t==null?void 0:t.action,variant:t==null?void 0:t.variant};switch(n){case"success":return Yn.success(o,a);case"error":return Yn.error(o,a);case"warning":return Yn.warning(o,a);default:return Yn(o,a)}};function OM(e){return d.jsx(NM,{...e})}var[Mo,mD]=Be("Tooltip",[Ft]),Do=Ft(),jm="TooltipProvider",PM=700,Ma="tooltip.open",[AM,ks]=Mo(jm),$m=e=>{const{__scopeTooltip:t,delayDuration:n=PM,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(AM,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};$m.displayName=jm;var Jn="Tooltip",[IM,ko]=Mo(Jn),Lm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=ks(Jn,e.__scopeTooltip),u=Do(t),[m,c]=f.useState(null),p=ke(),h=f.useRef(0),y=s??l.disableHoverableContent,v=i??l.delayDuration,g=f.useRef(!1),[b,w]=tt({prop:r,defaultProp:o??!1,onChange:M=>{M?(l.onOpen(),document.dispatchEvent(new CustomEvent(Ma))):l.onClose(),a==null||a(M)},caller:Jn}),S=f.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),D=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,w(!0)},[w]),C=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),R=f.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,w(!0),h.current=0},v)},[v,w]);return f.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),d.jsx(or,{...u,children:d.jsx(IM,{scope:t,contentId:p,open:b,stateAttribute:S,trigger:m,onTriggerChange:c,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?R():D()},[l.isOpenDelayedRef,R,D]),onTriggerLeave:f.useCallback(()=>{y?C():(window.clearTimeout(h.current),h.current=0)},[C,y]),onOpen:D,onClose:C,disableHoverableContent:y,children:n})})};Lm.displayName=Jn;var Da="TooltipTrigger",Fm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ko(Da,n),a=ks(Da,n),s=Do(n),i=f.useRef(null),l=he(t,i,o.onTriggerChange),u=f.useRef(!1),m=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(ar,{asChild:!0,...s,children:d.jsx(ee.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:K(e.onPointerMove,p=>{p.pointerType!=="touch"&&!m.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:K(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:K(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:K(e.onBlur,o.onClose),onClick:K(e.onClick,o.onClose)})})});Fm.displayName=Da;var jM="TooltipPortal",[pD,$M]=Mo(jM,{forceMount:void 0}),Cn="TooltipContent",Wm=f.forwardRef((e,t)=>{const n=$M(Cn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=ko(Cn,e.__scopeTooltip);return d.jsx(ze,{present:r||s.open,children:s.disableHoverableContent?d.jsx(Bm,{side:o,...a,ref:t}):d.jsx(LM,{side:o,...a,ref:t})})}),LM=f.forwardRef((e,t)=>{const n=ko(Cn,e.__scopeTooltip),r=ks(Cn,e.__scopeTooltip),o=f.useRef(null),a=he(t,o),[s,i]=f.useState(null),{trigger:l,onClose:u}=n,m=o.current,{onPointerInTransitChange:c}=r,p=f.useCallback(()=>{i(null),c(!1)},[c]),h=f.useCallback((y,v)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},w=YM(b,g.getBoundingClientRect()),S=HM(b,w),D=zM(v.getBoundingClientRect()),C=UM([...S,...D]);i(C),c(!0)},[c]);return f.useEffect(()=>()=>p(),[p]),f.useEffect(()=>{if(l&&m){const y=g=>h(g,m),v=g=>h(g,l);return l.addEventListener("pointerleave",y),m.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",y),m.removeEventListener("pointerleave",v)}}},[l,m,h,p]),f.useEffect(()=>{if(s){const y=v=>{const g=v.target,b={x:v.clientX,y:v.clientY},w=(l==null?void 0:l.contains(g))||(m==null?void 0:m.contains(g)),S=!GM(b,s);w?p():S&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,m,s,u,p]),d.jsx(Bm,{...e,ref:a})}),[FM,WM]=Mo(Jn,{isInside:!1}),BM=Vm("TooltipContent"),Bm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=ko(Cn,n),u=Do(n),{onClose:m}=l;return f.useEffect(()=>(document.addEventListener(Ma,m),()=>document.removeEventListener(Ma,m)),[m]),f.useEffect(()=>{if(l.trigger){const c=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&m()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,m]),d.jsx(En,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:m,children:d.jsxs(ro,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(BM,{children:r}),d.jsx(FM,{scope:n,isInside:!0,children:d.jsx(sy,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Wm.displayName=Cn;var Ym="TooltipArrow",Hm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Do(n);return WM(Ym,n).isInside?null:d.jsx(oo,{...o,...r,ref:t})});Hm.displayName=Ym;function YM(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function HM(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function zM(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function GM(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,m=i.y,c=l.x,p=l.y;m>r!=p>r&&n<(c-u)*(r-m)/(p-m)+u&&(o=!o)}return o}function UM(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),qM(t)}function qM(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var VM=$m,KM=Lm,XM=Fm,zm=Wm,ZM=Hm;const QM=VM,JM=KM,eD=XM,Gm=f.forwardRef(({className:e,sideOffset:t=4,children:n,...r},o)=>d.jsxs(zm,{ref:o,sideOffset:t,className:W("z-50 rounded-xl border border-border bg-background px-3 py-1.5 text-sm text-foreground shadow-xl transition-all","animate-in fade-in zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-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","origin-[--radix-tooltip-content-transform-origin]",e),...r,children:[n,d.jsx(ZM,{className:"fill-background stroke-border h-2 w-4"})]}));Gm.displayName=zm.displayName;exports.ComponentVariant=r1;exports.DoctAddressFormSection=c0;exports.DoctAlert=Ju;exports.DoctAlertDescription=td;exports.DoctAlertTitle=ed;exports.DoctAnimationLoader=Ip;exports.DoctAutoComplete=J0;exports.DoctAutocomplete=u1;exports.DoctAvatar=dd;exports.DoctAvatarFallback=md;exports.DoctAvatarImage=fd;exports.DoctButton=Dt;exports.DoctCheckbox=xd;exports.DoctChip=Jx;exports.DoctCircularProgress=Xi;exports.DoctComponentSection=n1;exports.DoctContactFormSection=u0;exports.DoctCurrencyInput=Gu;exports.DoctDatePickerField=Ur;exports.DoctDialog=z0;exports.DoctDialogClose=q0;exports.DoctDialogContent=ju;exports.DoctDialogDescription=Wu;exports.DoctDialogFooter=Lu;exports.DoctDialogHeader=$u;exports.DoctDialogTitle=Fu;exports.DoctDialogTrigger=G0;exports.DoctDrawer=Pd;exports.DoctDrawerClose=cS;exports.DoctDrawerContent=Id;exports.DoctDrawerDescription=Fd;exports.DoctDrawerFooter=$d;exports.DoctDrawerHeader=jd;exports.DoctDrawerTitle=Ld;exports.DoctDrawerTrigger=sS;exports.DoctDropdownMenu=TC;exports.DoctDropdownMenuCheckboxItem=qf;exports.DoctDropdownMenuContent=Gf;exports.DoctDropdownMenuGroup=OC;exports.DoctDropdownMenuItem=Uf;exports.DoctDropdownMenuLabel=Kf;exports.DoctDropdownMenuRadioGroup=AC;exports.DoctDropdownMenuRadioItem=Vf;exports.DoctDropdownMenuSeparator=Xf;exports.DoctDropdownMenuShortcut=Zf;exports.DoctDropdownMenuSub=PC;exports.DoctDropdownMenuSubContent=zf;exports.DoctDropdownMenuSubTrigger=Hf;exports.DoctDropdownMenuTrigger=_C;exports.DoctExpandableCard=v1;exports.DoctLabeledInput=Qe;exports.DoctManualDatePickerField=Qx;exports.DoctOtpInput=Fp;exports.DoctPasswordInput=ra;exports.DoctPopover=Ba;exports.DoctPopoverContent=co;exports.DoctPopoverTrigger=Ya;exports.DoctProgress=Im;exports.DoctRadioGroup=fm;exports.DoctRadioGroupItem=mm;exports.DoctSearchFilterSection=o0;exports.DoctSearchInput=lu;exports.DoctSelectField=Sn;exports.DoctTabs=VC;exports.DoctTabsContent=Rm;exports.DoctTabsList=Em;exports.DoctTabsTrigger=Nm;exports.DoctTextareaField=Ra;exports.DoctToaster=OM;exports.DoctTooltip=JM;exports.DoctTooltipContent=Gm;exports.DoctTooltipProvider=QM;exports.DoctTooltipTrigger=eD;exports.DoctTypography=Ap;exports.DoctUserRegistrationSection=s0;exports.doctToast=_M;
208
+ Defaulting to \`null\`.`}var Am=Tm,tM=Om;const Im=f.forwardRef(({className:e,value:t,...n},r)=>d.jsx(Am,{ref:r,className:W("relative h-1.5 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:d.jsx(tM,{className:"h-full w-full flex-1 bg-brandBlue transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Im.displayName=Am.displayName;function nM(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const rM=e=>{switch(e){case"success":return sM;case"info":return cM;case"warning":return iM;case"error":return lM;default:return null}},oM=Array(12).fill(0),aM=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},oM.map((n,r)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),sM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),iM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),cM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),lM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),uM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},x.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),dM=()=>{const[e,t]=x.useState(document.hidden);return x.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ca=1;class fM{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Ca++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...o,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async u=>{if(s=["resolve",u],x.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(pM(u)&&!u.ok){a=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,y=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...y})}else if(u instanceof Error){a=!1;const c=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,y=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...y})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,y=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:p,...y})}}).catch(async u=>{if(s=["reject",u],n.error!==void 0){a=!1;const m=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,h=typeof m=="object"&&!x.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:c,...h})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,m)=>i.then(()=>s[0]==="reject"?m(s[1]):u(s[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Ca++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const qe=new fM,mM=(e,t)=>{const n=(t==null?void 0:t.id)||Ca++;return qe.addToast({title:e,...t,id:n}),n},pM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",hM=mM,gM=()=>qe.toasts,vM=()=>qe.getActiveToasts(),Yn=Object.assign(hM,{success:qe.success,info:qe.info,warning:qe.warning,error:qe.error,custom:qe.custom,message:qe.message,promise:qe.promise,dismiss:qe.dismiss,loading:qe.loading},{getHistory:gM,getToasts:vM});nM("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Tr(e){return e.label!==void 0}const yM=3,bM="24px",wM="16px",Ai=4e3,xM=356,SM=14,CM=45,MM=200;function ut(...e){return e.filter(Boolean).join(" ")}function DM(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const kM=e=>{var t,n,r,o,a,s,i,l,u;const{invert:m,toast:c,unstyled:p,interacting:h,setHeights:y,visibleToasts:v,heights:g,index:b,toasts:w,expanded:S,removeToast:D,defaultRichColors:C,closeButton:N,style:M,cancelButtonStyle:E,actionButtonStyle:$,className:B="",descriptionClassName:L="",duration:q,position:A,gap:T,expandByDefault:_,classNames:R,icons:I,closeButtonAriaLabel:k="Close toast"}=e,[P,H]=x.useState(null),[z,O]=x.useState(null),[j,Y]=x.useState(!1),[G,V]=x.useState(!1),[F,Z]=x.useState(!1),[X,Q]=x.useState(!1),[se,ue]=x.useState(!1),[ye,J]=x.useState(0),[Re,Te]=x.useState(0),oe=x.useRef(c.duration||q||Ai),me=x.useRef(null),be=x.useRef(null),$e=b===0,He=b+1<=v,Ae=c.type,Fe=c.dismissible!==!1,zt=c.className||"",an=c.descriptionClassName||"",Rt=x.useMemo(()=>g.findIndex(re=>re.toastId===c.id)||0,[g,c.id]),Pn=x.useMemo(()=>{var re;return(re=c.closeButton)!=null?re:N},[c.closeButton,N]),bt=x.useMemo(()=>c.duration||q||Ai,[c.duration,q]),Gt=x.useRef(0),nt=x.useRef(0),sn=x.useRef(0),Ge=x.useRef(null),[cn,An]=A.split("-"),ln=x.useMemo(()=>g.reduce((re,de,ve)=>ve>=Rt?re:re+de.height,0),[g,Rt]),Ut=dM(),In=c.invert||m,Tt=Ae==="loading";nt.current=x.useMemo(()=>Rt*T+ln,[Rt,ln]),x.useEffect(()=>{oe.current=bt},[bt]),x.useEffect(()=>{Y(!0)},[]),x.useEffect(()=>{const re=be.current;if(re){const de=re.getBoundingClientRect().height;return Te(de),y(ve=>[{toastId:c.id,height:de,position:c.position},...ve]),()=>y(ve=>ve.filter(le=>le.toastId!==c.id))}},[y,c.id]),x.useLayoutEffect(()=>{if(!j)return;const re=be.current,de=re.style.height;re.style.height="auto";const ve=re.getBoundingClientRect().height;re.style.height=de,Te(ve),y(le=>le.find(xe=>xe.toastId===c.id)?le.map(xe=>xe.toastId===c.id?{...xe,height:ve}:xe):[{toastId:c.id,height:ve,position:c.position},...le])},[j,c.title,c.description,y,c.id,c.jsx,c.action,c.cancel]);const U=x.useCallback(()=>{V(!0),J(nt.current),y(re=>re.filter(de=>de.toastId!==c.id)),setTimeout(()=>{D(c)},MM)},[c,D,y,nt]);x.useEffect(()=>{if(c.promise&&Ae==="loading"||c.duration===1/0||c.type==="loading")return;let re;return S||h||Ut?(()=>{if(sn.current<Gt.current){const le=new Date().getTime()-Gt.current;oe.current=oe.current-le}sn.current=new Date().getTime()})():(()=>{oe.current!==1/0&&(Gt.current=new Date().getTime(),re=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),U()},oe.current))})(),()=>clearTimeout(re)},[S,h,c,Ae,Ut,U]),x.useEffect(()=>{c.delete&&(U(),c.onDismiss==null||c.onDismiss.call(c,c))},[U,c.delete]);function ie(){var re;if(I!=null&&I.loading){var de;return x.createElement("div",{className:ut(R==null?void 0:R.loader,c==null||(de=c.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":Ae==="loading"},I.loading)}return x.createElement(aM,{className:ut(R==null?void 0:R.loader,c==null||(re=c.classNames)==null?void 0:re.loader),visible:Ae==="loading"})}const ae=c.icon||(I==null?void 0:I[Ae])||rM(Ae);var fe,ge;return x.createElement("li",{tabIndex:0,ref:be,className:ut(B,zt,R==null?void 0:R.toast,c==null||(t=c.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[Ae],c==null||(n=c.classNames)==null?void 0:n[Ae]),"data-sonner-toast":"","data-rich-colors":(fe=c.richColors)!=null?fe:C,"data-styled":!(c.jsx||c.unstyled||p),"data-mounted":j,"data-promise":!!c.promise,"data-swiped":se,"data-removed":G,"data-visible":He,"data-y-position":cn,"data-x-position":An,"data-index":b,"data-front":$e,"data-swiping":F,"data-dismissible":Fe,"data-type":Ae,"data-invert":In,"data-swipe-out":X,"data-swipe-direction":z,"data-expanded":!!(S||_&&j),style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${G?ye:nt.current}px`,"--initial-height":_?"auto":`${Re}px`,...M,...c.style},onDragEnd:()=>{Z(!1),H(null),Ge.current=null},onPointerDown:re=>{re.button!==2&&(Tt||!Fe||(me.current=new Date,J(nt.current),re.target.setPointerCapture(re.pointerId),re.target.tagName!=="BUTTON"&&(Z(!0),Ge.current={x:re.clientX,y:re.clientY})))},onPointerUp:()=>{var re,de,ve;if(X||!Fe)return;Ge.current=null;const le=Number(((re=be.current)==null?void 0:re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ue=Number(((de=be.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xe=new Date().getTime()-((ve=me.current)==null?void 0:ve.getTime()),Ce=P==="x"?le:Ue,Ve=Math.abs(Ce)/xe;if(Math.abs(Ce)>=CM||Ve>.11){J(nt.current),c.onDismiss==null||c.onDismiss.call(c,c),O(P==="x"?le>0?"right":"left":Ue>0?"down":"up"),U(),Q(!0);return}else{var Ie,rt;(Ie=be.current)==null||Ie.style.setProperty("--swipe-amount-x","0px"),(rt=be.current)==null||rt.style.setProperty("--swipe-amount-y","0px")}ue(!1),Z(!1),H(null)},onPointerMove:re=>{var de,ve,le;if(!Ge.current||!Fe||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const xe=re.clientY-Ge.current.y,Ce=re.clientX-Ge.current.x;var Ve;const Ie=(Ve=e.swipeDirections)!=null?Ve:DM(A);!P&&(Math.abs(Ce)>1||Math.abs(xe)>1)&&H(Math.abs(Ce)>Math.abs(xe)?"x":"y");let rt={x:0,y:0};const Es=qt=>1/(1.5+Math.abs(qt)/20);if(P==="y"){if(Ie.includes("top")||Ie.includes("bottom"))if(Ie.includes("top")&&xe<0||Ie.includes("bottom")&&xe>0)rt.y=xe;else{const qt=xe*Es(xe);rt.y=Math.abs(qt)<Math.abs(xe)?qt:xe}}else if(P==="x"&&(Ie.includes("left")||Ie.includes("right")))if(Ie.includes("left")&&Ce<0||Ie.includes("right")&&Ce>0)rt.x=Ce;else{const qt=Ce*Es(Ce);rt.x=Math.abs(qt)<Math.abs(Ce)?qt:Ce}(Math.abs(rt.x)>0||Math.abs(rt.y)>0)&&ue(!0),(ve=be.current)==null||ve.style.setProperty("--swipe-amount-x",`${rt.x}px`),(le=be.current)==null||le.style.setProperty("--swipe-amount-y",`${rt.y}px`)}},Pn&&!c.jsx&&Ae!=="loading"?x.createElement("button",{"aria-label":k,"data-disabled":Tt,"data-close-button":!0,onClick:Tt||!Fe?()=>{}:()=>{U(),c.onDismiss==null||c.onDismiss.call(c,c)},className:ut(R==null?void 0:R.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(ge=I==null?void 0:I.close)!=null?ge:uM):null,(Ae||c.icon||c.promise)&&c.icon!==null&&((I==null?void 0:I[Ae])!==null||c.icon)?x.createElement("div",{"data-icon":"",className:ut(R==null?void 0:R.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||ie():null,c.type!=="loading"?ae:null):null,x.createElement("div",{"data-content":"",className:ut(R==null?void 0:R.content,c==null||(a=c.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:ut(R==null?void 0:R.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?x.createElement("div",{"data-description":"",className:ut(L,an,R==null?void 0:R.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),x.isValidElement(c.cancel)?c.cancel:c.cancel&&Tr(c.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||E,onClick:re=>{Tr(c.cancel)&&Fe&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,re),U())},className:ut(R==null?void 0:R.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,x.isValidElement(c.action)?c.action:c.action&&Tr(c.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||$,onClick:re=>{Tr(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,re),!re.defaultPrevented&&U())},className:ut(R==null?void 0:R.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Ii(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function EM(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?wM:bM;function l(u){["top","right","bottom","left"].forEach(m=>{n[`${s}-${m}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=i:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),n}const NM=x.forwardRef(function(t,n){const{invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:s,closeButton:i,className:l,offset:u,mobileOffset:m,theme:c="light",richColors:p,duration:h,style:y,visibleToasts:v=yM,toastOptions:g,dir:b=Ii(),gap:w=SM,icons:S,containerAriaLabel:D="Notifications"}=t,[C,N]=x.useState([]),M=x.useMemo(()=>Array.from(new Set([o].concat(C.filter(z=>z.position).map(z=>z.position)))),[C,o]),[E,$]=x.useState([]),[B,L]=x.useState(!1),[q,A]=x.useState(!1),[T,_]=x.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),R=x.useRef(null),I=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=x.useRef(null),P=x.useRef(!1),H=x.useCallback(z=>{N(O=>{var j;return(j=O.find(Y=>Y.id===z.id))!=null&&j.delete||qe.dismiss(z.id),O.filter(({id:Y})=>Y!==z.id)})},[]);return x.useEffect(()=>qe.subscribe(z=>{if(z.dismiss){requestAnimationFrame(()=>{N(O=>O.map(j=>j.id===z.id?{...j,delete:!0}:j))});return}setTimeout(()=>{ka.flushSync(()=>{N(O=>{const j=O.findIndex(Y=>Y.id===z.id);return j!==-1?[...O.slice(0,j),{...O[j],...z},...O.slice(j+1)]:[z,...O]})})})}),[C]),x.useEffect(()=>{if(c!=="system"){_(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?_("dark"):_("light")),typeof window>"u")return;const z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:O})=>{_(O?"dark":"light")})}catch{z.addListener(({matches:j})=>{try{_(j?"dark":"light")}catch(Y){console.error(Y)}})}},[c]),x.useEffect(()=>{C.length<=1&&L(!1)},[C]),x.useEffect(()=>{const z=O=>{var j;if(a.every(V=>O[V]||O.code===V)){var G;L(!0),(G=R.current)==null||G.focus()}O.code==="Escape"&&(document.activeElement===R.current||(j=R.current)!=null&&j.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[a]),x.useEffect(()=>{if(R.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,P.current=!1)}},[R.current]),x.createElement("section",{ref:n,"aria-label":`${D} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((z,O)=>{var j;const[Y,G]=z.split("-");return C.length?x.createElement("ol",{key:z,dir:b==="auto"?Ii():b,tabIndex:-1,ref:R,className:l,"data-sonner-toaster":!0,"data-sonner-theme":T,"data-y-position":Y,"data-x-position":G,style:{"--front-toast-height":`${((j=E[0])==null?void 0:j.height)||0}px`,"--width":`${xM}px`,"--gap":`${w}px`,...y,...EM(u,m)},onBlur:V=>{P.current&&!V.currentTarget.contains(V.relatedTarget)&&(P.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||P.current||(P.current=!0,k.current=V.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{q||L(!1)},onDragEnd:()=>L(!1),onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||A(!0)},onPointerUp:()=>A(!1)},C.filter(V=>!V.position&&O===0||V.position===z).map((V,F)=>{var Z,X;return x.createElement(kM,{key:V.id,icons:S,index:F,toast:V,defaultRichColors:p,duration:(Z=g==null?void 0:g.duration)!=null?Z:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:v,closeButton:(X=g==null?void 0:g.closeButton)!=null?X:i,interacting:q,position:z,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,closeButtonAriaLabel:g==null?void 0:g.closeButtonAriaLabel,removeToast:H,toasts:C.filter(Q=>Q.position==V.position),heights:E.filter(Q=>Q.position==V.position),setHeights:$,expandByDefault:s,gap:w,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),RM={error:"bg-red-500 text-white",info:"bg-blue-500 text-white",warning:"bg-amber-500 text-white",success:"bg-green-500 text-white"},TM={error:5e3,info:4e3,warning:5e3,success:4e3},_M=(e,t)=>{const n=(t==null?void 0:t.variant)||"info",r=RM[n],o=d.jsxs("div",{className:`flex items-center w-full p-3 rounded-md shadow-md ${r}`,children:[(t==null?void 0:t.icon)&&t.iconPosition!=="right"&&d.jsx("div",{className:"mr-3",children:t.icon}),d.jsxs("div",{className:"flex-1",children:[d.jsx("p",{className:"text-sm font-semibold",children:e}),(t==null?void 0:t.description)&&d.jsx("p",{className:"text-sm text-white/90",children:t.description})]}),(t==null?void 0:t.icon)&&t.iconPosition==="right"&&d.jsx("div",{className:"ml-3",children:t.icon}),d.jsx("div",{className:"ml-4",children:t!=null&&t.action?d.jsx(Dt,{variant:"ghost",size:"large",className:"text-white",onClick:t.action.onClick,children:t.action.label}):d.jsx(Dt,{variant:"ghost",size:"icon.large",className:"text-white",onClick:()=>Yn.dismiss(),children:d.jsx(kn,{className:"w-4 h-4",strokeWidth:2.5})})})]}),a={unstyled:!0,duration:(t==null?void 0:t.duration)||TM[n],icon:t==null?void 0:t.icon,iconPosition:t==null?void 0:t.iconPosition,action:t==null?void 0:t.action,variant:t==null?void 0:t.variant};switch(n){case"success":return Yn.success(o,a);case"error":return Yn.error(o,a);case"warning":return Yn.warning(o,a);default:return Yn(o,a)}};function OM(e){return d.jsx(NM,{...e})}var[Mo,mD]=Be("Tooltip",[Ft]),Do=Ft(),jm="TooltipProvider",PM=700,Ma="tooltip.open",[AM,ks]=Mo(jm),$m=e=>{const{__scopeTooltip:t,delayDuration:n=PM,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(AM,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};$m.displayName=jm;var Jn="Tooltip",[IM,ko]=Mo(Jn),Lm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=ks(Jn,e.__scopeTooltip),u=Do(t),[m,c]=f.useState(null),p=ke(),h=f.useRef(0),y=s??l.disableHoverableContent,v=i??l.delayDuration,g=f.useRef(!1),[b,w]=tt({prop:r,defaultProp:o??!1,onChange:M=>{M?(l.onOpen(),document.dispatchEvent(new CustomEvent(Ma))):l.onClose(),a==null||a(M)},caller:Jn}),S=f.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),D=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,w(!0)},[w]),C=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),N=f.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,w(!0),h.current=0},v)},[v,w]);return f.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),d.jsx(or,{...u,children:d.jsx(IM,{scope:t,contentId:p,open:b,stateAttribute:S,trigger:m,onTriggerChange:c,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?N():D()},[l.isOpenDelayedRef,N,D]),onTriggerLeave:f.useCallback(()=>{y?C():(window.clearTimeout(h.current),h.current=0)},[C,y]),onOpen:D,onClose:C,disableHoverableContent:y,children:n})})};Lm.displayName=Jn;var Da="TooltipTrigger",Fm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ko(Da,n),a=ks(Da,n),s=Do(n),i=f.useRef(null),l=he(t,i,o.onTriggerChange),u=f.useRef(!1),m=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(ar,{asChild:!0,...s,children:d.jsx(ee.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:K(e.onPointerMove,p=>{p.pointerType!=="touch"&&!m.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:K(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:K(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:K(e.onBlur,o.onClose),onClick:K(e.onClick,o.onClose)})})});Fm.displayName=Da;var jM="TooltipPortal",[pD,$M]=Mo(jM,{forceMount:void 0}),Cn="TooltipContent",Wm=f.forwardRef((e,t)=>{const n=$M(Cn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=ko(Cn,e.__scopeTooltip);return d.jsx(ze,{present:r||s.open,children:s.disableHoverableContent?d.jsx(Bm,{side:o,...a,ref:t}):d.jsx(LM,{side:o,...a,ref:t})})}),LM=f.forwardRef((e,t)=>{const n=ko(Cn,e.__scopeTooltip),r=ks(Cn,e.__scopeTooltip),o=f.useRef(null),a=he(t,o),[s,i]=f.useState(null),{trigger:l,onClose:u}=n,m=o.current,{onPointerInTransitChange:c}=r,p=f.useCallback(()=>{i(null),c(!1)},[c]),h=f.useCallback((y,v)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},w=YM(b,g.getBoundingClientRect()),S=HM(b,w),D=zM(v.getBoundingClientRect()),C=UM([...S,...D]);i(C),c(!0)},[c]);return f.useEffect(()=>()=>p(),[p]),f.useEffect(()=>{if(l&&m){const y=g=>h(g,m),v=g=>h(g,l);return l.addEventListener("pointerleave",y),m.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",y),m.removeEventListener("pointerleave",v)}}},[l,m,h,p]),f.useEffect(()=>{if(s){const y=v=>{const g=v.target,b={x:v.clientX,y:v.clientY},w=(l==null?void 0:l.contains(g))||(m==null?void 0:m.contains(g)),S=!GM(b,s);w?p():S&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,m,s,u,p]),d.jsx(Bm,{...e,ref:a})}),[FM,WM]=Mo(Jn,{isInside:!1}),BM=Vm("TooltipContent"),Bm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=ko(Cn,n),u=Do(n),{onClose:m}=l;return f.useEffect(()=>(document.addEventListener(Ma,m),()=>document.removeEventListener(Ma,m)),[m]),f.useEffect(()=>{if(l.trigger){const c=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&m()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,m]),d.jsx(En,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:m,children:d.jsxs(ro,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(BM,{children:r}),d.jsx(FM,{scope:n,isInside:!0,children:d.jsx(sy,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Wm.displayName=Cn;var Ym="TooltipArrow",Hm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Do(n);return WM(Ym,n).isInside?null:d.jsx(oo,{...o,...r,ref:t})});Hm.displayName=Ym;function YM(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function HM(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function zM(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function GM(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,m=i.y,c=l.x,p=l.y;m>r!=p>r&&n<(c-u)*(r-m)/(p-m)+u&&(o=!o)}return o}function UM(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),qM(t)}function qM(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var VM=$m,KM=Lm,XM=Fm,zm=Wm,ZM=Hm;const QM=VM,JM=KM,eD=XM,Gm=f.forwardRef(({className:e,sideOffset:t=4,children:n,...r},o)=>d.jsxs(zm,{ref:o,sideOffset:t,className:W("z-50 rounded-xl border border-border bg-background px-3 py-1.5 text-sm text-foreground shadow-xl transition-all","animate-in fade-in zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-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","origin-[--radix-tooltip-content-transform-origin]",e),...r,children:[n,d.jsx(ZM,{className:"fill-background stroke-border h-2 w-4"})]}));Gm.displayName=zm.displayName;exports.ComponentVariant=r1;exports.DoctAddressFormSection=c0;exports.DoctAlert=Ju;exports.DoctAlertDescription=td;exports.DoctAlertTitle=ed;exports.DoctAnimationLoader=Ip;exports.DoctAutoComplete=J0;exports.DoctAutocomplete=u1;exports.DoctAvatar=dd;exports.DoctAvatarFallback=md;exports.DoctAvatarImage=fd;exports.DoctButton=Dt;exports.DoctCheckbox=xd;exports.DoctChip=Jx;exports.DoctCircularProgress=Xi;exports.DoctComponentSection=n1;exports.DoctContactFormSection=u0;exports.DoctCurrencyInput=Gu;exports.DoctDatePickerField=Ur;exports.DoctDialog=z0;exports.DoctDialogClose=q0;exports.DoctDialogContent=ju;exports.DoctDialogDescription=Wu;exports.DoctDialogFooter=Lu;exports.DoctDialogHeader=$u;exports.DoctDialogTitle=Fu;exports.DoctDialogTrigger=G0;exports.DoctDrawer=Pd;exports.DoctDrawerClose=cS;exports.DoctDrawerContent=Id;exports.DoctDrawerDescription=Fd;exports.DoctDrawerFooter=$d;exports.DoctDrawerHeader=jd;exports.DoctDrawerTitle=Ld;exports.DoctDrawerTrigger=sS;exports.DoctDropdownMenu=TC;exports.DoctDropdownMenuCheckboxItem=qf;exports.DoctDropdownMenuContent=Gf;exports.DoctDropdownMenuGroup=OC;exports.DoctDropdownMenuItem=Uf;exports.DoctDropdownMenuLabel=Kf;exports.DoctDropdownMenuRadioGroup=AC;exports.DoctDropdownMenuRadioItem=Vf;exports.DoctDropdownMenuSeparator=Xf;exports.DoctDropdownMenuShortcut=Zf;exports.DoctDropdownMenuSub=PC;exports.DoctDropdownMenuSubContent=zf;exports.DoctDropdownMenuSubTrigger=Hf;exports.DoctDropdownMenuTrigger=_C;exports.DoctExpandableCard=v1;exports.DoctLabeledInput=Qe;exports.DoctManualDatePickerField=Qx;exports.DoctOtpInput=Fp;exports.DoctPasswordInput=ra;exports.DoctPopover=Ba;exports.DoctPopoverContent=co;exports.DoctPopoverTrigger=Ya;exports.DoctProgress=Im;exports.DoctRadioGroup=fm;exports.DoctRadioGroupItem=mm;exports.DoctSearchFilterSection=o0;exports.DoctSearchInput=lu;exports.DoctSelectField=Sn;exports.DoctTabs=VC;exports.DoctTabsContent=Rm;exports.DoctTabsList=Em;exports.DoctTabsTrigger=Nm;exports.DoctTextareaField=Ra;exports.DoctToaster=OM;exports.DoctTooltip=JM;exports.DoctTooltipContent=Gm;exports.DoctTooltipProvider=QM;exports.DoctTooltipTrigger=eD;exports.DoctTypography=Ap;exports.DoctUserRegistrationSection=s0;exports.doctToast=_M;