PageSourceSearch

https://www.domstol.no/spaview/app.html.spa/scripts/components.shared.responsiveimage.73247b37.js

js domstol.no collected 2026-10-02 03:40:24 UTC 3,754 bytes, 3 lines download raw bytes

1"use strict";(()=>{(self.webpackChunkdomstolno_spa_frontend=self.webpackChunkdomstolno_spa_frontend||[]).push([[3331],{329(W,_,a){a.r(_),a.d(_,{AspectRatios:()=>C,ResponsiveContentImage:()=>L,ResponsiveImage:()=>v,default:()=>T});var n=a(4922),P=a(6852),O=a(8184),I=Object.defineProperty,x=Object.defineProperties,U=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,h=(t,e,s)=>e in t?I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,l=(t,e)=>{for(var s in e||(e={}))M.call(e,s)&&h(t,s,e[s]);if(y)for(var s of y(e))g.call(e,s)&&h(t,s,e[s]);return t},D=(t,e)=>x(t,U(e));const C={Ratio16x9:"16/9",Ratio4x3:"4/3",Ratio1x1:"1/1"};let j=0;function f(t){if(typeof t=="number")return[t,"px"];const e=parseFloat(t);if(isNaN(e))return[void 0,"px"];const s=t.replace(e.toString(),"");return[e,s]}const L=t=>(0,n.jsx)(v,D(l({alt:t.alt},t),{src:t.imgUrl})),v=t=>{if(t.srcSet)return(0,n.jsx)("img",l({},t));const e=t.quality||75,s=`${t.key||"picture"}-${++j}-`,c=t.breakpoints.sort((i,m)=>(i.order||0)-(m.order||0)).map(i=>{const m=s+"-"+i.code;return i.code==="img"?(0,n.jsx)(w,{src:t.src,bp:i,ratio:t.aspectRatio,imgQuality:e,keyprefix:m,className:t.className,alt:t.alt},m):(0,n.jsx)(A,{src:t.src,bp:i,ratio:t.aspectRatio,imgQuality:e,keyprefix:m},m)}).filter(i=>i);return(0,n.jsxs)("figure",{children:[(0,n.jsx)("picture",{children:c}),t.caption&&(0,n.jsx)(O.o5u,{className:"p-1",typographyType:"bodyShortSmall",as:"figcaption",children:t.caption})]})},A=t=>{const e=t.bp,s=t.keyprefix,c=t.ratio,i=t.imgQuality,m=(0,P.rO)(),r=new URL(t.src,m.getEpiserverURL()),o={media:e.cssMedia,style:{}};let R=s+e.code;if(e.format&&(o.type="image/"+e.format,r.searchParams.set("format",e.format),R+="-"+e.format),e.imgWidth){const[u,S]=f(e.imgWidth);if(S.toLowerCase()==="px"&&(r.searchParams.set("width",u.toString()),c)){const[p,E]=c.split("/",2).map(d=>parseFloat(d));if(p&&E){const d=Math.round(u/p*E);r.searchParams.set("height",d.toString()),r.searchParams.set("mode","crop"),o.width=u,o.height=d}}}return t.imgQuality&&r.searchParams.set("quality",i.toString()),c&&(o.style.aspectRatio=c),o.srcSet=r.href,(0,n.jsx)("source",l({},o),R)},w=t=>{const e=t.bp,s=t.keyprefix,c=t.ratio,i=t.imgQuality,m=(0,P.rO)(),r=new URL(t.src,m.getEpiserverURL());r.searchParams.set("upscale","false");const o={className:t.className,alt:t.alt,style:{}};let R=s+e.code;if(e.format&&(r.searchParams.set("format",e.format),R+="-"+e.format),e.imgWidth){const[u,S]=f(e.imgWidth);if(S.toLowerCase()==="px"&&(r.searchParams.set("width",u.toString()),c)){const[p,E]=c.split("/",2).map(d=>parseFloat(d));if(p&&E){const d=Math.round(u/p*E);r.searchParams.set("height",d.toString()),r.searchParams.set("mode","crop"),o.width=u,o.height=d}}}return t.imgQuality&&r.searchParams.set("quality",i.toString()),c&&(o.style.aspectRatio=c),o.src=r.href,(0,n.jsx)("img",l({},o),R)},T=v},7143(W,_,a){a.r(_),a.d(_,{ResponsiveImageUrl:()=>y,ResponsiveImageUrlComponent:()=>x,default:()=>M});var n=a(4922),P=a(4510),O=a(329),I=a(7810);const x=({url:g,alt:h,className:l="",quality:D=60,aspectRatio:C="16/9",id:j=null,imgWidth:f=734,caption:L=""})=>{const v=[{code:"img",imgWidth:f,format:(0,P.z)(g),order:100},{code:"xxs",cssMedia:"(min-width: 1px)",imgWidth:f,order:99},{code:"md-webp",cssMedia:"(min-width: 992px)",imgWidth:f,format:(0,P.z)(g),order:1},{code:"md",cssMedia:"(min-width: 992px)",imgWidth:f,order:2}];return(0,n.jsx)(O.ResponsiveContentImage,{imgUrl:g,alt:h,caption:L||null,className:`img-fluid ${l}`,breakpoints:v,id:j,aspectRatio:C,quality:D})},U=(g,h)=>Object.keys(g).every(l=>g[l]===h[l]),y=(0,I.memo)(x,U),M=y}}]);})();
2
3//# sourceMappingURL=components.shared.responsiveimage.73247b37.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.