{"version":3,"sources":["webpack:///./src/components/pmicom/widgets/section-highlight/controller.js"],"names":["MAIN_EASING","DELAY_DEBOUNCE","CLASS_NO_DISPLAY","require","default","slowDelay","breakSmall","stuttering","onWidthResize","getNumber","mediaQueryMin","trackGtm4","asyncImport","duration","trackGtm","CLASS_NOT_CURRENT","CLASS_CURRENT","module","exports","init","highlights","root","querySelectorAll","resize","bind","DEBOUNCE","track","clean","touch","set","enable","mobileinitialized","mobileInit","update","updateContentSize","dots","getElementsByClassName","contentSlot","querySelector","counter","total","length","current","classList","add","style","opacity","touchInit","Hammer","on","increment","decrement","getNext","getPrevious","forwardDirection","undefined","highlight","height","clientHeight","anime","targets","easing","getDirection","Math","abs","animateSlide","previousHighlight","animations","translateX","window","innerWidth","setCurrent","forEach","remove","dot","previousDot","setTimeout","innerHTML","Array","from","content","picture","removeAttribute","animation","pause","widgetTitle","link","addEventListener","eventCategory","eventAction","eventLabel","href","event","widget_name","widget_title","link_text","link_url","button_type"],"mappings":";;;;;;;;;AAAA,MAAM;EACLA,WADK;EAELC,cAFK;EAGLC;AAHK,IAIFC,mBAAO,CAAC,iDAAD,CAJX;;AAKA,MAAM;EACLC,OAAO,EAAE;IAAEC,SAAF;IAAaC;EAAb;AADJ,IAEFH,mBAAO,CAAC,iEAAD,CAFX;;AAGA,MAAM;EACLI,UADK;EAELH,OAAO,EAAEI;AAFJ,IAGFL,mBAAO,CAAC,+DAAD,CAHX;;AAIA,MAAM;EACLM,SADK;EAELC,aAFK;EAGLC;AAHK,IAIFR,mBAAO,CAAC,uDAAD,CAJX;;AAKA,MAAMS,WAAW,GAAGT,mBAAO,CAAC,iDAAD,CAAP,CAA4BC,OAAhD;;AAEA,MAAMS,QAAQ,GAAGJ,SAAS,CAACJ,SAAD,CAAT,GAAuB,IAAxC;;AAEA,MAAM;EAAES;AAAF,IAAeX,mBAAO,CAAC,uDAAD,CAA5B;;AAEA,MAAMY,iBAAiB,GAAG,aAA1B;AACA,MAAMC,aAAa,GAAG,SA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Y,\n} = require('../../../../js/consts');\nconst {\n\tdefault: { slowDelay, breakSmall },\n} = require('../../../../js/sass-variables');\nconst {\n\tstuttering,\n\tdefault: onWidthResize,\n} = require('../../../../js/onWidthResize');\nconst {\n\tgetNumber,\n\tmediaQueryMin,\n\ttrackGtm4,\n} = require('../../../../js/functions');\nconst asyncImport = require('util/asyncImport').default;\n\nconst duration = getNumber(slowDelay) * 1000;\n\nconst { trackGtm } = require('../../../../js/functions');\n\nconst CLASS_NOT_CURRENT = 'not-current';\nconst CLASS_CURRENT = 'current';\n\nmodule.exports = {\n\tasync init() {\n\t\tthis.highlights = this.root.querySelectorAll('.section-highlight');\n\t\tawait asyncImport(this, ['anime', 'Hammer']);\n\t\tonWidthResize(this.resize.bind(this), stuttering.DEBOUNCE, DELAY_DEBOUNCE);\n\n\t\tthis.resize();\n\t\tthis.track();\n\t},\n\tresize() {\n\t\tif (mediaQueryMin(breakSmall)) {\n\t\t\t// desktop\n\t\t\t// check if coming from mobile\n\t\t\tthis.clean();\n\t\t\tif (this.touch)\n\t\t\t\tthis.touch.set({\n\t\t\t\t\tenable: false,\n\t\t\t\t});\n\t\t} else {\n\t\t\t// mobile\n\t\t\t// if not initialized, initialise\n\t\t\tif (!this.mobileinitialized) {\n\t\t\t\tthis.mobileInit();\n\t\t\t} else {\n\t\t\t\tthis.update(0);\n\t\t\t\tthis.touch.set({\n\t\t\t\t\tenable: true,\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.updateContentSize();\n\t\t}\n\t},\n\tmobileInit() {\n\t\tthis.dots = this.root.getElementsByClassName('carousel-dot');\n\t\tthis.contentSlot = this.root.querySelector(\n\t\t\t'.section-highlights--content-slot',\n\t\t);\n\t\tthis.counter = this.root.querySelector('.section-highlights--counter');\n\t\tthis.total = this.dots.length;\n\t\tthis.current = 0;\n\n\t\t// one slide case\n\t\tif (this.total < 2) {\n\t\t\tthis.counter.classList.add(CLASS_NO_DISPLAY);\n\t\t\tthis.root\n\t\t\t\t.querySelector('.section-highlights--dots')\n\t\t\t\t.classList.add(CLASS_NO_DISPLAY);\n\t\t\tthis.highlights[0].querySelector(\n\t\t\t\t'.section-highlight--content',\n\t\t\t).style.opacity = 1;\n\t\t\tthis.highlights[0].querySelector(\n\t\t\t\t'.section-highlight--picture',\n\t\t\t).style.opacity = 1;\n\t\t\tthis.updateContentSize();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.touchInit();\n\t\tthis.mobileinitialized = true;\n\t\tthis.update(0);\n\t},\n\ttouchInit() {\n\t\tthis.touch = new this.Hammer(this.root);\n\t\tthis.touch.on('swipeleft', () => {\n\t\t\tthis.increment();\n\t\t});\n\t\tthis.touch.on('swiperight', () => {\n\t\t\tthis.decrement();\n\t\t});\n\t},\n\tgetNext() {\n\t\tif (this.current >= this.total - 1) return 0;\n\t\telse return this.current + 1;\n\t},\n\tgetPrevious() {\n\t\tif (this.current <= 0) return this.total - 1;\n\t\telse return this.current - 1;\n\t},\n\tincrement() {\n\t\tthis.forwardDirection = true;\n\t\tthis.update(this.getNext());\n\t\tthis.forwardDirection = undefined;\n\t},\n\tdecrement() {\n\t\tthis.forwardDirection = false;\n\t\tthis.update(this.getPrevious());\n\t\tthis.forwardDirection = undefined;\n\t},\n\tupdateContentSize() {\n\t\tconst highlight = this.highlights[this.current].getElementsByClassName(\n\t\t\t'section-highlight--content',\n\t\t)[0];\n\t\tconst height = highlight.clientHeight;\n\n\t\tthis.anime({\n\t\t\ttargets: this.contentSlot,\n\t\t\teasing: MAIN_EASING,\n\t\t\tduration,\n\t\t\theight,\n\t\t});\n\t},\n\tgetDirection(current) {\n\t\tlet forwardDirection;\n\t\tif (this.forwardDirection !== undefined) {\n\t\t\tforwardDirection = this.forwardDirection;\n\t\t} else {\n\t\t\tforwardDirection = current > this.current;\n\t\t\tif (Math.abs(current - this.current) > 1)\n\t\t\t\tforwardDirection = !forwardDirection;\n\t\t}\n\t\treturn forwardDirection;\n\t},\n\tanimateSlide(highlight, previousHighlight, forwardDirection) {\n\t\tthis.animations = [\n\t\t\tthis.anime({\n\t\t\t\ttargets: highlight.querySelector('.section-highlight--content'),\n\t\t\t\topacity: [0, 0.01, 1],\n\t\t\t\ttranslateX: forwardDirection\n\t\t\t\t\t? [window.innerWidth, 0]\n\t\t\t\t\t: [-window.innerWidth, 0],\n\t\t\t\tduration,\n\t\t\t\teasing: 'linear',\n\t\t\t}),\n\t\t\tthis.anime({\n\t\t\t\ttargets: previousHighlight.querySelector('.section-highlight--content'),\n\t\t\t\ttranslateX: forwardDirection\n\t\t\t\t\t? [0, -window.innerWidth]\n\t\t\t\t\t: [0, window.innerWidth],\n\t\t\t\topacity: [1, 0.01, 0],\n\t\t\t\tduration,\n\t\t\t\teasing: 'linear',\n\t\t\t}),\n\t\t\tthis.anime({\n\t\t\t\ttargets: highlight.querySelector('.section-highlight--picture'),\n\t\t\t\topacity: [0, 1],\n\t\t\t\tduration,\n\t\t\t\teasing: 'linear',\n\t\t\t}),\n\t\t\tthis.anime({\n\t\t\t\ttargets: previousHighlight.querySelector('.section-highlight--picture'),\n\t\t\t\topacity: [1, 0],\n\t\t\t\tduration,\n\t\t\t\teasing: 'linear',\n\t\t\t}),\n\t\t];\n\t},\n\tsetCurrent(current) {\n\t\tthis.highlights.forEach(highlight => {\n\t\t\tif (highlight === current) {\n\t\t\t\thighlight.classList.add(CLASS_CURRENT);\n\t\t\t\thighlight.classList.remove(CLASS_NOT_CURRENT);\n\t\t\t} else {\n\t\t\t\thighlight.classList.add(CLASS_NOT_CURRENT);\n\t\t\t\thighlight.classList.remove(CLASS_CURRENT);\n\t\t\t}\n\t\t});\n\t},\n\tupdate(current) {\n\t\tconst dot = this.dots[current];\n\t\tconst previousDot = this.dots[this.current];\n\t\tconst highlight = this.highlights[current];\n\t\tconst previousHighlight = this.highlights[this.current];\n\t\tthis.setCurrent(highlight);\n\n\t\tif (this.current !== current) {\n\t\t\tconst forwardDirection = this.getDirection(current);\n\t\t\tthis.animateSlide(highlight, previousHighlight, forwardDirection);\n\t\t} else {\n\t\t\thighlight.querySelector('.section-highlight--content').style.opacity = 1;\n\t\t\thighlight.querySelector('.section-highlight--picture').style.opacity = 1;\n\t\t}\n\n\t\tpreviousDot.classList.remove('active');\n\t\tdot.classList.add('active');\n\n\t\tthis.current = current;\n\t\tthis.updateContentSize();\n\n\t\t// update counter in the middle\n\t\tsetTimeout(() => {\n\t\t\tthis.counter.innerHTML = `${this.current + 1} / ${this.total}`;\n\t\t}, duration / 2);\n\t},\n\tclean() {\n\t\tif (this.highlights) {\n\t\t\tArray.from(this.highlights).forEach(highlight => {\n\t\t\t\tconst content = highlight.querySelector('.section-highlight--content');\n\t\t\t\tconst picture = highlight.querySelector('.section-highlight--picture');\n\t\t\t\thighlight.classList.remove(CLASS_NOT_CURRENT);\n\t\t\t\tcontent.removeAttribute('style');\n\t\t\t\tpicture.removeAttribute('style');\n\t\t\t});\n\t\t}\n\t\tif (this.animations) {\n\t\t\tthis.animations.forEach(animation => {\n\t\t\t\tanimation.pause();\n\t\t\t});\n\t\t}\n\t},\n\n\ttrack() {\n\t\tthis.highlights.forEach(highlight => {\n\t\t\tconst widgetTitle = this.root.querySelector(\n\t\t\t\t'.section-highlights--title',\n\t\t\t)?.innerHTML;\n\t\t\tconst link = highlight.querySelector('.section-highlight--link');\n\t\t\thighlight.addEventListener('click', () => {\n\t\t\t\ttrackGtm({\n\t\t\t\t\teventCategory: 'cta',\n\t\t\t\t\teventAction: 'read',\n\t\t\t\t\teventLabel: link.href,\n\t\t\t\t});\n\t\t\t\ttrackGtm4({\n\t\t\t\t\tevent: 'GA4_event_c_cta',\n\t\t\t\t\twidget_name: 'V3-Section highlight',\n\t\t\t\t\twidget_title: widgetTitle ? widgetTitle : 'No title: Title not set',\n\t\t\t\t\tlink_text: link.innerHTML ? link.innerHTML : 'No text; Text not set',\n\t\t\t\t\tlink_url: link.href,\n\t\t\t\t\tbutton_type: '',\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t},\n};\n"],"sourceRoot":""}