db-studio 1.16.2 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +165 -102
- package/dist/index.js.map +1 -1
- package/dist/web-dist/assets/_pathlessLayout-D83hYFIC.js +1 -0
- package/dist/web-dist/assets/_pathlessLayout-DYRsUfs6.js +2 -0
- package/dist/web-dist/assets/_queryId-DmyRcSX-.js +1 -0
- package/dist/web-dist/assets/_table-CXzhHR9S.js +1 -0
- package/dist/web-dist/assets/_table-Cwy7lxKk.js +1 -0
- package/dist/web-dist/assets/_table-DaqO5XGq.js +1 -0
- package/dist/web-dist/assets/abap-Ds2wIDQc.js +1 -0
- package/dist/web-dist/assets/apex-DfqBN11z.js +1 -0
- package/dist/web-dist/assets/azcli-COqL1c-b.js +1 -0
- package/dist/web-dist/assets/badge-Ckwkbv_3.js +1 -0
- package/dist/web-dist/assets/bat-Nrlrgwbn.js +1 -0
- package/dist/web-dist/assets/bicep-DMqb4xTm.js +2 -0
- package/dist/web-dist/assets/browser-dcbfhXDu.js +1 -0
- package/dist/web-dist/assets/{bundle-mjs-g0oakdN9.js → bundle-mjs-DfrVkH8G.js} +1 -1
- package/dist/web-dist/assets/cameligo-DQX1RguE.js +1 -0
- package/dist/web-dist/assets/chat-sidebar-p9xpAAXQ.js +132 -0
- package/dist/web-dist/assets/clojure-CmnlCds-.js +1 -0
- package/dist/web-dist/assets/{code-editor-CTRHqZru.js → code-editor-DsRAUGQh.js} +2 -2
- package/dist/web-dist/assets/coffee-CgcM3HWm.js +1 -0
- package/dist/web-dist/assets/cpp-BnqpxZdA.js +1 -0
- package/dist/web-dist/assets/csharp-B8V_ECLX.js +1 -0
- package/dist/web-dist/assets/csp-Dzh7GjET.js +1 -0
- package/dist/web-dist/assets/css-BY0zxVqM.js +3 -0
- package/dist/web-dist/assets/cssMode-D_jEABO9.js +1 -0
- package/dist/web-dist/assets/cypher-D9AVJPko.js +1 -0
- package/dist/web-dist/assets/dart-vuJN5abD.js +1 -0
- package/dist/web-dist/assets/database.store-C0jTx_DA.js +57 -0
- package/dist/web-dist/assets/{dist-DlZR7Oow.js → dist-DmSgBrHs.js} +1 -1
- package/dist/web-dist/assets/dockerfile-Du-akT44.js +1 -0
- package/dist/web-dist/assets/ecl-C3XWQlLZ.js +1 -0
- package/dist/web-dist/assets/editor-1FQrmyyI.css +1 -0
- package/dist/web-dist/assets/editor.api-VeMVvGYa.js +865 -0
- package/dist/web-dist/assets/elixir-BzsCBGJ0.js +1 -0
- package/dist/web-dist/assets/esm-D_bQ4AdP.js +501 -0
- package/dist/web-dist/assets/flow9-z5gBTD0L.js +1 -0
- package/dist/web-dist/assets/freemarker2-B9XmkS8x.js +3 -0
- package/dist/web-dist/assets/fsharp-CMq6tChx.js +1 -0
- package/dist/web-dist/assets/go-ClPsEbRK.js +1 -0
- package/dist/web-dist/assets/graphql-7BvkEJ5O.js +1 -0
- package/dist/web-dist/assets/handlebars-sf8CVwlq.js +1 -0
- package/dist/web-dist/assets/hcl-DN6aCTHV.js +1 -0
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-BU0nMuYA.js +1 -0
- package/dist/web-dist/assets/html-DI5TL_8H.js +1 -0
- package/dist/web-dist/assets/htmlMode-D_4DT2Lu.js +1 -0
- package/dist/web-dist/assets/{icons-wNdPUgHM.js → icons-BEkcNqUd.js} +1 -1
- package/dist/web-dist/assets/index-CK2sj4Xy.css +2 -0
- package/dist/web-dist/assets/index-b6Apx1z7.js +39 -0
- package/dist/web-dist/assets/indexes-Cv0o_HTj.js +1 -0
- package/dist/web-dist/assets/ini-Ba74TRs3.js +1 -0
- package/dist/web-dist/assets/java-B1OFDleH.js +1 -0
- package/dist/web-dist/assets/javascript-Cf3sZaZX.js +1 -0
- package/dist/web-dist/assets/json-editor-C9dFqjTV.js +1 -0
- package/dist/web-dist/assets/jsonMode-CQjwhzT5.js +7 -0
- package/dist/web-dist/assets/julia-CMywvhYA.js +1 -0
- package/dist/web-dist/assets/keys-o03XLuW4.js +1 -0
- package/dist/web-dist/assets/kotlin-BD6_sIY9.js +1 -0
- package/dist/web-dist/assets/less-BxdK-Aa1.js +2 -0
- package/dist/web-dist/assets/lexon-DCaYyeqi.js +1 -0
- package/dist/web-dist/assets/liquid-D7tk2apZ.js +1 -0
- package/dist/web-dist/assets/{logs-BnjjoFbl.js → logs-Ncb6EFEi.js} +1 -1
- package/dist/web-dist/assets/lspLanguageFeatures-DHxnBjVJ.js +4 -0
- package/dist/web-dist/assets/lua-DYwtBF6d.js +1 -0
- package/dist/web-dist/assets/m3-CogUFTfR.js +1 -0
- package/dist/web-dist/assets/markdown-COKMRj9K.js +1 -0
- package/dist/web-dist/assets/mdx-H6YCl9d8.js +1 -0
- package/dist/web-dist/assets/mermaid-GHXKKRXX-D3S70ynC.js +1 -0
- package/dist/web-dist/assets/{middleware-Bet3mw2T.js → middleware-CEqbkwLH.js} +1 -1
- package/dist/web-dist/assets/mips-BDOMMsh0.js +1 -0
- package/dist/web-dist/assets/module-CYndhtxW.js +2 -0
- package/dist/web-dist/assets/monaco-theme-BnSsSzUH.css +1 -0
- package/dist/web-dist/assets/monaco-theme-CyGd7xOU.js +64 -0
- package/dist/web-dist/assets/msdax-Bt2yooL5.js +1 -0
- package/dist/web-dist/assets/mysql-Bs8-d6RT.js +1 -0
- package/dist/web-dist/assets/objective-c-DZGYv99U.js +1 -0
- package/dist/web-dist/assets/pascal-FvUHIAld.js +1 -0
- package/dist/web-dist/assets/pascaligo-DEr9uXJO.js +1 -0
- package/dist/web-dist/assets/perl-DfX9jvgM.js +1 -0
- package/dist/web-dist/assets/personal-preferences.store-BIcu6qr5.js +1 -0
- package/dist/web-dist/assets/pgsql-B12f-wRt.js +1 -0
- package/dist/web-dist/assets/php-MynGtmh0.js +1 -0
- package/dist/web-dist/assets/pla-BSfIEgVT.js +1 -0
- package/dist/web-dist/assets/postiats-wriGJNMc.js +1 -0
- package/dist/web-dist/assets/powerquery-qTNF5irm.js +1 -0
- package/dist/web-dist/assets/powershell-Cr0AiP2J.js +1 -0
- package/dist/web-dist/assets/preload-helper-DICoZAvL.js +1 -0
- package/dist/web-dist/assets/protobuf-B5pCjOfx.js +2 -0
- package/dist/web-dist/assets/pug-BnGzsuEw.js +1 -0
- package/dist/web-dist/assets/python-Bd-J5HMt.js +1 -0
- package/dist/web-dist/assets/qsharp-C-Z8Szjm.js +1 -0
- package/dist/web-dist/assets/{queries.store-BlC7QGq6.js → queries.store-BbUkkWy1.js} +1 -1
- package/dist/web-dist/assets/{query-runner-CQWHEby5.js → query-runner-DBIufzsZ.js} +5 -5
- package/dist/web-dist/assets/r-lFEgLDol.js +1 -0
- package/dist/web-dist/assets/radix-ui-Bp71_UWp.js +51 -0
- package/dist/web-dist/assets/razor-BL-2JJuP.js +1 -0
- package/dist/web-dist/assets/react-BziCK5DU.js +1 -0
- package/dist/web-dist/assets/{react-dom-CnDfVSZQ.js → react-dom-ctQEFzyp.js} +5 -5
- package/dist/web-dist/assets/redis-CJPiZ1dc.js +1 -0
- package/dist/web-dist/assets/redis-value-rbj0L_ie.js +1 -0
- package/dist/web-dist/assets/redshift-D1FKNo6F.js +1 -0
- package/dist/web-dist/assets/restructuredtext-BdtNntNZ.js +1 -0
- package/dist/web-dist/assets/{rolldown-runtime-Y-txFyxk.js → rolldown-runtime-Ba77kUFP.js} +1 -1
- package/dist/web-dist/assets/ruby-C2uUAsPh.js +1 -0
- package/dist/web-dist/assets/runner-WhyDqbco.js +1 -0
- package/dist/web-dist/assets/rust-B22jVKPi.js +1 -0
- package/dist/web-dist/assets/sb-H5-MsoWu.js +1 -0
- package/dist/web-dist/assets/scala-JHuRLUuq.js +1 -0
- package/dist/web-dist/assets/{schema-C27u7buH.js → schema-DdnQO20v.js} +1 -1
- package/dist/web-dist/assets/scheme-CqKe-_5y.js +1 -0
- package/dist/web-dist/assets/scss-C9ckl5Lm.js +3 -0
- package/dist/web-dist/assets/select-Cg3fBZqb.js +1 -0
- package/dist/web-dist/assets/separator-B2Ii4cjw.js +1 -0
- package/dist/web-dist/assets/sheet-sidebar-D8BG4Pf9.js +1 -0
- package/dist/web-dist/assets/shell-C9lIrU5P.js +1 -0
- package/dist/web-dist/assets/solidity-BdsCByFb.js +1 -0
- package/dist/web-dist/assets/sophia-BiYQOR15.js +1 -0
- package/dist/web-dist/assets/sparql-CZhOhni4.js +1 -0
- package/dist/web-dist/assets/spinner-gvrX8mkL.js +1 -0
- package/dist/web-dist/assets/sql-DGoEI4nz.js +1 -0
- package/dist/web-dist/assets/st-DUBBkXkg.js +1 -0
- package/dist/web-dist/assets/swift-D_36y0eN.js +1 -0
- package/dist/web-dist/assets/systemverilog-BAtlR_WK.js +1 -0
- package/dist/web-dist/assets/{table-B1OYFDnr.js → table-Gq1Nd4WJ.js} +1 -1
- package/dist/web-dist/assets/tanstack-HxB2LyLp.js +8 -0
- package/dist/web-dist/assets/tcl-D05MO8B_.js +1 -0
- package/dist/web-dist/assets/tooltip-CIAbgIn7.js +12 -0
- package/dist/web-dist/assets/tsMode-4FmdP9_o.js +11 -0
- package/dist/web-dist/assets/twig-CPq3SV5E.js +1 -0
- package/dist/web-dist/assets/typescript-CEcdsK9n.js +1 -0
- package/dist/web-dist/assets/typespec-I6aAHcEc.js +1 -0
- package/dist/web-dist/assets/utils-CNXzeC6_.js +1 -0
- package/dist/web-dist/assets/vb-C6fWMOt8.js +1 -0
- package/dist/web-dist/assets/{visualizer-CITcnwJh.js → visualizer-Cxu0_nai.js} +1 -1
- package/dist/web-dist/assets/wgsl-CsswhpkD.js +298 -0
- package/dist/web-dist/assets/workers-CH8V5wKq.js +1 -0
- package/dist/web-dist/assets/xml-Clh3WxEv.js +1 -0
- package/dist/web-dist/assets/yaml--Kwp2ruw.js +1 -0
- package/dist/web-dist/index.html +22 -20
- package/package.json +8 -5
- package/dist/web-dist/assets/_pathlessLayout-C0MMCDcm.js +0 -1
- package/dist/web-dist/assets/_pathlessLayout-XjSpVK5x.js +0 -132
- package/dist/web-dist/assets/_queryId-OFkn9Oa-.js +0 -1
- package/dist/web-dist/assets/_table-DWUmdgY6.js +0 -1
- package/dist/web-dist/assets/_table-jJR4Ocv2.js +0 -1
- package/dist/web-dist/assets/badge-Bd7hbykP.js +0 -1
- package/dist/web-dist/assets/browser-B8_CLARX.js +0 -1
- package/dist/web-dist/assets/database.store-DJ10NZng.js +0 -57
- package/dist/web-dist/assets/format-cell-value-ClBO-Y4U.js +0 -1
- package/dist/web-dist/assets/highlighted-body-OFNGDK62-jkW4Egvm.js +0 -1
- package/dist/web-dist/assets/index-BANk_UGi.js +0 -36
- package/dist/web-dist/assets/index-Ir-8O5kw.css +0 -2
- package/dist/web-dist/assets/indexes-hgIGRB__.js +0 -1
- package/dist/web-dist/assets/mermaid-GHXKKRXX-BUBXMhKa.js +0 -1
- package/dist/web-dist/assets/monaco-editor-DxDiR4f3.js +0 -1252
- package/dist/web-dist/assets/monaco-editor-IL9D_L0g.css +0 -1
- package/dist/web-dist/assets/monitoring-DXY00d-N.js +0 -22
- package/dist/web-dist/assets/overlay.store-DzkuYBKd.js +0 -11
- package/dist/web-dist/assets/radix-ui-D3kd-zkB.js +0 -51
- package/dist/web-dist/assets/react-1w3eYWHr.js +0 -1
- package/dist/web-dist/assets/redis-value-D7lbyO7s.js +0 -1
- package/dist/web-dist/assets/runner-BqitD-mp.js +0 -1
- package/dist/web-dist/assets/schema-C8mAjJOp.js +0 -1
- package/dist/web-dist/assets/tanstack-BvmgSO8H.js +0 -11
- package/dist/web-dist/assets/use-database-engine-wK2YTpfJ.js +0 -1
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{n as kt}from"./rolldown-runtime-Y-txFyxk.js";import{B as jt,G as qt,H as zt,U as Mt,V as $t,W as Ht,gt as Vt,kt as Wt}from"./radix-ui-D3kd-zkB.js";import{n as ft,t as Jt}from"./bundle-mjs-g0oakdN9.js";import{t as Kt}from"./react-1w3eYWHr.js";import{s as Xt}from"./database.store-DJ10NZng.js";import{c as Yt,l as Gt,o as Qt,s as Zt}from"./monitoring-DXY00d-N.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@1.16.2"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="859b2ba8-1d34-4657-8db0-7883de9e8abb",e._sentryDebugIdIdentifier="sentry-dbid-859b2ba8-1d34-4657-8db0-7883de9e8abb")}catch{}})();function ee(...e){return Jt(ft(e))}var L=Wt();function ns({size:e="size-6",color:t="bg-primary",className:r,...n}){const s=Array(12).fill(0);return(0,L.jsx)("div",{className:ee(e),children:(0,L.jsx)("div",{className:ee("relative top-1/2 left-1/2 h-[inherit] w-[inherit]"),children:s.map((o,a)=>(0,L.jsx)("div",{className:ee("-left-[10%] -top-[3.9%] absolute h-[8%] w-[24%] animate-spinner rounded-md",t,`bar:nth-child(${a+1})`,r),style:{animationDelay:`-${1.3-a*.1}s`,transform:`rotate(${30*a}deg) translate(146%)`},...n},`spinner-bar-${String(a)}`))})})}var Je=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ke=ft,er=(e,t)=>r=>{var n;if(t?.variants==null)return Ke(e,r?.class,r?.className);const{variants:s,defaultVariants:o}=t,a=Object.keys(s).map(c=>{const u=r?.[c],h=o?.[c];if(u===null)return null;const y=Je(u)||Je(h);return s[c][y]}),l=r&&Object.entries(r).reduce((c,u)=>{let[h,y]=u;return y===void 0||(c[h]=y),c},{}),d=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:h,className:y,...g}=u;return Object.entries(g).every(R=>{let[b,f]=R;return Array.isArray(f)?f.includes({...o,...l}[b]):{...o,...l}[b]===f})?[...c,h,y]:c},[]);return Ke(e,a,d,r?.class,r?.className)},tr=er("focus-visible:border-ring cursor-pointer focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-sm border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border dark:bg-input/20 dark:bg-input/30 hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"text-muted-foreground hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function ss({className:e,variant:t="default",size:r="default",asChild:n=!1,...s}){return(0,L.jsx)(n?Vt:"button",{"data-slot":"button","data-variant":t,"data-size":r,className:ee(tr({variant:t,size:r,className:e})),...s})}var pt={},Xe=pt?.NODE_ENV,Ne={PORT:3333,ENV:".env",VAR_NAME:"DATABASE_URL",BASE_URL:"https://api.db-studio.localhost",API_PREFIX:"/api",IS_DEV:Xe==="development",PROXY_URL:pt?.DB_STUDIO_PROXY_URL??(Xe==="development"?"https://proxy.db-studio.localhost":"https://db-studio-proxy.husamql3.workers.dev")};function ht(e,t){return function(){return e.apply(t,arguments)}}var{toString:rr}=Object.prototype,{getPrototypeOf:he}=Object,{iterator:me,toStringTag:mt}=Symbol,be=(e=>t=>{const r=rr.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),U=e=>(e=e.toLowerCase(),t=>be(t)===e),ye=e=>t=>typeof t===e,{isArray:Y}=Array,X=ye("undefined");function te(e){return e!==null&&!X(e)&&e.constructor!==null&&!X(e.constructor)&&C(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var bt=U("ArrayBuffer");function nr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bt(e.buffer),t}var sr=ye("string"),C=ye("function"),yt=ye("number"),re=e=>e!==null&&typeof e=="object",or=e=>e===!0||e===!1,ue=e=>{if(be(e)!=="object")return!1;const t=he(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(mt in e)&&!(me in e)},ar=e=>{if(!re(e)||te(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ir=U("Date"),lr=U("File"),cr=e=>!!(e&&typeof e.uri<"u"),ur=e=>e&&typeof e.getParts<"u",dr=U("Blob"),fr=U("FileList"),pr=e=>re(e)&&C(e.pipe);function hr(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var Ye=hr(),Ge=typeof Ye.FormData<"u"?Ye.FormData:void 0,mr=e=>{if(!e)return!1;if(Ge&&e instanceof Ge)return!0;const t=he(e);if(!t||t===Object.prototype||!C(e.append))return!1;const r=be(e);return r==="formdata"||r==="object"&&C(e.toString)&&e.toString()==="[object FormData]"},br=U("URLSearchParams"),[yr,gr,Er,vr]=["ReadableStream","Request","Response","Headers"].map(U),Rr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),Y(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(te(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let l;for(n=0;n<a;n++)l=o[n],t.call(null,e[l],l,e)}}function gt(e,t){if(te(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}var H=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Et=e=>!X(e)&&e!==H;function De(...e){const{caseless:t,skipUndefined:r}=Et(this)&&this||{},n={},s=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const l=t&>(n,a)||a,d=Pe(n,l)?n[l]:void 0;ue(d)&&ue(o)?n[l]=De(d,o):ue(o)?n[l]=De({},o):Y(o)?n[l]=o.slice():(!r||!X(o))&&(n[l]=o)};for(let o=0,a=e.length;o<a;o++)e[o]&&ne(e[o],s);return n}var wr=(e,t,r,{allOwnKeys:n}={})=>(ne(t,(s,o)=>{r&&C(s)?Object.defineProperty(e,o,{__proto__:null,value:ht(s,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),_r=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Or=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},Sr=(e,t,r,n)=>{let s,o,a;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)a=s[o],(!n||n(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=r!==!1&&he(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Tr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Ar=e=>{if(!e)return null;if(Y(e))return e;let t=e.length;if(!yt(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},xr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&he(Uint8Array)),Cr=(e,t)=>{const r=(e&&e[me]).call(e);let n;for(;(n=r.next())&&!n.done;){const s=n.value;t.call(e,s[0],s[1])}},Nr=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Dr=U("HTMLFormElement"),Pr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Pe=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Lr=U("RegExp"),vt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ne(r,(s,o)=>{let a;(a=t(s,o,e))!==!1&&(n[o]=a||s)}),Object.defineProperties(e,n)},Ur=e=>{vt(e,(t,r)=>{if(C(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(C(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Br=(e,t)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return Y(e)?n(e):n(String(e).split(t)),r},Ir=()=>{},Fr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function kr(e){return!!(e&&C(e.append)&&e[mt]==="FormData"&&e[me])}var jr=e=>{const t=new Array(10),r=(n,s)=>{if(re(n)){if(t.indexOf(n)>=0)return;if(te(n))return n;if(!("toJSON"in n)){t[s]=n;const o=Y(n)?[]:{};return ne(n,(a,l)=>{const d=r(a,s+1);!X(d)&&(o[l]=d)}),t[s]=void 0,o}}return n};return r(e,0)},qr=U("AsyncFunction"),zr=e=>e&&(re(e)||C(e))&&C(e.then)&&C(e.catch),Rt=((e,t)=>e?setImmediate:t?((r,n)=>(H.addEventListener("message",({source:s,data:o})=>{s===H&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),H.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",C(H.postMessage)),Mr=typeof queueMicrotask<"u"?queueMicrotask.bind(H):typeof process<"u"&&process.nextTick||Rt,$r=e=>e!=null&&C(e[me]),i={isArray:Y,isArrayBuffer:bt,isBuffer:te,isFormData:mr,isArrayBufferView:nr,isString:sr,isNumber:yt,isBoolean:or,isObject:re,isPlainObject:ue,isEmptyObject:ar,isReadableStream:yr,isRequest:gr,isResponse:Er,isHeaders:vr,isUndefined:X,isDate:ir,isFile:lr,isReactNativeBlob:cr,isReactNative:ur,isBlob:dr,isRegExp:Lr,isFunction:C,isStream:pr,isURLSearchParams:br,isTypedArray:xr,isFileList:fr,forEach:ne,merge:De,extend:wr,trim:Rr,stripBOM:_r,inherits:Or,toFlatObject:Sr,kindOf:be,kindOfTest:U,endsWith:Tr,toArray:Ar,forEachEntry:Cr,matchAll:Nr,isHTMLForm:Dr,hasOwnProperty:Pe,hasOwnProp:Pe,reduceDescriptors:vt,freezeMethods:Ur,toObjectSet:Br,toCamelCase:Pr,noop:Ir,toFiniteNumber:Fr,findKey:gt,global:H,isContextDefined:Et,isSpecCompliantForm:kr,toJSONObject:jr,isAsyncFn:qr,isThenable:zr,setImmediate:Rt,asap:Mr,isIterable:$r},Hr=i.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Vr=e=>{const t={};let r,n,s;return e&&e.split(`
|
|
2
|
-
`).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!r||t[r]&&Hr[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Qe=Symbol("internals"),Wr=/[^\x09\x20-\x7E\x80-\xFF]/g;function Jr(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}function Z(e){return e&&String(e).trim().toLowerCase()}function Kr(e){return Jr(e.replace(Wr,""))}function de(e){return e===!1||e==null?e:i.isArray(e)?e.map(de):Kr(String(e))}function Xr(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}var Yr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Se(e,t,r,n,s){if(i.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!i.isString(t)){if(i.isString(n))return t.indexOf(n)!==-1;if(i.isRegExp(n))return n.test(t)}}function Gr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Qr(e,t){const r=i.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(s,o,a){return this[n].call(this,t,s,o,a)},configurable:!0})})}var x=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function s(a,l,d){const c=Z(l);if(!c)throw new Error("header name must be a non-empty string");const u=i.findKey(n,c);(!u||n[u]===void 0||d===!0||d===void 0&&n[u]!==!1)&&(n[u||l]=de(a))}const o=(a,l)=>i.forEach(a,(d,c)=>s(d,c,l));if(i.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(i.isString(e)&&(e=e.trim())&&!Yr(e))o(Vr(e),t);else if(i.isObject(e)&&i.isIterable(e)){let a={},l,d;for(const c of e){if(!i.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[d=c[0]]=(l=a[d])?i.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,t)}else e!=null&&s(t,e,r);return this}get(e,t){if(e=Z(e),e){const r=i.findKey(this,e);if(r){const n=this[r];if(!t)return n;if(t===!0)return Xr(n);if(i.isFunction(t))return t.call(this,n,r);if(i.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Z(e),e){const r=i.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Se(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let n=!1;function s(o){if(o=Z(o),o){const a=i.findKey(r,o);a&&(!t||Se(r,r[a],a,t))&&(delete r[a],n=!0)}}return i.isArray(e)?e.forEach(s):s(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const s=t[r];(!e||Se(this,this[s],s,e,!0))&&(delete this[s],n=!0)}return n}normalize(e){const t=this,r={};return i.forEach(this,(n,s)=>{const o=i.findKey(r,s);if(o){t[o]=de(n),delete t[s];return}const a=e?Gr(s):String(s).trim();a!==s&&delete t[s],t[a]=de(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return i.forEach(this,(r,n)=>{r!=null&&r!==!1&&(t[n]=e&&i.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(n=>r.set(n)),r}static accessor(e){const t=(this[Qe]=this[Qe]={accessors:{}}).accessors,r=this.prototype;function n(s){const o=Z(s);t[o]||(Qr(r,s),t[o]=!0)}return i.isArray(e)?e.forEach(n):n(e),this}};x.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);i.reduceDescriptors(x.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});i.freezeMethods(x);var Zr="[REDACTED ****]";function en(e){if(i.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(i.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function tn(e,t){const r=new Set(t.map(o=>String(o).toLowerCase())),n=[],s=o=>{if(o===null||typeof o!="object"||i.isBuffer(o))return o;if(n.indexOf(o)!==-1)return;o instanceof x&&(o=o.toJSON()),n.push(o);let a;if(i.isArray(o))a=[],o.forEach((l,d)=>{const c=s(l);i.isUndefined(c)||(a[d]=c)});else{if(!i.isPlainObject(o)&&en(o))return n.pop(),o;a=Object.create(null);for(const[l,d]of Object.entries(o)){const c=r.has(l.toLowerCase())?Zr:s(d);i.isUndefined(c)||(a[l]=c)}}return n.pop(),a};return s(e)}var p=class wt extends Error{static from(t,r,n,s,o,a){const l=new wt(t.message,r||t.code,n,s,o);return l.cause=t,l.name=t.name,t.status!=null&&l.status==null&&(l.status=t.status),a&&Object.assign(l,a),l}constructor(t,r,n,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,r=t&&i.hasOwnProp(t,"redact")?t.redact:void 0,n=i.isArray(r)&&r.length>0?tn(t,r):i.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};p.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";p.ERR_BAD_OPTION="ERR_BAD_OPTION";p.ECONNABORTED="ECONNABORTED";p.ETIMEDOUT="ETIMEDOUT";p.ECONNREFUSED="ECONNREFUSED";p.ERR_NETWORK="ERR_NETWORK";p.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";p.ERR_DEPRECATED="ERR_DEPRECATED";p.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";p.ERR_BAD_REQUEST="ERR_BAD_REQUEST";p.ERR_CANCELED="ERR_CANCELED";p.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";p.ERR_INVALID_URL="ERR_INVALID_URL";p.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function Le(e){return i.isPlainObject(e)||i.isArray(e)}function _t(e){return i.endsWith(e,"[]")?e.slice(0,-2):e}function Te(e,t,r){return e?e.concat(t).map(function(s,o){return s=_t(s),!r&&o?"["+s+"]":s}).join(r?".":""):t}function rn(e){return i.isArray(e)&&!e.some(Le)}var nn=i.toFlatObject(i,{},null,function(t){return/^is[A-Z]/.test(t)});function ge(e,t,r){if(!i.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=i.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(f,m){return!i.isUndefined(m[f])});const n=r.metaTokens,s=r.visitor||h,o=r.dots,a=r.indexes,l=r.Blob||typeof Blob<"u"&&Blob,d=r.maxDepth===void 0?100:r.maxDepth,c=l&&i.isSpecCompliantForm(t);if(!i.isFunction(s))throw new TypeError("visitor must be a function");function u(b){if(b===null)return"";if(i.isDate(b))return b.toISOString();if(i.isBoolean(b))return b.toString();if(!c&&i.isBlob(b))throw new p("Blob is not supported. Use a Buffer instead.");return i.isArrayBuffer(b)||i.isTypedArray(b)?c&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function h(b,f,m){let w=b;if(i.isReactNative(t)&&i.isReactNativeBlob(b))return t.append(Te(m,f,o),u(b)),!1;if(b&&!m&&typeof b=="object"){if(i.endsWith(f,"{}"))f=n?f:f.slice(0,-2),b=JSON.stringify(b);else if(i.isArray(b)&&rn(b)||(i.isFileList(b)||i.endsWith(f,"[]"))&&(w=i.toArray(b)))return f=_t(f),w.forEach(function(E,P){!(i.isUndefined(E)||E===null)&&t.append(a===!0?Te([f],P,o):a===null?f:f+"[]",u(E))}),!1}return Le(b)?!0:(t.append(Te(m,f,o),u(b)),!1)}const y=[],g=Object.assign(nn,{defaultVisitor:h,convertValue:u,isVisitable:Le});function R(b,f,m=0){if(!i.isUndefined(b)){if(m>d)throw new p("Object is too deeply nested ("+m+" levels). Max depth: "+d,p.ERR_FORM_DATA_DEPTH_EXCEEDED);if(y.indexOf(b)!==-1)throw Error("Circular reference detected in "+f.join("."));y.push(b),i.forEach(b,function(v,E){(!(i.isUndefined(v)||v===null)&&s.call(t,v,i.isString(E)?E.trim():E,f,g))===!0&&R(v,f?f.concat(E):[E],m+1)}),y.pop()}}if(!i.isObject(e))throw new TypeError("data must be an object");return R(e),t}function Ze(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function Ie(e,t){this._pairs=[],e&&ge(e,this,t)}var Ot=Ie.prototype;Ot.append=function(t,r){this._pairs.push([t,r])};Ot.toString=function(t){const r=t?function(n){return t.call(this,n,Ze)}:Ze;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function sn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function St(e,t,r){if(!t)return e;const n=r&&r.encode||sn,s=i.isFunction(r)?{serialize:r}:r,o=s&&s.serialize;let a;if(o?a=o(t,s):a=i.isURLSearchParams(t)?t.toString():new Ie(t,s).toString(n),a){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var et=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){i.forEach(this.handlers,function(r){r!==null&&e(r)})}},Fe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},on=typeof URLSearchParams<"u"?URLSearchParams:Ie,an=typeof FormData<"u"?FormData:null,ln=typeof Blob<"u"?Blob:null,cn={isBrowser:!0,classes:{URLSearchParams:on,FormData:an,Blob:ln},protocols:["http","https","file","blob","url","data"]},un=kt({hasBrowserEnv:()=>ke,hasStandardBrowserEnv:()=>dn,hasStandardBrowserWebWorkerEnv:()=>fn,navigator:()=>Ue,origin:()=>pn}),ke=typeof window<"u"&&typeof document<"u",Ue=typeof navigator=="object"&&navigator||void 0,dn=ke&&(!Ue||["ReactNative","NativeScript","NS"].indexOf(Ue.product)<0),fn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",pn=ke&&window.location.href||"http://localhost",A={...un,...cn};function hn(e,t){return ge(e,new A.classes.URLSearchParams,{visitor:function(r,n,s,o){return A.isNode&&i.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function mn(e){return i.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function bn(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function Tt(e){function t(r,n,s,o){let a=r[o++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),d=o>=r.length;return a=!a&&i.isArray(s)?s.length:a,d?(i.hasOwnProp(s,a)?s[a]=i.isArray(s[a])?s[a].concat(n):[s[a],n]:s[a]=n,!l):((!s[a]||!i.isObject(s[a]))&&(s[a]=[]),t(r,n,s[a],o)&&i.isArray(s[a])&&(s[a]=bn(s[a])),!l)}if(i.isFormData(e)&&i.isFunction(e.entries)){const r={};return i.forEachEntry(e,(n,s)=>{t(mn(n),s,r,0)}),r}return null}var K=(e,t)=>e!=null&&i.hasOwnProp(e,t)?e[t]:void 0;function yn(e,t,r){if(i.isString(e))try{return(t||JSON.parse)(e),i.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var se={transitional:Fe,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=i.isObject(t);if(o&&i.isHTMLForm(t)&&(t=new FormData(t)),i.isFormData(t))return s?JSON.stringify(Tt(t)):t;if(i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)||i.isReadableStream(t))return t;if(i.isArrayBufferView(t))return t.buffer;if(i.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){const l=K(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return hn(t,l).toString();if((a=i.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=K(this,"env"),c=d&&d.FormData;return ge(a?{"files[]":t}:t,c&&new c,l)}}return o||s?(r.setContentType("application/json",!1),yn(t)):t}],transformResponse:[function(t){const r=K(this,"transitional")||se.transitional,n=r&&r.forcedJSONParsing,s=K(this,"responseType"),o=s==="json";if(i.isResponse(t)||i.isReadableStream(t))return t;if(t&&i.isString(t)&&(n&&!s||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,K(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?p.from(l,p.ERR_BAD_RESPONSE,this,null,K(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};i.forEach(["delete","get","head","post","put","patch","query"],e=>{se.headers[e]={}});function Ae(e,t){const r=this||se,n=t||r,s=x.from(n.headers);let o=n.data;return i.forEach(e,function(l){o=l.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function At(e){return!!(e&&e.__CANCEL__)}var oe=class extends p{constructor(e,t,r){super(e??"canceled",p.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function xt(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new p("Request failed with status code "+r.status,r.status>=400&&r.status<500?p.ERR_BAD_REQUEST:p.ERR_BAD_RESPONSE,r.config,r.request,r))}function gn(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function En(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,a;return t=t!==void 0?t:1e3,function(d){const c=Date.now(),u=n[o];a||(a=c),r[s]=d,n[s]=c;let h=o,y=0;for(;h!==s;)y+=r[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),c-a<t)return;const g=u&&c-u;return g?Math.round(y*1e3/g):void 0}}function vn(e,t){let r=0,n=1e3/t,s,o;const a=(c,u=Date.now())=>{r=u,s=null,o&&(clearTimeout(o),o=null),e(...c)};return[(...c)=>{const u=Date.now(),h=u-r;h>=n?a(c,u):(s=c,o||(o=setTimeout(()=>{o=null,a(s)},n-h)))},()=>s&&a(s)]}var pe=(e,t,r=3)=>{let n=0;const s=En(50,250);return vn(o=>{const a=o.loaded,l=o.lengthComputable?o.total:void 0,d=l!=null?Math.min(a,l):a,c=Math.max(0,d-n),u=s(c);n=Math.max(n,d),e({loaded:d,total:l,progress:l?d/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l?(l-d)/u:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0})},r)},tt=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},rt=e=>(...t)=>i.asap(()=>e(...t)),Rn=A.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,A.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(A.origin),A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent)):()=>!0,wn=A.hasStandardBrowserEnv?{write(e,t,r,n,s,o,a){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];i.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),i.isString(n)&&l.push(`path=${n}`),i.isString(s)&&l.push(`domain=${s}`),o===!0&&l.push("secure"),i.isString(a)&&l.push(`SameSite=${a}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),s=n.indexOf("=");if(s!==-1&&n.slice(0,s)===e)return decodeURIComponent(n.slice(s+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _n(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function On(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ct(e,t,r){let n=!_n(t);return e&&(n||r===!1)?On(e,t):t}var nt=e=>e instanceof x?{...e}:e;function W(e,t){t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(c,u,h,y){return i.isPlainObject(c)&&i.isPlainObject(u)?i.merge.call({caseless:y},c,u):i.isPlainObject(u)?i.merge({},u):i.isArray(u)?u.slice():u}function s(c,u,h,y){if(i.isUndefined(u)){if(!i.isUndefined(c))return n(void 0,c,h,y)}else return n(c,u,h,y)}function o(c,u){if(!i.isUndefined(u))return n(void 0,u)}function a(c,u){if(i.isUndefined(u)){if(!i.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function l(c,u,h){if(i.hasOwnProp(t,h))return n(c,u);if(i.hasOwnProp(e,h))return n(void 0,c)}const d={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:l,headers:(c,u,h)=>s(nt(c),nt(u),h,!0)};return i.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const h=i.hasOwnProp(d,u)?d[u]:s,y=h(i.hasOwnProp(e,u)?e[u]:void 0,i.hasOwnProp(t,u)?t[u]:void 0,u);i.isUndefined(y)&&h!==l||(r[u]=y)}),r}var Sn=["content-type","content-length"];function Tn(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,s])=>{Sn.includes(n.toLowerCase())&&e.set(n,s)})}var An=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),Nt=e=>{const t=W({},e),r=y=>i.hasOwnProp(t,y)?t[y]:void 0,n=r("data");let s=r("withXSRFToken");const o=r("xsrfHeaderName"),a=r("xsrfCookieName");let l=r("headers");const d=r("auth"),c=r("baseURL"),u=r("allowAbsoluteUrls"),h=r("url");if(t.headers=l=x.from(l),t.url=St(Ct(c,h,u),e.params,e.paramsSerializer),d&&l.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?An(d.password):""))),i.isFormData(n)&&(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv?l.setContentType(void 0):i.isFunction(n.getHeaders)&&Tn(l,n.getHeaders(),r("formDataHeaderPolicy"))),A.hasStandardBrowserEnv&&(i.isFunction(s)&&(s=s(t)),s===!0||s==null&&Rn(t.url))){const y=o&&a&&wn.read(a);y&&l.set(o,y)}return t},xn=typeof XMLHttpRequest<"u",Cn=xn&&function(e){return new Promise(function(r,n){const s=Nt(e);let o=s.data;const a=x.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:c}=s,u,h,y,g,R;function b(){g&&g(),R&&R(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(s.method.toUpperCase(),s.url,!0),f.timeout=s.timeout;function m(){if(!f)return;const v=x.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),E={data:!l||l==="text"||l==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:v,config:e,request:f};xt(function(F){r(F),b()},function(F){n(F),b()},E),f=null}"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.startsWith("file:"))||setTimeout(m)},f.onabort=function(){f&&(n(new p("Request aborted",p.ECONNABORTED,e,f)),b(),f=null)},f.onerror=function(E){const P=E&&E.message?E.message:"Network Error",F=new p(P,p.ERR_NETWORK,e,f);F.event=E||null,n(F),b(),f=null},f.ontimeout=function(){let E=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const P=s.transitional||Fe;s.timeoutErrorMessage&&(E=s.timeoutErrorMessage),n(new p(E,P.clarifyTimeoutError?p.ETIMEDOUT:p.ECONNABORTED,e,f)),b(),f=null},o===void 0&&a.setContentType(null),"setRequestHeader"in f&&i.forEach(a.toJSON(),function(E,P){f.setRequestHeader(P,E)}),i.isUndefined(s.withCredentials)||(f.withCredentials=!!s.withCredentials),l&&l!=="json"&&(f.responseType=s.responseType),c&&([y,R]=pe(c,!0),f.addEventListener("progress",y)),d&&f.upload&&([h,g]=pe(d),f.upload.addEventListener("progress",h),f.upload.addEventListener("loadend",g)),(s.cancelToken||s.signal)&&(u=v=>{f&&(n(!v||v.type?new oe(null,e,f):v),f.abort(),b(),f=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const w=gn(s.url);if(w&&!A.protocols.includes(w)){n(new p("Unsupported protocol "+w+":",p.ERR_BAD_REQUEST,e));return}f.send(o||null)})},Nn=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const o=function(c){if(!s){s=!0,l();const u=c instanceof Error?c:this.reason;n.abort(u instanceof p?u:new oe(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,o(new p(`timeout of ${t}ms exceeded`,p.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:d}=n;return d.unsubscribe=()=>i.asap(l),d}},Dn=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},Pn=async function*(e,t){for await(const r of Ln(e))yield*Dn(r,t)},Ln=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},st=(e,t,r,n)=>{const s=Pn(e,t);let o=0,a,l=d=>{a||(a=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:c,value:u}=await s.next();if(c){l(),d.close();return}let h=u.byteLength;r&&r(o+=h),d.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(d){return l(d),s.return()}},{highWaterMark:2})};function Un(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(r)){let o=n.length;const a=n.length;for(let h=0;h<a;h++)if(n.charCodeAt(h)===37&&h+2<a){const y=n.charCodeAt(h+1),g=n.charCodeAt(h+2);(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(o-=2,h+=2)}let l=0,d=a-1;const c=h=>h>=2&&n.charCodeAt(h-2)===37&&n.charCodeAt(h-1)===51&&(n.charCodeAt(h)===68||n.charCodeAt(h)===100);d>=0&&(n.charCodeAt(d)===61?(l++,d--):c(d)&&(l++,d-=3)),l===1&&d>=0&&(n.charCodeAt(d)===61||c(d))&&l++;const u=Math.floor(o/4)*3-(l||0);return u>0?u:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(n,"utf8");let s=0;for(let o=0,a=n.length;o<a;o++){const l=n.charCodeAt(o);if(l<128)s+=1;else if(l<2048)s+=2;else if(l>=55296&&l<=56319&&o+1<a){const d=n.charCodeAt(o+1);d>=56320&&d<=57343?(s+=4,o++):s+=3}else s+=3}return s}var je="1.16.0",ot=65536,{isFunction:ce}=i,at=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Bn=e=>{const t=i.global??globalThis,{ReadableStream:r,TextEncoder:n}=t;e=i.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:a}=e,l=s?ce(s):typeof fetch=="function",d=ce(o),c=ce(a);if(!l)return!1;const u=l&&ce(r),h=l&&(typeof n=="function"?(m=>w=>m.encode(w))(new n):async m=>new Uint8Array(await new o(m).arrayBuffer())),y=d&&u&&at(()=>{let m=!1;const w=new o(A.origin,{body:new r,method:"POST",get duplex(){return m=!0,"half"}}),v=w.headers.has("Content-Type");return w.body!=null&&w.body.cancel(),m&&!v}),g=c&&u&&at(()=>i.isReadableStream(new a("").body)),R={stream:g&&(m=>m.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!R[m]&&(R[m]=(w,v)=>{let E=w&&w[m];if(E)return E.call(w);throw new p(`Response type '${m}' is not supported`,p.ERR_NOT_SUPPORT,v)})});const b=async m=>{if(m==null)return 0;if(i.isBlob(m))return m.size;if(i.isSpecCompliantForm(m))return(await new o(A.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(i.isArrayBufferView(m)||i.isArrayBuffer(m))return m.byteLength;if(i.isURLSearchParams(m)&&(m=m+""),i.isString(m))return(await h(m)).byteLength},f=async(m,w)=>{const v=i.toFiniteNumber(m.getContentLength());return v??b(w)};return async m=>{let{url:w,method:v,data:E,signal:P,cancelToken:F,timeout:Bt,onDownloadProgress:we,onUploadProgress:Me,responseType:j,headers:M,withCredentials:ae="same-origin",fetchOptions:$e,maxContentLength:B,maxBodyLength:_e}=Nt(m);const G=i.isNumber(B)&&B>-1,It=i.isNumber(_e)&&_e>-1;let He=s||fetch;j=j?(j+"").toLowerCase():"text";let q=Nn([P,F&&F.toAbortSignal()],Bt),N=null;const $=q&&q.unsubscribe&&(()=>{q.unsubscribe()});let Ve;try{if(G&&typeof w=="string"&&w.startsWith("data:")&&Un(w)>B)throw new p("maxContentLength size of "+B+" exceeded",p.ERR_BAD_RESPONSE,m,N);if(It&&v!=="get"&&v!=="head"){const _=await f(M,E);if(typeof _=="number"&&isFinite(_)&&_>_e)throw new p("Request body larger than maxBodyLength limit",p.ERR_BAD_REQUEST,m,N)}if(Me&&y&&v!=="get"&&v!=="head"&&(Ve=await f(M,E))!==0){let _=new o(w,{method:"POST",body:E,duplex:"half"}),J;if(i.isFormData(E)&&(J=_.headers.get("content-type"))&&M.setContentType(J),_.body){const[ie,le]=tt(Ve,pe(rt(Me)));E=st(_.body,ot,ie,le)}}i.isString(ae)||(ae=ae?"include":"omit");const T=d&&"credentials"in o.prototype;if(i.isFormData(E)){const _=M.getContentType();_&&/^multipart\/form-data/i.test(_)&&!/boundary=/i.test(_)&&M.delete("content-type")}M.set("User-Agent","axios/"+je,!1);const z={...$e,signal:q,method:v.toUpperCase(),headers:M.normalize().toJSON(),body:E,duplex:"half",credentials:T?ae:void 0};N=d&&new o(w,z);let I=await(d?He(N,$e):He(w,z));if(G){const _=i.toFiniteNumber(I.headers.get("content-length"));if(_!=null&&_>B)throw new p("maxContentLength size of "+B+" exceeded",p.ERR_BAD_RESPONSE,m,N)}const Oe=g&&(j==="stream"||j==="response");if(g&&I.body&&(we||G||Oe&&$)){const _={};["status","statusText","headers"].forEach(Q=>{_[Q]=I[Q]});const J=i.toFiniteNumber(I.headers.get("content-length")),[ie,le]=we&&tt(J,pe(rt(we),!0))||[];let We=0;const Ft=Q=>{if(G&&(We=Q,We>B))throw new p("maxContentLength size of "+B+" exceeded",p.ERR_BAD_RESPONSE,m,N);ie&&ie(Q)};I=new a(st(I.body,ot,Ft,()=>{le&&le(),$&&$()}),_)}j=j||"text";let k=await R[i.findKey(R,j)||"text"](I,m);if(G&&!g&&!Oe){let _;if(k!=null&&(typeof k.byteLength=="number"?_=k.byteLength:typeof k.size=="number"?_=k.size:typeof k=="string"&&(_=typeof n=="function"?new n().encode(k).byteLength:k.length)),typeof _=="number"&&_>B)throw new p("maxContentLength size of "+B+" exceeded",p.ERR_BAD_RESPONSE,m,N)}return!Oe&&$&&$(),await new Promise((_,J)=>{xt(_,J,{data:k,headers:x.from(I.headers),status:I.status,statusText:I.statusText,config:m,request:N})})}catch(T){if($&&$(),q&&q.aborted&&q.reason instanceof p){const z=q.reason;throw z.config=m,N&&(z.request=N),T!==z&&(z.cause=T),z}throw T&&T.name==="TypeError"&&/Load failed|fetch/i.test(T.message)?Object.assign(new p("Network Error",p.ERR_NETWORK,m,N,T&&T.response),{cause:T.cause||T}):p.from(T,T&&T.code,m,N,T&&T.response)}}},In=new Map,Dt=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:s}=t,o=[n,s,r];let a=o.length,l,d,c=In;for(;a--;)l=o[a],d=c.get(l),d===void 0&&c.set(l,d=a?new Map:Bn(t)),c=d;return d},os=Dt(),qe={http:null,xhr:Cn,fetch:{get:Dt}};i.forEach(qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var it=e=>`- ${e}`,Fn=e=>i.isFunction(e)||e===null||e===!1;function kn(e,t){e=i.isArray(e)?e:[e];const{length:r}=e;let n,s;const o={};for(let a=0;a<r;a++){n=e[a];let l;if(s=n,!Fn(n)&&(s=qe[(l=String(n)).toLowerCase()],s===void 0))throw new p(`Unknown adapter '${l}'`);if(s&&(i.isFunction(s)||(s=s.get(t))))break;o[l||"#"+a]=s}if(!s){const a=Object.entries(o).map(([d,c])=>`adapter ${d} `+(c===!1?"is not supported by the environment":"is not available in the build"));let l=r?a.length>1?`since :
|
|
4
|
-
`+a.map(it).join(`
|
|
5
|
-
`):" "+it(a[0]):"as no adapter specified";throw new p("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return s}var Pt={getAdapter:kn,adapters:qe};function xe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new oe(null,e)}function lt(e){return xe(e),e.headers=x.from(e.headers),e.data=Ae.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pt.getAdapter(e.adapter||se.adapter,e)(e).then(function(r){xe(e),e.response=r;try{r.data=Ae.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=x.from(r.headers),r},function(r){if(!At(r)&&(xe(e),r&&r.response)){e.response=r.response;try{r.response.data=Ae.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=x.from(r.response.headers)}return Promise.reject(r)})}var Ee={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ee[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var ct={};Ee.transitional=function(t,r,n){function s(o,a){return"[Axios v"+je+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return(o,a,l)=>{if(t===!1)throw new p(s(a," has been removed"+(r?" in "+r:"")),p.ERR_DEPRECATED);return r&&!ct[a]&&(ct[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,a,l):!0}};Ee.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function jn(e,t,r){if(typeof e!="object")throw new p("options must be an object",p.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const o=n[s],a=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(a){const l=e[o],d=l===void 0||a(l,o,e);if(d!==!0)throw new p("option "+o+" must be "+d,p.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new p("Unknown option "+o,p.ERR_BAD_OPTION)}}var fe={assertOptions:jn,validators:Ee},D=fe.validators,V=class{constructor(e){this.defaults=e||{},this.interceptors={request:new et,response:new et}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const s=(()=>{if(!n.stack)return"";const o=n.stack.indexOf(`
|
|
6
|
-
`);return o===-1?"":n.stack.slice(o+1)})();try{if(!r.stack)r.stack=s;else if(s){const o=s.indexOf(`
|
|
7
|
-
`),a=o===-1?-1:s.indexOf(`
|
|
8
|
-
`,o+1),l=a===-1?"":s.slice(a+1);String(r.stack).endsWith(l)||(r.stack+=`
|
|
9
|
-
`+s)}}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=W(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:s}=t;r!==void 0&&fe.assertOptions(r,{silentJSONParsing:D.transitional(D.boolean),forcedJSONParsing:D.transitional(D.boolean),clarifyTimeoutError:D.transitional(D.boolean),legacyInterceptorReqResOrdering:D.transitional(D.boolean)},!1),n!=null&&(i.isFunction(n)?t.paramsSerializer={serialize:n}:fe.assertOptions(n,{encode:D.function,serialize:D.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),fe.assertOptions(t,{baseUrl:D.spelling("baseURL"),withXsrfToken:D.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&i.merge(s.common,s[t.method]);s&&i.forEach(["delete","get","head","post","put","patch","query","common"],g=>{delete s[g]}),t.headers=x.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(R){if(typeof R.runWhen=="function"&&R.runWhen(t)===!1)return;l=l&&R.synchronous;const b=t.transitional||Fe;b&&b.legacyInterceptorReqResOrdering?a.unshift(R.fulfilled,R.rejected):a.push(R.fulfilled,R.rejected)});const d=[];this.interceptors.response.forEach(function(R){d.push(R.fulfilled,R.rejected)});let c,u=0,h;if(!l){const g=[lt.bind(this),void 0];for(g.unshift(...a),g.push(...d),h=g.length,c=Promise.resolve(t);u<h;)c=c.then(g[u++],g[u++]);return c}h=a.length;let y=t;for(;u<h;){const g=a[u++],R=a[u++];try{y=g(y)}catch(b){R.call(this,b);break}}try{c=lt.call(this,y)}catch(g){return Promise.reject(g)}for(u=0,h=d.length;u<h;)c=c.then(d[u++],d[u++]);return c}getUri(e){e=W(this.defaults,e);const t=Ct(e.baseURL,e.url,e.allowAbsoluteUrls);return St(t,e.params,e.paramsSerializer)}};i.forEach(["delete","get","head","options"],function(t){V.prototype[t]=function(r,n){return this.request(W(n||{},{method:t,url:r,data:(n||{}).data}))}});i.forEach(["post","put","patch","query"],function(t){function r(n){return function(o,a,l){return this.request(W(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}V.prototype[t]=r(),t!=="query"&&(V.prototype[t+"Form"]=r(!0))});var qn=class Lt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const a=new Promise(l=>{n.subscribe(l),o=l}).then(s);return a.cancel=function(){n.unsubscribe(o)},a},t(function(o,a,l){n.reason||(n.reason=new oe(o,a,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Lt(function(n){t=n}),cancel:t}}};function zn(e){return function(r){return e.apply(null,r)}}function Mn(e){return i.isObject(e)&&e.isAxiosError===!0}var Be={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Be).forEach(([e,t])=>{Be[t]=e});function Ut(e){const t=new V(e),r=ht(V.prototype.request,t);return i.extend(r,V.prototype,t,{allOwnKeys:!0}),i.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return Ut(W(e,s))},r}var S=Ut(se);S.Axios=V;S.CanceledError=oe;S.CancelToken=qn;S.isCancel=At;S.VERSION=je;S.toFormData=ge;S.AxiosError=p;S.Cancel=S.CanceledError;S.all=function(t){return Promise.all(t)};S.spread=zn;S.isAxiosError=Mn;S.mergeConfig=W;S.AxiosHeaders=x;S.formToJSON=e=>Tt(i.isHTMLForm(e)?new FormData(e):e);S.getAdapter=Pt.getAdapter;S.HttpStatusCode=Be;S.default=S;var Ce={getTimestamp(){return new Date().toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})},request(e){},response(e,t){},error(e,t){}},$n=new RegExp(`/api/(?:${Xt.join("|")})/(databases|tables|records|query|keys|chat)(?:/\\S*)?`,"g"),Hn="https://c1a01551ba00da0aee2c5e9c977906e7@o4509725125181440.ingest.de.sentry.io/4512040493318224",Vn=()=>{for(const[e,t]of[["Edg","edge"],["OPR","opera"],["Firefox","firefox"],["Chrome","chrome"],["Version","safari"]]){const r=navigator.userAgent.match(new RegExp(`${e}/(\\d+)`))?.[1];if(r)return`${t}-${r}`}return"other"},as=()=>{Qt({dsn:Hn,environment:"production",release:"db-studio@1.16.2",integrations:[Zt()],tracesSampleRate:.1,sendDefaultPii:!1,beforeSend(t){if(delete t.request,delete t.user,delete t.message,delete t.contexts,delete t.extra,t.tags={...t.tags,browser:Vn()},t.breadcrumbs=t.breadcrumbs?.filter(r=>r.category==="db_studio.http").map(r=>({category:r.category,level:r.level,timestamp:r.timestamp,data:{operation:r.data?.operation,method:r.data?.method,request_id:r.data?.request_id}})),t.tags?.error_kind!=="network")for(const r of t.exception?.values??[])r.value="Client error";return t},beforeSendSpan(t){const r=t.description?.replace(/[?#].*$/,"").replace($n,"/api/$1").replace(/\/(table|schema|runner)\/[^/\s]+/g,"/$1/:id");return{...t,description:r,data:{}}},beforeSendTransaction(t){return t.transaction&&(t.transaction=t.transaction.replace(/\/(table|schema|runner)\/[^/]+/g,"/$1/:id")),t}})},Wn=()=>crypto.randomUUID?.()??Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join(""),ut=e=>(e.interceptors.request.use(t=>{const r=Wn();return t.headers.set("X-Request-Id",r),t.metadata={startTime:performance.now()},Ce.request(t),Yt({category:"db_studio.http",data:{operation:dt(t.method,t.url),method:t.method?.toUpperCase(),request_id:r},level:"info"}),t},t=>Promise.reject(t)),e.interceptors.response.use(t=>{const r=t.config.metadata?.startTime??0,n=Math.round(performance.now()-r);return Ce.response(t,n),t},t=>{const r=t.config?.metadata?.startTime??0,n=Math.round(performance.now()-r);Ce.error(t,n);const s=t.response?.status??500,o=t.response?.data,a=o?.error??t.message??"An error occurred",l=o?.details,d=t.config?.headers.get("X-Request-Id")?.toString(),c=Object.assign(new Error(a),{status:s,details:l,requestId:d});if(!t.response){const u=dt(t.config?.method,t.config?.url),h=typeof t.code=="string"&&/^[A-Z0-9_]{2,32}$/.test(t.code)?t.code:"unknown",y=`${u} did not reach the server (${h})`,g=new Error(y);if(g.name="AxiosError",t.stack){const R=t.stack.split(`
|
|
10
|
-
`).slice(1).filter(Jn);g.stack=[`AxiosError: ${y}`,...R].join(`
|
|
11
|
-
`)}Gt(g,{tags:{source:"client",error_kind:"network",operation:u,error_code:h,...d?{request_id:d}:{}},fingerprint:["network",u,h]})}return Promise.reject(c)}),e),Jn=e=>/^\s*at\s/.test(e),dt=(e,t)=>{const r=t?.replace(/[?#].*$/,"").match(/\/(databases|tables|records|query|keys|chat)(?:\/|$)/)?.[1];return`${e?.toLowerCase()??"unknown"}_${r??"other"}`},Kn=()=>globalThis.location?.origin??Ne.BASE_URL,Xn=class{rootApi;api;dbType=null;resolveBaseUrl;constructor(e=Kn){this.resolveBaseUrl=e;const t=`${this.resolveBaseUrl()}${Ne.API_PREFIX}`;this.rootApi=ut(S.create({baseURL:t})),this.api=ut(S.create({baseURL:t}))}setDbType(e){this.dbType!==e&&(this.dbType=e,this.api.defaults.baseURL=`${this.resolveBaseUrl()}${Ne.API_PREFIX}/${e}`)}getDbType(){return this.dbType}},ze=new Xn,ve=ze.rootApi,O=ze.api,is=e=>ze.setDbType(e),ls=()=>ve.get("/chat/limit"),cs=()=>ve.get("/databases"),us=()=>ve.get("/databases/current"),ds=()=>ve.get("/databases/connection"),fs=({query:e,db:t})=>O.post("/query",{query:e},{params:{db:t??""}}),ps=({tableName:e,data:t,db:r})=>O.post("/records",{tableName:e,data:t},{params:{db:r??""}}),hs=({tableName:e,updates:t,primaryKey:r,primaryKeys:n,db:s})=>O.patch("/records",{tableName:e,updates:t,...r?{primaryKey:r}:{},...n?.length?{primaryKeys:n}:{}},{params:{db:s??""}}),ms=({tableName:e,records:t,db:r})=>O.post("/records/bulk",{tableName:e,records:t},{params:{db:r??""}}),bs=({tableName:e,primaryKeys:t,force:r,db:n})=>O.delete(r?"/records/force":"/records",{data:{tableName:e,primaryKeys:t},params:{db:n??""}}),Re=e=>e||"-",ys=e=>O.get("/keys",{params:e}),gs=({db:e,key:t,cursor:r,limit:n=100,full:s=!1,direction:o="forward"})=>O.get(`/keys/${Re(t)}`,{params:{db:e,cursor:r,limit:n,full:s,direction:o}}),Es=({db:e,key:t,offset:r,expectedRevision:n})=>O.get(`/keys/${Re(t)}/raw`,{params:{db:e,offset:r,limit:1048576,expectedRevision:n}}),vs=({db:e,data:t})=>O.post("/keys",t,{params:{db:e}}),Rs=({db:e,key:t,data:r})=>O.post(`/keys/${Re(t)}/actions`,r,{params:{db:e}}),ws=({db:e,key:t,expectedRevision:r,force:n=!1})=>O.delete(`/keys/${Re(t)}`,{params:{db:e,expectedRevision:r,force:n}}),_s=e=>O.get("/tables",{params:{db:e??""}}),Os=(e,t)=>O.get(`/tables/${encodeURIComponent(e)}/columns`,{params:{db:t??""}}),Ss=({tableName:e,db:t,limit:r,cursor:n,direction:s,sort:o,order:a,filters:l})=>O.get(`/tables/${encodeURIComponent(e)}/data`,{params:{db:t,limit:r,cursor:n??void 0,direction:s??void 0,sort:o,order:a??void 0,filters:l}}),Ts=(e,t)=>O.post("/tables",e,{params:{db:t??""}}),As=({tableName:e,db:t,cascade:r=!1})=>O.delete(`/tables/${encodeURIComponent(e)}`,{params:{db:t??"",cascade:r?"true":"false"}}),xs=({tableName:e,data:t,db:r})=>O.patch(`/tables/${encodeURIComponent(e)}/rename`,t,{params:{db:r??""}}),Cs=({tableName:e,data:t,db:r})=>O.post(`/tables/${encodeURIComponent(e)}/columns`,t,{params:{db:r??""}}),Ns=({tableName:e,columnName:t,data:r,db:n})=>O.patch(`/tables/${encodeURIComponent(e)}/columns/${encodeURIComponent(t)}`,r,{params:{db:n??""}}),Ds=({tableName:e,columnName:t,data:r,db:n})=>O.patch(`/tables/${encodeURIComponent(e)}/columns/${encodeURIComponent(t)}/rename`,r,{params:{db:n??""}}),Ps=({tableName:e,columnName:t,cascade:r,db:n})=>O.delete(`/tables/${encodeURIComponent(e)}/columns/${encodeURIComponent(t)}`,{params:{db:n??"",cascade:r?"true":"false"}}),Ls=(e,t)=>O.get(`/tables/${encodeURIComponent(e)}/schema`,{params:{db:t??""}}),Us=({tableName:e,format:t,db:r})=>O.get(`/tables/${encodeURIComponent(e)}/export`,{params:{db:r??"",format:t},responseType:"blob"}),Bs=["table","runner","schema","indexes","logs","visualizer"],Is={SIDEBAR_SEARCH:"search",ACTIVE_TABLE:"table",ACTIVE_SCHEMA:"schema",ACTIVE_TAB:"t",COLUMN_NAME:"columnName",CACHE_KEYS:{TABLES_LIST:"tablesList",TABLE_COLUMNS:"tableColumns",TABLE_DATA:"tableData",TABLE_DEFAULT_PAGE:1,TABLE_DEFAULT_LIMIT:50,DATABASES_LIST:"databasesList",CURRENT_DATABASE:"currentDatabase",DATABASE_CONNECTION_INFO:"databaseConnectionInfo"},RUNNER_STATE_KEYS:{SHOW_AS:"view"},TABLE_STATE_KEYS:{SORT:"sort",ORDER:"order",CURSOR:"cursor",DIRECTION:"dir",LIMIT:"limit",FILTERS:"filters"},REFERENCED_TABLE_STATE_KEYS:{ACTIVE_TABLE:"rTable",CURSOR:"rCursor",DIRECTION:"rDir",DEFAULT_PAGE:1,LIMIT:"rLimit",DEFAULT_LIMIT:30,FILTERS:"rFilters",SORT:"rSort",ORDER:"rOrder"},HOVER_ZONE:20,HOVER_DELAY:100},Fs=[5,10,25,50,100,500];function Yn({delayDuration:e=0,...t}){return(0,L.jsx)(Mt,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function ks({...e}){return(0,L.jsx)(Yn,{children:(0,L.jsx)(Ht,{"data-slot":"tooltip",...e})})}function js({...e}){return(0,L.jsx)(qt,{"data-slot":"tooltip-trigger",...e})}function qs({className:e,sideOffset:t=0,children:r,...n}){return(0,L.jsx)(zt,{children:(0,L.jsxs)($t,{"data-slot":"tooltip-content",sideOffset:t,className:ee("data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 rounded-md px-3 py-1.5 text-xs **:data-[slot=kbd]:rounded-md bg-foreground text-background z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin)",e),...n,children:[r,(0,L.jsx)(jt,{className:"size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 translate-y-[calc(-50%_-_2px)]"})]})})}var zs=Kt()((e,t)=>({openOverlays:[],openOverlay:r=>e(n=>n.openOverlays.includes(r)?{openOverlays:[...n.openOverlays.filter(s=>s!==r),r]}:{openOverlays:[...n.openOverlays,r]}),closeOverlay:r=>e(n=>r?{openOverlays:n.openOverlays.filter(s=>s!==r)}:{openOverlays:n.openOverlays.slice(0,-1)}),closeAllOverlays:()=>e({openOverlays:[]}),toggleOverlay:r=>e(n=>n.openOverlays.includes(r)?{openOverlays:n.openOverlays.filter(s=>s!==r)}:{openOverlays:[...n.openOverlays,r]}),isOverlayOpen:r=>t().openOverlays.includes(r),getOverlayIndex:r=>t().openOverlays.indexOf(r)}));export{hs as A,Ne as B,ws as C,ms as D,ys as E,ls as F,ee as G,tr as H,O as I,Kn as L,us as M,ds as N,ps as O,cs as P,is as R,vs as S,Es as T,er as U,ss as V,ns as W,Ls as _,js as a,xs as b,Bs as c,Ts as d,Ps as f,Ss as g,Os as h,Yn as i,fs as j,bs as k,Cs as l,Us as m,ks as n,Is as o,As as p,qs as r,Fs as s,zs as t,Ns as u,_s as v,gs as w,Rs as x,Ds as y,as as z};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import{r as lo,t as zt}from"./rolldown-runtime-Y-txFyxk.js";import{xt as uo}from"./icons-wNdPUgHM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"db-studio@1.16.2"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e8ff2997-752d-48b4-a497-6616f3539ff3",e._sentryDebugIdIdentifier="sentry-dbid-e8ff2997-752d-48b4-a497-6616f3539ff3")}catch{}})();var Ec=zt((e=>{var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(o,a,i){var c=null;if(i!==void 0&&(c=""+i),a.key!==void 0&&(c=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:t,type:o,key:c,ref:a!==void 0?a:null,props:i}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Rc=zt(((e,t)=>{t.exports=Ec()})),Pc=zt((e=>{var t=uo();function n(d){var l="https://react.dev/errors/"+d;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+d+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(d,l,f){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:v==null?null:""+v,children:d,containerInfo:l,implementation:f}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,l){if(d==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,e.createPortal=function(d,l){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(n(299));return i(d,l,null,f)},e.flushSync=function(d){var l=c.T,f=o.p;try{if(c.T=null,o.p=2,d)return d()}finally{c.T=l,o.p=f,o.d.f()}},e.preconnect=function(d,l){typeof d=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,o.d.C(d,l))},e.prefetchDNS=function(d){typeof d=="string"&&o.d.D(d)},e.preinit=function(d,l){if(typeof d=="string"&&l&&typeof l.as=="string"){var f=l.as,v=u(f,l.crossOrigin),m=typeof l.integrity=="string"?l.integrity:void 0,x=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;f==="style"?o.d.S(d,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:v,integrity:m,fetchPriority:x}):f==="script"&&o.d.X(d,{crossOrigin:v,integrity:m,fetchPriority:x,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},e.preinitModule=function(d,l){if(typeof d=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var f=u(l.as,l.crossOrigin);o.d.M(d,{crossOrigin:f,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0})}}else l??o.d.M(d)},e.preload=function(d,l){if(typeof d=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var f=l.as,v=u(f,l.crossOrigin);o.d.L(d,f,{crossOrigin:v,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},e.preloadModule=function(d,l){if(typeof d=="string")if(l){var f=u(l.as,l.crossOrigin);o.d.m(d,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:f,integrity:typeof l.integrity=="string"?l.integrity:void 0})}else o.d.m(d)},e.requestFormReset=function(d){o.d.r(d)},e.unstable_batchedUpdates=function(d,l){return d(l)},e.useFormState=function(d,l,f){return c.H.useFormState(d,l,f)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version="19.2.5"})),_c=zt(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}n(),t.exports=Pc()})),s=lo(uo(),1),Hv=!!(typeof window<"u"&&window.document&&window.document.createElement);function S(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Dr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ft(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Dr(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Dr(e[o],null)}}}}function D(...e){return s.useCallback(ft(...e),e)}var p=Rc();function Tc(e,t){const n=s.createContext(t),r=a=>{const{children:i,...c}=a,u=s.useMemo(()=>c,Object.values(c));return(0,p.jsx)(n.Provider,{value:u,children:i})};r.displayName=e+"Provider";function o(a){const i=s.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function q(e,t=[]){let n=[];function r(a,i){const c=s.createContext(i),u=n.length;n=[...n,i];const d=f=>{const{scope:v,children:m,...x}=f,h=v?.[e]?.[u]||c,g=s.useMemo(()=>x,Object.values(x));return(0,p.jsx)(h.Provider,{value:g,children:m})};d.displayName=a+"Provider";function l(f,v){const m=v?.[e]?.[u]||c,x=s.useContext(m);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[d,l]}const o=()=>{const a=n.map(i=>s.createContext(i));return function(c){const u=c?.[e]||a;return s.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return o.scopeName=e,[r,Ac(o,...t)]}function Ac(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const i=r.reduce((c,{useScope:u,scopeName:d})=>{const l=u(a)[`__scope${d}`];return{...c,...l}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var pt=lo(_c(),1),Y=globalThis?.document?s.useLayoutEffect:()=>{},Mc=s[" useId ".trim().toString()]||(()=>{}),Oc=0;function re(e){const[t,n]=s.useState(Mc());return Y(()=>{e||n(r=>r??String(Oc++))},[e]),e||(t?`radix-${t}`:"")}var Nc=s[" useInsertionEffect ".trim().toString()]||Y;function Q({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=Ic({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:o;{const d=s.useRef(e!==void 0);s.useEffect(()=>{const l=d.current;l!==c&&console.warn(`${r} is changing from ${l?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=c},[c,r])}return[u,s.useCallback(d=>{if(c){const l=Dc(d)?d(e):d;l!==e&&i.current?.(l)}else a(d)},[c,e,a,i])]}function Ic({defaultProp:e,onChange:t}){const[n,r]=s.useState(e),o=s.useRef(n),a=s.useRef(t);return Nc(()=>{a.current=t},[t]),s.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function Dc(e){return typeof e=="function"}function ke(e){const t=jc(e),n=s.forwardRef((r,o)=>{const{children:a,...i}=r,c=s.Children.toArray(a),u=c.find(Lc);if(u){const d=u.props.children,l=c.map(f=>f===u?s.Children.count(d)>1?s.Children.only(null):s.isValidElement(d)?d.props.children:null:f);return(0,p.jsx)(t,{...i,ref:o,children:s.isValidElement(d)?s.cloneElement(d,void 0,l):null})}return(0,p.jsx)(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function jc(e){const t=s.forwardRef((n,r)=>{const{children:o,...a}=n;if(s.isValidElement(o)){const i=Fc(o),c=kc(a,o.props);return o.type!==s.Fragment&&(c.ref=r?ft(r,i):i),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fo=Symbol("radix.slottable");function po(e){const t=({children:n})=>(0,p.jsx)(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=fo,t}function Lc(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fo}function kc(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Fc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var T=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=ke(`Primitive.${t}`),r=s.forwardRef((o,a)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,p.jsx)(u,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function vo(e,t){e&&pt.flushSync(()=>e.dispatchEvent(t))}function K(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function $c(e,t=globalThis?.document){const n=K(e);s.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Bc="DismissableLayer",Dn="dismissableLayer.update",Wc="dismissableLayer.pointerDownOutside",Hc="dismissableLayer.focusOutside",jr,ho=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qe=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:c,...u}=e,d=s.useContext(ho),[l,f]=s.useState(null),v=l?.ownerDocument??globalThis?.document,[,m]=s.useState({}),x=D(t,E=>f(E)),h=Array.from(d.layers),[g]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(g),w=l?h.indexOf(l):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,b=w>=y,P=Vc(E=>{const M=E.target,A=[...d.branches].some(O=>O.contains(M));!b||A||(o?.(E),i?.(E),E.defaultPrevented||c?.())},v),R=Kc(E=>{const M=E.target;[...d.branches].some(A=>A.contains(M))||(a?.(E),i?.(E),E.defaultPrevented||c?.())},v);return $c(E=>{w===d.layers.size-1&&(r?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},v),s.useEffect(()=>{if(l)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(jr=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),Lr(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=jr)}},[l,v,n,d]),s.useEffect(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),Lr())},[l,d]),s.useEffect(()=>{const E=()=>m({});return document.addEventListener(Dn,E),()=>document.removeEventListener(Dn,E)},[]),(0,p.jsx)(T.div,{...u,ref:x,style:{pointerEvents:C?b?"auto":"none":void 0,...e.style},onFocusCapture:S(e.onFocusCapture,R.onFocusCapture),onBlurCapture:S(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:S(e.onPointerDownCapture,P.onPointerDownCapture)})});Qe.displayName=Bc;var Gc="DismissableLayerBranch",Uc=s.forwardRef((e,t)=>{const n=s.useContext(ho),r=s.useRef(null),o=D(t,r);return s.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),(0,p.jsx)(T.div,{...e,ref:o})});Uc.displayName=Gc;function Vc(e,t=globalThis?.document){const n=K(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const a=c=>{if(c.target&&!r.current){let u=function(){mo(Wc,n,d,{discrete:!0})};const d={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Kc(e,t=globalThis?.document){const n=K(e),r=s.useRef(!1);return s.useEffect(()=>{const o=a=>{a.target&&!r.current&&mo(Hc,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Lr(){const e=new CustomEvent(Dn);document.dispatchEvent(e)}function mo(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?vo(o,a):o.dispatchEvent(a)}var Sn="focusScope.autoFocusOnMount",En="focusScope.autoFocusOnUnmount",kr={bubbles:!1,cancelable:!0},zc="FocusScope",vt=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[c,u]=s.useState(null),d=K(o),l=K(a),f=s.useRef(null),v=D(t,h=>u(h)),m=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let h=function(C){if(m.paused||!c)return;const b=C.target;c.contains(b)?f.current=b:Pe(f.current,{select:!0})},g=function(C){if(m.paused||!c)return;const b=C.relatedTarget;b!==null&&(c.contains(b)||Pe(f.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const b of C)b.removedNodes.length>0&&Pe(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const w=new MutationObserver(y);return c&&w.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),w.disconnect()}}},[r,c,m.paused]),s.useEffect(()=>{if(c){$r.add(m);const h=document.activeElement;if(!c.contains(h)){const g=new CustomEvent(Sn,kr);c.addEventListener(Sn,d),c.dispatchEvent(g),g.defaultPrevented||(Yc(Jc(go(c)),{select:!0}),document.activeElement===h&&Pe(c))}return()=>{c.removeEventListener(Sn,d),setTimeout(()=>{const g=new CustomEvent(En,kr);c.addEventListener(En,l),c.dispatchEvent(g),g.defaultPrevented||Pe(h??document.body,{select:!0}),c.removeEventListener(En,l),$r.remove(m)},0)}}},[c,d,l,m]);const x=s.useCallback(h=>{if(!n&&!r||m.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(g&&y){const w=h.currentTarget,[C,b]=Xc(w);C&&b?!h.shiftKey&&y===b?(h.preventDefault(),n&&Pe(C,{select:!0})):h.shiftKey&&y===C&&(h.preventDefault(),n&&Pe(b,{select:!0})):y===w&&h.preventDefault()}},[n,r,m.paused]);return(0,p.jsx)(T.div,{tabIndex:-1,...i,ref:v,onKeyDown:x})});vt.displayName=zc;function Yc(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Pe(r,{select:t}),document.activeElement!==n)return}function Xc(e){const t=go(e);return[Fr(t,e),Fr(t.reverse(),e)]}function go(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Fr(e,t){for(const n of e)if(!qc(n,{upTo:t}))return n}function qc(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Zc(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Zc(e)&&t&&e.select()}}var $r=Qc();function Qc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Br(e,t),e.unshift(t)},remove(t){e=Br(e,t),e[0]?.resume()}}}function Br(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Jc(e){return e.filter(t=>t.tagName!=="A")}var el="Portal",Je=s.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=s.useState(!1);Y(()=>a(!0),[]);const i=n||o&&globalThis?.document?.body;return i?pt.createPortal((0,p.jsx)(T.div,{...r,ref:t}),i):null});Je.displayName=el;function tl(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var z=e=>{const{present:t,children:n}=e,r=nl(t),o=typeof n=="function"?n({present:r.isPresent}):s.Children.only(n),a=D(r.ref,rl(o));return typeof n=="function"||r.isPresent?s.cloneElement(o,{ref:a}):null};z.displayName="Presence";function nl(e){const[t,n]=s.useState(),r=s.useRef(null),o=s.useRef(e),a=s.useRef("none"),[i,c]=tl(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const u=Rt(r.current);a.current=i==="mounted"?u:"none"},[i]),Y(()=>{const u=r.current,d=o.current;if(d!==e){const l=a.current,f=Rt(u);e?c("MOUNT"):f==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&l!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Y(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,l=v=>{const m=Rt(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&m&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=v=>{v.target===t&&(a.current=Rt(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:s.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Rt(e){return e?.animationName||"none"}function rl(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Rn=0;function Yt(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Wr()),document.body.insertAdjacentElement("beforeend",e[1]??Wr()),Rn++,()=>{Rn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Rn--}},[])}function Wr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var me=function(){return me=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},me.apply(this,arguments)};function xo(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ol(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Nt="right-scroll-bar-position",It="width-before-scroll-bar",al="with-scroll-bars-hidden",sl="--removed-body-scroll-bar-size";function Pn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function il(e,t){var n=(0,s.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var cl=typeof window<"u"?s.useLayoutEffect:s.useEffect,Hr=new WeakMap;function ll(e,t){var n=il(t||null,function(r){return e.forEach(function(o){return Pn(o,r)})});return cl(function(){var r=Hr.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(c){a.has(c)||Pn(c,null)}),a.forEach(function(c){o.has(c)||Pn(c,i)})}Hr.set(n,e)},[e]),n}function ul(e){return e}function dl(e,t){t===void 0&&(t=ul);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(i){return o(i)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(o),a=n}var c=function(){var d=a;a=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}}}function fl(e){e===void 0&&(e={});var t=dl(null);return t.options=me({async:!0,ssr:!1},e),t}var wo=function(e){var t=e.sideCar,n=xo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return s.createElement(r,me({},n))};wo.isSideCarExport=!0;function pl(e,t){return e.useMedium(t),wo}var yo=fl(),_n=function(){},Xt=s.forwardRef(function(e,t){var n=s.useRef(null),r=s.useState({onScrollCapture:_n,onWheelCapture:_n,onTouchMoveCapture:_n}),o=r[0],a=r[1],i=e.forwardProps,c=e.children,u=e.className,d=e.removeScrollBar,l=e.enabled,f=e.shards,v=e.sideCar,m=e.noRelative,x=e.noIsolation,h=e.inert,g=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,C=e.gapMode,b=xo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),P=v,R=ll([n,t]),E=me(me({},b),o);return s.createElement(s.Fragment,null,l&&s.createElement(P,{sideCar:yo,removeScrollBar:d,shards:f,noRelative:m,noIsolation:x,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:C}),i?s.cloneElement(s.Children.only(c),me(me({},E),{ref:R})):s.createElement(w,me({},E,{className:u,ref:R}),c))});Xt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xt.classNames={fullWidth:It,zeroRight:Nt};var Gr,vl=function(){if(Gr)return Gr;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hl(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=vl();return t&&e.setAttribute("nonce",t),e}function ml(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function gl(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var xl=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hl())&&(ml(t,n),gl(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wl=function(){var e=xl();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Co=function(){var e=wl(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},yl={left:0,top:0,right:0,gap:0},Tn=function(e){return parseInt(e||"",10)||0},Cl=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Tn(n),Tn(r),Tn(o)]},bl=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yl;var t=Cl(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Sl=Co(),it="data-scroll-locked",El=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(al,` {
|
|
3
|
-
overflow: hidden `).concat(r,`;
|
|
4
|
-
padding-right: `).concat(c,"px ").concat(r,`;
|
|
5
|
-
}
|
|
6
|
-
body[`).concat(it,`] {
|
|
7
|
-
overflow: hidden `).concat(r,`;
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
|
-
padding-left: `.concat(o,`px;
|
|
11
|
-
padding-top: `).concat(a,`px;
|
|
12
|
-
padding-right: `).concat(i,`px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
16
|
-
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.`).concat(Nt,` {
|
|
20
|
-
right: `).concat(c,"px ").concat(r,`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.`).concat(It,` {
|
|
24
|
-
margin-right: `).concat(c,"px ").concat(r,`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.`).concat(Nt," .").concat(Nt,` {
|
|
28
|
-
right: 0 `).concat(r,`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.`).concat(It," .").concat(It,` {
|
|
32
|
-
margin-right: 0 `).concat(r,`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[`).concat(it,`] {
|
|
36
|
-
`).concat(sl,": ").concat(c,`px;
|
|
37
|
-
}
|
|
38
|
-
`)},Ur=function(){var e=parseInt(document.body.getAttribute("data-scroll-locked")||"0",10);return isFinite(e)?e:0},Rl=function(){s.useEffect(function(){return document.body.setAttribute(it,(Ur()+1).toString()),function(){var e=Ur()-1;e<=0?document.body.removeAttribute(it):document.body.setAttribute(it,e.toString())}},[])},Pl=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Rl();var a=s.useMemo(function(){return bl(o)},[o]);return s.createElement(Sl,{styles:El(a,!t,o,n?"":"!important")})},jn=!1;if(typeof window<"u")try{var Pt=Object.defineProperty({},"passive",{get:function(){return jn=!0,!0}});window.addEventListener("test",Pt,Pt),window.removeEventListener("test",Pt,Pt)}catch{jn=!1}var Ge=jn?{passive:!1}:!1,_l=function(e){return e.tagName==="TEXTAREA"},bo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!_l(e)&&n[t]==="visible")},Tl=function(e){return bo(e,"overflowY")},Al=function(e){return bo(e,"overflowX")},Vr=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),So(e,r)){var o=Eo(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ml=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Ol=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},So=function(e,t){return e==="v"?Tl(t):Al(t)},Eo=function(e,t){return e==="v"?Ml(t):Ol(t)},Nl=function(e,t){return e==="h"&&t==="rtl"?-1:1},Il=function(e,t,n,r,o){var a=Nl(e,window.getComputedStyle(t).direction),i=a*r,c=n.target,u=t.contains(c),d=!1,l=i>0,f=0,v=0;do{if(!c)break;var m=Eo(e,c),x=m[0],h=m[1]-m[2]-a*x;(x||h)&&So(e,c)&&(f+=h,v+=x);var g=c.parentNode;c=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(l&&(o&&Math.abs(f)<1||!o&&i>f)||!l&&(o&&Math.abs(v)<1||!o&&-i>v))&&(d=!0),d},_t=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Kr=function(e){return[e.deltaX,e.deltaY]},zr=function(e){return e&&"current"in e?e.current:e},Dl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},jl=function(e){return`
|
|
39
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},Ll=0,Ue=[];function kl(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),o=s.useState(Ll++)[0],a=s.useState(Co)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=ol([e.lockRef.current],(e.shards||[]).map(zr),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!i.current.allowPinchZoom;var y=_t(h),w=n.current,C="deltaX"in h?h.deltaX:w[0]-y[0],b="deltaY"in h?h.deltaY:w[1]-y[1],P,R=h.target,E=Math.abs(C)>Math.abs(b)?"h":"v";if("touches"in h&&E==="h"&&R.type==="range")return!1;var M=window.getSelection(),A=M&&M.anchorNode;if(A&&(A===R||A.contains(R)))return!1;var O=Vr(E,R);if(!O)return!0;if(O?P=E:(P=E==="v"?"h":"v",O=Vr(E,R)),!O)return!1;if(!r.current&&"changedTouches"in h&&(C||b)&&(r.current=P),!P)return!0;var j=r.current||P;return Il(j,g,h,j==="h"?C:b,!0)},[]),u=s.useCallback(function(h){var g=h;if(!(!Ue.length||Ue[Ue.length-1]!==a)){var y="deltaY"in g?Kr(g):_t(g),w=t.current.filter(function(b){return b.name===g.type&&(b.target===g.target||g.target===b.shadowParent)&&Dl(b.delta,y)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var C=(i.current.shards||[]).map(zr).filter(Boolean).filter(function(b){return b.contains(g.target)});(C.length>0?c(g,C[0]):!i.current.noIsolation)&&g.cancelable&&g.preventDefault()}}},[]),d=s.useCallback(function(h,g,y,w){var C={name:h,delta:g,target:y,should:w,shadowParent:Fl(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(b){return b!==C})},1)},[]),l=s.useCallback(function(h){n.current=_t(h),r.current=void 0},[]),f=s.useCallback(function(h){d(h.type,Kr(h),h.target,c(h,e.lockRef.current))},[]),v=s.useCallback(function(h){d(h.type,_t(h),h.target,c(h,e.lockRef.current))},[]);s.useEffect(function(){return Ue.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:v}),document.addEventListener("wheel",u,Ge),document.addEventListener("touchmove",u,Ge),document.addEventListener("touchstart",l,Ge),function(){Ue=Ue.filter(function(h){return h!==a}),document.removeEventListener("wheel",u,Ge),document.removeEventListener("touchmove",u,Ge),document.removeEventListener("touchstart",l,Ge)}},[]);var m=e.removeScrollBar,x=e.inert;return s.createElement(s.Fragment,null,x?s.createElement(a,{styles:jl(o)}):null,m?s.createElement(Pl,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Fl(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var $l=pl(yo,kl),ht=s.forwardRef(function(e,t){return s.createElement(Xt,me({},e,{ref:t,sideCar:$l}))});ht.classNames=Xt.classNames;var Bl=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ve=new WeakMap,Tt=new WeakMap,At={},An=0,Ro=function(e){return e&&(e.host||Ro(e.parentNode))},Wl=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ro(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Hl=function(e,t,n,r){var o=Wl(t,Array.isArray(e)?e:[e]);At[n]||(At[n]=new WeakMap);var a=At[n],i=[],c=new Set,u=new Set(o),d=function(f){!f||c.has(f)||(c.add(f),d(f.parentNode))};o.forEach(d);var l=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(v){if(c.has(v))l(v);else try{var m=v.getAttribute(r),x=m!==null&&m!=="false",h=(Ve.get(v)||0)+1,g=(a.get(v)||0)+1;Ve.set(v,h),a.set(v,g),i.push(v),h===1&&x&&Tt.set(v,!0),g===1&&v.setAttribute(n,"true"),x||v.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",v,y)}})};return l(t),c.clear(),An++,function(){i.forEach(function(f){var v=Ve.get(f)-1,m=a.get(f)-1;Ve.set(f,v),a.set(f,m),v||(Tt.has(f)||f.removeAttribute(r),Tt.delete(f)),m||f.removeAttribute(n)}),An--,An||(Ve=new WeakMap,Ve=new WeakMap,Tt=new WeakMap,At={})}},qt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||Bl(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Hl(r,o,n,"aria-hidden")):function(){return null}},Zt="Dialog",[Po,_o]=q(Zt),[Gl,ve]=Po(Zt),To=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,c=s.useRef(null),u=s.useRef(null),[d,l]=Q({prop:r,defaultProp:o??!1,onChange:a,caller:Zt});return(0,p.jsx)(Gl,{scope:t,triggerRef:c,contentRef:u,contentId:re(),titleId:re(),descriptionId:re(),open:d,onOpenChange:l,onOpenToggle:s.useCallback(()=>l(f=>!f),[l]),modal:i,children:n})};To.displayName=Zt;var Ao="DialogTrigger",Mo=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ve(Ao,n),a=D(t,o.triggerRef);return(0,p.jsx)(T.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zn(o.open),...r,ref:a,onClick:S(e.onClick,o.onOpenToggle)})});Mo.displayName=Ao;var Xn="DialogPortal",[Ul,Oo]=Po(Xn,{forceMount:void 0}),No=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ve(Xn,t);return(0,p.jsx)(Ul,{scope:t,forceMount:n,children:s.Children.map(r,i=>(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(Je,{asChild:!0,container:o,children:i})}))})};No.displayName=Xn;var jt="DialogOverlay",Io=s.forwardRef((e,t)=>{const n=Oo(jt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ve(jt,e.__scopeDialog);return a.modal?(0,p.jsx)(z,{present:r||a.open,children:(0,p.jsx)(Kl,{...o,ref:t})}):null});Io.displayName=jt;var Vl=ke("DialogOverlay.RemoveScroll"),Kl=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ve(jt,n);return(0,p.jsx)(ht,{as:Vl,allowPinchZoom:!0,shards:[o.contentRef],children:(0,p.jsx)(T.div,{"data-state":Zn(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Fe="DialogContent",Do=s.forwardRef((e,t)=>{const n=Oo(Fe,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ve(Fe,e.__scopeDialog);return(0,p.jsx)(z,{present:r||a.open,children:a.modal?(0,p.jsx)(zl,{...o,ref:t}):(0,p.jsx)(Yl,{...o,ref:t})})});Do.displayName=Fe;var zl=s.forwardRef((e,t)=>{const n=ve(Fe,e.__scopeDialog),r=s.useRef(null),o=D(t,n.contentRef,r);return s.useEffect(()=>{const a=r.current;if(a)return qt(a)},[]),(0,p.jsx)(jo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0;(i.button===2||c)&&a.preventDefault()}),onFocusOutside:S(e.onFocusOutside,a=>a.preventDefault())})}),Yl=s.forwardRef((e,t)=>{const n=ve(Fe,e.__scopeDialog),r=s.useRef(!1),o=s.useRef(!1);return(0,p.jsx)(jo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),jo=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,c=ve(Fe,n),u=s.useRef(null),d=D(t,u);return Yt(),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(vt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,p.jsx)(Qe,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Zn(c.open),...i,ref:d,onDismiss:()=>c.onOpenChange(!1)})}),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(ql,{titleId:c.titleId}),(0,p.jsx)(Ql,{contentRef:u,descriptionId:c.descriptionId})]})]})}),qn="DialogTitle",Lo=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ve(qn,n);return(0,p.jsx)(T.h2,{id:o.titleId,...r,ref:t})});Lo.displayName=qn;var ko="DialogDescription",Fo=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ve(ko,n);return(0,p.jsx)(T.p,{id:o.descriptionId,...r,ref:t})});Fo.displayName=ko;var $o="DialogClose",Bo=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ve($o,n);return(0,p.jsx)(T.button,{type:"button",...r,ref:t,onClick:S(e.onClick,()=>o.onOpenChange(!1))})});Bo.displayName=$o;function Zn(e){return e?"open":"closed"}var Wo="DialogTitleWarning",[Xl,Ho]=Tc(Wo,{contentName:Fe,titleName:qn,docsSlug:"dialog"}),ql=({titleId:e})=>{const t=Ho(Wo),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
-
|
|
43
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
-
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Zl="DialogDescriptionWarning",Ql=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ho(Zl).contentName}}.`;return s.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Jl=To,eu=Mo,tu=No,nu=Io,ru=Do,ou=Lo,au=Fo,Go=Bo,su=Symbol.for("react.lazy"),Lt=s[" use ".trim().toString()];function iu(e){return typeof e=="object"&&e!==null&&"then"in e}function Uo(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===su&&"_payload"in e&&iu(e._payload)}function Vo(e){const t=cu(e),n=s.forwardRef((r,o)=>{let{children:a,...i}=r;Uo(a)&&typeof Lt=="function"&&(a=Lt(a._payload));const c=s.Children.toArray(a),u=c.find(uu);if(u){const d=u.props.children,l=c.map(f=>f===u?s.Children.count(d)>1?s.Children.only(null):s.isValidElement(d)?d.props.children:null:f);return(0,p.jsx)(t,{...i,ref:o,children:s.isValidElement(d)?s.cloneElement(d,void 0,l):null})}return(0,p.jsx)(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Gv=Vo("Slot");function cu(e){const t=s.forwardRef((n,r)=>{let{children:o,...a}=n;if(Uo(o)&&typeof Lt=="function"&&(o=Lt(o._payload)),s.isValidElement(o)){const i=fu(o),c=du(a,o.props);return o.type!==s.Fragment&&(c.ref=r?ft(r,i):i),s.cloneElement(o,c)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var lu=Symbol("radix.slottable");function uu(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lu}function du(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function fu(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ko=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Vo(`Primitive.${t}`),r=s.forwardRef((o,a)=>{const{asChild:i,...c}=o,u=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,p.jsx)(u,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),pu=["top","right","bottom","left"],Te=Math.min,se=Math.max,kt=Math.round,Mt=Math.floor,xe=e=>({x:e,y:e}),vu={left:"right",right:"left",bottom:"top",top:"bottom"};function Ln(e,t,n){return se(e,Te(t,n))}function be(e,t){return typeof e=="function"?e(t):e}function Se(e){return e.split("-")[0]}function et(e){return e.split("-")[1]}function Qn(e){return e==="x"?"y":"x"}function Jn(e){return e==="y"?"height":"width"}function ge(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function er(e){return Qn(ge(e))}function hu(e,t,n){n===void 0&&(n=!1);const r=et(e),o=er(e),a=Jn(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Ft(i)),[i,Ft(i)]}function mu(e){const t=Ft(e);return[kn(e),t,kn(t)]}function kn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Yr=["left","right"],Xr=["right","left"],gu=["top","bottom"],xu=["bottom","top"];function wu(e,t,n){switch(e){case"top":case"bottom":return n?t?Xr:Yr:t?Yr:Xr;case"left":case"right":return t?gu:xu;default:return[]}}function yu(e,t,n,r){const o=et(e);let a=wu(Se(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(kn)))),a}function Ft(e){const t=Se(e);return vu[t]+e.slice(t.length)}function Cu(e){return{top:0,right:0,bottom:0,left:0,...e}}function zo(e){return typeof e!="number"?Cu(e):{top:e,right:e,bottom:e,left:e}}function $t(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function qr(e,t,n){let{reference:r,floating:o}=e;const a=ge(t),i=er(t),c=Jn(i),u=Se(t),d=a==="y",l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,v=r[c]/2-o[c]/2;let m;switch(u){case"top":m={x:l,y:r.y-o.height};break;case"bottom":m={x:l,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(et(t)){case"start":m[i]-=v*(n&&d?-1:1);break;case"end":m[i]+=v*(n&&d?-1:1)}return m}async function bu(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:i,elements:c,strategy:u}=e,{boundary:d="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:v=!1,padding:m=0}=be(t,e),x=zo(m),h=c[v?f==="floating"?"reference":"floating":f],g=$t(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(h)))==null||n?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:l,strategy:u})),y=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),C=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},b=$t(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:w,strategy:u}):y);return{top:(g.top-b.top+x.top)/C.y,bottom:(b.bottom-g.bottom+x.bottom)/C.y,left:(g.left-b.left+x.left)/C.x,right:(b.right-g.right+x.right)/C.x}}var Su=50,Eu=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:bu},u=await(i.isRTL==null?void 0:i.isRTL(t));let d=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=qr(d,r,u),v=r,m=0;const x={};for(let h=0;h<a.length;h++){const g=a[h];if(!g)continue;const{name:y,fn:w}=g,{x:C,y:b,data:P,reset:R}=await w({x:l,y:f,initialPlacement:r,placement:v,strategy:o,middlewareData:x,rects:d,platform:c,elements:{reference:e,floating:t}});l=C??l,f=b??f,x[y]={...x[y],...P},R&&m<Su&&(m++,typeof R=="object"&&(R.placement&&(v=R.placement),R.rects&&(d=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:l,y:f}=qr(d,v,u)),h=-1)}return{x:l,y:f,placement:v,strategy:o,middlewareData:x}},Ru=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:c,middlewareData:u}=t,{element:d,padding:l=0}=be(e,t)||{};if(d==null)return{};const f=zo(l),v={x:n,y:r},m=er(o),x=Jn(m),h=await i.getDimensions(d),g=m==="y",y=g?"top":"left",w=g?"bottom":"right",C=g?"clientHeight":"clientWidth",b=a.reference[x]+a.reference[m]-v[m]-a.floating[x],P=v[m]-a.reference[m],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d));let E=R?R[C]:0;(!E||!await(i.isElement==null?void 0:i.isElement(R)))&&(E=c.floating[C]||a.floating[x]);const M=b/2-P/2,A=E/2-h[x]/2-1,O=Te(f[y],A),j=Te(f[w],A),L=O,W=E-h[x]-j,F=E/2-h[x]/2+M,H=Ln(L,F,W),k=!u.arrow&&et(o)!=null&&F!==H&&a.reference[x]/2-(F<L?O:j)-h[x]/2<0,$=k?F<L?F-L:F-W:0;return{[m]:v[m]+$,data:{[m]:H,centerOffset:F-H-$,...k&&{alignmentOffset:$}},reset:k}}}),Pu=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:c,platform:u,elements:d}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...g}=be(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Se(o),w=ge(c),C=Se(c)===c,b=await(u.isRTL==null?void 0:u.isRTL(d.floating)),P=v||(C||!h?[Ft(c)]:mu(c)),R=x!=="none";!v&&R&&P.push(...yu(c,h,x,b));const E=[c,...P],M=await u.detectOverflow(t,g),A=[];let O=((r=a.flip)==null?void 0:r.overflows)||[];if(l&&A.push(M[y]),f){const F=hu(o,i,b);A.push(M[F[0]],M[F[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(F=>F<=0)){var j,L;const F=(((j=a.flip)==null?void 0:j.index)||0)+1,H=E[F];if(H&&(!(f==="alignment"&&w!==ge(H))||O.every($=>ge($.placement)===w?$.overflows[0]>0:!0)))return{data:{index:F,overflows:O},reset:{placement:H}};let k=(L=O.filter($=>$.overflows[0]<=0).sort(($,I)=>$.overflows[1]-I.overflows[1])[0])==null?void 0:L.placement;if(!k)switch(m){case"bestFit":{var W;const $=(W=O.filter(I=>{if(R){const _=ge(I.placement);return _===w||_==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(_=>_>0).reduce((_,U)=>_+U,0)]).sort((I,_)=>I[1]-_[1])[0])==null?void 0:W[0];$&&(k=$);break}case"initialPlacement":k=c}if(o!==k)return{reset:{placement:k}}}return{}}}};function Zr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qr(e){return pu.some(t=>e[t]>=0)}var _u=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=be(e,t);switch(o){case"referenceHidden":{const i=Zr(await r.detectOverflow(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Qr(i)}}}case"escaped":{const i=Zr(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:i,escaped:Qr(i)}}}default:return{}}}}},Yo=new Set(["left","top"]);async function Tu(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Se(n),c=et(n),u=ge(n)==="y",d=Yo.has(i)?-1:1,l=a&&u?-1:1,f=be(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof x=="number"&&(m=c==="end"?x*-1:x),u?{x:m*l,y:v*d}:{x:v*d,y:m*l}}var Au=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:c}=t,u=await Tu(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:a+u.y,data:{...u,placement:i}}}}},Mu=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:c=!1,limiter:u={fn:y=>{let{x:w,y:C}=y;return{x:w,y:C}}},...d}=be(e,t),l={x:n,y:r},f=await a.detectOverflow(t,d),v=ge(Se(o)),m=Qn(v);let x=l[m],h=l[v];if(i){const y=m==="y"?"top":"left",w=m==="y"?"bottom":"right",C=x+f[y],b=x-f[w];x=Ln(C,x,b)}if(c){const y=v==="y"?"top":"left",w=v==="y"?"bottom":"right",C=h+f[y],b=h-f[w];h=Ln(C,h,b)}const g=u.fn({...t,[m]:x,[v]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[m]:i,[v]:c}}}}}},Ou=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=be(e,t),l={x:n,y:r},f=ge(o),v=Qn(f);let m=l[v],x=l[f];const h=be(c,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const C=v==="y"?"height":"width",b=a.reference[v]-a.floating[C]+g.mainAxis,P=a.reference[v]+a.reference[C]-g.mainAxis;m<b?m=b:m>P&&(m=P)}if(d){var y,w;const C=v==="y"?"width":"height",b=Yo.has(Se(o)),P=a.reference[f]-a.floating[C]+(b&&((y=i.offset)==null?void 0:y[f])||0)+(b?0:g.crossAxis),R=a.reference[f]+a.reference[C]+(b?0:((w=i.offset)==null?void 0:w[f])||0)-(b?g.crossAxis:0);x<P?x=P:x>R&&(x=R)}return{[v]:m,[f]:x}}}},Nu=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:c}=t,{apply:u=()=>{},...d}=be(e,t),l=await i.detectOverflow(t,d),f=Se(o),v=et(o),m=ge(o)==="y",{width:x,height:h}=a.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=v===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(y=f,g=v==="end"?"top":"bottom");const w=h-l.top-l.bottom,C=x-l.left-l.right,b=Te(h-l[g],w),P=Te(x-l[y],C),R=!t.middlewareData.shift;let E=b,M=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=w),R&&!v){const O=se(l.left,0),j=se(l.right,0),L=se(l.top,0),W=se(l.bottom,0);m?M=x-2*(O!==0||j!==0?O+j:se(l.left,l.right)):E=h-2*(L!==0||W!==0?L+W:se(l.top,l.bottom))}await u({...t,availableWidth:M,availableHeight:E});const A=await i.getDimensions(c.floating);return x!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function Qt(){return typeof window<"u"}function tt(e){return Xo(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function we(e){var t;return(t=(Xo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xo(e){return Qt()?e instanceof Node||e instanceof ie(e).Node:!1}function fe(e){return Qt()?e instanceof Element||e instanceof ie(e).Element:!1}function Ee(e){return Qt()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function Jr(e){return!Qt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function mt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Iu(e){return/^(table|td|th)$/.test(tt(e))}function Jt(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Du=/transform|translate|scale|rotate|perspective|filter/,ju=/paint|layout|strict|content/,Le=e=>!!e&&e!=="none",Mn;function tr(e){const t=fe(e)?pe(e):e;return Le(t.transform)||Le(t.translate)||Le(t.scale)||Le(t.rotate)||Le(t.perspective)||!nr()&&(Le(t.backdropFilter)||Le(t.filter))||Du.test(t.willChange||"")||ju.test(t.contain||"")}function Lu(e){let t=Ae(e);for(;Ee(t)&&!Ye(t);){if(tr(t))return t;if(Jt(t))return null;t=Ae(t)}return null}function nr(){return Mn==null&&(Mn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Mn}function Ye(e){return/^(html|body|#document)$/.test(tt(e))}function pe(e){return ie(e).getComputedStyle(e)}function en(e){return fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ae(e){if(tt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jr(e)&&e.host||we(e);return Jr(t)?t.host:t}function qo(e){const t=Ae(e);return Ye(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ee(t)&&mt(t)?t:qo(t)}function ct(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=qo(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=ie(o);if(a){const c=Fn(i);return t.concat(i,i.visualViewport||[],mt(o)?o:[],c&&n?ct(c):[])}else return t.concat(o,ct(o,[],n))}function Fn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zo(e){const t=pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ee(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=kt(n)!==a||kt(r)!==i;return c&&(n=a,r=i),{width:n,height:r,$:c}}function rr(e){return fe(e)?e:e.contextElement}function Ke(e){const t=rr(e);if(!Ee(t))return xe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Zo(t);let i=(a?kt(n.width):n.width)/r,c=(a?kt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}var ku=xe(0);function Qo(e){const t=ie(e);return!nr()||!t.visualViewport?ku:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Fu(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ie(e)?!1:t}function $e(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=rr(e);let i=xe(1);t&&(r?fe(r)&&(i=Ke(r)):i=Ke(e));const c=Fu(a,n,r)?Qo(a):xe(0);let u=(o.left+c.x)/i.x,d=(o.top+c.y)/i.y,l=o.width/i.x,f=o.height/i.y;if(a){const v=ie(a),m=r&&fe(r)?ie(r):r;let x=v,h=Fn(x);for(;h&&r&&m!==x;){const g=Ke(h),y=h.getBoundingClientRect(),w=pe(h),C=y.left+(h.clientLeft+parseFloat(w.paddingLeft))*g.x,b=y.top+(h.clientTop+parseFloat(w.paddingTop))*g.y;u*=g.x,d*=g.y,l*=g.x,f*=g.y,u+=C,d+=b,x=ie(h),h=Fn(x)}}return $t({width:l,height:f,x:u,y:d})}function tn(e,t){const n=en(e).scrollLeft;return t?t.left+n:$e(we(e)).left+n}function Jo(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-tn(e,n),y:n.top+t.scrollTop}}function $u(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=we(r),c=t?Jt(t.floating):!1;if(r===i||c&&a)return n;let u={scrollLeft:0,scrollTop:0},d=xe(1);const l=xe(0),f=Ee(r);if((f||!f&&!a)&&((tt(r)!=="body"||mt(i))&&(u=en(r)),f)){const m=$e(r);d=Ke(r),l.x=m.x+r.clientLeft,l.y=m.y+r.clientTop}const v=i&&!f&&!a?Jo(i,u):xe(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-u.scrollLeft*d.x+l.x+v.x,y:n.y*d.y-u.scrollTop*d.y+l.y+v.y}}function Bu(e){return Array.from(e.getClientRects())}function Wu(e){const t=we(e),n=en(e),r=e.ownerDocument.body,o=se(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=se(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+tn(e);const c=-n.scrollTop;return pe(r).direction==="rtl"&&(i+=se(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:c}}var eo=25;function Hu(e,t){const n=ie(e),r=we(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,c=0,u=0;if(o){a=o.width,i=o.height;const l=nr();(!l||l&&t==="fixed")&&(c=o.offsetLeft,u=o.offsetTop)}const d=tn(r);if(d<=0){const l=r.ownerDocument,f=l.body,v=getComputedStyle(f),m=l.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(r.clientWidth-f.clientWidth-m);x<=eo&&(a-=x)}else d<=eo&&(a+=d);return{width:a,height:i,x:c,y:u}}function Gu(e,t){const n=$e(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Ee(e)?Ke(e):xe(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}function to(e,t,n){let r;if(t==="viewport")r=Hu(e,n);else if(t==="document")r=Wu(we(e));else if(fe(t))r=Gu(t,n);else{const o=Qo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return $t(r)}function ea(e,t){const n=Ae(e);return n===t||!fe(n)||Ye(n)?!1:pe(n).position==="fixed"||ea(n,t)}function Uu(e,t){const n=t.get(e);if(n)return n;let r=ct(e,[],!1).filter(c=>fe(c)&&tt(c)!=="body"),o=null;const a=pe(e).position==="fixed";let i=a?Ae(e):e;for(;fe(i)&&!Ye(i);){const c=pe(i),u=tr(i);!u&&c.position==="fixed"&&(o=null),(a?!u&&!o:!u&&c.position==="static"&&o&&(o.position==="absolute"||o.position==="fixed")||mt(i)&&!u&&ea(e,i))?r=r.filter(d=>d!==i):o=c,i=Ae(i)}return t.set(e,r),r}function Vu(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Jt(t)?[]:Uu(t,this._c):[].concat(n),r],i=to(t,a[0],o);let c=i.top,u=i.right,d=i.bottom,l=i.left;for(let f=1;f<a.length;f++){const v=to(t,a[f],o);c=se(v.top,c),u=Te(v.right,u),d=Te(v.bottom,d),l=se(v.left,l)}return{width:u-l,height:d-c,x:l,y:c}}function Ku(e){const{width:t,height:n}=Zo(e);return{width:t,height:n}}function zu(e,t,n){const r=Ee(t),o=we(t),a=n==="fixed",i=$e(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const u=xe(0);function d(){u.x=tn(o)}if(r||!r&&!a)if((tt(t)!=="body"||mt(o))&&(c=en(t)),r){const f=$e(t,!0,a,t);u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}else o&&d();a&&!r&&o&&d();const l=o&&!r&&!a?Jo(o,c):xe(0);return{x:i.left+c.scrollLeft-u.x-l.x,y:i.top+c.scrollTop-u.y-l.y,width:i.width,height:i.height}}function On(e){return pe(e).position==="static"}function no(e,t){if(!Ee(e)||pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return we(e)===n&&(n=n.ownerDocument.body),n}function ta(e,t){const n=ie(e);if(Jt(e))return n;if(!Ee(e)){let o=Ae(e);for(;o&&!Ye(o);){if(fe(o)&&!On(o))return o;o=Ae(o)}return n}let r=no(e,t);for(;r&&Iu(r)&&On(r);)r=no(r,t);return r&&Ye(r)&&On(r)&&!tr(r)?n:r||Lu(e)||n}var Yu=async function(e){const t=this.getOffsetParent||ta,n=this.getDimensions,r=await n(e.floating);return{reference:zu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Xu(e){return pe(e).direction==="rtl"}var qu={convertOffsetParentRelativeRectToViewportRelativeRect:$u,getDocumentElement:we,getClippingRect:Vu,getOffsetParent:ta,getElementRects:Yu,getClientRects:Bu,getDimensions:Ku,getScale:Ke,isElement:fe,isRTL:Xu};function na(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Zu(e,t){let n=null,r;const o=we(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),a();const d=e.getBoundingClientRect(),{left:l,top:f,width:v,height:m}=d;if(c||t(),!v||!m)return;const x=Mt(f),h=Mt(o.clientWidth-(l+v)),g=Mt(o.clientHeight-(f+m)),y=Mt(l),w={rootMargin:-x+"px "+-h+"px "+-g+"px "+-y+"px",threshold:se(0,Te(1,u))||1};let C=!0;function b(P){const R=P[0].intersectionRatio;if(R!==u){if(!C)return i();R?i(!1,R):r=setTimeout(()=>{i(!1,1e-7)},1e3)}R===1&&!na(d,e.getBoundingClientRect())&&i(),C=!1}try{n=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(b,w)}n.observe(e)}return i(!0),a}function Qu(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,d=rr(e),l=o||a?[...d?ct(d):[],...t?ct(t):[]]:[];l.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const f=d&&c?Zu(d,n):null;let v=-1,m=null;i&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===d&&m&&t&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),n()}),d&&!u&&m.observe(d),t&&m.observe(t));let x,h=u?$e(e):null;u&&g();function g(){const y=$e(e);h&&!na(h,y)&&n(),h=y,x=requestAnimationFrame(g)}return n(),()=>{var y;l.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),f?.(),(y=m)==null||y.disconnect(),m=null,u&&cancelAnimationFrame(x)}}var Ju=Au,ed=Mu,td=Pu,nd=Nu,rd=_u,ro=Ru,od=Ou,ad=(e,t,n)=>{const r=new Map,o={platform:qu,...n},a={...o.platform,_c:r};return Eu(e,t,{...o,platform:a})},Dt=typeof document<"u"?s.useLayoutEffect:function(){};function Bt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Bt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Bt(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ra(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oo(e,t){const n=ra(e);return Math.round(t*n)/n}function Nn(e){const t=s.useRef(e);return Dt(()=>{t.current=e}),t}function sd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[l,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=s.useState(r);Bt(v,r)||m(r);const[x,h]=s.useState(null),[g,y]=s.useState(null),w=s.useCallback(I=>{I!==R.current&&(R.current=I,h(I))},[]),C=s.useCallback(I=>{I!==E.current&&(E.current=I,y(I))},[]),b=a||x,P=i||g,R=s.useRef(null),E=s.useRef(null),M=s.useRef(l),A=u!=null,O=Nn(u),j=Nn(o),L=Nn(d),W=s.useCallback(()=>{if(!R.current||!E.current)return;const I={placement:t,strategy:n,middleware:v};j.current&&(I.platform=j.current),ad(R.current,E.current,I).then(_=>{const U={..._,isPositioned:L.current!==!1};F.current&&!Bt(M.current,U)&&(M.current=U,pt.flushSync(()=>{f(U)}))})},[v,t,n,j,L]);Dt(()=>{d===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(I=>({...I,isPositioned:!1})))},[d]);const F=s.useRef(!1);Dt(()=>(F.current=!0,()=>{F.current=!1}),[]),Dt(()=>{if(b&&(R.current=b),P&&(E.current=P),b&&P){if(O.current)return O.current(b,P,W);W()}},[b,P,W,O,A]);const H=s.useMemo(()=>({reference:R,floating:E,setReference:w,setFloating:C}),[w,C]),k=s.useMemo(()=>({reference:b,floating:P}),[b,P]),$=s.useMemo(()=>{const I={position:n,left:0,top:0};if(!k.floating)return I;const _=oo(k.floating,l.x),U=oo(k.floating,l.y);return c?{...I,transform:"translate("+_+"px, "+U+"px)",...ra(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:U}},[n,c,k.floating,l.x,l.y]);return s.useMemo(()=>({...l,update:W,refs:H,elements:k,floatingStyles:$}),[l,W,H,k,$])}var id=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ro({element:r.current,padding:o}).fn(n):{}:r?ro({element:r,padding:o}).fn(n):{}}}},cd=(e,t)=>{const n=Ju(e);return{name:n.name,fn:n.fn,options:[e,t]}},ld=(e,t)=>{const n=ed(e);return{name:n.name,fn:n.fn,options:[e,t]}},ud=(e,t)=>({fn:od(e).fn,options:[e,t]}),dd=(e,t)=>{const n=td(e);return{name:n.name,fn:n.fn,options:[e,t]}},fd=(e,t)=>{const n=nd(e);return{name:n.name,fn:n.fn,options:[e,t]}},pd=(e,t)=>{const n=rd(e);return{name:n.name,fn:n.fn,options:[e,t]}},vd=(e,t)=>{const n=id(e);return{name:n.name,fn:n.fn,options:[e,t]}},hd="Arrow",oa=s.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return(0,p.jsx)(T.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,p.jsx)("polygon",{points:"0,0 30,0 15,10"})})});oa.displayName=hd;var md=oa;function or(e){const[t,n]=s.useState(void 0);return Y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,c;if("borderBoxSize"in a){const u=a.borderBoxSize,d=Array.isArray(u)?u[0]:u;i=d.inlineSize,c=d.blockSize}else i=e.offsetWidth,c=e.offsetHeight;n({width:i,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var ar="Popper",[aa,Me]=q(ar),[gd,sa]=aa(ar),ia=e=>{const{__scopePopper:t,children:n}=e,[r,o]=s.useState(null);return(0,p.jsx)(gd,{scope:t,anchor:r,onAnchorChange:o,children:n})};ia.displayName=ar;var ca="PopperAnchor",la=s.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=sa(ca,n),i=s.useRef(null),c=D(t,i),u=s.useRef(null);return s.useEffect(()=>{const d=u.current;u.current=r?.current||i.current,d!==u.current&&a.onAnchorChange(u.current)}),r?null:(0,p.jsx)(T.div,{...o,ref:c})});la.displayName=ca;var sr="PopperContent",[xd,wd]=aa(sr),ua=s.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:l=0,sticky:f="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:x,...h}=e,g=sa(sr,n),[y,w]=s.useState(null),C=D(t,N=>w(N)),[b,P]=s.useState(null),R=or(b),E=R?.width??0,M=R?.height??0,A=r+(a!=="center"?"-"+a:""),O=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},j=Array.isArray(d)?d:[d],L=j.length>0,W={padding:O,boundary:j.filter(Cd),altBoundary:L},{refs:F,floatingStyles:H,placement:k,isPositioned:$,middlewareData:I}=sd({strategy:"fixed",placement:A,whileElementsMounted:(...N)=>Qu(...N,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[cd({mainAxis:o+M,alignmentAxis:i}),u&&ld({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?ud():void 0,...W}),u&&dd({...W}),fd({...W,apply:({elements:N,rects:V,availableWidth:G,availableHeight:B})=>{const{width:Z,height:ne}=V.reference,he=N.floating.style;he.setProperty("--radix-popper-available-width",`${G}px`),he.setProperty("--radix-popper-available-height",`${B}px`),he.setProperty("--radix-popper-anchor-width",`${Z}px`),he.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),b&&vd({element:b,padding:c}),bd({arrowWidth:E,arrowHeight:M}),v&&pd({strategy:"referenceHidden",...W})]}),[_,U]=pa(k),te=K(x);Y(()=>{$&&te?.()},[$,te]);const ue=I.arrow?.x,Ce=I.arrow?.y,oe=I.arrow?.centerOffset!==0,[ae,X]=s.useState();return Y(()=>{y&&X(window.getComputedStyle(y).zIndex)},[y]),(0,p.jsx)("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:$?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,p.jsx)(xd,{scope:n,placedSide:_,onArrowChange:P,arrowX:ue,arrowY:Ce,shouldHideArrow:oe,children:(0,p.jsx)(T.div,{"data-side":_,"data-align":U,...h,ref:C,style:{...h.style,animation:$?void 0:"none"}})})})});ua.displayName=sr;var da="PopperArrow",yd={top:"bottom",right:"left",bottom:"top",left:"right"},fa=s.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=wd(da,r),i=yd[a.placedSide];return(0,p.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,p.jsx)(md,{...o,ref:n,style:{...o.style,display:"block"}})})});fa.displayName=da;function Cd(e){return e!==null}var bd=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,d]=pa(n),l={start:"0%",center:"50%",end:"100%"}[d],f=(o.arrow?.x??0)+i/2,v=(o.arrow?.y??0)+c/2;let m="",x="";return u==="bottom"?(m=a?l:`${f}px`,x=`${-c}px`):u==="top"?(m=a?l:`${f}px`,x=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,x=a?l:`${v}px`):u==="left"&&(m=`${r.floating.width+c}px`,x=a?l:`${v}px`),{data:{x:m,y:x}}}});function pa(e){const[t,n="center"]=e.split("-");return[t,n]}var gt=ia,xt=la,nn=ua,rn=fa,on="Popover",[va,Uv]=q(on,[Me]),wt=Me(),[Sd,Oe]=va(on),ha=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,c=wt(t),u=s.useRef(null),[d,l]=s.useState(!1),[f,v]=Q({prop:r,defaultProp:o??!1,onChange:a,caller:on});return(0,p.jsx)(gt,{...c,children:(0,p.jsx)(Sd,{scope:t,contentId:re(),triggerRef:u,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:d,onCustomAnchorAdd:s.useCallback(()=>l(!0),[]),onCustomAnchorRemove:s.useCallback(()=>l(!1),[]),modal:i,children:n})})};ha.displayName=on;var ma="PopoverAnchor",ga=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Oe(ma,n),a=wt(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=o;return s.useEffect(()=>(i(),()=>c()),[i,c]),(0,p.jsx)(xt,{...a,...r,ref:t})});ga.displayName=ma;var xa="PopoverTrigger",wa=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Oe(xa,n),a=wt(n),i=D(t,o.triggerRef),c=(0,p.jsx)(T.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ea(o.open),...r,ref:i,onClick:S(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?c:(0,p.jsx)(xt,{asChild:!0,...a,children:c})});wa.displayName=xa;var ir="PopoverPortal",[Ed,Rd]=va(ir,{forceMount:void 0}),ya=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Oe(ir,t);return(0,p.jsx)(Ed,{scope:t,forceMount:n,children:(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(Je,{asChild:!0,container:o,children:r})})})};ya.displayName=ir;var Xe="PopoverContent",Ca=s.forwardRef((e,t)=>{const n=Rd(Xe,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Oe(Xe,e.__scopePopover);return(0,p.jsx)(z,{present:r||a.open,children:a.modal?(0,p.jsx)(_d,{...o,ref:t}):(0,p.jsx)(Td,{...o,ref:t})})});Ca.displayName=Xe;var Pd=ke("PopoverContent.RemoveScroll"),_d=s.forwardRef((e,t)=>{const n=Oe(Xe,e.__scopePopover),r=s.useRef(null),o=D(t,r),a=s.useRef(!1);return s.useEffect(()=>{const i=r.current;if(i)return qt(i)},[]),(0,p.jsx)(ht,{as:Pd,allowPinchZoom:!0,children:(0,p.jsx)(ba,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:S(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Td=s.forwardRef((e,t)=>{const n=Oe(Xe,e.__scopePopover),r=s.useRef(!1),o=s.useRef(!1);return(0,p.jsx)(ba,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;n.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),ba=s.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:l,...f}=e,v=Oe(Xe,n),m=wt(n);return Yt(),(0,p.jsx)(vt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:(0,p.jsx)(nn,{"data-state":Ea(v.open),role:"dialog",id:v.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Sa="PopoverClose",Ad=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Oe(Sa,n);return(0,p.jsx)(T.button,{type:"button",...r,ref:t,onClick:S(e.onClick,()=>o.onOpenChange(!1))})});Ad.displayName=Sa;var Md="PopoverArrow",Od=s.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(n);return(0,p.jsx)(rn,{...o,...r,ref:t})});Od.displayName=Md;function Ea(e){return e?"open":"closed"}var Vv=ha,Kv=ga,zv=wa,Yv=ya,Xv=Ca,Nd=s.createContext(void 0);function nt(e){const t=s.useContext(Nd);return e||t||"ltr"}function $n(e,[t,n]){return Math.min(n,Math.max(t,e))}function Id(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}var cr="ScrollArea",[Ra,qv]=q(cr),[Dd,le]=Ra(cr),Pa=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...i}=e,[c,u]=s.useState(null),[d,l]=s.useState(null),[f,v]=s.useState(null),[m,x]=s.useState(null),[h,g]=s.useState(null),[y,w]=s.useState(0),[C,b]=s.useState(0),[P,R]=s.useState(!1),[E,M]=s.useState(!1),A=D(t,j=>u(j)),O=nt(o);return(0,p.jsx)(Dd,{scope:n,type:r,dir:O,scrollHideDelay:a,scrollArea:c,viewport:d,onViewportChange:l,content:f,onContentChange:v,scrollbarX:m,onScrollbarXChange:x,scrollbarXEnabled:P,onScrollbarXEnabledChange:R,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:M,onCornerWidthChange:w,onCornerHeightChange:b,children:(0,p.jsx)(T.div,{dir:O,...i,ref:A,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":C+"px",...e.style}})})});Pa.displayName=cr;var _a="ScrollAreaViewport",Ta=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,i=le(_a,n),c=s.useRef(null),u=D(t,c,i.onViewportChange);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,p.jsx)(T.div,{"data-radix-scroll-area-viewport":"",...a,ref:u,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,p.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Ta.displayName=_a;var ye="ScrollAreaScrollbar",jd=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=le(ye,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,c=e.orientation==="horizontal";return s.useEffect(()=>(c?a(!0):i(!0),()=>{c?a(!1):i(!1)}),[c,a,i]),o.type==="hover"?(0,p.jsx)(Ld,{...r,ref:t,forceMount:n}):o.type==="scroll"?(0,p.jsx)(kd,{...r,ref:t,forceMount:n}):o.type==="auto"?(0,p.jsx)(Aa,{...r,ref:t,forceMount:n}):o.type==="always"?(0,p.jsx)(lr,{...r,ref:t}):null});jd.displayName=ye;var Ld=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=le(ye,e.__scopeScrollArea),[a,i]=s.useState(!1);return s.useEffect(()=>{const c=o.scrollArea;let u=0;if(c){const d=()=>{window.clearTimeout(u),i(!0)},l=()=>{u=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",d),c.addEventListener("pointerleave",l),()=>{window.clearTimeout(u),c.removeEventListener("pointerenter",d),c.removeEventListener("pointerleave",l)}}},[o.scrollArea,o.scrollHideDelay]),(0,p.jsx)(z,{present:n||a,children:(0,p.jsx)(Aa,{"data-state":a?"visible":"hidden",...r,ref:t})})}),kd=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=le(ye,e.__scopeScrollArea),a=e.orientation==="horizontal",i=sn(()=>u("SCROLL_END"),100),[c,u]=Id("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return s.useEffect(()=>{if(c==="idle"){const d=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(d)}},[c,o.scrollHideDelay,u]),s.useEffect(()=>{const d=o.viewport,l=a?"scrollLeft":"scrollTop";if(d){let f=d[l];const v=()=>{const m=d[l];f!==m&&(u("SCROLL"),i()),f=m};return d.addEventListener("scroll",v),()=>d.removeEventListener("scroll",v)}},[o.viewport,a,u,i]),(0,p.jsx)(z,{present:n||c!=="hidden",children:(0,p.jsx)(lr,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:S(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:S(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),Aa=s.forwardRef((e,t)=>{const n=le(ye,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,i]=s.useState(!1),c=e.orientation==="horizontal",u=sn(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,l=n.viewport.offsetHeight<n.viewport.scrollHeight;i(c?d:l)}},10);return qe(n.viewport,u),qe(n.content,u),(0,p.jsx)(z,{present:r||a,children:(0,p.jsx)(lr,{"data-state":a?"visible":"hidden",...o,ref:t})})}),lr=s.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=le(ye,e.__scopeScrollArea),a=s.useRef(null),i=s.useRef(0),[c,u]=s.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=Ia(c.viewport,c.content),l={...r,sizes:c,onSizesChange:u,hasThumb:d>0&&d<1,onThumbChange:v=>a.current=v,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:v=>i.current=v};function f(v,m){return Ud(v,i.current,c,m)}return n==="horizontal"?(0,p.jsx)(Fd,{...l,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const v=o.viewport.scrollLeft,m=ao(v,c,o.dir);a.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollLeft=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollLeft=f(v,o.dir))}}):n==="vertical"?(0,p.jsx)($d,{...l,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const v=o.viewport.scrollTop,m=ao(v,c);a.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:v=>{o.viewport&&(o.viewport.scrollTop=v)},onDragScroll:v=>{o.viewport&&(o.viewport.scrollTop=f(v))}}):null}),Fd=s.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=le(ye,e.__scopeScrollArea),[i,c]=s.useState(),u=s.useRef(null),d=D(t,u,a.onScrollbarXChange);return s.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),(0,p.jsx)(Oa,{"data-orientation":"horizontal",...o,ref:d,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":an(n)+"px",...e.style},onThumbPointerDown:l=>e.onThumbPointerDown(l.x),onDragScroll:l=>e.onDragScroll(l.x),onWheelScroll:(l,f)=>{if(a.viewport){const v=a.viewport.scrollLeft+l.deltaX;e.onWheelScroll(v),ja(v,f)&&l.preventDefault()}},onResize:()=>{u.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Ht(i.paddingLeft),paddingEnd:Ht(i.paddingRight)}})}})}),$d=s.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=le(ye,e.__scopeScrollArea),[i,c]=s.useState(),u=s.useRef(null),d=D(t,u,a.onScrollbarYChange);return s.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),(0,p.jsx)(Oa,{"data-orientation":"vertical",...o,ref:d,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":an(n)+"px",...e.style},onThumbPointerDown:l=>e.onThumbPointerDown(l.y),onDragScroll:l=>e.onDragScroll(l.y),onWheelScroll:(l,f)=>{if(a.viewport){const v=a.viewport.scrollTop+l.deltaY;e.onWheelScroll(v),ja(v,f)&&l.preventDefault()}},onResize:()=>{u.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Ht(i.paddingTop),paddingEnd:Ht(i.paddingBottom)}})}})}),[Bd,Ma]=Ra(ye),Oa=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:c,onThumbPositionChange:u,onDragScroll:d,onWheelScroll:l,onResize:f,...v}=e,m=le(ye,n),[x,h]=s.useState(null),g=D(t,A=>h(A)),y=s.useRef(null),w=s.useRef(""),C=m.viewport,b=r.content-r.viewport,P=K(l),R=K(u),E=sn(f,10);function M(A){if(y.current){const O=A.clientX-y.current.left,j=A.clientY-y.current.top;d({x:O,y:j})}}return s.useEffect(()=>{const A=O=>{const j=O.target;x?.contains(j)&&P(O,b)};return document.addEventListener("wheel",A,{passive:!1}),()=>document.removeEventListener("wheel",A,{passive:!1})},[C,x,b,P]),s.useEffect(R,[r,R]),qe(x,E),qe(m.content,E),(0,p.jsx)(Bd,{scope:n,scrollbar:x,hasThumb:o,onThumbChange:K(a),onThumbPointerUp:K(i),onThumbPositionChange:R,onThumbPointerDown:K(c),children:(0,p.jsx)(T.div,{...v,ref:g,style:{position:"absolute",...v.style},onPointerDown:S(e.onPointerDown,A=>{A.button===0&&(A.target.setPointerCapture(A.pointerId),y.current=x.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),M(A))}),onPointerMove:S(e.onPointerMove,M),onPointerUp:S(e.onPointerUp,A=>{const O=A.target;O.hasPointerCapture(A.pointerId)&&O.releasePointerCapture(A.pointerId),document.body.style.webkitUserSelect=w.current,m.viewport&&(m.viewport.style.scrollBehavior=""),y.current=null})})})}),Wt="ScrollAreaThumb",Wd=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ma(Wt,e.__scopeScrollArea);return(0,p.jsx)(z,{present:n||o.hasThumb,children:(0,p.jsx)(Hd,{ref:t,...r})})}),Hd=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=le(Wt,n),i=Ma(Wt,n),{onThumbPositionChange:c}=i,u=D(t,f=>i.onThumbChange(f)),d=s.useRef(void 0),l=sn(()=>{d.current&&(d.current(),d.current=void 0)},100);return s.useEffect(()=>{const f=a.viewport;if(f){const v=()=>{if(l(),!d.current){const m=Vd(f,c);d.current=m,c()}};return c(),f.addEventListener("scroll",v),()=>f.removeEventListener("scroll",v)}},[a.viewport,l,c]),(0,p.jsx)(T.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:S(e.onPointerDownCapture,f=>{const v=f.target.getBoundingClientRect(),m=f.clientX-v.left,x=f.clientY-v.top;i.onThumbPointerDown({x:m,y:x})}),onPointerUp:S(e.onPointerUp,i.onThumbPointerUp)})});Wd.displayName=Wt;var ur="ScrollAreaCorner",Na=s.forwardRef((e,t)=>{const n=le(ur,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?(0,p.jsx)(Gd,{...e,ref:t}):null});Na.displayName=ur;var Gd=s.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=le(ur,n),[a,i]=s.useState(0),[c,u]=s.useState(0),d=!!(a&&c);return qe(o.scrollbarX,()=>{const l=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(l),u(l)}),qe(o.scrollbarY,()=>{const l=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(l),i(l)}),d?(0,p.jsx)(T.div,{...r,ref:t,style:{width:a,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Ht(e){return e?parseInt(e,10):0}function Ia(e,t){const n=e/t;return isNaN(n)?0:n}function an(e){const t=Ia(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Ud(e,t,n,r="ltr"){const o=an(n),a=o/2,i=t||a,c=o-i,u=n.scrollbar.paddingStart+i,d=n.scrollbar.size-n.scrollbar.paddingEnd-c,l=n.content-n.viewport,f=r==="ltr"?[0,l]:[l*-1,0];return Da([u,d],f)(e)}function ao(e,t,n="ltr"){const r=an(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,c=a-r,u=n==="ltr"?[0,i]:[i*-1,0],d=$n(e,u);return Da([0,i],[0,c])(d)}function Da(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function ja(e,t){return e>0&&e<t}var Vd=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=n.left!==a.left,c=n.top!==a.top;(i||c)&&t(),n=a,r=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(r)};function sn(e,t){const n=K(e),r=s.useRef(0);return s.useEffect(()=>()=>window.clearTimeout(r.current),[]),s.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function qe(e,t){const n=K(t);Y(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var Zv=Pa,Qv=Ta,Jv=Na;function dr(e){const t=e+"CollectionProvider",[n,r]=q(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:g,children:y}=h,w=s.useRef(null),C=s.useRef(new Map).current;return(0,p.jsx)(o,{scope:g,itemMap:C,collectionRef:w,children:y})};i.displayName=t;const c=e+"CollectionSlot",u=ke(c),d=s.forwardRef((h,g)=>{const{scope:y,children:w}=h,C=a(c,y),b=D(g,C.collectionRef);return(0,p.jsx)(u,{ref:b,children:w})});d.displayName=c;const l=e+"CollectionItemSlot",f="data-radix-collection-item",v=ke(l),m=s.forwardRef((h,g)=>{const{scope:y,children:w,...C}=h,b=s.useRef(null),P=D(g,b),R=a(l,y);return s.useEffect(()=>(R.itemMap.set(b,{ref:b,...C}),()=>{R.itemMap.delete(b)})),(0,p.jsx)(v,{[f]:"",ref:P,children:w})});m.displayName=l;function x(h){const g=a(e+"CollectionConsumer",h);return s.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((C,b)=>w.indexOf(C.ref.current)-w.indexOf(b.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:d,ItemSlot:m},x,r]}function fr(e){const t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var La=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"}),Kd="VisuallyHidden",ka=s.forwardRef((e,t)=>(0,p.jsx)(T.span,{...e,ref:t,style:{...La,...e.style}}));ka.displayName=Kd;var zd=ka,Yd=[" ","Enter","ArrowUp","ArrowDown"],Xd=[" ","Enter"],Be="Select",[cn,ln,qd]=dr(Be),[rt,eh]=q(Be,[qd,Me]),un=Me(),[Zd,Ne]=rt(Be),[Qd,Jd]=rt(Be),Fa=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:c,onValueChange:u,dir:d,name:l,autoComplete:f,disabled:v,required:m,form:x}=e,h=un(t),[g,y]=s.useState(null),[w,C]=s.useState(null),[b,P]=s.useState(!1),R=nt(d),[E,M]=Q({prop:r,defaultProp:o??!1,onChange:a,caller:Be}),[A,O]=Q({prop:i,defaultProp:c,onChange:u,caller:Be}),j=s.useRef(null),L=g?x||!!g.closest("form"):!0,[W,F]=s.useState(new Set),H=Array.from(W).map(k=>k.props.value).join(";");return(0,p.jsx)(gt,{...h,children:(0,p.jsxs)(Zd,{required:m,scope:t,trigger:g,onTriggerChange:y,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:b,onValueNodeHasChildrenChange:P,contentId:re(),value:A,onValueChange:O,open:E,onOpenChange:M,dir:R,triggerPointerDownPosRef:j,disabled:v,children:[(0,p.jsx)(cn.Provider,{scope:t,children:(0,p.jsx)(Qd,{scope:e.__scopeSelect,onNativeOptionAdd:s.useCallback(k=>{F($=>new Set($).add(k))},[]),onNativeOptionRemove:s.useCallback(k=>{F($=>{const I=new Set($);return I.delete(k),I})},[]),children:n})}),L?(0,p.jsxs)(ss,{"aria-hidden":!0,required:m,tabIndex:-1,name:l,autoComplete:f,value:A,onChange:k=>O(k.target.value),disabled:v,form:x,children:[A===void 0?(0,p.jsx)("option",{value:""}):null,Array.from(W)]},H):null]})})};Fa.displayName=Be;var $a="SelectTrigger",Ba=s.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=un(n),i=Ne($a,n),c=i.disabled||r,u=D(t,i.onTriggerChange),d=ln(n),l=s.useRef("touch"),[f,v,m]=cs(h=>{const g=d().filter(w=>!w.disabled),y=ls(g,h,g.find(w=>w.value===i.value));y!==void 0&&i.onValueChange(y.value)}),x=h=>{c||(i.onOpenChange(!0),m()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return(0,p.jsx)(xt,{asChild:!0,...a,children:(0,p.jsx)(T.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":is(i.value)?"":void 0,...o,ref:u,onClick:S(o.onClick,h=>{h.currentTarget.focus(),l.current!=="mouse"&&x(h)}),onPointerDown:S(o.onPointerDown,h=>{l.current=h.pointerType;const g=h.target;g.hasPointerCapture(h.pointerId)&&g.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(x(h),h.preventDefault())}),onKeyDown:S(o.onKeyDown,h=>{const g=f.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&v(h.key),!(g&&h.key===" ")&&Yd.includes(h.key)&&(x(),h.preventDefault())})})})});Ba.displayName=$a;var Wa="SelectValue",Ha=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...c}=e,u=Ne(Wa,n),{onValueNodeHasChildrenChange:d}=u,l=a!==void 0,f=D(t,u.onValueNodeChange);return Y(()=>{d(l)},[d,l]),(0,p.jsx)(T.span,{...c,ref:f,style:{pointerEvents:"none"},children:is(u.value)?(0,p.jsx)(p.Fragment,{children:i}):a})});Ha.displayName=Wa;var ef="SelectIcon",Ga=s.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return(0,p.jsx)(T.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Ga.displayName=ef;var tf="SelectPortal",Ua=e=>(0,p.jsx)(Je,{asChild:!0,...e});Ua.displayName=tf;var We="SelectContent",Va=s.forwardRef((e,t)=>{const n=Ne(We,e.__scopeSelect),[r,o]=s.useState();if(Y(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?pt.createPortal((0,p.jsx)(Ka,{scope:e.__scopeSelect,children:(0,p.jsx)(cn.Slot,{scope:e.__scopeSelect,children:(0,p.jsx)("div",{children:e.children})})}),a):null}return(0,p.jsx)(za,{...e,ref:t})});Va.displayName=We;var de=10,[Ka,Ie]=rt(We),nf="SelectContentImpl",rf=ke("SelectContent.RemoveScroll"),za=s.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:c,sideOffset:u,align:d,alignOffset:l,arrowPadding:f,collisionBoundary:v,collisionPadding:m,sticky:x,hideWhenDetached:h,avoidCollisions:g,...y}=e,w=Ne(We,n),[C,b]=s.useState(null),[P,R]=s.useState(null),E=D(t,N=>b(N)),[M,A]=s.useState(null),[O,j]=s.useState(null),L=ln(n),[W,F]=s.useState(!1),H=s.useRef(!1);s.useEffect(()=>{if(C)return qt(C)},[C]),Yt();const k=s.useCallback(N=>{const[V,...G]=L().map(ne=>ne.ref.current),[B]=G.slice(-1),Z=document.activeElement;for(const ne of N)if(ne===Z||(ne?.scrollIntoView({block:"nearest"}),ne===V&&P&&(P.scrollTop=0),ne===B&&P&&(P.scrollTop=P.scrollHeight),ne?.focus(),document.activeElement!==Z))return},[L,P]),$=s.useCallback(()=>k([M,C]),[k,M,C]);s.useEffect(()=>{W&&$()},[W,$]);const{onOpenChange:I,triggerPointerDownPosRef:_}=w;s.useEffect(()=>{if(C){let N={x:0,y:0};const V=B=>{N={x:Math.abs(Math.round(B.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(B.pageY)-(_.current?.y??0))}},G=B=>{N.x<=10&&N.y<=10?B.preventDefault():C.contains(B.target)||I(!1),document.removeEventListener("pointermove",V),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",G,{capture:!0})}}},[C,I,_]),s.useEffect(()=>{const N=()=>I(!1);return window.addEventListener("blur",N),window.addEventListener("resize",N),()=>{window.removeEventListener("blur",N),window.removeEventListener("resize",N)}},[I]);const[U,te]=cs(N=>{const V=L().filter(B=>!B.disabled),G=ls(V,N,V.find(B=>B.ref.current===document.activeElement));G&&setTimeout(()=>G.ref.current.focus())}),ue=s.useCallback((N,V,G)=>{const B=!H.current&&!G;(w.value!==void 0&&w.value===V||B)&&(A(N),B&&(H.current=!0))},[w.value]),Ce=s.useCallback(()=>C?.focus(),[C]),oe=s.useCallback((N,V,G)=>{const B=!H.current&&!G;(w.value!==void 0&&w.value===V||B)&&j(N)},[w.value]),ae=r==="popper"?Bn:Ya,X=ae===Bn?{side:c,sideOffset:u,align:d,alignOffset:l,arrowPadding:f,collisionBoundary:v,collisionPadding:m,sticky:x,hideWhenDetached:h,avoidCollisions:g}:{};return(0,p.jsx)(Ka,{scope:n,content:C,viewport:P,onViewportChange:R,itemRefCallback:ue,selectedItem:M,onItemLeave:Ce,itemTextRefCallback:oe,focusSelectedItem:$,selectedItemText:O,position:r,isPositioned:W,searchRef:U,children:(0,p.jsx)(ht,{as:rf,allowPinchZoom:!0,children:(0,p.jsx)(vt,{asChild:!0,trapped:w.open,onMountAutoFocus:N=>{N.preventDefault()},onUnmountAutoFocus:S(o,N=>{w.trigger?.focus({preventScroll:!0}),N.preventDefault()}),children:(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:N=>N.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:(0,p.jsx)(ae,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:N=>N.preventDefault(),...y,...X,onPlaced:()=>F(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:S(y.onKeyDown,N=>{const V=N.ctrlKey||N.altKey||N.metaKey;if(N.key==="Tab"&&N.preventDefault(),!V&&N.key.length===1&&te(N.key),["ArrowUp","ArrowDown","Home","End"].includes(N.key)){let G=L().filter(B=>!B.disabled).map(B=>B.ref.current);if(["ArrowUp","End"].includes(N.key)&&(G=G.slice().reverse()),["ArrowUp","ArrowDown"].includes(N.key)){const B=N.target,Z=G.indexOf(B);G=G.slice(Z+1)}setTimeout(()=>k(G)),N.preventDefault()}})})})})})})});za.displayName=nf;var of="SelectItemAlignedPosition",Ya=s.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Ne(We,n),i=Ie(We,n),[c,u]=s.useState(null),[d,l]=s.useState(null),f=D(t,E=>l(E)),v=ln(n),m=s.useRef(!1),x=s.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:y,focusSelectedItem:w}=i,C=s.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&d&&h&&g&&y){const E=a.trigger.getBoundingClientRect(),M=d.getBoundingClientRect(),A=a.valueNode.getBoundingClientRect(),O=y.getBoundingClientRect();if(a.dir!=="rtl"){const B=O.left-M.left,Z=A.left-B,ne=E.left-Z,he=E.width+ne,yn=Math.max(he,M.width),Cn=window.innerWidth-de,bn=$n(Z,[de,Math.max(de,Cn-yn)]);c.style.minWidth=he+"px",c.style.left=bn+"px"}else{const B=M.right-O.right,Z=window.innerWidth-A.right-B,ne=window.innerWidth-E.right-Z,he=E.width+ne,yn=Math.max(he,M.width),Cn=window.innerWidth-de,bn=$n(Z,[de,Math.max(de,Cn-yn)]);c.style.minWidth=he+"px",c.style.right=bn+"px"}const j=v(),L=window.innerHeight-de*2,W=h.scrollHeight,F=window.getComputedStyle(d),H=parseInt(F.borderTopWidth,10),k=parseInt(F.paddingTop,10),$=parseInt(F.borderBottomWidth,10),I=parseInt(F.paddingBottom,10),_=H+k+W+I+$,U=Math.min(g.offsetHeight*5,_),te=window.getComputedStyle(h),ue=parseInt(te.paddingTop,10),Ce=parseInt(te.paddingBottom,10),oe=E.top+E.height/2-de,ae=L-oe,X=g.offsetHeight/2,N=g.offsetTop+X,V=H+k+N,G=_-V;if(V<=oe){const B=j.length>0&&g===j[j.length-1].ref.current;c.style.bottom="0px";const Z=d.clientHeight-h.offsetTop-h.offsetHeight,ne=V+Math.max(ae,X+(B?Ce:0)+Z+$);c.style.height=ne+"px"}else{const B=j.length>0&&g===j[0].ref.current;c.style.top="0px";const Z=Math.max(oe,H+h.offsetTop+(B?ue:0)+X)+G;c.style.height=Z+"px",h.scrollTop=V-oe+h.offsetTop}c.style.margin=`${de}px 0`,c.style.minHeight=U+"px",c.style.maxHeight=L+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[v,a.trigger,a.valueNode,c,d,h,g,y,a.dir,r]);Y(()=>C(),[C]);const[b,P]=s.useState();Y(()=>{d&&P(window.getComputedStyle(d).zIndex)},[d]);const R=s.useCallback(E=>{E&&x.current===!0&&(C(),w?.(),x.current=!1)},[C,w]);return(0,p.jsx)(sf,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:R,children:(0,p.jsx)("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:b},children:(0,p.jsx)(T.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Ya.displayName=of;var af="SelectPopperPosition",Bn=s.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=de,...a}=e,i=un(n);return(0,p.jsx)(nn,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Bn.displayName=af;var[sf,pr]=rt(We,{}),Wn="SelectViewport",Xa=s.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Ie(Wn,n),i=pr(Wn,n),c=D(t,a.onViewportChange),u=s.useRef(0);return(0,p.jsxs)(p.Fragment,{children:[(0,p.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,p.jsx)(cn.Slot,{scope:n,children:(0,p.jsx)(T.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:S(o.onScroll,d=>{const l=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:v}=i;if(v?.current&&f){const m=Math.abs(u.current-l.scrollTop);if(m>0){const x=window.innerHeight-de*2,h=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),y=Math.max(h,g);if(y<x){const w=y+m,C=Math.min(x,w),b=w-C;f.style.height=C+"px",f.style.bottom==="0px"&&(l.scrollTop=b>0?b:0,f.style.justifyContent="flex-end")}}}u.current=l.scrollTop})})})]})});Xa.displayName=Wn;var qa="SelectGroup",[cf,lf]=rt(qa),uf=s.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=re();return(0,p.jsx)(cf,{scope:n,id:o,children:(0,p.jsx)(T.div,{role:"group","aria-labelledby":o,...r,ref:t})})});uf.displayName=qa;var Za="SelectLabel",df=s.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=lf(Za,n);return(0,p.jsx)(T.div,{id:o.id,...r,ref:t})});df.displayName=Za;var Gt="SelectItem",[ff,Qa]=rt(Gt),Ja=s.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,c=Ne(Gt,n),u=Ie(Gt,n),d=c.value===r,[l,f]=s.useState(a??""),[v,m]=s.useState(!1),x=D(t,w=>u.itemRefCallback?.(w,r,o)),h=re(),g=s.useRef("touch"),y=()=>{o||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,p.jsx)(ff,{scope:n,value:r,disabled:o,textId:h,isSelected:d,onItemTextChange:s.useCallback(w=>{f(C=>C||(w?.textContent??"").trim())},[]),children:(0,p.jsx)(cn.ItemSlot,{scope:n,value:r,disabled:o,textValue:l,children:(0,p.jsx)(T.div,{role:"option","aria-labelledby":h,"data-highlighted":v?"":void 0,"aria-selected":d&&v,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:x,onFocus:S(i.onFocus,()=>m(!0)),onBlur:S(i.onBlur,()=>m(!1)),onClick:S(i.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:S(i.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:S(i.onPointerDown,w=>{g.current=w.pointerType}),onPointerMove:S(i.onPointerMove,w=>{g.current=w.pointerType,o?u.onItemLeave?.():g.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:S(i.onPointerLeave,w=>{w.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:S(i.onKeyDown,w=>{u.searchRef?.current!==""&&w.key===" "||(Xd.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});Ja.displayName=Gt;var at="SelectItemText",es=s.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Ne(at,n),c=Ie(at,n),u=Qa(at,n),d=Jd(at,n),[l,f]=s.useState(null),v=D(t,y=>f(y),u.onItemTextChange,y=>c.itemTextRefCallback?.(y,u.value,u.disabled)),m=l?.textContent,x=s.useMemo(()=>(0,p.jsx)("option",{value:u.value,disabled:u.disabled,children:m},u.value),[u.disabled,u.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=d;return Y(()=>(h(x),()=>g(x)),[h,g,x]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(T.span,{id:u.textId,...a,ref:v}),u.isSelected&&i.valueNode&&!i.valueNodeHasChildren?pt.createPortal(a.children,i.valueNode):null]})});es.displayName=at;var ts="SelectItemIndicator",ns=s.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Qa(ts,n).isSelected?(0,p.jsx)(T.span,{"aria-hidden":!0,...r,ref:t}):null});ns.displayName=ts;var Hn="SelectScrollUpButton",rs=s.forwardRef((e,t)=>{const n=Ie(Hn,e.__scopeSelect),r=pr(Hn,e.__scopeSelect),[o,a]=s.useState(!1),i=D(t,r.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollTop>0;a(d)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?(0,p.jsx)(as,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});rs.displayName=Hn;var Gn="SelectScrollDownButton",os=s.forwardRef((e,t)=>{const n=Ie(Gn,e.__scopeSelect),r=pr(Gn,e.__scopeSelect),[o,a]=s.useState(!1),i=D(t,r.onScrollButtonChange);return Y(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=u.scrollHeight-u.clientHeight,l=Math.ceil(u.scrollTop)<d;a(l)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),o?(0,p.jsx)(as,{...e,ref:i,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});os.displayName=Gn;var as=s.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Ie("SelectScrollButton",n),i=s.useRef(null),c=ln(n),u=s.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return s.useEffect(()=>()=>u(),[u]),Y(()=>{c().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),(0,p.jsx)(T.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:S(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:S(o.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:S(o.onPointerLeave,()=>{u()})})}),pf="SelectSeparator",vf=s.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return(0,p.jsx)(T.div,{"aria-hidden":!0,...r,ref:t})});vf.displayName=pf;var Un="SelectArrow",hf=s.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=un(n),a=Ne(Un,n),i=Ie(Un,n);return a.open&&i.position==="popper"?(0,p.jsx)(rn,{...o,...r,ref:t}):null});hf.displayName=Un;var mf="SelectBubbleInput",ss=s.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=s.useRef(null),a=D(r,o),i=fr(t);return s.useEffect(()=>{const c=o.current;if(!c)return;const u=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(u,"value").set;if(i!==t&&d){const l=new Event("change",{bubbles:!0});d.call(c,t),c.dispatchEvent(l)}},[i,t]),(0,p.jsx)(T.select,{...n,style:{...La,...n.style},ref:a,defaultValue:t})});ss.displayName=mf;function is(e){return e===""||e===void 0}function cs(e){const t=K(e),n=s.useRef(""),r=s.useRef(0),o=s.useCallback(i=>{const c=n.current+i;t(c),(function u(d){n.current=d,window.clearTimeout(r.current),d!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(c)},[t]),a=s.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return s.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function ls(e,t,n){const r=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=gf(e,Math.max(o,0));r.length===1&&(a=a.filter(c=>c!==n));const i=a.find(c=>c.textValue.toLowerCase().startsWith(r.toLowerCase()));return i!==n?i:void 0}function gf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var th=Fa,nh=Ba,rh=Ha,oh=Ga,ah=Ua,sh=Va,ih=Xa,ch=Ja,lh=es,uh=ns,dh=rs,fh=os,xf="Label",us=s.forwardRef((e,t)=>(0,p.jsx)(Ko.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));us.displayName=xf;var ph=us,[dn,vh]=q("Tooltip",[Me]),fn=Me(),ds="TooltipProvider",wf=700,Vn="tooltip.open",[yf,vr]=dn(ds),fs=e=>{const{__scopeTooltip:t,delayDuration:n=wf,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=s.useRef(!0),c=s.useRef(!1),u=s.useRef(0);return s.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),(0,p.jsx)(yf,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:s.useCallback(()=>{window.clearTimeout(u.current),i.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:s.useCallback(d=>{c.current=d},[]),disableHoverableContent:o,children:a})};fs.displayName=ds;var lt="Tooltip",[Cf,yt]=dn(lt),ps=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:c}=e,u=vr(lt,e.__scopeTooltip),d=fn(t),[l,f]=s.useState(null),v=re(),m=s.useRef(0),x=i??u.disableHoverableContent,h=c??u.delayDuration,g=s.useRef(!1),[y,w]=Q({prop:r,defaultProp:o??!1,onChange:E=>{E?(u.onOpen(),document.dispatchEvent(new CustomEvent(Vn))):u.onClose(),a?.(E)},caller:lt}),C=s.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),b=s.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,w(!0)},[w]),P=s.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),R=s.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,w(!0),m.current=0},h)},[h,w]);return s.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),(0,p.jsx)(gt,{...d,children:(0,p.jsx)(Cf,{scope:t,contentId:v,open:y,stateAttribute:C,trigger:l,onTriggerChange:f,onTriggerEnter:s.useCallback(()=>{u.isOpenDelayedRef.current?R():b()},[u.isOpenDelayedRef,R,b]),onTriggerLeave:s.useCallback(()=>{x?P():(window.clearTimeout(m.current),m.current=0)},[P,x]),onOpen:b,onClose:P,disableHoverableContent:x,children:n})})};ps.displayName=lt;var Kn="TooltipTrigger",vs=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=yt(Kn,n),a=vr(Kn,n),i=fn(n),c=s.useRef(null),u=D(t,c,o.onTriggerChange),d=s.useRef(!1),l=s.useRef(!1),f=s.useCallback(()=>d.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),(0,p.jsx)(xt,{asChild:!0,...i,children:(0,p.jsx)(T.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:u,onPointerMove:S(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:S(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:S(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:S(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:S(e.onBlur,o.onClose),onClick:S(e.onClick,o.onClose)})})});vs.displayName=Kn;var hr="TooltipPortal",[bf,Sf]=dn(hr,{forceMount:void 0}),hs=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,a=yt(hr,t);return(0,p.jsx)(bf,{scope:t,forceMount:n,children:(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(Je,{asChild:!0,container:o,children:r})})})};hs.displayName=hr;var Ze="TooltipContent",ms=s.forwardRef((e,t)=>{const n=Sf(Ze,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=yt(Ze,e.__scopeTooltip);return(0,p.jsx)(z,{present:r||i.open,children:i.disableHoverableContent?(0,p.jsx)(gs,{side:o,...a,ref:t}):(0,p.jsx)(Ef,{side:o,...a,ref:t})})}),Ef=s.forwardRef((e,t)=>{const n=yt(Ze,e.__scopeTooltip),r=vr(Ze,e.__scopeTooltip),o=s.useRef(null),a=D(t,o),[i,c]=s.useState(null),{trigger:u,onClose:d}=n,l=o.current,{onPointerInTransitChange:f}=r,v=s.useCallback(()=>{c(null),f(!1)},[f]),m=s.useCallback((x,h)=>{const g=x.currentTarget,y={x:x.clientX,y:x.clientY},w=Af(y,Tf(y,g.getBoundingClientRect())),C=Mf(h.getBoundingClientRect()),b=Nf([...w,...C]);c(b),f(!0)},[f]);return s.useEffect(()=>()=>v(),[v]),s.useEffect(()=>{if(u&&l){const x=g=>m(g,l),h=g=>m(g,u);return u.addEventListener("pointerleave",x),l.addEventListener("pointerleave",h),()=>{u.removeEventListener("pointerleave",x),l.removeEventListener("pointerleave",h)}}},[u,l,m,v]),s.useEffect(()=>{if(i){const x=h=>{const g=h.target,y={x:h.clientX,y:h.clientY},w=u?.contains(g)||l?.contains(g),C=!Of(y,i);w?v():C&&(v(),d())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[u,l,i,d,v]),(0,p.jsx)(gs,{...e,ref:a})}),[Rf,Pf]=dn(lt,{isInside:!1}),_f=po("TooltipContent"),gs=s.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...c}=e,u=yt(Ze,n),d=fn(n),{onClose:l}=u;return s.useEffect(()=>(document.addEventListener(Vn,l),()=>document.removeEventListener(Vn,l)),[l]),s.useEffect(()=>{if(u.trigger){const f=v=>{v.target?.contains(u.trigger)&&l()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,l]),(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:l,children:(0,p.jsxs)(nn,{"data-state":u.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,p.jsx)(_f,{children:r}),(0,p.jsx)(Rf,{scope:n,isInside:!0,children:(0,p.jsx)(zd,{id:u.contentId,role:"tooltip",children:o||r})})]})})});ms.displayName=Ze;var xs="TooltipArrow",ws=s.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=fn(n);return Pf(xs,n).isInside?null:(0,p.jsx)(rn,{...o,...r,ref:t})});ws.displayName=xs;function Tf(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Af(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function Mf(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function Of(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,l=c.y,f=u.x,v=u.y;l>r!=v>r&&n<(f-d)*(r-l)/(v-l)+d&&(o=!o)}return o}function Nf(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),If(t)}function If(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var hh=fs,mh=ps,gh=vs,xh=hs,wh=ms,yh=ws,pn="Checkbox",[Df,Ch]=q(pn),[jf,mr]=Df(pn);function Lf(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:i,name:c,onCheckedChange:u,required:d,value:l="on",internal_do_not_use_render:f}=e,[v,m]=Q({prop:n,defaultProp:o??!1,onChange:u,caller:pn}),[x,h]=s.useState(null),[g,y]=s.useState(null),w=s.useRef(!1),C=x?!!i||!!x.closest("form"):!0,b={checked:v,disabled:a,setChecked:m,control:x,setControl:h,name:c,form:i,value:l,hasConsumerStoppedPropagationRef:w,required:d,defaultChecked:_e(o)?!1:o,isFormControl:C,bubbleInput:g,setBubbleInput:y};return(0,p.jsx)(jf,{scope:t,...b,children:$f(f)?f(b):r})}var ys="CheckboxTrigger",Cs=s.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:i,disabled:c,checked:u,required:d,setControl:l,setChecked:f,hasConsumerStoppedPropagationRef:v,isFormControl:m,bubbleInput:x}=mr(ys,e),h=D(o,l),g=s.useRef(u);return s.useEffect(()=>{const y=a?.form;if(y){const w=()=>f(g.current);return y.addEventListener("reset",w),()=>y.removeEventListener("reset",w)}},[a,f]),(0,p.jsx)(T.button,{type:"button",role:"checkbox","aria-checked":_e(u)?"mixed":u,"aria-required":d,"data-state":Rs(u),"data-disabled":c?"":void 0,disabled:c,value:i,...r,ref:h,onKeyDown:S(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:S(n,y=>{f(w=>_e(w)?!0:!w),x&&m&&(v.current=y.isPropagationStopped(),v.current||y.stopPropagation())})})});Cs.displayName=ys;var kf=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:c,value:u,onCheckedChange:d,form:l,...f}=e;return(0,p.jsx)(Lf,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:c,required:i,onCheckedChange:d,name:r,form:l,value:u,internal_do_not_use_render:({isFormControl:v})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Cs,{...f,ref:t,__scopeCheckbox:n}),v&&(0,p.jsx)(Es,{__scopeCheckbox:n})]})})});kf.displayName=pn;var bs="CheckboxIndicator",Ff=s.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=mr(bs,n);return(0,p.jsx)(z,{present:r||_e(a.checked)||a.checked===!0,children:(0,p.jsx)(T.span,{"data-state":Rs(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Ff.displayName=bs;var Ss="CheckboxBubbleInput",Es=s.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:c,disabled:u,name:d,value:l,form:f,bubbleInput:v,setBubbleInput:m}=mr(Ss,e),x=D(n,m),h=fr(a),g=or(r);s.useEffect(()=>{const w=v;if(!w)return;const C=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(C,"checked").set,P=!o.current;if(h!==a&&b){const R=new Event("click",{bubbles:P});w.indeterminate=_e(a),b.call(w,_e(a)?!1:a),w.dispatchEvent(R)}},[v,h,a,o]);const y=s.useRef(_e(a)?!1:a);return(0,p.jsx)(T.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:c,disabled:u,name:d,value:l,form:f,...t,tabIndex:-1,ref:x,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Es.displayName=Ss;function $f(e){return typeof e=="function"}function _e(e){return e==="indeterminate"}function Rs(e){return _e(e)?"indeterminate":e?"checked":"unchecked"}var In="rovingFocusGroup.onEntryFocus",Bf={bubbles:!1,cancelable:!0},Ct="RovingFocusGroup",[zn,Ps,Wf]=dr(Ct),[Hf,ot]=q(Ct,[Wf]),[Gf,Uf]=Hf(Ct),_s=s.forwardRef((e,t)=>(0,p.jsx)(zn.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(zn.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(Vf,{...e,ref:t})})}));_s.displayName=Ct;var Vf=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:l=!1,...f}=e,v=s.useRef(null),m=D(t,v),x=nt(a),[h,g]=Q({prop:i,defaultProp:c??null,onChange:u,caller:Ct}),[y,w]=s.useState(!1),C=K(d),b=Ps(n),P=s.useRef(!1),[R,E]=s.useState(0);return s.useEffect(()=>{const M=v.current;if(M)return M.addEventListener(In,C),()=>M.removeEventListener(In,C)},[C]),(0,p.jsx)(Gf,{scope:n,orientation:r,dir:x,loop:o,currentTabStopId:h,onItemFocus:s.useCallback(M=>g(M),[g]),onItemShiftTab:s.useCallback(()=>w(!0),[]),onFocusableItemAdd:s.useCallback(()=>E(M=>M+1),[]),onFocusableItemRemove:s.useCallback(()=>E(M=>M-1),[]),children:(0,p.jsx)(T.div,{tabIndex:y||R===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:S(e.onMouseDown,()=>{P.current=!0}),onFocus:S(e.onFocus,M=>{const A=!P.current;if(M.target===M.currentTarget&&A&&!y){const O=new CustomEvent(In,Bf);if(M.currentTarget.dispatchEvent(O),!O.defaultPrevented){const j=b().filter(L=>L.focusable);Ms([j.find(L=>L.active),j.find(L=>L.id===h),...j].filter(Boolean).map(L=>L.ref.current),l)}}P.current=!1}),onBlur:S(e.onBlur,()=>w(!1))})})}),Ts="RovingFocusGroupItem",As=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...c}=e,u=re(),d=a||u,l=Uf(Ts,n),f=l.currentTabStopId===d,v=Ps(n),{onFocusableItemAdd:m,onFocusableItemRemove:x,currentTabStopId:h}=l;return s.useEffect(()=>{if(r)return m(),()=>x()},[r,m,x]),(0,p.jsx)(zn.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:(0,p.jsx)(T.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...c,ref:t,onMouseDown:S(e.onMouseDown,g=>{r?l.onItemFocus(d):g.preventDefault()}),onFocus:S(e.onFocus,()=>l.onItemFocus(d)),onKeyDown:S(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){l.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=Yf(g,l.orientation,l.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=v().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")w.reverse();else if(y==="prev"||y==="next"){y==="prev"&&w.reverse();const C=w.indexOf(g.currentTarget);w=l.loop?Xf(w,C+1):w.slice(C+1)}setTimeout(()=>Ms(w))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:h!=null}):i})})});As.displayName=Ts;var Kf={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zf(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Yf(e,t,n){const r=zf(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Kf[r]}function Ms(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Xf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gr=_s,xr=As,Yn=["Enter"," "],qf=["ArrowDown","PageUp","Home"],Os=["ArrowUp","PageDown","End"],Zf=[...qf,...Os],Qf={ltr:[...Yn,"ArrowRight"],rtl:[...Yn,"ArrowLeft"]},Jf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},bt="Menu",[ut,ep,tp]=dr(bt),[He,vn]=q(bt,[tp,Me,ot]),St=Me(),Ns=ot(),[Is,De]=He(bt),[np,Et]=He(bt),Ds=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,c=St(t),[u,d]=s.useState(null),l=s.useRef(!1),f=K(a),v=nt(o);return s.useEffect(()=>{const m=()=>{l.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>l.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),(0,p.jsx)(gt,{...c,children:(0,p.jsx)(Is,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:d,children:(0,p.jsx)(np,{scope:t,onClose:s.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:l,dir:v,modal:i,children:r})})})};Ds.displayName=bt;var rp="MenuAnchor",wr=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=St(n);return(0,p.jsx)(xt,{...o,...r,ref:t})});wr.displayName=rp;var yr="MenuPortal",[op,js]=He(yr,{forceMount:void 0}),Ls=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=De(yr,t);return(0,p.jsx)(op,{scope:t,forceMount:n,children:(0,p.jsx)(z,{present:n||a.open,children:(0,p.jsx)(Je,{asChild:!0,container:o,children:r})})})};Ls.displayName=yr;var ce="MenuContent",[ap,Cr]=He(ce),ks=s.forwardRef((e,t)=>{const n=js(ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=De(ce,e.__scopeMenu),i=Et(ce,e.__scopeMenu);return(0,p.jsx)(ut.Provider,{scope:e.__scopeMenu,children:(0,p.jsx)(z,{present:r||a.open,children:(0,p.jsx)(ut.Slot,{scope:e.__scopeMenu,children:i.modal?(0,p.jsx)(sp,{...o,ref:t}):(0,p.jsx)(ip,{...o,ref:t})})})})}),sp=s.forwardRef((e,t)=>{const n=De(ce,e.__scopeMenu),r=s.useRef(null),o=D(t,r);return s.useEffect(()=>{const a=r.current;if(a)return qt(a)},[]),(0,p.jsx)(br,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:S(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ip=s.forwardRef((e,t)=>{const n=De(ce,e.__scopeMenu);return(0,p.jsx)(br,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),cp=ke("MenuContent.ScrollLock"),br=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:v,onDismiss:m,disableOutsideScroll:x,...h}=e,g=De(ce,n),y=Et(ce,n),w=St(n),C=Ns(n),b=ep(n),[P,R]=s.useState(null),E=s.useRef(null),M=D(t,E,g.onContentChange),A=s.useRef(0),O=s.useRef(""),j=s.useRef(0),L=s.useRef(null),W=s.useRef("right"),F=s.useRef(0),H=x?ht:s.Fragment,k=x?{as:cp,allowPinchZoom:!0}:void 0,$=_=>{const U=O.current+_,te=b().filter(X=>!X.disabled),ue=document.activeElement,Ce=te.find(X=>X.ref.current===ue)?.textValue,oe=yp(te.map(X=>X.textValue),U,Ce),ae=te.find(X=>X.textValue===oe)?.ref.current;(function X(N){O.current=N,window.clearTimeout(A.current),N!==""&&(A.current=window.setTimeout(()=>X(""),1e3))})(U),ae&&setTimeout(()=>ae.focus())};s.useEffect(()=>()=>window.clearTimeout(A.current),[]),Yt();const I=s.useCallback(_=>W.current===L.current?.side&&bp(_,L.current?.area),[]);return(0,p.jsx)(ap,{scope:n,searchRef:O,onItemEnter:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),onItemLeave:s.useCallback(_=>{I(_)||(E.current?.focus(),R(null))},[I]),onTriggerLeave:s.useCallback(_=>{I(_)&&_.preventDefault()},[I]),pointerGraceTimerRef:j,onPointerGraceIntentChange:s.useCallback(_=>{L.current=_},[]),children:(0,p.jsx)(H,{...k,children:(0,p.jsx)(vt,{asChild:!0,trapped:o,onMountAutoFocus:S(a,_=>{_.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,p.jsx)(Qe,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:v,onDismiss:m,children:(0,p.jsx)(gr,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:R,onEntryFocus:S(u,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,p.jsx)(nn,{role:"menu","aria-orientation":"vertical","data-state":ei(g.open),"data-radix-menu-content":"",dir:y.dir,...w,...h,ref:M,style:{outline:"none",...h.style},onKeyDown:S(h.onKeyDown,_=>{const U=_.target.closest("[data-radix-menu-content]")===_.currentTarget,te=_.ctrlKey||_.altKey||_.metaKey,ue=_.key.length===1;U&&(_.key==="Tab"&&_.preventDefault(),!te&&ue&&$(_.key));const Ce=E.current;if(_.target!==Ce||!Zf.includes(_.key))return;_.preventDefault();const oe=b().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);Os.includes(_.key)&&oe.reverse(),xp(oe)}),onBlur:S(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:S(e.onPointerMove,dt(_=>{const U=_.target,te=F.current!==_.clientX;if(_.currentTarget.contains(U)&&te){const ue=_.clientX>F.current?"right":"left";W.current=ue,F.current=_.clientX}}))})})})})})})});ks.displayName=ce;var lp="MenuGroup",Sr=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,p.jsx)(T.div,{role:"group",...r,ref:t})});Sr.displayName=lp;var up="MenuLabel",Fs=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,p.jsx)(T.div,{...r,ref:t})});Fs.displayName=up;var Ut="MenuItem",so="menu.itemSelect",hn=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=s.useRef(null),i=Et(Ut,e.__scopeMenu),c=Cr(Ut,e.__scopeMenu),u=D(t,a),d=s.useRef(!1),l=()=>{const f=a.current;if(!n&&f){const v=new CustomEvent(so,{bubbles:!0,cancelable:!0});f.addEventListener(so,m=>r?.(m),{once:!0}),vo(f,v),v.defaultPrevented?d.current=!1:i.onClose()}};return(0,p.jsx)($s,{...o,ref:u,disabled:n,onClick:S(e.onClick,l),onPointerDown:f=>{e.onPointerDown?.(f),d.current=!0},onPointerUp:S(e.onPointerUp,f=>{d.current||f.currentTarget?.click()}),onKeyDown:S(e.onKeyDown,f=>{const v=c.searchRef.current!=="";n||v&&f.key===" "||Yn.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});hn.displayName=Ut;var $s=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Cr(Ut,n),c=Ns(n),u=s.useRef(null),d=D(t,u),[l,f]=s.useState(!1),[v,m]=s.useState("");return s.useEffect(()=>{const x=u.current;x&&m((x.textContent??"").trim())},[a.children]),(0,p.jsx)(ut.ItemSlot,{scope:n,disabled:r,textValue:o??v,children:(0,p.jsx)(xr,{asChild:!0,...c,focusable:!r,children:(0,p.jsx)(T.div,{role:"menuitem","data-highlighted":l?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:S(e.onPointerMove,dt(x=>{r?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:S(e.onPointerLeave,dt(x=>i.onItemLeave(x))),onFocus:S(e.onFocus,()=>f(!0)),onBlur:S(e.onBlur,()=>f(!1))})})})}),dp="MenuCheckboxItem",Bs=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return(0,p.jsx)(Vs,{scope:e.__scopeMenu,checked:n,children:(0,p.jsx)(hn,{role:"menuitemcheckbox","aria-checked":Vt(n)?"mixed":n,...o,ref:t,"data-state":Pr(n),onSelect:S(o.onSelect,()=>r?.(Vt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Bs.displayName=dp;var Ws="MenuRadioGroup",[fp,pp]=He(Ws,{value:void 0,onValueChange:()=>{}}),Hs=s.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=K(r);return(0,p.jsx)(fp,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,p.jsx)(Sr,{...o,ref:t})})});Hs.displayName=Ws;var Gs="MenuRadioItem",Us=s.forwardRef((e,t)=>{const{value:n,...r}=e,o=pp(Gs,e.__scopeMenu),a=n===o.value;return(0,p.jsx)(Vs,{scope:e.__scopeMenu,checked:a,children:(0,p.jsx)(hn,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Pr(a),onSelect:S(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Us.displayName=Gs;var Er="MenuItemIndicator",[Vs,vp]=He(Er,{checked:!1}),Ks=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=vp(Er,n);return(0,p.jsx)(z,{present:r||Vt(a.checked)||a.checked===!0,children:(0,p.jsx)(T.span,{...o,ref:t,"data-state":Pr(a.checked)})})});Ks.displayName=Er;var hp="MenuSeparator",zs=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return(0,p.jsx)(T.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});zs.displayName=hp;var mp="MenuArrow",Ys=s.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=St(n);return(0,p.jsx)(rn,{...o,...r,ref:t})});Ys.displayName=mp;var Rr="MenuSub",[gp,Xs]=He(Rr),qs=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=De(Rr,t),i=St(t),[c,u]=s.useState(null),[d,l]=s.useState(null),f=K(o);return s.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),(0,p.jsx)(gt,{...i,children:(0,p.jsx)(Is,{scope:t,open:r,onOpenChange:f,content:d,onContentChange:l,children:(0,p.jsx)(gp,{scope:t,contentId:re(),triggerId:re(),trigger:c,onTriggerChange:u,children:n})})})};qs.displayName=Rr;var st="MenuSubTrigger",Zs=s.forwardRef((e,t)=>{const n=De(st,e.__scopeMenu),r=Et(st,e.__scopeMenu),o=Xs(st,e.__scopeMenu),a=Cr(st,e.__scopeMenu),i=s.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=a,d={__scopeMenu:e.__scopeMenu},l=s.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return s.useEffect(()=>l,[l]),s.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),u(null)}},[c,u]),(0,p.jsx)(wr,{asChild:!0,...d,children:(0,p.jsx)($s,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":ei(n.open),...e,ref:ft(t,o.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:S(e.onPointerMove,dt(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),l()},100))})),onPointerLeave:S(e.onPointerLeave,dt(f=>{l();const v=n.content?.getBoundingClientRect();if(v){const m=n.content?.dataset.side,x=m==="right",h=x?-5:5,g=v[x?"left":"right"],y=v[x?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+h,y:f.clientY},{x:g,y:v.top},{x:y,y:v.top},{x:y,y:v.bottom},{x:g,y:v.bottom}],side:m}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:S(e.onKeyDown,f=>{const v=a.searchRef.current!=="";e.disabled||v&&f.key===" "||Qf[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});Zs.displayName=st;var Qs="MenuSubContent",Js=s.forwardRef((e,t)=>{const n=js(ce,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=De(ce,e.__scopeMenu),i=Et(ce,e.__scopeMenu),c=Xs(Qs,e.__scopeMenu),u=s.useRef(null),d=D(t,u);return(0,p.jsx)(ut.Provider,{scope:e.__scopeMenu,children:(0,p.jsx)(z,{present:r||a.open,children:(0,p.jsx)(ut.Slot,{scope:e.__scopeMenu,children:(0,p.jsx)(br,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:d,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:l=>{i.isUsingKeyboardRef.current&&u.current?.focus(),l.preventDefault()},onCloseAutoFocus:l=>l.preventDefault(),onFocusOutside:S(e.onFocusOutside,l=>{l.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:S(e.onEscapeKeyDown,l=>{i.onClose(),l.preventDefault()}),onKeyDown:S(e.onKeyDown,l=>{const f=l.currentTarget.contains(l.target),v=Jf[i.dir].includes(l.key);f&&v&&(a.onOpenChange(!1),c.trigger?.focus(),l.preventDefault())})})})})})});Js.displayName=Qs;function ei(e){return e?"open":"closed"}function Vt(e){return e==="indeterminate"}function Pr(e){return Vt(e)?"indeterminate":e?"checked":"unchecked"}function xp(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function yp(e,t,n){const r=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=wp(e,Math.max(o,0));r.length===1&&(a=a.filter(c=>c!==n));const i=a.find(c=>c.toLowerCase().startsWith(r.toLowerCase()));return i!==n?i:void 0}function Cp(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const c=t[a],u=t[i],d=c.x,l=c.y,f=u.x,v=u.y;l>r!=v>r&&n<(f-d)*(r-l)/(v-l)+d&&(o=!o)}return o}function bp(e,t){return t?Cp({x:e.clientX,y:e.clientY},t):!1}function dt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ti=Ds,ni=wr,ri=Ls,oi=ks,ai=Sr,si=Fs,ii=hn,ci=Bs,li=Hs,ui=Us,di=Ks,fi=zs,pi=Ys,vi=qs,hi=Zs,mi=Js,mn="DropdownMenu",[Sp,bh]=q(mn,[vn]),J=vn(),[Ep,gi]=Sp(mn),xi=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,u=J(t),d=s.useRef(null),[l,f]=Q({prop:o,defaultProp:a??!1,onChange:i,caller:mn});return(0,p.jsx)(Ep,{scope:t,triggerId:re(),triggerRef:d,contentId:re(),open:l,onOpenChange:f,onOpenToggle:s.useCallback(()=>f(v=>!v),[f]),modal:c,children:(0,p.jsx)(ti,{...u,open:l,onOpenChange:f,dir:r,modal:c,children:n})})};xi.displayName=mn;var wi="DropdownMenuTrigger",yi=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=gi(wi,n),i=J(n);return(0,p.jsx)(ni,{asChild:!0,...i,children:(0,p.jsx)(T.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:ft(t,a.triggerRef),onPointerDown:S(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(a.onOpenToggle(),a.open||c.preventDefault())}),onKeyDown:S(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&a.onOpenToggle(),c.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});yi.displayName=wi;var Rp="DropdownMenuPortal",Ci=e=>{const{__scopeDropdownMenu:t,...n}=e,r=J(t);return(0,p.jsx)(ri,{...r,...n})};Ci.displayName=Rp;var bi="DropdownMenuContent",Si=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gi(bi,n),a=J(n),i=s.useRef(!1);return(0,p.jsx)(oi,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:S(e.onCloseAutoFocus,c=>{i.current||o.triggerRef.current?.focus(),i.current=!1,c.preventDefault()}),onInteractOutside:S(e.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,l=u.button===2||d;(!o.modal||l)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Si.displayName=bi;var Pp="DropdownMenuGroup",Ei=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ai,{...o,...r,ref:t})});Ei.displayName=Pp;var _p="DropdownMenuLabel",Tp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(si,{...o,...r,ref:t})});Tp.displayName=_p;var Ap="DropdownMenuItem",Ri=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ii,{...o,...r,ref:t})});Ri.displayName=Ap;var Mp="DropdownMenuCheckboxItem",Op=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ci,{...o,...r,ref:t})});Op.displayName=Mp;var Np="DropdownMenuRadioGroup",Ip=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(li,{...o,...r,ref:t})});Ip.displayName=Np;var Dp="DropdownMenuRadioItem",jp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(ui,{...o,...r,ref:t})});jp.displayName=Dp;var Lp="DropdownMenuItemIndicator",kp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(di,{...o,...r,ref:t})});kp.displayName=Lp;var Fp="DropdownMenuSeparator",Pi=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(fi,{...o,...r,ref:t})});Pi.displayName=Fp;var $p="DropdownMenuArrow",Bp=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(pi,{...o,...r,ref:t})});Bp.displayName=$p;var Wp=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=J(t),[c,u]=Q({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return(0,p.jsx)(vi,{...i,open:c,onOpenChange:u,children:n})},Hp="DropdownMenuSubTrigger",_i=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(hi,{...o,...r,ref:t})});_i.displayName=Hp;var Gp="DropdownMenuSubContent",Ti=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=J(n);return(0,p.jsx)(mi,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ti.displayName=Gp;var Sh=xi,Eh=yi,Rh=Ci,Ph=Si,_h=Ei,Th=Ri,Ah=Pi,Mh=Wp,Oh=_i,Nh=Ti,gn="Switch",[Up,Ih]=q(gn),[Vp,Kp]=Up(gn),Ai=s.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:c,value:u="on",onCheckedChange:d,form:l,...f}=e,[v,m]=s.useState(null),x=D(t,C=>m(C)),h=s.useRef(!1),g=v?l||!!v.closest("form"):!0,[y,w]=Q({prop:o,defaultProp:a??!1,onChange:d,caller:gn});return(0,p.jsxs)(Vp,{scope:n,checked:y,disabled:c,children:[(0,p.jsx)(T.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":Ii(y),"data-disabled":c?"":void 0,disabled:c,value:u,...f,ref:x,onClick:S(e.onClick,C=>{w(b=>!b),g&&(h.current=C.isPropagationStopped(),h.current||C.stopPropagation())})}),g&&(0,p.jsx)(Ni,{control:v,bubbles:!h.current,name:r,value:u,checked:y,required:i,disabled:c,form:l,style:{transform:"translateX(-100%)"}})]})});Ai.displayName=gn;var Mi="SwitchThumb",Oi=s.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Kp(Mi,n);return(0,p.jsx)(T.span,{"data-state":Ii(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Oi.displayName=Mi;var zp="SwitchBubbleInput",Ni=s.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=s.useRef(null),c=D(i,a),u=fr(n),d=or(t);return s.useEffect(()=>{const l=i.current;if(!l)return;const f=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(f,"checked").set;if(u!==n&&v){const m=new Event("click",{bubbles:r});v.call(l,n),l.dispatchEvent(m)}},[u,n,r]),(0,p.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:c,style:{...o.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ni.displayName=zp;function Ii(e){return e?"checked":"unchecked"}var Dh=Ai,jh=Oi,xn="Tabs",[Yp,Lh]=q(xn,[ot]),Di=ot(),[Xp,_r]=Yp(xn),ji=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:c,activationMode:u="automatic",...d}=e,l=nt(c),[f,v]=Q({prop:r,onChange:o,defaultProp:a??"",caller:xn});return(0,p.jsx)(Xp,{scope:n,baseId:re(),value:f,onValueChange:v,orientation:i,dir:l,activationMode:u,children:(0,p.jsx)(T.div,{dir:l,"data-orientation":i,...d,ref:t})})});ji.displayName=xn;var Li="TabsList",ki=s.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=_r(Li,n),i=Di(n);return(0,p.jsx)(gr,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:(0,p.jsx)(T.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});ki.displayName=Li;var Fi="TabsTrigger",$i=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=_r(Fi,n),c=Di(n),u=Hi(i.baseId,r),d=Gi(i.baseId,r),l=r===i.value;return(0,p.jsx)(xr,{asChild:!0,...c,focusable:!o,active:l,children:(0,p.jsx)(T.button,{type:"button",role:"tab","aria-selected":l,"aria-controls":d,"data-state":l?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...a,ref:t,onMouseDown:S(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:S(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:S(e.onFocus,()=>{const f=i.activationMode!=="manual";!l&&!o&&f&&i.onValueChange(r)})})})});$i.displayName=Fi;var Bi="TabsContent",Wi=s.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,c=_r(Bi,n),u=Hi(c.baseId,r),d=Gi(c.baseId,r),l=r===c.value,f=s.useRef(l);return s.useEffect(()=>{const v=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(v)},[]),(0,p.jsx)(z,{present:o||l,children:({present:v})=>(0,p.jsx)(T.div,{"data-state":l?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!v,id:d,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:v&&a})})});Wi.displayName=Bi;function Hi(e,t){return`${e}-trigger-${t}`}function Gi(e,t){return`${e}-content-${t}`}var kh=ji,Fh=ki,$h=$i,Bh=Wi,Ui="AlertDialog",[qp,Wh]=q(Ui,[_o]),Re=_o(),Vi=e=>{const{__scopeAlertDialog:t,...n}=e,r=Re(t);return(0,p.jsx)(Jl,{...r,...n,modal:!0})};Vi.displayName=Ui;var Zp="AlertDialogTrigger",Qp=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Re(n);return(0,p.jsx)(eu,{...o,...r,ref:t})});Qp.displayName=Zp;var Jp="AlertDialogPortal",Ki=e=>{const{__scopeAlertDialog:t,...n}=e,r=Re(t);return(0,p.jsx)(tu,{...r,...n})};Ki.displayName=Jp;var ev="AlertDialogOverlay",zi=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Re(n);return(0,p.jsx)(nu,{...o,...r,ref:t})});zi.displayName=ev;var ze="AlertDialogContent",[tv,nv]=qp(ze),rv=po("AlertDialogContent"),Yi=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,a=Re(n),i=s.useRef(null),c=D(t,i),u=s.useRef(null);return(0,p.jsx)(Xl,{contentName:ze,titleName:Xi,docsSlug:"alert-dialog",children:(0,p.jsx)(tv,{scope:n,cancelRef:u,children:(0,p.jsxs)(ru,{role:"alertdialog",...a,...o,ref:c,onOpenAutoFocus:S(o.onOpenAutoFocus,d=>{d.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[(0,p.jsx)(rv,{children:r}),(0,p.jsx)(av,{contentRef:i})]})})})});Yi.displayName=ze;var Xi="AlertDialogTitle",qi=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Re(n);return(0,p.jsx)(ou,{...o,...r,ref:t})});qi.displayName=Xi;var Zi="AlertDialogDescription",Qi=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Re(n);return(0,p.jsx)(au,{...o,...r,ref:t})});Qi.displayName=Zi;var ov="AlertDialogAction",Ji=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Re(n);return(0,p.jsx)(Go,{...o,...r,ref:t})});Ji.displayName=ov;var ec="AlertDialogCancel",tc=s.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=nv(ec,n),a=Re(n),i=D(t,o);return(0,p.jsx)(Go,{...a,...r,ref:i})});tc.displayName=ec;var av=({contentRef:e})=>{const t=`\`${ze}\` requires a description for the component to be accessible for screen reader users.
|
|
46
|
-
|
|
47
|
-
You can add a description to the \`${ze}\` by passing a \`${Zi}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
48
|
-
|
|
49
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ze}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
50
|
-
|
|
51
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return s.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Hh=Vi,Gh=Ki,Uh=zi,Vh=Yi,Kh=Ji,zh=tc,Yh=qi,Xh=Qi,sv="Separator",io="horizontal",iv=["horizontal","vertical"],nc=s.forwardRef((e,t)=>{const{decorative:n,orientation:r=io,...o}=e,a=cv(r)?r:io,i=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,p.jsx)(Ko.div,{"data-orientation":a,...i,...o,ref:t})});nc.displayName=sv;function cv(e){return iv.includes(e)}var qh=nc,rc="Toggle",Tr=s.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...a}=e,[i,c]=Q({prop:n,onChange:o,defaultProp:r??!1,caller:rc});return(0,p.jsx)(T.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:S(e.onClick,()=>{e.disabled||c(!i)})})});Tr.displayName=rc;var Zh=Tr,je="ToggleGroup",[oc,Qh]=q(je,[ot]),ac=ot(),Ar=s.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single")return(0,p.jsx)(lv,{...r,ref:t});if(n==="multiple")return(0,p.jsx)(uv,{...r,ref:t});throw new Error(`Missing prop \`type\` expected on \`${je}\``)});Ar.displayName=je;var[sc,ic]=oc(je),lv=s.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,c]=Q({prop:n,defaultProp:r??"",onChange:o,caller:je});return(0,p.jsx)(sc,{scope:e.__scopeToggleGroup,type:"single",value:s.useMemo(()=>i?[i]:[],[i]),onItemActivate:c,onItemDeactivate:s.useCallback(()=>c(""),[c]),children:(0,p.jsx)(cc,{...a,ref:t})})}),uv=s.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,c]=Q({prop:n,defaultProp:r??[],onChange:o,caller:je}),u=s.useCallback(l=>c((f=[])=>[...f,l]),[c]),d=s.useCallback(l=>c((f=[])=>f.filter(v=>v!==l)),[c]);return(0,p.jsx)(sc,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:d,children:(0,p.jsx)(cc,{...a,ref:t})})});Ar.displayName=je;var[dv,fv]=oc(je),cc=s.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:c=!0,...u}=e,d=ac(n),l=nt(i),f={role:"group",dir:l,...u};return(0,p.jsx)(dv,{scope:n,rovingFocus:o,disabled:r,children:o?(0,p.jsx)(gr,{asChild:!0,...d,orientation:a,dir:l,loop:c,children:(0,p.jsx)(T.div,{...f,ref:t})}):(0,p.jsx)(T.div,{...f,ref:t})})}),Kt="ToggleGroupItem",lc=s.forwardRef((e,t)=>{const n=ic(Kt,e.__scopeToggleGroup),r=fv(Kt,e.__scopeToggleGroup),o=ac(e.__scopeToggleGroup),a=n.value.includes(e.value),i=r.disabled||e.disabled,c={...e,pressed:a,disabled:i},u=s.useRef(null);return r.rovingFocus?(0,p.jsx)(xr,{asChild:!0,...o,focusable:!i,active:a,ref:u,children:(0,p.jsx)(co,{...c,ref:t})}):(0,p.jsx)(co,{...c,ref:t})});lc.displayName=Kt;var co=s.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,a=ic(Kt,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},c=a.type==="single"?i:void 0;return(0,p.jsx)(Tr,{...c,...o,ref:t,onPressedChange:u=>{u?a.onItemActivate(r):a.onItemDeactivate(r)}})}),Jh=Ar,em=lc,wn="Collapsible",[pv,tm]=q(wn),[vv,Mr]=pv(wn),uc=s.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...c}=e,[u,d]=Q({prop:r,defaultProp:o??!1,onChange:i,caller:wn});return(0,p.jsx)(vv,{scope:n,disabled:a,contentId:re(),open:u,onOpenToggle:s.useCallback(()=>d(l=>!l),[d]),children:(0,p.jsx)(T.div,{"data-state":Nr(u),"data-disabled":a?"":void 0,...c,ref:t})})});uc.displayName=wn;var dc="CollapsibleTrigger",fc=s.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Mr(dc,n);return(0,p.jsx)(T.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Nr(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:S(e.onClick,o.onOpenToggle)})});fc.displayName=dc;var Or="CollapsibleContent",pc=s.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Mr(Or,e.__scopeCollapsible);return(0,p.jsx)(z,{present:n||o.open,children:({present:a})=>(0,p.jsx)(hv,{...r,ref:t,present:a})})});pc.displayName=Or;var hv=s.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=Mr(Or,n),[c,u]=s.useState(r),d=s.useRef(null),l=D(t,d),f=s.useRef(0),v=f.current,m=s.useRef(0),x=m.current,h=i.open||c,g=s.useRef(h),y=s.useRef(void 0);return s.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),Y(()=>{const w=d.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const C=w.getBoundingClientRect();f.current=C.height,m.current=C.width,g.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),u(r)}},[i.open,r]),(0,p.jsx)(T.div,{"data-state":Nr(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:l,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:h&&o})});function Nr(e){return e?"open":"closed"}var nm=uc,rm=fc,om=pc,Ir="ContextMenu",[mv,am]=q(Ir,[vn]),ee=vn(),[gv,vc]=mv(Ir),hc=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:a=!0}=e,[i,c]=s.useState(!1),u=ee(t),d=K(r),l=s.useCallback(f=>{c(f),d(f)},[d]);return(0,p.jsx)(gv,{scope:t,open:i,onOpenChange:l,modal:a,children:(0,p.jsx)(ti,{...u,dir:o,open:i,onOpenChange:l,modal:a,children:n})})};hc.displayName=Ir;var mc="ContextMenuTrigger",gc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,a=vc(mc,n),i=ee(n),c=s.useRef({x:0,y:0}),u=s.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),d=s.useRef(0),l=s.useCallback(()=>window.clearTimeout(d.current),[]),f=v=>{c.current={x:v.clientX,y:v.clientY},a.onOpenChange(!0)};return s.useEffect(()=>l,[l]),s.useEffect(()=>{r&&l()},[r,l]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(ni,{...i,virtualRef:u}),(0,p.jsx)(T.span,{"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:S(e.onContextMenu,v=>{l(),f(v),v.preventDefault()}),onPointerDown:r?e.onPointerDown:S(e.onPointerDown,Ot(v=>{l(),d.current=window.setTimeout(()=>f(v),700)})),onPointerMove:r?e.onPointerMove:S(e.onPointerMove,Ot(l)),onPointerCancel:r?e.onPointerCancel:S(e.onPointerCancel,Ot(l)),onPointerUp:r?e.onPointerUp:S(e.onPointerUp,Ot(l))})]})});gc.displayName=mc;var xv="ContextMenuPortal",xc=e=>{const{__scopeContextMenu:t,...n}=e,r=ee(t);return(0,p.jsx)(ri,{...r,...n})};xc.displayName=xv;var wc="ContextMenuContent",yc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=vc(wc,n),a=ee(n),i=s.useRef(!1);return(0,p.jsx)(oi,{...a,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),!c.defaultPrevented&&i.current&&c.preventDefault(),i.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),!c.defaultPrevented&&!o.modal&&(i.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});yc.displayName=wc;var wv="ContextMenuGroup",yv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ai,{...o,...r,ref:t})});yv.displayName=wv;var Cv="ContextMenuLabel",bv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(si,{...o,...r,ref:t})});bv.displayName=Cv;var Sv="ContextMenuItem",Cc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ii,{...o,...r,ref:t})});Cc.displayName=Sv;var Ev="ContextMenuCheckboxItem",Rv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ci,{...o,...r,ref:t})});Rv.displayName=Ev;var Pv="ContextMenuRadioGroup",_v=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(li,{...o,...r,ref:t})});_v.displayName=Pv;var Tv="ContextMenuRadioItem",Av=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(ui,{...o,...r,ref:t})});Av.displayName=Tv;var Mv="ContextMenuItemIndicator",Ov=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(di,{...o,...r,ref:t})});Ov.displayName=Mv;var Nv="ContextMenuSeparator",bc=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(fi,{...o,...r,ref:t})});bc.displayName=Nv;var Iv="ContextMenuArrow",Dv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(pi,{...o,...r,ref:t})});Dv.displayName=Iv;var Sc="ContextMenuSub",jv=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:a}=e,i=ee(t),[c,u]=Q({prop:o,defaultProp:a??!1,onChange:r,caller:Sc});return(0,p.jsx)(vi,{...i,open:c,onOpenChange:u,children:n})};jv.displayName=Sc;var Lv="ContextMenuSubTrigger",kv=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(hi,{...o,...r,ref:t})});kv.displayName=Lv;var Fv="ContextMenuSubContent",$v=s.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=ee(n);return(0,p.jsx)(mi,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$v.displayName=Fv;function Ot(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var sm=hc,im=gc,cm=xc,lm=yc,um=Cc,dm=bc;export{th as $,Th as A,yh as B,Fh as C,ou as Ct,jh as D,ft as Dt,Dh as E,re as Et,Nh as F,gh as G,xh as H,Oh as I,oh as J,ph as K,Eh as L,Sh as M,Ah as N,Ph as O,_c as Ot,Mh as P,ah as Q,kf as R,Bh as S,Jl as St,$h as T,Q as Tt,hh as U,wh as V,mh as W,uh as X,ch as Y,lh as Z,Xh as _,Go as _t,dm as a,Jv as at,Hh as b,nu as bt,nm as c,Wd as ct,Jh as d,Xv as dt,fh as et,Zh as f,Yv as ft,Vh as g,Gv as gt,zh as h,Ko as ht,sm as i,ih as it,Rh as j,_h as k,Rc as kt,rm as l,Qv as lt,Kh as m,zv as mt,um as n,nh as nt,im as o,Zv as ot,qh as p,Vv as pt,sh as q,cm as r,rh as rt,om as s,jd as st,lm as t,dh as tt,em as u,Kv as ut,Uh as v,ru as vt,kh as w,eu as wt,Yh as x,tu as xt,Gh as y,au as yt,Ff as z};
|