PageSourceSearch

https://porsche-motorsport-web.vercel.app/_next/static/chunks/1963.04e85b7c1d64dae6.js

js porsche-motorsport-web.vercel.app collected 2026-10-03 07:32:33 UTC 4,472 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1963],{51963:(e,t,n)=>{n.r(t),n.d(t,{VideoAndLottieWrapper:()=>j});var a=n(6029),l=n(92643),r=n(94169),i=n(36760),s=n(8711),d=n(72343),o=n(55729),u=n(81278),c=n(72813),p=n(45253),y=n(31967),x=n(23030),m=n.n(x);let h=e=>{let{landscapeVideo:t,lottieJson:n,loadingText:l}=e,{locale:i,isPreview:d}=(0,u.useRouter)(),{state:x,dispatch:h}=(0,r.z)(),f=(0,o.useRef)(null),g=(0,o.useRef)(null),b=(0,o.useRef)(null),[v,j]=(0,o.useState)(!1),[E,k]=(0,o.useState)(!0),[w,L]=(0,o.useState)(x.played.played),C=async()=>{!f.current&&g.current&&(null==n?void 0:n.sys.id)&&(f.current=m().loadAnimation({container:g.current,path:"/api/contentful/lottie/".concat(n.sys.id,"?locale=").concat(i,"&preview=").concat(d),renderer:"svg",loop:!1,autoplay:!1}),f.current.addEventListener("data_ready",()=>{var e;h({type:"PLAY"}),null==(e=f.current)||e.removeEventListener("data_ready",()=>{})}))},z=async e=>{b.current=e.getInternalPlayer(),j(!0),await C()};return(0,o.useEffect)(()=>{if(L(x.played.played),x.played.played>w&&k(!1),!f.current)return;let e=Math.min(100,Math.max(0,x.played.playedSeconds/x.duration*100)),t=f.current.totalFrames*e/100;f.current.show(),x.isPlaying?f.current.goToAndPlay(t,!0):f.current.goToAndStop(t,!0)},[x.duration,x.isPlaying,x.played,x.played.playedSeconds,x.played.played,w]),(0,o.useEffect)(()=>{if(!v||!b.current||!f.current)return;let e=()=>{k(!0)},t=b.current;return t.addEventListener("waiting",e),t.addEventListener("canplay",()=>{k(!1)}),()=>{t.removeEventListener("waiting",e)}},[v]),(0,o.useEffect)(()=>{var e,t;E?null==(e=f.current)||e.stop():null==(t=f.current)||t.play()},[E]),(0,a.jsxs)(c.a,{position:"absolute",inset:0,zIndex:1,children:[(0,a.jsx)(p.s,{alignItems:"center",justifyContent:"center",position:"absolute",bgColor:"porscheBlack",zIndex:1,inset:0,width:"100%",height:"100%",display:v?"none":"flex",children:(0,a.jsx)(s.E,{size:"medium",children:l})}),(0,a.jsx)(p.s,{alignItems:"center",justifyContent:"center",position:"absolute",zIndex:1,inset:0,width:"100%",height:"100%",display:E?"flex":"none",children:(0,a.jsx)(s.E,{size:"medium",children:l})}),(0,a.jsx)(y.V,{wrapperProps:{position:"absolute",zIndex:0},aiTagPosition:{base:"top-left",md:"top-right"},onReady:z,cloudinaryAsset:t}),(0,a.jsx)(c.a,{ref:g,position:"absolute",inset:0,zIndex:1,opacity:+!E,height:"50%",transform:"translateY(50%)"})]})};var f=n(76939),g=n(6937);let b=e=>{let{onClick:t,...n}=e,{state:i,dispatch:s}=(0,r.z)(),[d]=(0,l.U)("(min-width: ".concat(g.A.l,")"),{ssr:!0,fallback:!0}),u=(0,o.useCallback)(e=>{s({type:"UNMUTE"}),null==t||t(e)},[s,t]),c=(0,o.useCallback)(()=>{s({type:"MUTE"})},[s]);return(0,a.jsx)(f.$,{icon:i.isMuted?"volume-off":"volume-up",variant:"secondary",theme:"dark",hideLabel:!0,aria:{"aria-label":i.isMuted?"unmute video":"mute video"},sx:{userSelect:"none"},...n,onPointerDown:u,onPointerUp:c,onContextMenu:e=>e.preventDefault(),compact:!d})};var v=n(93972);let j=e=>{let{aiGenerated:t,pressAndHoldForSoundButtonLabel:n,onClick:o,landscapeVideo:u,lottieJson:c,loadingText:p}=e,[y]=(0,l.U)("(min-width: ".concat(g.A.l,")"),{ssr:!0,fallback:!0});return(0,a.jsxs)(r.v,{muted:!0,loop:!0,autoplay:!1,children:[(0,a.jsx)(h,{landscapeVideo:u,lottieJson:c,loadingText:p,onClick:o}),(0,a.jsxs)(i.T,{gap:0,position:"absolute",bottom:{base:6,md:10},width:"full",zIndex:2,px:{base:5,md:10},children:[(0,a.jsxs)(i.T,{gap:3.5,children:[(0,a.jsxs)(i.T,{gap:4,children:[(0,a.jsx)(b,{onClick:()=>o("sound")}),(0,a.jsx)(s.E,{size:"small",children:n})]}),(0,a.jsx)(v.pY,{aiGenerated:t,mode:"image"})]}),(0,a.jsx)(d.P,{alignSelf:"end",compact:!y,onClick:()=>o("play")})]})]})}},93972:(e,t,n)=>{n.d(t,{pY:()=>c,OI:()=>u,DO:()=>o});var a=n(6029),l=n(64873),r=n(94699),i=n(48643),s=n(16505),d=n(15407);let o=e=>"generated"===e?"pageGenerated":"modified"===e?"pageModified":null,u=e=>{let{aiGenerated:t}=e,n=o(t),{label:u}=(0,l.L)(null!=n?n:"pageGenerated");return n?(0,a.jsx)(r.x,{templateColumns:d.y9,gap:d.T_,children:(0,a.jsx)(i.E,{colStart:{base:1,l:4},colEnd:{base:3,l:10},children:(0,a.jsx)(s.L,{length:"long",label:u,kind:"text",maxWidth:{base:"100%",l:"316px"}})})}):null},c=e=>{var t;let{aiGenerated:n,mode:r="standard",...i}=e,d="generated"===(t=n)?"generated":"modified"===t?"modified":null,{label:o,srLabel:u}=(0,l.L)(null!=d?d:"generated","audio");return d?(0,a.jsx)(s.L,{kind:"audio",label:o,srLabel:u,mode:r,...i}):null}}}]);
2//# sourceMappingURL=1963.04e85b7c1d64dae6.js.map

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.