import{s}from"./chunk-DZLz74EQ.js";import{c}from"./jotai-DDOP7CKM.js";import{t as n}from"./react-BcIddLXZ.js";import{C as d}from"./cells-B6jS0AIj.js";import"./react-dom-D6bRRS5R.js";import"./zod-U2NFpcFA.js";import{n as l,t as f}from"./jsx-runtime-DvsdsEjx.js";import"./_Uint8Array-D5Z9rM2X.js";import"./isSymbol-xTSywenE.js";import"./_arrayMap-DQI2GUNb.js";import"./toNumber-CTOPJrpu.js";import"./toInteger-Bor4StOs.js";import"./isArrayLikeObject-DKyJYtr8.js";import"./_getTag-CVRrQL_Q.js";import"./_baseIsEqual-BF8660ot.js";import"./merge-BgA7kxZb.js";import"./_baseProperty-CIKnF2iY.js";import"./now-B6JN1xKT.js";import"./debounce-70y9MzDK.js";import"./hotkeys-Lbk6RHir.js";import"./invariant-DPGusy7Z.js";import"./utils-DnJCRgaX.js";import"./constants-DIZnpo2K.js";import"./config-BjdJmdrN.js";import"./useEventListener-C5BS4xuN.js";import"./cn-C5VTNYKf.js";import"./button-nRVaalxL.js";import"./dist-BPcMnGQn.js";import"./dist-pZAIwcZo.js";import"./once-Co7xi2Ip.js";import"./capabilities-DdXtcIOa.js";import"./createReducer-80xvKyHq.js";import"./requests-D3Z6okhb.js";import"./preload-helper-BpItL31i.js";import"./dist-C13bkrcz.js";import"./dist-DZNGKufD.js";import"./dist-DBeOBCHw.js";import"./dist-Ba10OKR3.js";import"./dist-D-CsU-_R.js";import"./dist-ClBFnEcy.js";import"./stex-LEaAsvUb.js";import"./Deferred-zIiWPYX3.js";import"./uuid-Dj56ryH_.js";import"./key-DWQdrH_J.js";import"./use-toast-BiL_AQz9.js";import"./main-CD7jouuS.js";import"./marked.esm-DCf1d_lA.js";import"./connection-DnLUBy9M.js";import"./dist-Q3T6mWQ0.js";import"./useTheme-BMknLtnH.js";import{t as h}from"./createLucideIcon-DA8ZBm4D.js";import"./type-Cpth3na1.js";import"./check-BUgsJwxM.js";import"./select-DJ0A_oCR.js";import"./toDate-sQp07c5U.js";import"./useNonce-DECX9FAH.js";import"./badge-CFi0nvIx.js";import"./Combination-DR4iFoRS.js";import"./dist-Cei_8ikW.js";import"./tooltip-BQKXsEoT.js";import"./useLifecycle-CuZnZLRp.js";import"./menu-items-DOc2hwO2.js";import"./tslib.es6-sakIzgHM.js";import"./mode-BdfAcJv1.js";import{i as u,n as v,r as k}from"./floating-outline-CUjFOfng.js";import{t as y}from"./empty-state-NyXKwoVS.js";var x=h("scroll-text",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]),H=s(l(),1);n();var a=s(f(),1),M=()=>{let t=(0,H.c)(7),{items:r}=c(d),o;t[0]===r?o=t[1]:(o=k(r),t[0]=r,t[1]=o);let{activeHeaderId:p,activeOccurrences:e}=u(o);if(r.length===0){let m;return t[2]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)(y,{title:"No outline found",description:"Add markdown headings to your notebook to create an outline.",icon:(0,a.jsx)(x,{})}),t[2]=m):m=t[2],m}let i;return t[3]!==p||t[4]!==e||t[5]!==r?(i=(0,a.jsx)(v,{items:r,activeHeaderId:p,activeOccurrences:e}),t[3]=p,t[4]=e,t[5]=r,t[6]=i):i=t[6],i};export{M as default};
