{"version":3,"sources":["webpack:///./web/themes/custom/windracer_wines/js/script.js"],"names":["mqXS","window","matchMedia","mqSM","toggle","document","getElementById","menu","navWrapper","querySelector","addEventListener","getElementsByTagName","classList","contains","remove","add","e","target","getAttribute","hasAttribute","preventDefault","accordionBtns","querySelectorAll","forEach","accordion","content","nextElementSibling","gsap","ScrollTrigger","registerPlugin","graphics","Array","prototype","slice","call","graphic","create","trigger","start","onEnter","zoomGraphic","onLeaveBack","toggleActions","to","yPercent","scrollTrigger","end","scrub","container","set","y","columnsImages","utils","toArray","columnImage","duration","zoomColImage","columnsCopyBoxes","columnsCopyBox","matches","masonryWrapper","index","reversed","masonryItem","direction"],"mappings":";;;;;AAAA;AACA,IAAIA,IAAI,GAAGC,MAAM,CAACC,UAAP,CAAkB,oBAAlB,CAAX;AACA,IAAIC,IAAI,GAAGF,MAAM,CAACC,UAAP,CAAmB,oBAAnB,CAAX,C,CAEA;;AACA,IAAIE,MAAM,GAAGC,QAAQ,CAACC,cAAT,CAAwB,QAAxB,CAAb;AACA,IAAIC,IAAI,GAAGF,QAAQ,CAACC,cAAT,CAAwB,iBAAxB,CAAX;AACA,IAAIE,UAAU,GAAGH,QAAQ,CAACI,aAAT,CAAuB,qBAAvB,CAAjB;AAEAL,MAAM,SAAN,IAAAA,MAAM,WAAN,YAAAA,MAAM,CAAEM,gBAAR,CAAyB,OAAzB,EAAkC,YAAY;AAC1CL,UAAQ,CAACM,oBAAT,CAA+B,MAA/B,EAAwC,CAAxC,EAA2CC,SAA3C,CAAqDR,MAArD,CAA4D,aAA5D;AACAI,YAAU,SAAV,IAAAA,UAAU,WAAV,YAAAA,UAAU,CAAEI,SAAZ,CAAsBR,MAAtB,CAA6B,MAA7B;AACAA,QAAM,SAAN,IAAAA,MAAM,WAAN,YAAAA,MAAM,CAAEQ,SAAR,CAAkBR,MAAlB,CAAyB,eAAzB;;AACD,MAAIG,IAAJ,aAAIA,IAAJ,eAAIA,IAAI,CAAEK,SAAN,CAAgBC,QAAh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AAlB,CAA0BmC,cAAc,IAAI;AAC5C/B,QAAI,CAACgB,EAAL,CAAQe,cAAR,EAAwB;AACpBd,cAAQ,EAAE,CAAC,EADS;AAEpBC,mBAAa,EAAE;AACXR,eAAO,EAAEqB,cADE;AAEXhB,qBAAa,EAAE,6BAFJ;AAGXK,aAAK,EAAE;AAHI;AAFK,KAAxB;AAQH,GATG;AAWJ;;AACA,MAAI,CAAC5C,IAAI,CAACwD,OAAV,EAAmB;AACftD,YAAQ,CAACiB,gBAAT,CAA0B,kBAA1B,EAA8CC,OAA9C,CAAsD,UAAUqC,cAAV,EAA0BC,KAA1B,EAAiC;AACnF,UAAIC,QAAQ,GAAGD,KAAK,GAAG,CAAR,KAAc,CAAd,GAAkB,CAAlB,GAAsB,CAAC,CAAtC;AAEAD,oBAAc,CAACtC,gBAAf,CAAgC,eAAhC,EAAiDC,OAAjD,CAAyD,UAAUwC,WAAV,EAAuBF,KAAvB,EAA8B;AACnFlC,YAAI,CAACsB,GAAL,CAASc,WAAT,EAAsB;AAClBb,WAAC,EAAEW,KAAK,GAAGC,QAAR,GAAmB,CAAC;AADL,SAAtB;AAGA,YAAIE,SAAS,GAAGH,KAAK,GAAG,CAAR,GAAY,CAAZ,GAAgB,CAAC,CAAjC;AACAlC,YAAI,CAACgB,EAAL,CAAQoB,WAAR,EAAqB;AACjBb,WAAC,EAAEc,SAAS,GAAGF,QAAZ,GAAuB,EADT;AAEjBjB,uBAAa,EAAE;AACXR,mBAAO,EAAEuB,cADE;AAEXtB,iBAAK,EAAE,SAFI;AAGXI,yBAAa,EAAE,6BAHJ;AAIXK,iBAAK,EAAE;AAJI;AAFE,SAArB;AASH,OAdD;AAeH,KAlBD;AAmBH;AACJ,C","file":"./web/themes/custom/windracer_wines/js/script-min.js","sourcesContent":["// Media Query\nlet mqXS = window.matchMedia(\"(max-width: 576px)\");\nlet mqSM = window.matchMedia( \"(max-width: 768px)\" );\n\n// Site Navigation\nlet toggle = document.getElementById('toggle');\nlet menu = document.getElementById('site-navigation');\nlet navWrapper = document.querySelector('.navigation-wrapper');\n\ntoggle?.addEventListener('click', function () {\n document.getElementsByTagName( 'html' )[0].classList.toggle('lock-scroll');\n navWrapper?.classList.toggle('open'); \n toggle?.classList.toggle('toggle-active'); \n \tif (menu?.classList.contains('is-active')) {\n \tmenu?.classList.remove('is-active');\n \t} else {\n \tmenu?.classList.add('is-active'); \n \t}\n});\n\n// Modal\ndocument.addEventListener('click', function (e) {\n let target = e.target;\n\n if (target?.getAttribute('data-toggle') == 'modal' && target?.hasAttribute('data-target')) {\n document.getElementById(target.getAttribute('data-target'))?.classList.add('open');\n document.querySelector('body').classList.add('prevent-scroll');\n e.preventDefault();\n }\n\n // Close modal window with 'data-dismiss' attribute or when the backdrop is clicked\n if (target?.getAttribute('data-dismiss') == 'modal' || target?.classList.contains('modal')) {\n document.querySelector('[class=\"modal open\"]')?.classList.remove('open');\n document.querySelector('body').classList.remove('prevent-scroll');\n e.preventDefault();\n }\n}, false);\n\nconst accordionBtns = document.querySelectorAll('.modal .accordion-toggle');\naccordionBtns.forEach((accordion) => {\n accordion.addEventListener('click', function (e) {\n e.target?.classList.toggle(\"accordion-open\");\n let content = e.target?.nextElementSibling;\n });\n});\n\n// Amimation on page scroll\nif (window.gsap && window.ScrollTrigger) {\n gsap.registerPlugin(ScrollTrigger);\n\n // Zoom in full width graphic\n let graphics = document.querySelectorAll('.graphic');\n Array.prototype.slice.call(graphics).forEach(function (graphic) {\n ScrollTrigger.create({\n trigger: graphic,\n start: \"top center\",\n onEnter: () => zoomGraphic(),\n onLeaveBack: () => zoomGraphic(),\n toggleActions: \"restart pause reverse pause\",\n });\n function zoomGraphic() {\n graphic.classList.toggle('zoom-in')\n };\n });\n\n // Pull up blurb container\n gsap.to(\".blurb.video-blurb .container\", {\n yPercent: -12,\n scrollTrigger: {\n trigger: \".video-blurb\",\n start: \"top 95%\",\n end: \"bottom center\",\n toggleActions: \"restart pause reverse pause\",\n scrub: 1,\n },\n });\n\n /* PULL UP IMAGE BLURB */\n document.querySelectorAll(\".blurb.image-blurb .container\").forEach(function (container) {\n gsap.set(container, {\n y: 88\n });\n });\n gsap.to(\".blurb.image-blurb .container\", {\n y: -88,\n scrollTrigger: {\n trigger: \".image-blurb\",\n start: \"top 70%\",\n end: \"bottom 90%\",\n toggleActions: \"restart pause reverse pause\",\n scrub: 1,\n },\n });\n\n // Zoom in column image\n const columnsImages = gsap.utils.toArray('.column-image');\n\n columnsImages?.forEach(columnImage => {\n gsap.to(\".column-image\", {\n duration: 5,\n scrollTrigger: {\n trigger: columnImage,\n start: \"top 90%\",\n onEnter: () => zoomColImage(),\n onLeaveBack: () => zoomColImage(),\n scrub: true\n },\n });\n function zoomColImage() {\n columnImage.classList.toggle('zoom-in')\n };\n });\n\n // Pull up column copy\n const columnsCopyBoxes = gsap.utils.toArray('.column-frame');\n columnsCopyBoxes?.forEach(columnsCopyBox => {\n gsap.to(columnsCopyBox, {\n yPercent: -10,\n scrollTrigger: {\n trigger: columnsCopyBox,\n toggleActions: \"restart pause reverse pause\",\n scrub: 1,\n },\n });\n });\n\n /* SHIFT MASONRY ITEMS */\n if (!mqSM.matches) {\n document.querySelectorAll('.masonry-wrapper').forEach(function (masonryWrapper, index) {\n let reversed = index % 2 === 0 ? 1 : -1;\n \n masonryWrapper.querySelectorAll('.masonry-item').forEach(function (masonryItem, index) {\n gsap.set(masonryItem, {\n y: index * reversed * -70,\n });\n let direction = index % 2 ? 1 : -1;\n gsap.to(masonryItem, {\n y: direction * reversed * 70,\n scrollTrigger: {\n trigger: masonryWrapper,\n start: \"top 90%\",\n toggleActions: \"restart pause reverse pause\",\n scrub: 1\n },\n });\n });\n });\n }\n}\n"],"sourceRoot":""}