@rettangoli/ui 1.0.11 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var rettangoli=(()=>{var T=`
1
+ var rettangoli=(()=>{var B=`
2
2
  :host([href]) {
3
3
  cursor: pointer;
4
4
  position: relative;
@@ -12,27 +12,27 @@ var rettangoli=(()=>{var T=`
12
12
  bottom: 0;
13
13
  z-index: 1;
14
14
  }
15
- `,F=({linkElement:i,href:t,newTab:e,rel:s})=>{i.href=t,e?i.target="_blank":i.removeAttribute("target"),s!=null?i.rel=s:e?i.rel="noopener noreferrer":i.removeAttribute("rel")},M=({shadowRoot:i,slotElement:t,linkElement:e,href:s,newTab:r,rel:n})=>{if(t.parentNode!==i&&i.appendChild(t),!s)return e&&e.parentNode===i&&i.removeChild(e),null;let o=e||document.createElement("a");return F({linkElement:o,href:s,newTab:r,rel:n}),o.parentNode!==i&&i.appendChild(o),o},tt=({shadowRoot:i,childElement:t,linkElement:e,href:s,newTab:r,rel:n})=>{if(!s)return e?(t.parentNode===e&&i.appendChild(t),e.parentNode===i&&i.removeChild(e),null):(t.parentNode!==i&&i.appendChild(t),null);let o=e||document.createElement("a");return F({linkElement:o,href:s,newTab:r,rel:n}),t.parentNode!==o&&o.appendChild(t),o.parentNode!==i&&i.appendChild(o),o};var S=["default","sm","md","lg","xl"],f=()=>S.reduce((i,t)=>(i[t]={},i),{}),It=["sm","md","lg","xl"],ue=({size:i,attr:t})=>i==="default"?t:`${i}-${t}`,pe=({size:i,includeDefault:t=!0})=>{if(i==="default")return["default"];let e=It.indexOf(i);if(e===-1)return t?["default"]:[];let s=It.slice(e);return t&&s.push("default"),s},et=({element:i,size:t,attr:e,includeDefault:s=!0})=>{let r=pe({size:t,includeDefault:s});for(let n of r){let o=ue({size:n,attr:e}),l=i.getAttribute(o);if(l!==null)return l}return null};var me=/^([1-9]|1[0-2])fg$/,ge=/^([1-9]\d*)\/([1-9]\d*)fb$/,it=i=>typeof i=="string"&&me.test(i),G=i=>{if(typeof i!="string")return null;let t=i.match(ge);if(!t)return null;let e=Number(t[1]),s=Number(t[2]);return!Number.isInteger(e)||!Number.isInteger(s)||s<=0||e>s?null:{numerator:e,denominator:s}};function zt({numerator:i,denominator:t,gapVar:e}){return i===t?"100%":i===1?`calc((100% - ((${t} - 1) * ${e})) / ${t})`:`calc(((100% - ((${t} - 1) * ${e})) * ${i}) / ${t})`}var b=({styleBucket:i,axis:t,dimension:e,fillValue:s,allowFlexGrow:r=!1,flexMinDimension:n="0",lockBounds:o=!0})=>{let l=()=>{!r||t!=="width"||(i["flex-grow"]="0",i["flex-shrink"]="1",i["flex-basis"]="auto")},a=()=>{i[`min-${t}`]="unset",i[`max-${t}`]="unset"};if(e===void 0)return;if(e==="f"){l(),i[t]=s,a();return}if(r&&it(e)){i["flex-grow"]=e.slice(0,-2),i["flex-basis"]="0%",i[`min-${t}`]=n,i[`max-${t}`]="unset";return}let h=r?G(e):null;if(h){i["flex-grow"]="0",i["flex-shrink"]="0",i["flex-basis"]=zt({...h,gapVar:"var(--rtgl-flex-gap, 0px)"}),i[`min-${t}`]=n,i[`max-${t}`]="unset";return}l(),i[t]=e,o&&(i[`min-${t}`]=e,i[`max-${t}`]=e)},P=({style:i,width:t,fillValue:e="var(--width-stretch)",allowFlexGrow:s=!0,flexMinWidth:r="0"})=>{if(t==="f"){i.width=e,i.flexGrow="",i.flexBasis="",i.minWidth="";return}if(s&&it(t)){i.width="",i.flexGrow=t.slice(0,-2),i.flexShrink="",i.flexBasis="0%",i.minWidth=r;return}let n=s?G(t):null;if(n){i.width="",i.flexGrow="0",i.flexShrink="0",i.flexBasis=zt({...n,gapVar:"var(--rtgl-flex-gap, 0px)"}),i.minWidth=r;return}if(t!=null){i.width=t,i.flexGrow="",i.flexShrink="",i.flexBasis="",i.minWidth="";return}i.width="",i.flexGrow="",i.flexShrink="",i.flexBasis="",i.minWidth=""};var fe=i=>`${i}`.trim().replace(/\s*\/\s*/g,"/"),N=i=>{if(i==null)return;let t=fe(i);if(t.length!==0)return typeof CSS<"u"&&typeof CSS.supports=="function"?CSS.supports("aspect-ratio",t)?t:void 0:t};function c(i,...t){let e="";return i.forEach((s,r)=>{e+=s+(t[r]||"")}),e}var be=["sm","md","lg","xl"],$t={mt:"margin-top",mr:"margin-right",mb:"margin-bottom",ml:"margin-left",m:"margin",mh:"margin-left margin-right",mv:"margin-top margin-bottom",pt:"padding-top",pr:"padding-right",pb:"padding-bottom",pl:"padding-left",p:"padding",ph:"padding-left padding-right",pv:"padding-top padding-bottom",g:"gap --rtgl-flex-gap",gv:"row-gap --rtgl-flex-gap",gh:"column-gap --rtgl-flex-gap",bw:"border-width",bwt:"border-top-width",bwr:"border-right-width",bwb:"border-bottom-width",bwl:"border-left-width",bc:"border-color",br:"border-radius",pos:"position",shadow:"box-shadow",cur:"cursor"},E=Object.keys($t),y=i=>i.concat(be.flatMap(t=>i.map(e=>`${t}-${e}`))),Bt={default:void 0,xl:"@media only screen and (max-width: 1280px)",lg:"@media only screen and (max-width: 1024px)",md:"@media only screen and (max-width: 768px)",sm:"@media only screen and (max-width: 640px)"},v=(i,t={},e=null)=>{let s="";for(let[r,n]of Object.entries(Bt)){r!=="default"&&(s+=`${n} {`);for(let[o,l]of Object.entries(i))for(let[a,h]of Object.entries(l)){let p=$t[o],_=h.startsWith("--")?`var(${h})`:h,x=r==="default"?o:`${r}-${o}`,C=r==="default"?`h-${o}`:`${r}-h-${o}`,z=(O,$=!1)=>{let k=$?`:host([${O}="${a}"]:hover)`:`:host([${O}="${a}"])`;if(e)return e.split(",").map(q=>`${k} ${q.trim()}`).join(", ");let W=t[o];return W?`${k} ${W}`:k};if(p){let $=p.split(" ").map(k=>`${k}: ${_};`).join(" ");s+=`
16
- ${z(x)}{
17
- ${$}
15
+ `,M=({linkElement:i,href:t,newTab:e,rel:s})=>{i.href=t,e?i.target="_blank":i.removeAttribute("target"),s!=null?i.rel=s:e?i.rel="noopener noreferrer":i.removeAttribute("rel")},L=({shadowRoot:i,slotElement:t,linkElement:e,href:s,newTab:r,rel:n})=>{if(t.parentNode!==i&&i.appendChild(t),!s)return e&&e.parentNode===i&&i.removeChild(e),null;let o=e||document.createElement("a");return M({linkElement:o,href:s,newTab:r,rel:n}),o.parentNode!==i&&i.appendChild(o),o},Y=({shadowRoot:i,childElement:t,linkElement:e,href:s,newTab:r,rel:n})=>{if(!s)return e?(t.parentNode===e&&i.appendChild(t),e.parentNode===i&&i.removeChild(e),null):(t.parentNode!==i&&i.appendChild(t),null);let o=e||document.createElement("a");return M({linkElement:o,href:s,newTab:r,rel:n}),t.parentNode!==o&&o.appendChild(t),o.parentNode!==i&&i.appendChild(o),o};var S=["default","sm","md","lg","xl"],f=()=>S.reduce((i,t)=>(i[t]={},i),{}),Et=["sm","md","lg","xl"],le=({size:i,attr:t})=>i==="default"?t:`${i}-${t}`,ae=({size:i,includeDefault:t=!0})=>{if(i==="default")return["default"];let e=Et.indexOf(i);if(e===-1)return t?["default"]:[];let s=Et.slice(e);return t&&s.push("default"),s},Q=({element:i,size:t,attr:e,includeDefault:s=!0})=>{let r=ae({size:t,includeDefault:s});for(let n of r){let o=le({size:n,attr:e}),l=i.getAttribute(o);if(l!==null)return l}return null};var he=/^([1-9]|1[0-2])fg$/,de=/^([1-9]\d*)\/([1-9]\d*)fb$/,J=i=>typeof i=="string"&&he.test(i),j=i=>{if(typeof i!="string")return null;let t=i.match(de);if(!t)return null;let e=Number(t[1]),s=Number(t[2]);return!Number.isInteger(e)||!Number.isInteger(s)||s<=0||e>s?null:{numerator:e,denominator:s}};function At({numerator:i,denominator:t,gapVar:e}){return i===t?"100%":i===1?`calc((100% - ((${t} - 1) * ${e})) / ${t})`:`calc(((100% - ((${t} - 1) * ${e})) * ${i}) / ${t})`}var b=({styleBucket:i,axis:t,dimension:e,fillValue:s,allowFlexGrow:r=!1,flexMinDimension:n="0",lockBounds:o=!0})=>{let l=()=>{!r||t!=="width"||(i["flex-grow"]="0",i["flex-shrink"]="1",i["flex-basis"]="auto")},a=()=>{i[`min-${t}`]="unset",i[`max-${t}`]="unset"};if(e===void 0)return;if(e==="f"){l(),i[t]=s,a();return}if(r&&J(e)){i["flex-grow"]=e.slice(0,-2),i["flex-basis"]="0%",i[`min-${t}`]=n,i[`max-${t}`]="unset";return}let h=r?j(e):null;if(h){i["flex-grow"]="0",i["flex-shrink"]="0",i["flex-basis"]=At({...h,gapVar:"var(--rtgl-flex-gap, 0px)"}),i[`min-${t}`]=n,i[`max-${t}`]="unset";return}l(),i[t]=e,o&&(i[`min-${t}`]=e,i[`max-${t}`]=e)},O=({style:i,width:t,fillValue:e="var(--width-stretch)",allowFlexGrow:s=!0,flexMinWidth:r="0"})=>{if(t==="f"){i.width=e,i.flexGrow="",i.flexBasis="",i.minWidth="";return}if(s&&J(t)){i.width="",i.flexGrow=t.slice(0,-2),i.flexShrink="",i.flexBasis="0%",i.minWidth=r;return}let n=s?j(t):null;if(n){i.width="",i.flexGrow="0",i.flexShrink="0",i.flexBasis=At({...n,gapVar:"var(--rtgl-flex-gap, 0px)"}),i.minWidth=r;return}if(t!=null){i.width=t,i.flexGrow="",i.flexShrink="",i.flexBasis="",i.minWidth="";return}i.width="",i.flexGrow="",i.flexShrink="",i.flexBasis="",i.minWidth=""};var ce=i=>`${i}`.trim().replace(/\s*\/\s*/g,"/"),W=i=>{if(i==null)return;let t=ce(i);if(t.length!==0)return typeof CSS<"u"&&typeof CSS.supports=="function"?CSS.supports("aspect-ratio",t)?t:void 0:t};function d(i,...t){let e="";return i.forEach((s,r)=>{e+=s+(t[r]||"")}),e}var ue=["sm","md","lg","xl"],kt={mt:"margin-top",mr:"margin-right",mb:"margin-bottom",ml:"margin-left",m:"margin",mh:"margin-left margin-right",mv:"margin-top margin-bottom",pt:"padding-top",pr:"padding-right",pb:"padding-bottom",pl:"padding-left",p:"padding",ph:"padding-left padding-right",pv:"padding-top padding-bottom",g:"gap --rtgl-flex-gap",gv:"row-gap --rtgl-flex-gap",gh:"column-gap --rtgl-flex-gap",bw:"border-width",bwt:"border-top-width",bwr:"border-right-width",bwb:"border-bottom-width",bwl:"border-left-width",bc:"border-color",br:"border-radius",pos:"position",shadow:"box-shadow",cur:"cursor"},k=Object.keys(kt),y=i=>i.concat(ue.flatMap(t=>i.map(e=>`${t}-${e}`))),Ct={default:void 0,xl:"@media only screen and (max-width: 1280px)",lg:"@media only screen and (max-width: 1024px)",md:"@media only screen and (max-width: 768px)",sm:"@media only screen and (max-width: 640px)"},v=(i,t={},e=null)=>{let s="";for(let[r,n]of Object.entries(Ct)){r!=="default"&&(s+=`${n} {`);for(let[o,l]of Object.entries(i))for(let[a,h]of Object.entries(l)){let p=kt[o],_=h.startsWith("--")?`var(${h})`:h,x=r==="default"?o:`${r}-${o}`,C=r==="default"?`h-${o}`:`${r}-h-${o}`,$=(A,E=!1)=>{let I=E?`:host([${A}="${a}"]:hover)`:`:host([${A}="${a}"])`;if(e)return e.split(",").map(X=>`${I} ${X.trim()}`).join(", ");let D=t[o];return D?`${I} ${D}`:I};if(p){let E=p.split(" ").map(I=>`${I}: ${_};`).join(" ");s+=`
16
+ ${$(x)}{
17
+ ${E}
18
18
  }
19
- ${z(C,!0)}{
20
- ${$}
19
+ ${$(C,!0)}{
20
+ ${E}
21
21
  }
22
22
  `}else s+=`
23
- ${z(x)}{
23
+ ${$(x)}{
24
24
  ${h}
25
25
  }
26
- ${z(C,!0)}{
26
+ ${$(C,!0)}{
27
27
  ${h}
28
28
  }
29
- `}r!=="default"&&(s+="}")}return s};function ve(i){if(i===null||i.includes("/"))return!1;let t=String(i);return/[0-9]$/.test(t)}var _e=i=>/%$/.test(i),ye=i=>/^([1-9]|1[0-2])fg$/.test(i),d=i=>{if(i!=null)return ye(i)||_e(i)?i:ve(i)?`${i}px`:Object.keys(u).includes(i)?`var(${u[i]})`:i},u={xs:"--spacing-xs",sm:"--spacing-sm",md:"--spacing-md",lg:"--spacing-lg",xl:"--spacing-xl"};function w(i,t=":host"){let e="",s=["default","xl","lg","md","sm"];for(let r of s){let n=Bt[r];if(!i[r]||Object.keys(i[r]).length===0)continue;r!=="default"&&(e+=`${n} {
29
+ `}r!=="default"&&(s+="}")}return s};function pe(i){if(i===null||i.includes("/"))return!1;let t=String(i);return/[0-9]$/.test(t)}var me=i=>/%$/.test(i),ge=i=>/^([1-9]|1[0-2])fg$/.test(i),c=i=>{if(i!=null)return ge(i)||me(i)?i:pe(i)?`${i}px`:Object.keys(u).includes(i)?`var(${u[i]})`:i},u={xs:"--spacing-xs",sm:"--spacing-sm",md:"--spacing-md",lg:"--spacing-lg",xl:"--spacing-xl"};function w(i,t=":host"){let e="",s=["default","xl","lg","md","sm"];for(let r of s){let n=Ct[r];if(!i[r]||Object.keys(i[r]).length===0)continue;r!=="default"&&(e+=`${n} {
30
30
  `);let o="";for(let[l,a]of Object.entries(i[r]))a!=null&&(o+=`${l}: ${a} !important;
31
31
  `);e+=`${t} {
32
32
  ${o.trim()}
33
33
  }
34
34
  `,r!=="default"&&(e+=`}
35
- `)}return e}var we={mt:u,mr:u,mb:u,ml:u,m:u,mh:u,mv:u,s:{sm:`
35
+ `)}return e}var fe={mt:u,mr:u,mb:u,ml:u,m:u,mh:u,mv:u,s:{sm:`
36
36
  height: 28px;
37
37
  padding-left: 12px;
38
38
  padding-right: 12px;
@@ -81,7 +81,7 @@ var rettangoli=(()=>{var T=`
81
81
  `,lk:`
82
82
  background-color: transparent;
83
83
  color: var(--foreground);
84
- `}},Lt=v(we,{},".surface");var xe=[{prefix:"sm",maxWidth:640},{prefix:"md",maxWidth:768},{prefix:"lg",maxWidth:1024},{prefix:"xl",maxWidth:1280}],st=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
84
+ `}},It=v(fe,{},".surface");var be=[{prefix:"sm",maxWidth:640},{prefix:"md",maxWidth:768},{prefix:"lg",maxWidth:1024},{prefix:"xl",maxWidth:1280}],Z=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
85
85
  :host {
86
86
  display: inline-flex;
87
87
  }
@@ -248,8 +248,8 @@ var rettangoli=(()=>{var T=`
248
248
  color: inherit;
249
249
  }
250
250
 
251
- ${Lt}
252
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._containerElement=null,this._surfaceElement=document.createElement("button"),this._slotElement=document.createElement("slot"),this._prefixIcon=null,this._suffixIcon=null,this._surfaceElement.className="surface",this._surfaceElement.appendChild(this._slotElement),this._onWindowResize=this._onWindowResize.bind(this)}static get observedAttributes(){return["key","href","new-tab","rel","w","pre","suf","disabled","v","s","sq","sm-s","md-s","lg-s","xl-s"]}connectedCallback(){window.addEventListener("resize",this._onWindowResize),this._updateButton()}disconnectedCallback(){window.removeEventListener("resize",this._onWindowResize)}attributeChangedCallback(t,e,s){this._updateButton()}_onWindowResize(){(this.hasAttribute("sm-s")||this.hasAttribute("md-s")||this.hasAttribute("lg-s")||this.hasAttribute("xl-s"))&&this._updateIcon()}_resolveResponsiveSizeToken(){let t=window.innerWidth;for(let{prefix:e,maxWidth:s}of xe){let r=`${e}-s`;if(t<=s&&this.hasAttribute(r))return this.getAttribute(r)}return this.getAttribute("s")}_updateButton(){this.shadow.innerHTML="";let t=this.hasAttribute("disabled"),e=this.getAttribute("href"),s=this.hasAttribute("new-tab"),r=this.getAttribute("rel"),n=e&&!t,o=n?"a":"button";if(this._surfaceElement.tagName.toLowerCase()!==o){let l=document.createElement(o);l.className="surface",l.appendChild(this._slotElement),this._surfaceElement=l}this._updateIcon(),this.hasAttribute("sq")?(this.style.width="",this.style.minWidth="",this.style.maxWidth="",this._surfaceElement.style.width="",this._surfaceElement.style.minWidth="",this._surfaceElement.style.maxWidth=""):this._updateWidth(),n?(F({linkElement:this._surfaceElement,href:e,newTab:s,rel:r}),this._surfaceElement.removeAttribute("disabled")):(this._surfaceElement.removeAttribute("href"),this._surfaceElement.removeAttribute("target"),this._surfaceElement.removeAttribute("rel"),t?this._surfaceElement.setAttribute("disabled",""):this._surfaceElement.removeAttribute("disabled")),this.shadow.appendChild(this._surfaceElement),this._containerElement=this._surfaceElement}_updateIcon(){this._prefixIcon&&(this._prefixIcon.remove(),this._prefixIcon=null),this._suffixIcon&&(this._suffixIcon.remove(),this._suffixIcon=null);let t={sm:14,md:18,lg:22},e=this._resolveResponsiveSizeToken(),s=18;this.hasAttribute("sq")?s={sm:14,lg:22}[e]||18:s=t[e]||18;let r=this.getAttribute("pre");r&&(this._prefixIcon=document.createElement("rtgl-svg"),this._prefixIcon.setAttribute("svg",r),this._prefixIcon.setAttribute("wh",s.toString()),this._prefixIcon.style.color="inherit",this._surfaceElement.insertBefore(this._prefixIcon,this._slotElement));let n=this.getAttribute("suf");n&&(this._suffixIcon=document.createElement("rtgl-svg"),this._suffixIcon.setAttribute("svg",n),this._suffixIcon.setAttribute("wh",s.toString()),this._suffixIcon.style.color="inherit",this._surfaceElement.appendChild(this._suffixIcon))}_updateWidth(){let t=d(this.getAttribute("w"));t==="f"?(this.style.width="var(--width-stretch)",this.style.minWidth="",this.style.maxWidth="",this._surfaceElement.style.width="100%",this._surfaceElement.style.minWidth="",this._surfaceElement.style.maxWidth=""):t!=null?(this.style.width=t,this.style.minWidth=t,this.style.maxWidth=t,this._surfaceElement.style.width="100%",this._surfaceElement.style.minWidth="",this._surfaceElement.style.maxWidth=""):(this.style.width="",this.style.minWidth="",this.style.maxWidth="",this._surfaceElement.style.width="",this._surfaceElement.style.minWidth="",this._surfaceElement.style.maxWidth="")}getBoundingClientRect(){return this._surfaceElement?this._surfaceElement.getBoundingClientRect():super.getBoundingClientRect()}},Tt=({render:i,html:t})=>st;var Se=({numerator:i,denominator:t,gapVar:e})=>i===t?"100%":i===1?`calc((100% - ((${t} - 1) * ${e})) / ${t})`:`calc(((100% - ((${t} - 1) * ${e})) * ${i}) / ${t})`,K=({index:i,maxIndex:t})=>!Number.isFinite(i)||!Number.isFinite(t)||t<0?0:Math.min(Math.max(Math.trunc(i),0),t),rt=({value:i,defaultValue:t=!1})=>{if(i==null)return t;let e=`${i}`.trim().toLowerCase();return e.length===0?!0:!(e==="false"||e==="0"||e==="no"||e==="off"||e==="none")},nt=i=>{if(i==null)return"x mandatory";let t=`${i}`.trim().toLowerCase();return t===""||t==="true"||t==="1"||t==="yes"?"x mandatory":t==="false"||t==="0"||t==="no"||t==="off"||t==="none"?"none":"x mandatory"},Mt=({slideLeft:i,slideWidth:t,viewportWidth:e,scrollPaddingInlineStart:s=0,scrollPaddingInlineEnd:r=0,snapAlign:n="center",maxScrollLeft:o=Number.POSITIVE_INFINITY})=>{if(!Number.isFinite(i)||!Number.isFinite(t)||!Number.isFinite(e))return 0;let l=s,a=e-r,h=Math.max(a-l,0),p;n==="start"?p=i-l:n==="end"?p=i+t-a:p=i+t/2-(l+h/2);let _=Number.isFinite(o)?Math.max(o,0):Number.POSITIVE_INFINITY;return Math.min(Math.max(p,0),_)},Ot=({slideWidthCss:i,snapAlign:t="center"})=>`${t??""}`.trim().toLowerCase()!=="center"?"0px":`max(calc((100% - (${i&&`${i}`.trim().length>0?`${i}`.trim():"100%"})) / 2), 0px)`,Rt=({slideWidth:i,gapVar:t="var(--rtgl-carousel-gap, 0px)"})=>{if(i==null||`${i}`.trim()===""||i==="f")return"100%";let e=G(`${i}`.trim());return e?Se({...e,gapVar:t}):d(`${i}`.trim())??"100%"};var Ee=["a","button","input","select","textarea","label","summary","[contenteditable]"].join(", "),ot=i=>{if(i==null)return null;let t=`${i}`.trim();return t.length>0?t:null},Ae=i=>i<.5?2*i*i:1-Math.pow(-2*i+2,2)/2,Wt=i=>{let t="http://www.w3.org/2000/svg",e=document.createElementNS(t,"svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("aria-hidden","true"),e.setAttribute("focusable","false");let s=document.createElementNS(t,"path");return s.setAttribute("d",i==="left"?"M15 18 9 12l6-6":"M9 18l6-6-6-6"),s.setAttribute("fill","none"),s.setAttribute("stroke","currentColor"),s.setAttribute("stroke-width","2"),s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),e.appendChild(s),e},lt=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
251
+ ${It}
252
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._containerElement=null,this._surfaceElement=document.createElement("button"),this._slotElement=document.createElement("slot"),this._prefixIcon=null,this._suffixIcon=null,this._surfaceElement.className="surface",this._surfaceElement.appendChild(this._slotElement),this._onWindowResize=this._onWindowResize.bind(this)}static get observedAttributes(){return["key","href","new-tab","rel","w","pre","suf","disabled","v","s","sq","sm-s","md-s","lg-s","xl-s"]}connectedCallback(){window.addEventListener("resize",this._onWindowResize),this._updateButton()}disconnectedCallback(){window.removeEventListener("resize",this._onWindowResize)}attributeChangedCallback(t,e,s){this._updateButton()}_onWindowResize(){(this.hasAttribute("sm-s")||this.hasAttribute("md-s")||this.hasAttribute("lg-s")||this.hasAttribute("xl-s"))&&this._updateIcon()}_resolveResponsiveSizeToken(){let t=window.innerWidth;for(let{prefix:e,maxWidth:s}of be){let r=`${e}-s`;if(t<=s&&this.hasAttribute(r))return this.getAttribute(r)}return this.getAttribute("s")}_updateButton(){this.shadow.innerHTML="";let t=this.hasAttribute("disabled"),e=this.getAttribute("href"),s=this.hasAttribute("new-tab"),r=this.getAttribute("rel"),n=e&&!t,o=n?"a":"button";if(this._surfaceElement.tagName.toLowerCase()!==o){let l=document.createElement(o);l.className="surface",l.appendChild(this._slotElement),this._surfaceElement=l}this._updateIcon(),this.hasAttribute("sq")?(this.style.width="",this.style.minWidth="",this.style.maxWidth="",this._surfaceElement.style.width="",this._surfaceElement.style.minWidth="",this._surfaceElement.style.maxWidth=""):this._updateWidth(),n?(M({linkElement:this._surfaceElement,href:e,newTab:s,rel:r}),this._surfaceElement.removeAttribute("disabled")):(this._surfaceElement.removeAttribute("href"),this._surfaceElement.removeAttribute("target"),this._surfaceElement.removeAttribute("rel"),t?this._surfaceElement.setAttribute("disabled",""):this._surfaceElement.removeAttribute("disabled")),this.shadow.appendChild(this._surfaceElement),this._containerElement=this._surfaceElement}_updateIcon(){this._prefixIcon&&(this._prefixIcon.remove(),this._prefixIcon=null),this._suffixIcon&&(this._suffixIcon.remove(),this._suffixIcon=null);let t={sm:14,md:18,lg:22},e=this._resolveResponsiveSizeToken(),s=18;this.hasAttribute("sq")?s={sm:14,lg:22}[e]||18:s=t[e]||18;let r=this.getAttribute("pre");r&&(this._prefixIcon=document.createElement("rtgl-svg"),this._prefixIcon.setAttribute("svg",r),this._prefixIcon.setAttribute("wh",s.toString()),this._prefixIcon.style.color="inherit",this._surfaceElement.insertBefore(this._prefixIcon,this._slotElement));let n=this.getAttribute("suf");n&&(this._suffixIcon=document.createElement("rtgl-svg"),this._suffixIcon.setAttribute("svg",n),this._suffixIcon.setAttribute("wh",s.toString()),this._suffixIcon.style.color="inherit",this._surfaceElement.appendChild(this._suffixIcon))}_updateWidth(){let t=c(this.getAttribute("w"));t==="f"?(this.style.width="var(--width-stretch)",this.style.minWidth="",this.style.maxWidth="",this._surfaceElement.style.width="100%",this._surfaceElement.style.minWidth="",this._surfaceElement.style.maxWidth=""):t!=null?(this.style.width=t,this.style.minWidth=t,this.style.maxWidth=t,this._surfaceElement.style.width="100%",this._surfaceElement.style.minWidth="",this._surfaceElement.style.maxWidth=""):(this.style.width="",this.style.minWidth="",this.style.maxWidth="",this._surfaceElement.style.width="",this._surfaceElement.style.minWidth="",this._surfaceElement.style.maxWidth="")}getBoundingClientRect(){return this._surfaceElement?this._surfaceElement.getBoundingClientRect():super.getBoundingClientRect()}},$t=({render:i,html:t})=>Z;var ve=({numerator:i,denominator:t,gapVar:e})=>i===t?"100%":i===1?`calc((100% - ((${t} - 1) * ${e})) / ${t})`:`calc(((100% - ((${t} - 1) * ${e})) * ${i}) / ${t})`,U=({index:i,maxIndex:t})=>!Number.isFinite(i)||!Number.isFinite(t)||t<0?0:Math.min(Math.max(Math.trunc(i),0),t),tt=({value:i,defaultValue:t=!1})=>{if(i==null)return t;let e=`${i}`.trim().toLowerCase();return e.length===0?!0:!(e==="false"||e==="0"||e==="no"||e==="off"||e==="none")},et=i=>{if(i==null)return"x mandatory";let t=`${i}`.trim().toLowerCase();return t===""||t==="true"||t==="1"||t==="yes"?"x mandatory":t==="false"||t==="0"||t==="no"||t==="off"||t==="none"?"none":"x mandatory"},zt=({slideLeft:i,slideWidth:t,viewportWidth:e,scrollPaddingInlineStart:s=0,scrollPaddingInlineEnd:r=0,snapAlign:n="center",maxScrollLeft:o=Number.POSITIVE_INFINITY})=>{if(!Number.isFinite(i)||!Number.isFinite(t)||!Number.isFinite(e))return 0;let l=s,a=e-r,h=Math.max(a-l,0),p;n==="start"?p=i-l:n==="end"?p=i+t-a:p=i+t/2-(l+h/2);let _=Number.isFinite(o)?Math.max(o,0):Number.POSITIVE_INFINITY;return Math.min(Math.max(p,0),_)},Bt=({slideWidthCss:i,snapAlign:t="center"})=>`${t??""}`.trim().toLowerCase()!=="center"?"0px":`max(calc((100% - (${i&&`${i}`.trim().length>0?`${i}`.trim():"100%"})) / 2), 0px)`,Lt=({slideWidth:i,gapVar:t="var(--rtgl-carousel-gap, 0px)"})=>{if(i==null||`${i}`.trim()===""||i==="f")return"100%";let e=j(`${i}`.trim());return e?ve({...e,gapVar:t}):c(`${i}`.trim())??"100%"};var _e=["a","button","input","select","textarea","label","summary","[contenteditable]"].join(", "),it=i=>{if(i==null)return null;let t=`${i}`.trim();return t.length>0?t:null},ye=i=>i<.5?2*i*i:1-Math.pow(-2*i+2,2)/2,Tt=i=>{let t="http://www.w3.org/2000/svg",e=document.createElementNS(t,"svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("aria-hidden","true"),e.setAttribute("focusable","false");let s=document.createElementNS(t,"path");return s.setAttribute("d",i==="left"?"M15 18 9 12l6-6":"M9 18l6-6-6-6"),s.setAttribute("fill","none"),s.setAttribute("stroke","currentColor"),s.setAttribute("stroke-width","2"),s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),e.appendChild(s),e},st=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
253
253
  :host {
254
254
  display: block;
255
255
  width: 100%;
@@ -444,19 +444,19 @@ var rettangoli=(()=>{var T=`
444
444
  border-color: var(--foreground);
445
445
  transform: scale(1.2);
446
446
  }
447
- `))}static get observedAttributes(){return["index","sw","sna","g","spi","sbh","snap","nav","pager"]}constructor(){super(),i.initializeStyleSheet(),this._slides=[],this._pagerButtons=[],this._currentIndex=0,this._clickSuppressUntil=0,this._dragState=null,this._scrollFrame=null,this._resizeFrame=null,this._scrollAnimationFrame=null,this._isReflectingIndex=!1,this._slideStyleCache=new WeakMap,this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._rootElement=document.createElement("div"),this._rootElement.id="root",this._viewportShellElement=document.createElement("div"),this._viewportShellElement.id="viewport-shell",this._viewportShellElement.setAttribute("part","viewport-shell"),this._viewportElement=document.createElement("div"),this._viewportElement.id="viewport",this._viewportElement.tabIndex=0,this._viewportElement.setAttribute("part","viewport"),this._slotElement=document.createElement("slot"),this._viewportElement.appendChild(this._slotElement),this._controlsElement=document.createElement("div"),this._controlsElement.id="controls",this._controlsElement.setAttribute("part","controls"),this._controlsElement.hidden=!0,this._prevButton=document.createElement("button"),this._prevButton.id="prev-button",this._prevButton.type="button",this._prevButton.hidden=!0,this._prevButton.append(Wt("left")),this._prevButton.setAttribute("part","nav-button prev-button"),this._prevButton.setAttribute("aria-label","Previous slide"),this._pagerElement=document.createElement("div"),this._pagerElement.id="pager",this._pagerElement.setAttribute("part","pager"),this._pagerElement.hidden=!0,this._nextButton=document.createElement("button"),this._nextButton.id="next-button",this._nextButton.type="button",this._nextButton.hidden=!0,this._nextButton.append(Wt("right")),this._nextButton.setAttribute("part","nav-button next-button"),this._nextButton.setAttribute("aria-label","Next slide"),this._viewportShellElement.append(this._viewportElement,this._prevButton,this._nextButton),this._controlsElement.append(this._pagerElement),this._rootElement.append(this._viewportShellElement,this._controlsElement),this.shadow.append(this._rootElement),this._handleSlotChange=this._handleSlotChange.bind(this),this._handleClickPrev=this._handleClickPrev.bind(this),this._handleClickNext=this._handleClickNext.bind(this),this._handleViewportKeydown=this._handleViewportKeydown.bind(this),this._handleViewportScroll=this._handleViewportScroll.bind(this),this._handleViewportPointerDown=this._handleViewportPointerDown.bind(this),this._handlePointerMove=this._handlePointerMove.bind(this),this._handlePointerUp=this._handlePointerUp.bind(this),this._handleViewportClickCapture=this._handleViewportClickCapture.bind(this),this._resizeObserver=typeof ResizeObserver<"u"?new ResizeObserver(()=>{this._resizeFrame!==null&&cancelAnimationFrame(this._resizeFrame),this._resizeFrame=requestAnimationFrame(()=>{this._resizeFrame=null,!(this._dragState?.dragging||!this._slides.length)&&this.goTo(this._currentIndex,{behavior:"auto"})})}):null}get index(){return this._currentIndex}set index(t){let e=Number(t);this.setAttribute("index",Number.isFinite(e)?`${e}`:"0")}get snap(){return nt(this.getAttribute("snap"))!=="none"}set snap(t){if(t===!1||`${t}`.trim().toLowerCase()==="false"){this.setAttribute("snap","false");return}this.setAttribute("snap","true")}connectedCallback(){this._slotElement.addEventListener("slotchange",this._handleSlotChange),this._prevButton.addEventListener("click",this._handleClickPrev),this._nextButton.addEventListener("click",this._handleClickNext),this._viewportElement.addEventListener("keydown",this._handleViewportKeydown),this._viewportElement.addEventListener("scroll",this._handleViewportScroll,{passive:!0}),this._viewportElement.addEventListener("pointerdown",this._handleViewportPointerDown),this._viewportElement.addEventListener("click",this._handleViewportClickCapture,!0),this._resizeObserver?.observe(this._viewportElement),this._syncSlides(),this._updateLayoutStyles();let t=this.hasAttribute("index")?Number(this.getAttribute("index")):0;this.goTo(t,{behavior:"auto"})}disconnectedCallback(){this._slotElement.removeEventListener("slotchange",this._handleSlotChange),this._prevButton.removeEventListener("click",this._handleClickPrev),this._nextButton.removeEventListener("click",this._handleClickNext),this._viewportElement.removeEventListener("keydown",this._handleViewportKeydown),this._viewportElement.removeEventListener("scroll",this._handleViewportScroll),this._viewportElement.removeEventListener("pointerdown",this._handleViewportPointerDown),this._viewportElement.removeEventListener("click",this._handleViewportClickCapture,!0),this._removePointerListeners(),this._resizeObserver?.disconnect(),this._scrollFrame!==null&&(cancelAnimationFrame(this._scrollFrame),this._scrollFrame=null),this._resizeFrame!==null&&(cancelAnimationFrame(this._resizeFrame),this._resizeFrame=null),this._cancelScrollAnimation(),this._setDraggingState(!1),this._slides.forEach(t=>{this._restoreSlideStyles(t),t.removeAttribute("data-rtgl-carousel-active")})}attributeChangedCallback(t,e,s){if(e!==s){if(t==="index"){if(this._isReflectingIndex){this._isReflectingIndex=!1;return}this.goTo(Number(s),{behavior:"smooth"});return}if(t==="nav"||t==="pager"){this._updateControls();return}this._updateLayoutStyles()}}next(){this.goTo(this._currentIndex+1)}prev(){this.goTo(this._currentIndex-1)}_showsNavControls(){return rt({value:this.getAttribute("nav"),defaultValue:!0})}_showsPagerControls(){return rt({value:this.getAttribute("pager"),defaultValue:!1})}goTo(t,e={}){if(!this._slides.length){this._setCurrentIndex(0,{emit:!1,reflect:!0});return}let s=K({index:Number(t),maxIndex:this._slides.length-1}),r=this._slides[s],n=e.behavior??"smooth";r&&(this._scrollViewportTo(this._getSlideTargetScrollLeft(r),{behavior:n}),this._setCurrentIndex(s))}_handleSlotChange(){this._syncSlides(),this._updateLayoutStyles(),this.goTo(this._currentIndex,{behavior:"auto"})}_handleClickPrev(){this.prev()}_handleClickNext(){this.next()}_handleViewportKeydown(t){t.key==="ArrowRight"?(t.preventDefault(),this.next()):t.key==="ArrowLeft"&&(t.preventDefault(),this.prev())}_handleViewportScroll(){this._scrollAnimationFrame===null&&(this._dragState?.dragging||this._requestSyncFromScroll())}_handleViewportPointerDown(t){t.pointerType==="mouse"&&(t.button!==0||!this._slides.length||this._eventTargetsInteractiveElement(t)||(this._cancelScrollAnimation(),this._dragState={pointerId:t.pointerId,startX:t.clientX,startScrollLeft:this._viewportElement.scrollLeft,dragging:!1},this._viewportElement.setPointerCapture(t.pointerId),this._viewportElement.addEventListener("pointermove",this._handlePointerMove),this._viewportElement.addEventListener("pointerup",this._handlePointerUp),this._viewportElement.addEventListener("pointercancel",this._handlePointerUp)))}_handlePointerMove(t){if(!this._dragState||t.pointerId!==this._dragState.pointerId)return;let e=t.clientX-this._dragState.startX;!this._dragState.dragging&&Math.abs(e)>6&&(this._dragState.dragging=!0,this._setDraggingState(!0)),this._dragState.dragging&&(t.preventDefault(),this._viewportElement.scrollLeft=this._dragState.startScrollLeft-e)}_handlePointerUp(t){if(!this._dragState||t.pointerId!==this._dragState.pointerId)return;let e=this._dragState.dragging,s=e?this._findNearestSlideIndex():this._currentIndex;this._viewportElement.hasPointerCapture(t.pointerId)&&this._viewportElement.releasePointerCapture(t.pointerId),this._dragState=null,this._setDraggingState(!1),this._removePointerListeners(),e&&(this._clickSuppressUntil=performance.now()+250,this.snap?this.goTo(s,{behavior:"smooth"}):this._requestSyncFromScroll())}_handleViewportClickCapture(t){performance.now()<this._clickSuppressUntil&&(t.preventDefault(),t.stopPropagation())}_removePointerListeners(){this._viewportElement.removeEventListener("pointermove",this._handlePointerMove),this._viewportElement.removeEventListener("pointerup",this._handlePointerUp),this._viewportElement.removeEventListener("pointercancel",this._handlePointerUp)}_eventTargetsInteractiveElement(t){return t.composedPath().some(e=>e instanceof Element&&e.matches(Ee))}_requestSyncFromScroll(){this._scrollFrame!==null&&cancelAnimationFrame(this._scrollFrame),this._scrollFrame=requestAnimationFrame(()=>{this._scrollFrame=null;let t=this._findNearestSlideIndex();this._setCurrentIndex(t)})}_findNearestSlideIndex(){if(!this._slides.length)return 0;let t=this._viewportElement.scrollLeft,e=this._currentIndex,s=Number.POSITIVE_INFINITY;return this._slides.forEach((r,n)=>{let o=Math.abs(this._getSlideTargetScrollLeft(r)-t);o<s&&(e=n,s=o)}),e}_syncSlides(){let t=new Set(this._slides),e=this._slotElement.assignedElements({flatten:!0}).filter(s=>!s.hasAttribute("hidden"));t.forEach(s=>{e.includes(s)||(this._restoreSlideStyles(s),s.removeAttribute("data-rtgl-carousel-active"))}),this._slides=e,this._slides.forEach(s=>{this._slideStyleCache.has(s)||this._slideStyleCache.set(s,{flex:s.style.flex,width:s.style.width,minWidth:s.style.minWidth,maxWidth:s.style.maxWidth,boxSizing:s.style.boxSizing,scrollSnapAlign:s.style.scrollSnapAlign,scrollSnapStop:s.style.scrollSnapStop})}),this._buildPager(),this._setCurrentIndex(K({index:this._currentIndex,maxIndex:this._slides.length-1}),{emit:!1,reflect:!0})}_restoreSlideStyles(t){let e=this._slideStyleCache.get(t);e&&(t.style.flex=e.flex,t.style.width=e.width,t.style.minWidth=e.minWidth,t.style.maxWidth=e.maxWidth,t.style.boxSizing=e.boxSizing,t.style.scrollSnapAlign=e.scrollSnapAlign,t.style.scrollSnapStop=e.scrollSnapStop)}_updateLayoutStyles(){let t=Rt({slideWidth:this.getAttribute("sw")}),e=ot(this.getAttribute("sna"))??"center",s=nt(this.getAttribute("snap")),r=d(this.getAttribute("g"))??"var(--spacing-md)",n=d(this.getAttribute("spi"))??"0px",o=ot(this.getAttribute("sbh"))??"smooth",l=Ot({slideWidthCss:t,snapAlign:e});this.style.setProperty("--rtgl-carousel-slide-width",t),this.style.setProperty("--rtgl-carousel-gap",r),this.style.setProperty("--rtgl-carousel-scroll-snap-type",s),this.style.setProperty("--rtgl-carousel-scroll-padding-inline",n),this.style.setProperty("--rtgl-carousel-edge-padding-inline",l),this.style.setProperty("--rtgl-carousel-scroll-behavior",o),this.style.setProperty("--rtgl-carousel-snap-align",e),this._slides.forEach(a=>{a.style.flex=`0 0 ${t}`,a.style.width=t,a.style.minWidth="0",a.style.maxWidth="unset",a.style.boxSizing="border-box",a.style.scrollSnapAlign=e,a.style.scrollSnapStop="always"})}_setDraggingState(t){if(t){this.setAttribute("dragging",""),this._viewportElement.style.scrollSnapType="none",this._viewportElement.style.scrollBehavior="auto";return}this.removeAttribute("dragging"),this._viewportElement.style.scrollSnapType="",this._viewportElement.style.scrollBehavior=""}_scrollViewportTo(t,e={}){let s=e.behavior??"smooth",r=Math.min(Math.max(t,0),Math.max(this._viewportElement.scrollWidth-this._viewportElement.clientWidth,0));if(s!=="smooth"||Math.abs(r-this._viewportElement.scrollLeft)<1){this._cancelScrollAnimation(),this._viewportElement.scrollLeft=r;return}this._cancelScrollAnimation();let n=this._viewportElement.scrollLeft,o=r-n,l=Math.min(720,Math.max(420,Math.abs(o)*.35)),a=performance.now();this._setAnimatingScrollState(!0);let h=p=>{let _=p-a,x=Math.min(_/l,1),C=Ae(x);if(this._viewportElement.scrollLeft=n+o*C,x<1){this._scrollAnimationFrame=requestAnimationFrame(h);return}this._viewportElement.scrollLeft=r,this._scrollAnimationFrame=null,this._setAnimatingScrollState(!1)};this._scrollAnimationFrame=requestAnimationFrame(h)}_cancelScrollAnimation(){this._scrollAnimationFrame!==null&&(cancelAnimationFrame(this._scrollAnimationFrame),this._scrollAnimationFrame=null,this._setAnimatingScrollState(!1))}_buildPager(){this._pagerElement.replaceChildren(),this._pagerButtons=[],this._slides.forEach((t,e)=>{let s=document.createElement("button");s.type="button",s.setAttribute("part","pager-button"),s.setAttribute("aria-label",`Go to slide ${e+1}`),s.setAttribute("title",`Go to slide ${e+1}`),s.addEventListener("click",()=>{this.goTo(e)}),this._pagerElement.appendChild(s),this._pagerButtons.push(s)}),this._updateControls()}_updateControls(){let t=this._slides.length>0,e=this._slides.length>1,s=this._currentIndex<=0,r=this._currentIndex>=this._slides.length-1,n=e&&this._showsNavControls(),o=e&&this._showsPagerControls();this._prevButton.hidden=!n,this._nextButton.hidden=!n,this._pagerElement.hidden=!o,this._controlsElement.hidden=!o,this._prevButton.disabled=!t||s,this._nextButton.disabled=!t||r,this._pagerButtons.forEach((l,a)=>{let h=a===this._currentIndex;l.classList.toggle("is-active",h),l.disabled=h,l.setAttribute("part",h?"pager-button pager-button-active":"pager-button"),h?l.setAttribute("aria-current","true"):l.removeAttribute("aria-current")})}_setCurrentIndex(t,e={}){let s=K({index:t,maxIndex:this._slides.length-1}),r=e.emit??!0,n=e.reflect??!0,o=this._currentIndex;this._currentIndex=s,this._slides.forEach((l,a)=>{a===s?l.setAttribute("data-rtgl-carousel-active","true"):l.removeAttribute("data-rtgl-carousel-active")}),this._updateControls(),n&&this.getAttribute("index")!==`${s}`&&(this._isReflectingIndex=!0,this.setAttribute("index",`${s}`)),r&&o!==s&&this.dispatchEvent(new CustomEvent("index-change",{detail:{index:s},bubbles:!0}))}_resolveScrollInlinePosition(){let t=ot(this.getAttribute("sna"))??"center";return t==="start"||t==="end"||t==="center"?t:"center"}_getSlideTargetScrollLeft(t){let e=this._viewportElement.getBoundingClientRect(),s=t.getBoundingClientRect();if(e.width<=0||s.width<=0)return this._viewportElement.scrollLeft;let r=getComputedStyle(this._viewportElement),n=this._viewportElement.scrollLeft,o=s.left-e.left+n;return Mt({slideLeft:o,slideWidth:s.width,viewportWidth:e.width,scrollPaddingInlineStart:this._parsePx(r.scrollPaddingInlineStart),scrollPaddingInlineEnd:this._parsePx(r.scrollPaddingInlineEnd),snapAlign:this._resolveScrollInlinePosition(),maxScrollLeft:this._viewportElement.scrollWidth-this._viewportElement.clientWidth})}_parsePx(t){let e=Number.parseFloat(t);return Number.isFinite(e)?e:0}_setAnimatingScrollState(t){if(t){this._viewportElement.style.scrollSnapType="none",this._viewportElement.style.scrollBehavior="auto";return}this._dragState?.dragging||(this._viewportElement.style.scrollSnapType="",this._viewportElement.style.scrollBehavior="")}},Ft=()=>lt;var Ce={cur:{alias:"alias","all-scroll":"all-scroll",auto:"auto",cell:"cell","col-resize":"col-resize","context-menu":"context-menu",copy:"copy",crosshair:"crosshair",default:"default","e-resize":"e-resize","ew-resize":"ew-resize",grab:"grab",grabbing:"grabbing",help:"help",move:"move","n-resize":"n-resize","ne-resize":"ne-resize","nesw-resize":"nesw-resize","ns-resize":"ns-resize","nw-resize":"nw-resize","nwse-resize":"nwse-resize","no-drop":"no-drop",none:"none","not-allowed":"not-allowed",pointer:"pointer",progress:"progress","row-resize":"row-resize","s-resize":"s-resize","se-resize":"se-resize","sw-resize":"sw-resize",text:"text",url:"url","w-resize":"w-resize",wait:"wait","zoom-in":"zoom-in","zoom-out":"zoom-out"}},m=v(Ce);var X=c`
447
+ `))}static get observedAttributes(){return["index","sw","sna","g","spi","sbh","snap","nav","pager"]}constructor(){super(),i.initializeStyleSheet(),this._slides=[],this._pagerButtons=[],this._currentIndex=0,this._clickSuppressUntil=0,this._dragState=null,this._scrollFrame=null,this._resizeFrame=null,this._scrollAnimationFrame=null,this._isReflectingIndex=!1,this._slideStyleCache=new WeakMap,this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._rootElement=document.createElement("div"),this._rootElement.id="root",this._viewportShellElement=document.createElement("div"),this._viewportShellElement.id="viewport-shell",this._viewportShellElement.setAttribute("part","viewport-shell"),this._viewportElement=document.createElement("div"),this._viewportElement.id="viewport",this._viewportElement.tabIndex=0,this._viewportElement.setAttribute("part","viewport"),this._slotElement=document.createElement("slot"),this._viewportElement.appendChild(this._slotElement),this._controlsElement=document.createElement("div"),this._controlsElement.id="controls",this._controlsElement.setAttribute("part","controls"),this._controlsElement.hidden=!0,this._prevButton=document.createElement("button"),this._prevButton.id="prev-button",this._prevButton.type="button",this._prevButton.hidden=!0,this._prevButton.append(Tt("left")),this._prevButton.setAttribute("part","nav-button prev-button"),this._prevButton.setAttribute("aria-label","Previous slide"),this._pagerElement=document.createElement("div"),this._pagerElement.id="pager",this._pagerElement.setAttribute("part","pager"),this._pagerElement.hidden=!0,this._nextButton=document.createElement("button"),this._nextButton.id="next-button",this._nextButton.type="button",this._nextButton.hidden=!0,this._nextButton.append(Tt("right")),this._nextButton.setAttribute("part","nav-button next-button"),this._nextButton.setAttribute("aria-label","Next slide"),this._viewportShellElement.append(this._viewportElement,this._prevButton,this._nextButton),this._controlsElement.append(this._pagerElement),this._rootElement.append(this._viewportShellElement,this._controlsElement),this.shadow.append(this._rootElement),this._handleSlotChange=this._handleSlotChange.bind(this),this._handleClickPrev=this._handleClickPrev.bind(this),this._handleClickNext=this._handleClickNext.bind(this),this._handleViewportKeydown=this._handleViewportKeydown.bind(this),this._handleViewportScroll=this._handleViewportScroll.bind(this),this._handleViewportPointerDown=this._handleViewportPointerDown.bind(this),this._handlePointerMove=this._handlePointerMove.bind(this),this._handlePointerUp=this._handlePointerUp.bind(this),this._handleViewportClickCapture=this._handleViewportClickCapture.bind(this),this._resizeObserver=typeof ResizeObserver<"u"?new ResizeObserver(()=>{this._resizeFrame!==null&&cancelAnimationFrame(this._resizeFrame),this._resizeFrame=requestAnimationFrame(()=>{this._resizeFrame=null,!(this._dragState?.dragging||!this._slides.length)&&this.goTo(this._currentIndex,{behavior:"auto"})})}):null}get index(){return this._currentIndex}set index(t){let e=Number(t);this.setAttribute("index",Number.isFinite(e)?`${e}`:"0")}get snap(){return et(this.getAttribute("snap"))!=="none"}set snap(t){if(t===!1||`${t}`.trim().toLowerCase()==="false"){this.setAttribute("snap","false");return}this.setAttribute("snap","true")}connectedCallback(){this._slotElement.addEventListener("slotchange",this._handleSlotChange),this._prevButton.addEventListener("click",this._handleClickPrev),this._nextButton.addEventListener("click",this._handleClickNext),this._viewportElement.addEventListener("keydown",this._handleViewportKeydown),this._viewportElement.addEventListener("scroll",this._handleViewportScroll,{passive:!0}),this._viewportElement.addEventListener("pointerdown",this._handleViewportPointerDown),this._viewportElement.addEventListener("click",this._handleViewportClickCapture,!0),this._resizeObserver?.observe(this._viewportElement),this._syncSlides(),this._updateLayoutStyles();let t=this.hasAttribute("index")?Number(this.getAttribute("index")):0;this.goTo(t,{behavior:"auto"})}disconnectedCallback(){this._slotElement.removeEventListener("slotchange",this._handleSlotChange),this._prevButton.removeEventListener("click",this._handleClickPrev),this._nextButton.removeEventListener("click",this._handleClickNext),this._viewportElement.removeEventListener("keydown",this._handleViewportKeydown),this._viewportElement.removeEventListener("scroll",this._handleViewportScroll),this._viewportElement.removeEventListener("pointerdown",this._handleViewportPointerDown),this._viewportElement.removeEventListener("click",this._handleViewportClickCapture,!0),this._removePointerListeners(),this._resizeObserver?.disconnect(),this._scrollFrame!==null&&(cancelAnimationFrame(this._scrollFrame),this._scrollFrame=null),this._resizeFrame!==null&&(cancelAnimationFrame(this._resizeFrame),this._resizeFrame=null),this._cancelScrollAnimation(),this._setDraggingState(!1),this._slides.forEach(t=>{this._restoreSlideStyles(t),t.removeAttribute("data-rtgl-carousel-active")})}attributeChangedCallback(t,e,s){if(e!==s){if(t==="index"){if(this._isReflectingIndex){this._isReflectingIndex=!1;return}this.goTo(Number(s),{behavior:"smooth"});return}if(t==="nav"||t==="pager"){this._updateControls();return}this._updateLayoutStyles()}}next(){this.goTo(this._currentIndex+1)}prev(){this.goTo(this._currentIndex-1)}_showsNavControls(){return tt({value:this.getAttribute("nav"),defaultValue:!0})}_showsPagerControls(){return tt({value:this.getAttribute("pager"),defaultValue:!1})}goTo(t,e={}){if(!this._slides.length){this._setCurrentIndex(0,{emit:!1,reflect:!0});return}let s=U({index:Number(t),maxIndex:this._slides.length-1}),r=this._slides[s],n=e.behavior??"smooth";r&&(this._scrollViewportTo(this._getSlideTargetScrollLeft(r),{behavior:n}),this._setCurrentIndex(s))}_handleSlotChange(){this._syncSlides(),this._updateLayoutStyles(),this.goTo(this._currentIndex,{behavior:"auto"})}_handleClickPrev(){this.prev()}_handleClickNext(){this.next()}_handleViewportKeydown(t){t.key==="ArrowRight"?(t.preventDefault(),this.next()):t.key==="ArrowLeft"&&(t.preventDefault(),this.prev())}_handleViewportScroll(){this._scrollAnimationFrame===null&&(this._dragState?.dragging||this._requestSyncFromScroll())}_handleViewportPointerDown(t){t.pointerType==="mouse"&&(t.button!==0||!this._slides.length||this._eventTargetsInteractiveElement(t)||(this._cancelScrollAnimation(),this._dragState={pointerId:t.pointerId,startX:t.clientX,startScrollLeft:this._viewportElement.scrollLeft,dragging:!1},this._viewportElement.setPointerCapture(t.pointerId),this._viewportElement.addEventListener("pointermove",this._handlePointerMove),this._viewportElement.addEventListener("pointerup",this._handlePointerUp),this._viewportElement.addEventListener("pointercancel",this._handlePointerUp)))}_handlePointerMove(t){if(!this._dragState||t.pointerId!==this._dragState.pointerId)return;let e=t.clientX-this._dragState.startX;!this._dragState.dragging&&Math.abs(e)>6&&(this._dragState.dragging=!0,this._setDraggingState(!0)),this._dragState.dragging&&(t.preventDefault(),this._viewportElement.scrollLeft=this._dragState.startScrollLeft-e)}_handlePointerUp(t){if(!this._dragState||t.pointerId!==this._dragState.pointerId)return;let e=this._dragState.dragging,s=e?this._findNearestSlideIndex():this._currentIndex;this._viewportElement.hasPointerCapture(t.pointerId)&&this._viewportElement.releasePointerCapture(t.pointerId),this._dragState=null,this._setDraggingState(!1),this._removePointerListeners(),e&&(this._clickSuppressUntil=performance.now()+250,this.snap?this.goTo(s,{behavior:"smooth"}):this._requestSyncFromScroll())}_handleViewportClickCapture(t){performance.now()<this._clickSuppressUntil&&(t.preventDefault(),t.stopPropagation())}_removePointerListeners(){this._viewportElement.removeEventListener("pointermove",this._handlePointerMove),this._viewportElement.removeEventListener("pointerup",this._handlePointerUp),this._viewportElement.removeEventListener("pointercancel",this._handlePointerUp)}_eventTargetsInteractiveElement(t){return t.composedPath().some(e=>e instanceof Element&&e.matches(_e))}_requestSyncFromScroll(){this._scrollFrame!==null&&cancelAnimationFrame(this._scrollFrame),this._scrollFrame=requestAnimationFrame(()=>{this._scrollFrame=null;let t=this._findNearestSlideIndex();this._setCurrentIndex(t)})}_findNearestSlideIndex(){if(!this._slides.length)return 0;let t=this._viewportElement.scrollLeft,e=this._currentIndex,s=Number.POSITIVE_INFINITY;return this._slides.forEach((r,n)=>{let o=Math.abs(this._getSlideTargetScrollLeft(r)-t);o<s&&(e=n,s=o)}),e}_syncSlides(){let t=new Set(this._slides),e=this._slotElement.assignedElements({flatten:!0}).filter(s=>!s.hasAttribute("hidden"));t.forEach(s=>{e.includes(s)||(this._restoreSlideStyles(s),s.removeAttribute("data-rtgl-carousel-active"))}),this._slides=e,this._slides.forEach(s=>{this._slideStyleCache.has(s)||this._slideStyleCache.set(s,{flex:s.style.flex,width:s.style.width,minWidth:s.style.minWidth,maxWidth:s.style.maxWidth,boxSizing:s.style.boxSizing,scrollSnapAlign:s.style.scrollSnapAlign,scrollSnapStop:s.style.scrollSnapStop})}),this._buildPager(),this._setCurrentIndex(U({index:this._currentIndex,maxIndex:this._slides.length-1}),{emit:!1,reflect:!0})}_restoreSlideStyles(t){let e=this._slideStyleCache.get(t);e&&(t.style.flex=e.flex,t.style.width=e.width,t.style.minWidth=e.minWidth,t.style.maxWidth=e.maxWidth,t.style.boxSizing=e.boxSizing,t.style.scrollSnapAlign=e.scrollSnapAlign,t.style.scrollSnapStop=e.scrollSnapStop)}_updateLayoutStyles(){let t=Lt({slideWidth:this.getAttribute("sw")}),e=it(this.getAttribute("sna"))??"center",s=et(this.getAttribute("snap")),r=c(this.getAttribute("g"))??"var(--spacing-md)",n=c(this.getAttribute("spi"))??"0px",o=it(this.getAttribute("sbh"))??"smooth",l=Bt({slideWidthCss:t,snapAlign:e});this.style.setProperty("--rtgl-carousel-slide-width",t),this.style.setProperty("--rtgl-carousel-gap",r),this.style.setProperty("--rtgl-carousel-scroll-snap-type",s),this.style.setProperty("--rtgl-carousel-scroll-padding-inline",n),this.style.setProperty("--rtgl-carousel-edge-padding-inline",l),this.style.setProperty("--rtgl-carousel-scroll-behavior",o),this.style.setProperty("--rtgl-carousel-snap-align",e),this._slides.forEach(a=>{a.style.flex=`0 0 ${t}`,a.style.width=t,a.style.minWidth="0",a.style.maxWidth="unset",a.style.boxSizing="border-box",a.style.scrollSnapAlign=e,a.style.scrollSnapStop="always"})}_setDraggingState(t){if(t){this.setAttribute("dragging",""),this._viewportElement.style.scrollSnapType="none",this._viewportElement.style.scrollBehavior="auto";return}this.removeAttribute("dragging"),this._viewportElement.style.scrollSnapType="",this._viewportElement.style.scrollBehavior=""}_scrollViewportTo(t,e={}){let s=e.behavior??"smooth",r=Math.min(Math.max(t,0),Math.max(this._viewportElement.scrollWidth-this._viewportElement.clientWidth,0));if(s!=="smooth"||Math.abs(r-this._viewportElement.scrollLeft)<1){this._cancelScrollAnimation(),this._viewportElement.scrollLeft=r;return}this._cancelScrollAnimation();let n=this._viewportElement.scrollLeft,o=r-n,l=Math.min(720,Math.max(420,Math.abs(o)*.35)),a=performance.now();this._setAnimatingScrollState(!0);let h=p=>{let _=p-a,x=Math.min(_/l,1),C=ye(x);if(this._viewportElement.scrollLeft=n+o*C,x<1){this._scrollAnimationFrame=requestAnimationFrame(h);return}this._viewportElement.scrollLeft=r,this._scrollAnimationFrame=null,this._setAnimatingScrollState(!1)};this._scrollAnimationFrame=requestAnimationFrame(h)}_cancelScrollAnimation(){this._scrollAnimationFrame!==null&&(cancelAnimationFrame(this._scrollAnimationFrame),this._scrollAnimationFrame=null,this._setAnimatingScrollState(!1))}_buildPager(){this._pagerElement.replaceChildren(),this._pagerButtons=[],this._slides.forEach((t,e)=>{let s=document.createElement("button");s.type="button",s.setAttribute("part","pager-button"),s.setAttribute("aria-label",`Go to slide ${e+1}`),s.setAttribute("title",`Go to slide ${e+1}`),s.addEventListener("click",()=>{this.goTo(e)}),this._pagerElement.appendChild(s),this._pagerButtons.push(s)}),this._updateControls()}_updateControls(){let t=this._slides.length>0,e=this._slides.length>1,s=this._currentIndex<=0,r=this._currentIndex>=this._slides.length-1,n=e&&this._showsNavControls(),o=e&&this._showsPagerControls();this._prevButton.hidden=!n,this._nextButton.hidden=!n,this._pagerElement.hidden=!o,this._controlsElement.hidden=!o,this._prevButton.disabled=!t||s,this._nextButton.disabled=!t||r,this._pagerButtons.forEach((l,a)=>{let h=a===this._currentIndex;l.classList.toggle("is-active",h),l.disabled=h,l.setAttribute("part",h?"pager-button pager-button-active":"pager-button"),h?l.setAttribute("aria-current","true"):l.removeAttribute("aria-current")})}_setCurrentIndex(t,e={}){let s=U({index:t,maxIndex:this._slides.length-1}),r=e.emit??!0,n=e.reflect??!0,o=this._currentIndex;this._currentIndex=s,this._slides.forEach((l,a)=>{a===s?l.setAttribute("data-rtgl-carousel-active","true"):l.removeAttribute("data-rtgl-carousel-active")}),this._updateControls(),n&&this.getAttribute("index")!==`${s}`&&(this._isReflectingIndex=!0,this.setAttribute("index",`${s}`)),r&&o!==s&&this.dispatchEvent(new CustomEvent("index-change",{detail:{index:s},bubbles:!0}))}_resolveScrollInlinePosition(){let t=it(this.getAttribute("sna"))??"center";return t==="start"||t==="end"||t==="center"?t:"center"}_getSlideTargetScrollLeft(t){let e=this._viewportElement.getBoundingClientRect(),s=t.getBoundingClientRect();if(e.width<=0||s.width<=0)return this._viewportElement.scrollLeft;let r=getComputedStyle(this._viewportElement),n=this._viewportElement.scrollLeft,o=s.left-e.left+n;return zt({slideLeft:o,slideWidth:s.width,viewportWidth:e.width,scrollPaddingInlineStart:this._parsePx(r.scrollPaddingInlineStart),scrollPaddingInlineEnd:this._parsePx(r.scrollPaddingInlineEnd),snapAlign:this._resolveScrollInlinePosition(),maxScrollLeft:this._viewportElement.scrollWidth-this._viewportElement.clientWidth})}_parsePx(t){let e=Number.parseFloat(t);return Number.isFinite(e)?e:0}_setAnimatingScrollState(t){if(t){this._viewportElement.style.scrollSnapType="none",this._viewportElement.style.scrollBehavior="auto";return}this._dragState?.dragging||(this._viewportElement.style.scrollSnapType="",this._viewportElement.style.scrollBehavior="")}},Mt=()=>st;var we={cur:{alias:"alias","all-scroll":"all-scroll",auto:"auto",cell:"cell","col-resize":"col-resize","context-menu":"context-menu",copy:"copy",crosshair:"crosshair",default:"default","e-resize":"e-resize","ew-resize":"ew-resize",grab:"grab",grabbing:"grabbing",help:"help",move:"move","n-resize":"n-resize","ne-resize":"ne-resize","nesw-resize":"nesw-resize","ns-resize":"ns-resize","nw-resize":"nw-resize","nwse-resize":"nwse-resize","no-drop":"no-drop",none:"none","not-allowed":"not-allowed",pointer:"pointer",progress:"progress","row-resize":"row-resize","s-resize":"s-resize","se-resize":"se-resize","sw-resize":"sw-resize",text:"text",url:"url","w-resize":"w-resize",wait:"wait","zoom-in":"zoom-in","zoom-out":"zoom-out"}},m=v(we);var H=d`
448
448
  :host([sh]:not([sv])) {
449
- overflow-x: scroll;
449
+ overflow-x: auto;
450
450
  flex-wrap: nowrap;
451
451
  min-width: 0;
452
452
  }
453
453
  :host([sv]:not([sh])) {
454
- overflow-y: scroll;
454
+ overflow-y: auto;
455
455
  flex-wrap: nowrap;
456
456
  min-height: 0;
457
457
  }
458
458
  :host([sh][sv]) {
459
- overflow: scroll;
459
+ overflow: auto;
460
460
  flex-wrap: nowrap;
461
461
  min-height: 0;
462
462
  min-width: 0;
@@ -464,6 +464,7 @@ var rettangoli=(()=>{var T=`
464
464
  :host([sh]),
465
465
  :host([sv]) {
466
466
  -ms-overflow-style: auto;
467
+ scrollbar-gutter: stable;
467
468
  scrollbar-width: thin;
468
469
  scrollbar-color: var(--scrollbar-thumb, var(--muted-foreground)) var(--scrollbar-track, transparent);
469
470
  }
@@ -490,8 +491,40 @@ var rettangoli=(()=>{var T=`
490
491
  overflow: hidden;
491
492
  flex-wrap: nowrap;
492
493
  }
494
+ :host([hsb])::-webkit-scrollbar {
495
+ width: 0;
496
+ height: 0;
497
+ }
498
+
499
+ @media only screen and (max-width: 1280px) {
500
+ :host([xl-hsb])::-webkit-scrollbar {
501
+ width: 0;
502
+ height: 0;
503
+ }
504
+ }
493
505
 
494
- `;var V={none:"0",xs:"--border-width-xs",sm:"--border-width-sm",md:"--border-width-md",lg:"--border-width-lg",xl:"--border-width-xl"},ke={bgc:{pr:`
506
+ @media only screen and (max-width: 1024px) {
507
+ :host([lg-hsb])::-webkit-scrollbar {
508
+ width: 0;
509
+ height: 0;
510
+ }
511
+ }
512
+
513
+ @media only screen and (max-width: 768px) {
514
+ :host([md-hsb])::-webkit-scrollbar {
515
+ width: 0;
516
+ height: 0;
517
+ }
518
+ }
519
+
520
+ @media only screen and (max-width: 640px) {
521
+ :host([sm-hsb])::-webkit-scrollbar {
522
+ width: 0;
523
+ height: 0;
524
+ }
525
+ }
526
+
527
+ `;var F={none:"0",xs:"--border-width-xs",sm:"--border-width-sm",md:"--border-width-md",lg:"--border-width-lg",xl:"--border-width-xl"},xe={bgc:{pr:`
495
528
  background-color: var(--primary);
496
529
  `,se:`
497
530
  background-color: var(--secondary);
@@ -531,7 +564,7 @@ var rettangoli=(()=>{var T=`
531
564
  left: 0;
532
565
  top: 0;
533
566
  height: 100%;
534
- `},shadow:{sm:"--shadow-sm",md:"--shadow-md",lg:"--shadow-lg"},pt:u,pr:u,pb:u,pl:u,p:u,ph:u,pv:u,g:u,gv:u,gh:u,bw:V,bwt:V,bwr:V,bwb:V,bwl:V,bc:{pr:"--primary",se:"--secondary",de:"--destructive",fg:"--foreground",bg:"--background",mu:"--muted",ac:"--accent",bo:"--border",tr:"transparent"},br:{xs:"--border-radius-xs",sm:"--border-radius-sm",md:"--border-radius-md",lg:"--border-radius-lg",xl:"--border-radius-xl",f:"--border-radius-f"}},Y=v(ke);var Ie={mt:u,mr:u,mb:u,ml:u,m:u,mh:u,mv:u},g=v(Ie);var R=c`
567
+ `},shadow:{sm:"--shadow-sm",md:"--shadow-md",lg:"--shadow-lg"},pt:u,pr:u,pb:u,pl:u,p:u,ph:u,pv:u,g:u,gv:u,gh:u,bw:F,bwt:F,bwr:F,bwb:F,bwl:F,bc:{pr:"--primary",se:"--secondary",de:"--destructive",fg:"--foreground",bg:"--background",mu:"--muted",ac:"--accent",bo:"--border",tr:"transparent"},br:{xs:"--border-radius-xs",sm:"--border-radius-sm",md:"--border-radius-md",lg:"--border-radius-lg",xl:"--border-radius-xl",f:"--border-radius-f"}},q=v(xe);var Se={mt:u,mr:u,mb:u,ml:u,m:u,mh:u,mv:u},g=v(Se);var T=d`
535
568
  a, a:link, a:visited, a:hover, a:active {
536
569
  color: inherit;
537
570
  text-decoration: none;
@@ -541,7 +574,7 @@ var rettangoli=(()=>{var T=`
541
574
  margin: 0;
542
575
  font: inherit;
543
576
  }
544
- `;var ze=i=>{if(i==null)return null;let t=i.trim();return t===""?null:/^[1-9]\d*$/.test(t)?`repeat(${t}, minmax(0, 1fr))`:t},at=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
577
+ `;var Ee=i=>{if(i==null)return null;let t=i.trim();return t===""?null:/^[1-9]\d*$/.test(t)?`repeat(${t}, minmax(0, 1fr))`:t},rt=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
545
578
  slot {
546
579
  display: contents;
547
580
  }
@@ -555,13 +588,13 @@ var rettangoli=(()=>{var T=`
555
588
  border-color: var(--border);
556
589
  }
557
590
 
558
- ${X}
591
+ ${H}
559
592
  ${g}
560
593
  ${m}
561
- ${Y}
562
- ${R}
594
+ ${q}
563
595
  ${T}
564
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styleElement=document.createElement("style"),this._slotElement=document.createElement("slot"),this._linkElement=null,this.shadow.appendChild(this._styleElement),this._updateDOM()}static get observedAttributes(){return["href","new-tab","rel",...y([...E,"cols","op","wh","w","h","hide","show","sh","sv","z","overflow"])]}_styles=f();_lastStyleString="";_updateDOM(){let t=this.getAttribute("href"),e=this.hasAttribute("new-tab"),s=this.getAttribute("rel");this._linkElement=M({shadowRoot:this.shadow,slotElement:this._slotElement,linkElement:this._linkElement,href:t,newTab:e,rel:s})}connectedCallback(){this.updateStyles()}updateStyles(){this._styles=f(),S.forEach(e=>{let s=C=>`${e==="default"?"":`${e}-`}${C}`,r=this.getAttribute(s("wh")),n=d(r===null?this.getAttribute(s("w")):r),o=d(r===null?this.getAttribute(s("h")):r),l=ze(this.getAttribute(s("cols"))),a=this.getAttribute(s("op")),h=this.getAttribute(s("z"));l!==null&&(this._styles[e]["grid-template-columns"]=l),h!==null&&(this._styles[e]["z-index"]=h),a!==null&&(this._styles[e].opacity=a),b({styleBucket:this._styles[e],axis:"width",dimension:n,fillValue:"var(--width-stretch)",allowFlexGrow:!0}),b({styleBucket:this._styles[e],axis:"height",dimension:o,fillValue:"100%",allowFlexGrow:!0}),this.hasAttribute(s("hide"))&&(this._styles[e].display="none"),this.hasAttribute(s("show"))&&(this._styles[e].display="grid");let p=this.hasAttribute(s("sh")),_=this.hasAttribute(s("sv")),x=this.getAttribute(s("overflow"));p&&_?this._styles[e].overflow="scroll":p?this._styles[e]["overflow-x"]="scroll":_&&(this._styles[e]["overflow-y"]="scroll"),x==="hidden"&&(this._styles[e].overflow="hidden")});let t=w(this._styles);t!==this._lastStyleString&&(this._styleElement.textContent=t,this._lastStyleString=t)}attributeChangedCallback(t,e,s){if(t==="href"||t==="new-tab"||t==="rel"){this._updateDOM();return}e!==s&&this.updateStyles()}},Pt=({render:i,html:t})=>at;var Nt=c`
596
+ ${B}
597
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styleElement=document.createElement("style"),this._slotElement=document.createElement("slot"),this._linkElement=null,this.shadow.appendChild(this._styleElement),this._updateDOM()}static get observedAttributes(){return["href","new-tab","rel",...y([...k,"cols","op","wh","w","h","hide","show","sh","sv","z","overflow"])]}_styles=f();_lastStyleString="";_updateDOM(){let t=this.getAttribute("href"),e=this.hasAttribute("new-tab"),s=this.getAttribute("rel");this._linkElement=L({shadowRoot:this.shadow,slotElement:this._slotElement,linkElement:this._linkElement,href:t,newTab:e,rel:s})}connectedCallback(){this.updateStyles()}updateStyles(){this._styles=f(),S.forEach(e=>{let s=C=>`${e==="default"?"":`${e}-`}${C}`,r=this.getAttribute(s("wh")),n=c(r===null?this.getAttribute(s("w")):r),o=c(r===null?this.getAttribute(s("h")):r),l=Ee(this.getAttribute(s("cols"))),a=this.getAttribute(s("op")),h=this.getAttribute(s("z"));l!==null&&(this._styles[e]["grid-template-columns"]=l),h!==null&&(this._styles[e]["z-index"]=h),a!==null&&(this._styles[e].opacity=a),b({styleBucket:this._styles[e],axis:"width",dimension:n,fillValue:"var(--width-stretch)",allowFlexGrow:!0}),b({styleBucket:this._styles[e],axis:"height",dimension:o,fillValue:"100%",allowFlexGrow:!0}),this.hasAttribute(s("hide"))&&(this._styles[e].display="none"),this.hasAttribute(s("show"))&&(this._styles[e].display="grid");let p=this.hasAttribute(s("sh")),_=this.hasAttribute(s("sv")),x=this.getAttribute(s("overflow"));p&&_?(this._styles[e].overflow="auto",this._styles[e]["scrollbar-gutter"]="stable"):p?(this._styles[e]["overflow-x"]="auto",this._styles[e]["scrollbar-gutter"]="stable"):_&&(this._styles[e]["overflow-y"]="auto",this._styles[e]["scrollbar-gutter"]="stable"),x==="hidden"&&(this._styles[e].overflow="hidden")});let t=w(this._styles);t!==this._lastStyleString&&(this._styleElement.textContent=t,this._lastStyleString=t)}attributeChangedCallback(t,e,s){if(t==="href"||t==="new-tab"||t==="rel"){this._updateDOM();return}e!==s&&this.updateStyles()}},Ot=({render:i,html:t})=>rt;var Wt=d`
565
598
 
566
599
  :host([d="h"]) {
567
600
  flex-direction: row;
@@ -632,7 +665,7 @@ var rettangoli=(()=>{var T=`
632
665
  justify-content: center;
633
666
  }
634
667
  }
635
- `;var A=i=>{if(i==null)return null;let t=`${i}`.trim();return t.length>0?t:null},$e=i=>{let t=A(i);return t===null?null:d(t)},ht=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
668
+ `;var G=i=>{if(i==null)return null;let t=`${i}`.trim();return t.length>0?t:null},nt=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
636
669
  slot {
637
670
  display: contents;
638
671
  }
@@ -648,14 +681,14 @@ var rettangoli=(()=>{var T=`
648
681
  }
649
682
 
650
683
 
651
- ${X}
652
- ${Nt}
684
+ ${H}
685
+ ${Wt}
653
686
  ${g}
654
687
  ${m}
655
- ${Y}
656
- ${R}
688
+ ${q}
657
689
  ${T}
658
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styleElement=document.createElement("style"),this._slotElement=document.createElement("slot"),this._linkElement=null,this.shadow.appendChild(this._styleElement),this._updateDOM()}static get observedAttributes(){return["href","new-tab","rel",...y([...E,"op","wh","w","h","ar","bgi","bgs","bgp","bgr","sst","sna","sns","sbh","spi","stg","hide","show","sh","sv","z","d","ah","av","wrap","no-wrap","overflow"])]}_styles=f();_lastStyleString="";_updateDOM(){let t=this.getAttribute("href"),e=this.hasAttribute("new-tab"),s=this.getAttribute("rel");this._linkElement=M({shadowRoot:this.shadow,slotElement:this._slotElement,linkElement:this._linkElement,href:t,newTab:e,rel:s})}connectedCallback(){this.updateStyles()}updateStyles(){this._styles=f(),S.forEach(e=>{let s=kt=>`${e==="default"?"":`${e}-`}${kt}`,r=this.getAttribute(s("wh")),n=d(r===null?this.getAttribute(s("w")):r),o=d(r===null?this.getAttribute(s("h")):r),l=this.getAttribute(s("op")),a=this.getAttribute(s("z")),h=N(this.getAttribute(s("ar"))),p=A(this.getAttribute(s("bgi"))),_=A(this.getAttribute(s("bgs"))),x=A(this.getAttribute(s("bgp"))),C=A(this.getAttribute(s("bgr"))),z=A(this.getAttribute(s("sst"))),O=A(this.getAttribute(s("sna"))),$=A(this.getAttribute(s("sns"))),k=A(this.getAttribute(s("sbh"))),W=$e(this.getAttribute(s("spi"))),q=A(this.getAttribute(s("stg")));a!==null&&(this._styles[e]["z-index"]=a),l!==null&&(this._styles[e].opacity=l),h!==void 0&&(this._styles[e]["aspect-ratio"]=h),p!==null&&(this._styles[e]["background-image"]=p),_!==null&&(this._styles[e]["background-size"]=_),x!==null&&(this._styles[e]["background-position"]=x),C!==null&&(this._styles[e]["background-repeat"]=C),z!==null&&(this._styles[e]["scroll-snap-type"]=z),O!==null&&(this._styles[e]["scroll-snap-align"]=O),$!==null&&(this._styles[e]["scroll-snap-stop"]=$),k!==null&&(this._styles[e]["scroll-behavior"]=k),W!==null&&(this._styles[e]["scroll-padding-inline"]=W),q!==null&&(this._styles[e]["scroll-target-group"]=q),b({styleBucket:this._styles[e],axis:"width",dimension:n,fillValue:"var(--width-stretch)",allowFlexGrow:!0}),b({styleBucket:this._styles[e],axis:"height",dimension:o,fillValue:"100%",allowFlexGrow:!0}),this.hasAttribute(s("hide"))&&(this._styles[e].display="none"),this.hasAttribute(s("show"))&&(this._styles[e].display="flex");let J=this.getAttribute(s("d")),B=this.getAttribute(s("ah")),L=this.getAttribute(s("av")),Z=et({element:this,size:e,attr:"d"});J==="h"?this._styles[e]["flex-direction"]="row":J==="v"?this._styles[e]["flex-direction"]="column":e==="default"&&!J&&["sm","md","lg","xl"].some(ce=>this.hasAttribute(`${ce}-d`))&&(this._styles[e]["flex-direction"]="column");let oe=Z==="h",le=Z==="v"||!Z;oe&&(B==="c"?this._styles[e]["justify-content"]="center":B==="e"?this._styles[e]["justify-content"]="flex-end":B==="s"&&(this._styles[e]["justify-content"]="flex-start"),L==="c"?(this._styles[e]["align-items"]="center",this._styles[e]["align-content"]="center"):L==="e"?(this._styles[e]["align-items"]="flex-end",this._styles[e]["align-content"]="flex-end"):L==="s"&&(this._styles[e]["align-items"]="flex-start")),le&&(B!==null||L!==null)&&(B==="c"?this._styles[e]["align-items"]="center":B==="e"?this._styles[e]["align-items"]="flex-end":B==="s"&&(this._styles[e]["align-items"]="flex-start"),L==="c"?this._styles[e]["justify-content"]="center":L==="e"?this._styles[e]["justify-content"]="flex-end":L==="s"&&(this._styles[e]["justify-content"]="flex-start"));let ae=this.hasAttribute(s("wrap")),he=this.hasAttribute(s("no-wrap"));ae&&(this._styles[e]["flex-wrap"]="wrap"),he&&(this._styles[e]["flex-wrap"]="nowrap");let At=this.hasAttribute(s("sh")),Ct=this.hasAttribute(s("sv")),de=this.getAttribute(s("overflow"));At&&Ct?(this._styles[e].overflow="scroll",this._styles[e]["flex-wrap"]="nowrap"):At?(this._styles[e]["overflow-x"]="scroll",this._styles[e]["flex-wrap"]="nowrap"):Ct&&(this._styles[e]["overflow-y"]="scroll",this._styles[e]["flex-wrap"]="nowrap"),de==="hidden"&&(this._styles[e].overflow="hidden",this._styles[e]["flex-wrap"]="nowrap")});let t=w(this._styles);t!==this._lastStyleString&&(this._styleElement.textContent=t,this._lastStyleString=t)}attributeChangedCallback(t,e,s){if(t==="href"||t==="new-tab"||t==="rel"){this._updateDOM();return}e!==s&&this.updateStyles()}},Vt=({render:i,html:t})=>ht;var Be={ta:{s:"text-align: start;",c:"text-align: center;",e:"text-align: end;",j:"text-align: justify;"},s:{h1:`
690
+ ${B}
691
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styleElement=document.createElement("style"),this._slotElement=document.createElement("slot"),this._linkElement=null,this.shadow.appendChild(this._styleElement),this._updateDOM()}static get observedAttributes(){return["href","new-tab","rel",...y([...k,"op","wh","w","h","ar","bgi","bgs","bgp","bgr","hsb","hide","show","sh","sv","z","d","ah","av","wrap","no-wrap","overflow"])]}_styles=f();_lastStyleString="";_updateDOM(){let t=this.getAttribute("href"),e=this.hasAttribute("new-tab"),s=this.getAttribute("rel");this._linkElement=L({shadowRoot:this.shadow,slotElement:this._slotElement,linkElement:this._linkElement,href:t,newTab:e,rel:s})}connectedCallback(){this.updateStyles()}updateStyles(){this._styles=f(),S.forEach(e=>{let s=St=>`${e==="default"?"":`${e}-`}${St}`,r=this.getAttribute(s("wh")),n=c(r===null?this.getAttribute(s("w")):r),o=c(r===null?this.getAttribute(s("h")):r),l=this.getAttribute(s("op")),a=this.getAttribute(s("z")),h=W(this.getAttribute(s("ar"))),p=G(this.getAttribute(s("bgi"))),_=G(this.getAttribute(s("bgs"))),x=G(this.getAttribute(s("bgp"))),C=G(this.getAttribute(s("bgr")));a!==null&&(this._styles[e]["z-index"]=a),l!==null&&(this._styles[e].opacity=l),h!==void 0&&(this._styles[e]["aspect-ratio"]=h),p!==null&&(this._styles[e]["background-image"]=p),_!==null&&(this._styles[e]["background-size"]=_),x!==null&&(this._styles[e]["background-position"]=x),C!==null&&(this._styles[e]["background-repeat"]=C),b({styleBucket:this._styles[e],axis:"width",dimension:n,fillValue:"var(--width-stretch)",allowFlexGrow:!0}),b({styleBucket:this._styles[e],axis:"height",dimension:o,fillValue:"100%",allowFlexGrow:!0}),this.hasAttribute(s("hide"))&&(this._styles[e].display="none"),this.hasAttribute(s("show"))&&(this._styles[e].display="flex");let $=this.getAttribute(s("d")),A=this.getAttribute(s("ah")),E=this.getAttribute(s("av")),I=Q({element:this,size:e,attr:"d"});$==="h"?this._styles[e]["flex-direction"]="row":$==="v"?this._styles[e]["flex-direction"]="column":e==="default"&&!$&&["sm","md","lg","xl"].some(oe=>this.hasAttribute(`${oe}-d`))&&(this._styles[e]["flex-direction"]="column");let D=I==="h",X=I==="v"||!I;D&&(A==="c"?this._styles[e]["justify-content"]="center":A==="e"?this._styles[e]["justify-content"]="flex-end":A==="s"&&(this._styles[e]["justify-content"]="flex-start"),E==="c"?(this._styles[e]["align-items"]="center",this._styles[e]["align-content"]="center"):E==="e"?(this._styles[e]["align-items"]="flex-end",this._styles[e]["align-content"]="flex-end"):E==="s"&&(this._styles[e]["align-items"]="flex-start")),X&&(A!==null||E!==null)&&(A==="c"?this._styles[e]["align-items"]="center":A==="e"?this._styles[e]["align-items"]="flex-end":A==="s"&&(this._styles[e]["align-items"]="flex-start"),E==="c"?this._styles[e]["justify-content"]="center":E==="e"?this._styles[e]["justify-content"]="flex-end":E==="s"&&(this._styles[e]["justify-content"]="flex-start"));let ie=this.hasAttribute(s("wrap")),se=this.hasAttribute(s("no-wrap"));ie&&(this._styles[e]["flex-wrap"]="wrap"),se&&(this._styles[e]["flex-wrap"]="nowrap");let wt=this.hasAttribute(s("sh")),xt=this.hasAttribute(s("sv")),re=this.hasAttribute(s("hsb")),ne=this.getAttribute(s("overflow"));wt&&xt?(this._styles[e].overflow="auto",this._styles[e]["scrollbar-gutter"]="stable",this._styles[e]["flex-wrap"]="nowrap"):wt?(this._styles[e]["overflow-x"]="auto",this._styles[e]["scrollbar-gutter"]="stable",this._styles[e]["flex-wrap"]="nowrap"):xt&&(this._styles[e]["overflow-y"]="auto",this._styles[e]["scrollbar-gutter"]="stable",this._styles[e]["flex-wrap"]="nowrap"),ne==="hidden"&&(this._styles[e].overflow="hidden",this._styles[e]["flex-wrap"]="nowrap"),re&&(this._styles[e]["-ms-overflow-style"]="none",this._styles[e]["scrollbar-gutter"]="auto",this._styles[e]["scrollbar-width"]="none")});let t=w(this._styles);t!==this._lastStyleString&&(this._styleElement.textContent=t,this._lastStyleString=t)}attributeChangedCallback(t,e,s){if(t==="href"||t==="new-tab"||t==="rel"){this._updateDOM();return}e!==s&&this.updateStyles()}},Ft=({render:i,html:t})=>nt;var Ae={ta:{s:"text-align: start;",c:"text-align: center;",e:"text-align: end;",j:"text-align: justify;"},s:{h1:`
659
692
  font-size: var(--h1-font-size);
660
693
  font-weight: var(--h1-font-weight);
661
694
  line-height: var(--h1-line-height);
@@ -695,7 +728,7 @@ var rettangoli=(()=>{var T=`
695
728
  font-weight: var(--xs-font-weight);
696
729
  line-height: var(--xs-line-height);
697
730
  letter-spacing: var(--xs-letter-spacing);
698
- `}},Dt=v(Be);var Le={c:{pr:"color: var(--primary);",se:"color: var(--secondary);",de:"color: var(--destructive);",fg:"color: var(--foreground);",bg:"color: var(--background);",mu:"color: var(--muted-foreground);",ac:"color: var(--accent);",bo:"color: var(--border);",tr:"color: transparent;","pr-fg":"color: var(--primary-foreground);","se-fg":"color: var(--secondary-foreground);","de-fg":"color: var(--destructive-foreground);","mu-fg":"color: var(--muted-foreground);","ac-fg":"color: var(--accent-foreground);"}},Q=v(Le);var dt=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
731
+ `}},Rt=v(Ae);var ke={c:{pr:"color: var(--primary);",se:"color: var(--secondary);",de:"color: var(--destructive);",fg:"color: var(--foreground);",bg:"color: var(--background);",mu:"color: var(--muted-foreground);",ac:"color: var(--accent);",bo:"color: var(--border);",tr:"color: transparent;","pr-fg":"color: var(--primary-foreground);","se-fg":"color: var(--secondary-foreground);","de-fg":"color: var(--destructive-foreground);","mu-fg":"color: var(--muted-foreground);","ac-fg":"color: var(--accent-foreground);"}},K=v(ke);var ot=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
699
732
  :host {
700
733
  display: block;
701
734
  font-size: var(--md-font-size);
@@ -714,12 +747,12 @@ var rettangoli=(()=>{var T=`
714
747
  text-decoration: var(--anchor-text-decoration-hover);
715
748
  color: var(--anchor-color-hover);
716
749
  }
717
- ${T}
718
- ${Dt}
719
- ${Q}
750
+ ${B}
751
+ ${Rt}
752
+ ${K}
720
753
  ${g}
721
754
  ${m}
722
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._slotElement=document.createElement("slot"),this._linkElement=null,this._updateDOM()}static get observedAttributes(){return["key","w","ellipsis","href","new-tab","rel"]}connectedCallback(){this._updateStyling(),this._updateDOM()}attributeChangedCallback(t,e,s){t==="href"||t==="new-tab"||t==="rel"?this._updateDOM():this._updateStyling()}_updateStyling(){let t=d(this.getAttribute("w"));this.hasAttribute("ellipsis")?(this.style.overflow="hidden",this.style.textOverflow="ellipsis",this.style.whiteSpace="nowrap"):(this.style.overflow="",this.style.textOverflow="",this.style.whiteSpace=""),P({style:this.style,width:t,flexMinWidth:"0"})}_updateDOM(){let t=this.getAttribute("href"),e=this.hasAttribute("new-tab"),s=this.getAttribute("rel");this._linkElement=M({shadowRoot:this.shadow,slotElement:this._slotElement,linkElement:this._linkElement,href:t,newTab:e,rel:s})}},jt=({render:i,html:t})=>dt;var D={none:"0",xs:"--border-width-xs",sm:"--border-width-sm",md:"--border-width-md",lg:"--border-width-lg",xl:"--border-width-xl"},Te={bgc:{pr:"background-color: var(--primary);",se:"background-color: var(--secondary);",de:"background-color: var(--destructive);",fg:"background-color: var(--foreground);",bg:"background-color: var(--background);",mu:"background-color: var(--muted);",ac:"background-color: var(--accent);",bo:"background-color: var(--border);"},pos:{rel:"relative",abs:"absolute",fix:"fixed"},shadow:{sm:"--shadow-sm",md:"--shadow-md",lg:"--shadow-lg"},bw:D,bwt:D,bwr:D,bwb:D,bwl:D,bc:{pr:"--primary",se:"--secondary",de:"--destructive",fg:"--foreground",bg:"--background",mu:"--muted",ac:"--accent",bo:"--border",tr:"transparent"},br:{xs:"--border-radius-xs",sm:"--border-radius-sm",md:"--border-radius-md",lg:"--border-radius-lg",xl:"--border-radius-xl",f:"--border-radius-f"}},Ut=i=>v(Te,{},i);var Me={mt:u,mr:u,mb:u,ml:u,m:u,mh:u,mv:u},Ht=i=>v(Me,{},i);var ct=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
755
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._slotElement=document.createElement("slot"),this._linkElement=null,this._updateDOM()}static get observedAttributes(){return["key","w","ellipsis","href","new-tab","rel"]}connectedCallback(){this._updateStyling(),this._updateDOM()}attributeChangedCallback(t,e,s){t==="href"||t==="new-tab"||t==="rel"?this._updateDOM():this._updateStyling()}_updateStyling(){let t=c(this.getAttribute("w"));this.hasAttribute("ellipsis")?(this.style.overflow="hidden",this.style.textOverflow="ellipsis",this.style.whiteSpace="nowrap"):(this.style.overflow="",this.style.textOverflow="",this.style.whiteSpace=""),O({style:this.style,width:t,flexMinWidth:"0"})}_updateDOM(){let t=this.getAttribute("href"),e=this.hasAttribute("new-tab"),s=this.getAttribute("rel");this._linkElement=L({shadowRoot:this.shadow,slotElement:this._slotElement,linkElement:this._linkElement,href:t,newTab:e,rel:s})}},Pt=({render:i,html:t})=>ot;var R={none:"0",xs:"--border-width-xs",sm:"--border-width-sm",md:"--border-width-md",lg:"--border-width-lg",xl:"--border-width-xl"},Ce={bgc:{pr:"background-color: var(--primary);",se:"background-color: var(--secondary);",de:"background-color: var(--destructive);",fg:"background-color: var(--foreground);",bg:"background-color: var(--background);",mu:"background-color: var(--muted);",ac:"background-color: var(--accent);",bo:"background-color: var(--border);"},pos:{rel:"relative",abs:"absolute",fix:"fixed"},shadow:{sm:"--shadow-sm",md:"--shadow-md",lg:"--shadow-lg"},bw:R,bwt:R,bwr:R,bwb:R,bwl:R,bc:{pr:"--primary",se:"--secondary",de:"--destructive",fg:"--foreground",bg:"--background",mu:"--muted",ac:"--accent",bo:"--border",tr:"transparent"},br:{xs:"--border-radius-xs",sm:"--border-radius-sm",md:"--border-radius-md",lg:"--border-radius-lg",xl:"--border-radius-xl",f:"--border-radius-f"}},Nt=i=>v(Ce,{},i);var Ie={mt:u,mr:u,mb:u,ml:u,m:u,mh:u,mv:u},Vt=i=>v(Ie,{},i);var lt=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
723
756
  :host {
724
757
  display: contents;
725
758
  }
@@ -746,7 +779,7 @@ var rettangoli=(()=>{var T=`
746
779
  height: auto;
747
780
  }
748
781
 
749
- ${R}
782
+ ${T}
750
783
 
751
784
  a {
752
785
  display: block;
@@ -754,10 +787,10 @@ var rettangoli=(()=>{var T=`
754
787
  width: 100%;
755
788
  }
756
789
 
757
- ${Ut("img, a")}
758
- ${Ht("img, a")}
790
+ ${Nt("img, a")}
791
+ ${Vt("img, a")}
759
792
  ${m}
760
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styleElement=document.createElement("style"),this._imgElement=document.createElement("img"),this._linkElement=null,this.shadow.appendChild(this._styleElement),this._updateDOM()}static get observedAttributes(){return y([...E,"key","src","alt","href","new-tab","rel","wh","w","h","ar","hide","show","op","z","of"])}_styles=f();_lastStyleString="";_updateDOM(){let t=this.getAttribute("href"),e=this.hasAttribute("new-tab"),s=this.getAttribute("rel");this._linkElement=tt({shadowRoot:this.shadow,childElement:this._imgElement,linkElement:this._linkElement,href:t,newTab:e,rel:s})}connectedCallback(){this._updateImageAttributes(),this.updateStyles()}attributeChangedCallback(t,e,s){if(t==="href"||t==="new-tab"||t==="rel"){this._updateDOM();return}if(t==="src"||t==="alt"){this._updateImageAttributes();return}e!==s&&this.updateStyles()}updateStyles(){this._styles=f(),S.forEach(e=>{let s=p=>`${e==="default"?"":`${e}-`}${p}`,r=this.getAttribute(s("wh")),n=d(r===null?this.getAttribute(s("w")):r),o=d(r===null?this.getAttribute(s("h")):r),l=this.getAttribute(s("op")),a=this.getAttribute(s("z")),h=N(this.getAttribute(s("ar")));a!==null&&(this._styles[e]["z-index"]=a),l!==null&&(this._styles[e].opacity=l),h!==void 0&&(this._styles[e]["aspect-ratio"]=h),b({styleBucket:this._styles[e],axis:"width",dimension:n,fillValue:"var(--width-stretch)"}),b({styleBucket:this._styles[e],axis:"height",dimension:o,fillValue:"100%"}),this.hasAttribute(s("hide"))&&(this._styles[e].display="none !important"),this.hasAttribute(s("show"))&&(this._styles[e].display="block !important")});let t=w(this._styles,"img, a");t!==this._lastStyleString&&(this._styleElement.textContent=t,this._lastStyleString=t)}_updateImageAttributes(){let t=this.getAttribute("src"),e=this.getAttribute("alt");t!==null?this._imgElement.setAttribute("src",t):this._imgElement.removeAttribute("src"),e!==null?this._imgElement.setAttribute("alt",e):this._imgElement.removeAttribute("alt")}},qt=({render:i,html:t})=>ct;var Oe={s:{sm:`
793
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styleElement=document.createElement("style"),this._imgElement=document.createElement("img"),this._linkElement=null,this.shadow.appendChild(this._styleElement),this._updateDOM()}static get observedAttributes(){return y([...k,"key","src","alt","href","new-tab","rel","wh","w","h","ar","hide","show","op","z","of"])}_styles=f();_lastStyleString="";_updateDOM(){let t=this.getAttribute("href"),e=this.hasAttribute("new-tab"),s=this.getAttribute("rel");this._linkElement=Y({shadowRoot:this.shadow,childElement:this._imgElement,linkElement:this._linkElement,href:t,newTab:e,rel:s})}connectedCallback(){this._updateImageAttributes(),this.updateStyles()}attributeChangedCallback(t,e,s){if(t==="href"||t==="new-tab"||t==="rel"){this._updateDOM();return}if(t==="src"||t==="alt"){this._updateImageAttributes();return}e!==s&&this.updateStyles()}updateStyles(){this._styles=f(),S.forEach(e=>{let s=p=>`${e==="default"?"":`${e}-`}${p}`,r=this.getAttribute(s("wh")),n=c(r===null?this.getAttribute(s("w")):r),o=c(r===null?this.getAttribute(s("h")):r),l=this.getAttribute(s("op")),a=this.getAttribute(s("z")),h=W(this.getAttribute(s("ar")));a!==null&&(this._styles[e]["z-index"]=a),l!==null&&(this._styles[e].opacity=l),h!==void 0&&(this._styles[e]["aspect-ratio"]=h),b({styleBucket:this._styles[e],axis:"width",dimension:n,fillValue:"var(--width-stretch)"}),b({styleBucket:this._styles[e],axis:"height",dimension:o,fillValue:"100%"}),this.hasAttribute(s("hide"))&&(this._styles[e].display="none !important"),this.hasAttribute(s("show"))&&(this._styles[e].display="block !important")});let t=w(this._styles,"img, a");t!==this._lastStyleString&&(this._styleElement.textContent=t,this._lastStyleString=t)}_updateImageAttributes(){let t=this.getAttribute("src"),e=this.getAttribute("alt");t!==null?this._imgElement.setAttribute("src",t):this._imgElement.removeAttribute("src"),e!==null?this._imgElement.setAttribute("alt",e):this._imgElement.removeAttribute("alt")}},Dt=({render:i,html:t})=>lt;var $e={s:{sm:`
761
794
  height: 20px;
762
795
  padding-left: 8px;
763
796
  padding-right: 8px;
@@ -810,7 +843,7 @@ var rettangoli=(()=>{var T=`
810
843
  background-color: var(--destructive);
811
844
  color: var(--destructive-foreground);
812
845
  border-color: transparent;
813
- `}},Gt=v(Oe,{},".surface");var ut=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
846
+ `}},jt=v($e,{},".surface");var at=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
814
847
  :host {
815
848
  display: inline-flex;
816
849
  min-width: 0;
@@ -906,13 +939,13 @@ var rettangoli=(()=>{var T=`
906
939
  opacity: 1;
907
940
  }
908
941
 
909
- ${Gt}
942
+ ${jt}
910
943
  :host .surface {
911
944
  border-radius: var(--tag-border-radius) !important;
912
945
  }
913
946
  ${g}
914
947
  ${m}
915
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._surfaceElement=document.createElement("span"),this._surfaceElement.className="surface",this._surfaceElement.setAttribute("part","surface"),this._labelElement=document.createElement("span"),this._labelElement.className="label",this._labelElement.setAttribute("part","label"),this._slotElement=document.createElement("slot"),this._labelElement.appendChild(this._slotElement),this._surfaceElement.appendChild(this._labelElement),this.shadow.appendChild(this._surfaceElement),this._prefixIcon=null,this._suffixIcon=null,this._removeButton=null,this._onRemoveClick=this._onRemoveClick.bind(this)}static get observedAttributes(){return["key","pre","suf","removable","w"]}connectedCallback(){this._updateWidth(),this._updateStructure()}attributeChangedCallback(t,e,s){if(t==="w"){this._updateWidth();return}e!==s&&this._updateStructure()}_updateWidth(){let t=d(this.getAttribute("w"));P({style:this.style,width:t,flexMinWidth:"0"})}_createIconElement(t,e){let s=document.createElement("rtgl-svg");return s.className=t,s.setAttribute("part",e),s.setAttribute("aria-hidden","true"),s}_syncIcon({iconName:t,element:e,className:s,part:r,insertBeforeElement:n}){if(!t)return e&&e.remove(),null;let o=e||this._createIconElement(s,r);return o.setAttribute("svg",t),o.parentNode!==this._surfaceElement?this._surfaceElement.insertBefore(o,n):o.nextSibling!==n&&this._surfaceElement.insertBefore(o,n),o}_syncRemoveButton(){if(!this.hasAttribute("removable")){this._removeButton&&(this._removeButton.removeEventListener("click",this._onRemoveClick),this._removeButton.remove(),this._removeButton=null);return}this._removeButton||(this._removeButton=document.createElement("button"),this._removeButton.type="button",this._removeButton.className="removeButton",this._removeButton.setAttribute("part","remove-button"),this._removeButton.setAttribute("aria-label","Remove tag"),this._removeButton.addEventListener("click",this._onRemoveClick),this._surfaceElement.appendChild(this._removeButton))}_updateStructure(){this._prefixIcon=this._syncIcon({iconName:this.getAttribute("pre"),element:this._prefixIcon,className:"prefixIcon",part:"prefix-icon",insertBeforeElement:this._labelElement}),this._syncRemoveButton(),this._suffixIcon=this._syncIcon({iconName:this.getAttribute("suf"),element:this._suffixIcon,className:"suffixIcon",part:"suffix-icon",insertBeforeElement:this._removeButton})}_onRemoveClick(t){t.preventDefault(),t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-click",{detail:{value:this.getAttribute("value")},bubbles:!0,composed:!0}))}},Kt=({render:i,html:t})=>ut;var Xt=c`
948
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._surfaceElement=document.createElement("span"),this._surfaceElement.className="surface",this._surfaceElement.setAttribute("part","surface"),this._labelElement=document.createElement("span"),this._labelElement.className="label",this._labelElement.setAttribute("part","label"),this._slotElement=document.createElement("slot"),this._labelElement.appendChild(this._slotElement),this._surfaceElement.appendChild(this._labelElement),this.shadow.appendChild(this._surfaceElement),this._prefixIcon=null,this._suffixIcon=null,this._removeButton=null,this._onRemoveClick=this._onRemoveClick.bind(this)}static get observedAttributes(){return["key","pre","suf","removable","w"]}connectedCallback(){this._updateWidth(),this._updateStructure()}attributeChangedCallback(t,e,s){if(t==="w"){this._updateWidth();return}e!==s&&this._updateStructure()}_updateWidth(){let t=c(this.getAttribute("w"));O({style:this.style,width:t,flexMinWidth:"0"})}_createIconElement(t,e){let s=document.createElement("rtgl-svg");return s.className=t,s.setAttribute("part",e),s.setAttribute("aria-hidden","true"),s}_syncIcon({iconName:t,element:e,className:s,part:r,insertBeforeElement:n}){if(!t)return e&&e.remove(),null;let o=e||this._createIconElement(s,r);return o.setAttribute("svg",t),o.parentNode!==this._surfaceElement?this._surfaceElement.insertBefore(o,n):o.nextSibling!==n&&this._surfaceElement.insertBefore(o,n),o}_syncRemoveButton(){if(!this.hasAttribute("removable")){this._removeButton&&(this._removeButton.removeEventListener("click",this._onRemoveClick),this._removeButton.remove(),this._removeButton=null);return}this._removeButton||(this._removeButton=document.createElement("button"),this._removeButton.type="button",this._removeButton.className="removeButton",this._removeButton.setAttribute("part","remove-button"),this._removeButton.setAttribute("aria-label","Remove tag"),this._removeButton.addEventListener("click",this._onRemoveClick),this._surfaceElement.appendChild(this._removeButton))}_updateStructure(){this._prefixIcon=this._syncIcon({iconName:this.getAttribute("pre"),element:this._prefixIcon,className:"prefixIcon",part:"prefix-icon",insertBeforeElement:this._labelElement}),this._syncRemoveButton(),this._suffixIcon=this._syncIcon({iconName:this.getAttribute("suf"),element:this._suffixIcon,className:"suffixIcon",part:"suffix-icon",insertBeforeElement:this._removeButton})}_onRemoveClick(t){t.preventDefault(),t.stopPropagation(),this.dispatchEvent(new CustomEvent("remove-click",{detail:{value:this.getAttribute("value")},bubbles:!0,composed:!0}))}},Ut=({render:i,html:t})=>at;var Ht=d`
916
949
  :host([pt="xs"]) svg {
917
950
  padding-top: var(--spacing-xs);
918
951
  }
@@ -1028,16 +1061,16 @@ var rettangoli=(()=>{var T=`
1028
1061
  padding-top: var(--spacing-xl);
1029
1062
  padding-bottom: var(--spacing-xl);
1030
1063
  }
1031
- `;var pt=class i extends HTMLElement{static styleSheet=null;static _icons={};static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
1064
+ `;var ht=class i extends HTMLElement{static styleSheet=null;static _icons={};static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
1032
1065
  :host {
1033
1066
  color: var(--foreground);
1034
1067
  flex-shrink: 0;
1035
1068
  }
1036
- ${Q}
1037
- ${Xt}
1069
+ ${K}
1070
+ ${Ht}
1038
1071
  ${g}
1039
1072
  ${m}
1040
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet]}static get observedAttributes(){return["key","svg","w","h","wh"]}static get icons(){return i._icons}static addIcon(t,e){i._icons[t]=e}connectedCallback(){this._updateSizing(),this._render()}attributeChangedCallback(t,e,s){this._updateSizing(),this._render()}_updateSizing(){let t=this.getAttribute("wh"),e=d(t===null?this.getAttribute("w"):t),s=d(t===null?this.getAttribute("h"):t);e!=null?this.style.width=e:this.style.width="",s!=null?this.style.height=s:this.style.height=""}_render(){try{let t=this.getAttribute("svg"),e=i._icons[t]||(window.rtglIcons||{})[t];if(e){this.shadow.innerHTML=e;return}}catch(t){console.log("error in rtgl-svg render",t)}this.shadow.innerHTML=""}},Yt=({render:i,html:t})=>pt;var Re=["mt","mr","mb","ml","m","mh","mv","cur"],mt=class i extends HTMLElement{static styleSheet=null;static inputSpecificAttributes=["type","disabled","min","max","step","s"];static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
1073
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet]}static get observedAttributes(){return["key","svg","w","h","wh"]}static get icons(){return i._icons}static addIcon(t,e){i._icons[t]=e}connectedCallback(){this._updateSizing(),this._render()}attributeChangedCallback(t,e,s){this._updateSizing(),this._render()}_updateSizing(){let t=this.getAttribute("wh"),e=c(t===null?this.getAttribute("w"):t),s=c(t===null?this.getAttribute("h"):t);e!=null?this.style.width=e:this.style.width="",s!=null?this.style.height=s:this.style.height=""}_render(){try{let t=this.getAttribute("svg"),e=i._icons[t]||(window.rtglIcons||{})[t];if(e){this.shadow.innerHTML=e;return}}catch(t){console.log("error in rtgl-svg render",t)}this.shadow.innerHTML=""}},qt=({render:i,html:t})=>ht;var ze=["mt","mr","mb","ml","m","mh","mv","cur"],dt=class i extends HTMLElement{static styleSheet=null;static inputSpecificAttributes=["type","disabled","min","max","step","s"];static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
1041
1074
  :host {
1042
1075
  display: contents;
1043
1076
  }
@@ -1101,7 +1134,7 @@ var rettangoli=(()=>{var T=`
1101
1134
  }
1102
1135
  ${g}
1103
1136
  ${m}
1104
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styles=f(),this._lastStyleString="",this._inputElement=document.createElement("input"),this._styleElement=document.createElement("style"),this.shadow.appendChild(this._styleElement),this.shadow.appendChild(this._inputElement),this._inputElement.addEventListener("input",this._onInput),this._inputElement.addEventListener("change",this._onChange)}static get observedAttributes(){return["key","type","placeholder","disabled","value","min","max","step","s",...y([...Re,"wh","w","h","hide","show","op","z"])]}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}focus(){this._inputElement.focus()}_onInput=()=>{this.dispatchEvent(new CustomEvent("value-input",{detail:{value:this._inputElement.value},bubbles:!0}))};_onChange=()=>{this.dispatchEvent(new CustomEvent("value-change",{detail:{value:this._inputElement.value},bubbles:!0}))};attributeChangedCallback(t,e,s){if(e!==s){if(t==="key"){this._syncValueAttribute();return}if(t==="value"){this._syncValueAttribute();return}if(t==="placeholder"){this._syncPlaceholderAttribute();return}if(i.inputSpecificAttributes.includes(t)){this._updateInputAttributes();return}this.updateStyles()}}updateStyles(){this._styles=f(),S.forEach(e=>{let s=h=>`${e==="default"?"":`${e}-`}${h}`,r=this.getAttribute(s("wh")),n=d(r===null?this.getAttribute(s("w")):r),o=d(r===null?this.getAttribute(s("h")):r),l=this.getAttribute(s("op")),a=this.getAttribute(s("z"));a!==null&&(this._styles[e]["z-index"]=a),l!==null&&(this._styles[e].opacity=l),b({styleBucket:this._styles[e],axis:"width",dimension:n,fillValue:"var(--width-stretch)"}),b({styleBucket:this._styles[e],axis:"height",dimension:o,fillValue:"100%"}),this.hasAttribute(s("hide"))&&(this._styles[e].display="none"),this.hasAttribute(s("show"))&&(this._styles[e].display="block")});let t=w(this._styles,"input");t!==this._lastStyleString&&(this._styleElement.textContent=t,this._lastStyleString=t)}_setOrRemoveInputAttribute(t,e){if(e==null||e==="null"){this._inputElement.removeAttribute(t);return}this._inputElement.setAttribute(t,e)}_syncValueAttribute(){this._inputElement.value=this.getAttribute("value")??""}_syncPlaceholderAttribute(){this._setOrRemoveInputAttribute("placeholder",this.getAttribute("placeholder"))}_updateInputAttributes(){let t=this.getAttribute("type"),s=new Set(["text","password","date","time","datetime-local"]).has(t)?t:"text",r=this.getAttribute("min"),n=this.getAttribute("max"),o=this.getAttribute("step"),l=this.hasAttribute("disabled");this._setOrRemoveInputAttribute("type",s),this._setOrRemoveInputAttribute("min",r),this._setOrRemoveInputAttribute("max",n),this._setOrRemoveInputAttribute("step",o),l?this._inputElement.setAttribute("disabled",""):this._inputElement.removeAttribute("disabled")}connectedCallback(){this._updateInputAttributes(),this._syncValueAttribute(),this._syncPlaceholderAttribute(),this.updateStyles()}},I=({render:i,html:t})=>mt;var We=I({}),j="date",gt=class extends We{connectedCallback(){this.getAttribute("type")!==j&&super.setAttribute("type",j),super.connectedCallback&&super.connectedCallback()}attributeChangedCallback(t,e,s){if(t==="type"&&s!==j){this.getAttribute("type")!==j&&super.setAttribute("type",j);return}super.attributeChangedCallback&&super.attributeChangedCallback(t,e,s)}},Qt=({render:i,html:t})=>gt;var Fe=I({}),U="time",ft=class extends Fe{connectedCallback(){this.getAttribute("type")!==U&&super.setAttribute("type",U),super.connectedCallback&&super.connectedCallback()}attributeChangedCallback(t,e,s){if(t==="type"&&s!==U){this.getAttribute("type")!==U&&super.setAttribute("type",U);return}super.attributeChangedCallback&&super.attributeChangedCallback(t,e,s)}},Jt=({render:i,html:t})=>ft;var Pe=I({}),H="datetime-local",bt=class extends Pe{connectedCallback(){this.getAttribute("type")!==H&&super.setAttribute("type",H),super.connectedCallback&&super.connectedCallback()}attributeChangedCallback(t,e,s){if(t==="type"&&s!==H){this.getAttribute("type")!==H&&super.setAttribute("type",H);return}super.attributeChangedCallback&&super.attributeChangedCallback(t,e,s)}},Zt=({render:i,html:t})=>bt;var Ne=["mt","mr","mb","ml","m","mh","mv","cur"],vt=class i extends HTMLElement{static styleSheet=null;static inputSpecificAttributes=["disabled","step","min","max","s"];static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
1137
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styles=f(),this._lastStyleString="",this._inputElement=document.createElement("input"),this._styleElement=document.createElement("style"),this.shadow.appendChild(this._styleElement),this.shadow.appendChild(this._inputElement),this._inputElement.addEventListener("input",this._onInput),this._inputElement.addEventListener("change",this._onChange)}static get observedAttributes(){return["key","type","placeholder","disabled","value","min","max","step","s",...y([...ze,"wh","w","h","hide","show","op","z"])]}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}focus(){this._inputElement.focus()}_onInput=()=>{this.dispatchEvent(new CustomEvent("value-input",{detail:{value:this._inputElement.value},bubbles:!0}))};_onChange=()=>{this.dispatchEvent(new CustomEvent("value-change",{detail:{value:this._inputElement.value},bubbles:!0}))};attributeChangedCallback(t,e,s){if(e!==s){if(t==="key"){this._syncValueAttribute();return}if(t==="value"){this._syncValueAttribute();return}if(t==="placeholder"){this._syncPlaceholderAttribute();return}if(i.inputSpecificAttributes.includes(t)){this._updateInputAttributes();return}this.updateStyles()}}updateStyles(){this._styles=f(),S.forEach(e=>{let s=h=>`${e==="default"?"":`${e}-`}${h}`,r=this.getAttribute(s("wh")),n=c(r===null?this.getAttribute(s("w")):r),o=c(r===null?this.getAttribute(s("h")):r),l=this.getAttribute(s("op")),a=this.getAttribute(s("z"));a!==null&&(this._styles[e]["z-index"]=a),l!==null&&(this._styles[e].opacity=l),b({styleBucket:this._styles[e],axis:"width",dimension:n,fillValue:"var(--width-stretch)"}),b({styleBucket:this._styles[e],axis:"height",dimension:o,fillValue:"100%"}),this.hasAttribute(s("hide"))&&(this._styles[e].display="none"),this.hasAttribute(s("show"))&&(this._styles[e].display="block")});let t=w(this._styles,"input");t!==this._lastStyleString&&(this._styleElement.textContent=t,this._lastStyleString=t)}_setOrRemoveInputAttribute(t,e){if(e==null||e==="null"){this._inputElement.removeAttribute(t);return}this._inputElement.setAttribute(t,e)}_syncValueAttribute(){this._inputElement.value=this.getAttribute("value")??""}_syncPlaceholderAttribute(){this._setOrRemoveInputAttribute("placeholder",this.getAttribute("placeholder"))}_updateInputAttributes(){let t=this.getAttribute("type"),s=new Set(["text","password","date","time","datetime-local"]).has(t)?t:"text",r=this.getAttribute("min"),n=this.getAttribute("max"),o=this.getAttribute("step"),l=this.hasAttribute("disabled");this._setOrRemoveInputAttribute("type",s),this._setOrRemoveInputAttribute("min",r),this._setOrRemoveInputAttribute("max",n),this._setOrRemoveInputAttribute("step",o),l?this._inputElement.setAttribute("disabled",""):this._inputElement.removeAttribute("disabled")}connectedCallback(){this._updateInputAttributes(),this._syncValueAttribute(),this._syncPlaceholderAttribute(),this.updateStyles()}},z=({render:i,html:t})=>dt;var Be=z({}),P="date",ct=class extends Be{connectedCallback(){this.getAttribute("type")!==P&&super.setAttribute("type",P),super.connectedCallback&&super.connectedCallback()}attributeChangedCallback(t,e,s){if(t==="type"&&s!==P){this.getAttribute("type")!==P&&super.setAttribute("type",P);return}super.attributeChangedCallback&&super.attributeChangedCallback(t,e,s)}},Gt=({render:i,html:t})=>ct;var Le=z({}),N="time",ut=class extends Le{connectedCallback(){this.getAttribute("type")!==N&&super.setAttribute("type",N),super.connectedCallback&&super.connectedCallback()}attributeChangedCallback(t,e,s){if(t==="type"&&s!==N){this.getAttribute("type")!==N&&super.setAttribute("type",N);return}super.attributeChangedCallback&&super.attributeChangedCallback(t,e,s)}},Kt=({render:i,html:t})=>ut;var Te=z({}),V="datetime-local",pt=class extends Te{connectedCallback(){this.getAttribute("type")!==V&&super.setAttribute("type",V),super.connectedCallback&&super.connectedCallback()}attributeChangedCallback(t,e,s){if(t==="type"&&s!==V){this.getAttribute("type")!==V&&super.setAttribute("type",V);return}super.attributeChangedCallback&&super.attributeChangedCallback(t,e,s)}},Xt=({render:i,html:t})=>pt;var Me=["mt","mr","mb","ml","m","mh","mv","cur"],mt=class i extends HTMLElement{static styleSheet=null;static inputSpecificAttributes=["disabled","step","min","max","s"];static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
1105
1138
  :host {
1106
1139
  display: contents;
1107
1140
  }
@@ -1136,7 +1169,7 @@ var rettangoli=(()=>{var T=`
1136
1169
  }
1137
1170
  ${g}
1138
1171
  ${m}
1139
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styles=f(),this._lastStyleString="",this._inputElement=document.createElement("input"),this._styleElement=document.createElement("style"),this.shadow.appendChild(this._styleElement),this.shadow.appendChild(this._inputElement),this._inputElement.addEventListener("input",this._onInput),this._inputElement.addEventListener("change",this._onChange)}static get observedAttributes(){return["key","placeholder","disabled","value","step","min","max","s",...y([...Ne,"wh","w","h","hide","show","op","z"])]}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}focus(){this._inputElement.focus()}_emitValueEvent=t=>{let e=this._inputElement.value;if(e.trim()===""){this.dispatchEvent(new CustomEvent(t,{detail:{value:null},bubbles:!0}));return}let s=parseFloat(e);isNaN(s)||(s=this._clampValueToBounds(s),this._inputElement.value=s.toString(),this.dispatchEvent(new CustomEvent(t,{detail:{value:s},bubbles:!0})))};_onInput=()=>{this._emitValueEvent("value-input")};_onChange=()=>{this._emitValueEvent("value-change")};attributeChangedCallback(t,e,s){if(e!==s){if(t==="key"){this._syncValueAttribute();return}if(t==="value"){this._syncValueAttribute();return}if(t==="placeholder"){this._syncPlaceholderAttribute();return}if(i.inputSpecificAttributes.includes(t)){this._updateInputAttributes(),(t==="min"||t==="max")&&this._syncValueAttribute();return}this.updateStyles()}}updateStyles(){this._styles=f(),S.forEach(e=>{let s=h=>`${e==="default"?"":`${e}-`}${h}`,r=this.getAttribute(s("wh")),n=d(r===null?this.getAttribute(s("w")):r),o=d(r===null?this.getAttribute(s("h")):r),l=this.getAttribute(s("op")),a=this.getAttribute(s("z"));a!==null&&(this._styles[e]["z-index"]=a),l!==null&&(this._styles[e].opacity=l),b({styleBucket:this._styles[e],axis:"width",dimension:n,fillValue:"var(--width-stretch)"}),b({styleBucket:this._styles[e],axis:"height",dimension:o,fillValue:"100%"}),this.hasAttribute(s("hide"))&&(this._styles[e].display="none"),this.hasAttribute(s("show"))&&(this._styles[e].display="block")});let t=w(this._styles,"input");t!==this._lastStyleString&&(this._styleElement.textContent=t,this._lastStyleString=t)}_setOrRemoveInputAttribute(t,e){if(e==null||e==="null"){this._inputElement.removeAttribute(t);return}this._inputElement.setAttribute(t,e)}_clampValueToBounds(t){let e=t,s=this.getAttribute("min");if(s!==null){let n=parseFloat(s);isNaN(n)||(e=Math.max(e,n))}let r=this.getAttribute("max");if(r!==null){let n=parseFloat(r);isNaN(n)||(e=Math.min(e,n))}return e}_syncValueAttribute(){let t=this.getAttribute("value");if(t==null||t===""){this._inputElement.value="";return}let e=parseFloat(t);if(isNaN(e)){this._inputElement.value="";return}let s=this._clampValueToBounds(e);this._inputElement.value=s.toString()}_syncPlaceholderAttribute(){this._setOrRemoveInputAttribute("placeholder",this.getAttribute("placeholder"))}_updateInputAttributes(){let t=this.getAttribute("step"),e=this.getAttribute("min"),s=this.getAttribute("max"),r=this.hasAttribute("disabled");this._inputElement.setAttribute("type","number"),this._setOrRemoveInputAttribute("step",t),this._setOrRemoveInputAttribute("min",e),this._setOrRemoveInputAttribute("max",s),r?this._inputElement.setAttribute("disabled",""):this._inputElement.removeAttribute("disabled")}connectedCallback(){this._updateInputAttributes(),this._syncValueAttribute(),this._syncPlaceholderAttribute(),this.updateStyles()}},te=({render:i,html:t})=>vt;var _t=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
1172
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styles=f(),this._lastStyleString="",this._inputElement=document.createElement("input"),this._styleElement=document.createElement("style"),this.shadow.appendChild(this._styleElement),this.shadow.appendChild(this._inputElement),this._inputElement.addEventListener("input",this._onInput),this._inputElement.addEventListener("change",this._onChange)}static get observedAttributes(){return["key","placeholder","disabled","value","step","min","max","s",...y([...Me,"wh","w","h","hide","show","op","z"])]}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}focus(){this._inputElement.focus()}_emitValueEvent=t=>{let e=this._inputElement.value;if(e.trim()===""){this.dispatchEvent(new CustomEvent(t,{detail:{value:null},bubbles:!0}));return}let s=parseFloat(e);isNaN(s)||(s=this._clampValueToBounds(s),this._inputElement.value=s.toString(),this.dispatchEvent(new CustomEvent(t,{detail:{value:s},bubbles:!0})))};_onInput=()=>{this._emitValueEvent("value-input")};_onChange=()=>{this._emitValueEvent("value-change")};attributeChangedCallback(t,e,s){if(e!==s){if(t==="key"){this._syncValueAttribute();return}if(t==="value"){this._syncValueAttribute();return}if(t==="placeholder"){this._syncPlaceholderAttribute();return}if(i.inputSpecificAttributes.includes(t)){this._updateInputAttributes(),(t==="min"||t==="max")&&this._syncValueAttribute();return}this.updateStyles()}}updateStyles(){this._styles=f(),S.forEach(e=>{let s=h=>`${e==="default"?"":`${e}-`}${h}`,r=this.getAttribute(s("wh")),n=c(r===null?this.getAttribute(s("w")):r),o=c(r===null?this.getAttribute(s("h")):r),l=this.getAttribute(s("op")),a=this.getAttribute(s("z"));a!==null&&(this._styles[e]["z-index"]=a),l!==null&&(this._styles[e].opacity=l),b({styleBucket:this._styles[e],axis:"width",dimension:n,fillValue:"var(--width-stretch)"}),b({styleBucket:this._styles[e],axis:"height",dimension:o,fillValue:"100%"}),this.hasAttribute(s("hide"))&&(this._styles[e].display="none"),this.hasAttribute(s("show"))&&(this._styles[e].display="block")});let t=w(this._styles,"input");t!==this._lastStyleString&&(this._styleElement.textContent=t,this._lastStyleString=t)}_setOrRemoveInputAttribute(t,e){if(e==null||e==="null"){this._inputElement.removeAttribute(t);return}this._inputElement.setAttribute(t,e)}_clampValueToBounds(t){let e=t,s=this.getAttribute("min");if(s!==null){let n=parseFloat(s);isNaN(n)||(e=Math.max(e,n))}let r=this.getAttribute("max");if(r!==null){let n=parseFloat(r);isNaN(n)||(e=Math.min(e,n))}return e}_syncValueAttribute(){let t=this.getAttribute("value");if(t==null||t===""){this._inputElement.value="";return}let e=parseFloat(t);if(isNaN(e)){this._inputElement.value="";return}let s=this._clampValueToBounds(e);this._inputElement.value=s.toString()}_syncPlaceholderAttribute(){this._setOrRemoveInputAttribute("placeholder",this.getAttribute("placeholder"))}_updateInputAttributes(){let t=this.getAttribute("step"),e=this.getAttribute("min"),s=this.getAttribute("max"),r=this.hasAttribute("disabled");this._inputElement.setAttribute("type","number"),this._setOrRemoveInputAttribute("step",t),this._setOrRemoveInputAttribute("min",e),this._setOrRemoveInputAttribute("max",s),r?this._inputElement.setAttribute("disabled",""):this._inputElement.removeAttribute("disabled")}connectedCallback(){this._updateInputAttributes(),this._syncValueAttribute(),this._syncPlaceholderAttribute(),this.updateStyles()}},Yt=({render:i,html:t})=>mt;var gt=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
1140
1173
  :host {
1141
1174
  display: contents;
1142
1175
  }
@@ -1164,7 +1197,7 @@ var rettangoli=(()=>{var T=`
1164
1197
  }
1165
1198
  ${g}
1166
1199
  ${m}
1167
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styles={default:{},sm:{},md:{},lg:{},xl:{}},this._lastStyleString="",this._textareaElement=document.createElement("textarea"),this._styleElement=document.createElement("style"),this.shadow.appendChild(this._styleElement),this.shadow.appendChild(this._textareaElement),this._textareaElement.addEventListener("input",this._onInput),this._textareaElement.addEventListener("change",this._onChange)}_onInput=()=>{this.dispatchEvent(new CustomEvent("value-input",{detail:{value:this._textareaElement.value},bubbles:!0}))};_onChange=()=>{this.dispatchEvent(new CustomEvent("value-change",{detail:{value:this._textareaElement.value},bubbles:!0}))};static get observedAttributes(){return["key","placeholder","disabled","value","cols","rows",...y([...E,"wh","w","h","hide","show","op","z"])]}get value(){return this._textareaElement.value}set value(t){this._textareaElement.value=t}connectedCallback(){this._updateTextareaAttributes()}focus(){this._textareaElement&&this._textareaElement.focus()}select(){this._textareaElement&&this._textareaElement.select()}attributeChangedCallback(t,e,s){if(t==="key"){requestAnimationFrame(()=>{let n=this.getAttribute("value");this._textareaElement.value=n??""});return}if(t==="value"&&requestAnimationFrame(()=>{let n=this.getAttribute("value");this._textareaElement.value=n??""}),t==="placeholder"&&requestAnimationFrame(()=>{let n=this.getAttribute("placeholder");n===void 0||n==="null"?this._textareaElement.removeAttribute("placeholder"):this._textareaElement.setAttribute("placeholder",n??"")}),["cols","rows","disabled"].includes(t)){this._updateTextareaAttributes();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(n=>{let o=x=>`${n==="default"?"":`${n}-`}${x}`,l=this.getAttribute(o("wh")),a=d(l===null?this.getAttribute(o("w")):l),h=d(l===null?this.getAttribute(o("h")):l),p=this.getAttribute(o("op")),_=this.getAttribute(o("z"));_!==null&&(this._styles[n]["z-index"]=_),p!==null&&(this._styles[n].opacity=p),a==="f"?this._styles[n].width="var(--width-stretch)":a!==void 0&&(this._styles[n].width=a,this._styles[n]["min-width"]=a,this._styles[n]["max-width"]=a),h==="f"?this._styles[n].height="100%":h!==void 0&&(this._styles[n].height=h,this._styles[n]["min-height"]=h,this._styles[n]["max-height"]=h),this.hasAttribute(o("hide"))&&(this._styles[n].display="none"),this.hasAttribute(o("show"))&&(this._styles[n].display="block")});let r=w(this._styles,"textarea");r!==this._lastStyleString&&(this._styleElement.textContent=r,this._lastStyleString=r)}_updateTextareaAttributes(){let t=this.getAttribute("cols"),e=this.getAttribute("rows"),s=this.hasAttribute("disabled");t!==null?this._textareaElement.setAttribute("cols",t):this._textareaElement.removeAttribute("cols"),e!==null?this._textareaElement.setAttribute("rows",e):this._textareaElement.removeAttribute("rows"),s?this._textareaElement.setAttribute("disabled",""):this._textareaElement.removeAttribute("disabled")}},ee=({render:i,html:t})=>_t;var Ve=["mt","mr","mb","ml","m","mh","mv","cur"],De=/^#[0-9a-fA-F]{6}$/,yt=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
1200
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styles={default:{},sm:{},md:{},lg:{},xl:{}},this._lastStyleString="",this._textareaElement=document.createElement("textarea"),this._styleElement=document.createElement("style"),this.shadow.appendChild(this._styleElement),this.shadow.appendChild(this._textareaElement),this._textareaElement.addEventListener("input",this._onInput),this._textareaElement.addEventListener("change",this._onChange)}_onInput=()=>{this.dispatchEvent(new CustomEvent("value-input",{detail:{value:this._textareaElement.value},bubbles:!0}))};_onChange=()=>{this.dispatchEvent(new CustomEvent("value-change",{detail:{value:this._textareaElement.value},bubbles:!0}))};static get observedAttributes(){return["key","placeholder","disabled","value","cols","rows",...y([...k,"wh","w","h","hide","show","op","z"])]}get value(){return this._textareaElement.value}set value(t){this._textareaElement.value=t}connectedCallback(){this._updateTextareaAttributes()}focus(){this._textareaElement&&this._textareaElement.focus()}select(){this._textareaElement&&this._textareaElement.select()}attributeChangedCallback(t,e,s){if(t==="key"){requestAnimationFrame(()=>{let n=this.getAttribute("value");this._textareaElement.value=n??""});return}if(t==="value"&&requestAnimationFrame(()=>{let n=this.getAttribute("value");this._textareaElement.value=n??""}),t==="placeholder"&&requestAnimationFrame(()=>{let n=this.getAttribute("placeholder");n===void 0||n==="null"?this._textareaElement.removeAttribute("placeholder"):this._textareaElement.setAttribute("placeholder",n??"")}),["cols","rows","disabled"].includes(t)){this._updateTextareaAttributes();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(n=>{let o=x=>`${n==="default"?"":`${n}-`}${x}`,l=this.getAttribute(o("wh")),a=c(l===null?this.getAttribute(o("w")):l),h=c(l===null?this.getAttribute(o("h")):l),p=this.getAttribute(o("op")),_=this.getAttribute(o("z"));_!==null&&(this._styles[n]["z-index"]=_),p!==null&&(this._styles[n].opacity=p),a==="f"?this._styles[n].width="var(--width-stretch)":a!==void 0&&(this._styles[n].width=a,this._styles[n]["min-width"]=a,this._styles[n]["max-width"]=a),h==="f"?this._styles[n].height="100%":h!==void 0&&(this._styles[n].height=h,this._styles[n]["min-height"]=h,this._styles[n]["max-height"]=h),this.hasAttribute(o("hide"))&&(this._styles[n].display="none"),this.hasAttribute(o("show"))&&(this._styles[n].display="block")});let r=w(this._styles,"textarea");r!==this._lastStyleString&&(this._styleElement.textContent=r,this._lastStyleString=r)}_updateTextareaAttributes(){let t=this.getAttribute("cols"),e=this.getAttribute("rows"),s=this.hasAttribute("disabled");t!==null?this._textareaElement.setAttribute("cols",t):this._textareaElement.removeAttribute("cols"),e!==null?this._textareaElement.setAttribute("rows",e):this._textareaElement.removeAttribute("rows"),s?this._textareaElement.setAttribute("disabled",""):this._textareaElement.removeAttribute("disabled")}},Qt=({render:i,html:t})=>gt;var Oe=["mt","mr","mb","ml","m","mh","mv","cur"],We=/^#[0-9a-fA-F]{6}$/,ft=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
1168
1201
  :host {
1169
1202
  display: contents;
1170
1203
  }
@@ -1187,7 +1220,7 @@ var rettangoli=(()=>{var T=`
1187
1220
  }
1188
1221
  ${g}
1189
1222
  ${m}
1190
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styles=f(),this._lastStyleString="",this._inputElement=document.createElement("input"),this._inputElement.type="color",this._styleElement=document.createElement("style"),this.shadow.appendChild(this._styleElement),this.shadow.appendChild(this._inputElement),this._inputElement.addEventListener("change",this._onChange),this._inputElement.addEventListener("input",this._onInput)}static get observedAttributes(){return["key","value","disabled",...y([...Ve,"wh","w","h","hide","show","op","z"])]}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}_onChange=()=>{this.dispatchEvent(new CustomEvent("value-change",{detail:{value:this._inputElement.value},bubbles:!0}))};_onInput=()=>{this.dispatchEvent(new CustomEvent("value-input",{detail:{value:this._inputElement.value},bubbles:!0}))};attributeChangedCallback(t,e,s){if(e!==s){if(t==="key"){this._syncValueAttribute();return}if(["value","disabled"].includes(t)){this._updateInputAttributes();return}this.updateStyles()}}updateStyles(){this._styles=f(),S.forEach(e=>{let s=h=>`${e==="default"?"":`${e}-`}${h}`,r=this.getAttribute(s("wh")),n=d(r===null?this.getAttribute(s("w")):r),o=d(r===null?this.getAttribute(s("h")):r),l=this.getAttribute(s("op")),a=this.getAttribute(s("z"));a!==null&&(this._styles[e]["z-index"]=a),l!==null&&(this._styles[e].opacity=l),b({styleBucket:this._styles[e],axis:"width",dimension:n,fillValue:"var(--width-stretch)"}),b({styleBucket:this._styles[e],axis:"height",dimension:o,fillValue:"100%"}),this.hasAttribute(s("hide"))&&(this._styles[e].display="none"),this.hasAttribute(s("show"))&&(this._styles[e].display="block")});let t=w(this._styles,'input[type="color"]');t!==this._lastStyleString&&(this._styleElement.textContent=t,this._lastStyleString=t)}_syncValueAttribute(){let t=this.getAttribute("value");if(t===null){this._inputElement.value="#000000";return}this._inputElement.value=De.test(t)?t:"#000000"}_updateInputAttributes(){let t=this.hasAttribute("disabled");this._syncValueAttribute(),t?this._inputElement.setAttribute("disabled",""):this._inputElement.removeAttribute("disabled")}connectedCallback(){this._updateInputAttributes(),this.updateStyles()}},ie=({render:i,html:t})=>yt;var wt=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
1223
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styles=f(),this._lastStyleString="",this._inputElement=document.createElement("input"),this._inputElement.type="color",this._styleElement=document.createElement("style"),this.shadow.appendChild(this._styleElement),this.shadow.appendChild(this._inputElement),this._inputElement.addEventListener("change",this._onChange),this._inputElement.addEventListener("input",this._onInput)}static get observedAttributes(){return["key","value","disabled",...y([...Oe,"wh","w","h","hide","show","op","z"])]}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}_onChange=()=>{this.dispatchEvent(new CustomEvent("value-change",{detail:{value:this._inputElement.value},bubbles:!0}))};_onInput=()=>{this.dispatchEvent(new CustomEvent("value-input",{detail:{value:this._inputElement.value},bubbles:!0}))};attributeChangedCallback(t,e,s){if(e!==s){if(t==="key"){this._syncValueAttribute();return}if(["value","disabled"].includes(t)){this._updateInputAttributes();return}this.updateStyles()}}updateStyles(){this._styles=f(),S.forEach(e=>{let s=h=>`${e==="default"?"":`${e}-`}${h}`,r=this.getAttribute(s("wh")),n=c(r===null?this.getAttribute(s("w")):r),o=c(r===null?this.getAttribute(s("h")):r),l=this.getAttribute(s("op")),a=this.getAttribute(s("z"));a!==null&&(this._styles[e]["z-index"]=a),l!==null&&(this._styles[e].opacity=l),b({styleBucket:this._styles[e],axis:"width",dimension:n,fillValue:"var(--width-stretch)"}),b({styleBucket:this._styles[e],axis:"height",dimension:o,fillValue:"100%"}),this.hasAttribute(s("hide"))&&(this._styles[e].display="none"),this.hasAttribute(s("show"))&&(this._styles[e].display="block")});let t=w(this._styles,'input[type="color"]');t!==this._lastStyleString&&(this._styleElement.textContent=t,this._lastStyleString=t)}_syncValueAttribute(){let t=this.getAttribute("value");if(t===null){this._inputElement.value="#000000";return}this._inputElement.value=We.test(t)?t:"#000000"}_updateInputAttributes(){let t=this.hasAttribute("disabled");this._syncValueAttribute(),t?this._inputElement.setAttribute("disabled",""):this._inputElement.removeAttribute("disabled")}connectedCallback(){this._updateInputAttributes(),this.updateStyles()}},Jt=({render:i,html:t})=>ft;var bt=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
1191
1224
  :host {
1192
1225
  display: contents;
1193
1226
  }
