(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8280],{89136:function(e,t,r){Promise.resolve().then(r.bind(r,57501)),Promise.resolve().then(r.bind(r,17760)),Promise.resolve().then(r.bind(r,42057)),Promise.resolve().then(r.bind(r,41410)),Promise.resolve().then(r.bind(r,35489)),Promise.resolve().then(r.t.bind(r,60311,23)),Promise.resolve().then(r.bind(r,72020)),Promise.resolve().then(r.bind(r,91861)),Promise.resolve().then(r.bind(r,49780)),Promise.resolve().then(r.bind(r,75014)),Promise.resolve().then(r.bind(r,80718)),Promise.resolve().then(r.bind(r,66819)),Promise.resolve().then(r.bind(r,22833)),Promise.resolve().then(r.bind(r,86604)),Promise.resolve().then(r.bind(r,59814)),Promise.resolve().then(r.bind(r,87948)),Promise.resolve().then(r.bind(r,19656)),Promise.resolve().then(r.bind(r,66185)),Promise.resolve().then(r.bind(r,42663)),Promise.resolve().then(r.bind(r,45343)),Promise.resolve().then(r.bind(r,22563)),Promise.resolve().then(r.bind(r,5145)),Promise.resolve().then(r.bind(r,48982)),Promise.resolve().then(r.bind(r,90790)),Promise.resolve().then(r.bind(r,63990)),Promise.resolve().then(r.bind(r,71362))},17760:function(e,t,r){"use strict";r.d(t,{ClientContexts:function(){return l}});var n=r(27573),a=r(54689);function l(e){let{children:t,forcedTheme:r}=e;return(0,n.jsx)(a.f,{nonce:"",attribute:"class",enableSystem:!0,forcedTheme:r,children:t})}r(7653)},42057:function(e,t,r){"use strict";r.d(t,{RefreshChangeRequestButton:function(){return c}});var n=r(27573),a=r(42172),l=r(7653);r(43503);var s=(0,r(99976).$)("ebe2454926b87e898c2656d2494d4f7263611b83"),i=r(33298),o=r(41410);function c(e){let{updatedAt:t}=e,[r,c]=l.useState(!1),[d,u]=l.useState(!1),f=function(e){let{spaceId:t,changeRequestId:r,revisionId:n}=e;return l.useCallback(async()=>{await s({spaceId:t,changeRequestId:r,revisionId:n})&&window.location.reload()},[t,r,n])}(e),h=l.useCallback(async()=>{u(!0);try{await f()}finally{u(!1),c(!1)}},[f]);return(l.useEffect(()=>{t<Date.now()-3e4&&c(!0)},[t]),l.useEffect(()=>{if(!r){let e=setTimeout(()=>{c(!0)},3e4);return()=>clearTimeout(e)}},[r]),r)?(0,n.jsx)(o.ToolbarButton,{title:"Refresh",onClick:e=>{e.preventDefault(),h()},children:(0,n.jsx)(a.JO,{icon:"rotate",className:(0,i.t)("size-4",d?"animate-spin":null)})}):null}},41410:function(e,t,r){"use strict";r.d(t,{Toolbar:function(){return l},ToolbarBody:function(){return s},ToolbarButton:function(){return o},ToolbarButtonGroups:function(){return i}});var n=r(27573);r(7653);var a=r(33298);function l(e){let{children:t}=e;return(0,n.jsx)("div",{className:(0,a.t)("flex","flex-row","items-center","gap-4","text-sm","px-4","py-1","rounded-full","truncate","text-light","dark:text-light"),children:t})}function s(e){return(0,n.jsx)("div",{className:"flex flex-col gap-1",children:e.children})}function i(e){return(0,n.jsx)("div",{className:"flex flex-row gap-2",children:e.children})}function o(e){let{children:t,...r}=e;return(0,n.jsx)("a",{...r,className:(0,a.t)("flex","flex-col","items-center","justify-center","size-11","gap-1","text-sm","rounded-full","hover:bg-dark-1","hover:text-white","truncate","text-light","dark:text-light","dark:hover:bg-dark-2","hover:shadow-lg","cursor-pointer"),children:t})}},35489:function(e,t,r){"use strict";r.r(t),r.d(t,{CookiesToast:function(){return u}});var n=r(27573),a=r(42172),l=r(7653),s=r(53902),i=r(63530),o=r(80807),c=r(76384),d=r(33298);function u(e){let{privacyPolicy:t="https://policies.gitbook.com/privacy/cookies"}=e,[r,u]=l.useState(!1),f=(0,i.ZK)();if(l.useEffect(()=>{u(void 0===(0,c.Bi)())},[]),!r)return null;let h=e=>{(0,c.GQ)(e),window.location.reload()},m="cookies-description";return(0,n.jsxs)("div",{role:"dialog","data-testid":"cookies-dialog","aria-modal":"true","aria-label":(0,o.F)(f,"cookies_title"),"aria-describedby":m,className:(0,d.t)("fixed","z-10","bg-white","rounded","straight-corners:rounded-none","ring-1","ring-dark/2","shadow-1xs","p-4","pr-8","bottom-4","right-4","left-16","max-w-md","text-balance","sm:left-auto","dark:ring-light/2","dark:bg-dark"),children:[(0,n.jsx)("p",{id:m,className:(0,d.t)("text-sm"),children:(0,o.t)(f,"cookies_prompt",(0,n.jsx)("a",{href:t,className:(0,d.t)("text-primary-500","hover:text-primary-600","underline"),children:(0,o.t)(f,"cookies_prompt_privacy")}))}),(0,n.jsx)("button",{type:"button",onClick:()=>u(!1),"aria-label":(0,o.F)(f,"cookies_close"),className:(0,d.t)("absolute","top-3","right-3","w-6","h-6","flex","justify-center","items-center","rounded-sm","hover:bg-dark/2","dark:hover:bg-light/1"),title:(0,o.F)(f,"cookies_close"),children:(0,n.jsx)(a.JO,{icon:"xmark",className:(0,d.t)("size-4")})}),(0,n.jsxs)("div",{className:(0,d.t)("mt-3","flex","flex-row","gap-2"),children:[(0,n.jsx)(s.zx,{variant:"primary",size:"small","aria-label":(0,o.F)(f,"cookies_accept"),onClick:()=>{h(!0)},children:(0,o.t)(f,"cookies_accept")}),(0,n.jsx)(s.zx,{variant:"secondary",size:"small","aria-label":(0,o.F)(f,"cookies_reject"),onClick:()=>{h(!1)},children:(0,o.t)(f,"cookies_reject")})]})]})}},72020:function(e,t,r){"use strict";r.d(t,{HeaderMobileMenu:function(){return d}});var n=r(27573),a=r(42172),l=r(81695),s=r(7653),i=r(63530),o=r(33298);let c="navigation-open";function d(e){let t=(0,i.ZK)(),r=(0,l.usePathname)(),[d,u]=(0,s.useState)(!1),f=()=>{window.scrollY>=320?u(!0):u(!1)};return(0,s.useEffect)(()=>{document.body.classList.remove(c)},[r]),(0,s.useEffect)(()=>(window.addEventListener("scroll",f),()=>{window.removeEventListener("scroll",f)}),[]),(0,n.jsx)("button",{...e,"aria-label":(0,i.Ff)(t,"table_of_contents_button_label"),onClick:()=>{!d&&document.body.classList.contains(c)?document.body.classList.remove(c):(document.body.classList.add(c),window.scrollTo(0,0))},className:(0,o.t)("flex","flex-row","items-center","hover:bg-dark/3","py-1","px-2","dark:hover:bg-light/2","rounded","straight-corners:rounded-sm","page-no-toc:hidden",e.className),children:(0,n.jsx)(a.JO,{icon:"bars",className:(0,o.t)("size-4","text-inherit")})})}},91861:function(e,t,r){"use strict";r.d(t,{SpacesDropdownMenuItem:function(){return o}});var n=r(27573),a=r(81695);r(42172),r(7653);var l=r(33298),s=r(53902);function i(e){let{children:t,active:r=!1,href:a}=e;return(0,n.jsx)(s.rU,{href:a,prefetch:!1,className:(0,l.t)("flex","flex-row","items-center","text-sm","px-3","py-1","rounded","straight-corners:rounded-sm",r?["bg-primary/3","dark:bg-light/2","text-primary-600"]:["hover:bg-dark/2","dark:hover:bg-light/2"]),children:t})}function o(e){let{variantSpace:t,active:r}=e,l=function(e){var t;let r=null!==(t=(0,a.useSelectedLayoutSegment)())&&void 0!==t?t:"",n=new URL(e);return n.pathname+="/".concat(r),n.pathname=n.pathname.replace(/\/{2,}/g,"/").replace(/\/$/,""),n.searchParams.set("fallback","true"),n.toString()}(t.url);return(0,n.jsx)(i,{href:l,active:r,children:t.title},t.id)}},49780:function(e,t,r){"use strict";r.r(t),r.d(t,{LoadIntegrations:function(){return a}});var n=r(7653);function a(){return n.useEffect(()=>{(function(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];((null===(t=window.GitBook)||void 0===t?void 0:t.events.get(e))||[]).forEach(e=>e(...n))})("load")},[]),null}window.GitBook={events:new Map,addEventListener:(e,t)=>{var r,n,a;let l=null!==(a=null===(r=window.GitBook)||void 0===r?void 0:r.events.get(e))&&void 0!==a?a:[];l.push(t),null===(n=window.GitBook)||void 0===n||n.events.set(e,l)},removeEventListener:(e,t)=>{var r,n;let a=null!==(n=null===(r=window.GitBook)||void 0===r?void 0:r.events.get(e))&&void 0!==n?n:[],l=a.indexOf(t);-1!==l&&a.splice(l,1)}}},86604:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchButton:function(){return c}});var n=r(27573),a=r(42172),l=r(7653),s=r(63530),i=r(33298),o=r(66353);function c(e){let{style:t,children:r}=e,l=(0,s.ZK)(),[,c]=(0,o.R)();return(0,n.jsxs)("button",{onClick:()=>{c({ask:!1,global:!1,query:""})},"aria-label":(0,s.Ff)(l,"search"),className:(0,i.t)("flex","flex-1","flex-row","justify-center","items-center","px-2","gap-3","text-dark/7","min-h-[2.5rem]","w-[2.5rem]","rounded-lg","straight-corners:rounded-none","bg-dark/2","transition-colors","transition-opacity","ease-out","hover:opacity-8","ring-1","ring-inset","ring-dark/1","contrast-more:ring-dark","contrast-more:bg-light","contrast-more:text-dark","dark:bg-light/1","dark:ring-light/1","dark:text-light/7","contrast-more:dark:ring-light","contrast-more:dark:bg-dark","contrast-more:dark:text-light","[&>p]:hidden","[&>span]:hidden","md:justify-start","md:[&>p]:flex","md:[&>span]:flex","md:w-full","md:px-3.5","text-base",t),children:[(0,n.jsx)("div",{className:(0,i.t)("text-dark/7","pt-1.5","pb-2","dark:text-light/7"),children:(0,n.jsx)(a.JO,{icon:"magnifying-glass",className:(0,i.t)("shrink-0","size-4")})}),r,(0,n.jsx)(d,{})]})}let d=()=>{let[e,t]=(0,l.useState)("win");return(0,l.useEffect)(()=>{t(function(){let e=navigator.platform.toLowerCase();return e.includes("mac")?"mac":(e.includes("win"),"win")}())},[]),(0,n.jsxs)("span",{className:(0,i.t)("hidden","md:inline","justify-end","text-xs","text-dark/5","contrast-more:text-dark","dark:text-light/5","contrast-more:dark:text-light",'[font-feature-settings:"calt",_"case"]'),children:["mac"===e?"⌘":"Ctrl +"," K"]})}},59814:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchModal:function(){return B}});var n=r(27573),a=r(42172),l=r(40529),s=r(72354),i=r(81695),o=r(7653),c=r(32603),d=r(11067),u=r(63530),f=r(33298),h=r(53902),m=r(80807);r(43503);var x=r(99976),p=(0,x.$)("a501ac45ed3ebadb223a733b12ac4f508a02a6f1"),g=(0,x.$)("a690e51318b39e87baed8c54df0cf141887dfc43"),b=(0,x.$)("67d7c91eed4bb9626c0e7273d7ce868d296e225d"),k=(0,x.$)("570add0a00dbdd6e818c5df488df0dff652dd942"),v=r(66353);let y=(0,d.cn)({key:"searchAskState",default:null});function w(e){let{spaceId:t,query:r}=e,a=(0,u.ZK)(),[,l]=(0,v.R)(),[s,i]=(0,d.FV)(y);o.useEffect(()=>{let e=!1;return i({type:"loading"}),(async()=>{var n;let a=(n=k(t,r),{[Symbol.asyncIterator]:function(){return{current:n,async next(){let{iteratorResult:e,next:t}=await this.current;return t?this.current=t:e.done=!0,e}}}});for await(let t of(l(e=>e?{...e,ask:!0,query:r}:null),a)){if(e)return;i({type:"answer",answer:t})}})().catch(t=>{e||i({type:"error"})}),()=>{e=!0}},[t,r,l,i]),o.useEffect(()=>()=>{i(null)},[i]);let c=(0,n.jsx)("div",{className:(0,f.t)("w-full","flex","items-center","justify-center"),children:(0,n.jsx)(h.gb,{className:(0,f.t)("w-5","py-4","text-primary")})});return(0,n.jsxs)("div",{className:(0,f.t)("max-h-[60vh]","overflow-y-auto","border-t","border-dark/2","dark:border-light/1"),children:[(null==s?void 0:s.type)==="answer"?(0,n.jsx)(n.Fragment,{children:s.answer?(0,n.jsx)(o.Suspense,{fallback:c,children:(0,n.jsx)(j,{answer:s.answer,placeholder:c})}):(0,n.jsx)("div",{className:(0,f.t)("p-4"),children:(0,m.t)(a,"search_ask_no_answer")})}):null,(null==s?void 0:s.type)==="error"?(0,n.jsx)("div",{className:(0,f.t)("p-4"),children:(0,m.t)(a,"search_ask_error")}):null,(null==s?void 0:s.type)==="loading"?c:null]})}function j(e){let{answer:t,placeholder:r}=e,[a,l]=o.useState(null),[s,i]=o.useTransition();return o.useEffect(()=>{i(()=>{l(t)})},[t]),a?(0,n.jsx)("div",{className:(0,f.t)("w-full"),children:(0,n.jsx)(_,{answer:a})}):(0,n.jsx)(n.Fragment,{children:r})}function _(e){let{answer:t}=e,r=(0,u.ZK)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{"data-test":"search-ask-answer",className:(0,f.t)("mt-4","px-4","text-dark/9","dark:text-light/8"),children:t.hasAnswer?t.body:(0,m.t)(r,"search_ask_no_answer")}),t.followupQuestions.length>0?(0,n.jsx)(N,{followupQuestions:t.followupQuestions}):null,t.sources.length>0?(0,n.jsx)(C,{hasAnswer:t.hasAnswer,sources:t.sources,language:r}):null]})}function N(e){let{followupQuestions:t}=e,r=(0,v.q)();return(0,n.jsx)("div",{className:(0,f.t)("mt-7 mb-4","flex","flex-col","flex-wrap","gap-1"),children:t.map(e=>(0,n.jsxs)(h.rU,{className:(0,f.t)("text-sm","font-medium","inline-flex","items-start","gap-2","px-4","py-1","text-primary-500","focus-within:text-primary-700","hover:bg-primary/2","dark:text-primary-400","dark:hover:bg-primary-500/3"),...r({query:e,ask:!0}),children:[(0,n.jsx)(a.JO,{icon:"magnifying-glass",className:(0,f.t)("size-[15px]","shrink-0","mt-0.5","[opacity:0.64]")}),(0,n.jsx)("span",{children:e})]},e))})}function C(e){let{sources:t,language:r,hasAnswer:l}=e;return(0,n.jsxs)("div",{className:(0,f.t)("flex","flex-wrap","gap-2","mt-7","py-4","px-4","border-t","border-dark/2","dark:border-light/1"),children:[(0,n.jsx)("span",{className:(0,f.t)("text-sm"),children:(0,m.t)(r,l?"search_ask_sources":"search_ask_sources_no_answer")}),t.map(e=>(0,n.jsx)("span",{className:(0,f.t)(),children:(0,n.jsxs)(h.rU,{className:(0,f.t)("flex","text-sm","text-dark/7","hover:underline","focus-within:text-primary-700","dark:text-light/8"),href:e.href,prefetch:!1,children:[(0,n.jsx)(a.JO,{icon:"arrow-up-right",className:(0,f.t)("text-dark/6","w-[15px]","h-[15px]","shrink-0","mt-0.5","mr-0.5","dark:text-light/6")}),e.title]})},e.id))]})}var E=r(23060);let q=new Set(["who","what","where","when","why","how","explain","is","are","was","were","do","does","did","which","whom","whose","can","have","give","tell","show","find"]);function P(e){let{query:t,text:r,highlight:a=["text-bold","text-primary"]}=e,l=t.toLowerCase().split(" ").reduce((e,t)=>e.reduce((e,r)=>{if(r.match)return e.push(r),e;let{text:n}=r,a=n.toLowerCase().indexOf(t);if(a>=0){let r=n.slice(0,a),l=n.slice(a,a+t.length),s=n.slice(a+t.length);return r.length>0&&e.push({text:r}),l.length>0&&e.push({text:l,match:t}),s.length>0&&e.push({text:s}),e}return e.push({text:n}),e},[]),[{text:r}]);return(0,n.jsx)("span",{className:(0,f.t)("whitespace-break-spaces"),children:l.map((e,t)=>(0,n.jsx)("span",{className:(0,f.t)(e.match?a:null),children:e.text},t))})}let R=o.forwardRef(function(e,t){let{query:r,item:a,active:l}=e;return(0,n.jsxs)(h.rU,{ref:t,href:a.href,className:(0,f.t)("flex","flex-row","px-6","py-3","hover:bg-dark-4/2","text-base","text-dark","font-semibold","first:mt-0","[&:has(+.search-section-result-item):not(:first-child)]:mt-6","dark:text-light","dark:hover:bg-light-4/2",l?["bg-dark/1","dark:bg-light/1"]:null),children:[a.spaceTitle?(0,n.jsx)("span",{className:(0,f.t)("opacity-6","font-normal","mr-2"),children:a.spaceTitle+" ›"}):null,(0,n.jsx)(P,{query:r,text:a.title})]})}),S=o.forwardRef(function(e,t){let{question:r,recommended:l=!1,active:s,onClick:i}=e,o=(0,u.ZK)(),c=(0,v.q)();return(0,n.jsxs)(h.rU,{ref:t,onClick:i,className:(0,f.t)("flex","flex-row","px-4","py-2","hover:bg-dark-4/2","text-dark/7","text-sm","font-medium","first:mt-0","last:pb-3","dark:text-light/8","dark:hover:bg-light-4/2",s?["bg-dark/1","dark:bg-light/1"]:null),...c({ask:!0,query:r}),children:[(0,n.jsx)(a.JO,{icon:"magnifying-glass",className:(0,f.t)("w-[15px]","h-[15px]","shrink-0","mt-0.5","mr-4","text-dark/5","dark:text-light/5")}),l?r:(0,u.t)(o,"search_ask",[r])]})}),L=o.forwardRef(function(e,t){let{query:r,item:a,active:l}=e;return(0,n.jsx)(h.rU,{ref:t,href:a.href,className:(0,f.t)("search-section-result-item","[&:has(+:not(&))]:mb-6","flex","flex-col","pl-6","hover:bg-dark-4/2","dark:hover:bg-light-4/2",l?["bg-dark/1","dark:bg-light/1"]:null),children:(0,n.jsxs)("div",{className:(0,f.t)("border-l","p-3","border-dark/2","dark:border-light/2"),children:[a.title?(0,n.jsx)("p",{className:(0,f.t)("text-base","text-dark/7","dark:text-light/8"),children:(0,n.jsx)(P,{query:r,text:a.title})}):null,a.body?(0,n.jsx)("p",{className:(0,f.t)("text-sm","text-dark","line-clamp-6","linear-mask-gradient","z-[-1]","relative","dark:text-light/8"),children:(0,n.jsx)(P,{query:r,text:a.body})}):null]})})}),T=o.forwardRef(function(e,t){let{children:r,query:a,pointer:l,spaceId:s,revisionId:i,global:c,withAsk:d,onSwitchToAsk:m}=e,x=(0,u.ZK)(),k=o.useRef(null),[v,y]=o.useState(null),[w,j]=o.useState(null),_=o.useRef([]),N=o.useRef(null);o.useEffect(()=>{if(a)return d&&y(e=>z(e,a)),k.current=setTimeout(async()=>{j(null);let e=await (c?g(a,l):b(a,l,i));y(d?z(e,a):e)},350),()=>{k.current&&(clearTimeout(k.current),k.current=null)};{if(!d)return;let e=!1;return(N.current?Promise.resolve(N.current):p(s)).then(t=>{N.current=t,e||y(t.map(e=>({type:"recommended-question",id:e,question:e})))}),()=>{e=!0}}},[a,c,l,s,i,d]),o.useEffect(()=>{var e;null!==w&&_.current[w]&&(null===(e=_.current[w])||void 0===e||e.scrollIntoView({block:"nearest",inline:"nearest"}))},[w,_]);let C=o.useCallback(e=>{v&&j(t=>null===t?0:Math.max(Math.min(t+e,v.length-1),0))},[v]),q=o.useCallback(()=>{var e;null!==w&&_.current[w]&&(null===(e=_.current[w])||void 0===e||e.click())},[w,_]);return(o.useImperativeHandle(t,()=>({moveUp:()=>{C(-1)},moveDown:()=>{C(1)},select:q}),[C,q]),v)?(0,n.jsxs)("div",{className:(0,f.t)("max-h-[60vh]","overflow-auto","relative","shadow-[0_1px_0_0_inset]","shadow-dark/2","dark:shadow-light/2"),children:[r,0===v.length?(0,n.jsx)("div",{"data-test":"search-noresults",className:(0,f.t)("text-sm","text-dark","p-6","text-center","dark:text-light/8"),children:(0,u.t)(x,"search_no_results",a)}):(0,n.jsx)("div",{"data-test":"search-results",children:v.map((e,t)=>{switch(e.type){case"page":return(0,n.jsx)(R,{ref:e=>{_.current[t]=e},query:a,item:e,active:t===w},e.id);case"question":return(0,n.jsx)(S,{ref:e=>{_.current[t]=e},question:a,active:t===w,onClick:m},e.id);case"recommended-question":return(0,n.jsx)(S,{ref:e=>{_.current[t]=e},question:e.question,active:t===w,onClick:m,recommended:!0},e.id);case"section":return(0,n.jsx)(L,{ref:e=>{_.current[t]=e},query:a,item:e,active:t===w},e.id);default:(0,E.ZP)(e)}})})]}):a?(0,n.jsx)("div",{className:(0,f.t)("flex","items-center","justify-center","py-8"),children:(0,n.jsx)(h.gb,{className:(0,f.t)("w-6","text-primary")})}):null});function z(e,t){let r=e?e.filter(e=>"question"!==e.type):null;return!function(e){if(e.length>25||e.includes("?")||e.includes(" "))return!0;let t=e.toLowerCase().trim().split(/\s+/);if(0===t.length)return!1;for(let e of t)if(q.has(e))return!0;return!1}(t)?r:[{type:"question",id:"question",query:t},...null!=r?r:[]]}function U(e){let{spaceTitle:t}=e,[r,a]=(0,v.R)(),l=(0,u.ZK)();return r?(0,n.jsxs)("div",{role:"toolbar","aria-orientation":"horizontal",className:(0,f.t)("overflow-x-auto","hide-scroll","flex","flex-row","py-3","gap-0","px-0","pt-0","sticky","z-[0]","w-[calc(100%-1px)]","left-[1px]","top-[0px]","bg-gradient-to-b","from-white","to-transparent","from-60%","dark:from-dark-3","shadow-[0_1px_0_0_inset]","shadow-dark/2","dark:shadow-light/2","md:px-6","md:gap-3"),children:[(0,n.jsx)(O,{active:!r.global,onClick:()=>{a({...r,global:!1})},children:(0,u.t)(l,"search_scope_space",t)}),(0,n.jsx)(O,{active:r.global,onClick:()=>{a({...r,global:!0})},children:(0,u.t)(l,"search_scope_all")})]}):null}function O(e){let{onClick:t,children:r,active:a}=e;return(0,n.jsx)("button",{role:"tab",type:"button","aria-selected":a,onClick:t,className:(0,f.t)("text-xs","transition-colors","duration-75","px-2.5","py-1.5","border-t","relative","top-[0px]","z-[1]","border-dark/2","whitespace-pre","hover:border-dark/6","dark:hover:border-light/6","md:px-1",a?["text-primary-400","border-primary-400","hover:border-primary-400","dark:hover:text-primary-400","dark:border-primary-400","dark:hover:border-primary-400"]:null),children:r})}var F=r(28785);function B(e){let[t,r]=(0,v.R)(),a=(0,d.sJ)(y),u=(0,i.useRouter)();(0,c.y1)("mod+k",e=>{e.preventDefault(),r({ask:!1,query:"",global:!1})},[]);let h=null!==t;if(o.useEffect(()=>(h&&(document.body.style.overflow="hidden"),()=>{document.body.style.overflow="auto"}),[h]),null===t)return null;let m=async e=>{await r(null),e&&u.push(e)};return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{role:"dialog",className:(0,f.t)("flex","items-start","justify-center","fixed","inset-0","bg-dark/4","backdrop-blur-2xl","opacity-[1]","z-30","px-4","pt-4","dark:bg-dark/8","md:pt-[min(8vw,_6rem)]"),onClick:()=>{m()},children:[(0,n.jsx)(l.M,{children:(null==a?void 0:a.type)==="loading"?(0,n.jsx)(s.E.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:1},className:(0,f.t)("w-[100vw]","h-[100vh]","fixed","inset-0","z-10","pointer-events-none"),children:(0,n.jsx)(F.K,{gridStyle:["h-[100vh]","aspect-auto","top-[-30%]"],pulse:!0,tile:96,style:["grid"]})},"loading"):null}),(0,n.jsx)(I,{...e,state:t,onChangeQuery:e=>{r(e)},onClose:m})]})})}function I(e){let{pointer:t,spaceId:r,revisionId:l,spaceTitle:s,withAsk:i,isMultiVariants:c,state:d,onChangeQuery:h,onClose:m}=e,x=(0,u.ZK)(),p=o.useRef(null),g=o.useRef(null);return o.useEffect(()=>{var e;null===(e=g.current)||void 0===e||e.focus()},[]),(0,n.jsxs)("div",{role:"dialog","aria-label":(0,u.Ff)(x,"search"),className:(0,f.t)("z-40","flex","flex-col","bg-white","max-w-[768px]","mt-[-1px]","w-full","max-h","rounded-lg","ring-1","ring-dark/1","shadow-2xl","backdrop-blur-lg","overflow-hidden","dark:ring-inset","dark:bg-dark-3","dark:ring-light/2"),onClick:e=>{e.stopPropagation()},children:[(0,n.jsxs)("div",{className:(0,f.t)("flex","flex-row","items-center"),children:[(0,n.jsx)("div",{className:(0,f.t)("p-2","pl-4"),children:(0,n.jsx)(a.JO,{icon:"magnifying-glass",className:(0,f.t)("size-4","text-dark/4","dark:text-light/5")})}),(0,n.jsx)("div",{className:(0,f.t)("flex-1"),children:(0,n.jsx)("input",{ref:g,value:d.query,onKeyDown:e=>{var t,r,n;"Escape"===e.key?m():"ArrowUp"===e.key?(e.preventDefault(),null===(t=p.current)||void 0===t||t.moveUp()):"ArrowDown"===e.key?(e.preventDefault(),null===(r=p.current)||void 0===r||r.moveDown()):"Enter"===e.key&&(e.preventDefault(),null===(n=p.current)||void 0===n||n.select())},onChange:e=>{h({ask:!1,query:e.target.value,global:d.global})},className:(0,f.t)("text-dark","placeholder:text-dark/7","flex","resize-none","w-full","h-12","p-2","focus:outline-none","bg-transparent","whitespace-pre-line","dark:text-light","dark:placeholder:text-light/7"),placeholder:(0,u.Ff)(x,i?"search_ask_input_placeholder":"search_input_placeholder"),spellCheck:"false",autoComplete:"off",autoCorrect:"off"})})]}),d.ask&&i?null:(0,n.jsx)(T,{ref:p,pointer:t,spaceId:r,revisionId:l,global:c&&d.global,query:d.query,withAsk:i,onSwitchToAsk:()=>{h({ask:!0,query:d.query,global:d.global})},children:c&&d.query?(0,n.jsx)(U,{spaceTitle:s}):null}),d.query&&d.ask&&i?(0,n.jsx)(w,{spaceId:r,query:d.query}):null]})}},66353:function(e,t,r){"use strict";r.d(t,{R:function(){return i},q:function(){return o}});var n=r(15799),a=r(7653);let l={q:n.Oi,ask:n.AE,global:n.AE},s={history:"replace"};function i(){let[e,t]=(0,n.XI)(l,s),r=a.useMemo(()=>null===e||null===e.q?null:{query:e.q,ask:!!e.ask,global:!!e.global},[e]),i=a.useRef(r);return a.useLayoutEffect(()=>{i.current=r},[r]),[r,a.useCallback(e=>("function"==typeof e&&(e=e(i.current)),null===e)?t({q:null,ask:null,global:null}):t({q:e.query,ask:!!e.ask||null,global:!!e.global||null}),[t])]}function o(){let[,e]=i();return a.useCallback(t=>{var r;let n=new URLSearchParams;return n.set("q",null!==(r=t.query)&&void 0!==r?r:""),t.ask?n.set("ask","on"):n.delete("ask"),t.global?n.set("global","on"):n.delete("global"),{href:"?"+n.toString(),prefetch:!1,onClick:r=>{r.preventDefault(),e(e=>({query:"",ask:!1,global:!1,...null!=e?e:{},...t}))}}},[e])}},87948:function(e,t,r){"use strict";r.r(t),r.d(t,{SiteSectionTabs:function(){return i}});var n=r(27573),a=(r(42172),r(7653)),l=r(33298),s=r(53902);function i(e){var t,r;let{list:s,section:i,index:c}=e,d=s.map(e=>{var t;return{id:e.id,label:e.title,path:null!==(t=e.urls.published)&&void 0!==t?t:""}}),u=a.useRef(null),f=a.useRef(null),[h,m]=a.useState(null),x=a.useCallback(()=>{if(u.current&&f.current){let e=u.current.getBoundingClientRect(),t=f.current.getBoundingClientRect();m({left:e.left-t.left,width:e.width})}},[]);a.useEffect(()=>{x()},[c,x]),a.useLayoutEffect(()=>{window.addEventListener("load",x),window.addEventListener("resize",x)},[x]);let p=(null!==(t=null==h?void 0:h.width)&&void 0!==t?t:0)*.01,g="".concat(null!==(r=null==h?void 0:h.left)&&void 0!==r?r:0,"px");return d.length>0?(0,n.jsxs)("nav",{"aria-label":"Sections",ref:f,className:"flex flex-nowrap items-center max-w-screen mb-px",style:{"--tab-opacity":"".concat(h?1:0),"--tab-scale":"".concat(p),"--tab-start":"".concat(g)},children:[(0,n.jsx)("div",{className:(0,l.t)("relative","flex","gap-2","bg-transparent","after:block","after:content-['']","after:origin-left","after:absolute","after:-bottom-px","after:left-0","after:opacity-[--tab-opacity]","after:scale-x-[--tab-scale]","after:[transition:_opacity_150ms_25ms,transform_150ms]","after:motion-reduce:transition-none","after:translate-x-[var(--tab-start)]","after:will-change-transform","after:h-0.5","after:w-[100px]","after:bg-primary","dark:after:bg-primary-400"),role:"tablist",children:d.map((e,t)=>(0,n.jsx)(o,{active:c===t,label:e.label,href:e.path,ref:c===t?u:null},t+e.path))}),null]}):null}let o=a.forwardRef(function(e,t){let{active:r,href:a,label:i}=e;return(0,n.jsx)(s.rU,{className:(0,l.t)("px-3 py-1 my-2 rounded straight-corners:rounded-none transition-colors",r&&"text-primary dark:text-primary-400",!r&&"text-dark/8 hover:bg-dark/1 hover:text-dark/9 dark:text-light/8 dark:hover:bg-light/2 dark:hover:text-light/9"),role:"tab",href:a,children:(0,n.jsx)("span",{ref:t,className:(0,l.t)("inline-flex w-full truncate"),children:i})})})},19656:function(e,t,r){"use strict";r.d(t,{L:function(){return o},TOCScrollContainer:function(){return i}});var n=r(27573),a=r(7653),l=r(33298);let s=a.createContext(null);function i(e){let{children:t,className:r}=e,i=a.createRef();return(0,n.jsx)(s.Provider,{value:i,children:(0,n.jsx)("div",{ref:i,className:(0,l.t)(r),children:t})})}function o(e){let{isActive:t,linkRef:r}=e,n=function(){let e=a.useContext(s);if(!e)throw Error("Context `TOCScrollContainerRefContext` must be used within Provider");return e}(),l=a.useRef(!1);a.useLayoutEffect(()=>{if(!t){l.current=!1;return}if(l.current)return;let e=r.current,a=n.current;e&&a&&function(e,t){let r=e.offsetTop,n=t.scrollTop,a=n+t.clientHeight;return r<n+200||r>a-200}(e,a)&&(null==a||a.scrollTo({top:e.offsetTop-200}),l.current=!0)},[t,r,n])}},66185:function(e,t,r){"use strict";r.d(t,{ToggleableLinkItem:function(){return g}});var n=r(27573),a=r(42172),l=r(11349),s=r(74489),i=r(72354),o=r(81695),c=r(7653),d=r(33298),u=r(19656),f=r(54533),h=r(53902);let m={opacity:1,height:"auto",display:"block"},x={opacity:0,height:0,transitionEnd:{display:"none"}},p=(0,l.E)(.02,{ease:e=>Math.pow(e,2)});function g(e){var t;let{href:r,children:l,descendants:g,pathname:b}=e,k=decodeURIComponent(null!==(t=(0,o.useSelectedLayoutSegment)())&&void 0!==t?t:""),v=k===b,y=!!g,w=y&&(v||k.startsWith(b+"/")),[j,_]=(0,s.H)(),[N,C]=c.useState(w),E=(0,f.tm)();c.useEffect(()=>{y&&C(e=>e||w)},[w,y]),c.useEffect(()=>{if(E&&y)try{_(j.current,N?m:x,{duration:.1});let e="& > ul > li";N?_(e,{opacity:1},{delay:p}):_(e,{opacity:0})}catch(e){console.error(e)}},[N,E,y,_,j]);let q=c.createRef();return(0,u.L)({linkRef:q,isActive:v}),(0,n.jsxs)("div",{children:[(0,n.jsxs)(h.rU,{ref:q,href:r,...v?{"aria-current":"page"}:{},className:(0,d.t)("group/toclink","flex","flex-row","justify-between","pl-5","pr-1.5","py-1.5","text-sm","transition-colors","relative","text-balance","before:border-l","before:absolute","before:left-[-1px]","before:top-0","before:h-full","rounded-md","straight-corners:rounded-none","[&+div_a]:rounded-l-none",v?["before:border-primary-500","font-semibold","text-primary","hover:bg-primary/3","dark:before:border-primary-400","dark:text-primary-400","hover:before:border-primary","dark:hover:bg-primary-500/3","dark:hover:before:border-primary"]:["before:border-transparent","font-normal","text-dark/8","hover:bg-dark/1","hover:text-dark/9","hover:before:border-dark/3","dark:text-light/8","dark:hover:bg-light/2","dark:hover:before:border-light/3","dark:hover:text-light/9"]),children:[l,y?(0,n.jsx)("span",{className:(0,d.t)("group","relative","rounded-full","straight-corners:rounded-sm","w-5","h-5","after:grid-area-1-1","after:absolute","after:-top-1","after:grid","after:-left-1","after:w-7","after:h-7","hover:bg-dark/2","hover:text-current","dark:hover:bg-light/2","dark:hover:text-current",v?["hover:bg-primary/4","dark:hover:bg-primary/4"]:[]),onClick:e=>{e.preventDefault(),e.stopPropagation(),C(e=>!e)},children:(0,n.jsx)(a.JO,{icon:"chevron-right",className:(0,d.t)("grid","flex-shrink-0","size-3","m-1","transition-[opacity]","text-current","transition-transform","[opacity:0.40]","group-hover:[opacity:1]",N?["rotate-90"]:["rotate-0"])})}):null]}),y?(0,n.jsx)(i.E.div,{ref:j,className:(0,d.t)(N?null:"[&_ul>li]:opacity-1"),initial:N?m:x,children:g}):null]})}},42663:function(e,t,r){"use strict";r.r(t),r.d(t,{ThemeToggler:function(){return c}});var n=r(27573),a=r(42172),l=r(54689),s=r(7653),i=r(63530),o=r(33298);function c(e){let t=(0,i.ZK)(),[r,a]=s.useState(!1),{theme:c,setTheme:u}=(0,l.F)();s.useEffect(()=>{a(!0)},[]);let f=e=>{u(e)};return(0,n.jsxs)("div",{role:"radiogroup",className:(0,o.t)("flex","flex-row","rounded-full","straight-corners:rounded-sm","border","border-dark/3","dark:border-light/2"),children:[(0,n.jsx)(d,{active:r&&"light"===c,icon:"sun-bright",onClick:()=>f("light"),title:(0,i.Ff)(t,"switch_to_light_theme")}),(0,n.jsx)(d,{active:r&&"system"===c,icon:"desktop",onClick:()=>f("system"),title:(0,i.Ff)(t,"switch_to_system_theme")}),(0,n.jsx)(d,{active:r&&"dark"===c,icon:"moon",onClick:()=>f("dark"),title:(0,i.Ff)(t,"switch_to_dark_theme")})]})}function d(e){let{icon:t,onClick:r,title:l,active:s}=e;return(0,n.jsx)("button",{type:"button",role:"radio",onClick:r,"aria-label":l,"aria-checked":s,className:(0,o.t)("p-1","m-1","group","rounded-full","straight-corners:rounded-sm",s?["bg-primary-600/4","dark:bg-primary-400/2"]:null,"text-dark","dark:text-light/7"),children:(0,n.jsx)(a.JO,{icon:t,className:(0,o.t)("size-4",s?["text-primary-600","dark:text-primary-400"]:null)})})}},76384:function(e,t,r){"use strict";r.d(t,{Bi:function(){return u},GQ:function(){return d},OP:function(){return o}});var n=r(26066),a=r(74859);let l="__gitbook_cookie_granted",s=null,i=null;async function o(){return s||(i||(i=c().finally(()=>{i=null})),s=await i),s}async function c(){if(u())return f();let e=n.Z.get("__session");if(e)return e;{var t;let e=f(),r=new URL(null!==(t=a.env.NEXT_PUBLIC_GITBOOK_APP_URL)&&void 0!==t?t:"https://app.gitbook.com");r.pathname="/__session",r.searchParams.set("proposed",e);try{let e=await fetch(r,{method:"GET",credentials:"include",cache:"no-cache",mode:"cors"}),{deviceId:t}=await e.json();return t}catch(t){return console.error("Failed to fetch visitor session ID",t),e}}}function d(e){n.Z.set(l,e?"yes":"no",{expires:365,sameSite:"none",secure:!0})}function u(){let e=n.Z.get(l);return"yes"!==e&&("no"===e||void 0)}function f(){return"undefined"!=typeof crypto&&crypto.randomUUID?"".concat(crypto.randomUUID(),"R"):"".concat(Math.random().toString(36).substring(2),"R")}},60311:function(e){e.exports={containerHeaderlinks:"headerLinks_containerHeaderlinks__GUgiv",linkEllipsis:"headerLinks_linkEllipsis__Z01IN"}}},function(e){e.O(0,[3056,404,2634,7609,1281,9505,1538,1285,3902,1293,9978,1744],function(){return e(e.s=89136)}),_N_E=e.O()}]);
//# sourceMappingURL=layout-2feaa765229e313b.js.map