PageSourceSearch

https://www.brottsoffermyndigheten.se/Dist/brom/module-video.64479e99b702d7ba3f85.js

js brottsoffermyndigheten.se collected 2026-10-02 04:26:02 UTC 6,209 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkbrom_web=globalThis.webpackChunkbrom_web||[]).push([[889],{172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>E});var a=r(8257);const l={class:"vg-video"},i=["src","height","width","poster","preload"],o={key:1,class:"vg-video__start"},s={key:2,class:"vg-video__controls"},n={class:"vg-video__controls__btns"},u={class:"vg-video__controls___progress"},v={class:"vg-video__controls__time"},c={__name:"video-element",props:{src:{type:String,default:""},poster:{type:String,default:null},preload:{type:String,default:"auto"},height:{type:Number,default:9},width:{type:Number,default:16}},emits:["paused","ended","error","canplay","play"],setup(e,{expose:t,emit:r}){const c=(0,a.Kh)({playing:!1,started:!1,progress:{width:"0%"},time:"-0:00"}),d=r,p=(0,a.KR)(null);let g=null;const y=()=>{if(p.value.duration>0){c.progress.width=p.value.currentTime/p.value.duration*100+"%";const e=p.value.duration-p.value.currentTime,t=Math.floor(e/60),r=Math.floor(e-60*t);c.time=`-${t}:${r>9?r:`0${r}`}`}},h=e=>{d("paused",e),c.playing=!1,clearInterval(g)},k=e=>{d("canplay",e)},m=e=>{c.playing=!0,g=setInterval(y,500),d("play",e)},_=e=>{c.time="-0:00",c.progress.width="100%",d("ended",e)},f=e=>{d("error",e)},b=()=>{c.started=!0,L()},L=()=>{p.value.play(),c.playing=!0},w=()=>{p.value.pause(),c.playing=!1},E=()=>{p.value.currentTime=p.value.duration-1,y()},C=()=>{p.value.currentTime=0,y()};return t({goToEnd:E,goToStart:C,play:L,pause:w}),(0,a.xo)((()=>{null!==p.value&&(p.value.removeEventListener("pause",h),p.value.removeEventListener("ended",_),p.value.removeEventListener("play",m),p.value.removeEventListener("canplay",k),p.value.removeEventListener("error",f),clearInterval(g))})),(0,a.sV)((()=>{null!==p.value&&(p.value.addEventListener("pause",h),p.value.addEventListener("ended",_),p.value.addEventListener("play",m),p.value.addEventListener("canplay",k),p.value.addEventListener("error",f))})),(t,r)=>((0,a.uX)(),(0,a.CE)("div",l,[e.src?.length?((0,a.uX)(),(0,a.CE)("video",{key:0,ref_key:"video",ref:p,src:e.src,height:e.height,width:e.width,playsinline:"",poster:e.poster,preload:e.preload},null,8,i)):(0,a.Q3)("v-if",!0),c.started?(0,a.Q3)("v-if",!0):((0,a.uX)(),(0,a.CE)("div",o,[(0,a.Lk)("button",{onClick:b},[...r[0]||(r[0]=[(0,a.Lk)("i",{class:"vg-icon-play-arrow","aria-label":"Play"},null,-1)])])])),c.started?((0,a.uX)(),(0,a.CE)("div",s,[(0,a.Lk)("div",n,[c.playing?((0,a.uX)(),(0,a.CE)("button",{key:0,onClick:w},[...r[1]||(r[1]=[(0,a.Lk)("i",{class:"vg-icon-pause","aria-label":"Pause"},null,-1)])])):(0,a.Q3)("v-if",!0),c.playing?(0,a.Q3)("v-if",!0):((0,a.uX)(),(0,a.CE)("button",{key:1,onClick:L},[...r[2]||(r[2]=[(0,a.Lk)("i",{class:"vg-icon-play","aria-label":"Play"},null,-1)])])),(0,a.Lk)("button",{onClick:C},[...r[3]||(r[3]=[(0,a.Lk)("i",{class:"vg-icon-skip-previous","aria-label":"till start"},null,-1)])]),(0,a.Lk)("button",{onClick:E},[...r[4]||(r[4]=[(0,a.Lk)("i",{class:"vg-icon-skip-next","aria-label":"till slutet"},null,-1)])])]),(0,a.Lk)("div",u,[(0,a.Lk)("div",{class:"vg-video__controls___progress__bar",style:(0,a.Tr)(c.progress)},null,4)]),(0,a.Lk)("div",v,(0,a.v_)(c.time),1)])):(0,a.Q3)("v-if",!0)]))}};var d=r(859);const p={class:"cookie-overlay"},g={__name:"cookietractor-consent",setup(e){const t=()=>{try{cookieTractor.consent.add("marketing")}catch(e){console.warn("CookieTractor consent not found",e)}};return(e,r)=>((0,a.uX)(),(0,a.CE)("div",p,[(0,a.Lk)("div",{class:"cookie-overlay-text"},[r[0]||(r[0]=(0,a.Lk)("p",null,"För att spela videon behöver du acceptera cookies för marknadsföring. ",-1)),(0,a.Lk)("button",{onClick:t},"Acceptera marknadsföringscookies")])]))}},y={class:"vg-container vg-container--video"},h={key:0,class:"article article--article"},k={key:0},m={key:2,class:"vg-video"},_=["src"],f={key:3,class:"vg-video"},b=["src"],L={key:4},w=["href"],E={__name:"video-module",props:["data"],setup(e){const t=e,r=(0,a.EW)((()=>!t.data.properties.video?.length&&t.data.properties.videoUrl?.length?(e=>{let t=(e=>{const t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return t&&11===t[2].length?t[2]:void 0})(e);return t&&t.length?{src:`https://www.youtube-nocookie.com/embed/${t}?rel=0&modestbranding=1&autoplay=0&playsinline=0&iv_load_policy=3&cc_load_policy=1&playlist=${t}`,poster:"",type:"youtube"}:(t=(e=>{const t=/vimeo.*\/(\d+)/i.exec(e);if(t)return t[1]})(e),t&&t.length?{src:`https://player.vimeo.com/video/${t}?dnt=1`,poster:"",type:"vimeo"}:{src:e,poster:null,type:"unknown"})})(t.data.properties.videoUrl):{src:t.data.properties.video?.length?t.data.properties.video[0]?.url:null,poster:t.data.properties.poster?.length?`${t.data.properties.poster[0]?.url}?width=1028`:null,type:"video"})),l=(0,a.EW)((()=>t.data.properties.text?.length||t.data.properties.heading?.length?{text:t.data.properties.text?.length?t.data.properties.text:null,heading:t.data.properties.heading?.length?t.data.properties.heading:null}:null));return(0,a.sV)((()=>{})),(e,t)=>((0,a.uX)(),(0,a.CE)("div",y,[(0,a.Lk)("div",null,[null!==l.value?((0,a.uX)(),(0,a.CE)("article",h,[l.value.heading?((0,a.uX)(),(0,a.CE)("h2",k,[(0,a.Lk)("span",null,(0,a.v_)(l.value.heading),
11)])):(0,a.Q3)("v-if",!0),l.value.text?((0,a.uX)(),(0,a.Wv)(d.A,{key:1,data:l.value.text},null,8,["data"])):(0,a.Q3)("v-if",!0)])):(0,a.Q3)("v-if",!0),"video"==r.value.type&&r.value.src?((0,a.uX)(),(0,a.Wv)(c,{key:1,src:r.value.src,poster:r.value.poster},null,8,["src","poster"])):"youtube"==r.value.type&&r.value.src?((0,a.uX)(),(0,a.CE)("div",m,[(0,a.Lk)("iframe",{allow:"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; ",frameborder:"0",height:"180",width:"320",referrerpolicy:"strict-origin-when-cross-origin",allowfullscreen:"",src:r.value.src,class:"vg-video__iframe"},null,8,_),(0,a.bF)(g)])):"vimeo"==r.value.type&&r.value.src?((0,a.uX)(),(0,a.CE)("div",f,[(0,a.Lk)("iframe",{allow:"autoplay; fullscreen; picture-in-picture",frameborder:"0",height:"180",width:"320",referrerpolicy:"strict-origin-when-cross-origin",allowfullscreen:"",src:r.value.src,class:"vg-video__iframe"},null,8,b)])):((0,a.uX)(),(0,a.CE)("p",L,[(0,a.Lk)("a",{href:r.value.src,target:"_blank"},(0,a.v_)(r.value.src),9,w)]))])]))}}}}]);

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.