mypgs 2.0.0 → 3.0.0
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/.vscode/tasks.json +39 -0
- package/AGENTS.md +22 -21
- package/README.md +25 -25
- package/assets/javascript/components/_menu.js +2 -1
- package/assets/javascript/components/_modals.js +1 -1
- package/assets/javascript/components/_notifications.js +2 -1
- package/assets/javascript/components/_slides.js +2 -2
- package/assets/scss/base/_body.scss +5 -5
- package/assets/scss/base/_general.scss +27 -18
- package/assets/scss/base/_variables.scss +1 -1
- package/assets/scss/components/_accordion.scss +9 -9
- package/assets/scss/components/_alerts.scss +71 -0
- package/assets/scss/components/_badges.scss +40 -48
- package/assets/scss/components/_button.scss +28 -20
- package/assets/scss/components/_card.scss +9 -4
- package/assets/scss/components/_form.scss +0 -16
- package/assets/scss/components/_formAddon.scss +22 -0
- package/assets/scss/components/_logo.scss +3 -4
- package/assets/scss/components/_menu.scss +26 -3
- package/assets/scss/components/_modals.scss +6 -4
- package/assets/scss/components/_search.scss +2 -2
- package/assets/scss/components/_slides.scss +0 -1
- package/assets/scss/components/_stepTabs.scss +2 -1
- package/assets/scss/components/_tooltip.scss +0 -1
- package/assets/scss/index.scss +3 -3
- package/assets/scss/layout/_footer.scss +0 -2
- package/assets/scss/layout/_header.scss +10 -2
- package/assets/scss/layout/_pageShell.scss +6 -2
- package/assets/scss/layout/_responsive.scss +63 -0
- package/assets/scss/mixin/_mx-base.scss +4 -8
- package/assets/scss/mixin/_mx-button.scss +73 -115
- package/assets/scss/mixin/_mx-card.scss +39 -40
- package/assets/scss/mixin/_mx-form.scss +13 -10
- package/assets/scss/mixin/{_mx-form-addon.scss → _mx-formAddon.scss} +103 -64
- package/assets/scss/mixin/_mx-hover.scss +81 -0
- package/assets/scss/mixin/_mx-responsive.scss +81 -201
- package/assets/scss/mixin/_settings.scss +2 -1
- package/assets/scss/mixin/mixin.scss +2 -1
- package/demo/demo.css +9 -6
- package/demo/demo.html +7 -5
- package/demo/demo.js +37 -34
- package/dist/css/index.css +2469 -3825
- package/dist/css/index.css.map +1 -1
- package/dist/css/index.min.css +1 -1
- package/dist/javascript/index.js +7 -5
- package/dist/javascript/index.js.map +1 -1
- package/dist/javascript/index.min.js +1 -1
- package/docs/componenti-e-markup.md +9 -8
- package/docs/components/accordion.md +23 -23
- package/docs/components/alerts.md +67 -0
- package/docs/components/badges.md +29 -26
- package/docs/components/breadcumbs.md +8 -8
- package/docs/components/button.md +18 -18
- package/docs/components/card.md +25 -22
- package/docs/components/dropdown.md +29 -29
- package/docs/components/form.md +65 -41
- package/docs/components/formAddon.md +116 -0
- package/docs/components/logo.md +11 -11
- package/docs/components/menu.md +20 -20
- package/docs/components/modal.md +52 -51
- package/docs/components/notification.md +34 -34
- package/docs/components/search.md +54 -52
- package/docs/components/slides.md +41 -42
- package/docs/components/stepTabs.md +45 -45
- package/docs/components/steps.md +16 -16
- package/docs/components/summary.md +20 -20
- package/docs/components/table.md +7 -7
- package/docs/components/tooltip.md +24 -23
- package/docs/convenzioni.md +11 -11
- package/docs/export-e-sviluppo.md +4 -4
- package/docs/helper-javascript.md +8 -8
- package/docs/layout/body.md +11 -11
- package/docs/layout/footer.md +28 -24
- package/docs/layout/header.md +36 -35
- package/docs/layout/pageShell.md +19 -19
- package/docs/layout/responsive.md +90 -0
- package/docs/layout/section.md +38 -38
- package/docs/patterns/cookieConsent.md +42 -39
- package/docs/utilizzo-css-scss.md +33 -9
- package/package.json +1 -1
- package/reference/html/components/accordion.html +52 -0
- package/reference/html/components/alerts.html +59 -0
- package/reference/html/components/badges.html +62 -0
- package/{templates → reference}/html/components/breadcumbs.html +6 -6
- package/reference/html/components/button.html +51 -0
- package/reference/html/components/card.html +45 -0
- package/{templates → reference}/html/components/dropdown.html +25 -25
- package/reference/html/components/form.html +128 -0
- package/reference/html/components/formAddon.html +109 -0
- package/reference/html/components/logo.html +28 -0
- package/{templates → reference}/html/components/menu.html +17 -17
- package/reference/html/components/modal.html +123 -0
- package/reference/html/components/notification.html +71 -0
- package/reference/html/components/search.html +109 -0
- package/reference/html/components/slides.html +75 -0
- package/reference/html/components/stepTabs.html +83 -0
- package/reference/html/components/steps.html +49 -0
- package/reference/html/components/summary.html +41 -0
- package/{templates → reference}/html/components/table.html +5 -5
- package/reference/html/components/tooltip.html +44 -0
- package/reference/html/layout/body.html +34 -0
- package/reference/html/layout/footer.html +67 -0
- package/reference/html/layout/header.html +108 -0
- package/{templates → reference}/html/layout/pageShell.html +16 -16
- package/reference/html/layout/responsive.html +83 -0
- package/reference/html/layout/section.html +62 -0
- package/reference/html/patterns/cookieConsent.html +84 -0
- package/{templates → reference}/react/components/accordion.jsx +5 -5
- package/reference/react/components/alerts.jsx +46 -0
- package/{templates → reference}/react/components/breadcumbs.jsx +1 -1
- package/{templates → reference}/react/components/button.jsx +6 -6
- package/{templates → reference}/react/components/card.jsx +6 -6
- package/{templates → reference}/react/components/dropdown.jsx +8 -8
- package/{templates → reference}/react/components/form.jsx +3 -3
- package/{templates → reference}/react/components/modal.jsx +15 -15
- package/{templates → reference}/react/components/notification.jsx +3 -3
- package/{templates → reference}/react/components/search.jsx +8 -8
- package/{templates → reference}/react/components/slides.jsx +4 -4
- package/{templates → reference}/react/components/stepTabs.jsx +12 -12
- package/reference/react/components/summary.jsx +18 -0
- package/{templates → reference}/react/components/table.jsx +2 -2
- package/{templates → reference}/react/components/tooltip.jsx +1 -1
- package/{templates → reference}/react/layout/pageShell.jsx +2 -2
- package/reference/react/layout/responsive.jsx +61 -0
- package/reference/react/layout/section.jsx +44 -0
- package/{templates → reference}/react/patterns/cookieConsent.jsx +9 -9
- package/{templates → reference}/react/patterns/footer.jsx +4 -4
- package/{templates → reference}/react/patterns/header.jsx +4 -4
- package/scripts/generate-component-docs.js +12 -12
- package/assets/scss/layout/_flex.scss +0 -49
- package/assets/scss/layout/_gap.scss +0 -21
- package/assets/scss/layout/_grid.scss +0 -13
- package/docs/layout/flex.md +0 -116
- package/docs/layout/grid.md +0 -116
- package/templates/html/components/accordion.html +0 -52
- package/templates/html/components/badges.html +0 -60
- package/templates/html/components/button.html +0 -51
- package/templates/html/components/card.html +0 -43
- package/templates/html/components/form.html +0 -104
- package/templates/html/components/logo.html +0 -28
- package/templates/html/components/modal.html +0 -122
- package/templates/html/components/notification.html +0 -71
- package/templates/html/components/search.html +0 -107
- package/templates/html/components/slides.html +0 -76
- package/templates/html/components/stepTabs.html +0 -83
- package/templates/html/components/steps.html +0 -49
- package/templates/html/components/summary.html +0 -41
- package/templates/html/components/tooltip.html +0 -43
- package/templates/html/layout/body.html +0 -35
- package/templates/html/layout/flex.html +0 -109
- package/templates/html/layout/footer.html +0 -64
- package/templates/html/layout/grid.html +0 -109
- package/templates/html/layout/header.html +0 -107
- package/templates/html/layout/section.html +0 -62
- package/templates/html/patterns/cookieConsent.html +0 -82
- package/templates/react/components/summary.jsx +0 -18
- package/templates/react/layout/flex.jsx +0 -36
- package/templates/react/layout/grid.jsx +0 -36
- package/templates/react/layout/section.jsx +0 -44
- /package/{templates → reference}/react/components/logo.jsx +0 -0
- /package/{templates → reference}/react/components/menu.jsx +0 -0
- /package/{templates → reference}/react/components/steps.jsx +0 -0
- /package/{templates → reference}/react/layout/body.jsx +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={795(){function e(e=!1,t){let n="true"===localStorage.getItem("screenIsDarkMode");e&&(n=!n,localStorage.setItem("screenIsDarkMode",n)),pgs(document.documentElement).state.toggle("darkmode",n),pgs(document.body).state.toggle("darkmode",n),function(e,t){e.forEach(e=>{const n=e.querySelector("i");n&&(n.classList.toggle("fa-moon",!t),n.classList.toggle("fa-sun",t))})}(t,n),document.dispatchEvent(new CustomEvent("pgs:svg:changeColor",{detail:{isDarkMode:n}}))}const t=pgs(document).querySelectorAll("toggleDarkmode");e(!1,t),t.forEach(n=>{n.addEventListener("click",()=>e(!0,t))})},359(){document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll('object[type="image/svg+xml"]').forEach(e=>{function t(t){if(!t)return;const n=t.querySelector("svg");if(!n)return;const o=window.getComputedStyle(e);n.setAttribute("preserveAspectRatio","cover"===o.objectFit?"xMidYMid slice":"xMidYMid meet")}function n(){const n=e.contentDocument;if(!n)return;if(!n.querySelector("svg"))return;if(t(n),e.__objectResizeObserver)return;let o=0;const r=new ResizeObserver(()=>{o||(o=requestAnimationFrame(()=>{o=0,t(n)}))});r.observe(e),e.__objectResizeObserver=r}e.contentDocument&&e.contentDocument.querySelector("svg")?n():e.addEventListener("load",n,{once:!0})}),document.body.classList.add("object-loaded")})},682(){const e=pgs(document).querySelector("header");!function(){if(!e)return;const t=pgs(e).querySelectorAll("header-element");t.length||console.log('For the header to work correctly, insert "header-element" under "header"'),t.length&&(t.forEach(t=>{let n,o=!1,r=0;const i=()=>{r||(r=requestAnimationFrame(()=>{r=0,function(r){let i,s=window.getComputedStyle(r),a=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),c=parseFloat(s.gap),l=parseInt(r.offsetWidth-a);if(o)i=n;else{let e=[];Array.from(r.children).filter(e=>!pgs(e).contains("header-element-onlyMobile")).forEach(t=>{pgs(t).contains("header-element-hamburger")||e.push(...t.children)}),c=Math.round(c*(e.length-1)),i=e.reduce((e,t)=>e+t.offsetWidth,0)-2+c}window.innerWidth<600?(pgs(e).state.add("mobileActive"),pgs(t).state.add("mobileActive")):l<i?(pgs(e).state.add("mobileActive"),pgs(r).state.add("mobileActive"),o=!0,n=i):(pgs(e).state.remove("mobileActive"),pgs(r).state.remove("mobileActive"))}(t)}))};new ResizeObserver(i).observe(t),i()}),window.addEventListener("resize",()=>{window.innerWidth>768&&(e.style.transform="translateY(0)")}))}();let t=0;function n(){t||(t=requestAnimationFrame(()=>{t=0,function(){if(!e)return;const t=window.getComputedStyle(document.documentElement).marginTop??0,n=e.offsetHeight+parseInt(t),o="true"===document.querySelector("header").getAttribute("data-header-scroll")?0:n;document.documentElement.style.setProperty("--heightOfHeader",`${n}px`),document.documentElement.style.setProperty("--heightOfHeaderScroll",`${o}px`)}()}))}e&&(new ResizeObserver(n).observe(e),document.fonts?.ready?.then(n)),n(),window.addEventListener("resize",n),window.addEventListener("scroll",n,{passive:!0});let o=window.scrollY;window.addEventListener("scroll",()=>{if(!e)return;let t=window.scrollY;window.innerHeight<=900&&(t>=80?t>o?(e.style.transform="translateY(-100%)",e.setAttribute("data-header-scroll",!0)):(e.style.transform="translateY(0px)",e.setAttribute("data-header-scroll",!1)):(e.style.transform="translateY(0)",e.setAttribute("data-header-scroll",!1))),o=t})},48(){const e="pgs_cookie_preferences_v1";function t(){window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(){window.dataLayer.push(arguments)}}function n(e,t,n){if(!(e instanceof HTMLElement&&t))return;const o=(e.getAttribute("pgs")||"").split(/\s+/).filter(Boolean),r=n?[...new Set([...o,t])]:o.filter(e=>e!==t);r.length>0?e.setAttribute("pgs",r.join(" ")):e.removeAttribute("pgs")}function o(){const o=pgs(document).querySelector("cookieConsent");if(!o)return;const r=o.querySelector('[pgs~="cookieConsent-toggleAnalytics"]'),i=o.querySelector('[pgs~="cookieConsent-actionAccept"]'),s=o.querySelector('[pgs~="cookieConsent-actionReject"]'),a=document.querySelectorAll('[pgs~="cookieConsent-actionOpen"]'),c=(o.dataset.gaId||"").trim(),l=c.length>0;let d=null;function u(e){o.hidden=!e,o.setAttribute("aria-hidden",String(!e)),document.body.classList.toggle("cookieConsent-open",e),e?(d=document.activeElement,setTimeout(()=>{o.focus()},0)):d instanceof HTMLElement&&d.focus({preventScroll:!0})}function p(){u(!1)}function g(r){!function(t){try{localStorage.setItem(e,JSON.stringify({...t,updatedAt:(new Date).toISOString()}))}catch(e){console.warn("PGS cookie consent: impossibile salvare le preferenze",e)}}({analytics:r}),n(o,"cookieConsent-accepted",!!r),n(o,"cookieConsent-declined",!r),function({allowAnalytics:e,measurementId:n}){t(),e?(window.gtag("consent","update",{analytics_storage:"granted"}),function(e){if(!e||window.__PGS_gaLoaded)return;window.__PGS_gaLoaded=!0;const t=document.createElement("script");t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,document.head.appendChild(t),window.gtag("js",new Date),window.gtag("config",e,{anonymize_ip:!0,allow_google_signals:!1})}(n)):window.gtag("consent","update",{analytics_storage:"denied"})}({allowAnalytics:!!r,measurementId:c})}!function({root:e,analyticsToggle:t,acceptAllButton:n,rejectButton:o,openButtons:r}){e.dataset.cookieComponent="consent",t?.setAttribute("data-cookie-toggle","analytics"),n?.setAttribute("data-cookie-action","accept"),o?.setAttribute("data-cookie-action","reject"),e.querySelector('[pgs~="cookieConsent-featureEssential"]')?.setAttribute("data-cookie-feature","essential"),e.querySelector('[pgs~="cookieConsent-featureAnalytics"]')?.setAttribute("data-cookie-feature","analytics"),r.forEach(e=>{e.setAttribute("data-cookie-action","open")})}({root:o,analyticsToggle:r,acceptAllButton:i,rejectButton:s,openButtons:a}),r&&(r.disabled=!l,l?n(o,"cookieConsent-gaUnavailable",!1):(r.checked=!1,n(o,"cookieConsent-gaUnavailable",!0))),t(),window.gtag("consent","default",{analytics_storage:"denied"}),i?.addEventListener("click",()=>{r&&l&&(r.checked=!0),g(!!l),p()}),s?.addEventListener("click",()=>{const e=!!r&&r.checked&&l;!e&&r&&(r.checked=!1),g(e),p()}),r?.addEventListener("change",e=>{!l&&e.target instanceof HTMLInputElement&&(e.target.checked=!1)}),o.addEventListener("keydown",e=>{if("Escape"===e.key)e.preventDefault(),p();else if("Tab"===e.key){const t=o.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const n=t[0],r=t[t.length-1];e.shiftKey||document.activeElement!==r||(e.preventDefault(),n.focus()),e.shiftKey&&document.activeElement===n&&(e.preventDefault(),r.focus())}}),a.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),u(!0)})});const f=function(){try{return function(e){try{return e?JSON.parse(e):null}catch(e){return console.warn("PGS cookie consent: impossibile leggere le preferenze",e),null}}(localStorage.getItem(e))}catch(e){return null}}();f&&"boolean"==typeof f.analytics?(r&&(r.checked=!!f.analytics&&l),g(f.analytics&&l),p()):u(!0)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o()}};const t={};function n(o){const r=t[o];if(void 0!==r)return r.exports;const i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(()=>{"use strict";function e(e){const t="pgs";if(!e)throw new TypeError("pgs(root): root richiesto");const n="function"==typeof e.getAttribute&&"function"==typeof e.setAttribute;if("function"!=typeof e.querySelector||"function"!=typeof e.querySelectorAll)throw new TypeError("pgs(root): root deve supportare querySelector/querySelectorAll");function o(t){throw new TypeError(`pgs(${e.nodeName||"root"}).${t}(): disponibile solo su Element (non su Document)`)}function r(e){return Array.isArray(e)&&(e=e.join(",")),String(e).split(",").map(e=>e.trim()).filter(Boolean).map(e=>`[${t}~="${e}"]`).join(",")}function i(e,n=" "){return(e.getAttribute(t)||"").split(n).filter(Boolean)}function s(e,n,o=" "){e.setAttribute(t,n.join(o))}const a=function(){function a(){return a}return a.querySelector=function(t){return e.querySelector(r(t))},a.querySelectorAll=function(t){return e.querySelectorAll(r(t))},a.add=function(...t){if(!n)return o("add");const r=i(e);for(const e of t)r.includes(e)||r.push(e);return s(e,r),a},a.remove=function(...t){return n?(s(e,i(e).filter(e=>!t.includes(e))),a):o("remove")},a.toggle=function(t,r){if(!n)return o("toggle");const s=i(e).includes(t);return void 0!==r?(r&&!s&&a.add(t),!r&&s&&a.remove(t),!!r):s?(a.remove(t),!1):(a.add(t),!0)},a.contains=function(t){return n?i(e).includes(t):o("contains")},Object.defineProperty(a,"value",{get(){if(n)return e.getAttribute(t)},set(r){if(!n)return o("value");e.setAttribute(t,r)}}),a}();return a.state=function(t){if(!n)return;const o=(n=" ")=>(e.getAttribute(t)||"").split(n).filter(Boolean),r=(n,o=" ")=>e.setAttribute(t,n.join(o));function i(...e){return i.add(...e),i}return i.add=function(...e){const t=e.flat().map(e=>String(e).trim()).filter(Boolean),n=o();for(const e of t)n.includes(e)||n.push(e);return r(n),i},i.remove=function(...e){const t=e.flat().map(e=>String(e).trim()).filter(Boolean),n=o().filter(e=>!t.includes(e));return r(n),i},i.toggle=function(e,t){const n=String(e).trim();if(!n)return!1;const i=o(),s=i.includes(n);return void 0!==t?(t&&!s&&(i.push(n),r(i)),!t&&s&&r(i.filter(e=>e!==n)),!!t):s?(r(i.filter(e=>e!==n)),!1):(i.push(n),r(i),!0)},i.contains=function(e){const t=String(e).trim();return!!t&&o().includes(t)},Object.defineProperty(i,"value",{get:()=>e.getAttribute(t),set(n){e.setAttribute(t,n)}}),i}("pgs-state"),a.option=function(t){if(!n)return;const o=()=>(e.getAttribute(t)||"").match(/[^\s[\]]+(?:\[[^\]]*\])?/g)||[],r=n=>e.setAttribute(t,n.join(" ")),i=e=>String(e).trim().match(/^[^\s[\]]+/)?.[0]||"",s=e=>e.flat().flatMap(e=>String(e).match(/[^\s[\]]+(?:\[[^\]]*\])?/g)||[]).filter(Boolean);function a(){return a}return a.add=function(...e){const t=o();return s(e).forEach(e=>{t.includes(e)||t.push(e)}),r(t),a},a.remove=function(...e){const t=s(e).map(i).filter(Boolean);return r(o().filter(e=>!t.includes(i(e)))),a},a.toggle=function(e,t){const n=i(e);if(!n)return!1;const o=a.contains(n);return void 0!==t?(t&&!o&&a.add(e),!t&&o&&a.remove(n),!!t):o?(a.remove(n),!1):(a.add(e),!0)},a.contains=function(n){const o=e.getAttribute(t)||"",r=String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?:^|\\s)${r}(?:\\[[^\\]]*\\])?(?=\\s|$)`).test(o)},a.getValueBrackets=function(n){const o=e.getAttribute(t)||"",r=String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=o.match(new RegExp(`(?:^|\\s)${r}\\[([^\\]]*)\\]`));return i?i[1]:void 0},a.setValueBrackets=function(e,t=""){const n=i(e);if(!n)return a;const s=`${n}[${String(t).trim()}]`,c=o().filter(e=>i(e)!==n);return c.push(s),r(c),a},Object.defineProperty(a,"value",{get:()=>e.getAttribute(t),set(n){e.setAttribute(t,n)}}),a}("pgs-option"),a}const t={};function o(e,n){const o=String(e||"").trim().replace(/^pgs[_-\s]*/i,"").toLowerCase();if(!o)throw new TypeError("pgs.registerImport(...modules): ogni modulo deve avere name o PGS_name");t[o]={name:e,module:n}}e.registerImport=function(...t){return t.flat().forEach(e=>{!e||"object"!=typeof e||e.PGS_name||e.name?o(e?.PGS_name||e?.name,e):Object.entries(e).forEach(([e,t])=>o(e,t))}),e},e.registerModules=function(t={}){return Object.entries(t).forEach(([t,n])=>{const o=String(t||"").trim();if(o){if(Object.prototype.hasOwnProperty.call(e,o)&&e[o]!==n)throw new Error(`pgs.registerModules(): "${o}" e' gia' definito su pgs`);e[o]=n}}),e},e.import=function(...e){return e.flat().reduce((e,n)=>{const o=String(n||"").trim().replace(/^pgs[_-\s]*/i,"").toLowerCase(),r=t[o];if(!r)throw new Error(`pgs.import(): modulo "${n}" non registrato`);return e[r.name]=r.module,e},{})},globalThis.pgs??=e,n(795);const r={eventChangeColor:"pgs:svg:changeColor",watchedObjects:new WeakSet,watchedLotties:new WeakSet,_normalizeColor:(e="")=>e.replace(/\s/g,"").toLocaleLowerCase(),_getCurrentDarkmode:()=>pgs(document.documentElement).state.contains("darkmode"),searchColor(e="svg"){const t=getComputedStyle(document.documentElement),n=[];for(let o=0;o<20;o++){const r=t.getPropertyValue("--"+e+"-color-"+o).toLocaleLowerCase().split("&").map(e=>e.trim());r[0]&&r[1]&&n.push([r[0],r[1]])}return n},_changeColor(e,t,n){e&&e.querySelectorAll("[fill], [stroke]").forEach(e=>{for(const o of n){const n=r._normalizeColor(o[0]),i=r._normalizeColor(o[1]);["fill","stroke"].forEach(o=>{const s=r._normalizeColor(e.getAttribute(o)||"");s&&(e.style.transition="fill 0.5s ease, stroke 0.5s ease",t&&s===n&&e.setAttribute(o,i),t||s!==i||e.setAttribute(o,n))})}})},_getLottieSvg:e=>e.shadowRoot?.querySelector("svg")||null,init(){document.addEventListener(r.eventChangeColor,e=>{r.applyColorsSVG(e.detail?.isDarkMode??r._getCurrentDarkmode()),r.applyColorsLottie(e.detail?.isDarkMode??r._getCurrentDarkmode())}),document.addEventListener("DOMContentLoaded",()=>{r.applyColorsSVG(),r.applyColorsLottie()})},applyColorsSVG(e=r._getCurrentDarkmode()){const t=r.searchColor("svg");pgs(document).querySelector("svgChangeColor")&&document.querySelectorAll('object[type="image/svg+xml"]').forEach(n=>{r.watchedObjects.has(n)||(n.addEventListener("load",()=>r._changeColor(n.contentDocument,r._getCurrentDarkmode(),r.searchColor("svg"))),r.watchedObjects.add(n)),n.contentDocument&&r._changeColor(n.contentDocument,e,t)})},applyColorsLottie(e=r._getCurrentDarkmode()){const t=r.searchColor("svg");pgs(document).querySelector("lottieChangeColor")&&document.querySelectorAll("lottie-player").forEach(n=>{r.watchedLotties.has(n)||(n.addEventListener("load",()=>r._changeColor(r._getLottieSvg(n),r._getCurrentDarkmode(),r.searchColor("svg"))),r.watchedLotties.add(n)),n.shadowRoot&&r._changeColor(r._getLottieSvg(n),e,t)})}};r.init();const i={eventChangeColor:r.eventChangeColor,applyColorsSVG:e=>r.applyColorsSVG(e),applyColorsLottie:e=>r.applyColorsLottie(e)};n(359);const s=new WeakMap;let a=0;function c(e,t){return Array.from(e.children).find(e=>pgs(e).contains(t))}function l(e=document){pgs(e).querySelectorAll("accordion").forEach(e=>{if(s.has(e))return;const t=c(e,"accordion-button"),n=c(e,"accordion-content");if(!t||!n)return;const o=(a+=1,a),r=`acc-btn-${o}`,i=`acc-panel-${o}`,d=pgs(e).state.contains("open");function u(e,t,n){const o=(t?.textContent||"").trim().replace(/\s+/g," ");t.setAttribute("aria-label",`${e?"Chiudi":"Apri"} ${o||"sezione"}`),t.setAttribute("aria-expanded",String(e)),n.hidden=!e}function p(){const o=!pgs(e).state.contains("open");pgs(e).state.toggle("open",o),u(o,t,n),function(){for(const t of pgs(document).querySelectorAll("accordion")){if(t===e)continue;const n=pgs(t).querySelector("accordion-button"),o=pgs(t).querySelector("accordion-content");n&&o&&(pgs(t).state().remove("open"),u(!1,n,o))}}(),o&&setTimeout(()=>e.scrollIntoView({block:"nearest",inline:"nearest"}),100)}t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.id||t.setAttribute("id",r),n.id||n.setAttribute("id",i),t.setAttribute("aria-controls",n.id),n.setAttribute("role","region"),n.setAttribute("aria-labelledby",t.id),u(d,t,n),t.addEventListener("click",p),t.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),p())}),s.set(e,{element:e,button:t,content:n,open:function(){pgs(e).state.contains("open")||p()},close:function(){pgs(e).state.contains("open")&&p()},toggle:p,refresh:()=>(l(e.parentNode||document),s.get(e)),isOpen:()=>pgs(e).state.contains("open")})})}l();const d={init:l,api:function(e){return s.get(e)}},u=new WeakMap,p=new Set;let g=0;function f(e){return e instanceof Element&&pgs(e).contains("dropdown-content")}function m(e){const t=u.get(e);if(!t||!t.isOpen())return;const{trigger:n,content:o}=t,{side:r,align:i}=function(e){const t=(pgs(e).option.getValueBrackets("position")||"bottom center").trim().toLowerCase().split(/\s+/).filter(Boolean),n=t.find(e=>["top","right","bottom","left"].includes(e))||"bottom",o=t.find(e=>["top","right","bottom","left","center"].includes(e)&&e!==n)||"center";return{side:n,align:o}}(e),s=n.getBoundingClientRect(),a=o.getBoundingClientRect(),c=document.documentElement.clientWidth,l=Math.max(8,c-a.width-8);let d=s.left+(s.width-a.width)/2,p=s.bottom+8;var g,f;"top"!==r&&"bottom"!==r||(p="top"===r?s.top-a.height-8:s.bottom+8,"left"===i&&(d=s.left),"right"===i&&(d=s.right-a.width)),"left"!==r&&"right"!==r||(d="left"===r?s.left-a.width-8:s.right+8,p=s.top+(s.height-a.height)/2,"top"===i&&(p=s.top),"bottom"===i&&(p=s.bottom-a.height)),"left"===r&&d<8&&(d=s.right+8),"right"===r&&d+a.width>c-8&&(d=s.left-a.width-8),g=d,f=l,d=Math.min(Math.max(g,8),f),o.style.setProperty("--dropdown-left",`${Math.round(d)}px`),o.style.setProperty("--dropdown-top",`${Math.round(p)}px`)}function h(){p.forEach(m)}function b(e){const t=u.get(e);t&&t.isOpen()&&(pgs(e).state.remove("open"),t.trigger.setAttribute("aria-expanded","false"),p.delete(e))}function y(e){const t=u.get(e);t&&!t.isOpen()&&(p.forEach(t=>{t!==e&&b(t)}),pgs(e).state.add("open"),t.trigger.setAttribute("aria-expanded","true"),p.add(e),m(e))}function v(e){const t=u.get(e);t&&(t.isOpen()?b(e):y(e))}function w(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("dropdown")?[e]:[];return t.push(...pgs(e).querySelectorAll("dropdown")),t})(e).forEach(e=>{if(u.has(e))return;const t=(n=e,Array.from(n.children).find(f)||pgs(n).querySelector("dropdown-content"));var n;if(!t)return;const o=function(e,t){const n=Array.from(e.children).filter(e=>e!==t);return n.find(e=>pgs(e).contains("dropdown-button"))||n.find(e=>!f(e))||e}(e,t),r=(g+=1,g);o.id||(o.id=`dropdown-btn-${r}`),t.id||(t.id=`dropdown-panel-${r}`),o.matches("button")&&!o.hasAttribute("type")&&o.setAttribute("type","button"),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-controls",t.id),o.setAttribute("aria-expanded",String(pgs(e).state.contains("open"))),t.setAttribute("aria-labelledby",o.id);const i={element:e,trigger:o,content:t,open:()=>y(e),close:()=>b(e),toggle:()=>v(e),refresh:()=>(w(e.parentNode||document),m(e),u.get(e)),isOpen:()=>pgs(e).state.contains("open")};o.addEventListener("click",t=>{f(t.target)||(t.preventDefault(),t.stopPropagation(),v(e))}),t.addEventListener("click",e=>e.stopPropagation()),u.set(e,i),i.isOpen()&&p.add(e),m(e)})}document.addEventListener("click",e=>{var t;t=e.target,Array.from(p).some(e=>e.contains(t))||p.forEach(b)}),document.addEventListener("keydown",e=>{"Escape"===e.key&&p.forEach(b)}),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),w();const A={init:w,api:function(e){return u.get(e)}},S=new WeakMap;function E(e=document){pgs(e).querySelectorAll("menu").forEach(e=>{S.has(e)||(e.querySelectorAll("li").forEach(e=>{const t=e.querySelector("ul");if(t){const n=document.createElement("button");n.type="button",n.innerHTML="<span>⏷</span>",pgs(n).add("menu-buttonIcon"),e.querySelector("a").insertAdjacentElement("afterend",n),pgs(e).add("dropdown"),pgs(e).option.setValueBrackets("position","bottom right"),pgs(n).add("dropdown-button"),pgs(n).add("buttonNohover"),pgs(t).add("dropdown-content")}}),S.set(e,{element:e,type:"horizontal",refresh:()=>(E(e.parentNode||document),S.get(e))}),A.init(e))})}E();const k={init:E,api:function(e){return S.get(e)}},L=new WeakMap;function C(e,t=null){if(L.has(e))return;const n=pgs(e).querySelector("modal-button"),o=t||e.querySelector("dialog");if(!n||!o)return;const r=new AbortController,{signal:i}=r;let s=null,a=null;const c='<button pgs="buttonClose modal-close" type="button" tabindex="0" aria-label="Chiudi"><i class="fa-solid fa-close"></i></button>',l=pgs(o).querySelector("modal-dialog-content-header"),d=pgs(e).option.contains("disableBackdropClose"),u=pgs(e).option.contains("history"),p=pgs(e).option.getValueBrackets("containerID"),g=pgs(e).option.getValueBrackets("containerPGS"),f=pgs(o).option.contains("topLevel");pgs(o).querySelector("modal-close")||pgs(e).querySelector("modal-close")||(l?l.insertAdjacentHTML("beforeend",c):o.insertAdjacentHTML("beforeend",c));const m=pgs(o).querySelector("modal-close")||pgs(e).querySelector("modal-close");function h(e=!0){n?.setAttribute("aria-expanded",e),o?.setAttribute("aria-expanded",e)}function b(t){t?.stopImmediatePropagation(),o.open?y(t):(o.open||document.querySelectorAll("dialog[open]").forEach(e=>e.close()),h(!0),f?o.showModal():o.show(),e.dispatchEvent(new CustomEvent("modal:open")),o.dispatchEvent(new CustomEvent("modal:open")))}function y(t){t?.stopImmediatePropagation(),h(!1),o.close(),e.dispatchEvent(new CustomEvent("modal:close")),o.dispatchEvent(new CustomEvent("modal:close"))}pgs(o).add("dialog modal-dialog"),n.setAttribute("role","button"),n.setAttribute("aria-label","apri modale"),f&&!e.contains(o)?e.append(o):f||(p?document.querySelector("#"+p)?.append(o):g?pgs(document).querySelector(g)?.append(o):document.body.append(o)),n.addEventListener("click",e=>b(e),{signal:i}),n.addEventListener("keypress",e=>!o.open&&("Enter"===e.key||" "===e.key)&&b(e),{signal:i}),o.addEventListener("close",()=>h(!1),{signal:i}),o.addEventListener("click",e=>{e.target!=o||d||y(e)},{signal:i}),m?.addEventListener("click",e=>y(e),{signal:i}),u&&n.id&&(a=window.setTimeout(function(){new URLSearchParams(window.location.search).get("modal")===n.id&&(document.getElementById(n.id)?.scrollIntoView({behavior:"smooth"}),b())},1),s=new MutationObserver(()=>{let e=o.hasAttribute("open");try{const t=new URL(window.location.href),o=new URLSearchParams(t.search);e?o.set("modal",n.id):o.delete("modal"),t.search=o.toString()?`?${o.toString()}`:"",window.history.pushState({modal:n.id,open:e},"",t)}catch(e){}}),s.observe(o,{attributes:!0,attributeFilter:["open"]}),window.addEventListener("popstate",()=>{try{const e=new URLSearchParams(window.location.search).get("modal")===n.id;e&&!o.open&&o.showModal(),!e&&o.open&&y()}catch(e){}},{signal:i})),L.set(e,{element:e,button:n,dialog:o,closeButton:m,open:function(e){o.open||b(e)},close:function(e){o.open&&y(e)},toggle:b,refresh:()=>{const t=e.querySelector("dialog")||o;return r.abort(),s?.disconnect(),null!==a&&window.clearTimeout(a),L.delete(e),C(e,t),L.get(e)},isOpen:()=>o.open})}function q(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("modal")?[e]:[];return t.push(...pgs(e).querySelectorAll("modal")),t})(e).forEach(e=>C(e))}q();const x={init:q,api:function(e){return L.get(e)}},M=new WeakMap,T=new Set;let O=0;const _={minLength:2,debounce:200,limit:6,submitOnSelect:!1,searchOnFocus:!0,source:null,onSelect:null};function D(e){if("string"==typeof e||"number"==typeof e){const t=String(e).trim();return t?{label:t,value:t,disabled:!1,data:e}:null}if(!e||"object"!=typeof e)return null;const t=String(e.label??e.value??"").trim();return t?{label:t,value:String(e.value??t),disabled:Boolean(e.disabled),data:Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}:null}function I(e){const t=M.get(e);t&&(pgs(e).state.remove("open"),t.input.setAttribute("aria-expanded","false"),t.input.removeAttribute("aria-activedescendant"),t.list.setAttribute("aria-hidden","true"),t.setActiveIndex(-1),T.delete(e))}function j(e){const t=M.get(e);t&&0!==t.items().length&&(pgs(e).state.add("open"),t.input.setAttribute("aria-expanded","true"),t.list.setAttribute("aria-hidden","false"),T.add(e))}function $(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("search")?[e]:[];return t.push(...pgs(e).querySelectorAll("search")),t})(e).forEach(e=>{if(M.has(e))return;const t=e.querySelector('input[type="search"]'),n=(o=e,Array.from(o.children).find(e=>pgs(e).contains("search-suggestions")));var o;if(!t||!n)return;const r=(O+=1,O);t.id||(t.id=`search-input-${r}`),n.id||(n.id=`search-suggestions-${r}`),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-controls",n.id),t.setAttribute("aria-expanded","false"),t.setAttribute("autocomplete","off"),n.setAttribute("role","listbox"),n.setAttribute("aria-labelledby",t.id),n.setAttribute("aria-hidden","true");let i={..._},s=[],a=-1,c=null,l=null,d=0;function u(n){pgs(e).state.toggle("loading",n),t.setAttribute("aria-busy",String(n))}function p(e){a=e;const o=Array.from(n.querySelectorAll('[pgs~="search-suggestions-item"]'));o.forEach((e,t)=>{const n=t===a;e.setAttribute("aria-selected",String(n)),pgs(e).state.toggle("selected",n)});const r=o[a];r?(t.setAttribute("aria-activedescendant",r.id),r.scrollIntoView({block:"nearest"})):t.removeAttribute("aria-activedescendant")}function g(e){if(!s.length)return;let t=a;for(let n=0;n<s.length;n+=1)if(t=(t+e+s.length)%s.length,!s[t].disabled)return void p(t)}function f(){s=[],a=-1,n.replaceChildren(),I(e)}function m(){null!==c&&window.clearTimeout(c),c=null,l&&l.abort(),l=null,d+=1,u(!1)}async function h(o=t.value){m(),f();const r=String(o??"").trim();if(r.length<i.minLength||!i.source)return[];const c=d;l=new AbortController;const p=l;u(!0);try{const o=await async function(n,o){if(Array.isArray(i.source)){const e=n.toLocaleLowerCase();return i.source.filter(t=>{const n=D(t);return n&&n.label.toLocaleLowerCase().includes(e)})}return"function"!=typeof i.source?[]:await i.source({query:n,signal:o,limit:i.limit,element:e,input:t})}(r,p.signal);return c!==d||p.signal.aborted?[]:function(t){s=Array.from(t||[]).map(D).filter(Boolean).slice(0,i.limit);const o=document.createDocumentFragment();return s.forEach((e,t)=>{const r=document.createElement("li");pgs(r).add("search-suggestions-item"),pgs(r).add("flexRow"),r.id=`${n.id}-option-${t}`,r.dataset.index=String(t),r.setAttribute("role","option"),r.setAttribute("aria-selected","false"),r.setAttribute("aria-disabled",String(e.disabled)),r.innerHTML='<i class="fa-solid fa-magnifying-glass"></i>'+e.label,o.append(r)}),a=-1,n.replaceChildren(o),pgs(e).state.remove("error"),s.length?j(e):I(e),s}(o)}catch(t){return"AbortError"===t?.name||c!==d||(f(),pgs(e).state.add("error"),e.dispatchEvent(new CustomEvent("pgs:search:error",{bubbles:!0,detail:{error:t,query:r}}))),[]}finally{l===p&&(l=null),c===d&&u(!1)}}function b(){m(),f(),pgs(e).state.remove("error"),t.value.trim().length<i.minLength||!i.source||(c=window.setTimeout(()=>{c=null,h(t.value)},i.debounce))}function y(n=a,o=i.submitOnSelect){const r=s[n];if(!r||r.disabled)return null;t.value=r.value,m(),f();const c={item:r,index:n,value:r.value,input:t,element:e};return e.dispatchEvent(new CustomEvent("pgs:search:select",{bubbles:!0,detail:c})),i.onSelect?.(c),t.focus(),o&&"function"==typeof e.requestSubmit&&e.requestSubmit(),r}function v(e={}){return i=function(e,t={}){const n={...e,...t};return n.minLength=Math.max(0,Number.parseInt(n.minLength,10)||0),n.debounce=Math.max(0,Number.parseInt(n.debounce,10)||0),n.limit=Math.max(1,Number.parseInt(n.limit,10)||_.limit),n.submitOnSelect=Boolean(n.submitOnSelect),n.searchOnFocus=Boolean(n.searchOnFocus),n.source="function"==typeof n.source||Array.isArray(n.source)?n.source:null,n.onSelect="function"==typeof n.onSelect?n.onSelect:null,n}(i,e),L}function w(){b()}function A(){s.length?j(e):i.searchOnFocus&&b()}function S(t){return"ArrowDown"===t.key?(pgs(e).state.contains("open")||b(),void(s.length&&(t.preventDefault(),g(1)))):"ArrowUp"===t.key&&s.length?(t.preventDefault(),void g(-1)):"Enter"===t.key&&a>=0?(t.preventDefault(),void y(a)):"Escape"===t.key?(t.preventDefault(),m(),void I(e)):void("Tab"===t.key&&I(e))}function E(e){const t=e.target.closest('[pgs~="search-suggestions-item"]');t&&n.contains(t)&&(e.preventDefault(),y(Number.parseInt(t.dataset.index,10)))}function k(){m(),I(e)}const L={element:e,input:t,list:n,configure:v,setSource:e=>v({source:e}),search:h,open:()=>j(e),close:()=>I(e),clear:f,cancel:m,select:y,refresh:()=>h(t.value),destroy:function(){m(),f(),t.removeEventListener("input",w),t.removeEventListener("focus",A),t.removeEventListener("keydown",S),n.removeEventListener("pointerdown",E),e.removeEventListener("submit",k),M.delete(e)},items:()=>[...s],isOpen:()=>pgs(e).state.contains("open"),isLoading:()=>pgs(e).state.contains("loading"),setActiveIndex:p};t.addEventListener("input",w),t.addEventListener("focus",A),t.addEventListener("keydown",S),n.addEventListener("pointerdown",E),e.addEventListener("submit",k),M.set(e,L)})}document.addEventListener("pointerdown",e=>{T.forEach(t=>{t.contains(e.target)||I(t)})}),$();const N={init:$,api:function(e){return M.get(e)}};function B(e,t){const n=(()=>{let e=0,t=0,n=0,o=!1;return{update:function(r){const i=performance.now(),s=i-e;let a=Math.abs(r.deltaY);return 1===r.deltaMode?a*=16:2===r.deltaMode&&(a*=r.currentTarget?.clientHeight||800),a<30&&s<35&&t++,n++,n>=6&&(o=t>=3,t=0,n=0),e=i,o},get value(){return o}}})(),o=o=>{if(n.update(o))return;if(o.ctrlKey)return;if(Math.abs(o.deltaX)>Math.abs(o.deltaY))return;let r=o.deltaY;1===o.deltaMode?r*=16:2===o.deltaMode&&(r*=e.clientHeight);const i=e.scrollLeft<=0,s=e.scrollLeft+e.clientWidth>=e.scrollWidth-1;(r>0&&!s||r<0&&!i)&&(o.preventDefault(),e.scrollLeft+=r*t)};return e.addEventListener("wheel",o,{passive:!1}),()=>e.removeEventListener("wheel",o)}const P=new WeakMap;class R{constructor({element:e,viewRatio:t=.97,optionIntersectionObserver:n={},scrollOptions:o={}}={}){this.element=e,this.viewRatio=t,this.optionIntersectionObserver={threshold:Array.from({length:101},(e,t)=>t/100),rootMargin:"0px",...n},this.scrollOptions={behavior:"smooth",inline:"center",block:"nearest",container:"nearest",...o},this.container=this.element?pgs(this.element).querySelector("slides-container"):null}#e(){const e=this.element;pgs(e).querySelector("slides-prec")||e.insertAdjacentHTML("afterbegin",'<button pgs="slides-prec buttonIcon" type="button" class="precButton" aria-label="slide precedente"> <span> <i class="fa-solid fa-arrow-left"></i></span></button>'),pgs(e).querySelector("slides-next")||e.insertAdjacentHTML("beforeend",'<button pgs="slides-next buttonIcon" type="button" class="nextButton" aria-label="prossima slide"> <span> <i class="fa-solid fa-arrow-right"></i></span></button>'),pgs(e).querySelector("slides-dots")||e.insertAdjacentHTML("beforeend",'<div pgs="slides-dots" class="slides-dots"></div>');const t=pgs(e).querySelector("slides-dots");for(;t.children.length<this.container.children.length;)t.insertAdjacentHTML("beforeend",'<button type="button" class="slide-dot"></button>');for(;t.children.length>this.container.children.length;)t.lastElementChild.remove();Array.from(t.children).forEach((e,t)=>{e.setAttribute("aria-label",`vai alla slide ${t+1}`)})}#t(){const e=this.container.querySelectorAll(".view");let t;t=pgs(this.element).option.contains("singleScroll")?e[e.length-1]:e[0];const n=t?.previousElementSibling;n?.scrollIntoView(this.scrollOptions),n?.focus({preventScroll:!0})}#n(){const e=this.container.querySelectorAll(".view");let t;t=pgs(this.element).option.contains("singleScroll")?e[0]:e[e.length-1];const n=t?.nextElementSibling;n?.scrollIntoView(this.scrollOptions),n?.focus({preventScroll:!0})}#o(e){this.container.children[e]?.scrollIntoView(this.scrollOptions)}#r(e,t,n,o,r){e.forEach(e=>{const i=.9+.1*e.intersectionRatio,s=i>=.98;!pgs(e.target).option.contains("notScrollAnimation")&&e.target.firstElementChild&&e.target.firstElementChild.style.setProperty("--visible-percent",`${i}`),e.target.classList.toggle("view",s),e.target.classList.toggle("notView",!s);const a=e.target.parentNode.children,c=a[0].classList.contains("view"),l=a[a.length-1].classList.contains("view");o.disabled=l,n.disabled=c,o.setAttribute("aria-disabled",String(l)),n.setAttribute("aria-disabled",String(c));const d=Array.from(t.children).filter(e=>e.classList.contains("view"));r.forEach((e,n)=>{const o=d.some(e=>Array.from(t.children).indexOf(e)===n);e.classList.toggle("active",o),e.setAttribute("aria-current",o?"true":"false")})})}execute(){const e=this.element;if(!this.container)return;const t=new AbortController,{signal:n}=t;this.#e();const o=pgs(e).querySelector("slides-prec"),r=pgs(e).querySelector("slides-next"),i=Array.from(pgs(e).querySelector("slides-dots").children),s=pgs(e).option.contains("notScrollWithMouse")?null:B(this.container,5);i.forEach((e,t)=>e.addEventListener("click",()=>this.#o(t),{signal:n})),o.addEventListener("click",()=>this.#t(),{passive:!0,signal:n}),r.addEventListener("click",()=>this.#n(),{passive:!0,signal:n});const a=new IntersectionObserver(e=>this.#r(e,this.container,o,r,i),{root:this.container,...this.optionIntersectionObserver});let c;Array.from(this.container.children).forEach(e=>a.observe(e));const l=()=>{P.get(this.element)===c&&(t.abort(),a.disconnect(),s?.(),P.delete(this.element))};c={element:this.element,container:this.container,previous:()=>this.#t(),next:()=>this.#n(),goTo:e=>this.#o(e),getCurrentIndexes:()=>Array.from(this.container.children).map((e,t)=>e.classList.contains("view")?t:-1).filter(e=>-1!==e),getCurrentElements:()=>Array.from(this.container.children).filter(e=>e.classList.contains("view")),getTotal:()=>this.container.children.length,isAtStart:()=>this.container.children[0]?.classList.contains("view")||!1,isAtEnd:()=>{const e=this.container.children,t=e[e.length-1];return t?.classList.contains("view")||!1},refresh:()=>(P.get(this.element)!==c||(l(),new R({element:this.element,viewRatio:this.viewRatio,optionIntersectionObserver:this.optionIntersectionObserver,scrollOptions:this.scrollOptions}).execute()),P.get(this.element))},P.set(this.element,c)}}function V(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("slides")?[e]:[];return t.push(...pgs(e).querySelectorAll("slides")),t})(e).forEach(e=>{P.has(e)||new R({element:e}).execute()})}V();const H={init:V,api:function(e){return P.get(e)}},z=new WeakMap;function F(e=document){pgs(e).querySelectorAll("steps").forEach(e=>{z.has(e)||(pgs(e).querySelectorAll("steps-step").forEach((e,t)=>{let n;if(pgs(e).querySelector("steps-step-circle")?n=pgs(e).querySelector("steps-step-circle"):(n=document.createElement("span"),pgs(n).add("steps-step-circle"),n.textContent=t+1,e.insertAdjacentElement("afterbegin",n)),!pgs(e).querySelector("steps-step-line")){const t=document.createElement("span");pgs(t).add("steps-step-line"),e.insertAdjacentElement("afterbegin",t)}}),z.set(e,{element:e,steps:()=>Array.from(pgs(e).querySelectorAll("steps-step")),getStep:t=>pgs(e).querySelectorAll("steps-step")[t],getTotal:()=>pgs(e).querySelectorAll("steps-step").length,refresh:()=>(z.delete(e),F(e.parentNode||document),z.get(e))}))})}F();const W={init:F,api:function(e){return z.get(e)}},G=new WeakMap;function Y(e=document){pgs(e).querySelectorAll("stepTabs").forEach(e=>{if("true"===e.dataset.stepTabsInitialized)return;e.dataset.stepTabsInitialized="true";const t=pgs(e).querySelector("stepTabs-prev"),n=pgs(e).querySelector("stepTabs-next"),o=pgs(e).querySelector("stepTabs-restart"),r=pgs(e).querySelector("stepTabs-dots"),i=pgs(e).querySelector("stepTabs-container"),s=pgs(i).querySelectorAll("tab"),a=s.length,c=Array.from(s).filter(e=>pgs(e).state.contains("is-locked"));let l=0;t&&(t.disabled=!0);let d=!1;if(!i||0===a)return;const u=[];function p(e,t,n){e&&n!==pgs(e).state.contains(t)&&pgs(e).state.toggle(t,n)}function g(){const e=s[l];t&&(t.disabled=0===l),n&&(n.disabled=l===a-1||pgs(e).state.contains("is-locked"))}function f(t,n=!0){l=Math.min(Math.max(t,0),a-1);const o=s[l];d=!0,s.forEach((e,t)=>p(e,"is-active",t===l)),g(),u.forEach((e,t)=>{p(e,"is-active",t===l),p(e,"is-completed",t<l)}),d=!1,n&&!e.closest("dialog")&&(o?.focus(),e?.scrollIntoView({behavior:"smooth",block:"start"})),e.dispatchEvent(new CustomEvent("stepTabs:change",{detail:{current:l,total:a}}))}function m(){f(0),c.forEach(e=>pgs(e).state.add("is-locked"))}r&&(r.innerHTML="",s.forEach((e,t)=>{const n=pgs(e).option.getValueBrackets("tabIcon")||"fa-circle",o=document.createElement("button");o.type="button",pgs(o).add("stepTabs-dots-dot"),pgs(o).option.setValueBrackets("step",t),o.innerHTML=`<i class="fa-solid ${n}"></i>`,o.addEventListener("click",()=>{pgs(o).state.contains("is-completed")&&f(t,!0)}),r.appendChild(o),u.push(o)})),f(0,!1);const h=new MutationObserver(()=>{d||g()});s?.forEach(e=>h.observe(e,{attributes:!0,attributeFilter:["pgs-state"]})),t?.addEventListener("click",e=>f(l-1)),n?.addEventListener("click",e=>{g(),n.disabled||f(l+1)}),o?.addEventListener("click",e=>m(),{capture:!0}),G.set(e,{element:e,container:i,restart:m,goTo:f,next:()=>f(l+1),prev:()=>f(l-1),toggleLock:(e,t=!0)=>"number"==typeof e&&s[e]&&(pgs(s[e]).state.toggle("is-locked",t),f(l)),refresh:()=>(Y(e.parentNode||document),G.get(e)),getCurrent:()=>l,getState:()=>({current:l,total:a})})})}Y();const U={init:Y,api:function(e){return G.get(e)}},J=new WeakMap;let K=0;function X(e,t){return Array.from(e.children).find(e=>pgs(e).contains(t))}function Q(e=document){pgs(e).querySelectorAll("summary").forEach(e=>{if(J.has(e))return;const t=X(e,"summary-content"),n=X(e,"summary-button");if(!t||!n)return;const o=(K+=1,K),r=t.id||`summary-content-${o}`;function i(){return pgs(e).state.contains("open")}function s(){return 3*function(e){const t=window.getComputedStyle(e),n=parseFloat(t.lineHeight);if(Number.isFinite(n))return n;const o=parseFloat(t.fontSize);return Number.isFinite(o)?1.2*o:0}(t)}function a(o){const r=t.scrollHeight>Math.ceil(s())+1;pgs(e).state.toggle("overflow",r),pgs(e).state.toggle("open",o&&r),n.hidden=!r,n.setAttribute("aria-hidden",String(!r)),n.setAttribute("aria-expanded",String(o&&r)),n.textContent=o&&r?"Mostra meno":"Mostra di più";const i=o&&r?t.scrollHeight:s();t.style.setProperty("--summary-content-max-height",`${i}px`)}function c(){const e=i();t.style.setProperty("--summary-content-max-height","none"),a(e)}function l(){a(!i())}t.id=r,n.type||="button",n.setAttribute("aria-controls",t.id),n.addEventListener("click",l),window.addEventListener("resize",c,{passive:!0}),c(),requestAnimationFrame(c),J.set(e,{element:e,content:t,button:n,open:()=>a(!0),close:()=>a(!1),toggle:l,refresh:c,isOpen:i})})}Q();const Z={init:Q,api:function(e){return J.get(e)}},ee={_escapeHtml:e=>String(e??""),_getDuration(e){const t=e.duration,n=Number.parseInt(t,10);return Number.isNaN(n)?5e3:n},_getApi:e=>"toast"===String(e.element||"notification").trim()?ne.toast:ne.alert,_getType(e,t){const n=String(e.type||"info").trim();return"function"==typeof t[n]?n:"info"},_getData(e){const t=pgs(e).option.getValueBrackets("notification")||"{}";try{return JSON.parse(t)}catch(e){return console.warn("PGS notification: configurazione JSON non valida",e),{}}},_getContent(e,t){const n=this._escapeHtml(t),o=this._escapeHtml(e);return o?n?`\n <span pgs="notification-element-title">${o}</span>\n <br>\n <span pgs="notification-element-content">${n}</span>\n `:`<span pgs="notification-element-title">${o}</span>`:n},_getContainer:e=>Array.from(pgs(document).querySelectorAll("notification")).find(t=>{const n=pgs(t).option.contains("toast");return"toast"===e?n:!n}),initNotification(e,t,n,o,r,i="replace",s=null){let a=this._getContainer(t);if(!a){const e=document.createElement("div");pgs(e).add("notification"),"toast"===t&&pgs(e).option.add("toast"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-relevant","additions"),document.body.appendChild(e),a=e}const c=document.createElement(s?"a":"div");function l(){"stack"==i?c.style.translate="120%":c.style.opacity="0",setTimeout(()=>c.remove(),300)}"replace"==i&&(a.innerHTML=""),s&&(c.href=s),r>0&&c.style.setProperty("--notification-timeout",r+"ms"),pgs(c).state.add(e),pgs(c).add("notification-element"),c.setAttribute("role","error"==e?"alert":"status"),c.innerHTML=`${n} <p>${o}</p>`,a.appendChild(c),r>0&&setTimeout(()=>{l()},r);const d=document.createElement("button");d.type="button",d.ariaLabel="Rimuovi notifica",d.innerHTML='<i class="fa-solid fa-xmark"></i>',d.setAttribute("pgs","buttonClose"),c.insertAdjacentElement("afterbegin",d),d.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),l()})},deleteAll(e){let t=this._getContainer(e);t&&(t.innerHTML="")},trigger(e=document){pgs(e).querySelectorAll("notificationTrigger").forEach(e=>{if(!e||"true"===e.dataset.initialize)return;e.dataset.initialize="true";const t=this._getData(e),n=String(t.title||"").trim(),o=String(t.message||"").trim();if(!n&&!o)return void e.remove();const r=t.link||null,i=t.icon||void 0,s=this._getDuration(t),a=this._getApi(t),c=this._getType(t,a),l=this._getContent(n,o);a===ne.toast?a[c](l,s,i):a[c](l,r,s,i),e.remove()})}};function te(e=document){return ee.trigger(e)}const ne={trigger:te,alert:{error:(e="Errore",t=null,n=0,o='<i class="fa-solid fa-circle-xmark"></i>')=>ee.initNotification("error","notification",o,e,n,"stack",t),success:(e="Aggiornato",t=null,n=0,o='<i class="fa-solid fa-check"></i>')=>ee.initNotification("success","notification",o,e,n,"stack",t),info:(e="Aggiornamento",t=null,n=0,o='<i class="fa-solid fa-circle-info"></i>')=>ee.initNotification("info","notification",o,e,n,"stack",t),warning:(e="Attenzione",t=null,n=0,o='<i class="fa-solid fa-triangle-exclamation"></i>')=>ee.initNotification("warning","notification",o,e,n,"stack",t),deleteAll:()=>ee.deleteAll("notification")},toast:{error:(e="Errore",t=4e3,n='<i class="fa-solid fa-circle-xmark"></i>')=>ee.initNotification("error","toast",n,e,t),success:(e="Aggiornato",t=4e3,n='<i class="fa-solid fa-check"></i>')=>ee.initNotification("success","toast",n,e,t),info:(e="Aggiornamento",t=0,n='<i class="fa-solid fa-circle-info"></i>')=>ee.initNotification("info","toast",n,e,t),warning:(e="Attenzione",t=4e3,n='<i class="fa-solid fa-triangle-exclamation"></i>')=>ee.initNotification("warning","toast",n,e,t),deleteAll:()=>ee.deleteAll("toast")}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>te()):te(),e.registerModules({svg:i,accordion:d,dropdown:A,menu:k,modal:x,notification:ne,search:N,slides:H,stepTabs:U,steps:W,summary:Z,formValidate:class{#i={};#s=!1;constructor(e,t={}){if(!t||"object"!=typeof t||Array.isArray(t))throw new TypeError("options must be an object");this.container=e,this._rules=[],this.message={fieldError:"Please complete this field.",fieldsError:"Please complete all required fields.",success:"Submitted successfully."},void 0!==t.message&&(this.message=t.message),this.container?.setAttribute("novalidate","")}get message(){return{...this.#i}}set message(e){if(!e||"object"!=typeof e||Array.isArray(e))throw new TypeError("message must be an object");this.#i={...this.#i,...e}}#a={isRequired:e=>!!e&&((!0===e.required||"true"===e?.dataset?.required||"true"==e?.getAttribute("aria-required"))&&!e.hidden),isEmptyTextLike:e=>!String(e?.value??"").trim(),isEmptySelect:e=>!String(e?.value??"").trim(),getGroupName:e=>e?.name||e?.getAttribute?.("name")||""};#c(e){const t=[];for(const n of this._rules){const o=n(e);o&&(Array.isArray(o)?t.push(...o):t.push(o))}const n=Array.from(e.querySelectorAll("input")).filter(e=>!e.disabled&&"hidden"!==e.type&&"checkbox"!==e.type&&"radio"!==e.type&&"file"!==e.type&&!!this.#a.isRequired(e)&&this.#a.isEmptyTextLike(e)),o=Array.from(e.querySelectorAll("textarea")).filter(e=>!e.disabled&&!!this.#a.isRequired(e)&&this.#a.isEmptyTextLike(e)),r=Array.from(e.querySelectorAll("select")).filter(e=>!e.disabled&&!!this.#a.isRequired(e)&&this.#a.isEmptySelect(e)),i=Array.from(e.querySelectorAll('input[type="radio"]')).filter(e=>!e.disabled),s=new Map;for(const e of i){if(!this.#a.isRequired(e))continue;const t=this.#a.getGroupName(e);t&&(s.has(t)||s.set(t,[]),s.get(t).push(e))}const a=[];for(const[e,t]of s.entries())t.some(e=>e.checked)||a.push(t[0]);const c=Array.from(e.querySelectorAll('input[type="checkbox"]')).filter(e=>!e.disabled),l=[],d=new Map;for(const e of c){if(!this.#a.isRequired(e))continue;const t=this.#a.getGroupName(e);t?(d.has(t)||d.set(t,[]),d.get(t).push(e)):e.checked||l.push(e)}const u=[];for(const[e,t]of d.entries())t.some(e=>e.checked)||u.push(t[0]);const p=Array.from(e.querySelectorAll('input[type="file"]')).filter(e=>!(e.disabled||!this.#a.isRequired(e)||e.files&&e.files.length>0));return[...new Set([n,o,r,a,l,u,p,t].flat())]}addFieldError(t,n=0,o=1){if(e(t).option.add("error"),0===n&&t.scrollIntoView(),0!==n)return;if(o>1)return void ne.toast.error(this.message.fieldsError);const r=e(t).option.getValueBrackets("message");ne.toast.error(r||this.message.fieldError)}removeFieldError(t){e(t).option.remove("error")}success(e=this.message.success){(this.#s||!0===this.validate())&&ne.toast.success(e)}validate(){const t=this.#c(this.container),n=this.container.querySelectorAll("input, textarea, select");Array.from(n).filter(e=>!e.disabled);for(const e of n)t.includes(e)||this.removeFieldError(e);return t.forEach((e,n)=>this.addFieldError(e,n,t.length)),n.forEach(e=>e.addEventListener("click",t=>this.removeFieldError(e))),t.length?(e(this.container).option.remove("success").add("error"),!1):(e(this.container).option.remove("error").add("success"),!0)}validator(e,t="submit"){if("function"!=typeof e)throw new TypeError("callback must be a function");if("string"!=typeof t||!t.trim())throw new TypeError("eventName must be a non-empty string");return this.container.addEventListener(t,t=>{if(t.preventDefault(),this.validate()){this.#s=!0;try{this.success(),e(t)}finally{this.#s=!1}}}),this}addNewRule(e){if("function"!=typeof e)throw new Error("Rule must be a function");return this._rules.push(e),this}},scrollHorizontal:B}),n(682),n(48)})()})();
|
|
1
|
+
(()=>{var e={795(){function e(e=!1,t){let n="true"===localStorage.getItem("screenIsDarkMode");e&&(n=!n,localStorage.setItem("screenIsDarkMode",n)),pgs(document.documentElement).state.toggle("darkmode",n),pgs(document.body).state.toggle("darkmode",n),function(e,t){e.forEach(e=>{const n=e.querySelector("i");n&&(n.classList.toggle("fa-moon",!t),n.classList.toggle("fa-sun",t))})}(t,n),document.dispatchEvent(new CustomEvent("pgs:svg:changeColor",{detail:{isDarkMode:n}}))}const t=pgs(document).querySelectorAll("toggleDarkmode");e(!1,t),t.forEach(n=>{n.addEventListener("click",()=>e(!0,t))})},359(){document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll('object[type="image/svg+xml"]').forEach(e=>{function t(t){if(!t)return;const n=t.querySelector("svg");if(!n)return;const o=window.getComputedStyle(e);n.setAttribute("preserveAspectRatio","cover"===o.objectFit?"xMidYMid slice":"xMidYMid meet")}function n(){const n=e.contentDocument;if(!n)return;if(!n.querySelector("svg"))return;if(t(n),e.__objectResizeObserver)return;let o=0;const r=new ResizeObserver(()=>{o||(o=requestAnimationFrame(()=>{o=0,t(n)}))});r.observe(e),e.__objectResizeObserver=r}e.contentDocument&&e.contentDocument.querySelector("svg")?n():e.addEventListener("load",n,{once:!0})}),document.body.classList.add("object-loaded")})},682(){const e=pgs(document).querySelector("header");!function(){if(!e)return;const t=pgs(e).querySelectorAll("header-element");t.length||console.log('For the header to work correctly, insert "header-element" under "header"'),t.length&&(t.forEach(t=>{let n,o=!1,r=0;const i=()=>{r||(r=requestAnimationFrame(()=>{r=0,function(r){let i,s=window.getComputedStyle(r),a=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),c=parseFloat(s.gap),l=parseInt(r.offsetWidth-a);if(o)i=n;else{let e=[];Array.from(r.children).filter(e=>!pgs(e).contains("header-element-onlyMobile")).forEach(t=>{pgs(t).contains("header-element-hamburger")||e.push(...t.children)}),c=Math.round(c*(e.length-1)),i=e.reduce((e,t)=>e+t.offsetWidth,0)-2+c}window.innerWidth<600?(pgs(e).state.add("mobileActive"),pgs(t).state.add("mobileActive")):l<i?(pgs(e).state.add("mobileActive"),pgs(r).state.add("mobileActive"),o=!0,n=i):(pgs(e).state.remove("mobileActive"),pgs(r).state.remove("mobileActive"))}(t)}))};new ResizeObserver(i).observe(t),i()}),window.addEventListener("resize",()=>{window.innerWidth>768&&(e.style.transform="translateY(0)")}))}();let t=0;function n(){t||(t=requestAnimationFrame(()=>{t=0,function(){if(!e)return;const t=window.getComputedStyle(document.documentElement).marginTop??0,n=e.offsetHeight+parseInt(t),o="true"===document.querySelector("header").getAttribute("data-header-scroll")?0:n;document.documentElement.style.setProperty("--heightOfHeader",`${n}px`),document.documentElement.style.setProperty("--heightOfHeaderScroll",`${o}px`)}()}))}e&&(new ResizeObserver(n).observe(e),document.fonts?.ready?.then(n)),n(),window.addEventListener("resize",n),window.addEventListener("scroll",n,{passive:!0});let o=window.scrollY;window.addEventListener("scroll",()=>{if(!e)return;let t=window.scrollY;window.innerHeight<=900&&(t>=80?t>o?(e.style.transform="translateY(-100%)",e.setAttribute("data-header-scroll",!0)):(e.style.transform="translateY(0px)",e.setAttribute("data-header-scroll",!1)):(e.style.transform="translateY(0)",e.setAttribute("data-header-scroll",!1))),o=t})},48(){const e="pgs_cookie_preferences_v1";function t(){window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(){window.dataLayer.push(arguments)}}function n(e,t,n){if(!(e instanceof HTMLElement&&t))return;const o=(e.getAttribute("pgs")||"").split(/\s+/).filter(Boolean),r=n?[...new Set([...o,t])]:o.filter(e=>e!==t);r.length>0?e.setAttribute("pgs",r.join(" ")):e.removeAttribute("pgs")}function o(){const o=pgs(document).querySelector("cookieConsent");if(!o)return;const r=o.querySelector('[pgs~="cookieConsent-toggleAnalytics"]'),i=o.querySelector('[pgs~="cookieConsent-actionAccept"]'),s=o.querySelector('[pgs~="cookieConsent-actionReject"]'),a=document.querySelectorAll('[pgs~="cookieConsent-actionOpen"]'),c=(o.dataset.gaId||"").trim(),l=c.length>0;let u=null;function d(e){o.hidden=!e,o.setAttribute("aria-hidden",String(!e)),document.body.classList.toggle("cookieConsent-open",e),e?(u=document.activeElement,setTimeout(()=>{o.focus()},0)):u instanceof HTMLElement&&u.focus({preventScroll:!0})}function p(){d(!1)}function g(r){!function(t){try{localStorage.setItem(e,JSON.stringify({...t,updatedAt:(new Date).toISOString()}))}catch(e){console.warn("PGS cookie consent: impossibile salvare le preferenze",e)}}({analytics:r}),n(o,"cookieConsent-accepted",!!r),n(o,"cookieConsent-declined",!r),function({allowAnalytics:e,measurementId:n}){t(),e?(window.gtag("consent","update",{analytics_storage:"granted"}),function(e){if(!e||window.__PGS_gaLoaded)return;window.__PGS_gaLoaded=!0;const t=document.createElement("script");t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,document.head.appendChild(t),window.gtag("js",new Date),window.gtag("config",e,{anonymize_ip:!0,allow_google_signals:!1})}(n)):window.gtag("consent","update",{analytics_storage:"denied"})}({allowAnalytics:!!r,measurementId:c})}!function({root:e,analyticsToggle:t,acceptAllButton:n,rejectButton:o,openButtons:r}){e.dataset.cookieComponent="consent",t?.setAttribute("data-cookie-toggle","analytics"),n?.setAttribute("data-cookie-action","accept"),o?.setAttribute("data-cookie-action","reject"),e.querySelector('[pgs~="cookieConsent-featureEssential"]')?.setAttribute("data-cookie-feature","essential"),e.querySelector('[pgs~="cookieConsent-featureAnalytics"]')?.setAttribute("data-cookie-feature","analytics"),r.forEach(e=>{e.setAttribute("data-cookie-action","open")})}({root:o,analyticsToggle:r,acceptAllButton:i,rejectButton:s,openButtons:a}),r&&(r.disabled=!l,l?n(o,"cookieConsent-gaUnavailable",!1):(r.checked=!1,n(o,"cookieConsent-gaUnavailable",!0))),t(),window.gtag("consent","default",{analytics_storage:"denied"}),i?.addEventListener("click",()=>{r&&l&&(r.checked=!0),g(!!l),p()}),s?.addEventListener("click",()=>{const e=!!r&&r.checked&&l;!e&&r&&(r.checked=!1),g(e),p()}),r?.addEventListener("change",e=>{!l&&e.target instanceof HTMLInputElement&&(e.target.checked=!1)}),o.addEventListener("keydown",e=>{if("Escape"===e.key)e.preventDefault(),p();else if("Tab"===e.key){const t=o.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const n=t[0],r=t[t.length-1];e.shiftKey||document.activeElement!==r||(e.preventDefault(),n.focus()),e.shiftKey&&document.activeElement===n&&(e.preventDefault(),r.focus())}}),a.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),d(!0)})});const f=function(){try{return function(e){try{return e?JSON.parse(e):null}catch(e){return console.warn("PGS cookie consent: impossibile leggere le preferenze",e),null}}(localStorage.getItem(e))}catch(e){return null}}();f&&"boolean"==typeof f.analytics?(r&&(r.checked=!!f.analytics&&l),g(f.analytics&&l),p()):d(!0)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o()}};const t={};function n(o){const r=t[o];if(void 0!==r)return r.exports;const i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(()=>{"use strict";function e(e){const t="pgs";if(!e)throw new TypeError("pgs(root): root richiesto");const n="function"==typeof e.getAttribute&&"function"==typeof e.setAttribute;if("function"!=typeof e.querySelector||"function"!=typeof e.querySelectorAll)throw new TypeError("pgs(root): root deve supportare querySelector/querySelectorAll");function o(t){throw new TypeError(`pgs(${e.nodeName||"root"}).${t}(): disponibile solo su Element (non su Document)`)}function r(e){return Array.isArray(e)&&(e=e.join(",")),String(e).split(",").map(e=>e.trim()).filter(Boolean).map(e=>`[${t}~="${e}"]`).join(",")}function i(e,n=" "){return(e.getAttribute(t)||"").split(n).filter(Boolean)}function s(e,n,o=" "){e.setAttribute(t,n.join(o))}const a=function(){function a(){return a}return a.querySelector=function(t){return e.querySelector(r(t))},a.querySelectorAll=function(t){return e.querySelectorAll(r(t))},a.add=function(...t){if(!n)return o("add");const r=i(e);for(const e of t)r.includes(e)||r.push(e);return s(e,r),a},a.remove=function(...t){return n?(s(e,i(e).filter(e=>!t.includes(e))),a):o("remove")},a.toggle=function(t,r){if(!n)return o("toggle");const s=i(e).includes(t);return void 0!==r?(r&&!s&&a.add(t),!r&&s&&a.remove(t),!!r):s?(a.remove(t),!1):(a.add(t),!0)},a.contains=function(t){return n?i(e).includes(t):o("contains")},Object.defineProperty(a,"value",{get(){if(n)return e.getAttribute(t)},set(r){if(!n)return o("value");e.setAttribute(t,r)}}),a}();return a.state=function(t){if(!n)return;const o=(n=" ")=>(e.getAttribute(t)||"").split(n).filter(Boolean),r=(n,o=" ")=>e.setAttribute(t,n.join(o));function i(...e){return i.add(...e),i}return i.add=function(...e){const t=e.flat().map(e=>String(e).trim()).filter(Boolean),n=o();for(const e of t)n.includes(e)||n.push(e);return r(n),i},i.remove=function(...e){const t=e.flat().map(e=>String(e).trim()).filter(Boolean),n=o().filter(e=>!t.includes(e));return r(n),i},i.toggle=function(e,t){const n=String(e).trim();if(!n)return!1;const i=o(),s=i.includes(n);return void 0!==t?(t&&!s&&(i.push(n),r(i)),!t&&s&&r(i.filter(e=>e!==n)),!!t):s?(r(i.filter(e=>e!==n)),!1):(i.push(n),r(i),!0)},i.contains=function(e){const t=String(e).trim();return!!t&&o().includes(t)},Object.defineProperty(i,"value",{get:()=>e.getAttribute(t),set(n){e.setAttribute(t,n)}}),i}("pgs-state"),a.option=function(t){if(!n)return;const o=()=>(e.getAttribute(t)||"").match(/[^\s[\]]+(?:\[[^\]]*\])?/g)||[],r=n=>e.setAttribute(t,n.join(" ")),i=e=>String(e).trim().match(/^[^\s[\]]+/)?.[0]||"",s=e=>e.flat().flatMap(e=>String(e).match(/[^\s[\]]+(?:\[[^\]]*\])?/g)||[]).filter(Boolean);function a(){return a}return a.add=function(...e){const t=o();return s(e).forEach(e=>{t.includes(e)||t.push(e)}),r(t),a},a.remove=function(...e){const t=s(e).map(i).filter(Boolean);return r(o().filter(e=>!t.includes(i(e)))),a},a.toggle=function(e,t){const n=i(e);if(!n)return!1;const o=a.contains(n);return void 0!==t?(t&&!o&&a.add(e),!t&&o&&a.remove(n),!!t):o?(a.remove(n),!1):(a.add(e),!0)},a.contains=function(n){const o=e.getAttribute(t)||"",r=String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?:^|\\s)${r}(?:\\[[^\\]]*\\])?(?=\\s|$)`).test(o)},a.getValueBrackets=function(n){const o=e.getAttribute(t)||"",r=String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=o.match(new RegExp(`(?:^|\\s)${r}\\[([^\\]]*)\\]`));return i?i[1]:void 0},a.setValueBrackets=function(e,t=""){const n=i(e);if(!n)return a;const s=`${n}[${String(t).trim()}]`,c=o().filter(e=>i(e)!==n);return c.push(s),r(c),a},Object.defineProperty(a,"value",{get:()=>e.getAttribute(t),set(n){e.setAttribute(t,n)}}),a}("pgs-option"),a}const t={};function o(e,n){const o=String(e||"").trim().replace(/^pgs[_-\s]*/i,"").toLowerCase();if(!o)throw new TypeError("pgs.registerImport(...modules): ogni modulo deve avere name o PGS_name");t[o]={name:e,module:n}}e.registerImport=function(...t){return t.flat().forEach(e=>{!e||"object"!=typeof e||e.PGS_name||e.name?o(e?.PGS_name||e?.name,e):Object.entries(e).forEach(([e,t])=>o(e,t))}),e},e.registerModules=function(t={}){return Object.entries(t).forEach(([t,n])=>{const o=String(t||"").trim();if(o){if(Object.prototype.hasOwnProperty.call(e,o)&&e[o]!==n)throw new Error(`pgs.registerModules(): "${o}" e' gia' definito su pgs`);e[o]=n}}),e},e.import=function(...e){return e.flat().reduce((e,n)=>{const o=String(n||"").trim().replace(/^pgs[_-\s]*/i,"").toLowerCase(),r=t[o];if(!r)throw new Error(`pgs.import(): modulo "${n}" non registrato`);return e[r.name]=r.module,e},{})},globalThis.pgs??=e,n(795);const r={eventChangeColor:"pgs:svg:changeColor",watchedObjects:new WeakSet,watchedLotties:new WeakSet,_normalizeColor:(e="")=>e.replace(/\s/g,"").toLocaleLowerCase(),_getCurrentDarkmode:()=>pgs(document.documentElement).state.contains("darkmode"),searchColor(e="svg"){const t=getComputedStyle(document.documentElement),n=[];for(let o=0;o<20;o++){const r=t.getPropertyValue("--"+e+"-color-"+o).toLocaleLowerCase().split("&").map(e=>e.trim());r[0]&&r[1]&&n.push([r[0],r[1]])}return n},_changeColor(e,t,n){e&&e.querySelectorAll("[fill], [stroke]").forEach(e=>{for(const o of n){const n=r._normalizeColor(o[0]),i=r._normalizeColor(o[1]);["fill","stroke"].forEach(o=>{const s=r._normalizeColor(e.getAttribute(o)||"");s&&(e.style.transition="fill 0.5s ease, stroke 0.5s ease",t&&s===n&&e.setAttribute(o,i),t||s!==i||e.setAttribute(o,n))})}})},_getLottieSvg:e=>e.shadowRoot?.querySelector("svg")||null,init(){document.addEventListener(r.eventChangeColor,e=>{r.applyColorsSVG(e.detail?.isDarkMode??r._getCurrentDarkmode()),r.applyColorsLottie(e.detail?.isDarkMode??r._getCurrentDarkmode())}),document.addEventListener("DOMContentLoaded",()=>{r.applyColorsSVG(),r.applyColorsLottie()})},applyColorsSVG(e=r._getCurrentDarkmode()){const t=r.searchColor("svg");pgs(document).querySelector("svgChangeColor")&&document.querySelectorAll('object[type="image/svg+xml"]').forEach(n=>{r.watchedObjects.has(n)||(n.addEventListener("load",()=>r._changeColor(n.contentDocument,r._getCurrentDarkmode(),r.searchColor("svg"))),r.watchedObjects.add(n)),n.contentDocument&&r._changeColor(n.contentDocument,e,t)})},applyColorsLottie(e=r._getCurrentDarkmode()){const t=r.searchColor("svg");pgs(document).querySelector("lottieChangeColor")&&document.querySelectorAll("lottie-player").forEach(n=>{r.watchedLotties.has(n)||(n.addEventListener("load",()=>r._changeColor(r._getLottieSvg(n),r._getCurrentDarkmode(),r.searchColor("svg"))),r.watchedLotties.add(n)),n.shadowRoot&&r._changeColor(r._getLottieSvg(n),e,t)})}};r.init();const i={eventChangeColor:r.eventChangeColor,applyColorsSVG:e=>r.applyColorsSVG(e),applyColorsLottie:e=>r.applyColorsLottie(e)};n(359);const s=new WeakMap;let a=0;function c(e,t){return Array.from(e.children).find(e=>pgs(e).contains(t))}function l(e=document){pgs(e).querySelectorAll("accordion").forEach(e=>{if(s.has(e))return;const t=c(e,"accordion-button"),n=c(e,"accordion-content");if(!t||!n)return;const o=(a+=1,a),r=`acc-btn-${o}`,i=`acc-panel-${o}`,u=pgs(e).state.contains("open");function d(e,t,n){const o=(t?.textContent||"").trim().replace(/\s+/g," ");t.setAttribute("aria-label",`${e?"Chiudi":"Apri"} ${o||"sezione"}`),t.setAttribute("aria-expanded",String(e)),n.hidden=!e}function p(){const o=!pgs(e).state.contains("open");pgs(e).state.toggle("open",o),d(o,t,n),function(){for(const t of pgs(document).querySelectorAll("accordion")){if(t===e)continue;const n=pgs(t).querySelector("accordion-button"),o=pgs(t).querySelector("accordion-content");n&&o&&(pgs(t).state().remove("open"),d(!1,n,o))}}(),o&&setTimeout(()=>e.scrollIntoView({block:"nearest",inline:"nearest"}),100)}t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.id||t.setAttribute("id",r),n.id||n.setAttribute("id",i),t.setAttribute("aria-controls",n.id),n.setAttribute("role","region"),n.setAttribute("aria-labelledby",t.id),d(u,t,n),t.addEventListener("click",p),t.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),p())}),s.set(e,{element:e,button:t,content:n,open:function(){pgs(e).state.contains("open")||p()},close:function(){pgs(e).state.contains("open")&&p()},toggle:p,refresh:()=>(l(e.parentNode||document),s.get(e)),isOpen:()=>pgs(e).state.contains("open")})})}l();const u={init:l,api:function(e){return s.get(e)}},d=new WeakMap,p=new Set;let g=0;function f(e){return e instanceof Element&&pgs(e).contains("dropdown-content")}function m(e){const t=d.get(e);if(!t||!t.isOpen())return;const{trigger:n,content:o}=t,{side:r,align:i}=function(e){const t=(pgs(e).option.getValueBrackets("position")||"bottom center").trim().toLowerCase().split(/\s+/).filter(Boolean),n=t.find(e=>["top","right","bottom","left"].includes(e))||"bottom",o=t.find(e=>["top","right","bottom","left","center"].includes(e)&&e!==n)||"center";return{side:n,align:o}}(e),s=n.getBoundingClientRect(),a=o.getBoundingClientRect(),c=document.documentElement.clientWidth,l=Math.max(8,c-a.width-8);let u=s.left+(s.width-a.width)/2,p=s.bottom+8;var g,f;"top"!==r&&"bottom"!==r||(p="top"===r?s.top-a.height-8:s.bottom+8,"left"===i&&(u=s.left),"right"===i&&(u=s.right-a.width)),"left"!==r&&"right"!==r||(u="left"===r?s.left-a.width-8:s.right+8,p=s.top+(s.height-a.height)/2,"top"===i&&(p=s.top),"bottom"===i&&(p=s.bottom-a.height)),"left"===r&&u<8&&(u=s.right+8),"right"===r&&u+a.width>c-8&&(u=s.left-a.width-8),g=u,f=l,u=Math.min(Math.max(g,8),f),o.style.setProperty("--dropdown-left",`${Math.round(u)}px`),o.style.setProperty("--dropdown-top",`${Math.round(p)}px`)}function h(){p.forEach(m)}function b(e){const t=d.get(e);t&&t.isOpen()&&(pgs(e).state.remove("open"),t.trigger.setAttribute("aria-expanded","false"),p.delete(e))}function y(e){const t=d.get(e);t&&!t.isOpen()&&(p.forEach(t=>{t!==e&&b(t)}),pgs(e).state.add("open"),t.trigger.setAttribute("aria-expanded","true"),p.add(e),m(e))}function v(e){const t=d.get(e);t&&(t.isOpen()?b(e):y(e))}function w(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("dropdown")?[e]:[];return t.push(...pgs(e).querySelectorAll("dropdown")),t})(e).forEach(e=>{if(d.has(e))return;const t=(n=e,Array.from(n.children).find(f)||pgs(n).querySelector("dropdown-content"));var n;if(!t)return;const o=function(e,t){const n=Array.from(e.children).filter(e=>e!==t);return n.find(e=>pgs(e).contains("dropdown-button"))||n.find(e=>!f(e))||e}(e,t),r=(g+=1,g);o.id||(o.id=`dropdown-btn-${r}`),t.id||(t.id=`dropdown-panel-${r}`),o.matches("button")&&!o.hasAttribute("type")&&o.setAttribute("type","button"),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-controls",t.id),o.setAttribute("aria-expanded",String(pgs(e).state.contains("open"))),t.setAttribute("aria-labelledby",o.id);const i={element:e,trigger:o,content:t,open:()=>y(e),close:()=>b(e),toggle:()=>v(e),refresh:()=>(w(e.parentNode||document),m(e),d.get(e)),isOpen:()=>pgs(e).state.contains("open")};o.addEventListener("click",t=>{f(t.target)||(t.preventDefault(),t.stopPropagation(),v(e))}),t.addEventListener("click",e=>e.stopPropagation()),d.set(e,i),i.isOpen()&&p.add(e),m(e)})}document.addEventListener("click",e=>{var t;t=e.target,Array.from(p).some(e=>e.contains(t))||p.forEach(b)}),document.addEventListener("keydown",e=>{"Escape"===e.key&&p.forEach(b)}),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),w();const A={init:w,api:function(e){return d.get(e)}},S=new WeakMap;function E(e=document){pgs(e).querySelectorAll("menu").forEach(e=>{S.has(e)||(e.querySelectorAll("li").forEach(e=>{const t=e.querySelector("ul");if(t){const n=document.createElement("button");n.type="button",n.innerHTML="<span>⏷</span>",pgs(n).add("menu-buttonIcon"),e.querySelector("a").insertAdjacentElement("afterend",n),pgs(e).add("dropdown"),pgs(e).option.setValueBrackets("position","bottom right"),pgs(n).add("dropdown-button"),pgs(n).add("button"),pgs(n).option.add("buttonNohover"),pgs(t).add("dropdown-content")}}),S.set(e,{element:e,type:"horizontal",refresh:()=>(E(e.parentNode||document),S.get(e))}),A.init(e))})}E();const k={init:E,api:function(e){return S.get(e)}},L=new WeakMap;function C(e,t=null){if(L.has(e))return;const n=pgs(e).querySelector("modal-button"),o=t||e.querySelector("dialog");if(!n||!o)return;const r=new AbortController,{signal:i}=r;let s=null,a=null;const c='<button pgs="button modal-close" pgs-option="buttonClose" type="button" tabindex="0" aria-label="Chiudi"><i class="fa-solid fa-close"></i></button>',l=pgs(o).querySelector("modal-dialog-content-header"),u=pgs(e).option.contains("disableBackdropClose"),d=pgs(e).option.contains("history"),p=pgs(e).option.getValueBrackets("containerID"),g=pgs(e).option.getValueBrackets("containerPGS"),f=pgs(o).option.contains("topLevel");pgs(o).querySelector("modal-close")||pgs(e).querySelector("modal-close")||(l?l.insertAdjacentHTML("beforeend",c):o.insertAdjacentHTML("beforeend",c));const m=pgs(o).querySelector("modal-close")||pgs(e).querySelector("modal-close");function h(e=!0){n?.setAttribute("aria-expanded",e),o?.setAttribute("aria-expanded",e)}function b(t){t?.stopImmediatePropagation(),o.open?y(t):(o.open||document.querySelectorAll("dialog[open]").forEach(e=>e.close()),h(!0),f?o.showModal():o.show(),e.dispatchEvent(new CustomEvent("modal:open")),o.dispatchEvent(new CustomEvent("modal:open")))}function y(t){t?.stopImmediatePropagation(),h(!1),o.close(),e.dispatchEvent(new CustomEvent("modal:close")),o.dispatchEvent(new CustomEvent("modal:close"))}pgs(o).add("dialog modal-dialog"),n.setAttribute("role","button"),n.setAttribute("aria-label","apri modale"),f&&!e.contains(o)?e.append(o):f||(p?document.querySelector("#"+p)?.append(o):g?pgs(document).querySelector(g)?.append(o):document.body.append(o)),n.addEventListener("click",e=>b(e),{signal:i}),n.addEventListener("keypress",e=>!o.open&&("Enter"===e.key||" "===e.key)&&b(e),{signal:i}),o.addEventListener("close",()=>h(!1),{signal:i}),o.addEventListener("click",e=>{e.target!=o||u||y(e)},{signal:i}),m?.addEventListener("click",e=>y(e),{signal:i}),d&&n.id&&(a=window.setTimeout(function(){new URLSearchParams(window.location.search).get("modal")===n.id&&(document.getElementById(n.id)?.scrollIntoView({behavior:"smooth"}),b())},1),s=new MutationObserver(()=>{let e=o.hasAttribute("open");try{const t=new URL(window.location.href),o=new URLSearchParams(t.search);e?o.set("modal",n.id):o.delete("modal"),t.search=o.toString()?`?${o.toString()}`:"",window.history.pushState({modal:n.id,open:e},"",t)}catch(e){}}),s.observe(o,{attributes:!0,attributeFilter:["open"]}),window.addEventListener("popstate",()=>{try{const e=new URLSearchParams(window.location.search).get("modal")===n.id;e&&!o.open&&o.showModal(),!e&&o.open&&y()}catch(e){}},{signal:i})),L.set(e,{element:e,button:n,dialog:o,closeButton:m,open:function(e){o.open||b(e)},close:function(e){o.open&&y(e)},toggle:b,refresh:()=>{const t=e.querySelector("dialog")||o;return r.abort(),s?.disconnect(),null!==a&&window.clearTimeout(a),L.delete(e),C(e,t),L.get(e)},isOpen:()=>o.open})}function q(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("modal")?[e]:[];return t.push(...pgs(e).querySelectorAll("modal")),t})(e).forEach(e=>C(e))}q();const x={init:q,api:function(e){return L.get(e)}},M=new WeakMap,T=new Set;let O=0;const _={minLength:2,debounce:200,limit:6,submitOnSelect:!1,searchOnFocus:!0,source:null,onSelect:null};function D(e){if("string"==typeof e||"number"==typeof e){const t=String(e).trim();return t?{label:t,value:t,disabled:!1,data:e}:null}if(!e||"object"!=typeof e)return null;const t=String(e.label??e.value??"").trim();return t?{label:t,value:String(e.value??t),disabled:Boolean(e.disabled),data:Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}:null}function I(e){const t=M.get(e);t&&(pgs(e).state.remove("open"),t.input.setAttribute("aria-expanded","false"),t.input.removeAttribute("aria-activedescendant"),t.list.setAttribute("aria-hidden","true"),t.setActiveIndex(-1),T.delete(e))}function j(e){const t=M.get(e);t&&0!==t.items().length&&(pgs(e).state.add("open"),t.input.setAttribute("aria-expanded","true"),t.list.setAttribute("aria-hidden","false"),T.add(e))}function $(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("search")?[e]:[];return t.push(...pgs(e).querySelectorAll("search")),t})(e).forEach(e=>{if(M.has(e))return;const t=e.querySelector('input[type="search"]'),n=(o=e,Array.from(o.children).find(e=>pgs(e).contains("search-suggestions")));var o;if(!t||!n)return;const r=(O+=1,O);t.id||(t.id=`search-input-${r}`),n.id||(n.id=`search-suggestions-${r}`),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-controls",n.id),t.setAttribute("aria-expanded","false"),t.setAttribute("autocomplete","off"),n.setAttribute("role","listbox"),n.setAttribute("aria-labelledby",t.id),n.setAttribute("aria-hidden","true");let i={..._},s=[],a=-1,c=null,l=null,u=0;function d(n){pgs(e).state.toggle("loading",n),t.setAttribute("aria-busy",String(n))}function p(e){a=e;const o=Array.from(n.querySelectorAll('[pgs~="search-suggestions-item"]'));o.forEach((e,t)=>{const n=t===a;e.setAttribute("aria-selected",String(n)),pgs(e).state.toggle("selected",n)});const r=o[a];r?(t.setAttribute("aria-activedescendant",r.id),r.scrollIntoView({block:"nearest"})):t.removeAttribute("aria-activedescendant")}function g(e){if(!s.length)return;let t=a;for(let n=0;n<s.length;n+=1)if(t=(t+e+s.length)%s.length,!s[t].disabled)return void p(t)}function f(){s=[],a=-1,n.replaceChildren(),I(e)}function m(){null!==c&&window.clearTimeout(c),c=null,l&&l.abort(),l=null,u+=1,d(!1)}async function h(o=t.value){m(),f();const r=String(o??"").trim();if(r.length<i.minLength||!i.source)return[];const c=u;l=new AbortController;const p=l;d(!0);try{const o=await async function(n,o){if(Array.isArray(i.source)){const e=n.toLocaleLowerCase();return i.source.filter(t=>{const n=D(t);return n&&n.label.toLocaleLowerCase().includes(e)})}return"function"!=typeof i.source?[]:await i.source({query:n,signal:o,limit:i.limit,element:e,input:t})}(r,p.signal);return c!==u||p.signal.aborted?[]:function(t){s=Array.from(t||[]).map(D).filter(Boolean).slice(0,i.limit);const o=document.createDocumentFragment();return s.forEach((e,t)=>{const r=document.createElement("li");pgs(r).add("search-suggestions-item"),pgs(r).add("flexRow"),r.id=`${n.id}-option-${t}`,r.dataset.index=String(t),r.setAttribute("role","option"),r.setAttribute("aria-selected","false"),r.setAttribute("aria-disabled",String(e.disabled)),r.innerHTML='<i class="fa-solid fa-magnifying-glass"></i>'+e.label,o.append(r)}),a=-1,n.replaceChildren(o),pgs(e).state.remove("error"),s.length?j(e):I(e),s}(o)}catch(t){return"AbortError"===t?.name||c!==u||(f(),pgs(e).state.add("error"),e.dispatchEvent(new CustomEvent("pgs:search:error",{bubbles:!0,detail:{error:t,query:r}}))),[]}finally{l===p&&(l=null),c===u&&d(!1)}}function b(){m(),f(),pgs(e).state.remove("error"),t.value.trim().length<i.minLength||!i.source||(c=window.setTimeout(()=>{c=null,h(t.value)},i.debounce))}function y(n=a,o=i.submitOnSelect){const r=s[n];if(!r||r.disabled)return null;t.value=r.value,m(),f();const c={item:r,index:n,value:r.value,input:t,element:e};return e.dispatchEvent(new CustomEvent("pgs:search:select",{bubbles:!0,detail:c})),i.onSelect?.(c),t.focus(),o&&"function"==typeof e.requestSubmit&&e.requestSubmit(),r}function v(e={}){return i=function(e,t={}){const n={...e,...t};return n.minLength=Math.max(0,Number.parseInt(n.minLength,10)||0),n.debounce=Math.max(0,Number.parseInt(n.debounce,10)||0),n.limit=Math.max(1,Number.parseInt(n.limit,10)||_.limit),n.submitOnSelect=Boolean(n.submitOnSelect),n.searchOnFocus=Boolean(n.searchOnFocus),n.source="function"==typeof n.source||Array.isArray(n.source)?n.source:null,n.onSelect="function"==typeof n.onSelect?n.onSelect:null,n}(i,e),L}function w(){b()}function A(){s.length?j(e):i.searchOnFocus&&b()}function S(t){return"ArrowDown"===t.key?(pgs(e).state.contains("open")||b(),void(s.length&&(t.preventDefault(),g(1)))):"ArrowUp"===t.key&&s.length?(t.preventDefault(),void g(-1)):"Enter"===t.key&&a>=0?(t.preventDefault(),void y(a)):"Escape"===t.key?(t.preventDefault(),m(),void I(e)):void("Tab"===t.key&&I(e))}function E(e){const t=e.target.closest('[pgs~="search-suggestions-item"]');t&&n.contains(t)&&(e.preventDefault(),y(Number.parseInt(t.dataset.index,10)))}function k(){m(),I(e)}const L={element:e,input:t,list:n,configure:v,setSource:e=>v({source:e}),search:h,open:()=>j(e),close:()=>I(e),clear:f,cancel:m,select:y,refresh:()=>h(t.value),destroy:function(){m(),f(),t.removeEventListener("input",w),t.removeEventListener("focus",A),t.removeEventListener("keydown",S),n.removeEventListener("pointerdown",E),e.removeEventListener("submit",k),M.delete(e)},items:()=>[...s],isOpen:()=>pgs(e).state.contains("open"),isLoading:()=>pgs(e).state.contains("loading"),setActiveIndex:p};t.addEventListener("input",w),t.addEventListener("focus",A),t.addEventListener("keydown",S),n.addEventListener("pointerdown",E),e.addEventListener("submit",k),M.set(e,L)})}document.addEventListener("pointerdown",e=>{T.forEach(t=>{t.contains(e.target)||I(t)})}),$();const N={init:$,api:function(e){return M.get(e)}};function B(e,t){const n=(()=>{let e=0,t=0,n=0,o=!1;return{update:function(r){const i=performance.now(),s=i-e;let a=Math.abs(r.deltaY);return 1===r.deltaMode?a*=16:2===r.deltaMode&&(a*=r.currentTarget?.clientHeight||800),a<30&&s<35&&t++,n++,n>=6&&(o=t>=3,t=0,n=0),e=i,o},get value(){return o}}})(),o=o=>{if(n.update(o))return;if(o.ctrlKey)return;if(Math.abs(o.deltaX)>Math.abs(o.deltaY))return;let r=o.deltaY;1===o.deltaMode?r*=16:2===o.deltaMode&&(r*=e.clientHeight);const i=e.scrollLeft<=0,s=e.scrollLeft+e.clientWidth>=e.scrollWidth-1;(r>0&&!s||r<0&&!i)&&(o.preventDefault(),e.scrollLeft+=r*t)};return e.addEventListener("wheel",o,{passive:!1}),()=>e.removeEventListener("wheel",o)}const P=new WeakMap;class R{constructor({element:e,viewRatio:t=.97,optionIntersectionObserver:n={},scrollOptions:o={}}={}){this.element=e,this.viewRatio=t,this.optionIntersectionObserver={threshold:Array.from({length:101},(e,t)=>t/100),rootMargin:"0px",...n},this.scrollOptions={behavior:"smooth",inline:"center",block:"nearest",container:"nearest",...o},this.container=this.element?pgs(this.element).querySelector("slides-container"):null}#e(){const e=this.element;pgs(e).querySelector("slides-prec")||e.insertAdjacentHTML("afterbegin",'<button pgs="slides-prec button" pgs-option="buttonIcon" type="button" class="precButton" aria-label="slide precedente"> <span> <i class="fa-solid fa-arrow-left"></i></span></button>'),pgs(e).querySelector("slides-next")||e.insertAdjacentHTML("beforeend",'<button pgs="slides-next button" pgs-option="buttonIcon" type="button" class="nextButton" aria-label="prossima slide"> <span> <i class="fa-solid fa-arrow-right"></i></span></button>'),pgs(e).querySelector("slides-dots")||e.insertAdjacentHTML("beforeend",'<div pgs="slides-dots" class="slides-dots"></div>');const t=pgs(e).querySelector("slides-dots");for(;t.children.length<this.container.children.length;)t.insertAdjacentHTML("beforeend",'<button type="button" class="slide-dot"></button>');for(;t.children.length>this.container.children.length;)t.lastElementChild.remove();Array.from(t.children).forEach((e,t)=>{e.setAttribute("aria-label",`vai alla slide ${t+1}`)})}#t(){const e=this.container.querySelectorAll(".view");let t;t=pgs(this.element).option.contains("singleScroll")?e[e.length-1]:e[0];const n=t?.previousElementSibling;n?.scrollIntoView(this.scrollOptions),n?.focus({preventScroll:!0})}#n(){const e=this.container.querySelectorAll(".view");let t;t=pgs(this.element).option.contains("singleScroll")?e[0]:e[e.length-1];const n=t?.nextElementSibling;n?.scrollIntoView(this.scrollOptions),n?.focus({preventScroll:!0})}#o(e){this.container.children[e]?.scrollIntoView(this.scrollOptions)}#r(e,t,n,o,r){e.forEach(e=>{const i=.9+.1*e.intersectionRatio,s=i>=.98;!pgs(e.target).option.contains("notScrollAnimation")&&e.target.firstElementChild&&e.target.firstElementChild.style.setProperty("--visible-percent",`${i}`),e.target.classList.toggle("view",s),e.target.classList.toggle("notView",!s);const a=e.target.parentNode.children,c=a[0].classList.contains("view"),l=a[a.length-1].classList.contains("view");o.disabled=l,n.disabled=c,o.setAttribute("aria-disabled",String(l)),n.setAttribute("aria-disabled",String(c));const u=Array.from(t.children).filter(e=>e.classList.contains("view"));r.forEach((e,n)=>{const o=u.some(e=>Array.from(t.children).indexOf(e)===n);e.classList.toggle("active",o),e.setAttribute("aria-current",o?"true":"false")})})}execute(){const e=this.element;if(!this.container)return;const t=new AbortController,{signal:n}=t;this.#e();const o=pgs(e).querySelector("slides-prec"),r=pgs(e).querySelector("slides-next"),i=Array.from(pgs(e).querySelector("slides-dots").children),s=pgs(e).option.contains("notScrollWithMouse")?null:B(this.container,5);i.forEach((e,t)=>e.addEventListener("click",()=>this.#o(t),{signal:n})),o.addEventListener("click",()=>this.#t(),{passive:!0,signal:n}),r.addEventListener("click",()=>this.#n(),{passive:!0,signal:n});const a=new IntersectionObserver(e=>this.#r(e,this.container,o,r,i),{root:this.container,...this.optionIntersectionObserver});let c;Array.from(this.container.children).forEach(e=>a.observe(e));const l=()=>{P.get(this.element)===c&&(t.abort(),a.disconnect(),s?.(),P.delete(this.element))};c={element:this.element,container:this.container,previous:()=>this.#t(),next:()=>this.#n(),goTo:e=>this.#o(e),getCurrentIndexes:()=>Array.from(this.container.children).map((e,t)=>e.classList.contains("view")?t:-1).filter(e=>-1!==e),getCurrentElements:()=>Array.from(this.container.children).filter(e=>e.classList.contains("view")),getTotal:()=>this.container.children.length,isAtStart:()=>this.container.children[0]?.classList.contains("view")||!1,isAtEnd:()=>{const e=this.container.children,t=e[e.length-1];return t?.classList.contains("view")||!1},refresh:()=>(P.get(this.element)!==c||(l(),new R({element:this.element,viewRatio:this.viewRatio,optionIntersectionObserver:this.optionIntersectionObserver,scrollOptions:this.scrollOptions}).execute()),P.get(this.element))},P.set(this.element,c)}}function V(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("slides")?[e]:[];return t.push(...pgs(e).querySelectorAll("slides")),t})(e).forEach(e=>{P.has(e)||new R({element:e}).execute()})}V();const H={init:V,api:function(e){return P.get(e)}},z=new WeakMap;function F(e=document){pgs(e).querySelectorAll("steps").forEach(e=>{z.has(e)||(pgs(e).querySelectorAll("steps-step").forEach((e,t)=>{let n;if(pgs(e).querySelector("steps-step-circle")?n=pgs(e).querySelector("steps-step-circle"):(n=document.createElement("span"),pgs(n).add("steps-step-circle"),n.textContent=t+1,e.insertAdjacentElement("afterbegin",n)),!pgs(e).querySelector("steps-step-line")){const t=document.createElement("span");pgs(t).add("steps-step-line"),e.insertAdjacentElement("afterbegin",t)}}),z.set(e,{element:e,steps:()=>Array.from(pgs(e).querySelectorAll("steps-step")),getStep:t=>pgs(e).querySelectorAll("steps-step")[t],getTotal:()=>pgs(e).querySelectorAll("steps-step").length,refresh:()=>(z.delete(e),F(e.parentNode||document),z.get(e))}))})}F();const W={init:F,api:function(e){return z.get(e)}},G=new WeakMap;function Y(e=document){pgs(e).querySelectorAll("stepTabs").forEach(e=>{if("true"===e.dataset.stepTabsInitialized)return;e.dataset.stepTabsInitialized="true";const t=pgs(e).querySelector("stepTabs-prev"),n=pgs(e).querySelector("stepTabs-next"),o=pgs(e).querySelector("stepTabs-restart"),r=pgs(e).querySelector("stepTabs-dots"),i=pgs(e).querySelector("stepTabs-container"),s=pgs(i).querySelectorAll("tab"),a=s.length,c=Array.from(s).filter(e=>pgs(e).state.contains("is-locked"));let l=0;t&&(t.disabled=!0);let u=!1;if(!i||0===a)return;const d=[];function p(e,t,n){e&&n!==pgs(e).state.contains(t)&&pgs(e).state.toggle(t,n)}function g(){const e=s[l];t&&(t.disabled=0===l),n&&(n.disabled=l===a-1||pgs(e).state.contains("is-locked"))}function f(t,n=!0){l=Math.min(Math.max(t,0),a-1);const o=s[l];u=!0,s.forEach((e,t)=>p(e,"is-active",t===l)),g(),d.forEach((e,t)=>{p(e,"is-active",t===l),p(e,"is-completed",t<l)}),u=!1,n&&!e.closest("dialog")&&(o?.focus(),e?.scrollIntoView({behavior:"smooth",block:"start"})),e.dispatchEvent(new CustomEvent("stepTabs:change",{detail:{current:l,total:a}}))}function m(){f(0),c.forEach(e=>pgs(e).state.add("is-locked"))}r&&(r.innerHTML="",s.forEach((e,t)=>{const n=pgs(e).option.getValueBrackets("tabIcon")||"fa-circle",o=document.createElement("button");o.type="button",pgs(o).add("stepTabs-dots-dot"),pgs(o).option.setValueBrackets("step",t),o.innerHTML=`<i class="fa-solid ${n}"></i>`,o.addEventListener("click",()=>{pgs(o).state.contains("is-completed")&&f(t,!0)}),r.appendChild(o),d.push(o)})),f(0,!1);const h=new MutationObserver(()=>{u||g()});s?.forEach(e=>h.observe(e,{attributes:!0,attributeFilter:["pgs-state"]})),t?.addEventListener("click",e=>f(l-1)),n?.addEventListener("click",e=>{g(),n.disabled||f(l+1)}),o?.addEventListener("click",e=>m(),{capture:!0}),G.set(e,{element:e,container:i,restart:m,goTo:f,next:()=>f(l+1),prev:()=>f(l-1),toggleLock:(e,t=!0)=>"number"==typeof e&&s[e]&&(pgs(s[e]).state.toggle("is-locked",t),f(l)),refresh:()=>(Y(e.parentNode||document),G.get(e)),getCurrent:()=>l,getState:()=>({current:l,total:a})})})}Y();const U={init:Y,api:function(e){return G.get(e)}},J=new WeakMap;let K=0;function X(e,t){return Array.from(e.children).find(e=>pgs(e).contains(t))}function Q(e=document){pgs(e).querySelectorAll("summary").forEach(e=>{if(J.has(e))return;const t=X(e,"summary-content"),n=X(e,"summary-button");if(!t||!n)return;const o=(K+=1,K),r=t.id||`summary-content-${o}`;function i(){return pgs(e).state.contains("open")}function s(){return 3*function(e){const t=window.getComputedStyle(e),n=parseFloat(t.lineHeight);if(Number.isFinite(n))return n;const o=parseFloat(t.fontSize);return Number.isFinite(o)?1.2*o:0}(t)}function a(o){const r=t.scrollHeight>Math.ceil(s())+1;pgs(e).state.toggle("overflow",r),pgs(e).state.toggle("open",o&&r),n.hidden=!r,n.setAttribute("aria-hidden",String(!r)),n.setAttribute("aria-expanded",String(o&&r)),n.textContent=o&&r?"Mostra meno":"Mostra di più";const i=o&&r?t.scrollHeight:s();t.style.setProperty("--summary-content-max-height",`${i}px`)}function c(){const e=i();t.style.setProperty("--summary-content-max-height","none"),a(e)}function l(){a(!i())}t.id=r,n.type||="button",n.setAttribute("aria-controls",t.id),n.addEventListener("click",l),window.addEventListener("resize",c,{passive:!0}),c(),requestAnimationFrame(c),J.set(e,{element:e,content:t,button:n,open:()=>a(!0),close:()=>a(!1),toggle:l,refresh:c,isOpen:i})})}Q();const Z={init:Q,api:function(e){return J.get(e)}},ee={_escapeHtml:e=>String(e??""),_getDuration(e){const t=e.duration,n=Number.parseInt(t,10);return Number.isNaN(n)?5e3:n},_getApi:e=>"toast"===String(e.element||"notification").trim()?ne.toast:ne.alert,_getType(e,t){const n=String(e.type||"info").trim();return"function"==typeof t[n]?n:"info"},_getData(e){const t=pgs(e).option.getValueBrackets("notification")||"{}";try{return JSON.parse(t)}catch(e){return console.warn("PGS notification: configurazione JSON non valida",e),{}}},_getContent(e,t){const n=this._escapeHtml(t),o=this._escapeHtml(e);return o?n?`\n <span pgs="notification-element-title">${o}</span>\n <br>\n <span pgs="notification-element-content">${n}</span>\n `:`<span pgs="notification-element-title">${o}</span>`:n},_getContainer:e=>Array.from(pgs(document).querySelectorAll("notification")).find(t=>{const n=pgs(t).option.contains("toast");return"toast"===e?n:!n}),initNotification(e,t,n,o,r,i="replace",s=null){let a=this._getContainer(t);if(!a){const e=document.createElement("div");pgs(e).add("notification"),"toast"===t&&pgs(e).option.add("toast"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-relevant","additions"),document.body.appendChild(e),a=e}const c=document.createElement(s?"a":"div");function l(){"stack"==i?c.style.translate="120%":c.style.opacity="0",setTimeout(()=>c.remove(),300)}"replace"==i&&(a.innerHTML=""),s&&(c.href=s),r>0&&c.style.setProperty("--notification-timeout",r+"ms"),pgs(c).state.add(e),pgs(c).add("notification-element"),c.setAttribute("role","error"==e?"alert":"status"),c.innerHTML=`${n} <p>${o}</p>`,a.appendChild(c),r>0&&setTimeout(()=>{l()},r);const u=document.createElement("button");u.type="button",u.ariaLabel="Rimuovi notifica",u.innerHTML='<i class="fa-solid fa-xmark"></i>',u.setAttribute("pgs","button"),u.setAttribute("pgs-option","buttonClose"),c.insertAdjacentElement("afterbegin",u),u.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),l()})},deleteAll(e){let t=this._getContainer(e);t&&(t.innerHTML="")},trigger(e=document){pgs(e).querySelectorAll("notificationTrigger").forEach(e=>{if(!e||"true"===e.dataset.initialize)return;e.dataset.initialize="true";const t=this._getData(e),n=String(t.title||"").trim(),o=String(t.message||"").trim();if(!n&&!o)return void e.remove();const r=t.link||null,i=t.icon||void 0,s=this._getDuration(t),a=this._getApi(t),c=this._getType(t,a),l=this._getContent(n,o);a===ne.toast?a[c](l,s,i):a[c](l,r,s,i),e.remove()})}};function te(e=document){return ee.trigger(e)}const ne={trigger:te,alert:{error:(e="Errore",t=null,n=0,o='<i class="fa-solid fa-circle-xmark"></i>')=>ee.initNotification("error","notification",o,e,n,"stack",t),success:(e="Aggiornato",t=null,n=0,o='<i class="fa-solid fa-check"></i>')=>ee.initNotification("success","notification",o,e,n,"stack",t),info:(e="Aggiornamento",t=null,n=0,o='<i class="fa-solid fa-circle-info"></i>')=>ee.initNotification("info","notification",o,e,n,"stack",t),warning:(e="Attenzione",t=null,n=0,o='<i class="fa-solid fa-triangle-exclamation"></i>')=>ee.initNotification("warning","notification",o,e,n,"stack",t),deleteAll:()=>ee.deleteAll("notification")},toast:{error:(e="Errore",t=4e3,n='<i class="fa-solid fa-circle-xmark"></i>')=>ee.initNotification("error","toast",n,e,t),success:(e="Aggiornato",t=4e3,n='<i class="fa-solid fa-check"></i>')=>ee.initNotification("success","toast",n,e,t),info:(e="Aggiornamento",t=0,n='<i class="fa-solid fa-circle-info"></i>')=>ee.initNotification("info","toast",n,e,t),warning:(e="Attenzione",t=4e3,n='<i class="fa-solid fa-triangle-exclamation"></i>')=>ee.initNotification("warning","toast",n,e,t),deleteAll:()=>ee.deleteAll("toast")}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>te()):te(),e.registerModules({svg:i,accordion:u,dropdown:A,menu:k,modal:x,notification:ne,search:N,slides:H,stepTabs:U,steps:W,summary:Z,formValidate:class{#i={};#s=!1;constructor(e,t={}){if(!t||"object"!=typeof t||Array.isArray(t))throw new TypeError("options must be an object");this.container=e,this._rules=[],this.message={fieldError:"Please complete this field.",fieldsError:"Please complete all required fields.",success:"Submitted successfully."},void 0!==t.message&&(this.message=t.message),this.container?.setAttribute("novalidate","")}get message(){return{...this.#i}}set message(e){if(!e||"object"!=typeof e||Array.isArray(e))throw new TypeError("message must be an object");this.#i={...this.#i,...e}}#a={isRequired:e=>!!e&&((!0===e.required||"true"===e?.dataset?.required||"true"==e?.getAttribute("aria-required"))&&!e.hidden),isEmptyTextLike:e=>!String(e?.value??"").trim(),isEmptySelect:e=>!String(e?.value??"").trim(),getGroupName:e=>e?.name||e?.getAttribute?.("name")||""};#c(e){const t=[];for(const n of this._rules){const o=n(e);o&&(Array.isArray(o)?t.push(...o):t.push(o))}const n=Array.from(e.querySelectorAll("input")).filter(e=>!e.disabled&&"hidden"!==e.type&&"checkbox"!==e.type&&"radio"!==e.type&&"file"!==e.type&&!!this.#a.isRequired(e)&&this.#a.isEmptyTextLike(e)),o=Array.from(e.querySelectorAll("textarea")).filter(e=>!e.disabled&&!!this.#a.isRequired(e)&&this.#a.isEmptyTextLike(e)),r=Array.from(e.querySelectorAll("select")).filter(e=>!e.disabled&&!!this.#a.isRequired(e)&&this.#a.isEmptySelect(e)),i=Array.from(e.querySelectorAll('input[type="radio"]')).filter(e=>!e.disabled),s=new Map;for(const e of i){if(!this.#a.isRequired(e))continue;const t=this.#a.getGroupName(e);t&&(s.has(t)||s.set(t,[]),s.get(t).push(e))}const a=[];for(const[e,t]of s.entries())t.some(e=>e.checked)||a.push(t[0]);const c=Array.from(e.querySelectorAll('input[type="checkbox"]')).filter(e=>!e.disabled),l=[],u=new Map;for(const e of c){if(!this.#a.isRequired(e))continue;const t=this.#a.getGroupName(e);t?(u.has(t)||u.set(t,[]),u.get(t).push(e)):e.checked||l.push(e)}const d=[];for(const[e,t]of u.entries())t.some(e=>e.checked)||d.push(t[0]);const p=Array.from(e.querySelectorAll('input[type="file"]')).filter(e=>!(e.disabled||!this.#a.isRequired(e)||e.files&&e.files.length>0));return[...new Set([n,o,r,a,l,d,p,t].flat())]}addFieldError(t,n=0,o=1){if(e(t).option.add("error"),0===n&&t.scrollIntoView(),0!==n)return;if(o>1)return void ne.toast.error(this.message.fieldsError);const r=e(t).option.getValueBrackets("message");ne.toast.error(r||this.message.fieldError)}removeFieldError(t){e(t).option.remove("error")}success(e=this.message.success){(this.#s||!0===this.validate())&&ne.toast.success(e)}validate(){const t=this.#c(this.container),n=this.container.querySelectorAll("input, textarea, select");Array.from(n).filter(e=>!e.disabled);for(const e of n)t.includes(e)||this.removeFieldError(e);return t.forEach((e,n)=>this.addFieldError(e,n,t.length)),n.forEach(e=>e.addEventListener("click",t=>this.removeFieldError(e))),t.length?(e(this.container).option.remove("success").add("error"),!1):(e(this.container).option.remove("error").add("success"),!0)}validator(e,t="submit"){if("function"!=typeof e)throw new TypeError("callback must be a function");if("string"!=typeof t||!t.trim())throw new TypeError("eventName must be a non-empty string");return this.container.addEventListener(t,t=>{if(t.preventDefault(),this.validate()){this.#s=!0;try{this.success(),e(t)}finally{this.#s=!1}}}),this}addNewRule(e){if("function"!=typeof e)throw new Error("Rule must be a function");return this._rules.push(e),this}},scrollHorizontal:B}),n(682),n(48)})()})();
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Components and markup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Canonical component and layout examples are available in `reference/`. Use those files as the reference source before creating new markup.
|
|
4
4
|
|
|
5
5
|
## Componenti disponibili
|
|
6
6
|
|
|
7
7
|
Componenti:
|
|
8
8
|
|
|
9
9
|
- [`accordion`](components/accordion.md)
|
|
10
|
+
- [`alerts`](components/alerts.md)
|
|
10
11
|
- [`badges`](components/badges.md)
|
|
11
12
|
- [`breadcrumb`](components/breadcumbs.md)
|
|
12
13
|
- [`button`](components/button.md)
|
|
13
14
|
- [`card`](components/card.md)
|
|
14
15
|
- [`dropdown`](components/dropdown.md)
|
|
15
16
|
- [`form`](components/form.md)
|
|
17
|
+
- [`formAddon`](components/formAddon.md)
|
|
16
18
|
- [`logo`](components/logo.md)
|
|
17
19
|
- [`menu`](components/menu.md)
|
|
18
20
|
- [`modal`](components/modal.md)
|
|
@@ -32,26 +34,25 @@ Layout:
|
|
|
32
34
|
- [`header`](layout/header.md)
|
|
33
35
|
- [`footer`](layout/footer.md)
|
|
34
36
|
- [`pageShell`](layout/pageShell.md)
|
|
35
|
-
- [`
|
|
36
|
-
- [`grid`](layout/grid.md)
|
|
37
|
+
- [`responsive`](layout/responsive.md)
|
|
37
38
|
|
|
38
39
|
Pattern:
|
|
39
40
|
|
|
40
41
|
- [`cookieConsent`](patterns/cookieConsent.md)
|
|
41
42
|
|
|
42
|
-
## Search
|
|
43
|
+
## Search with suggestions
|
|
43
44
|
|
|
44
45
|
`search` include sia lo stile sia il comportamento di ricerca e usa `search-suggestions` come lista opzionale:
|
|
45
46
|
|
|
46
47
|
```html
|
|
47
|
-
<form pgs="
|
|
48
|
+
<form pgs="button search" pgs-option="buttonNohover" autocomplete="off">
|
|
48
49
|
<button type="submit">Cerca</button>
|
|
49
50
|
<input type="search" name="s" placeholder="Cerca">
|
|
50
51
|
<ul pgs="search-suggestions"></ul>
|
|
51
52
|
</form>
|
|
52
53
|
```
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
The project provides the data source; `mypgs` does not depend on specific backend endpoints or formats:
|
|
55
56
|
|
|
56
57
|
```js
|
|
57
58
|
const form = pgs(document).querySelector("search");
|
|
@@ -75,7 +76,7 @@ pgs.search.api(form)?.configure({
|
|
|
75
76
|
|
|
76
77
|
La sorgente puo' essere anche un array locale di stringhe o oggetti. Il componente gestisce debounce, annullamento richieste, risposte fuori ordine, tastiera, selezione, click esterno, stati `open`, `loading` ed `error` e attributi ARIA. Gli eventi `pgs:search:select` e `pgs:search:error` sono emessi sul root `search`.
|
|
77
78
|
|
|
78
|
-
##
|
|
79
|
+
## Other elements without reference files
|
|
79
80
|
|
|
80
81
|
Base:
|
|
81
82
|
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/accordion.html. Edit reference/html/components/accordion.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Accordion
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Interactive component that expands one panel at a time while synchronizing visibility, ARIA attributes, and keyboard navigation.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `accordion`:
|
|
10
|
-
- `accordion-button`:
|
|
11
|
-
- `accordion-content`:
|
|
9
|
+
- `accordion`: identifies each expandable element initialized by the JavaScript module.
|
|
10
|
+
- `accordion-button`: identifies the control that opens or closes the associated panel.
|
|
11
|
+
- `accordion-content`: identifies the content panel managed through the hidden attribute.
|
|
12
12
|
|
|
13
13
|
## PGS States
|
|
14
14
|
|
|
15
|
-
- `open`:
|
|
15
|
+
- `open`: indicates the accordion element that is currently open and visible.
|
|
16
16
|
|
|
17
|
-
## API
|
|
17
|
+
## JavaScript API
|
|
18
18
|
|
|
19
|
-
- `pgs.accordion.init(root)`:
|
|
20
|
-
- `pgs.accordion.api(element)`:
|
|
21
|
-
- `instance.open()`:
|
|
22
|
-
- `instance.close()`:
|
|
23
|
-
- `instance.toggle()`:
|
|
24
|
-
- `instance.refresh()`:
|
|
25
|
-
- `instance.isOpen()`:
|
|
19
|
+
- `pgs.accordion.init(root)`: initializes unregistered accordions within the specified Document or Element.
|
|
20
|
+
- `pgs.accordion.api(element)`: returns the instance associated with an initialized accordion root.
|
|
21
|
+
- `instance.open()`: opens the panel and closes any other accordions on the page.
|
|
22
|
+
- `instance.close()`: closes the current panel.
|
|
23
|
+
- `instance.toggle()`: toggles the panel between its open and closed states.
|
|
24
|
+
- `instance.refresh()`: reruns initialization within the accordion container and returns the instance.
|
|
25
|
+
- `instance.isOpen()`: returns true when the open state is active.
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Related elements
|
|
28
28
|
|
|
29
|
-
- `
|
|
29
|
+
- `flexColumn`: applies text spacing between the list items.
|
|
30
30
|
|
|
31
31
|
## Output
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
HTML list of accessible accordion items with an associated button and panel.
|
|
34
34
|
|
|
35
|
-
##
|
|
35
|
+
## Example
|
|
36
36
|
|
|
37
37
|
```html
|
|
38
|
-
<ul pgs="
|
|
38
|
+
<ul pgs="flexColumn">
|
|
39
39
|
<li pgs="accordion">
|
|
40
40
|
<button pgs="accordion-button" type="button">
|
|
41
41
|
<i class="fa-solid fa-circle-question" aria-hidden="true"></i>
|
|
42
|
-
<span>
|
|
42
|
+
<span>Frequently asked question</span>
|
|
43
43
|
</button>
|
|
44
44
|
|
|
45
45
|
<div pgs="accordion-content" hidden>
|
|
46
|
-
<p>
|
|
46
|
+
<p>Example answer with reusable text content.</p>
|
|
47
47
|
</div>
|
|
48
48
|
</li>
|
|
49
49
|
|
|
50
50
|
<li pgs="accordion">
|
|
51
51
|
<button pgs="accordion-button" type="button">
|
|
52
52
|
<i class="fa-solid fa-circle-info" aria-hidden="true"></i>
|
|
53
|
-
<span>
|
|
53
|
+
<span>Second section</span>
|
|
54
54
|
</button>
|
|
55
55
|
|
|
56
56
|
<div pgs="accordion-content" hidden>
|
|
57
|
-
<p>
|
|
57
|
+
<p>Additional accordion panel content.</p>
|
|
58
58
|
</div>
|
|
59
59
|
</li>
|
|
60
60
|
</ul>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<!-- Automatically generated from reference/html/components/alerts.html. Edit reference/html/components/alerts.html and run npm run docs:generate again. -->
|
|
2
|
+
|
|
3
|
+
# Alerts
|
|
4
|
+
|
|
5
|
+
Static inline feedback messages for contextual information, successful operations, warnings, and errors. Use the notification API for dynamic floating alerts and toasts.
|
|
6
|
+
|
|
7
|
+
## PGS
|
|
8
|
+
|
|
9
|
+
- `alert`: identifies the inline alert container.
|
|
10
|
+
- `alert-icon`: identifies the decorative status icon.
|
|
11
|
+
- `alert-content`: groups the title and descriptive message.
|
|
12
|
+
- `alert-title`: identifies the alert heading.
|
|
13
|
+
|
|
14
|
+
## PGS States
|
|
15
|
+
|
|
16
|
+
- `info`: presents neutral informational feedback.
|
|
17
|
+
- `success`: presents confirmation of a successful operation.
|
|
18
|
+
- `warning`: presents a condition that requires attention.
|
|
19
|
+
- `error`: presents a failure or blocking problem.
|
|
20
|
+
|
|
21
|
+
## Related elements
|
|
22
|
+
|
|
23
|
+
- `flexColumn`: vertically arranges the alert examples.
|
|
24
|
+
- `gapElements`: applies element spacing between the examples.
|
|
25
|
+
- `notification`: provides dynamic floating alerts and toast messages.
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
|
|
29
|
+
Accessible HTML examples of the four inline alert states.
|
|
30
|
+
|
|
31
|
+
## Example
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<div pgs="flexColumn gapElements">
|
|
35
|
+
<div pgs="alert" pgs-state="info" role="status">
|
|
36
|
+
<i pgs="alert-icon" class="fa-solid fa-circle-info" aria-hidden="true"></i>
|
|
37
|
+
<div pgs="alert-content">
|
|
38
|
+
<strong pgs="alert-title">Information</strong>
|
|
39
|
+
<p>Your profile information can be updated at any time.</p>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div pgs="alert" pgs-state="success" role="status">
|
|
44
|
+
<i pgs="alert-icon" class="fa-solid fa-circle-check" aria-hidden="true"></i>
|
|
45
|
+
<div pgs="alert-content">
|
|
46
|
+
<strong pgs="alert-title">Changes saved</strong>
|
|
47
|
+
<p>Your preferences were updated successfully.</p>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<div pgs="alert" pgs-state="warning" role="alert">
|
|
52
|
+
<i pgs="alert-icon" class="fa-solid fa-triangle-exclamation" aria-hidden="true"></i>
|
|
53
|
+
<div pgs="alert-content">
|
|
54
|
+
<strong pgs="alert-title">Check your information</strong>
|
|
55
|
+
<p>Some fields may require your attention before continuing.</p>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div pgs="alert" pgs-state="error" role="alert">
|
|
60
|
+
<i pgs="alert-icon" class="fa-solid fa-circle-xmark" aria-hidden="true"></i>
|
|
61
|
+
<div pgs="alert-content">
|
|
62
|
+
<strong pgs="alert-title">Unable to save</strong>
|
|
63
|
+
<p>Correct the reported errors and try again.</p>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
```
|
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/badges.html. Edit reference/html/components/badges.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Badge
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Collection of compact indicators for displaying categories, priorities, and visual states with consistent color variants.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `badge`:
|
|
10
|
-
- `badgePrimary`: applica la variante con colore primario.
|
|
11
|
-
- `badgeStrong`: applica la variante ad alto contrasto.
|
|
12
|
-
- `badgeSuccess`: rappresenta un esito positivo.
|
|
13
|
-
- `badgeDot`: aggiunge un indicatore puntiforme al badge.
|
|
14
|
-
- `badgeWarning`: rappresenta un avviso.
|
|
15
|
-
- `badgeError`: rappresenta un errore.
|
|
16
|
-
- `badgeInfo`: rappresenta un'informazione.
|
|
17
|
-
- `badgeNeutral`: applica la variante neutra.
|
|
9
|
+
- `badge`: identifies the base badge variant.
|
|
18
10
|
|
|
19
|
-
##
|
|
11
|
+
## PGS Options
|
|
20
12
|
|
|
21
|
-
- `
|
|
13
|
+
- `badgePrimary`: applies the primary color variant.
|
|
14
|
+
- `badgeStrong`: applies the high-contrast variant.
|
|
15
|
+
- `badgeSuccess`: represents a successful result.
|
|
16
|
+
- `badgeDot`: adds a dot indicator to the badge.
|
|
17
|
+
- `badgeWarning`: represents a warning.
|
|
18
|
+
- `badgeError`: represents an error.
|
|
19
|
+
- `badgeInfo`: represents informational content.
|
|
20
|
+
- `badgeNeutral`: applies the neutral variant.
|
|
21
|
+
|
|
22
|
+
## Related elements
|
|
23
|
+
|
|
24
|
+
- `flexRow`: arranges badges horizontally and allows them to wrap.
|
|
22
25
|
|
|
23
26
|
## Output
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
HTML examples of the available badge variants.
|
|
26
29
|
|
|
27
|
-
##
|
|
30
|
+
## Example
|
|
28
31
|
|
|
29
32
|
```html
|
|
30
33
|
<div pgs="flexRow">
|
|
@@ -32,35 +35,35 @@ Esempi HTML delle varianti badge disponibili.
|
|
|
32
35
|
Base
|
|
33
36
|
</span>
|
|
34
37
|
|
|
35
|
-
<span pgs="badgePrimary">
|
|
38
|
+
<span pgs="badge" pgs-option="badgePrimary">
|
|
36
39
|
Primary
|
|
37
40
|
</span>
|
|
38
41
|
|
|
39
|
-
<span pgs="badgeStrong">
|
|
42
|
+
<span pgs="badge" pgs-option="badgeStrong">
|
|
40
43
|
Strong
|
|
41
44
|
</span>
|
|
42
45
|
|
|
43
|
-
<span pgs="badgeSuccess badgeDot">
|
|
44
|
-
|
|
46
|
+
<span pgs="badge" pgs-option="badgeSuccess badgeDot">
|
|
47
|
+
Active
|
|
45
48
|
</span>
|
|
46
49
|
|
|
47
|
-
<span pgs="badgeWarning">
|
|
50
|
+
<span pgs="badge" pgs-option="badgeWarning">
|
|
48
51
|
<i class="fa-solid fa-triangle-exclamation" aria-hidden="true"></i>
|
|
49
|
-
|
|
52
|
+
Warning
|
|
50
53
|
</span>
|
|
51
54
|
|
|
52
|
-
<span pgs="badgeError">
|
|
55
|
+
<span pgs="badge" pgs-option="badgeError">
|
|
53
56
|
<i class="fa-solid fa-xmark" aria-hidden="true"></i>
|
|
54
|
-
|
|
57
|
+
Error
|
|
55
58
|
</span>
|
|
56
59
|
|
|
57
|
-
<span pgs="badgeInfo">
|
|
60
|
+
<span pgs="badge" pgs-option="badgeInfo">
|
|
58
61
|
<i class="fa-solid fa-circle-info" aria-hidden="true"></i>
|
|
59
62
|
Info
|
|
60
63
|
</span>
|
|
61
64
|
|
|
62
|
-
<span pgs="
|
|
63
|
-
|
|
65
|
+
<span pgs="badge" pgs-option="badgeNeutral">
|
|
66
|
+
Neutral
|
|
64
67
|
</span>
|
|
65
68
|
|
|
66
69
|
</div>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Automatically generated from reference/html/components/breadcumbs.html. Edit reference/html/components/breadcumbs.html and run npm run docs:generate again. -->
|
|
2
2
|
|
|
3
3
|
# Breadcrumb
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Hierarchical navigation that shows the current page path with links, separators, and a semantic indication of the active item.
|
|
6
6
|
|
|
7
7
|
## PGS
|
|
8
8
|
|
|
9
|
-
- `breadcrumb`:
|
|
10
|
-
- `breadcrumb-item`:
|
|
11
|
-
- `breadcrumb-item-separator`:
|
|
9
|
+
- `breadcrumb`: identifies the main navigation path list.
|
|
10
|
+
- `breadcrumb-item`: identifies each level in the path.
|
|
11
|
+
- `breadcrumb-item-separator`: identifies the decorative separator hidden from assistive technologies.
|
|
12
12
|
|
|
13
13
|
## Output
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Semantic breadcrumb HTML structure wrapped in a nav element.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Example
|
|
18
18
|
|
|
19
19
|
```html
|
|
20
20
|
<nav aria-label="Breadcrumb">
|
|
@@ -35,7 +35,7 @@ Struttura HTML semantica di una breadcrumb racchiusa in un elemento nav.
|
|
|
35
35
|
|
|
36
36
|
<li pgs="breadcrumb-item">
|
|
37
37
|
<span aria-current="page">
|
|
38
|
-
|
|
38
|
+
Sample article
|
|
39
39
|
</span>
|
|
40
40
|
</li>
|
|
41
41
|
</ul>
|