1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,864345,e=>{"use strict";e.s(["HomeLayout",()=>e6,"useHomeLayout",()=>e8],864345);var t,n,r=e.i(874072),i=e.i(187302);e.i(816374);var s=e.i(128769),a=e.i(843476);function o(e){return(0,a.jsx)("main",{id:"nd-home-layout",...e,className:(0,s.cn)("flex flex-1 flex-col [--fd-layout-width:1400px]",e.className)})}var l=e.i(713548),u=e.i(14804),c=e.i(451988),d=e.i(411150),h=e.i(647873),f=e.i(716327),p=e.i(999092),m=e.i(225913),g=e.i(271645),y=e.i(532257);e.s([],655725),e.i(655725),e.i(247167);var v=e.i(229315),b=e.i(951437),x=e.i(667865),C=e.i(146376),w=e.i(108868),E=e.i(46420),S=e.i(647554),P=e.i(552245),R=e.i(733332);let j=g.createContext(void 0);function O(e){let t=g.useContext(j);if(void 0===t&&!e)throw Error((0,R.default)(41));return t}let M=g.createContext(void 0);function N(){return g.useContext(M)}var T=e.i(137584),A=e.i(223910),D=e.i(56434);let q=((t={}).availableWidth="--available-width",t.availableHeight="--available-height",t.anchorWidth="--anchor-width",t.anchorHeight="--anchor-height",t.transformOrigin="--transform-origin",t.positionerWidth="--positioner-width",t.positionerHeight="--positioner-height",t),k=((n={}).popupWidth="--popup-width",n.popupHeight="--popup-height",n);function I(e,t,n,r){e.style.setProperty(k.popupWidth,`${n}px`),e.style.setProperty(k.popupHeight,`${r}px`),t.style.setProperty(q.positionerWidth,`${n}px`),t.style.setProperty(q.positionerHeight,`${r}px`)}let F=new Set([D.REASONS.triggerHover,D.REASONS.outsidePress,D.REASONS.focusOut]),H=g.forwardRef(function(e,t){let{defaultValue:n=null,value:r,onValueChange:i,actionsRef:s,delay:o=50,closeDelay:l=50,orientation:u="horizontal",onOpenChangeComplete:c}=e,d=null!=(0,E.useFloatingParentNodeId)(),h=O(!0),[f,p]=(0,b.useControlled)({controlled:r,default:n,name:"NavigationMenu",state:"value"}),m=null!=f,y=g.useRef(void 0),P=g.useRef(null),[R,M]=g.useState(null),[N,k]=g.useState(null),[H,L]=g.useState(null),[z,W]=g.useState(null),[B,K]=g.useState(null),[_,V]=g.useState(void 0),[$,U]=g.useState(!1),G=g.useRef(null),Y=g.useRef(null),J=g.useRef(null),X=g.useRef(null),Z=g.useRef(null),ee=g.useRef(null),et=g.useRef({abortController:null,owner:null}),{mounted:en,setMounted:er,transitionStatus:ei}=(0,A.useTransitionStatus)(m);(0,C.useIsoLayoutEffect)(()=>{let e,t;if(m||!R||!N)return;let n=(e=parseFloat(R.style.getPropertyValue(q.positionerWidth))||0,t=parseFloat(R.style.getPropertyValue(q.positionerHeight))||0,e<=0||t<=0?null:{width:e,height:t});n&&I(N,R,n.width,n.height)},[m,N,R]),g.useEffect(()=>{U(!1)},[f]);let es=(0,x.useStableCallback)((e,t)=>{null==e&&(y.current=t.reason),e!==f&&i?.(e,t),!t.isCanceled&&(null==e&&(K(null),V(void 0)),p(e),d&&null==e&&t.reason===D.REASONS.linkPress&&h&&h.setValue(null,t))}),ea=(0,x.useStableCallback)(()=>{let e=(0,w.ownerDocument)(P.current),t=(0,S.activeElement)(e);!(y.current&&F.has(y.current))&&(0,v.isHTMLElement)(G.current)&&(t===(0,w.ownerDocument)(N).body||(0,S.contains)(N,t))&&N&&(G.current.focus({preventScroll:!0}),G.current=void 0),er(!1),c?.(!1),K(null),V(void 0),Y.current=null,y.current=void 0});g.useImperativeHandle(s,()=>({unmount:ea}),[ea]),(0,T.useOpenChangeComplete)({enabled:!s,open:m,ref:{current:N},onComplete(){m||ea()}}),(0,T.useOpenChangeComplete)({enabled:!s,open:m,ref:{current:z},onComplete(){m||ea()}});let eo=m?B:null,el=g.useMemo(()=>({open:m,value:f,setValue:es,mounted:en,transitionStatus:ei,positionerElement:R,setPositionerElement:M,popupElement:N,setPopupElement:k,viewportElement:H,setViewportElement:L,viewportTargetElement:z,setViewportTargetElement:W,activationDirection:eo,setActivationDirection:K,floatingRootContext:_,setFloatingRootContext:V,currentContentRef:Y,nested:d,rootRef:P,beforeInsideRef:J,afterInsideRef:X,beforeOutsideRef:Z,afterOutsideRef:ee,prevTriggerElementRef:G,popupAutoSizeResetRef:et,delay:o,closeDelay:l,orientation:u,viewportInert:$,setViewportInert:U}),[m,f,es,en,ei,R,N,H,z,eo,_,d,o,l,u,$]),eu=(0,a.jsx)(j.Provider,{value:el,children:(0,a.jsx)(Q,{componentProps:e,forwardedRef:t,children:e.children})});return d?eu:(0,a.jsx)(E.FloatingTree,{children:eu})});function Q(e){let{className:t,render:n,defaultValue:r,value:i,onValueChange:s,actionsRef:o,delay:l,closeDelay:u,orientation:c,onOpenChangeComplete:d,style:h,...f}=e.componentProps,p=(0,E.useFloatingNodeId)(),{rootRef:m,nested:g,open:y}
1=O(),v=(0,P.useRenderElement)(g?"div":"nav",e.componentProps,{state:{open:y,nested:g},ref:[e.forwardedRef,m],props:f});return(0,a.jsx)(M.Provider,{value:p,children:(0,a.jsx)(E.FloatingNode,{id:p,children:v})})}var L=e.i(956789),z=e.i(17989),W=e.i(431157),B=e.i(405934);let K="data-base-ui-navigation-menu-trigger",_=g.createContext(void 0);var V=e.i(984806);let $=g.forwardRef(function(e,t){let{render:n,className:r,style:i,...s}=e,o=N(),{orientation:l,open:u,floatingRootContext:c,positionerElement:d,value:h,closeDelay:f,viewportElement:p,nested:m}=O(),y=g.useMemo(()=>(0,V.getEmptyRootContext)(),[]),v=c||y;(0,W.useHoverFloatingInteraction)(v,{enabled:!!c&&(null!=d||null!=p||null==h),closeDelay:f,nodeId:o});let b=(0,z.useDismiss)(v,{enabled:null!=d||null==h,outsidePressEvent:"intentional",outsidePress(e){let t=(0,S.getTarget)(e);return null===t?.closest(`[${K}]`)}}),x=c?b:void 0,C={open:u},w=m?L.EMPTY_OBJECT:{onKeyDown(e){("horizontal"===l&&("ArrowLeft"===e.key||"ArrowRight"===e.key)||"vertical"===l&&("ArrowUp"===e.key||"ArrowDown"===e.key))&&e.stopPropagation()}},E=[x?.floating||L.EMPTY_OBJECT,w,s],R=(0,P.useRenderElement)("ul",e,{state:C,ref:t,props:E,enabled:m});return m?(0,a.jsx)(_.Provider,{value:x,children:R}):(0,a.jsx)(_.Provider,{value:x,children:(0,a.jsx)(B.CompositeRoot,{render:n,className:r,style:i,state:C,refs:[t],props:E,loopFocus:!1,orientation:l,tag:"ul"})})}),U=g.createContext(void 0);function G(){let e=g.useContext(U);if(!e)throw Error((0,R.default)(39));return e}var Y=e.i(788015);let J=g.forwardRef(function(e,t){let{render:n,className:r,style:i,value:s,...o}=e,l=(0,Y.useBaseUiId)(),u=s??l,c=(0,P.useRenderElement)("li",e,{ref:t,props:o}),d=g.useMemo(()=>({value:u}),[u]);return(0,a.jsx)(U.Provider,{value:d,children:c})});var X=e.i(174080),Z=e.i(144394),ee=e.i(209407),et=e.i(405005);let en={...et.popupStateMapping,...ee.transitionStatusMapping,activationDirection:e=>e?{"data-activation-direction":e}:null},er=g.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:s=!1,...o}=e,{mounted:l,viewportElement:u,value:c,activationDirection:d,currentContentRef:h,viewportTargetElement:f}=O(),{value:p}=G(),m=N(),y=l&&c===p,v=g.useRef(null),[b,w]=g.useState(!1),[P,R]=g.useState(!1),{mounted:j,setMounted:M,transitionStatus:D}=(0,A.useTransitionStatus)(y);j&&!l&&M(!1),(0,T.useOpenChangeComplete)({ref:v,open:y,onComplete(){y||M(!1)}}),(0,C.useIsoLayoutEffect)(()=>{y&&v.current&&(h.current=v.current)},[y,h]);let q={open:y,transitionStatus:D,activationDirection:d},k=(0,x.useStableCallback)(e=>{e&&y&&(h.current=e)}),I={onFocus(e){let t=(0,S.getTarget)(e.nativeEvent);t?.hasAttribute("data-base-ui-focus-guard")||R(!0)},onBlur(e){(0,S.contains)(e.currentTarget,e.relatedTarget)||R(!1)}},F=!y&&j?{style:{position:"absolute",top:0,left:0},inert:(0,Z.inertValue)(!P),...I}:I,H=f||u,Q=s&&!j,z=s&&!H&&!b;return(s&&H&&!b&&w(!0),z)?(0,a.jsx)(B.CompositeRoot,{render:n,className:r,style:i,state:q,refs:[t],props:[F,{hidden:!0},o],stateAttributesMapping:en}):H&&(j||s)?X.createPortal((0,a.jsx)(E.FloatingNode,{id:m,children:(0,a.jsx)(B.CompositeRoot,{render:n,className:r,style:i,state:q,refs:[t,v,k],props:[F,Q?{hidden:!0}:L.EMPTY_OBJECT,o],stateAttributesMapping:en})}),H):null});var ei=e.i(574735),es=e.i(333848),ea=e.i(439957),eo=e.i(708445),el=e.i(446265),eu=e.i(650316),ec=e.i(385689),ed=e.i(265858),eh=e.i(872135),ef=e.i(673752),ep=e.i(383976),em=e.i(157940),eg=e.i(675606),ey=e.i(638396),ev=e.i(152535),eb=e.i(958408);function ex({currentTarget:e,relatedTarget:t},n){let{popupElement:r,rootRef:i,tree:s,nodeId:a}=n,o=s?(0,eb.getNodeChildren)(s.nodesRef.current,a).some(e=>(0,S.contains)(e.context?.elements.floating,t)):[];return r?!(0,S.contains)(r,e)&&!(0,S.contains)(r,t)&&!(0,S.contains)(i.current,t)&&!o&&!((0,S.contains)(r,t)&&t?.hasAttribute("data-base-ui-focus-guard")):!(0,S.contains)(i.current,t)&&!o}var eC=e.i(348990),ew=e.i(540886),eE=e.i(222640),eS=e.i(73364),eP=e.i(176782),eR=e.i(872855);let ej={width:0,height:0},eO=g.forwardRef(function(e,t){let{render:n,className:r,style:i,nativeButton:s=!0,disabled:o,...l}=e,{value:u,setValue:c,mounted:d,open:h,positionerElement:f,setActivationDirection:p,setFloatingRootContext:m,popupElement:y,viewportElement:b,transitionStatus:w,rootRef:P,beforeOutsideRef:R,afterOutsideRef:j,afterInsideRef:M,beforeInsideRef:T,prevTriggerElementRef:A,popupAutoSizeResetRef:F,currentContentRef:H,delay:Q,closeDelay:z,orientation:W,setViewportInert:B,nested:V}=O(),{value:$}=G(),U=N(),Y=(0,E.useFloatingTree)(),J=g.useContext(_),Z=(0,eR.useDirection)(),en=(0,ea.useTimeout)(),er=(0,eo.useAnimationFrame)(),eb=(0,eo.useAnimationFrame)(),eO=(0,eo.useAnimationFrame)(),eM=(0,eo.useAnimationFrame)(),[eN,eT]=g.useState(null),[eA,eD]=g.useState(!0),[eq,ek]=g.useState(""),eI=g.useRef(null),eF=g.useRef(!1),eH=g.useRef(ej),eQ=g.useRef(!1),eL=h&&u===$,ez=(0,el.useValueAsRef)(eL),eW=(null!=f||null==u)&&!o,eB=f||b,eK=(null!=eB||null==u)&&!o,e_=(0,eE.useAnimationsFinished)(y,!1,!1),eV=g.useCallback(e=>{eI.current=e,eT(e)},[]),e$=(0,x.useStableCallback)((e=!1)=>{(e||F.current.owner===$)&&(F.current.abortController?.abort(),F.
1current.abortController=null,F.current.owner=null)});function eU(){y&&(y.style.setProperty(k.popupWidth,"auto"),y.style.setProperty(k.popupHeight,"auto"))}function eG(){y&&f&&(y.style.removeProperty(k.popupWidth),y.style.removeProperty(k.popupHeight),f.style.removeProperty(q.positionerWidth),f.style.removeProperty(q.positionerHeight))}function eY(){e$(!0);let e=new AbortController;F.current.abortController=e,F.current.owner=$,e_(()=>{F.current.abortController===e&&F.current.owner===$&&(F.current.abortController=null,F.current.owner=null,eU())},e.signal)}(0,C.useIsoLayoutEffect)(()=>{eL||(eb.cancel(),eM.cancel(),e$())},[eL,eb,eM,e$]);let eJ=(0,x.useStableCallback)((e,t,n={})=>{if(!y||!f)return;e$(!0);let{syncPositioner:r=!1}=n;eG();let{width:i,height:s}=(0,eS.getCssDimensions)(y),a=i||eH.current.width,o=s||eH.current.height;(0===t||0===e)&&(e=a,t=o),y.style.setProperty(k.popupWidth,`${e}px`),y.style.setProperty(k.popupHeight,`${t}px`),f.style.setProperty(q.positionerWidth,`${r?e:a}px`),f.style.setProperty(q.positionerHeight,`${r?t:o}px`),eM.request(()=>{ez.current&&(y.style.setProperty(k.popupWidth,`${a}px`),y.style.setProperty(k.popupHeight,`${o}px`),r&&(f.style.setProperty(q.positionerWidth,`${a}px`),f.style.setProperty(q.positionerHeight,`${o}px`)),eY())})}),eX=(0,x.useStableCallback)((e,t)=>{y&&f&&(eM.cancel(),eb.cancel(),e$(!0),0!==e&&0!==t&&(I(y,f,e,t),eb.request(()=>{eb.request(()=>{eG();let{width:n,height:r}=(0,eS.getCssDimensions)(y),i=n||e||eH.current.width,s=r||t||eH.current.height;I(y,f,e,t),eM.request(()=>{ez.current&&(I(y,f,i,s),eY())})})})))}),eZ=(0,x.useStableCallback)(()=>{if(!y||!f)return;eM.cancel(),e$(!0),eG();let{width:e,height:t}=(0,eS.getCssDimensions)(y);0!==e&&0!==t&&(eH.current={width:e,height:t},eU(),f.style.setProperty(q.positionerWidth,`${e}px`),f.style.setProperty(q.positionerHeight,`${t}px`))}),e0=(0,x.useStableCallback)(()=>{if(!y)return{size:eH.current,syncPositioner:!1};let e=y.style.getPropertyValue(k.popupWidth),t=y.style.getPropertyValue(k.popupHeight);return""===e||"auto"===e||""===t||"auto"===t?{size:eH.current,syncPositioner:!1}:{size:{width:y.offsetWidth||eH.current.width,height:y.offsetHeight||eH.current.height},syncPositioner:!0}});g.useEffect(()=>{h||(en.clear(),eb.cancel(),eO.cancel(),eM.cancel(),e$(!0),eQ.current=!1,ek(""))},[en,h,eb,eO,eM,e$]),g.useEffect(()=>{d||(eH.current=ej)},[d]),(0,C.useIsoLayoutEffect)(()=>{if(!y||"function"!=typeof ResizeObserver)return;let e=new ResizeObserver(()=>{eH.current={width:y.offsetWidth,height:y.offsetHeight}});return e.observe(y),()=>{e.disconnect()}},[y]),g.useEffect(()=>{if(!h||!eL||!y||!f)return;let e=(0,es.ownerWindow)(f),t=(0,ei.addEventListener)(e,"resize",function(){eO.cancel(),eO.request(eZ)});return()=>{eO.cancel(),t()}},[h,eL,y,f,eO,eZ]),g.useEffect(()=>{let e=H.current;if(!e||!y||!eL||"function"!=typeof MutationObserver)return;let t=new MutationObserver(()=>{if("starting"===w||y.hasAttribute(ee.TransitionStatusDataAttributes.startingStyle))return void eZ();let{size:e,syncPositioner:t}=e0();t?eX(e.width,e.height):eJ(e.width,e.height)});return t.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["hidden"]}),()=>{t.disconnect()}},[H,y,eL,w,e0,eX,eJ,eZ]),g.useEffect(()=>(eL&&h&&y&&eF.current&&(eF.current=!1,er.request(()=>{R.current?.focus()})),()=>{er.cancel()}),[R,er,eL,h,y]),(0,C.useIsoLayoutEffect)(()=>{if(ez.current&&h&&y){let e=H.current?.querySelector("[data-nested]")!=null;if("starting"===w&&e)return eM.request(eZ),()=>{eM.cancel()};if(eQ.current){eQ.current=!1;return}let{width:t,height:n}=(0,eS.getCssDimensions)(y);eJ(t,n)}},[H,eJ,ez,h,y,eM,eZ,w]);let e1=(0,ed.useFloatingRootContext)({open:h,onOpenChange:function(e,t){let n=t.reason===D.REASONS.triggerHover;function r(){n&&(eD(!0),en.clear(),en.start(ey.PATIENT_CLICK_THRESHOLD,()=>{eD(!1)})),e?c($,t):(c(null,t),ek(""))}eW&&("touch"!==eq||!n)&&(e||u===$)&&(n?X.flushSync(r):r())},elements:{reference:eN,floating:eB}}),e5=(0,ef.useHoverInteractionSharedState)(e1),e4="touch"!==eq;g.useEffect(()=>{h||(e1.context.dataRef.current.openEvent=void 0,e5.pointerType=void 0,e5.interactedInside=!1,e5.restTimeoutPending=!1,e5.openChangeTimeout.clear(),e5.restTimeout.clear(),(0,ef.clearSafePolygonPointerEventsMutation)(e5))},[e1,e5,h]);let e2=(0,x.useStableCallback)(()=>V&&!f&&eI.current&&eB?function(e,t,n){let r,i,s,a,o,l,u,c;return{placement:(r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=r.left+r.
1width/2,a=r.top+r.height/2,o=i.left+i.width/2,l=i.top+i.height/2,Math.abs(u=o-s)>=Math.abs(c=l-a)?u>=0?"right":"left":c>=0?"bottom":"top"),elements:{domReference:e,floating:t},nodeId:n}}(eI.current,eB,U):null);function e3(){return V&&f?null:eI.current?.closest("ul")??null}let e8=(0,eh.useHoverReferenceInteraction)(e1,{enabled:eK,move:!1,handleClose:(0,eu.safePolygon)({blockPointerEvents:e4,getScope:e3}),restMs:d&&f?0:Q,delay:{close:z},triggerElementRef:eI,getHandleCloseContext:e2}),e7=g.useMemo(()=>e8?{reference:e8}:void 0,[e8]),e6=(0,ec.useClick)(e1,{enabled:eW,stickIfOpen:eA,toggle:eL}),e9=g.useMemo(()=>(0,eP.mergeProps)(e6.reference,e7?.reference),[e6.reference,e7]);function te(e){X.flushSync(()=>{let t=(0,v.isHTMLElement)(e.currentTarget)?e.currentTarget:null,n=A.current?.getBoundingClientRect();if(d&&n&&eN){let e=eN.getBoundingClientRect(),t=e.left>n.left,r=e.top>n.top;"horizontal"===W&&e.left!==n.left?p(t?"right":"left"):"vertical"===W&&e.top!==n.top&&p(r?"down":"up")}if("click"!==e.type&&null!=u&&(e1.context.dataRef.current.openEvent=void 0),("touch"!==eq||"click"===e.type)&&(null!=u&&"keydown"!==e.type&&c($,(0,eg.createChangeEventDetails)("mouseenter"===e.type?D.REASONS.triggerHover:D.REASONS.triggerPress,e.nativeEvent)),"mouseenter"===e.type&&e4&&(!V||!f)&&eB&&t)){let e=()=>{let e=e3()??t.ownerDocument.body;(0,ef.applySafePolygonPointerEventsMutation)(e5,{scopeElement:e,referenceElement:t,floatingElement:eB})};null!=u&&u!==$?queueMicrotask(e):e()}})}(0,C.useIsoLayoutEffect)(()=>{eL&&(m(e1),A.current=eN)},[eL,e1,m,A,eN]);let tt=(0,x.useStableCallback)(e=>{if(o)return;if(!y||!f)return void te(e);let{width:t,height:n}=(0,eS.getCssDimensions)(y),r=null!=u&&u!==$&&("click"===e.type||"touch"!==eq);te(e),r&&(eQ.current=!0),eJ(t,n)});function tn(e){ek(e.pointerType)}let tr={tabIndex:0,onMouseEnter:tt,onClick:tt,onPointerEnter:tn,onPointerDown:function(e){tn(e),(0,ef.clearSafePolygonPointerEventsMutation)(e5)},"aria-expanded":eL,"aria-controls":eL?y?.id:void 0,[K]:"",onFocus(){eL&&B(!1)},onMouseMove(){eF.current=!1},onKeyDown(e){if(eF.current=!0,V)return;let t="horizontal"===W&&"ArrowDown"===e.key,n="vertical"===W&&e.key===("rtl"===Z?"ArrowLeft":"ArrowRight");(t||n)&&(c($,(0,eg.createChangeEventDetails)(D.REASONS.listNavigation,e.nativeEvent)),tt(e),(0,em.stopEvent)(e))},onBlur(e){f&&y&&ex({currentTarget:e.currentTarget,relatedTarget:e.relatedTarget},{popupElement:y,rootRef:P,tree:Y,nodeId:U})&&c(null,(0,eg.createChangeEventDetails)(D.REASONS.focusOut,e.nativeEvent))}},{getButtonProps:ti,buttonRef:ts}=(0,ew.useButton)({disabled:o,focusableWhenDisabled:!0,native:s});return(0,a.jsxs)(g.Fragment,{children:[(0,a.jsx)(eC.CompositeItem,{tag:"button",render:n,className:r,style:i,state:{open:eL},stateAttributesMapping:et.pressableTriggerOpenStateMapping,refs:[t,eV,ts],props:[e9,J?.reference||L.EMPTY_ARRAY,tr,l,ti]}),eL&&(0,a.jsxs)(g.Fragment,{children:[(0,a.jsx)(ev.FocusGuard,{ref:R,onFocus:e=>{if(eB&&(0,ep.isOutsideEvent)(e,eB))T.current?.focus();else{let e=(0,ep.getPreviousTabbable)(eN);e?.focus()}}}),(0,a.jsx)("span",{"aria-owns":b?.id,style:ey.ownerVisuallyHidden}),(0,a.jsx)(ev.FocusGuard,{ref:j,onFocus:e=>{if(eB&&(0,ep.isOutsideEvent)(e,eB)){X.flushSync(()=>{B(!1)});let e=M.current||eN;e?.focus()}else{let t=(0,ep.getNextTabbable)(eN);V&&!f&&eB&&t&&(0,S.contains)(eB,t)&&(t=(0,ep.getTabbableAfterElement)(M.current)),t?.focus(),V&&!f||(0,S.contains)(P.current,t)||c(null,(0,eg.createChangeEventDetails)(D.REASONS.focusOut,e.nativeEvent))}}})]})]})});var eM=e.i(726674);let eN=g.createContext(void 0),eT=g.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{mounted:i}=O();return i||n?(0,a.jsx)(eN.Provider,{value:n,children:(0,a.jsx)(eM.FloatingPortal,{ref:t,...r})}):null});var eA=e.i(365420),eD=e.i(329365);let eq=g.createContext(void 0);function ek(e=!1){let t=g.useContext(eq);if(!t&&!e)throw Error((0,R.default)(42));return t}var eI=e.i(360495),eF=e.i(789579);let eH=(0,V.getEmptyRootContext)(),eQ=g.forwardRef(function(e,t){let{open:n,mounted:r,positionerElement:i,setPositionerElement:s,floatingRootContext:o,nested:l,transitionStatus:u}=O(),{className:c,render:d,anchor:h,positionMethod:f="absolute",side:p="bottom",align:m="center",sideOffset:y=0,alignOffset:v=0,collisionBoundary:b="clipping-ancestors",collisionPadding:x=5,collisionAvoidance:C=l?ey.POPUP_COLLISION_AVOIDANCE:ey.DROPDOWN_COLLISION_AVOIDANCE,arrowPadding:w=5,sticky:E=!1,disableAnchorTracking:S=!1,style:P,...j}=e,M=function(){let e=g.useContext(eN);if(void 0===e)throw Error((0,R.default)(40));return e}(),T=N(),A=(0,ea.useTimeout)(),D=(0,ea.useTimeout)(),[q,k]=g.useState(n),I=g.useRef(n),F=g.useRef(null),H=g.useRef(null);g.useEffect(()=>{if(i)return(0,eA.mergeCleanups)((0,ei.addEventListener)(i,"focusin",e,!0),(0,ei.addEventListener)(i,"focusout",e,!0));function e(e){i&&(0,ep.isOutsideEvent)(e)&&("focusin"===e.type?ep.enableFocusInside:ep.disableFocusInside)(i)}},[i]);let Q=(o||eH).useState("domReferenceElement"),L=(0,eD.useAnchorPositioning)({anchor:h??Q??H,positionMethod:f,mounted:r,side:p,sideOffset:y,align:m,alignOffset:v,arrowPadding:w,collisionBoundary:b,collisionPadding:x,sticky:E,disableAnchorTracking:S,keepMounted:M,floatingRootContext:o,collisionAvoidance:C,nodeId:T,adaptiveOrigin:eI.adaptiveOrigin}),z={open:n,side:L.side,align:L.align,anchorHidden:L.anchorHidden,instant:q};g.useEffect(()=>{if(!n)return;I.current&&A.start(0,()=>
1{I.current=!1,D.isStarted()||k(!1)});let e=(0,es.ownerWindow)(i);return(0,ei.addEventListener)(e,"resize",function(){X.flushSync(()=>{k(!0)}),D.start(100,()=>{k(!1)})})},[n,A,D,i]);let W=(0,eF.usePositioner)(e,z,{styles:L.positionerStyles,transitionStatus:u,props:j,refs:[t,s,F],hidden:!r,inert:!n});return(0,a.jsx)(eq.Provider,{value:L,children:W})});var eL=e.i(883977);let ez=(0,V.getEmptyRootContext)();function eW({children:e}){let{beforeInsideRef:t,beforeOutsideRef:n,afterInsideRef:r,afterOutsideRef:i,positionerElement:s,viewportElement:o,floatingRootContext:l}=O(),u=!!ek(!0),c=s||o;return l||u?(0,a.jsxs)(g.Fragment,{children:[(0,a.jsx)(ev.FocusGuard,{ref:t,onFocus:e=>{c&&(0,ep.isOutsideEvent)(e,c)?(0,ep.getNextTabbable)(c)?.focus():n.current?.focus()}}),e,(0,a.jsx)(ev.FocusGuard,{ref:r,onFocus:e=>{c&&(0,ep.isOutsideEvent)(e,c)?(0,ep.getPreviousTabbable)(c)?.focus():i.current?.focus()}})]}):e}let eB=g.forwardRef(function(e,t){let{render:n,className:r,style:i,children:s,id:o,...l}=e,u=(0,eL.useId)(o),{setViewportElement:c,setViewportTargetElement:d,floatingRootContext:h,prevTriggerElementRef:f,viewportInert:p,setViewportInert:m}=O(),g=!!ek(!0),y=(h||ez).useState("domReferenceElement");(0,C.useIsoLayoutEffect)(()=>{y&&(f.current=y)},[y,f]);let v=(0,P.useRenderElement)("div",e,{ref:[t,c],props:[{id:u,onBlur(e){let t=e.relatedTarget,n=e.currentTarget;t&&!(0,S.contains)(n,t)&&t!==y&&m(!0)},...!g&&p&&{inert:(0,Z.inertValue)(!0)},children:g?s:(0,a.jsx)(eW,{children:(0,a.jsx)("div",{ref:d,children:s})})},l]});return g?(0,a.jsx)(eW,{children:v}):v}),eK={...et.popupStateMapping,...ee.transitionStatusMapping},e_=g.forwardRef(function(e,t){let{render:n,className:r,style:i,...s}=e,{open:a,mounted:o,transitionStatus:l}=O();return(0,P.useRenderElement)("div",e,{state:{open:a,transitionStatus:l},ref:t,props:[{role:"presentation",hidden:!o,style:{userSelect:"none",WebkitUserSelect:"none"}},s],stateAttributesMapping:eK})});var eV=e.i(815982);let e$={...et.popupStateMapping,...ee.transitionStatusMapping},eU=g.forwardRef(function(e,t){let{render:n,className:r,style:i,id:s,...a}=e,{open:o,transitionStatus:l,setPopupElement:u}=O(),c=ek(),d=(0,eR.useDirection)(),h=(0,Y.useBaseUiId)(s),f={open:o,transitionStatus:l,side:c.side,align:c.align,anchorHidden:c.anchorHidden},p="left"===c.side;p="rtl"===d?p||"inline-end"===c.side:p||"inline-start"===c.side;let m="top"===c.side||p;return(0,P.useRenderElement)("nav",e,{state:f,ref:[t,u],props:[{id:h,tabIndex:-1,style:m?{position:"absolute",["top"===c.side?"bottom":"top"]:"0",[p?"right":"left"]:"0"}:{}},(0,eV.getDisabledMountTransitionStyles)(l),a],stateAttributesMapping:e$})}),eG=g.forwardRef(function(e,t){let{render:n,className:r,style:i,...s}=e,{open:a,transitionStatus:o}=O(),{arrowRef:l,side:u,align:c,arrowUncentered:d,arrowStyles:h}=ek();return(0,P.useRenderElement)("div",e,{state:{open:a,side:u,align:c,uncentered:d},ref:[t,l],props:[{style:h,"aria-hidden":!0},(0,eV.getDisabledMountTransitionStyles)(o),s],stateAttributesMapping:et.popupStateMapping})}),eY=g.forwardRef(function(e,t){let{className:n,render:r,active:i=!1,closeOnClick:s=!1,style:o,...l}=e,{setValue:u,popupElement:c,positionerElement:d,rootRef:h}=O(),f=N(),p=(0,E.useFloatingTree)();return(0,a.jsx)(eC.CompositeItem,{tag:"a",render:r,className:n,style:o,state:{active:i},refs:[t],props:[{"aria-current":i?"page":void 0,tabIndex:void 0,onClick(e){s&&u(null,(0,eg.createChangeEventDetails)(D.REASONS.linkPress,e.nativeEvent))},onBlur(e){d&&c&&ex({currentTarget:e.currentTarget,relatedTarget:e.relatedTarget},{popupElement:c,rootRef:h,tree:p,nodeId:f})&&u(null,(0,eg.createChangeEventDetails)(D.REASONS.focusOut,e.nativeEvent))}},l]})}),eJ=g.forwardRef(function(e,t){let{render:n,className:r,style:i,...s}=e,{value:a}=G(),{open:o,value:l}=O();return(0,P.useRenderElement)("span",e,{state:{open:o&&l===a},ref:t,props:[{"aria-hidden":!0,children:"â¼"},s],stateAttributesMapping:et.triggerOpenStateMapping})});e.s(["Arrow",0,eG,"Backdrop",0,e_,"Content",0,er,"Icon",0,eJ,"Item",0,J,"Link",0,eY,"List",0,$,"Popup",0,eU,"Portal",0,eT,"Positioner",0,eQ,"Root",0,H,"Trigger",0,eO,"Viewport",0,eB],427176);var eX=e.i(427176),eX=eX;let eZ=(0,m.cva)("[&_svg]:size-4",{variants:{variant:{main:"inline-flex items-center gap-1 p-2 text-fd-muted-foreground transition-colors hover:text-fd-accent-foreground data-[active=true]:text-fd-primary",button:(0,l.buttonVariants)({color:"secondary",className:"gap-1.5"}),icon:(0,l.buttonVariants)({color:"ghost",size:"icon"})}},defaultVariants:{variant:"main"}}),e0=(0,g.createContext)(null);function e1(e){let{navItems:t,menuItems:n,slots:r,props:{nav:i}}=e8(),o=(0,g.useRef)(null),h=(0,g.useRef)(null),[m,v]=(0,g.useState)(!1),b=(0,y.useTranslations)({note:"home layout header"}),x=i?.transparentMode??"none",C=(0,d.useIsScrollTop)({enabled:"top"===x})??!0,w="top"===x?C:"always"===x,E=(0,g.useEffectEvent)(e=>
1{let t=o.current;m&&t&&(t===e.target||t.contains(e.target)||v(!1))});(0,g.useEffect)(()=>(window.addEventListener("click",E),()=>{window.removeEventListener("click",E)}),[]);let S=(0,a.jsxs)(eX.List,{ref:h,render:(0,a.jsx)("div",{}),className:"flex h-14 w-full mx-auto max-w-(--fd-layout-width) items-center px-4",children:[r.navTitle&&(0,a.jsx)(r.navTitle,{className:"inline-flex items-center gap-2.5 font-semibold"}),i?.children,(0,a.jsx)("ul",{className:"flex flex-row items-center gap-2 px-6 max-sm:hidden",children:t.filter(e=>!e5(e)).map((e,t)=>(0,a.jsx)(e4,{item:e,className:"text-sm"},t))}),(0,a.jsxs)("div",{className:"flex flex-row items-center justify-end gap-1.5 flex-1 max-lg:hidden",children:[r.searchTrigger&&(0,a.jsx)(r.searchTrigger.full,{hideIfDisabled:!0,className:"w-full rounded-full ps-2.5 max-w-[240px]"}),r.themeSwitch&&(0,a.jsx)(r.themeSwitch,{}),r.languageSelect&&(0,a.jsx)(r.languageSelect.root,{children:(0,a.jsx)(p.Languages,{className:"size-5"})}),(0,a.jsx)("ul",{className:"flex flex-row gap-2 items-center empty:hidden",children:t.filter(e5).map((e,t)=>(0,a.jsx)(e4,{className:(0,s.cn)("icon"===e.type&&"-mx-1 first:ms-0 last:me-0"),item:e},t))})]}),(0,a.jsxs)("div",{className:"flex flex-row items-center ms-auto -me-1.5 lg:hidden",children:[r.searchTrigger&&(0,a.jsx)(r.searchTrigger.sm,{hideIfDisabled:!0,className:"p-2"}),(0,a.jsx)(c.CollapsibleTrigger,{"aria-label":b("Toggle Menu",{note:"aria-label"}),className:(0,s.cn)((0,l.buttonVariants)({size:"icon",color:"ghost"})),onPointerEnter:i?.enableHoverToOpen?()=>{v(!0)}:void 0,children:(0,a.jsx)(f.ChevronDown,{className:(0,s.cn)("transition-transform",m&&"rotate-180")})})]})]});return(0,a.jsx)(c.Collapsible,{open:m,onOpenChange:v,render:(0,a.jsx)("header",{id:"nd-nav",...e,ref:(0,u.mergeRefs)(o,e.ref),className:(0,s.cn)("sticky h-14 top-0 z-40",e.className),children:(0,a.jsxs)(eX.Root,{className:e=>(0,s.cn)("backdrop-blur-lg border-b transition-[box-shadow,background-color,border-radius]",m&&"max-lg:shadow-lg max-lg:rounded-b-2xl",(m||!w||e.open)&&"bg-fd-background/80"),children:[S,(0,a.jsx)(c.CollapsibleContent,{className:"mx-auto max-w-(--fd-layout-width) lg:hidden",children:(0,a.jsx)("div",{className:"flex flex-col pt-2 p-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)(e0,{value:(0,g.useMemo)(()=>({setOpen:v}),[]),children:[n.filter(e=>!e5(e)).map((e,t)=>(0,a.jsx)(e2,{item:e,className:"sm:hidden"},t)),(0,a.jsxs)("div",{className:"-ms-1.5 flex flex-row items-center gap-2 max-sm:mt-2",children:[n.filter(e5).map((e,t)=>(0,a.jsx)(e2,{item:e,className:(0,s.cn)("icon"===e.type&&"-mx-1 first:ms-0")},t)),(0,a.jsx)("div",{role:"separator",className:"flex-1"}),r.languageSelect&&(0,a.jsxs)(r.languageSelect.root,{children:[(0,a.jsx)(p.Languages,{className:"size-5"}),r.languageSelect.text&&(0,a.jsx)(r.languageSelect.text,{}),(0,a.jsx)(f.ChevronDown,{className:"size-3 text-fd-muted-foreground"})]}),r.themeSwitch&&(0,a.jsx)(r.themeSwitch,{})]})]})})}),(0,a.jsx)(eX.Portal,{children:(0,a.jsx)(eX.Positioner,{side:"bottom",anchor:h,collisionPadding:{top:5,bottom:5},className:"z-40 box-border h-(--positioner-height) w-(--anchor-width) max-w-(--available-width) duration-(--duration) ease-(--easing) before:absolute before:content-[''] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0 data-[side=bottom]:before:h-2.5 data-[side=left]:before:top-0 data-[side=left]:before:right-[-10px] data-[side=left]:before:bottom-0 data-[side=left]:before:w-2.5 data-[side=right]:before:top-0 data-[side=right]:before:bottom-0 data-[side=right]:before:left-[-10px] data-[side=right]:before:w-2.5 data-[side=top]:before:right-0 data-[side=top]:before:bottom-[-10px] data-[side=top]:before:left-0 data-[side=top]:before:h-2.5",style:{"--duration":"0.35s","--easing":"cubic-bezier(0.22, 1, 0.36, 1)"},children:(0,a.jsx)(eX.Popup,{className:"relative border h-(--popup-height) w-full rounded-xl bg-fd-popover/80 text-fd-popover-foreground backdrop-blur-md shadow-lg transition-[opacity,width,height] duration-(--duration) ease-(--easing) data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:opacity-0",children:(0,a.jsx)(eX.Viewport,{className:"relative size-full overflow-hidden"})})})})]})})})}function e5(e){return"secondary"in e&&null!=e.secondary?e.secondary:"icon"===e.type}function e4({item:e,className:t,...n}){if("custom"===e.type)return e.children;if("menu"===e.type){let r=e.items.map((e,t)=>{if("custom"===e.type)return(0,a.jsx)(g.Fragment,{children:e.children},t);
1let{banner:n=e.icon?(0,a.jsx)("div",{className:"w-fit rounded-md border bg-fd-muted p-1 [&_svg]:size-4",children:e.icon}):null,...r}=e.menu??{};return(0,a.jsx)(eX.Link,{render:(0,a.jsx)(h.default,{href:e.url,external:e.external,...r,className:(0,s.cn)("flex flex-col gap-2 rounded-lg border bg-fd-card p-3 transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground",r.className),children:r.children??(0,a.jsxs)(a.Fragment,{children:[n,(0,a.jsx)("p",{className:"text-base font-medium",children:e.text}),(0,a.jsx)("p",{className:"text-sm text-fd-muted-foreground empty:hidden",children:e.description})]})})},`${t}-${e.url}`)});return(0,a.jsxs)(eX.Item,{className:(0,s.cn)("list-none",t),...n,children:[(0,a.jsx)(eX.Trigger,{className:(0,s.cn)(eZ(),"rounded-md"),children:e.url?(0,a.jsx)(h.default,{href:e.url,external:e.external,children:e.text}):e.text}),(0,a.jsx)(eX.Content,{className:(0,s.cn)("h-full w-(--anchor-width) max-w-(--available-width) p-3","transition-[opacity,transform,translate] duration-(--duration) ease-(--easing)","data-starting-style:opacity-0 data-ending-style:opacity-0","data-starting-style:data-[activation-direction=left]:-translate-x-1/2","data-starting-style:data-[activation-direction=right]:translate-x-1/2","data-ending-style:data-[activation-direction=left]:translate-x-1/2","data-ending-style:data-[activation-direction=right]:-translate-x-1/2","grid grid-cols-1 gap-2 md:grid-cols-2 lg:grid-cols-3"),children:r})]})}return(0,a.jsx)(eX.Item,{className:(0,s.cn)("list-none",t),...n,children:(0,a.jsx)(eX.Link,{render:(0,a.jsx)(r.LinkItem,{item:e,"aria-label":"icon"===e.type?e.label:void 0,className:(0,s.cn)(eZ({variant:e.type})),children:"icon"===e.type?e.icon:e.text})})})}function e2({item:e,...t}){let{setOpen:n}=(0,g.use)(e0);return"custom"===e.type?(0,a.jsx)("div",{className:(0,s.cn)("grid",t.className),children:e.children}):"menu"===e.type?(0,a.jsxs)("div",{className:(0,s.cn)("mb-4 flex flex-col",t.className),children:[(0,a.jsx)("p",{className:"mb-1 text-sm text-fd-muted-foreground",children:e.url?(0,a.jsxs)(h.default,{href:e.url,external:e.external,onClick:()=>n(!1),children:[e.icon,e.text]}):(0,a.jsxs)(a.Fragment,{children:[e.icon,e.text]})}),e.items.map((e,t)=>(0,a.jsx)(e2,{item:e},t))]}):(0,a.jsxs)(r.LinkItem,{item:e,className:(0,s.cn)({main:"inline-flex items-center gap-2 py-1.5 transition-colors hover:text-fd-popover-foreground
1/50 data-[active=true]:font-medium data-[active=true]:text-fd-primary [&_svg]:size-4",icon:(0,l.buttonVariants)({size:"icon",color:"ghost"}),button:(0,l.buttonVariants)({color:"secondary",className:"gap-1.5 [&_svg]:size-4"})}[e.type??"main"],t.className),"aria-label":"icon"===e.type?e.label:void 0,onClick:()=>n(!1),children:[e.icon,"icon"===e.type?void 0:e.text]})}let e3=(0,g.createContext)(null);function e8(){let e=(0,g.use)(e3);if(!e)throw Error("Please use this component under <HomeLayout /> (`fumadocs-ui/layouts/home`).");return e}let{useBaseSlots:e7}=(0,r.baseSlots)({useProps:()=>e8().props});function e6(e){let{nav:{enabled:t=!0}={},slots:n,children:r,i18n:s,githubUrl:l,links:u,themeSwitch:c,searchToggle:d,...h}=e,{baseSlots:f,baseProps:p}=e7(e),m=(0,i.useLinkItems)(e),g={...f,header:n?.header??e9,container:n?.container??o};return(0,a.jsx)(e3,{value:{props:p,slots:g,...m},children:(0,a.jsxs)(g.container,{...h,children:[t&&(0,a.jsx)(g.header,{}),r]})})}function e9(e){let{nav:t}=e8().props;return t?.component?t.component:(0,a.jsx)(e1,{...e})}},143328,e=>{"use strict";let t;var n=e.i(843476),r=e.i(912598),i=e.i(619273),s=e.i(286491),a=e.i(540143),o=e.i(915823),l=class extends o.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,a=t.queryHash??(0,i.hashQueryKeyByOptions)(r,t),o=this.get(a);return o||(o=new s.Query({client:e,queryKey:r,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){a.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,i.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,i.matchQuery)(e,t)):t}notify(e){a.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){a.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){a.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},u=e.i(88587),c=e.i(936553),d=class extends u.Removable{#t;#n;#r;#i;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#r=e.mutationCache,this.#n=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter(t=>t!==e),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||("pending"===this.state.status?this.scheduleGc():this.#r.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#s({type:"continue"})},n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,c.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#s({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#s({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});let r="pending"===this.state.status,i=!this.#i.canStart();try{if(r)t();else{this.#s({type:"pending",variables:e,isPaused:i}),this.#r.config.onMutate&&await this.#r.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#s({type:"pending",context:t,variables:e,isPaused:i})}let s=await this.#i.start();return await this.#r.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#r.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#s({type:"success",data:s}),s}catch(t){try{await this.#r.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#r.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#s({type:"error",error:t}),t}finally{this.#r.runNext(this)}}#s(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};
1case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),a.notifyManager.batch(()=>{this.#n.forEach(t=>{t.onMutationUpdate(e)}),this.#r.notify({mutation:this,type:"updated",action:e})})}},h=o,f=class extends h.Subscribable{constructor(e={}){super(),this.config=e,this.#a=new Set,this.#o=new Map,this.#l=0}#a;#o;#l;build(e,t,n){let r=new d({client:e,mutationCache:this,mutationId:++this.#l,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#a.add(e);let t=p(e);if("string"==typeof t){let n=this.#o.get(t);n?n.push(e):this.#o.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#a.delete(e)){let t=p(e);if("string"==typeof t){let n=this.#o.get(t);if(n)if(n.length>1){let t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#o.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=p(e);if("string"!=typeof t)return!0;{let n=this.#o.get(t),r=n?.find(e=>"pending"===e.state.status);return!r||r===e}}runNext(e){let t=p(e);if("string"!=typeof t)return Promise.resolve();{let n=this.#o.get(t)?.find(t=>
1t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}}clear(){a.notifyManager.batch(()=>{this.#a.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#a.clear(),this.#o.clear()})}getAll(){return Array.from(this.#a)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,i.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,i.matchMutation)(e,t))}notify(e){a.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return a.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(i.noop))))}};function p(e){return e.options.scope?.id}var m=e.i(175555),g=e.i(814448),y=class{#u;#r;#c;#d;#h;#f;#p;#m;constructor(e={}){this.#u=e.queryCache||new l,this.#r=e.mutationCache||new f,this.#c=e.defaultOptions||{},this.#d=new Map,this.#h=new Map,this.#f=0}mount(){this.#f++,1===this.#f&&(this.#p=m.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#u.onFocus())}),this.#m=g.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#u.onOnline())}))}unmount(){this.#f--,0===this.#f&&(this.#p?.(),this.#p=void 0,this.#m?.(),this.#m=void 0)}isFetching(e){return this.#u.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#r.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#u.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#u.build(this,t),r=n.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime((0,i.resolveStaleTime)(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#u.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),s=this.#u.get(r.queryHash),a=s?.state.data,o=(0,i.functionalUpdate)(t,a);if(void 0!==o)return this.#u.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return a.notifyManager.batch(()=>this.#u.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#u.get(t.queryHash)?.state}removeQueries(e){let t=this.#u;a.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#u;return a.notifyManager.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t};return Promise.all(a.notifyManager.batch(()=>this.#u.findAll(e).map(e=>e.cancel(n)))).then(i.noop).catch(i.noop)}invalidateQueries(e,t={}){return a.notifyManager.batch(()=>(this.#u.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(a.notifyManager.batch(()=>this.#u.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(i.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(i.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#u.build(this,t);return n.isStaleByTime((0,i.resolveStaleTime)(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(i.noop).catch(i.noop)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(i.noop).catch(i.noop)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return g.onlineManager.isOnline()?this.#r.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#u}getMutationCache(){return this.#r}getDefaultOptions(){return this.#c}setDefaultOptions(e){this.#c=e}setQueryDefaults(e,t){this.#d.set((0,i.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#d.values()],n={};return t.forEach(t=>{(0,i.partialMatchKey)(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#h.set((0,i.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#h.values()],n={};return t.forEach(t=>{(0,i.partialMatchKey)(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#c.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,i.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===i.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#c.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#u.clear(),this.#r.clear()}};function v(){return new y({defaultOptions:{queries:{staleTime:6e4},dehydrate:{shouldDehydrateQuery:e=>"success"===e.state.status||"pending"===e.state.status}}})}e.i(247167),e.i(793803),e.s(["QueryProvider",0,function({children:e}){let s=i.isServer?v():t??=v();return(0,n.jsx)(r.QueryClientProvider,{client:s,children:e})}],143328)}]);
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.