@kaitranntt/ccs 6.1.0-dev.3 → 6.1.0-dev.4
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/VERSION +1 -1
- package/dist/ui/assets/accounts-BxzFSV6G.js +1 -0
- package/dist/ui/assets/analytics-CUMEmMmd.js +1 -0
- package/dist/ui/assets/api-ha2YIDmE.js +1 -0
- package/dist/ui/assets/{card-DtuB-tY2.js → card-z-W54K6T.js} +1 -1
- package/dist/ui/assets/charts-D_0N6JY8.js +64 -0
- package/dist/ui/assets/cliproxy-DeGbgy_I.js +1 -0
- package/dist/ui/assets/{cliproxy-control-panel-CCHewXLy.js → cliproxy-control-panel-vWvhZC3D.js} +1 -1
- package/dist/ui/assets/{code-editor-DrGnSi2g.js → code-editor-iaBb4ebN.js} +2 -2
- package/dist/ui/assets/code-highlight-C2TXE0-z.js +3 -0
- package/dist/ui/assets/{form-utils-CKETQmt9.js → form-utils-BXvNPyud.js} +1 -1
- package/dist/ui/assets/health-BsI6aKz3.js +1 -0
- package/dist/ui/assets/icons-DQ69xQew.js +1 -0
- package/dist/ui/assets/index-B_TDeSrG.js +44 -0
- package/dist/ui/assets/index-D6QWrdkq.css +1 -0
- package/dist/ui/assets/notifications-cqk-Qeo2.js +1 -0
- package/dist/ui/assets/radix-ui-VbLlN_Dz.js +51 -0
- package/dist/ui/assets/{react-vendor-DadlvKzT.js → react-vendor-DMek_JCF.js} +1 -1
- package/dist/ui/assets/settings-C0Gs0aA_.js +1 -0
- package/dist/ui/assets/shared-BWnoc9D5.js +1 -0
- package/dist/ui/assets/{tanstack-DZ3a6J0N.js → tanstack-yybD444-.js} +1 -1
- package/dist/ui/assets/utils-CzKF5WmX.js +1 -0
- package/dist/ui/index.html +10 -7
- package/package.json +1 -1
- package/dist/ui/assets/accounts-DjGgiBaT.js +0 -1
- package/dist/ui/assets/analytics-BMXXbe7n.js +0 -64
- package/dist/ui/assets/api-BxYCjnbV.js +0 -1
- package/dist/ui/assets/cliproxy-C7H0ktJS.js +0 -1
- package/dist/ui/assets/health-CUiIrsfV.js +0 -1
- package/dist/ui/assets/icons-CPPxUvb4.js +0 -1
- package/dist/ui/assets/index-BBNncLQd.js +0 -46
- package/dist/ui/assets/index-CbKJobGP.css +0 -1
- package/dist/ui/assets/radix-ui-Bhyw9pC9.js +0 -51
- package/dist/ui/assets/settings-D8SKgj9M.js +0 -1
- package/dist/ui/assets/shared-BSXhYf5P.js +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import{r as i,R as Hn,a as Wt,b as Sa,c as Ne}from"./react-vendor-DMek_JCF.js";var gn={exports:{}},nt={};var Co;function Ea(){if(Co)return nt;Co=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,r,s){var a=null;if(s!==void 0&&(a=""+s),r.key!==void 0&&(a=""+r.key),"key"in r){s={};for(var c in r)c!=="key"&&(s[c]=r[c])}else s=r;return r=s.ref,{$$typeof:e,type:o,key:a,ref:r!==void 0?r:null,props:s}}return nt.Fragment=t,nt.jsx=n,nt.jsxs=n,nt}var So;function Ra(){return So||(So=1,gn.exports=Ea()),gn.exports}var p=Ra();function Eo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function we(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Eo(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Eo(e[r],null)}}}}function j(...e){return i.useCallback(we(...e),e)}var Pa=Symbol.for("react.lazy"),_t=Hn[" use ".trim().toString()];function Aa(e){return typeof e=="object"&&e!==null&&"then"in e}function Jo(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Pa&&"_payload"in e&&Aa(e._payload)}function Un(e){const t=Ta(e),n=i.forwardRef((o,r)=>{let{children:s,...a}=o;Jo(s)&&typeof _t=="function"&&(s=_t(s._payload));const c=i.Children.toArray(s),l=c.find(Ia);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var vh=Un("Slot");function Ta(e){const t=i.forwardRef((n,o)=>{let{children:r,...s}=n;if(Jo(r)&&typeof _t=="function"&&(r=_t(r._payload)),i.isValidElement(r)){const a=Ma(r),c=Oa(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _a=Symbol("radix.slottable");function Ia(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_a}function Oa(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Ma(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 Da=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Na=Da.reduce((e,t)=>{const n=Un(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),La="Separator",Ro="horizontal",ja=["horizontal","vertical"],Qo=i.forwardRef((e,t)=>{const{decorative:n,orientation:o=Ro,...r}=e,s=ka(o)?o:Ro,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(Na.div,{"data-orientation":s,...c,...r,ref:t})});Qo.displayName=La;function ka(e){return ja.includes(e)}var mh=Qo;function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function $a(e,t){const n=i.createContext(t),o=s=>{const{children:a,...c}=s,l=i.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:l,children:a})};o.displayName=e+"Provider";function r(s){const a=i.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function Q(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{const{scope:h,children:m,...w}=f,v=h?.[e]?.[l]||c,g=i.useMemo(()=>w,Object.values(w));return p.jsx(v.Provider,{value:g,children:m})};u.displayName=s+"Provider";function d(f,h){const m=h?.[e]?.[l]||c,w=i.useContext(m);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Fa(r,...t)]}function Fa(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var z=globalThis?.document?i.useLayoutEffect:()=>{},Wa=Hn[" useId ".trim().toString()]||(()=>{}),Ba=0;function ne(e){const[t,n]=i.useState(Wa());return z(()=>{n(o=>o??String(Ba++))},[e]),t?`radix-${t}`:""}var Va=Hn[" useInsertionEffect ".trim().toString()]||z;function me({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=Ha({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const d=i.useRef(e!==void 0);i.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${o} is changing from ${f?"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,o])}const u=i.useCallback(d=>{if(c){const f=Ua(d)?d(e):d;f!==e&&a.current?.(f)}else s(d)},[c,e,s,a]);return[l,u]}function Ha({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return Va(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function Ua(e){return typeof e=="function"}function Ga(e){const t=Ka(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Ya);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Ka(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=qa(r),c=Xa(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var za=Symbol("radix.slottable");function Ya(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===za}function Xa(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function qa(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 Za=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],D=Za.reduce((e,t)=>{const n=Ga(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function er(e,t){e&&Wt.flushSync(()=>e.dispatchEvent(t))}function X(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ja(e,t=globalThis?.document){const n=X(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Qa="DismissableLayer",Tn="dismissableLayer.update",ec="dismissableLayer.pointerDownOutside",tc="dismissableLayer.focusOutside",Po,tr=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ze=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,u=i.useContext(tr),[d,f]=i.useState(null),h=d?.ownerDocument??globalThis?.document,[,m]=i.useState({}),w=j(t,E=>f(E)),v=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),x=d?v.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,C=x>=y,S=rc(E=>{const _=E.target,I=[...u.branches].some(O=>O.contains(_));!C||I||(r?.(E),a?.(E),E.defaultPrevented||c?.())},h),A=sc(E=>{const _=E.target;[...u.branches].some(O=>O.contains(_))||(s?.(E),a?.(E),E.defaultPrevented||c?.())},h);return Ja(E=>{x===u.layers.size-1&&(o?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},h),i.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Po=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ao(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Po)}},[d,h,n,u]),i.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ao())},[d,u]),i.useEffect(()=>{const E=()=>m({});return document.addEventListener(Tn,E),()=>document.removeEventListener(Tn,E)},[]),p.jsx(D.div,{...l,ref:w,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,A.onFocusCapture),onBlurCapture:R(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,S.onPointerDownCapture)})});Ze.displayName=Qa;var nc="DismissableLayerBranch",oc=i.forwardRef((e,t)=>{const n=i.useContext(tr),o=i.useRef(null),r=j(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(D.div,{...e,ref:r})});oc.displayName=nc;function rc(e,t=globalThis?.document){const n=X(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let l=function(){nr(ec,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function sc(e,t=globalThis?.document){const n=X(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&nr(tc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ao(){const e=new CustomEvent(Tn);document.dispatchEvent(e)}function nr(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?er(r,s):r.dispatchEvent(s)}var wn="focusScope.autoFocusOnMount",yn="focusScope.autoFocusOnUnmount",To={bubbles:!1,cancelable:!0},ic="FocusScope",ut=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[c,l]=i.useState(null),u=X(r),d=X(s),f=i.useRef(null),h=j(t,v=>l(v)),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let v=function(b){if(m.paused||!c)return;const C=b.target;c.contains(C)?f.current=C:Pe(f.current,{select:!0})},g=function(b){if(m.paused||!c)return;const C=b.relatedTarget;C!==null&&(c.contains(C)||Pe(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&Pe(c)};document.addEventListener("focusin",v),document.addEventListener("focusout",g);const x=new MutationObserver(y);return c&&x.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",g),x.disconnect()}}},[o,c,m.paused]),i.useEffect(()=>{if(c){Io.add(m);const v=document.activeElement;if(!c.contains(v)){const y=new CustomEvent(wn,To);c.addEventListener(wn,u),c.dispatchEvent(y),y.defaultPrevented||(ac(fc(or(c)),{select:!0}),document.activeElement===v&&Pe(c))}return()=>{c.removeEventListener(wn,u),setTimeout(()=>{const y=new CustomEvent(yn,To);c.addEventListener(yn,d),c.dispatchEvent(y),y.defaultPrevented||Pe(v??document.body,{select:!0}),c.removeEventListener(yn,d),Io.remove(m)},0)}}},[c,u,d,m]);const w=i.useCallback(v=>{if(!n&&!o||m.paused)return;const g=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(g&&y){const x=v.currentTarget,[b,C]=cc(x);b&&C?!v.shiftKey&&y===C?(v.preventDefault(),n&&Pe(b,{select:!0})):v.shiftKey&&y===b&&(v.preventDefault(),n&&Pe(C,{select:!0})):y===x&&v.preventDefault()}},[n,o,m.paused]);return p.jsx(D.div,{tabIndex:-1,...a,ref:h,onKeyDown:w})});ut.displayName=ic;function ac(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Pe(o,{select:t}),document.activeElement!==n)return}function cc(e){const t=or(e),n=_o(t,e),o=_o(t.reverse(),e);return[n,o]}function or(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _o(e,t){for(const n of e)if(!lc(n,{upTo:t}))return n}function lc(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 uc(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&&uc(e)&&t&&e.select()}}var Io=dc();function dc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Oo(e,t),e.unshift(t)},remove(t){e=Oo(e,t),e[0]?.resume()}}}function Oo(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function fc(e){return e.filter(t=>t.tagName!=="A")}var pc="Portal",Je=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);z(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?Sa.createPortal(p.jsx(D.div,{...o,ref:t}),a):null});Je.displayName=pc;function hc(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Y=e=>{const{present:t,children:n}=e,o=vc(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=j(o.ref,mc(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Y.displayName="Presence";function vc(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,l]=hc(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=xt(o.current);s.current=c==="mounted"?u:"none"},[c]),z(()=>{const u=o.current,d=r.current;if(d!==e){const h=s.current,m=xt(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),z(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const v=xt(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(l("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=m=>{m.target===t&&(s.current=xt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function xt(e){return e?.animationName||"none"}function mc(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 xn=0;function Bt(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mo()),document.body.insertAdjacentElement("beforeend",e[1]??Mo()),xn++,()=>{xn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xn--}},[])}function Mo(){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 pe=function(){return pe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},pe.apply(this,arguments)};function rr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function gc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var Pt="right-scroll-bar-position",At="width-before-scroll-bar",wc="with-scroll-bars-hidden",yc="--removed-body-scroll-bar-size";function bn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xc(e,t){var n=i.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var bc=typeof window<"u"?i.useLayoutEffect:i.useEffect,Do=new WeakMap;function Cc(e,t){var n=xc(null,function(o){return e.forEach(function(r){return bn(r,o)})});return bc(function(){var o=Do.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(c){s.has(c)||bn(c,null)}),s.forEach(function(c){r.has(c)||bn(c,a)})}Do.set(n,e)},[e]),n}function Sc(e){return e}function Ec(e,t){t===void 0&&(t=Sc);var n=[],o=!1,r={read:function(){if(o)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(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var l=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return r}function Rc(e){e===void 0&&(e={});var t=Ec(null);return t.options=pe({async:!0,ssr:!1},e),t}var sr=function(e){var t=e.sideCar,n=rr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,pe({},n))};sr.isSideCarExport=!0;function Pc(e,t){return e.useMedium(t),sr}var ir=Rc(),Cn=function(){},Vt=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:Cn,onWheelCapture:Cn,onTouchMoveCapture:Cn}),r=o[0],s=o[1],a=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noRelative,w=e.noIsolation,v=e.inert,g=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,b=e.gapMode,C=rr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,A=Cc([n,t]),E=pe(pe({},C),r);return i.createElement(i.Fragment,null,d&&i.createElement(S,{sideCar:ir,removeScrollBar:u,shards:f,noRelative:m,noIsolation:w,inert:v,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?i.cloneElement(i.Children.only(c),pe(pe({},E),{ref:A})):i.createElement(x,pe({},E,{className:l,ref:A}),c))});Vt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vt.classNames={fullWidth:At,zeroRight:Pt};var Ac=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Tc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ac();return t&&e.setAttribute("nonce",t),e}function _c(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ic(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Oc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Tc())&&(_c(t,n),Ic(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mc=function(){var e=Oc();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ar=function(){var e=Mc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Dc={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||"",10)||0},Nc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Sn(n),Sn(o),Sn(r)]},Lc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dc;var t=Nc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},jc=ar(),Ue="data-scroll-locked",kc=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(wc,` {
|
|
3
|
+
overflow: hidden `).concat(o,`;
|
|
4
|
+
padding-right: `).concat(c,"px ").concat(o,`;
|
|
5
|
+
}
|
|
6
|
+
body[`).concat(Ue,`] {
|
|
7
|
+
overflow: hidden `).concat(o,`;
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
10
|
+
padding-left: `.concat(r,`px;
|
|
11
|
+
padding-top: `).concat(s,`px;
|
|
12
|
+
padding-right: `).concat(a,`px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: `).concat(c,"px ").concat(o,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.`).concat(Pt,` {
|
|
20
|
+
right: `).concat(c,"px ").concat(o,`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.`).concat(At,` {
|
|
24
|
+
margin-right: `).concat(c,"px ").concat(o,`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.`).concat(Pt," .").concat(Pt,` {
|
|
28
|
+
right: 0 `).concat(o,`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.`).concat(At," .").concat(At,` {
|
|
32
|
+
margin-right: 0 `).concat(o,`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[`).concat(Ue,`] {
|
|
36
|
+
`).concat(yc,": ").concat(c,`px;
|
|
37
|
+
}
|
|
38
|
+
`)},No=function(){var e=parseInt(document.body.getAttribute(Ue)||"0",10);return isFinite(e)?e:0},$c=function(){i.useEffect(function(){return document.body.setAttribute(Ue,(No()+1).toString()),function(){var e=No()-1;e<=0?document.body.removeAttribute(Ue):document.body.setAttribute(Ue,e.toString())}},[])},Fc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;$c();var s=i.useMemo(function(){return Lc(r)},[r]);return i.createElement(jc,{styles:kc(s,!t,r,n?"":"!important")})},_n=!1;if(typeof window<"u")try{var bt=Object.defineProperty({},"passive",{get:function(){return _n=!0,!0}});window.addEventListener("test",bt,bt),window.removeEventListener("test",bt,bt)}catch{_n=!1}var Be=_n?{passive:!1}:!1,Wc=function(e){return e.tagName==="TEXTAREA"},cr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Wc(e)&&n[t]==="visible")},Bc=function(e){return cr(e,"overflowY")},Vc=function(e){return cr(e,"overflowX")},Lo=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=lr(e,o);if(r){var s=ur(e,o),a=s[1],c=s[2];if(a>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Hc=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Uc=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},lr=function(e,t){return e==="v"?Bc(t):Vc(t)},ur=function(e,t){return e==="v"?Hc(t):Uc(t)},Gc=function(e,t){return e==="h"&&t==="rtl"?-1:1},Kc=function(e,t,n,o,r){var s=Gc(e,window.getComputedStyle(t).direction),a=s*o,c=n.target,l=t.contains(c),u=!1,d=a>0,f=0,h=0;do{if(!c)break;var m=ur(e,c),w=m[0],v=m[1],g=m[2],y=v-g-s*w;(w||y)&&lr(e,c)&&(f+=y,h+=w);var x=c.parentNode;c=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(u=!0),u},Ct=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jo=function(e){return[e.deltaX,e.deltaY]},ko=function(e){return e&&"current"in e?e.current:e},zc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Yc=function(e){return`
|
|
39
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
+
`)},Xc=0,Ve=[];function qc(e){var t=i.useRef([]),n=i.useRef([0,0]),o=i.useRef(),r=i.useState(Xc++)[0],s=i.useState(ar)[0],a=i.useRef(e);i.useEffect(function(){a.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var v=gc([e.lockRef.current],(e.shards||[]).map(ko),!0).filter(Boolean);return v.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),v.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback(function(v,g){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var y=Ct(v),x=n.current,b="deltaX"in v?v.deltaX:x[0]-y[0],C="deltaY"in v?v.deltaY:x[1]-y[1],S,A=v.target,E=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in v&&E==="h"&&A.type==="range")return!1;var _=window.getSelection(),I=_&&_.anchorNode,O=I?I===A||I.contains(A):!1;if(O)return!1;var L=Lo(E,A);if(!L)return!0;if(L?S=E:(S=E==="v"?"h":"v",L=Lo(E,A)),!L)return!1;if(!o.current&&"changedTouches"in v&&(b||C)&&(o.current=S),!S)return!0;var $=o.current||S;return Kc($,g,v,$==="h"?b:C)},[]),l=i.useCallback(function(v){var g=v;if(!(!Ve.length||Ve[Ve.length-1]!==s)){var y="deltaY"in g?jo(g):Ct(g),x=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&zc(S.delta,y)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var b=(a.current.shards||[]).map(ko).filter(Boolean).filter(function(S){return S.contains(g.target)}),C=b.length>0?c(g,b[0]):!a.current.noIsolation;C&&g.cancelable&&g.preventDefault()}}},[]),u=i.useCallback(function(v,g,y,x){var b={name:v,delta:g,target:y,should:x,shadowParent:Zc(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),d=i.useCallback(function(v){n.current=Ct(v),o.current=void 0},[]),f=i.useCallback(function(v){u(v.type,jo(v),v.target,c(v,e.lockRef.current))},[]),h=i.useCallback(function(v){u(v.type,Ct(v),v.target,c(v,e.lockRef.current))},[]);i.useEffect(function(){return Ve.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Be),document.addEventListener("touchmove",l,Be),document.addEventListener("touchstart",d,Be),function(){Ve=Ve.filter(function(v){return v!==s}),document.removeEventListener("wheel",l,Be),document.removeEventListener("touchmove",l,Be),document.removeEventListener("touchstart",d,Be)}},[]);var m=e.removeScrollBar,w=e.inert;return i.createElement(i.Fragment,null,w?i.createElement(s,{styles:Yc(r)}):null,m?i.createElement(Fc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Zc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jc=Pc(ir,qc);var dt=i.forwardRef(function(e,t){return i.createElement(Vt,pe({},e,{ref:t,sideCar:Jc}))});dt.classNames=Vt.classNames;var Qc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},He=new WeakMap,St=new WeakMap,Et={},En=0,dr=function(e){return e&&(e.host||dr(e.parentNode))},el=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=dr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},tl=function(e,t,n,o){var r=el(t,Array.isArray(e)?e:[e]);Et[n]||(Et[n]=new WeakMap);var s=Et[n],a=[],c=new Set,l=new Set(r),u=function(f){!f||c.has(f)||(c.add(f),u(f.parentNode))};r.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(c.has(h))d(h);else try{var m=h.getAttribute(o),w=m!==null&&m!=="false",v=(He.get(h)||0)+1,g=(s.get(h)||0)+1;He.set(h,v),s.set(h,g),a.push(h),v===1&&w&&St.set(h,!0),g===1&&h.setAttribute(n,"true"),w||h.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return d(t),c.clear(),En++,function(){a.forEach(function(f){var h=He.get(f)-1,m=s.get(f)-1;He.set(f,h),s.set(f,m),h||(St.has(f)||f.removeAttribute(o),St.delete(f)),m||f.removeAttribute(n)}),En--,En||(He=new WeakMap,He=new WeakMap,St=new WeakMap,Et={})}},Ht=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Qc(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),tl(o,r,n,"aria-hidden")):function(){return null}};function nl(e){const t=ol(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(sl);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function ol(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=al(r),c=il(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rl=Symbol("radix.slottable");function sl(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rl}function il(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function al(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 Ut="Dialog",[fr,pr]=Q(Ut),[cl,fe]=fr(Ut),hr=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=e,c=i.useRef(null),l=i.useRef(null),[u,d]=me({prop:o,defaultProp:r??!1,onChange:s,caller:Ut});return p.jsx(cl,{scope:t,triggerRef:c,contentRef:l,contentId:ne(),titleId:ne(),descriptionId:ne(),open:u,onOpenChange:d,onOpenToggle:i.useCallback(()=>d(f=>!f),[d]),modal:a,children:n})};hr.displayName=Ut;var vr="DialogTrigger",mr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=fe(vr,n),s=j(t,r.triggerRef);return p.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":zn(r.open),...o,ref:s,onClick:R(e.onClick,r.onOpenToggle)})});mr.displayName=vr;var Gn="DialogPortal",[ll,gr]=fr(Gn,{forceMount:void 0}),wr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=fe(Gn,t);return p.jsx(ll,{scope:t,forceMount:n,children:i.Children.map(o,a=>p.jsx(Y,{present:n||s.open,children:p.jsx(Je,{asChild:!0,container:r,children:a})}))})};wr.displayName=Gn;var It="DialogOverlay",yr=i.forwardRef((e,t)=>{const n=gr(It,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=fe(It,e.__scopeDialog);return s.modal?p.jsx(Y,{present:o||s.open,children:p.jsx(dl,{...r,ref:t})}):null});yr.displayName=It;var ul=nl("DialogOverlay.RemoveScroll"),dl=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=fe(It,n);return p.jsx(dt,{as:ul,allowPinchZoom:!0,shards:[r.contentRef],children:p.jsx(D.div,{"data-state":zn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Le="DialogContent",xr=i.forwardRef((e,t)=>{const n=gr(Le,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=fe(Le,e.__scopeDialog);return p.jsx(Y,{present:o||s.open,children:s.modal?p.jsx(fl,{...r,ref:t}):p.jsx(pl,{...r,ref:t})})});xr.displayName=Le;var fl=i.forwardRef((e,t)=>{const n=fe(Le,e.__scopeDialog),o=i.useRef(null),r=j(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return Ht(s)},[]),p.jsx(br,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&s.preventDefault()}),onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault())})}),pl=i.forwardRef((e,t)=>{const n=fe(Le,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return p.jsx(br,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),br=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,c=fe(Le,n),l=i.useRef(null),u=j(t,l);return Bt(),p.jsxs(p.Fragment,{children:[p.jsx(ut,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Ze,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":zn(c.open),...a,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(vl,{titleId:c.titleId}),p.jsx(gl,{contentRef:l,descriptionId:c.descriptionId})]})]})}),Kn="DialogTitle",Cr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=fe(Kn,n);return p.jsx(D.h2,{id:r.titleId,...o,ref:t})});Cr.displayName=Kn;var Sr="DialogDescription",Er=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=fe(Sr,n);return p.jsx(D.p,{id:r.descriptionId,...o,ref:t})});Er.displayName=Sr;var Rr="DialogClose",Pr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=fe(Rr,n);return p.jsx(D.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Pr.displayName=Rr;function zn(e){return e?"open":"closed"}var Ar="DialogTitleWarning",[hl,Tr]=$a(Ar,{contentName:Le,titleName:Kn,docsSlug:"dialog"}),vl=({titleId:e})=>{const t=Tr(Ar),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 i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ml="DialogDescriptionWarning",gl=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Tr(ml).contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},wl=hr,yl=mr,xl=wr,bl=yr,Cl=xr,Sl=Cr,El=Er,_r=Pr;const Rl=["top","right","bottom","left"],Ae=Math.min,te=Math.max,Ot=Math.round,Rt=Math.floor,ve=e=>({x:e,y:e}),Pl={left:"right",right:"left",bottom:"top",top:"bottom"},Al={start:"end",end:"start"};function In(e,t,n){return te(e,Ae(t,n))}function Se(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function Qe(e){return e.split("-")[1]}function Yn(e){return e==="x"?"y":"x"}function Xn(e){return e==="y"?"height":"width"}const Tl=new Set(["top","bottom"]);function he(e){return Tl.has(Ee(e))?"y":"x"}function qn(e){return Yn(he(e))}function _l(e,t,n){n===void 0&&(n=!1);const o=Qe(e),r=qn(e),s=Xn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Mt(a)),[a,Mt(a)]}function Il(e){const t=Mt(e);return[On(e),t,On(t)]}function On(e){return e.replace(/start|end/g,t=>Al[t])}const $o=["left","right"],Fo=["right","left"],Ol=["top","bottom"],Ml=["bottom","top"];function Dl(e,t,n){switch(e){case"top":case"bottom":return n?t?Fo:$o:t?$o:Fo;case"left":case"right":return t?Ol:Ml;default:return[]}}function Nl(e,t,n,o){const r=Qe(e);let s=Dl(Ee(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(On)))),s}function Mt(e){return e.replace(/left|right|bottom|top/g,t=>Pl[t])}function Ll(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ir(e){return typeof e!="number"?Ll(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Wo(e,t,n){let{reference:o,floating:r}=e;const s=he(t),a=qn(t),c=Xn(a),l=Ee(t),u=s==="y",d=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let m;switch(l){case"top":m={x:d,y:o.y-r.height};break;case"bottom":m={x:d,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:f};break;case"left":m={x:o.x-r.width,y:f};break;default:m={x:o.x,y:o.y}}switch(Qe(t)){case"start":m[a]-=h*(n&&u?-1:1);break;case"end":m[a]+=h*(n&&u?-1:1);break}return m}const jl=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,c=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=Wo(u,o,l),h=o,m={},w=0;for(let v=0;v<c.length;v++){const{name:g,fn:y}=c[v],{x,y:b,data:C,reset:S}=await y({x:d,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});d=x??d,f=b??f,m={...m,[g]:{...m[g],...C}},S&&w<=50&&(w++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:d,y:f}=Wo(u,h,l)),v=-1)}return{x:d,y:f,placement:h,strategy:r,middlewareData:m}};async function st(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Se(t,e),w=Ir(m),g=c[h?f==="floating"?"reference":"floating":f],y=Dt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),x=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Dt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:l}):x);return{top:(y.top-S.top+w.top)/C.y,bottom:(S.bottom-y.bottom+w.bottom)/C.y,left:(y.left-S.left+w.left)/C.x,right:(S.right-y.right+w.right)/C.x}}const kl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=Se(e,t)||{};if(u==null)return{};const f=Ir(d),h={x:n,y:o},m=qn(r),w=Xn(m),v=await a.getDimensions(u),g=m==="y",y=g?"top":"left",x=g?"bottom":"right",b=g?"clientHeight":"clientWidth",C=s.reference[w]+s.reference[m]-h[m]-s.floating[w],S=h[m]-s.reference[m],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=A?A[b]:0;(!E||!await(a.isElement==null?void 0:a.isElement(A)))&&(E=c.floating[b]||s.floating[w]);const _=C/2-S/2,I=E/2-v[w]/2-1,O=Ae(f[y],I),L=Ae(f[x],I),$=O,F=E-v[w]-L,k=E/2-v[w]/2+_,B=In($,k,F),N=!l.arrow&&Qe(r)!=null&&k!==B&&s.reference[w]/2-(k<$?O:L)-v[w]/2<0,W=N?k<$?k-$:k-F:0;return{[m]:h[m]+W,data:{[m]:B,centerOffset:k-B-W,...N&&{alignmentOffset:W}},reset:N}}}),$l=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:v=!0,...g}=Se(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Ee(r),x=he(c),b=Ee(c)===c,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=h||(b||!v?[Mt(c)]:Il(c)),A=w!=="none";!h&&A&&S.push(...Nl(c,v,w,C));const E=[c,...S],_=await st(t,g),I=[];let O=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&I.push(_[y]),f){const k=_l(r,a,C);I.push(_[k[0]],_[k[1]])}if(O=[...O,{placement:r,overflows:I}],!I.every(k=>k<=0)){var L,$;const k=(((L=s.flip)==null?void 0:L.index)||0)+1,B=E[k];if(B&&(!(f==="alignment"?x!==he(B):!1)||O.every(M=>he(M.placement)===x?M.overflows[0]>0:!0)))return{data:{index:k,overflows:O},reset:{placement:B}};let N=($=O.filter(W=>W.overflows[0]<=0).sort((W,M)=>W.overflows[1]-M.overflows[1])[0])==null?void 0:$.placement;if(!N)switch(m){case"bestFit":{var F;const W=(F=O.filter(M=>{if(A){const P=he(M.placement);return P===x||P==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(P=>P>0).reduce((P,G)=>P+G,0)]).sort((M,P)=>M[1]-P[1])[0])==null?void 0:F[0];W&&(N=W);break}case"initialPlacement":N=c;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function Bo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vo(e){return Rl.some(t=>e[t]>=0)}const Fl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Se(e,t);switch(o){case"referenceHidden":{const s=await st(t,{...r,elementContext:"reference"}),a=Bo(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Vo(a)}}}case"escaped":{const s=await st(t,{...r,altBoundary:!0}),a=Bo(s,n.floating);return{data:{escapedOffsets:a,escaped:Vo(a)}}}default:return{}}}}},Or=new Set(["left","top"]);async function Wl(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Ee(n),c=Qe(n),l=he(n)==="y",u=Or.has(a)?-1:1,d=s&&l?-1:1,f=Se(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof w=="number"&&(m=c==="end"?w*-1:w),l?{x:m*d,y:h*u}:{x:h*u,y:m*d}}const Bl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:c}=t,l=await Wl(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:a}}}}},Vl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:g=>{let{x:y,y:x}=g;return{x:y,y:x}}},...l}=Se(e,t),u={x:n,y:o},d=await st(t,l),f=he(Ee(r)),h=Yn(f);let m=u[h],w=u[f];if(s){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+d[g],b=m-d[y];m=In(x,m,b)}if(a){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=w+d[g],b=w-d[y];w=In(x,w,b)}const v=c.fn({...t,[h]:m,[f]:w});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[h]:s,[f]:a}}}}}},Hl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Se(e,t),d={x:n,y:o},f=he(r),h=Yn(f);let m=d[h],w=d[f];const v=Se(c,t),g=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const b=h==="y"?"height":"width",C=s.reference[h]-s.floating[b]+g.mainAxis,S=s.reference[h]+s.reference[b]-g.mainAxis;m<C?m=C:m>S&&(m=S)}if(u){var y,x;const b=h==="y"?"width":"height",C=Or.has(Ee(r)),S=s.reference[f]-s.floating[b]+(C&&((y=a.offset)==null?void 0:y[f])||0)+(C?0:g.crossAxis),A=s.reference[f]+s.reference[b]+(C?0:((x=a.offset)==null?void 0:x[f])||0)-(C?g.crossAxis:0);w<S?w=S:w>A&&(w=A)}return{[h]:m,[f]:w}}}},Ul=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:c}=t,{apply:l=()=>{},...u}=Se(e,t),d=await st(t,u),f=Ee(r),h=Qe(r),m=he(r)==="y",{width:w,height:v}=s.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=h===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(y=f,g=h==="end"?"top":"bottom");const x=v-d.top-d.bottom,b=w-d.left-d.right,C=Ae(v-d[g],x),S=Ae(w-d[y],b),A=!t.middlewareData.shift;let E=C,_=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=x),A&&!h){const O=te(d.left,0),L=te(d.right,0),$=te(d.top,0),F=te(d.bottom,0);m?_=w-2*(O!==0||L!==0?O+L:te(d.left,d.right)):E=v-2*($!==0||F!==0?$+F:te(d.top,d.bottom))}await l({...t,availableWidth:_,availableHeight:E});const I=await a.getDimensions(c.floating);return w!==I.width||v!==I.height?{reset:{rects:!0}}:{}}}};function Gt(){return typeof window<"u"}function et(e){return Mr(e)?(e.nodeName||"").toLowerCase():"#document"}function oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(Mr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mr(e){return Gt()?e instanceof Node||e instanceof oe(e).Node:!1}function ue(e){return Gt()?e instanceof Element||e instanceof oe(e).Element:!1}function ge(e){return Gt()?e instanceof HTMLElement||e instanceof oe(e).HTMLElement:!1}function Ho(e){return!Gt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oe(e).ShadowRoot}const Gl=new Set(["inline","contents"]);function ft(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=de(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Gl.has(r)}const Kl=new Set(["table","td","th"]);function zl(e){return Kl.has(et(e))}const Yl=[":popover-open",":modal"];function Kt(e){return Yl.some(t=>{try{return e.matches(t)}catch{return!1}})}const Xl=["transform","translate","scale","rotate","perspective"],ql=["transform","translate","scale","rotate","perspective","filter"],Zl=["paint","layout","strict","content"];function Zn(e){const t=Jn(),n=ue(e)?de(e):e;return Xl.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ql.some(o=>(n.willChange||"").includes(o))||Zl.some(o=>(n.contain||"").includes(o))}function Jl(e){let t=Te(e);for(;ge(t)&&!ze(t);){if(Zn(t))return t;if(Kt(t))return null;t=Te(t)}return null}function Jn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ql=new Set(["html","body","#document"]);function ze(e){return Ql.has(et(e))}function de(e){return oe(e).getComputedStyle(e)}function zt(e){return ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Te(e){if(et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ho(e)&&e.host||ye(e);return Ho(t)?t.host:t}function Dr(e){const t=Te(e);return ze(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&ft(t)?t:Dr(t)}function it(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Dr(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=oe(r);if(s){const c=Mn(a);return t.concat(a,a.visualViewport||[],ft(r)?r:[],c&&n?it(c):[])}return t.concat(r,it(r,[],n))}function Mn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Nr(e){const t=de(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ge(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,c=Ot(n)!==s||Ot(o)!==a;return c&&(n=s,o=a),{width:n,height:o,$:c}}function Qn(e){return ue(e)?e:e.contextElement}function Ge(e){const t=Qn(e);if(!ge(t))return ve(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Nr(t);let a=(s?Ot(n.width):n.width)/o,c=(s?Ot(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const eu=ve(0);function Lr(e){const t=oe(e);return!Jn()||!t.visualViewport?eu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tu(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==oe(e)?!1:t}function je(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Qn(e);let a=ve(1);t&&(o?ue(o)&&(a=Ge(o)):a=Ge(e));const c=tu(s,n,o)?Lr(s):ve(0);let l=(r.left+c.x)/a.x,u=(r.top+c.y)/a.y,d=r.width/a.x,f=r.height/a.y;if(s){const h=oe(s),m=o&&ue(o)?oe(o):o;let w=h,v=Mn(w);for(;v&&o&&m!==w;){const g=Ge(v),y=v.getBoundingClientRect(),x=de(v),b=y.left+(v.clientLeft+parseFloat(x.paddingLeft))*g.x,C=y.top+(v.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,u*=g.y,d*=g.x,f*=g.y,l+=b,u+=C,w=oe(v),v=Mn(w)}}return Dt({width:d,height:f,x:l,y:u})}function Yt(e,t){const n=zt(e).scrollLeft;return t?t.left+n:je(ye(e)).left+n}function jr(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Yt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function nu(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=ye(o),c=t?Kt(t.floating):!1;if(o===a||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=ve(1);const d=ve(0),f=ge(o);if((f||!f&&!s)&&((et(o)!=="body"||ft(a))&&(l=zt(o)),ge(o))){const m=je(o);u=Ge(o),d.x=m.x+o.clientLeft,d.y=m.y+o.clientTop}const h=a&&!f&&!s?jr(a,l):ve(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function ou(e){return Array.from(e.getClientRects())}function ru(e){const t=ye(e),n=zt(e),o=e.ownerDocument.body,r=te(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=te(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Yt(e);const c=-n.scrollTop;return de(o).direction==="rtl"&&(a+=te(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:c}}const Uo=25;function su(e,t){const n=oe(e),o=ye(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,c=0,l=0;if(r){s=r.width,a=r.height;const d=Jn();(!d||d&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const u=Yt(o);if(u<=0){const d=o.ownerDocument,f=d.body,h=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-f.clientWidth-m);w<=Uo&&(s-=w)}else u<=Uo&&(s+=u);return{width:s,height:a,x:c,y:l}}const iu=new Set(["absolute","fixed"]);function au(e,t){const n=je(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=ge(e)?Ge(e):ve(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,u=o*s.y;return{width:a,height:c,x:l,y:u}}function Go(e,t,n){let o;if(t==="viewport")o=su(e,n);else if(t==="document")o=ru(ye(e));else if(ue(t))o=au(t,n);else{const r=Lr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Dt(o)}function kr(e,t){const n=Te(e);return n===t||!ue(n)||ze(n)?!1:de(n).position==="fixed"||kr(n,t)}function cu(e,t){const n=t.get(e);if(n)return n;let o=it(e,[],!1).filter(c=>ue(c)&&et(c)!=="body"),r=null;const s=de(e).position==="fixed";let a=s?Te(e):e;for(;ue(a)&&!ze(a);){const c=de(a),l=Zn(a);!l&&c.position==="fixed"&&(r=null),(s?!l&&!r:!l&&c.position==="static"&&!!r&&iu.has(r.position)||ft(a)&&!l&&kr(e,a))?o=o.filter(d=>d!==a):r=c,a=Te(a)}return t.set(e,o),o}function lu(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Kt(t)?[]:cu(t,this._c):[].concat(n),o],c=a[0],l=a.reduce((u,d)=>{const f=Go(t,d,r);return u.top=te(f.top,u.top),u.right=Ae(f.right,u.right),u.bottom=Ae(f.bottom,u.bottom),u.left=te(f.left,u.left),u},Go(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function uu(e){const{width:t,height:n}=Nr(e);return{width:t,height:n}}function du(e,t,n){const o=ge(t),r=ye(t),s=n==="fixed",a=je(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=ve(0);function u(){l.x=Yt(r)}if(o||!o&&!s)if((et(t)!=="body"||ft(r))&&(c=zt(t)),o){const m=je(t,!0,s,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else r&&u();s&&!o&&r&&u();const d=r&&!o&&!s?jr(r,c):ve(0),f=a.left+c.scrollLeft-l.x-d.x,h=a.top+c.scrollTop-l.y-d.y;return{x:f,y:h,width:a.width,height:a.height}}function Rn(e){return de(e).position==="static"}function Ko(e,t){if(!ge(e)||de(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ye(e)===n&&(n=n.ownerDocument.body),n}function $r(e,t){const n=oe(e);if(Kt(e))return n;if(!ge(e)){let r=Te(e);for(;r&&!ze(r);){if(ue(r)&&!Rn(r))return r;r=Te(r)}return n}let o=Ko(e,t);for(;o&&zl(o)&&Rn(o);)o=Ko(o,t);return o&&ze(o)&&Rn(o)&&!Zn(o)?n:o||Jl(e)||n}const fu=async function(e){const t=this.getOffsetParent||$r,n=this.getDimensions,o=await n(e.floating);return{reference:du(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function pu(e){return de(e).direction==="rtl"}const hu={convertOffsetParentRelativeRectToViewportRelativeRect:nu,getDocumentElement:ye,getClippingRect:lu,getOffsetParent:$r,getElementRects:fu,getClientRects:ou,getDimensions:uu,getScale:Ge,isElement:ue,isRTL:pu};function Fr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vu(e,t){let n=null,o;const r=ye(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function a(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:m}=u;if(c||t(),!h||!m)return;const w=Rt(f),v=Rt(r.clientWidth-(d+h)),g=Rt(r.clientHeight-(f+m)),y=Rt(d),b={rootMargin:-w+"px "+-v+"px "+-g+"px "+-y+"px",threshold:te(0,Ae(1,l))||1};let C=!0;function S(A){const E=A[0].intersectionRatio;if(E!==l){if(!C)return a();E?a(!1,E):o=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!Fr(u,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(S,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),s}function mu(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=Qn(e),d=r||s?[...u?it(u):[],...it(t)]:[];d.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=u&&c?vu(u,n):null;let h=-1,m=null;a&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let w,v=l?je(e):null;l&&g();function g(){const y=je(e);v&&!Fr(v,y)&&n(),v=y,w=requestAnimationFrame(g)}return n(),()=>{var y;d.forEach(x=>{r&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),f?.(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(w)}}const gu=Bl,wu=Vl,yu=$l,xu=Ul,bu=Fl,zo=kl,Cu=Hl,Su=(e,t,n)=>{const o=new Map,r={platform:hu,...n},s={...r.platform,_c:o};return jl(e,t,{...r,platform:s})};var Eu=typeof document<"u",Ru=function(){},Tt=Eu?i.useLayoutEffect:Ru;function Nt(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,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Nt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!Nt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Wr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yo(e,t){const n=Wr(e);return Math.round(t*n)/n}function Pn(e){const t=i.useRef(e);return Tt(()=>{t.current=e}),t}function Pu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=i.useState(o);Nt(h,o)||m(o);const[w,v]=i.useState(null),[g,y]=i.useState(null),x=i.useCallback(M=>{M!==A.current&&(A.current=M,v(M))},[]),b=i.useCallback(M=>{M!==E.current&&(E.current=M,y(M))},[]),C=s||w,S=a||g,A=i.useRef(null),E=i.useRef(null),_=i.useRef(d),I=l!=null,O=Pn(l),L=Pn(r),$=Pn(u),F=i.useCallback(()=>{if(!A.current||!E.current)return;const M={placement:t,strategy:n,middleware:h};L.current&&(M.platform=L.current),Su(A.current,E.current,M).then(P=>{const G={...P,isPositioned:$.current!==!1};k.current&&!Nt(_.current,G)&&(_.current=G,Wt.flushSync(()=>{f(G)}))})},[h,t,n,L,$]);Tt(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[u]);const k=i.useRef(!1);Tt(()=>(k.current=!0,()=>{k.current=!1}),[]),Tt(()=>{if(C&&(A.current=C),S&&(E.current=S),C&&S){if(O.current)return O.current(C,S,F);F()}},[C,S,F,O,I]);const B=i.useMemo(()=>({reference:A,floating:E,setReference:x,setFloating:b}),[x,b]),N=i.useMemo(()=>({reference:C,floating:S}),[C,S]),W=i.useMemo(()=>{const M={position:n,left:0,top:0};if(!N.floating)return M;const P=Yo(N.floating,d.x),G=Yo(N.floating,d.y);return c?{...M,transform:"translate("+P+"px, "+G+"px)",...Wr(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:G}},[n,c,N.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:F,refs:B,elements:N,floatingStyles:W}),[d,F,B,N,W])}const Au=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?zo({element:o.current,padding:r}).fn(n):{}:o?zo({element:o,padding:r}).fn(n):{}}}},Tu=(e,t)=>({...gu(e),options:[e,t]}),_u=(e,t)=>({...wu(e),options:[e,t]}),Iu=(e,t)=>({...Cu(e),options:[e,t]}),Ou=(e,t)=>({...yu(e),options:[e,t]}),Mu=(e,t)=>({...xu(e),options:[e,t]}),Du=(e,t)=>({...bu(e),options:[e,t]}),Nu=(e,t)=>({...Au(e),options:[e,t]});var Lu="Arrow",Br=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return p.jsx(D.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Br.displayName=Lu;var ju=Br;function Vr(e){const[t,n]=i.useState(void 0);return z(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,c;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var eo="Popper",[Hr,_e]=Q(eo),[ku,Ur]=Hr(eo),Gr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return p.jsx(ku,{scope:t,anchor:o,onAnchorChange:r,children:n})};Gr.displayName=eo;var Kr="PopperAnchor",zr=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Ur(Kr,n),a=i.useRef(null),c=j(t,a),l=i.useRef(null);return i.useEffect(()=>{const u=l.current;l.current=o?.current||a.current,u!==l.current&&s.onAnchorChange(l.current)}),o?null:p.jsx(D.div,{...r,ref:c})});zr.displayName=Kr;var to="PopperContent",[$u,Fu]=Hr(to),Yr=i.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:w,...v}=e,g=Ur(to,n),[y,x]=i.useState(null),b=j(t,T=>x(T)),[C,S]=i.useState(null),A=Vr(C),E=A?.width??0,_=A?.height??0,I=o+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},L=Array.isArray(u)?u:[u],$=L.length>0,F={padding:O,boundary:L.filter(Bu),altBoundary:$},{refs:k,floatingStyles:B,placement:N,isPositioned:W,middlewareData:M}=Pu({strategy:"fixed",placement:I,whileElementsMounted:(...T)=>mu(...T,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[Tu({mainAxis:r+_,alignmentAxis:a}),l&&_u({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Iu():void 0,...F}),l&&Ou({...F}),Mu({...F,apply:({elements:T,rects:V,availableWidth:Z,availableHeight:H})=>{const{width:U,height:K}=V.reference,se=T.floating.style;se.setProperty("--radix-popper-available-width",`${Z}px`),se.setProperty("--radix-popper-available-height",`${H}px`),se.setProperty("--radix-popper-anchor-width",`${U}px`),se.setProperty("--radix-popper-anchor-height",`${K}px`)}}),C&&Nu({element:C,padding:c}),Vu({arrowWidth:E,arrowHeight:_}),h&&Du({strategy:"referenceHidden",...F})]}),[P,G]=Zr(N),q=X(w);z(()=>{W&&q?.()},[W,q]);const ce=M.arrow?.x,be=M.arrow?.y,re=M.arrow?.centerOffset!==0,[Ce,ee]=i.useState();return z(()=>{y&&ee(window.getComputedStyle(y).zIndex)},[y]),p.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:W?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[M.transformOrigin?.x,M.transformOrigin?.y].join(" "),...M.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx($u,{scope:n,placedSide:P,onArrowChange:S,arrowX:ce,arrowY:be,shouldHideArrow:re,children:p.jsx(D.div,{"data-side":P,"data-align":G,...v,ref:b,style:{...v.style,animation:W?void 0:"none"}})})})});Yr.displayName=to;var Xr="PopperArrow",Wu={top:"bottom",right:"left",bottom:"top",left:"right"},qr=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Fu(Xr,o),a=Wu[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(ju,{...r,ref:n,style:{...r.style,display:"block"}})})});qr.displayName=Xr;function Bu(e){return e!==null}var Vu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,d]=Zr(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(r.arrow?.x??0)+c/2,m=(r.arrow?.y??0)+l/2;let w="",v="";return u==="bottom"?(w=a?f:`${h}px`,v=`${-l}px`):u==="top"?(w=a?f:`${h}px`,v=`${o.floating.height+l}px`):u==="right"?(w=`${-l}px`,v=a?f:`${m}px`):u==="left"&&(w=`${o.floating.width+l}px`,v=a?f:`${m}px`),{data:{x:w,y:v}}}});function Zr(e){const[t,n="center"]=e.split("-");return[t,n]}var Xt=Gr,pt=zr,qt=Yr,Zt=qr,Hu=Symbol("radix.slottable");function Uu(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Hu,t}var Jr=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"}),Gu="VisuallyHidden",Qr=i.forwardRef((e,t)=>p.jsx(D.span,{...e,ref:t,style:{...Jr,...e.style}}));Qr.displayName=Gu;var Ku=Qr,[Jt]=Q("Tooltip",[_e]),Qt=_e(),es="TooltipProvider",zu=700,Dn="tooltip.open",[Yu,no]=Jt(es),ts=e=>{const{__scopeTooltip:t,delayDuration:n=zu,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,a=i.useRef(!0),c=i.useRef(!1),l=i.useRef(0);return i.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),p.jsx(Yu,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(u=>{c.current=u},[]),disableHoverableContent:r,children:s})};ts.displayName=es;var at="Tooltip",[Xu,ht]=Jt(at),ns=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:a,delayDuration:c}=e,l=no(at,e.__scopeTooltip),u=Qt(t),[d,f]=i.useState(null),h=ne(),m=i.useRef(0),w=a??l.disableHoverableContent,v=c??l.delayDuration,g=i.useRef(!1),[y,x]=me({prop:o,defaultProp:r??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(Dn))):l.onClose(),s?.(E)},caller:at}),b=i.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),C=i.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,x(!0)},[x]),S=i.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),A=i.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,x(!0),m.current=0},v)},[v,x]);return i.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),p.jsx(Xt,{...u,children:p.jsx(Xu,{scope:t,contentId:h,open:y,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayedRef.current?A():C()},[l.isOpenDelayedRef,A,C]),onTriggerLeave:i.useCallback(()=>{w?S():(window.clearTimeout(m.current),m.current=0)},[S,w]),onOpen:C,onClose:S,disableHoverableContent:w,children:n})})};ns.displayName=at;var Nn="TooltipTrigger",os=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=ht(Nn,n),s=no(Nn,n),a=Qt(n),c=i.useRef(null),l=j(t,c,r.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(pt,{asChild:!0,...a,children:p.jsx(D.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:R(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:R(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:R(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:R(e.onBlur,r.onClose),onClick:R(e.onClick,r.onClose)})})});os.displayName=Nn;var oo="TooltipPortal",[qu,Zu]=Jt(oo,{forceMount:void 0}),rs=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=ht(oo,t);return p.jsx(qu,{scope:t,forceMount:n,children:p.jsx(Y,{present:n||s.open,children:p.jsx(Je,{asChild:!0,container:r,children:o})})})};rs.displayName=oo;var Ye="TooltipContent",ss=i.forwardRef((e,t)=>{const n=Zu(Ye,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,a=ht(Ye,e.__scopeTooltip);return p.jsx(Y,{present:o||a.open,children:a.disableHoverableContent?p.jsx(is,{side:r,...s,ref:t}):p.jsx(Ju,{side:r,...s,ref:t})})}),Ju=i.forwardRef((e,t)=>{const n=ht(Ye,e.__scopeTooltip),o=no(Ye,e.__scopeTooltip),r=i.useRef(null),s=j(t,r),[a,c]=i.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:f}=o,h=i.useCallback(()=>{c(null),f(!1)},[f]),m=i.useCallback((w,v)=>{const g=w.currentTarget,y={x:w.clientX,y:w.clientY},x=nd(y,g.getBoundingClientRect()),b=od(y,x),C=rd(v.getBoundingClientRect()),S=id([...b,...C]);c(S),f(!0)},[f]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(l&&d){const w=g=>m(g,d),v=g=>m(g,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",v)}}},[l,d,m,h]),i.useEffect(()=>{if(a){const w=v=>{const g=v.target,y={x:v.clientX,y:v.clientY},x=l?.contains(g)||d?.contains(g),b=!sd(y,a);x?h():b&&(h(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,a,u,h]),p.jsx(is,{...e,ref:s})}),[Qu,ed]=Jt(at,{isInside:!1}),td=Uu("TooltipContent"),is=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:a,...c}=e,l=ht(Ye,n),u=Qt(n),{onClose:d}=l;return i.useEffect(()=>(document.addEventListener(Dn,d),()=>document.removeEventListener(Dn,d)),[d]),i.useEffect(()=>{if(l.trigger){const f=h=>{h.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),p.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:p.jsxs(qt,{"data-state":l.stateAttribute,...u,...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:[p.jsx(td,{children:o}),p.jsx(Qu,{scope:n,isInside:!0,children:p.jsx(Ku,{id:l.contentId,role:"tooltip",children:r||o})})]})})});ss.displayName=Ye;var as="TooltipArrow",cs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Qt(n);return ed(as,n).isInside?null:p.jsx(Zt,{...r,...o,ref:t})});cs.displayName=as;function nd(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function od(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function rd(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function sd(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],l=t[a],u=c.x,d=c.y,f=l.x,h=l.y;d>o!=h>o&&n<(f-u)*(o-d)/(h-d)+u&&(r=!r)}return r}function id(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),ad(t)}function ad(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}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 gh=ts,wh=ns,yh=os,xh=rs,bh=ss,Ch=cs,en="Collapsible",[cd]=Q(en),[ld,ro]=cd(en),ls=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:s,onOpenChange:a,...c}=e,[l,u]=me({prop:o,defaultProp:r??!1,onChange:a,caller:en});return p.jsx(ld,{scope:n,disabled:s,contentId:ne(),open:l,onOpenToggle:i.useCallback(()=>u(d=>!d),[u]),children:p.jsx(D.div,{"data-state":io(l),"data-disabled":s?"":void 0,...c,ref:t})})});ls.displayName=en;var us="CollapsibleTrigger",ud=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=ro(us,n);return p.jsx(D.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":io(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:R(e.onClick,r.onOpenToggle)})});ud.displayName=us;var so="CollapsibleContent",dd=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ro(so,e.__scopeCollapsible);return p.jsx(Y,{present:n||r.open,children:({present:s})=>p.jsx(fd,{...o,ref:t,present:s})})});dd.displayName=so;var fd=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...s}=e,a=ro(so,n),[c,l]=i.useState(o),u=i.useRef(null),d=j(t,u),f=i.useRef(0),h=f.current,m=i.useRef(0),w=m.current,v=a.open||c,g=i.useRef(v),y=i.useRef(void 0);return i.useEffect(()=>{const x=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(x)},[]),z(()=>{const x=u.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const b=x.getBoundingClientRect();f.current=b.height,m.current=b.width,g.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),l(o)}},[a.open,o]),p.jsx(D.div,{"data-state":io(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...s,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:v&&r})});function io(e){return e?"open":"closed"}var Sh=ls,pd=i.createContext(void 0);function vt(e){const t=i.useContext(pd);return e||t||"ltr"}function Ln(e,[t,n]){return Math.min(n,Math.max(t,e))}function hd(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var ao="ScrollArea",[ds]=Q(ao),[vd,ae]=ds(ao),fs=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:o="hover",dir:r,scrollHideDelay:s=600,...a}=e,[c,l]=i.useState(null),[u,d]=i.useState(null),[f,h]=i.useState(null),[m,w]=i.useState(null),[v,g]=i.useState(null),[y,x]=i.useState(0),[b,C]=i.useState(0),[S,A]=i.useState(!1),[E,_]=i.useState(!1),I=j(t,L=>l(L)),O=vt(r);return p.jsx(vd,{scope:n,type:o,dir:O,scrollHideDelay:s,scrollArea:c,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:w,scrollbarXEnabled:S,onScrollbarXEnabledChange:A,scrollbarY:v,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:_,onCornerWidthChange:x,onCornerHeightChange:C,children:p.jsx(D.div,{dir:O,...a,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});fs.displayName=ao;var ps="ScrollAreaViewport",hs=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:o,nonce:r,...s}=e,a=ae(ps,n),c=i.useRef(null),l=j(t,c,a.onViewportChange);return p.jsxs(p.Fragment,{children:[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:r}),p.jsx(D.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});hs.displayName=ps;var xe="ScrollAreaScrollbar",vs=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ae(xe,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=r,c=e.orientation==="horizontal";return i.useEffect(()=>(c?s(!0):a(!0),()=>{c?s(!1):a(!1)}),[c,s,a]),r.type==="hover"?p.jsx(md,{...o,ref:t,forceMount:n}):r.type==="scroll"?p.jsx(gd,{...o,ref:t,forceMount:n}):r.type==="auto"?p.jsx(ms,{...o,ref:t,forceMount:n}):r.type==="always"?p.jsx(co,{...o,ref:t}):null});vs.displayName=xe;var md=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ae(xe,e.__scopeScrollArea),[s,a]=i.useState(!1);return i.useEffect(()=>{const c=r.scrollArea;let l=0;if(c){const u=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return c.addEventListener("pointerenter",u),c.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),c.removeEventListener("pointerenter",u),c.removeEventListener("pointerleave",d)}}},[r.scrollArea,r.scrollHideDelay]),p.jsx(Y,{present:n||s,children:p.jsx(ms,{"data-state":s?"visible":"hidden",...o,ref:t})})}),gd=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ae(xe,e.__scopeScrollArea),s=e.orientation==="horizontal",a=nn(()=>l("SCROLL_END"),100),[c,l]=hd("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 i.useEffect(()=>{if(c==="idle"){const u=window.setTimeout(()=>l("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(u)}},[c,r.scrollHideDelay,l]),i.useEffect(()=>{const u=r.viewport,d=s?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const m=u[d];f!==m&&(l("SCROLL"),a()),f=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[r.viewport,s,l,a]),p.jsx(Y,{present:n||c!=="hidden",children:p.jsx(co,{"data-state":c==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:R(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:R(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ms=i.forwardRef((e,t)=>{const n=ae(xe,e.__scopeScrollArea),{forceMount:o,...r}=e,[s,a]=i.useState(!1),c=e.orientation==="horizontal",l=nn(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(c?u:d)}},10);return Xe(n.viewport,l),Xe(n.content,l),p.jsx(Y,{present:o||s,children:p.jsx(co,{"data-state":s?"visible":"hidden",...r,ref:t})})}),co=i.forwardRef((e,t)=>{const{orientation:n="vertical",...o}=e,r=ae(xe,e.__scopeScrollArea),s=i.useRef(null),a=i.useRef(0),[c,l]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=bs(c.viewport,c.content),d={...o,sizes:c,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:h=>s.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function f(h,m){return Sd(h,a.current,c,m)}return n==="horizontal"?p.jsx(wd,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const h=r.viewport.scrollLeft,m=Xo(h,c,r.dir);s.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollLeft=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollLeft=f(h,r.dir))}}):n==="vertical"?p.jsx(yd,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const h=r.viewport.scrollTop,m=Xo(h,c);s.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollTop=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollTop=f(h))}}):null}),wd=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ae(xe,e.__scopeScrollArea),[a,c]=i.useState(),l=i.useRef(null),u=j(t,l,s.onScrollbarXChange);return i.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),p.jsx(ws,{"data-orientation":"horizontal",...r,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":tn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),Ss(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:jt(a.paddingLeft),paddingEnd:jt(a.paddingRight)}})}})}),yd=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ae(xe,e.__scopeScrollArea),[a,c]=i.useState(),l=i.useRef(null),u=j(t,l,s.onScrollbarYChange);return i.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),p.jsx(ws,{"data-orientation":"vertical",...r,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":tn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),Ss(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:jt(a.paddingTop),paddingEnd:jt(a.paddingBottom)}})}})}),[xd,gs]=ds(xe),ws=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:o,hasThumb:r,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:c,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,m=ae(xe,n),[w,v]=i.useState(null),g=j(t,I=>v(I)),y=i.useRef(null),x=i.useRef(""),b=m.viewport,C=o.content-o.viewport,S=X(d),A=X(l),E=nn(f,10);function _(I){if(y.current){const O=I.clientX-y.current.left,L=I.clientY-y.current.top;u({x:O,y:L})}}return i.useEffect(()=>{const I=O=>{const L=O.target;w?.contains(L)&&S(O,C)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[b,w,C,S]),i.useEffect(A,[o,A]),Xe(w,E),Xe(m.content,E),p.jsx(xd,{scope:n,scrollbar:w,hasThumb:r,onThumbChange:X(s),onThumbPointerUp:X(a),onThumbPositionChange:A,onThumbPointerDown:X(c),children:p.jsx(D.div,{...h,ref:g,style:{position:"absolute",...h.style},onPointerDown:R(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),y.current=w.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),_(I))}),onPointerMove:R(e.onPointerMove,_),onPointerUp:R(e.onPointerUp,I=>{const O=I.target;O.hasPointerCapture(I.pointerId)&&O.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=x.current,m.viewport&&(m.viewport.style.scrollBehavior=""),y.current=null})})})}),Lt="ScrollAreaThumb",ys=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=gs(Lt,e.__scopeScrollArea);return p.jsx(Y,{present:n||r.hasThumb,children:p.jsx(bd,{ref:t,...o})})}),bd=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:o,...r}=e,s=ae(Lt,n),a=gs(Lt,n),{onThumbPositionChange:c}=a,l=j(t,f=>a.onThumbChange(f)),u=i.useRef(void 0),d=nn(()=>{u.current&&(u.current(),u.current=void 0)},100);return i.useEffect(()=>{const f=s.viewport;if(f){const h=()=>{if(d(),!u.current){const m=Ed(f,c);u.current=m,c()}};return c(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[s.viewport,d,c]),p.jsx(D.div,{"data-state":a.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:R(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),w=f.clientX-m.left,v=f.clientY-m.top;a.onThumbPointerDown({x:w,y:v})}),onPointerUp:R(e.onPointerUp,a.onThumbPointerUp)})});ys.displayName=Lt;var lo="ScrollAreaCorner",xs=i.forwardRef((e,t)=>{const n=ae(lo,e.__scopeScrollArea),o=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&o?p.jsx(Cd,{...e,ref:t}):null});xs.displayName=lo;var Cd=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,...o}=e,r=ae(lo,n),[s,a]=i.useState(0),[c,l]=i.useState(0),u=!!(s&&c);return Xe(r.scrollbarX,()=>{const d=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(d),l(d)}),Xe(r.scrollbarY,()=>{const d=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(d),a(d)}),u?p.jsx(D.div,{...o,ref:t,style:{width:s,height:c,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function jt(e){return e?parseInt(e,10):0}function bs(e,t){const n=e/t;return isNaN(n)?0:n}function tn(e){const t=bs(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-n)*t;return Math.max(o,18)}function Sd(e,t,n,o="ltr"){const r=tn(n),s=r/2,a=t||s,c=r-a,l=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-c,d=n.content-n.viewport,f=o==="ltr"?[0,d]:[d*-1,0];return Cs([l,u],f)(e)}function Xo(e,t,n="ltr"){const o=tn(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-r,a=t.content-t.viewport,c=s-o,l=n==="ltr"?[0,a]:[a*-1,0],u=Ln(e,l);return Cs([0,a],[0,c])(u)}function Cs(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function Ss(e,t){return e>0&&e<t}var Ed=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},o=0;return(function r(){const s={left:e.scrollLeft,top:e.scrollTop},a=n.left!==s.left,c=n.top!==s.top;(a||c)&&t(),n=s,o=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(o)};function nn(e,t){const n=X(e),o=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),i.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,t)},[n,t])}function Xe(e,t){const n=X(t);z(()=>{let o=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(o),r.unobserve(e)}}},[e,n])}var Eh=fs,Rh=hs,Ph=vs,Ah=ys,Th=xs,Rd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pd=Rd.reduce((e,t)=>{const n=Un(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Ad="Label",Es=i.forwardRef((e,t)=>p.jsx(Pd.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Es.displayName=Ad;var _h=Es,Td=Symbol("radix.slottable");function _d(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Td,t}var Rs="AlertDialog",[Id]=Q(Rs,[pr]),Re=pr(),Ps=e=>{const{__scopeAlertDialog:t,...n}=e,o=Re(t);return p.jsx(wl,{...o,...n,modal:!0})};Ps.displayName=Rs;var Od="AlertDialogTrigger",Md=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(yl,{...r,...o,ref:t})});Md.displayName=Od;var Dd="AlertDialogPortal",As=e=>{const{__scopeAlertDialog:t,...n}=e,o=Re(t);return p.jsx(xl,{...o,...n})};As.displayName=Dd;var Nd="AlertDialogOverlay",Ts=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(bl,{...r,...o,ref:t})});Ts.displayName=Nd;var Ke="AlertDialogContent",[Ld,jd]=Id(Ke),kd=_d("AlertDialogContent"),_s=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...r}=e,s=Re(n),a=i.useRef(null),c=j(t,a),l=i.useRef(null);return p.jsx(hl,{contentName:Ke,titleName:Is,docsSlug:"alert-dialog",children:p.jsx(Ld,{scope:n,cancelRef:l,children:p.jsxs(Cl,{role:"alertdialog",...s,...r,ref:c,onOpenAutoFocus:R(r.onOpenAutoFocus,u=>{u.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[p.jsx(kd,{children:o}),p.jsx(Fd,{contentRef:a})]})})})});_s.displayName=Ke;var Is="AlertDialogTitle",Os=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(Sl,{...r,...o,ref:t})});Os.displayName=Is;var Ms="AlertDialogDescription",Ds=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(El,{...r,...o,ref:t})});Ds.displayName=Ms;var $d="AlertDialogAction",Ns=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(_r,{...r,...o,ref:t})});Ns.displayName=$d;var Ls="AlertDialogCancel",js=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:r}=jd(Ls,n),s=Re(n),a=j(t,r);return p.jsx(_r,{...s,...o,ref:a})});js.displayName=Ls;var Fd=({contentRef:e})=>{const t=`\`${Ke}\` requires a description for the component to be accessible for screen reader users.
|
|
46
|
+
|
|
47
|
+
You can add a description to the \`${Ke}\` by passing a \`${Ms}\` 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 \`${Ke}\`. 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 i.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Ih=Ps,Oh=As,Mh=Ts,Dh=_s,Nh=Ns,Lh=js,jh=Os,kh=Ds;function qo(e){const t=Wd(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Vd);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Wd(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=Ud(r),c=Hd(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Bd=Symbol("radix.slottable");function Vd(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Bd}function Hd(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Ud(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)}function uo(e){const t=e+"CollectionProvider",[n,o]=Q(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:g,children:y}=v,x=Ne.useRef(null),b=Ne.useRef(new Map).current;return p.jsx(r,{scope:g,itemMap:b,collectionRef:x,children:y})};a.displayName=t;const c=e+"CollectionSlot",l=qo(c),u=Ne.forwardRef((v,g)=>{const{scope:y,children:x}=v,b=s(c,y),C=j(g,b.collectionRef);return p.jsx(l,{ref:C,children:x})});u.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=qo(d),m=Ne.forwardRef((v,g)=>{const{scope:y,children:x,...b}=v,C=Ne.useRef(null),S=j(g,C),A=s(d,y);return Ne.useEffect(()=>(A.itemMap.set(C,{ref:C,...b}),()=>void A.itemMap.delete(C))),p.jsx(h,{[f]:"",ref:S,children:x})});m.displayName=d;function w(v){const g=s(e+"CollectionConsumer",v);return Ne.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((A,E)=>b.indexOf(A.ref.current)-b.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},w,o]}var An="rovingFocusGroup.onEntryFocus",Gd={bubbles:!1,cancelable:!0},mt="RovingFocusGroup",[jn,ks,Kd]=uo(mt),[zd,on]=Q(mt,[Kd]),[Yd,Xd]=zd(mt),$s=i.forwardRef((e,t)=>p.jsx(jn.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(jn.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(qd,{...e,ref:t})})}));$s.displayName=mt;var qd=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=i.useRef(null),m=j(t,h),w=vt(s),[v,g]=me({prop:a,defaultProp:c??null,onChange:l,caller:mt}),[y,x]=i.useState(!1),b=X(u),C=ks(n),S=i.useRef(!1),[A,E]=i.useState(0);return i.useEffect(()=>{const _=h.current;if(_)return _.addEventListener(An,b),()=>_.removeEventListener(An,b)},[b]),p.jsx(Yd,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:v,onItemFocus:i.useCallback(_=>g(_),[g]),onItemShiftTab:i.useCallback(()=>x(!0),[]),onFocusableItemAdd:i.useCallback(()=>E(_=>_+1),[]),onFocusableItemRemove:i.useCallback(()=>E(_=>_-1),[]),children:p.jsx(D.div,{tabIndex:y||A===0?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:R(e.onMouseDown,()=>{S.current=!0}),onFocus:R(e.onFocus,_=>{const I=!S.current;if(_.target===_.currentTarget&&I&&!y){const O=new CustomEvent(An,Gd);if(_.currentTarget.dispatchEvent(O),!O.defaultPrevented){const L=C().filter(N=>N.focusable),$=L.find(N=>N.active),F=L.find(N=>N.id===v),B=[$,F,...L].filter(Boolean).map(N=>N.ref.current);Bs(B,d)}}S.current=!1}),onBlur:R(e.onBlur,()=>x(!1))})})}),Fs="RovingFocusGroupItem",Ws=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...c}=e,l=ne(),u=s||l,d=Xd(Fs,n),f=d.currentTabStopId===u,h=ks(n),{onFocusableItemAdd:m,onFocusableItemRemove:w,currentTabStopId:v}=d;return i.useEffect(()=>{if(o)return m(),()=>w()},[o,m,w]),p.jsx(jn.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:p.jsx(D.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:R(e.onMouseDown,g=>{o?d.onItemFocus(u):g.preventDefault()}),onFocus:R(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:R(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=Qd(g,d.orientation,d.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=h().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const C=b.indexOf(g.currentTarget);b=d.loop?ef(b,C+1):b.slice(C+1)}setTimeout(()=>Bs(b))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:v!=null}):a})})});Ws.displayName=Fs;var Zd={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Jd(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Qd(e,t,n){const o=Jd(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Zd[o]}function Bs(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function ef(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Vs=$s,Hs=Ws,rn="Tabs",[tf]=Q(rn,[on]),Us=on(),[nf,fo]=tf(rn),Gs=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:s,orientation:a="horizontal",dir:c,activationMode:l="automatic",...u}=e,d=vt(c),[f,h]=me({prop:o,onChange:r,defaultProp:s??"",caller:rn});return p.jsx(nf,{scope:n,baseId:ne(),value:f,onValueChange:h,orientation:a,dir:d,activationMode:l,children:p.jsx(D.div,{dir:d,"data-orientation":a,...u,ref:t})})});Gs.displayName=rn;var Ks="TabsList",zs=i.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,s=fo(Ks,n),a=Us(n);return p.jsx(Vs,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:o,children:p.jsx(D.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:t})})});zs.displayName=Ks;var Ys="TabsTrigger",Xs=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...s}=e,a=fo(Ys,n),c=Us(n),l=Js(a.baseId,o),u=Qs(a.baseId,o),d=o===a.value;return p.jsx(Hs,{asChild:!0,...c,focusable:!r,active:d,children:p.jsx(D.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:t,onMouseDown:R(e.onMouseDown,f=>{!r&&f.button===0&&f.ctrlKey===!1?a.onValueChange(o):f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(o)}),onFocus:R(e.onFocus,()=>{const f=a.activationMode!=="manual";!d&&!r&&f&&a.onValueChange(o)})})})});Xs.displayName=Ys;var qs="TabsContent",Zs=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:s,...a}=e,c=fo(qs,n),l=Js(c.baseId,o),u=Qs(c.baseId,o),d=o===c.value,f=i.useRef(d);return i.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),p.jsx(Y,{present:r||d,children:({present:h})=>p.jsx(D.div,{"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&s})})});Zs.displayName=qs;function Js(e,t){return`${e}-trigger-${t}`}function Qs(e,t){return`${e}-content-${t}`}var $h=Gs,Fh=zs,Wh=Xs,Bh=Zs;function of(e){const t=rf(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(af);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function rf(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=lf(r),c=cf(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sf=Symbol("radix.slottable");function af(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sf}function cf(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function lf(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)}function ei(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var uf=[" ","Enter","ArrowUp","ArrowDown"],df=[" ","Enter"],ke="Select",[sn,an,ff]=uo(ke),[tt]=Q(ke,[ff,_e]),cn=_e(),[pf,Ie]=tt(ke),[hf,vf]=tt(ke),ti=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:a,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:h,required:m,form:w}=e,v=cn(t),[g,y]=i.useState(null),[x,b]=i.useState(null),[C,S]=i.useState(!1),A=vt(u),[E,_]=me({prop:o,defaultProp:r??!1,onChange:s,caller:ke}),[I,O]=me({prop:a,defaultProp:c,onChange:l,caller:ke}),L=i.useRef(null),$=g?w||!!g.closest("form"):!0,[F,k]=i.useState(new Set),B=Array.from(F).map(N=>N.props.value).join(";");return p.jsx(Xt,{...v,children:p.jsxs(pf,{required:m,scope:t,trigger:g,onTriggerChange:y,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:C,onValueNodeHasChildrenChange:S,contentId:ne(),value:I,onValueChange:O,open:E,onOpenChange:_,dir:A,triggerPointerDownPosRef:L,disabled:h,children:[p.jsx(sn.Provider,{scope:t,children:p.jsx(hf,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(N=>{k(W=>new Set(W).add(N))},[]),onNativeOptionRemove:i.useCallback(N=>{k(W=>{const M=new Set(W);return M.delete(N),M})},[]),children:n})}),$?p.jsxs(Pi,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:I,onChange:N=>O(N.target.value),disabled:h,form:w,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(F)]},B):null]})})};ti.displayName=ke;var ni="SelectTrigger",oi=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=cn(n),a=Ie(ni,n),c=a.disabled||o,l=j(t,a.onTriggerChange),u=an(n),d=i.useRef("touch"),[f,h,m]=Ti(v=>{const g=u().filter(b=>!b.disabled),y=g.find(b=>b.value===a.value),x=_i(g,v,y);x!==void 0&&a.onValueChange(x.value)}),w=v=>{c||(a.onOpenChange(!0),m()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return p.jsx(pt,{asChild:!0,...s,children:p.jsx(D.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Ai(a.value)?"":void 0,...r,ref:l,onClick:R(r.onClick,v=>{v.currentTarget.focus(),d.current!=="mouse"&&w(v)}),onPointerDown:R(r.onPointerDown,v=>{d.current=v.pointerType;const g=v.target;g.hasPointerCapture(v.pointerId)&&g.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(w(v),v.preventDefault())}),onKeyDown:R(r.onKeyDown,v=>{const g=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&h(v.key),!(g&&v.key===" ")&&uf.includes(v.key)&&(w(),v.preventDefault())})})})});oi.displayName=ni;var ri="SelectValue",si=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:a="",...c}=e,l=Ie(ri,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,f=j(t,l.onValueNodeChange);return z(()=>{u(d)},[u,d]),p.jsx(D.span,{...c,ref:f,style:{pointerEvents:"none"},children:Ai(l.value)?p.jsx(p.Fragment,{children:a}):s})});si.displayName=ri;var mf="SelectIcon",ii=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return p.jsx(D.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});ii.displayName=mf;var gf="SelectPortal",ai=e=>p.jsx(Je,{asChild:!0,...e});ai.displayName=gf;var $e="SelectContent",ci=i.forwardRef((e,t)=>{const n=Ie($e,e.__scopeSelect),[o,r]=i.useState();if(z(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?Wt.createPortal(p.jsx(li,{scope:e.__scopeSelect,children:p.jsx(sn.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(ui,{...e,ref:t})});ci.displayName=$e;var le=10,[li,Oe]=tt($e),wf="SelectContentImpl",yf=of("SelectContent.RemoveScroll"),ui=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:w,hideWhenDetached:v,avoidCollisions:g,...y}=e,x=Ie($e,n),[b,C]=i.useState(null),[S,A]=i.useState(null),E=j(t,T=>C(T)),[_,I]=i.useState(null),[O,L]=i.useState(null),$=an(n),[F,k]=i.useState(!1),B=i.useRef(!1);i.useEffect(()=>{if(b)return Ht(b)},[b]),Bt();const N=i.useCallback(T=>{const[V,...Z]=$().map(K=>K.ref.current),[H]=Z.slice(-1),U=document.activeElement;for(const K of T)if(K===U||(K?.scrollIntoView({block:"nearest"}),K===V&&S&&(S.scrollTop=0),K===H&&S&&(S.scrollTop=S.scrollHeight),K?.focus(),document.activeElement!==U))return},[$,S]),W=i.useCallback(()=>N([_,b]),[N,_,b]);i.useEffect(()=>{F&&W()},[F,W]);const{onOpenChange:M,triggerPointerDownPosRef:P}=x;i.useEffect(()=>{if(b){let T={x:0,y:0};const V=H=>{T={x:Math.abs(Math.round(H.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(H.pageY)-(P.current?.y??0))}},Z=H=>{T.x<=10&&T.y<=10?H.preventDefault():b.contains(H.target)||M(!1),document.removeEventListener("pointermove",V),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",Z,{capture:!0})}}},[b,M,P]),i.useEffect(()=>{const T=()=>M(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[M]);const[G,q]=Ti(T=>{const V=$().filter(U=>!U.disabled),Z=V.find(U=>U.ref.current===document.activeElement),H=_i(V,T,Z);H&&setTimeout(()=>H.ref.current.focus())}),ce=i.useCallback((T,V,Z)=>{const H=!B.current&&!Z;(x.value!==void 0&&x.value===V||H)&&(I(T),H&&(B.current=!0))},[x.value]),be=i.useCallback(()=>b?.focus(),[b]),re=i.useCallback((T,V,Z)=>{const H=!B.current&&!Z;(x.value!==void 0&&x.value===V||H)&&L(T)},[x.value]),Ce=o==="popper"?kn:di,ee=Ce===kn?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:w,hideWhenDetached:v,avoidCollisions:g}:{};return p.jsx(li,{scope:n,content:b,viewport:S,onViewportChange:A,itemRefCallback:ce,selectedItem:_,onItemLeave:be,itemTextRefCallback:re,focusSelectedItem:W,selectedItemText:O,position:o,isPositioned:F,searchRef:G,children:p.jsx(dt,{as:yf,allowPinchZoom:!0,children:p.jsx(ut,{asChild:!0,trapped:x.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:R(r,T=>{x.trigger?.focus({preventScroll:!0}),T.preventDefault()}),children:p.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:p.jsx(Ce,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:T=>T.preventDefault(),...y,...ee,onPlaced:()=>k(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:R(y.onKeyDown,T=>{const V=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!V&&T.key.length===1&&q(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let H=$().filter(U=>!U.disabled).map(U=>U.ref.current);if(["ArrowUp","End"].includes(T.key)&&(H=H.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const U=T.target,K=H.indexOf(U);H=H.slice(K+1)}setTimeout(()=>N(H)),T.preventDefault()}})})})})})})});ui.displayName=wf;var xf="SelectItemAlignedPosition",di=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=Ie($e,n),a=Oe($e,n),[c,l]=i.useState(null),[u,d]=i.useState(null),f=j(t,E=>d(E)),h=an(n),m=i.useRef(!1),w=i.useRef(!0),{viewport:v,selectedItem:g,selectedItemText:y,focusSelectedItem:x}=a,b=i.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&v&&g&&y){const E=s.trigger.getBoundingClientRect(),_=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),O=y.getBoundingClientRect();if(s.dir!=="rtl"){const U=O.left-_.left,K=I.left-U,se=E.left-K,De=E.width+se,hn=Math.max(De,_.width),vn=window.innerWidth-le,mn=Ln(K,[le,Math.max(le,vn-hn)]);c.style.minWidth=De+"px",c.style.left=mn+"px"}else{const U=_.right-O.right,K=window.innerWidth-I.right-U,se=window.innerWidth-E.right-K,De=E.width+se,hn=Math.max(De,_.width),vn=window.innerWidth-le,mn=Ln(K,[le,Math.max(le,vn-hn)]);c.style.minWidth=De+"px",c.style.right=mn+"px"}const L=h(),$=window.innerHeight-le*2,F=v.scrollHeight,k=window.getComputedStyle(u),B=parseInt(k.borderTopWidth,10),N=parseInt(k.paddingTop,10),W=parseInt(k.borderBottomWidth,10),M=parseInt(k.paddingBottom,10),P=B+N+F+M+W,G=Math.min(g.offsetHeight*5,P),q=window.getComputedStyle(v),ce=parseInt(q.paddingTop,10),be=parseInt(q.paddingBottom,10),re=E.top+E.height/2-le,Ce=$-re,ee=g.offsetHeight/2,T=g.offsetTop+ee,V=B+N+T,Z=P-V;if(V<=re){const U=L.length>0&&g===L[L.length-1].ref.current;c.style.bottom="0px";const K=u.clientHeight-v.offsetTop-v.offsetHeight,se=Math.max(Ce,ee+(U?be:0)+K+W),De=V+se;c.style.height=De+"px"}else{const U=L.length>0&&g===L[0].ref.current;c.style.top="0px";const se=Math.max(re,B+v.offsetTop+(U?ce:0)+ee)+Z;c.style.height=se+"px",v.scrollTop=V-re+v.offsetTop}c.style.margin=`${le}px 0`,c.style.minHeight=G+"px",c.style.maxHeight=$+"px",o?.(),requestAnimationFrame(()=>m.current=!0)}},[h,s.trigger,s.valueNode,c,u,v,g,y,s.dir,o]);z(()=>b(),[b]);const[C,S]=i.useState();z(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const A=i.useCallback(E=>{E&&w.current===!0&&(b(),x?.(),w.current=!1)},[b,x]);return p.jsx(Cf,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:A,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(D.div,{...r,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});di.displayName=xf;var bf="SelectPopperPosition",kn=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=le,...s}=e,a=cn(n);return p.jsx(qt,{...a,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});kn.displayName=bf;var[Cf,po]=tt($e,{}),$n="SelectViewport",fi=i.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=Oe($n,n),a=po($n,n),c=j(t,s.onViewportChange),l=i.useRef(0);return p.jsxs(p.Fragment,{children:[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:o}),p.jsx(sn.Slot,{scope:n,children:p.jsx(D.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:R(r.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h?.current&&f){const m=Math.abs(l.current-d.scrollTop);if(m>0){const w=window.innerHeight-le*2,v=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),y=Math.max(v,g);if(y<w){const x=y+m,b=Math.min(w,x),C=x-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});fi.displayName=$n;var pi="SelectGroup",[Sf,Ef]=tt(pi),hi=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ne();return p.jsx(Sf,{scope:n,id:r,children:p.jsx(D.div,{role:"group","aria-labelledby":r,...o,ref:t})})});hi.displayName=pi;var vi="SelectLabel",mi=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ef(vi,n);return p.jsx(D.div,{id:r.id,...o,ref:t})});mi.displayName=vi;var kt="SelectItem",[Rf,gi]=tt(kt),wi=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...a}=e,c=Ie(kt,n),l=Oe(kt,n),u=c.value===o,[d,f]=i.useState(s??""),[h,m]=i.useState(!1),w=j(t,x=>l.itemRefCallback?.(x,o,r)),v=ne(),g=i.useRef("touch"),y=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")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 p.jsx(Rf,{scope:n,value:o,disabled:r,textId:v,isSelected:u,onItemTextChange:i.useCallback(x=>{f(b=>b||(x?.textContent??"").trim())},[]),children:p.jsx(sn.ItemSlot,{scope:n,value:o,disabled:r,textValue:d,children:p.jsx(D.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:w,onFocus:R(a.onFocus,()=>m(!0)),onBlur:R(a.onBlur,()=>m(!1)),onClick:R(a.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:R(a.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:R(a.onPointerDown,x=>{g.current=x.pointerType}),onPointerMove:R(a.onPointerMove,x=>{g.current=x.pointerType,r?l.onItemLeave?.():g.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:R(a.onKeyDown,x=>{l.searchRef?.current!==""&&x.key===" "||(df.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});wi.displayName=kt;var ot="SelectItemText",yi=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,a=Ie(ot,n),c=Oe(ot,n),l=gi(ot,n),u=vf(ot,n),[d,f]=i.useState(null),h=j(t,y=>f(y),l.onItemTextChange,y=>c.itemTextRefCallback?.(y,l.value,l.disabled)),m=d?.textContent,w=i.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:g}=u;return z(()=>(v(w),()=>g(w)),[v,g,w]),p.jsxs(p.Fragment,{children:[p.jsx(D.span,{id:l.textId,...s,ref:h}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Wt.createPortal(s.children,a.valueNode):null]})});yi.displayName=ot;var xi="SelectItemIndicator",bi=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return gi(xi,n).isSelected?p.jsx(D.span,{"aria-hidden":!0,...o,ref:t}):null});bi.displayName=xi;var Fn="SelectScrollUpButton",Ci=i.forwardRef((e,t)=>{const n=Oe(Fn,e.__scopeSelect),o=po(Fn,e.__scopeSelect),[r,s]=i.useState(!1),a=j(t,o.onScrollButtonChange);return z(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?p.jsx(Ei,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});Ci.displayName=Fn;var Wn="SelectScrollDownButton",Si=i.forwardRef((e,t)=>{const n=Oe(Wn,e.__scopeSelect),o=po(Wn,e.__scopeSelect),[r,s]=i.useState(!1),a=j(t,o.onScrollButtonChange);return z(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?p.jsx(Ei,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});Si.displayName=Wn;var Ei=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=Oe("SelectScrollButton",n),a=i.useRef(null),c=an(n),l=i.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return i.useEffect(()=>()=>l(),[l]),z(()=>{c().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),p.jsx(D.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:R(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:R(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:R(r.onPointerLeave,()=>{l()})})}),Pf="SelectSeparator",Ri=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return p.jsx(D.div,{"aria-hidden":!0,...o,ref:t})});Ri.displayName=Pf;var Bn="SelectArrow",Af=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=cn(n),s=Ie(Bn,n),a=Oe(Bn,n);return s.open&&a.position==="popper"?p.jsx(Zt,{...r,...o,ref:t}):null});Af.displayName=Bn;var Tf="SelectBubbleInput",Pi=i.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=i.useRef(null),s=j(o,r),a=ei(t);return i.useEffect(()=>{const c=r.current;if(!c)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&d){const f=new Event("change",{bubbles:!0});d.call(c,t),c.dispatchEvent(f)}},[a,t]),p.jsx(D.select,{...n,style:{...Jr,...n.style},ref:s,defaultValue:t})});Pi.displayName=Tf;function Ai(e){return e===""||e===void 0}function Ti(e){const t=X(e),n=i.useRef(""),o=i.useRef(0),r=i.useCallback(a=>{const c=n.current+a;t(c),(function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))})(c)},[t]),s=i.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function _i(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=_f(e,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function _f(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Vh=ti,Hh=oi,Uh=si,Gh=ii,Kh=ai,zh=ci,Yh=fi,Xh=hi,qh=mi,Zh=wi,Jh=yi,Qh=bi,ev=Ci,tv=Si,nv=Ri;function If(e){const t=Of(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Df);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Of(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=Lf(r),c=Nf(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mf=Symbol("radix.slottable");function Df(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Mf}function Nf(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Lf(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 Vn=["Enter"," "],jf=["ArrowDown","PageUp","Home"],Ii=["ArrowUp","PageDown","End"],kf=[...jf,...Ii],$f={ltr:[...Vn,"ArrowRight"],rtl:[...Vn,"ArrowLeft"]},Ff={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gt="Menu",[ct,Wf,Bf]=uo(gt),[Fe,Oi]=Q(gt,[Bf,_e,on]),ln=_e(),Mi=on(),[Vf,We]=Fe(gt),[Hf,wt]=Fe(gt),Di=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,c=ln(t),[l,u]=i.useState(null),d=i.useRef(!1),f=X(s),h=vt(r);return i.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),p.jsx(Xt,{...c,children:p.jsx(Vf,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:p.jsx(Hf,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:a,children:o})})})};Di.displayName=gt;var Uf="MenuAnchor",ho=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=ln(n);return p.jsx(pt,{...r,...o,ref:t})});ho.displayName=Uf;var vo="MenuPortal",[Gf,Ni]=Fe(vo,{forceMount:void 0}),Li=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=We(vo,t);return p.jsx(Gf,{scope:t,forceMount:n,children:p.jsx(Y,{present:n||s.open,children:p.jsx(Je,{asChild:!0,container:r,children:o})})})};Li.displayName=vo;var ie="MenuContent",[Kf,mo]=Fe(ie),ji=i.forwardRef((e,t)=>{const n=Ni(ie,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=We(ie,e.__scopeMenu),a=wt(ie,e.__scopeMenu);return p.jsx(ct.Provider,{scope:e.__scopeMenu,children:p.jsx(Y,{present:o||s.open,children:p.jsx(ct.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(zf,{...r,ref:t}):p.jsx(Yf,{...r,ref:t})})})})}),zf=i.forwardRef((e,t)=>{const n=We(ie,e.__scopeMenu),o=i.useRef(null),r=j(t,o);return i.useEffect(()=>{const s=o.current;if(s)return Ht(s)},[]),p.jsx(go,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Yf=i.forwardRef((e,t)=>{const n=We(ie,e.__scopeMenu);return p.jsx(go,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Xf=If("MenuContent.ScrollLock"),go=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:w,...v}=e,g=We(ie,n),y=wt(ie,n),x=ln(n),b=Mi(n),C=Wf(n),[S,A]=i.useState(null),E=i.useRef(null),_=j(t,E,g.onContentChange),I=i.useRef(0),O=i.useRef(""),L=i.useRef(0),$=i.useRef(null),F=i.useRef("right"),k=i.useRef(0),B=w?dt:i.Fragment,N=w?{as:Xf,allowPinchZoom:!0}:void 0,W=P=>{const G=O.current+P,q=C().filter(T=>!T.disabled),ce=document.activeElement,be=q.find(T=>T.ref.current===ce)?.textValue,re=q.map(T=>T.textValue),Ce=ap(re,G,be),ee=q.find(T=>T.textValue===Ce)?.ref.current;(function T(V){O.current=V,window.clearTimeout(I.current),V!==""&&(I.current=window.setTimeout(()=>T(""),1e3))})(G),ee&&setTimeout(()=>ee.focus())};i.useEffect(()=>()=>window.clearTimeout(I.current),[]),Bt();const M=i.useCallback(P=>F.current===$.current?.side&&lp(P,$.current?.area),[]);return p.jsx(Kf,{scope:n,searchRef:O,onItemEnter:i.useCallback(P=>{M(P)&&P.preventDefault()},[M]),onItemLeave:i.useCallback(P=>{M(P)||(E.current?.focus(),A(null))},[M]),onTriggerLeave:i.useCallback(P=>{M(P)&&P.preventDefault()},[M]),pointerGraceTimerRef:L,onPointerGraceIntentChange:i.useCallback(P=>{$.current=P},[]),children:p.jsx(B,{...N,children:p.jsx(ut,{asChild:!0,trapped:r,onMountAutoFocus:R(s,P=>{P.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:p.jsx(Vs,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:A,onEntryFocus:R(l,P=>{y.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(qt,{role:"menu","aria-orientation":"vertical","data-state":Ji(g.open),"data-radix-menu-content":"",dir:y.dir,...x,...v,ref:_,style:{outline:"none",...v.style},onKeyDown:R(v.onKeyDown,P=>{const q=P.target.closest("[data-radix-menu-content]")===P.currentTarget,ce=P.ctrlKey||P.altKey||P.metaKey,be=P.key.length===1;q&&(P.key==="Tab"&&P.preventDefault(),!ce&&be&&W(P.key));const re=E.current;if(P.target!==re||!kf.includes(P.key))return;P.preventDefault();const ee=C().filter(T=>!T.disabled).map(T=>T.ref.current);Ii.includes(P.key)&&ee.reverse(),sp(ee)}),onBlur:R(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(I.current),O.current="")}),onPointerMove:R(e.onPointerMove,lt(P=>{const G=P.target,q=k.current!==P.clientX;if(P.currentTarget.contains(G)&&q){const ce=P.clientX>k.current?"right":"left";F.current=ce,k.current=P.clientX}}))})})})})})})});ji.displayName=ie;var qf="MenuGroup",wo=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(D.div,{role:"group",...o,ref:t})});wo.displayName=qf;var Zf="MenuLabel",ki=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(D.div,{...o,ref:t})});ki.displayName=Zf;var $t="MenuItem",Zo="menu.itemSelect",un=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),a=wt($t,e.__scopeMenu),c=mo($t,e.__scopeMenu),l=j(t,s),u=i.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const h=new CustomEvent(Zo,{bubbles:!0,cancelable:!0});f.addEventListener(Zo,m=>o?.(m),{once:!0}),er(f,h),h.defaultPrevented?u.current=!1:a.onClose()}};return p.jsx($i,{...r,ref:l,disabled:n,onClick:R(e.onClick,d),onPointerDown:f=>{e.onPointerDown?.(f),u.current=!0},onPointerUp:R(e.onPointerUp,f=>{u.current||f.currentTarget?.click()}),onKeyDown:R(e.onKeyDown,f=>{const h=c.searchRef.current!=="";n||h&&f.key===" "||Vn.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});un.displayName=$t;var $i=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=mo($t,n),c=Mi(n),l=i.useRef(null),u=j(t,l),[d,f]=i.useState(!1),[h,m]=i.useState("");return i.useEffect(()=>{const w=l.current;w&&m((w.textContent??"").trim())},[s.children]),p.jsx(ct.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:p.jsx(Hs,{asChild:!0,...c,focusable:!o,children:p.jsx(D.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:R(e.onPointerMove,lt(w=>{o?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,lt(w=>a.onItemLeave(w))),onFocus:R(e.onFocus,()=>f(!0)),onBlur:R(e.onBlur,()=>f(!1))})})})}),Jf="MenuCheckboxItem",Fi=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return p.jsx(Ui,{scope:e.__scopeMenu,checked:n,children:p.jsx(un,{role:"menuitemcheckbox","aria-checked":Ft(n)?"mixed":n,...r,ref:t,"data-state":xo(n),onSelect:R(r.onSelect,()=>o?.(Ft(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Fi.displayName=Jf;var Wi="MenuRadioGroup",[Qf,ep]=Fe(Wi,{value:void 0,onValueChange:()=>{}}),Bi=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=X(o);return p.jsx(Qf,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(wo,{...r,ref:t})})});Bi.displayName=Wi;var Vi="MenuRadioItem",Hi=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=ep(Vi,e.__scopeMenu),s=n===r.value;return p.jsx(Ui,{scope:e.__scopeMenu,checked:s,children:p.jsx(un,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":xo(s),onSelect:R(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Hi.displayName=Vi;var yo="MenuItemIndicator",[Ui,tp]=Fe(yo,{checked:!1}),Gi=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=tp(yo,n);return p.jsx(Y,{present:o||Ft(s.checked)||s.checked===!0,children:p.jsx(D.span,{...r,ref:t,"data-state":xo(s.checked)})})});Gi.displayName=yo;var np="MenuSeparator",Ki=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(D.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});Ki.displayName=np;var op="MenuArrow",zi=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=ln(n);return p.jsx(Zt,{...r,...o,ref:t})});zi.displayName=op;var rp="MenuSub",[ov,Yi]=Fe(rp),rt="MenuSubTrigger",Xi=i.forwardRef((e,t)=>{const n=We(rt,e.__scopeMenu),o=wt(rt,e.__scopeMenu),r=Yi(rt,e.__scopeMenu),s=mo(rt,e.__scopeMenu),a=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=i.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),l(null)}},[c,l]),p.jsx(ho,{asChild:!0,...u,children:p.jsx($i,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Ji(n.open),...e,ref:we(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:R(e.onPointerMove,lt(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:R(e.onPointerLeave,lt(f=>{d();const h=n.content?.getBoundingClientRect();if(h){const m=n.content?.dataset.side,w=m==="right",v=w?-5:5,g=h[w?"left":"right"],y=h[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:g,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:g,y:h.bottom}],side:m}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,f=>{const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||$f[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});Xi.displayName=rt;var qi="MenuSubContent",Zi=i.forwardRef((e,t)=>{const n=Ni(ie,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=We(ie,e.__scopeMenu),a=wt(ie,e.__scopeMenu),c=Yi(qi,e.__scopeMenu),l=i.useRef(null),u=j(t,l);return p.jsx(ct.Provider,{scope:e.__scopeMenu,children:p.jsx(Y,{present:o||s.open,children:p.jsx(ct.Slot,{scope:e.__scopeMenu,children:p.jsx(go,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{a.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:R(e.onFocusOutside,d=>{d.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:R(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),h=Ff[a.dir].includes(d.key);f&&h&&(s.onOpenChange(!1),c.trigger?.focus(),d.preventDefault())})})})})})});Zi.displayName=qi;function Ji(e){return e?"open":"closed"}function Ft(e){return e==="indeterminate"}function xo(e){return Ft(e)?"indeterminate":e?"checked":"unchecked"}function sp(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ip(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function ap(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=ip(e,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function cp(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],l=t[a],u=c.x,d=c.y,f=l.x,h=l.y;d>o!=h>o&&n<(f-u)*(o-d)/(h-d)+u&&(r=!r)}return r}function lp(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return cp(n,t)}function lt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var up=Di,dp=ho,fp=Li,pp=ji,hp=wo,vp=ki,mp=un,gp=Fi,wp=Bi,yp=Hi,xp=Gi,bp=Ki,Cp=zi,Sp=Xi,Ep=Zi,dn="DropdownMenu",[Rp]=Q(dn,[Oi]),J=Oi(),[Pp,Qi]=Rp(dn),ea=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,l=J(t),u=i.useRef(null),[d,f]=me({prop:r,defaultProp:s??!1,onChange:a,caller:dn});return p.jsx(Pp,{scope:t,triggerId:ne(),triggerRef:u,contentId:ne(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:c,children:p.jsx(up,{...l,open:d,onOpenChange:f,dir:o,modal:c,children:n})})};ea.displayName=dn;var ta="DropdownMenuTrigger",na=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=Qi(ta,n),a=J(n);return p.jsx(dp,{asChild:!0,...a,children:p.jsx(D.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:we(t,s.triggerRef),onPointerDown:R(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:R(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});na.displayName=ta;var Ap="DropdownMenuPortal",oa=e=>{const{__scopeDropdownMenu:t,...n}=e,o=J(t);return p.jsx(fp,{...o,...n})};oa.displayName=Ap;var ra="DropdownMenuContent",sa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Qi(ra,n),s=J(n),a=i.useRef(!1);return p.jsx(pp,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:R(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!r.modal||d)&&(a.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)"}})});sa.displayName=ra;var Tp="DropdownMenuGroup",_p=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(hp,{...r,...o,ref:t})});_p.displayName=Tp;var Ip="DropdownMenuLabel",Op=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(vp,{...r,...o,ref:t})});Op.displayName=Ip;var Mp="DropdownMenuItem",ia=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(mp,{...r,...o,ref:t})});ia.displayName=Mp;var Dp="DropdownMenuCheckboxItem",Np=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(gp,{...r,...o,ref:t})});Np.displayName=Dp;var Lp="DropdownMenuRadioGroup",jp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(wp,{...r,...o,ref:t})});jp.displayName=Lp;var kp="DropdownMenuRadioItem",$p=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(yp,{...r,...o,ref:t})});$p.displayName=kp;var Fp="DropdownMenuItemIndicator",Wp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(xp,{...r,...o,ref:t})});Wp.displayName=Fp;var Bp="DropdownMenuSeparator",Vp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(bp,{...r,...o,ref:t})});Vp.displayName=Bp;var Hp="DropdownMenuArrow",Up=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(Cp,{...r,...o,ref:t})});Up.displayName=Hp;var Gp="DropdownMenuSubTrigger",Kp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(Sp,{...r,...o,ref:t})});Kp.displayName=Gp;var zp="DropdownMenuSubContent",Yp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(Ep,{...r,...o,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)"}})});Yp.displayName=zp;var rv=ea,sv=na,iv=oa,av=sa,cv=ia,fn="Switch",[Xp]=Q(fn),[qp,Zp]=Xp(fn),aa=i.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:s,required:a,disabled:c,value:l="on",onCheckedChange:u,form:d,...f}=e,[h,m]=i.useState(null),w=j(t,b=>m(b)),v=i.useRef(!1),g=h?d||!!h.closest("form"):!0,[y,x]=me({prop:r,defaultProp:s??!1,onChange:u,caller:fn});return p.jsxs(qp,{scope:n,checked:y,disabled:c,children:[p.jsx(D.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":da(y),"data-disabled":c?"":void 0,disabled:c,value:l,...f,ref:w,onClick:R(e.onClick,b=>{x(C=>!C),g&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),g&&p.jsx(ua,{control:h,bubbles:!v.current,name:o,value:l,checked:y,required:a,disabled:c,form:d,style:{transform:"translateX(-100%)"}})]})});aa.displayName=fn;var ca="SwitchThumb",la=i.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=Zp(ca,n);return p.jsx(D.span,{"data-state":da(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});la.displayName=ca;var Jp="SwitchBubbleInput",ua=i.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const a=i.useRef(null),c=j(a,s),l=ei(n),u=Vr(t);return i.useEffect(()=>{const d=a.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const w=new Event("click",{bubbles:o});m.call(d,n),d.dispatchEvent(w)}},[l,n,o]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:c,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ua.displayName=Jp;function da(e){return e?"checked":"unchecked"}var lv=aa,uv=la;function Qp(e){const t=eh(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(nh);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function eh(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=rh(r),c=oh(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var th=Symbol("radix.slottable");function nh(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===th}function oh(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function rh(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 pn="Popover",[fa]=Q(pn,[_e]),yt=_e(),[sh,Me]=fa(pn),pa=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!1}=e,c=yt(t),l=i.useRef(null),[u,d]=i.useState(!1),[f,h]=me({prop:o,defaultProp:r??!1,onChange:s,caller:pn});return p.jsx(Xt,{...c,children:p.jsx(sh,{scope:t,contentId:ne(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:i.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>d(!0),[]),onCustomAnchorRemove:i.useCallback(()=>d(!1),[]),modal:a,children:n})})};pa.displayName=pn;var ha="PopoverAnchor",va=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Me(ha,n),s=yt(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:c}=r;return i.useEffect(()=>(a(),()=>c()),[a,c]),p.jsx(pt,{...s,...o,ref:t})});va.displayName=ha;var ma="PopoverTrigger",ga=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Me(ma,n),s=yt(n),a=j(t,r.triggerRef),c=p.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Ca(r.open),...o,ref:a,onClick:R(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:p.jsx(pt,{asChild:!0,...s,children:c})});ga.displayName=ma;var bo="PopoverPortal",[ih,ah]=fa(bo,{forceMount:void 0}),wa=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=Me(bo,t);return p.jsx(ih,{scope:t,forceMount:n,children:p.jsx(Y,{present:n||s.open,children:p.jsx(Je,{asChild:!0,container:r,children:o})})})};wa.displayName=bo;var qe="PopoverContent",ya=i.forwardRef((e,t)=>{const n=ah(qe,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=Me(qe,e.__scopePopover);return p.jsx(Y,{present:o||s.open,children:s.modal?p.jsx(lh,{...r,ref:t}):p.jsx(uh,{...r,ref:t})})});ya.displayName=qe;var ch=Qp("PopoverContent.RemoveScroll"),lh=i.forwardRef((e,t)=>{const n=Me(qe,e.__scopePopover),o=i.useRef(null),r=j(t,o),s=i.useRef(!1);return i.useEffect(()=>{const a=o.current;if(a)return Ht(a)},[]),p.jsx(dt,{as:ch,allowPinchZoom:!0,children:p.jsx(xa,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:R(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),uh=i.forwardRef((e,t)=>{const n=Me(qe,e.__scopePopover),o=i.useRef(!1),r=i.useRef(!1);return p.jsx(xa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),xa=i.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,h=Me(qe,n),m=yt(n);return Bt(),p.jsx(ut,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:p.jsx(qt,{"data-state":Ca(h.open),role:"dialog",id:h.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)"}})})})}),ba="PopoverClose",dh=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Me(ba,n);return p.jsx(D.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});dh.displayName=ba;var fh="PopoverArrow",ph=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=yt(n);return p.jsx(Zt,{...r,...o,ref:t})});ph.displayName=fh;function Ca(e){return e?"open":"closed"}var dv=pa,fv=va,pv=ga,hv=wa,vv=ya;export{sv as $,Ch as A,$h as B,Cl as C,El as D,Hh as E,ev as F,tv as G,Kh as H,Gh as I,zh as J,Yh as K,Fh as L,qh as M,Zh as N,bl as O,xl as P,Qh as Q,mh as R,vh as S,Sl as T,Jh as U,Rh as V,nv as W,Vh as X,Uh as Y,Xh as Z,rv as _,wl as a,iv as a0,av as a1,cv as a2,hv as a3,vv as a4,dv as a5,fv as a6,pv as a7,lv as a8,uv as a9,_r as b,gh as c,wh as d,yh as e,xh as f,bh as g,Sh as h,ud as i,p as j,dd as k,Eh as l,Th as m,Ph as n,Ah as o,_h as p,Ih as q,Dh as r,jh as s,kh as t,Lh as u,Nh as v,Oh as w,Mh as x,Wh as y,Bh as z};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
function rt(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const u=Object.getOwnPropertyDescriptor(n,i);u&&Object.defineProperty(e,i,u.get?u:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Nr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ce={exports:{}},R={};var _e;function nt(){if(_e)return R;_e=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),s=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),o=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),m=Symbol.iterator;function v(a){return a===null||typeof a!="object"?null:(a=m&&a[m]||a["@@iterator"],typeof a=="function"?a:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,y={};function g(a,h,_){this.props=a,this.context=h,this.refs=y,this.updater=_||w}g.prototype.isReactComponent={},g.prototype.setState=function(a,h){if(typeof a!="object"&&typeof a!="function"&&a!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,h,"setState")},g.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function E(){}E.prototype=g.prototype;function S(a,h,_){this.props=a,this.context=h,this.refs=y,this.updater=_||w}var $=S.prototype=new E;$.constructor=S,x($,g.prototype),$.isPureReactComponent=!0;var A=Array.isArray;function H(){}var P={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function U(a,h,_){var C=_.ref;return{$$typeof:e,type:a,key:h,ref:C!==void 0?C:null,props:_}}function D(a,h){return U(a.type,h,a.props)}function Y(a){return typeof a=="object"&&a!==null&&a.$$typeof===e}function te(a){var h={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(_){return h[_]})}var we=/\/+/g;function se(a,h){return typeof a=="object"&&a!==null&&a.key!=null?te(""+a.key):h.toString(36)}function Qe(a){switch(a.status){case"fulfilled":return a.value;case"rejected":throw a.reason;default:switch(typeof a.status=="string"?a.then(H,H):(a.status="pending",a.then(function(h){a.status==="pending"&&(a.status="fulfilled",a.value=h)},function(h){a.status==="pending"&&(a.status="rejected",a.reason=h)})),a.status){case"fulfilled":return a.value;case"rejected":throw a.reason}}throw a}function K(a,h,_,C,b){var T=typeof a;(T==="undefined"||T==="boolean")&&(a=null);var L=!1;if(a===null)L=!0;else switch(T){case"bigint":case"string":case"number":L=!0;break;case"object":switch(a.$$typeof){case e:case t:L=!0;break;case f:return L=a._init,K(L(a._payload),h,_,C,b)}}if(L)return b=b(a),L=C===""?"."+se(a,0):C,A(b)?(_="",L!=null&&(_=L.replace(we,"$&/")+"/"),K(b,h,_,"",function(tt){return tt})):b!=null&&(Y(b)&&(b=D(b,_+(b.key==null||a&&a.key===b.key?"":(""+b.key).replace(we,"$&/")+"/")+L)),h.push(b)),1;L=0;var F=C===""?".":C+":";if(A(a))for(var N=0;N<a.length;N++)C=a[N],T=F+se(C,N),L+=K(C,h,_,T,b);else if(N=v(a),typeof N=="function")for(a=N.call(a),N=0;!(C=a.next()).done;)C=C.value,T=F+se(C,N++),L+=K(C,h,_,T,b);else if(T==="object"){if(typeof a.then=="function")return K(Qe(a),h,_,C,b);throw h=String(a),Error("Objects are not valid as a React child (found: "+(h==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":h)+"). If you meant to render a collection of children, use an array instead.")}return L}function re(a,h,_){if(a==null)return a;var C=[],b=0;return K(a,C,"","",function(T){return h.call(_,T,b++)}),C}function Ze(a){if(a._status===-1){var h=a._result;h=h(),h.then(function(_){(a._status===0||a._status===-1)&&(a._status=1,a._result=_)},function(_){(a._status===0||a._status===-1)&&(a._status=2,a._result=_)}),a._status===-1&&(a._status=0,a._result=h)}if(a._status===1)return a._result.default;throw a._result}var Ce=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var h=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(h))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},et={map:re,forEach:function(a,h,_){re(a,function(){h.apply(this,arguments)},_)},count:function(a){var h=0;return re(a,function(){h++}),h},toArray:function(a){return re(a,function(h){return h})||[]},only:function(a){if(!Y(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};return R.Activity=p,R.Children=et,R.Component=g,R.Fragment=r,R.Profiler=i,R.PureComponent=S,R.StrictMode=n,R.Suspense=l,R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,R.__COMPILER_RUNTIME={__proto__:null,c:function(a){return P.H.useMemoCache(a)}},R.cache=function(a){return function(){return a.apply(null,arguments)}},R.cacheSignal=function(){return null},R.cloneElement=function(a,h,_){if(a==null)throw Error("The argument must be a React element, but you passed "+a+".");var C=x({},a.props),b=a.key;if(h!=null)for(T in h.key!==void 0&&(b=""+h.key),h)!q.call(h,T)||T==="key"||T==="__self"||T==="__source"||T==="ref"&&h.ref===void 0||(C[T]=h[T]);var T=arguments.length-2;if(T===1)C.children=_;else if(1<T){for(var L=Array(T),F=0;F<T;F++)L[F]=arguments[F+2];C.children=L}return U(a.type,b,C)},R.createContext=function(a){return a={$$typeof:s,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null},a.Provider=a,a.Consumer={$$typeof:u,_context:a},a},R.createElement=function(a,h,_){var C,b={},T=null;if(h!=null)for(C in h.key!==void 0&&(T=""+h.key),h)q.call(h,C)&&C!=="key"&&C!=="__self"&&C!=="__source"&&(b[C]=h[C]);var L=arguments.length-2;if(L===1)b.children=_;else if(1<L){for(var F=Array(L),N=0;N<L;N++)F[N]=arguments[N+2];b.children=F}if(a&&a.defaultProps)for(C in L=a.defaultProps,L)b[C]===void 0&&(b[C]=L[C]);return U(a,T,b)},R.createRef=function(){return{current:null}},R.forwardRef=function(a){return{$$typeof:d,render:a}},R.isValidElement=Y,R.lazy=function(a){return{$$typeof:f,_payload:{_status:-1,_result:a},_init:Ze}},R.memo=function(a,h){return{$$typeof:o,type:a,compare:h===void 0?null:h}},R.startTransition=function(a){var h=P.T,_={};P.T=_;try{var C=a(),b=P.S;b!==null&&b(_,C),typeof C=="object"&&C!==null&&typeof C.then=="function"&&C.then(H,Ce)}catch(T){Ce(T)}finally{h!==null&&_.types!==null&&(h.types=_.types),P.T=h}},R.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},R.use=function(a){return P.H.use(a)},R.useActionState=function(a,h,_){return P.H.useActionState(a,h,_)},R.useCallback=function(a,h){return P.H.useCallback(a,h)},R.useContext=function(a){return P.H.useContext(a)},R.useDebugValue=function(){},R.useDeferredValue=function(a,h){return P.H.useDeferredValue(a,h)},R.useEffect=function(a,h){return P.H.useEffect(a,h)},R.useEffectEvent=function(a){return P.H.useEffectEvent(a)},R.useId=function(){return P.H.useId()},R.useImperativeHandle=function(a,h,_){return P.H.useImperativeHandle(a,h,_)},R.useInsertionEffect=function(a,h){return P.H.useInsertionEffect(a,h)},R.useLayoutEffect=function(a,h){return P.H.useLayoutEffect(a,h)},R.useMemo=function(a,h){return P.H.useMemo(a,h)},R.useOptimistic=function(a,h){return P.H.useOptimistic(a,h)},R.useReducer=function(a,h,_){return P.H.useReducer(a,h,_)},R.useRef=function(a){return P.H.useRef(a)},R.useState=function(a){return P.H.useState(a)},R.useSyncExternalStore=function(a,h,_){return P.H.useSyncExternalStore(a,h,_)},R.useTransition=function(){return P.H.useTransition()},R.version="19.2.1",R}var xe;function Ne(){return xe||(xe=1,ce.exports=nt()),ce.exports}var c=Ne();const ot=Ae(c),Dr=rt({__proto__:null,default:ot},[c]);var fe={exports:{}},k={};var Se;function at(){if(Se)return k;Se=1;var e=Ne();function t(l){var o="https://react.dev/errors/"+l;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)o+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+l+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function u(l,o,f){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:l,containerInfo:o,implementation:f}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(l,o){if(l==="font")return"";if(typeof o=="string")return o==="use-credentials"?o:""}return k.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,k.createPortal=function(l,o){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)throw Error(t(299));return u(l,o,null,f)},k.flushSync=function(l){var o=s.T,f=n.p;try{if(s.T=null,n.p=2,l)return l()}finally{s.T=o,n.p=f,n.d.f()}},k.preconnect=function(l,o){typeof l=="string"&&(o?(o=o.crossOrigin,o=typeof o=="string"?o==="use-credentials"?o:"":void 0):o=null,n.d.C(l,o))},k.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},k.preinit=function(l,o){if(typeof l=="string"&&o&&typeof o.as=="string"){var f=o.as,p=d(f,o.crossOrigin),m=typeof o.integrity=="string"?o.integrity:void 0,v=typeof o.fetchPriority=="string"?o.fetchPriority:void 0;f==="style"?n.d.S(l,typeof o.precedence=="string"?o.precedence:void 0,{crossOrigin:p,integrity:m,fetchPriority:v}):f==="script"&&n.d.X(l,{crossOrigin:p,integrity:m,fetchPriority:v,nonce:typeof o.nonce=="string"?o.nonce:void 0})}},k.preinitModule=function(l,o){if(typeof l=="string")if(typeof o=="object"&&o!==null){if(o.as==null||o.as==="script"){var f=d(o.as,o.crossOrigin);n.d.M(l,{crossOrigin:f,integrity:typeof o.integrity=="string"?o.integrity:void 0,nonce:typeof o.nonce=="string"?o.nonce:void 0})}}else o==null&&n.d.M(l)},k.preload=function(l,o){if(typeof l=="string"&&typeof o=="object"&&o!==null&&typeof o.as=="string"){var f=o.as,p=d(f,o.crossOrigin);n.d.L(l,f,{crossOrigin:p,integrity:typeof o.integrity=="string"?o.integrity:void 0,nonce:typeof o.nonce=="string"?o.nonce:void 0,type:typeof o.type=="string"?o.type:void 0,fetchPriority:typeof o.fetchPriority=="string"?o.fetchPriority:void 0,referrerPolicy:typeof o.referrerPolicy=="string"?o.referrerPolicy:void 0,imageSrcSet:typeof o.imageSrcSet=="string"?o.imageSrcSet:void 0,imageSizes:typeof o.imageSizes=="string"?o.imageSizes:void 0,media:typeof o.media=="string"?o.media:void 0})}},k.preloadModule=function(l,o){if(typeof l=="string")if(o){var f=d(o.as,o.crossOrigin);n.d.m(l,{as:typeof o.as=="string"&&o.as!=="script"?o.as:void 0,crossOrigin:f,integrity:typeof o.integrity=="string"?o.integrity:void 0})}else n.d.m(l)},k.requestFormReset=function(l){n.d.r(l)},k.unstable_batchedUpdates=function(l,o){return l(o)},k.useFormState=function(l,o,f){return s.H.useFormState(l,o,f)},k.useFormStatus=function(){return s.H.useHostTransitionStatus()},k.version="19.2.1",k}var Pe;function it(){if(Pe)return fe.exports;Pe=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),fe.exports=at(),fe.exports}var be="popstate";function ut(e={}){function t(n,i){let{pathname:u,search:s,hash:d}=n.location;return he("",{pathname:u,search:s,hash:d},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:X(i)}return st(t,r,null,e)}function O(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function M(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function lt(){return Math.random().toString(36).substring(2,10)}function Te(e,t){return{usr:e.state,key:e.key,idx:t}}function he(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?V(t):t,state:r,key:t&&t.key||n||lt()}}function X({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function V(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function st(e,t,r,n={}){let{window:i=document.defaultView,v5Compat:u=!1}=n,s=i.history,d="POP",l=null,o=f();o==null&&(o=0,s.replaceState({...s.state,idx:o},""));function f(){return(s.state||{idx:null}).idx}function p(){d="POP";let y=f(),g=y==null?null:y-o;o=y,l&&l({action:d,location:x.location,delta:g})}function m(y,g){d="PUSH";let E=he(x.location,y,g);o=f()+1;let S=Te(E,o),$=x.createHref(E);try{s.pushState(S,"",$)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;i.location.assign($)}u&&l&&l({action:d,location:x.location,delta:1})}function v(y,g){d="REPLACE";let E=he(x.location,y,g);o=f();let S=Te(E,o),$=x.createHref(E);s.replaceState(S,"",$),u&&l&&l({action:d,location:x.location,delta:0})}function w(y){return ct(y)}let x={get action(){return d},get location(){return e(i,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(be,p),l=y,()=>{i.removeEventListener(be,p),l=null}},createHref(y){return t(i,y)},createURL:w,encodeLocation(y){let g=w(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:m,replace:v,go(y){return s.go(y)}};return x}function ct(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),O(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:X(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function De(e,t,r="/"){return ft(e,t,r,!1)}function ft(e,t,r,n){let i=typeof t=="string"?V(t):t,u=W(i.pathname||"/",r);if(u==null)return null;let s=Me(e);dt(s);let d=null;for(let l=0;d==null&&l<s.length;++l){let o=_t(u);d=wt(s[l],o,n)}return d}function Me(e,t=[],r=[],n="",i=!1){let u=(s,d,l=i,o)=>{let f={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:d,route:s};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&l)return;O(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let p=B([n,f.relativePath]),m=r.concat(f);s.children&&s.children.length>0&&(O(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Me(s.children,t,m,p,l)),!(s.path==null&&!s.index)&&t.push({path:p,score:Et(p,s.index),routesMeta:m})};return e.forEach((s,d)=>{if(s.path===""||!s.path?.includes("?"))u(s,d);else for(let l of Ie(s.path))u(s,d,!0,l)}),t}function Ie(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),u=r.replace(/\?$/,"");if(n.length===0)return i?[u,""]:[u];let s=Ie(n.join("/")),d=[];return d.push(...s.map(l=>l===""?u:[u,l].join("/"))),i&&d.push(...s),d.map(l=>e.startsWith("/")&&l===""?"/":l)}function dt(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Rt(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var pt=/^:[\w-]+$/,ht=3,mt=2,yt=1,gt=10,vt=-2,Le=e=>e==="*";function Et(e,t){let r=e.split("/"),n=r.length;return r.some(Le)&&(n+=vt),t&&(n+=mt),r.filter(i=>!Le(i)).reduce((i,u)=>i+(pt.test(u)?ht:u===""?yt:gt),n)}function Rt(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function wt(e,t,r=!1){let{routesMeta:n}=e,i={},u="/",s=[];for(let d=0;d<n.length;++d){let l=n[d],o=d===n.length-1,f=u==="/"?t:t.slice(u.length)||"/",p=ie({path:l.relativePath,caseSensitive:l.caseSensitive,end:o},f),m=l.route;if(!p&&o&&r&&!n[n.length-1].route.index&&(p=ie({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!p)return null;Object.assign(i,p.params),s.push({params:i,pathname:B([u,p.pathname]),pathnameBase:Tt(B([u,p.pathnameBase])),route:m}),p.pathnameBase!=="/"&&(u=B([u,p.pathnameBase]))}return s}function ie(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ct(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let u=i[0],s=u.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:n.reduce((o,{paramName:f,isOptional:p},m)=>{if(f==="*"){let w=d[m]||"";s=u.slice(0,u.length-w.length).replace(/(.)\/+$/,"$1")}const v=d[m];return p&&!v?o[f]=void 0:o[f]=(v||"").replace(/%2F/g,"/"),o},{}),pathname:u,pathnameBase:s,pattern:e}}function Ct(e,t=!1,r=!0){M(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,d,l)=>(n.push({paramName:d,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function _t(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return M(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function W(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}var xt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,St=e=>xt.test(e);function Pt(e,t="/"){let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?V(e):e,u;if(r)if(St(r))u=r;else{if(r.includes("//")){let s=r;r=r.replace(/\/\/+/g,"/"),M(!1,`Pathnames cannot have embedded double slashes - normalizing ${s} -> ${r}`)}r.startsWith("/")?u=Oe(r.substring(1),"/"):u=Oe(r,t)}else u=t;return{pathname:u,search:Lt(n),hash:Ot(i)}}function Oe(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function de(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function bt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function He(e){let t=bt(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function Ue(e,t,r,n=!1){let i;typeof e=="string"?i=V(e):(i={...e},O(!i.pathname||!i.pathname.includes("?"),de("?","pathname","search",i)),O(!i.pathname||!i.pathname.includes("#"),de("#","pathname","hash",i)),O(!i.search||!i.search.includes("#"),de("#","search","hash",i)));let u=e===""||i.pathname==="",s=u?"/":i.pathname,d;if(s==null)d=r;else{let p=t.length-1;if(!n&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),p-=1;i.pathname=m.join("/")}d=p>=0?t[p]:"/"}let l=Pt(i,d),o=s&&s!=="/"&&s.endsWith("/"),f=(u||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(o||f)&&(l.pathname+="/"),l}var B=e=>e.join("/").replace(/\/\/+/g,"/"),Tt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ot=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $t(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function kt(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Fe=["POST","PUT","PATCH","DELETE"];new Set(Fe);var At=["GET",...Fe];new Set(At);var G=c.createContext(null);G.displayName="DataRouter";var ue=c.createContext(null);ue.displayName="DataRouterState";c.createContext(!1);var je=c.createContext({isTransitioning:!1});je.displayName="ViewTransition";var Nt=c.createContext(new Map);Nt.displayName="Fetchers";var Dt=c.createContext(null);Dt.displayName="Await";var I=c.createContext(null);I.displayName="Navigation";var Q=c.createContext(null);Q.displayName="Location";var j=c.createContext({outlet:null,matches:[],isDataRoute:!1});j.displayName="Route";var ye=c.createContext(null);ye.displayName="RouteError";function Mt(e,{relative:t}={}){O(Z(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=c.useContext(I),{hash:i,pathname:u,search:s}=ee(e,{relative:t}),d=u;return r!=="/"&&(d=u==="/"?r:B([r,u])),n.createHref({pathname:d,search:s,hash:i})}function Z(){return c.useContext(Q)!=null}function z(){return O(Z(),"useLocation() may be used only in the context of a <Router> component."),c.useContext(Q).location}var Be="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function We(e){c.useContext(I).static||c.useLayoutEffect(e)}function It(){let{isDataRoute:e}=c.useContext(j);return e?Qt():Ht()}function Ht(){O(Z(),"useNavigate() may be used only in the context of a <Router> component.");let e=c.useContext(G),{basename:t,navigator:r}=c.useContext(I),{matches:n}=c.useContext(j),{pathname:i}=z(),u=JSON.stringify(He(n)),s=c.useRef(!1);return We(()=>{s.current=!0}),c.useCallback((l,o={})=>{if(M(s.current,Be),!s.current)return;if(typeof l=="number"){r.go(l);return}let f=Ue(l,JSON.parse(u),i,o.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:B([t,f.pathname])),(o.replace?r.replace:r.push)(f,o.state,o)},[t,r,u,i,e])}var Ut=c.createContext(null);function Ft(e){let t=c.useContext(j).outlet;return c.useMemo(()=>t&&c.createElement(Ut.Provider,{value:e},t),[t,e])}function ee(e,{relative:t}={}){let{matches:r}=c.useContext(j),{pathname:n}=z(),i=JSON.stringify(He(r));return c.useMemo(()=>Ue(e,JSON.parse(i),n,t==="path"),[e,i,n,t])}function jt(e,t){return Ye(e,t)}function Ye(e,t,r,n,i){O(Z(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=c.useContext(I),{matches:s}=c.useContext(j),d=s[s.length-1],l=d?d.params:{},o=d?d.pathname:"/",f=d?d.pathnameBase:"/",p=d&&d.route;{let E=p&&p.path||"";ze(o,!p||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
2
2
|
|
|
3
|
-
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let m=z(),v;if(t){let E=typeof t=="string"?V(t):t;O(f==="/"||E.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${E.pathname}" was given in the \`location\` prop.`),v=E}else v=m;let w=v.pathname||"/",x=w;if(f!=="/"){let E=f.replace(/^\//,"").split("/");x="/"+w.replace(/^\//,"").split("/").slice(E.length).join("/")}let y=De(e,{pathname:x});M(p||y!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),M(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=qt(y&&y.map(E=>Object.assign({},E,{params:Object.assign({},l,E.params),pathname:B([f,u.encodeLocation?u.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:B([f,u.encodeLocation?u.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),s,r,n,i);return t&&g?c.createElement(Q.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},g):g}function Bt(){let e=Xt(),t=$t(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},u={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=c.createElement(c.Fragment,null,c.createElement("p",null,"💿 Hey developer 👋"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:u},"ErrorBoundary")," or"," ",c.createElement("code",{style:u},"errorElement")," prop on your route.")),c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),r?c.createElement("pre",{style:i},r):null,s)}var Wt=c.createElement(Bt,null),Yt=class extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?c.createElement(j.Provider,{value:this.props.routeContext},c.createElement(ye.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function zt({routeContext:e,match:t,children:r}){let n=c.useContext(G);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(j.Provider,{value:e},r)}function qt(e,t=[],r=null,n=null,i=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let u=e,s=r?.errors;if(s!=null){let f=u.findIndex(p=>p.route.id&&s?.[p.route.id]!==void 0);O(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),u=u.slice(0,Math.min(u.length,f+1))}let d=!1,l=-1;if(r)for(let f=0;f<u.length;f++){let p=u[f];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(l=f),p.route.id){let{loaderData:m,errors:v}=r,w=p.route.loader&&!m.hasOwnProperty(p.route.id)&&(!v||v[p.route.id]===void 0);if(p.route.lazy||w){d=!0,l>=0?u=u.slice(0,l+1):u=[u[0]];break}}}let o=r&&n?(f,p)=>{n(f,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:kt(r.matches),errorInfo:p})}:void 0;return u.reduceRight((f,p,m)=>{let v,w=!1,x=null,y=null;r&&(v=s&&p.route.id?s[p.route.id]:void 0,x=p.route.errorElement||Wt,d&&(l<0&&m===0?(ze("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,y=null):l===m&&(w=!0,y=p.route.hydrateFallbackElement||null)));let g=t.concat(u.slice(0,m+1)),E=()=>{let S;return v?S=x:w?S=y:p.route.Component?S=c.createElement(p.route.Component,null):p.route.element?S=p.route.element:S=f,c.createElement(zt,{match:p,routeContext:{outlet:f,matches:g,isDataRoute:r!=null},children:S})};return r&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?c.createElement(Yt,{location:r.location,revalidation:r.revalidation,component:x,error:v,children:E(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:o}):E()},null)}function ge(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kt(e){let t=c.useContext(G);return O(t,ge(e)),t}function Vt(e){let t=c.useContext(ue);return O(t,ge(e)),t}function Gt(e){let t=c.useContext(j);return O(t,ge(e)),t}function ve(e){let t=Gt(e),r=t.matches[t.matches.length-1];return O(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Jt(){return ve("useRouteId")}function Xt(){let e=c.useContext(ye),t=Vt("useRouteError"),r=ve("useRouteError");return e!==void 0?e:t.errors?.[r]}function Qt(){let{router:e}=Kt("useNavigate"),t=ve("useNavigate"),r=c.useRef(!1);return We(()=>{r.current=!0}),c.useCallback(async(i,u={})=>{M(r.current,Be),r.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...u}))},[e,t])}var $e={};function ze(e,t,r){!t&&!$e[e]&&($e[e]=!0,M(!1,r))}c.memo(Zt);function Zt({routes:e,future:t,state:r,unstable_onError:n}){return Ye(e,void 0,r,n,t)}function Mr(e){return Ft(e.context)}function er(e){O(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function tr({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:i,static:u=!1,unstable_useTransitions:s}){O(!Z(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),l=c.useMemo(()=>({basename:d,navigator:i,static:u,unstable_useTransitions:s,future:{}}),[d,i,u,s]);typeof r=="string"&&(r=V(r));let{pathname:o="/",search:f="",hash:p="",state:m=null,key:v="default"}=r,w=c.useMemo(()=>{let x=W(o,d);return x==null?null:{location:{pathname:x,search:f,hash:p,state:m,key:v},navigationType:n}},[d,o,f,p,m,v,n]);return M(w!=null,`<Router basename="${d}"> is not able to match the URL "${o}${f}${p}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:c.createElement(I.Provider,{value:l},c.createElement(Q.Provider,{children:t,value:w}))}function Ir({children:e,location:t}){return jt(me(e),t)}function me(e,t=[]){let r=[];return c.Children.forEach(e,(n,i)=>{if(!c.isValidElement(n))return;let u=[...t,i];if(n.type===c.Fragment){r.push.apply(r,me(n.props.children,u));return}O(n.type===er,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),O(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||u.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=me(n.props.children,u)),r.push(s)}),r}var oe="get",ae="application/x-www-form-urlencoded";function le(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function rr(e){return le(e)&&e.tagName.toLowerCase()==="button"}function nr(e){return le(e)&&e.tagName.toLowerCase()==="form"}function or(e){return le(e)&&e.tagName.toLowerCase()==="input"}function ar(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ir(e,t){return e.button===0&&(!t||t==="_self")&&!ar(e)}var ne=null;function ur(){if(ne===null)try{new FormData(document.createElement("form"),0),ne=!1}catch{ne=!0}return ne}var lr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function pe(e){return e!=null&&!lr.has(e)?(M(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ae}"`),null):e}function sr(e,t){let r,n,i,u,s;if(nr(e)){let d=e.getAttribute("action");n=d?W(d,t):null,r=e.getAttribute("method")||oe,i=pe(e.getAttribute("enctype"))||ae,u=new FormData(e)}else if(rr(e)||or(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||d.getAttribute("action");if(n=l?W(l,t):null,r=e.getAttribute("formmethod")||d.getAttribute("method")||oe,i=pe(e.getAttribute("formenctype"))||pe(d.getAttribute("enctype"))||ae,u=new FormData(d,e),!ur()){let{name:o,type:f,value:p}=e;if(f==="image"){let m=o?`${o}.`:"";u.append(`${m}x`,"0"),u.append(`${m}y`,"0")}else o&&u.append(o,p)}}else{if(le(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=oe,n=null,i=ae,s=e}return u&&i==="text/plain"&&(s=u,u=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:u,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ee(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cr(e,t,r){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname=`_root.${r}`:t&&W(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function fr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dr(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function pr(e,t,r){let n=await Promise.all(e.map(async i=>{let u=t.routes[i.route.id];if(u){let s=await fr(u,r);return s.links?s.links():[]}return[]}));return gr(n.flat(1).filter(dr).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function ke(e,t,r,n,i,u){let s=(l,o)=>r[o]?l.route.id!==r[o].route.id:!0,d=(l,o)=>r[o].pathname!==l.pathname||r[o].route.path?.endsWith("*")&&r[o].params["*"]!==l.params["*"];return u==="assets"?t.filter((l,o)=>s(l,o)||d(l,o)):u==="data"?t.filter((l,o)=>{let f=n.routes[l.route.id];if(!f||!f.hasLoader)return!1;if(s(l,o)||d(l,o))return!0;if(l.route.shouldRevalidate){let p=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function hr(e,t,{includeHydrateFallback:r}={}){return mr(e.map(n=>{let i=t.routes[n.route.id];if(!i)return[];let u=[i.module];return i.clientActionModule&&(u=u.concat(i.clientActionModule)),i.clientLoaderModule&&(u=u.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(u=u.concat(i.hydrateFallbackModule)),i.imports&&(u=u.concat(i.imports)),u}).flat(1))}function mr(e){return[...new Set(e)]}function yr(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function gr(e,t){let r=new Set;return new Set(t),e.reduce((n,i)=>{let u=JSON.stringify(yr(i));return r.has(u)||(r.add(u),n.push({key:u,link:i})),n},[])}function qe(){let e=c.useContext(G);return Ee(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function vr(){let e=c.useContext(ue);return Ee(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Re=c.createContext(void 0);Re.displayName="FrameworkContext";function Ke(){let e=c.useContext(Re);return Ee(e,"You must render this element inside a <HydratedRouter> element"),e}function Er(e,t){let r=c.useContext(Re),[n,i]=c.useState(!1),[u,s]=c.useState(!1),{onFocus:d,onBlur:l,onMouseEnter:o,onMouseLeave:f,onTouchStart:p}=t,m=c.useRef(null);c.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let x=g=>{g.forEach(E=>{s(E.isIntersecting)})},y=new IntersectionObserver(x,{threshold:.5});return m.current&&y.observe(m.current),()=>{y.disconnect()}}},[e]),c.useEffect(()=>{if(n){let x=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(x)}}},[n]);let v=()=>{i(!0)},w=()=>{i(!1),s(!1)};return r?e!=="intent"?[u,m,{}]:[u,m,{onFocus:J(d,v),onBlur:J(l,w),onMouseEnter:J(o,v),onMouseLeave:J(f,w),onTouchStart:J(p,v)}]:[!1,m,{}]}function J(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Rr({page:e,...t}){let{router:r}=qe(),n=c.useMemo(()=>De(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?c.createElement(Cr,{page:e,matches:n,...t}):null}function wr(e){let{manifest:t,routeModules:r}=Ke(),[n,i]=c.useState([]);return c.useEffect(()=>{let u=!1;return pr(e,t,r).then(s=>{u||i(s)}),()=>{u=!0}},[e,t,r]),n}function Cr({page:e,matches:t,...r}){let n=z(),{manifest:i,routeModules:u}=Ke(),{basename:s}=qe(),{loaderData:d,matches:l}=vr(),o=c.useMemo(()=>ke(e,t,l,i,n,"data"),[e,t,l,i,n]),f=c.useMemo(()=>ke(e,t,l,i,n,"assets"),[e,t,l,i,n]),p=c.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let w=new Set,x=!1;if(t.forEach(g=>{let E=i.routes[g.route.id];!E||!E.hasLoader||(!o.some(S=>S.route.id===g.route.id)&&g.route.id in d&&u[g.route.id]?.shouldRevalidate||E.hasClientLoader?x=!0:w.add(g.route.id))}),w.size===0)return[];let y=cr(e,s,"data");return x&&w.size>0&&y.searchParams.set("_routes",t.filter(g=>w.has(g.route.id)).map(g=>g.route.id).join(",")),[y.pathname+y.search]},[s,d,n,i,o,t,e,u]),m=c.useMemo(()=>hr(f,i),[f,i]),v=wr(f);return c.createElement(c.Fragment,null,p.map(w=>c.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...r})),m.map(w=>c.createElement("link",{key:w,rel:"modulepreload",href:w,...r})),v.map(({key:w,link:x})=>c.createElement("link",{key:w,nonce:r.nonce,...x})))}function _r(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ve&&(window.__reactRouterVersion="7.10.1")}catch{}function Hr({basename:e,children:t,unstable_useTransitions:r,window:n}){let i=c.useRef();i.current==null&&(i.current=ut({window:n,v5Compat:!0}));let u=i.current,[s,d]=c.useState({action:u.action,location:u.location}),l=c.useCallback(o=>{r===!1?d(o):c.startTransition(()=>d(o))},[r]);return c.useLayoutEffect(()=>u.listen(l),[u,l]),c.createElement(tr,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:u,unstable_useTransitions:r===!0})}var Ge=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Je=c.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:i,reloadDocument:u,replace:s,state:d,target:l,to:o,preventScrollReset:f,viewTransition:p,...m},v){let{basename:w,unstable_useTransitions:x}=c.useContext(I),y=typeof o=="string"&&Ge.test(o),g,E=!1;if(typeof o=="string"&&y&&(g=o,Ve))try{let D=new URL(window.location.href),Y=o.startsWith("//")?new URL(D.protocol+o):new URL(o),te=W(Y.pathname,w);Y.origin===D.origin&&te!=null?o=te+Y.search+Y.hash:E=!0}catch{M(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let S=Mt(o,{relative:i}),[$,A,H]=Er(n,m),P=br(o,{replace:s,state:d,target:l,preventScrollReset:f,relative:i,viewTransition:p,unstable_useTransitions:x});function q(D){t&&t(D),D.defaultPrevented||P(D)}let U=c.createElement("a",{...m,...H,href:g||S,onClick:E||u?t:q,ref:_r(v,A),target:l,"data-discover":!y&&r==="render"?"true":void 0});return $&&!y?c.createElement(c.Fragment,null,U,c.createElement(Rr,{page:S})):U});Je.displayName="Link";var xr=c.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:i=!1,style:u,to:s,viewTransition:d,children:l,...o},f){let p=ee(s,{relative:o.relative}),m=z(),v=c.useContext(ue),{navigator:w,basename:x}=c.useContext(I),y=v!=null&&kr(p)&&d===!0,g=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,E=m.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(E=E.toLowerCase(),S=S?S.toLowerCase():null,g=g.toLowerCase()),S&&x&&(S=W(S,x)||S);const $=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let A=E===g||!i&&E.startsWith(g)&&E.charAt($)==="/",H=S!=null&&(S===g||!i&&S.startsWith(g)&&S.charAt(g.length)==="/"),P={isActive:A,isPending:H,isTransitioning:y},q=A?t:void 0,U;typeof n=="function"?U=n(P):U=[n,A?"active":null,H?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let D=typeof u=="function"?u(P):u;return c.createElement(Je,{...o,"aria-current":q,className:U,ref:f,style:D,to:s,viewTransition:d},typeof l=="function"?l(P):l)});xr.displayName="NavLink";var Sr=c.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:u,method:s=oe,action:d,onSubmit:l,relative:o,preventScrollReset:f,viewTransition:p,...m},v)=>{let{unstable_useTransitions:w}=c.useContext(I),x=Or(),y=$r(d,{relative:o}),g=s.toLowerCase()==="get"?"get":"post",E=typeof d=="string"&&Ge.test(d),S=$=>{if(l&&l($),$.defaultPrevented)return;$.preventDefault();let A=$.nativeEvent.submitter,H=A?.getAttribute("formmethod")||s,P=()=>x(A||$.currentTarget,{fetcherKey:t,method:H,navigate:r,replace:i,state:u,relative:o,preventScrollReset:f,viewTransition:p});w&&r!==!1?c.startTransition(()=>P()):P()};return c.createElement("form",{ref:v,method:g,action:y,onSubmit:n?l:S,...m,"data-discover":!E&&e==="render"?"true":void 0})});Sr.displayName="Form";function Pr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xe(e){let t=c.useContext(G);return O(t,Pr(e)),t}function br(e,{target:t,replace:r,state:n,preventScrollReset:i,relative:u,viewTransition:s,unstable_useTransitions:d}={}){let l=It(),o=z(),f=ee(e,{relative:u});return c.useCallback(p=>{if(ir(p,t)){p.preventDefault();let m=r!==void 0?r:X(o)===X(f),v=()=>l(e,{replace:m,state:n,preventScrollReset:i,relative:u,viewTransition:s});d?c.startTransition(()=>v()):v()}},[o,l,f,r,n,t,e,i,u,s,d])}var Tr=0,Lr=()=>`__${String(++Tr)}__`;function Or(){let{router:e}=Xe("useSubmit"),{basename:t}=c.useContext(I),r=Jt(),n=e.fetch,i=e.navigate;return c.useCallback(async(u,s={})=>{let{action:d,method:l,encType:o,formData:f,body:p}=sr(u,t);if(s.navigate===!1){let m=s.fetcherKey||Lr();await n(m,r,s.action||d,{preventScrollReset:s.preventScrollReset,formData:f,body:p,formMethod:s.method||l,formEncType:s.encType||o,flushSync:s.flushSync})}else await i(s.action||d,{preventScrollReset:s.preventScrollReset,formData:f,body:p,formMethod:s.method||l,formEncType:s.encType||o,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,i,t,r])}function $r(e,{relative:t}={}){let{basename:r}=c.useContext(I),n=c.useContext(j);O(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),u={...ee(e||".",{relative:t})},s=z();if(e==null){u.search=s.search;let d=new URLSearchParams(u.search),l=d.getAll("index");if(l.some(f=>f==="")){d.delete("index"),l.filter(p=>p).forEach(p=>d.append("index",p));let f=d.toString();u.search=f?`?${f}`:""}}return(!e||e===".")&&i.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:B([r,u.pathname])),X(u)}function kr(e,{relative:t}={}){let r=c.useContext(je);O(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Xe("useViewTransitionState"),i=ee(e,{relative:t});if(!r.isTransitioning)return!1;let u=W(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=W(r.nextLocation.pathname,n)||r.nextLocation.pathname;return ie(i.pathname,s)!=null||ie(i.pathname,u)!=null}var Ar=it();const Ur=Ae(Ar);export{Hr as B,Je as L,Mr as O,Dr as R,Ar as a,Ur as b,ot as c,Ne as d,it as e,It as f,Ae as g,Ir as h,er as i,Nr as j,c as r,z as u};
|
|
3
|
+
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let m=z(),v;if(t){let E=typeof t=="string"?V(t):t;O(f==="/"||E.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${E.pathname}" was given in the \`location\` prop.`),v=E}else v=m;let w=v.pathname||"/",x=w;if(f!=="/"){let E=f.replace(/^\//,"").split("/");x="/"+w.replace(/^\//,"").split("/").slice(E.length).join("/")}let y=De(e,{pathname:x});M(p||y!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),M(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=qt(y&&y.map(E=>Object.assign({},E,{params:Object.assign({},l,E.params),pathname:B([f,u.encodeLocation?u.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?f:B([f,u.encodeLocation?u.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),s,r,n,i);return t&&g?c.createElement(Q.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},g):g}function Bt(){let e=Xt(),t=$t(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},u={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=c.createElement(c.Fragment,null,c.createElement("p",null,"💿 Hey developer 👋"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:u},"ErrorBoundary")," or"," ",c.createElement("code",{style:u},"errorElement")," prop on your route.")),c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),r?c.createElement("pre",{style:i},r):null,s)}var Wt=c.createElement(Bt,null),Yt=class extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?c.createElement(j.Provider,{value:this.props.routeContext},c.createElement(ye.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function zt({routeContext:e,match:t,children:r}){let n=c.useContext(G);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(j.Provider,{value:e},r)}function qt(e,t=[],r=null,n=null,i=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let u=e,s=r?.errors;if(s!=null){let f=u.findIndex(p=>p.route.id&&s?.[p.route.id]!==void 0);O(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),u=u.slice(0,Math.min(u.length,f+1))}let d=!1,l=-1;if(r)for(let f=0;f<u.length;f++){let p=u[f];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(l=f),p.route.id){let{loaderData:m,errors:v}=r,w=p.route.loader&&!m.hasOwnProperty(p.route.id)&&(!v||v[p.route.id]===void 0);if(p.route.lazy||w){d=!0,l>=0?u=u.slice(0,l+1):u=[u[0]];break}}}let o=r&&n?(f,p)=>{n(f,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:kt(r.matches),errorInfo:p})}:void 0;return u.reduceRight((f,p,m)=>{let v,w=!1,x=null,y=null;r&&(v=s&&p.route.id?s[p.route.id]:void 0,x=p.route.errorElement||Wt,d&&(l<0&&m===0?(ze("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,y=null):l===m&&(w=!0,y=p.route.hydrateFallbackElement||null)));let g=t.concat(u.slice(0,m+1)),E=()=>{let S;return v?S=x:w?S=y:p.route.Component?S=c.createElement(p.route.Component,null):p.route.element?S=p.route.element:S=f,c.createElement(zt,{match:p,routeContext:{outlet:f,matches:g,isDataRoute:r!=null},children:S})};return r&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?c.createElement(Yt,{location:r.location,revalidation:r.revalidation,component:x,error:v,children:E(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:o}):E()},null)}function ge(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kt(e){let t=c.useContext(G);return O(t,ge(e)),t}function Vt(e){let t=c.useContext(ue);return O(t,ge(e)),t}function Gt(e){let t=c.useContext(j);return O(t,ge(e)),t}function ve(e){let t=Gt(e),r=t.matches[t.matches.length-1];return O(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Jt(){return ve("useRouteId")}function Xt(){let e=c.useContext(ye),t=Vt("useRouteError"),r=ve("useRouteError");return e!==void 0?e:t.errors?.[r]}function Qt(){let{router:e}=Kt("useNavigate"),t=ve("useNavigate"),r=c.useRef(!1);return We(()=>{r.current=!0}),c.useCallback(async(i,u={})=>{M(r.current,Be),r.current&&(typeof i=="number"?await e.navigate(i):await e.navigate(i,{fromRouteId:t,...u}))},[e,t])}var $e={};function ze(e,t,r){!t&&!$e[e]&&($e[e]=!0,M(!1,r))}c.memo(Zt);function Zt({routes:e,future:t,state:r,unstable_onError:n}){return Ye(e,void 0,r,n,t)}function Mr(e){return Ft(e.context)}function er(e){O(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function tr({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:i,static:u=!1,unstable_useTransitions:s}){O(!Z(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),l=c.useMemo(()=>({basename:d,navigator:i,static:u,unstable_useTransitions:s,future:{}}),[d,i,u,s]);typeof r=="string"&&(r=V(r));let{pathname:o="/",search:f="",hash:p="",state:m=null,key:v="default"}=r,w=c.useMemo(()=>{let x=W(o,d);return x==null?null:{location:{pathname:x,search:f,hash:p,state:m,key:v},navigationType:n}},[d,o,f,p,m,v,n]);return M(w!=null,`<Router basename="${d}"> is not able to match the URL "${o}${f}${p}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:c.createElement(I.Provider,{value:l},c.createElement(Q.Provider,{children:t,value:w}))}function Ir({children:e,location:t}){return jt(me(e),t)}function me(e,t=[]){let r=[];return c.Children.forEach(e,(n,i)=>{if(!c.isValidElement(n))return;let u=[...t,i];if(n.type===c.Fragment){r.push.apply(r,me(n.props.children,u));return}O(n.type===er,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),O(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||u.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=me(n.props.children,u)),r.push(s)}),r}var oe="get",ae="application/x-www-form-urlencoded";function le(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function rr(e){return le(e)&&e.tagName.toLowerCase()==="button"}function nr(e){return le(e)&&e.tagName.toLowerCase()==="form"}function or(e){return le(e)&&e.tagName.toLowerCase()==="input"}function ar(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ir(e,t){return e.button===0&&(!t||t==="_self")&&!ar(e)}var ne=null;function ur(){if(ne===null)try{new FormData(document.createElement("form"),0),ne=!1}catch{ne=!0}return ne}var lr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function pe(e){return e!=null&&!lr.has(e)?(M(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ae}"`),null):e}function sr(e,t){let r,n,i,u,s;if(nr(e)){let d=e.getAttribute("action");n=d?W(d,t):null,r=e.getAttribute("method")||oe,i=pe(e.getAttribute("enctype"))||ae,u=new FormData(e)}else if(rr(e)||or(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||d.getAttribute("action");if(n=l?W(l,t):null,r=e.getAttribute("formmethod")||d.getAttribute("method")||oe,i=pe(e.getAttribute("formenctype"))||pe(d.getAttribute("enctype"))||ae,u=new FormData(d,e),!ur()){let{name:o,type:f,value:p}=e;if(f==="image"){let m=o?`${o}.`:"";u.append(`${m}x`,"0"),u.append(`${m}y`,"0")}else o&&u.append(o,p)}}else{if(le(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=oe,n=null,i=ae,s=e}return u&&i==="text/plain"&&(s=u,u=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:u,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ee(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cr(e,t,r){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname=`_root.${r}`:t&&W(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function fr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dr(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function pr(e,t,r){let n=await Promise.all(e.map(async i=>{let u=t.routes[i.route.id];if(u){let s=await fr(u,r);return s.links?s.links():[]}return[]}));return gr(n.flat(1).filter(dr).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function ke(e,t,r,n,i,u){let s=(l,o)=>r[o]?l.route.id!==r[o].route.id:!0,d=(l,o)=>r[o].pathname!==l.pathname||r[o].route.path?.endsWith("*")&&r[o].params["*"]!==l.params["*"];return u==="assets"?t.filter((l,o)=>s(l,o)||d(l,o)):u==="data"?t.filter((l,o)=>{let f=n.routes[l.route.id];if(!f||!f.hasLoader)return!1;if(s(l,o)||d(l,o))return!0;if(l.route.shouldRevalidate){let p=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function hr(e,t,{includeHydrateFallback:r}={}){return mr(e.map(n=>{let i=t.routes[n.route.id];if(!i)return[];let u=[i.module];return i.clientActionModule&&(u=u.concat(i.clientActionModule)),i.clientLoaderModule&&(u=u.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(u=u.concat(i.hydrateFallbackModule)),i.imports&&(u=u.concat(i.imports)),u}).flat(1))}function mr(e){return[...new Set(e)]}function yr(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function gr(e,t){let r=new Set;return new Set(t),e.reduce((n,i)=>{let u=JSON.stringify(yr(i));return r.has(u)||(r.add(u),n.push({key:u,link:i})),n},[])}function qe(){let e=c.useContext(G);return Ee(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function vr(){let e=c.useContext(ue);return Ee(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Re=c.createContext(void 0);Re.displayName="FrameworkContext";function Ke(){let e=c.useContext(Re);return Ee(e,"You must render this element inside a <HydratedRouter> element"),e}function Er(e,t){let r=c.useContext(Re),[n,i]=c.useState(!1),[u,s]=c.useState(!1),{onFocus:d,onBlur:l,onMouseEnter:o,onMouseLeave:f,onTouchStart:p}=t,m=c.useRef(null);c.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let x=g=>{g.forEach(E=>{s(E.isIntersecting)})},y=new IntersectionObserver(x,{threshold:.5});return m.current&&y.observe(m.current),()=>{y.disconnect()}}},[e]),c.useEffect(()=>{if(n){let x=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(x)}}},[n]);let v=()=>{i(!0)},w=()=>{i(!1),s(!1)};return r?e!=="intent"?[u,m,{}]:[u,m,{onFocus:J(d,v),onBlur:J(l,w),onMouseEnter:J(o,v),onMouseLeave:J(f,w),onTouchStart:J(p,v)}]:[!1,m,{}]}function J(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Rr({page:e,...t}){let{router:r}=qe(),n=c.useMemo(()=>De(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?c.createElement(Cr,{page:e,matches:n,...t}):null}function wr(e){let{manifest:t,routeModules:r}=Ke(),[n,i]=c.useState([]);return c.useEffect(()=>{let u=!1;return pr(e,t,r).then(s=>{u||i(s)}),()=>{u=!0}},[e,t,r]),n}function Cr({page:e,matches:t,...r}){let n=z(),{manifest:i,routeModules:u}=Ke(),{basename:s}=qe(),{loaderData:d,matches:l}=vr(),o=c.useMemo(()=>ke(e,t,l,i,n,"data"),[e,t,l,i,n]),f=c.useMemo(()=>ke(e,t,l,i,n,"assets"),[e,t,l,i,n]),p=c.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let w=new Set,x=!1;if(t.forEach(g=>{let E=i.routes[g.route.id];!E||!E.hasLoader||(!o.some(S=>S.route.id===g.route.id)&&g.route.id in d&&u[g.route.id]?.shouldRevalidate||E.hasClientLoader?x=!0:w.add(g.route.id))}),w.size===0)return[];let y=cr(e,s,"data");return x&&w.size>0&&y.searchParams.set("_routes",t.filter(g=>w.has(g.route.id)).map(g=>g.route.id).join(",")),[y.pathname+y.search]},[s,d,n,i,o,t,e,u]),m=c.useMemo(()=>hr(f,i),[f,i]),v=wr(f);return c.createElement(c.Fragment,null,p.map(w=>c.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...r})),m.map(w=>c.createElement("link",{key:w,rel:"modulepreload",href:w,...r})),v.map(({key:w,link:x})=>c.createElement("link",{key:w,nonce:r.nonce,...x})))}function _r(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ve&&(window.__reactRouterVersion="7.10.1")}catch{}function Hr({basename:e,children:t,unstable_useTransitions:r,window:n}){let i=c.useRef();i.current==null&&(i.current=ut({window:n,v5Compat:!0}));let u=i.current,[s,d]=c.useState({action:u.action,location:u.location}),l=c.useCallback(o=>{r===!1?d(o):c.startTransition(()=>d(o))},[r]);return c.useLayoutEffect(()=>u.listen(l),[u,l]),c.createElement(tr,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:u,unstable_useTransitions:r===!0})}var Ge=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Je=c.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:i,reloadDocument:u,replace:s,state:d,target:l,to:o,preventScrollReset:f,viewTransition:p,...m},v){let{basename:w,unstable_useTransitions:x}=c.useContext(I),y=typeof o=="string"&&Ge.test(o),g,E=!1;if(typeof o=="string"&&y&&(g=o,Ve))try{let D=new URL(window.location.href),Y=o.startsWith("//")?new URL(D.protocol+o):new URL(o),te=W(Y.pathname,w);Y.origin===D.origin&&te!=null?o=te+Y.search+Y.hash:E=!0}catch{M(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let S=Mt(o,{relative:i}),[$,A,H]=Er(n,m),P=br(o,{replace:s,state:d,target:l,preventScrollReset:f,relative:i,viewTransition:p,unstable_useTransitions:x});function q(D){t&&t(D),D.defaultPrevented||P(D)}let U=c.createElement("a",{...m,...H,href:g||S,onClick:E||u?t:q,ref:_r(v,A),target:l,"data-discover":!y&&r==="render"?"true":void 0});return $&&!y?c.createElement(c.Fragment,null,U,c.createElement(Rr,{page:S})):U});Je.displayName="Link";var xr=c.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:i=!1,style:u,to:s,viewTransition:d,children:l,...o},f){let p=ee(s,{relative:o.relative}),m=z(),v=c.useContext(ue),{navigator:w,basename:x}=c.useContext(I),y=v!=null&&kr(p)&&d===!0,g=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,E=m.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(E=E.toLowerCase(),S=S?S.toLowerCase():null,g=g.toLowerCase()),S&&x&&(S=W(S,x)||S);const $=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let A=E===g||!i&&E.startsWith(g)&&E.charAt($)==="/",H=S!=null&&(S===g||!i&&S.startsWith(g)&&S.charAt(g.length)==="/"),P={isActive:A,isPending:H,isTransitioning:y},q=A?t:void 0,U;typeof n=="function"?U=n(P):U=[n,A?"active":null,H?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let D=typeof u=="function"?u(P):u;return c.createElement(Je,{...o,"aria-current":q,className:U,ref:f,style:D,to:s,viewTransition:d},typeof l=="function"?l(P):l)});xr.displayName="NavLink";var Sr=c.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:i,state:u,method:s=oe,action:d,onSubmit:l,relative:o,preventScrollReset:f,viewTransition:p,...m},v)=>{let{unstable_useTransitions:w}=c.useContext(I),x=Or(),y=$r(d,{relative:o}),g=s.toLowerCase()==="get"?"get":"post",E=typeof d=="string"&&Ge.test(d),S=$=>{if(l&&l($),$.defaultPrevented)return;$.preventDefault();let A=$.nativeEvent.submitter,H=A?.getAttribute("formmethod")||s,P=()=>x(A||$.currentTarget,{fetcherKey:t,method:H,navigate:r,replace:i,state:u,relative:o,preventScrollReset:f,viewTransition:p});w&&r!==!1?c.startTransition(()=>P()):P()};return c.createElement("form",{ref:v,method:g,action:y,onSubmit:n?l:S,...m,"data-discover":!E&&e==="render"?"true":void 0})});Sr.displayName="Form";function Pr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xe(e){let t=c.useContext(G);return O(t,Pr(e)),t}function br(e,{target:t,replace:r,state:n,preventScrollReset:i,relative:u,viewTransition:s,unstable_useTransitions:d}={}){let l=It(),o=z(),f=ee(e,{relative:u});return c.useCallback(p=>{if(ir(p,t)){p.preventDefault();let m=r!==void 0?r:X(o)===X(f),v=()=>l(e,{replace:m,state:n,preventScrollReset:i,relative:u,viewTransition:s});d?c.startTransition(()=>v()):v()}},[o,l,f,r,n,t,e,i,u,s,d])}var Tr=0,Lr=()=>`__${String(++Tr)}__`;function Or(){let{router:e}=Xe("useSubmit"),{basename:t}=c.useContext(I),r=Jt(),n=e.fetch,i=e.navigate;return c.useCallback(async(u,s={})=>{let{action:d,method:l,encType:o,formData:f,body:p}=sr(u,t);if(s.navigate===!1){let m=s.fetcherKey||Lr();await n(m,r,s.action||d,{preventScrollReset:s.preventScrollReset,formData:f,body:p,formMethod:s.method||l,formEncType:s.encType||o,flushSync:s.flushSync})}else await i(s.action||d,{preventScrollReset:s.preventScrollReset,formData:f,body:p,formMethod:s.method||l,formEncType:s.encType||o,replace:s.replace,state:s.state,fromRouteId:r,flushSync:s.flushSync,viewTransition:s.viewTransition})},[n,i,t,r])}function $r(e,{relative:t}={}){let{basename:r}=c.useContext(I),n=c.useContext(j);O(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),u={...ee(e||".",{relative:t})},s=z();if(e==null){u.search=s.search;let d=new URLSearchParams(u.search),l=d.getAll("index");if(l.some(f=>f==="")){d.delete("index"),l.filter(p=>p).forEach(p=>d.append("index",p));let f=d.toString();u.search=f?`?${f}`:""}}return(!e||e===".")&&i.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:B([r,u.pathname])),X(u)}function kr(e,{relative:t}={}){let r=c.useContext(je);O(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Xe("useViewTransitionState"),i=ee(e,{relative:t});if(!r.isTransitioning)return!1;let u=W(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=W(r.nextLocation.pathname,n)||r.nextLocation.pathname;return ie(i.pathname,s)!=null||ie(i.pathname,u)!=null}var Ar=it();const Ur=Ae(Ar);export{Hr as B,Je as L,Mr as O,Dr as R,Ar as a,Ur as b,ot as c,Nr as d,Ne as e,it as f,Ae as g,It as h,Ir as i,er as j,c as r,z as u};
|