react-lib-tools 0.0.35 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/{CommonQuestionsRoute-D9K79upc.js → CommonQuestionsRoute-BwwqUJyI.js} +2 -2
  2. package/dist/{CommonQuestionsRoute-D9K79upc.js.map → CommonQuestionsRoute-BwwqUJyI.js.map} +1 -1
  3. package/dist/{CommonQuestionsRoute-CA0eEVPH.cjs → CommonQuestionsRoute-sImKiGx8.cjs} +2 -2
  4. package/dist/{CommonQuestionsRoute-CA0eEVPH.cjs.map → CommonQuestionsRoute-sImKiGx8.cjs.map} +1 -1
  5. package/dist/{GettingStartedRoute-rQVjSgEq.js → GettingStartedRoute-ClJU7JcL.js} +2 -2
  6. package/dist/{GettingStartedRoute-rQVjSgEq.js.map → GettingStartedRoute-ClJU7JcL.js.map} +1 -1
  7. package/dist/{GettingStartedRoute-B2gmhrI5.cjs → GettingStartedRoute-tyikH6yS.cjs} +2 -2
  8. package/dist/{GettingStartedRoute-B2gmhrI5.cjs.map → GettingStartedRoute-tyikH6yS.cjs.map} +1 -1
  9. package/dist/{PageNotFound-YcVoO6YV.cjs → PageNotFound-CSDM7qet.cjs} +2 -2
  10. package/dist/{PageNotFound-YcVoO6YV.cjs.map → PageNotFound-CSDM7qet.cjs.map} +1 -1
  11. package/dist/{PageNotFound-CrAUgSnt.js → PageNotFound-ibjIlKwX.js} +2 -2
  12. package/dist/{PageNotFound-CrAUgSnt.js.map → PageNotFound-ibjIlKwX.js.map} +1 -1
  13. package/dist/{SupportRoute-C74g_-rm.js → SupportRoute-BWxqeS9G.js} +2 -2
  14. package/dist/{SupportRoute-C74g_-rm.js.map → SupportRoute-BWxqeS9G.js.map} +1 -1
  15. package/dist/{SupportRoute-B4AetYXb.cjs → SupportRoute-CaVQtANn.cjs} +2 -2
  16. package/dist/{SupportRoute-B4AetYXb.cjs.map → SupportRoute-CaVQtANn.cjs.map} +1 -1
  17. package/dist/{VersionsRoute-CX4l8cMW.js → VersionsRoute-CRPHJWuY.js} +2 -2
  18. package/dist/{VersionsRoute-CX4l8cMW.js.map → VersionsRoute-CRPHJWuY.js.map} +1 -1
  19. package/dist/{VersionsRoute-Spk6Sna2.cjs → VersionsRoute-s9kvgKZE.cjs} +2 -2
  20. package/dist/{VersionsRoute-Spk6Sna2.cjs.map → VersionsRoute-s9kvgKZE.cjs.map} +1 -1
  21. package/dist/fuse-BvOe6mNx.js +1023 -0
  22. package/dist/fuse-BvOe6mNx.js.map +1 -0
  23. package/dist/fuse-CM2wbN_z.cjs +2 -0
  24. package/dist/fuse-CM2wbN_z.cjs.map +1 -0
  25. package/dist/index-D_pov2Kn.cjs +8 -0
  26. package/dist/index-D_pov2Kn.cjs.map +1 -0
  27. package/dist/{index-Bf43K_g2.js → index-DbkaDE2f.js} +2577 -2286
  28. package/dist/index-DbkaDE2f.js.map +1 -0
  29. package/dist/react-lib-tools.cjs +1 -1
  30. package/dist/react-lib-tools.d.ts +9 -3
  31. package/dist/react-lib-tools.js +1 -1
  32. package/lib/types.ts +6 -0
  33. package/package.json +5 -4
  34. package/scripts/compile-search-index.ts +39 -0
  35. package/scripts/utils/search/crawlPage.ts +103 -0
  36. package/scripts/utils/search/stopWords.ts +129 -0
  37. package/scripts/utils/search/types.ts +6 -0
  38. package/dist/index-BB-4-AeJ.cjs +0 -8
  39. package/dist/index-BB-4-AeJ.cjs.map +0 -1
  40. package/dist/index-Bf43K_g2.js.map +0 -1
