PageSourceSearch

https://www.stjernen.no/assets/SlideShowSSR-2MwUSYRz.js

js stjernen.no collected 2026-09-25 08:40:07 UTC 8,290 bytes, 1 lines download raw bytes

1import{a1 as q,S as $,ao as G,ap as J,b as Y,T as Q,h as W,a4 as X,j as u,o as Z,n as x,cv as ee,aq as ae,da as oe,ck as te,r as ne,u as ie,dd as O,de as D,t as se,z as re,B as m,C as r,D as l,E as c,N as S,a7 as M,as as P,aa as g,F as C,K as F,G as B,H as R,I as V,J as b,O as K,ag as j}from"./index-D-81gIvX.js";import{P as le}from"./pagination-DRZtkks7.js";import{A as de}from"./a11y-DBtcUgFG.js";import{A as ue}from"./autoplay-B9LucNDM.js";import{I as he}from"./ImageRenderer-DDNbq3mO.js";import{u as pe}from"./useSwiperControls-XqrncgJX.js";import"./classes-to-selector-Cf4VisjH.js";const ce={name:"SlideShowSSR",components:{Swiper:J,SwiperSlide:G,ImageRenderer:he,SyButton:$,SdpStreamlineIcon:q},props:{siteSection:{type:Object,required:!0}},setup(e){const{t:i}=Y(),{siteSection:d}=Q(e),{slides:n=[]}=W(d.value.config||[]),v=ne(0),A=X("headerOffset",0),y=u(()=>{var z;const a=(z=d.value)==null?void 0:z.config;if((a==null?void 0:a.heightMode)==="full"){const f=ie(A)||0;return{"--slide-full-height":`calc(100vh - ${v.value>0&&v.value<=250?v.value:f}px)`}}const t={},w=(a==null?void 0:a.maxHeightLg)||(a==null?void 0:a.maxHeight),I=(a==null?void 0:a.maxHeightSm)||(a==null?void 0:a.maxHeight),L=f=>{if(f)return/^\d+(\.\d+)?$/.test(f)?`${f}px`:f},E=L(w),N=L(I);return E&&(t["--slide-max-height"]=E),N&&(t["--slide-max-height-sm"]=N),t}),T=u(()=>{var a,t;return((t=(a=d.value)==null?void 0:a.config)==null?void 0:t.textAlign)==="left"?"text-left text-align-left":"text-center"}),U=u(()=>{var a,t;return((t=(a=d.value)==null?void 0:a.config)==null?void 0:t.headingUppercase)??!0}),H=u(()=>{var a,t;return((t=(a=d.value)==null?void 0:a.config)==null?void 0:t.textUppercase)??!1}),h=u(()=>{const a=[];return n.forEach(t=>{if(!t.deleted){t.published&&a.push(t);const w=O(new Date),I=O(t.publishStart);if(t.published===void 0&&(D(I,w)||I===w)){const L=O(t.publishEnd);(se(t.publishEnd)||D(w,L))&&a.push(t)}}}),a}),p=pe({slideCount:u(()=>h.value.length),autoplayDelay:u(()=>{var a,t;return((t=(a=d.value)==null?void 0:a.config)==null?void 0:t.slideDuration)??5}),loop:u(()=>!0)}),{slideshowContainer:o}=p,s=()=>{o.value&&(v.value=Math.round(o.value.getBoundingClientRect().top+window.scrollY))};Z(()=>{x(s),window.addEventListener("resize",s),window.addEventListener("orientationchange",s)}),ee(()=>{window.removeEventListener("resize",s),window.removeEventListener("orientationchange",s)});const k=a=>oe(a.buttonLinkUrl)&&!a.buttonLinkUrl.includes("https://")&&!a.buttonLinkUrl.includes("http://")?te(a.buttonLinkUrl,!0):a.buttonLinkUrl,_=u(()=>{if(h.value.length===0)return"";const a=h.value[p.activeIndex.value];let t=i("slideshow.slide_position",{currentIndex:p.activeIndex.value+1,sliderLength:h.value.length});return a!=null&&a.heading&&(t+=`. ${a.heading}`),a!=null&&a.subHeading&&(t+=`. ${a.subHeading}`),t});return{heroSliderData:h,slideHeightStyle:y,textAlignClass:T,headingUppercase:U,textUppercase:H,getSlideShowUrl:k,slideAnnouncement:_,isOpenInNewTab:a=>a!=null&&a.buttonLinkUrlOpenInNewTab?"_blank":"_self",headerOffset:A,Navigation:ae,Pagination:le,Autoplay:ue,A11y:de,...p}}},ge=["aria-label"],be=["aria-live"],fe={class:"arrow-container left-arrow-container"},ve=["aria-label"],we={key:0,class:"overlay"},me=["aria-label"],Se=["id"],ye=["id"],ke={key:2,class:"carousel-btn-container hidden @lg:flex"},Ie={key:3,class:"carousel-btn-container flex @lg:hidden"},Le={class:"arrow-container right-arrow-container"},Ce=["aria-label"],Fe={key:0,ref:"paginationContainer",class:"pagination-custom"},Ae=["data-slide-index","aria-current","aria-label","onClick"],Te=["aria-label"];function Ue(e,i,d,n,v,A){var p;const y=m("sy-button"),T=m("image-renderer"),U=m("swiper-slide"),H=m("swiper"),h=m("sdp-streamline-icon");return r(),l("div",{ref:"slideshowContainer",class:g(["slide-show-container relative",[e.prefersReducedMotion==="reduce"?"motion-reduced":"",((p=d.siteSection.config)==null?void 0:p.heightMode)==="full"?"full-height":""]]),style:j({marginTop:n.headerOffset>0?`${n.headerOffset}px`:void 0,"--header-offset":`${n.headerOffset}px`}),role:"region","aria-roledescription":"carousel","aria-label":e.$t("slideshow.slideshow_label"),tabindex:"-1",onMouseenter:i[5]||(i[5]=(...o)=>e.handleMouseEnter&&e.handleMouseEnter(...o)),onMouseleave:i[6]||(i[6]=(...o)=>e.handleMouseLeave&&e.handleMouseLeave(...o)),onFocusin:i[7]||(i[7]=(...o)=>e.handleFocusIn&&e.handleFocusIn(...o)),onFocusout:i[8]||(i[8]=(...o)=>e.handleFocusOut&&e.handleFocusOut(...o)),onKeydown:i[9]||(i[9]=(...o)=>e.handleKeydown&&e.handleKeydown(...o))},[c("div",{"aria-live":e.isSlideshowInViewport?"polite":"off","aria-atomic":"true",class:"sr-only"},S(n.slideAnnouncement),9,be),c("div",{class:"slide-show-inner",style:j(n.slideHeightStyle)},[M(c("div",fe,[c("button",{class:g(`arrow custom-arrow-left-${d.siteSection.id}`),type:"button","aria-label":e.$t("slideshow.previous_slide"),onClick:i[0]||(i[0]=(...o)=>e.goToPreviousSlide&&e.goToPreviousSlide(...o))}," ❮ ",10,ve)],512),[[P,e.isShowArrow.left]]),C(H,{modules:[n.Navigation,n.Pagination,n.Autoplay,n.A11y],"slides-per-view":1,loop:!0,navigation:!1,pagination:!1,a11y:!0,autoplay:e.autoplayConfig,observer:!0,"observe-parents":!0,"aria-label":e.$t("slideshow.slideshow_label"),class:"slideshow-swiper",onSwiper:e.onSwiper},{default:F(()=>[(r(!0),l(B,null,R(n.heroSliderData,(o,s)=>
1(r(),V(U,{key:s,"data-slide":s,"aria-hidden":e.activeIndex!==s,inert:e.activeIndex!==s?!0:void 0,"aria-roledescription":"slide","aria-label":e.$t("slideshow.slide_position",{currentIndex:s+1,sliderLength:n.heroSliderData.length}),class:"slide slider-content"},{default:F(()=>[o.hasOverlay||o.hasOverlay===void 0?(r(),l("div",we)):b("",!0),c("div",{class:g(["text z-20",n.textAlignClass]),role:"group","aria-label":e.$t("slideshow.slide_position",{currentIndex:s+1,sliderLength:n.heroSliderData.length})},[o.heading&&o.heading.trim()?(r(),l("h2",{key:0,id:`slide-heading-${s}`,class:g(["carousel-header",{uppercase:n.headingUppercase}])},S(o.heading),11,Se)):b("",!0),o.subHeading&&o.subHeading.trim()?(r(),l("p",{key:1,id:`slide-subheading-${s}`,class:g(["carousel-subheader",{uppercase:n.textUppercase}])},S(o.subHeading),11,ye)):b("",!0),o.buttonLabel?(r(),l("div",ke,[C(y,{primary:"",size:"big",href:n.getSlideShowUrl(o),target:n.isOpenInNewTab(o),tabindex:e.activeIndex===s?0:-1},{default:F(()=>[K(S(o==null?void 0:o.buttonLabel),1)]),_:2},1032,["href","target","tabindex"])])):b("",!0),o.buttonLabel?(r(),l("div",Ie,[C(y,{primary:"",size:"medium",href:n.getSlideShowUrl(o),target:n.isOpenInNewTab(o),tabindex:e.activeIndex===s?0:-1},{default:F(()=>[K(S(o==null?void 0:o.buttonLabel),1)]),_:2},1032,["href","target","tabindex"])])):b("",!0)],10,me),C(T,{"media-string":o.backgroundImage},null,8,["media-string"])]),_:2},1032,["data-slide","aria-hidden","inert","aria-label"]))),128))]),_:1},8,["modules","autoplay","aria-label","onSwiper"]),M(c("div",Le,[c("button",{class:g(`arrow right custom-arrow-right-${d.siteSection.id}`),type:"button","aria-label":e.$t("slideshow.next_slide"),onClick:i[1]||(i[1]=(...o)=>e.goToNextSlide&&e.goToNextSlide(...o)),onFocusin:i[2]||(i[2]=(...o)=>e.handleFocusIn&&e.handleFocusIn(...o))}," ❯ ",42,Ce)],512),[[P,e.isShowArrow.right]]),n.heroSliderData.length>1?(r(),l("div",Fe,[(r(!0),l(B,null,R(e.paginationBullets,(o,s)=>(r(),l("button",{key:s,class:g(`swiper-pagination-bullet ${o.isActive?"swiper-pagination-bullet-active":""}`),"data-slide-index":o.index,type:"button","aria-current":o.isActive?"true":void 0,"aria-label":e.$t("slideshow.go_to_slide",{slideNumber:o.index+1,totalSlides:n.heroSliderData.length}),onClick:k=>e.goToSlide(o.index),onFocusin:i[3]||(i[3]=(...k)=>e.handleFocusIn&&e.handleFocusIn(...k))},null,42,Ae))),128)),e.hasAutoplay&&e.prefersReducedMotion!=="reduce"?(r(),l("button",{key:0,type:"button",class:"autoplay-toggle","aria-label":e.isPaused||e.isHoverPaused?e.$t("slideshow.play_slideshow"):e.$t("slideshow.pause_slideshow"),onClick:i[4]||(i[4]=(...o)=>e.toggleAutoplay&&e.toggleAutoplay(...o))},[(r(),V(h,{key:e.isPaused||e.isHoverPaused?"play":"pause",icon:e.isPaused||e.isHoverPaused?"videoPlay2":"pauseIcon",size:14,"aria-hidden":"true"},null,8,["icon"]))],8,Te)):b("",!0)],512)):b("",!0)],4)],46,ge)}const Ve=re(ce,[["render",Ue],["__scopeId","data-v-6c4b37bf"]]);export{Ve as default};

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.