PageSourceSearch

https://www.openclimatefix.org/_next/static/chunks/2666.2025746dc9…?dpl=dpl_CnyHUzviMZESydqE1y9RgriZJbMQ

js openclimatefix.org collected 2026-10-02 11:55:50 UTC 9,002 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2666],{5960:(t,e,r)=>{r.r(e),r.d(e,{default:()=>d});var a=r(95155),i=r(58757),o=r(34623),s=r(37539),n=r(55659),l=r(49498);function d(t){let{imageOrVideo:e,imageOrVideoMobile:r,title:d}=t;return(0,a.jsx)(s.A,{...t,children:(0,a.jsx)(n.A,{children:(0,a.jsx)("div",{className:"grid-default",children:(0,a.jsxs)("div",{className:"col-[1/-1] md:col-[3/-1] md:pt-10 space-y-6",children:[(0,a.jsxs)("div",{className:"",children:[(0,a.jsx)(i.default,{...e,width:1190,height:560,className:(0,l.cn)("rounded max-md:aspect-square object-cover",r&&"max-md:hidden"),priority:!0}),r&&(0,a.jsx)(i.default,{...r,width:350,height:350,className:"rounded max-md:aspect-square object-cover md:hidden",priority:!0})]}),(0,a.jsx)(o.default,{blocks:d,className:"text-balance"})]})})})})}r(12115)},16621:(t,e,r)=>{r.d(e,{sn:()=>g});var a=r(12115),i=r(95155),o=/^image-([\da-f]+)-(\d+x\d+)-(\w+)$/,s=t=>{let e=o.exec(t),[,r,a,i]=e??[];if(!e||!r||!a||!i)throw Error(`Could not parse image ID "${t}"`);let[s,n]=a.split("x").map(t=>Number.parseInt(t,10));if(Number.isNaN(s)||Number.isNaN(n)||!s||!n)throw Error(`Invalid dimensions "${a}"`);return{assetId:r,dimensions:{height:n,width:s,aspectRatio:s/n},format:i}},n=t=>{let e=t.lastIndexOf("-");return t.slice(6,e)+"."+t.slice(e+1)},l=({id:t,mode:e="contain",width:r,height:a,hotspot:i,crop:o,queryParams:n,options:{includeMetadata:l=!1}={}})=>{let m=s(t).dimensions,{width:p,height:f,aspectRatio:g}=o?c(m,o):m;if(r||(a?(r=Math.round(a*g),a=void 0):r=Math.round(p/2)),"cover"!==e||r&&a&&r/a!==g?"contain"===e&&a&&(r=Math.min(r,Math.round(a*g)),a=void 0):e="contain",r>p||a&&a>f){let t=a?r/a:g;t>=g?(r=p,a=a&&Math.round(r/t)):r=Math.round((a=f)*t)}let w={w:r,q:75,fit:"max",...n};if(w.fm||(w.auto="format"),o&&(w.rect=u(m,o)),"cover"===e)if(w.fit="crop",a&&(w.h=a),i){let t=o?(i.x-o.left)/(1-o.left-o.right):i.x,e=o?(i.y-o.top)/(1-o.top-o.bottom):i.y;w["fp-x"]=h(d(t,0,1),3),w["fp-y"]=h(d(e,0,1),3)}else w.crop="entropy";if(l){let t=a??Math.round(r/g);w.metadata={sourceDimensions:m,outputDimensions:{width:r,height:t,aspectRatio:r/t}}}return w},d=(t,e,r)=>Math.max(e,Math.min(r,t)),h=(t,e)=>Math.round(t*Math.pow(10,e))/Math.pow(10,e),c=(t,e)=>{if(e.left+e.right>=1||e.top+e.bottom>=1)throw Error(`Invalid crop: ${JSON.stringify(e)}; crop values must be less than 1`);let r=Math.round(t.width*(1-e.left-e.right)),a=Math.round(t.height*(1-e.top-e.bottom));return{width:r,height:a,aspectRatio:r/a}},u=(t,e)=>{let{width:r,height:a}=c(t,e);return[Math.round(e.left*t.width),Math.round(e.top*t.height),r,a].join(",")},m=t=>new URLSearchParams(Object.entries(t).sort(([t],[e])=>t.localeCompare(e)).map(([t,e])=>[t,String(e)])).toString().replace(/%2C/g,","),p=({as:t,preview:e,style:r,alt:o,...s})=>{let[n,l]=(0,a.useState)(!1),d=(0,a.useRef)(null),h=()=>{l(!0)};(0,a.useEffect)(()=>{d.current?.complete&&h()},[]);let c=t??"img";return(0,i.jsxs)(i.Fragment,{children:[!n&&(0,i.jsx)(c,{src:e,alt:n?"":o,id:s.id,className:s.className,width:s.width,height:s.height,style:{aspectRatio:`${s.width} / ${s.height}`,...r},"data-lqip":!0}),(0,i.jsx)(c,{"data-loading":!n||null,alt:n?o:"",onLoad:h,ref:d,style:n?r:{...f,...r},...s})]})},f={height:"10px",width:"10px",position:"absolute",zIndex:-10,opacity:0,pointerEvents:"none",userSelect:"none"},g=({as:t,baseUrl:e,projectId:r,dataset:a,id:o,hotspot:d,crop:h,width:c,height:u,mode:f="contain",preview:g,htmlWidth:w,htmlHeight:v,htmlId:y,queryParams:x,...b})=>{if(!o)throw Error("Missing required `id` prop for <SanityImage>.");if(!e&&(!r||!a))throw Error("Missing required `baseUrl` or `projectId` and `dataset` props for <SanityImage>.");e=e??`https://cdn.sanity.io/images/${r}/${a}/`;let j=o.endsWith("-svg"),M=g&&!j?p:t??"img",N={alt:b.alt??"",loading:b.loading??"lazy",id:y,...b};if(j){let r=(({id:t,baseUrl:e})=>{let{assetId:r,dimensions:a,format:i}=s(t);return{src:`${e}${r}-${a.width}x${a.height}.${i}`,width:a.width,height:a.height}})({id:o,baseUrl:e});return"source"===t&&(r.srcSet=r.src,delete r.src),(0,i.jsx)(M,{...r,...N})}let E={baseUrl:e,id:o,crop:h,hotspot:d,width:c,height:u,mode:f,queryParams:x},{src:I,...$}=(({baseUrl:t,...e})=>{let{metadata:r,...a}=l({...e,options:{includeMetadata:!0}});if(!r)throw Error("Missing image output metadata");return{src:`${t}${n(e.id)}
1?${m(a)}`,width:r.outputDimensions.width,height:r.outputDimensions.height}})(E);return N.srcSet=(({id:t,mode:e="contain",width:r,height:a,hotspot:i,crop:o,baseUrl:s,...d})=>{let{w:h,h:c}=l({id:t,mode:e,width:r,height:a,hotspot:i,crop:o}),u=`${s}${n(t)}`;return Array.from(new Set((t=>t<160?[.5,1,2]:t<750?[.5,1,1.5,2]:t<1400?[.25,.5,.75,1,1.5,2]:[.25,.5,.75,1,1.25,1.5,1.75,2])(h).map(r=>{let a=Math.round(h*r),s=c&&Math.round(c*r);if(r<1&&a<50)return null;let n=l({id:t,mode:e,width:a,height:s,hotspot:i,crop:o,...d});return`${u}?${m(n)} ${n.w}w`}).filter(t=>!!t)))})(E).join(", "),N.src=I,N.width=w??$.width,N.height=v??$.height,g&&(N.as=t??"img",N.preview=g),(0,i.jsx)(M,{...N})}},27937:(t,e,r)=>{r.d(e,{A:()=>a});let a=(0,r(71847).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},36274:(t,e,r)=>{r.d(e,{W:()=>s});var a=r(12115),i=r(46704);let o={some:0,all:1};function s(t,{root:e,margin:r,amount:n,once:l=!1,initial:d=!1}={}){let[h,c]=(0,a.useState)(d);return(0,a.useEffect)(()=>{if(!t.current||l&&h)return;let a={root:e&&e.current||void 0,margin:r,amount:n};return function(t,e,{root:r,margin:a,amount:s="some"}={}){let n=(0,i.K)(t),l=new WeakMap,d=new IntersectionObserver(t=>{t.forEach(t=>{let r=l.get(t.target);if(!!r!==t.isIntersecting)if(t.isIntersecting){let r=e(t.target,t);"function"==typeof r?l.set(t.target,r):d.unobserve(t.target)}else"function"==typeof r&&(r(t),l.delete(t.target))})},{root:r,rootMargin:a,threshold:"number"==typeof s?s:o[s]});return n.forEach(t=>d.observe(t)),()=>d.disconnect()}(t.current,()=>(c(!0),l?void 0:()=>c(!1)),a)},[e,t,r,l,n]),h}},46704:(t,e,r)=>{r.d(e,{K:()=>a});function a(t,e,r){if(t instanceof EventTarget)return[t];if("string"==typeof t){let a=document;e&&(a=e.current);let i=r?.[t]??a.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}},58757:(t,e,r)=>{r.r(e),r.d(e,{IMAGE_OR_VIDEO_ASPECTS:()=>h,default:()=>c});var a=r(95155),i=r(49498),o=r(62809),s=r(12115),n=r(36274),l=r(57088);let d=(0,s.forwardRef)((t,e)=>{let{asset:r,onLoad:o,height:n,width:d,className:h,muted:c,autoPlay:u,...m}=t,p=(0,s.useRef)(null),f=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return(0,s.useCallback)(t=>{e.forEach(e=>{e&&("function"==typeof e?e(t):e.current=t)})},e)}(p,e),g=null==r?void 0:r.playbackId;return(0,s.useEffect)(()=>{let t=p.current;if(!t||!g)return;let e=async()=>{try{u&&await t.play()}catch(t){"AbortError"!==t.name&&console.error("Video playback error:",t)}};if(l.Ay.isSupported()){let r=new l.Ay;r.loadSource("https://stream.mux.com/".concat(g,".m3u8")),r.attachMedia(t),r.on(l.Ay.Events.MANIFEST_PARSED,()=>{e(),o&&o()})}else t.canPlayType("application/vnd.apple.mpegurl")&&(t.src="https://stream.mux.com/".concat(g,".m3u8"),t.addEventListener("loadedmetadata",()=>{e(),o&&o()}));return()=>{t&&(t.pause(),t.src="")}},[g,u]),(0,a.jsx)("div",{ref:e,className:(0,i.cn)("relative w-full h-full",h),children:(0,a.jsx)("video",{ref:f,style:d&&n?{width:"100%",height:"100%",objectFit:"cover",aspectRatio:"".concat(d,"/").concat(n),position:"relative",zIndex:1}:{width:"100%",height:"100%",objectFit:"cover",position:"relative",zIndex:1},className:(0,i.cn)(h),muted:c,autoPlay:u,poster:"https://image.mux.com/".concat(g,"/thumbnail.jpg?time=0&w=50"),...m})})});d.displayName="MuxVideo";let h={"1/1":{title:"1:1",value:"1/1",width:1e3,height:1e3},"16/9":{title:"16:9",value:"16/9",width:1e3,height:562.5}};function c(t){let{type:e,image:r,video:l=!0,loopVideo:h,amount:c=0,sizes:u="100vw",width:m,height:p,dpr:f,quality:g,priority:w,className:v}=t,y=(0,s.useRef)(null),x=(0,n.W)(y,{amount:c,once:!0}),[b,j]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{x&&j(!0)},[x]),"video"===e&&l)?(0,a.jsx)(d,{ref:y,asset:null==l?void 0:l.asset,autoPlay:b,muted:!0,loop:null===h||h,playsInline:!0,height:p,width:m,className:(0,i.cn)("",v)}):"image"===e&&r?(0,a.jsx)(o.default,{image:r,className:(0,i.cn)("",v),sizes:u,width:m,height:p,dpr:f,quality:g,priority:w,placeholder:"empty"}):null}},62809:(t,e,r)=>{r.r(e),r.d(e,{default:()=>n});
1var a=r(95155),i=r(49498),o=r(16621);let s="https://cdn.sanity.io/images/".concat("x5ci0v8g","/").concat("production","/"),n=t=>{var e;let{image:r,height:n,width:l,mode:d="cover",dpr:h=2,quality:c=75,queryParams:u={},preview:m=!1,alt:p,priority:f=!1,className:g,...w}=t;return(null==r||null==(e=r.asset)?void 0:e._id)?(0,a.jsx)(o.sn,{baseUrl:s,id:r.asset._id,hotspot:r.hotspot||{x:.5,y:.5},crop:r.crop,preview:m?r.asset.metadata.lqip:null,mode:d,queryParams:{...u,dpr:h,q:c},alt:p||r.asset.altText||"",className:(0,i.cn)("block w-full max-w-full h-auto",g),loading:f?"eager":"lazy",height:n,width:l,...w}):console.warn("No image asset provided")}}}]);

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.