(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3998],{153:function(e,t,l){Promise.resolve().then(l.bind(l,91973)),Promise.resolve().then(l.bind(l,69173))},69173:function(e,t,l){"use strict";l.d(t,{DocsSideNavLayout:function(){return _}});var n=l(92253),r=l(292),s=l(81724),o=l(78866),a=l(41322),i=l(61855),c=l(3119),x=l(62946),d=l(78724),u=l(9254),h=l(2023),m=l(34711);let f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,l=[],n=(e,t,l,n)=>{let r=e.find(e=>e.title===t);return r||(r={title:t,children:[],depth:0,status:n},l&&(r.slug=l),e.push(r)),r},r=e=>e.split("-").map(e=>e).join(" ");for(let s of e.sort((e,t)=>e._id.localeCompare(t._id))){let e=null;for(let o=t;o<s.pathSegments.length;o++){let t=s.pathSegments[o],a=o===s.pathSegments.length-1?s.slug:null,i=o===s.pathSegments.length-1?s.navTitle||s.title:r(t.pathName),c=o===s.pathSegments.length-1?s.status:"ga";(e=n(e?e.children:l,i,a,c)).depth=o}}return l};var p=l(17972),b=l(52730),g=l(34666),j=l(89859),v=l(34969),C=l(56303);let S=e=>{let{href:t,isActive:l,title:r,onClose:s,status:a,...i}=e;return(0,n.jsxs)(v.rU,{href:t,color:l?"textPrimary":"textSubtle",fontWeight:l?"bold":"medium",borderLeft:"solid 2px",borderColor:l?"primary":"transparent",bg:l?"contrastLowest":"transparent",fontSize:"sm",py:1,_hover:{bg:"contrastLowest"},display:"flex",justifyContent:"space-between",gap:2,px:2,ml:-2,onClick:()=>s(),...i,children:[r,(0,n.jsx)(o.xu,{children:(0,n.jsx)(C.W,{status:a,variant:"compact"})})]})},w=e=>{let{node:t,onClose:l,routePrefix:r}=e,a=(0,g.usePathname)(),c=e=>{if(a==="".concat(r,"/").concat(e.slug))return!0;for(let t of e.children)if(c(t))return!0;return!1},x=e=>!(e.depth<2||c(e)||e.children.some(e=>c(e))||e.children.length>0&&e.children.some(e=>!x(e))),d=c(t),u=x(t),[h,m]=(0,j.useState)(u);return(0,n.jsxs)(o.xu,{pl:4,h:"full",children:[t.children.length>0?(0,n.jsxs)(s.k,{as:"button",alignItems:"center",w:"full",borderRadius:"md",onClick:()=>{m(!h)},gap:2,justifyContent:"space-between",mt:t.depth>1?1:4,mb:2,children:[(0,n.jsx)(p.x,{fontWeight:"semibold",fontSize:"sm",children:t.title}),(0,n.jsx)(i.J,{as:h&&u?b.bLX:b.ZwC,boxSize:3})]}):(0,n.jsx)(S,{href:"".concat(r,"/").concat(t.slug),isActive:d,onClose:()=>l(),title:t.title,status:t.status}),!h&&(0,n.jsx)(o.xu,{children:t.children.map(e=>(0,n.jsx)(o.xu,{children:(0,n.jsx)(w,{node:e,onClose:l,routePrefix:r})},e.title))})]})},k=e=>{let{tree:t,onClose:l,routePrefix:r="",...s}=e;return(0,n.jsx)(o.xu,{ml:-4,mt:-4,...s,children:t.map(e=>(0,n.jsx)(w,{node:e,onClose:l,routePrefix:r},e.title))})};var y=l(87667),z=l(18726);let P=e=>{let{apiNav:t,onClose:l,...r}=e,s=(0,g.usePathname)(),a=(0,y.LC)(),i="".concat(s).concat(a);return(0,n.jsx)(o.xu,{...r,children:t.map(e=>(0,n.jsxs)(o.xu,{children:[(0,n.jsx)(p.x,{fontWeight:"semibold",fontSize:"sm",mb:1,children:e.label}),e.items.map(e=>{let t="/docs".concat(e.href),r=i===t;return(0,n.jsxs)(v.rU,{href:t,fontSize:"sm",color:r?"text":"textSubtle",fontWeight:r?"bold":"normal",bg:r?"contrastMedium":"transparent",borderRadius:"sm",py:1.5,px:2,ml:1,noOfLines:1,display:"flex",alignItems:"center",gap:1,onClick:()=>l(),_hover:{color:"text",textDecoration:"none",bg:"contrastLow"},children:[(0,n.jsx)(o.xu,{flexGrow:1,children:(0,n.jsx)(p.x,{noOfLines:1,children:e.label})}),e.badge&&(0,n.jsx)(z.C,{variant:"subtle",fontSize:"xx-small",py:0,px:1,minW:12,textAlign:"center",colorScheme:e.badge.backgroundColor,sx:{textDecoration:"none !important"},children:e.badge.label})]},e.href+e.label)})]},e.label))})},_=e=>{let{children:t,apiNav:l,allDocs:p}=e,b=(0,g.usePathname)(),v=f(p.filter(e=>e.frontmatter.published).map(e=>({title:e.frontmatter.title,navTitle:e.frontmatter.navTitle,_id:e.urlPath,pathSegments:e.pathSegments,slug:e.frontmatter.slug,status:e.frontmatter.status}))),C=null==b?void 0:b.split("/").includes("api-reference"),[S,w]=(0,j.useState)(C?1:0),{isOpen:z,onToggle:_,onClose:W}=(0,r.q)();return(0,y.tk)(z),(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(s.k,{gap:"/docs"===b?0:12,w:"full",justifyContent:"space-between",flexDir:{base:"column",lg:"row"},minH:"calc(100vh - 64px)",pos:"relative",zIndex:2,borderTop:"solid 1px",borderColor:"stroke",children:[(0,n.jsxs)(o.xu,{maxW:{base:"full",lg:300},minW:{base:"full",lg:300},w:"full",pos:{base:"fixed",lg:"sticky"},alignSelf:"flex-start",top:"65px",pb:8,borderRight:"solid 1px",borderColor:"stroke",h:{base:z?"calc(100vh - 64px)":"40px",lg:"calc(100vh - 64px)"},bg:"bg",zIndex:5,borderBottom:{base:"solid 1px",lg:"none"},borderBottomColor:"stroke",children:[(0,n.jsx)(a.z,{onClick:_,display:{base:"block",lg:"none"},leftIcon:(0,n.jsx)(i.J,{as:z?m.di3:m.tR9,boxSize:4}),fontSize:"lg",boxShadow:"xl",variant:"link",h:"40px",borderRadius:0,w:"full",textAlign:"left",px:4,children:"Docs menu"}),(0,n.jsx)(o.xu,{display:{base:z?"block":"none",lg:"block"},children:(0,n.jsxs)(c.m,{className:"tabs",maxH:"full",index:S,onChange:w,size:"sm",mt:2,children:[(0,n.jsxs)(x.t,{pl:4,children:[(0,n.jsx)(d.O,{children:"Guides"}),(0,n.jsx)(d.O,{children:"REST API"})]}),(0,n.jsxs)(u.n,{maxH:{base:"calc(100vh - 144px)",lg:"calc(100vh - 104px)"},overflowY:"auto",children:[(0,n.jsx)(h.x,{children:(0,n.jsx)(k,{tree:v,maxW:{base:"full",lg:300},w:"full",overflowY:"auto",onClose:W,routePrefix:"/docs"})}),(0,n.jsx)(h.x,{children:(0,n.jsx)(P,{apiNav:l,maxW:{base:"full",lg:300},w:"full",overflowY:"auto",onClose:W})})]})]})})]}),t]})})}}},function(e){e.O(0,[6776,5287,3952,5162,2750,3103,4771,9001,4540,576,8762,3922,3936,1679,5051,5711,288,8223,6678,1955,1412,132,4840,4367,5661,3514,1732,6918,4279,8414,5554,153,1744],function(){return e(e.s=153)}),_N_E=e.O()}]);