1 line
16 KiB
JavaScript
1 line
16 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4127],{3017:()=>{},4436:()=>{},4788:(e,t,r)=>{"use strict";r.d(t,{K:()=>o,SpaceLayoutContextProvider:()=>n});var i=r(54568),l=r(7620);let s=l.createContext({basePath:""});function n(e){let{basePath:t,children:r}=e,n=l.useMemo(()=>({basePath:t}),[t]);return(0,i.jsx)(s.Provider,{value:n,children:r})}function o(){let e=l.useContext(s);if(!e)throw Error("SpaceLayoutContext not found");return e.basePath}},10083:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PageFeedbackForm:()=>u});var i=r(54568),l=r(5772),s=r(7620),n=r(88118),o=r(96021),a=r(98743),c=r(24578),d=r(54217);function u(e){let{className:t}=e,r=(0,n.ok)(),u=(0,c.jt)(),m=s.useRef(null),[g,p]=s.useState(),[f,v]=s.useState(""),[x,b]=s.useState(!1),w=e=>{p(e),u({type:"page_post_feedback",feedback:{rating:e}})},C=(e,t)=>{b(!0),u({type:"page_post_feedback_comment",feedback:{rating:e,comment:t}})};return s.useEffect(()=>{if(g){var e;null==(e=m.current)||e.focus()}},[g]),(0,i.jsxs)("div",{className:(0,a.P)("flex flex-col gap-3 text-sm",t),children:[(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,i.jsx)("p",{children:(0,o.t)(r,"was_this_helpful")}),(0,i.jsx)("div",{className:"rounded-full border border-tint-subtle bg-tint-base contrast-more:border-tint-12",children:(0,i.jsxs)("div",{className:"flex",children:[(0,i.jsx)(h,{rating:l.op.Good,label:(0,o.s)(r,"was_this_helpful_positive"),onClick:()=>w(l.op.Good),active:g===l.op.Good,disabled:void 0!==g}),(0,i.jsx)(h,{rating:l.op.Ok,label:(0,o.s)(r,"was_this_helpful_neutral"),onClick:()=>w(l.op.Ok),active:g===l.op.Ok,disabled:void 0!==g}),(0,i.jsx)(h,{rating:l.op.Bad,label:(0,o.s)(r,"was_this_helpful_negative"),onClick:()=>w(l.op.Bad),active:g===l.op.Bad,disabled:void 0!==g})]})})]}),g?(0,i.jsx)("div",{className:"flex flex-col gap-2",children:x?(0,i.jsx)("p",{children:(0,o.t)(r,"was_this_helpful_thank_you")}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("textarea",{ref:m,name:"comment",className:"max-h-40 min-h-16 grow rounded straight-corners:rounded-none bg-tint-base p-2 ring-1 ring-tint ring-inset placeholder:text-sm placeholder:text-tint contrast-more:ring-tint-12 contrast-more:placeholder:text-tint-strong",placeholder:(0,o.s)(r,"was_this_helpful_comment"),"aria-label":(0,o.s)(r,"was_this_helpful_comment"),onChange:e=>v(e.target.value),value:f,rows:3,maxLength:512}),(0,i.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,i.jsx)(d.$n,{size:"small",onClick:()=>C(g,f),label:(0,o.s)(r,"submit")}),f.length>409.6?(0,i.jsxs)("span",{className:512===f.length?"text-red-500":"",children:[f.length," / ",512]}):null]})]})}):null]})}function h(e){var t;let{rating:r,label:l,onClick:s,active:n,...o}=e,c=null!=(t=({bad:(0,i.jsx)(m,{}),ok:(0,i.jsx)(g,{}),good:(0,i.jsx)(p,{})})[r])?t:null;return(0,i.jsx)("button",{className:(0,a.P)("p-2 first:rounded-l-full first:pl-2.5 last:rounded-r-full last:pr-2.5 hover:bg-primary-hover hover:text-primary-strong","disabled:cursor-not-allowed disabled:hover:bg-inherit disabled:hover:text-inherit disabled:dark:hover:text-inherit","ring-tint contrast-more:hover:ring-1",n?"bg-primary-active text-primary-strong disabled:hover:bg-primary-active disabled:hover:text-primary-strong contrast-more:ring-2 contrast-more:hover:ring-2":"disabled:opacity-7 disabled:contrast-more:ring-0"),type:"button",...o,"aria-label":l,title:l,onClick:s,children:c})}let m=()=>(0,i.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("circle",{cx:"9",cy:"9",r:"9",fill:"currentColor",fillOpacity:"0.2"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 8.25C4.58579 8.25 4.25 7.91421 4.25 7.5V6C4.25 5.58579 4.58579 5.25 5 5.25C5.41421 5.25 5.75 5.58579 5.75 6V7.5C5.75 7.91421 5.41421 8.25 5 8.25ZM4.66782 13.3737C4.87421 13.5572 5.19025 13.5386 5.3737 13.3322C7.30371 11.1609 10.6963 11.1609 12.6263 13.3322C12.8098 13.5386 13.1258 13.5572 13.3322 13.3737C13.5386 13.1902 13.5572 12.8742 13.3737 12.6678C11.0459 10.049 6.9541 10.049 4.6263 12.6678C4.44284 12.8742 4.46143 13.1902 4.66782 13.3737ZM12.25 7.5C12.25 7.91421 12.5858 8.25 13 8.25C13.4142 8.25 13.75 7.91421 13.75 7.5V6C13.75 5.58579 13.4142 5.25 13 5.25C12.5858 5.25 12.25 5.58579 12.25 6V7.5Z",fill:"currentColor"})]}),g=()=>(0,i.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("circle",{cx:"9",cy:"9",r:"9",fill:"currentColor",fillOpacity:"0.2"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 8.25C4.58579 8.25 4.25 7.91421 4.25 7.5V6C4.25 5.58579 4.58579 5.25 5 5.25C5.41421 5.25 5.75 5.58579 5.75 6V7.5C5.75 7.91421 5.41421 8.25 5 8.25ZM4.5 12C4.5 11.7239 4.72386 11.5 5 11.5H13C13.2761 11.5 13.5 11.7239 13.5 12C13.5 12.2761 13.2761 12.5 13 12.5H5C4.72386 12.5 4.5 12.2761 4.5 12ZM12.25 7.5C12.25 7.91421 12.5858 8.25 13 8.25C13.4142 8.25 13.75 7.91421 13.75 7.5V6C13.75 5.58579 13.4142 5.25 13 5.25C12.5858 5.25 12.25 5.58579 12.25 6V7.5Z",fill:"currentColor"})]}),p=()=>(0,i.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("circle",{cx:"9",cy:"9",r:"9",fill:"currentColor",fillOpacity:"0.2"}),(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 8.25C4.58579 8.25 4.25 7.91421 4.25 7.5V6C4.25 5.58579 4.58579 5.25 5 5.25C5.41421 5.25 5.75 5.58579 5.75 6V7.5C5.75 7.91421 5.41421 8.25 5 8.25ZM4.66782 11.6263C4.87421 11.4428 5.19025 11.4614 5.3737 11.6678C7.30371 13.8391 10.6963 13.8391 12.6263 11.6678C12.8098 11.4614 13.1258 11.4428 13.3322 11.6263C13.5386 11.8098 13.5572 12.1258 13.3737 12.3322C11.0459 14.951 6.9541 14.951 4.6263 12.3322C4.44284 12.1258 4.46143 11.8098 4.66782 11.6263ZM12.25 7.5C12.25 7.91421 12.5858 8.25 13 8.25C13.4142 8.25 13.75 7.91421 13.75 7.5V6C13.75 5.58579 13.4142 5.25 13 5.25C12.5858 5.25 12.25 5.58579 12.25 6V7.5Z",fill:"currentColor"})]})},17694:e=>{e.exports={tableWrapper:"table_tableWrapper__zr7LC","detect-scroll":"table_detect-scroll__IZtP9",columnHeader:"table_columnHeader__PGmsy",row:"table_row__LpfCG",rowGroup:"table_rowGroup__IKtSP",cell:"table_cell__X_gFM"}},21860:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Ad:()=>m});var i=r(54568),l=r(5772),s=r(7620),n=r(88118),o=r(98743),a=r(24578);let c="undefined"!=typeof IntersectionObserver;var d=r(54217),u=r(25316);let h=(0,u.createServerReference)("406019637174341b63e728076d51e2aa70dc487628",u.callServer,void 0,u.findSourceMapURL,"renderAd");function m(e){let{zoneId:t,spaceId:r,placement:n,ignore:d,siteAdsStatus:u,style:m,mode:p="auto"}=e,f=s.useRef(null),[v,x]=s.useState(void 0),b=(0,a.jt)();s.useEffect(()=>{(null==v?void 0:v.insightsAd)&&b({type:"ad_display",ad:v.insightsAd})},[v,b]);let w=function(e,t){let[r,i]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{if(!c)return void i(!0);if(!e.current)return;let r=new IntersectionObserver(e=>{let[t]=e;t.isIntersecting&&(i(!0),r.disconnect())},{root:null==t?void 0:t.root,rootMargin:null==t?void 0:t.rootMargin,threshold:null==t?void 0:t.threshold});return r.observe(e.current),()=>r.disconnect()},[e,null==t?void 0:t.root,null==t?void 0:t.rootMargin,null==t?void 0:t.threshold]),r}(f,{threshold:.1});return s.useEffect(()=>{if(!w)return;let e=!1,r=new URL(window.location.href).searchParams.get("ads_preview"),i=!!r,s=i?"CVAIKKQM":t,o="placeholder"===r||u&&(u===l.ck.Pending||u===l.ck.InReview);if(s||o)return(async()=>{let t=o?await h({source:"placeholder"}):s?await h({placement:n,ignore:d||i,zoneId:s,mode:p,source:"live"}):void 0;!e&&t&&x(t)})(),()=>{e=!0}},[w,t,d,n,p,u]),(0,i.jsx)("div",{ref:f,className:(0,o.P)(m),"data-visual-test":"removed",children:v?(0,i.jsxs)(i.Fragment,{children:[v.children,(0,i.jsx)(g,{spaceId:r})]}):null})}function g(e){let{spaceId:t}=e,r=(0,n.ok)(),s=new URL("https://www.gitbook.com");return s.searchParams.set("utm_source","content"),s.searchParams.set("utm_medium","sponsored-by-gitbook"),s.searchParams.set("utm_campaign",t),(0,i.jsx)("p",{className:(0,o.P)("mt-2","mr-2","text-xs","text-right","text-tint-subtle"),children:(0,i.jsx)(d.N_,{target:"_blank",href:s.toString(),className:(0,o.P)("hover:underline"),insights:{type:"trademark_click",placement:l.H9.Ad},children:(0,n.t)(r,"sponsored_via_gitbook")})})}},27851:(e,t,r)=>{"use strict";r.d(t,{PageClientLayout:()=>n});var i=r(62942),l=r(7620),s=r(62574);function n(e){return(0,s.eb)({scrollMarginTop:e.withSections?48:void 0}),function(){let e=(0,i.useRouter)(),t=(0,i.usePathname)(),r=(0,i.useSearchParams)();l.useEffect(()=>{if(null==r?void 0:r.has("fallback")){var i;let l=new URLSearchParams(r.toString());l.delete("fallback"),e.push("".concat(t,"?").concat(l.toString()).concat(null!=(i=window.location.hash)?i:""))}},[e,t,r])}(),null}},29751:()=>{},30711:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ThemeToggler:()=>c});var i=r(54568),l=r(86424),s=r(21752),n=r(7620),o=r(88118),a=r(98743);function c(){let e=(0,o.ok)(),[t,r]=n.useState(!1),{theme:l,setTheme:a}=(0,s.D)();n.useEffect(()=>{r(!0)},[]);let c=e=>{a(e)};return(0,i.jsxs)("div",{role:"radiogroup",className:"flex flex-row gap-2",children:[(0,i.jsx)(d,{active:t&&"light"===l,icon:"sun-bright",onClick:()=>c("light"),title:(0,o.si)(e,"switch_to_light_theme")}),(0,i.jsx)(d,{active:t&&"system"===l,icon:"desktop",onClick:()=>c("system"),title:(0,o.si)(e,"switch_to_system_theme")}),(0,i.jsx)(d,{active:t&&"dark"===l,icon:"moon",onClick:()=>c("dark"),title:(0,o.si)(e,"switch_to_dark_theme")})]})}function d(e){let{icon:t,onClick:r,title:s,active:n}=e;return(0,i.jsx)("button",{type:"button",role:"radio",onClick:r,"aria-label":s,title:s,"aria-checked":n,className:(0,a.P)("p-2","rounded","straight-corners:rounded-none","circular-corners:rounded-full","transition-all","text-tint","contrast-more:text-tint-strong","hover:bg-tint-hover","contrast-more:hover:ring-2","contrast-more:focus:ring-2","ring-tint",n&&["bg-primary","theme-muted:bg-primary-hover","[html.sidebar-filled.theme-bold.tint_&]:bg-primary-hover","hover:bg-primary","text-primary-strong","contrast-more:text-primary-strong","contrast-more:ring-1","ring-primary"]),children:(0,i.jsx)(l.In,{icon:t,className:(0,a.P)("size-4")})})}},32292:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SitePageNotFound:()=>u});var i=r(54568),l=r(24578),s=r(88118),n=r(98743),o=r(62942),a=r(7620),c=r(4788),d=r(62574);function u(){let e=(0,c.K)(),t=(0,s.ok)(),r=(0,o.useRouter)(),u=(0,o.useSearchParams)(),h=null==u?void 0:u.get("fallback");return(0,a.useEffect)(()=>{h&&r.replace(e)},[e,h,r]),(0,i.jsx)(d.G8,{page:null,children:(0,i.jsxs)("div",{className:(0,n.P)("flex-1","flex","flex-row","items-center","justify-center","py-9","min-h-[calc(100vh-64px)] lg:min-h-fit"),children:[(0,i.jsxs)("div",{className:(0,n.P)("max-w-80"),children:[(0,i.jsx)("h2",{className:(0,n.P)("text-2xl","font-semibold","mb-2"),children:(0,s.t)(t,"notfound_title")}),(0,i.jsx)("p",{className:(0,n.P)("text-base","mb-4"),children:(0,s.t)(t,"notfound")})]}),(0,i.jsx)(l.ax,{})]})})}},36143:()=>{},36329:(e,t,r)=>{"use strict";r.d(t,{ScrollSectionsList:()=>g});var i=r(54568),l=r(28427),s=r(7620),n=r(62574),o=r(98743),a=r(54217),c=r(90526),d=r(92360),u=r(47047);function h(e){let{transition:t,className:r}=e,n=function(){u.r.current||(0,d.U)();let[e]=(0,s.useState)(u.O.current);return e}();return(0,i.jsx)(l.P.div,{layout:!0,layoutId:"sections-line",className:(0,o.P)(["border-primary-9","tint:border-primary-11","sidebar-list-line:border-l-2","inset-0","pointer-events-none","absolute","z-0","sidebar-list-line:-left-px","rounded-md","straight-corners:rounded-none","circular-corners:rounded-2xl","sidebar-list-line:rounded-l-none","sidebar-list-pill:bg-primary","[html.theme-muted.sidebar-list-pill_&]:bg-primary-hover","[html.theme-gradient.sidebar-list-pill_&]:bg-primary-active","contrast-more:border","contrast-more:bg-primary",r]),transition:n?{duration:0}:t})}let m={type:"spring",stiffness:700,damping:50,mass:.8};function g(e){let{sections:t}=e,r=s.useMemo(()=>t.map(e=>e.id),[t]),d=(0,a.rz)(),u=(0,n.W1)(r,{rootMargin:"-".concat(c.vV,"px 0px -40% 0px"),threshold:.9,enabled:d});return(0,i.jsx)("ul",{className:(0,o.P)("sidebar-list-line:border-l","border-tint-subtle"),children:t.map(e=>(0,i.jsxs)(l.P.li,{className:(0,o.P)("flex","flex-row","relative","h-fit","mt-2",e.depth>1&&["ml-3","my-0","sidebar-list-line:ml-0"]),children:[u===e.id?(0,i.jsx)(h,{transition:m,className:(0,o.P)("sidebar-list-default:hidden",(null==e?void 0:e.depth)>1?["sidebar-list-default:rounded-l-none","sidebar-list-line:rounded-l-none"]:["sidebar-list-default:ml-3","contrast-more:sidebar-list-default:ml-0"])}):null,(0,i.jsxs)("a",{href:"#".concat(e.id),className:(0,o.P)("relative","z-10","text-sm","w-full","py-1","px-3","transition-all","duration-200","rounded-md","straight-corners:rounded-none","circular-corners:rounded-2xl","sidebar-list-line:rounded-l-none","hover:bg-tint-hover","theme-gradient:hover:bg-tint-12/1","hover:text-tint-strong","contrast-more:hover:ring-1","contrast-more:hover:ring-inset","contrast-more:hover:ring-current",e.depth>1&&["subitem","sidebar-list-line:pl-6","opacity-8","contrast-more:opacity-11","sidebar-list-default:rounded-l-none","sidebar-list-default:border-l","sidebar-list-default:border-tint"],u===e.id&&["text-primary-subtle","hover:text-primary","contrast-more:text-primary","contrast-more:hover:text-primary-strong","sidebar-list-line:ml-px","hover:bg-primary-hover","theme-muted:hover:bg-primary-active","[html.sidebar-filled.theme-bold.tint_&]:hover:bg-primary-active","theme-gradient:hover:bg-primary-active","tint:font-semibold","contrast-more:font-semibold","sidebar-list-default:border-tint"]),children:[e.tag?(0,i.jsx)("span",{className:"-mt-0.5 openapi-method !text-xs openapi-method-".concat(e.tag.toLowerCase()),children:e.tag}):null,(0,i.jsx)("span",{className:(0,o.P)(e.deprecated&&["line-through","opacity-50","contrast-more:opacity-60"]),children:e.title})]})]},e.id))})}},41341:(e,t,r)=>{"use strict";r.d(t,{PreservePageLayout:()=>l});var i=r(7620);function l(e){let{asFullWidth:t}=e;return i.useLayoutEffect(()=>{let e=document.querySelector("header");e&&(t?e.classList.add("site-full-width"):e.classList.remove("site-full-width"))},[t]),null}},64902:()=>{},75555:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PageContext:()=>s,PageContextProvider:()=>n,usePageContext:()=>o});var i=r(54568),l=r(7620);let s=l.createContext(null);function n(e){let{pageId:t,spaceId:r,title:n,children:o}=e,a=l.useMemo(()=>({pageId:t,spaceId:r,title:n}),[t,r,n]);return(0,i.jsx)(s.Provider,{value:a,children:o})}function o(){let e=l.useContext(s);if(!e)throw Error("usePageContext must be used within a PageContextProvider");return e}},90654:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});let i={src:"https://static-2v.gitbook.com/_next/static/media/default-page-cover.a2ccd7e9.svg",height:1081,width:1920,blurWidth:0,blurHeight:0}},99447:(e,t,r)=>{"use strict";r.d(t,{PageCoverImage:()=>c});var i=r(54568),l=r(98743),s=r(7620),n=r(60357);let o={width:1990,height:480};function a(e,t,r){if(!r.size||0===t)return"50%";let i=e.height&&e.width?Math.max(e.width/r.size.width,e.height/r.size.height):1,l=r.size?r.size.height*i:o.height,s=e.height&&r.size?(e.height-l)/2+t*i:t;return"".concat(s,"px")}function c(e){let{imgs:t,y:r}=e,c=(0,s.useRef)(null),d=(0,n.wY)({ref:c});return(0,i.jsxs)("div",{className:"h-full w-full overflow-hidden",ref:c,children:[(0,i.jsx)("img",{src:t.light.src,fetchPriority:"high",alt:"Page cover",className:(0,l.P)("w-full","object-cover",t.dark?"dark:hidden":""),style:{aspectRatio:"".concat(o.width,"/").concat(o.height),objectPosition:"50% ".concat(a(d,r,t.light))}}),t.dark&&(0,i.jsx)("img",{src:t.dark.src,fetchPriority:"low",alt:"Page cover",className:(0,l.P)("w-full","object-cover","dark:inline","hidden"),style:{aspectRatio:"".concat(o.width,"/").concat(o.height),objectPosition:"50% ".concat(a(d,r,t.dark))}})]})}}}]); |