{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./modules/navbar/navbar.js","webpack:///./scripts/components/spinner.js","webpack:///./scripts/app.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","0","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","document","addEventListener","navbar","debounce","func","timeout","wait","arguments","undefined","immediate","context","this","args","later","callNow","clearTimeout","setTimeout","navbarToggler","querySelector","event","preventDefault","body","classList","toggle","navbarElement","contains","scrollingElement","scrollTop","offsetTop","add","remove","navbarShowHidetPixels","clientHeight","scrollPos","windowY","scrollY","spinner","show","elem","getElementById","createElement","setAttribute","innerHTML","appendChild","hide","getUrlParam","parameter","defaultvalue","vars","urlparameter","location","href","indexOf","replace","revealCallback","el","$","hasClass","each","prop","animate","Counter","attr","duration","easing","step","now","text","Math","ceil","setCookie","days","date","Date","setTime","getTime","expires","toGMTString","cookie","myapp","LazyLoad","elements_selector","use_native","load_delay","update","ScrollReveal","reveal","afterReveal","mytext","decodedData","atob","val","nameEQ","ca","split","charAt","substring","getCookie","exists","removeClass","on","modal","addClass","jQuery","fn","barba","use","barbaCss","hooks","once","enter","ajax","url","next","success","newHTML","textStatus","jqXHR","headTags","join","find","appendTo","newplaceholdersection","html","newmenu","js","globalEval","error","xhr","ajaxOptions","thrownError","complete","leave","before","init","cacheIgnore","prefetchIgnore","debug","logLevel"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,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,KAAKC,GAGpC,IAAIC,EAAKrE,IAAE2D,GAASK,KAAK,UACf,MAANK,GACArE,IAAEsE,WAAWD,EAAGF,QAGpB5C,KAEJgD,MAAO,SAAUC,EAAKC,EAAaC,KAKnCC,SAAU,WACN/F,IAAUQ,aAItB6D,IAAMG,MAAMwB,OAAM,WAGdhG,IAAUC,OAEVrC,SAASqB,KAAKC,UAAUQ,OAAO,kBAE/B0B,IAAE,aAAaI,QACX,CACIjC,UAAW,GAEf,QAGR8E,IAAMG,MAAMyB,QAAO,eAenB5B,IAAM6B,KAAK,CACPjI,QAAS,IACTkI,aAAa,EACbC,gBAAgB,EAChBC,OAAO,EAEPC,SAAU,UAiBdlF,KAAE","file":"app.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t0: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([5,1]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","/**\n * Navbar\n */\n\nexport function navbar () {\n // Debounce function which waits 10ms before firing. We use it so we don't fire events like crazy during long scroll sessions\n\n function debounce (func, wait = 10, immediate = true) {\n let timeout\n return function () {\n let context = this\n let args = arguments\n let later = function () {\n timeout = null\n if (!immediate) func.apply(context, args)\n }\n let callNow = immediate && !timeout\n clearTimeout(timeout)\n timeout = setTimeout(later, wait)\n if (callNow) func.apply(context, args)\n }\n }\n\n // Show menu overlay on the mobile devices when click the navbar toggler\n const navbarToggler = document.querySelector('.js-navbar-toggler')\n\n if (navbarToggler) {\n navbarToggler.addEventListener('click', function (event) {\n event.preventDefault()\n document.body.classList.toggle('navbar--opened')\n })\n }\n\n // Add class to navbar after certain amount of pixels are scrolled\n\n const navbarElement = document.querySelector('.js-navbar')\n const navbarTransparentPixels = 150\n\n if (navbarElement) {\n if (navbarElement.classList.contains('navbar--fixed-transparent')) {\n function navbarTransparent () {\n let scrolled = document.scrollingElement.scrollTop\n let position = navbarElement.offsetTop\n if (scrolled > position + navbarTransparentPixels) {\n navbarElement.classList.add('navbar--scrolled')\n } else {\n navbarElement.classList.remove('navbar--scrolled')\n }\n }\n\n window.addEventListener('scroll', debounce(navbarTransparent))\n }\n }\n\n // Navbar slides out of view when scrolling down and slides back in when scrolling up\n // Based on https://dev.to/changoman/showhide-element-on-scroll-w-vanilla-js-3odm\n\n if (navbarElement) {\n if (navbarElement.classList.contains('navbar--fixed-showhide')) {\n const navbarShowHidetPixels = navbarElement.clientHeight\n let scrollPos = 0\n\n function navbarShowHide () {\n var scrolled = document.scrollingElement.scrollTop\n var position = navbarElement.offsetTop\n if (scrolled > position + navbarShowHidetPixels) {\n let windowY = window.scrollY\n if (windowY < scrollPos) {\n // Scrolling UP\n navbarElement.classList.add('on-stage')\n navbarElement.classList.remove('out-stage')\n } else {\n // Scrolling DOWN\n navbarElement.classList.add('out-stage')\n navbarElement.classList.remove('on-stage')\n }\n scrollPos = windowY\n } else {\n navbarElement.classList.remove('on-stage')\n }\n }\n\n window.addEventListener('scroll', debounce(navbarShowHide))\n }\n }\n}\n\ndocument.addEventListener('DOMContentLoaded', function () {\n // console.log('load')\n // navbar()\n})\n\nexport default navbar\n","/**\n * Spinner\n */\n\nexport function spinner () {\n // Show\n var create = function () {\n var elem = document.createElement('div')\n elem.setAttribute('id', 'spinner')\n elem.innerHTML =\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
' +\n '
';\n\n document.body.appendChild(elem)\n show(elem)\n };\n\n var show = function (elem) {\n // elem.className += 'show'\n var el = document.getElementById('spinner')\n el.classList.add('show')\n };\n\n // Hide\n var hide = function () {\n var el = document.getElementById('spinner')\n // el.parentNode.removeChild(el)\n el.classList.remove('show')\n };\n\n return {\n create: create,\n show: show,\n hide: hide\n }\n}\n\nexport default spinner\n","/*\n * @title App\n * @description Application entry point\n */\n// Jquery\nimport $ from \"jquery\";\n\nwindow.jQuery = $;\nwindow.$ = $;\n// var Modernizr = require(\"browsernizr\");\n\n// Barba - pages transition\nimport barba from '@barba/core';\nimport barbaCss from \"@barba/css\";\n\n// Modules\nimport navbar from \"../modules/navbar/navbar\";\n// import carousel from \"../modules/carousel/carousel\";\n\n// Gallery\n// import lightGallery from \"lightgallery\";\n// import \"lg-video\";\n\n// Modal\n// import modal from \"jquery-modal\";\n\n// Lazyload image\nimport LazyLoad from \"vanilla-lazyload\";\n\n// Reveal element on scroll\nimport ScrollReveal from \"scrollreveal\";\n\n// Infinite scroll\n// var InfiniteScroll = require(\"infinite-scroll\");\n\n// Google maps api\n// var GoogleMapsLoader = require(\"google-maps\");\n\n// Components\nimport spinner from \"./components/spinner\";\n\n// Thom Form\n// require(\"./components/thom_form\");\n\n// exist element\n$.fn.exists = function () {\n return this.length !== 0;\n};\n\nfunction getUrlVars() {\n var vars = {};\n var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {\n vars[key] = value;\n });\n return vars;\n}\n\nfunction getUrlParam(parameter, defaultvalue){\n var urlparameter = defaultvalue;\n if(window.location.href.indexOf(parameter) > -1){\n urlparameter = getUrlVars()[parameter];\n }\n return urlparameter;\n}\n\nfunction revealCallback (el) {\n // console.log(el)\n if($(el).hasClass('numbers')){\n $('.numbers .count').each(function () {\n $(this).prop('Counter', 0).animate({\n Counter: $(this).attr('num')\n }, {\n duration: 1500,\n easing: 'swing',\n step: function (now) {\n $(this).text(Math.ceil(now))\n }\n })\n })\n }\n}\n\nfunction setCookie (name, value, days) {\n if (days) {\n var date = new Date()\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000)\n var expires = '; expires=' + date.toGMTString()\n } else var expires = ''\n document.cookie = name + '=' + value + expires + '; path=/'\n }\n \n function getCookie (name) {\n var nameEQ = name + '='\n var ca = document.cookie.split(';')\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i]\n while (c.charAt(0) == ' ') c = c.substring(1, c.length)\n if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length)\n }\n return null\n }\n \n function deleteCookie (name) {\n setCookie(name, '', -1)\n }\n\nfunction myapp() {\n let myLazyLoad = new LazyLoad({\n elements_selector: \".lazy\",\n use_native: true,\n load_delay: 50\n });\n myLazyLoad.update()\n\n // Reveal element on scroll\n let sr = ScrollReveal();\n sr.reveal(\".reveal\", {\n // delay: 50,\n // distance: \"10px\",\n // interval: 50,\n // mobile: false,\n afterReveal: revealCallback\n });\n\n\n // var crypt = window.btoa('andrea@thehouseofmouse.net')\n // console.log(crypt)\n\n var mytext = getUrlParam('id','Empty');\n if(mytext !== 'Empty') {\n var decodedData = window.atob(mytext);\n $('#emailInput').val(decodedData)\n }\n\n // Popup Comunicazione\n // se il cookie \"displayedCommunicationModal\" ha valore diverso da \"yes\"\n if (getCookie('displayedCommunicationModal') != \"yes\" && $('#communicationModal').exists()) {\n\n $('#communicationModal').removeClass('disable');\n \n $('#communicationModal .close').on('click', function (event, modal) {\n $('#communicationModal').addClass('disable');\n setCookie('displayedCommunicationModal', 'yes', 30);\n });\n }\n // console.log(decodedData)\n\n // $('.radio-group .thom-form__checkcont__checkbox').change(function () {\n // if(this.checked)\n // $('.radio-group .thom-form__checkcont__checkbox').not(this). prop(\"checked\", false);\n // });\n\n // open image popup\n /*$(\".gallery__btn\").lightGallery({\n selector: \".gallery__item\",\n download: false,\n counter: false\n });*/\n\n // open video popup\n /*$(\".btn-video\").lightGallery({\n selector: \"this\",\n download: false,\n counter: false,\n videoMaxWidth: \"100%\",\n getCaptionFromTitleOrAlt: false,\n youtubePlayerParams: {\n modestbranding: 1,\n showinfo: 0,\n rel: 0,\n controls: 0\n },\n vimeoPlayerParams: {\n byline: 0,\n portrait: 0\n }\n });*/\n\n // analyticsUpdate();\n}\n\n// start script\nbarba.use(barbaCss);\n\n// define a global hook\nbarba.hooks.once(() => {\n // this hook will be called for each transitions\n // console.log('APPEAR - global hook')\n navbar();\n myapp();\n\n // Ajax modal\n /*$('a[rel=\"ajax:modal\"]').click(function (event) {\n event.preventDefault();\n this.blur();\n $.ajax({\n url: $(this).attr(\"href\"),\n success: function (newHTML, textStatus, jqXHR) {\n var myHtml = $(newHTML).find(\".ajax-load\");\n $(myHtml)\n .appendTo(\"body\")\n .modal({\n fadeDuration: 250,\n fadeDelay: 1.1,\n closeClass: \"icon-remove\",\n closeText: \"\",\n spinnerHtml:\n '
'\n });\n },\n error: function (jqXHR, textStatus, errorThrown) {\n // Handle AJAX errors\n },\n complete: function () {\n }\n // More AJAX customization goes here.\n });\n\n return false;\n });\n // Remove appended div to modal after close\n $(document).on($.modal.AFTER_CLOSE, function (event, modal) {\n $(\".ajax-load.modal\").remove();\n });*/\n\n // Analytics update\n /*$(document).on($.modal.OPEN, function (event, modal) {\n // analyticsUpdate();\n console.log(\"1\");\n $(modal.$anchor)\n .find(\".close-modal\")\n .attr(\"data-barba-prevent\", \"self\");\n });\n $(document).on($.modal.CLOSE, function (event, modal) {\n console.log(\"2\");\n // analyticsUpdate();\n });*/\n\n $(\"#spinner\").removeClass(\"default\");\n // setTimeout(function() {\n // $(\"#spinner\");.remove()\n // }, 800);\n\n\n});\n\nbarba.hooks.enter(data => {\n $.ajax({\n url: data.next.url.href,\n success: function (newHTML, textStatus, jqXHR) {\n // Meta update\n var headTags = [\n \"meta[name='keywords']\",\n \"meta[name='description']\",\n \"meta[property^='og']\",\n \"meta[name^='twitter']\",\n \"meta[itemprop]\",\n \"link[itemprop]\",\n \"link[rel='prev']\",\n \"link[rel='next']\",\n \"link[rel='canonical']\"\n ].join(\",\");\n $(\"head\")\n .find(headTags)\n .remove();\n $(newHTML)\n .find(headTags)\n .appendTo(\"head\");\n\n // Section placeholder Change\n var newplaceholdersection = $(newHTML)\n .find(\".placeholder-section\")\n .html();\n $(\".navbar .placeholder-section\").html(newplaceholdersection);\n\n // Menu Change\n var newmenu = $(newHTML)\n .find(\".navbar__collapse\")\n .html();\n $(\".navbar .navbar__collapse\").html(newmenu);\n\n // script variables\n var js = $(newHTML).find(\"script\");\n if (js != null) {\n $.globalEval(js.html());\n }\n\n myapp();\n },\n error: function (xhr, ajaxOptions, thrownError) {\n // alert(xhr.status)\n // alert(xhr.statusText)\n // alert(thrownError)\n },\n complete: function () {\n spinner().hide();\n }\n });\n});\nbarba.hooks.leave(() => {\n // this hook will be called for each transitions\n // console.log(\"LEAVE - global hook\");\n spinner().show();\n\n document.body.classList.remove(\"navbar--opened\");\n\n $(\"html,body\").animate(\n {\n scrollTop: 0\n },\n 800\n );\n});\nbarba.hooks.before(() => {\n // update menu\n // let menu = $('.navbar')\n // // select the menu item depending on the next URL (you can do that in many ways)\n // let nextItem = menu.find(\"a[href|='\" + data.next.url.path + \"']\")\n // // reset the active menu item and set the next item as \"active\" (if there is one)\n // if (nextItem !== null) {\n // menu.find('li.selected').removeClass('selected')\n // nextItem.parent().addClass('selected')\n // }\n // update placeholder section\n // let nextPlaceholder = menu.find('.placeholder-section').text()\n});\n\n// Basic default transition, with no rules and minimal hooks…\nbarba.init({\n timeout: 5000,\n cacheIgnore: true,\n prefetchIgnore: true,\n debug: false,\n // debug: true,\n logLevel: 'error'\n // views: [\n // {\n // namespace: \"form\",\n // afterEnter(data) {\n // if ($(\".thom-form__recaptcha\").length != 0) {\n // recaptchaLoad();\n // }\n //\n // if ($(\".mtcaptcha\").length != 0) {\n // mt_jsloadedcb();\n // }\n // }\n // }\n // ]\n});\n\n$(function () {\n});\n"],"sourceRoot":""}