@@ -1241,7 +1274,7 @@ var rettangoli=(()=>{var T=`
1241
1274
  }
1242
1275
  ${g}
1243
1276
  ${m}
1244
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styles={default:{},sm:{},md:{},lg:{},xl:{}},this._lastStyleString="",this._inputElement=document.createElement("input"),this._inputElement.type="range",this._styleElement=document.createElement("style"),this.shadow.appendChild(this._styleElement),this.shadow.appendChild(this._inputElement),this._inputElement.addEventListener("input",this._onInput),this._inputElement.addEventListener("change",this._onChange)}static get observedAttributes(){return["key","value","min","max","step","disabled",...y([...E,"wh","w","h","hide","show","op","z"])]}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}_onInput=()=>{this.dispatchEvent(new CustomEvent("value-input",{detail:{value:Number(this._inputElement.value)},bubbles:!0}))};_onChange=()=>{this.dispatchEvent(new CustomEvent("value-change",{detail:{value:Number(this._inputElement.value)},bubbles:!0}))};attributeChangedCallback(t,e,s){if(t==="key"&&e!==s){requestAnimationFrame(()=>{let n=this.getAttribute("value"),o=this.getAttribute("min")||"0";this._inputElement.value=n??o});return}if(["value","min","max","step","disabled"].includes(t)){this._updateInputAttributes();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(n=>{let o=x=>`${n==="default"?"":`${n}-`}${x}`,l=this.getAttribute(o("wh")),a=d(l===null?this.getAttribute(o("w")):l),h=d(l===null?this.getAttribute(o("h")):l),p=this.getAttribute(o("op")),_=this.getAttribute(o("z"));_!==null&&(this._styles[n]["z-index"]=_),p!==null&&(this._styles[n].opacity=p),a==="f"?this._styles[n].width="var(--width-stretch)":a!==void 0&&(this._styles[n].width=a,this._styles[n]["min-width"]=a,this._styles[n]["max-width"]=a),h==="f"?this._styles[n].height="100%":h!==void 0&&(this._styles[n].height=h,this._styles[n]["min-height"]=h,this._styles[n]["max-height"]=h),this.hasAttribute(o("hide"))&&(this._styles[n].display="none"),this.hasAttribute(o("show"))&&(this._styles[n].display="block")});let r=w(this._styles,'input[type="range"]');r!==this._lastStyleString&&(this._styleElement.textContent=r,this._lastStyleString=r)}_updateInputAttributes(){let t=this.getAttribute("value"),e=this.getAttribute("min"),s=this.getAttribute("max"),r=this.getAttribute("step"),n=this.hasAttribute("disabled");t!==null?this._inputElement.value=t:this._inputElement.value=e??0,e!==null?this._inputElement.min=e:this._inputElement.min="0",s!==null?this._inputElement.max=s:this._inputElement.max="100",r!==null?this._inputElement.step=r:this._inputElement.step="1",n?this._inputElement.setAttribute("disabled",""):this._inputElement.removeAttribute("disabled")}connectedCallback(){this._updateInputAttributes()}},se=({render:i,html:t})=>wt;var xt=40,je=6,St=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
1277
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._styles={default:{},sm:{},md:{},lg:{},xl:{}},this._lastStyleString="",this._inputElement=document.createElement("input"),this._inputElement.type="range",this._styleElement=document.createElement("style"),this.shadow.appendChild(this._styleElement),this.shadow.appendChild(this._inputElement),this._inputElement.addEventListener("input",this._onInput),this._inputElement.addEventListener("change",this._onChange)}static get observedAttributes(){return["key","value","min","max","step","disabled",...y([...k,"wh","w","h","hide","show","op","z"])]}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}_onInput=()=>{this.dispatchEvent(new CustomEvent("value-input",{detail:{value:Number(this._inputElement.value)},bubbles:!0}))};_onChange=()=>{this.dispatchEvent(new CustomEvent("value-change",{detail:{value:Number(this._inputElement.value)},bubbles:!0}))};attributeChangedCallback(t,e,s){if(t==="key"&&e!==s){requestAnimationFrame(()=>{let n=this.getAttribute("value"),o=this.getAttribute("min")||"0";this._inputElement.value=n??o});return}if(["value","min","max","step","disabled"].includes(t)){this._updateInputAttributes();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(n=>{let o=x=>`${n==="default"?"":`${n}-`}${x}`,l=this.getAttribute(o("wh")),a=c(l===null?this.getAttribute(o("w")):l),h=c(l===null?this.getAttribute(o("h")):l),p=this.getAttribute(o("op")),_=this.getAttribute(o("z"));_!==null&&(this._styles[n]["z-index"]=_),p!==null&&(this._styles[n].opacity=p),a==="f"?this._styles[n].width="var(--width-stretch)":a!==void 0&&(this._styles[n].width=a,this._styles[n]["min-width"]=a,this._styles[n]["max-width"]=a),h==="f"?this._styles[n].height="100%":h!==void 0&&(this._styles[n].height=h,this._styles[n]["min-height"]=h,this._styles[n]["max-height"]=h),this.hasAttribute(o("hide"))&&(this._styles[n].display="none"),this.hasAttribute(o("show"))&&(this._styles[n].display="block")});let r=w(this._styles,'input[type="range"]');r!==this._lastStyleString&&(this._styleElement.textContent=r,this._lastStyleString=r)}_updateInputAttributes(){let t=this.getAttribute("value"),e=this.getAttribute("min"),s=this.getAttribute("max"),r=this.getAttribute("step"),n=this.hasAttribute("disabled");t!==null?this._inputElement.value=t:this._inputElement.value=e??0,e!==null?this._inputElement.min=e:this._inputElement.min="0",s!==null?this._inputElement.max=s:this._inputElement.max="100",r!==null?this._inputElement.step=r:this._inputElement.step="1",n?this._inputElement.setAttribute("disabled",""):this._inputElement.removeAttribute("disabled")}connectedCallback(){this._updateInputAttributes()}},Zt=({render:i,html:t})=>bt;var vt=40,Fe=6,_t=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
1245
1278
  :host {
1246
1279
  display: contents;
1247
1280
  }
@@ -1318,7 +1351,7 @@ var rettangoli=(()=>{var T=`
1318
1351
  animation: none;
1319
1352
  }
1320
1353
  }
