1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1803],{11803:function(e,a,n){n.r(a),n.d(a,{default:function(){return v}});var t=n(19047),o=n(25096),s=n(99376),i=n(2265),r=n(52141),l=n(35992);let c={"handshake/syn":t.bK,"handshake/syn-ack":t.Ol,"handshake/ack":t.ei,"channel/response":t.Ag,"channel/heartbeat":t.UE,"channel/disconnect":t.Hq,"overlay/focus":"visual-editing/focus","overlay/navigate":"visual-editing/navigate","overlay/toggle":"visual-editing/toggle","presentation/toggleOverlay":"presentation/toggle-overlay"},d={[t.bK]:"handshake/syn",[t.Ol]:"handshake/syn-ack",[t.ei]:"handshake/ack",[t.Ag]:"channel/response",[t.UE]:"channel/heartbeat",[t.Hq]:"channel/disconnect","visual-editing/focus":"overlay/focus","visual-editing/navigate":"overlay/navigate","visual-editing/toggle":"overlay/toggle","presentation/toggle-overlay":"presentation/toggleOverlay"},h=e=>{let{data:a}=e;return a&&"object"==typeof a&&"domain"in a&&"type"in a&&"from"in a&&"to"in a&&("sanity/channels"===a.domain&&(a.domain=t.yK),"overlays"===a.to&&(a.to="visual-editing"),"overlays"===a.from&&(a.from="visual-editing"),a.type=c[a.type]??a.type),e},p=e=>(e.domain===t.yK&&(e.domain="sanity/channels"),"visual-editing"===e.to&&(e.to="overlays"),"visual-editing"===e.from&&(e.from="overlays"),e.type=d[e.type]??e.type,"channel/response"===e.type&&e.responseTo&&!e.data&&(e.data={responseTo:e.responseTo}),("handshake/syn"===e.type||"handshake/syn-ack"===e.type||"handshake/ack"===e.type)&&(e.data={id:e.connectionId}),e),y=({context:e},a)=>{let{sources:n,targetOrigin:t}=e,o=p(a.message);n.forEach(e=>{e.postMessage(o,{targetOrigin:t})})},g=()=>({listen:(0,t.F8)(h),requestMachine:(0,t.lB)().provide({actions:{"send message":y}})});function v(e){let{draftModeEnabled:a,draftModePerspective:n}=e,c=(0,s.useRouter)(),d=(0,r.i)((e,t)=>{a&&e!==n&&(0,o.N)(e).then(()=>{t.aborted||c.refresh()}).catch(e=>console.error("Failed to set the preview perspective cookie",e))});return(0,i.useEffect)(()=>{let e;let a=(0,t.dS)({name:"loaders",connectTo:"presentation"},(0,t.zB)().provide({actors:g()}));a.on("loader/perspective",a=>{e?.abort(),e=new AbortController,d(a.perspective,e.signal)});let n=a.start();return(0,l.re)(a),()=>{n()}},[d]),null}v.displayName="PresentationComlink"}}]);
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.