wonder-image 1.4.7 → 1.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see body-end.js.LICENSE.txt */
2
- (()=>{var e={6037:e=>{e.exports="FilePond.registerPlugin(\n FilePondPluginFileValidateType,\n FilePondPluginImageExifOrientation,\n FilePondPluginImagePreview,\n FilePondPluginImageCrop,\n FilePondPluginImageResize,\n FilePondPluginImageTransform,\n FilePondPluginImageEdit,\n FilePondPluginFileMetadata,\n FilePondPluginGetFile\n);"},3559:e=>{e.exports="function reloadDataTable(selector) {\n\n new DataTable(selector).ajax.reload(null, false) \n \n}\n\nfunction setListRedirect(url) {\n \n window.history.replaceState(null, null, url);\n\n if (document.querySelector('#wi-add-button')) {\n\n var addButton = new URL(document.querySelector('#wi-add-button').href);\n addButton.searchParams.set('redirect', btoa(url));\n document.querySelector('#wi-add-button').href = addButton;\n\n }\n\n}\n"},1027:e=>{e.exports='function createCard() {\n\n document.querySelectorAll("wi-card").forEach(element => {\n\n var card = document.createElement("div");\n card.classList.add(\'card\');\n card.classList.add(\'border\');\n var cardBody = document.createElement("div");\n cardBody.classList.add(\'card-body\');\n cardBody.classList.add(\'row\');\n cardBody.classList.add(\'g-3\');\n cardBody.innerHTML = element.innerHTML;\n card.appendChild(cardBody);\n\n element.innerHTML = \'\';\n element.appendChild(card);\n\n element.classList.add(\'d-block\');\n\n });\n \n}\n\nfunction checkInput() {\n \n document.querySelectorAll("[data-wi-counter=\'true\']").forEach(element => {\n element.addEventListener("keyup", lengthCount);\n element.addEventListener("change", lengthCount);\n element.addEventListener("focusin", lengthCount);\n element.addEventListener("focusout", lengthCount);\n });\n\n document.querySelectorAll("[data-wi-check=\'true\']").forEach(element => {\n element.addEventListener("keyup", check);\n element.addEventListener("change", check);\n element.addEventListener("focusin", check);\n element.addEventListener("focusout", check);\n });\n\n document.querySelectorAll("[data-wi-check-color=\'true\']").forEach(element => {\n element.addEventListener("keyup", checkColor);\n element.addEventListener("change", checkColor);\n });\n\n document.querySelectorAll("[data-wi-date-range=\'true\']").forEach(element => {\n \n $(element).datepicker({\n format: "dd/mm/yyyy",\n language: "it", \n orientation: "bottom left"\n });\n\n // Max e Min Non funzionano\n if (element.dataset.wiMinDate != null) {\n $(element).datepicker({\n minDate: element.dataset.wiMinDate\n });\n }\n\n if (element.dataset.wiMaxDate != null) {\n $(element).datepicker({\n maxDate: element.dataset.wiMaxDate\n });\n }\n\n });\n\n document.querySelectorAll("[data-wi-date=\'true\']").forEach(element => {\n \n $(element).datepicker({\n format: "dd/mm/yyyy",\n language: "it", \n orientation: "bottom left"\n });\n\n // Max e Min Non funzionano\n if (element.dataset.wiMinDate != null) {\n $(element).datepicker({\n minDate: element.dataset.wiMinDate\n });\n }\n\n if (element.dataset.wiMaxDate != null) {\n $(element).datepicker({\n maxDate: element.dataset.wiMaxDate\n });\n }\n\n });\n\n document.querySelectorAll("[data-wi-phone=\'true\']").forEach(element => {\n checkPhone(element);\n });\n\n setAutonumeric();\n check();\n\n}\n\nfunction pageRemove(element) {\n\n element.remove();\n \n checkInput();\n\n}\n\nasync function setUpPage() {\n\n await createCard();\n \n\n setTextarea();\n setUploader();\n setJsTree();\n setCheckBoolean();\n \n if (document.getElementById(\'page-loading\')) { document.getElementById(\'page-loading\').classList.add(\'d-none\') }\n \n checkInput();\n setSearchInput();\n setUpBootstrap();\n setUpJquery();\n\n};'},4642:e=>{e.exports=function(e){function n(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):n("EvalError: No eval function available")}catch(e){n(e)}}},6624:(e,n,t)=>{t(4642)(t(6037))},1672:(e,n,t)=>{t(4642)(t(3559))},2574:(e,n,t)=>{t(4642)(t(1027))}},n={};function t(a){var o=n[a];if(void 0!==o)return o.exports;var d=n[a]={exports:{}};return e[a](d,d.exports,t),d.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";t.r(a);t(6624),t(1672),t(2574)})(),window.wonder=a})();
2
+ (()=>{var e={6037:e=>{e.exports="FilePond.registerPlugin(\n FilePondPluginFileValidateType,\n FilePondPluginImageExifOrientation,\n FilePondPluginImagePreview,\n FilePondPluginImageCrop,\n FilePondPluginImageResize,\n FilePondPluginImageTransform,\n FilePondPluginImageEdit,\n FilePondPluginFileMetadata,\n FilePondPluginGetFile\n);"},3559:e=>{e.exports="function reloadDataTable(selector) {\n\n new DataTable(selector).ajax.reload(null, false) \n \n}\n\nfunction setListRedirect(url) {\n \n window.history.replaceState(null, null, url);\n\n document.querySelectorAll('.href-redirect').forEach(button => {\n \n var btn = new URL(button.href);\n btn.searchParams.set('redirect', btoa(url));\n button.href = btn;\n\n });\n\n}\n\nfunction createDataTable( id, endpoint, config ) {\n\n var elementId = id.replace('table', '');\n var nResult__selector = 'figcaption span#'+elementId+'n_result';\n var inputSearch__selector = 'input#'+elementId+'search_input';\n var inputLength__selector = 'select#'+elementId+'limit_input';\n\n var Table = new DataTable('#'+id, {\n serverSide: true,\n processing: true,\n lengthChange: true, // Creo io il length change\n searching: true, // Creo io la search bar\n responsive: {\n details: false,\n breakpoints: [\n { name: 'desktop', width: Infinity },\n { name: 'tablet', width: 992 },\n { name: 'mobile', width: 768 }\n ]\n },\n ajax: {\n url: endpoint,\n type: 'POST',\n data: config,\n error: function (XMLHttpRequest) { ajaxRequestError(XMLHttpRequest); }\n },\n idSrc: 'id',\n columns: config.fields,\n lengthMenu: [10, 25, 50, 100],\n displayStart: config.default.length * config.default.page, // Pagina di partenza\n pageLength: config.default.length, // Lunghezza pagina\n pagingType: \"full_numbers\", // Tipologia paginazione\n search: { search: config.default.search },\n language: {\n url: 'https://cdn.datatables.net/plug-ins/1.12.1/i18n/it-IT.json',\n paginate: {\n next: '<i class=\"bi bi-chevron-right\"></i>',\n previous: '<i class=\"bi bi-chevron-left\"></i>',\n first: '<i class=\"bi bi-chevron-double-left\"></i>',\n last: '<i class=\"bi bi-chevron-double-right\"></i>'\n }\n },\n buttons: [\n { extend: 'copy', className: elementId+'export_copy' }, \n { extend: 'csv', className: elementId+'export_csv' }, \n { extend: 'excel', className: elementId+'export_excel' }, \n { extend: 'pdf', orientation: 'landscape', className: elementId+'export_pdf' }, \n { extend: 'print', className: elementId+'export_print' }\n ],\n order: {\n name: config.default.order,\n dir: config.default.order_direction\n },\n createdRow: function (row, data, index) { $(row).addClass('align-middle') },\n drawCallback: function (settings) { \n\n var Table = this.api();\n var page = Table.page.info();\n\n var nPage = page.page;\n\n var start = page.start + 1;\n var end = page.end;\n\n var recordsTotal = page.recordsTotal;\n var recordsDisplay = page.recordsDisplay;\n\n if (document.querySelector(nResult__selector)) {\n\n var result = 'da '+start+' a '+end+' di '+recordsDisplay;\n document.querySelector(nResult__selector).innerHTML = result;\n\n }\n\n var pageUrl = new URL(window.location.href);\n pageUrl.searchParams.set(elementId+'page', nPage);\n\n if (Table.order().length > 0) {\n\n if (Table.order()[0][1] == \"\") {\n\n var orderColumn = config.default.order;\n var orderDirection = config.default.order_direction; \n\n } else {\n \n var orderColumn = Table.order()[0][0];\n var orderDirection = Table.order()[0][1]; \n\n }\n\n } else {\n\n var orderColumn = config.default.order;\n var orderDirection = config.default.order_direction; \n \n }\n\n pageUrl.searchParams.set(elementId+'order', orderColumn);\n pageUrl.searchParams.set(elementId+'order_dir', orderDirection);\n\n setListRedirect(pageUrl);\n\n bootstrapTooltip();\n\n },\n layout: {\n topEnd: null,\n topStart: null\n }\n });\n\n $(inputSearch__selector).keyup( function() { \n\n Table.search(this.value).draw(); \n\n var pageUrl = new URL(window.location.href);\n pageUrl.searchParams.set(elementId+'search', this.value);\n\n setListRedirect(pageUrl);\n\n });\n\n $(inputSearch__selector).val(config.default.search)\n\n $(inputLength__selector).change( function() {\n\n console.log('length');\n Table.page.len(this.value).draw(); \n\n var pageUrl = new URL(window.location.href);\n pageUrl.searchParams.set(elementId+'length', this.value);\n\n setListRedirect(pageUrl);\n\n });\n\n $(inputLength__selector).val(config.default.length)\n\n}"},1027:e=>{e.exports='function createCard() {\n\n document.querySelectorAll("wi-card").forEach(element => {\n\n var card = document.createElement("div");\n card.classList.add(\'card\');\n card.classList.add(\'border\');\n var cardBody = document.createElement("div");\n cardBody.classList.add(\'card-body\');\n cardBody.classList.add(\'row\');\n cardBody.classList.add(\'g-3\');\n cardBody.innerHTML = element.innerHTML;\n card.appendChild(cardBody);\n\n element.innerHTML = \'\';\n element.appendChild(card);\n\n element.classList.add(\'d-block\');\n\n });\n \n}\n\nfunction checkInput() {\n \n document.querySelectorAll("[data-wi-counter=\'true\']").forEach(element => {\n element.addEventListener("keyup", lengthCount);\n element.addEventListener("change", lengthCount);\n element.addEventListener("focusin", lengthCount);\n element.addEventListener("focusout", lengthCount);\n });\n\n document.querySelectorAll("[data-wi-check=\'true\']").forEach(element => {\n element.addEventListener("keyup", check);\n element.addEventListener("change", check);\n element.addEventListener("focusin", check);\n element.addEventListener("focusout", check);\n });\n\n document.querySelectorAll("[data-wi-check-color=\'true\']").forEach(element => {\n element.addEventListener("keyup", checkColor);\n element.addEventListener("change", checkColor);\n });\n\n document.querySelectorAll("[data-wi-date-range=\'true\']").forEach(element => {\n \n $(element).datepicker({\n format: "dd/mm/yyyy",\n language: "it", \n orientation: "bottom left"\n });\n\n // Max e Min Non funzionano\n if (element.dataset.wiMinDate != null) {\n $(element).datepicker({\n minDate: element.dataset.wiMinDate\n });\n }\n\n if (element.dataset.wiMaxDate != null) {\n $(element).datepicker({\n maxDate: element.dataset.wiMaxDate\n });\n }\n\n });\n\n document.querySelectorAll("[data-wi-date=\'true\']").forEach(element => {\n \n $(element).datepicker({\n format: "dd/mm/yyyy",\n language: "it", \n orientation: "bottom left"\n });\n\n // Max e Min Non funzionano\n if (element.dataset.wiMinDate != null) {\n $(element).datepicker({\n minDate: element.dataset.wiMinDate\n });\n }\n\n if (element.dataset.wiMaxDate != null) {\n $(element).datepicker({\n maxDate: element.dataset.wiMaxDate\n });\n }\n\n });\n\n document.querySelectorAll("[data-wi-phone=\'true\']").forEach(element => {\n checkPhone(element);\n });\n\n setAutonumeric();\n check();\n\n}\n\nfunction pageRemove(element) {\n\n element.remove();\n \n checkInput();\n\n}\n\nasync function setUpPage() {\n\n await createCard();\n\n setTextarea();\n setUploader();\n setJsTree();\n setCheckBoolean();\n \n if (document.getElementById(\'page-loading\')) { document.getElementById(\'page-loading\').classList.add(\'d-none\') }\n \n checkInput();\n setSearchInput();\n setUpBootstrap();\n setUpJquery();\n\n window.dispatchEvent(new Event(\'loaded\'));\n\n};'},4642:e=>{e.exports=function(e){function n(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):n("EvalError: No eval function available")}catch(e){n(e)}}},6624:(e,n,t)=>{t(4642)(t(6037))},1672:(e,n,t)=>{t(4642)(t(3559))},2574:(e,n,t)=>{t(4642)(t(1027))}},n={};function t(a){var r=n[a];if(void 0!==r)return r.exports;var l=n[a]={exports:{}};return e[a](l,l.exports,t),l.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var a in n)t.o(n,a)&&!t.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";t.r(a);t(6624),t(1672),t(2574)})(),window.wonder=a})();
3
3
  //# sourceMappingURL=body-end.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"backend/body-end.js","mappings":";sBAAAA,EAAOC,QAAU,mVCAjBD,EAAOC,QAAU,yeCAjBD,EAAOC,QAAU,k1GCIjBD,EAAOC,QAAU,SAASC,GACzB,SAASC,EAAIC,GACQ,oBAAZC,UACJA,QAAQD,OAASC,QAAQF,KAAK,kBAAmBC,EACtD,CAOA,IAC2B,oBAAfE,YAJmB,oBAAhBC,aAA2D,oBAArBC,iBAKnDF,WAAWJ,GACe,oBAATO,KACjBA,KAAKC,KAAK,KAAMR,GAEhBC,EAAI,wCAEN,CAAE,MAAOC,GACRD,EAAIC,EACL,CACD,kBC1BA,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,SCC7GO,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAab,QAGrB,IAAID,EAASW,EAAyBE,GAAY,CAGjDZ,QAAS,CAAC,GAOX,OAHAe,EAAoBH,GAAUb,EAAQA,EAAOC,QAASW,GAG/CZ,EAAOC,OACf,CCrBAW,EAAoBK,EAAKjB,IACxB,IAAIkB,EAASlB,GAAUA,EAAOmB,WAC7B,IAAOnB,EAAiB,QACxB,IAAM,EAEP,OADAY,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdN,EAAoBQ,EAAI,CAACnB,EAASqB,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEvB,EAASsB,IAC5EE,OAAOC,eAAezB,EAASsB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAetB,KAAKmB,EAAKC,GCClFlB,EAAoBqB,EAAKhC,IACH,oBAAXiC,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAezB,EAASiC,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAezB,EAAS,aAAc,CAAEmC,OAAO,GAAO","sources":["webpack://wonder/./src/build/backend/js/form/filepond.js","webpack://wonder/./src/build/backend/js/list.js","webpack://wonder/./src/build/backend/js/pageSetUp.js","webpack://wonder/./node_modules/script-loader/addScript.js","webpack://wonder/./src/build/backend/js/form/filepond.js?c33e","webpack://wonder/./src/build/backend/js/list.js?9ab8","webpack://wonder/./src/build/backend/js/pageSetUp.js?9771","webpack://wonder/webpack/bootstrap","webpack://wonder/webpack/runtime/compat get default export","webpack://wonder/webpack/runtime/define property getters","webpack://wonder/webpack/runtime/hasOwnProperty shorthand","webpack://wonder/webpack/runtime/make namespace object"],"sourcesContent":["module.exports = \"FilePond.registerPlugin(\\n FilePondPluginFileValidateType,\\n FilePondPluginImageExifOrientation,\\n FilePondPluginImagePreview,\\n FilePondPluginImageCrop,\\n FilePondPluginImageResize,\\n FilePondPluginImageTransform,\\n FilePondPluginImageEdit,\\n FilePondPluginFileMetadata,\\n FilePondPluginGetFile\\n);\"","module.exports = \"function reloadDataTable(selector) {\\n\\n new DataTable(selector).ajax.reload(null, false) \\n \\n}\\n\\nfunction setListRedirect(url) {\\n \\n window.history.replaceState(null, null, url);\\n\\n if (document.querySelector('#wi-add-button')) {\\n\\n var addButton = new URL(document.querySelector('#wi-add-button').href);\\n addButton.searchParams.set('redirect', btoa(url));\\n document.querySelector('#wi-add-button').href = addButton;\\n\\n }\\n\\n}\\n\"","module.exports = \"function createCard() {\\n\\n document.querySelectorAll(\\\"wi-card\\\").forEach(element => {\\n\\n var card = document.createElement(\\\"div\\\");\\n card.classList.add('card');\\n card.classList.add('border');\\n var cardBody = document.createElement(\\\"div\\\");\\n cardBody.classList.add('card-body');\\n cardBody.classList.add('row');\\n cardBody.classList.add('g-3');\\n cardBody.innerHTML = element.innerHTML;\\n card.appendChild(cardBody);\\n\\n element.innerHTML = '';\\n element.appendChild(card);\\n\\n element.classList.add('d-block');\\n\\n });\\n \\n}\\n\\nfunction checkInput() {\\n \\n document.querySelectorAll(\\\"[data-wi-counter='true']\\\").forEach(element => {\\n element.addEventListener(\\\"keyup\\\", lengthCount);\\n element.addEventListener(\\\"change\\\", lengthCount);\\n element.addEventListener(\\\"focusin\\\", lengthCount);\\n element.addEventListener(\\\"focusout\\\", lengthCount);\\n });\\n\\n document.querySelectorAll(\\\"[data-wi-check='true']\\\").forEach(element => {\\n element.addEventListener(\\\"keyup\\\", check);\\n element.addEventListener(\\\"change\\\", check);\\n element.addEventListener(\\\"focusin\\\", check);\\n element.addEventListener(\\\"focusout\\\", check);\\n });\\n\\n document.querySelectorAll(\\\"[data-wi-check-color='true']\\\").forEach(element => {\\n element.addEventListener(\\\"keyup\\\", checkColor);\\n element.addEventListener(\\\"change\\\", checkColor);\\n });\\n\\n document.querySelectorAll(\\\"[data-wi-date-range='true']\\\").forEach(element => {\\n \\n $(element).datepicker({\\n format: \\\"dd/mm/yyyy\\\",\\n language: \\\"it\\\", \\n orientation: \\\"bottom left\\\"\\n });\\n\\n // Max e Min Non funzionano\\n if (element.dataset.wiMinDate != null) {\\n $(element).datepicker({\\n minDate: element.dataset.wiMinDate\\n });\\n }\\n\\n if (element.dataset.wiMaxDate != null) {\\n $(element).datepicker({\\n maxDate: element.dataset.wiMaxDate\\n });\\n }\\n\\n });\\n\\n document.querySelectorAll(\\\"[data-wi-date='true']\\\").forEach(element => {\\n \\n $(element).datepicker({\\n format: \\\"dd/mm/yyyy\\\",\\n language: \\\"it\\\", \\n orientation: \\\"bottom left\\\"\\n });\\n\\n // Max e Min Non funzionano\\n if (element.dataset.wiMinDate != null) {\\n $(element).datepicker({\\n minDate: element.dataset.wiMinDate\\n });\\n }\\n\\n if (element.dataset.wiMaxDate != null) {\\n $(element).datepicker({\\n maxDate: element.dataset.wiMaxDate\\n });\\n }\\n\\n });\\n\\n document.querySelectorAll(\\\"[data-wi-phone='true']\\\").forEach(element => {\\n checkPhone(element);\\n });\\n\\n setAutonumeric();\\n check();\\n\\n}\\n\\nfunction pageRemove(element) {\\n\\n element.remove();\\n \\n checkInput();\\n\\n}\\n\\nasync function setUpPage() {\\n\\n await createCard();\\n \\n\\n setTextarea();\\n setUploader();\\n setJsTree();\\n setCheckBoolean();\\n \\n if (document.getElementById('page-loading')) { document.getElementById('page-loading').classList.add('d-none') }\\n \\n checkInput();\\n setSearchInput();\\n setUpBootstrap();\\n setUpJquery();\\n\\n};\"","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nmodule.exports = function(src) {\n\tfunction log(error) {\n\t\t(typeof console !== \"undefined\")\n\t\t&& (console.error || console.log)(\"[Script Loader]\", error);\n\t}\n\n\t// Check for IE =< 8\n\tfunction isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}\n\n\ttry {\n\t\tif (typeof execScript !== \"undefined\" && isIE()) {\n\t\t\texecScript(src);\n\t\t} else if (typeof eval !== \"undefined\") {\n\t\t\teval.call(null, src);\n\t\t} else {\n\t\t\tlog(\"EvalError: No eval function available\");\n\t\t}\n\t} catch (error) {\n\t\tlog(error);\n\t}\n}\n","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/backend/js/form/filepond.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/backend/js/list.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/backend/js/pageSetUp.js\"))","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["module","exports","src","log","error","console","execScript","attachEvent","addEventListener","eval","call","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","value"],"sourceRoot":""}
1
+ {"version":3,"file":"backend/body-end.js","mappings":";sBAAAA,EAAOC,QAAU,mVCAjBD,EAAOC,QAAU,0iKCAjBD,EAAOC,QAAU,g4GCIjBD,EAAOC,QAAU,SAASC,GACzB,SAASC,EAAIC,GACQ,oBAAZC,UACJA,QAAQD,OAASC,QAAQF,KAAK,kBAAmBC,EACtD,CAOA,IAC2B,oBAAfE,YAJmB,oBAAhBC,aAA2D,oBAArBC,iBAKnDF,WAAWJ,GACe,oBAATO,KACjBA,KAAKC,KAAK,KAAMR,GAEhBC,EAAI,wCAEN,CAAE,MAAOC,GACRD,EAAIC,EACL,CACD,kBC1BA,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,SCC7GO,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAab,QAGrB,IAAID,EAASW,EAAyBE,GAAY,CAGjDZ,QAAS,CAAC,GAOX,OAHAe,EAAoBH,GAAUb,EAAQA,EAAOC,QAASW,GAG/CZ,EAAOC,OACf,CCrBAW,EAAoBK,EAAKjB,IACxB,IAAIkB,EAASlB,GAAUA,EAAOmB,WAC7B,IAAOnB,EAAiB,QACxB,IAAM,EAEP,OADAY,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdN,EAAoBQ,EAAI,CAACnB,EAASqB,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEvB,EAASsB,IAC5EE,OAAOC,eAAezB,EAASsB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAetB,KAAKmB,EAAKC,GCClFlB,EAAoBqB,EAAKhC,IACH,oBAAXiC,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAezB,EAASiC,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAezB,EAAS,aAAc,CAAEmC,OAAO,GAAO","sources":["webpack://wonder/./src/build/backend/js/form/filepond.js","webpack://wonder/./src/build/backend/js/list.js","webpack://wonder/./src/build/backend/js/pageSetUp.js","webpack://wonder/./node_modules/script-loader/addScript.js","webpack://wonder/./src/build/backend/js/form/filepond.js?c33e","webpack://wonder/./src/build/backend/js/list.js?9ab8","webpack://wonder/./src/build/backend/js/pageSetUp.js?9771","webpack://wonder/webpack/bootstrap","webpack://wonder/webpack/runtime/compat get default export","webpack://wonder/webpack/runtime/define property getters","webpack://wonder/webpack/runtime/hasOwnProperty shorthand","webpack://wonder/webpack/runtime/make namespace object"],"sourcesContent":["module.exports = \"FilePond.registerPlugin(\\n FilePondPluginFileValidateType,\\n FilePondPluginImageExifOrientation,\\n FilePondPluginImagePreview,\\n FilePondPluginImageCrop,\\n FilePondPluginImageResize,\\n FilePondPluginImageTransform,\\n FilePondPluginImageEdit,\\n FilePondPluginFileMetadata,\\n FilePondPluginGetFile\\n);\"","module.exports = \"function reloadDataTable(selector) {\\n\\n new DataTable(selector).ajax.reload(null, false) \\n \\n}\\n\\nfunction setListRedirect(url) {\\n \\n window.history.replaceState(null, null, url);\\n\\n document.querySelectorAll('.href-redirect').forEach(button => {\\n \\n var btn = new URL(button.href);\\n btn.searchParams.set('redirect', btoa(url));\\n button.href = btn;\\n\\n });\\n\\n}\\n\\nfunction createDataTable( id, endpoint, config ) {\\n\\n var elementId = id.replace('table', '');\\n var nResult__selector = 'figcaption span#'+elementId+'n_result';\\n var inputSearch__selector = 'input#'+elementId+'search_input';\\n var inputLength__selector = 'select#'+elementId+'limit_input';\\n\\n var Table = new DataTable('#'+id, {\\n serverSide: true,\\n processing: true,\\n lengthChange: true, // Creo io il length change\\n searching: true, // Creo io la search bar\\n responsive: {\\n details: false,\\n breakpoints: [\\n { name: 'desktop', width: Infinity },\\n { name: 'tablet', width: 992 },\\n { name: 'mobile', width: 768 }\\n ]\\n },\\n ajax: {\\n url: endpoint,\\n type: 'POST',\\n data: config,\\n error: function (XMLHttpRequest) { ajaxRequestError(XMLHttpRequest); }\\n },\\n idSrc: 'id',\\n columns: config.fields,\\n lengthMenu: [10, 25, 50, 100],\\n displayStart: config.default.length * config.default.page, // Pagina di partenza\\n pageLength: config.default.length, // Lunghezza pagina\\n pagingType: \\\"full_numbers\\\", // Tipologia paginazione\\n search: { search: config.default.search },\\n language: {\\n url: 'https://cdn.datatables.net/plug-ins/1.12.1/i18n/it-IT.json',\\n paginate: {\\n next: '<i class=\\\"bi bi-chevron-right\\\"></i>',\\n previous: '<i class=\\\"bi bi-chevron-left\\\"></i>',\\n first: '<i class=\\\"bi bi-chevron-double-left\\\"></i>',\\n last: '<i class=\\\"bi bi-chevron-double-right\\\"></i>'\\n }\\n },\\n buttons: [\\n { extend: 'copy', className: elementId+'export_copy' }, \\n { extend: 'csv', className: elementId+'export_csv' }, \\n { extend: 'excel', className: elementId+'export_excel' }, \\n { extend: 'pdf', orientation: 'landscape', className: elementId+'export_pdf' }, \\n { extend: 'print', className: elementId+'export_print' }\\n ],\\n order: {\\n name: config.default.order,\\n dir: config.default.order_direction\\n },\\n createdRow: function (row, data, index) { $(row).addClass('align-middle') },\\n drawCallback: function (settings) { \\n\\n var Table = this.api();\\n var page = Table.page.info();\\n\\n var nPage = page.page;\\n\\n var start = page.start + 1;\\n var end = page.end;\\n\\n var recordsTotal = page.recordsTotal;\\n var recordsDisplay = page.recordsDisplay;\\n\\n if (document.querySelector(nResult__selector)) {\\n\\n var result = 'da '+start+' a '+end+' di '+recordsDisplay;\\n document.querySelector(nResult__selector).innerHTML = result;\\n\\n }\\n\\n var pageUrl = new URL(window.location.href);\\n pageUrl.searchParams.set(elementId+'page', nPage);\\n\\n if (Table.order().length > 0) {\\n\\n if (Table.order()[0][1] == \\\"\\\") {\\n\\n var orderColumn = config.default.order;\\n var orderDirection = config.default.order_direction; \\n\\n } else {\\n \\n var orderColumn = Table.order()[0][0];\\n var orderDirection = Table.order()[0][1]; \\n\\n }\\n\\n } else {\\n\\n var orderColumn = config.default.order;\\n var orderDirection = config.default.order_direction; \\n \\n }\\n\\n pageUrl.searchParams.set(elementId+'order', orderColumn);\\n pageUrl.searchParams.set(elementId+'order_dir', orderDirection);\\n\\n setListRedirect(pageUrl);\\n\\n bootstrapTooltip();\\n\\n },\\n layout: {\\n topEnd: null,\\n topStart: null\\n }\\n });\\n\\n $(inputSearch__selector).keyup( function() { \\n\\n Table.search(this.value).draw(); \\n\\n var pageUrl = new URL(window.location.href);\\n pageUrl.searchParams.set(elementId+'search', this.value);\\n\\n setListRedirect(pageUrl);\\n\\n });\\n\\n $(inputSearch__selector).val(config.default.search)\\n\\n $(inputLength__selector).change( function() {\\n\\n console.log('length');\\n Table.page.len(this.value).draw(); \\n\\n var pageUrl = new URL(window.location.href);\\n pageUrl.searchParams.set(elementId+'length', this.value);\\n\\n setListRedirect(pageUrl);\\n\\n });\\n\\n $(inputLength__selector).val(config.default.length)\\n\\n}\"","module.exports = \"function createCard() {\\n\\n document.querySelectorAll(\\\"wi-card\\\").forEach(element => {\\n\\n var card = document.createElement(\\\"div\\\");\\n card.classList.add('card');\\n card.classList.add('border');\\n var cardBody = document.createElement(\\\"div\\\");\\n cardBody.classList.add('card-body');\\n cardBody.classList.add('row');\\n cardBody.classList.add('g-3');\\n cardBody.innerHTML = element.innerHTML;\\n card.appendChild(cardBody);\\n\\n element.innerHTML = '';\\n element.appendChild(card);\\n\\n element.classList.add('d-block');\\n\\n });\\n \\n}\\n\\nfunction checkInput() {\\n \\n document.querySelectorAll(\\\"[data-wi-counter='true']\\\").forEach(element => {\\n element.addEventListener(\\\"keyup\\\", lengthCount);\\n element.addEventListener(\\\"change\\\", lengthCount);\\n element.addEventListener(\\\"focusin\\\", lengthCount);\\n element.addEventListener(\\\"focusout\\\", lengthCount);\\n });\\n\\n document.querySelectorAll(\\\"[data-wi-check='true']\\\").forEach(element => {\\n element.addEventListener(\\\"keyup\\\", check);\\n element.addEventListener(\\\"change\\\", check);\\n element.addEventListener(\\\"focusin\\\", check);\\n element.addEventListener(\\\"focusout\\\", check);\\n });\\n\\n document.querySelectorAll(\\\"[data-wi-check-color='true']\\\").forEach(element => {\\n element.addEventListener(\\\"keyup\\\", checkColor);\\n element.addEventListener(\\\"change\\\", checkColor);\\n });\\n\\n document.querySelectorAll(\\\"[data-wi-date-range='true']\\\").forEach(element => {\\n \\n $(element).datepicker({\\n format: \\\"dd/mm/yyyy\\\",\\n language: \\\"it\\\", \\n orientation: \\\"bottom left\\\"\\n });\\n\\n // Max e Min Non funzionano\\n if (element.dataset.wiMinDate != null) {\\n $(element).datepicker({\\n minDate: element.dataset.wiMinDate\\n });\\n }\\n\\n if (element.dataset.wiMaxDate != null) {\\n $(element).datepicker({\\n maxDate: element.dataset.wiMaxDate\\n });\\n }\\n\\n });\\n\\n document.querySelectorAll(\\\"[data-wi-date='true']\\\").forEach(element => {\\n \\n $(element).datepicker({\\n format: \\\"dd/mm/yyyy\\\",\\n language: \\\"it\\\", \\n orientation: \\\"bottom left\\\"\\n });\\n\\n // Max e Min Non funzionano\\n if (element.dataset.wiMinDate != null) {\\n $(element).datepicker({\\n minDate: element.dataset.wiMinDate\\n });\\n }\\n\\n if (element.dataset.wiMaxDate != null) {\\n $(element).datepicker({\\n maxDate: element.dataset.wiMaxDate\\n });\\n }\\n\\n });\\n\\n document.querySelectorAll(\\\"[data-wi-phone='true']\\\").forEach(element => {\\n checkPhone(element);\\n });\\n\\n setAutonumeric();\\n check();\\n\\n}\\n\\nfunction pageRemove(element) {\\n\\n element.remove();\\n \\n checkInput();\\n\\n}\\n\\nasync function setUpPage() {\\n\\n await createCard();\\n\\n setTextarea();\\n setUploader();\\n setJsTree();\\n setCheckBoolean();\\n \\n if (document.getElementById('page-loading')) { document.getElementById('page-loading').classList.add('d-none') }\\n \\n checkInput();\\n setSearchInput();\\n setUpBootstrap();\\n setUpJquery();\\n\\n window.dispatchEvent(new Event('loaded'));\\n\\n};\"","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nmodule.exports = function(src) {\n\tfunction log(error) {\n\t\t(typeof console !== \"undefined\")\n\t\t&& (console.error || console.log)(\"[Script Loader]\", error);\n\t}\n\n\t// Check for IE =< 8\n\tfunction isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}\n\n\ttry {\n\t\tif (typeof execScript !== \"undefined\" && isIE()) {\n\t\t\texecScript(src);\n\t\t} else if (typeof eval !== \"undefined\") {\n\t\t\teval.call(null, src);\n\t\t} else {\n\t\t\tlog(\"EvalError: No eval function available\");\n\t\t}\n\t} catch (error) {\n\t\tlog(error);\n\t}\n}\n","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/backend/js/form/filepond.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/backend/js/list.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/backend/js/pageSetUp.js\"))","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["module","exports","src","log","error","console","execScript","attachEvent","addEventListener","eval","call","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","value"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see body-end.js.LICENSE.txt */
2
- (()=>{var n={6867:n=>{n.exports="function alertContainer() {\n\n if (document.querySelector('.alert-container')) {\n\n var container = document.querySelector('.alert-container');\n\n }else{\n\n var container = document.createElement('div');\n container.classList.add('alert-container');\n container.classList.add('p-f');\n container.classList.add('top');\n container.classList.add('start');\n container.classList.add('w-100');\n container.classList.add('h-100');\n container.classList.add('no-interaction');\n container.style.zIndex = \"1000\";\n\n document.body.insertBefore(container, document.body.firstChild);\n\n }\n\n return container;\n\n}\n\nfunction alertToast(alert) {\n\n var container = alertContainer();\n\n if (alert == 801) {\n\n container.innerHTML += NO_INTERNET_ALERT;\n\n } else {\n\n $.ajax({\n type: \"POST\",\n url: pathApp+'/api/alert.php',\n data: { \n post: 'true',\n frontend: 'true',\n alert: alert\n }, \n success: function (data) {\n\n container.innerHTML += data;\n \n var url = new URL(window.location.href);\n url.searchParams.delete('alert');\n window.history.replaceState(null, null, url);\n\n }\n });\n\n }\n\n setTimeout(() => {\n document.querySelectorAll('.wi-alert.wi-show').forEach(element => {\n element.classList.remove('wi-show');\n });\n }, 4000);\n\n}"},5068:n=>{n.exports="function setAos() {\n\n if (isMobile() && (typeof MOBILE_REMOVE_AOS == 'undefined' || MOBILE_REMOVE_AOS == true)) {\n AOS.init({\n disable: 'mobile'\n });\n } else {\n AOS.init();\n }\n\n}"},7244:n=>{n.exports="function toggleDropdown(container) {\n\n if (container.classList.contains('wi-show')) {\n closeDropdown(container);\n } else {\n openDropdown(container);\n }\n \n}\n\nfunction openDropdown(container) {\n\n container.classList.add('wi-show'); \n\n if (container.querySelector('i.bi-chevron-down')) {\n container.querySelector('i.bi-chevron-down').classList.add('bi-chevron-up');\n container.querySelector('i.bi-chevron-down').classList.remove('bi-chevron-down');\n }\n\n if (container.querySelector('i.bi-plus')) {\n container.querySelector('i.bi-plus').classList.add('bi-dash');\n container.querySelector('i.bi-plus').classList.remove('bi-plus');\n }\n\n if (container.querySelector('i.bi-plus-lg')) {\n container.querySelector('i.bi-plus-lg').classList.add('bi-dash-lg');\n container.querySelector('i.bi-plus-lg').classList.remove('bi-plus-lg');\n }\n \n}\n\nfunction closeDropdown(container) {\n\n container.classList.remove('wi-show'); \n\n if (container.querySelector('i.bi-chevron-up')) {\n container.querySelector('i.bi-chevron-up').classList.add('bi-chevron-down');\n container.querySelector('i.bi-chevron-up').classList.remove('bi-chevron-up');\n }\n\n if (container.querySelector('i.bi-dash')) {\n container.querySelector('i.bi-dash').classList.add('bi-plus');\n container.querySelector('i.bi-dash').classList.remove('bi-dash');\n }\n\n if (container.querySelector('i.bi-dash-lg')) {\n container.querySelector('i.bi-dash-lg').classList.add('bi-plus-lg');\n container.querySelector('i.bi-dash-lg').classList.remove('bi-dash-lg');\n }\n \n}\n\nfunction setDropdown() {\n \n document.querySelectorAll(\".wi-dropdown-btn .wi-switcher\").forEach(element => {\n\n element.onclick = function() { toggleDropdown(element.parentElement); };\n \n element.parentElement.onmouseleave = function() { closeDropdown(element.parentElement); };\n \n });\n\n document.querySelectorAll(\".wi-dropdown-box .wi-switcher\").forEach(element => {\n\n if (element.parentElement.classList.contains('wi-show')) {\n openDropdown(element.parentElement);\n }\n\n element.onclick = function() { toggleDropdown(element.parentElement); };\n \n });\n\n}"},2787:n=>{n.exports='/**\n * \n * GOOGLE MAPS API\n * \n */\n\nfunction placeNeedCheck(input) {\n\n inputError(input, \'Indirizzo non valido, è necessario selezionare un indirizzo dall\\\'elenco!\');\n\n}\n\nfunction checkInputPlace(input, autocomplete) {\n \n var inputContainer = input.parentElement;\n\n var country = inputContainer.querySelector(\'[data-wi-spi="country"]\');\n var province = inputContainer.querySelector(\'[data-wi-spi="province"]\');\n var cap = inputContainer.querySelector(\'[data-wi-spi="cap"]\');\n var city = inputContainer.querySelector(\'[data-wi-spi="city"]\');\n var street = inputContainer.querySelector(\'[data-wi-spi="street"]\');\n var number = inputContainer.querySelector(\'[data-wi-spi="number"]\');\n\n country.value = "";\n province.value = "";\n cap.value = "";\n city.value = "";\n street.value = "";\n number.value = "";\n\n removeInputError(input);\n\n if (autocomplete.getPlace()) {\n\n var place = autocomplete.getPlace();\n\n if (place.address_components) {\n\n for (const component of place.address_components) {\n \n const componentType = component.types;\n\n if (componentType.includes(\'street_number\')) { number.value = component.long_name; }\n if (componentType.includes(\'route\')) { street.value = component.short_name; }\n if (componentType.includes(\'administrative_area_level_3\') || componentType.includes(\'postal_town\')) { city.value = component.short_name; }\n if (componentType.includes(\'postal_code\') || componentType.includes(\'postal_code_prefix\')) { cap.value = component.short_name; }\n if (componentType.includes(\'administrative_area_level_2\')) { province.value = component.short_name; }\n if (componentType.includes(\'country\')) { country.value = component.short_name; }\n\n }\n\n if (country.value == "" || province.value == "" || cap.value == "" || city.value == "" || street.value == "" || number.value == "") {\n \n var error = "Indirizzo non valido";\n\n if (country.value == "") {\n error += ", manca il paese";\n } else if (province.value == "") {\n error += ", manca la provincia";\n } else if (cap.value == "") {\n error += ", manca il cap";\n } else if (city.value == "") {\n error += ", manca la città";\n } else if (street.value == "") {\n error += ", manca la via";\n } else if (number.value == "") {\n error += ", manca il numero civico";\n }\n\n inputError(input, error);\n \n }\n\n } else {\n\n inputError(input, \'Indirizzo non valido\');\n\n }\n\n } else {\n\n inputError(input, \'Indirizzo non valido\');\n\n }\n\n check();\n\n}\n\nfunction setPlace(input, country = null, province = null, cap = null, city = null, street = null, number = null) {\n\n var inputContainer = input.parentElement;\n\n var countryInput = inputContainer.querySelector(\'[data-wi-spi="country"]\');\n var provinceInput = inputContainer.querySelector(\'[data-wi-spi="province"]\');\n var capInput = inputContainer.querySelector(\'[data-wi-spi="cap"]\');\n var cityInput = inputContainer.querySelector(\'[data-wi-spi="city"]\');\n var streetInput = inputContainer.querySelector(\'[data-wi-spi="street"]\');\n var numberInput = inputContainer.querySelector(\'[data-wi-spi="number"]\');\n\n if (country == null) {\n\n country = countryInput.value;\n province = provinceInput.value;\n cap = capInput.value;\n city = cityInput.value;\n street = streetInput.value;\n number = numberInput.value;\n\n } else {\n\n countryInput.value = country;\n provinceInput.value = province;\n capInput.value = cap;\n cityInput.value = city;\n streetInput.value = street;\n numberInput.value = number;\n \n }\n\n if (country != "" || province != "" || cap != "" || city != "" || street != "" || number != "") {\n \n var address = street+\', \'+number+\', \'+city+\', \'+province+\', \'+country;\n input.value = address;\n\n checkLabel();\n check();\n\n }\n\n}\n\nfunction setGoogleMapsPlace() {\n\n document.querySelectorAll("[data-wi-search-place=\'true\']").forEach(input => {\n\n input.disabled = false;\n \n var options = {};\n\n if (input.dataset.wiRestriction != \'[]\') { \n\n var restrictions = JSON.parse(input.dataset.wiRestriction);\n options.componentRestrictions = restrictions; \n \n }\n\n options.fields = [ "address_components" ];\n options.types = [ "address" ];\n \n var googlePlace = new google.maps.places.Autocomplete(input, options);\n\n input.addEventListener("change", () => { placeNeedCheck(input); });\n googlePlace.addListener("place_changed", () => { checkInputPlace(input, googlePlace); });\n\n });\n\n}\n\nfunction setGoogleMapsApi() {\n\n if (document.querySelector("[data-wi-search-place]")) {\n\n var GOOGLE_API_KEY = "AIzaSyAhBslKzmgy6pRrLGyhlN34pN1yQYE1hvI";\n\n /**\n * \n * Se ci sono degli input Place chiama le API di Google Place\n * Documentazione: https://developers.google.com/maps/documentation/javascript/place-autocomplete?hl=it\n * \n */\n\n var script = document.createElement(\'script\');\n script.type = \'text/javascript\';\n script.async = true;\n script.src = \'https://maps.googleapis.com/maps/api/js?key=\'+GOOGLE_API_KEY+\'&loading=async&libraries=places&callback=setGoogleMapsPlace\'; \n\n document.head.appendChild(script);\n \n }\n\n}\n\n/**\n * \n * inputCountry() - inputStates()\n * \n */\n\nfunction setInputCountry() {\n\n document.querySelectorAll("[data-wi-input-country=\'true\']").forEach(element => {\n element.addEventListener("change", searchStates);\n element.addEventListener("focusout", searchStates);\n });\n\n}\n\nfunction setCountryState(input, country, state) {\n\n textListValue(input, country);\n searchStates(input, state);\n \n}\n\nfunction searchStates(event, stateValue = null) {\n\n if (typeof event.target !== "undefined") {\n var inputCountry = event.target;\n } else {\n var inputCountry = event;\n }\n \n var form = inputCountry.form;\n var inputCountryName = inputCountry.dataset.wiName.replace(\'-text\', \'\');\n var inputStateName = inputCountry.dataset.wiInputState;\n\n var inputState = form.querySelector(\'input[data-wi-name="\'+inputStateName+\'-text"]\');\n\n inputState.disabled = true;\n inputState.value = "";\n\n delay(100).then(() => {\n\n if (form.querySelector(\'input[name="\'+inputCountryName+\'"]:checked\') != null) {\n\n var country = form.querySelector(\'input[name="\'+inputCountryName+\'"]:checked\').value;\n \n if (inputState.dataset.wiListStates != country) {\n \n inputState.dataset.wiListStates = country;\n\n loadingSpinner();\n\n $.ajax({\n type: "POST",\n url: pathApp+\'/api/states.php\',\n data: { \n post: \'true\',\n country: country\n }, \n success: function (data) {\n\n const response = JSON.parse(data);\n\n textListOptions( inputState, response );\n\n inputState.disabled = false;\n\n if (stateValue != null && stateValue != "") { textListValue(inputState, stateValue); }\n\n loadingSpinner();\n\n },\n error: function (XMLHttpRequest) {\n\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n\n }\n });\n\n } else {\n\n inputState.disabled = false;\n \n }\n\n }\n\n });\n\n}'},7350:n=>{n.exports='var x, i, j, l, ll, selElmnt, a, b, c;\n\n// Look for any elements with the class "custom-select":\nx = document.querySelectorAll("[data-wi-select=\'true\']");\nl = x.length;\n\nfor (i = 0; i < l; i++) {\n\n selElmnt = x[i].getElementsByTagName("select")[0];\n ll = selElmnt.length;\n\n // For each element, create a new DIV that will act as the selected item:\n a = document.createElement("DIV");\n a.setAttribute("class", "select-selected wi-input");\n a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;\n x[i].appendChild(a);\n\n // For each element, create a new DIV that will contain the option list:\n b = document.createElement("DIV");\n b.setAttribute("class", "select-items wi-input-list no-scrollbar");\n\n for (j = 0; j < ll; j++) {\n\n // For each option in the original select element, create a new DIV that will act as an option item:\n c = document.createElement("DIV");\n c.id = selElmnt.options[j].value;\n c.setAttribute("class", "wi-input-list-value");\n c.innerHTML = selElmnt.options[j].innerHTML;\n\n // Se è impostato un valore di default selezionalo\n if (selElmnt.value != undefined) { if (c.id == selElmnt.value) { c.classList.add("same-as-selected"); } }\n\n c.addEventListener("click", function(e) {\n\n // When an item is clicked, update the original select box, and the selected item:\n var y, i, k, s, h, sl, yl;\n s = this.parentNode.parentNode.getElementsByTagName("select")[0];\n sl = s.length;\n selElmnt.value = this.id;\n h = this.parentNode.previousSibling;\n\n for (i = 0; i < sl; i++) {\n if (s.options[i].innerHTML == this.innerHTML) {\n s.selectedIndex = i;\n h.innerHTML = this.innerHTML;\n y = this.parentNode.getElementsByClassName("same-as-selected");\n yl = y.length;\n for (k = 0; k < yl; k++) {\n y[k].classList.remove("same-as-selected");\n }\n this.setAttribute("class", "wi-input-list-value same-as-selected");\n break;\n }\n }\n\n h.click();\n\n });\n\n // Passa le funzioni onchange dal select alle nuove opzioni\n c.onclick = selElmnt.onchange;\n c.mousedown = selElmnt.onchange;\n\n b.appendChild(c);\n\n }\n\n x[i].appendChild(b);\n\n a.addEventListener("click", function(e) {\n\n // When the select box is clicked, close any other select boxes, and open/close the current select box\n e.stopPropagation();\n closeAllSelect(this);\n this.classList.toggle("select-arrow-active");\n this.parentNode.classList.toggle("wi-list-active");\n check();\n\n });\n\n}\n\nfunction closeAllSelect(elmnt) {\n\n // A function that will close all select boxes in the document, except the current select box:\n var x, y, i, xl, yl, arrNo = [];\n x = document.getElementsByClassName("select-items");\n y = document.getElementsByClassName("select-selected");\n var container = document.querySelector(".wi-input-container.wi-list-active");\n xl = x.length;\n yl = y.length;\n\n for (i = 0; i < yl; i++) {\n if (elmnt == y[i]) {\n arrNo.push(i)\n }else{\n y[i].classList.remove("select-arrow-active");\n }\n }\n\n if (container != null) {\n container.classList.remove("wi-list-active");\n }\n\n}\n\n// If the user clicks anywhere outside the select box, then close all select boxes:\ndocument.addEventListener("click", closeAllSelect);'},4428:n=>{n.exports='function formToArray(formElements) {\n\n const ARRAY = {};\n\n for (let i = 0; i < formElements.length; i++) {\n\n var add = false;\n\n var input = formElements[i];\n\n if (input.type == \'checkbox\' || input.type == \'radio\') {\n if (input.checked == true) { var add = true; }\n } else {\n if (input.value != "") { var add = true;}\n }\n\n if (add) {\n\n var inputName = input.name;\n var inputValue = input.value;\n\n if (inputName.includes("[]")) {\n\n inputName = inputName.replace("[]", "");\n\n if (inputName in ARRAY) {\n inputName = inputName.replace("[]", "");\n ARRAY[inputName].push(inputValue);\n } else {\n inputName = inputName.replace("[]", "");\n ARRAY[inputName] = [];\n ARRAY[inputName].push(inputValue);\n }\n \n } else {\n\n if (inputName in ARRAY) {\n\n } else {\n ARRAY[inputName] = inputValue;\n }\n\n }\n\n }\n\n }\n\n return ARRAY;\n \n}\n\nfunction prettyFormResponse(data) {\n\n if (data != \'\') {\n \n console.log(\'ERRORE FORM: \'+data);\n\n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n container.innerHTML = \'<div class="title-big a-c"><i class="bi bi-x-circle tx-danger"></i></div><div class="subtitle mt-8 a-c">C\\\'è stato un problema con l\\\'invio della tua richiesta</div><div class="c-w mt-10"><a onclick="location.reload();" class="btn btn-primary c-w">Riprova</a></div>\';\n\n } else {\n \n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n container.innerHTML = \'<div class="title-big a-c"><i class="bi bi-check2-circle tx-success"></i></div><div class="subtitle mt-8 a-c">La tua richiesta è stata inviata con successo!</div><div class="c-w mt-10"><a onclick="location.reload(); " class="btn btn-primary c-w">Torna al sito</a></div>\';\n\n }\n \n}\n\nfunction sendForm(button, url, responseFunction = prettyFormResponse) {\n\n loadingSpinner();\n\n const VALUES = formToArray(button.form.elements);\n var form = JSON.stringify(VALUES);\n\n $.ajax({\n type: "POST",\n url: url,\n data: { \n post: \'true\',\n form: form\n }, \n success: function (data) {\n\n if (responseFunction != null) {\n if (typeof responseFunction === \'function\') {\n responseFunction(data);\n } else {\n loadingSpinner();\n }\n }\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}\n\nfunction formUpload(form, url, responseFunction = prettyFormResponse) {\n\n loadingSpinner();\n \n var formData = new FormData(form);\n formData.append(\'post\', \'true\');\n \n $.ajax({\n type: "POST",\n url: url,\n data: formData,\n contentType: false,\n cache: false,\n processData:false, \n success: function (data) {\n\n if (responseFunction != null) {\n if (typeof responseFunction === \'function\') {\n responseFunction(data);\n } else {\n loadingSpinner();\n }\n }\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}'},8516:n=>{n.exports='function menuMobile(hamburger = "#hamburger", navMobile = "#nav-mobile") { \n \n if (hamburger != null) { document.querySelector(hamburger).classList.toggle("click"); }\n if (navMobile != null) { document.querySelector(navMobile).classList.toggle("show"); }\n\n if (document.querySelector(hamburger).classList.contains("click")) {\n disableScroll();\n } else {\n enableScroll();\n }\n\n}'},148:n=>{n.exports="function modal(selector) {\n\n setUpModal(selector);\n\n var modal = document.querySelector(selector);\n\n modal.classList.toggle('wi-show');\n modal.classList.toggle('no-interaction');\n\n if (modal.classList.contains('wi-show')) {\n disableScroll();\n } else {\n enableScroll();\n }\n\n}\n\nfunction setUpModal(selector) {\n \n document.querySelectorAll(selector + ' .wi-close-modal').forEach(element => {\n if (element.onclick == null) {\n element.onclick = function() { modal(selector) };\n }\n });\n\n}"},225:n=>{n.exports="function setUpPage() {\n \n $.ajax({\n type: \"POST\",\n url: pathApp+'/api/alert.php',\n data: { \n post: 'true',\n frontend: 'true',\n alert: 801\n }, \n success: function (data) {\n NO_INTERNET_ALERT = data;\n }\n });\n\n var PAGE_URL = new URL(window.location.href);\n\n if (PAGE_URL.searchParams.get('scroll')) {\n \n var idScroll = PAGE_URL.searchParams.get('scroll');\n scrolla('#'+idScroll);\n\n }\n\n // L'alert non viene passato solo tramite GET ma anche tramite variabile php\n // if (PAGE_URL.searchParams.get('alert')) {\n // var alertCode = PAGE_URL.searchParams.get('alert'); alertToast(alertCode);\n // }\n\n setAos();\n setInput();\n setDropdown();\n setVideoJS();\n \n};"},4642:n=>{n.exports=function(n){function e(n){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",n)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(n):"undefined"!=typeof eval?eval.call(null,n):e("EvalError: No eval function available")}catch(n){e(n)}}},1120:(n,e,t)=>{t(4642)(t(6867))},2051:(n,e,t)=>{t(4642)(t(5068))},1809:(n,e,t)=>{t(4642)(t(7244))},7154:(n,e,t)=>{t(4642)(t(2787))},8865:(n,e,t)=>{t(4642)(t(7350))},1123:(n,e,t)=>{t(4642)(t(4428))},5329:(n,e,t)=>{t(4642)(t(8516))},871:(n,e,t)=>{t(4642)(t(148))},7186:(n,e,t)=>{t(4642)(t(225))}},e={};function t(a){var i=e[a];if(void 0!==i)return i.exports;var o=e[a]={exports:{}};return n[a](o,o.exports,t),o.exports}t.n=n=>{var e=n&&n.__esModule?()=>n.default:()=>n;return t.d(e,{a:e}),e},t.d=(n,e)=>{for(var a in e)t.o(e,a)&&!t.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:e[a]})},t.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),t.r=n=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})};var a={};(()=>{"use strict";t.r(a);t(2051),t(5329),t(1120),t(1809),t(871),t(7154),t(8865),t(1123),t(7186)})(),window.wonder=a})();
2
+ (()=>{var n={6867:n=>{n.exports="function alertContainer() {\n\n if (document.querySelector('.alert-container')) {\n\n var container = document.querySelector('.alert-container');\n\n }else{\n\n var container = document.createElement('div');\n container.classList.add('alert-container');\n container.classList.add('p-f');\n container.classList.add('top');\n container.classList.add('start');\n container.classList.add('w-100');\n container.classList.add('h-100');\n container.classList.add('no-interaction');\n container.style.zIndex = \"1000\";\n\n document.body.insertBefore(container, document.body.firstChild);\n\n }\n\n return container;\n\n}\n\nfunction alertToast(alert) {\n\n var container = alertContainer();\n\n if (alert == 801) {\n\n container.innerHTML += NO_INTERNET_ALERT;\n\n } else {\n\n $.ajax({\n type: \"POST\",\n url: pathApp+'/api/alert.php',\n data: { \n post: 'true',\n frontend: 'true',\n alert: alert\n }, \n success: function (data) {\n\n container.innerHTML += data;\n \n var url = new URL(window.location.href);\n url.searchParams.delete('alert');\n window.history.replaceState(null, null, url);\n\n }\n });\n\n }\n\n setTimeout(() => {\n document.querySelectorAll('.wi-alert.wi-show').forEach(element => {\n element.classList.remove('wi-show');\n });\n }, 4000);\n\n}"},5068:n=>{n.exports="function setAos() {\n\n if (isMobile() && (typeof MOBILE_REMOVE_AOS == 'undefined' || MOBILE_REMOVE_AOS == true)) {\n AOS.init({\n disable: 'mobile'\n });\n } else {\n AOS.init();\n }\n\n}"},7244:n=>{n.exports="function toggleDropdown(container) {\n\n if (container.classList.contains('wi-show')) {\n closeDropdown(container);\n } else {\n openDropdown(container);\n }\n \n}\n\nfunction openDropdown(container) {\n\n container.classList.add('wi-show'); \n\n if (container.querySelector('i.bi-chevron-down')) {\n container.querySelector('i.bi-chevron-down').classList.add('bi-chevron-up');\n container.querySelector('i.bi-chevron-down').classList.remove('bi-chevron-down');\n }\n\n if (container.querySelector('i.bi-plus')) {\n container.querySelector('i.bi-plus').classList.add('bi-dash');\n container.querySelector('i.bi-plus').classList.remove('bi-plus');\n }\n\n if (container.querySelector('i.bi-plus-lg')) {\n container.querySelector('i.bi-plus-lg').classList.add('bi-dash-lg');\n container.querySelector('i.bi-plus-lg').classList.remove('bi-plus-lg');\n }\n \n}\n\nfunction closeDropdown(container) {\n\n container.classList.remove('wi-show'); \n\n if (container.querySelector('i.bi-chevron-up')) {\n container.querySelector('i.bi-chevron-up').classList.add('bi-chevron-down');\n container.querySelector('i.bi-chevron-up').classList.remove('bi-chevron-up');\n }\n\n if (container.querySelector('i.bi-dash')) {\n container.querySelector('i.bi-dash').classList.add('bi-plus');\n container.querySelector('i.bi-dash').classList.remove('bi-dash');\n }\n\n if (container.querySelector('i.bi-dash-lg')) {\n container.querySelector('i.bi-dash-lg').classList.add('bi-plus-lg');\n container.querySelector('i.bi-dash-lg').classList.remove('bi-dash-lg');\n }\n \n}\n\nfunction setDropdown() {\n \n document.querySelectorAll(\".wi-dropdown-btn .wi-switcher\").forEach(element => {\n\n element.onclick = function() { toggleDropdown(element.parentElement); };\n \n element.parentElement.onmouseleave = function() { closeDropdown(element.parentElement); };\n \n });\n\n document.querySelectorAll(\".wi-dropdown-box .wi-switcher\").forEach(element => {\n\n if (element.parentElement.classList.contains('wi-show')) {\n openDropdown(element.parentElement);\n }\n\n element.onclick = function() { toggleDropdown(element.parentElement); };\n \n });\n\n}"},2787:n=>{n.exports='/**\n * \n * GOOGLE MAPS API\n * \n */\n\nfunction placeNeedCheck(input) {\n\n inputError(input, \'Indirizzo non valido, è necessario selezionare un indirizzo dall\\\'elenco!\');\n\n}\n\nfunction checkInputPlace(input, autocomplete) {\n \n var inputContainer = input.parentElement;\n\n var country = inputContainer.querySelector(\'[data-wi-spi="country"]\');\n var province = inputContainer.querySelector(\'[data-wi-spi="province"]\');\n var cap = inputContainer.querySelector(\'[data-wi-spi="cap"]\');\n var city = inputContainer.querySelector(\'[data-wi-spi="city"]\');\n var street = inputContainer.querySelector(\'[data-wi-spi="street"]\');\n var number = inputContainer.querySelector(\'[data-wi-spi="number"]\');\n\n country.value = "";\n province.value = "";\n cap.value = "";\n city.value = "";\n street.value = "";\n number.value = "";\n\n removeInputError(input);\n\n if (autocomplete.getPlace()) {\n\n var place = autocomplete.getPlace();\n\n if (place.address_components) {\n\n for (const component of place.address_components) {\n \n const componentType = component.types;\n\n if (componentType.includes(\'street_number\')) { number.value = component.long_name; }\n if (componentType.includes(\'route\')) { street.value = component.short_name; }\n if (componentType.includes(\'administrative_area_level_3\') || componentType.includes(\'postal_town\')) { city.value = component.short_name; }\n if (componentType.includes(\'postal_code\') || componentType.includes(\'postal_code_prefix\')) { cap.value = component.short_name; }\n if (componentType.includes(\'administrative_area_level_2\')) { province.value = component.short_name; }\n if (componentType.includes(\'country\')) { country.value = component.short_name; }\n\n }\n\n if (country.value == "" || province.value == "" || cap.value == "" || city.value == "" || street.value == "" || number.value == "") {\n \n var error = "Indirizzo non valido";\n\n if (country.value == "") {\n error += ", manca il paese";\n } else if (province.value == "") {\n error += ", manca la provincia";\n } else if (cap.value == "") {\n error += ", manca il cap";\n } else if (city.value == "") {\n error += ", manca la città";\n } else if (street.value == "") {\n error += ", manca la via";\n } else if (number.value == "") {\n error += ", manca il numero civico";\n }\n\n inputError(input, error);\n \n }\n\n } else {\n\n inputError(input, \'Indirizzo non valido\');\n\n }\n\n } else {\n\n inputError(input, \'Indirizzo non valido\');\n\n }\n\n check();\n\n}\n\nfunction setPlace(input, country = null, province = null, cap = null, city = null, street = null, number = null) {\n\n var inputContainer = input.parentElement;\n\n var countryInput = inputContainer.querySelector(\'[data-wi-spi="country"]\');\n var provinceInput = inputContainer.querySelector(\'[data-wi-spi="province"]\');\n var capInput = inputContainer.querySelector(\'[data-wi-spi="cap"]\');\n var cityInput = inputContainer.querySelector(\'[data-wi-spi="city"]\');\n var streetInput = inputContainer.querySelector(\'[data-wi-spi="street"]\');\n var numberInput = inputContainer.querySelector(\'[data-wi-spi="number"]\');\n\n if (country == null) {\n\n country = countryInput.value;\n province = provinceInput.value;\n cap = capInput.value;\n city = cityInput.value;\n street = streetInput.value;\n number = numberInput.value;\n\n } else {\n\n countryInput.value = country;\n provinceInput.value = province;\n capInput.value = cap;\n cityInput.value = city;\n streetInput.value = street;\n numberInput.value = number;\n \n }\n\n if (country != "" || province != "" || cap != "" || city != "" || street != "" || number != "") {\n \n var address = street+\', \'+number+\', \'+city+\', \'+province+\', \'+country;\n input.value = address;\n\n checkLabel();\n check();\n\n }\n\n}\n\nfunction setGoogleMapsPlace() {\n\n document.querySelectorAll("[data-wi-search-place=\'true\']").forEach(input => {\n\n input.disabled = false;\n \n var options = {};\n\n if (input.dataset.wiRestriction != \'[]\') { \n\n var restrictions = JSON.parse(input.dataset.wiRestriction);\n options.componentRestrictions = restrictions; \n \n }\n\n options.fields = [ "address_components" ];\n options.types = [ "address" ];\n \n var googlePlace = new google.maps.places.Autocomplete(input, options);\n\n input.addEventListener("change", () => { placeNeedCheck(input); });\n googlePlace.addListener("place_changed", () => { checkInputPlace(input, googlePlace); });\n\n });\n\n}\n\nfunction setGoogleMapsApi() {\n\n if (document.querySelector("[data-wi-search-place]")) {\n\n var GOOGLE_API_KEY = "AIzaSyAhBslKzmgy6pRrLGyhlN34pN1yQYE1hvI";\n\n /**\n * \n * Se ci sono degli input Place chiama le API di Google Place\n * Documentazione: https://developers.google.com/maps/documentation/javascript/place-autocomplete?hl=it\n * \n */\n\n var script = document.createElement(\'script\');\n script.type = \'text/javascript\';\n script.async = true;\n script.src = \'https://maps.googleapis.com/maps/api/js?key=\'+GOOGLE_API_KEY+\'&loading=async&libraries=places&callback=setGoogleMapsPlace\'; \n\n document.head.appendChild(script);\n \n }\n\n}\n\n/**\n * \n * inputCountry() - inputStates()\n * \n */\n\nfunction setInputCountry() {\n\n document.querySelectorAll("[data-wi-input-country=\'true\']").forEach(element => {\n element.addEventListener("change", searchStates);\n element.addEventListener("focusout", searchStates);\n });\n\n}\n\nfunction setCountryState(input, country, state) {\n\n textListValue(input, country);\n searchStates(input, state);\n \n}\n\nfunction searchStates(event, stateValue = null) {\n\n if (typeof event.target !== "undefined") {\n var inputCountry = event.target;\n } else {\n var inputCountry = event;\n }\n \n var form = inputCountry.form;\n var inputCountryName = inputCountry.dataset.wiName.replace(\'-text\', \'\');\n var inputStateName = inputCountry.dataset.wiInputState;\n\n var inputState = form.querySelector(\'input[data-wi-name="\'+inputStateName+\'-text"]\');\n\n inputState.disabled = true;\n inputState.value = "";\n\n delay(100).then(() => {\n\n if (form.querySelector(\'input[name="\'+inputCountryName+\'"]:checked\') != null) {\n\n var country = form.querySelector(\'input[name="\'+inputCountryName+\'"]:checked\').value;\n \n if (inputState.dataset.wiListStates != country) {\n \n inputState.dataset.wiListStates = country;\n\n loadingSpinner();\n\n $.ajax({\n type: "POST",\n url: pathApp+\'/api/states.php\',\n data: { \n post: \'true\',\n country: country\n }, \n success: function (data) {\n\n const response = JSON.parse(data);\n\n textListOptions( inputState, response );\n\n inputState.disabled = false;\n\n if (stateValue != null && stateValue != "") { textListValue(inputState, stateValue); }\n\n loadingSpinner();\n\n },\n error: function (XMLHttpRequest) {\n\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n\n }\n });\n\n } else {\n\n inputState.disabled = false;\n \n }\n\n }\n\n });\n\n}'},7350:n=>{n.exports='var x, i, j, l, ll, selElmnt, a, b, c;\n\n// Look for any elements with the class "custom-select":\nx = document.querySelectorAll("[data-wi-select=\'true\']");\nl = x.length;\n\nfor (i = 0; i < l; i++) {\n\n selElmnt = x[i].getElementsByTagName("select")[0];\n ll = selElmnt.length;\n\n // For each element, create a new DIV that will act as the selected item:\n a = document.createElement("DIV");\n a.setAttribute("class", "select-selected wi-input");\n a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;\n x[i].appendChild(a);\n\n // For each element, create a new DIV that will contain the option list:\n b = document.createElement("DIV");\n b.setAttribute("class", "select-items wi-input-list no-scrollbar");\n\n for (j = 0; j < ll; j++) {\n\n // For each option in the original select element, create a new DIV that will act as an option item:\n c = document.createElement("DIV");\n c.id = selElmnt.options[j].value;\n c.setAttribute("class", "wi-input-list-value");\n c.innerHTML = selElmnt.options[j].innerHTML;\n\n // Se è impostato un valore di default selezionalo\n if (selElmnt.value != undefined) { if (c.id == selElmnt.value) { c.classList.add("same-as-selected"); } }\n\n c.addEventListener("click", function(e) {\n\n // When an item is clicked, update the original select box, and the selected item:\n var y, i, k, s, h, sl, yl;\n s = this.parentNode.parentNode.getElementsByTagName("select")[0];\n sl = s.length;\n selElmnt.value = this.id;\n h = this.parentNode.previousSibling;\n\n for (i = 0; i < sl; i++) {\n if (s.options[i].innerHTML == this.innerHTML) {\n s.selectedIndex = i;\n h.innerHTML = this.innerHTML;\n y = this.parentNode.getElementsByClassName("same-as-selected");\n yl = y.length;\n for (k = 0; k < yl; k++) {\n y[k].classList.remove("same-as-selected");\n }\n this.setAttribute("class", "wi-input-list-value same-as-selected");\n break;\n }\n }\n\n h.click();\n\n });\n\n // Passa le funzioni onchange dal select alle nuove opzioni\n c.onclick = selElmnt.onchange;\n c.mousedown = selElmnt.onchange;\n\n b.appendChild(c);\n\n }\n\n x[i].appendChild(b);\n\n a.addEventListener("click", function(e) {\n\n // When the select box is clicked, close any other select boxes, and open/close the current select box\n e.stopPropagation();\n closeAllSelect(this);\n this.classList.toggle("select-arrow-active");\n this.parentNode.classList.toggle("wi-list-active");\n check();\n\n });\n\n}\n\nfunction closeAllSelect(elmnt) {\n\n // A function that will close all select boxes in the document, except the current select box:\n var x, y, i, xl, yl, arrNo = [];\n x = document.getElementsByClassName("select-items");\n y = document.getElementsByClassName("select-selected");\n var container = document.querySelector(".wi-input-container.wi-list-active");\n xl = x.length;\n yl = y.length;\n\n for (i = 0; i < yl; i++) {\n if (elmnt == y[i]) {\n arrNo.push(i)\n }else{\n y[i].classList.remove("select-arrow-active");\n }\n }\n\n if (container != null) {\n container.classList.remove("wi-list-active");\n }\n\n}\n\n// If the user clicks anywhere outside the select box, then close all select boxes:\ndocument.addEventListener("click", closeAllSelect);'},4428:n=>{n.exports='function formToArray(formElements) {\n\n const ARRAY = {};\n\n for (let i = 0; i < formElements.length; i++) {\n\n var add = false;\n\n var input = formElements[i];\n\n if (input.type == \'checkbox\' || input.type == \'radio\') {\n if (input.checked == true) { var add = true; }\n } else {\n if (input.value != "") { var add = true;}\n }\n\n if (add) {\n\n var inputName = input.name;\n var inputValue = input.value;\n\n if (inputName.includes("[]")) {\n\n inputName = inputName.replace("[]", "");\n\n if (inputName in ARRAY) {\n inputName = inputName.replace("[]", "");\n ARRAY[inputName].push(inputValue);\n } else {\n inputName = inputName.replace("[]", "");\n ARRAY[inputName] = [];\n ARRAY[inputName].push(inputValue);\n }\n \n } else {\n\n if (inputName in ARRAY) {\n\n } else {\n ARRAY[inputName] = inputValue;\n }\n\n }\n\n }\n\n }\n\n return ARRAY;\n \n}\n\nfunction prettyFormResponse(data) {\n\n if (data != \'\') {\n \n console.log(\'ERRORE FORM: \'+data);\n\n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n container.innerHTML = \'<div class="title-big a-c"><i class="bi bi-x-circle tx-danger"></i></div><div class="subtitle mt-8 a-c">C\\\'è stato un problema con l\\\'invio della tua richiesta</div><div class="c-w mt-10"><a onclick="location.reload();" class="btn btn-primary c-w">Riprova</a></div>\';\n\n } else {\n \n var container = document.querySelector("#loading-spinner .center");\n container.classList.add("w-80");\n container.innerHTML = \'<div class="title-big a-c"><i class="bi bi-check2-circle tx-success"></i></div><div class="subtitle mt-8 a-c">La tua richiesta è stata inviata con successo!</div><div class="c-w mt-10"><a onclick="location.reload(); " class="btn btn-primary c-w">Torna al sito</a></div>\';\n\n }\n \n}\n\nfunction sendForm(button, url, responseFunction = prettyFormResponse) {\n\n loadingSpinner();\n\n const VALUES = formToArray(button.form.elements);\n var form = JSON.stringify(VALUES);\n\n $.ajax({\n type: "POST",\n url: url,\n data: { \n post: \'true\',\n form: form\n }, \n success: function (data) {\n\n if (responseFunction != null) {\n if (typeof responseFunction === \'function\') {\n responseFunction(data);\n } else {\n loadingSpinner();\n }\n }\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}\n\nfunction formUpload(form, url, responseFunction = prettyFormResponse) {\n\n loadingSpinner();\n \n var formData = new FormData(form);\n formData.append(\'post\', \'true\');\n \n $.ajax({\n type: "POST",\n url: url,\n data: formData,\n contentType: false,\n cache: false,\n processData:false, \n success: function (data) {\n\n if (responseFunction != null) {\n if (typeof responseFunction === \'function\') {\n responseFunction(data);\n } else {\n loadingSpinner();\n }\n }\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}'},8516:n=>{n.exports='function menuMobile(hamburger = "#hamburger", navMobile = "#nav-mobile") { \n \n if (hamburger != null) { document.querySelector(hamburger).classList.toggle("click"); }\n if (navMobile != null) { document.querySelector(navMobile).classList.toggle("show"); }\n\n if (document.querySelector(hamburger).classList.contains("click")) {\n disableScroll();\n } else {\n enableScroll();\n }\n\n}'},148:n=>{n.exports="function modal(selector) {\n\n setUpModal(selector);\n\n var modal = document.querySelector(selector);\n\n modal.classList.toggle('wi-show');\n modal.classList.toggle('no-interaction');\n\n if (modal.classList.contains('wi-show')) {\n disableScroll();\n } else {\n enableScroll();\n }\n\n}\n\nfunction setUpModal(selector) {\n \n document.querySelectorAll(selector + ' .wi-close-modal').forEach(element => {\n if (element.onclick == null) {\n element.onclick = function() { modal(selector) };\n }\n });\n\n}"},225:n=>{n.exports="function setUpPage() {\n \n $.ajax({\n type: \"POST\",\n url: pathApp+'/api/alert.php',\n data: { \n post: 'true',\n frontend: 'true',\n alert: 801\n }, \n success: function (data) {\n NO_INTERNET_ALERT = data;\n }\n });\n\n var PAGE_URL = new URL(window.location.href);\n\n if (PAGE_URL.searchParams.get('scroll')) {\n \n var idScroll = PAGE_URL.searchParams.get('scroll');\n scrolla('#'+idScroll);\n\n }\n\n // L'alert non viene passato solo tramite GET ma anche tramite variabile php\n // if (PAGE_URL.searchParams.get('alert')) {\n // var alertCode = PAGE_URL.searchParams.get('alert'); alertToast(alertCode);\n // }\n\n setAos();\n setInput();\n setDropdown();\n setVideoJS();\n \n window.dispatchEvent(new Event('loaded'));\n \n};"},4642:n=>{n.exports=function(n){function e(n){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",n)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(n):"undefined"!=typeof eval?eval.call(null,n):e("EvalError: No eval function available")}catch(n){e(n)}}},1120:(n,e,t)=>{t(4642)(t(6867))},2051:(n,e,t)=>{t(4642)(t(5068))},1809:(n,e,t)=>{t(4642)(t(7244))},7154:(n,e,t)=>{t(4642)(t(2787))},8865:(n,e,t)=>{t(4642)(t(7350))},1123:(n,e,t)=>{t(4642)(t(4428))},5329:(n,e,t)=>{t(4642)(t(8516))},871:(n,e,t)=>{t(4642)(t(148))},7186:(n,e,t)=>{t(4642)(t(225))}},e={};function t(a){var i=e[a];if(void 0!==i)return i.exports;var o=e[a]={exports:{}};return n[a](o,o.exports,t),o.exports}t.n=n=>{var e=n&&n.__esModule?()=>n.default:()=>n;return t.d(e,{a:e}),e},t.d=(n,e)=>{for(var a in e)t.o(e,a)&&!t.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:e[a]})},t.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),t.r=n=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})};var a={};(()=>{"use strict";t.r(a);t(2051),t(5329),t(1120),t(1809),t(871),t(7154),t(8865),t(1123),t(7186)})(),window.wonder=a})();
3
3
  //# sourceMappingURL=body-end.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontend/body-end.js","mappings":";sBAAAA,EAAOC,QAAU,+kDCAjBD,EAAOC,QAAU,kPCAjBD,EAAOC,QAAU,g0ECAjBD,EAAOC,QAAU,qyQCAjBD,EAAOC,QAAU,orHCAjBD,EAAOC,QAAU,8xHCAjBD,EAAOC,QAAU,ubCAjBD,EAAOC,QAAU,4kBCAjBD,EAAOC,QAAU,61BCIjBD,EAAOC,QAAU,SAASC,GACzB,SAASC,EAAIC,GACQ,oBAAZC,UACJA,QAAQD,OAASC,QAAQF,KAAK,kBAAmBC,EACtD,CAOA,IAC2B,oBAAfE,YAJmB,oBAAhBC,aAA2D,oBAArBC,iBAKnDF,WAAWJ,GACe,oBAATO,KACjBA,KAAKC,KAAK,KAAMR,GAEhBC,EAAI,wCAEN,CAAE,MAAOC,GACRD,EAAIC,EACL,CACD,kBC1BA,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,sBCAjH,EAAQ,KAAR,CAAyG,EAAQ,sBCAjH,EAAQ,KAAR,CAAyG,EAAQ,QCC7GO,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAab,QAGrB,IAAID,EAASW,EAAyBE,GAAY,CAGjDZ,QAAS,CAAC,GAOX,OAHAe,EAAoBH,GAAUb,EAAQA,EAAOC,QAASW,GAG/CZ,EAAOC,OACf,CCrBAW,EAAoBK,EAAKjB,IACxB,IAAIkB,EAASlB,GAAUA,EAAOmB,WAC7B,IAAOnB,EAAiB,QACxB,IAAM,EAEP,OADAY,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdN,EAAoBQ,EAAI,CAACnB,EAASqB,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEvB,EAASsB,IAC5EE,OAAOC,eAAezB,EAASsB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAetB,KAAKmB,EAAKC,GCClFlB,EAAoBqB,EAAKhC,IACH,oBAAXiC,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAezB,EAASiC,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAezB,EAAS,aAAc,CAAEmC,OAAO,GAAO","sources":["webpack://wonder/./src/build/frontend/js/alert.js","webpack://wonder/./src/build/frontend/js/aos.js","webpack://wonder/./src/build/frontend/js/dropdown.js","webpack://wonder/./src/build/frontend/js/form/place.js","webpack://wonder/./src/build/frontend/js/form/select.js","webpack://wonder/./src/build/frontend/js/form/send.js","webpack://wonder/./src/build/frontend/js/header.js","webpack://wonder/./src/build/frontend/js/modal.js","webpack://wonder/./src/build/frontend/js/pageSetUp.js","webpack://wonder/./node_modules/script-loader/addScript.js","webpack://wonder/./src/build/frontend/js/alert.js?37ef","webpack://wonder/./src/build/frontend/js/aos.js?68ca","webpack://wonder/./src/build/frontend/js/dropdown.js?51db","webpack://wonder/./src/build/frontend/js/form/place.js?6f16","webpack://wonder/./src/build/frontend/js/form/select.js?c3d3","webpack://wonder/./src/build/frontend/js/form/send.js?2a0e","webpack://wonder/./src/build/frontend/js/header.js?c891","webpack://wonder/./src/build/frontend/js/modal.js?9265","webpack://wonder/./src/build/frontend/js/pageSetUp.js?f423","webpack://wonder/webpack/bootstrap","webpack://wonder/webpack/runtime/compat get default export","webpack://wonder/webpack/runtime/define property getters","webpack://wonder/webpack/runtime/hasOwnProperty shorthand","webpack://wonder/webpack/runtime/make namespace object"],"sourcesContent":["module.exports = \"function alertContainer() {\\n\\n if (document.querySelector('.alert-container')) {\\n\\n var container = document.querySelector('.alert-container');\\n\\n }else{\\n\\n var container = document.createElement('div');\\n container.classList.add('alert-container');\\n container.classList.add('p-f');\\n container.classList.add('top');\\n container.classList.add('start');\\n container.classList.add('w-100');\\n container.classList.add('h-100');\\n container.classList.add('no-interaction');\\n container.style.zIndex = \\\"1000\\\";\\n\\n document.body.insertBefore(container, document.body.firstChild);\\n\\n }\\n\\n return container;\\n\\n}\\n\\nfunction alertToast(alert) {\\n\\n var container = alertContainer();\\n\\n if (alert == 801) {\\n\\n container.innerHTML += NO_INTERNET_ALERT;\\n\\n } else {\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/alert.php',\\n data: { \\n post: 'true',\\n frontend: 'true',\\n alert: alert\\n }, \\n success: function (data) {\\n\\n container.innerHTML += data;\\n \\n var url = new URL(window.location.href);\\n url.searchParams.delete('alert');\\n window.history.replaceState(null, null, url);\\n\\n }\\n });\\n\\n }\\n\\n setTimeout(() => {\\n document.querySelectorAll('.wi-alert.wi-show').forEach(element => {\\n element.classList.remove('wi-show');\\n });\\n }, 4000);\\n\\n}\"","module.exports = \"function setAos() {\\n\\n if (isMobile() && (typeof MOBILE_REMOVE_AOS == 'undefined' || MOBILE_REMOVE_AOS == true)) {\\n AOS.init({\\n disable: 'mobile'\\n });\\n } else {\\n AOS.init();\\n }\\n\\n}\"","module.exports = \"function toggleDropdown(container) {\\n\\n if (container.classList.contains('wi-show')) {\\n closeDropdown(container);\\n } else {\\n openDropdown(container);\\n }\\n \\n}\\n\\nfunction openDropdown(container) {\\n\\n container.classList.add('wi-show'); \\n\\n if (container.querySelector('i.bi-chevron-down')) {\\n container.querySelector('i.bi-chevron-down').classList.add('bi-chevron-up');\\n container.querySelector('i.bi-chevron-down').classList.remove('bi-chevron-down');\\n }\\n\\n if (container.querySelector('i.bi-plus')) {\\n container.querySelector('i.bi-plus').classList.add('bi-dash');\\n container.querySelector('i.bi-plus').classList.remove('bi-plus');\\n }\\n\\n if (container.querySelector('i.bi-plus-lg')) {\\n container.querySelector('i.bi-plus-lg').classList.add('bi-dash-lg');\\n container.querySelector('i.bi-plus-lg').classList.remove('bi-plus-lg');\\n }\\n \\n}\\n\\nfunction closeDropdown(container) {\\n\\n container.classList.remove('wi-show'); \\n\\n if (container.querySelector('i.bi-chevron-up')) {\\n container.querySelector('i.bi-chevron-up').classList.add('bi-chevron-down');\\n container.querySelector('i.bi-chevron-up').classList.remove('bi-chevron-up');\\n }\\n\\n if (container.querySelector('i.bi-dash')) {\\n container.querySelector('i.bi-dash').classList.add('bi-plus');\\n container.querySelector('i.bi-dash').classList.remove('bi-dash');\\n }\\n\\n if (container.querySelector('i.bi-dash-lg')) {\\n container.querySelector('i.bi-dash-lg').classList.add('bi-plus-lg');\\n container.querySelector('i.bi-dash-lg').classList.remove('bi-dash-lg');\\n }\\n \\n}\\n\\nfunction setDropdown() {\\n \\n document.querySelectorAll(\\\".wi-dropdown-btn .wi-switcher\\\").forEach(element => {\\n\\n element.onclick = function() { toggleDropdown(element.parentElement); };\\n \\n element.parentElement.onmouseleave = function() { closeDropdown(element.parentElement); };\\n \\n });\\n\\n document.querySelectorAll(\\\".wi-dropdown-box .wi-switcher\\\").forEach(element => {\\n\\n if (element.parentElement.classList.contains('wi-show')) {\\n openDropdown(element.parentElement);\\n }\\n\\n element.onclick = function() { toggleDropdown(element.parentElement); };\\n \\n });\\n\\n}\"","module.exports = \"/**\\n * \\n * GOOGLE MAPS API\\n * \\n */\\n\\nfunction placeNeedCheck(input) {\\n\\n inputError(input, 'Indirizzo non valido, è necessario selezionare un indirizzo dall\\\\'elenco!');\\n\\n}\\n\\nfunction checkInputPlace(input, autocomplete) {\\n \\n var inputContainer = input.parentElement;\\n\\n var country = inputContainer.querySelector('[data-wi-spi=\\\"country\\\"]');\\n var province = inputContainer.querySelector('[data-wi-spi=\\\"province\\\"]');\\n var cap = inputContainer.querySelector('[data-wi-spi=\\\"cap\\\"]');\\n var city = inputContainer.querySelector('[data-wi-spi=\\\"city\\\"]');\\n var street = inputContainer.querySelector('[data-wi-spi=\\\"street\\\"]');\\n var number = inputContainer.querySelector('[data-wi-spi=\\\"number\\\"]');\\n\\n country.value = \\\"\\\";\\n province.value = \\\"\\\";\\n cap.value = \\\"\\\";\\n city.value = \\\"\\\";\\n street.value = \\\"\\\";\\n number.value = \\\"\\\";\\n\\n removeInputError(input);\\n\\n if (autocomplete.getPlace()) {\\n\\n var place = autocomplete.getPlace();\\n\\n if (place.address_components) {\\n\\n for (const component of place.address_components) {\\n \\n const componentType = component.types;\\n\\n if (componentType.includes('street_number')) { number.value = component.long_name; }\\n if (componentType.includes('route')) { street.value = component.short_name; }\\n if (componentType.includes('administrative_area_level_3') || componentType.includes('postal_town')) { city.value = component.short_name; }\\n if (componentType.includes('postal_code') || componentType.includes('postal_code_prefix')) { cap.value = component.short_name; }\\n if (componentType.includes('administrative_area_level_2')) { province.value = component.short_name; }\\n if (componentType.includes('country')) { country.value = component.short_name; }\\n\\n }\\n\\n if (country.value == \\\"\\\" || province.value == \\\"\\\" || cap.value == \\\"\\\" || city.value == \\\"\\\" || street.value == \\\"\\\" || number.value == \\\"\\\") {\\n \\n var error = \\\"Indirizzo non valido\\\";\\n\\n if (country.value == \\\"\\\") {\\n error += \\\", manca il paese\\\";\\n } else if (province.value == \\\"\\\") {\\n error += \\\", manca la provincia\\\";\\n } else if (cap.value == \\\"\\\") {\\n error += \\\", manca il cap\\\";\\n } else if (city.value == \\\"\\\") {\\n error += \\\", manca la città\\\";\\n } else if (street.value == \\\"\\\") {\\n error += \\\", manca la via\\\";\\n } else if (number.value == \\\"\\\") {\\n error += \\\", manca il numero civico\\\";\\n }\\n\\n inputError(input, error);\\n \\n }\\n\\n } else {\\n\\n inputError(input, 'Indirizzo non valido');\\n\\n }\\n\\n } else {\\n\\n inputError(input, 'Indirizzo non valido');\\n\\n }\\n\\n check();\\n\\n}\\n\\nfunction setPlace(input, country = null, province = null, cap = null, city = null, street = null, number = null) {\\n\\n var inputContainer = input.parentElement;\\n\\n var countryInput = inputContainer.querySelector('[data-wi-spi=\\\"country\\\"]');\\n var provinceInput = inputContainer.querySelector('[data-wi-spi=\\\"province\\\"]');\\n var capInput = inputContainer.querySelector('[data-wi-spi=\\\"cap\\\"]');\\n var cityInput = inputContainer.querySelector('[data-wi-spi=\\\"city\\\"]');\\n var streetInput = inputContainer.querySelector('[data-wi-spi=\\\"street\\\"]');\\n var numberInput = inputContainer.querySelector('[data-wi-spi=\\\"number\\\"]');\\n\\n if (country == null) {\\n\\n country = countryInput.value;\\n province = provinceInput.value;\\n cap = capInput.value;\\n city = cityInput.value;\\n street = streetInput.value;\\n number = numberInput.value;\\n\\n } else {\\n\\n countryInput.value = country;\\n provinceInput.value = province;\\n capInput.value = cap;\\n cityInput.value = city;\\n streetInput.value = street;\\n numberInput.value = number;\\n \\n }\\n\\n if (country != \\\"\\\" || province != \\\"\\\" || cap != \\\"\\\" || city != \\\"\\\" || street != \\\"\\\" || number != \\\"\\\") {\\n \\n var address = street+', '+number+', '+city+', '+province+', '+country;\\n input.value = address;\\n\\n checkLabel();\\n check();\\n\\n }\\n\\n}\\n\\nfunction setGoogleMapsPlace() {\\n\\n document.querySelectorAll(\\\"[data-wi-search-place='true']\\\").forEach(input => {\\n\\n input.disabled = false;\\n \\n var options = {};\\n\\n if (input.dataset.wiRestriction != '[]') { \\n\\n var restrictions = JSON.parse(input.dataset.wiRestriction);\\n options.componentRestrictions = restrictions; \\n \\n }\\n\\n options.fields = [ \\\"address_components\\\" ];\\n options.types = [ \\\"address\\\" ];\\n \\n var googlePlace = new google.maps.places.Autocomplete(input, options);\\n\\n input.addEventListener(\\\"change\\\", () => { placeNeedCheck(input); });\\n googlePlace.addListener(\\\"place_changed\\\", () => { checkInputPlace(input, googlePlace); });\\n\\n });\\n\\n}\\n\\nfunction setGoogleMapsApi() {\\n\\n if (document.querySelector(\\\"[data-wi-search-place]\\\")) {\\n\\n var GOOGLE_API_KEY = \\\"AIzaSyAhBslKzmgy6pRrLGyhlN34pN1yQYE1hvI\\\";\\n\\n /**\\n * \\n * Se ci sono degli input Place chiama le API di Google Place\\n * Documentazione: https://developers.google.com/maps/documentation/javascript/place-autocomplete?hl=it\\n * \\n */\\n\\n var script = document.createElement('script');\\n script.type = 'text/javascript';\\n script.async = true;\\n script.src = 'https://maps.googleapis.com/maps/api/js?key='+GOOGLE_API_KEY+'&loading=async&libraries=places&callback=setGoogleMapsPlace'; \\n\\n document.head.appendChild(script);\\n \\n }\\n\\n}\\n\\n/**\\n * \\n * inputCountry() - inputStates()\\n * \\n */\\n\\nfunction setInputCountry() {\\n\\n document.querySelectorAll(\\\"[data-wi-input-country='true']\\\").forEach(element => {\\n element.addEventListener(\\\"change\\\", searchStates);\\n element.addEventListener(\\\"focusout\\\", searchStates);\\n });\\n\\n}\\n\\nfunction setCountryState(input, country, state) {\\n\\n textListValue(input, country);\\n searchStates(input, state);\\n \\n}\\n\\nfunction searchStates(event, stateValue = null) {\\n\\n if (typeof event.target !== \\\"undefined\\\") {\\n var inputCountry = event.target;\\n } else {\\n var inputCountry = event;\\n }\\n \\n var form = inputCountry.form;\\n var inputCountryName = inputCountry.dataset.wiName.replace('-text', '');\\n var inputStateName = inputCountry.dataset.wiInputState;\\n\\n var inputState = form.querySelector('input[data-wi-name=\\\"'+inputStateName+'-text\\\"]');\\n\\n inputState.disabled = true;\\n inputState.value = \\\"\\\";\\n\\n delay(100).then(() => {\\n\\n if (form.querySelector('input[name=\\\"'+inputCountryName+'\\\"]:checked') != null) {\\n\\n var country = form.querySelector('input[name=\\\"'+inputCountryName+'\\\"]:checked').value;\\n \\n if (inputState.dataset.wiListStates != country) {\\n \\n inputState.dataset.wiListStates = country;\\n\\n loadingSpinner();\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/states.php',\\n data: { \\n post: 'true',\\n country: country\\n }, \\n success: function (data) {\\n\\n const response = JSON.parse(data);\\n\\n textListOptions( inputState, response );\\n\\n inputState.disabled = false;\\n\\n if (stateValue != null && stateValue != \\\"\\\") { textListValue(inputState, stateValue); }\\n\\n loadingSpinner();\\n\\n },\\n error: function (XMLHttpRequest) {\\n\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n\\n }\\n });\\n\\n } else {\\n\\n inputState.disabled = false;\\n \\n }\\n\\n }\\n\\n });\\n\\n}\"","module.exports = \"var x, i, j, l, ll, selElmnt, a, b, c;\\n\\n// Look for any elements with the class \\\"custom-select\\\":\\nx = document.querySelectorAll(\\\"[data-wi-select='true']\\\");\\nl = x.length;\\n\\nfor (i = 0; i < l; i++) {\\n\\n selElmnt = x[i].getElementsByTagName(\\\"select\\\")[0];\\n ll = selElmnt.length;\\n\\n // For each element, create a new DIV that will act as the selected item:\\n a = document.createElement(\\\"DIV\\\");\\n a.setAttribute(\\\"class\\\", \\\"select-selected wi-input\\\");\\n a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;\\n x[i].appendChild(a);\\n\\n // For each element, create a new DIV that will contain the option list:\\n b = document.createElement(\\\"DIV\\\");\\n b.setAttribute(\\\"class\\\", \\\"select-items wi-input-list no-scrollbar\\\");\\n\\n for (j = 0; j < ll; j++) {\\n\\n // For each option in the original select element, create a new DIV that will act as an option item:\\n c = document.createElement(\\\"DIV\\\");\\n c.id = selElmnt.options[j].value;\\n c.setAttribute(\\\"class\\\", \\\"wi-input-list-value\\\");\\n c.innerHTML = selElmnt.options[j].innerHTML;\\n\\n // Se è impostato un valore di default selezionalo\\n if (selElmnt.value != undefined) { if (c.id == selElmnt.value) { c.classList.add(\\\"same-as-selected\\\"); } }\\n\\n c.addEventListener(\\\"click\\\", function(e) {\\n\\n // When an item is clicked, update the original select box, and the selected item:\\n var y, i, k, s, h, sl, yl;\\n s = this.parentNode.parentNode.getElementsByTagName(\\\"select\\\")[0];\\n sl = s.length;\\n selElmnt.value = this.id;\\n h = this.parentNode.previousSibling;\\n\\n for (i = 0; i < sl; i++) {\\n if (s.options[i].innerHTML == this.innerHTML) {\\n s.selectedIndex = i;\\n h.innerHTML = this.innerHTML;\\n y = this.parentNode.getElementsByClassName(\\\"same-as-selected\\\");\\n yl = y.length;\\n for (k = 0; k < yl; k++) {\\n y[k].classList.remove(\\\"same-as-selected\\\");\\n }\\n this.setAttribute(\\\"class\\\", \\\"wi-input-list-value same-as-selected\\\");\\n break;\\n }\\n }\\n\\n h.click();\\n\\n });\\n\\n // Passa le funzioni onchange dal select alle nuove opzioni\\n c.onclick = selElmnt.onchange;\\n c.mousedown = selElmnt.onchange;\\n\\n b.appendChild(c);\\n\\n }\\n\\n x[i].appendChild(b);\\n\\n a.addEventListener(\\\"click\\\", function(e) {\\n\\n // When the select box is clicked, close any other select boxes, and open/close the current select box\\n e.stopPropagation();\\n closeAllSelect(this);\\n this.classList.toggle(\\\"select-arrow-active\\\");\\n this.parentNode.classList.toggle(\\\"wi-list-active\\\");\\n check();\\n\\n });\\n\\n}\\n\\nfunction closeAllSelect(elmnt) {\\n\\n // A function that will close all select boxes in the document, except the current select box:\\n var x, y, i, xl, yl, arrNo = [];\\n x = document.getElementsByClassName(\\\"select-items\\\");\\n y = document.getElementsByClassName(\\\"select-selected\\\");\\n var container = document.querySelector(\\\".wi-input-container.wi-list-active\\\");\\n xl = x.length;\\n yl = y.length;\\n\\n for (i = 0; i < yl; i++) {\\n if (elmnt == y[i]) {\\n arrNo.push(i)\\n }else{\\n y[i].classList.remove(\\\"select-arrow-active\\\");\\n }\\n }\\n\\n if (container != null) {\\n container.classList.remove(\\\"wi-list-active\\\");\\n }\\n\\n}\\n\\n// If the user clicks anywhere outside the select box, then close all select boxes:\\ndocument.addEventListener(\\\"click\\\", closeAllSelect);\"","module.exports = \"function formToArray(formElements) {\\n\\n const ARRAY = {};\\n\\n for (let i = 0; i < formElements.length; i++) {\\n\\n var add = false;\\n\\n var input = formElements[i];\\n\\n if (input.type == 'checkbox' || input.type == 'radio') {\\n if (input.checked == true) { var add = true; }\\n } else {\\n if (input.value != \\\"\\\") { var add = true;}\\n }\\n\\n if (add) {\\n\\n var inputName = input.name;\\n var inputValue = input.value;\\n\\n if (inputName.includes(\\\"[]\\\")) {\\n\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n\\n if (inputName in ARRAY) {\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n ARRAY[inputName].push(inputValue);\\n } else {\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n ARRAY[inputName] = [];\\n ARRAY[inputName].push(inputValue);\\n }\\n \\n } else {\\n\\n if (inputName in ARRAY) {\\n\\n } else {\\n ARRAY[inputName] = inputValue;\\n }\\n\\n }\\n\\n }\\n\\n }\\n\\n return ARRAY;\\n \\n}\\n\\nfunction prettyFormResponse(data) {\\n\\n if (data != '') {\\n \\n console.log('ERRORE FORM: '+data);\\n\\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n container.innerHTML = '<div class=\\\"title-big a-c\\\"><i class=\\\"bi bi-x-circle tx-danger\\\"></i></div><div class=\\\"subtitle mt-8 a-c\\\">C\\\\'è stato un problema con l\\\\'invio della tua richiesta</div><div class=\\\"c-w mt-10\\\"><a onclick=\\\"location.reload();\\\" class=\\\"btn btn-primary c-w\\\">Riprova</a></div>';\\n\\n } else {\\n \\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n container.innerHTML = '<div class=\\\"title-big a-c\\\"><i class=\\\"bi bi-check2-circle tx-success\\\"></i></div><div class=\\\"subtitle mt-8 a-c\\\">La tua richiesta è stata inviata con successo!</div><div class=\\\"c-w mt-10\\\"><a onclick=\\\"location.reload(); \\\" class=\\\"btn btn-primary c-w\\\">Torna al sito</a></div>';\\n\\n }\\n \\n}\\n\\nfunction sendForm(button, url, responseFunction = prettyFormResponse) {\\n\\n loadingSpinner();\\n\\n const VALUES = formToArray(button.form.elements);\\n var form = JSON.stringify(VALUES);\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: url,\\n data: { \\n post: 'true',\\n form: form\\n }, \\n success: function (data) {\\n\\n if (responseFunction != null) {\\n if (typeof responseFunction === 'function') {\\n responseFunction(data);\\n } else {\\n loadingSpinner();\\n }\\n }\\n\\n },\\n error: function (XMLHttpRequest) {\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n }\\n });\\n\\n}\\n\\nfunction formUpload(form, url, responseFunction = prettyFormResponse) {\\n\\n loadingSpinner();\\n \\n var formData = new FormData(form);\\n formData.append('post', 'true');\\n \\n $.ajax({\\n type: \\\"POST\\\",\\n url: url,\\n data: formData,\\n contentType: false,\\n cache: false,\\n processData:false, \\n success: function (data) {\\n\\n if (responseFunction != null) {\\n if (typeof responseFunction === 'function') {\\n responseFunction(data);\\n } else {\\n loadingSpinner();\\n }\\n }\\n\\n },\\n error: function (XMLHttpRequest) {\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n }\\n });\\n\\n}\"","module.exports = \"function menuMobile(hamburger = \\\"#hamburger\\\", navMobile = \\\"#nav-mobile\\\") { \\n \\n if (hamburger != null) { document.querySelector(hamburger).classList.toggle(\\\"click\\\"); }\\n if (navMobile != null) { document.querySelector(navMobile).classList.toggle(\\\"show\\\"); }\\n\\n if (document.querySelector(hamburger).classList.contains(\\\"click\\\")) {\\n disableScroll();\\n } else {\\n enableScroll();\\n }\\n\\n}\"","module.exports = \"function modal(selector) {\\n\\n setUpModal(selector);\\n\\n var modal = document.querySelector(selector);\\n\\n modal.classList.toggle('wi-show');\\n modal.classList.toggle('no-interaction');\\n\\n if (modal.classList.contains('wi-show')) {\\n disableScroll();\\n } else {\\n enableScroll();\\n }\\n\\n}\\n\\nfunction setUpModal(selector) {\\n \\n document.querySelectorAll(selector + ' .wi-close-modal').forEach(element => {\\n if (element.onclick == null) {\\n element.onclick = function() { modal(selector) };\\n }\\n });\\n\\n}\"","module.exports = \"function setUpPage() {\\n \\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/alert.php',\\n data: { \\n post: 'true',\\n frontend: 'true',\\n alert: 801\\n }, \\n success: function (data) {\\n NO_INTERNET_ALERT = data;\\n }\\n });\\n\\n var PAGE_URL = new URL(window.location.href);\\n\\n if (PAGE_URL.searchParams.get('scroll')) {\\n \\n var idScroll = PAGE_URL.searchParams.get('scroll');\\n scrolla('#'+idScroll);\\n\\n }\\n\\n // L'alert non viene passato solo tramite GET ma anche tramite variabile php\\n // if (PAGE_URL.searchParams.get('alert')) {\\n // var alertCode = PAGE_URL.searchParams.get('alert'); alertToast(alertCode);\\n // }\\n\\n setAos();\\n setInput();\\n setDropdown();\\n setVideoJS();\\n \\n};\"","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nmodule.exports = function(src) {\n\tfunction log(error) {\n\t\t(typeof console !== \"undefined\")\n\t\t&& (console.error || console.log)(\"[Script Loader]\", error);\n\t}\n\n\t// Check for IE =< 8\n\tfunction isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}\n\n\ttry {\n\t\tif (typeof execScript !== \"undefined\" && isIE()) {\n\t\t\texecScript(src);\n\t\t} else if (typeof eval !== \"undefined\") {\n\t\t\teval.call(null, src);\n\t\t} else {\n\t\t\tlog(\"EvalError: No eval function available\");\n\t\t}\n\t} catch (error) {\n\t\tlog(error);\n\t}\n}\n","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/alert.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/aos.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/dropdown.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/form/place.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/form/select.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/form/send.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/header.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/modal.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/pageSetUp.js\"))","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["module","exports","src","log","error","console","execScript","attachEvent","addEventListener","eval","call","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","value"],"sourceRoot":""}
1
+ {"version":3,"file":"frontend/body-end.js","mappings":";sBAAAA,EAAOC,QAAU,+kDCAjBD,EAAOC,QAAU,kPCAjBD,EAAOC,QAAU,g0ECAjBD,EAAOC,QAAU,qyQCAjBD,EAAOC,QAAU,orHCAjBD,EAAOC,QAAU,8xHCAjBD,EAAOC,QAAU,ubCAjBD,EAAOC,QAAU,4kBCAjBD,EAAOC,QAAU,m5BCIjBD,EAAOC,QAAU,SAASC,GACzB,SAASC,EAAIC,GACQ,oBAAZC,UACJA,QAAQD,OAASC,QAAQF,KAAK,kBAAmBC,EACtD,CAOA,IAC2B,oBAAfE,YAJmB,oBAAhBC,aAA2D,oBAArBC,iBAKnDF,WAAWJ,GACe,oBAATO,KACjBA,KAAKC,KAAK,KAAMR,GAEhBC,EAAI,wCAEN,CAAE,MAAOC,GACRD,EAAIC,EACL,CACD,kBC1BA,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,uBCAjH,EAAQ,KAAR,CAAyG,EAAQ,sBCAjH,EAAQ,KAAR,CAAyG,EAAQ,sBCAjH,EAAQ,KAAR,CAAyG,EAAQ,QCC7GO,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAab,QAGrB,IAAID,EAASW,EAAyBE,GAAY,CAGjDZ,QAAS,CAAC,GAOX,OAHAe,EAAoBH,GAAUb,EAAQA,EAAOC,QAASW,GAG/CZ,EAAOC,OACf,CCrBAW,EAAoBK,EAAKjB,IACxB,IAAIkB,EAASlB,GAAUA,EAAOmB,WAC7B,IAAOnB,EAAiB,QACxB,IAAM,EAEP,OADAY,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdN,EAAoBQ,EAAI,CAACnB,EAASqB,KACjC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAEvB,EAASsB,IAC5EE,OAAOC,eAAezB,EAASsB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDX,EAAoBY,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAetB,KAAKmB,EAAKC,GCClFlB,EAAoBqB,EAAKhC,IACH,oBAAXiC,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAezB,EAASiC,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAezB,EAAS,aAAc,CAAEmC,OAAO,GAAO","sources":["webpack://wonder/./src/build/frontend/js/alert.js","webpack://wonder/./src/build/frontend/js/aos.js","webpack://wonder/./src/build/frontend/js/dropdown.js","webpack://wonder/./src/build/frontend/js/form/place.js","webpack://wonder/./src/build/frontend/js/form/select.js","webpack://wonder/./src/build/frontend/js/form/send.js","webpack://wonder/./src/build/frontend/js/header.js","webpack://wonder/./src/build/frontend/js/modal.js","webpack://wonder/./src/build/frontend/js/pageSetUp.js","webpack://wonder/./node_modules/script-loader/addScript.js","webpack://wonder/./src/build/frontend/js/alert.js?37ef","webpack://wonder/./src/build/frontend/js/aos.js?68ca","webpack://wonder/./src/build/frontend/js/dropdown.js?51db","webpack://wonder/./src/build/frontend/js/form/place.js?6f16","webpack://wonder/./src/build/frontend/js/form/select.js?c3d3","webpack://wonder/./src/build/frontend/js/form/send.js?2a0e","webpack://wonder/./src/build/frontend/js/header.js?c891","webpack://wonder/./src/build/frontend/js/modal.js?9265","webpack://wonder/./src/build/frontend/js/pageSetUp.js?f423","webpack://wonder/webpack/bootstrap","webpack://wonder/webpack/runtime/compat get default export","webpack://wonder/webpack/runtime/define property getters","webpack://wonder/webpack/runtime/hasOwnProperty shorthand","webpack://wonder/webpack/runtime/make namespace object"],"sourcesContent":["module.exports = \"function alertContainer() {\\n\\n if (document.querySelector('.alert-container')) {\\n\\n var container = document.querySelector('.alert-container');\\n\\n }else{\\n\\n var container = document.createElement('div');\\n container.classList.add('alert-container');\\n container.classList.add('p-f');\\n container.classList.add('top');\\n container.classList.add('start');\\n container.classList.add('w-100');\\n container.classList.add('h-100');\\n container.classList.add('no-interaction');\\n container.style.zIndex = \\\"1000\\\";\\n\\n document.body.insertBefore(container, document.body.firstChild);\\n\\n }\\n\\n return container;\\n\\n}\\n\\nfunction alertToast(alert) {\\n\\n var container = alertContainer();\\n\\n if (alert == 801) {\\n\\n container.innerHTML += NO_INTERNET_ALERT;\\n\\n } else {\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/alert.php',\\n data: { \\n post: 'true',\\n frontend: 'true',\\n alert: alert\\n }, \\n success: function (data) {\\n\\n container.innerHTML += data;\\n \\n var url = new URL(window.location.href);\\n url.searchParams.delete('alert');\\n window.history.replaceState(null, null, url);\\n\\n }\\n });\\n\\n }\\n\\n setTimeout(() => {\\n document.querySelectorAll('.wi-alert.wi-show').forEach(element => {\\n element.classList.remove('wi-show');\\n });\\n }, 4000);\\n\\n}\"","module.exports = \"function setAos() {\\n\\n if (isMobile() && (typeof MOBILE_REMOVE_AOS == 'undefined' || MOBILE_REMOVE_AOS == true)) {\\n AOS.init({\\n disable: 'mobile'\\n });\\n } else {\\n AOS.init();\\n }\\n\\n}\"","module.exports = \"function toggleDropdown(container) {\\n\\n if (container.classList.contains('wi-show')) {\\n closeDropdown(container);\\n } else {\\n openDropdown(container);\\n }\\n \\n}\\n\\nfunction openDropdown(container) {\\n\\n container.classList.add('wi-show'); \\n\\n if (container.querySelector('i.bi-chevron-down')) {\\n container.querySelector('i.bi-chevron-down').classList.add('bi-chevron-up');\\n container.querySelector('i.bi-chevron-down').classList.remove('bi-chevron-down');\\n }\\n\\n if (container.querySelector('i.bi-plus')) {\\n container.querySelector('i.bi-plus').classList.add('bi-dash');\\n container.querySelector('i.bi-plus').classList.remove('bi-plus');\\n }\\n\\n if (container.querySelector('i.bi-plus-lg')) {\\n container.querySelector('i.bi-plus-lg').classList.add('bi-dash-lg');\\n container.querySelector('i.bi-plus-lg').classList.remove('bi-plus-lg');\\n }\\n \\n}\\n\\nfunction closeDropdown(container) {\\n\\n container.classList.remove('wi-show'); \\n\\n if (container.querySelector('i.bi-chevron-up')) {\\n container.querySelector('i.bi-chevron-up').classList.add('bi-chevron-down');\\n container.querySelector('i.bi-chevron-up').classList.remove('bi-chevron-up');\\n }\\n\\n if (container.querySelector('i.bi-dash')) {\\n container.querySelector('i.bi-dash').classList.add('bi-plus');\\n container.querySelector('i.bi-dash').classList.remove('bi-dash');\\n }\\n\\n if (container.querySelector('i.bi-dash-lg')) {\\n container.querySelector('i.bi-dash-lg').classList.add('bi-plus-lg');\\n container.querySelector('i.bi-dash-lg').classList.remove('bi-dash-lg');\\n }\\n \\n}\\n\\nfunction setDropdown() {\\n \\n document.querySelectorAll(\\\".wi-dropdown-btn .wi-switcher\\\").forEach(element => {\\n\\n element.onclick = function() { toggleDropdown(element.parentElement); };\\n \\n element.parentElement.onmouseleave = function() { closeDropdown(element.parentElement); };\\n \\n });\\n\\n document.querySelectorAll(\\\".wi-dropdown-box .wi-switcher\\\").forEach(element => {\\n\\n if (element.parentElement.classList.contains('wi-show')) {\\n openDropdown(element.parentElement);\\n }\\n\\n element.onclick = function() { toggleDropdown(element.parentElement); };\\n \\n });\\n\\n}\"","module.exports = \"/**\\n * \\n * GOOGLE MAPS API\\n * \\n */\\n\\nfunction placeNeedCheck(input) {\\n\\n inputError(input, 'Indirizzo non valido, è necessario selezionare un indirizzo dall\\\\'elenco!');\\n\\n}\\n\\nfunction checkInputPlace(input, autocomplete) {\\n \\n var inputContainer = input.parentElement;\\n\\n var country = inputContainer.querySelector('[data-wi-spi=\\\"country\\\"]');\\n var province = inputContainer.querySelector('[data-wi-spi=\\\"province\\\"]');\\n var cap = inputContainer.querySelector('[data-wi-spi=\\\"cap\\\"]');\\n var city = inputContainer.querySelector('[data-wi-spi=\\\"city\\\"]');\\n var street = inputContainer.querySelector('[data-wi-spi=\\\"street\\\"]');\\n var number = inputContainer.querySelector('[data-wi-spi=\\\"number\\\"]');\\n\\n country.value = \\\"\\\";\\n province.value = \\\"\\\";\\n cap.value = \\\"\\\";\\n city.value = \\\"\\\";\\n street.value = \\\"\\\";\\n number.value = \\\"\\\";\\n\\n removeInputError(input);\\n\\n if (autocomplete.getPlace()) {\\n\\n var place = autocomplete.getPlace();\\n\\n if (place.address_components) {\\n\\n for (const component of place.address_components) {\\n \\n const componentType = component.types;\\n\\n if (componentType.includes('street_number')) { number.value = component.long_name; }\\n if (componentType.includes('route')) { street.value = component.short_name; }\\n if (componentType.includes('administrative_area_level_3') || componentType.includes('postal_town')) { city.value = component.short_name; }\\n if (componentType.includes('postal_code') || componentType.includes('postal_code_prefix')) { cap.value = component.short_name; }\\n if (componentType.includes('administrative_area_level_2')) { province.value = component.short_name; }\\n if (componentType.includes('country')) { country.value = component.short_name; }\\n\\n }\\n\\n if (country.value == \\\"\\\" || province.value == \\\"\\\" || cap.value == \\\"\\\" || city.value == \\\"\\\" || street.value == \\\"\\\" || number.value == \\\"\\\") {\\n \\n var error = \\\"Indirizzo non valido\\\";\\n\\n if (country.value == \\\"\\\") {\\n error += \\\", manca il paese\\\";\\n } else if (province.value == \\\"\\\") {\\n error += \\\", manca la provincia\\\";\\n } else if (cap.value == \\\"\\\") {\\n error += \\\", manca il cap\\\";\\n } else if (city.value == \\\"\\\") {\\n error += \\\", manca la città\\\";\\n } else if (street.value == \\\"\\\") {\\n error += \\\", manca la via\\\";\\n } else if (number.value == \\\"\\\") {\\n error += \\\", manca il numero civico\\\";\\n }\\n\\n inputError(input, error);\\n \\n }\\n\\n } else {\\n\\n inputError(input, 'Indirizzo non valido');\\n\\n }\\n\\n } else {\\n\\n inputError(input, 'Indirizzo non valido');\\n\\n }\\n\\n check();\\n\\n}\\n\\nfunction setPlace(input, country = null, province = null, cap = null, city = null, street = null, number = null) {\\n\\n var inputContainer = input.parentElement;\\n\\n var countryInput = inputContainer.querySelector('[data-wi-spi=\\\"country\\\"]');\\n var provinceInput = inputContainer.querySelector('[data-wi-spi=\\\"province\\\"]');\\n var capInput = inputContainer.querySelector('[data-wi-spi=\\\"cap\\\"]');\\n var cityInput = inputContainer.querySelector('[data-wi-spi=\\\"city\\\"]');\\n var streetInput = inputContainer.querySelector('[data-wi-spi=\\\"street\\\"]');\\n var numberInput = inputContainer.querySelector('[data-wi-spi=\\\"number\\\"]');\\n\\n if (country == null) {\\n\\n country = countryInput.value;\\n province = provinceInput.value;\\n cap = capInput.value;\\n city = cityInput.value;\\n street = streetInput.value;\\n number = numberInput.value;\\n\\n } else {\\n\\n countryInput.value = country;\\n provinceInput.value = province;\\n capInput.value = cap;\\n cityInput.value = city;\\n streetInput.value = street;\\n numberInput.value = number;\\n \\n }\\n\\n if (country != \\\"\\\" || province != \\\"\\\" || cap != \\\"\\\" || city != \\\"\\\" || street != \\\"\\\" || number != \\\"\\\") {\\n \\n var address = street+', '+number+', '+city+', '+province+', '+country;\\n input.value = address;\\n\\n checkLabel();\\n check();\\n\\n }\\n\\n}\\n\\nfunction setGoogleMapsPlace() {\\n\\n document.querySelectorAll(\\\"[data-wi-search-place='true']\\\").forEach(input => {\\n\\n input.disabled = false;\\n \\n var options = {};\\n\\n if (input.dataset.wiRestriction != '[]') { \\n\\n var restrictions = JSON.parse(input.dataset.wiRestriction);\\n options.componentRestrictions = restrictions; \\n \\n }\\n\\n options.fields = [ \\\"address_components\\\" ];\\n options.types = [ \\\"address\\\" ];\\n \\n var googlePlace = new google.maps.places.Autocomplete(input, options);\\n\\n input.addEventListener(\\\"change\\\", () => { placeNeedCheck(input); });\\n googlePlace.addListener(\\\"place_changed\\\", () => { checkInputPlace(input, googlePlace); });\\n\\n });\\n\\n}\\n\\nfunction setGoogleMapsApi() {\\n\\n if (document.querySelector(\\\"[data-wi-search-place]\\\")) {\\n\\n var GOOGLE_API_KEY = \\\"AIzaSyAhBslKzmgy6pRrLGyhlN34pN1yQYE1hvI\\\";\\n\\n /**\\n * \\n * Se ci sono degli input Place chiama le API di Google Place\\n * Documentazione: https://developers.google.com/maps/documentation/javascript/place-autocomplete?hl=it\\n * \\n */\\n\\n var script = document.createElement('script');\\n script.type = 'text/javascript';\\n script.async = true;\\n script.src = 'https://maps.googleapis.com/maps/api/js?key='+GOOGLE_API_KEY+'&loading=async&libraries=places&callback=setGoogleMapsPlace'; \\n\\n document.head.appendChild(script);\\n \\n }\\n\\n}\\n\\n/**\\n * \\n * inputCountry() - inputStates()\\n * \\n */\\n\\nfunction setInputCountry() {\\n\\n document.querySelectorAll(\\\"[data-wi-input-country='true']\\\").forEach(element => {\\n element.addEventListener(\\\"change\\\", searchStates);\\n element.addEventListener(\\\"focusout\\\", searchStates);\\n });\\n\\n}\\n\\nfunction setCountryState(input, country, state) {\\n\\n textListValue(input, country);\\n searchStates(input, state);\\n \\n}\\n\\nfunction searchStates(event, stateValue = null) {\\n\\n if (typeof event.target !== \\\"undefined\\\") {\\n var inputCountry = event.target;\\n } else {\\n var inputCountry = event;\\n }\\n \\n var form = inputCountry.form;\\n var inputCountryName = inputCountry.dataset.wiName.replace('-text', '');\\n var inputStateName = inputCountry.dataset.wiInputState;\\n\\n var inputState = form.querySelector('input[data-wi-name=\\\"'+inputStateName+'-text\\\"]');\\n\\n inputState.disabled = true;\\n inputState.value = \\\"\\\";\\n\\n delay(100).then(() => {\\n\\n if (form.querySelector('input[name=\\\"'+inputCountryName+'\\\"]:checked') != null) {\\n\\n var country = form.querySelector('input[name=\\\"'+inputCountryName+'\\\"]:checked').value;\\n \\n if (inputState.dataset.wiListStates != country) {\\n \\n inputState.dataset.wiListStates = country;\\n\\n loadingSpinner();\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/states.php',\\n data: { \\n post: 'true',\\n country: country\\n }, \\n success: function (data) {\\n\\n const response = JSON.parse(data);\\n\\n textListOptions( inputState, response );\\n\\n inputState.disabled = false;\\n\\n if (stateValue != null && stateValue != \\\"\\\") { textListValue(inputState, stateValue); }\\n\\n loadingSpinner();\\n\\n },\\n error: function (XMLHttpRequest) {\\n\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n\\n }\\n });\\n\\n } else {\\n\\n inputState.disabled = false;\\n \\n }\\n\\n }\\n\\n });\\n\\n}\"","module.exports = \"var x, i, j, l, ll, selElmnt, a, b, c;\\n\\n// Look for any elements with the class \\\"custom-select\\\":\\nx = document.querySelectorAll(\\\"[data-wi-select='true']\\\");\\nl = x.length;\\n\\nfor (i = 0; i < l; i++) {\\n\\n selElmnt = x[i].getElementsByTagName(\\\"select\\\")[0];\\n ll = selElmnt.length;\\n\\n // For each element, create a new DIV that will act as the selected item:\\n a = document.createElement(\\\"DIV\\\");\\n a.setAttribute(\\\"class\\\", \\\"select-selected wi-input\\\");\\n a.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML;\\n x[i].appendChild(a);\\n\\n // For each element, create a new DIV that will contain the option list:\\n b = document.createElement(\\\"DIV\\\");\\n b.setAttribute(\\\"class\\\", \\\"select-items wi-input-list no-scrollbar\\\");\\n\\n for (j = 0; j < ll; j++) {\\n\\n // For each option in the original select element, create a new DIV that will act as an option item:\\n c = document.createElement(\\\"DIV\\\");\\n c.id = selElmnt.options[j].value;\\n c.setAttribute(\\\"class\\\", \\\"wi-input-list-value\\\");\\n c.innerHTML = selElmnt.options[j].innerHTML;\\n\\n // Se è impostato un valore di default selezionalo\\n if (selElmnt.value != undefined) { if (c.id == selElmnt.value) { c.classList.add(\\\"same-as-selected\\\"); } }\\n\\n c.addEventListener(\\\"click\\\", function(e) {\\n\\n // When an item is clicked, update the original select box, and the selected item:\\n var y, i, k, s, h, sl, yl;\\n s = this.parentNode.parentNode.getElementsByTagName(\\\"select\\\")[0];\\n sl = s.length;\\n selElmnt.value = this.id;\\n h = this.parentNode.previousSibling;\\n\\n for (i = 0; i < sl; i++) {\\n if (s.options[i].innerHTML == this.innerHTML) {\\n s.selectedIndex = i;\\n h.innerHTML = this.innerHTML;\\n y = this.parentNode.getElementsByClassName(\\\"same-as-selected\\\");\\n yl = y.length;\\n for (k = 0; k < yl; k++) {\\n y[k].classList.remove(\\\"same-as-selected\\\");\\n }\\n this.setAttribute(\\\"class\\\", \\\"wi-input-list-value same-as-selected\\\");\\n break;\\n }\\n }\\n\\n h.click();\\n\\n });\\n\\n // Passa le funzioni onchange dal select alle nuove opzioni\\n c.onclick = selElmnt.onchange;\\n c.mousedown = selElmnt.onchange;\\n\\n b.appendChild(c);\\n\\n }\\n\\n x[i].appendChild(b);\\n\\n a.addEventListener(\\\"click\\\", function(e) {\\n\\n // When the select box is clicked, close any other select boxes, and open/close the current select box\\n e.stopPropagation();\\n closeAllSelect(this);\\n this.classList.toggle(\\\"select-arrow-active\\\");\\n this.parentNode.classList.toggle(\\\"wi-list-active\\\");\\n check();\\n\\n });\\n\\n}\\n\\nfunction closeAllSelect(elmnt) {\\n\\n // A function that will close all select boxes in the document, except the current select box:\\n var x, y, i, xl, yl, arrNo = [];\\n x = document.getElementsByClassName(\\\"select-items\\\");\\n y = document.getElementsByClassName(\\\"select-selected\\\");\\n var container = document.querySelector(\\\".wi-input-container.wi-list-active\\\");\\n xl = x.length;\\n yl = y.length;\\n\\n for (i = 0; i < yl; i++) {\\n if (elmnt == y[i]) {\\n arrNo.push(i)\\n }else{\\n y[i].classList.remove(\\\"select-arrow-active\\\");\\n }\\n }\\n\\n if (container != null) {\\n container.classList.remove(\\\"wi-list-active\\\");\\n }\\n\\n}\\n\\n// If the user clicks anywhere outside the select box, then close all select boxes:\\ndocument.addEventListener(\\\"click\\\", closeAllSelect);\"","module.exports = \"function formToArray(formElements) {\\n\\n const ARRAY = {};\\n\\n for (let i = 0; i < formElements.length; i++) {\\n\\n var add = false;\\n\\n var input = formElements[i];\\n\\n if (input.type == 'checkbox' || input.type == 'radio') {\\n if (input.checked == true) { var add = true; }\\n } else {\\n if (input.value != \\\"\\\") { var add = true;}\\n }\\n\\n if (add) {\\n\\n var inputName = input.name;\\n var inputValue = input.value;\\n\\n if (inputName.includes(\\\"[]\\\")) {\\n\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n\\n if (inputName in ARRAY) {\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n ARRAY[inputName].push(inputValue);\\n } else {\\n inputName = inputName.replace(\\\"[]\\\", \\\"\\\");\\n ARRAY[inputName] = [];\\n ARRAY[inputName].push(inputValue);\\n }\\n \\n } else {\\n\\n if (inputName in ARRAY) {\\n\\n } else {\\n ARRAY[inputName] = inputValue;\\n }\\n\\n }\\n\\n }\\n\\n }\\n\\n return ARRAY;\\n \\n}\\n\\nfunction prettyFormResponse(data) {\\n\\n if (data != '') {\\n \\n console.log('ERRORE FORM: '+data);\\n\\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n container.innerHTML = '<div class=\\\"title-big a-c\\\"><i class=\\\"bi bi-x-circle tx-danger\\\"></i></div><div class=\\\"subtitle mt-8 a-c\\\">C\\\\'è stato un problema con l\\\\'invio della tua richiesta</div><div class=\\\"c-w mt-10\\\"><a onclick=\\\"location.reload();\\\" class=\\\"btn btn-primary c-w\\\">Riprova</a></div>';\\n\\n } else {\\n \\n var container = document.querySelector(\\\"#loading-spinner .center\\\");\\n container.classList.add(\\\"w-80\\\");\\n container.innerHTML = '<div class=\\\"title-big a-c\\\"><i class=\\\"bi bi-check2-circle tx-success\\\"></i></div><div class=\\\"subtitle mt-8 a-c\\\">La tua richiesta è stata inviata con successo!</div><div class=\\\"c-w mt-10\\\"><a onclick=\\\"location.reload(); \\\" class=\\\"btn btn-primary c-w\\\">Torna al sito</a></div>';\\n\\n }\\n \\n}\\n\\nfunction sendForm(button, url, responseFunction = prettyFormResponse) {\\n\\n loadingSpinner();\\n\\n const VALUES = formToArray(button.form.elements);\\n var form = JSON.stringify(VALUES);\\n\\n $.ajax({\\n type: \\\"POST\\\",\\n url: url,\\n data: { \\n post: 'true',\\n form: form\\n }, \\n success: function (data) {\\n\\n if (responseFunction != null) {\\n if (typeof responseFunction === 'function') {\\n responseFunction(data);\\n } else {\\n loadingSpinner();\\n }\\n }\\n\\n },\\n error: function (XMLHttpRequest) {\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n }\\n });\\n\\n}\\n\\nfunction formUpload(form, url, responseFunction = prettyFormResponse) {\\n\\n loadingSpinner();\\n \\n var formData = new FormData(form);\\n formData.append('post', 'true');\\n \\n $.ajax({\\n type: \\\"POST\\\",\\n url: url,\\n data: formData,\\n contentType: false,\\n cache: false,\\n processData:false, \\n success: function (data) {\\n\\n if (responseFunction != null) {\\n if (typeof responseFunction === 'function') {\\n responseFunction(data);\\n } else {\\n loadingSpinner();\\n }\\n }\\n\\n },\\n error: function (XMLHttpRequest) {\\n ajaxRequestError(XMLHttpRequest);\\n loadingSpinner();\\n }\\n });\\n\\n}\"","module.exports = \"function menuMobile(hamburger = \\\"#hamburger\\\", navMobile = \\\"#nav-mobile\\\") { \\n \\n if (hamburger != null) { document.querySelector(hamburger).classList.toggle(\\\"click\\\"); }\\n if (navMobile != null) { document.querySelector(navMobile).classList.toggle(\\\"show\\\"); }\\n\\n if (document.querySelector(hamburger).classList.contains(\\\"click\\\")) {\\n disableScroll();\\n } else {\\n enableScroll();\\n }\\n\\n}\"","module.exports = \"function modal(selector) {\\n\\n setUpModal(selector);\\n\\n var modal = document.querySelector(selector);\\n\\n modal.classList.toggle('wi-show');\\n modal.classList.toggle('no-interaction');\\n\\n if (modal.classList.contains('wi-show')) {\\n disableScroll();\\n } else {\\n enableScroll();\\n }\\n\\n}\\n\\nfunction setUpModal(selector) {\\n \\n document.querySelectorAll(selector + ' .wi-close-modal').forEach(element => {\\n if (element.onclick == null) {\\n element.onclick = function() { modal(selector) };\\n }\\n });\\n\\n}\"","module.exports = \"function setUpPage() {\\n \\n $.ajax({\\n type: \\\"POST\\\",\\n url: pathApp+'/api/alert.php',\\n data: { \\n post: 'true',\\n frontend: 'true',\\n alert: 801\\n }, \\n success: function (data) {\\n NO_INTERNET_ALERT = data;\\n }\\n });\\n\\n var PAGE_URL = new URL(window.location.href);\\n\\n if (PAGE_URL.searchParams.get('scroll')) {\\n \\n var idScroll = PAGE_URL.searchParams.get('scroll');\\n scrolla('#'+idScroll);\\n\\n }\\n\\n // L'alert non viene passato solo tramite GET ma anche tramite variabile php\\n // if (PAGE_URL.searchParams.get('alert')) {\\n // var alertCode = PAGE_URL.searchParams.get('alert'); alertToast(alertCode);\\n // }\\n\\n setAos();\\n setInput();\\n setDropdown();\\n setVideoJS();\\n \\n window.dispatchEvent(new Event('loaded'));\\n \\n};\"","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nmodule.exports = function(src) {\n\tfunction log(error) {\n\t\t(typeof console !== \"undefined\")\n\t\t&& (console.error || console.log)(\"[Script Loader]\", error);\n\t}\n\n\t// Check for IE =< 8\n\tfunction isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}\n\n\ttry {\n\t\tif (typeof execScript !== \"undefined\" && isIE()) {\n\t\t\texecScript(src);\n\t\t} else if (typeof eval !== \"undefined\") {\n\t\t\teval.call(null, src);\n\t\t} else {\n\t\t\tlog(\"EvalError: No eval function available\");\n\t\t}\n\t} catch (error) {\n\t\tlog(error);\n\t}\n}\n","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/alert.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/aos.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/dropdown.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/form/place.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/form/select.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/form/send.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/header.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/modal.js\"))","require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/script-loader/addScript.js\")(require(\"!!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/node_modules/raw-loader/index.js!/Users/andreamarinoni/Desktop/PROGETTI/template/lib/src/build/frontend/js/pageSetUp.js\"))","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["module","exports","src","log","error","console","execScript","attachEvent","addEventListener","eval","call","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","value"],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see head.js.LICENSE.txt */
2
- (()=>{var e={1192:e=>{e.exports='function check() {\n \n document.querySelectorAll("form .wi-submit").forEach(button => {\n \n button.removeAttribute("disabled");\n \n var inputList = button.form.elements;\n\n for (let i = 0; i < inputList.length; i++) {\n\n var input = inputList[i];\n\n if (input.required) {\n if (input.type == \'checkbox\' || input.type == \'radio\') {\n if (input.checked == false) { button.setAttribute("disabled", null); }\n } else {\n if (input.value == "") { button.setAttribute("disabled", null); }\n }\n }\n\n if (!input.validity.valid) {\n button.setAttribute("disabled", null);\n }\n\n }\n\n })\n\n}\n\nfunction togglePassword(el, id) {\n\n var input = document.getElementById(id);\n\n if (input.type == \'password\') {\n input.type = \'text\'\n el.classList.remove(\'bi-eye\');\n el.classList.add(\'bi-eye-slash\');\n }else{\n input.type = \'password\'\n el.classList.remove(\'bi-eye-slash\');\n el.classList.add(\'bi-eye\');\n }\n\n}\n\nfunction checkNumber(event) {\n\n event.target.value = event.target.value.replace(/[^0-9.]/g, \'\').replace(/(\\..*?)\\..*/g, \'$1\');\n \n}\n\nfunction labelPositionTop(event) {\n\n event.target.parentElement.classList.add(\'compiled\');\n\n}\n\nfunction labelPosition(event) {\n\n var container = event.target.parentElement;\n\n if (event.target.value == \'\' && event.target !== document.activeElement) {\n container.classList.remove(\'compiled\');\n } else {\n container.classList.add(\'compiled\');\n }\n\n}\n\nfunction customDateRange(element) {\n\n var inputFrom = element.querySelector(\'input.wi-daterange-from\');\n var inputTo = element.querySelector(\'input.wi-daterange-to\');\n\n if (inputFrom.value != \'\') {\n $(\'#\'+inputTo.id).datepicker(\'option\', \'minDate\', inputFrom.value);\n }\n\n}\n\nfunction customDateTimeRange(element) {\n\n var inputFrom = element.querySelector(\'input.wi-datetimerange-from\');\n var inputTo = element.querySelector(\'input.wi-datetimerange-to\');\n\n if (inputFrom.value != \'\') {\n $(\'#\'+inputTo.id).datetimepicker(\'option\', \'minDate\', inputFrom.value);\n }\n\n}\n\nfunction checkLabel() {\n\n document.querySelectorAll("[data-wi-label=\'true\']").forEach(element => {\n \n var container = element.parentElement;\n\n if (element.value == \'\') {\n container.classList.remove(\'compiled\');\n } else {\n container.classList.add(\'compiled\');\n }\n \n });\n\n}\n\nfunction checkInputFile(event) {\n\n var input = event.target;\n\n var inputContainer = input.parentElement;\n var errorContainer = inputContainer.querySelector(\'.alert-error\');\n\n var maxFile = input.dataset.wiMaxFile;\n var maxSize = input.dataset.wiMaxSize;\n var prettyMaxSize = ((maxSize/1024)/1024).toFixed(2); // MB\n\n var prettyErrorFile = "<i class=\'bi bi-exclamation-triangle\'></i> Hai caricato troppi file! Puoi caricare massimo "+maxFile+" file";\n var prettyErrorSize = "<i class=\'bi bi-exclamation-triangle\'></i> Hai caricato file troppo grandi! Le dimensioni massime sono di "+prettyMaxSize+"Mb";\n\n var files = input.files;\n\n inputContainer.classList.remove(\'input-error\');\n errorContainer.innerHTML = \'\';\n\n for (var x in files) {\n\n if(files[x].size > maxSize){\n\n inputContainer.classList.add(\'input-error\');\n errorContainer.innerHTML = prettyErrorSize;\n input.value = "";\n break;\n\n }\n\n }\n\n if (files.length > maxFile) {\n\n inputContainer.classList.add(\'input-error\');\n errorContainer.innerHTML = prettyErrorFile;\n input.value = "";\n\n }\n \n}\n\nfunction inputError(input, error, errorIcon = "<i class=\'bi bi-exclamation-triangle\'></i>") {\n\n var inputContainer = input.parentElement;\n var errorContainer = inputContainer.querySelector(\'.alert-error\');\n\n inputContainer.classList.add(\'input-error\');\n errorContainer.innerHTML = errorIcon+\' \'+error;\n input.setCustomValidity(error);\n\n}\n\nfunction removeInputError(input) {\n\n var inputContainer = input.parentElement;\n var errorContainer = inputContainer.querySelector(\'.alert-error\');\n \n inputContainer.classList.remove(\'input-error\');\n errorContainer.innerHTML = "";\n input.setCustomValidity("");\n\n}\n\nfunction setInput() {\n\n document.querySelectorAll("[data-wi-max-file]").forEach(element => {\n element.addEventListener("change", checkInputFile);\n });\n\n document.querySelectorAll("[data-wi-max-size]").forEach(element => {\n element.addEventListener("change", checkInputFile);\n });\n \n document.querySelectorAll("[data-wi-label=\'true\']").forEach(element => {\n element.addEventListener("input", labelPosition);\n element.addEventListener("change", labelPosition);\n element.addEventListener("focusin", labelPositionTop);\n element.addEventListener("focusout", labelPosition);\n });\n\n document.querySelectorAll("[data-wi-check=\'true\']").forEach(element => {\n element.addEventListener("keyup", check);\n element.addEventListener("change", check);\n element.addEventListener("focusin", check);\n element.addEventListener("focusout", check);\n });\n\n document.querySelectorAll("[data-wi-list-input=\'true\']").forEach(element => {\n element.addEventListener("keyup", searchInput);\n element.addEventListener("focusin", searchInput);\n element.addEventListener("focusin", (event) => { delay(100).then(() => { showList(event) }) });\n element.addEventListener("keyup", showList);\n element.addEventListener("focusout", hideList);\n element.addEventListener("change", controlList);\n element.addEventListener("focusout", controlList);\n });\n\n document.querySelectorAll("[data-wi-search-input=\'true\']").forEach(element => {\n element.addEventListener("keyup", showList);\n element.addEventListener("keyup", searchResults);\n element.addEventListener("change", controlList);\n element.addEventListener("focusout", hideList);\n });\n\n document.querySelectorAll("[data-wi-search-text=\'true\']").forEach(element => {\n element.addEventListener("keyup", showList);\n element.addEventListener("keyup", searchText);\n element.addEventListener("focusout", hideList);\n });\n\n document.querySelectorAll("[data-wi-search-radio=\'true\']").forEach(element => {\n element.addEventListener("keyup", showList);\n element.addEventListener("keyup", searchRadio);\n element.addEventListener("focusout", hideList);\n });\n\n document.querySelectorAll("[data-wi-list-value=\'true\']").forEach(element => {\n element.addEventListener("click", checkInput);\n element.addEventListener("mousedown", checkInput);\n });\n\n document.querySelectorAll("[data-wi-phone=\'true\']").forEach(element => {\n checkPhone(element);\n });\n\n check();\n setAutonumeric();\n setGoogleMapsApi();\n setInputCountry();\n\n}'},2578:e=>{e.exports="function searchInput(event) {\n \n var inputId = event.target.id;\n var inputValue = event.target.value.toLowerCase();\n \n document.querySelectorAll('#list_'+inputId+' input').forEach(x => {\n \n var keyword = x.dataset.wiKeyword.toLowerCase();\n\n if (keyword.includes(inputValue)) {\n x.parentElement.style.display = 'block';\n } else {\n x.parentElement.style.display = 'none';\n }\n \n });\n \n}\n\n// const event_CheckInput = new Event(\"wi-check-input\");\n\nfunction checkInput(event) {\n \n var container = event.target;\n\n if (container.localName == 'div') {\n var checkbox = container.querySelector('input');\n } else {\n var checkbox = container;\n }\n\n var inputId = checkbox.dataset.wiInput;\n\n checkbox.checked = true;\n\n var input = document.querySelector('#'+inputId);\n input.value = checkbox.dataset.wiName;\n // input.dispatchEvent(event_CheckInput);\n\n check();\n\n}\n\nfunction controlList(event) {\n\n var element = event.target;\n var container = event.target.parentElement;\n \n var l = element.dataset.wiListArray.split('|');\n var v = element.value.toLowerCase();\n\n if (v != '') {\n if (l.includes(v)) {\n\n removeInputError(element);\n\n container.querySelectorAll('input[type=radio]').forEach(e => {\n\n var name = e.dataset.wiName;\n\n if (name.toLowerCase() == v) {\n e.checked = true;\n } else {\n e.checked = false;\n }\n\n });\n \n } else {\n \n inputError(element, 'Campo non corretto')\n container.querySelectorAll('input[type=radio]:checked').forEach(e => { e.checked = false; });\n \n }\n }\n\n check();\n\n}\n\n\nfunction showList(event) { event.target.parentElement.classList.add('wi-list-active'); }\n\nfunction hideList(event) { event.target.parentElement.classList.remove('wi-list-active'); }\n\nfunction searchText(event) { searchResults(event, \"text\"); }\n\nfunction searchRadio(event) { searchResults(event, \"radio\"); }\n\nfunction searchResults(event, result) {\n\n var input = event.target;\n\n var container = input.parentElement;\n\n var list = container.querySelector('.wi-input-list');\n var listValue = list.querySelector('.wi-input-list-body');\n var listFooter = list.querySelector('.wi-input-list-footer');\n\n var inputId = input.id;\n var inputName = input.dataset.wiName;\n var inputValue = input.value.toLowerCase();\n\n var inputUrl = input.dataset.wiSearchUrl;\n\n if (result == 'radio') {\n var radioName = \"name='\"+inputName+\"'\";\n } else {\n var radioName = \"\";\n }\n\n $.ajax({\n type: \"POST\",\n url: inputUrl,\n data: { \n post: 'true',\n search: inputValue\n }, \n success: function (data) {\n\n const response = JSON.parse(data);\n const nResponse = response.length;\n \n var listHTML = \"\";\n\n for (let index = 0; index < nResponse; index++) {\n\n const value = response[index]['value'];\n const label = response[index]['label'];\n const inputValue = response[index]['input-value'];\n\n listHTML += \"<div class='wi-input-list-value' data-wi-list-value='true'><input data-wi-input='\"+inputId+\"' type='radio' \"+radioName+\" data-wi-name='\"+inputValue+\"' value='\"+value+\"'>\"+label+\"</div>\";\n\n }\n\n if (inputValue == '') {\n listFooter.innerHTML = \"Cosa stai cercando?\";\n } else if (nResponse == 1) {\n listFooter.innerHTML = nResponse+\" risultato\";\n } else if (nResponse != 1) {\n listFooter.innerHTML = nResponse+\" risultati\";\n }\n\n listValue.innerHTML = listHTML;\n\n document.querySelectorAll(\"[data-wi-list-value='true']\").forEach(element => {\n element.addEventListener(\"click\", checkInput);\n element.addEventListener(\"mousedown\", checkInput);\n });\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}\n\nfunction textListValue (input, value) {\n\n var form = input.form;\n var inputName = input.dataset.wiName.replace('-text', '');\n\n if (form.querySelector('input[name=\"'+inputName+'\"][value=\"'+value+'\"]')) {\n form.querySelector('input[name=\"'+inputName+'\"][value=\"'+value+'\"]').click();\n checkLabel(); \n }\n \n}\n\nfunction textListOptions(input, options) {\n \n var listHTML = \"\";\n var listArray = [];\n\n var form = input.form;\n var inputId = input.id;\n var inputAttribute = input.dataset.wiInputAttribute;\n var inputLabel = input.labels[0];\n var inputName = input.dataset.wiName.replace('-text', '');;\n\n var listContainer = form.querySelector('#list_'+inputId);\n\n input.dataset.wiListArray = \"\";\n listContainer.innerHTML = \"\";\n\n for (var optionValue in options) {\n\n var optionId = \"value_\"+code();\n var optionLabel = options[optionValue];\n\n listArray.push(optionLabel);\n \n listHTML += \"<div class='wi-input-list-value' data-wi-list-value='true'><input id='\"+optionId+\"' data-wi-keyword='\"+optionValue+\" \"+optionLabel+\"' data-wi-input='\"+inputId+\"' data-wi-name='\"+optionLabel+\"' type='radio' name='\"+inputName+\"' value='\"+optionValue+\"'>\"+optionLabel+\"</div>\";\n\n }\n\n if (listHTML == \"\") {\n\n input.required = false;\n input.disabled = true;\n inputLabel.innerHTML = inputLabel.innerHTML.replace('*', '');\n\n } else {\n\n if (inputAttribute.indexOf('required') != '-1') { \n\n input.required = true;\n\n if (inputLabel.innerHTML.indexOf('*') == '-1') { \n inputLabel.innerHTML = inputLabel.innerHTML+'*' \n }\n\n }\n\n input.dataset.wiListArray = listArray.join('|').toLowerCase();\n listContainer.innerHTML = listHTML;\n\n }\n\n listContainer.querySelectorAll(\"[data-wi-list-value='true']\").forEach(element => {\n element.addEventListener(\"click\", checkInput);\n element.addEventListener(\"mousedown\", checkInput);\n });\n\n checkLabel();\n\n}"},7060:e=>{e.exports="function scrolla(selector){\n \n if (document.querySelector(selector)) {\n\n var element = document.querySelector(selector);\n\n var headerHeight = '80';\n\n if (document.querySelector('header')) {\n headerHeight = document.querySelector('header').offsetHeight;\n }\n\n element.style.scrollMargin = headerHeight+'px';\n element.scrollIntoView({ behavior: 'smooth' });\n\n } else {\n\n console.error(\"Selettore ( \"+selector+\" ) non valido\");\n\n }\n\n}\n\nvar keys = {37: 1, 38: 1, 39: 1, 40: 1};\n\nfunction preventDefault(e) {\n e.preventDefault();\n}\n\nfunction preventDefaultForScrollKeys(e) {\n if (keys[e.keyCode]) {\n preventDefault(e);\n return false;\n }\n}\n\n// modern Chrome requires { passive: false } when adding event\nvar supportsPassive = false;\ntry {\n window.addEventListener(\"test\", null, Object.defineProperty({}, 'passive', {\n get: function () { supportsPassive = true; } \n}));\n} catch(e) {}\n\nvar wheelOpt = supportsPassive ? { passive: false } : false;\nvar wheelEvent = 'onwheel' in document.createElement('div') ? 'wheel' : 'mousewheel';\n\n// call this to Disable\nfunction disableAllScroll() {\n window.addEventListener('DOMMouseScroll', preventDefault, false); // older FF\n window.addEventListener(wheelEvent, preventDefault, wheelOpt); // modern desktop\n window.addEventListener('touchmove', preventDefault, wheelOpt); // mobile\n window.addEventListener('keydown', preventDefaultForScrollKeys, false);\n}\n\n// call this to Enable\nfunction enableAllScroll() {\n window.removeEventListener('DOMMouseScroll', preventDefault, false);\n window.removeEventListener(wheelEvent, preventDefault, wheelOpt); \n window.removeEventListener('touchmove', preventDefault, wheelOpt);\n window.removeEventListener('keydown', preventDefaultForScrollKeys, false);\n}\n\nfunction disableScroll() {\n document.querySelector('body').classList.add('block-scroll');\n}\n\nfunction enableScroll() {\n document.querySelector('body').classList.remove('block-scroll');\n}"},373:e=>{e.exports="function loadingSpinner() {\n\n var spinner = document.getElementById('loading-spinner');\n\n if (spinner.classList.contains('d-none')) {\n\n spinner.classList.remove('d-none');\n spinner.classList.remove('no-interaction');\n\n disableScroll();\n \n } else {\n\n spinner.classList.add('d-none');\n spinner.classList.add('no-interaction');\n \n enableScroll();\n\n }\n \n}"},8882:e=>{e.exports='function canvasFullPage(elementId, draw = false) {\n\n var element = document.createElement("CANVAS");\n element.id = elementId;\n element.style.position = "fixed";\n element.style.top = 0;\n element.style.left = 0;\n element.style.zIndex = 999999;\n element.style.background = \'#ffffff\';\n element.style.touchAction = \'none\';\n element.style.msTouchAction = \'none\';\n\n fullPage(element);\n\n window.addEventListener(\'resize\', () => { fullPage(element) });\n\n if (draw) { canvasDraw(element); }\n\n}\n\nfunction canvasReset(element) {\n \n var ctx = element.getContext("2d");\n ctx.clearRect(0, 0, element.width, element.height);\n ctx.restore();\n\n}\n\nfunction canvasDraw(element) {\n\n var ctx = element.getContext("2d");\n \n let offset = position(element);\n let painting = false;\n\n function drawStart() {\n offset = position(element);\n painting = true;\n draw(e);\n }\n\n function drawEnd() {\n painting = false;\n ctx.beginPath();\n }\n\n function draw(e) {\n\n if (!painting) return;\n ctx.lineWidth = 1;\n ctx.lineCap = "round";\n ctx.strokeStyle = "black";\n\n if (e.type == \'touchmove\'){\n var x = e.touches[0].clientX;\n var y = e.touches[0].clientY;\n } else if (e.type == \'mousemove\'){\n var x = e.clientX;\n var y = e.clientY;\n }\n\n var offsetX = offset.left;\n var offsetY = offset.top;\n\n var x = x - offsetX;\n var y = y - offsetY;\n\n ctx.lineTo(x, y);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(x, y);\n\n }\n\n element.addEventListener("mousedown", drawStart);\n element.addEventListener("touchstart", drawStart);\n element.addEventListener("mouseup", drawEnd);\n element.addEventListener("touchend", drawEnd);\n element.addEventListener("mousemove", draw);\n element.addEventListener("touchmove", draw);\n\n}'},6944:e=>{e.exports='function fetchResponse(response) {\n \n if (response.ok) {\n\n return response.json();\n\n } else {\n\n alertToast(802);\n console.error("Impossibile connettersi o trovare il file!");\n return false;\n\n }\n\n}\n\nfunction fetchValue(value) {\n \n if (value == false) {\n \n return false;\n \n } else {\n\n if (value.status == 200) {\n return value;\n } else if (value.status == 401) {\n alertToast(911);\n return false;\n } else if (value.status == undefined) {\n alertToast(803);\n return false;\n } else {\n alertToast(value.status);\n return false;\n }\n\n }\n\n}\n\nfunction fetchError(error) {\n \n alertToast(802);\n console.error("Il file non risponde in JSON!");\n\n}\n'},8197:e=>{e.exports="var AUTONUMERIC_NUMBER = {\n caretPositionOnFocus: 'end',\n decimalPlacesShownOnFocus: 2,\n digitGroupSeparator: '',\n decimalCharacter: '.',\n onInvalidPaste: 'truncate',\n currencySymbolPlacement: 's',\n outputFormat: 'number',\n unformatOnSubmit: true,\n modifyValueOnWheel: false\n};\n\nvar AUTONUMERIC_PRICE = {\n caretPositionOnFocus: 'end',\n decimalPlacesShownOnFocus: 2,\n digitGroupSeparator: '',\n decimalCharacter: '.',\n onInvalidPaste: 'truncate',\n currencySymbol: '€',\n currencySymbolPlacement: 's',\n outputFormat: 'number',\n unformatOnSubmit: true,\n modifyValueOnWheel: false\n};\n\nvar AUTONUMERIC_PERCENTIGE = {\n caretPositionOnFocus: 'end',\n decimalPlacesShownOnFocus: 2,\n digitGroupSeparator: '',\n decimalCharacter: '.',\n onInvalidPaste: 'truncate',\n currencySymbol: '%',\n currencySymbolPlacement: 's',\n outputFormat: 'number',\n unformatOnSubmit: true,\n modifyValueOnWheel: false\n};\n\nfunction customAutonumeric(element, autonumeric) {\n\n var option = {};\n\n if (autonumeric.caretPositionOnFocus != undefined) { \n option.caretPositionOnFocus = autonumeric.caretPositionOnFocus; \n }\n\n if (element.dataset.wiNumberDecimal != undefined) { \n option.decimalPlacesShownOnFocus = element.dataset.wiNumberDecimal;\n option.decimalPlaces = element.dataset.wiNumberDecimal;\n } else {\n if (autonumeric.decimalPlacesShownOnFocus != undefined) {\n option.decimalPlacesShownOnFocus = autonumeric.decimalPlacesShownOnFocus;\n }\n }\n\n if (element.dataset.wiNumberDecimalSeparator != undefined) { \n option.decimalCharacter = element.dataset.wiNumberDecimalSeparator;\n } else {\n if (autonumeric.decimalCharacter != undefined) {\n option.decimalCharacter = autonumeric.decimalCharacter;\n }\n }\n\n if (element.dataset.wiNumberGroupSeparator != undefined) { \n option.digitGroupSeparator = element.dataset.wiNumberGroupSeparator;\n } else {\n if (autonumeric.digitGroupSeparator != undefined) {\n option.digitGroupSeparator = autonumeric.digitGroupSeparator;\n }\n }\n\n if (autonumeric.onInvalidPaste != undefined) { \n option.onInvalidPaste = autonumeric.onInvalidPaste; \n }\n\n if (element.dataset.wiNumberSymbol != undefined) { \n option.currencySymbol = element.dataset.wiNumberSymbol;\n } else {\n if (autonumeric.currencySymbol != undefined) {\n option.currencySymbol = autonumeric.currencySymbol;\n }\n }\n\n if (element.dataset.wiNumberSymbolPlacement != undefined) { \n option.currencySymbolPlacement = element.dataset.wiNumberSymbolPlacement;\n } else {\n if (autonumeric.currencySymbolPlacement != undefined) {\n option.currencySymbolPlacement = autonumeric.currencySymbolPlacement;\n }\n }\n\n if (autonumeric.outputFormat != undefined) { \n option.outputFormat = autonumeric.outputFormat; \n }\n\n if (autonumeric.unformatOnSubmit != undefined) { \n option.unformatOnSubmit = autonumeric.unformatOnSubmit; \n }\n\n if (autonumeric.modifyValueOnWheel != undefined) { \n option.modifyValueOnWheel = autonumeric.modifyValueOnWheel; \n }\n\n return option;\n \n}\n\nfunction setAutonumeric() {\n \n document.querySelectorAll(\"[data-wi-number='true']\").forEach(element => {\n \n var el = AutoNumeric.getAutoNumericElement(element);\n \n if (el === null) {\n\n new AutoNumeric(element, customAutonumeric(element, AUTONUMERIC_NUMBER)); \n \n }\n\n });\n\n document.querySelectorAll(\"[data-wi-price='true']\").forEach(element => {\n \n var el = AutoNumeric.getAutoNumericElement(element);\n if (el === null) { new AutoNumeric(element, customAutonumeric(element, AUTONUMERIC_PRICE)); }\n\n });\n \n document.querySelectorAll(\"[data-wi-percentige='true']\").forEach(element => {\n \n var el = AutoNumeric.getAutoNumericElement(element);\n if (el === null) { new AutoNumeric(element, customAutonumeric(element, AUTONUMERIC_PERCENTIGE)); }\n\n });\n\n}"},3883:e=>{e.exports='function checkPhone(element) {\n \n var phones = [\n { "mask": "### ### ####"}\n ];\n\n new Inputmask({ \n mask: phones, \n greedy: false, \n placeholder: \'\', \n definitions: { \n \'#\': { \n validator: "[0-9]", \n cardinality: 1\n }\n } \n }).mask(element);\n\n}'},8636:e=>{e.exports="function position(element, showItem = false) {\n\n var rect = element.getBoundingClientRect();\n\n if (showItem) {\n\n var width = rect.right - rect.left;\n var height = rect.bottom - rect.top;\n\n var element = document.createElement(\"DIV\");\n element.style.position = \"fixed\";\n element.style.top = rect.top+'px';\n element.style.left = rect.left+'px';\n element.style.width = width+'px';\n element.style.height = height+'px';\n element.style.zIndex = 999999;\n element.style.background = 'rgba(255, 0, 0, .2)';\n document.body.appendChild(element);\n\n }\n\n return rect;\n\n}\n\nfunction fullPage(element) {\n element.width = window.innerWidth;\n element.height = window.innerHeight;\n}\n\nfunction copyText(text, icon = null) {\n\n if (icon != null) {\n document.querySelectorAll('.bi-clipboard-check').forEach(element => {\n element.classList.remove('bi-clipboard-check')\n element.classList.add('bi-clipboard');\n });\n }\n\n navigator.clipboard.writeText(text).then(() => {\n if (icon != null) {\n icon.classList.remove('bi-clipboard');\n icon.classList.add('bi-clipboard-check');\n }\n },() => {\n if (icon != null) {\n icon.classList.remove('bi-clipboard');\n icon.classList.add('bi-clipboard-x');\n }\n });\n\n}\n\nfunction ajaxRequestError(request) {\n \n if (request.readyState == 4) {\n alertToast(802);\n } else if (request.readyState == 0) {\n alertToast(801);\n } else {\n alertToast(800);\n }\n\n}\n\nfunction code(codeLength = 10) {\n\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n var charactersLength = characters.length;\n\n for ( var i = 0; i < codeLength; i++ ) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n\n return result;\n\n}\n\nfunction isMobile() {\n\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n return true;\n } else {\n return false;\n }\n \n}\n\nfunction delay(time) {\n\n return new Promise(resolve => setTimeout(resolve, time));\n\n}"},5827:e=>{e.exports='function setVideoJS() {\n\n document.querySelectorAll(".video-js").forEach(element => {\n videojs(element);\n });\n\n}'},4642:e=>{e.exports=function(e){function n(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):n("EvalError: No eval function available")}catch(e){n(e)}}},7077:(e,n,t)=>{t(4642)(t(1192))},9213:(e,n,t)=>{t(4642)(t(2578))},8393:(e,n,t)=>{t(4642)(t(7060))},3038:(e,n,t)=>{t(4642)(t(373))},9111:(e,n,t)=>{t(4642)(t(8882))},2347:(e,n,t)=>{t(4642)(t(6944))},8004:(e,n,t)=>{t(4642)(t(8197))},3286:(e,n,t)=>{t(4642)(t(3883))},9899:(e,n,t)=>{t(4642)(t(8636))},2492:(e,n,t)=>{t(4642)(t(5827))}},n={};function t(r){var i=n[r];if(void 0!==i)return i.exports;var a=n[r]={exports:{}};return e[r](a,a.exports,t),a.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";t.r(r);t(8004),t(3286),t(2347),t(9899),t(9111),t(2492),t(3038),t(8393),t(9213),t(7077)})(),window.wonder=r})();
2
+ (()=>{var e={1192:e=>{e.exports='function check() {\n \n document.querySelectorAll("form .wi-submit").forEach(button => {\n \n button.removeAttribute("disabled");\n \n var inputList = button.form.elements;\n\n for (let i = 0; i < inputList.length; i++) {\n\n var input = inputList[i];\n\n if (input.required) {\n if (input.type == \'checkbox\' || input.type == \'radio\') {\n if (input.checked == false) { button.setAttribute("disabled", null); }\n } else {\n if (input.value == "") { button.setAttribute("disabled", null); }\n }\n }\n\n if (!input.validity.valid) {\n button.setAttribute("disabled", null);\n }\n\n }\n\n })\n\n}\n\nfunction togglePassword(el, id) {\n\n var input = document.getElementById(id);\n\n if (input.type == \'password\') {\n input.type = \'text\'\n el.classList.remove(\'bi-eye\');\n el.classList.add(\'bi-eye-slash\');\n }else{\n input.type = \'password\'\n el.classList.remove(\'bi-eye-slash\');\n el.classList.add(\'bi-eye\');\n }\n\n}\n\nfunction checkNumber(event) {\n\n event.target.value = event.target.value.replace(/[^0-9.]/g, \'\').replace(/(\\..*?)\\..*/g, \'$1\');\n \n}\n\nfunction labelPositionTop(event) {\n\n event.target.parentElement.classList.add(\'compiled\');\n\n}\n\nfunction labelPosition(event) {\n\n var container = event.target.parentElement;\n\n if (event.target.value == \'\' && event.target !== document.activeElement) {\n container.classList.remove(\'compiled\');\n } else {\n container.classList.add(\'compiled\');\n }\n\n}\n\nfunction customDateRange(element) {\n\n var inputFrom = element.querySelector(\'input.wi-daterange-from\');\n var inputTo = element.querySelector(\'input.wi-daterange-to\');\n\n if (inputFrom.value != \'\') {\n $(\'#\'+inputTo.id).datepicker(\'option\', \'minDate\', inputFrom.value);\n }\n\n}\n\nfunction customDateTimeRange(element) {\n\n var inputFrom = element.querySelector(\'input.wi-datetimerange-from\');\n var inputTo = element.querySelector(\'input.wi-datetimerange-to\');\n\n if (inputFrom.value != \'\') {\n $(\'#\'+inputTo.id).datetimepicker(\'option\', \'minDate\', inputFrom.value);\n }\n\n}\n\nfunction checkLabel() {\n\n document.querySelectorAll("[data-wi-label=\'true\']").forEach(element => {\n \n var container = element.parentElement;\n\n if (element.value == \'\') {\n container.classList.remove(\'compiled\');\n } else {\n container.classList.add(\'compiled\');\n }\n \n });\n\n}\n\nfunction checkInputFile(event) {\n\n var input = event.target;\n\n var inputContainer = input.parentElement;\n var errorContainer = inputContainer.querySelector(\'.alert-error\');\n\n var maxFile = input.dataset.wiMaxFile;\n var maxSize = input.dataset.wiMaxSize;\n var prettyMaxSize = ((maxSize/1024)/1024).toFixed(2); // MB\n\n var prettyErrorFile = "<i class=\'bi bi-exclamation-triangle\'></i> Hai caricato troppi file! Puoi caricare massimo "+maxFile+" file";\n var prettyErrorSize = "<i class=\'bi bi-exclamation-triangle\'></i> Hai caricato file troppo grandi! Le dimensioni massime sono di "+prettyMaxSize+"Mb";\n\n var files = input.files;\n\n inputContainer.classList.remove(\'input-error\');\n errorContainer.innerHTML = \'\';\n\n for (var x in files) {\n\n if(files[x].size > maxSize){\n\n inputContainer.classList.add(\'input-error\');\n errorContainer.innerHTML = prettyErrorSize;\n input.value = "";\n break;\n\n }\n\n }\n\n if (files.length > maxFile) {\n\n inputContainer.classList.add(\'input-error\');\n errorContainer.innerHTML = prettyErrorFile;\n input.value = "";\n\n }\n \n}\n\nfunction inputError(input, error, errorIcon = "<i class=\'bi bi-exclamation-triangle\'></i>") {\n\n var inputContainer = input.parentElement;\n var errorContainer = inputContainer.querySelector(\'.alert-error\');\n\n inputContainer.classList.add(\'input-error\');\n errorContainer.innerHTML = errorIcon+\' \'+error;\n input.setCustomValidity(error);\n\n}\n\nfunction removeInputError(input) {\n\n var inputContainer = input.parentElement;\n var errorContainer = inputContainer.querySelector(\'.alert-error\');\n \n inputContainer.classList.remove(\'input-error\');\n errorContainer.innerHTML = "";\n input.setCustomValidity("");\n\n}\n\nfunction setInput() {\n\n document.querySelectorAll("[data-wi-max-file]").forEach(element => {\n element.addEventListener("change", checkInputFile);\n });\n\n document.querySelectorAll("[data-wi-max-size]").forEach(element => {\n element.addEventListener("change", checkInputFile);\n });\n \n document.querySelectorAll("[data-wi-label=\'true\']").forEach(element => {\n element.addEventListener("input", labelPosition);\n element.addEventListener("change", labelPosition);\n element.addEventListener("focusin", labelPositionTop);\n element.addEventListener("focusout", labelPosition);\n });\n\n document.querySelectorAll("[data-wi-check=\'true\']").forEach(element => {\n element.addEventListener("keyup", check);\n element.addEventListener("change", check);\n element.addEventListener("focusin", check);\n element.addEventListener("focusout", check);\n });\n\n document.querySelectorAll("[data-wi-list-input=\'true\']").forEach(element => {\n element.addEventListener("keyup", searchInput);\n element.addEventListener("focusin", searchInput);\n element.addEventListener("focusin", (event) => { delay(300).then(() => { showList(event) }) });\n element.addEventListener("keyup", showList);\n element.addEventListener("focusout", hideList);\n element.addEventListener("change", controlList);\n element.addEventListener("focusout", controlList);\n });\n\n document.querySelectorAll("[data-wi-search-input=\'true\']").forEach(element => {\n element.addEventListener("keyup", showList);\n element.addEventListener("keyup", searchResults);\n element.addEventListener("change", controlList);\n element.addEventListener("focusout", hideList);\n });\n\n document.querySelectorAll("[data-wi-search-text=\'true\']").forEach(element => {\n element.addEventListener("keyup", showList);\n element.addEventListener("keyup", searchText);\n element.addEventListener("focusout", hideList);\n });\n\n document.querySelectorAll("[data-wi-search-radio=\'true\']").forEach(element => {\n element.addEventListener("keyup", showList);\n element.addEventListener("keyup", searchRadio);\n element.addEventListener("focusout", hideList);\n });\n\n document.querySelectorAll("[data-wi-list-value=\'true\']").forEach(element => {\n element.addEventListener("click", checkInput);\n element.addEventListener("mousedown", checkInput);\n });\n\n document.querySelectorAll("[data-wi-phone=\'true\']").forEach(element => {\n checkPhone(element);\n });\n\n check();\n setAutonumeric();\n setGoogleMapsApi();\n setInputCountry();\n\n}'},2578:e=>{e.exports="function searchInput(event) {\n \n var inputId = event.target.id;\n var inputValue = event.target.value.toLowerCase();\n \n document.querySelectorAll('#list_'+inputId+' input').forEach(x => {\n \n var keyword = x.dataset.wiKeyword.toLowerCase();\n\n if (keyword.includes(inputValue)) {\n x.parentElement.style.display = 'block';\n } else {\n x.parentElement.style.display = 'none';\n }\n \n });\n \n}\n\n// const event_CheckInput = new Event(\"wi-check-input\");\n\nfunction checkInput(event) {\n \n var container = event.target;\n\n if (container.localName == 'div') {\n var checkbox = container.querySelector('input');\n } else {\n var checkbox = container;\n }\n\n var inputId = checkbox.dataset.wiInput;\n\n checkbox.checked = true;\n\n var input = document.querySelector('#'+inputId);\n input.value = checkbox.dataset.wiName;\n // input.dispatchEvent(event_CheckInput);\n\n check();\n\n}\n\nfunction controlList(event) {\n\n var element = event.target;\n var container = event.target.parentElement;\n \n var l = element.dataset.wiListArray.split('|');\n var v = element.value.toLowerCase();\n\n if (v != '') {\n if (l.includes(v)) {\n\n removeInputError(element);\n\n container.querySelectorAll('input[type=radio]').forEach(e => {\n\n var name = e.dataset.wiName;\n\n if (name.toLowerCase() == v) {\n e.checked = true;\n } else {\n e.checked = false;\n }\n\n });\n \n } else {\n \n inputError(element, 'Campo non corretto')\n container.querySelectorAll('input[type=radio]:checked').forEach(e => { e.checked = false; });\n \n }\n }\n\n check();\n\n}\n\n\nfunction showList(event) { event.target.parentElement.classList.add('wi-list-active'); }\n\nfunction hideList(event) { event.target.parentElement.classList.remove('wi-list-active'); }\n\nfunction searchText(event) { searchResults(event, \"text\"); }\n\nfunction searchRadio(event) { searchResults(event, \"radio\"); }\n\nfunction searchResults(event, result) {\n\n var input = event.target;\n\n var container = input.parentElement;\n\n var list = container.querySelector('.wi-input-list');\n var listValue = list.querySelector('.wi-input-list-body');\n var listFooter = list.querySelector('.wi-input-list-footer');\n\n var inputId = input.id;\n var inputName = input.dataset.wiName;\n var inputValue = input.value.toLowerCase();\n\n var inputUrl = input.dataset.wiSearchUrl;\n\n if (result == 'radio') {\n var radioName = \"name='\"+inputName+\"'\";\n } else {\n var radioName = \"\";\n }\n\n $.ajax({\n type: \"POST\",\n url: inputUrl,\n data: { \n post: 'true',\n search: inputValue\n }, \n success: function (data) {\n\n const response = JSON.parse(data);\n const nResponse = response.length;\n \n var listHTML = \"\";\n\n for (let index = 0; index < nResponse; index++) {\n\n const value = response[index]['value'];\n const label = response[index]['label'];\n const inputValue = response[index]['input-value'];\n\n listHTML += \"<div class='wi-input-list-value' data-wi-list-value='true'><input data-wi-input='\"+inputId+\"' type='radio' \"+radioName+\" data-wi-name='\"+inputValue+\"' value='\"+value+\"'>\"+label+\"</div>\";\n\n }\n\n if (inputValue == '') {\n listFooter.innerHTML = \"Cosa stai cercando?\";\n } else if (nResponse == 1) {\n listFooter.innerHTML = nResponse+\" risultato\";\n } else if (nResponse != 1) {\n listFooter.innerHTML = nResponse+\" risultati\";\n }\n\n listValue.innerHTML = listHTML;\n\n document.querySelectorAll(\"[data-wi-list-value='true']\").forEach(element => {\n element.addEventListener(\"click\", checkInput);\n element.addEventListener(\"mousedown\", checkInput);\n });\n\n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n loadingSpinner();\n }\n });\n\n}\n\nfunction textListValue (input, value) {\n\n var form = input.form;\n var inputName = input.dataset.wiName.replace('-text', '');\n\n if (form.querySelector('input[name=\"'+inputName+'\"][value=\"'+value+'\"]')) {\n form.querySelector('input[name=\"'+inputName+'\"][value=\"'+value+'\"]').click();\n checkLabel(); \n }\n \n}\n\nfunction textListOptions(input, options) {\n \n var listHTML = \"\";\n var listArray = [];\n\n var form = input.form;\n var inputId = input.id;\n var inputAttribute = input.dataset.wiInputAttribute;\n var inputLabel = input.labels[0];\n var inputName = input.dataset.wiName.replace('-text', '');;\n\n var listContainer = form.querySelector('#list_'+inputId);\n\n input.dataset.wiListArray = \"\";\n listContainer.innerHTML = \"\";\n\n for (var optionValue in options) {\n\n var optionId = \"value_\"+code();\n var optionLabel = options[optionValue];\n\n listArray.push(optionLabel);\n \n listHTML += \"<div class='wi-input-list-value' data-wi-list-value='true'><input id='\"+optionId+\"' data-wi-keyword='\"+optionValue+\" \"+optionLabel+\"' data-wi-input='\"+inputId+\"' data-wi-name='\"+optionLabel+\"' type='radio' name='\"+inputName+\"' value='\"+optionValue+\"'>\"+optionLabel+\"</div>\";\n\n }\n\n if (listHTML == \"\") {\n\n input.required = false;\n input.disabled = true;\n inputLabel.innerHTML = inputLabel.innerHTML.replace('*', '');\n\n } else {\n\n if (inputAttribute.indexOf('required') != '-1') { \n\n input.required = true;\n\n if (inputLabel.innerHTML.indexOf('*') == '-1') { \n inputLabel.innerHTML = inputLabel.innerHTML+'*' \n }\n\n }\n\n input.dataset.wiListArray = listArray.join('|').toLowerCase();\n listContainer.innerHTML = listHTML;\n\n }\n\n listContainer.querySelectorAll(\"[data-wi-list-value='true']\").forEach(element => {\n element.addEventListener(\"click\", checkInput);\n element.addEventListener(\"mousedown\", checkInput);\n });\n\n checkLabel();\n\n}"},7060:e=>{e.exports="function scrolla(selector){\n \n if (document.querySelector(selector)) {\n\n var element = document.querySelector(selector);\n\n var headerHeight = '80';\n\n if (document.querySelector('header')) {\n headerHeight = document.querySelector('header').offsetHeight;\n }\n\n element.style.scrollMargin = headerHeight+'px';\n element.scrollIntoView({ behavior: 'smooth' });\n\n } else {\n\n console.error(\"Selettore ( \"+selector+\" ) non valido\");\n\n }\n\n}\n\nvar keys = {37: 1, 38: 1, 39: 1, 40: 1};\n\nfunction preventDefault(e) {\n e.preventDefault();\n}\n\nfunction preventDefaultForScrollKeys(e) {\n if (keys[e.keyCode]) {\n preventDefault(e);\n return false;\n }\n}\n\n// modern Chrome requires { passive: false } when adding event\nvar supportsPassive = false;\ntry {\n window.addEventListener(\"test\", null, Object.defineProperty({}, 'passive', {\n get: function () { supportsPassive = true; } \n}));\n} catch(e) {}\n\nvar wheelOpt = supportsPassive ? { passive: false } : false;\nvar wheelEvent = 'onwheel' in document.createElement('div') ? 'wheel' : 'mousewheel';\n\n// call this to Disable\nfunction disableAllScroll() {\n window.addEventListener('DOMMouseScroll', preventDefault, false); // older FF\n window.addEventListener(wheelEvent, preventDefault, wheelOpt); // modern desktop\n window.addEventListener('touchmove', preventDefault, wheelOpt); // mobile\n window.addEventListener('keydown', preventDefaultForScrollKeys, false);\n}\n\n// call this to Enable\nfunction enableAllScroll() {\n window.removeEventListener('DOMMouseScroll', preventDefault, false);\n window.removeEventListener(wheelEvent, preventDefault, wheelOpt); \n window.removeEventListener('touchmove', preventDefault, wheelOpt);\n window.removeEventListener('keydown', preventDefaultForScrollKeys, false);\n}\n\nfunction disableScroll() {\n document.querySelector('body').classList.add('block-scroll');\n}\n\nfunction enableScroll() {\n document.querySelector('body').classList.remove('block-scroll');\n}"},373:e=>{e.exports="function loadingSpinner() {\n\n var spinner = document.getElementById('loading-spinner');\n\n if (spinner.classList.contains('d-none')) {\n\n spinner.classList.remove('d-none');\n spinner.classList.remove('no-interaction');\n\n disableScroll();\n \n } else {\n\n spinner.classList.add('d-none');\n spinner.classList.add('no-interaction');\n \n enableScroll();\n\n }\n \n}"},8882:e=>{e.exports='function canvasFullPage(elementId, draw = false) {\n\n var element = document.createElement("CANVAS");\n element.id = elementId;\n element.style.position = "fixed";\n element.style.top = 0;\n element.style.left = 0;\n element.style.zIndex = 999999;\n element.style.background = \'#ffffff\';\n element.style.touchAction = \'none\';\n element.style.msTouchAction = \'none\';\n\n fullPage(element);\n\n window.addEventListener(\'resize\', () => { fullPage(element) });\n\n if (draw) { canvasDraw(element); }\n\n}\n\nfunction canvasReset(element) {\n \n var ctx = element.getContext("2d");\n ctx.clearRect(0, 0, element.width, element.height);\n ctx.restore();\n\n}\n\nfunction canvasDraw(element) {\n\n var ctx = element.getContext("2d");\n \n let offset = position(element);\n let painting = false;\n\n function drawStart() {\n offset = position(element);\n painting = true;\n draw(e);\n }\n\n function drawEnd() {\n painting = false;\n ctx.beginPath();\n }\n\n function draw(e) {\n\n if (!painting) return;\n ctx.lineWidth = 1;\n ctx.lineCap = "round";\n ctx.strokeStyle = "black";\n\n if (e.type == \'touchmove\'){\n var x = e.touches[0].clientX;\n var y = e.touches[0].clientY;\n } else if (e.type == \'mousemove\'){\n var x = e.clientX;\n var y = e.clientY;\n }\n\n var offsetX = offset.left;\n var offsetY = offset.top;\n\n var x = x - offsetX;\n var y = y - offsetY;\n\n ctx.lineTo(x, y);\n ctx.stroke();\n ctx.beginPath();\n ctx.moveTo(x, y);\n\n }\n\n element.addEventListener("mousedown", drawStart);\n element.addEventListener("touchstart", drawStart);\n element.addEventListener("mouseup", drawEnd);\n element.addEventListener("touchend", drawEnd);\n element.addEventListener("mousemove", draw);\n element.addEventListener("touchmove", draw);\n\n}'},6944:e=>{e.exports='function fetchResponse(response) {\n \n if (response.ok) {\n\n return response.json();\n\n } else {\n\n alertToast(802);\n console.error("Impossibile connettersi o trovare il file!");\n return false;\n\n }\n\n}\n\nfunction fetchValue(value) {\n \n if (value == false) {\n \n return false;\n \n } else {\n\n if (value.status == 200) {\n return value;\n } else if (value.status == 401) {\n alertToast(911);\n return false;\n } else if (value.status == undefined) {\n alertToast(803);\n return false;\n } else {\n alertToast(value.status);\n return false;\n }\n\n }\n\n}\n\nfunction fetchError(error) {\n \n alertToast(802);\n console.error("Il file non risponde in JSON!");\n\n}\n'},8197:e=>{e.exports="var AUTONUMERIC_NUMBER = {\n caretPositionOnFocus: 'end',\n decimalPlacesShownOnFocus: 2,\n digitGroupSeparator: '',\n decimalCharacter: '.',\n onInvalidPaste: 'truncate',\n currencySymbolPlacement: 's',\n outputFormat: 'number',\n unformatOnSubmit: true,\n modifyValueOnWheel: false\n};\n\nvar AUTONUMERIC_PRICE = {\n caretPositionOnFocus: 'end',\n decimalPlacesShownOnFocus: 2,\n digitGroupSeparator: '',\n decimalCharacter: '.',\n onInvalidPaste: 'truncate',\n currencySymbol: '€',\n currencySymbolPlacement: 's',\n outputFormat: 'number',\n unformatOnSubmit: true,\n modifyValueOnWheel: false\n};\n\nvar AUTONUMERIC_PERCENTIGE = {\n caretPositionOnFocus: 'end',\n decimalPlacesShownOnFocus: 2,\n digitGroupSeparator: '',\n decimalCharacter: '.',\n onInvalidPaste: 'truncate',\n currencySymbol: '%',\n currencySymbolPlacement: 's',\n outputFormat: 'number',\n unformatOnSubmit: true,\n modifyValueOnWheel: false\n};\n\nfunction customAutonumeric(element, autonumeric) {\n\n var option = {};\n\n if (autonumeric.caretPositionOnFocus != undefined) { \n option.caretPositionOnFocus = autonumeric.caretPositionOnFocus; \n }\n\n if (element.dataset.wiNumberDecimal != undefined) { \n option.decimalPlacesShownOnFocus = element.dataset.wiNumberDecimal;\n option.decimalPlaces = element.dataset.wiNumberDecimal;\n } else {\n if (autonumeric.decimalPlacesShownOnFocus != undefined) {\n option.decimalPlacesShownOnFocus = autonumeric.decimalPlacesShownOnFocus;\n }\n }\n\n if (element.dataset.wiNumberDecimalSeparator != undefined) { \n option.decimalCharacter = element.dataset.wiNumberDecimalSeparator;\n } else {\n if (autonumeric.decimalCharacter != undefined) {\n option.decimalCharacter = autonumeric.decimalCharacter;\n }\n }\n\n if (element.dataset.wiNumberGroupSeparator != undefined) { \n option.digitGroupSeparator = element.dataset.wiNumberGroupSeparator;\n } else {\n if (autonumeric.digitGroupSeparator != undefined) {\n option.digitGroupSeparator = autonumeric.digitGroupSeparator;\n }\n }\n\n if (autonumeric.onInvalidPaste != undefined) { \n option.onInvalidPaste = autonumeric.onInvalidPaste; \n }\n\n if (element.dataset.wiNumberSymbol != undefined) { \n option.currencySymbol = element.dataset.wiNumberSymbol;\n } else {\n if (autonumeric.currencySymbol != undefined) {\n option.currencySymbol = autonumeric.currencySymbol;\n }\n }\n\n if (element.dataset.wiNumberSymbolPlacement != undefined) { \n option.currencySymbolPlacement = element.dataset.wiNumberSymbolPlacement;\n } else {\n if (autonumeric.currencySymbolPlacement != undefined) {\n option.currencySymbolPlacement = autonumeric.currencySymbolPlacement;\n }\n }\n\n if (autonumeric.outputFormat != undefined) { \n option.outputFormat = autonumeric.outputFormat; \n }\n\n if (autonumeric.unformatOnSubmit != undefined) { \n option.unformatOnSubmit = autonumeric.unformatOnSubmit; \n }\n\n if (autonumeric.modifyValueOnWheel != undefined) { \n option.modifyValueOnWheel = autonumeric.modifyValueOnWheel; \n }\n\n return option;\n \n}\n\nfunction setAutonumeric() {\n \n document.querySelectorAll(\"[data-wi-number='true']\").forEach(element => {\n \n var el = AutoNumeric.getAutoNumericElement(element);\n \n if (el === null) {\n\n new AutoNumeric(element, customAutonumeric(element, AUTONUMERIC_NUMBER)); \n \n }\n\n });\n\n document.querySelectorAll(\"[data-wi-price='true']\").forEach(element => {\n \n var el = AutoNumeric.getAutoNumericElement(element);\n if (el === null) { new AutoNumeric(element, customAutonumeric(element, AUTONUMERIC_PRICE)); }\n\n });\n \n document.querySelectorAll(\"[data-wi-percentige='true']\").forEach(element => {\n \n var el = AutoNumeric.getAutoNumericElement(element);\n if (el === null) { new AutoNumeric(element, customAutonumeric(element, AUTONUMERIC_PERCENTIGE)); }\n\n });\n\n}"},3883:e=>{e.exports='function checkPhone(element) {\n \n var phones = [\n { "mask": "### ### ####"}\n ];\n\n new Inputmask({ \n mask: phones, \n greedy: false, \n placeholder: \'\', \n definitions: { \n \'#\': { \n validator: "[0-9]", \n cardinality: 1\n }\n } \n }).mask(element);\n\n}'},8636:e=>{e.exports="function position(element, showItem = false) {\n\n var rect = element.getBoundingClientRect();\n\n if (showItem) {\n\n var width = rect.right - rect.left;\n var height = rect.bottom - rect.top;\n\n var element = document.createElement(\"DIV\");\n element.style.position = \"fixed\";\n element.style.top = rect.top+'px';\n element.style.left = rect.left+'px';\n element.style.width = width+'px';\n element.style.height = height+'px';\n element.style.zIndex = 999999;\n element.style.background = 'rgba(255, 0, 0, .2)';\n document.body.appendChild(element);\n\n }\n\n return rect;\n\n}\n\nfunction fullPage(element) {\n element.width = window.innerWidth;\n element.height = window.innerHeight;\n}\n\nfunction copyText(text, icon = null) {\n\n if (icon != null) {\n document.querySelectorAll('.bi-clipboard-check').forEach(element => {\n element.classList.remove('bi-clipboard-check')\n element.classList.add('bi-clipboard');\n });\n }\n\n navigator.clipboard.writeText(text).then(() => {\n if (icon != null) {\n icon.classList.remove('bi-clipboard');\n icon.classList.add('bi-clipboard-check');\n }\n },() => {\n if (icon != null) {\n icon.classList.remove('bi-clipboard');\n icon.classList.add('bi-clipboard-x');\n }\n });\n\n}\n\nfunction ajaxRequestError(request) {\n \n if (request.readyState == 4) {\n alertToast(802);\n } else if (request.readyState == 0) {\n alertToast(801);\n } else {\n alertToast(800);\n }\n\n}\n\nfunction code(codeLength = 10) {\n\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n var charactersLength = characters.length;\n\n for ( var i = 0; i < codeLength; i++ ) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n\n return result;\n\n}\n\nfunction isMobile() {\n\n if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {\n return true;\n } else {\n return false;\n }\n \n}\n\nfunction delay(time) {\n\n return new Promise(resolve => setTimeout(resolve, time));\n\n}"},5827:e=>{e.exports='function setVideoJS() {\n\n document.querySelectorAll(".video-js").forEach(element => {\n videojs(element);\n });\n\n}'},4642:e=>{e.exports=function(e){function n(e){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",e)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(e):"undefined"!=typeof eval?eval.call(null,e):n("EvalError: No eval function available")}catch(e){n(e)}}},7077:(e,n,t)=>{t(4642)(t(1192))},9213:(e,n,t)=>{t(4642)(t(2578))},8393:(e,n,t)=>{t(4642)(t(7060))},3038:(e,n,t)=>{t(4642)(t(373))},9111:(e,n,t)=>{t(4642)(t(8882))},2347:(e,n,t)=>{t(4642)(t(6944))},8004:(e,n,t)=>{t(4642)(t(8197))},3286:(e,n,t)=>{t(4642)(t(3883))},9899:(e,n,t)=>{t(4642)(t(8636))},2492:(e,n,t)=>{t(4642)(t(5827))}},n={};function t(r){var i=n[r];if(void 0!==i)return i.exports;var a=n[r]={exports:{}};return e[r](a,a.exports,t),a.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";t.r(r);t(8004),t(3286),t(2347),t(9899),t(9111),t(2492),t(3038),t(8393),t(9213),t(7077)})(),window.wonder=r})();
3
3
  //# sourceMappingURL=head.js.map