1321
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._dialogElement=document.createElement("dialog"),this.shadow.appendChild(this._dialogElement),this._slotElement=null,this._isConnected=!1,this._adaptiveFrameId=null,this._layoutRetryCount=0,this._observedContentElement=null,this._resizeObserver=typeof ResizeObserver<"u"?new ResizeObserver(()=>{this._scheduleAdaptiveCentering()}):null,this._onSlotChange=()=>{this._observeAssignedContent(),this._scheduleAdaptiveCentering({resetRetries:!0})},this._onWindowResize=()=>{this._scheduleAdaptiveCentering({resetRetries:!0})},this._mouseDownInContent=!1,this._dialogElement.addEventListener("mousedown",t=>{this._mouseDownInContent=t.target!==this._dialogElement}),this._dialogElement.addEventListener("click",t=>{t.target===this._dialogElement&&!this._mouseDownInContent&&this._attemptClose(),this._mouseDownInContent=!1}),this._dialogElement.addEventListener("contextmenu",t=>{t.target===this._dialogElement&&!this._mouseDownInContent&&(t.preventDefault(),this._attemptClose()),this._mouseDownInContent=!1}),this._dialogElement.addEventListener("cancel",t=>{t.preventDefault(),this._attemptClose()})}_attemptClose(){this.dispatchEvent(new CustomEvent("close",{detail:{},bubbles:!0}))}static get observedAttributes(){return["open","w","s"]}connectedCallback(){this._updateDialog(),this._isConnected=!0,this.hasAttribute("open")&&this._showModal()}disconnectedCallback(){this._isConnected=!1,this._stopAdaptiveObservers(),this._slotElement&&this._slotElement.removeEventListener("slotchange",this._onSlotChange),this._dialogElement.open&&this._dialogElement.close()}attributeChangedCallback(t,e,s){t==="open"?s!==null&&!this._dialogElement.open&&this._isConnected?this._showModal():s===null&&this._dialogElement.open&&this._hideModal():t==="w"&&this._updateWidth()}_updateDialog(){this._updateWidth()}_updateWidth(){let t=this.getAttribute("w");t?this._dialogElement.style.width=t:this._dialogElement.style.width=""}_showModal(){this._dialogElement.open||(this._slotElement||(this._slotElement=document.createElement("slot"),this._slotElement.setAttribute("name","content"),this._slotElement.addEventListener("slotchange",this._onSlotChange),this._dialogElement.appendChild(this._slotElement)),this._dialogElement.showModal(),this._dialogElement.scrollTop=0,window.addEventListener("resize",this._onWindowResize),this._observeAssignedContent(),this._scheduleAdaptiveCentering({resetRetries:!0}))}_hideModal(){this._dialogElement.open&&(this._stopAdaptiveObservers(),this._dialogElement.close(),this._slotElement&&(this._slotElement.removeEventListener("slotchange",this._onSlotChange),this._slotElement.style.marginTop="",this._slotElement.style.marginBottom="",this._dialogElement.removeChild(this._slotElement),this._slotElement=null),this._dialogElement.style.height="")}_stopAdaptiveObservers(){this._adaptiveFrameId!==null&&(cancelAnimationFrame(this._adaptiveFrameId),this._adaptiveFrameId=null),this._layoutRetryCount=0,window.removeEventListener("resize",this._onWindowResize),this._resizeObserver&&this._observedContentElement&&this._resizeObserver.unobserve(this._observedContentElement),this._observedContentElement=null}_getAssignedContentElement(){if(!this._slotElement)return null;let t=this._slotElement.assignedElements({flatten:!0});return t.length>0?t[0]:null}_observeAssignedContent(){if(!this._resizeObserver)return;let t=this._getAssignedContentElement();this._observedContentElement!==t&&(this._observedContentElement&&this._resizeObserver.unobserve(this._observedContentElement),this._observedContentElement=t,this._observedContentElement&&this._resizeObserver.observe(this._observedContentElement))}_scheduleAdaptiveCentering({resetRetries:t=!1}={}){!this._slotElement||!this._dialogElement.open||(t&&(this._layoutRetryCount=0),this._adaptiveFrameId!==null&&cancelAnimationFrame(this._adaptiveFrameId),this._adaptiveFrameId=requestAnimationFrame(()=>{this._adaptiveFrameId=requestAnimationFrame(()=>{this._adaptiveFrameId=null,this._applyAdaptiveCentering()})}))}_applyAdaptiveCentering(){if(!this._slotElement||!this._dialogElement.open)return;this._observeAssignedContent();let t=this._getAssignedContentElement(),e=t?Math.round(t.getBoundingClientRect().height):0;if(e<=0){this._layoutRetryCount<je&&(this._layoutRetryCount+=1,this._scheduleAdaptiveCentering());return}this._layoutRetryCount=0;let s=window.innerHeight;if(e>=s-2*xt){this._slotElement.style.marginTop=`${xt}px`,this._slotElement.style.marginBottom=`${xt}px`,this._dialogElement.style.height="100vh";return}let r=s-e,n=Math.floor(r/2);this._slotElement.style.marginTop=`${n}px`,this._slotElement.style.marginBottom=`${n}px`,this._dialogElement.style.height="auto"}get dialog(){return this._dialogElement}},re=({render:i,html:t})=>St;var Et=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(c`
1354
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._dialogElement=document.createElement("dialog"),this.shadow.appendChild(this._dialogElement),this._slotElement=null,this._isConnected=!1,this._adaptiveFrameId=null,this._layoutRetryCount=0,this._observedContentElement=null,this._resizeObserver=typeof ResizeObserver<"u"?new ResizeObserver(()=>{this._scheduleAdaptiveCentering()}):null,this._onSlotChange=()=>{this._observeAssignedContent(),this._scheduleAdaptiveCentering({resetRetries:!0})},this._onWindowResize=()=>{this._scheduleAdaptiveCentering({resetRetries:!0})},this._mouseDownInContent=!1,this._dialogElement.addEventListener("mousedown",t=>{this._mouseDownInContent=t.target!==this._dialogElement}),this._dialogElement.addEventListener("click",t=>{t.target===this._dialogElement&&!this._mouseDownInContent&&this._attemptClose(),this._mouseDownInContent=!1}),this._dialogElement.addEventListener("contextmenu",t=>{t.target===this._dialogElement&&!this._mouseDownInContent&&(t.preventDefault(),this._attemptClose()),this._mouseDownInContent=!1}),this._dialogElement.addEventListener("cancel",t=>{t.preventDefault(),this._attemptClose()})}_attemptClose(){this.dispatchEvent(new CustomEvent("close",{detail:{},bubbles:!0}))}static get observedAttributes(){return["open","w","s"]}connectedCallback(){this._updateDialog(),this._isConnected=!0,this.hasAttribute("open")&&this._showModal()}disconnectedCallback(){this._isConnected=!1,this._stopAdaptiveObservers(),this._slotElement&&this._slotElement.removeEventListener("slotchange",this._onSlotChange),this._dialogElement.open&&this._dialogElement.close()}attributeChangedCallback(t,e,s){t==="open"?s!==null&&!this._dialogElement.open&&this._isConnected?this._showModal():s===null&&this._dialogElement.open&&this._hideModal():t==="w"&&this._updateWidth()}_updateDialog(){this._updateWidth()}_updateWidth(){let t=this.getAttribute("w");t?this._dialogElement.style.width=t:this._dialogElement.style.width=""}_showModal(){this._dialogElement.open||(this._slotElement||(this._slotElement=document.createElement("slot"),this._slotElement.setAttribute("name","content"),this._slotElement.addEventListener("slotchange",this._onSlotChange),this._dialogElement.appendChild(this._slotElement)),this._dialogElement.showModal(),this._dialogElement.scrollTop=0,window.addEventListener("resize",this._onWindowResize),this._observeAssignedContent(),this._scheduleAdaptiveCentering({resetRetries:!0}))}_hideModal(){this._dialogElement.open&&(this._stopAdaptiveObservers(),this._dialogElement.close(),this._slotElement&&(this._slotElement.removeEventListener("slotchange",this._onSlotChange),this._slotElement.style.marginTop="",this._slotElement.style.marginBottom="",this._dialogElement.removeChild(this._slotElement),this._slotElement=null),this._dialogElement.style.height="")}_stopAdaptiveObservers(){this._adaptiveFrameId!==null&&(cancelAnimationFrame(this._adaptiveFrameId),this._adaptiveFrameId=null),this._layoutRetryCount=0,window.removeEventListener("resize",this._onWindowResize),this._resizeObserver&&this._observedContentElement&&this._resizeObserver.unobserve(this._observedContentElement),this._observedContentElement=null}_getAssignedContentElement(){if(!this._slotElement)return null;let t=this._slotElement.assignedElements({flatten:!0});return t.length>0?t[0]:null}_observeAssignedContent(){if(!this._resizeObserver)return;let t=this._getAssignedContentElement();this._observedContentElement!==t&&(this._observedContentElement&&this._resizeObserver.unobserve(this._observedContentElement),this._observedContentElement=t,this._observedContentElement&&this._resizeObserver.observe(this._observedContentElement))}_scheduleAdaptiveCentering({resetRetries:t=!1}={}){!this._slotElement||!this._dialogElement.open||(t&&(this._layoutRetryCount=0),this._adaptiveFrameId!==null&&cancelAnimationFrame(this._adaptiveFrameId),this._adaptiveFrameId=requestAnimationFrame(()=>{this._adaptiveFrameId=requestAnimationFrame(()=>{this._adaptiveFrameId=null,this._applyAdaptiveCentering()})}))}_applyAdaptiveCentering(){if(!this._slotElement||!this._dialogElement.open)return;this._observeAssignedContent();let t=this._getAssignedContentElement(),e=t?Math.round(t.getBoundingClientRect().height):0;if(e<=0){this._layoutRetryCount<Fe&&(this._layoutRetryCount+=1,this._scheduleAdaptiveCentering());return}this._layoutRetryCount=0;let s=window.innerHeight;if(e>=s-2*vt){this._slotElement.style.marginTop=`${vt}px`,this._slotElement.style.marginBottom=`${vt}px`,this._dialogElement.style.height="100vh";return}let r=s-e,n=Math.floor(r/2);this._slotElement.style.marginTop=`${n}px`,this._slotElement.style.marginBottom=`${n}px`,this._dialogElement.style.height="auto"}get dialog(){return this._dialogElement}},te=({render:i,html:t})=>_t;var yt=class i extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){i.styleSheet||(i.styleSheet=new CSSStyleSheet,i.styleSheet.replaceSync(d`
1322
1355
  :host {
1323
1356
  display: contents;
1324
1357
  }
@@ -1372,4 +1405,4 @@ var rettangoli=(()=>{var T=`
1372
1405
  min-width: 200px;
1373
1406
  max-width: 400px;
1374
1407
  }
1375
- `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._dialogElement=document.createElement("dialog"),this.shadow.appendChild(this._dialogElement),this._dialogElement.addEventListener("click",t=>{t.stopPropagation();let e=t.composedPath();(e[0]===this._dialogElement||e[0].nodeName==="DIALOG"&&e[0]===this._dialogElement)&&this._emitClose()}),this._dialogElement.addEventListener("contextmenu",t=>{let e=t.composedPath();(e[0]===this._dialogElement||e[0].nodeName==="DIALOG"&&e[0]===this._dialogElement)&&(t.preventDefault(),this._emitClose())}),this._dialogElement.addEventListener("cancel",t=>{t.preventDefault(),this._emitClose()}),this._popoverContainer=document.createElement("div"),this._popoverContainer.className="popover-container",this._dialogElement.appendChild(this._popoverContainer),this._slotElement=null,this._isOpen=!1}_emitClose(){this.dispatchEvent(new CustomEvent("close",{detail:{},bubbles:!0}))}static get observedAttributes(){return["open","x","y","place","no-overlay"]}connectedCallback(){this.hasAttribute("open")&&this._show()}disconnectedCallback(){this._isOpen&&this._dialogElement.open&&this._dialogElement.close()}attributeChangedCallback(t,e,s){t==="open"?s!==null&&!this._isOpen?this.isConnected&&this._show():s===null&&this._isOpen&&this._hide():(t==="x"||t==="y"||t==="place")&&this._isOpen?this._updatePosition():t==="no-overlay"&&e!==s&&this._isOpen&&(this._hide(),this._show())}_show(){this._isOpen||(this._slotElement||(this._slotElement=document.createElement("slot"),this._slotElement.setAttribute("name","content"),this._popoverContainer.appendChild(this._slotElement)),this._isOpen=!0,this._dialogElement.open||setTimeout(()=>{this._dialogElement&&!this._dialogElement.open&&(this.hasAttribute("no-overlay")?this._dialogElement.show():this._dialogElement.showModal())},0),requestAnimationFrame(()=>{this._updatePosition()}))}_hide(){this._isOpen&&(this._isOpen=!1,this._dialogElement.open&&this._dialogElement.close(),this._slotElement&&(this._popoverContainer.removeChild(this._slotElement),this._slotElement=null))}_updatePosition(){let t=parseFloat(this.getAttribute("x")||"0"),e=parseFloat(this.getAttribute("y")||"0"),s=this.getAttribute("place")||"bs";this.removeAttribute("positioned"),requestAnimationFrame(()=>{let r=this._popoverContainer.getBoundingClientRect(),{left:n,top:o}=this._calculatePosition(t,e,r.width,r.height,s);this._popoverContainer.style.left=`${n}px`,this._popoverContainer.style.top=`${o}px`,requestAnimationFrame(()=>{this.setAttribute("positioned","")})})}_calculatePosition(t,e,s,r,n){let l=t,a=e;switch(n){case"t":l=t-s/2,a=e-r-8;break;case"ts":l=t,a=e-r-8;break;case"te":l=t-s,a=e-r-8;break;case"r":l=t+8,a=e-r/2;break;case"rs":l=t+8,a=e;break;case"re":l=t+8,a=e-r;break;case"b":l=t-s/2,a=e+8;break;case"bs":l=t,a=e+8;break;case"be":l=t-s,a=e+8;break;case"l":l=t-s-8,a=e-r/2;break;case"ls":l=t-s-8,a=e;break;case"le":l=t-s-8,a=e-r;break;default:l=t,a=e+8;break}let h=8;return l=Math.max(h,Math.min(l,window.innerWidth-s-h)),a=Math.max(h,Math.min(a,window.innerHeight-r-h)),{left:l,top:a}}get popover(){return this._popoverContainer}},ne=({render:i,html:t})=>Et;customElements.define("rtgl-button",Tt({}));customElements.define("rtgl-carousel",Ft({}));customElements.define("rtgl-grid",Pt({}));customElements.define("rtgl-view",Vt({}));customElements.define("rtgl-text",jt({}));customElements.define("rtgl-image",qt({}));customElements.define("rtgl-tag",Kt({}));customElements.define("rtgl-svg",Yt({}));customElements.define("rtgl-input",I({}));customElements.define("rtgl-input-date",Qt({}));customElements.define("rtgl-input-time",Jt({}));customElements.define("rtgl-input-datetime",Zt({}));customElements.define("rtgl-input-number",te({}));customElements.define("rtgl-textarea",ee({}));customElements.define("rtgl-color-picker",ie({}));customElements.define("rtgl-slider",se({}));customElements.define("rtgl-dialog",re({}));customElements.define("rtgl-popover",ne({}));})();
1408
+ `))}constructor(){super(),i.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[i.styleSheet],this._dialogElement=document.createElement("dialog"),this.shadow.appendChild(this._dialogElement),this._dialogElement.addEventListener("click",t=>{t.stopPropagation();let e=t.composedPath();(e[0]===this._dialogElement||e[0].nodeName==="DIALOG"&&e[0]===this._dialogElement)&&this._emitClose()}),this._dialogElement.addEventListener("contextmenu",t=>{let e=t.composedPath();(e[0]===this._dialogElement||e[0].nodeName==="DIALOG"&&e[0]===this._dialogElement)&&(t.preventDefault(),this._emitClose())}),this._dialogElement.addEventListener("cancel",t=>{t.preventDefault(),this._emitClose()}),this._popoverContainer=document.createElement("div"),this._popoverContainer.className="popover-container",this._dialogElement.appendChild(this._popoverContainer),this._slotElement=null,this._isOpen=!1}_emitClose(){this.dispatchEvent(new CustomEvent("close",{detail:{},bubbles:!0}))}static get observedAttributes(){return["open","x","y","place","no-overlay"]}connectedCallback(){this.hasAttribute("open")&&this._show()}disconnectedCallback(){this._isOpen&&this._dialogElement.open&&this._dialogElement.close()}attributeChangedCallback(t,e,s){t==="open"?s!==null&&!this._isOpen?this.isConnected&&this._show():s===null&&this._isOpen&&this._hide():(t==="x"||t==="y"||t==="place")&&this._isOpen?this._updatePosition():t==="no-overlay"&&e!==s&&this._isOpen&&(this._hide(),this._show())}_show(){this._isOpen||(this._slotElement||(this._slotElement=document.createElement("slot"),this._slotElement.setAttribute("name","content"),this._popoverContainer.appendChild(this._slotElement)),this._isOpen=!0,this._dialogElement.open||setTimeout(()=>{this._dialogElement&&!this._dialogElement.open&&(this.hasAttribute("no-overlay")?this._dialogElement.show():this._dialogElement.showModal())},0),requestAnimationFrame(()=>{this._updatePosition()}))}_hide(){this._isOpen&&(this._isOpen=!1,this._dialogElement.open&&this._dialogElement.close(),this._slotElement&&(this._popoverContainer.removeChild(this._slotElement),this._slotElement=null))}_updatePosition(){let t=parseFloat(this.getAttribute("x")||"0"),e=parseFloat(this.getAttribute("y")||"0"),s=this.getAttribute("place")||"bs";this.removeAttribute("positioned"),requestAnimationFrame(()=>{let r=this._popoverContainer.getBoundingClientRect(),{left:n,top:o}=this._calculatePosition(t,e,r.width,r.height,s);this._popoverContainer.style.left=`${n}px`,this._popoverContainer.style.top=`${o}px`,requestAnimationFrame(()=>{this.setAttribute("positioned","")})})}_calculatePosition(t,e,s,r,n){let l=t,a=e;switch(n){case"t":l=t-s/2,a=e-r-8;break;case"ts":l=t,a=e-r-8;break;case"te":l=t-s,a=e-r-8;break;case"r":l=t+8,a=e-r/2;break;case"rs":l=t+8,a=e;break;case"re":l=t+8,a=e-r;break;case"b":l=t-s/2,a=e+8;break;case"bs":l=t,a=e+8;break;case"be":l=t-s,a=e+8;break;case"l":l=t-s-8,a=e-r/2;break;case"ls":l=t-s-8,a=e;break;case"le":l=t-s-8,a=e-r;break;default:l=t,a=e+8;break}let h=8;return l=Math.max(h,Math.min(l,window.innerWidth-s-h)),a=Math.max(h,Math.min(a,window.innerHeight-r-h)),{left:l,top:a}}get popover(){return this._popoverContainer}},ee=({render:i,html:t})=>yt;customElements.define("rtgl-button",$t({}));customElements.define("rtgl-carousel",Mt({}));customElements.define("rtgl-grid",Ot({}));customElements.define("rtgl-view",Ft({}));customElements.define("rtgl-text",Pt({}));customElements.define("rtgl-image",Dt({}));customElements.define("rtgl-tag",Ut({}));customElements.define("rtgl-svg",qt({}));customElements.define("rtgl-input",z({}));customElements.define("rtgl-input-date",Gt({}));customElements.define("rtgl-input-time",Kt({}));customElements.define("rtgl-input-datetime",Xt({}));customElements.define("rtgl-input-number",Yt({}));customElements.define("rtgl-textarea",Qt({}));customElements.define("rtgl-color-picker",Jt({}));customElements.define("rtgl-slider",Zt({}));customElements.define("rtgl-dialog",te({}));customElements.define("rtgl-popover",ee({}));})();