wonder-image 2.1.2-alpha.25 → 2.1.2-alpha.26
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.
package/dist/backend/head.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see head.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={5285(e){e.exports="function ajaxRequest(link, onSuccess = reloadPage, params = null) {\n\n loadingSpinner();\n\n $.ajax({\n type: \"POST\",\n url: link,\n data: { \n post: 'true'\n }, \n success: function(data) {\n\n if (onSuccess != null) {\n if (typeof onSuccess === 'function') {\n \n if (params == null) {\n onSuccess();\n } else {\n onSuccess(params);\n }\n \n } else {\n \n try {\n \n var x = JSON.parse(onSuccess.replace('"', '\"'));\n\n var f = x.function;\n var p = x.parameters;\n \n } catch {\n\n var f = onSuccess;\n var p = params;\n\n }\n \n window[f](p);\n \n }\n }\n\n loadingSpinner();\n \n },\n error: function (XMLHttpRequest) {\n var message = ajaxResponseMessage(XMLHttpRequest);\n\n if (message !== null) {\n alertToast('custom', 'warning', 'Attenzione', message);\n } else {\n ajaxRequestError(XMLHttpRequest);\n }\n\n loadingSpinner();\n }\n }); \n\n}\n\nfunction reloadPage() {\n\n location.reload();\n \n}"},4729(e){e.exports="function toastContainer() {\n\n if (document.querySelector('.toast-container')) {\n\n var container = document.querySelector('.toast-container');\n\n }else{\n\n var container = document.createElement('div');\n container.classList.add('toast-container');\n container.classList.add('position-fixed');\n container.classList.add('top-0');\n container.classList.add('end-0');\n container.classList.add('p-3');\n\n document.body.insertBefore(container, document.body.firstChild);\n\n }\n\n return container;\n\n}\n\nfunction alertToast(alert, type = null, title = null, text = null) {\n\n var container = toastContainer();\n\n $(\".toast.show\").toast().hide();\n \n if (alert == 801) {\n\n container.innerHTML = NO_INTERNET_ALERT + container.innerHTML;\n const toast = new bootstrap.Toast(container.firstElementChild);\n toast.show();\n\n } else if (alert != undefined) {\n\n API_CLIENT_APP.post(\"/backend/alert/\", { \n code: alert,\n alertType: type,\n alertTitle: title,\n alertText: text\n })\n .then(data => {\n \n container.innerHTML = data.response + container.innerHTML;\n const toast = new bootstrap.Toast(container.firstElementChild);\n toast.show();\n \n var url = new URL(window.location.href);\n url.searchParams.delete('alert');\n window.history.replaceState(null, null, url);\n\n })\n .catch(error => console.error(error));\n\n }\n\n}"},8553(e){e.exports="function bootstrapToast() {\n\n var toastElList = [].slice.call(document.querySelectorAll('.toast'))\n var toastList = toastElList.map(function(toastEl) {\n return new bootstrap.Toast(toastEl)\n });\n toastList.forEach(toast => toast.show());\n\n}\n\nfunction bootstrapTooltip() { $('[data-bs-toggle=\"tooltip\"]').tooltip(); }\n\nfunction bootstrapTheme(theme) {\n\n document.querySelector(\"html\").setAttribute(\"data-bs-theme\", theme);\n\n localStorage.setItem('theme', theme);\n \n if (theme == 'light') {\n\n if (document.querySelector('#bs-theme i.light-theme')) { document.querySelector('#bs-theme i.light-theme').classList.remove('d-none'); }\n if (document.querySelector('#bs-theme i.dark-theme')) { document.querySelector('#bs-theme i.dark-theme').classList.add('d-none'); }\n\n document.querySelector('#be-logo-white').classList.add('d-none');\n document.querySelector('#be-logo-black').classList.remove('d-none');\n\n element = document.querySelector('[data-bs-theme-value=\"light\"]');\n el = document.querySelector('[data-bs-theme-value=\"dark\"]');\n\n } else if (theme == 'dark') {\n\n if (document.querySelector('#bs-theme i.light-theme')) { document.querySelector('#bs-theme i.light-theme').classList.add('d-none'); }\n if (document.querySelector('#bs-theme i.dark-theme')) { document.querySelector('#bs-theme i.dark-theme').classList.remove('d-none'); }\n\n document.querySelector('#be-logo-white').classList.remove('d-none');\n document.querySelector('#be-logo-black').classList.add('d-none');\n\n element = document.querySelector('[data-bs-theme-value=\"dark\"]');\n el = document.querySelector('[data-bs-theme-value=\"light\"]');\n\n }\n\n if (el) { el.classList.remove('active'); }\n if (element) { element.classList.add('active'); }\n\n}\n\nfunction setUpBootstrap() {\n \n bootstrapTooltip();\n\n}"},5249(e){e.exports='class CustomHyperlink extends Hyperlink {\n iconSvg(name, width = 14, height = 14) {\n const svg = document.createElementNS(\'http://www.w3.org/2000/svg\', \'svg\');\n svg.classList.add(\'icon\', \'icon--\' + name);\n svg.setAttribute(\'width\', \'24\');\n svg.setAttribute(\'height\',\'24\');\n svg.setAttribute(\'viewBox\', \'0 0 24 24\')\n svg.setAttribute(\'fill\', \'none\');\n if (name == \'link\') {\n svg.innerHTML = `\n <path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.69998 12.6L7.67896 12.62C6.53993 13.7048 6.52012 15.5155 7.63516 16.625V16.625C8.72293 17.7073 10.4799 17.7102 11.5712 16.6314L13.0263 15.193C14.0703 14.1609 14.2141 12.525 13.3662 11.3266L13.22 11.12"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16.22 11.12L16.3564 10.9805C17.2895 10.0265 17.3478 8.5207 16.4914 7.49733V7.49733C15.5691 6.39509 13.9269 6.25143 12.8271 7.17675L11.3901 8.38588C10.0935 9.47674 9.95706 11.4241 11.0888 12.6852L11.12 12.72"></path>\n `;\n } else {\n svg.innerHTML = `\n <path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M15.7795 11.5C15.7795 11.5 16.053 11.1962 16.5497 10.6722C17.4442 9.72856 17.4701 8.2475 16.5781 7.30145V7.30145C15.6482 6.31522 14.0873 6.29227 13.1288 7.25073L11.8796 8.49999"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8.24517 12.3883C8.24517 12.3883 7.97171 12.6922 7.47504 13.2161C6.58051 14.1598 6.55467 15.6408 7.44666 16.5869V16.5869C8.37653 17.5731 9.93744 17.5961 10.8959 16.6376L12.1452 15.3883"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17.7802 15.1032L16.597 14.9422C16.0109 14.8624 15.4841 15.3059 15.4627 15.8969L15.4199 17.0818"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6.39064 9.03238L7.58432 9.06668C8.17551 9.08366 8.6522 8.58665 8.61056 7.99669L8.5271 6.81397"></path><line x1="12.1142" x2="11.7" y1="12.2" y2="11.7858" stroke="currentColor" stroke-linecap="round" stroke-width="2"></line>\n `;\n }\n return svg;\n }\n}\n\nclass CustomEmded extends Embed {\n \n static get toolbox() {\n return {\n title: \'Iframe\',\n icon: \'<svg width="20" height="20" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 1 0-6M14 11a5 5 0 0 1 0 6"></path><line x1="14" y1="7" x2="14" y2="7"></line><line x1="10" y1="17" x2="10" y2="17"></line></svg>\'\n };\n }\n \n /**\n * Render Embed tool content\n *\n * @returns {HTMLElement}\n */\n render() {\n if (!this.data.service) {\n const container = document.createElement(\'div\');\n \n this.element = container;\n const input = document.createElement(\'input\');\n input.classList.add(\'cdx-input\');\n input.placeholder = \'https://www.youtube.com/watch?v=w8vsuOXZBXc\';\n input.type = \'url\';\n input.addEventListener(\'paste\', (event) => {\n const url = event.clipboardData.getData(\'text\');\n const service = Object.keys(Embed.services).find((key) => Embed.services[key].regex.test(url));\n if (service) {\n this.onPaste({detail: {key: service, data: url}});\n }\n });\n container.appendChild(input);\n \n return container;\n }\n return super.render();\n }\n \n validate(savedData) {\n return savedData.service && savedData.source ? true : false;\n }\n}\n\nclass CustomVideoTool extends VideoTool {\n \n static get toolbox() {\n return {\n title: \'Video\',\n icon: \'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 10.5606V13.4394C10 14.4777 11.1572 15.0971 12.0211 14.5211L14.1803 13.0817C14.9536 12.5661 14.9503 11.4317 14.18 10.9181L12.0214 9.47907C11.1591 8.9042 10 9.5203 10 10.5606Z" stroke="black" stroke-width="2"/><rect x="5" y="5" width="14" height="14" rx="4" stroke="black" stroke-width="2"/></svg>\'\n };\n }\n \n}\n\nvar EDITORJS_TOOLS_BLOG = {\n paragraph: {\n inlineToolbar: true,\n tunes: [\'textAlign\']\n },\n header: {\n class: Header,\n inlineToolbar: true,\n tunes: [\'textAlign\'],\n config: {\n placeholder: \'Titolo...\',\n levels: [1, 2, 4],\n defaultLevel: 2\n }\n },\n quote: {\n class: Quote,\n inlineToolbar: true,\n config: {\n quotePlaceholder: \'Scrivi una citazione...\',\n captionPlaceholder: \'Autore\',\n },\n },\n list: {\n class: NestedList,\n inlineToolbar: true,\n config: {\n defaultStyle: \'unordered\'\n },\n },\n delimiter: Delimiter,\n table: {\n class: Table,\n inlineToolbar: [\'link\', \'italic\', \'bold\'],\n },\n // code: CodeTool,\n image: {\n class: ImageTool,\n config: {\n captionPlaceholder: \'Caption...\',\n endpoints: {\n byFile: pathApp+\'/api/backend/editorjs/image.php\'\n // Aggiungere cartella dove caricare i file\n },\n field: \'image\',\n types: \'image/png, image/jpg, image/jpeg\',\n additionalRequestHeaders: { dir: \'\' }\n // Forzo nel css la rimozione "display: none" di withBorder, stretched e withBackground\n }\n },\n gallery: {\n class: ImageGallery,\n config: {\n captionPlaceholder: \'Caption galleria...\',\n endpoints: {\n byFile: pathApp+\'/api/backend/editorjs/image.php\'\n // Aggiungere cartella dove caricare i file\n },\n field: \'image\',\n types: \'image/png, image/jpg, image/jpeg\',\n additionalRequestHeaders: { dir: \'\' }\n // Forzo nel css la rimozione "display: none" di fit e slider\n },\n },\n Marker: Marker,\n inlineCode: InlineCode,\n attaches: {\n class: AttachesTool,\n config: {\n endpoint: pathApp+\'/api/backend/editorjs/file.php\',\n // Aggiungere cartella dove caricare i file\n field: \'file\',\n additionalRequestHeaders: { dir: \'\' }\n }\n },\n // TODO: Aggiungi caricamento video (potrebbe tornare utile la classe ImageTool)\n // video: {\n // class: CustomVideoTool,\n // config: {\n // captionPlaceholder: \'Caption...\',\n // endpoints: {\n // byFile: pathSite+\'/api/task/article/file.php\'\n // },\n // player: {\n // controls: true,\n // autoplay: false,\n // },\n // field: \'file\',\n // types: \'video/quicktime, video/mp4\'\n // // Forzo nel css la rimozione "display: none" di withBorder, stretched e withBackground\n // }\n // },\n // TODO: embed non funziona. Trovare un modo per caricare iframe\n // embed: {\n // class: CustomEmded,\n // },\n textAlign: {\n class: AlignmentTuneTool,\n config:{\n default: "left"\n },\n },\n link: {\n class: CustomHyperlink,\n config: {\n shortcut: \'CMD+L\',\n target: \'_blank\',\n rel: \'nofollow\',\n availableTargets: [\'_blank\', \'_self\'],\n availableRels: [\'author\', \'noreferrer\'],\n validate: false,\n }\n },\n};\n\nvar EDITORJS_TOOLS_TABLE = {\n paragraph: false,\n inlineCode: InlineCode,\n table: {\n class: Table,\n inlineToolbar: [\'link\', \'italic\', \'bold\'],\n }\n};\n\nvar EDITORJS_i18n_IT = {\n messages: {\n ui: {\n "blockTunes": {\n "toggler": {\n "Click to tune": "Modifica",\n "or drag to move": "Trascina per muovere"\n },\n },\n "inlineToolbar": {\n "converter": {\n "Convert to": "Converti"\n }\n },\n "toolbar": {\n "toolbox": {\n "Add": "Aggiungi",\n }\n }\n },\n toolNames: {\n "Add": "Aggiungi",\n "Quote": "Citazione",\n "Delimiter": "Linea",\n "Text": "Testo",\n "Heading": "Titolo",\n "Table": "Tabella",\n "Code": "Codice",\n "List": "Elenco",\n "Bold": "Grassetto",\n "Italic": "Corsivo",\n "Marker": "Evidenzia",\n "InlineCode": "Codice",\n "TextAlign": "Allineamento",\n "Gallery": "Galleria",\n "Image": "Immagine",\n "Attachment": "Allega file",\n },\n tools: {\n "header": {\n "Heading 1": "Titolo grande",\n "Heading 2": "Titolo",\n "Heading 4": "Sottotitolo"\n },\n "link": {\n "Add a link": "Aggiungi link"\n },\n "code": {\n "Enter a code": "Inserisci codice",\n },\n "quote": {\n "Align Left": "Allinea a sinistra",\n "Align Center": "Allinea in centro",\n },\n "table": {\n "With headings": "Con intestazione",\n "Without headings": "Senza intestazione",\n "Add column to left": "Aggiungi colonna sinistra",\n "Add column to right": "Aggiungi colonna destra",\n "Add row above": "Aggiungi riga sopra",\n "Add row below": "Aggiungi riga sotto",\n "Delete column": "Elimina colonna",\n "Delete row": "Elimina riga",\n },\n "list": {\n "Ordered": "Elenco numerato",\n "Unordered": "Elenco puntato",\n },\n "gallery": {\n "Select an Image": "Seleziona immagini",\n },\n "image": {\n "Select an Image": "Seleziona immagine",\n },\n "video": {\n "Select an Video": "Seleziona video",\n },\n "attaches": {\n "Select file to upload": "Seleziona file da allegare",\n },\n },\n blockTunes: {\n "delete": {\n "Delete": "Elimina",\n "Click to delete": "Clicca per elimina"\n },\n "moveUp": {\n "Move up": "Su"\n },\n "moveDown": {\n "Move down": "Giù"\n }\n },\n }\n};'},3990(e){e.exports="function moveFile(selectorContainer, selectorData, action) {\n\n var link = pathApp+'/api/backend/file/move.php';\n\n var el = document.querySelector(selectorContainer+' '+selectorData);\n\n var table = el.dataset.wiDbTable;\n var column = el.dataset.wiDbColumn;\n var rowId = el.dataset.wiDbRow;\n var fileId = el.dataset.wiFileId;\n var oldPosition = Number(el.dataset.wiOrder);\n var nFile = el.dataset.wiNFile;\n\n $.ajax({\n type: \"POST\",\n url: link,\n data: { \n post: 'true',\n table: table,\n column: column,\n row_id: rowId,\n file_id: fileId,\n action: action\n },\n success: function (data) {\n \n if (action == 'up') {\n var newPosition = oldPosition - 1;\n } else if (action == 'down') {\n var newPosition = oldPosition + 1;\n }\n\n var file1 = document.querySelector(selectorContainer+' .wi-card-file.order-'+oldPosition);\n var file2 = document.querySelector(selectorContainer+' .wi-card-file.order-'+newPosition);\n\n file1.classList.remove('order-'+oldPosition);\n file1.classList.add('order-'+newPosition);\n file1.dataset.wiOrder = newPosition;\n file1.dataset.wiFileId = file2.dataset.wiFileId;\n\n file2.classList.remove('order-'+newPosition);\n file2.classList.add('order-'+oldPosition);\n file2.dataset.wiOrder = oldPosition;\n file2.dataset.wiFileId = fileId;\n\n // Sistema first e last\n firstLastFile(selectorContainer, nFile);\n \n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n }\n }); \n\n}\n\nfunction deleteFile(selectorContainer, selectorData) {\n\n var el = document.querySelector(selectorContainer+' '+selectorData);\n\n var folder = el.dataset.wiFolder;\n var table = el.dataset.wiDbTable;\n var column = el.dataset.wiDbColumn;\n var rowId = el.dataset.wiDbRow;\n var fileId = el.dataset.wiFileId;\n\n var oldPosition = Number(el.dataset.wiOrder);\n var nFile = el.dataset.wiNFile;\n\n var fileName = el.dataset.wiFileName;\n\n var text = \"Sei sicuro di eliminare il file <b>\"+fileName+\"</b>?\";\n var link = pathApp+'/api/backend/file/delete.php?folder='+folder+'&table='+table+'&column='+column+'&row_id='+rowId+'&file_id='+fileId;\n\n var onSuccess = '{ \"function\" : \"removeFile\", \"parameters\": { \"container\" : \"'+selectorContainer+'\", \"data\" : \"'+selectorData+'\", \"nFile\" : \"'+nFile+'\", \"position\" : \"'+oldPosition+'\"} }';\n\n modal(text, link, 'ATTENZIONE', 'Elimina', 'danger', 'Chiudi', 'dark', onSuccess);\n\n}\n\nfunction removeFile(parameters) {\n\n var selectorContainer = parameters.container;\n var selectorData = parameters.data;\n var deletedFilePosition = Number(parameters.position);\n var maxFile = Number(parameters.maxFile);\n var old_nFile = Number(parameters.nFile);\n const real_nFile = old_nFile - 1;\n\n document.querySelector(selectorContainer+' '+selectorData).remove();\n\n document.querySelectorAll(selectorContainer+' .wi-card-file').forEach(element => {\n\n var filePosition = Number(element.dataset.wiOrder);\n element.dataset.wiNFile = real_nFile;\n\n if (filePosition > deletedFilePosition) {\n\n var newPosition = filePosition - 1;\n var newId = newPosition - 1;\n\n element.dataset.wiOrder = newPosition;\n element.classList.remove('order-'+filePosition);\n element.classList.add('order-'+newPosition);\n\n element.dataset.wiFileId = newId;\n\n }\n\n });\n\n\n var maxFile = document.querySelector(selectorContainer+' input').dataset.wiMaxFile;\n\n if (maxFile > real_nFile) {\n document.querySelector(selectorContainer+' input').disabled = false;\n }\n\n firstLastFile(selectorContainer, real_nFile);\n\n $('#modal').modal('hide');\n\n}\n\nfunction firstLastFile(selectorContainer, nFile) {\n\n if (document.querySelectorAll(selectorContainer+' .wi-card-file').length > 0) {\n\n if (document.querySelector(selectorContainer+' .wi-card-file.wi-first-file')) {\n document.querySelector(selectorContainer+' .wi-card-file.wi-first-file').classList.remove('wi-first-file');\n }\n \n if (document.querySelector(selectorContainer+' .wi-card-file.wi-last-file')) {\n document.querySelector(selectorContainer+' .wi-card-file.wi-last-file').classList.remove('wi-last-file');\n }\n \n document.querySelector(selectorContainer+' .wi-card-file.order-1').classList.add('wi-first-file');\n document.querySelector(selectorContainer+' .wi-card-file.order-'+nFile).classList.add('wi-last-file');\n \n }\n\n}"},6711(e){e.exports="/*\n * La raccolta del campo icona (`FormField::icon()` di wonder-image/app).\n *\n * Il renderer stampa un `input-group` `.wi-icon-picker` con l'anteprima\n * (`.wi-show-icon`), la casella del nome (`data-wi-icon-picker`) e un bottone\n * `data-wi-icon-picker-open=\"{id della casella}\"`. Qui c'è un solo pannello\n * per pagina, che si sposta sotto il bottone premuto: una ricerca e la griglia\n * delle Bootstrap Icons. Scegliere un'icona scrive `bi-nome` nella casella e\n * lancia `input` e `change`, come se l'avessi scritto a mano.\n *\n * La ricerca capisce anche l'italiano: «stella» trova `star`, «carr» trova\n * `cart`. I nomi arrivano da `window.wiBootstrapIconNames`, che head.js\n * riempie da bootstrap-icons.json.\n */\n(function () {\n\n if (window.wiIconPicker) { return; }\n\n var LIMIT = 240;\n var PATTERN = /^bi-[a-z0-9-]+$/;\n\n // Le parole italiane che non somigliano al nome inglese dell'icona.\n // Basta l'inizio della parola: «stel» vale già «stella».\n var DICTIONARY = {\n acqua: ['water', 'droplet'], aereo: ['airplane'], albero: ['tree'], allarme: ['alarm'],\n altoparlante: ['speaker'], ambiente: ['recycle', 'tree'], ancora: ['anchor'], anello: ['circle', 'gem'],\n ape: ['bug'], attenzione: ['exclamation', 'warning'], auto: ['car'], avviso: ['exclamation', 'bell'],\n bagaglio: ['luggage', 'suitcase'], banca: ['bank'], bandiera: ['flag'], barca: ['life-preserver'],\n batteria: ['battery'], bicicletta: ['bicycle'], biglietto: ['ticket'], borsa: ['bag', 'handbag'],\n bussola: ['compass'], caffe: ['cup-hot'], calendario: ['calendar'], camion: ['truck'],\n campana: ['bell'], carrello: ['cart'], carta: ['credit-card', 'card'], cartella: ['folder'],\n casa: ['house'], cerchio: ['circle'], chiave: ['key', 'wrench'], chiudi: ['x'],\n cestino: ['basket', 'trash'], cielo: ['cloud', 'sun'], colore: ['palette', 'droplet'], computer: ['laptop', 'pc'],\n conto: ['receipt', 'bank'], corona: ['award', 'trophy'], cuffie: ['headphones'], cuore: ['heart'],\n denaro: ['cash', 'coin', 'currency'], diamante: ['gem', 'diamond'], documento: ['file'], dollaro: ['currency-dollar'],\n ecologico: ['recycle', 'tree'], energia: ['lightning', 'battery'], etichetta: ['tag'], euro: ['currency-euro'],\n faccina: ['emoji'], fiamma: ['fire'], fiore: ['flower'], forbici: ['scissors'],\n foto: ['image', 'camera'], freccia: ['arrow'], fuoco: ['fire'], fulmine: ['lightning'],\n garanzia: ['shield-check', 'patch-check'], gemma: ['gem'], gente: ['people'], giornale: ['newspaper'],\n globo: ['globe'], goccia: ['droplet'], gomma: ['eraser'], grafico: ['graph', 'bar-chart', 'pie-chart'],\n griglia: ['grid'], immagine: ['image'], impostazioni: ['gear', 'sliders'], ingranaggio: ['gear'],\n lampadina: ['lightbulb'], libro: ['book'], lista: ['list'], lucchetto: ['lock'],\n luna: ['moon'], luogo: ['geo', 'pin-map'], macchina: ['car', 'camera'], mano: ['hand'],\n mappa: ['map', 'geo'], martello: ['hammer'], matita: ['pencil'], medaglia: ['award'],\n mela: ['apple'], meno: ['dash'], microfono: ['mic'], mondo: ['globe'],\n moneta: ['coin'], musica: ['music'], negozio: ['shop'], neve: ['snow'],\n nuvola: ['cloud'], occhiali: ['eyeglasses', 'sunglasses'], occhio: ['eye'], ombrello: ['umbrella'],\n orologio: ['clock', 'watch', 'smartwatch'], pacco: ['box', 'package'], pagamento: ['credit-card', 'wallet', 'cash'], palla: ['circle', 'dribbble'],\n pennello: ['brush', 'paint'], penna: ['pen'], persona: ['person'], pianta: ['tree', 'flower'],\n piu: ['plus'], pioggia: ['cloud-rain', 'umbrella'], pollice: ['hand-thumbs'], portafoglio: ['wallet'],\n posizione: ['geo'], posta: ['envelope', 'mailbox'], premio: ['award', 'trophy'], prezzo: ['tag', 'currency'],\n quadrato: ['square'], regalo: ['gift'], reso: ['arrow-return', 'arrow-repeat', 'arrow-counterclockwise'], ricerca: ['search'],\n riciclo: ['recycle'], righello: ['rulers'], rombo: ['diamond'], ruota: ['gear', 'circle'],\n sacchetto: ['bag'], scarpa: ['bag'], scatola: ['box'], scudo: ['shield'],\n segnalibro: ['bookmark'], sconto: ['percent', 'tag'], sicurezza: ['shield', 'lock'], sole: ['sun'],\n sorriso: ['emoji-smile'], spedizione: ['truck', 'box'], spina: ['plug'], spunta: ['check'],\n stampante: ['printer'], stella: ['star'], strati: ['layers'], taglia: ['rulers', 'arrows'],\n tazza: ['cup'], telefono: ['telephone', 'phone'], temperatura: ['thermometer'], tempo: ['clock', 'hourglass'],\n torta: ['cake'], treno: ['train'], triangolo: ['triangle'], trofeo: ['trophy'],\n utente: ['person'], uovo: ['egg'], valigia: ['suitcase', 'luggage'], vento: ['wind'],\n verificato: ['patch-check', 'check'], video: ['camera-video', 'film', 'play'], volume: ['volume'], zaino: ['backpack']\n };\n\n function names() {\n return Array.isArray(window.wiBootstrapIconNames) ? window.wiBootstrapIconNames : [];\n }\n\n function normalize(text) {\n return String(text || '')\n .toLowerCase()\n .normalize('NFD')\n .replace(/[̀-ͯ]/g, '')\n .trim()\n .replace(/^bi-/, '');\n }\n\n // Una parola cercata vale sé stessa più le traduzioni delle parole\n // italiane che cominciano così (da tre lettere in su, se no «ca» porta\n // dentro mezzo dizionario).\n function candidates(word) {\n var list = [word];\n\n if (word.length < 3) { return list; }\n\n Object.keys(DICTIONARY).forEach(function (italian) {\n if (italian.indexOf(word) === 0) {\n list = list.concat(DICTIONARY[italian]);\n }\n });\n\n return list;\n }\n\n function search(query, list) {\n list = Array.isArray(list) ? list : names();\n query = normalize(query);\n\n if (query === '') { return list.slice(); }\n\n var words = query.split(/[\\s,]+/).filter(Boolean).map(candidates);\n var first = words[0];\n var found = list.filter(function (name) {\n return words.every(function (options) {\n return options.some(function (term) { return name.indexOf(term) !== -1; });\n });\n });\n\n // Prima i nomi che cominciano con quello che cerchi: «star» prima di\n // «bookmark-star».\n var rank = function (name) {\n if (first.indexOf(name) !== -1) { return 0; }\n return first.some(function (term) { return name.indexOf(term) === 0; }) ? 1 : 2;\n };\n\n return found\n .map(function (name, index) { return { name: name, rank: rank(name), index: index }; })\n .sort(function (a, b) { return a.rank - b.rank || a.index - b.index; })\n .map(function (item) { return item.name; });\n }\n\n function updatePreview(input) {\n var group = input && input.closest ? input.closest('.wi-icon-picker') : null;\n var show = group ? group.querySelector('.wi-show-icon') : null;\n\n if (!show) { return; }\n\n var value = String(input.value || '').trim();\n show.className = 'bi ' + (PATTERN.test(value) ? value : 'bi-question-square') + ' wi-show-icon';\n }\n\n var panel = null;\n var field = null;\n var grid = null;\n var hint = null;\n var target = null;\n var opener = null;\n\n function build() {\n if (panel) { return; }\n\n panel = document.createElement('div');\n panel.className = 'card shadow wi-icon-picker-panel d-none';\n panel.setAttribute('role', 'dialog');\n panel.setAttribute('aria-label', 'Scegli un\\'icona');\n panel.innerHTML =\n '<div class=\"card-body p-2\">' +\n '<div class=\"d-flex gap-2 mb-2\">' +\n '<input type=\"search\" class=\"form-control form-control-sm\" placeholder=\"Cerca: stella, cuore, star…\" aria-label=\"Cerca un\\'icona\">' +\n '<button type=\"button\" class=\"btn btn-sm btn-light\" aria-label=\"Chiudi\"><i class=\"bi bi-x-lg\" aria-hidden=\"true\"></i></button>' +\n '</div>' +\n '<div class=\"wi-icon-picker-grid\"></div>' +\n '<div class=\"small text-body-secondary mt-2 wi-icon-picker-hint\"></div>' +\n '</div>';\n\n field = panel.querySelector('input');\n grid = panel.querySelector('.wi-icon-picker-grid');\n hint = panel.querySelector('.wi-icon-picker-hint');\n\n field.addEventListener('input', function () { render(field.value); });\n field.addEventListener('keydown', function (event) {\n if (event.key === 'Enter') {\n event.preventDefault();\n var firstButton = grid.querySelector('[data-wi-icon]');\n if (firstButton) { choose(firstButton.dataset.wiIcon); }\n }\n });\n panel.querySelector('.btn-light').addEventListener('click', function () { close(true); });\n grid.addEventListener('click', function (event) {\n var button = event.target.closest('[data-wi-icon]');\n if (button) { choose(button.dataset.wiIcon); }\n });\n }\n\n function render(query) {\n var found = search(query);\n var current = target ? String(target.value || '').trim() : '';\n\n grid.textContent = '';\n\n found.slice(0, LIMIT).forEach(function (name) {\n var button = document.createElement('button');\n var icon = document.createElement('i');\n\n button.type = 'button';\n button.className = 'btn btn-sm ' + (current === 'bi-' + name ? 'btn-primary' : 'btn-light');\n button.title = 'bi-' + name;\n button.dataset.wiIcon = name;\n icon.className = 'bi bi-' + name;\n icon.setAttribute('aria-hidden', 'true');\n button.appendChild(icon);\n grid.appendChild(button);\n });\n\n if (found.length === 0) {\n hint.textContent = 'Nessuna icona: prova con una parola in inglese.';\n } else if (found.length > LIMIT) {\n hint.textContent = LIMIT + ' di ' + found.length + ' icone: scrivi per restringere.';\n } else {\n hint.textContent = found.length === 1 ? '1 icona' : found.length + ' icone';\n }\n }\n\n function place() {\n var rect = opener.getBoundingClientRect();\n var width = panel.offsetWidth;\n var height = panel.offsetHeight;\n var top = rect.bottom + 4;\n var left = Math.min(rect.right - width, window.innerWidth - width - 8);\n\n if (top + height > window.innerHeight - 8 && rect.top - height - 4 > 8) {\n top = rect.top - height - 4;\n }\n\n panel.style.top = Math.max(8, top) + 'px';\n panel.style.left = Math.max(8, left) + 'px';\n }\n\n function open(input, button) {\n build();\n\n // Dentro una modale il pannello sta nella modale: fuori, la trappola\n // del focus di Bootstrap non lascerebbe scrivere nella ricerca.\n var host = input.closest('.modal') || document.body;\n if (panel.parentNode !== host) { host.appendChild(panel); }\n\n target = input;\n opener = button || input;\n field.value = '';\n render('');\n panel.classList.remove('d-none');\n place();\n field.focus();\n }\n\n function close(restoreFocus) {\n if (!panel || panel.classList.contains('d-none')) { return; }\n\n panel.classList.add('d-none');\n\n if (restoreFocus && target) { target.focus(); }\n\n target = null;\n opener = null;\n }\n\n function choose(name) {\n if (!target) { return; }\n\n var input = target;\n input.value = 'bi-' + name;\n input.dispatchEvent(new Event('input', { bubbles: true }));\n input.dispatchEvent(new Event('change', { bubbles: true }));\n updatePreview(input);\n close(true);\n }\n\n // Il campo si cerca accanto al bottone: le righe nuove di un repeater\n // nascono dallo stesso modello, con lo stesso id, e getElementById\n // porterebbe sempre alla prima.\n function inputFor(button) {\n var group = button.closest ? button.closest('.wi-icon-picker') : null;\n\n return (group && group.querySelector('[data-wi-icon-picker]'))\n || document.getElementById(button.dataset.wiIconPickerOpen);\n }\n\n document.addEventListener('click', function (event) {\n var button = event.target.closest ? event.target.closest('[data-wi-icon-picker-open]') : null;\n\n if (button) {\n var input = inputFor(button);\n\n if (input) {\n event.preventDefault();\n if (target === input) { close(false); } else { open(input, button); }\n }\n\n return;\n }\n\n if (panel && !panel.contains(event.target)) { close(false); }\n });\n\n document.addEventListener('input', function (event) {\n if (event.target.matches && event.target.matches('[data-wi-icon-picker]')) {\n updatePreview(event.target);\n }\n });\n\n document.addEventListener('keydown', function (event) {\n if (event.key === 'Escape' && panel && !panel.classList.contains('d-none')) {\n event.stopPropagation();\n close(true);\n }\n }, true);\n\n // Un pannello a posizione fissa non segue la pagina che scorre.\n window.addEventListener('resize', function () { close(false); });\n window.addEventListener('scroll', function (event) {\n if (panel && !panel.contains(event.target)) { close(false); }\n }, true);\n\n window.wiIconPicker = { search: search, open: open, close: close, updatePreview: updatePreview, inputFor: inputFor };\n\n})();\n\n/** Riallinea le anteprime ai valori già scritti (campi arrivati dopo il caricamento). */\nfunction setIconPicker(container = document) {\n container.querySelectorAll('[data-wi-icon-picker]').forEach(function (input) {\n window.wiIconPicker.updatePreview(input);\n });\n}\n"},7418(e){e.exports="function check() {\n \n document.querySelectorAll(\"form button[type='submit'], form button.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.closest && input.closest('[data-wi-conditional-hidden=\"true\"]')) { continue; }\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 }\n\n var formElement = button.form;\n\n formElement.querySelectorAll(\".wi-checkbox-required, .wi-radio-required\").forEach(checkboxContainer => {\n\n if (checkboxContainer.closest('[data-wi-conditional-hidden=\"true\"]')) { return; }\n\n if (checkboxContainer.querySelectorAll(\"input[type='checkbox']:checked, input[type='radio']:checked\").length == 0) { button.setAttribute(\"disabled\", null); }\n\n });\n\n });\n\n}\n\nfunction lengthCount(event) {\n\n var val = event.target.value;\n var container = event.target.parentElement;\n\n if (container.querySelector('.wi-counter')) {\n container.querySelector('.wi-counter').innerHTML = val.length;\n }\n\n}\n\nfunction checkColor(event) {\n\n var val = event.target.value;\n var container = event.target.parentElement;\n\n if (val.includes('#')) {\n container.querySelector('.wi-show-color').style.color = val;\n } else {\n container.querySelector('.wi-show-color').style.color = 'rgba('+val+')';\n }\n \n}\n\nfunction generateCode(selector) {\n\n document.querySelector(selector).value = code();\n \n}\n\nfunction disableInput(type) {\n\n if (type == 'user') {\n var inputArray = document.querySelectorAll('input[name=name], input[name=surname], input[name=username], input[name=email], input[name=\"profile_picture[]\"], select[name=color], select[name=active]');\n }\n\n inputArray.forEach(element => {\n\n element.disabled = true;\n element.dataset.wiOldValue = element.value;\n element.dataset.wiOldRequired = element.required;\n \n element.value = '';\n element.required = false;\n\n }); \n\n}\n\nfunction enabledInput(type) {\n\n if (type == 'user') {\n var inputArray = document.querySelectorAll('input[name=name], input[name=surname], input[name=username], input[name=email], input[name=\"profile_picture[]\"], select[name=color], select[name=active]');\n }\n\n inputArray.forEach(element => {\n\n if (element.dataset.wiOldValue) {\n var wiOldValue = element.dataset.wiOldValue;\n } else {\n if (element.name == 'active') {\n var wiOldValue = \"true\";\n } else if (element.name == 'color') {\n var wiOldValue = \"blue\";\n } else {\n var wiOldValue = \"\";\n }\n }\n \n if (element.dataset.wiOldRequired) {\n var wiOldRequired = element.dataset.wiOldRequired;\n } else {\n var wiOldRequired = \"\";\n }\n \n element.disabled = false;\n element.value = wiOldValue;\n element.required = wiOldRequired;\n\n }); \n \n}\n\nfunction createCheckbox(array, element, container, checked = false) {\n\n var name = element.dataset.wiName;\n var attribute = element.dataset.wiAttribute;\n\n if (element.dataset.wiSearchRadio != undefined) {\n var type = \"radio\";\n } else if (element.dataset.wiSearchCheckbox != undefined) {\n var type = \"checkbox\";\n }\n\n var containerMaster = container.parentElement;\n var footer = containerMaster.querySelector('.card .card-footer');\n footer.innerHTML = 'Cerco...';\n\n try {\n\n const response = JSON.parse(array);\n const nResponse = response.length;\n \n var HTML_CHECKED = \"\";\n \n container.querySelectorAll('input:checked').forEach(el => {\n \n el.setAttribute('checked', true);\n HTML_CHECKED += \"<div class='form-check'>\"+el.parentElement.innerHTML+\"</div>\";\n \n });\n \n container.innerHTML = \"\";\n \n for (let index = 0; index < nResponse; index++) {\n \n var idCode = code();\n var HTML = \"\";\n var att = attribute;\n \n var value = response[index]['value'];\n var label = response[index]['label'];\n var inputValue = response[index]['input-value'];\n \n if (checked) { var att = attribute+\" checked\"; }\n \n if (HTML_CHECKED.search('value=\"'+value+'\"') == '-1') {\n \n HTML += \"<div class='form-check'>\";\n HTML += \"<input id='\"+idCode+\"' type='\"+type+\"' class='form-check-input' name='\"+name+\"' value='\"+value+\"' data-wi-check='true' \"+att+\" >\";\n HTML += \"<label class='form-check-label wi-check-label user-select-none' for='\"+idCode+\"'>\"+label+\"</label>\";\n HTML += \"</div>\";\n \n container.insertAdjacentHTML(\"beforeend\", HTML);\n \n }\n \n }\n\n container.insertAdjacentHTML(\"beforeend\", HTML_CHECKED);\n \n if (inputValue == '') {\n footer.innerHTML = \"Cerca risultati\";\n } else if (nResponse == 1) {\n footer.innerHTML = nResponse+\" risultato\";\n } else if (nResponse != 1) {\n footer.innerHTML = nResponse+\" risultati\";\n }\n \n } catch {\n\n console.log(array);\n footer.innerHTML = 'Errore nel file! Contatta assistenza';\n\n }\n\n}\n\nfunction inputSearch(event) {\n\n var inputText = event.target;\n\n var containerMaster = inputText.parentElement;\n var container = containerMaster.querySelector('.card .card-body');\n var footer = containerMaster.querySelector('.card .card-footer');\n\n var inputValue = inputText.value.toLowerCase();\n\n if (inputText.dataset.wiSearchUrl != undefined) {\n\n var url = inputText.dataset.wiSearchUrl;\n\n var footer = containerMaster.querySelector('.card .card-footer');\n footer.innerHTML = 'Cerco...';\n\n $.ajax({\n type: \"POST\",\n url: url,\n data: { \n post: 'true',\n search: inputValue\n }, \n success: function (data) {\n createCheckbox(data, inputText, container);\n checkInput();\n },\n error: function (XMLHttpRequest) {\n\n ajaxRequestError(XMLHttpRequest);\n footer.innerHTML = 'Errore! Riprova la ricerca.';\n\n }\n });\n \n } else {\n \n container.querySelectorAll('label.wi-check-label').forEach(element => {\n \n var container = element.parentElement;\n var name = element.innerHTML.toLowerCase();\n \n if (name.includes(inputValue)) {\n element.parentElement.style.display = 'block';\n } else if (container.querySelector('input').checked == false) {\n element.parentElement.style.display = 'none';\n }\n \n });\n\n }\n \n}\n\nfunction filterSelect(selectElement, dataName, value) {\n\n selectElement.querySelectorAll('option').forEach(option => {\n\n if (option.getAttribute('data-'+dataName)) {\n \n var filterValue = JSON.parse(option.getAttribute('data-'+dataName));\n\n if ((Array.isArray(filterValue) && filterValue.includes(value)) || filterValue == value) {\n\n option.disabled = false;\n option.hidden = false;\n\n } else {\n\n if (option.selected == true) {\n selectElement.value = \"\";\n }\n\n option.disabled = true;\n option.hidden = true;\n\n }\n\n }\n\n });\n \n}\n\nfunction createOptions( select, options ) {\n\n select.disabled = true;\n select.innerHTML = \"\";\n\n var selectAttribute = select.dataset.wiAttribute || '';\n var selectLabel = select.labels[0];\n\n var i = 0;\n\n for (var optionValue in options) {\n\n var optionLabel = options[optionValue];\n\n select[i] = new Option(optionLabel, optionValue);\n\n i++;\n\n }\n\n if (i === 0) {\n\n select.required = false;\n selectLabel.innerHTML = selectLabel.innerHTML.replace('*', '');\n\n } else {\n\n select.disabled = false;\n\n if (selectAttribute.indexOf('required') != '-1') { \n\n select.required = true;\n\n if (selectLabel.innerHTML.indexOf('*') == '-1') { \n selectLabel.innerHTML = selectLabel.innerHTML+'*' \n }\n\n }\n\n }\n\n}\n\nfunction inputError(input, error) {\n\n const container = input.closest('.form-floating, .input-group, .card').parentElement || input.parentElement;\n const feedback = container.querySelector('.invalid-feedback');\n \n if (feedback) {\n feedback.textContent = error;\n feedback.style.display = \"block\";\n }\n\n input.classList.add('is-invalid');\n input.setCustomValidity(error);\n\n}\n\nfunction removeInputError(input) {\n\n const container = input.closest('.form-floating, .input-group, .card').parentElement || input.parentElement;\n const feedback = container.querySelector('.invalid-feedback');\n \n if (feedback) {\n feedback.textContent = \"\";\n feedback.style.display = \"none\";\n }\n\n input.classList.remove('is-invalid');\n input.setCustomValidity(\"\");\n\n}\n"},9636(e){e.exports="function copyRow(container, element, callback) {\n\n element.querySelectorAll('input[type=\"file\"]').forEach(element => {\n\n FilePond.destroy(element.parentElement);\n\n });\n\n var copy = element.cloneNode(true);\n var position = container.childElementCount;\n var lineId = container.id+'_row_'+code(10);\n\n copy.id = lineId;\n copy.classList.remove('visually-hidden');\n copy.classList.add('wi-copy-row');\n copy.classList.add('order-'+position);\n\n if (copy.querySelector('input[name=\"position[]\"]')) {\n copy.querySelector('input[name=\"position[]\"]').value = position;\n }\n\n copy.querySelectorAll('[data-wi-attribute]').forEach(element => {\n\n var attribute = element.dataset.wiAttribute;\n\n if (attribute != '') {\n\n if (attribute.includes('required')) { element.required = true; }\n if (attribute.includes('disabled')) { element.disabled = true; }\n if (attribute.includes('readonly')) { element.readOnly = true; }\n if (attribute.includes('data-wi-sort-pos')) { \n element.dataset.wiSortPos = true; \n element.value = position;\n }\n\n }\n\n });\n\n // Inserisco la linea\n container.appendChild(copy);\n\n // Cambio gli Id degli input e li resetto\n var line = document.getElementById(lineId);\n line.querySelectorAll('input, select, textarea').forEach(element => {\n \n if (element.hasAttribute('data-select2-id')) { \n\n var c = element.parentElement;\n c.querySelector('span.select2').remove();\n \n $(element).select2('destroy');\n \n } else if (element.type == \"file\") {\n\n var name = element.name;\n element.name = name.replace(/-\\d+\\[\\]$/, `-${position}[]`);\n \n }\n\n element.id = 'input_'+code(10);\n\n });\n\n setInput(copy);\n checkInput();\n rowSetArrow(container);\n bootstrapTooltip();\n\n if (typeof callback === 'function') { callback(); }\n\n}\n\nfunction rowOrder(el1, action, callback) {\n\n var container = el1.parentElement;\n \n for (let a = 1; a < 100; a++) { \n \n var classEl1 = 'order-'+a;\n\n if(el1.classList.contains(classEl1)) {\n\n if (action == 'up') { var b = a - 1; } \n if (action == 'down') { var b = a + 1; }\n\n var classEl2 = 'order-'+b;\n\n var el2 = container.querySelector('.'+classEl2);\n\n rowChangePos(el1, a, b);\n rowChangePos(el2, b, a);\n\n rowSetArrow(container);\n\n break;\n\n }\n\n }\n\n if (typeof callback === 'function') { callback(); }\n\n}\n\nfunction rowChangePos(element, oldPosition, newPosition) {\n \n element.classList.remove('order-'+oldPosition);\n element.classList.add('order-'+newPosition);\n\n if (element.querySelector('[data-wi-sort-pos]')) {\n element.querySelector('[data-wi-sort-pos]').value = newPosition;\n } else if (element.querySelector('input[name=\"position[]\"]')) {\n element.querySelector('input[name=\"position[]\"]').value = newPosition;\n }\n \n}\n\nfunction rowRemoveModal(element, callback) {\n\n var container = element.parentElement;\n\n var text = 'Sei sicuro di voler eliminare questa linea?<br>Se <b>NON</b> salvi questa operazione non verrà effettuata!'\n modal(text, 'link');\n\n for (let a = 1; a < 100; a++) { \n\n var elementClass = 'order-'+a;\n if(element.classList.contains(elementClass)) { \n var orderN = a;\n break; \n }\n\n }\n\n var selector = '#'+container.id+' .'+elementClass;\n \n var onclick = 'rowRemove(\"'+selector+'\", \"'+orderN+'\")';\n if (typeof callback === 'function') { onclick += ';'+callback.name+'()'; }\n \n var sendBtn = document.querySelector('#modal button.send');\n sendBtn.setAttribute(\"onclick\", onclick);\n\n}\n\nfunction rowRemove(selector, nRow) {\n\n $('#modal').modal('hide');\n\n var element = document.querySelector(selector);\n var container = element.parentElement;\n var containerId = container.id;\n pageRemove(element);\n\n var rowStart = (nRow * 1) + 1;\n\n for (let a = rowStart; a < 100; a++) {\n\n var selector = '#'+containerId+' .order-'+a;\n\n if (document.querySelector(selector)) {\n var b = a - 1;\n rowChangePos(document.querySelector(selector), a, b);\n } else {\n break;\n }\n \n }\n\n rowSetArrow(container)\n\n}\n\nfunction rowSetArrow(container) {\n\n var nRow = document.querySelectorAll('#'+container.id+' .wi-copy-row').length;\n\n if (document.querySelector('#'+container.id+' .wi-copy-row.order-1 .wi-arrow-up') || document.querySelector('#'+container.id+' .wi-copy-row.order-1 .wi-arrow-down')) {\n\n if (nRow > 1) {\n\n for (let i = 1; i <= nRow; i++) {\n\n var arrowUp = document.querySelector('#'+container.id+' .wi-copy-row.order-'+i+' .wi-arrow-up');\n var arrowDown = document.querySelector('#'+container.id+' .wi-copy-row.order-'+i+' .wi-arrow-down');\n\n if (arrowUp.classList.contains('visually-hidden')) {\n arrowUp.classList.remove('visually-hidden');\n }\n\n if (arrowDown.classList.contains('visually-hidden')) {\n arrowDown.classList.remove('visually-hidden');\n }\n\n if (i == 1) {\n arrowUp.classList.add('visually-hidden');\n }\n\n if (i == nRow) {\n arrowDown.classList.add('visually-hidden');\n }\n \n }\n\n } else if (nRow == 1) {\n\n document.querySelector('#'+container.id+' .wi-copy-row.order-1 .wi-arrow-up').classList.add('visually-hidden');\n document.querySelector('#'+container.id+' .wi-copy-row.order-1 .wi-arrow-down').classList.add('visually-hidden');\n\n }\n\n }\n \n}"},1989(e){e.exports="function searchStates(inputCountry, stateValue = null) {\n var form = inputCountry.form;\n if (!form) return;\n // In una riga di repeater i nomi sono `riga[0][campo]`: la provincia è quella della stessa riga.\n var stateName = inputCountry.dataset.wiInputState;\n var rowState = /\\[[^\\[\\]]+\\]$/.test(inputCountry.name) ? inputCountry.name.replace(/\\[[^\\[\\]]+\\]$/, '[' + stateName + ']') : null;\n var selects = Array.from(form.querySelectorAll('select'));\n var wanted = rowState !== null ? rowState : stateName;\n var inputState = selects.find(function (field) { return field.name === wanted; });\n if (!inputState) return;\n var country = inputCountry.value || '';\n if (inputState.wiStateRequired === undefined) {\n inputState.wiStateRequired = inputState.required || /required/.test(inputState.dataset.wiAttribute || inputState.dataset.wiInputAttribute || '');\n }\n if (country === inputState.dataset.wiListStates && !inputState.wiStatesPending) {\n if (stateValue !== null) inputState.value = stateValue;\n return;\n }\n var request = (inputState.wiStatesRequest || 0) + 1;\n inputState.wiStatesRequest = request;\n inputState.value = '';\n inputState.wiStatesPending = country !== '';\n inputState.disabled = country !== '';\n if (country === '') {\n inputState.innerHTML = '';\n inputState.dataset.wiListStates = '';\n inputState.required = false;\n inputState.dispatchEvent(new Event('change', { bubbles: true }));\n return;\n }\n $.ajax({\n type: 'POST',\n url: typeof pathApi === 'string' && pathApi ? pathApi.replace(/\\/$/, '') + '/states/' : pathApp + '/api/states.php',\n data: { post: 'true', country: country },\n success: function (data) {\n if (request !== inputState.wiStatesRequest || inputCountry.value !== country) return;\n try { data = typeof data === 'string' ? JSON.parse(data) : data; }\n catch (error) { failure(error); return; }\n if (!data || typeof data !== 'object' || Array.isArray(data) && data.length) { failure(data); return; }\n inputState.innerHTML = '';\n var entries = Object.entries(data);\n if (entries.length) inputState.add(new Option('', ''));\n entries.forEach(function (entry) { inputState.add(new Option(entry[1], entry[0])); });\n inputState.value = stateValue !== null ? stateValue : '';\n inputState.dataset.wiListStates = country;\n inputState.wiStatesPending = false;\n inputState.disabled = false;\n inputState.required = inputState.wiStateRequired && entries.length > 0;\n inputState.dispatchEvent(new Event('change', { bubbles: true }));\n },\n error: failure\n });\n function failure(error) {\n if (request !== inputState.wiStatesRequest) return;\n inputState.wiStatesPending = false;\n inputState.disabled = false;\n if (typeof ajaxRequestError === 'function') ajaxRequestError(error);\n }\n}\n"},7741(e){e.exports="/*\n * Adapter della \"creazione rapida\" da campo FK (wonder-image/app).\n *\n * Il renderer del campo (tema Bootstrap del framework) stampa il \"+\" e il\n * modal; alla creazione della riga collegata emette un evento\n * `wi:quick-create:created` con { input, id, label, family, resource, item },\n * dove `item` è la riga appena salvata e `input` è\n * l'elemento bersaglio già risolto. Qui inseriamo+selezioniamo la nuova\n * opzione nei widget che questa lib possiede e che il framework, da solo, non\n * sa aggiornare:\n *\n * - selectSearch -> select2: aggiunge l'opzione e forza il re-render con\n * `.trigger('change')` (un change nativo non basta a far\n * ridisegnare la selezione).\n * - dynamicCheck -> card di checkbox/radio caricata via AJAX: appende una\n * `.form-check` spuntata nel `.card-body`, copiando nome e\n * tipo dall'input di ricerca.\n * - checkTree -> jstree: crea il nodo sotto il genitore (`item.parent_id`)\n * e lo spunta, se l'albero è a spunte.\n *\n * Vedi docs/app/concetti/form/quick-create.md del framework.\n */\n(function () {\n\n if (window.wiQuickCreateAdapters) { return; }\n window.wiQuickCreateAdapters = true;\n\n function hasOption(list, id) {\n return Array.prototype.some.call(list, function (el) {\n return String(el.value) === String(id);\n });\n }\n\n function fillSelect(select, id, label) {\n\n var $ = window.jQuery;\n var isSelect2 = !!($ && $.fn && $.fn.select2 && $(select).data('select2'));\n\n if (!hasOption(select.options, id)) {\n select.appendChild(new Option(label, id, false, false));\n }\n\n if (select.multiple) {\n var values = isSelect2 ? ($(select).val() || []) : Array.prototype.map.call(select.selectedOptions, function (o) { return o.value; });\n if (values.indexOf(String(id)) === -1) { values.push(String(id)); }\n if (isSelect2) { $(select).val(values); }\n else { Array.prototype.forEach.call(select.options, function (o) { if (o.value === String(id)) { o.selected = true; } }); }\n } else {\n if (isSelect2) { $(select).val(String(id)); }\n else { select.value = String(id); }\n }\n\n if (isSelect2) { $(select).trigger('change'); }\n else { select.dispatchEvent(new Event('change', { bubbles: true })); }\n }\n\n function fillDynamicCheck(container, id, label) {\n\n var search = container.querySelector('[data-wi-search-url]');\n var body = container.querySelector('.card .card-body');\n\n if (!search || !body) { return false; }\n\n var type = search.dataset.wiSearchRadio !== undefined ? 'radio' : 'checkbox';\n\n if (hasOption(body.querySelectorAll('input[type=\"' + type + '\"]'), id)) { return true; }\n\n var input = document.createElement('input');\n input.className = 'form-check-input';\n input.type = type;\n input.name = search.dataset.wiName || '';\n input.value = id;\n input.setAttribute('data-wi-check', 'true');\n input.checked = true;\n\n var text = document.createElement('label');\n text.className = 'form-check-label wi-check-label user-select-none';\n text.textContent = label;\n\n var wrap = document.createElement('div');\n wrap.className = 'form-check';\n wrap.appendChild(input);\n wrap.appendChild(document.createTextNode(' '));\n wrap.appendChild(text);\n body.appendChild(wrap);\n\n // Ri-arma validazione/contatori sui nuovi input (la stessa che gira a page-setup).\n if (typeof checkInput === 'function') { checkInput(); }\n\n return true;\n }\n\n /**\n * L'albero a spunte: jstree non rilegge il DOM da solo, il nodo va\n * creato con la sua API. Il nodo porta solo l'etichetta: la casella che\n * il salvataggio posta la scrive `setJsTreeValues()` (set.js) fuori\n * dall'albero, appena jstree segna la spunta.\n *\n * Il nodo nasce sotto il suo genitore (`item.parent_id`, la convenzione\n * degli alberi del framework) quando l'albero lo contiene, altrimenti in\n * cima. Solo gli alberi a spunte lo spuntano: in un albero a scelta\n * singola — il «padre» di un modal, per esempio — la voce nuova è una\n * possibilità in più, non la scelta.\n */\n function fillCheckTree(container, id, label, item) {\n\n var tree = container.querySelector('[data-wi-tree]');\n\n if (!tree || !window.jQuery || !window.jQuery(tree).jstree) { return false; }\n\n var istanza = window.jQuery(tree).jstree(true);\n\n if (!istanza) { return false; }\n\n var spunta = tree.getAttribute('data-wi-tree') !== 'radio';\n var chiave = String(id);\n\n if (!istanza.get_node(chiave)) {\n\n // Il nome arriva da chi l'ha scritto: nel testo del nodo va come\n // testo, non come HTML.\n var testo = document.createElement('span');\n testo.textContent = label;\n\n var genitore = item && item.parent_id !== undefined && item.parent_id !== null ? String(item.parent_id) : '';\n var padre = genitore !== '' && istanza.get_node(genitore) ? genitore : '#';\n\n if (istanza.create_node(padre, { id: chiave, text: testo.innerHTML }) === false) { return false; }\n\n if (padre !== '#') { istanza.open_node(padre); }\n\n }\n\n if (spunta) { istanza.check_node(chiave); }\n\n return true;\n }\n\n /** Ogni campo della pagina che elenca le righe di quella risorsa. */\n function widgetsDellaRisorsa(resource) {\n\n if (!resource) { return []; }\n\n return Array.prototype.slice.call(\n document.querySelectorAll('[data-wi-qc-resource=\"' + resource + '\"]')\n );\n }\n\n document.addEventListener('wi:quick-create:created', function (ev) {\n\n var detail = (ev && ev.detail) || {};\n var input = detail.input;\n\n // La riga nuova non appartiene al campo che l'ha creata: appartiene\n // alla risorsa. Ogni altro campo della pagina che elenca quelle\n // righe deve vedersela comparire — e il campo di partenza, quando è\n // un albero, per primo.\n var alberi = widgetsDellaRisorsa(detail.resource);\n\n if (input && input.nodeType && alberi.indexOf(input) === -1) { alberi.unshift(input); }\n\n alberi.forEach(function (widget) {\n if (widget.querySelector && widget.querySelector('[data-wi-tree]')) {\n fillCheckTree(widget, detail.id, detail.label, detail.item || {});\n }\n });\n\n if (!input || !input.nodeType) { return; }\n\n if (input.tagName === 'SELECT' && input.matches('[data-wi-select-search]')) {\n fillSelect(input, detail.id, detail.label);\n return;\n }\n\n if (input.querySelector && input.querySelector('[data-wi-search-url]')) {\n fillDynamicCheck(input, detail.id, detail.label);\n return;\n }\n\n });\n\n})();\n"},7676(e){e.exports="/*\n * L'isola di salvataggio del backend, per i `form[data-wi-save-bar]`.\n *\n * Quando i bottoni di invio escono dallo schermo, le loro copie compaiono in\n * un'isola fissa in basso; se il form ha modifiche non salvate l'isola mostra\n * \"Operazione non salvata\" e l'uscita dalla pagina chiede conferma. Sporco\n * vuol dire che la FormData di adesso e' diversa da quella di partenza.\n *\n * Un `a[data-wi-save-bar-cancel]` nella pagina aggiunge Annulla, verso il suo href.\n *\n * Il contratto sono gli attributi `data-wi-save-bar*`, `window.wiSaveBar` e\n * l'evento `wi:save-bar:change`; classi e `data-wi-state` sono interni.\n * L'avvio e' `setUpSaveBar()`, chiamato da `setUpPage()`.\n */\nfunction saveBarOff() {\n\n return false;\n\n}\n\n// Prima dell'avvio, e senza form tracciati, le funzioni non fanno nulla.\nvar saveBarLabels = {\n group: 'Barra di salvataggio',\n unsaved: 'Operazione non salvata',\n cancel: 'Annulla',\n confirmOther: 'Ci sono modifiche non salvate in un altro modulo della pagina. Continuare e perderle?'\n};\n\nwindow.wiSaveBar = {\n changed: saveBarOff,\n reset: saveBarOff,\n isDirty: saveBarOff,\n absorb: saveBarOff,\n labels: Object.assign({}, saveBarLabels)\n};\n\n// Le voci che il form spedirebbe adesso, in ordine e normalizzate.\nfunction formSnapshot(form, excludeSelector) {\n\n var inside = {}, outside = {}, sets = {}, numeric = {}, seen = {}, keys = [], names = [];\n\n // :disabled copre anche i campi di un fieldset disabilitato, come la riga eliminata del repeater.\n for (var el of form.elements) {\n if (!el.name || el.matches(':disabled')) continue;\n (el.closest(excludeSelector) ? inside : outside)[el.name] = true;\n sets[el.name] = sets[el.name] !== false && el.type === 'checkbox';\n (numeric[el.name] = numeric[el.name] || []).push(AutoNumeric.getAutoNumericElement(el));\n }\n\n new FormData(form).forEach((value, name) => {\n var index = seen[name] = (seen[name] || 0) + 1;\n if (inside[name] && !outside[name]) return;\n if (inside[name] && !formSnapshot.warned[name]) {\n formSnapshot.warned[name] = true;\n console.warn('wiSaveBar: il nome \"' + name + '\" sta dentro e fuori da una zona esclusa, quindi conta intero');\n }\n if (value instanceof File) {\n if (!value.name) return;\n value = [value.name, value.size, value.type];\n } else {\n var auto = numeric[name] && numeric[name][index - 1];\n if (auto && auto.getNumericString() != null) value = auto.getNumericString();\n }\n keys.push(JSON.stringify([name].concat(value)));\n names.push(name);\n });\n\n return { keys: keys, names: names, sets: sets };\n\n}\n\nformSnapshot.warned = {};\n\n// Conta l'ordine, tranne per i nomi fatti solo di checkbox, che valgono come insieme.\nfunction sameSnapshot(a, b) {\n\n var text = s => {\n var ordered = [], unordered = [];\n s.keys.forEach((key, i) => (s.sets[s.names[i]] ? unordered : ordered).push(key));\n return ordered.join('\\n') + '\\n\\n' + unordered.sort().join('\\n');\n };\n\n return text(a) === text(b);\n\n}\n\n// Il nuovo punto di partenza: da current solo i campi dentro container, il resto resta com'era.\nfunction absorbSnapshot(base, current, container) {\n\n var inside = {}, keys = [], names = [], rest = [];\n\n container.querySelectorAll('[name]').forEach(el => inside[el.name] = true);\n if (container.name) inside[container.name] = true;\n base.names.forEach((name, i) => { if (!inside[name]) rest.push(i); });\n current.names.forEach((name, i) => {\n if (inside[name]) { keys.push(current.keys[i]); names.push(name); }\n else if (rest.length) { var j = rest.shift(); keys.push(base.keys[j]); names.push(base.names[j]); }\n });\n rest.forEach(j => { keys.push(base.keys[j]); names.push(base.names[j]); });\n\n return { keys: keys, names: names, sets: current.sets };\n\n}\n\n// fn al massimo una volta per frame, mai dentro la chiamata.\nfunction frameScheduler(fn) {\n\n var queued = false;\n\n return () => {\n if (queued) return;\n queued = true;\n requestAnimationFrame(() => {\n queued = false;\n fn();\n });\n };\n\n}\n\n// La tabella degli stati dell'isola.\nfunction saveBarState(ready, submitting, dirty, outside) {\n\n if (submitting) return 'submitting';\n if (!ready) return 'hidden';\n if (outside) return dirty ? 'dirty-buttons' : 'buttons';\n return dirty ? 'dirty-label' : 'hidden';\n\n}\n\n// Un elemento con attributi e figli.\nfunction saveBarNode(tag, attrs, children) {\n\n var el = document.createElement(tag);\n\n Object.keys(attrs).forEach(name => el.setAttribute(name, attrs[name]));\n el.append(...(children || []));\n\n return el;\n\n}\n\n// Una copia pulita del bottone: dell'originale solo etichetta, classi btn* e disabled.\nfunction proxyButton(original) {\n\n var copy = saveBarNode('button', { type: 'button' });\n\n syncProxy(original, copy);\n\n return copy;\n\n}\n\n// La copia segue l'originale; l'etichetta si riscrive solo se cambia.\nfunction syncProxy(original, copy) {\n\n var template = document.createElement('template');\n\n if (original.tagName === 'INPUT') template.content.append(original.value);\n else template.innerHTML = original.innerHTML;\n template.content.querySelectorAll('*').forEach(el => [...el.attributes].forEach(attr => {\n if (attr.name === 'id' || attr.name.startsWith('data-')) el.removeAttribute(attr.name);\n }));\n if (copy.innerHTML !== template.innerHTML) copy.innerHTML = template.innerHTML;\n // Il nome accessibile di un bottone con la sola icona.\n ['aria-label', 'title'].forEach(name => original.hasAttribute(name) ? copy.setAttribute(name, original.getAttribute(name)) : copy.removeAttribute(name));\n copy.className = [...original.classList].filter(name => name.startsWith('btn') && name !== 'btn-check' || name === 'disabled').concat('wi-save-bar-btn').join(' ');\n copy.disabled = original.disabled || original.classList.contains('disabled') || original.getAttribute('aria-disabled') === 'true';\n\n}\n\n// L'avvio, una volta sola: chiamato da setUpPage() subito prima di loaded.\nfunction setUpSaveBar() {\n\n if (setUpSaveBar.started) return;\n setUpSaveBar.started = true;\n\n var EXCLUDE = '.modal, [data-wi-save-bar-ignore]';\n var SKIP = '.modal, .offcanvas, [data-wi-save-bar-ignore]';\n var BUTTONS = 'button, [type=submit], .wi-submit';\n var SIGNALS = ['input', 'change', 'click', 'keyup', 'FilePond:addfile', 'FilePond:removefile', 'FilePond:reorderfiles', 'FilePond:processfile', 'FilePond:processfilerevert', 'FilePond:updatefiles', 'wi-repeater-row-delete', 'wi-repeater-row-restore', 'wi:quick-create:created', 'autoNumeric:rawValueModified'];\n var INTERACTIONS = ['keydown', 'pointerdown', 'mousedown', 'touchstart', 'paste', 'drop', 'input', 'click'];\n var SCROLL = { capture: true, passive: true };\n var forms, active, labels, bar, actions, status, listed, io, ro, topbarHeight, band, interacted = false, seen = false, submitting = false;\n var copies = new Map(), hits = new Map(), recalcSoon = frameScheduler(recalc), renderSoon = frameScheduler(render);\n\n // Un argomento che non e' un Node (oggetto jQuery, Delta di Quill) vale come nessun argomento.\n var stateOf = el => el instanceof Node && forms.find(state => state.form === el.form || state.form.contains(el));\n\n function setDirty(state, dirty) {\n\n if (state.dirty === dirty) return;\n state.dirty = dirty;\n state.form.dispatchEvent(new CustomEvent('wi:save-bar:change', { bubbles: true, detail: { dirty: dirty } }));\n\n }\n\n function recalc() {\n\n forms.forEach(state => {\n var current = formSnapshot(state.form, EXCLUDE);\n // Prima dell'interazione ogni differenza diventa il punto di partenza; dopo, solo absorb().\n state.base = !state.base || !interacted ? current : state.absorb.reduce((base, el) => absorbSnapshot(base, current, el), state.base);\n state.absorb = [];\n setDirty(state, state.flag || !sameSnapshot(state.base, current));\n });\n // I bottoni del form attivo: le copie esistenti non si ricreano e non si spostano.\n if (listed !== active) {\n var list = [...active.form.elements].filter(el => (el.type === 'submit' || el.classList.contains('wi-submit')) && !el.closest(SKIP));\n var next = null;\n copies.forEach((item, original) => {\n if (list.includes(original)) return;\n item.copy.remove();\n item.observer.disconnect();\n io.unobserve(original);\n ro.unobserve(original);\n hits.delete(original);\n copies.delete(original);\n });\n list.reverse().forEach(original => {\n var item = copies.get(original);\n if (!item) {\n var copy = proxyButton(original);\n item = { copy: copy, observer: new MutationObserver(records => {\n syncProxy(original, copy);\n if (records.some(record => ['type', 'hidden', 'data-wi-save-bar-ignore'].includes(record.attributeName))) {\n listed = null;\n recalcSoon();\n }\n }) };\n copy.addEventListener('click', () => {\n if (!submitting) original.click();\n });\n item.observer.observe(original, { attributes: true, attributeFilter: ['disabled', 'aria-disabled', 'aria-label', 'title', 'class', 'type', 'hidden', 'data-wi-save-bar-ignore'], characterData: true, childList: true, subtree: true });\n actions.insertBefore(copy, next);\n copies.set(original, item);\n io.observe(original);\n ro.observe(original);\n }\n next = item.copy;\n });\n listed = active;\n }\n render();\n\n }\n\n function onInteraction(event) {\n\n if (!event.isTrusted || interacted) return;\n interacted = true;\n // input e click arrivano a valore gia' cambiato: il punto di partenza resta quello dell'ultimo frame.\n if (event.type !== 'input' && event.type !== 'click') forms.forEach(state => state.base = formSnapshot(state.form, EXCLUDE));\n\n }\n\n // Stato, inert e regione status seguono il form attivo; l'avviso di uscita tutti i form.\n function render() {\n\n // Un originale non ancora visto da IO si misura subito.\n var outside = [...copies].some(([original, item]) => {\n if (item.copy.hidden) return false;\n var rect = hits.get(original) !== false && original.getBoundingClientRect();\n return !(rect && rect.top >= topbarHeight - 1 && rect.bottom <= window.innerHeight - band + 1);\n });\n var state = saveBarState(!!active.base && (seen || !copies.size), submitting, active.dirty, outside);\n var text = state.startsWith('dirty') ? labels.unsaved : '';\n\n if (bar.getAttribute('data-wi-state') !== state) {\n // Prima di inert: il focus su una copia passa al suo originale.\n if (state === 'hidden' || state === 'dirty-label') copies.forEach((item, original) => {\n if (item.copy === document.activeElement) original.focus({ preventScroll: true });\n });\n bar.setAttribute('data-wi-state', state);\n // Il contenuto resta quello dell'ultimo stato visibile: niente scambio durante la dissolvenza.\n if (state !== 'hidden' && state !== 'submitting') bar.setAttribute('data-wi-face', state);\n bar.inert = state === 'hidden' || state === 'submitting';\n actions.inert = state === 'dirty-label';\n }\n if (status.textContent !== text) status.textContent = text;\n if (!submitting && forms.some(entry => entry.dirty)) window.addEventListener('beforeunload', preventPageExit);\n else window.removeEventListener('beforeunload', preventPageExit);\n\n }\n\n // Il form attivo e' l'ultimo toccato dall'utente.\n function onActivate(event) {\n\n var state = event.isTrusted && stateOf(event.target);\n\n if (!state || state === active) return;\n active = state;\n recalcSoon();\n\n }\n\n // Gira per ultimo: defaultPrevented e' gia' definitivo.\n function onSubmit(event) {\n\n var form = event.target, submitter = event.submitter, state = stateOf(form);\n var read = name => ((submitter && submitter.getAttribute('form' + name)) || form.getAttribute(name) || '').toLowerCase();\n\n if (event.defaultPrevented) return;\n // Un invio che naviga la finestra con un altro form sporco chiede conferma (Q3).\n if (read('target') !== '_blank' && read('method') !== 'dialog' && !submitting && forms.some(entry => entry !== state && entry.dirty)) {\n if (!confirm(labels.confirmOther)) {\n event.preventDefault();\n loadingSpinner(false);\n return;\n }\n submitting = true;\n }\n if (state) {\n state.flag = false;\n submitting = true;\n }\n render();\n\n }\n\n // IO dice solo chi tocca la zona tra topbar e fascia: finche' qualcuno la tocca si misura a ogni scroll.\n function onIntersect(entries) {\n\n entries.forEach(entry => {\n if (copies.has(entry.target)) hits.set(entry.target, entry.isIntersecting);\n });\n seen = true;\n if ([...hits.values()].includes(true)) window.addEventListener('scroll', renderSoon, SCROLL);\n else window.removeEventListener('scroll', renderSoon, SCROLL);\n renderSoon();\n\n }\n\n // La fascia dal token CSS e l'altezza della topbar: IO nuovo solo se cambiano.\n function readBand() {\n\n var match = getComputedStyle(document.documentElement).getPropertyValue('--wi-save-bar-band').trim().match(/^(\\d+(?:\\.\\d+)?)px$/);\n var topbar = document.getElementById('topbar');\n var top = topbar ? topbar.offsetHeight : 50;\n var size = match ? +match[1] : 96;\n // threshold 1 si blocca a 0,99 con DPR frazionari\n var create = () => new IntersectionObserver(onIntersect, { threshold: [0], rootMargin: '-' + top + 'px 0px -' + band + 'px 0px' });\n\n if (io && top === topbarHeight && size === band) return;\n if (io) io.disconnect();\n topbarHeight = top;\n band = size;\n try {\n io = create();\n } catch (error) {\n band = 96;\n io = create();\n }\n copies.forEach((item, original) => io.observe(original));\n\n }\n\n try {\n\n if (!(window.IntersectionObserver && window.ResizeObserver && window.MutationObserver && 'inert' in HTMLElement.prototype)) return;\n forms = [...document.querySelectorAll('form[data-wi-save-bar]')].map(form => {\n var flag = form.hasAttribute('data-wi-save-bar-dirty');\n return { form: form, base: null, flag: flag, dirty: flag, absorb: [] };\n });\n if (!forms.length) return;\n active = forms.find(state => state.flag) || forms[0];\n\n // .trigger() di jQuery non arriva ad addEventListener.\n $(document).on('input change', recalcSoon);\n\n // I testi si leggono adesso: il sito puo' averli cambiati dopo il caricamento.\n // Un oggetto sostituito in parte non deve stampare \"undefined\": i testi mancanti tornano quelli di base.\n labels = Object.assign(window.wiSaveBar.labels || (window.wiSaveBar.labels = {}), Object.assign({}, saveBarLabels, window.wiSaveBar.labels));\n // Annulla riusa il link \"indietro\" della pagina, se dichiarato: sta sempre prima delle copie.\n var back = document.querySelector('a[data-wi-save-bar-cancel][href]');\n actions = saveBarNode('div', { class: 'wi-save-bar-actions' }, back ? [saveBarNode('a', { class: 'btn btn-light wi-save-bar-cancel', href: back.getAttribute('href') }, [labels.cancel])] : []);\n bar = saveBarNode('div', { class: 'wi-save-bar', 'data-wi-state': 'hidden', 'data-wi-face': 'buttons', role: 'group', 'aria-label': labels.group, inert: '' }, [\n saveBarNode('div', { class: 'wi-save-bar-island' }, [\n saveBarNode('span', { class: 'wi-save-bar-label' }, [saveBarNode('i', { class: 'bi bi-circle-fill', 'aria-hidden': 'true' }), ' ' + labels.unsaved]),\n actions\n ])\n ]);\n status = saveBarNode('div', { class: 'visually-hidden', role: 'status' });\n document.body.append(bar, status);\n document.documentElement.classList.add('wi-save-bar-on');\n\n ro = new ResizeObserver(entries => {\n entries.forEach(entry => {\n var item = copies.get(entry.target);\n if (item) item.copy.hidden = !(entry.target.checkVisibility ? entry.target.checkVisibility() : entry.target.getClientRects().length > 0);\n });\n renderSoon();\n });\n readBand();\n window.addEventListener('resize', frameScheduler(() => {\n readBand();\n render();\n }));\n\n // Sempre un ricalcolo; l'elenco dei bottoni solo se la mutazione tocca un bottone o gli attributi type e ignore.\n var observer = new MutationObserver(records => {\n if (records.some(record => ['type', 'data-wi-save-bar-ignore'].includes(record.attributeName) || [...record.addedNodes, ...record.removedNodes].some(node => node.nodeType === 1 && (node.matches(BUTTONS) || node.querySelector(BUTTONS))))) listed = null;\n recalcSoon();\n });\n forms.forEach(state => observer.observe(state.form, { childList: true, subtree: true, attributes: true, attributeFilter: ['disabled', 'type', 'data-wi-save-bar-ignore'] }));\n SIGNALS.forEach(type => document.addEventListener(type, recalcSoon, true));\n INTERACTIONS.forEach(type => document.addEventListener(type, onInteraction, true));\n ['focusin', 'pointerdown', 'input'].forEach(type => document.addEventListener(type, onActivate, true));\n // Il listener in bolla torna in coda a ogni invio, come FormSubmitObserver di Turbo.\n window.addEventListener('submit', () => {\n window.removeEventListener('submit', onSubmit);\n window.addEventListener('submit', onSubmit);\n }, true);\n // Dalla bfcache dopo un invio si ricarica con una GET, mai con un nuovo POST.\n window.addEventListener('pageshow', event => {\n if (!event.persisted) return;\n if (!submitting) return recalcSoon();\n loadingSpinner(false);\n location.replace(location.href.split('#')[0]);\n });\n // Tastiera virtuale: si decide nel frame dopo focusout, cosi' tra due campi l'isola non ricompare.\n var coarse = matchMedia('(pointer: coarse)');\n var keyboardSoon = frameScheduler(() => {\n var el = document.activeElement;\n var typing = el.tagName === 'TEXTAREA' || el.isContentEditable || el.tagName === 'INPUT' && !/^(checkbox|radio|button|submit|reset|file|range|color)$/.test(el.type);\n bar.toggleAttribute('data-wi-save-bar-keyboard', typing && (coarse.matches || visualViewport.height < 0.75 * window.innerHeight));\n });\n ['focusin', 'focusout'].forEach(type => document.addEventListener(type, keyboardSoon, true));\n visualViewport.addEventListener('resize', keyboardSoon);\n\n Object.assign(window.wiSaveBar, {\n changed: el => {\n recalcSoon();\n return !!stateOf(el);\n },\n reset: form => {\n var state = stateOf(form);\n if (!state) return false;\n state.flag = false;\n state.base = formSnapshot(state.form, EXCLUDE);\n state.absorb = [];\n setDirty(state, false);\n render();\n return true;\n },\n isDirty: form => {\n var state = stateOf(form);\n return !!(state && state.dirty);\n },\n absorb: el => {\n var state = stateOf(el);\n if (!state) return false;\n state.absorb.push(el);\n recalcSoon();\n return true;\n }\n });\n recalcSoon();\n\n } catch (error) {\n console.error(error);\n }\n\n}\n"},9198(e){e.exports="async function formUpload(form, url, responseFunction = null) {\n \n var formData = new FormData(form);\n formData.append('post', 'true');\n\n await postData(url, formData).then((data) => {\n \n if (data != false) {\n if (typeof responseFunction === 'function') { responseFunction(data); }\n }\n\n });\n\n}"},1826(e){e.exports="// Sanitizza l'HTML del rich text editor (Quill) per prevenire XSS.\n// Quill 2.0.3 non valida l'HTML in input/export: DOMPurify rimuove script,\n// gestori di eventi e URI pericolosi mantenendo la formattazione consentita.\nfunction wiSanitizeHtml(html) {\n\n if (html == null) { return ''; }\n\n if (typeof window.DOMPurify !== 'undefined') {\n\n return window.DOMPurify.sanitize(html, {\n ALLOWED_TAGS: ['p', 'br', 'span', 'strong', 'b', 'em', 'i', 'u', 's', 'strike', 'del', 'ol', 'ul', 'li', 'a', 'blockquote'],\n ALLOWED_ATTR: ['href', 'target', 'rel', 'class']\n });\n\n }\n\n // Fallback fail-closed: se DOMPurify non è disponibile, rimuove ogni markup.\n var tmp = document.createElement('div');\n tmp.textContent = html;\n return tmp.innerHTML;\n\n}\n\n// Legge un valore `data-wi-*` scritto dal core con base64_encode(): i byte\n// sono UTF-8, e atob() da solo li restituirebbe uno per carattere, rovinando\n// le lettere accentate («perché» diventerebbe «perché»).\nfunction wiBase64DecodeUtf8(value) {\n\n if (value == null || value === '') { return ''; }\n\n return new TextDecoder().decode(Uint8Array.from(atob(value), c => c.charCodeAt(0)));\n\n}\n\nfunction setSearchInput(CONTAINER) {\n\n CONTAINER.querySelectorAll(\"[data-wi-search='true']\").forEach(element => {\n\n element.addEventListener(\"keyup\", inputSearch);\n element.addEventListener(\"change\", lengthCount);\n element.addEventListener(\"focusin\", lengthCount);\n element.addEventListener(\"focusout\", lengthCount);\n\n if (element.dataset.wiSearchUrl != undefined) { setDynamicSearch(element); }\n\n });\n \n}\n\nfunction setDynamicSearch(element) {\n\n var dataValue = element.dataset.wiValue;\n var containerMaster = element.parentElement;\n var container = containerMaster.querySelector('.card .card-body');\n var footer = containerMaster.querySelector('.card .card-footer');\n\n container.innerHTML = \"\";\n\n if (dataValue != '') {\n\n var value = dataValue;\n var url = element.dataset.wiSearchUrl;\n\n $.ajax({\n type: \"POST\",\n url: url,\n data: { \n post: 'true',\n id: value\n }, \n success: function (data) {\n createCheckbox(data, element, container, true);\n checkInput();\n // Il caricamento iniziale non e' una modifica dell'utente\n window.wiSaveBar?.absorb(element.closest('[id^=\"container-\"]'));\n },\n error: function (XMLHttpRequest) {\n\n ajaxRequestError(XMLHttpRequest);\n footer.innerHTML = 'Errore!';\n\n }\n });\n \n }\n\n}\n\nfunction setUploader(CONTAINER) {\n\n CONTAINER.querySelectorAll(\"[data-wi-uploader]\").forEach(uploader => {\n\n var id = uploader.id;\n var type = uploader.dataset.wiUploader;\n var dir = uploader.dataset.wiDir;\n var value = uploader.dataset.wiValue;\n var label = uploader.dataset.wiUploaderLabel;\n var maxSize = uploader.dataset.maxFileSize;\n var maxFiles = uploader.dataset.maxFiles;\n var sizeBefore = uploader.dataset.sizeBefore;\n var minSizeImage = uploader.dataset.minSizeImage;\n var accept = uploader.accept;\n\n if (accept === '' || accept === '*') {\n var validation = false;\n } else {\n var validation = true;\n }\n\n var files = [];\n \n if (value != \"\") {\n\n var value = JSON.parse(value);\n \n value.forEach(file => {\n\n var linkDowload = dir+file;\n var linkPoster = linkDowload;\n\n if (minSizeImage != \"\") {\n if (sizeBefore) {\n linkPoster = dir + minSizeImage + '-' + file;\n } else {\n const lastDot = file.lastIndexOf('.');\n const extension = lastDot !== -1 ? file.slice(lastDot + 1) : '';\n const name = lastDot !== -1 ? file.slice(0, lastDot) : file;\n linkPoster = dir + name + '-' +minSizeImage + (extension ? '.' + extension : '');\n }\n }\n \n var source = {\n source: linkDowload\n };\n\n files.push(source);\n\n });\n\n }\n\n if (type == 'classic') {\n\n var pond = FilePond.create(uploader, {\n storeAsFile: true,\n allowReorder: true,\n labelIdle: `Trascina `+label+` o <span class=\"filepond--label-action\">Cerca</span>`,\n files: files,\n allowDownloadByUrl: true,\n allowImagePreview: true,\n imagePreviewMaxFileSize: '128KB',\n allowFileTypeValidation: validation,\n allowFileSizeValidation: maxSize == '' ? false : true,\n maxFileSize: maxSize,\n labelMaxFileSizeExceeded: `File troppo grande`,\n labelMaxFileSize: `Dimensioni massime file {filesize}`,\n maxFiles: maxFiles,\n instantUpload: false,\n onaddfile: () => { check(); },\n onremovefile: () => { check(); }\n });\n \n } else if (type == 'profile') {\n\n var pond = FilePond.create(uploader, {\n storeAsFile: true,\n labelIdle: `Trascina `+label+` o <span class=\"filepond--label-action\">Cerca</span>`,\n imageCropAspectRatio: '1:1',\n stylePanelLayout: 'compact circle',\n styleLoadIndicatorPosition: 'center bottom',\n styleButtonRemoveItemPosition: 'center bottom',\n files: files,\n allowDownloadByUrl: true,\n allowImagePreview: true,\n imagePreviewMaxFileSize: '128KB',\n allowFileTypeValidation: validation,\n allowFileSizeValidation: maxSize == '' ? false : true,\n maxFileSize: maxSize,\n labelMaxFileSizeExceeded: `File troppo grande`,\n labelMaxFileSize: `Dimensioni massime file {filesize}`,\n maxFiles: maxFiles,\n instantUpload: false,\n onaddfile: () => { check(); },\n onremovefile: () => { check(); }\n });\n \n }\n\n if (pond && uploader.dataset.wiFileReferences === 'true') {\n setUploaderFileReferences(pond, files, value);\n }\n\n });\n\n}\n\nfunction setUploaderFileReferences(pond, files, storedNames) {\n const form = pond.element.closest('form');\n if (!form) { return; }\n\n const stored = new Map(files.map((file, index) => [file.source, storedNames[index]]));\n const prepared = new Map();\n pond.on('preparefile', (item, output) => prepared.set(item.id, output));\n pond.on('removefile', (error, item) => { if (!error && item) prepared.delete(item.id); });\n const serialize = event => {\n if (!pond.element.isConnected || pond.disabled || pond.element.closest('fieldset:disabled')) { return; }\n\n const name = pond.name;\n const base = name.replace(/\\[\\]$/, '');\n const manifestName = base.endsWith(']')\n ? base.replace(/\\]$/, '__wi_files]')\n : base + '__wi_files';\n const manifest = [];\n let uploadIndex = 0;\n\n event.formData.delete(name);\n pond.getFiles().forEach(item => {\n if (stored.has(item.source)) {\n manifest.push(stored.get(item.source));\n } else {\n const file = prepared.get(item.id) || item.file;\n manifest.push(uploadIndex++);\n event.formData.append(name, file, file.name || item.file.name);\n }\n });\n event.formData.set(manifestName, JSON.stringify(manifest));\n };\n\n form.addEventListener('formdata', serialize);\n pond.on('destroy', () => form.removeEventListener('formdata', serialize));\n}\n\nfunction setTextarea(CONTAINER) {\n\n CONTAINER.querySelectorAll(\"[data-wi-textarea]\").forEach(textarea => {\n\n var container = textarea.parentElement;\n var type = textarea.dataset.wiTextarea;\n\n var textareaId = textarea.id;\n var textareaValue = wiBase64DecodeUtf8(textarea.dataset.wiValue);\n\n // Creo l'editor\n var editorId = textareaId+'_editor';\n\n var editor = document.createElement(\"div\");\n editor.id = editorId;\n editor.classList.add('position-relative');\n editor.classList.add('float-start');\n editor.classList.add('w-100');\n editor.classList.add('h-auto');\n editor.classList.add('border');\n editor.style.maxHeight = '250px';\n\n if (type == 'base' || type == 'plus' || type == 'pro') {\n\n // Quill.js\n\n editor.classList.add('border-top-0');\n editor.classList.add('rounded-bottom');\n editor.classList.add('overflow-scroll');\n \n container.after(editor);\n\n var toolbarId = editorId+'_toolbar';\n\n if (type == 'base') {\n var option = [['bold', 'italic', 'underline', 'strike'], ['clean']];\n } else if (type == 'plus') {\n var option = [['bold', 'italic', 'underline', 'strike'], ['link'], ['clean']];\n } else if (type == 'pro') {\n var option = [['bold', 'italic', 'underline', 'strike'], ['link'], [{ list: 'ordered' }, { list: 'bullet' }], ['clean']];\n }\n\n var quill = new Quill('#'+editorId, {\n theme: 'snow',\n modules: {\n toolbar: option\n }\n });\n\n // Solo text-change, con qualsiasi sorgente; vuoto vale '' e non <p><br></p>\n quill.on('text-change', () => {\n textarea.value = quill.getLength() > 1 ? wiSanitizeHtml(editor.innerHTML) : '';\n window.wiSaveBar?.changed(textarea);\n });\n\n var col = container.parentElement;\n var toolbar = col.querySelector('.ql-toolbar');\n\n toolbar.id = toolbarId;\n toolbar.classList.add('position-relative');\n toolbar.classList.add('float-start');\n toolbar.classList.add('w-100');\n toolbar.classList.add('border');\n toolbar.classList.add('rounded-top');\n\n var editor = document.querySelector('#'+editorId+' .ql-editor');\n\n editor.innerHTML = wiSanitizeHtml(textareaValue.replace(\"'\", \"\\'\"));\n\n } else if (type == 'table' || type == 'blog') {\n\n // Editor.js\n\n EDITORJS_TOOLS_BLOG.image.config.additionalRequestHeaders.dir = textarea.dataset.wiFolder+'/images';\n EDITORJS_TOOLS_BLOG.gallery.config.additionalRequestHeaders.dir = textarea.dataset.wiFolder+'/images';\n EDITORJS_TOOLS_BLOG.attaches.config.additionalRequestHeaders.dir = textarea.dataset.wiFolder+'/files';\n\n editor.classList.add('wi-'+type);\n editor.classList.add('pt-3');\n editor.classList.add('rounded');\n editor.classList.add('overflow-scroll');\n\n container.after(editor);\n\n if (type == 'table') {\n \n if (textareaValue == null || textareaValue == '') {\n var data = '{\"blocks\":[{\"id\":\"O3rAzVD6s8\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"content\":[]}}]}';\n } else {\n var data = '{\"blocks\":'+textareaValue+'}';\n }\n\n var tools = EDITORJS_TOOLS_TABLE;\n\n } else if (type == 'blog') {\n\n editor.style.maxHeight = '500px';\n\n if (textareaValue == null || textareaValue == '') {\n var data = '{}';\n } else {\n var data = '{\"blocks\":'+textareaValue+'}';\n }\n\n var tools = EDITORJS_TOOLS_BLOG;\n \n }\n\n // Contenuto uguale all'avvio, a meno di id, time e version: torna il JSON originale\n var original = textarea.value;\n var initial = null;\n var normalize = (outputData) => JSON.stringify(outputData.blocks.map(({ id, ...block }) => block));\n\n var editorJs = new EditorJS({\n tools: tools,\n holder: editorId, \n autofocus: false,\n data: JSON.parse(data),\n onChange: (api) => {\n\n api.saver.save().then((outputData) => {\n var editorValue = normalize(outputData) === initial ? original : JSON.stringify(outputData.blocks);\n document.getElementById(textareaId).value = editorValue;\n window.wiSaveBar?.changed(textarea);\n }).catch((error) => {\n console.log('Saving failed: ', error)\n });\n\n },\n i18n: EDITORJS_i18n_IT\n });\n\n editorJs.isReady.then(() => editorJs.save()).then((outputData) => {\n initial = normalize(outputData);\n }).catch((error) => {\n console.log('Saving failed: ', error)\n });\n\n }\n\n });\n\n}\n\n/*\n * La voce principale di un albero a spunte, segnata con una stella.\n *\n * L'albero dichiara con `data-wi-tree-primary` il campo del form in cui sta\n * la voce principale (il framework: `InputCheckTree::primaryField()`). Qui\n * si tiene aggiornato: la prima spunta prende la stella, un clic sull'icona\n * di un'altra voce spuntata la sposta, e togliere la spunta alla principale\n * la passa alla prima rimasta. Le voci spuntate senza stella mostrano una\n * stella vuota, che dice dove cliccare.\n */\nfunction setJsTreePrimary(element) {\n\n var nome = element.dataset.wiTreePrimary;\n\n if (!nome || element.dataset.wiTree !== 'checkbox') { return; }\n\n var form = element.closest('form') || document;\n var campo = form.querySelector('[name=\"' + nome + '\"]');\n\n if (!campo) { return; }\n\n function albero() { return $(element).jstree(true); }\n\n function spuntate() {\n return albero().get_checked().map(String);\n }\n\n function dipingi() {\n\n var istanza = albero();\n var scelte = spuntate();\n var principale = String(campo.value || '');\n\n istanza.get_json('#', { flat: true }).forEach(function (voce) {\n\n var id = String(voce.id);\n var nodo = istanza.get_node(id);\n var icona = 'bi bi-folder';\n var titolo = '';\n\n if (id === principale) {\n icona = 'bi bi-star-fill text-warning';\n titolo = 'Categoria principale';\n } else if (scelte.indexOf(id) !== -1) {\n icona = 'bi bi-star text-body-secondary';\n titolo = 'Rendi principale';\n }\n\n istanza.set_icon(nodo, icona);\n nodo.a_attr = nodo.a_attr || {};\n nodo.a_attr.title = titolo;\n\n var ancora = istanza.get_node(id, true);\n if (ancora && ancora.length) { ancora.children('.jstree-anchor').attr('title', titolo); }\n });\n\n }\n\n function allinea() {\n\n var scelte = spuntate();\n var prima = String(campo.value || '');\n\n if (scelte.indexOf(prima) === -1) { campo.value = scelte.length ? scelte[0] : ''; }\n\n dipingi();\n\n if (String(campo.value || '') !== prima) {\n campo.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n }\n\n // Con la spunta legata alla selezione (`tie_selection`, il valore di\n // partenza di jstree) spuntare passa per `changed` e non per\n // `check_node`: si ascoltano tutti e due.\n $(element).on('ready.jstree changed.jstree check_node.jstree uncheck_node.jstree create_node.jstree', function () {\n allinea();\n });\n\n // L'icona di una voce spuntata sposta la stella senza togliere la spunta:\n // il clic si ferma qui e non arriva all'ancora, che la toglierebbe.\n $(element).on('click', '.jstree-themeicon', function (e) {\n\n var voce = this.closest('li');\n var id = voce ? String(voce.id) : '';\n\n if (id === '' || spuntate().indexOf(id) === -1) { return; }\n\n e.preventDefault();\n e.stopImmediatePropagation();\n\n if (String(campo.value || '') !== id) {\n campo.value = id;\n campo.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n dipingi();\n\n });\n\n}\n\n/*\n * Le caselle che il form posta per un albero a spunte.\n *\n * Stanno in `[data-wi-tree-values]`, accanto all'albero e fuori dal suo DOM\n * (il framework: `CheckTree`). Dentro ai nodi non reggerebbero: jstree\n * ridisegna un nodo dal suo HTML di partenza, con la spunta del server, e\n * chiudere un ramo toglie dal DOM i figli. Qui si riscrivono dalle spunte di\n * jstree a ogni cambio — clic, tastiera, API, nodi creati — e, se qualcosa\n * è cambiato, il contenitore manda un `change` nativo e si rifà `check()`.\n * Un albero a scelta singola tiene una sola spunta: l'ultima.\n *\n * Il markup di prima, con le caselle dentro ai nodi, si porta fuori prima\n * che jstree lo legga.\n */\nfunction setJsTreeValues(element) {\n\n var card = element.parentElement;\n var radio = element.dataset.wiTree === 'radio';\n var valori = null;\n\n Array.prototype.forEach.call(card.children, function (figlio) {\n if (!valori && figlio.hasAttribute('data-wi-tree-values')) { valori = figlio; }\n });\n\n var vecchie = element.querySelectorAll('input[name]');\n\n if (vecchie.length) {\n if (!valori) {\n valori = document.createElement('div');\n valori.className = 'd-none';\n valori.setAttribute('data-wi-tree-values', vecchie[0].getAttribute('name'));\n card.insertBefore(valori, element);\n }\n Array.prototype.forEach.call(vecchie, function (casella) { valori.appendChild(casella); });\n }\n\n if (!valori) { return; }\n\n var occupato = false;\n\n function nuovaCasella(id) {\n\n var modello = valori.querySelector('input[name]');\n var casella = document.createElement('input');\n\n casella.className = 'd-none';\n casella.type = 'checkbox';\n casella.name = valori.getAttribute('data-wi-tree-values') || (modello ? modello.getAttribute('name') : '');\n casella.value = id;\n casella.setAttribute('data-wi-check', 'true');\n\n return casella;\n }\n\n function allinea() {\n\n var istanza = $(element).jstree(true);\n\n if (occupato || !istanza) { return; }\n\n var scelte = istanza.get_checked().map(String);\n\n if (radio && scelte.length > 1) {\n occupato = true;\n try { istanza.uncheck_node(scelte.slice(0, -1)); } finally { occupato = false; }\n scelte = istanza.get_checked().map(String);\n }\n\n var cambiato = false;\n var presenti = {};\n\n Array.prototype.forEach.call(valori.querySelectorAll('input'), function (casella) {\n\n var id = String(casella.value);\n var spunta = scelte.indexOf(id) !== -1;\n\n presenti[id] = true;\n if (casella.checked !== spunta) { cambiato = true; }\n\n // Anche l'attributo: un reset del form non deve tornare alle\n // spunte del server mentre jstree mostra le altre.\n casella.checked = spunta;\n casella.defaultChecked = spunta;\n });\n\n scelte.forEach(function (id) {\n if (presenti[id]) { return; }\n var casella = nuovaCasella(id);\n valori.appendChild(casella);\n casella.checked = true;\n casella.defaultChecked = true;\n cambiato = true;\n });\n\n if (!cambiato) { return; }\n\n valori.dispatchEvent(new Event('change', { bubbles: true }));\n\n if (typeof check === 'function') { check(); }\n\n }\n\n $(element).on('ready.jstree changed.jstree check_node.jstree uncheck_node.jstree create_node.jstree delete_node.jstree refresh.jstree', function () {\n allinea();\n });\n\n // Dopo allinea(): le spunte del server non sono una modifica dell'utente\n $(element).on('ready.jstree', function () { window.wiSaveBar?.absorb(valori); });\n\n}\n\nfunction setJsTree(CONTAINER) {\n\n CONTAINER.querySelectorAll('[data-wi-tree]').forEach(element => {\n\n var container = element.parentElement;\n\n var type = element.dataset.wiTree;\n var searchBar = container.querySelector('[data-wi-search=\"true\"]');\n\n // Prima di jstree: l'evento `ready` va ascoltato prima che arrivi, e\n // le caselle del markup di prima vanno tolte dai nodi prima che\n // jstree le copi nel loro testo.\n setJsTreeValues(element);\n setJsTreePrimary(element);\n\n var Tree = $(element).jstree({\n core: {\n // Solo la creazione: un nodo nuovo deve poter arrivare dal\n // «+ Aggiungi» di un campo vicino. Spostare, copiare,\n // rinominare e cancellare restano chiusi, come prima.\n check_callback: function (operation) { return operation === 'create_node'; },\n // A scelta singola un clic su un'altra voce sposta la spunta.\n multiple: type !== 'radio'\n },\n checkbox : {\n keep_selected_style: false,\n three_state: false,\n },\n types : {\n default : {\n icon : \"bi bi-folder\"\n }\n },\n plugins : [ \"checkbox\", \"types\", \"search\" ]\n });\n\n Tree.jstree('open_all');\n\n if (searchBar != undefined) {\n $(searchBar).keyup(function () {\n var v = $(searchBar).val();\n $(Tree).jstree(true).search(v);\n });\n }\n\n });\n\n}\n\nfunction setCheckBoolean(CONTAINER) {\n \n CONTAINER.querySelectorAll('[data-wi-check-boolean]').forEach(element => {\n\n var inputTrue = element.querySelector('input.wi-true');\n var labelTrue = inputTrue.labels[0];\n var inputFalse = element.querySelector('input.wi-false');\n var labelFalse = inputFalse.labels[0];\n\n inputTrue.addEventListener(\"change\", (el) => {\n\n var checked = el.target.checked;\n\n if (checked) { \n inputFalse.checked = false; \n labelFalse.classList.remove('btn-primary'); \n labelTrue.classList.add('btn-primary'); \n } else {\n labelTrue.classList.remove('btn-primary'); \n }\n\n });\n\n inputFalse.addEventListener(\"change\", (el) => {\n\n var checked = el.target.checked;\n\n if (checked) { \n inputTrue.checked = false; \n labelTrue.classList.remove('btn-primary'); \n labelFalse.classList.add('btn-primary'); \n } else {\n labelFalse.classList.remove('btn-primary'); \n }\n\n });\n\n\n });\n\n}\n\n/**\n * L'immagine, l'icona o il colore di un'opzione di Select2.\n *\n * Un `<option>` non contiene HTML: il framework mette il segno in\n * `data-wi-image`, `data-wi-icon` o `data-wi-color`, e qui diventa un nodo\n * davanti al testo (costruito a mano, niente HTML dall'attributo).\n */\nfunction select2OptionVisual(state) {\n\n var data = (state && state.element && state.element.dataset) ? state.element.dataset : {};\n var mark = null;\n\n if (data.wiImage) {\n mark = document.createElement('img');\n mark.src = data.wiImage;\n mark.alt = '';\n mark.width = 16;\n mark.height = 16;\n mark.className = 'rounded-1 me-2 wi-option-visual';\n mark.style.objectFit = 'cover';\n } else if (data.wiIcon && /^bi-[a-z0-9-]+$/.test(data.wiIcon)) {\n mark = document.createElement('i');\n mark.className = 'bi ' + data.wiIcon + ' me-2 wi-option-visual';\n } else if (data.wiColor) {\n mark = document.createElement('i');\n mark.className = 'bi bi-circle-fill me-2 wi-option-visual';\n mark.style.color = data.wiColor;\n }\n\n if (!mark) { return state.text; }\n\n mark.setAttribute('aria-hidden', 'true');\n\n var node = document.createElement('span');\n node.appendChild(mark);\n node.appendChild(document.createTextNode(state.text));\n\n return node;\n\n}\n\nfunction setSelect2(CONTAINER) {\n \n CONTAINER.querySelectorAll('[data-wi-select-search]').forEach(element => {\n\n if ($(element).parents('.modal').length !== 0) {\n var parent = $(element).parents('.modal');\n } else {\n var parent = document.getElementById('content');\n }\n \n var multiple = (element.dataset.wiSelectSearchMultiple == 'true') ? true : false;\n\n $(element).select2({\n theme: 'bootstrap4',\n language: 'it',\n multiple: multiple,\n width: 'style',\n dropdownParent: parent,\n dropdownCssClass: 'card-body border dropdown-menu',\n templateResult: select2OptionVisual,\n templateSelection: select2OptionVisual\n }).on(\"change\", function(e) {\n\n check();\n\n if (element.dataset.wiInputCountry) { \n searchStates(element);\n }\n\n });\n\n });\n \n}\n\nfunction setInput(container = document) {\n\n setGoogleMapsApi(container);\n setSearchInput(container);\n setTextarea(container);\n setUploader(container);\n setJsTree(container);\n setCheckBoolean(container);\n setSelect2(container);\n setIconPicker(container);\n setConditional(container);\n\n // Anche le righe aggiunte dopo il caricamento (repeater, <template>)\n // hanno prezzi e numeri formattati: i campi già avviati si saltano.\n setAutonumeric(container);\n\n}\n"},9221(e){e.exports="function jqueryDaterange() {\n \n $('.wi-daterange-filter').datepicker({\n format: 'dd/mm/yyyy',\n language: 'it', \n orientation: 'bottom left'\n });\n\n}\n\nfunction setUpJquery() {\n \n jqueryDaterange();\n\n}"},7642(e){e.exports="// Bootstrap adapter for wi.confirm and wi.modal.open/close; modal() is the legacy alias.\nvar wiConfirmCount = 0;\n\nfunction wiModalNode(tag, className, text) {\n var node = document.createElement(tag);\n if (className) node.className = className;\n if (text != null) node.textContent = text;\n return node;\n}\n\nfunction wiModalElement(id) {\n id = String(id == null ? '' : id).replace(/^#/, '');\n return id === '' ? null : document.getElementById(id);\n}\n\nfunction wiModalTitle(element, title) {\n var target = element.querySelector('[data-wi-modal-title]');\n if (target) target.textContent = String(title);\n}\n\nfunction wiConfirmBootstrap(options) {\n\n if (!window.bootstrap || !bootstrap.Modal) return window.confirm(options.text);\n\n return new Promise(function (resolve) {\n\n var id = 'wi-confirm-' + (++wiConfirmCount);\n var root = wiModalNode('div', 'modal fade wi-confirm');\n root.id = id;\n root.tabIndex = -1;\n root.setAttribute('aria-labelledby', id + '-title');\n root.setAttribute('aria-describedby', id + '-text');\n options.className.split(/\\s+/).filter(Boolean).forEach(function (name) { root.classList.add(name); });\n\n var dialog = wiModalNode('div', 'modal-dialog modal-dialog-centered');\n var content = wiModalNode('div', 'modal-content');\n\n var header = wiModalNode('div', 'modal-header');\n var title = wiModalNode('h1', 'modal-title fs-5', options.title);\n title.id = id + '-title';\n title.setAttribute('data-wi-modal-title', '');\n var close = wiModalNode('button', 'btn-close');\n close.type = 'button';\n close.setAttribute('data-bs-dismiss', 'modal');\n close.setAttribute('aria-label', options.cancel);\n header.append(title, close);\n\n var body = wiModalNode('div', 'modal-body', options.text);\n body.id = id + '-text';\n body.style.whiteSpace = 'pre-line';\n\n var footer = wiModalNode('div', 'modal-footer');\n var cancel = wiModalNode('button', 'btn btn-' + (options.cancelVariant || 'dark'), options.cancel);\n cancel.type = 'button';\n cancel.setAttribute('data-bs-dismiss', 'modal');\n var ok = wiModalNode('button', 'btn btn-' + options.variant, options.ok);\n ok.type = 'button';\n footer.append(cancel, ok);\n\n content.append(header, body, footer);\n dialog.append(content);\n root.append(dialog);\n document.body.append(root);\n\n var confirmed = false;\n var returnFocus = options.trigger || document.activeElement;\n var instance = new bootstrap.Modal(root);\n\n ok.addEventListener('click', function () { confirmed = true; instance.hide(); });\n root.addEventListener('shown.bs.modal', function () {\n (options.variant === 'danger' ? cancel : ok).focus();\n });\n // Resolve after the fade: the confirmed action may open another modal.\n root.addEventListener('hidden.bs.modal', function () {\n instance.dispose();\n root.remove();\n if (returnFocus && returnFocus.isConnected && typeof returnFocus.focus === 'function') returnFocus.focus({ preventScroll: true });\n resolve(confirmed);\n });\n\n instance.show();\n\n });\n\n}\n\nwindow.wi = window.wi || {};\nwi.modal = wi.modal || {};\n\n/**\n * Opens a Bootstrap modal by id (\"x\" or \"#x\"); options.title goes into its [data-wi-modal-title].\n * @returns {boolean} false when the modal or Bootstrap is missing.\n */\nwi.modal.open = function (id, options) {\n var element = wiModalElement(id);\n if (!element || !window.bootstrap || !bootstrap.Modal) return false;\n if (options && options.title != null) wiModalTitle(element, options.title);\n bootstrap.Modal.getOrCreateInstance(element).show();\n return true;\n};\n\n/** Closes a Bootstrap modal by id (\"x\" or \"#x\"). */\nwi.modal.close = function (id) {\n var element = wiModalElement(id);\n if (!element || !window.bootstrap || !bootstrap.Modal) return false;\n var instance = bootstrap.Modal.getInstance(element);\n if (instance) instance.hide();\n return true;\n};\n\nif (wi.confirm) wi.confirm.adapter = wiConfirmBootstrap;\n\n/**\n * Asks for confirmation and then sends a POST to link with ajaxRequest.\n * The text is shown as plain text (markup is stripped, <br> becomes a line break).\n *\n * @deprecated Use wi.confirm() or the data-wi-confirm attribute.\n * @returns {Promise<boolean>}\n */\nfunction modal(text, link, title = 'ATTENZIONE', sendText = 'Elimina', sendColor = 'danger', closeText = 'Chiudi', closeColor = 'dark', onSuccess = 'reloadPage', params = null) {\n\n var plain = new DOMParser().parseFromString(String(text == null ? '' : text), 'text/html');\n plain.querySelectorAll('br').forEach(function (br) { br.replaceWith('\\n'); });\n\n return wi.confirm({\n text: plain.body.textContent,\n title: title,\n ok: sendText,\n cancel: closeText,\n variant: sendColor,\n cancelVariant: closeColor\n }).then(function (confirmed) {\n\n if (!confirmed) return false;\n\n // Same arguments the legacy onclick attribute passed (params as a string).\n if (onSuccess == 'reloadPage') {\n ajaxRequest(link);\n } else {\n ajaxRequest(link, onSuccess, String(params));\n }\n\n return true;\n\n });\n\n}\n"},5071(e){e.exports="function menu() { \n\n var el = document.getElementById('sidebar');\n el.classList.toggle(\"show\");\n\n var el = document.getElementById('menu');\n\n var iconMenu = el.querySelector('.open-menu');\n var iconClose = el.querySelector('.close-menu');\n\n if (iconMenu.classList.contains('d-none')) {\n\n // Chiudo il menu\n iconMenu.classList.remove('d-none');\n iconClose.classList.add('d-none');\n\n $('.offcanvas').offcanvas('hide');\n \n } else {\n\n // Apro il menu\n iconClose.classList.remove('d-none');\n iconMenu.classList.add('d-none');\n\n if (document.querySelector('#sidebar li.active [data-bs-target]')) {\n var offcanvasId = document.querySelector('#sidebar li.active [data-bs-target]').dataset.bsTarget;\n $(offcanvasId).offcanvas('show');\n }\n\n }\n \n}\n\n// Senza argomento alterna, come prima; true accende e false spegne.\nfunction loadingSpinner(show) {\n\n document.getElementById('loading-spinner').classList.toggle('d-none', show === undefined ? undefined : !show);\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}'},3740(e){e.exports="// wi.confirm() and the delegated data-wi-confirm listener (a, button, form).\n// The theme's modal.js sets wi.confirm.adapter; without one, window.confirm is used.\n(function () {\n\n var wi = window.wi = window.wi || {};\n if (typeof wi.confirm === 'function' && typeof wi.confirm.setRenderer === 'function') return;\n\n var KEYS = {\n title: 'components.confirm.title',\n text: 'components.confirm.text',\n ok: 'components.buttons.confirm',\n cancel: 'components.buttons.cancel'\n };\n\n // Used only while the site's translations do not define KEYS.\n var FALLBACK = {\n it: { title: 'Conferma', text: 'Vuoi procedere?', ok: 'Conferma', cancel: 'Annulla' },\n en: { title: 'Confirm', text: 'Do you want to continue?', ok: 'Confirm', cancel: 'Cancel' },\n es: { title: 'Confirmar', text: '¿Quieres continuar?', ok: 'Confirmar', cancel: 'Cancelar' },\n fr: { title: 'Confirmer', text: 'Voulez-vous continuer ?', ok: 'Confirmer', cancel: 'Annuler' }\n };\n\n var renderer = null;\n var pending = new WeakSet();\n var passing = null;\n\n function translate(name) {\n var provider = window.TranslationProvider, value = null;\n if (provider && typeof provider.getNestedValue === 'function') {\n value = provider.getNestedValue(provider.translations || {}, KEYS[name]);\n if (value == null) value = provider.getNestedValue(provider.defaultTranslations || {}, KEYS[name]);\n }\n if (typeof value === 'string' && value !== '') return value;\n var lang = (document.documentElement.lang || 'it').slice(0, 2).toLowerCase();\n return (FALLBACK[lang] || FALLBACK.en)[name];\n }\n\n function text(value) {\n return value == null ? '' : String(value).trim();\n }\n\n function variant(value) {\n value = text(value);\n return /^[a-z][a-z0-9-]*$/i.test(value) ? value : '';\n }\n\n function normalize(options) {\n if (typeof options === 'string') options = { text: options };\n options = options || {};\n return {\n text: text(options.text) || translate('text'),\n title: text(options.title) || translate('title'),\n ok: text(options.ok) || translate('ok'),\n cancel: text(options.cancel) || translate('cancel'),\n variant: variant(options.variant) || 'primary',\n cancelVariant: variant(options.cancelVariant),\n className: text(options.className),\n trigger: options.trigger instanceof Element ? options.trigger : null\n };\n }\n\n function nativeConfirm(options) {\n return window.confirm(options.text);\n }\n\n /**\n * Asks the user to confirm an action.\n *\n * @param {string|{text?: string, title?: string, ok?: string, cancel?: string, variant?: string, cancelVariant?: string, className?: string, trigger?: Element}} options\n * @returns {Promise<boolean>} true only when the user confirms.\n */\n function confirmAction(options) {\n var data = normalize(options);\n var render = renderer || confirmAction.adapter || nativeConfirm;\n return new Promise(function (resolve) { resolve(render(data)); }).then(Boolean, function (error) {\n console.error(error);\n return false;\n });\n }\n\n /**\n * Replaces the dialog. fn(options) receives the normalized options and returns\n * a boolean or a Promise<boolean>; pass null to restore the theme's dialog.\n */\n confirmAction.setRenderer = function (fn) {\n renderer = typeof fn === 'function' ? fn : null;\n };\n\n confirmAction.adapter = null;\n\n wi.confirm = confirmAction;\n\n function attr(element, name) {\n var value = element.getAttribute(name ? 'data-wi-confirm-' + name : 'data-wi-confirm');\n return value == null ? undefined : value;\n }\n\n function optionsFrom(element, form, submitter) {\n var method = (submitter && submitter.getAttribute('formmethod')) || (form && form.getAttribute('method')) || '';\n method = method.toLowerCase();\n return {\n text: attr(element),\n title: attr(element, 'title'),\n ok: attr(element, 'ok'),\n cancel: attr(element, 'cancel'),\n variant: attr(element, 'variant') || (method === 'post' || method === 'delete' ? 'danger' : undefined),\n className: attr(element, 'class'),\n trigger: submitter || element\n };\n }\n\n function ask(element, options, proceed) {\n if (pending.has(element)) return;\n pending.add(element);\n confirmAction(options).then(function (confirmed) {\n pending.delete(element);\n if (!confirmed || !element.isConnected) return;\n passing = element;\n try { proceed(); } finally { passing = null; }\n });\n }\n\n // Capture phase: the confirmation precedes inline onclick/onsubmit handlers and navigation.\n document.addEventListener('click', function (event) {\n if (!(event.target instanceof Element)) return;\n var element = event.target.closest('a[data-wi-confirm], button[data-wi-confirm]');\n if (!element || element === passing) return;\n event.preventDefault();\n event.stopImmediatePropagation();\n var form = element.tagName === 'BUTTON' && element.type === 'submit' ? element.form : null;\n ask(element, optionsFrom(element, form, form ? element : null), function () { element.click(); });\n }, true);\n\n document.addEventListener('submit', function (event) {\n var form = event.target;\n if (!(form instanceof HTMLFormElement) || !form.hasAttribute('data-wi-confirm')) return;\n var submitter = event.submitter || null;\n // Already confirmed by its own data-wi-confirm.\n if (form === passing || (submitter && submitter === passing)) return;\n event.preventDefault();\n event.stopImmediatePropagation();\n ask(form, optionsFrom(form, form, submitter), function () {\n if (typeof form.requestSubmit !== 'function') form.submit();\n else if (submitter && submitter.isConnected && submitter.form === form) form.requestSubmit(submitter);\n else form.requestSubmit();\n });\n }, true);\n\n})();\n"},6944(e){e.exports='async function postData(url, data) {\n\n loadingSpinner();\n\n if (data === undefined) {\n\n console.error("Non è stato passato alcun dato alla funzione postData()");\n alertToast(800);\n\n } else {\n \n var form = (data instanceof FormData === false) ? createPostData(data) : data;\n\n return await fetch(url, {\n method: "POST",\n body: form\n })\n .then((response) => { \n\n if (response.ok) {\n\n return response.json().catch((error) => { \n\n console.error("Il file non risponde in JSON!");\n throw new Error(802);\n\n });\n\n } else {\n\n console.error("Impossibile connettersi o trovare il file!");\n throw new Error(802);\n\n }\n \n })\n .then((value) => { \n \n if (value.status == 200) {\n\n loadingSpinner(); \n return value;\n\n } else if (value.status == 401) {\n\n throw new Error(911);\n\n } else if (value.status) {\n\n throw new Error(value.status);\n \n } else {\n\n console.error("La risposta deve avere il seguente formato: ", {\n success: true,\n status:\t200,\n response: {}\n });\n\n throw new Error(803);\n\n }\n\n })\n .catch((error) => { \n \n loadingSpinner(); \n alertToast(error.message); \n\n })\n\n }\n\n}\n\nfunction createPostData(array = {}) {\n\n var data = new FormData();\n\n Object.keys(array).forEach(key => {\n data.append(key, array[key]);\n });\n\n return data;\n\n}\n\n// Vecchie funzioni\nfunction 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}'},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 // AutoNumeric non parte se decimali e migliaia hanno lo stesso segno:\n // vince il decimale chiesto dal campo e le migliaia restano senza separatore.\n if (option.decimalCharacter != undefined && option.decimalCharacter === option.digitGroupSeparator) {\n option.digitGroupSeparator = '';\n }\n\n // Con la virgola decimale anche il punto (quello del tastierino) scrive i decimali.\n if (option.decimalCharacter != undefined && option.decimalCharacter !== '.') {\n option.decimalCharacterAlternative = '.';\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(container = document) {\n \n container.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 container.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 container.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}"},1367(e){e.exports='function wiConditionalControls(field, name) {\n\n var scope = field.form || document;\n var controls = [];\n var normalizedName = String(name || "").replace(/\\[\\]$/, "");\n\n scope.querySelectorAll("[name]").forEach(function(control) {\n var controlName = String(control.name || "").replace(/\\[\\]$/, "");\n\n if (controlName === normalizedName) { controls.push(control); }\n });\n\n return controls;\n\n}\n\nfunction wiConditionalDriverValues(field, name) {\n\n var values = [];\n var controls = wiConditionalControls(field, name);\n var hasValueControl = controls.some(function(control) {\n return (control.type || "").toLowerCase() !== "hidden";\n });\n\n controls.forEach(function(control) {\n\n var type = (control.type || "").toLowerCase();\n\n if (type === "hidden" && hasValueControl) { return; }\n\n if (type === "radio" || type === "checkbox") {\n if (control.checked) { values.push(String(control.value)); }\n return;\n }\n\n if (control.multiple && control.options) {\n Array.from(control.options).forEach(function(option) {\n if (option.selected) { values.push(String(option.value)); }\n });\n return;\n }\n\n if (control.value !== undefined && control.value !== "") {\n values.push(String(control.value));\n }\n\n });\n\n return values;\n\n}\n\nfunction wiConditionalDriverValue(field, name) {\n\n var values = wiConditionalDriverValues(field, name);\n\n return values.length ? values[values.length - 1] : "";\n\n}\n\nfunction wiConditionalWrapper(field) {\n\n var explicit = field.closest("[data-wi-conditional-container]");\n if (explicit) { return explicit; }\n\n var row = field.closest("[data-wi-input-row]");\n if (row) { return row; }\n\n var wonder = field.closest(".wi-input-container");\n if (wonder) {\n var wonderParent = wonder.parentElement;\n\n if (field.form && wonderParent && wonderParent.parentElement === field.form && wonderParent.children.length === 1) {\n return wonderParent;\n }\n\n return wonder;\n }\n\n var floating = field.closest(".form-floating");\n if (floating) { return floating.parentElement || floating; }\n\n var bootstrap = field.closest(\'[id^="container-"]\');\n if (bootstrap) { return bootstrap.parentElement || bootstrap; }\n\n var group = field.closest("[data-wi-date-range], [data-wi-date-time-range], .input-group");\n if (group) { return group.parentElement || group; }\n\n return field.parentElement;\n\n}\n\nfunction wiSetConditionalVisibility(field, show) {\n\n var wrapper = wiConditionalWrapper(field);\n\n if (!field.dataset.wiConditionalRequired) {\n field.dataset.wiConditionalRequired = field.required ? "required" : "optional";\n }\n\n field.required = show && field.dataset.wiConditionalRequired === "required";\n\n if (!wrapper) { return; }\n\n if (!wrapper.dataset.wiConditionalDisplayCaptured) {\n wrapper.dataset.wiConditionalDisplayCaptured = "1";\n wrapper.dataset.wiConditionalDisplay = wrapper.style.display || "";\n wrapper.dataset.wiConditionalAriaHidden = wrapper.getAttribute("aria-hidden") || "";\n wrapper.dataset.wiConditionalAriaHiddenPresent = wrapper.hasAttribute("aria-hidden") ? "1" : "0";\n }\n\n if (show) {\n wrapper.style.display = wrapper.dataset.wiConditionalDisplay || "";\n\n if (wrapper.dataset.wiConditionalAriaHiddenPresent === "1") {\n wrapper.setAttribute("aria-hidden", wrapper.dataset.wiConditionalAriaHidden);\n } else {\n wrapper.removeAttribute("aria-hidden");\n }\n\n wrapper.removeAttribute("data-wi-conditional-hidden");\n return;\n }\n\n wrapper.style.display = "none";\n wrapper.setAttribute("aria-hidden", "true");\n wrapper.setAttribute("data-wi-conditional-hidden", "true");\n\n}\n\nfunction wiEvaluateConditional() {\n\n document.querySelectorAll("[data-visible-when], [data-hidden-when]").forEach(function(field) {\n\n var isVisibleRule = field.hasAttribute("data-visible-when");\n var name = isVisibleRule ? field.dataset.visibleWhen : field.dataset.hiddenWhen;\n var list = (isVisibleRule ? field.dataset.visibleWhenValues : field.dataset.hiddenWhenValues) || "";\n var expected = list.split(",").map(function(item) { return item.trim(); });\n var current = wiConditionalDriverValues(field, name);\n\n if (!current.length) { current = [""]; }\n\n var matches = current.some(function(value) { return expected.indexOf(value) !== -1; });\n var show = isVisibleRule ? matches : !matches;\n\n wiSetConditionalVisibility(field, show);\n\n });\n\n if (typeof check === "function") { check(); }\n\n}\n\nfunction setConditional(container = document) {\n\n var selector = "[data-visible-when], [data-hidden-when]";\n var fields = Array.from(container.querySelectorAll(selector));\n\n if (container.matches && container.matches(selector)) {\n fields.unshift(container);\n }\n\n if (!fields.length) { return; }\n\n fields.forEach(function(field) {\n\n var name = field.dataset.visibleWhen || field.dataset.hiddenWhen;\n if (!name) { return; }\n\n wiConditionalControls(field, name).forEach(function(control) {\n if (control.wiConditionalBound === true) { return; }\n\n control.wiConditionalBound = true;\n control.dataset.wiConditionalBound = "1";\n control.addEventListener("change", wiEvaluateConditional);\n control.addEventListener("input", wiEvaluateConditional);\n });\n\n });\n\n wiEvaluateConditional();\n\n}\n'},7059(e){e.exports="function setRequired(element, required = true) {\n \n labelAsterisk(element, required);\n\n element.required = required;\n\n}\n\nfunction setDisabled(element, disabled = true) {\n \n labelAsterisk(element, disabled ? false : true);\n\n if (disabled) {\n if (element.type === 'checkbox' || element.type === 'radio') { element.checked = false; }\n }\n\n element.disabled = disabled;\n\n}\n\nfunction labelAsterisk(input, asterisk = true)\n{\n\n if (input.labels) {\n \n var label = input.labels[0];\n var labelValue = label.innerHTML;\n var hasAsterisk = (labelValue.substring(labelValue.length - 1) == '*') ? true : false;\n \n if (asterisk) {\n if (!hasAsterisk) { label.innerHTML = labelValue+'*'; }\n } else {\n if (hasAsterisk) { label.innerHTML = labelValue.replace('*', ''); }\n }\n\n }\n\n}\n\nfunction changeInputId(el) \n{\n\n const idEl = 'field_' + code(10).toLowerCase();\n const labelEl = el.parentElement.querySelector('.wi-label, .wi-checkbox-label');\n\n if (labelEl !== null) {\n el.id = idEl;\n labelEl.htmlFor = idEl;\n }\n\n}"},3883(e){e.exports="function isInternationalPhone(value) {\n\n return /^\\s*(\\+|00)/.test(String(value || ''));\n\n}\n\nfunction formatPhone(value, trimEnd) {\n\n value = String(value || '');\n\n // Numero nazionale: solo cifre, al massimo 10, a gruppi 3-3-4.\n if (!isInternationalPhone(value)) {\n var digits = value.replace(/\\D/g, '').slice(0, 10);\n return [digits.slice(0, 3), digits.slice(3, 6), digits.slice(6, 10)]\n .filter(Boolean)\n .join(' ');\n }\n\n // Numero internazionale (+ o 00): prefisso e gruppi come digitati, al massimo 15 cifre.\n var result = /^\\s*\\+/.test(value) ? '+' : '';\n var count = 0;\n var separator = false;\n\n value.replace(/^\\s*\\+/, '').split('').forEach(function (character) {\n if (!/\\d/.test(character)) {\n separator = count > 0;\n return;\n }\n\n if (count >= 15) { return; }\n\n if (separator) { result += ' '; }\n result += character;\n separator = false;\n count++;\n });\n\n if (separator && !trimEnd && count < 15) { result += ' '; }\n\n return result;\n\n}\n\nfunction checkPhone(element) {\n\n if (!element || element.dataset.wiPhoneInitialized === 'true') { return; }\n element.dataset.wiPhoneInitialized = 'true';\n\n var format = function (event) {\n var cursor = typeof element.selectionStart === 'number' ? element.selectionStart : null;\n var atEnd = cursor !== null && cursor >= element.value.length;\n var digitsBeforeCursor = cursor === null\n ? null\n : element.value.slice(0, cursor).replace(/[^\\d+]/g, '').length;\n var value = formatPhone(element.value, !event || event.type === 'change');\n\n if (element.value !== value) { element.value = value; }\n\n if (digitsBeforeCursor !== null && typeof element.setSelectionRange === 'function') {\n var position = atEnd ? value.length : 0;\n var digitsSeen = 0;\n while (!atEnd && position < value.length && digitsSeen < digitsBeforeCursor) {\n if (/[\\d+]/.test(value[position])) { digitsSeen++; }\n position++;\n }\n element.setSelectionRange(position, position);\n }\n };\n\n element.addEventListener('input', format);\n element.addEventListener('change', format);\n format();\n\n}\n"},8743(e){e.exports="/**\n *\n * INDIRIZZI CON GOOGLE PLACES\n *\n * Suggerimenti sotto il campo della via (Places API New) e riempimento dei campi\n * fratelli: civico, CAP, città, nazione, provincia, place ID e coordinate.\n * Il campo resta sempre libero: Google è solo un aiuto.\n *\n * Markup: <input name=\"<p>street\" data-wi-place=\"<p>\">; i fratelli si cercano per nome\n * dentro [data-wi-place-scope] o la form. Con <p> che finisce per \"[\" (repeater) la riga\n * si legge dal nome della via e i nomi diventano riga + chiave + \"]\".\n *\n */\n\nvar wiPlacesLoading = null;\nvar wiPlacesCount = 0;\nvar WI_PLACE_TYPES = [ 'street_address', 'premise', 'subpremise', 'route' ];\nvar WI_PLACE_LOGO = 'https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3_hdpi.png';\n\nfunction wiPlaceFieldName(prefix, key) {\n\n return prefix.endsWith('[') ? prefix + key + ']' : prefix + key;\n\n}\n\n// Componenti di Places API (New) (longText/shortText) o del formato vecchio (long_name/short_name).\nfunction wiPlaceParse(components) {\n\n const out = { street: '', number: '', cap: '', city: '', country: '', l1s: '', l1l: '', l2s: '', l2l: '' };\n const city = {};\n\n for (const component of components || []) {\n\n const long = component.longText ?? component.long_name ?? '';\n const short = component.shortText ?? component.short_name ?? '';\n const types = component.types || [];\n const first = (key, value) => { if (!out[key]) { out[key] = value; } };\n\n if (types.includes('route')) { first('street', long); }\n if (types.includes('street_number')) { first('number', long); }\n if (types.includes('postal_code')) { first('cap', long); }\n if (types.includes('country')) { first('country', short.toUpperCase()); }\n if (types.includes('administrative_area_level_1')) { first('l1s', short); first('l1l', long); }\n if (types.includes('administrative_area_level_2')) { first('l2s', short); first('l2l', long); }\n for (const type of [ 'locality', 'postal_town', 'administrative_area_level_3' ]) {\n if (types.includes(type) && !city[type]) { city[type] = long; }\n }\n\n }\n\n out.city = city.locality || city.postal_town || city.administrative_area_level_3 || '';\n\n return out;\n\n}\n\nfunction wiPlaceNormalize(text) {\n\n return String(text ?? '').normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase().replace(/\\s+/g, ' ').trim();\n\n}\n\n// options: [[chiave, nome], ...]. Ordine: chiave level_2, chiave level_1, nome level_2, nome level_1.\nfunction wiPlaceMatchState(options, parsed) {\n\n const byKey = key => key ? options.find(([ value ]) => String(value).toUpperCase() === String(key).toUpperCase()) : null;\n const byName = name => {\n const wanted = wiPlaceNormalize(name);\n return wanted ? options.find(([ , label ]) => wiPlaceNormalize(label) === wanted) : null;\n };\n\n const found = byKey(parsed.l2s) || byKey(parsed.l1s) || byName(parsed.l2l) || byName(parsed.l1l);\n\n return found ? String(found[0]) : '';\n\n}\n\nfunction wiPlaceCoord(value) {\n\n return String(parseFloat(Number(value).toFixed(7)));\n\n}\n\nfunction wiPlaceLink(lat, lng, id) {\n\n return 'https://www.google.com/maps/search/?api=1&query=' + wiPlaceCoord(lat) + ',' + wiPlaceCoord(lng) + '&query_place_id=' + encodeURIComponent(id);\n\n}\n\nfunction wiPlaceApiKey() {\n\n return typeof GOOGLE_API_KEY !== 'undefined' && GOOGLE_API_KEY ? GOOGLE_API_KEY : '';\n\n}\n\n// Una sola libreria per pagina; se il caricamento fallisce resta null e i campi restano normali.\nfunction wiPlacesLibrary() {\n\n if (!wiPlacesLoading) {\n\n wiPlacesLoading = (async () => {\n const language = document.documentElement.lang || null;\n if (!(typeof google !== 'undefined' && google.maps && google.maps.importLibrary)) {\n await requireGoogleMaps([], { language });\n }\n return await google.maps.importLibrary('places');\n })().catch(error => {\n console.warn('Google Places non disponibile:', error);\n return null;\n });\n\n }\n\n return wiPlacesLoading;\n\n}\n\nfunction wiPlacesInit(container = document) {\n\n if (!wiPlaceApiKey()) { return; }\n\n const root = container && container.querySelectorAll ? container : document;\n const inputs = Array.from(root.querySelectorAll('input[data-wi-place], input[data-wi-search-place]')).filter(input => !input.wiPlace);\n\n if (!inputs.length) { return; }\n\n wiPlacesLibrary().then(library => {\n if (!library) { return; }\n inputs.forEach(input => { if (!input.wiPlace) { wiPlaceAttach(input, library); } });\n });\n\n}\n\n// Nomi vecchi: avviano il motore nuovo.\nfunction setGoogleMapsApi(container = document) { wiPlacesInit(container); }\nfunction initGoogleMapsPlace() { wiPlacesInit(document); }\n\n/**\n *\n * Campi di un indirizzo\n *\n */\n\nfunction wiPlaceFields(input) {\n\n const legacy = input.dataset.wiPlace === undefined;\n const declared = legacy ? '' : input.dataset.wiPlace;\n // Riga di repeater: la riga viene dal nome della via, che il repeater riscrive nelle righe nuove.\n const row = declared.endsWith('[') && /\\[[^\\[\\]]+\\]$/.test(input.name);\n const prefix = row ? input.name.replace(/[^\\[\\]]+\\]$/, '') : declared;\n const scope = input.closest('[data-wi-place-scope]') || input.form || document;\n const named = Array.from(scope.querySelectorAll('[name]'));\n const byName = name => name ? named.find(el => el.name === name && el.type !== 'radio') || null : null;\n const name = key => wiPlaceFieldName(prefix, key);\n\n const countryName = name('country');\n const country = named.find(el => el.name === countryName && el.tagName === 'SELECT')\n || Array.from(scope.querySelectorAll('[data-wi-name]')).find(el => el.dataset.wiName === countryName + '-text')\n || byName(countryName);\n\n // Nel repeater data-wi-input-state è il nome della colonna, come lo legge searchStates().\n const stateKey = country && country.dataset.wiInputState;\n const stateName = stateKey ? (row ? name(stateKey) : stateKey) : name('province');\n const province = named.find(el => el.name === stateName && el.tagName === 'SELECT')\n || Array.from(scope.querySelectorAll('[data-wi-name]')).find(el => el.dataset.wiName === stateName + '-text')\n || byName(stateName);\n\n return {\n scope,\n legacy,\n street: input,\n number: byName(name('number')),\n cap: byName(name('cap')),\n city: byName(name('city')),\n country,\n province,\n placeId: byName(input.dataset.wiPlaceId || name('place_id')),\n lat: byName(name('lat')),\n lng: byName(name('lng')),\n link: byName(input.dataset.wiPlaceLink || '')\n };\n\n}\n\n// Una lista di testo ha l'input visibile con data-wi-name=\"<nome>-text\" e i radio <nome>.\nfunction wiPlaceRadios(fields, el) {\n\n const name = el.dataset.wiName && el.dataset.wiName.endsWith('-text') ? el.dataset.wiName.slice(0, -5) : null;\n\n return name ? Array.from(fields.scope.querySelectorAll('input[type=\"radio\"]')).filter(radio => radio.name === name) : null;\n\n}\n\nfunction wiPlaceValue(fields, el) {\n\n if (!el) { return ''; }\n const radios = el.tagName === 'SELECT' ? null : wiPlaceRadios(fields, el);\n if (radios) { return (radios.find(radio => radio.checked) || {}).value || ''; }\n\n return el.value;\n\n}\n\nfunction wiPlaceOptions(fields, el) {\n\n if (!el) { return []; }\n if (el.tagName === 'SELECT') {\n return Array.from(el.options).filter(option => option.value !== '').map(option => [ option.value, option.textContent.trim() ]);\n }\n const radios = wiPlaceRadios(fields, el);\n\n return radios ? radios.map(radio => [ radio.value, radio.dataset.wiName || radio.value ]) : null;\n\n}\n\nfunction wiPlaceEmit(el) {\n\n el.dispatchEvent(new Event('input', { bubbles: true }));\n el.dispatchEvent(new Event('change', { bubbles: true }));\n\n}\n\n/**\n *\n * Aggancio di un input\n *\n */\n\nfunction wiPlaceAttach(input, library) {\n\n const fields = wiPlaceFields(input);\n const listId = 'wi-place-list-' + (++wiPlacesCount);\n const state = { library, fields, token: null, seq: 0, timer: null, items: [], active: -1, writing: false, open: false };\n\n input.wiPlace = state;\n\n if (fields.legacy) {\n input.disabled = false;\n // Il campo abilitato da Places non è una modifica dell'utente\n window.wiSaveBar?.absorb(input);\n }\n\n const list = document.createElement('ul');\n list.id = listId;\n list.className = 'wi-place-list';\n list.setAttribute('role', 'listbox');\n list.hidden = true;\n input.insertAdjacentElement('afterend', list);\n state.list = list;\n\n input.setAttribute('autocomplete', 'off');\n input.setAttribute('role', 'combobox');\n input.setAttribute('aria-autocomplete', 'list');\n input.setAttribute('aria-expanded', 'false');\n input.setAttribute('aria-controls', listId);\n\n input.addEventListener('input', () => {\n if (state.writing) { return; }\n wiPlaceClearGeo(state);\n clearTimeout(state.timer);\n state.seq++;\n state.timer = setTimeout(() => wiPlaceSearch(input), 250);\n });\n\n input.addEventListener('keydown', event => wiPlaceKeydown(input, event));\n input.addEventListener('blur', () => wiPlaceClose(input));\n\n for (const key of [ 'number', 'cap', 'city' ]) {\n fields[key]?.addEventListener('input', () => { if (!state.writing) { wiPlaceClearGeo(state); } });\n }\n if (fields.country) {\n const onCountry = () => { if (!state.writing) { wiPlaceClearGeo(state); } };\n if (typeof jQuery !== 'undefined') { jQuery(fields.country).on('change', onCountry); }\n else { fields.country.addEventListener('change', onCountry); }\n }\n\n}\n\nfunction wiPlaceRegion(input) {\n\n const fields = input.wiPlace.fields;\n\n // Nel markup vecchio il paese nascosto è la scelta precedente, non un limite.\n if (fields.country && !fields.legacy) {\n const iso = wiPlaceValue(fields, fields.country);\n return iso ? [ iso.toLowerCase() ] : [];\n }\n\n try {\n const restriction = JSON.parse(input.dataset.wiRestriction || '{}');\n const country = restriction && restriction.country;\n return (Array.isArray(country) ? country : country ? [ country ] : []).map(code => String(code).toLowerCase());\n } catch (error) {\n return [];\n }\n\n}\n\nasync function wiPlaceSearch(input) {\n\n const state = input.wiPlace;\n const text = input.value.trim();\n const seq = state.seq;\n\n if (text.length < 3) { wiPlaceClose(input); return; }\n\n if (!state.token) { state.token = new state.library.AutocompleteSessionToken(); }\n\n const request = { input: text, sessionToken: state.token, includedPrimaryTypes: WI_PLACE_TYPES };\n const language = document.documentElement.lang;\n const region = wiPlaceRegion(input);\n if (language) { request.language = language; }\n if (region.length) { request.includedRegionCodes = region; }\n\n let suggestions = [];\n try {\n ({ suggestions } = await state.library.AutocompleteSuggestion.fetchAutocompleteSuggestions(request));\n } catch (error) {\n console.warn('Google Places:', error);\n }\n\n if (seq !== state.seq) { return; }\n\n state.items = (suggestions || []).map(suggestion => suggestion.placePrediction).filter(Boolean).slice(0, 5);\n wiPlaceRender(input);\n\n}\n\nfunction wiPlaceRender(input) {\n\n const state = input.wiPlace;\n const list = state.list;\n\n list.replaceChildren();\n state.active = -1;\n input.removeAttribute('aria-activedescendant');\n\n if (!state.items.length) { wiPlaceClose(input); return; }\n\n state.items.forEach((prediction, index) => {\n\n const option = document.createElement('li');\n option.id = list.id + '-' + index;\n option.className = 'wi-place-option';\n option.setAttribute('role', 'option');\n option.setAttribute('aria-selected', 'false');\n\n const main = document.createElement('strong');\n main.textContent = prediction.mainText?.text ?? prediction.text?.text ?? '';\n option.append(main);\n\n if (prediction.secondaryText?.text) {\n const secondary = document.createElement('small');\n secondary.textContent = prediction.secondaryText.text;\n option.append(secondary);\n }\n\n // mousedown non toglie il fuoco all'input, così il blur non chiude la lista\n option.addEventListener('mousedown', event => event.preventDefault());\n option.addEventListener('click', () => wiPlaceChoose(input, index));\n list.append(option);\n\n });\n\n const logo = document.createElement('li');\n logo.className = 'wi-place-logo';\n logo.setAttribute('role', 'presentation');\n logo.innerHTML = '<img src=\"' + WI_PLACE_LOGO + '\" alt=\"powered by Google\" height=\"14\">';\n list.append(logo);\n\n list.style.top = (input.offsetTop + input.offsetHeight) + 'px';\n list.style.left = input.offsetLeft + 'px';\n list.style.width = input.offsetWidth + 'px';\n list.hidden = false;\n input.classList.add('wi-place-open');\n state.open = true;\n input.setAttribute('aria-expanded', 'true');\n\n}\n\nfunction wiPlaceClose(input) {\n\n const state = input.wiPlace;\n if (!state) { return; }\n\n state.open = false;\n state.active = -1;\n state.list.hidden = true;\n input.classList.remove('wi-place-open');\n input.setAttribute('aria-expanded', 'false');\n input.removeAttribute('aria-activedescendant');\n\n}\n\nfunction wiPlaceActivate(input, index) {\n\n const state = input.wiPlace;\n const options = state.list.querySelectorAll('.wi-place-option');\n\n state.active = (index + options.length) % options.length;\n options.forEach((option, i) => {\n option.classList.toggle('wi-place-option--active', i === state.active);\n option.setAttribute('aria-selected', i === state.active ? 'true' : 'false');\n });\n input.setAttribute('aria-activedescendant', options[state.active].id);\n\n}\n\nfunction wiPlaceKeydown(input, event) {\n\n const state = input.wiPlace;\n if (!state.open) { return; }\n\n if (event.key === 'ArrowDown') { event.preventDefault(); wiPlaceActivate(input, state.active + 1); }\n else if (event.key === 'ArrowUp') { event.preventDefault(); wiPlaceActivate(input, state.active < 0 ? -1 : state.active - 1); }\n else if (event.key === 'Escape') { event.preventDefault(); wiPlaceClose(input); }\n else if (event.key === 'Enter') {\n // Con la lista aperta Invio sceglie e non invia la form\n event.preventDefault();\n if (state.active >= 0) { wiPlaceChoose(input, state.active); } else { wiPlaceClose(input); }\n }\n\n}\n\n/**\n *\n * Scelta di un suggerimento\n *\n */\n\nasync function wiPlaceChoose(input, index) {\n\n const state = input.wiPlace;\n const prediction = state.items[index];\n const seq = state.seq;\n\n wiPlaceClose(input);\n if (!prediction) { return; }\n\n let place;\n try {\n place = prediction.toPlace();\n await place.fetchFields({ fields: [ 'addressComponents', 'location', 'id' ] });\n } catch (error) {\n console.warn('Google Places:', error);\n return;\n } finally {\n state.token = null;\n }\n\n if (seq !== state.seq) { return; }\n\n const parsed = wiPlaceParse(place.addressComponents);\n\n if (state.fields.legacy) {\n wiPlaceApplyLegacy(input, place, parsed, prediction);\n } else {\n await wiPlaceApply(input, place, parsed);\n }\n\n}\n\nfunction wiPlaceWrite(state, el, value) {\n\n if (!el) { return; }\n value = String(value ?? '');\n if (el.value === value) { return; }\n\n state.writing = true;\n try {\n el.value = value;\n wiPlaceEmit(el);\n } finally {\n state.writing = false;\n }\n\n}\n\nfunction wiPlaceClearGeo(state) {\n\n const { placeId, lat, lng, link } = state.fields;\n [ placeId, lat, lng, link ].forEach(el => wiPlaceWrite(state, el, ''));\n\n}\n\nfunction wiPlaceSetCountry(state, iso, provinceKey) {\n\n const { country } = state.fields;\n\n state.writing = true;\n try {\n if (typeof setCountryState === 'function' && (country.tagName === 'SELECT' || wiPlaceRadios(state.fields, country))) {\n // Frontend: select o lista di testo, con la provincia tenuta da parte\n setCountryState(country, iso, provinceKey);\n } else {\n // Backend: la select2 e searchStates ascoltano il change\n country.value = iso;\n wiPlaceEmit(country);\n }\n } finally {\n state.writing = false;\n }\n\n}\n\nfunction wiPlaceSetProvince(state, key) {\n\n const { province } = state.fields;\n\n if (province.tagName !== 'SELECT' && wiPlaceRadios(state.fields, province) && typeof textListValue === 'function') {\n textListValue(province, key);\n return;\n }\n\n wiPlaceWrite(state, province, key);\n\n}\n\nfunction wiPlaceStatesReady(province, iso, timeout = 5000) {\n\n return new Promise(resolve => {\n const start = Date.now();\n const tick = () => {\n if (province.dataset.wiListStates === iso && !province.disabled) { resolve(true); return; }\n if (Date.now() - start >= timeout) { resolve(false); return; }\n setTimeout(tick, 50);\n };\n tick();\n });\n\n}\n\nasync function wiPlaceApply(input, place, parsed) {\n\n const state = input.wiPlace;\n const fields = state.fields;\n const iso = parsed.country;\n let countryOk = !fields.country;\n let countryChanged = false;\n\n // 1. Nazione (con la provincia di level_2 tenuta da parte)\n if (fields.country && iso) {\n const options = wiPlaceOptions(fields, fields.country);\n countryOk = options === null || options.some(([ value ]) => value === iso);\n if (countryOk && wiPlaceValue(fields, fields.country) !== iso) {\n wiPlaceSetCountry(state, iso, parsed.l2s);\n countryChanged = true;\n }\n }\n\n // 2-5. Via, civico (resta quello scritto se Google non lo dà), CAP, città\n wiPlaceWrite(state, fields.street, parsed.street || input.value);\n if (parsed.number) { wiPlaceWrite(state, fields.number, parsed.number); }\n wiPlaceWrite(state, fields.cap, parsed.cap);\n wiPlaceWrite(state, fields.city, parsed.city);\n\n // 7. Geo\n const id = place.id || '';\n const location = place.location;\n if (location) {\n const lat = typeof location.lat === 'function' ? location.lat() : location.lat;\n const lng = typeof location.lng === 'function' ? location.lng() : location.lng;\n wiPlaceWrite(state, fields.placeId, id);\n wiPlaceWrite(state, fields.lat, wiPlaceCoord(lat));\n wiPlaceWrite(state, fields.lng, wiPlaceCoord(lng));\n wiPlaceWrite(state, fields.link, id ? wiPlaceLink(lat, lng, id) : '');\n } else {\n wiPlaceWrite(state, fields.placeId, id);\n }\n\n // 6. Provincia: chiave level_2, level_1, poi per nome; se la nazione è cambiata, a caricamento finito\n if (fields.province && countryOk) {\n if (countryChanged || fields.province.disabled) {\n const seq = state.seq;\n const ready = await wiPlaceStatesReady(fields.province, iso);\n if (!ready || seq !== state.seq) { return; }\n }\n const key = wiPlaceMatchState(wiPlaceOptions(fields, fields.province) || [], parsed);\n if (key && wiPlaceValue(fields, fields.province) !== key) { wiPlaceSetProvince(state, key); }\n }\n\n}\n\n// Markup vecchio: un solo input con i 6 campi nascosti data-wi-spi accanto.\nfunction wiPlaceApplyLegacy(input, place, parsed, prediction) {\n\n const state = input.wiPlace;\n const callback = input.dataset.wiCallback;\n\n if (callback && typeof window[callback] === 'function') {\n const components = (place.addressComponents || []).map(component => ({\n long_name: component.longText, short_name: component.shortText, types: component.types\n }));\n window[callback](input, { getPlace: () => ({ address_components: components, geometry: { location: place.location } }) });\n return;\n }\n\n const container = input.parentElement;\n const spi = key => container.querySelector('[data-wi-spi=\"' + key + '\"]');\n const values = { country: parsed.country, province: parsed.l2s, cap: parsed.cap, city: parsed.city, street: parsed.street, number: parsed.number };\n\n for (const key in values) {\n const el = spi(key);\n if (el) { el.value = values[key]; }\n }\n\n wiPlaceWrite(state, input, prediction.text?.text ?? input.value);\n\n}\n"},6338(e){e.exports='// Loader dell\'API Google Maps JS (Dynamic Library Import) + marker builder di default.\n// Uso: await requireGoogleMaps([\'maps\', \'places\', \'marker\']); poi inizializzare la mappa.\nasync function requireGoogleMaps(libs = [ \'maps\', \'places\', \'marker\' ], options = {}) {\n\n const {\n key = (typeof GOOGLE_API_KEY !== \'undefined\' ? GOOGLE_API_KEY : \'\'),\n v = \'weekly\',\n language = null\n } = options;\n\n const params = { key, v };\n if (language) { params.language = language; }\n\n (g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})(params);\n\n for (const lib of libs) {\n await google.maps.importLibrary(lib);\n }\n\n}\n\n// Builder di default per il contenuto di un AdvancedMarkerElement.\n// properties: { id, type, icon, image, name, address, url, badgeText }\n// Per un markup diverso passare la propria funzione a MapManager.addAdvancedMarker().\nfunction gmapMarkerConstructor(properties) {\n\n const content = document.createElement("div");\n\n if (properties.id) { content.id = `marker-${properties.id}`; }\n content.classList.add("wi-marker");\n if (properties.type) { content.classList.add(`wi-marker-${properties.type}`); }\n\n const image = properties.image ? `\n <div class="w-30 b-r-10 o-hidden">\n <div class="f-3-2">\n ${properties.image}\n </div>\n </div>` : \'\';\n\n const address = properties.address ? `<div class="text-small mt-1">${properties.address}</div>` : \'\';\n\n const badge = properties.url ? `\n <div class="features mt-2">\n <a href="${properties.url}" class="badge badge-primary">\n ${properties.badgeText ?? \'\'}\n </a>\n </div>` : \'\';\n\n content.innerHTML = `\n <div class="icon">\n <div class="f-1-1">\n ${properties.icon ?? \'\'}\n </div>\n </div>\n <div class="details">\n ${image}\n <div class="${properties.image ? \'w-70 pl-2\' : \'w-100\'} box-border">\n <div class="text fw-400">${properties.name ?? \'\'}</div>\n ${address}\n ${badge}\n </div>\n </div>\n `;\n\n return content;\n\n}\n\n// Espande/comprime un marker (classe .highlight su .wi-marker)\nfunction toggleHighlight(markerView) {\n\n if (!markerView || !markerView.content || !markerView.content.classList) { return; }\n\n if (markerView.content.classList.contains("highlight")) {\n markerView.content.classList.remove("highlight");\n markerView.zIndex = null;\n } else {\n markerView.content.classList.add("highlight");\n markerView.zIndex = 1;\n }\n\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\n// Messaggio testuale di una risposta 4xx in JSON ({ response: '...' }); null altrimenti.\n// Gli errori 5xx restano generici per non mostrare dettagli interni.\nfunction ajaxResponseMessage(request) {\n\n if (!request || request.readyState != 4 || request.status < 400 || request.status > 499) {\n return null;\n }\n\n try {\n var message = JSON.parse(request.responseText).response;\n } catch {\n return null;\n }\n\n return typeof message === 'string' && message.trim() !== '' ? message.trim() : null;\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}\n\n// Previene l'uscita dalla pagina\nfunction preventPageExit(event) {\n \n event.preventDefault();\n event.returnValue = true;\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)}}},734(e,n,t){t(4642)(t(5285))},9196(e,n,t){t(4642)(t(4729))},9676(e,n,t){t(4642)(t(8553))},5328(e,n,t){t(4642)(t(5249))},4315(e,n,t){t(4642)(t(3990))},710(e,n,t){t(4642)(t(6711))},5545(e,n,t){t(4642)(t(7418))},8109(e,n,t){t(4642)(t(9636))},6225(e,n,t){t(4642)(t(1989))},7806(e,n,t){t(4642)(t(7741))},2383(e,n,t){t(4642)(t(7676))},2879(e,n,t){t(4642)(t(9198))},2981(e,n,t){t(4642)(t(1826))},2730(e,n,t){t(4642)(t(9221))},555(e,n,t){t(4642)(t(7642))},8258(e,n,t){t(4642)(t(5071))},9111(e,n,t){t(4642)(t(8882))},7187(e,n,t){t(4642)(t(3740))},2347(e,n,t){t(4642)(t(6944))},8004(e,n,t){t(4642)(t(8197))},9118(e,n,t){t(4642)(t(1367))},550(e,n,t){t(4642)(t(7059))},3286(e,n,t){t(4642)(t(3883))},9260(e,n,t){t(4642)(t(8743))},4581(e,n,t){t(4642)(t(6338))},9899(e,n,t){t(4642)(t(8636))},6235(){window.wi=window.wi||{}},767(){"use strict";function e(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}function n(n,t){return function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,i,r,o,l=[],s=!0,c=!1;try{if(r=(t=t.call(e)).next,0===n);else for(;!(s=(a=r.call(t)).done)&&(l.push(a.value),l.length!==n);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw i}}return l}}(n,t)||function(n,t){if(n){if("string"==typeof n)return e(n,t);var a={}.toString.call(n).slice(8,-1);return"Object"===a&&n.constructor&&(a=n.constructor.name),"Map"===a||"Set"===a?Array.from(n):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?e(n,t):void 0}}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const t=Object.entries,a=Object.setPrototypeOf,i=Object.isFrozen,r=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor;let l=Object.freeze,s=Object.seal,c=Object.create,d="undefined"!=typeof Reflect&&Reflect,u=d.apply,p=d.construct;l||(l=function(e){return e}),s||(s=function(e){return e}),u||(u=function(e,n){for(var t=arguments.length,a=new Array(t>2?t-2:0),i=2;i<t;i++)a[i-2]=arguments[i];return e.apply(n,a)}),p||(p=function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];return new e(...t)});const f=M(Array.prototype.forEach),m=M(Array.prototype.lastIndexOf),h=M(Array.prototype.pop),g=M(Array.prototype.push),b=M(Array.prototype.splice),v=Array.isArray,w=M(String.prototype.toLowerCase),y=M(String.prototype.toString),k=M(String.prototype.match),S=M(String.prototype.replace),x=M(String.prototype.indexOf),E=M(String.prototype.trim),A=M(Number.prototype.toString),L=M(Boolean.prototype.toString),C="undefined"==typeof BigInt?null:M(BigInt.prototype.toString),T="undefined"==typeof Symbol?null:M(Symbol.prototype.toString),q=M(Object.prototype.hasOwnProperty),P=M(Object.prototype.toString),N=M(RegExp.prototype.test),I=(O=TypeError,function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return p(O,n)});var O;function M(e){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var t=arguments.length,a=new Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];return u(e,n,a)}}function R(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;if(a&&a(e,null),!v(n))return e;let r=n.length;for(;r--;){let a=n[r];if("string"==typeof a){const e=t(a);e!==a&&(i(n)||(n[r]=e),a=e)}e[a]=!0}return e}function z(e){for(let n=0;n<e.length;n++){q(e,n)||(e[n]=null)}return e}function D(e){const a=c(null);for(const r of t(e)){var i=n(r,2);const t=i[0],o=i[1];q(e,t)&&(v(o)?a[t]=z(o):o&&"object"==typeof o&&o.constructor===Object?a[t]=D(o):a[t]=o)}return a}function _(e,n){for(;null!==e;){const t=o(e,n);if(t){if(t.get)return M(t.get);if("function"==typeof t.value)return M(t.value)}e=r(e)}return function(){return null}}const F=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),B=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),H=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),V=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),U=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$=l(["#text"]),G=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),W=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),K=l(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),J=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Y=s(/{{[\w\W]*|^[\w\W]*}}/g),X=s(/<%[\w\W]*|^[\w\W]*%>/g),Q=s(/\${[\w\W]*/g),Z=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),ee=s(/^aria-[\-\w]+$/),ne=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),te=s(/^(?:\w+script|data):/i),ae=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ie=s(/^html$/i),re=s(/^[a-z][.\w]*(-[.\w]+)+$/i),oe=s(/<[/\w!]/g),le=s(/<[/\w]/g),se=s(/<\/no(script|embed|frames)/i),ce=s(/\/>/i),de=1,ue=3,pe=7,fe=8,me=9,he=11,ge=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],be=l(R({},ge)),ve=function(){const e={};return f(ge,n=>{e[n]=s(new RegExp("</"+n+"(?=[\\t\\n\\f\\r />])","i"))}),l(e)}(),we=function(){return"undefined"==typeof window?null:window},ye=function(e,n,t,a){return q(e,n)&&v(e[n])?R(a.base?D(a.base):{},e[n],a.transform):t},ke=function(e,n,t){const a=q(e,n)?e[n]:void 0;return a&&"object"==typeof a?D(a):t()};var Se=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:we();const a=n=>e(n);if(a.version="3.4.15",a.removed=[],!n||!n.document||n.document.nodeType!==me||!n.Element)return a.isSupported=!1,a;let i=n.document;const r=i,o=r.currentScript;n.DocumentFragment;const d=n.HTMLTemplateElement,u=n.Node,p=n.Element,O=n.NodeFilter,M=n.NamedNodeMap;void 0===M&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const z=n.DOMParser,ge=n.trustedTypes,Se=p.prototype,xe=_(Se,"cloneNode"),Ee=_(Se,"remove"),Ae=_(Se,"removeAttributeNode"),Le=_(Se,"nextSibling"),Ce=_(Se,"childNodes"),Te=_(Se,"parentNode"),qe=_(Se,"shadowRoot"),Pe=_(Se,"attributes"),Ne=u&&u.prototype?_(u.prototype,"nodeType"):null,Ie=u&&u.prototype?_(u.prototype,"nodeName"):null,Oe=u&&u.prototype?_(u.prototype,"ownerDocument"):null,Me=function(e){return Ne?Ne(e):e.nodeType},Re=function(e){return Ie?Ie(e):e.nodeName};if("function"==typeof d){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let ze,De,_e="",Fe=!1,je=0;const Be=function(){if(je>0)throw I('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},He=function(e){Be(),je++;try{return ze.createHTML(e)}finally{je--}},Ve=function(){return Fe||(De=function(e,n){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let t=null;const a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(t=n.getAttribute(a));const i="dompurify"+(t?"#"+t:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(ge,o),Fe=!0),De},Ue=i,$e=Ue.implementation,Ge=Ue.createNodeIterator,We=Ue.createDocumentFragment,Ke=Ue.getElementsByTagName,Je=r.importNode;let Ye={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};a.isSupported="function"==typeof t&&"function"==typeof Te&&$e&&void 0!==$e.createHTMLDocument;const Xe=Y,Qe=X,Ze=Q,en=Z,nn=ee,tn=te,an=ae,rn=re;let on=ne,ln=null;const sn=R({},[...F,...j,...B,...V,...$]);let cn=null;const dn=R({},[...G,...W,...K,...J]);let un=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pn=null,fn=null;const mn=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let hn=!0,gn=!0,bn=!1,vn=!0,wn=!1,yn=!0,kn=!1,Sn=!1,xn=null,En=null,An=!1,Ln=!1,Cn=!1,Tn=!1,qn=!0,Pn=!1;const Nn="user-content-";let In=!0,On=!1,Mn={},Rn=null;const zn=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Dn=null;const _n=R({},["audio","video","img","source","image","track"]);let Fn=null;const jn=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Bn="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",Vn="http://www.w3.org/1999/xhtml";let Un=Vn,$n=!1,Gn=null;const Wn=R({},[Bn,Hn,Vn],y),Kn=l(["mi","mo","mn","ms","mtext"]);let Jn=R({},Kn);const Yn=l(["annotation-xml"]);let Xn=R({},Yn);const Qn=R({},["title","style","font","a","script"]);let Zn=null;const et=["application/xhtml+xml","text/html"];let nt=null,tt=null;const at=i.createElement("form"),it=function(e){return e instanceof RegExp||e instanceof Function},rt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(tt&&tt===e)return;e&&"object"==typeof e||(e={}),e=D(e),Zn=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,nt="application/xhtml+xml"===Zn?y:w,ln=ye(e,"ALLOWED_TAGS",sn,{transform:nt}),cn=ye(e,"ALLOWED_ATTR",dn,{transform:nt}),Gn=ye(e,"ALLOWED_NAMESPACES",Wn,{transform:y}),Fn=ye(e,"ADD_URI_SAFE_ATTR",jn,{transform:nt,base:jn}),Dn=ye(e,"ADD_DATA_URI_TAGS",_n,{transform:nt,base:_n}),Rn=ye(e,"FORBID_CONTENTS",zn,{transform:nt}),pn=ye(e,"FORBID_TAGS",D({}),{transform:nt}),fn=ye(e,"FORBID_ATTR",D({}),{transform:nt}),Mn=!!q(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?D(e.USE_PROFILES):e.USE_PROFILES),hn=!1!==e.ALLOW_ARIA_ATTR,gn=!1!==e.ALLOW_DATA_ATTR,bn=e.ALLOW_UNKNOWN_PROTOCOLS||!1,vn=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,wn=e.SAFE_FOR_TEMPLATES||!1,yn=!1!==e.SAFE_FOR_XML,kn=e.WHOLE_DOCUMENT||!1,Ln=e.RETURN_DOM||!1,Cn=e.RETURN_DOM_FRAGMENT||!1,Tn=e.RETURN_TRUSTED_TYPE||!1,An=e.FORCE_BODY||!1,qn=!1!==e.SANITIZE_DOM,Pn=e.SANITIZE_NAMED_PROPS||!1,In=!1!==e.KEEP_CONTENT,On=e.IN_PLACE||!1,on=function(e){try{return N(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:ne,Un="string"==typeof e.NAMESPACE?e.NAMESPACE:Vn,Jn=ke(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>R({},Kn)),Xn=ke(e,"HTML_INTEGRATION_POINTS",()=>R({},Yn));const n=ke(e,"CUSTOM_ELEMENT_HANDLING",()=>c(null));if(un=c(null),q(n,"tagNameCheck")&&it(n.tagNameCheck)&&(un.tagNameCheck=n.tagNameCheck),q(n,"attributeNameCheck")&&it(n.attributeNameCheck)&&(un.attributeNameCheck=n.attributeNameCheck),q(n,"allowCustomizedBuiltInElements")&&"boolean"==typeof n.allowCustomizedBuiltInElements&&(un.allowCustomizedBuiltInElements=n.allowCustomizedBuiltInElements),s(un),wn&&(gn=!1),Cn&&(Ln=!0),Mn&&(ln=R({},$),cn=c(null),!0===Mn.html&&(R(ln,F),R(cn,G)),!0===Mn.svg&&(R(ln,j),R(cn,W),R(cn,J)),!0===Mn.svgFilters&&(R(ln,B),R(cn,W),R(cn,J)),!0===Mn.mathMl&&(R(ln,V),R(cn,K),R(cn,J))),mn.tagCheck=null,mn.attributeCheck=null,q(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?mn.tagCheck=e.ADD_TAGS:v(e.ADD_TAGS)&&(ln===sn&&(ln=D(ln)),R(ln,e.ADD_TAGS,nt))),q(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?mn.attributeCheck=e.ADD_ATTR:v(e.ADD_ATTR)&&(cn===dn&&(cn=D(cn)),R(cn,e.ADD_ATTR,nt))),q(e,"ADD_FORBID_CONTENTS")&&v(e.ADD_FORBID_CONTENTS)&&(Rn===zn&&(Rn=D(Rn)),R(Rn,e.ADD_FORBID_CONTENTS,nt)),In&&(ln["#text"]=!0),kn&&R(ln,["html","head","body"]),ln.table&&(R(ln,["tbody"]),delete pn.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw I('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw I('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const n=ze;ze=e.TRUSTED_TYPES_POLICY;try{_e=He("")}catch(e){throw ze=n,e}}else null===e.TRUSTED_TYPES_POLICY?(ze=void 0,_e=""):(void 0===ze&&(ze=Ve()),ze&&"string"==typeof _e&&(_e=He("")));l&&l(e),tt=e},ot=R({},[...j,...B,...H]),lt=R({},[...V,...U]),st=function(e){let n=Te(e);n&&n.tagName||(n={namespaceURI:Un,tagName:"template"});const t=w(e.tagName),a=w(n.tagName);return!!Gn[e.namespaceURI]&&(e.namespaceURI===Hn?function(e,n,t){return n.namespaceURI===Vn?"svg"===e:n.namespaceURI===Bn?"svg"===e&&("annotation-xml"===t||Jn[t]):Boolean(ot[e])}(t,n,a):e.namespaceURI===Bn?function(e,n,t){return n.namespaceURI===Vn?"math"===e:n.namespaceURI===Hn?"math"===e&&Xn[t]:Boolean(lt[e])}(t,n,a):e.namespaceURI===Vn?function(e,n,t){return!(n.namespaceURI===Hn&&!Xn[t])&&!(n.namespaceURI===Bn&&!Jn[t])&&!lt[e]&&(Qn[e]||!ot[e])}(t,n,a):!("application/xhtml+xml"!==Zn||!Gn[e.namespaceURI]))},ct=function(e){g(a.removed,{element:e});try{Te(e).removeChild(e)}catch(n){if(Ee(e),!Te(e))throw I("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},dt=function(e,n,t){try{Ae(e,n)}catch(n){try{e.removeAttribute(t)}catch(e){}}},ut=function(e){mt(e);const n=Ce(e);if(n){const e=[];f(n,n=>{g(e,n)}),f(e,e=>{try{Ee(e)}catch(e){}})}const t=Pe(e);if(t)for(let n=t.length-1;n>=0;--n){const a=t[n],i=a&&a.name;"string"==typeof i&&dt(e,a,i)}},pt=function(e,n,t){if(!t)try{t=n.getAttributeNode(e)}catch(e){t=null}g(a.removed,{attribute:t||null,from:n});try{t?Ae(n,t):n.removeAttribute(e)}catch(t){try{n.removeAttribute(e)}catch(e){}}if("is"===e)if(Ln||Cn)try{ct(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},ft=function(e){const n=Pe(e);if(n)for(let t=n.length-1;t>=0;--t){const a=n[t],i=a&&a.name;"string"!=typeof i||cn[nt(i)]||dt(e,a,i)}},mt=function(e){const n=[e];for(;n.length>0;){const e=n.pop();Me(e)===de&&ft(e);const t=Ce(e);if(t)for(let e=t.length-1;e>=0;--e)n.push(t[e])}},ht=function(e,n){return!!yn&&("patchsrc"===e||"for"===e&&"label"!==n&&"output"!==n)},gt=function(e){let n=null,t=null;if(An)e="<remove></remove>"+e;else{const n=k(e,/^[\r\n\t ]+/);t=n&&n[0]}"application/xhtml+xml"===Zn&&Un===Vn&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=ze?He(e):e;if(Un===Vn)try{n=(new z).parseFromString(a,Zn)}catch(e){}if(!n||!n.documentElement){n=$e.createDocument(Un,"template",null);try{n.documentElement.innerHTML=$n?_e:a}catch(e){}}const r=n.body||n.documentElement;return e&&t&&r.insertBefore(i.createTextNode(t),r.childNodes[0]||null),Un===Vn?Ke.call(n,kn?"html":"body")[0]:kn?n.documentElement:r},bt=function(e){const n=Oe?Oe(e):e.ownerDocument;return Ge.call(n||e,e,O.SHOW_ELEMENT|O.SHOW_COMMENT|O.SHOW_TEXT|O.SHOW_PROCESSING_INSTRUCTION|O.SHOW_CDATA_SECTION,null)},vt=function(e){return e=S(e,Xe," "),e=S(e,Qe," "),e=S(e,Ze," ")},wt=function(e){var n;e.normalize();const t=Oe?Oe(e):e.ownerDocument,a=Ge.call(t||e,e,O.SHOW_TEXT|O.SHOW_COMMENT|O.SHOW_CDATA_SECTION|O.SHOW_PROCESSING_INSTRUCTION,null);let i=a.nextNode();for(;i;)i.data=vt(i.data),i=a.nextNode();const r=null===(n=e.querySelectorAll)||void 0===n?void 0:n.call(e,"template");r&&f(r,e=>{kt(e.content)&&wt(e.content)})},yt=function(e){const n=Ie?Ie(e):null;return"string"==typeof n&&("form"===nt(n)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==Pe(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==Ne(e)||e.childNodes!==Ce(e)))},kt=function(e){if(!Ne||"object"!=typeof e||null===e)return!1;try{return Ne(e)===he}catch(e){return!1}},St=function(e){if(!Ne||"object"!=typeof e||null===e)return!1;try{return"number"==typeof Ne(e)}catch(e){return!1}};function xt(e,n,t){0!==e.length&&f(e,e=>{e.call(a,n,t,tt)})}const Et=function(e,n){if(e instanceof RegExp)return N(e,n);if(e instanceof Function){for(var t=arguments.length,a=new Array(t>2?t-2:0),i=2;i<t;i++)a[i-2]=arguments[i];return Boolean(e(n,...a))}return!1},At=function(e,n,t,a){return 0===e.length?n:n===t||n===a?D(n):n},Lt=function(e,n){return e!==n&&null===Te(e)&&(On&&mt(e),!0)},Ct=function(e,n){if(xt(Ye.beforeSanitizeElements,e,null),Lt(e,n))return!0;if(yt(e))return ct(e),!0;const t=nt(Re(e));if(ln=At(Ye.uponSanitizeElement,ln,sn,xn),xt(Ye.uponSanitizeElement,e,{tagName:t,allowedTags:ln}),Lt(e,n))return!0;if(function(e,n){return!!(yn&&e.hasChildNodes()&&!St(e.firstElementChild)&&N(oe,e.textContent)&&N(oe,e.innerHTML))||!!(yn&&e.namespaceURI===Vn&&be[n]&&(St(e.firstElementChild)||"string"==typeof e.textContent&&N(ve[n],e.textContent)))||e.nodeType===pe||!(!yn||e.nodeType!==fe||!N(le,e.data))}(e,t))return ct(e),!0;if(pn[t]||!(mn.tagCheck instanceof Function&&mn.tagCheck(t))&&!ln[t]){const a=function(e,n,t){if(!pn[n]&&Pt(n)&&Et(un.tagNameCheck,n))return!1;if(In&&!Rn[n]){const n=Te(e),a=Ce(e);if(a&&n)for(let i=a.length-1;i>=0;--i){const r=e===t?xe(a[i],!0):a[i];n.insertBefore(r,Le(e))}}return ct(e),!0}(e,t,n);return!1===a&&xt(Ye.afterSanitizeElements,e,null),a}if(Me(e)===de&&!st(e))return ct(e),!0;if(("noscript"===t||"noembed"===t||"noframes"===t)&&N(se,e.innerHTML))return ct(e),!0;if(wn&&e.nodeType===ue){const n=vt(e.textContent);e.textContent!==n&&(g(a.removed,{element:e.cloneNode()}),e.textContent=n)}return xt(Ye.afterSanitizeElements,e,null),!1},Tt=function(e,n,t){if(fn[n])return!1;if(ht(n,e))return!1;if(qn&&("id"===n||"name"===n)&&(t in i||t in at))return!1;const a=cn[n]||mn.attributeCheck instanceof Function&&mn.attributeCheck(n,e);return!(!gn||!N(en,n))||(!(!hn||!N(nn,n))||(a?!!Fn[n]||(!!N(on,S(t,an,""))||(!("src"!==n&&"xlink:href"!==n&&"href"!==n||"script"===e||0!==x(t,"data:")||!Dn[e])||(!(!bn||N(tn,S(t,an,"")))||!t))):Pt(e)&&Et(un.tagNameCheck,e)&&Et(un.attributeNameCheck,n,e)||"is"===n&&un.allowCustomizedBuiltInElements&&Et(un.tagNameCheck,t)))},qt=R({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Pt=function(e){return!qt[w(e)]&&N(rn,e)},Nt=function(e,n,t,a){if(ze&&"object"==typeof ge&&"function"==typeof ge.getAttributeType&&!t)switch(ge.getAttributeType(e,n)){case"TrustedHTML":return He(a);case"TrustedScriptURL":return function(e){Be(),je++;try{return ze.createScriptURL(e)}finally{je--}}(a)}return a},It=function(e,n,t,a){try{return t?e.setAttributeNS(t,n,a):e.setAttribute(n,a),!yt(e)||(ct(e),!1)}catch(t){return pt(n,e),!1}},Ot=function(e){xt(Ye.beforeSanitizeAttributes,e,null);const n=e.attributes;if(!n||yt(e))return;cn=At(Ye.uponSanitizeAttribute,cn,dn,En);const t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:cn,forceKeepAttr:void 0};let i=n.length;const r=nt(e.nodeName);for(;i--;){const o=n[i],l=o.name,s=o.namespaceURI,c=o.value,d=nt(l),u=c;let p="value"===l?u:E(u),f=!1;if(t.attrName=d,t.attrValue=p,t.keepAttr=!0,t.forceKeepAttr=void 0,xt(Ye.uponSanitizeAttribute,e,t),p=t.attrValue,!Pn||"id"!==d&&"name"!==d||0===x(p,Nn)||(pt(l,e,o),p=Nn+p,f=!0),yn&&N(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p))pt(l,e,o);else if("attributename"===d&&k(p,"href"))pt(l,e,o);else if(!t.forceKeepAttr)if(t.keepAttr)if(vn||!N(ce,p))if(wn&&(p=vt(p)),Tt(r,d,p)){if(p=Nt(r,d,s,p),p!==u){It(e,l,s,p)&&f&&h(a.removed)}}else pt(l,e,o);else pt(l,e,o);else pt(l,e,o)}xt(Ye.afterSanitizeAttributes,e,null)},Mt=function(e){let n=null;const t=bt(e);for(xt(Ye.beforeSanitizeShadowDOM,e,null);n=t.nextNode();)if(xt(Ye.uponSanitizeShadowNode,n,null),Ct(n,e),Ot(n),kt(n.content)&&Mt(n.content),Me(n)===de){const e=qe(n);kt(e)&&(Rt(e),Mt(e))}xt(Ye.afterSanitizeShadowDOM,e,null)},Rt=function(e){const n=[{node:e,shadow:null}];for(;n.length>0;){const e=n.pop();if(e.shadow){Mt(e.shadow);continue}const t=e.node,a=Me(t)===de,i=Ce(t);if(i)for(let e=i.length-1;e>=0;--e)n.push({node:i[e],shadow:null});if(a){const e=Ie?Ie(t):null;if("string"==typeof e&&"template"===nt(e)){const e=t.content;kt(e)&&n.push({node:e,shadow:null})}}if(a){const e=qe(t);kt(e)&&n.push({node:null,shadow:e},{node:e,shadow:null})}}};return a.sanitize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null,i=null,o=null,l=null;if($n=!e,$n&&(e="\x3c!--\x3e"),"string"!=typeof e&&!St(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return A(e);case"boolean":return L(e);case"bigint":return C?C(e):"0";case"symbol":return T?T(e):"Symbol()";case"undefined":default:return P(e);case"function":case"object":{if(null===e)return P(e);const n=e,t=_(n,"toString");if("function"==typeof t){const e=t(n);return"string"==typeof e?e:P(e)}return P(e)}}}(e)))throw I("dirty is not a string, aborting");if(!a.isSupported)return e;Sn?(ln=xn,cn=En):rt(n),(Ye.uponSanitizeElement.length>0||Ye.uponSanitizeAttribute.length>0)&&(ln=D(ln)),Ye.uponSanitizeAttribute.length>0&&(cn=D(cn)),a.removed=[];const s=On&&"string"!=typeof e&&St(e);if(s){!function(e){if(!yn)return;const n=[e];for(;n.length>0;){const e=n.pop(),t=Me(e);if(t===pe||t===fe&&N(le,e.data)){try{Ee(e)}catch(e){}continue}if(t===de){const n=e,t=nt(Re(e));try{n.hasAttribute&&n.hasAttribute("patchsrc")&&n.removeAttribute("patchsrc"),n.hasAttribute&&n.hasAttribute("for")&&ht("for",t)&&n.removeAttribute("for")}catch(e){}}const a=Ce(e);if(a)for(let e=a.length-1;e>=0;--e)n.push(a[e])}}(e);const n=Re(e);if("string"==typeof n){const t=nt(n);if(!ln[t]||pn[t])throw ut(e),I("root node is forbidden and cannot be sanitized in-place")}if(yt(e))throw ut(e),I("root node is clobbered and cannot be sanitized in-place");try{Rt(e)}catch(n){throw ut(e),n}}else if(St(e))t=gt("\x3c!----\x3e"),i=t.ownerDocument.importNode(e,!0),i.nodeType===de&&"BODY"===i.nodeName||"HTML"===i.nodeName?t=i:t.appendChild(i),Rt(t);else{if(!Ln&&!wn&&!kn&&-1===e.indexOf("<"))return ze&&Tn?He(e):e;if(t=gt(e),!t)return Ln?null:Tn?_e:""}t&&An&&ct(t.firstChild);const c=s?e:t;try{const e=bt(c);for(;o=e.nextNode();)Ct(o,c),Ot(o),kt(o.content)&&Mt(o.content)}catch(n){throw s&&(ut(e),f(a.removed,e=>{e.element&&mt(e.element)})),n}if(s)return f(a.removed,e=>{e.element&&mt(e.element)}),wn&&wt(e),e;if(Ln){if(wn&&wt(t),Cn)for(l=We.call(t.ownerDocument);t.firstChild;)l.appendChild(t.firstChild);else l=t;return(cn.shadowroot||cn.shadowrootmode)&&(l=Je.call(r,l,!0)),l}let d=kn?t.outerHTML:t.innerHTML;return kn&&ln["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&N(ie,t.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+d),wn&&(d=vt(d)),ze&&Tn?He(d):d},a.setConfig=function(){rt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Sn=!0,xn=ln,En=cn},a.clearConfig=function(){tt=null,Sn=!1,xn=null,En=null,ze=De,_e=""},a.isValidAttribute=function(e,n,t){tt||rt({});const a=nt(e),i=nt(n);return Tt(a,i,t)},a.addHook=function(e,n){"function"==typeof n&&q(Ye,e)&&g(Ye[e],n)},a.removeHook=function(e,n){if(q(Ye,e)){if(void 0!==n){const t=m(Ye[e],n);return-1===t?void 0:b(Ye[e],t,1)[0]}return h(Ye[e])}},a.removeHooks=function(e){q(Ye,e)&&(Ye[e]=[])},a.removeAllHooks=function(){Ye={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},a}();window.DOMPurify=Se}};const n={};function t(a){const i=n[a];if(void 0!==i)return i.exports;const r=n[a]={exports:{}};return e[a](r,r.exports,t),r.exports}(()=>{"use strict";class e{constructor(e,n){this.baseUrl=e,this.token=n}async request(e,n={}){const t={Authorization:`Bearer ${this.token}`,"Accept-Language":r.lang,...n.headers};let a=n.body;a instanceof FormData||void 0===a||(t["Content-Type"]="application/json",a=JSON.stringify(a));const i=await fetch(`${this.baseUrl}${e}`,{...n,headers:t,body:a});let o;i.headers.get("content-type");try{o=await i.json()}catch{throw{success:!1,status:i.status,response:"Errore nel parsing della risposta"}}if(!o.success)throw o;return o}get(e){return this.request(e,{method:"GET"})}post(e,n){return this.request(e,{method:"POST",body:n})}put(e,n){return this.request(e,{method:"PUT",body:n})}delete(e){return this.request(e,{method:"DELETE"})}}const n=new WeakMap,a=new WeakSet;class i{static init(e=document){const n=e.ownerDocument||e;if(!a.has(n)){a.add(n),n.addEventListener("click",e=>{const n=e.target.closest?.("[data-wi-deferred-trigger]");if(!n||0!==e.button||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;const t=n.closest("[data-wi-deferred]");t&&"error"!==t.dataset.wiDeferredState&&(e.preventDefault(),this.load(t,{focus:!0}).catch(()=>{}))}),n.addEventListener("keydown",e=>{" "===e.key&&e.target.matches('a[data-wi-deferred-trigger][role="button"]')&&(e.preventDefault(),e.target.click())});new MutationObserver(e=>{for(const n of e)for(const e of n.addedNodes)1===e.nodeType&&this.init(e)}).observe(n.documentElement,{childList:!0,subtree:!0})}const t=[...e.querySelectorAll("[data-wi-deferred]")];e.matches?.("[data-wi-deferred]")&&t.unshift(e);for(const e of t){if(a.has(e))continue;if(a.add(e),e.querySelectorAll("a[data-wi-deferred-trigger]").forEach(e=>e.setAttribute("role","button")),"visible"!==e.dataset.wiDeferred||"undefined"==typeof IntersectionObserver)continue;const n=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),this.load(e).catch(()=>{}))});n.observe(e)}}static load(e,{focus:t=!1}={}){const a="string"==typeof e?document.querySelector(e):e;if(!a)return Promise.reject(new Error("Deferred content not found."));if(n.has(a))return n.get(a);const i=this.activate(a,t);return n.set(a,i),i}static async activate(e,n){const t=e.querySelector(":scope > template[data-wi-deferred-template]");if(!t)throw new Error("Deferred template not found.");const a=e.ownerDocument,i=a.createElement("div");i.className="wi-deferred-content",i.append(t.content.cloneNode(!0));const r=[...i.querySelectorAll("script")];r.forEach(e=>e.remove()),e.dataset.wiDeferredState="loading",e.setAttribute("aria-busy","true"),e.append(i);try{for(const e of r)await new Promise((n,t)=>{const r=a.createElement("script");for(const n of e.attributes)r.setAttribute(n.name,n.value);const o=e.src||"module"===e.type;o&&(r.async=!1,r.onload=n,r.onerror=()=>t(new Error("Deferred script failed to load."))),r.textContent=e.textContent,i.append(r),o||n()});if(e.querySelector(":scope > [data-wi-deferred-placeholder]")?.remove(),t.remove(),e.dataset.wiDeferredState="ready",n){const e=i.querySelector("iframe, button, a[href], [tabindex]")||i;e.hasAttribute("tabindex")||e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0})}return e.dispatchEvent(new CustomEvent("wi:deferred:ready",{bubbles:!0})),i}catch(n){throw i.remove(),e.dataset.wiDeferredState="error",e.querySelectorAll("[data-wi-deferred-trigger]").forEach(e=>{e.removeAttribute("role"),"BUTTON"===e.tagName&&(e.disabled=!0)}),e.dispatchEvent(new CustomEvent("wi:deferred:error",{bubbles:!0,detail:{error:n}})),n}finally{e.removeAttribute("aria-busy")}}}class r{static translations={};static defaultTranslations={};static get lang(){return document.documentElement.lang||"it"}static async init(e,n={}){this.translations=e,this.defaultTranslations=n}static get(e,n=[]){let t=this.getNestedValue(this.translations,e);return null==t&&(t=this.getNestedValue(this.defaultTranslations,e)),null==t?(console.error("Chiave di traduzione mancante: '"+e+"'"),e):(Array.isArray(n)&&n.length>0&&n.forEach((e,n)=>{t=t.replace(new RegExp("\\{"+n+"\\}","g"),e)}),t)}static getNestedValue(e,n){const t=n.split(".");let a=e;for(const e of t){if("object"!=typeof a||null===a||!(e in a))return null;a=a[e]}return a}}class o{constructor(e,n={}){const{infoElement:t=null,exportElement:a=null,mapId:i=null,travelMode:r="DRIVING",onError:o=e=>alert(e)}=n;this.mapElement=e,this.infoElement=t,this.exportElement=a,this.mapId=i,this.travelMode=r,this.onError=o,this.map=null,this.directionsService=null,this.directionsRenderer=null,this.autocomplete=null,this.mapClickListener=null,this.editingEnabled=!1,this.routeEnabled=!1,this.advancedMarkers=[],this.inputElement=null,this.waypoints=[],this.markers=[],this.mapType="hybrid",this.labelsVisible=!1}getTravelMode(){return google.maps.TravelMode[this.travelMode]??google.maps.TravelMode.DRIVING}initBaseMap(e={}){const n={center:{lat:20,lng:0},zoom:2,mapTypeId:this.mapType,mapTypeControl:!1,zoomControl:!0,streetViewControl:!1,fullscreenControl:!1,...e};return this.mapId&&(n.mapId=this.mapId),this.map=new google.maps.Map(this.mapElement,n),this.updateMapStyle(),this.map}initMap(){this.initBaseMap()}enableEditing(){this.map||this.initBaseMap(),this.editingEnabled=!0,this.mapClickListener&&this.mapClickListener.remove(),this.mapClickListener=this.map.addListener("click",e=>this.addChangeableMarker(e.latLng))}disableEditing(){this.mapClickListener&&(this.mapClickListener.remove(),this.mapClickListener=null),this.editingEnabled=!1}enableRoute(e={}){const{suppressMarkers:n=!0,draggable:t=!1,preserveViewport:a=!1,recalc:i=!0}=e;this.map||this.initBaseMap(),this.directionsService||(this.directionsService=new google.maps.DirectionsService),this.directionsRenderer?(this.directionsRenderer.setMap(this.map),this.directionsRenderer.setOptions({suppressMarkers:n,draggable:t,preserveViewport:a})):this.directionsRenderer=new google.maps.DirectionsRenderer({map:this.map,suppressMarkers:n,draggable:t,preserveViewport:a}),this.routeEnabled=!0,i&&this.waypoints.length>=2&&this.calcRoute()}disableRoute(){this.routeEnabled=!1,this.directionsRenderer&&(this.directionsRenderer.set("directions",null),this.directionsRenderer.setMap(null))}enableAutocomplete(e){this.inputElement=e,this.autocomplete=new google.maps.places.Autocomplete(this.inputElement),this.autocomplete.bindTo("bounds",this.map),this.autocomplete.addListener("place_changed",()=>{const e=this.autocomplete.getPlace();e.geometry&&e.geometry.location?(this.inputElement.value="",this.map.panTo(e.geometry.location),this.map.setZoom(15),this.addChangeableMarker(e.geometry.location)):this.onError("Luogo non trovato")})}initReadOnlyMap(e){if(!Array.isArray(e)||e.length<2)return void console.warn("Percorso non valido o troppo corto.");this.initBaseMap({center:e[0],zoom:14,disableDefaultUI:!0,mapTypeId:this.mapType}),this.disableEditing(),this.enableRoute({preserveViewport:!0,recalc:!1});const n=e[0],t=e[e.length-1],a=e.slice(1,-1).map(e=>({location:e,stopover:!0}));this.directionsService.route({origin:n,destination:t,waypoints:a,travelMode:this.getTravelMode()},(e,a)=>{if("OK"===a){this.directionsRenderer.setDirections(e);const a=new google.maps.LatLngBounds;if(e.routes[0].overview_path.forEach(e=>a.extend(e)),this.map.fitBounds(a),google.maps.marker&&google.maps.marker.AdvancedMarkerElement&&google.maps.marker.PinElement){const e=new google.maps.marker.PinElement({glyphText:"A"});new google.maps.marker.AdvancedMarkerElement({position:n,map:this.map,content:e.element,title:"A"});const a=new google.maps.marker.PinElement({glyphText:"B"});new google.maps.marker.AdvancedMarkerElement({position:t,map:this.map,content:a.element,title:"B"})}else new google.maps.Marker({position:n,map:this.map,label:"A"}),new google.maps.Marker({position:t,map:this.map,label:"B"})}else this.onError("Errore nel calcolo del percorso: "+a)})}setMapType(e){this.mapType=e,this.updateMapStyle()}toggleLabels(){this.labelsVisible=!this.labelsVisible,this.updateMapStyle()}updateMapStyle(){this.map.setMapTypeId(this.mapType),this.mapId||(this.labelsVisible?this.map.setOptions({styles:null}):this.map.setOptions({styles:[{featureType:"all",elementType:"labels",stylers:[{visibility:"off"}]}]}))}fitBounds(e={}){if(!this.map)return;const{includeRoute:n=!0,includeMarkers:t=!0,includeAdvancedMarkers:a=!0,extraPoints:i=[],padding:r=40,minZoom:o=null,maxZoom:l=null}=e,s=new google.maps.LatLngBounds;let c=!1;const d=e=>{if(!e)return null;if("function"==typeof e.lat&&"function"==typeof e.lng)return e;if("function"==typeof e.getPosition)return e.getPosition();if(e.position){const n=e.position;if("function"==typeof n.lat&&"function"==typeof n.lng)return n;if("number"==typeof n.lat&&"number"==typeof n.lng)return new google.maps.LatLng(n.lat,n.lng)}return e.location?d(e.location):"number"==typeof e.lat&&"number"==typeof e.lng?new google.maps.LatLng(e.lat,e.lng):null},u=e=>{const n=d(e);n&&(s.extend(n),c=!0)};if(n&&this.directionsRenderer&&this.directionsRenderer.getDirections){const e=this.directionsRenderer.getDirections(),n=e?.routes?.[0];n?.overview_path?.length?n.overview_path.forEach(e=>u(e)):this.waypoints.length&&this.waypoints.forEach(e=>u(e.location))}else n&&this.waypoints.length&&this.waypoints.forEach(e=>u(e.location));if(t&&this.markers.forEach(e=>u(e)),a&&this.advancedMarkers.forEach(e=>u(e)),Array.isArray(i)&&i.forEach(e=>u(e)),c&&(this.map.fitBounds(s,r),null!==o||null!==l)){const e=this.map.addListener("idle",()=>{const n=this.map.getZoom();null!==o&&n<o&&this.map.setZoom(o),null!==l&&n>l&&this.map.setZoom(l),e.remove()})}}addAdvancedMarker(e,n,t,a,i){const r="function"==typeof i?i(a):null;if(google.maps.marker&&google.maps.marker.AdvancedMarkerElement){const a=new google.maps.marker.AdvancedMarkerElement({map:this.map,content:r,position:new google.maps.LatLng(e,n),title:t});return this.advancedMarkers.push(a),a}console.warn("AdvancedMarkerElement non disponibile, uso Marker standard.");const o=new google.maps.Marker({position:new google.maps.LatLng(e,n),map:this.map,title:t});return this.advancedMarkers.push(o),o}addMarker(e,n){return new google.maps.Marker({position:e,map:this.map,label:n})}addChangeableMarker(e){const n=(this.markers.length+1).toString(),t=this.addMarker(e,n);t.setDraggable(!0),t.addListener("dragend",()=>{this.updateWaypoints(),this.routeEnabled&&this.calcRoute()}),t.addListener("dblclick",()=>{t.setMap(null),this.markers=this.markers.filter(e=>e!==t),this.updateWaypoints(),this.routeEnabled&&this.calcRoute()}),this.markers.push(t),this.updateWaypoints(),this.routeEnabled&&this.markers.length>=2&&this.calcRoute()}updateWaypoints(){this.waypoints=this.markers.map(e=>({location:e.getPosition(),stopover:!0})),this.markers.forEach((e,n)=>e.setLabel((n+1).toString())),this.saveRoute()}calcRoute(){if(!this.routeEnabled||!this.directionsService||!this.directionsRenderer)return;if(this.waypoints.length<2)return;const e=this.waypoints[0].location,n=this.waypoints[this.waypoints.length-1].location,t=this.waypoints.slice(1,-1);this.directionsService.route({origin:e,destination:n,waypoints:t,travelMode:this.getTravelMode()},(e,n)=>{if("OK"===n){this.directionsRenderer.setDirections(e),this.showRouteInfo(e.routes[0].legs);const n=new google.maps.LatLngBounds;e.routes[0].overview_path.forEach(e=>n.extend(e)),this.map.fitBounds(n)}else this.onError("Errore nel calcolo del percorso: "+n)})}showRouteInfo(e){let n=0,t=0;e.forEach(e=>{n+=e.distance.value,t+=e.duration.value}),this.infoElement&&(this.infoElement.innerHTML=`<strong>Distanza:</strong> ${(n/1e3).toFixed(2)} km<br><strong>Tempo stimato:</strong> ${this.formatTime(t)}`)}formatTime(e){const n=Math.floor(e/60),t=Math.floor(n/60),a=n%60;return t>0?`${t}h ${a}min`:`${a}min`}resetMap(){this.markers.forEach(e=>e.setMap(null)),this.markers=[],this.waypoints=[],this.directionsRenderer&&this.directionsRenderer.set("directions",null),this.infoElement&&(this.infoElement.innerHTML="")}saveRoute(){const e=this.markers.map(e=>({lat:e.getPosition().lat(),lng:e.getPosition().lng()}));this.exportElement&&(this.exportElement.value=JSON.stringify(e,null,2))}loadRouteFromJSON(e){this.resetMap();JSON.parse(e).forEach(e=>this.addChangeableMarker(new google.maps.LatLng(e.lat,e.lng)))}}t(6235);window.DeferredContent=i,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>i.init(),{once:!0}):i.init(),window.ApiClient=e,window.TranslationProvider=r,window.MapManager=o,window.MapNavigator=class{constructor(e){if(!(e&&e instanceof o))throw new Error("Devi passare una istanza valida di MapManager");this.mapManager=e,this.map=e.map,this.percorso=[],this.userMarker=null,this.watchId=null,this.previousPosition=null}init(e){this.stop(),this.percorso=e,this.mapManager.initReadOnlyMap(e),this.map=this.mapManager.map}start(){navigator.geolocation?this.watchId=navigator.geolocation.watchPosition(e=>this.updatePosition(e),e=>this.mapManager.onError("Errore nella geolocalizzazione: "+e.message),{enableHighAccuracy:!0,maximumAge:0,timeout:1e4}):this.mapManager.onError("Geolocalizzazione non supportata dal tuo browser.")}updatePosition(e){const n={lat:e.coords.latitude,lng:e.coords.longitude};let t=0;if(this.previousPosition&&(t=this.computeHeading(this.previousPosition,n)),this.userMarker){this.userMarker.setPosition(n);const e=this.userMarker.getIcon();e.rotation=t,this.userMarker.setIcon(e)}else this.map.setZoom(16),this.map.setCenter(n),this.userMarker=new google.maps.Marker({position:n,map:this.map,icon:{path:google.maps.SymbolPath.FORWARD_CLOSED_ARROW,scale:4,fillColor:"#007BFF",fillOpacity:1,strokeColor:"#fff",strokeWeight:1,rotation:t,anchor:new google.maps.Point(0,2)},title:"La tua posizione"});this.previousPosition=n}computeHeading(e,n){const t=e=>e*Math.PI/180,a=t(e.lat),i=t(e.lng),r=t(n.lat),o=t(n.lng)-i,l=Math.sin(o)*Math.cos(r),s=Math.cos(a)*Math.sin(r)-Math.sin(a)*Math.cos(r)*Math.cos(o),c=Math.atan2(l,s);return(180*c/Math.PI+360)%360}stop(){null!==this.watchId&&(navigator.geolocation.clearWatch(this.watchId),this.watchId=null),this.userMarker&&(this.userMarker.setMap(null),this.userMarker=null)}openInGoogleMaps(){if(!this.percorso||this.percorso.length<2)return void this.mapManager.onError("Percorso insufficiente per l'apertura in Google Maps.");const e=`${this.percorso[0].lat},${this.percorso[0].lng}`,n=`${this.percorso[this.percorso.length-1].lat},${this.percorso[this.percorso.length-1].lng}`,t=this.percorso.slice(1,-1).map(e=>`${e.lat},${e.lng}`).join("|"),a=new URL("https://www.google.com/maps/dir/");a.searchParams.set("api","1"),a.searchParams.set("origin",e),a.searchParams.set("destination",n),t&&a.searchParams.set("waypoints",t),a.searchParams.set("travelmode",{DRIVING:"driving",BICYCLING:"bicycling",WALKING:"walking",TRANSIT:"transit"}[this.mapManager.travelMode]??"driving"),window.open(a.toString(),"_blank")}},window.API_CLIENT=new e(pathSite+"/api",API_TOKEN),window.API_CLIENT_APP=window.API_CLIENT,window.__t=function(e,n=[]){return r.get(e,n)};t(767),t(8004),t(3286),t(550),t(9118),t(9260),t(4581),t(2347),t(9899),t(9111),t(7187),t(8258),t(734),t(5328),t(5545),t(4315),t(710),t(2981),t(2383),t(7806),t(2879),t(8109),t(6225),t(9196),t(555),t(9676),t(2730);const l=JSON.parse('{"123":63103,"alarm-fill":61697,"alarm":61698,"align-bottom":61699,"align-center":61700,"align-end":61701,"align-middle":61702,"align-start":61703,"align-top":61704,"alt":61705,"app-indicator":61706,"app":61707,"archive-fill":61708,"archive":61709,"arrow-90deg-down":61710,"arrow-90deg-left":61711,"arrow-90deg-right":61712,"arrow-90deg-up":61713,"arrow-bar-down":61714,"arrow-bar-left":61715,"arrow-bar-right":61716,"arrow-bar-up":61717,"arrow-clockwise":61718,"arrow-counterclockwise":61719,"arrow-down-circle-fill":61720,"arrow-down-circle":61721,"arrow-down-left-circle-fill":61722,"arrow-down-left-circle":61723,"arrow-down-left-square-fill":61724,"arrow-down-left-square":61725,"arrow-down-left":61726,"arrow-down-right-circle-fill":61727,"arrow-down-right-circle":61728,"arrow-down-right-square-fill":61729,"arrow-down-right-square":61730,"arrow-down-right":61731,"arrow-down-short":61732,"arrow-down-square-fill":61733,"arrow-down-square":61734,"arrow-down-up":61735,"arrow-down":61736,"arrow-left-circle-fill":61737,"arrow-left-circle":61738,"arrow-left-right":61739,"arrow-left-short":61740,"arrow-left-square-fill":61741,"arrow-left-square":61742,"arrow-left":61743,"arrow-repeat":61744,"arrow-return-left":61745,"arrow-return-right":61746,"arrow-right-circle-fill":61747,"arrow-right-circle":61748,"arrow-right-short":61749,"arrow-right-square-fill":61750,"arrow-right-square":61751,"arrow-right":61752,"arrow-up-circle-fill":61753,"arrow-up-circle":61754,"arrow-up-left-circle-fill":61755,"arrow-up-left-circle":61756,"arrow-up-left-square-fill":61757,"arrow-up-left-square":61758,"arrow-up-left":61759,"arrow-up-right-circle-fill":61760,"arrow-up-right-circle":61761,"arrow-up-right-square-fill":61762,"arrow-up-right-square":61763,"arrow-up-right":61764,"arrow-up-short":61765,"arrow-up-square-fill":61766,"arrow-up-square":61767,"arrow-up":61768,"arrows-angle-contract":61769,"arrows-angle-expand":61770,"arrows-collapse":61771,"arrows-expand":61772,"arrows-fullscreen":61773,"arrows-move":61774,"aspect-ratio-fill":61775,"aspect-ratio":61776,"asterisk":61777,"at":61778,"award-fill":61779,"award":61780,"back":61781,"backspace-fill":61782,"backspace-reverse-fill":61783,"backspace-reverse":61784,"backspace":61785,"badge-3d-fill":61786,"badge-3d":61787,"badge-4k-fill":61788,"badge-4k":61789,"badge-8k-fill":61790,"badge-8k":61791,"badge-ad-fill":61792,"badge-ad":61793,"badge-ar-fill":61794,"badge-ar":61795,"badge-cc-fill":61796,"badge-cc":61797,"badge-hd-fill":61798,"badge-hd":61799,"badge-tm-fill":61800,"badge-tm":61801,"badge-vo-fill":61802,"badge-vo":61803,"badge-vr-fill":61804,"badge-vr":61805,"badge-wc-fill":61806,"badge-wc":61807,"bag-check-fill":61808,"bag-check":61809,"bag-dash-fill":61810,"bag-dash":61811,"bag-fill":61812,"bag-plus-fill":61813,"bag-plus":61814,"bag-x-fill":61815,"bag-x":61816,"bag":61817,"bar-chart-fill":61818,"bar-chart-line-fill":61819,"bar-chart-line":61820,"bar-chart-steps":61821,"bar-chart":61822,"basket-fill":61823,"basket":61824,"basket2-fill":61825,"basket2":61826,"basket3-fill":61827,"basket3":61828,"battery-charging":61829,"battery-full":61830,"battery-half":61831,"battery":61832,"bell-fill":61833,"bell":61834,"bezier":61835,"bezier2":61836,"bicycle":61837,"binoculars-fill":61838,"binoculars":61839,"blockquote-left":61840,"blockquote-right":61841,"book-fill":61842,"book-half":61843,"book":61844,"bookmark-check-fill":61845,"bookmark-check":61846,"bookmark-dash-fill":61847,"bookmark-dash":61848,"bookmark-fill":61849,"bookmark-heart-fill":61850,"bookmark-heart":61851,"bookmark-plus-fill":61852,"bookmark-plus":61853,"bookmark-star-fill":61854,"bookmark-star":61855,"bookmark-x-fill":61856,"bookmark-x":61857,"bookmark":61858,"bookmarks-fill":61859,"bookmarks":61860,"bookshelf":61861,"bootstrap-fill":61862,"bootstrap-reboot":61863,"bootstrap":61864,"border-all":61865,"border-bottom":61866,"border-center":61867,"border-inner":61868,"border-left":61869,"border-middle":61870,"border-outer":61871,"border-right":61872,"border-style":61873,"border-top":61874,"border-width":61875,"border":61876,"bounding-box-circles":61877,"bounding-box":61878,"box-arrow-down-left":61879,"box-arrow-down-right":61880,"box-arrow-down":61881,"box-arrow-in-down-left":61882,"box-arrow-in-down-right":61883,"box-arrow-in-down":61884,"box-arrow-in-left":61885,"box-arrow-in-right":61886,"box-arrow-in-up-left":61887,"box-arrow-in-up-right":61888,"box-arrow-in-up":61889,"box-arrow-left":61890,"box-arrow-right":61891,"box-arrow-up-left":61892,"box-arrow-up-right":61893,"box-arrow-up":61894,"box-seam":61895,"box":61896,"braces":61897,"bricks":61898,"briefcase-fill":61899,"briefcase":61900,"brightness-alt-high-fill":61901,"brightness-alt-high":61902,"brightness-alt-low-fill":61903,"brightness-alt-low":61904,"brightness-high-fill":61905,"brightness-high":61906,"brightness-low-fill":61907,"brightness-low":61908,"broadcast-pin":61909,"broadcast":61910,"brush-fill":61911,"brush":61912,"bucket-fill":61913,"bucket":61914,"bug-fill":61915,"bug":61916,"building":61917,"bullseye":61918,"calculator-fill":61919,"calculator":61920,"calendar-check-fill":61921,"calendar-check":61922,"calendar-date-fill":61923,"calendar-date":61924,"calendar-day-fill":61925,"calendar-day":61926,"calendar-event-fill":61927,"calendar-event":61928,"calendar-fill":61929,"calendar-minus-fill":61930,"calendar-minus":61931,"calendar-month-fill":61932,"calendar-month":61933,"calendar-plus-fill":61934,"calendar-plus":61935,"calendar-range-fill":61936,"calendar-range":61937,"calendar-week-fill":61938,"calendar-week":61939,"calendar-x-fill":61940,"calendar-x":61941,"calendar":61942,"calendar2-check-fill":61943,"calendar2-check":61944,"calendar2-date-fill":61945,"calendar2-date":61946,"calendar2-day-fill":61947,"calendar2-day":61948,"calendar2-event-fill":61949,"calendar2-event":61950,"calendar2-fill":61951,"calendar2-minus-fill":61952,"calendar2-minus":61953,"calendar2-month-fill":61954,"calendar2-month":61955,"calendar2-plus-fill":61956,"calendar2-plus":61957,"calendar2-range-fill":61958,"calendar2-range":61959,"calendar2-week-fill":61960,"calendar2-week":61961,"calendar2-x-fill":61962,"calendar2-x":61963,"calendar2":61964,"calendar3-event-fill":61965,"calendar3-event":61966,"calendar3-fill":61967,"calendar3-range-fill":61968,"calendar3-range":61969,"calendar3-week-fill":61970,"calendar3-week":61971,"calendar3":61972,"calendar4-event":61973,"calendar4-range":61974,"calendar4-week":61975,"calendar4":61976,"camera-fill":61977,"camera-reels-fill":61978,"camera-reels":61979,"camera-video-fill":61980,"camera-video-off-fill":61981,"camera-video-off":61982,"camera-video":61983,"camera":61984,"camera2":61985,"capslock-fill":61986,"capslock":61987,"card-checklist":61988,"card-heading":61989,"card-image":61990,"card-list":61991,"card-text":61992,"caret-down-fill":61993,"caret-down-square-fill":61994,"caret-down-square":61995,"caret-down":61996,"caret-left-fill":61997,"caret-left-square-fill":61998,"caret-left-square":61999,"caret-left":62000,"caret-right-fill":62001,"caret-right-square-fill":62002,"caret-right-square":62003,"caret-right":62004,"caret-up-fill":62005,"caret-up-square-fill":62006,"caret-up-square":62007,"caret-up":62008,"cart-check-fill":62009,"cart-check":62010,"cart-dash-fill":62011,"cart-dash":62012,"cart-fill":62013,"cart-plus-fill":62014,"cart-plus":62015,"cart-x-fill":62016,"cart-x":62017,"cart":62018,"cart2":62019,"cart3":62020,"cart4":62021,"cash-stack":62022,"cash":62023,"cast":62024,"chat-dots-fill":62025,"chat-dots":62026,"chat-fill":62027,"chat-left-dots-fill":62028,"chat-left-dots":62029,"chat-left-fill":62030,"chat-left-quote-fill":62031,"chat-left-quote":62032,"chat-left-text-fill":62033,"chat-left-text":62034,"chat-left":62035,"chat-quote-fill":62036,"chat-quote":62037,"chat-right-dots-fill":62038,"chat-right-dots":62039,"chat-right-fill":62040,"chat-right-quote-fill":62041,"chat-right-quote":62042,"chat-right-text-fill":62043,"chat-right-text":62044,"chat-right":62045,"chat-square-dots-fill":62046,"chat-square-dots":62047,"chat-square-fill":62048,"chat-square-quote-fill":62049,"chat-square-quote":62050,"chat-square-text-fill":62051,"chat-square-text":62052,"chat-square":62053,"chat-text-fill":62054,"chat-text":62055,"chat":62056,"check-all":62057,"check-circle-fill":62058,"check-circle":62059,"check-square-fill":62060,"check-square":62061,"check":62062,"check2-all":62063,"check2-circle":62064,"check2-square":62065,"check2":62066,"chevron-bar-contract":62067,"chevron-bar-down":62068,"chevron-bar-expand":62069,"chevron-bar-left":62070,"chevron-bar-right":62071,"chevron-bar-up":62072,"chevron-compact-down":62073,"chevron-compact-left":62074,"chevron-compact-right":62075,"chevron-compact-up":62076,"chevron-contract":62077,"chevron-double-down":62078,"chevron-double-left":62079,"chevron-double-right":62080,"chevron-double-up":62081,"chevron-down":62082,"chevron-expand":62083,"chevron-left":62084,"chevron-right":62085,"chevron-up":62086,"circle-fill":62087,"circle-half":62088,"circle-square":62089,"circle":62090,"clipboard-check":62091,"clipboard-data":62092,"clipboard-minus":62093,"clipboard-plus":62094,"clipboard-x":62095,"clipboard":62096,"clock-fill":62097,"clock-history":62098,"clock":62099,"cloud-arrow-down-fill":62100,"cloud-arrow-down":62101,"cloud-arrow-up-fill":62102,"cloud-arrow-up":62103,"cloud-check-fill":62104,"cloud-check":62105,"cloud-download-fill":62106,"cloud-download":62107,"cloud-drizzle-fill":62108,"cloud-drizzle":62109,"cloud-fill":62110,"cloud-fog-fill":62111,"cloud-fog":62112,"cloud-fog2-fill":62113,"cloud-fog2":62114,"cloud-hail-fill":62115,"cloud-hail":62116,"cloud-haze-fill":62118,"cloud-haze":62119,"cloud-haze2-fill":62120,"cloud-lightning-fill":62121,"cloud-lightning-rain-fill":62122,"cloud-lightning-rain":62123,"cloud-lightning":62124,"cloud-minus-fill":62125,"cloud-minus":62126,"cloud-moon-fill":62127,"cloud-moon":62128,"cloud-plus-fill":62129,"cloud-plus":62130,"cloud-rain-fill":62131,"cloud-rain-heavy-fill":62132,"cloud-rain-heavy":62133,"cloud-rain":62134,"cloud-slash-fill":62135,"cloud-slash":62136,"cloud-sleet-fill":62137,"cloud-sleet":62138,"cloud-snow-fill":62139,"cloud-snow":62140,"cloud-sun-fill":62141,"cloud-sun":62142,"cloud-upload-fill":62143,"cloud-upload":62144,"cloud":62145,"clouds-fill":62146,"clouds":62147,"cloudy-fill":62148,"cloudy":62149,"code-slash":62150,"code-square":62151,"code":62152,"collection-fill":62153,"collection-play-fill":62154,"collection-play":62155,"collection":62156,"columns-gap":62157,"columns":62158,"command":62159,"compass-fill":62160,"compass":62161,"cone-striped":62162,"cone":62163,"controller":62164,"cpu-fill":62165,"cpu":62166,"credit-card-2-back-fill":62167,"credit-card-2-back":62168,"credit-card-2-front-fill":62169,"credit-card-2-front":62170,"credit-card-fill":62171,"credit-card":62172,"crop":62173,"cup-fill":62174,"cup-straw":62175,"cup":62176,"cursor-fill":62177,"cursor-text":62178,"cursor":62179,"dash-circle-dotted":62180,"dash-circle-fill":62181,"dash-circle":62182,"dash-square-dotted":62183,"dash-square-fill":62184,"dash-square":62185,"dash":62186,"diagram-2-fill":62187,"diagram-2":62188,"diagram-3-fill":62189,"diagram-3":62190,"diamond-fill":62191,"diamond-half":62192,"diamond":62193,"dice-1-fill":62194,"dice-1":62195,"dice-2-fill":62196,"dice-2":62197,"dice-3-fill":62198,"dice-3":62199,"dice-4-fill":62200,"dice-4":62201,"dice-5-fill":62202,"dice-5":62203,"dice-6-fill":62204,"dice-6":62205,"disc-fill":62206,"disc":62207,"discord":62208,"display-fill":62209,"display":62210,"distribute-horizontal":62211,"distribute-vertical":62212,"door-closed-fill":62213,"door-closed":62214,"door-open-fill":62215,"door-open":62216,"dot":62217,"download":62218,"droplet-fill":62219,"droplet-half":62220,"droplet":62221,"earbuds":62222,"easel-fill":62223,"easel":62224,"egg-fill":62225,"egg-fried":62226,"egg":62227,"eject-fill":62228,"eject":62229,"emoji-angry-fill":62230,"emoji-angry":62231,"emoji-dizzy-fill":62232,"emoji-dizzy":62233,"emoji-expressionless-fill":62234,"emoji-expressionless":62235,"emoji-frown-fill":62236,"emoji-frown":62237,"emoji-heart-eyes-fill":62238,"emoji-heart-eyes":62239,"emoji-laughing-fill":62240,"emoji-laughing":62241,"emoji-neutral-fill":62242,"emoji-neutral":62243,"emoji-smile-fill":62244,"emoji-smile-upside-down-fill":62245,"emoji-smile-upside-down":62246,"emoji-smile":62247,"emoji-sunglasses-fill":62248,"emoji-sunglasses":62249,"emoji-wink-fill":62250,"emoji-wink":62251,"envelope-fill":62252,"envelope-open-fill":62253,"envelope-open":62254,"envelope":62255,"eraser-fill":62256,"eraser":62257,"exclamation-circle-fill":62258,"exclamation-circle":62259,"exclamation-diamond-fill":62260,"exclamation-diamond":62261,"exclamation-octagon-fill":62262,"exclamation-octagon":62263,"exclamation-square-fill":62264,"exclamation-square":62265,"exclamation-triangle-fill":62266,"exclamation-triangle":62267,"exclamation":62268,"exclude":62269,"eye-fill":62270,"eye-slash-fill":62271,"eye-slash":62272,"eye":62273,"eyedropper":62274,"eyeglasses":62275,"facebook":62276,"file-arrow-down-fill":62277,"file-arrow-down":62278,"file-arrow-up-fill":62279,"file-arrow-up":62280,"file-bar-graph-fill":62281,"file-bar-graph":62282,"file-binary-fill":62283,"file-binary":62284,"file-break-fill":62285,"file-break":62286,"file-check-fill":62287,"file-check":62288,"file-code-fill":62289,"file-code":62290,"file-diff-fill":62291,"file-diff":62292,"file-earmark-arrow-down-fill":62293,"file-earmark-arrow-down":62294,"file-earmark-arrow-up-fill":62295,"file-earmark-arrow-up":62296,"file-earmark-bar-graph-fill":62297,"file-earmark-bar-graph":62298,"file-earmark-binary-fill":62299,"file-earmark-binary":62300,"file-earmark-break-fill":62301,"file-earmark-break":62302,"file-earmark-check-fill":62303,"file-earmark-check":62304,"file-earmark-code-fill":62305,"file-earmark-code":62306,"file-earmark-diff-fill":62307,"file-earmark-diff":62308,"file-earmark-easel-fill":62309,"file-earmark-easel":62310,"file-earmark-excel-fill":62311,"file-earmark-excel":62312,"file-earmark-fill":62313,"file-earmark-font-fill":62314,"file-earmark-font":62315,"file-earmark-image-fill":62316,"file-earmark-image":62317,"file-earmark-lock-fill":62318,"file-earmark-lock":62319,"file-earmark-lock2-fill":62320,"file-earmark-lock2":62321,"file-earmark-medical-fill":62322,"file-earmark-medical":62323,"file-earmark-minus-fill":62324,"file-earmark-minus":62325,"file-earmark-music-fill":62326,"file-earmark-music":62327,"file-earmark-person-fill":62328,"file-earmark-person":62329,"file-earmark-play-fill":62330,"file-earmark-play":62331,"file-earmark-plus-fill":62332,"file-earmark-plus":62333,"file-earmark-post-fill":62334,"file-earmark-post":62335,"file-earmark-ppt-fill":62336,"file-earmark-ppt":62337,"file-earmark-richtext-fill":62338,"file-earmark-richtext":62339,"file-earmark-ruled-fill":62340,"file-earmark-ruled":62341,"file-earmark-slides-fill":62342,"file-earmark-slides":62343,"file-earmark-spreadsheet-fill":62344,"file-earmark-spreadsheet":62345,"file-earmark-text-fill":62346,"file-earmark-text":62347,"file-earmark-word-fill":62348,"file-earmark-word":62349,"file-earmark-x-fill":62350,"file-earmark-x":62351,"file-earmark-zip-fill":62352,"file-earmark-zip":62353,"file-earmark":62354,"file-easel-fill":62355,"file-easel":62356,"file-excel-fill":62357,"file-excel":62358,"file-fill":62359,"file-font-fill":62360,"file-font":62361,"file-image-fill":62362,"file-image":62363,"file-lock-fill":62364,"file-lock":62365,"file-lock2-fill":62366,"file-lock2":62367,"file-medical-fill":62368,"file-medical":62369,"file-minus-fill":62370,"file-minus":62371,"file-music-fill":62372,"file-music":62373,"file-person-fill":62374,"file-person":62375,"file-play-fill":62376,"file-play":62377,"file-plus-fill":62378,"file-plus":62379,"file-post-fill":62380,"file-post":62381,"file-ppt-fill":62382,"file-ppt":62383,"file-richtext-fill":62384,"file-richtext":62385,"file-ruled-fill":62386,"file-ruled":62387,"file-slides-fill":62388,"file-slides":62389,"file-spreadsheet-fill":62390,"file-spreadsheet":62391,"file-text-fill":62392,"file-text":62393,"file-word-fill":62394,"file-word":62395,"file-x-fill":62396,"file-x":62397,"file-zip-fill":62398,"file-zip":62399,"file":62400,"files-alt":62401,"files":62402,"film":62403,"filter-circle-fill":62404,"filter-circle":62405,"filter-left":62406,"filter-right":62407,"filter-square-fill":62408,"filter-square":62409,"filter":62410,"flag-fill":62411,"flag":62412,"flower1":62413,"flower2":62414,"flower3":62415,"folder-check":62416,"folder-fill":62417,"folder-minus":62418,"folder-plus":62419,"folder-symlink-fill":62420,"folder-symlink":62421,"folder-x":62422,"folder":62423,"folder2-open":62424,"folder2":62425,"fonts":62426,"forward-fill":62427,"forward":62428,"front":62429,"fullscreen-exit":62430,"fullscreen":62431,"funnel-fill":62432,"funnel":62433,"gear-fill":62434,"gear-wide-connected":62435,"gear-wide":62436,"gear":62437,"gem":62438,"geo-alt-fill":62439,"geo-alt":62440,"geo-fill":62441,"geo":62442,"gift-fill":62443,"gift":62444,"github":62445,"globe":62446,"globe2":62447,"google":62448,"graph-down":62449,"graph-up":62450,"grid-1x2-fill":62451,"grid-1x2":62452,"grid-3x2-gap-fill":62453,"grid-3x2-gap":62454,"grid-3x2":62455,"grid-3x3-gap-fill":62456,"grid-3x3-gap":62457,"grid-3x3":62458,"grid-fill":62459,"grid":62460,"grip-horizontal":62461,"grip-vertical":62462,"hammer":62463,"hand-index-fill":62464,"hand-index-thumb-fill":62465,"hand-index-thumb":62466,"hand-index":62467,"hand-thumbs-down-fill":62468,"hand-thumbs-down":62469,"hand-thumbs-up-fill":62470,"hand-thumbs-up":62471,"handbag-fill":62472,"handbag":62473,"hash":62474,"hdd-fill":62475,"hdd-network-fill":62476,"hdd-network":62477,"hdd-rack-fill":62478,"hdd-rack":62479,"hdd-stack-fill":62480,"hdd-stack":62481,"hdd":62482,"headphones":62483,"headset":62484,"heart-fill":62485,"heart-half":62486,"heart":62487,"heptagon-fill":62488,"heptagon-half":62489,"heptagon":62490,"hexagon-fill":62491,"hexagon-half":62492,"hexagon":62493,"hourglass-bottom":62494,"hourglass-split":62495,"hourglass-top":62496,"hourglass":62497,"house-door-fill":62498,"house-door":62499,"house-fill":62500,"house":62501,"hr":62502,"hurricane":62503,"image-alt":62504,"image-fill":62505,"image":62506,"images":62507,"inbox-fill":62508,"inbox":62509,"inboxes-fill":62510,"inboxes":62511,"info-circle-fill":62512,"info-circle":62513,"info-square-fill":62514,"info-square":62515,"info":62516,"input-cursor-text":62517,"input-cursor":62518,"instagram":62519,"intersect":62520,"journal-album":62521,"journal-arrow-down":62522,"journal-arrow-up":62523,"journal-bookmark-fill":62524,"journal-bookmark":62525,"journal-check":62526,"journal-code":62527,"journal-medical":62528,"journal-minus":62529,"journal-plus":62530,"journal-richtext":62531,"journal-text":62532,"journal-x":62533,"journal":62534,"journals":62535,"joystick":62536,"justify-left":62537,"justify-right":62538,"justify":62539,"kanban-fill":62540,"kanban":62541,"key-fill":62542,"key":62543,"keyboard-fill":62544,"keyboard":62545,"ladder":62546,"lamp-fill":62547,"lamp":62548,"laptop-fill":62549,"laptop":62550,"layer-backward":62551,"layer-forward":62552,"layers-fill":62553,"layers-half":62554,"layers":62555,"layout-sidebar-inset-reverse":62556,"layout-sidebar-inset":62557,"layout-sidebar-reverse":62558,"layout-sidebar":62559,"layout-split":62560,"layout-text-sidebar-reverse":62561,"layout-text-sidebar":62562,"layout-text-window-reverse":62563,"layout-text-window":62564,"layout-three-columns":62565,"layout-wtf":62566,"life-preserver":62567,"lightbulb-fill":62568,"lightbulb-off-fill":62569,"lightbulb-off":62570,"lightbulb":62571,"lightning-charge-fill":62572,"lightning-charge":62573,"lightning-fill":62574,"lightning":62575,"link-45deg":62576,"link":62577,"linkedin":62578,"list-check":62579,"list-nested":62580,"list-ol":62581,"list-stars":62582,"list-task":62583,"list-ul":62584,"list":62585,"lock-fill":62586,"lock":62587,"mailbox":62588,"mailbox2":62589,"map-fill":62590,"map":62591,"markdown-fill":62592,"markdown":62593,"mask":62594,"megaphone-fill":62595,"megaphone":62596,"menu-app-fill":62597,"menu-app":62598,"menu-button-fill":62599,"menu-button-wide-fill":62600,"menu-button-wide":62601,"menu-button":62602,"menu-down":62603,"menu-up":62604,"mic-fill":62605,"mic-mute-fill":62606,"mic-mute":62607,"mic":62608,"minecart-loaded":62609,"minecart":62610,"moisture":62611,"moon-fill":62612,"moon-stars-fill":62613,"moon-stars":62614,"moon":62615,"mouse-fill":62616,"mouse":62617,"mouse2-fill":62618,"mouse2":62619,"mouse3-fill":62620,"mouse3":62621,"music-note-beamed":62622,"music-note-list":62623,"music-note":62624,"music-player-fill":62625,"music-player":62626,"newspaper":62627,"node-minus-fill":62628,"node-minus":62629,"node-plus-fill":62630,"node-plus":62631,"nut-fill":62632,"nut":62633,"octagon-fill":62634,"octagon-half":62635,"octagon":62636,"option":62637,"outlet":62638,"paint-bucket":62639,"palette-fill":62640,"palette":62641,"palette2":62642,"paperclip":62643,"paragraph":62644,"patch-check-fill":62645,"patch-check":62646,"patch-exclamation-fill":62647,"patch-exclamation":62648,"patch-minus-fill":62649,"patch-minus":62650,"patch-plus-fill":62651,"patch-plus":62652,"patch-question-fill":62653,"patch-question":62654,"pause-btn-fill":62655,"pause-btn":62656,"pause-circle-fill":62657,"pause-circle":62658,"pause-fill":62659,"pause":62660,"peace-fill":62661,"peace":62662,"pen-fill":62663,"pen":62664,"pencil-fill":62665,"pencil-square":62666,"pencil":62667,"pentagon-fill":62668,"pentagon-half":62669,"pentagon":62670,"people-fill":62671,"people":62672,"percent":62673,"person-badge-fill":62674,"person-badge":62675,"person-bounding-box":62676,"person-check-fill":62677,"person-check":62678,"person-circle":62679,"person-dash-fill":62680,"person-dash":62681,"person-fill":62682,"person-lines-fill":62683,"person-plus-fill":62684,"person-plus":62685,"person-square":62686,"person-x-fill":62687,"person-x":62688,"person":62689,"phone-fill":62690,"phone-landscape-fill":62691,"phone-landscape":62692,"phone-vibrate-fill":62693,"phone-vibrate":62694,"phone":62695,"pie-chart-fill":62696,"pie-chart":62697,"pin-angle-fill":62698,"pin-angle":62699,"pin-fill":62700,"pin":62701,"pip-fill":62702,"pip":62703,"play-btn-fill":62704,"play-btn":62705,"play-circle-fill":62706,"play-circle":62707,"play-fill":62708,"play":62709,"plug-fill":62710,"plug":62711,"plus-circle-dotted":62712,"plus-circle-fill":62713,"plus-circle":62714,"plus-square-dotted":62715,"plus-square-fill":62716,"plus-square":62717,"plus":62718,"power":62719,"printer-fill":62720,"printer":62721,"puzzle-fill":62722,"puzzle":62723,"question-circle-fill":62724,"question-circle":62725,"question-diamond-fill":62726,"question-diamond":62727,"question-octagon-fill":62728,"question-octagon":62729,"question-square-fill":62730,"question-square":62731,"question":62732,"rainbow":62733,"receipt-cutoff":62734,"receipt":62735,"reception-0":62736,"reception-1":62737,"reception-2":62738,"reception-3":62739,"reception-4":62740,"record-btn-fill":62741,"record-btn":62742,"record-circle-fill":62743,"record-circle":62744,"record-fill":62745,"record":62746,"record2-fill":62747,"record2":62748,"reply-all-fill":62749,"reply-all":62750,"reply-fill":62751,"reply":62752,"rss-fill":62753,"rss":62754,"rulers":62755,"save-fill":62756,"save":62757,"save2-fill":62758,"save2":62759,"scissors":62760,"screwdriver":62761,"search":62762,"segmented-nav":62763,"server":62764,"share-fill":62765,"share":62766,"shield-check":62767,"shield-exclamation":62768,"shield-fill-check":62769,"shield-fill-exclamation":62770,"shield-fill-minus":62771,"shield-fill-plus":62772,"shield-fill-x":62773,"shield-fill":62774,"shield-lock-fill":62775,"shield-lock":62776,"shield-minus":62777,"shield-plus":62778,"shield-shaded":62779,"shield-slash-fill":62780,"shield-slash":62781,"shield-x":62782,"shield":62783,"shift-fill":62784,"shift":62785,"shop-window":62786,"shop":62787,"shuffle":62788,"signpost-2-fill":62789,"signpost-2":62790,"signpost-fill":62791,"signpost-split-fill":62792,"signpost-split":62793,"signpost":62794,"sim-fill":62795,"sim":62796,"skip-backward-btn-fill":62797,"skip-backward-btn":62798,"skip-backward-circle-fill":62799,"skip-backward-circle":62800,"skip-backward-fill":62801,"skip-backward":62802,"skip-end-btn-fill":62803,"skip-end-btn":62804,"skip-end-circle-fill":62805,"skip-end-circle":62806,"skip-end-fill":62807,"skip-end":62808,"skip-forward-btn-fill":62809,"skip-forward-btn":62810,"skip-forward-circle-fill":62811,"skip-forward-circle":62812,"skip-forward-fill":62813,"skip-forward":62814,"skip-start-btn-fill":62815,"skip-start-btn":62816,"skip-start-circle-fill":62817,"skip-start-circle":62818,"skip-start-fill":62819,"skip-start":62820,"slack":62821,"slash-circle-fill":62822,"slash-circle":62823,"slash-square-fill":62824,"slash-square":62825,"slash":62826,"sliders":62827,"smartwatch":62828,"snow":62829,"snow2":62830,"snow3":62831,"sort-alpha-down-alt":62832,"sort-alpha-down":62833,"sort-alpha-up-alt":62834,"sort-alpha-up":62835,"sort-down-alt":62836,"sort-down":62837,"sort-numeric-down-alt":62838,"sort-numeric-down":62839,"sort-numeric-up-alt":62840,"sort-numeric-up":62841,"sort-up-alt":62842,"sort-up":62843,"soundwave":62844,"speaker-fill":62845,"speaker":62846,"speedometer":62847,"speedometer2":62848,"spellcheck":62849,"square-fill":62850,"square-half":62851,"square":62852,"stack":62853,"star-fill":62854,"star-half":62855,"star":62856,"stars":62857,"stickies-fill":62858,"stickies":62859,"sticky-fill":62860,"sticky":62861,"stop-btn-fill":62862,"stop-btn":62863,"stop-circle-fill":62864,"stop-circle":62865,"stop-fill":62866,"stop":62867,"stoplights-fill":62868,"stoplights":62869,"stopwatch-fill":62870,"stopwatch":62871,"subtract":62872,"suit-club-fill":62873,"suit-club":62874,"suit-diamond-fill":62875,"suit-diamond":62876,"suit-heart-fill":62877,"suit-heart":62878,"suit-spade-fill":62879,"suit-spade":62880,"sun-fill":62881,"sun":62882,"sunglasses":62883,"sunrise-fill":62884,"sunrise":62885,"sunset-fill":62886,"sunset":62887,"symmetry-horizontal":62888,"symmetry-vertical":62889,"table":62890,"tablet-fill":62891,"tablet-landscape-fill":62892,"tablet-landscape":62893,"tablet":62894,"tag-fill":62895,"tag":62896,"tags-fill":62897,"tags":62898,"telegram":62899,"telephone-fill":62900,"telephone-forward-fill":62901,"telephone-forward":62902,"telephone-inbound-fill":62903,"telephone-inbound":62904,"telephone-minus-fill":62905,"telephone-minus":62906,"telephone-outbound-fill":62907,"telephone-outbound":62908,"telephone-plus-fill":62909,"telephone-plus":62910,"telephone-x-fill":62911,"telephone-x":62912,"telephone":62913,"terminal-fill":62914,"terminal":62915,"text-center":62916,"text-indent-left":62917,"text-indent-right":62918,"text-left":62919,"text-paragraph":62920,"text-right":62921,"textarea-resize":62922,"textarea-t":62923,"textarea":62924,"thermometer-half":62925,"thermometer-high":62926,"thermometer-low":62927,"thermometer-snow":62928,"thermometer-sun":62929,"thermometer":62930,"three-dots-vertical":62931,"three-dots":62932,"toggle-off":62933,"toggle-on":62934,"toggle2-off":62935,"toggle2-on":62936,"toggles":62937,"toggles2":62938,"tools":62939,"tornado":62940,"trash-fill":62941,"trash":62942,"trash2-fill":62943,"trash2":62944,"tree-fill":62945,"tree":62946,"triangle-fill":62947,"triangle-half":62948,"triangle":62949,"trophy-fill":62950,"trophy":62951,"tropical-storm":62952,"truck-flatbed":62953,"truck":62954,"tsunami":62955,"tv-fill":62956,"tv":62957,"twitch":62958,"twitter":62959,"type-bold":62960,"type-h1":62961,"type-h2":62962,"type-h3":62963,"type-italic":62964,"type-strikethrough":62965,"type-underline":62966,"type":62967,"ui-checks-grid":62968,"ui-checks":62969,"ui-radios-grid":62970,"ui-radios":62971,"umbrella-fill":62972,"umbrella":62973,"union":62974,"unlock-fill":62975,"unlock":62976,"upc-scan":62977,"upc":62978,"upload":62979,"vector-pen":62980,"view-list":62981,"view-stacked":62982,"vinyl-fill":62983,"vinyl":62984,"voicemail":62985,"volume-down-fill":62986,"volume-down":62987,"volume-mute-fill":62988,"volume-mute":62989,"volume-off-fill":62990,"volume-off":62991,"volume-up-fill":62992,"volume-up":62993,"vr":62994,"wallet-fill":62995,"wallet":62996,"wallet2":62997,"watch":62998,"water":62999,"whatsapp":63000,"wifi-1":63001,"wifi-2":63002,"wifi-off":63003,"wifi":63004,"wind":63005,"window-dock":63006,"window-sidebar":63007,"window":63008,"wrench":63009,"x-circle-fill":63010,"x-circle":63011,"x-diamond-fill":63012,"x-diamond":63013,"x-octagon-fill":63014,"x-octagon":63015,"x-square-fill":63016,"x-square":63017,"x":63018,"youtube":63019,"zoom-in":63020,"zoom-out":63021,"bank":63022,"bank2":63023,"bell-slash-fill":63024,"bell-slash":63025,"cash-coin":63026,"check-lg":63027,"coin":63028,"currency-bitcoin":63029,"currency-dollar":63030,"currency-euro":63031,"currency-exchange":63032,"currency-pound":63033,"currency-yen":63034,"dash-lg":63035,"exclamation-lg":63036,"file-earmark-pdf-fill":63037,"file-earmark-pdf":63038,"file-pdf-fill":63039,"file-pdf":63040,"gender-ambiguous":63041,"gender-female":63042,"gender-male":63043,"gender-trans":63044,"headset-vr":63045,"info-lg":63046,"mastodon":63047,"messenger":63048,"piggy-bank-fill":63049,"piggy-bank":63050,"pin-map-fill":63051,"pin-map":63052,"plus-lg":63053,"question-lg":63054,"recycle":63055,"reddit":63056,"safe-fill":63057,"safe2-fill":63058,"safe2":63059,"sd-card-fill":63060,"sd-card":63061,"skype":63062,"slash-lg":63063,"translate":63064,"x-lg":63065,"safe":63066,"apple":63067,"microsoft":63069,"windows":63070,"behance":63068,"dribbble":63071,"line":63072,"medium":63073,"paypal":63074,"pinterest":63075,"signal":63076,"snapchat":63077,"spotify":63078,"stack-overflow":63079,"strava":63080,"wordpress":63081,"vimeo":63082,"activity":63083,"easel2-fill":63084,"easel2":63085,"easel3-fill":63086,"easel3":63087,"fan":63088,"fingerprint":63089,"graph-down-arrow":63090,"graph-up-arrow":63091,"hypnotize":63092,"magic":63093,"person-rolodex":63094,"person-video":63095,"person-video2":63096,"person-video3":63097,"person-workspace":63098,"radioactive":63099,"webcam-fill":63100,"webcam":63101,"yin-yang":63102,"bandaid-fill":63104,"bandaid":63105,"bluetooth":63106,"body-text":63107,"boombox":63108,"boxes":63109,"dpad-fill":63110,"dpad":63111,"ear-fill":63112,"ear":63113,"envelope-check-fill":63115,"envelope-check":63116,"envelope-dash-fill":63118,"envelope-dash":63119,"envelope-exclamation-fill":63121,"envelope-exclamation":63122,"envelope-plus-fill":63123,"envelope-plus":63124,"envelope-slash-fill":63126,"envelope-slash":63127,"envelope-x-fill":63129,"envelope-x":63130,"explicit-fill":63131,"explicit":63132,"git":63133,"infinity":63134,"list-columns-reverse":63135,"list-columns":63136,"meta":63137,"nintendo-switch":63140,"pc-display-horizontal":63141,"pc-display":63142,"pc-horizontal":63143,"pc":63144,"playstation":63145,"plus-slash-minus":63146,"projector-fill":63147,"projector":63148,"qr-code-scan":63149,"qr-code":63150,"quora":63151,"quote":63152,"robot":63153,"send-check-fill":63154,"send-check":63155,"send-dash-fill":63156,"send-dash":63157,"send-exclamation-fill":63159,"send-exclamation":63160,"send-fill":63161,"send-plus-fill":63162,"send-plus":63163,"send-slash-fill":63164,"send-slash":63165,"send-x-fill":63166,"send-x":63167,"send":63168,"steam":63169,"terminal-dash":63171,"terminal-plus":63172,"terminal-split":63173,"ticket-detailed-fill":63174,"ticket-detailed":63175,"ticket-fill":63176,"ticket-perforated-fill":63177,"ticket-perforated":63178,"ticket":63179,"tiktok":63180,"window-dash":63181,"window-desktop":63182,"window-fullscreen":63183,"window-plus":63184,"window-split":63185,"window-stack":63186,"window-x":63187,"xbox":63188,"ethernet":63189,"hdmi-fill":63190,"hdmi":63191,"usb-c-fill":63192,"usb-c":63193,"usb-fill":63194,"usb-plug-fill":63195,"usb-plug":63196,"usb-symbol":63197,"usb":63198,"boombox-fill":63199,"displayport":63201,"gpu-card":63202,"memory":63203,"modem-fill":63204,"modem":63205,"motherboard-fill":63206,"motherboard":63207,"optical-audio-fill":63208,"optical-audio":63209,"pci-card":63210,"router-fill":63211,"router":63212,"thunderbolt-fill":63215,"thunderbolt":63216,"usb-drive-fill":63217,"usb-drive":63218,"usb-micro-fill":63219,"usb-micro":63220,"usb-mini-fill":63221,"usb-mini":63222,"cloud-haze2":63223,"device-hdd-fill":63224,"device-hdd":63225,"device-ssd-fill":63226,"device-ssd":63227,"displayport-fill":63228,"mortarboard-fill":63229,"mortarboard":63230,"terminal-x":63231,"arrow-through-heart-fill":63232,"arrow-through-heart":63233,"badge-sd-fill":63234,"badge-sd":63235,"bag-heart-fill":63236,"bag-heart":63237,"balloon-fill":63238,"balloon-heart-fill":63239,"balloon-heart":63240,"balloon":63241,"box2-fill":63242,"box2-heart-fill":63243,"box2-heart":63244,"box2":63245,"braces-asterisk":63246,"calendar-heart-fill":63247,"calendar-heart":63248,"calendar2-heart-fill":63249,"calendar2-heart":63250,"chat-heart-fill":63251,"chat-heart":63252,"chat-left-heart-fill":63253,"chat-left-heart":63254,"chat-right-heart-fill":63255,"chat-right-heart":63256,"chat-square-heart-fill":63257,"chat-square-heart":63258,"clipboard-check-fill":63259,"clipboard-data-fill":63260,"clipboard-fill":63261,"clipboard-heart-fill":63262,"clipboard-heart":63263,"clipboard-minus-fill":63264,"clipboard-plus-fill":63265,"clipboard-pulse":63266,"clipboard-x-fill":63267,"clipboard2-check-fill":63268,"clipboard2-check":63269,"clipboard2-data-fill":63270,"clipboard2-data":63271,"clipboard2-fill":63272,"clipboard2-heart-fill":63273,"clipboard2-heart":63274,"clipboard2-minus-fill":63275,"clipboard2-minus":63276,"clipboard2-plus-fill":63277,"clipboard2-plus":63278,"clipboard2-pulse-fill":63279,"clipboard2-pulse":63280,"clipboard2-x-fill":63281,"clipboard2-x":63282,"clipboard2":63283,"emoji-kiss-fill":63284,"emoji-kiss":63285,"envelope-heart-fill":63286,"envelope-heart":63287,"envelope-open-heart-fill":63288,"envelope-open-heart":63289,"envelope-paper-fill":63290,"envelope-paper-heart-fill":63291,"envelope-paper-heart":63292,"envelope-paper":63293,"filetype-aac":63294,"filetype-ai":63295,"filetype-bmp":63296,"filetype-cs":63297,"filetype-css":63298,"filetype-csv":63299,"filetype-doc":63300,"filetype-docx":63301,"filetype-exe":63302,"filetype-gif":63303,"filetype-heic":63304,"filetype-html":63305,"filetype-java":63306,"filetype-jpg":63307,"filetype-js":63308,"filetype-jsx":63309,"filetype-key":63310,"filetype-m4p":63311,"filetype-md":63312,"filetype-mdx":63313,"filetype-mov":63314,"filetype-mp3":63315,"filetype-mp4":63316,"filetype-otf":63317,"filetype-pdf":63318,"filetype-php":63319,"filetype-png":63320,"filetype-ppt":63322,"filetype-psd":63323,"filetype-py":63324,"filetype-raw":63325,"filetype-rb":63326,"filetype-sass":63327,"filetype-scss":63328,"filetype-sh":63329,"filetype-svg":63330,"filetype-tiff":63331,"filetype-tsx":63332,"filetype-ttf":63333,"filetype-txt":63334,"filetype-wav":63335,"filetype-woff":63336,"filetype-xls":63338,"filetype-xml":63339,"filetype-yml":63340,"heart-arrow":63341,"heart-pulse-fill":63342,"heart-pulse":63343,"heartbreak-fill":63344,"heartbreak":63345,"hearts":63346,"hospital-fill":63347,"hospital":63348,"house-heart-fill":63349,"house-heart":63350,"incognito":63351,"magnet-fill":63352,"magnet":63353,"person-heart":63354,"person-hearts":63355,"phone-flip":63356,"plugin":63357,"postage-fill":63358,"postage-heart-fill":63359,"postage-heart":63360,"postage":63361,"postcard-fill":63362,"postcard-heart-fill":63363,"postcard-heart":63364,"postcard":63365,"search-heart-fill":63366,"search-heart":63367,"sliders2-vertical":63368,"sliders2":63369,"trash3-fill":63370,"trash3":63371,"valentine":63372,"valentine2":63373,"wrench-adjustable-circle-fill":63374,"wrench-adjustable-circle":63375,"wrench-adjustable":63376,"filetype-json":63377,"filetype-pptx":63378,"filetype-xlsx":63379,"1-circle-fill":63382,"1-circle":63383,"1-square-fill":63384,"1-square":63385,"2-circle-fill":63388,"2-circle":63389,"2-square-fill":63390,"2-square":63391,"3-circle-fill":63394,"3-circle":63395,"3-square-fill":63396,"3-square":63397,"4-circle-fill":63400,"4-circle":63401,"4-square-fill":63402,"4-square":63403,"5-circle-fill":63406,"5-circle":63407,"5-square-fill":63408,"5-square":63409,"6-circle-fill":63412,"6-circle":63413,"6-square-fill":63414,"6-square":63415,"7-circle-fill":63418,"7-circle":63419,"7-square-fill":63420,"7-square":63421,"8-circle-fill":63424,"8-circle":63425,"8-square-fill":63426,"8-square":63427,"9-circle-fill":63430,"9-circle":63431,"9-square-fill":63432,"9-square":63433,"airplane-engines-fill":63434,"airplane-engines":63435,"airplane-fill":63436,"airplane":63437,"alexa":63438,"alipay":63439,"android":63440,"android2":63441,"box-fill":63442,"box-seam-fill":63443,"browser-chrome":63444,"browser-edge":63445,"browser-firefox":63446,"browser-safari":63447,"c-circle-fill":63450,"c-circle":63451,"c-square-fill":63452,"c-square":63453,"capsule-pill":63454,"capsule":63455,"car-front-fill":63456,"car-front":63457,"cassette-fill":63458,"cassette":63459,"cc-circle-fill":63462,"cc-circle":63463,"cc-square-fill":63464,"cc-square":63465,"cup-hot-fill":63466,"cup-hot":63467,"currency-rupee":63468,"dropbox":63469,"escape":63470,"fast-forward-btn-fill":63471,"fast-forward-btn":63472,"fast-forward-circle-fill":63473,"fast-forward-circle":63474,"fast-forward-fill":63475,"fast-forward":63476,"filetype-sql":63477,"fire":63478,"google-play":63479,"h-circle-fill":63482,"h-circle":63483,"h-square-fill":63484,"h-square":63485,"indent":63486,"lungs-fill":63487,"lungs":63488,"microsoft-teams":63489,"p-circle-fill":63492,"p-circle":63493,"p-square-fill":63494,"p-square":63495,"pass-fill":63496,"pass":63497,"prescription":63498,"prescription2":63499,"r-circle-fill":63502,"r-circle":63503,"r-square-fill":63504,"r-square":63505,"repeat-1":63506,"repeat":63507,"rewind-btn-fill":63508,"rewind-btn":63509,"rewind-circle-fill":63510,"rewind-circle":63511,"rewind-fill":63512,"rewind":63513,"train-freight-front-fill":63514,"train-freight-front":63515,"train-front-fill":63516,"train-front":63517,"train-lightrail-front-fill":63518,"train-lightrail-front":63519,"truck-front-fill":63520,"truck-front":63521,"ubuntu":63522,"unindent":63523,"unity":63524,"universal-access-circle":63525,"universal-access":63526,"virus":63527,"virus2":63528,"wechat":63529,"yelp":63530,"sign-stop-fill":63531,"sign-stop-lights-fill":63532,"sign-stop-lights":63533,"sign-stop":63534,"sign-turn-left-fill":63535,"sign-turn-left":63536,"sign-turn-right-fill":63537,"sign-turn-right":63538,"sign-turn-slight-left-fill":63539,"sign-turn-slight-left":63540,"sign-turn-slight-right-fill":63541,"sign-turn-slight-right":63542,"sign-yield-fill":63543,"sign-yield":63544,"ev-station-fill":63545,"ev-station":63546,"fuel-pump-diesel-fill":63547,"fuel-pump-diesel":63548,"fuel-pump-fill":63549,"fuel-pump":63550,"0-circle-fill":63551,"0-circle":63552,"0-square-fill":63553,"0-square":63554,"rocket-fill":63555,"rocket-takeoff-fill":63556,"rocket-takeoff":63557,"rocket":63558,"stripe":63559,"subscript":63560,"superscript":63561,"trello":63562,"envelope-at-fill":63563,"envelope-at":63564,"regex":63565,"text-wrap":63566,"sign-dead-end-fill":63567,"sign-dead-end":63568,"sign-do-not-enter-fill":63569,"sign-do-not-enter":63570,"sign-intersection-fill":63571,"sign-intersection-side-fill":63572,"sign-intersection-side":63573,"sign-intersection-t-fill":63574,"sign-intersection-t":63575,"sign-intersection-y-fill":63576,"sign-intersection-y":63577,"sign-intersection":63578,"sign-merge-left-fill":63579,"sign-merge-left":63580,"sign-merge-right-fill":63581,"sign-merge-right":63582,"sign-no-left-turn-fill":63583,"sign-no-left-turn":63584,"sign-no-parking-fill":63585,"sign-no-parking":63586,"sign-no-right-turn-fill":63587,"sign-no-right-turn":63588,"sign-railroad-fill":63589,"sign-railroad":63590,"building-add":63591,"building-check":63592,"building-dash":63593,"building-down":63594,"building-exclamation":63595,"building-fill-add":63596,"building-fill-check":63597,"building-fill-dash":63598,"building-fill-down":63599,"building-fill-exclamation":63600,"building-fill-gear":63601,"building-fill-lock":63602,"building-fill-slash":63603,"building-fill-up":63604,"building-fill-x":63605,"building-fill":63606,"building-gear":63607,"building-lock":63608,"building-slash":63609,"building-up":63610,"building-x":63611,"buildings-fill":63612,"buildings":63613,"bus-front-fill":63614,"bus-front":63615,"ev-front-fill":63616,"ev-front":63617,"globe-americas":63618,"globe-asia-australia":63619,"globe-central-south-asia":63620,"globe-europe-africa":63621,"house-add-fill":63622,"house-add":63623,"house-check-fill":63624,"house-check":63625,"house-dash-fill":63626,"house-dash":63627,"house-down-fill":63628,"house-down":63629,"house-exclamation-fill":63630,"house-exclamation":63631,"house-gear-fill":63632,"house-gear":63633,"house-lock-fill":63634,"house-lock":63635,"house-slash-fill":63636,"house-slash":63637,"house-up-fill":63638,"house-up":63639,"house-x-fill":63640,"house-x":63641,"person-add":63642,"person-down":63643,"person-exclamation":63644,"person-fill-add":63645,"person-fill-check":63646,"person-fill-dash":63647,"person-fill-down":63648,"person-fill-exclamation":63649,"person-fill-gear":63650,"person-fill-lock":63651,"person-fill-slash":63652,"person-fill-up":63653,"person-fill-x":63654,"person-gear":63655,"person-lock":63656,"person-slash":63657,"person-up":63658,"scooter":63659,"taxi-front-fill":63660,"taxi-front":63661,"amd":63662,"database-add":63663,"database-check":63664,"database-dash":63665,"database-down":63666,"database-exclamation":63667,"database-fill-add":63668,"database-fill-check":63669,"database-fill-dash":63670,"database-fill-down":63671,"database-fill-exclamation":63672,"database-fill-gear":63673,"database-fill-lock":63674,"database-fill-slash":63675,"database-fill-up":63676,"database-fill-x":63677,"database-fill":63678,"database-gear":63679,"database-lock":63680,"database-slash":63681,"database-up":63682,"database-x":63683,"database":63684,"houses-fill":63685,"houses":63686,"nvidia":63687,"person-vcard-fill":63688,"person-vcard":63689,"sina-weibo":63690,"tencent-qq":63691,"wikipedia":63692,"alphabet-uppercase":62117,"alphabet":63114,"amazon":63117,"arrows-collapse-vertical":63120,"arrows-expand-vertical":63125,"arrows-vertical":63128,"arrows":63138,"ban-fill":63139,"ban":63158,"bing":63170,"cake":63200,"cake2":63213,"cookie":63214,"copy":63321,"crosshair":63337,"crosshair2":63380,"emoji-astonished-fill":63381,"emoji-astonished":63386,"emoji-grimace-fill":63387,"emoji-grimace":63392,"emoji-grin-fill":63393,"emoji-grin":63398,"emoji-surprise-fill":63399,"emoji-surprise":63404,"emoji-tear-fill":63405,"emoji-tear":63410,"envelope-arrow-down-fill":63411,"envelope-arrow-down":63416,"envelope-arrow-up-fill":63417,"envelope-arrow-up":63422,"feather":63423,"feather2":63428,"floppy-fill":63429,"floppy":63448,"floppy2-fill":63449,"floppy2":63460,"gitlab":63461,"highlighter":63480,"marker-tip":63490,"nvme-fill":63491,"nvme":63500,"opencollective":63501,"pci-card-network":63693,"pci-card-sound":63694,"radar":63695,"send-arrow-down-fill":63696,"send-arrow-down":63697,"send-arrow-up-fill":63698,"send-arrow-up":63699,"sim-slash-fill":63700,"sim-slash":63701,"sourceforge":63702,"substack":63703,"threads-fill":63704,"threads":63705,"transparency":63706,"twitter-x":63707,"type-h4":63708,"type-h5":63709,"type-h6":63710,"backpack-fill":63711,"backpack":63712,"backpack2-fill":63713,"backpack2":63714,"backpack3-fill":63715,"backpack3":63716,"backpack4-fill":63717,"backpack4":63718,"brilliance":63719,"cake-fill":63720,"cake2-fill":63721,"duffle-fill":63722,"duffle":63723,"exposure":63724,"gender-neuter":63725,"highlights":63726,"luggage-fill":63727,"luggage":63728,"mailbox-flag":63729,"mailbox2-flag":63730,"noise-reduction":63731,"passport-fill":63732,"passport":63733,"person-arms-up":63734,"person-raised-hand":63735,"person-standing-dress":63736,"person-standing":63737,"person-walking":63738,"person-wheelchair":63739,"shadows":63740,"suitcase-fill":63741,"suitcase-lg-fill":63742,"suitcase-lg":63743,"suitcase":63744,"suitcase2-fill":63745,"suitcase2":63746,"vignette":63747}');class s{modalText={add:{title:"Nuovo indirizzo"},modify:{title:"Modifica indirizzo"},delete:{title:"Elimina indirizzo",description:"Vuoi eliminare il seguente indirizzo:"}};constructor(e,n="address_",t=!1){this.container=e,this.prefix=n,this.required=t,this.container.querySelector('input[name="'+this.prefix+'id"]')&&(this.id=this.container.querySelector('input[name="'+this.prefix+'id"]')),this.name=this.container.querySelector('input[name="'+this.prefix+'name"]'),this.surname=this.container.querySelector('input[name="'+this.prefix+'surname"]'),this.country=this.container.querySelector('select[name="'+this.prefix+'country"]'),this.province=this.container.querySelector('select[name="'+this.prefix+'province"]'),this.cap=this.container.querySelector('input[name="'+this.prefix+'cap"]'),this.city=this.container.querySelector('input[name="'+this.prefix+'city"]'),this.street=this.container.querySelector('input[name="'+this.prefix+'street"]'),this.number=this.container.querySelector('input[name="'+this.prefix+'number"]'),this.phonePrefix=this.container.querySelector('select[name="'+this.prefix+'phone_prefix"]'),this.phone=this.container.querySelector('input[name="'+this.prefix+'phone"]'),this.container.querySelector('input[name="'+this.prefix+'more"]')&&(this.more=this.container.querySelector('input[name="'+this.prefix+'more"]'))}setForm(e){this.id.value=e.id,this.name.value=e.name,this.surname.value=e.surname,this.cap.value=e.cap,this.city.value=e.city,this.street.value=e.street,this.number.value=e.number,this.phone.value=e.phone,$(this.country).val(e.country).trigger("change"),delay(500).then(()=>{$(this.province).val(e.province).trigger("change")}),$(this.phonePrefix).val(e.phonePrefix).trigger("change"),this.initForm()}initForm(){this.required&&(setRequired(this.name,!0),setRequired(this.surname,!0),setRequired(this.country,!0),setRequired(this.province,!0),setRequired(this.cap,!0),setRequired(this.city,!0),setRequired(this.street,!0),setRequired(this.number,!0)),this.name.disabled=!1,this.surname.disabled=!1,this.phonePrefix.disabled=!1,this.phone.disabled=!1,this.country.disabled=!1,this.province.disabled=!1,this.cap.disabled=!1,this.city.disabled=!1,this.street.disabled=!1,this.number.disabled=!1,this.more&&(this.more.disabled=!1),check()}resetForm(e=!1){this.container.querySelectorAll("input, select").forEach(n=>{n.name.substring(0,this.prefix.length)==this.prefix&&(n.name==this.prefix+"country"?$(n).val("IT").trigger("change"):n.name==this.prefix+"phone_prefix"?$(n).val("+39").trigger("change"):n.value="",setRequired(n,!1),e&&(n.disabled=!0))}),check()}modalDelete(e,n){var t=document.querySelector("#"+this.prefix+"modal-delete");t.querySelector('input[name="'+this.prefix+'delete-id"]').value=e,t.querySelector(".modal-title").innerHTML=this.modalText.delete.title,t.querySelector(".modal-body .value").innerHTML=this.modalText.delete.description+"<br>"+n,new bootstrap.Modal(t).show()}modalForm(e="modify"){var n,t=document.querySelector("#"+this.prefix+"modal-form");new bootstrap.Modal(t).show(),"modify"==e?n=this.modalText.modify.title:"add"==e&&(n=this.modalText.add.title),t.querySelector(".modal-title").innerHTML=n,t.addEventListener("hidden.bs.modal",()=>{this.resetForm(!0)})}}window.wiBootstrapIconNames=Object.keys(l),window.Address=s,window.Billing=class extends s{modalText={add:{title:"Nuovi dati di fatturazione"},modify:{title:"Modifica dati di fatturazione"},delete:{title:"Elimina dati di fatturazione",description:"Vuoi eliminare i seguenti dati di fatturazione:"}};constructor(e,n="billing_",t=!1){super(e,n,t),this.container.querySelector('input[name="'+this.prefix+'type"]')?this.type=this.container.querySelector('input[name="'+this.prefix+'type"]'):this.type=this.container.querySelector('select[name="'+this.prefix+'type"]'),this.businessName=this.container.querySelector('input[name="'+this.prefix+'business_name"]'),this.cf=this.container.querySelector('input[name="'+this.prefix+'cf"]'),this.pi=this.container.querySelector('input[name="'+this.prefix+'pi"]'),this.sdi=this.container.querySelector('input[name="'+this.prefix+'sdi"]'),this.pec=this.container.querySelector('input[name="'+this.prefix+'pec"]')}initForm(){super.initForm(),this.type.disabled=!1,this.cf.disabled=!1,setRequired(this.type,!0),"business"==this.type.value?(this.businessName.parentElement.parentElement.classList.remove("d-none"),this.businessName.disabled=!1,console.log(this.businessName),this.pi.parentElement.parentElement.classList.remove("d-none"),this.pi.disabled=!1,this.sdi.parentElement.parentElement.classList.remove("d-none"),this.sdi.disabled=!1,this.pec.parentElement.parentElement.classList.remove("d-none"),this.pec.disabled=!1,this.name.parentElement.parentElement.classList.add("d-none"),this.name.disabled=!0,this.surname.parentElement.parentElement.classList.add("d-none"),this.surname.disabled=!0,this.required&&(setRequired(this.businessName,!0),setRequired(this.pi,!0),setRequired(this.cf,!1),setRequired(this.name,!1),setRequired(this.surname,!1))):"private"==this.type.value&&(this.name.parentElement.parentElement.classList.remove("d-none"),this.name.disabled=!1,this.surname.parentElement.parentElement.classList.remove("d-none"),this.surname.disabled=!1,this.businessName.parentElement.parentElement.classList.add("d-none"),this.businessName.disabled=!0,this.pi.parentElement.parentElement.classList.add("d-none"),this.pi.disabled=!0,this.sdi.parentElement.parentElement.classList.add("d-none"),this.sdi.disabled=!0,this.pec.parentElement.parentElement.classList.add("d-none"),this.pec.disabled=!0,this.required&&(setRequired(this.name,!0),setRequired(this.surname,!0),setRequired(this.cf,!0),setRequired(this.businessName,!1),setRequired(this.pi,!1))),check()}setForm(e){this.type.value=e.type,this.businessName.value=e.businessName,this.cf.value=e.cf,this.pi.value=e.pi,this.sdi.value=e.sdi,this.pec.value=e.pec,super.setForm(e)}resetForm(){this.container.querySelectorAll("input, select").forEach(e=>{e.name.substring(0,this.prefix.length)==this.prefix&&(e.name==this.prefix+"type"?e.value="private":e.name==this.prefix+"country"?$(e).val("IT").trigger("change"):e.name==this.prefix+"phone_prefix"?$(e).val("+39").trigger("change"):e.value="",setRequired(e,!1))}),check()}}})()})();
|
|
2
|
+
(()=>{var e={5285(e){e.exports="function ajaxRequest(link, onSuccess = reloadPage, params = null) {\n\n loadingSpinner();\n\n $.ajax({\n type: \"POST\",\n url: link,\n data: { \n post: 'true'\n }, \n success: function(data) {\n\n if (onSuccess != null) {\n if (typeof onSuccess === 'function') {\n \n if (params == null) {\n onSuccess();\n } else {\n onSuccess(params);\n }\n \n } else {\n \n try {\n \n var x = JSON.parse(onSuccess.replace('"', '\"'));\n\n var f = x.function;\n var p = x.parameters;\n \n } catch {\n\n var f = onSuccess;\n var p = params;\n\n }\n \n window[f](p);\n \n }\n }\n\n loadingSpinner();\n \n },\n error: function (XMLHttpRequest) {\n var message = ajaxResponseMessage(XMLHttpRequest);\n\n if (message !== null) {\n alertToast('custom', 'warning', 'Attenzione', message);\n } else {\n ajaxRequestError(XMLHttpRequest);\n }\n\n loadingSpinner();\n }\n }); \n\n}\n\nfunction reloadPage() {\n\n location.reload();\n \n}"},4729(e){e.exports="function toastContainer() {\n\n if (document.querySelector('.toast-container')) {\n\n var container = document.querySelector('.toast-container');\n\n }else{\n\n var container = document.createElement('div');\n container.classList.add('toast-container');\n container.classList.add('position-fixed');\n container.classList.add('top-0');\n container.classList.add('end-0');\n container.classList.add('p-3');\n\n document.body.insertBefore(container, document.body.firstChild);\n\n }\n\n return container;\n\n}\n\nfunction alertToast(alert, type = null, title = null, text = null) {\n\n var container = toastContainer();\n\n $(\".toast.show\").toast().hide();\n \n if (alert == 801) {\n\n container.innerHTML = NO_INTERNET_ALERT + container.innerHTML;\n const toast = new bootstrap.Toast(container.firstElementChild);\n toast.show();\n\n } else if (alert != undefined) {\n\n API_CLIENT_APP.post(\"/backend/alert/\", { \n code: alert,\n alertType: type,\n alertTitle: title,\n alertText: text\n })\n .then(data => {\n \n container.innerHTML = data.response + container.innerHTML;\n const toast = new bootstrap.Toast(container.firstElementChild);\n toast.show();\n \n var url = new URL(window.location.href);\n url.searchParams.delete('alert');\n window.history.replaceState(null, null, url);\n\n })\n .catch(error => console.error(error));\n\n }\n\n}"},8553(e){e.exports="function bootstrapToast() {\n\n var toastElList = [].slice.call(document.querySelectorAll('.toast'))\n var toastList = toastElList.map(function(toastEl) {\n return new bootstrap.Toast(toastEl)\n });\n toastList.forEach(toast => toast.show());\n\n}\n\nfunction bootstrapTooltip() { $('[data-bs-toggle=\"tooltip\"]').tooltip(); }\n\nfunction bootstrapTheme(theme) {\n\n document.querySelector(\"html\").setAttribute(\"data-bs-theme\", theme);\n\n localStorage.setItem('theme', theme);\n \n if (theme == 'light') {\n\n if (document.querySelector('#bs-theme i.light-theme')) { document.querySelector('#bs-theme i.light-theme').classList.remove('d-none'); }\n if (document.querySelector('#bs-theme i.dark-theme')) { document.querySelector('#bs-theme i.dark-theme').classList.add('d-none'); }\n\n document.querySelector('#be-logo-white').classList.add('d-none');\n document.querySelector('#be-logo-black').classList.remove('d-none');\n\n element = document.querySelector('[data-bs-theme-value=\"light\"]');\n el = document.querySelector('[data-bs-theme-value=\"dark\"]');\n\n } else if (theme == 'dark') {\n\n if (document.querySelector('#bs-theme i.light-theme')) { document.querySelector('#bs-theme i.light-theme').classList.add('d-none'); }\n if (document.querySelector('#bs-theme i.dark-theme')) { document.querySelector('#bs-theme i.dark-theme').classList.remove('d-none'); }\n\n document.querySelector('#be-logo-white').classList.remove('d-none');\n document.querySelector('#be-logo-black').classList.add('d-none');\n\n element = document.querySelector('[data-bs-theme-value=\"dark\"]');\n el = document.querySelector('[data-bs-theme-value=\"light\"]');\n\n }\n\n if (el) { el.classList.remove('active'); }\n if (element) { element.classList.add('active'); }\n\n}\n\nfunction setUpBootstrap() {\n \n bootstrapTooltip();\n\n}"},5249(e){e.exports='class CustomHyperlink extends Hyperlink {\n iconSvg(name, width = 14, height = 14) {\n const svg = document.createElementNS(\'http://www.w3.org/2000/svg\', \'svg\');\n svg.classList.add(\'icon\', \'icon--\' + name);\n svg.setAttribute(\'width\', \'24\');\n svg.setAttribute(\'height\',\'24\');\n svg.setAttribute(\'viewBox\', \'0 0 24 24\')\n svg.setAttribute(\'fill\', \'none\');\n if (name == \'link\') {\n svg.innerHTML = `\n <path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M7.69998 12.6L7.67896 12.62C6.53993 13.7048 6.52012 15.5155 7.63516 16.625V16.625C8.72293 17.7073 10.4799 17.7102 11.5712 16.6314L13.0263 15.193C14.0703 14.1609 14.2141 12.525 13.3662 11.3266L13.22 11.12"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M16.22 11.12L16.3564 10.9805C17.2895 10.0265 17.3478 8.5207 16.4914 7.49733V7.49733C15.5691 6.39509 13.9269 6.25143 12.8271 7.17675L11.3901 8.38588C10.0935 9.47674 9.95706 11.4241 11.0888 12.6852L11.12 12.72"></path>\n `;\n } else {\n svg.innerHTML = `\n <path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M15.7795 11.5C15.7795 11.5 16.053 11.1962 16.5497 10.6722C17.4442 9.72856 17.4701 8.2475 16.5781 7.30145V7.30145C15.6482 6.31522 14.0873 6.29227 13.1288 7.25073L11.8796 8.49999"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M8.24517 12.3883C8.24517 12.3883 7.97171 12.6922 7.47504 13.2161C6.58051 14.1598 6.55467 15.6408 7.44666 16.5869V16.5869C8.37653 17.5731 9.93744 17.5961 10.8959 16.6376L12.1452 15.3883"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M17.7802 15.1032L16.597 14.9422C16.0109 14.8624 15.4841 15.3059 15.4627 15.8969L15.4199 17.0818"></path><path stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6.39064 9.03238L7.58432 9.06668C8.17551 9.08366 8.6522 8.58665 8.61056 7.99669L8.5271 6.81397"></path><line x1="12.1142" x2="11.7" y1="12.2" y2="11.7858" stroke="currentColor" stroke-linecap="round" stroke-width="2"></line>\n `;\n }\n return svg;\n }\n}\n\nclass CustomEmded extends Embed {\n \n static get toolbox() {\n return {\n title: \'Iframe\',\n icon: \'<svg width="20" height="20" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 1 0-6M14 11a5 5 0 0 1 0 6"></path><line x1="14" y1="7" x2="14" y2="7"></line><line x1="10" y1="17" x2="10" y2="17"></line></svg>\'\n };\n }\n \n /**\n * Render Embed tool content\n *\n * @returns {HTMLElement}\n */\n render() {\n if (!this.data.service) {\n const container = document.createElement(\'div\');\n \n this.element = container;\n const input = document.createElement(\'input\');\n input.classList.add(\'cdx-input\');\n input.placeholder = \'https://www.youtube.com/watch?v=w8vsuOXZBXc\';\n input.type = \'url\';\n input.addEventListener(\'paste\', (event) => {\n const url = event.clipboardData.getData(\'text\');\n const service = Object.keys(Embed.services).find((key) => Embed.services[key].regex.test(url));\n if (service) {\n this.onPaste({detail: {key: service, data: url}});\n }\n });\n container.appendChild(input);\n \n return container;\n }\n return super.render();\n }\n \n validate(savedData) {\n return savedData.service && savedData.source ? true : false;\n }\n}\n\nclass CustomVideoTool extends VideoTool {\n \n static get toolbox() {\n return {\n title: \'Video\',\n icon: \'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 10.5606V13.4394C10 14.4777 11.1572 15.0971 12.0211 14.5211L14.1803 13.0817C14.9536 12.5661 14.9503 11.4317 14.18 10.9181L12.0214 9.47907C11.1591 8.9042 10 9.5203 10 10.5606Z" stroke="black" stroke-width="2"/><rect x="5" y="5" width="14" height="14" rx="4" stroke="black" stroke-width="2"/></svg>\'\n };\n }\n \n}\n\nvar EDITORJS_TOOLS_BLOG = {\n paragraph: {\n inlineToolbar: true,\n tunes: [\'textAlign\']\n },\n header: {\n class: Header,\n inlineToolbar: true,\n tunes: [\'textAlign\'],\n config: {\n placeholder: \'Titolo...\',\n levels: [1, 2, 4],\n defaultLevel: 2\n }\n },\n quote: {\n class: Quote,\n inlineToolbar: true,\n config: {\n quotePlaceholder: \'Scrivi una citazione...\',\n captionPlaceholder: \'Autore\',\n },\n },\n list: {\n class: NestedList,\n inlineToolbar: true,\n config: {\n defaultStyle: \'unordered\'\n },\n },\n delimiter: Delimiter,\n table: {\n class: Table,\n inlineToolbar: [\'link\', \'italic\', \'bold\'],\n },\n // code: CodeTool,\n image: {\n class: ImageTool,\n config: {\n captionPlaceholder: \'Caption...\',\n endpoints: {\n byFile: pathApp+\'/api/backend/editorjs/image.php\'\n // Aggiungere cartella dove caricare i file\n },\n field: \'image\',\n types: \'image/png, image/jpg, image/jpeg\',\n additionalRequestHeaders: { dir: \'\' }\n // Forzo nel css la rimozione "display: none" di withBorder, stretched e withBackground\n }\n },\n gallery: {\n class: ImageGallery,\n config: {\n captionPlaceholder: \'Caption galleria...\',\n endpoints: {\n byFile: pathApp+\'/api/backend/editorjs/image.php\'\n // Aggiungere cartella dove caricare i file\n },\n field: \'image\',\n types: \'image/png, image/jpg, image/jpeg\',\n additionalRequestHeaders: { dir: \'\' }\n // Forzo nel css la rimozione "display: none" di fit e slider\n },\n },\n Marker: Marker,\n inlineCode: InlineCode,\n attaches: {\n class: AttachesTool,\n config: {\n endpoint: pathApp+\'/api/backend/editorjs/file.php\',\n // Aggiungere cartella dove caricare i file\n field: \'file\',\n additionalRequestHeaders: { dir: \'\' }\n }\n },\n // TODO: Aggiungi caricamento video (potrebbe tornare utile la classe ImageTool)\n // video: {\n // class: CustomVideoTool,\n // config: {\n // captionPlaceholder: \'Caption...\',\n // endpoints: {\n // byFile: pathSite+\'/api/task/article/file.php\'\n // },\n // player: {\n // controls: true,\n // autoplay: false,\n // },\n // field: \'file\',\n // types: \'video/quicktime, video/mp4\'\n // // Forzo nel css la rimozione "display: none" di withBorder, stretched e withBackground\n // }\n // },\n // TODO: embed non funziona. Trovare un modo per caricare iframe\n // embed: {\n // class: CustomEmded,\n // },\n textAlign: {\n class: AlignmentTuneTool,\n config:{\n default: "left"\n },\n },\n link: {\n class: CustomHyperlink,\n config: {\n shortcut: \'CMD+L\',\n target: \'_blank\',\n rel: \'nofollow\',\n availableTargets: [\'_blank\', \'_self\'],\n availableRels: [\'author\', \'noreferrer\'],\n validate: false,\n }\n },\n};\n\nvar EDITORJS_TOOLS_TABLE = {\n paragraph: false,\n inlineCode: InlineCode,\n table: {\n class: Table,\n inlineToolbar: [\'link\', \'italic\', \'bold\'],\n }\n};\n\nvar EDITORJS_i18n_IT = {\n messages: {\n ui: {\n "blockTunes": {\n "toggler": {\n "Click to tune": "Modifica",\n "or drag to move": "Trascina per muovere"\n },\n },\n "inlineToolbar": {\n "converter": {\n "Convert to": "Converti"\n }\n },\n "toolbar": {\n "toolbox": {\n "Add": "Aggiungi",\n }\n }\n },\n toolNames: {\n "Add": "Aggiungi",\n "Quote": "Citazione",\n "Delimiter": "Linea",\n "Text": "Testo",\n "Heading": "Titolo",\n "Table": "Tabella",\n "Code": "Codice",\n "List": "Elenco",\n "Bold": "Grassetto",\n "Italic": "Corsivo",\n "Marker": "Evidenzia",\n "InlineCode": "Codice",\n "TextAlign": "Allineamento",\n "Gallery": "Galleria",\n "Image": "Immagine",\n "Attachment": "Allega file",\n },\n tools: {\n "header": {\n "Heading 1": "Titolo grande",\n "Heading 2": "Titolo",\n "Heading 4": "Sottotitolo"\n },\n "link": {\n "Add a link": "Aggiungi link"\n },\n "code": {\n "Enter a code": "Inserisci codice",\n },\n "quote": {\n "Align Left": "Allinea a sinistra",\n "Align Center": "Allinea in centro",\n },\n "table": {\n "With headings": "Con intestazione",\n "Without headings": "Senza intestazione",\n "Add column to left": "Aggiungi colonna sinistra",\n "Add column to right": "Aggiungi colonna destra",\n "Add row above": "Aggiungi riga sopra",\n "Add row below": "Aggiungi riga sotto",\n "Delete column": "Elimina colonna",\n "Delete row": "Elimina riga",\n },\n "list": {\n "Ordered": "Elenco numerato",\n "Unordered": "Elenco puntato",\n },\n "gallery": {\n "Select an Image": "Seleziona immagini",\n },\n "image": {\n "Select an Image": "Seleziona immagine",\n },\n "video": {\n "Select an Video": "Seleziona video",\n },\n "attaches": {\n "Select file to upload": "Seleziona file da allegare",\n },\n },\n blockTunes: {\n "delete": {\n "Delete": "Elimina",\n "Click to delete": "Clicca per elimina"\n },\n "moveUp": {\n "Move up": "Su"\n },\n "moveDown": {\n "Move down": "Giù"\n }\n },\n }\n};'},3990(e){e.exports="function moveFile(selectorContainer, selectorData, action) {\n\n var link = pathApp+'/api/backend/file/move.php';\n\n var el = document.querySelector(selectorContainer+' '+selectorData);\n\n var table = el.dataset.wiDbTable;\n var column = el.dataset.wiDbColumn;\n var rowId = el.dataset.wiDbRow;\n var fileId = el.dataset.wiFileId;\n var oldPosition = Number(el.dataset.wiOrder);\n var nFile = el.dataset.wiNFile;\n\n $.ajax({\n type: \"POST\",\n url: link,\n data: { \n post: 'true',\n table: table,\n column: column,\n row_id: rowId,\n file_id: fileId,\n action: action\n },\n success: function (data) {\n \n if (action == 'up') {\n var newPosition = oldPosition - 1;\n } else if (action == 'down') {\n var newPosition = oldPosition + 1;\n }\n\n var file1 = document.querySelector(selectorContainer+' .wi-card-file.order-'+oldPosition);\n var file2 = document.querySelector(selectorContainer+' .wi-card-file.order-'+newPosition);\n\n file1.classList.remove('order-'+oldPosition);\n file1.classList.add('order-'+newPosition);\n file1.dataset.wiOrder = newPosition;\n file1.dataset.wiFileId = file2.dataset.wiFileId;\n\n file2.classList.remove('order-'+newPosition);\n file2.classList.add('order-'+oldPosition);\n file2.dataset.wiOrder = oldPosition;\n file2.dataset.wiFileId = fileId;\n\n // Sistema first e last\n firstLastFile(selectorContainer, nFile);\n \n },\n error: function (XMLHttpRequest) {\n ajaxRequestError(XMLHttpRequest);\n }\n }); \n\n}\n\nfunction deleteFile(selectorContainer, selectorData) {\n\n var el = document.querySelector(selectorContainer+' '+selectorData);\n\n var folder = el.dataset.wiFolder;\n var table = el.dataset.wiDbTable;\n var column = el.dataset.wiDbColumn;\n var rowId = el.dataset.wiDbRow;\n var fileId = el.dataset.wiFileId;\n\n var oldPosition = Number(el.dataset.wiOrder);\n var nFile = el.dataset.wiNFile;\n\n var fileName = el.dataset.wiFileName;\n\n var text = \"Sei sicuro di eliminare il file <b>\"+fileName+\"</b>?\";\n var link = pathApp+'/api/backend/file/delete.php?folder='+folder+'&table='+table+'&column='+column+'&row_id='+rowId+'&file_id='+fileId;\n\n var onSuccess = '{ \"function\" : \"removeFile\", \"parameters\": { \"container\" : \"'+selectorContainer+'\", \"data\" : \"'+selectorData+'\", \"nFile\" : \"'+nFile+'\", \"position\" : \"'+oldPosition+'\"} }';\n\n modal(text, link, 'ATTENZIONE', 'Elimina', 'danger', 'Chiudi', 'dark', onSuccess);\n\n}\n\nfunction removeFile(parameters) {\n\n var selectorContainer = parameters.container;\n var selectorData = parameters.data;\n var deletedFilePosition = Number(parameters.position);\n var maxFile = Number(parameters.maxFile);\n var old_nFile = Number(parameters.nFile);\n const real_nFile = old_nFile - 1;\n\n document.querySelector(selectorContainer+' '+selectorData).remove();\n\n document.querySelectorAll(selectorContainer+' .wi-card-file').forEach(element => {\n\n var filePosition = Number(element.dataset.wiOrder);\n element.dataset.wiNFile = real_nFile;\n\n if (filePosition > deletedFilePosition) {\n\n var newPosition = filePosition - 1;\n var newId = newPosition - 1;\n\n element.dataset.wiOrder = newPosition;\n element.classList.remove('order-'+filePosition);\n element.classList.add('order-'+newPosition);\n\n element.dataset.wiFileId = newId;\n\n }\n\n });\n\n\n var maxFile = document.querySelector(selectorContainer+' input').dataset.wiMaxFile;\n\n if (maxFile > real_nFile) {\n document.querySelector(selectorContainer+' input').disabled = false;\n }\n\n firstLastFile(selectorContainer, real_nFile);\n\n $('#modal').modal('hide');\n\n}\n\nfunction firstLastFile(selectorContainer, nFile) {\n\n if (document.querySelectorAll(selectorContainer+' .wi-card-file').length > 0) {\n\n if (document.querySelector(selectorContainer+' .wi-card-file.wi-first-file')) {\n document.querySelector(selectorContainer+' .wi-card-file.wi-first-file').classList.remove('wi-first-file');\n }\n \n if (document.querySelector(selectorContainer+' .wi-card-file.wi-last-file')) {\n document.querySelector(selectorContainer+' .wi-card-file.wi-last-file').classList.remove('wi-last-file');\n }\n \n document.querySelector(selectorContainer+' .wi-card-file.order-1').classList.add('wi-first-file');\n document.querySelector(selectorContainer+' .wi-card-file.order-'+nFile).classList.add('wi-last-file');\n \n }\n\n}"},6711(e){e.exports="/*\n * La raccolta del campo icona (`FormField::icon()` di wonder-image/app).\n *\n * Il renderer stampa un `input-group` `.wi-icon-picker` con l'anteprima\n * (`.wi-show-icon`), la casella del nome (`data-wi-icon-picker`) e un bottone\n * `data-wi-icon-picker-open=\"{id della casella}\"`. Qui c'è un solo pannello\n * per pagina, che si sposta sotto il bottone premuto: una ricerca e la griglia\n * delle Bootstrap Icons. Scegliere un'icona scrive `bi-nome` nella casella e\n * lancia `input` e `change`, come se l'avessi scritto a mano.\n *\n * La ricerca capisce anche l'italiano: «stella» trova `star`, «carr» trova\n * `cart`. I nomi arrivano da `window.wiBootstrapIconNames`, che head.js\n * riempie da bootstrap-icons.json.\n */\n(function () {\n\n if (window.wiIconPicker) { return; }\n\n var LIMIT = 240;\n var PATTERN = /^bi-[a-z0-9-]+$/;\n\n // Le parole italiane che non somigliano al nome inglese dell'icona.\n // Basta l'inizio della parola: «stel» vale già «stella».\n var DICTIONARY = {\n acqua: ['water', 'droplet'], aereo: ['airplane'], albero: ['tree'], allarme: ['alarm'],\n altoparlante: ['speaker'], ambiente: ['recycle', 'tree'], ancora: ['anchor'], anello: ['circle', 'gem'],\n ape: ['bug'], attenzione: ['exclamation', 'warning'], auto: ['car'], avviso: ['exclamation', 'bell'],\n bagaglio: ['luggage', 'suitcase'], banca: ['bank'], bandiera: ['flag'], barca: ['life-preserver'],\n batteria: ['battery'], bicicletta: ['bicycle'], biglietto: ['ticket'], borsa: ['bag', 'handbag'],\n bussola: ['compass'], caffe: ['cup-hot'], calendario: ['calendar'], camion: ['truck'],\n campana: ['bell'], carrello: ['cart'], carta: ['credit-card', 'card'], cartella: ['folder'],\n casa: ['house'], cerchio: ['circle'], chiave: ['key', 'wrench'], chiudi: ['x'],\n cestino: ['basket', 'trash'], cielo: ['cloud', 'sun'], colore: ['palette', 'droplet'], computer: ['laptop', 'pc'],\n conto: ['receipt', 'bank'], corona: ['award', 'trophy'], cuffie: ['headphones'], cuore: ['heart'],\n denaro: ['cash', 'coin', 'currency'], diamante: ['gem', 'diamond'], documento: ['file'], dollaro: ['currency-dollar'],\n ecologico: ['recycle', 'tree'], energia: ['lightning', 'battery'], etichetta: ['tag'], euro: ['currency-euro'],\n faccina: ['emoji'], fiamma: ['fire'], fiore: ['flower'], forbici: ['scissors'],\n foto: ['image', 'camera'], freccia: ['arrow'], fuoco: ['fire'], fulmine: ['lightning'],\n garanzia: ['shield-check', 'patch-check'], gemma: ['gem'], gente: ['people'], giornale: ['newspaper'],\n globo: ['globe'], goccia: ['droplet'], gomma: ['eraser'], grafico: ['graph', 'bar-chart', 'pie-chart'],\n griglia: ['grid'], immagine: ['image'], impostazioni: ['gear', 'sliders'], ingranaggio: ['gear'],\n lampadina: ['lightbulb'], libro: ['book'], lista: ['list'], lucchetto: ['lock'],\n luna: ['moon'], luogo: ['geo', 'pin-map'], macchina: ['car', 'camera'], mano: ['hand'],\n mappa: ['map', 'geo'], martello: ['hammer'], matita: ['pencil'], medaglia: ['award'],\n mela: ['apple'], meno: ['dash'], microfono: ['mic'], mondo: ['globe'],\n moneta: ['coin'], musica: ['music'], negozio: ['shop'], neve: ['snow'],\n nuvola: ['cloud'], occhiali: ['eyeglasses', 'sunglasses'], occhio: ['eye'], ombrello: ['umbrella'],\n orologio: ['clock', 'watch', 'smartwatch'], pacco: ['box', 'package'], pagamento: ['credit-card', 'wallet', 'cash'], palla: ['circle', 'dribbble'],\n pennello: ['brush', 'paint'], penna: ['pen'], persona: ['person'], pianta: ['tree', 'flower'],\n piu: ['plus'], pioggia: ['cloud-rain', 'umbrella'], pollice: ['hand-thumbs'], portafoglio: ['wallet'],\n posizione: ['geo'], posta: ['envelope', 'mailbox'], premio: ['award', 'trophy'], prezzo: ['tag', 'currency'],\n quadrato: ['square'], regalo: ['gift'], reso: ['arrow-return', 'arrow-repeat', 'arrow-counterclockwise'], ricerca: ['search'],\n riciclo: ['recycle'], righello: ['rulers'], rombo: ['diamond'], ruota: ['gear', 'circle'],\n sacchetto: ['bag'], scarpa: ['bag'], scatola: ['box'], scudo: ['shield'],\n segnalibro: ['bookmark'], sconto: ['percent', 'tag'], sicurezza: ['shield', 'lock'], sole: ['sun'],\n sorriso: ['emoji-smile'], spedizione: ['truck', 'box'], spina: ['plug'], spunta: ['check'],\n stampante: ['printer'], stella: ['star'], strati: ['layers'], taglia: ['rulers', 'arrows'],\n tazza: ['cup'], telefono: ['telephone', 'phone'], temperatura: ['thermometer'], tempo: ['clock', 'hourglass'],\n torta: ['cake'], treno: ['train'], triangolo: ['triangle'], trofeo: ['trophy'],\n utente: ['person'], uovo: ['egg'], valigia: ['suitcase', 'luggage'], vento: ['wind'],\n verificato: ['patch-check', 'check'], video: ['camera-video', 'film', 'play'], volume: ['volume'], zaino: ['backpack']\n };\n\n function names() {\n return Array.isArray(window.wiBootstrapIconNames) ? window.wiBootstrapIconNames : [];\n }\n\n function normalize(text) {\n return String(text || '')\n .toLowerCase()\n .normalize('NFD')\n .replace(/[̀-ͯ]/g, '')\n .trim()\n .replace(/^bi-/, '');\n }\n\n // Una parola cercata vale sé stessa più le traduzioni delle parole\n // italiane che cominciano così (da tre lettere in su, se no «ca» porta\n // dentro mezzo dizionario).\n function candidates(word) {\n var list = [word];\n\n if (word.length < 3) { return list; }\n\n Object.keys(DICTIONARY).forEach(function (italian) {\n if (italian.indexOf(word) === 0) {\n list = list.concat(DICTIONARY[italian]);\n }\n });\n\n return list;\n }\n\n function search(query, list) {\n list = Array.isArray(list) ? list : names();\n query = normalize(query);\n\n if (query === '') { return list.slice(); }\n\n var words = query.split(/[\\s,]+/).filter(Boolean).map(candidates);\n var first = words[0];\n var found = list.filter(function (name) {\n return words.every(function (options) {\n return options.some(function (term) { return name.indexOf(term) !== -1; });\n });\n });\n\n // Prima i nomi che cominciano con quello che cerchi: «star» prima di\n // «bookmark-star».\n var rank = function (name) {\n if (first.indexOf(name) !== -1) { return 0; }\n return first.some(function (term) { return name.indexOf(term) === 0; }) ? 1 : 2;\n };\n\n return found\n .map(function (name, index) { return { name: name, rank: rank(name), index: index }; })\n .sort(function (a, b) { return a.rank - b.rank || a.index - b.index; })\n .map(function (item) { return item.name; });\n }\n\n function updatePreview(input) {\n var group = input && input.closest ? input.closest('.wi-icon-picker') : null;\n var show = group ? group.querySelector('.wi-show-icon') : null;\n\n if (!show) { return; }\n\n var value = String(input.value || '').trim();\n show.className = 'bi ' + (PATTERN.test(value) ? value : 'bi-question-square') + ' wi-show-icon';\n }\n\n var panel = null;\n var field = null;\n var grid = null;\n var hint = null;\n var target = null;\n var opener = null;\n\n function build() {\n if (panel) { return; }\n\n panel = document.createElement('div');\n panel.className = 'card shadow wi-icon-picker-panel d-none';\n panel.setAttribute('role', 'dialog');\n panel.setAttribute('aria-label', 'Scegli un\\'icona');\n panel.innerHTML =\n '<div class=\"card-body p-2\">' +\n '<div class=\"d-flex gap-2 mb-2\">' +\n '<input type=\"search\" class=\"form-control form-control-sm\" placeholder=\"Cerca: stella, cuore, star…\" aria-label=\"Cerca un\\'icona\">' +\n '<button type=\"button\" class=\"btn btn-sm btn-light\" aria-label=\"Chiudi\"><i class=\"bi bi-x-lg\" aria-hidden=\"true\"></i></button>' +\n '</div>' +\n '<div class=\"wi-icon-picker-grid\"></div>' +\n '<div class=\"small text-body-secondary mt-2 wi-icon-picker-hint\"></div>' +\n '</div>';\n\n field = panel.querySelector('input');\n grid = panel.querySelector('.wi-icon-picker-grid');\n hint = panel.querySelector('.wi-icon-picker-hint');\n\n field.addEventListener('input', function () { render(field.value); });\n field.addEventListener('keydown', function (event) {\n if (event.key === 'Enter') {\n event.preventDefault();\n var firstButton = grid.querySelector('[data-wi-icon]');\n if (firstButton) { choose(firstButton.dataset.wiIcon); }\n }\n });\n panel.querySelector('.btn-light').addEventListener('click', function () { close(true); });\n grid.addEventListener('click', function (event) {\n var button = event.target.closest('[data-wi-icon]');\n if (button) { choose(button.dataset.wiIcon); }\n });\n }\n\n function render(query) {\n var found = search(query);\n var current = target ? String(target.value || '').trim() : '';\n\n grid.textContent = '';\n\n found.slice(0, LIMIT).forEach(function (name) {\n var button = document.createElement('button');\n var icon = document.createElement('i');\n\n button.type = 'button';\n button.className = 'btn btn-sm ' + (current === 'bi-' + name ? 'btn-primary' : 'btn-light');\n button.title = 'bi-' + name;\n button.dataset.wiIcon = name;\n icon.className = 'bi bi-' + name;\n icon.setAttribute('aria-hidden', 'true');\n button.appendChild(icon);\n grid.appendChild(button);\n });\n\n if (found.length === 0) {\n hint.textContent = 'Nessuna icona: prova con una parola in inglese.';\n } else if (found.length > LIMIT) {\n hint.textContent = LIMIT + ' di ' + found.length + ' icone: scrivi per restringere.';\n } else {\n hint.textContent = found.length === 1 ? '1 icona' : found.length + ' icone';\n }\n }\n\n function place() {\n var rect = opener.getBoundingClientRect();\n var width = panel.offsetWidth;\n var height = panel.offsetHeight;\n var top = rect.bottom + 4;\n var left = Math.min(rect.right - width, window.innerWidth - width - 8);\n\n if (top + height > window.innerHeight - 8 && rect.top - height - 4 > 8) {\n top = rect.top - height - 4;\n }\n\n panel.style.top = Math.max(8, top) + 'px';\n panel.style.left = Math.max(8, left) + 'px';\n }\n\n function open(input, button) {\n build();\n\n // Dentro una modale il pannello sta nella modale: fuori, la trappola\n // del focus di Bootstrap non lascerebbe scrivere nella ricerca.\n var host = input.closest('.modal') || document.body;\n if (panel.parentNode !== host) { host.appendChild(panel); }\n\n target = input;\n opener = button || input;\n field.value = '';\n render('');\n panel.classList.remove('d-none');\n place();\n field.focus();\n }\n\n function close(restoreFocus) {\n if (!panel || panel.classList.contains('d-none')) { return; }\n\n panel.classList.add('d-none');\n\n if (restoreFocus && target) { target.focus(); }\n\n target = null;\n opener = null;\n }\n\n function choose(name) {\n if (!target) { return; }\n\n var input = target;\n input.value = 'bi-' + name;\n input.dispatchEvent(new Event('input', { bubbles: true }));\n input.dispatchEvent(new Event('change', { bubbles: true }));\n updatePreview(input);\n close(true);\n }\n\n // Il campo si cerca accanto al bottone: le righe nuove di un repeater\n // nascono dallo stesso modello, con lo stesso id, e getElementById\n // porterebbe sempre alla prima.\n function inputFor(button) {\n var group = button.closest ? button.closest('.wi-icon-picker') : null;\n\n return (group && group.querySelector('[data-wi-icon-picker]'))\n || document.getElementById(button.dataset.wiIconPickerOpen);\n }\n\n document.addEventListener('click', function (event) {\n var button = event.target.closest ? event.target.closest('[data-wi-icon-picker-open]') : null;\n\n if (button) {\n var input = inputFor(button);\n\n if (input) {\n event.preventDefault();\n if (target === input) { close(false); } else { open(input, button); }\n }\n\n return;\n }\n\n if (panel && !panel.contains(event.target)) { close(false); }\n });\n\n document.addEventListener('input', function (event) {\n if (event.target.matches && event.target.matches('[data-wi-icon-picker]')) {\n updatePreview(event.target);\n }\n });\n\n document.addEventListener('keydown', function (event) {\n if (event.key === 'Escape' && panel && !panel.classList.contains('d-none')) {\n event.stopPropagation();\n close(true);\n }\n }, true);\n\n // Un pannello a posizione fissa non segue la pagina che scorre.\n window.addEventListener('resize', function () { close(false); });\n window.addEventListener('scroll', function (event) {\n if (panel && !panel.contains(event.target)) { close(false); }\n }, true);\n\n window.wiIconPicker = { search: search, open: open, close: close, updatePreview: updatePreview, inputFor: inputFor };\n\n})();\n\n/** Riallinea le anteprime ai valori già scritti (campi arrivati dopo il caricamento). */\nfunction setIconPicker(container = document) {\n container.querySelectorAll('[data-wi-icon-picker]').forEach(function (input) {\n window.wiIconPicker.updatePreview(input);\n });\n}\n"},7418(e){e.exports="function check() {\n \n document.querySelectorAll(\"form button[type='submit'], form button.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.closest && input.closest('[data-wi-conditional-hidden=\"true\"]')) { continue; }\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 }\n\n var formElement = button.form;\n\n formElement.querySelectorAll(\".wi-checkbox-required, .wi-radio-required\").forEach(checkboxContainer => {\n\n if (checkboxContainer.closest('[data-wi-conditional-hidden=\"true\"]')) { return; }\n\n if (checkboxContainer.querySelectorAll(\"input[type='checkbox']:checked, input[type='radio']:checked\").length == 0) { button.setAttribute(\"disabled\", null); }\n\n });\n\n });\n\n}\n\nfunction lengthCount(event) {\n\n var val = event.target.value;\n var container = event.target.parentElement;\n\n if (container.querySelector('.wi-counter')) {\n container.querySelector('.wi-counter').innerHTML = val.length;\n }\n\n}\n\nfunction checkColor(event) {\n\n var val = event.target.value;\n var container = event.target.parentElement;\n\n if (val.includes('#')) {\n container.querySelector('.wi-show-color').style.color = val;\n } else {\n container.querySelector('.wi-show-color').style.color = 'rgba('+val+')';\n }\n \n}\n\nfunction generateCode(selector) {\n\n document.querySelector(selector).value = code();\n \n}\n\nfunction disableInput(type) {\n\n if (type == 'user') {\n var inputArray = document.querySelectorAll('input[name=name], input[name=surname], input[name=username], input[name=email], input[name=\"profile_picture[]\"], select[name=color], select[name=active]');\n }\n\n inputArray.forEach(element => {\n\n element.disabled = true;\n element.dataset.wiOldValue = element.value;\n element.dataset.wiOldRequired = element.required;\n \n element.value = '';\n element.required = false;\n\n }); \n\n}\n\nfunction enabledInput(type) {\n\n if (type == 'user') {\n var inputArray = document.querySelectorAll('input[name=name], input[name=surname], input[name=username], input[name=email], input[name=\"profile_picture[]\"], select[name=color], select[name=active]');\n }\n\n inputArray.forEach(element => {\n\n if (element.dataset.wiOldValue) {\n var wiOldValue = element.dataset.wiOldValue;\n } else {\n if (element.name == 'active') {\n var wiOldValue = \"true\";\n } else if (element.name == 'color') {\n var wiOldValue = \"blue\";\n } else {\n var wiOldValue = \"\";\n }\n }\n \n if (element.dataset.wiOldRequired) {\n var wiOldRequired = element.dataset.wiOldRequired;\n } else {\n var wiOldRequired = \"\";\n }\n \n element.disabled = false;\n element.value = wiOldValue;\n element.required = wiOldRequired;\n\n }); \n \n}\n\nfunction createCheckbox(array, element, container, checked = false) {\n\n var name = element.dataset.wiName;\n var attribute = element.dataset.wiAttribute;\n\n if (element.dataset.wiSearchRadio != undefined) {\n var type = \"radio\";\n } else if (element.dataset.wiSearchCheckbox != undefined) {\n var type = \"checkbox\";\n }\n\n var containerMaster = container.parentElement;\n var footer = containerMaster.querySelector('.card .card-footer');\n footer.innerHTML = 'Cerco...';\n\n try {\n\n const response = JSON.parse(array);\n const nResponse = response.length;\n \n var HTML_CHECKED = \"\";\n \n container.querySelectorAll('input:checked').forEach(el => {\n \n el.setAttribute('checked', true);\n HTML_CHECKED += \"<div class='form-check'>\"+el.parentElement.innerHTML+\"</div>\";\n \n });\n \n container.innerHTML = \"\";\n \n for (let index = 0; index < nResponse; index++) {\n \n var idCode = code();\n var HTML = \"\";\n var att = attribute;\n \n var value = response[index]['value'];\n var label = response[index]['label'];\n var inputValue = response[index]['input-value'];\n \n if (checked) { var att = attribute+\" checked\"; }\n \n if (HTML_CHECKED.search('value=\"'+value+'\"') == '-1') {\n \n HTML += \"<div class='form-check'>\";\n HTML += \"<input id='\"+idCode+\"' type='\"+type+\"' class='form-check-input' name='\"+name+\"' value='\"+value+\"' data-wi-check='true' \"+att+\" >\";\n HTML += \"<label class='form-check-label wi-check-label user-select-none' for='\"+idCode+\"'>\"+label+\"</label>\";\n HTML += \"</div>\";\n \n container.insertAdjacentHTML(\"beforeend\", HTML);\n \n }\n \n }\n\n container.insertAdjacentHTML(\"beforeend\", HTML_CHECKED);\n \n if (inputValue == '') {\n footer.innerHTML = \"Cerca risultati\";\n } else if (nResponse == 1) {\n footer.innerHTML = nResponse+\" risultato\";\n } else if (nResponse != 1) {\n footer.innerHTML = nResponse+\" risultati\";\n }\n \n } catch {\n\n console.log(array);\n footer.innerHTML = 'Errore nel file! Contatta assistenza';\n\n }\n\n}\n\nfunction inputSearch(event) {\n\n var inputText = event.target;\n\n var containerMaster = inputText.parentElement;\n var container = containerMaster.querySelector('.card .card-body');\n var footer = containerMaster.querySelector('.card .card-footer');\n\n var inputValue = inputText.value.toLowerCase();\n\n if (inputText.dataset.wiSearchUrl != undefined) {\n\n var url = inputText.dataset.wiSearchUrl;\n\n var footer = containerMaster.querySelector('.card .card-footer');\n footer.innerHTML = 'Cerco...';\n\n $.ajax({\n type: \"POST\",\n url: url,\n data: { \n post: 'true',\n search: inputValue\n }, \n success: function (data) {\n createCheckbox(data, inputText, container);\n checkInput();\n },\n error: function (XMLHttpRequest) {\n\n ajaxRequestError(XMLHttpRequest);\n footer.innerHTML = 'Errore! Riprova la ricerca.';\n\n }\n });\n \n } else {\n \n container.querySelectorAll('label.wi-check-label').forEach(element => {\n \n var container = element.parentElement;\n var name = element.innerHTML.toLowerCase();\n \n if (name.includes(inputValue)) {\n element.parentElement.style.display = 'block';\n } else if (container.querySelector('input').checked == false) {\n element.parentElement.style.display = 'none';\n }\n \n });\n\n }\n \n}\n\nfunction filterSelect(selectElement, dataName, value) {\n\n selectElement.querySelectorAll('option').forEach(option => {\n\n if (option.getAttribute('data-'+dataName)) {\n \n var filterValue = JSON.parse(option.getAttribute('data-'+dataName));\n\n if ((Array.isArray(filterValue) && filterValue.includes(value)) || filterValue == value) {\n\n option.disabled = false;\n option.hidden = false;\n\n } else {\n\n if (option.selected == true) {\n selectElement.value = \"\";\n }\n\n option.disabled = true;\n option.hidden = true;\n\n }\n\n }\n\n });\n \n}\n\nfunction createOptions( select, options ) {\n\n select.disabled = true;\n select.innerHTML = \"\";\n\n var selectAttribute = select.dataset.wiAttribute || '';\n var selectLabel = select.labels[0];\n\n var i = 0;\n\n for (var optionValue in options) {\n\n var optionLabel = options[optionValue];\n\n select[i] = new Option(optionLabel, optionValue);\n\n i++;\n\n }\n\n if (i === 0) {\n\n select.required = false;\n selectLabel.innerHTML = selectLabel.innerHTML.replace('*', '');\n\n } else {\n\n select.disabled = false;\n\n if (selectAttribute.indexOf('required') != '-1') { \n\n select.required = true;\n\n if (selectLabel.innerHTML.indexOf('*') == '-1') { \n selectLabel.innerHTML = selectLabel.innerHTML+'*' \n }\n\n }\n\n }\n\n}\n\nfunction inputError(input, error) {\n\n const container = input.closest('.form-floating, .input-group, .card').parentElement || input.parentElement;\n const feedback = container.querySelector('.invalid-feedback');\n \n if (feedback) {\n feedback.textContent = error;\n feedback.style.display = \"block\";\n }\n\n input.classList.add('is-invalid');\n input.setCustomValidity(error);\n\n}\n\nfunction removeInputError(input) {\n\n const container = input.closest('.form-floating, .input-group, .card').parentElement || input.parentElement;\n const feedback = container.querySelector('.invalid-feedback');\n \n if (feedback) {\n feedback.textContent = \"\";\n feedback.style.display = \"none\";\n }\n\n input.classList.remove('is-invalid');\n input.setCustomValidity(\"\");\n\n}\n"},9636(e){e.exports="function copyRow(container, element, callback) {\n\n element.querySelectorAll('input[type=\"file\"]').forEach(element => {\n\n FilePond.destroy(element.parentElement);\n\n });\n\n var copy = element.cloneNode(true);\n var position = container.childElementCount;\n var lineId = container.id+'_row_'+code(10);\n\n copy.id = lineId;\n copy.classList.remove('visually-hidden');\n copy.classList.add('wi-copy-row');\n copy.classList.add('order-'+position);\n\n if (copy.querySelector('input[name=\"position[]\"]')) {\n copy.querySelector('input[name=\"position[]\"]').value = position;\n }\n\n copy.querySelectorAll('[data-wi-attribute]').forEach(element => {\n\n var attribute = element.dataset.wiAttribute;\n\n if (attribute != '') {\n\n if (attribute.includes('required')) { element.required = true; }\n if (attribute.includes('disabled')) { element.disabled = true; }\n if (attribute.includes('readonly')) { element.readOnly = true; }\n if (attribute.includes('data-wi-sort-pos')) { \n element.dataset.wiSortPos = true; \n element.value = position;\n }\n\n }\n\n });\n\n // Inserisco la linea\n container.appendChild(copy);\n\n // Cambio gli Id degli input e li resetto\n var line = document.getElementById(lineId);\n line.querySelectorAll('input, select, textarea').forEach(element => {\n \n if (element.hasAttribute('data-select2-id')) { \n\n var c = element.parentElement;\n c.querySelector('span.select2').remove();\n \n $(element).select2('destroy');\n \n } else if (element.type == \"file\") {\n\n var name = element.name;\n element.name = name.replace(/-\\d+\\[\\]$/, `-${position}[]`);\n \n }\n\n element.id = 'input_'+code(10);\n\n });\n\n setInput(copy);\n checkInput();\n rowSetArrow(container);\n bootstrapTooltip();\n\n if (typeof callback === 'function') { callback(); }\n\n}\n\nfunction rowOrder(el1, action, callback) {\n\n var container = el1.parentElement;\n \n for (let a = 1; a < 100; a++) { \n \n var classEl1 = 'order-'+a;\n\n if(el1.classList.contains(classEl1)) {\n\n if (action == 'up') { var b = a - 1; } \n if (action == 'down') { var b = a + 1; }\n\n var classEl2 = 'order-'+b;\n\n var el2 = container.querySelector('.'+classEl2);\n\n rowChangePos(el1, a, b);\n rowChangePos(el2, b, a);\n\n rowSetArrow(container);\n\n break;\n\n }\n\n }\n\n if (typeof callback === 'function') { callback(); }\n\n}\n\nfunction rowChangePos(element, oldPosition, newPosition) {\n \n element.classList.remove('order-'+oldPosition);\n element.classList.add('order-'+newPosition);\n\n if (element.querySelector('[data-wi-sort-pos]')) {\n element.querySelector('[data-wi-sort-pos]').value = newPosition;\n } else if (element.querySelector('input[name=\"position[]\"]')) {\n element.querySelector('input[name=\"position[]\"]').value = newPosition;\n }\n \n}\n\nfunction rowRemoveModal(element, callback) {\n\n var container = element.parentElement;\n\n var text = 'Sei sicuro di voler eliminare questa linea?<br>Se <b>NON</b> salvi questa operazione non verrà effettuata!'\n modal(text, 'link');\n\n for (let a = 1; a < 100; a++) { \n\n var elementClass = 'order-'+a;\n if(element.classList.contains(elementClass)) { \n var orderN = a;\n break; \n }\n\n }\n\n var selector = '#'+container.id+' .'+elementClass;\n \n var onclick = 'rowRemove(\"'+selector+'\", \"'+orderN+'\")';\n if (typeof callback === 'function') { onclick += ';'+callback.name+'()'; }\n \n var sendBtn = document.querySelector('#modal button.send');\n sendBtn.setAttribute(\"onclick\", onclick);\n\n}\n\nfunction rowRemove(selector, nRow) {\n\n $('#modal').modal('hide');\n\n var element = document.querySelector(selector);\n var container = element.parentElement;\n var containerId = container.id;\n pageRemove(element);\n\n var rowStart = (nRow * 1) + 1;\n\n for (let a = rowStart; a < 100; a++) {\n\n var selector = '#'+containerId+' .order-'+a;\n\n if (document.querySelector(selector)) {\n var b = a - 1;\n rowChangePos(document.querySelector(selector), a, b);\n } else {\n break;\n }\n \n }\n\n rowSetArrow(container)\n\n}\n\nfunction rowSetArrow(container) {\n\n var nRow = document.querySelectorAll('#'+container.id+' .wi-copy-row').length;\n\n if (document.querySelector('#'+container.id+' .wi-copy-row.order-1 .wi-arrow-up') || document.querySelector('#'+container.id+' .wi-copy-row.order-1 .wi-arrow-down')) {\n\n if (nRow > 1) {\n\n for (let i = 1; i <= nRow; i++) {\n\n var arrowUp = document.querySelector('#'+container.id+' .wi-copy-row.order-'+i+' .wi-arrow-up');\n var arrowDown = document.querySelector('#'+container.id+' .wi-copy-row.order-'+i+' .wi-arrow-down');\n\n if (arrowUp.classList.contains('visually-hidden')) {\n arrowUp.classList.remove('visually-hidden');\n }\n\n if (arrowDown.classList.contains('visually-hidden')) {\n arrowDown.classList.remove('visually-hidden');\n }\n\n if (i == 1) {\n arrowUp.classList.add('visually-hidden');\n }\n\n if (i == nRow) {\n arrowDown.classList.add('visually-hidden');\n }\n \n }\n\n } else if (nRow == 1) {\n\n document.querySelector('#'+container.id+' .wi-copy-row.order-1 .wi-arrow-up').classList.add('visually-hidden');\n document.querySelector('#'+container.id+' .wi-copy-row.order-1 .wi-arrow-down').classList.add('visually-hidden');\n\n }\n\n }\n \n}"},1989(e){e.exports="function searchStates(inputCountry, stateValue = null) {\n var form = inputCountry.form;\n if (!form) return;\n // In una riga di repeater i nomi sono `riga[0][campo]`: la provincia è quella della stessa riga.\n var stateName = inputCountry.dataset.wiInputState;\n var rowState = /\\[[^\\[\\]]+\\]$/.test(inputCountry.name) ? inputCountry.name.replace(/\\[[^\\[\\]]+\\]$/, '[' + stateName + ']') : null;\n var selects = Array.from(form.querySelectorAll('select'));\n var wanted = rowState !== null ? rowState : stateName;\n var inputState = selects.find(function (field) { return field.name === wanted; });\n if (!inputState) return;\n var country = inputCountry.value || '';\n if (inputState.wiStateRequired === undefined) {\n inputState.wiStateRequired = inputState.required || /required/.test(inputState.dataset.wiAttribute || inputState.dataset.wiInputAttribute || '');\n }\n if (country === inputState.dataset.wiListStates && !inputState.wiStatesPending) {\n if (stateValue !== null) inputState.value = stateValue;\n return;\n }\n var request = (inputState.wiStatesRequest || 0) + 1;\n inputState.wiStatesRequest = request;\n inputState.value = '';\n inputState.wiStatesPending = country !== '';\n inputState.disabled = country !== '';\n if (country === '') {\n inputState.innerHTML = '';\n inputState.dataset.wiListStates = '';\n inputState.required = false;\n inputState.dispatchEvent(new Event('change', { bubbles: true }));\n return;\n }\n $.ajax({\n type: 'POST',\n url: typeof pathApi === 'string' && pathApi ? pathApi.replace(/\\/$/, '') + '/states/' : pathApp + '/api/states.php',\n data: { post: 'true', country: country },\n success: function (data) {\n if (request !== inputState.wiStatesRequest || inputCountry.value !== country) return;\n try { data = typeof data === 'string' ? JSON.parse(data) : data; }\n catch (error) { failure(error); return; }\n if (!data || typeof data !== 'object' || Array.isArray(data) && data.length) { failure(data); return; }\n inputState.innerHTML = '';\n var entries = Object.entries(data);\n if (entries.length) inputState.add(new Option('', ''));\n entries.forEach(function (entry) { inputState.add(new Option(entry[1], entry[0])); });\n inputState.value = stateValue !== null ? stateValue : '';\n inputState.dataset.wiListStates = country;\n inputState.wiStatesPending = false;\n inputState.disabled = false;\n inputState.required = inputState.wiStateRequired && entries.length > 0;\n inputState.dispatchEvent(new Event('change', { bubbles: true }));\n },\n error: failure\n });\n function failure(error) {\n if (request !== inputState.wiStatesRequest) return;\n inputState.wiStatesPending = false;\n inputState.disabled = false;\n if (typeof ajaxRequestError === 'function') ajaxRequestError(error);\n }\n}\n"},7741(e){e.exports="/*\n * Adapter della \"creazione rapida\" da campo FK (wonder-image/app).\n *\n * Il renderer del campo (tema Bootstrap del framework) stampa il \"+\" e il\n * modal; alla creazione della riga collegata emette un evento\n * `wi:quick-create:created` con { input, id, label, family, resource, item },\n * dove `item` è la riga appena salvata e `input` è\n * l'elemento bersaglio già risolto. Qui inseriamo+selezioniamo la nuova\n * opzione nei widget che questa lib possiede e che il framework, da solo, non\n * sa aggiornare:\n *\n * - selectSearch -> select2: aggiunge l'opzione e forza il re-render con\n * `.trigger('change')` (un change nativo non basta a far\n * ridisegnare la selezione).\n * - dynamicCheck -> card di checkbox/radio caricata via AJAX: appende una\n * `.form-check` spuntata nel `.card-body`, copiando nome e\n * tipo dall'input di ricerca.\n * - checkTree -> jstree: crea il nodo sotto il genitore (`item.parent_id`)\n * e lo spunta, se l'albero è a spunte.\n *\n * Vedi docs/app/concetti/form/quick-create.md del framework.\n */\n(function () {\n\n if (window.wiQuickCreateAdapters) { return; }\n window.wiQuickCreateAdapters = true;\n\n function hasOption(list, id) {\n return Array.prototype.some.call(list, function (el) {\n return String(el.value) === String(id);\n });\n }\n\n function fillSelect(select, id, label) {\n\n var $ = window.jQuery;\n var isSelect2 = !!($ && $.fn && $.fn.select2 && $(select).data('select2'));\n\n if (!hasOption(select.options, id)) {\n select.appendChild(new Option(label, id, false, false));\n }\n\n if (select.multiple) {\n var values = isSelect2 ? ($(select).val() || []) : Array.prototype.map.call(select.selectedOptions, function (o) { return o.value; });\n if (values.indexOf(String(id)) === -1) { values.push(String(id)); }\n if (isSelect2) { $(select).val(values); }\n else { Array.prototype.forEach.call(select.options, function (o) { if (o.value === String(id)) { o.selected = true; } }); }\n } else {\n if (isSelect2) { $(select).val(String(id)); }\n else { select.value = String(id); }\n }\n\n if (isSelect2) { $(select).trigger('change'); }\n else { select.dispatchEvent(new Event('change', { bubbles: true })); }\n }\n\n function fillDynamicCheck(container, id, label) {\n\n var search = container.querySelector('[data-wi-search-url]');\n var body = container.querySelector('.card .card-body');\n\n if (!search || !body) { return false; }\n\n var type = search.dataset.wiSearchRadio !== undefined ? 'radio' : 'checkbox';\n\n if (hasOption(body.querySelectorAll('input[type=\"' + type + '\"]'), id)) { return true; }\n\n var input = document.createElement('input');\n input.className = 'form-check-input';\n input.type = type;\n input.name = search.dataset.wiName || '';\n input.value = id;\n input.setAttribute('data-wi-check', 'true');\n input.checked = true;\n\n var text = document.createElement('label');\n text.className = 'form-check-label wi-check-label user-select-none';\n text.textContent = label;\n\n var wrap = document.createElement('div');\n wrap.className = 'form-check';\n wrap.appendChild(input);\n wrap.appendChild(document.createTextNode(' '));\n wrap.appendChild(text);\n body.appendChild(wrap);\n\n // Ri-arma validazione/contatori sui nuovi input (la stessa che gira a page-setup).\n if (typeof checkInput === 'function') { checkInput(); }\n\n return true;\n }\n\n /**\n * L'albero a spunte: jstree non rilegge il DOM da solo, il nodo va\n * creato con la sua API. Il nodo porta solo l'etichetta: la casella che\n * il salvataggio posta la scrive `setJsTreeValues()` (set.js) fuori\n * dall'albero, appena jstree segna la spunta.\n *\n * Il nodo nasce sotto il suo genitore (`item.parent_id`, la convenzione\n * degli alberi del framework) quando l'albero lo contiene, altrimenti in\n * cima. Solo gli alberi a spunte lo spuntano: in un albero a scelta\n * singola — il «padre» di un modal, per esempio — la voce nuova è una\n * possibilità in più, non la scelta.\n */\n function fillCheckTree(container, id, label, item) {\n\n var tree = container.querySelector('[data-wi-tree]');\n\n if (!tree || !window.jQuery || !window.jQuery(tree).jstree) { return false; }\n\n var istanza = window.jQuery(tree).jstree(true);\n\n if (!istanza) { return false; }\n\n var spunta = tree.getAttribute('data-wi-tree') !== 'radio';\n var chiave = String(id);\n\n if (!istanza.get_node(chiave)) {\n\n // Il nome arriva da chi l'ha scritto: nel testo del nodo va come\n // testo, non come HTML.\n var testo = document.createElement('span');\n testo.textContent = label;\n\n var genitore = item && item.parent_id !== undefined && item.parent_id !== null ? String(item.parent_id) : '';\n var padre = genitore !== '' && istanza.get_node(genitore) ? genitore : '#';\n\n if (istanza.create_node(padre, { id: chiave, text: testo.innerHTML }) === false) { return false; }\n\n if (padre !== '#') { istanza.open_node(padre); }\n\n }\n\n if (spunta) { istanza.check_node(chiave); }\n\n return true;\n }\n\n /** Ogni campo della pagina che elenca le righe di quella risorsa. */\n function widgetsDellaRisorsa(resource) {\n\n if (!resource) { return []; }\n\n return Array.prototype.slice.call(\n document.querySelectorAll('[data-wi-qc-resource=\"' + resource + '\"]')\n );\n }\n\n document.addEventListener('wi:quick-create:created', function (ev) {\n\n var detail = (ev && ev.detail) || {};\n var input = detail.input;\n\n // La riga nuova non appartiene al campo che l'ha creata: appartiene\n // alla risorsa. Ogni altro campo della pagina che elenca quelle\n // righe deve vedersela comparire — e il campo di partenza, quando è\n // un albero, per primo.\n var alberi = widgetsDellaRisorsa(detail.resource);\n\n if (input && input.nodeType && alberi.indexOf(input) === -1) { alberi.unshift(input); }\n\n alberi.forEach(function (widget) {\n if (widget.querySelector && widget.querySelector('[data-wi-tree]')) {\n fillCheckTree(widget, detail.id, detail.label, detail.item || {});\n }\n });\n\n if (!input || !input.nodeType) { return; }\n\n if (input.tagName === 'SELECT' && input.matches('[data-wi-select-search]')) {\n fillSelect(input, detail.id, detail.label);\n return;\n }\n\n if (input.querySelector && input.querySelector('[data-wi-search-url]')) {\n fillDynamicCheck(input, detail.id, detail.label);\n return;\n }\n\n });\n\n})();\n"},7676(e){e.exports="/*\n * L'isola di salvataggio del backend, per i `form[data-wi-save-bar]`.\n *\n * Quando i bottoni di invio escono dallo schermo, le loro copie compaiono in\n * un'isola fissa in basso; se il form ha modifiche non salvate l'isola mostra\n * \"Operazione non salvata\" e l'uscita dalla pagina chiede conferma. Sporco\n * vuol dire che la FormData di adesso e' diversa da quella di partenza.\n *\n * Un `a[data-wi-save-bar-cancel]` nella pagina aggiunge Annulla, verso il suo href.\n *\n * Il contratto sono gli attributi `data-wi-save-bar*`, `window.wiSaveBar` e\n * l'evento `wi:save-bar:change`; classi e `data-wi-state` sono interni.\n * L'avvio e' `setUpSaveBar()`, chiamato da `setUpPage()`.\n */\nfunction saveBarOff() {\n\n return false;\n\n}\n\n// Prima dell'avvio, e senza form tracciati, le funzioni non fanno nulla.\nvar saveBarLabels = {\n group: 'Barra di salvataggio',\n unsaved: 'Operazione non salvata',\n cancel: 'Annulla',\n confirmOther: 'Ci sono modifiche non salvate in un altro modulo della pagina. Continuare e perderle?'\n};\n\nwindow.wiSaveBar = {\n changed: saveBarOff,\n reset: saveBarOff,\n isDirty: saveBarOff,\n absorb: saveBarOff,\n labels: Object.assign({}, saveBarLabels)\n};\n\n// Le voci che il form spedirebbe adesso, in ordine e normalizzate.\nfunction formSnapshot(form, excludeSelector) {\n\n var inside = {}, outside = {}, sets = {}, numeric = {}, seen = {}, keys = [], names = [];\n\n // :disabled copre anche i campi di un fieldset disabilitato, come la riga eliminata del repeater.\n for (var el of form.elements) {\n if (!el.name || el.matches(':disabled')) continue;\n (el.closest(excludeSelector) ? inside : outside)[el.name] = true;\n sets[el.name] = sets[el.name] !== false && el.type === 'checkbox';\n (numeric[el.name] = numeric[el.name] || []).push(AutoNumeric.getAutoNumericElement(el));\n }\n\n new FormData(form).forEach((value, name) => {\n var index = seen[name] = (seen[name] || 0) + 1;\n if (inside[name] && !outside[name]) return;\n if (inside[name] && !formSnapshot.warned[name]) {\n formSnapshot.warned[name] = true;\n console.warn('wiSaveBar: il nome \"' + name + '\" sta dentro e fuori da una zona esclusa, quindi conta intero');\n }\n if (value instanceof File) {\n if (!value.name) return;\n value = [value.name, value.size, value.type];\n } else {\n var auto = numeric[name] && numeric[name][index - 1];\n if (auto && auto.getNumericString() != null) value = auto.getNumericString();\n }\n keys.push(JSON.stringify([name].concat(value)));\n names.push(name);\n });\n\n return { keys: keys, names: names, sets: sets };\n\n}\n\nformSnapshot.warned = {};\n\n// Conta l'ordine, tranne per i nomi fatti solo di checkbox, che valgono come insieme.\nfunction sameSnapshot(a, b) {\n\n var text = s => {\n var ordered = [], unordered = [];\n s.keys.forEach((key, i) => (s.sets[s.names[i]] ? unordered : ordered).push(key));\n return ordered.join('\\n') + '\\n\\n' + unordered.sort().join('\\n');\n };\n\n return text(a) === text(b);\n\n}\n\n// Il nuovo punto di partenza: da current solo i campi dentro container, il resto resta com'era.\nfunction absorbSnapshot(base, current, container) {\n\n var inside = {}, keys = [], names = [], rest = [];\n\n container.querySelectorAll('[name]').forEach(el => inside[el.name] = true);\n if (container.name) inside[container.name] = true;\n base.names.forEach((name, i) => { if (!inside[name]) rest.push(i); });\n current.names.forEach((name, i) => {\n if (inside[name]) { keys.push(current.keys[i]); names.push(name); }\n else if (rest.length) { var j = rest.shift(); keys.push(base.keys[j]); names.push(base.names[j]); }\n });\n rest.forEach(j => { keys.push(base.keys[j]); names.push(base.names[j]); });\n\n return { keys: keys, names: names, sets: current.sets };\n\n}\n\n// fn al massimo una volta per frame, mai dentro la chiamata.\nfunction frameScheduler(fn) {\n\n var queued = false;\n\n return () => {\n if (queued) return;\n queued = true;\n requestAnimationFrame(() => {\n queued = false;\n fn();\n });\n };\n\n}\n\n// La tabella degli stati dell'isola.\nfunction saveBarState(ready, submitting, dirty, outside) {\n\n if (submitting) return 'submitting';\n if (!ready) return 'hidden';\n if (outside) return dirty ? 'dirty-buttons' : 'buttons';\n return dirty ? 'dirty-label' : 'hidden';\n\n}\n\n// Un elemento con attributi e figli.\nfunction saveBarNode(tag, attrs, children) {\n\n var el = document.createElement(tag);\n\n Object.keys(attrs).forEach(name => el.setAttribute(name, attrs[name]));\n el.append(...(children || []));\n\n return el;\n\n}\n\n// Una copia pulita del bottone: dell'originale solo etichetta, classi btn* e disabled.\nfunction proxyButton(original) {\n\n var copy = saveBarNode('button', { type: 'button' });\n\n syncProxy(original, copy);\n\n return copy;\n\n}\n\n// La copia segue l'originale; l'etichetta si riscrive solo se cambia.\nfunction syncProxy(original, copy) {\n\n var template = document.createElement('template');\n\n if (original.tagName === 'INPUT') template.content.append(original.value);\n else template.innerHTML = original.innerHTML;\n template.content.querySelectorAll('*').forEach(el => [...el.attributes].forEach(attr => {\n if (attr.name === 'id' || attr.name.startsWith('data-')) el.removeAttribute(attr.name);\n }));\n if (copy.innerHTML !== template.innerHTML) copy.innerHTML = template.innerHTML;\n // Il nome accessibile di un bottone con la sola icona.\n ['aria-label', 'title'].forEach(name => original.hasAttribute(name) ? copy.setAttribute(name, original.getAttribute(name)) : copy.removeAttribute(name));\n copy.className = [...original.classList].filter(name => name.startsWith('btn') && name !== 'btn-check' || name === 'disabled').concat('wi-save-bar-btn').join(' ');\n copy.disabled = original.disabled || original.classList.contains('disabled') || original.getAttribute('aria-disabled') === 'true';\n\n}\n\n// L'avvio, una volta sola: chiamato da setUpPage() subito prima di loaded.\nfunction setUpSaveBar() {\n\n if (setUpSaveBar.started) return;\n setUpSaveBar.started = true;\n\n var EXCLUDE = '.modal, [data-wi-save-bar-ignore]';\n var SKIP = '.modal, .offcanvas, [data-wi-save-bar-ignore]';\n var BUTTONS = 'button, [type=submit], .wi-submit';\n var SIGNALS = ['input', 'change', 'click', 'keyup', 'FilePond:addfile', 'FilePond:removefile', 'FilePond:reorderfiles', 'FilePond:processfile', 'FilePond:processfilerevert', 'FilePond:updatefiles', 'wi-repeater-row-delete', 'wi-repeater-row-restore', 'wi:quick-create:created', 'autoNumeric:rawValueModified'];\n var INTERACTIONS = ['keydown', 'pointerdown', 'mousedown', 'touchstart', 'paste', 'drop', 'input', 'click'];\n var SCROLL = { capture: true, passive: true };\n var forms, active, labels, bar, actions, status, listed, io, ro, topbarHeight, band, interacted = false, seen = false, submitting = false;\n var copies = new Map(), hits = new Map(), recalcSoon = frameScheduler(recalc), renderSoon = frameScheduler(render);\n\n // Un argomento che non e' un Node (oggetto jQuery, Delta di Quill) vale come nessun argomento.\n var stateOf = el => el instanceof Node && forms.find(state => state.form === el.form || state.form.contains(el));\n\n function setDirty(state, dirty) {\n\n if (state.dirty === dirty) return;\n state.dirty = dirty;\n state.form.dispatchEvent(new CustomEvent('wi:save-bar:change', { bubbles: true, detail: { dirty: dirty } }));\n\n }\n\n function recalc() {\n\n forms.forEach(state => {\n var current = formSnapshot(state.form, EXCLUDE);\n // Prima dell'interazione ogni differenza diventa il punto di partenza; dopo, solo absorb().\n state.base = !state.base || !interacted ? current : state.absorb.reduce((base, el) => absorbSnapshot(base, current, el), state.base);\n state.absorb = [];\n setDirty(state, state.flag || !sameSnapshot(state.base, current));\n });\n // I bottoni del form attivo: le copie esistenti non si ricreano e non si spostano.\n if (listed !== active) {\n var list = [...active.form.elements].filter(el => (el.type === 'submit' || el.classList.contains('wi-submit')) && !el.closest(SKIP));\n var next = null;\n copies.forEach((item, original) => {\n if (list.includes(original)) return;\n item.copy.remove();\n item.observer.disconnect();\n io.unobserve(original);\n ro.unobserve(original);\n hits.delete(original);\n copies.delete(original);\n });\n list.reverse().forEach(original => {\n var item = copies.get(original);\n if (!item) {\n var copy = proxyButton(original);\n item = { copy: copy, observer: new MutationObserver(records => {\n syncProxy(original, copy);\n if (records.some(record => ['type', 'hidden', 'data-wi-save-bar-ignore'].includes(record.attributeName))) {\n listed = null;\n recalcSoon();\n }\n }) };\n copy.addEventListener('click', () => {\n if (!submitting) original.click();\n });\n item.observer.observe(original, { attributes: true, attributeFilter: ['disabled', 'aria-disabled', 'aria-label', 'title', 'class', 'type', 'hidden', 'data-wi-save-bar-ignore'], characterData: true, childList: true, subtree: true });\n actions.insertBefore(copy, next);\n copies.set(original, item);\n io.observe(original);\n ro.observe(original);\n }\n next = item.copy;\n });\n listed = active;\n }\n render();\n\n }\n\n function onInteraction(event) {\n\n if (!event.isTrusted || interacted) return;\n interacted = true;\n // input e click arrivano a valore gia' cambiato: il punto di partenza resta quello dell'ultimo frame.\n if (event.type !== 'input' && event.type !== 'click') forms.forEach(state => state.base = formSnapshot(state.form, EXCLUDE));\n\n }\n\n // Stato, inert e regione status seguono il form attivo; l'avviso di uscita tutti i form.\n function render() {\n\n // Un originale non ancora visto da IO si misura subito.\n var outside = [...copies].some(([original, item]) => {\n if (item.copy.hidden) return false;\n var rect = hits.get(original) !== false && original.getBoundingClientRect();\n return !(rect && rect.top >= topbarHeight - 1 && rect.bottom <= window.innerHeight - band + 1);\n });\n var state = saveBarState(!!active.base && (seen || !copies.size), submitting, active.dirty, outside);\n var text = state.startsWith('dirty') ? labels.unsaved : '';\n\n if (bar.getAttribute('data-wi-state') !== state) {\n // Prima di inert: il focus su una copia passa al suo originale.\n if (state === 'hidden' || state === 'dirty-label') copies.forEach((item, original) => {\n if (item.copy === document.activeElement) original.focus({ preventScroll: true });\n });\n bar.setAttribute('data-wi-state', state);\n // Il contenuto resta quello dell'ultimo stato visibile: niente scambio durante la dissolvenza.\n if (state !== 'hidden' && state !== 'submitting') bar.setAttribute('data-wi-face', state);\n bar.inert = state === 'hidden' || state === 'submitting';\n actions.inert = state === 'dirty-label';\n }\n if (status.textContent !== text) status.textContent = text;\n if (!submitting && forms.some(entry => entry.dirty)) window.addEventListener('beforeunload', preventPageExit);\n else window.removeEventListener('beforeunload', preventPageExit);\n\n }\n\n // Il form attivo e' l'ultimo toccato dall'utente.\n function onActivate(event) {\n\n var state = event.isTrusted && stateOf(event.target);\n\n if (!state || state === active) return;\n active = state;\n recalcSoon();\n\n }\n\n // Gira per ultimo: defaultPrevented e' gia' definitivo.\n function onSubmit(event) {\n\n var form = event.target, submitter = event.submitter, state = stateOf(form);\n var read = name => ((submitter && submitter.getAttribute('form' + name)) || form.getAttribute(name) || '').toLowerCase();\n\n if (event.defaultPrevented) return;\n // Un invio che naviga la finestra con un altro form sporco chiede conferma (Q3).\n if (read('target') !== '_blank' && read('method') !== 'dialog' && !submitting && forms.some(entry => entry !== state && entry.dirty)) {\n if (!confirm(labels.confirmOther)) {\n event.preventDefault();\n loadingSpinner(false);\n return;\n }\n submitting = true;\n }\n if (state) {\n state.flag = false;\n submitting = true;\n }\n render();\n\n }\n\n // IO dice solo chi tocca la zona tra topbar e fascia: finche' qualcuno la tocca si misura a ogni scroll.\n function onIntersect(entries) {\n\n entries.forEach(entry => {\n if (copies.has(entry.target)) hits.set(entry.target, entry.isIntersecting);\n });\n seen = true;\n if ([...hits.values()].includes(true)) window.addEventListener('scroll', renderSoon, SCROLL);\n else window.removeEventListener('scroll', renderSoon, SCROLL);\n renderSoon();\n\n }\n\n // La fascia dal token CSS e l'altezza della topbar: IO nuovo solo se cambiano.\n function readBand() {\n\n var match = getComputedStyle(document.documentElement).getPropertyValue('--wi-save-bar-band').trim().match(/^(\\d+(?:\\.\\d+)?)px$/);\n var topbar = document.getElementById('topbar');\n var top = topbar ? topbar.offsetHeight : 50;\n var size = match ? +match[1] : 96;\n // threshold 1 si blocca a 0,99 con DPR frazionari\n var create = () => new IntersectionObserver(onIntersect, { threshold: [0], rootMargin: '-' + top + 'px 0px -' + band + 'px 0px' });\n\n if (io && top === topbarHeight && size === band) return;\n if (io) io.disconnect();\n topbarHeight = top;\n band = size;\n try {\n io = create();\n } catch (error) {\n band = 96;\n io = create();\n }\n copies.forEach((item, original) => io.observe(original));\n\n }\n\n try {\n\n if (!(window.IntersectionObserver && window.ResizeObserver && window.MutationObserver && 'inert' in HTMLElement.prototype)) return;\n forms = [...document.querySelectorAll('form[data-wi-save-bar]')].map(form => {\n var flag = form.hasAttribute('data-wi-save-bar-dirty');\n return { form: form, base: null, flag: flag, dirty: flag, absorb: [] };\n });\n if (!forms.length) return;\n active = forms.find(state => state.flag) || forms[0];\n\n // .trigger() di jQuery non arriva ad addEventListener.\n $(document).on('input change', recalcSoon);\n\n // I testi si leggono adesso: il sito puo' averli cambiati dopo il caricamento.\n // Un oggetto sostituito in parte non deve stampare \"undefined\": i testi mancanti tornano quelli di base.\n labels = Object.assign(window.wiSaveBar.labels || (window.wiSaveBar.labels = {}), Object.assign({}, saveBarLabels, window.wiSaveBar.labels));\n // Annulla riusa il link \"indietro\" della pagina, se dichiarato: sta sempre prima delle copie.\n var back = document.querySelector('a[data-wi-save-bar-cancel][href]');\n actions = saveBarNode('div', { class: 'wi-save-bar-actions' }, back ? [saveBarNode('a', { class: 'btn btn-light wi-save-bar-cancel', href: back.getAttribute('href') }, [labels.cancel])] : []);\n bar = saveBarNode('div', { class: 'wi-save-bar', 'data-wi-state': 'hidden', 'data-wi-face': 'buttons', role: 'group', 'aria-label': labels.group, inert: '' }, [\n saveBarNode('div', { class: 'wi-save-bar-island' }, [\n saveBarNode('span', { class: 'wi-save-bar-label' }, [saveBarNode('i', { class: 'bi bi-circle-fill', 'aria-hidden': 'true' }), ' ' + labels.unsaved]),\n actions\n ])\n ]);\n status = saveBarNode('div', { class: 'visually-hidden', role: 'status' });\n document.body.append(bar, status);\n document.documentElement.classList.add('wi-save-bar-on');\n\n ro = new ResizeObserver(entries => {\n entries.forEach(entry => {\n var item = copies.get(entry.target);\n if (item) item.copy.hidden = !(entry.target.checkVisibility ? entry.target.checkVisibility() : entry.target.getClientRects().length > 0);\n });\n renderSoon();\n });\n readBand();\n window.addEventListener('resize', frameScheduler(() => {\n readBand();\n render();\n }));\n\n // Sempre un ricalcolo; l'elenco dei bottoni solo se la mutazione tocca un bottone o gli attributi type e ignore.\n var observer = new MutationObserver(records => {\n if (records.some(record => ['type', 'data-wi-save-bar-ignore'].includes(record.attributeName) || [...record.addedNodes, ...record.removedNodes].some(node => node.nodeType === 1 && (node.matches(BUTTONS) || node.querySelector(BUTTONS))))) listed = null;\n recalcSoon();\n });\n forms.forEach(state => observer.observe(state.form, { childList: true, subtree: true, attributes: true, attributeFilter: ['disabled', 'type', 'data-wi-save-bar-ignore'] }));\n SIGNALS.forEach(type => document.addEventListener(type, recalcSoon, true));\n INTERACTIONS.forEach(type => document.addEventListener(type, onInteraction, true));\n ['focusin', 'pointerdown', 'input'].forEach(type => document.addEventListener(type, onActivate, true));\n // Il listener in bolla torna in coda a ogni invio, come FormSubmitObserver di Turbo.\n window.addEventListener('submit', () => {\n window.removeEventListener('submit', onSubmit);\n window.addEventListener('submit', onSubmit);\n }, true);\n // Dalla bfcache dopo un invio si ricarica con una GET, mai con un nuovo POST.\n window.addEventListener('pageshow', event => {\n if (!event.persisted) return;\n if (!submitting) return recalcSoon();\n loadingSpinner(false);\n location.replace(location.href.split('#')[0]);\n });\n // Tastiera virtuale: si decide nel frame dopo focusout, cosi' tra due campi l'isola non ricompare.\n var coarse = matchMedia('(pointer: coarse)');\n var keyboardSoon = frameScheduler(() => {\n var el = document.activeElement;\n var typing = el.tagName === 'TEXTAREA' || el.isContentEditable || el.tagName === 'INPUT' && !/^(checkbox|radio|button|submit|reset|file|range|color)$/.test(el.type);\n bar.toggleAttribute('data-wi-save-bar-keyboard', typing && (coarse.matches || visualViewport.height < 0.75 * window.innerHeight));\n });\n ['focusin', 'focusout'].forEach(type => document.addEventListener(type, keyboardSoon, true));\n visualViewport.addEventListener('resize', keyboardSoon);\n\n Object.assign(window.wiSaveBar, {\n changed: el => {\n recalcSoon();\n return !!stateOf(el);\n },\n reset: form => {\n var state = stateOf(form);\n if (!state) return false;\n state.flag = false;\n state.base = formSnapshot(state.form, EXCLUDE);\n state.absorb = [];\n setDirty(state, false);\n render();\n return true;\n },\n isDirty: form => {\n var state = stateOf(form);\n return !!(state && state.dirty);\n },\n absorb: el => {\n var state = stateOf(el);\n if (!state) return false;\n state.absorb.push(el);\n recalcSoon();\n return true;\n }\n });\n recalcSoon();\n\n } catch (error) {\n console.error(error);\n }\n\n}\n"},9198(e){e.exports="async function formUpload(form, url, responseFunction = null) {\n \n var formData = new FormData(form);\n formData.append('post', 'true');\n\n await postData(url, formData).then((data) => {\n \n if (data != false) {\n if (typeof responseFunction === 'function') { responseFunction(data); }\n }\n\n });\n\n}"},1826(e){e.exports="// Sanitizza l'HTML del rich text editor (Quill) per prevenire XSS.\n// Quill 2.0.3 non valida l'HTML in input/export: DOMPurify rimuove script,\n// gestori di eventi e URI pericolosi mantenendo la formattazione consentita.\nfunction wiSanitizeHtml(html) {\n\n if (html == null) { return ''; }\n\n if (typeof window.DOMPurify !== 'undefined') {\n\n return window.DOMPurify.sanitize(html, {\n ALLOWED_TAGS: ['p', 'br', 'span', 'strong', 'b', 'em', 'i', 'u', 's', 'strike', 'del', 'ol', 'ul', 'li', 'a', 'blockquote'],\n ALLOWED_ATTR: ['href', 'target', 'rel', 'class']\n });\n\n }\n\n // Fallback fail-closed: se DOMPurify non è disponibile, rimuove ogni markup.\n var tmp = document.createElement('div');\n tmp.textContent = html;\n return tmp.innerHTML;\n\n}\n\n// Legge un valore `data-wi-*` scritto dal core con base64_encode(): i byte\n// sono UTF-8, e atob() da solo li restituirebbe uno per carattere, rovinando\n// le lettere accentate («perché» diventerebbe «perché»).\nfunction wiBase64DecodeUtf8(value) {\n\n if (value == null || value === '') { return ''; }\n\n return new TextDecoder().decode(Uint8Array.from(atob(value), c => c.charCodeAt(0)));\n\n}\n\nfunction setSearchInput(CONTAINER) {\n\n CONTAINER.querySelectorAll(\"[data-wi-search='true']\").forEach(element => {\n\n element.addEventListener(\"keyup\", inputSearch);\n element.addEventListener(\"change\", lengthCount);\n element.addEventListener(\"focusin\", lengthCount);\n element.addEventListener(\"focusout\", lengthCount);\n\n if (element.dataset.wiSearchUrl != undefined) { setDynamicSearch(element); }\n\n });\n \n}\n\nfunction setDynamicSearch(element) {\n\n var dataValue = element.dataset.wiValue;\n var containerMaster = element.parentElement;\n var container = containerMaster.querySelector('.card .card-body');\n var footer = containerMaster.querySelector('.card .card-footer');\n\n container.innerHTML = \"\";\n\n if (dataValue != '') {\n\n var value = dataValue;\n var url = element.dataset.wiSearchUrl;\n\n $.ajax({\n type: \"POST\",\n url: url,\n data: { \n post: 'true',\n id: value\n }, \n success: function (data) {\n createCheckbox(data, element, container, true);\n checkInput();\n // Il caricamento iniziale non e' una modifica dell'utente\n window.wiSaveBar?.absorb(element.closest('[id^=\"container-\"]'));\n },\n error: function (XMLHttpRequest) {\n\n ajaxRequestError(XMLHttpRequest);\n footer.innerHTML = 'Errore!';\n\n }\n });\n \n }\n\n}\n\nfunction setUploader(CONTAINER) {\n\n CONTAINER.querySelectorAll(\"[data-wi-uploader]\").forEach(uploader => {\n\n var id = uploader.id;\n var type = uploader.dataset.wiUploader;\n var dir = uploader.dataset.wiDir;\n var value = uploader.dataset.wiValue;\n var label = uploader.dataset.wiUploaderLabel;\n var maxSize = uploader.dataset.maxFileSize;\n var maxFiles = uploader.dataset.maxFiles;\n var sizeBefore = uploader.dataset.sizeBefore;\n var minSizeImage = uploader.dataset.minSizeImage;\n var accept = uploader.accept;\n\n if (accept === '' || accept === '*') {\n var validation = false;\n } else {\n var validation = true;\n }\n\n var files = [];\n \n if (value != \"\") {\n\n var value = JSON.parse(value);\n \n value.forEach(file => {\n\n var linkDowload = dir+file;\n var linkPoster = linkDowload;\n\n if (minSizeImage != \"\") {\n if (sizeBefore) {\n linkPoster = dir + minSizeImage + '-' + file;\n } else {\n const lastDot = file.lastIndexOf('.');\n const extension = lastDot !== -1 ? file.slice(lastDot + 1) : '';\n const name = lastDot !== -1 ? file.slice(0, lastDot) : file;\n linkPoster = dir + name + '-' +minSizeImage + (extension ? '.' + extension : '');\n }\n }\n \n var source = {\n source: linkDowload\n };\n\n files.push(source);\n\n });\n\n }\n\n if (type == 'classic') {\n\n var pond = FilePond.create(uploader, {\n storeAsFile: true,\n allowReorder: true,\n labelIdle: `Trascina `+label+` o <span class=\"filepond--label-action\">Cerca</span>`,\n files: files,\n allowDownloadByUrl: true,\n allowImagePreview: true,\n imagePreviewMaxFileSize: '128KB',\n allowFileTypeValidation: validation,\n allowFileSizeValidation: maxSize == '' ? false : true,\n maxFileSize: maxSize,\n labelMaxFileSizeExceeded: `File troppo grande`,\n labelMaxFileSize: `Dimensioni massime file {filesize}`,\n maxFiles: maxFiles,\n instantUpload: false,\n onaddfile: () => { check(); },\n onremovefile: () => { check(); }\n });\n \n } else if (type == 'profile') {\n\n var pond = FilePond.create(uploader, {\n storeAsFile: true,\n labelIdle: `Trascina `+label+` o <span class=\"filepond--label-action\">Cerca</span>`,\n imageCropAspectRatio: '1:1',\n stylePanelLayout: 'compact circle',\n styleLoadIndicatorPosition: 'center bottom',\n styleButtonRemoveItemPosition: 'center bottom',\n files: files,\n allowDownloadByUrl: true,\n allowImagePreview: true,\n imagePreviewMaxFileSize: '128KB',\n allowFileTypeValidation: validation,\n allowFileSizeValidation: maxSize == '' ? false : true,\n maxFileSize: maxSize,\n labelMaxFileSizeExceeded: `File troppo grande`,\n labelMaxFileSize: `Dimensioni massime file {filesize}`,\n maxFiles: maxFiles,\n instantUpload: false,\n onaddfile: () => { check(); },\n onremovefile: () => { check(); }\n });\n \n }\n\n if (pond && uploader.dataset.wiFileReferences === 'true') {\n setUploaderFileReferences(pond, files, value);\n }\n\n });\n\n}\n\nfunction setUploaderFileReferences(pond, files, storedNames) {\n const form = pond.element.closest('form');\n if (!form) { return; }\n\n const stored = new Map(files.map((file, index) => [file.source, storedNames[index]]));\n const prepared = new Map();\n pond.on('preparefile', (item, output) => prepared.set(item.id, output));\n pond.on('removefile', (error, item) => { if (!error && item) prepared.delete(item.id); });\n const serialize = event => {\n if (!pond.element.isConnected || pond.disabled || pond.element.closest('fieldset:disabled')) { return; }\n\n const name = pond.name;\n const base = name.replace(/\\[\\]$/, '');\n const manifestName = base.endsWith(']')\n ? base.replace(/\\]$/, '__wi_files]')\n : base + '__wi_files';\n const manifest = [];\n let uploadIndex = 0;\n\n event.formData.delete(name);\n pond.getFiles().forEach(item => {\n if (stored.has(item.source)) {\n manifest.push(stored.get(item.source));\n } else {\n const file = prepared.get(item.id) || item.file;\n manifest.push(uploadIndex++);\n event.formData.append(name, file, file.name || item.file.name);\n }\n });\n event.formData.set(manifestName, JSON.stringify(manifest));\n };\n\n form.addEventListener('formdata', serialize);\n pond.on('destroy', () => form.removeEventListener('formdata', serialize));\n}\n\nfunction setTextarea(CONTAINER) {\n\n CONTAINER.querySelectorAll(\"[data-wi-textarea]\").forEach(textarea => {\n\n var container = textarea.parentElement;\n var type = textarea.dataset.wiTextarea;\n\n var textareaId = textarea.id;\n var textareaValue = wiBase64DecodeUtf8(textarea.dataset.wiValue);\n\n // Creo l'editor\n var editorId = textareaId+'_editor';\n\n var editor = document.createElement(\"div\");\n editor.id = editorId;\n editor.classList.add('position-relative');\n editor.classList.add('float-start');\n editor.classList.add('w-100');\n editor.classList.add('h-auto');\n editor.classList.add('border');\n editor.style.maxHeight = '250px';\n\n if (type == 'base' || type == 'plus' || type == 'pro') {\n\n // Quill.js\n\n editor.classList.add('border-top-0');\n editor.classList.add('rounded-bottom');\n editor.classList.add('overflow-scroll');\n \n container.after(editor);\n\n var toolbarId = editorId+'_toolbar';\n\n if (type == 'base') {\n var option = [['bold', 'italic', 'underline', 'strike'], ['clean']];\n } else if (type == 'plus') {\n var option = [['bold', 'italic', 'underline', 'strike'], ['link'], ['clean']];\n } else if (type == 'pro') {\n var option = [['bold', 'italic', 'underline', 'strike'], ['link'], [{ list: 'ordered' }, { list: 'bullet' }], ['clean']];\n }\n\n var quill = new Quill('#'+editorId, {\n theme: 'snow',\n modules: {\n toolbar: option\n }\n });\n\n // Solo text-change, con qualsiasi sorgente; vuoto vale '' e non <p><br></p>\n quill.on('text-change', () => {\n textarea.value = quill.getLength() > 1 ? wiSanitizeHtml(editor.innerHTML) : '';\n window.wiSaveBar?.changed(textarea);\n });\n\n var col = container.parentElement;\n var toolbar = col.querySelector('.ql-toolbar');\n\n toolbar.id = toolbarId;\n toolbar.classList.add('position-relative');\n toolbar.classList.add('float-start');\n toolbar.classList.add('w-100');\n toolbar.classList.add('border');\n toolbar.classList.add('rounded-top');\n\n var editor = document.querySelector('#'+editorId+' .ql-editor');\n\n editor.innerHTML = wiSanitizeHtml(textareaValue.replace(\"'\", \"\\'\"));\n\n } else if (type == 'table' || type == 'blog') {\n\n // Editor.js\n\n EDITORJS_TOOLS_BLOG.image.config.additionalRequestHeaders.dir = textarea.dataset.wiFolder+'/images';\n EDITORJS_TOOLS_BLOG.gallery.config.additionalRequestHeaders.dir = textarea.dataset.wiFolder+'/images';\n EDITORJS_TOOLS_BLOG.attaches.config.additionalRequestHeaders.dir = textarea.dataset.wiFolder+'/files';\n\n editor.classList.add('wi-'+type);\n editor.classList.add('pt-3');\n editor.classList.add('rounded');\n editor.classList.add('overflow-scroll');\n\n container.after(editor);\n\n if (type == 'table') {\n \n if (textareaValue == null || textareaValue == '') {\n var data = '{\"blocks\":[{\"id\":\"O3rAzVD6s8\",\"type\":\"table\",\"data\":{\"withHeadings\":true,\"content\":[]}}]}';\n } else {\n var data = '{\"blocks\":'+textareaValue+'}';\n }\n\n var tools = EDITORJS_TOOLS_TABLE;\n\n } else if (type == 'blog') {\n\n editor.style.maxHeight = '500px';\n\n if (textareaValue == null || textareaValue == '') {\n var data = '{}';\n } else {\n var data = '{\"blocks\":'+textareaValue+'}';\n }\n\n var tools = EDITORJS_TOOLS_BLOG;\n \n }\n\n // Contenuto uguale all'avvio, a meno di id, time e version: torna il JSON originale\n var original = textarea.value;\n var initial = null;\n var normalize = (outputData) => JSON.stringify(outputData.blocks.map(({ id, ...block }) => block));\n\n var editorJs = new EditorJS({\n tools: tools,\n holder: editorId, \n autofocus: false,\n data: JSON.parse(data),\n onChange: (api) => {\n\n api.saver.save().then((outputData) => {\n var editorValue = normalize(outputData) === initial ? original : JSON.stringify(outputData.blocks);\n document.getElementById(textareaId).value = editorValue;\n window.wiSaveBar?.changed(textarea);\n }).catch((error) => {\n console.log('Saving failed: ', error)\n });\n\n },\n i18n: EDITORJS_i18n_IT\n });\n\n editorJs.isReady.then(() => editorJs.save()).then((outputData) => {\n initial = normalize(outputData);\n }).catch((error) => {\n console.log('Saving failed: ', error)\n });\n\n }\n\n });\n\n}\n\n/*\n * La voce principale di un albero a spunte, segnata con una stella.\n *\n * L'albero dichiara con `data-wi-tree-primary` il campo del form in cui sta\n * la voce principale (il framework: `InputCheckTree::primaryField()`). Qui\n * si tiene aggiornato: la prima spunta prende la stella, un clic sull'icona\n * di un'altra voce spuntata la sposta, e togliere la spunta alla principale\n * la passa alla prima rimasta. Le voci spuntate senza stella mostrano una\n * stella vuota, che dice dove cliccare.\n */\nfunction setJsTreePrimary(element) {\n\n var nome = element.dataset.wiTreePrimary;\n\n if (!nome || element.dataset.wiTree !== 'checkbox') { return; }\n\n var form = element.closest('form') || document;\n var campo = form.querySelector('[name=\"' + nome + '\"]');\n\n if (!campo) { return; }\n\n function albero() { return $(element).jstree(true); }\n\n function spuntate() {\n return albero().get_checked().map(String);\n }\n\n function dipingi() {\n\n var istanza = albero();\n var scelte = spuntate();\n var principale = String(campo.value || '');\n\n istanza.get_json('#', { flat: true }).forEach(function (voce) {\n\n var id = String(voce.id);\n var nodo = istanza.get_node(id);\n var icona = 'bi bi-folder';\n var titolo = '';\n\n if (id === principale) {\n icona = 'bi bi-star-fill text-warning';\n titolo = 'Categoria principale';\n } else if (scelte.indexOf(id) !== -1) {\n icona = 'bi bi-star text-body-secondary';\n titolo = 'Rendi principale';\n }\n\n istanza.set_icon(nodo, icona);\n nodo.a_attr = nodo.a_attr || {};\n nodo.a_attr.title = titolo;\n\n var ancora = istanza.get_node(id, true);\n if (ancora && ancora.length) { ancora.children('.jstree-anchor').attr('title', titolo); }\n });\n\n }\n\n function allinea() {\n\n var scelte = spuntate();\n var prima = String(campo.value || '');\n\n if (scelte.indexOf(prima) === -1) { campo.value = scelte.length ? scelte[0] : ''; }\n\n dipingi();\n\n if (String(campo.value || '') !== prima) {\n campo.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n }\n\n // Con la spunta legata alla selezione (`tie_selection`, il valore di\n // partenza di jstree) spuntare passa per `changed` e non per\n // `check_node`: si ascoltano tutti e due.\n $(element).on('ready.jstree changed.jstree check_node.jstree uncheck_node.jstree create_node.jstree', function () {\n allinea();\n });\n\n // L'icona di una voce spuntata sposta la stella senza togliere la spunta:\n // il clic si ferma qui e non arriva all'ancora, che la toglierebbe.\n $(element).on('click', '.jstree-themeicon', function (e) {\n\n var voce = this.closest('li');\n var id = voce ? String(voce.id) : '';\n\n if (id === '' || spuntate().indexOf(id) === -1) { return; }\n\n e.preventDefault();\n e.stopImmediatePropagation();\n\n if (String(campo.value || '') !== id) {\n campo.value = id;\n campo.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n dipingi();\n\n });\n\n}\n\n/*\n * Le caselle che il form posta per un albero a spunte.\n *\n * Stanno in `[data-wi-tree-values]`, accanto all'albero e fuori dal suo DOM\n * (il framework: `CheckTree`). Dentro ai nodi non reggerebbero: jstree\n * ridisegna un nodo dal suo HTML di partenza, con la spunta del server, e\n * chiudere un ramo toglie dal DOM i figli. Qui si riscrivono dalle spunte di\n * jstree a ogni cambio — clic, tastiera, API, nodi creati — e, se qualcosa\n * è cambiato, il contenitore manda un `change` nativo e si rifà `check()`.\n * Un albero a scelta singola tiene una sola spunta: l'ultima.\n *\n * Il markup di prima, con le caselle dentro ai nodi, si porta fuori prima\n * che jstree lo legga.\n */\nfunction setJsTreeValues(element) {\n\n var card = element.parentElement;\n var radio = element.dataset.wiTree === 'radio';\n var valori = null;\n\n Array.prototype.forEach.call(card.children, function (figlio) {\n if (!valori && figlio.hasAttribute('data-wi-tree-values')) { valori = figlio; }\n });\n\n var vecchie = element.querySelectorAll('input[name]');\n\n if (vecchie.length) {\n if (!valori) {\n valori = document.createElement('div');\n valori.className = 'd-none';\n valori.setAttribute('data-wi-tree-values', vecchie[0].getAttribute('name'));\n card.insertBefore(valori, element);\n }\n Array.prototype.forEach.call(vecchie, function (casella) { valori.appendChild(casella); });\n }\n\n if (!valori) { return; }\n\n var occupato = false;\n\n function nuovaCasella(id) {\n\n var modello = valori.querySelector('input[name]');\n var casella = document.createElement('input');\n\n casella.className = 'd-none';\n casella.type = 'checkbox';\n casella.name = valori.getAttribute('data-wi-tree-values') || (modello ? modello.getAttribute('name') : '');\n casella.value = id;\n casella.setAttribute('data-wi-check', 'true');\n\n return casella;\n }\n\n function allinea() {\n\n var istanza = $(element).jstree(true);\n\n if (occupato || !istanza) { return; }\n\n var scelte = istanza.get_checked().map(String);\n\n if (radio && scelte.length > 1) {\n occupato = true;\n try { istanza.uncheck_node(scelte.slice(0, -1)); } finally { occupato = false; }\n scelte = istanza.get_checked().map(String);\n }\n\n var cambiato = false;\n var presenti = {};\n\n Array.prototype.forEach.call(valori.querySelectorAll('input'), function (casella) {\n\n var id = String(casella.value);\n var spunta = scelte.indexOf(id) !== -1;\n\n presenti[id] = true;\n if (casella.checked !== spunta) { cambiato = true; }\n\n // Anche l'attributo: un reset del form non deve tornare alle\n // spunte del server mentre jstree mostra le altre.\n casella.checked = spunta;\n casella.defaultChecked = spunta;\n });\n\n scelte.forEach(function (id) {\n if (presenti[id]) { return; }\n var casella = nuovaCasella(id);\n valori.appendChild(casella);\n casella.checked = true;\n casella.defaultChecked = true;\n cambiato = true;\n });\n\n if (!cambiato) { return; }\n\n valori.dispatchEvent(new Event('change', { bubbles: true }));\n\n if (typeof check === 'function') { check(); }\n\n }\n\n $(element).on('ready.jstree changed.jstree check_node.jstree uncheck_node.jstree create_node.jstree delete_node.jstree refresh.jstree', function () {\n allinea();\n });\n\n // Dopo allinea(): le spunte del server non sono una modifica dell'utente\n $(element).on('ready.jstree', function () { window.wiSaveBar?.absorb(valori); });\n\n}\n\nfunction setJsTree(CONTAINER) {\n\n CONTAINER.querySelectorAll('[data-wi-tree]').forEach(element => {\n\n var container = element.parentElement;\n\n var type = element.dataset.wiTree;\n var searchBar = container.querySelector('[data-wi-search=\"true\"]');\n\n // Prima di jstree: l'evento `ready` va ascoltato prima che arrivi, e\n // le caselle del markup di prima vanno tolte dai nodi prima che\n // jstree le copi nel loro testo.\n setJsTreeValues(element);\n setJsTreePrimary(element);\n\n var Tree = $(element).jstree({\n core: {\n // Solo la creazione: un nodo nuovo deve poter arrivare dal\n // «+ Aggiungi» di un campo vicino. Spostare, copiare,\n // rinominare e cancellare restano chiusi, come prima.\n check_callback: function (operation) { return operation === 'create_node'; },\n // A scelta singola un clic su un'altra voce sposta la spunta.\n multiple: type !== 'radio'\n },\n checkbox : {\n keep_selected_style: false,\n three_state: false,\n },\n types : {\n default : {\n icon : \"bi bi-folder\"\n }\n },\n plugins : [ \"checkbox\", \"types\", \"search\" ]\n });\n\n Tree.jstree('open_all');\n\n if (searchBar != undefined) {\n $(searchBar).keyup(function () {\n var v = $(searchBar).val();\n $(Tree).jstree(true).search(v);\n });\n }\n\n });\n\n}\n\nfunction setCheckBoolean(CONTAINER) {\n \n CONTAINER.querySelectorAll('[data-wi-check-boolean]').forEach(element => {\n\n var inputTrue = element.querySelector('input.wi-true');\n var labelTrue = inputTrue.labels[0];\n var inputFalse = element.querySelector('input.wi-false');\n var labelFalse = inputFalse.labels[0];\n\n inputTrue.addEventListener(\"change\", (el) => {\n\n var checked = el.target.checked;\n\n if (checked) { \n inputFalse.checked = false; \n labelFalse.classList.remove('btn-primary'); \n labelTrue.classList.add('btn-primary'); \n } else {\n labelTrue.classList.remove('btn-primary'); \n }\n\n });\n\n inputFalse.addEventListener(\"change\", (el) => {\n\n var checked = el.target.checked;\n\n if (checked) { \n inputTrue.checked = false; \n labelTrue.classList.remove('btn-primary'); \n labelFalse.classList.add('btn-primary'); \n } else {\n labelFalse.classList.remove('btn-primary'); \n }\n\n });\n\n\n });\n\n}\n\n/**\n * L'immagine, l'icona o il colore di un'opzione di Select2.\n *\n * Un `<option>` non contiene HTML: il framework mette il segno in\n * `data-wi-image`, `data-wi-icon` o `data-wi-color`, e qui diventa un nodo\n * davanti al testo (costruito a mano, niente HTML dall'attributo).\n */\nfunction select2OptionVisual(state) {\n\n var data = (state && state.element && state.element.dataset) ? state.element.dataset : {};\n var mark = null;\n\n if (data.wiImage) {\n mark = document.createElement('img');\n mark.src = data.wiImage;\n mark.alt = '';\n mark.width = 16;\n mark.height = 16;\n mark.className = 'rounded-1 me-2 wi-option-visual';\n mark.style.objectFit = 'cover';\n } else if (data.wiIcon && /^bi-[a-z0-9-]+$/.test(data.wiIcon)) {\n mark = document.createElement('i');\n mark.className = 'bi ' + data.wiIcon + ' me-2 wi-option-visual';\n } else if (data.wiColor) {\n mark = document.createElement('i');\n mark.className = 'bi bi-circle-fill me-2 wi-option-visual';\n mark.style.color = data.wiColor;\n }\n\n if (!mark) { return state.text; }\n\n mark.setAttribute('aria-hidden', 'true');\n\n var node = document.createElement('span');\n node.appendChild(mark);\n node.appendChild(document.createTextNode(state.text));\n\n return node;\n\n}\n\nfunction setSelect2(CONTAINER) {\n \n CONTAINER.querySelectorAll('[data-wi-select-search]').forEach(element => {\n\n if ($(element).parents('.modal').length !== 0) {\n var parent = $(element).parents('.modal');\n } else {\n var parent = document.getElementById('content');\n }\n \n var multiple = (element.dataset.wiSelectSearchMultiple == 'true') ? true : false;\n\n $(element).select2({\n theme: 'bootstrap4',\n language: 'it',\n multiple: multiple,\n width: 'style',\n dropdownParent: parent,\n dropdownCssClass: 'card-body border dropdown-menu',\n templateResult: select2OptionVisual,\n templateSelection: select2OptionVisual\n }).on(\"change\", function(e) {\n\n check();\n\n if (element.dataset.wiInputCountry) { \n searchStates(element);\n }\n\n });\n\n });\n \n}\n\nfunction setInput(container = document) {\n\n setGoogleMapsApi(container);\n setSearchInput(container);\n setTextarea(container);\n setUploader(container);\n setJsTree(container);\n setCheckBoolean(container);\n setSelect2(container);\n setIconPicker(container);\n setConditional(container);\n\n // Anche le righe aggiunte dopo il caricamento (repeater, <template>)\n // hanno prezzi e numeri formattati: i campi già avviati si saltano.\n setAutonumeric(container);\n\n}\n"},9221(e){e.exports="function jqueryDaterange() {\n \n $('.wi-daterange-filter').datepicker({\n format: 'dd/mm/yyyy',\n language: 'it', \n orientation: 'bottom left'\n });\n\n}\n\nfunction setUpJquery() {\n \n jqueryDaterange();\n\n}"},7642(e){e.exports="// Bootstrap adapter for wi.confirm and wi.modal.open/close; modal() is the legacy alias.\nvar wiConfirmCount = 0;\n\nfunction wiModalNode(tag, className, text) {\n var node = document.createElement(tag);\n if (className) node.className = className;\n if (text != null) node.textContent = text;\n return node;\n}\n\nfunction wiModalElement(id) {\n id = String(id == null ? '' : id).replace(/^#/, '');\n return id === '' ? null : document.getElementById(id);\n}\n\nfunction wiModalTitle(element, title) {\n var target = element.querySelector('[data-wi-modal-title]');\n if (target) target.textContent = String(title);\n}\n\nfunction wiConfirmBootstrap(options) {\n\n if (!window.bootstrap || !bootstrap.Modal) return window.confirm(options.text);\n\n return new Promise(function (resolve) {\n\n var id = 'wi-confirm-' + (++wiConfirmCount);\n var root = wiModalNode('div', 'modal fade wi-confirm');\n root.id = id;\n root.tabIndex = -1;\n root.setAttribute('aria-labelledby', id + '-title');\n root.setAttribute('aria-describedby', id + '-text');\n options.className.split(/\\s+/).filter(Boolean).forEach(function (name) { root.classList.add(name); });\n\n var dialog = wiModalNode('div', 'modal-dialog modal-dialog-centered');\n var content = wiModalNode('div', 'modal-content');\n\n var header = wiModalNode('div', 'modal-header');\n var title = wiModalNode('h1', 'modal-title fs-5', options.title);\n title.id = id + '-title';\n title.setAttribute('data-wi-modal-title', '');\n var close = wiModalNode('button', 'btn-close');\n close.type = 'button';\n close.setAttribute('data-bs-dismiss', 'modal');\n close.setAttribute('aria-label', options.cancel);\n header.append(title, close);\n\n var body = wiModalNode('div', 'modal-body', options.text);\n body.id = id + '-text';\n body.style.whiteSpace = 'pre-line';\n\n var footer = wiModalNode('div', 'modal-footer');\n var cancel = wiModalNode('button', 'btn btn-' + (options.cancelVariant || 'dark'), options.cancel);\n cancel.type = 'button';\n cancel.setAttribute('data-bs-dismiss', 'modal');\n var ok = wiModalNode('button', 'btn btn-' + options.variant, options.ok);\n ok.type = 'button';\n footer.append(cancel, ok);\n\n content.append(header, body, footer);\n dialog.append(content);\n root.append(dialog);\n document.body.append(root);\n\n var confirmed = false;\n var returnFocus = options.trigger || document.activeElement;\n var instance = new bootstrap.Modal(root);\n\n ok.addEventListener('click', function () { confirmed = true; instance.hide(); });\n root.addEventListener('shown.bs.modal', function () {\n (options.variant === 'danger' ? cancel : ok).focus();\n });\n // Resolve after the fade: the confirmed action may open another modal.\n root.addEventListener('hidden.bs.modal', function () {\n instance.dispose();\n root.remove();\n if (returnFocus && returnFocus.isConnected && typeof returnFocus.focus === 'function') returnFocus.focus({ preventScroll: true });\n resolve(confirmed);\n });\n\n instance.show();\n\n });\n\n}\n\nwindow.wi = window.wi || {};\nwi.modal = wi.modal || {};\n\n/**\n * Opens a Bootstrap modal by id (\"x\" or \"#x\"); options.title goes into its [data-wi-modal-title].\n * @returns {boolean} false when the modal or Bootstrap is missing.\n */\nwi.modal.open = function (id, options) {\n var element = wiModalElement(id);\n if (!element || !window.bootstrap || !bootstrap.Modal) return false;\n if (options && options.title != null) wiModalTitle(element, options.title);\n bootstrap.Modal.getOrCreateInstance(element).show();\n return true;\n};\n\n/** Closes a Bootstrap modal by id (\"x\" or \"#x\"). */\nwi.modal.close = function (id) {\n var element = wiModalElement(id);\n if (!element || !window.bootstrap || !bootstrap.Modal) return false;\n var instance = bootstrap.Modal.getInstance(element);\n if (instance) instance.hide();\n return true;\n};\n\nif (wi.confirm) wi.confirm.adapter = wiConfirmBootstrap;\n\n/**\n * Asks for confirmation and then sends a POST to link with ajaxRequest.\n * The text is shown as plain text (markup is stripped, <br> becomes a line break).\n *\n * @deprecated Use wi.confirm() or the data-wi-confirm attribute.\n * @returns {Promise<boolean>}\n */\nfunction modal(text, link, title = 'ATTENZIONE', sendText = 'Elimina', sendColor = 'danger', closeText = 'Chiudi', closeColor = 'dark', onSuccess = 'reloadPage', params = null) {\n\n var plain = new DOMParser().parseFromString(String(text == null ? '' : text), 'text/html');\n plain.querySelectorAll('br').forEach(function (br) { br.replaceWith('\\n'); });\n\n return wi.confirm({\n text: plain.body.textContent,\n title: title,\n ok: sendText,\n cancel: closeText,\n variant: sendColor,\n cancelVariant: closeColor\n }).then(function (confirmed) {\n\n if (!confirmed) return false;\n\n // Same arguments the legacy onclick attribute passed (params as a string).\n if (onSuccess == 'reloadPage') {\n ajaxRequest(link);\n } else {\n ajaxRequest(link, onSuccess, String(params));\n }\n\n return true;\n\n });\n\n}\n"},5071(e){e.exports="function menu() { \n\n var el = document.getElementById('sidebar');\n el.classList.toggle(\"show\");\n\n var el = document.getElementById('menu');\n\n var iconMenu = el.querySelector('.open-menu');\n var iconClose = el.querySelector('.close-menu');\n\n if (iconMenu.classList.contains('d-none')) {\n\n // Chiudo il menu\n iconMenu.classList.remove('d-none');\n iconClose.classList.add('d-none');\n\n $('.offcanvas').offcanvas('hide');\n \n } else {\n\n // Apro il menu\n iconClose.classList.remove('d-none');\n iconMenu.classList.add('d-none');\n\n if (document.querySelector('#sidebar li.active [data-bs-target]')) {\n var offcanvasId = document.querySelector('#sidebar li.active [data-bs-target]').dataset.bsTarget;\n $(offcanvasId).offcanvas('show');\n }\n\n }\n \n}\n\n// Senza argomento alterna, come prima; true accende e false spegne.\nfunction loadingSpinner(show) {\n\n document.getElementById('loading-spinner').classList.toggle('d-none', show === undefined ? undefined : !show);\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}'},3740(e){e.exports="// wi.confirm() and the delegated data-wi-confirm listener (a, button, form).\n// The theme's modal.js sets wi.confirm.adapter; without one, window.confirm is used.\n(function () {\n\n var wi = window.wi = window.wi || {};\n if (typeof wi.confirm === 'function' && typeof wi.confirm.setRenderer === 'function') return;\n\n var KEYS = {\n title: 'components.confirm.title',\n text: 'components.confirm.text',\n ok: 'components.buttons.confirm',\n cancel: 'components.buttons.cancel'\n };\n\n // Used only while the site's translations do not define KEYS.\n var FALLBACK = {\n it: { title: 'Conferma', text: 'Vuoi procedere?', ok: 'Conferma', cancel: 'Annulla' },\n en: { title: 'Confirm', text: 'Do you want to continue?', ok: 'Confirm', cancel: 'Cancel' },\n es: { title: 'Confirmar', text: '¿Quieres continuar?', ok: 'Confirmar', cancel: 'Cancelar' },\n fr: { title: 'Confirmer', text: 'Voulez-vous continuer ?', ok: 'Confirmer', cancel: 'Annuler' }\n };\n\n var renderer = null;\n var pending = new WeakSet();\n var passing = null;\n\n function translate(name) {\n var provider = window.TranslationProvider, value = null;\n if (provider && typeof provider.getNestedValue === 'function') {\n value = provider.getNestedValue(provider.translations || {}, KEYS[name]);\n if (value == null) value = provider.getNestedValue(provider.defaultTranslations || {}, KEYS[name]);\n }\n if (typeof value === 'string' && value !== '') return value;\n var lang = (document.documentElement.lang || 'it').slice(0, 2).toLowerCase();\n return (FALLBACK[lang] || FALLBACK.en)[name];\n }\n\n function text(value) {\n return value == null ? '' : String(value).trim();\n }\n\n function variant(value) {\n value = text(value);\n return /^[a-z][a-z0-9-]*$/i.test(value) ? value : '';\n }\n\n function normalize(options) {\n if (typeof options === 'string') options = { text: options };\n options = options || {};\n return {\n text: text(options.text) || translate('text'),\n title: text(options.title) || translate('title'),\n ok: text(options.ok) || translate('ok'),\n cancel: text(options.cancel) || translate('cancel'),\n variant: variant(options.variant) || 'primary',\n cancelVariant: variant(options.cancelVariant),\n className: text(options.className),\n trigger: options.trigger instanceof Element ? options.trigger : null\n };\n }\n\n function nativeConfirm(options) {\n return window.confirm(options.text);\n }\n\n /**\n * Asks the user to confirm an action.\n *\n * @param {string|{text?: string, title?: string, ok?: string, cancel?: string, variant?: string, cancelVariant?: string, className?: string, trigger?: Element}} options\n * @returns {Promise<boolean>} true only when the user confirms.\n */\n function confirmAction(options) {\n var data = normalize(options);\n var render = renderer || confirmAction.adapter || nativeConfirm;\n return new Promise(function (resolve) { resolve(render(data)); }).then(Boolean, function (error) {\n console.error(error);\n return false;\n });\n }\n\n /**\n * Replaces the dialog. fn(options) receives the normalized options and returns\n * a boolean or a Promise<boolean>; pass null to restore the theme's dialog.\n */\n confirmAction.setRenderer = function (fn) {\n renderer = typeof fn === 'function' ? fn : null;\n };\n\n confirmAction.adapter = null;\n\n wi.confirm = confirmAction;\n\n function attr(element, name) {\n var value = element.getAttribute(name ? 'data-wi-confirm-' + name : 'data-wi-confirm');\n return value == null ? undefined : value;\n }\n\n function optionsFrom(element, form, submitter) {\n var method = (submitter && submitter.getAttribute('formmethod')) || (form && form.getAttribute('method')) || '';\n method = method.toLowerCase();\n return {\n text: attr(element),\n title: attr(element, 'title'),\n ok: attr(element, 'ok'),\n cancel: attr(element, 'cancel'),\n variant: attr(element, 'variant') || (method === 'post' || method === 'delete' ? 'danger' : undefined),\n className: attr(element, 'class'),\n trigger: submitter || element\n };\n }\n\n function ask(element, options, proceed) {\n if (pending.has(element)) return;\n pending.add(element);\n confirmAction(options).then(function (confirmed) {\n pending.delete(element);\n if (!confirmed || !element.isConnected) return;\n passing = element;\n try { proceed(); } finally { passing = null; }\n });\n }\n\n // Capture phase: the confirmation precedes inline onclick/onsubmit handlers and navigation.\n document.addEventListener('click', function (event) {\n if (!(event.target instanceof Element)) return;\n var element = event.target.closest('a[data-wi-confirm], button[data-wi-confirm]');\n if (!element || element === passing) return;\n event.preventDefault();\n event.stopImmediatePropagation();\n var form = element.tagName === 'BUTTON' && element.type === 'submit' ? element.form : null;\n ask(element, optionsFrom(element, form, form ? element : null), function () { element.click(); });\n }, true);\n\n document.addEventListener('submit', function (event) {\n var form = event.target;\n if (!(form instanceof HTMLFormElement) || !form.hasAttribute('data-wi-confirm')) return;\n var submitter = event.submitter || null;\n // Already confirmed by its own data-wi-confirm.\n if (form === passing || (submitter && submitter === passing)) return;\n event.preventDefault();\n event.stopImmediatePropagation();\n ask(form, optionsFrom(form, form, submitter), function () {\n if (typeof form.requestSubmit !== 'function') form.submit();\n else if (submitter && submitter.isConnected && submitter.form === form) form.requestSubmit(submitter);\n else form.requestSubmit();\n });\n }, true);\n\n})();\n"},6944(e){e.exports='async function postData(url, data) {\n\n loadingSpinner();\n\n if (data === undefined) {\n\n console.error("Non è stato passato alcun dato alla funzione postData()");\n alertToast(800);\n\n } else {\n \n var form = (data instanceof FormData === false) ? createPostData(data) : data;\n\n return await fetch(url, {\n method: "POST",\n body: form\n })\n .then((response) => { \n\n if (response.ok) {\n\n return response.json().catch((error) => { \n\n console.error("Il file non risponde in JSON!");\n throw new Error(802);\n\n });\n\n } else {\n\n console.error("Impossibile connettersi o trovare il file!");\n throw new Error(802);\n\n }\n \n })\n .then((value) => { \n \n if (value.status == 200) {\n\n loadingSpinner(); \n return value;\n\n } else if (value.status == 401) {\n\n throw new Error(911);\n\n } else if (value.status) {\n\n throw new Error(value.status);\n \n } else {\n\n console.error("La risposta deve avere il seguente formato: ", {\n success: true,\n status:\t200,\n response: {}\n });\n\n throw new Error(803);\n\n }\n\n })\n .catch((error) => { \n \n loadingSpinner(); \n alertToast(error.message); \n\n })\n\n }\n\n}\n\nfunction createPostData(array = {}) {\n\n var data = new FormData();\n\n Object.keys(array).forEach(key => {\n data.append(key, array[key]);\n });\n\n return data;\n\n}\n\n// Vecchie funzioni\nfunction 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}'},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 // AutoNumeric non parte se decimali e migliaia hanno lo stesso segno:\n // vince il decimale chiesto dal campo e le migliaia restano senza separatore.\n if (option.decimalCharacter != undefined && option.decimalCharacter === option.digitGroupSeparator) {\n option.digitGroupSeparator = '';\n }\n\n // Con la virgola decimale anche il punto (quello del tastierino) scrive i decimali.\n if (option.decimalCharacter != undefined && option.decimalCharacter !== '.') {\n option.decimalCharacterAlternative = '.';\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(container = document) {\n \n container.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 container.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 container.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}"},1367(e){e.exports='function wiConditionalControls(field, name) {\n\n var scope = field.form || document;\n var controls = [];\n var normalizedName = String(name || "").replace(/\\[\\]$/, "");\n\n scope.querySelectorAll("[name]").forEach(function(control) {\n var controlName = String(control.name || "").replace(/\\[\\]$/, "");\n\n if (controlName === normalizedName) { controls.push(control); }\n });\n\n return controls;\n\n}\n\nfunction wiConditionalDriverValues(field, name) {\n\n var values = [];\n var controls = wiConditionalControls(field, name);\n var hasValueControl = controls.some(function(control) {\n return (control.type || "").toLowerCase() !== "hidden";\n });\n\n controls.forEach(function(control) {\n\n var type = (control.type || "").toLowerCase();\n\n if (type === "hidden" && hasValueControl) { return; }\n\n if (type === "radio" || type === "checkbox") {\n if (control.checked) { values.push(String(control.value)); }\n return;\n }\n\n if (control.multiple && control.options) {\n Array.from(control.options).forEach(function(option) {\n if (option.selected) { values.push(String(option.value)); }\n });\n return;\n }\n\n if (control.value !== undefined && control.value !== "") {\n values.push(String(control.value));\n }\n\n });\n\n return values;\n\n}\n\nfunction wiConditionalDriverValue(field, name) {\n\n var values = wiConditionalDriverValues(field, name);\n\n return values.length ? values[values.length - 1] : "";\n\n}\n\nfunction wiConditionalWrapper(field) {\n\n var explicit = field.closest("[data-wi-conditional-container]");\n if (explicit) { return explicit; }\n\n var row = field.closest("[data-wi-input-row]");\n if (row) { return row; }\n\n var wonder = field.closest(".wi-input-container");\n if (wonder) {\n var wonderParent = wonder.parentElement;\n\n if (field.form && wonderParent && wonderParent.parentElement === field.form && wonderParent.children.length === 1) {\n return wonderParent;\n }\n\n return wonder;\n }\n\n var floating = field.closest(".form-floating");\n if (floating) { return floating.parentElement || floating; }\n\n var bootstrap = field.closest(\'[id^="container-"]\');\n if (bootstrap) { return bootstrap.parentElement || bootstrap; }\n\n var group = field.closest("[data-wi-date-range], [data-wi-date-time-range], .input-group");\n if (group) { return group.parentElement || group; }\n\n return field.parentElement;\n\n}\n\nfunction wiSetConditionalVisibility(field, show) {\n\n var wrapper = wiConditionalWrapper(field);\n\n if (!field.dataset.wiConditionalRequired) {\n field.dataset.wiConditionalRequired = field.required ? "required" : "optional";\n }\n\n field.required = show && field.dataset.wiConditionalRequired === "required";\n\n if (!wrapper) { return; }\n\n if (!wrapper.dataset.wiConditionalDisplayCaptured) {\n wrapper.dataset.wiConditionalDisplayCaptured = "1";\n wrapper.dataset.wiConditionalDisplay = wrapper.style.display || "";\n wrapper.dataset.wiConditionalAriaHidden = wrapper.getAttribute("aria-hidden") || "";\n wrapper.dataset.wiConditionalAriaHiddenPresent = wrapper.hasAttribute("aria-hidden") ? "1" : "0";\n }\n\n if (show) {\n wrapper.style.display = wrapper.dataset.wiConditionalDisplay || "";\n\n if (wrapper.dataset.wiConditionalAriaHiddenPresent === "1") {\n wrapper.setAttribute("aria-hidden", wrapper.dataset.wiConditionalAriaHidden);\n } else {\n wrapper.removeAttribute("aria-hidden");\n }\n\n wrapper.removeAttribute("data-wi-conditional-hidden");\n return;\n }\n\n wrapper.style.display = "none";\n wrapper.setAttribute("aria-hidden", "true");\n wrapper.setAttribute("data-wi-conditional-hidden", "true");\n\n}\n\nfunction wiEvaluateConditional() {\n\n document.querySelectorAll("[data-visible-when], [data-hidden-when]").forEach(function(field) {\n\n var isVisibleRule = field.hasAttribute("data-visible-when");\n var name = isVisibleRule ? field.dataset.visibleWhen : field.dataset.hiddenWhen;\n var list = (isVisibleRule ? field.dataset.visibleWhenValues : field.dataset.hiddenWhenValues) || "";\n var expected = list.split(",").map(function(item) { return item.trim(); });\n var current = wiConditionalDriverValues(field, name);\n\n if (!current.length) { current = [""]; }\n\n var matches = current.some(function(value) { return expected.indexOf(value) !== -1; });\n var show = isVisibleRule ? matches : !matches;\n\n wiSetConditionalVisibility(field, show);\n\n });\n\n if (typeof check === "function") { check(); }\n\n}\n\nfunction setConditional(container = document) {\n\n var selector = "[data-visible-when], [data-hidden-when]";\n var fields = Array.from(container.querySelectorAll(selector));\n\n if (container.matches && container.matches(selector)) {\n fields.unshift(container);\n }\n\n if (!fields.length) { return; }\n\n fields.forEach(function(field) {\n\n var name = field.dataset.visibleWhen || field.dataset.hiddenWhen;\n if (!name) { return; }\n\n wiConditionalControls(field, name).forEach(function(control) {\n if (control.wiConditionalBound === true) { return; }\n\n control.wiConditionalBound = true;\n control.dataset.wiConditionalBound = "1";\n control.addEventListener("change", wiEvaluateConditional);\n control.addEventListener("input", wiEvaluateConditional);\n });\n\n });\n\n wiEvaluateConditional();\n\n}\n'},7059(e){e.exports="function setRequired(element, required = true) {\n \n labelAsterisk(element, required);\n\n element.required = required;\n\n}\n\nfunction setDisabled(element, disabled = true) {\n \n labelAsterisk(element, disabled ? false : true);\n\n if (disabled) {\n if (element.type === 'checkbox' || element.type === 'radio') { element.checked = false; }\n }\n\n element.disabled = disabled;\n\n}\n\nfunction labelAsterisk(input, asterisk = true)\n{\n\n if (input.labels) {\n \n var label = input.labels[0];\n var labelValue = label.innerHTML;\n var hasAsterisk = (labelValue.substring(labelValue.length - 1) == '*') ? true : false;\n \n if (asterisk) {\n if (!hasAsterisk) { label.innerHTML = labelValue+'*'; }\n } else {\n if (hasAsterisk) { label.innerHTML = labelValue.replace('*', ''); }\n }\n\n }\n\n}\n\nfunction changeInputId(el) \n{\n\n const idEl = 'field_' + code(10).toLowerCase();\n const labelEl = el.parentElement.querySelector('.wi-label, .wi-checkbox-label');\n\n if (labelEl !== null) {\n el.id = idEl;\n labelEl.htmlFor = idEl;\n }\n\n}"},3883(e){e.exports="function isInternationalPhone(value) {\n\n return /^\\s*(\\+|00)/.test(String(value || ''));\n\n}\n\nfunction formatPhone(value, trimEnd) {\n\n value = String(value || '');\n\n // Numero nazionale: solo cifre, al massimo 10, a gruppi 3-3-4.\n if (!isInternationalPhone(value)) {\n var digits = value.replace(/\\D/g, '').slice(0, 10);\n return [digits.slice(0, 3), digits.slice(3, 6), digits.slice(6, 10)]\n .filter(Boolean)\n .join(' ');\n }\n\n // Numero internazionale (+ o 00): prefisso e gruppi come digitati, al massimo 15 cifre.\n var result = /^\\s*\\+/.test(value) ? '+' : '';\n var count = 0;\n var separator = false;\n\n value.replace(/^\\s*\\+/, '').split('').forEach(function (character) {\n if (!/\\d/.test(character)) {\n separator = count > 0;\n return;\n }\n\n if (count >= 15) { return; }\n\n if (separator) { result += ' '; }\n result += character;\n separator = false;\n count++;\n });\n\n if (separator && !trimEnd && count < 15) { result += ' '; }\n\n return result;\n\n}\n\nfunction checkPhone(element) {\n\n if (!element || element.dataset.wiPhoneInitialized === 'true') { return; }\n element.dataset.wiPhoneInitialized = 'true';\n\n var format = function (event) {\n var cursor = typeof element.selectionStart === 'number' ? element.selectionStart : null;\n var atEnd = cursor !== null && cursor >= element.value.length;\n var digitsBeforeCursor = cursor === null\n ? null\n : element.value.slice(0, cursor).replace(/[^\\d+]/g, '').length;\n var value = formatPhone(element.value, !event || event.type === 'change');\n\n if (element.value !== value) { element.value = value; }\n\n if (digitsBeforeCursor !== null && typeof element.setSelectionRange === 'function') {\n var position = atEnd ? value.length : 0;\n var digitsSeen = 0;\n while (!atEnd && position < value.length && digitsSeen < digitsBeforeCursor) {\n if (/[\\d+]/.test(value[position])) { digitsSeen++; }\n position++;\n }\n element.setSelectionRange(position, position);\n }\n };\n\n element.addEventListener('input', format);\n element.addEventListener('change', format);\n format();\n\n}\n"},8743(e){e.exports="/**\n *\n * INDIRIZZI CON GOOGLE PLACES\n *\n * Suggerimenti sotto il campo della via (Places API New) e riempimento dei campi\n * fratelli: civico, CAP, città, nazione, provincia, place ID e coordinate.\n * Il campo resta sempre libero: Google è solo un aiuto.\n *\n * Markup: <input name=\"<p>street\" data-wi-place=\"<p>\">; i fratelli si cercano per nome\n * dentro [data-wi-place-scope] o la form. Con <p> che finisce per \"[\" (repeater) la riga\n * si legge dal nome della via e i nomi diventano riga + chiave + \"]\".\n *\n */\n\nvar wiPlacesLoading = null;\nvar wiPlacesCount = 0;\nvar WI_PLACE_TYPES = [ 'street_address', 'premise', 'subpremise', 'route' ];\nvar WI_PLACE_LOGO = 'https://maps.gstatic.com/mapfiles/api-3/images/powered-by-google-on-white3_hdpi.png';\n\nfunction wiPlaceFieldName(prefix, key) {\n\n return prefix.endsWith('[') ? prefix + key + ']' : prefix + key;\n\n}\n\n// Componenti di Places API (New) (longText/shortText) o del formato vecchio (long_name/short_name).\nfunction wiPlaceParse(components) {\n\n const out = { street: '', number: '', cap: '', city: '', country: '', l1s: '', l1l: '', l2s: '', l2l: '' };\n const city = {};\n\n for (const component of components || []) {\n\n const long = component.longText ?? component.long_name ?? '';\n const short = component.shortText ?? component.short_name ?? '';\n const types = component.types || [];\n const first = (key, value) => { if (!out[key]) { out[key] = value; } };\n\n if (types.includes('route')) { first('street', long); }\n if (types.includes('street_number')) { first('number', long); }\n if (types.includes('postal_code')) { first('cap', long); }\n if (types.includes('country')) { first('country', short.toUpperCase()); }\n if (types.includes('administrative_area_level_1')) { first('l1s', short); first('l1l', long); }\n if (types.includes('administrative_area_level_2')) { first('l2s', short); first('l2l', long); }\n for (const type of [ 'locality', 'postal_town', 'administrative_area_level_3' ]) {\n if (types.includes(type) && !city[type]) { city[type] = long; }\n }\n\n }\n\n out.city = city.locality || city.postal_town || city.administrative_area_level_3 || '';\n\n return out;\n\n}\n\nfunction wiPlaceNormalize(text) {\n\n return String(text ?? '').normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase().replace(/\\s+/g, ' ').trim();\n\n}\n\n// options: [[chiave, nome], ...]. Ordine: chiave level_2, chiave level_1, nome level_2, nome level_1.\nfunction wiPlaceMatchState(options, parsed) {\n\n const byKey = key => key ? options.find(([ value ]) => String(value).toUpperCase() === String(key).toUpperCase()) : null;\n const byName = name => {\n const wanted = wiPlaceNormalize(name);\n return wanted ? options.find(([ , label ]) => wiPlaceNormalize(label) === wanted) : null;\n };\n\n const found = byKey(parsed.l2s) || byKey(parsed.l1s) || byName(parsed.l2l) || byName(parsed.l1l);\n\n return found ? String(found[0]) : '';\n\n}\n\nfunction wiPlaceCoord(value) {\n\n return String(parseFloat(Number(value).toFixed(7)));\n\n}\n\nfunction wiPlaceLink(lat, lng, id) {\n\n return 'https://www.google.com/maps/search/?api=1&query=' + wiPlaceCoord(lat) + ',' + wiPlaceCoord(lng) + '&query_place_id=' + encodeURIComponent(id);\n\n}\n\nfunction wiPlaceApiKey() {\n\n return typeof GOOGLE_API_KEY !== 'undefined' && GOOGLE_API_KEY ? GOOGLE_API_KEY : '';\n\n}\n\n// Una sola libreria per pagina; se il caricamento fallisce resta null e i campi restano normali.\nfunction wiPlacesLibrary() {\n\n if (!wiPlacesLoading) {\n\n wiPlacesLoading = (async () => {\n const language = document.documentElement.lang || null;\n if (!(typeof google !== 'undefined' && google.maps && google.maps.importLibrary)) {\n await requireGoogleMaps([], { language });\n }\n return await google.maps.importLibrary('places');\n })().catch(error => {\n console.warn('Google Places non disponibile:', error);\n return null;\n });\n\n }\n\n return wiPlacesLoading;\n\n}\n\nfunction wiPlacesInit(container = document) {\n\n if (!wiPlaceApiKey()) { return; }\n\n const root = container && container.querySelectorAll ? container : document;\n const inputs = Array.from(root.querySelectorAll('input[data-wi-place], input[data-wi-search-place]')).filter(input => !input.wiPlace);\n\n if (!inputs.length) { return; }\n\n wiPlacesLibrary().then(library => {\n if (!library) { return; }\n inputs.forEach(input => { if (!input.wiPlace) { wiPlaceAttach(input, library); } });\n });\n\n}\n\n// Nomi vecchi: avviano il motore nuovo.\nfunction setGoogleMapsApi(container = document) { wiPlacesInit(container); }\nfunction initGoogleMapsPlace() { wiPlacesInit(document); }\n\n/**\n *\n * Campi di un indirizzo\n *\n */\n\nfunction wiPlaceFields(input) {\n\n const legacy = input.dataset.wiPlace === undefined;\n const declared = legacy ? '' : input.dataset.wiPlace;\n // Riga di repeater: la riga viene dal nome della via, che il repeater riscrive nelle righe nuove.\n const row = declared.endsWith('[') && /\\[[^\\[\\]]+\\]$/.test(input.name);\n const prefix = row ? input.name.replace(/[^\\[\\]]+\\]$/, '') : declared;\n const scope = input.closest('[data-wi-place-scope]') || input.form || document;\n const named = Array.from(scope.querySelectorAll('[name]'));\n const byName = name => name ? named.find(el => el.name === name && el.type !== 'radio') || null : null;\n const name = key => wiPlaceFieldName(prefix, key);\n\n const countryName = name('country');\n const country = named.find(el => el.name === countryName && el.tagName === 'SELECT')\n || Array.from(scope.querySelectorAll('[data-wi-name]')).find(el => el.dataset.wiName === countryName + '-text')\n || byName(countryName);\n\n // Nel repeater data-wi-input-state è il nome della colonna, come lo legge searchStates().\n const stateKey = country && country.dataset.wiInputState;\n const stateName = stateKey ? (row ? name(stateKey) : stateKey) : name('province');\n const province = named.find(el => el.name === stateName && el.tagName === 'SELECT')\n || Array.from(scope.querySelectorAll('[data-wi-name]')).find(el => el.dataset.wiName === stateName + '-text')\n || byName(stateName);\n\n return {\n scope,\n legacy,\n street: input,\n number: byName(name('number')),\n cap: byName(name('cap')),\n city: byName(name('city')),\n country,\n province,\n placeId: byName(input.dataset.wiPlaceId || name('place_id')),\n lat: byName(name('lat')),\n lng: byName(name('lng')),\n link: byName(input.dataset.wiPlaceLink || '')\n };\n\n}\n\n// Una lista di testo ha l'input visibile con data-wi-name=\"<nome>-text\" e i radio <nome>.\nfunction wiPlaceRadios(fields, el) {\n\n const name = el.dataset.wiName && el.dataset.wiName.endsWith('-text') ? el.dataset.wiName.slice(0, -5) : null;\n\n return name ? Array.from(fields.scope.querySelectorAll('input[type=\"radio\"]')).filter(radio => radio.name === name) : null;\n\n}\n\nfunction wiPlaceValue(fields, el) {\n\n if (!el) { return ''; }\n const radios = el.tagName === 'SELECT' ? null : wiPlaceRadios(fields, el);\n if (radios) { return (radios.find(radio => radio.checked) || {}).value || ''; }\n\n return el.value;\n\n}\n\nfunction wiPlaceOptions(fields, el) {\n\n if (!el) { return []; }\n if (el.tagName === 'SELECT') {\n return Array.from(el.options).filter(option => option.value !== '').map(option => [ option.value, option.textContent.trim() ]);\n }\n const radios = wiPlaceRadios(fields, el);\n\n return radios ? radios.map(radio => [ radio.value, radio.dataset.wiName || radio.value ]) : null;\n\n}\n\nfunction wiPlaceEmit(el) {\n\n el.dispatchEvent(new Event('input', { bubbles: true }));\n el.dispatchEvent(new Event('change', { bubbles: true }));\n\n}\n\n/**\n *\n * Aggancio di un input\n *\n */\n\nfunction wiPlaceAttach(input, library) {\n\n const fields = wiPlaceFields(input);\n const listId = 'wi-place-list-' + (++wiPlacesCount);\n const state = { library, fields, token: null, seq: 0, timer: null, items: [], active: -1, writing: false, open: false };\n\n input.wiPlace = state;\n\n if (fields.legacy) {\n input.disabled = false;\n // Il campo abilitato da Places non è una modifica dell'utente\n window.wiSaveBar?.absorb(input);\n }\n\n const list = document.createElement('ul');\n list.id = listId;\n list.className = 'wi-place-list';\n list.setAttribute('role', 'listbox');\n list.hidden = true;\n input.insertAdjacentElement('afterend', list);\n state.list = list;\n\n input.setAttribute('autocomplete', 'off');\n input.setAttribute('role', 'combobox');\n input.setAttribute('aria-autocomplete', 'list');\n input.setAttribute('aria-expanded', 'false');\n input.setAttribute('aria-controls', listId);\n\n input.addEventListener('input', () => {\n if (state.writing) { return; }\n wiPlaceClearGeo(state);\n clearTimeout(state.timer);\n state.seq++;\n state.timer = setTimeout(() => wiPlaceSearch(input), 250);\n });\n\n input.addEventListener('keydown', event => wiPlaceKeydown(input, event));\n input.addEventListener('blur', () => wiPlaceClose(input));\n\n for (const key of [ 'number', 'cap', 'city' ]) {\n fields[key]?.addEventListener('input', () => { if (!state.writing) { wiPlaceClearGeo(state); } });\n }\n if (fields.country) {\n const onCountry = () => { if (!state.writing) { wiPlaceClearGeo(state); } };\n if (typeof jQuery !== 'undefined') { jQuery(fields.country).on('change', onCountry); }\n else { fields.country.addEventListener('change', onCountry); }\n }\n\n}\n\nfunction wiPlaceRegion(input) {\n\n const fields = input.wiPlace.fields;\n\n // Nel markup vecchio il paese nascosto è la scelta precedente, non un limite.\n if (fields.country && !fields.legacy) {\n const iso = wiPlaceValue(fields, fields.country);\n return iso ? [ iso.toLowerCase() ] : [];\n }\n\n try {\n const restriction = JSON.parse(input.dataset.wiRestriction || '{}');\n const country = restriction && restriction.country;\n return (Array.isArray(country) ? country : country ? [ country ] : []).map(code => String(code).toLowerCase());\n } catch (error) {\n return [];\n }\n\n}\n\n// Con data-wi-place-names si cercano anche le attività per nome (es. la sede di un negozio).\nfunction wiPlaceNames(input) {\n\n return input.dataset.wiPlaceNames !== undefined;\n\n}\n\nfunction wiPlaceRequest(input, text) {\n\n const request = { input: text, sessionToken: input.wiPlace.token };\n const language = document.documentElement.lang;\n const region = wiPlaceRegion(input);\n\n // \"establishment\" non è mai il tipo primario di un'attività: per nome si filtra dopo, in wiPlaceKeep\n if (!wiPlaceNames(input)) { request.includedPrimaryTypes = WI_PLACE_TYPES; }\n if (language) { request.language = language; }\n if (region.length) { request.includedRegionCodes = region; }\n\n return request;\n\n}\n\n// Per nome: attività e indirizzi, non città e regioni che riempirebbero metà dei campi.\nfunction wiPlaceKeep(predictions, names) {\n\n if (!names) { return predictions; }\n\n return predictions.filter(prediction => (prediction.types || []).some(type => type === 'establishment' || WI_PLACE_TYPES.includes(type)));\n\n}\n\nasync function wiPlaceSearch(input) {\n\n const state = input.wiPlace;\n const text = input.value.trim();\n const seq = state.seq;\n\n if (text.length < 3) { wiPlaceClose(input); return; }\n\n if (!state.token) { state.token = new state.library.AutocompleteSessionToken(); }\n\n const names = wiPlaceNames(input);\n\n let suggestions = [];\n try {\n ({ suggestions } = await state.library.AutocompleteSuggestion.fetchAutocompleteSuggestions(wiPlaceRequest(input, text)));\n } catch (error) {\n console.warn('Google Places:', error);\n }\n\n if (seq !== state.seq) { return; }\n\n state.items = wiPlaceKeep((suggestions || []).map(suggestion => suggestion.placePrediction).filter(Boolean), names).slice(0, 5);\n wiPlaceRender(input);\n\n}\n\nfunction wiPlaceRender(input) {\n\n const state = input.wiPlace;\n const list = state.list;\n\n list.replaceChildren();\n state.active = -1;\n input.removeAttribute('aria-activedescendant');\n\n if (!state.items.length) { wiPlaceClose(input); return; }\n\n state.items.forEach((prediction, index) => {\n\n const option = document.createElement('li');\n option.id = list.id + '-' + index;\n option.className = 'wi-place-option';\n option.setAttribute('role', 'option');\n option.setAttribute('aria-selected', 'false');\n\n const main = document.createElement('strong');\n main.textContent = prediction.mainText?.text ?? prediction.text?.text ?? '';\n option.append(main);\n\n if (prediction.secondaryText?.text) {\n const secondary = document.createElement('small');\n secondary.textContent = prediction.secondaryText.text;\n option.append(secondary);\n }\n\n // mousedown non toglie il fuoco all'input, così il blur non chiude la lista\n option.addEventListener('mousedown', event => event.preventDefault());\n option.addEventListener('click', () => wiPlaceChoose(input, index));\n list.append(option);\n\n });\n\n const logo = document.createElement('li');\n logo.className = 'wi-place-logo';\n logo.setAttribute('role', 'presentation');\n logo.innerHTML = '<img src=\"' + WI_PLACE_LOGO + '\" alt=\"powered by Google\" height=\"14\">';\n list.append(logo);\n\n list.style.top = (input.offsetTop + input.offsetHeight) + 'px';\n list.style.left = input.offsetLeft + 'px';\n list.style.width = input.offsetWidth + 'px';\n list.hidden = false;\n input.classList.add('wi-place-open');\n state.open = true;\n input.setAttribute('aria-expanded', 'true');\n\n}\n\nfunction wiPlaceClose(input) {\n\n const state = input.wiPlace;\n if (!state) { return; }\n\n state.open = false;\n state.active = -1;\n state.list.hidden = true;\n input.classList.remove('wi-place-open');\n input.setAttribute('aria-expanded', 'false');\n input.removeAttribute('aria-activedescendant');\n\n}\n\nfunction wiPlaceActivate(input, index) {\n\n const state = input.wiPlace;\n const options = state.list.querySelectorAll('.wi-place-option');\n\n state.active = (index + options.length) % options.length;\n options.forEach((option, i) => {\n option.classList.toggle('wi-place-option--active', i === state.active);\n option.setAttribute('aria-selected', i === state.active ? 'true' : 'false');\n });\n input.setAttribute('aria-activedescendant', options[state.active].id);\n\n}\n\nfunction wiPlaceKeydown(input, event) {\n\n const state = input.wiPlace;\n if (!state.open) { return; }\n\n if (event.key === 'ArrowDown') { event.preventDefault(); wiPlaceActivate(input, state.active + 1); }\n else if (event.key === 'ArrowUp') { event.preventDefault(); wiPlaceActivate(input, state.active < 0 ? -1 : state.active - 1); }\n else if (event.key === 'Escape') { event.preventDefault(); wiPlaceClose(input); }\n else if (event.key === 'Enter') {\n // Con la lista aperta Invio sceglie e non invia la form\n event.preventDefault();\n if (state.active >= 0) { wiPlaceChoose(input, state.active); } else { wiPlaceClose(input); }\n }\n\n}\n\n/**\n *\n * Scelta di un suggerimento\n *\n */\n\nasync function wiPlaceChoose(input, index) {\n\n const state = input.wiPlace;\n const prediction = state.items[index];\n const seq = state.seq;\n\n wiPlaceClose(input);\n if (!prediction) { return; }\n\n let place;\n try {\n place = prediction.toPlace();\n await place.fetchFields({ fields: [ 'addressComponents', 'location', 'id' ] });\n } catch (error) {\n console.warn('Google Places:', error);\n return;\n } finally {\n state.token = null;\n }\n\n if (seq !== state.seq) { return; }\n\n const parsed = wiPlaceParse(place.addressComponents);\n\n if (state.fields.legacy) {\n wiPlaceApplyLegacy(input, place, parsed, prediction);\n } else {\n await wiPlaceApply(input, place, parsed);\n }\n\n}\n\nfunction wiPlaceWrite(state, el, value) {\n\n if (!el) { return; }\n value = String(value ?? '');\n if (el.value === value) { return; }\n\n state.writing = true;\n try {\n el.value = value;\n wiPlaceEmit(el);\n } finally {\n state.writing = false;\n }\n\n}\n\nfunction wiPlaceClearGeo(state) {\n\n const { placeId, lat, lng, link } = state.fields;\n [ placeId, lat, lng, link ].forEach(el => wiPlaceWrite(state, el, ''));\n\n}\n\nfunction wiPlaceSetCountry(state, iso, provinceKey) {\n\n const { country } = state.fields;\n\n state.writing = true;\n try {\n if (typeof setCountryState === 'function' && (country.tagName === 'SELECT' || wiPlaceRadios(state.fields, country))) {\n // Frontend: select o lista di testo, con la provincia tenuta da parte\n setCountryState(country, iso, provinceKey);\n } else {\n // Backend: la select2 e searchStates ascoltano il change\n country.value = iso;\n wiPlaceEmit(country);\n }\n } finally {\n state.writing = false;\n }\n\n}\n\nfunction wiPlaceSetProvince(state, key) {\n\n const { province } = state.fields;\n\n if (province.tagName !== 'SELECT' && wiPlaceRadios(state.fields, province) && typeof textListValue === 'function') {\n textListValue(province, key);\n return;\n }\n\n wiPlaceWrite(state, province, key);\n\n}\n\nfunction wiPlaceStatesReady(province, iso, timeout = 5000) {\n\n return new Promise(resolve => {\n const start = Date.now();\n const tick = () => {\n if (province.dataset.wiListStates === iso && !province.disabled) { resolve(true); return; }\n if (Date.now() - start >= timeout) { resolve(false); return; }\n setTimeout(tick, 50);\n };\n tick();\n });\n\n}\n\nasync function wiPlaceApply(input, place, parsed) {\n\n const state = input.wiPlace;\n const fields = state.fields;\n const iso = parsed.country;\n let countryOk = !fields.country;\n let countryChanged = false;\n\n // 1. Nazione (con la provincia di level_2 tenuta da parte)\n if (fields.country && iso) {\n const options = wiPlaceOptions(fields, fields.country);\n countryOk = options === null || options.some(([ value ]) => value === iso);\n if (countryOk && wiPlaceValue(fields, fields.country) !== iso) {\n wiPlaceSetCountry(state, iso, parsed.l2s);\n countryChanged = true;\n }\n }\n\n // 2-5. Via, civico (resta quello scritto se Google non lo dà), CAP, città\n wiPlaceWrite(state, fields.street, parsed.street || input.value);\n if (parsed.number) { wiPlaceWrite(state, fields.number, parsed.number); }\n wiPlaceWrite(state, fields.cap, parsed.cap);\n wiPlaceWrite(state, fields.city, parsed.city);\n\n // 7. Geo\n const id = place.id || '';\n const location = place.location;\n if (location) {\n const lat = typeof location.lat === 'function' ? location.lat() : location.lat;\n const lng = typeof location.lng === 'function' ? location.lng() : location.lng;\n wiPlaceWrite(state, fields.placeId, id);\n wiPlaceWrite(state, fields.lat, wiPlaceCoord(lat));\n wiPlaceWrite(state, fields.lng, wiPlaceCoord(lng));\n wiPlaceWrite(state, fields.link, id ? wiPlaceLink(lat, lng, id) : '');\n } else {\n wiPlaceWrite(state, fields.placeId, id);\n }\n\n // 6. Provincia: chiave level_2, level_1, poi per nome; se la nazione è cambiata, a caricamento finito\n if (fields.province && countryOk) {\n if (countryChanged || fields.province.disabled) {\n const seq = state.seq;\n const ready = await wiPlaceStatesReady(fields.province, iso);\n if (!ready || seq !== state.seq) { return; }\n }\n const key = wiPlaceMatchState(wiPlaceOptions(fields, fields.province) || [], parsed);\n if (key && wiPlaceValue(fields, fields.province) !== key) { wiPlaceSetProvince(state, key); }\n }\n\n}\n\n// Markup vecchio: un solo input con i 6 campi nascosti data-wi-spi accanto.\nfunction wiPlaceApplyLegacy(input, place, parsed, prediction) {\n\n const state = input.wiPlace;\n const callback = input.dataset.wiCallback;\n\n if (callback && typeof window[callback] === 'function') {\n const components = (place.addressComponents || []).map(component => ({\n long_name: component.longText, short_name: component.shortText, types: component.types\n }));\n window[callback](input, { getPlace: () => ({ address_components: components, geometry: { location: place.location } }) });\n return;\n }\n\n const container = input.parentElement;\n const spi = key => container.querySelector('[data-wi-spi=\"' + key + '\"]');\n const values = { country: parsed.country, province: parsed.l2s, cap: parsed.cap, city: parsed.city, street: parsed.street, number: parsed.number };\n\n for (const key in values) {\n const el = spi(key);\n if (el) { el.value = values[key]; }\n }\n\n wiPlaceWrite(state, input, prediction.text?.text ?? input.value);\n\n}\n"},6338(e){e.exports='// Loader dell\'API Google Maps JS (Dynamic Library Import) + marker builder di default.\n// Uso: await requireGoogleMaps([\'maps\', \'places\', \'marker\']); poi inizializzare la mappa.\nasync function requireGoogleMaps(libs = [ \'maps\', \'places\', \'marker\' ], options = {}) {\n\n const {\n key = (typeof GOOGLE_API_KEY !== \'undefined\' ? GOOGLE_API_KEY : \'\'),\n v = \'weekly\',\n language = null\n } = options;\n\n const params = { key, v };\n if (language) { params.language = language; }\n\n (g=>{var h,a,k,p="The Google Maps JavaScript API",c="google",l="importLibrary",q="__ib__",m=document,b=window;b=b[c]||(b[c]={});var d=b.maps||(b.maps={}),r=new Set,e=new URLSearchParams,u=()=>h||(h=new Promise(async(f,n)=>{await (a=m.createElement("script"));e.set("libraries",[...r]+"");for(k in g)e.set(k.replace(/[A-Z]/g,t=>"_"+t[0].toLowerCase()),g[k]);e.set("callback",c+".maps."+q);a.src=`https://maps.${c}apis.com/maps/api/js?`+e;d[q]=f;a.onerror=()=>h=n(Error(p+" could not load."));a.nonce=m.querySelector("script[nonce]")?.nonce||"";m.head.append(a)}));d[l]?console.warn(p+" only loads once. Ignoring:",g):d[l]=(f,...n)=>r.add(f)&&u().then(()=>d[l](f,...n))})(params);\n\n for (const lib of libs) {\n await google.maps.importLibrary(lib);\n }\n\n}\n\n// Builder di default per il contenuto di un AdvancedMarkerElement.\n// properties: { id, type, icon, image, name, address, url, badgeText }\n// Per un markup diverso passare la propria funzione a MapManager.addAdvancedMarker().\nfunction gmapMarkerConstructor(properties) {\n\n const content = document.createElement("div");\n\n if (properties.id) { content.id = `marker-${properties.id}`; }\n content.classList.add("wi-marker");\n if (properties.type) { content.classList.add(`wi-marker-${properties.type}`); }\n\n const image = properties.image ? `\n <div class="w-30 b-r-10 o-hidden">\n <div class="f-3-2">\n ${properties.image}\n </div>\n </div>` : \'\';\n\n const address = properties.address ? `<div class="text-small mt-1">${properties.address}</div>` : \'\';\n\n const badge = properties.url ? `\n <div class="features mt-2">\n <a href="${properties.url}" class="badge badge-primary">\n ${properties.badgeText ?? \'\'}\n </a>\n </div>` : \'\';\n\n content.innerHTML = `\n <div class="icon">\n <div class="f-1-1">\n ${properties.icon ?? \'\'}\n </div>\n </div>\n <div class="details">\n ${image}\n <div class="${properties.image ? \'w-70 pl-2\' : \'w-100\'} box-border">\n <div class="text fw-400">${properties.name ?? \'\'}</div>\n ${address}\n ${badge}\n </div>\n </div>\n `;\n\n return content;\n\n}\n\n// Espande/comprime un marker (classe .highlight su .wi-marker)\nfunction toggleHighlight(markerView) {\n\n if (!markerView || !markerView.content || !markerView.content.classList) { return; }\n\n if (markerView.content.classList.contains("highlight")) {\n markerView.content.classList.remove("highlight");\n markerView.zIndex = null;\n } else {\n markerView.content.classList.add("highlight");\n markerView.zIndex = 1;\n }\n\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\n// Messaggio testuale di una risposta 4xx in JSON ({ response: '...' }); null altrimenti.\n// Gli errori 5xx restano generici per non mostrare dettagli interni.\nfunction ajaxResponseMessage(request) {\n\n if (!request || request.readyState != 4 || request.status < 400 || request.status > 499) {\n return null;\n }\n\n try {\n var message = JSON.parse(request.responseText).response;\n } catch {\n return null;\n }\n\n return typeof message === 'string' && message.trim() !== '' ? message.trim() : null;\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}\n\n// Previene l'uscita dalla pagina\nfunction preventPageExit(event) {\n \n event.preventDefault();\n event.returnValue = true;\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)}}},734(e,n,t){t(4642)(t(5285))},9196(e,n,t){t(4642)(t(4729))},9676(e,n,t){t(4642)(t(8553))},5328(e,n,t){t(4642)(t(5249))},4315(e,n,t){t(4642)(t(3990))},710(e,n,t){t(4642)(t(6711))},5545(e,n,t){t(4642)(t(7418))},8109(e,n,t){t(4642)(t(9636))},6225(e,n,t){t(4642)(t(1989))},7806(e,n,t){t(4642)(t(7741))},2383(e,n,t){t(4642)(t(7676))},2879(e,n,t){t(4642)(t(9198))},2981(e,n,t){t(4642)(t(1826))},2730(e,n,t){t(4642)(t(9221))},555(e,n,t){t(4642)(t(7642))},8258(e,n,t){t(4642)(t(5071))},9111(e,n,t){t(4642)(t(8882))},7187(e,n,t){t(4642)(t(3740))},2347(e,n,t){t(4642)(t(6944))},8004(e,n,t){t(4642)(t(8197))},9118(e,n,t){t(4642)(t(1367))},550(e,n,t){t(4642)(t(7059))},3286(e,n,t){t(4642)(t(3883))},9260(e,n,t){t(4642)(t(8743))},4581(e,n,t){t(4642)(t(6338))},9899(e,n,t){t(4642)(t(8636))},6235(){window.wi=window.wi||{}},767(){"use strict";function e(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=Array(n);t<n;t++)a[t]=e[t];return a}function n(n,t){return function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,i,r,o,l=[],s=!0,c=!1;try{if(r=(t=t.call(e)).next,0===n);else for(;!(s=(a=r.call(t)).done)&&(l.push(a.value),l.length!==n);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw i}}return l}}(n,t)||function(n,t){if(n){if("string"==typeof n)return e(n,t);var a={}.toString.call(n).slice(8,-1);return"Object"===a&&n.constructor&&(a=n.constructor.name),"Map"===a||"Set"===a?Array.from(n):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?e(n,t):void 0}}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const t=Object.entries,a=Object.setPrototypeOf,i=Object.isFrozen,r=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor;let l=Object.freeze,s=Object.seal,c=Object.create,d="undefined"!=typeof Reflect&&Reflect,u=d.apply,p=d.construct;l||(l=function(e){return e}),s||(s=function(e){return e}),u||(u=function(e,n){for(var t=arguments.length,a=new Array(t>2?t-2:0),i=2;i<t;i++)a[i-2]=arguments[i];return e.apply(n,a)}),p||(p=function(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];return new e(...t)});const f=M(Array.prototype.forEach),m=M(Array.prototype.lastIndexOf),h=M(Array.prototype.pop),g=M(Array.prototype.push),b=M(Array.prototype.splice),v=Array.isArray,w=M(String.prototype.toLowerCase),y=M(String.prototype.toString),k=M(String.prototype.match),S=M(String.prototype.replace),x=M(String.prototype.indexOf),E=M(String.prototype.trim),A=M(Number.prototype.toString),L=M(Boolean.prototype.toString),C="undefined"==typeof BigInt?null:M(BigInt.prototype.toString),T="undefined"==typeof Symbol?null:M(Symbol.prototype.toString),q=M(Object.prototype.hasOwnProperty),P=M(Object.prototype.toString),N=M(RegExp.prototype.test),I=(O=TypeError,function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return p(O,n)});var O;function M(e){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var t=arguments.length,a=new Array(t>1?t-1:0),i=1;i<t;i++)a[i-1]=arguments[i];return u(e,n,a)}}function R(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;if(a&&a(e,null),!v(n))return e;let r=n.length;for(;r--;){let a=n[r];if("string"==typeof a){const e=t(a);e!==a&&(i(n)||(n[r]=e),a=e)}e[a]=!0}return e}function z(e){for(let n=0;n<e.length;n++){q(e,n)||(e[n]=null)}return e}function D(e){const a=c(null);for(const r of t(e)){var i=n(r,2);const t=i[0],o=i[1];q(e,t)&&(v(o)?a[t]=z(o):o&&"object"==typeof o&&o.constructor===Object?a[t]=D(o):a[t]=o)}return a}function _(e,n){for(;null!==e;){const t=o(e,n);if(t){if(t.get)return M(t.get);if("function"==typeof t.value)return M(t.value)}e=r(e)}return function(){return null}}const F=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),B=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),H=l(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),V=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),U=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$=l(["#text"]),G=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),W=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),K=l(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),J=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Y=s(/{{[\w\W]*|^[\w\W]*}}/g),X=s(/<%[\w\W]*|^[\w\W]*%>/g),Q=s(/\${[\w\W]*/g),Z=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),ee=s(/^aria-[\-\w]+$/),ne=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),te=s(/^(?:\w+script|data):/i),ae=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ie=s(/^html$/i),re=s(/^[a-z][.\w]*(-[.\w]+)+$/i),oe=s(/<[/\w!]/g),le=s(/<[/\w]/g),se=s(/<\/no(script|embed|frames)/i),ce=s(/\/>/i),de=1,ue=3,pe=7,fe=8,me=9,he=11,ge=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],be=l(R({},ge)),ve=function(){const e={};return f(ge,n=>{e[n]=s(new RegExp("</"+n+"(?=[\\t\\n\\f\\r />])","i"))}),l(e)}(),we=function(){return"undefined"==typeof window?null:window},ye=function(e,n,t,a){return q(e,n)&&v(e[n])?R(a.base?D(a.base):{},e[n],a.transform):t},ke=function(e,n,t){const a=q(e,n)?e[n]:void 0;return a&&"object"==typeof a?D(a):t()};var Se=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:we();const a=n=>e(n);if(a.version="3.4.15",a.removed=[],!n||!n.document||n.document.nodeType!==me||!n.Element)return a.isSupported=!1,a;let i=n.document;const r=i,o=r.currentScript;n.DocumentFragment;const d=n.HTMLTemplateElement,u=n.Node,p=n.Element,O=n.NodeFilter,M=n.NamedNodeMap;void 0===M&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const z=n.DOMParser,ge=n.trustedTypes,Se=p.prototype,xe=_(Se,"cloneNode"),Ee=_(Se,"remove"),Ae=_(Se,"removeAttributeNode"),Le=_(Se,"nextSibling"),Ce=_(Se,"childNodes"),Te=_(Se,"parentNode"),qe=_(Se,"shadowRoot"),Pe=_(Se,"attributes"),Ne=u&&u.prototype?_(u.prototype,"nodeType"):null,Ie=u&&u.prototype?_(u.prototype,"nodeName"):null,Oe=u&&u.prototype?_(u.prototype,"ownerDocument"):null,Me=function(e){return Ne?Ne(e):e.nodeType},Re=function(e){return Ie?Ie(e):e.nodeName};if("function"==typeof d){const e=i.createElement("template");e.content&&e.content.ownerDocument&&(i=e.content.ownerDocument)}let ze,De,_e="",Fe=!1,je=0;const Be=function(){if(je>0)throw I('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},He=function(e){Be(),je++;try{return ze.createHTML(e)}finally{je--}},Ve=function(){return Fe||(De=function(e,n){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let t=null;const a="data-tt-policy-suffix";n&&n.hasAttribute(a)&&(t=n.getAttribute(a));const i="dompurify"+(t?"#"+t:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(ge,o),Fe=!0),De},Ue=i,$e=Ue.implementation,Ge=Ue.createNodeIterator,We=Ue.createDocumentFragment,Ke=Ue.getElementsByTagName,Je=r.importNode;let Ye={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};a.isSupported="function"==typeof t&&"function"==typeof Te&&$e&&void 0!==$e.createHTMLDocument;const Xe=Y,Qe=X,Ze=Q,en=Z,nn=ee,tn=te,an=ae,rn=re;let on=ne,ln=null;const sn=R({},[...F,...j,...B,...V,...$]);let cn=null;const dn=R({},[...G,...W,...K,...J]);let un=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),pn=null,fn=null;const mn=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let hn=!0,gn=!0,bn=!1,vn=!0,wn=!1,yn=!0,kn=!1,Sn=!1,xn=null,En=null,An=!1,Ln=!1,Cn=!1,Tn=!1,qn=!0,Pn=!1;const Nn="user-content-";let In=!0,On=!1,Mn={},Rn=null;const zn=R({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Dn=null;const _n=R({},["audio","video","img","source","image","track"]);let Fn=null;const jn=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Bn="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",Vn="http://www.w3.org/1999/xhtml";let Un=Vn,$n=!1,Gn=null;const Wn=R({},[Bn,Hn,Vn],y),Kn=l(["mi","mo","mn","ms","mtext"]);let Jn=R({},Kn);const Yn=l(["annotation-xml"]);let Xn=R({},Yn);const Qn=R({},["title","style","font","a","script"]);let Zn=null;const et=["application/xhtml+xml","text/html"];let nt=null,tt=null;const at=i.createElement("form"),it=function(e){return e instanceof RegExp||e instanceof Function},rt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(tt&&tt===e)return;e&&"object"==typeof e||(e={}),e=D(e),Zn=-1===et.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,nt="application/xhtml+xml"===Zn?y:w,ln=ye(e,"ALLOWED_TAGS",sn,{transform:nt}),cn=ye(e,"ALLOWED_ATTR",dn,{transform:nt}),Gn=ye(e,"ALLOWED_NAMESPACES",Wn,{transform:y}),Fn=ye(e,"ADD_URI_SAFE_ATTR",jn,{transform:nt,base:jn}),Dn=ye(e,"ADD_DATA_URI_TAGS",_n,{transform:nt,base:_n}),Rn=ye(e,"FORBID_CONTENTS",zn,{transform:nt}),pn=ye(e,"FORBID_TAGS",D({}),{transform:nt}),fn=ye(e,"FORBID_ATTR",D({}),{transform:nt}),Mn=!!q(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?D(e.USE_PROFILES):e.USE_PROFILES),hn=!1!==e.ALLOW_ARIA_ATTR,gn=!1!==e.ALLOW_DATA_ATTR,bn=e.ALLOW_UNKNOWN_PROTOCOLS||!1,vn=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,wn=e.SAFE_FOR_TEMPLATES||!1,yn=!1!==e.SAFE_FOR_XML,kn=e.WHOLE_DOCUMENT||!1,Ln=e.RETURN_DOM||!1,Cn=e.RETURN_DOM_FRAGMENT||!1,Tn=e.RETURN_TRUSTED_TYPE||!1,An=e.FORCE_BODY||!1,qn=!1!==e.SANITIZE_DOM,Pn=e.SANITIZE_NAMED_PROPS||!1,In=!1!==e.KEEP_CONTENT,On=e.IN_PLACE||!1,on=function(e){try{return N(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:ne,Un="string"==typeof e.NAMESPACE?e.NAMESPACE:Vn,Jn=ke(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>R({},Kn)),Xn=ke(e,"HTML_INTEGRATION_POINTS",()=>R({},Yn));const n=ke(e,"CUSTOM_ELEMENT_HANDLING",()=>c(null));if(un=c(null),q(n,"tagNameCheck")&&it(n.tagNameCheck)&&(un.tagNameCheck=n.tagNameCheck),q(n,"attributeNameCheck")&&it(n.attributeNameCheck)&&(un.attributeNameCheck=n.attributeNameCheck),q(n,"allowCustomizedBuiltInElements")&&"boolean"==typeof n.allowCustomizedBuiltInElements&&(un.allowCustomizedBuiltInElements=n.allowCustomizedBuiltInElements),s(un),wn&&(gn=!1),Cn&&(Ln=!0),Mn&&(ln=R({},$),cn=c(null),!0===Mn.html&&(R(ln,F),R(cn,G)),!0===Mn.svg&&(R(ln,j),R(cn,W),R(cn,J)),!0===Mn.svgFilters&&(R(ln,B),R(cn,W),R(cn,J)),!0===Mn.mathMl&&(R(ln,V),R(cn,K),R(cn,J))),mn.tagCheck=null,mn.attributeCheck=null,q(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?mn.tagCheck=e.ADD_TAGS:v(e.ADD_TAGS)&&(ln===sn&&(ln=D(ln)),R(ln,e.ADD_TAGS,nt))),q(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?mn.attributeCheck=e.ADD_ATTR:v(e.ADD_ATTR)&&(cn===dn&&(cn=D(cn)),R(cn,e.ADD_ATTR,nt))),q(e,"ADD_FORBID_CONTENTS")&&v(e.ADD_FORBID_CONTENTS)&&(Rn===zn&&(Rn=D(Rn)),R(Rn,e.ADD_FORBID_CONTENTS,nt)),In&&(ln["#text"]=!0),kn&&R(ln,["html","head","body"]),ln.table&&(R(ln,["tbody"]),delete pn.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw I('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw I('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const n=ze;ze=e.TRUSTED_TYPES_POLICY;try{_e=He("")}catch(e){throw ze=n,e}}else null===e.TRUSTED_TYPES_POLICY?(ze=void 0,_e=""):(void 0===ze&&(ze=Ve()),ze&&"string"==typeof _e&&(_e=He("")));l&&l(e),tt=e},ot=R({},[...j,...B,...H]),lt=R({},[...V,...U]),st=function(e){let n=Te(e);n&&n.tagName||(n={namespaceURI:Un,tagName:"template"});const t=w(e.tagName),a=w(n.tagName);return!!Gn[e.namespaceURI]&&(e.namespaceURI===Hn?function(e,n,t){return n.namespaceURI===Vn?"svg"===e:n.namespaceURI===Bn?"svg"===e&&("annotation-xml"===t||Jn[t]):Boolean(ot[e])}(t,n,a):e.namespaceURI===Bn?function(e,n,t){return n.namespaceURI===Vn?"math"===e:n.namespaceURI===Hn?"math"===e&&Xn[t]:Boolean(lt[e])}(t,n,a):e.namespaceURI===Vn?function(e,n,t){return!(n.namespaceURI===Hn&&!Xn[t])&&!(n.namespaceURI===Bn&&!Jn[t])&&!lt[e]&&(Qn[e]||!ot[e])}(t,n,a):!("application/xhtml+xml"!==Zn||!Gn[e.namespaceURI]))},ct=function(e){g(a.removed,{element:e});try{Te(e).removeChild(e)}catch(n){if(Ee(e),!Te(e))throw I("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},dt=function(e,n,t){try{Ae(e,n)}catch(n){try{e.removeAttribute(t)}catch(e){}}},ut=function(e){mt(e);const n=Ce(e);if(n){const e=[];f(n,n=>{g(e,n)}),f(e,e=>{try{Ee(e)}catch(e){}})}const t=Pe(e);if(t)for(let n=t.length-1;n>=0;--n){const a=t[n],i=a&&a.name;"string"==typeof i&&dt(e,a,i)}},pt=function(e,n,t){if(!t)try{t=n.getAttributeNode(e)}catch(e){t=null}g(a.removed,{attribute:t||null,from:n});try{t?Ae(n,t):n.removeAttribute(e)}catch(t){try{n.removeAttribute(e)}catch(e){}}if("is"===e)if(Ln||Cn)try{ct(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},ft=function(e){const n=Pe(e);if(n)for(let t=n.length-1;t>=0;--t){const a=n[t],i=a&&a.name;"string"!=typeof i||cn[nt(i)]||dt(e,a,i)}},mt=function(e){const n=[e];for(;n.length>0;){const e=n.pop();Me(e)===de&&ft(e);const t=Ce(e);if(t)for(let e=t.length-1;e>=0;--e)n.push(t[e])}},ht=function(e,n){return!!yn&&("patchsrc"===e||"for"===e&&"label"!==n&&"output"!==n)},gt=function(e){let n=null,t=null;if(An)e="<remove></remove>"+e;else{const n=k(e,/^[\r\n\t ]+/);t=n&&n[0]}"application/xhtml+xml"===Zn&&Un===Vn&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=ze?He(e):e;if(Un===Vn)try{n=(new z).parseFromString(a,Zn)}catch(e){}if(!n||!n.documentElement){n=$e.createDocument(Un,"template",null);try{n.documentElement.innerHTML=$n?_e:a}catch(e){}}const r=n.body||n.documentElement;return e&&t&&r.insertBefore(i.createTextNode(t),r.childNodes[0]||null),Un===Vn?Ke.call(n,kn?"html":"body")[0]:kn?n.documentElement:r},bt=function(e){const n=Oe?Oe(e):e.ownerDocument;return Ge.call(n||e,e,O.SHOW_ELEMENT|O.SHOW_COMMENT|O.SHOW_TEXT|O.SHOW_PROCESSING_INSTRUCTION|O.SHOW_CDATA_SECTION,null)},vt=function(e){return e=S(e,Xe," "),e=S(e,Qe," "),e=S(e,Ze," ")},wt=function(e){var n;e.normalize();const t=Oe?Oe(e):e.ownerDocument,a=Ge.call(t||e,e,O.SHOW_TEXT|O.SHOW_COMMENT|O.SHOW_CDATA_SECTION|O.SHOW_PROCESSING_INSTRUCTION,null);let i=a.nextNode();for(;i;)i.data=vt(i.data),i=a.nextNode();const r=null===(n=e.querySelectorAll)||void 0===n?void 0:n.call(e,"template");r&&f(r,e=>{kt(e.content)&&wt(e.content)})},yt=function(e){const n=Ie?Ie(e):null;return"string"==typeof n&&("form"===nt(n)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==Pe(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==Ne(e)||e.childNodes!==Ce(e)))},kt=function(e){if(!Ne||"object"!=typeof e||null===e)return!1;try{return Ne(e)===he}catch(e){return!1}},St=function(e){if(!Ne||"object"!=typeof e||null===e)return!1;try{return"number"==typeof Ne(e)}catch(e){return!1}};function xt(e,n,t){0!==e.length&&f(e,e=>{e.call(a,n,t,tt)})}const Et=function(e,n){if(e instanceof RegExp)return N(e,n);if(e instanceof Function){for(var t=arguments.length,a=new Array(t>2?t-2:0),i=2;i<t;i++)a[i-2]=arguments[i];return Boolean(e(n,...a))}return!1},At=function(e,n,t,a){return 0===e.length?n:n===t||n===a?D(n):n},Lt=function(e,n){return e!==n&&null===Te(e)&&(On&&mt(e),!0)},Ct=function(e,n){if(xt(Ye.beforeSanitizeElements,e,null),Lt(e,n))return!0;if(yt(e))return ct(e),!0;const t=nt(Re(e));if(ln=At(Ye.uponSanitizeElement,ln,sn,xn),xt(Ye.uponSanitizeElement,e,{tagName:t,allowedTags:ln}),Lt(e,n))return!0;if(function(e,n){return!!(yn&&e.hasChildNodes()&&!St(e.firstElementChild)&&N(oe,e.textContent)&&N(oe,e.innerHTML))||!!(yn&&e.namespaceURI===Vn&&be[n]&&(St(e.firstElementChild)||"string"==typeof e.textContent&&N(ve[n],e.textContent)))||e.nodeType===pe||!(!yn||e.nodeType!==fe||!N(le,e.data))}(e,t))return ct(e),!0;if(pn[t]||!(mn.tagCheck instanceof Function&&mn.tagCheck(t))&&!ln[t]){const a=function(e,n,t){if(!pn[n]&&Pt(n)&&Et(un.tagNameCheck,n))return!1;if(In&&!Rn[n]){const n=Te(e),a=Ce(e);if(a&&n)for(let i=a.length-1;i>=0;--i){const r=e===t?xe(a[i],!0):a[i];n.insertBefore(r,Le(e))}}return ct(e),!0}(e,t,n);return!1===a&&xt(Ye.afterSanitizeElements,e,null),a}if(Me(e)===de&&!st(e))return ct(e),!0;if(("noscript"===t||"noembed"===t||"noframes"===t)&&N(se,e.innerHTML))return ct(e),!0;if(wn&&e.nodeType===ue){const n=vt(e.textContent);e.textContent!==n&&(g(a.removed,{element:e.cloneNode()}),e.textContent=n)}return xt(Ye.afterSanitizeElements,e,null),!1},Tt=function(e,n,t){if(fn[n])return!1;if(ht(n,e))return!1;if(qn&&("id"===n||"name"===n)&&(t in i||t in at))return!1;const a=cn[n]||mn.attributeCheck instanceof Function&&mn.attributeCheck(n,e);return!(!gn||!N(en,n))||(!(!hn||!N(nn,n))||(a?!!Fn[n]||(!!N(on,S(t,an,""))||(!("src"!==n&&"xlink:href"!==n&&"href"!==n||"script"===e||0!==x(t,"data:")||!Dn[e])||(!(!bn||N(tn,S(t,an,"")))||!t))):Pt(e)&&Et(un.tagNameCheck,e)&&Et(un.attributeNameCheck,n,e)||"is"===n&&un.allowCustomizedBuiltInElements&&Et(un.tagNameCheck,t)))},qt=R({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Pt=function(e){return!qt[w(e)]&&N(rn,e)},Nt=function(e,n,t,a){if(ze&&"object"==typeof ge&&"function"==typeof ge.getAttributeType&&!t)switch(ge.getAttributeType(e,n)){case"TrustedHTML":return He(a);case"TrustedScriptURL":return function(e){Be(),je++;try{return ze.createScriptURL(e)}finally{je--}}(a)}return a},It=function(e,n,t,a){try{return t?e.setAttributeNS(t,n,a):e.setAttribute(n,a),!yt(e)||(ct(e),!1)}catch(t){return pt(n,e),!1}},Ot=function(e){xt(Ye.beforeSanitizeAttributes,e,null);const n=e.attributes;if(!n||yt(e))return;cn=At(Ye.uponSanitizeAttribute,cn,dn,En);const t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:cn,forceKeepAttr:void 0};let i=n.length;const r=nt(e.nodeName);for(;i--;){const o=n[i],l=o.name,s=o.namespaceURI,c=o.value,d=nt(l),u=c;let p="value"===l?u:E(u),f=!1;if(t.attrName=d,t.attrValue=p,t.keepAttr=!0,t.forceKeepAttr=void 0,xt(Ye.uponSanitizeAttribute,e,t),p=t.attrValue,!Pn||"id"!==d&&"name"!==d||0===x(p,Nn)||(pt(l,e,o),p=Nn+p,f=!0),yn&&N(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p))pt(l,e,o);else if("attributename"===d&&k(p,"href"))pt(l,e,o);else if(!t.forceKeepAttr)if(t.keepAttr)if(vn||!N(ce,p))if(wn&&(p=vt(p)),Tt(r,d,p)){if(p=Nt(r,d,s,p),p!==u){It(e,l,s,p)&&f&&h(a.removed)}}else pt(l,e,o);else pt(l,e,o);else pt(l,e,o)}xt(Ye.afterSanitizeAttributes,e,null)},Mt=function(e){let n=null;const t=bt(e);for(xt(Ye.beforeSanitizeShadowDOM,e,null);n=t.nextNode();)if(xt(Ye.uponSanitizeShadowNode,n,null),Ct(n,e),Ot(n),kt(n.content)&&Mt(n.content),Me(n)===de){const e=qe(n);kt(e)&&(Rt(e),Mt(e))}xt(Ye.afterSanitizeShadowDOM,e,null)},Rt=function(e){const n=[{node:e,shadow:null}];for(;n.length>0;){const e=n.pop();if(e.shadow){Mt(e.shadow);continue}const t=e.node,a=Me(t)===de,i=Ce(t);if(i)for(let e=i.length-1;e>=0;--e)n.push({node:i[e],shadow:null});if(a){const e=Ie?Ie(t):null;if("string"==typeof e&&"template"===nt(e)){const e=t.content;kt(e)&&n.push({node:e,shadow:null})}}if(a){const e=qe(t);kt(e)&&n.push({node:null,shadow:e},{node:e,shadow:null})}}};return a.sanitize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null,i=null,o=null,l=null;if($n=!e,$n&&(e="\x3c!--\x3e"),"string"!=typeof e&&!St(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return A(e);case"boolean":return L(e);case"bigint":return C?C(e):"0";case"symbol":return T?T(e):"Symbol()";case"undefined":default:return P(e);case"function":case"object":{if(null===e)return P(e);const n=e,t=_(n,"toString");if("function"==typeof t){const e=t(n);return"string"==typeof e?e:P(e)}return P(e)}}}(e)))throw I("dirty is not a string, aborting");if(!a.isSupported)return e;Sn?(ln=xn,cn=En):rt(n),(Ye.uponSanitizeElement.length>0||Ye.uponSanitizeAttribute.length>0)&&(ln=D(ln)),Ye.uponSanitizeAttribute.length>0&&(cn=D(cn)),a.removed=[];const s=On&&"string"!=typeof e&&St(e);if(s){!function(e){if(!yn)return;const n=[e];for(;n.length>0;){const e=n.pop(),t=Me(e);if(t===pe||t===fe&&N(le,e.data)){try{Ee(e)}catch(e){}continue}if(t===de){const n=e,t=nt(Re(e));try{n.hasAttribute&&n.hasAttribute("patchsrc")&&n.removeAttribute("patchsrc"),n.hasAttribute&&n.hasAttribute("for")&&ht("for",t)&&n.removeAttribute("for")}catch(e){}}const a=Ce(e);if(a)for(let e=a.length-1;e>=0;--e)n.push(a[e])}}(e);const n=Re(e);if("string"==typeof n){const t=nt(n);if(!ln[t]||pn[t])throw ut(e),I("root node is forbidden and cannot be sanitized in-place")}if(yt(e))throw ut(e),I("root node is clobbered and cannot be sanitized in-place");try{Rt(e)}catch(n){throw ut(e),n}}else if(St(e))t=gt("\x3c!----\x3e"),i=t.ownerDocument.importNode(e,!0),i.nodeType===de&&"BODY"===i.nodeName||"HTML"===i.nodeName?t=i:t.appendChild(i),Rt(t);else{if(!Ln&&!wn&&!kn&&-1===e.indexOf("<"))return ze&&Tn?He(e):e;if(t=gt(e),!t)return Ln?null:Tn?_e:""}t&&An&&ct(t.firstChild);const c=s?e:t;try{const e=bt(c);for(;o=e.nextNode();)Ct(o,c),Ot(o),kt(o.content)&&Mt(o.content)}catch(n){throw s&&(ut(e),f(a.removed,e=>{e.element&&mt(e.element)})),n}if(s)return f(a.removed,e=>{e.element&&mt(e.element)}),wn&&wt(e),e;if(Ln){if(wn&&wt(t),Cn)for(l=We.call(t.ownerDocument);t.firstChild;)l.appendChild(t.firstChild);else l=t;return(cn.shadowroot||cn.shadowrootmode)&&(l=Je.call(r,l,!0)),l}let d=kn?t.outerHTML:t.innerHTML;return kn&&ln["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&N(ie,t.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+d),wn&&(d=vt(d)),ze&&Tn?He(d):d},a.setConfig=function(){rt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Sn=!0,xn=ln,En=cn},a.clearConfig=function(){tt=null,Sn=!1,xn=null,En=null,ze=De,_e=""},a.isValidAttribute=function(e,n,t){tt||rt({});const a=nt(e),i=nt(n);return Tt(a,i,t)},a.addHook=function(e,n){"function"==typeof n&&q(Ye,e)&&g(Ye[e],n)},a.removeHook=function(e,n){if(q(Ye,e)){if(void 0!==n){const t=m(Ye[e],n);return-1===t?void 0:b(Ye[e],t,1)[0]}return h(Ye[e])}},a.removeHooks=function(e){q(Ye,e)&&(Ye[e]=[])},a.removeAllHooks=function(){Ye={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},a}();window.DOMPurify=Se}};const n={};function t(a){const i=n[a];if(void 0!==i)return i.exports;const r=n[a]={exports:{}};return e[a](r,r.exports,t),r.exports}(()=>{"use strict";class e{constructor(e,n){this.baseUrl=e,this.token=n}async request(e,n={}){const t={Authorization:`Bearer ${this.token}`,"Accept-Language":r.lang,...n.headers};let a=n.body;a instanceof FormData||void 0===a||(t["Content-Type"]="application/json",a=JSON.stringify(a));const i=await fetch(`${this.baseUrl}${e}`,{...n,headers:t,body:a});let o;i.headers.get("content-type");try{o=await i.json()}catch{throw{success:!1,status:i.status,response:"Errore nel parsing della risposta"}}if(!o.success)throw o;return o}get(e){return this.request(e,{method:"GET"})}post(e,n){return this.request(e,{method:"POST",body:n})}put(e,n){return this.request(e,{method:"PUT",body:n})}delete(e){return this.request(e,{method:"DELETE"})}}const n=new WeakMap,a=new WeakSet;class i{static init(e=document){const n=e.ownerDocument||e;if(!a.has(n)){a.add(n),n.addEventListener("click",e=>{const n=e.target.closest?.("[data-wi-deferred-trigger]");if(!n||0!==e.button||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;const t=n.closest("[data-wi-deferred]");t&&"error"!==t.dataset.wiDeferredState&&(e.preventDefault(),this.load(t,{focus:!0}).catch(()=>{}))}),n.addEventListener("keydown",e=>{" "===e.key&&e.target.matches('a[data-wi-deferred-trigger][role="button"]')&&(e.preventDefault(),e.target.click())});new MutationObserver(e=>{for(const n of e)for(const e of n.addedNodes)1===e.nodeType&&this.init(e)}).observe(n.documentElement,{childList:!0,subtree:!0})}const t=[...e.querySelectorAll("[data-wi-deferred]")];e.matches?.("[data-wi-deferred]")&&t.unshift(e);for(const e of t){if(a.has(e))continue;if(a.add(e),e.querySelectorAll("a[data-wi-deferred-trigger]").forEach(e=>e.setAttribute("role","button")),"visible"!==e.dataset.wiDeferred||"undefined"==typeof IntersectionObserver)continue;const n=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),this.load(e).catch(()=>{}))});n.observe(e)}}static load(e,{focus:t=!1}={}){const a="string"==typeof e?document.querySelector(e):e;if(!a)return Promise.reject(new Error("Deferred content not found."));if(n.has(a))return n.get(a);const i=this.activate(a,t);return n.set(a,i),i}static async activate(e,n){const t=e.querySelector(":scope > template[data-wi-deferred-template]");if(!t)throw new Error("Deferred template not found.");const a=e.ownerDocument,i=a.createElement("div");i.className="wi-deferred-content",i.append(t.content.cloneNode(!0));const r=[...i.querySelectorAll("script")];r.forEach(e=>e.remove()),e.dataset.wiDeferredState="loading",e.setAttribute("aria-busy","true"),e.append(i);try{for(const e of r)await new Promise((n,t)=>{const r=a.createElement("script");for(const n of e.attributes)r.setAttribute(n.name,n.value);const o=e.src||"module"===e.type;o&&(r.async=!1,r.onload=n,r.onerror=()=>t(new Error("Deferred script failed to load."))),r.textContent=e.textContent,i.append(r),o||n()});if(e.querySelector(":scope > [data-wi-deferred-placeholder]")?.remove(),t.remove(),e.dataset.wiDeferredState="ready",n){const e=i.querySelector("iframe, button, a[href], [tabindex]")||i;e.hasAttribute("tabindex")||e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0})}return e.dispatchEvent(new CustomEvent("wi:deferred:ready",{bubbles:!0})),i}catch(n){throw i.remove(),e.dataset.wiDeferredState="error",e.querySelectorAll("[data-wi-deferred-trigger]").forEach(e=>{e.removeAttribute("role"),"BUTTON"===e.tagName&&(e.disabled=!0)}),e.dispatchEvent(new CustomEvent("wi:deferred:error",{bubbles:!0,detail:{error:n}})),n}finally{e.removeAttribute("aria-busy")}}}class r{static translations={};static defaultTranslations={};static get lang(){return document.documentElement.lang||"it"}static async init(e,n={}){this.translations=e,this.defaultTranslations=n}static get(e,n=[]){let t=this.getNestedValue(this.translations,e);return null==t&&(t=this.getNestedValue(this.defaultTranslations,e)),null==t?(console.error("Chiave di traduzione mancante: '"+e+"'"),e):(Array.isArray(n)&&n.length>0&&n.forEach((e,n)=>{t=t.replace(new RegExp("\\{"+n+"\\}","g"),e)}),t)}static getNestedValue(e,n){const t=n.split(".");let a=e;for(const e of t){if("object"!=typeof a||null===a||!(e in a))return null;a=a[e]}return a}}class o{constructor(e,n={}){const{infoElement:t=null,exportElement:a=null,mapId:i=null,travelMode:r="DRIVING",onError:o=e=>alert(e)}=n;this.mapElement=e,this.infoElement=t,this.exportElement=a,this.mapId=i,this.travelMode=r,this.onError=o,this.map=null,this.directionsService=null,this.directionsRenderer=null,this.autocomplete=null,this.mapClickListener=null,this.editingEnabled=!1,this.routeEnabled=!1,this.advancedMarkers=[],this.inputElement=null,this.waypoints=[],this.markers=[],this.mapType="hybrid",this.labelsVisible=!1}getTravelMode(){return google.maps.TravelMode[this.travelMode]??google.maps.TravelMode.DRIVING}initBaseMap(e={}){const n={center:{lat:20,lng:0},zoom:2,mapTypeId:this.mapType,mapTypeControl:!1,zoomControl:!0,streetViewControl:!1,fullscreenControl:!1,...e};return this.mapId&&(n.mapId=this.mapId),this.map=new google.maps.Map(this.mapElement,n),this.updateMapStyle(),this.map}initMap(){this.initBaseMap()}enableEditing(){this.map||this.initBaseMap(),this.editingEnabled=!0,this.mapClickListener&&this.mapClickListener.remove(),this.mapClickListener=this.map.addListener("click",e=>this.addChangeableMarker(e.latLng))}disableEditing(){this.mapClickListener&&(this.mapClickListener.remove(),this.mapClickListener=null),this.editingEnabled=!1}enableRoute(e={}){const{suppressMarkers:n=!0,draggable:t=!1,preserveViewport:a=!1,recalc:i=!0}=e;this.map||this.initBaseMap(),this.directionsService||(this.directionsService=new google.maps.DirectionsService),this.directionsRenderer?(this.directionsRenderer.setMap(this.map),this.directionsRenderer.setOptions({suppressMarkers:n,draggable:t,preserveViewport:a})):this.directionsRenderer=new google.maps.DirectionsRenderer({map:this.map,suppressMarkers:n,draggable:t,preserveViewport:a}),this.routeEnabled=!0,i&&this.waypoints.length>=2&&this.calcRoute()}disableRoute(){this.routeEnabled=!1,this.directionsRenderer&&(this.directionsRenderer.set("directions",null),this.directionsRenderer.setMap(null))}enableAutocomplete(e){this.inputElement=e,this.autocomplete=new google.maps.places.Autocomplete(this.inputElement),this.autocomplete.bindTo("bounds",this.map),this.autocomplete.addListener("place_changed",()=>{const e=this.autocomplete.getPlace();e.geometry&&e.geometry.location?(this.inputElement.value="",this.map.panTo(e.geometry.location),this.map.setZoom(15),this.addChangeableMarker(e.geometry.location)):this.onError("Luogo non trovato")})}initReadOnlyMap(e){if(!Array.isArray(e)||e.length<2)return void console.warn("Percorso non valido o troppo corto.");this.initBaseMap({center:e[0],zoom:14,disableDefaultUI:!0,mapTypeId:this.mapType}),this.disableEditing(),this.enableRoute({preserveViewport:!0,recalc:!1});const n=e[0],t=e[e.length-1],a=e.slice(1,-1).map(e=>({location:e,stopover:!0}));this.directionsService.route({origin:n,destination:t,waypoints:a,travelMode:this.getTravelMode()},(e,a)=>{if("OK"===a){this.directionsRenderer.setDirections(e);const a=new google.maps.LatLngBounds;if(e.routes[0].overview_path.forEach(e=>a.extend(e)),this.map.fitBounds(a),google.maps.marker&&google.maps.marker.AdvancedMarkerElement&&google.maps.marker.PinElement){const e=new google.maps.marker.PinElement({glyphText:"A"});new google.maps.marker.AdvancedMarkerElement({position:n,map:this.map,content:e.element,title:"A"});const a=new google.maps.marker.PinElement({glyphText:"B"});new google.maps.marker.AdvancedMarkerElement({position:t,map:this.map,content:a.element,title:"B"})}else new google.maps.Marker({position:n,map:this.map,label:"A"}),new google.maps.Marker({position:t,map:this.map,label:"B"})}else this.onError("Errore nel calcolo del percorso: "+a)})}setMapType(e){this.mapType=e,this.updateMapStyle()}toggleLabels(){this.labelsVisible=!this.labelsVisible,this.updateMapStyle()}updateMapStyle(){this.map.setMapTypeId(this.mapType),this.mapId||(this.labelsVisible?this.map.setOptions({styles:null}):this.map.setOptions({styles:[{featureType:"all",elementType:"labels",stylers:[{visibility:"off"}]}]}))}fitBounds(e={}){if(!this.map)return;const{includeRoute:n=!0,includeMarkers:t=!0,includeAdvancedMarkers:a=!0,extraPoints:i=[],padding:r=40,minZoom:o=null,maxZoom:l=null}=e,s=new google.maps.LatLngBounds;let c=!1;const d=e=>{if(!e)return null;if("function"==typeof e.lat&&"function"==typeof e.lng)return e;if("function"==typeof e.getPosition)return e.getPosition();if(e.position){const n=e.position;if("function"==typeof n.lat&&"function"==typeof n.lng)return n;if("number"==typeof n.lat&&"number"==typeof n.lng)return new google.maps.LatLng(n.lat,n.lng)}return e.location?d(e.location):"number"==typeof e.lat&&"number"==typeof e.lng?new google.maps.LatLng(e.lat,e.lng):null},u=e=>{const n=d(e);n&&(s.extend(n),c=!0)};if(n&&this.directionsRenderer&&this.directionsRenderer.getDirections){const e=this.directionsRenderer.getDirections(),n=e?.routes?.[0];n?.overview_path?.length?n.overview_path.forEach(e=>u(e)):this.waypoints.length&&this.waypoints.forEach(e=>u(e.location))}else n&&this.waypoints.length&&this.waypoints.forEach(e=>u(e.location));if(t&&this.markers.forEach(e=>u(e)),a&&this.advancedMarkers.forEach(e=>u(e)),Array.isArray(i)&&i.forEach(e=>u(e)),c&&(this.map.fitBounds(s,r),null!==o||null!==l)){const e=this.map.addListener("idle",()=>{const n=this.map.getZoom();null!==o&&n<o&&this.map.setZoom(o),null!==l&&n>l&&this.map.setZoom(l),e.remove()})}}addAdvancedMarker(e,n,t,a,i){const r="function"==typeof i?i(a):null;if(google.maps.marker&&google.maps.marker.AdvancedMarkerElement){const a=new google.maps.marker.AdvancedMarkerElement({map:this.map,content:r,position:new google.maps.LatLng(e,n),title:t});return this.advancedMarkers.push(a),a}console.warn("AdvancedMarkerElement non disponibile, uso Marker standard.");const o=new google.maps.Marker({position:new google.maps.LatLng(e,n),map:this.map,title:t});return this.advancedMarkers.push(o),o}addMarker(e,n){return new google.maps.Marker({position:e,map:this.map,label:n})}addChangeableMarker(e){const n=(this.markers.length+1).toString(),t=this.addMarker(e,n);t.setDraggable(!0),t.addListener("dragend",()=>{this.updateWaypoints(),this.routeEnabled&&this.calcRoute()}),t.addListener("dblclick",()=>{t.setMap(null),this.markers=this.markers.filter(e=>e!==t),this.updateWaypoints(),this.routeEnabled&&this.calcRoute()}),this.markers.push(t),this.updateWaypoints(),this.routeEnabled&&this.markers.length>=2&&this.calcRoute()}updateWaypoints(){this.waypoints=this.markers.map(e=>({location:e.getPosition(),stopover:!0})),this.markers.forEach((e,n)=>e.setLabel((n+1).toString())),this.saveRoute()}calcRoute(){if(!this.routeEnabled||!this.directionsService||!this.directionsRenderer)return;if(this.waypoints.length<2)return;const e=this.waypoints[0].location,n=this.waypoints[this.waypoints.length-1].location,t=this.waypoints.slice(1,-1);this.directionsService.route({origin:e,destination:n,waypoints:t,travelMode:this.getTravelMode()},(e,n)=>{if("OK"===n){this.directionsRenderer.setDirections(e),this.showRouteInfo(e.routes[0].legs);const n=new google.maps.LatLngBounds;e.routes[0].overview_path.forEach(e=>n.extend(e)),this.map.fitBounds(n)}else this.onError("Errore nel calcolo del percorso: "+n)})}showRouteInfo(e){let n=0,t=0;e.forEach(e=>{n+=e.distance.value,t+=e.duration.value}),this.infoElement&&(this.infoElement.innerHTML=`<strong>Distanza:</strong> ${(n/1e3).toFixed(2)} km<br><strong>Tempo stimato:</strong> ${this.formatTime(t)}`)}formatTime(e){const n=Math.floor(e/60),t=Math.floor(n/60),a=n%60;return t>0?`${t}h ${a}min`:`${a}min`}resetMap(){this.markers.forEach(e=>e.setMap(null)),this.markers=[],this.waypoints=[],this.directionsRenderer&&this.directionsRenderer.set("directions",null),this.infoElement&&(this.infoElement.innerHTML="")}saveRoute(){const e=this.markers.map(e=>({lat:e.getPosition().lat(),lng:e.getPosition().lng()}));this.exportElement&&(this.exportElement.value=JSON.stringify(e,null,2))}loadRouteFromJSON(e){this.resetMap();JSON.parse(e).forEach(e=>this.addChangeableMarker(new google.maps.LatLng(e.lat,e.lng)))}}t(6235);window.DeferredContent=i,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>i.init(),{once:!0}):i.init(),window.ApiClient=e,window.TranslationProvider=r,window.MapManager=o,window.MapNavigator=class{constructor(e){if(!(e&&e instanceof o))throw new Error("Devi passare una istanza valida di MapManager");this.mapManager=e,this.map=e.map,this.percorso=[],this.userMarker=null,this.watchId=null,this.previousPosition=null}init(e){this.stop(),this.percorso=e,this.mapManager.initReadOnlyMap(e),this.map=this.mapManager.map}start(){navigator.geolocation?this.watchId=navigator.geolocation.watchPosition(e=>this.updatePosition(e),e=>this.mapManager.onError("Errore nella geolocalizzazione: "+e.message),{enableHighAccuracy:!0,maximumAge:0,timeout:1e4}):this.mapManager.onError("Geolocalizzazione non supportata dal tuo browser.")}updatePosition(e){const n={lat:e.coords.latitude,lng:e.coords.longitude};let t=0;if(this.previousPosition&&(t=this.computeHeading(this.previousPosition,n)),this.userMarker){this.userMarker.setPosition(n);const e=this.userMarker.getIcon();e.rotation=t,this.userMarker.setIcon(e)}else this.map.setZoom(16),this.map.setCenter(n),this.userMarker=new google.maps.Marker({position:n,map:this.map,icon:{path:google.maps.SymbolPath.FORWARD_CLOSED_ARROW,scale:4,fillColor:"#007BFF",fillOpacity:1,strokeColor:"#fff",strokeWeight:1,rotation:t,anchor:new google.maps.Point(0,2)},title:"La tua posizione"});this.previousPosition=n}computeHeading(e,n){const t=e=>e*Math.PI/180,a=t(e.lat),i=t(e.lng),r=t(n.lat),o=t(n.lng)-i,l=Math.sin(o)*Math.cos(r),s=Math.cos(a)*Math.sin(r)-Math.sin(a)*Math.cos(r)*Math.cos(o),c=Math.atan2(l,s);return(180*c/Math.PI+360)%360}stop(){null!==this.watchId&&(navigator.geolocation.clearWatch(this.watchId),this.watchId=null),this.userMarker&&(this.userMarker.setMap(null),this.userMarker=null)}openInGoogleMaps(){if(!this.percorso||this.percorso.length<2)return void this.mapManager.onError("Percorso insufficiente per l'apertura in Google Maps.");const e=`${this.percorso[0].lat},${this.percorso[0].lng}`,n=`${this.percorso[this.percorso.length-1].lat},${this.percorso[this.percorso.length-1].lng}`,t=this.percorso.slice(1,-1).map(e=>`${e.lat},${e.lng}`).join("|"),a=new URL("https://www.google.com/maps/dir/");a.searchParams.set("api","1"),a.searchParams.set("origin",e),a.searchParams.set("destination",n),t&&a.searchParams.set("waypoints",t),a.searchParams.set("travelmode",{DRIVING:"driving",BICYCLING:"bicycling",WALKING:"walking",TRANSIT:"transit"}[this.mapManager.travelMode]??"driving"),window.open(a.toString(),"_blank")}},window.API_CLIENT=new e(pathSite+"/api",API_TOKEN),window.API_CLIENT_APP=window.API_CLIENT,window.__t=function(e,n=[]){return r.get(e,n)};t(767),t(8004),t(3286),t(550),t(9118),t(9260),t(4581),t(2347),t(9899),t(9111),t(7187),t(8258),t(734),t(5328),t(5545),t(4315),t(710),t(2981),t(2383),t(7806),t(2879),t(8109),t(6225),t(9196),t(555),t(9676),t(2730);const l=JSON.parse('{"123":63103,"alarm-fill":61697,"alarm":61698,"align-bottom":61699,"align-center":61700,"align-end":61701,"align-middle":61702,"align-start":61703,"align-top":61704,"alt":61705,"app-indicator":61706,"app":61707,"archive-fill":61708,"archive":61709,"arrow-90deg-down":61710,"arrow-90deg-left":61711,"arrow-90deg-right":61712,"arrow-90deg-up":61713,"arrow-bar-down":61714,"arrow-bar-left":61715,"arrow-bar-right":61716,"arrow-bar-up":61717,"arrow-clockwise":61718,"arrow-counterclockwise":61719,"arrow-down-circle-fill":61720,"arrow-down-circle":61721,"arrow-down-left-circle-fill":61722,"arrow-down-left-circle":61723,"arrow-down-left-square-fill":61724,"arrow-down-left-square":61725,"arrow-down-left":61726,"arrow-down-right-circle-fill":61727,"arrow-down-right-circle":61728,"arrow-down-right-square-fill":61729,"arrow-down-right-square":61730,"arrow-down-right":61731,"arrow-down-short":61732,"arrow-down-square-fill":61733,"arrow-down-square":61734,"arrow-down-up":61735,"arrow-down":61736,"arrow-left-circle-fill":61737,"arrow-left-circle":61738,"arrow-left-right":61739,"arrow-left-short":61740,"arrow-left-square-fill":61741,"arrow-left-square":61742,"arrow-left":61743,"arrow-repeat":61744,"arrow-return-left":61745,"arrow-return-right":61746,"arrow-right-circle-fill":61747,"arrow-right-circle":61748,"arrow-right-short":61749,"arrow-right-square-fill":61750,"arrow-right-square":61751,"arrow-right":61752,"arrow-up-circle-fill":61753,"arrow-up-circle":61754,"arrow-up-left-circle-fill":61755,"arrow-up-left-circle":61756,"arrow-up-left-square-fill":61757,"arrow-up-left-square":61758,"arrow-up-left":61759,"arrow-up-right-circle-fill":61760,"arrow-up-right-circle":61761,"arrow-up-right-square-fill":61762,"arrow-up-right-square":61763,"arrow-up-right":61764,"arrow-up-short":61765,"arrow-up-square-fill":61766,"arrow-up-square":61767,"arrow-up":61768,"arrows-angle-contract":61769,"arrows-angle-expand":61770,"arrows-collapse":61771,"arrows-expand":61772,"arrows-fullscreen":61773,"arrows-move":61774,"aspect-ratio-fill":61775,"aspect-ratio":61776,"asterisk":61777,"at":61778,"award-fill":61779,"award":61780,"back":61781,"backspace-fill":61782,"backspace-reverse-fill":61783,"backspace-reverse":61784,"backspace":61785,"badge-3d-fill":61786,"badge-3d":61787,"badge-4k-fill":61788,"badge-4k":61789,"badge-8k-fill":61790,"badge-8k":61791,"badge-ad-fill":61792,"badge-ad":61793,"badge-ar-fill":61794,"badge-ar":61795,"badge-cc-fill":61796,"badge-cc":61797,"badge-hd-fill":61798,"badge-hd":61799,"badge-tm-fill":61800,"badge-tm":61801,"badge-vo-fill":61802,"badge-vo":61803,"badge-vr-fill":61804,"badge-vr":61805,"badge-wc-fill":61806,"badge-wc":61807,"bag-check-fill":61808,"bag-check":61809,"bag-dash-fill":61810,"bag-dash":61811,"bag-fill":61812,"bag-plus-fill":61813,"bag-plus":61814,"bag-x-fill":61815,"bag-x":61816,"bag":61817,"bar-chart-fill":61818,"bar-chart-line-fill":61819,"bar-chart-line":61820,"bar-chart-steps":61821,"bar-chart":61822,"basket-fill":61823,"basket":61824,"basket2-fill":61825,"basket2":61826,"basket3-fill":61827,"basket3":61828,"battery-charging":61829,"battery-full":61830,"battery-half":61831,"battery":61832,"bell-fill":61833,"bell":61834,"bezier":61835,"bezier2":61836,"bicycle":61837,"binoculars-fill":61838,"binoculars":61839,"blockquote-left":61840,"blockquote-right":61841,"book-fill":61842,"book-half":61843,"book":61844,"bookmark-check-fill":61845,"bookmark-check":61846,"bookmark-dash-fill":61847,"bookmark-dash":61848,"bookmark-fill":61849,"bookmark-heart-fill":61850,"bookmark-heart":61851,"bookmark-plus-fill":61852,"bookmark-plus":61853,"bookmark-star-fill":61854,"bookmark-star":61855,"bookmark-x-fill":61856,"bookmark-x":61857,"bookmark":61858,"bookmarks-fill":61859,"bookmarks":61860,"bookshelf":61861,"bootstrap-fill":61862,"bootstrap-reboot":61863,"bootstrap":61864,"border-all":61865,"border-bottom":61866,"border-center":61867,"border-inner":61868,"border-left":61869,"border-middle":61870,"border-outer":61871,"border-right":61872,"border-style":61873,"border-top":61874,"border-width":61875,"border":61876,"bounding-box-circles":61877,"bounding-box":61878,"box-arrow-down-left":61879,"box-arrow-down-right":61880,"box-arrow-down":61881,"box-arrow-in-down-left":61882,"box-arrow-in-down-right":61883,"box-arrow-in-down":61884,"box-arrow-in-left":61885,"box-arrow-in-right":61886,"box-arrow-in-up-left":61887,"box-arrow-in-up-right":61888,"box-arrow-in-up":61889,"box-arrow-left":61890,"box-arrow-right":61891,"box-arrow-up-left":61892,"box-arrow-up-right":61893,"box-arrow-up":61894,"box-seam":61895,"box":61896,"braces":61897,"bricks":61898,"briefcase-fill":61899,"briefcase":61900,"brightness-alt-high-fill":61901,"brightness-alt-high":61902,"brightness-alt-low-fill":61903,"brightness-alt-low":61904,"brightness-high-fill":61905,"brightness-high":61906,"brightness-low-fill":61907,"brightness-low":61908,"broadcast-pin":61909,"broadcast":61910,"brush-fill":61911,"brush":61912,"bucket-fill":61913,"bucket":61914,"bug-fill":61915,"bug":61916,"building":61917,"bullseye":61918,"calculator-fill":61919,"calculator":61920,"calendar-check-fill":61921,"calendar-check":61922,"calendar-date-fill":61923,"calendar-date":61924,"calendar-day-fill":61925,"calendar-day":61926,"calendar-event-fill":61927,"calendar-event":61928,"calendar-fill":61929,"calendar-minus-fill":61930,"calendar-minus":61931,"calendar-month-fill":61932,"calendar-month":61933,"calendar-plus-fill":61934,"calendar-plus":61935,"calendar-range-fill":61936,"calendar-range":61937,"calendar-week-fill":61938,"calendar-week":61939,"calendar-x-fill":61940,"calendar-x":61941,"calendar":61942,"calendar2-check-fill":61943,"calendar2-check":61944,"calendar2-date-fill":61945,"calendar2-date":61946,"calendar2-day-fill":61947,"calendar2-day":61948,"calendar2-event-fill":61949,"calendar2-event":61950,"calendar2-fill":61951,"calendar2-minus-fill":61952,"calendar2-minus":61953,"calendar2-month-fill":61954,"calendar2-month":61955,"calendar2-plus-fill":61956,"calendar2-plus":61957,"calendar2-range-fill":61958,"calendar2-range":61959,"calendar2-week-fill":61960,"calendar2-week":61961,"calendar2-x-fill":61962,"calendar2-x":61963,"calendar2":61964,"calendar3-event-fill":61965,"calendar3-event":61966,"calendar3-fill":61967,"calendar3-range-fill":61968,"calendar3-range":61969,"calendar3-week-fill":61970,"calendar3-week":61971,"calendar3":61972,"calendar4-event":61973,"calendar4-range":61974,"calendar4-week":61975,"calendar4":61976,"camera-fill":61977,"camera-reels-fill":61978,"camera-reels":61979,"camera-video-fill":61980,"camera-video-off-fill":61981,"camera-video-off":61982,"camera-video":61983,"camera":61984,"camera2":61985,"capslock-fill":61986,"capslock":61987,"card-checklist":61988,"card-heading":61989,"card-image":61990,"card-list":61991,"card-text":61992,"caret-down-fill":61993,"caret-down-square-fill":61994,"caret-down-square":61995,"caret-down":61996,"caret-left-fill":61997,"caret-left-square-fill":61998,"caret-left-square":61999,"caret-left":62000,"caret-right-fill":62001,"caret-right-square-fill":62002,"caret-right-square":62003,"caret-right":62004,"caret-up-fill":62005,"caret-up-square-fill":62006,"caret-up-square":62007,"caret-up":62008,"cart-check-fill":62009,"cart-check":62010,"cart-dash-fill":62011,"cart-dash":62012,"cart-fill":62013,"cart-plus-fill":62014,"cart-plus":62015,"cart-x-fill":62016,"cart-x":62017,"cart":62018,"cart2":62019,"cart3":62020,"cart4":62021,"cash-stack":62022,"cash":62023,"cast":62024,"chat-dots-fill":62025,"chat-dots":62026,"chat-fill":62027,"chat-left-dots-fill":62028,"chat-left-dots":62029,"chat-left-fill":62030,"chat-left-quote-fill":62031,"chat-left-quote":62032,"chat-left-text-fill":62033,"chat-left-text":62034,"chat-left":62035,"chat-quote-fill":62036,"chat-quote":62037,"chat-right-dots-fill":62038,"chat-right-dots":62039,"chat-right-fill":62040,"chat-right-quote-fill":62041,"chat-right-quote":62042,"chat-right-text-fill":62043,"chat-right-text":62044,"chat-right":62045,"chat-square-dots-fill":62046,"chat-square-dots":62047,"chat-square-fill":62048,"chat-square-quote-fill":62049,"chat-square-quote":62050,"chat-square-text-fill":62051,"chat-square-text":62052,"chat-square":62053,"chat-text-fill":62054,"chat-text":62055,"chat":62056,"check-all":62057,"check-circle-fill":62058,"check-circle":62059,"check-square-fill":62060,"check-square":62061,"check":62062,"check2-all":62063,"check2-circle":62064,"check2-square":62065,"check2":62066,"chevron-bar-contract":62067,"chevron-bar-down":62068,"chevron-bar-expand":62069,"chevron-bar-left":62070,"chevron-bar-right":62071,"chevron-bar-up":62072,"chevron-compact-down":62073,"chevron-compact-left":62074,"chevron-compact-right":62075,"chevron-compact-up":62076,"chevron-contract":62077,"chevron-double-down":62078,"chevron-double-left":62079,"chevron-double-right":62080,"chevron-double-up":62081,"chevron-down":62082,"chevron-expand":62083,"chevron-left":62084,"chevron-right":62085,"chevron-up":62086,"circle-fill":62087,"circle-half":62088,"circle-square":62089,"circle":62090,"clipboard-check":62091,"clipboard-data":62092,"clipboard-minus":62093,"clipboard-plus":62094,"clipboard-x":62095,"clipboard":62096,"clock-fill":62097,"clock-history":62098,"clock":62099,"cloud-arrow-down-fill":62100,"cloud-arrow-down":62101,"cloud-arrow-up-fill":62102,"cloud-arrow-up":62103,"cloud-check-fill":62104,"cloud-check":62105,"cloud-download-fill":62106,"cloud-download":62107,"cloud-drizzle-fill":62108,"cloud-drizzle":62109,"cloud-fill":62110,"cloud-fog-fill":62111,"cloud-fog":62112,"cloud-fog2-fill":62113,"cloud-fog2":62114,"cloud-hail-fill":62115,"cloud-hail":62116,"cloud-haze-fill":62118,"cloud-haze":62119,"cloud-haze2-fill":62120,"cloud-lightning-fill":62121,"cloud-lightning-rain-fill":62122,"cloud-lightning-rain":62123,"cloud-lightning":62124,"cloud-minus-fill":62125,"cloud-minus":62126,"cloud-moon-fill":62127,"cloud-moon":62128,"cloud-plus-fill":62129,"cloud-plus":62130,"cloud-rain-fill":62131,"cloud-rain-heavy-fill":62132,"cloud-rain-heavy":62133,"cloud-rain":62134,"cloud-slash-fill":62135,"cloud-slash":62136,"cloud-sleet-fill":62137,"cloud-sleet":62138,"cloud-snow-fill":62139,"cloud-snow":62140,"cloud-sun-fill":62141,"cloud-sun":62142,"cloud-upload-fill":62143,"cloud-upload":62144,"cloud":62145,"clouds-fill":62146,"clouds":62147,"cloudy-fill":62148,"cloudy":62149,"code-slash":62150,"code-square":62151,"code":62152,"collection-fill":62153,"collection-play-fill":62154,"collection-play":62155,"collection":62156,"columns-gap":62157,"columns":62158,"command":62159,"compass-fill":62160,"compass":62161,"cone-striped":62162,"cone":62163,"controller":62164,"cpu-fill":62165,"cpu":62166,"credit-card-2-back-fill":62167,"credit-card-2-back":62168,"credit-card-2-front-fill":62169,"credit-card-2-front":62170,"credit-card-fill":62171,"credit-card":62172,"crop":62173,"cup-fill":62174,"cup-straw":62175,"cup":62176,"cursor-fill":62177,"cursor-text":62178,"cursor":62179,"dash-circle-dotted":62180,"dash-circle-fill":62181,"dash-circle":62182,"dash-square-dotted":62183,"dash-square-fill":62184,"dash-square":62185,"dash":62186,"diagram-2-fill":62187,"diagram-2":62188,"diagram-3-fill":62189,"diagram-3":62190,"diamond-fill":62191,"diamond-half":62192,"diamond":62193,"dice-1-fill":62194,"dice-1":62195,"dice-2-fill":62196,"dice-2":62197,"dice-3-fill":62198,"dice-3":62199,"dice-4-fill":62200,"dice-4":62201,"dice-5-fill":62202,"dice-5":62203,"dice-6-fill":62204,"dice-6":62205,"disc-fill":62206,"disc":62207,"discord":62208,"display-fill":62209,"display":62210,"distribute-horizontal":62211,"distribute-vertical":62212,"door-closed-fill":62213,"door-closed":62214,"door-open-fill":62215,"door-open":62216,"dot":62217,"download":62218,"droplet-fill":62219,"droplet-half":62220,"droplet":62221,"earbuds":62222,"easel-fill":62223,"easel":62224,"egg-fill":62225,"egg-fried":62226,"egg":62227,"eject-fill":62228,"eject":62229,"emoji-angry-fill":62230,"emoji-angry":62231,"emoji-dizzy-fill":62232,"emoji-dizzy":62233,"emoji-expressionless-fill":62234,"emoji-expressionless":62235,"emoji-frown-fill":62236,"emoji-frown":62237,"emoji-heart-eyes-fill":62238,"emoji-heart-eyes":62239,"emoji-laughing-fill":62240,"emoji-laughing":62241,"emoji-neutral-fill":62242,"emoji-neutral":62243,"emoji-smile-fill":62244,"emoji-smile-upside-down-fill":62245,"emoji-smile-upside-down":62246,"emoji-smile":62247,"emoji-sunglasses-fill":62248,"emoji-sunglasses":62249,"emoji-wink-fill":62250,"emoji-wink":62251,"envelope-fill":62252,"envelope-open-fill":62253,"envelope-open":62254,"envelope":62255,"eraser-fill":62256,"eraser":62257,"exclamation-circle-fill":62258,"exclamation-circle":62259,"exclamation-diamond-fill":62260,"exclamation-diamond":62261,"exclamation-octagon-fill":62262,"exclamation-octagon":62263,"exclamation-square-fill":62264,"exclamation-square":62265,"exclamation-triangle-fill":62266,"exclamation-triangle":62267,"exclamation":62268,"exclude":62269,"eye-fill":62270,"eye-slash-fill":62271,"eye-slash":62272,"eye":62273,"eyedropper":62274,"eyeglasses":62275,"facebook":62276,"file-arrow-down-fill":62277,"file-arrow-down":62278,"file-arrow-up-fill":62279,"file-arrow-up":62280,"file-bar-graph-fill":62281,"file-bar-graph":62282,"file-binary-fill":62283,"file-binary":62284,"file-break-fill":62285,"file-break":62286,"file-check-fill":62287,"file-check":62288,"file-code-fill":62289,"file-code":62290,"file-diff-fill":62291,"file-diff":62292,"file-earmark-arrow-down-fill":62293,"file-earmark-arrow-down":62294,"file-earmark-arrow-up-fill":62295,"file-earmark-arrow-up":62296,"file-earmark-bar-graph-fill":62297,"file-earmark-bar-graph":62298,"file-earmark-binary-fill":62299,"file-earmark-binary":62300,"file-earmark-break-fill":62301,"file-earmark-break":62302,"file-earmark-check-fill":62303,"file-earmark-check":62304,"file-earmark-code-fill":62305,"file-earmark-code":62306,"file-earmark-diff-fill":62307,"file-earmark-diff":62308,"file-earmark-easel-fill":62309,"file-earmark-easel":62310,"file-earmark-excel-fill":62311,"file-earmark-excel":62312,"file-earmark-fill":62313,"file-earmark-font-fill":62314,"file-earmark-font":62315,"file-earmark-image-fill":62316,"file-earmark-image":62317,"file-earmark-lock-fill":62318,"file-earmark-lock":62319,"file-earmark-lock2-fill":62320,"file-earmark-lock2":62321,"file-earmark-medical-fill":62322,"file-earmark-medical":62323,"file-earmark-minus-fill":62324,"file-earmark-minus":62325,"file-earmark-music-fill":62326,"file-earmark-music":62327,"file-earmark-person-fill":62328,"file-earmark-person":62329,"file-earmark-play-fill":62330,"file-earmark-play":62331,"file-earmark-plus-fill":62332,"file-earmark-plus":62333,"file-earmark-post-fill":62334,"file-earmark-post":62335,"file-earmark-ppt-fill":62336,"file-earmark-ppt":62337,"file-earmark-richtext-fill":62338,"file-earmark-richtext":62339,"file-earmark-ruled-fill":62340,"file-earmark-ruled":62341,"file-earmark-slides-fill":62342,"file-earmark-slides":62343,"file-earmark-spreadsheet-fill":62344,"file-earmark-spreadsheet":62345,"file-earmark-text-fill":62346,"file-earmark-text":62347,"file-earmark-word-fill":62348,"file-earmark-word":62349,"file-earmark-x-fill":62350,"file-earmark-x":62351,"file-earmark-zip-fill":62352,"file-earmark-zip":62353,"file-earmark":62354,"file-easel-fill":62355,"file-easel":62356,"file-excel-fill":62357,"file-excel":62358,"file-fill":62359,"file-font-fill":62360,"file-font":62361,"file-image-fill":62362,"file-image":62363,"file-lock-fill":62364,"file-lock":62365,"file-lock2-fill":62366,"file-lock2":62367,"file-medical-fill":62368,"file-medical":62369,"file-minus-fill":62370,"file-minus":62371,"file-music-fill":62372,"file-music":62373,"file-person-fill":62374,"file-person":62375,"file-play-fill":62376,"file-play":62377,"file-plus-fill":62378,"file-plus":62379,"file-post-fill":62380,"file-post":62381,"file-ppt-fill":62382,"file-ppt":62383,"file-richtext-fill":62384,"file-richtext":62385,"file-ruled-fill":62386,"file-ruled":62387,"file-slides-fill":62388,"file-slides":62389,"file-spreadsheet-fill":62390,"file-spreadsheet":62391,"file-text-fill":62392,"file-text":62393,"file-word-fill":62394,"file-word":62395,"file-x-fill":62396,"file-x":62397,"file-zip-fill":62398,"file-zip":62399,"file":62400,"files-alt":62401,"files":62402,"film":62403,"filter-circle-fill":62404,"filter-circle":62405,"filter-left":62406,"filter-right":62407,"filter-square-fill":62408,"filter-square":62409,"filter":62410,"flag-fill":62411,"flag":62412,"flower1":62413,"flower2":62414,"flower3":62415,"folder-check":62416,"folder-fill":62417,"folder-minus":62418,"folder-plus":62419,"folder-symlink-fill":62420,"folder-symlink":62421,"folder-x":62422,"folder":62423,"folder2-open":62424,"folder2":62425,"fonts":62426,"forward-fill":62427,"forward":62428,"front":62429,"fullscreen-exit":62430,"fullscreen":62431,"funnel-fill":62432,"funnel":62433,"gear-fill":62434,"gear-wide-connected":62435,"gear-wide":62436,"gear":62437,"gem":62438,"geo-alt-fill":62439,"geo-alt":62440,"geo-fill":62441,"geo":62442,"gift-fill":62443,"gift":62444,"github":62445,"globe":62446,"globe2":62447,"google":62448,"graph-down":62449,"graph-up":62450,"grid-1x2-fill":62451,"grid-1x2":62452,"grid-3x2-gap-fill":62453,"grid-3x2-gap":62454,"grid-3x2":62455,"grid-3x3-gap-fill":62456,"grid-3x3-gap":62457,"grid-3x3":62458,"grid-fill":62459,"grid":62460,"grip-horizontal":62461,"grip-vertical":62462,"hammer":62463,"hand-index-fill":62464,"hand-index-thumb-fill":62465,"hand-index-thumb":62466,"hand-index":62467,"hand-thumbs-down-fill":62468,"hand-thumbs-down":62469,"hand-thumbs-up-fill":62470,"hand-thumbs-up":62471,"handbag-fill":62472,"handbag":62473,"hash":62474,"hdd-fill":62475,"hdd-network-fill":62476,"hdd-network":62477,"hdd-rack-fill":62478,"hdd-rack":62479,"hdd-stack-fill":62480,"hdd-stack":62481,"hdd":62482,"headphones":62483,"headset":62484,"heart-fill":62485,"heart-half":62486,"heart":62487,"heptagon-fill":62488,"heptagon-half":62489,"heptagon":62490,"hexagon-fill":62491,"hexagon-half":62492,"hexagon":62493,"hourglass-bottom":62494,"hourglass-split":62495,"hourglass-top":62496,"hourglass":62497,"house-door-fill":62498,"house-door":62499,"house-fill":62500,"house":62501,"hr":62502,"hurricane":62503,"image-alt":62504,"image-fill":62505,"image":62506,"images":62507,"inbox-fill":62508,"inbox":62509,"inboxes-fill":62510,"inboxes":62511,"info-circle-fill":62512,"info-circle":62513,"info-square-fill":62514,"info-square":62515,"info":62516,"input-cursor-text":62517,"input-cursor":62518,"instagram":62519,"intersect":62520,"journal-album":62521,"journal-arrow-down":62522,"journal-arrow-up":62523,"journal-bookmark-fill":62524,"journal-bookmark":62525,"journal-check":62526,"journal-code":62527,"journal-medical":62528,"journal-minus":62529,"journal-plus":62530,"journal-richtext":62531,"journal-text":62532,"journal-x":62533,"journal":62534,"journals":62535,"joystick":62536,"justify-left":62537,"justify-right":62538,"justify":62539,"kanban-fill":62540,"kanban":62541,"key-fill":62542,"key":62543,"keyboard-fill":62544,"keyboard":62545,"ladder":62546,"lamp-fill":62547,"lamp":62548,"laptop-fill":62549,"laptop":62550,"layer-backward":62551,"layer-forward":62552,"layers-fill":62553,"layers-half":62554,"layers":62555,"layout-sidebar-inset-reverse":62556,"layout-sidebar-inset":62557,"layout-sidebar-reverse":62558,"layout-sidebar":62559,"layout-split":62560,"layout-text-sidebar-reverse":62561,"layout-text-sidebar":62562,"layout-text-window-reverse":62563,"layout-text-window":62564,"layout-three-columns":62565,"layout-wtf":62566,"life-preserver":62567,"lightbulb-fill":62568,"lightbulb-off-fill":62569,"lightbulb-off":62570,"lightbulb":62571,"lightning-charge-fill":62572,"lightning-charge":62573,"lightning-fill":62574,"lightning":62575,"link-45deg":62576,"link":62577,"linkedin":62578,"list-check":62579,"list-nested":62580,"list-ol":62581,"list-stars":62582,"list-task":62583,"list-ul":62584,"list":62585,"lock-fill":62586,"lock":62587,"mailbox":62588,"mailbox2":62589,"map-fill":62590,"map":62591,"markdown-fill":62592,"markdown":62593,"mask":62594,"megaphone-fill":62595,"megaphone":62596,"menu-app-fill":62597,"menu-app":62598,"menu-button-fill":62599,"menu-button-wide-fill":62600,"menu-button-wide":62601,"menu-button":62602,"menu-down":62603,"menu-up":62604,"mic-fill":62605,"mic-mute-fill":62606,"mic-mute":62607,"mic":62608,"minecart-loaded":62609,"minecart":62610,"moisture":62611,"moon-fill":62612,"moon-stars-fill":62613,"moon-stars":62614,"moon":62615,"mouse-fill":62616,"mouse":62617,"mouse2-fill":62618,"mouse2":62619,"mouse3-fill":62620,"mouse3":62621,"music-note-beamed":62622,"music-note-list":62623,"music-note":62624,"music-player-fill":62625,"music-player":62626,"newspaper":62627,"node-minus-fill":62628,"node-minus":62629,"node-plus-fill":62630,"node-plus":62631,"nut-fill":62632,"nut":62633,"octagon-fill":62634,"octagon-half":62635,"octagon":62636,"option":62637,"outlet":62638,"paint-bucket":62639,"palette-fill":62640,"palette":62641,"palette2":62642,"paperclip":62643,"paragraph":62644,"patch-check-fill":62645,"patch-check":62646,"patch-exclamation-fill":62647,"patch-exclamation":62648,"patch-minus-fill":62649,"patch-minus":62650,"patch-plus-fill":62651,"patch-plus":62652,"patch-question-fill":62653,"patch-question":62654,"pause-btn-fill":62655,"pause-btn":62656,"pause-circle-fill":62657,"pause-circle":62658,"pause-fill":62659,"pause":62660,"peace-fill":62661,"peace":62662,"pen-fill":62663,"pen":62664,"pencil-fill":62665,"pencil-square":62666,"pencil":62667,"pentagon-fill":62668,"pentagon-half":62669,"pentagon":62670,"people-fill":62671,"people":62672,"percent":62673,"person-badge-fill":62674,"person-badge":62675,"person-bounding-box":62676,"person-check-fill":62677,"person-check":62678,"person-circle":62679,"person-dash-fill":62680,"person-dash":62681,"person-fill":62682,"person-lines-fill":62683,"person-plus-fill":62684,"person-plus":62685,"person-square":62686,"person-x-fill":62687,"person-x":62688,"person":62689,"phone-fill":62690,"phone-landscape-fill":62691,"phone-landscape":62692,"phone-vibrate-fill":62693,"phone-vibrate":62694,"phone":62695,"pie-chart-fill":62696,"pie-chart":62697,"pin-angle-fill":62698,"pin-angle":62699,"pin-fill":62700,"pin":62701,"pip-fill":62702,"pip":62703,"play-btn-fill":62704,"play-btn":62705,"play-circle-fill":62706,"play-circle":62707,"play-fill":62708,"play":62709,"plug-fill":62710,"plug":62711,"plus-circle-dotted":62712,"plus-circle-fill":62713,"plus-circle":62714,"plus-square-dotted":62715,"plus-square-fill":62716,"plus-square":62717,"plus":62718,"power":62719,"printer-fill":62720,"printer":62721,"puzzle-fill":62722,"puzzle":62723,"question-circle-fill":62724,"question-circle":62725,"question-diamond-fill":62726,"question-diamond":62727,"question-octagon-fill":62728,"question-octagon":62729,"question-square-fill":62730,"question-square":62731,"question":62732,"rainbow":62733,"receipt-cutoff":62734,"receipt":62735,"reception-0":62736,"reception-1":62737,"reception-2":62738,"reception-3":62739,"reception-4":62740,"record-btn-fill":62741,"record-btn":62742,"record-circle-fill":62743,"record-circle":62744,"record-fill":62745,"record":62746,"record2-fill":62747,"record2":62748,"reply-all-fill":62749,"reply-all":62750,"reply-fill":62751,"reply":62752,"rss-fill":62753,"rss":62754,"rulers":62755,"save-fill":62756,"save":62757,"save2-fill":62758,"save2":62759,"scissors":62760,"screwdriver":62761,"search":62762,"segmented-nav":62763,"server":62764,"share-fill":62765,"share":62766,"shield-check":62767,"shield-exclamation":62768,"shield-fill-check":62769,"shield-fill-exclamation":62770,"shield-fill-minus":62771,"shield-fill-plus":62772,"shield-fill-x":62773,"shield-fill":62774,"shield-lock-fill":62775,"shield-lock":62776,"shield-minus":62777,"shield-plus":62778,"shield-shaded":62779,"shield-slash-fill":62780,"shield-slash":62781,"shield-x":62782,"shield":62783,"shift-fill":62784,"shift":62785,"shop-window":62786,"shop":62787,"shuffle":62788,"signpost-2-fill":62789,"signpost-2":62790,"signpost-fill":62791,"signpost-split-fill":62792,"signpost-split":62793,"signpost":62794,"sim-fill":62795,"sim":62796,"skip-backward-btn-fill":62797,"skip-backward-btn":62798,"skip-backward-circle-fill":62799,"skip-backward-circle":62800,"skip-backward-fill":62801,"skip-backward":62802,"skip-end-btn-fill":62803,"skip-end-btn":62804,"skip-end-circle-fill":62805,"skip-end-circle":62806,"skip-end-fill":62807,"skip-end":62808,"skip-forward-btn-fill":62809,"skip-forward-btn":62810,"skip-forward-circle-fill":62811,"skip-forward-circle":62812,"skip-forward-fill":62813,"skip-forward":62814,"skip-start-btn-fill":62815,"skip-start-btn":62816,"skip-start-circle-fill":62817,"skip-start-circle":62818,"skip-start-fill":62819,"skip-start":62820,"slack":62821,"slash-circle-fill":62822,"slash-circle":62823,"slash-square-fill":62824,"slash-square":62825,"slash":62826,"sliders":62827,"smartwatch":62828,"snow":62829,"snow2":62830,"snow3":62831,"sort-alpha-down-alt":62832,"sort-alpha-down":62833,"sort-alpha-up-alt":62834,"sort-alpha-up":62835,"sort-down-alt":62836,"sort-down":62837,"sort-numeric-down-alt":62838,"sort-numeric-down":62839,"sort-numeric-up-alt":62840,"sort-numeric-up":62841,"sort-up-alt":62842,"sort-up":62843,"soundwave":62844,"speaker-fill":62845,"speaker":62846,"speedometer":62847,"speedometer2":62848,"spellcheck":62849,"square-fill":62850,"square-half":62851,"square":62852,"stack":62853,"star-fill":62854,"star-half":62855,"star":62856,"stars":62857,"stickies-fill":62858,"stickies":62859,"sticky-fill":62860,"sticky":62861,"stop-btn-fill":62862,"stop-btn":62863,"stop-circle-fill":62864,"stop-circle":62865,"stop-fill":62866,"stop":62867,"stoplights-fill":62868,"stoplights":62869,"stopwatch-fill":62870,"stopwatch":62871,"subtract":62872,"suit-club-fill":62873,"suit-club":62874,"suit-diamond-fill":62875,"suit-diamond":62876,"suit-heart-fill":62877,"suit-heart":62878,"suit-spade-fill":62879,"suit-spade":62880,"sun-fill":62881,"sun":62882,"sunglasses":62883,"sunrise-fill":62884,"sunrise":62885,"sunset-fill":62886,"sunset":62887,"symmetry-horizontal":62888,"symmetry-vertical":62889,"table":62890,"tablet-fill":62891,"tablet-landscape-fill":62892,"tablet-landscape":62893,"tablet":62894,"tag-fill":62895,"tag":62896,"tags-fill":62897,"tags":62898,"telegram":62899,"telephone-fill":62900,"telephone-forward-fill":62901,"telephone-forward":62902,"telephone-inbound-fill":62903,"telephone-inbound":62904,"telephone-minus-fill":62905,"telephone-minus":62906,"telephone-outbound-fill":62907,"telephone-outbound":62908,"telephone-plus-fill":62909,"telephone-plus":62910,"telephone-x-fill":62911,"telephone-x":62912,"telephone":62913,"terminal-fill":62914,"terminal":62915,"text-center":62916,"text-indent-left":62917,"text-indent-right":62918,"text-left":62919,"text-paragraph":62920,"text-right":62921,"textarea-resize":62922,"textarea-t":62923,"textarea":62924,"thermometer-half":62925,"thermometer-high":62926,"thermometer-low":62927,"thermometer-snow":62928,"thermometer-sun":62929,"thermometer":62930,"three-dots-vertical":62931,"three-dots":62932,"toggle-off":62933,"toggle-on":62934,"toggle2-off":62935,"toggle2-on":62936,"toggles":62937,"toggles2":62938,"tools":62939,"tornado":62940,"trash-fill":62941,"trash":62942,"trash2-fill":62943,"trash2":62944,"tree-fill":62945,"tree":62946,"triangle-fill":62947,"triangle-half":62948,"triangle":62949,"trophy-fill":62950,"trophy":62951,"tropical-storm":62952,"truck-flatbed":62953,"truck":62954,"tsunami":62955,"tv-fill":62956,"tv":62957,"twitch":62958,"twitter":62959,"type-bold":62960,"type-h1":62961,"type-h2":62962,"type-h3":62963,"type-italic":62964,"type-strikethrough":62965,"type-underline":62966,"type":62967,"ui-checks-grid":62968,"ui-checks":62969,"ui-radios-grid":62970,"ui-radios":62971,"umbrella-fill":62972,"umbrella":62973,"union":62974,"unlock-fill":62975,"unlock":62976,"upc-scan":62977,"upc":62978,"upload":62979,"vector-pen":62980,"view-list":62981,"view-stacked":62982,"vinyl-fill":62983,"vinyl":62984,"voicemail":62985,"volume-down-fill":62986,"volume-down":62987,"volume-mute-fill":62988,"volume-mute":62989,"volume-off-fill":62990,"volume-off":62991,"volume-up-fill":62992,"volume-up":62993,"vr":62994,"wallet-fill":62995,"wallet":62996,"wallet2":62997,"watch":62998,"water":62999,"whatsapp":63000,"wifi-1":63001,"wifi-2":63002,"wifi-off":63003,"wifi":63004,"wind":63005,"window-dock":63006,"window-sidebar":63007,"window":63008,"wrench":63009,"x-circle-fill":63010,"x-circle":63011,"x-diamond-fill":63012,"x-diamond":63013,"x-octagon-fill":63014,"x-octagon":63015,"x-square-fill":63016,"x-square":63017,"x":63018,"youtube":63019,"zoom-in":63020,"zoom-out":63021,"bank":63022,"bank2":63023,"bell-slash-fill":63024,"bell-slash":63025,"cash-coin":63026,"check-lg":63027,"coin":63028,"currency-bitcoin":63029,"currency-dollar":63030,"currency-euro":63031,"currency-exchange":63032,"currency-pound":63033,"currency-yen":63034,"dash-lg":63035,"exclamation-lg":63036,"file-earmark-pdf-fill":63037,"file-earmark-pdf":63038,"file-pdf-fill":63039,"file-pdf":63040,"gender-ambiguous":63041,"gender-female":63042,"gender-male":63043,"gender-trans":63044,"headset-vr":63045,"info-lg":63046,"mastodon":63047,"messenger":63048,"piggy-bank-fill":63049,"piggy-bank":63050,"pin-map-fill":63051,"pin-map":63052,"plus-lg":63053,"question-lg":63054,"recycle":63055,"reddit":63056,"safe-fill":63057,"safe2-fill":63058,"safe2":63059,"sd-card-fill":63060,"sd-card":63061,"skype":63062,"slash-lg":63063,"translate":63064,"x-lg":63065,"safe":63066,"apple":63067,"microsoft":63069,"windows":63070,"behance":63068,"dribbble":63071,"line":63072,"medium":63073,"paypal":63074,"pinterest":63075,"signal":63076,"snapchat":63077,"spotify":63078,"stack-overflow":63079,"strava":63080,"wordpress":63081,"vimeo":63082,"activity":63083,"easel2-fill":63084,"easel2":63085,"easel3-fill":63086,"easel3":63087,"fan":63088,"fingerprint":63089,"graph-down-arrow":63090,"graph-up-arrow":63091,"hypnotize":63092,"magic":63093,"person-rolodex":63094,"person-video":63095,"person-video2":63096,"person-video3":63097,"person-workspace":63098,"radioactive":63099,"webcam-fill":63100,"webcam":63101,"yin-yang":63102,"bandaid-fill":63104,"bandaid":63105,"bluetooth":63106,"body-text":63107,"boombox":63108,"boxes":63109,"dpad-fill":63110,"dpad":63111,"ear-fill":63112,"ear":63113,"envelope-check-fill":63115,"envelope-check":63116,"envelope-dash-fill":63118,"envelope-dash":63119,"envelope-exclamation-fill":63121,"envelope-exclamation":63122,"envelope-plus-fill":63123,"envelope-plus":63124,"envelope-slash-fill":63126,"envelope-slash":63127,"envelope-x-fill":63129,"envelope-x":63130,"explicit-fill":63131,"explicit":63132,"git":63133,"infinity":63134,"list-columns-reverse":63135,"list-columns":63136,"meta":63137,"nintendo-switch":63140,"pc-display-horizontal":63141,"pc-display":63142,"pc-horizontal":63143,"pc":63144,"playstation":63145,"plus-slash-minus":63146,"projector-fill":63147,"projector":63148,"qr-code-scan":63149,"qr-code":63150,"quora":63151,"quote":63152,"robot":63153,"send-check-fill":63154,"send-check":63155,"send-dash-fill":63156,"send-dash":63157,"send-exclamation-fill":63159,"send-exclamation":63160,"send-fill":63161,"send-plus-fill":63162,"send-plus":63163,"send-slash-fill":63164,"send-slash":63165,"send-x-fill":63166,"send-x":63167,"send":63168,"steam":63169,"terminal-dash":63171,"terminal-plus":63172,"terminal-split":63173,"ticket-detailed-fill":63174,"ticket-detailed":63175,"ticket-fill":63176,"ticket-perforated-fill":63177,"ticket-perforated":63178,"ticket":63179,"tiktok":63180,"window-dash":63181,"window-desktop":63182,"window-fullscreen":63183,"window-plus":63184,"window-split":63185,"window-stack":63186,"window-x":63187,"xbox":63188,"ethernet":63189,"hdmi-fill":63190,"hdmi":63191,"usb-c-fill":63192,"usb-c":63193,"usb-fill":63194,"usb-plug-fill":63195,"usb-plug":63196,"usb-symbol":63197,"usb":63198,"boombox-fill":63199,"displayport":63201,"gpu-card":63202,"memory":63203,"modem-fill":63204,"modem":63205,"motherboard-fill":63206,"motherboard":63207,"optical-audio-fill":63208,"optical-audio":63209,"pci-card":63210,"router-fill":63211,"router":63212,"thunderbolt-fill":63215,"thunderbolt":63216,"usb-drive-fill":63217,"usb-drive":63218,"usb-micro-fill":63219,"usb-micro":63220,"usb-mini-fill":63221,"usb-mini":63222,"cloud-haze2":63223,"device-hdd-fill":63224,"device-hdd":63225,"device-ssd-fill":63226,"device-ssd":63227,"displayport-fill":63228,"mortarboard-fill":63229,"mortarboard":63230,"terminal-x":63231,"arrow-through-heart-fill":63232,"arrow-through-heart":63233,"badge-sd-fill":63234,"badge-sd":63235,"bag-heart-fill":63236,"bag-heart":63237,"balloon-fill":63238,"balloon-heart-fill":63239,"balloon-heart":63240,"balloon":63241,"box2-fill":63242,"box2-heart-fill":63243,"box2-heart":63244,"box2":63245,"braces-asterisk":63246,"calendar-heart-fill":63247,"calendar-heart":63248,"calendar2-heart-fill":63249,"calendar2-heart":63250,"chat-heart-fill":63251,"chat-heart":63252,"chat-left-heart-fill":63253,"chat-left-heart":63254,"chat-right-heart-fill":63255,"chat-right-heart":63256,"chat-square-heart-fill":63257,"chat-square-heart":63258,"clipboard-check-fill":63259,"clipboard-data-fill":63260,"clipboard-fill":63261,"clipboard-heart-fill":63262,"clipboard-heart":63263,"clipboard-minus-fill":63264,"clipboard-plus-fill":63265,"clipboard-pulse":63266,"clipboard-x-fill":63267,"clipboard2-check-fill":63268,"clipboard2-check":63269,"clipboard2-data-fill":63270,"clipboard2-data":63271,"clipboard2-fill":63272,"clipboard2-heart-fill":63273,"clipboard2-heart":63274,"clipboard2-minus-fill":63275,"clipboard2-minus":63276,"clipboard2-plus-fill":63277,"clipboard2-plus":63278,"clipboard2-pulse-fill":63279,"clipboard2-pulse":63280,"clipboard2-x-fill":63281,"clipboard2-x":63282,"clipboard2":63283,"emoji-kiss-fill":63284,"emoji-kiss":63285,"envelope-heart-fill":63286,"envelope-heart":63287,"envelope-open-heart-fill":63288,"envelope-open-heart":63289,"envelope-paper-fill":63290,"envelope-paper-heart-fill":63291,"envelope-paper-heart":63292,"envelope-paper":63293,"filetype-aac":63294,"filetype-ai":63295,"filetype-bmp":63296,"filetype-cs":63297,"filetype-css":63298,"filetype-csv":63299,"filetype-doc":63300,"filetype-docx":63301,"filetype-exe":63302,"filetype-gif":63303,"filetype-heic":63304,"filetype-html":63305,"filetype-java":63306,"filetype-jpg":63307,"filetype-js":63308,"filetype-jsx":63309,"filetype-key":63310,"filetype-m4p":63311,"filetype-md":63312,"filetype-mdx":63313,"filetype-mov":63314,"filetype-mp3":63315,"filetype-mp4":63316,"filetype-otf":63317,"filetype-pdf":63318,"filetype-php":63319,"filetype-png":63320,"filetype-ppt":63322,"filetype-psd":63323,"filetype-py":63324,"filetype-raw":63325,"filetype-rb":63326,"filetype-sass":63327,"filetype-scss":63328,"filetype-sh":63329,"filetype-svg":63330,"filetype-tiff":63331,"filetype-tsx":63332,"filetype-ttf":63333,"filetype-txt":63334,"filetype-wav":63335,"filetype-woff":63336,"filetype-xls":63338,"filetype-xml":63339,"filetype-yml":63340,"heart-arrow":63341,"heart-pulse-fill":63342,"heart-pulse":63343,"heartbreak-fill":63344,"heartbreak":63345,"hearts":63346,"hospital-fill":63347,"hospital":63348,"house-heart-fill":63349,"house-heart":63350,"incognito":63351,"magnet-fill":63352,"magnet":63353,"person-heart":63354,"person-hearts":63355,"phone-flip":63356,"plugin":63357,"postage-fill":63358,"postage-heart-fill":63359,"postage-heart":63360,"postage":63361,"postcard-fill":63362,"postcard-heart-fill":63363,"postcard-heart":63364,"postcard":63365,"search-heart-fill":63366,"search-heart":63367,"sliders2-vertical":63368,"sliders2":63369,"trash3-fill":63370,"trash3":63371,"valentine":63372,"valentine2":63373,"wrench-adjustable-circle-fill":63374,"wrench-adjustable-circle":63375,"wrench-adjustable":63376,"filetype-json":63377,"filetype-pptx":63378,"filetype-xlsx":63379,"1-circle-fill":63382,"1-circle":63383,"1-square-fill":63384,"1-square":63385,"2-circle-fill":63388,"2-circle":63389,"2-square-fill":63390,"2-square":63391,"3-circle-fill":63394,"3-circle":63395,"3-square-fill":63396,"3-square":63397,"4-circle-fill":63400,"4-circle":63401,"4-square-fill":63402,"4-square":63403,"5-circle-fill":63406,"5-circle":63407,"5-square-fill":63408,"5-square":63409,"6-circle-fill":63412,"6-circle":63413,"6-square-fill":63414,"6-square":63415,"7-circle-fill":63418,"7-circle":63419,"7-square-fill":63420,"7-square":63421,"8-circle-fill":63424,"8-circle":63425,"8-square-fill":63426,"8-square":63427,"9-circle-fill":63430,"9-circle":63431,"9-square-fill":63432,"9-square":63433,"airplane-engines-fill":63434,"airplane-engines":63435,"airplane-fill":63436,"airplane":63437,"alexa":63438,"alipay":63439,"android":63440,"android2":63441,"box-fill":63442,"box-seam-fill":63443,"browser-chrome":63444,"browser-edge":63445,"browser-firefox":63446,"browser-safari":63447,"c-circle-fill":63450,"c-circle":63451,"c-square-fill":63452,"c-square":63453,"capsule-pill":63454,"capsule":63455,"car-front-fill":63456,"car-front":63457,"cassette-fill":63458,"cassette":63459,"cc-circle-fill":63462,"cc-circle":63463,"cc-square-fill":63464,"cc-square":63465,"cup-hot-fill":63466,"cup-hot":63467,"currency-rupee":63468,"dropbox":63469,"escape":63470,"fast-forward-btn-fill":63471,"fast-forward-btn":63472,"fast-forward-circle-fill":63473,"fast-forward-circle":63474,"fast-forward-fill":63475,"fast-forward":63476,"filetype-sql":63477,"fire":63478,"google-play":63479,"h-circle-fill":63482,"h-circle":63483,"h-square-fill":63484,"h-square":63485,"indent":63486,"lungs-fill":63487,"lungs":63488,"microsoft-teams":63489,"p-circle-fill":63492,"p-circle":63493,"p-square-fill":63494,"p-square":63495,"pass-fill":63496,"pass":63497,"prescription":63498,"prescription2":63499,"r-circle-fill":63502,"r-circle":63503,"r-square-fill":63504,"r-square":63505,"repeat-1":63506,"repeat":63507,"rewind-btn-fill":63508,"rewind-btn":63509,"rewind-circle-fill":63510,"rewind-circle":63511,"rewind-fill":63512,"rewind":63513,"train-freight-front-fill":63514,"train-freight-front":63515,"train-front-fill":63516,"train-front":63517,"train-lightrail-front-fill":63518,"train-lightrail-front":63519,"truck-front-fill":63520,"truck-front":63521,"ubuntu":63522,"unindent":63523,"unity":63524,"universal-access-circle":63525,"universal-access":63526,"virus":63527,"virus2":63528,"wechat":63529,"yelp":63530,"sign-stop-fill":63531,"sign-stop-lights-fill":63532,"sign-stop-lights":63533,"sign-stop":63534,"sign-turn-left-fill":63535,"sign-turn-left":63536,"sign-turn-right-fill":63537,"sign-turn-right":63538,"sign-turn-slight-left-fill":63539,"sign-turn-slight-left":63540,"sign-turn-slight-right-fill":63541,"sign-turn-slight-right":63542,"sign-yield-fill":63543,"sign-yield":63544,"ev-station-fill":63545,"ev-station":63546,"fuel-pump-diesel-fill":63547,"fuel-pump-diesel":63548,"fuel-pump-fill":63549,"fuel-pump":63550,"0-circle-fill":63551,"0-circle":63552,"0-square-fill":63553,"0-square":63554,"rocket-fill":63555,"rocket-takeoff-fill":63556,"rocket-takeoff":63557,"rocket":63558,"stripe":63559,"subscript":63560,"superscript":63561,"trello":63562,"envelope-at-fill":63563,"envelope-at":63564,"regex":63565,"text-wrap":63566,"sign-dead-end-fill":63567,"sign-dead-end":63568,"sign-do-not-enter-fill":63569,"sign-do-not-enter":63570,"sign-intersection-fill":63571,"sign-intersection-side-fill":63572,"sign-intersection-side":63573,"sign-intersection-t-fill":63574,"sign-intersection-t":63575,"sign-intersection-y-fill":63576,"sign-intersection-y":63577,"sign-intersection":63578,"sign-merge-left-fill":63579,"sign-merge-left":63580,"sign-merge-right-fill":63581,"sign-merge-right":63582,"sign-no-left-turn-fill":63583,"sign-no-left-turn":63584,"sign-no-parking-fill":63585,"sign-no-parking":63586,"sign-no-right-turn-fill":63587,"sign-no-right-turn":63588,"sign-railroad-fill":63589,"sign-railroad":63590,"building-add":63591,"building-check":63592,"building-dash":63593,"building-down":63594,"building-exclamation":63595,"building-fill-add":63596,"building-fill-check":63597,"building-fill-dash":63598,"building-fill-down":63599,"building-fill-exclamation":63600,"building-fill-gear":63601,"building-fill-lock":63602,"building-fill-slash":63603,"building-fill-up":63604,"building-fill-x":63605,"building-fill":63606,"building-gear":63607,"building-lock":63608,"building-slash":63609,"building-up":63610,"building-x":63611,"buildings-fill":63612,"buildings":63613,"bus-front-fill":63614,"bus-front":63615,"ev-front-fill":63616,"ev-front":63617,"globe-americas":63618,"globe-asia-australia":63619,"globe-central-south-asia":63620,"globe-europe-africa":63621,"house-add-fill":63622,"house-add":63623,"house-check-fill":63624,"house-check":63625,"house-dash-fill":63626,"house-dash":63627,"house-down-fill":63628,"house-down":63629,"house-exclamation-fill":63630,"house-exclamation":63631,"house-gear-fill":63632,"house-gear":63633,"house-lock-fill":63634,"house-lock":63635,"house-slash-fill":63636,"house-slash":63637,"house-up-fill":63638,"house-up":63639,"house-x-fill":63640,"house-x":63641,"person-add":63642,"person-down":63643,"person-exclamation":63644,"person-fill-add":63645,"person-fill-check":63646,"person-fill-dash":63647,"person-fill-down":63648,"person-fill-exclamation":63649,"person-fill-gear":63650,"person-fill-lock":63651,"person-fill-slash":63652,"person-fill-up":63653,"person-fill-x":63654,"person-gear":63655,"person-lock":63656,"person-slash":63657,"person-up":63658,"scooter":63659,"taxi-front-fill":63660,"taxi-front":63661,"amd":63662,"database-add":63663,"database-check":63664,"database-dash":63665,"database-down":63666,"database-exclamation":63667,"database-fill-add":63668,"database-fill-check":63669,"database-fill-dash":63670,"database-fill-down":63671,"database-fill-exclamation":63672,"database-fill-gear":63673,"database-fill-lock":63674,"database-fill-slash":63675,"database-fill-up":63676,"database-fill-x":63677,"database-fill":63678,"database-gear":63679,"database-lock":63680,"database-slash":63681,"database-up":63682,"database-x":63683,"database":63684,"houses-fill":63685,"houses":63686,"nvidia":63687,"person-vcard-fill":63688,"person-vcard":63689,"sina-weibo":63690,"tencent-qq":63691,"wikipedia":63692,"alphabet-uppercase":62117,"alphabet":63114,"amazon":63117,"arrows-collapse-vertical":63120,"arrows-expand-vertical":63125,"arrows-vertical":63128,"arrows":63138,"ban-fill":63139,"ban":63158,"bing":63170,"cake":63200,"cake2":63213,"cookie":63214,"copy":63321,"crosshair":63337,"crosshair2":63380,"emoji-astonished-fill":63381,"emoji-astonished":63386,"emoji-grimace-fill":63387,"emoji-grimace":63392,"emoji-grin-fill":63393,"emoji-grin":63398,"emoji-surprise-fill":63399,"emoji-surprise":63404,"emoji-tear-fill":63405,"emoji-tear":63410,"envelope-arrow-down-fill":63411,"envelope-arrow-down":63416,"envelope-arrow-up-fill":63417,"envelope-arrow-up":63422,"feather":63423,"feather2":63428,"floppy-fill":63429,"floppy":63448,"floppy2-fill":63449,"floppy2":63460,"gitlab":63461,"highlighter":63480,"marker-tip":63490,"nvme-fill":63491,"nvme":63500,"opencollective":63501,"pci-card-network":63693,"pci-card-sound":63694,"radar":63695,"send-arrow-down-fill":63696,"send-arrow-down":63697,"send-arrow-up-fill":63698,"send-arrow-up":63699,"sim-slash-fill":63700,"sim-slash":63701,"sourceforge":63702,"substack":63703,"threads-fill":63704,"threads":63705,"transparency":63706,"twitter-x":63707,"type-h4":63708,"type-h5":63709,"type-h6":63710,"backpack-fill":63711,"backpack":63712,"backpack2-fill":63713,"backpack2":63714,"backpack3-fill":63715,"backpack3":63716,"backpack4-fill":63717,"backpack4":63718,"brilliance":63719,"cake-fill":63720,"cake2-fill":63721,"duffle-fill":63722,"duffle":63723,"exposure":63724,"gender-neuter":63725,"highlights":63726,"luggage-fill":63727,"luggage":63728,"mailbox-flag":63729,"mailbox2-flag":63730,"noise-reduction":63731,"passport-fill":63732,"passport":63733,"person-arms-up":63734,"person-raised-hand":63735,"person-standing-dress":63736,"person-standing":63737,"person-walking":63738,"person-wheelchair":63739,"shadows":63740,"suitcase-fill":63741,"suitcase-lg-fill":63742,"suitcase-lg":63743,"suitcase":63744,"suitcase2-fill":63745,"suitcase2":63746,"vignette":63747}');class s{modalText={add:{title:"Nuovo indirizzo"},modify:{title:"Modifica indirizzo"},delete:{title:"Elimina indirizzo",description:"Vuoi eliminare il seguente indirizzo:"}};constructor(e,n="address_",t=!1){this.container=e,this.prefix=n,this.required=t,this.container.querySelector('input[name="'+this.prefix+'id"]')&&(this.id=this.container.querySelector('input[name="'+this.prefix+'id"]')),this.name=this.container.querySelector('input[name="'+this.prefix+'name"]'),this.surname=this.container.querySelector('input[name="'+this.prefix+'surname"]'),this.country=this.container.querySelector('select[name="'+this.prefix+'country"]'),this.province=this.container.querySelector('select[name="'+this.prefix+'province"]'),this.cap=this.container.querySelector('input[name="'+this.prefix+'cap"]'),this.city=this.container.querySelector('input[name="'+this.prefix+'city"]'),this.street=this.container.querySelector('input[name="'+this.prefix+'street"]'),this.number=this.container.querySelector('input[name="'+this.prefix+'number"]'),this.phonePrefix=this.container.querySelector('select[name="'+this.prefix+'phone_prefix"]'),this.phone=this.container.querySelector('input[name="'+this.prefix+'phone"]'),this.container.querySelector('input[name="'+this.prefix+'more"]')&&(this.more=this.container.querySelector('input[name="'+this.prefix+'more"]'))}setForm(e){this.id.value=e.id,this.name.value=e.name,this.surname.value=e.surname,this.cap.value=e.cap,this.city.value=e.city,this.street.value=e.street,this.number.value=e.number,this.phone.value=e.phone,$(this.country).val(e.country).trigger("change"),delay(500).then(()=>{$(this.province).val(e.province).trigger("change")}),$(this.phonePrefix).val(e.phonePrefix).trigger("change"),this.initForm()}initForm(){this.required&&(setRequired(this.name,!0),setRequired(this.surname,!0),setRequired(this.country,!0),setRequired(this.province,!0),setRequired(this.cap,!0),setRequired(this.city,!0),setRequired(this.street,!0),setRequired(this.number,!0)),this.name.disabled=!1,this.surname.disabled=!1,this.phonePrefix.disabled=!1,this.phone.disabled=!1,this.country.disabled=!1,this.province.disabled=!1,this.cap.disabled=!1,this.city.disabled=!1,this.street.disabled=!1,this.number.disabled=!1,this.more&&(this.more.disabled=!1),check()}resetForm(e=!1){this.container.querySelectorAll("input, select").forEach(n=>{n.name.substring(0,this.prefix.length)==this.prefix&&(n.name==this.prefix+"country"?$(n).val("IT").trigger("change"):n.name==this.prefix+"phone_prefix"?$(n).val("+39").trigger("change"):n.value="",setRequired(n,!1),e&&(n.disabled=!0))}),check()}modalDelete(e,n){var t=document.querySelector("#"+this.prefix+"modal-delete");t.querySelector('input[name="'+this.prefix+'delete-id"]').value=e,t.querySelector(".modal-title").innerHTML=this.modalText.delete.title,t.querySelector(".modal-body .value").innerHTML=this.modalText.delete.description+"<br>"+n,new bootstrap.Modal(t).show()}modalForm(e="modify"){var n,t=document.querySelector("#"+this.prefix+"modal-form");new bootstrap.Modal(t).show(),"modify"==e?n=this.modalText.modify.title:"add"==e&&(n=this.modalText.add.title),t.querySelector(".modal-title").innerHTML=n,t.addEventListener("hidden.bs.modal",()=>{this.resetForm(!0)})}}window.wiBootstrapIconNames=Object.keys(l),window.Address=s,window.Billing=class extends s{modalText={add:{title:"Nuovi dati di fatturazione"},modify:{title:"Modifica dati di fatturazione"},delete:{title:"Elimina dati di fatturazione",description:"Vuoi eliminare i seguenti dati di fatturazione:"}};constructor(e,n="billing_",t=!1){super(e,n,t),this.container.querySelector('input[name="'+this.prefix+'type"]')?this.type=this.container.querySelector('input[name="'+this.prefix+'type"]'):this.type=this.container.querySelector('select[name="'+this.prefix+'type"]'),this.businessName=this.container.querySelector('input[name="'+this.prefix+'business_name"]'),this.cf=this.container.querySelector('input[name="'+this.prefix+'cf"]'),this.pi=this.container.querySelector('input[name="'+this.prefix+'pi"]'),this.sdi=this.container.querySelector('input[name="'+this.prefix+'sdi"]'),this.pec=this.container.querySelector('input[name="'+this.prefix+'pec"]')}initForm(){super.initForm(),this.type.disabled=!1,this.cf.disabled=!1,setRequired(this.type,!0),"business"==this.type.value?(this.businessName.parentElement.parentElement.classList.remove("d-none"),this.businessName.disabled=!1,console.log(this.businessName),this.pi.parentElement.parentElement.classList.remove("d-none"),this.pi.disabled=!1,this.sdi.parentElement.parentElement.classList.remove("d-none"),this.sdi.disabled=!1,this.pec.parentElement.parentElement.classList.remove("d-none"),this.pec.disabled=!1,this.name.parentElement.parentElement.classList.add("d-none"),this.name.disabled=!0,this.surname.parentElement.parentElement.classList.add("d-none"),this.surname.disabled=!0,this.required&&(setRequired(this.businessName,!0),setRequired(this.pi,!0),setRequired(this.cf,!1),setRequired(this.name,!1),setRequired(this.surname,!1))):"private"==this.type.value&&(this.name.parentElement.parentElement.classList.remove("d-none"),this.name.disabled=!1,this.surname.parentElement.parentElement.classList.remove("d-none"),this.surname.disabled=!1,this.businessName.parentElement.parentElement.classList.add("d-none"),this.businessName.disabled=!0,this.pi.parentElement.parentElement.classList.add("d-none"),this.pi.disabled=!0,this.sdi.parentElement.parentElement.classList.add("d-none"),this.sdi.disabled=!0,this.pec.parentElement.parentElement.classList.add("d-none"),this.pec.disabled=!0,this.required&&(setRequired(this.name,!0),setRequired(this.surname,!0),setRequired(this.cf,!0),setRequired(this.businessName,!1),setRequired(this.pi,!1))),check()}setForm(e){this.type.value=e.type,this.businessName.value=e.businessName,this.cf.value=e.cf,this.pi.value=e.pi,this.sdi.value=e.sdi,this.pec.value=e.pec,super.setForm(e)}resetForm(){this.container.querySelectorAll("input, select").forEach(e=>{e.name.substring(0,this.prefix.length)==this.prefix&&(e.name==this.prefix+"type"?e.value="private":e.name==this.prefix+"country"?$(e).val("IT").trigger("change"):e.name==this.prefix+"phone_prefix"?$(e).val("+39").trigger("change"):e.value="",setRequired(e,!1))}),check()}}})()})();
|
|
3
3
|
//# sourceMappingURL=head.js.map
|