1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,965050,e=>{"use strict";let t;var n,r,o,l,i,a,s=e.i(252312),u=e.i(905577),d=e.i(952031),c=e.i(127194);let f=(0,c.default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);var p=/[\\\/_+.#"@\[\(\{&]/,g=/[\\\/_+.#"@\[\(\{&]/g,m=/[\s-]/,v=/[\s-]/g;function h(e){return e.toLowerCase().replace(v," ")}var b=e.i(134048),y=e.i(754787),E=e.i(710346),x=e.i(662081),S='[cmdk-group=""]',C='[cmdk-group-items=""]',w='[cmdk-item=""]',R=`${w}:not([aria-disabled="true"])`,k="cmdk-item-select",O="data-value",I=(e,t,n)=>{var r;return r=e,function e(t,n,r,o,l,i,a){if(i===n.length)return l===t.length?1:.99;var s=`${l},${i}`;if(void 0!==a[s])return a[s];for(var u,d,c,f,h=o.charAt(i),b=r.indexOf(h,l),y=0;b>=0;)(u=e(t,n,r,o,b+1,i+1,a))>y&&(b===l?u*=1:p.test(t.charAt(b-1))?(u*=.8,(c=t.slice(l,b-1).match(g))&&l>0&&(u*=Math.pow(.999,c.length))):m.test(t.charAt(b-1))?(u*=.9,(f=t.slice(l,b-1).match(v))&&l>0&&(u*=Math.pow(.999,f.length))):(u*=.17,l>0&&(u*=Math.pow(.999,b-l))),t.charAt(b)!==n.charAt(i)&&(u*=.9999)),(u<.1&&r.charAt(b-1)===o.charAt(i+1)||o.charAt(i+1)===o.charAt(i)&&r.charAt(b-1)!==o.charAt(i))&&.1*(d=e(t,n,r,o,b+1,i+2,a))>u&&(u=.1*d),u>y&&(y=u),b=r.indexOf(h,b+1);return a[s]=y,y}(r=n&&n.length>0?`${r+" "+n.join(" ")}`:r,t,h(r),h(t),0,0,{})},T=u.createContext(void 0),P=u.createContext(void 0),M=u.createContext(void 0),j=u.forwardRef((e,t)=>{let n=H(()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=H(()=>new Set),o=H(()=>new Map),l=H(()=>new Map),i=H(()=>new Set),a=W(e),{label:s,children:d,value:c,onValueChange:f,filter:p,shouldFilter:g,loop:m,disablePointerSelection:v=!1,vimBindings:h=!0,...b}=e,x=(0,E.useId)(),M=(0,E.useId)(),j=(0,E.useId)(),A=u.useRef(null),N=z();F(()=>{if(void 0!==c){let e=c.trim();n.current.value=e,L.emit()}},[c]),F(()=>{N(6,U)},[]);let L=u.useMemo(()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,l,i,s;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)Y(),V(),N(1,$);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(j);e?e.focus():null==(o=document.getElementById(x))||o.focus()}if(N(7,()=>{var e;n.current.selectedItemId=null==(e=q())?void 0:e.id,L.emit()}),r||N(5,U),(null==(l=a.current)?void 0:l.value)!==void 0){null==(s=(i=a.current).onValueChange)||s.call(i,null!=t?t:"");return}}L.emit()}},emit:()=>{i.current.forEach(e=>e())}}),[]),D=u.useMemo(()=>({value:(e,t,r)=>{var o;t!==(null==(o=l.current.get(e))?void 0:o.value)&&(l.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,B(t,r)),N(2,()=>{V(),L.emit()}))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),N(3,()=>{Y(),V(),n.current.value||$(),L.emit()}),()=>{l.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=q();N(4,()=>{Y(),(null==t?void 0:t.getAttribute("id"))===e&&$(),L.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{l.current.delete(e),o.current.delete(e)}),filter:()=>a.current.shouldFilter,label:s||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:x,inputId:j,labelId:M,listInnerRef:A}),[]);function B(e,t){var r,o;let l=null!=(o=null==(r=a.current)?void 0:r.filter)?o:I;return e?l(e,n.current.search,t):0}function V(){if(!n.current.search||!1===a.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=o.current.get(n),l=0;r.forEach(t=>{l=Math.max(e.get(t),l)}),t.push([n,l])});let r=A.current;X().sort((t,n)=>{var r,o;let l=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(l))?o:0)}).forEach(e=>{let t=e.closest(C);t?t.appendChild(e.parentElement===t?e:e.closest(`${C} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${C} > *`))}),t.sort((e,t)=>
1t[1]-e[1]).forEach(e=>{var t;let n=null==(t=A.current)?void 0:t.querySelector(`${S}[${O}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function $(){let e=X().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(O);L.setState("value",t||void 0)}function Y(){var e,t,i,s;if(!n.current.search||!1===a.current.shouldFilter){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let u=0;for(let o of r.current){let r=B(null!=(t=null==(e=l.current.get(o))?void 0:e.value)?t:"",null!=(s=null==(i=l.current.get(o))?void 0:i.keywords)?s:[]);n.current.filtered.items.set(o,r),r>0&&u++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=u}function U(){var e,t,n;let r=q();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(S))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function q(){var e;return null==(e=A.current)?void 0:e.querySelector(`${w}[aria-selected="true"]`)}function X(){var e;return Array.from((null==(e=A.current)?void 0:e.querySelectorAll(R))||[])}function J(e){let t=X()[e];t&&L.setState("value",t.getAttribute(O))}function G(e){var t;let n=q(),r=X(),o=r.findIndex(e=>e===n),l=r[o+e];null!=(t=a.current)&&t.loop&&(l=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),l&&L.setState("value",l.getAttribute(O))}function Q(e){let t=q(),n=null==t?void 0:t.closest(S),r;for(;n&&!r;)r=null==(n=e>0?function(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}(n,S):function(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}(n,S))?void 0:n.querySelector(R);r?L.setState("value",r.getAttribute(O)):G(e)}let Z=()=>J(X().length-1),ee=e=>{e.preventDefault(),e.metaKey?Z():e.altKey?Q(1):G(1)},et=e=>{e.preventDefault(),e.metaKey?J(0):e.altKey?Q(-1):G(-1)};return u.createElement(y.Primitive.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=b.onKeyDown)||t.call(b,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||n))switch(e.key){case"n":case"j":h&&e.ctrlKey&&ee(e);break;case"ArrowDown":ee(e);break;case"p":case"k":h&&e.ctrlKey&&et(e);break;case"ArrowUp":et(e);break;case"Home":e.preventDefault(),J(0);break;case"End":e.preventDefault(),Z();break;case"Enter":{e.preventDefault();let t=q();if(t){let e=new Event(k);t.dispatchEvent(e)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:K},s),_(e,e=>u.createElement(P.Provider,{value:L},u.createElement(T.Provider,{value:D},e))))}),A=u.forwardRef((e,t)=>{var n,r;let o=(0,E.useId)(),l=u.useRef(null),i=u.useContext(M),a=u.useContext(T),s=W(e),d=null!=(r=null==(n=s.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;F(()=>{if(!d)return a.item(o,null==i?void 0:i.id)},[d]);let c=U(o,l,[e.value,e.children,l],e.keywords),f=u.useContext(P),p=Y(e=>e.value&&e.value===c.current),g=Y(e=>!!d||!1===a.filter()||!e.search||e.filtered.items.get(o)>0);function m(){var e,t;v(),null==(t=(e=s.current).onSelect)||t.call(e,c.current)}function v(){f.setState("value",c.current,!0)}if(u.useEffect(()=>{let t=l.current;if(!(!t||e.disabled))return t.addEventListener(k,m),()=>t.removeEventListener(k,m)},[g,e.onSelect,e.disabled]),!g)return null;let{disabled:h,value:b,onSelect:S,forceMount:C,keywords:w,...R}=e;return u.createElement(y.Primitive.div,{ref:(0,x.composeRefs)(l,t),...R,id:o,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!p,"data-disabled":!!h,"data-selected":!!p,onPointerMove:h||a.getDisablePointerSelection()?void 0:v,onClick:h?void 0:m},e.children)}),N=u.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...l}=e,i=(0,E.useId)(),a=u.useRef(null),s=u.useRef(null),d=(0,E.useId)(),c=u.useContext(T),f=Y(e=>!!o||!1===c.filter()||!e.search||e.filtered.groups.has(i));F(()=>c.group(i),[]),U(i,a,[e.value,e.heading,s]);let p=u.useMemo(()=>({id:i,forceMount:o}),[o]);return u.createElement(y.Primitive.div,{ref:(0,x.composeRefs)(a,t),...l,"cmdk-group":"",role:"presentation",hidden:!f||void 0},n&&u.createElement("div",{ref:s,"cmdk-group-heading":"","aria-hidden":!0,id:d},n),_(e,e=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?d:void 0},u.createElement(M.Provider,{value:p},e))))}),L=u.forwardRef((e,t)=>
1{let{alwaysRender:n,...r}=e,o=u.useRef(null),l=Y(e=>!e.search);return n||l?u.createElement(y.Primitive.div,{ref:(0,x.composeRefs)(o,t),...r,"cmdk-separator":"",role:"separator"}):null}),D=u.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,l=u.useContext(P),i=Y(e=>e.search),a=Y(e=>e.selectedItemId),s=u.useContext(T);return u.useEffect(()=>{null!=e.value&&l.setState("search",e.value)},[e.value]),u.createElement(y.Primitive.input,{ref:t,...r,"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":a,id:s.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||l.setState("search",e.target.value),null==n||n(e.target.value)}})}),B=u.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,l=u.useRef(null),i=u.useRef(null),a=Y(e=>e.selectedItemId),s=u.useContext(T);return u.useEffect(()=>{if(i.current&&l.current){let e=i.current,t=l.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty("--cmdk-list-height",n.toFixed(1)+"px")})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),u.createElement(y.Primitive.div,{ref:(0,x.composeRefs)(l,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:s.listId},_(e,e=>u.createElement("div",{ref:(0,x.composeRefs)(i,s.listInnerRef),"cmdk-list-sizer":""},e)))}),V=u.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:l,container:i,...a}=e;return u.createElement(b.Root,{open:n,onOpenChange:r},u.createElement(b.Portal,{container:i},u.createElement(b.Overlay,{"cmdk-overlay":"",className:o}),u.createElement(b.Content,{"aria-label":e.label,"cmdk-dialog":"",className:l},u.createElement(j,{ref:t,...a}))))}
1),$=Object.assign(j,{List:B,Item:A,Input:D,Group:N,Separator:L,Dialog:V,Empty:u.forwardRef((e,t)=>Y(e=>0===e.filtered.count)?u.createElement(y.Primitive.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:u.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...l}=e;return u.createElement(y.Primitive.div,{ref:t,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},_(e,e=>u.createElement("div",{"aria-hidden":!0},e)))})});function W(e){let t=u.useRef(e);return F(()=>{t.current=e}),t}var F="u"<typeof window?u.useEffect:u.useLayoutEffect;function H(e){let t=u.useRef();return void 0===t.current&&(t.current=e()),t}function Y(e){let t=u.useContext(P),n=()=>e(t.snapshot());return u.useSyncExternalStore(t.subscribe,n,n)}function U(e,t,n,r=[]){let o=u.useRef(),l=u.useContext(T);return F(()=>{var i;let a=(()=>{var e;for(let t of n){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():o.current}})(),s=r.map(e=>e.trim());l.value(e,a,s),null==(i=t.current)||i.setAttribute(O,a),o.current=a}),o}var z=()=>{let[e,t]=u.useState(),n=H(()=>new Map);return F(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function _({asChild:e,children:t},n){let r;return e&&u.isValidElement(t)?u.cloneElement("function"==typeof(r=t.type)?r(t.props):"render"in r?r.render(t.props):t,{ref:t.ref},n(t.props.children)):n(t)}var K={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},q=e.i(975157);e.s([],471712),e.i(471712),e.i(907338);var X=e.i(334336);let J=u.createContext(!1),G=u.createContext(void 0);function Q(e){let t=u.useContext(G);if(!1===e&&void 0===t)throw Error((0,X.default)(27));return t}var Z=e.i(717085),ee=e.i(646258);let et=((n={}).open="data-open",n.closed="data-closed",n[n.startingStyle=ee.TransitionStatusDataAttributes.startingStyle]="startingStyle",n[n.endingStyle=ee.TransitionStatusDataAttributes.endingStyle]="endingStyle",n.anchorHidden="data-anchor-hidden",n.side="data-side",n.align="data-align",n),en=((r={}).popupOpen="data-popup-open",r.pressed="data-pressed",r),er={[en.popupOpen]:""};en.popupOpen,en.pressed;let eo={[et.open]:""},el={[et.closed]:""},ei={[et.anchorHidden]:""},ea={open:e=>e?er:null},es={open:e=>e?eo:el,anchorHidden:e=>e?ei:null},eu={...es,...ee.transitionStatusMapping},ed=u.forwardRef(function(e,t){let{render:n,className:r,style:o,forceRender:l=!1,...i}=e,{store:a}=Q(),s=a.useState("open"),u=a.useState("nested"),d=a.useState("mounted"),c=a.useState("transitionStatus");return(0,Z.useRenderElement)("div",e,{state:{open:s,transitionStatus:c},ref:[a.context.backdropRef,t],stateAttributesMapping:eu,props:[{role:"presentation",hidden:!d,style:{userSelect:"none",WebkitUserSelect:"none"}},i],enabled:l||!u})});var ec=e.i(643243),ef=e.i(534244),ep=e.i(822200);let eg=u.forwardRef(function(e,t){let{render:n,className:r,style:o,disabled:l=!1,nativeButton:i=!0,...a}=e,{store:s}=Q(),u=s.useState("open"),{getButtonProps:d,buttonRef:c}=(0,ec.useButton)({disabled:l,native:i});return(0,Z.useRenderElement)("button",e,{state:{disabled:l},ref:[t,c],props:[{onClick:function(e){u&&s.setOpen(!1,(0,ef.createChangeEventDetails)(ep.REASONS.closePress,e.nativeEvent))}},a,d]})});var em=e.i(462022);let ev=u.forwardRef(function(e,t){let{render:n,className:r,style:o,id:l,...i}=e,{store:a}=Q(),s=(0,em.useBaseUiId)(l);return a.useSyncedValueWithCleanup("descriptionElementId",s),(0,Z.useRenderElement)("p",e,{ref:t,props:[{id:s},i]})});var eh=e.i(880269),eb=e.i(152485);function ey(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var eE=e.i(275950),ex=e.i(342273),eS=e.i(877484),eC=e.i(540682),ew=e.i(179440),eR=e.i(329718);class ek{static create(){return new ek}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}function eO(){let e=(0,ew.useRefWithInit)(ek.create).current;return(0,eR.useOnMount)(e.disposeEffect),e}
1e.s([],720323),e.i(720323);let{userAgent:eI,platform:eT,maxTouchPoints:eP}="u"<typeof navigator?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0},eM=eI.toLowerCase(),ej=eT.toLowerCase(),eA=/^i(os$|p)/.test(ej)||"macintel"===ej&&eP>1,eN="android",eL=ej===eN||eM.includes(eN),eD=!eA&&ej.startsWith("mac"),eB=ej.startsWith("win"),eV=!eL&&/^(linux|chrome os)/.test(ej),e$=eD||eA;e.s(["android",0,eL,"apple",0,e$,"ios",0,eA,"linux",0,eV,"mac",0,eD,"windows",0,eB],798419);var eW=e.i(798419);let eF="u">typeof CSS&&!!CSS.supports?.("-webkit-backdrop-filter:none"),eH=!eF&&eM.includes("firefox"),eY=!eF&&eM.includes("chrom");e.s(["blink",0,eY,"gecko",0,eH,"webkit",0,eF],447730);var eU=e.i(447730);e.s(["voiceOver",0,e$],807221);var ez=e.i(807221);let e_=/jsdom|happydom/.test(eM);e.s(["jsdom",0,e_],211780);var eK=e.i(211780);e.s(["engine",0,eU,"env",0,eK,"os",0,eW,"screenReader",0,ez],877821);var eq=e.i(877821),eq=eq,eX=e.i(295354);function eJ(e){return e?.ownerDocument||document}var eG=e.i(479995),eq=eq;let eQ={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},eZ={...eQ,position:"fixed",top:0,left:0};({...eQ,position:"absolute"});let e0=u.forwardRef(function(e,t){let[n,r]=u.useState();return(0,eC.useIsoLayoutEffect)(()=>{eq.screenReader.voiceOver&&eq.engine.webkit&&r("button")},[]),(0,s.jsx)("span",{...e,ref:t,style:eZ,"aria-hidden":!n||void 0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});function e1(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function e2(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&(0,eh.isShadowRoot)(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function e9(e){return"composedPath"in e?e.composedPath()[0]:e.target}let e7="data-base-ui-focusable";function e5(e,t){return null!=t&&("composedPath"in e?e.composedPath().includes(t):null!=e.target&&t.contains(e.target))}function e3(e){return(0,eh.isHTMLElement)(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function e4(e){return!!e&&"combobox"===e.getAttribute("role")&&e3(e)}function e8(e){return e?e.hasAttribute(e7)?e:e.querySelector(`[${e7}]`)||e:null}var eq=eq;function e6(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function te(e,t=e?(0,eh.getComputedStyle)(e):null){var n;return!!e&&!!e.isConnected&&!!t&&"hidden"!==(n=t).visibility&&"collapse"!==n.visibility&&("function"==typeof e.checkVisibility?e.checkVisibility():"none"!==t.display&&"contents"!==t.display)}function tt(e){for(let t of Array.from(e.children))if("summary"===(0,eh.getNodeName)(t))return t;return null}function tn(e){let t=e?(0,eh.getNodeName)(e):"";return null!=e&&e.matches('a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]')&&("summary"!==t||null!=e.parentElement&&"details"===(0,eh.getNodeName)(e.parentElement)&&tt(e.parentElement)===e)&&("details"!==t||null==tt(e))&&("input"!==t||"hidden"!==e.type)}function tr(e){if(!tn(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=function(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return(0,eh.isShadowRoot)(n)?n.host:null}(t)){let n=t!==e,r="slot"===(0,eh.getNodeName)(t);if(t.hasAttribute("inert")||n&&"details"===(0,eh.getNodeName)(t)&&!t.open&&!function(e,t){let n=tt(t);return!!n&&(e===n||e2(n,e))}(e,t)||t.hasAttribute("hidden")||!r&&!function(e,t){let n=(0,eh.getComputedStyle)(e);return t?"none"!==n.display:te(e,n)}(t,n))return!1}return!0}function to(e){let t=e.tabIndex;if(t<0){let t=(0,eh.getNodeName)(e);if("details"===t||"audio"===t||"video"===t||(0,eh.isHTMLElement)(e)&&e.isContentEditable)return 0}return t}function tl(e){return"input"!==(0,eh.getNodeName)(e)?null:"radio"===e.type&&""!==e.name?e:null}function ti(e){if((0,eh.isHTMLElement)(e)&&"slot"===(0,eh.getNodeName)(e)){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return(0,eh.isHTMLElement)(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function ta(e){return tr(e)&&to(e)>=0}function ts(e){let t=[];return!function e(t,n){ti(t).forEach(t=>{tn(t)&&n.push(t),e(t,n)})}(e,t),t.filter(tr)}function tu(e){let t=ts(e);return t.filter(e=>to(e)>=0&&function(e,t){let n=tl(e);if(!n)return!0;let r=t.find(e=>{let t=tl(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=tl(e);return t?.name===n.name&&t.form===n.form})===n}(e,t))}function td(e,t){let n=tu(e),r=n.length;if(0===r)return;let o=e1(eJ(e)),l=n.indexOf(o);return n[-1===l?1===t?0:r-1:l+t]}function tc(e){return td(eJ(e).body,1)||e}function tf(e){return td(eJ(e).body,-1)||e}function tp(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!e2(n,r)}function tg(e){let t=[];!function e(t,n,r){ti(t).forEach(t=>{(0,eh.isHTMLElement)(t)&&t.matches(n)&&r.push(t),e(t,n,r)})}
1(e,"[data-tabindex]",t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}function tm(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...tm(e,t.id,n)])}function tv(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function th(e){return`data-base-ui-${e}`}var tb=e.i(405370);let ty=0;function tE(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:o}=t;function l(){(!o||o())&&e?.focus({preventScroll:n})}if(cancelAnimationFrame(ty),r)return l(),tb.NOOP;let i=requestAnimationFrame(l);return ty=i,()=>{ty===i&&(cancelAnimationFrame(i),ty=0)}}let tx={inert:new WeakMap,"aria-hidden":new WeakMap},tS="data-base-ui-inert",tC={inert:new WeakSet,"aria-hidden":new WeakSet},tw=new WeakMap,tR=0,tk=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=function e(t){return t?(0,eh.isShadowRoot)(t)?t.host:e(t.parentNode):null}(t);return e.contains(n)?n:null}).filter(e=>null!=e),tO=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},tI=(e,t,n)=>{let r=[],o=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{"script"!==(0,eh.getNodeName)(e)&&(t.has(e)?o(e):r.push(e))})};return o(e),r};function tT(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:o=!0}=t,l=eJ(e[0]).body;return function(e,t,n,r,{mark:o=!0}){let l=null;r?l="inert":n&&(l="aria-hidden");let i=null,a=null,s=tk(t,e),u=o?tI(t,tO(s),new Set(s)):[],d=[],c=[];if(l){let e=tx[l],n=tC[l];a=n,i=e;let r=tk(t,Array.from(t.querySelectorAll("[aria-live]"))),o=s.concat(r);tI(t,tO(o),new Set(o)).forEach(t=>{let r=t.getAttribute(l),o=null!==r&&"false"!==r,i=(e.get(t)||0)+1;e.set(t,i),d.push(t),1===i&&o&&n.add(t),o||t.setAttribute(l,"inert"===l?"":"true")})}return o&&u.forEach(e=>{let t=(tw.get(e)||0)+1;tw.set(e,t),c.push(e),1===t&&e.setAttribute(tS,"")}),tR+=1,()=>{i&&d.forEach(e=>{let t=(i.get(e)||0)-1;i.set(e,t),t||(!a?.has(e)&&l&&e.removeAttribute(l),a?.delete(e))}),o&&c.forEach(e=>{let t=(tw.get(e)||0)-1;tw.set(e,t),t||e.removeAttribute(tS)}),(tR-=1)||(tx.inert=new WeakMap,tx["aria-hidden"]=new WeakMap,tC.inert=new WeakSet,tC["aria-hidden"]=new WeakSet,tw=new WeakMap)}}(e,l,n,r,{mark:o})}var tP=e.i(753421),tM=e.i(549054);let tj="data-base-ui-click-trigger",tA={clipPath:"inset(50%)",position:"fixed",top:0,left:0},tN=u.createContext(null),tL=th("portal"),tD=u.forwardRef(function(e,t){let{render:n,className:r,style:o,children:l,container:i,renderGuards:a,...d}=e,{portalNode:c,portalSubtree:f}=function(e={}){let{ref:t,container:n,componentProps:r=tb.EMPTY_OBJECT,elementProps:o}=e,l=(0,tM.useId)(),i=u.useContext(tN),a=i?.portalNode,[s,d]=u.useState(null),[c,f]=u.useState(null),p=(0,eS.use
1StableCallback)(e=>{null!==e&&f(e)}),g=u.useRef(null);(0,eC.useIsoLayoutEffect)(()=>{if(null===n){g.current&&(g.current=null,f(null),d(null));return}if(null==l)return;let e=(n&&((0,eh.isNode)(n)?n:n.current))??a??document.body;if(null==e){g.current&&(g.current=null,f(null),d(null));return}g.current!==e&&(g.current=e,f(null),d(e))},[n,a,l]);let m=(0,Z.useRenderElement)("div",r,{ref:[t,p],props:[{id:l,[tL]:""},o]});return{portalNode:c,portalSubtree:s&&m?tP.createPortal(m,s):null}}({container:i,ref:t,componentProps:e,elementProps:d}),p=u.useRef(null),g=u.useRef(null),m=u.useRef(null),v=u.useRef(null),[h,b]=u.useState(null),y=u.useRef(!1),E=h?.modal,x=h?.open,S="boolean"==typeof a?a:!!h&&!h.modal&&h.open&&!!c;u.useEffect(()=>{if(c&&!E)return ey((0,eb.addEventListener)(c,"focusin",e,!0),(0,eb.addEventListener)(c,"focusout",e,!0));function e(e){c&&e.relatedTarget&&tp(e)&&("focusin"===e.type?y.current&&(tg(c),y.current=!1):(tu(c).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),y.current=!0))}},[c,E]),(0,eC.useIsoLayoutEffect)(()=>{c&&!0===x&&y.current&&(tg(c),y.current=!1)},[x,c]);let C=u.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:g,beforeInsideRef:m,afterInsideRef:v,portalNode:c,setFocusManagerState:b}),[c]);return(0,s.jsxs)(u.Fragment,{children:[f,(0,s.jsxs)(tN.Provider,{value:C,children:[S&&c&&(0,s.jsx)(e0,{"data-type":"outside",ref:p,onFocus:e=>{if(tp(e,c))m.current?.focus();else{let e=tf(h?h.domReference:null);e?.focus()}}}),S&&c&&(0,s.jsx)("span",{"aria-owns":c.id,style:tA}),c&&tP.createPortal(l,c),S&&c&&(0,s.jsx)(e0,{"data-type":"outside",ref:g,onFocus:e=>{if(tp(e,c))v.current?.focus();else{let t=tc(h?h.domReference:null);t?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,(0,ef.createChangeEventDetails)(ep.REASONS.focusOut,e.nativeEvent))}}})]})]})}),tB=u.createContext(null),tV=u.createContext(null),t$=e=>{let t=u.useContext(tV);return e??t};var tW=e.i(92237);let tF=[];function tH(){tF=tF.filter(e=>e.deref()?.isConnected)}function tY(e){tH(),e&&"body"!==(0,eh.getNodeName)(e)&&(tF.push(new WeakRef(e)),tF.length>20&&(tF=tF.slice(-20)))}function tU(){return tH(),tF[tF.length-1]?.deref()}function tz(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;let t=ts(e).filter(e=>{let t=e.getAttribute("data-tabindex")||"";return ta(e)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),n=e.getAttribute("tabindex");0===t.length?"0"!==n&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):("-1"!==n||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function t_(e){let{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:l=!0,restoreFocus:i=!1,modal:a=!0,closeOnFocusOut:d=!0,openInteractionType:c="",nextFocusableElement:f,previousFocusableElement:p,beforeContentFocusGuardRef:g,externalTree:m,getInsideElements:v}=e,h="rootStore"in t?t.rootStore:t,b=h.useState("open"),y=h.useState("domReferenceElement"),E=h.useState("floatingElement"),{events:x,dataRef:S}=h.context,C=(0,eS.useStableCallback)(()=>S.current.floatingContext?.nodeId),w=e4(y)&&!1===o,R=(0,ex.useValueAsRef)(o),k=(0,ex.useValueAsRef)(l),O=(0,ex.useValueAsRef)(c),I=(0,ex.useValueAsRef)(b),T=t$(m),P=u.useContext(tN),M=u.useRef(!1),j=u.useRef(!1),A=u.useRef(!1),N=u.useRef(null),L=u.useRef(""),D=u.useRef(""),B=u.useRef(null),V=u.useRef(null),$=(0,eE.useMergedRefs)(B,g,P?.beforeInsideRef),W=(0,eE.useMergedRefs)(V,P?.afterInsideRef),F=eO(),H=eO(),Y=(0,eX.useAnimationFrame)(),U=null!=P,z=e8(E),_=(0,eS.useStableCallback)((e=z)=>e?tu(e):[]),K=(0,eS.useStableCallback)(()=>v?.().filter(e=>null!=e)??[]);u.useEffect(()=>{if(r||!a)return;let e=eJ(z);return(0,eb.addEventListener)(e,"keydown",function(e){"Tab"===e.key&&e2(z,e1(eJ(z)))&&0===_().length&&!w&&(e.preventDefault(),e.stopPropagation())})},[r,z,a,w,_]),u.useEffect(()=>{if(r||!b)return;let e=eJ(z);function t(){A.current=!1}return ey((0,eb.addEventListener)(e,"pointerdown",function(e){let t=e9(e),n=K();A.current=!(e2(E,t)||e2(y,t)||e2(P?.portalNode,t)||n.some(e=>
1e===t||e2(e,t))),D.current=e.pointerType||"keyboard",t?.closest(`[${tj}]`)&&(j.current=!0,H.start(0,()=>{j.current=!1}))},!0),(0,eb.addEventListener)(e,"pointerup",t,!0),(0,eb.addEventListener)(e,"pointercancel",t,!0),(0,eb.addEventListener)(e,"keydown",function(){D.current="keyboard"},!0),t)},[r,E,y,z,b,P,H,K]),u.useEffect(()=>{if(r||!d)return;let e=eJ(z);function t(t){let n=t.relatedTarget,r=t.currentTarget,o=e9(t);a&&null==n&&null!=o&&e2(E,o)&&tY(o),queueMicrotask(()=>{let l=C(),s=h.context.triggerElements,u=K(),d=n?.hasAttribute(th("focus-guard"))&&[B.current,V.current,P?.beforeInsideRef.current,P?.afterInsideRef.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,(0,tW.resolveRef)(p),(0,tW.resolveRef)(f)].includes(n),c=!(e2(y,n)||e2(E,n)||e2(n,E)||e2(P?.portalNode,n)||u.some(e=>e===n||e2(e,n))||null!=n&&s.hasElement(n)||s.hasMatchingElement(e=>e2(e,n))||d||T&&(tm(T.nodesRef.current,l).find(e=>e2(e.context?.elements.floating,n)||e2(e.context?.elements.domReference,n))||tv(T.nodesRef.current,l).find(e=>[e.context?.elements.floating,e8(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===y&&z&&tz(z),i&&r!==y&&!te(o)&&e1(e)===e.body){if((0,eh.isHTMLElement)(z)&&(z.focus(),"popup"===i))return void Y.request(()=>{z.focus()});let e=_(),t=N.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||z;(0,eh.isHTMLElement)(n)&&n.focus()}if(S.current.insideReactTree){S.current.insideReactTree=!1;return}(w||!a)&&n&&c&&!j.current&&(w||n!==tU())&&(M.current=!0,h.setOpen(!1,(0,ef.createChangeEventDetails)(ep.REASONS.focusOut,t)))})}let n=(0,eh.isHTMLElement)(y)?y:null;if(E||n)return ey(n&&(0,eb.addEventListener)(n,"focusout",t),n&&(0,eb.addEventListener)(n,"pointerdown",function(){j.current=!0,H.start(0,()=>{j.current=!1})}),E&&(0,eb.addEventListener)(E,"focusin",function(e){let t=e9(e);ta(t)&&(N.current=t)}),E&&(0,eb.addEventListener)(E,"focusout",t),E&&P&&(0,eb.addEventListener)(E,"focusout",function(){A.current||(S.current.insideReactTree=!0,F.start(0,()=>{S.current.insideReactTree=!1}))},!0))},[r,y,E,z,a,T,P,h,d,i,_,w,C,S,F,H,Y,f,p,K]),u.useEffect(()=>{if(r||!E||!b)return;let e=Array.from(P?.portalNode?.querySelectorAll(`[${th("portal")}]`)||[]),t=T?tv(T.nodesRef.current,C()):[],n=t.find(e=>e4(e.context?.elements.domReference||null))?.context?.elements.domReference,o=tT([E,...e,B.current,V.current,P?.beforeOutsideRef.current,P?.afterOutsideRef.current,...K(),n,(0,tW.resolveRef)(p),(0,tW.resolveRef)(f),w?y:null].filter(e=>null!=e),{ariaHidden:a||w,mark:!1}),l=tT([E,...e].filter(e=>null!=e));return()=>{l(),o()}},[b,r,y,E,a,P,w,T,C,f,p,K]),(0,eC.useIsoLayoutEffect)(()=>{if(!b||r||!(0,eh.isHTMLElement)(z))return;let e=eJ(z),t=e1(e);queueMicrotask(()=>{let n,r=R.current,o="function"==typeof r?r(O.current||""):r;if(void 0===o||!1===o||e2(z,t))return;let l=null,i=()=>(null==l&&(l=_(z)),l[0]||z);n=(n=!0===o||null===o?i():(0,tW.resolveRef)(o))||i();let a=e2(z,e1(e));tE(n,{preventScroll:n===z,shouldFocus(){if(!I.current)return!1;if(a)return!0;let t=e1(e);return!(t!==n&&e2(z,t))}})})},[r,b,z,_,R,O,I]),(0,eC.useIsoLayoutEffect)(()=>{if(r||!z)return;let e=eJ(z),t=e1(e),n=null==O.current;function o(e){var t,n,r,o;let l;if(e.open||(t=e.nativeEvent,n=D.current,l=(0,eG.ownerWindow)(e9(t)),L.current=t instanceof l.KeyboardEvent?"keyboard":t instanceof l.FocusEvent?n||"keyboard":"pointerType"in t?t.pointerType||"keyboard":"touches"in t?"touch":t instanceof l.MouseEvent?n||(0===t.detail?"keyboard":"mouse"):""),e.reason===ep.REASONS.triggerHover&&"mouseleave"===e.nativeEvent.type&&(M.current=!0),e.reason===ep.REASONS.outsidePress)if(e.nested)M.current=!1;
1else if((""===(r=e.nativeEvent).pointerType&&r.isTrusted?0:eq.os.android&&r.pointerType?"click"!==r.type||1!==r.buttons:0!==r.detail||r.pointerType)&&(o=e.nativeEvent,eq.env.jsdom?1:(eq.os.android||0!==o.width||0!==o.height)&&(!eq.os.android||1!==o.width||1!==o.height||0!==o.pressure||0!==o.detail||"mouse"!==o.pointerType)&&(!(o.width<1)||!(o.height<1)||0!==o.pressure||0!==o.detail||"touch"!==o.pointerType))){let e=!1;eJ(z).createElement("div").focus({get preventScroll(){return e=!0,!1}}),e?M.current=!1:M.current=!0}else M.current=!1}return tY(t),x.on("openchange",o),()=>{x.off("openchange",o);let r=e1(e),l=K(),i=e2(E,r)||l.some(e=>e===r||e2(e,r))||T&&tm(T.nodesRef.current,C(),!1).some(e=>e2(e.context?.elements.floating,r)),a=k.current,s=function(){let e=k.current,r="function"==typeof e?e(L.current):e;if(void 0===r||!1===r)return null;null===r&&(r=!0);let o=y?.isConnected?y:null,l=t?.isConnected&&"body"!==(0,eh.getNodeName)(t)?t:null,i=n?l||o:o||l;return(i||(i=tU()||null),"boolean"==typeof r)?i:(0,tW.resolveRef)(r)||i||null}();queueMicrotask(()=>{let t=s?ta(s)?s:tu(s)[0]||s:null;a&&!M.current&&(0,eh.isHTMLElement)(t)&&("boolean"!=typeof a||t===r||r===e.body||i)&&t.focus({preventScroll:!0}),M.current=!1})}},[r,E,z,k,O,x,T,y,C,K]),(0,eC.useIsoLayoutEffect)(()=>{if(!eq.engine.webkit||b||!E)return;let e=e1(eJ(E));(0,eh.isHTMLElement)(e)&&e3(e)&&e2(E,e)&&e.blur()},[b,E]),(0,eC.useIsoLayoutEffect)(()=>{if(!r&&P)return P.setFocusManagerState({modal:a,closeOnFocusOut:d,open:b,onOpenChange:h.setOpen,domReference:y}),()=>{P.setFocusManagerState(null)}},[r,P,a,b,h,d,y]),(0,eC.useIsoLayoutEffect)(()=>{if(!r&&z)return tz(z),()=>{queueMicrotask(tH)}},[r,z]);let q=!r&&(!a||!w)&&(U||a);return(0,s.jsxs)(u.Fragment,{children:[q&&(0,s.jsx)(e0,{"data-type":"inside",ref:$,onFocus:e=>{if(a){let e=_();tE(e[e.length-1])}else if(P?.portalNode)if(M.current=!1,tp(e,P.portalNode)){let e=tc(y);e?.focus()}else(0,tW.resolveRef)(p??P.beforeOutsideRef)?.focus()}}),n,q&&(0,s.jsx)(e0,{"data-type":"inside",ref:W,onFocus:e=>{if(a)tE(_()[0]);else if(P?.portalNode)if(d&&(M.current=!0),tp(e,P.portalNode)){let e=tf(y);e?.focus()}else(0,tW.resolveRef)(f??P.afterOutsideRef)?.focus()}})]})}let tK=((o={}).nestedDialogs="--nested-dialogs",o),tq=((l={})[l.open=et.open]="open",l[l.closed=et.closed]="closed",l[l.startingStyle=et.startingStyle]="startingStyle",l[l.endingStyle=et.endingStyle]="endingStyle",l.nested="data-nested",l.nestedDialogOpen="data-nested-dialog-open",l),tX=u.createContext(void 0);function tJ(){let e=u.useContext(tX);if(void 0===e)throw Error((0,X.default)(26));return e}var tG=e.i(538880);let tQ=new Set([...new Set([...new Set(["ArrowLeft","ArrowRight"]),...new Set(["ArrowUp","ArrowDown"])]),"Home","End"]),tZ=(e,t,n,r,o,l,...i)=>{let a;if(i.length>0)throw Error((0,X.default)(1));if(e&&t&&n&&r&&o&&l)a=(i,a,s,u)=>l(e(i,a,s,u),t(i,a,s,u),n(i,a,s,u),r(i,a,s,u),o(i,a,s,u),a,s,u);else if(e&&t&&n&&r&&o)a=(l,i,a,s)=>o(e(l,i,a,s),t(l,i,a,s),n(l,i,a,s),r(l,i,a,s),i,a,s);else if(e&&t&&n&&r)a=(o,l,i,a)=>r(e(o,l,i,a),t(o,l,i,a),n(o,l,i,a),l,i,a);else if(e&&t&&n)a=(r,o,l,i)=>n(e(r,o,l,i),t(r,o,l,i),o,l,i);else if(e&&t)a=(n,r,o,l)=>t(e(n,r,o,l),r,o,l);else if(e)a=e;else throw Error("Missing arguments");return a};var t0=e.i(56032),t1=e.i(596482),t2=e.i(538148);let t9=(0,t2.isReactVersionAtLeast)(19)?function(e,n,r,o,l){let i;if(!t){let t;return t=u.useCallback(()=>n(e.getSnapshot(),r,o,l),[e,n,r,o,l]),(0,t0.useSyncExternalStore)(e.subscribe,t,t)}let a=t.syncIndex;return t.syncIndex+=1,t.didInitialize?(i=t.syncHooks[a]).store===e&&i.selector===n&&Object.is(i.a1,r)&&Object.is(i.a2,o)&&Object.is(i.a3,l)||(i.store!==e&&(t.didChangeStore=!0),i.store=e,i.selector=n,i.a1=r,i.a2=o,i.a3=l,i.value=n(e.getSnapshot(),r,o,l)):(i={store:e,selector:n,a1:r,a2:o,a3:l,value:n(e.getSnapshot(),r,o,l)},t.syncHooks.push(i)),i.value}:function(e,t,n,r,o){return(0,t1.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,o))};[].push({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,o)||(t=!0,r.value=o)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,t0.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});class t7{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}
1subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return t9(this,e,t,n,r)}}class t5 extends t7{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){u.useDebugValue(e);let n=this;(0,eC.useIsoLayoutEffect)(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;(0,eC.useIsoLayoutEffect)(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);(0,eC.useIsoLayoutEffect)(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){u.useDebugValue(e);let n=this,r=void 0!==t;(0,eC.useIsoLayoutEffect)(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){return(0,this.selectors[e])(this.state,t,n,r)}useState(e,t,n,r){return u.useDebugValue(e),t9(this,this.selectors[e],t,n,r)}useContextCallback(e,t){u.useDebugValue(e);let n=(0,eS.useStableCallback)(t??tb.NOOP);this.context[e]=n}useStateSetter(e){let t=u.useRef(void 0);return void 0===t.current&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n,r=(n="function"==typeof e?e:this.selectors[e])(this.state);return t(r,r,this),this.subscribe(e=>{let o=n(e);if(!Object.is(r,o)){let e=r;r=o,t(o,e,this)}})}}let t3={open:tZ(e=>e.open),transitionStatus:tZ(e=>e.transitionStatus),domReferenceElement:tZ(e=>e.domReferenceElement),referenceElement:tZ(e=>e.positionReference??e.referenceElement),floatingElement:tZ(e=>e.floatingElement),floatingId:tZ(e=>e.floatingId)};class t4 extends t5{constructor(e){const{syncOnly:t,nested:n,onOpenChange:r,triggerElements:o,...l}=e;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:function(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}(),nested:n,triggerElements:o},t3),this.syncOnly=t}syncOpenEvent=(e,t)=>{let n;e&&this.state.open&&(null==t||"click"!==(n=t.type)&&"mousedown"!==n&&"keydown"!==n&&"keyup"!==n)||(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>
1{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}}var t8=e.i(791099);let t6={tabIndex:-1,[e7]:""},ne={...es,...ee.transitionStatusMapping,nestedDialogOpen:e=>e?{[tq.nestedDialogOpen]:""}:null},nt=u.forwardRef(function(e,t){var n;let{render:r,className:o,style:l,finalFocus:i,initialFocus:a,...u}=e,{store:d}=Q(),c=d.useState("descriptionElementId"),f=d.useState("disablePointerDismissal"),p=d.useState("floatingRootContext"),g=d.useState("popupProps"),m=d.useState("modal"),v=d.useState("mounted"),h=d.useState("nested"),b=d.useState("nestedOpenDialogCount"),y=d.useState("open"),E=d.useState("openMethod"),x=d.useState("titleElementId"),S=d.useState("transitionStatus"),C=d.useState("role"),w=p.useState("floatingId"),R=u.id??w;tJ(),(0,tG.useOpenChangeComplete)({open:y,ref:d.context.popupRef,onComplete(){y&&d.context.onOpenChangeComplete?.(!0)}});let k=void 0===a?(n=d.context.popupRef,e=>"touch"!==e||n.current):a,O=d.useStateSetter("popupElement"),I=(0,Z.useRenderElement)("div",e,{state:{open:y,nested:h,transitionStatus:S,nestedDialogOpen:b>0},props:[g,{id:R,"aria-labelledby":x??void 0,"aria-describedby":c??void 0,role:C,...t6,hidden:!v,onKeyDown(e){tQ.has(e.key)&&e.stopPropagation()},style:{[tK.nestedDialogs]:b}},u],ref:[t,d.context.popupRef,O],stateAttributesMapping:ne});return(0,s.jsx)(t_,{context:p,openInteractionType:E,disabled:!v,closeOnFocusOut:!f,initialFocus:k,returnFocus:i,modal:!1!==m,restoreFocus:"popup",children:I})}),nn=u.forwardRef(function(e,t){let n,{cutout:r,...o}=e;if(r){let e=r.getBoundingClientRect();n=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,s.jsx)("div",{ref:t,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:n}})}),nr=u.forwardRef(function(e,t){var n;let{keepMounted:r=!1,...o}=e,{store:l}=Q(),i=l.useState("mounted"),a=l.useState("modal"),u=l.useState("open");return i||r?(0,s.jsx)(tX.Provider,{value:r,children:(0,s.jsxs)(tD,{ref:t,...o,children:[i&&!0===a&&(0,s.jsx)(nn,{ref:l.context.internalBackdropRef,inert:(n=!u,(0,t2.isReactVersionAtLeast)(19)?n:n?"true":void 0)}),e.children]})}):null});var eq=eq;let no={},nl={},ni="";class na{lockCount=0;restore=null;timeoutLock=ek.create();timeoutUnlock=ek.create();acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){let t,n,r,o,l;if(0===this.lockCount||null!==this.restore)return;let i=eJ(e).documentElement,a=(0,eG.ownerWindow)(i).getComputedStyle(i).overflowY;if("hidden"===a||"clip"===a){this.restore=tb.NOOP;return}let s=eq.os.ios||!function(e){if("u"<typeof document)return!1;let t=eJ(e);return(0,eG.ownerWindow)(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=s?(n=(t=eJ(e)).documentElement,r=t.body,l={overflowY:(o=(0,eh.isOverflowElement)(n)?n:r).style.overflowY,overflowX:o.style.overflowX},Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,l)}):function(e){let t=eJ(e),n=t.documentElement,r=t.body,o=(0,eG.ownerWindow)(n),l=0,i=0,a=!1,s=eX.AnimationFrame.create();if(eq.engine.webkit&&(o.visualViewport?.scale??1)!==1)return()=>{};function u(){let t=o.getComputedStyle(n),s=o.getComputedStyle(r),u=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";l=n.scrollTop,i=n.scrollLeft,no={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},ni=n.style.scrollBehavior,nl={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let d=n.scrollHeight>n.clientHeight,c=n.scrollWidth>n.clientWidth,f="scroll"===t.overflowY||"scroll"===s.overflowY,p="scroll"===t.overflowX||"scroll"===s.overflowX,g=Math.max(0,o.innerWidth-r.clientWidth),m=Math.max(0,o.innerHeight-r.clientHeight),v=parseFloat(s.marginTop)+parseFloat(s.marginBottom),h=parseFloat(s.marginLeft)+parseFloat(s.marginRight),b=(0,eh.isOverflowElement)(n)?n:r;if(a=function(e){if(!("u">typeof CSS&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||"u"<typeof document)return!1;let t=eJ(e),n=t.documentElement,r=t.body,o=(0,eh.isOverflowElement)(n)?n:r,l=o.style.overflowY,i=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";let a=o.offsetWidth;o.style.overflowY="hidden";let s=o.offsetWidth;return o.style.overflowY=l,n.style.scrollbarGutter=i,a===s}(e)){n.style.scrollbarGutter=u,b.style.overflowY="hidden",b.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:u,overflowY:"hidden",overflowX:"hidden"}),(d||f)&&(n.style.overflowY="scroll"),(c||p)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:v||m?`calc(100dvh - ${v+m}px)`:"100dvh",width:h||g?`calc(100vw - ${h+g}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=l,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,no),Object.assign(r.style,nl),a||(n.scrollTop=l,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=ni)}u();let c=(0,eb.addEventListener)(o,"resize",function(){d(),s.request(u)});return()=>{s.cancel(),d(),"function"==typeof o.removeEventListener&&c()}}(e)}}let ns=new na;var eq=eq;function nu(){return!1}
1function nd({store:e,parentContext:t,isDrawer:n}){var r;let o=e.useState("open"),l=e.useState("disablePointerDismissal"),i=e.useState("modal"),a=e.useState("popupElement"),s=e.useState("floatingRootContext"),[d,c]=u.useState(0),[f,p]=u.useState(0),g=0===d,m=function(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:o=!0,outsidePressEvent:l="sloppy",referencePress:i=nu,bubbles:a,externalTree:s}=t,d="rootStore"in e?e.rootStore:e,c=d.useState("open"),f=d.useState("floatingElement"),{dataRef:p}=d.context,g=t$(s),m=(0,eS.useStableCallback)("function"==typeof o?o:()=>!1),v="function"==typeof o?m:o,h=!1!==v,b=(0,eS.useStableCallback)(()=>l),{escapeKey:y,outsidePress:E}={escapeKey:"boolean"==typeof a?a:a?.escapeKey??!1,outsidePress:"boolean"==typeof a?a:a?.outsidePress??!0},x=u.useRef(!1),S=u.useRef(!1),C=u.useRef(!1),w=u.useRef(!1),R=u.useRef(""),k=u.useRef(null),O=eO(),I=eO(),T=(0,eS.useStableCallback)(()=>{I.clear(),p.current.insideReactTree=!1}),P=(0,eS.useStableCallback)(e=>{let t=p.current.floatingContext?.nodeId;return(g?tm(g.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=(0,eS.useStableCallback)(e=>e5(e,d.select("floatingElement"))||e5(e,d.select("domReferenceElement"))),j=(0,eS.useStableCallback)(e=>{i()&&d.setOpen(!1,(0,ef.createChangeEventDetails)(ep.REASONS.triggerPress,e.nativeEvent))}),A=(0,eS.useStableCallback)(e=>{if(!c||!n||!r||"Escape"!==e.key||w.current||!y&&P("__escapeKeyBubbles"))return;let t="nativeEvent"in e?e.nativeEvent:e,o=(0,ef.createChangeEventDetails)(ep.REASONS.escapeKey,t);d.setOpen(!1,o),o.isCanceled||e.preventDefault(),y||o.isPropagationAllowed||e.stopPropagation()}),N=(0,eS.useStableCallback)(()=>{p.current.insideReactTree=!0,I.start(0,T)}),L=(0,eS.useStableCallback)(e=>{if(!c||!n||0!==e.button)return;let t=e9(e.nativeEvent);e2(d.select("floatingElement"),t)&&(x.current||(x.current=!0,S.current=!1))}),D=(0,eS.useStableCallback)(e=>{!c||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});u.useEffect(()=>{if(!c||!n)return;p.current.__escapeKeyBubbles=y,p.current.__outsidePressBubbles=E;let e=new ek,t=new ek;function o(){C.current=!0,t.start(0,()=>{C.current=!1})}function l(){x.current=!1,S.current=!1}function i(){let e=R.current,t=b(),n="function"==typeof t?t():t;return"string"==typeof n?n:n["pen"!==e&&e?e:"mouse"]}function a(e){let t=p.current.floatingContext?.nodeId,n=g&&tm(g.nodesRef.current,t).some(t=>e5(e,t.context?.elements.floating));return M(e)||n}function s(e){let n;if("intentional"===(n=i())&&"click"!==e.type||"sloppy"===n&&"click"===e.type){"click"===e.type||M(e)||(t.clear(),C.current=!1),T();return}if(p.current.insideReactTree)return void T();let r=e9(e),o=`[${th("inert")}]`,l=(0,eh.isElement)(r)?r.getRootNode():null,s=Array.from(((0,eh.isShadowRoot)(l)?l:eJ(d.select("floatingElement"))).querySelectorAll(o)),u=d.context.triggerElements;if(r&&(u.hasElement(r)||u.hasMatchingElement(e=>e2(e,r))))return;let c=(0,eh.isElement)(r)?r:null;for(;c&&!(0,eh.isLastTraversableNode)(c);){let e=(0,eh.getParentNode)(c);if((0,eh.isLastTraversableNode)(e)||!(0,eh.isElement)(e))break;c=e}if(!(s.length&&(0,eh.isElement)(r)&&!r.matches("html,body")&&!e2(r,d.select("floatingElement"))&&s.every(e=>!e2(c,e)))){if((0,eh.isHTMLElement)(r)&&!("touches"in e)){let t=(0,eh.isLastTraversableNode)(r),n=(0,eh.getComputedStyle)(r),o=/auto|scroll/,l=t||o.test(n.overflowX),i=t||o.test(n.overflowY),a=l&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,s=i&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,u="rtl"===n.direction,d=s&&(u?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),c=a&&e.offsetY>r.clientHeight;if(d||c)return}if(!a(e)){if("intentional"===i()&&C.current){t.clear(),C.current=!1;return}"function"==typeof v&&!v(e)||P("__outsidePressBubbles")||(d.setOpen(!1,(0,ef.createChangeEventDetails)(ep.REASONS.outsidePress,e)),T())}}}function u(e){if("sloppy"!==i()||!d.select("open")||!n||M(e))return;let t=e.touches[0];t&&(k.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{k.current&&(k.current.dismissOnTouchEnd=!1,k.current.dismissOnMouseDown=!1)}))}function m(e,t){let n=e9(e);if(!n)return;let r=(0,eb.addEventListener)(n,e.type,()=>{t(e),r()})}function I(e){O.clear(),"pointerdown"===e.type&&(R.current=e.pointerType),("mousedown"!==e.type||!k.current||k.current.dismissOnMouseDown)&&m(e,e=>{if("pointerdown"===e.type)"sloppy"!==i()||"touch"===e.pointerType||!d.select("open")||!n||M(e)||s(e);else s(e)})}function j(e){if(!x.current)return;let n=S.current;if(l(),"intentional"===i()){if("pointercancel"===e.type){n&&o();return}
1a(e)||(n?o():("function"!=typeof v||v(e))&&(t.clear(),C.current=!0,T()))}}function N(e){if("sloppy"!==i()||!k.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-k.current.startX),r=Math.abs(t.clientY-k.current.startY),o=Math.sqrt(n*n+r*r);o>5&&(k.current.dismissOnTouchEnd=!0),o>10&&(s(e),O.clear(),k.current=null)}function L(e){"sloppy"!==i()||!k.current||M(e)||(k.current.dismissOnTouchEnd&&s(e),O.clear(),k.current=null)}let D=eJ(f),B=ey(r&&ey((0,eb.addEventListener)(D,"keydown",A),(0,eb.addEventListener)(D,"compositionstart",function(){e.clear(),w.current=!0}),(0,eb.addEventListener)(D,"compositionend",function(){e.start(5*!!eq.engine.webkit,()=>{w.current=!1})})),h&&ey((0,eb.addEventListener)(D,"click",I,!0),(0,eb.addEventListener)(D,"pointerdown",I,!0),(0,eb.addEventListener)(D,"pointerup",j,!0),(0,eb.addEventListener)(D,"pointercancel",j,!0),(0,eb.addEventListener)(D,"mousedown",I,!0),(0,eb.addEventListener)(D,"mouseup",j,!0),(0,eb.addEventListener)(D,"touchstart",function(e){R.current="touch",m(e,u)},!0),(0,eb.addEventListener)(D,"touchmove",function(e){m(e,N)},!0),(0,eb.addEventListener)(D,"touchend",function(e){m(e,L)},!0)));return()=>{B(),e.clear(),t.clear(),l(),C.current=!1}},[p,f,r,h,v,c,n,y,E,A,T,b,P,M,g,d,O]),u.useEffect(T,[v,T]);let B=u.useMemo(()=>({onKeyDown:A,onPointerDown:j,onClick:j}),[A,j]),V=u.useMemo(()=>({onKeyDown:A,onPointerDown:D,onMouseDown:D,onClickCapture:N,onMouseDownCapture(e){N(),L(e)},onPointerDownCapture(e){N(),L(e)},onMouseUpCapture:N,onTouchEndCapture:N,onTouchMoveCapture:N}),[A,N,L,D]);return u.useMemo(()=>n?{reference:B,floating:V,trigger:B}:{},[n,B,V])}(s,{outsidePressEvent:()=>e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:"trap-focus"===i?"sloppy":"intentional",touch:"sloppy"},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||"button"in t&&0!==t.button||"touches"in t&&1!==t.touches.length)return!1;let n=e9(t);return!!g&&!l&&(!i||!e.context.internalBackdropRef.current&&!e.context.backdropRef.current||e.context.internalBackdropRef.current===n||e.context.backdropRef.current===n||e2(n,a)&&!n?.hasAttribute("data-base-ui-portal"))},escapeKey:g});!function(e=!0,t=null){(0,eC.useIsoLayoutEffect)(()=>{if(e)return ns.acquire(t)},[e,t])}(o&&!0===i,a),e.useContextCallback("onNestedDialogOpen",(e,t)=>{c(e),p(t)}),e.useContextCallback("onNestedDialogClose",()=>{c(0),p(0)}),u.useEffect(()=>(t?.onNestedDialogOpen&&o&&t.onNestedDialogOpen(d+1,f+ +!!n),t?.onNestedDialogClose&&!o&&t.onNestedDialogClose(),()=>{t?.onNestedDialogClose&&o&&t.onNestedDialogClose()}),[n,o,d,f,t]);let v=m.reference??tb.EMPTY_OBJECT,h=m.trigger??tb.EMPTY_OBJECT;return r={activeTriggerProps:v,inactiveTriggerProps:h,popupProps:m.floating??tb.EMPTY_OBJECT,nestedOpenDialogCount:d,nestedOpenDrawerCount:f},e.useSyncedValues(r),(0,eC.useIsoLayoutEffect)(()=>()=>{e.update({activeTriggerProps:tb.EMPTY_OBJECT,inactiveTriggerProps:tb.EMPTY_OBJECT,popupProps:tb.EMPTY_OBJECT})},[e]),null}class nc{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(void 0!==n&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}let nf=tZ(e=>e.triggerIdProp??e.activeTriggerId),np=tZ(e=>e.openProp??e.open),ng=tZ(e=>(e.popupElement?.id??e.floatingId)||void 0);function nm(e,t){return void 0!==t&&np(e)&&nf(e)===t}let nv={...{open:np,mounted:tZ(e=>e.mounted),transitionStatus:tZ(e=>e.transitionStatus),floatingRootContext:tZ(e=>e.floatingRootContext),triggerCount:tZ(e=>e.triggerCount),preventUnmountingOnClose:tZ(e=>e.preventUnmountingOnClose),payload:tZ(e=>e.payload),activeTriggerId:nf,activeTriggerElement:tZ(e=>e.mounted?e.activeTriggerElement:null),popupId:ng,isTriggerActive:tZ((e,t)=>void 0!==t&&nf(e)===t),isOpenedByTrigger:tZ((e,t)=>nm(e,t)),isMountedByTrigger:tZ((e,t)=>void 0!==t&&nf(e)===t&&e.mounted),triggerProps:tZ((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:tZ((e,t)=>nm(e,t)||void 0!==t&&np(e)&&null==nf(e)&&1===e.triggerCount?ng(e):void 0),popupProps:tZ(e=>e.popupProps),popupElement:tZ(e=>e.popupElement),positionerElement:tZ(e=>e.positionerElement)},modal:tZ(e=>e.modal),nested:tZ(e=>e.nested),nestedOpenDialogCount:tZ(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:tZ(e=>e.nestedOpenDrawerCount),disablePointerDismissal:tZ(e=>e.disablePointerDismissal),openMethod:tZ(e=>e.openMethod),descriptionElementId:tZ(e=>e.descriptionElementId),titleElementId:tZ(e=>e.titleElementId),viewportElement:tZ(e=>e.viewportElement),role:tZ(e=>e.role)};
1class nh extends t5{constructor(e,t,n=!1){const r=new nc,o=function(e={}){return{...{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new t4({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new nc,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0}),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:tb.EMPTY_OBJECT,inactiveTriggerProps:tb.EMPTY_OBJECT,popupProps:tb.EMPTY_OBJECT},modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}(e);o.floatingRootContext=function(e,t,n=!1){return new t4({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}(r,t,n),super(o,{popupRef:u.createRef(),backdropRef:u.createRef(),internalBackdropRef:u.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},nv)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};!function(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let o=n?.id??null;(o||t)&&(e.activeTriggerId=o,e.activeTriggerElement=n??null)}(n,e,t.trigger),this.update(n)};static useStore(e,t){return function(e,t,n=!1){let r=(0,tM.useId)(),o=null!=(u.useContext(tB)?.id||null),l=u.useRef(null);void 0===e&&null===l.current&&(l.current=t(r,o));let i=e??l.current;return!function(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:o,nested:l,onOpenChange:i}=e,a=t.useState("open"),s=t.useState("activeTriggerElement"),d=t.useState(n?"popupElement":"positionerElement"),c=t.context.triggerElements,f=u.useRef(null);void 0===r&&null===f.current&&(f.current=new t4({open:a,transitionStatus:void 0,referenceElement:s,floatingElement:d,triggerElements:c,onOpenChange:i,floatingId:o,syncOnly:!0,nested:l}));let p=r??f.current;t.useSyncedValue("floatingId",o),(0,eC.useIsoLayoutEffect)(()=>{let e={open:a,floatingId:o,referenceElement:s,floatingElement:d};(0,eh.isElement)(s)&&(e.domReferenceElement=s),p.state.positionReference===p.state.referenceElement&&(e.positionReference=s),p.update(e)},[a,o,s,d,p]),p.context.onOpenChange=i,p.context.nested=l}({popupStore:i,treatPopupAsFloatingElement:n,floatingRootContext:i.state.floatingRootContext,floatingId:r,nested:o,onOpenChange:i.setOpen}),{store:i,internalStore:l.current}}(e,(e,n)=>new nh(t,e,n),!0).store}}let nb=((i={})[i.open=et.open]="open",i[i.closed=et.closed]="closed",i[i.startingStyle=et.startingStyle]="startingStyle",i[i.endingStyle=et.endingStyle]="endingStyle",i.nested="data-nested",i.nestedDialogOpen="data-nested-dialog-open",i),ny={...es,...ee.transitionStatusMapping,nested:e=>e?{[nb.nested]:""}:null,nestedDialogOpen:e=>e?{[nb.nestedDialogOpen]:""}:null},nE=u.forwardRef(function(e,t){let{render:n,className:r,style:o,children:l,...i}=e,a=tJ(),{store:s}=Q(),u=s.useState("open"),d=s.useState("nested"),c=s.useState("transitionStatus"),f=s.useState("nestedOpenDialogCount"),p=s.useState("mounted"),g=s.useStateSetter("viewportElement");return(0,Z.useRenderElement)("div",e,{enabled:a||p,state:{open:u,nested:d,transitionStatus:c,nestedDialogOpen:f>0},ref:[t,g],stateAttributesMapping:ny,props:[{role:"presentation",hidden:!p,style:{pointerEvents:u?void 0:"none"},children:l},i]})}),nx=u.forwardRef(function(e,t){let{render:n,className:r,style:o,id:l,...i}=e,{store:a}=Q(),s=(0,em.useBaseUiId)(l);return a.useSyncedValueWithCleanup("titleElementId",s),(0,Z.useRenderElement)("h2",e,{ref:t,props:[{id:s},i]})});var eq=eq;let nS=u.forwardRef(function(e,t){var n;let r,o,l,i,a,{render:s,className:d,style:c,disabled:f=!1,nativeButton:p=!0,id:g,payload:m,handle:v,...h}
1=e,b=Q(!0),y=v?.store??b?.store;if(!y)throw Error((0,X.default)(79));let E=(0,em.useBaseUiId)(g),x=y.useState("floatingRootContext"),S=y.useState("isOpenedByTrigger",E),C=y.useState("triggerPopupId",E),w=u.useRef(null),{registerTrigger:R,isMountedByThisTrigger:k}=(n={payload:m},r=y.useState("isMountedByTrigger",E),o=u.useRef(null),l=u.useRef(null),i=u.useCallback(e=>{if(void 0===E)return;let t=!1;if(null!==o.current){let e=o.current,n=l.current,r=y.context.triggerElements.getById(e);n&&r===n&&(y.context.triggerElements.delete(e),t=!0),o.current=null,l.current=null}if(null!==e&&(o.current=E,l.current=e,y.context.triggerElements.add(E,e),t=!0),t){let e=y.context.triggerElements.size;y.select("open")&&y.state.triggerCount!==e&&y.set("triggerCount",e)}},[y,E]),a=(0,eS.useStableCallback)(e=>{if(i(e),!e)return;let t=y.select("open"),r=y.select("activeTriggerId");r===E?y.update({activeTriggerElement:e,...t?n:null}):null==r&&t&&y.update({activeTriggerId:E,activeTriggerElement:e,...n})}),(0,eC.useIsoLayoutEffect)(()=>{r&&y.update({activeTriggerElement:w.current,...n})},[r,y,w,...Object.values(n)]),{registerTrigger:a,isMountedByThisTrigger:r}),{getButtonProps:O,buttonRef:I}=(0,ec.useButton)({disabled:f,native:p}),T=function(e,t={}){let{enabled:n=!0,event:r="click",toggle:o=!0,ignoreMouse:l=!1,stickIfOpen:i=!0,touchOpenDelay:a=0,reason:s=ep.REASONS.triggerPress}=t,d="rootStore"in e?e.rootStore:e,c=d.context.dataRef,f=u.useRef(void 0),p=(0,eX.useAnimationFrame)(),g=eO(),m=u.useMemo(()=>{function e(e,t,n,r){let o=(0,ef.createChangeEventDetails)(s,t,n);e&&"touch"===r&&a>0?g.start(a,()=>{d.setOpen(!0,o)}):d.setOpen(e,o)}function t(e,t,n){let r=c.current.openEvent,l=d.select("domReferenceElement")!==t;return!!e&&!!l||!e||!o||!!r&&!!i&&!n(r.type)}return{onPointerDown(e){f.current=e.pointerType},onMouseDown(n){let o=f.current,i=n.nativeEvent,a=d.select("open");if(0!==n.button||"click"===r||e6(o,!0)&&l)return;let s=t(a,n.currentTarget,e=>"click"===e||"mousedown"===e),u=e9(i);if(e3(u))return void e(s,i,u,o);let c=n.currentTarget;p.request(()=>{e(s,i,c,o)})},onClick(n){if("mousedown-only"===r)return;let o=f.current;if("mousedown"===r&&o){f.current=void 0;return}e6(o,!0)&&l||e(t(d.select("open"),n.currentTarget,e=>"click"===e||"mousedown"===e||"keydown"===e||"keyup"===e),n.nativeEvent,n.currentTarget,o)},onKeyDown(){f.current=void 0}}},[c,r,l,s,d,i,o,p,g,a]);return u.useMemo(()=>n?{reference:m}:tb.EMPTY_OBJECT,[n,m])}(x,{enabled:null!=x}),P=function(e,t){var n;let r,o,{onClick:l,onPointerDown:i}
1=(n=(0,eS.useStableCallback)((n,r)=>{("function"==typeof e?e():e)||t(r||(eq.os.ios?"touch":""))}),r=u.useRef(""),o=u.useCallback(e=>{e.defaultPrevented||(r.current=e.pointerType,n(e,e.pointerType))},[n]),{onClick:u.useCallback(e=>{0===e.detail?n(e,"keyboard"):("pointerType"in e?n(e,e.pointerType):n(e,r.current),r.current="")},[n]),onPointerDown:o});return u.useMemo(()=>({onClick:l,onPointerDown:i}),[l,i])}(()=>y.select("open"),e=>{y.set("openMethod",e)}),M=y.useState("triggerProps",k);return(0,Z.useRenderElement)("button",e,{state:{disabled:f,open:S},ref:[I,t,R,w],props:[T.reference,M,P,{[tj]:"",id:E,"aria-haspopup":"dialog","aria-expanded":S,"aria-controls":C},h,O],stateAttributesMapping:ea})});class nC{constructor(e){this.store=e??new nh}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;this.store.setOpen(!0,(0,ef.createChangeEventDetails)(ep.REASONS.imperativeAction,void 0,t))}openWithPayload(e){this.store.set("payload",e),this.store.setOpen(!0,(0,ef.createChangeEventDetails)(ep.REASONS.imperativeAction,void 0,void 0))}close(){this.store.setOpen(!1,(0,ef.createChangeEventDetails)(ep.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}}e.s(["Backdrop",0,ed,"Close",0,eg,"Description",0,ev,"Handle",0,nC,"Popup",0,nt,"Portal",0,nr,"Root",0,function(e){return function(e,t="dialog"){let n,{children:r,open:o,defaultOpen:l=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:d=!1,modal:c=!0,actionsRef:f,handle:p,triggerId:g,defaultTriggerId:m=null}=e,v="alert-dialog"===t,h=Q(!0),b={modal:!!v||c,disablePointerDismissal:v||d,nested:!!h,role:v?"alertdialog":"dialog"},y=nh.useStore(p?.store,{open:l,openProp:o,activeTriggerId:m,triggerIdProp:g,...b});(n=u.useRef(!0)).current&&(n.current=!1,(()=>{let e=void 0===o&&!1===y.state.open&&!0===l?{open:!0,activeTriggerId:m}:null;v?y.update(e?{...b,...e}:b):e&&y.update(e)})()),y.useControlledProp("openProp",o),y.useControlledProp("triggerIdProp",g),y.useSyncedValues(b),y.useContextCallback("onOpenChange",i),y.useContextCallback("onOpenChangeComplete",a);let E=y.useState("open"),x=y.useState("mounted"),S=y.useState("payload");!function(e){let{store:t,actionsRef:n}=e,r=t.useState("open");(0,eC.useIsoLayoutEffect)(()=>{r||null===t.state.openMethod||t.set("openMethod",null)},[r,t]),(0,eC.useIsoLayoutEffect)(()=>()=>{null!==t.state.openMethod&&t.set("openMethod",null)},[t]),function(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),o=e.useState("triggerCount");(0,eC.useIsoLayoutEffect)(()=>{if(!r){0!==e.state.triggerCount&&e.set("triggerCount",0);return}let t=e.context.triggerElements.size,o={};e.state.triggerCount!==t&&(o.triggerCount=t);let l=e.select("activeTriggerId"),i=null;if(l){let t=e.context.triggerElements.getById(l);t?t!==e.state.activeTriggerElement&&(o.activeTriggerElement=t):i=l}if(!i&&!l&&1===t){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;o.activeTriggerId=e,o.activeTriggerElement=n}}(void 0!==o.triggerCount||void 0!==o.activeTriggerId||void 0!==o.activeTriggerElement)&&e.update(o),i&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===i&&!e.context.triggerElements.getById(i)){let t=(0,ef.createChangeEventDetails)(ep.REASONS.none);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,o,n])}(t);let{forceUnmount:o}=function(e,t){let{mounted:n,setMounted:r,transitionStatus:o}=(0,t8.useTransitionStatus)(e),l=t.useState("preventUnmountingOnClose"),i=!e&&l;t.useSyncedValues({mounted:n,transitionStatus:o,preventUnmountingOnClose:i});let a=(0,eS.useStableCallback)(()=>{r(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),t.context.onOpenChangeComplete?.(!1)});return(0,tG.useOpenChangeComplete)({enabled:n&&!e&&!i,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:o}}(r,t),l=u.useCallback(()=>{t.setOpen(!1,(0,ef.createChangeEventDetails)(ep.REASONS.imperativeAction))},[t]);u.useImperativeHandle(n,()=>({unmount:o,close:l}),[o,l])}({store:y,actionsRef:f});let C=u.useMemo(()=>({store:y}),[y]);return(0,s.jsx)(J.Provider,{value:!1,children:(0,s.jsxs)(G.Provider,{value:C,children:[(E||x)&&(0,s.jsx)(nd,{store:y,parentContext:h?.store.context,isDrawer:"drawer"===t}),"function"==typeof r?r({payload:S}):r]})})}(e,u.useContext(J)?"drawer":"dialog")}
1,"Title",0,nx,"Trigger",0,nS,"Viewport",0,nE,"createHandle",0,function(){return new nC}],779931);var nw=e.i(779931),nw=nw,nR=e.i(519455),nk=e.i(98831);function nO({...e}){return(0,s.jsx)(nw.Root,{"data-slot":"dialog",...e})}function nI({...e}){return(0,s.jsx)(nw.Portal,{"data-slot":"dialog-portal",...e})}function nT({className:e,...t}){return(0,s.jsx)(nw.Backdrop,{"data-slot":"dialog-overlay",className:(0,q.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function nP({className:e,children:t,showCloseButton:n=!0,...r}){return(0,s.jsxs)(nI,{children:[(0,s.jsx)(nT,{}),(0,s.jsxs)(nw.Popup,{"data-slot":"dialog-content",className:(0,q.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r,children:[t,n&&(0,s.jsxs)(nw.Close,{"data-slot":"dialog-close",render:(0,s.jsx)(nR.Button,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm"}),children:[(0,s.jsx)(nk.XIcon,{}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}function nM({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"dialog-header",className:(0,q.cn)("flex flex-col gap-2",e),...t})}function nj({className:e,...t}){return(0,s.jsx)(nw.Title,{"data-slot":"dialog-title",className:(0,q.cn)("font-heading text-base leading-none font-medium",e),...t})}function nA({className:e,...t}){return(0,s.jsx)(nw.Description,{"data-slot":"dialog-description",className:(0,q.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...t})}var nN=e.i(294237);e.s([],277913),e.i(277913);var nL=tb;let nD=((a={}).disabled="data-disabled",a.valid="data-valid",a.invalid="data-invalid",a.touched="data-touched",a.dirty="data-dirty",a.filled="data-filled",a.focused="data-focused",a),nB={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},nV={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},n$={disabled:!1,...nV},nW={valid:e=>null===e?null:e?{[nD.valid]:""}:{[nD.invalid]:""}},nF={invalid:void 0,name:void 0,validityData:{state:nB,errors:[],error:"",value:"",initialValue:null},setValidityData:nL.NOOP,disabled:void 0,touched:nV.touched,setTouched:nL.NOOP,dirty:nV.dirty,setDirty:nL.NOOP,filled:nV.filled,setFilled:nL.NOOP,focused:nV.focused,setFocused:nL.NOOP,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:n$,markedDirtyRef:{current:!1},registerFieldControl:nL.NOOP,validation:{getValidationProps:(e,t=nL.EMPTY_OBJECT)=>t,inputRef:{current:null},registerInput:nL.NOOP,commit:async()=>{},change:nL.NOOP}},nH=u.createContext(nF);function nY(e=!0){let t=u.useContext(nH);if(t.setValidityData===nL.NOOP&&!e)throw Error((0,X.default)(28));return t}let nU=u.createContext(void 0),nz=u.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:tb.NOOP,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function n_(){return u.useContext(nz)}let nK=u.createContext({controlId:void 0,registerControlId:tb.NOOP,labelId:void 0,setLabelId:tb.NOOP,messageIds:[],setMessageIds:tb.NOOP,getDescriptionProps:e=>e});function nq(){return u.useContext(nK)}let nX=function(e){let t=(0,em.useBaseUiId)(),n=void 0===e.controlId?t:e.controlId,[r,o]=u.useState(n),[l,i]=u.useState(e.labelId),[a,d]=u.useState([]),c=(0,ew.useRefWithInit)(()=>new Map),{messageIds:f}
1=nq(),p=(0,eS.useStableCallback)((e,t)=>{let n=c.current;void 0===t?n.delete(e):(n.set(e,t),o(e=>{let t;if(0!==n.size){for(let r of n.values()){if(void 0!==e&&r===e)return e;void 0===t&&(t=r)}return t}}))}),g=u.useCallback(e=>{let t=e["aria-describedby"]?e["aria-describedby"].split(" "):[];return t.push(...f,...a),{...e,"aria-describedby":Array.from(new Set(t)).join(" ")||void 0}},[f,a]),m=u.useMemo(()=>({controlId:r,registerControlId:p,labelId:l,setLabelId:i,messageIds:a,setMessageIds:d,getDescriptionProps:g}),[r,p,l,i,a,d,g]);return(0,s.jsx)(nK.Provider,{value:m,children:e.children})};var nJ=e.i(30196);function nG(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}let nQ=Object.keys(nB);function nZ(e,t){let n=!1;for(let r of t)r.setCustomValidity(""),n||=r===e;n||e.setCustomValidity("")}let n0=u.forwardRef(function(e,t){let{errors:n,validationMode:r,submitAttemptedRef:o}=n_(),{render:l,className:i,validate:a,validationDebounceTime:d=0,validationMode:c=r,name:f,disabled:p=!1,invalid:g,dirty:m,touched:v,actionsRef:h,style:b,...y}=e,E=function(e=!1){let t=u.useContext(nU);if(!t&&!e)throw Error((0,X.default)(86));return t}(!0)?.disabled,x=(0,eS.useStableCallback)(a||(()=>null)),S=E||p,[C,w]=u.useState(!1),[R,k]=u.useState(!1),[O,I]=u.useState(!1),[T,P]=u.useState(!1),M=m??R,j=v??C,A=u.useRef(M),N=u.useRef(void 0),[L,D]=u.useState(),B=f??L;(0,eC.useIsoLayoutEffect)(()=>{void 0!==m&&(A.current=m)},[m]);let V=u.useCallback(()=>N.current,[]),$=u.useCallback(e=>{N.current=e},[]),W=(0,eS.useStableCallback)(e=>{void 0===m&&(e&&(A.current=!0),k(e))}
1),F=(0,eS.useStableCallback)(e=>{void 0===v&&w(e)}),H=(0,eS.useStableCallback)(()=>"onChange"===c||"onSubmit"===c&&o.current),Y=B&&Object.hasOwn(n,B)?n[B]:null,U=!!(Array.isArray(Y)?Y.length:Y),z=!0===g||U,[_,K]=u.useState({state:nB,error:"",errors:[],value:null,initialValue:null}),q=S?null:!z&&_.state.valid,J=u.useMemo(()=>({disabled:S,touched:j,dirty:M,valid:q,filled:O,focused:T}),[S,j,M,q,O,T]),G=function(e){let{formRef:t}=n_(),{setValidityData:n,validate:r,validityData:o,validationDebounceTime:l,invalid:i,markedDirtyRef:a,state:s,shouldValidateOnChange:d,getRegisteredFieldId:c}=e,{controlId:f,getDescriptionProps:p}=nq(),g=eO(),m=u.useRef(null),v=(0,ew.useRefWithInit)(()=>new Set).current,h=u.useRef(0),b=u.useCallback(e=>{if(e)return v.add(e),()=>{v.delete(e)}},[v]),y=(0,eS.useStableCallback)(async(e,l=!1)=>{let u,p=function(e){let t=null;for(let n of e)if(!n.disabled){if(!n.validity.valid)return n;t??=n}return t}(v)??m.current;if(!p)return;h.current+=1;let b=h.current;function y(e,n=i){let r=c()??f;if(null==r)return;let o=t.current.fields.get(r);if(!o)return;let l=nG(e,n);t.current.fields.set(r,{...o,validityData:l})}if(l){if(!1!==s.valid)return;let t=p.validity;if(!t.valueMissing){let t={value:e,state:{...nB,valid:!0},error:"",errors:[],initialValue:o.initialValue};nZ(p,v),y(t,!1),n(t);return}let r=nQ.reduce((e,n)=>(e[n]=t[n],e),{});if(!r.valid&&!function(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(let n of nQ)"valid"!==n&&("valueMissing"===n?t=e[n]:e[n]&&(t=!1));return t}(r))return}g.clear();let E=null,x=[],S=function(e){let t=nQ.reduce((t,n)=>(t[n]=e.validity[n],t),{}),n=!1;for(let e of nQ)if("valid"!==e){if("valueMissing"===e&&t[e])n=!0;else if(t[e])return t}return n&&!a.current&&(t.valid=!0,t.valueMissing=!1),t}(p),C=d();if(p.validationMessage&&!C)u=p.validationMessage,x=[p.validationMessage];else{let n=r(e,Array.from(t.current.fields.values()).reduce((e,t)=>(t.name&&(e[t.name]=t.getValue()),e),{}));if("object"==typeof n&&null!==n&&"then"in n){if(E=await n,b!==h.current)return}else E=n;null!==E?(S.valid=!1,S.customError=!0,Array.isArray(E)?(x=E,p.setCustomValidity(E.join("\n"))):E&&(x=[E],p.setCustomValidity(E))):C&&(nZ(p,v),S.customError=!1,p.validationMessage?(u=p.validationMessage,x=[p.validationMessage]):p.validity.valid&&!S.valid&&(S.valid=!0))}let w={value:e,state:S,error:u??(Array.isArray(E)?E[0]:E??""),errors:x,initialValue:o.initialValue};y(w),n(w)}),E=(0,eS.useStableCallback)(e=>{g.clear();let t=d();t&&""!==e&&l?(h.current+=1,g.start(l,()=>{y(e)})):y(e,!t)}),x=u.useCallback((e,t={})=>(0,nJ.mergeProps)(p(t),!1!==s.valid||s.disabled||e?tb.EMPTY_OBJECT:{"aria-invalid":!0}),[p,s.disabled,s.valid]);return u.useMemo(()=>({getValidationProps:x,inputRef:m,registerInput:b,commit:y,change:E}),[x,b,y,E])}({setValidityData:K,validate:x,validityData:_,validationDebounceTime:d,invalid:z,markedDirtyRef:A,state:J,shouldValidateOnChange:H,getRegisteredFieldId:V}),[Q,ee]=function(e){let{commit:t,invalid:n,markedDirtyRef:r,name:o,setRegisteredFieldName:l,setRegisteredFieldId:i,setValidityData:a,validityData:s}=e,{formRef:d}=n_(),c=u.useRef(null),f=u.useRef(null),p=u.useRef(null),g=(0,eS.useStableCallback)(()=>{let e=f.current;if(e)return e.getValue?e.getValue():e.value});function m(e){return void 0===e.value?g():e.value}let v=(0,eS.useStableCallback)(()=>{let e=f.current;(r.current=!0,e)?t(m(e)):t(s.value)});function h(e=f.current?.id){e&&d.current.fields.delete(e)}(0,eC.useIsoLayoutEffect)(()=>{let e=f.current;e&&e.id&&(l(o?void 0:e.name),d.current.fields.set(e.id,{getValue:g,name:o??e.name,controlRef:e.controlRef??p,validityData:nG(s,n),validate:v}))},[d,g,n,o,l,v,s]),(0,eC.useIsoLayoutEffect)(()=>{let e=d.current.fields;return()=>{let t=f.current?.id;t&&e.delete(t)}},[d]);let b=(0,eS.useStableCallback)((e,t)=>{let r;if(!t){c.current===e&&(c.current=null,h(),f.current=null,l(void 0),i(void 0));return}let u=f.current?.id;c.current=e,f.current=t,o||l(t.name),i(t.id),u&&u!==t.id&&h(u),function(){let e=f.current;if(!e)return;let t=m(e);null===s.initialValue&&null!==t&&a(e=>({...e,initialValue:t}))}(),(r=f.current)&&r.id&&d.current.fields.set(r.id,{getValue:g,name:o??r.name,controlRef:r.controlRef??p,validityData:nG(s,n),validate:v})});return[v,b]}
1({commit:G.commit,invalid:z,markedDirtyRef:A,name:f,setRegisteredFieldName:D,setRegisteredFieldId:$,setValidityData:K,validityData:_});u.useImperativeHandle(h,()=>({validate:Q}),[Q]);let et=u.useMemo(()=>({invalid:z,name:B,validityData:_,setValidityData:K,disabled:S,touched:j,setTouched:F,dirty:M,setDirty:W,filled:O,setFilled:I,focused:T,setFocused:P,validate:x,validationMode:c,validationDebounceTime:d,shouldValidateOnChange:H,state:J,markedDirtyRef:A,registerFieldControl:ee,validation:G}),[z,B,_,S,j,F,M,W,O,I,T,P,x,c,d,H,J,ee,G]),en=(0,Z.useRenderElement)("div",e,{ref:t,state:J,props:y,stateAttributesMapping:nW});return(0,s.jsx)(nH.Provider,{value:et,children:en})}),n1=u.forwardRef(function(e,t){return(0,s.jsx)(nX,{children:(0,s.jsx)(n0,{...e,ref:t})})}),n2=u.createContext({disabled:!1});function n9(){return u.useContext(n2)}let n7=u.forwardRef(function(e,t){let{render:n,className:r,style:o,id:l,nativeLabel:i=!0,...a}=e,s=nY(!1),d=n9(),{labelId:c}=nq(),f={...s.state,disabled:s.disabled||d.disabled},p=u.useRef(null),g=function(e={}){let t,{id:n,fallbackControlId:r,native:o=!1,setLabelId:l,focusControl:i}=e,{controlId:a,setLabelId:s}=nq(),u=(0,eS.useStableCallback)(e=>{s(e),l?.(e)}),d=(t=(0,em.useBaseUiId)(n),(0,eC.useIsoLayoutEffect)(()=>(u(t),()=>{u(void 0)}),[t,u]),t),c=a??r;function f(e){let t=e9(e.nativeEvent);t?.closest("button,input,select,textarea")||(!e.defaultPrevented&&e.detail>1&&e.preventDefault(),o||function(e){if(i)return i(e,c);if(!c)return;let t=eJ(e.currentTarget).getElementById(c);(0,eh.isHTMLElement)(t)&&t.focus({focusVisible:!0})}(e))}return o?{id:d,htmlFor:c??void 0,onMouseDown:f}:{id:d,onClick:f,onPointerDown(e){e.preventDefault()}}}({id:c??l,native:i});return(0,Z.useRenderElement)("label",e,{ref:[t,p],state:f,props:[g,a],stateAttributesMapping:nW})}),n5={...nW,...ee.transitionStatusMapping},n3=u.forwardRef(function(e,t){let{render:n,id:r,className:o,match:l,style:i,...a}=e,d=(0,em.useBaseUiId)(r),{validityData:c,state:f,name:p}=nY(!1),{setMessageIds:g}=nq(),{errors:m}=n_(),v=p&&Object.hasOwn(m,p)?m[p]:null,h=!!(Array.isArray(v)?v.length:v),b="string"==typeof l,y=!1;y=!0===l||!f.disabled&&(b?!!c.state[l]:h||!1===c.state.valid);let{mounted:E,transitionStatus:x,setMounted:S}=(0,t8.useTransitionStatus)(y);(0,eC.useIsoLayoutEffect)(()=>{if(y&&d)return g(e=>e.concat(d)),()=>{g(e=>e.filter(e=>e!==d))}},[y,d,g]);let C=u.useRef(null),[w,R]=u.useState(null),[k,O]=u.useState(null),I=c.error;!b&&h?I=v:c.errors.length>1&&(I=c.errors);let T=I??"";Array.isArray(I)&&(T=I.length>1?(0,s.jsx)("ul",{children:I.map(e=>(0,s.jsx)("li",{children:e},e))}):I[0]??"");let P=Array.isArray(I)?JSON.stringify(I):I;y&&P!==k&&(O(P),R(T)),(0,tG.useOpenChangeComplete)({open:y,ref:C,onComplete(){y||S(!1)}});let M={...f,transitionStatus:x},j=(0,Z.useRenderElement)("div",e,{ref:[t,C],state:M,props:[{id:d,children:y?T:w},a],stateAttributesMapping:n5,enabled:E});return E?j:null}),n4=u.forwardRef(function(e,t){let{render:n,id:r,className:o,style:l,...i}=e,a=(0,em.useBaseUiId)(r),s=nY(!1),u=n9(),{setMessageIds:d}=nq(),c={...s.state,disabled:s.disabled||u.disabled};return(0,eC.useIsoLayoutEffect)(()=>{if(a)return d(e=>e.concat(a)),()=>{d(e=>e.filter(e=>e!==a))}},[a,d]),(0,Z.useRenderElement)("p",e,{ref:t,state:c,props:[{id:a},i],stateAttributesMapping:nW})});var n8=e.i(432994);let n6=u.forwardRef(function(e,t){let{render:n,className:r,id:o,name:l,value:i,disabled:a=!1,onValueChange:s,defaultValue:d,autoFocus:c=!1,style:f,...p}=e,{state:g,name:m,disabled:v,setTouched:h,setDirty:b,validityData:y,setFocused:E,setFilled:x,validationMode:S,validation:C}=nY(),{clearErrors:w}=n_(),R=v||a,k=m??l,O={...g,disabled:R},{labelId:I}=nq(),T=function(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:l}=nq(),i=(0,em.useBaseUiId)(t),a=n?o:void 0,s=(0,ew.useRefWithInit)(()=>Symbol("labelable-control")),d=u.useRef(!1),c=u.useRef(null!=t),f=(0,eS.useStableCallback)(()=>{d.current&&l!==tb.NOOP&&(d.current=!1,l(s.current,void 0))});return(0,eC.useIsoLayoutEffect)(()=>{let e;if(l!==tb.NOOP){if(n){let n=r?.current;e=(0,eh.isElement)(n)&&null!=n.closest("label")?t??null:a??i}else if(null!=t)c.current=!0,e=t;else{if(!c.current)return void f();e=i}if(void 0===e)return void f();d.current=!0,l(s.current,e)}},[t,r,a,l,n,i,s,f]),u.useEffect(()=>f,[f]),o??i}({id:o});(0,eC.useIsoLayoutEffect)(()=>{let e=null!=i;C.inputRef.current?.value||e&&""!==i?x(!0):e&&""===i&&x(!1)},[C.inputRef,x,i]);let P=u.useRef(null);(0,eC.useIsoLayoutEffect)(()=>{c&&P.current===e1(eJ(P.current))&&E(!0)},[c,E]);let[M]=(0,n8.useControlled)({controlled:i,default:d,name:"FieldControl",state:"value"}
1),j=void 0!==i,A=j?M:void 0,N=(0,eS.useStableCallback)(()=>C.inputRef.current?.value);return!function(e,t,n,r,o=!0,l){let{registerFieldControl:i}=nY(),a=u.useRef(null);a.current||(a.current=Symbol()),(0,eC.useIsoLayoutEffect)(()=>{let s=a.current;if(s&&o)return i(s,{controlRef:e,getValue:r,id:t,name:l,value:n}),()=>{i(s,void 0)}},[e,o,r,t,l,i,n])}(C.inputRef,T,A,N,!R,l),(0,Z.useRenderElement)("input",e,{ref:[t,P],state:O,props:[{id:T,disabled:R,name:k,ref:C.inputRef,"aria-labelledby":I,autoFocus:c,...j?{value:A}:{defaultValue:d},onChange(e){let t=e.currentTarget.value;s?.(t,(0,ef.createChangeEventDetails)(ep.REASONS.none,e.nativeEvent)),b(t!==y.initialValue),x(""!==t),e.nativeEvent.defaultPrevented||(w(k),C.change(t))},onFocus(){E(!0)},onBlur(e){h(!0),E(!1),"onBlur"===S&&C.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(h(!0),C.commit(e.currentTarget.value))}},p,e=>C.getValidationProps(R,e)],stateAttributesMapping:nW})}),re=u.createContext(void 0),rt=u.forwardRef(function(e,t){let{render:n,className:r,style:o,disabled:l=!1,...i}=e,{state:a,disabled:d}=nY(!1),c=d||l,f={...a,disabled:c},p=function(e=!0){let t=u.useContext(re);if(void 0===t&&!e)throw Error((0,X.default)(3));return t}(),g=p?.allValues!==void 0?p?.parent.id:void 0,m=u.useMemo(()=>({disabled:c}),[c]),v=(0,Z.useRenderElement)("div",e,{ref:t,state:f,props:i,stateAttributesMapping:nW});return(0,s.jsx)(nX,{controlId:g,children:(0,s.jsx)(n2.Provider,{value:m,children:v})})});function rn({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,q.cn)("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...t})}e.s(["Control",0,n6,"Description",0,n4,"Error",0,n3,"Item",0,rt,"Label",0,n7,"Root",0,n1,"Validity",0,function(e){let{children:t}=e,{validityData:n,invalid:r}=nY(!1),o=u.useMemo(()=>nG(n,r),[n,r]),l=!1===o.state.valid,{transitionStatus:i}=(0,t8.useTransitionStatus)(l),a=u.useMemo(()=>({...o,validity:o.state,transitionStatus:i}),[o,i]);return(0,s.jsx)(u.Fragment,{children:t(a)})}],801209),e.i(801209);let rr=(0,nN.cva)("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function ro({className:e,align:t="inline-start",...n}){return(0,s.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:(0,q.cn)(rr({align:t}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...n})}(0,nN.cva)("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}
1);let rl=(0,c.default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var ri=e.i(282722);function ra({className:e,...t}){return(0,s.jsx)($,{"data-slot":"command",className:(0,q.cn)("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",e),...t})}function rs({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:o=!1,...l}){return(0,s.jsxs)(nO,{...l,children:[(0,s.jsxs)(nM,{className:"sr-only",children:[(0,s.jsx)(nj,{children:e}),(0,s.jsx)(nA,{children:t})]}),(0,s.jsx)(nP,{className:(0,q.cn)("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",r),showCloseButton:o,children:n})]})}function ru({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:(0,s.jsxs)(rn,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[(0,s.jsx)($.Input,{"data-slot":"command-input",className:(0,q.cn)("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t}),(0,s.jsx)(ro,{children:(0,s.jsx)(rl,{className:"size-4 shrink-0 opacity-50"})})]})})}function rd({className:e,...t}){return(0,s.jsx)($.List,{"data-slot":"command-list",className:(0,q.cn)("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...t})}function rc({className:e,...t}){return(0,s.jsx)($.Empty,{"data-slot":"command-empty",className:(0,q.cn)("py-6 text-center text-sm",e),...t})}function rf({className:e,...t}){return(0,s.jsx)($.Group,{"data-slot":"command-group",className:(0,q.cn)("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),...t})}function rp({className:e,...t}){return(0,s.jsx)($.Separator,{"data-slot":"command-separator",className:(0,q.cn)("-mx-1 h-px bg-border",e),...t})}function rg({className:e,children:t,...n}){return(0,s.jsxs)($.Item,{"data-slot":"command-item",className:(0,q.cn)("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",e),...n,children:[t,(0,s.jsx)(ri.CheckIcon,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function rm({className:e,...t}){return(0,s.jsx)("span",{"data-slot":"command-shortcut",className:(0,q.cn)("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",e),...t})}function rv({currentHref:e,nextHref:t,location:n}){t===e?n.reload():n.assign(t)}function rh(...e){return e.filter(e=>!!(e&&e.trim())).join(" ")}function rb(...e){return e.filter(e=>!!(e&&e.trim()))}function ry({brand:e,brandLabel:t,currency:n,hideTrigger:r=!1,language:o,pathname:l,switchState:i}){let a=(0,d.useSearchParams)(),[c,p]=(0,u.useState)(!1),[g,m]=(0,u.useState)(""),[v,h]=(0,u.useState)(!1),b=[...i.brands.map(e=>({...e,group:"Brand"})),...i.currencies.map(e=>({...e,group:"Currency"})),...i.languages.map(e=>({...e,group:"Language"}))],y=a.toString(),E=`${l}${y?`?${y}`:""}`;async function x(e){if(v||e.current||!e.redirectPathname){m(""),p(!1);return}m(""),p(!1),h(!0);try{let t=await fetch("/api/site-context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"Brand"===e.group?"brand":"Language"===e.group?"language":"currency",brand:"Brand"===e.group?e.value:void 0,currency:"Currency"===e.group?e.value:void 0,language:"Language"===e.group?e.value:void 0,pathname:l})});if(!t.ok)return void window.location.reload();let n=await t.json(),r=n?.redirectTo??e.redirectPathname,o=`${r}${y?`?${y}`:""}`;rv({currentHref:E,nextHref:o,location:window.location})}catch{window.location.reload()}}async function S(){if(!v){m(""),p(!1),h(!0);try{let e=await fetch("/api/site-context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"reset",pathname:l})});if(!e.ok)return void window.location.reload();let t=await e.json(),n=t?.redirectTo??l,r=`${n}${y?`?${y}`:""}`;rv({currentHref:E,nextHref:r,location:window.location})}catch{window.location.reload()}}}return(0,u.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key.toLowerCase()&&(e.preventDefault(),p(e=>!e))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),(0,s.jsxs)(s.Fragment,{children:[r?null:(0,s.jsx)("button",{type:"button","aria-label":"Open brand and language switcher",onClick:()=>p(!0),children:t?`${t} / ${o} / ${n}`:`${e} / ${o} / ${n}`}),(0,s.jsx)(rs,{open:c,onOpenChange:function(e){e||m(""),p(e)},title:"Brand, language, and currency switcher",description:"Search and switch the current brand, language, or currency.",showCloseButton:!1,children:(0,s.jsxs)(ra,{label:"Brand, language, and currency switcher",value:g,onValueChange:m,children:[(0,s.jsx)(ru,{placeholder:"Type a brand, language, or currency..."}),(0,s.jsxs)(rd,{children:[(0,s.jsx)(rc,{children:"No matching brand, language, or currency."}),(0,s.jsxs)(rf,{heading:"Current",children:[(0,s.jsxs)(rg,{disabled:!0,children:[(0,s.jsx)("span",{children:t??e}),(0,s.jsx)(rm,{children:`${o} \xb7 ${n}`})]}),v?(0,s.jsx)(rg,{disabled:!0,children:(0,s.jsx)("span",{children:"Updating"})}):null]}),(0,s.jsx)(rp,{}),(0,s.jsx)(rf,{heading:"Reset",children:(0,s.jsxs)(rg,{value:"reset geo context clear cookies brand language currency",keywords:["reset","geo","cookies","brand","language","currency"],onSelect:()=>
1void S(),children:[(0,s.jsx)(f,{"aria-hidden":!0,className:"mr-2 size-4 opacity-70"}),(0,s.jsx)("span",{children:"Reset geo context"}),(0,s.jsx)(rm,{children:"Clear cookies"})]})}),(0,s.jsx)(rp,{}),(0,s.jsx)(rf,{heading:"Brand",children:b.filter(e=>"Brand"===e.group).map(e=>(0,s.jsxs)(rg,{disabled:!e.redirectPathname,value:rh(e.label,e.value),keywords:rb(e.value,e.group),onSelect:()=>void x(e),children:[(0,s.jsx)("span",{children:e.label}),e.current?(0,s.jsx)(rm,{children:"Current"}):e.redirectPathname?(0,s.jsx)(rm,{children:e.value}):(0,s.jsx)(rm,{children:"Unavailable"})]},`${e.group}-${e.value}`))}),(0,s.jsx)(rp,{}),(0,s.jsx)(rf,{heading:"Currency",children:b.filter(e=>"Currency"===e.group).map(e=>(0,s.jsxs)(rg,{disabled:!e.redirectPathname,value:rh(e.label,e.value),keywords:rb(e.value,e.group,"money","pricing"),onSelect:()=>void x(e),children:[(0,s.jsx)("span",{children:e.label}),e.current?(0,s.jsx)(rm,{children:"Current"}):e.redirectPathname?(0,s.jsx)(rm,{children:e.value}):(0,s.jsx)(rm,{children:"Unavailable"})]},`${e.group}-${e.value}`))}),(0,s.jsx)(rp,{}),(0,s.jsx)(rf,{heading:"Language",children:b.filter(e=>"Language"===e.group).map(e=>(0,s.jsxs)(rg,{disabled:!e.redirectPathname,value:rh(e.label,e.value),keywords:rb(e.value,e.group),onSelect:()=>void x(e),children:[(0,s.jsx)("span",{children:e.label}),e.current?(0,s.jsx)(rm,{children:"Current"}):e.redirectPathname?(0,s.jsx)(rm,{children:e.value}):(0,s.jsx)(rm,{children:"Unavailable"})]},`${e.group}-${e.value}`))})]})]})})]})}e.s(["SiteContextCommandMenuProvider",0,function({brand:e,brandLabel:t,children:n,currency:r,language:o,pathname:l,switchState:i}){return(0,s.jsxs)(s.Fragment,{children:[n,(0,s.jsx)(ry,{brand:e,brandLabel:t,currency:r,hideTrigger:!0,language:o,pathname:l,switchState:i})]})}],965050)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.