"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3282],{1518:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(1455).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},18540:(e,t,r)=>{r.d(t,{UC:()=>ea,Y9:()=>el,q7:()=>en,bL:()=>er,l9:()=>ei});var n=r(97839),l=r(34468),i=r(20052),a=r(59240),o=r(12548),s=r(80233),u=r(29398),c=r(22509),d=r(11939),f=r(68145),p=r(66695),h="Collapsible",[v,m]=(0,l.A)(h),[g,b]=v(h),y=n.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:l,defaultOpen:i,disabled:a,onOpenChange:o,...c}=e,[d,v]=(0,s.i)({prop:l,defaultProp:null!=i&&i,onChange:o,caller:h});return(0,p.jsx)(g,{scope:r,disabled:a,contentId:(0,f.B)(),open:d,onOpenToggle:n.useCallback(()=>v(e=>!e),[v]),children:(0,p.jsx)(u.sG.div,{"data-state":k(d),"data-disabled":a?"":void 0,...c,ref:t})})});y.displayName=h;var w="CollapsibleTrigger",x=n.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,l=b(w,r);return(0,p.jsx)(u.sG.button,{type:"button","aria-controls":l.contentId,"aria-expanded":l.open||!1,"data-state":k(l.open),"data-disabled":l.disabled?"":void 0,disabled:l.disabled,...n,ref:t,onClick:(0,o.mK)(e.onClick,l.onOpenToggle)})});x.displayName=w;var A="CollapsibleContent",R=n.forwardRef((e,t)=>{let{forceMount:r,...n}=e,l=b(A,e.__scopeCollapsible);return(0,p.jsx)(d.C,{present:r||l.open,children:e=>{let{present:r}=e;return(0,p.jsx)(C,{...n,ref:t,present:r})}})});R.displayName=A;var C=n.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:l,children:i,...o}=e,s=b(A,r),[d,f]=n.useState(l),h=n.useRef(null),v=(0,a.s)(t,h),m=n.useRef(0),g=m.current,y=n.useRef(0),w=y.current,x=s.open||d,R=n.useRef(x),C=n.useRef(void 0);return n.useEffect(()=>{let e=requestAnimationFrame(()=>R.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,c.N)(()=>{let e=h.current;if(e){C.current=C.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";let t=e.getBoundingClientRect();m.current=t.height,y.current=t.width,R.current||(e.style.transitionDuration=C.current.transitionDuration,e.style.animationName=C.current.animationName),f(l)}},[s.open,l]),(0,p.jsx)(u.sG.div,{"data-state":k(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!x,...o,ref:v,style:{"--radix-collapsible-content-height":g?"".concat(g,"px"):void 0,"--radix-collapsible-content-width":w?"".concat(w,"px"):void 0,...e.style},children:x&&i})});function k(e){return e?"open":"closed"}var E=r(89183),I="Accordion",j=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[S,D,M]=(0,i.N)(I),[O,N]=(0,l.A)(I,[M,m]),_=m(),P=n.forwardRef((e,t)=>{let{type:r,...n}=e;return(0,p.jsx)(S.Provider,{scope:e.__scopeAccordion,children:"multiple"===r?(0,p.jsx)(L,{...n,ref:t}):(0,p.jsx)(K,{...n,ref:t})})});P.displayName=I;var[F,z]=O(I),[B,G]=O(I,{collapsible:!1}),K=n.forwardRef((e,t)=>{let{value:r,defaultValue:l,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[u,c]=(0,s.i)({prop:r,defaultProp:null!=l?l:"",onChange:i,caller:I});return(0,p.jsx)(F,{scope:e.__scopeAccordion,value:n.useMemo(()=>u?[u]:[],[u]),onItemOpen:c,onItemClose:n.useCallback(()=>a&&c(""),[a,c]),children:(0,p.jsx)(B,{scope:e.__scopeAccordion,collapsible:a,children:(0,p.jsx)(U,{...o,ref:t})})})}),L=n.forwardRef((e,t)=>{let{value:r,defaultValue:l,onValueChange:i=()=>{},...a}=e,[o,u]=(0,s.i)({prop:r,defaultProp:null!=l?l:[],onChange:i,caller:I}),c=n.useCallback(e=>u(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[...t,e]}),[u]),d=n.useCallback(e=>u(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.filter(t=>t!==e)}),[u]);return(0,p.jsx)(F,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:d,children:(0,p.jsx)(B,{scope:e.__scopeAccordion,collapsible:!0,children:(0,p.jsx)(U,{...a,ref:t})})})}),[T,q]=O(I),U=n.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:l,dir:i,orientation:s="vertical",...c}=e,d=n.useRef(null),f=(0,a.s)(d,t),h=D(r),v="ltr"===(0,E.jH)(i),m=(0,o.mK)(e.onKeyDown,e=>{var t;if(!j.includes(e.key))return;let r=e.target,n=h().filter(e=>{var t;return!(null==(t=e.ref.current)?void 0:t.disabled)}),l=n.findIndex(e=>e.ref.current===r),i=n.length;if(-1===l)return;e.preventDefault();let a=l,o=i-1,u=()=>{(a=l+1)>o&&(a=0)},c=()=>{(a=l-1){let{__scopeAccordion:r,value:n,...l}=e,i=q(H,r),a=z(H,r),o=_(r),s=(0,f.B)(),u=n&&a.value.includes(n)||!1,c=i.disabled||e.disabled;return(0,p.jsx)(V,{scope:r,open:u,disabled:c,triggerId:s,children:(0,p.jsx)(y,{"data-orientation":i.orientation,"data-state":et(u),...o,...l,ref:t,disabled:c,open:u,onOpenChange:e=>{e?a.onItemOpen(n):a.onItemClose(n)}})})});Z.displayName=H;var $="AccordionHeader",J=n.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,l=q(I,r),i=W($,r);return(0,p.jsx)(u.sG.h3,{"data-orientation":l.orientation,"data-state":et(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:t})});J.displayName=$;var X="AccordionTrigger",Y=n.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,l=q(I,r),i=W(X,r),a=G(X,r),o=_(r);return(0,p.jsx)(S.ItemSlot,{scope:r,children:(0,p.jsx)(x,{"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":l.orientation,id:i.triggerId,...o,...n,ref:t})})});Y.displayName=X;var Q="AccordionContent",ee=n.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,l=q(I,r),i=W(Q,r),a=_(r);return(0,p.jsx)(R,{role:"region","aria-labelledby":i.triggerId,"data-orientation":l.orientation,...a,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});function et(e){return e?"open":"closed"}ee.displayName=Q;var er=P,en=Z,el=J,ei=Y,ea=ee},20052:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}function l(e,t){var r=n(e,t,"get");return r.get?r.get.call(e):r.value}function i(e,t,r){var l=n(e,t,"set");if(l.set)l.set.call(e,r);else{if(!l.writable)throw TypeError("attempted to set read only private field");l.value=r}return r}r.d(t,{N:()=>f});var a,o=r(97839),s=r(34468),u=r(59240),c=r(47666),d=r(66695);function f(e){let t=e+"CollectionProvider",[r,n]=(0,s.A)(t),[l,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{let{scope:t,children:r}=e,n=o.useRef(null),i=o.useRef(new Map).current;return(0,d.jsx)(l,{scope:t,itemMap:i,collectionRef:n,children:r})};a.displayName=t;let f=e+"CollectionSlot",p=(0,c.TL)(f),h=o.forwardRef((e,t)=>{let{scope:r,children:n}=e,l=i(f,r),a=(0,u.s)(t,l.collectionRef);return(0,d.jsx)(p,{ref:a,children:n})});h.displayName=f;let v=e+"CollectionItemSlot",m="data-radix-collection-item",g=(0,c.TL)(v),b=o.forwardRef((e,t)=>{let{scope:r,children:n,...l}=e,a=o.useRef(null),s=(0,u.s)(t,a),c=i(v,r);return o.useEffect(()=>(c.itemMap.set(a,{ref:a,...l}),()=>void c.itemMap.delete(a))),(0,d.jsx)(g,{...{[m]:""},ref:s,children:n})});return b.displayName=v,[{Provider:a,Slot:h,ItemSlot:b},function(t){let r=i(e+"CollectionConsumer",t);return o.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(m,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}var p=new WeakMap;function h(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=function(e,t){let r=e.length,n=v(t),l=n>=0?n:r+n;return l=r?-1:l}(e,t);return -1===r?void 0:e[r]}function v(e){return e!=e||0===e?0:Math.trunc(e)}a=new WeakMap,class e extends Map{set(e,t){return p.get(this)&&(this.has(e)?l(this,a)[l(this,a).indexOf(e)]=e:l(this,a).push(e)),super.set(e,t),this}insert(e,t,r){let n,i=this.has(t),o=l(this,a).length,s=v(e),u=s>=0?s:o+s,c=u=o?-1:u;if(c===this.size||i&&c===this.size-1||-1===c)return this.set(t,r),this;let d=this.size+ +!i;s=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],l=0;for(let e of this)Reflect.apply(t,r,[e,l,this])&&n.push(e),l++;return new e(n)}map(t,r){let n=[],l=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,l,this])]),l++;return new e(n)}reduce(){for(var e=arguments.length,t=Array(e),r=0;r=0;e--){let r=this.at(e);i=e===this.size-1&&1===t.length?r:Reflect.apply(n,this,[i,r,e,this])}return i}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(){for(var t=arguments.length,r=Array(t),n=0;n0&&(l=r-1);for(let e=t;e{r.d(t,{A:()=>n});let n=(0,r(1455).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},32370:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(1455).A)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},35744:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(1455).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},47777:(e,t,r)=>{r.d(t,{uB:()=>O});var n=/[\\\/_+.#"@\[\(\{&]/,l=/[\\\/_+.#"@\[\(\{&]/g,i=/[\s-]/,a=/[\s-]/g;function o(e){return e.toLowerCase().replace(a," ")}var s=r(89516),u=r(97839),c=r(29398),d=r(68145),f=r(59240),p='[cmdk-group=""]',h='[cmdk-group-items=""]',v='[cmdk-item=""]',m="".concat(v,':not([aria-disabled="true"])'),g="cmdk-item-select",b="data-value",y=(e,t,r)=>(function(e,t,r){return function e(t,r,o,s,u,c,d){if(c===r.length)return u===t.length?1:.99;var f=`${u},${c}`;if(void 0!==d[f])return d[f];for(var p,h,v,m,g=s.charAt(c),b=o.indexOf(g,u),y=0;b>=0;)(p=e(t,r,o,s,b+1,c+1,d))>y&&(b===u?p*=1:n.test(t.charAt(b-1))?(p*=.8,(v=t.slice(u,b-1).match(l))&&u>0&&(p*=Math.pow(.999,v.length))):i.test(t.charAt(b-1))?(p*=.9,(m=t.slice(u,b-1).match(a))&&u>0&&(p*=Math.pow(.999,m.length))):(p*=.17,u>0&&(p*=Math.pow(.999,b-u))),t.charAt(b)!==r.charAt(c)&&(p*=.9999)),(p<.1>p&&(p=.1*h),p>y&&(y=p),b=o.indexOf(g,b+1);return d[f]=y,y}(e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,t,o(e),o(t),0,0,{})})(e,t,r),w=u.createContext(void 0),x=()=>u.useContext(w),A=u.createContext(void 0),R=()=>u.useContext(A),C=u.createContext(void 0),k=u.forwardRef((e,t)=>{let r=P(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=P(()=>new Set),l=P(()=>new Map),i=P(()=>new Map),a=P(()=>new Set),o=N(e),{label:s,children:f,value:x,onValueChange:R,filter:C,shouldFilter:k,loop:E,disablePointerSelection:I=!1,vimBindings:j=!0,...S}=e,D=(0,d.B)(),M=(0,d.B)(),O=(0,d.B)(),F=u.useRef(null),z=B();_(()=>{if(void 0!==x){let e=x.trim();r.current.value=e,L.emit()}},[x]),_(()=>{z(6,W)},[]);let L=u.useMemo(()=>({subscribe:e=>(a.current.add(e),()=>a.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var l,i,a,s;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)V(),U(),z(1,H);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(O);e?e.focus():null==(l=document.getElementById(D))||l.focus()}if(z(7,()=>{var e;r.current.selectedItemId=null==(e=Z())?void 0:e.id,L.emit()}),n||z(5,W),(null==(i=o.current)?void 0:i.value)!==void 0){null==(s=(a=o.current).onValueChange)||s.call(a,null!=t?t:"");return}}L.emit()}},emit:()=>{a.current.forEach(e=>e())}}),[]),T=u.useMemo(()=>({value:(e,t,n)=>{var l;t!==(null==(l=i.current.get(e))?void 0:l.value)&&(i.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,q(t,n)),z(2,()=>{U(),L.emit()}))},item:(e,t)=>(n.current.add(e),t&&(l.current.has(t)?l.current.get(t).add(e):l.current.set(t,new Set([e]))),z(3,()=>{V(),U(),r.current.value||H(),L.emit()}),()=>{i.current.delete(e),n.current.delete(e),r.current.filtered.items.delete(e);let t=Z();z(4,()=>{V(),(null==t?void 0:t.getAttribute("id"))===e&&H(),L.emit()})}),group:e=>(l.current.has(e)||l.current.set(e,new Set),()=>{i.current.delete(e),l.current.delete(e)}),filter:()=>o.current.shouldFilter,label:s||e["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:D,inputId:O,labelId:M,listInnerRef:F}),[]);function q(e,t){var n,l;let i=null!=(l=null==(n=o.current)?void 0:n.filter)?l:y;return e?i(e,r.current.search,t):0}function U(){if(!r.current.search||!1===o.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(r=>{let n=l.current.get(r),i=0;n.forEach(t=>{i=Math.max(e.get(t),i)}),t.push([r,i])});let n=F.current;$().sort((t,r)=>{var n,l;let i=t.getAttribute("id"),a=r.getAttribute("id");return(null!=(n=e.get(a))?n:0)-(null!=(l=e.get(i))?l:0)}).forEach(e=>{let t=e.closest(h);t?t.appendChild(e.parentElement===t?e:e.closest("".concat(h," > *"))):n.appendChild(e.parentElement===n?e:e.closest("".concat(h," > *")))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=F.current)?void 0:t.querySelector("".concat(p,"[").concat(b,'="').concat(encodeURIComponent(e[0]),'"]'));null==r||r.parentElement.appendChild(r)})}function H(){let e=$().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(b);L.setState("value",t||void 0)}function V(){var e,t,a,s;if(!r.current.search||!1===o.current.shouldFilter){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let u=0;for(let l of n.current){let n=q(null!=(t=null==(e=i.current.get(l))?void 0:e.value)?t:"",null!=(s=null==(a=i.current.get(l))?void 0:a.keywords)?s:[]);r.current.filtered.items.set(l,n),n>0&&u++}for(let[e,t]of l.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=u}function W(){var e,t,r;let n=Z();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(p))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function Z(){var e;return null==(e=F.current)?void 0:e.querySelector("".concat(v,'[aria-selected="true"]'))}function $(){var e;return Array.from((null==(e=F.current)?void 0:e.querySelectorAll(m))||[])}function J(e){let t=$()[e];t&&L.setState("value",t.getAttribute(b))}function X(e){var t;let r=Z(),n=$(),l=n.findIndex(e=>e===r),i=n[l+e];null!=(t=o.current)&&t.loop&&(i=l+e0?function(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}(r,p):function(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}(r,p))?void 0:r.querySelector(m);n?L.setState("value",n.getAttribute(b)):X(e)}let Q=()=>J($().length-1),ee=e=>{e.preventDefault(),e.metaKey?Q():e.altKey?Y(1):X(1)},et=e=>{e.preventDefault(),e.metaKey?J(0):e.altKey?Y(-1):X(-1)};return u.createElement(c.sG.div,{ref:t,tabIndex:-1,...S,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=S.onKeyDown)||t.call(S,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||r))switch(e.key){case"n":case"j":j&&e.ctrlKey&&ee(e);break;case"ArrowDown":ee(e);break;case"p":case"k":j&&e.ctrlKey&&et(e);break;case"ArrowUp":et(e);break;case"Home":e.preventDefault(),J(0);break;case"End":e.preventDefault(),Q();break;case"Enter":{e.preventDefault();let t=Z();if(t){let e=new Event(g);t.dispatchEvent(e)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:K},s),G(e,e=>u.createElement(A.Provider,{value:L},u.createElement(w.Provider,{value:T},e))))}),E=u.forwardRef((e,t)=>{var r,n;let l=(0,d.B)(),i=u.useRef(null),a=u.useContext(C),o=x(),s=N(e),p=null!=(n=null==(r=s.current)?void 0:r.forceMount)?n:null==a?void 0:a.forceMount;_(()=>{if(!p)return o.item(l,null==a?void 0:a.id)},[p]);let h=z(l,i,[e.value,e.children,i],e.keywords),v=R(),m=F(e=>e.value&&e.value===h.current),b=F(e=>!!p||!1===o.filter()||!e.search||e.filtered.items.get(l)>0);function y(){var e,t;w(),null==(t=(e=s.current).onSelect)||t.call(e,h.current)}function w(){v.setState("value",h.current,!0)}if(u.useEffect(()=>{let t=i.current;if(!(!t||e.disabled))return t.addEventListener(g,y),()=>t.removeEventListener(g,y)},[b,e.onSelect,e.disabled]),!b)return null;let{disabled:A,value:k,onSelect:E,forceMount:I,keywords:j,...S}=e;return u.createElement(c.sG.div,{ref:(0,f.t)(i,t),...S,id:l,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!m,"data-disabled":!!A,"data-selected":!!m,onPointerMove:A||o.getDisablePointerSelection()?void 0:w,onClick:A?void 0:y},e.children)}),I=u.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:l,...i}=e,a=(0,d.B)(),o=u.useRef(null),s=u.useRef(null),p=(0,d.B)(),h=x(),v=F(e=>!!l||!1===h.filter()||!e.search||e.filtered.groups.has(a));_(()=>h.group(a),[]),z(a,o,[e.value,e.heading,s]);let m=u.useMemo(()=>({id:a,forceMount:l}),[l]);return u.createElement(c.sG.div,{ref:(0,f.t)(o,t),...i,"cmdk-group":"",role:"presentation",hidden:!v||void 0},r&&u.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:p},r),G(e,e=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?p:void 0},u.createElement(C.Provider,{value:m},e))))}),j=u.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,l=u.useRef(null),i=F(e=>!e.search);return r||i?u.createElement(c.sG.div,{ref:(0,f.t)(l,t),...n,"cmdk-separator":"",role:"separator"}):null}),S=u.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,l=null!=e.value,i=R(),a=F(e=>e.search),o=F(e=>e.selectedItemId),s=x();return u.useEffect(()=>{null!=e.value&&i.setState("search",e.value)},[e.value]),u.createElement(c.sG.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":s.listId,"aria-labelledby":s.labelId,"aria-activedescendant":o,id:s.inputId,type:"text",value:l?e.value:a,onChange:e=>{l||i.setState("search",e.target.value),null==r||r(e.target.value)}})}),D=u.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...l}=e,i=u.useRef(null),a=u.useRef(null),o=F(e=>e.selectedItemId),s=x();return u.useEffect(()=>{if(a.current&&i.current){let e=a.current,t=i.current,r,n=new ResizeObserver(()=>{r=requestAnimationFrame(()=>{let r=e.offsetHeight;t.style.setProperty("--cmdk-list-height",r.toFixed(1)+"px")})});return n.observe(e),()=>{cancelAnimationFrame(r),n.unobserve(e)}}},[]),u.createElement(c.sG.div,{ref:(0,f.t)(i,t),...l,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":n,id:s.listId},G(e,e=>u.createElement("div",{ref:(0,f.t)(a,s.listInnerRef),"cmdk-list-sizer":""},e)))}),M=u.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:l,contentClassName:i,container:a,...o}=e;return u.createElement(s.bL,{open:r,onOpenChange:n},u.createElement(s.ZL,{container:a},u.createElement(s.hJ,{"cmdk-overlay":"",className:l}),u.createElement(s.UC,{"aria-label":e.label,"cmdk-dialog":"",className:i},u.createElement(k,{ref:t,...o}))))}),O=Object.assign(k,{List:D,Item:E,Input:S,Group:I,Separator:j,Dialog:M,Empty:u.forwardRef((e,t)=>F(e=>0===e.filtered.count)?u.createElement(c.sG.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:u.forwardRef((e,t)=>{let{progress:r,children:n,label:l="Loading...",...i}=e;return u.createElement(c.sG.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":l},G(e,e=>u.createElement("div",{"aria-hidden":!0},e)))})});function N(e){let t=u.useRef(e);return _(()=>{t.current=e}),t}var _="undefined"==typeof window?u.useEffect:u.useLayoutEffect;function P(e){let t=u.useRef();return void 0===t.current&&(t.current=e()),t}function F(e){let t=R(),r=()=>e(t.snapshot());return u.useSyncExternalStore(t.subscribe,r,r)}function z(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],l=u.useRef(),i=x();return _(()=>{var a;let o=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():l.current}})(),s=n.map(e=>e.trim());i.value(e,o,s),null==(a=t.current)||a.setAttribute(b,o),l.current=o}),l}var B=()=>{let[e,t]=u.useState(),r=P(()=>new Map);return _(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}};function G(e,t){let r,{asChild:n,children:l}=e;return n&&u.isValidElement(l)?u.cloneElement("function"==typeof(r=l.type)?r(l.props):"render"in r?r.render(l.props):l,{ref:l.ref},t(l.props.children)):t(l)}var K={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}},54506:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(1455).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},64145:(e,t,r)=>{r.d(t,{B:()=>n});function n(e,t){if(void 0===t)return e.trim();var r=function(e,t){if(void 0===t)return e.trimEnd();let r=e.length;switch(typeof t){case"string":if(1!==t.length)throw Error("The 'chars' parameter should be a single character string.");for(;r>0&&e[r-1]===t;)r--;break;case"object":for(;r>0&&t.includes(e[r-1]);)r--}return e.substring(0,r)}(e,t);if(void 0===t)return r.trimStart();let n=0;switch(typeof t){case"string":for(;n{r.d(t,{g:()=>n});function n(e){return null==e}},71274:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(1455).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},73294:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(1455).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},82212:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(97839),l=r(57380),i=r(38051),a=r(30821);let o=a.I?e=>{e()}:n.startTransition,s=(0,l.Ht)(i.Ay,()=>(e,t,r={})=>{let{mutate:i}=(0,l.iX)(),s=(0,n.useRef)(e),u=(0,n.useRef)(t),c=(0,n.useRef)(r),d=(0,n.useRef)(0),[f,p,h]=(e=>{let[,t]=(0,n.useState)({}),r=(0,n.useRef)(!1),l=(0,n.useRef)(e),i=(0,n.useRef)({data:!1,error:!1,isValidating:!1}),o=(0,n.useCallback)(e=>{let n=!1,a=l.current;for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&a[t]!==e[t]&&(a[t]=e[t],i.current[t]&&(n=!0));n&&!r.current&&t({})},[]);return(0,a.u)(()=>(r.current=!1,()=>{r.current=!0})),[l,i.current,o]})({data:a.U,error:a.U,isMutating:!1}),v=f.current,m=(0,n.useCallback)(async(e,t)=>{let[r,n]=(0,a.s)(s.current);if(!u.current)throw Error("Can’t trigger the mutation: missing fetcher.");if(!r)throw Error("Can’t trigger the mutation: missing key.");let l=(0,a.m)((0,a.m)({populateCache:!1,throwOnError:!0},c.current),t),f=(0,a.o)();d.current=f,h({isMutating:!0});try{let t=await i(r,u.current(n,{arg:e}),(0,a.m)(l,{throwOnError:!0}));return d.currenth({data:t,isMutating:!1,error:void 0})),null==l.onSuccess||l.onSuccess.call(l,t,r,l)),t}catch(e){if(d.currenth({error:e,isMutating:!1})),null==l.onError||l.onError.call(l,e,r,l),l.throwOnError))throw e}},[]),g=(0,n.useCallback)(()=>{d.current=(0,a.o)(),h({data:a.U,error:a.U,isMutating:!1})},[]);return(0,a.u)(()=>{s.current=e,u.current=t,c.current=r}),{trigger:m,reset:g,get data(){return p.data=!0,v.data},get error(){return p.error=!0,v.error},get isMutating(){return p.isMutating=!0,v.isMutating}}})},89183:(e,t,r)=>{r.d(t,{jH:()=>i});var n=r(97839);r(66695);var l=n.createContext(void 0);function i(e){let t=n.useContext(l);return e||t||"ltr"}},89516:(e,t,r)=>{r.d(t,{UC:()=>Q,ZL:()=>X,bL:()=>J,bm:()=>et,hE:()=>ee,hJ:()=>Y});var n=r(97839),l=r(12548),i=r(59240),a=r(34468),o=r(68145),s=r(80233),u=r(83349),c=r(15092),d=r(52903),f=r(11939),p=r(29398),h=r(37475),v=r(21065),m=r(82956),g=r(47666),b=r(66695),y="Dialog",[w,x]=(0,a.A)(y),[A,R]=w(y),C=e=>{let{__scopeDialog:t,children:r,open:l,defaultOpen:i,onOpenChange:a,modal:u=!0}=e,c=n.useRef(null),d=n.useRef(null),[f,p]=(0,s.i)({prop:l,defaultProp:null!=i&&i,onChange:a,caller:y});return(0,b.jsx)(A,{scope:t,triggerRef:c,contentRef:d,contentId:(0,o.B)(),titleId:(0,o.B)(),descriptionId:(0,o.B)(),open:f,onOpenChange:p,onOpenToggle:n.useCallback(()=>p(e=>!e),[p]),modal:u,children:r})};C.displayName=y;var k="DialogTrigger";n.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,a=R(k,r),o=(0,i.s)(t,a.triggerRef);return(0,b.jsx)(p.sG.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":U(a.open),...n,ref:o,onClick:(0,l.mK)(e.onClick,a.onOpenToggle)})}).displayName=k;var E="DialogPortal",[I,j]=w(E,{forceMount:void 0}),S=e=>{let{__scopeDialog:t,forceMount:r,children:l,container:i}=e,a=R(E,t);return(0,b.jsx)(I,{scope:t,forceMount:r,children:n.Children.map(l,e=>(0,b.jsx)(f.C,{present:r||a.open,children:(0,b.jsx)(d.Z,{asChild:!0,container:i,children:e})}))})};S.displayName=E;var D="DialogOverlay",M=n.forwardRef((e,t)=>{let r=j(D,e.__scopeDialog),{forceMount:n=r.forceMount,...l}=e,i=R(D,e.__scopeDialog);return i.modal?(0,b.jsx)(f.C,{present:n||i.open,children:(0,b.jsx)(N,{...l,ref:t})}):null});M.displayName=D;var O=(0,g.TL)("DialogOverlay.RemoveScroll"),N=n.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,l=R(D,r);return(0,b.jsx)(v.A,{as:O,allowPinchZoom:!0,shards:[l.contentRef],children:(0,b.jsx)(p.sG.div,{"data-state":U(l.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),_="DialogContent",P=n.forwardRef((e,t)=>{let r=j(_,e.__scopeDialog),{forceMount:n=r.forceMount,...l}=e,i=R(_,e.__scopeDialog);return(0,b.jsx)(f.C,{present:n||i.open,children:i.modal?(0,b.jsx)(F,{...l,ref:t}):(0,b.jsx)(z,{...l,ref:t})})});P.displayName=_;var F=n.forwardRef((e,t)=>{let r=R(_,e.__scopeDialog),a=n.useRef(null),o=(0,i.s)(t,r.contentRef,a);return n.useEffect(()=>{let e=a.current;if(e)return(0,m.Eq)(e)},[]),(0,b.jsx)(B,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,l.mK)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null==(t=r.triggerRef.current)||t.focus()}),onPointerDownOutside:(0,l.mK)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,l.mK)(e.onFocusOutside,e=>e.preventDefault())})}),z=n.forwardRef((e,t)=>{let r=R(_,e.__scopeDialog),l=n.useRef(!1),i=n.useRef(!1);return(0,b.jsx)(B,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n,a;null==(n=e.onCloseAutoFocus)||n.call(e,t),t.defaultPrevented||(l.current||null==(a=r.triggerRef.current)||a.focus(),t.preventDefault()),l.current=!1,i.current=!1},onInteractOutside:t=>{var n,a;null==(n=e.onInteractOutside)||n.call(e,t),t.defaultPrevented||(l.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let o=t.target;(null==(a=r.triggerRef.current)?void 0:a.contains(o))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})}),B=n.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:l,onOpenAutoFocus:a,onCloseAutoFocus:o,...s}=e,d=R(_,r),f=n.useRef(null),p=(0,i.s)(t,f);return(0,h.Oh)(),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c.n,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,b.jsx)(u.qW,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":U(d.open),...s,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(Z,{titleId:d.titleId}),(0,b.jsx)($,{contentRef:f,descriptionId:d.descriptionId})]})]})}),G="DialogTitle",K=n.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,l=R(G,r);return(0,b.jsx)(p.sG.h2,{id:l.titleId,...n,ref:t})});K.displayName=G;var L="DialogDescription";n.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,l=R(L,r);return(0,b.jsx)(p.sG.p,{id:l.descriptionId,...n,ref:t})}).displayName=L;var T="DialogClose",q=n.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,i=R(T,r);return(0,b.jsx)(p.sG.button,{type:"button",...n,ref:t,onClick:(0,l.mK)(e.onClick,()=>i.onOpenChange(!1))})});function U(e){return e?"open":"closed"}q.displayName=T;var H="DialogTitleWarning",[V,W]=(0,a.q)(H,{contentName:_,titleName:G,docsSlug:"dialog"}),Z=e=>{let{titleId:t}=e,r=W(H),l="`".concat(r.contentName,"` requires a `").concat(r.titleName,"` for the component to be accessible for screen reader users.\n\nIf you want to hide the `").concat(r.titleName,"`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/").concat(r.docsSlug);return n.useEffect(()=>{t&&(document.getElementById(t)||console.error(l))},[l,t]),null},$=e=>{let{contentRef:t,descriptionId:r}=e,l=W("DialogDescriptionWarning"),i="Warning: Missing `Description` or `aria-describedby={undefined}` for {".concat(l.contentName,"}.");return n.useEffect(()=>{var e;let n=null==(e=t.current)?void 0:e.getAttribute("aria-describedby");r&&n&&(document.getElementById(r)||console.warn(i))},[i,t,r]),null},J=C,X=S,Y=M,Q=P,ee=K,et=q},91167:(e,t,r)=>{r.d(t,{Z:()=>n});function n(e){return e.substring(0,1).toUpperCase()+e.substring(1)}}}]);