{"version":3,"sources":["webpack:///./widgets/parallaxFullWidthBlock.js"],"names":["ParallaxFullWidthBlock","$el","_classCallCheck","this","key","value","$wg","$","$imgWrapper","find","WG","$img","src","attr","addClass","css","backgroundImage","concat","utils","isIOS","isAndroid","isSmallerThanTablet","hasClass","removeClass","window","jarallaxLoaded","jarallax","querySelectorAll","getScript","done","backgroundAttachment"],"mappings":"s3BAGA,IASaA,EAAsB,WAIjC,O,EAHD,SAAAA,EAAYC,I,4FAAKC,CAAA,KAAAF,GAEhBG,KAAKF,IAAMA,I,EACX,EAAAG,IAAA,OAAAC,MAED,WACC,IAAMC,EAAMC,EAAEJ,KAAKF,KACfO,EAAcF,EAAIG,KAAKC,iCACvBC,EAAOL,EAAIG,KAAK,OAChBG,EAAMD,EAAKE,KAAK,OAEpBF,EAAKG,SAAS,UAEdN,EAAYO,IAAI,CACfC,gBAAiB,OAAFC,OAASL,EAAG,OAGvBM,IAAMC,SAAYD,IAAME,aAAgBF,IAAMG,wBAC9Cf,EAAIgB,SAAS,gBAChBd,EAAYO,IAAI,CACfC,gBAAiB,KAGlBL,EAAKY,YAAY,UAAUT,SAAS,gBACpCN,EAAYM,SAAS,YAEjBU,OAAOC,eAEVC,SAASpB,EAAI,GAAGqB,iBAAiB,cAEjCpB,EAAEqB,UAAU,qDACXC,MAAK,WACLL,OAAOC,gBAAiB,EAExBC,SAASpB,EAAI,GAAGqB,iBAAiB,kBAInCnB,EAAYO,IAAI,CACfe,qBAAsB,gB,0FAxCQ,I","file":"52.js","sourcesContent":["/* eslint-disable max-len */\n/* eslint-disable no-unused-vars */\n// CONSTANTS are all caps.\nconst NS = 'ParallaxFullWidthBlock';\nconst CLS = 'parallaxFullWidthBlock';\nconst WG = '.' + CLS + '-';\n\n// Import stuff here if you need to or even better to import them dynamically\n// for ex. of dynamic import check out src/scripts/loadWg/parallaxFullWidthBlock.js using Webpack dynamic imports as chunks.\n// import $ from 'jquery'\nimport utils from '../utils';\n\nexport class ParallaxFullWidthBlock {\n\tconstructor($el) {\n\t\t// $el is the widget node return by the loadParallaxFullWidthBlock function\n\t\tthis.$el = $el;\n\t}\n\n\tinit() {\n\t\tconst $wg = $(this.$el);\n\t\tlet $imgWrapper = $wg.find(WG + 'image');\n\t\tlet $img = $wg.find('img');\n\t\tlet src = $img.attr('src');\n\n\t\t$img.addClass('d-none');\n\n\t\t$imgWrapper.css({\n\t\t\tbackgroundImage: `url(${src})`,\n\t\t});\n\n\t\tif (!utils.isIOS() && !utils.isAndroid() && !utils.isSmallerThanTablet()) {\n\t\t\tif ($wg.hasClass('js-parallax')) {\n\t\t\t\t$imgWrapper.css({\n\t\t\t\t\tbackgroundImage: '',\n\t\t\t\t});\n\n\t\t\t\t$img.removeClass('d-none').addClass('jarallax-img');\n\t\t\t\t$imgWrapper.addClass('jarallax');\n\n\t\t\t\tif (window.jarallaxLoaded) {\n\t\t\t\t\t// eslint-disable-next-line no-undef\n\t\t\t\t\tjarallax($wg[0].querySelectorAll('.jarallax'));\n\t\t\t\t} else {\n\t\t\t\t\t$.getScript('https://unpkg.com/jarallax@1/dist/jarallax.min.js')\n\t\t\t\t\t.done(() => {\n\t\t\t\t\t\twindow.jarallaxLoaded = true;\n\t\t\t\t\t\t// eslint-disable-next-line no-undef\n\t\t\t\t\t\tjarallax($wg[0].querySelectorAll('.jarallax'));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$imgWrapper.css({\n\t\t\t\t\tbackgroundAttachment: 'fixed',\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t// Add more functions like on above here\n}\n"],"sourceRoot":""}