1"use strict";(self.NiveaXwebpackJsonp=self.NiveaXwebpackJsonp||[]).push([[260],{53784:(t,e,n)=>{n.r(e),n.d(e,{default:()=>y});var i=n(84817),s=n(19446),a=n(42194),r=n(88692),l=n(8481),o=n(60778),d=n(45204),u=n(61269),h=n(24329),c=n(71678),m=n(50436),v=n(98684);const p='[data-module="SliderPagination"]',f=document.dir;class y extends m.default{static setup(t=p){Array.from(document.querySelectorAll(t)).filter(t=>!t.dataset.moduleInitialized).forEach(t=>{window.requestAnimationFrame(()=>{setTimeout(function(){t.dataset.moduleInitialized||(new y(t),t.dataset.moduleInitialized="true")})})})}constructor(t,e){super(t,e),this.hasChildren()&&(this.initSliderPagination(),this.convertAnchorToSpan())}hasChildren(){return this.element.children.length>0}convertAnchorToSpan(){return this.element.querySelectorAll(".nx-how-to__description a").forEach(t=>{const e=(0,v.m6)("");e.innerHTML=t.innerHTML,e.className=t.className,e.setAttribute("data-url",t.getAttribute("href")),e.classList.add("nx-how-to__description-link"),t.parentNode.replaceChild(e,t),e.addEventListener("click",()=>window.location.replace(e.getAttribute("data-url")))}),this}initSliderPagination(){return this.initLiquid(20).initInfitity(this.sliderInfo,5),this}resetPaginatorItem(t){return(0,i.H)(this.sliderInfo.navItems).pipe((0,o.T)(t=>t.querySelector(".tns-nav__liquid")),(0,d.p)(t=>null!=t)).subscribe(e=>{requestAnimationFrame(()=>{e.style.transition="all 0.5s",e.style.opacity="0",e.style.width=t+"px",setTimeout(()=>{e.remove()},500)})}),this}drawPaginationItem(t,e,n){0==(null==t?void 0:t.children.length)&&(0,v.L8)(t,(0,v.Sw)("tns-nav__liquid"));let i=null==t?void 0:t.firstElementChild;return i&&requestAnimationFrame(()=>{"rtl"===f?(i.style.left=e?"auto":"0",i.style.right=e?"0":"auto"):(i.style.left=e?"0":"auto",i.style.right=e?"auto":"0"),i.style.width=n+"px"}),this}initLiquid(t){return this.onDrag(t),this.slider.events.on("indexChanged",this.onIndexChanged(t)),this}onDrag(t){const e=(0,s.R)(this.slider.events,"dragMove",{passive:!0}).pipe((0,u.E)("0","event","clientX")),n=(0,s.R)(this.slider.events,"dragEnd",{passive:!0}),i=(0,s.R)(document,"mousemove").pipe((0,o.T)(({clientX:t})=>t)),d=(0,s.R)(document,"touchmove",{passive:!0}).pipe((0,o.T)(({changedTouches:{0:{clientX:t}}})=>t)),m=(0,a.h)(i,d).pipe((0,h.Q)(n));return e.pipe((0,c.n)(t=>(0,r.zV)((0,l.of)(t),m))).subscribe(([e,n])=>{const i=document.body.offsetWidth-e,s=n>e,a=s?n-e:e-n;if(s&&i<60||!s&&e<60)return;const r=Math.max((s?i:e)/2,60),l=Math.min(a/r,1);this.drawPaginationItem(this.activeNav,!s,t*l)}),n.subscribe(()=>this.resetPaginatorItem(t)),this}get activeNav(){return Array.from(this.sliderInfo.navItems).filter(t=>(0,v.nB)(t,"tns-nav-active"))[0]}onIndexChanged(t){let e;return()=>{let{index:n,indexCached:i,navItems:s,slideBy:a,slideCount:r}=this.sliderInfo,l=Math.ceil(r/a),o=Math.ceil(n/a),d=Math.ceil(i/a),u=o>=l?o-l:o,h=d>=l?0:d,c=Array.from(s).filter(t=>!t.style.display)[h],m=u>h;Math.abs(u-h)>1||e===u||u<0||(this.drawPaginationItem(c,m,0).resetPaginatorItem(t),e=u)}}initInfitity(t,e){const n=t.navContainer,i=null==n?void 0:n.parentElement,s=(0,v.Sw)("tns-nav__wrapper");return(0,v.L8)(i,(0,v.L8)(s,n)),this.slider.events.on("indexChanged",t=>
1{this.adjustInfinytePagination(t,e),this.element.closest(".nx-stage")||this.options.autoplay||this.setFocusActiveTeaser(this.activeSlides,t.index)}),this.adjustInfinytePagination(t,e),this}setFocusActiveTeaser(t,e){const n=t[0];n&&n.querySelector("a")&&(n.setAttribute("tabindex",0),n.querySelector("a").focus())}adjustInfinytePagination({navContainer:t,navItems:e,index:n,slideBy:i,cloneCount:s=0},a){const r=Array.from(e).filter(t=>"none"!==t.style.display),l=Array.from(r),o=r.length,d=Math.ceil((n-s)/i),u=Math.ceil(a/2),h=o-u,c=d>=u&&d<h,m=d>=h;let p="-";o<=a||("rtl"==f&&(p=""),d<u&&((0,v.vg)(l,"tns-nav-small"),(0,v.BK)([l[a-1]],"tns-nav-small"),t.style.transform=`translateX(${p}0px)`),c&&((0,v.vg)(l,"tns-nav-small"),(0,v.BK)([l[d-u+1],l[d+u-1]],"tns-nav-small"),t.style.transform=`translateX(${p}${15*(d-(u-1))}px)`),m&&((0,v.vg)(l,"tns-nav-small"),(0,v.BK)([l[o-a]],"tns-nav-small"),t.style.transform=`translateX(${p}${15*(h-(u-1))}px)`))}}y.setup(p)},61269:(t,e,n)=>{n.d(e,{E:()=>s});var i=n(60778);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return(0,i.T)(function(t,e){var n=function(n){for(var i=n,s=0;s<e;s++){var a=i[t[s]];if(void 0===a)return;i=a}return i};return n}(t,n))(e)}}}}]); 2//# sourceMappingURL=/dist/NiveaX/./modules/SliderPagination.6b2f909d.js.f94c56f6.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.