PageSourceSearch

https://www.ellevio.se/gui-web/js/chunks/scrolltriggerlist.2026.09.23.js

js ellevio.se collected 2026-09-25 01:06:54 UTC 8,508 bytes, 2 lines download raw bytes

1import{c as d,o as a,b as c,w as h,f as m,n as u,F as f,i as p,t as w,v as g}from"../app.2026.09.23.js";import{_ as y}from"./_plugin-vue_export-helper.2026.09.23.js";const v={name:"ellevio-web-scroll-trigger-list",data(){return{isFolded:!0,isMobile:!0,menuVisible:!1,observer:[],linkInView:[],allHeadings:null,endOfPageAtFeedback:null,endOfPageAtEndDynamicMenuBlock:null,endOfPageAtFooter:null,scrollTriggerSelector:'h2[id^="h-"]',endOfPageFeedbackSelector:".vue-feedback-form",endOfPageSelector:".end-dynamic-menu-block",footerSelector:"footer",reducedMotion:!1,dynamicMenuHeight:0}},computed:{matchMediaQuery(){return window.matchMedia(" (max-width: 1160px) ")}},methods:{toggleDynamicContent(n){this.isFolded?(this.isFolded=!this.isFolded,n.preventDefault(),this.lockScroll()):(this.openScroll(),this.isFolded=!this.isFolded)},lockScroll(){const n=["overflow-hidden"];document.body.classList.contains(n[0])||document.body.classList.add(...n)},openScroll(){const n=["overflow-hidden"];document.body.classList.contains(n[0])&&document.body.classList.remove(...n)},closeDynamicContent(){this.isFolded=!0,this.openScroll()},resize:function(){this.isMobile=!!this.matchMediaQuery.matches},createStaticMenu(){let n=document.querySelector(".wysiwyg"),t=document.querySelectorAll(".anchor-scroller").length>0;if(n&&!t){let l=n.parentNode,s=document.createElement("ul");s.classList.add("mb-20","anchor-scroller","relative","ml-2.5");let e=document.createElement("li");e.innerText="Innehåll",e.classList.add("mb-2","text-base","font-futuraEfDemiBold"),s.appendChild(e),this.allHeadings.forEac
1h(r=>{let o=document.createElement("li");o.classList.add("flex","mb-1");let i=document.createElement("a");i.innerText=r.innerText,i.setAttribute("href",`#${r.id}`),i.setAttribute("title",r.innerText),i.classList.add("text-xl","underline","anchor-truncateLong","underline-offset-2","decoration-1","text-newColors-green-primary","hover:no-underline"),o.appendChild(i),s.appendChild(o)}),l.insertBefore(s,n)}},wrapElements(){const n=document.querySelectorAll(this.scrollTriggerSelector);for(let t=0;t<n.length;t++){const l=document.createElement("div");l.classList.add("scroll-trigger-wrapper"),n[t].parentNode.insertBefore(l,n[t]),l.appendChild(n[t]);const s=document.createElement("span");if(s.classList.add("menu-pixel-down"),l.appendChild(s),t!==0){const e=document.createElement("span");e.classList.add("menu-pixel-up"),l.appendChild(e)}}},checkMenuVisibility(){const n=document.querySelectorAll(".menu-pixel-down")[0].getBoundingClientRect().top,t=this.endOfPageAtFeedback,s=this.endOfPageAtEndDynamicMenuBlock?.getBoundingClientRect().top+175||t?.getBoundingClientRect().top||this.endOfPageAtFooter.getBoundingClientRect().top;let e=this.isMobile?210:this.dynamicMenuHeight+260;s<=e||n>0?this.menuVisible=!1:this.menuVisible=!0},checkLinksPosition(){const n=document.querySelectorAll(".menu-pixel-down");for(let t=0;t<n.length;t++)if(n[t].getBoundingClientRect().top<0){for(let s=0;s<this.linkInView.length;s++)this.linkInView[s]=!1;this.linkInView[t]=!0}},runScollTriggers(){if(!this.isMobile){const n=document.querySelectorAll(".menu-pixel-down");for(let l=0;l<n.length;l++)new IntersectionObserver(([e])=>{let r=!0;const o=e.boundingClientRect.top<140;if(o&&(e.isIntersecting?r=!0:r=!1),!r&&o){for(let i=0;i<this.linkInView.length;i++)this.linkInView[i]=!1;this.linkInView[l]=!0}},{root:null,rootMargin:"-20px",threshold:[0,1]}).observe(n[l]);const t=document.querySelectorAll(".menu-pixel-up");for(let l=0;l<t.length;l++)new IntersectionObserver(([e])=>{const r=e.boundingClientRect.top<140;let o=!1;if(r&&(e.isIntersecting?o=!0:o=!1),o&&r){for(let i=0;i<this.linkInView.length;i++)this.linkInView[i]=!1;this.linkInView[l]=!0}},{root:null,rootMargin:"-20px",threshold:[0,1]}).observe(t[l])}document.querySelectorAll(".menu-pixel-down").length>0&&(window.addEventListener("scroll",this.checkMenuVisibility),this.isMobile&&window.addEventListener("scroll",this.checkLinksPosition))}},mounted(){this.reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)")===!0||window.matchMedia("(prefers-reduced-motion: reduce)").matches===!0;const n=["smooth-scroll"];this.isMobile=!!this.matchMediaQuery.matches,this._boundedResize=this.resize.bind(this),window.addEventListener("resize",this._boundedResize),this.allHeadings=document.querySelectorAll(this.scrollTriggerSelector),this.allHeadings.length>1&&(this.reducedMotion&&document.documentElement.classList.add(...n),this.$nextTick(()=>{this.endOfPageAtFeedback=document.querySelector(this.endOfPageFeedbackSelector),this.endOfPageAtEndDynamicMenuBlock=document.querySelector(this.endOfPageSelector);const t=document.querySelectorAll(this.footerSelector);this.endOfPageAtFooter=t[t.length-1],this.dynamicMenuHeight=this.allHeadings.length*28+15,this.createStaticMenu(),this.wrapElements(),this.runScollTriggers()}))}},k={class:"fixed top-8 z-[10000] w-full pointer-events-none text-newColors-gray-content"},x={class:"relative !pointer-events-auto min-w-360"},C={class:"mb-1 anchor-scroller-dynamic"},M=["href","title"],S={key:0,class:"active-anchor-background bg-newColors-gray-baseA"},F=["href","title"],V={type:"button",class:"flex absolute right-0 top-3.5 z-30 justify-center items-center mr-3 w-9 h-9 pointer-events-none"},A={xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",viewBox:"0 0 28 28"},E={xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",fill:"none",viewBox:"0 0 28 28"},I={class:"absolute top-0 bottom-0 left-0 right-0 z-[80] anchor-blur-bg"};function P(n,t,l,s,e,r){return a(),d(f,null,[c("div",k,[e.isMobile?m("",!0):(a(),d("div",{key:0,class:u(["items-center justify-end container-small !pr-9 flex",e.menuVisible&&!e.isMobile?"":"hidden"])},[c("div",x,[c("ul",C,[t[2]||(t[2]=c("li",{class:"mb-2 text-base font-futuraEfDemiBold"},"Innehåll",-1)),(a(!0),d(f,null,p(e.allHeadings,(o,i)=>(a(),d("li",{key:i,class:"flex relative mb-1"},[c("a",{href:`#${o.id}`,class:u([e.linkInView[i]?"link-active font-futuraEfDemiBold no-underline text-newColors-green-primaryA":"","relative top-0.5 z-10 text-xl underline anch
1or-truncate underline-offset-2 decoration-1 text-newColors-green-primary hover:no-underline"]),title:o.innerText},w(o.innerText),11,M),e.linkInView[i]?(a(),d("span",S)):m("",!0)]))),128))]),t[3]||(t[3]=c("div",{class:"anchor-background"},null,-1))])],2)),e.isMobile?(a(),d("div",{key:1,class:u(["fixed top-0 w-full bg-white mobile-dynamic-menu !pointer-events-auto",e.menuVisible&&e.isMobile?"":"hidden"])},[e.isFolded?m("",!0):(a(),d("p",{key:0,onClick:t[0]||(t[0]=(...o)=>r.closeDynamicContent&&r.closeDynamicContent(...o)),class:"w-full cursor-pointer container-small min-h-[4rem] flex items-center bg-newColors-gray-baseA",role:"button"},"Innehåll")),c("ul",{class:u(["bg-white min-h-[4rem] relative anchor-scroller-dynamic border-b-1 border-newColors-gray-contentD",e.isFolded?"mobile-dynamic-menu-shadow folded flex items-center":""])},[(a(!0),d(f,null,p(e.allHeadings,(o,i)=>(a(),d("li",{key:i,class:u(["flex mt-[1px]",e.isFolded?"w-full":"bg-newColors-gray-background"])},[c("a",{href:`#${o.id}`,onClick:t[1]||(t[1]=(...b)=>r.toggleDynamicContent&&r.toggleDynamicContent(...b)),class:u([[e.linkInView[i]?"link-active ":"",e.linkInView[i]&&!e.isFolded?"bg-newColors-green-primaryA !text-white":"",!e.linkInView[i]&&!e.isFolded?"underline":"",e.isFolded?"bg-newColors-gray-baseA flex items-center pl-5 absolute z-20 top-0 bottom-0 right-0 left-0":"block w-full relative anchor-truncate "].join(" "),"z-10 text-xl decoration-1 container-small !ml-0"]),title:e.isFolded?o.innerText:""},[c("span",{class:u(["pointer-events-none",[e.linkInView[i]?"link-active  ":"",e.linkInView[i]&&e.isFolded?"font-futuraEfDemiBold":"",e.isFolded?"!max-w-[80%] leading-[1.375rem] line-clamp-2":"overflow-ellipsis",e.linkInView[i]&&!e.isFolded?"font-futuraEfDemiBold":""].join(" ")])},w(o.innerText),3)],10,F)],2))),128))],2),c("button",V,[h((a(),d("svg",A,[...t[4]||(t[4]=[c("path",{fill:"#2C2827","fill-rule":"evenodd",d:"M12.405 12.411V1.595h3.19v24.808h-3.19V15.6l-10.81-.004V12.41h10.81Zm13.999 3.185h-8.261v-3.19h8.261v3.19Z","clip-rule":"evenodd"},null,-1)])],512)),[[g,e.isFolded]]),h((a(),d("svg",E,[...t[5]||(t[5]=[c("path",{fill:"#2C2827",d:"M26.402 15.595H1.596v-3.19h24.808v3.19Z"},null,-1)])],512)),[[g,!e.isFolded]])])],2)):m("",!0)]),h(c("div",I,null,512),[[g,e.isMobile&&!this.isFolded]])],64)}const L=y(v,[["render",P]]);export{L as default};
2//# sourceMappingURL=scrolltriggerlist.2026.09.23.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.