docthub-core-components 1.0.45 → 1.0.47
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"),w=require("react"),Xr=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(w),Zr=ji(Xr);function Es(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nt(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Es(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():Es(e[o],null)}}}}function he(...e){return f.useCallback(Nt(...e),e)}function Ft(e){const t=qm(e),n=f.forwardRef((r,o)=>{const{children:a,...i}=r,s=f.Children.toArray(a),l=s.find(Km);if(l){const u=l.props.children,m=s.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,{...i,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,m):null})}return d.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Um=Ft("Slot");function qm(e){const t=f.forwardRef((n,r)=>{const{children:o,...a}=n;if(f.isValidElement(o)){const i=Zm(o),s=Xm(a,o.props);return o.type!==f.Fragment&&(s.ref=r?Nt(r,i):i),f.cloneElement(o,s)}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]=(...s)=>{const l=a(...s);return o(...s),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 Ns=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rs=Fi,Qr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Rs(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=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=Ns(m)||Ns(c);return o[u][p]}),s=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,...s}[v]):{...a,...s}[v]===g})?[...u,c,p]:u},[]);return Rs(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},ka="-",Qm=e=>{const t=ep(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split(ka);return s[0]===""&&s.length!==1&&s.shift(),Wi(s,t)||Jm(i)},getConflictingClassGroupIds:(i,s)=>{const l=n[i]||[];return s&&r[i]?[...l,...r[i]]:l}}},Wi=(e,t)=>{var i;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(ka);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Ts=/^\[(.+)\]$/,Jm=e=>{if(Ts.test(e)){const t=Ts.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:_s(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,i])=>{Jo(i,_s(t,a),n,r)})})},_s=(e,t)=>{let n=e;return t.split(ka).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,i)=>{n.set(a,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return o(a,i),i},set(a,i){n.has(a)?n.set(a,i):o(a,i)}}},ea="!",ta=":",rp=ta.length,op=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let i=0,s=0,l=0,u;for(let y=0;y<o.length;y++){let v=o[y];if(i===0&&s===0){if(v===ta){a.push(o.slice(l,y)),l=y+rp;continue}if(v==="/"){u=y;continue}}v==="["?i++:v==="]"?i--:v==="("?s++:v===")"&&s--}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=i=>i.startsWith(o)?a(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,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(i=>{i[0]==="["||t[i]?(o.push(...a.sort(),i),a=[]):a.push(i)}),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,i=[],s=e.trim().split(cp);let l="";for(let u=s.length-1;u>=0;u-=1){const m=s[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 x=a(p).join(":"),S=h?x+ea:x,D=S+b;if(i.includes(D))continue;i.push(D);const C=o(b,g);for(let R=0;R<C.length;++R){const M=C[R];i.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=i;function i(l){const u=t.reduce((m,c)=>c(m),e());return n=ip(u),r=n.cache.get,o=n.cache.set,a=s,s(l)}function s(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)\(.+\)$/,dn=e=>fp.test(e),pe=e=>!!e&&!Number.isNaN(Number(e)),It=e=>!!e&&Number.isInteger(Number(e)),Eo=e=>e.endsWith("%")&&pe(e.slice(0,-1)),Mt=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=>!ne(e)&&!re(e),Cp=e=>Dn(e,qi,zi),ne=e=>Yi.test(e),Xt=e=>Dn(e,Vi,bp),No=e=>Dn(e,Np,pe),Os=e=>Dn(e,Gi,zi),Mp=e=>Dn(e,Ui,xp),yr=e=>Dn(e,Ki,wp),re=e=>Hi.test(e),jn=e=>kn(e,Vi),Dp=e=>kn(e,Rp),Ps=e=>kn(e,Gi),kp=e=>kn(e,qi),Ep=e=>kn(e,Ui),br=e=>kn(e,Ki,!0),Dn=(e,t,n)=>{const r=Yi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},kn=(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"),i=$e("breakpoint"),s=$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"),x=$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(),re,ne],R=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],N=()=>[re,ne,l],$=()=>[dn,"full","auto",...N()],F=()=>[It,"none","subgrid",re,ne],W=()=>["auto",{span:["full",It,re,ne]},It,re,ne],q=()=>[It,"auto",re,ne],I=()=>["auto","min","max","fr",re,ne],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],O=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...N()],A=()=>[dn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],k=()=>[e,re,ne],P=()=>[...D(),Ps,Os,{position:[re,ne]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",kp,Cp,{size:[re,ne]}],T=()=>[Eo,jn,Xt],j=()=>["","none","full",u,re,ne],H=()=>["",pe,jn,Xt],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"],L=()=>[pe,Eo,Ps,Os],K=()=>["","none",y,re,ne],X=()=>["none",pe,re,ne],Q=()=>["none",pe,re,ne],J=()=>[pe,re,ne],ae=()=>[dn,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Mt],breakpoint:[Mt],color:[yp],container:[Mt],"drop-shadow":[Mt],ease:["in","out","in-out"],font:[Sp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Mt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Mt],shadow:[Mt],spacing:["px",pe],text:[Mt],"text-shadow":[Mt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",dn,ne,re,g]}],container:["container"],columns:[{columns:[pe,ne,re,s]}],"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:[It,"auto",re,ne]}],basis:[{basis:[dn,"full","auto",s,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pe,dn,"auto","initial","none",ne]}],grow:[{grow:["",pe,re,ne]}],shrink:[{shrink:["",pe,re,ne]}],order:[{order:[It,"first","last","none",re,ne]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:W()}],"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":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...O(),"normal"]}],"justify-self":[{"justify-self":["auto",...O()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...O(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...O(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...O(),"baseline"]}],"place-self":[{"place-self":["auto",...O()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],w:[{w:[s,"screen",...A()]}],"min-w":[{"min-w":[s,"screen","none",...A()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",n,jn,Xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,re,No]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Eo,ne]}],"font-family":[{font:[Dp,ne,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,re,ne]}],"line-clamp":[{"line-clamp":[pe,"none",re,No]}],leading:[{leading:[a,...N()]}],"list-image":[{"list-image":["none",re,ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",re,ne]}],"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",re,Xt]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[pe,"auto",re,ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re,ne]}],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",re,ne]}],"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:Y()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},It,re,ne],radial:["",re,ne],conic:[It,re,ne]},Ep,Mp]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"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:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"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,re,ne]}],"outline-w":[{outline:["",pe,jn,Xt]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",m,br,yr]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",c,br,yr]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[pe,Xt]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",p,br,yr]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[pe,re,ne]}],"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":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"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":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"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":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"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":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"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":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"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":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"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":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[re,ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"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":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"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:Y()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",re,ne]}],filter:[{filter:["","none",re,ne]}],blur:[{blur:K()}],brightness:[{brightness:[pe,re,ne]}],contrast:[{contrast:[pe,re,ne]}],"drop-shadow":[{"drop-shadow":["","none",h,br,yr]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",pe,re,ne]}],"hue-rotate":[{"hue-rotate":[pe,re,ne]}],invert:[{invert:["",pe,re,ne]}],saturate:[{saturate:[pe,re,ne]}],sepia:[{sepia:["",pe,re,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",re,ne]}],"backdrop-blur":[{"backdrop-blur":K()}],"backdrop-brightness":[{"backdrop-brightness":[pe,re,ne]}],"backdrop-contrast":[{"backdrop-contrast":[pe,re,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pe,re,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pe,re,ne]}],"backdrop-invert":[{"backdrop-invert":["",pe,re,ne]}],"backdrop-opacity":[{"backdrop-opacity":[pe,re,ne]}],"backdrop-saturate":[{"backdrop-saturate":[pe,re,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",pe,re,ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",re,ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pe,"initial",re,ne]}],ease:[{ease:["linear","initial",b,re,ne]}],delay:[{delay:[pe,re,ne]}],animate:[{animate:["none",x,re,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,re,ne]}],"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:J()}],"skew-x":[{"skew-x":J()}],"skew-y":[{"skew-y":J()}],transform:[{transform:[re,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"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",re,ne]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",re,ne]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[pe,jn,Xt,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 B(...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}}),Rt=w.forwardRef(({className:e,variant:t,size:n,iconSize:r,iconPosition:o,fullWidth:a,asChild:i=!1,icon:s,iconOnly:l,children:u,...m},c)=>{const p=i?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:B(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:[s&&d.jsx("span",{"data-testid":"button-icon",children:s}),!l&&u]})});Rt.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 i=Op[e]??{fontSize:"16px",tag:"p"},{fontSize:s,tag:l}=i;return d.jsx(l,{className:a,style:{fontSize:s,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 i=Math.max((e-t)/2,0),s=2*Math.PI*i;return d.jsxs("svg",{ref:a,width:e,height:e,viewBox:`0 0 ${e} ${e}`,className:B("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:i,stroke:"currentColor",strokeWidth:t,fill:"none"}),d.jsx("circle",{className:B(r),cx:e/2,cy:e/2,r:i,stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeDasharray:s,strokeDashoffset:s*.75,fill:"none"})]})});Xi.displayName="CircularProgress";const on=f.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:B("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}));on.displayName="Input";var jp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],te=jp.reduce((e,t)=>{const n=Ft(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:i,...s}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...s,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(te.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"),an=f.forwardRef(({className:e,...t},n)=>d.jsx(Ji,{ref:n,className:B(Lp(),e),...t}));an.displayName=Ji.displayName;const rt=({label:e,placeholder:t,helperText:n,error:r,required:o,type:a="text",leftIcon:i,rightIcon:s,className:l,inputClassName:u,onChange:m,showCharCount:c,maxLength:p,value:h,disabled:y,fridged:v,...g})=>{const[b,x]=w.useState((h==null?void 0:h.length)||0),S=R=>{m&&m(R),x(R.target.value.length)},D=c&&typeof p=="number",C=v||y;return d.jsxs("div",{className:B("space-y-1",l),children:[e&&d.jsxs(an,{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:[i&&d.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:i}),s&&d.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:s}),d.jsx(on,{type:a,placeholder:t,disabled:y,value:h,maxLength:p,onChange:S,className:B(i&&"pl-10",s&&"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:B("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:i,inputClassName:s="h-8 w-8"})=>{const l=w.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:B("space-y-2",a),children:[t&&d.jsx(an,{className:"text-sm font-medium text-gray-700",children:t}),d.jsx("div",{className:"flex gap-1",children:n.map((c,p)=>d.jsx(on,{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:B("text-center p-0 text-lg font-semibold",i&&"border-red-500 focus-visible:ring-red-500",s)},p))}),i&&d.jsx("p",{className:"text-xs text-red-500 mt-1",children:i})]})};/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),w=require("react"),Xr=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(w),Zr=ji(Xr);function Es(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Et(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Es(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():Es(e[o],null)}}}}function he(...e){return f.useCallback(Et(...e),e)}function Lt(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=Lt("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?Et(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 Ns=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Rs=Fi,Qr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Rs(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=Ns(m)||Ns(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[g,v]=y;return Array.isArray(v)?v.includes({...a,...i}[g]):{...a,...i}[g]===v})?[...u,c,p]:u},[]);return Rs(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},ka="-",Qm=e=>{const t=ep(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(ka);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(ka);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},Ts=/^\[(.+)\]$/,Jm=e=>{if(Ts.test(e)){const t=Ts.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:_s(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,_s(t,a),n,r)})})},_s=(e,t)=>{let n=e;return t.split(ka).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 g=o[y];if(s===0&&i===0){if(g===ta){a.push(o.slice(l,y)),l=y+rp;continue}if(g==="/"){u=y;continue}}g==="["?s++:g==="]"?s--:g==="("?i++:g===")"&&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:g}=n(m);if(c){l=m+(l.length>0?" "+l:l);continue}let v=!!g,b=r(v?y.substring(0,g):y);if(!b){if(!v){l=m+(l.length>0?" "+l:l);continue}if(b=r(y),!b){l=m+(l.length>0?" "+l:l);continue}v=!1}const x=a(p).join(":"),S=h?x+ea:x,M=S+b;if(s.includes(M))continue;s.push(M);const C=o(b,v);for(let N=0;N<C.length;++N){const D=C[N];s.push(S+D)}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 Ie=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)\(.+\)$/,dn=e=>fp.test(e),pe=e=>!!e&&!Number.isNaN(Number(e)),At=e=>!!e&&Number.isInteger(Number(e)),Eo=e=>e.endsWith("%")&&pe(e.slice(0,-1)),Ct=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=>Dn(e,qi,zi),te=e=>Yi.test(e),Xt=e=>Dn(e,Vi,bp),No=e=>Dn(e,Np,pe),Os=e=>Dn(e,Gi,zi),Mp=e=>Dn(e,Ui,xp),yr=e=>Dn(e,Ki,wp),ne=e=>Hi.test(e),jn=e=>kn(e,Vi),Dp=e=>kn(e,Rp),Ps=e=>kn(e,Gi),kp=e=>kn(e,qi),Ep=e=>kn(e,Ui),br=e=>kn(e,Ki,!0),Dn=(e,t,n)=>{const r=Yi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},kn=(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=Ie("color"),t=Ie("font"),n=Ie("text"),r=Ie("font-weight"),o=Ie("tracking"),a=Ie("leading"),s=Ie("breakpoint"),i=Ie("container"),l=Ie("spacing"),u=Ie("radius"),m=Ie("shadow"),c=Ie("inset-shadow"),p=Ie("text-shadow"),h=Ie("drop-shadow"),y=Ie("blur"),g=Ie("perspective"),v=Ie("aspect"),b=Ie("ease"),x=Ie("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...M(),ne,te],N=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],R=()=>[ne,te,l],j=()=>[dn,"full","auto",...R()],F=()=>[At,"none","subgrid",ne,te],$=()=>["auto",{span:["full",At,ne,te]},At,ne,te],V=()=>[At,"auto",ne,te],B=()=>["auto","min","max","fr",ne,te],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],T=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...R()],A=()=>[dn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],E=()=>[e,ne,te],O=()=>[...M(),Ps,Os,{position:[ne,te]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",kp,Cp,{size:[ne,te]}],_=()=>[Eo,jn,Xt],I=()=>["","none","full",u,ne,te],H=()=>["",pe,jn,Xt],G=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>[pe,Eo,Ps,Os],Q=()=>["","none",y,ne,te],K=()=>["none",pe,ne,te],X=()=>["none",pe,ne,te],se=()=>[pe,ne,te],ie=()=>[dn,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ct],breakpoint:[Ct],color:[yp],container:[Ct],"drop-shadow":[Ct],ease:["in","out","in-out"],font:[Sp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ct],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ct],shadow:[Ct],spacing:["px",pe],text:[Ct],"text-shadow":[Ct],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",dn,te,ne,v]}],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:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{start:j()}],end:[{end:j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[At,"auto",ne,te]}],basis:[{basis:[dn,"full","auto",i,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pe,dn,"auto","initial","none",te]}],grow:[{grow:["",pe,ne,te]}],shrink:[{shrink:["",pe,ne,te]}],order:[{order:[At,"first","last","none",ne,te]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...T(),"normal"]}],"justify-self":[{"justify-self":["auto",...T()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...T(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...T(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...T(),"baseline"]}],"place-self":[{"place-self":["auto",...T()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],w:[{w:[i,"screen",...A()]}],"min-w":[{"min-w":[i,"screen","none",...A()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",n,jn,Xt]}],"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,...R()]}],"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:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[pe,"from-font","auto",ne,Xt]}],"text-decoration-color":[{decoration:E()}],"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:R()}],"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:O()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},At,ne,te],radial:["",ne,te],conic:[At,ne,te]},Ep,Mp]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[pe,ne,te]}],"outline-w":[{outline:["",pe,jn,Xt]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",m,br,yr]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",c,br,yr]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[pe,Xt]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",p,br,yr]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[pe,ne,te]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],"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":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[ne,te]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"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":M()}],"mask-image-conic-pos":[{"mask-conic":[pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,te]}],filter:[{filter:["","none",ne,te]}],blur:[{blur:Q()}],brightness:[{brightness:[pe,ne,te]}],contrast:[{contrast:[pe,ne,te]}],"drop-shadow":[{"drop-shadow":["","none",h,br,yr]}],"drop-shadow-color":[{"drop-shadow":E()}],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":Q()}],"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":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"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",x,ne,te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ne,te]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"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:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"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":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",...E()]}],"stroke-w":[{stroke:[pe,jn,Xt,No]}],stroke:[{stroke:["none",...E()]}],"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 L(...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}}),Nt=w.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:L(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]})});Nt.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:L("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:L(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 on=f.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:L("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}));on.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=Lt(`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"),an=f.forwardRef(({className:e,...t},n)=>d.jsx(Ji,{ref:n,className:L(Lp(),e),...t}));an.displayName=Ji.displayName;const tt=({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:g,...v})=>{const[b,x]=w.useState((h==null?void 0:h.length)||0),S=N=>{m&&m(N),x(N.target.value.length)},M=c&&typeof p=="number",C=g||y;return d.jsxs("div",{className:L("space-y-1",l),children:[e&&d.jsxs(an,{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(on,{type:a,placeholder:t,disabled:y,value:h,maxLength:p,onChange:S,className:L(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),...v}),M&&d.jsxs("span",{className:"absolute bottom-[-1.25rem] right-0 text-xs text-muted-foreground",children:[b," / ",p]})]}),(n||r)&&d.jsx("p",{className:L("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=w.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(g=>g!=="")&&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:L("space-y-2",a),children:[t&&d.jsx(an,{className:"text-sm font-medium text-gray-700",children:t}),d.jsx("div",{className:"flex gap-1",children:n.map((c,p)=>d.jsx(on,{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:L("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.
|
|
@@ -13,125 +13,125 @@
|
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Yp=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i
|
|
16
|
+
*/const Yp=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},l)=>w.createElement("svg",{ref:l,...Bp,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ec("lucide",o),...i},[...s.map(([u,m])=>w.createElement(u,m)),...Array.isArray(a)?a:[a]]));/**
|
|
17
17
|
* @license lucide-react v0.474.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const Ee=(e,t)=>{const n=w.forwardRef(({className:r,...o},a)=>w.createElement(Yp,{ref:a,iconNode:t,className:ec(`lucide-${Wp(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
|
|
22
22
|
* @license lucide-react v0.474.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const Hp=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],zp=
|
|
26
|
+
*/const Hp=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],zp=Ee("Building",Hp);/**
|
|
27
27
|
* @license lucide-react v0.474.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const Gp=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],tc=
|
|
31
|
+
*/const Gp=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],tc=Ee("CalendarDays",Gp);/**
|
|
32
32
|
* @license lucide-react v0.474.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const Up=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Jn=
|
|
36
|
+
*/const Up=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Jn=Ee("Check",Up);/**
|
|
37
37
|
* @license lucide-react v0.474.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const qp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],er=
|
|
41
|
+
*/const qp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],er=Ee("ChevronDown",qp);/**
|
|
42
42
|
* @license lucide-react v0.474.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const Vp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],nc=
|
|
46
|
+
*/const Vp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],nc=Ee("ChevronLeft",Vp);/**
|
|
47
47
|
* @license lucide-react v0.474.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const Kp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ea=
|
|
51
|
+
*/const Kp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ea=Ee("ChevronRight",Kp);/**
|
|
52
52
|
* @license lucide-react v0.474.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const Xp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Zp=
|
|
56
|
+
*/const Xp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Zp=Ee("ChevronUp",Xp);/**
|
|
57
57
|
* @license lucide-react v0.474.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const Qp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Jp=
|
|
61
|
+
*/const Qp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Jp=Ee("CircleCheck",Qp);/**
|
|
62
62
|
* @license lucide-react v0.474.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const eh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],th=
|
|
66
|
+
*/const eh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],th=Ee("CircleX",eh);/**
|
|
67
67
|
* @license lucide-react v0.474.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const nh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],rc=
|
|
71
|
+
*/const nh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],rc=Ee("Circle",nh);/**
|
|
72
72
|
* @license lucide-react v0.474.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const rh=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],oh=
|
|
76
|
+
*/const rh=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],oh=Ee("EyeOff",rh);/**
|
|
77
77
|
* @license lucide-react v0.474.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const ah=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],sh=
|
|
81
|
+
*/const ah=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],sh=Ee("Eye",ah);/**
|
|
82
82
|
* @license lucide-react v0.474.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const ih=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],ch=
|
|
86
|
+
*/const ih=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],ch=Ee("Filter",ih);/**
|
|
87
87
|
* @license lucide-react v0.474.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const lh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],uh=
|
|
91
|
+
*/const lh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],uh=Ee("Info",lh);/**
|
|
92
92
|
* @license lucide-react v0.474.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const dh=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],oc=
|
|
96
|
+
*/const dh=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],oc=Ee("Mail",dh);/**
|
|
97
97
|
* @license lucide-react v0.474.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const fh=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],mh=
|
|
101
|
+
*/const fh=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],mh=Ee("MapPin",fh);/**
|
|
102
102
|
* @license lucide-react v0.474.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const ph=[["path",{d:"M5 12h14",key:"1ays0h"}]],hh=
|
|
106
|
+
*/const ph=[["path",{d:"M5 12h14",key:"1ays0h"}]],hh=Ee("Minus",ph);/**
|
|
107
107
|
* @license lucide-react v0.474.0 - ISC
|
|
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 gh=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],vh=
|
|
111
|
+
*/const gh=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],vh=Ee("Phone",gh);/**
|
|
112
112
|
* @license lucide-react v0.474.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const yh=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],ac=
|
|
116
|
+
*/const yh=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],ac=Ee("Search",yh);/**
|
|
117
117
|
* @license lucide-react v0.474.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const bh=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],wh=
|
|
121
|
+
*/const bh=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],wh=Ee("TriangleAlert",bh);/**
|
|
122
122
|
* @license lucide-react v0.474.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const xh=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Sh=
|
|
126
|
+
*/const xh=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Sh=Ee("User",xh);/**
|
|
127
127
|
* @license lucide-react v0.474.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const Ch=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],En=Re("X",Ch);function ra({label:e,placeholder:t="Enter password",helperText:n,error:r,required:o,className:a,showPassword:i=!1,onShowPasswordChange:s,value:l,onChange:u,...m}){return d.jsxs("div",{className:B("space-y-1",a),children:[e&&d.jsxs(an,{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(on,{type:i?"text":"password",placeholder:t,className:B("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:()=>s==null?void 0:s(!i),"aria-label":i?"Hide password":"Show password",children:i?d.jsx(oh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"}):d.jsx(sh,{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 Na=f.forwardRef(({label:e,helperText:t,errorText:n,required:r,className:o,placeholder:a="Write here...",rows:i=4,...s},l)=>{const u=!!n;return d.jsxs("div",{className:B("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:i,className:B("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"),...s}),(t||n)&&d.jsx("p",{className:B("text-xs",u?"text-destructive":"text-muted-foreground"),children:n||t})]})});Na.displayName="Textarea";function Z(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 Mh(e,t){const n=f.createContext(t),r=a=>{const{children:i,...s}=a,l=f.useMemo(()=>s,Object.values(s));return d.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(a){const i=f.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ze(e,t=[]){let n=[];function r(a,i){const s=f.createContext(i),l=n.length;n=[...n,i];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])||s,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])||s,y=f.useContext(h);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,m]}const o=()=>{const a=n.map(i=>f.createContext(i));return function(s){const l=(s==null?void 0:s[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,Dh(o,...t)]}function Dh(...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 i=r.reduce((s,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...s,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function at(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 kh(e,t=globalThis==null?void 0:globalThis.document){const n=at(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 Eh="DismissableLayer",oa="dismissableLayer.update",Nh="dismissableLayer.pointerDownOutside",Rh="dismissableLayer.focusOutside",As,sc=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nn=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...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),x=m?v.indexOf(m):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,D=x>=b,C=Oh(M=>{const N=M.target,$=[...u.branches].some(F=>F.contains(N));!D||$||(o==null||o(M),i==null||i(M),M.defaultPrevented||s==null||s())},p),R=Ph(M=>{const N=M.target;[...u.branches].some(F=>F.contains(N))||(a==null||a(M),i==null||i(M),M.defaultPrevented||s==null||s())},p);return kh(M=>{x===u.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&s&&(M.preventDefault(),s()))},p),f.useEffect(()=>{if(m)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(As=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),Is(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=As)}},[m,p,n,u]),f.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),Is())},[m,u]),f.useEffect(()=>{const M=()=>h({});return document.addEventListener(oa,M),()=>document.removeEventListener(oa,M)},[]),d.jsx(te.div,{...l,ref:y,style:{pointerEvents:S?D?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,C.onPointerDownCapture)})});Nn.displayName=Eh;var Th="DismissableLayerBranch",_h=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(te.div,{...e,ref:o})});_h.displayName=Th;function Oh(e,t=globalThis==null?void 0:globalThis.document){const n=at(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){ic(Nh,n,u,{discrete:!0})};const u={originalEvent:s};s.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},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ph(e,t=globalThis==null?void 0:globalThis.document){const n=at(e),r=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!r.current&&ic(Rh,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 Is(){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]??js()),document.body.insertAdjacentElement("beforeend",e[1]??js()),Ro++,()=>{Ro===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ro--}},[])}function js(){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",$s={bubbles:!1,cancelable:!0},Ah="FocusScope",tr=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=f.useState(null),u=at(o),m=at(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||!s)return;const D=S.target;s.contains(D)?c.current=D:$t(c.current,{select:!0})},g=function(S){if(h.paused||!s)return;const D=S.relatedTarget;D!==null&&(s.contains(D)||$t(c.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const C of S)C.removedNodes.length>0&&$t(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",g);const x=new MutationObserver(b);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",g),x.disconnect()}}},[r,s,h.paused]),f.useEffect(()=>{if(s){Fs.add(h);const v=document.activeElement;if(!s.contains(v)){const b=new CustomEvent(To,$s);s.addEventListener(To,u),s.dispatchEvent(b),b.defaultPrevented||(Ih(Wh(cc(s)),{select:!0}),document.activeElement===v&&$t(s))}return()=>{s.removeEventListener(To,u),setTimeout(()=>{const b=new CustomEvent(_o,$s);s.addEventListener(_o,m),s.dispatchEvent(b),b.defaultPrevented||$t(v??document.body,{select:!0}),s.removeEventListener(_o,m),Fs.remove(h)},0)}}},[s,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 x=v.currentTarget,[S,D]=jh(x);S&&D?!v.shiftKey&&b===D?(v.preventDefault(),n&&$t(S,{select:!0})):v.shiftKey&&b===S&&(v.preventDefault(),n&&$t(D,{select:!0})):b===x&&v.preventDefault()}},[n,r,h.paused]);return d.jsx(te.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});tr.displayName=Ah;function Ih(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if($t(r,{select:t}),document.activeElement!==n)return}function jh(e){const t=cc(e),n=Ls(t,e),r=Ls(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 Ls(e,t){for(const n of e)if(!$h(n,{upTo:t}))return n}function $h(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 Lh(e){return e instanceof HTMLInputElement&&"select"in e}function $t(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Lh(e)&&t&&e.select()}}var Fs=Fh();function Fh(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ws(e,t),e.unshift(t)},remove(t){var n;e=Ws(e,t),(n=e[0])==null||n.resume()}}}function Ws(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Wh(e){return e.filter(t=>t.tagName!=="A")}var Ie=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Bh=f[" useId ".trim().toString()]||(()=>{}),Yh=0;function _e(e){const[t,n]=f.useState(Bh());return Ie(()=>{n(r=>r??String(Yh++))},[e]),e||(t?`radix-${t}`:"")}const Hh=["top","right","bottom","left"],Wt=Math.min,tt=Math.max,$r=Math.round,wr=Math.floor,bt=e=>({x:e,y:e}),zh={left:"right",right:"left",bottom:"top",top:"bottom"},Gh={start:"end",end:"start"};function aa(e,t,n){return tt(e,Wt(t,n))}function Tt(e,t){return typeof e=="function"?e(t):e}function _t(e){return e.split("-")[0]}function Rn(e){return e.split("-")[1]}function Ra(e){return e==="x"?"y":"x"}function Ta(e){return e==="y"?"height":"width"}const Uh=new Set(["top","bottom"]);function vt(e){return Uh.has(_t(e))?"y":"x"}function _a(e){return Ra(vt(e))}function qh(e,t,n){n===void 0&&(n=!1);const r=Rn(e),o=_a(e),a=Ta(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Lr(i)),[i,Lr(i)]}function Vh(e){const t=Lr(e);return[sa(e),t,sa(t)]}function sa(e){return e.replace(/start|end/g,t=>Gh[t])}const Bs=["left","right"],Ys=["right","left"],Kh=["top","bottom"],Xh=["bottom","top"];function Zh(e,t,n){switch(e){case"top":case"bottom":return n?t?Ys:Bs:t?Bs:Ys;case"left":case"right":return t?Kh:Xh;default:return[]}}function Qh(e,t,n,r){const o=Rn(e);let a=Zh(_t(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(sa)))),a}function Lr(e){return e.replace(/left|right|bottom|top/g,t=>zh[t])}function Jh(e){return{top:0,right:0,bottom:0,left:0,...e}}function lc(e){return typeof e!="number"?Jh(e):{top:e,right:e,bottom:e,left:e}}function Fr(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 Hs(e,t,n){let{reference:r,floating:o}=e;const a=vt(t),i=_a(t),s=Ta(i),l=_t(t),u=a==="y",m=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/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(Rn(t)){case"start":h[i]-=p*(n&&u?-1:1);break;case"end":h[i]+=p*(n&&u?-1:1);break}return h}const eg=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:c}=Hs(u,r,l),p=r,h={},y=0;for(let v=0;v<s.length;v++){const{name:g,fn:b}=s[v],{x,y:S,data:D,reset:C}=await b({x:m,y:c,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});m=x??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 i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:m,y:c}=Hs(u,p,l)),v=-1)}return{x:m,y:c,placement:p,strategy:o,middlewareData:h}};async function Un(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:c="floating",altBoundary:p=!1,padding:h=0}=Tt(t,e),y=lc(h),g=s[p?c==="floating"?"reference":"floating":c],b=Fr(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(s.floating)),boundary:u,rootBoundary:m,strategy:l})),x=c==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.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=Fr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:S,strategy:l}):x);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 tg=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:m=0}=Tt(e,t)||{};if(u==null)return{};const c=lc(m),p={x:n,y:r},h=_a(o),y=Ta(h),v=await i.getDimensions(u),g=h==="y",b=g?"top":"left",x=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(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let M=R?R[S]:0;(!M||!await(i.isElement==null?void 0:i.isElement(R)))&&(M=s.floating[S]||a.floating[y]);const N=D/2-C/2,$=M/2-v[y]/2-1,F=Wt(c[b],$),W=Wt(c[x],$),q=F,I=M-v[y]-W,_=M/2-v[y]/2+N,O=aa(q,_,I),E=!l.arrow&&Rn(o)!=null&&_!==O&&a.reference[y]/2-(_<q?F:W)-v[y]/2<0,A=E?_<q?_-q:_-I:0;return{[h]:p[h]+A,data:{[h]:O,centerOffset:_-O-A,...E&&{alignmentOffset:A}},reset:E}}}),ng=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:m=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...g}=Tt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=_t(o),x=vt(s),S=_t(s)===s,D=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=p||(S||!v?[Lr(s)]:Vh(s)),R=y!=="none";!p&&R&&C.push(...Qh(s,v,y,D));const M=[s,...C],N=await Un(t,g),$=[];let F=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&$.push(N[b]),c){const _=qh(o,i,D);$.push(N[_[0]],N[_[1]])}if(F=[...F,{placement:o,overflows:$}],!$.every(_=>_<=0)){var W,q;const _=(((W=a.flip)==null?void 0:W.index)||0)+1,O=M[_];if(O&&(!(c==="alignment"?x!==vt(O):!1)||F.every(k=>k.overflows[0]>0&&vt(k.placement)===x)))return{data:{index:_,overflows:F},reset:{placement:O}};let E=(q=F.filter(A=>A.overflows[0]<=0).sort((A,k)=>A.overflows[1]-k.overflows[1])[0])==null?void 0:q.placement;if(!E)switch(h){case"bestFit":{var I;const A=(I=F.filter(k=>{if(R){const P=vt(k.placement);return P===x||P==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(P=>P>0).reduce((P,Y)=>P+Y,0)]).sort((k,P)=>k[1]-P[1])[0])==null?void 0:I[0];A&&(E=A);break}case"initialPlacement":E=s;break}if(o!==E)return{reset:{placement:E}}}return{}}}};function zs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Gs(e){return Hh.some(t=>e[t]>=0)}const rg=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Tt(e,t);switch(r){case"referenceHidden":{const a=await Un(t,{...o,elementContext:"reference"}),i=zs(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Gs(i)}}}case"escaped":{const a=await Un(t,{...o,altBoundary:!0}),i=zs(a,n.floating);return{data:{escapedOffsets:i,escaped:Gs(i)}}}default:return{}}}}},uc=new Set(["left","top"]);async function og(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=_t(n),s=Rn(n),l=vt(n)==="y",u=uc.has(i)?-1:1,m=a&&l?-1:1,c=Tt(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 s&&typeof y=="number"&&(h=s==="end"?y*-1:y),l?{x:h*m,y:p*u}:{x:p*u,y:h*m}}const ag=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,l=await og(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},sg=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:i=!1,limiter:s={fn:g=>{let{x:b,y:x}=g;return{x:b,y:x}}},...l}=Tt(e,t),u={x:n,y:r},m=await Un(t,l),c=vt(_t(o)),p=Ra(c);let h=u[p],y=u[c];if(a){const g=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=h+m[g],S=h-m[b];h=aa(x,h,S)}if(i){const g=c==="y"?"top":"left",b=c==="y"?"bottom":"right",x=y+m[g],S=y-m[b];y=aa(x,y,S)}const v=s.fn({...t,[p]:h,[c]:y});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:a,[c]:i}}}}}},ig=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=Tt(e,t),m={x:n,y:r},c=vt(o),p=Ra(c);let h=m[p],y=m[c];const v=Tt(s,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,x;const S=p==="y"?"width":"height",D=uc.has(_t(o)),C=a.reference[c]-a.floating[S]+(D&&((b=i.offset)==null?void 0:b[c])||0)+(D?0:g.crossAxis),R=a.reference[c]+a.reference[S]+(D?0:((x=i.offset)==null?void 0:x[c])||0)-(D?g.crossAxis:0);y<C?y=C:y>R&&(y=R)}return{[p]:h,[c]:y}}}},cg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=Tt(e,t),m=await Un(t,u),c=_t(o),p=Rn(o),h=vt(o)==="y",{width:y,height:v}=a.floating;let g,b;c==="top"||c==="bottom"?(g=c,b=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=c,g=p==="end"?"top":"bottom");const x=v-m.top-m.bottom,S=y-m.left-m.right,D=Wt(v-m[g],x),C=Wt(y-m[b],S),R=!t.middlewareData.shift;let M=D,N=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=x),R&&!p){const F=tt(m.left,0),W=tt(m.right,0),q=tt(m.top,0),I=tt(m.bottom,0);h?N=y-2*(F!==0||W!==0?F+W:tt(m.left,m.right)):M=v-2*(q!==0||I!==0?q+I:tt(m.top,m.bottom))}await l({...t,availableWidth:N,availableHeight:M});const $=await i.getDimensions(s.floating);return y!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function eo(){return typeof window<"u"}function Tn(e){return dc(e)?(e.nodeName||"").toLowerCase():"#document"}function nt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xt(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 nt(e).Node:!1}function ut(e){return eo()?e instanceof Element||e instanceof nt(e).Element:!1}function wt(e){return eo()?e instanceof HTMLElement||e instanceof nt(e).HTMLElement:!1}function Us(e){return!eo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof nt(e).ShadowRoot}const lg=new Set(["inline","contents"]);function nr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=dt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!lg.has(o)}const ug=new Set(["table","td","th"]);function dg(e){return ug.has(Tn(e))}const fg=[":popover-open",":modal"];function to(e){return fg.some(t=>{try{return e.matches(t)}catch{return!1}})}const mg=["transform","translate","scale","rotate","perspective"],pg=["transform","translate","scale","rotate","perspective","filter"],hg=["paint","layout","strict","content"];function Oa(e){const t=Pa(),n=ut(e)?dt(e):e;return mg.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)||pg.some(r=>(n.willChange||"").includes(r))||hg.some(r=>(n.contain||"").includes(r))}function gg(e){let t=Bt(e);for(;wt(t)&&!wn(t);){if(Oa(t))return t;if(to(t))return null;t=Bt(t)}return null}function Pa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vg=new Set(["html","body","#document"]);function wn(e){return vg.has(Tn(e))}function dt(e){return nt(e).getComputedStyle(e)}function no(e){return ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bt(e){if(Tn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Us(e)&&e.host||xt(e);return Us(t)?t.host:t}function fc(e){const t=Bt(e);return wn(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&nr(t)?t:fc(t)}function qn(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),i=nt(o);if(a){const s=ia(i);return t.concat(i,i.visualViewport||[],nr(o)?o:[],s&&n?qn(s):[])}return t.concat(o,qn(o,[],n))}function ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mc(e){const t=dt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wt(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=$r(n)!==a||$r(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function Aa(e){return ut(e)?e:e.contextElement}function yn(e){const t=Aa(e);if(!wt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mc(t);let i=(a?$r(n.width):n.width)/r,s=(a?$r(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const yg=bt(0);function pc(e){const t=nt(e);return!Pa()||!t.visualViewport?yg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==nt(e)?!1:t}function Jt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Aa(e);let i=bt(1);t&&(r?ut(r)&&(i=yn(r)):i=yn(e));const s=bg(a,n,r)?pc(a):bt(0);let l=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,m=o.width/i.x,c=o.height/i.y;if(a){const p=nt(a),h=r&&ut(r)?nt(r):r;let y=p,v=ia(y);for(;v&&r&&h!==y;){const g=yn(v),b=v.getBoundingClientRect(),x=dt(v),S=b.left+(v.clientLeft+parseFloat(x.paddingLeft))*g.x,D=b.top+(v.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,u*=g.y,m*=g.x,c*=g.y,l+=S,u+=D,y=nt(v),v=ia(y)}}return Fr({width:m,height:c,x:l,y:u})}function Ia(e,t){const n=no(e).scrollLeft;return t?t.left+n:Jt(xt(e)).left+n}function hc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Ia(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function wg(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=xt(r),s=t?to(t.floating):!1;if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},u=bt(1);const m=bt(0),c=wt(r);if((c||!c&&!a)&&((Tn(r)!=="body"||nr(i))&&(l=no(r)),wt(r))){const h=Jt(r);u=yn(r),m.x=h.x+r.clientLeft,m.y=h.y+r.clientTop}const p=i&&!c&&!a?hc(i,l,!0):bt(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 xg(e){return Array.from(e.getClientRects())}function Sg(e){const t=xt(e),n=no(e),r=e.ownerDocument.body,o=tt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=tt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Ia(e);const s=-n.scrollTop;return dt(r).direction==="rtl"&&(i+=tt(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}function Cg(e,t){const n=nt(e),r=xt(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const u=Pa();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:a,height:i,x:s,y:l}}const Mg=new Set(["absolute","fixed"]);function Dg(e,t){const n=Jt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=wt(e)?yn(e):bt(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=o*a.x,u=r*a.y;return{width:i,height:s,x:l,y:u}}function qs(e,t,n){let r;if(t==="viewport")r=Cg(e,n);else if(t==="document")r=Sg(xt(e));else if(ut(t))r=Dg(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 Fr(r)}function gc(e,t){const n=Bt(e);return n===t||!ut(n)||wn(n)?!1:dt(n).position==="fixed"||gc(n,t)}function kg(e,t){const n=t.get(e);if(n)return n;let r=qn(e,[],!1).filter(s=>ut(s)&&Tn(s)!=="body"),o=null;const a=dt(e).position==="fixed";let i=a?Bt(e):e;for(;ut(i)&&!wn(i);){const s=dt(i),l=Oa(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&Mg.has(o.position)||nr(i)&&!l&&gc(e,i))?r=r.filter(m=>m!==i):o=s,i=Bt(i)}return t.set(e,r),r}function Eg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?to(t)?[]:kg(t,this._c):[].concat(n),r],s=i[0],l=i.reduce((u,m)=>{const c=qs(t,m,o);return u.top=tt(c.top,u.top),u.right=Wt(c.right,u.right),u.bottom=Wt(c.bottom,u.bottom),u.left=tt(c.left,u.left),u},qs(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ng(e){const{width:t,height:n}=mc(e);return{width:t,height:n}}function Rg(e,t,n){const r=wt(t),o=xt(t),a=n==="fixed",i=Jt(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=bt(0);function u(){l.x=Ia(o)}if(r||!r&&!a)if((Tn(t)!=="body"||nr(o))&&(s=no(t)),r){const h=Jt(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,s):bt(0),c=i.left+s.scrollLeft-l.x-m.x,p=i.top+s.scrollTop-l.y-m.y;return{x:c,y:p,width:i.width,height:i.height}}function Oo(e){return dt(e).position==="static"}function Vs(e,t){if(!wt(e)||dt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return xt(e)===n&&(n=n.ownerDocument.body),n}function vc(e,t){const n=nt(e);if(to(e))return n;if(!wt(e)){let o=Bt(e);for(;o&&!wn(o);){if(ut(o)&&!Oo(o))return o;o=Bt(o)}return n}let r=Vs(e,t);for(;r&&dg(r)&&Oo(r);)r=Vs(r,t);return r&&wn(r)&&Oo(r)&&!Oa(r)?n:r||gg(e)||n}const Tg=async function(e){const t=this.getOffsetParent||vc,n=this.getDimensions,r=await n(e.floating);return{reference:Rg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _g(e){return dt(e).direction==="rtl"}const Og={convertOffsetParentRelativeRectToViewportRelativeRect:wg,getDocumentElement:xt,getClippingRect:Eg,getOffsetParent:vc,getElementRects:Tg,getClientRects:xg,getDimensions:Ng,getScale:yn,isElement:ut,isRTL:_g};function yc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pg(e,t){let n=null,r;const o=xt(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:m,top:c,width:p,height:h}=u;if(s||t(),!p||!h)return;const y=wr(c),v=wr(o.clientWidth-(m+p)),g=wr(o.clientHeight-(c+h)),b=wr(m),S={rootMargin:-y+"px "+-v+"px "+-g+"px "+-b+"px",threshold:tt(0,Wt(1,l))||1};let D=!0;function C(R){const M=R[0].intersectionRatio;if(M!==l){if(!D)return i();M?i(!1,M):r=setTimeout(()=>{i(!1,1e-7)},1e3)}M===1&&!yc(u,e.getBoundingClientRect())&&i(),D=!1}try{n=new IntersectionObserver(C,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(e)}return i(!0),a}function Ag(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Aa(e),m=o||a?[...u?qn(u):[],...qn(t)]:[];m.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const c=u&&s?Pg(u,n):null;let p=-1,h=null;i&&(h=new ResizeObserver(b=>{let[x]=b;x&&x.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?Jt(e):null;l&&g();function g(){const b=Jt(e);v&&!yc(v,b)&&n(),v=b,y=requestAnimationFrame(g)}return n(),()=>{var b;m.forEach(x=>{o&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),c==null||c(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const Ig=ag,jg=sg,$g=ng,Lg=cg,Fg=rg,Ks=tg,Wg=ig,Bg=(e,t,n)=>{const r=new Map,o={platform:Og,...n},a={...o.platform,_c:r};return eg(e,t,{...o,platform:a})};var Yg=typeof document<"u",Hg=function(){},Tr=Yg?w.useLayoutEffect:Hg;function Wr(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(!Wr(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)&&!Wr(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 Xs(e,t){const n=bc(e);return Math.round(t*n)/n}function Po(e){const t=f.useRef(e);return Tr(()=>{t.current=e}),t}function zg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!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);Wr(p,r)||h(r);const[y,v]=f.useState(null),[g,b]=f.useState(null),x=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=i||g,R=f.useRef(null),M=f.useRef(null),N=f.useRef(m),$=l!=null,F=Po(l),W=Po(o),q=Po(u),I=f.useCallback(()=>{if(!R.current||!M.current)return;const k={placement:t,strategy:n,middleware:p};W.current&&(k.platform=W.current),Bg(R.current,M.current,k).then(P=>{const Y={...P,isPositioned:q.current!==!1};_.current&&!Wr(N.current,Y)&&(N.current=Y,Zr.flushSync(()=>{c(Y)}))})},[p,t,n,W,q]);Tr(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,c(k=>({...k,isPositioned:!1})))},[u]);const _=f.useRef(!1);Tr(()=>(_.current=!0,()=>{_.current=!1}),[]),Tr(()=>{if(D&&(R.current=D),C&&(M.current=C),D&&C){if(F.current)return F.current(D,C,I);I()}},[D,C,I,F,$]);const O=f.useMemo(()=>({reference:R,floating:M,setReference:x,setFloating:S}),[x,S]),E=f.useMemo(()=>({reference:D,floating:C}),[D,C]),A=f.useMemo(()=>{const k={position:n,left:0,top:0};if(!E.floating)return k;const P=Xs(E.floating,m.x),Y=Xs(E.floating,m.y);return s?{...k,transform:"translate("+P+"px, "+Y+"px)",...bc(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:Y}},[n,s,E.floating,m.x,m.y]);return f.useMemo(()=>({...m,update:I,refs:O,elements:E,floatingStyles:A}),[m,I,O,E,A])}const Gg=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?Ks({element:r.current,padding:o}).fn(n):{}:r?Ks({element:r,padding:o}).fn(n):{}}}},Ug=(e,t)=>({...Ig(e),options:[e,t]}),qg=(e,t)=>({...jg(e),options:[e,t]}),Vg=(e,t)=>({...Wg(e),options:[e,t]}),Kg=(e,t)=>({...$g(e),options:[e,t]}),Xg=(e,t)=>({...Lg(e),options:[e,t]}),Zg=(e,t)=>({...Fg(e),options:[e,t]}),Qg=(e,t)=>({...Gg(e),options:[e,t]});var Jg="Arrow",wc=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(te.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=Jg;var ev=wc;function ja(e){const[t,n]=f.useState(void 0);return Ie(()=>{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 i,s;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;n({width:i,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var $a="Popper",[xc,Ht]=ze($a),[tv,Sc]=xc($a),Cc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return d.jsx(tv,{scope:t,anchor:r,onAnchorChange:o,children:n})};Cc.displayName=$a;var Mc="PopperAnchor",Dc=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Sc(Mc,n),i=f.useRef(null),s=he(t,i);return f.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:d.jsx(te.div,{...o,ref:s})});Dc.displayName=Mc;var La="PopperContent",[nv,rv]=xc(La),kc=f.forwardRef((e,t)=>{var L,K,X,Q,J,ae;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:m=0,sticky:c="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...v}=e,g=Sc(La,n),[b,x]=f.useState(null),S=he(t,ye=>x(ye)),[D,C]=f.useState(null),R=ja(D),M=(R==null?void 0:R.width)??0,N=(R==null?void 0:R.height)??0,$=r+(a!=="center"?"-"+a:""),F=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},W=Array.isArray(u)?u:[u],q=W.length>0,I={padding:F,boundary:W.filter(av),altBoundary:q},{refs:_,floatingStyles:O,placement:E,isPositioned:A,middlewareData:k}=zg({strategy:"fixed",placement:$,whileElementsMounted:(...ye)=>Ag(...ye,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[Ug({mainAxis:o+N,alignmentAxis:i}),l&&qg({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Vg():void 0,...I}),l&&Kg({...I}),Xg({...I,apply:({elements:ye,rects:ee,availableWidth:Te,availableHeight:je})=>{const{width:De,height:qe}=ee.reference,Me=ye.floating.style;Me.setProperty("--radix-popper-available-width",`${Te}px`),Me.setProperty("--radix-popper-available-height",`${je}px`),Me.setProperty("--radix-popper-anchor-width",`${De}px`),Me.setProperty("--radix-popper-anchor-height",`${qe}px`)}}),D&&Qg({element:D,padding:s}),sv({arrowWidth:M,arrowHeight:N}),p&&Zg({strategy:"referenceHidden",...I})]}),[P,Y]=Rc(E),z=at(y);Ie(()=>{A&&(z==null||z())},[A,z]);const T=(L=k.arrow)==null?void 0:L.x,j=(K=k.arrow)==null?void 0:K.y,H=((X=k.arrow)==null?void 0:X.centerOffset)!==0,[G,V]=f.useState();return Ie(()=>{b&&V(window.getComputedStyle(b).zIndex)},[b]),d.jsx("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:A?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(Q=k.transformOrigin)==null?void 0:Q.x,(J=k.transformOrigin)==null?void 0:J.y].join(" "),...((ae=k.hide)==null?void 0:ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(nv,{scope:n,placedSide:P,onArrowChange:C,arrowX:T,arrowY:j,shouldHideArrow:H,children:d.jsx(te.div,{"data-side":P,"data-align":Y,...v,ref:S,style:{...v.style,animation:A?void 0:"none"}})})})});kc.displayName=La;var Ec="PopperArrow",ov={top:"bottom",right:"left",bottom:"top",left:"right"},Nc=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=rv(Ec,r),i=ov[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]: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(ev,{...o,ref:n,style:{...o.style,display:"block"}})})});Nc.displayName=Ec;function av(e){return e!==null}var sv=e=>({name:"transformOrigin",options:e,fn(t){var g,b,x;const{placement:n,rects:r,middlewareData:o}=t,i=((g=o.arrow)==null?void 0:g.centerOffset)!==0,s=i?0:e.arrowWidth,l=i?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)+s/2,h=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let y="",v="";return u==="bottom"?(y=i?c:`${p}px`,v=`${-l}px`):u==="top"?(y=i?c:`${p}px`,v=`${r.floating.height+l}px`):u==="right"?(y=`${-l}px`,v=i?c:`${h}px`):u==="left"&&(y=`${r.floating.width+l}px`,v=i?c:`${h}px`),{data:{x:y,y:v}}}});function Rc(e){const[t,n="center"]=e.split("-");return[t,n]}var rr=Cc,or=Dc,ro=kc,oo=Nc,iv="Portal",ar=f.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,a]=f.useState(!1);Ie(()=>a(!0),[]);const i=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Xr.createPortal(d.jsx(te.div,{...r,ref:t}),i):null});ar.displayName=iv;function cv(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Ue=e=>{const{present:t,children:n}=e,r=lv(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,uv(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};Ue.displayName="Presence";function lv(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),i=e?"mounted":"unmounted",[s,l]=cv(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=xr(r.current);a.current=s==="mounted"?u:"none"},[s]),Ie(()=>{const u=r.current,m=o.current;if(m!==e){const p=a.current,h=xr(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]),Ie(()=>{if(t){let u;const m=t.ownerDocument.defaultView??window,c=h=>{const v=xr(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=xr(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(s),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function xr(e){return(e==null?void 0:e.animationName)||"none"}function uv(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 dv=f[" useInsertionEffect ".trim().toString()]||Ie;function st({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=fv({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const m=f.useRef(e!==void 0);f.useEffect(()=>{const c=m.current;c!==s&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${s?"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=s},[s,r])}const u=f.useCallback(m=>{var c;if(s){const p=mv(m)?m(e):m;p!==e&&((c=i.current)==null||c.call(i,p))}else a(m)},[s,e,a,i]);return[l,u]}function fv({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return dv(()=>{a.current=t},[t]),f.useEffect(()=>{var i;o.current!==n&&((i=a.current)==null||i.call(a,n),o.current=n)},[n,o]),[n,r,a]}function mv(e){return typeof e=="function"}var pv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fn=new WeakMap,Sr=new WeakMap,Cr={},Ao=0,Tc=function(e){return e&&(e.host||Tc(e.parentNode))},hv=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})},gv=function(e,t,n,r){var o=hv(t,Array.isArray(e)?e:[e]);Cr[n]||(Cr[n]=new WeakMap);var a=Cr[n],i=[],s=new Set,l=new Set(o),u=function(c){!c||s.has(c)||(s.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(s.has(p))m(p);else try{var h=p.getAttribute(r),y=h!==null&&h!=="false",v=(fn.get(p)||0)+1,g=(a.get(p)||0)+1;fn.set(p,v),a.set(p,g),i.push(p),v===1&&y&&Sr.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),s.clear(),Ao++,function(){i.forEach(function(c){var p=fn.get(c)-1,h=a.get(c)-1;fn.set(c,p),a.set(c,h),p||(Sr.has(c)||c.removeAttribute(r),Sr.delete(c)),h||c.removeAttribute(n)}),Ao--,Ao||(fn=new WeakMap,fn=new WeakMap,Sr=new WeakMap,Cr={})}},ao=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=pv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),gv(r,o,n,"aria-hidden")):function(){return null}},gt=function(){return gt=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},gt.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 vv(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 _r="right-scroll-bar-position",Or="width-before-scroll-bar",yv="with-scroll-bars-hidden",bv="--removed-body-scroll-bar-size";function Io(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wv(e,t){var n=w.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 xv=typeof window<"u"?f.useLayoutEffect:f.useEffect,Zs=new WeakMap;function Sv(e,t){var n=wv(null,function(r){return e.forEach(function(o){return Io(o,r)})});return xv(function(){var r=Zs.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(s){a.has(s)||Io(s,null)}),a.forEach(function(s){o.has(s)||Io(s,i)})}Zs.set(n,e)},[e]),n}function Cv(e){return e}function Mv(e,t){t===void 0&&(t=Cv);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 i=t(a,r);return n.push(i),function(){n=n.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(r=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var i=[];if(n.length){var s=n;n=[],s.forEach(a),i=n}var l=function(){var m=i;i=[],m.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(m){i.push(m),u()},filter:function(m){return i=i.filter(m),n}}}};return o}function Dv(e){e===void 0&&(e={});var t=Mv(null);return t.options=gt({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,gt({},n))};Oc.isSideCarExport=!0;function kv(e,t){return e.useMedium(t),Oc}var Pc=Dv(),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],i=e.forwardProps,s=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,x=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=Sv([n,t]),M=gt(gt({},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}),i?f.cloneElement(f.Children.only(s),gt(gt({},M),{ref:R})):f.createElement(x,gt({},M,{className:l,ref:R}),s))});so.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};so.classNames={fullWidth:Or,zeroRight:_r};var Ev=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Nv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ev();return t&&e.setAttribute("nonce",t),e}function Rv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Tv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _v=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Nv())&&(Rv(t,n),Tv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ov=function(){var e=_v();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ac=function(){var e=Ov(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Pv={left:0,top:0,right:0,gap:0},$o=function(e){return parseInt(e||"",10)||0},Av=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)]},Iv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Pv;var t=Av(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])}},jv=Ac(),bn="data-scroll-locked",$v=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
131
|
+
*/const Ch=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],En=Ee("X",Ch);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:L("space-y-1",a),children:[e&&d.jsxs(an,{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(on,{type:s?"text":"password",placeholder:t,className:L("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(oh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"}):d.jsx(sh,{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 Na=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:L("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:L("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:L("text-xs",u?"text-destructive":"text-muted-foreground"),children:n||t})]})});Na.displayName="Textarea";function Z(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 Mh(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 He(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,g=((b=p==null?void 0:p[e])==null?void 0:b[l])||i,v=f.useMemo(()=>y,Object.values(y));return d.jsx(g.Provider,{value:v,children:h})};u.displayName=a+"Provider";function m(c,p){var g;const h=((g=p==null?void 0:p[e])==null?void 0:g[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,Dh(o,...t)]}function Dh(...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 rt(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 kh(e,t=globalThis==null?void 0:globalThis.document){const n=rt(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 Eh="DismissableLayer",oa="dismissableLayer.update",Nh="dismissableLayer.pointerDownOutside",Rh="dismissableLayer.focusOutside",As,sc=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nn=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,D=>c(D)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),x=m?g.indexOf(m):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,M=x>=b,C=Oh(D=>{const R=D.target,j=[...u.branches].some(F=>F.contains(R));!M||j||(o==null||o(D),s==null||s(D),D.defaultPrevented||i==null||i())},p),N=Ph(D=>{const R=D.target;[...u.branches].some(F=>F.contains(R))||(a==null||a(D),s==null||s(D),D.defaultPrevented||i==null||i())},p);return kh(D=>{x===u.layers.size-1&&(r==null||r(D),!D.defaultPrevented&&i&&(D.preventDefault(),i()))},p),f.useEffect(()=>{if(m)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(As=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),Is(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=As)}},[m,p,n,u]),f.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),Is())},[m,u]),f.useEffect(()=>{const D=()=>h({});return document.addEventListener(oa,D),()=>document.removeEventListener(oa,D)},[]),d.jsx(ee.div,{...l,ref:y,style:{pointerEvents:S?M?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,C.onPointerDownCapture)})});Nn.displayName=Eh;var Th="DismissableLayerBranch",_h=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})});_h.displayName=Th;function Oh(e,t=globalThis==null?void 0:globalThis.document){const n=rt(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){ic(Nh,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 Ph(e,t=globalThis==null?void 0:globalThis.document){const n=rt(e),r=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!r.current&&ic(Rh,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 Is(){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]??js()),document.body.insertAdjacentElement("beforeend",e[1]??js()),Ro++,()=>{Ro===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ro--}},[])}function js(){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",$s={bubbles:!1,cancelable:!0},Ah="FocusScope",tr=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=rt(o),m=rt(a),c=f.useRef(null),p=he(t,g=>l(g)),h=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let g=function(S){if(h.paused||!i)return;const M=S.target;i.contains(M)?c.current=M:jt(c.current,{select:!0})},v=function(S){if(h.paused||!i)return;const M=S.relatedTarget;M!==null&&(i.contains(M)||jt(c.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const C of S)C.removedNodes.length>0&&jt(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(b);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),x.disconnect()}}},[r,i,h.paused]),f.useEffect(()=>{if(i){Fs.add(h);const g=document.activeElement;if(!i.contains(g)){const b=new CustomEvent(To,$s);i.addEventListener(To,u),i.dispatchEvent(b),b.defaultPrevented||(Ih(Wh(cc(i)),{select:!0}),document.activeElement===g&&jt(i))}return()=>{i.removeEventListener(To,u),setTimeout(()=>{const b=new CustomEvent(_o,$s);i.addEventListener(_o,m),i.dispatchEvent(b),b.defaultPrevented||jt(g??document.body,{select:!0}),i.removeEventListener(_o,m),Fs.remove(h)},0)}}},[i,u,m,h]);const y=f.useCallback(g=>{if(!n&&!r||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(v&&b){const x=g.currentTarget,[S,M]=jh(x);S&&M?!g.shiftKey&&b===M?(g.preventDefault(),n&&jt(S,{select:!0})):g.shiftKey&&b===S&&(g.preventDefault(),n&&jt(M,{select:!0})):b===x&&g.preventDefault()}},[n,r,h.paused]);return d.jsx(ee.div,{tabIndex:-1,...s,ref:p,onKeyDown:y})});tr.displayName=Ah;function Ih(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(jt(r,{select:t}),document.activeElement!==n)return}function jh(e){const t=cc(e),n=Ls(t,e),r=Ls(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 Ls(e,t){for(const n of e)if(!$h(n,{upTo:t}))return n}function $h(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 Lh(e){return e instanceof HTMLInputElement&&"select"in e}function jt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Lh(e)&&t&&e.select()}}var Fs=Fh();function Fh(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ws(e,t),e.unshift(t)},remove(t){var n;e=Ws(e,t),(n=e[0])==null||n.resume()}}}function Ws(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Wh(e){return e.filter(t=>t.tagName!=="A")}var Oe=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Bh=f[" useId ".trim().toString()]||(()=>{}),Yh=0;function Ne(e){const[t,n]=f.useState(Bh());return Oe(()=>{n(r=>r??String(Yh++))},[e]),e||(t?`radix-${t}`:"")}const Hh=["top","right","bottom","left"],Ft=Math.min,Je=Math.max,$r=Math.round,wr=Math.floor,bt=e=>({x:e,y:e}),zh={left:"right",right:"left",bottom:"top",top:"bottom"},Gh={start:"end",end:"start"};function aa(e,t,n){return Je(e,Ft(t,n))}function Rt(e,t){return typeof e=="function"?e(t):e}function Tt(e){return e.split("-")[0]}function Rn(e){return e.split("-")[1]}function Ra(e){return e==="x"?"y":"x"}function Ta(e){return e==="y"?"height":"width"}const Uh=new Set(["top","bottom"]);function vt(e){return Uh.has(Tt(e))?"y":"x"}function _a(e){return Ra(vt(e))}function qh(e,t,n){n===void 0&&(n=!1);const r=Rn(e),o=_a(e),a=Ta(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Lr(s)),[s,Lr(s)]}function Vh(e){const t=Lr(e);return[sa(e),t,sa(t)]}function sa(e){return e.replace(/start|end/g,t=>Gh[t])}const Bs=["left","right"],Ys=["right","left"],Kh=["top","bottom"],Xh=["bottom","top"];function Zh(e,t,n){switch(e){case"top":case"bottom":return n?t?Ys:Bs:t?Bs:Ys;case"left":case"right":return t?Kh:Xh;default:return[]}}function Qh(e,t,n,r){const o=Rn(e);let a=Zh(Tt(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(sa)))),a}function Lr(e){return e.replace(/left|right|bottom|top/g,t=>zh[t])}function Jh(e){return{top:0,right:0,bottom:0,left:0,...e}}function lc(e){return typeof e!="number"?Jh(e):{top:e,right:e,bottom:e,left:e}}function Fr(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 Hs(e,t,n){let{reference:r,floating:o}=e;const a=vt(t),s=_a(t),i=Ta(s),l=Tt(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(Rn(t)){case"start":h[s]-=p*(n&&u?-1:1);break;case"end":h[s]+=p*(n&&u?-1:1);break}return h}const eg=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}=Hs(u,r,l),p=r,h={},y=0;for(let g=0;g<i.length;g++){const{name:v,fn:b}=i[g],{x,y:S,data:M,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=x??m,c=S??c,h={...h,[v]:{...h[v],...M}},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}=Hs(u,p,l)),g=-1)}return{x:m,y:c,placement:p,strategy:o,middlewareData:h}};async function Un(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}=Rt(t,e),y=lc(h),v=i[p?c==="floating"?"reference":"floating":c],b=Fr(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:m,strategy:l})),x=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)),M=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=Fr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:S,strategy:l}):x);return{top:(b.top-C.top+y.top)/M.y,bottom:(C.bottom-b.bottom+y.bottom)/M.y,left:(b.left-C.left+y.left)/M.x,right:(C.right-b.right+y.right)/M.x}}const tg=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}=Rt(e,t)||{};if(u==null)return{};const c=lc(m),p={x:n,y:r},h=_a(o),y=Ta(h),g=await s.getDimensions(u),v=h==="y",b=v?"top":"left",x=v?"bottom":"right",S=v?"clientHeight":"clientWidth",M=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 D=N?N[S]:0;(!D||!await(s.isElement==null?void 0:s.isElement(N)))&&(D=i.floating[S]||a.floating[y]);const R=M/2-C/2,j=D/2-g[y]/2-1,F=Ft(c[b],j),$=Ft(c[x],j),V=F,B=D-g[y]-$,P=D/2-g[y]/2+R,T=aa(V,P,B),k=!l.arrow&&Rn(o)!=null&&P!==T&&a.reference[y]/2-(P<V?F:$)-g[y]/2<0,A=k?P<V?P-V:P-B:0;return{[h]:p[h]+A,data:{[h]:T,centerOffset:P-T-A,...k&&{alignmentOffset:A}},reset:k}}}),ng=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:g=!0,...v}=Rt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=Tt(o),x=vt(i),S=Tt(i)===i,M=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=p||(S||!g?[Lr(i)]:Vh(i)),N=y!=="none";!p&&N&&C.push(...Qh(i,g,y,M));const D=[i,...C],R=await Un(t,v),j=[];let F=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&j.push(R[b]),c){const P=qh(o,s,M);j.push(R[P[0]],R[P[1]])}if(F=[...F,{placement:o,overflows:j}],!j.every(P=>P<=0)){var $,V;const P=((($=a.flip)==null?void 0:$.index)||0)+1,T=D[P];if(T&&(!(c==="alignment"?x!==vt(T):!1)||F.every(E=>E.overflows[0]>0&&vt(E.placement)===x)))return{data:{index:P,overflows:F},reset:{placement:T}};let k=(V=F.filter(A=>A.overflows[0]<=0).sort((A,E)=>A.overflows[1]-E.overflows[1])[0])==null?void 0:V.placement;if(!k)switch(h){case"bestFit":{var B;const A=(B=F.filter(E=>{if(N){const O=vt(E.placement);return O===x||O==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(O=>O>0).reduce((O,Y)=>O+Y,0)]).sort((E,O)=>E[1]-O[1])[0])==null?void 0:B[0];A&&(k=A);break}case"initialPlacement":k=i;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function zs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Gs(e){return Hh.some(t=>e[t]>=0)}const rg=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Rt(e,t);switch(r){case"referenceHidden":{const a=await Un(t,{...o,elementContext:"reference"}),s=zs(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Gs(s)}}}case"escaped":{const a=await Un(t,{...o,altBoundary:!0}),s=zs(a,n.floating);return{data:{escapedOffsets:s,escaped:Gs(s)}}}default:return{}}}}},uc=new Set(["left","top"]);async function og(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Tt(n),i=Rn(n),l=vt(n)==="y",u=uc.has(s)?-1:1,m=a&&l?-1:1,c=Rt(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 ag=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 og(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}}}}},sg=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:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...l}=Rt(e,t),u={x:n,y:r},m=await Un(t,l),c=vt(Tt(o)),p=Ra(c);let h=u[p],y=u[c];if(a){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=h+m[v],S=h-m[b];h=aa(x,h,S)}if(s){const v=c==="y"?"top":"left",b=c==="y"?"bottom":"right",x=y+m[v],S=y-m[b];y=aa(x,y,S)}const g=i.fn({...t,[p]:h,[c]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[c]:s}}}}}},ig=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}=Rt(e,t),m={x:n,y:r},c=vt(o),p=Ra(c);let h=m[p],y=m[c];const g=Rt(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const S=p==="y"?"height":"width",M=a.reference[p]-a.floating[S]+v.mainAxis,C=a.reference[p]+a.reference[S]-v.mainAxis;h<M?h=M:h>C&&(h=C)}if(u){var b,x;const S=p==="y"?"width":"height",M=uc.has(Tt(o)),C=a.reference[c]-a.floating[S]+(M&&((b=s.offset)==null?void 0:b[c])||0)+(M?0:v.crossAxis),N=a.reference[c]+a.reference[S]+(M?0:((x=s.offset)==null?void 0:x[c])||0)-(M?v.crossAxis:0);y<C?y=C:y>N&&(y=N)}return{[p]:h,[c]:y}}}},cg=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}=Rt(e,t),m=await Un(t,u),c=Tt(o),p=Rn(o),h=vt(o)==="y",{width:y,height:g}=a.floating;let v,b;c==="top"||c==="bottom"?(v=c,b=p===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=c,v=p==="end"?"top":"bottom");const x=g-m.top-m.bottom,S=y-m.left-m.right,M=Ft(g-m[v],x),C=Ft(y-m[b],S),N=!t.middlewareData.shift;let D=M,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(D=x),N&&!p){const F=Je(m.left,0),$=Je(m.right,0),V=Je(m.top,0),B=Je(m.bottom,0);h?R=y-2*(F!==0||$!==0?F+$:Je(m.left,m.right)):D=g-2*(V!==0||B!==0?V+B:Je(m.top,m.bottom))}await l({...t,availableWidth:R,availableHeight:D});const j=await s.getDimensions(i.floating);return y!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function eo(){return typeof window<"u"}function Tn(e){return dc(e)?(e.nodeName||"").toLowerCase():"#document"}function et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xt(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 et(e).Node:!1}function ut(e){return eo()?e instanceof Element||e instanceof et(e).Element:!1}function wt(e){return eo()?e instanceof HTMLElement||e instanceof et(e).HTMLElement:!1}function Us(e){return!eo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof et(e).ShadowRoot}const lg=new Set(["inline","contents"]);function nr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=dt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!lg.has(o)}const ug=new Set(["table","td","th"]);function dg(e){return ug.has(Tn(e))}const fg=[":popover-open",":modal"];function to(e){return fg.some(t=>{try{return e.matches(t)}catch{return!1}})}const mg=["transform","translate","scale","rotate","perspective"],pg=["transform","translate","scale","rotate","perspective","filter"],hg=["paint","layout","strict","content"];function Oa(e){const t=Pa(),n=ut(e)?dt(e):e;return mg.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)||pg.some(r=>(n.willChange||"").includes(r))||hg.some(r=>(n.contain||"").includes(r))}function gg(e){let t=Wt(e);for(;wt(t)&&!wn(t);){if(Oa(t))return t;if(to(t))return null;t=Wt(t)}return null}function Pa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const vg=new Set(["html","body","#document"]);function wn(e){return vg.has(Tn(e))}function dt(e){return et(e).getComputedStyle(e)}function no(e){return ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wt(e){if(Tn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Us(e)&&e.host||xt(e);return Us(t)?t.host:t}function fc(e){const t=Wt(e);return wn(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&nr(t)?t:fc(t)}function qn(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=et(o);if(a){const i=ia(s);return t.concat(s,s.visualViewport||[],nr(o)?o:[],i&&n?qn(i):[])}return t.concat(o,qn(o,[],n))}function ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mc(e){const t=dt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=$r(n)!==a||$r(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Aa(e){return ut(e)?e:e.contextElement}function yn(e){const t=Aa(e);if(!wt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mc(t);let s=(a?$r(n.width):n.width)/r,i=(a?$r(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const yg=bt(0);function pc(e){const t=et(e);return!Pa()||!t.visualViewport?yg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==et(e)?!1:t}function Jt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Aa(e);let s=bt(1);t&&(r?ut(r)&&(s=yn(r)):s=yn(e));const i=bg(a,n,r)?pc(a):bt(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=et(a),h=r&&ut(r)?et(r):r;let y=p,g=ia(y);for(;g&&r&&h!==y;){const v=yn(g),b=g.getBoundingClientRect(),x=dt(g),S=b.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,M=b.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,u*=v.y,m*=v.x,c*=v.y,l+=S,u+=M,y=et(g),g=ia(y)}}return Fr({width:m,height:c,x:l,y:u})}function Ia(e,t){const n=no(e).scrollLeft;return t?t.left+n:Jt(xt(e)).left+n}function hc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Ia(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function wg(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=xt(r),i=t?to(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},u=bt(1);const m=bt(0),c=wt(r);if((c||!c&&!a)&&((Tn(r)!=="body"||nr(s))&&(l=no(r)),wt(r))){const h=Jt(r);u=yn(r),m.x=h.x+r.clientLeft,m.y=h.y+r.clientTop}const p=s&&!c&&!a?hc(s,l,!0):bt(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 xg(e){return Array.from(e.getClientRects())}function Sg(e){const t=xt(e),n=no(e),r=e.ownerDocument.body,o=Je(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Je(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ia(e);const i=-n.scrollTop;return dt(r).direction==="rtl"&&(s+=Je(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function Cg(e,t){const n=et(e),r=xt(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=Pa();(!u||u&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}const Mg=new Set(["absolute","fixed"]);function Dg(e,t){const n=Jt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=wt(e)?yn(e):bt(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 qs(e,t,n){let r;if(t==="viewport")r=Cg(e,n);else if(t==="document")r=Sg(xt(e));else if(ut(t))r=Dg(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 Fr(r)}function gc(e,t){const n=Wt(e);return n===t||!ut(n)||wn(n)?!1:dt(n).position==="fixed"||gc(n,t)}function kg(e,t){const n=t.get(e);if(n)return n;let r=qn(e,[],!1).filter(i=>ut(i)&&Tn(i)!=="body"),o=null;const a=dt(e).position==="fixed";let s=a?Wt(e):e;for(;ut(s)&&!wn(s);){const i=dt(s),l=Oa(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&Mg.has(o.position)||nr(s)&&!l&&gc(e,s))?r=r.filter(m=>m!==s):o=i,s=Wt(s)}return t.set(e,r),r}function Eg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?to(t)?[]:kg(t,this._c):[].concat(n),r],i=s[0],l=s.reduce((u,m)=>{const c=qs(t,m,o);return u.top=Je(c.top,u.top),u.right=Ft(c.right,u.right),u.bottom=Ft(c.bottom,u.bottom),u.left=Je(c.left,u.left),u},qs(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ng(e){const{width:t,height:n}=mc(e);return{width:t,height:n}}function Rg(e,t,n){const r=wt(t),o=xt(t),a=n==="fixed",s=Jt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=bt(0);function u(){l.x=Ia(o)}if(r||!r&&!a)if((Tn(t)!=="body"||nr(o))&&(i=no(t)),r){const h=Jt(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):bt(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 dt(e).position==="static"}function Vs(e,t){if(!wt(e)||dt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return xt(e)===n&&(n=n.ownerDocument.body),n}function vc(e,t){const n=et(e);if(to(e))return n;if(!wt(e)){let o=Wt(e);for(;o&&!wn(o);){if(ut(o)&&!Oo(o))return o;o=Wt(o)}return n}let r=Vs(e,t);for(;r&&dg(r)&&Oo(r);)r=Vs(r,t);return r&&wn(r)&&Oo(r)&&!Oa(r)?n:r||gg(e)||n}const Tg=async function(e){const t=this.getOffsetParent||vc,n=this.getDimensions,r=await n(e.floating);return{reference:Rg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _g(e){return dt(e).direction==="rtl"}const Og={convertOffsetParentRelativeRectToViewportRelativeRect:wg,getDocumentElement:xt,getClippingRect:Eg,getOffsetParent:vc,getElementRects:Tg,getClientRects:xg,getDimensions:Ng,getScale:yn,isElement:ut,isRTL:_g};function yc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pg(e,t){let n=null,r;const o=xt(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=wr(c),g=wr(o.clientWidth-(m+p)),v=wr(o.clientHeight-(c+h)),b=wr(m),S={rootMargin:-y+"px "+-g+"px "+-v+"px "+-b+"px",threshold:Je(0,Ft(1,l))||1};let M=!0;function C(N){const D=N[0].intersectionRatio;if(D!==l){if(!M)return s();D?s(!1,D):r=setTimeout(()=>{s(!1,1e-7)},1e3)}D===1&&!yc(u,e.getBoundingClientRect())&&s(),M=!1}try{n=new IntersectionObserver(C,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(e)}return s(!0),a}function Ag(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=Aa(e),m=o||a?[...u?qn(u):[],...qn(t)]:[];m.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const c=u&&i?Pg(u,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(b=>{let[x]=b;x&&x.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,g=l?Jt(e):null;l&&v();function v(){const b=Jt(e);g&&!yc(g,b)&&n(),g=b,y=requestAnimationFrame(v)}return n(),()=>{var b;m.forEach(x=>{o&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),c==null||c(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const Ig=ag,jg=sg,$g=ng,Lg=cg,Fg=rg,Ks=tg,Wg=ig,Bg=(e,t,n)=>{const r=new Map,o={platform:Og,...n},a={...o.platform,_c:r};return eg(e,t,{...o,platform:a})};var Yg=typeof document<"u",Hg=function(){},Tr=Yg?w.useLayoutEffect:Hg;function Wr(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(!Wr(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)&&!Wr(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 Xs(e,t){const n=bc(e);return Math.round(t*n)/n}function Po(e){const t=f.useRef(e);return Tr(()=>{t.current=e}),t}function zg(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);Wr(p,r)||h(r);const[y,g]=f.useState(null),[v,b]=f.useState(null),x=f.useCallback(E=>{E!==N.current&&(N.current=E,g(E))},[]),S=f.useCallback(E=>{E!==D.current&&(D.current=E,b(E))},[]),M=a||y,C=s||v,N=f.useRef(null),D=f.useRef(null),R=f.useRef(m),j=l!=null,F=Po(l),$=Po(o),V=Po(u),B=f.useCallback(()=>{if(!N.current||!D.current)return;const E={placement:t,strategy:n,middleware:p};$.current&&(E.platform=$.current),Bg(N.current,D.current,E).then(O=>{const Y={...O,isPositioned:V.current!==!1};P.current&&!Wr(R.current,Y)&&(R.current=Y,Zr.flushSync(()=>{c(Y)}))})},[p,t,n,$,V]);Tr(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,c(E=>({...E,isPositioned:!1})))},[u]);const P=f.useRef(!1);Tr(()=>(P.current=!0,()=>{P.current=!1}),[]),Tr(()=>{if(M&&(N.current=M),C&&(D.current=C),M&&C){if(F.current)return F.current(M,C,B);B()}},[M,C,B,F,j]);const T=f.useMemo(()=>({reference:N,floating:D,setReference:x,setFloating:S}),[x,S]),k=f.useMemo(()=>({reference:M,floating:C}),[M,C]),A=f.useMemo(()=>{const E={position:n,left:0,top:0};if(!k.floating)return E;const O=Xs(k.floating,m.x),Y=Xs(k.floating,m.y);return i?{...E,transform:"translate("+O+"px, "+Y+"px)",...bc(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:Y}},[n,i,k.floating,m.x,m.y]);return f.useMemo(()=>({...m,update:B,refs:T,elements:k,floatingStyles:A}),[m,B,T,k,A])}const Gg=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?Ks({element:r.current,padding:o}).fn(n):{}:r?Ks({element:r,padding:o}).fn(n):{}}}},Ug=(e,t)=>({...Ig(e),options:[e,t]}),qg=(e,t)=>({...jg(e),options:[e,t]}),Vg=(e,t)=>({...Wg(e),options:[e,t]}),Kg=(e,t)=>({...$g(e),options:[e,t]}),Xg=(e,t)=>({...Lg(e),options:[e,t]}),Zg=(e,t)=>({...Fg(e),options:[e,t]}),Qg=(e,t)=>({...Gg(e),options:[e,t]});var Jg="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=Jg;var ev=wc;function ja(e){const[t,n]=f.useState(void 0);return Oe(()=>{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 $a="Popper",[xc,Yt]=He($a),[tv,Sc]=xc($a),Cc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return d.jsx(tv,{scope:t,anchor:r,onAnchorChange:o,children:n})};Cc.displayName=$a;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 La="PopperContent",[nv,rv]=xc(La),kc=f.forwardRef((e,t)=>{var W,Q,K,X,se,ie;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,...g}=e,v=Sc(La,n),[b,x]=f.useState(null),S=he(t,ye=>x(ye)),[M,C]=f.useState(null),N=ja(M),D=(N==null?void 0:N.width)??0,R=(N==null?void 0:N.height)??0,j=r+(a!=="center"?"-"+a:""),F=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},$=Array.isArray(u)?u:[u],V=$.length>0,B={padding:F,boundary:$.filter(av),altBoundary:V},{refs:P,floatingStyles:T,placement:k,isPositioned:A,middlewareData:E}=zg({strategy:"fixed",placement:j,whileElementsMounted:(...ye)=>Ag(...ye,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Ug({mainAxis:o+R,alignmentAxis:s}),l&&qg({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Vg():void 0,...B}),l&&Kg({...B}),Xg({...B,apply:({elements:ye,rects:J,availableWidth:Pe,availableHeight:Ae})=>{const{width:Me,height:Ue}=J.reference,Ce=ye.floating.style;Ce.setProperty("--radix-popper-available-width",`${Pe}px`),Ce.setProperty("--radix-popper-available-height",`${Ae}px`),Ce.setProperty("--radix-popper-anchor-width",`${Me}px`),Ce.setProperty("--radix-popper-anchor-height",`${Ue}px`)}}),M&&Qg({element:M,padding:i}),sv({arrowWidth:D,arrowHeight:R}),p&&Zg({strategy:"referenceHidden",...B})]}),[O,Y]=Rc(k),z=rt(y);Oe(()=>{A&&(z==null||z())},[A,z]);const _=(W=E.arrow)==null?void 0:W.x,I=(Q=E.arrow)==null?void 0:Q.y,H=((K=E.arrow)==null?void 0:K.centerOffset)!==0,[G,U]=f.useState();return Oe(()=>{b&&U(window.getComputedStyle(b).zIndex)},[b]),d.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:A?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(X=E.transformOrigin)==null?void 0:X.x,(se=E.transformOrigin)==null?void 0:se.y].join(" "),...((ie=E.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(nv,{scope:n,placedSide:O,onArrowChange:C,arrowX:_,arrowY:I,shouldHideArrow:H,children:d.jsx(ee.div,{"data-side":O,"data-align":Y,...g,ref:S,style:{...g.style,animation:A?void 0:"none"}})})})});kc.displayName=La;var Ec="PopperArrow",ov={top:"bottom",right:"left",bottom:"top",left:"right"},Nc=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=rv(Ec,r),s=ov[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(ev,{...o,ref:n,style:{...o.style,display:"block"}})})});Nc.displayName=Ec;function av(e){return e!==null}var sv=e=>({name:"transformOrigin",options:e,fn(t){var v,b,x;const{placement:n,rects:r,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.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=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let y="",g="";return u==="bottom"?(y=s?c:`${p}px`,g=`${-l}px`):u==="top"?(y=s?c:`${p}px`,g=`${r.floating.height+l}px`):u==="right"?(y=`${-l}px`,g=s?c:`${h}px`):u==="left"&&(y=`${r.floating.width+l}px`,g=s?c:`${h}px`),{data:{x:y,y:g}}}});function Rc(e){const[t,n="center"]=e.split("-");return[t,n]}var rr=Cc,or=Dc,ro=kc,oo=Nc,iv="Portal",ar=f.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=f.useState(!1);Oe(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Xr.createPortal(d.jsx(ee.div,{...r,ref:t}),s):null});ar.displayName=iv;function cv(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Ge=e=>{const{present:t,children:n}=e,r=lv(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,uv(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};Ge.displayName="Presence";function lv(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=cv(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=xr(r.current);a.current=i==="mounted"?u:"none"},[i]),Oe(()=>{const u=r.current,m=o.current;if(m!==e){const p=a.current,h=xr(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]),Oe(()=>{if(t){let u;const m=t.ownerDocument.defaultView??window,c=h=>{const g=xr(r.current).includes(h.animationName);if(h.target===t&&g&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=xr(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 xr(e){return(e==null?void 0:e.animationName)||"none"}function uv(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 dv=f[" useInsertionEffect ".trim().toString()]||Oe;function ot({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=fv({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=mv(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 fv({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return dv(()=>{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 mv(e){return typeof e=="function"}var pv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fn=new WeakMap,Sr=new WeakMap,Cr={},Ao=0,Tc=function(e){return e&&(e.host||Tc(e.parentNode))},hv=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})},gv=function(e,t,n,r){var o=hv(t,Array.isArray(e)?e:[e]);Cr[n]||(Cr[n]=new WeakMap);var a=Cr[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",g=(fn.get(p)||0)+1,v=(a.get(p)||0)+1;fn.set(p,g),a.set(p,v),s.push(p),g===1&&y&&Sr.set(p,!0),v===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=fn.get(c)-1,h=a.get(c)-1;fn.set(c,p),a.set(c,h),p||(Sr.has(c)||c.removeAttribute(r),Sr.delete(c)),h||c.removeAttribute(n)}),Ao--,Ao||(fn=new WeakMap,fn=new WeakMap,Sr=new WeakMap,Cr={})}},ao=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=pv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),gv(r,o,n,"aria-hidden")):function(){return null}},gt=function(){return gt=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},gt.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 vv(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 _r="right-scroll-bar-position",Or="width-before-scroll-bar",yv="with-scroll-bars-hidden",bv="--removed-body-scroll-bar-size";function Io(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wv(e,t){var n=w.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 xv=typeof window<"u"?f.useLayoutEffect:f.useEffect,Zs=new WeakMap;function Sv(e,t){var n=wv(null,function(r){return e.forEach(function(o){return Io(o,r)})});return xv(function(){var r=Zs.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)})}Zs.set(n,e)},[e]),n}function Cv(e){return e}function Mv(e,t){t===void 0&&(t=Cv);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 Dv(e){e===void 0&&(e={});var t=Mv(null);return t.options=gt({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,gt({},n))};Oc.isSideCarExport=!0;function kv(e,t){return e.useMedium(t),Oc}var Pc=Dv(),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,g=e.inert,v=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,S=e.gapMode,M=_c(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,N=Sv([n,t]),D=gt(gt({},M),o);return f.createElement(f.Fragment,null,m&&f.createElement(C,{sideCar:Pc,removeScrollBar:u,shards:c,noRelative:h,noIsolation:y,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:S}),s?f.cloneElement(f.Children.only(i),gt(gt({},D),{ref:N})):f.createElement(x,gt({},D,{className:l,ref:N}),i))});so.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};so.classNames={fullWidth:Or,zeroRight:_r};var Ev=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Nv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ev();return t&&e.setAttribute("nonce",t),e}function Rv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Tv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _v=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Nv())&&(Rv(t,n),Tv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ov=function(){var e=_v();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ac=function(){var e=Ov(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Pv={left:0,top:0,right:0,gap:0},$o=function(e){return parseInt(e||"",10)||0},Av=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)]},Iv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Pv;var t=Av(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])}},jv=Ac(),bn="data-scroll-locked",$v=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
|
|
132
132
|
.`.concat(yv,` {
|
|
133
133
|
overflow: hidden `).concat(r,`;
|
|
134
|
-
padding-right: `).concat(
|
|
134
|
+
padding-right: `).concat(i,"px ").concat(r,`;
|
|
135
135
|
}
|
|
136
136
|
body[`).concat(bn,`] {
|
|
137
137
|
overflow: hidden `).concat(r,`;
|
|
@@ -139,19 +139,19 @@
|
|
|
139
139
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
140
140
|
padding-left: `.concat(o,`px;
|
|
141
141
|
padding-top: `).concat(a,`px;
|
|
142
|
-
padding-right: `).concat(
|
|
142
|
+
padding-right: `).concat(s,`px;
|
|
143
143
|
margin-left:0;
|
|
144
144
|
margin-top:0;
|
|
145
|
-
margin-right: `).concat(
|
|
146
|
-
`),n==="padding"&&"padding-right: ".concat(
|
|
145
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
146
|
+
`),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
.`).concat(_r,` {
|
|
150
|
-
right: `).concat(
|
|
150
|
+
right: `).concat(i,"px ").concat(r,`;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
.`).concat(Or,` {
|
|
154
|
-
margin-right: `).concat(
|
|
154
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
.`).concat(_r," .").concat(_r,` {
|
|
@@ -163,41 +163,41 @@
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
body[`).concat(bn,`] {
|
|
166
|
-
`).concat(bv,": ").concat(
|
|
166
|
+
`).concat(bv,": ").concat(i,`px;
|
|
167
167
|
}
|
|
168
|
-
`)},Qs=function(){var e=parseInt(document.body.getAttribute(bn)||"0",10);return isFinite(e)?e:0},Lv=function(){f.useEffect(function(){return document.body.setAttribute(bn,(Qs()+1).toString()),function(){var e=Qs()-1;e<=0?document.body.removeAttribute(bn):document.body.setAttribute(bn,e.toString())}},[])},Fv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Lv();var a=f.useMemo(function(){return Iv(o)},[o]);return f.createElement(jv,{styles:$v(a,!t,o,n?"":"!important")})},ca=!1;if(typeof window<"u")try{var Mr=Object.defineProperty({},"passive",{get:function(){return ca=!0,!0}});window.addEventListener("test",Mr,Mr),window.removeEventListener("test",Mr,Mr)}catch{ca=!1}var mn=ca?{passive:!1}:!1,Wv=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&&!Wv(e)&&n[t]==="visible")},Bv=function(e){return Ic(e,"overflowY")},Yv=function(e){return Ic(e,"overflowX")},Js=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),
|
|
168
|
+
`)},Qs=function(){var e=parseInt(document.body.getAttribute(bn)||"0",10);return isFinite(e)?e:0},Lv=function(){f.useEffect(function(){return document.body.setAttribute(bn,(Qs()+1).toString()),function(){var e=Qs()-1;e<=0?document.body.removeAttribute(bn):document.body.setAttribute(bn,e.toString())}},[])},Fv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Lv();var a=f.useMemo(function(){return Iv(o)},[o]);return f.createElement(jv,{styles:$v(a,!t,o,n?"":"!important")})},ca=!1;if(typeof window<"u")try{var Mr=Object.defineProperty({},"passive",{get:function(){return ca=!0,!0}});window.addEventListener("test",Mr,Mr),window.removeEventListener("test",Mr,Mr)}catch{ca=!1}var mn=ca?{passive:!1}:!1,Wv=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&&!Wv(e)&&n[t]==="visible")},Bv=function(e){return Ic(e,"overflowY")},Yv=function(e){return Ic(e,"overflowX")},Js=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},Hv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},jc=function(e,t){return e==="v"?Bv(t):Yv(t)},$c=function(e,t){return e==="v"?Hv(t):zv(t)},Gv=function(e,t){return e==="h"&&t==="rtl"?-1:1},Uv=function(e,t,n,r,o){var a=Gv(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],g=h[1],v=h[2],b=g-v-a*y;(y||b)&&jc(e,i)&&(c+=b,p+=y);var x=i.parentNode;i=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}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},Dr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ei=function(e){return[e.deltaX,e.deltaY]},ti=function(e){return e&&"current"in e?e.current:e},qv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Vv=function(e){return`
|
|
169
169
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
170
170
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
171
|
-
`)},Kv=0,pn=[];function Xv(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Kv++)[0],a=f.useState(Ac)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=vv([e.lockRef.current],(e.shards||[]).map(ti),!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 s=f.useCallback(function(v,g){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var b=Dr(v),x=n.current,S="deltaX"in v?v.deltaX:x[0]-b[0],D="deltaY"in v?v.deltaY:x[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 N=Js(M,R);if(!N)return!0;if(N?C=M:(C=M==="v"?"h":"v",N=Js(M,R)),!N)return!1;if(!r.current&&"changedTouches"in v&&(S||D)&&(r.current=C),!C)return!0;var $=r.current||C;return Uv($,g,v,$==="h"?S:D)},[]),l=f.useCallback(function(v){var g=v;if(!(!pn.length||pn[pn.length-1]!==a)){var b="deltaY"in g?ei(g):Dr(g),x=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&qv(C.delta,b)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var S=(i.current.shards||[]).map(ti).filter(Boolean).filter(function(C){return C.contains(g.target)}),D=S.length>0?s(g,S[0]):!i.current.noIsolation;D&&g.cancelable&&g.preventDefault()}}},[]),u=f.useCallback(function(v,g,b,x){var S={name:v,delta:g,target:b,should:x,shadowParent:Zv(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=Dr(v),r.current=void 0},[]),c=f.useCallback(function(v){u(v.type,ei(v),v.target,s(v,e.lockRef.current))},[]),p=f.useCallback(function(v){u(v.type,Dr(v),v.target,s(v,e.lockRef.current))},[]);f.useEffect(function(){return pn.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,mn),document.addEventListener("touchmove",l,mn),document.addEventListener("touchstart",m,mn),function(){pn=pn.filter(function(v){return v!==a}),document.removeEventListener("wheel",l,mn),document.removeEventListener("touchmove",l,mn),document.removeEventListener("touchstart",m,mn)}},[]);var h=e.removeScrollBar,y=e.inert;return f.createElement(f.Fragment,null,y?f.createElement(a,{styles:Vv(o)}):null,h?f.createElement(Fv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Zv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Qv=kv(Pc,Xv);var sr=f.forwardRef(function(e,t){return f.createElement(so,gt({},e,{ref:t,sideCar:Qv}))});sr.classNames=so.classNames;var io="Popover",[Lc,dD]=ze(io,[Ht]),ir=Ht(),[Jv,zt]=Lc(io),Fc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=ir(t),l=f.useRef(null),[u,m]=f.useState(!1),[c,p]=st({prop:r,defaultProp:o??!1,onChange:a,caller:io});return d.jsx(rr,{...s,children:d.jsx(Jv,{scope:t,contentId:_e(),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:i,children:n})})};Fc.displayName=io;var Wc="PopoverAnchor",ey=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=zt(Wc,n),a=ir(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return f.useEffect(()=>(i(),()=>s()),[i,s]),d.jsx(or,{...a,...r,ref:t})});ey.displayName=Wc;var Bc="PopoverTrigger",Yc=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=zt(Bc,n),a=ir(n),i=he(t,o.triggerRef),s=d.jsx(te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":qc(o.open),...r,ref:i,onClick:Z(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:d.jsx(or,{asChild:!0,...a,children:s})});Yc.displayName=Bc;var Fa="PopoverPortal",[ty,ny]=Lc(Fa,{forceMount:void 0}),Hc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=zt(Fa,t);return d.jsx(ty,{scope:t,forceMount:n,children:d.jsx(Ue,{present:n||a.open,children:d.jsx(ar,{asChild:!0,container:o,children:r})})})};Hc.displayName=Fa;var xn="PopoverContent",zc=f.forwardRef((e,t)=>{const n=ny(xn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=zt(xn,e.__scopePopover);return d.jsx(Ue,{present:r||a.open,children:a.modal?d.jsx(oy,{...o,ref:t}):d.jsx(ay,{...o,ref:t})})});zc.displayName=xn;var ry=Ft("PopoverContent.RemoveScroll"),oy=f.forwardRef((e,t)=>{const n=zt(xn,e.__scopePopover),r=f.useRef(null),o=he(t,r),a=f.useRef(!1);return f.useEffect(()=>{const i=r.current;if(i)return ao(i)},[]),d.jsx(sr,{as:ry,allowPinchZoom:!0,children:d.jsx(Gc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Z(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Z(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),ay=f.forwardRef((e,t)=>{const n=zt(xn,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(Gc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.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 i=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&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:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:m,...c}=e,p=zt(xn,n),h=ir(n);return Jr(),d.jsx(tr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:m,onEscapeKeyDown:s,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",sy=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=zt(Uc,n);return d.jsx(te.button,{type:"button",...r,ref:t,onClick:Z(e.onClick,()=>o.onOpenChange(!1))})});sy.displayName=Uc;var iy="PopoverArrow",cy=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ir(n);return d.jsx(oo,{...o,...r,ref:t})});cy.displayName=iy;function qc(e){return e?"open":"closed"}var ly=Fc,uy=Yc,dy=Hc,Vc=zc;const Wa=ly,Ba=uy,co=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(dy,{children:d.jsx(Vc,{ref:r,sideOffset:t,className:B("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 ni(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ya(e){const t=e+"CollectionProvider",[n,r]=ze(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:g,children:b}=v,x=w.useRef(null),S=w.useRef(new Map).current;return d.jsx(o,{scope:g,itemMap:S,collectionRef:x,children:b})};i.displayName=t;const s=e+"CollectionSlot",l=Ft(s),u=w.forwardRef((v,g)=>{const{scope:b,children:x}=v,S=a(s,b),D=he(g,S.collectionRef);return d.jsx(l,{ref:D,children:x})});u.displayName=s;const m=e+"CollectionItemSlot",c="data-radix-collection-item",p=Ft(m),h=w.forwardRef((v,g)=>{const{scope:b,children:x,...S}=v,D=w.useRef(null),C=he(g,D),R=a(m,b);return w.useEffect(()=>(R.itemMap.set(D,{ref:D,...S}),()=>void R.itemMap.delete(D))),d.jsx(p,{[c]:"",ref:C,children:x})});h.displayName=m;function y(v){const g=a(e+"CollectionConsumer",v);return w.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const S=Array.from(x.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:i,Slot:u,ItemSlot:h},y,r]}var fy=f.createContext(void 0);function cr(e){const t=f.useContext(fy);return e||t||"ltr"}function Ha(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"}),my="VisuallyHidden",Xc=f.forwardRef((e,t)=>d.jsx(te.span,{...e,ref:t,style:{...Kc,...e.style}}));Xc.displayName=my;var py=Xc,hy=[" ","Enter","ArrowUp","ArrowDown"],gy=[" ","Enter"],en="Select",[lo,uo,vy]=Ya(en),[_n,fD]=ze(en,[vy,Ht]),fo=Ht(),[yy,Gt]=_n(en),[by,wy]=_n(en),Zc=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:m,autoComplete:c,disabled:p,required:h,form:y}=e,v=fo(t),[g,b]=f.useState(null),[x,S]=f.useState(null),[D,C]=f.useState(!1),R=cr(u),[M,N]=st({prop:r,defaultProp:o??!1,onChange:a,caller:en}),[$,F]=st({prop:i,defaultProp:s,onChange:l,caller:en}),W=f.useRef(null),q=g?y||!!g.closest("form"):!0,[I,_]=f.useState(new Set),O=Array.from(I).map(E=>E.props.value).join(";");return d.jsx(rr,{...v,children:d.jsxs(yy,{required:h,scope:t,trigger:g,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:D,onValueNodeHasChildrenChange:C,contentId:_e(),value:$,onValueChange:F,open:M,onOpenChange:N,dir:R,triggerPointerDownPosRef:W,disabled:p,children:[d.jsx(lo.Provider,{scope:t,children:d.jsx(by,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(E=>{_(A=>new Set(A).add(E))},[]),onNativeOptionRemove:f.useCallback(E=>{_(A=>{const k=new Set(A);return k.delete(E),k})},[]),children:n})}),q?d.jsxs(xl,{"aria-hidden":!0,required:h,tabIndex:-1,name:m,autoComplete:c,value:$,onChange:E=>F(E.target.value),disabled:p,form:y,children:[$===void 0?d.jsx("option",{value:""}):null,Array.from(I)]},O):null]})})};Zc.displayName=en;var Qc="SelectTrigger",Jc=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=fo(n),i=Gt(Qc,n),s=i.disabled||r,l=he(t,i.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===i.value),x=Ml(g,v,b);x!==void 0&&i.onValueChange(x.value)}),y=v=>{s||(i.onOpenChange(!0),h()),v&&(i.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return d.jsx(or,{asChild:!0,...a,children:d.jsx(te.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Sl(i.value)?"":void 0,...o,ref:l,onClick:Z(o.onClick,v=>{v.currentTarget.focus(),m.current!=="mouse"&&y(v)}),onPointerDown:Z(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:Z(o.onKeyDown,v=>{const g=c.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&p(v.key),!(g&&v.key===" ")&&hy.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:i="",...s}=e,l=Gt(el,n),{onValueNodeHasChildrenChange:u}=l,m=a!==void 0,c=he(t,l.onValueNodeChange);return Ie(()=>{u(m)},[u,m]),d.jsx(te.span,{...s,ref:c,style:{pointerEvents:"none"},children:Sl(l.value)?d.jsx(d.Fragment,{children:i}):a})});tl.displayName=el;var xy="SelectIcon",nl=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return d.jsx(te.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});nl.displayName=xy;var Sy="SelectPortal",rl=e=>d.jsx(ar,{asChild:!0,...e});rl.displayName=Sy;var tn="SelectContent",ol=f.forwardRef((e,t)=>{const n=Gt(tn,e.__scopeSelect),[r,o]=f.useState();if(Ie(()=>{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=tn;var ct=10,[al,Ut]=_n(tn),Cy="SelectContentImpl",My=Ft("SelectContent.RemoveScroll"),sl=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:u,alignOffset:m,arrowPadding:c,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:v,avoidCollisions:g,...b}=e,x=Gt(tn,n),[S,D]=f.useState(null),[C,R]=f.useState(null),M=he(t,L=>D(L)),[N,$]=f.useState(null),[F,W]=f.useState(null),q=uo(n),[I,_]=f.useState(!1),O=f.useRef(!1);f.useEffect(()=>{if(S)return ao(S)},[S]),Jr();const E=f.useCallback(L=>{const[K,...X]=q().map(ae=>ae.ref.current),[Q]=X.slice(-1),J=document.activeElement;for(const ae of L)if(ae===J||(ae==null||ae.scrollIntoView({block:"nearest"}),ae===K&&C&&(C.scrollTop=0),ae===Q&&C&&(C.scrollTop=C.scrollHeight),ae==null||ae.focus(),document.activeElement!==J))return},[q,C]),A=f.useCallback(()=>E([N,S]),[E,N,S]);f.useEffect(()=>{I&&A()},[I,A]);const{onOpenChange:k,triggerPointerDownPosRef:P}=x;f.useEffect(()=>{if(S){let L={x:0,y:0};const K=Q=>{var J,ae;L={x:Math.abs(Math.round(Q.pageX)-(((J=P.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((ae=P.current)==null?void 0:ae.y)??0))}},X=Q=>{L.x<=10&&L.y<=10?Q.preventDefault():S.contains(Q.target)||k(!1),document.removeEventListener("pointermove",K),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",K),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",X,{capture:!0})}}},[S,k,P]),f.useEffect(()=>{const L=()=>k(!1);return window.addEventListener("blur",L),window.addEventListener("resize",L),()=>{window.removeEventListener("blur",L),window.removeEventListener("resize",L)}},[k]);const[Y,z]=Cl(L=>{const K=q().filter(J=>!J.disabled),X=K.find(J=>J.ref.current===document.activeElement),Q=Ml(K,L,X);Q&&setTimeout(()=>Q.ref.current.focus())}),T=f.useCallback((L,K,X)=>{const Q=!O.current&&!X;(x.value!==void 0&&x.value===K||Q)&&($(L),Q&&(O.current=!0))},[x.value]),j=f.useCallback(()=>S==null?void 0:S.focus(),[S]),H=f.useCallback((L,K,X)=>{const Q=!O.current&&!X;(x.value!==void 0&&x.value===K||Q)&&W(L)},[x.value]),G=r==="popper"?la:il,V=G===la?{side:s,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:T,selectedItem:N,onItemLeave:j,itemTextRefCallback:H,focusSelectedItem:A,selectedItemText:F,position:r,isPositioned:I,searchRef:Y,children:d.jsx(sr,{as:My,allowPinchZoom:!0,children:d.jsx(tr,{asChild:!0,trapped:x.open,onMountAutoFocus:L=>{L.preventDefault()},onUnmountAutoFocus:Z(o,L=>{var K;(K=x.trigger)==null||K.focus({preventScroll:!0}),L.preventDefault()}),children:d.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:L=>L.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:d.jsx(G,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:L=>L.preventDefault(),...b,...V,onPlaced:()=>_(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Z(b.onKeyDown,L=>{const K=L.ctrlKey||L.altKey||L.metaKey;if(L.key==="Tab"&&L.preventDefault(),!K&&L.key.length===1&&z(L.key),["ArrowUp","ArrowDown","Home","End"].includes(L.key)){let Q=q().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(L.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(L.key)){const J=L.target,ae=Q.indexOf(J);Q=Q.slice(ae+1)}setTimeout(()=>E(Q)),L.preventDefault()}})})})})})})});sl.displayName=Cy;var Dy="SelectItemAlignedPosition",il=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Gt(tn,n),i=Ut(tn,n),[s,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:x}=i,S=f.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&v&&g&&b){const M=a.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),$=a.valueNode.getBoundingClientRect(),F=b.getBoundingClientRect();if(a.dir!=="rtl"){const J=F.left-N.left,ae=$.left-J,ye=M.left-ae,ee=M.width+ye,Te=Math.max(ee,N.width),je=window.innerWidth-ct,De=ni(ae,[ct,Math.max(ct,je-Te)]);s.style.minWidth=ee+"px",s.style.left=De+"px"}else{const J=N.right-F.right,ae=window.innerWidth-$.right-J,ye=window.innerWidth-M.right-ae,ee=M.width+ye,Te=Math.max(ee,N.width),je=window.innerWidth-ct,De=ni(ae,[ct,Math.max(ct,je-Te)]);s.style.minWidth=ee+"px",s.style.right=De+"px"}const W=p(),q=window.innerHeight-ct*2,I=v.scrollHeight,_=window.getComputedStyle(u),O=parseInt(_.borderTopWidth,10),E=parseInt(_.paddingTop,10),A=parseInt(_.borderBottomWidth,10),k=parseInt(_.paddingBottom,10),P=O+E+I+k+A,Y=Math.min(g.offsetHeight*5,P),z=window.getComputedStyle(v),T=parseInt(z.paddingTop,10),j=parseInt(z.paddingBottom,10),H=M.top+M.height/2-ct,G=q-H,V=g.offsetHeight/2,L=g.offsetTop+V,K=O+E+L,X=P-K;if(K<=H){const J=W.length>0&&g===W[W.length-1].ref.current;s.style.bottom="0px";const ae=u.clientHeight-v.offsetTop-v.offsetHeight,ye=Math.max(G,V+(J?j:0)+ae+A),ee=K+ye;s.style.height=ee+"px"}else{const J=W.length>0&&g===W[0].ref.current;s.style.top="0px";const ye=Math.max(H,O+v.offsetTop+(J?T:0)+V)+X;s.style.height=ye+"px",v.scrollTop=K-H+v.offsetTop}s.style.margin=`${ct}px 0`,s.style.minHeight=Y+"px",s.style.maxHeight=q+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,s,u,v,g,b,a.dir,r]);Ie(()=>S(),[S]);const[D,C]=f.useState();Ie(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const R=f.useCallback(M=>{M&&y.current===!0&&(S(),x==null||x(),y.current=!1)},[S,x]);return d.jsx(Ey,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:R,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:d.jsx(te.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});il.displayName=Dy;var ky="SelectPopperPosition",la=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ct,...a}=e,i=fo(n);return d.jsx(ro,{...i,...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=ky;var[Ey,za]=_n(tn,{}),ua="SelectViewport",cl=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Ut(ua,n),i=za(ua,n),s=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(te.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:Z(o.onScroll,u=>{const m=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&c){const h=Math.abs(l.current-m.scrollTop);if(h>0){const y=window.innerHeight-ct*2,v=parseFloat(c.style.minHeight),g=parseFloat(c.style.height),b=Math.max(v,g);if(b<y){const x=b+h,S=Math.min(y,x),D=x-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",[Ny,Ry]=_n(ll),Ty=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=_e();return d.jsx(Ny,{scope:n,id:o,children:d.jsx(te.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ty.displayName=ll;var ul="SelectLabel",dl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ry(ul,n);return d.jsx(te.div,{id:o.id,...r,ref:t})});dl.displayName=ul;var Br="SelectItem",[_y,fl]=_n(Br),ml=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=Gt(Br,n),l=Ut(Br,n),u=s.value===r,[m,c]=f.useState(a??""),[p,h]=f.useState(!1),y=he(t,x=>{var S;return(S=l.itemRefCallback)==null?void 0:S.call(l,x,r,o)}),v=_e(),g=f.useRef("touch"),b=()=>{o||(s.onValueChange(r),s.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(_y,{scope:n,value:r,disabled:o,textId:v,isSelected:u,onItemTextChange:f.useCallback(x=>{c(S=>S||((x==null?void 0:x.textContent)??"").trim())},[]),children:d.jsx(lo.ItemSlot,{scope:n,value:r,disabled:o,textValue:m,children:d.jsx(te.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,...i,ref:y,onFocus:Z(i.onFocus,()=>h(!0)),onBlur:Z(i.onBlur,()=>h(!1)),onClick:Z(i.onClick,()=>{g.current!=="mouse"&&b()}),onPointerUp:Z(i.onPointerUp,()=>{g.current==="mouse"&&b()}),onPointerDown:Z(i.onPointerDown,x=>{g.current=x.pointerType}),onPointerMove:Z(i.onPointerMove,x=>{var S;g.current=x.pointerType,o?(S=l.onItemLeave)==null||S.call(l):g.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Z(i.onPointerLeave,x=>{var S;x.currentTarget===document.activeElement&&((S=l.onItemLeave)==null||S.call(l))}),onKeyDown:Z(i.onKeyDown,x=>{var D;((D=l.searchRef)==null?void 0:D.current)!==""&&x.key===" "||(gy.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});ml.displayName=Br;var Yn="SelectItemText",pl=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Gt(Yn,n),s=Ut(Yn,n),l=fl(Yn,n),u=wy(Yn,n),[m,c]=f.useState(null),p=he(t,b=>c(b),l.onItemTextChange,b=>{var x;return(x=s.itemTextRefCallback)==null?void 0:x.call(s,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 Ie(()=>(v(y),()=>g(y)),[v,g,y]),d.jsxs(d.Fragment,{children:[d.jsx(te.span,{id:l.textId,...a,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Zr.createPortal(a.children,i.valueNode):null]})});pl.displayName=Yn;var hl="SelectItemIndicator",gl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return fl(hl,n).isSelected?d.jsx(te.span,{"aria-hidden":!0,...r,ref:t}):null});gl.displayName=hl;var da="SelectScrollUpButton",vl=f.forwardRef((e,t)=>{const n=Ut(da,e.__scopeSelect),r=za(da,e.__scopeSelect),[o,a]=f.useState(!1),i=he(t,r.onScrollButtonChange);return Ie(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=l.scrollTop>0;a(u)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?d.jsx(bl,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});vl.displayName=da;var fa="SelectScrollDownButton",yl=f.forwardRef((e,t)=>{const n=Ut(fa,e.__scopeSelect),r=za(fa,e.__scopeSelect),[o,a]=f.useState(!1),i=he(t,r.onScrollButtonChange);return Ie(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=l.scrollHeight-l.clientHeight,m=Math.ceil(l.scrollTop)<u;a(m)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?d.jsx(bl,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});yl.displayName=fa;var bl=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Ut("SelectScrollButton",n),i=f.useRef(null),s=uo(n),l=f.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),Ie(()=>{var m;const u=s().find(c=>c.ref.current===document.activeElement);(m=u==null?void 0:u.ref.current)==null||m.scrollIntoView({block:"nearest"})},[s]),d.jsx(te.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:Z(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:Z(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:Z(o.onPointerLeave,()=>{l()})})}),Oy="SelectSeparator",wl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(te.div,{"aria-hidden":!0,...r,ref:t})});wl.displayName=Oy;var ma="SelectArrow",Py=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=fo(n),a=Gt(ma,n),i=Ut(ma,n);return a.open&&i.position==="popper"?d.jsx(oo,{...o,...r,ref:t}):null});Py.displayName=ma;var Ay="SelectBubbleInput",xl=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),i=Ha(t);return f.useEffect(()=>{const s=o.current;if(!s)return;const l=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&m){const c=new Event("change",{bubbles:!0});m.call(s,t),s.dispatchEvent(c)}},[i,t]),d.jsx(te.select,{...n,style:{...Kc,...n.style},ref:a,defaultValue:t})});xl.displayName=Ay;function Sl(e){return e===""||e===void 0}function Cl(e){const t=at(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(i=>{const s=n.current+i;t(s),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(s)},[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 i=Iy(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Iy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var jy=Zc,Dl=Jc,$y=tl,Ly=nl,Fy=rl,kl=ol,Wy=cl,El=dl,Nl=ml,By=pl,Yy=gl,Rl=vl,Tl=yl,_l=wl;const pa=jy,ha=$y,Yr=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Dl,{ref:r,className:B("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(Ly,{asChild:!0,children:d.jsx(er,{strokeWidth:1.5,className:"h-4 w-4 text-foreground"})})]}));Yr.displayName=Dl.displayName;const Ol=f.forwardRef(({className:e,...t},n)=>d.jsx(Rl,{ref:n,className:B("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:B("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(er,{className:"h-4 w-4"})}));Pl.displayName=Tl.displayName;const Hr=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>d.jsx(Fy,{children:d.jsxs(kl,{ref:o,className:B("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(Wy,{className:B("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d.jsx(Pl,{})]})}));Hr.displayName=kl.displayName;const Hy=f.forwardRef(({className:e,...t},n)=>d.jsx(El,{ref:n,className:B("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Hy.displayName=El.displayName;const zr=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Nl,{ref:r,className:B("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(Yy,{children:d.jsx(Jn,{className:"h-4 w-4"})})}),d.jsx(By,{children:t})]}));zr.displayName=Nl.displayName;const zy=f.forwardRef(({className:e,...t},n)=>d.jsx(_l,{ref:n,className:B("-mx-1 my-1 h-px bg-muted",e),...t}));zy.displayName=_l.displayName;const Lo={},Hn={};function Gn(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 Hn?Hn[r]:ri(r,r.split(":"))}catch{if(e in Hn)return Hn[e];const n=e==null?void 0:e.match(Gy);return n?ri(e,n.slice(1)):NaN}}const Gy=/([+-]\d\d):?(\d\d)?/;function ri(e,t){const n=+t[0],r=+(t[1]||0);return Hn[e]=n>0?n*60+r:n*60-r}class yt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Gn(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 yt(...n,t):new yt(Date.now(),t)}withTimeZone(t){return new yt(+this,t)}getTimezoneOffset(){return-Gn(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ga(this),+this}[Symbol.for("constructDateFrom")](t){return new yt(+new Date(t),this.timeZone)}}const oi=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!oi.test(e))return;const t=e.replace(oi,"$1UTC");yt.prototype[t]&&(e.startsWith("get")?yt.prototype[e]=function(){return this.internal[t]()}:(yt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Uy(this),+this},yt.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 Uy(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=Gn(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,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const l=Gn(e.timeZone,e),m=-new Date(+e).getTimezoneOffset()-l,c=l!==t,p=m-s;if(c&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=Gn(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 He extends yt{static tz(t,...n){return n.length?new He(...n,t):new He(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} (${qy(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 He(+this,t)}[Symbol.for("constructDateFrom")](t){return new He(+new Date(t),this.timeZone)}}function qy(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 Ee;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Ee||(Ee={}));var lt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(lt||(lt={}));var et;(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"})(et||(et={}));const Il=6048e5,Vy=864e5,ai=Symbol.for("constructDateFrom");function Fe(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ai in e?e[ai](t):e instanceof Date?new e.constructor(t):new Date(t)}function xe(e,t){return Fe(t||e,e)}function jl(e,t,n){const r=xe(e,n==null?void 0:n.in);return isNaN(t)?Fe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function $l(e,t,n){const r=xe(e,n==null?void 0:n.in);if(isNaN(t))return Fe(e,NaN);if(!t)return r;const o=r.getDate(),a=Fe(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return o>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let Ky={};function lr(){return Ky}function Sn(e,t){var s,l,u,m;const n=lr(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.weekStartsOn)??0,o=xe(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Vn(e,t){return Sn(e,{...t,weekStartsOn:1})}function Ll(e,t){const n=xe(e,t==null?void 0:t.in),r=n.getFullYear(),o=Fe(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Vn(o),i=Fe(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=Vn(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function si(e){const t=xe(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 On(e,...t){const n=Fe.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Kn(e,t){const n=xe(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Fl(e,t,n){const[r,o]=On(n==null?void 0:n.in,e,t),a=Kn(r),i=Kn(o),s=+a-si(a),l=+i-si(i);return Math.round((s-l)/Vy)}function Xy(e,t){const n=Ll(e,t),r=Fe(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Vn(r)}function Zy(e,t,n){return jl(e,t*7,n)}function Qy(e,t,n){return $l(e,t*12,n)}function Jy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Fe.bind(null,o));const a=xe(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Fe(r,n||NaN)}function eb(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Fe.bind(null,o));const a=xe(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Fe(r,n||NaN)}function tb(e,t,n){const[r,o]=On(n==null?void 0:n.in,e,t);return+Kn(r)==+Kn(o)}function Wl(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function nb(e){return!(!Wl(e)&&typeof e!="number"||isNaN(+xe(e)))}function rb(e,t,n){const[r,o]=On(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function ob(e,t){const n=xe(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 ab(e,t){const[n,r]=On(e,t.start,t.end);return{start:n,end:r}}function sb(e,t){const{start:n,end:r}=ab(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let s=1;const l=[];for(;+i<=a;)l.push(Fe(n,i)),i.setMonth(i.getMonth()+s);return o?l.reverse():l}function ib(e,t){const n=xe(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function cb(e,t){const n=xe(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=xe(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 s,l,u,m;const n=lr(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.weekStartsOn)??0,o=xe(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function lb(e,t){return Yl(e,{...t,weekStartsOn:1})}const ub={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"}},db=(e,t,n)=>{let r;const o=ub[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 fb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},mb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hb={date:Fo({formats:fb,defaultWidth:"full"}),time:Fo({formats:mb,defaultWidth:"full"}),dateTime:Fo({formats:pb,defaultWidth:"full"})},gb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},vb=(e,t,n,r)=>gb[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 i=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const yb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},wb={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"]},xb={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"]},Sb={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"}},Cb={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"}},Mb=(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"},Db={ordinalNumber:Mb,era:$n({values:yb,defaultWidth:"wide"}),quarter:$n({values:bb,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$n({values:wb,defaultWidth:"wide"}),day:$n({values:xb,defaultWidth:"wide"}),dayPeriod:$n({values:Sb,defaultWidth:"wide",formattingValues:Cb,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 i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Eb(s,c=>c.test(i)):kb(s,c=>c.test(i));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const m=t.slice(i.length);return{value:u,rest:m}}}function kb(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Eb(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Nb(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 i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(o.length);return{value:i,rest:s}}}const Rb=/^(\d+)(th|st|nd|rd)?/i,Tb=/\d+/i,_b={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},Ob={any:[/^b/i,/^(a|c)/i]},Pb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ab={any:[/1/i,/2/i,/3/i,/4/i]},Ib={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},jb={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]},$b={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},Lb={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]},Fb={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},Wb={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}},Bb={ordinalNumber:Nb({matchPattern:Rb,parsePattern:Tb,valueCallback:e=>parseInt(e,10)}),era:Ln({matchPatterns:_b,defaultMatchWidth:"wide",parsePatterns:Ob,defaultParseWidth:"any"}),quarter:Ln({matchPatterns:Pb,defaultMatchWidth:"wide",parsePatterns:Ab,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ln({matchPatterns:Ib,defaultMatchWidth:"wide",parsePatterns:jb,defaultParseWidth:"any"}),day:Ln({matchPatterns:$b,defaultMatchWidth:"wide",parsePatterns:Lb,defaultParseWidth:"any"}),dayPeriod:Ln({matchPatterns:Fb,defaultMatchWidth:"any",parsePatterns:Wb,defaultParseWidth:"any"})},Ga={code:"en-US",formatDistance:db,formatLong:hb,formatRelative:vb,localize:Db,match:Bb,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Yb(e,t){const n=xe(e,t==null?void 0:t.in);return Fl(n,Bl(n))+1}function Hl(e,t){const n=xe(e,t==null?void 0:t.in),r=+Vn(n)-+Xy(n);return Math.round(r/Il)+1}function zl(e,t){var m,c,p,h;const n=xe(e,t==null?void 0:t.in),r=n.getFullYear(),o=lr(),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,i=Fe((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=Sn(i,t),l=Fe((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=Sn(l,t);return+n>=+s?r+1:+n>=+u?r:r-1}function Hb(e,t){var s,l,u,m;const n=lr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.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=Fe((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Sn(a,t)}function Gl(e,t){const n=xe(e,t==null?void 0:t.in),r=+Sn(n,t)-+Hb(n,t);return Math.round(r/Il)+1}function be(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const jt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return be(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):be(n+1,2)},d(e,t){return be(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 be(e.getHours()%12||12,t.length)},H(e,t){return be(e.getHours(),t.length)},m(e,t){return be(e.getMinutes(),t.length)},s(e,t){return be(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return be(o,t.length)}},hn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ii={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 jt.y(e,t)},Y:function(e,t,n,r){const o=zl(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return be(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):be(a,t.length)},R:function(e,t){const n=Ll(e);return be(n,t.length)},u:function(e,t){const n=e.getFullYear();return be(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 be(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 be(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 jt.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 be(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"}):be(o,t.length)},I:function(e,t,n){const r=Hl(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):be(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):jt.d(e,t)},D:function(e,t,n){const r=Yb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):be(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 be(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 be(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 be(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=hn.noon:r===0?o=hn.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=hn.evening:r>=12?o=hn.afternoon:r>=4?o=hn.morning:o=hn.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 jt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):jt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):be(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):be(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):jt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):jt.s(e,t)},S:function(e,t){return jt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return li(r);case"XXXX":case"XX":return Qt(r);case"XXXXX":case"XXX":default:return Qt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return li(r);case"xxxx":case"xx":return Qt(r);case"xxxxx":case"xxx":default:return Qt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ci(r,":");case"OOOO":default:return"GMT"+Qt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ci(r,":");case"zzzz":default:return"GMT"+Qt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return be(r,t.length)},T:function(e,t,n){return be(+e,t.length)}};function ci(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+be(a,2)}function li(e,t){return e%60===0?(e>0?"-":"+")+be(Math.abs(e)/60,2):Qt(e,t)}function Qt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=be(Math.trunc(r/60),2),a=be(r%60,2);return n+o+t+a}const ui=(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"})}},zb=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ui(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}}",ui(r,t)).replace("{{time}}",Ul(o,t))},Gb={p:Ul,P:zb},Ub=/^D+$/,qb=/^Y+$/,Vb=["D","DD","YY","YYYY"];function Kb(e){return Ub.test(e)}function Xb(e){return qb.test(e)}function Zb(e,t,n){const r=Qb(e,t,n);if(console.warn(r),Vb.includes(e))throw new RangeError(r)}function Qb(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 Jb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ew=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tw=/^'([^]*?)'?$/,nw=/''/g,rw=/[a-zA-Z]/;function ow(e,t,n){var m,c,p,h,y,v,g,b;const r=lr(),o=(n==null?void 0:n.locale)??r.locale??Ga,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,i=(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,s=xe(e,n==null?void 0:n.in);if(!nb(s))throw new RangeError("Invalid time value");let l=t.match(ew).map(x=>{const S=x[0];if(S==="p"||S==="P"){const D=Gb[S];return D(x,o.formatLong)}return x}).join("").match(Jb).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const S=x[0];if(S==="'")return{isToken:!1,value:aw(x)};if(ii[S])return{isToken:!0,value:x};if(S.match(rw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:x}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(x=>{if(!x.isToken)return x.value;const S=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Xb(S)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Kb(S))&&Zb(S,t,String(e));const D=ii[S[0]];return D(s,S,o.localize,u)}).join("")}function aw(e){const t=e.match(tw);return t?t[1].replace(nw,"'"):e}function sw(e,t){const n=xe(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Fe(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function iw(e,t){return xe(e,t==null?void 0:t.in).getMonth()}function cw(e,t){return xe(e,t==null?void 0:t.in).getFullYear()}function lw(e,t){return+xe(e)>+xe(t)}function uw(e,t){return+xe(e)<+xe(t)}function dw(e,t,n){const[r,o]=On(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function fw(e,t,n){const[r,o]=On(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function mw(e,t,n){const r=xe(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=Fe(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=sw(i);return r.setMonth(t,Math.min(a,s)),r}function pw(e,t,n){const r=xe(e,n==null?void 0:n.in);return isNaN(+r)?Fe(e,NaN):(r.setFullYear(t),r)}const di=5,hw=4;function gw(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,di*7-1);return t.getMonth(e)===t.getMonth(a)?di:hw}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 vw(e,t){const n=ql(e,t),r=gw(e,t);return t.addDays(n,r*7-1)}class Ot{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?He.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new He(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):Zy(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):Qy(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):rb(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):sb(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):vw(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):lb(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):ob(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):cb(r)},this.format=(r,o,a)=>{var s;const i=(s=this.overrides)!=null&&s.format?this.overrides.format(r,o,this.options):ow(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},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):iw(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):cw(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):lw(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):uw(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):tb(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):dw(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):fw(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Jy(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):eb(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):mw(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):pw(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):Kn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Vn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):ib(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):Sn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Bl(r)},this.options={locale:Ga,...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 St=new Ot;class Vl{constructor(t,n,r=St){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 yw{constructor(t,n){this.date=t,this.weeks=n}}class bw{constructor(t,n){this.days=n,this.weekNumber=t}}function Dt(e,t,n=!1,r=St){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?s(a,t):!n&&o?s(o,t):!1}function Kl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Ua(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 kt(e,t,n=St){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(s=>{if(typeof s=="boolean")return s;if(n.isDate(s))return o(e,s);if(Jl(s,n))return s.includes(e);if(Ua(s))return Dt(s,e,!1,n);if(Ql(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(Kl(s)){const l=a(s.before,e),u=a(s.after,e),m=l>0,c=u<0;return i(s.before,s.after)?c&&m:m||c}return Xl(s)?a(e,s.after)>0:Zl(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function ww(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:s,showOutsideDays:l,broadcastCalendar:u,today:m}=t,{isSameDay:c,isSameMonth:p,startOfMonth:h,isBefore:y,endOfMonth:v,isAfter:g}=o,b=n&&h(n),x=r&&v(r),S={[Ee.focused]:[],[Ee.outside]:[],[Ee.disabled]:[],[Ee.hidden]:[],[Ee.today]:[]},D={};for(const C of e){const{date:R,displayMonth:M}=C,N=!!(M&&!p(R,M)),$=!!(b&&y(R,b)),F=!!(x&&g(R,x)),W=!!(a&&kt(R,a,o)),q=!!(i&&kt(R,i,o))||$||F||!u&&!l&&N||u&&l===!1&&N,I=c(R,m??o.today());N&&S.outside.push(C),W&&S.disabled.push(C),q&&S.hidden.push(C),I&&S.today.push(C),s&&Object.keys(s).forEach(_=>{const O=s==null?void 0:s[_];O&&kt(R,O,o)&&(D[_]?D[_].push(C):D[_]=[C])})}return C=>{const R={[Ee.focused]:!1,[Ee.disabled]:!1,[Ee.hidden]:!1,[Ee.outside]:!1,[Ee.today]:!1},M={};for(const N in S){const $=S[N];R[N]=$.some(F=>F===C)}for(const N in D)M[N]=D[N].some($=>$===C);return{...R,...M}}}function xw(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[Ee[a]]?o.push(t[Ee[a]]):t[lt[a]]&&o.push(t[lt[a]]),o),[t[ce.Day]])}function Sw(e){return w.createElement("button",{...e})}function Cw(e){return w.createElement("span",{...e})}function Mw(e){const{size:t=24,orientation:n="left",className:r}=e;return w.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&w.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&w.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&w.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&w.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Dw(e){const{day:t,modifiers:n,...r}=e;return w.createElement("td",{...r})}function kw(e){const{day:t,modifiers:n,...r}=e,o=w.useRef(null);return w.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),w.createElement("button",{ref:o,...r})}function Ew(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[ce.Dropdown],n].join(" "),s=t==null?void 0:t.find(({value:l})=>l===a.value);return w.createElement("span",{"data-disabled":a.disabled,className:o[ce.DropdownRoot]},w.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:l,label:u,disabled:m})=>w.createElement(r.Option,{key:l,value:l,disabled:m},u))),w.createElement("span",{className:o[ce.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,w.createElement(r.Chevron,{orientation:"down",size:18,className:o[ce.Chevron]})))}function Nw(e){return w.createElement("div",{...e})}function Rw(e){return w.createElement("div",{...e})}function Tw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return w.createElement("div",{...r},e.children)}function _w(e){const{calendarMonth:t,displayIndex:n,...r}=e;return w.createElement("div",{...r})}function Ow(e){return w.createElement("table",{...e})}function Pw(e){return w.createElement("div",{...e})}const eu=w.createContext(void 0);function ur(){const e=w.useContext(eu);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Aw(e){const{components:t}=ur();return w.createElement(t.Dropdown,{...e})}function Iw(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:l,labelNext:u}}=ur(),m=w.useCallback(p=>{o&&(n==null||n(p))},[o,n]),c=w.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return w.createElement("nav",{...a},w.createElement(i.PreviousMonthButton,{type:"button",className:s[ce.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:c},w.createElement(i.Chevron,{disabled:r?void 0:!0,className:s[ce.Chevron],orientation:"left"})),w.createElement(i.NextMonthButton,{type:"button",className:s[ce.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:m},w.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[ce.Chevron]})))}function jw(e){const{components:t}=ur();return w.createElement(t.Button,{...e})}function $w(e){return w.createElement("option",{...e})}function Lw(e){const{components:t}=ur();return w.createElement(t.Button,{...e})}function Fw(e){const{rootRef:t,...n}=e;return w.createElement("div",{...n,ref:t})}function Ww(e){return w.createElement("select",{...e})}function Bw(e){const{week:t,...n}=e;return w.createElement("tr",{...n})}function Yw(e){return w.createElement("th",{...e})}function Hw(e){return w.createElement("thead",{"aria-hidden":!0},w.createElement("tr",{...e}))}function zw(e){const{week:t,...n}=e;return w.createElement("th",{...n})}function Gw(e){return w.createElement("th",{...e})}function Uw(e){return w.createElement("tbody",{...e})}function qw(e){const{components:t}=ur();return w.createElement(t.Dropdown,{...e})}const Vw=Object.freeze(Object.defineProperty({__proto__:null,Button:Sw,CaptionLabel:Cw,Chevron:Mw,Day:Dw,DayButton:kw,Dropdown:Ew,DropdownNav:Nw,Footer:Rw,Month:Tw,MonthCaption:_w,MonthGrid:Ow,Months:Pw,MonthsDropdown:Aw,Nav:Iw,NextMonthButton:jw,Option:$w,PreviousMonthButton:Lw,Root:Fw,Select:Ww,Week:Bw,WeekNumber:zw,WeekNumberHeader:Gw,Weekday:Yw,Weekdays:Hw,Weeks:Uw,YearsDropdown:qw},Symbol.toStringTag,{value:"Module"}));function Kw(e){return{...Vw,...e}}function Xw(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 qa(){const e={};for(const t in ce)e[ce[t]]=`rdp-${ce[t]}`;for(const t in Ee)e[Ee[t]]=`rdp-${Ee[t]}`;for(const t in lt)e[lt[t]]=`rdp-${lt[t]}`;for(const t in et)e[et[t]]=`rdp-${et[t]}`;return e}function tu(e,t,n){return(n??new Ot(t)).format(e,"LLLL y")}const Zw=tu;function Qw(e,t,n){return(n??new Ot(t)).format(e,"d")}function Jw(e,t=St){return t.format(e,"LLLL")}function ex(e,t=St){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function tx(){return""}function nx(e,t,n){return(n??new Ot(t)).format(e,"cccccc")}function nu(e,t=St){return t.format(e,"yyyy")}const rx=nu,ox=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:tu,formatDay:Qw,formatMonthCaption:Zw,formatMonthDropdown:Jw,formatWeekNumber:ex,formatWeekNumberHeader:tx,formatWeekdayName:nx,formatYearCaption:rx,formatYearDropdown:nu},Symbol.toStringTag,{value:"Module"}));function ax(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...ox,...e}}function sx(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:l,getMonth:u}=o;return l({start:i(e),end:s(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 ix(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 cx(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let i=0;i<7;i++){const s=e.addDays(o,i);a.push(s)}return a}function lx(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,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=i(h,1);return p.map(y=>{const v=n.formatYearDropdown(y,r);return{value:s(y),label:v,disabled:!1}})}function ru(e,t,n){return(n??new Ot(t)).format(e,"LLLL y")}const ux=ru;function dx(e,t,n,r){let o=(r??new Ot(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function ou(e,t,n,r){let o=(r??new Ot(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const fx=ou;function mx(){return""}function px(e){return"Choose the Month"}function hx(e){return"Go to the Next Month"}function gx(e){return"Go to the Previous Month"}function vx(e,t,n){return(n??new Ot(t)).format(e,"cccc")}function yx(e,t){return`Week ${e}`}function bx(e){return"Week Number"}function wx(e){return"Choose the Year"}const xx=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:ux,labelDay:fx,labelDayButton:ou,labelGrid:ru,labelGridcell:dx,labelMonthDropdown:px,labelNav:mx,labelNext:hx,labelPrevious:gx,labelWeekNumber:yx,labelWeekNumberHeader:bx,labelWeekday:vx,labelYearDropdown:wx},Symbol.toStringTag,{value:"Module"})),dr=e=>e instanceof HTMLElement?e:null,Wo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Sx=e=>dr(e.querySelector("[data-animated-month]")),Bo=e=>dr(e.querySelector("[data-animated-caption]")),Yo=e=>dr(e.querySelector("[data-animated-weeks]")),Cx=e=>dr(e.querySelector("[data-animated-nav]")),Mx=e=>dr(e.querySelector("[data-animated-weekdays]"));function Dx(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=w.useRef(null),s=w.useRef(r),l=w.useRef(!1);w.useLayoutEffect(()=>{const u=s.current;if(s.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[et.caption_after_enter]:n[et.caption_before_enter],h=c?n[et.weeks_after_enter]:n[et.weeks_before_enter],y=i.current,v=e.current.cloneNode(!0);if(v instanceof HTMLElement?(Wo(v).forEach(S=>{if(!(S instanceof HTMLElement))return;const D=Sx(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)}),i.current=v):i.current=null,l.current||m||o)return;const g=y instanceof HTMLElement?Wo(y):[],b=Wo(e.current);if(b&&b.every(x=>x instanceof HTMLElement)&&g&&g.every(x=>x instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const x=Cx(e.current);x&&(x.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 N=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.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 $=Mx(C);$&&($.style.opacity="0");const F=Bo(C);F&&(F.classList.add(c?n[et.caption_before_exit]:n[et.caption_after_exit]),F.addEventListener("animationend",N));const W=Yo(C);W&&W.classList.add(c?n[et.weeks_before_exit]:n[et.weeks_after_exit]),S.insertBefore(C,S.firstChild)})}})}function kx(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:l}=n??{},{addDays:u,differenceInCalendarDays:m,differenceInCalendarMonths:c,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:v,isAfter:g,startOfBroadcastWeek:b,startOfISOWeek:x,startOfWeek:S}=r,D=l?b(o,r):i?x(o):S(o),C=l?p(a):i?h(y(a)):v(y(a)),R=m(C,D),M=c(a,o)+1,N=[];for(let W=0;W<=R;W++){const q=u(D,W);if(t&&g(q,t))break;N.push(q)}const F=(l?35:42)*M;if(s&&N.length<F){const W=F-N.length;for(let q=0;q<W;q++){const I=u(N[N.length-1],1);N.push(I)}}return N}function Ex(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function Nx(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let i=0;i<o;i++){const s=r.addMonths(e,i);if(t&&s>t)break;a.push(s)}return a}function fi(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:s=1}=e;let l=o||a||i;const{differenceInCalendarMonths:u,addMonths:m,startOfMonth:c}=r;if(n&&u(n,l)<s-1){const p=-1*(s-1);l=m(n,p)}return t&&u(l,t)<0&&(l=t),c(l)}function Rx(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,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),x=n.broadcastCalendar?a(g):n.ISOWeek?i(s(g)):l(s(g)),S=t.filter(M=>M>=b&&M<=x),D=n.broadcastCalendar?35:42;if(n.fixedWeeks&&S.length<D){const M=t.filter(N=>{const $=D-S.length;return N>x&&N<=o(x,$)});S.push(...M)}const C=S.reduce((M,N)=>{const $=n.ISOWeek?u(N):m(N),F=M.find(q=>q.weekNumber===$),W=new Vl(N,g,r);return F?F.days.push(W):M.push(new bw($,[W])),M},[]),R=new yw(g,C);return v.push(R),v},[]);return n.reverseMonths?y.reverse():y}function Tx(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,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=i(n):p?n=m(p,0,1):!n&&g&&(n=o(l(e.today??c(),-100))),r?r=s(r):h?r=m(h,11,31):!r&&g&&(r=u(e.today??c())),[n&&a(n),r&&a(r)]}function _x(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:l}=r,u=o?a:1,m=i(e);if(!t)return s(m,u);if(!(l(t,e)<a))return s(m,u)}function Ox(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:l}=r,u=o?a??1:1,m=i(e);if(!t)return s(m,-u);if(!(l(m,t)<=0))return s(m,-u)}function Px(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function mo(e,t){const[n,r]=w.useState(e);return[t===void 0?n:t,r]}function Ax(e,t){const[n,r]=Tx(e,t),{startOfMonth:o,endOfMonth:a}=t,i=fi(e,n,r,t),[s,l]=mo(i,e.month?i:void 0);w.useEffect(()=>{const R=fi(e,n,r,t);l(R)},[e.timeZone]);const u=Nx(s,r,e,t),m=kx(u,e.endMonth?a(e.endMonth):void 0,e,t),c=Rx(u,m,e,t),p=Px(c),h=Ex(c),y=Ox(s,n,e,t),v=_x(s,r,e,t),{disableNavigation:g,onMonthChange:b}=e,x=R=>p.some(M=>M.days.some(N=>N.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=>{x(R)||S(R.date)}}}var ht;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(ht||(ht={}));function mi(e){return!e[Ee.disabled]&&!e[Ee.hidden]&&!e[Ee.outside]}function Ix(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);mi(s)&&(s[Ee.focused]&&a<ht.FocusedModifier?(o=i,a=ht.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<ht.LastFocused?(o=i,a=ht.LastFocused):n(i.date)&&a<ht.Selected?(o=i,a=ht.Selected):s[Ee.today]&&a<ht.Today&&(o=i,a=ht.Today))}return o||(o=e.find(i=>mi(t(i)))),o}function jx(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:l}=a,{addDays:u,addMonths:m,addWeeks:c,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:v,max:g,min:b,startOfBroadcastWeek:x,startOfISOWeek:S,startOfWeek:D}=i;let R={day:u,week:c,month:m,year:p,startOfWeek:M=>l?x(M,i):s?S(M):D(M),endOfWeek:M=>l?h(M):s?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,i,s=0){if(s>365)return;const l=jx(e,t,n.date,r,o,a,i),u=!!(a.disabled&&kt(l,a.disabled,i)),m=!!(a.hidden&&kt(l,a.hidden,i)),c=l,p=new Vl(l,c,i);return!u&&!m?p:au(e,t,p,r,o,a,i,s+1)}function $x(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=w.useState(),l=Ix(t.days,n,r||(()=>!1),i),[u,m]=w.useState(a?l:void 0);return{isFocusTarget:v=>!!(l!=null&&l.isEqualTo(v)),setFocused:m,focused:u,blur:()=>{s(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 Lx(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=mo(n,o?n:void 0),s=o?n:a,{isSameDay:l}=t,u=h=>(s==null?void 0:s.some(y=>l(y,h)))??!1,{min:m,max:c}=e;return{selected:s,select:(h,y,v)=>{let g=[...s??[]];if(u(h)){if((s==null?void 0:s.length)===m||r&&(s==null?void 0:s.length)===1)return;g=s==null?void 0:s.filter(b=>!l(b,h))}else(s==null?void 0:s.length)===c?g=[h]:g=[...g,h];return o||i(g),o==null||o(g,h,y,v),g},isSelected:u}}function Fx(e,t,n=0,r=0,o=!1,a=St){const{from:i,to:s}=t||{},{isSameDay:l,isAfter:u,isBefore:m}=a;let c;if(!i&&!s)c={from:e,to:n>0?void 0:e};else if(i&&!s)l(i,e)?o?c={from:i,to:void 0}:c=void 0:m(e,i)?c={from:e,to:i}:c={from:i,to:e};else if(i&&s)if(l(i,e)&&l(s,e))o?c={from:i,to:s}:c=void 0;else if(l(i,e))c={from:i,to:n>0?void 0:e};else if(l(s,e))c={from:e,to:n>0?void 0:e};else if(m(e,i))c={from:e,to:s};else if(u(e,i))c={from:i,to:e};else if(u(e,s))c={from:i,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 Wx(e,t,n=St){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let s=0;s<=i;s++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function pi(e,t,n=St){return Dt(e,t.from,!1,n)||Dt(e,t.to,!1,n)||Dt(t,e.from,!1,n)||Dt(t,e.to,!1,n)}function Bx(e,t,n=St){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?Dt(e,s,!1,n):Jl(s,n)?s.some(l=>Dt(e,l,!1,n)):Ua(s)?s.from&&s.to?pi(e,{from:s.from,to:s.to},n):!1:Ql(s)?Wx(e,s.dayOfWeek,n):Kl(s)?n.isAfter(s.before,s.after)?pi(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):kt(e.from,s,n)||kt(e.to,s,n):Xl(s)||Zl(s)?kt(e.from,s,n)||kt(e.to,s,n):!1))return!0;const i=r.filter(s=>typeof s=="function");if(i.length){let s=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=l;u++){if(i.some(m=>m(s)))return!0;s=n.addDays(s,1)}}return!1}function Yx(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,l]=mo(o,i?o:void 0),u=i?o:s;return{selected:u,select:(p,h,y)=>{const{min:v,max:g}=e,b=p?Fx(p,u,v,g,a,t):void 0;return r&&n&&(b!=null&&b.from)&&b.to&&Bx({from:b.from,to:b.to},n,t)&&(b.from=p,b.to=void 0),i||l(b),i==null||i(b,p,h,y),b},isSelected:p=>u&&Dt(u,p,!1,t)}}function Hx(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=mo(n,o?n:void 0),s=o?n:a,{isSameDay:l}=t;return{selected:s,select:(c,p,h)=>{let y=c;return!r&&s&&s&&l(c,s)&&(y=void 0),o||i(y),o==null||o(y,c,p,h),y},isSelected:c=>s?l(s,c):!1}}function zx(e,t){const n=Hx(e,t),r=Lx(e,t),o=Yx(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function su(e){var At;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new He(t.today,t.timeZone)),t.month&&(t.month=new He(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new He(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new He(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new He(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new He(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(At=t.selected)==null?void 0:At.map(U=>new He(U,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new He(t.selected.from,t.timeZone):void 0,to:t.selected.to?new He(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:i,classNames:s}=w.useMemo(()=>{const U={...Ga,...t.locale};return{dateLib:new Ot({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:Kw(t.components),formatters:ax(t.formatters),labels:{...xx,...t.labels},locale:U,classNames:{...qa(),...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:x,onPrevClick:S,showWeekNumber:D,styles:C}=t,{formatCaption:R,formatDay:M,formatMonthDropdown:N,formatWeekNumber:$,formatWeekNumberHeader:F,formatWeekdayName:W,formatYearDropdown:q}=r,I=Ax(t,a),{days:_,months:O,navStart:E,navEnd:A,previousMonth:k,nextMonth:P,goToMonth:Y}=I,z=ww(_,t,E,A,a),{isSelected:T,select:j,selected:H}=zx(t,a)??{},{blur:G,focused:V,isFocusTarget:L,moveFocus:K,setFocused:X}=$x(t,I,z,T??(()=>!1),a),{labelDayButton:Q,labelGridcell:J,labelGrid:ae,labelMonthDropdown:ye,labelNav:ee,labelPrevious:Te,labelNext:je,labelWeekday:De,labelWeekNumber:qe,labelWeekNumberHeader:Me,labelYearDropdown:Ze}=o,Pt=w.useMemo(()=>cx(a,t.ISOWeek),[a,t.ISOWeek]),Oe=u!==void 0||h!==void 0,We=w.useCallback(()=>{k&&(Y(k),S==null||S(k))},[k,Y,S]),Ct=w.useCallback(()=>{P&&(Y(P),x==null||x(P))},[Y,P,x]),ue=w.useCallback((U,ie)=>se=>{se.preventDefault(),se.stopPropagation(),X(U),j==null||j(U.date,ie,se),h==null||h(U.date,ie,se)},[j,h,X]),me=w.useCallback((U,ie)=>se=>{X(U),y==null||y(U.date,ie,se)},[y,X]),Se=w.useCallback((U,ie)=>se=>{G(),p==null||p(U.date,ie,se)},[G,p]),Ne=w.useCallback((U,ie)=>se=>{const fe={ArrowLeft:[se.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[se.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[se.shiftKey?"year":"week","after"],ArrowUp:[se.shiftKey?"year":"week","before"],PageUp:[se.shiftKey?"year":"month","before"],PageDown:[se.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(fe[se.key]){se.preventDefault(),se.stopPropagation();const[ge,oe]=fe[se.key];K(ge,oe)}v==null||v(U.date,ie,se)},[K,v,t.dir]),Pe=w.useCallback((U,ie)=>se=>{g==null||g(U.date,ie,se)},[g]),Qe=w.useCallback((U,ie)=>se=>{b==null||b(U.date,ie,se)},[b]),cn=w.useCallback(U=>ie=>{const se=Number(ie.target.value),fe=a.setMonth(a.startOfMonth(U),se);Y(fe)},[a,Y]),Ve=w.useCallback(U=>ie=>{const se=Number(ie.target.value),fe=a.setYear(a.startOfMonth(U),se);Y(fe)},[a,Y]),{className:ln,style:An}=w.useMemo(()=>({className:[s[ce.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[ce.Root],...t.style}}),[s,t.className,t.style,C]),un=Xw(t),Vt=w.useRef(null);Dx(Vt,!!t.animate,{classNames:s,months:O,focused:V,dateLib:a});const In={dayPickerProps:t,selected:H,select:j,isSelected:T,months:O,nextMonth:P,previousMonth:k,goToMonth:Y,getModifiers:z,components:n,classNames:s,styles:C,labels:o,formatters:r};return w.createElement(eu.Provider,{value:In},w.createElement(n.Root,{rootRef:t.animate?Vt:void 0,className:ln,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"],...un},w.createElement(n.Months,{className:s[ce.Months],style:C==null?void 0:C[ce.Months]},!t.hideNavigation&&!m&&w.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[ce.Nav],style:C==null?void 0:C[ce.Nav],"aria-label":ee(),onPreviousClick:We,onNextClick:Ct,previousMonth:k,nextMonth:P}),O.map((U,ie)=>{const se=sx(U.date,E,A,r,a),fe=lx(E,A,r,a);return w.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[ce.Month],style:C==null?void 0:C[ce.Month],key:ie,displayIndex:ie,calendarMonth:U},m==="around"&&!t.hideNavigation&&ie===0&&w.createElement(n.PreviousMonthButton,{type:"button",className:s[ce.PreviousMonthButton],tabIndex:k?void 0:-1,"aria-disabled":k?void 0:!0,"aria-label":Te(k),onClick:We,"data-animated-button":t.animate?"true":void 0},w.createElement(n.Chevron,{disabled:k?void 0:!0,className:s[ce.Chevron],orientation:t.dir==="rtl"?"right":"left"})),w.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[ce.MonthCaption],style:C==null?void 0:C[ce.MonthCaption],calendarMonth:U,displayIndex:ie},l!=null&&l.startsWith("dropdown")?w.createElement(n.DropdownNav,{className:s[ce.Dropdowns],style:C==null?void 0:C[ce.Dropdowns]},l==="dropdown"||l==="dropdown-months"?w.createElement(n.MonthsDropdown,{className:s[ce.MonthsDropdown],"aria-label":ye(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:cn(U.date),options:se,style:C==null?void 0:C[ce.Dropdown],value:a.getMonth(U.date)}):w.createElement("span",null,N(U.date,a)),l==="dropdown"||l==="dropdown-years"?w.createElement(n.YearsDropdown,{className:s[ce.YearsDropdown],"aria-label":Ze(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Ve(U.date),options:fe,style:C==null?void 0:C[ce.Dropdown],value:a.getYear(U.date)}):w.createElement("span",null,q(U.date,a)),w.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))):w.createElement(n.CaptionLabel,{className:s[ce.CaptionLabel],role:"status","aria-live":"polite"},R(U.date,a.options,a))),m==="around"&&!t.hideNavigation&&ie===c-1&&w.createElement(n.NextMonthButton,{type:"button",className:s[ce.NextMonthButton],tabIndex:P?void 0:-1,"aria-disabled":P?void 0:!0,"aria-label":je(P),onClick:Ct,"data-animated-button":t.animate?"true":void 0},w.createElement(n.Chevron,{disabled:P?void 0:!0,className:s[ce.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ie===c-1&&m==="after"&&!t.hideNavigation&&w.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[ce.Nav],style:C==null?void 0:C[ce.Nav],"aria-label":ee(),onPreviousClick:We,onNextClick:Ct,previousMonth:k,nextMonth:P}),w.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":ae(U.date,a.options,a)||void 0,className:s[ce.MonthGrid],style:C==null?void 0:C[ce.MonthGrid]},!t.hideWeekdays&&w.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[ce.Weekdays],style:C==null?void 0:C[ce.Weekdays]},D&&w.createElement(n.WeekNumberHeader,{"aria-label":Me(a.options),className:s[ce.WeekNumberHeader],style:C==null?void 0:C[ce.WeekNumberHeader],scope:"col"},F()),Pt.map((ge,oe)=>w.createElement(n.Weekday,{"aria-label":De(ge,a.options,a),className:s[ce.Weekday],key:oe,style:C==null?void 0:C[ce.Weekday],scope:"col"},W(ge,a.options,a)))),w.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[ce.Weeks],style:C==null?void 0:C[ce.Weeks]},U.weeks.map((ge,oe)=>w.createElement(n.Week,{className:s[ce.Week],key:ge.weekNumber,style:C==null?void 0:C[ce.Week],week:ge},D&&w.createElement(n.WeekNumber,{week:ge,style:C==null?void 0:C[ce.WeekNumber],"aria-label":qe(ge.weekNumber,{locale:i}),className:s[ce.WeekNumber],scope:"row",role:"rowheader"},$(ge.weekNumber,a)),ge.days.map(de=>{const{date:ve}=de,le=z(de);if(le[Ee.focused]=!le.hidden&&!!(V!=null&&V.isEqualTo(de)),le[lt.selected]=(T==null?void 0:T(ve))||le.selected,Ua(H)){const{from:Je,to:Be}=H;le[lt.range_start]=!!(Je&&Be&&a.isSameDay(ve,Je)),le[lt.range_end]=!!(Je&&Be&&a.isSameDay(ve,Be)),le[lt.range_middle]=Dt(H,ve,!0,a)}const Ke=ix(le,C,t.modifiersStyles),we=xw(le,s,t.modifiersClassNames),Ce=!Oe&&!le.hidden?J(ve,le,a.options,a):void 0;return w.createElement(n.Day,{key:`${a.format(ve,"yyyy-MM-dd")}_${a.format(de.displayMonth,"yyyy-MM")}`,day:de,modifiers:le,className:we.join(" "),style:Ke,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&&Oe?w.createElement(n.DayButton,{className:s[ce.DayButton],style:C==null?void 0:C[ce.DayButton],type:"button",day:de,modifiers:le,disabled:le.disabled||void 0,tabIndex:L(de)?0:-1,"aria-label":Q(ve,le,a.options,a),onClick:ue(de,le),onBlur:Se(de,le),onFocus:me(de,le),onKeyDown:Ne(de,le),onMouseEnter:Pe(de,le),onMouseLeave:Qe(de,le)},M(ve,a.options,a)):!le.hidden&&M(de.date,a.options,a))}))))))})),t.footer&&w.createElement(n.Footer,{className:s[ce.Footer],style:C==null?void 0:C[ce.Footer],role:"status","aria-live":"polite"},t.footer)))}function Va(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pr={exports:{}},Gx=Pr.exports,hi;function iu(){return hi||(hi=1,function(e,t){(function(n,r){e.exports=r()})(Gx,function(){var n=1e3,r=6e4,o=36e5,a="millisecond",i="second",s="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,x={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(_){var O=["th","st","nd","rd"],E=_%100;return"["+_+(O[(E-20)%10]||O[E]||O[0])+"]"}},S=function(_,O,E){var A=String(_);return!A||A.length>=O?_:""+Array(O+1-A.length).join(E)+_},D={s:S,z:function(_){var O=-_.utcOffset(),E=Math.abs(O),A=Math.floor(E/60),k=E%60;return(O<=0?"+":"-")+S(A,2,"0")+":"+S(k,2,"0")},m:function _(O,E){if(O.date()<E.date())return-_(E,O);var A=12*(E.year()-O.year())+(E.month()-O.month()),k=O.clone().add(A,c),P=E-k<0,Y=O.clone().add(A+(P?-1:1),c);return+(-(A+(E-k)/(P?k-Y:Y-k))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:c,y:h,w:m,d:u,D:y,h:l,m:s,s:i,ms:a,Q:p}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},C="en",R={};R[C]=x;var M="$isDayjsObject",N=function(_){return _ instanceof q||!(!_||!_[M])},$=function _(O,E,A){var k;if(!O)return C;if(typeof O=="string"){var P=O.toLowerCase();R[P]&&(k=P),E&&(R[P]=E,k=P);var Y=O.split("-");if(!k&&Y.length>1)return _(Y[0])}else{var z=O.name;R[z]=O,k=z}return!A&&k&&(C=k),k||!A&&C},F=function(_,O){if(N(_))return _.clone();var E=typeof O=="object"?O:{};return E.date=_,E.args=arguments,new q(E)},W=D;W.l=$,W.i=N,W.w=function(_,O){return F(_,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var q=function(){function _(E){this.$L=$(E.locale,null,!0),this.parse(E),this.$x=this.$x||E.x||{},this[M]=!0}var O=_.prototype;return O.parse=function(E){this.$d=function(A){var k=A.date,P=A.utc;if(k===null)return new Date(NaN);if(W.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var Y=k.match(g);if(Y){var z=Y[2]-1||0,T=(Y[7]||"0").substring(0,3);return P?new Date(Date.UTC(Y[1],z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,T)):new Date(Y[1],z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,T)}}return new Date(k)}(E),this.init()},O.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},O.$utils=function(){return W},O.isValid=function(){return this.$d.toString()!==v},O.isSame=function(E,A){var k=F(E);return this.startOf(A)<=k&&k<=this.endOf(A)},O.isAfter=function(E,A){return F(E)<this.startOf(A)},O.isBefore=function(E,A){return this.endOf(A)<F(E)},O.$g=function(E,A,k){return W.u(E)?this[A]:this.set(k,E)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(E,A){var k=this,P=!!W.u(A)||A,Y=W.p(E),z=function(X,Q){var J=W.w(k.$u?Date.UTC(k.$y,Q,X):new Date(k.$y,Q,X),k);return P?J:J.endOf(u)},T=function(X,Q){return W.w(k.toDate()[X].apply(k.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Q)),k)},j=this.$W,H=this.$M,G=this.$D,V="set"+(this.$u?"UTC":"");switch(Y){case h:return P?z(1,0):z(31,11);case c:return P?z(1,H):z(0,H+1);case m:var L=this.$locale().weekStart||0,K=(j<L?j+7:j)-L;return z(P?G-K:G+(6-K),H);case u:case y:return T(V+"Hours",0);case l:return T(V+"Minutes",1);case s:return T(V+"Seconds",2);case i:return T(V+"Milliseconds",3);default:return this.clone()}},O.endOf=function(E){return this.startOf(E,!1)},O.$set=function(E,A){var k,P=W.p(E),Y="set"+(this.$u?"UTC":""),z=(k={},k[u]=Y+"Date",k[y]=Y+"Date",k[c]=Y+"Month",k[h]=Y+"FullYear",k[l]=Y+"Hours",k[s]=Y+"Minutes",k[i]=Y+"Seconds",k[a]=Y+"Milliseconds",k)[P],T=P===u?this.$D+(A-this.$W):A;if(P===c||P===h){var j=this.clone().set(y,1);j.$d[z](T),j.init(),this.$d=j.set(y,Math.min(this.$D,j.daysInMonth())).$d}else z&&this.$d[z](T);return this.init(),this},O.set=function(E,A){return this.clone().$set(E,A)},O.get=function(E){return this[W.p(E)]()},O.add=function(E,A){var k,P=this;E=Number(E);var Y=W.p(A),z=function(H){var G=F(P);return W.w(G.date(G.date()+Math.round(H*E)),P)};if(Y===c)return this.set(c,this.$M+E);if(Y===h)return this.set(h,this.$y+E);if(Y===u)return z(1);if(Y===m)return z(7);var T=(k={},k[s]=r,k[l]=o,k[i]=n,k)[Y]||1,j=this.$d.getTime()+E*T;return W.w(j,this)},O.subtract=function(E,A){return this.add(-1*E,A)},O.format=function(E){var A=this,k=this.$locale();if(!this.isValid())return k.invalidDate||v;var P=E||"YYYY-MM-DDTHH:mm:ssZ",Y=W.z(this),z=this.$H,T=this.$m,j=this.$M,H=k.weekdays,G=k.months,V=k.meridiem,L=function(Q,J,ae,ye){return Q&&(Q[J]||Q(A,P))||ae[J].slice(0,ye)},K=function(Q){return W.s(z%12||12,Q,"0")},X=V||function(Q,J,ae){var ye=Q<12?"AM":"PM";return ae?ye.toLowerCase():ye};return P.replace(b,function(Q,J){return J||function(ae){switch(ae){case"YY":return String(A.$y).slice(-2);case"YYYY":return W.s(A.$y,4,"0");case"M":return j+1;case"MM":return W.s(j+1,2,"0");case"MMM":return L(k.monthsShort,j,G,3);case"MMMM":return L(G,j);case"D":return A.$D;case"DD":return W.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return L(k.weekdaysMin,A.$W,H,2);case"ddd":return L(k.weekdaysShort,A.$W,H,3);case"dddd":return H[A.$W];case"H":return String(z);case"HH":return W.s(z,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return X(z,T,!0);case"A":return X(z,T,!1);case"m":return String(T);case"mm":return W.s(T,2,"0");case"s":return String(A.$s);case"ss":return W.s(A.$s,2,"0");case"SSS":return W.s(A.$ms,3,"0");case"Z":return Y}return null}(Q)||Y.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(E,A,k){var P,Y=this,z=W.p(A),T=F(E),j=(T.utcOffset()-this.utcOffset())*r,H=this-T,G=function(){return W.m(Y,T)};switch(z){case h:P=G()/12;break;case c:P=G();break;case p:P=G()/3;break;case m:P=(H-j)/6048e5;break;case u:P=(H-j)/864e5;break;case l:P=H/o;break;case s:P=H/r;break;case i:P=H/n;break;default:P=H}return k?P:W.a(P)},O.daysInMonth=function(){return this.endOf(c).$D},O.$locale=function(){return R[this.$L]},O.locale=function(E,A){if(!E)return this.$L;var k=this.clone(),P=$(E,A,!0);return P&&(k.$L=P),k},O.clone=function(){return W.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},_}(),I=q.prototype;return F.prototype=I,[["$ms",a],["$s",i],["$m",s],["$H",l],["$W",u],["$M",c],["$y",h],["$D",y]].forEach(function(_){I[_[1]]=function(O){return this.$g(O,_[0],_[1])}}),F.extend=function(_,O){return _.$i||(_(O,q,F),_.$i=!0),F},F.locale=$,F.isDayjs=N,F.unix=function(_){return F(1e3*_)},F.en=R[C],F.Ls=R,F.p={},F})}(Pr)),Pr.exports}var Ux=iu();const Et=Va(Ux);var Ar={exports:{}},qx=Ar.exports,gi;function Vx(){return gi||(gi=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"};return function(r,o,a){var i=o.prototype,s=i.format;a.en.formats=n,i.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,x,S){return x||S.slice(1)})})}(l,u===void 0?{}:u);return s.call(this,m)}}})}(Ar)),Ar.exports}var Kx=Vx();const cu=Va(Kx);var Ir={exports:{}},Xx=Ir.exports,vi;function Zx(){return vi||(vi=1,function(e,t){(function(n,r){e.exports=r(iu())})(Xx,function(n){function r(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}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(i){return""+i+(i===1?"er":"")}};return o.default.locale(a,null,!0),a})}(Ir)),Ir.exports}Zx();function Qx({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(),i=Array.from({length:201},(c,p)=>a-100+p),s=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(Rt,{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:s,children:[d.jsx(Yr,{className:"w-32 h-8 text-sm",children:d.jsx(ha,{})}),d.jsx(Hr,{children:o.map((c,p)=>d.jsx(zr,{value:p.toString(),children:c},c))})]}),d.jsxs(pa,{value:n.toString(),onValueChange:l,children:[d.jsx(Yr,{className:"w-20 h-8 text-sm",children:d.jsx(ha,{})}),d.jsx(Hr,{className:"max-h-[200px]",children:i.map(c=>d.jsx(zr,{value:c.toString(),children:c},c))})]})]}),d.jsx(Rt,{variant:"outline",size:"small",onClick:m,className:"h-7 w-7 p-0",children:d.jsx(Ea,{className:"h-4 w-4"})})]})}Et.extend(cu);const Gr=({label:e,placeholder:t="Pick a date",helperText:n,error:r,required:o,value:a,onSelect:i,className:s,minDate:l,maxDate:u,disabled:m,readOnly:c,locale:p="en",showOutsideDays:h,dayPickerProps:y,month:v,onMonthChange:g,open:b,onOpenChange:x,...S})=>{const[D,C]=w.useState(!1),R=b!==void 0?b:D,M=x||C,N=v??a??new Date,$=F=>{F&&(!a||F.getTime()!==a.getTime())&&(i==null||i(F),M(!1))};return Et.locale(p),d.jsxs("div",{className:B("space-y-1",s),...S,children:[e&&d.jsxs(an,{className:"text-sm font-medium text-gray-700",children:[e,o&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(Wa,{open:R,onOpenChange:M,children:[d.jsx(Ba,{asChild:!0,children:d.jsxs(Rt,{variant:"outline",className:B("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:B("text-left",!a&&"text-muted-foreground"),children:a?Et(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(Qx,{month:N,onMonthChange:g??(()=>{})}),d.jsx("div",{className:"p-3",children:d.jsx(su,{mode:"single",selected:a,onSelect:$,month:N,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:B("text-xs",r?"text-red-500":"text-gray-500"),children:r||n})]})};function Jx({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:i,...s}){const l=qa();return d.jsx(su,{showOutsideDays:n,className:B("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:B("w-fit",l.root),months:B("relative flex flex-col gap-4 md:flex-row",l.months),month:B("flex w-full flex-col gap-4",l.month),nav:B("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",l.nav),button_previous:B(na({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_previous),button_next:B(na({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_next),month_caption:B("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",l.month_caption),dropdowns:B("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",l.dropdowns),dropdown_root:B("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:B("absolute inset-0 opacity-0",l.dropdown),caption_label:B("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:B("flex",l.weekdays),weekday:B("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",l.weekday),week:B("mt-2 flex w-full",l.week),week_number_header:B("w-[--cell-size] select-none",l.week_number_header),week_number:B("text-muted-foreground select-none text-[0.8rem]",l.week_number),day:B("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:B("bg-accent rounded-l-md",l.range_start),range_middle:B("rounded-none",l.range_middle),range_end:B("bg-accent rounded-r-md",l.range_end),today:B("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",l.today),outside:B("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:B("text-muted-foreground opacity-50",l.disabled),hidden:B("invisible",l.hidden),...t},components:{Root:({className:u,rootRef:m,...c})=>d.jsx("div",{"data-slot":"calendar",ref:m,className:B(u),...c}),Chevron:({className:u,orientation:m,...c})=>m==="left"?d.jsx(nc,{className:B("size-4",u),...c}):m==="right"?d.jsx(Ea,{className:B("size-4",u),...c}):d.jsx(er,{className:B("size-4",u),...c}),DayButton:e0,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})}),...i},...s})}function e0({className:e,day:t,modifiers:n,...r}){const o=qa(),a=f.useRef(null);return f.useEffect(()=>{var p;n.focused&&((p=a.current)==null||p.focus())},[n.focused]),d.jsx(Rt,{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:B("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 jr={exports:{}},t0=jr.exports,yi;function n0(){return yi||(yi=1,function(e,t){(function(n,r){e.exports=r()})(t0,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/,i=/\d\d?/,s=/\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 x=b.match(/([+-]|\d\d)/g),S=60*x[1]+(+x[2]||0);return S===0?0:x[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 x,S=l.meridiem;if(S){for(var D=1;D<=24;D+=1)if(g.indexOf(S(D,0,b))>-1){x=D>12;break}}else x=g===(b?"pm":"PM");return x},y={A:[s,function(g){this.afternoon=h(g,!1)}],a:[s,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:[i,m("seconds")],ss:[i,m("seconds")],m:[i,m("minutes")],mm:[i,m("minutes")],H:[i,m("hours")],h:[i,m("hours")],HH:[i,m("hours")],hh:[i,m("hours")],D:[i,m("day")],DD:[a,m("day")],Do:[s,function(g){var b=l.ordinal,x=g.match(/\d+/);if(this.day=x[0],b)for(var S=1;S<=31;S+=1)b(S).replace(/\[|\]/g,"")===g&&(this.day=S)}],w:[i,m("week")],ww:[a,m("week")],M:[i,m("month")],MM:[a,m("month")],MMM:[s,function(g){var b=p("months"),x=(p("monthsShort")||b.map(function(S){return S.slice(0,3)})).indexOf(g)+1;if(x<1)throw new Error;this.month=x%12||x}],MMMM:[s,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,x;b=g,x=l&&l.formats;for(var S=(g=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(F,W,q){var I=q&&q.toUpperCase();return W||x[q]||n[q]||x[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(_,O,E){return O||E.slice(1)})})).match(r),D=S.length,C=0;C<D;C+=1){var R=S[C],M=y[R],N=M&&M[0],$=M&&M[1];S[C]=$?{regex:N,parser:$}:R.replace(/^\[|\]$/g,"")}return function(F){for(var W={},q=0,I=0;q<D;q+=1){var _=S[q];if(typeof _=="string")I+=_.length;else{var O=_.regex,E=_.parser,A=F.slice(I),k=O.exec(A)[0];E.call(W,k),F=F.replace(k,"")}}return function(P){var Y=P.afternoon;if(Y!==void 0){var z=P.hours;Y?z<12&&(P.hours+=12):z===12&&(P.hours=0),delete P.afternoon}}(W),W}}return function(g,b,x){x.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,N=C.args;this.$u=M;var $=N[1];if(typeof $=="string"){var F=N[2]===!0,W=N[3]===!0,q=F||W,I=N[2];W&&(I=N[2]),l=this.$locale(),!F&&I&&(l=x.Ls[I]),this.$d=function(A,k,P,Y){try{if(["x","X"].indexOf(k)>-1)return new Date((k==="X"?1e3:1)*A);var z=v(k)(A),T=z.year,j=z.month,H=z.day,G=z.hours,V=z.minutes,L=z.seconds,K=z.milliseconds,X=z.zone,Q=z.week,J=new Date,ae=H||(T||j?1:J.getDate()),ye=T||J.getFullYear(),ee=0;T&&!j||(ee=j>0?j-1:J.getMonth());var Te,je=G||0,De=V||0,qe=L||0,Me=K||0;return X?new Date(Date.UTC(ye,ee,ae,je,De,qe,Me+60*X.offset*1e3)):P?new Date(Date.UTC(ye,ee,ae,je,De,qe,Me)):(Te=new Date(ye,ee,ae,je,De,qe,Me),Q&&(Te=Y(Te).week(Q).toDate()),Te)}catch{return new Date("")}}(R,$,M,x),this.init(),I&&I!==!0&&(this.$L=this.locale(I).$L),q&&R!=this.format($)&&(this.$d=new Date("")),l={}}else if($ instanceof Array)for(var _=$.length,O=1;O<=_;O+=1){N[1]=$[O-1];var E=x.apply(this,N);if(E.isValid()){this.$d=E.$d,this.$L=E.$L,this.init();break}O===_&&(this.$d=new Date(""))}else D.call(this,C)}}})}(jr)),jr.exports}var r0=n0();const o0=Va(r0);Et.extend(o0);Et.extend(cu);const a0={"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-]$/}},s0=({label:e,placeholder:t,helperText:n,required:r,value:o,onSelect:a,className:i,minDate:s,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,x]=f.useState(o),S=f.useMemo(()=>p,[p]),D=f.useMemo(()=>a0[S],[S]),C=f.useMemo(()=>t||S.toLowerCase(),[t,S]),R=f.useCallback(I=>{const _=I.replace(/\D/g,""),{separator:O}=D;if(_.length<=2)return _;switch(S){case"MM/DD/YYYY":case"DD/MM/YYYY":return _.length<=4?`${_.substring(0,2)}${O}${_.substring(2)}`:`${_.substring(0,2)}${O}${_.substring(2,4)}${O}${_.substring(4,8)}`;case"YYYY-MM-DD":return _.length<=4?_:_.length<=6?`${_.substring(0,4)}${O}${_.substring(4)}`:`${_.substring(0,4)}${O}${_.substring(4,6)}${O}${_.substring(6,8)}`;case"DD-MM-YYYY":return _.length<=4?`${_.substring(0,2)}${O}${_.substring(2)}`:`${_.substring(0,2)}${O}${_.substring(2,4)}${O}${_.substring(4,8)}`;default:return I}},[S,D]),M=f.useMemo(()=>I=>{const _=I.trim();return _&&Et(_,S,!0).isValid()?Et(_,S):null},[S]),N=f.useCallback(I=>Et(I).format(S),[S]);f.useEffect(()=>{g(o?N(o):""),x(o),Et.locale(c)},[o,c,N]);const $=f.useCallback(I=>{let _=I.target.value;if(g(_),!_.trim()){x(void 0),a==null||a(void 0);return}const O=R(_);O!==_&&_.replace(/\D/g,"").length>1&&(g(O),_=O);const E=M(_);if(E!=null&&E.isValid()){const A=E.toDate();(!s||A>=s)&&(!l||A<=l)&&(x(A),a==null||a(A))}},[R,M,a,s,l]),F=f.useCallback(()=>{b&&g(N(b))},[b,N]),W=f.useCallback(I=>{I&&(g(N(I)),x(I),a==null||a(I),y(!1))},[a,N]),q=f.useCallback(I=>{if(!["Backspace","Delete","Tab","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(I.key)&&!D.pattern.test(I.key)&&!I.ctrlKey&&!I.metaKey){I.preventDefault();return}I.key==="Enter"&&(I.preventDefault(),F())},[D.pattern,F]);return d.jsxs("div",{className:B("space-y-1",i),children:[e&&d.jsxs(an,{className:"text-sm font-medium text-gray-700",children:[e,r&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(Wa,{open:h,onOpenChange:y,children:[d.jsxs("div",{className:"w-60 relative",children:[d.jsx(on,{type:"text",value:v,onChange:$,onBlur:F,onKeyDown:q,placeholder:C,disabled:u,readOnly:m,className:"w-full pr-12"}),d.jsx(Ba,{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(I=>!I),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(Jx,{mode:"single",selected:b,onSelect:W,fromDate:s,toDate:l})})]}),n&&d.jsx("p",{className:"text-xs text-gray-500",children:n})]})};function Cn({label:e,placeholder:t="Select option",options:n,value:r,leadingIcon:o,helperText:a,error:i,required:s,onValueChange:l,className:u,variant:m="default",disabled:c=!1}){return d.jsxs("div",{className:B("space-y-1",u),children:[e&&d.jsxs(an,{className:B("text-sm font-medium",c?"text-gray-400":"text-gray-700"),children:[e,s&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(pa,{value:r,onValueChange:l,disabled:c,children:[d.jsx(Yr,{className:B("border-input focus-within:ring-primary",i&&"border-red-500 focus-within:ring-red-500",m==="gray"&&"bg-gray-100 border-gray-300 text-gray-700",c&&"opacity-50 cursor-not-allowed"),children:d.jsxs("div",{className:"flex items-center gap-2 w-full",children:[o&&d.jsx("div",{className:"text-gray-400",children:o}),d.jsx(ha,{placeholder:t})]})}),d.jsx(Hr,{children:n.map(p=>d.jsx(zr,{value:p.value,children:p.label},p.value))})]}),(a||i)&&d.jsx("p",{className:B("text-xs",i?"text-red-500":c?"text-gray-400":"text-gray-500"),children:i||a})]})}const i0=({label:e,variant:t="filled",color:n="default",size:r="medium",deletable:o=!1,onDelete:a,onClick:i,icon:s,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=i&&!u?"hover:shadow-md":"",b=`
|
|
171
|
+
`)},Kv=0,pn=[];function Xv(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Kv++)[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 g=vv([e.lockRef.current],(e.shards||[]).map(ti),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var b=Dr(g),x=n.current,S="deltaX"in g?g.deltaX:x[0]-b[0],M="deltaY"in g?g.deltaY:x[1]-b[1],C,N=g.target,D=Math.abs(S)>Math.abs(M)?"h":"v";if("touches"in g&&D==="h"&&N.type==="range")return!1;var R=Js(D,N);if(!R)return!0;if(R?C=D:(C=D==="v"?"h":"v",R=Js(D,N)),!R)return!1;if(!r.current&&"changedTouches"in g&&(S||M)&&(r.current=C),!C)return!0;var j=r.current||C;return Uv(j,v,g,j==="h"?S:M)},[]),l=f.useCallback(function(g){var v=g;if(!(!pn.length||pn[pn.length-1]!==a)){var b="deltaY"in v?ei(v):Dr(v),x=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&qv(C.delta,b)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var S=(s.current.shards||[]).map(ti).filter(Boolean).filter(function(C){return C.contains(v.target)}),M=S.length>0?i(v,S[0]):!s.current.noIsolation;M&&v.cancelable&&v.preventDefault()}}},[]),u=f.useCallback(function(g,v,b,x){var S={name:g,delta:v,target:b,should:x,shadowParent:Zv(b)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(M){return M!==S})},1)},[]),m=f.useCallback(function(g){n.current=Dr(g),r.current=void 0},[]),c=f.useCallback(function(g){u(g.type,ei(g),g.target,i(g,e.lockRef.current))},[]),p=f.useCallback(function(g){u(g.type,Dr(g),g.target,i(g,e.lockRef.current))},[]);f.useEffect(function(){return pn.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,mn),document.addEventListener("touchmove",l,mn),document.addEventListener("touchstart",m,mn),function(){pn=pn.filter(function(g){return g!==a}),document.removeEventListener("wheel",l,mn),document.removeEventListener("touchmove",l,mn),document.removeEventListener("touchstart",m,mn)}},[]);var h=e.removeScrollBar,y=e.inert;return f.createElement(f.Fragment,null,y?f.createElement(a,{styles:Vv(o)}):null,h?f.createElement(Fv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Zv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Qv=kv(Pc,Xv);var sr=f.forwardRef(function(e,t){return f.createElement(so,gt({},e,{ref:t,sideCar:Qv}))});sr.classNames=so.classNames;var io="Popover",[Lc,dD]=He(io,[Yt]),ir=Yt(),[Jv,Ht]=Lc(io),Fc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=ir(t),l=f.useRef(null),[u,m]=f.useState(!1),[c,p]=ot({prop:r,defaultProp:o??!1,onChange:a,caller:io});return d.jsx(rr,{...i,children:d.jsx(Jv,{scope:t,contentId:Ne(),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",ey=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ht(Wc,n),a=ir(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),d.jsx(or,{...a,...r,ref:t})});ey.displayName=Wc;var Bc="PopoverTrigger",Yc=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ht(Bc,n),a=ir(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:Z(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:d.jsx(or,{asChild:!0,...a,children:i})});Yc.displayName=Bc;var Fa="PopoverPortal",[ty,ny]=Lc(Fa,{forceMount:void 0}),Hc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Ht(Fa,t);return d.jsx(ty,{scope:t,forceMount:n,children:d.jsx(Ge,{present:n||a.open,children:d.jsx(ar,{asChild:!0,container:o,children:r})})})};Hc.displayName=Fa;var xn="PopoverContent",zc=f.forwardRef((e,t)=>{const n=ny(xn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Ht(xn,e.__scopePopover);return d.jsx(Ge,{present:r||a.open,children:a.modal?d.jsx(oy,{...o,ref:t}):d.jsx(ay,{...o,ref:t})})});zc.displayName=xn;var ry=Lt("PopoverContent.RemoveScroll"),oy=f.forwardRef((e,t)=>{const n=Ht(xn,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(sr,{as:ry,allowPinchZoom:!0,children:d.jsx(Gc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Z(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Z(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:Z(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),ay=f.forwardRef((e,t)=>{const n=Ht(xn,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=Ht(xn,n),h=ir(n);return Jr(),d.jsx(tr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(Nn,{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",sy=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ht(Uc,n);return d.jsx(ee.button,{type:"button",...r,ref:t,onClick:Z(e.onClick,()=>o.onOpenChange(!1))})});sy.displayName=Uc;var iy="PopoverArrow",cy=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ir(n);return d.jsx(oo,{...o,...r,ref:t})});cy.displayName=iy;function qc(e){return e?"open":"closed"}var ly=Fc,uy=Yc,dy=Hc,Vc=zc;const Wa=ly,Ba=uy,co=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(dy,{children:d.jsx(Vc,{ref:r,sideOffset:t,className:L("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 ni(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ya(e){const t=e+"CollectionProvider",[n,r]=He(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:v,children:b}=g,x=w.useRef(null),S=w.useRef(new Map).current;return d.jsx(o,{scope:v,itemMap:S,collectionRef:x,children:b})};s.displayName=t;const i=e+"CollectionSlot",l=Lt(i),u=w.forwardRef((g,v)=>{const{scope:b,children:x}=g,S=a(i,b),M=he(v,S.collectionRef);return d.jsx(l,{ref:M,children:x})});u.displayName=i;const m=e+"CollectionItemSlot",c="data-radix-collection-item",p=Lt(m),h=w.forwardRef((g,v)=>{const{scope:b,children:x,...S}=g,M=w.useRef(null),C=he(v,M),N=a(m,b);return w.useEffect(()=>(N.itemMap.set(M,{ref:M,...S}),()=>void N.itemMap.delete(M))),d.jsx(p,{[c]:"",ref:C,children:x})});h.displayName=m;function y(g){const v=a(e+"CollectionConsumer",g);return w.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const S=Array.from(x.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((N,D)=>S.indexOf(N.ref.current)-S.indexOf(D.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},y,r]}var fy=f.createContext(void 0);function cr(e){const t=f.useContext(fy);return e||t||"ltr"}function Ha(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"}),my="VisuallyHidden",Xc=f.forwardRef((e,t)=>d.jsx(ee.span,{...e,ref:t,style:{...Kc,...e.style}}));Xc.displayName=my;var py=Xc,hy=[" ","Enter","ArrowUp","ArrowDown"],gy=[" ","Enter"],en="Select",[lo,uo,vy]=Ya(en),[_n,fD]=He(en,[vy,Yt]),fo=Yt(),[yy,zt]=_n(en),[by,wy]=_n(en),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,g=fo(t),[v,b]=f.useState(null),[x,S]=f.useState(null),[M,C]=f.useState(!1),N=cr(u),[D,R]=ot({prop:r,defaultProp:o??!1,onChange:a,caller:en}),[j,F]=ot({prop:s,defaultProp:i,onChange:l,caller:en}),$=f.useRef(null),V=v?y||!!v.closest("form"):!0,[B,P]=f.useState(new Set),T=Array.from(B).map(k=>k.props.value).join(";");return d.jsx(rr,{...g,children:d.jsxs(yy,{required:h,scope:t,trigger:v,onTriggerChange:b,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:M,onValueNodeHasChildrenChange:C,contentId:Ne(),value:j,onValueChange:F,open:D,onOpenChange:R,dir:N,triggerPointerDownPosRef:$,disabled:p,children:[d.jsx(lo.Provider,{scope:t,children:d.jsx(by,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(k=>{P(A=>new Set(A).add(k))},[]),onNativeOptionRemove:f.useCallback(k=>{P(A=>{const E=new Set(A);return E.delete(k),E})},[]),children:n})}),V?d.jsxs(xl,{"aria-hidden":!0,required:h,tabIndex:-1,name:m,autoComplete:c,value:j,onChange:k=>F(k.target.value),disabled:p,form:y,children:[j===void 0?d.jsx("option",{value:""}):null,Array.from(B)]},T):null]})})};Zc.displayName=en;var Qc="SelectTrigger",Jc=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=fo(n),s=zt(Qc,n),i=s.disabled||r,l=he(t,s.onTriggerChange),u=uo(n),m=f.useRef("touch"),[c,p,h]=Cl(g=>{const v=u().filter(S=>!S.disabled),b=v.find(S=>S.value===s.value),x=Ml(v,g,b);x!==void 0&&s.onValueChange(x.value)}),y=g=>{i||(s.onOpenChange(!0),h()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return d.jsx(or,{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:Z(o.onClick,g=>{g.currentTarget.focus(),m.current!=="mouse"&&y(g)}),onPointerDown:Z(o.onPointerDown,g=>{m.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:Z(o.onKeyDown,g=>{const v=c.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&hy.includes(g.key)&&(y(),g.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=zt(el,n),{onValueNodeHasChildrenChange:u}=l,m=a!==void 0,c=he(t,l.onValueNodeChange);return Oe(()=>{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 xy="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=xy;var Sy="SelectPortal",rl=e=>d.jsx(ar,{asChild:!0,...e});rl.displayName=Sy;var tn="SelectContent",ol=f.forwardRef((e,t)=>{const n=zt(tn,e.__scopeSelect),[r,o]=f.useState();if(Oe(()=>{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=tn;var ct=10,[al,Gt]=_n(tn),Cy="SelectContentImpl",My=Lt("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:g,avoidCollisions:v,...b}=e,x=zt(tn,n),[S,M]=f.useState(null),[C,N]=f.useState(null),D=he(t,W=>M(W)),[R,j]=f.useState(null),[F,$]=f.useState(null),V=uo(n),[B,P]=f.useState(!1),T=f.useRef(!1);f.useEffect(()=>{if(S)return ao(S)},[S]),Jr();const k=f.useCallback(W=>{const[Q,...K]=V().map(ie=>ie.ref.current),[X]=K.slice(-1),se=document.activeElement;for(const ie of W)if(ie===se||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===Q&&C&&(C.scrollTop=0),ie===X&&C&&(C.scrollTop=C.scrollHeight),ie==null||ie.focus(),document.activeElement!==se))return},[V,C]),A=f.useCallback(()=>k([R,S]),[k,R,S]);f.useEffect(()=>{B&&A()},[B,A]);const{onOpenChange:E,triggerPointerDownPosRef:O}=x;f.useEffect(()=>{if(S){let W={x:0,y:0};const Q=X=>{var se,ie;W={x:Math.abs(Math.round(X.pageX)-(((se=O.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(X.pageY)-(((ie=O.current)==null?void 0:ie.y)??0))}},K=X=>{W.x<=10&&W.y<=10?X.preventDefault():S.contains(X.target)||E(!1),document.removeEventListener("pointermove",Q),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",K,{capture:!0})}}},[S,E,O]),f.useEffect(()=>{const W=()=>E(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[E]);const[Y,z]=Cl(W=>{const Q=V().filter(se=>!se.disabled),K=Q.find(se=>se.ref.current===document.activeElement),X=Ml(Q,W,K);X&&setTimeout(()=>X.ref.current.focus())}),_=f.useCallback((W,Q,K)=>{const X=!T.current&&!K;(x.value!==void 0&&x.value===Q||X)&&(j(W),X&&(T.current=!0))},[x.value]),I=f.useCallback(()=>S==null?void 0:S.focus(),[S]),H=f.useCallback((W,Q,K)=>{const X=!T.current&&!K;(x.value!==void 0&&x.value===Q||X)&&$(W)},[x.value]),G=r==="popper"?la:il,U=G===la?{side:i,sideOffset:l,align:u,alignOffset:m,arrowPadding:c,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v}:{};return d.jsx(al,{scope:n,content:S,viewport:C,onViewportChange:N,itemRefCallback:_,selectedItem:R,onItemLeave:I,itemTextRefCallback:H,focusSelectedItem:A,selectedItemText:F,position:r,isPositioned:B,searchRef:Y,children:d.jsx(sr,{as:My,allowPinchZoom:!0,children:d.jsx(tr,{asChild:!0,trapped:x.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:Z(o,W=>{var Q;(Q=x.trigger)==null||Q.focus({preventScroll:!0}),W.preventDefault()}),children:d.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:d.jsx(G,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:W=>W.preventDefault(),...b,...U,onPlaced:()=>P(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:Z(b.onKeyDown,W=>{const Q=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!Q&&W.key.length===1&&z(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let X=V().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(W.key)&&(X=X.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const se=W.target,ie=X.indexOf(se);X=X.slice(ie+1)}setTimeout(()=>k(X)),W.preventDefault()}})})})})})})});sl.displayName=Cy;var Dy="SelectItemAlignedPosition",il=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=zt(tn,n),s=Gt(tn,n),[i,l]=f.useState(null),[u,m]=f.useState(null),c=he(t,D=>m(D)),p=uo(n),h=f.useRef(!1),y=f.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:b,focusSelectedItem:x}=s,S=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&g&&v&&b){const D=a.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),j=a.valueNode.getBoundingClientRect(),F=b.getBoundingClientRect();if(a.dir!=="rtl"){const se=F.left-R.left,ie=j.left-se,ye=D.left-ie,J=D.width+ye,Pe=Math.max(J,R.width),Ae=window.innerWidth-ct,Me=ni(ie,[ct,Math.max(ct,Ae-Pe)]);i.style.minWidth=J+"px",i.style.left=Me+"px"}else{const se=R.right-F.right,ie=window.innerWidth-j.right-se,ye=window.innerWidth-D.right-ie,J=D.width+ye,Pe=Math.max(J,R.width),Ae=window.innerWidth-ct,Me=ni(ie,[ct,Math.max(ct,Ae-Pe)]);i.style.minWidth=J+"px",i.style.right=Me+"px"}const $=p(),V=window.innerHeight-ct*2,B=g.scrollHeight,P=window.getComputedStyle(u),T=parseInt(P.borderTopWidth,10),k=parseInt(P.paddingTop,10),A=parseInt(P.borderBottomWidth,10),E=parseInt(P.paddingBottom,10),O=T+k+B+E+A,Y=Math.min(v.offsetHeight*5,O),z=window.getComputedStyle(g),_=parseInt(z.paddingTop,10),I=parseInt(z.paddingBottom,10),H=D.top+D.height/2-ct,G=V-H,U=v.offsetHeight/2,W=v.offsetTop+U,Q=T+k+W,K=O-Q;if(Q<=H){const se=$.length>0&&v===$[$.length-1].ref.current;i.style.bottom="0px";const ie=u.clientHeight-g.offsetTop-g.offsetHeight,ye=Math.max(G,U+(se?I:0)+ie+A),J=Q+ye;i.style.height=J+"px"}else{const se=$.length>0&&v===$[0].ref.current;i.style.top="0px";const ye=Math.max(H,T+g.offsetTop+(se?_:0)+U)+K;i.style.height=ye+"px",g.scrollTop=Q-H+g.offsetTop}i.style.margin=`${ct}px 0`,i.style.minHeight=Y+"px",i.style.maxHeight=V+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,i,u,g,v,b,a.dir,r]);Oe(()=>S(),[S]);const[M,C]=f.useState();Oe(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const N=f.useCallback(D=>{D&&y.current===!0&&(S(),x==null||x(),y.current=!1)},[S,x]);return d.jsx(Ey,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:h,onScrollButtonChange:N,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:d.jsx(ee.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});il.displayName=Dy;var ky="SelectPopperPosition",la=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ct,...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=ky;var[Ey,za]=_n(tn,{}),ua="SelectViewport",cl=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Gt(ua,n),s=za(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:Z(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-ct*2,g=parseFloat(c.style.minHeight),v=parseFloat(c.style.height),b=Math.max(g,v);if(b<y){const x=b+h,S=Math.min(y,x),M=x-S;c.style.height=S+"px",c.style.bottom==="0px"&&(m.scrollTop=M>0?M:0,c.style.justifyContent="flex-end")}}}l.current=m.scrollTop})})})]})});cl.displayName=ua;var ll="SelectGroup",[Ny,Ry]=_n(ll),Ty=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ne();return d.jsx(Ny,{scope:n,id:o,children:d.jsx(ee.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Ty.displayName=ll;var ul="SelectLabel",dl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ry(ul,n);return d.jsx(ee.div,{id:o.id,...r,ref:t})});dl.displayName=ul;var Br="SelectItem",[_y,fl]=_n(Br),ml=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=zt(Br,n),l=Gt(Br,n),u=i.value===r,[m,c]=f.useState(a??""),[p,h]=f.useState(!1),y=he(t,x=>{var S;return(S=l.itemRefCallback)==null?void 0:S.call(l,x,r,o)}),g=Ne(),v=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(_y,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:f.useCallback(x=>{c(S=>S||((x==null?void 0:x.textContent)??"").trim())},[]),children:d.jsx(lo.ItemSlot,{scope:n,value:r,disabled:o,textValue:m,children:d.jsx(ee.div,{role:"option","aria-labelledby":g,"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:Z(s.onFocus,()=>h(!0)),onBlur:Z(s.onBlur,()=>h(!1)),onClick:Z(s.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:Z(s.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:Z(s.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:Z(s.onPointerMove,x=>{var S;v.current=x.pointerType,o?(S=l.onItemLeave)==null||S.call(l):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Z(s.onPointerLeave,x=>{var S;x.currentTarget===document.activeElement&&((S=l.onItemLeave)==null||S.call(l))}),onKeyDown:Z(s.onKeyDown,x=>{var M;((M=l.searchRef)==null?void 0:M.current)!==""&&x.key===" "||(gy.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});ml.displayName=Br;var Yn="SelectItemText",pl=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=zt(Yn,n),i=Gt(Yn,n),l=fl(Yn,n),u=wy(Yn,n),[m,c]=f.useState(null),p=he(t,b=>c(b),l.onItemTextChange,b=>{var x;return(x=i.itemTextRefCallback)==null?void 0:x.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:g,onNativeOptionRemove:v}=u;return Oe(()=>(g(y),()=>v(y)),[g,v,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=Yn;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=Gt(da,e.__scopeSelect),r=za(da,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Oe(()=>{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=Gt(fa,e.__scopeSelect),r=za(fa,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Oe(()=>{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=Gt("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]),Oe(()=>{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:Z(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Z(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Z(o.onPointerLeave,()=>{l()})})}),Oy="SelectSeparator",wl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(ee.div,{"aria-hidden":!0,...r,ref:t})});wl.displayName=Oy;var ma="SelectArrow",Py=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=fo(n),a=zt(ma,n),s=Gt(ma,n);return a.open&&s.position==="popper"?d.jsx(oo,{...o,...r,ref:t}):null});Py.displayName=ma;var Ay="SelectBubbleInput",xl=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),s=Ha(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=Ay;function Sl(e){return e===""||e===void 0}function Cl(e){const t=rt(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=Iy(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 Iy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var jy=Zc,Dl=Jc,$y=tl,Ly=nl,Fy=rl,kl=ol,Wy=cl,El=dl,Nl=ml,By=pl,Yy=gl,Rl=vl,Tl=yl,_l=wl;const pa=jy,ha=$y,Yr=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Dl,{ref:r,className:L("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(Ly,{asChild:!0,children:d.jsx(er,{strokeWidth:1.5,className:"h-4 w-4 text-foreground"})})]}));Yr.displayName=Dl.displayName;const Ol=f.forwardRef(({className:e,...t},n)=>d.jsx(Rl,{ref:n,className:L("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:L("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(er,{className:"h-4 w-4"})}));Pl.displayName=Tl.displayName;const Hr=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>d.jsx(Fy,{children:d.jsxs(kl,{ref:o,className:L("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(Wy,{className:L("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d.jsx(Pl,{})]})}));Hr.displayName=kl.displayName;const Hy=f.forwardRef(({className:e,...t},n)=>d.jsx(El,{ref:n,className:L("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Hy.displayName=El.displayName;const zr=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Nl,{ref:r,className:L("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(Yy,{children:d.jsx(Jn,{className:"h-4 w-4"})})}),d.jsx(By,{children:t})]}));zr.displayName=Nl.displayName;const zy=f.forwardRef(({className:e,...t},n)=>d.jsx(_l,{ref:n,className:L("-mx-1 my-1 h-px bg-muted",e),...t}));zy.displayName=_l.displayName;const Lo={},Hn={};function Gn(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 Hn?Hn[r]:ri(r,r.split(":"))}catch{if(e in Hn)return Hn[e];const n=e==null?void 0:e.match(Gy);return n?ri(e,n.slice(1)):NaN}}const Gy=/([+-]\d\d):?(\d\d)?/;function ri(e,t){const n=+t[0],r=+(t[1]||0);return Hn[e]=n>0?n*60+r:n*60-r}class yt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Gn(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 yt(...n,t):new yt(Date.now(),t)}withTimeZone(t){return new yt(+this,t)}getTimezoneOffset(){return-Gn(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ga(this),+this}[Symbol.for("constructDateFrom")](t){return new yt(+new Date(t),this.timeZone)}}const oi=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!oi.test(e))return;const t=e.replace(oi,"$1UTC");yt.prototype[t]&&(e.startsWith("get")?yt.prototype[e]=function(){return this.internal[t]()}:(yt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Uy(this),+this},yt.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 Uy(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=Gn(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=Gn(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=Gn(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 Ye extends yt{static tz(t,...n){return n.length?new Ye(...n,t):new Ye(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} (${qy(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 Ye(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ye(+new Date(t),this.timeZone)}}function qy(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var le;(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"})(le||(le={}));var ke;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ke||(ke={}));var lt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(lt||(lt={}));var Qe;(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"})(Qe||(Qe={}));const Il=6048e5,Vy=864e5,ai=Symbol.for("constructDateFrom");function $e(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ai in e?e[ai](t):e instanceof Date?new e.constructor(t):new Date(t)}function xe(e,t){return $e(t||e,e)}function jl(e,t,n){const r=xe(e,n==null?void 0:n.in);return isNaN(t)?$e(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function $l(e,t,n){const r=xe(e,n==null?void 0:n.in);if(isNaN(t))return $e(e,NaN);if(!t)return r;const o=r.getDate(),a=$e(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 Ky={};function lr(){return Ky}function Sn(e,t){var i,l,u,m;const n=lr(),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=xe(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 Vn(e,t){return Sn(e,{...t,weekStartsOn:1})}function Ll(e,t){const n=xe(e,t==null?void 0:t.in),r=n.getFullYear(),o=$e(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Vn(o),s=$e(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Vn(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function si(e){const t=xe(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 On(e,...t){const n=$e.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Kn(e,t){const n=xe(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Fl(e,t,n){const[r,o]=On(n==null?void 0:n.in,e,t),a=Kn(r),s=Kn(o),i=+a-si(a),l=+s-si(s);return Math.round((i-l)/Vy)}function Xy(e,t){const n=Ll(e,t),r=$e(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Vn(r)}function Zy(e,t,n){return jl(e,t*7,n)}function Qy(e,t,n){return $l(e,t*12,n)}function Jy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=$e.bind(null,o));const a=xe(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),$e(r,n||NaN)}function eb(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=$e.bind(null,o));const a=xe(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),$e(r,n||NaN)}function tb(e,t,n){const[r,o]=On(n==null?void 0:n.in,e,t);return+Kn(r)==+Kn(o)}function Wl(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function nb(e){return!(!Wl(e)&&typeof e!="number"||isNaN(+xe(e)))}function rb(e,t,n){const[r,o]=On(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function ob(e,t){const n=xe(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 ab(e,t){const[n,r]=On(e,t.start,t.end);return{start:n,end:r}}function sb(e,t){const{start:n,end:r}=ab(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($e(n,s)),s.setMonth(s.getMonth()+i);return o?l.reverse():l}function ib(e,t){const n=xe(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function cb(e,t){const n=xe(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=xe(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=lr(),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=xe(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 lb(e,t){return Yl(e,{...t,weekStartsOn:1})}const ub={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"}},db=(e,t,n)=>{let r;const o=ub[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 fb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},mb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hb={date:Fo({formats:fb,defaultWidth:"full"}),time:Fo({formats:mb,defaultWidth:"full"}),dateTime:Fo({formats:pb,defaultWidth:"full"})},gb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},vb=(e,t,n,r)=>gb[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 yb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},wb={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"]},xb={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"]},Sb={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"}},Cb={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"}},Mb=(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"},Db={ordinalNumber:Mb,era:$n({values:yb,defaultWidth:"wide"}),quarter:$n({values:bb,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$n({values:wb,defaultWidth:"wide"}),day:$n({values:xb,defaultWidth:"wide"}),dayPeriod:$n({values:Sb,defaultWidth:"wide",formattingValues:Cb,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)?Eb(i,c=>c.test(s)):kb(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 kb(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Eb(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Nb(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 Rb=/^(\d+)(th|st|nd|rd)?/i,Tb=/\d+/i,_b={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},Ob={any:[/^b/i,/^(a|c)/i]},Pb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ab={any:[/1/i,/2/i,/3/i,/4/i]},Ib={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},jb={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]},$b={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},Lb={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]},Fb={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},Wb={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}},Bb={ordinalNumber:Nb({matchPattern:Rb,parsePattern:Tb,valueCallback:e=>parseInt(e,10)}),era:Ln({matchPatterns:_b,defaultMatchWidth:"wide",parsePatterns:Ob,defaultParseWidth:"any"}),quarter:Ln({matchPatterns:Pb,defaultMatchWidth:"wide",parsePatterns:Ab,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ln({matchPatterns:Ib,defaultMatchWidth:"wide",parsePatterns:jb,defaultParseWidth:"any"}),day:Ln({matchPatterns:$b,defaultMatchWidth:"wide",parsePatterns:Lb,defaultParseWidth:"any"}),dayPeriod:Ln({matchPatterns:Fb,defaultMatchWidth:"any",parsePatterns:Wb,defaultParseWidth:"any"})},Ga={code:"en-US",formatDistance:db,formatLong:hb,formatRelative:vb,localize:Db,match:Bb,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Yb(e,t){const n=xe(e,t==null?void 0:t.in);return Fl(n,Bl(n))+1}function Hl(e,t){const n=xe(e,t==null?void 0:t.in),r=+Vn(n)-+Xy(n);return Math.round(r/Il)+1}function zl(e,t){var m,c,p,h;const n=xe(e,t==null?void 0:t.in),r=n.getFullYear(),o=lr(),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=$e((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=Sn(s,t),l=$e((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=Sn(l,t);return+n>=+i?r+1:+n>=+u?r:r-1}function Hb(e,t){var i,l,u,m;const n=lr(),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=$e((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Sn(a,t)}function Gl(e,t){const n=xe(e,t==null?void 0:t.in),r=+Sn(n,t)-+Hb(n,t);return Math.round(r/Il)+1}function be(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const It={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return be(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):be(n+1,2)},d(e,t){return be(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 be(e.getHours()%12||12,t.length)},H(e,t){return be(e.getHours(),t.length)},m(e,t){return be(e.getMinutes(),t.length)},s(e,t){return be(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return be(o,t.length)}},hn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ii={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 It.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 be(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):be(a,t.length)},R:function(e,t){const n=Ll(e);return be(n,t.length)},u:function(e,t){const n=e.getFullYear();return be(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 be(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 be(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 It.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 be(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"}):be(o,t.length)},I:function(e,t,n){const r=Hl(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):be(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):It.d(e,t)},D:function(e,t,n){const r=Yb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):be(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 be(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 be(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 be(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=hn.noon:r===0?o=hn.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=hn.evening:r>=12?o=hn.afternoon:r>=4?o=hn.morning:o=hn.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 It.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):It.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):be(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):be(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):It.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):It.s(e,t)},S:function(e,t){return It.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return li(r);case"XXXX":case"XX":return Qt(r);case"XXXXX":case"XXX":default:return Qt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return li(r);case"xxxx":case"xx":return Qt(r);case"xxxxx":case"xxx":default:return Qt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ci(r,":");case"OOOO":default:return"GMT"+Qt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ci(r,":");case"zzzz":default:return"GMT"+Qt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return be(r,t.length)},T:function(e,t,n){return be(+e,t.length)}};function ci(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+be(a,2)}function li(e,t){return e%60===0?(e>0?"-":"+")+be(Math.abs(e)/60,2):Qt(e,t)}function Qt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=be(Math.trunc(r/60),2),a=be(r%60,2);return n+o+t+a}const ui=(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"})}},zb=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ui(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}}",ui(r,t)).replace("{{time}}",Ul(o,t))},Gb={p:Ul,P:zb},Ub=/^D+$/,qb=/^Y+$/,Vb=["D","DD","YY","YYYY"];function Kb(e){return Ub.test(e)}function Xb(e){return qb.test(e)}function Zb(e,t,n){const r=Qb(e,t,n);if(console.warn(r),Vb.includes(e))throw new RangeError(r)}function Qb(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 Jb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ew=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,tw=/^'([^]*?)'?$/,nw=/''/g,rw=/[a-zA-Z]/;function ow(e,t,n){var m,c,p,h,y,g,v,b;const r=lr(),o=(n==null?void 0:n.locale)??r.locale??Ga,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)??((g=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((b=(v=r.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0,i=xe(e,n==null?void 0:n.in);if(!nb(i))throw new RangeError("Invalid time value");let l=t.match(ew).map(x=>{const S=x[0];if(S==="p"||S==="P"){const M=Gb[S];return M(x,o.formatLong)}return x}).join("").match(Jb).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const S=x[0];if(S==="'")return{isToken:!1,value:aw(x)};if(ii[S])return{isToken:!0,value:x};if(S.match(rw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:x}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(x=>{if(!x.isToken)return x.value;const S=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Xb(S)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Kb(S))&&Zb(S,t,String(e));const M=ii[S[0]];return M(i,S,o.localize,u)}).join("")}function aw(e){const t=e.match(tw);return t?t[1].replace(nw,"'"):e}function sw(e,t){const n=xe(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=$e(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function iw(e,t){return xe(e,t==null?void 0:t.in).getMonth()}function cw(e,t){return xe(e,t==null?void 0:t.in).getFullYear()}function lw(e,t){return+xe(e)>+xe(t)}function uw(e,t){return+xe(e)<+xe(t)}function dw(e,t,n){const[r,o]=On(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function fw(e,t,n){const[r,o]=On(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function mw(e,t,n){const r=xe(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=$e(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=sw(s);return r.setMonth(t,Math.min(a,i)),r}function pw(e,t,n){const r=xe(e,n==null?void 0:n.in);return isNaN(+r)?$e(e,NaN):(r.setFullYear(t),r)}const di=5,hw=4;function gw(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,di*7-1);return t.getMonth(e)===t.getMonth(a)?di:hw}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 vw(e,t){const n=ql(e,t),r=gw(e,t);return t.addDays(n,r*7-1)}class _t{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Ye.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 Ye(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):Zy(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):Qy(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):rb(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):sb(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):vw(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):lb(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):ob(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):cb(r)},this.format=(r,o,a)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):ow(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):iw(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):cw(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):lw(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):uw(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):tb(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):dw(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):fw(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Jy(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):eb(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):mw(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):pw(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):Kn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Vn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):ib(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):Sn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Bl(r)},this.options={locale:Ga,...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 St=new _t;class Vl{constructor(t,n,r=St){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 yw{constructor(t,n){this.date=t,this.weeks=n}}class bw{constructor(t,n){this.days=n,this.weekNumber=t}}function Mt(e,t,n=!1,r=St){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 Ua(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 Dt(e,t,n=St){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(Ua(i))return Mt(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 ww(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:g,isAfter:v}=o,b=n&&h(n),x=r&&g(r),S={[ke.focused]:[],[ke.outside]:[],[ke.disabled]:[],[ke.hidden]:[],[ke.today]:[]},M={};for(const C of e){const{date:N,displayMonth:D}=C,R=!!(D&&!p(N,D)),j=!!(b&&y(N,b)),F=!!(x&&v(N,x)),$=!!(a&&Dt(N,a,o)),V=!!(s&&Dt(N,s,o))||j||F||!u&&!l&&R||u&&l===!1&&R,B=c(N,m??o.today());R&&S.outside.push(C),$&&S.disabled.push(C),V&&S.hidden.push(C),B&&S.today.push(C),i&&Object.keys(i).forEach(P=>{const T=i==null?void 0:i[P];T&&Dt(N,T,o)&&(M[P]?M[P].push(C):M[P]=[C])})}return C=>{const N={[ke.focused]:!1,[ke.disabled]:!1,[ke.hidden]:!1,[ke.outside]:!1,[ke.today]:!1},D={};for(const R in S){const j=S[R];N[R]=j.some(F=>F===C)}for(const R in M)D[R]=M[R].some(j=>j===C);return{...N,...D}}}function xw(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[ke[a]]?o.push(t[ke[a]]):t[lt[a]]&&o.push(t[lt[a]]),o),[t[le.Day]])}function Sw(e){return w.createElement("button",{...e})}function Cw(e){return w.createElement("span",{...e})}function Mw(e){const{size:t=24,orientation:n="left",className:r}=e;return w.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&w.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&w.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&w.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&w.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Dw(e){const{day:t,modifiers:n,...r}=e;return w.createElement("td",{...r})}function kw(e){const{day:t,modifiers:n,...r}=e,o=w.useRef(null);return w.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),w.createElement("button",{ref:o,...r})}function Ew(e){const{options:t,className:n,components:r,classNames:o,...a}=e,s=[o[le.Dropdown],n].join(" "),i=t==null?void 0:t.find(({value:l})=>l===a.value);return w.createElement("span",{"data-disabled":a.disabled,className:o[le.DropdownRoot]},w.createElement(r.Select,{className:s,...a},t==null?void 0:t.map(({value:l,label:u,disabled:m})=>w.createElement(r.Option,{key:l,value:l,disabled:m},u))),w.createElement("span",{className:o[le.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,w.createElement(r.Chevron,{orientation:"down",size:18,className:o[le.Chevron]})))}function Nw(e){return w.createElement("div",{...e})}function Rw(e){return w.createElement("div",{...e})}function Tw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return w.createElement("div",{...r},e.children)}function _w(e){const{calendarMonth:t,displayIndex:n,...r}=e;return w.createElement("div",{...r})}function Ow(e){return w.createElement("table",{...e})}function Pw(e){return w.createElement("div",{...e})}const eu=w.createContext(void 0);function ur(){const e=w.useContext(eu);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Aw(e){const{components:t}=ur();return w.createElement(t.Dropdown,{...e})}function Iw(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:l,labelNext:u}}=ur(),m=w.useCallback(p=>{o&&(n==null||n(p))},[o,n]),c=w.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return w.createElement("nav",{...a},w.createElement(s.PreviousMonthButton,{type:"button",className:i[le.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:c},w.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[le.Chevron],orientation:"left"})),w.createElement(s.NextMonthButton,{type:"button",className:i[le.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:m},w.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[le.Chevron]})))}function jw(e){const{components:t}=ur();return w.createElement(t.Button,{...e})}function $w(e){return w.createElement("option",{...e})}function Lw(e){const{components:t}=ur();return w.createElement(t.Button,{...e})}function Fw(e){const{rootRef:t,...n}=e;return w.createElement("div",{...n,ref:t})}function Ww(e){return w.createElement("select",{...e})}function Bw(e){const{week:t,...n}=e;return w.createElement("tr",{...n})}function Yw(e){return w.createElement("th",{...e})}function Hw(e){return w.createElement("thead",{"aria-hidden":!0},w.createElement("tr",{...e}))}function zw(e){const{week:t,...n}=e;return w.createElement("th",{...n})}function Gw(e){return w.createElement("th",{...e})}function Uw(e){return w.createElement("tbody",{...e})}function qw(e){const{components:t}=ur();return w.createElement(t.Dropdown,{...e})}const Vw=Object.freeze(Object.defineProperty({__proto__:null,Button:Sw,CaptionLabel:Cw,Chevron:Mw,Day:Dw,DayButton:kw,Dropdown:Ew,DropdownNav:Nw,Footer:Rw,Month:Tw,MonthCaption:_w,MonthGrid:Ow,Months:Pw,MonthsDropdown:Aw,Nav:Iw,NextMonthButton:jw,Option:$w,PreviousMonthButton:Lw,Root:Fw,Select:Ww,Week:Bw,WeekNumber:zw,WeekNumberHeader:Gw,Weekday:Yw,Weekdays:Hw,Weeks:Uw,YearsDropdown:qw},Symbol.toStringTag,{value:"Module"}));function Kw(e){return{...Vw,...e}}function Xw(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 qa(){const e={};for(const t in le)e[le[t]]=`rdp-${le[t]}`;for(const t in ke)e[ke[t]]=`rdp-${ke[t]}`;for(const t in lt)e[lt[t]]=`rdp-${lt[t]}`;for(const t in Qe)e[Qe[t]]=`rdp-${Qe[t]}`;return e}function tu(e,t,n){return(n??new _t(t)).format(e,"LLLL y")}const Zw=tu;function Qw(e,t,n){return(n??new _t(t)).format(e,"d")}function Jw(e,t=St){return t.format(e,"LLLL")}function ex(e,t=St){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function tx(){return""}function nx(e,t,n){return(n??new _t(t)).format(e,"cccccc")}function nu(e,t=St){return t.format(e,"yyyy")}const rx=nu,ox=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:tu,formatDay:Qw,formatMonthCaption:Zw,formatMonthDropdown:Jw,formatWeekNumber:ex,formatWeekNumberHeader:tx,formatWeekdayName:nx,formatYearCaption:rx,formatYearDropdown:nu},Symbol.toStringTag,{value:"Module"}));function ax(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...ox,...e}}function sx(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),g=t&&p<a(t)||n&&p>a(n)||!1;return{value:y,label:h,disabled:g}})}function ix(e,t={},n={}){let r={...t==null?void 0:t[le.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function cx(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 lx(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 g=n.formatYearDropdown(y,r);return{value:i(y),label:g,disabled:!1}})}function ru(e,t,n){return(n??new _t(t)).format(e,"LLLL y")}const ux=ru;function dx(e,t,n,r){let o=(r??new _t(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function ou(e,t,n,r){let o=(r??new _t(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const fx=ou;function mx(){return""}function px(e){return"Choose the Month"}function hx(e){return"Go to the Next Month"}function gx(e){return"Go to the Previous Month"}function vx(e,t,n){return(n??new _t(t)).format(e,"cccc")}function yx(e,t){return`Week ${e}`}function bx(e){return"Week Number"}function wx(e){return"Choose the Year"}const xx=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:ux,labelDay:fx,labelDayButton:ou,labelGrid:ru,labelGridcell:dx,labelMonthDropdown:px,labelNav:mx,labelNext:hx,labelPrevious:gx,labelWeekNumber:yx,labelWeekNumberHeader:bx,labelWeekday:vx,labelYearDropdown:wx},Symbol.toStringTag,{value:"Module"})),dr=e=>e instanceof HTMLElement?e:null,Wo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Sx=e=>dr(e.querySelector("[data-animated-month]")),Bo=e=>dr(e.querySelector("[data-animated-caption]")),Yo=e=>dr(e.querySelector("[data-animated-weeks]")),Cx=e=>dr(e.querySelector("[data-animated-nav]")),Mx=e=>dr(e.querySelector("[data-animated-weekdays]"));function Dx(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const s=w.useRef(null),i=w.useRef(r),l=w.useRef(!1);w.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[Qe.caption_after_enter]:n[Qe.caption_before_enter],h=c?n[Qe.weeks_after_enter]:n[Qe.weeks_before_enter],y=s.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(Wo(g).forEach(S=>{if(!(S instanceof HTMLElement))return;const M=Sx(S);M&&S.contains(M)&&S.removeChild(M);const C=Bo(S);C&&C.classList.remove(p);const N=Yo(S);N&&N.classList.remove(h)}),s.current=g):s.current=null,l.current||m||o)return;const v=y instanceof HTMLElement?Wo(y):[],b=Wo(e.current);if(b&&b.every(x=>x instanceof HTMLElement)&&v&&v.every(x=>x instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const x=Cx(e.current);x&&(x.style.zIndex="1"),b.forEach((S,M)=>{const C=v[M];if(!C)return;S.style.position="relative",S.style.overflow="hidden";const N=Bo(S);N&&N.classList.add(p);const D=Yo(S);D&&D.classList.add(h);const R=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.style.zIndex=""),N&&N.classList.remove(p),D&&D.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 j=Mx(C);j&&(j.style.opacity="0");const F=Bo(C);F&&(F.classList.add(c?n[Qe.caption_before_exit]:n[Qe.caption_after_exit]),F.addEventListener("animationend",R));const $=Yo(C);$&&$.classList.add(c?n[Qe.weeks_before_exit]:n[Qe.weeks_after_exit]),S.insertBefore(C,S.firstChild)})}})}function kx(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:g,isAfter:v,startOfBroadcastWeek:b,startOfISOWeek:x,startOfWeek:S}=r,M=l?b(o,r):s?x(o):S(o),C=l?p(a):s?h(y(a)):g(y(a)),N=m(C,M),D=c(a,o)+1,R=[];for(let $=0;$<=N;$++){const V=u(M,$);if(t&&v(V,t))break;R.push(V)}const F=(l?35:42)*D;if(i&&R.length<F){const $=F-R.length;for(let V=0;V<$;V++){const B=u(R[R.length-1],1);R.push(B)}}return R}function Ex(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,s)=>[...a,...s.days],t);return[...n,...o]},t)}function Nx(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 fi(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 Rx(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((g,v)=>{const b=n.broadcastCalendar?c(v,r):n.ISOWeek?p(v):h(v),x=n.broadcastCalendar?a(v):n.ISOWeek?s(i(v)):l(i(v)),S=t.filter(D=>D>=b&&D<=x),M=n.broadcastCalendar?35:42;if(n.fixedWeeks&&S.length<M){const D=t.filter(R=>{const j=M-S.length;return R>x&&R<=o(x,j)});S.push(...D)}const C=S.reduce((D,R)=>{const j=n.ISOWeek?u(R):m(R),F=D.find(V=>V.weekNumber===j),$=new Vl(R,v,r);return F?F.days.push($):D.push(new bw(j,[$])),D},[]),N=new yw(v,C);return g.push(N),g},[]);return n.reverseMonths?y.reverse():y}function Tx(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:g}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&g&&(r=g),!r&&h&&(r=m(h,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):p?n=m(p,0,1):!n&&v&&(n=o(l(e.today??c(),-100))),r?r=i(r):h?r=m(h,11,31):!r&&v&&(r=u(e.today??c())),[n&&a(n),r&&a(r)]}function _x(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 Ox(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 Px(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function mo(e,t){const[n,r]=w.useState(e);return[t===void 0?n:t,r]}function Ax(e,t){const[n,r]=Tx(e,t),{startOfMonth:o,endOfMonth:a}=t,s=fi(e,n,r,t),[i,l]=mo(s,e.month?s:void 0);w.useEffect(()=>{const N=fi(e,n,r,t);l(N)},[e.timeZone]);const u=Nx(i,r,e,t),m=kx(u,e.endMonth?a(e.endMonth):void 0,e,t),c=Rx(u,m,e,t),p=Px(c),h=Ex(c),y=Ox(i,n,e,t),g=_x(i,r,e,t),{disableNavigation:v,onMonthChange:b}=e,x=N=>p.some(D=>D.days.some(R=>R.isEqualTo(N))),S=N=>{if(v)return;let D=o(N);n&&D<o(n)&&(D=o(n)),r&&D>o(r)&&(D=o(r)),l(D),b==null||b(D)};return{months:c,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:g,goToMonth:S,goToDay:N=>{x(N)||S(N.date)}}}var ht;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(ht||(ht={}));function mi(e){return!e[ke.disabled]&&!e[ke.hidden]&&!e[ke.outside]}function Ix(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);mi(i)&&(i[ke.focused]&&a<ht.FocusedModifier?(o=s,a=ht.FocusedModifier):r!=null&&r.isEqualTo(s)&&a<ht.LastFocused?(o=s,a=ht.LastFocused):n(s.date)&&a<ht.Selected?(o=s,a=ht.Selected):i[ke.today]&&a<ht.Today&&(o=s,a=ht.Today))}return o||(o=e.find(s=>mi(t(s)))),o}function jx(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:g,max:v,min:b,startOfBroadcastWeek:x,startOfISOWeek:S,startOfWeek:M}=s;let N={day:u,week:c,month:m,year:p,startOfWeek:D=>l?x(D,s):i?S(D):M(D),endOfWeek:D=>l?h(D):i?y(D):g(D)}[e](n,t==="after"?1:-1);return t==="before"&&r?N=v([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=jx(e,t,n.date,r,o,a,s),u=!!(a.disabled&&Dt(l,a.disabled,s)),m=!!(a.hidden&&Dt(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 $x(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=w.useState(),l=Ix(t.days,n,r||(()=>!1),s),[u,m]=w.useState(a?l:void 0);return{isFocusTarget:g=>!!(l!=null&&l.isEqualTo(g)),setFocused:m,focused:u,blur:()=>{i(u),m(void 0)},moveFocus:(g,v)=>{if(!u)return;const b=au(g,v,u,t.navStart,t.navEnd,e,o);b&&(t.goToDay(b),m(b))}}}function Lx(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,g)=>{let v=[...i??[]];if(u(h)){if((i==null?void 0:i.length)===m||r&&(i==null?void 0:i.length)===1)return;v=i==null?void 0:i.filter(b=>!l(b,h))}else(i==null?void 0:i.length)===c?v=[h]:v=[...v,h];return o||s(v),o==null||o(v,h,y,g),v},isSelected:u}}function Fx(e,t,n=0,r=0,o=!1,a=St){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 Wx(e,t,n=St){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 pi(e,t,n=St){return Mt(e,t.from,!1,n)||Mt(e,t.to,!1,n)||Mt(t,e.from,!1,n)||Mt(t,e.to,!1,n)}function Bx(e,t,n=St){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?Mt(e,i,!1,n):Jl(i,n)?i.some(l=>Mt(e,l,!1,n)):Ua(i)?i.from&&i.to?pi(e,{from:i.from,to:i.to},n):!1:Ql(i)?Wx(e,i.dayOfWeek,n):Kl(i)?n.isAfter(i.before,i.after)?pi(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):Dt(e.from,i,n)||Dt(e.to,i,n):Xl(i)||Zl(i)?Dt(e.from,i,n)||Dt(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 Yx(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:g,max:v}=e,b=p?Fx(p,u,g,v,a,t):void 0;return r&&n&&(b!=null&&b.from)&&b.to&&Bx({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&&Mt(u,p,!1,t)}}function Hx(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 zx(e,t){const n=Hx(e,t),r=Lx(e,t),o=Yx(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function su(e){var Pt;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new Ye(t.today,t.timeZone)),t.month&&(t.month=new Ye(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new Ye(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new Ye(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new Ye(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new Ye(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Pt=t.selected)==null?void 0:Pt.map(q=>new Ye(q,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new Ye(t.selected.from,t.timeZone):void 0,to:t.selected.to?new Ye(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:s,classNames:i}=w.useMemo(()=>{const q={...Ga,...t.locale};return{dateLib:new _t({locale:q,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:Kw(t.components),formatters:ax(t.formatters),labels:{...xx,...t.labels},locale:q,classNames:{...qa(),...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:g,onDayMouseEnter:v,onDayMouseLeave:b,onNextClick:x,onPrevClick:S,showWeekNumber:M,styles:C}=t,{formatCaption:N,formatDay:D,formatMonthDropdown:R,formatWeekNumber:j,formatWeekNumberHeader:F,formatWeekdayName:$,formatYearDropdown:V}=r,B=Ax(t,a),{days:P,months:T,navStart:k,navEnd:A,previousMonth:E,nextMonth:O,goToMonth:Y}=B,z=ww(P,t,k,A,a),{isSelected:_,select:I,selected:H}=zx(t,a)??{},{blur:G,focused:U,isFocusTarget:W,moveFocus:Q,setFocused:K}=$x(t,B,z,_??(()=>!1),a),{labelDayButton:X,labelGridcell:se,labelGrid:ie,labelMonthDropdown:ye,labelNav:J,labelPrevious:Pe,labelNext:Ae,labelWeekday:Me,labelWeekNumber:Ue,labelWeekNumberHeader:Ce,labelYearDropdown:Xe}=o,Ot=w.useMemo(()=>cx(a,t.ISOWeek),[a,t.ISOWeek]),Re=u!==void 0||h!==void 0,re=w.useCallback(()=>{E&&(Y(E),S==null||S(E))},[E,Y,S]),me=w.useCallback(()=>{O&&(Y(O),x==null||x(O))},[Y,O,x]),Te=w.useCallback((q,ce)=>ae=>{ae.preventDefault(),ae.stopPropagation(),K(q),I==null||I(q.date,ce,ae),h==null||h(q.date,ce,ae)},[I,h,K]),Le=w.useCallback((q,ce)=>ae=>{K(q),y==null||y(q.date,ce,ae)},[y,K]),Be=w.useCallback((q,ce)=>ae=>{G(),p==null||p(q.date,ce,ae)},[G,p]),at=w.useCallback((q,ce)=>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,oe]=fe[ae.key];Q(ge,oe)}g==null||g(q.date,ce,ae)},[Q,g,t.dir]),qt=w.useCallback((q,ce)=>ae=>{v==null||v(q.date,ce,ae)},[v]),st=w.useCallback((q,ce)=>ae=>{b==null||b(q.date,ce,ae)},[b]),cn=w.useCallback(q=>ce=>{const ae=Number(ce.target.value),fe=a.setMonth(a.startOfMonth(q),ae);Y(fe)},[a,Y]),qe=w.useCallback(q=>ce=>{const ae=Number(ce.target.value),fe=a.setYear(a.startOfMonth(q),ae);Y(fe)},[a,Y]),{className:ln,style:An}=w.useMemo(()=>({className:[i[le.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[le.Root],...t.style}}),[i,t.className,t.style,C]),un=Xw(t),Vt=w.useRef(null);Dx(Vt,!!t.animate,{classNames:i,months:T,focused:U,dateLib:a});const In={dayPickerProps:t,selected:H,select:I,isSelected:_,months:T,nextMonth:O,previousMonth:E,goToMonth:Y,getModifiers:z,components:n,classNames:i,styles:C,labels:o,formatters:r};return w.createElement(eu.Provider,{value:In},w.createElement(n.Root,{rootRef:t.animate?Vt:void 0,className:ln,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"],...un},w.createElement(n.Months,{className:i[le.Months],style:C==null?void 0:C[le.Months]},!t.hideNavigation&&!m&&w.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:i[le.Nav],style:C==null?void 0:C[le.Nav],"aria-label":J(),onPreviousClick:re,onNextClick:me,previousMonth:E,nextMonth:O}),T.map((q,ce)=>{const ae=sx(q.date,k,A,r,a),fe=lx(k,A,r,a);return w.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:i[le.Month],style:C==null?void 0:C[le.Month],key:ce,displayIndex:ce,calendarMonth:q},m==="around"&&!t.hideNavigation&&ce===0&&w.createElement(n.PreviousMonthButton,{type:"button",className:i[le.PreviousMonthButton],tabIndex:E?void 0:-1,"aria-disabled":E?void 0:!0,"aria-label":Pe(E),onClick:re,"data-animated-button":t.animate?"true":void 0},w.createElement(n.Chevron,{disabled:E?void 0:!0,className:i[le.Chevron],orientation:t.dir==="rtl"?"right":"left"})),w.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:i[le.MonthCaption],style:C==null?void 0:C[le.MonthCaption],calendarMonth:q,displayIndex:ce},l!=null&&l.startsWith("dropdown")?w.createElement(n.DropdownNav,{className:i[le.Dropdowns],style:C==null?void 0:C[le.Dropdowns]},l==="dropdown"||l==="dropdown-months"?w.createElement(n.MonthsDropdown,{className:i[le.MonthsDropdown],"aria-label":ye(),classNames:i,components:n,disabled:!!t.disableNavigation,onChange:cn(q.date),options:ae,style:C==null?void 0:C[le.Dropdown],value:a.getMonth(q.date)}):w.createElement("span",null,R(q.date,a)),l==="dropdown"||l==="dropdown-years"?w.createElement(n.YearsDropdown,{className:i[le.YearsDropdown],"aria-label":Xe(a.options),classNames:i,components:n,disabled:!!t.disableNavigation,onChange:qe(q.date),options:fe,style:C==null?void 0:C[le.Dropdown],value:a.getYear(q.date)}):w.createElement("span",null,V(q.date,a)),w.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(q.date,a.options,a))):w.createElement(n.CaptionLabel,{className:i[le.CaptionLabel],role:"status","aria-live":"polite"},N(q.date,a.options,a))),m==="around"&&!t.hideNavigation&&ce===c-1&&w.createElement(n.NextMonthButton,{type:"button",className:i[le.NextMonthButton],tabIndex:O?void 0:-1,"aria-disabled":O?void 0:!0,"aria-label":Ae(O),onClick:me,"data-animated-button":t.animate?"true":void 0},w.createElement(n.Chevron,{disabled:O?void 0:!0,className:i[le.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ce===c-1&&m==="after"&&!t.hideNavigation&&w.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:i[le.Nav],style:C==null?void 0:C[le.Nav],"aria-label":J(),onPreviousClick:re,onNextClick:me,previousMonth:E,nextMonth:O}),w.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":ie(q.date,a.options,a)||void 0,className:i[le.MonthGrid],style:C==null?void 0:C[le.MonthGrid]},!t.hideWeekdays&&w.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:i[le.Weekdays],style:C==null?void 0:C[le.Weekdays]},M&&w.createElement(n.WeekNumberHeader,{"aria-label":Ce(a.options),className:i[le.WeekNumberHeader],style:C==null?void 0:C[le.WeekNumberHeader],scope:"col"},F()),Ot.map((ge,oe)=>w.createElement(n.Weekday,{"aria-label":Me(ge,a.options,a),className:i[le.Weekday],key:oe,style:C==null?void 0:C[le.Weekday],scope:"col"},$(ge,a.options,a)))),w.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:i[le.Weeks],style:C==null?void 0:C[le.Weeks]},q.weeks.map((ge,oe)=>w.createElement(n.Week,{className:i[le.Week],key:ge.weekNumber,style:C==null?void 0:C[le.Week],week:ge},M&&w.createElement(n.WeekNumber,{week:ge,style:C==null?void 0:C[le.WeekNumber],"aria-label":Ue(ge.weekNumber,{locale:s}),className:i[le.WeekNumber],scope:"row",role:"rowheader"},j(ge.weekNumber,a)),ge.days.map(de=>{const{date:ve}=de,ue=z(de);if(ue[ke.focused]=!ue.hidden&&!!(U!=null&&U.isEqualTo(de)),ue[lt.selected]=(_==null?void 0:_(ve))||ue.selected,Ua(H)){const{from:Ze,to:Fe}=H;ue[lt.range_start]=!!(Ze&&Fe&&a.isSameDay(ve,Ze)),ue[lt.range_end]=!!(Ze&&Fe&&a.isSameDay(ve,Fe)),ue[lt.range_middle]=Mt(H,ve,!0,a)}const Ve=ix(ue,C,t.modifiersStyles),we=xw(ue,i,t.modifiersClassNames),Se=!Re&&!ue.hidden?se(ve,ue,a.options,a):void 0;return w.createElement(n.Day,{key:`${a.format(ve,"yyyy-MM-dd")}_${a.format(de.displayMonth,"yyyy-MM")}`,day:de,modifiers:ue,className:we.join(" "),style:Ve,role:"gridcell","aria-selected":ue.selected||void 0,"aria-label":Se,"data-day":a.format(ve,"yyyy-MM-dd"),"data-month":de.outside?a.format(ve,"yyyy-MM"):void 0,"data-selected":ue.selected||void 0,"data-disabled":ue.disabled||void 0,"data-hidden":ue.hidden||void 0,"data-outside":de.outside||void 0,"data-focused":ue.focused||void 0,"data-today":ue.today||void 0},!ue.hidden&&Re?w.createElement(n.DayButton,{className:i[le.DayButton],style:C==null?void 0:C[le.DayButton],type:"button",day:de,modifiers:ue,disabled:ue.disabled||void 0,tabIndex:W(de)?0:-1,"aria-label":X(ve,ue,a.options,a),onClick:Te(de,ue),onBlur:Be(de,ue),onFocus:Le(de,ue),onKeyDown:at(de,ue),onMouseEnter:qt(de,ue),onMouseLeave:st(de,ue)},D(ve,a.options,a)):!ue.hidden&&D(de.date,a.options,a))}))))))})),t.footer&&w.createElement(n.Footer,{className:i[le.Footer],style:C==null?void 0:C[le.Footer],role:"status","aria-live":"polite"},t.footer)))}function Va(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pr={exports:{}},Gx=Pr.exports,hi;function iu(){return hi||(hi=1,function(e,t){(function(n,r){e.exports=r()})(Gx,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",g="Invalid Date",v=/^(\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,x={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(P){var T=["th","st","nd","rd"],k=P%100;return"["+P+(T[(k-20)%10]||T[k]||T[0])+"]"}},S=function(P,T,k){var A=String(P);return!A||A.length>=T?P:""+Array(T+1-A.length).join(k)+P},M={s:S,z:function(P){var T=-P.utcOffset(),k=Math.abs(T),A=Math.floor(k/60),E=k%60;return(T<=0?"+":"-")+S(A,2,"0")+":"+S(E,2,"0")},m:function P(T,k){if(T.date()<k.date())return-P(k,T);var A=12*(k.year()-T.year())+(k.month()-T.month()),E=T.clone().add(A,c),O=k-E<0,Y=T.clone().add(A+(O?-1:1),c);return+(-(A+(k-E)/(O?E-Y:Y-E))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:c,y:h,w:m,d:u,D:y,h:l,m:i,s,ms:a,Q:p}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},C="en",N={};N[C]=x;var D="$isDayjsObject",R=function(P){return P instanceof V||!(!P||!P[D])},j=function P(T,k,A){var E;if(!T)return C;if(typeof T=="string"){var O=T.toLowerCase();N[O]&&(E=O),k&&(N[O]=k,E=O);var Y=T.split("-");if(!E&&Y.length>1)return P(Y[0])}else{var z=T.name;N[z]=T,E=z}return!A&&E&&(C=E),E||!A&&C},F=function(P,T){if(R(P))return P.clone();var k=typeof T=="object"?T:{};return k.date=P,k.args=arguments,new V(k)},$=M;$.l=j,$.i=R,$.w=function(P,T){return F(P,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var V=function(){function P(k){this.$L=j(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[D]=!0}var T=P.prototype;return T.parse=function(k){this.$d=function(A){var E=A.date,O=A.utc;if(E===null)return new Date(NaN);if($.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var Y=E.match(v);if(Y){var z=Y[2]-1||0,_=(Y[7]||"0").substring(0,3);return O?new Date(Date.UTC(Y[1],z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,_)):new Date(Y[1],z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,_)}}return new Date(E)}(k),this.init()},T.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},T.$utils=function(){return $},T.isValid=function(){return this.$d.toString()!==g},T.isSame=function(k,A){var E=F(k);return this.startOf(A)<=E&&E<=this.endOf(A)},T.isAfter=function(k,A){return F(k)<this.startOf(A)},T.isBefore=function(k,A){return this.endOf(A)<F(k)},T.$g=function(k,A,E){return $.u(k)?this[A]:this.set(E,k)},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(k,A){var E=this,O=!!$.u(A)||A,Y=$.p(k),z=function(K,X){var se=$.w(E.$u?Date.UTC(E.$y,X,K):new Date(E.$y,X,K),E);return O?se:se.endOf(u)},_=function(K,X){return $.w(E.toDate()[K].apply(E.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(X)),E)},I=this.$W,H=this.$M,G=this.$D,U="set"+(this.$u?"UTC":"");switch(Y){case h:return O?z(1,0):z(31,11);case c:return O?z(1,H):z(0,H+1);case m:var W=this.$locale().weekStart||0,Q=(I<W?I+7:I)-W;return z(O?G-Q:G+(6-Q),H);case u:case y:return _(U+"Hours",0);case l:return _(U+"Minutes",1);case i:return _(U+"Seconds",2);case s:return _(U+"Milliseconds",3);default:return this.clone()}},T.endOf=function(k){return this.startOf(k,!1)},T.$set=function(k,A){var E,O=$.p(k),Y="set"+(this.$u?"UTC":""),z=(E={},E[u]=Y+"Date",E[y]=Y+"Date",E[c]=Y+"Month",E[h]=Y+"FullYear",E[l]=Y+"Hours",E[i]=Y+"Minutes",E[s]=Y+"Seconds",E[a]=Y+"Milliseconds",E)[O],_=O===u?this.$D+(A-this.$W):A;if(O===c||O===h){var I=this.clone().set(y,1);I.$d[z](_),I.init(),this.$d=I.set(y,Math.min(this.$D,I.daysInMonth())).$d}else z&&this.$d[z](_);return this.init(),this},T.set=function(k,A){return this.clone().$set(k,A)},T.get=function(k){return this[$.p(k)]()},T.add=function(k,A){var E,O=this;k=Number(k);var Y=$.p(A),z=function(H){var G=F(O);return $.w(G.date(G.date()+Math.round(H*k)),O)};if(Y===c)return this.set(c,this.$M+k);if(Y===h)return this.set(h,this.$y+k);if(Y===u)return z(1);if(Y===m)return z(7);var _=(E={},E[i]=r,E[l]=o,E[s]=n,E)[Y]||1,I=this.$d.getTime()+k*_;return $.w(I,this)},T.subtract=function(k,A){return this.add(-1*k,A)},T.format=function(k){var A=this,E=this.$locale();if(!this.isValid())return E.invalidDate||g;var O=k||"YYYY-MM-DDTHH:mm:ssZ",Y=$.z(this),z=this.$H,_=this.$m,I=this.$M,H=E.weekdays,G=E.months,U=E.meridiem,W=function(X,se,ie,ye){return X&&(X[se]||X(A,O))||ie[se].slice(0,ye)},Q=function(X){return $.s(z%12||12,X,"0")},K=U||function(X,se,ie){var ye=X<12?"AM":"PM";return ie?ye.toLowerCase():ye};return O.replace(b,function(X,se){return se||function(ie){switch(ie){case"YY":return String(A.$y).slice(-2);case"YYYY":return $.s(A.$y,4,"0");case"M":return I+1;case"MM":return $.s(I+1,2,"0");case"MMM":return W(E.monthsShort,I,G,3);case"MMMM":return W(G,I);case"D":return A.$D;case"DD":return $.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return W(E.weekdaysMin,A.$W,H,2);case"ddd":return W(E.weekdaysShort,A.$W,H,3);case"dddd":return H[A.$W];case"H":return String(z);case"HH":return $.s(z,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return K(z,_,!0);case"A":return K(z,_,!1);case"m":return String(_);case"mm":return $.s(_,2,"0");case"s":return String(A.$s);case"ss":return $.s(A.$s,2,"0");case"SSS":return $.s(A.$ms,3,"0");case"Z":return Y}return null}(X)||Y.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(k,A,E){var O,Y=this,z=$.p(A),_=F(k),I=(_.utcOffset()-this.utcOffset())*r,H=this-_,G=function(){return $.m(Y,_)};switch(z){case h:O=G()/12;break;case c:O=G();break;case p:O=G()/3;break;case m:O=(H-I)/6048e5;break;case u:O=(H-I)/864e5;break;case l:O=H/o;break;case i:O=H/r;break;case s:O=H/n;break;default:O=H}return E?O:$.a(O)},T.daysInMonth=function(){return this.endOf(c).$D},T.$locale=function(){return N[this.$L]},T.locale=function(k,A){if(!k)return this.$L;var E=this.clone(),O=j(k,A,!0);return O&&(E.$L=O),E},T.clone=function(){return $.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},P}(),B=V.prototype;return F.prototype=B,[["$ms",a],["$s",s],["$m",i],["$H",l],["$W",u],["$M",c],["$y",h],["$D",y]].forEach(function(P){B[P[1]]=function(T){return this.$g(T,P[0],P[1])}}),F.extend=function(P,T){return P.$i||(P(T,V,F),P.$i=!0),F},F.locale=j,F.isDayjs=R,F.unix=function(P){return F(1e3*P)},F.en=N[C],F.Ls=N,F.p={},F})}(Pr)),Pr.exports}var Ux=iu();const kt=Va(Ux);var Ar={exports:{}},qx=Ar.exports,gi;function Vx(){return gi||(gi=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"};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,g){var v=g&&g.toUpperCase();return y||p[g]||n[g]||p[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(b,x,S){return x||S.slice(1)})})}(l,u===void 0?{}:u);return i.call(this,m)}}})}(Ar)),Ar.exports}var Kx=Vx();const cu=Va(Kx);var Ir={exports:{}},Xx=Ir.exports,vi;function Zx(){return vi||(vi=1,function(e,t){(function(n,r){e.exports=r(iu())})(Xx,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})}(Ir)),Ir.exports}Zx();function Qx({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(Nt,{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(Yr,{className:"w-32 h-8 text-sm",children:d.jsx(ha,{})}),d.jsx(Hr,{children:o.map((c,p)=>d.jsx(zr,{value:p.toString(),children:c},c))})]}),d.jsxs(pa,{value:n.toString(),onValueChange:l,children:[d.jsx(Yr,{className:"w-20 h-8 text-sm",children:d.jsx(ha,{})}),d.jsx(Hr,{className:"max-h-[200px]",children:s.map(c=>d.jsx(zr,{value:c.toString(),children:c},c))})]})]}),d.jsx(Nt,{variant:"outline",size:"small",onClick:m,className:"h-7 w-7 p-0",children:d.jsx(Ea,{className:"h-4 w-4"})})]})}kt.extend(cu);const Gr=({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:g,onMonthChange:v,open:b,onOpenChange:x,...S})=>{const[M,C]=w.useState(!1),N=b!==void 0?b:M,D=x||C,R=g??a??new Date,j=F=>{F&&(!a||F.getTime()!==a.getTime())&&(s==null||s(F),D(!1))};return kt.locale(p),d.jsxs("div",{className:L("space-y-1",i),...S,children:[e&&d.jsxs(an,{className:"text-sm font-medium text-gray-700",children:[e,o&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(Wa,{open:N,onOpenChange:D,children:[d.jsx(Ba,{asChild:!0,children:d.jsxs(Nt,{variant:"outline",className:L("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:L("text-left",!a&&"text-muted-foreground"),children:a?kt(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(Qx,{month:R,onMonthChange:v??(()=>{})}),d.jsx("div",{className:"p-3",children:d.jsx(su,{mode:"single",selected:a,onSelect:j,month:R,onMonthChange:v,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:L("text-xs",r?"text-red-500":"text-gray-500"),children:r||n})]})};function Jx({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:s,...i}){const l=qa();return d.jsx(su,{showOutsideDays:n,className:L("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:L("w-fit",l.root),months:L("relative flex flex-col gap-4 md:flex-row",l.months),month:L("flex w-full flex-col gap-4",l.month),nav:L("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",l.nav),button_previous:L(na({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_previous),button_next:L(na({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_next),month_caption:L("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",l.month_caption),dropdowns:L("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",l.dropdowns),dropdown_root:L("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:L("absolute inset-0 opacity-0",l.dropdown),caption_label:L("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:L("flex",l.weekdays),weekday:L("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",l.weekday),week:L("mt-2 flex w-full",l.week),week_number_header:L("w-[--cell-size] select-none",l.week_number_header),week_number:L("text-muted-foreground select-none text-[0.8rem]",l.week_number),day:L("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:L("bg-accent rounded-l-md",l.range_start),range_middle:L("rounded-none",l.range_middle),range_end:L("bg-accent rounded-r-md",l.range_end),today:L("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",l.today),outside:L("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:L("text-muted-foreground opacity-50",l.disabled),hidden:L("invisible",l.hidden),...t},components:{Root:({className:u,rootRef:m,...c})=>d.jsx("div",{"data-slot":"calendar",ref:m,className:L(u),...c}),Chevron:({className:u,orientation:m,...c})=>m==="left"?d.jsx(nc,{className:L("size-4",u),...c}):m==="right"?d.jsx(Ea,{className:L("size-4",u),...c}):d.jsx(er,{className:L("size-4",u),...c}),DayButton:e0,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 e0({className:e,day:t,modifiers:n,...r}){const o=qa(),a=f.useRef(null);return f.useEffect(()=>{var p;n.focused&&((p=a.current)==null||p.focus())},[n.focused]),d.jsx(Nt,{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:L("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 jr={exports:{}},t0=jr.exports,yi;function n0(){return yi||(yi=1,function(e,t){(function(n,r){e.exports=r()})(t0,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(v){return(v=+v)+(v>68?1900:2e3)},m=function(v){return function(b){this[v]=+b}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var x=b.match(/([+-]|\d\d)/g),S=60*x[1]+(+x[2]||0);return S===0?0:x[0]==="+"?-S:S}(v)}],p=function(v){var b=l[v];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(v,b){var x,S=l.meridiem;if(S){for(var M=1;M<=24;M+=1)if(v.indexOf(S(M,0,b))>-1){x=M>12;break}}else x=v===(b?"pm":"PM");return x},y={A:[i,function(v){this.afternoon=h(v,!1)}],a:[i,function(v){this.afternoon=h(v,!0)}],Q:[o,function(v){this.month=3*(v-1)+1}],S:[o,function(v){this.milliseconds=100*+v}],SS:[a,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],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(v){var b=l.ordinal,x=v.match(/\d+/);if(this.day=x[0],b)for(var S=1;S<=31;S+=1)b(S).replace(/\[|\]/g,"")===v&&(this.day=S)}],w:[s,m("week")],ww:[a,m("week")],M:[s,m("month")],MM:[a,m("month")],MMM:[i,function(v){var b=p("months"),x=(p("monthsShort")||b.map(function(S){return S.slice(0,3)})).indexOf(v)+1;if(x<1)throw new Error;this.month=x%12||x}],MMMM:[i,function(v){var b=p("months").indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,m("year")],YY:[a,function(v){this.year=u(v)}],YYYY:[/\d{4}/,m("year")],Z:c,ZZ:c};function g(v){var b,x;b=v,x=l&&l.formats;for(var S=(v=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(F,$,V){var B=V&&V.toUpperCase();return $||x[V]||n[V]||x[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(P,T,k){return T||k.slice(1)})})).match(r),M=S.length,C=0;C<M;C+=1){var N=S[C],D=y[N],R=D&&D[0],j=D&&D[1];S[C]=j?{regex:R,parser:j}:N.replace(/^\[|\]$/g,"")}return function(F){for(var $={},V=0,B=0;V<M;V+=1){var P=S[V];if(typeof P=="string")B+=P.length;else{var T=P.regex,k=P.parser,A=F.slice(B),E=T.exec(A)[0];k.call($,E),F=F.replace(E,"")}}return function(O){var Y=O.afternoon;if(Y!==void 0){var z=O.hours;Y?z<12&&(O.hours+=12):z===12&&(O.hours=0),delete O.afternoon}}($),$}}return function(v,b,x){x.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var S=b.prototype,M=S.parse;S.parse=function(C){var N=C.date,D=C.utc,R=C.args;this.$u=D;var j=R[1];if(typeof j=="string"){var F=R[2]===!0,$=R[3]===!0,V=F||$,B=R[2];$&&(B=R[2]),l=this.$locale(),!F&&B&&(l=x.Ls[B]),this.$d=function(A,E,O,Y){try{if(["x","X"].indexOf(E)>-1)return new Date((E==="X"?1e3:1)*A);var z=g(E)(A),_=z.year,I=z.month,H=z.day,G=z.hours,U=z.minutes,W=z.seconds,Q=z.milliseconds,K=z.zone,X=z.week,se=new Date,ie=H||(_||I?1:se.getDate()),ye=_||se.getFullYear(),J=0;_&&!I||(J=I>0?I-1:se.getMonth());var Pe,Ae=G||0,Me=U||0,Ue=W||0,Ce=Q||0;return K?new Date(Date.UTC(ye,J,ie,Ae,Me,Ue,Ce+60*K.offset*1e3)):O?new Date(Date.UTC(ye,J,ie,Ae,Me,Ue,Ce)):(Pe=new Date(ye,J,ie,Ae,Me,Ue,Ce),X&&(Pe=Y(Pe).week(X).toDate()),Pe)}catch{return new Date("")}}(N,j,D,x),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$L),V&&N!=this.format(j)&&(this.$d=new Date("")),l={}}else if(j instanceof Array)for(var P=j.length,T=1;T<=P;T+=1){R[1]=j[T-1];var k=x.apply(this,R);if(k.isValid()){this.$d=k.$d,this.$L=k.$L,this.init();break}T===P&&(this.$d=new Date(""))}else M.call(this,C)}}})}(jr)),jr.exports}var r0=n0();const o0=Va(r0);kt.extend(o0);kt.extend(cu);const a0={"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-]$/}},s0=({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",inputClassName:p,dateFormat:h="DD/MM/YYYY"})=>{const[y,g]=f.useState(!1),[v,b]=f.useState(""),[x,S]=f.useState(o),M=f.useMemo(()=>h,[h]),C=f.useMemo(()=>a0[M],[M]),N=f.useMemo(()=>t||M.toLowerCase(),[t,M]),D=f.useCallback(P=>{const T=P.replace(/\D/g,""),{separator:k}=C;if(T.length<=2)return T;switch(M){case"MM/DD/YYYY":case"DD/MM/YYYY":return T.length<=4?`${T.substring(0,2)}${k}${T.substring(2)}`:`${T.substring(0,2)}${k}${T.substring(2,4)}${k}${T.substring(4,8)}`;case"YYYY-MM-DD":return T.length<=4?T:T.length<=6?`${T.substring(0,4)}${k}${T.substring(4)}`:`${T.substring(0,4)}${k}${T.substring(4,6)}${k}${T.substring(6,8)}`;case"DD-MM-YYYY":return T.length<=4?`${T.substring(0,2)}${k}${T.substring(2)}`:`${T.substring(0,2)}${k}${T.substring(2,4)}${k}${T.substring(4,8)}`;default:return P}},[M,C]),R=f.useMemo(()=>P=>{const T=P.trim();return T&&kt(T,M,!0).isValid()?kt(T,M):null},[M]),j=f.useCallback(P=>kt(P).format(M),[M]);f.useEffect(()=>{b(o?j(o):""),S(o),kt.locale(c)},[o,c,j]);const F=f.useCallback(P=>{let T=P.target.value;if(b(T),!T.trim()){S(void 0),a==null||a(void 0);return}const k=D(T);k!==T&&T.replace(/\D/g,"").length>1&&(b(k),T=k);const A=R(T);if(A!=null&&A.isValid()){const E=A.toDate();(!i||E>=i)&&(!l||E<=l)&&(S(E),a==null||a(E))}},[D,R,a,i,l]),$=f.useCallback(()=>{x&&b(j(x))},[x,j]),V=f.useCallback(P=>{P&&(b(j(P)),S(P),a==null||a(P),g(!1))},[a,j]),B=f.useCallback(P=>{if(!["Backspace","Delete","Tab","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(P.key)&&!C.pattern.test(P.key)&&!P.ctrlKey&&!P.metaKey){P.preventDefault();return}P.key==="Enter"&&(P.preventDefault(),$())},[C.pattern,$]);return d.jsxs("div",{className:L("space-y-1",s),children:[e&&d.jsxs(an,{className:"text-sm font-medium text-gray-700",children:[e,r&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(Wa,{open:y,onOpenChange:g,children:[d.jsxs("div",{className:L("w-60 relative",p),children:[d.jsx(on,{type:"text",value:v,onChange:F,onBlur:$,onKeyDown:B,placeholder:N,disabled:u,readOnly:m,className:"w-full pr-12"}),d.jsx(Ba,{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:()=>g(P=>!P),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(Jx,{mode:"single",selected:x,onSelect:V,fromDate:i,toDate:l})})]}),n&&d.jsx("p",{className:"text-xs text-gray-500",children:n})]})};function Cn({label:e,placeholder:t="Select option",options:n,value:r,leadingIcon:o,helperText:a,error:s,required:i,onValueChange:l,className:u,variant:m="default",disabled:c=!1}){return d.jsxs("div",{className:L("space-y-1",u),children:[e&&d.jsxs(an,{className:L("text-sm font-medium",c?"text-gray-400":"text-gray-700"),children:[e,i&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(pa,{value:r,onValueChange:l,disabled:c,children:[d.jsx(Yr,{className:L("border-input focus-within:ring-primary",s&&"border-red-500 focus-within:ring-red-500",m==="gray"&&"bg-gray-100 border-gray-300 text-gray-700",c&&"opacity-50 cursor-not-allowed"),children:d.jsxs("div",{className:"flex items-center gap-2 w-full",children:[o&&d.jsx("div",{className:"text-gray-400",children:o}),d.jsx(ha,{placeholder:t})]})}),d.jsx(Hr,{children:n.map(p=>d.jsx(zr,{value:p.value,children:p.label},p.value))})]}),(a||s)&&d.jsx("p",{className:L("text-xs",s?"text-red-500":c?"text-gray-400":"text-gray-500"),children:s||a})]})}const i0=({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"}},g=u?"opacity-50 cursor-not-allowed":"cursor-pointer",v=s&&!u?"hover:shadow-md":"",b=`
|
|
172
172
|
${p}
|
|
173
173
|
${h[r]}
|
|
174
174
|
${y[n][t]}
|
|
175
|
-
${v}
|
|
176
175
|
${g}
|
|
176
|
+
${v}
|
|
177
177
|
${m}
|
|
178
|
-
`.trim(),x=C=>{!u&&i&&i(C)},S=C=>{C.stopPropagation(),!u&&a&&a(C)},D=r==="small"?12:r==="large"?18:14;return d.jsxs("div",{className:b,onClick:x,...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}),s&&!l&&d.jsx("div",{className:"flex items-center",children:w.isValidElement(s)?w.cloneElement(s,{size:D}):s}),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(En,{size:D})})]})},c0={small:"h-8 text-sm",medium:"h-10",large:"h-12 text-base"},l0={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(on,{placeholder:n,className:B("pl-12 rounded-full",c0[e],l0[t],r),onChange:o,value:a})]}),u0=[{value:"all",label:"All Categories"},{value:"electronics",label:"Electronics"},{value:"clothing",label:"Clothing"},{value:"books",label:"Books"}],d0=[{value:"newest",label:"Newest First"},{value:"oldest",label:"Oldest First"},{value:"name-asc",label:"Name A-Z"},{value:"name-desc",label:"Name Z-A"}],f0=({className:e,searchPlaceholder:t="Search...",categories:n=u0,sortOptions:r=d0,showDateFilter:o=!1,onSearch:a,onFilter:i,onClear:s,defaultFilters:l})=>{const[u,m]=w.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]=w.useState(!1),[h,y]=w.useState(!1),[v,g]=w.useState(u.dateFrom??new Date),[b,x]=w.useState(u.dateTo??new Date),S=(R,M)=>{const N={...u,[R]:M};m(N),i==null||i(N)},D=()=>{m({category:"",sort:"",dateFrom:void 0,dateTo:void 0}),s==null||s()},C=Object.values(u).some(R=>R!==""&&R!==void 0);return d.jsxs("div",{className:B("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(ch,{className:"h-4 w-4 text-gray-500"}),d.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Filters:"})]}),d.jsx(Cn,{placeholder:"Category",options:n,onValueChange:R=>S("category",R),className:"min-w-[140px]"}),d.jsx(Cn,{placeholder:"Sort by",options:r,onValueChange:R=>S("sort",R),className:"min-w-[140px]"}),o&&d.jsxs(d.Fragment,{children:[d.jsx(Gr,{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(Gr,{placeholder:"To date",value:u.dateTo,onSelect:R=>{S("dateTo",R),x(R??b)},className:"min-w-[140px]",open:h,onOpenChange:y,month:b,onMonthChange:x})]}),C&&d.jsxs(Rt,{variant:"outline",size:"small",onClick:D,className:"flex items-center gap-1",children:[d.jsx(En,{className:"h-3 w-3"}),"Clear"]})]})]})},m0=[{value:"personal",label:"Personal Account"},{value:"business",label:"Business Account"},{value:"developer",label:"Developer Account"}];function p0({className:e,showDateOfBirth:t=!0,accountTypes:n=m0,onValueChange:r}){const[o,a]=w.useState(),[i,s]=w.useState(!1),[l,u]=w.useState(!1),[m,c]=w.useState(!1),[p,h]=w.useState(o??new Date),[y,v]=w.useState(""),[g,b]=w.useState("");return d.jsxs("div",{className:B("space-y-4",e),children:[d.jsx(rt,{label:"Username",placeholder:"Choose a username",helperText:"Must be at least 3 characters long",required:!0,onChange:x=>r==null?void 0:r("username",x.target.value)}),d.jsx(rt,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:d.jsx(oc,{className:"h-4 w-4"}),required:!0,onChange:x=>r==null?void 0:r("email",x.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:x=>{v(x),r==null||r("password",x)},showPassword:i,onShowPasswordChange:s}),d.jsx(ra,{label:"Confirm Password",placeholder:"Confirm your password",required:!0,value:g,onChange:x=>{b(x),r==null||r("confirmPassword",x)},showPassword:l,onShowPasswordChange:u})]}),d.jsx(Cn,{label:"Account Type",placeholder:"Select account type",options:n,leadingIcon:d.jsx(Sh,{className:"h-4 w-4"}),required:!0,onValueChange:x=>r==null?void 0:r("accountType",x)}),t&&d.jsx(Gr,{label:"Date of Birth",placeholder:"Select your birth date",helperText:"Must be 18 or older",value:o,maxDate:new Date,onSelect:x=>{a(x),h(x??p),x&&(r==null||r("dateOfBirth",x))},open:m,onOpenChange:c,month:p,onMonthChange:h})]})}const h0=[{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 g0({className:e,countries:t=h0,onValueChange:n}){return d.jsxs("div",{className:B("space-y-4",e),children:[d.jsx(rt,{label:"Street Address",placeholder:"Enter street address",required:!0,onChange:r=>n==null?void 0:n("streetAddress",r.target.value)}),d.jsx(rt,{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(rt,{label:"City",placeholder:"Enter city",required:!0,onChange:r=>n==null?void 0:n("city",r.target.value)}),d.jsx(rt,{label:"State/Province",placeholder:"Enter state",required:!0,onChange:r=>n==null?void 0:n("state",r.target.value)}),d.jsx(rt,{label:"ZIP/Postal Code",placeholder:"Enter ZIP code",required:!0,onChange:r=>n==null?void 0:n("zipCode",r.target.value)})]}),d.jsx(Cn,{label:"Country",placeholder:"Select country",options:t,leadingIcon:d.jsx(mh,{className:"h-4 w-4"}),required:!0,onValueChange:r=>n==null?void 0:n("country",r)})]})}const v0=[{value:"sales",label:"Sales"},{value:"support",label:"Support"},{value:"general",label:"General Inquiry"}];function y0({className:e,showDepartment:t=!0,departmentOptions:n=v0,onValueChange:r}){return d.jsxs("div",{className:B("space-y-4",e),children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsx(rt,{label:"First Name",placeholder:"Enter first name",required:!0,onChange:o=>r==null?void 0:r("firstName",o.target.value)}),d.jsx(rt,{label:"Last Name",placeholder:"Enter last name",required:!0,onChange:o=>r==null?void 0:r("lastName",o.target.value)})]}),d.jsx(rt,{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(rt,{label:"Phone Number",type:"tel",placeholder:"+1 (555) 000-0000",icon:d.jsx(vh,{className:"h-4 w-4"}),onChange:o=>r==null?void 0:r("phone",o.target.value)}),t&&d.jsx(Cn,{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(Na,{label:"Message",placeholder:"How can we help you?",required:!0,onChange:o=>r==null?void 0:r("message",o.target.value)})]})}var bi=1,b0=.9,w0=.8,x0=.17,Ho=.1,zo=.999,S0=.9999,C0=.99,M0=/[\\\/_+.#"@\[\(\{&]/,D0=/[\\\/_+.#"@\[\(\{&]/g,k0=/[\s-]/,uu=/[\s-]/g;function va(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?bi:C0;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];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,i),c>m&&(u===o?c*=bi:M0.test(e.charAt(u-1))?(c*=w0,h=e.slice(o,u-1).match(D0),h&&o>0&&(c*=Math.pow(zo,h.length))):k0.test(e.charAt(u-1))?(c*=b0,y=e.slice(o,u-1).match(uu),y&&o>0&&(c*=Math.pow(zo,y.length))):(c*=x0,o>0&&(c*=Math.pow(zo,u-o))),e.charAt(u)!==t.charAt(a)&&(c*=S0)),(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,i),p*Ho>c&&(c=p*Ho)),c>m&&(m=c),u=n.indexOf(l,u+1);return i[s]=m,m}function wi(e){return e.toLowerCase().replace(uu," ")}function E0(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,va(e,t,wi(e),wi(t),0,0,{})}var po="Dialog",[du,mD]=ze(po),[N0,ft]=du(po),fu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=f.useRef(null),l=f.useRef(null),[u,m]=st({prop:r,defaultProp:o??!1,onChange:a,caller:po});return d.jsx(N0,{scope:t,triggerRef:s,contentRef:l,contentId:_e(),titleId:_e(),descriptionId:_e(),open:u,onOpenChange:m,onOpenToggle:f.useCallback(()=>m(c=>!c),[m]),modal:i,children:n})};fu.displayName=po;var mu="DialogTrigger",pu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(mu,n),a=he(t,o.triggerRef);return d.jsx(te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Za(o.open),...r,ref:a,onClick:Z(e.onClick,o.onOpenToggle)})});pu.displayName=mu;var Ka="DialogPortal",[R0,hu]=du(Ka,{forceMount:void 0}),gu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ft(Ka,t);return d.jsx(R0,{scope:t,forceMount:n,children:f.Children.map(r,i=>d.jsx(Ue,{present:n||a.open,children:d.jsx(ar,{asChild:!0,container:o,children:i})}))})};gu.displayName=Ka;var Ur="DialogOverlay",vu=f.forwardRef((e,t)=>{const n=hu(Ur,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ft(Ur,e.__scopeDialog);return a.modal?d.jsx(Ue,{present:r||a.open,children:d.jsx(_0,{...o,ref:t})}):null});vu.displayName=Ur;var T0=Ft("DialogOverlay.RemoveScroll"),_0=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Ur,n);return d.jsx(sr,{as:T0,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(te.div,{"data-state":Za(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),nn="DialogContent",yu=f.forwardRef((e,t)=>{const n=hu(nn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ft(nn,e.__scopeDialog);return d.jsx(Ue,{present:r||a.open,children:a.modal?d.jsx(O0,{...o,ref:t}):d.jsx(P0,{...o,ref:t})})});yu.displayName=nn;var O0=f.forwardRef((e,t)=>{const n=ft(nn,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:Z(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:Z(e.onFocusOutside,a=>a.preventDefault())})}),P0=f.forwardRef((e,t)=>{const n=ft(nn,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(bu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.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 i=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&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,...i}=e,s=ft(nn,n),l=f.useRef(null),u=he(t,l);return Jr(),d.jsxs(d.Fragment,{children:[d.jsx(tr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(Nn,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Za(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(A0,{titleId:s.titleId}),d.jsx(j0,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Xa="DialogTitle",wu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Xa,n);return d.jsx(te.h2,{id:o.titleId,...r,ref:t})});wu.displayName=Xa;var xu="DialogDescription",Su=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(xu,n);return d.jsx(te.p,{id:o.descriptionId,...r,ref:t})});Su.displayName=xu;var Cu="DialogClose",Mu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Cu,n);return d.jsx(te.button,{type:"button",...r,ref:t,onClick:Z(e.onClick,()=>o.onOpenChange(!1))})});Mu.displayName=Cu;function Za(e){return e?"open":"closed"}var Du="DialogTitleWarning",[pD,ku]=Mh(Du,{contentName:nn,titleName:Xa,docsSlug:"dialog"}),A0=({titleId:e})=>{const t=ku(Du),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
178
|
+
`.trim(),x=C=>{!u&&s&&s(C)},S=C=>{C.stopPropagation(),!u&&a&&a(C)},M=r==="small"?12:r==="large"?18:14;return d.jsxs("div",{className:b,onClick:x,...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:w.isValidElement(i)?w.cloneElement(i,{size:M}):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(En,{size:M})})]})},c0={small:"h-8 text-sm",medium:"h-10",large:"h-12 text-base"},l0={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="",disabled:s})=>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(on,{placeholder:n,className:L("pl-12 rounded-full",c0[e],l0[t],r),onChange:o,value:a,disabled:s})]}),u0=[{value:"all",label:"All Categories"},{value:"electronics",label:"Electronics"},{value:"clothing",label:"Clothing"},{value:"books",label:"Books"}],d0=[{value:"newest",label:"Newest First"},{value:"oldest",label:"Oldest First"},{value:"name-asc",label:"Name A-Z"},{value:"name-desc",label:"Name Z-A"}],f0=({className:e,searchPlaceholder:t="Search...",categories:n=u0,sortOptions:r=d0,showDateFilter:o=!1,onSearch:a,onFilter:s,onClear:i,defaultFilters:l})=>{const[u,m]=w.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]=w.useState(!1),[h,y]=w.useState(!1),[g,v]=w.useState(u.dateFrom??new Date),[b,x]=w.useState(u.dateTo??new Date),S=(N,D)=>{const R={...u,[N]:D};m(R),s==null||s(R)},M=()=>{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:L("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(ch,{className:"h-4 w-4 text-gray-500"}),d.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Filters:"})]}),d.jsx(Cn,{placeholder:"Category",options:n,onValueChange:N=>S("category",N),className:"min-w-[140px]"}),d.jsx(Cn,{placeholder:"Sort by",options:r,onValueChange:N=>S("sort",N),className:"min-w-[140px]"}),o&&d.jsxs(d.Fragment,{children:[d.jsx(Gr,{placeholder:"From date",value:u.dateFrom,onSelect:N=>{S("dateFrom",N),v(N??g)},className:"min-w-[140px]",open:c,onOpenChange:p,month:g,onMonthChange:v}),d.jsx(Gr,{placeholder:"To date",value:u.dateTo,onSelect:N=>{S("dateTo",N),x(N??b)},className:"min-w-[140px]",open:h,onOpenChange:y,month:b,onMonthChange:x})]}),C&&d.jsxs(Nt,{variant:"outline",size:"small",onClick:M,className:"flex items-center gap-1",children:[d.jsx(En,{className:"h-3 w-3"}),"Clear"]})]})]})},m0=[{value:"personal",label:"Personal Account"},{value:"business",label:"Business Account"},{value:"developer",label:"Developer Account"}];function p0({className:e,showDateOfBirth:t=!0,accountTypes:n=m0,onValueChange:r}){const[o,a]=w.useState(),[s,i]=w.useState(!1),[l,u]=w.useState(!1),[m,c]=w.useState(!1),[p,h]=w.useState(o??new Date),[y,g]=w.useState(""),[v,b]=w.useState("");return d.jsxs("div",{className:L("space-y-4",e),children:[d.jsx(tt,{label:"Username",placeholder:"Choose a username",helperText:"Must be at least 3 characters long",required:!0,onChange:x=>r==null?void 0:r("username",x.target.value)}),d.jsx(tt,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:d.jsx(oc,{className:"h-4 w-4"}),required:!0,onChange:x=>r==null?void 0:r("email",x.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:x=>{g(x),r==null||r("password",x)},showPassword:s,onShowPasswordChange:i}),d.jsx(ra,{label:"Confirm Password",placeholder:"Confirm your password",required:!0,value:v,onChange:x=>{b(x),r==null||r("confirmPassword",x)},showPassword:l,onShowPasswordChange:u})]}),d.jsx(Cn,{label:"Account Type",placeholder:"Select account type",options:n,leadingIcon:d.jsx(Sh,{className:"h-4 w-4"}),required:!0,onValueChange:x=>r==null?void 0:r("accountType",x)}),t&&d.jsx(Gr,{label:"Date of Birth",placeholder:"Select your birth date",helperText:"Must be 18 or older",value:o,maxDate:new Date,onSelect:x=>{a(x),h(x??p),x&&(r==null||r("dateOfBirth",x))},open:m,onOpenChange:c,month:p,onMonthChange:h})]})}const h0=[{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 g0({className:e,countries:t=h0,onValueChange:n}){return d.jsxs("div",{className:L("space-y-4",e),children:[d.jsx(tt,{label:"Street Address",placeholder:"Enter street address",required:!0,onChange:r=>n==null?void 0:n("streetAddress",r.target.value)}),d.jsx(tt,{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(tt,{label:"City",placeholder:"Enter city",required:!0,onChange:r=>n==null?void 0:n("city",r.target.value)}),d.jsx(tt,{label:"State/Province",placeholder:"Enter state",required:!0,onChange:r=>n==null?void 0:n("state",r.target.value)}),d.jsx(tt,{label:"ZIP/Postal Code",placeholder:"Enter ZIP code",required:!0,onChange:r=>n==null?void 0:n("zipCode",r.target.value)})]}),d.jsx(Cn,{label:"Country",placeholder:"Select country",options:t,leadingIcon:d.jsx(mh,{className:"h-4 w-4"}),required:!0,onValueChange:r=>n==null?void 0:n("country",r)})]})}const v0=[{value:"sales",label:"Sales"},{value:"support",label:"Support"},{value:"general",label:"General Inquiry"}];function y0({className:e,showDepartment:t=!0,departmentOptions:n=v0,onValueChange:r}){return d.jsxs("div",{className:L("space-y-4",e),children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsx(tt,{label:"First Name",placeholder:"Enter first name",required:!0,onChange:o=>r==null?void 0:r("firstName",o.target.value)}),d.jsx(tt,{label:"Last Name",placeholder:"Enter last name",required:!0,onChange:o=>r==null?void 0:r("lastName",o.target.value)})]}),d.jsx(tt,{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(tt,{label:"Phone Number",type:"tel",placeholder:"+1 (555) 000-0000",icon:d.jsx(vh,{className:"h-4 w-4"}),onChange:o=>r==null?void 0:r("phone",o.target.value)}),t&&d.jsx(Cn,{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(Na,{label:"Message",placeholder:"How can we help you?",required:!0,onChange:o=>r==null?void 0:r("message",o.target.value)})]})}var bi=1,b0=.9,w0=.8,x0=.17,Ho=.1,zo=.999,S0=.9999,C0=.99,M0=/[\\\/_+.#"@\[\(\{&]/,D0=/[\\\/_+.#"@\[\(\{&]/g,k0=/[\s-]/,uu=/[\s-]/g;function va(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?bi:C0;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*=bi:M0.test(e.charAt(u-1))?(c*=w0,h=e.slice(o,u-1).match(D0),h&&o>0&&(c*=Math.pow(zo,h.length))):k0.test(e.charAt(u-1))?(c*=b0,y=e.slice(o,u-1).match(uu),y&&o>0&&(c*=Math.pow(zo,y.length))):(c*=x0,o>0&&(c*=Math.pow(zo,u-o))),e.charAt(u)!==t.charAt(a)&&(c*=S0)),(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 wi(e){return e.toLowerCase().replace(uu," ")}function E0(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,va(e,t,wi(e),wi(t),0,0,{})}var po="Dialog",[du,mD]=He(po),[N0,ft]=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]=ot({prop:r,defaultProp:o??!1,onChange:a,caller:po});return d.jsx(N0,{scope:t,triggerRef:i,contentRef:l,contentId:Ne(),titleId:Ne(),descriptionId:Ne(),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=ft(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":Za(o.open),...r,ref:a,onClick:Z(e.onClick,o.onOpenToggle)})});pu.displayName=mu;var Ka="DialogPortal",[R0,hu]=du(Ka,{forceMount:void 0}),gu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ft(Ka,t);return d.jsx(R0,{scope:t,forceMount:n,children:f.Children.map(r,s=>d.jsx(Ge,{present:n||a.open,children:d.jsx(ar,{asChild:!0,container:o,children:s})}))})};gu.displayName=Ka;var Ur="DialogOverlay",vu=f.forwardRef((e,t)=>{const n=hu(Ur,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ft(Ur,e.__scopeDialog);return a.modal?d.jsx(Ge,{present:r||a.open,children:d.jsx(_0,{...o,ref:t})}):null});vu.displayName=Ur;var T0=Lt("DialogOverlay.RemoveScroll"),_0=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Ur,n);return d.jsx(sr,{as:T0,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(ee.div,{"data-state":Za(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),nn="DialogContent",yu=f.forwardRef((e,t)=>{const n=hu(nn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ft(nn,e.__scopeDialog);return d.jsx(Ge,{present:r||a.open,children:a.modal?d.jsx(O0,{...o,ref:t}):d.jsx(P0,{...o,ref:t})})});yu.displayName=nn;var O0=f.forwardRef((e,t)=>{const n=ft(nn,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:Z(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:Z(e.onFocusOutside,a=>a.preventDefault())})}),P0=f.forwardRef((e,t)=>{const n=ft(nn,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=ft(nn,n),l=f.useRef(null),u=he(t,l);return Jr(),d.jsxs(d.Fragment,{children:[d.jsx(tr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(Nn,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Za(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(A0,{titleId:i.titleId}),d.jsx(j0,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Xa="DialogTitle",wu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Xa,n);return d.jsx(ee.h2,{id:o.titleId,...r,ref:t})});wu.displayName=Xa;var xu="DialogDescription",Su=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(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=ft(Cu,n);return d.jsx(ee.button,{type:"button",...r,ref:t,onClick:Z(e.onClick,()=>o.onOpenChange(!1))})});Mu.displayName=Cu;function Za(e){return e?"open":"closed"}var Du="DialogTitleWarning",[pD,ku]=Mh(Du,{contentName:nn,titleName:Xa,docsSlug:"dialog"}),A0=({titleId:e})=>{const t=ku(Du),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
179
179
|
|
|
180
180
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
181
181
|
|
|
182
|
-
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},I0="DialogDescriptionWarning",j0=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ku(I0).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},Qa=fu,Eu=pu,Ja=gu,ho=vu,go=yu,es=wu,ts=Su,ns=Mu,Fn='[cmdk-group=""]',Go='[cmdk-group-items=""]',$0='[cmdk-group-heading=""]',Nu='[cmdk-item=""]',xi=`${Nu}:not([aria-disabled="true"])`,ya="cmdk-item-select",gn="data-value",L0=(e,t,n)=>E0(e,t,n),Ru=f.createContext(void 0),fr=()=>f.useContext(Ru),Tu=f.createContext(void 0),rs=()=>f.useContext(Tu),_u=f.createContext(void 0),Ou=f.forwardRef((e,t)=>{let n=vn(()=>{var T,j;return{search:"",value:(j=(T=e.value)!=null?T:e.defaultValue)!=null?j:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=vn(()=>new Set),o=vn(()=>new Map),a=vn(()=>new Map),i=vn(()=>new Set),s=Pu(e),{label:l,children:u,value:m,onValueChange:c,filter:p,shouldFilter:h,loop:y,disablePointerSelection:v=!1,vimBindings:g=!0,...b}=e,x=_e(),S=_e(),D=_e(),C=f.useRef(null),R=K0();rn(()=>{if(m!==void 0){let T=m.trim();n.current.value=T,M.emit()}},[m]),rn(()=>{R(6,I)},[]);let M=f.useMemo(()=>({subscribe:T=>(i.current.add(T),()=>i.current.delete(T)),snapshot:()=>n.current,setState:(T,j,H)=>{var G,V,L,K;if(!Object.is(n.current[T],j)){if(n.current[T]=j,T==="search")q(),F(),R(1,W);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(D);X?X.focus():(G=document.getElementById(x))==null||G.focus()}if(R(7,()=>{var X;n.current.selectedItemId=(X=_())==null?void 0:X.id,M.emit()}),H||R(5,I),((V=s.current)==null?void 0:V.value)!==void 0){let X=j??"";(K=(L=s.current).onValueChange)==null||K.call(L,X);return}}M.emit()}},emit:()=>{i.current.forEach(T=>T())}}),[]),N=f.useMemo(()=>({value:(T,j,H)=>{var G;j!==((G=a.current.get(T))==null?void 0:G.value)&&(a.current.set(T,{value:j,keywords:H}),n.current.filtered.items.set(T,$(j,H)),R(2,()=>{F(),M.emit()}))},item:(T,j)=>(r.current.add(T),j&&(o.current.has(j)?o.current.get(j).add(T):o.current.set(j,new Set([T]))),R(3,()=>{q(),F(),n.current.value||W(),M.emit()}),()=>{a.current.delete(T),r.current.delete(T),n.current.filtered.items.delete(T);let H=_();R(4,()=>{q(),(H==null?void 0:H.getAttribute("id"))===T&&W(),M.emit()})}),group:T=>(o.current.has(T)||o.current.set(T,new Set),()=>{a.current.delete(T),o.current.delete(T)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:x,inputId:D,labelId:S,listInnerRef:C}),[]);function $(T,j){var H,G;let V=(G=(H=s.current)==null?void 0:H.filter)!=null?G:L0;return T?V(T,n.current.search,j):0}function F(){if(!n.current.search||s.current.shouldFilter===!1)return;let T=n.current.filtered.items,j=[];n.current.filtered.groups.forEach(G=>{let V=o.current.get(G),L=0;V.forEach(K=>{let X=T.get(K);L=Math.max(X,L)}),j.push([G,L])});let H=C.current;O().sort((G,V)=>{var L,K;let X=G.getAttribute("id"),Q=V.getAttribute("id");return((L=T.get(Q))!=null?L:0)-((K=T.get(X))!=null?K:0)}).forEach(G=>{let V=G.closest(Go);V?V.appendChild(G.parentElement===V?G:G.closest(`${Go} > *`)):H.appendChild(G.parentElement===H?G:G.closest(`${Go} > *`))}),j.sort((G,V)=>V[1]-G[1]).forEach(G=>{var V;let L=(V=C.current)==null?void 0:V.querySelector(`${Fn}[${gn}="${encodeURIComponent(G[0])}"]`);L==null||L.parentElement.appendChild(L)})}function W(){let T=O().find(H=>H.getAttribute("aria-disabled")!=="true"),j=T==null?void 0:T.getAttribute(gn);M.setState("value",j||void 0)}function q(){var T,j,H,G;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let V=0;for(let L of r.current){let K=(j=(T=a.current.get(L))==null?void 0:T.value)!=null?j:"",X=(G=(H=a.current.get(L))==null?void 0:H.keywords)!=null?G:[],Q=$(K,X);n.current.filtered.items.set(L,Q),Q>0&&V++}for(let[L,K]of o.current)for(let X of K)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(L);break}n.current.filtered.count=V}function I(){var T,j,H;let G=_();G&&(((T=G.parentElement)==null?void 0:T.firstChild)===G&&((H=(j=G.closest(Fn))==null?void 0:j.querySelector($0))==null||H.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function _(){var T;return(T=C.current)==null?void 0:T.querySelector(`${Nu}[aria-selected="true"]`)}function O(){var T;return Array.from(((T=C.current)==null?void 0:T.querySelectorAll(xi))||[])}function E(T){let j=O()[T];j&&M.setState("value",j.getAttribute(gn))}function A(T){var j;let H=_(),G=O(),V=G.findIndex(K=>K===H),L=G[V+T];(j=s.current)!=null&&j.loop&&(L=V+T<0?G[G.length-1]:V+T===G.length?G[0]:G[V+T]),L&&M.setState("value",L.getAttribute(gn))}function k(T){let j=_(),H=j==null?void 0:j.closest(Fn),G;for(;H&&!G;)H=T>0?q0(H,Fn):V0(H,Fn),G=H==null?void 0:H.querySelector(xi);G?M.setState("value",G.getAttribute(gn)):A(T)}let P=()=>E(O().length-1),Y=T=>{T.preventDefault(),T.metaKey?P():T.altKey?k(1):A(1)},z=T=>{T.preventDefault(),T.metaKey?E(0):T.altKey?k(-1):A(-1)};return f.createElement(te.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:T=>{var j;(j=b.onKeyDown)==null||j.call(b,T);let H=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||H))switch(T.key){case"n":case"j":{g&&T.ctrlKey&&Y(T);break}case"ArrowDown":{Y(T);break}case"p":case"k":{g&&T.ctrlKey&&z(T);break}case"ArrowUp":{z(T);break}case"Home":{T.preventDefault(),E(0);break}case"End":{T.preventDefault(),P();break}case"Enter":{T.preventDefault();let G=_();if(G){let V=new Event(ya);G.dispatchEvent(V)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:Z0},l),vo(e,T=>f.createElement(Tu.Provider,{value:M},f.createElement(Ru.Provider,{value:N},T))))}),F0=f.forwardRef((e,t)=>{var n,r;let o=_e(),a=f.useRef(null),i=f.useContext(_u),s=fr(),l=Pu(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;rn(()=>{if(!u)return s.item(o,i==null?void 0:i.id)},[u]);let m=Au(o,a,[e.value,e.children,a],e.keywords),c=rs(),p=Yt(R=>R.value&&R.value===m.current),h=Yt(R=>u||s.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:x,forceMount:S,keywords:D,...C}=e;return f.createElement(te.div,{ref:Nt(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!p,"data-disabled":!!g,"data-selected":!!p,onPointerMove:g||s.getDisablePointerSelection()?void 0:v,onClick:g?void 0:y},e.children)}),W0=f.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=_e(),s=f.useRef(null),l=f.useRef(null),u=_e(),m=fr(),c=Yt(h=>o||m.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);rn(()=>m.group(i),[]),Au(i,s,[e.value,e.heading,l]);let p=f.useMemo(()=>({id:i,forceMount:o}),[o]);return f.createElement(te.div,{ref:Nt(s,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))))}),B0=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=Yt(i=>!i.search);return!n&&!a?null:f.createElement(te.div,{ref:Nt(o,t),...r,"cmdk-separator":"",role:"separator"})}),Y0=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=rs(),i=Yt(u=>u.search),s=Yt(u=>u.selectedItemId),l=fr();return f.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),f.createElement(te.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":s,id:l.inputId,type:"text",value:o?e.value:i,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),H0=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),i=f.useRef(null),s=Yt(u=>u.selectedItemId),l=fr();return f.useEffect(()=>{if(i.current&&a.current){let u=i.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(te.div,{ref:Nt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},vo(e,u=>f.createElement("div",{ref:Nt(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),z0=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return f.createElement(Qa,{open:n,onOpenChange:r},f.createElement(Ja,{container:i},f.createElement(ho,{"cmdk-overlay":"",className:o}),f.createElement(go,{"aria-label":e.label,"cmdk-dialog":"",className:a},f.createElement(Ou,{ref:t,...s}))))}),G0=f.forwardRef((e,t)=>Yt(n=>n.filtered.count===0)?f.createElement(te.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),U0=f.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return f.createElement(te.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},vo(e,i=>f.createElement("div",{"aria-hidden":!0},i)))}),Ye=Object.assign(Ou,{List:H0,Item:F0,Input:Y0,Group:W0,Separator:B0,Dialog:z0,Empty:G0,Loading:U0});function q0(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function V0(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 rn(()=>{t.current=e}),t}var rn=typeof window>"u"?f.useEffect:f.useLayoutEffect;function vn(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function Yt(e){let t=rs(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function Au(e,t,n,r=[]){let o=f.useRef(),a=fr();return rn(()=>{var i;let s=(()=>{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,s,l),(i=t.current)==null||i.setAttribute(gn,s),o.current=s}),o}var K0=()=>{let[e,t]=f.useState(),n=vn(()=>new Map);return rn(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function X0(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(X0(t),{ref:t.ref},n(t.props.children)):n(t)}var Z0={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Q0=Qa,J0=Eu,e1=Ja,t1=ns,Iu=f.forwardRef(({className:e,...t},n)=>d.jsx(ho,{ref:n,className:B("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(e1,{children:[d.jsx(Iu,{}),d.jsxs(go,{ref:r,className:B("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(ns,{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(En,{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:B("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:B("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(es,{ref:n,className:B("text-lg font-semibold leading-none tracking-tight",e),...t}));Fu.displayName=es.displayName;const Wu=f.forwardRef(({className:e,...t},n)=>d.jsx(ts,{ref:n,className:B("text-sm text-muted-foreground",e),...t}));Wu.displayName=ts.displayName;const n1=f.forwardRef(({className:e,...t},n)=>d.jsx(Ye,{ref:n,className:B("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));n1.displayName=Ye.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(Ye.Input,{ref:n,className:B("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=Ye.Input.displayName;const Yu=f.forwardRef(({className:e,...t},n)=>d.jsx(Ye.List,{ref:n,className:B("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Yu.displayName=Ye.List.displayName;const r1=f.forwardRef((e,t)=>d.jsx(Ye.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));r1.displayName=Ye.Empty.displayName;const Hu=f.forwardRef(({className:e,...t},n)=>d.jsx(Ye.Group,{ref:n,className:B("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=Ye.Group.displayName;const o1=f.forwardRef(({className:e,...t},n)=>d.jsx(Ye.Separator,{ref:n,className:B("-mx-1 h-px bg-border",e),...t}));o1.displayName=Ye.Separator.displayName;const zu=f.forwardRef(({className:e,...t},n)=>d.jsx(Ye.Item,{ref:n,className:B("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=Ye.Item.displayName;function a1({className:e,...t}){return d.jsx("div",{className:B("animate-pulse rounded-md bg-muted",e),...t})}function s1(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 i1=({options:e,placeholder:t,emptyMessage:n,value:r,onValueChange:o,disabled:a,isLoading:i=!1,className:s,size:l,variant:u})=>{const{variantClasses:m,combined:c}=s1(l,u),p=w.useRef(null),[h,y]=w.useState(!1),[v,g]=w.useState(r),[b,x]=w.useState((r==null?void 0:r.label)||""),S=w.useCallback(R=>{const M=p.current;if(M){if(h||y(!0),R.key==="Enter"&&M.value!==""){const N=e.find($=>$.label===M.value);N&&(g(N),o==null||o(N))}R.key==="Escape"&&M.blur()}},[h,e,o]),D=w.useCallback(()=>{y(!1),x((v==null?void 0:v.label)||"")},[v]),C=w.useCallback(R=>{x(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(Ye,{onKeyDown:S,children:[d.jsxs("div",{className:B("rounded-full border bg-gray-100",m,s),children:[" ",d.jsx(Bu,{ref:p,value:b,onValueChange:i?void 0:x,onBlur:D,onFocus:()=>y(!0),placeholder:t,disabled:a,className:c})]}),d.jsx("div",{className:"relative mt-1",children:d.jsx("div",{className:B("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",s),children:d.jsxs(Yu,{className:"rounded-lg ring-1 ring-slate-200 dark:ring-gray-700",children:[i?d.jsx(Ye.Loading,{children:d.jsx("div",{className:"p-1",children:d.jsx(a1,{className:"h-8 w-full"})})}):null,e.length>0&&!i?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:N=>{N.preventDefault(),N.stopPropagation()},onSelect:()=>C(R),className:B("flex w-full items-center gap-2 dark:text-white",M?null:"pl-8"),children:[M?d.jsx(Jn,{className:"w-4"}):null,R.label]},R.value)})}):null,i?null:d.jsx(Ye.Empty,{className:"select-none rounded-sm px-2 py-3 text-center text-sm dark:text-gray-400",children:n})]})})})]})},c1=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 l1({className:e,variant:t,...n}){return d.jsx("div",{className:B(c1({variant:t}),e),...n})}function u1({title:e,children:t,className:n}){return d.jsxs("section",{className:B("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 d1({title:e,variant:t="primary",children:n,className:r}){return d.jsxs("div",{className:B("space-y-4",r),children:[d.jsx(l1,{variant:t==="primary"?"default":"secondary",className:B(t==="primary"&&"bg-black text-white hover:bg-black/90"),children:e}),n]})}const Gu=w.forwardRef(({className:e,label:t,helperText:n,error:r,startAdornment:o,endAdornment:a,required:i,id:s,onInput:l,...u},m)=>{const c=!!r,p=s||`currency-input-${Math.random().toString(36).substr(2,9)}`,h=y=>{var x;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("")),((x=b[1])==null?void 0:x.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,i&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs("div",{className:B("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:B("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:B("text-xs",c?"text-red-500":"text-muted-foreground"),children:r||n})]})});Gu.displayName="CurrencyInput";const f1={small:"h-8 text-xs px-2",medium:"h-10 text-sm px-3",large:"h-12 text-base px-4"},m1={outlined:"border border-input",filled:"border-0 bg-accent",standard:"border-0 border-b border-input rounded-none"},p1=(e,t)=>t&&typeof e=="object"&&e!==null?e[t.text]:typeof e=="string"?e:(e==null?void 0:e.label)||"",h1=(e,t)=>t&&typeof e=="object"&&e!==null?e[t.value]:typeof e=="string"?e:(e==null?void 0:e.value)||e,g1=(e,t,n,r)=>n(e,r)===n(t,r),v1=(e,t,n,r)=>{if(!t)return e;const o=t.toLowerCase();return e.filter(a=>n(a,r).toLowerCase().includes(o))},Uu=w.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 qu=e=>{const{option:t,index:n,isSelected:r,isHighlighted:o,onSelect:a,getOptionLabel:i,renderOption:s}=e,l=w.useCallback(()=>{a(t)},[t,a]);return d.jsx("div",{onClick:l,className:`
|
|
182
|
+
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},I0="DialogDescriptionWarning",j0=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ku(I0).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},Qa=fu,Eu=pu,Ja=gu,ho=vu,go=yu,es=wu,ts=Su,ns=Mu,Fn='[cmdk-group=""]',Go='[cmdk-group-items=""]',$0='[cmdk-group-heading=""]',Nu='[cmdk-item=""]',xi=`${Nu}:not([aria-disabled="true"])`,ya="cmdk-item-select",gn="data-value",L0=(e,t,n)=>E0(e,t,n),Ru=f.createContext(void 0),fr=()=>f.useContext(Ru),Tu=f.createContext(void 0),rs=()=>f.useContext(Tu),_u=f.createContext(void 0),Ou=f.forwardRef((e,t)=>{let n=vn(()=>{var _,I;return{search:"",value:(I=(_=e.value)!=null?_:e.defaultValue)!=null?I:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=vn(()=>new Set),o=vn(()=>new Map),a=vn(()=>new Map),s=vn(()=>new Set),i=Pu(e),{label:l,children:u,value:m,onValueChange:c,filter:p,shouldFilter:h,loop:y,disablePointerSelection:g=!1,vimBindings:v=!0,...b}=e,x=Ne(),S=Ne(),M=Ne(),C=f.useRef(null),N=K0();rn(()=>{if(m!==void 0){let _=m.trim();n.current.value=_,D.emit()}},[m]),rn(()=>{N(6,B)},[]);let D=f.useMemo(()=>({subscribe:_=>(s.current.add(_),()=>s.current.delete(_)),snapshot:()=>n.current,setState:(_,I,H)=>{var G,U,W,Q;if(!Object.is(n.current[_],I)){if(n.current[_]=I,_==="search")V(),F(),N(1,$);else if(_==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(M);K?K.focus():(G=document.getElementById(x))==null||G.focus()}if(N(7,()=>{var K;n.current.selectedItemId=(K=P())==null?void 0:K.id,D.emit()}),H||N(5,B),((U=i.current)==null?void 0:U.value)!==void 0){let K=I??"";(Q=(W=i.current).onValueChange)==null||Q.call(W,K);return}}D.emit()}},emit:()=>{s.current.forEach(_=>_())}}),[]),R=f.useMemo(()=>({value:(_,I,H)=>{var G;I!==((G=a.current.get(_))==null?void 0:G.value)&&(a.current.set(_,{value:I,keywords:H}),n.current.filtered.items.set(_,j(I,H)),N(2,()=>{F(),D.emit()}))},item:(_,I)=>(r.current.add(_),I&&(o.current.has(I)?o.current.get(I).add(_):o.current.set(I,new Set([_]))),N(3,()=>{V(),F(),n.current.value||$(),D.emit()}),()=>{a.current.delete(_),r.current.delete(_),n.current.filtered.items.delete(_);let H=P();N(4,()=>{V(),(H==null?void 0:H.getAttribute("id"))===_&&$(),D.emit()})}),group:_=>(o.current.has(_)||o.current.set(_,new Set),()=>{a.current.delete(_),o.current.delete(_)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:x,inputId:M,labelId:S,listInnerRef:C}),[]);function j(_,I){var H,G;let U=(G=(H=i.current)==null?void 0:H.filter)!=null?G:L0;return _?U(_,n.current.search,I):0}function F(){if(!n.current.search||i.current.shouldFilter===!1)return;let _=n.current.filtered.items,I=[];n.current.filtered.groups.forEach(G=>{let U=o.current.get(G),W=0;U.forEach(Q=>{let K=_.get(Q);W=Math.max(K,W)}),I.push([G,W])});let H=C.current;T().sort((G,U)=>{var W,Q;let K=G.getAttribute("id"),X=U.getAttribute("id");return((W=_.get(X))!=null?W:0)-((Q=_.get(K))!=null?Q:0)}).forEach(G=>{let U=G.closest(Go);U?U.appendChild(G.parentElement===U?G:G.closest(`${Go} > *`)):H.appendChild(G.parentElement===H?G:G.closest(`${Go} > *`))}),I.sort((G,U)=>U[1]-G[1]).forEach(G=>{var U;let W=(U=C.current)==null?void 0:U.querySelector(`${Fn}[${gn}="${encodeURIComponent(G[0])}"]`);W==null||W.parentElement.appendChild(W)})}function $(){let _=T().find(H=>H.getAttribute("aria-disabled")!=="true"),I=_==null?void 0:_.getAttribute(gn);D.setState("value",I||void 0)}function V(){var _,I,H,G;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let U=0;for(let W of r.current){let Q=(I=(_=a.current.get(W))==null?void 0:_.value)!=null?I:"",K=(G=(H=a.current.get(W))==null?void 0:H.keywords)!=null?G:[],X=j(Q,K);n.current.filtered.items.set(W,X),X>0&&U++}for(let[W,Q]of o.current)for(let K of Q)if(n.current.filtered.items.get(K)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=U}function B(){var _,I,H;let G=P();G&&(((_=G.parentElement)==null?void 0:_.firstChild)===G&&((H=(I=G.closest(Fn))==null?void 0:I.querySelector($0))==null||H.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function P(){var _;return(_=C.current)==null?void 0:_.querySelector(`${Nu}[aria-selected="true"]`)}function T(){var _;return Array.from(((_=C.current)==null?void 0:_.querySelectorAll(xi))||[])}function k(_){let I=T()[_];I&&D.setState("value",I.getAttribute(gn))}function A(_){var I;let H=P(),G=T(),U=G.findIndex(Q=>Q===H),W=G[U+_];(I=i.current)!=null&&I.loop&&(W=U+_<0?G[G.length-1]:U+_===G.length?G[0]:G[U+_]),W&&D.setState("value",W.getAttribute(gn))}function E(_){let I=P(),H=I==null?void 0:I.closest(Fn),G;for(;H&&!G;)H=_>0?q0(H,Fn):V0(H,Fn),G=H==null?void 0:H.querySelector(xi);G?D.setState("value",G.getAttribute(gn)):A(_)}let O=()=>k(T().length-1),Y=_=>{_.preventDefault(),_.metaKey?O():_.altKey?E(1):A(1)},z=_=>{_.preventDefault(),_.metaKey?k(0):_.altKey?E(-1):A(-1)};return f.createElement(ee.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:_=>{var I;(I=b.onKeyDown)==null||I.call(b,_);let H=_.nativeEvent.isComposing||_.keyCode===229;if(!(_.defaultPrevented||H))switch(_.key){case"n":case"j":{v&&_.ctrlKey&&Y(_);break}case"ArrowDown":{Y(_);break}case"p":case"k":{v&&_.ctrlKey&&z(_);break}case"ArrowUp":{z(_);break}case"Home":{_.preventDefault(),k(0);break}case"End":{_.preventDefault(),O();break}case"Enter":{_.preventDefault();let G=P();if(G){let U=new Event(ya);G.dispatchEvent(U)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:Z0},l),vo(e,_=>f.createElement(Tu.Provider,{value:D},f.createElement(Ru.Provider,{value:R},_))))}),F0=f.forwardRef((e,t)=>{var n,r;let o=Ne(),a=f.useRef(null),s=f.useContext(_u),i=fr(),l=Pu(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;rn(()=>{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=rs(),p=Bt(N=>N.value&&N.value===m.current),h=Bt(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,D;g(),(D=(N=l.current).onSelect)==null||D.call(N,m.current)}function g(){c.setState("value",m.current,!0)}if(!h)return null;let{disabled:v,value:b,onSelect:x,forceMount:S,keywords:M,...C}=e;return f.createElement(ee.div,{ref:Et(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||i.getDisablePointerSelection()?void 0:g,onClick:v?void 0:y},e.children)}),W0=f.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=Ne(),i=f.useRef(null),l=f.useRef(null),u=Ne(),m=fr(),c=Bt(h=>o||m.filter()===!1?!0:h.search?h.filtered.groups.has(s):!0);rn(()=>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:Et(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))))}),B0=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=Bt(s=>!s.search);return!n&&!a?null:f.createElement(ee.div,{ref:Et(o,t),...r,"cmdk-separator":"",role:"separator"})}),Y0=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=rs(),s=Bt(u=>u.search),i=Bt(u=>u.selectedItemId),l=fr();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)}})}),H0=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),s=f.useRef(null),i=Bt(u=>u.selectedItemId),l=fr();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:Et(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:Et(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),z0=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return f.createElement(Qa,{open:n,onOpenChange:r},f.createElement(Ja,{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}))))}),G0=f.forwardRef((e,t)=>Bt(n=>n.filtered.count===0)?f.createElement(ee.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),U0=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)))}),We=Object.assign(Ou,{List:H0,Item:F0,Input:Y0,Group:W0,Separator:B0,Dialog:z0,Empty:G0,Loading:U0});function q0(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function V0(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 rn(()=>{t.current=e}),t}var rn=typeof window>"u"?f.useEffect:f.useLayoutEffect;function vn(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function Bt(e){let t=rs(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function Au(e,t,n,r=[]){let o=f.useRef(),a=fr();return rn(()=>{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(gn,i),o.current=i}),o}var K0=()=>{let[e,t]=f.useState(),n=vn(()=>new Map);return rn(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function X0(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(X0(t),{ref:t.ref},n(t.props.children)):n(t)}var Z0={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Q0=Qa,J0=Eu,e1=Ja,t1=ns,Iu=f.forwardRef(({className:e,...t},n)=>d.jsx(ho,{ref:n,className:L("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(e1,{children:[d.jsx(Iu,{}),d.jsxs(go,{ref:r,className:L("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(ns,{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(En,{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:L("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:L("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(es,{ref:n,className:L("text-lg font-semibold leading-none tracking-tight",e),...t}));Fu.displayName=es.displayName;const Wu=f.forwardRef(({className:e,...t},n)=>d.jsx(ts,{ref:n,className:L("text-sm text-muted-foreground",e),...t}));Wu.displayName=ts.displayName;const n1=f.forwardRef(({className:e,...t},n)=>d.jsx(We,{ref:n,className:L("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));n1.displayName=We.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(We.Input,{ref:n,className:L("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=We.Input.displayName;const Yu=f.forwardRef(({className:e,...t},n)=>d.jsx(We.List,{ref:n,className:L("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Yu.displayName=We.List.displayName;const r1=f.forwardRef((e,t)=>d.jsx(We.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));r1.displayName=We.Empty.displayName;const Hu=f.forwardRef(({className:e,...t},n)=>d.jsx(We.Group,{ref:n,className:L("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=We.Group.displayName;const o1=f.forwardRef(({className:e,...t},n)=>d.jsx(We.Separator,{ref:n,className:L("-mx-1 h-px bg-border",e),...t}));o1.displayName=We.Separator.displayName;const zu=f.forwardRef(({className:e,...t},n)=>d.jsx(We.Item,{ref:n,className:L("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=We.Item.displayName;function a1({className:e,...t}){return d.jsx("div",{className:L("animate-pulse rounded-md bg-muted",e),...t})}function s1(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 i1=({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}=s1(l,u),p=w.useRef(null),[h,y]=w.useState(!1),[g,v]=w.useState(r),[b,x]=w.useState((r==null?void 0:r.label)||""),S=w.useCallback(N=>{const D=p.current;if(D){if(h||y(!0),N.key==="Enter"&&D.value!==""){const R=e.find(j=>j.label===D.value);R&&(v(R),o==null||o(R))}N.key==="Escape"&&D.blur()}},[h,e,o]),M=w.useCallback(()=>{y(!1),x((g==null?void 0:g.label)||"")},[g]),C=w.useCallback(N=>{x(N.label),v(N),o==null||o(N),setTimeout(()=>{var D;(D=p==null?void 0:p.current)==null||D.blur()},0)},[o]);return d.jsxs(We,{onKeyDown:S,children:[d.jsxs("div",{className:L("rounded-full border bg-gray-100",m,i),children:[" ",d.jsx(Bu,{ref:p,value:b,onValueChange:s?void 0:x,onBlur:M,onFocus:()=>y(!0),placeholder:t,disabled:a,className:c})]}),d.jsx("div",{className:"relative mt-1",children:d.jsx("div",{className:L("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(We.Loading,{children:d.jsx("div",{className:"p-1",children:d.jsx(a1,{className:"h-8 w-full"})})}):null,e.length>0&&!s?d.jsx(Hu,{children:e.map(N=>{const D=(g==null?void 0:g.value)===N.value;return d.jsxs(zu,{value:N.label,onMouseDown:R=>{R.preventDefault(),R.stopPropagation()},onSelect:()=>C(N),className:L("flex w-full items-center gap-2 dark:text-white",D?null:"pl-8"),children:[D?d.jsx(Jn,{className:"w-4"}):null,N.label]},N.value)})}):null,s?null:d.jsx(We.Empty,{className:"select-none rounded-sm px-2 py-3 text-center text-sm dark:text-gray-400",children:n})]})})})]})},c1=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 l1({className:e,variant:t,...n}){return d.jsx("div",{className:L(c1({variant:t}),e),...n})}function u1({title:e,children:t,className:n}){return d.jsxs("section",{className:L("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 d1({title:e,variant:t="primary",children:n,className:r}){return d.jsxs("div",{className:L("space-y-4",r),children:[d.jsx(l1,{variant:t==="primary"?"default":"secondary",className:L(t==="primary"&&"bg-black text-white hover:bg-black/90"),children:e}),n]})}const Gu=w.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 x;const g=y.currentTarget;let v=g.value;v=v.replace(/[^0-9.]/g,"");const b=v.split(".");b.length>2&&(v=b[0]+"."+b.slice(1).join("")),((x=b[1])==null?void 0:x.length)>2&&(v=b[0]+"."+b[1].substring(0,2)),g.value=v,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:L("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:L("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:L("text-xs",c?"text-red-500":"text-muted-foreground"),children:r||n})]})});Gu.displayName="CurrencyInput";const f1={small:"h-8 text-xs px-2",medium:"h-10 text-sm px-3",large:"h-12 text-base px-4"},m1={outlined:"border border-input",filled:"border-0 bg-accent",standard:"border-0 border-b border-input rounded-none"},p1=(e,t)=>t&&typeof e=="object"&&e!==null?e[t.text]:typeof e=="string"?e:(e==null?void 0:e.label)||"",h1=(e,t)=>t&&typeof e=="object"&&e!==null?e[t.value]:typeof e=="string"?e:(e==null?void 0:e.value)||e,g1=(e,t,n,r)=>n(e,r)===n(t,r),v1=(e,t,n,r)=>{if(!t)return e;const o=t.toLowerCase();return e.filter(a=>n(a,r).toLowerCase().includes(o))},Uu=w.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 qu=e=>{const{option:t,index:n,isSelected:r,isHighlighted:o,onSelect:a,getOptionLabel:s,renderOption:i}=e,l=w.useCallback(()=>{a(t)},[t,a]);return d.jsx("div",{onClick:l,className:`
|
|
183
183
|
px-3 py-2 cursor-pointer flex items-center justify-between
|
|
184
184
|
text-sm transition-colors mb-[0.4vh]
|
|
185
185
|
${o?"bg-accent text-accent-foreground":""}
|
|
186
186
|
${r?"bg-primary/10":""}
|
|
187
187
|
hover:bg-accent hover:text-accent-foreground
|
|
188
|
-
`,children:
|
|
188
|
+
`,children:i?i(t,n):d.jsxs(d.Fragment,{children:[d.jsx("span",{children:s(t)}),r&&d.jsx(Jn,{className:"h-4 w-4 text-primary"})]})})};qu.displayName="AutocompleteOption";const Vu=e=>{const{tag:t,index:n,getOptionLabel:r,onRemove:o}=e,a=w.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(En,{className:"h-3 w-3"})})]},n)};Vu.displayName="AutocompleteTag";const y1=({options:e=[],dataSource:t=[],value:n=null,onChange:r,change:o,onInputChange:a,placeholder:s="Search...",multiple:i=!1,freeSolo:l=!1,disabled:u=!1,loading:m=!1,size:c="medium",variant:p="outlined",label:h="",helperText:y="",error:g,required:v=!1,fullWidth:b=!0,clearable:x=!0,disableCloseOnSelect:S=!1,filterOptions:M,getOptionLabel:C=k=>p1(k,F),getOptionValue:N=k=>h1(k,F),isOptionEqualToValue:D,renderOption:R,renderTags:j,fields:F,noOptionsText:$="No options",emptyMessage:V,className:B="",inputClassName:P="",...T})=>{const[k,A]=w.useState(!1),[E,O]=w.useState(""),[Y,z]=w.useState(-1),[_,I]=w.useState({top:0,left:0,width:0}),H=w.useRef(null),G=w.useRef(null),U=w.useRef(null),W=w.useId(),Q=t.length>0?t:e,K=w.useMemo(()=>D||((re,me)=>g1(re,me,N,F)),[D,N,F]),X=w.useMemo(()=>{let re=Q;return i&&Array.isArray(n)&&(re=Q.filter(me=>!n.some(Te=>K(me,Te)))),M?M(re,{inputValue:E}):v1(re,E,C,F)},[Q,n,E,M,C,i,K,F]),se=w.useCallback(re=>{const me=re.target.value;O(me),a==null||a(re,me),!k&&me&&A(!0)},[k,a]),ie=w.useCallback(re=>{if(i){const me=Array.isArray(n)?n:[],Te=me.some(Be=>K(re,Be));let Le;Te?Le=me.filter(Be=>!K(re,Be)):Le=[...me,re],r==null||r(null,Le),o==null||o({itemData:Le}),O(""),S||A(!1),setTimeout(()=>{var Be;(Be=H.current)==null||Be.focus()},0)}else r==null||r(null,re),o==null||o({itemData:re}),O(C(re)),S||A(!1);z(-1)},[i,n,K,r,o,S,C]),ye=w.useCallback(re=>{if(i&&Array.isArray(n)){const me=n.filter(Te=>!K(re,Te));r==null||r(null,me),o==null||o({itemData:me})}},[i,n,K,r,o]),J=w.useCallback(re=>{re.stopPropagation(),r==null||r(null,i?[]:null),o==null||o({itemData:i?[]:null}),O(""),setTimeout(()=>{H.current&&(H.current.value="",H.current.focus())},0),A(!1)},[r,o,i]),Pe=w.useCallback(re=>{if(!k&&(re.key==="ArrowDown"||re.key==="ArrowUp")){A(!0);return}if(k)switch(re.key){case"ArrowDown":re.preventDefault(),z(me=>me<X.length-1?me+1:0);break;case"ArrowUp":re.preventDefault(),z(me=>me>0?me-1:X.length-1);break;case"Enter":re.preventDefault(),Y>=0&&X[Y]?ie(X[Y]):l&&E&&ie(E);break;case"Escape":A(!1),z(-1);break;case"Tab":A(!1);break}},[k,X,Y,ie,l,E]),Ae=w.useCallback(()=>{if(A(!k),!k&&U.current){const re=U.current.getBoundingClientRect();I({top:re.bottom+window.scrollY,left:re.left+window.scrollX,width:re.width})}},[k]),Me=w.useCallback(()=>{if(A(!0),U.current){const re=U.current.getBoundingClientRect();I({top:re.bottom+window.scrollY,left:re.left+window.scrollX,width:re.width})}},[]);w.useEffect(()=>{const re=Te=>{const Le=Te.target,Be=U.current&&!U.current.contains(Le),at=G.current&&!G.current.contains(Le);Be&&at&&A(!1)},me=()=>{if(k&&U.current){const Te=U.current.getBoundingClientRect();I({top:Te.bottom+window.scrollY,left:Te.left+window.scrollX,width:Te.width})}};return document.addEventListener("mousedown",re),window.addEventListener("resize",me),window.addEventListener("scroll",me),()=>{document.removeEventListener("mousedown",re),window.removeEventListener("resize",me),window.removeEventListener("scroll",me)}},[k]),w.useEffect(()=>{if(k&&Y>=0&&G.current){const re=G.current.children[Y];re&&re.scrollIntoView({block:"nearest"})}},[Y,k]);const Ue=w.useMemo(()=>!i||!Array.isArray(n)||n.length===0?null:j?j(n,ye):d.jsx("div",{className:"flex flex-wrap gap-1 mb-1",children:n.map((re,me)=>d.jsx(Vu,{tag:re,index:me,getOptionLabel:C,onRemove:ye},me))}),[i,n,j,ye,C]),Ce=w.useMemo(()=>i?Array.isArray(n)&&n.length>0:n!=null,[i,n]),Xe=x&&Ce&&!u,Ot=w.useMemo(()=>`
|
|
189
189
|
relative flex items-center rounded-md
|
|
190
190
|
${m1[p]}
|
|
191
191
|
${f1[c]}
|
|
192
|
-
${
|
|
192
|
+
${g&&"border border-red-500 focus-visible:ring-red-500"}
|
|
193
193
|
${u?"opacity-50 cursor-not-allowed":"cursor-text"}
|
|
194
194
|
focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-2
|
|
195
|
-
transition-colors ${
|
|
196
|
-
`,[p,c,
|
|
195
|
+
transition-colors ${P}
|
|
196
|
+
`,[p,c,g,u,P]),Re=V??$;return d.jsxs("div",{className:`relative ${b?"w-full":"w-auto"} ${B}`,ref:U,children:[h&&d.jsxs("label",{htmlFor:W,className:"block text-sm font-medium mb-1",children:[h,v&&d.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),d.jsxs("div",{className:"relative overflow-visible",children:[Ue,d.jsxs("div",{className:Ot,children:[d.jsx(on,{id:W,ref:H,value:E,onChange:se,onKeyDown:Pe,onFocus:Me,placeholder:s,disabled:u,className:"px-0 border-0 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent rounded-md",...T}),d.jsxs("div",{className:"flex items-center gap-1 ml-auto",children:[m&&d.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-muted-foreground border-t-transparent"}),Xe&&d.jsx("button",{type:"button",onClick:J,className:"p-1 hover:bg-accent rounded-sm transition-colors",tabIndex:-1,children:d.jsx(En,{className:"h-4 w-4 text-muted-foreground"})}),d.jsx("button",{type:"button",disabled:u,onClick:Ae,className:`p-1 hover:bg-accent rounded-sm transition-colors ${u?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,tabIndex:-1,children:d.jsx(er,{className:`h-4 w-4 text-muted-foreground transition-transform ${k?"rotate-180":""}`})})]})]}),k&&Xr.createPortal(d.jsx("div",{className:`
|
|
197
197
|
absolute bg-popover border border-border rounded-md shadow-lg
|
|
198
198
|
max-h-60 overflow-auto z-[9999]
|
|
199
|
-
${
|
|
200
|
-
`,style:{top:
|
|
199
|
+
${P}
|
|
200
|
+
`,style:{top:_.top+4,left:_.left,width:_.width},ref:G,children:X.length===0?d.jsx("div",{className:"p-3 text-sm text-muted-foreground text-center",children:Re}):X.map((re,me)=>{const Te=i?Array.isArray(n)&&n.some(Be=>K(re,Be)):K(re,n),Le=me===Y;return d.jsx(qu,{option:re,index:me,isSelected:Te,isHighlighted:Le,onSelect:ie,getOptionLabel:C,renderOption:R},me)})}),document.body)]}),(y||g)&&d.jsx("p",{className:`mt-1 text-xs ${g?"text-destructive":"text-muted-foreground"}`,children:g||y})]})};var yo="Collapsible",[b1,hD]=He(yo),[w1,os]=b1(yo),Ku=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,u]=ot({prop:r,defaultProp:o??!1,onChange:s,caller:yo});return d.jsx(w1,{scope:n,disabled:a,contentId:Ne(),open:l,onOpenToggle:f.useCallback(()=>u(m=>!m),[u]),children:d.jsx(ee.div,{"data-state":ss(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=os(Xu,n);return d.jsx(ee.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ss(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:Z(e.onClick,o.onOpenToggle)})});Zu.displayName=Xu;var as="CollapsibleContent",Qu=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=os(as,e.__scopeCollapsible);return d.jsx(Ge,{present:n||o.open,children:({present:a})=>d.jsx(x1,{...r,ref:t,present:a})})});Qu.displayName=as;var x1=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=os(as,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,g=s.open||i,v=f.useRef(g),b=f.useRef(void 0);return f.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),Oe(()=>{const x=u.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const S=x.getBoundingClientRect();c.current=S.height,h.current=S.width,v.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),l(r)}},[s.open,r]),d.jsx(ee.div,{"data-state":ss(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...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:g&&o})});function ss(e){return e?"open":"closed"}var S1=Ku,C1=Zu,M1=Qu;function D1({title:e,content:t,defaultOpen:n=!1}){const[r,o]=f.useState(n),a=()=>o(s=>!s);return d.jsxs(S1,{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(C1,{asChild:!0,children:d.jsx("button",{onClick:s=>s.stopPropagation(),className:L("transition-transform duration-200",r?"rotate-180":"rotate-0"),children:d.jsx(er,{className:"h-5 w-5"})})})]}),d.jsx(M1,{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 k1=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:L(k1({variant:t}),e),...n}));Ju.displayName="Alert";const ed=f.forwardRef(({className:e,...t},n)=>d.jsx("h5",{ref:n,className:L("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:L("text-sm [&_p]:leading-relaxed",e),...t}));td.displayName="AlertDescription";var kr={exports:{}},Uo={};/**
|
|
201
201
|
* @license React
|
|
202
202
|
* use-sync-external-store-shim.production.js
|
|
203
203
|
*
|
|
@@ -205,7 +205,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
205
205
|
*
|
|
206
206
|
* This source code is licensed under the MIT license found in the
|
|
207
207
|
* LICENSE file in the root directory of this source tree.
|
|
208
|
-
*/var Si;function E1(){if(Si)return Uo;Si=1;var e=w;function t(c,p){return c===p&&(c!==0||1/c===1/p)||c!==c&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,
|
|
208
|
+
*/var Si;function E1(){if(Si)return Uo;Si=1;var e=w;function t(c,p){return c===p&&(c!==0||1/c===1/p)||c!==c&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,p){var h=p(),y=r({inst:{value:h,getSnapshot:p}}),g=y[0].inst,v=y[1];return a(function(){g.value=h,g.getSnapshot=p,l(g)&&v({inst:g})},[c,h,p]),o(function(){return l(g)&&v({inst:g}),c(function(){l(g)&&v({inst:g})})},[c]),s(h),h}function l(c){var p=c.getSnapshot;c=c.value;try{var h=p();return!n(c,h)}catch{return!0}}function u(c,p){return p()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return Uo.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Uo}var qo={};/**
|
|
209
209
|
* @license React
|
|
210
210
|
* use-sync-external-store-shim.development.js
|
|
211
211
|
*
|
|
@@ -213,15 +213,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
213
213
|
*
|
|
214
214
|
* This source code is licensed under the MIT license found in the
|
|
215
215
|
* LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/var Ci;function N1(){return Ci||(Ci=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=i({inst:{value:v,getSnapshot:y}});var b=g[0].inst,x=g[1];return l(function(){b.value=v,b.getSnapshot=y,n(b)&&x({inst:b})},[h,v,y]),s(function(){return n(b)&&x({inst:b}),h(function(){n(b)&&x({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=w,a=typeof Object.is=="function"?Object.is:e,i=o.useState,s=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 Mi;function R1(){return Mi||(Mi=1,process.env.NODE_ENV==="production"?kr.exports=E1():kr.exports=N1()),kr.exports}var T1=R1();function _1(){return T1.useSyncExternalStore(O1,()=>!0,()=>!1)}function O1(){return()=>{}}var is="Avatar",[P1,gD]=ze(is),[A1,nd]=P1(is),rd=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=f.useState("idle");return d.jsx(A1,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:d.jsx(te.span,{...r,ref:t})})});rd.displayName=is;var od="AvatarImage",ad=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,i=nd(od,n),s=I1(r,a),l=at(u=>{o(u),i.onImageLoadingStatusChange(u)});return Ie(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?d.jsx(te.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),[i,s]=f.useState(r===void 0);return f.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),i&&a.imageLoadingStatus!=="loaded"?d.jsx(te.span,{...o,ref:t}):null});id.displayName=sd;function Di(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function I1(e,{referrerPolicy:t,crossOrigin:n}){const r=_1(),o=f.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[i,s]=f.useState(()=>Di(a,e));return Ie(()=>{s(Di(a,e))},[a,e]),Ie(()=>{const l=c=>()=>{s(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]),i}var cd=rd,ld=ad,ud=id;const dd=f.forwardRef(({className:e,...t},n)=>d.jsx(cd,{ref:n,className:B("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:B("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:B("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));md.displayName=ud.displayName;var bo="Checkbox",[j1,vD]=ze(bo),[$1,cs]=j1(bo);function L1(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:u,value:m="on",internal_do_not_use_render:c}=e,[p,h]=st({prop:n,defaultProp:o??!1,onChange:l,caller:bo}),[y,v]=f.useState(null),[g,b]=f.useState(null),x=f.useRef(!1),S=y?!!i||!!y.closest("form"):!0,D={checked:p,disabled:a,setChecked:h,control:y,setControl:v,name:s,form:i,value:m,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:Lt(o)?!1:o,isFormControl:S,bubbleInput:g,setBubbleInput:b};return d.jsx($1,{scope:t,...D,children:F1(c)?c(D):r})}var pd="CheckboxTrigger",hd=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:i,disabled:s,checked:l,required:u,setControl:m,setChecked:c,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:y}=cs(pd,e),v=he(o,m),g=f.useRef(l);return f.useEffect(()=>{const b=a==null?void 0:a.form;if(b){const x=()=>c(g.current);return b.addEventListener("reset",x),()=>b.removeEventListener("reset",x)}},[a,c]),d.jsx(te.button,{type:"button",role:"checkbox","aria-checked":Lt(l)?"mixed":l,"aria-required":u,"data-state":wd(l),"data-disabled":s?"":void 0,disabled:s,value:i,...r,ref:v,onKeyDown:Z(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:Z(n,b=>{c(x=>Lt(x)?!0:!x),y&&h&&(p.current=b.isPropagationStopped(),p.current||b.stopPropagation())})})});hd.displayName=pd;var ls=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:u,form:m,...c}=e;return d.jsx(L1,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:s,required:i,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})]})})});ls.displayName=bo;var gd="CheckboxIndicator",vd=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=cs(gd,n);return d.jsx(Ue,{present:r||Lt(a.checked)||a.checked===!0,children:d.jsx(te.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:i,required:s,disabled:l,name:u,value:m,form:c,bubbleInput:p,setBubbleInput:h}=cs(yd,e),y=he(n,h),v=Ha(a),g=ja(r);f.useEffect(()=>{const x=p;if(!x)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});x.indeterminate=Lt(a),C.call(x,Lt(a)?!1:a),x.dispatchEvent(M)}},[p,v,a,o]);const b=f.useRef(Lt(a)?!1:a);return d.jsx(te.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??b.current,required:s,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 F1(e){return typeof e=="function"}function Lt(e){return e==="indeterminate"}function wd(e){return Lt(e)?"indeterminate":e?"checked":"unchecked"}const xd=f.forwardRef(({className:e,color:t="#029cfd",...n},r)=>d.jsx(ls,{ref:r,className:B("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(hh,{className:"h-4 w-4 text-white"}):d.jsx(Jn,{className:"h-4 w-4"})})}));xd.displayName=ls.displayName;function W1(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=w.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}),mr=()=>{const e=w.useContext(Sd);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};W1(`[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(
|
|
216
|
+
*/var Ci;function N1(){return Ci||(Ci=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 g=y();if(!c){var v=y();a(g,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}v=s({inst:{value:g,getSnapshot:y}});var b=v[0].inst,x=v[1];return l(function(){b.value=g,b.getSnapshot=y,n(b)&&x({inst:b})},[h,g,y]),i(function(){return n(b)&&x({inst:b}),h(function(){n(b)&&x({inst:b})})},[h]),u(g),g}function n(h){var y=h.getSnapshot;h=h.value;try{var g=y();return!a(h,g)}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=w,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 Mi;function R1(){return Mi||(Mi=1,process.env.NODE_ENV==="production"?kr.exports=E1():kr.exports=N1()),kr.exports}var T1=R1();function _1(){return T1.useSyncExternalStore(O1,()=>!0,()=>!1)}function O1(){return()=>{}}var is="Avatar",[P1,gD]=He(is),[A1,nd]=P1(is),rd=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=f.useState("idle");return d.jsx(A1,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:d.jsx(ee.span,{...r,ref:t})})});rd.displayName=is;var od="AvatarImage",ad=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=nd(od,n),i=I1(r,a),l=rt(u=>{o(u),s.onImageLoadingStatusChange(u)});return Oe(()=>{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 Di(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function I1(e,{referrerPolicy:t,crossOrigin:n}){const r=_1(),o=f.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,i]=f.useState(()=>Di(a,e));return Oe(()=>{i(Di(a,e))},[a,e]),Oe(()=>{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:L("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:L("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:L("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));md.displayName=ud.displayName;var bo="Checkbox",[j1,vD]=He(bo),[$1,cs]=j1(bo);function L1(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]=ot({prop:n,defaultProp:o??!1,onChange:l,caller:bo}),[y,g]=f.useState(null),[v,b]=f.useState(null),x=f.useRef(!1),S=y?!!s||!!y.closest("form"):!0,M={checked:p,disabled:a,setChecked:h,control:y,setControl:g,name:i,form:s,value:m,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:$t(o)?!1:o,isFormControl:S,bubbleInput:v,setBubbleInput:b};return d.jsx($1,{scope:t,...M,children:F1(c)?c(M):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}=cs(pd,e),g=he(o,m),v=f.useRef(l);return f.useEffect(()=>{const b=a==null?void 0:a.form;if(b){const x=()=>c(v.current);return b.addEventListener("reset",x),()=>b.removeEventListener("reset",x)}},[a,c]),d.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":$t(l)?"mixed":l,"aria-required":u,"data-state":wd(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:g,onKeyDown:Z(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:Z(n,b=>{c(x=>$t(x)?!0:!x),y&&h&&(p.current=b.isPropagationStopped(),p.current||b.stopPropagation())})})});hd.displayName=pd;var ls=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(L1,{__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})]})})});ls.displayName=bo;var gd="CheckboxIndicator",vd=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=cs(gd,n);return d.jsx(Ge,{present:r||$t(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}=cs(yd,e),y=he(n,h),g=Ha(a),v=ja(r);f.useEffect(()=>{const x=p;if(!x)return;const S=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(S,"checked").set,N=!o.current;if(g!==a&&C){const D=new Event("click",{bubbles:N});x.indeterminate=$t(a),C.call(x,$t(a)?!1:a),x.dispatchEvent(D)}},[p,g,a,o]);const b=f.useRef($t(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,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});bd.displayName=yd;function F1(e){return typeof e=="function"}function $t(e){return e==="indeterminate"}function wd(e){return $t(e)?"indeterminate":e?"checked":"unchecked"}const xd=f.forwardRef(({className:e,color:t="#029cfd",...n},r)=>d.jsx(ls,{ref:r,className:L("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(hh,{className:"h-4 w-4 text-white"}):d.jsx(Jn,{className:"h-4 w-4"})})}));xd.displayName=ls.displayName;function W1(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=w.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}),mr=()=>{const e=w.useContext(Sd);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};W1(`[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(
|
|
217
217
|
[data-state=closed]
|
|
218
|
-
){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 B1(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function Y1(){return us(/^Mac/)}function H1(){return us(/^iPhone/)}function ki(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function z1(){return us(/^iPad/)||Y1()&&navigator.maxTouchPoints>1}function Cd(){return H1()||z1()}function us(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const G1=24,U1=typeof window<"u"?w.useLayoutEffect:w.useEffect;function Ei(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Vo=typeof document<"u"&&window.visualViewport;function Ni(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Md(e){for(Ni(e)&&(e=e.parentElement);e&&!Ni(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const q1=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Er=0,Ko;function V1(e={}){let{isDisabled:t}=e;U1(()=>{if(!t)return Er++,Er===1&&Cd()&&(Ko=K1()),()=>{Er--,Er===0&&(Ko==null||Ko())}},[t])}function K1(){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(()=>{Ri(p)}):Vo.addEventListener("resize",()=>Ri(p),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},s=window.pageXOffset,l=window.pageYOffset,u=Ei(X1(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=Ei(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",i));return()=>{u(),m(),window.scrollTo(s,l)}}function X1(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 Ri(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 i=n.getBoundingClientRect().bottom+G1;a>i&&(n.scrollTop+=o-r)}e=n.parentElement}}function ba(e){return e instanceof HTMLInputElement&&!q1.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Z1(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Q1(...e){return t=>e.forEach(n=>Z1(n,t))}function Dd(...e){return f.useCallback(Q1(...e),e)}const kd=new WeakMap;function Le(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 J1(e,t){if(!e||!(e instanceof HTMLElement))return;let n=kd.get(e);n&&(e.style[t]=n[t])}const Ae=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Nr(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(", ")[Ae(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Ae(t)?5:4]):null)}function eS(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 tS(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const ke={DURATION:.5,EASE:[.32,.72,0,1]},Ed=.4,nS=.25,rS=100,Nd=8,Zt=16,wa=26,Zo="vaul-dragging";function Rd(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function oS({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,o=w.useRef(r),a=Rd(t);return w.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function Td({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=oS({defaultProp:t,onChange:n}),a=e!==void 0,i=a?e:r,s=Rd(n),l=w.useCallback(u=>{if(a){const c=typeof u=="function"?u(e):u;c!==e&&s(c)}else o(u)},[a,e,o,s]);return[i,l]}function aS({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:s="bottom",container:l,snapToSequentialPoint:u}){const[m,c]=Td({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[p,h]=w.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);w.useEffect(()=>{function M(){h({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",M),()=>window.removeEventListener("resize",M)},[]);const y=w.useMemo(()=>m===(n==null?void 0:n[n.length-1])||null,[n,m]),v=w.useMemo(()=>{var M;return(M=n==null?void 0:n.findIndex(N=>N===m))!=null?M:null},[n,m]),g=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===m||!n,b=w.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 N;return(N=n==null?void 0:n.map($=>{const F=typeof $=="string";let W=0;if(F&&(W=parseInt($,10)),Ae(s)){const I=F?W:p?$*M.height:0;return p?s==="bottom"?M.height-I:-M.height+I:I}const q=F?W:p?$*M.width:0;return p?s==="right"?M.width-q:-M.width+q:q}))!=null?N:[]},[n,p,l]),x=w.useMemo(()=>v!==null?b==null?void 0:b[v]:null,[b,v]),S=w.useCallback(M=>{var N;const $=(N=b==null?void 0:b.findIndex(F=>F===M))!=null?N:null;i($),Le(r.current,{transition:`transform ${ke.DURATION}s cubic-bezier(${ke.EASE.join(",")})`,transform:Ae(s)?`translate3d(0, ${M}px, 0)`:`translate3d(${M}px, 0, 0)`}),b&&$!==b.length-1&&a!==void 0&&$!==a&&$<a?Le(o.current,{transition:`opacity ${ke.DURATION}s cubic-bezier(${ke.EASE.join(",")})`,opacity:"0"}):Le(o.current,{transition:`opacity ${ke.DURATION}s cubic-bezier(${ke.EASE.join(",")})`,opacity:"1"}),c(n==null?void 0:n[Math.max($,0)])},[r.current,n,b,a,o,c]);w.useEffect(()=>{if(m||e){var M;const N=(M=n==null?void 0:n.findIndex($=>$===e||$===m))!=null?M:-1;b&&N!==-1&&typeof b[N]=="number"&&S(b[N])}},[m,e,n,b,S]);function D({draggedDistance:M,closeDrawer:N,velocity:$,dismissible:F}){if(a===void 0)return;const W=s==="bottom"||s==="right"?(x??0)-M:(x??0)+M,q=v===a-1,I=v===0,_=M>0;if(q&&Le(o.current,{transition:`opacity ${ke.DURATION}s cubic-bezier(${ke.EASE.join(",")})`}),!u&&$>2&&!_){F?N():S(b[0]);return}if(!u&&$>2&&_&&b&&n){S(b[n.length-1]);return}const O=b==null?void 0:b.reduce((A,k)=>typeof A!="number"||typeof k!="number"?A:Math.abs(k-W)<Math.abs(A-W)?k:A),E=Ae(s)?window.innerHeight:window.innerWidth;if($>Ed&&Math.abs(M)<E*.4){const A=_?1:-1;if(A>0&&y&&n){S(b[n.length-1]);return}if(I&&A<0&&F&&N(),v===null)return;S(b[v+A]);return}S(O)}function C({draggedDistance:M}){if(x===null)return;const N=s==="bottom"||s==="right"?x-M:x+M;(s==="bottom"||s==="right")&&N<b[b.length-1]||(s==="top"||s==="left")&&N>b[b.length-1]||Le(r.current,{transform:Ae(s)?`translate3d(0, ${N}px, 0)`:`translate3d(${N}px, 0, 0)`})}function R(M,N){if(!n||typeof v!="number"||!b||a===void 0)return null;const $=v===a-1;if(v>=a&&N)return 0;if($&&!N)return 1;if(!g&&!$)return null;const W=$?v+1:v-1,q=$?b[W]-b[W-1]:b[W+1]-b[W],I=M/Math.abs(q);return $?1-I:I}return{isLastSnapPoint:y,activeSnapPoint:m,shouldFade:g,getPercentageDragged:R,setActiveSnapPoint:c,activeSnapPointIndex:v,onRelease:D,onDrag:C,snapPointsOffset:b}}const sS=()=>()=>{};function iS(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=mr(),a=w.useRef(null),i=w.useMemo(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-wa)/window.innerWidth}w.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;tS(r&&!o?Xo(document.body,{background:"black"}):sS,Xo(l,{transformOrigin:Ae(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${ke.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ke.EASE.join(",")})`}));const u=Xo(l,{borderRadius:`${Nd}px`,overflow:"hidden",...Ae(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),a.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},ke.DURATION*1e3)}}},[t,n,i])}let Bn=null;function cS({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,s]=w.useState(()=>typeof window<"u"?window.location.href:""),l=w.useRef(0),u=w.useCallback(()=>{if(ki()&&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=w.useCallback(()=>{if(ki()&&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&&i!==window.location.href){s(window.location.href);return}window.scrollTo(p,c)}),Bn=null}},[i]);return w.useEffect(()=>{function c(){l.current=window.scrollY}return c(),window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}},[]),w.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),w.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{m()},500)):m())},[e,r,i,t,n,u,m]),{restorePositionSetting:m}}function lS({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:s=!0,closeThreshold:l=nS,scrollLockTimeout:u=rS,dismissible:m=!0,handleOnly:c=!1,fadeFromIndex:p=a&&a.length-1,activeSnapPoint:h,setActiveSnapPoint:y,fixed:v,modal:g=!0,onClose:b,nested:x,noBodyStyles:S=!1,direction:D="bottom",defaultOpen:C=!1,disablePreventScroll:R=!0,snapToSequentialPoint:M=!1,preventScrollRestoration:N=!1,repositionInputs:$=!0,onAnimationEnd:F,container:W,autoFocus:q=!1}){var I,_;const[O=!1,E]=Td({defaultProp:C,prop:e,onChange:U=>{t==null||t(U),!U&&!x&&Se(),setTimeout(()=>{F==null||F(U)},ke.DURATION*1e3),U&&!g&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),U||(document.body.style.pointerEvents="auto")}}),[A,k]=w.useState(!1),[P,Y]=w.useState(!1),[z,T]=w.useState(!1),j=w.useRef(null),H=w.useRef(null),G=w.useRef(null),V=w.useRef(null),L=w.useRef(null),K=w.useRef(!1),X=w.useRef(null),Q=w.useRef(0),J=w.useRef(!1),ae=w.useRef(!C),ye=w.useRef(0),ee=w.useRef(null),Te=w.useRef(((I=ee.current)==null?void 0:I.getBoundingClientRect().height)||0),je=w.useRef(((_=ee.current)==null?void 0:_.getBoundingClientRect().width)||0),De=w.useRef(0),qe=w.useCallback(U=>{a&&U===We.length-1&&(H.current=new Date)},[]),{activeSnapPoint:Me,activeSnapPointIndex:Ze,setActiveSnapPoint:Pt,onRelease:Oe,snapPointsOffset:We,onDrag:Ct,shouldFade:ue,getPercentageDragged:me}=aS({snapPoints:a,activeSnapPointProp:h,setActiveSnapPointProp:y,drawerRef:ee,fadeFromIndex:p,overlayRef:j,onSnapPointChange:qe,direction:D,container:W,snapToSequentialPoint:M});V1({isDisabled:!O||P||!g||z||!A||!$||!R});const{restorePositionSetting:Se}=cS({isOpen:O,modal:g,nested:x??!1,hasBeenOpened:A,preventScrollRestoration:N,noBodyStyles:S});function Ne(){return(window.innerWidth-wa)/window.innerWidth}function Pe(U){var ie,se;!m&&!a||ee.current&&!ee.current.contains(U.target)||(Te.current=((ie=ee.current)==null?void 0:ie.getBoundingClientRect().height)||0,je.current=((se=ee.current)==null?void 0:se.getBoundingClientRect().width)||0,Y(!0),G.current=new Date,Cd()&&window.addEventListener("touchend",()=>K.current=!1,{once:!0}),U.target.setPointerCapture(U.pointerId),Q.current=Ae(D)?U.pageY:U.pageX)}function Qe(U,ie){var se;let fe=U;const ge=(se=window.getSelection())==null?void 0:se.toString(),oe=ee.current?Nr(ee.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(H.current&&de.getTime()-H.current.getTime()<500)return!1;if(oe!==null&&(D==="bottom"?oe>0:oe<0))return!0;if(ge&&ge.length>0)return!1;if(L.current&&de.getTime()-L.current.getTime()<u&&oe===0||ie)return L.current=de,!1;for(;fe;){if(fe.scrollHeight>fe.clientHeight){if(fe.scrollTop!==0)return L.current=new Date,!1;if(fe.getAttribute("role")==="dialog")return!0}fe=fe.parentNode}return!0}function cn(U){if(ee.current&&P){const ie=D==="bottom"||D==="right"?1:-1,se=(Q.current-(Ae(D)?U.pageY:U.pageX))*ie,fe=se>0,ge=a&&!m&&!fe;if(ge&&Ze===0)return;const oe=Math.abs(se),de=document.querySelector("[data-vaul-drawer-wrapper]"),ve=D==="bottom"||D==="top"?Te.current:je.current;let le=oe/ve;const Ke=me(oe,fe);if(Ke!==null&&(le=Ke),ge&&le>=1||!K.current&&!Qe(U.target,fe))return;if(ee.current.classList.add(Zo),K.current=!0,Le(ee.current,{transition:"none"}),Le(j.current,{transition:"none"}),a&&Ct({draggedDistance:se}),fe&&!a){const Ce=eS(se),Je=Math.min(Ce*-1,0)*ie;Le(ee.current,{transform:Ae(D)?`translate3d(0, ${Je}px, 0)`:`translate3d(${Je}px, 0, 0)`});return}const we=1-le;if((ue||p&&Ze===p-1)&&(r==null||r(U,le),Le(j.current,{opacity:`${we}`,transition:"none"},!0)),de&&j.current&&i){const Ce=Math.min(Ne()+le*(1-Ne()),1),Je=8-le*8,Be=Math.max(0,14-le*14);Le(de,{borderRadius:`${Je}px`,transform:Ae(D)?`scale(${Ce}) translate3d(0, ${Be}px, 0)`:`scale(${Ce}) translate3d(${Be}px, 0, 0)`,transition:"none"},!0)}if(!a){const Ce=oe*ie;Le(ee.current,{transform:Ae(D)?`translate3d(0, ${Ce}px, 0)`:`translate3d(${Ce}px, 0, 0)`})}}}w.useEffect(()=>{window.requestAnimationFrame(()=>{ae.current=!0})},[]),w.useEffect(()=>{var U;function ie(){if(!ee.current||!$)return;const se=document.activeElement;if(ba(se)||J.current){var fe;const ge=((fe=window.visualViewport)==null?void 0:fe.height)||0,oe=window.innerHeight;let de=oe-ge;const ve=ee.current.getBoundingClientRect().height||0,le=ve>oe*.8;De.current||(De.current=ve);const Ke=ee.current.getBoundingClientRect().top;if(Math.abs(ye.current-de)>60&&(J.current=!J.current),a&&a.length>0&&We&&Ze){const we=We[Ze]||0;de+=we}if(ye.current=de,ve>ge||J.current){const we=ee.current.getBoundingClientRect().height;let Ce=we;we>ge&&(Ce=ge-(le?Ke:wa)),v?ee.current.style.height=`${we-Math.max(de,0)}px`:ee.current.style.height=`${Math.max(Ce,ge-Ke)}px`}else B1()||(ee.current.style.height=`${De.current}px`);a&&a.length>0&&!J.current?ee.current.style.bottom="0px":ee.current.style.bottom=`${Math.max(de,0)}px`}}return(U=window.visualViewport)==null||U.addEventListener("resize",ie),()=>{var se;return(se=window.visualViewport)==null?void 0:se.removeEventListener("resize",ie)}},[Ze,a,We]);function Ve(U){An(),b==null||b(),U||E(!1),setTimeout(()=>{a&&Pt(a[0])},ke.DURATION*1e3)}function ln(){if(!ee.current)return;const U=document.querySelector("[data-vaul-drawer-wrapper]"),ie=Nr(ee.current,D);Le(ee.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${ke.DURATION}s cubic-bezier(${ke.EASE.join(",")})`}),Le(j.current,{transition:`opacity ${ke.DURATION}s cubic-bezier(${ke.EASE.join(",")})`,opacity:"1"}),i&&ie&&ie>0&&O&&Le(U,{borderRadius:`${Nd}px`,overflow:"hidden",...Ae(D)?{transform:`scale(${Ne()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Ne()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${ke.DURATION}s`,transitionTimingFunction:`cubic-bezier(${ke.EASE.join(",")})`},!0)}function An(){!P||!ee.current||(ee.current.classList.remove(Zo),K.current=!1,Y(!1),V.current=new Date)}function un(U){if(!P||!ee.current)return;ee.current.classList.remove(Zo),K.current=!1,Y(!1),V.current=new Date;const ie=Nr(ee.current,D);if(!U||!Qe(U.target,!1)||!ie||Number.isNaN(ie)||G.current===null)return;const se=V.current.getTime()-G.current.getTime(),fe=Q.current-(Ae(D)?U.pageY:U.pageX),ge=Math.abs(fe)/se;if(ge>.05&&(T(!0),setTimeout(()=>{T(!1)},200)),a){Oe({draggedDistance:fe*(D==="bottom"||D==="right"?1:-1),closeDrawer:Ve,velocity:ge,dismissible:m}),o==null||o(U,!0);return}if(D==="bottom"||D==="right"?fe>0:fe<0){ln(),o==null||o(U,!0);return}if(ge>Ed){Ve(),o==null||o(U,!1);return}var oe;const de=Math.min((oe=ee.current.getBoundingClientRect().height)!=null?oe:0,window.innerHeight);var ve;const le=Math.min((ve=ee.current.getBoundingClientRect().width)!=null?ve:0,window.innerWidth),Ke=D==="left"||D==="right";if(Math.abs(ie)>=(Ke?le:de)*l){Ve(),o==null||o(U,!1);return}o==null||o(U,!0),ln()}w.useEffect(()=>(O&&(Le(document.documentElement,{scrollBehavior:"auto"}),H.current=new Date),()=>{J1(document.documentElement,"scrollBehavior")}),[O]);function Vt(U){const ie=U?(window.innerWidth-Zt)/window.innerWidth:1,se=U?-Zt:0;X.current&&window.clearTimeout(X.current),Le(ee.current,{transition:`transform ${ke.DURATION}s cubic-bezier(${ke.EASE.join(",")})`,transform:Ae(D)?`scale(${ie}) translate3d(0, ${se}px, 0)`:`scale(${ie}) translate3d(${se}px, 0, 0)`}),!U&&ee.current&&(X.current=setTimeout(()=>{const fe=Nr(ee.current,D);Le(ee.current,{transition:"none",transform:Ae(D)?`translate3d(0, ${fe}px, 0)`:`translate3d(${fe}px, 0, 0)`})},500))}function In(U,ie){if(ie<0)return;const se=(window.innerWidth-Zt)/window.innerWidth,fe=se+ie*(1-se),ge=-Zt+ie*Zt;Le(ee.current,{transform:Ae(D)?`scale(${fe}) translate3d(0, ${ge}px, 0)`:`scale(${fe}) translate3d(${ge}px, 0, 0)`,transition:"none"})}function At(U,ie){const se=Ae(D)?window.innerHeight:window.innerWidth,fe=ie?(se-Zt)/se:1,ge=ie?-Zt:0;ie&&Le(ee.current,{transition:`transform ${ke.DURATION}s cubic-bezier(${ke.EASE.join(",")})`,transform:Ae(D)?`scale(${fe}) translate3d(0, ${ge}px, 0)`:`scale(${fe}) translate3d(${ge}px, 0, 0)`})}return w.useEffect(()=>{g||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[g]),w.createElement(Qa,{defaultOpen:C,onOpenChange:U=>{!m&&!U||(U?k(!0):Ve(!0),E(U))},open:O},w.createElement(Sd.Provider,{value:{activeSnapPoint:Me,snapPoints:a,setActiveSnapPoint:Pt,drawerRef:ee,overlayRef:j,onOpenChange:t,onPress:Pe,onRelease:un,onDrag:cn,dismissible:m,shouldAnimate:ae,handleOnly:c,isOpen:O,isDragging:P,shouldFade:ue,closeDrawer:Ve,onNestedDrag:In,onNestedOpenChange:Vt,onNestedRelease:At,keyboardIsOpen:J,modal:g,snapPointsOffset:We,activeSnapPointIndex:Ze,direction:D,shouldScaleBackground:i,setBackgroundColorOnScale:s,noBodyStyles:S,container:W,autoFocus:q}},n))}const _d=w.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:s,shouldAnimate:l}=mr(),u=Dd(t,n),m=r&&r.length>0;if(!s)return null;const c=w.useCallback(p=>o(p),[o]);return w.createElement(ho,{onMouseUp:c,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":i&&m?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false","data-vaul-animate":l!=null&&l.current?"true":"false",...e})});_d.displayName="Drawer.Overlay";const Od=w.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:s,onDrag:l,keyboardIsOpen:u,snapPointsOffset:m,activeSnapPointIndex:c,modal:p,isOpen:h,direction:y,snapPoints:v,container:g,handleOnly:b,shouldAnimate:x,autoFocus:S}=mr(),[D,C]=w.useState(!1),R=Dd(o,a),M=w.useRef(null),N=w.useRef(null),$=w.useRef(!1),F=v&&v.length>0;iS();const W=(I,_,O=0)=>{if($.current)return!0;const E=Math.abs(I.y),A=Math.abs(I.x),k=A>E,P=["bottom","right"].includes(_)?1:-1;if(_==="left"||_==="right"){if(!(I.x*P<0)&&A>=0&&A<=O)return k}else if(!(I.y*P<0)&&E>=0&&E<=O)return!k;return $.current=!0,!0};w.useEffect(()=>{F&&window.requestAnimationFrame(()=>{C(!0)})},[]);function q(I){M.current=null,$.current=!1,s(I)}return w.createElement(go,{"data-vaul-drawer-direction":y,"data-vaul-drawer":"","data-vaul-delayed-snap-points":D?"true":"false","data-vaul-snap-points":h&&F?"true":"false","data-vaul-custom-container":g?"true":"false","data-vaul-animate":x!=null&&x.current?"true":"false",...r,ref:R,style:m&&m.length>0?{"--snap-point-height":`${m[c??0]}px`,...t}:t,onPointerDown:I=>{b||(r.onPointerDown==null||r.onPointerDown.call(r,I),M.current={x:I.pageX,y:I.pageY},i(I))},onOpenAutoFocus:I=>{n==null||n(I),S||I.preventDefault()},onPointerDownOutside:I=>{if(e==null||e(I),!p||I.defaultPrevented){I.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:I=>{if(!p){I.preventDefault();return}},onPointerMove:I=>{if(N.current=I,b||(r.onPointerMove==null||r.onPointerMove.call(r,I),!M.current))return;const _=I.pageY-M.current.y,O=I.pageX-M.current.x,E=I.pointerType==="touch"?10:2;W({x:O,y:_},y,E)?l(I):(Math.abs(O)>E||Math.abs(_)>E)&&(M.current=null)},onPointerUp:I=>{r.onPointerUp==null||r.onPointerUp.call(r,I),M.current=null,$.current=!1,s(I)},onPointerOut:I=>{r.onPointerOut==null||r.onPointerOut.call(r,I),q(N.current)},onContextMenu:I=>{r.onContextMenu==null||r.onContextMenu.call(r,I),N.current&&q(N.current)}})});Od.displayName="Drawer.Content";const uS=250,dS=120,fS=w.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:s,setActiveSnapPoint:l,dismissible:u,handleOnly:m,isOpen:c,onPress:p,onDrag:h}=mr(),y=w.useRef(null),v=w.useRef(!1);function g(){if(v.current){S();return}window.setTimeout(()=>{b()},dS)}function b(){if(a||e||v.current){S();return}if(S(),!i||i.length===0){u||o();return}if(s===i[i.length-1]&&u){o();return}const C=i.findIndex(M=>M===s);if(C===-1)return;const R=i[C+1];l(R)}function x(){y.current=window.setTimeout(()=>{v.current=!0},uS)}function S(){y.current&&window.clearTimeout(y.current),v.current=!1}return w.createElement("div",{onClick:g,onPointerCancel:S,onPointerDown:D=>{m&&p(D),x()},onPointerMove:D=>{m&&h(D)},ref:r,"data-vaul-drawer-visible":c?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},w.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});fS.displayName="Drawer.Handle";function mS(e){const t=mr(),{container:n=t.container,...r}=e;return w.createElement(Ja,{container:n,...r})}const mt={Root:lS,Content:Od,Overlay:_d,Trigger:Eu,Portal:mS,Close:ns,Title:es,Description:ts},Pd=({shouldScaleBackground:e=!0,...t})=>d.jsx(mt.Root,{shouldScaleBackground:e,...t});Pd.displayName="Drawer";const pS=mt.Trigger,hS=mt.Portal,gS=mt.Close,Ad=f.forwardRef(({className:e,...t},n)=>d.jsx(mt.Overlay,{ref:n,className:B("fixed inset-0 z-50 bg-black/80",e),...t}));Ad.displayName=mt.Overlay.displayName;const Id=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(hS,{children:[d.jsx(Ad,{}),d.jsxs(mt.Content,{ref:r,className:B("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:B("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:B("mt-auto flex flex-col gap-2 p-4",e),...t});$d.displayName="DrawerFooter";const Ld=f.forwardRef(({className:e,...t},n)=>d.jsx(mt.Title,{ref:n,className:B("text-lg font-semibold leading-none tracking-tight",e),...t}));Ld.displayName=mt.Title.displayName;const Fd=f.forwardRef(({className:e,...t},n)=>d.jsx(mt.Description,{ref:n,className:B("text-sm text-muted-foreground",e),...t}));Fd.displayName=mt.Description.displayName;var Qo="rovingFocusGroup.onEntryFocus",vS={bubbles:!1,cancelable:!0},pr="RovingFocusGroup",[xa,Wd,yS]=Ya(pr),[bS,Pn]=ze(pr,[yS]),[wS,xS]=bS(pr),Bd=f.forwardRef((e,t)=>d.jsx(xa.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(xa.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(SS,{...e,ref:t})})}));Bd.displayName=pr;var SS=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...c}=e,p=f.useRef(null),h=he(t,p),y=cr(a),[v,g]=st({prop:i,defaultProp:s??null,onChange:l,caller:pr}),[b,x]=f.useState(!1),S=at(u),D=Wd(n),C=f.useRef(!1),[R,M]=f.useState(0);return f.useEffect(()=>{const N=p.current;if(N)return N.addEventListener(Qo,S),()=>N.removeEventListener(Qo,S)},[S]),d.jsx(wS,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:v,onItemFocus:f.useCallback(N=>g(N),[g]),onItemShiftTab:f.useCallback(()=>x(!0),[]),onFocusableItemAdd:f.useCallback(()=>M(N=>N+1),[]),onFocusableItemRemove:f.useCallback(()=>M(N=>N-1),[]),children:d.jsx(te.div,{tabIndex:b||R===0?-1:0,"data-orientation":r,...c,ref:h,style:{outline:"none",...e.style},onMouseDown:Z(e.onMouseDown,()=>{C.current=!0}),onFocus:Z(e.onFocus,N=>{const $=!C.current;if(N.target===N.currentTarget&&$&&!b){const F=new CustomEvent(Qo,vS);if(N.currentTarget.dispatchEvent(F),!F.defaultPrevented){const W=D().filter(E=>E.focusable),q=W.find(E=>E.active),I=W.find(E=>E.id===v),O=[q,I,...W].filter(Boolean).map(E=>E.ref.current);zd(O,m)}}C.current=!1}),onBlur:Z(e.onBlur,()=>x(!1))})})}),Yd="RovingFocusGroupItem",Hd=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,l=_e(),u=a||l,m=xS(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(te.span,{tabIndex:c?0:-1,"data-orientation":m.orientation,...s,ref:t,onMouseDown:Z(e.onMouseDown,g=>{r?m.onItemFocus(u):g.preventDefault()}),onFocus:Z(e.onFocus,()=>m.onItemFocus(u)),onKeyDown:Z(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){m.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const b=DS(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?kS(S,D+1):S.slice(D+1)}setTimeout(()=>zd(S))}}),children:typeof i=="function"?i({isCurrentTabStop:c,hasTabStop:v!=null}):i})})});Hd.displayName=Yd;var CS={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function MS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function DS(e,t,n){const r=MS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return CS[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 kS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ds=Bd,fs=Hd,Sa=["Enter"," "],ES=["ArrowDown","PageUp","Home"],Gd=["ArrowUp","PageDown","End"],NS=[...ES,...Gd],RS={ltr:[...Sa,"ArrowRight"],rtl:[...Sa,"ArrowLeft"]},TS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},hr="Menu",[Xn,_S,OS]=Ya(hr),[sn,Ud]=ze(hr,[OS,Ht,Pn]),gr=Ht(),qd=Pn(),[Vd,qt]=sn(hr),[PS,vr]=sn(hr),Kd=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,s=gr(t),[l,u]=f.useState(null),m=f.useRef(!1),c=at(a),p=cr(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(rr,{...s,children:d.jsx(Vd,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:d.jsx(PS,{scope:t,onClose:f.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:m,dir:p,modal:i,children:r})})})};Kd.displayName=hr;var AS="MenuAnchor",ms=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=gr(n);return d.jsx(or,{...o,...r,ref:t})});ms.displayName=AS;var ps="MenuPortal",[IS,Xd]=sn(ps,{forceMount:void 0}),Zd=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=qt(ps,t);return d.jsx(IS,{scope:t,forceMount:n,children:d.jsx(Ue,{present:n||a.open,children:d.jsx(ar,{asChild:!0,container:o,children:r})})})};Zd.displayName=ps;var ot="MenuContent",[jS,hs]=sn(ot),Qd=f.forwardRef((e,t)=>{const n=Xd(ot,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=qt(ot,e.__scopeMenu),i=vr(ot,e.__scopeMenu);return d.jsx(Xn.Provider,{scope:e.__scopeMenu,children:d.jsx(Ue,{present:r||a.open,children:d.jsx(Xn.Slot,{scope:e.__scopeMenu,children:i.modal?d.jsx($S,{...o,ref:t}):d.jsx(LS,{...o,ref:t})})})})}),$S=f.forwardRef((e,t)=>{const n=qt(ot,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return ao(a)},[]),d.jsx(gs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Z(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),LS=f.forwardRef((e,t)=>{const n=qt(ot,e.__scopeMenu);return d.jsx(gs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),FS=Ft("MenuContent.ScrollLock"),gs=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:c,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...v}=e,g=qt(ot,n),b=vr(ot,n),x=gr(n),S=qd(n),D=_S(n),[C,R]=f.useState(null),M=f.useRef(null),N=he(t,M,g.onContentChange),$=f.useRef(0),F=f.useRef(""),W=f.useRef(0),q=f.useRef(null),I=f.useRef("right"),_=f.useRef(0),O=y?sr:f.Fragment,E=y?{as:FS,allowPinchZoom:!0}:void 0,A=P=>{var L,K;const Y=F.current+P,z=D().filter(X=>!X.disabled),T=document.activeElement,j=(L=z.find(X=>X.ref.current===T))==null?void 0:L.textValue,H=z.map(X=>X.textValue),G=ZS(H,Y,j),V=(K=z.find(X=>X.textValue===G))==null?void 0:K.ref.current;(function X(Q){F.current=Q,window.clearTimeout($.current),Q!==""&&($.current=window.setTimeout(()=>X(""),1e3))})(Y),V&&setTimeout(()=>V.focus())};f.useEffect(()=>()=>window.clearTimeout($.current),[]),Jr();const k=f.useCallback(P=>{var z,T;return I.current===((z=q.current)==null?void 0:z.side)&&JS(P,(T=q.current)==null?void 0:T.area)},[]);return d.jsx(jS,{scope:n,searchRef:F,onItemEnter:f.useCallback(P=>{k(P)&&P.preventDefault()},[k]),onItemLeave:f.useCallback(P=>{var Y;k(P)||((Y=M.current)==null||Y.focus(),R(null))},[k]),onTriggerLeave:f.useCallback(P=>{k(P)&&P.preventDefault()},[k]),pointerGraceTimerRef:W,onPointerGraceIntentChange:f.useCallback(P=>{q.current=P},[]),children:d.jsx(O,{...E,children:d.jsx(tr,{asChild:!0,trapped:o,onMountAutoFocus:Z(a,P=>{var Y;P.preventDefault(),(Y=M.current)==null||Y.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:d.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:c,onInteractOutside:p,onDismiss:h,children:d.jsx(ds,{asChild:!0,...S,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:R,onEntryFocus:Z(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,...x,...v,ref:N,style:{outline:"none",...v.style},onKeyDown:Z(v.onKeyDown,P=>{const z=P.target.closest("[data-radix-menu-content]")===P.currentTarget,T=P.ctrlKey||P.altKey||P.metaKey,j=P.key.length===1;z&&(P.key==="Tab"&&P.preventDefault(),!T&&j&&A(P.key));const H=M.current;if(P.target!==H||!NS.includes(P.key))return;P.preventDefault();const V=D().filter(L=>!L.disabled).map(L=>L.ref.current);Gd.includes(P.key)&&V.reverse(),KS(V)}),onBlur:Z(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout($.current),F.current="")}),onPointerMove:Z(e.onPointerMove,Zn(P=>{const Y=P.target,z=_.current!==P.clientX;if(P.currentTarget.contains(Y)&&z){const T=P.clientX>_.current?"right":"left";I.current=T,_.current=P.clientX}}))})})})})})})});Qd.displayName=ot;var WS="MenuGroup",vs=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(te.div,{role:"group",...r,ref:t})});vs.displayName=WS;var BS="MenuLabel",Jd=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(te.div,{...r,ref:t})});Jd.displayName=BS;var qr="MenuItem",Ti="menu.itemSelect",wo=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),i=vr(qr,e.__scopeMenu),s=hs(qr,e.__scopeMenu),l=he(t,a),u=f.useRef(!1),m=()=>{const c=a.current;if(!n&&c){const p=new CustomEvent(Ti,{bubbles:!0,cancelable:!0});c.addEventListener(Ti,h=>r==null?void 0:r(h),{once:!0}),Zi(c,p),p.defaultPrevented?u.current=!1:i.onClose()}};return d.jsx(ef,{...o,ref:l,disabled:n,onClick:Z(e.onClick,m),onPointerDown:c=>{var p;(p=e.onPointerDown)==null||p.call(e,c),u.current=!0},onPointerUp:Z(e.onPointerUp,c=>{var p;u.current||(p=c.currentTarget)==null||p.click()}),onKeyDown:Z(e.onKeyDown,c=>{const p=s.searchRef.current!=="";n||p&&c.key===" "||Sa.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});wo.displayName=qr;var ef=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=hs(qr,n),s=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(Xn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:d.jsx(fs,{asChild:!0,...s,focusable:!r,children:d.jsx(te.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:Z(e.onPointerMove,Zn(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Z(e.onPointerLeave,Zn(y=>i.onItemLeave(y))),onFocus:Z(e.onFocus,()=>c(!0)),onBlur:Z(e.onBlur,()=>c(!1))})})})}),YS="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":Vr(n)?"mixed":n,...o,ref:t,"data-state":ws(n),onSelect:Z(o.onSelect,()=>r==null?void 0:r(Vr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});tf.displayName=YS;var nf="MenuRadioGroup",[HS,zS]=sn(nf,{value:void 0,onValueChange:()=>{}}),rf=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=at(r);return d.jsx(HS,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(vs,{...o,ref:t})})});rf.displayName=nf;var of="MenuRadioItem",af=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=zS(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":ws(a),onSelect:Z(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});af.displayName=of;var ys="MenuItemIndicator",[sf,GS]=sn(ys,{checked:!1}),cf=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=GS(ys,n);return d.jsx(Ue,{present:r||Vr(a.checked)||a.checked===!0,children:d.jsx(te.span,{...o,ref:t,"data-state":ws(a.checked)})})});cf.displayName=ys;var US="MenuSeparator",lf=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(te.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});lf.displayName=US;var qS="MenuArrow",uf=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=gr(n);return d.jsx(oo,{...o,...r,ref:t})});uf.displayName=qS;var bs="MenuSub",[VS,df]=sn(bs),ff=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=qt(bs,t),i=gr(t),[s,l]=f.useState(null),[u,m]=f.useState(null),c=at(o);return f.useEffect(()=>(a.open===!1&&c(!1),()=>c(!1)),[a.open,c]),d.jsx(rr,{...i,children:d.jsx(Vd,{scope:t,open:r,onOpenChange:c,content:u,onContentChange:m,children:d.jsx(VS,{scope:t,contentId:_e(),triggerId:_e(),trigger:s,onTriggerChange:l,children:n})})})};ff.displayName=bs;var zn="MenuSubTrigger",mf=f.forwardRef((e,t)=>{const n=qt(zn,e.__scopeMenu),r=vr(zn,e.__scopeMenu),o=df(zn,e.__scopeMenu),a=hs(zn,e.__scopeMenu),i=f.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},m=f.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return f.useEffect(()=>m,[m]),f.useEffect(()=>{const c=s.current;return()=>{window.clearTimeout(c),l(null)}},[s,l]),d.jsx(ms,{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:Nt(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:Z(e.onPointerMove,Zn(c=>{a.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:Z(e.onPointerLeave,Zn(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,x=p[g?"left":"right"],S=p[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:c.clientX+b,y:c.clientY},{x,y:p.top},{x:S,y:p.top},{x:S,y:p.bottom},{x,y:p.bottom}],side:v}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(c),c.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Z(e.onKeyDown,c=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&c.key===" "||RS[r.dir].includes(c.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),c.preventDefault())})})})});mf.displayName=zn;var pf="MenuSubContent",hf=f.forwardRef((e,t)=>{const n=Xd(ot,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=qt(ot,e.__scopeMenu),i=vr(ot,e.__scopeMenu),s=df(pf,e.__scopeMenu),l=f.useRef(null),u=he(t,l);return d.jsx(Xn.Provider,{scope:e.__scopeMenu,children:d.jsx(Ue,{present:r||a.open,children:d.jsx(Xn.Slot,{scope:e.__scopeMenu,children:d.jsx(gs,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var c;i.isUsingKeyboardRef.current&&((c=l.current)==null||c.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:Z(e.onFocusOutside,m=>{m.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Z(e.onEscapeKeyDown,m=>{i.onClose(),m.preventDefault()}),onKeyDown:Z(e.onKeyDown,m=>{var h;const c=m.currentTarget.contains(m.target),p=TS[i.dir].includes(m.key);c&&p&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),m.preventDefault())})})})})})});hf.displayName=pf;function gf(e){return e?"open":"closed"}function Vr(e){return e==="indeterminate"}function ws(e){return Vr(e)?"indeterminate":e?"checked":"unchecked"}function KS(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function XS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ZS(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 i=XS(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function QS(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a],l=t[i],u=s.x,m=s.y,c=l.x,p=l.y;m>r!=p>r&&n<(c-u)*(r-m)/(p-m)+u&&(o=!o)}return o}function JS(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return QS(n,t)}function Zn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var eC=Kd,tC=ms,nC=Zd,rC=Qd,oC=vs,aC=Jd,sC=wo,iC=tf,cC=rf,lC=af,uC=cf,dC=lf,fC=uf,mC=ff,pC=mf,hC=hf,xo="DropdownMenu",[gC,yD]=ze(xo,[Ud]),Ge=Ud(),[vC,vf]=gC(xo),yf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=Ge(t),u=f.useRef(null),[m,c]=st({prop:o,defaultProp:a??!1,onChange:i,caller:xo});return d.jsx(vC,{scope:t,triggerId:_e(),triggerRef:u,contentId:_e(),open:m,onOpenChange:c,onOpenToggle:f.useCallback(()=>c(p=>!p),[c]),modal:s,children:d.jsx(eC,{...l,open:m,onOpenChange:c,dir:r,modal:s,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),i=Ge(n);return d.jsx(tC,{asChild:!0,...i,children:d.jsx(te.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:Nt(t,a.triggerRef),onPointerDown:Z(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:Z(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});wf.displayName=bf;var yC="DropdownMenuPortal",xf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ge(t);return d.jsx(nC,{...r,...n})};xf.displayName=yC;var Sf="DropdownMenuContent",Cf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vf(Sf,n),a=Ge(n),i=f.useRef(!1);return d.jsx(rC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:Z(e.onCloseAutoFocus,s=>{var l;i.current||(l=o.triggerRef.current)==null||l.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:Z(e.onInteractOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,m=l.button===2||u;(!o.modal||m)&&(i.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 bC="DropdownMenuGroup",Mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return d.jsx(oC,{...o,...r,ref:t})});Mf.displayName=bC;var wC="DropdownMenuLabel",Df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return d.jsx(aC,{...o,...r,ref:t})});Df.displayName=wC;var xC="DropdownMenuItem",kf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return d.jsx(sC,{...o,...r,ref:t})});kf.displayName=xC;var SC="DropdownMenuCheckboxItem",Ef=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return d.jsx(iC,{...o,...r,ref:t})});Ef.displayName=SC;var CC="DropdownMenuRadioGroup",Nf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return d.jsx(cC,{...o,...r,ref:t})});Nf.displayName=CC;var MC="DropdownMenuRadioItem",Rf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return d.jsx(lC,{...o,...r,ref:t})});Rf.displayName=MC;var DC="DropdownMenuItemIndicator",Tf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return d.jsx(uC,{...o,...r,ref:t})});Tf.displayName=DC;var kC="DropdownMenuSeparator",_f=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return d.jsx(dC,{...o,...r,ref:t})});_f.displayName=kC;var EC="DropdownMenuArrow",NC=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return d.jsx(fC,{...o,...r,ref:t})});NC.displayName=EC;var RC=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=Ge(t),[s,l]=st({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return d.jsx(mC,{...i,open:s,onOpenChange:l,children:n})},TC="DropdownMenuSubTrigger",Of=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return d.jsx(pC,{...o,...r,ref:t})});Of.displayName=TC;var _C="DropdownMenuSubContent",Pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return d.jsx(hC,{...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=_C;var OC=yf,PC=wf,AC=xf,Af=Cf,IC=Mf,If=Df,jf=kf,$f=Ef,jC=Nf,Lf=Rf,Ff=Tf,Wf=_f,$C=RC,Bf=Of,Yf=Pf;const LC=OC,FC=PC,WC=IC,BC=$C,YC=jC,Hf=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>d.jsxs(Bf,{ref:o,className:B("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(Ea,{className:"ml-auto"})]}));Hf.displayName=Bf.displayName;const zf=f.forwardRef(({className:e,...t},n)=>d.jsx(Yf,{ref:n,className:B("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(AC,{children:d.jsx(Af,{ref:r,sideOffset:t,className:B("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:B("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:B("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(Jn,{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:B("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:B("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:B("-mx-1 my-1 h-px bg-muted",e),...t}));Xf.displayName=Wf.displayName;const Zf=({className:e,...t})=>d.jsx("span",{className:B("ml-auto text-xs tracking-widest opacity-60",e),...t});Zf.displayName="DropdownMenuShortcut";var xs="Radio",[HC,Qf]=ze(xs),[zC,GC]=HC(xs),Jf=f.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="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(zC,{scope:n,checked:o,disabled:i,children:[d.jsx(te.button,{type:"button",role:"radio","aria-checked":o,"data-state":rm(o),"data-disabled":i?"":void 0,disabled:i,value:s,...m,ref:h,onClick:Z(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:s,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Jf.displayName=xs;var em="RadioIndicator",tm=f.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=GC(em,n);return d.jsx(Ue,{present:r||a.checked,children:d.jsx(te.span,{"data-state":rm(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});tm.displayName=em;var UC="RadioBubbleInput",nm=f.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=f.useRef(null),s=he(i,a),l=Ha(n),u=ja(t);return f.useEffect(()=>{const m=i.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(te.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});nm.displayName=UC;function rm(e){return e?"checked":"unchecked"}var qC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],So="RadioGroup",[VC,bD]=ze(So,[Pn,Qf]),om=Pn(),am=Qf(),[KC,XC]=VC(So),sm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:l,dir:u,loop:m=!0,onValueChange:c,...p}=e,h=om(n),y=cr(u),[v,g]=st({prop:a,defaultProp:o??null,onChange:c,caller:So});return d.jsx(KC,{scope:n,name:r,required:i,disabled:s,value:v,onValueChange:g,children:d.jsx(ds,{asChild:!0,...h,orientation:l,dir:y,loop:m,children:d.jsx(te.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":s?"":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=XC(im,n),i=a.disabled||r,s=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=>{qC.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(fs,{asChild:!0,...s,focusable:!i,active:c,children:d.jsx(Jf,{disabled:i,required:a.required,checked:c,...l,...o,name:a.name,ref:m,onCheck:()=>a.onValueChange(o.value),onKeyDown:Z(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Z(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});cm.displayName=im;var ZC="RadioGroupIndicator",lm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=am(n);return d.jsx(tm,{...o,...r,ref:t})});lm.displayName=ZC;var um=sm,dm=cm,QC=lm;const fm=f.forwardRef(({className:e,...t},n)=>d.jsx(um,{ref:n,className:B("grid gap-2",e),...t}));fm.displayName=um.displayName;const mm=f.forwardRef(({className:e,...t},n)=>d.jsx(dm,{ref:n,className:B(`
|
|
218
|
+
){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 B1(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function Y1(){return us(/^Mac/)}function H1(){return us(/^iPhone/)}function ki(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function z1(){return us(/^iPad/)||Y1()&&navigator.maxTouchPoints>1}function Cd(){return H1()||z1()}function us(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const G1=24,U1=typeof window<"u"?w.useLayoutEffect:w.useEffect;function Ei(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Vo=typeof document<"u"&&window.visualViewport;function Ni(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Md(e){for(Ni(e)&&(e=e.parentElement);e&&!Ni(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const q1=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Er=0,Ko;function V1(e={}){let{isDisabled:t}=e;U1(()=>{if(!t)return Er++,Er===1&&Cd()&&(Ko=K1()),()=>{Er--,Er===0&&(Ko==null||Ko())}},[t])}function K1(){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(()=>{Ri(p)}):Vo.addEventListener("resize",()=>Ri(p),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},i=window.pageXOffset,l=window.pageYOffset,u=Ei(X1(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=Ei(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 X1(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 Ri(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+G1;a>s&&(n.scrollTop+=o-r)}e=n.parentElement}}function ba(e){return e instanceof HTMLInputElement&&!q1.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Z1(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Q1(...e){return t=>e.forEach(n=>Z1(n,t))}function Dd(...e){return f.useCallback(Q1(...e),e)}const kd=new WeakMap;function je(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 J1(e,t){if(!e||!(e instanceof HTMLElement))return;let n=kd.get(e);n&&(e.style[t]=n[t])}const _e=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Nr(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(", ")[_e(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[_e(t)?5:4]):null)}function eS(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 tS(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const De={DURATION:.5,EASE:[.32,.72,0,1]},Ed=.4,nS=.25,rS=100,Nd=8,Zt=16,wa=26,Zo="vaul-dragging";function Rd(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function oS({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,o=w.useRef(r),a=Rd(t);return w.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function Td({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=oS({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=Rd(n),l=w.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 aS({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]=w.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);w.useEffect(()=>{function D(){h({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",D),()=>window.removeEventListener("resize",D)},[]);const y=w.useMemo(()=>m===(n==null?void 0:n[n.length-1])||null,[n,m]),g=w.useMemo(()=>{var D;return(D=n==null?void 0:n.findIndex(R=>R===m))!=null?D:null},[n,m]),v=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===m||!n,b=w.useMemo(()=>{const D=l?{width:l.getBoundingClientRect().width,height:l.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var R;return(R=n==null?void 0:n.map(j=>{const F=typeof j=="string";let $=0;if(F&&($=parseInt(j,10)),_e(i)){const B=F?$:p?j*D.height:0;return p?i==="bottom"?D.height-B:-D.height+B:B}const V=F?$:p?j*D.width:0;return p?i==="right"?D.width-V:-D.width+V:V}))!=null?R:[]},[n,p,l]),x=w.useMemo(()=>g!==null?b==null?void 0:b[g]:null,[b,g]),S=w.useCallback(D=>{var R;const j=(R=b==null?void 0:b.findIndex(F=>F===D))!=null?R:null;s(j),je(r.current,{transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,transform:_e(i)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`}),b&&j!==b.length-1&&a!==void 0&&j!==a&&j<a?je(o.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,opacity:"0"}):je(o.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,opacity:"1"}),c(n==null?void 0:n[Math.max(j,0)])},[r.current,n,b,a,o,c]);w.useEffect(()=>{if(m||e){var D;const R=(D=n==null?void 0:n.findIndex(j=>j===e||j===m))!=null?D:-1;b&&R!==-1&&typeof b[R]=="number"&&S(b[R])}},[m,e,n,b,S]);function M({draggedDistance:D,closeDrawer:R,velocity:j,dismissible:F}){if(a===void 0)return;const $=i==="bottom"||i==="right"?(x??0)-D:(x??0)+D,V=g===a-1,B=g===0,P=D>0;if(V&&je(o.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`}),!u&&j>2&&!P){F?R():S(b[0]);return}if(!u&&j>2&&P&&b&&n){S(b[n.length-1]);return}const T=b==null?void 0:b.reduce((A,E)=>typeof A!="number"||typeof E!="number"?A:Math.abs(E-$)<Math.abs(A-$)?E:A),k=_e(i)?window.innerHeight:window.innerWidth;if(j>Ed&&Math.abs(D)<k*.4){const A=P?1:-1;if(A>0&&y&&n){S(b[n.length-1]);return}if(B&&A<0&&F&&R(),g===null)return;S(b[g+A]);return}S(T)}function C({draggedDistance:D}){if(x===null)return;const R=i==="bottom"||i==="right"?x-D:x+D;(i==="bottom"||i==="right")&&R<b[b.length-1]||(i==="top"||i==="left")&&R>b[b.length-1]||je(r.current,{transform:_e(i)?`translate3d(0, ${R}px, 0)`:`translate3d(${R}px, 0, 0)`})}function N(D,R){if(!n||typeof g!="number"||!b||a===void 0)return null;const j=g===a-1;if(g>=a&&R)return 0;if(j&&!R)return 1;if(!v&&!j)return null;const $=j?g+1:g-1,V=j?b[$]-b[$-1]:b[$+1]-b[$],B=D/Math.abs(V);return j?1-B:B}return{isLastSnapPoint:y,activeSnapPoint:m,shouldFade:v,getPercentageDragged:N,setActiveSnapPoint:c,activeSnapPointIndex:g,onRelease:M,onDrag:C,snapPointsOffset:b}}const sS=()=>()=>{};function iS(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=mr(),a=w.useRef(null),s=w.useMemo(()=>document.body.style.backgroundColor,[]);function i(){return(window.innerWidth-wa)/window.innerWidth}w.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;tS(r&&!o?Xo(document.body,{background:"black"}):sS,Xo(l,{transformOrigin:_e(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${De.DURATION}s`,transitionTimingFunction:`cubic-bezier(${De.EASE.join(",")})`}));const u=Xo(l,{borderRadius:`${Nd}px`,overflow:"hidden",..._e(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")},De.DURATION*1e3)}}},[t,n,s])}let Bn=null;function cS({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[s,i]=w.useState(()=>typeof window<"u"?window.location.href:""),l=w.useRef(0),u=w.useCallback(()=>{if(ki()&&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=w.useCallback(()=>{if(ki()&&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 w.useEffect(()=>{function c(){l.current=window.scrollY}return c(),window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}},[]),w.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),w.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 lS({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:s=!1,setBackgroundColorOnScale:i=!0,closeThreshold:l=nS,scrollLockTimeout:u=rS,dismissible:m=!0,handleOnly:c=!1,fadeFromIndex:p=a&&a.length-1,activeSnapPoint:h,setActiveSnapPoint:y,fixed:g,modal:v=!0,onClose:b,nested:x,noBodyStyles:S=!1,direction:M="bottom",defaultOpen:C=!1,disablePreventScroll:N=!0,snapToSequentialPoint:D=!1,preventScrollRestoration:R=!1,repositionInputs:j=!0,onAnimationEnd:F,container:$,autoFocus:V=!1}){var B,P;const[T=!1,k]=Td({defaultProp:C,prop:e,onChange:q=>{t==null||t(q),!q&&!x&&Be(),setTimeout(()=>{F==null||F(q)},De.DURATION*1e3),q&&!v&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),q||(document.body.style.pointerEvents="auto")}}),[A,E]=w.useState(!1),[O,Y]=w.useState(!1),[z,_]=w.useState(!1),I=w.useRef(null),H=w.useRef(null),G=w.useRef(null),U=w.useRef(null),W=w.useRef(null),Q=w.useRef(!1),K=w.useRef(null),X=w.useRef(0),se=w.useRef(!1),ie=w.useRef(!C),ye=w.useRef(0),J=w.useRef(null),Pe=w.useRef(((B=J.current)==null?void 0:B.getBoundingClientRect().height)||0),Ae=w.useRef(((P=J.current)==null?void 0:P.getBoundingClientRect().width)||0),Me=w.useRef(0),Ue=w.useCallback(q=>{a&&q===re.length-1&&(H.current=new Date)},[]),{activeSnapPoint:Ce,activeSnapPointIndex:Xe,setActiveSnapPoint:Ot,onRelease:Re,snapPointsOffset:re,onDrag:me,shouldFade:Te,getPercentageDragged:Le}=aS({snapPoints:a,activeSnapPointProp:h,setActiveSnapPointProp:y,drawerRef:J,fadeFromIndex:p,overlayRef:I,onSnapPointChange:Ue,direction:M,container:$,snapToSequentialPoint:D});V1({isDisabled:!T||O||!v||z||!A||!j||!N});const{restorePositionSetting:Be}=cS({isOpen:T,modal:v,nested:x??!1,hasBeenOpened:A,preventScrollRestoration:R,noBodyStyles:S});function at(){return(window.innerWidth-wa)/window.innerWidth}function qt(q){var ce,ae;!m&&!a||J.current&&!J.current.contains(q.target)||(Pe.current=((ce=J.current)==null?void 0:ce.getBoundingClientRect().height)||0,Ae.current=((ae=J.current)==null?void 0:ae.getBoundingClientRect().width)||0,Y(!0),G.current=new Date,Cd()&&window.addEventListener("touchend",()=>Q.current=!1,{once:!0}),q.target.setPointerCapture(q.pointerId),X.current=_e(M)?q.pageY:q.pageX)}function st(q,ce){var ae;let fe=q;const ge=(ae=window.getSelection())==null?void 0:ae.toString(),oe=J.current?Nr(J.current,M):null,de=new Date;if(fe.tagName==="SELECT"||fe.hasAttribute("data-vaul-no-drag")||fe.closest("[data-vaul-no-drag]"))return!1;if(M==="right"||M==="left")return!0;if(H.current&&de.getTime()-H.current.getTime()<500)return!1;if(oe!==null&&(M==="bottom"?oe>0:oe<0))return!0;if(ge&&ge.length>0)return!1;if(W.current&&de.getTime()-W.current.getTime()<u&&oe===0||ce)return W.current=de,!1;for(;fe;){if(fe.scrollHeight>fe.clientHeight){if(fe.scrollTop!==0)return W.current=new Date,!1;if(fe.getAttribute("role")==="dialog")return!0}fe=fe.parentNode}return!0}function cn(q){if(J.current&&O){const ce=M==="bottom"||M==="right"?1:-1,ae=(X.current-(_e(M)?q.pageY:q.pageX))*ce,fe=ae>0,ge=a&&!m&&!fe;if(ge&&Xe===0)return;const oe=Math.abs(ae),de=document.querySelector("[data-vaul-drawer-wrapper]"),ve=M==="bottom"||M==="top"?Pe.current:Ae.current;let ue=oe/ve;const Ve=Le(oe,fe);if(Ve!==null&&(ue=Ve),ge&&ue>=1||!Q.current&&!st(q.target,fe))return;if(J.current.classList.add(Zo),Q.current=!0,je(J.current,{transition:"none"}),je(I.current,{transition:"none"}),a&&me({draggedDistance:ae}),fe&&!a){const Se=eS(ae),Ze=Math.min(Se*-1,0)*ce;je(J.current,{transform:_e(M)?`translate3d(0, ${Ze}px, 0)`:`translate3d(${Ze}px, 0, 0)`});return}const we=1-ue;if((Te||p&&Xe===p-1)&&(r==null||r(q,ue),je(I.current,{opacity:`${we}`,transition:"none"},!0)),de&&I.current&&s){const Se=Math.min(at()+ue*(1-at()),1),Ze=8-ue*8,Fe=Math.max(0,14-ue*14);je(de,{borderRadius:`${Ze}px`,transform:_e(M)?`scale(${Se}) translate3d(0, ${Fe}px, 0)`:`scale(${Se}) translate3d(${Fe}px, 0, 0)`,transition:"none"},!0)}if(!a){const Se=oe*ce;je(J.current,{transform:_e(M)?`translate3d(0, ${Se}px, 0)`:`translate3d(${Se}px, 0, 0)`})}}}w.useEffect(()=>{window.requestAnimationFrame(()=>{ie.current=!0})},[]),w.useEffect(()=>{var q;function ce(){if(!J.current||!j)return;const ae=document.activeElement;if(ba(ae)||se.current){var fe;const ge=((fe=window.visualViewport)==null?void 0:fe.height)||0,oe=window.innerHeight;let de=oe-ge;const ve=J.current.getBoundingClientRect().height||0,ue=ve>oe*.8;Me.current||(Me.current=ve);const Ve=J.current.getBoundingClientRect().top;if(Math.abs(ye.current-de)>60&&(se.current=!se.current),a&&a.length>0&&re&&Xe){const we=re[Xe]||0;de+=we}if(ye.current=de,ve>ge||se.current){const we=J.current.getBoundingClientRect().height;let Se=we;we>ge&&(Se=ge-(ue?Ve:wa)),g?J.current.style.height=`${we-Math.max(de,0)}px`:J.current.style.height=`${Math.max(Se,ge-Ve)}px`}else B1()||(J.current.style.height=`${Me.current}px`);a&&a.length>0&&!se.current?J.current.style.bottom="0px":J.current.style.bottom=`${Math.max(de,0)}px`}}return(q=window.visualViewport)==null||q.addEventListener("resize",ce),()=>{var ae;return(ae=window.visualViewport)==null?void 0:ae.removeEventListener("resize",ce)}},[Xe,a,re]);function qe(q){An(),b==null||b(),q||k(!1),setTimeout(()=>{a&&Ot(a[0])},De.DURATION*1e3)}function ln(){if(!J.current)return;const q=document.querySelector("[data-vaul-drawer-wrapper]"),ce=Nr(J.current,M);je(J.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`}),je(I.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,opacity:"1"}),s&&ce&&ce>0&&T&&je(q,{borderRadius:`${Nd}px`,overflow:"hidden",..._e(M)?{transform:`scale(${at()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${at()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${De.DURATION}s`,transitionTimingFunction:`cubic-bezier(${De.EASE.join(",")})`},!0)}function An(){!O||!J.current||(J.current.classList.remove(Zo),Q.current=!1,Y(!1),U.current=new Date)}function un(q){if(!O||!J.current)return;J.current.classList.remove(Zo),Q.current=!1,Y(!1),U.current=new Date;const ce=Nr(J.current,M);if(!q||!st(q.target,!1)||!ce||Number.isNaN(ce)||G.current===null)return;const ae=U.current.getTime()-G.current.getTime(),fe=X.current-(_e(M)?q.pageY:q.pageX),ge=Math.abs(fe)/ae;if(ge>.05&&(_(!0),setTimeout(()=>{_(!1)},200)),a){Re({draggedDistance:fe*(M==="bottom"||M==="right"?1:-1),closeDrawer:qe,velocity:ge,dismissible:m}),o==null||o(q,!0);return}if(M==="bottom"||M==="right"?fe>0:fe<0){ln(),o==null||o(q,!0);return}if(ge>Ed){qe(),o==null||o(q,!1);return}var oe;const de=Math.min((oe=J.current.getBoundingClientRect().height)!=null?oe:0,window.innerHeight);var ve;const ue=Math.min((ve=J.current.getBoundingClientRect().width)!=null?ve:0,window.innerWidth),Ve=M==="left"||M==="right";if(Math.abs(ce)>=(Ve?ue:de)*l){qe(),o==null||o(q,!1);return}o==null||o(q,!0),ln()}w.useEffect(()=>(T&&(je(document.documentElement,{scrollBehavior:"auto"}),H.current=new Date),()=>{J1(document.documentElement,"scrollBehavior")}),[T]);function Vt(q){const ce=q?(window.innerWidth-Zt)/window.innerWidth:1,ae=q?-Zt:0;K.current&&window.clearTimeout(K.current),je(J.current,{transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,transform:_e(M)?`scale(${ce}) translate3d(0, ${ae}px, 0)`:`scale(${ce}) translate3d(${ae}px, 0, 0)`}),!q&&J.current&&(K.current=setTimeout(()=>{const fe=Nr(J.current,M);je(J.current,{transition:"none",transform:_e(M)?`translate3d(0, ${fe}px, 0)`:`translate3d(${fe}px, 0, 0)`})},500))}function In(q,ce){if(ce<0)return;const ae=(window.innerWidth-Zt)/window.innerWidth,fe=ae+ce*(1-ae),ge=-Zt+ce*Zt;je(J.current,{transform:_e(M)?`scale(${fe}) translate3d(0, ${ge}px, 0)`:`scale(${fe}) translate3d(${ge}px, 0, 0)`,transition:"none"})}function Pt(q,ce){const ae=_e(M)?window.innerHeight:window.innerWidth,fe=ce?(ae-Zt)/ae:1,ge=ce?-Zt:0;ce&&je(J.current,{transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,transform:_e(M)?`scale(${fe}) translate3d(0, ${ge}px, 0)`:`scale(${fe}) translate3d(${ge}px, 0, 0)`})}return w.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),w.createElement(Qa,{defaultOpen:C,onOpenChange:q=>{!m&&!q||(q?E(!0):qe(!0),k(q))},open:T},w.createElement(Sd.Provider,{value:{activeSnapPoint:Ce,snapPoints:a,setActiveSnapPoint:Ot,drawerRef:J,overlayRef:I,onOpenChange:t,onPress:qt,onRelease:un,onDrag:cn,dismissible:m,shouldAnimate:ie,handleOnly:c,isOpen:T,isDragging:O,shouldFade:Te,closeDrawer:qe,onNestedDrag:In,onNestedOpenChange:Vt,onNestedRelease:Pt,keyboardIsOpen:se,modal:v,snapPointsOffset:re,activeSnapPointIndex:Xe,direction:M,shouldScaleBackground:s,setBackgroundColorOnScale:i,noBodyStyles:S,container:$,autoFocus:V}},n))}const _d=w.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:s,modal:i,shouldAnimate:l}=mr(),u=Dd(t,n),m=r&&r.length>0;if(!i)return null;const c=w.useCallback(p=>o(p),[o]);return w.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=w.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:g,container:v,handleOnly:b,shouldAnimate:x,autoFocus:S}=mr(),[M,C]=w.useState(!1),N=Dd(o,a),D=w.useRef(null),R=w.useRef(null),j=w.useRef(!1),F=g&&g.length>0;iS();const $=(B,P,T=0)=>{if(j.current)return!0;const k=Math.abs(B.y),A=Math.abs(B.x),E=A>k,O=["bottom","right"].includes(P)?1:-1;if(P==="left"||P==="right"){if(!(B.x*O<0)&&A>=0&&A<=T)return E}else if(!(B.y*O<0)&&k>=0&&k<=T)return!E;return j.current=!0,!0};w.useEffect(()=>{F&&window.requestAnimationFrame(()=>{C(!0)})},[]);function V(B){D.current=null,j.current=!1,i(B)}return w.createElement(go,{"data-vaul-drawer-direction":y,"data-vaul-drawer":"","data-vaul-delayed-snap-points":M?"true":"false","data-vaul-snap-points":h&&F?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":x!=null&&x.current?"true":"false",...r,ref:N,style:m&&m.length>0?{"--snap-point-height":`${m[c??0]}px`,...t}:t,onPointerDown:B=>{b||(r.onPointerDown==null||r.onPointerDown.call(r,B),D.current={x:B.pageX,y:B.pageY},s(B))},onOpenAutoFocus:B=>{n==null||n(B),S||B.preventDefault()},onPointerDownOutside:B=>{if(e==null||e(B),!p||B.defaultPrevented){B.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:B=>{if(!p){B.preventDefault();return}},onPointerMove:B=>{if(R.current=B,b||(r.onPointerMove==null||r.onPointerMove.call(r,B),!D.current))return;const P=B.pageY-D.current.y,T=B.pageX-D.current.x,k=B.pointerType==="touch"?10:2;$({x:T,y:P},y,k)?l(B):(Math.abs(T)>k||Math.abs(P)>k)&&(D.current=null)},onPointerUp:B=>{r.onPointerUp==null||r.onPointerUp.call(r,B),D.current=null,j.current=!1,i(B)},onPointerOut:B=>{r.onPointerOut==null||r.onPointerOut.call(r,B),V(R.current)},onContextMenu:B=>{r.onContextMenu==null||r.onContextMenu.call(r,B),R.current&&V(R.current)}})});Od.displayName="Drawer.Content";const uS=250,dS=120,fS=w.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}=mr(),y=w.useRef(null),g=w.useRef(!1);function v(){if(g.current){S();return}window.setTimeout(()=>{b()},dS)}function b(){if(a||e||g.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(D=>D===i);if(C===-1)return;const N=s[C+1];l(N)}function x(){y.current=window.setTimeout(()=>{g.current=!0},uS)}function S(){y.current&&window.clearTimeout(y.current),g.current=!1}return w.createElement("div",{onClick:v,onPointerCancel:S,onPointerDown:M=>{m&&p(M),x()},onPointerMove:M=>{m&&h(M)},ref:r,"data-vaul-drawer-visible":c?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},w.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});fS.displayName="Drawer.Handle";function mS(e){const t=mr(),{container:n=t.container,...r}=e;return w.createElement(Ja,{container:n,...r})}const mt={Root:lS,Content:Od,Overlay:_d,Trigger:Eu,Portal:mS,Close:ns,Title:es,Description:ts},Pd=({shouldScaleBackground:e=!0,...t})=>d.jsx(mt.Root,{shouldScaleBackground:e,...t});Pd.displayName="Drawer";const pS=mt.Trigger,hS=mt.Portal,gS=mt.Close,Ad=f.forwardRef(({className:e,...t},n)=>d.jsx(mt.Overlay,{ref:n,className:L("fixed inset-0 z-50 bg-black/80",e),...t}));Ad.displayName=mt.Overlay.displayName;const Id=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(hS,{children:[d.jsx(Ad,{}),d.jsxs(mt.Content,{ref:r,className:L("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:L("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:L("mt-auto flex flex-col gap-2 p-4",e),...t});$d.displayName="DrawerFooter";const Ld=f.forwardRef(({className:e,...t},n)=>d.jsx(mt.Title,{ref:n,className:L("text-lg font-semibold leading-none tracking-tight",e),...t}));Ld.displayName=mt.Title.displayName;const Fd=f.forwardRef(({className:e,...t},n)=>d.jsx(mt.Description,{ref:n,className:L("text-sm text-muted-foreground",e),...t}));Fd.displayName=mt.Description.displayName;var Qo="rovingFocusGroup.onEntryFocus",vS={bubbles:!1,cancelable:!0},pr="RovingFocusGroup",[xa,Wd,yS]=Ya(pr),[bS,Pn]=He(pr,[yS]),[wS,xS]=bS(pr),Bd=f.forwardRef((e,t)=>d.jsx(xa.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(xa.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(SS,{...e,ref:t})})}));Bd.displayName=pr;var SS=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=cr(a),[g,v]=ot({prop:s,defaultProp:i??null,onChange:l,caller:pr}),[b,x]=f.useState(!1),S=rt(u),M=Wd(n),C=f.useRef(!1),[N,D]=f.useState(0);return f.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(Qo,S),()=>R.removeEventListener(Qo,S)},[S]),d.jsx(wS,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:f.useCallback(R=>v(R),[v]),onItemShiftTab:f.useCallback(()=>x(!0),[]),onFocusableItemAdd:f.useCallback(()=>D(R=>R+1),[]),onFocusableItemRemove:f.useCallback(()=>D(R=>R-1),[]),children:d.jsx(ee.div,{tabIndex:b||N===0?-1:0,"data-orientation":r,...c,ref:h,style:{outline:"none",...e.style},onMouseDown:Z(e.onMouseDown,()=>{C.current=!0}),onFocus:Z(e.onFocus,R=>{const j=!C.current;if(R.target===R.currentTarget&&j&&!b){const F=new CustomEvent(Qo,vS);if(R.currentTarget.dispatchEvent(F),!F.defaultPrevented){const $=M().filter(k=>k.focusable),V=$.find(k=>k.active),B=$.find(k=>k.id===g),T=[V,B,...$].filter(Boolean).map(k=>k.ref.current);zd(T,m)}}C.current=!1}),onBlur:Z(e.onBlur,()=>x(!1))})})}),Yd="RovingFocusGroupItem",Hd=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=Ne(),u=a||l,m=xS(Yd,n),c=m.currentTabStopId===u,p=Wd(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=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:Z(e.onMouseDown,v=>{r?m.onItemFocus(u):v.preventDefault()}),onFocus:Z(e.onFocus,()=>m.onItemFocus(u)),onKeyDown:Z(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){m.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=DS(v,m.orientation,m.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let S=p().filter(M=>M.focusable).map(M=>M.ref.current);if(b==="last")S.reverse();else if(b==="prev"||b==="next"){b==="prev"&&S.reverse();const M=S.indexOf(v.currentTarget);S=m.loop?kS(S,M+1):S.slice(M+1)}setTimeout(()=>zd(S))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:g!=null}):s})})});Hd.displayName=Yd;var CS={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function MS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function DS(e,t,n){const r=MS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return CS[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 kS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ds=Bd,fs=Hd,Sa=["Enter"," "],ES=["ArrowDown","PageUp","Home"],Gd=["ArrowUp","PageDown","End"],NS=[...ES,...Gd],RS={ltr:[...Sa,"ArrowRight"],rtl:[...Sa,"ArrowLeft"]},TS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},hr="Menu",[Xn,_S,OS]=Ya(hr),[sn,Ud]=He(hr,[OS,Yt,Pn]),gr=Yt(),qd=Pn(),[Vd,Ut]=sn(hr),[PS,vr]=sn(hr),Kd=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=gr(t),[l,u]=f.useState(null),m=f.useRef(!1),c=rt(a),p=cr(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(rr,{...i,children:d.jsx(Vd,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:d.jsx(PS,{scope:t,onClose:f.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:m,dir:p,modal:s,children:r})})})};Kd.displayName=hr;var AS="MenuAnchor",ms=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=gr(n);return d.jsx(or,{...o,...r,ref:t})});ms.displayName=AS;var ps="MenuPortal",[IS,Xd]=sn(ps,{forceMount:void 0}),Zd=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Ut(ps,t);return d.jsx(IS,{scope:t,forceMount:n,children:d.jsx(Ge,{present:n||a.open,children:d.jsx(ar,{asChild:!0,container:o,children:r})})})};Zd.displayName=ps;var nt="MenuContent",[jS,hs]=sn(nt),Qd=f.forwardRef((e,t)=>{const n=Xd(nt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Ut(nt,e.__scopeMenu),s=vr(nt,e.__scopeMenu);return d.jsx(Xn.Provider,{scope:e.__scopeMenu,children:d.jsx(Ge,{present:r||a.open,children:d.jsx(Xn.Slot,{scope:e.__scopeMenu,children:s.modal?d.jsx($S,{...o,ref:t}):d.jsx(LS,{...o,ref:t})})})})}),$S=f.forwardRef((e,t)=>{const n=Ut(nt,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return ao(a)},[]),d.jsx(gs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Z(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),LS=f.forwardRef((e,t)=>{const n=Ut(nt,e.__scopeMenu);return d.jsx(gs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),FS=Lt("MenuContent.ScrollLock"),gs=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,...g}=e,v=Ut(nt,n),b=vr(nt,n),x=gr(n),S=qd(n),M=_S(n),[C,N]=f.useState(null),D=f.useRef(null),R=he(t,D,v.onContentChange),j=f.useRef(0),F=f.useRef(""),$=f.useRef(0),V=f.useRef(null),B=f.useRef("right"),P=f.useRef(0),T=y?sr:f.Fragment,k=y?{as:FS,allowPinchZoom:!0}:void 0,A=O=>{var W,Q;const Y=F.current+O,z=M().filter(K=>!K.disabled),_=document.activeElement,I=(W=z.find(K=>K.ref.current===_))==null?void 0:W.textValue,H=z.map(K=>K.textValue),G=ZS(H,Y,I),U=(Q=z.find(K=>K.textValue===G))==null?void 0:Q.ref.current;(function K(X){F.current=X,window.clearTimeout(j.current),X!==""&&(j.current=window.setTimeout(()=>K(""),1e3))})(Y),U&&setTimeout(()=>U.focus())};f.useEffect(()=>()=>window.clearTimeout(j.current),[]),Jr();const E=f.useCallback(O=>{var z,_;return B.current===((z=V.current)==null?void 0:z.side)&&JS(O,(_=V.current)==null?void 0:_.area)},[]);return d.jsx(jS,{scope:n,searchRef:F,onItemEnter:f.useCallback(O=>{E(O)&&O.preventDefault()},[E]),onItemLeave:f.useCallback(O=>{var Y;E(O)||((Y=D.current)==null||Y.focus(),N(null))},[E]),onTriggerLeave:f.useCallback(O=>{E(O)&&O.preventDefault()},[E]),pointerGraceTimerRef:$,onPointerGraceIntentChange:f.useCallback(O=>{V.current=O},[]),children:d.jsx(T,{...k,children:d.jsx(tr,{asChild:!0,trapped:o,onMountAutoFocus:Z(a,O=>{var Y;O.preventDefault(),(Y=D.current)==null||Y.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:d.jsx(Nn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:c,onInteractOutside:p,onDismiss:h,children:d.jsx(ds,{asChild:!0,...S,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:N,onEntryFocus:Z(l,O=>{b.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(ro,{role:"menu","aria-orientation":"vertical","data-state":gf(v.open),"data-radix-menu-content":"",dir:b.dir,...x,...g,ref:R,style:{outline:"none",...g.style},onKeyDown:Z(g.onKeyDown,O=>{const z=O.target.closest("[data-radix-menu-content]")===O.currentTarget,_=O.ctrlKey||O.altKey||O.metaKey,I=O.key.length===1;z&&(O.key==="Tab"&&O.preventDefault(),!_&&I&&A(O.key));const H=D.current;if(O.target!==H||!NS.includes(O.key))return;O.preventDefault();const U=M().filter(W=>!W.disabled).map(W=>W.ref.current);Gd.includes(O.key)&&U.reverse(),KS(U)}),onBlur:Z(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(j.current),F.current="")}),onPointerMove:Z(e.onPointerMove,Zn(O=>{const Y=O.target,z=P.current!==O.clientX;if(O.currentTarget.contains(Y)&&z){const _=O.clientX>P.current?"right":"left";B.current=_,P.current=O.clientX}}))})})})})})})});Qd.displayName=nt;var WS="MenuGroup",vs=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ee.div,{role:"group",...r,ref:t})});vs.displayName=WS;var BS="MenuLabel",Jd=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ee.div,{...r,ref:t})});Jd.displayName=BS;var qr="MenuItem",Ti="menu.itemSelect",wo=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=vr(qr,e.__scopeMenu),i=hs(qr,e.__scopeMenu),l=he(t,a),u=f.useRef(!1),m=()=>{const c=a.current;if(!n&&c){const p=new CustomEvent(Ti,{bubbles:!0,cancelable:!0});c.addEventListener(Ti,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:Z(e.onClick,m),onPointerDown:c=>{var p;(p=e.onPointerDown)==null||p.call(e,c),u.current=!0},onPointerUp:Z(e.onPointerUp,c=>{var p;u.current||(p=c.currentTarget)==null||p.click()}),onKeyDown:Z(e.onKeyDown,c=>{const p=i.searchRef.current!=="";n||p&&c.key===" "||Sa.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});wo.displayName=qr;var ef=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=hs(qr,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(Xn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:d.jsx(fs,{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:Z(e.onPointerMove,Zn(y=>{r?s.onItemLeave(y):(s.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Z(e.onPointerLeave,Zn(y=>s.onItemLeave(y))),onFocus:Z(e.onFocus,()=>c(!0)),onBlur:Z(e.onBlur,()=>c(!1))})})})}),YS="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":Vr(n)?"mixed":n,...o,ref:t,"data-state":ws(n),onSelect:Z(o.onSelect,()=>r==null?void 0:r(Vr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});tf.displayName=YS;var nf="MenuRadioGroup",[HS,zS]=sn(nf,{value:void 0,onValueChange:()=>{}}),rf=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=rt(r);return d.jsx(HS,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(vs,{...o,ref:t})})});rf.displayName=nf;var of="MenuRadioItem",af=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=zS(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":ws(a),onSelect:Z(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});af.displayName=of;var ys="MenuItemIndicator",[sf,GS]=sn(ys,{checked:!1}),cf=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=GS(ys,n);return d.jsx(Ge,{present:r||Vr(a.checked)||a.checked===!0,children:d.jsx(ee.span,{...o,ref:t,"data-state":ws(a.checked)})})});cf.displayName=ys;var US="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=US;var qS="MenuArrow",uf=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=gr(n);return d.jsx(oo,{...o,...r,ref:t})});uf.displayName=qS;var bs="MenuSub",[VS,df]=sn(bs),ff=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Ut(bs,t),s=gr(t),[i,l]=f.useState(null),[u,m]=f.useState(null),c=rt(o);return f.useEffect(()=>(a.open===!1&&c(!1),()=>c(!1)),[a.open,c]),d.jsx(rr,{...s,children:d.jsx(Vd,{scope:t,open:r,onOpenChange:c,content:u,onContentChange:m,children:d.jsx(VS,{scope:t,contentId:Ne(),triggerId:Ne(),trigger:i,onTriggerChange:l,children:n})})})};ff.displayName=bs;var zn="MenuSubTrigger",mf=f.forwardRef((e,t)=>{const n=Ut(zn,e.__scopeMenu),r=vr(zn,e.__scopeMenu),o=df(zn,e.__scopeMenu),a=hs(zn,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(ms,{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:Et(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:Z(e.onPointerMove,Zn(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:Z(e.onPointerLeave,Zn(c=>{var h,y;m();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const g=(y=n.content)==null?void 0:y.dataset.side,v=g==="right",b=v?-5:5,x=p[v?"left":"right"],S=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:c.clientX+b,y:c.clientY},{x,y:p.top},{x:S,y:p.top},{x:S,y:p.bottom},{x,y:p.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(c),c.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Z(e.onKeyDown,c=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&c.key===" "||RS[r.dir].includes(c.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),c.preventDefault())})})})});mf.displayName=zn;var pf="MenuSubContent",hf=f.forwardRef((e,t)=>{const n=Xd(nt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Ut(nt,e.__scopeMenu),s=vr(nt,e.__scopeMenu),i=df(pf,e.__scopeMenu),l=f.useRef(null),u=he(t,l);return d.jsx(Xn.Provider,{scope:e.__scopeMenu,children:d.jsx(Ge,{present:r||a.open,children:d.jsx(Xn.Slot,{scope:e.__scopeMenu,children:d.jsx(gs,{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:Z(e.onFocusOutside,m=>{m.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Z(e.onEscapeKeyDown,m=>{s.onClose(),m.preventDefault()}),onKeyDown:Z(e.onKeyDown,m=>{var h;const c=m.currentTarget.contains(m.target),p=TS[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 Vr(e){return e==="indeterminate"}function ws(e){return Vr(e)?"indeterminate":e?"checked":"unchecked"}function KS(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function XS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ZS(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=XS(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 QS(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 JS(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return QS(n,t)}function Zn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var eC=Kd,tC=ms,nC=Zd,rC=Qd,oC=vs,aC=Jd,sC=wo,iC=tf,cC=rf,lC=af,uC=cf,dC=lf,fC=uf,mC=ff,pC=mf,hC=hf,xo="DropdownMenu",[gC,yD]=He(xo,[Ud]),ze=Ud(),[vC,vf]=gC(xo),yf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,l=ze(t),u=f.useRef(null),[m,c]=ot({prop:o,defaultProp:a??!1,onChange:s,caller:xo});return d.jsx(vC,{scope:t,triggerId:Ne(),triggerRef:u,contentId:Ne(),open:m,onOpenChange:c,onOpenToggle:f.useCallback(()=>c(p=>!p),[c]),modal:i,children:d.jsx(eC,{...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=ze(n);return d.jsx(tC,{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:Et(t,a.triggerRef),onPointerDown:Z(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:Z(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 yC="DropdownMenuPortal",xf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ze(t);return d.jsx(nC,{...r,...n})};xf.displayName=yC;var Sf="DropdownMenuContent",Cf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vf(Sf,n),a=ze(n),s=f.useRef(!1);return d.jsx(rC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:Z(e.onCloseAutoFocus,i=>{var l;s.current||(l=o.triggerRef.current)==null||l.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:Z(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 bC="DropdownMenuGroup",Mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ze(n);return d.jsx(oC,{...o,...r,ref:t})});Mf.displayName=bC;var wC="DropdownMenuLabel",Df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ze(n);return d.jsx(aC,{...o,...r,ref:t})});Df.displayName=wC;var xC="DropdownMenuItem",kf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ze(n);return d.jsx(sC,{...o,...r,ref:t})});kf.displayName=xC;var SC="DropdownMenuCheckboxItem",Ef=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ze(n);return d.jsx(iC,{...o,...r,ref:t})});Ef.displayName=SC;var CC="DropdownMenuRadioGroup",Nf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ze(n);return d.jsx(cC,{...o,...r,ref:t})});Nf.displayName=CC;var MC="DropdownMenuRadioItem",Rf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ze(n);return d.jsx(lC,{...o,...r,ref:t})});Rf.displayName=MC;var DC="DropdownMenuItemIndicator",Tf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ze(n);return d.jsx(uC,{...o,...r,ref:t})});Tf.displayName=DC;var kC="DropdownMenuSeparator",_f=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ze(n);return d.jsx(dC,{...o,...r,ref:t})});_f.displayName=kC;var EC="DropdownMenuArrow",NC=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ze(n);return d.jsx(fC,{...o,...r,ref:t})});NC.displayName=EC;var RC=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=ze(t),[i,l]=ot({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return d.jsx(mC,{...s,open:i,onOpenChange:l,children:n})},TC="DropdownMenuSubTrigger",Of=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ze(n);return d.jsx(pC,{...o,...r,ref:t})});Of.displayName=TC;var _C="DropdownMenuSubContent",Pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ze(n);return d.jsx(hC,{...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=_C;var OC=yf,PC=wf,AC=xf,Af=Cf,IC=Mf,If=Df,jf=kf,$f=Ef,jC=Nf,Lf=Rf,Ff=Tf,Wf=_f,$C=RC,Bf=Of,Yf=Pf;const LC=OC,FC=PC,WC=IC,BC=$C,YC=jC,Hf=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>d.jsxs(Bf,{ref:o,className:L("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(Ea,{className:"ml-auto"})]}));Hf.displayName=Bf.displayName;const zf=f.forwardRef(({className:e,...t},n)=>d.jsx(Yf,{ref:n,className:L("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(AC,{children:d.jsx(Af,{ref:r,sideOffset:t,className:L("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:L("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:L("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(Jn,{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:L("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:L("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:L("-mx-1 my-1 h-px bg-muted",e),...t}));Xf.displayName=Wf.displayName;const Zf=({className:e,...t})=>d.jsx("span",{className:L("ml-auto text-xs tracking-widest opacity-60",e),...t});Zf.displayName="DropdownMenuShortcut";var xs="Radio",[HC,Qf]=He(xs),[zC,GC]=HC(xs),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,v=>p(v)),y=f.useRef(!1),g=c?u||!!c.closest("form"):!0;return d.jsxs(zC,{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:Z(e.onClick,v=>{o||l==null||l(),g&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),g&&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=xs;var em="RadioIndicator",tm=f.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=GC(em,n);return d.jsx(Ge,{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 UC="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=Ha(n),u=ja(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=UC;function rm(e){return e?"checked":"unchecked"}var qC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],So="RadioGroup",[VC,bD]=He(So,[Pn,Qf]),om=Pn(),am=Qf(),[KC,XC]=VC(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=cr(u),[g,v]=ot({prop:a,defaultProp:o??null,onChange:c,caller:So});return d.jsx(KC,{scope:n,name:r,required:s,disabled:i,value:g,onValueChange:v,children:d.jsx(ds,{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=XC(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=g=>{qC.includes(g.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(fs,{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:Z(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Z(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});cm.displayName=im;var ZC="RadioGroupIndicator",lm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=am(n);return d.jsx(tm,{...o,...r,ref:t})});lm.displayName=ZC;var um=sm,dm=cm,QC=lm;const fm=f.forwardRef(({className:e,...t},n)=>d.jsx(um,{ref:n,className:L("grid gap-2",e),...t}));fm.displayName=um.displayName;const mm=f.forwardRef(({className:e,...t},n)=>d.jsx(dm,{ref:n,className:L(`
|
|
219
219
|
aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background
|
|
220
220
|
focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
221
221
|
disabled:cursor-not-allowed disabled:opacity-50
|
|
222
|
-
`,e),...t,children:d.jsx(QC,{className:"flex items-center justify-center",children:d.jsx(rc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));mm.displayName=dm.displayName;var Co="Tabs",[JC,wD]=
|
|
222
|
+
`,e),...t,children:d.jsx(QC,{className:"flex items-center justify-center",children:d.jsx(rc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));mm.displayName=dm.displayName;var Co="Tabs",[JC,wD]=He(Co,[Pn]),pm=Pn(),[eM,Ss]=JC(Co),hm=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,m=cr(i),[c,p]=ot({prop:r,onChange:o,defaultProp:a??"",caller:Co});return d.jsx(eM,{scope:n,baseId:Ne(),value:c,onValueChange:p,orientation:s,dir:m,activationMode:l,children:d.jsx(ee.div,{dir:m,"data-orientation":s,...u,ref:t})})});hm.displayName=Co;var gm="TabsList",vm=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Ss(gm,n),s=pm(n);return d.jsx(ds,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(ee.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});vm.displayName=gm;var ym="TabsTrigger",bm=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Ss(ym,n),i=pm(n),l=Sm(s.baseId,r),u=Cm(s.baseId,r),m=r===s.value;return d.jsx(fs,{asChild:!0,...i,focusable:!o,active:m,children:d.jsx(ee.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":u,"data-state":m?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:Z(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:Z(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:Z(e.onFocus,()=>{const c=s.activationMode!=="manual";!m&&!o&&c&&s.onValueChange(r)})})})});bm.displayName=ym;var wm="TabsContent",xm=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=Ss(wm,n),l=Sm(i.baseId,r),u=Cm(i.baseId,r),m=r===i.value,c=f.useRef(m);return f.useEffect(()=>{const p=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(p)},[]),d.jsx(Ge,{present:o||m,children:({present:p})=>d.jsx(ee.div,{"data-state":m?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:p&&a})})});xm.displayName=wm;function Sm(e,t){return`${e}-trigger-${t}`}function Cm(e,t){return`${e}-content-${t}`}var tM=hm,Mm=vm,Dm=bm,km=xm;const nM=tM,Em=f.forwardRef(({className:e,...t},n)=>d.jsx(Mm,{ref:n,className:L("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Em.displayName=Mm.displayName;const Nm=f.forwardRef(({className:e,...t},n)=>d.jsx(Dm,{ref:n,className:L("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Nm.displayName=Dm.displayName;const Rm=f.forwardRef(({className:e,...t},n)=>d.jsx(km,{ref:n,className:L("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Rm.displayName=km.displayName;var Cs="Progress",Ms=100,[rM,xD]=He(Cs),[oM,aM]=rM(Cs),Tm=f.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=sM,...s}=e;(o||o===0)&&!_i(o)&&console.error(iM(`${o}`,"Progress"));const i=_i(o)?o:Ms;r!==null&&!Oi(r,i)&&console.error(cM(`${r}`,"Progress"));const l=Oi(r,i)?r:null,u=Kr(l)?a(l,i):void 0;return d.jsx(oM,{scope:n,value:l,max:i,children:d.jsx(ee.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Kr(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":Pm(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});Tm.displayName=Cs;var _m="ProgressIndicator",Om=f.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=aM(_m,n);return d.jsx(ee.div,{"data-state":Pm(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Om.displayName=_m;function sM(e,t){return`${Math.round(e/t*100)}%`}function Pm(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Kr(e){return typeof e=="number"}function _i(e){return Kr(e)&&!isNaN(e)&&e>0}function Oi(e,t){return Kr(e)&&!isNaN(e)&&e<=t&&e>=0}function iM(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ms}\`.`}function cM(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
223
223
|
- a positive number
|
|
224
224
|
- less than the value passed to \`max\` (or ${Ms} if no \`max\` prop is set)
|
|
225
225
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
226
226
|
|
|
227
|
-
Defaulting to \`null\`.`}var Am=Tm,lM=Om;const Im=f.forwardRef(({className:e,value:t,...n},r)=>d.jsx(Am,{ref:r,className:B("relative h-1.5 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:d.jsx(lM,{className:"h-full w-full flex-1 bg-brandBlue transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Im.displayName=Am.displayName;function uM(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 dM=e=>{switch(e){case"success":return pM;case"info":return gM;case"warning":return hM;case"error":return vM;default:return null}},fM=Array(12).fill(0),mM=({visible:e,className:t})=>w.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},w.createElement("div",{className:"sonner-spinner"},fM.map((n,r)=>w.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),pM=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.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"})),hM=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},w.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"})),gM=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.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"})),vM=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.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"})),yM=w.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"},w.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),w.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),bM=()=>{const[e,t]=w.useState(document.hidden);return w.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ca=1;class wM{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++,i=this.toasts.find(l=>l.id===a),s=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:s,title:r}):l):this.addToast({title:r,...o,dismissible:s,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,i;const s=o.then(async u=>{if(i=["resolve",u],w.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(SM(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"&&!w.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"&&!w.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"&&!w.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:p,...y})}}).catch(async u=>{if(i=["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"&&!w.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)=>s.then(()=>i[0]==="reject"?m(i[1]):u(i[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 Xe=new wM,xM=(e,t)=>{const n=(t==null?void 0:t.id)||Ca++;return Xe.addToast({title:e,...t,id:n}),n},SM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",CM=xM,MM=()=>Xe.toasts,DM=()=>Xe.getActiveToasts(),Pi=Object.assign(CM,{success:Xe.success,info:Xe.info,warning:Xe.warning,error:Xe.error,custom:Xe.custom,message:Xe.message,promise:Xe.promise,dismiss:Xe.dismiss,loading:Xe.loading},{getHistory:MM,getToasts:DM});uM("[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 Rr(e){return e.label!==void 0}const kM=3,EM="24px",NM="16px",Ai=4e3,RM=356,TM=14,_M=45,OM=200;function pt(...e){return e.filter(Boolean).join(" ")}function PM(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const AM=e=>{var t,n,r,o,a,i,s,l,u;const{invert:m,toast:c,unstyled:p,interacting:h,setHeights:y,visibleToasts:v,heights:g,index:b,toasts:x,expanded:S,removeToast:D,defaultRichColors:C,closeButton:R,style:M,cancelButtonStyle:N,actionButtonStyle:$,className:F="",descriptionClassName:W="",duration:q,position:I,gap:_,expandByDefault:O,classNames:E,icons:A,closeButtonAriaLabel:k="Close toast"}=e,[P,Y]=w.useState(null),[z,T]=w.useState(null),[j,H]=w.useState(!1),[G,V]=w.useState(!1),[L,K]=w.useState(!1),[X,Q]=w.useState(!1),[J,ae]=w.useState(!1),[ye,ee]=w.useState(0),[Te,je]=w.useState(0),De=w.useRef(c.duration||q||Ai),qe=w.useRef(null),Me=w.useRef(null),Ze=b===0,Pt=b+1<=v,Oe=c.type,We=c.dismissible!==!1,Ct=c.className||"",ue=c.descriptionClassName||"",me=w.useMemo(()=>g.findIndex(oe=>oe.toastId===c.id)||0,[g,c.id]),Se=w.useMemo(()=>{var oe;return(oe=c.closeButton)!=null?oe:R},[c.closeButton,R]),Ne=w.useMemo(()=>c.duration||q||Ai,[c.duration,q]),Pe=w.useRef(0),Qe=w.useRef(0),cn=w.useRef(0),Ve=w.useRef(null),[ln,An]=I.split("-"),un=w.useMemo(()=>g.reduce((oe,de,ve)=>ve>=me?oe:oe+de.height,0),[g,me]),Vt=bM(),In=c.invert||m,At=Oe==="loading";Qe.current=w.useMemo(()=>me*_+un,[me,un]),w.useEffect(()=>{De.current=Ne},[Ne]),w.useEffect(()=>{H(!0)},[]),w.useEffect(()=>{const oe=Me.current;if(oe){const de=oe.getBoundingClientRect().height;return je(de),y(ve=>[{toastId:c.id,height:de,position:c.position},...ve]),()=>y(ve=>ve.filter(le=>le.toastId!==c.id))}},[y,c.id]),w.useLayoutEffect(()=>{if(!j)return;const oe=Me.current,de=oe.style.height;oe.style.height="auto";const ve=oe.getBoundingClientRect().height;oe.style.height=de,je(ve),y(le=>le.find(we=>we.toastId===c.id)?le.map(we=>we.toastId===c.id?{...we,height:ve}:we):[{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=w.useCallback(()=>{V(!0),ee(Qe.current),y(oe=>oe.filter(de=>de.toastId!==c.id)),setTimeout(()=>{D(c)},OM)},[c,D,y,Qe]);w.useEffect(()=>{if(c.promise&&Oe==="loading"||c.duration===1/0||c.type==="loading")return;let oe;return S||h||Vt?(()=>{if(cn.current<Pe.current){const le=new Date().getTime()-Pe.current;De.current=De.current-le}cn.current=new Date().getTime()})():(()=>{De.current!==1/0&&(Pe.current=new Date().getTime(),oe=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),U()},De.current))})(),()=>clearTimeout(oe)},[S,h,c,Oe,Vt,U]),w.useEffect(()=>{c.delete&&(U(),c.onDismiss==null||c.onDismiss.call(c,c))},[U,c.delete]);function ie(){var oe;if(A!=null&&A.loading){var de;return w.createElement("div",{className:pt(E==null?void 0:E.loader,c==null||(de=c.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":Oe==="loading"},A.loading)}return w.createElement(mM,{className:pt(E==null?void 0:E.loader,c==null||(oe=c.classNames)==null?void 0:oe.loader),visible:Oe==="loading"})}const se=c.icon||(A==null?void 0:A[Oe])||dM(Oe);var fe,ge;return w.createElement("li",{tabIndex:0,ref:Me,className:pt(F,Ct,E==null?void 0:E.toast,c==null||(t=c.classNames)==null?void 0:t.toast,E==null?void 0:E.default,E==null?void 0:E[Oe],c==null||(n=c.classNames)==null?void 0:n[Oe]),"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":J,"data-removed":G,"data-visible":Pt,"data-y-position":ln,"data-x-position":An,"data-index":b,"data-front":Ze,"data-swiping":L,"data-dismissible":We,"data-type":Oe,"data-invert":In,"data-swipe-out":X,"data-swipe-direction":z,"data-expanded":!!(S||O&&j),style:{"--index":b,"--toasts-before":b,"--z-index":x.length-b,"--offset":`${G?ye:Qe.current}px`,"--initial-height":O?"auto":`${Te}px`,...M,...c.style},onDragEnd:()=>{K(!1),Y(null),Ve.current=null},onPointerDown:oe=>{oe.button!==2&&(At||!We||(qe.current=new Date,ee(Qe.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(K(!0),Ve.current={x:oe.clientX,y:oe.clientY})))},onPointerUp:()=>{var oe,de,ve;if(X||!We)return;Ve.current=null;const le=Number(((oe=Me.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ke=Number(((de=Me.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),we=new Date().getTime()-((ve=qe.current)==null?void 0:ve.getTime()),Ce=P==="x"?le:Ke,Je=Math.abs(Ce)/we;if(Math.abs(Ce)>=_M||Je>.11){ee(Qe.current),c.onDismiss==null||c.onDismiss.call(c,c),T(P==="x"?le>0?"right":"left":Ke>0?"down":"up"),U(),Q(!0);return}else{var Be,it;(Be=Me.current)==null||Be.style.setProperty("--swipe-amount-x","0px"),(it=Me.current)==null||it.style.setProperty("--swipe-amount-y","0px")}ae(!1),K(!1),Y(null)},onPointerMove:oe=>{var de,ve,le;if(!Ve.current||!We||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const we=oe.clientY-Ve.current.y,Ce=oe.clientX-Ve.current.x;var Je;const Be=(Je=e.swipeDirections)!=null?Je:PM(I);!P&&(Math.abs(Ce)>1||Math.abs(we)>1)&&Y(Math.abs(Ce)>Math.abs(we)?"x":"y");let it={x:0,y:0};const ks=Kt=>1/(1.5+Math.abs(Kt)/20);if(P==="y"){if(Be.includes("top")||Be.includes("bottom"))if(Be.includes("top")&&we<0||Be.includes("bottom")&&we>0)it.y=we;else{const Kt=we*ks(we);it.y=Math.abs(Kt)<Math.abs(we)?Kt:we}}else if(P==="x"&&(Be.includes("left")||Be.includes("right")))if(Be.includes("left")&&Ce<0||Be.includes("right")&&Ce>0)it.x=Ce;else{const Kt=Ce*ks(Ce);it.x=Math.abs(Kt)<Math.abs(Ce)?Kt:Ce}(Math.abs(it.x)>0||Math.abs(it.y)>0)&&ae(!0),(ve=Me.current)==null||ve.style.setProperty("--swipe-amount-x",`${it.x}px`),(le=Me.current)==null||le.style.setProperty("--swipe-amount-y",`${it.y}px`)}},Se&&!c.jsx&&Oe!=="loading"?w.createElement("button",{"aria-label":k,"data-disabled":At,"data-close-button":!0,onClick:At||!We?()=>{}:()=>{U(),c.onDismiss==null||c.onDismiss.call(c,c)},className:pt(E==null?void 0:E.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(ge=A==null?void 0:A.close)!=null?ge:yM):null,(Oe||c.icon||c.promise)&&c.icon!==null&&((A==null?void 0:A[Oe])!==null||c.icon)?w.createElement("div",{"data-icon":"",className:pt(E==null?void 0:E.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"?se:null):null,w.createElement("div",{"data-content":"",className:pt(E==null?void 0:E.content,c==null||(a=c.classNames)==null?void 0:a.content)},w.createElement("div",{"data-title":"",className:pt(E==null?void 0:E.title,c==null||(i=c.classNames)==null?void 0:i.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?w.createElement("div",{"data-description":"",className:pt(W,ue,E==null?void 0:E.description,c==null||(s=c.classNames)==null?void 0:s.description)},typeof c.description=="function"?c.description():c.description):null),w.isValidElement(c.cancel)?c.cancel:c.cancel&&Rr(c.cancel)?w.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||N,onClick:oe=>{Rr(c.cancel)&&We&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,oe),U())},className:pt(E==null?void 0:E.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,w.isValidElement(c.action)?c.action:c.action&&Rr(c.action)?w.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||$,onClick:oe=>{Rr(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,oe),!oe.defaultPrevented&&U())},className:pt(E==null?void 0:E.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 IM(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,i=a?"--mobile-offset":"--offset",s=a?NM:EM;function l(u){["top","right","bottom","left"].forEach(m=>{n[`${i}-${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[`${i}-${u}`]=s:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(s)}),n}const jM=w.forwardRef(function(t,n){const{invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:s,className:l,offset:u,mobileOffset:m,theme:c="light",richColors:p,duration:h,style:y,visibleToasts:v=kM,toastOptions:g,dir:b=Ii(),gap:x=TM,icons:S,containerAriaLabel:D="Notifications"}=t,[C,R]=w.useState([]),M=w.useMemo(()=>Array.from(new Set([o].concat(C.filter(z=>z.position).map(z=>z.position)))),[C,o]),[N,$]=w.useState([]),[F,W]=w.useState(!1),[q,I]=w.useState(!1),[_,O]=w.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),E=w.useRef(null),A=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=w.useRef(null),P=w.useRef(!1),Y=w.useCallback(z=>{R(T=>{var j;return(j=T.find(H=>H.id===z.id))!=null&&j.delete||Xe.dismiss(z.id),T.filter(({id:H})=>H!==z.id)})},[]);return w.useEffect(()=>Xe.subscribe(z=>{if(z.dismiss){requestAnimationFrame(()=>{R(T=>T.map(j=>j.id===z.id?{...j,delete:!0}:j))});return}setTimeout(()=>{Xr.flushSync(()=>{R(T=>{const j=T.findIndex(H=>H.id===z.id);return j!==-1?[...T.slice(0,j),{...T[j],...z},...T.slice(j+1)]:[z,...T]})})})}),[C]),w.useEffect(()=>{if(c!=="system"){O(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),typeof window>"u")return;const z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:T})=>{O(T?"dark":"light")})}catch{z.addListener(({matches:j})=>{try{O(j?"dark":"light")}catch(H){console.error(H)}})}},[c]),w.useEffect(()=>{C.length<=1&&W(!1)},[C]),w.useEffect(()=>{const z=T=>{var j;if(a.every(V=>T[V]||T.code===V)){var G;W(!0),(G=E.current)==null||G.focus()}T.code==="Escape"&&(document.activeElement===E.current||(j=E.current)!=null&&j.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[a]),w.useEffect(()=>{if(E.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,P.current=!1)}},[E.current]),w.createElement("section",{ref:n,"aria-label":`${D} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((z,T)=>{var j;const[H,G]=z.split("-");return C.length?w.createElement("ol",{key:z,dir:b==="auto"?Ii():b,tabIndex:-1,ref:E,className:l,"data-sonner-toaster":!0,"data-sonner-theme":_,"data-y-position":H,"data-x-position":G,style:{"--front-toast-height":`${((j=N[0])==null?void 0:j.height)||0}px`,"--width":`${RM}px`,"--gap":`${x}px`,...y,...IM(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:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{q||W(!1)},onDragEnd:()=>W(!1),onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},C.filter(V=>!V.position&&T===0||V.position===z).map((V,L)=>{var K,X;return w.createElement(AM,{key:V.id,icons:S,index:L,toast:V,defaultRichColors:p,duration:(K=g==null?void 0:g.duration)!=null?K: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:s,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:Y,toasts:C.filter(Q=>Q.position==V.position),heights:N.filter(Q=>Q.position==V.position),setHeights:$,expandByDefault:i,gap:x,expanded:F,swipeDirections:t.swipeDirections})})):null}))}),$M={error:"bg-red-500 text-white",info:"bg-blue-500 text-white",warning:"bg-amber-500 text-white",success:"bg-green-500 text-white"},LM={error:5e3,info:4e3,warning:5e3,success:4e3},FM={error:d.jsx(th,{className:"w-4 h-4 text-white"}),info:d.jsx(uh,{className:"w-4 h-4 text-white"}),warning:d.jsx(wh,{className:"w-4 h-4 text-white"}),success:d.jsx(Jp,{className:"w-4 h-4 text-white"})},WM=(e,t)=>{const n=(t==null?void 0:t.variant)||"info",r=$M[n],o=(t==null?void 0:t.icon)??FM[n],a=(t==null?void 0:t.iconPosition)??"left",i=l=>d.jsxs("div",{className:`flex items-center justify-between w-full p-3 rounded-md shadow-md ${r}`,children:[d.jsxs("div",{className:"flex items-center",children:[o&&a==="left"&&d.jsx("div",{className:"mr-3",children:o}),d.jsxs("div",{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})]})]}),d.jsxs("div",{className:"flex items-center",children:[o&&a==="right"&&d.jsx("div",{className:"ml-3",children:o}),(t==null?void 0:t.action)&&d.jsx(Rt,{variant:"ghost",size:"small",className:"ml-3 text-white hover:text-black/80",onClick:t.action.onClick,children:t.action.label}),d.jsx(Rt,{variant:"ghost",size:"icon.large",className:"ml-3 text-white hover:text-black/80",onClick:()=>Pi.dismiss(l),children:d.jsx(En,{className:"w-4 h-4",strokeWidth:2.5})})]})]}),s={unstyled:!0,duration:(t==null?void 0:t.duration)||LM[n],style:{padding:0,margin:0,border:"none",background:"none"}};return Pi.custom(i,s)};function BM(e){return d.jsx(jM,{...e})}var[Mo,SD]=ze("Tooltip",[Ht]),Do=Ht(),jm="TooltipProvider",YM=700,Ma="tooltip.open",[HM,Ds]=Mo(jm),$m=e=>{const{__scopeTooltip:t,delayDuration:n=YM,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=f.useRef(!0),s=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(HM,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:f.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:a})};$m.displayName=jm;var Qn="Tooltip",[zM,ko]=Mo(Qn),Lm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=Ds(Qn,e.__scopeTooltip),u=Do(t),[m,c]=f.useState(null),p=_e(),h=f.useRef(0),y=i??l.disableHoverableContent,v=s??l.delayDuration,g=f.useRef(!1),[b,x]=st({prop:r,defaultProp:o??!1,onChange:M=>{M?(l.onOpen(),document.dispatchEvent(new CustomEvent(Ma))):l.onClose(),a==null||a(M)},caller:Qn}),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,x(!0)},[x]),C=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),R=f.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,x(!0),h.current=0},v)},[v,x]);return f.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),d.jsx(rr,{...u,children:d.jsx(zM,{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=Qn;var Da="TooltipTrigger",Fm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ko(Da,n),a=Ds(Da,n),i=Do(n),s=f.useRef(null),l=he(t,s,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(or,{asChild:!0,...i,children:d.jsx(te.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Z(e.onPointerMove,p=>{p.pointerType!=="touch"&&!m.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:Z(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:Z(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:Z(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Z(e.onBlur,o.onClose),onClick:Z(e.onClick,o.onClose)})})});Fm.displayName=Da;var GM="TooltipPortal",[CD,UM]=Mo(GM,{forceMount:void 0}),Mn="TooltipContent",Wm=f.forwardRef((e,t)=>{const n=UM(Mn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=ko(Mn,e.__scopeTooltip);return d.jsx(Ue,{present:r||i.open,children:i.disableHoverableContent?d.jsx(Bm,{side:o,...a,ref:t}):d.jsx(qM,{side:o,...a,ref:t})})}),qM=f.forwardRef((e,t)=>{const n=ko(Mn,e.__scopeTooltip),r=Ds(Mn,e.__scopeTooltip),o=f.useRef(null),a=he(t,o),[i,s]=f.useState(null),{trigger:l,onClose:u}=n,m=o.current,{onPointerInTransitChange:c}=r,p=f.useCallback(()=>{s(null),c(!1)},[c]),h=f.useCallback((y,v)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},x=ZM(b,g.getBoundingClientRect()),S=QM(b,x),D=JM(v.getBoundingClientRect()),C=tD([...S,...D]);s(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(i){const y=v=>{const g=v.target,b={x:v.clientX,y:v.clientY},x=(l==null?void 0:l.contains(g))||(m==null?void 0:m.contains(g)),S=!eD(b,i);x?p():S&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,m,i,u,p]),d.jsx(Bm,{...e,ref:a})}),[VM,KM]=Mo(Qn,{isInside:!1}),XM=Vm("TooltipContent"),Bm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=ko(Mn,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(Nn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:c=>c.preventDefault(),onDismiss:m,children:d.jsxs(ro,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.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(XM,{children:r}),d.jsx(VM,{scope:n,isInside:!0,children:d.jsx(py,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Wm.displayName=Mn;var Ym="TooltipArrow",Hm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Do(n);return KM(Ym,n).isInside?null:d.jsx(oo,{...o,...r,ref:t})});Hm.displayName=Ym;function ZM(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 QM(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 JM(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 eD(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a],l=t[i],u=s.x,m=s.y,c=l.x,p=l.y;m>r!=p>r&&n<(c-u)*(r-m)/(p-m)+u&&(o=!o)}return o}function tD(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),nD(t)}function nD(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],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.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],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.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 rD=$m,oD=Lm,aD=Fm,zm=Wm,sD=Hm;const iD=rD,cD=oD,lD=aD,Gm=f.forwardRef(({className:e,sideOffset:t=4,children:n,...r},o)=>d.jsxs(zm,{ref:o,sideOffset:t,className:B("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(sD,{className:"fill-background stroke-border h-2 w-4"})]}));Gm.displayName=zm.displayName;exports.ComponentVariant=d1;exports.DoctAddressFormSection=g0;exports.DoctAlert=Ju;exports.DoctAlertDescription=td;exports.DoctAlertTitle=ed;exports.DoctAnimationLoader=Ip;exports.DoctAutoComplete=i1;exports.DoctAutocomplete=y1;exports.DoctAvatar=dd;exports.DoctAvatarFallback=md;exports.DoctAvatarImage=fd;exports.DoctButton=Rt;exports.DoctCheckbox=xd;exports.DoctChip=i0;exports.DoctCircularProgress=Xi;exports.DoctComponentSection=u1;exports.DoctContactFormSection=y0;exports.DoctCurrencyInput=Gu;exports.DoctDatePickerField=Gr;exports.DoctDialog=Q0;exports.DoctDialogClose=t1;exports.DoctDialogContent=ju;exports.DoctDialogDescription=Wu;exports.DoctDialogFooter=Lu;exports.DoctDialogHeader=$u;exports.DoctDialogTitle=Fu;exports.DoctDialogTrigger=J0;exports.DoctDrawer=Pd;exports.DoctDrawerClose=gS;exports.DoctDrawerContent=Id;exports.DoctDrawerDescription=Fd;exports.DoctDrawerFooter=$d;exports.DoctDrawerHeader=jd;exports.DoctDrawerTitle=Ld;exports.DoctDrawerTrigger=pS;exports.DoctDropdownMenu=LC;exports.DoctDropdownMenuCheckboxItem=qf;exports.DoctDropdownMenuContent=Gf;exports.DoctDropdownMenuGroup=WC;exports.DoctDropdownMenuItem=Uf;exports.DoctDropdownMenuLabel=Kf;exports.DoctDropdownMenuRadioGroup=YC;exports.DoctDropdownMenuRadioItem=Vf;exports.DoctDropdownMenuSeparator=Xf;exports.DoctDropdownMenuShortcut=Zf;exports.DoctDropdownMenuSub=BC;exports.DoctDropdownMenuSubContent=zf;exports.DoctDropdownMenuSubTrigger=Hf;exports.DoctDropdownMenuTrigger=FC;exports.DoctExpandableCard=D1;exports.DoctLabeledInput=rt;exports.DoctManualDatePickerField=s0;exports.DoctOtpInput=Fp;exports.DoctPasswordInput=ra;exports.DoctPopover=Wa;exports.DoctPopoverContent=co;exports.DoctPopoverTrigger=Ba;exports.DoctProgress=Im;exports.DoctRadioGroup=fm;exports.DoctRadioGroupItem=mm;exports.DoctSearchFilterSection=f0;exports.DoctSearchInput=lu;exports.DoctSelectField=Cn;exports.DoctTabs=nM;exports.DoctTabsContent=Rm;exports.DoctTabsList=Em;exports.DoctTabsTrigger=Nm;exports.DoctTextareaField=Na;exports.DoctToaster=BM;exports.DoctTooltip=cD;exports.DoctTooltipContent=Gm;exports.DoctTooltipProvider=iD;exports.DoctTooltipTrigger=lD;exports.DoctTypography=Ap;exports.DoctUserRegistrationSection=p0;exports.doctToast=WM;
|
|
227
|
+
Defaulting to \`null\`.`}var Am=Tm,lM=Om;const Im=f.forwardRef(({className:e,value:t,...n},r)=>d.jsx(Am,{ref:r,className:L("relative h-1.5 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:d.jsx(lM,{className:"h-full w-full flex-1 bg-brandBlue transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Im.displayName=Am.displayName;function uM(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 dM=e=>{switch(e){case"success":return pM;case"info":return gM;case"warning":return hM;case"error":return vM;default:return null}},fM=Array(12).fill(0),mM=({visible:e,className:t})=>w.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},w.createElement("div",{className:"sonner-spinner"},fM.map((n,r)=>w.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),pM=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.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"})),hM=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},w.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"})),gM=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.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"})),vM=w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},w.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"})),yM=w.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"},w.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),w.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),bM=()=>{const[e,t]=w.useState(document.hidden);return w.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ca=1;class wM{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],w.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(SM(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"&&!w.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"&&!w.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"&&!w.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"&&!w.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 Ke=new wM,xM=(e,t)=>{const n=(t==null?void 0:t.id)||Ca++;return Ke.addToast({title:e,...t,id:n}),n},SM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",CM=xM,MM=()=>Ke.toasts,DM=()=>Ke.getActiveToasts(),Pi=Object.assign(CM,{success:Ke.success,info:Ke.info,warning:Ke.warning,error:Ke.error,custom:Ke.custom,message:Ke.message,promise:Ke.promise,dismiss:Ke.dismiss,loading:Ke.loading},{getHistory:MM,getToasts:DM});uM("[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 Rr(e){return e.label!==void 0}const kM=3,EM="24px",NM="16px",Ai=4e3,RM=356,TM=14,_M=45,OM=200;function pt(...e){return e.filter(Boolean).join(" ")}function PM(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const AM=e=>{var t,n,r,o,a,s,i,l,u;const{invert:m,toast:c,unstyled:p,interacting:h,setHeights:y,visibleToasts:g,heights:v,index:b,toasts:x,expanded:S,removeToast:M,defaultRichColors:C,closeButton:N,style:D,cancelButtonStyle:R,actionButtonStyle:j,className:F="",descriptionClassName:$="",duration:V,position:B,gap:P,expandByDefault:T,classNames:k,icons:A,closeButtonAriaLabel:E="Close toast"}=e,[O,Y]=w.useState(null),[z,_]=w.useState(null),[I,H]=w.useState(!1),[G,U]=w.useState(!1),[W,Q]=w.useState(!1),[K,X]=w.useState(!1),[se,ie]=w.useState(!1),[ye,J]=w.useState(0),[Pe,Ae]=w.useState(0),Me=w.useRef(c.duration||V||Ai),Ue=w.useRef(null),Ce=w.useRef(null),Xe=b===0,Ot=b+1<=g,Re=c.type,re=c.dismissible!==!1,me=c.className||"",Te=c.descriptionClassName||"",Le=w.useMemo(()=>v.findIndex(oe=>oe.toastId===c.id)||0,[v,c.id]),Be=w.useMemo(()=>{var oe;return(oe=c.closeButton)!=null?oe:N},[c.closeButton,N]),at=w.useMemo(()=>c.duration||V||Ai,[c.duration,V]),qt=w.useRef(0),st=w.useRef(0),cn=w.useRef(0),qe=w.useRef(null),[ln,An]=B.split("-"),un=w.useMemo(()=>v.reduce((oe,de,ve)=>ve>=Le?oe:oe+de.height,0),[v,Le]),Vt=bM(),In=c.invert||m,Pt=Re==="loading";st.current=w.useMemo(()=>Le*P+un,[Le,un]),w.useEffect(()=>{Me.current=at},[at]),w.useEffect(()=>{H(!0)},[]),w.useEffect(()=>{const oe=Ce.current;if(oe){const de=oe.getBoundingClientRect().height;return Ae(de),y(ve=>[{toastId:c.id,height:de,position:c.position},...ve]),()=>y(ve=>ve.filter(ue=>ue.toastId!==c.id))}},[y,c.id]),w.useLayoutEffect(()=>{if(!I)return;const oe=Ce.current,de=oe.style.height;oe.style.height="auto";const ve=oe.getBoundingClientRect().height;oe.style.height=de,Ae(ve),y(ue=>ue.find(we=>we.toastId===c.id)?ue.map(we=>we.toastId===c.id?{...we,height:ve}:we):[{toastId:c.id,height:ve,position:c.position},...ue])},[I,c.title,c.description,y,c.id,c.jsx,c.action,c.cancel]);const q=w.useCallback(()=>{U(!0),J(st.current),y(oe=>oe.filter(de=>de.toastId!==c.id)),setTimeout(()=>{M(c)},OM)},[c,M,y,st]);w.useEffect(()=>{if(c.promise&&Re==="loading"||c.duration===1/0||c.type==="loading")return;let oe;return S||h||Vt?(()=>{if(cn.current<qt.current){const ue=new Date().getTime()-qt.current;Me.current=Me.current-ue}cn.current=new Date().getTime()})():(()=>{Me.current!==1/0&&(qt.current=new Date().getTime(),oe=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),q()},Me.current))})(),()=>clearTimeout(oe)},[S,h,c,Re,Vt,q]),w.useEffect(()=>{c.delete&&(q(),c.onDismiss==null||c.onDismiss.call(c,c))},[q,c.delete]);function ce(){var oe;if(A!=null&&A.loading){var de;return w.createElement("div",{className:pt(k==null?void 0:k.loader,c==null||(de=c.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":Re==="loading"},A.loading)}return w.createElement(mM,{className:pt(k==null?void 0:k.loader,c==null||(oe=c.classNames)==null?void 0:oe.loader),visible:Re==="loading"})}const ae=c.icon||(A==null?void 0:A[Re])||dM(Re);var fe,ge;return w.createElement("li",{tabIndex:0,ref:Ce,className:pt(F,me,k==null?void 0:k.toast,c==null||(t=c.classNames)==null?void 0:t.toast,k==null?void 0:k.default,k==null?void 0:k[Re],c==null||(n=c.classNames)==null?void 0:n[Re]),"data-sonner-toast":"","data-rich-colors":(fe=c.richColors)!=null?fe:C,"data-styled":!(c.jsx||c.unstyled||p),"data-mounted":I,"data-promise":!!c.promise,"data-swiped":se,"data-removed":G,"data-visible":Ot,"data-y-position":ln,"data-x-position":An,"data-index":b,"data-front":Xe,"data-swiping":W,"data-dismissible":re,"data-type":Re,"data-invert":In,"data-swipe-out":K,"data-swipe-direction":z,"data-expanded":!!(S||T&&I),style:{"--index":b,"--toasts-before":b,"--z-index":x.length-b,"--offset":`${G?ye:st.current}px`,"--initial-height":T?"auto":`${Pe}px`,...D,...c.style},onDragEnd:()=>{Q(!1),Y(null),qe.current=null},onPointerDown:oe=>{oe.button!==2&&(Pt||!re||(Ue.current=new Date,J(st.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(Q(!0),qe.current={x:oe.clientX,y:oe.clientY})))},onPointerUp:()=>{var oe,de,ve;if(K||!re)return;qe.current=null;const ue=Number(((oe=Ce.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ve=Number(((de=Ce.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),we=new Date().getTime()-((ve=Ue.current)==null?void 0:ve.getTime()),Se=O==="x"?ue:Ve,Ze=Math.abs(Se)/we;if(Math.abs(Se)>=_M||Ze>.11){J(st.current),c.onDismiss==null||c.onDismiss.call(c,c),_(O==="x"?ue>0?"right":"left":Ve>0?"down":"up"),q(),X(!0);return}else{var Fe,it;(Fe=Ce.current)==null||Fe.style.setProperty("--swipe-amount-x","0px"),(it=Ce.current)==null||it.style.setProperty("--swipe-amount-y","0px")}ie(!1),Q(!1),Y(null)},onPointerMove:oe=>{var de,ve,ue;if(!qe.current||!re||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const we=oe.clientY-qe.current.y,Se=oe.clientX-qe.current.x;var Ze;const Fe=(Ze=e.swipeDirections)!=null?Ze:PM(B);!O&&(Math.abs(Se)>1||Math.abs(we)>1)&&Y(Math.abs(Se)>Math.abs(we)?"x":"y");let it={x:0,y:0};const ks=Kt=>1/(1.5+Math.abs(Kt)/20);if(O==="y"){if(Fe.includes("top")||Fe.includes("bottom"))if(Fe.includes("top")&&we<0||Fe.includes("bottom")&&we>0)it.y=we;else{const Kt=we*ks(we);it.y=Math.abs(Kt)<Math.abs(we)?Kt:we}}else if(O==="x"&&(Fe.includes("left")||Fe.includes("right")))if(Fe.includes("left")&&Se<0||Fe.includes("right")&&Se>0)it.x=Se;else{const Kt=Se*ks(Se);it.x=Math.abs(Kt)<Math.abs(Se)?Kt:Se}(Math.abs(it.x)>0||Math.abs(it.y)>0)&&ie(!0),(ve=Ce.current)==null||ve.style.setProperty("--swipe-amount-x",`${it.x}px`),(ue=Ce.current)==null||ue.style.setProperty("--swipe-amount-y",`${it.y}px`)}},Be&&!c.jsx&&Re!=="loading"?w.createElement("button",{"aria-label":E,"data-disabled":Pt,"data-close-button":!0,onClick:Pt||!re?()=>{}:()=>{q(),c.onDismiss==null||c.onDismiss.call(c,c)},className:pt(k==null?void 0:k.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(ge=A==null?void 0:A.close)!=null?ge:yM):null,(Re||c.icon||c.promise)&&c.icon!==null&&((A==null?void 0:A[Re])!==null||c.icon)?w.createElement("div",{"data-icon":"",className:pt(k==null?void 0:k.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||ce():null,c.type!=="loading"?ae:null):null,w.createElement("div",{"data-content":"",className:pt(k==null?void 0:k.content,c==null||(a=c.classNames)==null?void 0:a.content)},w.createElement("div",{"data-title":"",className:pt(k==null?void 0:k.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?w.createElement("div",{"data-description":"",className:pt($,Te,k==null?void 0:k.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),w.isValidElement(c.cancel)?c.cancel:c.cancel&&Rr(c.cancel)?w.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||R,onClick:oe=>{Rr(c.cancel)&&re&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,oe),q())},className:pt(k==null?void 0:k.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,w.isValidElement(c.action)?c.action:c.action&&Rr(c.action)?w.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||j,onClick:oe=>{Rr(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,oe),!oe.defaultPrevented&&q())},className:pt(k==null?void 0:k.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 IM(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?NM:EM;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 jM=w.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:g=kM,toastOptions:v,dir:b=Ii(),gap:x=TM,icons:S,containerAriaLabel:M="Notifications"}=t,[C,N]=w.useState([]),D=w.useMemo(()=>Array.from(new Set([o].concat(C.filter(z=>z.position).map(z=>z.position)))),[C,o]),[R,j]=w.useState([]),[F,$]=w.useState(!1),[V,B]=w.useState(!1),[P,T]=w.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),k=w.useRef(null),A=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=w.useRef(null),O=w.useRef(!1),Y=w.useCallback(z=>{N(_=>{var I;return(I=_.find(H=>H.id===z.id))!=null&&I.delete||Ke.dismiss(z.id),_.filter(({id:H})=>H!==z.id)})},[]);return w.useEffect(()=>Ke.subscribe(z=>{if(z.dismiss){requestAnimationFrame(()=>{N(_=>_.map(I=>I.id===z.id?{...I,delete:!0}:I))});return}setTimeout(()=>{Xr.flushSync(()=>{N(_=>{const I=_.findIndex(H=>H.id===z.id);return I!==-1?[..._.slice(0,I),{..._[I],...z},..._.slice(I+1)]:[z,..._]})})})}),[C]),w.useEffect(()=>{if(c!=="system"){T(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?T("dark"):T("light")),typeof window>"u")return;const z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:_})=>{T(_?"dark":"light")})}catch{z.addListener(({matches:I})=>{try{T(I?"dark":"light")}catch(H){console.error(H)}})}},[c]),w.useEffect(()=>{C.length<=1&&$(!1)},[C]),w.useEffect(()=>{const z=_=>{var I;if(a.every(U=>_[U]||_.code===U)){var G;$(!0),(G=k.current)==null||G.focus()}_.code==="Escape"&&(document.activeElement===k.current||(I=k.current)!=null&&I.contains(document.activeElement))&&$(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[a]),w.useEffect(()=>{if(k.current)return()=>{E.current&&(E.current.focus({preventScroll:!0}),E.current=null,O.current=!1)}},[k.current]),w.createElement("section",{ref:n,"aria-label":`${M} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((z,_)=>{var I;const[H,G]=z.split("-");return C.length?w.createElement("ol",{key:z,dir:b==="auto"?Ii():b,tabIndex:-1,ref:k,className:l,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":H,"data-x-position":G,style:{"--front-toast-height":`${((I=R[0])==null?void 0:I.height)||0}px`,"--width":`${RM}px`,"--gap":`${x}px`,...y,...IM(u,m)},onBlur:U=>{O.current&&!U.currentTarget.contains(U.relatedTarget)&&(O.current=!1,E.current&&(E.current.focus({preventScroll:!0}),E.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||O.current||(O.current=!0,E.current=U.relatedTarget)},onMouseEnter:()=>$(!0),onMouseMove:()=>$(!0),onMouseLeave:()=>{V||$(!1)},onDragEnd:()=>$(!1),onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},C.filter(U=>!U.position&&_===0||U.position===z).map((U,W)=>{var Q,K;return w.createElement(AM,{key:U.id,icons:S,index:W,toast:U,defaultRichColors:p,duration:(Q=v==null?void 0:v.duration)!=null?Q:h,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:g,closeButton:(K=v==null?void 0:v.closeButton)!=null?K:i,interacting:V,position:z,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:Y,toasts:C.filter(X=>X.position==U.position),heights:R.filter(X=>X.position==U.position),setHeights:j,expandByDefault:s,gap:x,expanded:F,swipeDirections:t.swipeDirections})})):null}))}),$M={error:"bg-red-500 text-white",info:"bg-blue-500 text-white",warning:"bg-amber-500 text-white",success:"bg-green-500 text-white"},LM={error:5e3,info:4e3,warning:5e3,success:4e3},FM={error:d.jsx(th,{className:"w-4 h-4 text-white"}),info:d.jsx(uh,{className:"w-4 h-4 text-white"}),warning:d.jsx(wh,{className:"w-4 h-4 text-white"}),success:d.jsx(Jp,{className:"w-4 h-4 text-white"})},WM=(e,t)=>{const n=(t==null?void 0:t.variant)||"info",r=$M[n],o=(t==null?void 0:t.icon)??FM[n],a=(t==null?void 0:t.iconPosition)??"left",s=l=>d.jsxs("div",{className:`flex items-center justify-between w-full p-3 rounded-md shadow-md ${r}`,children:[d.jsxs("div",{className:"flex items-center",children:[o&&a==="left"&&d.jsx("div",{className:"mr-3",children:o}),d.jsxs("div",{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})]})]}),d.jsxs("div",{className:"flex items-center",children:[o&&a==="right"&&d.jsx("div",{className:"ml-3",children:o}),(t==null?void 0:t.action)&&d.jsx(Nt,{variant:"ghost",size:"small",className:"ml-3 text-white hover:text-black/80",onClick:t.action.onClick,children:t.action.label}),d.jsx(Nt,{variant:"ghost",size:"icon.large",className:"ml-3 text-white hover:text-black/80",onClick:()=>Pi.dismiss(l),children:d.jsx(En,{className:"w-4 h-4",strokeWidth:2.5})})]})]}),i={unstyled:!0,duration:(t==null?void 0:t.duration)||LM[n],style:{padding:0,margin:0,border:"none",background:"none"}};return Pi.custom(s,i)};function BM(e){return d.jsx(jM,{...e})}var[Mo,SD]=He("Tooltip",[Yt]),Do=Yt(),jm="TooltipProvider",YM=700,Ma="tooltip.open",[HM,Ds]=Mo(jm),$m=e=>{const{__scopeTooltip:t,delayDuration:n=YM,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(HM,{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 Qn="Tooltip",[zM,ko]=Mo(Qn),Lm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=Ds(Qn,e.__scopeTooltip),u=Do(t),[m,c]=f.useState(null),p=Ne(),h=f.useRef(0),y=s??l.disableHoverableContent,g=i??l.delayDuration,v=f.useRef(!1),[b,x]=ot({prop:r,defaultProp:o??!1,onChange:D=>{D?(l.onOpen(),document.dispatchEvent(new CustomEvent(Ma))):l.onClose(),a==null||a(D)},caller:Qn}),S=f.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),M=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,x(!0)},[x]),C=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),N=f.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,x(!0),h.current=0},g)},[g,x]);return f.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),d.jsx(rr,{...u,children:d.jsx(zM,{scope:t,contentId:p,open:b,stateAttribute:S,trigger:m,onTriggerChange:c,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?N():M()},[l.isOpenDelayedRef,N,M]),onTriggerLeave:f.useCallback(()=>{y?C():(window.clearTimeout(h.current),h.current=0)},[C,y]),onOpen:M,onClose:C,disableHoverableContent:y,children:n})})};Lm.displayName=Qn;var Da="TooltipTrigger",Fm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ko(Da,n),a=Ds(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(or,{asChild:!0,...s,children:d.jsx(ee.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:Z(e.onPointerMove,p=>{p.pointerType!=="touch"&&!m.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:Z(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:Z(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:Z(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:Z(e.onBlur,o.onClose),onClick:Z(e.onClick,o.onClose)})})});Fm.displayName=Da;var GM="TooltipPortal",[CD,UM]=Mo(GM,{forceMount:void 0}),Mn="TooltipContent",Wm=f.forwardRef((e,t)=>{const n=UM(Mn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=ko(Mn,e.__scopeTooltip);return d.jsx(Ge,{present:r||s.open,children:s.disableHoverableContent?d.jsx(Bm,{side:o,...a,ref:t}):d.jsx(qM,{side:o,...a,ref:t})})}),qM=f.forwardRef((e,t)=>{const n=ko(Mn,e.__scopeTooltip),r=Ds(Mn,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,g)=>{const v=y.currentTarget,b={x:y.clientX,y:y.clientY},x=ZM(b,v.getBoundingClientRect()),S=QM(b,x),M=JM(g.getBoundingClientRect()),C=tD([...S,...M]);i(C),c(!0)},[c]);return f.useEffect(()=>()=>p(),[p]),f.useEffect(()=>{if(l&&m){const y=v=>h(v,m),g=v=>h(v,l);return l.addEventListener("pointerleave",y),m.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),m.removeEventListener("pointerleave",g)}}},[l,m,h,p]),f.useEffect(()=>{if(s){const y=g=>{const v=g.target,b={x:g.clientX,y:g.clientY},x=(l==null?void 0:l.contains(v))||(m==null?void 0:m.contains(v)),S=!eD(b,s);x?p():S&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,m,s,u,p]),d.jsx(Bm,{...e,ref:a})}),[VM,KM]=Mo(Qn,{isInside:!1}),XM=Vm("TooltipContent"),Bm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=ko(Mn,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(Nn,{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(XM,{children:r}),d.jsx(VM,{scope:n,isInside:!0,children:d.jsx(py,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Wm.displayName=Mn;var Ym="TooltipArrow",Hm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Do(n);return KM(Ym,n).isInside?null:d.jsx(oo,{...o,...r,ref:t})});Hm.displayName=Ym;function ZM(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 QM(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 JM(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 eD(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 tD(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),nD(t)}function nD(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 rD=$m,oD=Lm,aD=Fm,zm=Wm,sD=Hm;const iD=rD,cD=oD,lD=aD,Gm=f.forwardRef(({className:e,sideOffset:t=4,children:n,...r},o)=>d.jsxs(zm,{ref:o,sideOffset:t,className:L("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(sD,{className:"fill-background stroke-border h-2 w-4"})]}));Gm.displayName=zm.displayName;exports.ComponentVariant=d1;exports.DoctAddressFormSection=g0;exports.DoctAlert=Ju;exports.DoctAlertDescription=td;exports.DoctAlertTitle=ed;exports.DoctAnimationLoader=Ip;exports.DoctAutoComplete=i1;exports.DoctAutocomplete=y1;exports.DoctAvatar=dd;exports.DoctAvatarFallback=md;exports.DoctAvatarImage=fd;exports.DoctButton=Nt;exports.DoctCheckbox=xd;exports.DoctChip=i0;exports.DoctCircularProgress=Xi;exports.DoctComponentSection=u1;exports.DoctContactFormSection=y0;exports.DoctCurrencyInput=Gu;exports.DoctDatePickerField=Gr;exports.DoctDialog=Q0;exports.DoctDialogClose=t1;exports.DoctDialogContent=ju;exports.DoctDialogDescription=Wu;exports.DoctDialogFooter=Lu;exports.DoctDialogHeader=$u;exports.DoctDialogTitle=Fu;exports.DoctDialogTrigger=J0;exports.DoctDrawer=Pd;exports.DoctDrawerClose=gS;exports.DoctDrawerContent=Id;exports.DoctDrawerDescription=Fd;exports.DoctDrawerFooter=$d;exports.DoctDrawerHeader=jd;exports.DoctDrawerTitle=Ld;exports.DoctDrawerTrigger=pS;exports.DoctDropdownMenu=LC;exports.DoctDropdownMenuCheckboxItem=qf;exports.DoctDropdownMenuContent=Gf;exports.DoctDropdownMenuGroup=WC;exports.DoctDropdownMenuItem=Uf;exports.DoctDropdownMenuLabel=Kf;exports.DoctDropdownMenuRadioGroup=YC;exports.DoctDropdownMenuRadioItem=Vf;exports.DoctDropdownMenuSeparator=Xf;exports.DoctDropdownMenuShortcut=Zf;exports.DoctDropdownMenuSub=BC;exports.DoctDropdownMenuSubContent=zf;exports.DoctDropdownMenuSubTrigger=Hf;exports.DoctDropdownMenuTrigger=FC;exports.DoctExpandableCard=D1;exports.DoctLabeledInput=tt;exports.DoctManualDatePickerField=s0;exports.DoctOtpInput=Fp;exports.DoctPasswordInput=ra;exports.DoctPopover=Wa;exports.DoctPopoverContent=co;exports.DoctPopoverTrigger=Ba;exports.DoctProgress=Im;exports.DoctRadioGroup=fm;exports.DoctRadioGroupItem=mm;exports.DoctSearchFilterSection=f0;exports.DoctSearchInput=lu;exports.DoctSelectField=Cn;exports.DoctTabs=nM;exports.DoctTabsContent=Rm;exports.DoctTabsList=Em;exports.DoctTabsTrigger=Nm;exports.DoctTextareaField=Na;exports.DoctToaster=BM;exports.DoctTooltip=cD;exports.DoctTooltipContent=Gm;exports.DoctTooltipProvider=iD;exports.DoctTooltipTrigger=lD;exports.DoctTypography=Ap;exports.DoctUserRegistrationSection=p0;exports.doctToast=WM;
|