1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4234],{5328:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[...slugs]",function(){return t(99399)}])},18621:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});var l=t(43436),i=t(23046);let n=()=>(0,l.jsxs)("div",{className:"tiptap__toolbar border-base-300 bg-base-100 flex min-w-0 items-center gap-2 border-b px-3 py-1.5",children:[(0,l.jsx)("div",{className:"skeleton rounded-field h-8 w-40"}),(0,l.jsx)(i.A,{className:"mx-0"}),(0,l.jsxs)("div",{className:"flex gap-1",children:[(0,l.jsx)("div",{className:"skeleton rounded-field size-8"}),(0,l.jsx)("div",{className:"skeleton rounded-field size-8"}),(0,l.jsx)("div",{className:"skeleton rounded-field size-8"})]}),(0,l.jsx)(i.A,{className:"mx-0"}),(0,l.jsxs)("div",{className:"flex gap-1",children:[(0,l.jsx)("div",{className:"skeleton rounded-field size-8"}),(0,l.jsx)("div",{className:"skeleton rounded-field size-8"}),(0,l.jsx)("div",{className:"skeleton rounded-field size-8"})]}),(0,l.jsxs)("div",{className:"ml-auto flex gap-2",children:[(0,l.jsx)("div",{className:"skeleton rounded-field size-8"}),(0,l.jsx)(i.A,{className:"mx-0"}),(0,l.jsx)("div",{className:"skeleton rounded-field size-8"}),(0,l.jsx)("div",{className:"skeleton rounded-field size-8"})]})]})},23046:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});var l=t(43436),i=t(80006);let n=({className:e})=>(0,l.jsx)("div",{className:(0,i.Q)("bg-base-300 mx-2 h-5 w-px shrink-0",e),"aria-hidden":!0})},43742:(e,s,t)=>{"use strict";t.d(s,{EY:()=>f,YH:()=>m,im:()=>r,mn:()=>o,w_:()=>u});var l=t(57022),i=t(12176),n=t(11872);let r=320,a="docsy:toc-width",d=e=>e>240?e:r,c=e=>e<=0?r:Math.max(240,Math.floor(.46*e)),o=(e,s)=>Math.min(c(s),Math.max(240,e)),u=e=>{let s=(()=>{if("undefined"==typeof document)return 0;let e=document.querySelector(".pad .editor");return e?.getBoundingClientRect().width??0})();if(s>0)return s;let t=e?.parentElement?.offsetWidth??0;return t>0?t:window.innerWidth},m=()=>{try{let e=parseInt(localStorage.getItem(a)??"",10);if(Number.isFinite(e)&&e>240)return e}catch{}return r},x=e=>{if(!(e<=240))try{localStorage.setItem(a,String(e))}catch{}},h=()=>{document.body.style.userSelect="",document.body.style.cursor=""},f=()=>{let e=(0,n.useRef)(null),s=(0,l.Pj)(e=>e.settings.workspaceId),[t,a]=(0,n.useState)(r),[f,v]=(0,n.useState)(r),[j,p]=(0,n.useState)("wide"),[w,N]=(0,n.useState)(!1),b=(0,n.useRef)(r),k=(0,n.useRef)(f);k.current=f;let g=(0,n.useRef)(s),y=(0,n.useRef)(0),E=(0,n.useRef)(0),_=(0,n.useRef)(null),z=(0,n.useRef)(0),S=(0,n.useRef)("wide");S.current=j;let A="rail"===j,C="drag"===j,L="settle-to-rail"===j,T="settle-to-rail"===j||"settle-to-wide"===j||"drag"===j&&f<240,W=(0,i.Oe)(),P=(0,n.useCallback)(()=>{let s=e.current,t=s?.querySelector("a[href], button:not([disabled])");t?.focus({preventScroll:!0})},[]),R=(0,n.useCallback)(()=>{if("wide"!==S.current&&"settle-to-wide"!==S.current||"wide"===S.current&&k.current<=240)return;let s=u(e.current);if(s<=0)return;let t=o(d(b.current),s);a(t),"wide"===S.current&&v(t)},[]);(0,n.useLayoutEffect)(()=>{let s=m();b.current=s;let t=u(e.current),l=t>0?o(s,t):s;a(l),v("rail"===S.current||"settle-to-rail"===S.current?32:l),N(!0);let i=document.querySelector(".pad .editor");if(!i)return;let n=new ResizeObserver(R);return n.observe(i),()=>n.disconnect()},[R]),(0,n.useEffect)(()=>{if(!w)return;let e=S.current;"rail"!==e&&"settle-to-rail"!==e&&"drag"!==e&&x(t)},[w,t]),(0,n.useEffect)(()=>{if(g.current===s)return;g.current=s;let t=d(b.current);b.current=t;let l=o(t,u(e.current));a(l),v(l),p("wide")},[s]),(0,n.useEffect)(()=>{if("settle-to-rail"!==j&&"settle-to-wide"!==j||"settle-to-wide"===j&&32===f)return;let s="settle-to-rail"===j?"rail":"wide",t=!1,l=()=>{t||(t=!0,p(s),"wide"===s&&window.setTimeout(P,0))},n=window.setTimeout(l,i.Rb+50),r=e.current;if(!r)return()=>window.clearTimeout(n);let a=e=>{e.target===r&&"width"===e.propertyName&&l()};return r.addEventListener("transitionend",a),()=>{r.removeEventListener("transitionend",a),window.clearTimeout(n)}},[P,j,f]),(0,n.useEffect)(()=>{if("settle-to-wide"!==j)return;let s=o(d(b.current),u(e.current));if(f===s)return;let t=window.setTimeout(()=>v(s),16);return()=>window.clearTimeout(t)},[j,f]);let M=(0,n.useCallback)(e=>{let s=E.current+(e.clientX-y.current);if(_.current=s,s<240)return void v(Math.max(32,s));let t=Math.min(z.current,s);t>b.current&&(b.current=t),v(t)},[]),I=(0,n.useCallback)(()=>{let e=_.current;_.current=null,h(),document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",I),document.removeEventListener("pointercancel",I);let s=((e,s,t,l)=>{if(null==e)return{action:"cancel"};if(e<120){let t=d(s);return{action:"apply",mode:l||e<=32?"rail":"settle-to-rail",paint:32,tocWidth:t,lastWide:t}}let i=Math.min(t,e);return i<=240?{action:"apply",mode:"wide",paint:240,tocWidth:null,lastWide:s}:{action:"apply",mode:"wide",paint:i,tocWidth:i,lastWide:i}})(e,b.current,z.current,W);if("cancel"===s.action)return void p("wide");b.current=s.lastWide,null!=s.tocWidth&&(a(s.tocWidth),x(s.tocWidth)),v(s.paint),p(s.mode)},[M,W]),F=(0,n.useCallback)(s=>
1{s.preventDefault(),p("drag"),y.current=s.clientX,z.current=c(u(e.current));let l=e.current?.offsetWidth??t;E.current=l,_.current=l,v(l),document.body.style.userSelect="none",document.body.style.cursor="col-resize",document.addEventListener("mousemove",M),document.addEventListener("mouseup",I),document.addEventListener("pointercancel",I)},[M,I,t]);(0,n.useEffect)(()=>()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",I),document.removeEventListener("pointercancel",I),h()},[M,I]);let O=(0,n.useCallback)(()=>{let s=d(b.current);b.current=s;let t=o(s,u(e.current));if(a(t),W){v(t),p("wide"),window.setTimeout(P,0);return}v(32),p("settle-to-wide")},[P,W]);return{tocRef:e,paintedWidth:f,isResizing:C,isRail:A,isSettlingToRail:L,isContentHidden:T,handleMouseDown:F,openWide:O}}},54289:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var l=t(43436);let i=({picture:e,className:s})=>(0,l.jsxs)("div",{className:s,children:[(0,l.jsx)("div",{className:"skeleton mb-3 h-7 w-3/5"}),(0,l.jsxs)("div",{className:"mb-4 flex gap-6",children:[(0,l.jsx)("div",{className:"skeleton h-4 w-16"}),(0,l.jsx)("div",{className:"skeleton h-4 w-28"})]}),(0,l.jsxs)("div",{className:"space-y-3 pl-4",children:[(0,l.jsx)("div",{className:"skeleton h-4 w-[94%]"}),(0,l.jsx)("div",{className:"skeleton h-4 w-[40%]"}),e?(0,l.jsxs)("div",{className:"flex gap-4 py-2",children:[(0,l.jsx)("div",{className:"skeleton rounded-box size-32 shrink-0"}),(0,l.jsxs)("div",{className:"flex-1 space-y-3",children:[(0,l.jsx)("div",{className:"skeleton h-4 w-[78%]"}),(0,l.jsx)("div",{className:"skeleton h-4 w-[58%]"}),(0,l.jsx)("div",{className:"skeleton h-4 w-[72%]"}),(0,l.jsx)("div",{className:"skeleton h-4 w-[30%]"})]})]}):(0,l.jsxs)("div",{className:"flex gap-3",children:[(0,l.jsx)("div",{className:"skeleton h-4 w-1/5"}),(0,l.jsx)("div",{className:"skeleton h-4 w-[18%]"}),(0,l.jsx)("div",{className:"skeleton h-4 w-2/5"})]}),(0,l.jsx)("div",{className:"skeleton h-4 w-[78%]"}),(0,l.jsx)("div",{className:"skeleton h-4 w-[94%]"}),(0,l.jsx)("div",{className:"skeleton h-4 w-[70%]"}),(0,l.jsx)("div",{className:"skeleton h-4 w-[88%]"}),(0,l.jsx)("div",{className:"skeleton h-4 w-1/2"})]})]});var n=t(80006);let r=({className:e})=>(0,l.jsxs)("div",{className:(0,n.Q)("ProseMirror tiptap__editor h-full w-full space-y-10",e),children:[(0,l.jsx)(i,{className:"heading !h-auto"}),(0,l.jsx)(i,{picture:!0,className:"heading !h-auto"}),(0,l.jsx)(i,{className:"heading !h-auto"})]})},90883:(e,s,t)=>{"use strict";t.d(s,{U:()=>a});var l=t(43436),i=t(46248),n=t(57022),r=t(61322);function a(){let e=(0,n.Pj)(e=>e.globalDialog.config),s=(0,n.Pj)(e=>e.globalDialog.content),t=(0,n.Pj)(e=>e.globalDialog.isOpen),a=(0,n.Pj)(e=>e.closeDialog),d=!1!==e.dismissible;return(0,i.e)(t&&d,a),(0,l.jsx)(r.aF,{open:t,onOpenChange:e=>{!e&&d&&a()},children:(0,l.jsx)(r.$m,{size:e.size,align:e.align,className:e.className,children:s})})}},97249:(e,s,t)=>{"use strict";t.d(s,{A:()=>i});var l=t(43436);t(11872);let i=e=>(0,l.jsx)("div",{...e,className:["flex h-full min-h-0 w-full flex-col",e.className].filter(Boolean).join(" "),children:(0,l.jsxs)("div",{className:"space-y-1 px-1.5 pt-2",children:[(0,l.jsx)("div",{className:"border-base-300 mb-1 border-b pt-2 pb-1",children:(0,l.jsxs)("div",{className:"rounded-field flex items-center gap-2 px-3 py-1.5",children:[(0,l.jsx)("div",{className:"skeleton h-5 min-w-0 flex-1"}),(0,l.jsx)("div",{className:"skeleton rounded-field size-6 shrink-0"})]})}),(0,l.jsx)("div",{className:"skeleton rounded-field h-8 w-[72%]"}),(0,l.jsxs)("div",{className:"space-y-1 pl-4",children:[(0,l.jsx)("div",{className:"skeleton rounded-field h-8 w-[85%]"}),(0,l.jsx)("div",{className:"skeleton rounded-field h-8 w-[78%]"}),(0,l.jsx)("div",{className:"skeleton rounded-field h-8 w-[82%]"})]}),(0,l.jsx)("div",{className:"skeleton rounded-field mt-1 h-8 w-[65%]"}),(0,l.jsxs)("div",{className:"space-y-1 pl-4",children:[(0,l.jsx)("div",{className:"skeleton rounded-field h-8 w-[80%]"}),(0,l.jsx)("div",{className:"skeleton rounded-field h-8 w-[70%]"})]}),(0,l.jsx)("div",{className:"skeleton rounded-field mt-1 h-8 w-[60%]"}),(0,l.jsxs)("div",{className:"space-y-1 pl-4",children:[(0,l.jsx)("div",{className:"skeleton rounded-field h-8 w-[75%]"}),(0,l.jsx)("div",{className:"skeleton rounded-field ml-4 h-8 w-[68%]"})]})]})})},99399:(e,s,t)=>{"use strict";t.r(s),t.d(s,{__N_SSP:()=>W,default:()=>P});
1var l=t(43436),i=t(16434),n=t(48134),r=t(90883),a=t(87550),d=t(45831),c=t(63522),o=t.n(c),u=t(8007),m=t(11872);let x={"sign-in-required":{title:"This document is private",body:"Sign in to view this document."},"access-denied":{title:"You donât have access to this document",body:"Only the owner can open it."},"check-unavailable":{title:"We couldnât check this document",body:"The server could not verify your access right now. Try again in a moment."}},h=({variant:e,slug:s,title:t})=>{let c=(0,u.useRouter)(),h=x[e],f=t?`${t} \xb7 docs.plus/${s}`:`docs.plus/${s}`,v=(0,m.useRef)(!1);return(0,m.useEffect)(()=>{if("sign-in-required"!==e)return;let{data:s}=d.m.auth.onAuthStateChange((e,s)=>{("INITIAL_SESSION"===e||"SIGNED_IN"===e)&&s?.user&&(v.current||(v.current=!0,c.replace(window.location.pathname+window.location.search,void 0,{scroll:!1})))});return()=>s.subscription.unsubscribe()},[e,c]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i._C,{title:h.title,description:h.body,meta:f,actions:(0,l.jsxs)(l.Fragment,{children:["sign-in-required"===e&&(0,l.jsx)(o(),{href:"/",className:n.AZ,children:"Create a document"}),(0,l.jsx)(i.$r,{})]}),children:"sign-in-required"===e?(0,l.jsx)(n.Ay,{type:"button",variant:"primary",shape:"block",onClick:()=>(0,a.S)({returnTo:c.asPath}),children:"Sign in"}):"check-unavailable"===e?(0,l.jsx)(n.Ay,{type:"button",variant:"primary",shape:"block",onClick:()=>c.reload(),children:"Try again"}):(0,l.jsx)(n.Ay,{type:"button",variant:"primary",shape:"block",onClick:()=>c.push("/"),children:"Create a document"})}),(0,l.jsx)(r.U,{})]})},f=function(e){(0,m.useLayoutEffect)(()=>{let s=document.documentElement,t=e?"m_mobile":"m_desktop";return s.classList.add(t),()=>{s.classList.remove(t)}},[e])};var v=t(43742),j=t(54289),p=t(97249),w=t(18621);let N=()=>(0,l.jsxs)("div",{role:"status",className:"surface-inverse-raised fixed bottom-4 left-4 z-50 flex animate-[doc-region-in_200ms_ease-out_1500ms_both] items-center gap-2 rounded-full px-4 py-2 text-sm shadow-xl",children:[(0,l.jsx)("span",{className:"loading loading-spinner loading-sm"}),(0,l.jsx)("span",{children:"Opening documentâ¦"})]}),b=({tocWidth:e,isAuthed:s})=>(0,l.jsxs)("div",{className:"pad tiptap flex min-h-0 w-full flex-1 flex-col",children:[(0,l.jsxs)("header",{className:"border-base-300 bg-base-100 flex h-14 w-full shrink-0 items-center border-b px-3",children:[(0,l.jsxs)("div",{className:"flex flex-1 items-center gap-2",children:[(0,l.jsx)("div",{className:"skeleton rounded-field size-[34px]"}),(0,l.jsx)("div",{className:"skeleton h-5 w-40"}),(0,l.jsx)("div",{className:"skeleton h-5 w-14"})]}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"skeleton rounded-field h-10 w-20"}),s?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"skeleton size-10 rounded-full"}),(0,l.jsx)("div",{className:"skeleton size-10 rounded-full"}),(0,l.jsx)("div",{className:"skeleton size-12 rounded-full"})]}):(0,l.jsx)("div",{className:"skeleton rounded-field h-10 w-20"})]})]}),(0,l.jsx)(w.A,{}),(0,l.jsxs)("div",{className:"editor flex min-h-0 w-full flex-1 flex-row-reverse bg-[var(--pad-well)]",children:[(0,l.jsx)("div",{className:"editorWrapper scrollbar-custom flex h-full min-w-0 flex-1 scrollbar-thin items-start justify-center overflow-y-auto scroll-smooth border-t-0 bg-[var(--pad-well)] px-3 py-4 sm:px-6 sm:py-6",children:(0,l.jsx)(j.A,{className:"mb-12 border-t-0 px-6 pt-8 sm:mb-0 sm:p-8"})}),(0,l.jsx)("aside",{className:"h-full shrink-0 bg-[var(--pad-well)]",style:{width:e},children:(0,l.jsx)(p.A,{})})]})]}),k=({isAuthed:e})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("header",{className:"bg-base-100 w-full shrink-0",children:(0,l.jsx)("div",{className:"border-base-300 flex min-h-[61px] w-full flex-col justify-center border-b px-2 py-2",children:(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1",children:[(0,l.jsx)("div",{className:"skeleton rounded-field size-8"}),(0,l.jsx)("div",{className:"skeleton ml-1 h-6 w-40"})]}),(0,l.jsx)("div",{className:"flex shrink-0 items-center gap-1",children:e?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"skeleton rounded-field size-8"}
1),(0,l.jsx)("div",{className:"skeleton size-10 rounded-full"})]}):(0,l.jsx)("div",{className:"skeleton rounded-field h-8 w-16"})})]})})}),(0,l.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden pt-3 pr-0 pb-5 pl-4",children:(0,l.jsx)(j.A,{})}),(0,l.jsx)("div",{className:"skeleton fixed right-6 bottom-[calc(2rem+env(safe-area-inset-bottom,0px))] z-20 size-16 rounded-full"})]}),g=({isMobile:e=!1,isAuthed:s=!1})=>{let t=(()=>{let[e,s]=(0,m.useState)(v.im);return(0,m.useEffect)(()=>{let e=()=>{s((0,v.mn)((0,v.YH)(),(0,v.w_)(null)))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e})();return(0,l.jsxs)("div",{className:"bg-base-200 flex h-dvh w-full flex-col overflow-hidden",children:[(0,l.jsx)("div",{"aria-hidden":"true",className:"flex h-full min-h-0 flex-1 flex-col",children:e?(0,l.jsx)(k,{isAuthed:s}):(0,l.jsx)(b,{tocWidth:t,isAuthed:s})}),(0,l.jsx)(N,{})]})};var y=t(13804),E=t(57022),_=t(62541),z=t(46267),S=t.n(z),A=t(29244),C=t.n(A);let L=()=>(0,l.jsx)("div",{className:"bg-base-100 fixed inset-0 z-50 flex items-center justify-center",children:(0,l.jsx)(y.p,{tone:"error",title:"Couldnât load the editor.",body:"A new version may have been deployed.",action:(0,l.jsx)(n.Ay,{variant:"primary",size:"sm",onClick:()=>window.location.reload(),children:"Reload"})})}),T=S()(()=>Promise.all([t.e(6593),t.e(80),t.e(1082),t.e(8844),t.e(4881),t.e(7153),t.e(6663),t.e(3979),t.e(4723),t.e(7002),t.e(3510),t.e(2898),t.e(8064),t.e(7781),t.e(9191),t.e(6704),t.e(4063)]).then(t.bind(t,84063)),{loadableGenerated:{webpack:()=>[84063]},ssr:!1,loading:({error:e})=>e?(0,l.jsx)(L,{}):null});var W=!0;let P=({docMetadata:e,isMobile:s,deviceType:t,accessToken:i,gateVariant:n,slug:r,gateTitle:a})=>{let d=(0,E.Pj)(e=>e.settings.editor.isMobile)??(s||(0,_.Pc)()),c=function(e,s){return e?"mobile"===s||"tablet"===s?s:"tablet":"desktop"}(d,t);f(d);let o=(0,E.Pj)(e=>!!e.settings.hocuspocusProvider);return n?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(C(),{children:[(0,l.jsx)("title",{children:"docs.plus"}),(0,l.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,l.jsx)(h,{variant:n,slug:r,title:a})]}):(0,l.jsxs)(l.Fragment,{children:[!o&&(0,l.jsx)(g,{isMobile:s,isAuthed:!!i}),(0,l.jsx)(T,{docMetadata:e,isMobile:d,deviceType:c,accessToken:i})]})}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=5328)),_N_E=e.O()}]);
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.