(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2700],{52700:function(n,e,t){"use strict";t.d(e,{W:function(){return ng},Z:function(){return np}});var r=t(21262),i=t(52676),o=t(60131),l=t(65743),s=t(17202),a=t.n(s),c=t(79594),u=t(29832),d=t(17189),f=t(80569),h=t(88305),m=t(75271),p=t(35362);function x(){let n=(0,r._)(["\n  flex: 1 0 auto;\n  display: flex;\n  flex-wrap: wrap;\n  align-items: stretch;\n  margin: 1rem 0;\n  justify-content: center;\n  line-height: 1;\n  @media (max-width: ","px) {\n    flex-direction: column;\n    align-items: center;\n    row-gap: 10px;\n  }\n"]);return x=function(){return n},n}function g(){let n=(0,r._)(["\n  margin: 0 1.5rem;\n  flex: 0 0 1px;\n  min-height: 100%;\n  background-color: ",";\n"]);return g=function(){return n},n}function b(){let n=(0,r._)(["\n  display: flex;\n  align-items: center;\n  position: relative;\n"]);return b=function(){return n},n}function j(){let n=(0,r._)(["\n  width: 2rem;\n  height: 2rem;\n  border-radius: 1rem;\n  margin-right: 1rem;\n  object-fit: cover;\n  flex: 0 0 2rem;\n  background-color: ",";\n"]);return j=function(){return n},n}function v(){let n=(0,r._)(["\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  flex: 1;\n  align-self: stretch;\n  text-align: left;\n"]);return v=function(){return n},n}function y(){let n=(0,r._)(["\n  font-size: 1rem;\n  font-weight: 600;\n  color: ",";\n"]);return y=function(){return n},n}function _(){let n=(0,r._)(["\n  font-size: 0.875rem;\n  color: ",";\n"]);return _=function(){return n},n}let w=c.ZP.div(x(),n=>n.theme.breakpoints.tabletVertical),Z=c.ZP.div(g(),n=>n.theme.colors.gray[300]),P=c.ZP.a(b()),k=c.ZP.img(j(),n=>n.theme.colors.gray[400]),z=c.ZP.div(v()),C=c.ZP.div(y(),p.u.colors.gray[800]),N=c.ZP.span(_(),p.u.colors.gray[500]),L=n=>/^https?:\/\//i.test(n)?n:u.mG+"authors/"+n,S=n=>{let{name:e,username:t,twitter:r,avatar:o,github:l,linkedin:s}=n,a="";return r?a="https://twitter.com/".concat(r):s&&(a="https://www.linkedin.com/in/".concat(s)),(0,i.jsxs)(P,{href:a,children:[o&&(0,i.jsx)(k,{src:L(o),alt:t}),(0,i.jsxs)(z,{children:[e&&(0,i.jsx)(C,{children:e}),r&&(0,i.jsxs)(N,{children:["@",r]}),!r&&s&&(0,i.jsx)(N,{children:s})]})]})};var E=n=>{let{authors:e=[]}=n;return(0,i.jsx)(w,{children:e.map((n,e)=>(0,i.jsxs)(m.Fragment,{children:[e>0&&(0,i.jsx)(Z,{}),(0,i.jsx)(S,{...n})]},n.username))})},M=t(49384),q=t(38091);function R(){let n=(0,r._)(["\n  margin: 1rem 0;\n"]);return R=function(){return n},n}function T(){let n=(0,r._)(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  color: ",";\n"]);return T=function(){return n},n}function B(){let n=(0,r._)(["\n  color: ",";\n"]);return B=function(){return n},n}function I(){let n=(0,r._)(["\n  flex: 1;\n  display: flex;\n  flex-direction: column;\n  padding: ",";\n  align-self: stretch;\n  justify-content: center;\n"]);return I=function(){return n},n}function G(){let n=(0,r._)(["\n  & + & "," {\n    border-top: 1px solid ",";\n  }\n"]);return G=function(){return n},n}function O(){let n=(0,r._)(["\n      display: none;\n    "]);return O=function(){return n},n}function V(){let n=(0,r._)(["\n  object-fit: cover;\n  max-width: 15rem;\n  border-radius: 0.5rem;\n  margin: ",";\n  margin-right: 2rem;\n  ","\n"]);return V=function(){return n},n}function F(){let n=(0,r._)(["\n  margin-bottom: 0.875rem;\n  display: flex;\n  align-items: baseline;\n"]);return F=function(){return n},n}function J(){let n=(0,r._)(["\n  display: flex;\n  flex-direction: row;\n  align-items: stretch;\n  justify-content: space-between;\n"]);return J=function(){return n},n}function W(){let n=(0,r._)(["\n  font-family: ",";\n  font-weight: bold;\n  font-size: 1.5rem;\n  line-height: 1.75rem;\n"]);return W=function(){return n},n}function H(){let n=(0,r._)(["\n      display: none;\n    "]);return H=function(){return n},n}function X(){let n=(0,r._)(["\n  flex: 0 0 auto;\n  margin: 0.5rem 1.5rem 1.5rem;\n  fill: ",";\n  flex: 0 0 auto;\n  ","\n"]);return X=function(){return n},n}let A=(n,e)=>(n.indexInSeries||0)-(e.indexInSeries||0);var D=n=>{let{series:e,index:t,...r}=n;return(0,i.jsx)(Q,{...r,children:(e.postsInSeries||[]).sort(A).map(n=>{let{title:e,metaImageUrl:r,heroImageUrl:o,heroImageAlt:l}=n,{indexInSeries:s=0,slug:a}=n,c=r||o,d="number"!=typeof t,f=!d&&s===t,m=f?h.Z.colors.gray[600]:h.Z.colors.blue[600];return(0,i.jsxs)(nn,{href:u.mG+a,isCurrent:f,children:[d&&c&&(0,i.jsx)(ne,{src:(0,u.jy)(c),alt:o&&l}),(0,i.jsxs)($,{children:[(0,i.jsxs)(nt,{children:[(0,i.jsxs)(M.Ct,{bg:m,children:["Part ",s]}),"\xa0",f&&(0,i.jsx)("div",{children:"(Currently reading)"})]}),(0,i.jsxs)(nr,{children:[(0,i.jsx)(ni,{children:e}),(0,i.jsx)(no,{visible:!f})]})]})]},a)})})};let K="1.25rem 0 1.5rem",Q=c.ZP.div(R()),U=(0,c.ZP)(q.Z)(T(),n=>n.theme.colors.gray[900]),Y=(0,c.ZP)(U).attrs({as:"div"})(B(),n=>n.theme.colors.gray[600]),$=c.ZP.div(I(),K),nn=(0,c.ZP)(n=>{let{isCurrent:e,...t}=n;return(0,i.jsx)(e?Y:U,{href:t.href,...t})})(G(),$,n=>n.theme.colors.gray[300]),ne=c.ZP.img(V(),K,(0,M.ai)((0,c.iv)(O()))),nt=c.ZP.div(F()),nr=c.ZP.div(J()),ni=c.ZP.span(W(),h.Z.fonts.display),no=(0,c.ZP)(n=>{let{visible:e,...t}=n;return(0,i.jsx)("svg",{width:"16",height:"16",...t,children:(0,i.jsx)("path",{d:"M1 7a1 1 0 1 0 0 2V7zm14 1l.707.707a1 1 0 0 0 0-1.414L15 8zM8.707.293a1 1 0 1 0-1.414 1.414L8.707.293zm-1.414 14a1 1 0 1 0 1.414 1.414l-1.414-1.414zM1 9h14V7H1v2zm6.293-7.293l7 7 1.414-1.414-7-7-1.414 1.414zm7 5.586l-7 7 1.414 1.414 7-7-1.414-1.414z"})})})(X(),n=>n.visible?n.theme.colors.gray[600]:"none",(0,M.ai)((0,c.iv)(H())));function nl(){let n=(0,r._)(["\n  overflow: hidden;\n"]);return nl=function(){return n},n}function ns(){let n=(0,r._)(["\n  width: 100%;\n  max-width: 740px;\n  margin: 154px auto 0;\n"]);return ns=function(){return n},n}function na(){let n=(0,r._)(["\n  text-align: center;\n  .share-btn {\n    margin: 16px auto 48px;\n  }\n"]);return na=function(){return n},n}function nc(){let n=(0,r._)(["\n  padding: 0.75rem 0 0.5rem;\n  "," {\n    margin-right: 0.5rem;\n  }\n"]);return nc=function(){return n},n}function nu(){let n=(0,r._)(["\n  display: flex;\n  margin: 1rem 0;\n  justify-content: space-between;\n  align-items: center;\n  flex-wrap: wrap;\n"]);return nu=function(){return n},n}function nd(){let n=(0,r._)(["\n  font-size: 0.875rem;\n  color: ",";\n  margin: 0 0 1.5rem 0;\n"]);return nd=function(){return n},n}function nf(){let n=(0,r._)(["\n  margin: 0 auto 0;\n  font-weight: bold;\n  color: ",";\n  line-height: 1.2;\n\n  pre {\n    display: inline-block;\n    background: "," !important;\n    border-radius: ","px;\n    padding: 10px !important;\n    font-size: 32px;\n    line-height: 1;\n    color: ",";\n    margin-bottom: 0;\n    margin-top: 0;\n    margin-right: 4px;\n  }\n"]);return nf=function(){return n},n}function nh(){let n=(0,r._)(["\n  p {\n    font-size: 24px;\n    line-height: 1.5;\n    color: ",";\n    margin-top: 32px;\n  }\n  a {\n    font-size: inherit;\n    color: ",';\n    background-image: linear-gradient(\n      to bottom,\n      rgba(0, 0, 0, 0.68) 50%,\n      rgba(0, 0, 0, 0) 50%\n    );\n    background-repeat: repeat-x;\n    background-size: 2px 0.1em;\n    background-position: 0 1.13em;\n    code {\n      position: relative;\n      text-decoration: underline;\n      z-index: 1;\n      &::after {\n        z-index: -1;\n        content: "";\n        position: absolute;\n        background: white;\n        left: -2px;\n        right: -2px;\n        height: 4px;\n        bottom: 3px;\n      }\n    }\n  }\n  code {\n    background: rgb(237, 242, 247);\n    border-radius: 4px;\n    padding: 0.2em 0.4em;\n    margin: 0px;\n    font-size: 0.875em;\n    line-height: 1;\n    font-family: monospace;\n  }\n  ul,\n  ol {\n    margin-top: 32px;\n\n    padding: 0px;\n    list-style: none none;\n    li {\n      font-size: 18px;\n      line-height: 1.7;\n      color: rgb(45, 55, 72);\n      margin-left: 20px;\n      margin-bottom: 8px;\n      color: ',';\n      &:before {\n        content: "•";\n        font-size: 24px;\n        line-height: 28px;\n        vertical-align: middle;\n        padding-right: 8px;\n        position: absolute;\n        display: inline-block;\n        -webkit-box-sizing: border-box;\n        box-sizing: border-box;\n        width: 78px;\n        margin-left: -78px;\n        text-align: right;\n      }\n    }\n  }\n']);return nh=function(){return n},n}function nm(){let n=(0,r._)(["\n  overflow: hidden;\n  border-radius: 8px;\n\n  margin-top: 64px;\n  margin-bottom: 50px;\n  max-width: unset;\n  width: 100%;\n  @media (min-width: 940px) {\n    margin-left: -52px;\n    margin-right: -52px;\n    width: calc(100% + 104px);\n  }\n\n  img {\n    display: block;\n    width: 100%;\n    height: auto;\n    object-fit: cover;\n    object-position: center;\n  }\n"]);return nm=function(){return n},n}var np=n=>{let{date:e,title:t,titleText:r,url:s,series:c,indexInSeries:d,abstract:h,heroImage:m,heroImageAlt:p,authors:x,interaction:g,share_text:b,...j}=n;return(0,i.jsxs)(nx,{...j,children:[(0,i.jsx)(M.T,{height:56,heightOnMobile:40}),(0,i.jsxs)(ng,{children:[(0,i.jsxs)(nb,{children:[e&&(0,i.jsx)(ny,{children:e}),t&&(0,i.jsx)(n_,{children:t}),c.slug&&(0,i.jsx)(nj,{children:(0,i.jsx)(a(),{href:"".concat(u.mG,"series/").concat(c.slug),children:(0,i.jsx)(M.Ct,{children:"Series"})})}),(0,i.jsx)(nv,{children:x&&(0,i.jsx)(E,{authors:x})}),(0,i.jsx)(f.Z,{lightTheme:!0,color:"indigo",content:b||"",className:"share-btn"})]}),h&&(0,i.jsx)(nw,{children:(0,i.jsx)(l.R,{...h,components:{...o.Z}})}),m&&(0,i.jsx)(nZ,{src:m,alt:p||"",width:844,height:474}),c&&(0,i.jsx)(D,{series:c,index:d})]})]})};let nx=c.ZP.header(nl()),ng=c.ZP.div(ns()),nb=c.ZP.div(na()),nj=c.ZP.div(nc(),M.Ct),nv=c.ZP.div(nu()),ny=c.ZP.p(nd(),h.Z.colors.gray[500]),n_=c.ZP.h1(nf(),n=>n.theme.colors.gray[800],n=>n.theme.colors.gray[600],n=>n.theme.radii.medium,n=>n.theme.colors.gray[600]),nw=c.ZP.div(nh(),h.Z.colors.text.darkPrimary,h.Z.colors.text.darkPrimary,h.Z.colors.black),nZ=(0,c.ZP)(d.Z)(nm())},30305:function(n,e,t){"use strict";t.d(e,{u:function(){return f}});var r=t(52676),i=t(88455),o=t(93252),l=t(49336),s=t(32984),a=t(4814),c=t(75271),u=t(30967);t(20887),t(13183);var d={bottom:"_1nbtjj56",top:"_1nbtjj57",right:"_1nbtjj58",left:"_1nbtjj59"};function f(n){let{id:e,children:t,target:a,position:f}=n,m=(0,s.O)({isOpen:!0}),{tooltipProps:p}=(0,o.l)({id:e},m),x=(0,c.useRef)(null),{overlayProps:g,placement:b,arrowProps:j}=(0,i.t)({targetRef:a,overlayRef:x,shouldFlip:!0,placement:f,offset:13}),[v,y]=(0,c.useState)(j),_=()=>{var n,e;let t=null===(n=x.current)||void 0===n?void 0:n.getBoundingClientRect(),r=null===(e=a.current)||void 0===e?void 0:e.getBoundingClientRect();if(!r||!t)return;let i=Math.abs(t.top-r.top)+r.height/2-5;y({...v,style:{...v.style,..."top"===b?{top:t.height}:void 0,..."bottom"===b?{}:void 0,..."left"===b?{top:i}:void 0,..."right"===b?{top:i}:void 0}})};return(0,c.useLayoutEffect)(()=>{_()},[b]),(0,c.useEffect)(()=>(window.addEventListener("resize",_),()=>{window.removeEventListener("resize",_)}),[]),(0,u.createPortal)((0,r.jsxs)("div",{ref:x,"lens-role":"tooltip",className:d[b],...(0,l.d)(g,p),style:{...g.style,..."bottom"===b?{top:g.style.top-10}:void 0,..."right"===b?{left:g.style.left-10}:void 0},children:[(0,r.jsx)(h,{arrowProps:v,position:b}),(0,r.jsx)("div",{className:"_1nbtjj51",style:{marginTop:"bottom"===b?10:void 0,marginLeft:"right"===b?10:void 0},children:t})]}),document.body)}function h(n){let{arrowProps:e,position:t,className:i}=n;return(0,r.jsx)("div",{className:(0,a.Z)(i,"_1nbtjj50"),"lens-role":"tooltip-arrow",...e,style:{...e.style,borderWidth:5,borderLeftColor:"left"===t?void 0:"transparent",borderRightColor:"right"===t?void 0:"transparent",borderTopColor:"top"===t?void 0:"transparent",borderBottomColor:"bottom"===t?void 0:"transparent"}})}},38091:function(n,e,t){"use strict";var r=t(52676),i=t(17202),o=t.n(i);e.Z=n=>(0,r.jsx)(o(),{...n,prefetch:!1})},80569:function(n,e,t){"use strict";t.d(e,{Z:function(){return m}});var r=t(52676),i=t(4814),o=t(87758),l=t(46744),s=t.n(l),a=t(75271),c=t(30305),u=t(90073);t(20887),t(13504);var d="_1uootqf9",f="_1uootqfa";let h=n=>{let{icon:e,setTooltip:t,setTooltipLabel:i,label:o,copy:l,url:c}=n,h=(0,a.useRef)(null),[m,p]=(0,a.useState)(!1),[x,g]=(0,a.useState)(!1),b=()=>{g(!0),i("Link copied!"),t(h),setTimeout(()=>{i(""),t(null),g(!1)},1e3)};(0,a.useEffect)(()=>{m&&!x?(i(o),t(h)):m||x||(i(""),t(null))},[m]);let j=()=>{(s().asPath.includes("utm_medium")||s().asPath.includes("utm_source")||s().asPath.includes("utm_campaign"))&&s().asPath.split("?")[1],navigator.clipboard.writeText(l)};return l&&!c?(0,r.jsx)("div",{ref:h,onClick:()=>{b(),j()},className:f,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:(0,r.jsx)(u.J,{className:d,icon:e,size:"18px"})}):(0,r.jsx)("a",{href:c,ref:h,className:f,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),target:"__blank",rel:"openeer noreferrer",children:(0,r.jsx)(u.J,{className:d,icon:e,size:"18px"})})};var m=n=>{let{color:e,content:t,lightTheme:l,custom_url:s,minimal:u,hashtags:d,className:f}=n,[m,p]=(0,a.useState)(null),[x,g]=(0,a.useState)(""),b=s||"https://prisma.io".concat((0,o.usePathname)()),j="".concat(t," "),v=[{label:"LinkedIn",icon:"fa-brands fa-linkedin",url:"https://www.linkedin.com/sharing/share-offsite/?url=".concat(b)},{label:"X",icon:"fa-brands fa-x-twitter",url:"http://twitter.com/share?text=".concat(j,"&url=").concat(b).concat(d?"&hashtags=".concat(d.join()):"")},{label:"Bluesky",icon:"fa-brands fa-bluesky",url:"https://bsky.app/intent/compose?text=".concat(j).concat(b)},{label:"Copy link",icon:"fa-solid fa-link",copy:b}];return(0,r.jsxs)("div",{className:(0,i.Z)(f,"_1uootqf5",e||"indigo",l?"_1uootqf3":"_1uootqf4",u&&"_1uootqf6"),children:[(0,r.jsx)("span",{className:"_1uootqf7",children:"Share"}),(0,r.jsxs)("div",{className:"_1uootqf8",children:[v.map(n=>(0,r.jsx)(h,{label:n.label,icon:n.icon,setTooltipLabel:g,setTooltip:p,url:n.url||void 0,copy:n.copy||void 0})),(m||x)&&(0,r.jsx)(c.u,{target:m,position:"top",children:x})]})]})}},13504:function(){}}]);