"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[378],{4378:(e,r,t)=>{t.r(r),t.d(r,{default:()=>u});var o=t(33656),a=t(75828);let c=(0,a.createServerReference)("7f05b5846e3a9a02f82cb08dd5b23e37f928c08bc6",a.callServer,void 0,a.findSourceMapURL,"setPerspectiveCookie");var n=t(48307),l=t(76046),s=t(12115),i=t(84880),p=t(55086);function u(e){let{draftModeEnabled:r,draftModePerspective:t}=e,a=(0,l.useRouter)(),u=(0,i.J)((e,o)=>{r&&e!==t&&c(e).then(()=>{o.aborted||a.refresh()}).catch(e=>console.error("Failed to set the preview perspective cookie",e))});return(0,s.useEffect)(()=>{let e;let r=(0,o.RM)({name:"loaders",connectTo:"presentation"},(0,o.Uc)().provide({actors:(0,n.jF)()}));r.on("loader/perspective",r=>{e?.abort(),e=new AbortController,u(r.perspective,e.signal)});let t=r.start();return(0,p.El)(r),()=>{t()}},[]),null}u.displayName="PresentationComlink"}}]);