1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2869],{12869:(e,t,n)=>{n.r(t),n.d(t,{__N_SSG:()=>Z,default:()=>$,getStaticPathsFn:()=>Q});var i=n(37876),l=n(96318),o=n(91553),r=n(63185),a=n(45465),d=n(12796),s=n(23425),c=n(67939),h=n(40946),u=n(14232),g=n(42132),p=n(63036);function x(e){var t,n,l;let{globalData:o,document:u}=e,x=(0,d.I)(u),f=(0,d.w)({entryId:null==x||null==(t=x.sys)?void 0:t.id}),v=[{label:(0,r.A)(o,"home"),href:"/"},{label:(0,r.A)(o,"library"),href:"/library"},{label:(0,r.A)(o,"blog"),href:"/blog"},{label:null==x?void 0:x.title,href:""}],w=null==x?void 0:x.updatedOnText,j=null==x?void 0:x.updatedOnDate,y=j?new Date(j).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}):"",{authorName:b,authorLink:C,authorProfileImage:A,hasAuthorProfile:k,hasExternalAuthorLink:S}=(0,h.J)(x,o),I=k&&C&&!S?s.zp:s.vV;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(s.fY,{children:(0,i.jsxs)(s.mc,{children:[(0,i.jsxs)(s.A5,{children:[(0,i.jsx)(a.A,{items:v}),(0,i.jsx)(s.oS,{children:j?(0,i.jsxs)(s.jK,{children:[w," ",(0,i.jsx)(s.N9,{children:y})]}):null})]}),(0,i.jsx)(s.sT,{...f({fieldId:"title"}),children:null==x?void 0:x.title}),(0,i.jsxs)(s.mG,{children:[(0,i.jsxs)(s.dj,{children:[(0,i.jsx)(c.b9,{}),(0,i.jsx)(m,{document:x})]}),null==x||null==(l=x.categoriesNewCollection)||null==(n=l.items)?void 0:n.map(e=>(null==e?void 0:e.slug)?(0,i.jsx)(g.kt,{redirects:o.redirects,href:(0,p.h)(e),children:(0,i.jsx)(s.iU,{backgroundColor:null==e?void 0:e.colorCode,children:null==e?void 0:e.name})},null==e?void 0:e.slug):null)]}),(0,i.jsx)(I,{href:C,target:S?"_blank":void 0,rel:S?"noopener noreferrer":void 0,children:(0,i.jsxs)(s.UM,{children:[(0,i.jsx)(s.h1,{image:A}),(0,i.jsx)(s.ts,{children:b})]})})]})})})}function m(e){let{document:t}=e,n=(0,u.useMemo)(()=>{var e,n,i;return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:225,n=e/4.7,i=n/t,l=Math.floor(i),o=Math.round((i-l)*60);return{minutes:l,seconds:o,totalCharacters:e,approximateWords:Math.round(n)}}(function e(t){return t.reduce((t,n)=>{let i=n.value?n.value.length:0;return n.content&&n.content.length>0&&(i+=e(n.content)),t+i},0)}(null!=(i=null==t||null==(n=t.text)||null==(e=n.json)?void 0:e.content)?i:[]))},[]);return(0,i.jsxs)(i.Fragment,{children:[null==n?void 0:n.minutes,"min"]})}var f=n(80427),v=n(36086);let w=f.Ay.div.withConfig({componentId:"sc-dd7d55f0-0"})(["width:100%;display:flex;align-items:center;gap:16px;height:24px;background:var(--coreCream);position:sticky;z-index:5;","{display:none;}"],v.m9.maxWidth.Sm),j=f.Ay.div.withConfig({componentId:"sc-dd7d55f0-1"})(["width:100%;height:6px;background:var(--neutral200);position:sticky;z-index:5;","{display:none;}"],v.m9.minWidth.Sm),y=f.Ay.div.withConfig({componentId:"sc-dd7d55f0-2"})(["height:100%;background:var(--accent500);"]),b=f.Ay.button.withConfig({componentId:"sc-dd7d55f0-3"})(["height:100%;div{height:4px;}cursor:pointer;&:hover{div{height:8px;}}"]),C=f.Ay.div.withConfig({componentId:"sc-dd7d55f0-4"})(["position:relative;cursor:pointer;height:4px;transition:height ease-in-out 0.2s;&:hover{height:8px;}"]),A=f.Ay.div.withConfig({componentId:"sc-dd7d55f0-5"})(["display:flex;align-items:center;justify-content:center;padding:8px 16px;background:var(--neutral500);color:var(--neutralWhite);font-size:14px;font-weight:600;line-height:18.2px;border-radius:100px;"]);var k=n(62862);function S(){let[e,t]=(0,u.useState)([]);return(0,u.useEffect)(()=>{function e(){if(!document.getElementById("blog-post-layout-outer-container"))return;let e=document.querySelectorAll("[data-content-group]"),n=0;e.forEach(e=>{n+=e.offsetHeight}),t(Array.from(e).map(e=>{var t;let i=e.offsetHeight,l=e.getBoundingClientRect(),o=i/n*100,r=0,a=l.top;a<=140&&(r=(1-Math.min(Math.max((i+a-140)/i,0),1))*100,l.bottom<=140&&(r=100));let d=e.querySelector("h2");return{id:e.getAttribute("data-content-group")||"",size:parseFloat(o.toFixed(2)),name:null!=(t=null==d?void 0:d.textContent)?t:"",progress:Math.min(Math.max(r,0),100)}}))}return e(),window.addEventListener("scroll",e),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[]),e}function I(e){var t,n,i;let l=window.document.querySelector('[data-content-group="'.concat(e.id,'"]')),o=window.document.querySelector('[data-tgo="main-navigation-outer-container"]'),r=null==o||null==(t=o.getBoundingClientRect())?void 0:t.bottom,a=(null!=(i=null==l||null==(n=l.getBoundingClientRect())?void 0:n.top)?i:0)+window.scrollY-(r?r+40:140);window.scrollTo({top:a,behavior:"smooth"})}function E(){let[e,t]=(0,u.useState)(0),n=function(){let[e,t]=(0,u.useState)(0);return(0,u.useEffect)(()=>{function e(){let e=document.getElementById("blog-post-layout-outer-container");if(!e)return;let n=e.getBoundingClientRect(),i=n.top,l=n.height;if(i>0)return void t(0);t(Math.min(Math.max(Math.abs(i)/(l-window.innerHeight)*100,0),100))}return e(),window.addEventListener("scroll",e),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[]),e}(),l=S();return(0,u.useEffect)(()=>{function e(){let e=window.document.querySelector('[data-tgo="main-navigation-outer-container"]');if(!e)return;let n=e.getBoundingClientRect().bottom;t(n>135?n-4:n-2)}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}
1,[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(w,{style:{top:"".concat(e+0,"px")},children:l.map((e,t)=>{var n;return(0,i.jsx)(k.Kq,{delayDuration:0,children:(0,i.jsxs)(k.bL,{children:[(0,i.jsx)(k.l9,{asChild:!0,children:(0,i.jsx)(b,{onClick:()=>I(e),style:{width:"".concat(e.size,"%"),position:"relative"},children:(0,i.jsx)(C,{style:{background:"var(--neutral200)",position:"relative"},children:(0,i.jsx)("div",{style:{width:"".concat(null!=(n=e.progress)?n:0,"%"),height:"100%",background:"var(--accent500)"}})})},t)}),e.name?(0,i.jsx)(k.ZL,{children:(0,i.jsx)(k.UC,{side:"bottom",sideOffset:12,children:(0,i.jsx)(A,{children:e.name})})}):null]})},t)})}),(0,i.jsx)(j,{style:{top:"".concat(e+2,"px")},children:(0,i.jsx)(y,{style:{width:"".concat(n,"%")}})})]})}var L=n(81574),z=n(19219),M=n(68868);let D=(0,f.Ay)(z.m).withConfig({componentId:"sc-ae648d5d-0"})(["display:flex;flex-direction:column;border-top:1px solid var(--neutral200);","{display:none;}"],v.m9.minWidth.Sm),_=f.Ay.div.withConfig({componentId:"sc-ae648d5d-1"})(["display:flex;align-items:center;gap:12px;width:100%;flex-direction:row;"]),B=(0,f.Ay)(M.$n).withConfig({componentId:"sc-ae648d5d-2"})(["width:100%;button{width:100%;}svg{transition:transform ease-in-out 200ms;margin-right:12px;path{fill:var(--neutral500);}transform:",";}"],e=>e.open?"rotate(0deg)":"rotate(180deg)"),F=f.Ay.button.withConfig({componentId:"sc-ae648d5d-3"})(["width:44px;height:44px;border:2px solid var(--neutral500);border-radius:50%;display:flex;flex-shrink:0;align-items:center;justify-content:center;"]),P=f.Ay.h3.withConfig({componentId:"sc-ae648d5d-4"})(["font-weight:700;font-size:36px;line-height:36px;"]),q=f.Ay.div.withConfig({componentId:"sc-ae648d5d-5"})(["display:flex;align-items:center;justify-content:center;gap:12px;margin:32px 0px;a{flex-shrink:0;width:48px;height:48px;display:flex;align-items:center;justify-content:center;border:1px solid var(--neutral500);border-radius:50%;svg{width:24px;height:24px;}}"]),N=f.Ay.h3.withConfig({componentId:"sc-ae648d5d-6"})(["font-size:20px;font-weight:700;text-align:left;line-height:26px;margin:16px 0px;"]),O=f.Ay.div.withConfig({componentId:"sc-ae648d5d-7"})(["display:flex;flex-direction:column;width:100%;"]),R=f.Ay.button.withConfig({componentId:"sc-ae648d5d-8"})(["border-radius:10px;padding:8px;gap:8px;display:flex;align-items:center;width:100%;color:",";background-color:",";svg{width:22px;height:22px;flex-shrink:0;path{fill:",";}}"],e=>e.isActive?"var(--accent500)":"var(--neutral400)",e=>e.isActive?"var(--accent200)":"transparent",e=>e.isActive?"var(--accent500)":"var(--neutral300)"),U=f.Ay.span.withConfig({componentId:"sc-ae648d5d-9"})(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;"]);var W=n(98477),G=n(17717),H=n(23900),T=n(33124),K=n(54587),Y=n.n(K);function J(e){var t;let{globalData:n,document:l}=e,[o,a]=(0,u.useState)(!1),[d,s]=(0,u.useState)(!1),[c,h]=(0,u.useState)(!1),g=S(),p=g.find(e=>100!==e.progress&&0!==e.progress);(0,u.useEffect)(()=>{a(!0)},[]);let x=null==(t=window)?void 0:t.document.querySelector("#mobile-primary-and-secondary-links"),{twitter:m,linkedin:f,facebook:v}=(0,T.N)({path:"blog",slug:null==l?void 0:l.slug,title:null==l?void 0:l.title});return(0,i.jsx)(i.Fragment,{children:o?(0,W.createPortal)((0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(D,{children:[d?(0,i.jsxs)(O,{children:[(0,i.jsx)(N,{children:(0,r.A)(n,"in-this-article")}),g.map(e=>(0,i.jsxs)(R,{onClick:()=>{I(e),s(!1)},isActive:(null==p?void 0:p.id)===e.id,children:[(0,i.jsx)(G.Sp,{}),(0,i.jsx)(U,{children:e.name})]},e.id))]}):null,(0,i.jsxs)(_,{children:[(0,i.jsxs)(B,{type:"secondary",open:d,onClick:()=>s(e=>!e),children:[(0,i.jsx)(G.U5,{}),d?(0,r.A)(n,"hide-chapters"):(0,r.A)(n,"in-this-article")]}),(0,i.jsx)(F,{"aria-label":"Share blog post",onClick:()=>h(!0),children:(0,i.jsx)(Y(),{src:"/assets/images/share-ios.png",alt:"share article",width:32,height:32})})]}),(0,i.jsxs)(H.a,{setIsOpen:h,isOpen:c,children:[(0,i.jsx)(P,{children:(0,r.A)(n,"share-this-article")}),(0,i.jsxs)(q,{children:[(0,i.jsx)("a",{target:"_blank",href:v,children:(0,i.jsx)(G.uG,{})}),(0,i.jsx)("a",{target:"_blank",href:m,children:(0,i.jsx)(G.SF,{})}),(0,i.jsx)("a",{target:"_blank",href:f,children:(0,i.jsx)(G.OX,{})})]})]})]})}),x):null})}let V=e=>{let{globalData:t,document:n,blogCategories:l,latestBlogPosts:o}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(J,{document:n,globalData:t}),(0,i.jsx)(x,{globalData:t,document:n}),(0,i.jsx)(E,{}),(0,i.jsx)(L.CR,{document:n,globalData:t,latestBlogPosts:o,blogCategories:l})]})};var X=n(34440),Z=!0;function $(e){let{pageType:t,document:n,allBlogCategories:l,latestBlogPosts:r,globalData:a,preview:d,blogSettings:s}=e;return(0,i.jsx)(o.A,{globalData:a,document:n,preview:d,children:"blogPost"===t?(0,i.jsx)(V,{document:n,latestBlogPosts:r,blogCategories:l,globalData:a}):(0,i.jsx)(X.A,{data:n,additionalData:{allBlogPosts:e.blogPosts,allBlogCategories:l},globalData:a,blogSettings:s,noSearch:!0})})}let Q=e=>async()=>{var t,n;let i=null===l.locales||void 0===l.locales?void 0:l.locales.map(t=>e(null==t?void 0:t.locale)),o=await Promise.all(i);return{paths:(null==o||null==(n=o.flat())||null==(t=n.filter(e=>!!(null==e?void 0:e.slug)))?void 0:t.map(e=>({params:{slug:e.slug},locale:e.locale}))).slice(0,50*((null===l.locales||void 0===l.locales?void 0:l.locales.length)||1)),fallback:"blocking"}}}}]);
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.