@envin/cli 1.1.3 → 1.1.4-canary.c6fea4d
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/README.md +3 -3
- package/dist/cli/index.mjs +102 -32
- package/dist/preview/.next/BUILD_ID +1 -1
- package/dist/preview/.next/app-build-manifest.json +16 -16
- package/dist/preview/.next/build-manifest.json +14 -14
- package/dist/preview/.next/diagnostics/framework.json +1 -1
- package/dist/preview/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/preview/.next/next-server.js.nft.json +1 -1
- package/dist/preview/.next/prerender-manifest.json +3 -3
- package/dist/preview/.next/required-server-files.json +17 -7
- package/dist/preview/.next/routes-manifest.json +6 -2
- package/dist/preview/.next/server/app/_not-found/page.js +2 -1
- package/dist/preview/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/app/_not-found.html +1 -1
- package/dist/preview/.next/server/app/_not-found.rsc +12 -14
- package/dist/preview/.next/server/app/favicon.ico/route.js +1 -1
- package/dist/preview/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/dist/preview/.next/server/app/index.html +2 -2
- package/dist/preview/.next/server/app/index.rsc +12 -14
- package/dist/preview/.next/server/app/page.js +121 -64
- package/dist/preview/.next/server/app/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/chunks/155.js +45 -0
- package/dist/preview/.next/server/chunks/496.js +4 -4
- package/dist/preview/.next/server/chunks/55.js +7 -0
- package/dist/preview/.next/server/chunks/569.js +45 -0
- package/dist/preview/.next/server/chunks/692.js +45 -0
- package/dist/preview/.next/server/chunks/699.js +22 -0
- package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
- package/dist/preview/.next/server/pages/404.html +1 -1
- package/dist/preview/.next/server/pages/500.html +1 -1
- package/dist/preview/.next/server/pages/_app.js +1 -1
- package/dist/preview/.next/server/pages/_document.js +1 -1
- package/dist/preview/.next/server/pages/_document.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/_error.js +19 -1
- package/dist/preview/.next/server/pages/_error.js.nft.json +1 -1
- package/dist/preview/.next/server/server-reference-manifest.js +1 -1
- package/dist/preview/.next/server/server-reference-manifest.json +1 -1
- package/dist/preview/.next/server/webpack-runtime.js +1 -1
- package/dist/preview/.next/static/chunks/442-41ca9bf0a86c9fdd.js +22 -0
- package/dist/preview/.next/static/chunks/87c73c54-1f4741035a95c140.js +1 -0
- package/dist/preview/.next/static/chunks/902-a1b735a0b0a65f38.js +1 -0
- package/dist/preview/.next/static/chunks/app/_not-found/page-4d317ef7aff02905.js +1 -0
- package/dist/preview/.next/static/chunks/app/{layout-199c3536e64e10fd.js → layout-e5f42c1da65f0b8c.js} +1 -1
- package/dist/preview/.next/static/chunks/app/page-f31104412e1b6c0f.js +1 -0
- package/dist/preview/.next/static/chunks/{framework-82b0332477a76245.js → framework-c638b7ce6a6487b4.js} +1 -1
- package/dist/preview/.next/static/chunks/main-app-ef4fe5383916541f.js +1 -0
- package/dist/preview/.next/static/chunks/main-df3bdf5f1b8063cf.js +1 -0
- package/dist/preview/.next/static/chunks/pages/{_error-b8c2e08355edc3b4.js → _error-3e422ffd891594de.js} +1 -1
- package/dist/preview/.next/static/{Tqeih6W38cSM3E9aJvlBI → hQ8VxCM9KDLkb5wLIRxn3}/_buildManifest.js +1 -1
- package/dist/preview/.next/trace +19 -16
- package/package.json +7 -6
- package/src/components/variables/form.tsx +1 -1
- package/src/lib/hooks/use-hot-reload.ts +3 -2
- package/src/lib/variables/default.ts +2 -2
- package/src/lib/variables/description.ts +1 -1
- package/src/utils/get-config-file.ts +9 -5
- package/dist/preview/.next/server/chunks/191.js +0 -20
- package/dist/preview/.next/server/chunks/601.js +0 -5
- package/dist/preview/.next/static/chunks/315-850927f416f0524a.js +0 -1
- package/dist/preview/.next/static/chunks/87c73c54-a773d57d245aca41.js +0 -1
- package/dist/preview/.next/static/chunks/985-f32f025f8cdc74d3.js +0 -1
- package/dist/preview/.next/static/chunks/app/_not-found/page-60c07ed561e86dd9.js +0 -1
- package/dist/preview/.next/static/chunks/app/page-9e503b3c88017a01.js +0 -1
- package/dist/preview/.next/static/chunks/main-app-fd962d6f95339794.js +0 -1
- package/dist/preview/.next/static/chunks/main-c9e901861bf9798e.js +0 -1
- /package/dist/preview/.next/static/chunks/pages/{_app-a48f070af90c9683.js → _app-a050a8e6e4fb04cf.js} +0 -0
- /package/dist/preview/.next/static/chunks/{webpack-464ea5083b838c17.js → webpack-6fd1f9e039b848f1.js} +0 -0
- /package/dist/preview/.next/static/{Tqeih6W38cSM3E9aJvlBI → hQ8VxCM9KDLkb5wLIRxn3}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[985],{482:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(7620),i=r(4568);function s(e,t=[]){let r=[],a=()=>{let t=r.map(e=>n.createContext(e));return function(r){let i=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:i}}),[r,i])}};return a.scopeName=e,[function(t,s){let a=n.createContext(s),o=r.length;r=[...r,s];let l=t=>{let{scope:r,children:s,...l}=t,u=r?.[e]?.[o]||a,d=n.useMemo(()=>l,Object.values(l));return(0,i.jsx)(u.Provider,{value:d,children:s})};return l.displayName=t+"Provider",[l,function(r,i){let l=i?.[e]?.[o]||a,u=n.useContext(l);if(u)return u;if(void 0!==s)return s;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=r.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}(a,...t)]}},607:(e,t,r)=>{r.d(t,{QP:()=>eu});let n=e=>{let t=o(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{let r=e.split("-");return""===r[0]&&1!==r.length&&r.shift(),i(r,t)||a(e)},getConflictingClassGroupIds:(e,t)=>{let i=r[e]||[];return t&&n[e]?[...i,...n[e]]:i}}},i=(e,t)=>{if(0===e.length)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),s=n?i(e.slice(1),n):void 0;if(s)return s;if(0===t.validators.length)return;let a=e.join("-");return t.validators.find(({validator:e})=>e(a))?.classGroupId},s=/^\[(.+)\]$/,a=e=>{if(s.test(e)){let t=s.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},o=e=>{let{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(let e in r)l(r[e],n,e,t);return n},l=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){(""===e?t:u(t,e)).classGroupId=r;return}if("function"==typeof e)return d(e)?void l(e(n),t,r,n):void t.validators.push({validator:e,classGroupId:r});Object.entries(e).forEach(([e,i])=>{l(i,u(t,e),r,n)})})},u=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},d=e=>e.isThemeGetter,c=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,n=new Map,i=(i,s)=>{r.set(i,s),++t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(i(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):i(e,t)}}},f=e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t,r=[],n=0,i=0,s=0;for(let a=0;a<e.length;a++){let o=e[a];if(0===n&&0===i){if(":"===o){r.push(e.slice(s,a)),s=a+1;continue}if("/"===o){t=a;continue}}"["===o?n++:"]"===o?n--:"("===o?i++:")"===o&&i--}let a=0===r.length?e:e.substring(s),o=h(a);return{modifiers:r,hasImportantModifier:o!==a,baseClassName:o,maybePostfixModifierPosition:t&&t>s?t-s:void 0}};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n},h=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,p=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(e=>[e,!0]));return e=>{if(e.length<=1)return e;let r=[],n=[];return e.forEach(e=>{"["===e[0]||t[e]?(r.push(...n.sort(),e),n=[]):n.push(e)}),r.push(...n.sort()),r}},m=e=>({cache:c(e.cacheSize),parseClassName:f(e),sortModifiers:p(e),...n(e)}),g=/\s+/,y=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],o=e.trim().split(g),l="";for(let e=o.length-1;e>=0;e-=1){let t=o[e],{isExternal:u,modifiers:d,hasImportantModifier:c,baseClassName:f,maybePostfixModifierPosition:h}=r(t);if(u){l=t+(l.length>0?" "+l:l);continue}let p=!!h,m=n(p?f.substring(0,h):f);if(!m){if(!p||!(m=n(f))){l=t+(l.length>0?" "+l:l);continue}p=!1}let g=s(d).join(":"),y=c?g+"!":g,v=y+m;if(a.includes(v))continue;a.push(v);let b=i(m,p);for(let e=0;e<b.length;++e){let t=b[e];a.push(y+t)}l=t+(l.length>0?" "+l:l)}return l};function v(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=b(e))&&(n&&(n+=" "),n+=t);return n}let b=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=b(e[n]))&&(r&&(r+=" "),r+=t);return r},w=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,x=/^\((?:(\w[\w-]*):)?(.+)\)$/i,k=/^\d+\/\d+$/,E=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,S=/\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$/,A=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,C=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,T=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,R=e=>k.test(e),N=e=>!!e&&!Number.isNaN(Number(e)),O=e=>!!e&&Number.isInteger(Number(e)),j=e=>e.endsWith("%")&&N(e.slice(0,-1)),L=e=>E.test(e),P=()=>!0,D=e=>S.test(e)&&!A.test(e),I=()=>!1,M=e=>C.test(e),F=e=>T.test(e),V=e=>!Z(e)&&!H(e),B=e=>ee(e,ei,I),Z=e=>_.test(e),z=e=>ee(e,es,D),U=e=>ee(e,ea,N),W=e=>ee(e,er,I),$=e=>ee(e,en,F),q=e=>ee(e,el,M),H=e=>x.test(e),K=e=>et(e,es),G=e=>et(e,eo),Y=e=>et(e,er),X=e=>et(e,ei),J=e=>et(e,en),Q=e=>et(e,el,!0),ee=(e,t,r)=>{let n=_.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},et=(e,t,r=!1)=>{let n=x.exec(e);return!!n&&(n[1]?t(n[1]):r)},er=e=>"position"===e||"percentage"===e,en=e=>"image"===e||"url"===e,ei=e=>"length"===e||"size"===e||"bg-size"===e,es=e=>"length"===e,ea=e=>"number"===e,eo=e=>"family-name"===e,el=e=>"shadow"===e;Symbol.toStringTag;let eu=function(e,...t){let r,n,i,s=function(o){return n=(r=m(t.reduce((e,t)=>t(e),e()))).cache.get,i=r.cache.set,s=a,a(o)};function a(e){let t=n(e);if(t)return t;let s=y(e,r);return i(e,s),s}return function(){return s(v.apply(null,arguments))}}(()=>{let e=w("color"),t=w("font"),r=w("text"),n=w("font-weight"),i=w("tracking"),s=w("leading"),a=w("breakpoint"),o=w("container"),l=w("spacing"),u=w("radius"),d=w("shadow"),c=w("inset-shadow"),f=w("text-shadow"),h=w("drop-shadow"),p=w("blur"),m=w("perspective"),g=w("aspect"),y=w("ease"),v=w("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[..._(),H,Z],k=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],S=()=>[H,Z,l],A=()=>[R,"full","auto",...S()],C=()=>[O,"none","subgrid",H,Z],T=()=>["auto",{span:["full",O,H,Z]},O,H,Z],D=()=>[O,"auto",H,Z],I=()=>["auto","min","max","fr",H,Z],M=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...S()],et=()=>[R,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],er=()=>[e,H,Z],en=()=>[..._(),Y,W,{position:[H,Z]}],ei=()=>["no-repeat",{repeat:["","x","y","space","round"]}],es=()=>["auto","cover","contain",X,B,{size:[H,Z]}],ea=()=>[j,K,z],eo=()=>["","none","full",u,H,Z],el=()=>["",N,K,z],eu=()=>["solid","dashed","dotted","double"],ed=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ec=()=>[N,j,Y,W],ef=()=>["","none",p,H,Z],eh=()=>["none",N,H,Z],ep=()=>["none",N,H,Z],em=()=>[N,H,Z],eg=()=>[R,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[L],breakpoint:[L],color:[P],container:[L],"drop-shadow":[L],ease:["in","out","in-out"],font:[V],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[L],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[L],shadow:[L],spacing:["px",N],text:[L],"text-shadow":[L],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",R,Z,H,g]}],container:["container"],columns:[{columns:[N,Z,H,o]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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:x()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[O,"auto",H,Z]}],basis:[{basis:[R,"full","auto",o,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[N,R,"auto","initial","none",Z]}],grow:[{grow:["",N,H,Z]}],shrink:[{shrink:["",N,H,Z]}],order:[{order:[O,"first","last","none",H,Z]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:T()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...M(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:et()}],w:[{w:[o,"screen",...et()]}],"min-w":[{"min-w":[o,"screen","none",...et()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...et()]}],h:[{h:["screen","lh",...et()]}],"min-h":[{"min-h":["screen","lh","none",...et()]}],"max-h":[{"max-h":["screen","lh",...et()]}],"font-size":[{text:["base",r,K,z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,H,U]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",j,Z]}],"font-family":[{font:[G,Z,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:[i,H,Z]}],"line-clamp":[{"line-clamp":[N,"none",H,U]}],leading:[{leading:[s,...S()]}],"list-image":[{"list-image":["none",H,Z]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",H,Z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:er()}],"text-color":[{text:er()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...eu(),"wavy"]}],"text-decoration-thickness":[{decoration:[N,"from-font","auto",H,z]}],"text-decoration-color":[{decoration:er()}],"underline-offset":[{"underline-offset":[N,"auto",H,Z]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",H,Z]}],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",H,Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:en()}],"bg-repeat":[{bg:ei()}],"bg-size":[{bg:es()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},O,H,Z],radial:["",H,Z],conic:[O,H,Z]},J,$]}],"bg-color":[{bg:er()}],"gradient-from-pos":[{from:ea()}],"gradient-via-pos":[{via:ea()}],"gradient-to-pos":[{to:ea()}],"gradient-from":[{from:er()}],"gradient-via":[{via:er()}],"gradient-to":[{to:er()}],rounded:[{rounded:eo()}],"rounded-s":[{"rounded-s":eo()}],"rounded-e":[{"rounded-e":eo()}],"rounded-t":[{"rounded-t":eo()}],"rounded-r":[{"rounded-r":eo()}],"rounded-b":[{"rounded-b":eo()}],"rounded-l":[{"rounded-l":eo()}],"rounded-ss":[{"rounded-ss":eo()}],"rounded-se":[{"rounded-se":eo()}],"rounded-ee":[{"rounded-ee":eo()}],"rounded-es":[{"rounded-es":eo()}],"rounded-tl":[{"rounded-tl":eo()}],"rounded-tr":[{"rounded-tr":eo()}],"rounded-br":[{"rounded-br":eo()}],"rounded-bl":[{"rounded-bl":eo()}],"border-w":[{border:el()}],"border-w-x":[{"border-x":el()}],"border-w-y":[{"border-y":el()}],"border-w-s":[{"border-s":el()}],"border-w-e":[{"border-e":el()}],"border-w-t":[{"border-t":el()}],"border-w-r":[{"border-r":el()}],"border-w-b":[{"border-b":el()}],"border-w-l":[{"border-l":el()}],"divide-x":[{"divide-x":el()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":el()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...eu(),"hidden","none"]}],"divide-style":[{divide:[...eu(),"hidden","none"]}],"border-color":[{border:er()}],"border-color-x":[{"border-x":er()}],"border-color-y":[{"border-y":er()}],"border-color-s":[{"border-s":er()}],"border-color-e":[{"border-e":er()}],"border-color-t":[{"border-t":er()}],"border-color-r":[{"border-r":er()}],"border-color-b":[{"border-b":er()}],"border-color-l":[{"border-l":er()}],"divide-color":[{divide:er()}],"outline-style":[{outline:[...eu(),"none","hidden"]}],"outline-offset":[{"outline-offset":[N,H,Z]}],"outline-w":[{outline:["",N,K,z]}],"outline-color":[{outline:er()}],shadow:[{shadow:["","none",d,Q,q]}],"shadow-color":[{shadow:er()}],"inset-shadow":[{"inset-shadow":["none",c,Q,q]}],"inset-shadow-color":[{"inset-shadow":er()}],"ring-w":[{ring:el()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:er()}],"ring-offset-w":[{"ring-offset":[N,z]}],"ring-offset-color":[{"ring-offset":er()}],"inset-ring-w":[{"inset-ring":el()}],"inset-ring-color":[{"inset-ring":er()}],"text-shadow":[{"text-shadow":["none",f,Q,q]}],"text-shadow-color":[{"text-shadow":er()}],opacity:[{opacity:[N,H,Z]}],"mix-blend":[{"mix-blend":[...ed(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ed()}],"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":[N]}],"mask-image-linear-from-pos":[{"mask-linear-from":ec()}],"mask-image-linear-to-pos":[{"mask-linear-to":ec()}],"mask-image-linear-from-color":[{"mask-linear-from":er()}],"mask-image-linear-to-color":[{"mask-linear-to":er()}],"mask-image-t-from-pos":[{"mask-t-from":ec()}],"mask-image-t-to-pos":[{"mask-t-to":ec()}],"mask-image-t-from-color":[{"mask-t-from":er()}],"mask-image-t-to-color":[{"mask-t-to":er()}],"mask-image-r-from-pos":[{"mask-r-from":ec()}],"mask-image-r-to-pos":[{"mask-r-to":ec()}],"mask-image-r-from-color":[{"mask-r-from":er()}],"mask-image-r-to-color":[{"mask-r-to":er()}],"mask-image-b-from-pos":[{"mask-b-from":ec()}],"mask-image-b-to-pos":[{"mask-b-to":ec()}],"mask-image-b-from-color":[{"mask-b-from":er()}],"mask-image-b-to-color":[{"mask-b-to":er()}],"mask-image-l-from-pos":[{"mask-l-from":ec()}],"mask-image-l-to-pos":[{"mask-l-to":ec()}],"mask-image-l-from-color":[{"mask-l-from":er()}],"mask-image-l-to-color":[{"mask-l-to":er()}],"mask-image-x-from-pos":[{"mask-x-from":ec()}],"mask-image-x-to-pos":[{"mask-x-to":ec()}],"mask-image-x-from-color":[{"mask-x-from":er()}],"mask-image-x-to-color":[{"mask-x-to":er()}],"mask-image-y-from-pos":[{"mask-y-from":ec()}],"mask-image-y-to-pos":[{"mask-y-to":ec()}],"mask-image-y-from-color":[{"mask-y-from":er()}],"mask-image-y-to-color":[{"mask-y-to":er()}],"mask-image-radial":[{"mask-radial":[H,Z]}],"mask-image-radial-from-pos":[{"mask-radial-from":ec()}],"mask-image-radial-to-pos":[{"mask-radial-to":ec()}],"mask-image-radial-from-color":[{"mask-radial-from":er()}],"mask-image-radial-to-color":[{"mask-radial-to":er()}],"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":_()}],"mask-image-conic-pos":[{"mask-conic":[N]}],"mask-image-conic-from-pos":[{"mask-conic-from":ec()}],"mask-image-conic-to-pos":[{"mask-conic-to":ec()}],"mask-image-conic-from-color":[{"mask-conic-from":er()}],"mask-image-conic-to-color":[{"mask-conic-to":er()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:en()}],"mask-repeat":[{mask:ei()}],"mask-size":[{mask:es()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",H,Z]}],filter:[{filter:["","none",H,Z]}],blur:[{blur:ef()}],brightness:[{brightness:[N,H,Z]}],contrast:[{contrast:[N,H,Z]}],"drop-shadow":[{"drop-shadow":["","none",h,Q,q]}],"drop-shadow-color":[{"drop-shadow":er()}],grayscale:[{grayscale:["",N,H,Z]}],"hue-rotate":[{"hue-rotate":[N,H,Z]}],invert:[{invert:["",N,H,Z]}],saturate:[{saturate:[N,H,Z]}],sepia:[{sepia:["",N,H,Z]}],"backdrop-filter":[{"backdrop-filter":["","none",H,Z]}],"backdrop-blur":[{"backdrop-blur":ef()}],"backdrop-brightness":[{"backdrop-brightness":[N,H,Z]}],"backdrop-contrast":[{"backdrop-contrast":[N,H,Z]}],"backdrop-grayscale":[{"backdrop-grayscale":["",N,H,Z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[N,H,Z]}],"backdrop-invert":[{"backdrop-invert":["",N,H,Z]}],"backdrop-opacity":[{"backdrop-opacity":[N,H,Z]}],"backdrop-saturate":[{"backdrop-saturate":[N,H,Z]}],"backdrop-sepia":[{"backdrop-sepia":["",N,H,Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",H,Z]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[N,"initial",H,Z]}],ease:[{ease:["linear","initial",y,H,Z]}],delay:[{delay:[N,H,Z]}],animate:[{animate:["none",v,H,Z]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,H,Z]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:eh()}],"rotate-x":[{"rotate-x":eh()}],"rotate-y":[{"rotate-y":eh()}],"rotate-z":[{"rotate-z":eh()}],scale:[{scale:ep()}],"scale-x":[{"scale-x":ep()}],"scale-y":[{"scale-y":ep()}],"scale-z":[{"scale-z":ep()}],"scale-3d":["scale-3d"],skew:[{skew:em()}],"skew-x":[{"skew-x":em()}],"skew-y":[{"skew-y":em()}],transform:[{transform:[H,Z,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:eg()}],"translate-x":[{"translate-x":eg()}],"translate-y":[{"translate-y":eg()}],"translate-z":[{"translate-z":eg()}],"translate-none":["translate-none"],accent:[{accent:er()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:er()}],"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",H,Z]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",H,Z]}],fill:[{fill:["none",...er()]}],"stroke-w":[{stroke:[N,K,z,U]}],stroke:[{stroke:["none",...er()]}],"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"]}})},615:(e,t,r)=>{r.d(t,{F:()=>a});var n=r(2987);let i=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,s=n.$,a=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return s(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(e=>{let t=null==r?void 0:r[e],n=null==o?void 0:o[e];if(null===t)return null;let s=i(t)||i(n);return a[e][s]}),u=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return s(e,l,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...i}=t;return Object.entries(i).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...o,...u}[t]):({...o,...u})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},728:(e,t,r)=>{r.d(t,{B:()=>l});var n,i=r(7620),s=r(7247),a=(n||(n=r.t(i,2)))[" useId ".trim().toString()]||(()=>void 0),o=0;function l(e){let[t,r]=i.useState(a());return(0,s.N)(()=>{e||r(e=>e??String(o++))},[e]),e||(t?`radix-${t}`:"")}},1219:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8889).A)("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]])},1405:(e,t,r)=>{let n,i;r.d(t,{io:()=>eS});var s,a={};r.r(a),r.d(a,{Decoder:()=>ey,Encoder:()=>em,PacketType:()=>s,protocol:()=>ep});let o=Object.create(null);o.open="0",o.close="1",o.ping="2",o.pong="3",o.message="4",o.upgrade="5",o.noop="6";let l=Object.create(null);Object.keys(o).forEach(e=>{l[o[e]]=e});let u={type:"error",data:"parser error"},d="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),c="function"==typeof ArrayBuffer,f=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,h=({type:e,data:t},r,n)=>{if(d&&t instanceof Blob)if(r)return n(t);else return p(t,n);if(c&&(t instanceof ArrayBuffer||f(t)))if(r)return n(t);else return p(new Blob([t]),n);return n(o[e]+(t||""))},p=(e,t)=>{let r=new FileReader;return r.onload=function(){t("b"+(r.result.split(",")[1]||""))},r.readAsDataURL(e)};function m(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<g.length;e++)y[g.charCodeAt(e)]=e;let v=e=>{let t=.75*e.length,r=e.length,n,i=0,s,a,o,l;"="===e[e.length-1]&&(t--,"="===e[e.length-2]&&t--);let u=new ArrayBuffer(t),d=new Uint8Array(u);for(n=0;n<r;n+=4)s=y[e.charCodeAt(n)],a=y[e.charCodeAt(n+1)],o=y[e.charCodeAt(n+2)],l=y[e.charCodeAt(n+3)],d[i++]=s<<2|a>>4,d[i++]=(15&a)<<4|o>>2,d[i++]=(3&o)<<6|63&l;return u},b="function"==typeof ArrayBuffer,w=(e,t)=>{if("string"!=typeof e)return{type:"message",data:x(e,t)};let r=e.charAt(0);return"b"===r?{type:"message",data:_(e.substring(1),t)}:l[r]?e.length>1?{type:l[r],data:e.substring(1)}:{type:l[r]}:u},_=(e,t)=>b?x(v(e),t):{base64:!0,data:e},x=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,k=(e,t)=>{let r=e.length,n=Array(r),i=0;e.forEach((e,s)=>{h(e,!1,e=>{n[s]=e,++i===r&&t(n.join("\x1e"))})})},E=(e,t)=>{let r=e.split("\x1e"),n=[];for(let e=0;e<r.length;e++){let i=w(r[e],t);if(n.push(i),"error"===i.type)break}return n};function S(e){return e.reduce((e,t)=>e+t.length,0)}function A(e,t){if(e[0].length===t)return e.shift();let r=new Uint8Array(t),n=0;for(let i=0;i<t;i++)r[i]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),r}function C(e){if(e){var t=e;for(var r in C.prototype)t[r]=C.prototype[r];return t}}C.prototype.on=C.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},C.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},C.prototype.off=C.prototype.removeListener=C.prototype.removeAllListeners=C.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<n.length;i++)if((r=n[i])===t||r.fn===t){n.splice(i,1);break}return 0===n.length&&delete this._callbacks["$"+e],this},C.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,i=r.length;n<i;++n)r[n].apply(this,t)}return this},C.prototype.emitReserved=C.prototype.emit,C.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},C.prototype.hasListeners=function(e){return!!this.listeners(e).length};let T="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),R="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function N(e,...t){return t.reduce((t,r)=>(e.hasOwnProperty(r)&&(t[r]=e[r]),t),{})}let O=R.setTimeout,j=R.clearTimeout;function L(e,t){t.useNativeTimers?(e.setTimeoutFn=O.bind(R),e.clearTimeoutFn=j.bind(R)):(e.setTimeoutFn=R.setTimeout.bind(R),e.clearTimeoutFn=R.clearTimeout.bind(R))}function P(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class D extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}}class I extends C{constructor(e){super(),this.writable=!1,L(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,r){return super.emitReserved("error",new D(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let t=w(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return -1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){let t=function(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}(e);return t.length?"?"+t:""}}class M extends I{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){E(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,k(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=P()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let F=!1;try{F="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}let V=F;function B(){}class Z extends M{constructor(e){if(super(e),"undefined"!=typeof location){let t="https:"===location.protocol,r=location.port;r||(r=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,t){let r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class z extends C{constructor(e,t,r){super(),this.createRequest=e,L(this,r),this._opts=r,this._method=r.method||"GET",this._uri=t,this._data=void 0!==r.data?r.data:null,this._create()}_create(){var e;let t=N(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(t);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(let e in r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}catch(e){}if("POST"===this._method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{r.setRequestHeader("Accept","*/*")}catch(e){}null==(e=this._opts.cookieJar)||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;3===r.readyState&&(null==(e=this._opts.cookieJar)||e.parseCookies(r.getResponseHeader("set-cookie"))),4===r.readyState&&(200===r.status||1223===r.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof r.status?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}"undefined"!=typeof document&&(this._index=z.requestsCount++,z.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=B,e)try{this._xhr.abort()}catch(e){}"undefined"!=typeof document&&delete z.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}function U(){for(let e in z.requests)z.requests.hasOwnProperty(e)&&z.requests[e].abort()}z.requestsCount=0,z.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",U):"function"==typeof addEventListener&&addEventListener("onpagehide"in R?"pagehide":"unload",U,!1));let W=function(){let e=q({xdomain:!1});return e&&null!==e.responseType}();class $ extends Z{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=W&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new z(q,this.uri(),e)}}function q(e){let t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||V))return new XMLHttpRequest}catch(e){}if(!t)try{return new R[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(e){}}let H="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class K extends I{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,r=H?{}:N(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,r)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let r=e[t],n=t===e.length-1;h(r,this.supportsBinary,e=>{try{this.doWrite(r,e)}catch(e){}n&&T(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=P()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}let G=R.WebSocket||R.MozWebSocket;class Y extends K{createSocket(e,t,r){return H?new G(e,t,r):t?new G(e,t):new G(e)}doWrite(e,t){this.ws.send(t)}}class X extends I{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=function(e,t){i||(i=new TextDecoder);let r=[],n=0,s=-1,a=!1;return new TransformStream({transform(o,l){for(r.push(o);;){if(0===n){if(1>S(r))break;let e=A(r,1);a=(128&e[0])==128,n=(s=127&e[0])<126?3:126===s?1:2}else if(1===n){if(2>S(r))break;let e=A(r,2);s=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),n=3}else if(2===n){if(8>S(r))break;let e=A(r,8),t=new DataView(e.buffer,e.byteOffset,e.length),i=t.getUint32(0);if(i>2097151){l.enqueue(u);break}s=0x100000000*i+t.getUint32(4),n=3}else{if(S(r)<s)break;let e=A(r,s);l.enqueue(w(a?e:i.decode(e),t)),n=0}if(0===s||s>e){l.enqueue(u);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),s=new TransformStream({transform(e,t){var r;r=r=>{let n,i=r.length;if(i<126)new DataView((n=new Uint8Array(1)).buffer).setUint8(0,i);else if(i<65536){let e=new DataView((n=new Uint8Array(3)).buffer);e.setUint8(0,126),e.setUint16(1,i)}else{let e=new DataView((n=new Uint8Array(9)).buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(i))}e.data&&"string"!=typeof e.data&&(n[0]|=128),t.enqueue(n),t.enqueue(r)},d&&e.data instanceof Blob?e.data.arrayBuffer().then(m).then(r):c&&(e.data instanceof ArrayBuffer||f(e.data))?r(m(e.data)):h(e,!1,e=>{n||(n=new TextEncoder),r(n.encode(e))})}});s.readable.pipeTo(e.writable),this._writer=s.writable.getWriter();let a=()=>{r.read().then(({done:e,value:t})=>{e||(this.onPacket(t),a())}).catch(e=>{})};a();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let r=e[t],n=t===e.length-1;this._writer.write(r).then(()=>{n&&T(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null==(e=this._transport)||e.close()}}let J={websocket:Y,webtransport:X,polling:$},Q=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ee=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function et(e){if(e.length>8e3)throw"URI too long";let t=e,r=e.indexOf("["),n=e.indexOf("]");-1!=r&&-1!=n&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let i=Q.exec(e||""),s={},a=14;for(;a--;)s[ee[a]]=i[a]||"";return -1!=r&&-1!=n&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=function(e,t){let r=t.replace(/\/{2,9}/g,"/").split("/");return("/"==t.slice(0,1)||0===t.length)&&r.splice(0,1),"/"==t.slice(-1)&&r.splice(r.length-1,1),r}(0,s.path),s.queryKey=function(e,t){let r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,n){t&&(r[t]=n)}),r}(0,s.query),s}let er="function"==typeof addEventListener&&"function"==typeof removeEventListener,en=[];er&&addEventListener("offline",()=>{en.forEach(e=>e())},!1);class ei extends C{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){let r=et(e);t.hostname=r.host,t.secure="https"===r.protocol||"wss"===r.protocol,t.port=r.port,r.query&&(t.query=r.query)}else t.host&&(t.hostname=et(t.host).host);L(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},r=e.split("&");for(let e=0,n=r.length;e<n;e++){let n=r[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return t}(this.opts.query)),er&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},en.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let r=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);let e=this.opts.rememberUpgrade&&ei.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";let t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",ei.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let t=Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let r=this.writeBuffer[t].data;if(r&&(e+="string"==typeof r?function(e){let t=0,r=0;for(let n=0,i=e.length;n<i;n++)(t=e.charCodeAt(n))<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}(r):Math.ceil(1.33*(r.byteLength||r.size))),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,T(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,r){return this._sendPacket("message",e,t,r),this}send(e,t,r){return this._sendPacket("message",e,t,r),this}_sendPacket(e,t,r,n){if("function"==typeof t&&(n=t,t=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;let i={type:e,data:t,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),n&&this.once("flush",n),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},r=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return("opening"===this.readyState||"open"===this.readyState)&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(ei.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),er&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=en.indexOf(this._offlineEventListener);-1!==e&&en.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}ei.protocol=4;class es extends ei{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),r=!1;ei.priorWebsocketSuccess=!1;let n=()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!r)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;ei.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{r||"closed"!==this.readyState&&(u(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function i(){r||(r=!0,u(),t.close(),t=null)}let s=e=>{let r=Error("probe error: "+e);r.transport=t.name,i(),this.emitReserved("upgradeError",r)};function a(){s("transport closed")}function o(){s("socket closed")}function l(e){t&&e.name!==t.name&&i()}let u=()=>{t.removeListener("open",n),t.removeListener("error",s),t.removeListener("close",a),this.off("close",o),this.off("upgrading",l)};t.once("open",n),t.once("error",s),t.once("close",a),this.once("close",o),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{r||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}}class ea extends es{constructor(e,t={}){let r="object"==typeof e?e:t;(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(e=>J[e]).filter(e=>!!e)),super(e,r)}}ea.protocol;let eo="function"==typeof ArrayBuffer,el=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,eu=Object.prototype.toString,ed="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===eu.call(Blob),ec="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===eu.call(File);function ef(e){return eo&&(e instanceof ArrayBuffer||el(e))||ed&&e instanceof Blob||ec&&e instanceof File}let eh=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],ep=5;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(s||(s={}));class em{constructor(e){this.replacer=e}encode(e){return(e.type===s.EVENT||e.type===s.ACK)&&function e(t,r){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(e(t[r]))return!0;return!1}if(ef(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1==arguments.length)return e(t.toJSON(),!0);for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return!0;return!1}(e)?this.encodeAsBinary({type:e.type===s.EVENT?s.BINARY_EVENT:s.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===s.BINARY_EVENT||e.type===s.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=function(e){let t=[],r=e.data;return e.data=function e(t,r){if(!t)return t;if(ef(t)){let e={_placeholder:!0,num:r.length};return r.push(t),e}if(Array.isArray(t)){let n=Array(t.length);for(let i=0;i<t.length;i++)n[i]=e(t[i],r);return n}if("object"==typeof t&&!(t instanceof Date)){let n={};for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=e(t[i],r));return n}return t}(r,t),e.attachments=t.length,{packet:e,buffers:t}}(e),r=this.encodeAsString(t.packet),n=t.buffers;return n.unshift(r),n}}function eg(e){return"[object Object]"===Object.prototype.toString.call(e)}class ey extends C{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");let r=(t=this.decodeString(e)).type===s.BINARY_EVENT;r||t.type===s.BINARY_ACK?(t.type=r?s.EVENT:s.ACK,this.reconstructor=new ev(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(ef(e)||e.base64)if(this.reconstructor)(t=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw Error("got binary data when not reconstructing a packet");else throw Error("Unknown type: "+e)}decodeString(e){let t=0,r={type:Number(e.charAt(0))};if(void 0===s[r.type])throw Error("unknown packet type "+r.type);if(r.type===s.BINARY_EVENT||r.type===s.BINARY_ACK){let n=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);let i=e.substring(n,t);if(i!=Number(i)||"-"!==e.charAt(t))throw Error("Illegal attachments");r.attachments=Number(i)}if("/"===e.charAt(t+1)){let n=t+1;for(;++t&&","!==e.charAt(t)&&t!==e.length;);r.nsp=e.substring(n,t)}else r.nsp="/";let n=e.charAt(t+1);if(""!==n&&Number(n)==n){let n=t+1;for(;++t;){let r=e.charAt(t);if(null==r||Number(r)!=r){--t;break}if(t===e.length)break}r.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){let n=this.tryParse(e.substr(t));if(ey.isPayloadValid(r.type,n))r.data=n;else throw Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case s.CONNECT:return eg(t);case s.DISCONNECT:return void 0===t;case s.CONNECT_ERROR:return"string"==typeof t||eg(t);case s.EVENT:case s.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===eh.indexOf(t[0]));case s.ACK:case s.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ev{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t,r;let e=(t=this.reconPack,r=this.buffers,t.data=function e(t,r){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<r.length)return r[t.num];throw Error("illegal attachments")}if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=e(t[n],r);else if("object"==typeof t)for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=e(t[n],r));return t}(t.data,r),delete t.attachments,t);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function eb(e,t,r){return e.on(t,r),function(){e.off(t,r)}}let ew=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class e_ extends C{constructor(e,t,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[eb(e,"open",this.onopen.bind(this)),eb(e,"packet",this.onpacket.bind(this)),eb(e,"error",this.onerror.bind(this)),eb(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var r,n,i;if(ew.hasOwnProperty(e))throw Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let a={type:s.EVENT,data:t};if(a.options={},a.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),a.id=e}let o=null==(n=null==(r=this.io.engine)?void 0:r.transport)?void 0:n.writable,l=this.connected&&!(null==(i=this.io.engine)?void 0:i._hasPingExpired());return this.flags.volatile&&!o||(l?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(e,t){var r;let n=null!=(r=this.flags.timeout)?r:this._opts.ackTimeout;if(void 0===n){this.acks[e]=t;return}let i=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error("operation has timed out"))},n),s=(...e)=>{this.io.clearTimeoutFn(i),t.apply(this,e)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...t){return new Promise((r,n)=>{let i=(e,t)=>e?n(e):r(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());let r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...n)=>{if(r===this._queue[0])return null!==e?r.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...n)),r.pending=!1,this._drainQueue()}),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;let t=this._queue[0];(!t.pending||e)&&(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:s.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case s.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case s.EVENT:case s.BINARY_EVENT:this.onevent(e);break;case s.ACK:case s.BINARY_ACK:this.onack(e);break;case s.DISCONNECT:this.ondisconnect();break;case s.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){let t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length)for(let t of this._anyListeners.slice())t.apply(this,e);super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,r=!1;return function(...n){r||(r=!0,t.packet({type:s.ACK,id:e,data:n}))}}onack(e){let t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:s.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let r=0;r<t.length;r++)if(e===t[r]){t.splice(r,1);break}}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let r=0;r<t.length;r++)if(e===t[r]){t.splice(r,1);break}}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length)for(let t of this._anyOutgoingListeners.slice())t.apply(this,e.data)}}function ex(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}ex.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(1&Math.floor(10*t))==0?e-r:e+r}return 0|Math.min(e,this.max)},ex.prototype.reset=function(){this.attempts=0},ex.prototype.setMin=function(e){this.ms=e},ex.prototype.setMax=function(e){this.max=e},ex.prototype.setJitter=function(e){this.jitter=e};class ek extends C{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,L(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!=(r=t.randomizationFactor)?r:.5),this.backoff=new ex({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;let n=t.parser||a;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null==(t=this.backoff)||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null==(t=this.backoff)||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null==(t=this.backoff)||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new ea(this.uri,this.opts);let t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;let n=eb(t,"open",function(){r.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},s=eb(t,"error",i);if(!1!==this._timeout){let e=this._timeout,r=this.setTimeoutFn(()=>{n(),i(Error("timeout")),t.close()},e);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}return this.subs.push(n),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(eb(e,"ping",this.onping.bind(this)),eb(e,"data",this.ondata.bind(this)),eb(e,"error",this.onerror.bind(this)),eb(e,"close",this.onclose.bind(this)),eb(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){T(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new e_(this,e,t),this.nsps[e]=r),r}_destroy(e){for(let e of Object.keys(this.nsps))if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let r=0;r<t.length;r++)this.engine.write(t[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var r;this.cleanup(),null==(r=this.engine)||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let r=this.setTimeoutFn(()=>{!e.skipReconnect&&(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}let eE={};function eS(e,t){let r;"object"==typeof e&&(t=e,e=void 0);let n=function(e,t="",r){let n=e;r=r||"undefined"!=typeof location&&location,null==e&&(e=r.protocol+"//"+r.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?r.protocol+e:r.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==r?r.protocol+"//"+e:"https://"+e),n=et(e)),!n.port&&(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";let i=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+t,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}(e,(t=t||{}).path||"/socket.io"),i=n.source,s=n.id,a=n.path,o=eE[s]&&a in eE[s].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||o?r=new ek(i,t):(eE[s]||(eE[s]=new ek(i,t)),r=eE[s]),n.query&&!t.query&&(t.query=n.queryKey),r.socket(n.path,t)}Object.assign(eS,{Manager:ek,Socket:e_,io:eS,connect:eS})},1552:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8889).A)("shield-off",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]])},1675:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function i(e,t){var r=n(e,t,"get");return r.get?r.get.call(e):r.value}function s(e,t,r){var i=n(e,t,"set");if(i.set)i.set.call(e,r);else{if(!i.writable)throw TypeError("attempted to set read only private field");i.value=r}return r}r.d(t,{N:()=>f});var a,o=r(7620),l=r(482),u=r(9640),d=r(9649),c=r(4568);function f(e){let t=e+"CollectionProvider",[r,n]=(0,l.A)(t),[i,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{let{scope:t,children:r}=e,n=o.useRef(null),s=o.useRef(new Map).current;return(0,c.jsx)(i,{scope:t,itemMap:s,collectionRef:n,children:r})};a.displayName=t;let f=e+"CollectionSlot",h=(0,d.TL)(f),p=o.forwardRef((e,t)=>{let{scope:r,children:n}=e,i=s(f,r),a=(0,u.s)(t,i.collectionRef);return(0,c.jsx)(h,{ref:a,children:n})});p.displayName=f;let m=e+"CollectionItemSlot",g="data-radix-collection-item",y=(0,d.TL)(m),v=o.forwardRef((e,t)=>{let{scope:r,children:n,...i}=e,a=o.useRef(null),l=(0,u.s)(t,a),d=s(m,r);return o.useEffect(()=>(d.itemMap.set(a,{ref:a,...i}),()=>void d.itemMap.delete(a))),(0,c.jsx)(y,{...{[g]:""},ref:l,children:n})});return v.displayName=m,[{Provider:a,Slot:p,ItemSlot:v},function(t){let r=s(e+"CollectionConsumer",t);return o.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(g,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}var h=new WeakMap;function p(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=function(e,t){let r=e.length,n=m(t),i=n>=0?n:r+n;return i<0||i>=r?-1:i}(e,t);return -1===r?void 0:e[r]}function m(e){return e!=e||0===e?0:Math.trunc(e)}a=new WeakMap},1938:(e,t,r)=>{r.d(t,{Op:()=>C,lN:()=>N,mN:()=>eE,xI:()=>L,xW:()=>A});var n=r(7620),i=e=>"checkbox"===e.type,s=e=>e instanceof Date,a=e=>null==e;let o=e=>"object"==typeof e;var l=e=>!a(e)&&!Array.isArray(e)&&o(e)&&!s(e),u=e=>l(e)&&e.target?i(e.target)?e.target.checked:e.target.value:e,d=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,c=(e,t)=>e.has(d(t)),f=e=>{let t=e.constructor&&e.constructor.prototype;return l(t)&&t.hasOwnProperty("isPrototypeOf")},h="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function p(e){let t,r=Array.isArray(e),n="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(!(h&&(e instanceof Blob||n))&&(r||l(e))))return e;else if(t=r?[]:{},r||f(e))for(let r in e)e.hasOwnProperty(r)&&(t[r]=p(e[r]));else t=e;return t}var m=e=>Array.isArray(e)?e.filter(Boolean):[],g=e=>void 0===e,y=(e,t,r)=>{if(!t||!l(e))return r;let n=m(t.split(/[,[\].]+?/)).reduce((e,t)=>a(e)?e:e[t],e);return g(n)||n===e?g(e[t])?r:e[t]:n},v=e=>"boolean"==typeof e,b=e=>/^\w*$/.test(e),w=e=>m(e.replace(/["|']|\]/g,"").split(/\.|\[/)),_=(e,t,r)=>{let n=-1,i=b(t)?[t]:w(t),s=i.length,a=s-1;for(;++n<s;){let t=i[n],s=r;if(n!==a){let r=e[t];s=l(r)||Array.isArray(r)?r:isNaN(+i[n+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=s,e=e[t]}};let x={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},k={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},E={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},S=n.createContext(null),A=()=>n.useContext(S),C=e=>{let{children:t,...r}=e;return n.createElement(S.Provider,{value:r},t)};var T=(e,t,r,n=!0)=>{let i={defaultValues:t._defaultValues};for(let s in e)Object.defineProperty(i,s,{get:()=>(t._proxyFormState[s]!==k.all&&(t._proxyFormState[s]=!n||k.all),r&&(r[s]=!0),e[s])});return i};let R="undefined"!=typeof window?n.useLayoutEffect:n.useEffect;function N(e){let t=A(),{control:r=t.control,disabled:i,name:s,exact:a}=e||{},[o,l]=n.useState(r._formState),u=n.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return R(()=>r._subscribe({name:s,formState:u.current,exact:a,callback:e=>{i||l({...r._formState,...e})}}),[s,i,a]),n.useEffect(()=>{u.current.isValid&&r._setValid(!0)},[r]),n.useMemo(()=>T(o,r,u.current,!1),[o,r])}var O=e=>"string"==typeof e,j=(e,t,r,n,i)=>O(e)?(n&&t.watch.add(e),y(r,e,i)):Array.isArray(e)?e.map(e=>(n&&t.watch.add(e),y(r,e))):(n&&(t.watchAll=!0),r);let L=e=>e.render(function(e){let t=A(),{name:r,disabled:i,control:s=t.control,shouldUnregister:a}=e,o=c(s._names.array,r),l=function(e){let t=A(),{control:r=t.control,name:i,defaultValue:s,disabled:a,exact:o}=e||{},l=n.useRef(s),[u,d]=n.useState(r._getWatch(i,l.current));return R(()=>r._subscribe({name:i,formState:{values:!0},exact:o,callback:e=>!a&&d(j(i,r._names,e.values||r._formValues,!1,l.current))}),[i,r,a,o]),n.useEffect(()=>r._removeUnmounted()),u}({control:s,name:r,defaultValue:y(s._formValues,r,y(s._defaultValues,r,e.defaultValue)),exact:!0}),d=N({control:s,name:r,exact:!0}),f=n.useRef(e),h=n.useRef(s.register(r,{...e.rules,value:l,...v(e.disabled)?{disabled:e.disabled}:{}})),m=n.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!y(d.errors,r)},isDirty:{enumerable:!0,get:()=>!!y(d.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!y(d.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!y(d.validatingFields,r)},error:{enumerable:!0,get:()=>y(d.errors,r)}}),[d,r]),b=n.useCallback(e=>h.current.onChange({target:{value:u(e),name:r},type:x.CHANGE}),[r]),w=n.useCallback(()=>h.current.onBlur({target:{value:y(s._formValues,r),name:r},type:x.BLUR}),[r,s._formValues]),k=n.useCallback(e=>{let t=y(s._fields,r);t&&e&&(t._f.ref={focus:()=>e.focus&&e.focus(),select:()=>e.select&&e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})},[s._fields,r]),E=n.useMemo(()=>({name:r,value:l,...v(i)||d.disabled?{disabled:d.disabled||i}:{},onChange:b,onBlur:w,ref:k}),[r,i,d.disabled,b,w,k,l]);return n.useEffect(()=>{let e=s._options.shouldUnregister||a;s.register(r,{...f.current.rules,...v(f.current.disabled)?{disabled:f.current.disabled}:{}});let t=(e,t)=>{let r=y(s._fields,e);r&&r._f&&(r._f.mount=t)};if(t(r,!0),e){let e=p(y(s._options.defaultValues,r));_(s._defaultValues,r,e),g(y(s._formValues,r))&&_(s._formValues,r,e)}return o||s.register(r),()=>{(o?e&&!s._state.action:e)?s.unregister(r):t(r,!1)}},[r,s,o,a]),n.useEffect(()=>{s._setDisabledField({disabled:i,name:r})},[i,r,s]),n.useMemo(()=>({field:E,formState:d,fieldState:m}),[E,d,m])}(e));var P=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},D=e=>Array.isArray(e)?e:[e],I=()=>{let e=[];return{get observers(){return e},next:t=>{for(let r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},M=e=>a(e)||!o(e);function F(e,t){if(M(e)||M(t))return e===t;if(s(e)&&s(t))return e.getTime()===t.getTime();let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i of r){let r=e[i];if(!n.includes(i))return!1;if("ref"!==i){let e=t[i];if(s(r)&&s(e)||l(r)&&l(e)||Array.isArray(r)&&Array.isArray(e)?!F(r,e):r!==e)return!1}}return!0}var V=e=>l(e)&&!Object.keys(e).length,B=e=>"file"===e.type,Z=e=>"function"==typeof e,z=e=>{if(!h)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},U=e=>"select-multiple"===e.type,W=e=>"radio"===e.type,$=e=>W(e)||i(e),q=e=>z(e)&&e.isConnected;function H(e,t){let r=Array.isArray(t)?t:b(t)?[t]:w(t),n=1===r.length?e:function(e,t){let r=t.slice(0,-1).length,n=0;for(;n<r;)e=g(e)?n++:e[t[n++]];return e}(e,r),i=r.length-1,s=r[i];return n&&delete n[s],0!==i&&(l(n)&&V(n)||Array.isArray(n)&&function(e){for(let t in e)if(e.hasOwnProperty(t)&&!g(e[t]))return!1;return!0}(n))&&H(e,r.slice(0,-1)),e}var K=e=>{for(let t in e)if(Z(e[t]))return!0;return!1};function G(e,t={}){let r=Array.isArray(e);if(l(e)||r)for(let r in e)Array.isArray(e[r])||l(e[r])&&!K(e[r])?(t[r]=Array.isArray(e[r])?[]:{},G(e[r],t[r])):a(e[r])||(t[r]=!0);return t}var Y=(e,t)=>(function e(t,r,n){let i=Array.isArray(t);if(l(t)||i)for(let i in t)Array.isArray(t[i])||l(t[i])&&!K(t[i])?g(r)||M(n[i])?n[i]=Array.isArray(t[i])?G(t[i],[]):{...G(t[i])}:e(t[i],a(r)?{}:r[i],n[i]):n[i]=!F(t[i],r[i]);return n})(e,t,G(t));let X={value:!1,isValid:!1},J={value:!0,isValid:!0};var Q=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!g(e[0].attributes.value)?g(e[0].value)||""===e[0].value?J:{value:e[0].value,isValid:!0}:J:X}return X},ee=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>g(e)?e:t?""===e?NaN:e?+e:e:r&&O(e)?new Date(e):n?n(e):e;let et={isValid:!1,value:null};var er=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,et):et;function en(e){let t=e.ref;return B(t)?t.files:W(t)?er(e.refs).value:U(t)?[...t.selectedOptions].map(({value:e})=>e):i(t)?Q(e.refs).value:ee(g(t.value)?e.ref.value:t.value,e)}var ei=(e,t,r,n)=>{let i={};for(let r of e){let e=y(t,r);e&&_(i,r,e._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},es=e=>e instanceof RegExp,ea=e=>g(e)?e:es(e)?e.source:l(e)?es(e.value)?e.value.source:e.value:e,eo=e=>({isOnSubmit:!e||e===k.onSubmit,isOnBlur:e===k.onBlur,isOnChange:e===k.onChange,isOnAll:e===k.all,isOnTouch:e===k.onTouched});let el="AsyncFunction";var eu=e=>!!e&&!!e.validate&&!!(Z(e.validate)&&e.validate.constructor.name===el||l(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===el)),ed=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ec=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));let ef=(e,t,r,n)=>{for(let i of r||Object.keys(e)){let r=y(e,i);if(r){let{_f:e,...s}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!n)return!0;else if(e.ref&&t(e.ref,e.name)&&!n)return!0;else if(ef(s,t))break}else if(l(s)&&ef(s,t))break}}};function eh(e,t,r){let n=y(e,r);if(n||b(r))return{error:n,name:r};let i=r.split(".");for(;i.length;){let n=i.join("."),s=y(t,n),a=y(e,n);if(s&&!Array.isArray(s)&&r!==n)break;if(a&&a.type)return{name:n,error:a};if(a&&a.root&&a.root.type)return{name:`${n}.root`,error:a.root};i.pop()}return{name:r}}var ep=(e,t,r,n)=>{r(e);let{name:i,...s}=e;return V(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(e=>t[e]===(!n||k.all))},em=(e,t,r)=>!e||!t||e===t||D(e).some(e=>e&&(r?e===t:e.startsWith(t)||t.startsWith(e))),eg=(e,t,r,n,i)=>!i.isOnAll&&(!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?!n.isOnChange:!i.isOnChange)||e),ey=(e,t)=>!m(y(e,t)).length&&H(e,t),ev=(e,t,r)=>{let n=D(y(e,r));return _(n,"root",t[r]),_(e,r,n),e},eb=e=>O(e);function ew(e,t,r="validate"){if(eb(e)||Array.isArray(e)&&e.every(eb)||v(e)&&!e)return{type:r,message:eb(e)?e:"",ref:t}}var e_=e=>l(e)&&!es(e)?e:{value:e,message:""},ex=async(e,t,r,n,s,o)=>{let{ref:u,refs:d,required:c,maxLength:f,minLength:h,min:p,max:m,pattern:b,validate:w,name:_,valueAsNumber:x,mount:k}=e._f,S=y(r,_);if(!k||t.has(_))return{};let A=d?d[0]:u,C=e=>{s&&A.reportValidity&&(A.setCustomValidity(v(e)?"":e||""),A.reportValidity())},T={},R=W(u),N=i(u),j=(x||B(u))&&g(u.value)&&g(S)||z(u)&&""===u.value||""===S||Array.isArray(S)&&!S.length,L=P.bind(null,_,n,T),D=(e,t,r,n=E.maxLength,i=E.minLength)=>{let s=e?t:r;T[_]={type:e?n:i,message:s,ref:u,...L(e?n:i,s)}};if(o?!Array.isArray(S)||!S.length:c&&(!(R||N)&&(j||a(S))||v(S)&&!S||N&&!Q(d).isValid||R&&!er(d).isValid)){let{value:e,message:t}=eb(c)?{value:!!c,message:c}:e_(c);if(e&&(T[_]={type:E.required,message:t,ref:A,...L(E.required,t)},!n))return C(t),T}if(!j&&(!a(p)||!a(m))){let e,t,r=e_(m),i=e_(p);if(a(S)||isNaN(S)){let n=u.valueAsDate||new Date(S),s=e=>new Date(new Date().toDateString()+" "+e),a="time"==u.type,o="week"==u.type;O(r.value)&&S&&(e=a?s(S)>s(r.value):o?S>r.value:n>new Date(r.value)),O(i.value)&&S&&(t=a?s(S)<s(i.value):o?S<i.value:n<new Date(i.value))}else{let n=u.valueAsNumber||(S?+S:S);a(r.value)||(e=n>r.value),a(i.value)||(t=n<i.value)}if((e||t)&&(D(!!e,r.message,i.message,E.max,E.min),!n))return C(T[_].message),T}if((f||h)&&!j&&(O(S)||o&&Array.isArray(S))){let e=e_(f),t=e_(h),r=!a(e.value)&&S.length>+e.value,i=!a(t.value)&&S.length<+t.value;if((r||i)&&(D(r,e.message,t.message),!n))return C(T[_].message),T}if(b&&!j&&O(S)){let{value:e,message:t}=e_(b);if(es(e)&&!S.match(e)&&(T[_]={type:E.pattern,message:t,ref:u,...L(E.pattern,t)},!n))return C(t),T}if(w){if(Z(w)){let e=ew(await w(S,r),A);if(e&&(T[_]={...e,...L(E.validate,e.message)},!n))return C(e.message),T}else if(l(w)){let e={};for(let t in w){if(!V(e)&&!n)break;let i=ew(await w[t](S,r),A,t);i&&(e={...i,...L(t,i.message)},C(i.message),n&&(T[_]=e))}if(!V(e)&&(T[_]={ref:A,...e},!n))return T}}return C(!0),T};let ek={mode:k.onSubmit,reValidateMode:k.onChange,shouldFocusError:!0};function eE(e={}){let t=n.useRef(void 0),r=n.useRef(void 0),[o,d]=n.useState({isDirty:!1,isValidating:!1,isLoading:Z(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Z(e.defaultValues)?void 0:e.defaultValues});!t.current&&(t.current={...e.formControl?e.formControl:function(e={}){let t,r={...ek,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Z(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},o={},d=(l(r.defaultValues)||l(r.values))&&p(r.defaultValues||r.values)||{},f=r.shouldUnregister?{}:p(d),b={action:!1,mount:!1,watch:!1},w={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},E=0,S={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},A={...S},C={array:I(),state:I()},T=r.criteriaMode===k.all,R=e=>t=>{clearTimeout(E),E=setTimeout(e,t)},N=async e=>{if(!r.disabled&&(S.isValid||A.isValid||e)){let e=r.resolver?V((await G()).errors):await J(o,!0);e!==n.isValid&&C.state.next({isValid:e})}},L=(e,t)=>{!r.disabled&&(S.isValidating||S.validatingFields||A.isValidating||A.validatingFields)&&((e||Array.from(w.mount)).forEach(e=>{e&&(t?_(n.validatingFields,e,t):H(n.validatingFields,e))}),C.state.next({validatingFields:n.validatingFields,isValidating:!V(n.validatingFields)}))},P=(e,t)=>{_(n.errors,e,t),C.state.next({errors:n.errors})},M=(e,t,r,n)=>{let i=y(o,e);if(i){let s=y(f,e,g(r)?y(d,e):r);g(s)||n&&n.defaultChecked||t?_(f,e,t?s:en(i._f)):er(e,s),b.mount&&N()}},W=(e,t,i,s,a)=>{let o=!1,l=!1,u={name:e};if(!r.disabled){if(!i||s){(S.isDirty||A.isDirty)&&(l=n.isDirty,n.isDirty=u.isDirty=Q(),o=l!==u.isDirty);let r=F(y(d,e),t);l=!!y(n.dirtyFields,e),r?H(n.dirtyFields,e):_(n.dirtyFields,e,!0),u.dirtyFields=n.dirtyFields,o=o||(S.dirtyFields||A.dirtyFields)&&!r!==l}if(i){let t=y(n.touchedFields,e);t||(_(n.touchedFields,e,i),u.touchedFields=n.touchedFields,o=o||(S.touchedFields||A.touchedFields)&&t!==i)}o&&a&&C.state.next(u)}return o?u:{}},K=(e,i,s,a)=>{let o=y(n.errors,e),l=(S.isValid||A.isValid)&&v(i)&&n.isValid!==i;if(r.delayError&&s?(t=R(()=>P(e,s)))(r.delayError):(clearTimeout(E),t=null,s?_(n.errors,e,s):H(n.errors,e)),(s?!F(o,s):o)||!V(a)||l){let t={...a,...l&&v(i)?{isValid:i}:{},errors:n.errors,name:e};n={...n,...t},C.state.next(t)}},G=async e=>{L(e,!0);let t=await r.resolver(f,r.context,ei(e||w.mount,o,r.criteriaMode,r.shouldUseNativeValidation));return L(e),t},X=async e=>{let{errors:t}=await G(e);if(e)for(let r of e){let e=y(t,r);e?_(n.errors,r,e):H(n.errors,r)}else n.errors=t;return t},J=async(e,t,i={valid:!0})=>{for(let s in e){let a=e[s];if(a){let{_f:e,...o}=a;if(e){let o=w.array.has(e.name),l=a._f&&eu(a._f);l&&S.validatingFields&&L([s],!0);let u=await ex(a,w.disabled,f,T,r.shouldUseNativeValidation&&!t,o);if(l&&S.validatingFields&&L([s]),u[e.name]&&(i.valid=!1,t))break;t||(y(u,e.name)?o?ev(n.errors,u,e.name):_(n.errors,e.name,u[e.name]):H(n.errors,e.name))}V(o)||await J(o,t,i)}}return i.valid},Q=(e,t)=>!r.disabled&&(e&&t&&_(f,e,t),!F(eE(),d)),et=(e,t,r)=>j(e,w,{...b.mount?f:g(t)?d:O(e)?{[e]:t}:t},r,t),er=(e,t,r={})=>{let n=y(o,e),s=t;if(n){let r=n._f;r&&(r.disabled||_(f,e,ee(t,r)),s=z(r.ref)&&a(t)?"":t,U(r.ref)?[...r.ref.options].forEach(e=>e.selected=s.includes(e.value)):r.refs?i(r.ref)?r.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(s)?e.checked=!!s.find(t=>t===e.value):e.checked=s===e.value||!!s)}):r.refs.forEach(e=>e.checked=e.value===s):B(r.ref)?r.ref.value="":(r.ref.value=s,r.ref.type||C.state.next({name:e,values:p(f)})))}(r.shouldDirty||r.shouldTouch)&&W(e,s,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&e_(e)},es=(e,t,r)=>{for(let n in t){if(!t.hasOwnProperty(n))return;let i=t[n],a=e+"."+n,u=y(o,a);(w.array.has(e)||l(i)||u&&!u._f)&&!s(i)?es(a,i,r):er(a,i,r)}},el=(e,t,r={})=>{let i=y(o,e),s=w.array.has(e),l=p(t);_(f,e,l),s?(C.array.next({name:e,values:p(f)}),(S.isDirty||S.dirtyFields||A.isDirty||A.dirtyFields)&&r.shouldDirty&&C.state.next({name:e,dirtyFields:Y(d,f),isDirty:Q(e,l)})):!i||i._f||a(l)?er(e,l,r):es(e,l,r),ec(e,w)&&C.state.next({...n}),C.state.next({name:b.mount?e:void 0,values:p(f)})},eb=async e=>{b.mount=!0;let i=e.target,a=i.name,l=!0,d=y(o,a),c=e=>{l=Number.isNaN(e)||s(e)&&isNaN(e.getTime())||F(e,y(f,a,e))},h=eo(r.mode),m=eo(r.reValidateMode);if(d){let s,g,v=i.type?en(d._f):u(e),b=e.type===x.BLUR||e.type===x.FOCUS_OUT,k=!ed(d._f)&&!r.resolver&&!y(n.errors,a)&&!d._f.deps||eg(b,y(n.touchedFields,a),n.isSubmitted,m,h),E=ec(a,w,b);_(f,a,v),b?(d._f.onBlur&&d._f.onBlur(e),t&&t(0)):d._f.onChange&&d._f.onChange(e);let R=W(a,v,b),O=!V(R)||E;if(b||C.state.next({name:a,type:e.type,values:p(f)}),k)return(S.isValid||A.isValid)&&("onBlur"===r.mode?b&&N():b||N()),O&&C.state.next({name:a,...E?{}:R});if(!b&&E&&C.state.next({...n}),r.resolver){let{errors:e}=await G([a]);if(c(v),l){let t=eh(n.errors,o,a),r=eh(e,o,t.name||a);s=r.error,a=r.name,g=V(e)}}else L([a],!0),s=(await ex(d,w.disabled,f,T,r.shouldUseNativeValidation))[a],L([a]),c(v),l&&(s?g=!1:(S.isValid||A.isValid)&&(g=await J(o,!0)));l&&(d._f.deps&&e_(d._f.deps),K(a,g,s,R))}},ew=(e,t)=>{if(y(n.errors,t)&&e.focus)return e.focus(),1},e_=async(e,t={})=>{let i,s,a=D(e);if(r.resolver){let t=await X(g(e)?e:a);i=V(t),s=e?!a.some(e=>y(t,e)):i}else e?((s=(await Promise.all(a.map(async e=>{let t=y(o,e);return await J(t&&t._f?{[e]:t}:t)}))).every(Boolean))||n.isValid)&&N():s=i=await J(o);return C.state.next({...!O(e)||(S.isValid||A.isValid)&&i!==n.isValid?{}:{name:e},...r.resolver||!e?{isValid:i}:{},errors:n.errors}),t.shouldFocus&&!s&&ef(o,ew,e?a:w.mount),s},eE=e=>{let t={...b.mount?f:d};return g(e)?t:O(e)?y(t,e):e.map(e=>y(t,e))},eS=(e,t)=>({invalid:!!y((t||n).errors,e),isDirty:!!y((t||n).dirtyFields,e),error:y((t||n).errors,e),isValidating:!!y(n.validatingFields,e),isTouched:!!y((t||n).touchedFields,e)}),eA=(e,t,r)=>{let i=(y(o,e,{_f:{}})._f||{}).ref,{ref:s,message:a,type:l,...u}=y(n.errors,e)||{};_(n.errors,e,{...u,...t,ref:i}),C.state.next({name:e,errors:n.errors,isValid:!1}),r&&r.shouldFocus&&i&&i.focus&&i.focus()},eC=e=>C.state.subscribe({next:t=>{em(e.name,t.name,e.exact)&&ep(t,e.formState||S,eD,e.reRenderRoot)&&e.callback({values:{...f},...n,...t})}}).unsubscribe,eT=(e,t={})=>{for(let i of e?D(e):w.mount)w.mount.delete(i),w.array.delete(i),t.keepValue||(H(o,i),H(f,i)),t.keepError||H(n.errors,i),t.keepDirty||H(n.dirtyFields,i),t.keepTouched||H(n.touchedFields,i),t.keepIsValidating||H(n.validatingFields,i),r.shouldUnregister||t.keepDefaultValue||H(d,i);C.state.next({values:p(f)}),C.state.next({...n,...!t.keepDirty?{}:{isDirty:Q()}}),t.keepIsValid||N()},eR=({disabled:e,name:t})=>{(v(e)&&b.mount||e||w.disabled.has(t))&&(e?w.disabled.add(t):w.disabled.delete(t))},eN=(e,t={})=>{let n=y(o,e),i=v(t.disabled)||v(r.disabled);return _(o,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),w.mount.add(e),n?eR({disabled:v(t.disabled)?t.disabled:r.disabled,name:e}):M(e,!0,t.value),{...i?{disabled:t.disabled||r.disabled}:{},...r.progressive?{required:!!t.required,min:ea(t.min),max:ea(t.max),minLength:ea(t.minLength),maxLength:ea(t.maxLength),pattern:ea(t.pattern)}:{},name:e,onChange:eb,onBlur:eb,ref:i=>{if(i){eN(e,t),n=y(o,e);let r=g(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,s=$(r),a=n._f.refs||[];(s?a.find(e=>e===r):r===n._f.ref)||(_(o,e,{_f:{...n._f,...s?{refs:[...a.filter(q),r,...Array.isArray(y(d,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),M(e,!1,void 0,r))}else(n=y(o,e,{}))._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&!(c(w.array,e)&&b.action)&&w.unMount.add(e)}}},eO=()=>r.shouldFocusError&&ef(o,ew,w.mount),ej=(e,t)=>async i=>{let s;i&&(i.preventDefault&&i.preventDefault(),i.persist&&i.persist());let a=p(f);if(C.state.next({isSubmitting:!0}),r.resolver){let{errors:e,values:t}=await G();n.errors=e,a=t}else await J(o);if(w.disabled.size)for(let e of w.disabled)_(a,e,void 0);if(H(n.errors,"root"),V(n.errors)){C.state.next({errors:{}});try{await e(a,i)}catch(e){s=e}}else t&&await t({...n.errors},i),eO(),setTimeout(eO);if(C.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:V(n.errors)&&!s,submitCount:n.submitCount+1,errors:n.errors}),s)throw s},eL=(e,t={})=>{let i=e?p(e):d,s=p(i),a=V(e),l=a?d:s;if(t.keepDefaultValues||(d=i),!t.keepValues){if(t.keepDirtyValues)for(let e of Array.from(new Set([...w.mount,...Object.keys(Y(d,f))])))y(n.dirtyFields,e)?_(l,e,y(f,e)):el(e,y(l,e));else{if(h&&g(e))for(let e of w.mount){let t=y(o,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(z(e)){let t=e.closest("form");if(t){t.reset();break}}}}for(let e of w.mount)el(e,y(l,e))}f=p(l),C.array.next({values:{...l}}),C.state.next({values:{...l}})}w={mount:t.keepDirtyValues?w.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},b.mount=!S.isValid||!!t.keepIsValid||!!t.keepDirtyValues,b.watch=!!r.shouldUnregister,C.state.next({submitCount:t.keepSubmitCount?n.submitCount:0,isDirty:!a&&(t.keepDirty?n.isDirty:!!(t.keepDefaultValues&&!F(e,d))),isSubmitted:!!t.keepIsSubmitted&&n.isSubmitted,dirtyFields:a?{}:t.keepDirtyValues?t.keepDefaultValues&&f?Y(d,f):n.dirtyFields:t.keepDefaultValues&&e?Y(d,e):t.keepDirty?n.dirtyFields:{},touchedFields:t.keepTouched?n.touchedFields:{},errors:t.keepErrors?n.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&n.isSubmitSuccessful,isSubmitting:!1})},eP=(e,t)=>eL(Z(e)?e(f):e,t),eD=e=>{n={...n,...e}},eI={control:{register:eN,unregister:eT,getFieldState:eS,handleSubmit:ej,setError:eA,_subscribe:eC,_runSchema:G,_focusError:eO,_getWatch:et,_getDirty:Q,_setValid:N,_setFieldArray:(e,t=[],i,s,a=!0,l=!0)=>{if(s&&i&&!r.disabled){if(b.action=!0,l&&Array.isArray(y(o,e))){let t=i(y(o,e),s.argA,s.argB);a&&_(o,e,t)}if(l&&Array.isArray(y(n.errors,e))){let t=i(y(n.errors,e),s.argA,s.argB);a&&_(n.errors,e,t),ey(n.errors,e)}if((S.touchedFields||A.touchedFields)&&l&&Array.isArray(y(n.touchedFields,e))){let t=i(y(n.touchedFields,e),s.argA,s.argB);a&&_(n.touchedFields,e,t)}(S.dirtyFields||A.dirtyFields)&&(n.dirtyFields=Y(d,f)),C.state.next({name:e,isDirty:Q(e,t),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else _(f,e,t)},_setDisabledField:eR,_setErrors:e=>{n.errors=e,C.state.next({errors:n.errors,isValid:!1})},_getFieldArray:e=>m(y(b.mount?f:d,e,r.shouldUnregister?y(d,e,[]):[])),_reset:eL,_resetDefaultValues:()=>Z(r.defaultValues)&&r.defaultValues().then(e=>{eP(e,r.resetOptions),C.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(let e of w.unMount){let t=y(o,e);t&&(t._f.refs?t._f.refs.every(e=>!q(e)):!q(t._f.ref))&&eT(e)}w.unMount=new Set},_disableForm:e=>{v(e)&&(C.state.next({disabled:e}),ef(o,(t,r)=>{let n=y(o,r);n&&(t.disabled=n._f.disabled||e,Array.isArray(n._f.refs)&&n._f.refs.forEach(t=>{t.disabled=n._f.disabled||e}))},0,!1))},_subjects:C,_proxyFormState:S,get _fields(){return o},get _formValues(){return f},get _state(){return b},set _state(value){b=value},get _defaultValues(){return d},get _names(){return w},set _names(value){w=value},get _formState(){return n},get _options(){return r},set _options(value){r={...r,...value}}},subscribe:e=>(b.mount=!0,A={...A,...e.formState},eC({...e,formState:A})),trigger:e_,register:eN,handleSubmit:ej,watch:(e,t)=>Z(e)?C.state.subscribe({next:r=>e(et(void 0,t),r)}):et(e,t,!0),setValue:el,getValues:eE,reset:eP,resetField:(e,t={})=>{y(o,e)&&(g(t.defaultValue)?el(e,p(y(d,e))):(el(e,t.defaultValue),_(d,e,p(t.defaultValue))),t.keepTouched||H(n.touchedFields,e),t.keepDirty||(H(n.dirtyFields,e),n.isDirty=t.defaultValue?Q(e,p(y(d,e))):Q()),!t.keepError&&(H(n.errors,e),S.isValid&&N()),C.state.next({...n}))},clearErrors:e=>{e&&D(e).forEach(e=>H(n.errors,e)),C.state.next({errors:e?n.errors:{}})},unregister:eT,setError:eA,setFocus:(e,t={})=>{let r=y(o,e),n=r&&r._f;if(n){let e=n.refs?n.refs[0]:n.ref;e.focus&&(e.focus(),t.shouldSelect&&Z(e.select)&&e.select())}},getFieldState:eS};return{...eI,formControl:eI}}(e),formState:o},e.formControl&&e.defaultValues&&!Z(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));let f=t.current.control;return f._options=e,R(()=>{let e=f._subscribe({formState:f._proxyFormState,callback:()=>d({...f._formState}),reRenderRoot:!0});return d(e=>({...e,isReady:!0})),f._formState.isReady=!0,e},[f]),n.useEffect(()=>f._disableForm(e.disabled),[f,e.disabled]),n.useEffect(()=>{e.mode&&(f._options.mode=e.mode),e.reValidateMode&&(f._options.reValidateMode=e.reValidateMode)},[f,e.mode,e.reValidateMode]),n.useEffect(()=>{e.errors&&(f._setErrors(e.errors),f._focusError())},[f,e.errors]),n.useEffect(()=>{e.shouldUnregister&&f._subjects.state.next({values:f._getWatch()})},[f,e.shouldUnregister]),n.useEffect(()=>{if(f._proxyFormState.isDirty){let e=f._getDirty();e!==o.isDirty&&f._subjects.state.next({isDirty:e})}},[f,o.isDirty]),n.useEffect(()=>{e.values&&!F(e.values,r.current)?(f._reset(e.values,f._options.resetOptions),r.current=e.values,d(e=>({...e}))):f._resetDefaultValues()},[f,e.values]),n.useEffect(()=>{f._state.mount||(f._setValid(),f._state.mount=!0),f._state.watch&&(f._state.watch=!1,f._subjects.state.next({...f._formState})),f._removeUnmounted()}),t.current.formState=T(o,f),t.current}},2568:(e,t,r)=>{r.d(t,{LM:()=>K,OK:()=>G,VM:()=>k,bL:()=>H,lr:()=>P});var n=r(7620),i=r(7156),s=r(8400),a=r(482),o=r(9640),l=r(3568),u=r(7644),d=r(7247),c=r(5038),f=r(9254),h=r(4568),p="ScrollArea",[m,g]=(0,a.A)(p),[y,v]=m(p),b=n.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:s="hover",dir:a,scrollHideDelay:l=600,...d}=e,[c,f]=n.useState(null),[p,m]=n.useState(null),[g,v]=n.useState(null),[b,w]=n.useState(null),[_,x]=n.useState(null),[k,E]=n.useState(0),[S,A]=n.useState(0),[C,T]=n.useState(!1),[R,N]=n.useState(!1),O=(0,o.s)(t,e=>f(e)),j=(0,u.jH)(a);return(0,h.jsx)(y,{scope:r,type:s,dir:j,scrollHideDelay:l,scrollArea:c,viewport:p,onViewportChange:m,content:g,onContentChange:v,scrollbarX:b,onScrollbarXChange:w,scrollbarXEnabled:C,onScrollbarXEnabledChange:T,scrollbarY:_,onScrollbarYChange:x,scrollbarYEnabled:R,onScrollbarYEnabledChange:N,onCornerWidthChange:E,onCornerHeightChange:A,children:(0,h.jsx)(i.sG.div,{dir:j,...d,ref:O,style:{position:"relative","--radix-scroll-area-corner-width":k+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});b.displayName=p;var w="ScrollAreaViewport",_=n.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:s,nonce:a,...l}=e,u=v(w,r),d=n.useRef(null),c=(0,o.s)(t,d,u.onViewportChange);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),(0,h.jsx)(i.sG.div,{"data-radix-scroll-area-viewport":"",...l,ref:c,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,h.jsx)("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});_.displayName=w;var x="ScrollAreaScrollbar",k=n.forwardRef((e,t)=>{let{forceMount:r,...i}=e,s=v(x,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=s,l="horizontal"===e.orientation;return n.useEffect(()=>(l?a(!0):o(!0),()=>{l?a(!1):o(!1)}),[l,a,o]),"hover"===s.type?(0,h.jsx)(E,{...i,ref:t,forceMount:r}):"scroll"===s.type?(0,h.jsx)(S,{...i,ref:t,forceMount:r}):"auto"===s.type?(0,h.jsx)(A,{...i,ref:t,forceMount:r}):"always"===s.type?(0,h.jsx)(C,{...i,ref:t}):null});k.displayName=x;var E=n.forwardRef((e,t)=>{let{forceMount:r,...i}=e,a=v(x,e.__scopeScrollArea),[o,l]=n.useState(!1);return n.useEffect(()=>{let e=a.scrollArea,t=0;if(e){let r=()=>{window.clearTimeout(t),l(!0)},n=()=>{t=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",n),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",n)}}},[a.scrollArea,a.scrollHideDelay]),(0,h.jsx)(s.C,{present:r||o,children:(0,h.jsx)(A,{"data-state":o?"visible":"hidden",...i,ref:t})})}),S=n.forwardRef((e,t)=>{var r,i;let{forceMount:a,...o}=e,l=v(x,e.__scopeScrollArea),u="horizontal"===e.orientation,d=$(()=>p("SCROLL_END"),100),[c,p]=(r="hidden",i={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},n.useReducer((e,t)=>{let r=i[e][t];return null!=r?r:e},r));return n.useEffect(()=>{if("idle"===c){let e=window.setTimeout(()=>p("HIDE"),l.scrollHideDelay);return()=>window.clearTimeout(e)}},[c,l.scrollHideDelay,p]),n.useEffect(()=>{let e=l.viewport,t=u?"scrollLeft":"scrollTop";if(e){let r=e[t],n=()=>{let n=e[t];r!==n&&(p("SCROLL"),d()),r=n};return e.addEventListener("scroll",n),()=>e.removeEventListener("scroll",n)}},[l.viewport,u,p,d]),(0,h.jsx)(s.C,{present:a||"hidden"!==c,children:(0,h.jsx)(C,{"data-state":"hidden"===c?"hidden":"visible",...o,ref:t,onPointerEnter:(0,f.m)(e.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:(0,f.m)(e.onPointerLeave,()=>p("POINTER_LEAVE"))})})}),A=n.forwardRef((e,t)=>{let r=v(x,e.__scopeScrollArea),{forceMount:i,...a}=e,[o,l]=n.useState(!1),u="horizontal"===e.orientation,d=$(()=>{if(r.viewport){let e=r.viewport.offsetWidth<r.viewport.scrollWidth,t=r.viewport.offsetHeight<r.viewport.scrollHeight;l(u?e:t)}},10);return q(r.viewport,d),q(r.content,d),(0,h.jsx)(s.C,{present:i||o,children:(0,h.jsx)(C,{"data-state":o?"visible":"hidden",...a,ref:t})})}),C=n.forwardRef((e,t)=>{let{orientation:r="vertical",...i}=e,s=v(x,e.__scopeScrollArea),a=n.useRef(null),o=n.useRef(0),[l,u]=n.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=B(l.viewport,l.content),c={...i,sizes:l,onSizesChange:u,hasThumb:!!(d>0&&d<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function f(e,t){return function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"ltr",i=Z(r),s=t||i/2,a=r.scrollbar.paddingStart+s,o=r.scrollbar.size-r.scrollbar.paddingEnd-(i-s),l=r.content-r.viewport;return U([a,o],"ltr"===n?[0,l]:[-1*l,0])(e)}(e,o.current,l,t)}return"horizontal"===r?(0,h.jsx)(T,{...c,ref:t,onThumbPositionChange:()=>{if(s.viewport&&a.current){let e=z(s.viewport.scrollLeft,l,s.dir);a.current.style.transform="translate3d(".concat(e,"px, 0, 0)")}},onWheelScroll:e=>{s.viewport&&(s.viewport.scrollLeft=e)},onDragScroll:e=>{s.viewport&&(s.viewport.scrollLeft=f(e,s.dir))}}):"vertical"===r?(0,h.jsx)(R,{...c,ref:t,onThumbPositionChange:()=>{if(s.viewport&&a.current){let e=z(s.viewport.scrollTop,l);a.current.style.transform="translate3d(0, ".concat(e,"px, 0)")}},onWheelScroll:e=>{s.viewport&&(s.viewport.scrollTop=e)},onDragScroll:e=>{s.viewport&&(s.viewport.scrollTop=f(e))}}):null}),T=n.forwardRef((e,t)=>{let{sizes:r,onSizesChange:i,...s}=e,a=v(x,e.__scopeScrollArea),[l,u]=n.useState(),d=n.useRef(null),c=(0,o.s)(t,d,a.onScrollbarXChange);return n.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),(0,h.jsx)(j,{"data-orientation":"horizontal",...s,ref:c,sizes:r,style:{bottom:0,left:"rtl"===a.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===a.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Z(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,r)=>{if(a.viewport){let n=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(n),function(e,t){return e>0&&e<t}(n,r)&&t.preventDefault()}},onResize:()=>{d.current&&a.viewport&&l&&i({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:V(l.paddingLeft),paddingEnd:V(l.paddingRight)}})}})}),R=n.forwardRef((e,t)=>{let{sizes:r,onSizesChange:i,...s}=e,a=v(x,e.__scopeScrollArea),[l,u]=n.useState(),d=n.useRef(null),c=(0,o.s)(t,d,a.onScrollbarYChange);return n.useEffect(()=>{d.current&&u(getComputedStyle(d.current))},[d]),(0,h.jsx)(j,{"data-orientation":"vertical",...s,ref:c,sizes:r,style:{top:0,right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Z(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,r)=>{if(a.viewport){let n=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(n),function(e,t){return e>0&&e<t}(n,r)&&t.preventDefault()}},onResize:()=>{d.current&&a.viewport&&l&&i({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:V(l.paddingTop),paddingEnd:V(l.paddingBottom)}})}})}),[N,O]=m(x),j=n.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:s,hasThumb:a,onThumbChange:u,onThumbPointerUp:d,onThumbPointerDown:c,onThumbPositionChange:p,onDragScroll:m,onWheelScroll:g,onResize:y,...b}=e,w=v(x,r),[_,k]=n.useState(null),E=(0,o.s)(t,e=>k(e)),S=n.useRef(null),A=n.useRef(""),C=w.viewport,T=s.content-s.viewport,R=(0,l.c)(g),O=(0,l.c)(p),j=$(y,10);function L(e){S.current&&m({x:e.clientX-S.current.left,y:e.clientY-S.current.top})}return n.useEffect(()=>{let e=e=>{let t=e.target;(null==_?void 0:_.contains(t))&&R(e,T)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[C,_,T,R]),n.useEffect(O,[s,O]),q(_,j),q(w.content,j),(0,h.jsx)(N,{scope:r,scrollbar:_,hasThumb:a,onThumbChange:(0,l.c)(u),onThumbPointerUp:(0,l.c)(d),onThumbPositionChange:O,onThumbPointerDown:(0,l.c)(c),children:(0,h.jsx)(i.sG.div,{...b,ref:E,style:{position:"absolute",...b.style},onPointerDown:(0,f.m)(e.onPointerDown,e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),S.current=_.getBoundingClientRect(),A.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",w.viewport&&(w.viewport.style.scrollBehavior="auto"),L(e))}),onPointerMove:(0,f.m)(e.onPointerMove,L),onPointerUp:(0,f.m)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=A.current,w.viewport&&(w.viewport.style.scrollBehavior=""),S.current=null})})})}),L="ScrollAreaThumb",P=n.forwardRef((e,t)=>{let{forceMount:r,...n}=e,i=O(L,e.__scopeScrollArea);return(0,h.jsx)(s.C,{present:r||i.hasThumb,children:(0,h.jsx)(D,{ref:t,...n})})}),D=n.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:s,...a}=e,l=v(L,r),u=O(L,r),{onThumbPositionChange:d}=u,c=(0,o.s)(t,e=>u.onThumbChange(e)),p=n.useRef(void 0),m=$(()=>{p.current&&(p.current(),p.current=void 0)},100);return n.useEffect(()=>{let e=l.viewport;if(e){let t=()=>{m(),p.current||(p.current=W(e,d),d())};return d(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[l.viewport,m,d]),(0,h.jsx)(i.sG.div,{"data-state":u.hasThumb?"visible":"hidden",...a,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:(0,f.m)(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=e.clientY-t.top;u.onThumbPointerDown({x:r,y:n})}),onPointerUp:(0,f.m)(e.onPointerUp,u.onThumbPointerUp)})});P.displayName=L;var I="ScrollAreaCorner",M=n.forwardRef((e,t)=>{let r=v(I,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&n?(0,h.jsx)(F,{...e,ref:t}):null});M.displayName=I;var F=n.forwardRef((e,t)=>{let{__scopeScrollArea:r,...s}=e,a=v(I,r),[o,l]=n.useState(0),[u,d]=n.useState(0),c=!!(o&&u);return q(a.scrollbarX,()=>{var e;let t=(null==(e=a.scrollbarX)?void 0:e.offsetHeight)||0;a.onCornerHeightChange(t),d(t)}),q(a.scrollbarY,()=>{var e;let t=(null==(e=a.scrollbarY)?void 0:e.offsetWidth)||0;a.onCornerWidthChange(t),l(t)}),c?(0,h.jsx)(i.sG.div,{...s,ref:t,style:{width:o,height:u,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null});function V(e){return e?parseInt(e,10):0}function B(e,t){let r=e/t;return isNaN(r)?0:r}function Z(e){let t=B(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd;return Math.max((e.scrollbar.size-r)*t,18)}function z(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ltr",n=Z(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-i,a=t.content-t.viewport,o=(0,c.q)(e,"ltr"===r?[0,a]:[-1*a,0]);return U([0,a],[0,s-n])(o)}function U(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}var W=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r={left:e.scrollLeft,top:e.scrollTop},n=0;return!function i(){let s={left:e.scrollLeft,top:e.scrollTop},a=r.left!==s.left,o=r.top!==s.top;(a||o)&&t(),r=s,n=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(n)};function $(e,t){let r=(0,l.c)(e),i=n.useRef(0);return n.useEffect(()=>()=>window.clearTimeout(i.current),[]),n.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(r,t)},[r,t])}function q(e,t){let r=(0,l.c)(t);(0,d.N)(()=>{let t=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(t),n.unobserve(e)}}},[e,r])}var H=b,K=_,G=M},2935:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{callServer:function(){return n.callServer},createServerReference:function(){return s},findSourceMapURL:function(){return i.findSourceMapURL}});let n=r(5411),i=r(5176),s=r(496).createServerReference},2942:(e,t,r)=>{var n=r(2418);r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}})},2987:(e,t,r)=>{r.d(t,{$:()=>n});function n(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(r=0;r<s;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}(e))&&(n&&(n+=" "),n+=t);return n}},3568:(e,t,r)=>{r.d(t,{c:()=>i});var n=r(7620);function i(e){let t=n.useRef(e);return n.useEffect(()=>{t.current=e}),n.useMemo(()=>(...e)=>t.current?.(...e),[])}},4711:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8889).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},4931:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8889).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},5006:(e,t,r)=>{let n;r.d(t,{z:()=>l});var i,s,a,o,l={};r.r(l),r.d(l,{BRAND:()=>ej,DIRTY:()=>k,EMPTY_PATH:()=>b,INVALID:()=>x,NEVER:()=>tp,OK:()=>E,ParseStatus:()=>_,Schema:()=>j,ZodAny:()=>es,ZodArray:()=>eu,ZodBigInt:()=>Q,ZodBoolean:()=>ee,ZodBranded:()=>eL,ZodCatch:()=>eN,ZodDate:()=>et,ZodDefault:()=>eR,ZodDiscriminatedUnion:()=>eh,ZodEffects:()=>eA,ZodEnum:()=>ek,ZodError:()=>h,ZodFirstPartyTypeKind:()=>o,ZodFunction:()=>eb,ZodIntersection:()=>ep,ZodIssueCode:()=>c,ZodLazy:()=>ew,ZodLiteral:()=>e_,ZodMap:()=>ey,ZodNaN:()=>eO,ZodNativeEnum:()=>eE,ZodNever:()=>eo,ZodNull:()=>ei,ZodNullable:()=>eT,ZodNumber:()=>J,ZodObject:()=>ed,ZodOptional:()=>eC,ZodParsedType:()=>u,ZodPipeline:()=>eP,ZodPromise:()=>eS,ZodReadonly:()=>eD,ZodRecord:()=>eg,ZodSchema:()=>j,ZodSet:()=>ev,ZodString:()=>X,ZodSymbol:()=>er,ZodTransformer:()=>eA,ZodTuple:()=>em,ZodType:()=>j,ZodUndefined:()=>en,ZodUnion:()=>ec,ZodUnknown:()=>ea,ZodVoid:()=>el,addIssueToContext:()=>w,any:()=>eG,array:()=>eQ,bigint:()=>eU,boolean:()=>eW,coerce:()=>th,custom:()=>eM,date:()=>e$,datetimeRegex:()=>Y,defaultErrorMap:()=>p,discriminatedUnion:()=>e4,effect:()=>ts,enum:()=>tr,function:()=>e3,getErrorMap:()=>y,getParsedType:()=>d,instanceof:()=>eV,intersection:()=>e9,isAborted:()=>S,isAsync:()=>T,isDirty:()=>A,isValid:()=>C,late:()=>eF,lazy:()=>te,literal:()=>tt,makeIssue:()=>v,map:()=>e8,nan:()=>ez,nativeEnum:()=>tn,never:()=>eX,null:()=>eK,nullable:()=>to,number:()=>eZ,object:()=>e0,objectUtil:()=>s,oboolean:()=>tf,onumber:()=>tc,optional:()=>ta,ostring:()=>td,pipeline:()=>tu,preprocess:()=>tl,promise:()=>ti,quotelessJson:()=>f,record:()=>e5,set:()=>e7,setErrorMap:()=>g,strictObject:()=>e1,string:()=>eB,symbol:()=>eq,transformer:()=>ts,tuple:()=>e6,undefined:()=>eH,union:()=>e2,unknown:()=>eY,util:()=>i,void:()=>eJ}),function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw Error()},e.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},e.getValidEnumValues=t=>{let r=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),n={};for(let e of r)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(let r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(i||(i={})),(s||(s={})).mergeShapes=(e,t)=>({...e,...t});let u=i.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),d=e=>{switch(typeof e){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(e)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":if(Array.isArray(e))return u.array;if(null===e)return u.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return u.promise;if("undefined"!=typeof Map&&e instanceof Map)return u.map;if("undefined"!=typeof Set&&e instanceof Set)return u.set;if("undefined"!=typeof Date&&e instanceof Date)return u.date;return u.object;default:return u.unknown}},c=i.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),f=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class h extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;n<i.path.length;){let r=i.path[n];n===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof h))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,i.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},r=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}h.create=e=>new h(e);let p=(e,t)=>{let r;switch(e.code){case c.invalid_type:r=e.received===u.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case c.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,i.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:r=`Unrecognized key(s) in object: ${i.joinValues(e.keys,", ")}`;break;case c.invalid_union:r="Invalid input";break;case c.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${i.joinValues(e.options)}`;break;case c.invalid_enum_value:r=`Invalid enum value. Expected ${i.joinValues(e.options)}, received '${e.received}'`;break;case c.invalid_arguments:r="Invalid function arguments";break;case c.invalid_return_type:r="Invalid function return type";break;case c.invalid_date:r="Invalid date";break;case c.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:i.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case c.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case c.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case c.custom:r="Invalid input";break;case c.invalid_intersection_types:r="Intersection results could not be merged";break;case c.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case c.not_finite:r="Number must be finite";break;default:r=t.defaultError,i.assertNever(e)}return{message:r}},m=p;function g(e){m=e}function y(){return m}let v=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,s=[...r,...i.path||[]],a={...i,path:s};if(void 0!==i.message)return{...i,path:s,message:i.message};let o="";for(let e of n.filter(e=>!!e).slice().reverse())o=e(a,{data:t,defaultError:o}).message;return{...i,path:s,message:o}},b=[];function w(e,t){let r=m,n=v({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===p?void 0:p].filter(e=>!!e)});e.common.issues.push(n)}class _{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if("aborted"===n.status)return x;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return _.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:t,value:i}=n;if("aborted"===t.status||"aborted"===i.status)return x;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||n.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let x=Object.freeze({status:"aborted"}),k=e=>({status:"dirty",value:e}),E=e=>({status:"valid",value:e}),S=e=>"aborted"===e.status,A=e=>"dirty"===e.status,C=e=>"valid"===e.status,T=e=>"undefined"!=typeof Promise&&e instanceof Promise;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(a||(a={}));class R{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let N=(e,t)=>{if(C(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new h(e.common.issues);return this._error=t,this._error}}};function O(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:s}=e;return"invalid_enum_value"===t.code?{message:s??i.defaultError}:void 0===i.data?{message:s??n??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:s??r??i.defaultError}},description:i}}class j{get description(){return this._def.description}_getType(e){return d(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:d(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new _,ctx:{common:e.parent.common,data:e.data,parsedType:d(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(T(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:d(e)},n=this._parseSync({data:e,path:r.path,parent:r});return N(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:d(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return C(r)?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>C(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:d(e)},n=this._parse({data:e,path:r.path,parent:r});return N(r,await (T(n)?n:Promise.resolve(n)))}refine(e,t){let r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,n)=>{let i=e(t),s=()=>n.addIssue({code:c.custom,...r(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(s(),!1)):!!i||(s(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new eA({schema:this,typeName:o.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return eC.create(this,this._def)}nullable(){return eT.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eu.create(this)}promise(){return eS.create(this,this._def)}or(e){return ec.create([this,e],this._def)}and(e){return ep.create(this,e,this._def)}transform(e){return new eA({...O(this._def),schema:this,typeName:o.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eR({...O(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:o.ZodDefault})}brand(){return new eL({typeName:o.ZodBranded,type:this,...O(this._def)})}catch(e){return new eN({...O(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:o.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eP.create(this,e)}readonly(){return eD.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let L=/^c[^\s-]{8,}$/i,P=/^[0-9a-z]+$/,D=/^[0-9A-HJKMNP-TV-Z]{26}$/i,I=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,M=/^[a-z0-9_-]{21}$/i,F=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,V=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,B=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Z=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,z=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,U=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,W=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,q=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,H="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",K=RegExp(`^${H}$`);function G(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function Y(e){let t=`${H}T${G(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)}class X extends j{_parse(e){var t,r,s,a;let o;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){let t=this._getOrReturnCtx(e);return w(t,{code:c.invalid_type,expected:u.string,received:t.parsedType}),x}let l=new _;for(let u of this._def.checks)if("min"===u.kind)e.data.length<u.value&&(w(o=this._getOrReturnCtx(e,o),{code:c.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),l.dirty());else if("max"===u.kind)e.data.length>u.value&&(w(o=this._getOrReturnCtx(e,o),{code:c.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),l.dirty());else if("length"===u.kind){let t=e.data.length>u.value,r=e.data.length<u.value;(t||r)&&(o=this._getOrReturnCtx(e,o),t?w(o,{code:c.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}):r&&w(o,{code:c.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}),l.dirty())}else if("email"===u.kind)B.test(e.data)||(w(o=this._getOrReturnCtx(e,o),{validation:"email",code:c.invalid_string,message:u.message}),l.dirty());else if("emoji"===u.kind)n||(n=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),n.test(e.data)||(w(o=this._getOrReturnCtx(e,o),{validation:"emoji",code:c.invalid_string,message:u.message}),l.dirty());else if("uuid"===u.kind)I.test(e.data)||(w(o=this._getOrReturnCtx(e,o),{validation:"uuid",code:c.invalid_string,message:u.message}),l.dirty());else if("nanoid"===u.kind)M.test(e.data)||(w(o=this._getOrReturnCtx(e,o),{validation:"nanoid",code:c.invalid_string,message:u.message}),l.dirty());else if("cuid"===u.kind)L.test(e.data)||(w(o=this._getOrReturnCtx(e,o),{validation:"cuid",code:c.invalid_string,message:u.message}),l.dirty());else if("cuid2"===u.kind)P.test(e.data)||(w(o=this._getOrReturnCtx(e,o),{validation:"cuid2",code:c.invalid_string,message:u.message}),l.dirty());else if("ulid"===u.kind)D.test(e.data)||(w(o=this._getOrReturnCtx(e,o),{validation:"ulid",code:c.invalid_string,message:u.message}),l.dirty());else if("url"===u.kind)try{new URL(e.data)}catch{w(o=this._getOrReturnCtx(e,o),{validation:"url",code:c.invalid_string,message:u.message}),l.dirty()}else"regex"===u.kind?(u.regex.lastIndex=0,u.regex.test(e.data)||(w(o=this._getOrReturnCtx(e,o),{validation:"regex",code:c.invalid_string,message:u.message}),l.dirty())):"trim"===u.kind?e.data=e.data.trim():"includes"===u.kind?e.data.includes(u.value,u.position)||(w(o=this._getOrReturnCtx(e,o),{code:c.invalid_string,validation:{includes:u.value,position:u.position},message:u.message}),l.dirty()):"toLowerCase"===u.kind?e.data=e.data.toLowerCase():"toUpperCase"===u.kind?e.data=e.data.toUpperCase():"startsWith"===u.kind?e.data.startsWith(u.value)||(w(o=this._getOrReturnCtx(e,o),{code:c.invalid_string,validation:{startsWith:u.value},message:u.message}),l.dirty()):"endsWith"===u.kind?e.data.endsWith(u.value)||(w(o=this._getOrReturnCtx(e,o),{code:c.invalid_string,validation:{endsWith:u.value},message:u.message}),l.dirty()):"datetime"===u.kind?Y(u).test(e.data)||(w(o=this._getOrReturnCtx(e,o),{code:c.invalid_string,validation:"datetime",message:u.message}),l.dirty()):"date"===u.kind?K.test(e.data)||(w(o=this._getOrReturnCtx(e,o),{code:c.invalid_string,validation:"date",message:u.message}),l.dirty()):"time"===u.kind?RegExp(`^${G(u)}$`).test(e.data)||(w(o=this._getOrReturnCtx(e,o),{code:c.invalid_string,validation:"time",message:u.message}),l.dirty()):"duration"===u.kind?V.test(e.data)||(w(o=this._getOrReturnCtx(e,o),{validation:"duration",code:c.invalid_string,message:u.message}),l.dirty()):"ip"===u.kind?(t=e.data,!(("v4"===(r=u.version)||!r)&&Z.test(t)||("v6"===r||!r)&&U.test(t))&&1&&(w(o=this._getOrReturnCtx(e,o),{validation:"ip",code:c.invalid_string,message:u.message}),l.dirty())):"jwt"===u.kind?!function(e,t){if(!F.test(e))return!1;try{let[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}(e.data,u.alg)&&(w(o=this._getOrReturnCtx(e,o),{validation:"jwt",code:c.invalid_string,message:u.message}),l.dirty()):"cidr"===u.kind?(s=e.data,!(("v4"===(a=u.version)||!a)&&z.test(s)||("v6"===a||!a)&&W.test(s))&&1&&(w(o=this._getOrReturnCtx(e,o),{validation:"cidr",code:c.invalid_string,message:u.message}),l.dirty())):"base64"===u.kind?$.test(e.data)||(w(o=this._getOrReturnCtx(e,o),{validation:"base64",code:c.invalid_string,message:u.message}),l.dirty()):"base64url"===u.kind?q.test(e.data)||(w(o=this._getOrReturnCtx(e,o),{validation:"base64url",code:c.invalid_string,message:u.message}),l.dirty()):i.assertNever(u);return{status:l.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:c.invalid_string,...a.errToObj(r)})}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...a.errToObj(e)})}url(e){return this._addCheck({kind:"url",...a.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...a.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...a.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...a.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...a.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...a.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...a.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...a.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...a.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...a.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...a.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...a.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...a.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...a.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...a.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...a.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...a.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...a.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...a.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...a.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...a.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...a.errToObj(t)})}nonempty(e){return this.min(1,a.errToObj(e))}trim(){return new X({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new X({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new X({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}X.create=e=>new X({checks:[],typeName:o.ZodString,coerce:e?.coerce??!1,...O(e)});class J extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){let t=this._getOrReturnCtx(e);return w(t,{code:c.invalid_type,expected:u.number,received:t.parsedType}),x}let r=new _;for(let n of this._def.checks)"int"===n.kind?i.isInteger(e.data)||(w(t=this._getOrReturnCtx(e,t),{code:c.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(w(t=this._getOrReturnCtx(e,t),{code:c.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(w(t=this._getOrReturnCtx(e,t),{code:c.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,n.value)&&(w(t=this._getOrReturnCtx(e,t),{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(w(t=this._getOrReturnCtx(e,t),{code:c.not_finite,message:n.message}),r.dirty()):i.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,a.toString(t))}gt(e,t){return this.setLimit("min",e,!1,a.toString(t))}lte(e,t){return this.setLimit("max",e,!0,a.toString(t))}lt(e,t){return this.setLimit("max",e,!1,a.toString(t))}setLimit(e,t,r,n){return new J({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:a.toString(n)}]})}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:a.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:a.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:a.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:a.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:a.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:a.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:a.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:a.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:a.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&i.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value);return Number.isFinite(t)&&Number.isFinite(e)}}J.create=e=>new J({checks:[],typeName:o.ZodNumber,coerce:e?.coerce||!1,...O(e)});class Q extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r=new _;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(w(t=this._getOrReturnCtx(e,t),{code:c.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(w(t=this._getOrReturnCtx(e,t),{code:c.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(w(t=this._getOrReturnCtx(e,t),{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):i.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return w(t,{code:c.invalid_type,expected:u.bigint,received:t.parsedType}),x}gte(e,t){return this.setLimit("min",e,!0,a.toString(t))}gt(e,t){return this.setLimit("min",e,!1,a.toString(t))}lte(e,t){return this.setLimit("max",e,!0,a.toString(t))}lt(e,t){return this.setLimit("max",e,!1,a.toString(t))}setLimit(e,t,r,n){return new Q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:a.toString(n)}]})}_addCheck(e){return new Q({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:a.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:a.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:a.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:a.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:a.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Q.create=e=>new Q({checks:[],typeName:o.ZodBigInt,coerce:e?.coerce??!1,...O(e)});class ee extends j{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){let t=this._getOrReturnCtx(e);return w(t,{code:c.invalid_type,expected:u.boolean,received:t.parsedType}),x}return E(e.data)}}ee.create=e=>new ee({typeName:o.ZodBoolean,coerce:e?.coerce||!1,...O(e)});class et extends j{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){let t=this._getOrReturnCtx(e);return w(t,{code:c.invalid_type,expected:u.date,received:t.parsedType}),x}if(Number.isNaN(e.data.getTime()))return w(this._getOrReturnCtx(e),{code:c.invalid_date}),x;let r=new _;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(w(t=this._getOrReturnCtx(e,t),{code:c.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(w(t=this._getOrReturnCtx(e,t),{code:c.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):i.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new et({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:a.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:a.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}et.create=e=>new et({checks:[],coerce:e?.coerce||!1,typeName:o.ZodDate,...O(e)});class er extends j{_parse(e){if(this._getType(e)!==u.symbol){let t=this._getOrReturnCtx(e);return w(t,{code:c.invalid_type,expected:u.symbol,received:t.parsedType}),x}return E(e.data)}}er.create=e=>new er({typeName:o.ZodSymbol,...O(e)});class en extends j{_parse(e){if(this._getType(e)!==u.undefined){let t=this._getOrReturnCtx(e);return w(t,{code:c.invalid_type,expected:u.undefined,received:t.parsedType}),x}return E(e.data)}}en.create=e=>new en({typeName:o.ZodUndefined,...O(e)});class ei extends j{_parse(e){if(this._getType(e)!==u.null){let t=this._getOrReturnCtx(e);return w(t,{code:c.invalid_type,expected:u.null,received:t.parsedType}),x}return E(e.data)}}ei.create=e=>new ei({typeName:o.ZodNull,...O(e)});class es extends j{constructor(){super(...arguments),this._any=!0}_parse(e){return E(e.data)}}es.create=e=>new es({typeName:o.ZodAny,...O(e)});class ea extends j{constructor(){super(...arguments),this._unknown=!0}_parse(e){return E(e.data)}}ea.create=e=>new ea({typeName:o.ZodUnknown,...O(e)});class eo extends j{_parse(e){let t=this._getOrReturnCtx(e);return w(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),x}}eo.create=e=>new eo({typeName:o.ZodNever,...O(e)});class el extends j{_parse(e){if(this._getType(e)!==u.undefined){let t=this._getOrReturnCtx(e);return w(t,{code:c.invalid_type,expected:u.void,received:t.parsedType}),x}return E(e.data)}}el.create=e=>new el({typeName:o.ZodVoid,...O(e)});class eu extends j{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return w(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),x;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(e||i)&&(w(t,{code:e?c.too_big:c.too_small,minimum:i?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(w(t,{code:c.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(w(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new R(t,e,t.path,r)))).then(e=>_.mergeArray(r,e));let i=[...t.data].map((e,r)=>n.type._parseSync(new R(t,e,t.path,r)));return _.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new eu({...this._def,minLength:{value:e,message:a.toString(t)}})}max(e,t){return new eu({...this._def,maxLength:{value:e,message:a.toString(t)}})}length(e,t){return new eu({...this._def,exactLength:{value:e,message:a.toString(t)}})}nonempty(e){return this.min(1,e)}}eu.create=(e,t)=>new eu({type:e,minLength:null,maxLength:null,exactLength:null,typeName:o.ZodArray,...O(t)});class ed extends j{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=i.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){let t=this._getOrReturnCtx(e);return w(t,{code:c.invalid_type,expected:u.object,received:t.parsedType}),x}let{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof eo&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||s.push(e);let a=[];for(let e of i){let t=n[e],i=r.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new R(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof eo){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of s)a.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)s.length>0&&(w(r,{code:c.unrecognized_keys,keys:s}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of s){let n=r.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new R(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of a){let r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>_.mergeObjectSync(t,e)):_.mergeObjectSync(t,a)}get shape(){return this._def.shape()}strict(e){return a.errToObj,new ed({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:a.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new ed({...this._def,unknownKeys:"strip"})}passthrough(){return new ed({...this._def,unknownKeys:"passthrough"})}extend(e){return new ed({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ed({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:o.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ed({...this._def,catchall:e})}pick(e){let t={};for(let r of i.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new ed({...this._def,shape:()=>t})}omit(e){let t={};for(let r of i.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new ed({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ed){let r={};for(let n in t.shape){let i=t.shape[n];r[n]=eC.create(e(i))}return new ed({...t._def,shape:()=>r})}if(t instanceof eu)return new eu({...t._def,type:e(t.element)});if(t instanceof eC)return eC.create(e(t.unwrap()));if(t instanceof eT)return eT.create(e(t.unwrap()));if(t instanceof em)return em.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let r of i.objectKeys(this.shape)){let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new ed({...this._def,shape:()=>t})}required(e){let t={};for(let r of i.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof eC;)e=e._def.innerType;t[r]=e}return new ed({...this._def,shape:()=>t})}keyof(){return ex(i.objectKeys(this.shape))}}ed.create=(e,t)=>new ed({shape:()=>e,unknownKeys:"strip",catchall:eo.create(),typeName:o.ZodObject,...O(t)}),ed.strictCreate=(e,t)=>new ed({shape:()=>e,unknownKeys:"strict",catchall:eo.create(),typeName:o.ZodObject,...O(t)}),ed.lazycreate=(e,t)=>new ed({shape:e,unknownKeys:"strip",catchall:eo.create(),typeName:o.ZodObject,...O(t)});class ec extends j{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new h(e.ctx.common.issues));return w(t,{code:c.invalid_union,unionErrors:r}),x});{let e,n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},s=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new h(e));return w(t,{code:c.invalid_union,unionErrors:i}),x}}get options(){return this._def.options}}ec.create=(e,t)=>new ec({options:e,typeName:o.ZodUnion,...O(t)});let ef=e=>{if(e instanceof ew)return ef(e.schema);if(e instanceof eA)return ef(e.innerType());if(e instanceof e_)return[e.value];if(e instanceof ek)return e.options;if(e instanceof eE)return i.objectValues(e.enum);else if(e instanceof eR)return ef(e._def.innerType);else if(e instanceof en)return[void 0];else if(e instanceof ei)return[null];else if(e instanceof eC)return[void 0,...ef(e.unwrap())];else if(e instanceof eT)return[null,...ef(e.unwrap())];else if(e instanceof eL)return ef(e.unwrap());else if(e instanceof eD)return ef(e.unwrap());else if(e instanceof eN)return ef(e._def.innerType);else return[]};class eh extends j{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return w(t,{code:c.invalid_type,expected:u.object,received:t.parsedType}),x;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(w(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),x)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let r of t){let t=ef(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(n.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new eh({typeName:o.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...O(r)})}}class ep extends j{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(S(e)||S(n))return x;let s=function e(t,r){let n=d(t),s=d(r);if(t===r)return{valid:!0,data:t};if(n===u.object&&s===u.object){let n=i.objectKeys(r),s=i.objectKeys(t).filter(e=>-1!==n.indexOf(e)),a={...t,...r};for(let n of s){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1};a[n]=i.data}return{valid:!0,data:a}}if(n===u.array&&s===u.array){if(t.length!==r.length)return{valid:!1};let n=[];for(let i=0;i<t.length;i++){let s=e(t[i],r[i]);if(!s.valid)return{valid:!1};n.push(s.data)}return{valid:!0,data:n}}if(n===u.date&&s===u.date&&+t==+r)return{valid:!0,data:t};return{valid:!1}}(e.value,n.value);return s.valid?((A(e)||A(n))&&t.dirty(),{status:t.value,value:s.data}):(w(r,{code:c.invalid_intersection_types}),x)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ep.create=(e,t,r)=>new ep({left:e,right:t,typeName:o.ZodIntersection,...O(r)});class em extends j{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return w(r,{code:c.invalid_type,expected:u.array,received:r.parsedType}),x;if(r.data.length<this._def.items.length)return w(r,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),x;!this._def.rest&&r.data.length>this._def.items.length&&(w(r,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let n=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new R(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>_.mergeArray(t,e)):_.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new em({...this._def,rest:e})}}em.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new em({items:e,typeName:o.ZodTuple,rest:null,...O(t)})};class eg extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return w(r,{code:c.invalid_type,expected:u.object,received:r.parsedType}),x;let n=[],i=this._def.keyType,s=this._def.valueType;for(let e in r.data)n.push({key:i._parse(new R(r,e,r.path,e)),value:s._parse(new R(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?_.mergeObjectAsync(t,n):_.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new eg(t instanceof j?{keyType:e,valueType:t,typeName:o.ZodRecord,...O(r)}:{keyType:X.create(),valueType:e,typeName:o.ZodRecord,...O(t)})}}class ey extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return w(r,{code:c.invalid_type,expected:u.map,received:r.parsedType}),x;let n=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([e,t],s)=>({key:n._parse(new R(r,e,r.path,[s,"key"])),value:i._parse(new R(r,t,r.path,[s,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of s){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return x;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of s){let n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return x;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}ey.create=(e,t,r)=>new ey({valueType:t,keyType:e,typeName:o.ZodMap,...O(r)});class ev extends j{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return w(r,{code:c.invalid_type,expected:u.set,received:r.parsedType}),x;let n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(w(r,{code:c.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(w(r,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let i=this._def.valueType;function s(e){let r=new Set;for(let n of e){if("aborted"===n.status)return x;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let a=[...r.data.values()].map((e,t)=>i._parse(new R(r,e,r.path,t)));return r.common.async?Promise.all(a).then(e=>s(e)):s(a)}min(e,t){return new ev({...this._def,minSize:{value:e,message:a.toString(t)}})}max(e,t){return new ev({...this._def,maxSize:{value:e,message:a.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ev.create=(e,t)=>new ev({valueType:e,minSize:null,maxSize:null,typeName:o.ZodSet,...O(t)});class eb extends j{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return w(t,{code:c.invalid_type,expected:u.function,received:t.parsedType}),x;function r(e,r){return v({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,m,p].filter(e=>!!e),issueData:{code:c.invalid_arguments,argumentsError:r}})}function n(e,r){return v({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,m,p].filter(e=>!!e),issueData:{code:c.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof eS){let e=this;return E(async function(...t){let a=new h([]),o=await e._def.args.parseAsync(t,i).catch(e=>{throw a.addIssue(r(t,e)),a}),l=await Reflect.apply(s,this,o);return await e._def.returns._def.type.parseAsync(l,i).catch(e=>{throw a.addIssue(n(l,e)),a})})}{let e=this;return E(function(...t){let a=e._def.args.safeParse(t,i);if(!a.success)throw new h([r(t,a.error)]);let o=Reflect.apply(s,this,a.data),l=e._def.returns.safeParse(o,i);if(!l.success)throw new h([n(o,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eb({...this._def,args:em.create(e).rest(ea.create())})}returns(e){return new eb({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eb({args:e||em.create([]).rest(ea.create()),returns:t||ea.create(),typeName:o.ZodFunction,...O(r)})}}class ew extends j{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ew.create=(e,t)=>new ew({getter:e,typeName:o.ZodLazy,...O(t)});class e_ extends j{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return w(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),x}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ex(e,t){return new ek({values:e,typeName:o.ZodEnum,...O(t)})}e_.create=(e,t)=>new e_({value:e,typeName:o.ZodLiteral,...O(t)});class ek extends j{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return w(t,{expected:i.joinValues(r),received:t.parsedType,code:c.invalid_type}),x}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return w(t,{received:t.data,code:c.invalid_enum_value,options:r}),x}return E(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ek.create(e,{...this._def,...t})}exclude(e,t=this._def){return ek.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ek.create=ex;class eE extends j{_parse(e){let t=i.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){let e=i.objectValues(t);return w(r,{expected:i.joinValues(e),received:r.parsedType,code:c.invalid_type}),x}if(this._cache||(this._cache=new Set(i.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=i.objectValues(t);return w(r,{received:r.data,code:c.invalid_enum_value,options:e}),x}return E(e.data)}get enum(){return this._def.values}}eE.create=(e,t)=>new eE({values:e,typeName:o.ZodNativeEnum,...O(t)});class eS extends j{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==u.promise&&!1===t.common.async?(w(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),x):E((t.parsedType===u.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eS.create=(e,t)=>new eS({type:e,typeName:o.ZodPromise,...O(t)});class eA extends j{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===o.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,s={addIssue:e=>{w(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===n.type){let e=n.transform(r.data,s);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return x;let n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?x:"dirty"===n.status||"dirty"===t.value?k(n.value):n});{if("aborted"===t.value)return x;let n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?x:"dirty"===n.status||"dirty"===t.value?k(n.value):n}}if("refinement"===n.type){let e=e=>{let t=n.refinement(e,s);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?x:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?x:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>C(e)?Promise.resolve(n.transform(e.value,s)).then(e=>({status:t.value,value:e})):x);else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!C(e))return x;let i=n.transform(e.value,s);if(i instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}i.assertNever(n)}}eA.create=(e,t,r)=>new eA({schema:e,typeName:o.ZodEffects,effect:t,...O(r)}),eA.createWithPreprocess=(e,t,r)=>new eA({schema:t,effect:{type:"preprocess",transform:e},typeName:o.ZodEffects,...O(r)});class eC extends j{_parse(e){return this._getType(e)===u.undefined?E(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eC.create=(e,t)=>new eC({innerType:e,typeName:o.ZodOptional,...O(t)});class eT extends j{_parse(e){return this._getType(e)===u.null?E(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eT.create=(e,t)=>new eT({innerType:e,typeName:o.ZodNullable,...O(t)});class eR extends j{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eR.create=(e,t)=>new eR({innerType:e,typeName:o.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...O(t)});class eN extends j{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return T(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new h(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new h(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eN.create=(e,t)=>new eN({innerType:e,typeName:o.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...O(t)});class eO extends j{_parse(e){if(this._getType(e)!==u.nan){let t=this._getOrReturnCtx(e);return w(t,{code:c.invalid_type,expected:u.nan,received:t.parsedType}),x}return{status:"valid",value:e.data}}}eO.create=e=>new eO({typeName:o.ZodNaN,...O(e)});let ej=Symbol("zod_brand");class eL extends j{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class eP extends j{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?x:"dirty"===e.status?(t.dirty(),k(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?x:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eP({in:e,out:t,typeName:o.ZodPipeline})}}class eD extends j{_parse(e){let t=this._def.innerType._parse(e),r=e=>(C(e)&&(e.value=Object.freeze(e.value)),e);return T(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}function eI(e,t){let r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r}function eM(e,t={},r){return e?es.create().superRefine((n,i)=>{let s=e(n);if(s instanceof Promise)return s.then(e=>{if(!e){let e=eI(t,n),s=e.fatal??r??!0;i.addIssue({code:"custom",...e,fatal:s})}});if(!s){let e=eI(t,n),s=e.fatal??r??!0;i.addIssue({code:"custom",...e,fatal:s})}}):es.create()}eD.create=(e,t)=>new eD({innerType:e,typeName:o.ZodReadonly,...O(t)});let eF={object:ed.lazycreate};!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(o||(o={}));let eV=(e,t={message:`Input not instance of ${e.name}`})=>eM(t=>t instanceof e,t),eB=X.create,eZ=J.create,ez=eO.create,eU=Q.create,eW=ee.create,e$=et.create,eq=er.create,eH=en.create,eK=ei.create,eG=es.create,eY=ea.create,eX=eo.create,eJ=el.create,eQ=eu.create,e0=ed.create,e1=ed.strictCreate,e2=ec.create,e4=eh.create,e9=ep.create,e6=em.create,e5=eg.create,e8=ey.create,e7=ev.create,e3=eb.create,te=ew.create,tt=e_.create,tr=ek.create,tn=eE.create,ti=eS.create,ts=eA.create,ta=eC.create,to=eT.create,tl=eA.createWithPreprocess,tu=eP.create,td=()=>eB().optional(),tc=()=>eZ().optional(),tf=()=>eW().optional(),th={string:e=>X.create({...e,coerce:!0}),number:e=>J.create({...e,coerce:!0}),boolean:e=>ee.create({...e,coerce:!0}),bigint:e=>Q.create({...e,coerce:!0}),date:e=>et.create({...e,coerce:!0})},tp=x},5038:(e,t,r)=>{r.d(t,{q:()=>n});function n(e,[t,r]){return Math.min(r,Math.max(t,e))}},6350:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8889).A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},6430:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8889).A)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},6559:(e,t,r)=>{r.d(t,{b:()=>o});var n=r(7620),i=r(7156),s=r(4568),a=n.forwardRef((e,t)=>(0,s.jsx)(i.sG.label,{...e,ref:t,onMouseDown:t=>{var r;t.target.closest("button, input, select, textarea")||(null==(r=e.onMouseDown)||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));a.displayName="Label";var o=a},6608:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8889).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},6839:(e,t,r)=>{r.d(t,{UC:()=>ea,Y9:()=>ei,q7:()=>en,bL:()=>er,l9:()=>es});var n=r(7620),i=r(482),s=r(1675),a=r(9640),o=r(9254),l=r(7076),u=r(7156),d=r(7247),c=r(8400),f=r(728),h=r(4568),p="Collapsible",[m,g]=(0,i.A)(p),[y,v]=m(p),b=n.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:i,defaultOpen:s,disabled:a,onOpenChange:o,...d}=e,[c,m]=(0,l.i)({prop:i,defaultProp:null!=s&&s,onChange:o,caller:p});return(0,h.jsx)(y,{scope:r,disabled:a,contentId:(0,f.B)(),open:c,onOpenToggle:n.useCallback(()=>m(e=>!e),[m]),children:(0,h.jsx)(u.sG.div,{"data-state":S(c),"data-disabled":a?"":void 0,...d,ref:t})})});b.displayName=p;var w="CollapsibleTrigger",_=n.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,i=v(w,r);return(0,h.jsx)(u.sG.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":S(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...n,ref:t,onClick:(0,o.m)(e.onClick,i.onOpenToggle)})});_.displayName=w;var x="CollapsibleContent",k=n.forwardRef((e,t)=>{let{forceMount:r,...n}=e,i=v(x,e.__scopeCollapsible);return(0,h.jsx)(c.C,{present:r||i.open,children:e=>{let{present:r}=e;return(0,h.jsx)(E,{...n,ref:t,present:r})}})});k.displayName=x;var E=n.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:i,children:s,...o}=e,l=v(x,r),[c,f]=n.useState(i),p=n.useRef(null),m=(0,a.s)(t,p),g=n.useRef(0),y=g.current,b=n.useRef(0),w=b.current,_=l.open||c,k=n.useRef(_),E=n.useRef(void 0);return n.useEffect(()=>{let e=requestAnimationFrame(()=>k.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,d.N)(()=>{let e=p.current;if(e){E.current=E.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();g.current=t.height,b.current=t.width,k.current||(e.style.transitionDuration=E.current.transitionDuration,e.style.animationName=E.current.animationName),f(i)}},[l.open,i]),(0,h.jsx)(u.sG.div,{"data-state":S(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!_,...o,ref:m,style:{"--radix-collapsible-content-height":y?"".concat(y,"px"):void 0,"--radix-collapsible-content-width":w?"".concat(w,"px"):void 0,...e.style},children:_&&s})});function S(e){return e?"open":"closed"}var A=r(7644),C="Accordion",T=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[R,N,O]=(0,s.N)(C),[j,L]=(0,i.A)(C,[O,g]),P=g(),D=n.forwardRef((e,t)=>{let{type:r,...n}=e;return(0,h.jsx)(R.Provider,{scope:e.__scopeAccordion,children:"multiple"===r?(0,h.jsx)(Z,{...n,ref:t}):(0,h.jsx)(B,{...n,ref:t})})});D.displayName=C;var[I,M]=j(C),[F,V]=j(C,{collapsible:!1}),B=n.forwardRef((e,t)=>{let{value:r,defaultValue:i,onValueChange:s=()=>{},collapsible:a=!1,...o}=e,[u,d]=(0,l.i)({prop:r,defaultProp:null!=i?i:"",onChange:s,caller:C});return(0,h.jsx)(I,{scope:e.__scopeAccordion,value:n.useMemo(()=>u?[u]:[],[u]),onItemOpen:d,onItemClose:n.useCallback(()=>a&&d(""),[a,d]),children:(0,h.jsx)(F,{scope:e.__scopeAccordion,collapsible:a,children:(0,h.jsx)(W,{...o,ref:t})})})}),Z=n.forwardRef((e,t)=>{let{value:r,defaultValue:i,onValueChange:s=()=>{},...a}=e,[o,u]=(0,l.i)({prop:r,defaultProp:null!=i?i:[],onChange:s,caller:C}),d=n.useCallback(e=>u(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...t,e]}),[u]),c=n.useCallback(e=>u(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.filter(t=>t!==e)}),[u]);return(0,h.jsx)(I,{scope:e.__scopeAccordion,value:o,onItemOpen:d,onItemClose:c,children:(0,h.jsx)(F,{scope:e.__scopeAccordion,collapsible:!0,children:(0,h.jsx)(W,{...a,ref:t})})})}),[z,U]=j(C),W=n.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:i,dir:s,orientation:l="vertical",...d}=e,c=n.useRef(null),f=(0,a.s)(c,t),p=N(r),m="ltr"===(0,A.jH)(s),g=(0,o.m)(e.onKeyDown,e=>{var t;if(!T.includes(e.key))return;let r=e.target,n=p().filter(e=>{var t;return!(null==(t=e.ref.current)?void 0:t.disabled)}),i=n.findIndex(e=>e.ref.current===r),s=n.length;if(-1===i)return;e.preventDefault();let a=i,o=s-1,u=()=>{(a=i+1)>o&&(a=0)},d=()=>{(a=i-1)<0&&(a=o)};switch(e.key){case"Home":a=0;break;case"End":a=o;break;case"ArrowRight":"horizontal"===l&&(m?u():d());break;case"ArrowDown":"vertical"===l&&u();break;case"ArrowLeft":"horizontal"===l&&(m?d():u());break;case"ArrowUp":"vertical"===l&&d()}null==(t=n[a%s].ref.current)||t.focus()});return(0,h.jsx)(z,{scope:r,disabled:i,direction:s,orientation:l,children:(0,h.jsx)(R.Slot,{scope:r,children:(0,h.jsx)(u.sG.div,{...d,"data-orientation":l,ref:f,onKeyDown:i?void 0:g})})})}),$="AccordionItem",[q,H]=j($),K=n.forwardRef((e,t)=>{let{__scopeAccordion:r,value:n,...i}=e,s=U($,r),a=M($,r),o=P(r),l=(0,f.B)(),u=n&&a.value.includes(n)||!1,d=s.disabled||e.disabled;return(0,h.jsx)(q,{scope:r,open:u,disabled:d,triggerId:l,children:(0,h.jsx)(b,{"data-orientation":s.orientation,"data-state":et(u),...o,...i,ref:t,disabled:d,open:u,onOpenChange:e=>{e?a.onItemOpen(n):a.onItemClose(n)}})})});K.displayName=$;var G="AccordionHeader",Y=n.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,i=U(C,r),s=H(G,r);return(0,h.jsx)(u.sG.h3,{"data-orientation":i.orientation,"data-state":et(s.open),"data-disabled":s.disabled?"":void 0,...n,ref:t})});Y.displayName=G;var X="AccordionTrigger",J=n.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,i=U(C,r),s=H(X,r),a=V(X,r),o=P(r);return(0,h.jsx)(R.ItemSlot,{scope:r,children:(0,h.jsx)(_,{"aria-disabled":s.open&&!a.collapsible||void 0,"data-orientation":i.orientation,id:s.triggerId,...o,...n,ref:t})})});J.displayName=X;var Q="AccordionContent",ee=n.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,i=U(C,r),s=H(Q,r),a=P(r);return(0,h.jsx)(k,{role:"region","aria-labelledby":s.triggerId,"data-orientation":i.orientation,...a,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function et(e){return e?"open":"closed"}ee.displayName=Q;var er=D,en=K,ei=Y,es=J,ea=ee},7076:(e,t,r)=>{r.d(t,{i:()=>o});var n,i=r(7620),s=r(7247),a=(n||(n=r.t(i,2)))[" useInsertionEffect ".trim().toString()]||s.N;function o({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[s,o,l]=function({defaultProp:e,onChange:t}){let[r,n]=i.useState(e),s=i.useRef(r),o=i.useRef(t);return a(()=>{o.current=t},[t]),i.useEffect(()=>{s.current!==r&&(o.current?.(r),s.current=r)},[r,s]),[r,n,o]}({defaultProp:t,onChange:r}),u=void 0!==e,d=u?e:s;{let t=i.useRef(void 0!==e);i.useEffect(()=>{let e=t.current;if(e!==u){let t=u?"controlled":"uncontrolled";console.warn(`${n} is changing from ${e?"controlled":"uncontrolled"} to ${t}. 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.`)}t.current=u},[u,n])}return[d,i.useCallback(t=>{if(u){let r="function"==typeof t?t(e):t;r!==e&&l.current?.(r)}else o(t)},[u,e,o,l])]}Symbol("RADIX:SYNC_STATE")},7156:(e,t,r)=>{r.d(t,{hO:()=>l,sG:()=>o});var n=r(7620),i=r(7509),s=r(9649),a=r(4568),o=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=(0,s.TL)(`Primitive.${t}`),i=n.forwardRef((e,n)=>{let{asChild:i,...s}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(i?r:t,{...s,ref:n})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function l(e,t){e&&i.flushSync(()=>e.dispatchEvent(t))}},7247:(e,t,r)=>{r.d(t,{N:()=>i});var n=r(7620),i=globalThis?.document?n.useLayoutEffect:()=>{}},7644:(e,t,r)=>{r.d(t,{jH:()=>s});var n=r(7620);r(4568);var i=n.createContext(void 0);function s(e){let t=n.useContext(i);return e||t||"ltr"}},8400:(e,t,r)=>{r.d(t,{C:()=>a});var n=r(7620),i=r(9640),s=r(7247),a=e=>{let{present:t,children:r}=e,a=function(e){var t,r;let[i,a]=n.useState(),l=n.useRef(null),u=n.useRef(e),d=n.useRef("none"),[c,f]=(t=e?"mounted":"unmounted",r={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},n.useReducer((e,t)=>{let n=r[e][t];return null!=n?n:e},t));return n.useEffect(()=>{let e=o(l.current);d.current="mounted"===c?e:"none"},[c]),(0,s.N)(()=>{let t=l.current,r=u.current;if(r!==e){let n=d.current,i=o(t);e?f("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?f("UNMOUNT"):r&&n!==i?f("ANIMATION_OUT"):f("UNMOUNT"),u.current=e}},[e,f]),(0,s.N)(()=>{if(i){var e;let t,r=null!=(e=i.ownerDocument.defaultView)?e:window,n=e=>{let n=o(l.current).includes(e.animationName);if(e.target===i&&n&&(f("ANIMATION_END"),!u.current)){let e=i.style.animationFillMode;i.style.animationFillMode="forwards",t=r.setTimeout(()=>{"forwards"===i.style.animationFillMode&&(i.style.animationFillMode=e)})}},s=e=>{e.target===i&&(d.current=o(l.current))};return i.addEventListener("animationstart",s),i.addEventListener("animationcancel",n),i.addEventListener("animationend",n),()=>{r.clearTimeout(t),i.removeEventListener("animationstart",s),i.removeEventListener("animationcancel",n),i.removeEventListener("animationend",n)}}f("ANIMATION_END")},[i,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:n.useCallback(e=>{l.current=e?getComputedStyle(e):null,a(e)},[])}}(t),l="function"==typeof r?r({present:a.isPresent}):n.Children.only(r),u=(0,i.s)(a.ref,function(e){var t,r;let n=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,i=n&&"isReactWarning"in n&&n.isReactWarning;return i?e.ref:(i=(n=null==(r=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:r.get)&&"isReactWarning"in n&&n.isReactWarning)?e.props.ref:e.props.ref||e.ref}(l));return"function"==typeof r||a.isPresent?n.cloneElement(l,{ref:u}):null};function o(e){return(null==e?void 0:e.animationName)||"none"}a.displayName="Presence"},8889:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(7620);let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),s=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase()),a=e=>{let t=s(e);return t.charAt(0).toUpperCase()+t.slice(1)},o=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()},l=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var u={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let d=(0,n.forwardRef)((e,t)=>{let{color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:d="",children:c,iconNode:f,...h}=e;return(0,n.createElement)("svg",{ref:t,...u,width:i,height:i,stroke:r,strokeWidth:a?24*Number(s)/Number(i):s,className:o("lucide",d),...!c&&!l(h)&&{"aria-hidden":"true"},...h},[...f.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(c)?c:[c]])}),c=(e,t)=>{let r=(0,n.forwardRef)((r,s)=>{let{className:l,...u}=r;return(0,n.createElement)(d,{ref:s,iconNode:t,className:o("lucide-".concat(i(a(e))),"lucide-".concat(e),l),...u})});return r.displayName=a(e),r}},9254:(e,t,r)=>{r.d(t,{m:()=>n});function n(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}},9640:(e,t,r)=>{r.d(t,{s:()=>a,t:()=>s});var n=r(7620);function i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function s(...e){return t=>{let r=!1,n=e.map(e=>{let n=i(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():i(e[t],null)}}}}function a(...e){return n.useCallback(s(...e),e)}},9649:(e,t,r)=>{r.d(t,{DX:()=>o,TL:()=>a});var n=r(7620),i=r(9640),s=r(4568);function a(e){let t=function(e){let t=n.forwardRef((e,t)=>{let{children:r,...s}=e;if(n.isValidElement(r)){var a;let e,o,l=(a=r,(o=(e=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.ref:(o=(e=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?a.props.ref:a.props.ref||a.ref),u=function(e,t){let r={...t};for(let n in t){let i=e[n],s=t[n];/^on[A-Z]/.test(n)?i&&s?r[n]=(...e)=>{let t=s(...e);return i(...e),t}:i&&(r[n]=i):"style"===n?r[n]={...i,...s}:"className"===n&&(r[n]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}(s,r.props);return r.type!==n.Fragment&&(u.ref=t?(0,i.t)(t,l):l),n.cloneElement(r,u)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),r=n.forwardRef((e,r)=>{let{children:i,...a}=e,o=n.Children.toArray(i),l=o.find(u);if(l){let e=l.props.children,i=o.map(t=>t!==l?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,s.jsx)(t,{...a,ref:r,children:n.isValidElement(e)?n.cloneElement(e,void 0,i):null})}return(0,s.jsx)(t,{...a,ref:r,children:i})});return r.displayName=`${e}.Slot`,r}var o=a("Slot"),l=Symbol("radix.slottable");function u(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===l}},9690:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8889).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},9897:(e,t,r)=>{r.d(t,{UC:()=>r1,In:()=>rQ,q7:()=>r4,VF:()=>r6,p4:()=>r9,ZL:()=>r0,bL:()=>rY,wn:()=>r8,PP:()=>r5,l9:()=>rX,WT:()=>rJ,LM:()=>r2});var n,i,s,a=r(7620),o=r(7509),l=r(5038),u=r(9254),d=r(1675),c=r(9640),f=r(482),h=r(7644),p=r(7156),m=r(3568),g=r(4568),y="dismissableLayer.update",v=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),b=a.forwardRef((e,t)=>{var r,n;let{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:f,onDismiss:h,...b}=e,x=a.useContext(v),[k,E]=a.useState(null),S=null!=(n=null==k?void 0:k.ownerDocument)?n:null==(r=globalThis)?void 0:r.document,[,A]=a.useState({}),C=(0,c.s)(t,e=>E(e)),T=Array.from(x.layers),[R]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),N=T.indexOf(R),O=k?T.indexOf(k):-1,j=x.layersWithOutsidePointerEventsDisabled.size>0,L=O>=N,P=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,n=(0,m.c)(e),i=a.useRef(!1),s=a.useRef(()=>{});return a.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let t=function(){_("dismissableLayer.pointerDownOutside",n,i,{discrete:!0})},i={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",s.current),s.current=t,r.addEventListener("click",s.current,{once:!0})):t()}else r.removeEventListener("click",s.current);i.current=!1},t=window.setTimeout(()=>{r.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",s.current)}},[r,n]),{onPointerDownCapture:()=>i.current=!0}}(e=>{let t=e.target,r=[...x.branches].some(e=>e.contains(t));L&&!r&&(null==l||l(e),null==f||f(e),e.defaultPrevented||null==h||h())},S),D=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,n=(0,m.c)(e),i=a.useRef(!1);return a.useEffect(()=>{let e=e=>{e.target&&!i.current&&_("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)},[r,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}(e=>{let t=e.target;![...x.branches].some(e=>e.contains(t))&&(null==d||d(e),null==f||f(e),e.defaultPrevented||null==h||h())},S);return!function(e,t=globalThis?.document){let r=(0,m.c)(e);a.useEffect(()=>{let e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{O===x.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&h&&(e.preventDefault(),h()))},S),a.useEffect(()=>{if(k)return s&&(0===x.layersWithOutsidePointerEventsDisabled.size&&(i=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(k)),x.layers.add(k),w(),()=>{s&&1===x.layersWithOutsidePointerEventsDisabled.size&&(S.body.style.pointerEvents=i)}},[k,S,s,x]),a.useEffect(()=>()=>{k&&(x.layers.delete(k),x.layersWithOutsidePointerEventsDisabled.delete(k),w())},[k,x]),a.useEffect(()=>{let e=()=>A({});return document.addEventListener(y,e),()=>document.removeEventListener(y,e)},[]),(0,g.jsx)(p.sG.div,{...b,ref:C,style:{pointerEvents:j?L?"auto":"none":void 0,...e.style},onFocusCapture:(0,u.m)(e.onFocusCapture,D.onFocusCapture),onBlurCapture:(0,u.m)(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:(0,u.m)(e.onPointerDownCapture,P.onPointerDownCapture)})});function w(){let e=new CustomEvent(y);document.dispatchEvent(e)}function _(e,t,r,n){let{discrete:i}=n,s=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),i?(0,p.hO)(s,a):s.dispatchEvent(a)}b.displayName="DismissableLayer",a.forwardRef((e,t)=>{let r=a.useContext(v),n=a.useRef(null),i=(0,c.s)(t,n);return a.useEffect(()=>{let e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,g.jsx)(p.sG.div,{...e,ref:i})}).displayName="DismissableLayerBranch";var x=0;function k(){let 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 E="focusScope.autoFocusOnMount",S="focusScope.autoFocusOnUnmount",A={bubbles:!1,cancelable:!0},C=a.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=e,[l,u]=a.useState(null),d=(0,m.c)(i),f=(0,m.c)(s),h=a.useRef(null),y=(0,c.s)(t,e=>u(e)),v=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(n){let e=function(e){if(v.paused||!l)return;let t=e.target;l.contains(t)?h.current=t:N(h.current,{select:!0})},t=function(e){if(v.paused||!l)return;let t=e.relatedTarget;null!==t&&(l.contains(t)||N(h.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&N(l)});return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[n,l,v.paused]),a.useEffect(()=>{if(l){O.add(v);let e=document.activeElement;if(!l.contains(e)){let t=new CustomEvent(E,A);l.addEventListener(E,d),l.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=document.activeElement;for(let n of e)if(N(n,{select:t}),document.activeElement!==r)return}(T(l).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&N(l))}return()=>{l.removeEventListener(E,d),setTimeout(()=>{let t=new CustomEvent(S,A);l.addEventListener(S,f),l.dispatchEvent(t),t.defaultPrevented||N(null!=e?e:document.body,{select:!0}),l.removeEventListener(S,f),O.remove(v)},0)}}},[l,d,f,v]);let b=a.useCallback(e=>{if(!r&&!n||v.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[n,s]=function(e){let t=T(e);return[R(t,e),R(t.reverse(),e)]}(t);n&&s?e.shiftKey||i!==s?e.shiftKey&&i===n&&(e.preventDefault(),r&&N(s,{select:!0})):(e.preventDefault(),r&&N(n,{select:!0})):i===t&&e.preventDefault()}},[r,n,v.paused]);return(0,g.jsx)(p.sG.div,{tabIndex:-1,...o,ref:y,onKeyDown:b})});function T(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function R(e,t){for(let r of e)if(!function(e,t){let{upTo:r}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===r||e!==r);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(r,{upTo:t}))return r}function N(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var r;let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(r=e)instanceof HTMLInputElement&&"select"in r&&t&&e.select()}}C.displayName="FocusScope";var O=function(){let e=[];return{add(t){let r=e[0];t!==r&&(null==r||r.pause()),(e=j(e,t)).unshift(t)},remove(t){var r;null==(r=(e=j(e,t))[0])||r.resume()}}}();function j(e,t){let r=[...e],n=r.indexOf(t);return -1!==n&&r.splice(n,1),r}var L=r(728);let P=["top","right","bottom","left"],D=Math.min,I=Math.max,M=Math.round,F=Math.floor,V=e=>({x:e,y:e}),B={left:"right",right:"left",bottom:"top",top:"bottom"},Z={start:"end",end:"start"};function z(e,t){return"function"==typeof e?e(t):e}function U(e){return e.split("-")[0]}function W(e){return e.split("-")[1]}function $(e){return"x"===e?"y":"x"}function q(e){return"y"===e?"height":"width"}function H(e){return["top","bottom"].includes(U(e))?"y":"x"}function K(e){return e.replace(/start|end/g,e=>Z[e])}function G(e){return e.replace(/left|right|bottom|top/g,e=>B[e])}function Y(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function X(e){let{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function J(e,t,r){let n,{reference:i,floating:s}=e,a=H(t),o=$(H(t)),l=q(o),u=U(t),d="y"===a,c=i.x+i.width/2-s.width/2,f=i.y+i.height/2-s.height/2,h=i[l]/2-s[l]/2;switch(u){case"top":n={x:c,y:i.y-s.height};break;case"bottom":n={x:c,y:i.y+i.height};break;case"right":n={x:i.x+i.width,y:f};break;case"left":n={x:i.x-s.width,y:f};break;default:n={x:i.x,y:i.y}}switch(W(t)){case"start":n[o]-=h*(r&&d?-1:1);break;case"end":n[o]+=h*(r&&d?-1:1)}return n}let Q=async(e,t,r)=>{let{placement:n="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,o=s.filter(Boolean),l=await (null==a.isRTL?void 0:a.isRTL(t)),u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:c}=J(u,n,l),f=n,h={},p=0;for(let r=0;r<o.length;r++){let{name:s,fn:m}=o[r],{x:g,y:y,data:v,reset:b}=await m({x:d,y:c,initialPlacement:n,placement:f,strategy:i,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});d=null!=g?g:d,c=null!=y?y:c,h={...h,[s]:{...h[s],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(u=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:d,y:c}=J(u,f,l)),r=-1)}return{x:d,y:c,placement:f,strategy:i,middlewareData:h}};async function ee(e,t){var r;void 0===t&&(t={});let{x:n,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:c="floating",altBoundary:f=!1,padding:h=0}=z(t,e),p=Y(h),m=o[f?"floating"===c?"reference":"floating":c],g=X(await s.getClippingRect({element:null==(r=await (null==s.isElement?void 0:s.isElement(m)))||r?m:m.contextElement||await (null==s.getDocumentElement?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:d,strategy:l})),y="floating"===c?{x:n,y:i,width:a.floating.width,height:a.floating.height}:a.reference,v=await (null==s.getOffsetParent?void 0:s.getOffsetParent(o.floating)),b=await (null==s.isElement?void 0:s.isElement(v))&&await (null==s.getScale?void 0:s.getScale(v))||{x:1,y:1},w=X(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-w.top+p.top)/b.y,bottom:(w.bottom-g.bottom+p.bottom)/b.y,left:(g.left-w.left+p.left)/b.x,right:(w.right-g.right+p.right)/b.x}}function et(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function er(e){return P.some(t=>e[t]>=0)}async function en(e,t){let{placement:r,platform:n,elements:i}=e,s=await (null==n.isRTL?void 0:n.isRTL(i.floating)),a=U(r),o=W(r),l="y"===H(r),u=["left","top"].includes(a)?-1:1,d=s&&l?-1:1,c=z(t,e),{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof c?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return o&&"number"==typeof p&&(h="end"===o?-1*p:p),l?{x:h*d,y:f*u}:{x:f*u,y:h*d}}function ei(){return"undefined"!=typeof window}function es(e){return el(e)?(e.nodeName||"").toLowerCase():"#document"}function ea(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function eo(e){var t;return null==(t=(el(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function el(e){return!!ei()&&(e instanceof Node||e instanceof ea(e).Node)}function eu(e){return!!ei()&&(e instanceof Element||e instanceof ea(e).Element)}function ed(e){return!!ei()&&(e instanceof HTMLElement||e instanceof ea(e).HTMLElement)}function ec(e){return!!ei()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof ea(e).ShadowRoot)}function ef(e){let{overflow:t,overflowX:r,overflowY:n,display:i}=ey(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function eh(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function ep(e){let t=em(),r=eu(e)?ey(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(r.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(r.contain||"").includes(e))}function em(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function eg(e){return["html","body","#document"].includes(es(e))}function ey(e){return ea(e).getComputedStyle(e)}function ev(e){return eu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eb(e){if("html"===es(e))return e;let t=e.assignedSlot||e.parentNode||ec(e)&&e.host||eo(e);return ec(t)?t.host:t}function ew(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let i=function e(t){let r=eb(t);return eg(r)?t.ownerDocument?t.ownerDocument.body:t.body:ed(r)&&ef(r)?r:e(r)}(e),s=i===(null==(n=e.ownerDocument)?void 0:n.body),a=ea(i);if(s){let e=e_(a);return t.concat(a,a.visualViewport||[],ef(i)?i:[],e&&r?ew(e):[])}return t.concat(i,ew(i,[],r))}function e_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ex(e){let t=ey(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,i=ed(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:n,o=M(r)!==s||M(n)!==a;return o&&(r=s,n=a),{width:r,height:n,$:o}}function ek(e){return eu(e)?e:e.contextElement}function eE(e){let t=ek(e);if(!ed(t))return V(1);let r=t.getBoundingClientRect(),{width:n,height:i,$:s}=ex(t),a=(s?M(r.width):r.width)/n,o=(s?M(r.height):r.height)/i;return a&&Number.isFinite(a)||(a=1),o&&Number.isFinite(o)||(o=1),{x:a,y:o}}let eS=V(0);function eA(e){let t=ea(e);return em()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eS}function eC(e,t,r,n){var i;void 0===t&&(t=!1),void 0===r&&(r=!1);let s=e.getBoundingClientRect(),a=ek(e),o=V(1);t&&(n?eu(n)&&(o=eE(n)):o=eE(e));let l=(void 0===(i=r)&&(i=!1),n&&(!i||n===ea(a))&&i)?eA(a):V(0),u=(s.left+l.x)/o.x,d=(s.top+l.y)/o.y,c=s.width/o.x,f=s.height/o.y;if(a){let e=ea(a),t=n&&eu(n)?ea(n):n,r=e,i=e_(r);for(;i&&n&&t!==r;){let e=eE(i),t=i.getBoundingClientRect(),n=ey(i),s=t.left+(i.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(i.clientTop+parseFloat(n.paddingTop))*e.y;u*=e.x,d*=e.y,c*=e.x,f*=e.y,u+=s,d+=a,i=e_(r=ea(i))}}return X({width:c,height:f,x:u,y:d})}function eT(e,t){let r=ev(e).scrollLeft;return t?t.left+r:eC(eo(e)).left+r}function eR(e,t,r){void 0===r&&(r=!1);let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:eT(e,n)),y:n.top+t.scrollTop}}function eN(e,t,r){let n;if("viewport"===t)n=function(e,t){let r=ea(e),n=eo(e),i=r.visualViewport,s=n.clientWidth,a=n.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;let e=em();(!e||e&&"fixed"===t)&&(o=i.offsetLeft,l=i.offsetTop)}return{width:s,height:a,x:o,y:l}}(e,r);else if("document"===t)n=function(e){let t=eo(e),r=ev(e),n=e.ownerDocument.body,i=I(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=I(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),a=-r.scrollLeft+eT(e),o=-r.scrollTop;return"rtl"===ey(n).direction&&(a+=I(t.clientWidth,n.clientWidth)-i),{width:i,height:s,x:a,y:o}}(eo(e));else if(eu(t))n=function(e,t){let r=eC(e,!0,"fixed"===t),n=r.top+e.clientTop,i=r.left+e.clientLeft,s=ed(e)?eE(e):V(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y;return{width:a,height:o,x:i*s.x,y:n*s.y}}(t,r);else{let r=eA(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return X(n)}function eO(e){return"static"===ey(e).position}function ej(e,t){if(!ed(e)||"fixed"===ey(e).position)return null;if(t)return t(e);let r=e.offsetParent;return eo(e)===r&&(r=r.ownerDocument.body),r}function eL(e,t){let r=ea(e);if(eh(e))return r;if(!ed(e)){let t=eb(e);for(;t&&!eg(t);){if(eu(t)&&!eO(t))return t;t=eb(t)}return r}let n=ej(e,t);for(;n&&["table","td","th"].includes(es(n))&&eO(n);)n=ej(n,t);return n&&eg(n)&&eO(n)&&!ep(n)?r:n||function(e){let t=eb(e);for(;ed(t)&&!eg(t);){if(ep(t))return t;if(eh(t))break;t=eb(t)}return null}(e)||r}let eP=async function(e){let t=this.getOffsetParent||eL,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=ed(t),i=eo(t),s="fixed"===r,a=eC(e,!0,s,t),o={scrollLeft:0,scrollTop:0},l=V(0);if(n||!n&&!s)if(("body"!==es(t)||ef(i))&&(o=ev(t)),n){let e=eC(t,!0,s,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=eT(i));s&&!n&&i&&(l.x=eT(i));let u=!i||n||s?V(0):eR(i,o);return{x:a.left+o.scrollLeft-l.x-u.x,y:a.top+o.scrollTop-l.y-u.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},eD={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e,s="fixed"===i,a=eo(n),o=!!t&&eh(t.floating);if(n===a||o&&s)return r;let l={scrollLeft:0,scrollTop:0},u=V(1),d=V(0),c=ed(n);if((c||!c&&!s)&&(("body"!==es(n)||ef(a))&&(l=ev(n)),ed(n))){let e=eC(n);u=eE(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}let f=!a||c||s?V(0):eR(a,l,!0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x+f.x,y:r.y*u.y-l.scrollTop*u.y+d.y+f.y}},getDocumentElement:eo,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e,s=[..."clippingAncestors"===r?eh(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=ew(e,[],!1).filter(e=>eu(e)&&"body"!==es(e)),i=null,s="fixed"===ey(e).position,a=s?eb(e):e;for(;eu(a)&&!eg(a);){let t=ey(a),r=ep(a);r||"fixed"!==t.position||(i=null),(s?!r&&!i:!r&&"static"===t.position&&!!i&&["absolute","fixed"].includes(i.position)||ef(a)&&!r&&function e(t,r){let n=eb(t);return!(n===r||!eu(n)||eg(n))&&("fixed"===ey(n).position||e(n,r))}(e,a))?n=n.filter(e=>e!==a):i=t,a=eb(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=s[0],o=s.reduce((e,r)=>{let n=eN(t,r,i);return e.top=I(n.top,e.top),e.right=D(n.right,e.right),e.bottom=D(n.bottom,e.bottom),e.left=I(n.left,e.left),e},eN(t,a,i));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}},getOffsetParent:eL,getElementRects:eP,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=ex(e);return{width:t,height:r}},getScale:eE,isElement:eu,isRTL:function(e){return"rtl"===ey(e).direction}};function eI(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let eM=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=t,{element:u,padding:d=0}=z(e,t)||{};if(null==u)return{};let c=Y(d),f={x:r,y:n},h=$(H(i)),p=q(h),m=await a.getDimensions(u),g="y"===h,y=g?"clientHeight":"clientWidth",v=s.reference[p]+s.reference[h]-f[h]-s.floating[p],b=f[h]-s.reference[h],w=await (null==a.getOffsetParent?void 0:a.getOffsetParent(u)),_=w?w[y]:0;_&&await (null==a.isElement?void 0:a.isElement(w))||(_=o.floating[y]||s.floating[p]);let x=_/2-m[p]/2-1,k=D(c[g?"top":"left"],x),E=D(c[g?"bottom":"right"],x),S=_-m[p]-E,A=_/2-m[p]/2+(v/2-b/2),C=I(k,D(A,S)),T=!l.arrow&&null!=W(i)&&A!==C&&s.reference[p]/2-(A<k?k:E)-m[p]/2<0,R=T?A<k?A-k:A-S:0;return{[h]:f[h]+R,data:{[h]:C,centerOffset:A-C-R,...T&&{alignmentOffset:R}},reset:T}}}),eF=(e,t,r)=>{let n=new Map,i={platform:eD,...r},s={...i.platform,_c:n};return Q(e,t,{...i,platform:s})};var eV="undefined"!=typeof document?a.useLayoutEffect:function(){};function eB(e,t){let r,n,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!eB(e[n],t[n]))return!1;return!0}if((r=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,i[n]))return!1;for(n=r;0!=n--;){let r=i[n];if(("_owner"!==r||!e.$$typeof)&&!eB(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function eZ(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ez(e,t){let r=eZ(e);return Math.round(t*r)/r}function eU(e){let t=a.useRef(e);return eV(()=>{t.current=e}),t}let eW=e=>({name:"arrow",options:e,fn(t){let{element:r,padding:n}="function"==typeof e?e(t):e;return r&&({}).hasOwnProperty.call(r,"current")?null!=r.current?eM({element:r.current,padding:n}).fn(t):{}:r?eM({element:r,padding:n}).fn(t):{}}}),e$=(e,t)=>({...function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:i,y:s,placement:a,middlewareData:o}=t,l=await en(t,e);return a===(null==(r=o.offset)?void 0:r.placement)&&null!=(n=o.arrow)&&n.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}}(e),options:[e,t]}),eq=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=z(e,t),u={x:r,y:n},d=await ee(t,l),c=H(U(i)),f=$(c),h=u[f],p=u[c];if(s){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",r=h+d[e],n=h-d[t];h=I(r,D(h,n))}if(a){let e="y"===c?"top":"left",t="y"===c?"bottom":"right",r=p+d[e],n=p-d[t];p=I(r,D(p,n))}let m=o.fn({...t,[f]:h,[c]:p});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:s,[c]:a}}}}}}(e),options:[e,t]}),eH=(e,t)=>({...function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:u=!0}=z(e,t),d={x:r,y:n},c=H(i),f=$(c),h=d[f],p=d[c],m=z(o,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let e="y"===f?"height":"width",t=s.reference[f]-s.floating[e]+g.mainAxis,r=s.reference[f]+s.reference[e]-g.mainAxis;h<t?h=t:h>r&&(h=r)}if(u){var y,v;let e="y"===f?"width":"height",t=["top","left"].includes(U(i)),r=s.reference[c]-s.floating[e]+(t&&(null==(y=a.offset)?void 0:y[c])||0)+(t?0:g.crossAxis),n=s.reference[c]+s.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[c])||0)-(t?g.crossAxis:0);p<r?p=r:p>n&&(p=n)}return{[f]:h,[c]:p}}}}(e),options:[e,t]}),eK=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n,i,s,a;let{placement:o,middlewareData:l,rects:u,initialPlacement:d,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...b}=z(e,t);if(null!=(r=l.arrow)&&r.alignmentOffset)return{};let w=U(o),_=H(d),x=U(d)===d,k=await (null==c.isRTL?void 0:c.isRTL(f.floating)),E=m||(x||!v?[G(d)]:function(e){let t=G(e);return[K(e),t,K(t)]}(d)),S="none"!==y;!m&&S&&E.push(...function(e,t,r,n){let i=W(e),s=function(e,t,r){let n=["left","right"],i=["right","left"];switch(e){case"top":case"bottom":if(r)return t?i:n;return t?n:i;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(U(e),"start"===r,n);return i&&(s=s.map(e=>e+"-"+i),t&&(s=s.concat(s.map(K)))),s}(d,v,y,k));let A=[d,...E],C=await ee(t,b),T=[],R=(null==(n=l.flip)?void 0:n.overflows)||[];if(h&&T.push(C[w]),p){let e=function(e,t,r){void 0===r&&(r=!1);let n=W(e),i=$(H(e)),s=q(i),a="x"===i?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=G(a)),[a,G(a)]}(o,u,k);T.push(C[e[0]],C[e[1]])}if(R=[...R,{placement:o,overflows:T}],!T.every(e=>e<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=A[e];if(t&&("alignment"!==p||_===H(t)||R.every(e=>e.overflows[0]>0&&H(e.placement)===_)))return{data:{index:e,overflows:R},reset:{placement:t}};let r=null==(s=R.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:s.placement;if(!r)switch(g){case"bestFit":{let e=null==(a=R.filter(e=>{if(S){let t=H(e.placement);return t===_||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:a[0];e&&(r=e);break}case"initialPlacement":r=d}if(o!==r)return{reset:{placement:r}}}return{}}}}(e),options:[e,t]}),eG=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,n;let i,s,{placement:a,rects:o,platform:l,elements:u}=t,{apply:d=()=>{},...c}=z(e,t),f=await ee(t,c),h=U(a),p=W(a),m="y"===H(a),{width:g,height:y}=o.floating;"top"===h||"bottom"===h?(i=h,s=p===(await (null==l.isRTL?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(s=h,i="end"===p?"top":"bottom");let v=y-f.top-f.bottom,b=g-f.left-f.right,w=D(y-f[i],v),_=D(g-f[s],b),x=!t.middlewareData.shift,k=w,E=_;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(E=b),null!=(n=t.middlewareData.shift)&&n.enabled.y&&(k=v),x&&!p){let e=I(f.left,0),t=I(f.right,0),r=I(f.top,0),n=I(f.bottom,0);m?E=g-2*(0!==e||0!==t?e+t:I(f.left,f.right)):k=y-2*(0!==r||0!==n?r+n:I(f.top,f.bottom))}await d({...t,availableWidth:E,availableHeight:k});let S=await l.getDimensions(u.floating);return g!==S.width||y!==S.height?{reset:{rects:!0}}:{}}}}(e),options:[e,t]}),eY=(e,t)=>({...function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...i}=z(e,t);switch(n){case"referenceHidden":{let e=et(await ee(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:er(e)}}}case"escaped":{let e=et(await ee(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:er(e)}}}default:return{}}}}}(e),options:[e,t]}),eX=(e,t)=>({...eW(e),options:[e,t]});var eJ=a.forwardRef((e,t)=>{let{children:r,width:n=10,height:i=5,...s}=e;return(0,g.jsx)(p.sG.svg,{...s,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,g.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eJ.displayName="Arrow";var eQ=r(7247),e0="Popper",[e1,e2]=(0,f.A)(e0),[e4,e9]=e1(e0),e6=e=>{let{__scopePopper:t,children:r}=e,[n,i]=a.useState(null);return(0,g.jsx)(e4,{scope:t,anchor:n,onAnchorChange:i,children:r})};e6.displayName=e0;var e5="PopperAnchor",e8=a.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...i}=e,s=e9(e5,r),o=a.useRef(null),l=(0,c.s)(t,o);return a.useEffect(()=>{s.onAnchorChange((null==n?void 0:n.current)||o.current)}),n?null:(0,g.jsx)(p.sG.div,{...i,ref:l})});e8.displayName=e5;var e7="PopperContent",[e3,te]=e1(e7),tt=a.forwardRef((e,t)=>{var r,n,i,s,l,u,d,f;let{__scopePopper:h,side:y="bottom",sideOffset:v=0,align:b="center",alignOffset:w=0,arrowPadding:_=0,avoidCollisions:x=!0,collisionBoundary:k=[],collisionPadding:E=0,sticky:S="partial",hideWhenDetached:A=!1,updatePositionStrategy:C="optimized",onPlaced:T,...R}=e,N=e9(e7,h),[O,j]=a.useState(null),L=(0,c.s)(t,e=>j(e)),[P,M]=a.useState(null),V=function(e){let[t,r]=a.useState(void 0);return(0,eQ.N)(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,i;if(!Array.isArray(t)||!t.length)return;let s=t[0];if("borderBoxSize"in s){let e=s.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,i=t.blockSize}else n=e.offsetWidth,i=e.offsetHeight;r({width:n,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}(P),B=null!=(d=null==V?void 0:V.width)?d:0,Z=null!=(f=null==V?void 0:V.height)?f:0,z="number"==typeof E?E:{top:0,right:0,bottom:0,left:0,...E},U=Array.isArray(k)?k:[k],W=U.length>0,$={padding:z,boundary:U.filter(ts),altBoundary:W},{refs:q,floatingStyles:H,placement:K,isPositioned:G,middlewareData:Y}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:s,floating:l}={},transform:u=!0,whileElementsMounted:d,open:c}=e,[f,h]=a.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=a.useState(n);eB(p,n)||m(n);let[g,y]=a.useState(null),[v,b]=a.useState(null),w=a.useCallback(e=>{e!==E.current&&(E.current=e,y(e))},[]),_=a.useCallback(e=>{e!==S.current&&(S.current=e,b(e))},[]),x=s||g,k=l||v,E=a.useRef(null),S=a.useRef(null),A=a.useRef(f),C=null!=d,T=eU(d),R=eU(i),N=eU(c),O=a.useCallback(()=>{if(!E.current||!S.current)return;let e={placement:t,strategy:r,middleware:p};R.current&&(e.platform=R.current),eF(E.current,S.current,e).then(e=>{let t={...e,isPositioned:!1!==N.current};j.current&&!eB(A.current,t)&&(A.current=t,o.flushSync(()=>{h(t)}))})},[p,t,r,R,N]);eV(()=>{!1===c&&A.current.isPositioned&&(A.current.isPositioned=!1,h(e=>({...e,isPositioned:!1})))},[c]);let j=a.useRef(!1);eV(()=>(j.current=!0,()=>{j.current=!1}),[]),eV(()=>{if(x&&(E.current=x),k&&(S.current=k),x&&k){if(T.current)return T.current(x,k,O);O()}},[x,k,O,T,C]);let L=a.useMemo(()=>({reference:E,floating:S,setReference:w,setFloating:_}),[w,_]),P=a.useMemo(()=>({reference:x,floating:k}),[x,k]),D=a.useMemo(()=>{let e={position:r,left:0,top:0};if(!P.floating)return e;let t=ez(P.floating,f.x),n=ez(P.floating,f.y);return u?{...e,transform:"translate("+t+"px, "+n+"px)",...eZ(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,u,P.floating,f.x,f.y]);return a.useMemo(()=>({...f,update:O,refs:L,elements:P,floatingStyles:D}),[f,O,L,P,D])}({strategy:"fixed",placement:y+("center"!==b?"-"+b:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,t,r,n){let i;void 0===n&&(n={});let{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:u=!1}=n,d=ek(e),c=s||a?[...d?ew(d):[],...ew(t)]:[];c.forEach(e=>{s&&e.addEventListener("scroll",r,{passive:!0}),a&&e.addEventListener("resize",r)});let f=d&&l?function(e,t){let r,n=null,i=eo(e);function s(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function a(o,l){void 0===o&&(o=!1),void 0===l&&(l=1),s();let u=e.getBoundingClientRect(),{left:d,top:c,width:f,height:h}=u;if(o||t(),!f||!h)return;let p=F(c),m=F(i.clientWidth-(d+f)),g={rootMargin:-p+"px "+-m+"px "+-F(i.clientHeight-(c+h))+"px "+-F(d)+"px",threshold:I(0,D(1,l))||1},y=!0;function v(t){let n=t[0].intersectionRatio;if(n!==l){if(!y)return a();n?a(!1,n):r=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==n||eI(u,e.getBoundingClientRect())||a(),y=!1}try{n=new IntersectionObserver(v,{...g,root:i.ownerDocument})}catch(e){n=new IntersectionObserver(v,g)}n.observe(e)}(!0),s}(d,r):null,h=-1,p=null;o&&(p=new ResizeObserver(e=>{let[n]=e;n&&n.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),r()}),d&&!u&&p.observe(d),p.observe(t));let m=u?eC(e):null;return u&&function t(){let n=eC(e);m&&!eI(m,n)&&r(),m=n,i=requestAnimationFrame(t)}(),r(),()=>{var e;c.forEach(e=>{s&&e.removeEventListener("scroll",r),a&&e.removeEventListener("resize",r)}),null==f||f(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(i)}}(...t,{animationFrame:"always"===C})},elements:{reference:N.anchor},middleware:[e$({mainAxis:v+Z,alignmentAxis:w}),x&&eq({mainAxis:!0,crossAxis:!1,limiter:"partial"===S?eH():void 0,...$}),x&&eK({...$}),eG({...$,apply:e=>{let{elements:t,rects:r,availableWidth:n,availableHeight:i}=e,{width:s,height:a}=r.reference,o=t.floating.style;o.setProperty("--radix-popper-available-width","".concat(n,"px")),o.setProperty("--radix-popper-available-height","".concat(i,"px")),o.setProperty("--radix-popper-anchor-width","".concat(s,"px")),o.setProperty("--radix-popper-anchor-height","".concat(a,"px"))}}),P&&eX({element:P,padding:_}),ta({arrowWidth:B,arrowHeight:Z}),A&&eY({strategy:"referenceHidden",...$})]}),[X,J]=to(K),Q=(0,m.c)(T);(0,eQ.N)(()=>{G&&(null==Q||Q())},[G,Q]);let ee=null==(r=Y.arrow)?void 0:r.x,et=null==(n=Y.arrow)?void 0:n.y,er=(null==(i=Y.arrow)?void 0:i.centerOffset)!==0,[en,ei]=a.useState();return(0,eQ.N)(()=>{O&&ei(window.getComputedStyle(O).zIndex)},[O]),(0,g.jsx)("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:G?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:en,"--radix-popper-transform-origin":[null==(s=Y.transformOrigin)?void 0:s.x,null==(l=Y.transformOrigin)?void 0:l.y].join(" "),...(null==(u=Y.hide)?void 0:u.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,g.jsx)(e3,{scope:h,placedSide:X,onArrowChange:M,arrowX:ee,arrowY:et,shouldHideArrow:er,children:(0,g.jsx)(p.sG.div,{"data-side":X,"data-align":J,...R,ref:L,style:{...R.style,animation:G?void 0:"none"}})})})});tt.displayName=e7;var tr="PopperArrow",tn={top:"bottom",right:"left",bottom:"top",left:"right"},ti=a.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,i=te(tr,r),s=tn[i.placedSide];return(0,g.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,g.jsx)(eJ,{...n,ref:t,style:{...n.style,display:"block"}})})});function ts(e){return null!==e}ti.displayName=tr;var ta=e=>({name:"transformOrigin",options:e,fn(t){var r,n,i,s,a;let{placement:o,rects:l,middlewareData:u}=t,d=(null==(r=u.arrow)?void 0:r.centerOffset)!==0,c=d?0:e.arrowWidth,f=d?0:e.arrowHeight,[h,p]=to(o),m={start:"0%",center:"50%",end:"100%"}[p],g=(null!=(s=null==(n=u.arrow)?void 0:n.x)?s:0)+c/2,y=(null!=(a=null==(i=u.arrow)?void 0:i.y)?a:0)+f/2,v="",b="";return"bottom"===h?(v=d?m:"".concat(g,"px"),b="".concat(-f,"px")):"top"===h?(v=d?m:"".concat(g,"px"),b="".concat(l.floating.height+f,"px")):"right"===h?(v="".concat(-f,"px"),b=d?m:"".concat(y,"px")):"left"===h&&(v="".concat(l.floating.width+f,"px"),b=d?m:"".concat(y,"px")),{data:{x:v,y:b}}}});function to(e){let[t,r="center"]=e.split("-");return[t,r]}var tl=a.forwardRef((e,t)=>{var r,n;let{container:i,...s}=e,[l,u]=a.useState(!1);(0,eQ.N)(()=>u(!0),[]);let d=i||l&&(null==(n=globalThis)||null==(r=n.document)?void 0:r.body);return d?o.createPortal((0,g.jsx)(p.sG.div,{...s,ref:t}),d):null});tl.displayName="Portal";var tu=r(9649),td=r(7076),tc=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"});a.forwardRef((e,t)=>(0,g.jsx)(p.sG.span,{...e,ref:t,style:{...tc,...e.style}})).displayName="VisuallyHidden";var tf=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},th=new WeakMap,tp=new WeakMap,tm={},tg=0,ty=function(e){return e&&(e.host||ty(e.parentNode))},tv=function(e,t,r,n){var i=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var r=ty(e);return r&&t.contains(r)?r:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});tm[r]||(tm[r]=new WeakMap);var s=tm[r],a=[],o=new Set,l=new Set(i),u=function(e){!e||o.has(e)||(o.add(e),u(e.parentNode))};i.forEach(u);var d=function(e){!e||l.has(e)||Array.prototype.forEach.call(e.children,function(e){if(o.has(e))d(e);else try{var t=e.getAttribute(n),i=null!==t&&"false"!==t,l=(th.get(e)||0)+1,u=(s.get(e)||0)+1;th.set(e,l),s.set(e,u),a.push(e),1===l&&i&&tp.set(e,!0),1===u&&e.setAttribute(r,"true"),i||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return d(t),o.clear(),tg++,function(){a.forEach(function(e){var t=th.get(e)-1,i=s.get(e)-1;th.set(e,t),s.set(e,i),t||(tp.has(e)||e.removeAttribute(n),tp.delete(e)),i||e.removeAttribute(r)}),--tg||(th=new WeakMap,th=new WeakMap,tp=new WeakMap,tm={})}},tb=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||tf(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),tv(n,i,r,"aria-hidden")):function(){return null}},tw=function(){return(tw=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function t_(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}Object.create;Object.create;var tx=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),tk="width-before-scroll-bar";function tE(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var tS="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,tA=new WeakMap;function tC(e){return e}var tT=function(e){void 0===e&&(e={});var t,r,n,i,s=(t=null,void 0===r&&(r=tC),n=[],i=!1,{read:function(){if(i)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium:function(e){var t=r(e,i);return n.push(t),function(){n=n.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(i=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){i=!0;var t=[];if(n.length){var r=n;n=[],r.forEach(e),t=n}var s=function(){var r=t;t=[],r.forEach(e)},a=function(){return Promise.resolve().then(s)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}});return s.options=tw({async:!0,ssr:!1},e),s}(),tR=function(){},tN=a.forwardRef(function(e,t){var r,n,i,s,o=a.useRef(null),l=a.useState({onScrollCapture:tR,onWheelCapture:tR,onTouchMoveCapture:tR}),u=l[0],d=l[1],c=e.forwardProps,f=e.children,h=e.className,p=e.removeScrollBar,m=e.enabled,g=e.shards,y=e.sideCar,v=e.noRelative,b=e.noIsolation,w=e.inert,_=e.allowPinchZoom,x=e.as,k=e.gapMode,E=t_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=(r=[o,t],n=function(e){return r.forEach(function(t){return tE(t,e)})},(i=(0,a.useState)(function(){return{value:null,callback:n,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=n,s=i.facade,tS(function(){var e=tA.get(s);if(e){var t=new Set(e),n=new Set(r),i=s.current;t.forEach(function(e){n.has(e)||tE(e,null)}),n.forEach(function(e){t.has(e)||tE(e,i)})}tA.set(s,r)},[r]),s),A=tw(tw({},E),u);return a.createElement(a.Fragment,null,m&&a.createElement(y,{sideCar:tT,removeScrollBar:p,shards:g,noRelative:v,noIsolation:b,inert:w,setCallbacks:d,allowPinchZoom:!!_,lockRef:o,gapMode:k}),c?a.cloneElement(a.Children.only(f),tw(tw({},A),{ref:S})):a.createElement(void 0===x?"div":x,tw({},A,{className:h,ref:S}),f))});tN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tN.classNames={fullWidth:tk,zeroRight:tx};var tO=function(e){var t=e.sideCar,r=t_(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw Error("Sidecar medium not found");return a.createElement(n,tw({},r))};tO.isSideCarExport=!0;var tj=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=s||r.nc;return t&&e.setAttribute("nonce",t),e}())){var i,a;(i=t).styleSheet?i.styleSheet.cssText=n:i.appendChild(document.createTextNode(n)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tL=function(){var e=tj();return function(t,r){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},tP=function(){var e=tL();return function(t){return e(t.styles,t.dynamic),null}},tD={left:0,top:0,right:0,gap:0},tI=function(e){return parseInt(e||"",10)||0},tM=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[tI(r),tI(n),tI(i)]},tF=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return tD;var t=tM(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},tV=tP(),tB="data-scroll-locked",tZ=function(e,t,r,n){var i=e.left,s=e.top,a=e.right,o=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(o,"px ").concat(n,";\n }\n body[").concat(tB,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(i,"px;\n padding-top: ").concat(s,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(o,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(o,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(tx," {\n right: ").concat(o,"px ").concat(n,";\n }\n \n .").concat(tk," {\n margin-right: ").concat(o,"px ").concat(n,";\n }\n \n .").concat(tx," .").concat(tx," {\n right: 0 ").concat(n,";\n }\n \n .").concat(tk," .").concat(tk," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(tB,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(o,"px;\n }\n")},tz=function(){var e=parseInt(document.body.getAttribute(tB)||"0",10);return isFinite(e)?e:0},tU=function(){a.useEffect(function(){return document.body.setAttribute(tB,(tz()+1).toString()),function(){var e=tz()-1;e<=0?document.body.removeAttribute(tB):document.body.setAttribute(tB,e.toString())}},[])},tW=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=void 0===n?"margin":n;tU();var s=a.useMemo(function(){return tF(i)},[i]);return a.createElement(tV,{styles:tZ(s,!t,i,r?"":"!important")})},t$=!1;if("undefined"!=typeof window)try{var tq=Object.defineProperty({},"passive",{get:function(){return t$=!0,!0}});window.addEventListener("test",tq,tq),window.removeEventListener("test",tq,tq)}catch(e){t$=!1}var tH=!!t$&&{passive:!1},tK=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&(r.overflowY!==r.overflowX||"TEXTAREA"===e.tagName||"visible"!==r[t])},tG=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),tY(e,n)){var i=tX(e,n);if(i[1]>i[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},tY=function(e,t){return"v"===e?tK(t,"overflowY"):tK(t,"overflowX")},tX=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},tJ=function(e,t,r,n,i){var s,a=(s=window.getComputedStyle(t).direction,"h"===e&&"rtl"===s?-1:1),o=a*n,l=r.target,u=t.contains(l),d=!1,c=o>0,f=0,h=0;do{if(!l)break;var p=tX(e,l),m=p[0],g=p[1]-p[2]-a*m;(m||g)&&tY(e,l)&&(f+=g,h+=m);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return c&&(i&&1>Math.abs(f)||!i&&o>f)?d=!0:!c&&(i&&1>Math.abs(h)||!i&&-o>h)&&(d=!0),d},tQ=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},t0=function(e){return[e.deltaX,e.deltaY]},t1=function(e){return e&&"current"in e?e.current:e},t2=0,t4=[];let t9=(n=function(e){var t=a.useRef([]),r=a.useRef([0,0]),n=a.useRef(),i=a.useState(t2++)[0],s=a.useState(tP)[0],o=a.useRef(e);a.useEffect(function(){o.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(function(e,t,r){if(r||2==arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(t1),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=a.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!o.current.allowPinchZoom;var i,s=tQ(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-s[0],u="deltaY"in e?e.deltaY:a[1]-s[1],d=e.target,c=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===c&&"range"===d.type)return!1;var f=tG(c,d);if(!f)return!0;if(f?i=c:(i="v"===c?"h":"v",f=tG(c,d)),!f)return!1;if(!n.current&&"changedTouches"in e&&(l||u)&&(n.current=i),!i)return!0;var h=n.current||i;return tJ(h,t,e,"h"===h?l:u,!0)},[]),u=a.useCallback(function(e){if(t4.length&&t4[t4.length-1]===s){var r="deltaY"in e?t0(e):tQ(e),n=t.current.filter(function(t){var n;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(n=t.delta,n[0]===r[0]&&n[1]===r[1])})[0];if(n&&n.should){e.cancelable&&e.preventDefault();return}if(!n){var i=(o.current.shards||[]).map(t1).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?l(e,i[0]):!o.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),d=a.useCallback(function(e,r,n,i){var s={name:e,delta:r,target:n,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(n)};t.current.push(s),setTimeout(function(){t.current=t.current.filter(function(e){return e!==s})},1)},[]),c=a.useCallback(function(e){r.current=tQ(e),n.current=void 0},[]),f=a.useCallback(function(t){d(t.type,t0(t),t.target,l(t,e.lockRef.current))},[]),h=a.useCallback(function(t){d(t.type,tQ(t),t.target,l(t,e.lockRef.current))},[]);a.useEffect(function(){return t4.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,tH),document.addEventListener("touchmove",u,tH),document.addEventListener("touchstart",c,tH),function(){t4=t4.filter(function(e){return e!==s}),document.removeEventListener("wheel",u,tH),document.removeEventListener("touchmove",u,tH),document.removeEventListener("touchstart",c,tH)}},[]);var p=e.removeScrollBar,m=e.inert;return a.createElement(a.Fragment,null,m?a.createElement(s,{styles:"\n .block-interactivity-".concat(i," {pointer-events: none;}\n .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,p?a.createElement(tW,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},tT.useMedium(n),tO);var t6=a.forwardRef(function(e,t){return a.createElement(tN,tw({},e,{ref:t,sideCar:t9}))});t6.classNames=tN.classNames;var t5=[" ","Enter","ArrowUp","ArrowDown"],t8=[" ","Enter"],t7="Select",[t3,re,rt]=(0,d.N)(t7),[rr,rn]=(0,f.A)(t7,[rt,e2]),ri=e2(),[rs,ra]=rr(t7),[ro,rl]=rr(t7),ru=e=>{let{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:s,value:o,defaultValue:l,onValueChange:u,dir:d,name:c,autoComplete:f,disabled:p,required:m,form:y}=e,v=ri(t),[b,w]=a.useState(null),[_,x]=a.useState(null),[k,E]=a.useState(!1),S=(0,h.jH)(d),[A,C]=(0,td.i)({prop:n,defaultProp:null!=i&&i,onChange:s,caller:t7}),[T,R]=(0,td.i)({prop:o,defaultProp:l,onChange:u,caller:t7}),N=a.useRef(null),O=!b||y||!!b.closest("form"),[j,P]=a.useState(new Set),D=Array.from(j).map(e=>e.props.value).join(";");return(0,g.jsx)(e6,{...v,children:(0,g.jsxs)(rs,{required:m,scope:t,trigger:b,onTriggerChange:w,valueNode:_,onValueNodeChange:x,valueNodeHasChildren:k,onValueNodeHasChildrenChange:E,contentId:(0,L.B)(),value:T,onValueChange:R,open:A,onOpenChange:C,dir:S,triggerPointerDownPosRef:N,disabled:p,children:[(0,g.jsx)(t3.Provider,{scope:t,children:(0,g.jsx)(ro,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(e=>{P(t=>new Set(t).add(e))},[]),onNativeOptionRemove:a.useCallback(e=>{P(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:r})}),O?(0,g.jsxs)(rq,{"aria-hidden":!0,required:m,tabIndex:-1,name:c,autoComplete:f,value:T,onChange:e=>R(e.target.value),disabled:p,form:y,children:[void 0===T?(0,g.jsx)("option",{value:""}):null,Array.from(j)]},D):null]})})};ru.displayName=t7;var rd="SelectTrigger",rc=a.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:n=!1,...i}=e,s=ri(r),o=ra(rd,r),l=o.disabled||n,d=(0,c.s)(t,o.onTriggerChange),f=re(r),h=a.useRef("touch"),[m,y,v]=rK(e=>{let t=f().filter(e=>!e.disabled),r=t.find(e=>e.value===o.value),n=rG(t,e,r);void 0!==n&&o.onValueChange(n.value)}),b=e=>{l||(o.onOpenChange(!0),v()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,g.jsx)(e8,{asChild:!0,...s,children:(0,g.jsx)(p.sG.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":rH(o.value)?"":void 0,...i,ref:d,onClick:(0,u.m)(i.onClick,e=>{e.currentTarget.focus(),"mouse"!==h.current&&b(e)}),onPointerDown:(0,u.m)(i.onPointerDown,e=>{h.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(b(e),e.preventDefault())}),onKeyDown:(0,u.m)(i.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||y(e.key),(!t||" "!==e.key)&&t5.includes(e.key)&&(b(),e.preventDefault())})})})});rc.displayName=rd;var rf="SelectValue",rh=a.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:i,children:s,placeholder:a="",...o}=e,l=ra(rf,r),{onValueNodeHasChildrenChange:u}=l,d=void 0!==s,f=(0,c.s)(t,l.onValueNodeChange);return(0,eQ.N)(()=>{u(d)},[u,d]),(0,g.jsx)(p.sG.span,{...o,ref:f,style:{pointerEvents:"none"},children:rH(l.value)?(0,g.jsx)(g.Fragment,{children:a}):s})});rh.displayName=rf;var rp=a.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...i}=e;return(0,g.jsx)(p.sG.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});rp.displayName="SelectIcon";var rm=e=>(0,g.jsx)(tl,{asChild:!0,...e});rm.displayName="SelectPortal";var rg="SelectContent",ry=a.forwardRef((e,t)=>{let r=ra(rg,e.__scopeSelect),[n,i]=a.useState();return((0,eQ.N)(()=>{i(new DocumentFragment)},[]),r.open)?(0,g.jsx)(r_,{...e,ref:t}):n?o.createPortal((0,g.jsx)(rv,{scope:e.__scopeSelect,children:(0,g.jsx)(t3.Slot,{scope:e.__scopeSelect,children:(0,g.jsx)("div",{children:e.children})})}),n):null});ry.displayName=rg;var[rv,rb]=rr(rg),rw=(0,tu.TL)("SelectContent.RemoveScroll"),r_=a.forwardRef((e,t)=>{let{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:o,side:l,sideOffset:d,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:m,collisionPadding:y,sticky:v,hideWhenDetached:w,avoidCollisions:_,...E}=e,S=ra(rg,r),[A,T]=a.useState(null),[R,N]=a.useState(null),O=(0,c.s)(t,e=>T(e)),[j,L]=a.useState(null),[P,D]=a.useState(null),I=re(r),[M,F]=a.useState(!1),V=a.useRef(!1);a.useEffect(()=>{if(A)return tb(A)},[A]),a.useEffect(()=>{var e,t;let r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!=(e=r[0])?e:k()),document.body.insertAdjacentElement("beforeend",null!=(t=r[1])?t:k()),x++,()=>{1===x&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),x--}},[]);let B=a.useCallback(e=>{let[t,...r]=I().map(e=>e.ref.current),[n]=r.slice(-1),i=document.activeElement;for(let r of e)if(r===i||(null==r||r.scrollIntoView({block:"nearest"}),r===t&&R&&(R.scrollTop=0),r===n&&R&&(R.scrollTop=R.scrollHeight),null==r||r.focus(),document.activeElement!==i))return},[I,R]),Z=a.useCallback(()=>B([j,A]),[B,j,A]);a.useEffect(()=>{M&&Z()},[M,Z]);let{onOpenChange:z,triggerPointerDownPosRef:U}=S;a.useEffect(()=>{if(A){let e={x:0,y:0},t=t=>{var r,n,i,s;e={x:Math.abs(Math.round(t.pageX)-(null!=(i=null==(r=U.current)?void 0:r.x)?i:0)),y:Math.abs(Math.round(t.pageY)-(null!=(s=null==(n=U.current)?void 0:n.y)?s:0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():A.contains(r.target)||z(!1),document.removeEventListener("pointermove",t),U.current=null};return null!==U.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[A,z,U]),a.useEffect(()=>{let e=()=>z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[z]);let[W,$]=rK(e=>{let t=I().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=rG(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),q=a.useCallback((e,t,r)=>{let n=!V.current&&!r;(void 0!==S.value&&S.value===t||n)&&(L(e),n&&(V.current=!0))},[S.value]),H=a.useCallback(()=>null==A?void 0:A.focus(),[A]),K=a.useCallback((e,t,r)=>{let n=!V.current&&!r;(void 0!==S.value&&S.value===t||n)&&D(e)},[S.value]),G="popper"===n?rk:rx,Y=G===rk?{side:l,sideOffset:d,align:f,alignOffset:h,arrowPadding:p,collisionBoundary:m,collisionPadding:y,sticky:v,hideWhenDetached:w,avoidCollisions:_}:{};return(0,g.jsx)(rv,{scope:r,content:A,viewport:R,onViewportChange:N,itemRefCallback:q,selectedItem:j,onItemLeave:H,itemTextRefCallback:K,focusSelectedItem:Z,selectedItemText:P,position:n,isPositioned:M,searchRef:W,children:(0,g.jsx)(t6,{as:rw,allowPinchZoom:!0,children:(0,g.jsx)(C,{asChild:!0,trapped:S.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,u.m)(i,e=>{var t;null==(t=S.trigger)||t.focus({preventScroll:!0}),e.preventDefault()}),children:(0,g.jsx)(b,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:(0,g.jsx)(G,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:e=>e.preventDefault(),...E,...Y,onPlaced:()=>F(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:(0,u.m)(E.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||$(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=I().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>B(t)),e.preventDefault()}})})})})})})});r_.displayName="SelectContentImpl";var rx=a.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:n,...i}=e,s=ra(rg,r),o=rb(rg,r),[u,d]=a.useState(null),[f,h]=a.useState(null),m=(0,c.s)(t,e=>h(e)),y=re(r),v=a.useRef(!1),b=a.useRef(!0),{viewport:w,selectedItem:_,selectedItemText:x,focusSelectedItem:k}=o,E=a.useCallback(()=>{if(s.trigger&&s.valueNode&&u&&f&&w&&_&&x){let e=s.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),r=s.valueNode.getBoundingClientRect(),i=x.getBoundingClientRect();if("rtl"!==s.dir){let n=i.left-t.left,s=r.left-n,a=e.left-s,o=e.width+a,d=Math.max(o,t.width),c=window.innerWidth-10,f=(0,l.q)(s,[10,Math.max(10,c-d)]);u.style.minWidth=o+"px",u.style.left=f+"px"}else{let n=t.right-i.right,s=window.innerWidth-r.right-n,a=window.innerWidth-e.right-s,o=e.width+a,d=Math.max(o,t.width),c=window.innerWidth-10,f=(0,l.q)(s,[10,Math.max(10,c-d)]);u.style.minWidth=o+"px",u.style.right=f+"px"}let a=y(),o=window.innerHeight-20,d=w.scrollHeight,c=window.getComputedStyle(f),h=parseInt(c.borderTopWidth,10),p=parseInt(c.paddingTop,10),m=parseInt(c.borderBottomWidth,10),g=h+p+d+parseInt(c.paddingBottom,10)+m,b=Math.min(5*_.offsetHeight,g),k=window.getComputedStyle(w),E=parseInt(k.paddingTop,10),S=parseInt(k.paddingBottom,10),A=e.top+e.height/2-10,C=_.offsetHeight/2,T=h+p+(_.offsetTop+C);if(T<=A){let e=a.length>0&&_===a[a.length-1].ref.current;u.style.bottom="0px";let t=Math.max(o-A,C+(e?S:0)+(f.clientHeight-w.offsetTop-w.offsetHeight)+m);u.style.height=T+t+"px"}else{let e=a.length>0&&_===a[0].ref.current;u.style.top="0px";let t=Math.max(A,h+w.offsetTop+(e?E:0)+C);u.style.height=t+(g-T)+"px",w.scrollTop=T-A+w.offsetTop}u.style.margin="".concat(10,"px 0"),u.style.minHeight=b+"px",u.style.maxHeight=o+"px",null==n||n(),requestAnimationFrame(()=>v.current=!0)}},[y,s.trigger,s.valueNode,u,f,w,_,x,s.dir,n]);(0,eQ.N)(()=>E(),[E]);let[S,A]=a.useState();(0,eQ.N)(()=>{f&&A(window.getComputedStyle(f).zIndex)},[f]);let C=a.useCallback(e=>{e&&!0===b.current&&(E(),null==k||k(),b.current=!1)},[E,k]);return(0,g.jsx)(rE,{scope:r,contentWrapper:u,shouldExpandOnScrollRef:v,onScrollButtonChange:C,children:(0,g.jsx)("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:(0,g.jsx)(p.sG.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});rx.displayName="SelectItemAlignedPosition";var rk=a.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:i=10,...s}=e,a=ri(r);return(0,g.jsx)(tt,{...a,...s,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});rk.displayName="SelectPopperPosition";var[rE,rS]=rr(rg,{}),rA="SelectViewport",rC=a.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:n,...i}=e,s=rb(rA,r),o=rS(rA,r),l=(0,c.s)(t,s.onViewportChange),d=a.useRef(0);return(0,g.jsxs)(g.Fragment,{children:[(0,g.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:n}),(0,g.jsx)(t3.Slot,{scope:r,children:(0,g.jsx)(p.sG.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:(0,u.m)(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=o;if((null==n?void 0:n.current)&&r){let e=Math.abs(d.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,i=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(i<n){let s=i+e,a=Math.min(n,s),o=s-a;r.style.height=a+"px","0px"===r.style.bottom&&(t.scrollTop=o>0?o:0,r.style.justifyContent="flex-end")}}}d.current=t.scrollTop})})})]})});rC.displayName=rA;var rT="SelectGroup",[rR,rN]=rr(rT);a.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=(0,L.B)();return(0,g.jsx)(rR,{scope:r,id:i,children:(0,g.jsx)(p.sG.div,{role:"group","aria-labelledby":i,...n,ref:t})})}).displayName=rT;var rO="SelectLabel";a.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=rN(rO,r);return(0,g.jsx)(p.sG.div,{id:i.id,...n,ref:t})}).displayName=rO;var rj="SelectItem",[rL,rP]=rr(rj),rD=a.forwardRef((e,t)=>{let{__scopeSelect:r,value:n,disabled:i=!1,textValue:s,...o}=e,l=ra(rj,r),d=rb(rj,r),f=l.value===n,[h,m]=a.useState(null!=s?s:""),[y,v]=a.useState(!1),b=(0,c.s)(t,e=>{var t;return null==(t=d.itemRefCallback)?void 0:t.call(d,e,n,i)}),w=(0,L.B)(),_=a.useRef("touch"),x=()=>{i||(l.onValueChange(n),l.onOpenChange(!1))};if(""===n)throw 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(0,g.jsx)(rL,{scope:r,value:n,disabled:i,textId:w,isSelected:f,onItemTextChange:a.useCallback(e=>{m(t=>{var r;return t||(null!=(r=null==e?void 0:e.textContent)?r:"").trim()})},[]),children:(0,g.jsx)(t3.ItemSlot,{scope:r,value:n,disabled:i,textValue:h,children:(0,g.jsx)(p.sG.div,{role:"option","aria-labelledby":w,"data-highlighted":y?"":void 0,"aria-selected":f&&y,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:b,onFocus:(0,u.m)(o.onFocus,()=>v(!0)),onBlur:(0,u.m)(o.onBlur,()=>v(!1)),onClick:(0,u.m)(o.onClick,()=>{"mouse"!==_.current&&x()}),onPointerUp:(0,u.m)(o.onPointerUp,()=>{"mouse"===_.current&&x()}),onPointerDown:(0,u.m)(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:(0,u.m)(o.onPointerMove,e=>{if(_.current=e.pointerType,i){var t;null==(t=d.onItemLeave)||t.call(d)}else"mouse"===_.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,u.m)(o.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null==(t=d.onItemLeave)||t.call(d)}}),onKeyDown:(0,u.m)(o.onKeyDown,e=>{var t;((null==(t=d.searchRef)?void 0:t.current)===""||" "!==e.key)&&(t8.includes(e.key)&&x()," "===e.key&&e.preventDefault())})})})})});rD.displayName=rj;var rI="SelectItemText",rM=a.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:i,...s}=e,l=ra(rI,r),u=rb(rI,r),d=rP(rI,r),f=rl(rI,r),[h,m]=a.useState(null),y=(0,c.s)(t,e=>m(e),d.onItemTextChange,e=>{var t;return null==(t=u.itemTextRefCallback)?void 0:t.call(u,e,d.value,d.disabled)}),v=null==h?void 0:h.textContent,b=a.useMemo(()=>(0,g.jsx)("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:_}=f;return(0,eQ.N)(()=>(w(b),()=>_(b)),[w,_,b]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(p.sG.span,{id:d.textId,...s,ref:y}),d.isSelected&&l.valueNode&&!l.valueNodeHasChildren?o.createPortal(s.children,l.valueNode):null]})});rM.displayName=rI;var rF="SelectItemIndicator",rV=a.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return rP(rF,r).isSelected?(0,g.jsx)(p.sG.span,{"aria-hidden":!0,...n,ref:t}):null});rV.displayName=rF;var rB="SelectScrollUpButton",rZ=a.forwardRef((e,t)=>{let r=rb(rB,e.__scopeSelect),n=rS(rB,e.__scopeSelect),[i,s]=a.useState(!1),o=(0,c.s)(t,n.onScrollButtonChange);return(0,eQ.N)(()=>{if(r.viewport&&r.isPositioned){let e=function(){s(t.scrollTop>0)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),i?(0,g.jsx)(rW,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});rZ.displayName=rB;var rz="SelectScrollDownButton",rU=a.forwardRef((e,t)=>{let r=rb(rz,e.__scopeSelect),n=rS(rz,e.__scopeSelect),[i,s]=a.useState(!1),o=(0,c.s)(t,n.onScrollButtonChange);return(0,eQ.N)(()=>{if(r.viewport&&r.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)},t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),i?(0,g.jsx)(rW,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});rU.displayName=rz;var rW=a.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:n,...i}=e,s=rb("SelectScrollButton",r),o=a.useRef(null),l=re(r),d=a.useCallback(()=>{null!==o.current&&(window.clearInterval(o.current),o.current=null)},[]);return a.useEffect(()=>()=>d(),[d]),(0,eQ.N)(()=>{var e;let t=l().find(e=>e.ref.current===document.activeElement);null==t||null==(e=t.ref.current)||e.scrollIntoView({block:"nearest"})},[l]),(0,g.jsx)(p.sG.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:(0,u.m)(i.onPointerDown,()=>{null===o.current&&(o.current=window.setInterval(n,50))}),onPointerMove:(0,u.m)(i.onPointerMove,()=>{var e;null==(e=s.onItemLeave)||e.call(s),null===o.current&&(o.current=window.setInterval(n,50))}),onPointerLeave:(0,u.m)(i.onPointerLeave,()=>{d()})})});a.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,g.jsx)(p.sG.div,{"aria-hidden":!0,...n,ref:t})}).displayName="SelectSeparator";var r$="SelectArrow";a.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,i=ri(r),s=ra(r$,r),a=rb(r$,r);return s.open&&"popper"===a.position?(0,g.jsx)(ti,{...i,...n,ref:t}):null}).displayName=r$;var rq=a.forwardRef((e,t)=>{let{__scopeSelect:r,value:n,...i}=e,s=a.useRef(null),o=(0,c.s)(t,s),l=function(e){let t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(n);return a.useEffect(()=>{let e=s.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(l!==n&&t){let r=new Event("change",{bubbles:!0});t.call(e,n),e.dispatchEvent(r)}},[l,n]),(0,g.jsx)(p.sG.select,{...i,style:{...tc,...i.style},ref:o,defaultValue:n})});function rH(e){return""===e||void 0===e}function rK(e){let t=(0,m.c)(e),r=a.useRef(""),n=a.useRef(0),i=a.useCallback(e=>{let i=r.current+e;t(i),function e(t){r.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout(()=>e(""),1e3))}(i)},[t]),s=a.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,s]}function rG(e,t,r){var n,i;let s=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=r?e.indexOf(r):-1,o=(n=e,i=Math.max(a,0),n.map((e,t)=>n[(i+t)%n.length]));1===s.length&&(o=o.filter(e=>e!==r));let l=o.find(e=>e.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}rq.displayName="SelectBubbleInput";var rY=ru,rX=rc,rJ=rh,rQ=rp,r0=rm,r1=ry,r2=rC,r4=rD,r9=rM,r6=rV,r5=rZ,r8=rU}}]);
|