PageSourceSearch

https://www.aalborg.dk/_nuxt/-kg9rNBl.js

js aalborg.dk collected 2026-09-24 09:32:57 UTC 6,163 bytes, 1 lines download raw bytes

1import{C as e,D as a,E as l,It as t,N as i,Tt as s,Wt as n,_ as r,ct as o,dn as u,it as c,mn as d,nt as v,pn as p,st as _,tt as m,w as g,wt as f,xt as h}from"./A7A7LHMD.js";import{Kt as w,L as E,j as k}from"#entry";import{t as O}from"./CjT9g_6Z2.js";import{t as N}from"./Ckn1CmUk2.js";import{t as S}from"./BvZ9NHQN.js";var x=["id"],y=["inert"],T={class:"w-fit h-full"},b={key:0,class:"c-stack-swiper__pagination print:!hidden"},M={class:"c-stack-swiper__pagination-caption"},W={key:0,role:"status",class:"text-strong text-caption-lg-strong"},I={"aria-hidden":"true"},L=["textContent"],z={key:0,class:"c-stack-swiper__pagination-navigation ml-auto flex-shrink-0 print:hidden <960:hidden"},F={class:"flex gap-8"},C={class:"hidden print:flex flex-wrap gap-layout-gutter"},G={__name:"StackSwiper",props:{id:String,items:Object,showNavigation:{type:Boolean,default:!0},hideScrollbar:{type:Boolean,default:!0},scrollWithoutOverflow:Boolean},setup(G,{expose:H}){const X={SHOWING_ELEMENT_X_OF_Y:k("SHOWING_ELEMENT_X_OF_Y",{capitalize:!0}),SHOWING_ELEMENTS_X_AND_Y_OF_Z:k("SHOWING_ELEMENTS_X_AND_Y_OF_Z",{capitalize:!0}),SHOWING_ELEMENTS_X_TO_Y_OF_Z:k("SHOWING_ELEMENTS_X_TO_Y_OF_Z",{capitalize:!0})},Y=G,A=t(0),B=t(null),P=t([]),R=t(null),j=t([]),Z=t([]),$=e(()=>j.value[A.value]),D=e(()=>j.value?.[A.value-1]??0),q=t(0),K=t("");h(Z,function(e){window.cancelAnimationFrame(ae),ae=window.requestAnimationFrame(()=>{const a=e.findIndex(e=>"inside"===e||"partial"===e),l=e.filter(e=>"inside"===e||"partial"===e).length;1===l?oe(X.SHOWING_ELEMENT_X_OF_Y.replace("{0}",a+1).replace("{1}",P.value.length)):2===l?oe(X.SHOWING_ELEMENTS_X_AND_Y_OF_Z.replace("{0}",a+1).replace("{1}",a+2).replace("{2}",P.value.length)):l>2&&oe(X.SHOWING_ELEMENTS_X_TO_Y_OF_Z.replace("{0}",a+1).replace("{1}",a+l).replace("{2}",P.value.length))})});const V=t(null);let U=null;const J=e(()=>!((V.value??A.value+1)<=0)&&q.value>0),Q=e(()=>!((V.value??A.value)>=(P.value?.length??1)-1)&&q.value<1),ee=e(()=>!(!Y.showNavigation||!Q.value&&!J.value));N("resize",ne),E(B,ne);let ae,le=null;function te(){null==V.value?$.value>=.05?se(A.value):se(A.value-1):se(V.value-1)}function ie(){null==V.value?D.value>=.85&&D.value<1?se(A.value):se(A.value+1):se(V.value+1)}function se(e){e=Math.max(0,Math.min(e,(P.value?.length??1)-1)),V.value=e,clearTimeout(U),U=setTimeout(()=>{V.value=null},700);const a=re(),l=P.value.map(e=>e.getBoundingClientRect().width).slice(0,e).reduce((e,a)=>e+a,0),t=a*e;B.value.scrollLeft=l+t}function ne(){const e=window.innerWidth,a=re(),l=P.value.map(e=>e.getBoundingClientRect().width);j.value??=[...new Array(P.value?.length??0)].fill(0),Z.value??=[...new Array(P.value?.length??0)].fill("outside"),P.value.forEach((t,i)=>{const{width:s}=t.getBoundingClientRect(),n=t.querySelector(".c-stack-swiper__item-wrap")?.getBoundingClientRect()??t.getBoundingClientRect(),r=n.left,o=n.right,u=l.slice(0,i).reduce((e,a)=>e+a,0)+a*Math.max(0,i-1)-B.value.scrollLeft;j.value[i]=Math.min(Math.max(0,1-(u/s+1)),1),Z.value[i]=function(e,a,l,t,i){const s=.5;return l<=t+s||a>=i-s||e>=1?"outside":a>=t-s&&l<=i+s&&e<=1-s?"inside":"partial"}(j.value[i],r,o,0,e)});const t=j.value.map((e,a)=>({index:a,value:Math.abs(e)})).find(e=>e.value<.85)?.index??0;A.value=t,j.value=j.value.map(e=>Math.min(Math.max(0,e),1)),Z.value=Z.value.map(e=>e||"outside"),j.value?.length?q.value=Math.round(B.value.scrollLeft)/(B.value.scrollWidth-B.value.clientWidth):q.value=0}function re(){return parseFloat(window.getComputedStyle(B.value,"gap").getPropertyValue("gap").replace("px",""))}function oe(e){K.value=e}return m(()=>{ne(),0===B.value.offsetHeight&&(le=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>0&&ne()})},{threshold:.01}),le.observe(B.value))}),v(()=>{le&&(le.disconnect(),le=null),null!==U&&(clearTimeout(U),U=null)}),H({fullProgress:q,progresses:j,hasPrevious:J,hasNext:Q,goPrevious:te,goNext:ie,goTo:se}),(e,t)=>{const v=O,m=S;return G.items?.length?(c(),a("div",{key:0,class:u(["c-stack-swiper",{"c-stack-swiper--scroll-without-overflow":G.scrollWithoutOverflow}])},[i(v,{ref_key:"scrollbar",ref:R,"aria-controls":G.id,class:"relative print:!hidden","enable-horizontal":!G.hideScrollbar},{default:f(()=>[g("ul",{id:G.id,ref_key:"itemsWrapper",ref:B,class:"c-stack-swiper__items",onScroll:ne},[(c(!0),a(r,null,_(G.items,(l,t)=>(c(),a("li",{key:t,ref_for:!0,ref_key:"stackItems",ref:P,class:u(["c-stack-swiper__item left-0 sticky",{"c-stack-swiper__item--last":t===G.items.length-1}]),style:p(`--progress: ${n(j)[t]};`),inert:"outside"===n(Z)[t]},[g("div",T,[g("div",{class:u(["c-stack-swiper__item-wrap",{"c-stack-swiper__item-wrap--in-view":"outside"!==n(Z)[t],"c-stack-swiper__item-wrap--outside-view":"outside"===n(Z)[t],"c-stack-swiper__item-wrap--partially-in-view":"partial"===n(Z)[t],"!opacity-100":t===G.items.length-1}])},[o(e.$slots,"item",{index:t,item:l,progress:n(j)[t],fullProgresses:n(q),viewState:n(Z)[t]??"outside"})],2)])],14,y))),128))],40,x)]),_:3},8,["aria-controls","enable-horizontal"]),n(ee)?(c(),a("div",b,[g("div",M,[G.items?.length&&(n(J)||n(Q))?(c(),a("span",W,[g("span",I,d((n(V)??n(A))+1)+" / "+d(G.items.length),1),g("span",{class:"sr-only",textContent:d(n(K))},null,8,L)])):l("",!0),e.$slots.caption?(c(!0),a(r,{key:1},_(G.items,(l,t)=>s((c(),a("div",{key:t},[o(e.$slots,"caption",{index:t,item:l,progress:n(j)[t],fullProgresses:n(q)})])),[[w,n(A)===t]])),128)):l("",!0)]),n(J)||n(Q)?(c(),a("div",z,[g("div",F,[i(m,{"aria-disabled":!n(J),"aria-label":("localize"in e?e.localize:n(k))("GO_TO_PREVIOUS",{capitalize:!0}),"aria-controls":G.id,variant:"backward",class:"rounded-full",onClick:te},null,8,["aria-disabled","aria-label","aria-controls"]),i(m,{"aria-disabled":!n(Q),"aria-label":("localize"in e?e.localize:n(k))("GO_TO_NEXT",{capitalize:!0}),"aria-controls":G.id,variant:"forward",class:"rounded-full",onClick:ie},null,8,["aria-disabled","aria-label","aria-controls"])])])):l("",!0)])):l("",!0),o(e.$slots,"default"),g("div",C,[(c(!0),a(r,null,_(G.items,(a,l)=>o(e.$slots,"item",{index:l,item:{...a,id:null},progress:n(j)[l],fullProgresses:n(q),viewState:"inside"},void 0,void 0,l)),128))])],2)):l("",!0)}}};export{G as t};

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.