@@ -1,8 +0,0 @@
1
- "use client";"use strict";const C=require("react/jsx-runtime"),p=require("react"),Ye=require("react-dom");function gi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=gi(p),sn=gi(Ye);function Ms({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const As=m.forwardRef(Ms);function Fs({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M4.25 5.5a.75.75 0 0 0-.75.75v8.5c0 .414.336.75.75.75h8.5a.75.75 0 0 0 .75-.75v-4a.75.75 0 0 1 1.5 0v4A2.25 2.25 0 0 1 12.75 17h-8.5A2.25 2.25 0 0 1 2 14.75v-8.5A2.25 2.25 0 0 1 4.25 4h5a.75.75 0 0 1 0 1.5h-5Z",clipRule:"evenodd"}),m.createElement("path",{fillRule:"evenodd",d:"M6.194 12.753a.75.75 0 0 0 1.06.053L16.5 4.44v2.81a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.553l-9.056 8.194a.75.75 0 0 0-.053 1.06Z",clipRule:"evenodd"}))}const Is=m.forwardRef(Fs);function Ns({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M2 3.75A.75.75 0 0 1 2.75 3h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75Zm0 4.167a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Zm0 4.166a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Zm0 4.167a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"}))}const Ds=m.forwardRef(Ns);function js({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const _s=m.forwardRef(js);function Bs({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const vi=m.forwardRef(Bs);function Hs({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z",clipRule:"evenodd"}))}const Vs=m.forwardRef(Hs);function Ws({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const zs=m.forwardRef(Ws);function Us({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const qs=m.forwardRef(Us);function Gs({title:e,titleId:t,...n},r){return m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?m.createElement("title",{id:t},e):null,m.createElement("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))}const Ks=m.forwardRef(Gs);var ao="popstate";function Ys(e={}){function t(r,o){let{pathname:i,search:l,hash:s}=r.location;return ir("",{pathname:i,search:l,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Ot(o)}return Zs(t,n,null,e)}function Z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ce(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Xs(){return Math.random().toString(36).substring(2,10)}function co(e,t){return{usr:e.state,key:e.key,idx:t}}function ir(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ht(t):t,state:n,key:t&&t.key||r||Xs()}}function Ot({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ht(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Zs(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,l=o.history,s="POP",a=null,c=u();c==null&&(c=0,l.replaceState({...l.state,idx:c},""));function u(){return(l.state||{idx:null}).idx}function f(){s="POP";let b=u(),w=b==null?null:b-c;c=b,a&&a({action:s,location:v.location,delta:w})}function h(b,w){s="PUSH";let y=ir(v.location,b,w);c=u()+1;let x=co(y,c),S=v.createHref(y);try{l.pushState(x,"",S)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;o.location.assign(S)}i&&a&&a({action:s,location:v.location,delta:1})}function d(b,w){s="REPLACE";let y=ir(v.location,b,w);c=u();let x=co(y,c),S=v.createHref(y);l.replaceState(x,"",S),i&&a&&a({action:s,location:v.location,delta:0})}function g(b){return Js(b)}let v={get action(){return s},get location(){return e(o,l)},listen(b){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(ao,f),a=b,()=>{o.removeEventListener(ao,f),a=null}},createHref(b){return t(o,b)},createURL:g,encodeLocation(b){let w=g(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:d,go(b){return l.go(b)}};return v}function Js(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Z(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Ot(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function bi(e,t,n="/"){return Qs(e,t,n,!1)}function Qs(e,t,n,r){let o=typeof t=="string"?ht(t):t,i=De(o.pathname||"/",n);if(i==null)return null;let l=wi(e);ea(l);let s=null;for(let a=0;s==null&&a<l.length;++a){let c=yi(i);s=ca(l[a],c,r)}return s}function wi(e,t=[],n=[],r="",o=!1){let i=(l,s,a=o,c)=>{let u={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(r)&&a)return;Z(u.relativePath.startsWith(r),`Absolute route path "${u.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(r.length)}let f=Fe([r,u.relativePath]),h=n.concat(u);l.children&&l.children.length>0&&(Z(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),wi(l.children,t,h,f,a)),!(l.path==null&&!l.index)&&t.push({path:f,score:sa(f,l.index),routesMeta:h})};return e.forEach((l,s)=>{if(l.path===""||!l.path?.includes("?"))i(l,s);else for(let a of xi(l.path))i(l,s,!0,a)}),t}function xi(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let l=xi(r.join("/")),s=[];return s.push(...l.map(a=>a===""?i:[i,a].join("/"))),o&&s.push(...l),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function ea(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:aa(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var ta=/^:[\w-]+$/,na=3,ra=2,oa=1,ia=10,la=-2,uo=e=>e==="*";function sa(e,t){let n=e.split("/"),r=n.length;return n.some(uo)&&(r+=la),t&&(r+=ra),n.filter(o=>!uo(o)).reduce((o,i)=>o+(ta.test(i)?na:i===""?oa:ia),r)}function aa(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function ca(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",l=[];for(let s=0;s<r.length;++s){let a=r[s],c=s===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",f=Lt({path:a.relativePath,caseSensitive:a.caseSensitive,end:c},u),h=a.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=Lt({path:a.relativePath,caseSensitive:a.caseSensitive,end:!1},u)),!f)return null;Object.assign(o,f.params),l.push({params:o,pathname:Fe([i,f.pathname]),pathnameBase:ha(Fe([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Fe([i,f.pathnameBase]))}return l}function Lt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ua(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],l=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((c,{paramName:u,isOptional:f},h)=>{if(u==="*"){let g=s[h]||"";l=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const d=s[h];return f&&!d?c[u]=void 0:c[u]=(d||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:l,pattern:e}}function ua(e,t=!1,n=!0){Ce(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,s,a)=>(r.push({paramName:s,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function yi(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ce(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function De(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var da=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fa=e=>da.test(e);function ma(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?ht(e):e,i;if(n)if(fa(n))i=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),Ce(!1,`Pathnames cannot have embedded double slashes - normalizing ${l} -> ${n}`)}n.startsWith("/")?i=fo(n.substring(1),"/"):i=fo(n,t)}else i=t;return{pathname:i,search:ga(r),hash:va(o)}}function fo(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Nn(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function pa(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ei(e){let t=pa(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function Ci(e,t,n,r=!1){let o;typeof e=="string"?o=ht(e):(o={...e},Z(!o.pathname||!o.pathname.includes("?"),Nn("?","pathname","search",o)),Z(!o.pathname||!o.pathname.includes("#"),Nn("#","pathname","hash",o)),Z(!o.search||!o.search.includes("#"),Nn("#","search","hash",o)));let i=e===""||o.pathname==="",l=i?"/":o.pathname,s;if(l==null)s=n;else{let f=t.length-1;if(!r&&l.startsWith("..")){let h=l.split("/");for(;h[0]==="..";)h.shift(),f-=1;o.pathname=h.join("/")}s=f>=0?t[f]:"/"}let a=ma(o,s),c=l&&l!=="/"&&l.endsWith("/"),u=(i||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(c||u)&&(a.pathname+="/"),a}var Fe=e=>e.join("/").replace(/\/\/+/g,"/"),ha=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ga=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,va=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ba(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function wa(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ri=["POST","PUT","PATCH","DELETE"];new Set(Ri);var xa=["GET",...Ri];new Set(xa);var gt=m.createContext(null);gt.displayName="DataRouter";var bn=m.createContext(null);bn.displayName="DataRouterState";m.createContext(!1);var Si=m.createContext({isTransitioning:!1});Si.displayName="ViewTransition";var ya=m.createContext(new Map);ya.displayName="Fetchers";var Ea=m.createContext(null);Ea.displayName="Await";var Re=m.createContext(null);Re.displayName="Navigation";var Nt=m.createContext(null);Nt.displayName="Location";var _e=m.createContext({outlet:null,matches:[],isDataRoute:!1});_e.displayName="Route";var $r=m.createContext(null);$r.displayName="RouteError";function Ca(e,{relative:t}={}){Z(vt(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=m.useContext(Re),{hash:o,pathname:i,search:l}=Dt(e,{relative:t}),s=i;return n!=="/"&&(s=i==="/"?n:Fe([n,i])),r.createHref({pathname:s,search:l,hash:o})}function vt(){return m.useContext(Nt)!=null}function Be(){return Z(vt(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Nt).location}function Ra(e){Z(vt(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=Be();return m.useMemo(()=>Lt(e,yi(t)),[t,e])}var $i="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ki(e){m.useContext(Re).static||m.useLayoutEffect(e)}function Pi(){let{isDataRoute:e}=m.useContext(_e);return e?Da():Sa()}function Sa(){Z(vt(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(gt),{basename:t,navigator:n}=m.useContext(Re),{matches:r}=m.useContext(_e),{pathname:o}=Be(),i=JSON.stringify(Ei(r)),l=m.useRef(!1);return ki(()=>{l.current=!0}),m.useCallback((a,c={})=>{if(Ce(l.current,$i),!l.current)return;if(typeof a=="number"){n.go(a);return}let u=Ci(a,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Fe([t,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[t,n,i,o,e])}m.createContext(null);function Dt(e,{relative:t}={}){let{matches:n}=m.useContext(_e),{pathname:r}=Be(),o=JSON.stringify(Ei(n));return m.useMemo(()=>Ci(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}function $a(e,t){return Ti(e,t)}function Ti(e,t,n,r,o){Z(vt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=m.useContext(Re),{matches:l}=m.useContext(_e),s=l[l.length-1],a=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",f=s&&s.route;{let y=f&&f.path||"";Oi(c,!f||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2
-
3
- Please change the parent <Route path="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let h=Be(),d;if(t){let y=typeof t=="string"?ht(t):t;Z(u==="/"||y.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=h;let g=d.pathname||"/",v=g;if(u!=="/"){let y=u.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(y.length).join("/")}let b=bi(e,{pathname:v});Ce(f||b!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Ce(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=La(b&&b.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:Fe([u,i.encodeLocation?i.encodeLocation(y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:Fe([u,i.encodeLocation?i.encodeLocation(y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),l,n,r,o);return t&&w?m.createElement(Nt.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...d},navigationType:"POP"}},w):w}function ka(){let e=Na(),t=ba(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:i},"ErrorBoundary")," or"," ",m.createElement("code",{style:i},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:o},n):null,l)}var Pa=m.createElement(ka,null),Ta=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?m.createElement(_e.Provider,{value:this.props.routeContext},m.createElement($r.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Oa({routeContext:e,match:t,children:n}){let r=m.useContext(gt);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(_e.Provider,{value:e},n)}function La(e,t=[],n=null,r=null,o=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,l=n?.errors;if(l!=null){let u=i.findIndex(f=>f.route.id&&l?.[f.route.id]!==void 0);Z(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),i=i.slice(0,Math.min(i.length,u+1))}let s=!1,a=-1;if(n)for(let u=0;u<i.length;u++){let f=i[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(a=u),f.route.id){let{loaderData:h,errors:d}=n,g=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!d||d[f.route.id]===void 0);if(f.route.lazy||g){s=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}let c=n&&r?(u,f)=>{r(u,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:wa(n.matches),errorInfo:f})}:void 0;return i.reduceRight((u,f,h)=>{let d,g=!1,v=null,b=null;n&&(d=l&&f.route.id?l[f.route.id]:void 0,v=f.route.errorElement||Pa,s&&(a<0&&h===0?(Oi("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,b=null):a===h&&(g=!0,b=f.route.hydrateFallbackElement||null)));let w=t.concat(i.slice(0,h+1)),y=()=>{let x;return d?x=v:g?x=b:f.route.Component?x=m.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=u,m.createElement(Oa,{match:f,routeContext:{outlet:u,matches:w,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?m.createElement(Ta,{location:n.location,revalidation:n.revalidation,component:v,error:d,children:y(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:c}):y()},null)}function kr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ma(e){let t=m.useContext(gt);return Z(t,kr(e)),t}function Aa(e){let t=m.useContext(bn);return Z(t,kr(e)),t}function Fa(e){let t=m.useContext(_e);return Z(t,kr(e)),t}function Pr(e){let t=Fa(e),n=t.matches[t.matches.length-1];return Z(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ia(){return Pr("useRouteId")}function Na(){let e=m.useContext($r),t=Aa("useRouteError"),n=Pr("useRouteError");return e!==void 0?e:t.errors?.[n]}function Da(){let{router:e}=Ma("useNavigate"),t=Pr("useNavigate"),n=m.useRef(!1);return ki(()=>{n.current=!0}),m.useCallback(async(o,i={})=>{Ce(n.current,$i),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var mo={};function Oi(e,t,n){!t&&!mo[e]&&(mo[e]=!0,Ce(!1,n))}m.memo(ja);function ja({routes:e,future:t,state:n,unstable_onError:r}){return Ti(e,void 0,n,r,t)}function Li(e){Z(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function _a({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1,unstable_useTransitions:l}){Z(!vt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),a=m.useMemo(()=>({basename:s,navigator:o,static:i,unstable_useTransitions:l,future:{}}),[s,o,i,l]);typeof n=="string"&&(n=ht(n));let{pathname:c="/",search:u="",hash:f="",state:h=null,key:d="default"}=n,g=m.useMemo(()=>{let v=De(c,s);return v==null?null:{location:{pathname:v,search:u,hash:f,state:h,key:d},navigationType:r}},[s,c,u,f,h,d,r]);return Ce(g!=null,`<Router basename="${s}"> is not able to match the URL "${c}${u}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:m.createElement(Re.Provider,{value:a},m.createElement(Nt.Provider,{children:t,value:g}))}function Ba({children:e,location:t}){return $a(lr(e),t)}function lr(e,t=[]){let n=[];return m.Children.forEach(e,(r,o)=>{if(!m.isValidElement(r))return;let i=[...t,o];if(r.type===m.Fragment){n.push.apply(n,lr(r.props.children,i));return}Z(r.type===Li,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Z(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=lr(r.props.children,i)),n.push(l)}),n}var en="get",tn="application/x-www-form-urlencoded";function wn(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Ha(e){return wn(e)&&e.tagName.toLowerCase()==="button"}function Va(e){return wn(e)&&e.tagName.toLowerCase()==="form"}function Wa(e){return wn(e)&&e.tagName.toLowerCase()==="input"}function za(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ua(e,t){return e.button===0&&(!t||t==="_self")&&!za(e)}var zt=null;function qa(){if(zt===null)try{new FormData(document.createElement("form"),0),zt=!1}catch{zt=!0}return zt}var Ga=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Dn(e){return e!=null&&!Ga.has(e)?(Ce(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${tn}"`),null):e}function Ka(e,t){let n,r,o,i,l;if(Va(e)){let s=e.getAttribute("action");r=s?De(s,t):null,n=e.getAttribute("method")||en,o=Dn(e.getAttribute("enctype"))||tn,i=new FormData(e)}else if(Ha(e)||Wa(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let a=e.getAttribute("formaction")||s.getAttribute("action");if(r=a?De(a,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||en,o=Dn(e.getAttribute("formenctype"))||Dn(s.getAttribute("enctype"))||tn,i=new FormData(s,e),!qa()){let{name:c,type:u,value:f}=e;if(u==="image"){let h=c?`${c}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else c&&i.append(c,f)}}else{if(wn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=en,r=null,o=tn,l=e}return i&&o==="text/plain"&&(l=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Tr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ya(e,t,n){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${n}`:t&&De(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}async function Xa(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Za(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Ja(e,t,n){let r=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let l=await Xa(i,n);return l.links?l.links():[]}return[]}));return nc(r.flat(1).filter(Za).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function po(e,t,n,r,o,i){let l=(a,c)=>n[c]?a.route.id!==n[c].route.id:!0,s=(a,c)=>n[c].pathname!==a.pathname||n[c].route.path?.endsWith("*")&&n[c].params["*"]!==a.params["*"];return i==="assets"?t.filter((a,c)=>l(a,c)||s(a,c)):i==="data"?t.filter((a,c)=>{let u=r.routes[a.route.id];if(!u||!u.hasLoader)return!1;if(l(a,c)||s(a,c))return!0;if(a.route.shouldRevalidate){let f=a.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:a.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function Qa(e,t,{includeHydrateFallback:n}={}){return ec(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function ec(e){return[...new Set(e)]}function tc(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function nc(e,t){let n=new Set;return new Set(t),e.reduce((r,o)=>{let i=JSON.stringify(tc(o));return n.has(i)||(n.add(i),r.push({key:i,link:o})),r},[])}function Mi(){let e=m.useContext(gt);return Tr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function rc(){let e=m.useContext(bn);return Tr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Or=m.createContext(void 0);Or.displayName="FrameworkContext";function Ai(){let e=m.useContext(Or);return Tr(e,"You must render this element inside a <HydratedRouter> element"),e}function oc(e,t){let n=m.useContext(Or),[r,o]=m.useState(!1),[i,l]=m.useState(!1),{onFocus:s,onBlur:a,onMouseEnter:c,onMouseLeave:u,onTouchStart:f}=t,h=m.useRef(null);m.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let v=w=>{w.forEach(y=>{l(y.isIntersecting)})},b=new IntersectionObserver(v,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),m.useEffect(()=>{if(r){let v=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(v)}}},[r]);let d=()=>{o(!0)},g=()=>{o(!1),l(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:Ct(s,d),onBlur:Ct(a,g),onMouseEnter:Ct(c,d),onMouseLeave:Ct(u,g),onTouchStart:Ct(f,d)}]:[!1,h,{}]}function Ct(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ic({page:e,...t}){let{router:n}=Mi(),r=m.useMemo(()=>bi(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?m.createElement(sc,{page:e,matches:r,...t}):null}function lc(e){let{manifest:t,routeModules:n}=Ai(),[r,o]=m.useState([]);return m.useEffect(()=>{let i=!1;return Ja(e,t,n).then(l=>{i||o(l)}),()=>{i=!0}},[e,t,n]),r}function sc({page:e,matches:t,...n}){let r=Be(),{manifest:o,routeModules:i}=Ai(),{basename:l}=Mi(),{loaderData:s,matches:a}=rc(),c=m.useMemo(()=>po(e,t,a,o,r,"data"),[e,t,a,o,r]),u=m.useMemo(()=>po(e,t,a,o,r,"assets"),[e,t,a,o,r]),f=m.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let g=new Set,v=!1;if(t.forEach(w=>{let y=o.routes[w.route.id];!y||!y.hasLoader||(!c.some(x=>x.route.id===w.route.id)&&w.route.id in s&&i[w.route.id]?.shouldRevalidate||y.hasClientLoader?v=!0:g.add(w.route.id))}),g.size===0)return[];let b=Ya(e,l,"data");return v&&g.size>0&&b.searchParams.set("_routes",t.filter(w=>g.has(w.route.id)).map(w=>w.route.id).join(",")),[b.pathname+b.search]},[l,s,r,o,c,t,e,i]),h=m.useMemo(()=>Qa(u,o),[u,o]),d=lc(u);return m.createElement(m.Fragment,null,f.map(g=>m.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...n})),h.map(g=>m.createElement("link",{key:g,rel:"modulepreload",href:g,...n})),d.map(({key:g,link:v})=>m.createElement("link",{key:g,nonce:n.nonce,...v})))}function ac(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Fi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Fi&&(window.__reactRouterVersion="7.10.1")}catch{}function cc({basename:e,children:t,unstable_useTransitions:n,window:r}){let o=m.useRef();o.current==null&&(o.current=Ys({window:r,v5Compat:!0}));let i=o.current,[l,s]=m.useState({action:i.action,location:i.location}),a=m.useCallback(c=>{n===!1?s(c):m.startTransition(()=>s(c))},[n]);return m.useLayoutEffect(()=>i.listen(a),[i,a]),m.createElement(_a,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,unstable_useTransitions:n===!0})}var Ii=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ni=m.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:l,state:s,target:a,to:c,preventScrollReset:u,viewTransition:f,...h},d){let{basename:g,unstable_useTransitions:v}=m.useContext(Re),b=typeof c=="string"&&Ii.test(c),w,y=!1;if(typeof c=="string"&&b&&(w=c,Fi))try{let $=new URL(window.location.href),D=c.startsWith("//")?new URL($.protocol+c):new URL(c),W=De(D.pathname,g);D.origin===$.origin&&W!=null?c=W+D.search+D.hash:y=!0}catch{Ce(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let x=Ca(c,{relative:o}),[S,R,P]=oc(r,h),T=mc(c,{replace:l,state:s,target:a,preventScrollReset:u,relative:o,viewTransition:f,unstable_useTransitions:v});function k($){t&&t($),$.defaultPrevented||T($)}let F=m.createElement("a",{...h,...P,href:w||x,onClick:y||i?t:k,ref:ac(d,R),target:a,"data-discover":!b&&n==="render"?"true":void 0});return S&&!b?m.createElement(m.Fragment,null,F,m.createElement(ic,{page:x})):F});Ni.displayName="Link";var uc=m.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:l,viewTransition:s,children:a,...c},u){let f=Dt(l,{relative:c.relative}),h=Be(),d=m.useContext(bn),{navigator:g,basename:v}=m.useContext(Re),b=d!=null&&bc(f)&&s===!0,w=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,y=h.pathname,x=d&&d.navigation&&d.navigation.location?d.navigation.location.pathname:null;n||(y=y.toLowerCase(),x=x?x.toLowerCase():null,w=w.toLowerCase()),x&&v&&(x=De(x,v)||x);const S=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let R=y===w||!o&&y.startsWith(w)&&y.charAt(S)==="/",P=x!=null&&(x===w||!o&&x.startsWith(w)&&x.charAt(w.length)==="/"),T={isActive:R,isPending:P,isTransitioning:b},k=R?t:void 0,F;typeof r=="function"?F=r(T):F=[r,R?"active":null,P?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let $=typeof i=="function"?i(T):i;return m.createElement(Ni,{...c,"aria-current":k,className:F,ref:u,style:$,to:l,viewTransition:s},typeof a=="function"?a(T):a)});uc.displayName="NavLink";var dc=m.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:l=en,action:s,onSubmit:a,relative:c,preventScrollReset:u,viewTransition:f,...h},d)=>{let{unstable_useTransitions:g}=m.useContext(Re),v=gc(),b=vc(s,{relative:c}),w=l.toLowerCase()==="get"?"get":"post",y=typeof s=="string"&&Ii.test(s),x=S=>{if(a&&a(S),S.defaultPrevented)return;S.preventDefault();let R=S.nativeEvent.submitter,P=R?.getAttribute("formmethod")||l,T=()=>v(R||S.currentTarget,{fetcherKey:t,method:P,navigate:n,replace:o,state:i,relative:c,preventScrollReset:u,viewTransition:f});g&&n!==!1?m.startTransition(()=>T()):T()};return m.createElement("form",{ref:d,method:w,action:b,onSubmit:r?a:x,...h,"data-discover":!y&&e==="render"?"true":void 0})});dc.displayName="Form";function fc(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Di(e){let t=m.useContext(gt);return Z(t,fc(e)),t}function mc(e,{target:t,replace:n,state:r,preventScrollReset:o,relative:i,viewTransition:l,unstable_useTransitions:s}={}){let a=Pi(),c=Be(),u=Dt(e,{relative:i});return m.useCallback(f=>{if(Ua(f,t)){f.preventDefault();let h=n!==void 0?n:Ot(c)===Ot(u),d=()=>a(e,{replace:h,state:r,preventScrollReset:o,relative:i,viewTransition:l});s?m.startTransition(()=>d()):d()}},[c,a,u,n,r,t,e,o,i,l,s])}var pc=0,hc=()=>`__${String(++pc)}__`;function gc(){let{router:e}=Di("useSubmit"),{basename:t}=m.useContext(Re),n=Ia(),r=e.fetch,o=e.navigate;return m.useCallback(async(i,l={})=>{let{action:s,method:a,encType:c,formData:u,body:f}=Ka(i,t);if(l.navigate===!1){let h=l.fetcherKey||hc();await r(h,n,l.action||s,{preventScrollReset:l.preventScrollReset,formData:u,body:f,formMethod:l.method||a,formEncType:l.encType||c,flushSync:l.flushSync})}else await o(l.action||s,{preventScrollReset:l.preventScrollReset,formData:u,body:f,formMethod:l.method||a,formEncType:l.encType||c,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,o,t,n])}function vc(e,{relative:t}={}){let{basename:n}=m.useContext(Re),r=m.useContext(_e);Z(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...Dt(e||".",{relative:t})},l=Be();if(e==null){i.search=l.search;let s=new URLSearchParams(i.search),a=s.getAll("index");if(a.some(u=>u==="")){s.delete("index"),a.filter(f=>f).forEach(f=>s.append("index",f));let u=s.toString();i.search=u?`?${u}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:Fe([n,i.pathname])),Ot(i)}function bc(e,{relative:t}={}){let n=m.useContext(Si);Z(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Di("useViewTransitionState"),o=Dt(e,{relative:t});if(!n.isTransitioning)return!1;let i=De(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=De(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Lt(o.pathname,l)!=null||Lt(o.pathname,i)!=null}const wc=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"currentColor",className:"bi bi-github",viewBox:"0 0 16 16",...e},m.createElement("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8"})),xc=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 128 128",...e},m.createElement("path",{fill:"currentColor",d:"M2 38.5h124v43.71H64v7.29H36.44v-7.29H2zm6.89 36.43h13.78V53.07h6.89v21.86h6.89V45.79H8.89zm34.44-29.14v36.42h13.78v-7.28h13.78V45.79zm13.78 7.29H64v14.56h-6.89zm20.67-7.29v29.14h13.78V53.07h6.89v21.86h6.89V53.07h6.89v21.86h6.89V45.79z"})),yc=e=>m.createElement("svg",{width:50,height:50,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("rect",{x:0,y:0,height:20,width:20,fill:"transparent"}),m.createElement("circle",{cx:10,cy:10,r:2,fill:"white"}),m.createElement("g",{stroke:"white",strokeWidth:2,fill:"none"},m.createElement("ellipse",{cx:10,cy:10,rx:11,ry:5,transform:"rotate(45, 10, 10)"}),m.createElement("ellipse",{cx:10,cy:10,rx:11,ry:5,transform:"rotate(-45, 10, 10)"}))),ji=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 640 640",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"M433.2 103.1L581.4 253.4C609.1 281.5 609.1 326.5 581.4 354.6L425 512.9C415.7 522.3 400.5 522.4 391.1 513.1C381.7 503.8 381.6 488.6 390.9 479.2L547.3 320.8C556.5 311.5 556.5 296.4 547.3 287.1L399 136.9C389.7 127.5 389.8 112.3 399.2 103C408.6 93.7 423.8 93.8 433.1 103.2zM64.1 293.5L64.1 160C64.1 124.7 92.8 96 128.1 96L261.6 96C278.6 96 294.9 102.7 306.9 114.7L450.9 258.7C475.9 283.7 475.9 324.2 450.9 349.2L317.4 482.7C292.4 507.7 251.9 507.7 226.9 482.7L82.9 338.7C70.9 326.7 64.2 310.4 64.2 293.4zM208.1 208C208.1 190.3 193.8 176 176.1 176C158.4 176 144.1 190.3 144.1 208C144.1 225.7 158.4 240 176.1 240C193.8 240 208.1 225.7 208.1 208z"})),_i=p.createContext(null),ho=e=>{let t;const n=new Set,r=(c,u)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const h=t;t=u??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(d=>d(t,h))}},o=()=>t,s={setState:r,getState:o,getInitialState:()=>a,subscribe:c=>(n.add(c),()=>n.delete(c))},a=t=e(r,o,s);return s},Ec=(e=>e?ho(e):ho),Cc=e=>e;function Rc(e,t=Cc){const n=p.useSyncExternalStore(e.subscribe,p.useCallback(()=>t(e.getState()),[e,t]),p.useCallback(()=>t(e.getInitialState()),[e,t]));return p.useDebugValue(n),n}const go=e=>{const t=Ec(e),n=r=>Rc(t,r);return Object.assign(n,t),n},Sc=(e=>e?go(e):go),Bi=Sc(e=>({visible:!1,hide:()=>e({visible:!1}),show:()=>e({visible:!0}),toggle:()=>e(t=>({visible:!t.visible}))}));function Hi(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Hi(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $c(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hi(e))&&(r&&(r+=" "),r+=t);return r}const kc=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Pc=(e,t)=>({classGroupId:e,validator:t}),Vi=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),an="-",vo=[],Tc="arbitrary..",Oc=e=>{const t=Mc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Lc(l);const s=l.split(an),a=s[0]===""&&s.length>1?1:0;return Wi(s,a,t)},getConflictingClassGroupIds:(l,s)=>{if(s){const a=r[l],c=n[l];return a?c?kc(c,a):a:c||vo}return n[l]||vo}}},Wi=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Wi(e,t+1,i);if(c)return c}const l=n.validators;if(l===null)return;const s=t===0?e.join(an):e.slice(t).join(an),a=l.length;for(let c=0;c<a;c++){const u=l[c];if(u.validator(s))return u.classGroupId}},Lc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Tc+r:void 0})(),Mc=e=>{const{theme:t,classGroups:n}=e;return Ac(n,t)},Ac=(e,t)=>{const n=Vi();for(const r in e){const o=e[r];Lr(o,n,r,t)}return n},Lr=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const l=e[i];Fc(l,t,n,r)}},Fc=(e,t,n,r)=>{if(typeof e=="string"){Ic(e,t,n);return}if(typeof e=="function"){Nc(e,t,n,r);return}Dc(e,t,n,r)},Ic=(e,t,n)=>{const r=e===""?t:zi(t,e);r.classGroupId=n},Nc=(e,t,n,r)=>{if(jc(e)){Lr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Pc(n,e))},Dc=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let l=0;l<i;l++){const[s,a]=o[l];Lr(a,zi(t,s),n,r)}},zi=(e,t)=>{let n=e;const r=t.split(an),o=r.length;for(let i=0;i<o;i++){const l=r[i];let s=n.nextPart.get(l);s||(s=Vi(),n.nextPart.set(l,s)),n=s}return n},jc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,_c=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,l)=>{n[i]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return o(i,l),l},set(i,l){i in n?n[i]=l:o(i,l)}}},sr="!",bo=":",Bc=[],wo=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Hc=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let l=0,s=0,a=0,c;const u=o.length;for(let v=0;v<u;v++){const b=o[v];if(l===0&&s===0){if(b===bo){i.push(o.slice(a,v)),a=v+1;continue}if(b==="/"){c=v;continue}}b==="["?l++:b==="]"?l--:b==="("?s++:b===")"&&s--}const f=i.length===0?o:o.slice(a);let h=f,d=!1;f.endsWith(sr)?(h=f.slice(0,-1),d=!0):f.startsWith(sr)&&(h=f.slice(1),d=!0);const g=c&&c>a?c-a:void 0;return wo(i,d,h,g)};if(t){const o=t+bo,i=r;r=l=>l.startsWith(o)?i(l.slice(o.length)):wo(Bc,!1,l,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Vc=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const l=n[i],s=l[0]==="[",a=t.has(l);s||a?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(l)):o.push(l)}return o.length>0&&(o.sort(),r.push(...o)),r}},Wc=e=>({cache:_c(e.cacheSize),parseClassName:Hc(e),sortModifiers:Vc(e),...Oc(e)}),zc=/\s+/,Uc=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,l=[],s=e.trim().split(zc);let a="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:f,modifiers:h,hasImportantModifier:d,baseClassName:g,maybePostfixModifierPosition:v}=n(u);if(f){a=u+(a.length>0?" "+a:a);continue}let b=!!v,w=r(b?g.substring(0,v):g);if(!w){if(!b){a=u+(a.length>0?" "+a:a);continue}if(w=r(g),!w){a=u+(a.length>0?" "+a:a);continue}b=!1}const y=h.length===0?"":h.length===1?h[0]:i(h).join(":"),x=d?y+sr:y,S=x+w;if(l.indexOf(S)>-1)continue;l.push(S);const R=o(w,b);for(let P=0;P<R.length;++P){const T=R[P];l.push(x+T)}a=u+(a.length>0?" "+a:a)}return a},qc=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Ui(n))&&(o&&(o+=" "),o+=r);return o},Ui=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ui(e[r]))&&(n&&(n+=" "),n+=t);return n},Gc=(e,...t)=>{let n,r,o,i;const l=a=>{const c=t.reduce((u,f)=>f(u),e());return n=Wc(c),r=n.cache.get,o=n.cache.set,i=s,s(a)},s=a=>{const c=r(a);if(c)return c;const u=Uc(a,n);return o(a,u),u};return i=l,(...a)=>i(qc(...a))},Kc=[],ne=e=>{const t=n=>n[e]||Kc;return t.isThemeGetter=!0,t},qi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Gi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Yc=/^\d+\/\d+$/,Xc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Zc=/\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$/,Jc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ct=e=>Yc.test(e),U=e=>!!e&&!Number.isNaN(Number(e)),We=e=>!!e&&Number.isInteger(Number(e)),jn=e=>e.endsWith("%")&&U(e.slice(0,-1)),Me=e=>Xc.test(e),tu=()=>!0,nu=e=>Zc.test(e)&&!Jc.test(e),Ki=()=>!1,ru=e=>Qc.test(e),ou=e=>eu.test(e),iu=e=>!I(e)&&!N(e),lu=e=>bt(e,Zi,Ki),I=e=>qi.test(e),Ze=e=>bt(e,Ji,nu),_n=e=>bt(e,du,U),xo=e=>bt(e,Yi,Ki),su=e=>bt(e,Xi,ou),Ut=e=>bt(e,Qi,ru),N=e=>Gi.test(e),Rt=e=>wt(e,Ji),au=e=>wt(e,fu),yo=e=>wt(e,Yi),cu=e=>wt(e,Zi),uu=e=>wt(e,Xi),qt=e=>wt(e,Qi,!0),bt=(e,t,n)=>{const r=qi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},wt=(e,t,n=!1)=>{const r=Gi.exec(e);return r?r[1]?t(r[1]):n:!1},Yi=e=>e==="position"||e==="percentage",Xi=e=>e==="image"||e==="url",Zi=e=>e==="length"||e==="size"||e==="bg-size",Ji=e=>e==="length",du=e=>e==="number",fu=e=>e==="family-name",Qi=e=>e==="shadow",mu=()=>{const e=ne("color"),t=ne("font"),n=ne("text"),r=ne("font-weight"),o=ne("tracking"),i=ne("leading"),l=ne("breakpoint"),s=ne("container"),a=ne("spacing"),c=ne("radius"),u=ne("shadow"),f=ne("inset-shadow"),h=ne("text-shadow"),d=ne("drop-shadow"),g=ne("blur"),v=ne("perspective"),b=ne("aspect"),w=ne("ease"),y=ne("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...S(),N,I],P=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],k=()=>[N,I,a],F=()=>[ct,"full","auto",...k()],$=()=>[We,"none","subgrid",N,I],D=()=>["auto",{span:["full",We,N,I]},We,N,I],W=()=>[We,"auto",N,I],z=()=>["auto","min","max","fr",N,I],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],A=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...k()],L=()=>[ct,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],E=()=>[e,N,I],M=()=>[...S(),yo,xo,{position:[N,I]}],V=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",cu,lu,{size:[N,I]}],B=()=>[jn,Rt,Ze],j=()=>["","none","full",c,N,I],ee=()=>["",U,Rt,Ze],Y=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>[U,jn,yo,xo],pe=()=>["","none",g,N,I],de=()=>["none",U,N,I],st=()=>["none",U,N,I],Et=()=>[U,N,I],at=()=>[ct,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Me],breakpoint:[Me],color:[tu],container:[Me],"drop-shadow":[Me],ease:["in","out","in-out"],font:[iu],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Me],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Me],shadow:[Me],spacing:["px",U],text:[Me],"text-shadow":[Me],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ct,I,N,b]}],container:["container"],columns:[{columns:[U,I,N,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:R()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{start:F()}],end:[{end:F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[We,"auto",N,I]}],basis:[{basis:[ct,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[U,ct,"auto","initial","none",I]}],grow:[{grow:["",U,N,I]}],shrink:[{shrink:["",U,N,I]}],order:[{order:[We,"first","last","none",N,I]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...A(),"normal"]}],"justify-self":[{"justify-self":["auto",...A()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...A(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...A(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...A(),"baseline"]}],"place-self":[{"place-self":["auto",...A()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[s,"screen",...L()]}],"min-w":[{"min-w":[s,"screen","none",...L()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[l]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",n,Rt,Ze]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,N,_n]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jn,I]}],"font-family":[{font:[au,I,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,N,I]}],"line-clamp":[{"line-clamp":[U,"none",N,_n]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",N,I]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",N,I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[U,"from-font","auto",N,Ze]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[U,"auto",N,I]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N,I]}],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",N,I]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:V()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},We,N,I],radial:["",N,I],conic:[We,N,I]},uu,su]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[U,N,I]}],"outline-w":[{outline:["",U,Rt,Ze]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",u,qt,Ut]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",f,qt,Ut]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[U,Ze]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",h,qt,Ut]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[U,N,I]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"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":[U]}],"mask-image-linear-from-pos":[{"mask-linear-from":G()}],"mask-image-linear-to-pos":[{"mask-linear-to":G()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":G()}],"mask-image-t-to-pos":[{"mask-t-to":G()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":G()}],"mask-image-r-to-pos":[{"mask-r-to":G()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":G()}],"mask-image-b-to-pos":[{"mask-b-to":G()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":G()}],"mask-image-l-to-pos":[{"mask-l-to":G()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":G()}],"mask-image-x-to-pos":[{"mask-x-to":G()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":G()}],"mask-image-y-to-pos":[{"mask-y-to":G()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[N,I]}],"mask-image-radial-from-pos":[{"mask-radial-from":G()}],"mask-image-radial-to-pos":[{"mask-radial-to":G()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[U]}],"mask-image-conic-from-pos":[{"mask-conic-from":G()}],"mask-image-conic-to-pos":[{"mask-conic-to":G()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:V()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",N,I]}],filter:[{filter:["","none",N,I]}],blur:[{blur:pe()}],brightness:[{brightness:[U,N,I]}],contrast:[{contrast:[U,N,I]}],"drop-shadow":[{"drop-shadow":["","none",d,qt,Ut]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",U,N,I]}],"hue-rotate":[{"hue-rotate":[U,N,I]}],invert:[{invert:["",U,N,I]}],saturate:[{saturate:[U,N,I]}],sepia:[{sepia:["",U,N,I]}],"backdrop-filter":[{"backdrop-filter":["","none",N,I]}],"backdrop-blur":[{"backdrop-blur":pe()}],"backdrop-brightness":[{"backdrop-brightness":[U,N,I]}],"backdrop-contrast":[{"backdrop-contrast":[U,N,I]}],"backdrop-grayscale":[{"backdrop-grayscale":["",U,N,I]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[U,N,I]}],"backdrop-invert":[{"backdrop-invert":["",U,N,I]}],"backdrop-opacity":[{"backdrop-opacity":[U,N,I]}],"backdrop-saturate":[{"backdrop-saturate":[U,N,I]}],"backdrop-sepia":[{"backdrop-sepia":["",U,N,I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",N,I]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[U,"initial",N,I]}],ease:[{ease:["linear","initial",w,N,I]}],delay:[{delay:[U,N,I]}],animate:[{animate:["none",y,N,I]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,N,I]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:st()}],"scale-x":[{"scale-x":st()}],"scale-y":[{"scale-y":st()}],"scale-z":[{"scale-z":st()}],"scale-3d":["scale-3d"],skew:[{skew:Et()}],"skew-x":[{"skew-x":Et()}],"skew-y":[{"skew-y":Et()}],transform:[{transform:[N,I,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:at()}],"translate-x":[{"translate-x":at()}],"translate-y":[{"translate-y":at()}],"translate-z":[{"translate-z":at()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N,I]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",N,I]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[U,Rt,Ze,_n]}],stroke:[{stroke:["none",...E()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},pu=Gc(mu);function oe(...e){return pu($c(e))}function he({align:e,children:t,className:n,direction:r,gap:o=0,grow:i,justify:l,shrink:s,style:a,wrap:c,...u}){return C.jsx("div",{className:oe("flex",{"items-center":e==="center","items-end":e==="end","items-start":e==="start","items-stretch":e==="stretch","flex-col":r==="column","flex-row":r==="row","gap-1":o===1,"gap-2":o===2,"gap-3":o===3,"gap-4":o===4,"gap-5":o===5,"gap-6":o===6,"gap-7":o===7,"gap-8":o===8,"grow-0":i===0,"grow-1":i===1,"justify-around":l==="around","justify-between":l==="between","justify-center":l==="center","justify-end":l==="end","justify-start":l==="start","justify-stretch":l==="stretch","shrink-0":s===0,"shrink-1":s===1,"flex-wrap":c},n),style:a,...u,children:t})}const hu=p.createContext(null),Bn={didCatch:!1,error:null};let gu=class extends p.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Bn}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),l=0;l<o;l++)i[l]=arguments[l];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(Bn)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&vu(t.resetKeys,o)){var i,l;(i=(l=this.props).onReset)===null||i===void 0||i.call(l,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(Bn)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:l}=this.state;let s=t;if(i){const a={error:l,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")s=n(a);else if(r)s=p.createElement(r,a);else if(o!==void 0)s=o;else throw l}return p.createElement(hu.Provider,{value:{didCatch:i,error:l,resetErrorBoundary:this.resetErrorBoundary}},s)}};function vu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function Mr({children:e,className:t,html:n=!1,inline:r=!1,intent:o="none",minimal:i,...l}){let s=zs;switch(o){case"none":case"primary":{s=qs;break}case"success":{s=_s;break}}return C.jsx("div",{className:`${r?"w-fit":"w-full"} rounded-md p-2 px-3 ${bu(o,!!i)} ${t}`,role:"alert",...l,children:C.jsxs("div",{className:"flex flex-row gap-2",children:[C.jsx(s,{className:"w-6 h-6 shrink-0"}),n?C.jsx("div",{dangerouslySetInnerHTML:{__html:e}}):C.jsx("div",{children:e})]})})}function bu(e,t){switch(e){case"danger":return t?"bg-red-950 text-red-300 [&_svg]:text-red-500":"bg-black/10 bg-border border-2 border-red-500 text-white [&_svg]:text-red-500 [&_a]:text-red-400!";case"none":return t?"bg-white/10 text-slate-300 [&_svg]:text-slate-400":"bg-black/10 bg-border border-2 border-white/40 text-white [&_svg]:text-white/60";case"primary":return t?"bg-sky-950 text-sky-300 [&_svg]:text-sky-400":"bg-black/10 bg-border border-2 border-sky-400 text-white [&_svg]:text-sky-400";case"success":return t?"bg-emerald-950 text-emerald-300 [&_svg]:text-emerald-400":"bg-black/10 bg-border border-2 border-emerald-400 text-white [&_svg]:text-emerald-400";case"warning":return t?"bg-amber-950/65 text-amber-200 [&_svg]:text-amber-300":"bg-black/10 bg-border border-2 border-amber-400 text-white [&_svg]:text-amber-400 [&_a]:text-amber-400!"}}const el=typeof document<"u"?p.useLayoutEffect:()=>{};var Hn;const wu=(Hn=p.useInsertionEffect)!==null&&Hn!==void 0?Hn:el;function xu(e){const t=p.useRef(null);return wu(()=>{t.current=e},[e]),p.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}const Xe=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},Je=e=>e&&"window"in e&&e.window===e?e:Xe(e).defaultView||window;function yu(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Eu(e){return yu(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let Cu=!1;function Ar(){return Cu}function tl(e,t){if(!Ar())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Eu(n)?n=n.host:n=n.parentNode}return!1}const ar=(e=document)=>{var t;if(!Ar())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function nl(e){return Ar()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function xn(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function Fr(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function He(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Ir=He(function(){return Fr(/^Mac/i)}),Ru=He(function(){return Fr(/^iPhone/i)}),Su=He(function(){return Fr(/^iPad/i)||Ir()&&navigator.maxTouchPoints>1}),$u=He(function(){return Ru()||Su()});He(function(){return Ir()||$u()});He(function(){return xn(/AppleWebKit/i)&&!ku()});const ku=He(function(){return xn(/Chrome/i)}),Pu=He(function(){return xn(/Android/i)});He(function(){return xn(/Firefox/i)});function rl(){let e=p.useRef(new Map),t=p.useCallback((o,i,l,s)=>{let a=s?.once?(...c)=>{e.current.delete(l),l(...c)}:l;e.current.set(l,{type:i,eventTarget:o,fn:a,options:s}),o.addEventListener(i,a,s)},[]),n=p.useCallback((o,i,l,s)=>{var a;let c=((a=e.current.get(l))===null||a===void 0?void 0:a.fn)||l;o.removeEventListener(i,c,s),e.current.delete(l)},[]),r=p.useCallback(()=>{e.current.forEach((o,i)=>{n(o.eventTarget,o.type,i,o.options)})},[n]);return p.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Tu(e){return e.pointerType===""&&e.isTrusted?!0:Pu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ol(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Ou(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function il(e){let t=p.useRef({isFocused:!1,observer:null});el(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=xu(r=>{e?.(r)});return p.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,i=l=>{if(t.current.isFocused=!1,o.disabled){let s=ol(l);n(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var l;(l=t.current.observer)===null||l===void 0||l.disconnect();let s=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let Lu=!1,jt=null,cr=new Set,Pt=new Map,tt=!1,ur=!1;const Mu={Tab:!0,Escape:!0};function Nr(e,t){for(let n of cr)n(e,t)}function Au(e){return!(e.metaKey||!Ir()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function cn(e){tt=!0,Au(e)&&(jt="keyboard",Nr("keyboard",e))}function xe(e){jt="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(tt=!0,Nr("pointer",e))}function ll(e){Tu(e)&&(tt=!0,jt="virtual")}function sl(e){e.target===window||e.target===document||Lu||!e.isTrusted||(!tt&&!ur&&(jt="virtual",Nr("virtual",e)),tt=!1,ur=!1)}function al(){tt=!1,ur=!0}function dr(e){if(typeof window>"u"||typeof document>"u"||Pt.get(Je(e)))return;const t=Je(e),n=Xe(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){tt=!0,r.apply(this,arguments)},n.addEventListener("keydown",cn,!0),n.addEventListener("keyup",cn,!0),n.addEventListener("click",ll,!0),t.addEventListener("focus",sl,!0),t.addEventListener("blur",al,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",xe,!0),n.addEventListener("pointermove",xe,!0),n.addEventListener("pointerup",xe,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",xe,!0),n.addEventListener("mousemove",xe,!0),n.addEventListener("mouseup",xe,!0)),t.addEventListener("beforeunload",()=>{cl(e)},{once:!0}),Pt.set(t,{focus:r})}const cl=(e,t)=>{const n=Je(e),r=Xe(e);t&&r.removeEventListener("DOMContentLoaded",t),Pt.has(n)&&(n.HTMLElement.prototype.focus=Pt.get(n).focus,r.removeEventListener("keydown",cn,!0),r.removeEventListener("keyup",cn,!0),r.removeEventListener("click",ll,!0),n.removeEventListener("focus",sl,!0),n.removeEventListener("blur",al,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",xe,!0),r.removeEventListener("pointermove",xe,!0),r.removeEventListener("pointerup",xe,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",xe,!0),r.removeEventListener("mousemove",xe,!0),r.removeEventListener("mouseup",xe,!0)),Pt.delete(n))};function Fu(e){const t=Xe(e);let n;return t.readyState!=="loading"?dr(e):(n=()=>{dr(e)},t.addEventListener("DOMContentLoaded",n)),()=>cl(e,n)}typeof document<"u"&&Fu();function ul(){return jt!=="pointer"}const Iu=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Nu(e,t,n){let r=Xe(n?.target);const o=typeof window<"u"?Je(n?.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?Je(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,l=typeof window<"u"?Je(n?.target).HTMLElement:HTMLElement,s=typeof window<"u"?Je(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!Iu.has(r.activeElement.type)||r.activeElement instanceof i||r.activeElement instanceof l&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof s&&!Mu[n.key])}function Du(e,t,n){dr(),p.useEffect(()=>{let r=(o,i)=>{Nu(!!n?.isTextInput,o,i)&&e(ul())};return cr.add(r),()=>{cr.delete(r)}},t)}function ju(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const i=p.useCallback(a=>{if(a.target===a.currentTarget)return r&&r(a),o&&o(!1),!0},[r,o]),l=il(i),s=p.useCallback(a=>{const c=Xe(a.target),u=c?ar(c):ar();a.target===a.currentTarget&&u===nl(a.nativeEvent)&&(n&&n(a),o&&o(!0),l(a))},[o,n,l]);return{focusProps:{onFocus:!t&&(n||o||r)?s:void 0,onBlur:!t&&(r||o)?i:void 0}}}function _u(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,i=p.useRef({isFocusWithin:!1}),{addGlobalListener:l,removeAllGlobalListeners:s}=rl(),a=p.useCallback(f=>{f.currentTarget.contains(f.target)&&i.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(i.current.isFocusWithin=!1,s(),n&&n(f),o&&o(!1))},[n,o,i,s]),c=il(a),u=p.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const h=Xe(f.target),d=ar(h);if(!i.current.isFocusWithin&&d===nl(f.nativeEvent)){r&&r(f),o&&o(!0),i.current.isFocusWithin=!0,c(f);let g=f.currentTarget;l(h,"focus",v=>{if(i.current.isFocusWithin&&!tl(g,v.target)){let b=new h.defaultView.FocusEvent("blur",{relatedTarget:v.target});Ou(b,g);let w=ol(b);a(w)}},{capture:!0})}},[r,o,c,l,a]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:a}}}let un=!1,Gt=0;function fr(){un=!0,setTimeout(()=>{un=!1},50)}function Eo(e){e.pointerType==="touch"&&fr()}function Bu(){if(!(typeof document>"u"))return Gt===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Eo):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",fr)),Gt++,()=>{Gt--,!(Gt>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Eo):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",fr))}}function Dr(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[i,l]=p.useState(!1),s=p.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;p.useEffect(Bu,[]);let{addGlobalListener:a,removeAllGlobalListeners:c}=rl(),{hoverProps:u,triggerHoverEnd:f}=p.useMemo(()=>{let h=(v,b)=>{if(s.pointerType=b,o||b==="touch"||s.isHovered||!v.currentTarget.contains(v.target))return;s.isHovered=!0;let w=v.currentTarget;s.target=w,a(Xe(v.target),"pointerover",y=>{s.isHovered&&s.target&&!tl(s.target,y.target)&&d(y,y.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:w,pointerType:b}),n&&n(!0),l(!0)},d=(v,b)=>{let w=s.target;s.pointerType="",s.target=null,!(b==="touch"||!s.isHovered||!w)&&(s.isHovered=!1,c(),r&&r({type:"hoverend",target:w,pointerType:b}),n&&n(!1),l(!1))},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=v=>{un&&v.pointerType==="mouse"||h(v,v.pointerType)},g.onPointerLeave=v=>{!o&&v.currentTarget.contains(v.target)&&d(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(g.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=v=>{!s.ignoreEmulatedMouseEvents&&!un&&h(v,"mouse"),s.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=v=>{!o&&v.currentTarget.contains(v.target)&&d(v,"mouse")}),{hoverProps:g,triggerHoverEnd:d}},[t,n,r,o,s,a,c]);return p.useEffect(()=>{o&&f({currentTarget:s.target},s.pointerType)},[o]),{hoverProps:u,isHovered:i}}function jr(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=p.useRef({isFocused:!1,isFocusVisible:t||ul()}),[i,l]=p.useState(!1),[s,a]=p.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=p.useCallback(()=>a(o.current.isFocused&&o.current.isFocusVisible),[]),u=p.useCallback(d=>{o.current.isFocused=d,l(d),c()},[c]);Du(d=>{o.current.isFocusVisible=d,c()},[],{isTextInput:n});let{focusProps:f}=ju({isDisabled:r,onFocusChange:u}),{focusWithinProps:h}=_u({isDisabled:!r,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:s,focusProps:r?h:f}}var Hu=Object.defineProperty,Vu=(e,t,n)=>t in e?Hu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vn=(e,t,n)=>(Vu(e,typeof t!="symbol"?t+"":t,n),n);let Wu=class{constructor(){Vn(this,"current",this.detect()),Vn(this,"handoffState","pending"),Vn(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ke=new Wu;function _t(e){var t;return ke.isServer?null:e==null?document:(t=e?.ownerDocument)!=null?t:document}function dn(e){var t,n;return ke.isServer?null:e==null?document:(n=(t=e?.getRootNode)==null?void 0:t.call(e))!=null?n:document}function dl(e){var t,n;return(n=(t=dn(e))==null?void 0:t.activeElement)!=null?n:null}function zu(e){return dl(e)===e}function fl(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ve(){let e=[],t={addEventListener(n,r,o,i){return n.addEventListener(r,o,i),t.add(()=>n.removeEventListener(r,o,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return fl(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=ve();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function ot(){let[e]=p.useState(ve);return p.useEffect(()=>()=>e.dispose(),[e]),e}let te=(e,t)=>{ke.isServer?p.useEffect(e,t):p.useLayoutEffect(e,t)};function it(e){let t=p.useRef(e);return te(()=>{t.current=e},[e]),t}let q=function(e){let t=it(e);return p.useCallback((...n)=>t.current(...n),[t])};function Uu(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function qu(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function _r({disabled:e=!1}={}){let t=p.useRef(null),[n,r]=p.useState(!1),o=ot(),i=q(()=>{t.current=null,r(!1),o.dispose()}),l=q(s=>{if(o.dispose(),t.current===null){t.current=s.currentTarget,r(!0);{let a=_t(s.currentTarget);o.addEventListener(a,"pointerup",i,!1),o.addEventListener(a,"pointermove",c=>{if(t.current){let u=Uu(c);r(qu(u,t.current.getBoundingClientRect()))}},!1),o.addEventListener(a,"pointercancel",i,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:l,onPointerUp:i,onClick:i}}}function ye(e){return p.useMemo(()=>e,Object.values(e))}let Gu=p.createContext(void 0);function yn(){return p.useContext(Gu)}function mr(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ce(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ce),r}var pt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(pt||{}),Ue=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ue||{});function ie(){let e=Yu();return p.useCallback(t=>Ku({mergeRefs:e,...t}),[e])}function Ku({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:i=!0,name:l,mergeRefs:s}){s=s??Xu;let a=ml(t,e);if(i)return Kt(a,n,r,l,s);let c=o??0;if(c&2){let{static:u=!1,...f}=a;if(u)return Kt(f,n,r,l,s)}if(c&1){let{unmount:u=!0,...f}=a;return ce(u?0:1,{0(){return null},1(){return Kt({...f,hidden:!0,style:{display:"none"}},n,r,l,s)}})}return Kt(a,n,r,l,s)}function Kt(e,t={},n,r,o){let{as:i=n,children:l,refName:s="ref",...a}=Wn(e,["unmount","static"]),c=e.ref!==void 0?{[s]:e.ref}:{},u=typeof l=="function"?l(t):l;"className"in a&&a.className&&typeof a.className=="function"&&(a.className=a.className(t)),a["aria-labelledby"]&&a["aria-labelledby"]===a.id&&(a["aria-labelledby"]=void 0);let f={};if(t){let h=!1,d=[];for(let[g,v]of Object.entries(t))typeof v=="boolean"&&(h=!0),v===!0&&d.push(g.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(h){f["data-headlessui-state"]=d.join(" ");for(let g of d)f[`data-${g}`]=""}}if(ft(i)&&(Object.keys(ze(a)).length>0||Object.keys(ze(f)).length>0))if(!p.isValidElement(u)||Array.isArray(u)&&u.length>1||Ju(u)){if(Object.keys(ze(a)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(ze(a)).concat(Object.keys(ze(f))).map(h=>` - ${h}`).join(`
4
- `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(h=>` - ${h}`).join(`
5
- `)].join(`
6
- `))}else{let h=u.props,d=h?.className,g=typeof d=="function"?(...w)=>mr(d(...w),a.className):mr(d,a.className),v=g?{className:g}:{},b=ml(u.props,ze(Wn(a,["ref"])));for(let w in f)w in b&&delete f[w];return p.cloneElement(u,Object.assign({},b,f,c,{ref:o(Zu(u),c.ref)},v))}return p.createElement(i,Object.assign({},Wn(a,["ref"]),!ft(i)&&c,!ft(i)&&f),u)}function Yu(){let e=p.useRef([]),t=p.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function Xu(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function ml(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var i;return(i=o?.preventDefault)==null?void 0:i.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...i){let l=n[r];for(let s of l){if((o instanceof Event||o?.nativeEvent instanceof Event)&&o.defaultPrevented)return;s(o,...i)}}});return t}function Mt(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let i=n[r];for(let l of i)l?.(...o)}});return t}function re(e){var t;return Object.assign(p.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function ze(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Wn(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Zu(e){return p.version.split(".")[0]>="19"?e.props.ref:e.ref}function ft(e){return e===p.Fragment||e===Symbol.for("react.fragment")}function Ju(e){return ft(e.type)}let Qu="button";function ed(e,t){var n;let r=yn(),{disabled:o=r||!1,autoFocus:i=!1,...l}=e,{isFocusVisible:s,focusProps:a}=jr({autoFocus:i}),{isHovered:c,hoverProps:u}=Dr({isDisabled:o}),{pressed:f,pressProps:h}=_r({disabled:o}),d=Mt({ref:t,type:(n=l.type)!=null?n:"button",disabled:o||void 0,autoFocus:i},a,u,h),g=ye({disabled:o,hover:c,focus:s,active:f,autofocus:i});return ie()({ourProps:d,theirProps:l,slot:g,defaultTag:Qu,name:"Button"})}let td=re(ed);function nd(e,t,n){let[r,o]=p.useState(n),i=e!==void 0,l=p.useRef(i),s=p.useRef(!1),a=p.useRef(!1);return i&&!l.current&&!s.current?(s.current=!0,l.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&l.current&&!a.current&&(a.current=!0,l.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:r,q(c=>(i||Ye.flushSync(()=>o(c)),t?.(c)))]}function rd(e){let[t]=p.useState(e);return t}function pl(e={},t=null,n=[]){for(let[r,o]of Object.entries(e))gl(n,hl(t,r),o);return n}function hl(e,t){return e?e+"["+t+"]":t}function gl(e,t,n){if(Array.isArray(n))for(let[r,o]of n.entries())gl(e,hl(t,r.toString()),o);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):id(n)&&!p.isValidElement(n)&&pl(n,t,e)}function od(e){var t,n;let r=(t=e?.form)!=null?t:e.closest("form");if(r){for(let o of r.elements)if(o!==e&&(o.tagName==="INPUT"&&o.type==="submit"||o.tagName==="BUTTON"&&o.type==="submit"||o.nodeName==="INPUT"&&o.type==="image")){o.click();return}(n=r.requestSubmit)==null||n.call(r)}}function id(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}let ld="span";var Br=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Br||{});function sd(e,t){var n;let{features:r=1,...o}=e,i={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return ie()({ourProps:i,theirProps:o,slot:{},defaultTag:ld,name:"Hidden"})}let vl=re(sd),ad=p.createContext(null);function cd({children:e}){let t=p.useContext(ad);if(!t)return p.createElement(p.Fragment,null,e);let{target:n}=t;return n?Ye.createPortal(p.createElement(p.Fragment,null,e),n):null}function ud({data:e,form:t,disabled:n,onReset:r,overrides:o}){let[i,l]=p.useState(null),s=ot();return p.useEffect(()=>{if(r&&i)return s.addEventListener(i,"reset",r)},[i,t,r]),p.createElement(cd,null,p.createElement(dd,{setForm:l,formId:t}),pl(e).map(([a,c])=>p.createElement(vl,{features:Br.Hidden,...ze({key:a,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:t,disabled:n,name:a,value:c,...o})})))}function dd({setForm:e,formId:t}){return p.useEffect(()=>{if(t){let n=document.getElementById(t);n&&e(n)}},[e,t]),t?null:p.createElement(vl,{features:Br.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:n=>{if(!n)return;let r=n.closest("form");r&&e(r)}})}let fd=p.createContext(void 0);function bl(){return p.useContext(fd)}function wl(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function En(e){return wl(e)&&"tagName"in e}function Ve(e){return En(e)&&"accessKey"in e}function qe(e){return En(e)&&"tabIndex"in e}function md(e){return En(e)&&"style"in e}function pd(e){return Ve(e)&&e.nodeName==="IFRAME"}function xl(e){return Ve(e)&&e.nodeName==="INPUT"}function Co(e){return Ve(e)&&e.nodeName==="LABEL"}function hd(e){return Ve(e)&&e.nodeName==="FIELDSET"}function yl(e){return Ve(e)&&e.nodeName==="LEGEND"}function gd(e){return En(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}function pr(e){let t=e.parentElement,n=null;for(;t&&!hd(t);)yl(t)&&(n=t),t=t.parentElement;let r=t?.getAttribute("disabled")==="";return r&&vd(n)?!1:r}function vd(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(yl(t))return!1;t=t.previousElementSibling}return!0}let El=Symbol();function Cl(e,t=!0){return Object.assign(e,{[El]:t})}function ue(...e){let t=p.useRef(e);p.useEffect(()=>{t.current=e},[e]);let n=q(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||r?.[El])?void 0:n}let Hr=p.createContext(null);Hr.displayName="DescriptionContext";function Rl(){let e=p.useContext(Hr);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Rl),t}return e}function bd(){var e,t;return(t=(e=p.useContext(Hr))==null?void 0:e.value)!=null?t:void 0}let wd="p";function xd(e,t){let n=p.useId(),r=yn(),{id:o=`headlessui-description-${n}`,...i}=e,l=Rl(),s=ue(t);te(()=>l.register(o),[o,l.register]);let a=ye({...l.slot,disabled:r||!1}),c={ref:s,...l.props,id:o};return ie()({ourProps:c,theirProps:i,slot:a,defaultTag:wd,name:l.name||"Description"})}let yd=re(xd);Object.assign(yd,{});var J=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(J||{});let Cn=p.createContext(null);Cn.displayName="LabelContext";function Sl(){let e=p.useContext(Cn);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Sl),t}return e}function $l(e){var t,n,r;let o=(n=(t=p.useContext(Cn))==null?void 0:t.value)!=null?n:void 0;return((r=e?.length)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function Ed({inherit:e=!1}={}){let t=$l(),[n,r]=p.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,p.useMemo(()=>function(i){let l=q(a=>(r(c=>[...c,a]),()=>r(c=>{let u=c.slice(),f=u.indexOf(a);return f!==-1&&u.splice(f,1),u}))),s=p.useMemo(()=>({register:l,slot:i.slot,name:i.name,props:i.props,value:i.value}),[l,i.slot,i.name,i.props,i.value]);return p.createElement(Cn.Provider,{value:s},i.children)},[r])]}let Cd="label";function Rd(e,t){var n;let r=p.useId(),o=Sl(),i=bl(),l=yn(),{id:s=`headlessui-label-${r}`,htmlFor:a=i??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,f=ue(t);te(()=>o.register(s),[s,o.register]);let h=q(v=>{let b=v.currentTarget;if(!(v.target!==v.currentTarget&&gd(v.target))&&(Co(b)&&v.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(v),Co(b))){let w=document.getElementById(b.htmlFor);if(w){let y=w.getAttribute("disabled");if(y==="true"||y==="")return;let x=w.getAttribute("aria-disabled");if(x==="true"||x==="")return;(xl(w)&&(w.type==="file"||w.type==="radio"||w.type==="checkbox")||w.role==="radio"||w.role==="checkbox"||w.role==="switch")&&w.click(),w.focus({preventScroll:!0})}}}),d=ye({...o.slot,disabled:l||!1}),g={ref:f,...o.props,id:s,htmlFor:a,onClick:h};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in u&&delete u.onClick),ie()({ourProps:g,theirProps:u,slot:d,defaultTag:a?Cd:"div",name:o.name||"Label"})}let Sd=re(Rd),$d=Object.assign(Sd,{}),kd=p.createContext(()=>{});function Pd({value:e,children:t}){return p.createElement(kd.Provider,{value:e},t)}function Td(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function Od(e=Td){return p.useCallback((t,n)=>{if(typeof e=="string"){let r=e;return t?.[r]===n?.[r]}return e(t,n)},[e])}function Ro(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function Ld(e,t,n=!1){let[r,o]=p.useState(()=>Ro(t));return te(()=>{if(!t||!e)return;let i=ve();return i.requestAnimationFrame(function l(){i.requestAnimationFrame(l),o(s=>{let a=Ro(t);return a.width===s.width&&a.height===s.height?s:a})}),()=>{i.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var kl=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(kl||{});function Md(e){let t=p.useRef(null),n=q(o=>{t.current=o.pointerType,!pr(o.currentTarget)&&o.pointerType==="mouse"&&o.button===kl.Left&&(o.preventDefault(),e(o))}),r=q(o=>{t.current!=="mouse"&&(pr(o.currentTarget)||e(o))});return{onPointerDown:n,onClick:r}}let Pl=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var Ad=Object.defineProperty,Fd=(e,t,n)=>t in e?Ad(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Id=(e,t,n)=>(Fd(e,t+"",n),n),Tl=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},be=(e,t,n)=>(Tl(e,t,"read from private field"),n?n.call(e):t.get(e)),zn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},So=(e,t,n,r)=>(Tl(e,t,"write to private field"),t.set(e,n),n),Se,St,$t;let Ol=class{constructor(t){zn(this,Se,{}),zn(this,St,new Pl(()=>new Set)),zn(this,$t,new Set),Id(this,"disposables",ve()),So(this,Se,t),ke.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return be(this,Se)}subscribe(t,n){if(ke.isServer)return()=>{};let r={selector:t,callback:n,current:t(be(this,Se))};return be(this,$t).add(r),this.disposables.add(()=>{be(this,$t).delete(r)})}on(t,n){return ke.isServer?()=>{}:(be(this,St).get(t).add(n),this.disposables.add(()=>{be(this,St).get(t).delete(n)}))}send(t){let n=this.reduce(be(this,Se),t);if(n!==be(this,Se)){So(this,Se,n);for(let r of be(this,$t)){let o=r.selector(be(this,Se));Ll(r.current,o)||(r.current=o,r.callback(o))}for(let r of be(this,St).get(t.type))r(be(this,Se),t)}}};Se=new WeakMap,St=new WeakMap,$t=new WeakMap;function Ll(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:Un(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:Un(e.entries(),t.entries()):$o(e)&&$o(t)?Un(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function Un(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function $o(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function qn(e){let[t,n]=e(),r=ve();return(...o)=>{t(...o),r.dispose(),r.microTask(n)}}var Nd=Object.defineProperty,Dd=(e,t,n)=>t in e?Nd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ko=(e,t,n)=>(Dd(e,typeof t!="symbol"?t+"":t,n),n),Ml=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Ml||{});let jd={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(o!==-1){let i=e.stack.slice();return i.splice(o,1),i.push(n),r=i,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}},_d=class Al extends Ol{constructor(){super(...arguments),ko(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),ko(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new Al({stack:[]})}reduce(t,n){return ce(n.type,jd,t,n)}};const Vr=new Pl(()=>_d.new());var Yt={exports:{}},Gn={};var Po;function Bd(){if(Po)return Gn;Po=1;var e=p;function t(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,i=e.useEffect,l=e.useMemo,s=e.useDebugValue;return Gn.useSyncExternalStoreWithSelector=function(a,c,u,f,h){var d=o(null);if(d.current===null){var g={hasValue:!1,value:null};d.current=g}else g=d.current;d=l(function(){function b(R){if(!w){if(w=!0,y=R,R=f(R),h!==void 0&&g.hasValue){var P=g.value;if(h(P,R))return x=P}return x=R}if(P=x,n(y,R))return P;var T=f(R);return h!==void 0&&h(P,T)?(y=R,P):(y=R,x=T)}var w=!1,y,x,S=u===void 0?null:u;return[function(){return b(c())},S===null?void 0:function(){return b(S())}]},[c,u,f,h]);var v=r(a,d[0],d[1]);return i(function(){g.hasValue=!0,g.value=v},[v]),s(v),v},Gn}var Kn={};var To;function Hd(){return To||(To=1,process.env.NODE_ENV!=="production"&&(function(){function e(a,c){return a===c&&(a!==0||1/a===1/c)||a!==a&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=p,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,l=t.useMemo,s=t.useDebugValue;Kn.useSyncExternalStoreWithSelector=function(a,c,u,f,h){var d=o(null);if(d.current===null){var g={hasValue:!1,value:null};d.current=g}else g=d.current;d=l(function(){function b(R){if(!w){if(w=!0,y=R,R=f(R),h!==void 0&&g.hasValue){var P=g.value;if(h(P,R))return x=P}return x=R}if(P=x,n(y,R))return P;var T=f(R);return h!==void 0&&h(P,T)?(y=R,P):(y=R,x=T)}var w=!1,y,x,S=u===void 0?null:u;return[function(){return b(c())},S===null?void 0:function(){return b(S())}]},[c,u,f,h]);var v=r(a,d[0],d[1]);return i(function(){g.hasValue=!0,g.value=v},[v]),s(v),v},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Kn}var Oo;function Vd(){return Oo||(Oo=1,process.env.NODE_ENV==="production"?Yt.exports=Bd():Yt.exports=Hd()),Yt.exports}var Wd=Vd();function fe(e,t,n=Ll){return Wd.useSyncExternalStoreWithSelector(q(r=>e.subscribe(zd,r)),q(()=>e.state),q(()=>e.state),q(t),n)}function zd(e){return e}function Fl(e,t){let n=p.useId(),r=Vr.get(t),[o,i]=fe(r,p.useCallback(l=>[r.selectors.isTop(l,n),r.selectors.inStack(l,n)],[r,n]));return te(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?i?o:!0:!1}let hr=new Map,Tt=new Map;function Lo(e){var t;let n=(t=Tt.get(e))!=null?t:0;return Tt.set(e,n+1),n!==0?()=>Mo(e):(hr.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Mo(e))}function Mo(e){var t;let n=(t=Tt.get(e))!=null?t:1;if(n===1?Tt.delete(e):Tt.set(e,n-1),n!==1)return;let r=hr.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,hr.delete(e))}function Ud(e,{allowed:t,disallowed:n}={}){let r=Fl(e,"inert-others");te(()=>{var o,i;if(!r)return;let l=ve();for(let a of(o=n?.())!=null?o:[])a&&l.add(Lo(a));let s=(i=t?.())!=null?i:[];for(let a of s){if(!a)continue;let c=_t(a);if(!c)continue;let u=a.parentElement;for(;u&&u!==c.body;){for(let f of u.children)s.some(h=>f.contains(h))||l.add(Lo(f));u=u.parentElement}}return l.dispose},[r,t,n])}function qd(e,t,n){let r=it(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&n()});p.useEffect(()=>{if(!e)return;let o=t===null?null:Ve(t)?t:t.current;if(!o)return;let i=ve();if(typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>r.current(o));l.observe(o),i.add(()=>l.disconnect())}if(typeof IntersectionObserver<"u"){let l=new IntersectionObserver(()=>r.current(o));l.observe(o),i.add(()=>l.disconnect())}return()=>i.dispose()},[t,r,e])}let gr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),Gd=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var vr=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(vr||{}),Kd=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Kd||{}),Yd=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Yd||{});function Il(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(gr)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function Xd(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Gd)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Wr=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Wr||{});function Nl(e,t=0){var n;return e===((n=_t(e))==null?void 0:n.body)?!1:ce(t,{0(){return e.matches(gr)},1(){let r=e;for(;r!==null;){if(r.matches(gr))return!0;r=r.parentElement}return!1}})}var Zd=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Zd||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let Jd=["textarea","input"].join(",");function Qd(e){var t,n;return(n=(t=e?.matches)==null?void 0:t.call(e,Jd))!=null?n:!1}function Dl(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),i=t(r);if(o===null||i===null)return 0;let l=o.compareDocumentPosition(i);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function ef(e,t,n=e===null?document.body:dn(e)){return tf(Il(n),t,{relativeTo:e})}function tf(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?dn(e[0]):document:dn(e),l=Array.isArray(e)?n?Dl(e):e:t&64?Xd(e):Il(e);o.length>0&&l.length>1&&(l=l.filter(d=>!o.some(g=>g!=null&&"current"in g?g?.current===d:g===d))),r=r??i?.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(r))-1;if(t&4)return Math.max(0,l.indexOf(r))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},u=0,f=l.length,h;do{if(u>=f||u+f<=0)return 0;let d=a+u;if(t&16)d=(d+f)%f;else{if(d<0)return 3;if(d>=f)return 1}h=l[d],h?.focus(c),u+=s}while(h!==dl(h));return t&6&&Qd(h)&&h.select(),2}function jl(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function nf(){return/Android/gi.test(window.navigator.userAgent)}function Ao(){return jl()||nf()}function dt(e,t,n,r){let o=it(n);p.useEffect(()=>{if(!e)return;function i(l){o.current(l)}return document.addEventListener(t,i,r),()=>document.removeEventListener(t,i,r)},[e,t,r])}function rf(e,t,n,r){let o=it(n);p.useEffect(()=>{if(!e)return;function i(l){o.current(l)}return window.addEventListener(t,i,r),()=>window.removeEventListener(t,i,r)},[e,t,r])}const Fo=30;function of(e,t,n){let r=it(n),o=p.useCallback(function(s,a){if(s.defaultPrevented)return;let c=a(s);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let u=(function f(h){return typeof h=="function"?f(h()):Array.isArray(h)||h instanceof Set?h:[h]})(t);for(let f of u)if(f!==null&&(f.contains(c)||s.composed&&s.composedPath().includes(f)))return;return!Nl(c,Wr.Loose)&&c.tabIndex!==-1&&s.preventDefault(),r.current(s,c)},[r,t]),i=p.useRef(null);dt(e,"pointerdown",s=>{var a,c;Ao()||(i.current=((c=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:c[0])||s.target)},!0),dt(e,"pointerup",s=>{if(Ao()||!i.current)return;let a=i.current;return i.current=null,o(s,()=>a)},!0);let l=p.useRef({x:0,y:0});dt(e,"touchstart",s=>{l.current.x=s.touches[0].clientX,l.current.y=s.touches[0].clientY},!0),dt(e,"touchend",s=>{let a={x:s.changedTouches[0].clientX,y:s.changedTouches[0].clientY};if(!(Math.abs(a.x-l.current.x)>=Fo||Math.abs(a.y-l.current.y)>=Fo))return o(s,()=>qe(s.target)?s.target:null)},!0),rf(e,"blur",s=>o(s,()=>pd(window.document.activeElement)?window.document.activeElement:null),!0)}function br(...e){return p.useMemo(()=>_t(...e),[...e])}var lf=(e=>(e[e.Ignore=0]="Ignore",e[e.Select=1]="Select",e[e.Close=2]="Close",e))(lf||{});const Xt={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},sf=200,Io=5;function af(e,{trigger:t,action:n,close:r,select:o}){let i=p.useRef(null),l=p.useRef(null),s=p.useRef(null);dt(e&&t!==null,"pointerdown",a=>{wl(a?.target)&&t!=null&&t.contains(a.target)&&(l.current=a.x,s.current=a.y,i.current=a.timeStamp)}),dt(e&&t!==null,"pointerup",a=>{var c,u;let f=i.current;if(f===null||(i.current=null,!qe(a.target))||Math.abs(a.x-((c=l.current)!=null?c:a.x))<Io&&Math.abs(a.y-((u=s.current)!=null?u:a.y))<Io)return;let h=n(a);switch(h.kind){case 0:return;case 1:{a.timeStamp-f>sf&&(o(h.target),r());break}case 2:{r();break}}},{capture:!0})}function _l(e,t){return p.useMemo(()=>{var n;if(e.type)return e.type;let r=(n=e.as)!=null?n:"button";if(typeof r=="string"&&r.toLowerCase()==="button"||t?.tagName==="BUTTON"&&!t.hasAttribute("type"))return"button"},[e.type,e.as,t])}function cf(e){return p.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function uf(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...i){let l=t[o].call(n,...i);l&&(n=l,r.forEach(s=>s()))}}}function df(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),i=Math.max(0,e-o);n.style(r,"paddingRight",`${i}px`)}}}function ff(){return jl()?{before({doc:e,d:t,meta:n}){function r(o){for(let i of n().containers)for(let l of i())if(l.contains(o))return!0;return!1}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let s=ve();s.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>s.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;t.addEventListener(e,"click",s=>{if(qe(s.target))try{let a=s.target.closest("a");if(!a)return;let{hash:c}=new URL(a.href),u=e.querySelector(c);qe(u)&&!r(u)&&(l=u)}catch{}},!0),t.group(s=>{t.addEventListener(e,"touchstart",a=>{if(s.dispose(),qe(a.target)&&md(a.target))if(r(a.target)){let c=a.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;s.style(c,"overscrollBehavior","contain")}else s.style(a.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",s=>{if(qe(s.target)){if(xl(s.target))return;if(r(s.target)){let a=s.target;for(;a.parentElement&&a.dataset.headlessuiPortal!==""&&!(a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth);)a=a.parentElement;a.dataset.headlessuiPortal===""&&s.preventDefault()}else s.preventDefault()}},{passive:!1}),t.add(()=>{var s;let a=(s=window.scrollY)!=null?s:window.pageYOffset;i!==a&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function mf(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function No(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let Qe=uf(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ve(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=No(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=No(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[ff(),df(),mf()];n.forEach(({before:r})=>r?.(t)),n.forEach(({after:r})=>r?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Qe.subscribe(()=>{let e=Qe.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&Qe.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&Qe.dispatch("TEARDOWN",n)}});function pf(e,t,n=()=>({containers:[]})){let r=cf(Qe),o=t?r.get(t):void 0,i=o?o.count>0:!1;return te(()=>{if(!(!t||!e))return Qe.dispatch("PUSH",t,n),()=>Qe.dispatch("POP",t,n)},[e,t]),i}function hf(e,t,n=()=>[document.body]){let r=Fl(e,"scroll-lock");pf(r,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],n]}})}function Do(e){return[e.screenX,e.screenY]}function gf(){let e=p.useRef([-1,-1]);return{wasMoved(t){let n=Do(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=Do(t)}}}function vf(e=0){let[t,n]=p.useState(e),r=p.useCallback(a=>n(a),[]),o=p.useCallback(a=>n(c=>c|a),[]),i=p.useCallback(a=>(t&a)===a,[t]),l=p.useCallback(a=>n(c=>c&~a),[]),s=p.useCallback(a=>n(c=>c^a),[]);return{flags:t,setFlag:r,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:s}}var jo,_o;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((jo=process==null?void 0:process.env)==null?void 0:jo.NODE_ENV)==="test"&&typeof((_o=Element?.prototype)==null?void 0:_o.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
7
- `)),[]});var bf=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(bf||{});function zr(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Ur(e,t,n,r){let[o,i]=p.useState(n),{hasFlag:l,addFlag:s,removeFlag:a}=vf(e&&o?3:0),c=p.useRef(!1),u=p.useRef(!1),f=ot();return te(()=>{var h;if(e){if(n&&i(!0),!t){n&&s(3);return}return(h=r?.start)==null||h.call(r,n),wf(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(n?(s(3),a(4)):(s(4),a(2)))},run(){u.current?n?(a(3),s(4)):(a(4),s(3)):n?a(1):s(1)},done(){var d;u.current&&Ef(t)||(c.current=!1,a(7),n||i(!1),(d=r?.end)==null||d.call(r,n))}})}},[e,n,t,f]),e?[o,{closed:l(1),enter:l(2),leave:l(4),transition:l(2)||l(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function wf(e,{prepare:t,run:n,done:r,inFlight:o}){let i=ve();return yf(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{n(),i.requestAnimationFrame(()=>{i.add(xf(e,r))})}),i.dispose}function xf(e,t){var n,r;let o=ve();if(!e)return o.dispose;let i=!1;o.add(()=>{i=!0});let l=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(s=>s instanceof CSSTransition))!=null?r:[];return l.length===0?(t(),o.dispose):(Promise.allSettled(l.map(s=>s.finished)).then(()=>{i||t()}),o.dispose)}function yf(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function Ef(e){var t,n;return((n=(t=e.getAnimations)==null?void 0:t.call(e))!=null?n:[]).some(r=>r instanceof CSSTransition&&r.playState!=="finished")}function Rn(){return typeof window<"u"}function xt(e){return qr(e)?(e.nodeName||"").toLowerCase():"#document"}function me(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Le(e){var t;return(t=(qr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qr(e){return Rn()?e instanceof Node||e instanceof me(e).Node:!1}function K(e){return Rn()?e instanceof Element||e instanceof me(e).Element:!1}function ge(e){return Rn()?e instanceof HTMLElement||e instanceof me(e).HTMLElement:!1}function wr(e){return!Rn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof me(e).ShadowRoot}const Cf=new Set(["inline","contents"]);function Bt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Cf.has(o)}const Rf=new Set(["table","td","th"]);function Sf(e){return Rf.has(xt(e))}const $f=[":popover-open",":modal"];function Sn(e){return $f.some(t=>{try{return e.matches(t)}catch{return!1}})}const kf=["transform","translate","scale","rotate","perspective"],Pf=["transform","translate","scale","rotate","perspective","filter"],Tf=["paint","layout","strict","content"];function Gr(e){const t=$n(),n=K(e)?Ee(e):e;return kf.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Pf.some(r=>(n.willChange||"").includes(r))||Tf.some(r=>(n.contain||"").includes(r))}function Of(e){let t=je(e);for(;ge(t)&&!Ie(t);){if(Gr(t))return t;if(Sn(t))return null;t=je(t)}return null}function $n(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Lf=new Set(["html","body","#document"]);function Ie(e){return Lf.has(xt(e))}function Ee(e){return me(e).getComputedStyle(e)}function kn(e){return K(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function je(e){if(xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wr(e)&&e.host||Le(e);return wr(t)?t.host:t}function Bl(e){const t=je(e);return Ie(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&Bt(t)?t:Bl(t)}function Ke(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Bl(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=me(o);if(i){const s=xr(l);return t.concat(l,l.visualViewport||[],Bt(o)?o:[],s&&n?Ke(s):[])}return t.concat(o,Ke(o,[],n))}function xr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Mf(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}const Af=["top","right","bottom","left"],Bo=["start","end"],Ho=Af.reduce((e,t)=>e.concat(t,t+"-"+Bo[0],t+"-"+Bo[1]),[]),nt=Math.min,le=Math.max,At=Math.round,Zt=Math.floor,Pe=e=>({x:e,y:e}),Ff={left:"right",right:"left",bottom:"top",top:"bottom"},If={start:"end",end:"start"};function Vo(e,t,n){return le(e,nt(t,n))}function lt(e,t){return typeof e=="function"?e(t):e}function Oe(e){return e.split("-")[0]}function Te(e){return e.split("-")[1]}function Hl(e){return e==="x"?"y":"x"}function Vl(e){return e==="y"?"height":"width"}const Nf=new Set(["top","bottom"]);function Ae(e){return Nf.has(Oe(e))?"y":"x"}function Wl(e){return Hl(Ae(e))}function zl(e,t,n){n===void 0&&(n=!1);const r=Te(e),o=Wl(e),i=Vl(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=mn(l)),[l,mn(l)]}function Df(e){const t=mn(e);return[fn(e),t,fn(t)]}function fn(e){return e.replace(/start|end/g,t=>If[t])}const Wo=["left","right"],zo=["right","left"],jf=["top","bottom"],_f=["bottom","top"];function Bf(e,t,n){switch(e){case"top":case"bottom":return n?t?zo:Wo:t?Wo:zo;case"left":case"right":return t?jf:_f;default:return[]}}function Hf(e,t,n,r){const o=Te(e);let i=Bf(Oe(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(fn)))),i}function mn(e){return e.replace(/left|right|bottom|top/g,t=>Ff[t])}function Vf(e){return{top:0,right:0,bottom:0,left:0,...e}}function Wf(e){return typeof e!="number"?Vf(e):{top:e,right:e,bottom:e,left:e}}function pn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Uo(e,t,n){let{reference:r,floating:o}=e;const i=Ae(t),l=Wl(t),s=Vl(l),a=Oe(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[s]/2-o[s]/2;let d;switch(a){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(Te(t)){case"start":d[l]-=h*(n&&c?-1:1);break;case"end":d[l]+=h*(n&&c?-1:1);break}return d}const zf=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Uo(c,r,a),h=r,d={},g=0;for(let v=0;v<s.length;v++){const{name:b,fn:w}=s[v],{x:y,y:x,data:S,reset:R}=await w({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:d,rects:c,platform:l,elements:{reference:e,floating:t}});u=y??u,f=x??f,d={...d,[b]:{...d[b],...S}},R&&g<=50&&(g++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(c=R.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:u,y:f}=Uo(c,h,a)),v=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:d}};async function Ht(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=lt(t,e),g=Wf(d),b=s[h?f==="floating"?"reference":"floating":f],w=pn(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:a})),y=f==="floating"?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},R=pn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:a}):y);return{top:(w.top-R.top+g.top)/S.y,bottom:(R.bottom-w.bottom+g.bottom)/S.y,left:(w.left-R.left+g.left)/S.x,right:(R.right-w.right+g.right)/S.x}}function Uf(e,t,n){return(e?[...n.filter(o=>Te(o)===e),...n.filter(o=>Te(o)!==e)]:n.filter(o=>Oe(o)===o)).filter(o=>e?Te(o)===e||(t?fn(o)!==o:!1):!0)}const qf=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:l,placement:s,platform:a,elements:c}=t,{crossAxis:u=!1,alignment:f,allowedPlacements:h=Ho,autoAlignment:d=!0,...g}=lt(e,t),v=f!==void 0||h===Ho?Uf(f||null,d,h):h,b=await Ht(t,g),w=((n=l.autoPlacement)==null?void 0:n.index)||0,y=v[w];if(y==null)return{};const x=zl(y,i,await(a.isRTL==null?void 0:a.isRTL(c.floating)));if(s!==y)return{reset:{placement:v[0]}};const S=[b[Oe(y)],b[x[0]],b[x[1]]],R=[...((r=l.autoPlacement)==null?void 0:r.overflows)||[],{placement:y,overflows:S}],P=v[w+1];if(P)return{data:{index:w+1,overflows:R},reset:{placement:P}};const T=R.map($=>{const D=Te($.placement);return[$.placement,D&&u?$.overflows.slice(0,2).reduce((W,z)=>W+z,0):$.overflows[0],$.overflows]}).sort(($,D)=>$[1]-D[1]),F=((o=T.filter($=>$[2].slice(0,Te($[0])?2:3).every(D=>D<=0))[0])==null?void 0:o[0])||T[0][0];return F!==s?{data:{index:w+1,overflows:R},reset:{placement:F}}:{}}}},Gf=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...b}=lt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=Oe(o),y=Ae(s),x=Oe(s)===s,S=await(a.isRTL==null?void 0:a.isRTL(c.floating)),R=h||(x||!v?[mn(s)]:Df(s)),P=g!=="none";!h&&P&&R.push(...Hf(s,v,g,S));const T=[s,...R],k=await Ht(t,b),F=[];let $=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&F.push(k[w]),f){const O=zl(o,l,S);F.push(k[O[0]],k[O[1]])}if($=[...$,{placement:o,overflows:F}],!F.every(O=>O<=0)){var D,W;const O=(((D=i.flip)==null?void 0:D.index)||0)+1,A=T[O];if(A&&(!(f==="alignment"?y!==Ae(A):!1)||$.every(E=>Ae(E.placement)===y?E.overflows[0]>0:!0)))return{data:{index:O,overflows:$},reset:{placement:A}};let _=(W=$.filter(L=>L.overflows[0]<=0).sort((L,E)=>L.overflows[1]-E.overflows[1])[0])==null?void 0:W.placement;if(!_)switch(d){case"bestFit":{var z;const L=(z=$.filter(E=>{if(P){const M=Ae(E.placement);return M===y||M==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(M=>M>0).reduce((M,V)=>M+V,0)]).sort((E,M)=>E[1]-M[1])[0])==null?void 0:z[0];L&&(_=L);break}case"initialPlacement":_=s;break}if(o!==_)return{reset:{placement:_}}}return{}}}},Kf=new Set(["left","top"]);async function Yf(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Oe(n),s=Te(n),a=Ae(n)==="y",c=Kf.has(l)?-1:1,u=i&&a?-1:1,f=lt(t,e);let{mainAxis:h,crossAxis:d,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof g=="number"&&(d=s==="end"?g*-1:g),a?{x:d*u,y:h*c}:{x:h*c,y:d*u}}const Xf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:l,middlewareData:s}=t,a=await Yf(t,e);return l===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+a.x,y:i+a.y,data:{...a,placement:l}}}}},Zf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:b=>{let{x:w,y}=b;return{x:w,y}}},...a}=lt(e,t),c={x:n,y:r},u=await Ht(t,a),f=Ae(Oe(o)),h=Hl(f);let d=c[h],g=c[f];if(i){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",y=d+u[b],x=d-u[w];d=Vo(y,d,x)}if(l){const b=f==="y"?"top":"left",w=f==="y"?"bottom":"right",y=g+u[b],x=g-u[w];g=Vo(y,g,x)}const v=s.fn({...t,[h]:d,[f]:g});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:i,[f]:l}}}}}},Jf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:l,elements:s}=t,{apply:a=()=>{},...c}=lt(e,t),u=await Ht(t,c),f=Oe(o),h=Te(o),d=Ae(o)==="y",{width:g,height:v}=i.floating;let b,w;f==="top"||f==="bottom"?(b=f,w=h===(await(l.isRTL==null?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(w=f,b=h==="end"?"top":"bottom");const y=v-u.top-u.bottom,x=g-u.left-u.right,S=nt(v-u[b],y),R=nt(g-u[w],x),P=!t.middlewareData.shift;let T=S,k=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=y),P&&!h){const $=le(u.left,0),D=le(u.right,0),W=le(u.top,0),z=le(u.bottom,0);d?k=g-2*($!==0||D!==0?$+D:le(u.left,u.right)):T=v-2*(W!==0||z!==0?W+z:le(u.top,u.bottom))}await a({...t,availableWidth:k,availableHeight:T});const F=await l.getDimensions(s.floating);return g!==F.width||v!==F.height?{reset:{rects:!0}}:{}}}};function Ul(e){const t=Ee(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ge(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=At(n)!==i||At(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function Kr(e){return K(e)?e:e.contextElement}function mt(e){const t=Kr(e);if(!ge(t))return Pe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Ul(t);let l=(i?At(n.width):n.width)/r,s=(i?At(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const Qf=Pe(0);function ql(e){const t=me(e);return!$n()||!t.visualViewport?Qf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function em(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==me(e)?!1:t}function rt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Kr(e);let l=Pe(1);t&&(r?K(r)&&(l=mt(r)):l=mt(e));const s=em(i,n,r)?ql(i):Pe(0);let a=(o.left+s.x)/l.x,c=(o.top+s.y)/l.y,u=o.width/l.x,f=o.height/l.y;if(i){const h=me(i),d=r&&K(r)?me(r):r;let g=h,v=xr(g);for(;v&&r&&d!==g;){const b=mt(v),w=v.getBoundingClientRect(),y=Ee(v),x=w.left+(v.clientLeft+parseFloat(y.paddingLeft))*b.x,S=w.top+(v.clientTop+parseFloat(y.paddingTop))*b.y;a*=b.x,c*=b.y,u*=b.x,f*=b.y,a+=x,c+=S,g=me(v),v=xr(g)}}return pn({width:u,height:f,x:a,y:c})}function Pn(e,t){const n=kn(e).scrollLeft;return t?t.left+n:rt(Le(e)).left+n}function Gl(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Pn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function tm(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",l=Le(r),s=t?Sn(t.floating):!1;if(r===l||s&&i)return n;let a={scrollLeft:0,scrollTop:0},c=Pe(1);const u=Pe(0),f=ge(r);if((f||!f&&!i)&&((xt(r)!=="body"||Bt(l))&&(a=kn(r)),ge(r))){const d=rt(r);c=mt(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}const h=l&&!f&&!i?Gl(l,a):Pe(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-a.scrollTop*c.y+u.y+h.y}}function nm(e){return Array.from(e.getClientRects())}function rm(e){const t=Le(e),n=kn(e),r=e.ownerDocument.body,o=le(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=le(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Pn(e);const s=-n.scrollTop;return Ee(r).direction==="rtl"&&(l+=le(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}const qo=25;function om(e,t){const n=me(e),r=Le(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const u=$n();(!u||u&&t==="fixed")&&(s=o.offsetLeft,a=o.offsetTop)}const c=Pn(r);if(c<=0){const u=r.ownerDocument,f=u.body,h=getComputedStyle(f),d=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,g=Math.abs(r.clientWidth-f.clientWidth-d);g<=qo&&(i-=g)}else c<=qo&&(i+=c);return{width:i,height:l,x:s,y:a}}const im=new Set(["absolute","fixed"]);function lm(e,t){const n=rt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ge(e)?mt(e):Pe(1),l=e.clientWidth*i.x,s=e.clientHeight*i.y,a=o*i.x,c=r*i.y;return{width:l,height:s,x:a,y:c}}function Go(e,t,n){let r;if(t==="viewport")r=om(e,n);else if(t==="document")r=rm(Le(e));else if(K(t))r=lm(t,n);else{const o=ql(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return pn(r)}function Kl(e,t){const n=je(e);return n===t||!K(n)||Ie(n)?!1:Ee(n).position==="fixed"||Kl(n,t)}function sm(e,t){const n=t.get(e);if(n)return n;let r=Ke(e,[],!1).filter(s=>K(s)&&xt(s)!=="body"),o=null;const i=Ee(e).position==="fixed";let l=i?je(e):e;for(;K(l)&&!Ie(l);){const s=Ee(l),a=Gr(l);!a&&s.position==="fixed"&&(o=null),(i?!a&&!o:!a&&s.position==="static"&&!!o&&im.has(o.position)||Bt(l)&&!a&&Kl(e,l))?r=r.filter(u=>u!==l):o=s,l=je(l)}return t.set(e,r),r}function am(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?Sn(t)?[]:sm(t,this._c):[].concat(n),r],s=l[0],a=l.reduce((c,u)=>{const f=Go(t,u,o);return c.top=le(f.top,c.top),c.right=nt(f.right,c.right),c.bottom=nt(f.bottom,c.bottom),c.left=le(f.left,c.left),c},Go(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function cm(e){const{width:t,height:n}=Ul(e);return{width:t,height:n}}function um(e,t,n){const r=ge(t),o=Le(t),i=n==="fixed",l=rt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=Pe(0);function c(){a.x=Pn(o)}if(r||!r&&!i)if((xt(t)!=="body"||Bt(o))&&(s=kn(t)),r){const d=rt(t,!0,i,t);a.x=d.x+t.clientLeft,a.y=d.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?Gl(o,s):Pe(0),f=l.left+s.scrollLeft-a.x-u.x,h=l.top+s.scrollTop-a.y-u.y;return{x:f,y:h,width:l.width,height:l.height}}function Yn(e){return Ee(e).position==="static"}function Ko(e,t){if(!ge(e)||Ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Le(e)===n&&(n=n.ownerDocument.body),n}function Yl(e,t){const n=me(e);if(Sn(e))return n;if(!ge(e)){let o=je(e);for(;o&&!Ie(o);){if(K(o)&&!Yn(o))return o;o=je(o)}return n}let r=Ko(e,t);for(;r&&Sf(r)&&Yn(r);)r=Ko(r,t);return r&&Ie(r)&&Yn(r)&&!Gr(r)?n:r||Of(e)||n}const dm=async function(e){const t=this.getOffsetParent||Yl,n=this.getDimensions,r=await n(e.floating);return{reference:um(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fm(e){return Ee(e).direction==="rtl"}const mm={convertOffsetParentRelativeRectToViewportRelativeRect:tm,getDocumentElement:Le,getClippingRect:am,getOffsetParent:Yl,getElementRects:dm,getClientRects:nm,getDimensions:cm,getScale:mt,isElement:K,isRTL:fm};function Xl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pm(e,t){let n=null,r;const o=Le(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function l(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:h,height:d}=c;if(s||t(),!h||!d)return;const g=Zt(f),v=Zt(o.clientWidth-(u+h)),b=Zt(o.clientHeight-(f+d)),w=Zt(u),x={rootMargin:-g+"px "+-v+"px "+-b+"px "+-w+"px",threshold:le(0,nt(1,a))||1};let S=!0;function R(P){const T=P[0].intersectionRatio;if(T!==a){if(!S)return l();T?l(!1,T):r=setTimeout(()=>{l(!1,1e-7)},1e3)}T===1&&!Xl(c,e.getBoundingClientRect())&&l(),S=!1}try{n=new IntersectionObserver(R,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(R,x)}n.observe(e)}return l(!0),i}function hm(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,c=Kr(e),u=o||i?[...c?Ke(c):[],...Ke(t)]:[];u.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const f=c&&s?pm(c,n):null;let h=-1,d=null;l&&(d=new ResizeObserver(w=>{let[y]=w;y&&y.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=d)==null||x.observe(t)})),n()}),c&&!a&&d.observe(c),d.observe(t));let g,v=a?rt(e):null;a&&b();function b(){const w=rt(e);v&&!Xl(v,w)&&n(),v=w,g=requestAnimationFrame(b)}return n(),()=>{var w;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f?.(),(w=d)==null||w.disconnect(),d=null,a&&cancelAnimationFrame(g)}}const Xn=Ht,gm=Xf,vm=qf,bm=Zf,wm=Gf,xm=Jf,ym=(e,t,n)=>{const r=new Map,o={platform:mm,...n},i={...o.platform,_c:r};return zf(e,t,{...o,platform:i})};var Em=typeof document<"u",Cm=function(){},nn=Em?p.useLayoutEffect:Cm;function hn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!hn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!hn(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Zl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yo(e,t){const n=Zl(e);return Math.round(t*n)/n}function Zn(e){const t=m.useRef(e);return nn(()=>{t.current=e}),t}function Jl(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:s=!0,whileElementsMounted:a,open:c}=e,[u,f]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,d]=m.useState(r);hn(h,r)||d(r);const[g,v]=m.useState(null),[b,w]=m.useState(null),y=m.useCallback(E=>{E!==P.current&&(P.current=E,v(E))},[]),x=m.useCallback(E=>{E!==T.current&&(T.current=E,w(E))},[]),S=i||g,R=l||b,P=m.useRef(null),T=m.useRef(null),k=m.useRef(u),F=a!=null,$=Zn(a),D=Zn(o),W=Zn(c),z=m.useCallback(()=>{if(!P.current||!T.current)return;const E={placement:t,strategy:n,middleware:h};D.current&&(E.platform=D.current),ym(P.current,T.current,E).then(M=>{const V={...M,isPositioned:W.current!==!1};O.current&&!hn(k.current,V)&&(k.current=V,sn.flushSync(()=>{f(V)}))})},[h,t,n,D,W]);nn(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,f(E=>({...E,isPositioned:!1})))},[c]);const O=m.useRef(!1);nn(()=>(O.current=!0,()=>{O.current=!1}),[]),nn(()=>{if(S&&(P.current=S),R&&(T.current=R),S&&R){if($.current)return $.current(S,R,z);z()}},[S,R,z,$,F]);const A=m.useMemo(()=>({reference:P,floating:T,setReference:y,setFloating:x}),[y,x]),_=m.useMemo(()=>({reference:S,floating:R}),[S,R]),L=m.useMemo(()=>{const E={position:n,left:0,top:0};if(!_.floating)return E;const M=Yo(_.floating,u.x),V=Yo(_.floating,u.y);return s?{...E,transform:"translate("+M+"px, "+V+"px)",...Zl(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:V}},[n,s,_.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:z,refs:A,elements:_,floatingStyles:L}),[u,z,A,_,L])}const Yr=(e,t)=>({...gm(e),options:[e,t]}),Ql=(e,t)=>({...bm(e),options:[e,t]}),Rm=(e,t)=>({...wm(e),options:[e,t]}),Sm=(e,t)=>({...xm(e),options:[e,t]}),$m=(e,t)=>({...vm(e),options:[e,t]}),es={...m},km=es.useInsertionEffect,Pm=km||(e=>e());function ts(e){const t=m.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Pm(()=>{t.current=e}),m.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var yr=typeof document<"u"?p.useLayoutEffect:p.useEffect;let Xo=!1,Tm=0;const Zo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Tm++;function Om(){const[e,t]=m.useState(()=>Xo?Zo():void 0);return yr(()=>{e==null&&t(Zo())},[]),m.useEffect(()=>{Xo=!0},[]),e}const Lm=es.useId,Mm=Lm||Om;let Ft;process.env.NODE_ENV!=="production"&&(Ft=new Set);function Am(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Ft)!=null&&e.has(o))){var i;(i=Ft)==null||i.add(o),console.warn(o)}}function Fm(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Ft)!=null&&e.has(o))){var i;(i=Ft)==null||i.add(o),console.error(o)}}function Im(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const Nm=m.createContext(null),Dm=m.createContext(null),jm=()=>{var e;return((e=m.useContext(Nm))==null?void 0:e.id)||null},_m=()=>m.useContext(Dm),Bm="data-floating-ui-focusable";function Hm(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Mm(),i=m.useRef({}),[l]=m.useState(()=>Im()),s=jm()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!K(d)&&Fm("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,c]=m.useState(r.reference),u=ts((d,g,v)=>{i.current.openEvent=d?g:void 0,l.emit("openchange",{open:d,event:g,reason:v,nested:s}),n?.(d,g,v)}),f=m.useMemo(()=>({setPositionReference:c}),[]),h=m.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return m.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:l,floatingId:o,refs:f}),[t,u,h,l,o,f])}function Vm(e){e===void 0&&(e={});const{nodeId:t}=e,n=Hm({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,l]=m.useState(null),[s,a]=m.useState(null),u=o?.domReference||i,f=m.useRef(null),h=_m();yr(()=>{u&&(f.current=u)},[u]);const d=Jl({...e,elements:{...o,...s&&{reference:s}}}),g=m.useCallback(x=>{const S=K(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;a(S),d.refs.setReference(S)},[d.refs]),v=m.useCallback(x=>{(K(x)||x===null)&&(f.current=x,l(x)),(K(d.refs.reference.current)||d.refs.reference.current===null||x!==null&&!K(x))&&d.refs.setReference(x)},[d.refs]),b=m.useMemo(()=>({...d.refs,setReference:v,setPositionReference:g,domReference:f}),[d.refs,v,g]),w=m.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),y=m.useMemo(()=>({...d,...r,refs:b,elements:w,nodeId:t}),[d,b,w,t,r]);return yr(()=>{r.dataRef.current.floatingContext=y;const x=h?.nodesRef.current.find(S=>S.id===t);x&&(x.context=y)}),m.useMemo(()=>({...d,context:y,refs:b,elements:w}),[d,b,w,y])}const Jo="active",Qo="selected";function Jn(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Jo]:l,[Qo]:s,...a}=e;i=a}return{...n==="floating"&&{tabIndex:-1,[Bm]:""},...i,...t.map(l=>{const s=l?l[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((l,s)=>(s&&Object.entries(s).forEach(a=>{let[c,u]=a;if(!(o&&[Jo,Qo].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),l[c]=function(){for(var h,d=arguments.length,g=new Array(d),v=0;v<d;v++)g[v]=arguments[v];return(h=r.get(c))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else l[c]=u}),l),{})}}function Wm(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=m.useCallback(s=>Jn(s,e,"reference"),t),i=m.useCallback(s=>Jn(s,e,"floating"),n),l=m.useCallback(s=>Jn(s,e,"item"),r);return m.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:l}),[o,i,l])}function ei(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}const zm=e=>({name:"inner",options:e,async fn(t){const{listRef:n,overflowRef:r,onFallbackChange:o,offset:i=0,index:l=0,minItemsVisible:s=4,referenceOverflowThreshold:a=0,scrollRef:c,...u}=lt(e,t),{rects:f,elements:{floating:h}}=t,d=n.current[l],g=c?.current||h,v=h.clientTop||g.clientTop,b=h.clientTop!==0,w=g.clientTop!==0,y=h===g;if(process.env.NODE_ENV!=="production"&&(t.placement.startsWith("bottom")||Am('`placement` side must be "bottom" when using the `inner`',"middleware.")),!d)return{};const x={...t,...await Yr(-d.offsetTop-h.clientTop-f.reference.height/2-d.offsetHeight/2-i).fn(t)},S=await Xn(ei(x,g.scrollHeight+v+h.clientTop),u),R=await Xn(x,{...u,elementContext:"reference"}),P=le(0,S.top),T=x.y+P,$=(g.scrollHeight>g.clientHeight?D=>D:At)(le(0,g.scrollHeight+(b&&y||w?v*2:0)-P-le(0,S.bottom)));if(g.style.maxHeight=$+"px",g.scrollTop=P,o){const D=g.offsetHeight<d.offsetHeight*nt(s,n.current.length)-1||R.top>=-a||R.bottom>=-a;sn.flushSync(()=>o(D))}return r&&(r.current=await Xn(ei({...x,y:T},g.offsetHeight+v+h.clientTop),u)),{y:T}}});function Um(e,t){const{open:n,elements:r}=e,{enabled:o=!0,overflowRef:i,scrollRef:l,onChange:s}=t,a=ts(s),c=m.useRef(!1),u=m.useRef(null),f=m.useRef(null);m.useEffect(()=>{if(!o)return;function d(v){if(v.ctrlKey||!g||i.current==null)return;const b=v.deltaY,w=i.current.top>=-.5,y=i.current.bottom>=-.5,x=g.scrollHeight-g.clientHeight,S=b<0?-1:1,R=b<0?"max":"min";g.scrollHeight<=g.clientHeight||(!w&&b>0||!y&&b<0?(v.preventDefault(),sn.flushSync(()=>{a(P=>P+Math[R](b,x*S))})):/firefox/i.test(Mf())&&(g.scrollTop+=b))}const g=l?.current||r.floating;if(n&&g)return g.addEventListener("wheel",d),requestAnimationFrame(()=>{u.current=g.scrollTop,i.current!=null&&(f.current={...i.current})}),()=>{u.current=null,f.current=null,g.removeEventListener("wheel",d)}},[o,n,r.floating,i,l,a]);const h=m.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){const d=l?.current||r.floating;if(!(!i.current||!d||!c.current)){if(u.current!==null){const g=d.scrollTop-u.current;(i.current.bottom<-.5&&g<-1||i.current.top<-.5&&g>1)&&sn.flushSync(()=>a(v=>v+g))}requestAnimationFrame(()=>{u.current=d.scrollTop})}}}),[r.floating,a,i,l]);return m.useMemo(()=>o?{floating:h}:{},[o,h])}let yt=p.createContext({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});yt.displayName="FloatingContext";let Xr=p.createContext(null);Xr.displayName="PlacementContext";function qm(e){return p.useMemo(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Gm(){return p.useContext(yt).setReference}function Km(){return p.useContext(yt).getReferenceProps}function Ym(){let{getFloatingProps:e,slot:t}=p.useContext(yt);return p.useCallback((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Xm(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=p.useContext(Xr),n=p.useMemo(()=>e,[JSON.stringify(e,(o,i)=>{var l;return(l=i?.outerHTML)!=null?l:i})]);te(()=>{t?.(n??null)},[t,n]);let r=p.useContext(yt);return p.useMemo(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}let ti=4;function Zm({children:e,enabled:t=!0}){let[n,r]=p.useState(null),[o,i]=p.useState(0),l=p.useRef(null),[s,a]=p.useState(null);Jm(s);let c=t&&n!==null&&s!==null,{to:u="bottom",gap:f=0,offset:h=0,padding:d=0,inner:g}=Qm(n,s),[v,b="center"]=u.split(" ");te(()=>{c&&i(0)},[c]);let{refs:w,floatingStyles:y,context:x}=Vm({open:c,placement:v==="selection"?b==="center"?"bottom":`bottom-${b}`:b==="center"?`${v}`:`${v}-${b}`,strategy:"absolute",transform:!1,middleware:[Yr({mainAxis:v==="selection"?0:f,crossAxis:h}),Ql({padding:d}),v!=="selection"&&Rm({padding:d}),v==="selection"&&g?zm({...g,padding:d,overflowRef:l,offset:o,minItemsVisible:ti,referenceOverflowThreshold:d,onFallbackChange(D){var W,z;if(!D)return;let O=x.elements.floating;if(!O)return;let A=parseFloat(getComputedStyle(O).scrollPaddingBottom)||0,_=Math.min(ti,O.childElementCount),L=0,E=0;for(let M of(z=(W=x.elements.floating)==null?void 0:W.childNodes)!=null?z:[])if(Ve(M)){let V=M.offsetTop,X=V+M.clientHeight+A,B=O.scrollTop,j=B+O.clientHeight;if(V>=B&&X<=j)_--;else{E=Math.max(0,Math.min(X,j)-Math.max(V,B)),L=M.clientHeight;break}}_>=1&&i(M=>{let V=L*_-E+A;return M>=V?M:V})}}):null,Sm({padding:d,apply({availableWidth:D,availableHeight:W,elements:z}){Object.assign(z.floating.style,{overflow:"auto",maxWidth:`${D}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${W}px)`})}})].filter(Boolean),whileElementsMounted:hm}),[S=v,R=b]=x.placement.split("-");v==="selection"&&(S="selection");let P=p.useMemo(()=>({anchor:[S,R].filter(Boolean).join(" ")}),[S,R]),T=Um(x,{overflowRef:l,onChange:i}),{getReferenceProps:k,getFloatingProps:F}=Wm([T]),$=q(D=>{a(D),w.setFloating(D)});return m.createElement(Xr.Provider,{value:r},m.createElement(yt.Provider,{value:{setFloating:$,setReference:w.setReference,styles:y,getReferenceProps:k,getFloatingProps:F,slot:P}},e))}function Jm(e){te(()=>{if(!e)return;let t=new MutationObserver(()=>{let n=window.getComputedStyle(e).maxHeight,r=parseFloat(n);if(isNaN(r))return;let o=parseInt(n);isNaN(o)||r!==o&&(e.style.maxHeight=`${Math.ceil(r)}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function Qm(e,t){var n,r,o;let i=Qn((n=e?.gap)!=null?n:"var(--anchor-gap, 0)",t),l=Qn((r=e?.offset)!=null?r:"var(--anchor-offset, 0)",t),s=Qn((o=e?.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:l,padding:s}}function Qn(e,t,n=void 0){let r=ot(),o=q((a,c)=>{if(a==null)return[n,null];if(typeof a=="number")return[a,null];if(typeof a=="string"){if(!c)return[n,null];let u=ni(a,c);return[u,f=>{let h=ns(a);{let d=h.map(g=>window.getComputedStyle(c).getPropertyValue(g));r.requestAnimationFrame(function g(){r.nextFrame(g);let v=!1;for(let[w,y]of h.entries()){let x=window.getComputedStyle(c).getPropertyValue(y);if(d[w]!==x){d[w]=x,v=!0;break}}if(!v)return;let b=ni(a,c);u!==b&&(f(b),u=b)})}return r.dispose}]}return[n,null]}),i=p.useMemo(()=>o(e,t)[0],[e,t]),[l=i,s]=p.useState();return te(()=>{let[a,c]=o(e,t);if(s(a),!!c)return c(s)},[e,t]),l}function ns(e){let t=/var\((.*)\)/.exec(e);if(t){let n=t[1].indexOf(",");if(n===-1)return[t[1]];let r=t[1].slice(0,n).trim(),o=t[1].slice(n+1).trim();return o?[r,...ns(o)]:[r]}return[]}function ni(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function ep({children:e,freeze:t},n){let r=rs(t,e);return p.isValidElement(r)?p.cloneElement(r,{ref:n}):p.createElement(p.Fragment,null,r)}p.forwardRef(ep);function rs(e,t){let[n,r]=p.useState(t);return!e&&n!==t&&r(t),e?n:t}let Tn=p.createContext(null);Tn.displayName="OpenClosedContext";var ae=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ae||{});function On(){return p.useContext(Tn)}function Zr({value:e,children:t}){return p.createElement(Tn.Provider,{value:e},t)}function tp({children:e}){return p.createElement(Tn.Provider,{value:null},e)}function np(e){throw new Error("Unexpected object: "+e)}var Q=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Q||{});function Jt(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),o=r??-1;switch(e.focus){case 0:{for(let i=0;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 1:{o===-1&&(o=n.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 2:{for(let i=o+1;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 3:{for(let i=n.length-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 4:{for(let i=0;i<n.length;++i)if(t.resolveId(n[i],i,n)===e.id)return i;return r}case 5:return null;default:np(e)}}function os(e){let t=q(e),n=p.useRef(!1);p.useEffect(()=>(n.current=!1,()=>{n.current=!0,fl(()=>{n.current&&t()})}),[t])}let rp=p.createContext(!1);function op(){return p.useContext(rp)}function ip(e){let t=op(),n=p.useContext(ls),[r,o]=p.useState(()=>{var i;if(!t&&n!==null)return(i=n.current)!=null?i:null;if(ke.isServer)return null;let l=e?.getElementById("headlessui-portal-root");if(l)return l;if(e===null)return null;let s=e.createElement("div");return s.setAttribute("id","headlessui-portal-root"),e.body.appendChild(s)});return p.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),p.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),r}let is=p.Fragment,lp=re(function(e,t){let{ownerDocument:n=null,...r}=e,o=p.useRef(null),i=ue(Cl(h=>{o.current=h}),t),l=br(o.current),s=n??l,a=ip(s),c=p.useContext(up),u=ot(),f=ie();return os(()=>{var h;a&&a.childNodes.length<=0&&((h=a.parentElement)==null||h.removeChild(a))}),a?Ye.createPortal(p.createElement("div",{"data-headlessui-portal":"",ref:h=>{u.dispose(),c&&h&&u.add(c.register(h))}},f({ourProps:{ref:i},theirProps:r,slot:{},defaultTag:is,name:"Portal"})),a):null});function sp(e,t){let n=ue(t),{enabled:r=!0,ownerDocument:o,...i}=e,l=ie();return r?p.createElement(lp,{...i,ownerDocument:o,ref:n}):l({ourProps:{ref:n},theirProps:i,slot:{},defaultTag:is,name:"Portal"})}let ap=p.Fragment,ls=p.createContext(null);function cp(e,t){let{target:n,...r}=e,o={ref:ue(t)},i=ie();return p.createElement(ls.Provider,{value:n},i({ourProps:o,theirProps:r,defaultTag:ap,name:"Popover.Group"}))}let up=p.createContext(null),dp=re(sp),fp=re(cp),mp=Object.assign(dp,{Group:fp});const rn={Idle:{kind:"Idle"},Tracked:e=>({kind:"Tracked",position:e}),Moved:{kind:"Moved"}};function ss(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function pp(e,t,n){let r=ve();if(t.kind==="Tracked"){let o=function(){i!==ss(e)&&(r.dispose(),n())},{position:i}=t,l=new ResizeObserver(o);l.observe(e),r.add(()=>l.disconnect()),r.addEventListener(window,"scroll",o,{passive:!0}),r.addEventListener(window,"resize",o)}return()=>r.dispose()}function hp(){let e=typeof document>"u";return"useSyncExternalStore"in m?(t=>t.useSyncExternalStore)(m)(()=>()=>{},()=>!1,()=>!e):!1}function as(){let e=hp(),[t,n]=m.useState(ke.isHandoffComplete);return t&&ke.isHandoffComplete===!1&&n(!1),m.useEffect(()=>{t!==!0&&n(!0)},[t]),m.useEffect(()=>ke.handoff(),[]),e?!1:t}function gp(){let e=p.useRef(!1);return te(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function cs(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!ft((t=e.as)!=null?t:ds)||p.Children.count(e.children)===1}let Ln=p.createContext(null);Ln.displayName="TransitionContext";var vp=(e=>(e.Visible="visible",e.Hidden="hidden",e))(vp||{});function bp(){let e=p.useContext(Ln);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function wp(){let e=p.useContext(Mn);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Mn=p.createContext(null);Mn.displayName="NestingContext";function An(e){return"children"in e?An(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function us(e,t){let n=it(e),r=p.useRef([]),o=gp(),i=ot(),l=q((d,g=Ue.Hidden)=>{let v=r.current.findIndex(({el:b})=>b===d);v!==-1&&(ce(g,{[Ue.Unmount](){r.current.splice(v,1)},[Ue.Hidden](){r.current[v].state="hidden"}}),i.microTask(()=>{var b;!An(r)&&o.current&&((b=n.current)==null||b.call(n))}))}),s=q(d=>{let g=r.current.find(({el:v})=>v===d);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:d,state:"visible"}),()=>l(d,Ue.Unmount)}),a=p.useRef([]),c=p.useRef(Promise.resolve()),u=p.useRef({enter:[],leave:[]}),f=q((d,g,v)=>{a.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([b])=>b!==d)),t?.chains.current[g].push([d,new Promise(b=>{a.current.push(b)})]),t?.chains.current[g].push([d,new Promise(b=>{Promise.all(u.current[g].map(([w,y])=>y)).then(()=>b())})]),g==="enter"?c.current=c.current.then(()=>t?.wait.current).then(()=>v(g)):v(g)}),h=q((d,g,v)=>{Promise.all(u.current[g].splice(0).map(([b,w])=>w)).then(()=>{var b;(b=a.current.shift())==null||b()}).then(()=>v(g))});return p.useMemo(()=>({children:r,register:s,unregister:l,onStart:f,onStop:h,wait:c,chains:u}),[s,l,r,f,h,u,c])}let ds=p.Fragment,fs=pt.RenderStrategy;function xp(e,t){var n,r;let{transition:o=!0,beforeEnter:i,afterEnter:l,beforeLeave:s,afterLeave:a,enter:c,enterFrom:u,enterTo:f,entered:h,leave:d,leaveFrom:g,leaveTo:v,...b}=e,[w,y]=p.useState(null),x=p.useRef(null),S=cs(e),R=ue(...S?[x,t,y]:t===null?[]:[t]),P=(n=b.unmount)==null||n?Ue.Unmount:Ue.Hidden,{show:T,appear:k,initial:F}=bp(),[$,D]=p.useState(T?"visible":"hidden"),W=wp(),{register:z,unregister:O}=W;te(()=>z(x),[z,x]),te(()=>{if(P===Ue.Hidden&&x.current){if(T&&$!=="visible"){D("visible");return}return ce($,{hidden:()=>O(x),visible:()=>z(x)})}},[$,x,z,O,T,P]);let A=as();te(()=>{if(S&&A&&$==="visible"&&x.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[x,$,A,S]);let _=F&&!k,L=k&&T&&F,E=p.useRef(!1),M=us(()=>{E.current||(D("hidden"),O(x))},W),V=q(G=>{E.current=!0;let pe=G?"enter":"leave";M.onStart(x,pe,de=>{de==="enter"?i?.():de==="leave"&&s?.()})}),X=q(G=>{let pe=G?"enter":"leave";E.current=!1,M.onStop(x,pe,de=>{de==="enter"?l?.():de==="leave"&&a?.()}),pe==="leave"&&!An(M)&&(D("hidden"),O(x))});p.useEffect(()=>{S&&o||(V(T),X(T))},[T,S,o]);let B=!(!o||!S||!A||_),[,j]=Ur(B,w,T,{start:V,end:X}),ee=ze({ref:R,className:((r=mr(b.className,L&&c,L&&u,j.enter&&c,j.enter&&j.closed&&u,j.enter&&!j.closed&&f,j.leave&&d,j.leave&&!j.closed&&g,j.leave&&j.closed&&v,!j.transition&&T&&h))==null?void 0:r.trim())||void 0,...zr(j)}),Y=0;$==="visible"&&(Y|=ae.Open),$==="hidden"&&(Y|=ae.Closed),T&&$==="hidden"&&(Y|=ae.Opening),!T&&$==="visible"&&(Y|=ae.Closing);let H=ie();return p.createElement(Mn.Provider,{value:M},p.createElement(Zr,{value:Y},H({ourProps:ee,theirProps:b,defaultTag:ds,features:fs,visible:$==="visible",name:"Transition.Child"})))}function yp(e,t){let{show:n,appear:r=!1,unmount:o=!0,...i}=e,l=p.useRef(null),s=cs(e),a=ue(...s?[l,t]:t===null?[]:[t]);as();let c=On();if(n===void 0&&c!==null&&(n=(c&ae.Open)===ae.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,f]=p.useState(n?"visible":"hidden"),h=us(()=>{n||f("hidden")}),[d,g]=p.useState(!0),v=p.useRef([n]);te(()=>{d!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),g(!1))},[v,n]);let b=p.useMemo(()=>({show:n,appear:r,initial:d}),[n,r,d]);te(()=>{n?f("visible"):!An(h)&&l.current!==null&&f("hidden")},[n,h]);let w={unmount:o},y=q(()=>{var R;d&&g(!1),(R=e.beforeEnter)==null||R.call(e)}),x=q(()=>{var R;d&&g(!1),(R=e.beforeLeave)==null||R.call(e)}),S=ie();return p.createElement(Mn.Provider,{value:h},p.createElement(Ln.Provider,{value:b},S({ourProps:{...w,as:p.Fragment,children:p.createElement(ms,{ref:a,...w,...i,beforeEnter:y,beforeLeave:x})},theirProps:{},defaultTag:p.Fragment,features:fs,visible:u==="visible",name:"Transition"})))}function Ep(e,t){let n=p.useContext(Ln)!==null,r=On()!==null;return p.createElement(p.Fragment,null,!n&&r?p.createElement(Er,{ref:t,...e}):p.createElement(ms,{ref:t,...e}))}let Er=re(yp),ms=re(xp),Cp=re(Ep),Rp=Object.assign(Er,{Child:Cp,Root:Er});var ri;let Sp=(ri=p.startTransition)!=null?ri:function(e){e()};var $p=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))($p||{}),kp=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.SetButtonElement=4]="SetButtonElement",e[e.SetPanelElement=5]="SetPanelElement",e))(kp||{});let Pp={0:e=>({...e,disclosureState:ce(e.disclosureState,{0:1,1:0})}),1:e=>e.disclosureState===1?e:{...e,disclosureState:1},2(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},3(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}},4(e,t){return e.buttonElement===t.element?e:{...e,buttonElement:t.element}},5(e,t){return e.panelElement===t.element?e:{...e,panelElement:t.element}}},Jr=p.createContext(null);Jr.displayName="DisclosureContext";function Qr(e){let t=p.useContext(Jr);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Qr),n}return t}let eo=p.createContext(null);eo.displayName="DisclosureAPIContext";function ps(e){let t=p.useContext(eo);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ps),n}return t}let to=p.createContext(null);to.displayName="DisclosurePanelContext";function Tp(){return p.useContext(to)}function Op(e,t){return ce(t.type,Pp,e,t)}let Lp=p.Fragment;function Mp(e,t){let{defaultOpen:n=!1,...r}=e,o=p.useRef(null),i=ue(t,Cl(v=>{o.current=v},e.as===void 0||ft(e.as))),l=p.useReducer(Op,{disclosureState:n?0:1,buttonElement:null,panelElement:null,buttonId:null,panelId:null}),[{disclosureState:s,buttonId:a},c]=l,u=q(v=>{c({type:1});let b=_t(o.current);if(!b||!a)return;let w=v?qe(v)?v:"current"in v&&qe(v.current)?v.current:b.getElementById(a):b.getElementById(a);w?.focus()}),f=p.useMemo(()=>({close:u}),[u]),h=ye({open:s===0,close:u}),d={ref:i},g=ie();return p.createElement(Jr.Provider,{value:l},p.createElement(eo.Provider,{value:f},p.createElement(Pd,{value:u},p.createElement(Zr,{value:ce(s,{0:ae.Open,1:ae.Closed})},g({ourProps:d,theirProps:r,slot:h,defaultTag:Lp,name:"Disclosure"})))))}let Ap="button";function Fp(e,t){let n=p.useId(),{id:r=`headlessui-disclosure-button-${n}`,disabled:o=!1,autoFocus:i=!1,...l}=e,[s,a]=Qr("Disclosure.Button"),c=Tp(),u=c===null?!1:c===s.panelId,f=p.useRef(null),h=ue(f,t,q(F=>{if(!u)return a({type:4,element:F})}));p.useEffect(()=>{if(!u)return a({type:2,buttonId:r}),()=>{a({type:2,buttonId:null})}},[r,a,u]);let d=q(F=>{var $;if(u){if(s.disclosureState===1)return;switch(F.key){case J.Space:case J.Enter:F.preventDefault(),F.stopPropagation(),a({type:0}),($=s.buttonElement)==null||$.focus();break}}else switch(F.key){case J.Space:case J.Enter:F.preventDefault(),F.stopPropagation(),a({type:0});break}}),g=q(F=>{F.key===J.Space&&F.preventDefault()}),v=q(F=>{var $;pr(F.currentTarget)||o||(u?(a({type:0}),($=s.buttonElement)==null||$.focus()):a({type:0}))}),{isFocusVisible:b,focusProps:w}=jr({autoFocus:i}),{isHovered:y,hoverProps:x}=Dr({isDisabled:o}),{pressed:S,pressProps:R}=_r({disabled:o}),P=ye({open:s.disclosureState===0,hover:y,active:S,disabled:o,focus:b,autofocus:i}),T=_l(e,s.buttonElement),k=Mt(u?{ref:h,type:T,disabled:o||void 0,autoFocus:i,onKeyDown:d,onClick:v}:{ref:h,id:r,type:T,"aria-expanded":s.disclosureState===0,"aria-controls":s.panelElement?s.panelId:void 0,disabled:o||void 0,autoFocus:i,onKeyDown:d,onKeyUp:g,onClick:v},w,x,R);return ie()({ourProps:k,theirProps:l,slot:P,defaultTag:Ap,name:"Disclosure.Button"})}let Ip="div",Np=pt.RenderStrategy|pt.Static;function Dp(e,t){let n=p.useId(),{id:r=`headlessui-disclosure-panel-${n}`,transition:o=!1,...i}=e,[l,s]=Qr("Disclosure.Panel"),{close:a}=ps("Disclosure.Panel"),[c,u]=p.useState(null),f=ue(t,q(y=>{Sp(()=>s({type:5,element:y}))}),u);p.useEffect(()=>(s({type:3,panelId:r}),()=>{s({type:3,panelId:null})}),[r,s]);let h=On(),[d,g]=Ur(o,c,h!==null?(h&ae.Open)===ae.Open:l.disclosureState===0),v=ye({open:l.disclosureState===0,close:a}),b={ref:f,id:r,...zr(g)},w=ie();return p.createElement(tp,null,p.createElement(to.Provider,{value:l.panelId},w({ourProps:b,theirProps:i,slot:v,defaultTag:Ip,features:Np,visible:d,name:"Disclosure.Panel"})))}let jp=re(Mp),hs=re(Fp),gs=re(Dp),_p=Object.assign(jp,{Button:hs,Panel:gs}),oi=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ii(e){var t,n;let r=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!Ve(o))return r;let i=!1;for(let s of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))s.remove(),i=!0;let l=i?(n=o.innerText)!=null?n:"":r;return oi.test(l)&&(l=l.replace(oi,"")),l}function Bp(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(o=>{let i=document.getElementById(o);if(i){let l=i.getAttribute("aria-label");return typeof l=="string"?l.trim():ii(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return ii(e).trim()}function Hp(e){let t=p.useRef(""),n=p.useRef("");return q(()=>{let r=e.current;if(!r)return"";let o=r.innerText;if(t.current===o)return n.current;let i=Bp(r).trim().toLowerCase();return t.current=o,n.current=i,i})}var Vp=Object.defineProperty,Wp=(e,t,n)=>t in e?Vp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,li=(e,t,n)=>(Wp(e,typeof t!="symbol"?t+"":t,n),n),se=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(se||{}),Ge=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Ge||{}),on=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(on||{}),vs=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.SelectOption=5]="SelectOption",e[e.RegisterOptions=6]="RegisterOptions",e[e.UnregisterOptions=7]="UnregisterOptions",e[e.SetButtonElement=8]="SetButtonElement",e[e.SetOptionsElement=9]="SetOptionsElement",e[e.SortOptions=10]="SortOptions",e[e.MarkButtonAsMoved=11]="MarkButtonAsMoved",e))(vs||{});function si(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=Dl(t(e.options.slice()),i=>i.dataRef.current.domRef.current),o=n?r.indexOf(n):null;return o===-1&&(o=null),{options:r,activeOptionIndex:o}}let zp={1(e){if(e.dataRef.current.disabled||e.listboxState===1)return e;let t=e.buttonElement?rn.Tracked(ss(e.buttonElement)):e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:Q.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||e.listboxState===0)return e;let n=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,o=e.options.findIndex(i=>r(i.dataRef.current.value));return o!==-1&&(n=o),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:rn.Idle}},2(e,t){var n,r,o,i,l;if(e.dataRef.current.disabled||e.listboxState===1)return e;let s={...e,searchQuery:"",activationTrigger:(n=t.trigger)!=null?n:1,__demoMode:!1};if(t.focus===Q.Nothing)return{...s,activeOptionIndex:null};if(t.focus===Q.Specific)return{...s,activeOptionIndex:e.options.findIndex(u=>u.id===t.id)};if(t.focus===Q.Previous){let u=e.activeOptionIndex;if(u!==null){let f=e.options[u].dataRef.current.domRef,h=Jt(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});if(h!==null){let d=e.options[h].dataRef.current.domRef;if(((r=f.current)==null?void 0:r.previousElementSibling)===d.current||((o=d.current)==null?void 0:o.previousElementSibling)===null)return{...s,activeOptionIndex:h}}}}else if(t.focus===Q.Next){let u=e.activeOptionIndex;if(u!==null){let f=e.options[u].dataRef.current.domRef,h=Jt(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.current.disabled});if(h!==null){let d=e.options[h].dataRef.current.domRef;if(((i=f.current)==null?void 0:i.nextElementSibling)===d.current||((l=d.current)==null?void 0:l.nextElementSibling)===null)return{...s,activeOptionIndex:h}}}}let a=si(e),c=Jt(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});return{...s,...a,activeOptionIndex:c}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),o=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(l=>{var s;return!l.dataRef.current.disabled&&((s=l.dataRef.current.textValue)==null?void 0:s.startsWith(r))}),i=o?e.options.indexOf(o):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:i,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5(e){return e.dataRef.current.mode===0?{...e,frozenValue:!0}:{...e}},6:(e,t)=>{let n=e.options.concat(t.options),r=e.activeOptionIndex;if(e.pendingFocus.focus!==Q.Nothing&&(r=Jt(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled})),e.activeOptionIndex===null){let{isSelected:o}=e.dataRef.current;if(o){let i=n.findIndex(l=>o?.(l.dataRef.current.value));i!==-1&&(r=i)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:Q.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],o=new Set(t.options);for(let[i,l]of n.entries())if(o.has(l.id)&&(r.push(i),o.delete(l.id),o.size===0))break;if(r.length>0){n=n.slice();for(let i of r.reverse())n.splice(i,1)}return{...e,options:n,activationTrigger:1}},8:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...si(e),pendingShouldSort:!1}:e,11(e){return e.buttonPositionState.kind!=="Tracked"?e:{...e,buttonPositionState:rn.Moved}}};class no extends Ol{constructor(t){super(t),li(this,"actions",{onChange:n=>{let{onChange:r,compare:o,mode:i,value:l}=this.state.dataRef.current;return ce(i,{0:()=>r?.(n),1:()=>{let s=l.slice(),a=s.findIndex(c=>o(c,n));return a===-1?s.push(n):s.splice(a,1),r?.(s)}})},registerOption:qn(()=>{let n=[],r=new Set;return[(o,i)=>{r.has(i)||(r.add(i),n.push({id:o,dataRef:i}))},()=>(r.clear(),this.send({type:6,options:n.splice(0)}))]}),unregisterOption:qn(()=>{let n=[];return[r=>n.push(r),()=>{this.send({type:7,options:n.splice(0)})}]}),goToOption:qn(()=>{let n=null;return[(r,o)=>{n={type:2,...r,trigger:o}},()=>n&&this.send(n)]}),closeListbox:()=>{this.send({type:1})},openListbox:n=>{this.send({type:0,focus:n})},selectActiveOption:()=>{var n;if(this.state.activeOptionIndex!==null){let{dataRef:r}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(r.current.value)}else this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(n=this.state.buttonElement)==null||n.focus({preventScroll:!0}))},selectOption:n=>{this.send({type:5,value:n})},search:n=>{this.send({type:3,value:n})},clearSearch:()=>{this.send({type:4})},setButtonElement:n=>{this.send({type:8,element:n})},setOptionsElement:n=>{this.send({type:9,element:n})}}),li(this,"selectors",{activeDescendantId(n){var r;let o=n.activeOptionIndex,i=n.options;return o===null||(r=i[o])==null?void 0:r.id},isActive(n,r){var o;let i=n.activeOptionIndex,l=n.options;return i!==null?((o=l[i])==null?void 0:o.id)===r:!1},hasFrozenValue(n){return n.frozenValue},shouldScrollIntoView(n,r){return n.__demoMode||n.listboxState!==0||n.activationTrigger===0?!1:this.isActive(n,r)},didButtonMove(n){return n.buttonPositionState.kind==="Moved"}}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let n=this.state.id,r=Vr.get(null);this.disposables.add(r.on(Ml.Push,o=>{!r.selectors.isTop(o,n)&&this.state.listboxState===0&&this.actions.closeListbox()})),this.on(0,()=>r.actions.push(n)),this.on(1,()=>r.actions.pop(n))}this.disposables.group(n=>{this.on(1,r=>{r.buttonElement&&(n.dispose(),n.add(pp(r.buttonElement,r.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(n,r)=>{var o;this.actions.onChange(r.value),this.state.dataRef.current.mode===0&&(this.actions.closeListbox(),(o=this.state.buttonElement)==null||o.focus({preventScroll:!0}))})}static new({id:t,__demoMode:n=!1}){return new no({id:t,dataRef:{current:{}},listboxState:n?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:Q.Nothing},frozenValue:!1,__demoMode:n,buttonPositionState:rn.Idle})}reduce(t,n){return ce(n.type,zp,t,n)}}const bs=p.createContext(null);function ro(e){let t=p.useContext(bs);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ws),n}return t}function ws({id:e,__demoMode:t=!1}){let n=p.useMemo(()=>no.new({id:e,__demoMode:t}),[]);return os(()=>n.dispose()),n}let Fn=p.createContext(null);Fn.displayName="ListboxDataContext";function Vt(e){let t=p.useContext(Fn);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Vt),n}return t}let Up=p.Fragment;function qp(e,t){let n=p.useId(),r=yn(),{value:o,defaultValue:i,form:l,name:s,onChange:a,by:c,invalid:u=!1,disabled:f=r||!1,horizontal:h=!1,multiple:d=!1,__demoMode:g=!1,...v}=e;const b=h?"horizontal":"vertical";let w=ue(t),y=rd(i),[x=d?[]:void 0,S]=nd(o,a,y),R=ws({id:n,__demoMode:g}),P=p.useRef({static:!1,hold:!1}),T=p.useRef(new Map),k=Od(c),F=p.useCallback(B=>ce($.mode,{[Ge.Multi]:()=>x.some(j=>k(j,B)),[Ge.Single]:()=>k(x,B)}),[x]),$=ye({value:x,disabled:f,invalid:u,mode:d?Ge.Multi:Ge.Single,orientation:b,onChange:S,compare:k,isSelected:F,optionsPropsRef:P,listRef:T});te(()=>{R.state.dataRef.current=$},[$]);let D=fe(R,B=>B.listboxState),W=Vr.get(null),z=fe(W,p.useCallback(B=>W.selectors.isTop(B,n),[W,n])),[O,A]=fe(R,B=>[B.buttonElement,B.optionsElement]);of(z,[O,A],(B,j)=>{R.send({type:vs.CloseListbox}),Nl(j,Wr.Loose)||(B.preventDefault(),O?.focus())});let _=ye({open:D===se.Open,disabled:f,invalid:u,value:x}),[L,E]=Ed({inherit:!0}),M={ref:w},V=p.useCallback(()=>{if(y!==void 0)return S?.(y)},[S,y]),X=ie();return p.createElement(E,{value:L,props:{htmlFor:O?.id},slot:{open:D===se.Open,disabled:f}},p.createElement(Zm,null,p.createElement(bs.Provider,{value:R},p.createElement(Fn.Provider,{value:$},p.createElement(Zr,{value:ce(D,{[se.Open]:ae.Open,[se.Closed]:ae.Closed})},s!=null&&x!=null&&p.createElement(ud,{disabled:f,data:{[s]:x},form:l,onReset:V}),X({ourProps:M,theirProps:v,slot:_,defaultTag:Up,name:"Listbox"}))))))}let Gp="button";function Kp(e,t){let n=p.useId(),r=bl(),o=Vt("Listbox.Button"),i=ro("Listbox.Button"),{id:l=r||`headlessui-listbox-button-${n}`,disabled:s=o.disabled||!1,autoFocus:a=!1,...c}=e,u=ue(t,Gm(),i.actions.setButtonElement),f=Km(),[h,d,g]=fe(i,A=>[A.listboxState,A.buttonElement,A.optionsElement]),v=h===se.Open;af(v,{trigger:d,action:p.useCallback(A=>{if(d!=null&&d.contains(A.target))return Xt.Ignore;let _=A.target.closest('[role="option"]:not([data-disabled])');return Ve(_)?Xt.Select(_):g!=null&&g.contains(A.target)?Xt.Ignore:Xt.Close},[d,g]),close:i.actions.closeListbox,select:i.actions.selectActiveOption});let b=q(A=>{switch(A.key){case J.Enter:od(A.currentTarget);break;case J.Space:case J.ArrowDown:A.preventDefault(),i.actions.openListbox({focus:o.value?Q.Nothing:Q.First});break;case J.ArrowUp:A.preventDefault(),i.actions.openListbox({focus:o.value?Q.Nothing:Q.Last});break}}),w=q(A=>{A.key===J.Space&&A.preventDefault()}),y=Md(A=>{var _;i.state.listboxState===se.Open?(Ye.flushSync(()=>i.actions.closeListbox()),(_=i.state.buttonElement)==null||_.focus({preventScroll:!0})):(A.preventDefault(),i.actions.openListbox({focus:Q.Nothing}))}),x=q(A=>A.preventDefault()),S=$l([l]),R=bd(),{isFocusVisible:P,focusProps:T}=jr({autoFocus:a}),{isHovered:k,hoverProps:F}=Dr({isDisabled:s}),{pressed:$,pressProps:D}=_r({disabled:s}),W=ye({open:h===se.Open,active:$||h===se.Open,disabled:s,invalid:o.invalid,value:o.value,hover:k,focus:P,autofocus:a}),z=fe(i,A=>A.listboxState===se.Open),O=Mt(f(),{ref:u,id:l,type:_l(e,d),"aria-haspopup":"listbox","aria-controls":g?.id,"aria-expanded":z,"aria-labelledby":S,"aria-describedby":R,disabled:s||void 0,autoFocus:a,onKeyDown:b,onKeyUp:w,onKeyPress:x},y,T,F,D);return ie()({ourProps:O,theirProps:c,slot:W,defaultTag:Gp,name:"Listbox.Button"})}let xs=p.createContext(!1),Yp="div",Xp=pt.RenderStrategy|pt.Static;function Zp(e,t){let n=p.useId(),{id:r=`headlessui-listbox-options-${n}`,anchor:o,portal:i=!1,modal:l=!0,transition:s=!1,...a}=e,c=qm(o),[u,f]=p.useState(null);c&&(i=!0);let h=Vt("Listbox.Options"),d=ro("Listbox.Options"),[g,v,b,w]=fe(d,H=>[H.listboxState,H.buttonElement,H.optionsElement,H.__demoMode]),y=br(v),x=br(b),S=On(),[R,P]=Ur(s,u,S!==null?(S&ae.Open)===ae.Open:g===se.Open);qd(R,v,d.actions.closeListbox);let T=w?!1:l&&g===se.Open;hf(T,x);let k=w?!1:l&&g===se.Open;Ud(k,{allowed:p.useCallback(()=>[v,b],[v,b])});let F=fe(d,d.selectors.didButtonMove)?!1:R,$=fe(d,d.selectors.hasFrozenValue)&&!e.static,D=rs($,h.value),W=p.useCallback(H=>h.compare(D,H),[h.compare,D]),z=fe(d,H=>{var G;if(c==null||!((G=c?.to)!=null&&G.includes("selection")))return null;let pe=H.options.findIndex(de=>W(de.dataRef.current.value));return pe===-1&&(pe=0),pe}),O=(()=>{if(c==null)return;if(z===null)return{...c,inner:void 0};let H=Array.from(h.listRef.current.values());return{...c,inner:{listRef:{current:H},index:z}}})(),[A,_]=Xm(O),L=Ym(),E=ue(t,c?A:null,d.actions.setOptionsElement,f),M=ot();p.useEffect(()=>{let H=b;H&&g===se.Open&&(zu(H)||H==null||H.focus({preventScroll:!0}))},[g,b]);let V=q(H=>{var G;switch(M.dispose(),H.key){case J.Space:if(d.state.searchQuery!=="")return H.preventDefault(),H.stopPropagation(),d.actions.search(H.key);case J.Enter:H.preventDefault(),H.stopPropagation(),d.actions.selectActiveOption();break;case ce(h.orientation,{vertical:J.ArrowDown,horizontal:J.ArrowRight}):return H.preventDefault(),H.stopPropagation(),d.actions.goToOption({focus:Q.Next});case ce(h.orientation,{vertical:J.ArrowUp,horizontal:J.ArrowLeft}):return H.preventDefault(),H.stopPropagation(),d.actions.goToOption({focus:Q.Previous});case J.Home:case J.PageUp:return H.preventDefault(),H.stopPropagation(),d.actions.goToOption({focus:Q.First});case J.End:case J.PageDown:return H.preventDefault(),H.stopPropagation(),d.actions.goToOption({focus:Q.Last});case J.Escape:H.preventDefault(),H.stopPropagation(),Ye.flushSync(()=>d.actions.closeListbox()),(G=d.state.buttonElement)==null||G.focus({preventScroll:!0});return;case J.Tab:H.preventDefault(),H.stopPropagation(),Ye.flushSync(()=>d.actions.closeListbox()),ef(d.state.buttonElement,H.shiftKey?vr.Previous:vr.Next);break;default:H.key.length===1&&(d.actions.search(H.key),M.setTimeout(()=>d.actions.clearSearch(),350));break}}),X=fe(d,H=>{var G;return(G=H.buttonElement)==null?void 0:G.id}),B=ye({open:g===se.Open}),j=Mt(c?L():{},{id:r,ref:E,"aria-activedescendant":fe(d,d.selectors.activeDescendantId),"aria-multiselectable":h.mode===Ge.Multi?!0:void 0,"aria-labelledby":X,"aria-orientation":h.orientation,onKeyDown:V,role:"listbox",tabIndex:g===se.Open?0:void 0,style:{...a.style,..._,"--button-width":Ld(R,v,!0).width},...zr(P)}),ee=ie(),Y=p.useMemo(()=>h.mode===Ge.Multi?h:{...h,isSelected:W},[h,W]);return p.createElement(mp,{enabled:i?e.static||R:!1,ownerDocument:y},p.createElement(Fn.Provider,{value:Y},ee({ourProps:j,theirProps:a,slot:B,defaultTag:Yp,features:Xp,visible:F,name:"Listbox.Options"})))}let Jp="div";function Qp(e,t){let n=p.useId(),{id:r=`headlessui-listbox-option-${n}`,disabled:o=!1,value:i,...l}=e,s=p.useContext(xs)===!0,a=Vt("Listbox.Option"),c=ro("Listbox.Option"),u=fe(c,$=>c.selectors.isActive($,r)),f=a.isSelected(i),h=p.useRef(null),d=Hp(h),g=it({disabled:o,value:i,domRef:h,get textValue(){return d()}}),v=ue(t,h,$=>{$?a.listRef.current.set(r,$):a.listRef.current.delete(r)}),b=fe(c,$=>c.selectors.shouldScrollIntoView($,r));te(()=>{if(b)return ve().requestAnimationFrame(()=>{var $,D;(D=($=h.current)==null?void 0:$.scrollIntoView)==null||D.call($,{block:"nearest"})})},[b,h]),te(()=>{if(!s)return c.actions.registerOption(r,g),()=>c.actions.unregisterOption(r)},[g,r,s]);let w=q($=>{if(o)return $.preventDefault();c.actions.selectOption(i)}),y=q(()=>{if(o)return c.actions.goToOption({focus:Q.Nothing});c.actions.goToOption({focus:Q.Specific,id:r})}),x=gf(),S=q($=>x.update($)),R=q($=>{x.wasMoved($)&&(o||u&&c.state.activationTrigger===on.Pointer||c.actions.goToOption({focus:Q.Specific,id:r},on.Pointer))}),P=q($=>{x.wasMoved($)&&(o||u&&c.state.activationTrigger===on.Pointer&&c.actions.goToOption({focus:Q.Nothing}))}),T=ye({active:u,focus:u,selected:f,disabled:o,selectedOption:f&&s}),k=s?{}:{id:r,ref:v,role:"option",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-selected":f,disabled:void 0,onClick:w,onFocus:y,onPointerEnter:S,onMouseEnter:S,onPointerMove:R,onMouseMove:R,onPointerLeave:P,onMouseLeave:P},F=ie();return!f&&s?null:F({ourProps:k,theirProps:l,slot:T,defaultTag:Jp,name:"Listbox.Option"})}let eh=p.Fragment;function th(e,t){let{options:n,placeholder:r,...o}=e,i={ref:ue(t)},l=Vt("ListboxSelectedOption"),s=ye({}),a=l.value===void 0||l.value===null||l.mode===Ge.Multi&&Array.isArray(l.value)&&l.value.length===0,c=ie();return p.createElement(xs.Provider,{value:!0},c({ourProps:i,theirProps:{...o,children:p.createElement(p.Fragment,null,r&&a?r:n)},slot:s,defaultTag:eh,name:"ListboxSelectedOption"}))}let nh=re(qp),ys=re(Kp),rh=$d,Es=re(Zp),Cs=re(Qp),oh=re(th),ih=Object.assign(nh,{Button:ys,Label:rh,Options:Es,Option:Cs,SelectedOption:oh});function Rs({children:e,className:t,disabled:n=!1,intent:r="primary",...o}){return C.jsx(td,{className:oe("rounded-md font-bold cursor-pointer px-2",lh(r,!!n),{"opacity-50 cursor-default":n},t),"data-focus":!0,disabled:n,...o,children:e})}function lh(e,t){switch(e){case"danger":return oe("bg-red-400 text-red-950 focus:text-black",{"hover:bg-red-500 focus:text-black":!t});case"none":return oe("bg-white/20 text-slate-300 focus:text-white",{"hover:bg-white/10 focus:text-white":!t});case"success":return oe("bg-emerald-400 text-emerald-950 focus:text-black",{"hover:bg-emerald-500 focus:text-black":!t});case"primary":return oe("bg-sky-400 text-sky-950 focus:text-black",{"hover:bg-sky-500 focus:text-black":!t});case"warning":return oe("bg-amber-400 text-amber-950 focus:text-black",{"hover:bg-amber-500 focus:text-black":!t})}}function oo({children:e}){return C.jsx(gu,{FallbackComponent:sh,children:e})}function sh({error:e,resetErrorBoundary:t}){return C.jsx(Mr,{intent:"danger",children:C.jsxs(he,{align:"start",direction:"column",gap:2,children:[C.jsx("div",{className:"font-bold",children:"Something went wrong!"}),C.jsx("pre",{className:"text-sm font-monospace text-red-300",children:e.message}),C.jsx(Rs,{intent:"danger",onClick:t,children:"Retry"})]})})}function gn({children:e,className:t,href:n,target:r="_blank",...o}){return C.jsx("a",{className:t,href:n,target:r,rel:"noopener noreferrer",...o,children:e})}function vn({children:e,onClick:t,to:n,...r}){const o=!!Ra(n),[i,l]=p.useTransition(),s=Pi();return C.jsx("span",{children:typeof e=="function"?e({isActive:o,isPending:i}):e,"data-link":!0,onClick:a=>{t?.(a),l(()=>{s(n)})},...r})}function ah({children:e}){return C.jsx("div",{className:"w-full shrink-0 flex flex-col gap-4 py-4 overflow-y-auto",children:e})}function ch(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function uh(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function dh(){return/apple/i.test(navigator.vendor)}function fh(){return ch().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function mh(){return uh().includes("jsdom/")}const ph="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ai(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function It(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&wr(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ut(e){return"composedPath"in e?e.composedPath()[0]:e.target}function er(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function hh(e){return e.matches("html,body")}function et(e){return e?.ownerDocument||document}function gh(e){return ge(e)&&e.matches(ph)}function vh(e){if(!e||mh())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ln(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...ln(e,o.id,n)])}function bh(e){return"nativeEvent"in e}function Cr(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}var wh=typeof document<"u",xh=function(){},Ne=wh?p.useLayoutEffect:xh;const yh={...m};function Qt(e){const t=m.useRef(e);return Ne(()=>{t.current=e}),t}const Eh=yh.useInsertionEffect,Ch=Eh||(e=>e());function $e(e){const t=m.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Ch(()=>{t.current=e}),m.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Rh="data-floating-ui-focusable",ci="active",ui="selected",Sh={...m};let di=!1,$h=0;const fi=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+$h++;function kh(){const[e,t]=m.useState(()=>di?fi():void 0);return Ne(()=>{e==null&&t(fi())},[]),m.useEffect(()=>{di=!0},[]),e}const Ph=Sh.useId,Ss=Ph||kh;let Rr;process.env.NODE_ENV!=="production"&&(Rr=new Set);function Th(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Rr)!=null&&e.has(o))){var i;(i=Rr)==null||i.add(o),console.error(o)}}function Oh(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Lh=m.createContext(null),Mh=m.createContext(null),$s=()=>{var e;return((e=m.useContext(Lh))==null?void 0:e.id)||null},io=()=>m.useContext(Mh);function In(e){return"data-floating-ui-"+e}function we(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const mi=In("safe-polygon");function tr(e,t,n){if(n&&!Cr(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function nr(e){return typeof e=="function"?e():e}function Ah(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:l}=e,{enabled:s=!0,delay:a=0,handleClose:c=null,mouseOnly:u=!1,restMs:f=0,move:h=!0}=t,d=io(),g=$s(),v=Qt(c),b=Qt(a),w=Qt(n),y=Qt(f),x=m.useRef(),S=m.useRef(-1),R=m.useRef(),P=m.useRef(-1),T=m.useRef(!0),k=m.useRef(!1),F=m.useRef(()=>{}),$=m.useRef(!1),D=$e(()=>{var L;const E=(L=o.current.openEvent)==null?void 0:L.type;return E?.includes("mouse")&&E!=="mousedown"});m.useEffect(()=>{if(!s)return;function L(E){let{open:M}=E;M||(we(S),we(P),T.current=!0,$.current=!1)}return i.on("openchange",L),()=>{i.off("openchange",L)}},[s,i]),m.useEffect(()=>{if(!s||!v.current||!n)return;function L(M){D()&&r(!1,M,"hover")}const E=et(l.floating).documentElement;return E.addEventListener("mouseleave",L),()=>{E.removeEventListener("mouseleave",L)}},[l.floating,n,r,s,v,D]);const W=m.useCallback(function(L,E,M){E===void 0&&(E=!0),M===void 0&&(M="hover");const V=tr(b.current,"close",x.current);V&&!R.current?(we(S),S.current=window.setTimeout(()=>r(!1,L,M),V)):E&&(we(S),r(!1,L,M))},[b,r]),z=$e(()=>{F.current(),R.current=void 0}),O=$e(()=>{if(k.current){const L=et(l.floating).body;L.style.pointerEvents="",L.removeAttribute(mi),k.current=!1}}),A=$e(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);m.useEffect(()=>{if(!s)return;function L(B){if(we(S),T.current=!1,u&&!Cr(x.current)||nr(y.current)>0&&!tr(b.current,"open"))return;const j=tr(b.current,"open",x.current);j?S.current=window.setTimeout(()=>{w.current||r(!0,B,"hover")},j):n||r(!0,B,"hover")}function E(B){if(A()){O();return}F.current();const j=et(l.floating);if(we(P),$.current=!1,v.current&&o.current.floatingContext){n||we(S),R.current=v.current({...o.current.floatingContext,tree:d,x:B.clientX,y:B.clientY,onClose(){O(),z(),A()||W(B,!0,"safe-polygon")}});const Y=R.current;j.addEventListener("mousemove",Y),F.current=()=>{j.removeEventListener("mousemove",Y)};return}(x.current!=="touch"||!It(l.floating,B.relatedTarget))&&W(B)}function M(B){A()||o.current.floatingContext&&(v.current==null||v.current({...o.current.floatingContext,tree:d,x:B.clientX,y:B.clientY,onClose(){O(),z(),A()||W(B)}})(B))}function V(){we(S)}function X(B){A()||W(B,!1)}if(K(l.domReference)){const B=l.domReference,j=l.floating;return n&&B.addEventListener("mouseleave",M),h&&B.addEventListener("mousemove",L,{once:!0}),B.addEventListener("mouseenter",L),B.addEventListener("mouseleave",E),j&&(j.addEventListener("mouseleave",M),j.addEventListener("mouseenter",V),j.addEventListener("mouseleave",X)),()=>{n&&B.removeEventListener("mouseleave",M),h&&B.removeEventListener("mousemove",L),B.removeEventListener("mouseenter",L),B.removeEventListener("mouseleave",E),j&&(j.removeEventListener("mouseleave",M),j.removeEventListener("mouseenter",V),j.removeEventListener("mouseleave",X))}}},[l,s,e,u,h,W,z,O,r,n,w,d,b,v,o,A,y]),Ne(()=>{var L;if(s&&n&&(L=v.current)!=null&&(L=L.__options)!=null&&L.blockPointerEvents&&D()){k.current=!0;const M=l.floating;if(K(l.domReference)&&M){var E;const V=et(l.floating).body;V.setAttribute(mi,"");const X=l.domReference,B=d==null||(E=d.nodesRef.current.find(j=>j.id===g))==null||(E=E.context)==null?void 0:E.elements.floating;return B&&(B.style.pointerEvents=""),V.style.pointerEvents="none",X.style.pointerEvents="auto",M.style.pointerEvents="auto",()=>{V.style.pointerEvents="",X.style.pointerEvents="",M.style.pointerEvents=""}}}},[s,n,g,l,d,v,D]),Ne(()=>{n||(x.current=void 0,$.current=!1,z(),O())},[n,z,O]),m.useEffect(()=>()=>{z(),we(S),we(P),O()},[s,l.domReference,z,O]);const _=m.useMemo(()=>{function L(E){x.current=E.pointerType}return{onPointerDown:L,onPointerEnter:L,onMouseMove(E){const{nativeEvent:M}=E;function V(){!T.current&&!w.current&&r(!0,M,"hover")}u&&!Cr(x.current)||n||nr(y.current)===0||$.current&&E.movementX**2+E.movementY**2<2||(we(P),x.current==="touch"?V():($.current=!0,P.current=window.setTimeout(V,nr(y.current))))}}},[u,r,n,w,y]);return m.useMemo(()=>s?{reference:_}:{},[s,_])}const Fh=m.createContext(null),pi=In("portal");function Ih(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Ss(),o=Nh(),[i,l]=m.useState(null),s=m.useRef(null);return Ne(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),Ne(()=>{if(!r||s.current)return;const a=t?document.getElementById(t):null;if(!a)return;const c=document.createElement("div");c.id=r,c.setAttribute(pi,""),a.appendChild(c),s.current=c,l(c)},[t,r]),Ne(()=>{if(n===null||!r||s.current)return;let a=n||o?.portalNode;a&&!qr(a)&&(a=a.current),a=a||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,a.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(pi,""),a=c||a,a.appendChild(u),s.current=u,l(u)},[t,n,r,o]),i}const Nh=()=>m.useContext(Fh),Dh={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},jh={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},hi=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function _h(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:l=!0,escapeKey:s=!0,outsidePress:a=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:h=!1,bubbles:d,capture:g}=t,v=io(),b=$e(typeof a=="function"?a:()=>!1),w=typeof a=="function"?b:a,y=m.useRef(!1),{escapeKey:x,outsidePress:S}=hi(d),{escapeKey:R,outsidePress:P}=hi(g),T=m.useRef(!1),k=$e(O=>{var A;if(!n||!l||!s||O.key!=="Escape"||T.current)return;const _=(A=i.current.floatingContext)==null?void 0:A.nodeId,L=v?ln(v.nodesRef.current,_):[];if(!x&&(O.stopPropagation(),L.length>0)){let E=!0;if(L.forEach(M=>{var V;if((V=M.context)!=null&&V.open&&!M.context.dataRef.current.__escapeKeyBubbles){E=!1;return}}),!E)return}r(!1,bh(O)?O.nativeEvent:O,"escape-key")}),F=$e(O=>{var A;const _=()=>{var L;k(O),(L=ut(O))==null||L.removeEventListener("keydown",_)};(A=ut(O))==null||A.addEventListener("keydown",_)}),$=$e(O=>{var A;const _=i.current.insideReactTree;i.current.insideReactTree=!1;const L=y.current;if(y.current=!1,c==="click"&&L||_||typeof w=="function"&&!w(O))return;const E=ut(O),M="["+In("inert")+"]",V=et(o.floating).querySelectorAll(M);let X=K(E)?E:null;for(;X&&!Ie(X);){const Y=je(X);if(Ie(Y)||!K(Y))break;X=Y}if(V.length&&K(E)&&!hh(E)&&!It(E,o.floating)&&Array.from(V).every(Y=>!It(X,Y)))return;if(ge(E)&&z){const Y=Ie(E),H=Ee(E),G=/auto|scroll/,pe=Y||G.test(H.overflowX),de=Y||G.test(H.overflowY),st=pe&&E.clientWidth>0&&E.scrollWidth>E.clientWidth,Et=de&&E.clientHeight>0&&E.scrollHeight>E.clientHeight,at=H.direction==="rtl",Os=Et&&(at?O.offsetX<=E.offsetWidth-E.clientWidth:O.offsetX>E.clientWidth),Ls=st&&O.offsetY>E.clientHeight;if(Os||Ls)return}const B=(A=i.current.floatingContext)==null?void 0:A.nodeId,j=v&&ln(v.nodesRef.current,B).some(Y=>{var H;return er(O,(H=Y.context)==null?void 0:H.elements.floating)});if(er(O,o.floating)||er(O,o.domReference)||j)return;const ee=v?ln(v.nodesRef.current,B):[];if(ee.length>0){let Y=!0;if(ee.forEach(H=>{var G;if((G=H.context)!=null&&G.open&&!H.context.dataRef.current.__outsidePressBubbles){Y=!1;return}}),!Y)return}r(!1,O,"outside-press")}),D=$e(O=>{var A;const _=()=>{var L;$(O),(L=ut(O))==null||L.removeEventListener(c,_)};(A=ut(O))==null||A.addEventListener(c,_)});m.useEffect(()=>{if(!n||!l)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=S;let O=-1;function A(V){r(!1,V,"ancestor-scroll")}function _(){window.clearTimeout(O),T.current=!0}function L(){O=window.setTimeout(()=>{T.current=!1},$n()?5:0)}const E=et(o.floating);s&&(E.addEventListener("keydown",R?F:k,R),E.addEventListener("compositionstart",_),E.addEventListener("compositionend",L)),w&&E.addEventListener(c,P?D:$,P);let M=[];return h&&(K(o.domReference)&&(M=Ke(o.domReference)),K(o.floating)&&(M=M.concat(Ke(o.floating))),!K(o.reference)&&o.reference&&o.reference.contextElement&&(M=M.concat(Ke(o.reference.contextElement)))),M=M.filter(V=>{var X;return V!==((X=E.defaultView)==null?void 0:X.visualViewport)}),M.forEach(V=>{V.addEventListener("scroll",A,{passive:!0})}),()=>{s&&(E.removeEventListener("keydown",R?F:k,R),E.removeEventListener("compositionstart",_),E.removeEventListener("compositionend",L)),w&&E.removeEventListener(c,P?D:$,P),M.forEach(V=>{V.removeEventListener("scroll",A)}),window.clearTimeout(O)}},[i,o,s,w,c,n,r,h,l,x,S,k,R,F,$,P,D]),m.useEffect(()=>{i.current.insideReactTree=!1},[i,w,c]);const W=m.useMemo(()=>({onKeyDown:k,...u&&{[Dh[f]]:O=>{r(!1,O.nativeEvent,"reference-press")},...f!=="click"&&{onClick(O){r(!1,O.nativeEvent,"reference-press")}}}}),[k,r,u,f]),z=m.useMemo(()=>({onKeyDown:k,onMouseDown(){y.current=!0},onMouseUp(){y.current=!0},[jh[c]]:()=>{i.current.insideReactTree=!0}}),[k,c,i]);return m.useMemo(()=>l?{reference:W,floating:z}:{},[l,W,z])}function Bh(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Ss(),i=m.useRef({}),[l]=m.useState(()=>Oh()),s=$s()!=null;if(process.env.NODE_ENV!=="production"){const d=r.reference;d&&!K(d)&&Th("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,c]=m.useState(r.reference),u=$e((d,g,v)=>{i.current.openEvent=d?g:void 0,l.emit("openchange",{open:d,event:g,reason:v,nested:s}),n?.(d,g,v)}),f=m.useMemo(()=>({setPositionReference:c}),[]),h=m.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return m.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:h,events:l,floatingId:o,refs:f}),[t,u,h,l,o,f])}function Hh(e){e===void 0&&(e={});const{nodeId:t}=e,n=Bh({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,l]=m.useState(null),[s,a]=m.useState(null),u=o?.domReference||i,f=m.useRef(null),h=io();Ne(()=>{u&&(f.current=u)},[u]);const d=Jl({...e,elements:{...o,...s&&{reference:s}}}),g=m.useCallback(x=>{const S=K(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;a(S),d.refs.setReference(S)},[d.refs]),v=m.useCallback(x=>{(K(x)||x===null)&&(f.current=x,l(x)),(K(d.refs.reference.current)||d.refs.reference.current===null||x!==null&&!K(x))&&d.refs.setReference(x)},[d.refs]),b=m.useMemo(()=>({...d.refs,setReference:v,setPositionReference:g,domReference:f}),[d.refs,v,g]),w=m.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),y=m.useMemo(()=>({...d,...r,refs:b,elements:w,nodeId:t}),[d,b,w,t,r]);return Ne(()=>{r.dataRef.current.floatingContext=y;const x=h?.nodesRef.current.find(S=>S.id===t);x&&(x.context=y)}),m.useMemo(()=>({...d,context:y,refs:b,elements:w}),[d,b,w,y])}function rr(){return fh()&&dh()}function Vh(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:l}=e,{enabled:s=!0,visibleOnly:a=!0}=t,c=m.useRef(!1),u=m.useRef(-1),f=m.useRef(!0);m.useEffect(()=>{if(!s)return;const d=me(l.domReference);function g(){!n&&ge(l.domReference)&&l.domReference===ai(et(l.domReference))&&(c.current=!0)}function v(){f.current=!0}function b(){f.current=!1}return d.addEventListener("blur",g),rr()&&(d.addEventListener("keydown",v,!0),d.addEventListener("pointerdown",b,!0)),()=>{d.removeEventListener("blur",g),rr()&&(d.removeEventListener("keydown",v,!0),d.removeEventListener("pointerdown",b,!0))}},[l.domReference,n,s]),m.useEffect(()=>{if(!s)return;function d(g){let{reason:v}=g;(v==="reference-press"||v==="escape-key")&&(c.current=!0)}return o.on("openchange",d),()=>{o.off("openchange",d)}},[o,s]),m.useEffect(()=>()=>{we(u)},[]);const h=m.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(d){if(c.current)return;const g=ut(d.nativeEvent);if(a&&K(g)){if(rr()&&!d.relatedTarget){if(!f.current&&!gh(g))return}else if(!vh(g))return}r(!0,d.nativeEvent,"focus")},onBlur(d){c.current=!1;const g=d.relatedTarget,v=d.nativeEvent,b=K(g)&&g.hasAttribute(In("focus-guard"))&&g.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var w;const y=ai(l.domReference?l.domReference.ownerDocument:document);!g&&y===l.domReference||It((w=i.current.floatingContext)==null?void 0:w.refs.floating.current,y)||It(l.domReference,y)||b||r(!1,v,"focus")})}}),[i,l.domReference,r,a]);return m.useMemo(()=>s?{reference:h}:{},[s,h])}function or(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ci]:l,[ui]:s,...a}=e;i=a}return{...n==="floating"&&{tabIndex:-1,[Rh]:""},...i,...t.map(l=>{const s=l?l[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((l,s)=>(s&&Object.entries(s).forEach(a=>{let[c,u]=a;if(!(o&&[ci,ui].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),l[c]=function(){for(var h,d=arguments.length,g=new Array(d),v=0;v<d;v++)g[v]=arguments[v];return(h=r.get(c))==null?void 0:h.map(b=>b(...g)).find(b=>b!==void 0)}}}else l[c]=u}),l),{})}}function Wh(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=m.useCallback(s=>or(s,e,"reference"),t),i=m.useCallback(s=>or(s,e,"floating"),n),l=m.useCallback(s=>or(s,e,"item"),r);return m.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:l}),[o,i,l])}function kt({children:e,className:t,content:n,positions:r,showOnFocus:o=!1,showOnHover:i=!0,usePortal:l}){const[s,a]=p.useState(!1),c=Ih({root:document.body}),{refs:u,floatingStyles:f,context:h}=Hh({onOpenChange:a,open:s,middleware:[Yr(4),Ql(),$m(r?{allowedPlacements:r}:{})]}),d=Ah(h,{enabled:i}),g=Vh(h,{enabled:o}),v=_h(h),{getReferenceProps:b,getFloatingProps:w}=Wh([v,g,d]),y=S=>{if(o)switch(S.key){case"Escape":{a(!1);break}case"Enter":{a(!0);break}}};let x=null;return s&&(x=C.jsx("div",{className:oe("bg-white/80 text-black rounded-md px-2 py-1 shadow-md whitespace-nowrap z-40",t),ref:u.setFloating,style:f,...w(),children:n}),l&&c&&(x=Ye.createPortal(x,c))),C.jsxs("div",{className:oe("group relative flex justify-center",t),onKeyDown:y,children:[C.jsx("div",{ref:u.setReference,...b(),children:e}),x]})}function zh(){const{hide:e}=Bi(),{pathname:t}=Be();return p.useLayoutEffect(()=>{e();const n=document.body.querySelector("[data-main-scrollable]");if(n){const r=setTimeout(()=>{n.scrollTo(0,0)},1);return()=>{clearTimeout(r)}}},[e,t]),null}const Uh={"*":p.lazy(()=>Promise.resolve().then(()=>require("./PageNotFound-YcVoO6YV.cjs"))),"/":p.lazy(()=>Promise.resolve().then(()=>require("./GettingStartedRoute-B2gmhrI5.cjs"))),"/common-questions":p.lazy(()=>Promise.resolve().then(()=>require("./CommonQuestionsRoute-CA0eEVPH.cjs"))),"/support":p.lazy(()=>Promise.resolve().then(()=>require("./SupportRoute-B4AetYXb.cjs"))),"/versions":p.lazy(()=>Promise.resolve().then(()=>require("./VersionsRoute-Spk6Sna2.cjs")))};function qh({commonQuestions:e,navLinks:t,overview:n,packageDescription:r,packageName:o,repositoryUrl:i,routes:l,showOpenCollectLink:s=!1,versions:a}){const{toggle:c,visible:u}=Bi(),f=p.useMemo(()=>({commonQuestions:e,overview:n,packageDescription:r,packageName:o,repositoryUrl:i.replace(".git",""),showOpenCollectLink:s,versions:a}),[e,n,r,o,i,s,a]);return C.jsx(_i.Provider,{value:f,children:C.jsxs(cc,{children:[C.jsx(zh,{}),C.jsxs("div",{className:"h-full w-full max-w-350 mx-auto flex flex-col",children:[C.jsxs(he,{align:"center",className:"h-12 w-full p-4",direction:"row",gap:4,children:[C.jsx(yc,{className:"shrink-0 w-8 h-8"}),C.jsxs(he,{className:"overflow-hidden",align:"center",direction:"row",gap:4,children:[C.jsx(vn,{children:o,className:"text-xl text-header-package-name! font-bold cursor-pointer truncate",to:"/"}),C.jsx("div",{className:"hidden md:block text-header-package-description",children:r})]}),C.jsx("div",{className:"grow"}),C.jsxs(he,{align:"center",direction:"row",gap:4,children:[a!==void 0&&C.jsx(kt,{content:"Previous versions",children:C.jsx(vn,{"aria-label":"Documentation for other versions",className:"text-xs font-bold text-header-icons! cursor-pointer",to:"/versions",children:C.jsx(ji,{className:"w-6 h-6"})})}),C.jsx(kt,{content:"NPM package",children:C.jsx(gn,{"aria-label":"NPM project page",className:"text-header-icons!",href:`https://www.npmjs.com/package/${o}`,children:C.jsx(xc,{className:"w-8 h-8"})})}),C.jsx(kt,{content:"Source code",children:C.jsx(gn,{"aria-label":"GitHub project page",className:"text-header-icons!",href:`https://github.com/bvaughn/${o}`,children:C.jsx(wc,{className:"w-6 h-6"})})}),C.jsx(kt,{className:"block md:hidden",content:u?"Hide menu":"Show menu",children:C.jsx("button",{"aria-label":"Site navigation menu",className:oe("cursor-pointer rounded-lg p-1",{"bg-black/40":!u,"bg-black/50 text-white":u}),onClick:c,children:u?C.jsx(Ks,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"}):C.jsx(Ds,{className:"w-6 h-6 fill-current drop-shadow-black/20 drop-shadow-xs"})})})]})]}),C.jsxs("div",{className:"grow shrink flex flex-row shadow-lg mx-2 rounded-t-3xl overflow-hidden",children:[C.jsx("section",{className:oe("w-full bg-black/90 md:block md:w-80 md:bg-black/80 overflow-auto",{hidden:!u}),children:C.jsx(ah,{children:t})}),C.jsx("main",{className:oe("w-full bg-black/90 relative overflow-auto",{hidden:u}),children:C.jsx("div",{className:"h-full p-4 py-4 overflow-auto [mask-image:linear-gradient(to_bottom,transparent,black_1.5rem)]","data-main-scrollable":!0,children:C.jsx(Ba,{children:Object.entries({...Uh,...l}).map(([h,d])=>C.jsx(Li,{element:C.jsx(oo,{children:C.jsx(d,{})},h),path:h},h))})})})]})]})]})})}function Gh({children:e,className:t,...n}){return C.jsx(oo,{children:C.jsx("div",{className:`border-lg bg-black/30 text-slate-300 rounded-lg p-2 ${t}`,...n,children:e})})}const Kh=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"m424-424-86-86q-11-11-28-11t-28 11q-11 11-11 28t11 28l114 114q12 12 28 12t28-12l226-226q11-11 11-28t-11-28q-11-11-28-11t-28 11L424-424ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"})),Yh=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"M320-440h320q17 0 28.5-11.5T680-480q0-17-11.5-28.5T640-520H320q-17 0-28.5 11.5T280-480q0 17 11.5 28.5T320-440ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"})),Xh=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"}));function Zh({checked:e,children:t,className:n,indeterminate:r,onChange:o,...i}){let l,s;return r?(l=Yh,s="fill-white"):e?(l=Kh,s="fill-blue-600"):(l=Xh,s="fill-slate-600"),C.jsxs("label",{className:`cursor-pointer rounded-lg flex flex-row items-center outline-none group ${n}`,"data-focus-within":!0,...i,children:[C.jsx("input",{checked:e,className:"w-0 h-0",onChange:a=>{o(a.currentTarget.checked)},type:"checkbox"}),C.jsx(l,{className:s}),t&&C.jsxs(C.Fragment,{children:[" ",t]})]})}function lo({className:e="",html:t}){return C.jsx("div",{className:"relative",children:C.jsx("code",{className:oe("text-sm md:text-base block text-left whitespace-pre-wrap break-normal text-white! rounded-md p-3 bg-black","flex flex-col",e),dangerouslySetInnerHTML:{__html:t}})})}function Wt({className:e,sections:t}){return C.jsx(he,{className:e,direction:"column",gap:2,children:t.map(({content:n,intent:r},o)=>r?C.jsx(Mr,{html:!0,inline:!0,intent:r,minimal:!0,children:n},o):C.jsx("div",{dangerouslySetInnerHTML:{__html:n.replaceAll("<ul>",'<ul class="list-disc pl-4">')}},o))})}function ks(e,t="Assertion error"){if(!e)throw Error(t)}function Ps(){const e=p.useContext(_i);return ks(e,"App must be rendered within a LibraryContextProvider"),e}function so({section:e,sourceCodePath:t,title:n}){const{repositoryUrl:r}=Ps();return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"text-xl",children:[e&&C.jsxs(C.Fragment,{children:[C.jsx("span",{className:"text-xl whitespace-nowrap",children:e})," ",C.jsx(vi,{className:"size-4 text-slate-400 inline"})," "]}),C.jsx("span",{className:"text-xl",children:n}),t&&C.jsx(gn,{className:"text-sm text-emerald-300 hover:text-white",href:`${r}/blob/main/${t}`,children:C.jsx(Is,{className:"inline-block size-4 fill-current ml-2 mb-1"})})]}),C.jsx("title",{children:e?`${e}: ${n}`:n})]})}function Jh({method:e}){return C.jsxs(C.Fragment,{children:[C.jsx("dd",{className:"[&_code]:text-sky-300 text-lg font-bold",children:e.name}),C.jsxs("dt",{className:"mb-2",children:[C.jsx(Wt,{sections:e.description}),C.jsx(lo,{className:"mt-2 p-2 flex flex-col",html:e.html})]})]})}function Qh({json:e,section:t}){return C.jsxs(he,{direction:"column",gap:4,children:[C.jsx(so,{section:t,sourceCodePath:e.filePath,title:`${e.name}`}),C.jsx(Wt,{sections:e.description}),C.jsx(he,{direction:"column",children:C.jsx("dl",{className:"flex flex-col gap-2",children:e.methods.map((n,r)=>C.jsx(Jh,{method:n},r))})})]})}function eg({children:e,className:t,onChange:n,value:r,...o}){return C.jsx("input",{className:`rounded-md bg-black/30 border border-2 border-transparent py-1 px-2 outline-none focus:border-emerald-300 ${t}`,"data-focus":!0,onChange:i=>{n(i.currentTarget.value)},value:r,...o,children:e})}function tg(){return C.jsxs(he,{align:"center",className:"text-slate-300",direction:"row",gap:2,children:[C.jsx(As,{className:"size-4 animate-spin"}),"Loading..."]})}function Ts({children:e,className:t,disabled:n}){return C.jsx(he,{align:"center",className:oe("px-4 h-8 cursor-pointer text-white/90 hover:text-white focus:bg-white/10 focus-within:bg-white/10",{"pointer-events-none text-white/50":n},t),direction:"row",gap:1,children:e})}function ng({children:e,className:t,path:n}){return C.jsx(vn,{to:n,children:({isActive:r,isPending:o})=>C.jsx(Ts,{className:oe("px-4 cursor-pointer",{"font-bold text-nav-active hover:text-nav-hover":r,"opacity-50 pointer-events-none":o},t),children:C.jsx(he,{align:"center",direction:"row",gap:2,children:e})})})}function rg({children:e,label:t}){return C.jsxs(_p,{as:"section",defaultOpen:!0,children:[C.jsx(hs,{className:"w-full group border-none! data-focus:bg-white/10",children:C.jsxs(Ts,{children:[C.jsx("div",{className:"uppercase text-sm font-bold text-white/50",children:t}),C.jsx("div",{className:"grow"}),C.jsx(vi,{className:"size-4 fill-white/60 group-data-hover:fill-white/50 group-data-open:rotate-90"})]})}),C.jsx(gs,{className:"pl-4",children:e})]})}function og(e){const t=[],n=[];return Object.values(e.props).forEach(r=>{r.required?n.push(r):t.push(r)}),t.sort((r,o)=>r.name.localeCompare(o.name)),n.sort((r,o)=>r.name.localeCompare(o.name)),{optionalProps:t,requiredProps:n}}function ig({prop:e}){return C.jsxs(C.Fragment,{children:[C.jsx("dt",{className:"mt-6 pl-8 indent-[-1rem]",children:C.jsx(lo,{className:"bg-transparent inline-flex flex-col p-0",html:e.html})}),C.jsx("dd",{className:"mt-2 pl-4 [&_code]:text-sky-300",children:C.jsx(Wt,{sections:e.description})})]})}function Sr({header:e,props:t}){return t.length===0?null:C.jsxs(he,{direction:"column",children:[C.jsx("div",{className:"text-lg font-bold",children:e}),C.jsx("dl",{children:t.map(n=>C.jsx(ig,{prop:n},n.name))})]})}function lg({json:e,section:t}){const{optionalProps:n,requiredProps:r}=p.useMemo(()=>og(e),[e]);return C.jsxs(he,{direction:"column",gap:4,children:[C.jsx(so,{section:t,sourceCodePath:e.filePath,title:`${e.name} component`}),C.jsx(Wt,{sections:e.description}),C.jsx(Sr,{header:"Required props",props:r}),C.jsx(Sr,{header:"Optional props",props:n})]})}const sg=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"m424-408-86-86q-11-11-28-11t-28 11q-11 11-11 28t11 28l114 114q12 12 28 12t28-12l226-226q11-11 11-28t-11-28q-11-11-28-11t-28 11L424-408Zm56 328q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"})),ag=e=>m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:"currentColor",...e},m.createElement("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Z"}));function cg({checked:e,children:t,className:n,name:r,onChange:o,value:i,...l}){let s,a;return e?(s=sg,a="fill-blue-600"):(s=ag,a="fill-slate-600"),C.jsxs("label",{className:`cursor-pointer rounded-full flex flex-row items-center outline-none group ${n}`,"data-focus-within":!0,...l,children:[C.jsx("input",{checked:e,className:"w-0 h-0",name:r,onChange:()=>{o(i)},type:"radio",value:i}),C.jsx(s,{className:a}),t&&C.jsxs(C.Fragment,{children:[" ",t]})]})}function ug({className:e,defaultValue:t,onChange:n,options:r,placeholder:o="",value:i}){return C.jsx(ih,{value:i??t,onChange:n,children:C.jsxs("div",{className:`relative ${e}`,children:[C.jsxs(ys,{className:"w-full h-9 text-left rounded-md bg-black/30 border border-2 border-transparent py-1 px-2 outline-none focus:border-teal-300","data-focus":!0,children:[i?.label?C.jsx("span",{className:"block truncate",children:i.label}):C.jsx("span",{className:"block truncate text-slate-500",children:o}),C.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:C.jsx(Vs,{className:"h-4 w-4 text-gray-400","aria-hidden":"true"})})]}),C.jsx(Rp,{as:p.Fragment,leaveFrom:"opacity-100",leaveTo:"opacity-0",children:C.jsx(Es,{className:"absolute z-10 mt-1 max-h-50 w-full overflow-auto rounded-md py-1 bg-black/90","data-focus":!0,children:r.map((l,s)=>C.jsx(Cs,{className:oe("relative cursor-pointer select-none h-7 py-1 px-2 text-slate-300 border-none!","data-focus:text-teal-300 data-focus:bg-black","data-active:text-teal-300 data-active:bg-black","data-selected:text-teal-300 data-selected:font-bold"),value:l,children:l.label},s))})})]})})}function dg(e,t){switch(e){case"danger":return t?"bg-red-950 text-red-300 [&_svg]:text-red-500":"bg-black/10 bg-border border-2 border-red-500 text-white [&_svg]:text-red-500 [&_a]:text-red-400!";case"none":return t?"bg-white/10 text-slate-300 [&_svg]:text-slate-400":"bg-black/10 bg-border border-2 border-white/40 text-white [&_svg]:text-white/60";case"primary":return t?"bg-sky-950 text-sky-300 [&_svg]:text-sky-400":"bg-black/10 bg-border border-2 border-sky-400 text-white [&_svg]:text-sky-400";case"success":return t?"bg-emerald-950 text-emerald-300 [&_svg]:text-emerald-400":"bg-black/10 bg-border border-2 border-emerald-400 text-white [&_svg]:text-emerald-400";case"warning":return t?"bg-amber-950/65 text-amber-200 [&_svg]:text-amber-300":"bg-black/10 bg-border border-2 border-amber-400 text-white [&_svg]:text-amber-400 [&_a]:text-amber-400!"}}exports.AppRoot=qh;exports.Block=Gh;exports.Box=he;exports.Button=Rs;exports.Callout=Mr;exports.Checkbox=Zh;exports.Code=lo;exports.ComponentProps=lg;exports.ComponentPropsSection=Sr;exports.DocsSection=Wt;exports.ErrorBoundary=oo;exports.ExternalLink=gn;exports.Header=so;exports.ImperativeHandle=Qh;exports.Input=eg;exports.Link=vn;exports.LoadingSpinner=tg;exports.NavLink=ng;exports.NavSection=rg;exports.Radio=cg;exports.Select=ug;exports.SvgTags=ji;exports.Tooltip=kt;exports.assert=ks;exports.cn=oe;exports.getIntentClassNames=dg;exports.useLibraryContext=Ps;
8
- //# sourceMappingURL=index-BB-4-AeJ.cjs.map