nextclaw 0.19.24 → 0.19.27

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 (54) hide show
  1. package/dist/cli/app/index.js +2 -0
  2. package/dist/cli/app/index.js.map +1 -0
  3. package/dist/cli/launcher/index.js +2 -0
  4. package/dist/cli/launcher/index.js.map +1 -0
  5. package/dist/nextclaw-distribution.utils-BJZhAnGk.js +2 -0
  6. package/dist/nextclaw-distribution.utils-BJZhAnGk.js.map +1 -0
  7. package/package.json +20 -20
  8. package/resources/USAGE.md +54 -3
  9. package/resources/usage/http-webhook-ingress.md +145 -0
  10. package/ui-dist/assets/{api-CKKNxbsy.js → api-rASx2-N4.js} +1 -1
  11. package/ui-dist/assets/{app-manager-provider-BM1hziPv.js → app-manager-provider-CUkcbdWk.js} +1 -1
  12. package/ui-dist/assets/{channels-list-page-GD_IBCbY.js → channels-list-page-ZWYqfcCe.js} +1 -1
  13. package/ui-dist/assets/{chat-page-Ty6QH2Tc.js → chat-page-ACm58eUO.js} +1 -1
  14. package/ui-dist/assets/cpu-DKc3bQic.js +3 -0
  15. package/ui-dist/assets/desktop-C-cDRCBY.js +3 -0
  16. package/ui-dist/assets/{desktop-update-config-jWt63bXG.js → desktop-update-config-DAD9JN9Q.js} +1 -1
  17. package/ui-dist/assets/{dialog-DWZeMf9V.js → dialog-CR80q3Rm.js} +1 -1
  18. package/ui-dist/assets/{dist-DN-YM_0Y.js → dist-NBjcwlsw.js} +1 -1
  19. package/ui-dist/assets/doc-browser-D2pq4IHR.js +1 -0
  20. package/ui-dist/assets/doc-browser-DhIkcy0-.js +1 -0
  21. package/ui-dist/assets/{doc-browser-context-FukQHvyo.js → doc-browser-context-BPeeiNJ_.js} +1 -1
  22. package/ui-dist/assets/{doc-browser-CAhfnm0D.js → doc-browser-fLs0TcdS.js} +1 -1
  23. package/ui-dist/assets/{es2015-ZJ-nWL4L.js → es2015-CVAuMqlM.js} +1 -1
  24. package/ui-dist/assets/index-DV57tBmg.css +1 -0
  25. package/ui-dist/assets/index-Db9Cufsy.js +100 -0
  26. package/ui-dist/assets/{marketplace-page-DzwJTbAg.js → marketplace-page-CAp_gpNe.js} +2 -2
  27. package/ui-dist/assets/marketplace-page-PPY5uMHK.js +1 -0
  28. package/ui-dist/assets/mcp-marketplace-page-87__92b1.js +1 -0
  29. package/ui-dist/assets/{mcp-marketplace-page-BUMkGb6q.js → mcp-marketplace-page-C6HENB6V.js} +1 -1
  30. package/ui-dist/assets/{model-config-Cgiw7ejv.js → model-config-CK3a8DWH.js} +1 -1
  31. package/ui-dist/assets/{notice-card-BM2_YNoc.js → notice-card-CF4AJPM3.js} +1 -1
  32. package/ui-dist/assets/{popover-2H9DS7Cv.js → popover-DeAliE_4.js} +1 -1
  33. package/ui-dist/assets/{provider-scoped-model-input-DsZJ44ZV.js → provider-scoped-model-input-B8LJ6RCt.js} +1 -1
  34. package/ui-dist/assets/{providers-list-BrViWRyR.js → providers-list-BTPjqNdK.js} +1 -1
  35. package/ui-dist/assets/remote-DiPWGRZc.js +1 -0
  36. package/ui-dist/assets/runtime-config-page-Bb9he7t8.js +1 -0
  37. package/ui-dist/assets/{search-config-Deb56TtE.js → search-config-BkbSXa9d.js} +1 -1
  38. package/ui-dist/assets/{secrets-config-JJkgNCnO.js → secrets-config-DFbHCb9n.js} +1 -1
  39. package/ui-dist/assets/{select-C2c10F3e.js → select-HI5kiwX_.js} +1 -1
  40. package/ui-dist/assets/{setting-row-CB_ZFbIZ.js → setting-row-B4QnghjV.js} +1 -1
  41. package/ui-dist/assets/{tag-chip-CrQfVN3A.js → tag-chip-BPgMfp9l.js} +1 -1
  42. package/ui-dist/assets/{use-config-jAYudJxy.js → use-config-BFqzVF8Y.js} +1 -1
  43. package/ui-dist/assets/{use-infinite-scroll-loader-B97V1Ywd.js → use-infinite-scroll-loader-DXhw9W4l.js} +1 -1
  44. package/ui-dist/index.html +16 -16
  45. package/ui-dist/assets/cpu-DPPwMzoC.js +0 -3
  46. package/ui-dist/assets/desktop-BwONApN9.js +0 -3
  47. package/ui-dist/assets/doc-browser-p9DDNPWB.js +0 -1
  48. package/ui-dist/assets/doc-browser-rZIQIjuw.js +0 -1
  49. package/ui-dist/assets/index-B7CVI2ys.css +0 -1
  50. package/ui-dist/assets/index-SS1xPoWD.js +0 -100
  51. package/ui-dist/assets/marketplace-page-DZEljaFz.js +0 -1
  52. package/ui-dist/assets/mcp-marketplace-page-NfOsALIL.js +0 -1
  53. package/ui-dist/assets/remote-Dm6hKGew.js +0 -1
  54. package/ui-dist/assets/runtime-config-page-CvvW9VBj.js +0 -1
@@ -1,3 +1,3 @@
1
- import{_ as e,m as t,p as n,r}from"./i18n-D1144VAA.js";import{At as i,Dt as a,Et as o,Lt as s,Mt as c,Nt as l,Ot as u,Tt as d,ft as f,jt as p,kt as m,wt as h}from"./api-CKKNxbsy.js";import{a as g,i as _,n as v,r as y,t as b}from"./select-C2c10F3e.js";import{t as x}from"./plus-B-YHtTNC.js";import{t as S}from"./save-CO_4qf6b.js";import{C,n as w}from"./use-config-jAYudJxy.js";import{X as T}from"./index-SS1xPoWD.js";var E=e(t(),1),D=n(),O=[`env`,`file`,`exec`];function k(e=``){return{alias:e,source:`env`,prefix:``,path:``,command:``,argsText:``,cwd:``,timeoutMs:5e3}}function A(){return{path:``,source:`env`,provider:``,id:``}}function j(e,t){return t.source===`env`?{...k(e),source:`env`,prefix:t.prefix??``}:t.source===`file`?{...k(e),source:`file`,path:t.path}:{...k(e),source:`exec`,command:t.command,argsText:(t.args??[]).join(`
1
+ import{_ as e,m as t,p as n,r}from"./i18n-D1144VAA.js";import{At as i,Dt as a,Et as o,Lt as s,Mt as c,Nt as l,Ot as u,Tt as d,ft as f,jt as p,kt as m,wt as h}from"./api-rASx2-N4.js";import{a as g,i as _,n as v,r as y,t as b}from"./select-HI5kiwX_.js";import{t as x}from"./plus-B-YHtTNC.js";import{t as S}from"./save-CO_4qf6b.js";import{C,n as w}from"./use-config-BFqzVF8Y.js";import{X as T}from"./index-Db9Cufsy.js";var E=e(t(),1),D=n(),O=[`env`,`file`,`exec`];function k(e=``){return{alias:e,source:`env`,prefix:``,path:``,command:``,argsText:``,cwd:``,timeoutMs:5e3}}function A(){return{path:``,source:`env`,provider:``,id:``}}function j(e,t){return t.source===`env`?{...k(e),source:`env`,prefix:t.prefix??``}:t.source===`file`?{...k(e),source:`file`,path:t.path}:{...k(e),source:`exec`,command:t.command,argsText:(t.args??[]).join(`
2
2
  `),cwd:t.cwd??``,timeoutMs:t.timeoutMs??5e3}}function M(e){return e.source===`env`?{source:`env`,...e.prefix.trim()?{prefix:e.prefix.trim()}:{}}:e.source===`file`?{source:`file`,path:e.path.trim(),format:`json`}:{source:`exec`,command:e.command.trim(),args:e.argsText.split(`
3
3
  `).map(e=>e.trim()).filter(Boolean),...e.cwd.trim()?{cwd:e.cwd.trim()}:{},timeoutMs:Math.max(1,Math.trunc(e.timeoutMs||5e3))}}function N(e){return e?{enabled:!!e.enabled,defaultEnv:e.defaults.env??``,defaultFile:e.defaults.file??``,defaultExec:e.defaults.exec??``,providers:Object.entries(e.providers).map(([e,t])=>j(e,t)),refs:Object.entries(e.refs).map(([e,t])=>({path:e,source:t.source,provider:t.provider??``,id:t.id}))}:{enabled:!0,defaultEnv:``,defaultFile:``,defaultExec:``,providers:[],refs:[]}}function P(e){return{enabled:e.enabled,defaults:{env:e.defaultEnv||null,file:e.defaultFile||null,exec:e.defaultExec||null},providers:Object.fromEntries(e.providers.map(e=>[e.alias.trim(),M(e)]).filter(([e])=>e)),refs:Object.fromEntries(e.refs.map(e=>[e.path.trim(),{source:e.source,...e.provider.trim()?{provider:e.provider.trim()}:{},id:e.id.trim()}]).filter(([e,t])=>e&&t.id))}}function F(e){let{defaultEnv:t,defaultFile:n,defaultExec:i,providerAliases:s,onChange:c}=e;return(0,D.jsxs)(h,{children:[(0,D.jsxs)(a,{children:[(0,D.jsx)(u,{children:r(`secrets`)}),(0,D.jsx)(o,{children:r(`secretsEnabledHelp`)})]}),(0,D.jsx)(d,{className:`space-y-4`,children:[{label:r(`defaultEnvProvider`),value:t,key:`defaultEnv`},{label:r(`defaultFileProvider`),value:n,key:`defaultFile`},{label:r(`defaultExecProvider`),value:i,key:`defaultExec`}].map(e=>(0,D.jsxs)(`div`,{className:`space-y-2`,children:[(0,D.jsx)(p,{children:e.label}),(0,D.jsxs)(b,{value:e.value||`__none__`,onValueChange:t=>c(e.key,t===`__none__`?``:t),children:[(0,D.jsx)(_,{children:(0,D.jsx)(g,{placeholder:r(`noneOption`)})}),(0,D.jsxs)(v,{children:[(0,D.jsx)(y,{value:`__none__`,children:r(`noneOption`)}),s.map(e=>(0,D.jsx)(y,{value:e,children:e},e))]})]})]},e.key))})]})}function I(e){let{providers:t,onUpdate:n,onRemove:i,onAdd:s}=e;return(0,D.jsxs)(h,{children:[(0,D.jsxs)(a,{children:[(0,D.jsx)(u,{children:r(`secretProvidersTitle`)}),(0,D.jsx)(o,{children:r(`secretProvidersDescription`)})]}),(0,D.jsxs)(d,{className:`space-y-3`,children:[t.map((e,t)=>(0,D.jsxs)(`div`,{className:`space-y-3 rounded-xl border border-gray-200 p-3`,children:[(0,D.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-3`,children:[(0,D.jsx)(c,{value:e.alias,onChange:e=>n(t,{alias:e.target.value}),placeholder:r(`providerAlias`)}),(0,D.jsxs)(b,{value:e.source,onValueChange:e=>n(t,{source:e}),children:[(0,D.jsx)(_,{children:(0,D.jsx)(g,{})}),(0,D.jsx)(v,{children:O.map(e=>(0,D.jsx)(y,{value:e,children:e},e))})]}),(0,D.jsxs)(l,{type:`button`,variant:`outline`,onClick:()=>i(t),children:[(0,D.jsx)(T,{className:`mr-2 h-4 w-4`}),r(`removeProvider`)]})]}),e.source===`env`?(0,D.jsx)(c,{value:e.prefix,onChange:e=>n(t,{prefix:e.target.value}),placeholder:r(`envPrefix`)}):null,e.source===`file`?(0,D.jsx)(c,{value:e.path,onChange:e=>n(t,{path:e.target.value}),placeholder:r(`secretFilePath`)}):null,e.source===`exec`?(0,D.jsxs)(`div`,{className:`space-y-2`,children:[(0,D.jsx)(c,{value:e.command,onChange:e=>n(t,{command:e.target.value}),placeholder:r(`secretExecCommand`)}),(0,D.jsx)(`textarea`,{className:`min-h-[84px] w-full rounded-lg border border-gray-200 bg-white px-3 py-2 text-xs font-mono`,value:e.argsText,onChange:e=>n(t,{argsText:e.target.value}),placeholder:r(`secretExecArgs`)}),(0,D.jsxs)(`div`,{className:`grid grid-cols-1 gap-2 md:grid-cols-2`,children:[(0,D.jsx)(c,{value:e.cwd,onChange:e=>n(t,{cwd:e.target.value}),placeholder:r(`secretExecCwd`)}),(0,D.jsx)(c,{type:`number`,min:1,value:e.timeoutMs,onChange:e=>n(t,{timeoutMs:Number.parseInt(e.target.value,10)||5e3}),placeholder:r(`secretExecTimeoutMs`)})]})]}):null]},`provider-${t}`)),(0,D.jsxs)(l,{type:`button`,variant:`outline`,onClick:s,children:[(0,D.jsx)(x,{className:`mr-2 h-4 w-4`}),r(`addSecretProvider`)]})]})]})}function L(e){let{refs:t,providerAliases:n,onUpdate:i,onRemove:s,onAdd:f}=e;return(0,D.jsxs)(h,{children:[(0,D.jsxs)(a,{children:[(0,D.jsx)(u,{children:r(`secretRefsTitle`)}),(0,D.jsx)(o,{children:r(`secretRefsDescription`)})]}),(0,D.jsxs)(d,{className:`space-y-3`,children:[t.map((e,t)=>(0,D.jsx)(`div`,{className:`space-y-3 rounded-xl border border-gray-200 p-3`,children:(0,D.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2`,children:[(0,D.jsx)(c,{value:e.path,onChange:e=>i(t,{path:e.target.value}),placeholder:r(`secretConfigPath`)}),(0,D.jsx)(c,{value:e.id,onChange:e=>i(t,{id:e.target.value}),placeholder:r(`secretId`)}),(0,D.jsxs)(b,{value:e.source,onValueChange:e=>i(t,{source:e}),children:[(0,D.jsx)(_,{children:(0,D.jsx)(g,{})}),(0,D.jsx)(v,{children:O.map(e=>(0,D.jsx)(y,{value:e,children:e},e))})]}),(0,D.jsxs)(`div`,{className:`grid grid-cols-[1fr_auto] gap-2`,children:[(0,D.jsxs)(b,{value:e.provider||`__none__`,onValueChange:e=>i(t,{provider:e===`__none__`?``:e}),children:[(0,D.jsx)(_,{children:(0,D.jsx)(g,{placeholder:r(`secretProviderAlias`)})}),(0,D.jsxs)(v,{children:[(0,D.jsx)(y,{value:`__none__`,children:r(`noneOption`)}),n.map(e=>(0,D.jsx)(y,{value:e,children:e},e))]})]}),(0,D.jsx)(l,{type:`button`,variant:`outline`,onClick:()=>s(t),children:(0,D.jsx)(T,{className:`h-4 w-4`})})]})]})},`ref-${t}`)),(0,D.jsxs)(l,{type:`button`,variant:`outline`,onClick:f,children:[(0,D.jsx)(x,{className:`mr-2 h-4 w-4`}),r(`addSecretRef`)]})]})]})}function R(e){let{initialState:t,isPending:n,onSubmit:c}=e,[p,g]=(0,E.useState)(t),_=(0,E.useMemo)(()=>{let e=p.providers.map(e=>e.alias.trim()).filter(Boolean);return Array.from(new Set(e))},[p.providers]);return(0,D.jsxs)(i,{className:`space-y-6`,children:[(0,D.jsx)(m,{title:r(`secretsPageTitle`),description:r(`secretsPageDescription`)}),(0,D.jsxs)(h,{children:[(0,D.jsxs)(a,{children:[(0,D.jsx)(u,{children:r(`secrets`)}),(0,D.jsx)(o,{children:r(`secretsEnabledHelp`)})]}),(0,D.jsxs)(d,{className:`space-y-4`,children:[(0,D.jsxs)(`div`,{className:`flex items-center justify-between rounded-xl border border-gray-200 p-3`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`p`,{className:`text-sm font-medium text-gray-800`,children:r(`enabled`)}),(0,D.jsx)(`p`,{className:`text-xs text-gray-500`,children:r(`secretsEnabledHelp`)})]}),(0,D.jsx)(f,{checked:p.enabled,onCheckedChange:e=>g(t=>({...t,enabled:e}))})]}),(0,D.jsx)(F,{defaultEnv:p.defaultEnv,defaultFile:p.defaultFile,defaultExec:p.defaultExec,providerAliases:_,onChange:(e,t)=>g(n=>({...n,[e]:t}))})]})]}),(0,D.jsx)(I,{providers:p.providers,onUpdate:(e,t)=>{g(n=>({...n,providers:n.providers.map((n,r)=>r===e?{...n,...t}:n)}))},onRemove:e=>g(t=>({...t,providers:t.providers.filter((t,n)=>n!==e)})),onAdd:()=>g(e=>({...e,providers:[...e.providers,k()]}))}),(0,D.jsx)(L,{refs:p.refs,providerAliases:_,onUpdate:(e,t)=>{g(n=>({...n,refs:n.refs.map((n,r)=>r===e?{...n,...t}:n)}))},onRemove:e=>g(t=>({...t,refs:t.refs.filter((t,n)=>n!==e)})),onAdd:()=>g(e=>({...e,refs:[...e.refs,A()]}))}),(0,D.jsx)(`div`,{className:`flex justify-end`,children:(0,D.jsxs)(l,{type:`button`,onClick:()=>{try{let e={};for(let[t,n]of p.providers.entries()){let i=n.alias.trim();if(!i)throw Error(`${r(`providerAlias`)} #${t+1} ${r(`isRequired`)}`);if(e[i])throw Error(`${r(`providerAlias`)}: ${i} (${r(`duplicate`)})`);if(n.source===`file`&&!n.path.trim())throw Error(`${r(`secretFilePath`)} #${t+1} ${r(`isRequired`)}`);if(n.source===`exec`&&!n.command.trim())throw Error(`${r(`secretExecCommand`)} #${t+1} ${r(`isRequired`)}`);e[i]=M(n)}let t={};for(let[n,i]of p.refs.entries()){let a=i.path.trim(),o=i.id.trim();if(!a)throw Error(`${r(`secretConfigPath`)} #${n+1} ${r(`isRequired`)}`);if(!o)throw Error(`${r(`secretId`)} #${n+1} ${r(`isRequired`)}`);let s=i.provider.trim();if(s&&!e[s])throw Error(`${r(`secretProviderAlias`)}: ${s} ${r(`notFound`)}`);t[a]={source:i.source,...s?{provider:s}:{},id:o}}c({enabled:p.enabled,defaultEnv:p.defaultEnv.trim(),defaultFile:p.defaultFile.trim(),defaultExec:p.defaultExec.trim(),providers:Object.entries(e).map(([e,t])=>j(e,t)),refs:Object.entries(t).map(([e,t])=>({path:e,source:t.source,provider:t.provider??``,id:t.id}))})}catch(e){s.error(e instanceof Error?e.message:String(e))}},disabled:n,children:[(0,D.jsx)(S,{className:`mr-2 h-4 w-4`}),r(n?`saving`:`save`)]})})]})}function z(){let{data:e,isLoading:t}=w(),n=C();return t?(0,D.jsx)(`div`,{className:`p-8 text-gray-400`,children:r(`loading`)}):(0,D.jsx)(R,{initialState:N(e?.secrets),isPending:n.isPending,onSubmit:e=>n.mutate({data:P(e)})},JSON.stringify(e?.secrets??null))}export{z as SecretsConfig};
@@ -1 +1 @@
1
- import{_ as e,m as t,p as n,u as r}from"./i18n-D1144VAA.js";import{on as i}from"./api-CKKNxbsy.js";import{_ as a,a as o,c as s,d as c,f as l,g as u,h as d,i as f,l as p,n as m,o as h,p as g,r as _,s as v,t as y}from"./es2015-ZJ-nWL4L.js";import{t as b}from"./createLucideIcon-DzY6wN61.js";var x=b(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),S=b(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),C=b(`ChevronUp`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),w=[`top`,`right`,`bottom`,`left`],T=Math.min,E=Math.max,D=Math.round,O=Math.floor,k=e=>({x:e,y:e}),A={left:`right`,right:`left`,bottom:`top`,top:`bottom`},j={start:`end`,end:`start`};function M(e,t,n){return E(e,T(t,n))}function N(e,t){return typeof e==`function`?e(t):e}function P(e){return e.split(`-`)[0]}function F(e){return e.split(`-`)[1]}function I(e){return e===`x`?`y`:`x`}function L(e){return e===`y`?`height`:`width`}var R=new Set([`top`,`bottom`]);function z(e){return R.has(P(e))?`y`:`x`}function ee(e){return I(z(e))}function te(e,t,n){n===void 0&&(n=!1);let r=F(e),i=ee(e),a=L(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ue(o)),[o,ue(o)]}function ne(e){let t=ue(e);return[re(e),t,re(t)]}function re(e){return e.replace(/start|end/g,e=>j[e])}var ie=[`left`,`right`],ae=[`right`,`left`],oe=[`top`,`bottom`],se=[`bottom`,`top`];function ce(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ae:ie:t?ie:ae;case`left`:case`right`:return t?oe:se;default:return[]}}function le(e,t,n,r){let i=F(e),a=ce(P(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(re)))),a}function ue(e){return e.replace(/left|right|bottom|top/g,e=>A[e])}function de(e){return{top:0,right:0,bottom:0,left:0,...e}}function fe(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:de(e)}function pe(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function me(e,t,n){let{reference:r,floating:i}=e,a=z(t),o=ee(t),s=L(o),c=P(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(F(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function he(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=N(t,e),p=fe(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=pe(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=pe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ge=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=me(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:{...o,detectOverflow:o.detectOverflow??he},elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=me(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}},_e=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=N(e,t)||{};if(l==null)return{};let d=fe(u),f={x:n,y:r},p=ee(i),m=L(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,E=C/2-h[m]/2-1,D=T(d[_],E),O=T(d[v],E),k=D,A=C-h[m]-O,j=C/2-h[m]/2+w,P=M(k,j,A),I=!c.arrow&&F(i)!=null&&j!==P&&a.reference[m]/2-(j<k?D:O)-h[m]/2<0,R=I?j<k?j-k:j-A:0;return{[p]:f[p]+R,data:{[p]:P,centerOffset:j-P-R,...I&&{alignmentOffset:R}},reset:I}}}),ve=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=N(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=P(r),_=z(o),v=P(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ue(o)]:ne(o)),x=p!==`none`;!d&&x&&b.push(...le(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=te(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==z(t))||T.every(e=>z(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=z(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ye(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function be(e){return w.some(t=>e[t]>=0)}var xe=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=N(e,t);switch(i){case`referenceHidden`:{let e=ye(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:be(e)}}}case`escaped`:{let e=ye(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:be(e)}}}default:return{}}}}},Se=new Set([`left`,`top`]);async function Ce(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=P(n),s=F(n),c=z(n)===`y`,l=Se.has(o)?-1:1,u=a&&c?-1:1,d=N(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var we=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ce(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Te=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=N(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=z(P(i)),p=I(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=M(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=M(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ee=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=N(e,t),u={x:n,y:r},d=z(i),f=I(d),p=u[f],m=u[d],h=N(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Se.has(P(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},De=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=N(e,t),u=await o.detectOverflow(t,l),d=P(i),f=F(i),p=z(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=T(h-u[g],v),x=T(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=E(u.left,0),t=E(u.right,0),n=E(u.top,0),r=E(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:E(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:E(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let D=await o.getDimensions(s.floating);return m!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function Oe(){return typeof window<`u`}function ke(e){return Ae(e)?(e.nodeName||``).toLowerCase():`#document`}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function V(e){return((Ae(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ae(e){return Oe()?e instanceof Node||e instanceof B(e).Node:!1}function H(e){return Oe()?e instanceof Element||e instanceof B(e).Element:!1}function U(e){return Oe()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function je(e){return!Oe()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}var Me=new Set([`inline`,`contents`]);function Ne(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Me.has(i)}var Pe=new Set([`table`,`td`,`th`]);function Fe(e){return Pe.has(ke(e))}var Ie=[`:popover-open`,`:modal`];function Le(e){return Ie.some(t=>{try{return e.matches(t)}catch{return!1}})}var Re=[`transform`,`translate`,`scale`,`rotate`,`perspective`],ze=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],Be=[`paint`,`layout`,`strict`,`content`];function Ve(e){let t=Ue(),n=H(e)?W(e):e;return Re.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||ze.some(e=>(n.willChange||``).includes(e))||Be.some(e=>(n.contain||``).includes(e))}function He(e){let t=G(e);for(;U(t)&&!Ge(t);){if(Ve(t))return t;if(Le(t))return null;t=G(t)}return null}function Ue(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var We=new Set([`html`,`body`,`#document`]);function Ge(e){return We.has(ke(e))}function W(e){return B(e).getComputedStyle(e)}function Ke(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if(ke(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||je(e)&&e.host||V(e);return je(t)?t.host:t}function qe(e){let t=G(e);return Ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&Ne(t)?t:qe(t)}function Je(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=qe(e),i=r===e.ownerDocument?.body,a=B(r);if(i){let e=Ye(a);return t.concat(a,a.visualViewport||[],Ne(r)?r:[],e&&n?Je(e):[])}return t.concat(r,Je(r,[],n))}function Ye(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xe(e){let t=W(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=U(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=D(n)!==a||D(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ze(e){return H(e)?e:e.contextElement}function Qe(e){let t=Ze(e);if(!U(t))return k(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Xe(t),o=(a?D(n.width):n.width)/r,s=(a?D(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var $e=k(0);function et(e){let t=B(e);return!Ue()||!t.visualViewport?$e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tt(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function K(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ze(e),o=k(1);t&&(r?H(r)&&(o=Qe(r)):o=Qe(e));let s=tt(a,n,r)?et(a):k(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=B(a),t=r&&H(r)?B(r):r,n=e,i=Ye(n);for(;i&&r&&t!==n;){let e=Qe(i),t=i.getBoundingClientRect(),r=W(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=B(i),i=Ye(n)}}return pe({width:u,height:d,x:c,y:l})}function nt(e,t){let n=Ke(e).scrollLeft;return t?t.left+n:K(V(e)).left+n}function rt(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-nt(e,n),y:n.top+t.scrollTop}}function it(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=V(r),s=t?Le(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=k(1),u=k(0),d=U(r);if((d||!d&&!a)&&((ke(r)!==`body`||Ne(o))&&(c=Ke(r)),U(r))){let e=K(r);l=Qe(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?rt(o,c):k(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function at(e){return Array.from(e.getClientRects())}function ot(e){let t=V(e),n=Ke(e),r=e.ownerDocument.body,i=E(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=E(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+nt(e),s=-n.scrollTop;return W(r).direction===`rtl`&&(o+=E(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var st=25;function ct(e,t){let n=B(e),r=V(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ue();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=nt(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=st&&(a-=o)}else l<=st&&(a+=l);return{width:a,height:o,x:s,y:c}}var lt=new Set([`absolute`,`fixed`]);function ut(e,t){let n=K(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=U(e)?Qe(e):k(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function dt(e,t,n){let r;if(t===`viewport`)r=ct(e,n);else if(t===`document`)r=ot(V(e));else if(H(t))r=ut(t,n);else{let n=et(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return pe(r)}function ft(e,t){let n=G(e);return n===t||!H(n)||Ge(n)?!1:W(n).position===`fixed`||ft(n,t)}function pt(e,t){let n=t.get(e);if(n)return n;let r=Je(e,[],!1).filter(e=>H(e)&&ke(e)!==`body`),i=null,a=W(e).position===`fixed`,o=a?G(e):e;for(;H(o)&&!Ge(o);){let t=W(o),n=Ve(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&lt.has(i.position)||Ne(o)&&!n&&ft(e,o))?r=r.filter(e=>e!==o):i=t,o=G(o)}return t.set(e,r),r}function mt(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Le(t)?[]:pt(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=dt(t,n,i);return e.top=E(r.top,e.top),e.right=T(r.right,e.right),e.bottom=T(r.bottom,e.bottom),e.left=E(r.left,e.left),e},dt(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function ht(e){let{width:t,height:n}=Xe(e);return{width:t,height:n}}function gt(e,t,n){let r=U(t),i=V(t),a=n===`fixed`,o=K(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=k(0);function l(){c.x=nt(i)}if(r||!r&&!a)if((ke(t)!==`body`||Ne(i))&&(s=Ke(t)),r){let e=K(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?rt(i,s):k(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function _t(e){return W(e).position===`static`}function vt(e,t){if(!U(e)||W(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return V(e)===n&&(n=n.ownerDocument.body),n}function yt(e,t){let n=B(e);if(Le(e))return n;if(!U(e)){let t=G(e);for(;t&&!Ge(t);){if(H(t)&&!_t(t))return t;t=G(t)}return n}let r=vt(e,t);for(;r&&Fe(r)&&_t(r);)r=vt(r,t);return r&&Ge(r)&&_t(r)&&!Ve(r)?n:r||He(e)||n}var bt=async function(e){let t=this.getOffsetParent||yt,n=this.getDimensions,r=await n(e.floating);return{reference:gt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xt(e){return W(e).direction===`rtl`}var St={convertOffsetParentRelativeRectToViewportRelativeRect:it,getDocumentElement:V,getClippingRect:mt,getOffsetParent:yt,getElementRects:bt,getClientRects:at,getDimensions:ht,getScale:Qe,isElement:H,isRTL:xt};function Ct(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wt(e,t){let n=null,r,i=V(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=O(d),h=O(i.clientWidth-(u+f)),g=O(i.clientHeight-(d+p)),_=O(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:E(0,T(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ct(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Tt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ze(e),u=i||a?[...l?Je(l):[],...Je(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?wt(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?K(e):null;c&&g();function g(){let t=K(e);h&&!Ct(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Et=we,Dt=Te,Ot=ve,kt=De,At=xe,jt=_e,Mt=Ee,Nt=(e,t,n)=>{let r=new Map,i={platform:St,...n},a={...i.platform,_c:r};return ge(e,t,{...i,platform:a})},q=e(t(),1),Pt=e(i(),1),Ft=typeof document<`u`?q.useLayoutEffect:function(){};function It(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,i;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(!It(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!It(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Lt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rt(e,t){let n=Lt(e);return Math.round(t*n)/n}function zt(e){let t=q.useRef(e);return Ft(()=>{t.current=e}),t}function Bt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=q.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=q.useState(r);It(f,r)||p(r);let[m,h]=q.useState(null),[g,_]=q.useState(null),v=q.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=q.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=q.useRef(null),C=q.useRef(null),w=q.useRef(u),T=c!=null,E=zt(c),D=zt(i),O=zt(l),k=q.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Nt(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!It(w.current,t)&&(w.current=t,Pt.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Ft(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=q.useRef(!1);Ft(()=>(A.current=!0,()=>{A.current=!1}),[]),Ft(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=q.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=q.useMemo(()=>({reference:b,floating:x}),[b,x]),N=q.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Rt(M.floating,u.x),r=Rt(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Lt(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return q.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Vt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:jt({element:r.current,padding:i}).fn(n):r?jt({element:r,padding:i}).fn(n):{}}}},Ht=(e,t)=>({...Et(e),options:[e,t]}),Ut=(e,t)=>({...Dt(e),options:[e,t]}),Wt=(e,t)=>({...Mt(e),options:[e,t]}),Gt=(e,t)=>({...Ot(e),options:[e,t]}),Kt=(e,t)=>({...kt(e),options:[e,t]}),qt=(e,t)=>({...At(e),options:[e,t]}),Jt=(e,t)=>({...Vt(e),options:[e,t]}),J=n(),Yt=`Arrow`,Xt=q.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,J.jsx)(s.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,J.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Xt.displayName=Yt;var Zt=Xt;function Qt(e){let[t,n]=q.useState(void 0);return g(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var $t=`Popper`,[en,tn]=d($t),[nn,rn]=en($t),an=e=>{let{__scopePopper:t,children:n}=e,[r,i]=q.useState(null);return(0,J.jsx)(nn,{scope:t,anchor:r,onAnchorChange:i,children:n})};an.displayName=$t;var on=`PopperAnchor`,sn=q.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=rn(on,n),o=q.useRef(null),c=u(t,o),l=q.useRef(null);return q.useEffect(()=>{let e=l.current;l.current=r?.current||o.current,e!==l.current&&a.onAnchorChange(l.current)}),r?null:(0,J.jsx)(s.div,{...i,ref:c})});sn.displayName=on;var cn=`PopperContent`,[ln,un]=en(cn),dn=q.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:_,...y}=e,b=rn(cn,n),[x,S]=q.useState(null),C=u(t,e=>S(e)),[w,T]=q.useState(null),E=Qt(w),D=E?.width??0,O=E?.height??0,k=r+(a===`center`?``:`-`+a),A=typeof f==`number`?f:{top:0,right:0,bottom:0,left:0,...f},j=Array.isArray(d)?d:[d],M=j.length>0,N={padding:A,boundary:j.filter(hn),altBoundary:M},{refs:P,floatingStyles:F,placement:I,isPositioned:L,middlewareData:R}=Bt({strategy:`fixed`,placement:k,whileElementsMounted:(...e)=>Tt(...e,{animationFrame:h===`always`}),elements:{reference:b.anchor},middleware:[Ht({mainAxis:i+O,alignmentAxis:o}),l&&Ut({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?Wt():void 0,...N}),l&&Gt({...N}),Kt({...N,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),w&&Jt({element:w,padding:c}),gn({arrowWidth:D,arrowHeight:O}),m&&qt({strategy:`referenceHidden`,...N})]}),[z,ee]=_n(I),te=v(_);g(()=>{L&&te?.()},[L,te]);let ne=R.arrow?.x,re=R.arrow?.y,ie=R.arrow?.centerOffset!==0,[ae,oe]=q.useState();return g(()=>{x&&oe(window.getComputedStyle(x).zIndex)},[x]),(0,J.jsx)(`div`,{ref:P.setFloating,"data-radix-popper-content-wrapper":``,style:{...F,transform:L?F.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(` `),...R.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,J.jsx)(ln,{scope:n,placedSide:z,onArrowChange:T,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:(0,J.jsx)(s.div,{"data-side":z,"data-align":ee,...y,ref:C,style:{...y.style,animation:L?void 0:`none`}})})})});dn.displayName=cn;var fn=`PopperArrow`,pn={top:`bottom`,right:`left`,bottom:`top`,left:`right`},mn=q.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=un(fn,n),a=pn[i.placedSide];return(0,J.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,J.jsx)(Zt,{...r,ref:t,style:{...r.style,display:`block`}})})});mn.displayName=fn;function hn(e){return e!==null}var gn=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=_n(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function _n(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var vn=an,yn=sn,bn=dn,xn=mn;function Sn(e,[t,n]){return Math.min(n,Math.max(t,e))}function Cn(e){let t=e+`CollectionProvider`,[n,r]=d(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=q.useRef(null),a=q.useRef(new Map).current;return(0,J.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=p(s),l=q.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,J.jsx)(c,{ref:u(t,a(s,n).collectionRef),children:r})});l.displayName=s;let f=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=p(f),g=q.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=q.useRef(null),s=u(t,o),c=a(f,n);return q.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,J.jsx)(h,{[m]:``,ref:s,children:r})});g.displayName=f;function _(t){let n=a(e+`CollectionConsumer`,t);return q.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:g},_,r]}var wn=q.createContext(void 0);function Tn(e){let t=q.useContext(wn);return e||t||`ltr`}function En(e){let t=q.useRef({value:e,previous:e});return q.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dn=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),On=`VisuallyHidden`,kn=q.forwardRef((e,t)=>(0,J.jsx)(s.span,{...e,ref:t,style:{...Dn,...e.style}}));kn.displayName=On;var An=kn,jn=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Mn=[` `,`Enter`],Y=`Select`,[Nn,Pn,Fn]=Cn(Y),[In,Ln]=d(Y,[Fn,tn]),Rn=tn(),[zn,X]=In(Y),[Bn,Vn]=In(Y),Hn=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:m,required:h,form:g}=e,_=Rn(t),[v,y]=q.useState(null),[b,x]=q.useState(null),[S,C]=q.useState(!1),w=Tn(d),[T,E]=c({prop:r,defaultProp:i??!1,onChange:a,caller:Y}),[D,O]=c({prop:o,defaultProp:s,onChange:u,caller:Y}),k=q.useRef(null),A=v?g||!!v.closest(`form`):!0,[j,M]=q.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,J.jsx)(vn,{..._,children:(0,J.jsxs)(zn,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:l(),value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:m,children:[(0,J.jsx)(Nn.Provider,{scope:t,children:(0,J.jsx)(Bn,{scope:e.__scopeSelect,onNativeOptionAdd:q.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:q.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,J.jsxs)(Pr,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:D,onChange:e=>O(e.target.value),disabled:m,form:g,children:[D===void 0?(0,J.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};Hn.displayName=Y;var Un=`SelectTrigger`,Wn=q.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,o=Rn(n),c=X(Un,n),l=c.disabled||r,d=u(t,c.onTriggerChange),f=Pn(n),p=q.useRef(`touch`),[m,h,g]=Ir(e=>{let t=f().filter(e=>!e.disabled),n=Lr(t,e,t.find(e=>e.value===c.value));n!==void 0&&c.onValueChange(n.value)}),_=e=>{l||(c.onOpenChange(!0),g()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,J.jsx)(yn,{asChild:!0,...o,children:(0,J.jsx)(s.button,{type:`button`,role:`combobox`,"aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":`none`,dir:c.dir,"data-state":c.open?`open`:`closed`,disabled:l,"data-disabled":l?``:void 0,"data-placeholder":Fr(c.value)?``:void 0,...i,ref:d,onClick:a(i.onClick,e=>{e.currentTarget.focus(),p.current!==`mouse`&&_(e)}),onPointerDown:a(i.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(_(e),e.preventDefault())}),onKeyDown:a(i.onKeyDown,e=>{let t=m.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&h(e.key),!(t&&e.key===` `)&&jn.includes(e.key)&&(_(),e.preventDefault())})})})});Wn.displayName=Un;var Gn=`SelectValue`,Kn=q.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...c}=e,l=X(Gn,n),{onValueNodeHasChildrenChange:d}=l,f=a!==void 0,p=u(t,l.onValueNodeChange);return g(()=>{d(f)},[d,f]),(0,J.jsx)(s.span,{...c,ref:p,style:{pointerEvents:`none`},children:Fr(l.value)?(0,J.jsx)(J.Fragment,{children:o}):a})});Kn.displayName=Gn;var qn=`SelectIcon`,Jn=q.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,J.jsx)(s.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});Jn.displayName=qn;var Yn=`SelectPortal`,Xn=e=>(0,J.jsx)(f,{asChild:!0,...e});Xn.displayName=Yn;var Z=`SelectContent`,Zn=q.forwardRef((e,t)=>{let n=X(Z,e.__scopeSelect),[r,i]=q.useState();if(g(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Pt.createPortal((0,J.jsx)(Qn,{scope:e.__scopeSelect,children:(0,J.jsx)(Nn.Slot,{scope:e.__scopeSelect,children:(0,J.jsx)(`div`,{children:e.children})})}),t):null}return(0,J.jsx)(tr,{...e,ref:t})});Zn.displayName=Z;var Q=10,[Qn,$]=In(Z),$n=`SelectContentImpl`,er=p(`SelectContent.RemoveScroll`),tr=q.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:c,side:l,sideOffset:d,align:f,alignOffset:p,arrowPadding:g,collisionBoundary:v,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:C,...w}=e,T=X(Z,n),[E,D]=q.useState(null),[O,k]=q.useState(null),A=u(t,e=>D(e)),[j,M]=q.useState(null),[N,P]=q.useState(null),F=Pn(n),[I,L]=q.useState(!1),R=q.useRef(!1);q.useEffect(()=>{if(E)return y(E)},[E]),_();let z=q.useCallback(e=>{let[t,...n]=F().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&O&&(O.scrollTop=0),n===r&&O&&(O.scrollTop=O.scrollHeight),n?.focus(),document.activeElement!==i))return},[F,O]),ee=q.useCallback(()=>z([j,E]),[z,j,E]);q.useEffect(()=>{I&&ee()},[I,ee]);let{onOpenChange:te,triggerPointerDownPosRef:ne}=T;q.useEffect(()=>{if(E){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ne.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ne.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():E.contains(n.target)||te(!1),document.removeEventListener(`pointermove`,t),ne.current=null};return ne.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[E,te,ne]),q.useEffect(()=>{let e=()=>te(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[te]);let[re,ie]=Ir(e=>{let t=F().filter(e=>!e.disabled),n=Lr(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ae=q.useCallback((e,t,n)=>{let r=!R.current&&!n;(T.value!==void 0&&T.value===t||r)&&(M(e),r&&(R.current=!0))},[T.value]),oe=q.useCallback(()=>E?.focus(),[E]),se=q.useCallback((e,t,n)=>{let r=!R.current&&!n;(T.value!==void 0&&T.value===t||r)&&P(e)},[T.value]),ce=r===`popper`?ar:rr,le=ce===ar?{side:l,sideOffset:d,align:f,alignOffset:p,arrowPadding:g,collisionBoundary:v,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:C}:{};return(0,J.jsx)(Qn,{scope:n,content:E,viewport:O,onViewportChange:k,itemRefCallback:ae,selectedItem:j,onItemLeave:oe,itemTextRefCallback:se,focusSelectedItem:ee,selectedItemText:N,position:r,isPositioned:I,searchRef:re,children:(0,J.jsx)(m,{as:er,allowPinchZoom:!0,children:(0,J.jsx)(o,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:a(i,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,J.jsx)(h,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,J.jsx)(ce,{role:`listbox`,id:T.contentId,"data-state":T.open?`open`:`closed`,dir:T.dir,onContextMenu:e=>e.preventDefault(),...w,...le,onPlaced:()=>L(!0),ref:A,style:{display:`flex`,flexDirection:`column`,outline:`none`,...w.style},onKeyDown:a(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ie(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});tr.displayName=$n;var nr=`SelectItemAlignedPosition`,rr=q.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=X(Z,n),o=$(Z,n),[c,l]=q.useState(null),[d,f]=q.useState(null),p=u(t,e=>f(e)),m=Pn(n),h=q.useRef(!1),_=q.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=o,S=q.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&v&&y&&b){let e=a.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=Sn(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=Sn(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let o=m(),s=window.innerHeight-Q*2,l=v.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),_=parseInt(u.paddingBottom,10),x=f+p+l+_+g,S=Math.min(y.offsetHeight*5,x),C=window.getComputedStyle(v),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Q,D=s-E,O=y.offsetHeight/2,k=y.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=o.length>0&&y===o[o.length-1].ref.current;c.style.bottom=`0px`;let t=d.clientHeight-v.offsetTop-v.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);c.style.height=n+`px`}else{let e=o.length>0&&y===o[0].ref.current;c.style.top=`0px`;let t=Math.max(E,f+v.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,v.scrollTop=A-E+v.offsetTop}c.style.margin=`${Q}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,c,d,v,y,b,a.dir,r]);g(()=>S(),[S]);let[C,w]=q.useState();return g(()=>{d&&w(window.getComputedStyle(d).zIndex)},[d]),(0,J.jsx)(or,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:q.useCallback(e=>{e&&_.current===!0&&(S(),x?.(),_.current=!1)},[S,x]),children:(0,J.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,J.jsx)(s.div,{...i,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});rr.displayName=nr;var ir=`SelectPopperPosition`,ar=q.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Q,...a}=e,o=Rn(n);return(0,J.jsx)(bn,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});ar.displayName=ir;var[or,sr]=In(Z,{}),cr=`SelectViewport`,lr=q.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,o=$(cr,n),c=sr(cr,n),l=u(t,o.onViewportChange),d=q.useRef(0);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,J.jsx)(Nn.Slot,{scope:n,children:(0,J.jsx)(s.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:a(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){let e=Math.abs(d.current-t.scrollTop);if(e>0){let r=window.innerHeight-Q*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}d.current=t.scrollTop})})})]})});lr.displayName=cr;var ur=`SelectGroup`,[dr,fr]=In(ur),pr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=l();return(0,J.jsx)(dr,{scope:n,id:i,children:(0,J.jsx)(s.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});pr.displayName=ur;var mr=`SelectLabel`,hr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=fr(mr,n);return(0,J.jsx)(s.div,{id:i.id,...r,ref:t})});hr.displayName=mr;var gr=`SelectItem`,[_r,vr]=In(gr),yr=q.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...c}=e,d=X(gr,n),f=$(gr,n),p=d.value===r,[m,h]=q.useState(o??``),[g,_]=q.useState(!1),v=u(t,e=>f.itemRefCallback?.(e,r,i)),y=l(),b=q.useRef(`touch`),x=()=>{i||(d.onValueChange(r),d.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,J.jsx)(_r,{scope:n,value:r,disabled:i,textId:y,isSelected:p,onItemTextChange:q.useCallback(e=>{h(t=>t||(e?.textContent??``).trim())},[]),children:(0,J.jsx)(Nn.ItemSlot,{scope:n,value:r,disabled:i,textValue:m,children:(0,J.jsx)(s.div,{role:`option`,"aria-labelledby":y,"data-highlighted":g?``:void 0,"aria-selected":p&&g,"data-state":p?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...c,ref:v,onFocus:a(c.onFocus,()=>_(!0)),onBlur:a(c.onBlur,()=>_(!1)),onClick:a(c.onClick,()=>{b.current!==`mouse`&&x()}),onPointerUp:a(c.onPointerUp,()=>{b.current===`mouse`&&x()}),onPointerDown:a(c.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:a(c.onPointerMove,e=>{b.current=e.pointerType,i?f.onItemLeave?.():b.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:a(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:a(c.onKeyDown,e=>{f.searchRef?.current!==``&&e.key===` `||(Mn.includes(e.key)&&x(),e.key===` `&&e.preventDefault())})})})})});yr.displayName=gr;var br=`SelectItemText`,xr=q.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=X(br,n),c=$(br,n),l=vr(br,n),d=Vn(br,n),[f,p]=q.useState(null),m=u(t,e=>p(e),l.onItemTextChange,e=>c.itemTextRefCallback?.(e,l.value,l.disabled)),h=f?.textContent,_=q.useMemo(()=>(0,J.jsx)(`option`,{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=d;return g(()=>(v(_),()=>y(_)),[v,y,_]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(s.span,{id:l.textId,...a,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Pt.createPortal(a.children,o.valueNode):null]})});xr.displayName=br;var Sr=`SelectItemIndicator`,Cr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return vr(Sr,n).isSelected?(0,J.jsx)(s.span,{"aria-hidden":!0,...r,ref:t}):null});Cr.displayName=Sr;var wr=`SelectScrollUpButton`,Tr=q.forwardRef((e,t)=>{let n=$(wr,e.__scopeSelect),r=sr(wr,e.__scopeSelect),[i,a]=q.useState(!1),o=u(t,r.onScrollButtonChange);return g(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,J.jsx)(Or,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Tr.displayName=wr;var Er=`SelectScrollDownButton`,Dr=q.forwardRef((e,t)=>{let n=$(Er,e.__scopeSelect),r=sr(Er,e.__scopeSelect),[i,a]=q.useState(!1),o=u(t,r.onScrollButtonChange);return g(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,J.jsx)(Or,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Dr.displayName=Er;var Or=q.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,o=$(`SelectScrollButton`,n),c=q.useRef(null),l=Pn(n),u=q.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return q.useEffect(()=>()=>u(),[u]),g(()=>{l().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[l]),(0,J.jsx)(s.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:a(i.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:a(i.onPointerMove,()=>{o.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:a(i.onPointerLeave,()=>{u()})})}),kr=`SelectSeparator`,Ar=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,J.jsx)(s.div,{"aria-hidden":!0,...r,ref:t})});Ar.displayName=kr;var jr=`SelectArrow`,Mr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Rn(n),a=X(jr,n),o=$(jr,n);return a.open&&o.position===`popper`?(0,J.jsx)(xn,{...i,...r,ref:t}):null});Mr.displayName=jr;var Nr=`SelectBubbleInput`,Pr=q.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=q.useRef(null),a=u(r,i),o=En(t);return q.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,J.jsx)(s.select,{...n,style:{...Dn,...n.style},ref:a,defaultValue:t})});Pr.displayName=Nr;function Fr(e){return e===``||e===void 0}function Ir(e){let t=v(e),n=q.useRef(``),r=q.useRef(0),i=q.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=q.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return q.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Lr(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Rr(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Rr(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zr=Hn,Br=Wn,Vr=Kn,Hr=Jn,Ur=Xn,Wr=Zn,Gr=lr,Kr=pr,qr=hr,Jr=yr,Yr=xr,Xr=Cr,Zr=Tr,Qr=Dr,$r=Ar,ei=zr,ti=Vr,ni=q.forwardRef(({className:e,children:t,indicator:n,...i},a)=>(0,J.jsxs)(Br,{ref:a,className:r(`flex h-9 w-full items-center justify-between whitespace-nowrap rounded-xl border border-gray-200/80 bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary/40 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 bg-white`,e),...i,children:[t,(0,J.jsx)(Hr,{asChild:!0,children:n??(0,J.jsx)(S,{className:`h-4 w-4 opacity-50`})})]}));ni.displayName=Br.displayName;var ri=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)(Zr,{ref:n,className:r(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,J.jsx)(C,{className:`h-4 w-4`})}));ri.displayName=Zr.displayName;var ii=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)(Qr,{ref:n,className:r(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,J.jsx)(S,{className:`h-4 w-4`})}));ii.displayName=Qr.displayName;var ai=q.forwardRef(({className:e,children:t,position:n=`popper`,viewportClassName:i,...a},o)=>(0,J.jsx)(Ur,{children:(0,J.jsxs)(Wr,{ref:o,className:r(`relative z-[var(--z-popover,50)] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-white`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,...a,children:[(0,J.jsx)(ri,{}),(0,J.jsx)(Gr,{className:r(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`,i),children:t}),(0,J.jsx)(ii,{})]})}));ai.displayName=Wr.displayName;var oi=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)(qr,{ref:n,className:r(`px-2 py-1.5 text-sm font-semibold`,e),...t}));oi.displayName=qr.displayName;var si=q.forwardRef(({className:e,children:t,...n},i)=>(0,J.jsxs)(Jr,{ref:i,className:r(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-gray-100 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 hover:bg-gray-100`,e),...n,children:[(0,J.jsx)(`span`,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,J.jsx)(Xr,{children:(0,J.jsx)(x,{className:`h-4 w-4`})})}),(0,J.jsx)(Yr,{children:t})]}));si.displayName=Jr.displayName;var ci=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)($r,{ref:n,className:r(`-mx-1 my-1 h-px bg-muted`,e),...t}));ci.displayName=$r.displayName;export{xn as C,C as D,tn as E,S as O,yn as S,vn as T,$r as _,ti as a,Gr as b,Hr as c,Yr as d,qr as f,Zr as g,Qr as h,ni as i,x as k,Jr as l,zr as m,ai as n,Wr as o,Ur as p,si as r,Kr as s,ei as t,Xr as u,Br as v,bn as w,An as x,Vr as y};
1
+ import{_ as e,m as t,p as n,u as r}from"./i18n-D1144VAA.js";import{on as i}from"./api-rASx2-N4.js";import{_ as a,a as o,c as s,d as c,f as l,g as u,h as d,i as f,l as p,n as m,o as h,p as g,r as _,s as v,t as y}from"./es2015-CVAuMqlM.js";import{t as b}from"./createLucideIcon-DzY6wN61.js";var x=b(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),S=b(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),C=b(`ChevronUp`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),w=[`top`,`right`,`bottom`,`left`],T=Math.min,E=Math.max,D=Math.round,O=Math.floor,k=e=>({x:e,y:e}),A={left:`right`,right:`left`,bottom:`top`,top:`bottom`},j={start:`end`,end:`start`};function M(e,t,n){return E(e,T(t,n))}function N(e,t){return typeof e==`function`?e(t):e}function P(e){return e.split(`-`)[0]}function F(e){return e.split(`-`)[1]}function I(e){return e===`x`?`y`:`x`}function L(e){return e===`y`?`height`:`width`}var R=new Set([`top`,`bottom`]);function z(e){return R.has(P(e))?`y`:`x`}function ee(e){return I(z(e))}function te(e,t,n){n===void 0&&(n=!1);let r=F(e),i=ee(e),a=L(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ue(o)),[o,ue(o)]}function ne(e){let t=ue(e);return[re(e),t,re(t)]}function re(e){return e.replace(/start|end/g,e=>j[e])}var ie=[`left`,`right`],ae=[`right`,`left`],oe=[`top`,`bottom`],se=[`bottom`,`top`];function ce(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ae:ie:t?ie:ae;case`left`:case`right`:return t?oe:se;default:return[]}}function le(e,t,n,r){let i=F(e),a=ce(P(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(re)))),a}function ue(e){return e.replace(/left|right|bottom|top/g,e=>A[e])}function de(e){return{top:0,right:0,bottom:0,left:0,...e}}function fe(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:de(e)}function pe(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function me(e,t,n){let{reference:r,floating:i}=e,a=z(t),o=ee(t),s=L(o),c=P(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(F(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function he(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=N(t,e),p=fe(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=pe(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=pe(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ge=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=me(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:{...o,detectOverflow:o.detectOverflow??he},elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=me(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}},_e=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=N(e,t)||{};if(l==null)return{};let d=fe(u),f={x:n,y:r},p=ee(i),m=L(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,E=C/2-h[m]/2-1,D=T(d[_],E),O=T(d[v],E),k=D,A=C-h[m]-O,j=C/2-h[m]/2+w,P=M(k,j,A),I=!c.arrow&&F(i)!=null&&j!==P&&a.reference[m]/2-(j<k?D:O)-h[m]/2<0,R=I?j<k?j-k:j-A:0;return{[p]:f[p]+R,data:{[p]:P,centerOffset:j-P-R,...I&&{alignmentOffset:R}},reset:I}}}),ve=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=N(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=P(r),_=z(o),v=P(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ue(o)]:ne(o)),x=p!==`none`;!d&&x&&b.push(...le(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=te(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==z(t))||T.every(e=>z(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=z(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ye(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function be(e){return w.some(t=>e[t]>=0)}var xe=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=N(e,t);switch(i){case`referenceHidden`:{let e=ye(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:be(e)}}}case`escaped`:{let e=ye(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:be(e)}}}default:return{}}}}},Se=new Set([`left`,`top`]);async function Ce(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=P(n),s=F(n),c=z(n)===`y`,l=Se.has(o)?-1:1,u=a&&c?-1:1,d=N(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var we=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ce(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Te=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=N(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=z(P(i)),p=I(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=M(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=M(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ee=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=N(e,t),u={x:n,y:r},d=z(i),f=I(d),p=u[f],m=u[d],h=N(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Se.has(P(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},De=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=N(e,t),u=await o.detectOverflow(t,l),d=P(i),f=F(i),p=z(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=T(h-u[g],v),x=T(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=E(u.left,0),t=E(u.right,0),n=E(u.top,0),r=E(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:E(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:E(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let D=await o.getDimensions(s.floating);return m!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function Oe(){return typeof window<`u`}function ke(e){return Ae(e)?(e.nodeName||``).toLowerCase():`#document`}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function V(e){return((Ae(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Ae(e){return Oe()?e instanceof Node||e instanceof B(e).Node:!1}function H(e){return Oe()?e instanceof Element||e instanceof B(e).Element:!1}function U(e){return Oe()?e instanceof HTMLElement||e instanceof B(e).HTMLElement:!1}function je(e){return!Oe()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}var Me=new Set([`inline`,`contents`]);function Ne(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Me.has(i)}var Pe=new Set([`table`,`td`,`th`]);function Fe(e){return Pe.has(ke(e))}var Ie=[`:popover-open`,`:modal`];function Le(e){return Ie.some(t=>{try{return e.matches(t)}catch{return!1}})}var Re=[`transform`,`translate`,`scale`,`rotate`,`perspective`],ze=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],Be=[`paint`,`layout`,`strict`,`content`];function Ve(e){let t=Ue(),n=H(e)?W(e):e;return Re.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||ze.some(e=>(n.willChange||``).includes(e))||Be.some(e=>(n.contain||``).includes(e))}function He(e){let t=G(e);for(;U(t)&&!Ge(t);){if(Ve(t))return t;if(Le(t))return null;t=G(t)}return null}function Ue(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var We=new Set([`html`,`body`,`#document`]);function Ge(e){return We.has(ke(e))}function W(e){return B(e).getComputedStyle(e)}function Ke(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function G(e){if(ke(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||je(e)&&e.host||V(e);return je(t)?t.host:t}function qe(e){let t=G(e);return Ge(t)?e.ownerDocument?e.ownerDocument.body:e.body:U(t)&&Ne(t)?t:qe(t)}function Je(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=qe(e),i=r===e.ownerDocument?.body,a=B(r);if(i){let e=Ye(a);return t.concat(a,a.visualViewport||[],Ne(r)?r:[],e&&n?Je(e):[])}return t.concat(r,Je(r,[],n))}function Ye(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xe(e){let t=W(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=U(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=D(n)!==a||D(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ze(e){return H(e)?e:e.contextElement}function Qe(e){let t=Ze(e);if(!U(t))return k(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Xe(t),o=(a?D(n.width):n.width)/r,s=(a?D(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var $e=k(0);function et(e){let t=B(e);return!Ue()||!t.visualViewport?$e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tt(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==B(e)?!1:t}function K(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ze(e),o=k(1);t&&(r?H(r)&&(o=Qe(r)):o=Qe(e));let s=tt(a,n,r)?et(a):k(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=B(a),t=r&&H(r)?B(r):r,n=e,i=Ye(n);for(;i&&r&&t!==n;){let e=Qe(i),t=i.getBoundingClientRect(),r=W(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=B(i),i=Ye(n)}}return pe({width:u,height:d,x:c,y:l})}function nt(e,t){let n=Ke(e).scrollLeft;return t?t.left+n:K(V(e)).left+n}function rt(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-nt(e,n),y:n.top+t.scrollTop}}function it(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=V(r),s=t?Le(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=k(1),u=k(0),d=U(r);if((d||!d&&!a)&&((ke(r)!==`body`||Ne(o))&&(c=Ke(r)),U(r))){let e=K(r);l=Qe(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?rt(o,c):k(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function at(e){return Array.from(e.getClientRects())}function ot(e){let t=V(e),n=Ke(e),r=e.ownerDocument.body,i=E(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=E(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+nt(e),s=-n.scrollTop;return W(r).direction===`rtl`&&(o+=E(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var st=25;function ct(e,t){let n=B(e),r=V(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Ue();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=nt(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=st&&(a-=o)}else l<=st&&(a+=l);return{width:a,height:o,x:s,y:c}}var lt=new Set([`absolute`,`fixed`]);function ut(e,t){let n=K(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=U(e)?Qe(e):k(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function dt(e,t,n){let r;if(t===`viewport`)r=ct(e,n);else if(t===`document`)r=ot(V(e));else if(H(t))r=ut(t,n);else{let n=et(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return pe(r)}function ft(e,t){let n=G(e);return n===t||!H(n)||Ge(n)?!1:W(n).position===`fixed`||ft(n,t)}function pt(e,t){let n=t.get(e);if(n)return n;let r=Je(e,[],!1).filter(e=>H(e)&&ke(e)!==`body`),i=null,a=W(e).position===`fixed`,o=a?G(e):e;for(;H(o)&&!Ge(o);){let t=W(o),n=Ve(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&lt.has(i.position)||Ne(o)&&!n&&ft(e,o))?r=r.filter(e=>e!==o):i=t,o=G(o)}return t.set(e,r),r}function mt(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Le(t)?[]:pt(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=dt(t,n,i);return e.top=E(r.top,e.top),e.right=T(r.right,e.right),e.bottom=T(r.bottom,e.bottom),e.left=E(r.left,e.left),e},dt(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function ht(e){let{width:t,height:n}=Xe(e);return{width:t,height:n}}function gt(e,t,n){let r=U(t),i=V(t),a=n===`fixed`,o=K(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=k(0);function l(){c.x=nt(i)}if(r||!r&&!a)if((ke(t)!==`body`||Ne(i))&&(s=Ke(t)),r){let e=K(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?rt(i,s):k(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function _t(e){return W(e).position===`static`}function vt(e,t){if(!U(e)||W(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return V(e)===n&&(n=n.ownerDocument.body),n}function yt(e,t){let n=B(e);if(Le(e))return n;if(!U(e)){let t=G(e);for(;t&&!Ge(t);){if(H(t)&&!_t(t))return t;t=G(t)}return n}let r=vt(e,t);for(;r&&Fe(r)&&_t(r);)r=vt(r,t);return r&&Ge(r)&&_t(r)&&!Ve(r)?n:r||He(e)||n}var bt=async function(e){let t=this.getOffsetParent||yt,n=this.getDimensions,r=await n(e.floating);return{reference:gt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function xt(e){return W(e).direction===`rtl`}var St={convertOffsetParentRelativeRectToViewportRelativeRect:it,getDocumentElement:V,getClippingRect:mt,getOffsetParent:yt,getElementRects:bt,getClientRects:at,getDimensions:ht,getScale:Qe,isElement:H,isRTL:xt};function Ct(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wt(e,t){let n=null,r,i=V(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=O(d),h=O(i.clientWidth-(u+f)),g=O(i.clientHeight-(d+p)),_=O(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:E(0,T(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Ct(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Tt(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ze(e),u=i||a?[...l?Je(l):[],...Je(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?wt(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?K(e):null;c&&g();function g(){let t=K(e);h&&!Ct(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Et=we,Dt=Te,Ot=ve,kt=De,At=xe,jt=_e,Mt=Ee,Nt=(e,t,n)=>{let r=new Map,i={platform:St,...n},a={...i.platform,_c:r};return ge(e,t,{...i,platform:a})},q=e(t(),1),Pt=e(i(),1),Ft=typeof document<`u`?q.useLayoutEffect:function(){};function It(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,i;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(!It(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!It(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Lt(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rt(e,t){let n=Lt(e);return Math.round(t*n)/n}function zt(e){let t=q.useRef(e);return Ft(()=>{t.current=e}),t}function Bt(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=q.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=q.useState(r);It(f,r)||p(r);let[m,h]=q.useState(null),[g,_]=q.useState(null),v=q.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=q.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=q.useRef(null),C=q.useRef(null),w=q.useRef(u),T=c!=null,E=zt(c),D=zt(i),O=zt(l),k=q.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Nt(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!It(w.current,t)&&(w.current=t,Pt.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Ft(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=q.useRef(!1);Ft(()=>(A.current=!0,()=>{A.current=!1}),[]),Ft(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=q.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=q.useMemo(()=>({reference:b,floating:x}),[b,x]),N=q.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Rt(M.floating,u.x),r=Rt(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Lt(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return q.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Vt=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:jt({element:r.current,padding:i}).fn(n):r?jt({element:r,padding:i}).fn(n):{}}}},Ht=(e,t)=>({...Et(e),options:[e,t]}),Ut=(e,t)=>({...Dt(e),options:[e,t]}),Wt=(e,t)=>({...Mt(e),options:[e,t]}),Gt=(e,t)=>({...Ot(e),options:[e,t]}),Kt=(e,t)=>({...kt(e),options:[e,t]}),qt=(e,t)=>({...At(e),options:[e,t]}),Jt=(e,t)=>({...Vt(e),options:[e,t]}),J=n(),Yt=`Arrow`,Xt=q.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,J.jsx)(s.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,J.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Xt.displayName=Yt;var Zt=Xt;function Qt(e){let[t,n]=q.useState(void 0);return g(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var $t=`Popper`,[en,tn]=d($t),[nn,rn]=en($t),an=e=>{let{__scopePopper:t,children:n}=e,[r,i]=q.useState(null);return(0,J.jsx)(nn,{scope:t,anchor:r,onAnchorChange:i,children:n})};an.displayName=$t;var on=`PopperAnchor`,sn=q.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=rn(on,n),o=q.useRef(null),c=u(t,o),l=q.useRef(null);return q.useEffect(()=>{let e=l.current;l.current=r?.current||o.current,e!==l.current&&a.onAnchorChange(l.current)}),r?null:(0,J.jsx)(s.div,{...i,ref:c})});sn.displayName=on;var cn=`PopperContent`,[ln,un]=en(cn),dn=q.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p=`partial`,hideWhenDetached:m=!1,updatePositionStrategy:h=`optimized`,onPlaced:_,...y}=e,b=rn(cn,n),[x,S]=q.useState(null),C=u(t,e=>S(e)),[w,T]=q.useState(null),E=Qt(w),D=E?.width??0,O=E?.height??0,k=r+(a===`center`?``:`-`+a),A=typeof f==`number`?f:{top:0,right:0,bottom:0,left:0,...f},j=Array.isArray(d)?d:[d],M=j.length>0,N={padding:A,boundary:j.filter(hn),altBoundary:M},{refs:P,floatingStyles:F,placement:I,isPositioned:L,middlewareData:R}=Bt({strategy:`fixed`,placement:k,whileElementsMounted:(...e)=>Tt(...e,{animationFrame:h===`always`}),elements:{reference:b.anchor},middleware:[Ht({mainAxis:i+O,alignmentAxis:o}),l&&Ut({mainAxis:!0,crossAxis:!1,limiter:p===`partial`?Wt():void 0,...N}),l&&Gt({...N}),Kt({...N,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),w&&Jt({element:w,padding:c}),gn({arrowWidth:D,arrowHeight:O}),m&&qt({strategy:`referenceHidden`,...N})]}),[z,ee]=_n(I),te=v(_);g(()=>{L&&te?.()},[L,te]);let ne=R.arrow?.x,re=R.arrow?.y,ie=R.arrow?.centerOffset!==0,[ae,oe]=q.useState();return g(()=>{x&&oe(window.getComputedStyle(x).zIndex)},[x]),(0,J.jsx)(`div`,{ref:P.setFloating,"data-radix-popper-content-wrapper":``,style:{...F,transform:L?F.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(` `),...R.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,J.jsx)(ln,{scope:n,placedSide:z,onArrowChange:T,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:(0,J.jsx)(s.div,{"data-side":z,"data-align":ee,...y,ref:C,style:{...y.style,animation:L?void 0:`none`}})})})});dn.displayName=cn;var fn=`PopperArrow`,pn={top:`bottom`,right:`left`,bottom:`top`,left:`right`},mn=q.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=un(fn,n),a=pn[i.placedSide];return(0,J.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,J.jsx)(Zt,{...r,ref:t,style:{...r.style,display:`block`}})})});mn.displayName=fn;function hn(e){return e!==null}var gn=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=_n(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function _n(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var vn=an,yn=sn,bn=dn,xn=mn;function Sn(e,[t,n]){return Math.min(n,Math.max(t,e))}function Cn(e){let t=e+`CollectionProvider`,[n,r]=d(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=q.useRef(null),a=q.useRef(new Map).current;return(0,J.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=p(s),l=q.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,J.jsx)(c,{ref:u(t,a(s,n).collectionRef),children:r})});l.displayName=s;let f=e+`CollectionItemSlot`,m=`data-radix-collection-item`,h=p(f),g=q.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=q.useRef(null),s=u(t,o),c=a(f,n);return q.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,J.jsx)(h,{[m]:``,ref:s,children:r})});g.displayName=f;function _(t){let n=a(e+`CollectionConsumer`,t);return q.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${m}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:g},_,r]}var wn=q.createContext(void 0);function Tn(e){let t=q.useContext(wn);return e||t||`ltr`}function En(e){let t=q.useRef({value:e,previous:e});return q.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dn=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),On=`VisuallyHidden`,kn=q.forwardRef((e,t)=>(0,J.jsx)(s.span,{...e,ref:t,style:{...Dn,...e.style}}));kn.displayName=On;var An=kn,jn=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Mn=[` `,`Enter`],Y=`Select`,[Nn,Pn,Fn]=Cn(Y),[In,Ln]=d(Y,[Fn,tn]),Rn=tn(),[zn,X]=In(Y),[Bn,Vn]=In(Y),Hn=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:m,required:h,form:g}=e,_=Rn(t),[v,y]=q.useState(null),[b,x]=q.useState(null),[S,C]=q.useState(!1),w=Tn(d),[T,E]=c({prop:r,defaultProp:i??!1,onChange:a,caller:Y}),[D,O]=c({prop:o,defaultProp:s,onChange:u,caller:Y}),k=q.useRef(null),A=v?g||!!v.closest(`form`):!0,[j,M]=q.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,J.jsx)(vn,{..._,children:(0,J.jsxs)(zn,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:l(),value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:m,children:[(0,J.jsx)(Nn.Provider,{scope:t,children:(0,J.jsx)(Bn,{scope:e.__scopeSelect,onNativeOptionAdd:q.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:q.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,J.jsxs)(Pr,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:D,onChange:e=>O(e.target.value),disabled:m,form:g,children:[D===void 0?(0,J.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};Hn.displayName=Y;var Un=`SelectTrigger`,Wn=q.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,o=Rn(n),c=X(Un,n),l=c.disabled||r,d=u(t,c.onTriggerChange),f=Pn(n),p=q.useRef(`touch`),[m,h,g]=Ir(e=>{let t=f().filter(e=>!e.disabled),n=Lr(t,e,t.find(e=>e.value===c.value));n!==void 0&&c.onValueChange(n.value)}),_=e=>{l||(c.onOpenChange(!0),g()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,J.jsx)(yn,{asChild:!0,...o,children:(0,J.jsx)(s.button,{type:`button`,role:`combobox`,"aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":`none`,dir:c.dir,"data-state":c.open?`open`:`closed`,disabled:l,"data-disabled":l?``:void 0,"data-placeholder":Fr(c.value)?``:void 0,...i,ref:d,onClick:a(i.onClick,e=>{e.currentTarget.focus(),p.current!==`mouse`&&_(e)}),onPointerDown:a(i.onPointerDown,e=>{p.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(_(e),e.preventDefault())}),onKeyDown:a(i.onKeyDown,e=>{let t=m.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&h(e.key),!(t&&e.key===` `)&&jn.includes(e.key)&&(_(),e.preventDefault())})})})});Wn.displayName=Un;var Gn=`SelectValue`,Kn=q.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...c}=e,l=X(Gn,n),{onValueNodeHasChildrenChange:d}=l,f=a!==void 0,p=u(t,l.onValueNodeChange);return g(()=>{d(f)},[d,f]),(0,J.jsx)(s.span,{...c,ref:p,style:{pointerEvents:`none`},children:Fr(l.value)?(0,J.jsx)(J.Fragment,{children:o}):a})});Kn.displayName=Gn;var qn=`SelectIcon`,Jn=q.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,J.jsx)(s.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});Jn.displayName=qn;var Yn=`SelectPortal`,Xn=e=>(0,J.jsx)(f,{asChild:!0,...e});Xn.displayName=Yn;var Z=`SelectContent`,Zn=q.forwardRef((e,t)=>{let n=X(Z,e.__scopeSelect),[r,i]=q.useState();if(g(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Pt.createPortal((0,J.jsx)(Qn,{scope:e.__scopeSelect,children:(0,J.jsx)(Nn.Slot,{scope:e.__scopeSelect,children:(0,J.jsx)(`div`,{children:e.children})})}),t):null}return(0,J.jsx)(tr,{...e,ref:t})});Zn.displayName=Z;var Q=10,[Qn,$]=In(Z),$n=`SelectContentImpl`,er=p(`SelectContent.RemoveScroll`),tr=q.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:c,side:l,sideOffset:d,align:f,alignOffset:p,arrowPadding:g,collisionBoundary:v,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:C,...w}=e,T=X(Z,n),[E,D]=q.useState(null),[O,k]=q.useState(null),A=u(t,e=>D(e)),[j,M]=q.useState(null),[N,P]=q.useState(null),F=Pn(n),[I,L]=q.useState(!1),R=q.useRef(!1);q.useEffect(()=>{if(E)return y(E)},[E]),_();let z=q.useCallback(e=>{let[t,...n]=F().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&O&&(O.scrollTop=0),n===r&&O&&(O.scrollTop=O.scrollHeight),n?.focus(),document.activeElement!==i))return},[F,O]),ee=q.useCallback(()=>z([j,E]),[z,j,E]);q.useEffect(()=>{I&&ee()},[I,ee]);let{onOpenChange:te,triggerPointerDownPosRef:ne}=T;q.useEffect(()=>{if(E){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ne.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ne.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():E.contains(n.target)||te(!1),document.removeEventListener(`pointermove`,t),ne.current=null};return ne.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[E,te,ne]),q.useEffect(()=>{let e=()=>te(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[te]);let[re,ie]=Ir(e=>{let t=F().filter(e=>!e.disabled),n=Lr(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ae=q.useCallback((e,t,n)=>{let r=!R.current&&!n;(T.value!==void 0&&T.value===t||r)&&(M(e),r&&(R.current=!0))},[T.value]),oe=q.useCallback(()=>E?.focus(),[E]),se=q.useCallback((e,t,n)=>{let r=!R.current&&!n;(T.value!==void 0&&T.value===t||r)&&P(e)},[T.value]),ce=r===`popper`?ar:rr,le=ce===ar?{side:l,sideOffset:d,align:f,alignOffset:p,arrowPadding:g,collisionBoundary:v,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:C}:{};return(0,J.jsx)(Qn,{scope:n,content:E,viewport:O,onViewportChange:k,itemRefCallback:ae,selectedItem:j,onItemLeave:oe,itemTextRefCallback:se,focusSelectedItem:ee,selectedItemText:N,position:r,isPositioned:I,searchRef:re,children:(0,J.jsx)(m,{as:er,allowPinchZoom:!0,children:(0,J.jsx)(o,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:a(i,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,J.jsx)(h,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,J.jsx)(ce,{role:`listbox`,id:T.contentId,"data-state":T.open?`open`:`closed`,dir:T.dir,onContextMenu:e=>e.preventDefault(),...w,...le,onPlaced:()=>L(!0),ref:A,style:{display:`flex`,flexDirection:`column`,outline:`none`,...w.style},onKeyDown:a(w.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ie(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>z(t)),e.preventDefault()}})})})})})})});tr.displayName=$n;var nr=`SelectItemAlignedPosition`,rr=q.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=X(Z,n),o=$(Z,n),[c,l]=q.useState(null),[d,f]=q.useState(null),p=u(t,e=>f(e)),m=Pn(n),h=q.useRef(!1),_=q.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=o,S=q.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&v&&y&&b){let e=a.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=b.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=Sn(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-Q,d=Sn(a,[Q,Math.max(Q,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let o=m(),s=window.innerHeight-Q*2,l=v.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),p=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),_=parseInt(u.paddingBottom,10),x=f+p+l+_+g,S=Math.min(y.offsetHeight*5,x),C=window.getComputedStyle(v),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Q,D=s-E,O=y.offsetHeight/2,k=y.offsetTop+O,A=f+p+k,j=x-A;if(A<=E){let e=o.length>0&&y===o[o.length-1].ref.current;c.style.bottom=`0px`;let t=d.clientHeight-v.offsetTop-v.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+g);c.style.height=n+`px`}else{let e=o.length>0&&y===o[0].ref.current;c.style.top=`0px`;let t=Math.max(E,f+v.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,v.scrollTop=A-E+v.offsetTop}c.style.margin=`${Q}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>h.current=!0)}},[m,a.trigger,a.valueNode,c,d,v,y,b,a.dir,r]);g(()=>S(),[S]);let[C,w]=q.useState();return g(()=>{d&&w(window.getComputedStyle(d).zIndex)},[d]),(0,J.jsx)(or,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:h,onScrollButtonChange:q.useCallback(e=>{e&&_.current===!0&&(S(),x?.(),_.current=!1)},[S,x]),children:(0,J.jsx)(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:C},children:(0,J.jsx)(s.div,{...i,ref:p,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});rr.displayName=nr;var ir=`SelectPopperPosition`,ar=q.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Q,...a}=e,o=Rn(n);return(0,J.jsx)(bn,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});ar.displayName=ir;var[or,sr]=In(Z,{}),cr=`SelectViewport`,lr=q.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,o=$(cr,n),c=sr(cr,n),l=u(t,o.onViewportChange),d=q.useRef(0);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,J.jsx)(Nn.Slot,{scope:n,children:(0,J.jsx)(s.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:l,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:a(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){let e=Math.abs(d.current-t.scrollTop);if(e>0){let r=window.innerHeight-Q*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}d.current=t.scrollTop})})})]})});lr.displayName=cr;var ur=`SelectGroup`,[dr,fr]=In(ur),pr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=l();return(0,J.jsx)(dr,{scope:n,id:i,children:(0,J.jsx)(s.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});pr.displayName=ur;var mr=`SelectLabel`,hr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=fr(mr,n);return(0,J.jsx)(s.div,{id:i.id,...r,ref:t})});hr.displayName=mr;var gr=`SelectItem`,[_r,vr]=In(gr),yr=q.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...c}=e,d=X(gr,n),f=$(gr,n),p=d.value===r,[m,h]=q.useState(o??``),[g,_]=q.useState(!1),v=u(t,e=>f.itemRefCallback?.(e,r,i)),y=l(),b=q.useRef(`touch`),x=()=>{i||(d.onValueChange(r),d.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,J.jsx)(_r,{scope:n,value:r,disabled:i,textId:y,isSelected:p,onItemTextChange:q.useCallback(e=>{h(t=>t||(e?.textContent??``).trim())},[]),children:(0,J.jsx)(Nn.ItemSlot,{scope:n,value:r,disabled:i,textValue:m,children:(0,J.jsx)(s.div,{role:`option`,"aria-labelledby":y,"data-highlighted":g?``:void 0,"aria-selected":p&&g,"data-state":p?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...c,ref:v,onFocus:a(c.onFocus,()=>_(!0)),onBlur:a(c.onBlur,()=>_(!1)),onClick:a(c.onClick,()=>{b.current!==`mouse`&&x()}),onPointerUp:a(c.onPointerUp,()=>{b.current===`mouse`&&x()}),onPointerDown:a(c.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:a(c.onPointerMove,e=>{b.current=e.pointerType,i?f.onItemLeave?.():b.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:a(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:a(c.onKeyDown,e=>{f.searchRef?.current!==``&&e.key===` `||(Mn.includes(e.key)&&x(),e.key===` `&&e.preventDefault())})})})})});yr.displayName=gr;var br=`SelectItemText`,xr=q.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=X(br,n),c=$(br,n),l=vr(br,n),d=Vn(br,n),[f,p]=q.useState(null),m=u(t,e=>p(e),l.onItemTextChange,e=>c.itemTextRefCallback?.(e,l.value,l.disabled)),h=f?.textContent,_=q.useMemo(()=>(0,J.jsx)(`option`,{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=d;return g(()=>(v(_),()=>y(_)),[v,y,_]),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(s.span,{id:l.textId,...a,ref:m}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Pt.createPortal(a.children,o.valueNode):null]})});xr.displayName=br;var Sr=`SelectItemIndicator`,Cr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return vr(Sr,n).isSelected?(0,J.jsx)(s.span,{"aria-hidden":!0,...r,ref:t}):null});Cr.displayName=Sr;var wr=`SelectScrollUpButton`,Tr=q.forwardRef((e,t)=>{let n=$(wr,e.__scopeSelect),r=sr(wr,e.__scopeSelect),[i,a]=q.useState(!1),o=u(t,r.onScrollButtonChange);return g(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,J.jsx)(Or,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});Tr.displayName=wr;var Er=`SelectScrollDownButton`,Dr=q.forwardRef((e,t)=>{let n=$(Er,e.__scopeSelect),r=sr(Er,e.__scopeSelect),[i,a]=q.useState(!1),o=u(t,r.onScrollButtonChange);return g(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,J.jsx)(Or,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});Dr.displayName=Er;var Or=q.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,o=$(`SelectScrollButton`,n),c=q.useRef(null),l=Pn(n),u=q.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return q.useEffect(()=>()=>u(),[u]),g(()=>{l().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[l]),(0,J.jsx)(s.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:a(i.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(r,50))}),onPointerMove:a(i.onPointerMove,()=>{o.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(r,50))}),onPointerLeave:a(i.onPointerLeave,()=>{u()})})}),kr=`SelectSeparator`,Ar=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,J.jsx)(s.div,{"aria-hidden":!0,...r,ref:t})});Ar.displayName=kr;var jr=`SelectArrow`,Mr=q.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Rn(n),a=X(jr,n),o=$(jr,n);return a.open&&o.position===`popper`?(0,J.jsx)(xn,{...i,...r,ref:t}):null});Mr.displayName=jr;var Nr=`SelectBubbleInput`,Pr=q.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=q.useRef(null),a=u(r,i),o=En(t);return q.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,J.jsx)(s.select,{...n,style:{...Dn,...n.style},ref:a,defaultValue:t})});Pr.displayName=Nr;function Fr(e){return e===``||e===void 0}function Ir(e){let t=v(e),n=q.useRef(``),r=q.useRef(0),i=q.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=q.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return q.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Lr(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Rr(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Rr(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var zr=Hn,Br=Wn,Vr=Kn,Hr=Jn,Ur=Xn,Wr=Zn,Gr=lr,Kr=pr,qr=hr,Jr=yr,Yr=xr,Xr=Cr,Zr=Tr,Qr=Dr,$r=Ar,ei=zr,ti=Vr,ni=q.forwardRef(({className:e,children:t,indicator:n,...i},a)=>(0,J.jsxs)(Br,{ref:a,className:r(`flex h-9 w-full items-center justify-between whitespace-nowrap rounded-xl border border-gray-200/80 bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary/40 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 bg-white`,e),...i,children:[t,(0,J.jsx)(Hr,{asChild:!0,children:n??(0,J.jsx)(S,{className:`h-4 w-4 opacity-50`})})]}));ni.displayName=Br.displayName;var ri=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)(Zr,{ref:n,className:r(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,J.jsx)(C,{className:`h-4 w-4`})}));ri.displayName=Zr.displayName;var ii=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)(Qr,{ref:n,className:r(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,J.jsx)(S,{className:`h-4 w-4`})}));ii.displayName=Qr.displayName;var ai=q.forwardRef(({className:e,children:t,position:n=`popper`,viewportClassName:i,...a},o)=>(0,J.jsx)(Ur,{children:(0,J.jsxs)(Wr,{ref:o,className:r(`relative z-[var(--z-popover,50)] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-white`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,...a,children:[(0,J.jsx)(ri,{}),(0,J.jsx)(Gr,{className:r(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`,i),children:t}),(0,J.jsx)(ii,{})]})}));ai.displayName=Wr.displayName;var oi=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)(qr,{ref:n,className:r(`px-2 py-1.5 text-sm font-semibold`,e),...t}));oi.displayName=qr.displayName;var si=q.forwardRef(({className:e,children:t,...n},i)=>(0,J.jsxs)(Jr,{ref:i,className:r(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-gray-100 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 hover:bg-gray-100`,e),...n,children:[(0,J.jsx)(`span`,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,J.jsx)(Xr,{children:(0,J.jsx)(x,{className:`h-4 w-4`})})}),(0,J.jsx)(Yr,{children:t})]}));si.displayName=Jr.displayName;var ci=q.forwardRef(({className:e,...t},n)=>(0,J.jsx)($r,{ref:n,className:r(`-mx-1 my-1 h-px bg-muted`,e),...t}));ci.displayName=$r.displayName;export{xn as C,C as D,tn as E,S as O,yn as S,vn as T,$r as _,ti as a,Gr as b,Hr as c,Yr as d,qr as f,Zr as g,Qr as h,ni as i,x as k,Jr as l,zr as m,ai as n,Wr as o,Ur as p,si as r,Kr as s,ei as t,Xr as u,Br as v,bn as w,An as x,Vr as y};
@@ -1 +1 @@
1
- import{_ as e,m as t,p as n,u as r}from"./i18n-D1144VAA.js";import{Pt as i}from"./api-CKKNxbsy.js";var a=e(t(),1),o=n(),s=i(`flex items-start justify-between gap-4 rounded-xl border p-4`,{variants:{tone:{default:`border-gray-200 bg-white`,muted:`border-gray-200 bg-gray-50`}},defaultVariants:{tone:`default`}}),c=a.forwardRef(({className:e,tone:t,title:n,description:i,control:a,children:c,...l},u)=>(0,o.jsxs)(`div`,{ref:u,className:r(s({tone:t}),e),...l,children:[(0,o.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2`,children:[(0,o.jsx)(`div`,{className:`text-sm font-medium text-gray-900`,children:n}),i?(0,o.jsx)(`p`,{className:`text-sm leading-6 text-gray-500`,children:i}):null,c]}),a?(0,o.jsx)(`div`,{className:`shrink-0`,children:a}):null]}));c.displayName=`SettingRow`;export{c as t};
1
+ import{_ as e,m as t,p as n,u as r}from"./i18n-D1144VAA.js";import{Pt as i}from"./api-rASx2-N4.js";var a=e(t(),1),o=n(),s=i(`flex items-start justify-between gap-4 rounded-xl border p-4`,{variants:{tone:{default:`border-gray-200 bg-white`,muted:`border-gray-200 bg-gray-50`}},defaultVariants:{tone:`default`}}),c=a.forwardRef(({className:e,tone:t,title:n,description:i,control:a,children:c,...l},u)=>(0,o.jsxs)(`div`,{ref:u,className:r(s({tone:t}),e),...l,children:[(0,o.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2`,children:[(0,o.jsx)(`div`,{className:`text-sm font-medium text-gray-900`,children:n}),i?(0,o.jsx)(`p`,{className:`text-sm leading-6 text-gray-500`,children:i}):null,c]}),a?(0,o.jsx)(`div`,{className:`shrink-0`,children:a}):null]}));c.displayName=`SettingRow`;export{c as t};
@@ -1 +1 @@
1
- import{_ as e,m as t,p as n,u as r}from"./i18n-D1144VAA.js";import{Pt as i}from"./api-CKKNxbsy.js";var a=e(t(),1),o=n(),s=i(`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium`,{variants:{tone:{subtle:`border-gray-200 bg-gray-50 text-gray-600`,neutral:`border-gray-200 bg-white text-gray-600`,success:`border-emerald-200 bg-emerald-50 text-emerald-700`,warning:`border-amber-200 bg-amber-50 text-amber-800`,danger:`border-rose-200 bg-rose-50 text-rose-600`,info:`border-primary/20 bg-primary/10 text-primary`}},defaultVariants:{tone:`subtle`}}),c=a.forwardRef(({className:e,tone:t,...n},i)=>(0,o.jsx)(`span`,{ref:i,className:r(s({tone:t}),e),...n}));c.displayName=`TagChip`;export{c as t};
1
+ import{_ as e,m as t,p as n,u as r}from"./i18n-D1144VAA.js";import{Pt as i}from"./api-rASx2-N4.js";var a=e(t(),1),o=n(),s=i(`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium`,{variants:{tone:{subtle:`border-gray-200 bg-gray-50 text-gray-600`,neutral:`border-gray-200 bg-white text-gray-600`,success:`border-emerald-200 bg-emerald-50 text-emerald-700`,warning:`border-amber-200 bg-amber-50 text-amber-800`,danger:`border-rose-200 bg-rose-50 text-rose-600`,info:`border-primary/20 bg-primary/10 text-primary`}},defaultVariants:{tone:`subtle`}}),c=a.forwardRef(({className:e,tone:t,...n},i)=>(0,o.jsx)(`span`,{ref:i,className:r(s({tone:t}),e),...n}));c.displayName=`TagChip`;export{c as t};
@@ -1 +1 @@
1
- import{r as e}from"./i18n-D1144VAA.js";import{$ as t,B as n,F as r,G as i,I as a,J as o,K as s,L as c,Lt as l,N as u,P as d,Q as f,R as p,Rt as m,U as h,V as g,W as _,X as v,Xt as y,Y as b,Z as x,_ as S,et as C,g as w,q as T,z as E,zt as D}from"./api-CKKNxbsy.js";function O(){return D({queryKey:[`config`],queryFn:p,staleTime:3e4,refetchOnWindowFocus:!0})}function k(){return D({queryKey:[`app-meta`],queryFn:c,staleTime:1/0})}function A(){return D({queryKey:[`config-meta`],queryFn:E,staleTime:1/0})}function j(){return D({queryKey:[`config-schema`],queryFn:n,staleTime:1/0})}function M(){let t=y();return m({mutationFn:v,onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function N(){let n=y();return m({mutationFn:({data:e})=>t(e),onSuccess:()=>{n.invalidateQueries({queryKey:[`config`]}),n.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function P(){let t=y();return m({mutationFn:({provider:e,data:t})=>x(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function F(){let t=y();return m({mutationFn:({data:e})=>u(e??{}),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function I(){let t=y();return m({mutationFn:({provider:e})=>r(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function L(){return m({mutationFn:({provider:e,data:t})=>o(e,t)})}function R(){return m({mutationFn:({provider:e,data:t})=>T(e,t)})}function z(){return m({mutationFn:({provider:e,data:t})=>_(e,t)})}function B(){return m({mutationFn:({provider:e})=>h(e)})}function V(){let t=y();return m({mutationFn:({channel:e,data:t})=>b(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSavedApplying`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function H(){let t=y();return m({mutationFn:({data:e})=>f(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function U(){let t=y();return m({mutationFn:({data:e})=>C(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function W(){return m({mutationFn:({actionId:e,data:t})=>a(e,t),onError:t=>{l.error(e(`error`)+`: `+t.message)}})}function G(e){return D({queryKey:[`ncp-sessions`,e?.limit??null],queryFn:()=>S(e),staleTime:5e3,retry:!1})}function K(e){return D({queryKey:[`ncp-session-skills`,e.sessionId,e.projectRoot??null],queryFn:()=>w(e.sessionId,{...Object.prototype.hasOwnProperty.call(e,`projectRoot`)?{projectRoot:e.projectRoot??null}:{}}),enabled:!!e.sessionId,staleTime:5e3,retry:!1})}function q(e={all:!0}){return D({queryKey:[`cron`,e],queryFn:()=>g(e),staleTime:1e4})}function J(){let t=y();return m({mutationFn:({id:e})=>d(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function Y(){let t=y();return m({mutationFn:({id:e,enabled:t})=>s(e,{enabled:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function X(){let t=y();return m({mutationFn:({id:e,force:t})=>i(e,{force:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}export{U as C,N as S,Y as _,F as a,P as b,I as c,K as d,G as f,L as g,R as h,j as i,W as l,X as m,O as n,q as o,z as p,A as r,J as s,k as t,B as u,V as v,H as x,M as y};
1
+ import{r as e}from"./i18n-D1144VAA.js";import{$ as t,B as n,F as r,G as i,I as a,J as o,K as s,L as c,Lt as l,N as u,P as d,Q as f,R as p,Rt as m,U as h,V as g,W as _,X as v,Xt as y,Y as b,Z as x,_ as S,et as C,g as w,q as T,z as E,zt as D}from"./api-rASx2-N4.js";function O(){return D({queryKey:[`config`],queryFn:p,staleTime:3e4,refetchOnWindowFocus:!0})}function k(){return D({queryKey:[`app-meta`],queryFn:c,staleTime:1/0})}function A(){return D({queryKey:[`config-meta`],queryFn:E,staleTime:1/0})}function j(){return D({queryKey:[`config-schema`],queryFn:n,staleTime:1/0})}function M(){let t=y();return m({mutationFn:v,onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function N(){let n=y();return m({mutationFn:({data:e})=>t(e),onSuccess:()=>{n.invalidateQueries({queryKey:[`config`]}),n.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function P(){let t=y();return m({mutationFn:({provider:e,data:t})=>x(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function F(){let t=y();return m({mutationFn:({data:e})=>u(e??{}),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function I(){let t=y();return m({mutationFn:({provider:e})=>r(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSaved`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function L(){return m({mutationFn:({provider:e,data:t})=>o(e,t)})}function R(){return m({mutationFn:({provider:e,data:t})=>T(e,t)})}function z(){return m({mutationFn:({provider:e,data:t})=>_(e,t)})}function B(){return m({mutationFn:({provider:e})=>h(e)})}function V(){let t=y();return m({mutationFn:({channel:e,data:t})=>b(e,t),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),t.invalidateQueries({queryKey:[`config-meta`]}),l.success(e(`configSavedApplying`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function H(){let t=y();return m({mutationFn:({data:e})=>f(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function U(){let t=y();return m({mutationFn:({data:e})=>C(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`config`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function W(){return m({mutationFn:({actionId:e,data:t})=>a(e,t),onError:t=>{l.error(e(`error`)+`: `+t.message)}})}function G(e){return D({queryKey:[`ncp-sessions`,e?.limit??null],queryFn:()=>S(e),staleTime:5e3,retry:!1})}function K(e){return D({queryKey:[`ncp-session-skills`,e.sessionId,e.projectRoot??null],queryFn:()=>w(e.sessionId,{...Object.prototype.hasOwnProperty.call(e,`projectRoot`)?{projectRoot:e.projectRoot??null}:{}}),enabled:!!e.sessionId,staleTime:5e3,retry:!1})}function q(e={all:!0}){return D({queryKey:[`cron`,e],queryFn:()=>g(e),staleTime:1e4})}function J(){let t=y();return m({mutationFn:({id:e})=>d(e),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function Y(){let t=y();return m({mutationFn:({id:e,enabled:t})=>s(e,{enabled:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}function X(){let t=y();return m({mutationFn:({id:e,force:t})=>i(e,{force:t}),onSuccess:()=>{t.invalidateQueries({queryKey:[`cron`]}),l.success(e(`configSavedApplied`))},onError:t=>{l.error(e(`configSaveFailed`)+`: `+t.message)}})}export{U as C,N as S,Y as _,F as a,P as b,I as c,K as d,G as f,L as g,R as h,j as i,W as l,X as m,O as n,q as o,z as p,A as r,J as s,k as t,B as u,V as v,H as x,M as y};
@@ -1 +1 @@
1
- import{_ as e,m as t,p as n,r}from"./i18n-D1144VAA.js";import{$t as i,Bt as a,Qt as o,Zt as s,en as c}from"./api-CKKNxbsy.js";import{t as l}from"./createLucideIcon-DzY6wN61.js";import{a as u,i as d,n as f,r as p,t as m}from"./select-C2c10F3e.js";import{u as h}from"./index-SS1xPoWD.js";var g=class extends c{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:i()})}getOptimisticResult(e){return e.behavior=i(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=i&&u===`forward`,p=c&&u===`backward`,m=i&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:s(t,n.data),hasPreviousPage:o(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:a&&!f&&!m}}};function _(e,t){return a(e,g,t)}var v=l(`PackageSearch`,[[`path`,{d:`M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14`,key:`e7tb2h`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`12`,key:`a4e8g8`}],[`circle`,{cx:`18.5`,cy:`15.5`,r:`2.5`,key:`b5zd12`}],[`path`,{d:`M20.27 17.27 22 19`,key:`1l4muz`}]]);function y(e){if(!e||e.pages.length===0)return;let t=e.pages.flatMap(e=>e.items);return{...e.pages[e.pages.length-1],items:t,pages:e.pages,loadedItems:t.length,loadedPages:e.pages.length}}var b=n();function x({scope:e,searchText:t,searchPlaceholder:n,sort:i,onSearchTextChange:a,onSortChange:o}){return(0,b.jsx)(`div`,{className:`mb-4`,children:(0,b.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,b.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,b.jsx)(v,{className:`absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400`}),(0,b.jsx)(`input`,{value:t,onChange:e=>a(e.target.value),placeholder:n,className:`h-9 w-full rounded-xl border border-gray-200/80 pl-9 pr-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary/40`})]}),e===`all`&&(0,b.jsxs)(m,{value:i,onValueChange:e=>o(e),children:[(0,b.jsx)(d,{className:`h-9 w-[150px] shrink-0 rounded-lg`,children:(0,b.jsx)(u,{})}),(0,b.jsxs)(f,{children:[(0,b.jsx)(p,{value:`relevance`,children:r(`marketplaceSortRelevance`)}),(0,b.jsx)(p,{value:`updated`,children:r(`marketplaceSortUpdated`)})]})]})]})})}function S({count:e}){return(0,b.jsx)(b.Fragment,{children:Array.from({length:e},(e,t)=>(0,b.jsx)(`article`,{className:`h-full rounded-2xl border border-gray-200/40 bg-white px-5 py-4 shadow-sm`,children:(0,b.jsxs)(`div`,{className:`flex items-start justify-between gap-3.5`,children:[(0,b.jsxs)(`div`,{className:`flex min-w-0 flex-1 gap-3`,children:[(0,b.jsx)(h,{className:`h-10 w-10 shrink-0 rounded-xl`}),(0,b.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2 pt-0.5`,children:[(0,b.jsx)(h,{className:`h-4 w-32 max-w-[70%]`}),(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsx)(h,{className:`h-3 w-12`}),(0,b.jsx)(h,{className:`h-3 w-24`})]}),(0,b.jsx)(h,{className:`h-3 w-full`})]})]}),(0,b.jsx)(h,{className:`h-8 w-20 shrink-0 rounded-xl`})]})},`marketplace-skeleton-${t}`))})}function C({hasMore:e,loading:t,sentinelRef:n}){return!e&&!t?null:(0,b.jsxs)(`div`,{className:`py-4`,children:[e&&(0,b.jsx)(`div`,{ref:n,className:`h-1 w-full`,"aria-hidden":`true`}),t&&(0,b.jsx)(`div`,{"data-testid":`marketplace-loading-more`,className:`pt-3 text-center text-xs text-gray-500`,children:r(`loading`)})]})}function w(e){let t=e.trim().toLowerCase().replace(/_/g,`-`),n=[t,t.split(`-`)[0],`en`];return Array.from(new Set(n.filter(Boolean)))}function T(e){return e.trim().toLowerCase().replace(/_/g,`-`)}function E(e,t,n){if(e){let t=Object.entries(e).map(([e,t])=>({locale:T(e),text:typeof t==`string`?t.trim():``})).filter(e=>e.text.length>0);if(t.length>0){let e=new Map(t.map(e=>[e.locale,e.text]));for(let t of n){let n=T(t),r=e.get(n);if(r)return r}for(let e of n){let n=T(e).split(`-`)[0];if(!n)continue;let r=t.find(e=>e.locale===n||e.locale.startsWith(`${n}-`));if(r)return r.text}return t[0]?.text??``}}return t?.trim()??``}function D(e,t){if(!e)return``;for(let n of t)if(T(n).split(`-`)[0]===`zh`&&e.descriptionZh?.trim())return e.descriptionZh.trim();return e.description?.trim()?e.description.trim():e.descriptionZh?.trim()?e.descriptionZh.trim():``}var O=e(t(),1),k=160;function A(e){let t=(0,O.useRef)(null),n=(0,O.useRef)(null),r=(0,O.useRef)(e.onLoadMore),i=(0,O.useRef)(!1);return(0,O.useEffect)(()=>{r.current=e.onLoadMore},[e.onLoadMore]),(0,O.useEffect)(()=>{e.disabled&&(i.current=!1)},[e.disabled]),(0,O.useEffect)(()=>{let a=t.current,o=n.current,s=e.thresholdPx??k;if(e.disabled||!a||!o)return;let c=()=>{i.current||e.disabled||(i.current=!0,Promise.resolve(r.current()).finally(()=>{i.current=!1}))},l=()=>{o.getBoundingClientRect().top-a.getBoundingClientRect().bottom<=s&&c()};if(typeof IntersectionObserver==`function`){let e=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&c()},{root:a,rootMargin:`0px 0px ${s}px 0px`});return e.observe(o),l(),()=>{e.disconnect()}}return a.addEventListener(`scroll`,l,{passive:!0}),l(),()=>{a.removeEventListener(`scroll`,l)}},[e.disabled,e.thresholdPx,e.watchValue]),{containerRef:t,sentinelRef:n}}export{x as a,y as c,E as i,_ as l,w as n,C as o,D as r,S as s,A as t};
1
+ import{_ as e,m as t,p as n,r}from"./i18n-D1144VAA.js";import{$t as i,Bt as a,Qt as o,Zt as s,en as c}from"./api-rASx2-N4.js";import{t as l}from"./createLucideIcon-DzY6wN61.js";import{a as u,i as d,n as f,r as p,t as m}from"./select-HI5kiwX_.js";import{u as h}from"./index-Db9Cufsy.js";var g=class extends c{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:i()})}getOptimisticResult(e){return e.behavior=i(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:c,isRefetchError:l}=r,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=i&&u===`forward`,p=c&&u===`backward`,m=i&&u===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:s(t,n.data),hasPreviousPage:o(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:a&&!f&&!m}}};function _(e,t){return a(e,g,t)}var v=l(`PackageSearch`,[[`path`,{d:`M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14`,key:`e7tb2h`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`12`,key:`a4e8g8`}],[`circle`,{cx:`18.5`,cy:`15.5`,r:`2.5`,key:`b5zd12`}],[`path`,{d:`M20.27 17.27 22 19`,key:`1l4muz`}]]);function y(e){if(!e||e.pages.length===0)return;let t=e.pages.flatMap(e=>e.items);return{...e.pages[e.pages.length-1],items:t,pages:e.pages,loadedItems:t.length,loadedPages:e.pages.length}}var b=n();function x({scope:e,searchText:t,searchPlaceholder:n,sort:i,onSearchTextChange:a,onSortChange:o}){return(0,b.jsx)(`div`,{className:`mb-4`,children:(0,b.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,b.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,b.jsx)(v,{className:`absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400`}),(0,b.jsx)(`input`,{value:t,onChange:e=>a(e.target.value),placeholder:n,className:`h-9 w-full rounded-xl border border-gray-200/80 pl-9 pr-3 text-sm focus:outline-none focus:ring-1 focus:ring-primary/40`})]}),e===`all`&&(0,b.jsxs)(m,{value:i,onValueChange:e=>o(e),children:[(0,b.jsx)(d,{className:`h-9 w-[150px] shrink-0 rounded-lg`,children:(0,b.jsx)(u,{})}),(0,b.jsxs)(f,{children:[(0,b.jsx)(p,{value:`relevance`,children:r(`marketplaceSortRelevance`)}),(0,b.jsx)(p,{value:`updated`,children:r(`marketplaceSortUpdated`)})]})]})]})})}function S({count:e}){return(0,b.jsx)(b.Fragment,{children:Array.from({length:e},(e,t)=>(0,b.jsx)(`article`,{className:`h-full rounded-2xl border border-gray-200/40 bg-white px-5 py-4 shadow-sm`,children:(0,b.jsxs)(`div`,{className:`flex items-start justify-between gap-3.5`,children:[(0,b.jsxs)(`div`,{className:`flex min-w-0 flex-1 gap-3`,children:[(0,b.jsx)(h,{className:`h-10 w-10 shrink-0 rounded-xl`}),(0,b.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2 pt-0.5`,children:[(0,b.jsx)(h,{className:`h-4 w-32 max-w-[70%]`}),(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsx)(h,{className:`h-3 w-12`}),(0,b.jsx)(h,{className:`h-3 w-24`})]}),(0,b.jsx)(h,{className:`h-3 w-full`})]})]}),(0,b.jsx)(h,{className:`h-8 w-20 shrink-0 rounded-xl`})]})},`marketplace-skeleton-${t}`))})}function C({hasMore:e,loading:t,sentinelRef:n}){return!e&&!t?null:(0,b.jsxs)(`div`,{className:`py-4`,children:[e&&(0,b.jsx)(`div`,{ref:n,className:`h-1 w-full`,"aria-hidden":`true`}),t&&(0,b.jsx)(`div`,{"data-testid":`marketplace-loading-more`,className:`pt-3 text-center text-xs text-gray-500`,children:r(`loading`)})]})}function w(e){let t=e.trim().toLowerCase().replace(/_/g,`-`),n=[t,t.split(`-`)[0],`en`];return Array.from(new Set(n.filter(Boolean)))}function T(e){return e.trim().toLowerCase().replace(/_/g,`-`)}function E(e,t,n){if(e){let t=Object.entries(e).map(([e,t])=>({locale:T(e),text:typeof t==`string`?t.trim():``})).filter(e=>e.text.length>0);if(t.length>0){let e=new Map(t.map(e=>[e.locale,e.text]));for(let t of n){let n=T(t),r=e.get(n);if(r)return r}for(let e of n){let n=T(e).split(`-`)[0];if(!n)continue;let r=t.find(e=>e.locale===n||e.locale.startsWith(`${n}-`));if(r)return r.text}return t[0]?.text??``}}return t?.trim()??``}function D(e,t){if(!e)return``;for(let n of t)if(T(n).split(`-`)[0]===`zh`&&e.descriptionZh?.trim())return e.descriptionZh.trim();return e.description?.trim()?e.description.trim():e.descriptionZh?.trim()?e.descriptionZh.trim():``}var O=e(t(),1),k=160;function A(e){let t=(0,O.useRef)(null),n=(0,O.useRef)(null),r=(0,O.useRef)(e.onLoadMore),i=(0,O.useRef)(!1);return(0,O.useEffect)(()=>{r.current=e.onLoadMore},[e.onLoadMore]),(0,O.useEffect)(()=>{e.disabled&&(i.current=!1)},[e.disabled]),(0,O.useEffect)(()=>{let a=t.current,o=n.current,s=e.thresholdPx??k;if(e.disabled||!a||!o)return;let c=()=>{i.current||e.disabled||(i.current=!0,Promise.resolve(r.current()).finally(()=>{i.current=!1}))},l=()=>{o.getBoundingClientRect().top-a.getBoundingClientRect().bottom<=s&&c()};if(typeof IntersectionObserver==`function`){let e=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&c()},{root:a,rootMargin:`0px 0px ${s}px 0px`});return e.observe(o),l(),()=>{e.disconnect()}}return a.addEventListener(`scroll`,l,{passive:!0}),l(),()=>{a.removeEventListener(`scroll`,l)}},[e.disabled,e.thresholdPx,e.watchValue]),{containerRef:t,sentinelRef:n}}export{x as a,y as c,E as i,_ as l,w as n,C as o,D as r,S as s,A as t};
@@ -78,35 +78,35 @@
78
78
  })();
79
79
  </script>
80
80
  <title>NextClaw</title>
81
- <script type="module" crossorigin src="/assets/index-SS1xPoWD.js"></script>
81
+ <script type="module" crossorigin src="/assets/index-Db9Cufsy.js"></script>
82
82
  <link rel="modulepreload" crossorigin href="/assets/i18n-D1144VAA.js">
83
83
  <link rel="modulepreload" crossorigin href="/assets/createLucideIcon-DzY6wN61.js">
84
- <link rel="modulepreload" crossorigin href="/assets/cpu-DPPwMzoC.js">
85
- <link rel="modulepreload" crossorigin href="/assets/api-CKKNxbsy.js">
86
- <link rel="modulepreload" crossorigin href="/assets/es2015-ZJ-nWL4L.js">
87
- <link rel="modulepreload" crossorigin href="/assets/select-C2c10F3e.js">
88
- <link rel="modulepreload" crossorigin href="/assets/dist-DN-YM_0Y.js">
84
+ <link rel="modulepreload" crossorigin href="/assets/cpu-DKc3bQic.js">
85
+ <link rel="modulepreload" crossorigin href="/assets/api-rASx2-N4.js">
86
+ <link rel="modulepreload" crossorigin href="/assets/es2015-CVAuMqlM.js">
87
+ <link rel="modulepreload" crossorigin href="/assets/select-HI5kiwX_.js">
88
+ <link rel="modulepreload" crossorigin href="/assets/dist-NBjcwlsw.js">
89
89
  <link rel="modulepreload" crossorigin href="/assets/x-BeyYA_h6.js">
90
- <link rel="modulepreload" crossorigin href="/assets/dialog-DWZeMf9V.js">
91
- <link rel="modulepreload" crossorigin href="/assets/popover-2H9DS7Cv.js">
90
+ <link rel="modulepreload" crossorigin href="/assets/dialog-CR80q3Rm.js">
91
+ <link rel="modulepreload" crossorigin href="/assets/popover-DeAliE_4.js">
92
92
  <link rel="modulepreload" crossorigin href="/assets/search-CRtQwr-h.js">
93
93
  <link rel="modulepreload" crossorigin href="/assets/book-open-BcnAiKde.js">
94
94
  <link rel="modulepreload" crossorigin href="/assets/download-CMM8po31.js">
95
95
  <link rel="modulepreload" crossorigin href="/assets/key-round-DUq47t0P.js">
96
- <link rel="modulepreload" crossorigin href="/assets/notice-card-BM2_YNoc.js">
96
+ <link rel="modulepreload" crossorigin href="/assets/notice-card-CF4AJPM3.js">
97
97
  <link rel="modulepreload" crossorigin href="/assets/status-dot-l3kPFdq_.js">
98
- <link rel="modulepreload" crossorigin href="/assets/app-manager-provider-BM1hziPv.js">
98
+ <link rel="modulepreload" crossorigin href="/assets/app-manager-provider-CUkcbdWk.js">
99
99
  <link rel="modulepreload" crossorigin href="/assets/settings-MWL2SMyk.js">
100
100
  <link rel="modulepreload" crossorigin href="/assets/refresh-cw-CrbD8EkT.js">
101
101
  <link rel="modulepreload" crossorigin href="/assets/sparkles-BmgOD4nY.js">
102
102
  <link rel="modulepreload" crossorigin href="/assets/external-link-CpEvG65F.js">
103
103
  <link rel="modulepreload" crossorigin href="/assets/plus-B-YHtTNC.js">
104
- <link rel="modulepreload" crossorigin href="/assets/doc-browser-context-FukQHvyo.js">
105
- <link rel="modulepreload" crossorigin href="/assets/doc-browser-rZIQIjuw.js">
106
- <link rel="modulepreload" crossorigin href="/assets/doc-browser-CAhfnm0D.js">
107
- <link rel="modulepreload" crossorigin href="/assets/use-config-jAYudJxy.js">
108
- <link rel="modulepreload" crossorigin href="/assets/desktop-BwONApN9.js">
109
- <link rel="stylesheet" crossorigin href="/assets/index-B7CVI2ys.css">
104
+ <link rel="modulepreload" crossorigin href="/assets/doc-browser-context-BPeeiNJ_.js">
105
+ <link rel="modulepreload" crossorigin href="/assets/doc-browser-D2pq4IHR.js">
106
+ <link rel="modulepreload" crossorigin href="/assets/doc-browser-fLs0TcdS.js">
107
+ <link rel="modulepreload" crossorigin href="/assets/use-config-BFqzVF8Y.js">
108
+ <link rel="modulepreload" crossorigin href="/assets/desktop-C-cDRCBY.js">
109
+ <link rel="stylesheet" crossorigin href="/assets/index-DV57tBmg.css">
110
110
  </head>
111
111
 
112
112
  <body>
@@ -1,3 +0,0 @@
1
- import{_ as e,m as t}from"./i18n-D1144VAA.js";import{t as n}from"./createLucideIcon-DzY6wN61.js";var r=`modulepreload`,i=function(e){return`/`+e},a={},o=function(e,t,n){let o=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),s=document.querySelector(`meta[property=csp-nonce]`),c=s?.nonce||s?.getAttribute(`nonce`);function l(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}o=l(t.map(t=>{if(t=i(t,n),t in a)return;a[t]=!0;let o=t.endsWith(`.css`),s=o?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.href===t&&(!o||r.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${s}`))return;let l=document.createElement(`link`);if(l.rel=o?`stylesheet`:r,o||(l.as=`script`),l.crossOrigin=``,l.href=t,c&&l.setAttribute(`nonce`,c),document.head.appendChild(l),o)return new Promise((e,n)=>{l.addEventListener(`load`,e),l.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function s(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return o.then(t=>{for(let e of t||[])e.status===`rejected`&&s(e.reason);return e().catch(s)})},s=e(t(),1),c=`popstate`;function l(e={}){function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return m(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:h(t)}return _(t,n,null,e)}function u(e,t){if(e===!1||e==null)throw Error(t)}function d(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function f(){return Math.random().toString(36).substring(2,10)}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function m(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?g(t):t,state:n,key:t&&t.key||r||f()}}function h({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 g(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 _(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,l=null,u=d();u??(u=0,o.replaceState({...o.state,idx:u},``));function d(){return(o.state||{idx:null}).idx}function f(){s=`POP`;let e=d(),t=e==null?null:e-u;u=e,l&&l({action:s,location:y.location,delta:t})}function h(e,t){s=`PUSH`;let r=m(y.location,e,t);n&&n(r,e),u=d()+1;let c=p(r,u),f=y.createHref(r);try{o.pushState(c,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&l&&l({action:s,location:y.location,delta:1})}function g(e,t){s=`REPLACE`;let r=m(y.location,e,t);n&&n(r,e),u=d();let i=p(r,u),c=y.createHref(r);o.replaceState(i,``,c),a&&l&&l({action:s,location:y.location,delta:0})}function _(e){return v(e)}let y={get action(){return s},get location(){return e(i,o)},listen(e){if(l)throw Error(`A history only accepts one active listener`);return i.addEventListener(c,f),l=e,()=>{i.removeEventListener(c,f),l=null}},createHref(e){return t(i,e)},createURL:_,encodeLocation(e){let t=_(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:g,go(e){return o.go(e)}};return y}function v(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),u(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:h(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function y(e,t,n=`/`){return b(e,t,n,!1)}function b(e,t,n,r){let i=D((typeof t==`string`?g(t):t).pathname||`/`,n);if(i==null)return null;let a=S(e);w(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=ue(i);o=ce(a[e],t,r)}return o}function x(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function S(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;u(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=j([r,c.relativePath]),d=n.concat(c);e.children&&e.children.length>0&&(u(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),S(e.children,t,d,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:oe(l,e.index),routesMeta:d})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of C(e.path))a(e,t,!0,n)}),t}function C(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=C(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function w(e){e.sort((e,t)=>e.score===t.score?se(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var T=/^:[\w-]+$/,ee=3,te=2,ne=1,re=10,ie=-2,ae=e=>e===`*`;function oe(e,t){let n=e.split(`/`),r=n.length;return n.some(ae)&&(r+=ie),t&&(r+=te),n.filter(e=>!ae(e)).reduce((e,t)=>e+(T.test(t)?ee:t===``?ne:re),r)}function se(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ce(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=E({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=E({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:j([a,u.pathname]),pathnameBase:he(j([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=j([a,u.pathnameBase]))}return o}function E(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=le(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function le(e,t=!1,n=!0){d(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=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ue(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return d(!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 D(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 de=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function fe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?g(e):e,a;return n?(n=n.replace(/\/\/+/g,`/`),a=n.startsWith(`/`)?pe(n.substring(1),`/`):pe(n,t)):a=t,{pathname:a,search:ge(r),hash:_e(i)}}function pe(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function O(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 me(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function k(e){let t=me(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function A(e,t,n,r=!1){let i;typeof e==`string`?i=g(e):(i={...e},u(!i.pathname||!i.pathname.includes(`?`),O(`?`,`pathname`,`search`,i)),u(!i.pathname||!i.pathname.includes(`#`),O(`#`,`pathname`,`hash`,i)),u(!i.search||!i.search.includes(`#`),O(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=fe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),d=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||d)&&(c.pathname+=`/`),c}var j=e=>e.join(`/`).replace(/\/\/+/g,`/`),he=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),ge=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,_e=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,ve=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ye(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function be(e){return e.map(e=>e.route.path).filter(Boolean).join(`/`).replace(/\/\/*/g,`/`)||`/`}var xe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Se(e,t){let n=e;if(typeof n!=`string`||!de.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(xe)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=D(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{d(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ce=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ce);var we=[`GET`,...Ce];new Set(we);var M=s.createContext(null);M.displayName=`DataRouter`;var N=s.createContext(null);N.displayName=`DataRouterState`;var Te=s.createContext(!1),Ee=s.createContext({isTransitioning:!1});Ee.displayName=`ViewTransition`;var De=s.createContext(new Map);De.displayName=`Fetchers`;var Oe=s.createContext(null);Oe.displayName=`Await`;var P=s.createContext(null);P.displayName=`Navigation`;var F=s.createContext(null);F.displayName=`Location`;var I=s.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName=`Route`;var L=s.createContext(null);L.displayName=`RouteError`;var ke=`REACT_ROUTER_ERROR`,Ae=`REDIRECT`,je=`ROUTE_ERROR_RESPONSE`;function Me(e){if(e.startsWith(`${ke}:${Ae}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Ne(e){if(e.startsWith(`${ke}:${je}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new ve(t.status,t.statusText,t.data)}catch{}}function Pe(e,{relative:t}={}){u(R(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=s.useContext(P),{hash:i,pathname:a,search:o}=V(e,{relative:t}),c=a;return n!==`/`&&(c=a===`/`?n:j([n,a])),r.createHref({pathname:c,search:o,hash:i})}function R(){return s.useContext(F)!=null}function z(){return u(R(),`useLocation() may be used only in the context of a <Router> component.`),s.useContext(F).location}var Fe=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Ie(e){s.useContext(P).static||s.useLayoutEffect(e)}function B(){let{isDataRoute:e}=s.useContext(I);return e?nt():Le()}function Le(){u(R(),`useNavigate() may be used only in the context of a <Router> component.`);let e=s.useContext(M),{basename:t,navigator:n}=s.useContext(P),{matches:r}=s.useContext(I),{pathname:i}=z(),a=JSON.stringify(k(r)),o=s.useRef(!1);return Ie(()=>{o.current=!0}),s.useCallback((r,s={})=>{if(d(o.current,Fe),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=A(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:j([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}s.createContext(null);function Re(){let{matches:e}=s.useContext(I),t=e[e.length-1];return t?t.params:{}}function V(e,{relative:t}={}){let{matches:n}=s.useContext(I),{pathname:r}=z(),i=JSON.stringify(k(n));return s.useMemo(()=>A(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ze(e,t){return Be(e,t)}function Be(e,t,n,r,i){u(R(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:a}=s.useContext(P),{matches:o}=s.useContext(I),c=o[o.length-1],l=c?c.params:{},f=c?c.pathname:`/`,p=c?c.pathnameBase:`/`,m=c&&c.route;{let e=m&&m.path||``;it(f,!m||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${e}">) 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="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let h=z(),_;if(t){let e=typeof t==`string`?g(t):t;u(p===`/`||e.pathname?.startsWith(p),`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 "${p}" but pathname "${e.pathname}" was given in the \`location\` prop.`),_=e}else _=h;let v=_.pathname||`/`,b=v;if(p!==`/`){let e=p.replace(/^\//,``).split(`/`);b=`/`+v.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let x=y(e,{pathname:b});d(m||x!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),d(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.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 S=Ke(x&&x.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:j([p,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?p:j([p,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),o,n,r,i);return t&&S?s.createElement(F.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,..._},navigationType:`POP`}},S):S}function Ve(){let e=tt(),t=ye(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)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=s.createElement(s.Fragment,null,s.createElement(`p`,null,`💿 Hey developer 👋`),s.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,s.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,s.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),s.createElement(s.Fragment,null,s.createElement(`h2`,null,`Unexpected Application Error!`),s.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?s.createElement(`pre`,{style:i},n):null,o)}var He=s.createElement(Ve,null),Ue=class extends s.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?t.error:e.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(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Ne(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:s.createElement(I.Provider,{value:this.props.routeContext},s.createElement(L.Provider,{value:e,children:this.props.component}));return this.context?s.createElement(We,{error:e},t):t}};Ue.contextType=Te;var H=new WeakMap;function We({children:e,error:t}){let{basename:n}=s.useContext(P);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Me(t.digest);if(e){let r=H.get(t);if(r)throw r;let i=Se(e.location,n);if(xe&&!H.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw H.set(t,n),n}return s.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Ge({routeContext:e,match:t,children:n}){let r=s.useContext(M);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),s.createElement(I.Provider,{value:e},n)}function Ke(e,t=[],n=null,r=null,i=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 a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);u(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(`,`)}`),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,l=-1;if(n)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){c=!0,a=l>=0?a.slice(0,l+1):[a[0]];break}}}let d=n&&r?(e,t)=>{r(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:be(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,i)=>{let u,f=!1,p=null,m=null;n&&(u=o&&r.route.id?o[r.route.id]:void 0,p=r.route.errorElement||He,c&&(l<0&&i===0?(it(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):l===i&&(f=!0,m=r.route.hydrateFallbackElement||null)));let h=t.concat(a.slice(0,i+1)),g=()=>{let t;return t=u?p:f?m:r.route.Component?s.createElement(r.route.Component,null):r.route.element?r.route.element:e,s.createElement(Ge,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?s.createElement(Ue,{location:n.location,revalidation:n.revalidation,component:p,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:d}):g()},null)}function qe(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Je(e){let t=s.useContext(M);return u(t,qe(e)),t}function Ye(e){let t=s.useContext(N);return u(t,qe(e)),t}function Xe(e){let t=s.useContext(I);return u(t,qe(e)),t}function Ze(e){let t=Xe(e),n=t.matches[t.matches.length-1];return u(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Qe(){return Ze(`useRouteId`)}function $e(){return Ye(`useNavigation`).navigation}function et(){let{matches:e,loaderData:t}=Ye(`useMatches`);return s.useMemo(()=>e.map(e=>x(e,t)),[e,t])}function tt(){let e=s.useContext(L),t=Ye(`useRouteError`),n=Ze(`useRouteError`);return e===void 0?t.errors?.[n]:e}function nt(){let{router:e}=Je(`useNavigate`),t=Ze(`useNavigate`),n=s.useRef(!1);return Ie(()=>{n.current=!0}),s.useCallback(async(r,i={})=>{d(n.current,Fe),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var rt={};function it(e,t,n){!t&&!rt[e]&&(rt[e]=!0,d(!1,n))}s.useOptimistic,s.memo(at);function at({routes:e,future:t,state:n,onError:r}){return Be(e,void 0,n,r,t)}function ot({to:e,replace:t,state:n,relative:r}){u(R(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=s.useContext(P);d(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=s.useContext(I),{pathname:o}=z(),c=B(),l=A(e,k(a),o,r===`path`),f=JSON.stringify(l);return s.useEffect(()=>{c(JSON.parse(f),{replace:t,state:n,relative:r})},[c,f,r,t,n]),null}function st(e){u(!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 ct({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){u(!R(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=s.useMemo(()=>({basename:c,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[c,i,a,o]);typeof n==`string`&&(n=g(n));let{pathname:f=`/`,search:p=``,hash:m=``,state:h=null,key:_=`default`}=n,v=s.useMemo(()=>{let e=D(f,c);return e==null?null:{location:{pathname:e,search:p,hash:m,state:h,key:_},navigationType:r}},[c,f,p,m,h,_,r]);return d(v!=null,`<Router basename="${c}"> is not able to match the URL "${f}${p}${m}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:s.createElement(P.Provider,{value:l},s.createElement(F.Provider,{children:t,value:v}))}function lt({children:e,location:t}){return ze(U(e),t)}s.Component;function U(e,t=[]){let n=[];return s.Children.forEach(e,(e,r)=>{if(!s.isValidElement(e))return;let i=[...t,r];if(e.type===s.Fragment){n.push.apply(n,U(e.props.children,i));return}u(e.type===st,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),u(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=U(e.props.children,i)),n.push(a)}),n}var W=`get`,G=`application/x-www-form-urlencoded`;function K(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function ut(e){return K(e)&&e.tagName.toLowerCase()===`button`}function dt(e){return K(e)&&e.tagName.toLowerCase()===`form`}function ft(e){return K(e)&&e.tagName.toLowerCase()===`input`}function pt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mt(e,t){return e.button===0&&(!t||t===`_self`)&&!pt(e)}var q=null;function ht(){if(q===null)try{new FormData(document.createElement(`form`),0),q=!1}catch{q=!0}return q}var gt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function J(e){return e!=null&&!gt.has(e)?(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${G}"`),null):e}function _t(e,t){let n,r,i,a,o;if(dt(e)){let o=e.getAttribute(`action`);r=o?D(o,t):null,n=e.getAttribute(`method`)||W,i=J(e.getAttribute(`enctype`))||G,a=new FormData(e)}else if(ut(e)||ft(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?D(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||W,i=J(e.getAttribute(`formenctype`))||J(o.getAttribute(`enctype`))||G,a=new FormData(o,e),!ht()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(K(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=W,r=null,i=G,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var vt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},yt=/[&><\u2028\u2029]/g;function bt(e){return e.replace(yt,e=>vt[e])}function Y(e,t){if(e===!1||e==null)throw Error(t)}function xt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&D(i.pathname,t)===`/`?i.pathname=`${t.replace(/\/$/,``)}/_root.${r}`:i.pathname=`${i.pathname.replace(/\/$/,``)}.${r}`,i}async function St(e,t){if(e.id in t)return t[e.id];try{let n=await o(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ct(e){return e!=null&&typeof e.page==`string`}function wt(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 Tt(e,t,n){return At((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await St(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(wt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Et(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Dt(e,t,{includeHydrateFallback:n}={}){return Ot(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Ot(e){return[...new Set(e)]}function kt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function At(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ct(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(kt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function jt(){let e=s.useContext(M);return Y(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Mt(){let e=s.useContext(N);return Y(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var X=s.createContext(void 0);X.displayName=`FrameworkContext`;function Nt(){let e=s.useContext(X);return Y(e,`You must render this element inside a <HydratedRouter> element`),e}function Pt(e,t){let n=s.useContext(X),[r,i]=s.useState(!1),[a,o]=s.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=s.useRef(null);s.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),s.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:Z(c,m),onBlur:Z(l,h),onMouseEnter:Z(u,m),onMouseLeave:Z(d,h),onTouchStart:Z(f,m)}]:[a,p,{}]:[!1,p,{}]}function Z(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ft({page:e,...t}){let{router:n}=jt(),r=s.useMemo(()=>y(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?s.createElement(Lt,{page:e,matches:r,...t}):null}function It(e){let{manifest:t,routeModules:n}=Nt(),[r,i]=s.useState([]);return s.useEffect(()=>{let r=!1;return Tt(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Lt({page:e,matches:t,...n}){let r=z(),{future:i,manifest:a,routeModules:o}=Nt(),{basename:c}=jt(),{loaderData:l,matches:u}=Mt(),d=s.useMemo(()=>Et(e,t,u,a,r,`data`),[e,t,u,a,r]),f=s.useMemo(()=>Et(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=s.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let u=xt(e,c,i.unstable_trailingSlashAwareDataRequests,`data`);return s&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,i.unstable_trailingSlashAwareDataRequests,l,r,a,d,t,e,o]),m=s.useMemo(()=>Dt(f,a),[f,a]),h=It(f);return s.createElement(s.Fragment,null,p.map(e=>s.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>s.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>s.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Rt(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}s.Component;var zt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{zt&&(window.__reactRouterVersion=`7.13.0`)}catch{}function Bt({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=s.useRef();i.current??=l({window:r,v5Compat:!0});let a=i.current,[o,c]=s.useState({action:a.action,location:a.location}),u=s.useCallback(e=>{n===!1?c(e):s.startTransition(()=>c(e))},[n]);return s.useLayoutEffect(()=>a.listen(u),[a,u]),s.createElement(ct,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function Vt({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=s.useState({action:n.action,location:n.location}),o=s.useCallback(e=>{r===!1?a(e):s.startTransition(()=>a(e))},[r]);return s.useLayoutEffect(()=>n.listen(o),[n,o]),s.createElement(ct,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}Vt.displayName=`unstable_HistoryRouter`;var Ht=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Q=s.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,state:o,target:c,to:l,preventScrollReset:u,viewTransition:d,unstable_defaultShouldRevalidate:f,...p},m){let{basename:h,unstable_useTransitions:g}=s.useContext(P),_=typeof l==`string`&&Ht.test(l),v=Se(l,h);l=v.to;let y=Pe(l,{relative:r}),[b,x,S]=Pt(n,p),C=Yt(l,{replace:a,state:o,target:c,preventScrollReset:u,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:g});function w(t){e&&e(t),t.defaultPrevented||C(t)}let T=s.createElement(`a`,{...p,...S,href:v.absoluteURL||y,onClick:v.isExternal||i?e:w,ref:Rt(m,x),target:c,"data-discover":!_&&t===`render`?`true`:void 0});return b&&!_?s.createElement(s.Fragment,null,T,s.createElement(Ft,{page:y})):T});Q.displayName=`Link`;var Ut=s.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:c,...l},u){let d=V(a,{relative:l.relative}),f=z(),p=s.useContext(N),{navigator:m,basename:h}=s.useContext(P),g=p!=null&&an(d)&&o===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=D(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let ee=typeof i==`function`?i(C):i;return s.createElement(Q,{...l,"aria-current":w,className:T,ref:u,style:ee,to:a,viewTransition:o},typeof c==`function`?c(C):c)});Ut.displayName=`NavLink`;var Wt=s.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=W,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p,...m},h)=>{let{unstable_useTransitions:g}=s.useContext(P),_=Qt(),v=$t(c,{relative:u}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof c==`string`&&Ht.test(c);return s.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute(`formmethod`)||o,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:p});g&&n!==!1?s.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});Wt.displayName=`Form`;function Gt({getKey:e,storageKey:t,...n}){let r=s.useContext(X),{basename:i}=s.useContext(P),a=z(),o=et();nn({getKey:e,storageKey:t});let c=s.useMemo(()=>{if(!r||!e)return null;let t=tn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let l=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return s.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${l})(${bt(JSON.stringify(t||en))}, ${bt(JSON.stringify(c))})`}})}Gt.displayName=`ScrollRestoration`;function Kt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qt(e){let t=s.useContext(M);return u(t,Kt(e)),t}function Jt(e){let t=s.useContext(N);return u(t,Kt(e)),t}function Yt(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=B(),d=z(),f=V(e,{relative:a});return s.useCallback(p=>{if(mt(p,t)){p.preventDefault();let t=n===void 0?h(d)===h(f):n,m=()=>u(e,{replace:t,state:r,preventScrollReset:i,relative:a,viewTransition:o,unstable_defaultShouldRevalidate:c});l?s.startTransition(()=>m()):m()}},[d,u,f,n,r,t,e,i,a,o,c,l])}var Xt=0,Zt=()=>`__${String(++Xt)}__`;function Qt(){let{router:e}=qt(`useSubmit`),{basename:t}=s.useContext(P),n=Qe(),r=e.fetch,i=e.navigate;return s.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=_t(e,t);a.navigate===!1?await r(a.fetcherKey||Zt(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function $t(e,{relative:t}={}){let{basename:n}=s.useContext(P),r=s.useContext(I);u(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...V(e||`.`,{relative:t})},o=z();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:j([n,a.pathname])),h(a)}var en=`react-router-scroll-positions`,$={};function tn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:D(e.pathname,n)||e.pathname},t)),i??=e.key,i}function nn({getKey:e,storageKey:t}={}){let{router:n}=qt(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Jt(`useScrollRestoration`),{basename:a}=s.useContext(P),o=z(),c=et(),l=$e();s.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),rn(s.useCallback(()=>{if(l.state===`idle`){let t=tn(o,c,a,e);$[t]=window.scrollY}try{sessionStorage.setItem(t||en,JSON.stringify($))}catch(e){d(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[l.state,e,a,o,c,t])),typeof document<`u`&&(s.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||en);e&&($=JSON.parse(e))}catch{}},[t]),s.useLayoutEffect(()=>{let t=n?.enableScrollRestoration($,()=>window.scrollY,e?(t,n)=>tn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),s.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{d(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function rn(e,t){let{capture:n}=t||{};s.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function an(e,{relative:t}={}){let n=s.useContext(Ee);u(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=qt(`useViewTransitionState`),i=V(e,{relative:t});if(!n.isTransitioning)return!1;let a=D(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=D(n.nextLocation.pathname,r)||n.nextLocation.pathname;return E(i.pathname,o)!=null||E(i.pathname,a)!=null}var on=n(`Cpu`,[[`rect`,{width:`16`,height:`16`,x:`4`,y:`4`,rx:`2`,key:`14l7u7`}],[`rect`,{width:`6`,height:`6`,x:`9`,y:`9`,rx:`1`,key:`5aljv4`}],[`path`,{d:`M15 2v2`,key:`13l42r`}],[`path`,{d:`M15 20v2`,key:`15mkzm`}],[`path`,{d:`M2 15h2`,key:`1gxd5l`}],[`path`,{d:`M2 9h2`,key:`1bbxkp`}],[`path`,{d:`M20 15h2`,key:`19e6y8`}],[`path`,{d:`M20 9h2`,key:`19tzq7`}],[`path`,{d:`M9 2v2`,key:`165o2o`}],[`path`,{d:`M9 20v2`,key:`i2bqo8`}]]);export{ot as a,z as c,o as d,Ut as i,B as l,Bt as n,st as o,Q as r,lt as s,on as t,Re as u};